0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-17 09:52:29 +01:00
This commit is contained in:
XhmikosR 2019-03-01 18:31:34 +02:00 committed by GitHub
parent d47d29aeaa
commit 19aee321a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
62 changed files with 6075 additions and 3581 deletions

View File

@ -56,9 +56,7 @@ html {
}
.row {
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
margin-right: -15px;
margin-left: -15px;
@ -88,164 +86,134 @@ html {
}
.col {
-ms-flex-preferred-size: 0;
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
max-width: 100%;
}
.col-auto {
-ms-flex: 0 0 auto;
flex: 0 0 auto;
width: auto;
max-width: 100%;
}
.col-1 {
-ms-flex: 0 0 8.333333%;
flex: 0 0 8.333333%;
max-width: 8.333333%;
}
.col-2 {
-ms-flex: 0 0 16.666667%;
flex: 0 0 16.666667%;
max-width: 16.666667%;
}
.col-3 {
-ms-flex: 0 0 25%;
flex: 0 0 25%;
max-width: 25%;
}
.col-4 {
-ms-flex: 0 0 33.333333%;
flex: 0 0 33.333333%;
max-width: 33.333333%;
}
.col-5 {
-ms-flex: 0 0 41.666667%;
flex: 0 0 41.666667%;
max-width: 41.666667%;
}
.col-6 {
-ms-flex: 0 0 50%;
flex: 0 0 50%;
max-width: 50%;
}
.col-7 {
-ms-flex: 0 0 58.333333%;
flex: 0 0 58.333333%;
max-width: 58.333333%;
}
.col-8 {
-ms-flex: 0 0 66.666667%;
flex: 0 0 66.666667%;
max-width: 66.666667%;
}
.col-9 {
-ms-flex: 0 0 75%;
flex: 0 0 75%;
max-width: 75%;
}
.col-10 {
-ms-flex: 0 0 83.333333%;
flex: 0 0 83.333333%;
max-width: 83.333333%;
}
.col-11 {
-ms-flex: 0 0 91.666667%;
flex: 0 0 91.666667%;
max-width: 91.666667%;
}
.col-12 {
-ms-flex: 0 0 100%;
flex: 0 0 100%;
max-width: 100%;
}
.order-first {
-ms-flex-order: -1;
order: -1;
}
.order-last {
-ms-flex-order: 13;
order: 13;
}
.order-0 {
-ms-flex-order: 0;
order: 0;
}
.order-1 {
-ms-flex-order: 1;
order: 1;
}
.order-2 {
-ms-flex-order: 2;
order: 2;
}
.order-3 {
-ms-flex-order: 3;
order: 3;
}
.order-4 {
-ms-flex-order: 4;
order: 4;
}
.order-5 {
-ms-flex-order: 5;
order: 5;
}
.order-6 {
-ms-flex-order: 6;
order: 6;
}
.order-7 {
-ms-flex-order: 7;
order: 7;
}
.order-8 {
-ms-flex-order: 8;
order: 8;
}
.order-9 {
-ms-flex-order: 9;
order: 9;
}
.order-10 {
-ms-flex-order: 10;
order: 10;
}
.order-11 {
-ms-flex-order: 11;
order: 11;
}
.order-12 {
-ms-flex-order: 12;
order: 12;
}
@ -295,136 +263,106 @@ html {
@media (min-width: 576px) {
.col-sm {
-ms-flex-preferred-size: 0;
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
max-width: 100%;
}
.col-sm-auto {
-ms-flex: 0 0 auto;
flex: 0 0 auto;
width: auto;
max-width: 100%;
}
.col-sm-1 {
-ms-flex: 0 0 8.333333%;
flex: 0 0 8.333333%;
max-width: 8.333333%;
}
.col-sm-2 {
-ms-flex: 0 0 16.666667%;
flex: 0 0 16.666667%;
max-width: 16.666667%;
}
.col-sm-3 {
-ms-flex: 0 0 25%;
flex: 0 0 25%;
max-width: 25%;
}
.col-sm-4 {
-ms-flex: 0 0 33.333333%;
flex: 0 0 33.333333%;
max-width: 33.333333%;
}
.col-sm-5 {
-ms-flex: 0 0 41.666667%;
flex: 0 0 41.666667%;
max-width: 41.666667%;
}
.col-sm-6 {
-ms-flex: 0 0 50%;
flex: 0 0 50%;
max-width: 50%;
}
.col-sm-7 {
-ms-flex: 0 0 58.333333%;
flex: 0 0 58.333333%;
max-width: 58.333333%;
}
.col-sm-8 {
-ms-flex: 0 0 66.666667%;
flex: 0 0 66.666667%;
max-width: 66.666667%;
}
.col-sm-9 {
-ms-flex: 0 0 75%;
flex: 0 0 75%;
max-width: 75%;
}
.col-sm-10 {
-ms-flex: 0 0 83.333333%;
flex: 0 0 83.333333%;
max-width: 83.333333%;
}
.col-sm-11 {
-ms-flex: 0 0 91.666667%;
flex: 0 0 91.666667%;
max-width: 91.666667%;
}
.col-sm-12 {
-ms-flex: 0 0 100%;
flex: 0 0 100%;
max-width: 100%;
}
.order-sm-first {
-ms-flex-order: -1;
order: -1;
}
.order-sm-last {
-ms-flex-order: 13;
order: 13;
}
.order-sm-0 {
-ms-flex-order: 0;
order: 0;
}
.order-sm-1 {
-ms-flex-order: 1;
order: 1;
}
.order-sm-2 {
-ms-flex-order: 2;
order: 2;
}
.order-sm-3 {
-ms-flex-order: 3;
order: 3;
}
.order-sm-4 {
-ms-flex-order: 4;
order: 4;
}
.order-sm-5 {
-ms-flex-order: 5;
order: 5;
}
.order-sm-6 {
-ms-flex-order: 6;
order: 6;
}
.order-sm-7 {
-ms-flex-order: 7;
order: 7;
}
.order-sm-8 {
-ms-flex-order: 8;
order: 8;
}
.order-sm-9 {
-ms-flex-order: 9;
order: 9;
}
.order-sm-10 {
-ms-flex-order: 10;
order: 10;
}
.order-sm-11 {
-ms-flex-order: 11;
order: 11;
}
.order-sm-12 {
-ms-flex-order: 12;
order: 12;
}
.offset-sm-0 {
@ -467,136 +405,106 @@ html {
@media (min-width: 768px) {
.col-md {
-ms-flex-preferred-size: 0;
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
max-width: 100%;
}
.col-md-auto {
-ms-flex: 0 0 auto;
flex: 0 0 auto;
width: auto;
max-width: 100%;
}
.col-md-1 {
-ms-flex: 0 0 8.333333%;
flex: 0 0 8.333333%;
max-width: 8.333333%;
}
.col-md-2 {
-ms-flex: 0 0 16.666667%;
flex: 0 0 16.666667%;
max-width: 16.666667%;
}
.col-md-3 {
-ms-flex: 0 0 25%;
flex: 0 0 25%;
max-width: 25%;
}
.col-md-4 {
-ms-flex: 0 0 33.333333%;
flex: 0 0 33.333333%;
max-width: 33.333333%;
}
.col-md-5 {
-ms-flex: 0 0 41.666667%;
flex: 0 0 41.666667%;
max-width: 41.666667%;
}
.col-md-6 {
-ms-flex: 0 0 50%;
flex: 0 0 50%;
max-width: 50%;
}
.col-md-7 {
-ms-flex: 0 0 58.333333%;
flex: 0 0 58.333333%;
max-width: 58.333333%;
}
.col-md-8 {
-ms-flex: 0 0 66.666667%;
flex: 0 0 66.666667%;
max-width: 66.666667%;
}
.col-md-9 {
-ms-flex: 0 0 75%;
flex: 0 0 75%;
max-width: 75%;
}
.col-md-10 {
-ms-flex: 0 0 83.333333%;
flex: 0 0 83.333333%;
max-width: 83.333333%;
}
.col-md-11 {
-ms-flex: 0 0 91.666667%;
flex: 0 0 91.666667%;
max-width: 91.666667%;
}
.col-md-12 {
-ms-flex: 0 0 100%;
flex: 0 0 100%;
max-width: 100%;
}
.order-md-first {
-ms-flex-order: -1;
order: -1;
}
.order-md-last {
-ms-flex-order: 13;
order: 13;
}
.order-md-0 {
-ms-flex-order: 0;
order: 0;
}
.order-md-1 {
-ms-flex-order: 1;
order: 1;
}
.order-md-2 {
-ms-flex-order: 2;
order: 2;
}
.order-md-3 {
-ms-flex-order: 3;
order: 3;
}
.order-md-4 {
-ms-flex-order: 4;
order: 4;
}
.order-md-5 {
-ms-flex-order: 5;
order: 5;
}
.order-md-6 {
-ms-flex-order: 6;
order: 6;
}
.order-md-7 {
-ms-flex-order: 7;
order: 7;
}
.order-md-8 {
-ms-flex-order: 8;
order: 8;
}
.order-md-9 {
-ms-flex-order: 9;
order: 9;
}
.order-md-10 {
-ms-flex-order: 10;
order: 10;
}
.order-md-11 {
-ms-flex-order: 11;
order: 11;
}
.order-md-12 {
-ms-flex-order: 12;
order: 12;
}
.offset-md-0 {
@ -639,136 +547,106 @@ html {
@media (min-width: 992px) {
.col-lg {
-ms-flex-preferred-size: 0;
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
max-width: 100%;
}
.col-lg-auto {
-ms-flex: 0 0 auto;
flex: 0 0 auto;
width: auto;
max-width: 100%;
}
.col-lg-1 {
-ms-flex: 0 0 8.333333%;
flex: 0 0 8.333333%;
max-width: 8.333333%;
}
.col-lg-2 {
-ms-flex: 0 0 16.666667%;
flex: 0 0 16.666667%;
max-width: 16.666667%;
}
.col-lg-3 {
-ms-flex: 0 0 25%;
flex: 0 0 25%;
max-width: 25%;
}
.col-lg-4 {
-ms-flex: 0 0 33.333333%;
flex: 0 0 33.333333%;
max-width: 33.333333%;
}
.col-lg-5 {
-ms-flex: 0 0 41.666667%;
flex: 0 0 41.666667%;
max-width: 41.666667%;
}
.col-lg-6 {
-ms-flex: 0 0 50%;
flex: 0 0 50%;
max-width: 50%;
}
.col-lg-7 {
-ms-flex: 0 0 58.333333%;
flex: 0 0 58.333333%;
max-width: 58.333333%;
}
.col-lg-8 {
-ms-flex: 0 0 66.666667%;
flex: 0 0 66.666667%;
max-width: 66.666667%;
}
.col-lg-9 {
-ms-flex: 0 0 75%;
flex: 0 0 75%;
max-width: 75%;
}
.col-lg-10 {
-ms-flex: 0 0 83.333333%;
flex: 0 0 83.333333%;
max-width: 83.333333%;
}
.col-lg-11 {
-ms-flex: 0 0 91.666667%;
flex: 0 0 91.666667%;
max-width: 91.666667%;
}
.col-lg-12 {
-ms-flex: 0 0 100%;
flex: 0 0 100%;
max-width: 100%;
}
.order-lg-first {
-ms-flex-order: -1;
order: -1;
}
.order-lg-last {
-ms-flex-order: 13;
order: 13;
}
.order-lg-0 {
-ms-flex-order: 0;
order: 0;
}
.order-lg-1 {
-ms-flex-order: 1;
order: 1;
}
.order-lg-2 {
-ms-flex-order: 2;
order: 2;
}
.order-lg-3 {
-ms-flex-order: 3;
order: 3;
}
.order-lg-4 {
-ms-flex-order: 4;
order: 4;
}
.order-lg-5 {
-ms-flex-order: 5;
order: 5;
}
.order-lg-6 {
-ms-flex-order: 6;
order: 6;
}
.order-lg-7 {
-ms-flex-order: 7;
order: 7;
}
.order-lg-8 {
-ms-flex-order: 8;
order: 8;
}
.order-lg-9 {
-ms-flex-order: 9;
order: 9;
}
.order-lg-10 {
-ms-flex-order: 10;
order: 10;
}
.order-lg-11 {
-ms-flex-order: 11;
order: 11;
}
.order-lg-12 {
-ms-flex-order: 12;
order: 12;
}
.offset-lg-0 {
@ -811,136 +689,106 @@ html {
@media (min-width: 1200px) {
.col-xl {
-ms-flex-preferred-size: 0;
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
max-width: 100%;
}
.col-xl-auto {
-ms-flex: 0 0 auto;
flex: 0 0 auto;
width: auto;
max-width: 100%;
}
.col-xl-1 {
-ms-flex: 0 0 8.333333%;
flex: 0 0 8.333333%;
max-width: 8.333333%;
}
.col-xl-2 {
-ms-flex: 0 0 16.666667%;
flex: 0 0 16.666667%;
max-width: 16.666667%;
}
.col-xl-3 {
-ms-flex: 0 0 25%;
flex: 0 0 25%;
max-width: 25%;
}
.col-xl-4 {
-ms-flex: 0 0 33.333333%;
flex: 0 0 33.333333%;
max-width: 33.333333%;
}
.col-xl-5 {
-ms-flex: 0 0 41.666667%;
flex: 0 0 41.666667%;
max-width: 41.666667%;
}
.col-xl-6 {
-ms-flex: 0 0 50%;
flex: 0 0 50%;
max-width: 50%;
}
.col-xl-7 {
-ms-flex: 0 0 58.333333%;
flex: 0 0 58.333333%;
max-width: 58.333333%;
}
.col-xl-8 {
-ms-flex: 0 0 66.666667%;
flex: 0 0 66.666667%;
max-width: 66.666667%;
}
.col-xl-9 {
-ms-flex: 0 0 75%;
flex: 0 0 75%;
max-width: 75%;
}
.col-xl-10 {
-ms-flex: 0 0 83.333333%;
flex: 0 0 83.333333%;
max-width: 83.333333%;
}
.col-xl-11 {
-ms-flex: 0 0 91.666667%;
flex: 0 0 91.666667%;
max-width: 91.666667%;
}
.col-xl-12 {
-ms-flex: 0 0 100%;
flex: 0 0 100%;
max-width: 100%;
}
.order-xl-first {
-ms-flex-order: -1;
order: -1;
}
.order-xl-last {
-ms-flex-order: 13;
order: 13;
}
.order-xl-0 {
-ms-flex-order: 0;
order: 0;
}
.order-xl-1 {
-ms-flex-order: 1;
order: 1;
}
.order-xl-2 {
-ms-flex-order: 2;
order: 2;
}
.order-xl-3 {
-ms-flex-order: 3;
order: 3;
}
.order-xl-4 {
-ms-flex-order: 4;
order: 4;
}
.order-xl-5 {
-ms-flex-order: 5;
order: 5;
}
.order-xl-6 {
-ms-flex-order: 6;
order: 6;
}
.order-xl-7 {
-ms-flex-order: 7;
order: 7;
}
.order-xl-8 {
-ms-flex-order: 8;
order: 8;
}
.order-xl-9 {
-ms-flex-order: 9;
order: 9;
}
.order-xl-10 {
-ms-flex-order: 10;
order: 10;
}
.order-xl-11 {
-ms-flex-order: 11;
order: 11;
}
.order-xl-12 {
-ms-flex-order: 12;
order: 12;
}
.offset-xl-0 {
@ -1010,12 +858,10 @@ html {
}
.d-flex {
display: -ms-flexbox !important;
display: flex !important;
}
.d-inline-flex {
display: -ms-inline-flexbox !important;
display: inline-flex !important;
}
@ -1042,11 +888,9 @@ html {
display: table-cell !important;
}
.d-sm-flex {
display: -ms-flexbox !important;
display: flex !important;
}
.d-sm-inline-flex {
display: -ms-inline-flexbox !important;
display: inline-flex !important;
}
}
@ -1074,11 +918,9 @@ html {
display: table-cell !important;
}
.d-md-flex {
display: -ms-flexbox !important;
display: flex !important;
}
.d-md-inline-flex {
display: -ms-inline-flexbox !important;
display: inline-flex !important;
}
}
@ -1106,11 +948,9 @@ html {
display: table-cell !important;
}
.d-lg-flex {
display: -ms-flexbox !important;
display: flex !important;
}
.d-lg-inline-flex {
display: -ms-inline-flexbox !important;
display: inline-flex !important;
}
}
@ -1138,11 +978,9 @@ html {
display: table-cell !important;
}
.d-xl-flex {
display: -ms-flexbox !important;
display: flex !important;
}
.d-xl-inline-flex {
display: -ms-inline-flexbox !important;
display: inline-flex !important;
}
}
@ -1170,737 +1008,565 @@ html {
display: table-cell !important;
}
.d-print-flex {
display: -ms-flexbox !important;
display: flex !important;
}
.d-print-inline-flex {
display: -ms-inline-flexbox !important;
display: inline-flex !important;
}
}
.flex-row {
-ms-flex-direction: row !important;
flex-direction: row !important;
}
.flex-column {
-ms-flex-direction: column !important;
flex-direction: column !important;
}
.flex-row-reverse {
-ms-flex-direction: row-reverse !important;
flex-direction: row-reverse !important;
}
.flex-column-reverse {
-ms-flex-direction: column-reverse !important;
flex-direction: column-reverse !important;
}
.flex-wrap {
-ms-flex-wrap: wrap !important;
flex-wrap: wrap !important;
}
.flex-nowrap {
-ms-flex-wrap: nowrap !important;
flex-wrap: nowrap !important;
}
.flex-wrap-reverse {
-ms-flex-wrap: wrap-reverse !important;
flex-wrap: wrap-reverse !important;
}
.flex-fill {
-ms-flex: 1 1 auto !important;
flex: 1 1 auto !important;
}
.flex-grow-0 {
-ms-flex-positive: 0 !important;
flex-grow: 0 !important;
}
.flex-grow-1 {
-ms-flex-positive: 1 !important;
flex-grow: 1 !important;
}
.flex-shrink-0 {
-ms-flex-negative: 0 !important;
flex-shrink: 0 !important;
}
.flex-shrink-1 {
-ms-flex-negative: 1 !important;
flex-shrink: 1 !important;
}
.justify-content-start {
-ms-flex-pack: start !important;
justify-content: flex-start !important;
}
.justify-content-end {
-ms-flex-pack: end !important;
justify-content: flex-end !important;
}
.justify-content-center {
-ms-flex-pack: center !important;
justify-content: center !important;
}
.justify-content-between {
-ms-flex-pack: justify !important;
justify-content: space-between !important;
}
.justify-content-around {
-ms-flex-pack: distribute !important;
justify-content: space-around !important;
}
.align-items-start {
-ms-flex-align: start !important;
align-items: flex-start !important;
}
.align-items-end {
-ms-flex-align: end !important;
align-items: flex-end !important;
}
.align-items-center {
-ms-flex-align: center !important;
align-items: center !important;
}
.align-items-baseline {
-ms-flex-align: baseline !important;
align-items: baseline !important;
}
.align-items-stretch {
-ms-flex-align: stretch !important;
align-items: stretch !important;
}
.align-content-start {
-ms-flex-line-pack: start !important;
align-content: flex-start !important;
}
.align-content-end {
-ms-flex-line-pack: end !important;
align-content: flex-end !important;
}
.align-content-center {
-ms-flex-line-pack: center !important;
align-content: center !important;
}
.align-content-between {
-ms-flex-line-pack: justify !important;
align-content: space-between !important;
}
.align-content-around {
-ms-flex-line-pack: distribute !important;
align-content: space-around !important;
}
.align-content-stretch {
-ms-flex-line-pack: stretch !important;
align-content: stretch !important;
}
.align-self-auto {
-ms-flex-item-align: auto !important;
align-self: auto !important;
}
.align-self-start {
-ms-flex-item-align: start !important;
align-self: flex-start !important;
}
.align-self-end {
-ms-flex-item-align: end !important;
align-self: flex-end !important;
}
.align-self-center {
-ms-flex-item-align: center !important;
align-self: center !important;
}
.align-self-baseline {
-ms-flex-item-align: baseline !important;
align-self: baseline !important;
}
.align-self-stretch {
-ms-flex-item-align: stretch !important;
align-self: stretch !important;
}
@media (min-width: 576px) {
.flex-sm-row {
-ms-flex-direction: row !important;
flex-direction: row !important;
}
.flex-sm-column {
-ms-flex-direction: column !important;
flex-direction: column !important;
}
.flex-sm-row-reverse {
-ms-flex-direction: row-reverse !important;
flex-direction: row-reverse !important;
}
.flex-sm-column-reverse {
-ms-flex-direction: column-reverse !important;
flex-direction: column-reverse !important;
}
.flex-sm-wrap {
-ms-flex-wrap: wrap !important;
flex-wrap: wrap !important;
}
.flex-sm-nowrap {
-ms-flex-wrap: nowrap !important;
flex-wrap: nowrap !important;
}
.flex-sm-wrap-reverse {
-ms-flex-wrap: wrap-reverse !important;
flex-wrap: wrap-reverse !important;
}
.flex-sm-fill {
-ms-flex: 1 1 auto !important;
flex: 1 1 auto !important;
}
.flex-sm-grow-0 {
-ms-flex-positive: 0 !important;
flex-grow: 0 !important;
}
.flex-sm-grow-1 {
-ms-flex-positive: 1 !important;
flex-grow: 1 !important;
}
.flex-sm-shrink-0 {
-ms-flex-negative: 0 !important;
flex-shrink: 0 !important;
}
.flex-sm-shrink-1 {
-ms-flex-negative: 1 !important;
flex-shrink: 1 !important;
}
.justify-content-sm-start {
-ms-flex-pack: start !important;
justify-content: flex-start !important;
}
.justify-content-sm-end {
-ms-flex-pack: end !important;
justify-content: flex-end !important;
}
.justify-content-sm-center {
-ms-flex-pack: center !important;
justify-content: center !important;
}
.justify-content-sm-between {
-ms-flex-pack: justify !important;
justify-content: space-between !important;
}
.justify-content-sm-around {
-ms-flex-pack: distribute !important;
justify-content: space-around !important;
}
.align-items-sm-start {
-ms-flex-align: start !important;
align-items: flex-start !important;
}
.align-items-sm-end {
-ms-flex-align: end !important;
align-items: flex-end !important;
}
.align-items-sm-center {
-ms-flex-align: center !important;
align-items: center !important;
}
.align-items-sm-baseline {
-ms-flex-align: baseline !important;
align-items: baseline !important;
}
.align-items-sm-stretch {
-ms-flex-align: stretch !important;
align-items: stretch !important;
}
.align-content-sm-start {
-ms-flex-line-pack: start !important;
align-content: flex-start !important;
}
.align-content-sm-end {
-ms-flex-line-pack: end !important;
align-content: flex-end !important;
}
.align-content-sm-center {
-ms-flex-line-pack: center !important;
align-content: center !important;
}
.align-content-sm-between {
-ms-flex-line-pack: justify !important;
align-content: space-between !important;
}
.align-content-sm-around {
-ms-flex-line-pack: distribute !important;
align-content: space-around !important;
}
.align-content-sm-stretch {
-ms-flex-line-pack: stretch !important;
align-content: stretch !important;
}
.align-self-sm-auto {
-ms-flex-item-align: auto !important;
align-self: auto !important;
}
.align-self-sm-start {
-ms-flex-item-align: start !important;
align-self: flex-start !important;
}
.align-self-sm-end {
-ms-flex-item-align: end !important;
align-self: flex-end !important;
}
.align-self-sm-center {
-ms-flex-item-align: center !important;
align-self: center !important;
}
.align-self-sm-baseline {
-ms-flex-item-align: baseline !important;
align-self: baseline !important;
}
.align-self-sm-stretch {
-ms-flex-item-align: stretch !important;
align-self: stretch !important;
}
}
@media (min-width: 768px) {
.flex-md-row {
-ms-flex-direction: row !important;
flex-direction: row !important;
}
.flex-md-column {
-ms-flex-direction: column !important;
flex-direction: column !important;
}
.flex-md-row-reverse {
-ms-flex-direction: row-reverse !important;
flex-direction: row-reverse !important;
}
.flex-md-column-reverse {
-ms-flex-direction: column-reverse !important;
flex-direction: column-reverse !important;
}
.flex-md-wrap {
-ms-flex-wrap: wrap !important;
flex-wrap: wrap !important;
}
.flex-md-nowrap {
-ms-flex-wrap: nowrap !important;
flex-wrap: nowrap !important;
}
.flex-md-wrap-reverse {
-ms-flex-wrap: wrap-reverse !important;
flex-wrap: wrap-reverse !important;
}
.flex-md-fill {
-ms-flex: 1 1 auto !important;
flex: 1 1 auto !important;
}
.flex-md-grow-0 {
-ms-flex-positive: 0 !important;
flex-grow: 0 !important;
}
.flex-md-grow-1 {
-ms-flex-positive: 1 !important;
flex-grow: 1 !important;
}
.flex-md-shrink-0 {
-ms-flex-negative: 0 !important;
flex-shrink: 0 !important;
}
.flex-md-shrink-1 {
-ms-flex-negative: 1 !important;
flex-shrink: 1 !important;
}
.justify-content-md-start {
-ms-flex-pack: start !important;
justify-content: flex-start !important;
}
.justify-content-md-end {
-ms-flex-pack: end !important;
justify-content: flex-end !important;
}
.justify-content-md-center {
-ms-flex-pack: center !important;
justify-content: center !important;
}
.justify-content-md-between {
-ms-flex-pack: justify !important;
justify-content: space-between !important;
}
.justify-content-md-around {
-ms-flex-pack: distribute !important;
justify-content: space-around !important;
}
.align-items-md-start {
-ms-flex-align: start !important;
align-items: flex-start !important;
}
.align-items-md-end {
-ms-flex-align: end !important;
align-items: flex-end !important;
}
.align-items-md-center {
-ms-flex-align: center !important;
align-items: center !important;
}
.align-items-md-baseline {
-ms-flex-align: baseline !important;
align-items: baseline !important;
}
.align-items-md-stretch {
-ms-flex-align: stretch !important;
align-items: stretch !important;
}
.align-content-md-start {
-ms-flex-line-pack: start !important;
align-content: flex-start !important;
}
.align-content-md-end {
-ms-flex-line-pack: end !important;
align-content: flex-end !important;
}
.align-content-md-center {
-ms-flex-line-pack: center !important;
align-content: center !important;
}
.align-content-md-between {
-ms-flex-line-pack: justify !important;
align-content: space-between !important;
}
.align-content-md-around {
-ms-flex-line-pack: distribute !important;
align-content: space-around !important;
}
.align-content-md-stretch {
-ms-flex-line-pack: stretch !important;
align-content: stretch !important;
}
.align-self-md-auto {
-ms-flex-item-align: auto !important;
align-self: auto !important;
}
.align-self-md-start {
-ms-flex-item-align: start !important;
align-self: flex-start !important;
}
.align-self-md-end {
-ms-flex-item-align: end !important;
align-self: flex-end !important;
}
.align-self-md-center {
-ms-flex-item-align: center !important;
align-self: center !important;
}
.align-self-md-baseline {
-ms-flex-item-align: baseline !important;
align-self: baseline !important;
}
.align-self-md-stretch {
-ms-flex-item-align: stretch !important;
align-self: stretch !important;
}
}
@media (min-width: 992px) {
.flex-lg-row {
-ms-flex-direction: row !important;
flex-direction: row !important;
}
.flex-lg-column {
-ms-flex-direction: column !important;
flex-direction: column !important;
}
.flex-lg-row-reverse {
-ms-flex-direction: row-reverse !important;
flex-direction: row-reverse !important;
}
.flex-lg-column-reverse {
-ms-flex-direction: column-reverse !important;
flex-direction: column-reverse !important;
}
.flex-lg-wrap {
-ms-flex-wrap: wrap !important;
flex-wrap: wrap !important;
}
.flex-lg-nowrap {
-ms-flex-wrap: nowrap !important;
flex-wrap: nowrap !important;
}
.flex-lg-wrap-reverse {
-ms-flex-wrap: wrap-reverse !important;
flex-wrap: wrap-reverse !important;
}
.flex-lg-fill {
-ms-flex: 1 1 auto !important;
flex: 1 1 auto !important;
}
.flex-lg-grow-0 {
-ms-flex-positive: 0 !important;
flex-grow: 0 !important;
}
.flex-lg-grow-1 {
-ms-flex-positive: 1 !important;
flex-grow: 1 !important;
}
.flex-lg-shrink-0 {
-ms-flex-negative: 0 !important;
flex-shrink: 0 !important;
}
.flex-lg-shrink-1 {
-ms-flex-negative: 1 !important;
flex-shrink: 1 !important;
}
.justify-content-lg-start {
-ms-flex-pack: start !important;
justify-content: flex-start !important;
}
.justify-content-lg-end {
-ms-flex-pack: end !important;
justify-content: flex-end !important;
}
.justify-content-lg-center {
-ms-flex-pack: center !important;
justify-content: center !important;
}
.justify-content-lg-between {
-ms-flex-pack: justify !important;
justify-content: space-between !important;
}
.justify-content-lg-around {
-ms-flex-pack: distribute !important;
justify-content: space-around !important;
}
.align-items-lg-start {
-ms-flex-align: start !important;
align-items: flex-start !important;
}
.align-items-lg-end {
-ms-flex-align: end !important;
align-items: flex-end !important;
}
.align-items-lg-center {
-ms-flex-align: center !important;
align-items: center !important;
}
.align-items-lg-baseline {
-ms-flex-align: baseline !important;
align-items: baseline !important;
}
.align-items-lg-stretch {
-ms-flex-align: stretch !important;
align-items: stretch !important;
}
.align-content-lg-start {
-ms-flex-line-pack: start !important;
align-content: flex-start !important;
}
.align-content-lg-end {
-ms-flex-line-pack: end !important;
align-content: flex-end !important;
}
.align-content-lg-center {
-ms-flex-line-pack: center !important;
align-content: center !important;
}
.align-content-lg-between {
-ms-flex-line-pack: justify !important;
align-content: space-between !important;
}
.align-content-lg-around {
-ms-flex-line-pack: distribute !important;
align-content: space-around !important;
}
.align-content-lg-stretch {
-ms-flex-line-pack: stretch !important;
align-content: stretch !important;
}
.align-self-lg-auto {
-ms-flex-item-align: auto !important;
align-self: auto !important;
}
.align-self-lg-start {
-ms-flex-item-align: start !important;
align-self: flex-start !important;
}
.align-self-lg-end {
-ms-flex-item-align: end !important;
align-self: flex-end !important;
}
.align-self-lg-center {
-ms-flex-item-align: center !important;
align-self: center !important;
}
.align-self-lg-baseline {
-ms-flex-item-align: baseline !important;
align-self: baseline !important;
}
.align-self-lg-stretch {
-ms-flex-item-align: stretch !important;
align-self: stretch !important;
}
}
@media (min-width: 1200px) {
.flex-xl-row {
-ms-flex-direction: row !important;
flex-direction: row !important;
}
.flex-xl-column {
-ms-flex-direction: column !important;
flex-direction: column !important;
}
.flex-xl-row-reverse {
-ms-flex-direction: row-reverse !important;
flex-direction: row-reverse !important;
}
.flex-xl-column-reverse {
-ms-flex-direction: column-reverse !important;
flex-direction: column-reverse !important;
}
.flex-xl-wrap {
-ms-flex-wrap: wrap !important;
flex-wrap: wrap !important;
}
.flex-xl-nowrap {
-ms-flex-wrap: nowrap !important;
flex-wrap: nowrap !important;
}
.flex-xl-wrap-reverse {
-ms-flex-wrap: wrap-reverse !important;
flex-wrap: wrap-reverse !important;
}
.flex-xl-fill {
-ms-flex: 1 1 auto !important;
flex: 1 1 auto !important;
}
.flex-xl-grow-0 {
-ms-flex-positive: 0 !important;
flex-grow: 0 !important;
}
.flex-xl-grow-1 {
-ms-flex-positive: 1 !important;
flex-grow: 1 !important;
}
.flex-xl-shrink-0 {
-ms-flex-negative: 0 !important;
flex-shrink: 0 !important;
}
.flex-xl-shrink-1 {
-ms-flex-negative: 1 !important;
flex-shrink: 1 !important;
}
.justify-content-xl-start {
-ms-flex-pack: start !important;
justify-content: flex-start !important;
}
.justify-content-xl-end {
-ms-flex-pack: end !important;
justify-content: flex-end !important;
}
.justify-content-xl-center {
-ms-flex-pack: center !important;
justify-content: center !important;
}
.justify-content-xl-between {
-ms-flex-pack: justify !important;
justify-content: space-between !important;
}
.justify-content-xl-around {
-ms-flex-pack: distribute !important;
justify-content: space-around !important;
}
.align-items-xl-start {
-ms-flex-align: start !important;
align-items: flex-start !important;
}
.align-items-xl-end {
-ms-flex-align: end !important;
align-items: flex-end !important;
}
.align-items-xl-center {
-ms-flex-align: center !important;
align-items: center !important;
}
.align-items-xl-baseline {
-ms-flex-align: baseline !important;
align-items: baseline !important;
}
.align-items-xl-stretch {
-ms-flex-align: stretch !important;
align-items: stretch !important;
}
.align-content-xl-start {
-ms-flex-line-pack: start !important;
align-content: flex-start !important;
}
.align-content-xl-end {
-ms-flex-line-pack: end !important;
align-content: flex-end !important;
}
.align-content-xl-center {
-ms-flex-line-pack: center !important;
align-content: center !important;
}
.align-content-xl-between {
-ms-flex-line-pack: justify !important;
align-content: space-between !important;
}
.align-content-xl-around {
-ms-flex-line-pack: distribute !important;
align-content: space-around !important;
}
.align-content-xl-stretch {
-ms-flex-line-pack: stretch !important;
align-content: stretch !important;
}
.align-self-xl-auto {
-ms-flex-item-align: auto !important;
align-self: auto !important;
}
.align-self-xl-start {
-ms-flex-item-align: start !important;
align-self: flex-start !important;
}
.align-self-xl-end {
-ms-flex-item-align: end !important;
align-self: flex-end !important;
}
.align-self-xl-center {
-ms-flex-item-align: center !important;
align-self: center !important;
}
.align-self-xl-baseline {
-ms-flex-item-align: baseline !important;
align-self: baseline !important;
}
.align-self-xl-stretch {
-ms-flex-item-align: stretch !important;
align-self: stretch !important;
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -586,9 +586,7 @@ pre code {
}
.row {
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
margin-right: -15px;
margin-left: -15px;
@ -618,164 +616,134 @@ pre code {
}
.col {
-ms-flex-preferred-size: 0;
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
max-width: 100%;
}
.col-auto {
-ms-flex: 0 0 auto;
flex: 0 0 auto;
width: auto;
max-width: 100%;
}
.col-1 {
-ms-flex: 0 0 8.333333%;
flex: 0 0 8.333333%;
max-width: 8.333333%;
}
.col-2 {
-ms-flex: 0 0 16.666667%;
flex: 0 0 16.666667%;
max-width: 16.666667%;
}
.col-3 {
-ms-flex: 0 0 25%;
flex: 0 0 25%;
max-width: 25%;
}
.col-4 {
-ms-flex: 0 0 33.333333%;
flex: 0 0 33.333333%;
max-width: 33.333333%;
}
.col-5 {
-ms-flex: 0 0 41.666667%;
flex: 0 0 41.666667%;
max-width: 41.666667%;
}
.col-6 {
-ms-flex: 0 0 50%;
flex: 0 0 50%;
max-width: 50%;
}
.col-7 {
-ms-flex: 0 0 58.333333%;
flex: 0 0 58.333333%;
max-width: 58.333333%;
}
.col-8 {
-ms-flex: 0 0 66.666667%;
flex: 0 0 66.666667%;
max-width: 66.666667%;
}
.col-9 {
-ms-flex: 0 0 75%;
flex: 0 0 75%;
max-width: 75%;
}
.col-10 {
-ms-flex: 0 0 83.333333%;
flex: 0 0 83.333333%;
max-width: 83.333333%;
}
.col-11 {
-ms-flex: 0 0 91.666667%;
flex: 0 0 91.666667%;
max-width: 91.666667%;
}
.col-12 {
-ms-flex: 0 0 100%;
flex: 0 0 100%;
max-width: 100%;
}
.order-first {
-ms-flex-order: -1;
order: -1;
}
.order-last {
-ms-flex-order: 13;
order: 13;
}
.order-0 {
-ms-flex-order: 0;
order: 0;
}
.order-1 {
-ms-flex-order: 1;
order: 1;
}
.order-2 {
-ms-flex-order: 2;
order: 2;
}
.order-3 {
-ms-flex-order: 3;
order: 3;
}
.order-4 {
-ms-flex-order: 4;
order: 4;
}
.order-5 {
-ms-flex-order: 5;
order: 5;
}
.order-6 {
-ms-flex-order: 6;
order: 6;
}
.order-7 {
-ms-flex-order: 7;
order: 7;
}
.order-8 {
-ms-flex-order: 8;
order: 8;
}
.order-9 {
-ms-flex-order: 9;
order: 9;
}
.order-10 {
-ms-flex-order: 10;
order: 10;
}
.order-11 {
-ms-flex-order: 11;
order: 11;
}
.order-12 {
-ms-flex-order: 12;
order: 12;
}
@ -825,136 +793,106 @@ pre code {
@media (min-width: 576px) {
.col-sm {
-ms-flex-preferred-size: 0;
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
max-width: 100%;
}
.col-sm-auto {
-ms-flex: 0 0 auto;
flex: 0 0 auto;
width: auto;
max-width: 100%;
}
.col-sm-1 {
-ms-flex: 0 0 8.333333%;
flex: 0 0 8.333333%;
max-width: 8.333333%;
}
.col-sm-2 {
-ms-flex: 0 0 16.666667%;
flex: 0 0 16.666667%;
max-width: 16.666667%;
}
.col-sm-3 {
-ms-flex: 0 0 25%;
flex: 0 0 25%;
max-width: 25%;
}
.col-sm-4 {
-ms-flex: 0 0 33.333333%;
flex: 0 0 33.333333%;
max-width: 33.333333%;
}
.col-sm-5 {
-ms-flex: 0 0 41.666667%;
flex: 0 0 41.666667%;
max-width: 41.666667%;
}
.col-sm-6 {
-ms-flex: 0 0 50%;
flex: 0 0 50%;
max-width: 50%;
}
.col-sm-7 {
-ms-flex: 0 0 58.333333%;
flex: 0 0 58.333333%;
max-width: 58.333333%;
}
.col-sm-8 {
-ms-flex: 0 0 66.666667%;
flex: 0 0 66.666667%;
max-width: 66.666667%;
}
.col-sm-9 {
-ms-flex: 0 0 75%;
flex: 0 0 75%;
max-width: 75%;
}
.col-sm-10 {
-ms-flex: 0 0 83.333333%;
flex: 0 0 83.333333%;
max-width: 83.333333%;
}
.col-sm-11 {
-ms-flex: 0 0 91.666667%;
flex: 0 0 91.666667%;
max-width: 91.666667%;
}
.col-sm-12 {
-ms-flex: 0 0 100%;
flex: 0 0 100%;
max-width: 100%;
}
.order-sm-first {
-ms-flex-order: -1;
order: -1;
}
.order-sm-last {
-ms-flex-order: 13;
order: 13;
}
.order-sm-0 {
-ms-flex-order: 0;
order: 0;
}
.order-sm-1 {
-ms-flex-order: 1;
order: 1;
}
.order-sm-2 {
-ms-flex-order: 2;
order: 2;
}
.order-sm-3 {
-ms-flex-order: 3;
order: 3;
}
.order-sm-4 {
-ms-flex-order: 4;
order: 4;
}
.order-sm-5 {
-ms-flex-order: 5;
order: 5;
}
.order-sm-6 {
-ms-flex-order: 6;
order: 6;
}
.order-sm-7 {
-ms-flex-order: 7;
order: 7;
}
.order-sm-8 {
-ms-flex-order: 8;
order: 8;
}
.order-sm-9 {
-ms-flex-order: 9;
order: 9;
}
.order-sm-10 {
-ms-flex-order: 10;
order: 10;
}
.order-sm-11 {
-ms-flex-order: 11;
order: 11;
}
.order-sm-12 {
-ms-flex-order: 12;
order: 12;
}
.offset-sm-0 {
@ -997,136 +935,106 @@ pre code {
@media (min-width: 768px) {
.col-md {
-ms-flex-preferred-size: 0;
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
max-width: 100%;
}
.col-md-auto {
-ms-flex: 0 0 auto;
flex: 0 0 auto;
width: auto;
max-width: 100%;
}
.col-md-1 {
-ms-flex: 0 0 8.333333%;
flex: 0 0 8.333333%;
max-width: 8.333333%;
}
.col-md-2 {
-ms-flex: 0 0 16.666667%;
flex: 0 0 16.666667%;
max-width: 16.666667%;
}
.col-md-3 {
-ms-flex: 0 0 25%;
flex: 0 0 25%;
max-width: 25%;
}
.col-md-4 {
-ms-flex: 0 0 33.333333%;
flex: 0 0 33.333333%;
max-width: 33.333333%;
}
.col-md-5 {
-ms-flex: 0 0 41.666667%;
flex: 0 0 41.666667%;
max-width: 41.666667%;
}
.col-md-6 {
-ms-flex: 0 0 50%;
flex: 0 0 50%;
max-width: 50%;
}
.col-md-7 {
-ms-flex: 0 0 58.333333%;
flex: 0 0 58.333333%;
max-width: 58.333333%;
}
.col-md-8 {
-ms-flex: 0 0 66.666667%;
flex: 0 0 66.666667%;
max-width: 66.666667%;
}
.col-md-9 {
-ms-flex: 0 0 75%;
flex: 0 0 75%;
max-width: 75%;
}
.col-md-10 {
-ms-flex: 0 0 83.333333%;
flex: 0 0 83.333333%;
max-width: 83.333333%;
}
.col-md-11 {
-ms-flex: 0 0 91.666667%;
flex: 0 0 91.666667%;
max-width: 91.666667%;
}
.col-md-12 {
-ms-flex: 0 0 100%;
flex: 0 0 100%;
max-width: 100%;
}
.order-md-first {
-ms-flex-order: -1;
order: -1;
}
.order-md-last {
-ms-flex-order: 13;
order: 13;
}
.order-md-0 {
-ms-flex-order: 0;
order: 0;
}
.order-md-1 {
-ms-flex-order: 1;
order: 1;
}
.order-md-2 {
-ms-flex-order: 2;
order: 2;
}
.order-md-3 {
-ms-flex-order: 3;
order: 3;
}
.order-md-4 {
-ms-flex-order: 4;
order: 4;
}
.order-md-5 {
-ms-flex-order: 5;
order: 5;
}
.order-md-6 {
-ms-flex-order: 6;
order: 6;
}
.order-md-7 {
-ms-flex-order: 7;
order: 7;
}
.order-md-8 {
-ms-flex-order: 8;
order: 8;
}
.order-md-9 {
-ms-flex-order: 9;
order: 9;
}
.order-md-10 {
-ms-flex-order: 10;
order: 10;
}
.order-md-11 {
-ms-flex-order: 11;
order: 11;
}
.order-md-12 {
-ms-flex-order: 12;
order: 12;
}
.offset-md-0 {
@ -1169,136 +1077,106 @@ pre code {
@media (min-width: 992px) {
.col-lg {
-ms-flex-preferred-size: 0;
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
max-width: 100%;
}
.col-lg-auto {
-ms-flex: 0 0 auto;
flex: 0 0 auto;
width: auto;
max-width: 100%;
}
.col-lg-1 {
-ms-flex: 0 0 8.333333%;
flex: 0 0 8.333333%;
max-width: 8.333333%;
}
.col-lg-2 {
-ms-flex: 0 0 16.666667%;
flex: 0 0 16.666667%;
max-width: 16.666667%;
}
.col-lg-3 {
-ms-flex: 0 0 25%;
flex: 0 0 25%;
max-width: 25%;
}
.col-lg-4 {
-ms-flex: 0 0 33.333333%;
flex: 0 0 33.333333%;
max-width: 33.333333%;
}
.col-lg-5 {
-ms-flex: 0 0 41.666667%;
flex: 0 0 41.666667%;
max-width: 41.666667%;
}
.col-lg-6 {
-ms-flex: 0 0 50%;
flex: 0 0 50%;
max-width: 50%;
}
.col-lg-7 {
-ms-flex: 0 0 58.333333%;
flex: 0 0 58.333333%;
max-width: 58.333333%;
}
.col-lg-8 {
-ms-flex: 0 0 66.666667%;
flex: 0 0 66.666667%;
max-width: 66.666667%;
}
.col-lg-9 {
-ms-flex: 0 0 75%;
flex: 0 0 75%;
max-width: 75%;
}
.col-lg-10 {
-ms-flex: 0 0 83.333333%;
flex: 0 0 83.333333%;
max-width: 83.333333%;
}
.col-lg-11 {
-ms-flex: 0 0 91.666667%;
flex: 0 0 91.666667%;
max-width: 91.666667%;
}
.col-lg-12 {
-ms-flex: 0 0 100%;
flex: 0 0 100%;
max-width: 100%;
}
.order-lg-first {
-ms-flex-order: -1;
order: -1;
}
.order-lg-last {
-ms-flex-order: 13;
order: 13;
}
.order-lg-0 {
-ms-flex-order: 0;
order: 0;
}
.order-lg-1 {
-ms-flex-order: 1;
order: 1;
}
.order-lg-2 {
-ms-flex-order: 2;
order: 2;
}
.order-lg-3 {
-ms-flex-order: 3;
order: 3;
}
.order-lg-4 {
-ms-flex-order: 4;
order: 4;
}
.order-lg-5 {
-ms-flex-order: 5;
order: 5;
}
.order-lg-6 {
-ms-flex-order: 6;
order: 6;
}
.order-lg-7 {
-ms-flex-order: 7;
order: 7;
}
.order-lg-8 {
-ms-flex-order: 8;
order: 8;
}
.order-lg-9 {
-ms-flex-order: 9;
order: 9;
}
.order-lg-10 {
-ms-flex-order: 10;
order: 10;
}
.order-lg-11 {
-ms-flex-order: 11;
order: 11;
}
.order-lg-12 {
-ms-flex-order: 12;
order: 12;
}
.offset-lg-0 {
@ -1341,136 +1219,106 @@ pre code {
@media (min-width: 1200px) {
.col-xl {
-ms-flex-preferred-size: 0;
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
max-width: 100%;
}
.col-xl-auto {
-ms-flex: 0 0 auto;
flex: 0 0 auto;
width: auto;
max-width: 100%;
}
.col-xl-1 {
-ms-flex: 0 0 8.333333%;
flex: 0 0 8.333333%;
max-width: 8.333333%;
}
.col-xl-2 {
-ms-flex: 0 0 16.666667%;
flex: 0 0 16.666667%;
max-width: 16.666667%;
}
.col-xl-3 {
-ms-flex: 0 0 25%;
flex: 0 0 25%;
max-width: 25%;
}
.col-xl-4 {
-ms-flex: 0 0 33.333333%;
flex: 0 0 33.333333%;
max-width: 33.333333%;
}
.col-xl-5 {
-ms-flex: 0 0 41.666667%;
flex: 0 0 41.666667%;
max-width: 41.666667%;
}
.col-xl-6 {
-ms-flex: 0 0 50%;
flex: 0 0 50%;
max-width: 50%;
}
.col-xl-7 {
-ms-flex: 0 0 58.333333%;
flex: 0 0 58.333333%;
max-width: 58.333333%;
}
.col-xl-8 {
-ms-flex: 0 0 66.666667%;
flex: 0 0 66.666667%;
max-width: 66.666667%;
}
.col-xl-9 {
-ms-flex: 0 0 75%;
flex: 0 0 75%;
max-width: 75%;
}
.col-xl-10 {
-ms-flex: 0 0 83.333333%;
flex: 0 0 83.333333%;
max-width: 83.333333%;
}
.col-xl-11 {
-ms-flex: 0 0 91.666667%;
flex: 0 0 91.666667%;
max-width: 91.666667%;
}
.col-xl-12 {
-ms-flex: 0 0 100%;
flex: 0 0 100%;
max-width: 100%;
}
.order-xl-first {
-ms-flex-order: -1;
order: -1;
}
.order-xl-last {
-ms-flex-order: 13;
order: 13;
}
.order-xl-0 {
-ms-flex-order: 0;
order: 0;
}
.order-xl-1 {
-ms-flex-order: 1;
order: 1;
}
.order-xl-2 {
-ms-flex-order: 2;
order: 2;
}
.order-xl-3 {
-ms-flex-order: 3;
order: 3;
}
.order-xl-4 {
-ms-flex-order: 4;
order: 4;
}
.order-xl-5 {
-ms-flex-order: 5;
order: 5;
}
.order-xl-6 {
-ms-flex-order: 6;
order: 6;
}
.order-xl-7 {
-ms-flex-order: 7;
order: 7;
}
.order-xl-8 {
-ms-flex-order: 8;
order: 8;
}
.order-xl-9 {
-ms-flex-order: 9;
order: 9;
}
.order-xl-10 {
-ms-flex-order: 10;
order: 10;
}
.order-xl-11 {
-ms-flex-order: 11;
order: 11;
}
.order-xl-12 {
-ms-flex-order: 12;
order: 12;
}
.offset-xl-0 {
@ -2004,9 +1852,7 @@ textarea.form-control {
}
.form-row {
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
margin-right: -5px;
margin-left: -5px;
@ -2039,9 +1885,7 @@ textarea.form-control {
}
.form-check-inline {
display: -ms-inline-flexbox;
display: inline-flex;
-ms-flex-align: center;
align-items: center;
padding-left: 0;
margin-right: 0.75rem;
@ -2301,11 +2145,8 @@ textarea.form-control {
}
.form-inline {
display: -ms-flexbox;
display: flex;
-ms-flex-flow: row wrap;
flex-flow: row wrap;
-ms-flex-align: center;
align-items: center;
}
@ -2315,22 +2156,15 @@ textarea.form-control {
@media (min-width: 576px) {
.form-inline label {
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
-ms-flex-pack: center;
justify-content: center;
margin-bottom: 0;
}
.form-inline .form-group {
display: -ms-flexbox;
display: flex;
-ms-flex: 0 0 auto;
flex: 0 0 auto;
-ms-flex-flow: row wrap;
flex-flow: row wrap;
-ms-flex-align: center;
align-items: center;
margin-bottom: 0;
}
@ -2347,27 +2181,21 @@ textarea.form-control {
width: auto;
}
.form-inline .form-check {
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
-ms-flex-pack: center;
justify-content: center;
width: auto;
padding-left: 0;
}
.form-inline .form-check-input {
position: relative;
-ms-flex-negative: 0;
flex-shrink: 0;
margin-top: 0;
margin-right: 0.25rem;
margin-left: 0;
}
.form-inline .custom-control {
-ms-flex-align: center;
align-items: center;
-ms-flex-pack: center;
justify-content: center;
}
.form-inline .custom-control-label {
@ -3279,7 +3107,6 @@ input[type="button"].btn-block {
.btn-group,
.btn-group-vertical {
position: relative;
display: -ms-inline-flexbox;
display: inline-flex;
vertical-align: middle;
}
@ -3287,7 +3114,6 @@ input[type="button"].btn-block {
.btn-group > .btn,
.btn-group-vertical > .btn {
position: relative;
-ms-flex: 1 1 auto;
flex: 1 1 auto;
}
@ -3304,11 +3130,8 @@ input[type="button"].btn-block {
}
.btn-toolbar {
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-ms-flex-pack: start;
justify-content: flex-start;
}
@ -3359,11 +3182,8 @@ input[type="button"].btn-block {
}
.btn-group-vertical {
-ms-flex-direction: column;
flex-direction: column;
-ms-flex-align: start;
align-items: flex-start;
-ms-flex-pack: center;
justify-content: center;
}
@ -3405,11 +3225,8 @@ input[type="button"].btn-block {
.input-group {
position: relative;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-ms-flex-align: stretch;
align-items: stretch;
width: 100%;
}
@ -3419,7 +3236,6 @@ input[type="button"].btn-block {
.input-group > .custom-select,
.input-group > .custom-file {
position: relative;
-ms-flex: 1 1 auto;
flex: 1 1 auto;
width: 1%;
margin-bottom: 0;
@ -3463,9 +3279,7 @@ input[type="button"].btn-block {
}
.input-group > .custom-file {
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
}
@ -3482,7 +3296,6 @@ input[type="button"].btn-block {
.input-group-prepend,
.input-group-append {
display: -ms-flexbox;
display: flex;
}
@ -3517,9 +3330,7 @@ input[type="button"].btn-block {
}
.input-group-text {
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
padding: 0.375rem 0.75rem;
margin-bottom: 0;
@ -3606,7 +3417,6 @@ input[type="button"].btn-block {
}
.custom-control-inline {
display: -ms-inline-flexbox;
display: inline-flex;
margin-right: 1rem;
}
@ -4051,9 +3861,7 @@ input[type="button"].btn-block {
}
.nav {
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
padding-left: 0;
margin-bottom: 0;
@ -4123,15 +3931,12 @@ input[type="button"].btn-block {
}
.nav-fill .nav-item {
-ms-flex: 1 1 auto;
flex: 1 1 auto;
text-align: center;
}
.nav-justified .nav-item {
-ms-flex-preferred-size: 0;
flex-basis: 0;
-ms-flex-positive: 1;
flex-grow: 1;
text-align: center;
}
@ -4146,26 +3951,18 @@ input[type="button"].btn-block {
.navbar {
position: relative;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-ms-flex-align: center;
align-items: center;
-ms-flex-pack: justify;
justify-content: space-between;
padding: 0.5rem 1rem;
}
.navbar > .container,
.navbar > .container-fluid {
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-ms-flex-align: center;
align-items: center;
-ms-flex-pack: justify;
justify-content: space-between;
}
@ -4184,9 +3981,7 @@ input[type="button"].btn-block {
}
.navbar-nav {
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
padding-left: 0;
margin-bottom: 0;
@ -4210,11 +4005,8 @@ input[type="button"].btn-block {
}
.navbar-collapse {
-ms-flex-preferred-size: 100%;
flex-basis: 100%;
-ms-flex-positive: 1;
flex-grow: 1;
-ms-flex-align: center;
align-items: center;
}
@ -4251,13 +4043,10 @@ input[type="button"].btn-block {
@media (min-width: 576px) {
.navbar-expand-sm {
-ms-flex-flow: row nowrap;
flex-flow: row nowrap;
-ms-flex-pack: start;
justify-content: flex-start;
}
.navbar-expand-sm .navbar-nav {
-ms-flex-direction: row;
flex-direction: row;
}
.navbar-expand-sm .navbar-nav .dropdown-menu {
@ -4269,13 +4058,10 @@ input[type="button"].btn-block {
}
.navbar-expand-sm > .container,
.navbar-expand-sm > .container-fluid {
-ms-flex-wrap: nowrap;
flex-wrap: nowrap;
}
.navbar-expand-sm .navbar-collapse {
display: -ms-flexbox !important;
display: flex !important;
-ms-flex-preferred-size: auto;
flex-basis: auto;
}
.navbar-expand-sm .navbar-toggler {
@ -4293,13 +4079,10 @@ input[type="button"].btn-block {
@media (min-width: 768px) {
.navbar-expand-md {
-ms-flex-flow: row nowrap;
flex-flow: row nowrap;
-ms-flex-pack: start;
justify-content: flex-start;
}
.navbar-expand-md .navbar-nav {
-ms-flex-direction: row;
flex-direction: row;
}
.navbar-expand-md .navbar-nav .dropdown-menu {
@ -4311,13 +4094,10 @@ input[type="button"].btn-block {
}
.navbar-expand-md > .container,
.navbar-expand-md > .container-fluid {
-ms-flex-wrap: nowrap;
flex-wrap: nowrap;
}
.navbar-expand-md .navbar-collapse {
display: -ms-flexbox !important;
display: flex !important;
-ms-flex-preferred-size: auto;
flex-basis: auto;
}
.navbar-expand-md .navbar-toggler {
@ -4335,13 +4115,10 @@ input[type="button"].btn-block {
@media (min-width: 992px) {
.navbar-expand-lg {
-ms-flex-flow: row nowrap;
flex-flow: row nowrap;
-ms-flex-pack: start;
justify-content: flex-start;
}
.navbar-expand-lg .navbar-nav {
-ms-flex-direction: row;
flex-direction: row;
}
.navbar-expand-lg .navbar-nav .dropdown-menu {
@ -4353,13 +4130,10 @@ input[type="button"].btn-block {
}
.navbar-expand-lg > .container,
.navbar-expand-lg > .container-fluid {
-ms-flex-wrap: nowrap;
flex-wrap: nowrap;
}
.navbar-expand-lg .navbar-collapse {
display: -ms-flexbox !important;
display: flex !important;
-ms-flex-preferred-size: auto;
flex-basis: auto;
}
.navbar-expand-lg .navbar-toggler {
@ -4377,13 +4151,10 @@ input[type="button"].btn-block {
@media (min-width: 1200px) {
.navbar-expand-xl {
-ms-flex-flow: row nowrap;
flex-flow: row nowrap;
-ms-flex-pack: start;
justify-content: flex-start;
}
.navbar-expand-xl .navbar-nav {
-ms-flex-direction: row;
flex-direction: row;
}
.navbar-expand-xl .navbar-nav .dropdown-menu {
@ -4395,13 +4166,10 @@ input[type="button"].btn-block {
}
.navbar-expand-xl > .container,
.navbar-expand-xl > .container-fluid {
-ms-flex-wrap: nowrap;
flex-wrap: nowrap;
}
.navbar-expand-xl .navbar-collapse {
display: -ms-flexbox !important;
display: flex !important;
-ms-flex-preferred-size: auto;
flex-basis: auto;
}
.navbar-expand-xl .navbar-toggler {
@ -4410,9 +4178,7 @@ input[type="button"].btn-block {
}
.navbar-expand {
-ms-flex-flow: row nowrap;
flex-flow: row nowrap;
-ms-flex-pack: start;
justify-content: flex-start;
}
@ -4423,7 +4189,6 @@ input[type="button"].btn-block {
}
.navbar-expand .navbar-nav {
-ms-flex-direction: row;
flex-direction: row;
}
@ -4438,14 +4203,11 @@ input[type="button"].btn-block {
.navbar-expand > .container,
.navbar-expand > .container-fluid {
-ms-flex-wrap: nowrap;
flex-wrap: nowrap;
}
.navbar-expand .navbar-collapse {
display: -ms-flexbox !important;
display: flex !important;
-ms-flex-preferred-size: auto;
flex-basis: auto;
}
@ -4551,9 +4313,7 @@ input[type="button"].btn-block {
.card {
position: relative;
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
min-width: 0;
word-wrap: break-word;
@ -4579,7 +4339,6 @@ input[type="button"].btn-block {
}
.card-body {
-ms-flex: 1 1 auto;
flex: 1 1 auto;
padding: 1.25rem;
}
@ -4669,9 +4428,7 @@ input[type="button"].btn-block {
}
.card-deck {
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
}
@ -4681,17 +4438,13 @@ input[type="button"].btn-block {
@media (min-width: 576px) {
.card-deck {
-ms-flex-flow: row wrap;
flex-flow: row wrap;
margin-right: -15px;
margin-left: -15px;
}
.card-deck .card {
display: -ms-flexbox;
display: flex;
-ms-flex: 1 0 0%;
flex: 1 0 0%;
-ms-flex-direction: column;
flex-direction: column;
margin-right: 15px;
margin-bottom: 0;
@ -4700,9 +4453,7 @@ input[type="button"].btn-block {
}
.card-group {
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
}
@ -4712,11 +4463,9 @@ input[type="button"].btn-block {
@media (min-width: 576px) {
.card-group {
-ms-flex-flow: row wrap;
flex-flow: row wrap;
}
.card-group > .card {
-ms-flex: 1 0 0%;
flex: 1 0 0%;
margin-bottom: 0;
}
@ -4784,7 +4533,7 @@ input[type="button"].btn-block {
border-radius: 0;
}
.accordion > .card:first-of-type {
.accordion > .card:first-of-type:not(:last-of-type) {
border-bottom: 0;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
@ -4800,9 +4549,7 @@ input[type="button"].btn-block {
}
.breadcrumb {
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
padding: 0.75rem 1rem;
margin-bottom: 1rem;
@ -4822,10 +4569,6 @@ input[type="button"].btn-block {
content: "/";
}
.breadcrumb-item + .breadcrumb-item:hover::before {
text-decoration: underline;
}
.breadcrumb-item + .breadcrumb-item:hover::before {
text-decoration: none;
}
@ -4835,7 +4578,6 @@ input[type="button"].btn-block {
}
.pagination {
display: -ms-flexbox;
display: flex;
padding-left: 0;
list-style: none;
@ -5261,7 +5003,6 @@ a.badge-dark:focus, a.badge-dark.focus {
}
.progress {
display: -ms-flexbox;
display: flex;
height: 1rem;
overflow: hidden;
@ -5271,11 +5012,8 @@ a.badge-dark:focus, a.badge-dark.focus {
}
.progress-bar {
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
-ms-flex-pack: center;
justify-content: center;
color: #fff;
text-align: center;
@ -5308,21 +5046,16 @@ a.badge-dark:focus, a.badge-dark.focus {
}
.media {
display: -ms-flexbox;
display: flex;
-ms-flex-align: start;
align-items: flex-start;
}
.media-body {
-ms-flex: 1;
flex: 1;
}
.list-group {
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
padding-left: 0;
margin-bottom: 0;
@ -5380,7 +5113,6 @@ a.badge-dark:focus, a.badge-dark.focus {
}
.list-group-horizontal {
-ms-flex-direction: row;
flex-direction: row;
}
@ -5404,7 +5136,6 @@ a.badge-dark:focus, a.badge-dark.focus {
@media (min-width: 576px) {
.list-group-horizontal-sm {
-ms-flex-direction: row;
flex-direction: row;
}
.list-group-horizontal-sm .list-group-item {
@ -5426,7 +5157,6 @@ a.badge-dark:focus, a.badge-dark.focus {
@media (min-width: 768px) {
.list-group-horizontal-md {
-ms-flex-direction: row;
flex-direction: row;
}
.list-group-horizontal-md .list-group-item {
@ -5448,7 +5178,6 @@ a.badge-dark:focus, a.badge-dark.focus {
@media (min-width: 992px) {
.list-group-horizontal-lg {
-ms-flex-direction: row;
flex-direction: row;
}
.list-group-horizontal-lg .list-group-item {
@ -5470,7 +5199,6 @@ a.badge-dark:focus, a.badge-dark.focus {
@media (min-width: 1200px) {
.list-group-horizontal-xl {
-ms-flex-direction: row;
flex-direction: row;
}
.list-group-horizontal-xl .list-group-item {
@ -5701,9 +5429,7 @@ a.close.disabled {
}
.toast-header {
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
padding: 0.25rem 0.75rem;
color: #6c757d;
@ -5764,7 +5490,6 @@ a.close.disabled {
}
.modal-dialog-scrollable {
display: -ms-flexbox;
display: flex;
max-height: calc(100% - 1rem);
}
@ -5776,7 +5501,6 @@ a.close.disabled {
.modal-dialog-scrollable .modal-header,
.modal-dialog-scrollable .modal-footer {
-ms-flex-negative: 0;
flex-shrink: 0;
}
@ -5785,9 +5509,7 @@ a.close.disabled {
}
.modal-dialog-centered {
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
min-height: calc(100% - 1rem);
}
@ -5799,9 +5521,7 @@ a.close.disabled {
}
.modal-dialog-centered.modal-dialog-scrollable {
-ms-flex-direction: column;
flex-direction: column;
-ms-flex-pack: center;
justify-content: center;
height: 100%;
}
@ -5816,9 +5536,7 @@ a.close.disabled {
.modal-content {
position: relative;
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
width: 100%;
pointer-events: auto;
@ -5848,11 +5566,8 @@ a.close.disabled {
}
.modal-header {
display: -ms-flexbox;
display: flex;
-ms-flex-align: start;
align-items: flex-start;
-ms-flex-pack: justify;
justify-content: space-between;
padding: 1rem 1rem;
border-bottom: 1px solid #dee2e6;
@ -5872,17 +5587,13 @@ a.close.disabled {
.modal-body {
position: relative;
-ms-flex: 1 1 auto;
flex: 1 1 auto;
padding: 1rem;
}
.modal-footer {
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
-ms-flex-pack: end;
justify-content: flex-end;
padding: 1rem;
border-top: 1px solid #dee2e6;
@ -5969,14 +5680,14 @@ a.close.disabled {
opacity: 0.9;
}
.tooltip .arrow {
.tooltip .tooltip-arrow {
position: absolute;
display: block;
width: 0.8rem;
height: 0.4rem;
}
.tooltip .arrow::before {
.tooltip .tooltip-arrow::before {
position: absolute;
content: "";
border-color: transparent;
@ -5987,11 +5698,11 @@ a.close.disabled {
padding: 0.4rem 0;
}
.bs-tooltip-top .arrow, .bs-tooltip-auto[x-placement^="top"] .arrow {
.bs-tooltip-top .tooltip-arrow, .bs-tooltip-auto[x-placement^="top"] .tooltip-arrow {
bottom: 0;
}
.bs-tooltip-top .arrow::before, .bs-tooltip-auto[x-placement^="top"] .arrow::before {
.bs-tooltip-top .tooltip-arrow::before, .bs-tooltip-auto[x-placement^="top"] .tooltip-arrow::before {
top: 0;
border-width: 0.4rem 0.4rem 0;
border-top-color: #000;
@ -6001,13 +5712,13 @@ a.close.disabled {
padding: 0 0.4rem;
}
.bs-tooltip-right .arrow, .bs-tooltip-auto[x-placement^="right"] .arrow {
.bs-tooltip-right .tooltip-arrow, .bs-tooltip-auto[x-placement^="right"] .tooltip-arrow {
left: 0;
width: 0.4rem;
height: 0.8rem;
}
.bs-tooltip-right .arrow::before, .bs-tooltip-auto[x-placement^="right"] .arrow::before {
.bs-tooltip-right .tooltip-arrow::before, .bs-tooltip-auto[x-placement^="right"] .tooltip-arrow::before {
right: 0;
border-width: 0.4rem 0.4rem 0.4rem 0;
border-right-color: #000;
@ -6017,11 +5728,11 @@ a.close.disabled {
padding: 0.4rem 0;
}
.bs-tooltip-bottom .arrow, .bs-tooltip-auto[x-placement^="bottom"] .arrow {
.bs-tooltip-bottom .tooltip-arrow, .bs-tooltip-auto[x-placement^="bottom"] .tooltip-arrow {
top: 0;
}
.bs-tooltip-bottom .arrow::before, .bs-tooltip-auto[x-placement^="bottom"] .arrow::before {
.bs-tooltip-bottom .tooltip-arrow::before, .bs-tooltip-auto[x-placement^="bottom"] .tooltip-arrow::before {
bottom: 0;
border-width: 0 0.4rem 0.4rem;
border-bottom-color: #000;
@ -6031,13 +5742,13 @@ a.close.disabled {
padding: 0 0.4rem;
}
.bs-tooltip-left .arrow, .bs-tooltip-auto[x-placement^="left"] .arrow {
.bs-tooltip-left .tooltip-arrow, .bs-tooltip-auto[x-placement^="left"] .tooltip-arrow {
right: 0;
width: 0.4rem;
height: 0.8rem;
}
.bs-tooltip-left .arrow::before, .bs-tooltip-auto[x-placement^="left"] .arrow::before {
.bs-tooltip-left .tooltip-arrow::before, .bs-tooltip-auto[x-placement^="left"] .tooltip-arrow::before {
left: 0;
border-width: 0.4rem 0 0.4rem 0.4rem;
border-left-color: #000;
@ -6081,7 +5792,7 @@ a.close.disabled {
border-radius: 0.3rem;
}
.popover .arrow {
.popover .popover-arrow {
position: absolute;
display: block;
width: 1rem;
@ -6089,7 +5800,7 @@ a.close.disabled {
margin: 0 0.3rem;
}
.popover .arrow::before, .popover .arrow::after {
.popover .popover-arrow::before, .popover .popover-arrow::after {
position: absolute;
display: block;
content: "";
@ -6101,17 +5812,17 @@ a.close.disabled {
margin-bottom: 0.5rem;
}
.bs-popover-top > .arrow, .bs-popover-auto[x-placement^="top"] > .arrow {
.bs-popover-top > .popover-arrow, .bs-popover-auto[x-placement^="top"] > .popover-arrow {
bottom: calc((0.5rem + 1px) * -1);
}
.bs-popover-top > .arrow::before, .bs-popover-auto[x-placement^="top"] > .arrow::before {
.bs-popover-top > .popover-arrow::before, .bs-popover-auto[x-placement^="top"] > .popover-arrow::before {
bottom: 0;
border-width: 0.5rem 0.5rem 0;
border-top-color: rgba(0, 0, 0, 0.25);
}
.bs-popover-top > .arrow::after, .bs-popover-auto[x-placement^="top"] > .arrow::after {
.bs-popover-top > .popover-arrow::after, .bs-popover-auto[x-placement^="top"] > .popover-arrow::after {
bottom: 1px;
border-width: 0.5rem 0.5rem 0;
border-top-color: #fff;
@ -6121,20 +5832,20 @@ a.close.disabled {
margin-left: 0.5rem;
}
.bs-popover-right > .arrow, .bs-popover-auto[x-placement^="right"] > .arrow {
.bs-popover-right > .popover-arrow, .bs-popover-auto[x-placement^="right"] > .popover-arrow {
left: calc((0.5rem + 1px) * -1);
width: 0.5rem;
height: 1rem;
margin: 0.3rem 0;
}
.bs-popover-right > .arrow::before, .bs-popover-auto[x-placement^="right"] > .arrow::before {
.bs-popover-right > .popover-arrow::before, .bs-popover-auto[x-placement^="right"] > .popover-arrow::before {
left: 0;
border-width: 0.5rem 0.5rem 0.5rem 0;
border-right-color: rgba(0, 0, 0, 0.25);
}
.bs-popover-right > .arrow::after, .bs-popover-auto[x-placement^="right"] > .arrow::after {
.bs-popover-right > .popover-arrow::after, .bs-popover-auto[x-placement^="right"] > .popover-arrow::after {
left: 1px;
border-width: 0.5rem 0.5rem 0.5rem 0;
border-right-color: #fff;
@ -6144,17 +5855,17 @@ a.close.disabled {
margin-top: 0.5rem;
}
.bs-popover-bottom > .arrow, .bs-popover-auto[x-placement^="bottom"] > .arrow {
.bs-popover-bottom > .popover-arrow, .bs-popover-auto[x-placement^="bottom"] > .popover-arrow {
top: calc((0.5rem + 1px) * -1);
}
.bs-popover-bottom > .arrow::before, .bs-popover-auto[x-placement^="bottom"] > .arrow::before {
.bs-popover-bottom > .popover-arrow::before, .bs-popover-auto[x-placement^="bottom"] > .popover-arrow::before {
top: 0;
border-width: 0 0.5rem 0.5rem 0.5rem;
border-bottom-color: rgba(0, 0, 0, 0.25);
}
.bs-popover-bottom > .arrow::after, .bs-popover-auto[x-placement^="bottom"] > .arrow::after {
.bs-popover-bottom > .popover-arrow::after, .bs-popover-auto[x-placement^="bottom"] > .popover-arrow::after {
top: 1px;
border-width: 0 0.5rem 0.5rem 0.5rem;
border-bottom-color: #fff;
@ -6175,20 +5886,20 @@ a.close.disabled {
margin-right: 0.5rem;
}
.bs-popover-left > .arrow, .bs-popover-auto[x-placement^="left"] > .arrow {
.bs-popover-left > .popover-arrow, .bs-popover-auto[x-placement^="left"] > .popover-arrow {
right: calc((0.5rem + 1px) * -1);
width: 0.5rem;
height: 1rem;
margin: 0.3rem 0;
}
.bs-popover-left > .arrow::before, .bs-popover-auto[x-placement^="left"] > .arrow::before {
.bs-popover-left > .popover-arrow::before, .bs-popover-auto[x-placement^="left"] > .popover-arrow::before {
right: 0;
border-width: 0.5rem 0 0.5rem 0.5rem;
border-left-color: rgba(0, 0, 0, 0.25);
}
.bs-popover-left > .arrow::after, .bs-popover-auto[x-placement^="left"] > .arrow::after {
.bs-popover-left > .popover-arrow::after, .bs-popover-auto[x-placement^="left"] > .popover-arrow::after {
right: 1px;
border-width: 0.5rem 0 0.5rem 0.5rem;
border-left-color: #fff;
@ -6218,7 +5929,6 @@ a.close.disabled {
}
.carousel.pointer-event {
-ms-touch-action: pan-y;
touch-action: pan-y;
}
@ -6305,11 +6015,8 @@ a.close.disabled {
top: 0;
bottom: 0;
z-index: 1;
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
-ms-flex-pack: center;
justify-content: center;
width: 15%;
color: #fff;
@ -6364,9 +6071,7 @@ a.close.disabled {
bottom: 0;
left: 0;
z-index: 15;
display: -ms-flexbox;
display: flex;
-ms-flex-pack: center;
justify-content: center;
padding-left: 0;
margin-right: 15%;
@ -6376,7 +6081,6 @@ a.close.disabled {
.carousel-indicators li {
box-sizing: content-box;
-ms-flex: 0 1 auto;
flex: 0 1 auto;
width: 30px;
height: 3px;
@ -6750,12 +6454,10 @@ button.bg-dark:focus {
}
.d-flex {
display: -ms-flexbox !important;
display: flex !important;
}
.d-inline-flex {
display: -ms-inline-flexbox !important;
display: inline-flex !important;
}
@ -6782,11 +6484,9 @@ button.bg-dark:focus {
display: table-cell !important;
}
.d-sm-flex {
display: -ms-flexbox !important;
display: flex !important;
}
.d-sm-inline-flex {
display: -ms-inline-flexbox !important;
display: inline-flex !important;
}
}
@ -6814,11 +6514,9 @@ button.bg-dark:focus {
display: table-cell !important;
}
.d-md-flex {
display: -ms-flexbox !important;
display: flex !important;
}
.d-md-inline-flex {
display: -ms-inline-flexbox !important;
display: inline-flex !important;
}
}
@ -6846,11 +6544,9 @@ button.bg-dark:focus {
display: table-cell !important;
}
.d-lg-flex {
display: -ms-flexbox !important;
display: flex !important;
}
.d-lg-inline-flex {
display: -ms-inline-flexbox !important;
display: inline-flex !important;
}
}
@ -6878,11 +6574,9 @@ button.bg-dark:focus {
display: table-cell !important;
}
.d-xl-flex {
display: -ms-flexbox !important;
display: flex !important;
}
.d-xl-inline-flex {
display: -ms-inline-flexbox !important;
display: inline-flex !important;
}
}
@ -6910,11 +6604,9 @@ button.bg-dark:focus {
display: table-cell !important;
}
.d-print-flex {
display: -ms-flexbox !important;
display: flex !important;
}
.d-print-inline-flex {
display: -ms-inline-flexbox !important;
display: inline-flex !important;
}
}
@ -6963,727 +6655,557 @@ button.bg-dark:focus {
}
.flex-row {
-ms-flex-direction: row !important;
flex-direction: row !important;
}
.flex-column {
-ms-flex-direction: column !important;
flex-direction: column !important;
}
.flex-row-reverse {
-ms-flex-direction: row-reverse !important;
flex-direction: row-reverse !important;
}
.flex-column-reverse {
-ms-flex-direction: column-reverse !important;
flex-direction: column-reverse !important;
}
.flex-wrap {
-ms-flex-wrap: wrap !important;
flex-wrap: wrap !important;
}
.flex-nowrap {
-ms-flex-wrap: nowrap !important;
flex-wrap: nowrap !important;
}
.flex-wrap-reverse {
-ms-flex-wrap: wrap-reverse !important;
flex-wrap: wrap-reverse !important;
}
.flex-fill {
-ms-flex: 1 1 auto !important;
flex: 1 1 auto !important;
}
.flex-grow-0 {
-ms-flex-positive: 0 !important;
flex-grow: 0 !important;
}
.flex-grow-1 {
-ms-flex-positive: 1 !important;
flex-grow: 1 !important;
}
.flex-shrink-0 {
-ms-flex-negative: 0 !important;
flex-shrink: 0 !important;
}
.flex-shrink-1 {
-ms-flex-negative: 1 !important;
flex-shrink: 1 !important;
}
.justify-content-start {
-ms-flex-pack: start !important;
justify-content: flex-start !important;
}
.justify-content-end {
-ms-flex-pack: end !important;
justify-content: flex-end !important;
}
.justify-content-center {
-ms-flex-pack: center !important;
justify-content: center !important;
}
.justify-content-between {
-ms-flex-pack: justify !important;
justify-content: space-between !important;
}
.justify-content-around {
-ms-flex-pack: distribute !important;
justify-content: space-around !important;
}
.align-items-start {
-ms-flex-align: start !important;
align-items: flex-start !important;
}
.align-items-end {
-ms-flex-align: end !important;
align-items: flex-end !important;
}
.align-items-center {
-ms-flex-align: center !important;
align-items: center !important;
}
.align-items-baseline {
-ms-flex-align: baseline !important;
align-items: baseline !important;
}
.align-items-stretch {
-ms-flex-align: stretch !important;
align-items: stretch !important;
}
.align-content-start {
-ms-flex-line-pack: start !important;
align-content: flex-start !important;
}
.align-content-end {
-ms-flex-line-pack: end !important;
align-content: flex-end !important;
}
.align-content-center {
-ms-flex-line-pack: center !important;
align-content: center !important;
}
.align-content-between {
-ms-flex-line-pack: justify !important;
align-content: space-between !important;
}
.align-content-around {
-ms-flex-line-pack: distribute !important;
align-content: space-around !important;
}
.align-content-stretch {
-ms-flex-line-pack: stretch !important;
align-content: stretch !important;
}
.align-self-auto {
-ms-flex-item-align: auto !important;
align-self: auto !important;
}
.align-self-start {
-ms-flex-item-align: start !important;
align-self: flex-start !important;
}
.align-self-end {
-ms-flex-item-align: end !important;
align-self: flex-end !important;
}
.align-self-center {
-ms-flex-item-align: center !important;
align-self: center !important;
}
.align-self-baseline {
-ms-flex-item-align: baseline !important;
align-self: baseline !important;
}
.align-self-stretch {
-ms-flex-item-align: stretch !important;
align-self: stretch !important;
}
@media (min-width: 576px) {
.flex-sm-row {
-ms-flex-direction: row !important;
flex-direction: row !important;
}
.flex-sm-column {
-ms-flex-direction: column !important;
flex-direction: column !important;
}
.flex-sm-row-reverse {
-ms-flex-direction: row-reverse !important;
flex-direction: row-reverse !important;
}
.flex-sm-column-reverse {
-ms-flex-direction: column-reverse !important;
flex-direction: column-reverse !important;
}
.flex-sm-wrap {
-ms-flex-wrap: wrap !important;
flex-wrap: wrap !important;
}
.flex-sm-nowrap {
-ms-flex-wrap: nowrap !important;
flex-wrap: nowrap !important;
}
.flex-sm-wrap-reverse {
-ms-flex-wrap: wrap-reverse !important;
flex-wrap: wrap-reverse !important;
}
.flex-sm-fill {
-ms-flex: 1 1 auto !important;
flex: 1 1 auto !important;
}
.flex-sm-grow-0 {
-ms-flex-positive: 0 !important;
flex-grow: 0 !important;
}
.flex-sm-grow-1 {
-ms-flex-positive: 1 !important;
flex-grow: 1 !important;
}
.flex-sm-shrink-0 {
-ms-flex-negative: 0 !important;
flex-shrink: 0 !important;
}
.flex-sm-shrink-1 {
-ms-flex-negative: 1 !important;
flex-shrink: 1 !important;
}
.justify-content-sm-start {
-ms-flex-pack: start !important;
justify-content: flex-start !important;
}
.justify-content-sm-end {
-ms-flex-pack: end !important;
justify-content: flex-end !important;
}
.justify-content-sm-center {
-ms-flex-pack: center !important;
justify-content: center !important;
}
.justify-content-sm-between {
-ms-flex-pack: justify !important;
justify-content: space-between !important;
}
.justify-content-sm-around {
-ms-flex-pack: distribute !important;
justify-content: space-around !important;
}
.align-items-sm-start {
-ms-flex-align: start !important;
align-items: flex-start !important;
}
.align-items-sm-end {
-ms-flex-align: end !important;
align-items: flex-end !important;
}
.align-items-sm-center {
-ms-flex-align: center !important;
align-items: center !important;
}
.align-items-sm-baseline {
-ms-flex-align: baseline !important;
align-items: baseline !important;
}
.align-items-sm-stretch {
-ms-flex-align: stretch !important;
align-items: stretch !important;
}
.align-content-sm-start {
-ms-flex-line-pack: start !important;
align-content: flex-start !important;
}
.align-content-sm-end {
-ms-flex-line-pack: end !important;
align-content: flex-end !important;
}
.align-content-sm-center {
-ms-flex-line-pack: center !important;
align-content: center !important;
}
.align-content-sm-between {
-ms-flex-line-pack: justify !important;
align-content: space-between !important;
}
.align-content-sm-around {
-ms-flex-line-pack: distribute !important;
align-content: space-around !important;
}
.align-content-sm-stretch {
-ms-flex-line-pack: stretch !important;
align-content: stretch !important;
}
.align-self-sm-auto {
-ms-flex-item-align: auto !important;
align-self: auto !important;
}
.align-self-sm-start {
-ms-flex-item-align: start !important;
align-self: flex-start !important;
}
.align-self-sm-end {
-ms-flex-item-align: end !important;
align-self: flex-end !important;
}
.align-self-sm-center {
-ms-flex-item-align: center !important;
align-self: center !important;
}
.align-self-sm-baseline {
-ms-flex-item-align: baseline !important;
align-self: baseline !important;
}
.align-self-sm-stretch {
-ms-flex-item-align: stretch !important;
align-self: stretch !important;
}
}
@media (min-width: 768px) {
.flex-md-row {
-ms-flex-direction: row !important;
flex-direction: row !important;
}
.flex-md-column {
-ms-flex-direction: column !important;
flex-direction: column !important;
}
.flex-md-row-reverse {
-ms-flex-direction: row-reverse !important;
flex-direction: row-reverse !important;
}
.flex-md-column-reverse {
-ms-flex-direction: column-reverse !important;
flex-direction: column-reverse !important;
}
.flex-md-wrap {
-ms-flex-wrap: wrap !important;
flex-wrap: wrap !important;
}
.flex-md-nowrap {
-ms-flex-wrap: nowrap !important;
flex-wrap: nowrap !important;
}
.flex-md-wrap-reverse {
-ms-flex-wrap: wrap-reverse !important;
flex-wrap: wrap-reverse !important;
}
.flex-md-fill {
-ms-flex: 1 1 auto !important;
flex: 1 1 auto !important;
}
.flex-md-grow-0 {
-ms-flex-positive: 0 !important;
flex-grow: 0 !important;
}
.flex-md-grow-1 {
-ms-flex-positive: 1 !important;
flex-grow: 1 !important;
}
.flex-md-shrink-0 {
-ms-flex-negative: 0 !important;
flex-shrink: 0 !important;
}
.flex-md-shrink-1 {
-ms-flex-negative: 1 !important;
flex-shrink: 1 !important;
}
.justify-content-md-start {
-ms-flex-pack: start !important;
justify-content: flex-start !important;
}
.justify-content-md-end {
-ms-flex-pack: end !important;
justify-content: flex-end !important;
}
.justify-content-md-center {
-ms-flex-pack: center !important;
justify-content: center !important;
}
.justify-content-md-between {
-ms-flex-pack: justify !important;
justify-content: space-between !important;
}
.justify-content-md-around {
-ms-flex-pack: distribute !important;
justify-content: space-around !important;
}
.align-items-md-start {
-ms-flex-align: start !important;
align-items: flex-start !important;
}
.align-items-md-end {
-ms-flex-align: end !important;
align-items: flex-end !important;
}
.align-items-md-center {
-ms-flex-align: center !important;
align-items: center !important;
}
.align-items-md-baseline {
-ms-flex-align: baseline !important;
align-items: baseline !important;
}
.align-items-md-stretch {
-ms-flex-align: stretch !important;
align-items: stretch !important;
}
.align-content-md-start {
-ms-flex-line-pack: start !important;
align-content: flex-start !important;
}
.align-content-md-end {
-ms-flex-line-pack: end !important;
align-content: flex-end !important;
}
.align-content-md-center {
-ms-flex-line-pack: center !important;
align-content: center !important;
}
.align-content-md-between {
-ms-flex-line-pack: justify !important;
align-content: space-between !important;
}
.align-content-md-around {
-ms-flex-line-pack: distribute !important;
align-content: space-around !important;
}
.align-content-md-stretch {
-ms-flex-line-pack: stretch !important;
align-content: stretch !important;
}
.align-self-md-auto {
-ms-flex-item-align: auto !important;
align-self: auto !important;
}
.align-self-md-start {
-ms-flex-item-align: start !important;
align-self: flex-start !important;
}
.align-self-md-end {
-ms-flex-item-align: end !important;
align-self: flex-end !important;
}
.align-self-md-center {
-ms-flex-item-align: center !important;
align-self: center !important;
}
.align-self-md-baseline {
-ms-flex-item-align: baseline !important;
align-self: baseline !important;
}
.align-self-md-stretch {
-ms-flex-item-align: stretch !important;
align-self: stretch !important;
}
}
@media (min-width: 992px) {
.flex-lg-row {
-ms-flex-direction: row !important;
flex-direction: row !important;
}
.flex-lg-column {
-ms-flex-direction: column !important;
flex-direction: column !important;
}
.flex-lg-row-reverse {
-ms-flex-direction: row-reverse !important;
flex-direction: row-reverse !important;
}
.flex-lg-column-reverse {
-ms-flex-direction: column-reverse !important;
flex-direction: column-reverse !important;
}
.flex-lg-wrap {
-ms-flex-wrap: wrap !important;
flex-wrap: wrap !important;
}
.flex-lg-nowrap {
-ms-flex-wrap: nowrap !important;
flex-wrap: nowrap !important;
}
.flex-lg-wrap-reverse {
-ms-flex-wrap: wrap-reverse !important;
flex-wrap: wrap-reverse !important;
}
.flex-lg-fill {
-ms-flex: 1 1 auto !important;
flex: 1 1 auto !important;
}
.flex-lg-grow-0 {
-ms-flex-positive: 0 !important;
flex-grow: 0 !important;
}
.flex-lg-grow-1 {
-ms-flex-positive: 1 !important;
flex-grow: 1 !important;
}
.flex-lg-shrink-0 {
-ms-flex-negative: 0 !important;
flex-shrink: 0 !important;
}
.flex-lg-shrink-1 {
-ms-flex-negative: 1 !important;
flex-shrink: 1 !important;
}
.justify-content-lg-start {
-ms-flex-pack: start !important;
justify-content: flex-start !important;
}
.justify-content-lg-end {
-ms-flex-pack: end !important;
justify-content: flex-end !important;
}
.justify-content-lg-center {
-ms-flex-pack: center !important;
justify-content: center !important;
}
.justify-content-lg-between {
-ms-flex-pack: justify !important;
justify-content: space-between !important;
}
.justify-content-lg-around {
-ms-flex-pack: distribute !important;
justify-content: space-around !important;
}
.align-items-lg-start {
-ms-flex-align: start !important;
align-items: flex-start !important;
}
.align-items-lg-end {
-ms-flex-align: end !important;
align-items: flex-end !important;
}
.align-items-lg-center {
-ms-flex-align: center !important;
align-items: center !important;
}
.align-items-lg-baseline {
-ms-flex-align: baseline !important;
align-items: baseline !important;
}
.align-items-lg-stretch {
-ms-flex-align: stretch !important;
align-items: stretch !important;
}
.align-content-lg-start {
-ms-flex-line-pack: start !important;
align-content: flex-start !important;
}
.align-content-lg-end {
-ms-flex-line-pack: end !important;
align-content: flex-end !important;
}
.align-content-lg-center {
-ms-flex-line-pack: center !important;
align-content: center !important;
}
.align-content-lg-between {
-ms-flex-line-pack: justify !important;
align-content: space-between !important;
}
.align-content-lg-around {
-ms-flex-line-pack: distribute !important;
align-content: space-around !important;
}
.align-content-lg-stretch {
-ms-flex-line-pack: stretch !important;
align-content: stretch !important;
}
.align-self-lg-auto {
-ms-flex-item-align: auto !important;
align-self: auto !important;
}
.align-self-lg-start {
-ms-flex-item-align: start !important;
align-self: flex-start !important;
}
.align-self-lg-end {
-ms-flex-item-align: end !important;
align-self: flex-end !important;
}
.align-self-lg-center {
-ms-flex-item-align: center !important;
align-self: center !important;
}
.align-self-lg-baseline {
-ms-flex-item-align: baseline !important;
align-self: baseline !important;
}
.align-self-lg-stretch {
-ms-flex-item-align: stretch !important;
align-self: stretch !important;
}
}
@media (min-width: 1200px) {
.flex-xl-row {
-ms-flex-direction: row !important;
flex-direction: row !important;
}
.flex-xl-column {
-ms-flex-direction: column !important;
flex-direction: column !important;
}
.flex-xl-row-reverse {
-ms-flex-direction: row-reverse !important;
flex-direction: row-reverse !important;
}
.flex-xl-column-reverse {
-ms-flex-direction: column-reverse !important;
flex-direction: column-reverse !important;
}
.flex-xl-wrap {
-ms-flex-wrap: wrap !important;
flex-wrap: wrap !important;
}
.flex-xl-nowrap {
-ms-flex-wrap: nowrap !important;
flex-wrap: nowrap !important;
}
.flex-xl-wrap-reverse {
-ms-flex-wrap: wrap-reverse !important;
flex-wrap: wrap-reverse !important;
}
.flex-xl-fill {
-ms-flex: 1 1 auto !important;
flex: 1 1 auto !important;
}
.flex-xl-grow-0 {
-ms-flex-positive: 0 !important;
flex-grow: 0 !important;
}
.flex-xl-grow-1 {
-ms-flex-positive: 1 !important;
flex-grow: 1 !important;
}
.flex-xl-shrink-0 {
-ms-flex-negative: 0 !important;
flex-shrink: 0 !important;
}
.flex-xl-shrink-1 {
-ms-flex-negative: 1 !important;
flex-shrink: 1 !important;
}
.justify-content-xl-start {
-ms-flex-pack: start !important;
justify-content: flex-start !important;
}
.justify-content-xl-end {
-ms-flex-pack: end !important;
justify-content: flex-end !important;
}
.justify-content-xl-center {
-ms-flex-pack: center !important;
justify-content: center !important;
}
.justify-content-xl-between {
-ms-flex-pack: justify !important;
justify-content: space-between !important;
}
.justify-content-xl-around {
-ms-flex-pack: distribute !important;
justify-content: space-around !important;
}
.align-items-xl-start {
-ms-flex-align: start !important;
align-items: flex-start !important;
}
.align-items-xl-end {
-ms-flex-align: end !important;
align-items: flex-end !important;
}
.align-items-xl-center {
-ms-flex-align: center !important;
align-items: center !important;
}
.align-items-xl-baseline {
-ms-flex-align: baseline !important;
align-items: baseline !important;
}
.align-items-xl-stretch {
-ms-flex-align: stretch !important;
align-items: stretch !important;
}
.align-content-xl-start {
-ms-flex-line-pack: start !important;
align-content: flex-start !important;
}
.align-content-xl-end {
-ms-flex-line-pack: end !important;
align-content: flex-end !important;
}
.align-content-xl-center {
-ms-flex-line-pack: center !important;
align-content: center !important;
}
.align-content-xl-between {
-ms-flex-line-pack: justify !important;
align-content: space-between !important;
}
.align-content-xl-around {
-ms-flex-line-pack: distribute !important;
align-content: space-around !important;
}
.align-content-xl-stretch {
-ms-flex-line-pack: stretch !important;
align-content: stretch !important;
}
.align-self-xl-auto {
-ms-flex-item-align: auto !important;
align-self: auto !important;
}
.align-self-xl-start {
-ms-flex-item-align: start !important;
align-self: flex-start !important;
}
.align-self-xl-end {
-ms-flex-item-align: end !important;
align-self: flex-end !important;
}
.align-self-xl-center {
-ms-flex-item-align: center !important;
align-self: center !important;
}
.align-self-xl-baseline {
-ms-flex-item-align: baseline !important;
align-self: baseline !important;
}
.align-self-xl-stretch {
-ms-flex-item-align: stretch !important;
align-self: stretch !important;
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -4,12 +4,10 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jquery')) :
typeof define === 'function' && define.amd ? define(['exports', 'jquery'], factory) :
(global = global || self, factory(global.bootstrap = {}, global.jQuery));
}(this, function (exports, $) { 'use strict';
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.bootstrap = {}));
}(this, function (exports) { 'use strict';
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@ -69,57 +67,18 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): util.js
* Bootstrap (v4.3.1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Private TransitionEnd Helpers
* ------------------------------------------------------------------------
*/
var TRANSITION_END = 'transitionend';
var MAX_UID = 1000000;
var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
var MILLISECONDS_MULTIPLIER = 1000;
var TRANSITION_END = 'transitionend';
var jQuery = window.jQuery; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
function toType(obj) {
var toType = function toType(obj) {
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
}
function getSpecialTransitionEndEvent() {
return {
bindType: TRANSITION_END,
delegateType: TRANSITION_END,
handle: function handle(event) {
if ($(event.target).is(this)) {
return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
}
return undefined; // eslint-disable-line no-undefined
}
};
}
function transitionEndEmulator(duration) {
var _this = this;
var called = false;
$(this).one(Util.TRANSITION_END, function () {
called = true;
});
setTimeout(function () {
if (!called) {
Util.triggerTransitionEnd(_this);
}
}, duration);
return this;
}
function setTransitionEndSupport() {
$.fn.emulateTransitionEnd = transitionEndEmulator;
$.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
}
};
/**
* --------------------------------------------------------------------------
* Public Util Api
@ -127,100 +86,686 @@
*/
var Util = {
TRANSITION_END: 'bsTransitionEnd',
getUID: function getUID(prefix) {
do {
// eslint-disable-next-line no-bitwise
prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
} while (document.getElementById(prefix));
var getUID = function getUID(prefix) {
do {
// eslint-disable-next-line no-bitwise
prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
} while (document.getElementById(prefix));
return prefix;
},
getSelectorFromElement: function getSelectorFromElement(element) {
var selector = element.getAttribute('data-target');
return prefix;
};
if (!selector || selector === '#') {
var hrefAttr = element.getAttribute('href');
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
}
var getSelectorFromElement = function getSelectorFromElement(element) {
var selector = element.getAttribute('data-target');
try {
return document.querySelector(selector) ? selector : null;
} catch (err) {
return null;
}
},
getTransitionDurationFromElement: function getTransitionDurationFromElement(element) {
if (!element) {
return 0;
} // Get transition-duration of the element
if (!selector || selector === '#') {
var hrefAttr = element.getAttribute('href');
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
}
var transitionDuration = $(element).css('transition-duration');
var transitionDelay = $(element).css('transition-delay');
var floatTransitionDuration = parseFloat(transitionDuration);
var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
if (!floatTransitionDuration && !floatTransitionDelay) {
return 0;
} // If multiple durations are defined, take the first
transitionDuration = transitionDuration.split(',')[0];
transitionDelay = transitionDelay.split(',')[0];
return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
},
reflow: function reflow(element) {
return element.offsetHeight;
},
triggerTransitionEnd: function triggerTransitionEnd(element) {
$(element).trigger(TRANSITION_END);
},
// TODO: Remove in v5
supportsTransitionEnd: function supportsTransitionEnd() {
return Boolean(TRANSITION_END);
},
isElement: function isElement(obj) {
return (obj[0] || obj).nodeType;
},
typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
for (var property in configTypes) {
if (Object.prototype.hasOwnProperty.call(configTypes, property)) {
var expectedTypes = configTypes[property];
var value = config[property];
var valueType = value && Util.isElement(value) ? 'element' : toType(value);
if (!new RegExp(expectedTypes).test(valueType)) {
throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
}
}
}
},
findShadowRoot: function findShadowRoot(element) {
if (!document.documentElement.attachShadow) {
return null;
} // Can find the shadow root otherwise it'll return the document
if (typeof element.getRootNode === 'function') {
var root = element.getRootNode();
return root instanceof ShadowRoot ? root : null;
}
if (element instanceof ShadowRoot) {
return element;
} // when we don't find a shadow root
if (!element.parentNode) {
return null;
}
return Util.findShadowRoot(element.parentNode);
try {
return document.querySelector(selector) ? selector : null;
} catch (err) {
return null;
}
};
var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
if (!element) {
return 0;
} // Get transition-duration of the element
var _window$getComputedSt = window.getComputedStyle(element),
transitionDuration = _window$getComputedSt.transitionDuration,
transitionDelay = _window$getComputedSt.transitionDelay;
var floatTransitionDuration = parseFloat(transitionDuration);
var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
if (!floatTransitionDuration && !floatTransitionDelay) {
return 0;
} // If multiple durations are defined, take the first
transitionDuration = transitionDuration.split(',')[0];
transitionDelay = transitionDelay.split(',')[0];
return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
};
var triggerTransitionEnd = function triggerTransitionEnd(element) {
element.dispatchEvent(new Event(TRANSITION_END));
};
var isElement = function isElement(obj) {
return (obj[0] || obj).nodeType;
};
var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
var called = false;
var durationPadding = 5;
var emulatedDuration = duration + durationPadding;
function listener() {
called = true;
element.removeEventListener(TRANSITION_END, listener);
}
element.addEventListener(TRANSITION_END, listener);
setTimeout(function () {
if (!called) {
triggerTransitionEnd(element);
}
}, emulatedDuration);
};
var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
Object.keys(configTypes).forEach(function (property) {
var expectedTypes = configTypes[property];
var value = config[property];
var valueType = value && isElement(value) ? 'element' : toType(value);
if (!new RegExp(expectedTypes).test(valueType)) {
throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
}
});
};
var makeArray = function makeArray(nodeList) {
if (!nodeList) {
return [];
}
return [].slice.call(nodeList);
};
var isVisible = function isVisible(element) {
if (!element) {
return false;
}
if (element.style && element.parentNode && element.parentNode.style) {
return element.style.display !== 'none' && element.parentNode.style.display !== 'none' && element.style.visibility !== 'hidden';
}
return false;
};
var findShadowRoot = function findShadowRoot(element) {
if (!document.documentElement.attachShadow) {
return null;
} // Can find the shadow root otherwise it'll return the document
if (typeof element.getRootNode === 'function') {
var root = element.getRootNode();
return root instanceof ShadowRoot ? root : null;
}
if (element instanceof ShadowRoot) {
return element;
} // when we don't find a shadow root
if (!element.parentNode) {
return null;
}
return findShadowRoot(element.parentNode);
}; // eslint-disable-next-line no-empty-function
var noop = function noop() {
return function () {};
};
var reflow = function reflow(element) {
return element.offsetHeight;
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): dom/data.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var mapData = function () {
var storeData = {};
var id = 1;
return {
set: function set(element, key, data) {
if (typeof element.key === 'undefined') {
element.key = {
key: key,
id: id
};
id++;
}
storeData[element.key.id] = data;
},
get: function get(element, key) {
if (!element || typeof element.key === 'undefined') {
return null;
}
var keyProperties = element.key;
if (keyProperties.key === key) {
return storeData[keyProperties.id];
}
return null;
},
delete: function _delete(element, key) {
if (typeof element.key === 'undefined') {
return;
}
var keyProperties = element.key;
if (keyProperties.key === key) {
delete storeData[keyProperties.id];
delete element.key;
}
}
};
}();
var Data = {
setData: function setData(instance, key, data) {
mapData.set(instance, key, data);
},
getData: function getData(instance, key) {
return mapData.get(instance, key);
},
removeData: function removeData(instance, key) {
mapData.delete(instance, key);
}
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): dom/polyfill.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
/* istanbul ignore next */
var Polyfill = function () {
// MSEdge resets defaultPrevented flag upon dispatchEvent call if at least one listener is attached
var defaultPreventedPreservedOnDispatch = function () {
var e = new CustomEvent('Bootstrap', {
cancelable: true
});
var element = document.createElement('div');
element.addEventListener('Bootstrap', function () {
return null;
});
e.preventDefault();
element.dispatchEvent(e);
return e.defaultPrevented;
}();
var find = Element.prototype.querySelectorAll;
var findOne = Element.prototype.querySelector;
var scopeSelectorRegex = /:scope\b/;
var supportScopeQuery = function () {
var element = document.createElement('div');
try {
element.querySelectorAll(':scope *');
} catch (e) {
return false;
}
return true;
}();
if (!supportScopeQuery) {
find = function find(selector) {
if (!scopeSelectorRegex.test(selector)) {
return this.querySelectorAll(selector);
}
var hasId = Boolean(this.id);
if (!hasId) {
this.id = getUID('scope');
}
var nodeList = null;
try {
selector = selector.replace(scopeSelectorRegex, "#" + this.id);
nodeList = this.querySelectorAll(selector);
} finally {
if (!hasId) {
this.removeAttribute('id');
}
}
return nodeList;
};
findOne = function findOne(selector) {
if (!scopeSelectorRegex.test(selector)) {
return this.querySelector(selector);
}
var matches = find.call(this, selector);
if (typeof matches[0] !== 'undefined') {
return matches[0];
}
return null;
};
}
return {
defaultPreventedPreservedOnDispatch: defaultPreventedPreservedOnDispatch,
find: find,
findOne: findOne
};
}();
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): dom/eventHandler.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var namespaceRegex = /[^.]*(?=\..*)\.|.*/;
var stripNameRegex = /\..*/;
var keyEventRegex = /^key/;
var stripUidRegex = /::\d+$/;
var eventRegistry = {}; // Events storage
var uidEvent = 1;
var customEvents = {
mouseenter: 'mouseover',
mouseleave: 'mouseout'
};
var nativeEvents = ['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll'];
/**
* ------------------------------------------------------------------------
* Private methods
* ------------------------------------------------------------------------
*/
function getUidEvent(element, uid) {
return uid && uid + "::" + uidEvent++ || element.uidEvent || uidEvent++;
}
function getEvent(element) {
var uid = getUidEvent(element);
element.uidEvent = uid;
return eventRegistry[uid] = eventRegistry[uid] || {};
}
function fixEvent(event, element) {
// Add which for key events
if (event.which === null && keyEventRegex.test(event.type)) {
event.which = event.charCode !== null ? event.charCode : event.keyCode;
}
event.delegateTarget = element;
}
function bootstrapHandler(element, fn) {
return function handler(event) {
fixEvent(event, element);
if (handler.oneOff) {
EventHandler.off(element, event.type, fn);
}
return fn.apply(element, [event]);
};
}
function bootstrapDelegationHandler(element, selector, fn) {
return function handler(event) {
var domElements = element.querySelectorAll(selector);
for (var target = event.target; target && target !== this; target = target.parentNode) {
for (var i = domElements.length; i--;) {
if (domElements[i] === target) {
fixEvent(event, target);
if (handler.oneOff) {
EventHandler.off(element, event.type, fn);
}
return fn.apply(target, [event]);
}
}
} // To please ESLint
return null;
};
}
function findHandler(events, handler, delegationSelector) {
if (delegationSelector === void 0) {
delegationSelector = null;
}
var uidList = Object.keys(events);
for (var i = 0; i < uidList.length; i++) {
var uid = uidList[i];
var event = events[uid];
if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {
return events[uid];
}
}
return null;
}
function normalizeParams(originalTypeEvent, handler, delegationFn) {
var delegation = typeof handler === 'string';
var originalHandler = delegation ? delegationFn : handler; // allow to get the native events from namespaced events ('click.bs.button' --> 'click')
var typeEvent = originalTypeEvent.replace(stripNameRegex, '');
var custom = customEvents[typeEvent];
if (custom) {
typeEvent = custom;
}
var isNative = nativeEvents.indexOf(typeEvent) > -1;
if (!isNative) {
typeEvent = originalTypeEvent;
}
return [delegation, originalHandler, typeEvent];
}
function addHandler(element, originalTypeEvent, handler, delegationFn, oneOff) {
if (typeof originalTypeEvent !== 'string' || !element) {
return;
}
if (!handler) {
handler = delegationFn;
delegationFn = null;
}
var _normalizeParams = normalizeParams(originalTypeEvent, handler, delegationFn),
delegation = _normalizeParams[0],
originalHandler = _normalizeParams[1],
typeEvent = _normalizeParams[2];
var events = getEvent(element);
var handlers = events[typeEvent] || (events[typeEvent] = {});
var previousFn = findHandler(handlers, originalHandler, delegation ? handler : null);
if (previousFn) {
previousFn.oneOff = previousFn.oneOff && oneOff;
return;
}
var uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''));
var fn = !delegation ? bootstrapHandler(element, handler) : bootstrapDelegationHandler(element, handler, delegationFn);
fn.delegationSelector = delegation ? handler : null;
fn.originalHandler = originalHandler;
fn.oneOff = oneOff;
fn.uidEvent = uid;
handlers[uid] = fn;
element.addEventListener(typeEvent, fn, delegation);
}
function removeHandler(element, events, typeEvent, handler, delegationSelector) {
var fn = findHandler(events[typeEvent], handler, delegationSelector);
if (fn === null) {
return;
}
element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));
delete events[typeEvent][fn.uidEvent];
}
function removeNamespacedHandlers(element, events, typeEvent, namespace) {
var storeElementEvent = events[typeEvent] || {};
Object.keys(storeElementEvent).forEach(function (handlerKey) {
if (handlerKey.indexOf(namespace) > -1) {
var event = storeElementEvent[handlerKey];
removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
}
});
}
var EventHandler = {
on: function on(element, event, handler, delegationFn) {
addHandler(element, event, handler, delegationFn, false);
},
one: function one(element, event, handler, delegationFn) {
addHandler(element, event, handler, delegationFn, true);
},
off: function off(element, originalTypeEvent, handler, delegationFn) {
if (typeof originalTypeEvent !== 'string' || !element) {
return;
}
var _normalizeParams2 = normalizeParams(originalTypeEvent, handler, delegationFn),
delegation = _normalizeParams2[0],
originalHandler = _normalizeParams2[1],
typeEvent = _normalizeParams2[2];
var inNamespace = typeEvent !== originalTypeEvent;
var events = getEvent(element);
var isNamespace = originalTypeEvent.charAt(0) === '.';
if (typeof originalHandler !== 'undefined') {
// Simplest case: handler is passed, remove that listener ONLY.
if (!events || !events[typeEvent]) {
return;
}
removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null);
return;
}
if (isNamespace) {
Object.keys(events).forEach(function (elementEvent) {
removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.substr(1));
});
}
var storeElementEvent = events[typeEvent] || {};
Object.keys(storeElementEvent).forEach(function (keyHandlers) {
var handlerKey = keyHandlers.replace(stripUidRegex, '');
if (!inNamespace || originalTypeEvent.indexOf(handlerKey) > -1) {
var event = storeElementEvent[keyHandlers];
removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
}
});
},
trigger: function trigger(element, event, args) {
if (typeof event !== 'string' || !element) {
return null;
}
var typeEvent = event.replace(stripNameRegex, '');
var inNamespace = event !== typeEvent;
var isNative = nativeEvents.indexOf(typeEvent) > -1;
var jQueryEvent;
var bubbles = true;
var nativeDispatch = true;
var defaultPrevented = false;
var evt = null;
if (inNamespace && typeof jQuery !== 'undefined') {
jQueryEvent = jQuery.Event(event, args);
jQuery(element).trigger(jQueryEvent);
bubbles = !jQueryEvent.isPropagationStopped();
nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();
defaultPrevented = jQueryEvent.isDefaultPrevented();
}
if (isNative) {
evt = document.createEvent('HTMLEvents');
evt.initEvent(typeEvent, bubbles, true);
} else {
evt = new CustomEvent(event, {
bubbles: bubbles,
cancelable: true
});
} // merge custom informations in our event
if (typeof args !== 'undefined') {
Object.keys(args).forEach(function (key) {
Object.defineProperty(evt, key, {
get: function get() {
return args[key];
}
});
});
}
if (defaultPrevented) {
evt.preventDefault();
if (!Polyfill.defaultPreventedPreservedOnDispatch) {
Object.defineProperty(evt, 'defaultPrevented', {
get: function get() {
return true;
}
});
}
}
if (nativeDispatch) {
element.dispatchEvent(evt);
}
if (evt.defaultPrevented && typeof jQueryEvent !== 'undefined') {
jQueryEvent.preventDefault();
}
return evt;
}
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): dom/selectorEngine.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var findFn = Polyfill.find;
var _findOne = Polyfill.findOne;
var NODE_TEXT = 3;
var SelectorEngine = {
matches: function matches(element, selector) {
return element.matches(selector);
},
find: function find(selector, element) {
if (element === void 0) {
element = document.documentElement;
}
if (typeof selector !== 'string') {
return null;
}
return findFn.call(element, selector);
},
findOne: function findOne(selector, element) {
if (element === void 0) {
element = document.documentElement;
}
if (typeof selector !== 'string') {
return null;
}
return _findOne.call(element, selector);
},
children: function children(element, selector) {
var _this = this;
if (typeof selector !== 'string') {
return null;
}
var children = makeArray(element.children);
return children.filter(function (child) {
return _this.matches(child, selector);
});
},
parents: function parents(element, selector) {
if (typeof selector !== 'string') {
return null;
}
var parents = [];
var ancestor = element.parentNode;
while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {
if (this.matches(ancestor, selector)) {
parents.push(ancestor);
}
ancestor = ancestor.parentNode;
}
return parents;
},
closest: function closest(element, selector) {
if (typeof selector !== 'string') {
return null;
}
return element.closest(selector);
},
prev: function prev(element, selector) {
if (typeof selector !== 'string') {
return null;
}
var siblings = [];
var previous = element.previousSibling;
while (previous && previous.nodeType === Node.ELEMENT_NODE && previous.nodeType !== NODE_TEXT) {
if (this.matches(previous, selector)) {
siblings.push(previous);
}
previous = previous.previousSibling;
}
return siblings;
}
};
setTransitionEndSupport();
/**
* ------------------------------------------------------------------------
@ -233,11 +778,10 @@
var DATA_KEY = 'bs.alert';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
var JQUERY_NO_CONFLICT = $.fn[NAME];
var Selector = {
DISMISS: '[data-dismiss="alert"]'
};
var Event = {
var Event$1 = {
CLOSE: "close" + EVENT_KEY,
CLOSED: "closed" + EVENT_KEY,
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
@ -259,6 +803,10 @@
function () {
function Alert(element) {
this._element = element;
if (this._element) {
Data.setData(element, DATA_KEY, this);
}
} // Getters
@ -274,7 +822,7 @@
var customEvent = this._triggerCloseEvent(rootElement);
if (customEvent.isDefaultPrevented()) {
if (customEvent === null || customEvent.defaultPrevented) {
return;
}
@ -282,62 +830,63 @@
};
_proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY);
Data.removeData(this._element, DATA_KEY);
this._element = null;
} // Private
;
_proto._getRootElement = function _getRootElement(element) {
var selector = Util.getSelectorFromElement(element);
var selector = getSelectorFromElement(element);
var parent = false;
if (selector) {
parent = document.querySelector(selector);
parent = SelectorEngine.findOne(selector);
}
if (!parent) {
parent = $(element).closest("." + ClassName.ALERT)[0];
parent = SelectorEngine.closest(element, "." + ClassName.ALERT);
}
return parent;
};
_proto._triggerCloseEvent = function _triggerCloseEvent(element) {
var closeEvent = $.Event(Event.CLOSE);
$(element).trigger(closeEvent);
return closeEvent;
return EventHandler.trigger(element, Event$1.CLOSE);
};
_proto._removeElement = function _removeElement(element) {
var _this = this;
$(element).removeClass(ClassName.SHOW);
element.classList.remove(ClassName.SHOW);
if (!$(element).hasClass(ClassName.FADE)) {
if (!element.classList.contains(ClassName.FADE)) {
this._destroyElement(element);
return;
}
var transitionDuration = Util.getTransitionDurationFromElement(element);
$(element).one(Util.TRANSITION_END, function (event) {
var transitionDuration = getTransitionDurationFromElement(element);
EventHandler.one(element, TRANSITION_END, function (event) {
return _this._destroyElement(element, event);
}).emulateTransitionEnd(transitionDuration);
});
emulateTransitionEnd(element, transitionDuration);
};
_proto._destroyElement = function _destroyElement(element) {
$(element).detach().trigger(Event.CLOSED).remove();
if (element.parentNode) {
element.parentNode.removeChild(element);
}
EventHandler.trigger(element, Event$1.CLOSED);
} // Static
;
Alert._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var $element = $(this);
var data = $element.data(DATA_KEY);
var data = Data.getData(this, DATA_KEY);
if (!data) {
data = new Alert(this);
$element.data(DATA_KEY, data);
}
if (config === 'close') {
@ -356,6 +905,10 @@
};
};
Alert._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY);
};
_createClass(Alert, null, [{
key: "VERSION",
get: function get() {
@ -372,20 +925,24 @@
*/
$(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
EventHandler.on(document, Event$1.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
* add .alert to jQuery only if jQuery is present
*/
$.fn[NAME] = Alert._jQueryInterface;
$.fn[NAME].Constructor = Alert;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT = jQuery.fn[NAME];
jQuery.fn[NAME] = Alert._jQueryInterface;
jQuery.fn[NAME].Constructor = Alert;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Alert._jQueryInterface;
};
jQuery.fn[NAME].noConflict = function () {
jQuery.fn[NAME] = JQUERY_NO_CONFLICT;
return Alert._jQueryInterface;
};
}
/**
* ------------------------------------------------------------------------
@ -398,7 +955,6 @@
var DATA_KEY$1 = 'bs.button';
var EVENT_KEY$1 = "." + DATA_KEY$1;
var DATA_API_KEY$1 = '.data-api';
var JQUERY_NO_CONFLICT$1 = $.fn[NAME$1];
var ClassName$1 = {
ACTIVE: 'active',
BUTTON: 'btn',
@ -411,9 +967,10 @@
ACTIVE: '.active',
BUTTON: '.btn'
};
var Event$1 = {
var Event$2 = {
CLICK_DATA_API: "click" + EVENT_KEY$1 + DATA_API_KEY$1,
FOCUS_BLUR_DATA_API: "focus" + EVENT_KEY$1 + DATA_API_KEY$1 + " " + ("blur" + EVENT_KEY$1 + DATA_API_KEY$1)
FOCUS_DATA_API: "focus" + EVENT_KEY$1 + DATA_API_KEY$1,
BLUR_DATA_API: "blur" + EVENT_KEY$1 + DATA_API_KEY$1
/**
* ------------------------------------------------------------------------
* Class Definition
@ -427,6 +984,7 @@
function () {
function Button(element) {
this._element = element;
Data.setData(element, DATA_KEY$1, this);
} // Getters
@ -436,20 +994,20 @@
_proto.toggle = function toggle() {
var triggerChangeEvent = true;
var addAriaPressed = true;
var rootElement = $(this._element).closest(Selector$1.DATA_TOGGLE)[0];
var rootElement = SelectorEngine.closest(this._element, Selector$1.DATA_TOGGLE);
if (rootElement) {
var input = this._element.querySelector(Selector$1.INPUT);
var input = SelectorEngine.findOne(Selector$1.INPUT, this._element);
if (input) {
if (input.type === 'radio') {
if (input.checked && this._element.classList.contains(ClassName$1.ACTIVE)) {
triggerChangeEvent = false;
} else {
var activeElement = rootElement.querySelector(Selector$1.ACTIVE);
var activeElement = SelectorEngine.findOne(Selector$1.ACTIVE, rootElement);
if (activeElement) {
$(activeElement).removeClass(ClassName$1.ACTIVE);
activeElement.classList.remove(ClassName$1.ACTIVE);
}
}
}
@ -460,7 +1018,7 @@
}
input.checked = !this._element.classList.contains(ClassName$1.ACTIVE);
$(input).trigger('change');
EventHandler.trigger(input, 'change');
}
input.focus();
@ -473,23 +1031,22 @@
}
if (triggerChangeEvent) {
$(this._element).toggleClass(ClassName$1.ACTIVE);
this._element.classList.toggle(ClassName$1.ACTIVE);
}
};
_proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY$1);
Data.removeData(this._element, DATA_KEY$1);
this._element = null;
} // Static
;
Button._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var data = $(this).data(DATA_KEY$1);
var data = Data.getData(this, DATA_KEY$1);
if (!data) {
data = new Button(this);
$(this).data(DATA_KEY$1, data);
}
if (config === 'toggle') {
@ -498,6 +1055,10 @@
});
};
Button._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY$1);
};
_createClass(Button, null, [{
key: "VERSION",
get: function get() {
@ -514,31 +1075,127 @@
*/
$(document).on(Event$1.CLICK_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) {
EventHandler.on(document, Event$2.CLICK_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) {
event.preventDefault();
var button = event.target;
if (!$(button).hasClass(ClassName$1.BUTTON)) {
button = $(button).closest(Selector$1.BUTTON);
if (!button.classList.contains(ClassName$1.BUTTON)) {
button = SelectorEngine.closest(button, Selector$1.BUTTON);
}
Button._jQueryInterface.call($(button), 'toggle');
}).on(Event$1.FOCUS_BLUR_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) {
var button = $(event.target).closest(Selector$1.BUTTON)[0];
$(button).toggleClass(ClassName$1.FOCUS, /^focus(in)?$/.test(event.type));
var data = Data.getData(button, DATA_KEY$1);
if (!data) {
data = new Button(button);
Data.setData(button, DATA_KEY$1, data);
}
data.toggle();
});
EventHandler.on(document, Event$2.FOCUS_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) {
var button = SelectorEngine.closest(event.target, Selector$1.BUTTON);
button.classList.add(ClassName$1.FOCUS);
});
EventHandler.on(document, Event$2.BLUR_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) {
var button = SelectorEngine.closest(event.target, Selector$1.BUTTON);
button.classList.remove(ClassName$1.FOCUS);
});
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
* add .button to jQuery only if jQuery is present
*/
$.fn[NAME$1] = Button._jQueryInterface;
$.fn[NAME$1].Constructor = Button;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT$1 = jQuery.fn[NAME$1];
jQuery.fn[NAME$1] = Button._jQueryInterface;
jQuery.fn[NAME$1].Constructor = Button;
$.fn[NAME$1].noConflict = function () {
$.fn[NAME$1] = JQUERY_NO_CONFLICT$1;
return Button._jQueryInterface;
jQuery.fn[NAME$1].noConflict = function () {
jQuery.fn[NAME$1] = JQUERY_NO_CONFLICT$1;
return Button._jQueryInterface;
};
}
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): dom/manipulator.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
function normalizeData(val) {
if (val === 'true') {
return true;
}
if (val === 'false') {
return false;
}
if (val === Number(val).toString()) {
return Number(val);
}
if (val === '' || val === 'null') {
return null;
}
return val;
}
function normalizeDataKey(key) {
return key.replace(/[A-Z]/g, function (chr) {
return chr.toLowerCase();
});
}
var Manipulator = {
setDataAttribute: function setDataAttribute(element, key, value) {
element.setAttribute("data-" + normalizeDataKey(key), value);
},
removeDataAttribute: function removeDataAttribute(element, key) {
element.removeAttribute("data-" + normalizeDataKey(key));
},
getDataAttributes: function getDataAttributes(element) {
if (!element) {
return {};
}
var attributes = _objectSpread({}, element.dataset);
Object.keys(attributes).forEach(function (key) {
attributes[key] = normalizeData(attributes[key]);
});
return attributes;
},
getDataAttribute: function getDataAttribute(element, key) {
return normalizeData(element.getAttribute("data-" + normalizeDataKey(key)));
},
offset: function offset(element) {
var rect = element.getBoundingClientRect();
return {
top: rect.top + document.body.scrollTop,
left: rect.left + document.body.scrollLeft
};
},
position: function position(element) {
return {
top: element.offsetTop,
left: element.offsetLeft
};
},
toggleClass: function toggleClass(element, className) {
if (!element) {
return;
}
if (element.classList.contains(className)) {
element.classList.remove(className);
} else {
element.classList.add(className);
}
}
};
/**
@ -552,7 +1209,6 @@
var DATA_KEY$2 = 'bs.carousel';
var EVENT_KEY$2 = "." + DATA_KEY$2;
var DATA_API_KEY$2 = '.data-api';
var JQUERY_NO_CONFLICT$2 = $.fn[NAME$2];
var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
@ -582,7 +1238,7 @@
LEFT: 'left',
RIGHT: 'right'
};
var Event$2 = {
var Event$3 = {
SLIDE: "slide" + EVENT_KEY$2,
SLID: "slid" + EVENT_KEY$2,
KEYDOWN: "keydown" + EVENT_KEY$2,
@ -643,11 +1299,13 @@
this.touchDeltaX = 0;
this._config = this._getConfig(config);
this._element = element;
this._indicatorsElement = this._element.querySelector(Selector$2.INDICATORS);
this._indicatorsElement = SelectorEngine.findOne(Selector$2.INDICATORS, this._element);
this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent);
this._addEventListeners();
Data.setData(element, DATA_KEY$2, this);
} // Getters
@ -663,7 +1321,7 @@
_proto.nextWhenVisible = function nextWhenVisible() {
// Don't call next when the page isn't visible
// or the carousel or its parent isn't visible
if (!document.hidden && $(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden') {
if (!document.hidden && isVisible(this._element)) {
this.next();
}
};
@ -679,8 +1337,8 @@
this._isPaused = true;
}
if (this._element.querySelector(Selector$2.NEXT_PREV)) {
Util.triggerTransitionEnd(this._element);
if (SelectorEngine.findOne(Selector$2.NEXT_PREV, this._element)) {
triggerTransitionEnd(this._element);
this.cycle(true);
}
@ -698,7 +1356,7 @@
this._interval = null;
}
if (this._config.interval && !this._isPaused) {
if (this._config && this._config.interval && !this._isPaused) {
this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
}
};
@ -706,7 +1364,7 @@
_proto.to = function to(index) {
var _this = this;
this._activeElement = this._element.querySelector(Selector$2.ACTIVE_ITEM);
this._activeElement = SelectorEngine.findOne(Selector$2.ACTIVE_ITEM, this._element);
var activeIndex = this._getItemIndex(this._activeElement);
@ -715,7 +1373,7 @@
}
if (this._isSliding) {
$(this._element).one(Event$2.SLID, function () {
EventHandler.one(this._element, Event$3.SLID, function () {
return _this.to(index);
});
return;
@ -733,8 +1391,8 @@
};
_proto.dispose = function dispose() {
$(this._element).off(EVENT_KEY$2);
$.removeData(this._element, DATA_KEY$2);
EventHandler.off(this._element, EVENT_KEY$2);
Data.removeData(this._element, DATA_KEY$2);
this._items = null;
this._config = null;
this._element = null;
@ -748,7 +1406,7 @@
_proto._getConfig = function _getConfig(config) {
config = _objectSpread({}, Default, config);
Util.typeCheckConfig(NAME$2, config, DefaultType);
typeCheckConfig(NAME$2, config, DefaultType);
return config;
};
@ -775,15 +1433,16 @@
var _this2 = this;
if (this._config.keyboard) {
$(this._element).on(Event$2.KEYDOWN, function (event) {
EventHandler.on(this._element, Event$3.KEYDOWN, function (event) {
return _this2._keydown(event);
});
}
if (this._config.pause === 'hover') {
$(this._element).on(Event$2.MOUSEENTER, function (event) {
EventHandler.on(this._element, Event$3.MOUSEENTER, function (event) {
return _this2.pause(event);
}).on(Event$2.MOUSELEAVE, function (event) {
});
EventHandler.on(this._element, Event$3.MOUSELEAVE, function (event) {
return _this2.cycle(event);
});
}
@ -801,25 +1460,25 @@
}
var start = function start(event) {
if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
_this3.touchStartX = event.originalEvent.clientX;
if (_this3._pointerEvent && PointerType[event.pointerType.toUpperCase()]) {
_this3.touchStartX = event.clientX;
} else if (!_this3._pointerEvent) {
_this3.touchStartX = event.originalEvent.touches[0].clientX;
_this3.touchStartX = event.touches[0].clientX;
}
};
var move = function move(event) {
// ensure swiping with one touch and not pinching
if (event.originalEvent.touches && event.originalEvent.touches.length > 1) {
if (event.touches && event.touches.length > 1) {
_this3.touchDeltaX = 0;
} else {
_this3.touchDeltaX = event.originalEvent.touches[0].clientX - _this3.touchStartX;
_this3.touchDeltaX = event.touches[0].clientX - _this3.touchStartX;
}
};
var end = function end(event) {
if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
_this3.touchDeltaX = event.originalEvent.clientX - _this3.touchStartX;
if (_this3._pointerEvent && PointerType[event.pointerType.toUpperCase()]) {
_this3.touchDeltaX = event.clientX - _this3.touchStartX;
}
_this3._handleSwipe();
@ -844,27 +1503,29 @@
}
};
$(this._element.querySelectorAll(Selector$2.ITEM_IMG)).on(Event$2.DRAG_START, function (e) {
return e.preventDefault();
makeArray(SelectorEngine.find(Selector$2.ITEM_IMG, this._element)).forEach(function (itemImg) {
EventHandler.on(itemImg, Event$3.DRAG_START, function (e) {
return e.preventDefault();
});
});
if (this._pointerEvent) {
$(this._element).on(Event$2.POINTERDOWN, function (event) {
EventHandler.on(this._element, Event$3.POINTERDOWN, function (event) {
return start(event);
});
$(this._element).on(Event$2.POINTERUP, function (event) {
EventHandler.on(this._element, Event$3.POINTERUP, function (event) {
return end(event);
});
this._element.classList.add(ClassName$2.POINTER_EVENT);
} else {
$(this._element).on(Event$2.TOUCHSTART, function (event) {
EventHandler.on(this._element, Event$3.TOUCHSTART, function (event) {
return start(event);
});
$(this._element).on(Event$2.TOUCHMOVE, function (event) {
EventHandler.on(this._element, Event$3.TOUCHMOVE, function (event) {
return move(event);
});
$(this._element).on(Event$2.TOUCHEND, function (event) {
EventHandler.on(this._element, Event$3.TOUCHEND, function (event) {
return end(event);
});
}
@ -891,7 +1552,7 @@
};
_proto._getItemIndex = function _getItemIndex(element) {
this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(Selector$2.ITEM)) : [];
this._items = element && element.parentNode ? makeArray(SelectorEngine.find(Selector$2.ITEM, element.parentNode)) : [];
return this._items.indexOf(element);
};
@ -916,27 +1577,28 @@
_proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
var targetIndex = this._getItemIndex(relatedTarget);
var fromIndex = this._getItemIndex(this._element.querySelector(Selector$2.ACTIVE_ITEM));
var fromIndex = this._getItemIndex(SelectorEngine.findOne(Selector$2.ACTIVE_ITEM, this._element));
var slideEvent = $.Event(Event$2.SLIDE, {
return EventHandler.trigger(this._element, Event$3.SLIDE, {
relatedTarget: relatedTarget,
direction: eventDirectionName,
from: fromIndex,
to: targetIndex
});
$(this._element).trigger(slideEvent);
return slideEvent;
};
_proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
if (this._indicatorsElement) {
var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(Selector$2.ACTIVE));
$(indicators).removeClass(ClassName$2.ACTIVE);
var indicators = SelectorEngine.find(Selector$2.ACTIVE, this._indicatorsElement);
for (var i = 0; i < indicators.length; i++) {
indicators[i].classList.remove(ClassName$2.ACTIVE);
}
var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
if (nextIndicator) {
$(nextIndicator).addClass(ClassName$2.ACTIVE);
nextIndicator.classList.add(ClassName$2.ACTIVE);
}
}
};
@ -944,7 +1606,7 @@
_proto._slide = function _slide(direction, element) {
var _this4 = this;
var activeElement = this._element.querySelector(Selector$2.ACTIVE_ITEM);
var activeElement = SelectorEngine.findOne(Selector$2.ACTIVE_ITEM, this._element);
var activeElementIndex = this._getItemIndex(activeElement);
@ -967,14 +1629,14 @@
eventDirectionName = Direction.RIGHT;
}
if (nextElement && $(nextElement).hasClass(ClassName$2.ACTIVE)) {
if (nextElement && nextElement.classList.contains(ClassName$2.ACTIVE)) {
this._isSliding = false;
return;
}
var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
if (slideEvent.isDefaultPrevented()) {
if (slideEvent.defaultPrevented) {
return;
}
@ -991,18 +1653,11 @@
this._setActiveIndicatorElement(nextElement);
var slidEvent = $.Event(Event$2.SLID, {
relatedTarget: nextElement,
direction: eventDirectionName,
from: activeElementIndex,
to: nextElementIndex
});
if ($(this._element).hasClass(ClassName$2.SLIDE)) {
$(nextElement).addClass(orderClassName);
Util.reflow(nextElement);
$(activeElement).addClass(directionalClassName);
$(nextElement).addClass(directionalClassName);
if (this._element.classList.contains(ClassName$2.SLIDE)) {
nextElement.classList.add(orderClassName);
reflow(nextElement);
activeElement.classList.add(directionalClassName);
nextElement.classList.add(directionalClassName);
var nextElementInterval = parseInt(nextElement.getAttribute('data-interval'), 10);
if (nextElementInterval) {
@ -1012,20 +1667,35 @@
this._config.interval = this._config.defaultInterval || this._config.interval;
}
var transitionDuration = Util.getTransitionDurationFromElement(activeElement);
$(activeElement).one(Util.TRANSITION_END, function () {
$(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName$2.ACTIVE);
$(activeElement).removeClass(ClassName$2.ACTIVE + " " + orderClassName + " " + directionalClassName);
var transitionDuration = getTransitionDurationFromElement(activeElement);
EventHandler.one(activeElement, TRANSITION_END, function () {
nextElement.classList.remove(directionalClassName);
nextElement.classList.remove(orderClassName);
nextElement.classList.add(ClassName$2.ACTIVE);
activeElement.classList.remove(ClassName$2.ACTIVE);
activeElement.classList.remove(orderClassName);
activeElement.classList.remove(directionalClassName);
_this4._isSliding = false;
setTimeout(function () {
return $(_this4._element).trigger(slidEvent);
EventHandler.trigger(_this4._element, Event$3.SLID, {
relatedTarget: nextElement,
direction: eventDirectionName,
from: activeElementIndex,
to: nextElementIndex
});
}, 0);
}).emulateTransitionEnd(transitionDuration);
});
emulateTransitionEnd(activeElement, transitionDuration);
} else {
$(activeElement).removeClass(ClassName$2.ACTIVE);
$(nextElement).addClass(ClassName$2.ACTIVE);
activeElement.classList.remove(ClassName$2.ACTIVE);
nextElement.classList.add(ClassName$2.ACTIVE);
this._isSliding = false;
$(this._element).trigger(slidEvent);
EventHandler.trigger(this._element, Event$3.SLID, {
relatedTarget: nextElement,
direction: eventDirectionName,
from: activeElementIndex,
to: nextElementIndex
});
}
if (isCycling) {
@ -1034,52 +1704,55 @@
} // Static
;
Carousel._carouselInterface = function _carouselInterface(element, config) {
var data = Data.getData(element, DATA_KEY$2);
var _config = _objectSpread({}, Default, Manipulator.getDataAttributes(element));
if (typeof config === 'object') {
_config = _objectSpread({}, _config, config);
}
var action = typeof config === 'string' ? config : _config.slide;
if (!data) {
data = new Carousel(element, _config);
}
if (typeof config === 'number') {
data.to(config);
} else if (typeof action === 'string') {
if (typeof data[action] === 'undefined') {
throw new Error("No method named \"" + action + "\"");
}
data[action]();
} else if (_config.interval && _config.ride) {
data.pause();
data.cycle();
}
};
Carousel._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var data = $(this).data(DATA_KEY$2);
var _config = _objectSpread({}, Default, $(this).data());
if (typeof config === 'object') {
_config = _objectSpread({}, _config, config);
}
var action = typeof config === 'string' ? config : _config.slide;
if (!data) {
data = new Carousel(this, _config);
$(this).data(DATA_KEY$2, data);
}
if (typeof config === 'number') {
data.to(config);
} else if (typeof action === 'string') {
if (typeof data[action] === 'undefined') {
throw new TypeError("No method named \"" + action + "\"");
}
data[action]();
} else if (_config.interval && _config.ride) {
data.pause();
data.cycle();
}
Carousel._carouselInterface(this, config);
});
};
Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
var selector = Util.getSelectorFromElement(this);
var selector = getSelectorFromElement(this);
if (!selector) {
return;
}
var target = $(selector)[0];
var target = SelectorEngine.findOne(selector);
if (!target || !$(target).hasClass(ClassName$2.CAROUSEL)) {
if (!target || !target.classList.contains(ClassName$2.CAROUSEL)) {
return;
}
var config = _objectSpread({}, $(target).data(), $(this).data());
var config = _objectSpread({}, Manipulator.getDataAttributes(target), Manipulator.getDataAttributes(this));
var slideIndex = this.getAttribute('data-slide-to');
@ -1087,15 +1760,19 @@
config.interval = false;
}
Carousel._jQueryInterface.call($(target), config);
Carousel._carouselInterface(target, config);
if (slideIndex) {
$(target).data(DATA_KEY$2).to(slideIndex);
Data.getData(target, DATA_KEY$2).to(slideIndex);
}
event.preventDefault();
};
Carousel._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY$2);
};
_createClass(Carousel, null, [{
key: "VERSION",
get: function get() {
@ -1117,29 +1794,31 @@
*/
$(document).on(Event$2.CLICK_DATA_API, Selector$2.DATA_SLIDE, Carousel._dataApiClickHandler);
$(window).on(Event$2.LOAD_DATA_API, function () {
var carousels = [].slice.call(document.querySelectorAll(Selector$2.DATA_RIDE));
EventHandler.on(document, Event$3.CLICK_DATA_API, Selector$2.DATA_SLIDE, Carousel._dataApiClickHandler);
EventHandler.on(window, Event$3.LOAD_DATA_API, function () {
var carousels = makeArray(SelectorEngine.find(Selector$2.DATA_RIDE));
for (var i = 0, len = carousels.length; i < len; i++) {
var $carousel = $(carousels[i]);
Carousel._jQueryInterface.call($carousel, $carousel.data());
Carousel._carouselInterface(carousels[i], Data.getData(carousels[i], DATA_KEY$2));
}
});
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
* add .carousel to jQuery only if jQuery is present
*/
$.fn[NAME$2] = Carousel._jQueryInterface;
$.fn[NAME$2].Constructor = Carousel;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT$2 = jQuery.fn[NAME$2];
jQuery.fn[NAME$2] = Carousel._jQueryInterface;
jQuery.fn[NAME$2].Constructor = Carousel;
$.fn[NAME$2].noConflict = function () {
$.fn[NAME$2] = JQUERY_NO_CONFLICT$2;
return Carousel._jQueryInterface;
};
jQuery.fn[NAME$2].noConflict = function () {
jQuery.fn[NAME$2] = JQUERY_NO_CONFLICT$2;
return Carousel._jQueryInterface;
};
}
/**
* ------------------------------------------------------------------------
@ -1152,7 +1831,6 @@
var DATA_KEY$3 = 'bs.collapse';
var EVENT_KEY$3 = "." + DATA_KEY$3;
var DATA_API_KEY$3 = '.data-api';
var JQUERY_NO_CONFLICT$3 = $.fn[NAME$3];
var Default$1 = {
toggle: true,
parent: ''
@ -1161,7 +1839,7 @@
toggle: 'boolean',
parent: '(string|element)'
};
var Event$3 = {
var Event$4 = {
SHOW: "show" + EVENT_KEY$3,
SHOWN: "shown" + EVENT_KEY$3,
HIDE: "hide" + EVENT_KEY$3,
@ -1196,17 +1874,17 @@
this._isTransitioning = false;
this._element = element;
this._config = this._getConfig(config);
this._triggerArray = [].slice.call(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
var toggleList = [].slice.call(document.querySelectorAll(Selector$3.DATA_TOGGLE));
this._triggerArray = makeArray(SelectorEngine.find("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
var toggleList = makeArray(SelectorEngine.find(Selector$3.DATA_TOGGLE));
for (var i = 0, len = toggleList.length; i < len; i++) {
var elem = toggleList[i];
var selector = Util.getSelectorFromElement(elem);
var filterElement = [].slice.call(document.querySelectorAll(selector)).filter(function (foundElem) {
var selector = getSelectorFromElement(elem);
var filterElement = makeArray(SelectorEngine.find(selector)).filter(function (foundElem) {
return foundElem === element;
});
if (selector !== null && filterElement.length > 0) {
if (selector !== null && filterElement.length) {
this._selector = selector;
this._triggerArray.push(elem);
@ -1222,6 +1900,8 @@
if (this._config.toggle) {
this.toggle();
}
Data.setData(element, DATA_KEY$3, this);
} // Getters
@ -1229,7 +1909,7 @@
// Public
_proto.toggle = function toggle() {
if ($(this._element).hasClass(ClassName$3.SHOW)) {
if (this._element.classList.contains(ClassName$3.SHOW)) {
this.hide();
} else {
this.show();
@ -1239,7 +1919,7 @@
_proto.show = function show() {
var _this = this;
if (this._isTransitioning || $(this._element).hasClass(ClassName$3.SHOW)) {
if (this._isTransitioning || this._element.classList.contains(ClassName$3.SHOW)) {
return;
}
@ -1247,7 +1927,7 @@
var activesData;
if (this._parent) {
actives = [].slice.call(this._parent.querySelectorAll(Selector$3.ACTIVES)).filter(function (elem) {
actives = makeArray(SelectorEngine.find(Selector$3.ACTIVES, this._parent)).filter(function (elem) {
if (typeof _this._config.parent === 'string') {
return elem.getAttribute('data-parent') === _this._config.parent;
}
@ -1260,87 +1940,113 @@
}
}
var container = SelectorEngine.findOne(this._selector);
if (actives) {
activesData = $(actives).not(this._selector).data(DATA_KEY$3);
var tempActiveData = actives.filter(function (elem) {
return container !== elem;
});
activesData = tempActiveData[0] ? Data.getData(tempActiveData[0], DATA_KEY$3) : null;
if (activesData && activesData._isTransitioning) {
return;
}
}
var startEvent = $.Event(Event$3.SHOW);
$(this._element).trigger(startEvent);
var startEvent = EventHandler.trigger(this._element, Event$4.SHOW);
if (startEvent.isDefaultPrevented()) {
if (startEvent.defaultPrevented) {
return;
}
if (actives) {
Collapse._jQueryInterface.call($(actives).not(this._selector), 'hide');
actives.forEach(function (elemActive) {
if (container !== elemActive) {
Collapse._collapseInterface(elemActive, 'hide');
}
if (!activesData) {
$(actives).data(DATA_KEY$3, null);
}
if (!activesData) {
Data.setData(elemActive, DATA_KEY$3, null);
}
});
}
var dimension = this._getDimension();
$(this._element).removeClass(ClassName$3.COLLAPSE).addClass(ClassName$3.COLLAPSING);
this._element.classList.remove(ClassName$3.COLLAPSE);
this._element.classList.add(ClassName$3.COLLAPSING);
this._element.style[dimension] = 0;
if (this._triggerArray.length) {
$(this._triggerArray).removeClass(ClassName$3.COLLAPSED).attr('aria-expanded', true);
this._triggerArray.forEach(function (element) {
element.classList.remove(ClassName$3.COLLAPSED);
element.setAttribute('aria-expanded', true);
});
}
this.setTransitioning(true);
var complete = function complete() {
$(_this._element).removeClass(ClassName$3.COLLAPSING).addClass(ClassName$3.COLLAPSE).addClass(ClassName$3.SHOW);
_this._element.classList.remove(ClassName$3.COLLAPSING);
_this._element.classList.add(ClassName$3.COLLAPSE);
_this._element.classList.add(ClassName$3.SHOW);
_this._element.style[dimension] = '';
_this.setTransitioning(false);
$(_this._element).trigger(Event$3.SHOWN);
EventHandler.trigger(_this._element, Event$4.SHOWN);
};
var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
var scrollSize = "scroll" + capitalizedDimension;
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
var transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, TRANSITION_END, complete);
emulateTransitionEnd(this._element, transitionDuration);
this._element.style[dimension] = this._element[scrollSize] + "px";
};
_proto.hide = function hide() {
var _this2 = this;
if (this._isTransitioning || !$(this._element).hasClass(ClassName$3.SHOW)) {
if (this._isTransitioning || !this._element.classList.contains(ClassName$3.SHOW)) {
return;
}
var startEvent = $.Event(Event$3.HIDE);
$(this._element).trigger(startEvent);
var startEvent = EventHandler.trigger(this._element, Event$4.HIDE);
if (startEvent.isDefaultPrevented()) {
if (startEvent.defaultPrevented) {
return;
}
var dimension = this._getDimension();
this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
Util.reflow(this._element);
$(this._element).addClass(ClassName$3.COLLAPSING).removeClass(ClassName$3.COLLAPSE).removeClass(ClassName$3.SHOW);
reflow(this._element);
this._element.classList.add(ClassName$3.COLLAPSING);
this._element.classList.remove(ClassName$3.COLLAPSE);
this._element.classList.remove(ClassName$3.SHOW);
var triggerArrayLength = this._triggerArray.length;
if (triggerArrayLength > 0) {
for (var i = 0; i < triggerArrayLength; i++) {
var trigger = this._triggerArray[i];
var selector = Util.getSelectorFromElement(trigger);
var selector = getSelectorFromElement(trigger);
if (selector !== null) {
var $elem = $([].slice.call(document.querySelectorAll(selector)));
var elem = SelectorEngine.findOne(selector);
if (!$elem.hasClass(ClassName$3.SHOW)) {
$(trigger).addClass(ClassName$3.COLLAPSED).attr('aria-expanded', false);
if (!elem.classList.contains(ClassName$3.SHOW)) {
trigger.classList.add(ClassName$3.COLLAPSED);
trigger.setAttribute('aria-expanded', false);
}
}
}
@ -1351,12 +2057,17 @@
var complete = function complete() {
_this2.setTransitioning(false);
$(_this2._element).removeClass(ClassName$3.COLLAPSING).addClass(ClassName$3.COLLAPSE).trigger(Event$3.HIDDEN);
_this2._element.classList.remove(ClassName$3.COLLAPSING);
_this2._element.classList.add(ClassName$3.COLLAPSE);
EventHandler.trigger(_this2._element, Event$4.HIDDEN);
};
this._element.style[dimension] = '';
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
var transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, TRANSITION_END, complete);
emulateTransitionEnd(this._element, transitionDuration);
};
_proto.setTransitioning = function setTransitioning(isTransitioning) {
@ -1364,7 +2075,7 @@
};
_proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY$3);
Data.removeData(this._element, DATA_KEY$3);
this._config = null;
this._parent = null;
this._element = null;
@ -1377,12 +2088,13 @@
config = _objectSpread({}, Default$1, config);
config.toggle = Boolean(config.toggle); // Coerce string values
Util.typeCheckConfig(NAME$3, config, DefaultType$1);
typeCheckConfig(NAME$3, config, DefaultType$1);
return config;
};
_proto._getDimension = function _getDimension() {
var hasWidth = $(this._element).hasClass(Dimension.WIDTH);
var hasWidth = this._element.classList.contains(Dimension.WIDTH);
return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;
};
@ -1391,64 +2103,79 @@
var parent;
if (Util.isElement(this._config.parent)) {
parent = this._config.parent; // It's a jQuery object
if (isElement(this._config.parent)) {
parent = this._config.parent; // it's a jQuery object
if (typeof this._config.parent.jquery !== 'undefined') {
if (typeof this._config.parent.jquery !== 'undefined' || typeof this._config.parent[0] !== 'undefined') {
parent = this._config.parent[0];
}
} else {
parent = document.querySelector(this._config.parent);
parent = SelectorEngine.findOne(this._config.parent);
}
var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]";
var children = [].slice.call(parent.querySelectorAll(selector));
$(children).each(function (i, element) {
makeArray(SelectorEngine.find(selector, parent)).forEach(function (element) {
_this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
});
return parent;
};
_proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
var isOpen = $(element).hasClass(ClassName$3.SHOW);
if (element) {
var isOpen = element.classList.contains(ClassName$3.SHOW);
if (triggerArray.length) {
$(triggerArray).toggleClass(ClassName$3.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
if (triggerArray.length) {
triggerArray.forEach(function (elem) {
if (!isOpen) {
elem.classList.add(ClassName$3.COLLAPSED);
} else {
elem.classList.remove(ClassName$3.COLLAPSED);
}
elem.setAttribute('aria-expanded', isOpen);
});
}
}
} // Static
;
Collapse._getTargetFromElement = function _getTargetFromElement(element) {
var selector = Util.getSelectorFromElement(element);
return selector ? document.querySelector(selector) : null;
var selector = getSelectorFromElement(element);
return selector ? SelectorEngine.findOne(selector) : null;
};
Collapse._collapseInterface = function _collapseInterface(element, config) {
var data = Data.getData(element, DATA_KEY$3);
var _config = _objectSpread({}, Default$1, Manipulator.getDataAttributes(element), typeof config === 'object' && config ? config : {});
if (!data && _config.toggle && /show|hide/.test(config)) {
_config.toggle = false;
}
if (!data) {
data = new Collapse(element, _config);
}
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
throw new Error("No method named \"" + config + "\"");
}
data[config]();
}
};
Collapse._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var $this = $(this);
var data = $this.data(DATA_KEY$3);
var _config = _objectSpread({}, Default$1, $this.data(), typeof config === 'object' && config ? config : {});
if (!data && _config.toggle && /show|hide/.test(config)) {
_config.toggle = false;
}
if (!data) {
data = new Collapse(this, _config);
$this.data(DATA_KEY$3, data);
}
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
throw new TypeError("No method named \"" + config + "\"");
}
data[config]();
}
Collapse._collapseInterface(this, config);
});
};
Collapse._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY$3);
};
_createClass(Collapse, null, [{
key: "VERSION",
get: function get() {
@ -1470,36 +2197,51 @@
*/
$(document).on(Event$3.CLICK_DATA_API, Selector$3.DATA_TOGGLE, function (event) {
EventHandler.on(document, Event$4.CLICK_DATA_API, Selector$3.DATA_TOGGLE, function (event) {
// preventDefault only for <a> elements (which change the URL) not inside the collapsible element
if (event.currentTarget.tagName === 'A') {
if (event.target.tagName === 'A') {
event.preventDefault();
}
var $trigger = $(this);
var selector = Util.getSelectorFromElement(this);
var selectors = [].slice.call(document.querySelectorAll(selector));
$(selectors).each(function () {
var $target = $(this);
var data = $target.data(DATA_KEY$3);
var config = data ? 'toggle' : $trigger.data();
var triggerData = Manipulator.getDataAttributes(this);
var selector = getSelectorFromElement(this);
var selectorElements = makeArray(SelectorEngine.find(selector));
selectorElements.forEach(function (element) {
var data = Data.getData(element, DATA_KEY$3);
var config;
Collapse._jQueryInterface.call($target, config);
if (data) {
// update parent attribute
if (data._parent === null && typeof triggerData.parent === 'string') {
data._config.parent = triggerData.parent;
data._parent = data._getParent();
}
config = 'toggle';
} else {
config = triggerData;
}
Collapse._collapseInterface(element, config);
});
});
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
* add .collapse to jQuery only if jQuery is present
*/
$.fn[NAME$3] = Collapse._jQueryInterface;
$.fn[NAME$3].Constructor = Collapse;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT$3 = jQuery.fn[NAME$3];
jQuery.fn[NAME$3] = Collapse._jQueryInterface;
jQuery.fn[NAME$3].Constructor = Collapse;
$.fn[NAME$3].noConflict = function () {
$.fn[NAME$3] = JQUERY_NO_CONFLICT$3;
return Collapse._jQueryInterface;
};
jQuery.fn[NAME$3].noConflict = function () {
jQuery.fn[NAME$3] = JQUERY_NO_CONFLICT$3;
return Collapse._jQueryInterface;
};
}
/**!
* @fileOverview Kickass library to create and place poppers near their reference elements.
@ -4091,7 +4833,6 @@
var DATA_KEY$4 = 'bs.dropdown';
var EVENT_KEY$4 = "." + DATA_KEY$4;
var DATA_API_KEY$4 = '.data-api';
var JQUERY_NO_CONFLICT$4 = $.fn[NAME$4];
var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key
@ -4105,7 +4846,7 @@
var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)
var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE);
var Event$4 = {
var Event$5 = {
HIDE: "hide" + EVENT_KEY$4,
HIDDEN: "hidden" + EVENT_KEY$4,
SHOW: "show" + EVENT_KEY$4,
@ -4174,6 +4915,8 @@
this._inNavbar = this._detectNavbar();
this._addEventListeners();
Data.setData(element, DATA_KEY$4, this);
} // Getters
@ -4181,13 +4924,13 @@
// Public
_proto.toggle = function toggle() {
if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED)) {
if (this._element.disabled || this._element.classList.contains(ClassName$4.DISABLED)) {
return;
}
var parent = Dropdown._getParentFromElement(this._element);
var isActive = $(this._menu).hasClass(ClassName$4.SHOW);
var isActive = this._menu.classList.contains(ClassName$4.SHOW);
Dropdown._clearMenus();
@ -4198,10 +4941,9 @@
var relatedTarget = {
relatedTarget: this._element
};
var showEvent = $.Event(Event$4.SHOW, relatedTarget);
$(parent).trigger(showEvent);
var showEvent = EventHandler.trigger(parent, Event$5.SHOW, relatedTarget);
if (showEvent.isDefaultPrevented()) {
if (showEvent.defaultPrevented) {
return;
} // Disable totally Popper.js for Dropdown in Navbar
@ -4212,14 +4954,14 @@
* Popper - https://popper.js.org
*/
if (typeof Popper === 'undefined') {
throw new TypeError('Bootstrap\'s dropdowns require Popper.js (https://popper.js.org/)');
throw new TypeError('Bootstrap\'s dropdowns require Popper.js (https://popper.js.org)');
}
var referenceElement = this._element;
if (this._config.reference === 'parent') {
referenceElement = parent;
} else if (Util.isElement(this._config.reference)) {
} else if (isElement(this._config.reference)) {
referenceElement = this._config.reference; // Check if it's jQuery element
if (typeof this._config.reference.jquery !== 'undefined') {
@ -4231,7 +4973,7 @@
if (this._config.boundary !== 'scrollParent') {
$(parent).addClass(ClassName$4.POSITION_STATIC);
parent.classList.add(ClassName$4.POSITION_STATIC);
}
this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig());
@ -4241,65 +4983,66 @@
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
if ('ontouchstart' in document.documentElement && $(parent).closest(Selector$4.NAVBAR_NAV).length === 0) {
$(document.body).children().on('mouseover', null, $.noop);
if ('ontouchstart' in document.documentElement && !makeArray(SelectorEngine.closest(parent, Selector$4.NAVBAR_NAV)).length) {
makeArray(document.body.children).forEach(function (elem) {
return EventHandler.on(elem, 'mouseover', null, noop());
});
}
this._element.focus();
this._element.setAttribute('aria-expanded', true);
$(this._menu).toggleClass(ClassName$4.SHOW);
$(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.SHOWN, relatedTarget));
Manipulator.toggleClass(this._menu, ClassName$4.SHOW);
Manipulator.toggleClass(parent, ClassName$4.SHOW);
EventHandler.trigger(parent, Event$5.SHOWN, relatedTarget);
};
_proto.show = function show() {
if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED) || $(this._menu).hasClass(ClassName$4.SHOW)) {
if (this._element.disabled || this._element.classList.contains(ClassName$4.DISABLED) || this._menu.classList.contains(ClassName$4.SHOW)) {
return;
}
var parent = Dropdown._getParentFromElement(this._element);
var relatedTarget = {
relatedTarget: this._element
};
var showEvent = $.Event(Event$4.SHOW, relatedTarget);
var showEvent = EventHandler.trigger(parent, Event$5.SHOW, relatedTarget);
var parent = Dropdown._getParentFromElement(this._element);
$(parent).trigger(showEvent);
if (showEvent.isDefaultPrevented()) {
if (showEvent.defaultPrevented) {
return;
}
$(this._menu).toggleClass(ClassName$4.SHOW);
$(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.SHOWN, relatedTarget));
Manipulator.toggleClass(this._menu, ClassName$4.SHOW);
Manipulator.toggleClass(parent, ClassName$4.SHOW);
EventHandler.trigger(parent, Event$5.SHOWN, relatedTarget);
};
_proto.hide = function hide() {
if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED) || !$(this._menu).hasClass(ClassName$4.SHOW)) {
if (this._element.disabled || this._element.classList.contains(ClassName$4.DISABLED) || !this._menu.classList.contains(ClassName$4.SHOW)) {
return;
}
var parent = Dropdown._getParentFromElement(this._element);
var relatedTarget = {
relatedTarget: this._element
};
var hideEvent = $.Event(Event$4.HIDE, relatedTarget);
var hideEvent = EventHandler.trigger(parent, Event$5.HIDE, relatedTarget);
var parent = Dropdown._getParentFromElement(this._element);
$(parent).trigger(hideEvent);
if (hideEvent.isDefaultPrevented()) {
if (hideEvent.defaultPrevented) {
return;
}
$(this._menu).toggleClass(ClassName$4.SHOW);
$(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.HIDDEN, relatedTarget));
Manipulator.toggleClass(this._menu, ClassName$4.SHOW);
Manipulator.toggleClass(parent, ClassName$4.SHOW);
EventHandler.trigger(parent, Event$5.HIDDEN, relatedTarget);
};
_proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY$4);
$(this._element).off(EVENT_KEY$4);
Data.removeData(this._element, DATA_KEY$4);
EventHandler.off(this._element, EVENT_KEY$4);
this._element = null;
this._menu = null;
@ -4322,7 +5065,7 @@
_proto._addEventListeners = function _addEventListeners() {
var _this = this;
$(this._element).on(Event$4.CLICK, function (event) {
EventHandler.on(this._element, Event$5.CLICK, function (event) {
event.preventDefault();
event.stopPropagation();
@ -4331,8 +5074,8 @@
};
_proto._getConfig = function _getConfig(config) {
config = _objectSpread({}, this.constructor.Default, $(this._element).data(), config);
Util.typeCheckConfig(NAME$4, config, this.constructor.DefaultType);
config = _objectSpread({}, this.constructor.Default, Manipulator.getDataAttributes(this._element), config);
typeCheckConfig(NAME$4, config, this.constructor.DefaultType);
return config;
};
@ -4341,7 +5084,7 @@
var parent = Dropdown._getParentFromElement(this._element);
if (parent) {
this._menu = parent.querySelector(Selector$4.MENU);
this._menu = SelectorEngine.findOne(Selector$4.MENU, parent);
}
}
@ -4349,20 +5092,20 @@
};
_proto._getPlacement = function _getPlacement() {
var $parentDropdown = $(this._element.parentNode);
var parentDropdown = this._element.parentNode;
var placement = AttachmentMap.BOTTOM; // Handle dropup
if ($parentDropdown.hasClass(ClassName$4.DROPUP)) {
if (parentDropdown.classList.contains(ClassName$4.DROPUP)) {
placement = AttachmentMap.TOP;
if ($(this._menu).hasClass(ClassName$4.MENURIGHT)) {
if (this._menu.classList.contains(ClassName$4.MENURIGHT)) {
placement = AttachmentMap.TOPEND;
}
} else if ($parentDropdown.hasClass(ClassName$4.DROPRIGHT)) {
} else if (parentDropdown.classList.contains(ClassName$4.DROPRIGHT)) {
placement = AttachmentMap.RIGHT;
} else if ($parentDropdown.hasClass(ClassName$4.DROPLEFT)) {
} else if (parentDropdown.classList.contains(ClassName$4.DROPLEFT)) {
placement = AttachmentMap.LEFT;
} else if ($(this._menu).hasClass(ClassName$4.MENURIGHT)) {
} else if (this._menu.classList.contains(ClassName$4.MENURIGHT)) {
placement = AttachmentMap.BOTTOMEND;
}
@ -4370,7 +5113,7 @@
};
_proto._detectNavbar = function _detectNavbar() {
return $(this._element).closest('.navbar').length > 0;
return Boolean(SelectorEngine.closest(this._element, '.navbar'));
};
_proto._getOffset = function _getOffset() {
@ -4415,24 +5158,27 @@
} // Static
;
Dropdown._dropdownInterface = function _dropdownInterface(element, config) {
var data = Data.getData(element, DATA_KEY$4);
var _config = typeof config === 'object' ? config : null;
if (!data) {
data = new Dropdown(element, _config);
}
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
throw new Error("No method named \"" + config + "\"");
}
data[config]();
}
};
Dropdown._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var data = $(this).data(DATA_KEY$4);
var _config = typeof config === 'object' ? config : null;
if (!data) {
data = new Dropdown(this, _config);
$(this).data(DATA_KEY$4, data);
}
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
throw new TypeError("No method named \"" + config + "\"");
}
data[config]();
}
Dropdown._dropdownInterface(this, config);
});
};
@ -4441,12 +5187,12 @@
return;
}
var toggles = [].slice.call(document.querySelectorAll(Selector$4.DATA_TOGGLE));
var toggles = makeArray(SelectorEngine.find(Selector$4.DATA_TOGGLE));
for (var i = 0, len = toggles.length; i < len; i++) {
var parent = Dropdown._getParentFromElement(toggles[i]);
var context = $(toggles[i]).data(DATA_KEY$4);
var context = Data.getData(toggles[i], DATA_KEY$4);
var relatedTarget = {
relatedTarget: toggles[i]
};
@ -4461,44 +5207,45 @@
var dropdownMenu = context._menu;
if (!$(parent).hasClass(ClassName$4.SHOW)) {
if (!parent.classList.contains(ClassName$4.SHOW)) {
continue;
}
if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $.contains(parent, event.target)) {
if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && parent.contains(event.target)) {
continue;
}
var hideEvent = $.Event(Event$4.HIDE, relatedTarget);
$(parent).trigger(hideEvent);
var hideEvent = EventHandler.trigger(parent, Event$5.HIDE, relatedTarget);
if (hideEvent.isDefaultPrevented()) {
if (hideEvent.defaultPrevented) {
continue;
} // If this is a touch-enabled device we remove the extra
// empty mouseover listeners we added for iOS support
if ('ontouchstart' in document.documentElement) {
$(document.body).children().off('mouseover', null, $.noop);
makeArray(document.body.children).forEach(function (elem) {
return EventHandler.off(elem, 'mouseover', null, noop());
});
}
toggles[i].setAttribute('aria-expanded', 'false');
$(dropdownMenu).removeClass(ClassName$4.SHOW);
$(parent).removeClass(ClassName$4.SHOW).trigger($.Event(Event$4.HIDDEN, relatedTarget));
dropdownMenu.classList.remove(ClassName$4.SHOW);
parent.classList.remove(ClassName$4.SHOW);
EventHandler.trigger(parent, Event$5.HIDDEN, relatedTarget);
}
};
Dropdown._getParentFromElement = function _getParentFromElement(element) {
var parent;
var selector = Util.getSelectorFromElement(element);
var selector = getSelectorFromElement(element);
if (selector) {
parent = document.querySelector(selector);
parent = SelectorEngine.findOne(selector);
}
return parent || element.parentNode;
} // eslint-disable-next-line complexity
;
};
Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {
// If not input/textarea:
@ -4508,34 +5255,34 @@
// - If key is other than escape
// - If key is not up or down => not a dropdown command
// - If trigger inside the menu => not a dropdown command
if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $(event.target).closest(Selector$4.MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {
if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || SelectorEngine.closest(event.target, Selector$4.MENU)) : !REGEXP_KEYDOWN.test(event.which)) {
return;
}
event.preventDefault();
event.stopPropagation();
if (this.disabled || $(this).hasClass(ClassName$4.DISABLED)) {
if (this.disabled || this.classList.contains(ClassName$4.DISABLED)) {
return;
}
var parent = Dropdown._getParentFromElement(this);
var isActive = $(parent).hasClass(ClassName$4.SHOW);
var isActive = parent.classList.contains(ClassName$4.SHOW);
if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
if (event.which === ESCAPE_KEYCODE) {
var toggle = parent.querySelector(Selector$4.DATA_TOGGLE);
$(toggle).trigger('focus');
EventHandler.trigger(SelectorEngine.findOne(Selector$4.DATA_TOGGLE, parent), 'focus');
}
$(this).trigger('click');
Dropdown._clearMenus();
return;
}
var items = [].slice.call(parent.querySelectorAll(Selector$4.VISIBLE_ITEMS));
var items = makeArray(SelectorEngine.find(Selector$4.VISIBLE_ITEMS, parent));
if (items.length === 0) {
if (!items.length) {
return;
}
@ -4558,6 +5305,10 @@
items[index].focus();
};
Dropdown._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY$4);
};
_createClass(Dropdown, null, [{
key: "VERSION",
get: function get() {
@ -4584,27 +5335,36 @@
*/
$(document).on(Event$4.KEYDOWN_DATA_API, Selector$4.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event$4.KEYDOWN_DATA_API, Selector$4.MENU, Dropdown._dataApiKeydownHandler).on(Event$4.CLICK_DATA_API + " " + Event$4.KEYUP_DATA_API, Dropdown._clearMenus).on(Event$4.CLICK_DATA_API, Selector$4.DATA_TOGGLE, function (event) {
EventHandler.on(document, Event$5.KEYDOWN_DATA_API, Selector$4.DATA_TOGGLE, Dropdown._dataApiKeydownHandler);
EventHandler.on(document, Event$5.KEYDOWN_DATA_API, Selector$4.MENU, Dropdown._dataApiKeydownHandler);
EventHandler.on(document, Event$5.CLICK_DATA_API, Dropdown._clearMenus);
EventHandler.on(document, Event$5.KEYUP_DATA_API, Dropdown._clearMenus);
EventHandler.on(document, Event$5.CLICK_DATA_API, Selector$4.DATA_TOGGLE, function (event) {
event.preventDefault();
event.stopPropagation();
Dropdown._jQueryInterface.call($(this), 'toggle');
}).on(Event$4.CLICK_DATA_API, Selector$4.FORM_CHILD, function (e) {
e.stopPropagation();
Dropdown._dropdownInterface(this, 'toggle');
});
EventHandler.on(document, Event$5.CLICK_DATA_API, Selector$4.FORM_CHILD, function (e) {
return e.stopPropagation();
});
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
* add .dropdown to jQuery only if jQuery is present
*/
$.fn[NAME$4] = Dropdown._jQueryInterface;
$.fn[NAME$4].Constructor = Dropdown;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT$4 = jQuery.fn[NAME$4];
jQuery.fn[NAME$4] = Dropdown._jQueryInterface;
jQuery.fn[NAME$4].Constructor = Dropdown;
$.fn[NAME$4].noConflict = function () {
$.fn[NAME$4] = JQUERY_NO_CONFLICT$4;
return Dropdown._jQueryInterface;
};
jQuery.fn[NAME$4].noConflict = function () {
jQuery.fn[NAME$4] = JQUERY_NO_CONFLICT$4;
return Dropdown._jQueryInterface;
};
}
/**
* ------------------------------------------------------------------------
@ -4617,7 +5377,6 @@
var DATA_KEY$5 = 'bs.modal';
var EVENT_KEY$5 = "." + DATA_KEY$5;
var DATA_API_KEY$5 = '.data-api';
var JQUERY_NO_CONFLICT$5 = $.fn[NAME$5];
var ESCAPE_KEYCODE$1 = 27; // KeyboardEvent.which value for Escape (Esc) key
var Default$3 = {
@ -4632,7 +5391,7 @@
focus: 'boolean',
show: 'boolean'
};
var Event$5 = {
var Event$6 = {
HIDE: "hide" + EVENT_KEY$5,
HIDDEN: "hidden" + EVENT_KEY$5,
SHOW: "show" + EVENT_KEY$5,
@ -4674,13 +5433,14 @@
function Modal(element, config) {
this._config = this._getConfig(config);
this._element = element;
this._dialog = element.querySelector(Selector$5.DIALOG);
this._dialog = SelectorEngine.findOne(Selector$5.DIALOG, element);
this._backdrop = null;
this._isShown = false;
this._isBodyOverflowing = false;
this._ignoreBackdropClick = false;
this._isTransitioning = false;
this._scrollbarWidth = 0;
Data.setData(element, DATA_KEY$5, this);
} // Getters
@ -4698,16 +5458,15 @@
return;
}
if ($(this._element).hasClass(ClassName$5.FADE)) {
if (this._element.classList.contains(ClassName$5.FADE)) {
this._isTransitioning = true;
}
var showEvent = $.Event(Event$5.SHOW, {
var showEvent = EventHandler.trigger(this._element, Event$6.SHOW, {
relatedTarget: relatedTarget
});
$(this._element).trigger(showEvent);
if (this._isShown || showEvent.isDefaultPrevented()) {
if (this._isShown || showEvent.defaultPrevented) {
return;
}
@ -4723,12 +5482,12 @@
this._setResizeEvent();
$(this._element).on(Event$5.CLICK_DISMISS, Selector$5.DATA_DISMISS, function (event) {
EventHandler.on(this._element, Event$6.CLICK_DISMISS, Selector$5.DATA_DISMISS, function (event) {
return _this.hide(event);
});
$(this._dialog).on(Event$5.MOUSEDOWN_DISMISS, function () {
$(_this._element).one(Event$5.MOUSEUP_DISMISS, function (event) {
if ($(event.target).is(_this._element)) {
EventHandler.on(this._dialog, Event$6.MOUSEDOWN_DISMISS, function () {
EventHandler.one(_this._element, Event$6.MOUSEUP_DISMISS, function (event) {
if (event.target === _this._element) {
_this._ignoreBackdropClick = true;
}
});
@ -4750,15 +5509,15 @@
return;
}
var hideEvent = $.Event(Event$5.HIDE);
$(this._element).trigger(hideEvent);
var hideEvent = EventHandler.trigger(this._element, Event$6.HIDE);
if (!this._isShown || hideEvent.isDefaultPrevented()) {
if (!this._isShown || hideEvent.defaultPrevented) {
return;
}
this._isShown = false;
var transition = $(this._element).hasClass(ClassName$5.FADE);
var transition = this._element.classList.contains(ClassName$5.FADE);
if (transition) {
this._isTransitioning = true;
@ -4768,16 +5527,19 @@
this._setResizeEvent();
$(document).off(Event$5.FOCUSIN);
$(this._element).removeClass(ClassName$5.SHOW);
$(this._element).off(Event$5.CLICK_DISMISS);
$(this._dialog).off(Event$5.MOUSEDOWN_DISMISS);
EventHandler.off(document, Event$6.FOCUSIN);
this._element.classList.remove(ClassName$5.SHOW);
EventHandler.off(this._element, Event$6.CLICK_DISMISS);
EventHandler.off(this._dialog, Event$6.MOUSEDOWN_DISMISS);
if (transition) {
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
$(this._element).one(Util.TRANSITION_END, function (event) {
var transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, TRANSITION_END, function (event) {
return _this2._hideModal(event);
}).emulateTransitionEnd(transitionDuration);
});
emulateTransitionEnd(this._element, transitionDuration);
} else {
this._hideModal();
}
@ -4785,7 +5547,7 @@
_proto.dispose = function dispose() {
[window, this._element, this._dialog].forEach(function (htmlElement) {
return $(htmlElement).off(EVENT_KEY$5);
return EventHandler.off(htmlElement, EVENT_KEY$5);
});
/**
* `document` has 2 events `Event.FOCUSIN` and `Event.CLICK_DATA_API`
@ -4793,8 +5555,8 @@
* It will remove `Event.CLICK_DATA_API` event that should remain
*/
$(document).off(Event$5.FOCUSIN);
$.removeData(this._element, DATA_KEY$5);
EventHandler.off(document, Event$6.FOCUSIN);
Data.removeData(this._element, DATA_KEY$5);
this._config = null;
this._element = null;
this._dialog = null;
@ -4813,14 +5575,14 @@
_proto._getConfig = function _getConfig(config) {
config = _objectSpread({}, Default$3, config);
Util.typeCheckConfig(NAME$5, config, DefaultType$3);
typeCheckConfig(NAME$5, config, DefaultType$3);
return config;
};
_proto._showElement = function _showElement(relatedTarget) {
var _this3 = this;
var transition = $(this._element).hasClass(ClassName$5.FADE);
var transition = this._element.classList.contains(ClassName$5.FADE);
if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
// Don't move modal's DOM position
@ -4833,38 +5595,37 @@
this._element.setAttribute('aria-modal', true);
if ($(this._dialog).hasClass(ClassName$5.SCROLLABLE)) {
this._dialog.querySelector(Selector$5.MODAL_BODY).scrollTop = 0;
if (this._dialog.classList.contains(ClassName$5.SCROLLABLE)) {
SelectorEngine.findOne(Selector$5.MODAL_BODY, this._dialog).scrollTop = 0;
} else {
this._element.scrollTop = 0;
}
if (transition) {
Util.reflow(this._element);
reflow(this._element);
}
$(this._element).addClass(ClassName$5.SHOW);
this._element.classList.add(ClassName$5.SHOW);
if (this._config.focus) {
this._enforceFocus();
}
var shownEvent = $.Event(Event$5.SHOWN, {
relatedTarget: relatedTarget
});
var transitionComplete = function transitionComplete() {
if (_this3._config.focus) {
_this3._element.focus();
}
_this3._isTransitioning = false;
$(_this3._element).trigger(shownEvent);
EventHandler.trigger(_this3._element, Event$6.SHOWN, {
relatedTarget: relatedTarget
});
};
if (transition) {
var transitionDuration = Util.getTransitionDurationFromElement(this._dialog);
$(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration);
var transitionDuration = getTransitionDurationFromElement(this._dialog);
EventHandler.one(this._dialog, TRANSITION_END, transitionComplete);
emulateTransitionEnd(this._dialog, transitionDuration);
} else {
transitionComplete();
}
@ -4873,9 +5634,10 @@
_proto._enforceFocus = function _enforceFocus() {
var _this4 = this;
$(document).off(Event$5.FOCUSIN) // Guard against infinite focus loop
.on(Event$5.FOCUSIN, function (event) {
if (document !== event.target && _this4._element !== event.target && $(_this4._element).has(event.target).length === 0) {
EventHandler.off(document, Event$6.FOCUSIN); // guard against infinite focus loop
EventHandler.on(document, Event$6.FOCUSIN, function (event) {
if (document !== event.target && _this4._element !== event.target && !_this4._element.contains(event.target)) {
_this4._element.focus();
}
});
@ -4885,7 +5647,7 @@
var _this5 = this;
if (this._isShown && this._config.keyboard) {
$(this._element).on(Event$5.KEYDOWN_DISMISS, function (event) {
EventHandler.on(this._element, Event$6.KEYDOWN_DISMISS, function (event) {
if (event.which === ESCAPE_KEYCODE$1) {
event.preventDefault();
@ -4893,7 +5655,7 @@
}
});
} else if (!this._isShown) {
$(this._element).off(Event$5.KEYDOWN_DISMISS);
EventHandler.off(this._element, Event$6.KEYDOWN_DISMISS);
}
};
@ -4901,11 +5663,11 @@
var _this6 = this;
if (this._isShown) {
$(window).on(Event$5.RESIZE, function (event) {
EventHandler.on(window, Event$6.RESIZE, function (event) {
return _this6.handleUpdate(event);
});
} else {
$(window).off(Event$5.RESIZE);
EventHandler.off(window, Event$6.RESIZE);
}
};
@ -4921,19 +5683,20 @@
this._isTransitioning = false;
this._showBackdrop(function () {
$(document.body).removeClass(ClassName$5.OPEN);
document.body.classList.remove(ClassName$5.OPEN);
_this7._resetAdjustments();
_this7._resetScrollbar();
$(_this7._element).trigger(Event$5.HIDDEN);
EventHandler.trigger(_this7._element, Event$6.HIDDEN);
});
};
_proto._removeBackdrop = function _removeBackdrop() {
if (this._backdrop) {
$(this._backdrop).remove();
this._backdrop.parentNode.removeChild(this._backdrop);
this._backdrop = null;
}
};
@ -4941,7 +5704,7 @@
_proto._showBackdrop = function _showBackdrop(callback) {
var _this8 = this;
var animate = $(this._element).hasClass(ClassName$5.FADE) ? ClassName$5.FADE : '';
var animate = this._element.classList.contains(ClassName$5.FADE) ? ClassName$5.FADE : '';
if (this._isShown && this._config.backdrop) {
this._backdrop = document.createElement('div');
@ -4951,8 +5714,8 @@
this._backdrop.classList.add(animate);
}
$(this._backdrop).appendTo(document.body);
$(this._element).on(Event$5.CLICK_DISMISS, function (event) {
document.body.appendChild(this._backdrop);
EventHandler.on(this._element, Event$6.CLICK_DISMISS, function (event) {
if (_this8._ignoreBackdropClick) {
_this8._ignoreBackdropClick = false;
return;
@ -4970,10 +5733,10 @@
});
if (animate) {
Util.reflow(this._backdrop);
reflow(this._backdrop);
}
$(this._backdrop).addClass(ClassName$5.SHOW);
this._backdrop.classList.add(ClassName$5.SHOW);
if (!callback) {
return;
@ -4984,10 +5747,11 @@
return;
}
var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
$(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration);
var backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);
EventHandler.one(this._backdrop, TRANSITION_END, callback);
emulateTransitionEnd(this._backdrop, backdropTransitionDuration);
} else if (!this._isShown && this._backdrop) {
$(this._backdrop).removeClass(ClassName$5.SHOW);
this._backdrop.classList.remove(ClassName$5.SHOW);
var callbackRemove = function callbackRemove() {
_this8._removeBackdrop();
@ -4997,10 +5761,11 @@
}
};
if ($(this._element).hasClass(ClassName$5.FADE)) {
var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
if (this._element.classList.contains(ClassName$5.FADE)) {
var _backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);
$(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration);
EventHandler.one(this._backdrop, TRANSITION_END, callbackRemove);
emulateTransitionEnd(this._backdrop, _backdropTransitionDuration);
} else {
callbackRemove();
}
@ -5042,50 +5807,58 @@
if (this._isBodyOverflowing) {
// Note: DOMNode.style.paddingRight returns the actual value or '' if not set
// while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
var fixedContent = [].slice.call(document.querySelectorAll(Selector$5.FIXED_CONTENT));
var stickyContent = [].slice.call(document.querySelectorAll(Selector$5.STICKY_CONTENT)); // Adjust fixed content padding
$(fixedContent).each(function (index, element) {
// Adjust fixed content padding
makeArray(SelectorEngine.find(Selector$5.FIXED_CONTENT)).forEach(function (element) {
var actualPadding = element.style.paddingRight;
var calculatedPadding = $(element).css('padding-right');
$(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this9._scrollbarWidth + "px");
var calculatedPadding = window.getComputedStyle(element)['padding-right'];
Manipulator.setDataAttribute(element, 'padding-right', actualPadding);
element.style.paddingRight = parseFloat(calculatedPadding) + _this9._scrollbarWidth + "px";
}); // Adjust sticky content margin
$(stickyContent).each(function (index, element) {
makeArray(SelectorEngine.find(Selector$5.STICKY_CONTENT)).forEach(function (element) {
var actualMargin = element.style.marginRight;
var calculatedMargin = $(element).css('margin-right');
$(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px");
var calculatedMargin = window.getComputedStyle(element)['margin-right'];
Manipulator.setDataAttribute(element, 'margin-right', actualMargin);
element.style.marginRight = parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px";
}); // Adjust body padding
var actualPadding = document.body.style.paddingRight;
var calculatedPadding = $(document.body).css('padding-right');
$(document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px");
var calculatedPadding = window.getComputedStyle(document.body)['padding-right'];
Manipulator.setDataAttribute(document.body, 'padding-right', actualPadding);
document.body.style.paddingRight = parseFloat(calculatedPadding) + this._scrollbarWidth + "px";
}
$(document.body).addClass(ClassName$5.OPEN);
document.body.classList.add(ClassName$5.OPEN);
};
_proto._resetScrollbar = function _resetScrollbar() {
// Restore fixed content padding
var fixedContent = [].slice.call(document.querySelectorAll(Selector$5.FIXED_CONTENT));
$(fixedContent).each(function (index, element) {
var padding = $(element).data('padding-right');
$(element).removeData('padding-right');
element.style.paddingRight = padding ? padding : '';
}); // Restore sticky content
makeArray(SelectorEngine.find(Selector$5.FIXED_CONTENT)).forEach(function (element) {
var padding = Manipulator.getDataAttribute(element, 'padding-right');
var elements = [].slice.call(document.querySelectorAll("" + Selector$5.STICKY_CONTENT));
$(elements).each(function (index, element) {
var margin = $(element).data('margin-right');
if (typeof padding !== 'undefined') {
Manipulator.removeDataAttribute(element, 'padding-right');
element.style.paddingRight = padding;
}
}); // Restore sticky content and navbar-toggler margin
makeArray(SelectorEngine.find("" + Selector$5.STICKY_CONTENT)).forEach(function (element) {
var margin = Manipulator.getDataAttribute(element, 'margin-right');
if (typeof margin !== 'undefined') {
$(element).css('margin-right', margin).removeData('margin-right');
Manipulator.removeDataAttribute(element, 'margin-right');
element.style.marginRight = margin;
}
}); // Restore body padding
var padding = $(document.body).data('padding-right');
$(document.body).removeData('padding-right');
document.body.style.paddingRight = padding ? padding : '';
var padding = Manipulator.getDataAttribute(document.body, 'padding-right');
if (typeof padding !== 'undefined') {
Manipulator.removeDataAttribute(document.body, 'padding-right');
document.body.style.paddingRight = padding;
} else {
document.body.style.paddingRight = '';
}
};
_proto._getScrollbarWidth = function _getScrollbarWidth() {
@ -5101,13 +5874,12 @@
Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
return this.each(function () {
var data = $(this).data(DATA_KEY$5);
var data = Data.getData(this, DATA_KEY$5);
var _config = _objectSpread({}, Default$3, $(this).data(), typeof config === 'object' && config ? config : {});
var _config = _objectSpread({}, Default$3, Manipulator.getDataAttributes(this), typeof config === 'object' && config ? config : {});
if (!data) {
data = new Modal(this, _config);
$(this).data(DATA_KEY$5, data);
}
if (typeof config === 'string') {
@ -5122,6 +5894,10 @@
});
};
Modal._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY$5);
};
_createClass(Modal, null, [{
key: "VERSION",
get: function get() {
@ -5143,36 +5919,41 @@
*/
$(document).on(Event$5.CLICK_DATA_API, Selector$5.DATA_TOGGLE, function (event) {
EventHandler.on(document, Event$6.CLICK_DATA_API, Selector$5.DATA_TOGGLE, function (event) {
var _this10 = this;
var target;
var selector = Util.getSelectorFromElement(this);
var selector = getSelectorFromElement(this);
if (selector) {
target = document.querySelector(selector);
target = SelectorEngine.findOne(selector);
}
var config = $(target).data(DATA_KEY$5) ? 'toggle' : _objectSpread({}, $(target).data(), $(this).data());
var config = Data.getData(target, DATA_KEY$5) ? 'toggle' : _objectSpread({}, Manipulator.getDataAttributes(target), Manipulator.getDataAttributes(this));
if (this.tagName === 'A' || this.tagName === 'AREA') {
event.preventDefault();
}
var $target = $(target).one(Event$5.SHOW, function (showEvent) {
if (showEvent.isDefaultPrevented()) {
// Only register focus restorer if modal will actually get shown
EventHandler.one(target, Event$6.SHOW, function (showEvent) {
if (showEvent.defaultPrevented) {
// only register focus restorer if modal will actually get shown
return;
}
$target.one(Event$5.HIDDEN, function () {
if ($(_this10).is(':visible')) {
EventHandler.one(target, Event$6.HIDDEN, function () {
if (isVisible(_this10)) {
_this10.focus();
}
});
});
var data = Data.getData(target, DATA_KEY$5);
Modal._jQueryInterface.call($(target), config, this);
if (!data) {
data = new Modal(target, config);
}
data.show(this);
});
/**
* ------------------------------------------------------------------------
@ -5180,22 +5961,64 @@
* ------------------------------------------------------------------------
*/
$.fn[NAME$5] = Modal._jQueryInterface;
$.fn[NAME$5].Constructor = Modal;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT$5 = jQuery.fn[NAME$5];
jQuery.fn[NAME$5] = Modal._jQueryInterface;
jQuery.fn[NAME$5].Constructor = Modal;
$.fn[NAME$5].noConflict = function () {
$.fn[NAME$5] = JQUERY_NO_CONFLICT$5;
return Modal._jQueryInterface;
};
jQuery.fn[NAME$5].noConflict = function () {
jQuery.fn[NAME$5] = JQUERY_NO_CONFLICT$5;
return Modal._jQueryInterface;
};
}
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): tools/sanitizer.js
* Bootstrap (v4.3.1): util/sanitizer.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href'];
var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
/**
* A pattern that recognizes a commonly useful subset of URLs that are safe.
*
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
*/
var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;
/**
* A pattern that matches safe data URLs. Only matches image, video and audio types.
*
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
*/
var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;
var allowedAttribute = function allowedAttribute(attr, allowedAttributeList) {
var attrName = attr.nodeName.toLowerCase();
if (allowedAttributeList.indexOf(attrName) !== -1) {
if (uriAttrs.indexOf(attrName) !== -1) {
return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN));
}
return true;
}
var regExp = allowedAttributeList.filter(function (attrRegex) {
return attrRegex instanceof RegExp;
}); // Check if a regular expression validates the attribute.
for (var i = 0, l = regExp.length; i < l; i++) {
if (attrName.match(regExp[i])) {
return true;
}
}
return false;
};
var DefaultWhitelist = {
// Global attributes allowed on any supplied element below.
'*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
@ -5228,48 +6051,9 @@
strong: [],
u: [],
ul: []
/**
* A pattern that recognizes a commonly useful subset of URLs that are safe.
*
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
*/
};
var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;
/**
* A pattern that matches safe data URLs. Only matches image, video and audio types.
*
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
*/
var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;
function allowedAttribute(attr, allowedAttributeList) {
var attrName = attr.nodeName.toLowerCase();
if (allowedAttributeList.indexOf(attrName) !== -1) {
if (uriAttrs.indexOf(attrName) !== -1) {
return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN));
}
return true;
}
var regExp = allowedAttributeList.filter(function (attrRegex) {
return attrRegex instanceof RegExp;
}); // Check if a regular expression validates the attribute.
for (var i = 0, l = regExp.length; i < l; i++) {
if (attrName.match(regExp[i])) {
return true;
}
}
return false;
}
function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
if (unsafeHtml.length === 0) {
if (!unsafeHtml.length) {
return unsafeHtml;
}
@ -5280,18 +6064,18 @@
var domParser = new window.DOMParser();
var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
var whitelistKeys = Object.keys(whiteList);
var elements = [].slice.call(createdDocument.body.querySelectorAll('*'));
var elements = makeArray(createdDocument.body.querySelectorAll('*'));
var _loop = function _loop(i, len) {
var el = elements[i];
var elName = el.nodeName.toLowerCase();
if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {
if (whitelistKeys.indexOf(elName) === -1) {
el.parentNode.removeChild(el);
return "continue";
}
var attributeList = [].slice.call(el.attributes);
var attributeList = makeArray(el.attributes);
var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
attributeList.forEach(function (attr) {
if (!allowedAttribute(attr, whitelistedAttributes)) {
@ -5319,7 +6103,6 @@
var VERSION$6 = '4.3.1';
var DATA_KEY$6 = 'bs.tooltip';
var EVENT_KEY$6 = "." + DATA_KEY$6;
var JQUERY_NO_CONFLICT$6 = $.fn[NAME$6];
var CLASS_PREFIX = 'bs-tooltip';
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];
@ -5349,7 +6132,7 @@
};
var Default$4 = {
animation: true,
template: '<div class="tooltip" role="tooltip">' + '<div class="arrow"></div>' + '<div class="tooltip-inner"></div></div>',
template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div></div>',
trigger: 'hover focus',
title: '',
delay: 0,
@ -5368,7 +6151,7 @@
SHOW: 'show',
OUT: 'out'
};
var Event$6 = {
var Event$7 = {
HIDE: "hide" + EVENT_KEY$6,
HIDDEN: "hidden" + EVENT_KEY$6,
SHOW: "show" + EVENT_KEY$6,
@ -5387,7 +6170,7 @@
var Selector$6 = {
TOOLTIP: '.tooltip',
TOOLTIP_INNER: '.tooltip-inner',
ARROW: '.arrow'
TOOLTIP_ARROW: '.tooltip-arrow'
};
var Trigger = {
HOVER: 'hover',
@ -5411,7 +6194,7 @@
* Popper - https://popper.js.org
*/
if (typeof Popper === 'undefined') {
throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org/)');
throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org)');
} // private
@ -5426,6 +6209,8 @@
this.tip = null;
this._setListeners();
Data.setData(element, this.constructor.DATA_KEY, this);
} // Getters
@ -5451,11 +6236,11 @@
if (event) {
var dataKey = this.constructor.DATA_KEY;
var context = $(event.currentTarget).data(dataKey);
var context = Data.getData(event.delegateTarget, dataKey);
if (!context) {
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
$(event.currentTarget).data(dataKey, context);
context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
Data.setData(event.delegateTarget, dataKey, context);
}
context._activeTrigger.click = !context._activeTrigger.click;
@ -5466,7 +6251,7 @@
context._leave(null, context);
}
} else {
if ($(this.getTipElement()).hasClass(ClassName$6.SHOW)) {
if (this.getTipElement().classList.contains(ClassName$6.SHOW)) {
this._leave(null, this);
return;
@ -5478,12 +6263,12 @@
_proto.dispose = function dispose() {
clearTimeout(this._timeout);
$.removeData(this.element, this.constructor.DATA_KEY);
$(this.element).off(this.constructor.EVENT_KEY);
$(this.element).closest('.modal').off('hide.bs.modal');
Data.removeData(this.element, this.constructor.DATA_KEY);
EventHandler.off(this.element, this.constructor.EVENT_KEY);
EventHandler.off(SelectorEngine.closest(this.element, '.modal'), 'hide.bs.modal');
if (this.tip) {
$(this.tip).remove();
this.tip.parentNode.removeChild(this.tip);
}
this._isEnabled = null;
@ -5504,29 +6289,27 @@
_proto.show = function show() {
var _this = this;
if ($(this.element).css('display') === 'none') {
if (this.element.style.display === 'none') {
throw new Error('Please use show on visible elements');
}
var showEvent = $.Event(this.constructor.Event.SHOW);
if (this.isWithContent() && this._isEnabled) {
$(this.element).trigger(showEvent);
var shadowRoot = Util.findShadowRoot(this.element);
var isInTheDom = $.contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element);
var showEvent = EventHandler.trigger(this.element, this.constructor.Event.SHOW);
var shadowRoot = findShadowRoot(this.element);
var isInTheDom = shadowRoot !== null ? shadowRoot.contains(this.element) : this.element.ownerDocument.documentElement.contains(this.element);
if (showEvent.isDefaultPrevented() || !isInTheDom) {
if (showEvent.defaultPrevented || !isInTheDom) {
return;
}
var tip = this.getTipElement();
var tipId = Util.getUID(this.constructor.NAME);
var tipId = getUID(this.constructor.NAME);
tip.setAttribute('id', tipId);
this.element.setAttribute('aria-describedby', tipId);
this.setContent();
if (this.config.animation) {
$(tip).addClass(ClassName$6.FADE);
tip.classList.add(ClassName$6.FADE);
}
var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
@ -5537,13 +6320,13 @@
var container = this._getContainer();
$(tip).data(this.constructor.DATA_KEY, this);
Data.setData(tip, this.constructor.DATA_KEY, this);
if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {
$(tip).appendTo(container);
if (!this.element.ownerDocument.documentElement.contains(this.tip)) {
container.appendChild(tip);
}
$(this.element).trigger(this.constructor.Event.INSERTED);
EventHandler.trigger(this.element, this.constructor.Event.INSERTED);
this._popper = new Popper(this.element, tip, {
placement: attachment,
modifiers: {
@ -5552,7 +6335,7 @@
behavior: this.config.fallbackPlacement
},
arrow: {
element: Selector$6.ARROW
element: Selector$6.TOOLTIP_ARROW
},
preventOverflow: {
boundariesElement: this.config.boundary
@ -5567,13 +6350,15 @@
return _this._handlePopperPlacementChange(data);
}
});
$(tip).addClass(ClassName$6.SHOW); // If this is a touch-enabled device we add extra
tip.classList.add(ClassName$6.SHOW); // If this is a touch-enabled device we add extra
// empty mouseover listeners to the body's immediate children;
// only needed because of broken event delegation on iOS
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
if ('ontouchstart' in document.documentElement) {
$(document.body).children().on('mouseover', null, $.noop);
makeArray(document.body.children).forEach(function (element) {
EventHandler.on(element, 'mouseover', noop());
});
}
var complete = function complete() {
@ -5583,16 +6368,17 @@
var prevHoverState = _this._hoverState;
_this._hoverState = null;
$(_this.element).trigger(_this.constructor.Event.SHOWN);
EventHandler.trigger(_this.element, _this.constructor.Event.SHOWN);
if (prevHoverState === HoverState.OUT) {
_this._leave(null, _this);
}
};
if ($(this.tip).hasClass(ClassName$6.FADE)) {
var transitionDuration = Util.getTransitionDurationFromElement(this.tip);
$(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
if (this.tip.classList.contains(ClassName$6.FADE)) {
var transitionDuration = getTransitionDurationFromElement(this.tip);
EventHandler.one(this.tip, TRANSITION_END, complete);
emulateTransitionEnd(this.tip, transitionDuration);
} else {
complete();
}
@ -5603,7 +6389,6 @@
var _this2 = this;
var tip = this.getTipElement();
var hideEvent = $.Event(this.constructor.Event.HIDE);
var complete = function complete() {
if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) {
@ -5614,7 +6399,7 @@
_this2.element.removeAttribute('aria-describedby');
$(_this2.element).trigger(_this2.constructor.Event.HIDDEN);
EventHandler.trigger(_this2.element, _this2.constructor.Event.HIDDEN);
if (_this2._popper !== null) {
_this2._popper.destroy();
@ -5625,26 +6410,29 @@
}
};
$(this.element).trigger(hideEvent);
var hideEvent = EventHandler.trigger(this.element, this.constructor.Event.HIDE);
if (hideEvent.isDefaultPrevented()) {
if (hideEvent.defaultPrevented) {
return;
}
$(tip).removeClass(ClassName$6.SHOW); // If this is a touch-enabled device we remove the extra
tip.classList.remove(ClassName$6.SHOW); // If this is a touch-enabled device we remove the extra
// empty mouseover listeners we added for iOS support
if ('ontouchstart' in document.documentElement) {
$(document.body).children().off('mouseover', null, $.noop);
makeArray(document.body.children).forEach(function (element) {
return EventHandler.off(element, 'mouseover', noop);
});
}
this._activeTrigger[Trigger.CLICK] = false;
this._activeTrigger[Trigger.FOCUS] = false;
this._activeTrigger[Trigger.HOVER] = false;
if ($(this.tip).hasClass(ClassName$6.FADE)) {
var transitionDuration = Util.getTransitionDurationFromElement(tip);
$(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
if (this.tip.classList.contains(ClassName$6.FADE)) {
var transitionDuration = getTransitionDurationFromElement(tip);
EventHandler.one(tip, TRANSITION_END, complete);
emulateTransitionEnd(tip, transitionDuration);
} else {
complete();
}
@ -5664,29 +6452,45 @@
};
_proto.addAttachmentClass = function addAttachmentClass(attachment) {
$(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
this.getTipElement().classList.add(CLASS_PREFIX + "-" + attachment);
};
_proto.getTipElement = function getTipElement() {
this.tip = this.tip || $(this.config.template)[0];
if (this.tip) {
return this.tip;
}
var element = document.createElement('div');
element.innerHTML = this.config.template;
this.tip = element.children[0];
return this.tip;
};
_proto.setContent = function setContent() {
var tip = this.getTipElement();
this.setElementContent($(tip.querySelectorAll(Selector$6.TOOLTIP_INNER)), this.getTitle());
$(tip).removeClass(ClassName$6.FADE + " " + ClassName$6.SHOW);
this.setElementContent(SelectorEngine.findOne(Selector$6.TOOLTIP_INNER, tip), this.getTitle());
tip.classList.remove(ClassName$6.FADE);
tip.classList.remove(ClassName$6.SHOW);
};
_proto.setElementContent = function setElementContent($element, content) {
_proto.setElementContent = function setElementContent(element, content) {
if (element === null) {
return;
}
if (typeof content === 'object' && (content.nodeType || content.jquery)) {
// Content is a DOM node or a jQuery
if (content.jquery) {
content = content[0];
} // content is a DOM node or a jQuery
if (this.config.html) {
if (!$(content).parent().is($element)) {
$element.empty().append(content);
if (content.parentNode !== element) {
element.innerHTML = '';
element.appendChild(content);
}
} else {
$element.text($(content).text());
element.innerText = content.textContent;
}
return;
@ -5697,9 +6501,9 @@
content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn);
}
$element.html(content);
element.innerHTML = content;
} else {
$element.text(content);
element.innerText = content;
}
};
@ -5736,11 +6540,11 @@
return document.body;
}
if (Util.isElement(this.config.container)) {
return $(this.config.container);
if (isElement(this.config.container)) {
return this.config.container;
}
return $(document).find(this.config.container);
return SelectorEngine.findOne(this.config.container);
};
_proto._getAttachment = function _getAttachment(placement) {
@ -5753,20 +6557,21 @@
var triggers = this.config.trigger.split(' ');
triggers.forEach(function (trigger) {
if (trigger === 'click') {
$(_this4.element).on(_this4.constructor.Event.CLICK, _this4.config.selector, function (event) {
EventHandler.on(_this4.element, _this4.constructor.Event.CLICK, _this4.config.selector, function (event) {
return _this4.toggle(event);
});
} else if (trigger !== Trigger.MANUAL) {
var eventIn = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSEENTER : _this4.constructor.Event.FOCUSIN;
var eventOut = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSELEAVE : _this4.constructor.Event.FOCUSOUT;
$(_this4.element).on(eventIn, _this4.config.selector, function (event) {
EventHandler.on(_this4.element, eventIn, _this4.config.selector, function (event) {
return _this4._enter(event);
}).on(eventOut, _this4.config.selector, function (event) {
});
EventHandler.on(_this4.element, eventOut, _this4.config.selector, function (event) {
return _this4._leave(event);
});
}
});
$(this.element).closest('.modal').on('hide.bs.modal', function () {
EventHandler.on(SelectorEngine.closest(this.element, '.modal'), 'hide.bs.modal', function () {
if (_this4.element) {
_this4.hide();
}
@ -5793,18 +6598,18 @@
_proto._enter = function _enter(event, context) {
var dataKey = this.constructor.DATA_KEY;
context = context || $(event.currentTarget).data(dataKey);
context = context || Data.getData(event.delegateTarget, dataKey);
if (!context) {
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
$(event.currentTarget).data(dataKey, context);
context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
Data.setData(event.delegateTarget, dataKey, context);
}
if (event) {
context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
}
if ($(context.getTipElement()).hasClass(ClassName$6.SHOW) || context._hoverState === HoverState.SHOW) {
if (context.getTipElement().classList.contains(ClassName$6.SHOW) || context._hoverState === HoverState.SHOW) {
context._hoverState = HoverState.SHOW;
return;
}
@ -5826,11 +6631,11 @@
_proto._leave = function _leave(event, context) {
var dataKey = this.constructor.DATA_KEY;
context = context || $(event.currentTarget).data(dataKey);
context = context || Data.getData(event.delegateTarget, dataKey);
if (!context) {
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
$(event.currentTarget).data(dataKey, context);
context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
Data.setData(event.delegateTarget, dataKey, context);
}
if (event) {
@ -5867,12 +6672,17 @@
};
_proto._getConfig = function _getConfig(config) {
var dataAttributes = $(this.element).data();
var dataAttributes = Manipulator.getDataAttributes(this.element);
Object.keys(dataAttributes).forEach(function (dataAttr) {
if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {
delete dataAttributes[dataAttr];
}
});
if (config && typeof config.container === 'object' && config.container.jquery) {
config.container = config.container[0];
}
config = _objectSpread({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
if (typeof config.delay === 'number') {
@ -5890,7 +6700,7 @@
config.content = config.content.toString();
}
Util.typeCheckConfig(NAME$6, config, this.constructor.DefaultType);
typeCheckConfig(NAME$6, config, this.constructor.DefaultType);
if (config.sanitize) {
config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn);
@ -5914,11 +6724,15 @@
};
_proto._cleanTipClass = function _cleanTipClass() {
var $tip = $(this.getTipElement());
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
var tip = this.getTipElement();
var tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);
if (tabClass !== null && tabClass.length) {
$tip.removeClass(tabClass.join(''));
tabClass.map(function (token) {
return token.trim();
}).forEach(function (tClass) {
return tip.classList.remove(tClass);
});
}
};
@ -5939,7 +6753,7 @@
return;
}
$(tip).removeClass(ClassName$6.FADE);
tip.classList.remove(ClassName$6.FADE);
this.config.animation = false;
this.hide();
this.show();
@ -5949,7 +6763,7 @@
Tooltip._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var data = $(this).data(DATA_KEY$6);
var data = Data.getData(this, DATA_KEY$6);
var _config = typeof config === 'object' && config;
@ -5959,7 +6773,6 @@
if (!data) {
data = new Tooltip(this, _config);
$(this).data(DATA_KEY$6, data);
}
if (typeof config === 'string') {
@ -5972,6 +6785,10 @@
});
};
Tooltip._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY$6);
};
_createClass(Tooltip, null, [{
key: "VERSION",
get: function get() {
@ -5995,7 +6812,7 @@
}, {
key: "Event",
get: function get() {
return Event$6;
return Event$7;
}
}, {
key: "EVENT_KEY",
@ -6015,16 +6832,20 @@
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
* add .tooltip to jQuery only if jQuery is present
*/
$.fn[NAME$6] = Tooltip._jQueryInterface;
$.fn[NAME$6].Constructor = Tooltip;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT$6 = jQuery.fn[NAME$6];
jQuery.fn[NAME$6] = Tooltip._jQueryInterface;
jQuery.fn[NAME$6].Constructor = Tooltip;
$.fn[NAME$6].noConflict = function () {
$.fn[NAME$6] = JQUERY_NO_CONFLICT$6;
return Tooltip._jQueryInterface;
};
jQuery.fn[NAME$6].noConflict = function () {
jQuery.fn[NAME$6] = JQUERY_NO_CONFLICT$6;
return Tooltip._jQueryInterface;
};
}
/**
* ------------------------------------------------------------------------
@ -6036,7 +6857,6 @@
var VERSION$7 = '4.3.1';
var DATA_KEY$7 = 'bs.popover';
var EVENT_KEY$7 = "." + DATA_KEY$7;
var JQUERY_NO_CONFLICT$7 = $.fn[NAME$7];
var CLASS_PREFIX$1 = 'bs-popover';
var BSCLS_PREFIX_REGEX$1 = new RegExp("(^|\\s)" + CLASS_PREFIX$1 + "\\S+", 'g');
@ -6044,7 +6864,7 @@
placement: 'right',
trigger: 'click',
content: '',
template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
});
var DefaultType$5 = _objectSpread({}, Tooltip.DefaultType, {
@ -6059,7 +6879,7 @@
TITLE: '.popover-header',
CONTENT: '.popover-body'
};
var Event$7 = {
var Event$8 = {
HIDE: "hide" + EVENT_KEY$7,
HIDDEN: "hidden" + EVENT_KEY$7,
SHOW: "show" + EVENT_KEY$7,
@ -6095,18 +6915,13 @@
};
_proto.addAttachmentClass = function addAttachmentClass(attachment) {
$(this.getTipElement()).addClass(CLASS_PREFIX$1 + "-" + attachment);
};
_proto.getTipElement = function getTipElement() {
this.tip = this.tip || $(this.config.template)[0];
return this.tip;
this.getTipElement().classList.add(CLASS_PREFIX$1 + "-" + attachment);
};
_proto.setContent = function setContent() {
var $tip = $(this.getTipElement()); // We use append for html objects to maintain js events
var tip = this.getTipElement(); // we use append for html objects to maintain js events
this.setElementContent($tip.find(Selector$7.TITLE), this.getTitle());
this.setElementContent(SelectorEngine.findOne(Selector$7.TITLE, tip), this.getTitle());
var content = this._getContent();
@ -6114,8 +6929,9 @@
content = content.call(this.element);
}
this.setElementContent($tip.find(Selector$7.CONTENT), content);
$tip.removeClass(ClassName$7.FADE + " " + ClassName$7.SHOW);
this.setElementContent(SelectorEngine.findOne(Selector$7.CONTENT, tip), content);
tip.classList.remove(ClassName$7.FADE);
tip.classList.remove(ClassName$7.SHOW);
} // Private
;
@ -6124,18 +6940,22 @@
};
_proto._cleanTipClass = function _cleanTipClass() {
var $tip = $(this.getTipElement());
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX$1);
var tip = this.getTipElement();
var tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX$1);
if (tabClass !== null && tabClass.length > 0) {
$tip.removeClass(tabClass.join(''));
tabClass.map(function (token) {
return token.trim();
}).forEach(function (tClass) {
return tip.classList.remove(tClass);
});
}
} // Static
;
Popover._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var data = $(this).data(DATA_KEY$7);
var data = Data.getData(this, DATA_KEY$7);
var _config = typeof config === 'object' ? config : null;
@ -6145,7 +6965,7 @@
if (!data) {
data = new Popover(this, _config);
$(this).data(DATA_KEY$7, data);
Data.setData(this, DATA_KEY$7, data);
}
if (typeof config === 'string') {
@ -6158,6 +6978,10 @@
});
};
Popover._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY$7);
};
_createClass(Popover, null, [{
key: "VERSION",
// Getters
@ -6182,7 +7006,7 @@
}, {
key: "Event",
get: function get() {
return Event$7;
return Event$8;
}
}, {
key: "EVENT_KEY",
@ -6205,13 +7029,16 @@
*/
$.fn[NAME$7] = Popover._jQueryInterface;
$.fn[NAME$7].Constructor = Popover;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT$7 = jQuery.fn[NAME$7];
jQuery.fn[NAME$7] = Popover._jQueryInterface;
jQuery.fn[NAME$7].Constructor = Popover;
$.fn[NAME$7].noConflict = function () {
$.fn[NAME$7] = JQUERY_NO_CONFLICT$7;
return Popover._jQueryInterface;
};
jQuery.fn[NAME$7].noConflict = function () {
jQuery.fn[NAME$7] = JQUERY_NO_CONFLICT$7;
return Popover._jQueryInterface;
};
}
/**
* ------------------------------------------------------------------------
@ -6224,7 +7051,6 @@
var DATA_KEY$8 = 'bs.scrollspy';
var EVENT_KEY$8 = "." + DATA_KEY$8;
var DATA_API_KEY$6 = '.data-api';
var JQUERY_NO_CONFLICT$8 = $.fn[NAME$8];
var Default$6 = {
offset: 10,
method: 'auto',
@ -6235,7 +7061,7 @@
method: 'string',
target: '(string|element)'
};
var Event$8 = {
var Event$9 = {
ACTIVATE: "activate" + EVENT_KEY$8,
SCROLL: "scroll" + EVENT_KEY$8,
LOAD_DATA_API: "load" + EVENT_KEY$8 + DATA_API_KEY$6
@ -6281,12 +7107,14 @@
this._targets = [];
this._activeTarget = null;
this._scrollHeight = 0;
$(this._scrollElement).on(Event$8.SCROLL, function (event) {
EventHandler.on(this._scrollElement, Event$9.SCROLL, function (event) {
return _this._process(event);
});
this.refresh();
this._process();
Data.setData(element, DATA_KEY$8, this);
} // Getters
@ -6302,13 +7130,13 @@
this._offsets = [];
this._targets = [];
this._scrollHeight = this._getScrollHeight();
var targets = [].slice.call(document.querySelectorAll(this._selector));
var targets = makeArray(SelectorEngine.find(this._selector));
targets.map(function (element) {
var target;
var targetSelector = Util.getSelectorFromElement(element);
var targetSelector = getSelectorFromElement(element);
if (targetSelector) {
target = document.querySelector(targetSelector);
target = SelectorEngine.findOne(targetSelector);
}
if (target) {
@ -6316,7 +7144,7 @@
if (targetBCR.width || targetBCR.height) {
// TODO (fat): remove sketch reliance on jQuery position/offset
return [$(target)[offsetMethod]().top + offsetBase, targetSelector];
return [Manipulator[offsetMethod](target).top + offsetBase, targetSelector];
}
}
@ -6333,8 +7161,8 @@
};
_proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY$8);
$(this._scrollElement).off(EVENT_KEY$8);
Data.removeData(this._element, DATA_KEY$8);
EventHandler.off(this._scrollElement, EVENT_KEY$8);
this._element = null;
this._scrollElement = null;
this._config = null;
@ -6350,17 +7178,17 @@
config = _objectSpread({}, Default$6, typeof config === 'object' && config ? config : {});
if (typeof config.target !== 'string') {
var id = $(config.target).attr('id');
var id = config.target.id;
if (!id) {
id = Util.getUID(NAME$8);
$(config.target).attr('id', id);
id = getUID(NAME$8);
config.target.id = id;
}
config.target = "#" + id;
}
Util.typeCheckConfig(NAME$8, config, DefaultType$6);
typeCheckConfig(NAME$8, config, DefaultType$6);
return config;
};
@ -6425,28 +7253,36 @@
return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]";
});
var $link = $([].slice.call(document.querySelectorAll(queries.join(','))));
var link = SelectorEngine.findOne(queries.join(','));
if ($link.hasClass(ClassName$8.DROPDOWN_ITEM)) {
$link.closest(Selector$8.DROPDOWN).find(Selector$8.DROPDOWN_TOGGLE).addClass(ClassName$8.ACTIVE);
$link.addClass(ClassName$8.ACTIVE);
if (link.classList.contains(ClassName$8.DROPDOWN_ITEM)) {
SelectorEngine.findOne(Selector$8.DROPDOWN_TOGGLE, SelectorEngine.closest(link, Selector$8.DROPDOWN)).classList.add(ClassName$8.ACTIVE);
link.classList.add(ClassName$8.ACTIVE);
} else {
// Set triggered link as active
$link.addClass(ClassName$8.ACTIVE); // Set triggered links parents as active
// With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
link.classList.add(ClassName$8.ACTIVE);
SelectorEngine.parents(link, Selector$8.NAV_LIST_GROUP).forEach(function (listGroup) {
// Set triggered links parents as active
// With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
SelectorEngine.prev(listGroup, Selector$8.NAV_LINKS + ", " + Selector$8.LIST_ITEMS).forEach(function (item) {
return item.classList.add(ClassName$8.ACTIVE);
}); // Handle special case when .nav-link is inside .nav-item
$link.parents(Selector$8.NAV_LIST_GROUP).prev(Selector$8.NAV_LINKS + ", " + Selector$8.LIST_ITEMS).addClass(ClassName$8.ACTIVE); // Handle special case when .nav-link is inside .nav-item
$link.parents(Selector$8.NAV_LIST_GROUP).prev(Selector$8.NAV_ITEMS).children(Selector$8.NAV_LINKS).addClass(ClassName$8.ACTIVE);
SelectorEngine.prev(listGroup, Selector$8.NAV_ITEMS).forEach(function (navItem) {
SelectorEngine.children(navItem, Selector$8.NAV_LINKS).forEach(function (item) {
return item.classList.add(ClassName$8.ACTIVE);
});
});
});
}
$(this._scrollElement).trigger(Event$8.ACTIVATE, {
EventHandler.trigger(this._scrollElement, Event$9.ACTIVATE, {
relatedTarget: target
});
};
_proto._clear = function _clear() {
[].slice.call(document.querySelectorAll(this._selector)).filter(function (node) {
makeArray(SelectorEngine.find(this._selector)).filter(function (node) {
return node.classList.contains(ClassName$8.ACTIVE);
}).forEach(function (node) {
return node.classList.remove(ClassName$8.ACTIVE);
@ -6456,13 +7292,12 @@
ScrollSpy._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var data = $(this).data(DATA_KEY$8);
var data = Data.getData(this, DATA_KEY$8);
var _config = typeof config === 'object' && config;
if (!data) {
data = new ScrollSpy(this, _config);
$(this).data(DATA_KEY$8, data);
}
if (typeof config === 'string') {
@ -6475,6 +7310,10 @@
});
};
ScrollSpy._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY$8);
};
_createClass(ScrollSpy, null, [{
key: "VERSION",
get: function get() {
@ -6496,15 +7335,10 @@
*/
$(window).on(Event$8.LOAD_DATA_API, function () {
var scrollSpys = [].slice.call(document.querySelectorAll(Selector$8.DATA_SPY));
var scrollSpysLength = scrollSpys.length;
for (var i = scrollSpysLength; i--;) {
var $spy = $(scrollSpys[i]);
ScrollSpy._jQueryInterface.call($spy, $spy.data());
}
EventHandler.on(window, Event$9.LOAD_DATA_API, function () {
makeArray(SelectorEngine.find(Selector$8.DATA_SPY)).forEach(function (spy) {
return new ScrollSpy(spy, Manipulator.getDataAttributes(spy));
});
});
/**
* ------------------------------------------------------------------------
@ -6512,13 +7346,16 @@
* ------------------------------------------------------------------------
*/
$.fn[NAME$8] = ScrollSpy._jQueryInterface;
$.fn[NAME$8].Constructor = ScrollSpy;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT$8 = jQuery.fn[NAME$8];
jQuery.fn[NAME$8] = ScrollSpy._jQueryInterface;
jQuery.fn[NAME$8].Constructor = ScrollSpy;
$.fn[NAME$8].noConflict = function () {
$.fn[NAME$8] = JQUERY_NO_CONFLICT$8;
return ScrollSpy._jQueryInterface;
};
jQuery.fn[NAME$8].noConflict = function () {
jQuery.fn[NAME$8] = JQUERY_NO_CONFLICT$8;
return ScrollSpy._jQueryInterface;
};
}
/**
* ------------------------------------------------------------------------
@ -6531,8 +7368,7 @@
var DATA_KEY$9 = 'bs.tab';
var EVENT_KEY$9 = "." + DATA_KEY$9;
var DATA_API_KEY$7 = '.data-api';
var JQUERY_NO_CONFLICT$9 = $.fn[NAME$9];
var Event$9 = {
var Event$a = {
HIDE: "hide" + EVENT_KEY$9,
HIDDEN: "hidden" + EVENT_KEY$9,
SHOW: "show" + EVENT_KEY$9,
@ -6550,10 +7386,10 @@
DROPDOWN: '.dropdown',
NAV_LIST_GROUP: '.nav, .list-group',
ACTIVE: '.active',
ACTIVE_UL: '> li > .active',
ACTIVE_UL: ':scope > li > .active',
DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',
DROPDOWN_TOGGLE: '.dropdown-toggle',
DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active'
DROPDOWN_ACTIVE_CHILD: ':scope > .dropdown-menu .active'
/**
* ------------------------------------------------------------------------
* Class Definition
@ -6567,6 +7403,7 @@
function () {
function Tab(element) {
this._element = element;
Data.setData(this._element, DATA_KEY$9, this);
} // Getters
@ -6576,53 +7413,50 @@
_proto.show = function show() {
var _this = this;
if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName$9.ACTIVE) || $(this._element).hasClass(ClassName$9.DISABLED)) {
if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && this._element.classList.contains(ClassName$9.ACTIVE) || this._element.classList.contains(ClassName$9.DISABLED)) {
return;
}
var target;
var previous;
var listElement = $(this._element).closest(Selector$9.NAV_LIST_GROUP)[0];
var selector = Util.getSelectorFromElement(this._element);
var listElement = SelectorEngine.closest(this._element, Selector$9.NAV_LIST_GROUP);
var selector = getSelectorFromElement(this._element);
if (listElement) {
var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? Selector$9.ACTIVE_UL : Selector$9.ACTIVE;
previous = $.makeArray($(listElement).find(itemSelector));
previous = makeArray(SelectorEngine.find(itemSelector, listElement));
previous = previous[previous.length - 1];
}
var hideEvent = $.Event(Event$9.HIDE, {
relatedTarget: this._element
});
var showEvent = $.Event(Event$9.SHOW, {
var hideEvent = null;
if (previous) {
hideEvent = EventHandler.trigger(previous, Event$a.HIDE, {
relatedTarget: this._element
});
}
var showEvent = EventHandler.trigger(this._element, Event$a.SHOW, {
relatedTarget: previous
});
if (previous) {
$(previous).trigger(hideEvent);
}
$(this._element).trigger(showEvent);
if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {
if (showEvent.defaultPrevented || hideEvent !== null && hideEvent.defaultPrevented) {
return;
}
if (selector) {
target = document.querySelector(selector);
target = SelectorEngine.findOne(selector);
}
this._activate(this._element, listElement);
var complete = function complete() {
var hiddenEvent = $.Event(Event$9.HIDDEN, {
EventHandler.trigger(previous, Event$a.HIDDEN, {
relatedTarget: _this._element
});
var shownEvent = $.Event(Event$9.SHOWN, {
EventHandler.trigger(_this._element, Event$a.SHOWN, {
relatedTarget: previous
});
$(previous).trigger(hiddenEvent);
$(_this._element).trigger(shownEvent);
};
if (target) {
@ -6633,7 +7467,7 @@
};
_proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY$9);
Data.removeData(this._element, DATA_KEY$9);
this._element = null;
} // Private
;
@ -6641,17 +7475,19 @@
_proto._activate = function _activate(element, container, callback) {
var _this2 = this;
var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? $(container).find(Selector$9.ACTIVE_UL) : $(container).children(Selector$9.ACTIVE);
var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? SelectorEngine.find(Selector$9.ACTIVE_UL, container) : SelectorEngine.children(container, Selector$9.ACTIVE);
var active = activeElements[0];
var isTransitioning = callback && active && $(active).hasClass(ClassName$9.FADE);
var isTransitioning = callback && active && active.classList.contains(ClassName$9.FADE);
var complete = function complete() {
return _this2._transitionComplete(element, active, callback);
};
if (active && isTransitioning) {
var transitionDuration = Util.getTransitionDurationFromElement(active);
$(active).removeClass(ClassName$9.SHOW).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
var transitionDuration = getTransitionDurationFromElement(active);
active.classList.remove(ClassName$9.SHOW);
EventHandler.one(active, TRANSITION_END, complete);
emulateTransitionEnd(active, transitionDuration);
} else {
complete();
}
@ -6659,11 +7495,11 @@
_proto._transitionComplete = function _transitionComplete(element, active, callback) {
if (active) {
$(active).removeClass(ClassName$9.ACTIVE);
var dropdownChild = $(active.parentNode).find(Selector$9.DROPDOWN_ACTIVE_CHILD)[0];
active.classList.remove(ClassName$9.ACTIVE);
var dropdownChild = SelectorEngine.findOne(Selector$9.DROPDOWN_ACTIVE_CHILD, active.parentNode);
if (dropdownChild) {
$(dropdownChild).removeClass(ClassName$9.ACTIVE);
dropdownChild.classList.remove(ClassName$9.ACTIVE);
}
if (active.getAttribute('role') === 'tab') {
@ -6671,24 +7507,25 @@
}
}
$(element).addClass(ClassName$9.ACTIVE);
element.classList.add(ClassName$9.ACTIVE);
if (element.getAttribute('role') === 'tab') {
element.setAttribute('aria-selected', true);
}
Util.reflow(element);
reflow(element);
if (element.classList.contains(ClassName$9.FADE)) {
element.classList.add(ClassName$9.SHOW);
}
if (element.parentNode && $(element.parentNode).hasClass(ClassName$9.DROPDOWN_MENU)) {
var dropdownElement = $(element).closest(Selector$9.DROPDOWN)[0];
if (element.parentNode && element.parentNode.classList.contains(ClassName$9.DROPDOWN_MENU)) {
var dropdownElement = SelectorEngine.closest(element, Selector$9.DROPDOWN);
if (dropdownElement) {
var dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(Selector$9.DROPDOWN_TOGGLE));
$(dropdownToggleList).addClass(ClassName$9.ACTIVE);
makeArray(SelectorEngine.find(Selector$9.DROPDOWN_TOGGLE)).forEach(function (dropdown) {
return dropdown.classList.add(ClassName$9.ACTIVE);
});
}
element.setAttribute('aria-expanded', true);
@ -6702,13 +7539,7 @@
Tab._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var $this = $(this);
var data = $this.data(DATA_KEY$9);
if (!data) {
data = new Tab(this);
$this.data(DATA_KEY$9, data);
}
var data = Data.getData(this, DATA_KEY$9) || new Tab(this);
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
@ -6720,6 +7551,10 @@
});
};
Tab._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY$9);
};
_createClass(Tab, null, [{
key: "VERSION",
get: function get() {
@ -6736,24 +7571,28 @@
*/
$(document).on(Event$9.CLICK_DATA_API, Selector$9.DATA_TOGGLE, function (event) {
EventHandler.on(document, Event$a.CLICK_DATA_API, Selector$9.DATA_TOGGLE, function (event) {
event.preventDefault();
Tab._jQueryInterface.call($(this), 'show');
var data = Data.getData(this, DATA_KEY$9) || new Tab(this);
data.show();
});
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
* add .tab to jQuery only if jQuery is present
*/
$.fn[NAME$9] = Tab._jQueryInterface;
$.fn[NAME$9].Constructor = Tab;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT$9 = jQuery.fn[NAME$9];
jQuery.fn[NAME$9] = Tab._jQueryInterface;
jQuery.fn[NAME$9].Constructor = Tab;
$.fn[NAME$9].noConflict = function () {
$.fn[NAME$9] = JQUERY_NO_CONFLICT$9;
return Tab._jQueryInterface;
};
jQuery.fn[NAME$9].noConflict = function () {
jQuery.fn[NAME$9] = JQUERY_NO_CONFLICT$9;
return Tab._jQueryInterface;
};
}
/**
* ------------------------------------------------------------------------
@ -6765,8 +7604,7 @@
var VERSION$a = '4.3.1';
var DATA_KEY$a = 'bs.toast';
var EVENT_KEY$a = "." + DATA_KEY$a;
var JQUERY_NO_CONFLICT$a = $.fn[NAME$a];
var Event$a = {
var Event$b = {
CLICK_DISMISS: "click.dismiss" + EVENT_KEY$a,
HIDE: "hide" + EVENT_KEY$a,
HIDDEN: "hidden" + EVENT_KEY$a,
@ -6808,6 +7646,8 @@
this._timeout = null;
this._setListeners();
Data.setData(element, DATA_KEY$a, this);
} // Getters
@ -6817,7 +7657,7 @@
_proto.show = function show() {
var _this = this;
$(this._element).trigger(Event$a.SHOW);
EventHandler.trigger(this._element, Event$b.SHOW);
if (this._config.animation) {
this._element.classList.add(ClassName$a.FADE);
@ -6828,7 +7668,7 @@
_this._element.classList.add(ClassName$a.SHOW);
$(_this._element).trigger(Event$a.SHOWN);
EventHandler.trigger(_this._element, Event$b.SHOWN);
if (_this._config.autohide) {
_this.hide();
@ -6840,8 +7680,9 @@
this._element.classList.add(ClassName$a.SHOWING);
if (this._config.animation) {
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
var transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, TRANSITION_END, complete);
emulateTransitionEnd(this._element, transitionDuration);
} else {
complete();
}
@ -6854,7 +7695,7 @@
return;
}
$(this._element).trigger(Event$a.HIDE);
EventHandler.trigger(this._element, Event$b.HIDE);
if (withoutTimeout) {
this._close();
@ -6873,23 +7714,23 @@
this._element.classList.remove(ClassName$a.SHOW);
}
$(this._element).off(Event$a.CLICK_DISMISS);
$.removeData(this._element, DATA_KEY$a);
EventHandler.off(this._element, Event$b.CLICK_DISMISS);
Data.removeData(this._element, DATA_KEY$a);
this._element = null;
this._config = null;
} // Private
;
_proto._getConfig = function _getConfig(config) {
config = _objectSpread({}, Default$7, $(this._element).data(), typeof config === 'object' && config ? config : {});
Util.typeCheckConfig(NAME$a, config, this.constructor.DefaultType);
config = _objectSpread({}, Default$7, Manipulator.getDataAttributes(this._element), typeof config === 'object' && config ? config : {});
typeCheckConfig(NAME$a, config, this.constructor.DefaultType);
return config;
};
_proto._setListeners = function _setListeners() {
var _this3 = this;
$(this._element).on(Event$a.CLICK_DISMISS, Selector$a.DATA_DISMISS, function () {
EventHandler.on(this._element, Event$b.CLICK_DISMISS, Selector$a.DATA_DISMISS, function () {
return _this3.hide(true);
});
};
@ -6900,14 +7741,15 @@
var complete = function complete() {
_this4._element.classList.add(ClassName$a.HIDE);
$(_this4._element).trigger(Event$a.HIDDEN);
EventHandler.trigger(_this4._element, Event$b.HIDDEN);
};
this._element.classList.remove(ClassName$a.SHOW);
if (this._config.animation) {
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
var transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, TRANSITION_END, complete);
emulateTransitionEnd(this._element, transitionDuration);
} else {
complete();
}
@ -6916,14 +7758,12 @@
Toast._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var $element = $(this);
var data = $element.data(DATA_KEY$a);
var data = Data.getData(this, DATA_KEY$a);
var _config = typeof config === 'object' && config;
if (!data) {
data = new Toast(this, _config);
$element.data(DATA_KEY$a, data);
}
if (typeof config === 'string') {
@ -6936,6 +7776,10 @@
});
};
Toast._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY$a);
};
_createClass(Toast, null, [{
key: "VERSION",
get: function get() {
@ -6959,16 +7803,20 @@
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
* add .toast to jQuery only if jQuery is present
*/
$.fn[NAME$a] = Toast._jQueryInterface;
$.fn[NAME$a].Constructor = Toast;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT$a = jQuery.fn[NAME$a];
jQuery.fn[NAME$a] = Toast._jQueryInterface;
jQuery.fn[NAME$a].Constructor = Toast;
$.fn[NAME$a].noConflict = function () {
$.fn[NAME$a] = JQUERY_NO_CONFLICT$a;
return Toast._jQueryInterface;
};
jQuery.fn[NAME$a].noConflict = function () {
jQuery.fn[NAME$a] = JQUERY_NO_CONFLICT$a;
return Toast._jQueryInterface;
};
}
/**
* --------------------------------------------------------------------------
@ -6977,24 +7825,6 @@
* --------------------------------------------------------------------------
*/
(function () {
if (typeof $ === 'undefined') {
throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.');
}
var version = $.fn.jquery.split(' ')[0].split('.');
var minMajor = 1;
var ltMajor = 2;
var minMinor = 9;
var minPatch = 1;
var maxMajor = 4;
if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {
throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');
}
})();
exports.Util = Util;
exports.Alert = Alert;
exports.Button = Button;
exports.Carousel = Carousel;
@ -7002,7 +7832,7 @@
exports.Dropdown = Dropdown;
exports.Modal = Modal;
exports.Popover = Popover;
exports.Scrollspy = ScrollSpy;
exports.ScrollSpy = ScrollSpy;
exports.Tab = Tab;
exports.Toast = Toast;
exports.Tooltip = Tooltip;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -4,12 +4,11 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jquery'), require('popper.js')) :
typeof define === 'function' && define.amd ? define(['exports', 'jquery', 'popper.js'], factory) :
(global = global || self, factory(global.bootstrap = {}, global.jQuery, global.Popper));
}(this, function (exports, $, Popper) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('popper.js')) :
typeof define === 'function' && define.amd ? define(['exports', 'popper.js'], factory) :
(global = global || self, factory(global.bootstrap = {}, global.Popper));
}(this, function (exports, Popper) { 'use strict';
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper;
function _defineProperties(target, props) {
@ -70,57 +69,18 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): util.js
* Bootstrap (v4.3.1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Private TransitionEnd Helpers
* ------------------------------------------------------------------------
*/
var TRANSITION_END = 'transitionend';
var MAX_UID = 1000000;
var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
var MILLISECONDS_MULTIPLIER = 1000;
var TRANSITION_END = 'transitionend';
var jQuery = window.jQuery; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
function toType(obj) {
var toType = function toType(obj) {
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
}
function getSpecialTransitionEndEvent() {
return {
bindType: TRANSITION_END,
delegateType: TRANSITION_END,
handle: function handle(event) {
if ($(event.target).is(this)) {
return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
}
return undefined; // eslint-disable-line no-undefined
}
};
}
function transitionEndEmulator(duration) {
var _this = this;
var called = false;
$(this).one(Util.TRANSITION_END, function () {
called = true;
});
setTimeout(function () {
if (!called) {
Util.triggerTransitionEnd(_this);
}
}, duration);
return this;
}
function setTransitionEndSupport() {
$.fn.emulateTransitionEnd = transitionEndEmulator;
$.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
}
};
/**
* --------------------------------------------------------------------------
* Public Util Api
@ -128,100 +88,686 @@
*/
var Util = {
TRANSITION_END: 'bsTransitionEnd',
getUID: function getUID(prefix) {
do {
// eslint-disable-next-line no-bitwise
prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
} while (document.getElementById(prefix));
var getUID = function getUID(prefix) {
do {
// eslint-disable-next-line no-bitwise
prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
} while (document.getElementById(prefix));
return prefix;
},
getSelectorFromElement: function getSelectorFromElement(element) {
var selector = element.getAttribute('data-target');
return prefix;
};
if (!selector || selector === '#') {
var hrefAttr = element.getAttribute('href');
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
}
var getSelectorFromElement = function getSelectorFromElement(element) {
var selector = element.getAttribute('data-target');
try {
return document.querySelector(selector) ? selector : null;
} catch (err) {
return null;
}
},
getTransitionDurationFromElement: function getTransitionDurationFromElement(element) {
if (!element) {
return 0;
} // Get transition-duration of the element
if (!selector || selector === '#') {
var hrefAttr = element.getAttribute('href');
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
}
var transitionDuration = $(element).css('transition-duration');
var transitionDelay = $(element).css('transition-delay');
var floatTransitionDuration = parseFloat(transitionDuration);
var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
if (!floatTransitionDuration && !floatTransitionDelay) {
return 0;
} // If multiple durations are defined, take the first
transitionDuration = transitionDuration.split(',')[0];
transitionDelay = transitionDelay.split(',')[0];
return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
},
reflow: function reflow(element) {
return element.offsetHeight;
},
triggerTransitionEnd: function triggerTransitionEnd(element) {
$(element).trigger(TRANSITION_END);
},
// TODO: Remove in v5
supportsTransitionEnd: function supportsTransitionEnd() {
return Boolean(TRANSITION_END);
},
isElement: function isElement(obj) {
return (obj[0] || obj).nodeType;
},
typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
for (var property in configTypes) {
if (Object.prototype.hasOwnProperty.call(configTypes, property)) {
var expectedTypes = configTypes[property];
var value = config[property];
var valueType = value && Util.isElement(value) ? 'element' : toType(value);
if (!new RegExp(expectedTypes).test(valueType)) {
throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
}
}
}
},
findShadowRoot: function findShadowRoot(element) {
if (!document.documentElement.attachShadow) {
return null;
} // Can find the shadow root otherwise it'll return the document
if (typeof element.getRootNode === 'function') {
var root = element.getRootNode();
return root instanceof ShadowRoot ? root : null;
}
if (element instanceof ShadowRoot) {
return element;
} // when we don't find a shadow root
if (!element.parentNode) {
return null;
}
return Util.findShadowRoot(element.parentNode);
try {
return document.querySelector(selector) ? selector : null;
} catch (err) {
return null;
}
};
var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
if (!element) {
return 0;
} // Get transition-duration of the element
var _window$getComputedSt = window.getComputedStyle(element),
transitionDuration = _window$getComputedSt.transitionDuration,
transitionDelay = _window$getComputedSt.transitionDelay;
var floatTransitionDuration = parseFloat(transitionDuration);
var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
if (!floatTransitionDuration && !floatTransitionDelay) {
return 0;
} // If multiple durations are defined, take the first
transitionDuration = transitionDuration.split(',')[0];
transitionDelay = transitionDelay.split(',')[0];
return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
};
var triggerTransitionEnd = function triggerTransitionEnd(element) {
element.dispatchEvent(new Event(TRANSITION_END));
};
var isElement = function isElement(obj) {
return (obj[0] || obj).nodeType;
};
var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
var called = false;
var durationPadding = 5;
var emulatedDuration = duration + durationPadding;
function listener() {
called = true;
element.removeEventListener(TRANSITION_END, listener);
}
element.addEventListener(TRANSITION_END, listener);
setTimeout(function () {
if (!called) {
triggerTransitionEnd(element);
}
}, emulatedDuration);
};
var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
Object.keys(configTypes).forEach(function (property) {
var expectedTypes = configTypes[property];
var value = config[property];
var valueType = value && isElement(value) ? 'element' : toType(value);
if (!new RegExp(expectedTypes).test(valueType)) {
throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
}
});
};
var makeArray = function makeArray(nodeList) {
if (!nodeList) {
return [];
}
return [].slice.call(nodeList);
};
var isVisible = function isVisible(element) {
if (!element) {
return false;
}
if (element.style && element.parentNode && element.parentNode.style) {
return element.style.display !== 'none' && element.parentNode.style.display !== 'none' && element.style.visibility !== 'hidden';
}
return false;
};
var findShadowRoot = function findShadowRoot(element) {
if (!document.documentElement.attachShadow) {
return null;
} // Can find the shadow root otherwise it'll return the document
if (typeof element.getRootNode === 'function') {
var root = element.getRootNode();
return root instanceof ShadowRoot ? root : null;
}
if (element instanceof ShadowRoot) {
return element;
} // when we don't find a shadow root
if (!element.parentNode) {
return null;
}
return findShadowRoot(element.parentNode);
}; // eslint-disable-next-line no-empty-function
var noop = function noop() {
return function () {};
};
var reflow = function reflow(element) {
return element.offsetHeight;
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): dom/data.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var mapData = function () {
var storeData = {};
var id = 1;
return {
set: function set(element, key, data) {
if (typeof element.key === 'undefined') {
element.key = {
key: key,
id: id
};
id++;
}
storeData[element.key.id] = data;
},
get: function get(element, key) {
if (!element || typeof element.key === 'undefined') {
return null;
}
var keyProperties = element.key;
if (keyProperties.key === key) {
return storeData[keyProperties.id];
}
return null;
},
delete: function _delete(element, key) {
if (typeof element.key === 'undefined') {
return;
}
var keyProperties = element.key;
if (keyProperties.key === key) {
delete storeData[keyProperties.id];
delete element.key;
}
}
};
}();
var Data = {
setData: function setData(instance, key, data) {
mapData.set(instance, key, data);
},
getData: function getData(instance, key) {
return mapData.get(instance, key);
},
removeData: function removeData(instance, key) {
mapData.delete(instance, key);
}
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): dom/polyfill.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
/* istanbul ignore next */
var Polyfill = function () {
// MSEdge resets defaultPrevented flag upon dispatchEvent call if at least one listener is attached
var defaultPreventedPreservedOnDispatch = function () {
var e = new CustomEvent('Bootstrap', {
cancelable: true
});
var element = document.createElement('div');
element.addEventListener('Bootstrap', function () {
return null;
});
e.preventDefault();
element.dispatchEvent(e);
return e.defaultPrevented;
}();
var find = Element.prototype.querySelectorAll;
var findOne = Element.prototype.querySelector;
var scopeSelectorRegex = /:scope\b/;
var supportScopeQuery = function () {
var element = document.createElement('div');
try {
element.querySelectorAll(':scope *');
} catch (e) {
return false;
}
return true;
}();
if (!supportScopeQuery) {
find = function find(selector) {
if (!scopeSelectorRegex.test(selector)) {
return this.querySelectorAll(selector);
}
var hasId = Boolean(this.id);
if (!hasId) {
this.id = getUID('scope');
}
var nodeList = null;
try {
selector = selector.replace(scopeSelectorRegex, "#" + this.id);
nodeList = this.querySelectorAll(selector);
} finally {
if (!hasId) {
this.removeAttribute('id');
}
}
return nodeList;
};
findOne = function findOne(selector) {
if (!scopeSelectorRegex.test(selector)) {
return this.querySelector(selector);
}
var matches = find.call(this, selector);
if (typeof matches[0] !== 'undefined') {
return matches[0];
}
return null;
};
}
return {
defaultPreventedPreservedOnDispatch: defaultPreventedPreservedOnDispatch,
find: find,
findOne: findOne
};
}();
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): dom/eventHandler.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var namespaceRegex = /[^.]*(?=\..*)\.|.*/;
var stripNameRegex = /\..*/;
var keyEventRegex = /^key/;
var stripUidRegex = /::\d+$/;
var eventRegistry = {}; // Events storage
var uidEvent = 1;
var customEvents = {
mouseenter: 'mouseover',
mouseleave: 'mouseout'
};
var nativeEvents = ['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll'];
/**
* ------------------------------------------------------------------------
* Private methods
* ------------------------------------------------------------------------
*/
function getUidEvent(element, uid) {
return uid && uid + "::" + uidEvent++ || element.uidEvent || uidEvent++;
}
function getEvent(element) {
var uid = getUidEvent(element);
element.uidEvent = uid;
return eventRegistry[uid] = eventRegistry[uid] || {};
}
function fixEvent(event, element) {
// Add which for key events
if (event.which === null && keyEventRegex.test(event.type)) {
event.which = event.charCode !== null ? event.charCode : event.keyCode;
}
event.delegateTarget = element;
}
function bootstrapHandler(element, fn) {
return function handler(event) {
fixEvent(event, element);
if (handler.oneOff) {
EventHandler.off(element, event.type, fn);
}
return fn.apply(element, [event]);
};
}
function bootstrapDelegationHandler(element, selector, fn) {
return function handler(event) {
var domElements = element.querySelectorAll(selector);
for (var target = event.target; target && target !== this; target = target.parentNode) {
for (var i = domElements.length; i--;) {
if (domElements[i] === target) {
fixEvent(event, target);
if (handler.oneOff) {
EventHandler.off(element, event.type, fn);
}
return fn.apply(target, [event]);
}
}
} // To please ESLint
return null;
};
}
function findHandler(events, handler, delegationSelector) {
if (delegationSelector === void 0) {
delegationSelector = null;
}
var uidList = Object.keys(events);
for (var i = 0; i < uidList.length; i++) {
var uid = uidList[i];
var event = events[uid];
if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {
return events[uid];
}
}
return null;
}
function normalizeParams(originalTypeEvent, handler, delegationFn) {
var delegation = typeof handler === 'string';
var originalHandler = delegation ? delegationFn : handler; // allow to get the native events from namespaced events ('click.bs.button' --> 'click')
var typeEvent = originalTypeEvent.replace(stripNameRegex, '');
var custom = customEvents[typeEvent];
if (custom) {
typeEvent = custom;
}
var isNative = nativeEvents.indexOf(typeEvent) > -1;
if (!isNative) {
typeEvent = originalTypeEvent;
}
return [delegation, originalHandler, typeEvent];
}
function addHandler(element, originalTypeEvent, handler, delegationFn, oneOff) {
if (typeof originalTypeEvent !== 'string' || !element) {
return;
}
if (!handler) {
handler = delegationFn;
delegationFn = null;
}
var _normalizeParams = normalizeParams(originalTypeEvent, handler, delegationFn),
delegation = _normalizeParams[0],
originalHandler = _normalizeParams[1],
typeEvent = _normalizeParams[2];
var events = getEvent(element);
var handlers = events[typeEvent] || (events[typeEvent] = {});
var previousFn = findHandler(handlers, originalHandler, delegation ? handler : null);
if (previousFn) {
previousFn.oneOff = previousFn.oneOff && oneOff;
return;
}
var uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''));
var fn = !delegation ? bootstrapHandler(element, handler) : bootstrapDelegationHandler(element, handler, delegationFn);
fn.delegationSelector = delegation ? handler : null;
fn.originalHandler = originalHandler;
fn.oneOff = oneOff;
fn.uidEvent = uid;
handlers[uid] = fn;
element.addEventListener(typeEvent, fn, delegation);
}
function removeHandler(element, events, typeEvent, handler, delegationSelector) {
var fn = findHandler(events[typeEvent], handler, delegationSelector);
if (fn === null) {
return;
}
element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));
delete events[typeEvent][fn.uidEvent];
}
function removeNamespacedHandlers(element, events, typeEvent, namespace) {
var storeElementEvent = events[typeEvent] || {};
Object.keys(storeElementEvent).forEach(function (handlerKey) {
if (handlerKey.indexOf(namespace) > -1) {
var event = storeElementEvent[handlerKey];
removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
}
});
}
var EventHandler = {
on: function on(element, event, handler, delegationFn) {
addHandler(element, event, handler, delegationFn, false);
},
one: function one(element, event, handler, delegationFn) {
addHandler(element, event, handler, delegationFn, true);
},
off: function off(element, originalTypeEvent, handler, delegationFn) {
if (typeof originalTypeEvent !== 'string' || !element) {
return;
}
var _normalizeParams2 = normalizeParams(originalTypeEvent, handler, delegationFn),
delegation = _normalizeParams2[0],
originalHandler = _normalizeParams2[1],
typeEvent = _normalizeParams2[2];
var inNamespace = typeEvent !== originalTypeEvent;
var events = getEvent(element);
var isNamespace = originalTypeEvent.charAt(0) === '.';
if (typeof originalHandler !== 'undefined') {
// Simplest case: handler is passed, remove that listener ONLY.
if (!events || !events[typeEvent]) {
return;
}
removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null);
return;
}
if (isNamespace) {
Object.keys(events).forEach(function (elementEvent) {
removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.substr(1));
});
}
var storeElementEvent = events[typeEvent] || {};
Object.keys(storeElementEvent).forEach(function (keyHandlers) {
var handlerKey = keyHandlers.replace(stripUidRegex, '');
if (!inNamespace || originalTypeEvent.indexOf(handlerKey) > -1) {
var event = storeElementEvent[keyHandlers];
removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
}
});
},
trigger: function trigger(element, event, args) {
if (typeof event !== 'string' || !element) {
return null;
}
var typeEvent = event.replace(stripNameRegex, '');
var inNamespace = event !== typeEvent;
var isNative = nativeEvents.indexOf(typeEvent) > -1;
var jQueryEvent;
var bubbles = true;
var nativeDispatch = true;
var defaultPrevented = false;
var evt = null;
if (inNamespace && typeof jQuery !== 'undefined') {
jQueryEvent = jQuery.Event(event, args);
jQuery(element).trigger(jQueryEvent);
bubbles = !jQueryEvent.isPropagationStopped();
nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();
defaultPrevented = jQueryEvent.isDefaultPrevented();
}
if (isNative) {
evt = document.createEvent('HTMLEvents');
evt.initEvent(typeEvent, bubbles, true);
} else {
evt = new CustomEvent(event, {
bubbles: bubbles,
cancelable: true
});
} // merge custom informations in our event
if (typeof args !== 'undefined') {
Object.keys(args).forEach(function (key) {
Object.defineProperty(evt, key, {
get: function get() {
return args[key];
}
});
});
}
if (defaultPrevented) {
evt.preventDefault();
if (!Polyfill.defaultPreventedPreservedOnDispatch) {
Object.defineProperty(evt, 'defaultPrevented', {
get: function get() {
return true;
}
});
}
}
if (nativeDispatch) {
element.dispatchEvent(evt);
}
if (evt.defaultPrevented && typeof jQueryEvent !== 'undefined') {
jQueryEvent.preventDefault();
}
return evt;
}
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): dom/selectorEngine.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var findFn = Polyfill.find;
var _findOne = Polyfill.findOne;
var NODE_TEXT = 3;
var SelectorEngine = {
matches: function matches(element, selector) {
return element.matches(selector);
},
find: function find(selector, element) {
if (element === void 0) {
element = document.documentElement;
}
if (typeof selector !== 'string') {
return null;
}
return findFn.call(element, selector);
},
findOne: function findOne(selector, element) {
if (element === void 0) {
element = document.documentElement;
}
if (typeof selector !== 'string') {
return null;
}
return _findOne.call(element, selector);
},
children: function children(element, selector) {
var _this = this;
if (typeof selector !== 'string') {
return null;
}
var children = makeArray(element.children);
return children.filter(function (child) {
return _this.matches(child, selector);
});
},
parents: function parents(element, selector) {
if (typeof selector !== 'string') {
return null;
}
var parents = [];
var ancestor = element.parentNode;
while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {
if (this.matches(ancestor, selector)) {
parents.push(ancestor);
}
ancestor = ancestor.parentNode;
}
return parents;
},
closest: function closest(element, selector) {
if (typeof selector !== 'string') {
return null;
}
return element.closest(selector);
},
prev: function prev(element, selector) {
if (typeof selector !== 'string') {
return null;
}
var siblings = [];
var previous = element.previousSibling;
while (previous && previous.nodeType === Node.ELEMENT_NODE && previous.nodeType !== NODE_TEXT) {
if (this.matches(previous, selector)) {
siblings.push(previous);
}
previous = previous.previousSibling;
}
return siblings;
}
};
setTransitionEndSupport();
/**
* ------------------------------------------------------------------------
@ -234,11 +780,10 @@
var DATA_KEY = 'bs.alert';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
var JQUERY_NO_CONFLICT = $.fn[NAME];
var Selector = {
DISMISS: '[data-dismiss="alert"]'
};
var Event = {
var Event$1 = {
CLOSE: "close" + EVENT_KEY,
CLOSED: "closed" + EVENT_KEY,
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
@ -260,6 +805,10 @@
function () {
function Alert(element) {
this._element = element;
if (this._element) {
Data.setData(element, DATA_KEY, this);
}
} // Getters
@ -275,7 +824,7 @@
var customEvent = this._triggerCloseEvent(rootElement);
if (customEvent.isDefaultPrevented()) {
if (customEvent === null || customEvent.defaultPrevented) {
return;
}
@ -283,62 +832,63 @@
};
_proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY);
Data.removeData(this._element, DATA_KEY);
this._element = null;
} // Private
;
_proto._getRootElement = function _getRootElement(element) {
var selector = Util.getSelectorFromElement(element);
var selector = getSelectorFromElement(element);
var parent = false;
if (selector) {
parent = document.querySelector(selector);
parent = SelectorEngine.findOne(selector);
}
if (!parent) {
parent = $(element).closest("." + ClassName.ALERT)[0];
parent = SelectorEngine.closest(element, "." + ClassName.ALERT);
}
return parent;
};
_proto._triggerCloseEvent = function _triggerCloseEvent(element) {
var closeEvent = $.Event(Event.CLOSE);
$(element).trigger(closeEvent);
return closeEvent;
return EventHandler.trigger(element, Event$1.CLOSE);
};
_proto._removeElement = function _removeElement(element) {
var _this = this;
$(element).removeClass(ClassName.SHOW);
element.classList.remove(ClassName.SHOW);
if (!$(element).hasClass(ClassName.FADE)) {
if (!element.classList.contains(ClassName.FADE)) {
this._destroyElement(element);
return;
}
var transitionDuration = Util.getTransitionDurationFromElement(element);
$(element).one(Util.TRANSITION_END, function (event) {
var transitionDuration = getTransitionDurationFromElement(element);
EventHandler.one(element, TRANSITION_END, function (event) {
return _this._destroyElement(element, event);
}).emulateTransitionEnd(transitionDuration);
});
emulateTransitionEnd(element, transitionDuration);
};
_proto._destroyElement = function _destroyElement(element) {
$(element).detach().trigger(Event.CLOSED).remove();
if (element.parentNode) {
element.parentNode.removeChild(element);
}
EventHandler.trigger(element, Event$1.CLOSED);
} // Static
;
Alert._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var $element = $(this);
var data = $element.data(DATA_KEY);
var data = Data.getData(this, DATA_KEY);
if (!data) {
data = new Alert(this);
$element.data(DATA_KEY, data);
}
if (config === 'close') {
@ -357,6 +907,10 @@
};
};
Alert._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY);
};
_createClass(Alert, null, [{
key: "VERSION",
get: function get() {
@ -373,20 +927,24 @@
*/
$(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
EventHandler.on(document, Event$1.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
* add .alert to jQuery only if jQuery is present
*/
$.fn[NAME] = Alert._jQueryInterface;
$.fn[NAME].Constructor = Alert;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT = jQuery.fn[NAME];
jQuery.fn[NAME] = Alert._jQueryInterface;
jQuery.fn[NAME].Constructor = Alert;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Alert._jQueryInterface;
};
jQuery.fn[NAME].noConflict = function () {
jQuery.fn[NAME] = JQUERY_NO_CONFLICT;
return Alert._jQueryInterface;
};
}
/**
* ------------------------------------------------------------------------
@ -399,7 +957,6 @@
var DATA_KEY$1 = 'bs.button';
var EVENT_KEY$1 = "." + DATA_KEY$1;
var DATA_API_KEY$1 = '.data-api';
var JQUERY_NO_CONFLICT$1 = $.fn[NAME$1];
var ClassName$1 = {
ACTIVE: 'active',
BUTTON: 'btn',
@ -412,9 +969,10 @@
ACTIVE: '.active',
BUTTON: '.btn'
};
var Event$1 = {
var Event$2 = {
CLICK_DATA_API: "click" + EVENT_KEY$1 + DATA_API_KEY$1,
FOCUS_BLUR_DATA_API: "focus" + EVENT_KEY$1 + DATA_API_KEY$1 + " " + ("blur" + EVENT_KEY$1 + DATA_API_KEY$1)
FOCUS_DATA_API: "focus" + EVENT_KEY$1 + DATA_API_KEY$1,
BLUR_DATA_API: "blur" + EVENT_KEY$1 + DATA_API_KEY$1
/**
* ------------------------------------------------------------------------
* Class Definition
@ -428,6 +986,7 @@
function () {
function Button(element) {
this._element = element;
Data.setData(element, DATA_KEY$1, this);
} // Getters
@ -437,20 +996,20 @@
_proto.toggle = function toggle() {
var triggerChangeEvent = true;
var addAriaPressed = true;
var rootElement = $(this._element).closest(Selector$1.DATA_TOGGLE)[0];
var rootElement = SelectorEngine.closest(this._element, Selector$1.DATA_TOGGLE);
if (rootElement) {
var input = this._element.querySelector(Selector$1.INPUT);
var input = SelectorEngine.findOne(Selector$1.INPUT, this._element);
if (input) {
if (input.type === 'radio') {
if (input.checked && this._element.classList.contains(ClassName$1.ACTIVE)) {
triggerChangeEvent = false;
} else {
var activeElement = rootElement.querySelector(Selector$1.ACTIVE);
var activeElement = SelectorEngine.findOne(Selector$1.ACTIVE, rootElement);
if (activeElement) {
$(activeElement).removeClass(ClassName$1.ACTIVE);
activeElement.classList.remove(ClassName$1.ACTIVE);
}
}
}
@ -461,7 +1020,7 @@
}
input.checked = !this._element.classList.contains(ClassName$1.ACTIVE);
$(input).trigger('change');
EventHandler.trigger(input, 'change');
}
input.focus();
@ -474,23 +1033,22 @@
}
if (triggerChangeEvent) {
$(this._element).toggleClass(ClassName$1.ACTIVE);
this._element.classList.toggle(ClassName$1.ACTIVE);
}
};
_proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY$1);
Data.removeData(this._element, DATA_KEY$1);
this._element = null;
} // Static
;
Button._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var data = $(this).data(DATA_KEY$1);
var data = Data.getData(this, DATA_KEY$1);
if (!data) {
data = new Button(this);
$(this).data(DATA_KEY$1, data);
}
if (config === 'toggle') {
@ -499,6 +1057,10 @@
});
};
Button._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY$1);
};
_createClass(Button, null, [{
key: "VERSION",
get: function get() {
@ -515,31 +1077,127 @@
*/
$(document).on(Event$1.CLICK_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) {
EventHandler.on(document, Event$2.CLICK_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) {
event.preventDefault();
var button = event.target;
if (!$(button).hasClass(ClassName$1.BUTTON)) {
button = $(button).closest(Selector$1.BUTTON);
if (!button.classList.contains(ClassName$1.BUTTON)) {
button = SelectorEngine.closest(button, Selector$1.BUTTON);
}
Button._jQueryInterface.call($(button), 'toggle');
}).on(Event$1.FOCUS_BLUR_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) {
var button = $(event.target).closest(Selector$1.BUTTON)[0];
$(button).toggleClass(ClassName$1.FOCUS, /^focus(in)?$/.test(event.type));
var data = Data.getData(button, DATA_KEY$1);
if (!data) {
data = new Button(button);
Data.setData(button, DATA_KEY$1, data);
}
data.toggle();
});
EventHandler.on(document, Event$2.FOCUS_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) {
var button = SelectorEngine.closest(event.target, Selector$1.BUTTON);
button.classList.add(ClassName$1.FOCUS);
});
EventHandler.on(document, Event$2.BLUR_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) {
var button = SelectorEngine.closest(event.target, Selector$1.BUTTON);
button.classList.remove(ClassName$1.FOCUS);
});
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
* add .button to jQuery only if jQuery is present
*/
$.fn[NAME$1] = Button._jQueryInterface;
$.fn[NAME$1].Constructor = Button;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT$1 = jQuery.fn[NAME$1];
jQuery.fn[NAME$1] = Button._jQueryInterface;
jQuery.fn[NAME$1].Constructor = Button;
$.fn[NAME$1].noConflict = function () {
$.fn[NAME$1] = JQUERY_NO_CONFLICT$1;
return Button._jQueryInterface;
jQuery.fn[NAME$1].noConflict = function () {
jQuery.fn[NAME$1] = JQUERY_NO_CONFLICT$1;
return Button._jQueryInterface;
};
}
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): dom/manipulator.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
function normalizeData(val) {
if (val === 'true') {
return true;
}
if (val === 'false') {
return false;
}
if (val === Number(val).toString()) {
return Number(val);
}
if (val === '' || val === 'null') {
return null;
}
return val;
}
function normalizeDataKey(key) {
return key.replace(/[A-Z]/g, function (chr) {
return chr.toLowerCase();
});
}
var Manipulator = {
setDataAttribute: function setDataAttribute(element, key, value) {
element.setAttribute("data-" + normalizeDataKey(key), value);
},
removeDataAttribute: function removeDataAttribute(element, key) {
element.removeAttribute("data-" + normalizeDataKey(key));
},
getDataAttributes: function getDataAttributes(element) {
if (!element) {
return {};
}
var attributes = _objectSpread({}, element.dataset);
Object.keys(attributes).forEach(function (key) {
attributes[key] = normalizeData(attributes[key]);
});
return attributes;
},
getDataAttribute: function getDataAttribute(element, key) {
return normalizeData(element.getAttribute("data-" + normalizeDataKey(key)));
},
offset: function offset(element) {
var rect = element.getBoundingClientRect();
return {
top: rect.top + document.body.scrollTop,
left: rect.left + document.body.scrollLeft
};
},
position: function position(element) {
return {
top: element.offsetTop,
left: element.offsetLeft
};
},
toggleClass: function toggleClass(element, className) {
if (!element) {
return;
}
if (element.classList.contains(className)) {
element.classList.remove(className);
} else {
element.classList.add(className);
}
}
};
/**
@ -553,7 +1211,6 @@
var DATA_KEY$2 = 'bs.carousel';
var EVENT_KEY$2 = "." + DATA_KEY$2;
var DATA_API_KEY$2 = '.data-api';
var JQUERY_NO_CONFLICT$2 = $.fn[NAME$2];
var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
@ -583,7 +1240,7 @@
LEFT: 'left',
RIGHT: 'right'
};
var Event$2 = {
var Event$3 = {
SLIDE: "slide" + EVENT_KEY$2,
SLID: "slid" + EVENT_KEY$2,
KEYDOWN: "keydown" + EVENT_KEY$2,
@ -644,11 +1301,13 @@
this.touchDeltaX = 0;
this._config = this._getConfig(config);
this._element = element;
this._indicatorsElement = this._element.querySelector(Selector$2.INDICATORS);
this._indicatorsElement = SelectorEngine.findOne(Selector$2.INDICATORS, this._element);
this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent);
this._addEventListeners();
Data.setData(element, DATA_KEY$2, this);
} // Getters
@ -664,7 +1323,7 @@
_proto.nextWhenVisible = function nextWhenVisible() {
// Don't call next when the page isn't visible
// or the carousel or its parent isn't visible
if (!document.hidden && $(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden') {
if (!document.hidden && isVisible(this._element)) {
this.next();
}
};
@ -680,8 +1339,8 @@
this._isPaused = true;
}
if (this._element.querySelector(Selector$2.NEXT_PREV)) {
Util.triggerTransitionEnd(this._element);
if (SelectorEngine.findOne(Selector$2.NEXT_PREV, this._element)) {
triggerTransitionEnd(this._element);
this.cycle(true);
}
@ -699,7 +1358,7 @@
this._interval = null;
}
if (this._config.interval && !this._isPaused) {
if (this._config && this._config.interval && !this._isPaused) {
this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
}
};
@ -707,7 +1366,7 @@
_proto.to = function to(index) {
var _this = this;
this._activeElement = this._element.querySelector(Selector$2.ACTIVE_ITEM);
this._activeElement = SelectorEngine.findOne(Selector$2.ACTIVE_ITEM, this._element);
var activeIndex = this._getItemIndex(this._activeElement);
@ -716,7 +1375,7 @@
}
if (this._isSliding) {
$(this._element).one(Event$2.SLID, function () {
EventHandler.one(this._element, Event$3.SLID, function () {
return _this.to(index);
});
return;
@ -734,8 +1393,8 @@
};
_proto.dispose = function dispose() {
$(this._element).off(EVENT_KEY$2);
$.removeData(this._element, DATA_KEY$2);
EventHandler.off(this._element, EVENT_KEY$2);
Data.removeData(this._element, DATA_KEY$2);
this._items = null;
this._config = null;
this._element = null;
@ -749,7 +1408,7 @@
_proto._getConfig = function _getConfig(config) {
config = _objectSpread({}, Default, config);
Util.typeCheckConfig(NAME$2, config, DefaultType);
typeCheckConfig(NAME$2, config, DefaultType);
return config;
};
@ -776,15 +1435,16 @@
var _this2 = this;
if (this._config.keyboard) {
$(this._element).on(Event$2.KEYDOWN, function (event) {
EventHandler.on(this._element, Event$3.KEYDOWN, function (event) {
return _this2._keydown(event);
});
}
if (this._config.pause === 'hover') {
$(this._element).on(Event$2.MOUSEENTER, function (event) {
EventHandler.on(this._element, Event$3.MOUSEENTER, function (event) {
return _this2.pause(event);
}).on(Event$2.MOUSELEAVE, function (event) {
});
EventHandler.on(this._element, Event$3.MOUSELEAVE, function (event) {
return _this2.cycle(event);
});
}
@ -802,25 +1462,25 @@
}
var start = function start(event) {
if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
_this3.touchStartX = event.originalEvent.clientX;
if (_this3._pointerEvent && PointerType[event.pointerType.toUpperCase()]) {
_this3.touchStartX = event.clientX;
} else if (!_this3._pointerEvent) {
_this3.touchStartX = event.originalEvent.touches[0].clientX;
_this3.touchStartX = event.touches[0].clientX;
}
};
var move = function move(event) {
// ensure swiping with one touch and not pinching
if (event.originalEvent.touches && event.originalEvent.touches.length > 1) {
if (event.touches && event.touches.length > 1) {
_this3.touchDeltaX = 0;
} else {
_this3.touchDeltaX = event.originalEvent.touches[0].clientX - _this3.touchStartX;
_this3.touchDeltaX = event.touches[0].clientX - _this3.touchStartX;
}
};
var end = function end(event) {
if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
_this3.touchDeltaX = event.originalEvent.clientX - _this3.touchStartX;
if (_this3._pointerEvent && PointerType[event.pointerType.toUpperCase()]) {
_this3.touchDeltaX = event.clientX - _this3.touchStartX;
}
_this3._handleSwipe();
@ -845,27 +1505,29 @@
}
};
$(this._element.querySelectorAll(Selector$2.ITEM_IMG)).on(Event$2.DRAG_START, function (e) {
return e.preventDefault();
makeArray(SelectorEngine.find(Selector$2.ITEM_IMG, this._element)).forEach(function (itemImg) {
EventHandler.on(itemImg, Event$3.DRAG_START, function (e) {
return e.preventDefault();
});
});
if (this._pointerEvent) {
$(this._element).on(Event$2.POINTERDOWN, function (event) {
EventHandler.on(this._element, Event$3.POINTERDOWN, function (event) {
return start(event);
});
$(this._element).on(Event$2.POINTERUP, function (event) {
EventHandler.on(this._element, Event$3.POINTERUP, function (event) {
return end(event);
});
this._element.classList.add(ClassName$2.POINTER_EVENT);
} else {
$(this._element).on(Event$2.TOUCHSTART, function (event) {
EventHandler.on(this._element, Event$3.TOUCHSTART, function (event) {
return start(event);
});
$(this._element).on(Event$2.TOUCHMOVE, function (event) {
EventHandler.on(this._element, Event$3.TOUCHMOVE, function (event) {
return move(event);
});
$(this._element).on(Event$2.TOUCHEND, function (event) {
EventHandler.on(this._element, Event$3.TOUCHEND, function (event) {
return end(event);
});
}
@ -892,7 +1554,7 @@
};
_proto._getItemIndex = function _getItemIndex(element) {
this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(Selector$2.ITEM)) : [];
this._items = element && element.parentNode ? makeArray(SelectorEngine.find(Selector$2.ITEM, element.parentNode)) : [];
return this._items.indexOf(element);
};
@ -917,27 +1579,28 @@
_proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
var targetIndex = this._getItemIndex(relatedTarget);
var fromIndex = this._getItemIndex(this._element.querySelector(Selector$2.ACTIVE_ITEM));
var fromIndex = this._getItemIndex(SelectorEngine.findOne(Selector$2.ACTIVE_ITEM, this._element));
var slideEvent = $.Event(Event$2.SLIDE, {
return EventHandler.trigger(this._element, Event$3.SLIDE, {
relatedTarget: relatedTarget,
direction: eventDirectionName,
from: fromIndex,
to: targetIndex
});
$(this._element).trigger(slideEvent);
return slideEvent;
};
_proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
if (this._indicatorsElement) {
var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(Selector$2.ACTIVE));
$(indicators).removeClass(ClassName$2.ACTIVE);
var indicators = SelectorEngine.find(Selector$2.ACTIVE, this._indicatorsElement);
for (var i = 0; i < indicators.length; i++) {
indicators[i].classList.remove(ClassName$2.ACTIVE);
}
var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
if (nextIndicator) {
$(nextIndicator).addClass(ClassName$2.ACTIVE);
nextIndicator.classList.add(ClassName$2.ACTIVE);
}
}
};
@ -945,7 +1608,7 @@
_proto._slide = function _slide(direction, element) {
var _this4 = this;
var activeElement = this._element.querySelector(Selector$2.ACTIVE_ITEM);
var activeElement = SelectorEngine.findOne(Selector$2.ACTIVE_ITEM, this._element);
var activeElementIndex = this._getItemIndex(activeElement);
@ -968,14 +1631,14 @@
eventDirectionName = Direction.RIGHT;
}
if (nextElement && $(nextElement).hasClass(ClassName$2.ACTIVE)) {
if (nextElement && nextElement.classList.contains(ClassName$2.ACTIVE)) {
this._isSliding = false;
return;
}
var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
if (slideEvent.isDefaultPrevented()) {
if (slideEvent.defaultPrevented) {
return;
}
@ -992,18 +1655,11 @@
this._setActiveIndicatorElement(nextElement);
var slidEvent = $.Event(Event$2.SLID, {
relatedTarget: nextElement,
direction: eventDirectionName,
from: activeElementIndex,
to: nextElementIndex
});
if ($(this._element).hasClass(ClassName$2.SLIDE)) {
$(nextElement).addClass(orderClassName);
Util.reflow(nextElement);
$(activeElement).addClass(directionalClassName);
$(nextElement).addClass(directionalClassName);
if (this._element.classList.contains(ClassName$2.SLIDE)) {
nextElement.classList.add(orderClassName);
reflow(nextElement);
activeElement.classList.add(directionalClassName);
nextElement.classList.add(directionalClassName);
var nextElementInterval = parseInt(nextElement.getAttribute('data-interval'), 10);
if (nextElementInterval) {
@ -1013,20 +1669,35 @@
this._config.interval = this._config.defaultInterval || this._config.interval;
}
var transitionDuration = Util.getTransitionDurationFromElement(activeElement);
$(activeElement).one(Util.TRANSITION_END, function () {
$(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName$2.ACTIVE);
$(activeElement).removeClass(ClassName$2.ACTIVE + " " + orderClassName + " " + directionalClassName);
var transitionDuration = getTransitionDurationFromElement(activeElement);
EventHandler.one(activeElement, TRANSITION_END, function () {
nextElement.classList.remove(directionalClassName);
nextElement.classList.remove(orderClassName);
nextElement.classList.add(ClassName$2.ACTIVE);
activeElement.classList.remove(ClassName$2.ACTIVE);
activeElement.classList.remove(orderClassName);
activeElement.classList.remove(directionalClassName);
_this4._isSliding = false;
setTimeout(function () {
return $(_this4._element).trigger(slidEvent);
EventHandler.trigger(_this4._element, Event$3.SLID, {
relatedTarget: nextElement,
direction: eventDirectionName,
from: activeElementIndex,
to: nextElementIndex
});
}, 0);
}).emulateTransitionEnd(transitionDuration);
});
emulateTransitionEnd(activeElement, transitionDuration);
} else {
$(activeElement).removeClass(ClassName$2.ACTIVE);
$(nextElement).addClass(ClassName$2.ACTIVE);
activeElement.classList.remove(ClassName$2.ACTIVE);
nextElement.classList.add(ClassName$2.ACTIVE);
this._isSliding = false;
$(this._element).trigger(slidEvent);
EventHandler.trigger(this._element, Event$3.SLID, {
relatedTarget: nextElement,
direction: eventDirectionName,
from: activeElementIndex,
to: nextElementIndex
});
}
if (isCycling) {
@ -1035,52 +1706,55 @@
} // Static
;
Carousel._carouselInterface = function _carouselInterface(element, config) {
var data = Data.getData(element, DATA_KEY$2);
var _config = _objectSpread({}, Default, Manipulator.getDataAttributes(element));
if (typeof config === 'object') {
_config = _objectSpread({}, _config, config);
}
var action = typeof config === 'string' ? config : _config.slide;
if (!data) {
data = new Carousel(element, _config);
}
if (typeof config === 'number') {
data.to(config);
} else if (typeof action === 'string') {
if (typeof data[action] === 'undefined') {
throw new Error("No method named \"" + action + "\"");
}
data[action]();
} else if (_config.interval && _config.ride) {
data.pause();
data.cycle();
}
};
Carousel._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var data = $(this).data(DATA_KEY$2);
var _config = _objectSpread({}, Default, $(this).data());
if (typeof config === 'object') {
_config = _objectSpread({}, _config, config);
}
var action = typeof config === 'string' ? config : _config.slide;
if (!data) {
data = new Carousel(this, _config);
$(this).data(DATA_KEY$2, data);
}
if (typeof config === 'number') {
data.to(config);
} else if (typeof action === 'string') {
if (typeof data[action] === 'undefined') {
throw new TypeError("No method named \"" + action + "\"");
}
data[action]();
} else if (_config.interval && _config.ride) {
data.pause();
data.cycle();
}
Carousel._carouselInterface(this, config);
});
};
Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
var selector = Util.getSelectorFromElement(this);
var selector = getSelectorFromElement(this);
if (!selector) {
return;
}
var target = $(selector)[0];
var target = SelectorEngine.findOne(selector);
if (!target || !$(target).hasClass(ClassName$2.CAROUSEL)) {
if (!target || !target.classList.contains(ClassName$2.CAROUSEL)) {
return;
}
var config = _objectSpread({}, $(target).data(), $(this).data());
var config = _objectSpread({}, Manipulator.getDataAttributes(target), Manipulator.getDataAttributes(this));
var slideIndex = this.getAttribute('data-slide-to');
@ -1088,15 +1762,19 @@
config.interval = false;
}
Carousel._jQueryInterface.call($(target), config);
Carousel._carouselInterface(target, config);
if (slideIndex) {
$(target).data(DATA_KEY$2).to(slideIndex);
Data.getData(target, DATA_KEY$2).to(slideIndex);
}
event.preventDefault();
};
Carousel._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY$2);
};
_createClass(Carousel, null, [{
key: "VERSION",
get: function get() {
@ -1118,29 +1796,31 @@
*/
$(document).on(Event$2.CLICK_DATA_API, Selector$2.DATA_SLIDE, Carousel._dataApiClickHandler);
$(window).on(Event$2.LOAD_DATA_API, function () {
var carousels = [].slice.call(document.querySelectorAll(Selector$2.DATA_RIDE));
EventHandler.on(document, Event$3.CLICK_DATA_API, Selector$2.DATA_SLIDE, Carousel._dataApiClickHandler);
EventHandler.on(window, Event$3.LOAD_DATA_API, function () {
var carousels = makeArray(SelectorEngine.find(Selector$2.DATA_RIDE));
for (var i = 0, len = carousels.length; i < len; i++) {
var $carousel = $(carousels[i]);
Carousel._jQueryInterface.call($carousel, $carousel.data());
Carousel._carouselInterface(carousels[i], Data.getData(carousels[i], DATA_KEY$2));
}
});
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
* add .carousel to jQuery only if jQuery is present
*/
$.fn[NAME$2] = Carousel._jQueryInterface;
$.fn[NAME$2].Constructor = Carousel;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT$2 = jQuery.fn[NAME$2];
jQuery.fn[NAME$2] = Carousel._jQueryInterface;
jQuery.fn[NAME$2].Constructor = Carousel;
$.fn[NAME$2].noConflict = function () {
$.fn[NAME$2] = JQUERY_NO_CONFLICT$2;
return Carousel._jQueryInterface;
};
jQuery.fn[NAME$2].noConflict = function () {
jQuery.fn[NAME$2] = JQUERY_NO_CONFLICT$2;
return Carousel._jQueryInterface;
};
}
/**
* ------------------------------------------------------------------------
@ -1153,7 +1833,6 @@
var DATA_KEY$3 = 'bs.collapse';
var EVENT_KEY$3 = "." + DATA_KEY$3;
var DATA_API_KEY$3 = '.data-api';
var JQUERY_NO_CONFLICT$3 = $.fn[NAME$3];
var Default$1 = {
toggle: true,
parent: ''
@ -1162,7 +1841,7 @@
toggle: 'boolean',
parent: '(string|element)'
};
var Event$3 = {
var Event$4 = {
SHOW: "show" + EVENT_KEY$3,
SHOWN: "shown" + EVENT_KEY$3,
HIDE: "hide" + EVENT_KEY$3,
@ -1197,17 +1876,17 @@
this._isTransitioning = false;
this._element = element;
this._config = this._getConfig(config);
this._triggerArray = [].slice.call(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
var toggleList = [].slice.call(document.querySelectorAll(Selector$3.DATA_TOGGLE));
this._triggerArray = makeArray(SelectorEngine.find("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
var toggleList = makeArray(SelectorEngine.find(Selector$3.DATA_TOGGLE));
for (var i = 0, len = toggleList.length; i < len; i++) {
var elem = toggleList[i];
var selector = Util.getSelectorFromElement(elem);
var filterElement = [].slice.call(document.querySelectorAll(selector)).filter(function (foundElem) {
var selector = getSelectorFromElement(elem);
var filterElement = makeArray(SelectorEngine.find(selector)).filter(function (foundElem) {
return foundElem === element;
});
if (selector !== null && filterElement.length > 0) {
if (selector !== null && filterElement.length) {
this._selector = selector;
this._triggerArray.push(elem);
@ -1223,6 +1902,8 @@
if (this._config.toggle) {
this.toggle();
}
Data.setData(element, DATA_KEY$3, this);
} // Getters
@ -1230,7 +1911,7 @@
// Public
_proto.toggle = function toggle() {
if ($(this._element).hasClass(ClassName$3.SHOW)) {
if (this._element.classList.contains(ClassName$3.SHOW)) {
this.hide();
} else {
this.show();
@ -1240,7 +1921,7 @@
_proto.show = function show() {
var _this = this;
if (this._isTransitioning || $(this._element).hasClass(ClassName$3.SHOW)) {
if (this._isTransitioning || this._element.classList.contains(ClassName$3.SHOW)) {
return;
}
@ -1248,7 +1929,7 @@
var activesData;
if (this._parent) {
actives = [].slice.call(this._parent.querySelectorAll(Selector$3.ACTIVES)).filter(function (elem) {
actives = makeArray(SelectorEngine.find(Selector$3.ACTIVES, this._parent)).filter(function (elem) {
if (typeof _this._config.parent === 'string') {
return elem.getAttribute('data-parent') === _this._config.parent;
}
@ -1261,87 +1942,113 @@
}
}
var container = SelectorEngine.findOne(this._selector);
if (actives) {
activesData = $(actives).not(this._selector).data(DATA_KEY$3);
var tempActiveData = actives.filter(function (elem) {
return container !== elem;
});
activesData = tempActiveData[0] ? Data.getData(tempActiveData[0], DATA_KEY$3) : null;
if (activesData && activesData._isTransitioning) {
return;
}
}
var startEvent = $.Event(Event$3.SHOW);
$(this._element).trigger(startEvent);
var startEvent = EventHandler.trigger(this._element, Event$4.SHOW);
if (startEvent.isDefaultPrevented()) {
if (startEvent.defaultPrevented) {
return;
}
if (actives) {
Collapse._jQueryInterface.call($(actives).not(this._selector), 'hide');
actives.forEach(function (elemActive) {
if (container !== elemActive) {
Collapse._collapseInterface(elemActive, 'hide');
}
if (!activesData) {
$(actives).data(DATA_KEY$3, null);
}
if (!activesData) {
Data.setData(elemActive, DATA_KEY$3, null);
}
});
}
var dimension = this._getDimension();
$(this._element).removeClass(ClassName$3.COLLAPSE).addClass(ClassName$3.COLLAPSING);
this._element.classList.remove(ClassName$3.COLLAPSE);
this._element.classList.add(ClassName$3.COLLAPSING);
this._element.style[dimension] = 0;
if (this._triggerArray.length) {
$(this._triggerArray).removeClass(ClassName$3.COLLAPSED).attr('aria-expanded', true);
this._triggerArray.forEach(function (element) {
element.classList.remove(ClassName$3.COLLAPSED);
element.setAttribute('aria-expanded', true);
});
}
this.setTransitioning(true);
var complete = function complete() {
$(_this._element).removeClass(ClassName$3.COLLAPSING).addClass(ClassName$3.COLLAPSE).addClass(ClassName$3.SHOW);
_this._element.classList.remove(ClassName$3.COLLAPSING);
_this._element.classList.add(ClassName$3.COLLAPSE);
_this._element.classList.add(ClassName$3.SHOW);
_this._element.style[dimension] = '';
_this.setTransitioning(false);
$(_this._element).trigger(Event$3.SHOWN);
EventHandler.trigger(_this._element, Event$4.SHOWN);
};
var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
var scrollSize = "scroll" + capitalizedDimension;
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
var transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, TRANSITION_END, complete);
emulateTransitionEnd(this._element, transitionDuration);
this._element.style[dimension] = this._element[scrollSize] + "px";
};
_proto.hide = function hide() {
var _this2 = this;
if (this._isTransitioning || !$(this._element).hasClass(ClassName$3.SHOW)) {
if (this._isTransitioning || !this._element.classList.contains(ClassName$3.SHOW)) {
return;
}
var startEvent = $.Event(Event$3.HIDE);
$(this._element).trigger(startEvent);
var startEvent = EventHandler.trigger(this._element, Event$4.HIDE);
if (startEvent.isDefaultPrevented()) {
if (startEvent.defaultPrevented) {
return;
}
var dimension = this._getDimension();
this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
Util.reflow(this._element);
$(this._element).addClass(ClassName$3.COLLAPSING).removeClass(ClassName$3.COLLAPSE).removeClass(ClassName$3.SHOW);
reflow(this._element);
this._element.classList.add(ClassName$3.COLLAPSING);
this._element.classList.remove(ClassName$3.COLLAPSE);
this._element.classList.remove(ClassName$3.SHOW);
var triggerArrayLength = this._triggerArray.length;
if (triggerArrayLength > 0) {
for (var i = 0; i < triggerArrayLength; i++) {
var trigger = this._triggerArray[i];
var selector = Util.getSelectorFromElement(trigger);
var selector = getSelectorFromElement(trigger);
if (selector !== null) {
var $elem = $([].slice.call(document.querySelectorAll(selector)));
var elem = SelectorEngine.findOne(selector);
if (!$elem.hasClass(ClassName$3.SHOW)) {
$(trigger).addClass(ClassName$3.COLLAPSED).attr('aria-expanded', false);
if (!elem.classList.contains(ClassName$3.SHOW)) {
trigger.classList.add(ClassName$3.COLLAPSED);
trigger.setAttribute('aria-expanded', false);
}
}
}
@ -1352,12 +2059,17 @@
var complete = function complete() {
_this2.setTransitioning(false);
$(_this2._element).removeClass(ClassName$3.COLLAPSING).addClass(ClassName$3.COLLAPSE).trigger(Event$3.HIDDEN);
_this2._element.classList.remove(ClassName$3.COLLAPSING);
_this2._element.classList.add(ClassName$3.COLLAPSE);
EventHandler.trigger(_this2._element, Event$4.HIDDEN);
};
this._element.style[dimension] = '';
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
var transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, TRANSITION_END, complete);
emulateTransitionEnd(this._element, transitionDuration);
};
_proto.setTransitioning = function setTransitioning(isTransitioning) {
@ -1365,7 +2077,7 @@
};
_proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY$3);
Data.removeData(this._element, DATA_KEY$3);
this._config = null;
this._parent = null;
this._element = null;
@ -1378,12 +2090,13 @@
config = _objectSpread({}, Default$1, config);
config.toggle = Boolean(config.toggle); // Coerce string values
Util.typeCheckConfig(NAME$3, config, DefaultType$1);
typeCheckConfig(NAME$3, config, DefaultType$1);
return config;
};
_proto._getDimension = function _getDimension() {
var hasWidth = $(this._element).hasClass(Dimension.WIDTH);
var hasWidth = this._element.classList.contains(Dimension.WIDTH);
return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;
};
@ -1392,64 +2105,79 @@
var parent;
if (Util.isElement(this._config.parent)) {
parent = this._config.parent; // It's a jQuery object
if (isElement(this._config.parent)) {
parent = this._config.parent; // it's a jQuery object
if (typeof this._config.parent.jquery !== 'undefined') {
if (typeof this._config.parent.jquery !== 'undefined' || typeof this._config.parent[0] !== 'undefined') {
parent = this._config.parent[0];
}
} else {
parent = document.querySelector(this._config.parent);
parent = SelectorEngine.findOne(this._config.parent);
}
var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]";
var children = [].slice.call(parent.querySelectorAll(selector));
$(children).each(function (i, element) {
makeArray(SelectorEngine.find(selector, parent)).forEach(function (element) {
_this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
});
return parent;
};
_proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
var isOpen = $(element).hasClass(ClassName$3.SHOW);
if (element) {
var isOpen = element.classList.contains(ClassName$3.SHOW);
if (triggerArray.length) {
$(triggerArray).toggleClass(ClassName$3.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
if (triggerArray.length) {
triggerArray.forEach(function (elem) {
if (!isOpen) {
elem.classList.add(ClassName$3.COLLAPSED);
} else {
elem.classList.remove(ClassName$3.COLLAPSED);
}
elem.setAttribute('aria-expanded', isOpen);
});
}
}
} // Static
;
Collapse._getTargetFromElement = function _getTargetFromElement(element) {
var selector = Util.getSelectorFromElement(element);
return selector ? document.querySelector(selector) : null;
var selector = getSelectorFromElement(element);
return selector ? SelectorEngine.findOne(selector) : null;
};
Collapse._collapseInterface = function _collapseInterface(element, config) {
var data = Data.getData(element, DATA_KEY$3);
var _config = _objectSpread({}, Default$1, Manipulator.getDataAttributes(element), typeof config === 'object' && config ? config : {});
if (!data && _config.toggle && /show|hide/.test(config)) {
_config.toggle = false;
}
if (!data) {
data = new Collapse(element, _config);
}
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
throw new Error("No method named \"" + config + "\"");
}
data[config]();
}
};
Collapse._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var $this = $(this);
var data = $this.data(DATA_KEY$3);
var _config = _objectSpread({}, Default$1, $this.data(), typeof config === 'object' && config ? config : {});
if (!data && _config.toggle && /show|hide/.test(config)) {
_config.toggle = false;
}
if (!data) {
data = new Collapse(this, _config);
$this.data(DATA_KEY$3, data);
}
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
throw new TypeError("No method named \"" + config + "\"");
}
data[config]();
}
Collapse._collapseInterface(this, config);
});
};
Collapse._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY$3);
};
_createClass(Collapse, null, [{
key: "VERSION",
get: function get() {
@ -1471,36 +2199,51 @@
*/
$(document).on(Event$3.CLICK_DATA_API, Selector$3.DATA_TOGGLE, function (event) {
EventHandler.on(document, Event$4.CLICK_DATA_API, Selector$3.DATA_TOGGLE, function (event) {
// preventDefault only for <a> elements (which change the URL) not inside the collapsible element
if (event.currentTarget.tagName === 'A') {
if (event.target.tagName === 'A') {
event.preventDefault();
}
var $trigger = $(this);
var selector = Util.getSelectorFromElement(this);
var selectors = [].slice.call(document.querySelectorAll(selector));
$(selectors).each(function () {
var $target = $(this);
var data = $target.data(DATA_KEY$3);
var config = data ? 'toggle' : $trigger.data();
var triggerData = Manipulator.getDataAttributes(this);
var selector = getSelectorFromElement(this);
var selectorElements = makeArray(SelectorEngine.find(selector));
selectorElements.forEach(function (element) {
var data = Data.getData(element, DATA_KEY$3);
var config;
Collapse._jQueryInterface.call($target, config);
if (data) {
// update parent attribute
if (data._parent === null && typeof triggerData.parent === 'string') {
data._config.parent = triggerData.parent;
data._parent = data._getParent();
}
config = 'toggle';
} else {
config = triggerData;
}
Collapse._collapseInterface(element, config);
});
});
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
* add .collapse to jQuery only if jQuery is present
*/
$.fn[NAME$3] = Collapse._jQueryInterface;
$.fn[NAME$3].Constructor = Collapse;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT$3 = jQuery.fn[NAME$3];
jQuery.fn[NAME$3] = Collapse._jQueryInterface;
jQuery.fn[NAME$3].Constructor = Collapse;
$.fn[NAME$3].noConflict = function () {
$.fn[NAME$3] = JQUERY_NO_CONFLICT$3;
return Collapse._jQueryInterface;
};
jQuery.fn[NAME$3].noConflict = function () {
jQuery.fn[NAME$3] = JQUERY_NO_CONFLICT$3;
return Collapse._jQueryInterface;
};
}
/**
* ------------------------------------------------------------------------
@ -1513,7 +2256,6 @@
var DATA_KEY$4 = 'bs.dropdown';
var EVENT_KEY$4 = "." + DATA_KEY$4;
var DATA_API_KEY$4 = '.data-api';
var JQUERY_NO_CONFLICT$4 = $.fn[NAME$4];
var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key
@ -1527,7 +2269,7 @@
var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)
var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE);
var Event$4 = {
var Event$5 = {
HIDE: "hide" + EVENT_KEY$4,
HIDDEN: "hidden" + EVENT_KEY$4,
SHOW: "show" + EVENT_KEY$4,
@ -1596,6 +2338,8 @@
this._inNavbar = this._detectNavbar();
this._addEventListeners();
Data.setData(element, DATA_KEY$4, this);
} // Getters
@ -1603,13 +2347,13 @@
// Public
_proto.toggle = function toggle() {
if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED)) {
if (this._element.disabled || this._element.classList.contains(ClassName$4.DISABLED)) {
return;
}
var parent = Dropdown._getParentFromElement(this._element);
var isActive = $(this._menu).hasClass(ClassName$4.SHOW);
var isActive = this._menu.classList.contains(ClassName$4.SHOW);
Dropdown._clearMenus();
@ -1620,10 +2364,9 @@
var relatedTarget = {
relatedTarget: this._element
};
var showEvent = $.Event(Event$4.SHOW, relatedTarget);
$(parent).trigger(showEvent);
var showEvent = EventHandler.trigger(parent, Event$5.SHOW, relatedTarget);
if (showEvent.isDefaultPrevented()) {
if (showEvent.defaultPrevented) {
return;
} // Disable totally Popper.js for Dropdown in Navbar
@ -1634,14 +2377,14 @@
* Popper - https://popper.js.org
*/
if (typeof Popper === 'undefined') {
throw new TypeError('Bootstrap\'s dropdowns require Popper.js (https://popper.js.org/)');
throw new TypeError('Bootstrap\'s dropdowns require Popper.js (https://popper.js.org)');
}
var referenceElement = this._element;
if (this._config.reference === 'parent') {
referenceElement = parent;
} else if (Util.isElement(this._config.reference)) {
} else if (isElement(this._config.reference)) {
referenceElement = this._config.reference; // Check if it's jQuery element
if (typeof this._config.reference.jquery !== 'undefined') {
@ -1653,7 +2396,7 @@
if (this._config.boundary !== 'scrollParent') {
$(parent).addClass(ClassName$4.POSITION_STATIC);
parent.classList.add(ClassName$4.POSITION_STATIC);
}
this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig());
@ -1663,65 +2406,66 @@
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
if ('ontouchstart' in document.documentElement && $(parent).closest(Selector$4.NAVBAR_NAV).length === 0) {
$(document.body).children().on('mouseover', null, $.noop);
if ('ontouchstart' in document.documentElement && !makeArray(SelectorEngine.closest(parent, Selector$4.NAVBAR_NAV)).length) {
makeArray(document.body.children).forEach(function (elem) {
return EventHandler.on(elem, 'mouseover', null, noop());
});
}
this._element.focus();
this._element.setAttribute('aria-expanded', true);
$(this._menu).toggleClass(ClassName$4.SHOW);
$(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.SHOWN, relatedTarget));
Manipulator.toggleClass(this._menu, ClassName$4.SHOW);
Manipulator.toggleClass(parent, ClassName$4.SHOW);
EventHandler.trigger(parent, Event$5.SHOWN, relatedTarget);
};
_proto.show = function show() {
if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED) || $(this._menu).hasClass(ClassName$4.SHOW)) {
if (this._element.disabled || this._element.classList.contains(ClassName$4.DISABLED) || this._menu.classList.contains(ClassName$4.SHOW)) {
return;
}
var parent = Dropdown._getParentFromElement(this._element);
var relatedTarget = {
relatedTarget: this._element
};
var showEvent = $.Event(Event$4.SHOW, relatedTarget);
var showEvent = EventHandler.trigger(parent, Event$5.SHOW, relatedTarget);
var parent = Dropdown._getParentFromElement(this._element);
$(parent).trigger(showEvent);
if (showEvent.isDefaultPrevented()) {
if (showEvent.defaultPrevented) {
return;
}
$(this._menu).toggleClass(ClassName$4.SHOW);
$(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.SHOWN, relatedTarget));
Manipulator.toggleClass(this._menu, ClassName$4.SHOW);
Manipulator.toggleClass(parent, ClassName$4.SHOW);
EventHandler.trigger(parent, Event$5.SHOWN, relatedTarget);
};
_proto.hide = function hide() {
if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED) || !$(this._menu).hasClass(ClassName$4.SHOW)) {
if (this._element.disabled || this._element.classList.contains(ClassName$4.DISABLED) || !this._menu.classList.contains(ClassName$4.SHOW)) {
return;
}
var parent = Dropdown._getParentFromElement(this._element);
var relatedTarget = {
relatedTarget: this._element
};
var hideEvent = $.Event(Event$4.HIDE, relatedTarget);
var hideEvent = EventHandler.trigger(parent, Event$5.HIDE, relatedTarget);
var parent = Dropdown._getParentFromElement(this._element);
$(parent).trigger(hideEvent);
if (hideEvent.isDefaultPrevented()) {
if (hideEvent.defaultPrevented) {
return;
}
$(this._menu).toggleClass(ClassName$4.SHOW);
$(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.HIDDEN, relatedTarget));
Manipulator.toggleClass(this._menu, ClassName$4.SHOW);
Manipulator.toggleClass(parent, ClassName$4.SHOW);
EventHandler.trigger(parent, Event$5.HIDDEN, relatedTarget);
};
_proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY$4);
$(this._element).off(EVENT_KEY$4);
Data.removeData(this._element, DATA_KEY$4);
EventHandler.off(this._element, EVENT_KEY$4);
this._element = null;
this._menu = null;
@ -1744,7 +2488,7 @@
_proto._addEventListeners = function _addEventListeners() {
var _this = this;
$(this._element).on(Event$4.CLICK, function (event) {
EventHandler.on(this._element, Event$5.CLICK, function (event) {
event.preventDefault();
event.stopPropagation();
@ -1753,8 +2497,8 @@
};
_proto._getConfig = function _getConfig(config) {
config = _objectSpread({}, this.constructor.Default, $(this._element).data(), config);
Util.typeCheckConfig(NAME$4, config, this.constructor.DefaultType);
config = _objectSpread({}, this.constructor.Default, Manipulator.getDataAttributes(this._element), config);
typeCheckConfig(NAME$4, config, this.constructor.DefaultType);
return config;
};
@ -1763,7 +2507,7 @@
var parent = Dropdown._getParentFromElement(this._element);
if (parent) {
this._menu = parent.querySelector(Selector$4.MENU);
this._menu = SelectorEngine.findOne(Selector$4.MENU, parent);
}
}
@ -1771,20 +2515,20 @@
};
_proto._getPlacement = function _getPlacement() {
var $parentDropdown = $(this._element.parentNode);
var parentDropdown = this._element.parentNode;
var placement = AttachmentMap.BOTTOM; // Handle dropup
if ($parentDropdown.hasClass(ClassName$4.DROPUP)) {
if (parentDropdown.classList.contains(ClassName$4.DROPUP)) {
placement = AttachmentMap.TOP;
if ($(this._menu).hasClass(ClassName$4.MENURIGHT)) {
if (this._menu.classList.contains(ClassName$4.MENURIGHT)) {
placement = AttachmentMap.TOPEND;
}
} else if ($parentDropdown.hasClass(ClassName$4.DROPRIGHT)) {
} else if (parentDropdown.classList.contains(ClassName$4.DROPRIGHT)) {
placement = AttachmentMap.RIGHT;
} else if ($parentDropdown.hasClass(ClassName$4.DROPLEFT)) {
} else if (parentDropdown.classList.contains(ClassName$4.DROPLEFT)) {
placement = AttachmentMap.LEFT;
} else if ($(this._menu).hasClass(ClassName$4.MENURIGHT)) {
} else if (this._menu.classList.contains(ClassName$4.MENURIGHT)) {
placement = AttachmentMap.BOTTOMEND;
}
@ -1792,7 +2536,7 @@
};
_proto._detectNavbar = function _detectNavbar() {
return $(this._element).closest('.navbar').length > 0;
return Boolean(SelectorEngine.closest(this._element, '.navbar'));
};
_proto._getOffset = function _getOffset() {
@ -1837,24 +2581,27 @@
} // Static
;
Dropdown._dropdownInterface = function _dropdownInterface(element, config) {
var data = Data.getData(element, DATA_KEY$4);
var _config = typeof config === 'object' ? config : null;
if (!data) {
data = new Dropdown(element, _config);
}
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
throw new Error("No method named \"" + config + "\"");
}
data[config]();
}
};
Dropdown._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var data = $(this).data(DATA_KEY$4);
var _config = typeof config === 'object' ? config : null;
if (!data) {
data = new Dropdown(this, _config);
$(this).data(DATA_KEY$4, data);
}
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
throw new TypeError("No method named \"" + config + "\"");
}
data[config]();
}
Dropdown._dropdownInterface(this, config);
});
};
@ -1863,12 +2610,12 @@
return;
}
var toggles = [].slice.call(document.querySelectorAll(Selector$4.DATA_TOGGLE));
var toggles = makeArray(SelectorEngine.find(Selector$4.DATA_TOGGLE));
for (var i = 0, len = toggles.length; i < len; i++) {
var parent = Dropdown._getParentFromElement(toggles[i]);
var context = $(toggles[i]).data(DATA_KEY$4);
var context = Data.getData(toggles[i], DATA_KEY$4);
var relatedTarget = {
relatedTarget: toggles[i]
};
@ -1883,44 +2630,45 @@
var dropdownMenu = context._menu;
if (!$(parent).hasClass(ClassName$4.SHOW)) {
if (!parent.classList.contains(ClassName$4.SHOW)) {
continue;
}
if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $.contains(parent, event.target)) {
if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && parent.contains(event.target)) {
continue;
}
var hideEvent = $.Event(Event$4.HIDE, relatedTarget);
$(parent).trigger(hideEvent);
var hideEvent = EventHandler.trigger(parent, Event$5.HIDE, relatedTarget);
if (hideEvent.isDefaultPrevented()) {
if (hideEvent.defaultPrevented) {
continue;
} // If this is a touch-enabled device we remove the extra
// empty mouseover listeners we added for iOS support
if ('ontouchstart' in document.documentElement) {
$(document.body).children().off('mouseover', null, $.noop);
makeArray(document.body.children).forEach(function (elem) {
return EventHandler.off(elem, 'mouseover', null, noop());
});
}
toggles[i].setAttribute('aria-expanded', 'false');
$(dropdownMenu).removeClass(ClassName$4.SHOW);
$(parent).removeClass(ClassName$4.SHOW).trigger($.Event(Event$4.HIDDEN, relatedTarget));
dropdownMenu.classList.remove(ClassName$4.SHOW);
parent.classList.remove(ClassName$4.SHOW);
EventHandler.trigger(parent, Event$5.HIDDEN, relatedTarget);
}
};
Dropdown._getParentFromElement = function _getParentFromElement(element) {
var parent;
var selector = Util.getSelectorFromElement(element);
var selector = getSelectorFromElement(element);
if (selector) {
parent = document.querySelector(selector);
parent = SelectorEngine.findOne(selector);
}
return parent || element.parentNode;
} // eslint-disable-next-line complexity
;
};
Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {
// If not input/textarea:
@ -1930,34 +2678,34 @@
// - If key is other than escape
// - If key is not up or down => not a dropdown command
// - If trigger inside the menu => not a dropdown command
if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $(event.target).closest(Selector$4.MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {
if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || SelectorEngine.closest(event.target, Selector$4.MENU)) : !REGEXP_KEYDOWN.test(event.which)) {
return;
}
event.preventDefault();
event.stopPropagation();
if (this.disabled || $(this).hasClass(ClassName$4.DISABLED)) {
if (this.disabled || this.classList.contains(ClassName$4.DISABLED)) {
return;
}
var parent = Dropdown._getParentFromElement(this);
var isActive = $(parent).hasClass(ClassName$4.SHOW);
var isActive = parent.classList.contains(ClassName$4.SHOW);
if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
if (event.which === ESCAPE_KEYCODE) {
var toggle = parent.querySelector(Selector$4.DATA_TOGGLE);
$(toggle).trigger('focus');
EventHandler.trigger(SelectorEngine.findOne(Selector$4.DATA_TOGGLE, parent), 'focus');
}
$(this).trigger('click');
Dropdown._clearMenus();
return;
}
var items = [].slice.call(parent.querySelectorAll(Selector$4.VISIBLE_ITEMS));
var items = makeArray(SelectorEngine.find(Selector$4.VISIBLE_ITEMS, parent));
if (items.length === 0) {
if (!items.length) {
return;
}
@ -1980,6 +2728,10 @@
items[index].focus();
};
Dropdown._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY$4);
};
_createClass(Dropdown, null, [{
key: "VERSION",
get: function get() {
@ -2006,27 +2758,36 @@
*/
$(document).on(Event$4.KEYDOWN_DATA_API, Selector$4.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event$4.KEYDOWN_DATA_API, Selector$4.MENU, Dropdown._dataApiKeydownHandler).on(Event$4.CLICK_DATA_API + " " + Event$4.KEYUP_DATA_API, Dropdown._clearMenus).on(Event$4.CLICK_DATA_API, Selector$4.DATA_TOGGLE, function (event) {
EventHandler.on(document, Event$5.KEYDOWN_DATA_API, Selector$4.DATA_TOGGLE, Dropdown._dataApiKeydownHandler);
EventHandler.on(document, Event$5.KEYDOWN_DATA_API, Selector$4.MENU, Dropdown._dataApiKeydownHandler);
EventHandler.on(document, Event$5.CLICK_DATA_API, Dropdown._clearMenus);
EventHandler.on(document, Event$5.KEYUP_DATA_API, Dropdown._clearMenus);
EventHandler.on(document, Event$5.CLICK_DATA_API, Selector$4.DATA_TOGGLE, function (event) {
event.preventDefault();
event.stopPropagation();
Dropdown._jQueryInterface.call($(this), 'toggle');
}).on(Event$4.CLICK_DATA_API, Selector$4.FORM_CHILD, function (e) {
e.stopPropagation();
Dropdown._dropdownInterface(this, 'toggle');
});
EventHandler.on(document, Event$5.CLICK_DATA_API, Selector$4.FORM_CHILD, function (e) {
return e.stopPropagation();
});
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
* add .dropdown to jQuery only if jQuery is present
*/
$.fn[NAME$4] = Dropdown._jQueryInterface;
$.fn[NAME$4].Constructor = Dropdown;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT$4 = jQuery.fn[NAME$4];
jQuery.fn[NAME$4] = Dropdown._jQueryInterface;
jQuery.fn[NAME$4].Constructor = Dropdown;
$.fn[NAME$4].noConflict = function () {
$.fn[NAME$4] = JQUERY_NO_CONFLICT$4;
return Dropdown._jQueryInterface;
};
jQuery.fn[NAME$4].noConflict = function () {
jQuery.fn[NAME$4] = JQUERY_NO_CONFLICT$4;
return Dropdown._jQueryInterface;
};
}
/**
* ------------------------------------------------------------------------
@ -2039,7 +2800,6 @@
var DATA_KEY$5 = 'bs.modal';
var EVENT_KEY$5 = "." + DATA_KEY$5;
var DATA_API_KEY$5 = '.data-api';
var JQUERY_NO_CONFLICT$5 = $.fn[NAME$5];
var ESCAPE_KEYCODE$1 = 27; // KeyboardEvent.which value for Escape (Esc) key
var Default$3 = {
@ -2054,7 +2814,7 @@
focus: 'boolean',
show: 'boolean'
};
var Event$5 = {
var Event$6 = {
HIDE: "hide" + EVENT_KEY$5,
HIDDEN: "hidden" + EVENT_KEY$5,
SHOW: "show" + EVENT_KEY$5,
@ -2096,13 +2856,14 @@
function Modal(element, config) {
this._config = this._getConfig(config);
this._element = element;
this._dialog = element.querySelector(Selector$5.DIALOG);
this._dialog = SelectorEngine.findOne(Selector$5.DIALOG, element);
this._backdrop = null;
this._isShown = false;
this._isBodyOverflowing = false;
this._ignoreBackdropClick = false;
this._isTransitioning = false;
this._scrollbarWidth = 0;
Data.setData(element, DATA_KEY$5, this);
} // Getters
@ -2120,16 +2881,15 @@
return;
}
if ($(this._element).hasClass(ClassName$5.FADE)) {
if (this._element.classList.contains(ClassName$5.FADE)) {
this._isTransitioning = true;
}
var showEvent = $.Event(Event$5.SHOW, {
var showEvent = EventHandler.trigger(this._element, Event$6.SHOW, {
relatedTarget: relatedTarget
});
$(this._element).trigger(showEvent);
if (this._isShown || showEvent.isDefaultPrevented()) {
if (this._isShown || showEvent.defaultPrevented) {
return;
}
@ -2145,12 +2905,12 @@
this._setResizeEvent();
$(this._element).on(Event$5.CLICK_DISMISS, Selector$5.DATA_DISMISS, function (event) {
EventHandler.on(this._element, Event$6.CLICK_DISMISS, Selector$5.DATA_DISMISS, function (event) {
return _this.hide(event);
});
$(this._dialog).on(Event$5.MOUSEDOWN_DISMISS, function () {
$(_this._element).one(Event$5.MOUSEUP_DISMISS, function (event) {
if ($(event.target).is(_this._element)) {
EventHandler.on(this._dialog, Event$6.MOUSEDOWN_DISMISS, function () {
EventHandler.one(_this._element, Event$6.MOUSEUP_DISMISS, function (event) {
if (event.target === _this._element) {
_this._ignoreBackdropClick = true;
}
});
@ -2172,15 +2932,15 @@
return;
}
var hideEvent = $.Event(Event$5.HIDE);
$(this._element).trigger(hideEvent);
var hideEvent = EventHandler.trigger(this._element, Event$6.HIDE);
if (!this._isShown || hideEvent.isDefaultPrevented()) {
if (!this._isShown || hideEvent.defaultPrevented) {
return;
}
this._isShown = false;
var transition = $(this._element).hasClass(ClassName$5.FADE);
var transition = this._element.classList.contains(ClassName$5.FADE);
if (transition) {
this._isTransitioning = true;
@ -2190,16 +2950,19 @@
this._setResizeEvent();
$(document).off(Event$5.FOCUSIN);
$(this._element).removeClass(ClassName$5.SHOW);
$(this._element).off(Event$5.CLICK_DISMISS);
$(this._dialog).off(Event$5.MOUSEDOWN_DISMISS);
EventHandler.off(document, Event$6.FOCUSIN);
this._element.classList.remove(ClassName$5.SHOW);
EventHandler.off(this._element, Event$6.CLICK_DISMISS);
EventHandler.off(this._dialog, Event$6.MOUSEDOWN_DISMISS);
if (transition) {
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
$(this._element).one(Util.TRANSITION_END, function (event) {
var transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, TRANSITION_END, function (event) {
return _this2._hideModal(event);
}).emulateTransitionEnd(transitionDuration);
});
emulateTransitionEnd(this._element, transitionDuration);
} else {
this._hideModal();
}
@ -2207,7 +2970,7 @@
_proto.dispose = function dispose() {
[window, this._element, this._dialog].forEach(function (htmlElement) {
return $(htmlElement).off(EVENT_KEY$5);
return EventHandler.off(htmlElement, EVENT_KEY$5);
});
/**
* `document` has 2 events `Event.FOCUSIN` and `Event.CLICK_DATA_API`
@ -2215,8 +2978,8 @@
* It will remove `Event.CLICK_DATA_API` event that should remain
*/
$(document).off(Event$5.FOCUSIN);
$.removeData(this._element, DATA_KEY$5);
EventHandler.off(document, Event$6.FOCUSIN);
Data.removeData(this._element, DATA_KEY$5);
this._config = null;
this._element = null;
this._dialog = null;
@ -2235,14 +2998,14 @@
_proto._getConfig = function _getConfig(config) {
config = _objectSpread({}, Default$3, config);
Util.typeCheckConfig(NAME$5, config, DefaultType$3);
typeCheckConfig(NAME$5, config, DefaultType$3);
return config;
};
_proto._showElement = function _showElement(relatedTarget) {
var _this3 = this;
var transition = $(this._element).hasClass(ClassName$5.FADE);
var transition = this._element.classList.contains(ClassName$5.FADE);
if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
// Don't move modal's DOM position
@ -2255,38 +3018,37 @@
this._element.setAttribute('aria-modal', true);
if ($(this._dialog).hasClass(ClassName$5.SCROLLABLE)) {
this._dialog.querySelector(Selector$5.MODAL_BODY).scrollTop = 0;
if (this._dialog.classList.contains(ClassName$5.SCROLLABLE)) {
SelectorEngine.findOne(Selector$5.MODAL_BODY, this._dialog).scrollTop = 0;
} else {
this._element.scrollTop = 0;
}
if (transition) {
Util.reflow(this._element);
reflow(this._element);
}
$(this._element).addClass(ClassName$5.SHOW);
this._element.classList.add(ClassName$5.SHOW);
if (this._config.focus) {
this._enforceFocus();
}
var shownEvent = $.Event(Event$5.SHOWN, {
relatedTarget: relatedTarget
});
var transitionComplete = function transitionComplete() {
if (_this3._config.focus) {
_this3._element.focus();
}
_this3._isTransitioning = false;
$(_this3._element).trigger(shownEvent);
EventHandler.trigger(_this3._element, Event$6.SHOWN, {
relatedTarget: relatedTarget
});
};
if (transition) {
var transitionDuration = Util.getTransitionDurationFromElement(this._dialog);
$(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration);
var transitionDuration = getTransitionDurationFromElement(this._dialog);
EventHandler.one(this._dialog, TRANSITION_END, transitionComplete);
emulateTransitionEnd(this._dialog, transitionDuration);
} else {
transitionComplete();
}
@ -2295,9 +3057,10 @@
_proto._enforceFocus = function _enforceFocus() {
var _this4 = this;
$(document).off(Event$5.FOCUSIN) // Guard against infinite focus loop
.on(Event$5.FOCUSIN, function (event) {
if (document !== event.target && _this4._element !== event.target && $(_this4._element).has(event.target).length === 0) {
EventHandler.off(document, Event$6.FOCUSIN); // guard against infinite focus loop
EventHandler.on(document, Event$6.FOCUSIN, function (event) {
if (document !== event.target && _this4._element !== event.target && !_this4._element.contains(event.target)) {
_this4._element.focus();
}
});
@ -2307,7 +3070,7 @@
var _this5 = this;
if (this._isShown && this._config.keyboard) {
$(this._element).on(Event$5.KEYDOWN_DISMISS, function (event) {
EventHandler.on(this._element, Event$6.KEYDOWN_DISMISS, function (event) {
if (event.which === ESCAPE_KEYCODE$1) {
event.preventDefault();
@ -2315,7 +3078,7 @@
}
});
} else if (!this._isShown) {
$(this._element).off(Event$5.KEYDOWN_DISMISS);
EventHandler.off(this._element, Event$6.KEYDOWN_DISMISS);
}
};
@ -2323,11 +3086,11 @@
var _this6 = this;
if (this._isShown) {
$(window).on(Event$5.RESIZE, function (event) {
EventHandler.on(window, Event$6.RESIZE, function (event) {
return _this6.handleUpdate(event);
});
} else {
$(window).off(Event$5.RESIZE);
EventHandler.off(window, Event$6.RESIZE);
}
};
@ -2343,19 +3106,20 @@
this._isTransitioning = false;
this._showBackdrop(function () {
$(document.body).removeClass(ClassName$5.OPEN);
document.body.classList.remove(ClassName$5.OPEN);
_this7._resetAdjustments();
_this7._resetScrollbar();
$(_this7._element).trigger(Event$5.HIDDEN);
EventHandler.trigger(_this7._element, Event$6.HIDDEN);
});
};
_proto._removeBackdrop = function _removeBackdrop() {
if (this._backdrop) {
$(this._backdrop).remove();
this._backdrop.parentNode.removeChild(this._backdrop);
this._backdrop = null;
}
};
@ -2363,7 +3127,7 @@
_proto._showBackdrop = function _showBackdrop(callback) {
var _this8 = this;
var animate = $(this._element).hasClass(ClassName$5.FADE) ? ClassName$5.FADE : '';
var animate = this._element.classList.contains(ClassName$5.FADE) ? ClassName$5.FADE : '';
if (this._isShown && this._config.backdrop) {
this._backdrop = document.createElement('div');
@ -2373,8 +3137,8 @@
this._backdrop.classList.add(animate);
}
$(this._backdrop).appendTo(document.body);
$(this._element).on(Event$5.CLICK_DISMISS, function (event) {
document.body.appendChild(this._backdrop);
EventHandler.on(this._element, Event$6.CLICK_DISMISS, function (event) {
if (_this8._ignoreBackdropClick) {
_this8._ignoreBackdropClick = false;
return;
@ -2392,10 +3156,10 @@
});
if (animate) {
Util.reflow(this._backdrop);
reflow(this._backdrop);
}
$(this._backdrop).addClass(ClassName$5.SHOW);
this._backdrop.classList.add(ClassName$5.SHOW);
if (!callback) {
return;
@ -2406,10 +3170,11 @@
return;
}
var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
$(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration);
var backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);
EventHandler.one(this._backdrop, TRANSITION_END, callback);
emulateTransitionEnd(this._backdrop, backdropTransitionDuration);
} else if (!this._isShown && this._backdrop) {
$(this._backdrop).removeClass(ClassName$5.SHOW);
this._backdrop.classList.remove(ClassName$5.SHOW);
var callbackRemove = function callbackRemove() {
_this8._removeBackdrop();
@ -2419,10 +3184,11 @@
}
};
if ($(this._element).hasClass(ClassName$5.FADE)) {
var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
if (this._element.classList.contains(ClassName$5.FADE)) {
var _backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);
$(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration);
EventHandler.one(this._backdrop, TRANSITION_END, callbackRemove);
emulateTransitionEnd(this._backdrop, _backdropTransitionDuration);
} else {
callbackRemove();
}
@ -2464,50 +3230,58 @@
if (this._isBodyOverflowing) {
// Note: DOMNode.style.paddingRight returns the actual value or '' if not set
// while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
var fixedContent = [].slice.call(document.querySelectorAll(Selector$5.FIXED_CONTENT));
var stickyContent = [].slice.call(document.querySelectorAll(Selector$5.STICKY_CONTENT)); // Adjust fixed content padding
$(fixedContent).each(function (index, element) {
// Adjust fixed content padding
makeArray(SelectorEngine.find(Selector$5.FIXED_CONTENT)).forEach(function (element) {
var actualPadding = element.style.paddingRight;
var calculatedPadding = $(element).css('padding-right');
$(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this9._scrollbarWidth + "px");
var calculatedPadding = window.getComputedStyle(element)['padding-right'];
Manipulator.setDataAttribute(element, 'padding-right', actualPadding);
element.style.paddingRight = parseFloat(calculatedPadding) + _this9._scrollbarWidth + "px";
}); // Adjust sticky content margin
$(stickyContent).each(function (index, element) {
makeArray(SelectorEngine.find(Selector$5.STICKY_CONTENT)).forEach(function (element) {
var actualMargin = element.style.marginRight;
var calculatedMargin = $(element).css('margin-right');
$(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px");
var calculatedMargin = window.getComputedStyle(element)['margin-right'];
Manipulator.setDataAttribute(element, 'margin-right', actualMargin);
element.style.marginRight = parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px";
}); // Adjust body padding
var actualPadding = document.body.style.paddingRight;
var calculatedPadding = $(document.body).css('padding-right');
$(document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px");
var calculatedPadding = window.getComputedStyle(document.body)['padding-right'];
Manipulator.setDataAttribute(document.body, 'padding-right', actualPadding);
document.body.style.paddingRight = parseFloat(calculatedPadding) + this._scrollbarWidth + "px";
}
$(document.body).addClass(ClassName$5.OPEN);
document.body.classList.add(ClassName$5.OPEN);
};
_proto._resetScrollbar = function _resetScrollbar() {
// Restore fixed content padding
var fixedContent = [].slice.call(document.querySelectorAll(Selector$5.FIXED_CONTENT));
$(fixedContent).each(function (index, element) {
var padding = $(element).data('padding-right');
$(element).removeData('padding-right');
element.style.paddingRight = padding ? padding : '';
}); // Restore sticky content
makeArray(SelectorEngine.find(Selector$5.FIXED_CONTENT)).forEach(function (element) {
var padding = Manipulator.getDataAttribute(element, 'padding-right');
var elements = [].slice.call(document.querySelectorAll("" + Selector$5.STICKY_CONTENT));
$(elements).each(function (index, element) {
var margin = $(element).data('margin-right');
if (typeof padding !== 'undefined') {
Manipulator.removeDataAttribute(element, 'padding-right');
element.style.paddingRight = padding;
}
}); // Restore sticky content and navbar-toggler margin
makeArray(SelectorEngine.find("" + Selector$5.STICKY_CONTENT)).forEach(function (element) {
var margin = Manipulator.getDataAttribute(element, 'margin-right');
if (typeof margin !== 'undefined') {
$(element).css('margin-right', margin).removeData('margin-right');
Manipulator.removeDataAttribute(element, 'margin-right');
element.style.marginRight = margin;
}
}); // Restore body padding
var padding = $(document.body).data('padding-right');
$(document.body).removeData('padding-right');
document.body.style.paddingRight = padding ? padding : '';
var padding = Manipulator.getDataAttribute(document.body, 'padding-right');
if (typeof padding !== 'undefined') {
Manipulator.removeDataAttribute(document.body, 'padding-right');
document.body.style.paddingRight = padding;
} else {
document.body.style.paddingRight = '';
}
};
_proto._getScrollbarWidth = function _getScrollbarWidth() {
@ -2523,13 +3297,12 @@
Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
return this.each(function () {
var data = $(this).data(DATA_KEY$5);
var data = Data.getData(this, DATA_KEY$5);
var _config = _objectSpread({}, Default$3, $(this).data(), typeof config === 'object' && config ? config : {});
var _config = _objectSpread({}, Default$3, Manipulator.getDataAttributes(this), typeof config === 'object' && config ? config : {});
if (!data) {
data = new Modal(this, _config);
$(this).data(DATA_KEY$5, data);
}
if (typeof config === 'string') {
@ -2544,6 +3317,10 @@
});
};
Modal._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY$5);
};
_createClass(Modal, null, [{
key: "VERSION",
get: function get() {
@ -2565,36 +3342,41 @@
*/
$(document).on(Event$5.CLICK_DATA_API, Selector$5.DATA_TOGGLE, function (event) {
EventHandler.on(document, Event$6.CLICK_DATA_API, Selector$5.DATA_TOGGLE, function (event) {
var _this10 = this;
var target;
var selector = Util.getSelectorFromElement(this);
var selector = getSelectorFromElement(this);
if (selector) {
target = document.querySelector(selector);
target = SelectorEngine.findOne(selector);
}
var config = $(target).data(DATA_KEY$5) ? 'toggle' : _objectSpread({}, $(target).data(), $(this).data());
var config = Data.getData(target, DATA_KEY$5) ? 'toggle' : _objectSpread({}, Manipulator.getDataAttributes(target), Manipulator.getDataAttributes(this));
if (this.tagName === 'A' || this.tagName === 'AREA') {
event.preventDefault();
}
var $target = $(target).one(Event$5.SHOW, function (showEvent) {
if (showEvent.isDefaultPrevented()) {
// Only register focus restorer if modal will actually get shown
EventHandler.one(target, Event$6.SHOW, function (showEvent) {
if (showEvent.defaultPrevented) {
// only register focus restorer if modal will actually get shown
return;
}
$target.one(Event$5.HIDDEN, function () {
if ($(_this10).is(':visible')) {
EventHandler.one(target, Event$6.HIDDEN, function () {
if (isVisible(_this10)) {
_this10.focus();
}
});
});
var data = Data.getData(target, DATA_KEY$5);
Modal._jQueryInterface.call($(target), config, this);
if (!data) {
data = new Modal(target, config);
}
data.show(this);
});
/**
* ------------------------------------------------------------------------
@ -2602,22 +3384,64 @@
* ------------------------------------------------------------------------
*/
$.fn[NAME$5] = Modal._jQueryInterface;
$.fn[NAME$5].Constructor = Modal;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT$5 = jQuery.fn[NAME$5];
jQuery.fn[NAME$5] = Modal._jQueryInterface;
jQuery.fn[NAME$5].Constructor = Modal;
$.fn[NAME$5].noConflict = function () {
$.fn[NAME$5] = JQUERY_NO_CONFLICT$5;
return Modal._jQueryInterface;
};
jQuery.fn[NAME$5].noConflict = function () {
jQuery.fn[NAME$5] = JQUERY_NO_CONFLICT$5;
return Modal._jQueryInterface;
};
}
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): tools/sanitizer.js
* Bootstrap (v4.3.1): util/sanitizer.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href'];
var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
/**
* A pattern that recognizes a commonly useful subset of URLs that are safe.
*
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
*/
var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;
/**
* A pattern that matches safe data URLs. Only matches image, video and audio types.
*
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
*/
var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;
var allowedAttribute = function allowedAttribute(attr, allowedAttributeList) {
var attrName = attr.nodeName.toLowerCase();
if (allowedAttributeList.indexOf(attrName) !== -1) {
if (uriAttrs.indexOf(attrName) !== -1) {
return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN));
}
return true;
}
var regExp = allowedAttributeList.filter(function (attrRegex) {
return attrRegex instanceof RegExp;
}); // Check if a regular expression validates the attribute.
for (var i = 0, l = regExp.length; i < l; i++) {
if (attrName.match(regExp[i])) {
return true;
}
}
return false;
};
var DefaultWhitelist = {
// Global attributes allowed on any supplied element below.
'*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
@ -2650,48 +3474,9 @@
strong: [],
u: [],
ul: []
/**
* A pattern that recognizes a commonly useful subset of URLs that are safe.
*
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
*/
};
var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;
/**
* A pattern that matches safe data URLs. Only matches image, video and audio types.
*
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
*/
var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;
function allowedAttribute(attr, allowedAttributeList) {
var attrName = attr.nodeName.toLowerCase();
if (allowedAttributeList.indexOf(attrName) !== -1) {
if (uriAttrs.indexOf(attrName) !== -1) {
return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN));
}
return true;
}
var regExp = allowedAttributeList.filter(function (attrRegex) {
return attrRegex instanceof RegExp;
}); // Check if a regular expression validates the attribute.
for (var i = 0, l = regExp.length; i < l; i++) {
if (attrName.match(regExp[i])) {
return true;
}
}
return false;
}
function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
if (unsafeHtml.length === 0) {
if (!unsafeHtml.length) {
return unsafeHtml;
}
@ -2702,18 +3487,18 @@
var domParser = new window.DOMParser();
var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
var whitelistKeys = Object.keys(whiteList);
var elements = [].slice.call(createdDocument.body.querySelectorAll('*'));
var elements = makeArray(createdDocument.body.querySelectorAll('*'));
var _loop = function _loop(i, len) {
var el = elements[i];
var elName = el.nodeName.toLowerCase();
if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {
if (whitelistKeys.indexOf(elName) === -1) {
el.parentNode.removeChild(el);
return "continue";
}
var attributeList = [].slice.call(el.attributes);
var attributeList = makeArray(el.attributes);
var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
attributeList.forEach(function (attr) {
if (!allowedAttribute(attr, whitelistedAttributes)) {
@ -2741,7 +3526,6 @@
var VERSION$6 = '4.3.1';
var DATA_KEY$6 = 'bs.tooltip';
var EVENT_KEY$6 = "." + DATA_KEY$6;
var JQUERY_NO_CONFLICT$6 = $.fn[NAME$6];
var CLASS_PREFIX = 'bs-tooltip';
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];
@ -2771,7 +3555,7 @@
};
var Default$4 = {
animation: true,
template: '<div class="tooltip" role="tooltip">' + '<div class="arrow"></div>' + '<div class="tooltip-inner"></div></div>',
template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div></div>',
trigger: 'hover focus',
title: '',
delay: 0,
@ -2790,7 +3574,7 @@
SHOW: 'show',
OUT: 'out'
};
var Event$6 = {
var Event$7 = {
HIDE: "hide" + EVENT_KEY$6,
HIDDEN: "hidden" + EVENT_KEY$6,
SHOW: "show" + EVENT_KEY$6,
@ -2809,7 +3593,7 @@
var Selector$6 = {
TOOLTIP: '.tooltip',
TOOLTIP_INNER: '.tooltip-inner',
ARROW: '.arrow'
TOOLTIP_ARROW: '.tooltip-arrow'
};
var Trigger = {
HOVER: 'hover',
@ -2833,7 +3617,7 @@
* Popper - https://popper.js.org
*/
if (typeof Popper === 'undefined') {
throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org/)');
throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org)');
} // private
@ -2848,6 +3632,8 @@
this.tip = null;
this._setListeners();
Data.setData(element, this.constructor.DATA_KEY, this);
} // Getters
@ -2873,11 +3659,11 @@
if (event) {
var dataKey = this.constructor.DATA_KEY;
var context = $(event.currentTarget).data(dataKey);
var context = Data.getData(event.delegateTarget, dataKey);
if (!context) {
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
$(event.currentTarget).data(dataKey, context);
context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
Data.setData(event.delegateTarget, dataKey, context);
}
context._activeTrigger.click = !context._activeTrigger.click;
@ -2888,7 +3674,7 @@
context._leave(null, context);
}
} else {
if ($(this.getTipElement()).hasClass(ClassName$6.SHOW)) {
if (this.getTipElement().classList.contains(ClassName$6.SHOW)) {
this._leave(null, this);
return;
@ -2900,12 +3686,12 @@
_proto.dispose = function dispose() {
clearTimeout(this._timeout);
$.removeData(this.element, this.constructor.DATA_KEY);
$(this.element).off(this.constructor.EVENT_KEY);
$(this.element).closest('.modal').off('hide.bs.modal');
Data.removeData(this.element, this.constructor.DATA_KEY);
EventHandler.off(this.element, this.constructor.EVENT_KEY);
EventHandler.off(SelectorEngine.closest(this.element, '.modal'), 'hide.bs.modal');
if (this.tip) {
$(this.tip).remove();
this.tip.parentNode.removeChild(this.tip);
}
this._isEnabled = null;
@ -2926,29 +3712,27 @@
_proto.show = function show() {
var _this = this;
if ($(this.element).css('display') === 'none') {
if (this.element.style.display === 'none') {
throw new Error('Please use show on visible elements');
}
var showEvent = $.Event(this.constructor.Event.SHOW);
if (this.isWithContent() && this._isEnabled) {
$(this.element).trigger(showEvent);
var shadowRoot = Util.findShadowRoot(this.element);
var isInTheDom = $.contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element);
var showEvent = EventHandler.trigger(this.element, this.constructor.Event.SHOW);
var shadowRoot = findShadowRoot(this.element);
var isInTheDom = shadowRoot !== null ? shadowRoot.contains(this.element) : this.element.ownerDocument.documentElement.contains(this.element);
if (showEvent.isDefaultPrevented() || !isInTheDom) {
if (showEvent.defaultPrevented || !isInTheDom) {
return;
}
var tip = this.getTipElement();
var tipId = Util.getUID(this.constructor.NAME);
var tipId = getUID(this.constructor.NAME);
tip.setAttribute('id', tipId);
this.element.setAttribute('aria-describedby', tipId);
this.setContent();
if (this.config.animation) {
$(tip).addClass(ClassName$6.FADE);
tip.classList.add(ClassName$6.FADE);
}
var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
@ -2959,13 +3743,13 @@
var container = this._getContainer();
$(tip).data(this.constructor.DATA_KEY, this);
Data.setData(tip, this.constructor.DATA_KEY, this);
if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {
$(tip).appendTo(container);
if (!this.element.ownerDocument.documentElement.contains(this.tip)) {
container.appendChild(tip);
}
$(this.element).trigger(this.constructor.Event.INSERTED);
EventHandler.trigger(this.element, this.constructor.Event.INSERTED);
this._popper = new Popper(this.element, tip, {
placement: attachment,
modifiers: {
@ -2974,7 +3758,7 @@
behavior: this.config.fallbackPlacement
},
arrow: {
element: Selector$6.ARROW
element: Selector$6.TOOLTIP_ARROW
},
preventOverflow: {
boundariesElement: this.config.boundary
@ -2989,13 +3773,15 @@
return _this._handlePopperPlacementChange(data);
}
});
$(tip).addClass(ClassName$6.SHOW); // If this is a touch-enabled device we add extra
tip.classList.add(ClassName$6.SHOW); // If this is a touch-enabled device we add extra
// empty mouseover listeners to the body's immediate children;
// only needed because of broken event delegation on iOS
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
if ('ontouchstart' in document.documentElement) {
$(document.body).children().on('mouseover', null, $.noop);
makeArray(document.body.children).forEach(function (element) {
EventHandler.on(element, 'mouseover', noop());
});
}
var complete = function complete() {
@ -3005,16 +3791,17 @@
var prevHoverState = _this._hoverState;
_this._hoverState = null;
$(_this.element).trigger(_this.constructor.Event.SHOWN);
EventHandler.trigger(_this.element, _this.constructor.Event.SHOWN);
if (prevHoverState === HoverState.OUT) {
_this._leave(null, _this);
}
};
if ($(this.tip).hasClass(ClassName$6.FADE)) {
var transitionDuration = Util.getTransitionDurationFromElement(this.tip);
$(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
if (this.tip.classList.contains(ClassName$6.FADE)) {
var transitionDuration = getTransitionDurationFromElement(this.tip);
EventHandler.one(this.tip, TRANSITION_END, complete);
emulateTransitionEnd(this.tip, transitionDuration);
} else {
complete();
}
@ -3025,7 +3812,6 @@
var _this2 = this;
var tip = this.getTipElement();
var hideEvent = $.Event(this.constructor.Event.HIDE);
var complete = function complete() {
if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) {
@ -3036,7 +3822,7 @@
_this2.element.removeAttribute('aria-describedby');
$(_this2.element).trigger(_this2.constructor.Event.HIDDEN);
EventHandler.trigger(_this2.element, _this2.constructor.Event.HIDDEN);
if (_this2._popper !== null) {
_this2._popper.destroy();
@ -3047,26 +3833,29 @@
}
};
$(this.element).trigger(hideEvent);
var hideEvent = EventHandler.trigger(this.element, this.constructor.Event.HIDE);
if (hideEvent.isDefaultPrevented()) {
if (hideEvent.defaultPrevented) {
return;
}
$(tip).removeClass(ClassName$6.SHOW); // If this is a touch-enabled device we remove the extra
tip.classList.remove(ClassName$6.SHOW); // If this is a touch-enabled device we remove the extra
// empty mouseover listeners we added for iOS support
if ('ontouchstart' in document.documentElement) {
$(document.body).children().off('mouseover', null, $.noop);
makeArray(document.body.children).forEach(function (element) {
return EventHandler.off(element, 'mouseover', noop);
});
}
this._activeTrigger[Trigger.CLICK] = false;
this._activeTrigger[Trigger.FOCUS] = false;
this._activeTrigger[Trigger.HOVER] = false;
if ($(this.tip).hasClass(ClassName$6.FADE)) {
var transitionDuration = Util.getTransitionDurationFromElement(tip);
$(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
if (this.tip.classList.contains(ClassName$6.FADE)) {
var transitionDuration = getTransitionDurationFromElement(tip);
EventHandler.one(tip, TRANSITION_END, complete);
emulateTransitionEnd(tip, transitionDuration);
} else {
complete();
}
@ -3086,29 +3875,45 @@
};
_proto.addAttachmentClass = function addAttachmentClass(attachment) {
$(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
this.getTipElement().classList.add(CLASS_PREFIX + "-" + attachment);
};
_proto.getTipElement = function getTipElement() {
this.tip = this.tip || $(this.config.template)[0];
if (this.tip) {
return this.tip;
}
var element = document.createElement('div');
element.innerHTML = this.config.template;
this.tip = element.children[0];
return this.tip;
};
_proto.setContent = function setContent() {
var tip = this.getTipElement();
this.setElementContent($(tip.querySelectorAll(Selector$6.TOOLTIP_INNER)), this.getTitle());
$(tip).removeClass(ClassName$6.FADE + " " + ClassName$6.SHOW);
this.setElementContent(SelectorEngine.findOne(Selector$6.TOOLTIP_INNER, tip), this.getTitle());
tip.classList.remove(ClassName$6.FADE);
tip.classList.remove(ClassName$6.SHOW);
};
_proto.setElementContent = function setElementContent($element, content) {
_proto.setElementContent = function setElementContent(element, content) {
if (element === null) {
return;
}
if (typeof content === 'object' && (content.nodeType || content.jquery)) {
// Content is a DOM node or a jQuery
if (content.jquery) {
content = content[0];
} // content is a DOM node or a jQuery
if (this.config.html) {
if (!$(content).parent().is($element)) {
$element.empty().append(content);
if (content.parentNode !== element) {
element.innerHTML = '';
element.appendChild(content);
}
} else {
$element.text($(content).text());
element.innerText = content.textContent;
}
return;
@ -3119,9 +3924,9 @@
content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn);
}
$element.html(content);
element.innerHTML = content;
} else {
$element.text(content);
element.innerText = content;
}
};
@ -3158,11 +3963,11 @@
return document.body;
}
if (Util.isElement(this.config.container)) {
return $(this.config.container);
if (isElement(this.config.container)) {
return this.config.container;
}
return $(document).find(this.config.container);
return SelectorEngine.findOne(this.config.container);
};
_proto._getAttachment = function _getAttachment(placement) {
@ -3175,20 +3980,21 @@
var triggers = this.config.trigger.split(' ');
triggers.forEach(function (trigger) {
if (trigger === 'click') {
$(_this4.element).on(_this4.constructor.Event.CLICK, _this4.config.selector, function (event) {
EventHandler.on(_this4.element, _this4.constructor.Event.CLICK, _this4.config.selector, function (event) {
return _this4.toggle(event);
});
} else if (trigger !== Trigger.MANUAL) {
var eventIn = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSEENTER : _this4.constructor.Event.FOCUSIN;
var eventOut = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSELEAVE : _this4.constructor.Event.FOCUSOUT;
$(_this4.element).on(eventIn, _this4.config.selector, function (event) {
EventHandler.on(_this4.element, eventIn, _this4.config.selector, function (event) {
return _this4._enter(event);
}).on(eventOut, _this4.config.selector, function (event) {
});
EventHandler.on(_this4.element, eventOut, _this4.config.selector, function (event) {
return _this4._leave(event);
});
}
});
$(this.element).closest('.modal').on('hide.bs.modal', function () {
EventHandler.on(SelectorEngine.closest(this.element, '.modal'), 'hide.bs.modal', function () {
if (_this4.element) {
_this4.hide();
}
@ -3215,18 +4021,18 @@
_proto._enter = function _enter(event, context) {
var dataKey = this.constructor.DATA_KEY;
context = context || $(event.currentTarget).data(dataKey);
context = context || Data.getData(event.delegateTarget, dataKey);
if (!context) {
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
$(event.currentTarget).data(dataKey, context);
context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
Data.setData(event.delegateTarget, dataKey, context);
}
if (event) {
context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
}
if ($(context.getTipElement()).hasClass(ClassName$6.SHOW) || context._hoverState === HoverState.SHOW) {
if (context.getTipElement().classList.contains(ClassName$6.SHOW) || context._hoverState === HoverState.SHOW) {
context._hoverState = HoverState.SHOW;
return;
}
@ -3248,11 +4054,11 @@
_proto._leave = function _leave(event, context) {
var dataKey = this.constructor.DATA_KEY;
context = context || $(event.currentTarget).data(dataKey);
context = context || Data.getData(event.delegateTarget, dataKey);
if (!context) {
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
$(event.currentTarget).data(dataKey, context);
context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
Data.setData(event.delegateTarget, dataKey, context);
}
if (event) {
@ -3289,12 +4095,17 @@
};
_proto._getConfig = function _getConfig(config) {
var dataAttributes = $(this.element).data();
var dataAttributes = Manipulator.getDataAttributes(this.element);
Object.keys(dataAttributes).forEach(function (dataAttr) {
if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {
delete dataAttributes[dataAttr];
}
});
if (config && typeof config.container === 'object' && config.container.jquery) {
config.container = config.container[0];
}
config = _objectSpread({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
if (typeof config.delay === 'number') {
@ -3312,7 +4123,7 @@
config.content = config.content.toString();
}
Util.typeCheckConfig(NAME$6, config, this.constructor.DefaultType);
typeCheckConfig(NAME$6, config, this.constructor.DefaultType);
if (config.sanitize) {
config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn);
@ -3336,11 +4147,15 @@
};
_proto._cleanTipClass = function _cleanTipClass() {
var $tip = $(this.getTipElement());
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
var tip = this.getTipElement();
var tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);
if (tabClass !== null && tabClass.length) {
$tip.removeClass(tabClass.join(''));
tabClass.map(function (token) {
return token.trim();
}).forEach(function (tClass) {
return tip.classList.remove(tClass);
});
}
};
@ -3361,7 +4176,7 @@
return;
}
$(tip).removeClass(ClassName$6.FADE);
tip.classList.remove(ClassName$6.FADE);
this.config.animation = false;
this.hide();
this.show();
@ -3371,7 +4186,7 @@
Tooltip._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var data = $(this).data(DATA_KEY$6);
var data = Data.getData(this, DATA_KEY$6);
var _config = typeof config === 'object' && config;
@ -3381,7 +4196,6 @@
if (!data) {
data = new Tooltip(this, _config);
$(this).data(DATA_KEY$6, data);
}
if (typeof config === 'string') {
@ -3394,6 +4208,10 @@
});
};
Tooltip._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY$6);
};
_createClass(Tooltip, null, [{
key: "VERSION",
get: function get() {
@ -3417,7 +4235,7 @@
}, {
key: "Event",
get: function get() {
return Event$6;
return Event$7;
}
}, {
key: "EVENT_KEY",
@ -3437,16 +4255,20 @@
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
* add .tooltip to jQuery only if jQuery is present
*/
$.fn[NAME$6] = Tooltip._jQueryInterface;
$.fn[NAME$6].Constructor = Tooltip;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT$6 = jQuery.fn[NAME$6];
jQuery.fn[NAME$6] = Tooltip._jQueryInterface;
jQuery.fn[NAME$6].Constructor = Tooltip;
$.fn[NAME$6].noConflict = function () {
$.fn[NAME$6] = JQUERY_NO_CONFLICT$6;
return Tooltip._jQueryInterface;
};
jQuery.fn[NAME$6].noConflict = function () {
jQuery.fn[NAME$6] = JQUERY_NO_CONFLICT$6;
return Tooltip._jQueryInterface;
};
}
/**
* ------------------------------------------------------------------------
@ -3458,7 +4280,6 @@
var VERSION$7 = '4.3.1';
var DATA_KEY$7 = 'bs.popover';
var EVENT_KEY$7 = "." + DATA_KEY$7;
var JQUERY_NO_CONFLICT$7 = $.fn[NAME$7];
var CLASS_PREFIX$1 = 'bs-popover';
var BSCLS_PREFIX_REGEX$1 = new RegExp("(^|\\s)" + CLASS_PREFIX$1 + "\\S+", 'g');
@ -3466,7 +4287,7 @@
placement: 'right',
trigger: 'click',
content: '',
template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
});
var DefaultType$5 = _objectSpread({}, Tooltip.DefaultType, {
@ -3481,7 +4302,7 @@
TITLE: '.popover-header',
CONTENT: '.popover-body'
};
var Event$7 = {
var Event$8 = {
HIDE: "hide" + EVENT_KEY$7,
HIDDEN: "hidden" + EVENT_KEY$7,
SHOW: "show" + EVENT_KEY$7,
@ -3517,18 +4338,13 @@
};
_proto.addAttachmentClass = function addAttachmentClass(attachment) {
$(this.getTipElement()).addClass(CLASS_PREFIX$1 + "-" + attachment);
};
_proto.getTipElement = function getTipElement() {
this.tip = this.tip || $(this.config.template)[0];
return this.tip;
this.getTipElement().classList.add(CLASS_PREFIX$1 + "-" + attachment);
};
_proto.setContent = function setContent() {
var $tip = $(this.getTipElement()); // We use append for html objects to maintain js events
var tip = this.getTipElement(); // we use append for html objects to maintain js events
this.setElementContent($tip.find(Selector$7.TITLE), this.getTitle());
this.setElementContent(SelectorEngine.findOne(Selector$7.TITLE, tip), this.getTitle());
var content = this._getContent();
@ -3536,8 +4352,9 @@
content = content.call(this.element);
}
this.setElementContent($tip.find(Selector$7.CONTENT), content);
$tip.removeClass(ClassName$7.FADE + " " + ClassName$7.SHOW);
this.setElementContent(SelectorEngine.findOne(Selector$7.CONTENT, tip), content);
tip.classList.remove(ClassName$7.FADE);
tip.classList.remove(ClassName$7.SHOW);
} // Private
;
@ -3546,18 +4363,22 @@
};
_proto._cleanTipClass = function _cleanTipClass() {
var $tip = $(this.getTipElement());
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX$1);
var tip = this.getTipElement();
var tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX$1);
if (tabClass !== null && tabClass.length > 0) {
$tip.removeClass(tabClass.join(''));
tabClass.map(function (token) {
return token.trim();
}).forEach(function (tClass) {
return tip.classList.remove(tClass);
});
}
} // Static
;
Popover._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var data = $(this).data(DATA_KEY$7);
var data = Data.getData(this, DATA_KEY$7);
var _config = typeof config === 'object' ? config : null;
@ -3567,7 +4388,7 @@
if (!data) {
data = new Popover(this, _config);
$(this).data(DATA_KEY$7, data);
Data.setData(this, DATA_KEY$7, data);
}
if (typeof config === 'string') {
@ -3580,6 +4401,10 @@
});
};
Popover._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY$7);
};
_createClass(Popover, null, [{
key: "VERSION",
// Getters
@ -3604,7 +4429,7 @@
}, {
key: "Event",
get: function get() {
return Event$7;
return Event$8;
}
}, {
key: "EVENT_KEY",
@ -3627,13 +4452,16 @@
*/
$.fn[NAME$7] = Popover._jQueryInterface;
$.fn[NAME$7].Constructor = Popover;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT$7 = jQuery.fn[NAME$7];
jQuery.fn[NAME$7] = Popover._jQueryInterface;
jQuery.fn[NAME$7].Constructor = Popover;
$.fn[NAME$7].noConflict = function () {
$.fn[NAME$7] = JQUERY_NO_CONFLICT$7;
return Popover._jQueryInterface;
};
jQuery.fn[NAME$7].noConflict = function () {
jQuery.fn[NAME$7] = JQUERY_NO_CONFLICT$7;
return Popover._jQueryInterface;
};
}
/**
* ------------------------------------------------------------------------
@ -3646,7 +4474,6 @@
var DATA_KEY$8 = 'bs.scrollspy';
var EVENT_KEY$8 = "." + DATA_KEY$8;
var DATA_API_KEY$6 = '.data-api';
var JQUERY_NO_CONFLICT$8 = $.fn[NAME$8];
var Default$6 = {
offset: 10,
method: 'auto',
@ -3657,7 +4484,7 @@
method: 'string',
target: '(string|element)'
};
var Event$8 = {
var Event$9 = {
ACTIVATE: "activate" + EVENT_KEY$8,
SCROLL: "scroll" + EVENT_KEY$8,
LOAD_DATA_API: "load" + EVENT_KEY$8 + DATA_API_KEY$6
@ -3703,12 +4530,14 @@
this._targets = [];
this._activeTarget = null;
this._scrollHeight = 0;
$(this._scrollElement).on(Event$8.SCROLL, function (event) {
EventHandler.on(this._scrollElement, Event$9.SCROLL, function (event) {
return _this._process(event);
});
this.refresh();
this._process();
Data.setData(element, DATA_KEY$8, this);
} // Getters
@ -3724,13 +4553,13 @@
this._offsets = [];
this._targets = [];
this._scrollHeight = this._getScrollHeight();
var targets = [].slice.call(document.querySelectorAll(this._selector));
var targets = makeArray(SelectorEngine.find(this._selector));
targets.map(function (element) {
var target;
var targetSelector = Util.getSelectorFromElement(element);
var targetSelector = getSelectorFromElement(element);
if (targetSelector) {
target = document.querySelector(targetSelector);
target = SelectorEngine.findOne(targetSelector);
}
if (target) {
@ -3738,7 +4567,7 @@
if (targetBCR.width || targetBCR.height) {
// TODO (fat): remove sketch reliance on jQuery position/offset
return [$(target)[offsetMethod]().top + offsetBase, targetSelector];
return [Manipulator[offsetMethod](target).top + offsetBase, targetSelector];
}
}
@ -3755,8 +4584,8 @@
};
_proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY$8);
$(this._scrollElement).off(EVENT_KEY$8);
Data.removeData(this._element, DATA_KEY$8);
EventHandler.off(this._scrollElement, EVENT_KEY$8);
this._element = null;
this._scrollElement = null;
this._config = null;
@ -3772,17 +4601,17 @@
config = _objectSpread({}, Default$6, typeof config === 'object' && config ? config : {});
if (typeof config.target !== 'string') {
var id = $(config.target).attr('id');
var id = config.target.id;
if (!id) {
id = Util.getUID(NAME$8);
$(config.target).attr('id', id);
id = getUID(NAME$8);
config.target.id = id;
}
config.target = "#" + id;
}
Util.typeCheckConfig(NAME$8, config, DefaultType$6);
typeCheckConfig(NAME$8, config, DefaultType$6);
return config;
};
@ -3847,28 +4676,36 @@
return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]";
});
var $link = $([].slice.call(document.querySelectorAll(queries.join(','))));
var link = SelectorEngine.findOne(queries.join(','));
if ($link.hasClass(ClassName$8.DROPDOWN_ITEM)) {
$link.closest(Selector$8.DROPDOWN).find(Selector$8.DROPDOWN_TOGGLE).addClass(ClassName$8.ACTIVE);
$link.addClass(ClassName$8.ACTIVE);
if (link.classList.contains(ClassName$8.DROPDOWN_ITEM)) {
SelectorEngine.findOne(Selector$8.DROPDOWN_TOGGLE, SelectorEngine.closest(link, Selector$8.DROPDOWN)).classList.add(ClassName$8.ACTIVE);
link.classList.add(ClassName$8.ACTIVE);
} else {
// Set triggered link as active
$link.addClass(ClassName$8.ACTIVE); // Set triggered links parents as active
// With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
link.classList.add(ClassName$8.ACTIVE);
SelectorEngine.parents(link, Selector$8.NAV_LIST_GROUP).forEach(function (listGroup) {
// Set triggered links parents as active
// With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
SelectorEngine.prev(listGroup, Selector$8.NAV_LINKS + ", " + Selector$8.LIST_ITEMS).forEach(function (item) {
return item.classList.add(ClassName$8.ACTIVE);
}); // Handle special case when .nav-link is inside .nav-item
$link.parents(Selector$8.NAV_LIST_GROUP).prev(Selector$8.NAV_LINKS + ", " + Selector$8.LIST_ITEMS).addClass(ClassName$8.ACTIVE); // Handle special case when .nav-link is inside .nav-item
$link.parents(Selector$8.NAV_LIST_GROUP).prev(Selector$8.NAV_ITEMS).children(Selector$8.NAV_LINKS).addClass(ClassName$8.ACTIVE);
SelectorEngine.prev(listGroup, Selector$8.NAV_ITEMS).forEach(function (navItem) {
SelectorEngine.children(navItem, Selector$8.NAV_LINKS).forEach(function (item) {
return item.classList.add(ClassName$8.ACTIVE);
});
});
});
}
$(this._scrollElement).trigger(Event$8.ACTIVATE, {
EventHandler.trigger(this._scrollElement, Event$9.ACTIVATE, {
relatedTarget: target
});
};
_proto._clear = function _clear() {
[].slice.call(document.querySelectorAll(this._selector)).filter(function (node) {
makeArray(SelectorEngine.find(this._selector)).filter(function (node) {
return node.classList.contains(ClassName$8.ACTIVE);
}).forEach(function (node) {
return node.classList.remove(ClassName$8.ACTIVE);
@ -3878,13 +4715,12 @@
ScrollSpy._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var data = $(this).data(DATA_KEY$8);
var data = Data.getData(this, DATA_KEY$8);
var _config = typeof config === 'object' && config;
if (!data) {
data = new ScrollSpy(this, _config);
$(this).data(DATA_KEY$8, data);
}
if (typeof config === 'string') {
@ -3897,6 +4733,10 @@
});
};
ScrollSpy._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY$8);
};
_createClass(ScrollSpy, null, [{
key: "VERSION",
get: function get() {
@ -3918,15 +4758,10 @@
*/
$(window).on(Event$8.LOAD_DATA_API, function () {
var scrollSpys = [].slice.call(document.querySelectorAll(Selector$8.DATA_SPY));
var scrollSpysLength = scrollSpys.length;
for (var i = scrollSpysLength; i--;) {
var $spy = $(scrollSpys[i]);
ScrollSpy._jQueryInterface.call($spy, $spy.data());
}
EventHandler.on(window, Event$9.LOAD_DATA_API, function () {
makeArray(SelectorEngine.find(Selector$8.DATA_SPY)).forEach(function (spy) {
return new ScrollSpy(spy, Manipulator.getDataAttributes(spy));
});
});
/**
* ------------------------------------------------------------------------
@ -3934,13 +4769,16 @@
* ------------------------------------------------------------------------
*/
$.fn[NAME$8] = ScrollSpy._jQueryInterface;
$.fn[NAME$8].Constructor = ScrollSpy;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT$8 = jQuery.fn[NAME$8];
jQuery.fn[NAME$8] = ScrollSpy._jQueryInterface;
jQuery.fn[NAME$8].Constructor = ScrollSpy;
$.fn[NAME$8].noConflict = function () {
$.fn[NAME$8] = JQUERY_NO_CONFLICT$8;
return ScrollSpy._jQueryInterface;
};
jQuery.fn[NAME$8].noConflict = function () {
jQuery.fn[NAME$8] = JQUERY_NO_CONFLICT$8;
return ScrollSpy._jQueryInterface;
};
}
/**
* ------------------------------------------------------------------------
@ -3953,8 +4791,7 @@
var DATA_KEY$9 = 'bs.tab';
var EVENT_KEY$9 = "." + DATA_KEY$9;
var DATA_API_KEY$7 = '.data-api';
var JQUERY_NO_CONFLICT$9 = $.fn[NAME$9];
var Event$9 = {
var Event$a = {
HIDE: "hide" + EVENT_KEY$9,
HIDDEN: "hidden" + EVENT_KEY$9,
SHOW: "show" + EVENT_KEY$9,
@ -3972,10 +4809,10 @@
DROPDOWN: '.dropdown',
NAV_LIST_GROUP: '.nav, .list-group',
ACTIVE: '.active',
ACTIVE_UL: '> li > .active',
ACTIVE_UL: ':scope > li > .active',
DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',
DROPDOWN_TOGGLE: '.dropdown-toggle',
DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active'
DROPDOWN_ACTIVE_CHILD: ':scope > .dropdown-menu .active'
/**
* ------------------------------------------------------------------------
* Class Definition
@ -3989,6 +4826,7 @@
function () {
function Tab(element) {
this._element = element;
Data.setData(this._element, DATA_KEY$9, this);
} // Getters
@ -3998,53 +4836,50 @@
_proto.show = function show() {
var _this = this;
if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName$9.ACTIVE) || $(this._element).hasClass(ClassName$9.DISABLED)) {
if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && this._element.classList.contains(ClassName$9.ACTIVE) || this._element.classList.contains(ClassName$9.DISABLED)) {
return;
}
var target;
var previous;
var listElement = $(this._element).closest(Selector$9.NAV_LIST_GROUP)[0];
var selector = Util.getSelectorFromElement(this._element);
var listElement = SelectorEngine.closest(this._element, Selector$9.NAV_LIST_GROUP);
var selector = getSelectorFromElement(this._element);
if (listElement) {
var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? Selector$9.ACTIVE_UL : Selector$9.ACTIVE;
previous = $.makeArray($(listElement).find(itemSelector));
previous = makeArray(SelectorEngine.find(itemSelector, listElement));
previous = previous[previous.length - 1];
}
var hideEvent = $.Event(Event$9.HIDE, {
relatedTarget: this._element
});
var showEvent = $.Event(Event$9.SHOW, {
var hideEvent = null;
if (previous) {
hideEvent = EventHandler.trigger(previous, Event$a.HIDE, {
relatedTarget: this._element
});
}
var showEvent = EventHandler.trigger(this._element, Event$a.SHOW, {
relatedTarget: previous
});
if (previous) {
$(previous).trigger(hideEvent);
}
$(this._element).trigger(showEvent);
if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {
if (showEvent.defaultPrevented || hideEvent !== null && hideEvent.defaultPrevented) {
return;
}
if (selector) {
target = document.querySelector(selector);
target = SelectorEngine.findOne(selector);
}
this._activate(this._element, listElement);
var complete = function complete() {
var hiddenEvent = $.Event(Event$9.HIDDEN, {
EventHandler.trigger(previous, Event$a.HIDDEN, {
relatedTarget: _this._element
});
var shownEvent = $.Event(Event$9.SHOWN, {
EventHandler.trigger(_this._element, Event$a.SHOWN, {
relatedTarget: previous
});
$(previous).trigger(hiddenEvent);
$(_this._element).trigger(shownEvent);
};
if (target) {
@ -4055,7 +4890,7 @@
};
_proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY$9);
Data.removeData(this._element, DATA_KEY$9);
this._element = null;
} // Private
;
@ -4063,17 +4898,19 @@
_proto._activate = function _activate(element, container, callback) {
var _this2 = this;
var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? $(container).find(Selector$9.ACTIVE_UL) : $(container).children(Selector$9.ACTIVE);
var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? SelectorEngine.find(Selector$9.ACTIVE_UL, container) : SelectorEngine.children(container, Selector$9.ACTIVE);
var active = activeElements[0];
var isTransitioning = callback && active && $(active).hasClass(ClassName$9.FADE);
var isTransitioning = callback && active && active.classList.contains(ClassName$9.FADE);
var complete = function complete() {
return _this2._transitionComplete(element, active, callback);
};
if (active && isTransitioning) {
var transitionDuration = Util.getTransitionDurationFromElement(active);
$(active).removeClass(ClassName$9.SHOW).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
var transitionDuration = getTransitionDurationFromElement(active);
active.classList.remove(ClassName$9.SHOW);
EventHandler.one(active, TRANSITION_END, complete);
emulateTransitionEnd(active, transitionDuration);
} else {
complete();
}
@ -4081,11 +4918,11 @@
_proto._transitionComplete = function _transitionComplete(element, active, callback) {
if (active) {
$(active).removeClass(ClassName$9.ACTIVE);
var dropdownChild = $(active.parentNode).find(Selector$9.DROPDOWN_ACTIVE_CHILD)[0];
active.classList.remove(ClassName$9.ACTIVE);
var dropdownChild = SelectorEngine.findOne(Selector$9.DROPDOWN_ACTIVE_CHILD, active.parentNode);
if (dropdownChild) {
$(dropdownChild).removeClass(ClassName$9.ACTIVE);
dropdownChild.classList.remove(ClassName$9.ACTIVE);
}
if (active.getAttribute('role') === 'tab') {
@ -4093,24 +4930,25 @@
}
}
$(element).addClass(ClassName$9.ACTIVE);
element.classList.add(ClassName$9.ACTIVE);
if (element.getAttribute('role') === 'tab') {
element.setAttribute('aria-selected', true);
}
Util.reflow(element);
reflow(element);
if (element.classList.contains(ClassName$9.FADE)) {
element.classList.add(ClassName$9.SHOW);
}
if (element.parentNode && $(element.parentNode).hasClass(ClassName$9.DROPDOWN_MENU)) {
var dropdownElement = $(element).closest(Selector$9.DROPDOWN)[0];
if (element.parentNode && element.parentNode.classList.contains(ClassName$9.DROPDOWN_MENU)) {
var dropdownElement = SelectorEngine.closest(element, Selector$9.DROPDOWN);
if (dropdownElement) {
var dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(Selector$9.DROPDOWN_TOGGLE));
$(dropdownToggleList).addClass(ClassName$9.ACTIVE);
makeArray(SelectorEngine.find(Selector$9.DROPDOWN_TOGGLE)).forEach(function (dropdown) {
return dropdown.classList.add(ClassName$9.ACTIVE);
});
}
element.setAttribute('aria-expanded', true);
@ -4124,13 +4962,7 @@
Tab._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var $this = $(this);
var data = $this.data(DATA_KEY$9);
if (!data) {
data = new Tab(this);
$this.data(DATA_KEY$9, data);
}
var data = Data.getData(this, DATA_KEY$9) || new Tab(this);
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
@ -4142,6 +4974,10 @@
});
};
Tab._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY$9);
};
_createClass(Tab, null, [{
key: "VERSION",
get: function get() {
@ -4158,24 +4994,28 @@
*/
$(document).on(Event$9.CLICK_DATA_API, Selector$9.DATA_TOGGLE, function (event) {
EventHandler.on(document, Event$a.CLICK_DATA_API, Selector$9.DATA_TOGGLE, function (event) {
event.preventDefault();
Tab._jQueryInterface.call($(this), 'show');
var data = Data.getData(this, DATA_KEY$9) || new Tab(this);
data.show();
});
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
* add .tab to jQuery only if jQuery is present
*/
$.fn[NAME$9] = Tab._jQueryInterface;
$.fn[NAME$9].Constructor = Tab;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT$9 = jQuery.fn[NAME$9];
jQuery.fn[NAME$9] = Tab._jQueryInterface;
jQuery.fn[NAME$9].Constructor = Tab;
$.fn[NAME$9].noConflict = function () {
$.fn[NAME$9] = JQUERY_NO_CONFLICT$9;
return Tab._jQueryInterface;
};
jQuery.fn[NAME$9].noConflict = function () {
jQuery.fn[NAME$9] = JQUERY_NO_CONFLICT$9;
return Tab._jQueryInterface;
};
}
/**
* ------------------------------------------------------------------------
@ -4187,8 +5027,7 @@
var VERSION$a = '4.3.1';
var DATA_KEY$a = 'bs.toast';
var EVENT_KEY$a = "." + DATA_KEY$a;
var JQUERY_NO_CONFLICT$a = $.fn[NAME$a];
var Event$a = {
var Event$b = {
CLICK_DISMISS: "click.dismiss" + EVENT_KEY$a,
HIDE: "hide" + EVENT_KEY$a,
HIDDEN: "hidden" + EVENT_KEY$a,
@ -4230,6 +5069,8 @@
this._timeout = null;
this._setListeners();
Data.setData(element, DATA_KEY$a, this);
} // Getters
@ -4239,7 +5080,7 @@
_proto.show = function show() {
var _this = this;
$(this._element).trigger(Event$a.SHOW);
EventHandler.trigger(this._element, Event$b.SHOW);
if (this._config.animation) {
this._element.classList.add(ClassName$a.FADE);
@ -4250,7 +5091,7 @@
_this._element.classList.add(ClassName$a.SHOW);
$(_this._element).trigger(Event$a.SHOWN);
EventHandler.trigger(_this._element, Event$b.SHOWN);
if (_this._config.autohide) {
_this.hide();
@ -4262,8 +5103,9 @@
this._element.classList.add(ClassName$a.SHOWING);
if (this._config.animation) {
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
var transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, TRANSITION_END, complete);
emulateTransitionEnd(this._element, transitionDuration);
} else {
complete();
}
@ -4276,7 +5118,7 @@
return;
}
$(this._element).trigger(Event$a.HIDE);
EventHandler.trigger(this._element, Event$b.HIDE);
if (withoutTimeout) {
this._close();
@ -4295,23 +5137,23 @@
this._element.classList.remove(ClassName$a.SHOW);
}
$(this._element).off(Event$a.CLICK_DISMISS);
$.removeData(this._element, DATA_KEY$a);
EventHandler.off(this._element, Event$b.CLICK_DISMISS);
Data.removeData(this._element, DATA_KEY$a);
this._element = null;
this._config = null;
} // Private
;
_proto._getConfig = function _getConfig(config) {
config = _objectSpread({}, Default$7, $(this._element).data(), typeof config === 'object' && config ? config : {});
Util.typeCheckConfig(NAME$a, config, this.constructor.DefaultType);
config = _objectSpread({}, Default$7, Manipulator.getDataAttributes(this._element), typeof config === 'object' && config ? config : {});
typeCheckConfig(NAME$a, config, this.constructor.DefaultType);
return config;
};
_proto._setListeners = function _setListeners() {
var _this3 = this;
$(this._element).on(Event$a.CLICK_DISMISS, Selector$a.DATA_DISMISS, function () {
EventHandler.on(this._element, Event$b.CLICK_DISMISS, Selector$a.DATA_DISMISS, function () {
return _this3.hide(true);
});
};
@ -4322,14 +5164,15 @@
var complete = function complete() {
_this4._element.classList.add(ClassName$a.HIDE);
$(_this4._element).trigger(Event$a.HIDDEN);
EventHandler.trigger(_this4._element, Event$b.HIDDEN);
};
this._element.classList.remove(ClassName$a.SHOW);
if (this._config.animation) {
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
var transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, TRANSITION_END, complete);
emulateTransitionEnd(this._element, transitionDuration);
} else {
complete();
}
@ -4338,14 +5181,12 @@
Toast._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var $element = $(this);
var data = $element.data(DATA_KEY$a);
var data = Data.getData(this, DATA_KEY$a);
var _config = typeof config === 'object' && config;
if (!data) {
data = new Toast(this, _config);
$element.data(DATA_KEY$a, data);
}
if (typeof config === 'string') {
@ -4358,6 +5199,10 @@
});
};
Toast._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY$a);
};
_createClass(Toast, null, [{
key: "VERSION",
get: function get() {
@ -4381,16 +5226,20 @@
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
* add .toast to jQuery only if jQuery is present
*/
$.fn[NAME$a] = Toast._jQueryInterface;
$.fn[NAME$a].Constructor = Toast;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT$a = jQuery.fn[NAME$a];
jQuery.fn[NAME$a] = Toast._jQueryInterface;
jQuery.fn[NAME$a].Constructor = Toast;
$.fn[NAME$a].noConflict = function () {
$.fn[NAME$a] = JQUERY_NO_CONFLICT$a;
return Toast._jQueryInterface;
};
jQuery.fn[NAME$a].noConflict = function () {
jQuery.fn[NAME$a] = JQUERY_NO_CONFLICT$a;
return Toast._jQueryInterface;
};
}
/**
* --------------------------------------------------------------------------
@ -4399,24 +5248,6 @@
* --------------------------------------------------------------------------
*/
(function () {
if (typeof $ === 'undefined') {
throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.');
}
var version = $.fn.jquery.split(' ')[0].split('.');
var minMajor = 1;
var ltMajor = 2;
var minMinor = 9;
var minPatch = 1;
var maxMajor = 4;
if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {
throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');
}
})();
exports.Util = Util;
exports.Alert = Alert;
exports.Button = Button;
exports.Carousel = Carousel;
@ -4424,7 +5255,7 @@
exports.Dropdown = Dropdown;
exports.Modal = Modal;
exports.Popover = Popover;
exports.Scrollspy = ScrollSpy;
exports.ScrollSpy = ScrollSpy;
exports.Tab = Tab;
exports.Toast = Toast;
exports.Tooltip = Tooltip;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

147
js/dist/alert.js vendored
View File

@ -4,13 +4,14 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
(global = global || self, global.Alert = factory(global.jQuery, global.Util));
}(this, function ($, Util) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/eventHandler.js'), require('./dom/selectorEngine.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/eventHandler.js', './dom/selectorEngine.js'], factory) :
(global = global || self, global.Alert = factory(global.Data, global.EventHandler, global.SelectorEngine));
}(this, function (Data, EventHandler, SelectorEngine) { 'use strict';
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data;
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler;
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine;
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@ -28,6 +29,76 @@
return Constructor;
}
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
var MILLISECONDS_MULTIPLIER = 1000;
var TRANSITION_END = 'transitionend';
var jQuery = window.jQuery; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
var getSelectorFromElement = function getSelectorFromElement(element) {
var selector = element.getAttribute('data-target');
if (!selector || selector === '#') {
var hrefAttr = element.getAttribute('href');
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
}
try {
return document.querySelector(selector) ? selector : null;
} catch (err) {
return null;
}
};
var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
if (!element) {
return 0;
} // Get transition-duration of the element
var _window$getComputedSt = window.getComputedStyle(element),
transitionDuration = _window$getComputedSt.transitionDuration,
transitionDelay = _window$getComputedSt.transitionDelay;
var floatTransitionDuration = parseFloat(transitionDuration);
var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
if (!floatTransitionDuration && !floatTransitionDelay) {
return 0;
} // If multiple durations are defined, take the first
transitionDuration = transitionDuration.split(',')[0];
transitionDelay = transitionDelay.split(',')[0];
return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
};
var triggerTransitionEnd = function triggerTransitionEnd(element) {
element.dispatchEvent(new Event(TRANSITION_END));
};
var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
var called = false;
var durationPadding = 5;
var emulatedDuration = duration + durationPadding;
function listener() {
called = true;
element.removeEventListener(TRANSITION_END, listener);
}
element.addEventListener(TRANSITION_END, listener);
setTimeout(function () {
if (!called) {
triggerTransitionEnd(element);
}
}, emulatedDuration);
};
/**
* ------------------------------------------------------------------------
* Constants
@ -39,11 +110,10 @@
var DATA_KEY = 'bs.alert';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
var JQUERY_NO_CONFLICT = $.fn[NAME];
var Selector = {
DISMISS: '[data-dismiss="alert"]'
};
var Event = {
var Event$1 = {
CLOSE: "close" + EVENT_KEY,
CLOSED: "closed" + EVENT_KEY,
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
@ -65,6 +135,10 @@
function () {
function Alert(element) {
this._element = element;
if (this._element) {
Data.setData(element, DATA_KEY, this);
}
} // Getters
@ -80,7 +154,7 @@
var customEvent = this._triggerCloseEvent(rootElement);
if (customEvent.isDefaultPrevented()) {
if (customEvent === null || customEvent.defaultPrevented) {
return;
}
@ -88,62 +162,63 @@
};
_proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY);
Data.removeData(this._element, DATA_KEY);
this._element = null;
} // Private
;
_proto._getRootElement = function _getRootElement(element) {
var selector = Util.getSelectorFromElement(element);
var selector = getSelectorFromElement(element);
var parent = false;
if (selector) {
parent = document.querySelector(selector);
parent = SelectorEngine.findOne(selector);
}
if (!parent) {
parent = $(element).closest("." + ClassName.ALERT)[0];
parent = SelectorEngine.closest(element, "." + ClassName.ALERT);
}
return parent;
};
_proto._triggerCloseEvent = function _triggerCloseEvent(element) {
var closeEvent = $.Event(Event.CLOSE);
$(element).trigger(closeEvent);
return closeEvent;
return EventHandler.trigger(element, Event$1.CLOSE);
};
_proto._removeElement = function _removeElement(element) {
var _this = this;
$(element).removeClass(ClassName.SHOW);
element.classList.remove(ClassName.SHOW);
if (!$(element).hasClass(ClassName.FADE)) {
if (!element.classList.contains(ClassName.FADE)) {
this._destroyElement(element);
return;
}
var transitionDuration = Util.getTransitionDurationFromElement(element);
$(element).one(Util.TRANSITION_END, function (event) {
var transitionDuration = getTransitionDurationFromElement(element);
EventHandler.one(element, TRANSITION_END, function (event) {
return _this._destroyElement(element, event);
}).emulateTransitionEnd(transitionDuration);
});
emulateTransitionEnd(element, transitionDuration);
};
_proto._destroyElement = function _destroyElement(element) {
$(element).detach().trigger(Event.CLOSED).remove();
if (element.parentNode) {
element.parentNode.removeChild(element);
}
EventHandler.trigger(element, Event$1.CLOSED);
} // Static
;
Alert._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var $element = $(this);
var data = $element.data(DATA_KEY);
var data = Data.getData(this, DATA_KEY);
if (!data) {
data = new Alert(this);
$element.data(DATA_KEY, data);
}
if (config === 'close') {
@ -162,6 +237,10 @@
};
};
Alert._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY);
};
_createClass(Alert, null, [{
key: "VERSION",
get: function get() {
@ -178,20 +257,24 @@
*/
$(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
EventHandler.on(document, Event$1.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
* add .alert to jQuery only if jQuery is present
*/
$.fn[NAME] = Alert._jQueryInterface;
$.fn[NAME].Constructor = Alert;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT = jQuery.fn[NAME];
jQuery.fn[NAME] = Alert._jQueryInterface;
jQuery.fn[NAME].Constructor = Alert;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Alert._jQueryInterface;
};
jQuery.fn[NAME].noConflict = function () {
jQuery.fn[NAME] = JQUERY_NO_CONFLICT;
return Alert._jQueryInterface;
};
}
return Alert;

File diff suppressed because one or more lines are too long

88
js/dist/button.js vendored
View File

@ -4,12 +4,14 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) :
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
(global = global || self, global.Button = factory(global.jQuery));
}(this, function ($) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/eventHandler.js'), require('./dom/selectorEngine.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/eventHandler.js', './dom/selectorEngine.js'], factory) :
(global = global || self, global.Button = factory(global.Data, global.EventHandler, global.SelectorEngine));
}(this, function (Data, EventHandler, SelectorEngine) { 'use strict';
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data;
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler;
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine;
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@ -27,6 +29,14 @@
return Constructor;
}
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
var jQuery = window.jQuery; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
/**
* ------------------------------------------------------------------------
* Constants
@ -38,7 +48,6 @@
var DATA_KEY = 'bs.button';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
var JQUERY_NO_CONFLICT = $.fn[NAME];
var ClassName = {
ACTIVE: 'active',
BUTTON: 'btn',
@ -53,7 +62,8 @@
};
var Event = {
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY,
FOCUS_BLUR_DATA_API: "focus" + EVENT_KEY + DATA_API_KEY + " " + ("blur" + EVENT_KEY + DATA_API_KEY)
FOCUS_DATA_API: "focus" + EVENT_KEY + DATA_API_KEY,
BLUR_DATA_API: "blur" + EVENT_KEY + DATA_API_KEY
/**
* ------------------------------------------------------------------------
* Class Definition
@ -67,6 +77,7 @@
function () {
function Button(element) {
this._element = element;
Data.setData(element, DATA_KEY, this);
} // Getters
@ -76,20 +87,20 @@
_proto.toggle = function toggle() {
var triggerChangeEvent = true;
var addAriaPressed = true;
var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0];
var rootElement = SelectorEngine.closest(this._element, Selector.DATA_TOGGLE);
if (rootElement) {
var input = this._element.querySelector(Selector.INPUT);
var input = SelectorEngine.findOne(Selector.INPUT, this._element);
if (input) {
if (input.type === 'radio') {
if (input.checked && this._element.classList.contains(ClassName.ACTIVE)) {
triggerChangeEvent = false;
} else {
var activeElement = rootElement.querySelector(Selector.ACTIVE);
var activeElement = SelectorEngine.findOne(Selector.ACTIVE, rootElement);
if (activeElement) {
$(activeElement).removeClass(ClassName.ACTIVE);
activeElement.classList.remove(ClassName.ACTIVE);
}
}
}
@ -100,7 +111,7 @@
}
input.checked = !this._element.classList.contains(ClassName.ACTIVE);
$(input).trigger('change');
EventHandler.trigger(input, 'change');
}
input.focus();
@ -113,23 +124,22 @@
}
if (triggerChangeEvent) {
$(this._element).toggleClass(ClassName.ACTIVE);
this._element.classList.toggle(ClassName.ACTIVE);
}
};
_proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY);
Data.removeData(this._element, DATA_KEY);
this._element = null;
} // Static
;
Button._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var data = $(this).data(DATA_KEY);
var data = Data.getData(this, DATA_KEY);
if (!data) {
data = new Button(this);
$(this).data(DATA_KEY, data);
}
if (config === 'toggle') {
@ -138,6 +148,10 @@
});
};
Button._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY);
};
_createClass(Button, null, [{
key: "VERSION",
get: function get() {
@ -154,32 +168,48 @@
*/
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
EventHandler.on(document, Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
event.preventDefault();
var button = event.target;
if (!$(button).hasClass(ClassName.BUTTON)) {
button = $(button).closest(Selector.BUTTON);
if (!button.classList.contains(ClassName.BUTTON)) {
button = SelectorEngine.closest(button, Selector.BUTTON);
}
Button._jQueryInterface.call($(button), 'toggle');
}).on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
var button = $(event.target).closest(Selector.BUTTON)[0];
$(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type));
var data = Data.getData(button, DATA_KEY);
if (!data) {
data = new Button(button);
Data.setData(button, DATA_KEY, data);
}
data.toggle();
});
EventHandler.on(document, Event.FOCUS_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
var button = SelectorEngine.closest(event.target, Selector.BUTTON);
button.classList.add(ClassName.FOCUS);
});
EventHandler.on(document, Event.BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
var button = SelectorEngine.closest(event.target, Selector.BUTTON);
button.classList.remove(ClassName.FOCUS);
});
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
* add .button to jQuery only if jQuery is present
*/
$.fn[NAME] = Button._jQueryInterface;
$.fn[NAME].Constructor = Button;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT = jQuery.fn[NAME];
jQuery.fn[NAME] = Button._jQueryInterface;
jQuery.fn[NAME].Constructor = Button;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Button._jQueryInterface;
};
jQuery.fn[NAME].noConflict = function () {
jQuery.fn[NAME] = JQUERY_NO_CONFLICT;
return Button._jQueryInterface;
};
}
return Button;

File diff suppressed because one or more lines are too long

362
js/dist/carousel.js vendored
View File

@ -4,13 +4,15 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
(global = global || self, global.Carousel = factory(global.jQuery, global.Util));
}(this, function ($, Util) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/eventHandler.js'), require('./dom/manipulator.js'), require('./dom/selectorEngine.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/eventHandler.js', './dom/manipulator.js', './dom/selectorEngine.js'], factory) :
(global = global || self, global.Carousel = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine));
}(this, function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict';
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data;
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler;
Manipulator = Manipulator && Manipulator.hasOwnProperty('default') ? Manipulator['default'] : Manipulator;
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine;
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@ -62,6 +64,120 @@
return target;
}
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
var MILLISECONDS_MULTIPLIER = 1000;
var TRANSITION_END = 'transitionend';
var jQuery = window.jQuery; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
var toType = function toType(obj) {
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
};
var getSelectorFromElement = function getSelectorFromElement(element) {
var selector = element.getAttribute('data-target');
if (!selector || selector === '#') {
var hrefAttr = element.getAttribute('href');
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
}
try {
return document.querySelector(selector) ? selector : null;
} catch (err) {
return null;
}
};
var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
if (!element) {
return 0;
} // Get transition-duration of the element
var _window$getComputedSt = window.getComputedStyle(element),
transitionDuration = _window$getComputedSt.transitionDuration,
transitionDelay = _window$getComputedSt.transitionDelay;
var floatTransitionDuration = parseFloat(transitionDuration);
var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
if (!floatTransitionDuration && !floatTransitionDelay) {
return 0;
} // If multiple durations are defined, take the first
transitionDuration = transitionDuration.split(',')[0];
transitionDelay = transitionDelay.split(',')[0];
return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
};
var triggerTransitionEnd = function triggerTransitionEnd(element) {
element.dispatchEvent(new Event(TRANSITION_END));
};
var isElement = function isElement(obj) {
return (obj[0] || obj).nodeType;
};
var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
var called = false;
var durationPadding = 5;
var emulatedDuration = duration + durationPadding;
function listener() {
called = true;
element.removeEventListener(TRANSITION_END, listener);
}
element.addEventListener(TRANSITION_END, listener);
setTimeout(function () {
if (!called) {
triggerTransitionEnd(element);
}
}, emulatedDuration);
};
var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
Object.keys(configTypes).forEach(function (property) {
var expectedTypes = configTypes[property];
var value = config[property];
var valueType = value && isElement(value) ? 'element' : toType(value);
if (!new RegExp(expectedTypes).test(valueType)) {
throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
}
});
};
var makeArray = function makeArray(nodeList) {
if (!nodeList) {
return [];
}
return [].slice.call(nodeList);
};
var isVisible = function isVisible(element) {
if (!element) {
return false;
}
if (element.style && element.parentNode && element.parentNode.style) {
return element.style.display !== 'none' && element.parentNode.style.display !== 'none' && element.style.visibility !== 'hidden';
}
return false;
};
var reflow = function reflow(element) {
return element.offsetHeight;
};
/**
* ------------------------------------------------------------------------
* Constants
@ -73,7 +189,6 @@
var DATA_KEY = 'bs.carousel';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
var JQUERY_NO_CONFLICT = $.fn[NAME];
var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
@ -103,7 +218,7 @@
LEFT: 'left',
RIGHT: 'right'
};
var Event = {
var Event$1 = {
SLIDE: "slide" + EVENT_KEY,
SLID: "slid" + EVENT_KEY,
KEYDOWN: "keydown" + EVENT_KEY,
@ -164,11 +279,13 @@
this.touchDeltaX = 0;
this._config = this._getConfig(config);
this._element = element;
this._indicatorsElement = this._element.querySelector(Selector.INDICATORS);
this._indicatorsElement = SelectorEngine.findOne(Selector.INDICATORS, this._element);
this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent);
this._addEventListeners();
Data.setData(element, DATA_KEY, this);
} // Getters
@ -184,7 +301,7 @@
_proto.nextWhenVisible = function nextWhenVisible() {
// Don't call next when the page isn't visible
// or the carousel or its parent isn't visible
if (!document.hidden && $(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden') {
if (!document.hidden && isVisible(this._element)) {
this.next();
}
};
@ -200,8 +317,8 @@
this._isPaused = true;
}
if (this._element.querySelector(Selector.NEXT_PREV)) {
Util.triggerTransitionEnd(this._element);
if (SelectorEngine.findOne(Selector.NEXT_PREV, this._element)) {
triggerTransitionEnd(this._element);
this.cycle(true);
}
@ -219,7 +336,7 @@
this._interval = null;
}
if (this._config.interval && !this._isPaused) {
if (this._config && this._config.interval && !this._isPaused) {
this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
}
};
@ -227,7 +344,7 @@
_proto.to = function to(index) {
var _this = this;
this._activeElement = this._element.querySelector(Selector.ACTIVE_ITEM);
this._activeElement = SelectorEngine.findOne(Selector.ACTIVE_ITEM, this._element);
var activeIndex = this._getItemIndex(this._activeElement);
@ -236,7 +353,7 @@
}
if (this._isSliding) {
$(this._element).one(Event.SLID, function () {
EventHandler.one(this._element, Event$1.SLID, function () {
return _this.to(index);
});
return;
@ -254,8 +371,8 @@
};
_proto.dispose = function dispose() {
$(this._element).off(EVENT_KEY);
$.removeData(this._element, DATA_KEY);
EventHandler.off(this._element, EVENT_KEY);
Data.removeData(this._element, DATA_KEY);
this._items = null;
this._config = null;
this._element = null;
@ -269,7 +386,7 @@
_proto._getConfig = function _getConfig(config) {
config = _objectSpread({}, Default, config);
Util.typeCheckConfig(NAME, config, DefaultType);
typeCheckConfig(NAME, config, DefaultType);
return config;
};
@ -296,15 +413,16 @@
var _this2 = this;
if (this._config.keyboard) {
$(this._element).on(Event.KEYDOWN, function (event) {
EventHandler.on(this._element, Event$1.KEYDOWN, function (event) {
return _this2._keydown(event);
});
}
if (this._config.pause === 'hover') {
$(this._element).on(Event.MOUSEENTER, function (event) {
EventHandler.on(this._element, Event$1.MOUSEENTER, function (event) {
return _this2.pause(event);
}).on(Event.MOUSELEAVE, function (event) {
});
EventHandler.on(this._element, Event$1.MOUSELEAVE, function (event) {
return _this2.cycle(event);
});
}
@ -322,25 +440,25 @@
}
var start = function start(event) {
if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
_this3.touchStartX = event.originalEvent.clientX;
if (_this3._pointerEvent && PointerType[event.pointerType.toUpperCase()]) {
_this3.touchStartX = event.clientX;
} else if (!_this3._pointerEvent) {
_this3.touchStartX = event.originalEvent.touches[0].clientX;
_this3.touchStartX = event.touches[0].clientX;
}
};
var move = function move(event) {
// ensure swiping with one touch and not pinching
if (event.originalEvent.touches && event.originalEvent.touches.length > 1) {
if (event.touches && event.touches.length > 1) {
_this3.touchDeltaX = 0;
} else {
_this3.touchDeltaX = event.originalEvent.touches[0].clientX - _this3.touchStartX;
_this3.touchDeltaX = event.touches[0].clientX - _this3.touchStartX;
}
};
var end = function end(event) {
if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
_this3.touchDeltaX = event.originalEvent.clientX - _this3.touchStartX;
if (_this3._pointerEvent && PointerType[event.pointerType.toUpperCase()]) {
_this3.touchDeltaX = event.clientX - _this3.touchStartX;
}
_this3._handleSwipe();
@ -365,27 +483,29 @@
}
};
$(this._element.querySelectorAll(Selector.ITEM_IMG)).on(Event.DRAG_START, function (e) {
return e.preventDefault();
makeArray(SelectorEngine.find(Selector.ITEM_IMG, this._element)).forEach(function (itemImg) {
EventHandler.on(itemImg, Event$1.DRAG_START, function (e) {
return e.preventDefault();
});
});
if (this._pointerEvent) {
$(this._element).on(Event.POINTERDOWN, function (event) {
EventHandler.on(this._element, Event$1.POINTERDOWN, function (event) {
return start(event);
});
$(this._element).on(Event.POINTERUP, function (event) {
EventHandler.on(this._element, Event$1.POINTERUP, function (event) {
return end(event);
});
this._element.classList.add(ClassName.POINTER_EVENT);
} else {
$(this._element).on(Event.TOUCHSTART, function (event) {
EventHandler.on(this._element, Event$1.TOUCHSTART, function (event) {
return start(event);
});
$(this._element).on(Event.TOUCHMOVE, function (event) {
EventHandler.on(this._element, Event$1.TOUCHMOVE, function (event) {
return move(event);
});
$(this._element).on(Event.TOUCHEND, function (event) {
EventHandler.on(this._element, Event$1.TOUCHEND, function (event) {
return end(event);
});
}
@ -412,7 +532,7 @@
};
_proto._getItemIndex = function _getItemIndex(element) {
this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(Selector.ITEM)) : [];
this._items = element && element.parentNode ? makeArray(SelectorEngine.find(Selector.ITEM, element.parentNode)) : [];
return this._items.indexOf(element);
};
@ -437,27 +557,28 @@
_proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
var targetIndex = this._getItemIndex(relatedTarget);
var fromIndex = this._getItemIndex(this._element.querySelector(Selector.ACTIVE_ITEM));
var fromIndex = this._getItemIndex(SelectorEngine.findOne(Selector.ACTIVE_ITEM, this._element));
var slideEvent = $.Event(Event.SLIDE, {
return EventHandler.trigger(this._element, Event$1.SLIDE, {
relatedTarget: relatedTarget,
direction: eventDirectionName,
from: fromIndex,
to: targetIndex
});
$(this._element).trigger(slideEvent);
return slideEvent;
};
_proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
if (this._indicatorsElement) {
var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(Selector.ACTIVE));
$(indicators).removeClass(ClassName.ACTIVE);
var indicators = SelectorEngine.find(Selector.ACTIVE, this._indicatorsElement);
for (var i = 0; i < indicators.length; i++) {
indicators[i].classList.remove(ClassName.ACTIVE);
}
var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
if (nextIndicator) {
$(nextIndicator).addClass(ClassName.ACTIVE);
nextIndicator.classList.add(ClassName.ACTIVE);
}
}
};
@ -465,7 +586,7 @@
_proto._slide = function _slide(direction, element) {
var _this4 = this;
var activeElement = this._element.querySelector(Selector.ACTIVE_ITEM);
var activeElement = SelectorEngine.findOne(Selector.ACTIVE_ITEM, this._element);
var activeElementIndex = this._getItemIndex(activeElement);
@ -488,14 +609,14 @@
eventDirectionName = Direction.RIGHT;
}
if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) {
if (nextElement && nextElement.classList.contains(ClassName.ACTIVE)) {
this._isSliding = false;
return;
}
var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
if (slideEvent.isDefaultPrevented()) {
if (slideEvent.defaultPrevented) {
return;
}
@ -512,18 +633,11 @@
this._setActiveIndicatorElement(nextElement);
var slidEvent = $.Event(Event.SLID, {
relatedTarget: nextElement,
direction: eventDirectionName,
from: activeElementIndex,
to: nextElementIndex
});
if ($(this._element).hasClass(ClassName.SLIDE)) {
$(nextElement).addClass(orderClassName);
Util.reflow(nextElement);
$(activeElement).addClass(directionalClassName);
$(nextElement).addClass(directionalClassName);
if (this._element.classList.contains(ClassName.SLIDE)) {
nextElement.classList.add(orderClassName);
reflow(nextElement);
activeElement.classList.add(directionalClassName);
nextElement.classList.add(directionalClassName);
var nextElementInterval = parseInt(nextElement.getAttribute('data-interval'), 10);
if (nextElementInterval) {
@ -533,20 +647,35 @@
this._config.interval = this._config.defaultInterval || this._config.interval;
}
var transitionDuration = Util.getTransitionDurationFromElement(activeElement);
$(activeElement).one(Util.TRANSITION_END, function () {
$(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName.ACTIVE);
$(activeElement).removeClass(ClassName.ACTIVE + " " + orderClassName + " " + directionalClassName);
var transitionDuration = getTransitionDurationFromElement(activeElement);
EventHandler.one(activeElement, TRANSITION_END, function () {
nextElement.classList.remove(directionalClassName);
nextElement.classList.remove(orderClassName);
nextElement.classList.add(ClassName.ACTIVE);
activeElement.classList.remove(ClassName.ACTIVE);
activeElement.classList.remove(orderClassName);
activeElement.classList.remove(directionalClassName);
_this4._isSliding = false;
setTimeout(function () {
return $(_this4._element).trigger(slidEvent);
EventHandler.trigger(_this4._element, Event$1.SLID, {
relatedTarget: nextElement,
direction: eventDirectionName,
from: activeElementIndex,
to: nextElementIndex
});
}, 0);
}).emulateTransitionEnd(transitionDuration);
});
emulateTransitionEnd(activeElement, transitionDuration);
} else {
$(activeElement).removeClass(ClassName.ACTIVE);
$(nextElement).addClass(ClassName.ACTIVE);
activeElement.classList.remove(ClassName.ACTIVE);
nextElement.classList.add(ClassName.ACTIVE);
this._isSliding = false;
$(this._element).trigger(slidEvent);
EventHandler.trigger(this._element, Event$1.SLID, {
relatedTarget: nextElement,
direction: eventDirectionName,
from: activeElementIndex,
to: nextElementIndex
});
}
if (isCycling) {
@ -555,52 +684,55 @@
} // Static
;
Carousel._carouselInterface = function _carouselInterface(element, config) {
var data = Data.getData(element, DATA_KEY);
var _config = _objectSpread({}, Default, Manipulator.getDataAttributes(element));
if (typeof config === 'object') {
_config = _objectSpread({}, _config, config);
}
var action = typeof config === 'string' ? config : _config.slide;
if (!data) {
data = new Carousel(element, _config);
}
if (typeof config === 'number') {
data.to(config);
} else if (typeof action === 'string') {
if (typeof data[action] === 'undefined') {
throw new Error("No method named \"" + action + "\"");
}
data[action]();
} else if (_config.interval && _config.ride) {
data.pause();
data.cycle();
}
};
Carousel._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var data = $(this).data(DATA_KEY);
var _config = _objectSpread({}, Default, $(this).data());
if (typeof config === 'object') {
_config = _objectSpread({}, _config, config);
}
var action = typeof config === 'string' ? config : _config.slide;
if (!data) {
data = new Carousel(this, _config);
$(this).data(DATA_KEY, data);
}
if (typeof config === 'number') {
data.to(config);
} else if (typeof action === 'string') {
if (typeof data[action] === 'undefined') {
throw new TypeError("No method named \"" + action + "\"");
}
data[action]();
} else if (_config.interval && _config.ride) {
data.pause();
data.cycle();
}
Carousel._carouselInterface(this, config);
});
};
Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
var selector = Util.getSelectorFromElement(this);
var selector = getSelectorFromElement(this);
if (!selector) {
return;
}
var target = $(selector)[0];
var target = SelectorEngine.findOne(selector);
if (!target || !$(target).hasClass(ClassName.CAROUSEL)) {
if (!target || !target.classList.contains(ClassName.CAROUSEL)) {
return;
}
var config = _objectSpread({}, $(target).data(), $(this).data());
var config = _objectSpread({}, Manipulator.getDataAttributes(target), Manipulator.getDataAttributes(this));
var slideIndex = this.getAttribute('data-slide-to');
@ -608,15 +740,19 @@
config.interval = false;
}
Carousel._jQueryInterface.call($(target), config);
Carousel._carouselInterface(target, config);
if (slideIndex) {
$(target).data(DATA_KEY).to(slideIndex);
Data.getData(target, DATA_KEY).to(slideIndex);
}
event.preventDefault();
};
Carousel._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY);
};
_createClass(Carousel, null, [{
key: "VERSION",
get: function get() {
@ -638,29 +774,31 @@
*/
$(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler);
$(window).on(Event.LOAD_DATA_API, function () {
var carousels = [].slice.call(document.querySelectorAll(Selector.DATA_RIDE));
EventHandler.on(document, Event$1.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler);
EventHandler.on(window, Event$1.LOAD_DATA_API, function () {
var carousels = makeArray(SelectorEngine.find(Selector.DATA_RIDE));
for (var i = 0, len = carousels.length; i < len; i++) {
var $carousel = $(carousels[i]);
Carousel._jQueryInterface.call($carousel, $carousel.data());
Carousel._carouselInterface(carousels[i], Data.getData(carousels[i], DATA_KEY));
}
});
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
* add .carousel to jQuery only if jQuery is present
*/
$.fn[NAME] = Carousel._jQueryInterface;
$.fn[NAME].Constructor = Carousel;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT = jQuery.fn[NAME];
jQuery.fn[NAME] = Carousel._jQueryInterface;
jQuery.fn[NAME].Constructor = Carousel;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Carousel._jQueryInterface;
};
jQuery.fn[NAME].noConflict = function () {
jQuery.fn[NAME] = JQUERY_NO_CONFLICT;
return Carousel._jQueryInterface;
};
}
return Carousel;

File diff suppressed because one or more lines are too long

355
js/dist/collapse.js vendored
View File

@ -4,13 +4,15 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
(global = global || self, global.Collapse = factory(global.jQuery, global.Util));
}(this, function ($, Util) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/eventHandler.js'), require('./dom/manipulator.js'), require('./dom/selectorEngine.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/eventHandler.js', './dom/manipulator.js', './dom/selectorEngine.js'], factory) :
(global = global || self, global.Collapse = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine));
}(this, function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict';
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data;
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler;
Manipulator = Manipulator && Manipulator.hasOwnProperty('default') ? Manipulator['default'] : Manipulator;
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine;
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@ -62,6 +64,108 @@
return target;
}
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
var MILLISECONDS_MULTIPLIER = 1000;
var TRANSITION_END = 'transitionend';
var jQuery = window.jQuery; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
var toType = function toType(obj) {
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
};
var getSelectorFromElement = function getSelectorFromElement(element) {
var selector = element.getAttribute('data-target');
if (!selector || selector === '#') {
var hrefAttr = element.getAttribute('href');
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
}
try {
return document.querySelector(selector) ? selector : null;
} catch (err) {
return null;
}
};
var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
if (!element) {
return 0;
} // Get transition-duration of the element
var _window$getComputedSt = window.getComputedStyle(element),
transitionDuration = _window$getComputedSt.transitionDuration,
transitionDelay = _window$getComputedSt.transitionDelay;
var floatTransitionDuration = parseFloat(transitionDuration);
var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
if (!floatTransitionDuration && !floatTransitionDelay) {
return 0;
} // If multiple durations are defined, take the first
transitionDuration = transitionDuration.split(',')[0];
transitionDelay = transitionDelay.split(',')[0];
return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
};
var triggerTransitionEnd = function triggerTransitionEnd(element) {
element.dispatchEvent(new Event(TRANSITION_END));
};
var isElement = function isElement(obj) {
return (obj[0] || obj).nodeType;
};
var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
var called = false;
var durationPadding = 5;
var emulatedDuration = duration + durationPadding;
function listener() {
called = true;
element.removeEventListener(TRANSITION_END, listener);
}
element.addEventListener(TRANSITION_END, listener);
setTimeout(function () {
if (!called) {
triggerTransitionEnd(element);
}
}, emulatedDuration);
};
var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
Object.keys(configTypes).forEach(function (property) {
var expectedTypes = configTypes[property];
var value = config[property];
var valueType = value && isElement(value) ? 'element' : toType(value);
if (!new RegExp(expectedTypes).test(valueType)) {
throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
}
});
};
var makeArray = function makeArray(nodeList) {
if (!nodeList) {
return [];
}
return [].slice.call(nodeList);
};
var reflow = function reflow(element) {
return element.offsetHeight;
};
/**
* ------------------------------------------------------------------------
* Constants
@ -73,7 +177,6 @@
var DATA_KEY = 'bs.collapse';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
var JQUERY_NO_CONFLICT = $.fn[NAME];
var Default = {
toggle: true,
parent: ''
@ -82,7 +185,7 @@
toggle: 'boolean',
parent: '(string|element)'
};
var Event = {
var Event$1 = {
SHOW: "show" + EVENT_KEY,
SHOWN: "shown" + EVENT_KEY,
HIDE: "hide" + EVENT_KEY,
@ -117,17 +220,17 @@
this._isTransitioning = false;
this._element = element;
this._config = this._getConfig(config);
this._triggerArray = [].slice.call(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
var toggleList = [].slice.call(document.querySelectorAll(Selector.DATA_TOGGLE));
this._triggerArray = makeArray(SelectorEngine.find("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
var toggleList = makeArray(SelectorEngine.find(Selector.DATA_TOGGLE));
for (var i = 0, len = toggleList.length; i < len; i++) {
var elem = toggleList[i];
var selector = Util.getSelectorFromElement(elem);
var filterElement = [].slice.call(document.querySelectorAll(selector)).filter(function (foundElem) {
var selector = getSelectorFromElement(elem);
var filterElement = makeArray(SelectorEngine.find(selector)).filter(function (foundElem) {
return foundElem === element;
});
if (selector !== null && filterElement.length > 0) {
if (selector !== null && filterElement.length) {
this._selector = selector;
this._triggerArray.push(elem);
@ -143,6 +246,8 @@
if (this._config.toggle) {
this.toggle();
}
Data.setData(element, DATA_KEY, this);
} // Getters
@ -150,7 +255,7 @@
// Public
_proto.toggle = function toggle() {
if ($(this._element).hasClass(ClassName.SHOW)) {
if (this._element.classList.contains(ClassName.SHOW)) {
this.hide();
} else {
this.show();
@ -160,7 +265,7 @@
_proto.show = function show() {
var _this = this;
if (this._isTransitioning || $(this._element).hasClass(ClassName.SHOW)) {
if (this._isTransitioning || this._element.classList.contains(ClassName.SHOW)) {
return;
}
@ -168,7 +273,7 @@
var activesData;
if (this._parent) {
actives = [].slice.call(this._parent.querySelectorAll(Selector.ACTIVES)).filter(function (elem) {
actives = makeArray(SelectorEngine.find(Selector.ACTIVES, this._parent)).filter(function (elem) {
if (typeof _this._config.parent === 'string') {
return elem.getAttribute('data-parent') === _this._config.parent;
}
@ -181,87 +286,113 @@
}
}
var container = SelectorEngine.findOne(this._selector);
if (actives) {
activesData = $(actives).not(this._selector).data(DATA_KEY);
var tempActiveData = actives.filter(function (elem) {
return container !== elem;
});
activesData = tempActiveData[0] ? Data.getData(tempActiveData[0], DATA_KEY) : null;
if (activesData && activesData._isTransitioning) {
return;
}
}
var startEvent = $.Event(Event.SHOW);
$(this._element).trigger(startEvent);
var startEvent = EventHandler.trigger(this._element, Event$1.SHOW);
if (startEvent.isDefaultPrevented()) {
if (startEvent.defaultPrevented) {
return;
}
if (actives) {
Collapse._jQueryInterface.call($(actives).not(this._selector), 'hide');
actives.forEach(function (elemActive) {
if (container !== elemActive) {
Collapse._collapseInterface(elemActive, 'hide');
}
if (!activesData) {
$(actives).data(DATA_KEY, null);
}
if (!activesData) {
Data.setData(elemActive, DATA_KEY, null);
}
});
}
var dimension = this._getDimension();
$(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING);
this._element.classList.remove(ClassName.COLLAPSE);
this._element.classList.add(ClassName.COLLAPSING);
this._element.style[dimension] = 0;
if (this._triggerArray.length) {
$(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true);
this._triggerArray.forEach(function (element) {
element.classList.remove(ClassName.COLLAPSED);
element.setAttribute('aria-expanded', true);
});
}
this.setTransitioning(true);
var complete = function complete() {
$(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW);
_this._element.classList.remove(ClassName.COLLAPSING);
_this._element.classList.add(ClassName.COLLAPSE);
_this._element.classList.add(ClassName.SHOW);
_this._element.style[dimension] = '';
_this.setTransitioning(false);
$(_this._element).trigger(Event.SHOWN);
EventHandler.trigger(_this._element, Event$1.SHOWN);
};
var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
var scrollSize = "scroll" + capitalizedDimension;
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
var transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, TRANSITION_END, complete);
emulateTransitionEnd(this._element, transitionDuration);
this._element.style[dimension] = this._element[scrollSize] + "px";
};
_proto.hide = function hide() {
var _this2 = this;
if (this._isTransitioning || !$(this._element).hasClass(ClassName.SHOW)) {
if (this._isTransitioning || !this._element.classList.contains(ClassName.SHOW)) {
return;
}
var startEvent = $.Event(Event.HIDE);
$(this._element).trigger(startEvent);
var startEvent = EventHandler.trigger(this._element, Event$1.HIDE);
if (startEvent.isDefaultPrevented()) {
if (startEvent.defaultPrevented) {
return;
}
var dimension = this._getDimension();
this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
Util.reflow(this._element);
$(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW);
reflow(this._element);
this._element.classList.add(ClassName.COLLAPSING);
this._element.classList.remove(ClassName.COLLAPSE);
this._element.classList.remove(ClassName.SHOW);
var triggerArrayLength = this._triggerArray.length;
if (triggerArrayLength > 0) {
for (var i = 0; i < triggerArrayLength; i++) {
var trigger = this._triggerArray[i];
var selector = Util.getSelectorFromElement(trigger);
var selector = getSelectorFromElement(trigger);
if (selector !== null) {
var $elem = $([].slice.call(document.querySelectorAll(selector)));
var elem = SelectorEngine.findOne(selector);
if (!$elem.hasClass(ClassName.SHOW)) {
$(trigger).addClass(ClassName.COLLAPSED).attr('aria-expanded', false);
if (!elem.classList.contains(ClassName.SHOW)) {
trigger.classList.add(ClassName.COLLAPSED);
trigger.setAttribute('aria-expanded', false);
}
}
}
@ -272,12 +403,17 @@
var complete = function complete() {
_this2.setTransitioning(false);
$(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN);
_this2._element.classList.remove(ClassName.COLLAPSING);
_this2._element.classList.add(ClassName.COLLAPSE);
EventHandler.trigger(_this2._element, Event$1.HIDDEN);
};
this._element.style[dimension] = '';
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
var transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, TRANSITION_END, complete);
emulateTransitionEnd(this._element, transitionDuration);
};
_proto.setTransitioning = function setTransitioning(isTransitioning) {
@ -285,7 +421,7 @@
};
_proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY);
Data.removeData(this._element, DATA_KEY);
this._config = null;
this._parent = null;
this._element = null;
@ -298,12 +434,13 @@
config = _objectSpread({}, Default, config);
config.toggle = Boolean(config.toggle); // Coerce string values
Util.typeCheckConfig(NAME, config, DefaultType);
typeCheckConfig(NAME, config, DefaultType);
return config;
};
_proto._getDimension = function _getDimension() {
var hasWidth = $(this._element).hasClass(Dimension.WIDTH);
var hasWidth = this._element.classList.contains(Dimension.WIDTH);
return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;
};
@ -312,64 +449,79 @@
var parent;
if (Util.isElement(this._config.parent)) {
parent = this._config.parent; // It's a jQuery object
if (isElement(this._config.parent)) {
parent = this._config.parent; // it's a jQuery object
if (typeof this._config.parent.jquery !== 'undefined') {
if (typeof this._config.parent.jquery !== 'undefined' || typeof this._config.parent[0] !== 'undefined') {
parent = this._config.parent[0];
}
} else {
parent = document.querySelector(this._config.parent);
parent = SelectorEngine.findOne(this._config.parent);
}
var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]";
var children = [].slice.call(parent.querySelectorAll(selector));
$(children).each(function (i, element) {
makeArray(SelectorEngine.find(selector, parent)).forEach(function (element) {
_this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
});
return parent;
};
_proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
var isOpen = $(element).hasClass(ClassName.SHOW);
if (element) {
var isOpen = element.classList.contains(ClassName.SHOW);
if (triggerArray.length) {
$(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
if (triggerArray.length) {
triggerArray.forEach(function (elem) {
if (!isOpen) {
elem.classList.add(ClassName.COLLAPSED);
} else {
elem.classList.remove(ClassName.COLLAPSED);
}
elem.setAttribute('aria-expanded', isOpen);
});
}
}
} // Static
;
Collapse._getTargetFromElement = function _getTargetFromElement(element) {
var selector = Util.getSelectorFromElement(element);
return selector ? document.querySelector(selector) : null;
var selector = getSelectorFromElement(element);
return selector ? SelectorEngine.findOne(selector) : null;
};
Collapse._collapseInterface = function _collapseInterface(element, config) {
var data = Data.getData(element, DATA_KEY);
var _config = _objectSpread({}, Default, Manipulator.getDataAttributes(element), typeof config === 'object' && config ? config : {});
if (!data && _config.toggle && /show|hide/.test(config)) {
_config.toggle = false;
}
if (!data) {
data = new Collapse(element, _config);
}
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
throw new Error("No method named \"" + config + "\"");
}
data[config]();
}
};
Collapse._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var $this = $(this);
var data = $this.data(DATA_KEY);
var _config = _objectSpread({}, Default, $this.data(), typeof config === 'object' && config ? config : {});
if (!data && _config.toggle && /show|hide/.test(config)) {
_config.toggle = false;
}
if (!data) {
data = new Collapse(this, _config);
$this.data(DATA_KEY, data);
}
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
throw new TypeError("No method named \"" + config + "\"");
}
data[config]();
}
Collapse._collapseInterface(this, config);
});
};
Collapse._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY);
};
_createClass(Collapse, null, [{
key: "VERSION",
get: function get() {
@ -391,36 +543,51 @@
*/
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
EventHandler.on(document, Event$1.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
// preventDefault only for <a> elements (which change the URL) not inside the collapsible element
if (event.currentTarget.tagName === 'A') {
if (event.target.tagName === 'A') {
event.preventDefault();
}
var $trigger = $(this);
var selector = Util.getSelectorFromElement(this);
var selectors = [].slice.call(document.querySelectorAll(selector));
$(selectors).each(function () {
var $target = $(this);
var data = $target.data(DATA_KEY);
var config = data ? 'toggle' : $trigger.data();
var triggerData = Manipulator.getDataAttributes(this);
var selector = getSelectorFromElement(this);
var selectorElements = makeArray(SelectorEngine.find(selector));
selectorElements.forEach(function (element) {
var data = Data.getData(element, DATA_KEY);
var config;
Collapse._jQueryInterface.call($target, config);
if (data) {
// update parent attribute
if (data._parent === null && typeof triggerData.parent === 'string') {
data._config.parent = triggerData.parent;
data._parent = data._getParent();
}
config = 'toggle';
} else {
config = triggerData;
}
Collapse._collapseInterface(element, config);
});
});
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
* add .collapse to jQuery only if jQuery is present
*/
$.fn[NAME] = Collapse._jQueryInterface;
$.fn[NAME].Constructor = Collapse;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT = jQuery.fn[NAME];
jQuery.fn[NAME] = Collapse._jQueryInterface;
jQuery.fn[NAME].Constructor = Collapse;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Collapse._jQueryInterface;
};
jQuery.fn[NAME].noConflict = function () {
jQuery.fn[NAME] = JQUERY_NO_CONFLICT;
return Collapse._jQueryInterface;
};
}
return Collapse;

File diff suppressed because one or more lines are too long

82
js/dist/dom/data.js vendored Normal file
View File

@ -0,0 +1,82 @@
/*!
* Bootstrap data.js v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, global.Data = factory());
}(this, function () { 'use strict';
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): dom/data.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var mapData = function () {
var storeData = {};
var id = 1;
return {
set: function set(element, key, data) {
if (typeof element.key === 'undefined') {
element.key = {
key: key,
id: id
};
id++;
}
storeData[element.key.id] = data;
},
get: function get(element, key) {
if (!element || typeof element.key === 'undefined') {
return null;
}
var keyProperties = element.key;
if (keyProperties.key === key) {
return storeData[keyProperties.id];
}
return null;
},
delete: function _delete(element, key) {
if (typeof element.key === 'undefined') {
return;
}
var keyProperties = element.key;
if (keyProperties.key === key) {
delete storeData[keyProperties.id];
delete element.key;
}
}
};
}();
var Data = {
setData: function setData(instance, key, data) {
mapData.set(instance, key, data);
},
getData: function getData(instance, key) {
return mapData.get(instance, key);
},
removeData: function removeData(instance, key) {
mapData.delete(instance, key);
}
};
return Data;
}));
//# sourceMappingURL=data.js.map

1
js/dist/dom/data.js.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"data.js","sources":["../../src/dom/data.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.3.1): dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst mapData = (() => {\n const storeData = {}\n let id = 1\n return {\n set(element, key, data) {\n if (typeof element.key === 'undefined') {\n element.key = {\n key,\n id\n }\n id++\n }\n\n storeData[element.key.id] = data\n },\n get(element, key) {\n if (!element || typeof element.key === 'undefined') {\n return null\n }\n\n const keyProperties = element.key\n if (keyProperties.key === key) {\n return storeData[keyProperties.id]\n }\n return null\n },\n delete(element, key) {\n if (typeof element.key === 'undefined') {\n return\n }\n\n const keyProperties = element.key\n if (keyProperties.key === key) {\n delete storeData[keyProperties.id]\n delete element.key\n }\n }\n }\n})()\n\nconst Data = {\n setData(instance, key, data) {\n mapData.set(instance, key, data)\n },\n getData(instance, key) {\n return mapData.get(instance, key)\n },\n removeData(instance, key) {\n mapData.delete(instance, key)\n }\n}\n\nexport default Data\n"],"names":["mapData","storeData","id","set","element","key","data","get","keyProperties","delete","Data","setData","instance","getData","removeData"],"mappings":";;;;;;;;;;;EAAA;;;;;;;EAOA;;;;;EAMA,IAAMA,OAAO,GAAI,YAAM;EACrB,MAAMC,SAAS,GAAG,EAAlB;EACA,MAAIC,EAAE,GAAG,CAAT;EACA,SAAO;EACLC,IAAAA,GADK,eACDC,OADC,EACQC,GADR,EACaC,IADb,EACmB;EACtB,UAAI,OAAOF,OAAO,CAACC,GAAf,KAAuB,WAA3B,EAAwC;EACtCD,QAAAA,OAAO,CAACC,GAAR,GAAc;EACZA,UAAAA,GAAG,EAAHA,GADY;EAEZH,UAAAA,EAAE,EAAFA;EAFY,SAAd;EAIAA,QAAAA,EAAE;EACH;;EAEDD,MAAAA,SAAS,CAACG,OAAO,CAACC,GAAR,CAAYH,EAAb,CAAT,GAA4BI,IAA5B;EACD,KAXI;EAYLC,IAAAA,GAZK,eAYDH,OAZC,EAYQC,GAZR,EAYa;EAChB,UAAI,CAACD,OAAD,IAAY,OAAOA,OAAO,CAACC,GAAf,KAAuB,WAAvC,EAAoD;EAClD,eAAO,IAAP;EACD;;EAED,UAAMG,aAAa,GAAGJ,OAAO,CAACC,GAA9B;;EACA,UAAIG,aAAa,CAACH,GAAd,KAAsBA,GAA1B,EAA+B;EAC7B,eAAOJ,SAAS,CAACO,aAAa,CAACN,EAAf,CAAhB;EACD;;EACD,aAAO,IAAP;EACD,KAtBI;EAuBLO,IAAAA,MAvBK,mBAuBEL,OAvBF,EAuBWC,GAvBX,EAuBgB;EACnB,UAAI,OAAOD,OAAO,CAACC,GAAf,KAAuB,WAA3B,EAAwC;EACtC;EACD;;EAED,UAAMG,aAAa,GAAGJ,OAAO,CAACC,GAA9B;;EACA,UAAIG,aAAa,CAACH,GAAd,KAAsBA,GAA1B,EAA+B;EAC7B,eAAOJ,SAAS,CAACO,aAAa,CAACN,EAAf,CAAhB;EACA,eAAOE,OAAO,CAACC,GAAf;EACD;EACF;EAjCI,GAAP;EAmCD,CAtCe,EAAhB;;EAwCA,IAAMK,IAAI,GAAG;EACXC,EAAAA,OADW,mBACHC,QADG,EACOP,GADP,EACYC,IADZ,EACkB;EAC3BN,IAAAA,OAAO,CAACG,GAAR,CAAYS,QAAZ,EAAsBP,GAAtB,EAA2BC,IAA3B;EACD,GAHU;EAIXO,EAAAA,OAJW,mBAIHD,QAJG,EAIOP,GAJP,EAIY;EACrB,WAAOL,OAAO,CAACO,GAAR,CAAYK,QAAZ,EAAsBP,GAAtB,CAAP;EACD,GANU;EAOXS,EAAAA,UAPW,sBAOAF,QAPA,EAOUP,GAPV,EAOe;EACxBL,IAAAA,OAAO,CAACS,MAAR,CAAeG,QAAf,EAAyBP,GAAzB;EACD;EATU,CAAb;;;;;;;;"}

317
js/dist/dom/eventhandler.js vendored Normal file
View File

@ -0,0 +1,317 @@
/*!
* Bootstrap eventhandler.js v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./polyfill.js')) :
typeof define === 'function' && define.amd ? define(['./polyfill.js'], factory) :
(global = global || self, global.EventHandler = factory(global.Polyfill));
}(this, function (Polyfill) { 'use strict';
Polyfill = Polyfill && Polyfill.hasOwnProperty('default') ? Polyfill['default'] : Polyfill;
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
var jQuery = window.jQuery; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): dom/eventHandler.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var namespaceRegex = /[^.]*(?=\..*)\.|.*/;
var stripNameRegex = /\..*/;
var keyEventRegex = /^key/;
var stripUidRegex = /::\d+$/;
var eventRegistry = {}; // Events storage
var uidEvent = 1;
var customEvents = {
mouseenter: 'mouseover',
mouseleave: 'mouseout'
};
var nativeEvents = ['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll'];
/**
* ------------------------------------------------------------------------
* Private methods
* ------------------------------------------------------------------------
*/
function getUidEvent(element, uid) {
return uid && uid + "::" + uidEvent++ || element.uidEvent || uidEvent++;
}
function getEvent(element) {
var uid = getUidEvent(element);
element.uidEvent = uid;
return eventRegistry[uid] = eventRegistry[uid] || {};
}
function fixEvent(event, element) {
// Add which for key events
if (event.which === null && keyEventRegex.test(event.type)) {
event.which = event.charCode !== null ? event.charCode : event.keyCode;
}
event.delegateTarget = element;
}
function bootstrapHandler(element, fn) {
return function handler(event) {
fixEvent(event, element);
if (handler.oneOff) {
EventHandler.off(element, event.type, fn);
}
return fn.apply(element, [event]);
};
}
function bootstrapDelegationHandler(element, selector, fn) {
return function handler(event) {
var domElements = element.querySelectorAll(selector);
for (var target = event.target; target && target !== this; target = target.parentNode) {
for (var i = domElements.length; i--;) {
if (domElements[i] === target) {
fixEvent(event, target);
if (handler.oneOff) {
EventHandler.off(element, event.type, fn);
}
return fn.apply(target, [event]);
}
}
} // To please ESLint
return null;
};
}
function findHandler(events, handler, delegationSelector) {
if (delegationSelector === void 0) {
delegationSelector = null;
}
var uidList = Object.keys(events);
for (var i = 0; i < uidList.length; i++) {
var uid = uidList[i];
var event = events[uid];
if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {
return events[uid];
}
}
return null;
}
function normalizeParams(originalTypeEvent, handler, delegationFn) {
var delegation = typeof handler === 'string';
var originalHandler = delegation ? delegationFn : handler; // allow to get the native events from namespaced events ('click.bs.button' --> 'click')
var typeEvent = originalTypeEvent.replace(stripNameRegex, '');
var custom = customEvents[typeEvent];
if (custom) {
typeEvent = custom;
}
var isNative = nativeEvents.indexOf(typeEvent) > -1;
if (!isNative) {
typeEvent = originalTypeEvent;
}
return [delegation, originalHandler, typeEvent];
}
function addHandler(element, originalTypeEvent, handler, delegationFn, oneOff) {
if (typeof originalTypeEvent !== 'string' || !element) {
return;
}
if (!handler) {
handler = delegationFn;
delegationFn = null;
}
var _normalizeParams = normalizeParams(originalTypeEvent, handler, delegationFn),
delegation = _normalizeParams[0],
originalHandler = _normalizeParams[1],
typeEvent = _normalizeParams[2];
var events = getEvent(element);
var handlers = events[typeEvent] || (events[typeEvent] = {});
var previousFn = findHandler(handlers, originalHandler, delegation ? handler : null);
if (previousFn) {
previousFn.oneOff = previousFn.oneOff && oneOff;
return;
}
var uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''));
var fn = !delegation ? bootstrapHandler(element, handler) : bootstrapDelegationHandler(element, handler, delegationFn);
fn.delegationSelector = delegation ? handler : null;
fn.originalHandler = originalHandler;
fn.oneOff = oneOff;
fn.uidEvent = uid;
handlers[uid] = fn;
element.addEventListener(typeEvent, fn, delegation);
}
function removeHandler(element, events, typeEvent, handler, delegationSelector) {
var fn = findHandler(events[typeEvent], handler, delegationSelector);
if (fn === null) {
return;
}
element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));
delete events[typeEvent][fn.uidEvent];
}
function removeNamespacedHandlers(element, events, typeEvent, namespace) {
var storeElementEvent = events[typeEvent] || {};
Object.keys(storeElementEvent).forEach(function (handlerKey) {
if (handlerKey.indexOf(namespace) > -1) {
var event = storeElementEvent[handlerKey];
removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
}
});
}
var EventHandler = {
on: function on(element, event, handler, delegationFn) {
addHandler(element, event, handler, delegationFn, false);
},
one: function one(element, event, handler, delegationFn) {
addHandler(element, event, handler, delegationFn, true);
},
off: function off(element, originalTypeEvent, handler, delegationFn) {
if (typeof originalTypeEvent !== 'string' || !element) {
return;
}
var _normalizeParams2 = normalizeParams(originalTypeEvent, handler, delegationFn),
delegation = _normalizeParams2[0],
originalHandler = _normalizeParams2[1],
typeEvent = _normalizeParams2[2];
var inNamespace = typeEvent !== originalTypeEvent;
var events = getEvent(element);
var isNamespace = originalTypeEvent.charAt(0) === '.';
if (typeof originalHandler !== 'undefined') {
// Simplest case: handler is passed, remove that listener ONLY.
if (!events || !events[typeEvent]) {
return;
}
removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null);
return;
}
if (isNamespace) {
Object.keys(events).forEach(function (elementEvent) {
removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.substr(1));
});
}
var storeElementEvent = events[typeEvent] || {};
Object.keys(storeElementEvent).forEach(function (keyHandlers) {
var handlerKey = keyHandlers.replace(stripUidRegex, '');
if (!inNamespace || originalTypeEvent.indexOf(handlerKey) > -1) {
var event = storeElementEvent[keyHandlers];
removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
}
});
},
trigger: function trigger(element, event, args) {
if (typeof event !== 'string' || !element) {
return null;
}
var typeEvent = event.replace(stripNameRegex, '');
var inNamespace = event !== typeEvent;
var isNative = nativeEvents.indexOf(typeEvent) > -1;
var jQueryEvent;
var bubbles = true;
var nativeDispatch = true;
var defaultPrevented = false;
var evt = null;
if (inNamespace && typeof jQuery !== 'undefined') {
jQueryEvent = jQuery.Event(event, args);
jQuery(element).trigger(jQueryEvent);
bubbles = !jQueryEvent.isPropagationStopped();
nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();
defaultPrevented = jQueryEvent.isDefaultPrevented();
}
if (isNative) {
evt = document.createEvent('HTMLEvents');
evt.initEvent(typeEvent, bubbles, true);
} else {
evt = new CustomEvent(event, {
bubbles: bubbles,
cancelable: true
});
} // merge custom informations in our event
if (typeof args !== 'undefined') {
Object.keys(args).forEach(function (key) {
Object.defineProperty(evt, key, {
get: function get() {
return args[key];
}
});
});
}
if (defaultPrevented) {
evt.preventDefault();
if (!Polyfill.defaultPreventedPreservedOnDispatch) {
Object.defineProperty(evt, 'defaultPrevented', {
get: function get() {
return true;
}
});
}
}
if (nativeDispatch) {
element.dispatchEvent(evt);
}
if (evt.defaultPrevented && typeof jQueryEvent !== 'undefined') {
jQueryEvent.preventDefault();
}
return evt;
}
};
return EventHandler;
}));
//# sourceMappingURL=eventhandler.js.map

1
js/dist/dom/eventhandler.js.map vendored Normal file

File diff suppressed because one or more lines are too long

129
js/dist/dom/manipulator.js vendored Normal file
View File

@ -0,0 +1,129 @@
/*!
* Bootstrap manipulator.js v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, global.Manipulator = factory());
}(this, function () { 'use strict';
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
function _objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
var ownKeys = Object.keys(source);
if (typeof Object.getOwnPropertySymbols === 'function') {
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
}));
}
ownKeys.forEach(function (key) {
_defineProperty(target, key, source[key]);
});
}
return target;
}
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): dom/manipulator.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
function normalizeData(val) {
if (val === 'true') {
return true;
}
if (val === 'false') {
return false;
}
if (val === Number(val).toString()) {
return Number(val);
}
if (val === '' || val === 'null') {
return null;
}
return val;
}
function normalizeDataKey(key) {
return key.replace(/[A-Z]/g, function (chr) {
return chr.toLowerCase();
});
}
var Manipulator = {
setDataAttribute: function setDataAttribute(element, key, value) {
element.setAttribute("data-" + normalizeDataKey(key), value);
},
removeDataAttribute: function removeDataAttribute(element, key) {
element.removeAttribute("data-" + normalizeDataKey(key));
},
getDataAttributes: function getDataAttributes(element) {
if (!element) {
return {};
}
var attributes = _objectSpread({}, element.dataset);
Object.keys(attributes).forEach(function (key) {
attributes[key] = normalizeData(attributes[key]);
});
return attributes;
},
getDataAttribute: function getDataAttribute(element, key) {
return normalizeData(element.getAttribute("data-" + normalizeDataKey(key)));
},
offset: function offset(element) {
var rect = element.getBoundingClientRect();
return {
top: rect.top + document.body.scrollTop,
left: rect.left + document.body.scrollLeft
};
},
position: function position(element) {
return {
top: element.offsetTop,
left: element.offsetLeft
};
},
toggleClass: function toggleClass(element, className) {
if (!element) {
return;
}
if (element.classList.contains(className)) {
element.classList.remove(className);
} else {
element.classList.add(className);
}
}
};
return Manipulator;
}));
//# sourceMappingURL=manipulator.js.map

1
js/dist/dom/manipulator.js.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"manipulator.js","sources":["../../src/dom/manipulator.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.3.1): dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nfunction normalizeData(val) {\n if (val === 'true') {\n return true\n }\n\n if (val === 'false') {\n return false\n }\n\n if (val === Number(val).toString()) {\n return Number(val)\n }\n\n if (val === '' || val === 'null') {\n return null\n }\n\n return val\n}\n\nfunction normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, (chr) => chr.toLowerCase())\n}\n\nconst Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-${normalizeDataKey(key)}`, value)\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-${normalizeDataKey(key)}`)\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {}\n }\n\n const attributes = {\n ...element.dataset\n }\n\n Object.keys(attributes).forEach((key) => {\n attributes[key] = normalizeData(attributes[key])\n })\n\n return attributes\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-${normalizeDataKey(key)}`))\n },\n\n offset(element) {\n const rect = element.getBoundingClientRect()\n\n return {\n top: rect.top + document.body.scrollTop,\n left: rect.left + document.body.scrollLeft\n }\n },\n\n position(element) {\n return {\n top: element.offsetTop,\n left: element.offsetLeft\n }\n },\n\n toggleClass(element, className) {\n if (!element) {\n return\n }\n\n if (element.classList.contains(className)) {\n element.classList.remove(className)\n } else {\n element.classList.add(className)\n }\n }\n}\n\nexport default Manipulator\n"],"names":["normalizeData","val","Number","toString","normalizeDataKey","key","replace","chr","toLowerCase","Manipulator","setDataAttribute","element","value","setAttribute","removeDataAttribute","removeAttribute","getDataAttributes","attributes","dataset","Object","keys","forEach","getDataAttribute","getAttribute","offset","rect","getBoundingClientRect","top","document","body","scrollTop","left","scrollLeft","position","offsetTop","offsetLeft","toggleClass","className","classList","contains","remove","add"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA;;;;;;EAOA,SAASA,aAAT,CAAuBC,GAAvB,EAA4B;EAC1B,MAAIA,GAAG,KAAK,MAAZ,EAAoB;EAClB,WAAO,IAAP;EACD;;EAED,MAAIA,GAAG,KAAK,OAAZ,EAAqB;EACnB,WAAO,KAAP;EACD;;EAED,MAAIA,GAAG,KAAKC,MAAM,CAACD,GAAD,CAAN,CAAYE,QAAZ,EAAZ,EAAoC;EAClC,WAAOD,MAAM,CAACD,GAAD,CAAb;EACD;;EAED,MAAIA,GAAG,KAAK,EAAR,IAAcA,GAAG,KAAK,MAA1B,EAAkC;EAChC,WAAO,IAAP;EACD;;EAED,SAAOA,GAAP;EACD;;EAED,SAASG,gBAAT,CAA0BC,GAA1B,EAA+B;EAC7B,SAAOA,GAAG,CAACC,OAAJ,CAAY,QAAZ,EAAsB,UAACC,GAAD;EAAA,WAASA,GAAG,CAACC,WAAJ,EAAT;EAAA,GAAtB,CAAP;EACD;;EAED,IAAMC,WAAW,GAAG;EAClBC,EAAAA,gBADkB,4BACDC,OADC,EACQN,GADR,EACaO,KADb,EACoB;EACpCD,IAAAA,OAAO,CAACE,YAAR,WAA6BT,gBAAgB,CAACC,GAAD,CAA7C,EAAsDO,KAAtD;EACD,GAHiB;EAKlBE,EAAAA,mBALkB,+BAKEH,OALF,EAKWN,GALX,EAKgB;EAChCM,IAAAA,OAAO,CAACI,eAAR,WAAgCX,gBAAgB,CAACC,GAAD,CAAhD;EACD,GAPiB;EASlBW,EAAAA,iBATkB,6BASAL,OATA,EASS;EACzB,QAAI,CAACA,OAAL,EAAc;EACZ,aAAO,EAAP;EACD;;EAED,QAAMM,UAAU,qBACXN,OAAO,CAACO,OADG,CAAhB;;EAIAC,IAAAA,MAAM,CAACC,IAAP,CAAYH,UAAZ,EAAwBI,OAAxB,CAAgC,UAAChB,GAAD,EAAS;EACvCY,MAAAA,UAAU,CAACZ,GAAD,CAAV,GAAkBL,aAAa,CAACiB,UAAU,CAACZ,GAAD,CAAX,CAA/B;EACD,KAFD;EAIA,WAAOY,UAAP;EACD,GAvBiB;EAyBlBK,EAAAA,gBAzBkB,4BAyBDX,OAzBC,EAyBQN,GAzBR,EAyBa;EAC7B,WAAOL,aAAa,CAACW,OAAO,CAACY,YAAR,WAA6BnB,gBAAgB,CAACC,GAAD,CAA7C,CAAD,CAApB;EACD,GA3BiB;EA6BlBmB,EAAAA,MA7BkB,kBA6BXb,OA7BW,EA6BF;EACd,QAAMc,IAAI,GAAGd,OAAO,CAACe,qBAAR,EAAb;EAEA,WAAO;EACLC,MAAAA,GAAG,EAAEF,IAAI,CAACE,GAAL,GAAWC,QAAQ,CAACC,IAAT,CAAcC,SADzB;EAELC,MAAAA,IAAI,EAAEN,IAAI,CAACM,IAAL,GAAYH,QAAQ,CAACC,IAAT,CAAcG;EAF3B,KAAP;EAID,GApCiB;EAsClBC,EAAAA,QAtCkB,oBAsCTtB,OAtCS,EAsCA;EAChB,WAAO;EACLgB,MAAAA,GAAG,EAAEhB,OAAO,CAACuB,SADR;EAELH,MAAAA,IAAI,EAAEpB,OAAO,CAACwB;EAFT,KAAP;EAID,GA3CiB;EA6ClBC,EAAAA,WA7CkB,uBA6CNzB,OA7CM,EA6CG0B,SA7CH,EA6Cc;EAC9B,QAAI,CAAC1B,OAAL,EAAc;EACZ;EACD;;EAED,QAAIA,OAAO,CAAC2B,SAAR,CAAkBC,QAAlB,CAA2BF,SAA3B,CAAJ,EAA2C;EACzC1B,MAAAA,OAAO,CAAC2B,SAAR,CAAkBE,MAAlB,CAAyBH,SAAzB;EACD,KAFD,MAEO;EACL1B,MAAAA,OAAO,CAAC2B,SAAR,CAAkBG,GAAlB,CAAsBJ,SAAtB;EACD;EACF;EAvDiB,CAApB;;;;;;;;"}

126
js/dist/dom/polyfill.js vendored Normal file
View File

@ -0,0 +1,126 @@
/*!
* Bootstrap polyfill.js v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, global.Polyfill = factory());
}(this, function () { 'use strict';
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
var MAX_UID = 1000000;
var jQuery = window.jQuery; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
/**
* --------------------------------------------------------------------------
* Public Util Api
* --------------------------------------------------------------------------
*/
var getUID = function getUID(prefix) {
do {
// eslint-disable-next-line no-bitwise
prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
} while (document.getElementById(prefix));
return prefix;
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): dom/polyfill.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
/* istanbul ignore next */
var Polyfill = function () {
// MSEdge resets defaultPrevented flag upon dispatchEvent call if at least one listener is attached
var defaultPreventedPreservedOnDispatch = function () {
var e = new CustomEvent('Bootstrap', {
cancelable: true
});
var element = document.createElement('div');
element.addEventListener('Bootstrap', function () {
return null;
});
e.preventDefault();
element.dispatchEvent(e);
return e.defaultPrevented;
}();
var find = Element.prototype.querySelectorAll;
var findOne = Element.prototype.querySelector;
var scopeSelectorRegex = /:scope\b/;
var supportScopeQuery = function () {
var element = document.createElement('div');
try {
element.querySelectorAll(':scope *');
} catch (e) {
return false;
}
return true;
}();
if (!supportScopeQuery) {
find = function find(selector) {
if (!scopeSelectorRegex.test(selector)) {
return this.querySelectorAll(selector);
}
var hasId = Boolean(this.id);
if (!hasId) {
this.id = getUID('scope');
}
var nodeList = null;
try {
selector = selector.replace(scopeSelectorRegex, "#" + this.id);
nodeList = this.querySelectorAll(selector);
} finally {
if (!hasId) {
this.removeAttribute('id');
}
}
return nodeList;
};
findOne = function findOne(selector) {
if (!scopeSelectorRegex.test(selector)) {
return this.querySelector(selector);
}
var matches = find.call(this, selector);
if (typeof matches[0] !== 'undefined') {
return matches[0];
}
return null;
};
}
return {
defaultPreventedPreservedOnDispatch: defaultPreventedPreservedOnDispatch,
find: find,
findOne: findOne
};
}();
return Polyfill;
}));
//# sourceMappingURL=polyfill.js.map

1
js/dist/dom/polyfill.js.map vendored Normal file

File diff suppressed because one or more lines are too long

131
js/dist/dom/selectorengine.js vendored Normal file
View File

@ -0,0 +1,131 @@
/*!
* Bootstrap selectorengine.js v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./polyfill.js')) :
typeof define === 'function' && define.amd ? define(['./polyfill.js'], factory) :
(global = global || self, global.SelectorEngine = factory(global.Polyfill));
}(this, function (Polyfill) { 'use strict';
Polyfill = Polyfill && Polyfill.hasOwnProperty('default') ? Polyfill['default'] : Polyfill;
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
var jQuery = window.jQuery; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
var makeArray = function makeArray(nodeList) {
if (!nodeList) {
return [];
}
return [].slice.call(nodeList);
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): dom/selectorEngine.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var findFn = Polyfill.find;
var _findOne = Polyfill.findOne;
var NODE_TEXT = 3;
var SelectorEngine = {
matches: function matches(element, selector) {
return element.matches(selector);
},
find: function find(selector, element) {
if (element === void 0) {
element = document.documentElement;
}
if (typeof selector !== 'string') {
return null;
}
return findFn.call(element, selector);
},
findOne: function findOne(selector, element) {
if (element === void 0) {
element = document.documentElement;
}
if (typeof selector !== 'string') {
return null;
}
return _findOne.call(element, selector);
},
children: function children(element, selector) {
var _this = this;
if (typeof selector !== 'string') {
return null;
}
var children = makeArray(element.children);
return children.filter(function (child) {
return _this.matches(child, selector);
});
},
parents: function parents(element, selector) {
if (typeof selector !== 'string') {
return null;
}
var parents = [];
var ancestor = element.parentNode;
while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {
if (this.matches(ancestor, selector)) {
parents.push(ancestor);
}
ancestor = ancestor.parentNode;
}
return parents;
},
closest: function closest(element, selector) {
if (typeof selector !== 'string') {
return null;
}
return element.closest(selector);
},
prev: function prev(element, selector) {
if (typeof selector !== 'string') {
return null;
}
var siblings = [];
var previous = element.previousSibling;
while (previous && previous.nodeType === Node.ELEMENT_NODE && previous.nodeType !== NODE_TEXT) {
if (this.matches(previous, selector)) {
siblings.push(previous);
}
previous = previous.previousSibling;
}
return siblings;
}
};
return SelectorEngine;
}));
//# sourceMappingURL=selectorengine.js.map

1
js/dist/dom/selectorengine.js.map vendored Normal file

File diff suppressed because one or more lines are too long

272
js/dist/dropdown.js vendored
View File

@ -4,14 +4,16 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('popper.js'), require('./util.js')) :
typeof define === 'function' && define.amd ? define(['jquery', 'popper.js', './util.js'], factory) :
(global = global || self, global.Dropdown = factory(global.jQuery, global.Popper, global.Util));
}(this, function ($, Popper, Util) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/eventHandler.js'), require('./dom/manipulator.js'), require('popper.js'), require('./dom/selectorEngine.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/eventHandler.js', './dom/manipulator.js', 'popper.js', './dom/selectorEngine.js'], factory) :
(global = global || self, global.Dropdown = factory(global.Data, global.EventHandler, global.Manipulator, global.Popper, global.SelectorEngine));
}(this, function (Data, EventHandler, Manipulator, Popper, SelectorEngine) { 'use strict';
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data;
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler;
Manipulator = Manipulator && Manipulator.hasOwnProperty('default') ? Manipulator['default'] : Manipulator;
Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper;
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine;
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@ -63,6 +65,62 @@
return target;
}
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
var jQuery = window.jQuery; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
var toType = function toType(obj) {
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
};
var getSelectorFromElement = function getSelectorFromElement(element) {
var selector = element.getAttribute('data-target');
if (!selector || selector === '#') {
var hrefAttr = element.getAttribute('href');
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
}
try {
return document.querySelector(selector) ? selector : null;
} catch (err) {
return null;
}
};
var isElement = function isElement(obj) {
return (obj[0] || obj).nodeType;
};
var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
Object.keys(configTypes).forEach(function (property) {
var expectedTypes = configTypes[property];
var value = config[property];
var valueType = value && isElement(value) ? 'element' : toType(value);
if (!new RegExp(expectedTypes).test(valueType)) {
throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
}
});
};
var makeArray = function makeArray(nodeList) {
if (!nodeList) {
return [];
}
return [].slice.call(nodeList);
};
var noop = function noop() {
return function () {};
};
/**
* ------------------------------------------------------------------------
* Constants
@ -74,7 +132,6 @@
var DATA_KEY = 'bs.dropdown';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
var JQUERY_NO_CONFLICT = $.fn[NAME];
var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key
@ -157,6 +214,8 @@
this._inNavbar = this._detectNavbar();
this._addEventListeners();
Data.setData(element, DATA_KEY, this);
} // Getters
@ -164,13 +223,13 @@
// Public
_proto.toggle = function toggle() {
if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED)) {
if (this._element.disabled || this._element.classList.contains(ClassName.DISABLED)) {
return;
}
var parent = Dropdown._getParentFromElement(this._element);
var isActive = $(this._menu).hasClass(ClassName.SHOW);
var isActive = this._menu.classList.contains(ClassName.SHOW);
Dropdown._clearMenus();
@ -181,10 +240,9 @@
var relatedTarget = {
relatedTarget: this._element
};
var showEvent = $.Event(Event.SHOW, relatedTarget);
$(parent).trigger(showEvent);
var showEvent = EventHandler.trigger(parent, Event.SHOW, relatedTarget);
if (showEvent.isDefaultPrevented()) {
if (showEvent.defaultPrevented) {
return;
} // Disable totally Popper.js for Dropdown in Navbar
@ -195,14 +253,14 @@
* Popper - https://popper.js.org
*/
if (typeof Popper === 'undefined') {
throw new TypeError('Bootstrap\'s dropdowns require Popper.js (https://popper.js.org/)');
throw new TypeError('Bootstrap\'s dropdowns require Popper.js (https://popper.js.org)');
}
var referenceElement = this._element;
if (this._config.reference === 'parent') {
referenceElement = parent;
} else if (Util.isElement(this._config.reference)) {
} else if (isElement(this._config.reference)) {
referenceElement = this._config.reference; // Check if it's jQuery element
if (typeof this._config.reference.jquery !== 'undefined') {
@ -214,7 +272,7 @@
if (this._config.boundary !== 'scrollParent') {
$(parent).addClass(ClassName.POSITION_STATIC);
parent.classList.add(ClassName.POSITION_STATIC);
}
this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig());
@ -224,65 +282,66 @@
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
if ('ontouchstart' in document.documentElement && $(parent).closest(Selector.NAVBAR_NAV).length === 0) {
$(document.body).children().on('mouseover', null, $.noop);
if ('ontouchstart' in document.documentElement && !makeArray(SelectorEngine.closest(parent, Selector.NAVBAR_NAV)).length) {
makeArray(document.body.children).forEach(function (elem) {
return EventHandler.on(elem, 'mouseover', null, noop());
});
}
this._element.focus();
this._element.setAttribute('aria-expanded', true);
$(this._menu).toggleClass(ClassName.SHOW);
$(parent).toggleClass(ClassName.SHOW).trigger($.Event(Event.SHOWN, relatedTarget));
Manipulator.toggleClass(this._menu, ClassName.SHOW);
Manipulator.toggleClass(parent, ClassName.SHOW);
EventHandler.trigger(parent, Event.SHOWN, relatedTarget);
};
_proto.show = function show() {
if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED) || $(this._menu).hasClass(ClassName.SHOW)) {
if (this._element.disabled || this._element.classList.contains(ClassName.DISABLED) || this._menu.classList.contains(ClassName.SHOW)) {
return;
}
var parent = Dropdown._getParentFromElement(this._element);
var relatedTarget = {
relatedTarget: this._element
};
var showEvent = $.Event(Event.SHOW, relatedTarget);
var showEvent = EventHandler.trigger(parent, Event.SHOW, relatedTarget);
var parent = Dropdown._getParentFromElement(this._element);
$(parent).trigger(showEvent);
if (showEvent.isDefaultPrevented()) {
if (showEvent.defaultPrevented) {
return;
}
$(this._menu).toggleClass(ClassName.SHOW);
$(parent).toggleClass(ClassName.SHOW).trigger($.Event(Event.SHOWN, relatedTarget));
Manipulator.toggleClass(this._menu, ClassName.SHOW);
Manipulator.toggleClass(parent, ClassName.SHOW);
EventHandler.trigger(parent, Event.SHOWN, relatedTarget);
};
_proto.hide = function hide() {
if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED) || !$(this._menu).hasClass(ClassName.SHOW)) {
if (this._element.disabled || this._element.classList.contains(ClassName.DISABLED) || !this._menu.classList.contains(ClassName.SHOW)) {
return;
}
var parent = Dropdown._getParentFromElement(this._element);
var relatedTarget = {
relatedTarget: this._element
};
var hideEvent = $.Event(Event.HIDE, relatedTarget);
var hideEvent = EventHandler.trigger(parent, Event.HIDE, relatedTarget);
var parent = Dropdown._getParentFromElement(this._element);
$(parent).trigger(hideEvent);
if (hideEvent.isDefaultPrevented()) {
if (hideEvent.defaultPrevented) {
return;
}
$(this._menu).toggleClass(ClassName.SHOW);
$(parent).toggleClass(ClassName.SHOW).trigger($.Event(Event.HIDDEN, relatedTarget));
Manipulator.toggleClass(this._menu, ClassName.SHOW);
Manipulator.toggleClass(parent, ClassName.SHOW);
EventHandler.trigger(parent, Event.HIDDEN, relatedTarget);
};
_proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY);
$(this._element).off(EVENT_KEY);
Data.removeData(this._element, DATA_KEY);
EventHandler.off(this._element, EVENT_KEY);
this._element = null;
this._menu = null;
@ -305,7 +364,7 @@
_proto._addEventListeners = function _addEventListeners() {
var _this = this;
$(this._element).on(Event.CLICK, function (event) {
EventHandler.on(this._element, Event.CLICK, function (event) {
event.preventDefault();
event.stopPropagation();
@ -314,8 +373,8 @@
};
_proto._getConfig = function _getConfig(config) {
config = _objectSpread({}, this.constructor.Default, $(this._element).data(), config);
Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
config = _objectSpread({}, this.constructor.Default, Manipulator.getDataAttributes(this._element), config);
typeCheckConfig(NAME, config, this.constructor.DefaultType);
return config;
};
@ -324,7 +383,7 @@
var parent = Dropdown._getParentFromElement(this._element);
if (parent) {
this._menu = parent.querySelector(Selector.MENU);
this._menu = SelectorEngine.findOne(Selector.MENU, parent);
}
}
@ -332,20 +391,20 @@
};
_proto._getPlacement = function _getPlacement() {
var $parentDropdown = $(this._element.parentNode);
var parentDropdown = this._element.parentNode;
var placement = AttachmentMap.BOTTOM; // Handle dropup
if ($parentDropdown.hasClass(ClassName.DROPUP)) {
if (parentDropdown.classList.contains(ClassName.DROPUP)) {
placement = AttachmentMap.TOP;
if ($(this._menu).hasClass(ClassName.MENURIGHT)) {
if (this._menu.classList.contains(ClassName.MENURIGHT)) {
placement = AttachmentMap.TOPEND;
}
} else if ($parentDropdown.hasClass(ClassName.DROPRIGHT)) {
} else if (parentDropdown.classList.contains(ClassName.DROPRIGHT)) {
placement = AttachmentMap.RIGHT;
} else if ($parentDropdown.hasClass(ClassName.DROPLEFT)) {
} else if (parentDropdown.classList.contains(ClassName.DROPLEFT)) {
placement = AttachmentMap.LEFT;
} else if ($(this._menu).hasClass(ClassName.MENURIGHT)) {
} else if (this._menu.classList.contains(ClassName.MENURIGHT)) {
placement = AttachmentMap.BOTTOMEND;
}
@ -353,7 +412,7 @@
};
_proto._detectNavbar = function _detectNavbar() {
return $(this._element).closest('.navbar').length > 0;
return Boolean(SelectorEngine.closest(this._element, '.navbar'));
};
_proto._getOffset = function _getOffset() {
@ -398,24 +457,27 @@
} // Static
;
Dropdown._dropdownInterface = function _dropdownInterface(element, config) {
var data = Data.getData(element, DATA_KEY);
var _config = typeof config === 'object' ? config : null;
if (!data) {
data = new Dropdown(element, _config);
}
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
throw new Error("No method named \"" + config + "\"");
}
data[config]();
}
};
Dropdown._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var data = $(this).data(DATA_KEY);
var _config = typeof config === 'object' ? config : null;
if (!data) {
data = new Dropdown(this, _config);
$(this).data(DATA_KEY, data);
}
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
throw new TypeError("No method named \"" + config + "\"");
}
data[config]();
}
Dropdown._dropdownInterface(this, config);
});
};
@ -424,12 +486,12 @@
return;
}
var toggles = [].slice.call(document.querySelectorAll(Selector.DATA_TOGGLE));
var toggles = makeArray(SelectorEngine.find(Selector.DATA_TOGGLE));
for (var i = 0, len = toggles.length; i < len; i++) {
var parent = Dropdown._getParentFromElement(toggles[i]);
var context = $(toggles[i]).data(DATA_KEY);
var context = Data.getData(toggles[i], DATA_KEY);
var relatedTarget = {
relatedTarget: toggles[i]
};
@ -444,44 +506,45 @@
var dropdownMenu = context._menu;
if (!$(parent).hasClass(ClassName.SHOW)) {
if (!parent.classList.contains(ClassName.SHOW)) {
continue;
}
if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $.contains(parent, event.target)) {
if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && parent.contains(event.target)) {
continue;
}
var hideEvent = $.Event(Event.HIDE, relatedTarget);
$(parent).trigger(hideEvent);
var hideEvent = EventHandler.trigger(parent, Event.HIDE, relatedTarget);
if (hideEvent.isDefaultPrevented()) {
if (hideEvent.defaultPrevented) {
continue;
} // If this is a touch-enabled device we remove the extra
// empty mouseover listeners we added for iOS support
if ('ontouchstart' in document.documentElement) {
$(document.body).children().off('mouseover', null, $.noop);
makeArray(document.body.children).forEach(function (elem) {
return EventHandler.off(elem, 'mouseover', null, noop());
});
}
toggles[i].setAttribute('aria-expanded', 'false');
$(dropdownMenu).removeClass(ClassName.SHOW);
$(parent).removeClass(ClassName.SHOW).trigger($.Event(Event.HIDDEN, relatedTarget));
dropdownMenu.classList.remove(ClassName.SHOW);
parent.classList.remove(ClassName.SHOW);
EventHandler.trigger(parent, Event.HIDDEN, relatedTarget);
}
};
Dropdown._getParentFromElement = function _getParentFromElement(element) {
var parent;
var selector = Util.getSelectorFromElement(element);
var selector = getSelectorFromElement(element);
if (selector) {
parent = document.querySelector(selector);
parent = SelectorEngine.findOne(selector);
}
return parent || element.parentNode;
} // eslint-disable-next-line complexity
;
};
Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {
// If not input/textarea:
@ -491,34 +554,34 @@
// - If key is other than escape
// - If key is not up or down => not a dropdown command
// - If trigger inside the menu => not a dropdown command
if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $(event.target).closest(Selector.MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {
if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || SelectorEngine.closest(event.target, Selector.MENU)) : !REGEXP_KEYDOWN.test(event.which)) {
return;
}
event.preventDefault();
event.stopPropagation();
if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {
if (this.disabled || this.classList.contains(ClassName.DISABLED)) {
return;
}
var parent = Dropdown._getParentFromElement(this);
var isActive = $(parent).hasClass(ClassName.SHOW);
var isActive = parent.classList.contains(ClassName.SHOW);
if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
if (event.which === ESCAPE_KEYCODE) {
var toggle = parent.querySelector(Selector.DATA_TOGGLE);
$(toggle).trigger('focus');
EventHandler.trigger(SelectorEngine.findOne(Selector.DATA_TOGGLE, parent), 'focus');
}
$(this).trigger('click');
Dropdown._clearMenus();
return;
}
var items = [].slice.call(parent.querySelectorAll(Selector.VISIBLE_ITEMS));
var items = makeArray(SelectorEngine.find(Selector.VISIBLE_ITEMS, parent));
if (items.length === 0) {
if (!items.length) {
return;
}
@ -541,6 +604,10 @@
items[index].focus();
};
Dropdown._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY);
};
_createClass(Dropdown, null, [{
key: "VERSION",
get: function get() {
@ -567,27 +634,36 @@
*/
$(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.MENU, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API + " " + Event.KEYUP_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
EventHandler.on(document, Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler);
EventHandler.on(document, Event.KEYDOWN_DATA_API, Selector.MENU, Dropdown._dataApiKeydownHandler);
EventHandler.on(document, Event.CLICK_DATA_API, Dropdown._clearMenus);
EventHandler.on(document, Event.KEYUP_DATA_API, Dropdown._clearMenus);
EventHandler.on(document, Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
event.preventDefault();
event.stopPropagation();
Dropdown._jQueryInterface.call($(this), 'toggle');
}).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) {
e.stopPropagation();
Dropdown._dropdownInterface(this, 'toggle');
});
EventHandler.on(document, Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) {
return e.stopPropagation();
});
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
* add .dropdown to jQuery only if jQuery is present
*/
$.fn[NAME] = Dropdown._jQueryInterface;
$.fn[NAME].Constructor = Dropdown;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT = jQuery.fn[NAME];
jQuery.fn[NAME] = Dropdown._jQueryInterface;
jQuery.fn[NAME].Constructor = Dropdown;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Dropdown._jQueryInterface;
};
jQuery.fn[NAME].noConflict = function () {
jQuery.fn[NAME] = JQUERY_NO_CONFLICT;
return Dropdown._jQueryInterface;
};
}
return Dropdown;

File diff suppressed because one or more lines are too long

23
js/dist/index.js vendored
View File

@ -1,23 +0,0 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
(function ($) {
if (typeof $ === 'undefined') {
throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.');
}
var version = $.fn.jquery.split(' ')[0].split('.');
var minMajor = 1;
var ltMajor = 2;
var minMinor = 9;
var minPatch = 1;
var maxMajor = 4;
if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {
throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');
}
})($);
//# sourceMappingURL=index.js.map

View File

@ -1 +0,0 @@
{"version":3,"sources":["../src/index.js"],"names":["$","TypeError","version","fn","jquery","split","minMajor","ltMajor","minMinor","minPatch","maxMajor","Error"],"mappings":"AAaA;;;;;;AAOA,CAAC,UAACA,CAAD,EAAO;AACN,MAAI,OAAOA,CAAP,KAAa,WAAjB,EAA8B;AAC5B,UAAM,IAAIC,SAAJ,CAAc,kGAAd,CAAN;AACD;;AAED,MAAMC,UAAUF,EAAEG,EAAF,CAAKC,MAAL,CAAYC,KAAZ,CAAkB,GAAlB,EAAuB,CAAvB,EAA0BA,KAA1B,CAAgC,GAAhC,CAAhB;AACA,MAAMC,WAAW,CAAjB;AACA,MAAMC,UAAU,CAAhB;AACA,MAAMC,WAAW,CAAjB;AACA,MAAMC,WAAW,CAAjB;AACA,MAAMC,WAAW,CAAjB;;AAEA,MAAIR,QAAQ,CAAR,IAAaK,OAAb,IAAwBL,QAAQ,CAAR,IAAaM,QAArC,IAAiDN,QAAQ,CAAR,MAAeI,QAAf,IAA2BJ,QAAQ,CAAR,MAAeM,QAA1C,IAAsDN,QAAQ,CAAR,IAAaO,QAApH,IAAgIP,QAAQ,CAAR,KAAcQ,QAAlJ,EAA4J;AAC1J,UAAM,IAAIC,KAAJ,CAAU,8EAAV,CAAN;AACD;AACF,CAfD,EAeGX,CAfH","sourcesContent":["import $ from 'jquery'\nimport Alert from './alert'\nimport Button from './button'\nimport Carousel from './carousel'\nimport Collapse from './collapse'\nimport Dropdown from './dropdown'\nimport Modal from './modal'\nimport Popover from './popover'\nimport Scrollspy from './scrollspy'\nimport Tab from './tab'\nimport Tooltip from './tooltip'\nimport Util from './util'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.1.2): index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n(($) => {\n if (typeof $ === 'undefined') {\n throw new TypeError('Bootstrap\\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\\'s JavaScript.')\n }\n\n const version = $.fn.jquery.split(' ')[0].split('.')\n const minMajor = 1\n const ltMajor = 2\n const minMinor = 9\n const minPatch = 1\n const maxMajor = 4\n\n if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {\n throw new Error('Bootstrap\\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0')\n }\n})($)\n\nexport {\n Util,\n Alert,\n Button,\n Carousel,\n Collapse,\n Dropdown,\n Modal,\n Popover,\n Scrollspy,\n Tab,\n Tooltip\n}\n"],"file":"index.js"}

358
js/dist/modal.js vendored
View File

@ -4,13 +4,15 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
(global = global || self, global.Modal = factory(global.jQuery, global.Util));
}(this, function ($, Util) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/eventHandler.js'), require('./dom/manipulator.js'), require('./dom/selectorEngine.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/eventHandler.js', './dom/manipulator.js', './dom/selectorEngine.js'], factory) :
(global = global || self, global.Modal = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine));
}(this, function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict';
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data;
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler;
Manipulator = Manipulator && Manipulator.hasOwnProperty('default') ? Manipulator['default'] : Manipulator;
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine;
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@ -62,6 +64,120 @@
return target;
}
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
var MILLISECONDS_MULTIPLIER = 1000;
var TRANSITION_END = 'transitionend';
var jQuery = window.jQuery; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
var toType = function toType(obj) {
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
};
var getSelectorFromElement = function getSelectorFromElement(element) {
var selector = element.getAttribute('data-target');
if (!selector || selector === '#') {
var hrefAttr = element.getAttribute('href');
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
}
try {
return document.querySelector(selector) ? selector : null;
} catch (err) {
return null;
}
};
var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
if (!element) {
return 0;
} // Get transition-duration of the element
var _window$getComputedSt = window.getComputedStyle(element),
transitionDuration = _window$getComputedSt.transitionDuration,
transitionDelay = _window$getComputedSt.transitionDelay;
var floatTransitionDuration = parseFloat(transitionDuration);
var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
if (!floatTransitionDuration && !floatTransitionDelay) {
return 0;
} // If multiple durations are defined, take the first
transitionDuration = transitionDuration.split(',')[0];
transitionDelay = transitionDelay.split(',')[0];
return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
};
var triggerTransitionEnd = function triggerTransitionEnd(element) {
element.dispatchEvent(new Event(TRANSITION_END));
};
var isElement = function isElement(obj) {
return (obj[0] || obj).nodeType;
};
var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
var called = false;
var durationPadding = 5;
var emulatedDuration = duration + durationPadding;
function listener() {
called = true;
element.removeEventListener(TRANSITION_END, listener);
}
element.addEventListener(TRANSITION_END, listener);
setTimeout(function () {
if (!called) {
triggerTransitionEnd(element);
}
}, emulatedDuration);
};
var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
Object.keys(configTypes).forEach(function (property) {
var expectedTypes = configTypes[property];
var value = config[property];
var valueType = value && isElement(value) ? 'element' : toType(value);
if (!new RegExp(expectedTypes).test(valueType)) {
throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
}
});
};
var makeArray = function makeArray(nodeList) {
if (!nodeList) {
return [];
}
return [].slice.call(nodeList);
};
var isVisible = function isVisible(element) {
if (!element) {
return false;
}
if (element.style && element.parentNode && element.parentNode.style) {
return element.style.display !== 'none' && element.parentNode.style.display !== 'none' && element.style.visibility !== 'hidden';
}
return false;
};
var reflow = function reflow(element) {
return element.offsetHeight;
};
/**
* ------------------------------------------------------------------------
* Constants
@ -73,7 +189,6 @@
var DATA_KEY = 'bs.modal';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
var JQUERY_NO_CONFLICT = $.fn[NAME];
var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
var Default = {
@ -88,7 +203,7 @@
focus: 'boolean',
show: 'boolean'
};
var Event = {
var Event$1 = {
HIDE: "hide" + EVENT_KEY,
HIDDEN: "hidden" + EVENT_KEY,
SHOW: "show" + EVENT_KEY,
@ -130,13 +245,14 @@
function Modal(element, config) {
this._config = this._getConfig(config);
this._element = element;
this._dialog = element.querySelector(Selector.DIALOG);
this._dialog = SelectorEngine.findOne(Selector.DIALOG, element);
this._backdrop = null;
this._isShown = false;
this._isBodyOverflowing = false;
this._ignoreBackdropClick = false;
this._isTransitioning = false;
this._scrollbarWidth = 0;
Data.setData(element, DATA_KEY, this);
} // Getters
@ -154,16 +270,15 @@
return;
}
if ($(this._element).hasClass(ClassName.FADE)) {
if (this._element.classList.contains(ClassName.FADE)) {
this._isTransitioning = true;
}
var showEvent = $.Event(Event.SHOW, {
var showEvent = EventHandler.trigger(this._element, Event$1.SHOW, {
relatedTarget: relatedTarget
});
$(this._element).trigger(showEvent);
if (this._isShown || showEvent.isDefaultPrevented()) {
if (this._isShown || showEvent.defaultPrevented) {
return;
}
@ -179,12 +294,12 @@
this._setResizeEvent();
$(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function (event) {
EventHandler.on(this._element, Event$1.CLICK_DISMISS, Selector.DATA_DISMISS, function (event) {
return _this.hide(event);
});
$(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () {
$(_this._element).one(Event.MOUSEUP_DISMISS, function (event) {
if ($(event.target).is(_this._element)) {
EventHandler.on(this._dialog, Event$1.MOUSEDOWN_DISMISS, function () {
EventHandler.one(_this._element, Event$1.MOUSEUP_DISMISS, function (event) {
if (event.target === _this._element) {
_this._ignoreBackdropClick = true;
}
});
@ -206,15 +321,15 @@
return;
}
var hideEvent = $.Event(Event.HIDE);
$(this._element).trigger(hideEvent);
var hideEvent = EventHandler.trigger(this._element, Event$1.HIDE);
if (!this._isShown || hideEvent.isDefaultPrevented()) {
if (!this._isShown || hideEvent.defaultPrevented) {
return;
}
this._isShown = false;
var transition = $(this._element).hasClass(ClassName.FADE);
var transition = this._element.classList.contains(ClassName.FADE);
if (transition) {
this._isTransitioning = true;
@ -224,16 +339,19 @@
this._setResizeEvent();
$(document).off(Event.FOCUSIN);
$(this._element).removeClass(ClassName.SHOW);
$(this._element).off(Event.CLICK_DISMISS);
$(this._dialog).off(Event.MOUSEDOWN_DISMISS);
EventHandler.off(document, Event$1.FOCUSIN);
this._element.classList.remove(ClassName.SHOW);
EventHandler.off(this._element, Event$1.CLICK_DISMISS);
EventHandler.off(this._dialog, Event$1.MOUSEDOWN_DISMISS);
if (transition) {
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
$(this._element).one(Util.TRANSITION_END, function (event) {
var transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, TRANSITION_END, function (event) {
return _this2._hideModal(event);
}).emulateTransitionEnd(transitionDuration);
});
emulateTransitionEnd(this._element, transitionDuration);
} else {
this._hideModal();
}
@ -241,7 +359,7 @@
_proto.dispose = function dispose() {
[window, this._element, this._dialog].forEach(function (htmlElement) {
return $(htmlElement).off(EVENT_KEY);
return EventHandler.off(htmlElement, EVENT_KEY);
});
/**
* `document` has 2 events `Event.FOCUSIN` and `Event.CLICK_DATA_API`
@ -249,8 +367,8 @@
* It will remove `Event.CLICK_DATA_API` event that should remain
*/
$(document).off(Event.FOCUSIN);
$.removeData(this._element, DATA_KEY);
EventHandler.off(document, Event$1.FOCUSIN);
Data.removeData(this._element, DATA_KEY);
this._config = null;
this._element = null;
this._dialog = null;
@ -269,14 +387,14 @@
_proto._getConfig = function _getConfig(config) {
config = _objectSpread({}, Default, config);
Util.typeCheckConfig(NAME, config, DefaultType);
typeCheckConfig(NAME, config, DefaultType);
return config;
};
_proto._showElement = function _showElement(relatedTarget) {
var _this3 = this;
var transition = $(this._element).hasClass(ClassName.FADE);
var transition = this._element.classList.contains(ClassName.FADE);
if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
// Don't move modal's DOM position
@ -289,38 +407,37 @@
this._element.setAttribute('aria-modal', true);
if ($(this._dialog).hasClass(ClassName.SCROLLABLE)) {
this._dialog.querySelector(Selector.MODAL_BODY).scrollTop = 0;
if (this._dialog.classList.contains(ClassName.SCROLLABLE)) {
SelectorEngine.findOne(Selector.MODAL_BODY, this._dialog).scrollTop = 0;
} else {
this._element.scrollTop = 0;
}
if (transition) {
Util.reflow(this._element);
reflow(this._element);
}
$(this._element).addClass(ClassName.SHOW);
this._element.classList.add(ClassName.SHOW);
if (this._config.focus) {
this._enforceFocus();
}
var shownEvent = $.Event(Event.SHOWN, {
relatedTarget: relatedTarget
});
var transitionComplete = function transitionComplete() {
if (_this3._config.focus) {
_this3._element.focus();
}
_this3._isTransitioning = false;
$(_this3._element).trigger(shownEvent);
EventHandler.trigger(_this3._element, Event$1.SHOWN, {
relatedTarget: relatedTarget
});
};
if (transition) {
var transitionDuration = Util.getTransitionDurationFromElement(this._dialog);
$(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration);
var transitionDuration = getTransitionDurationFromElement(this._dialog);
EventHandler.one(this._dialog, TRANSITION_END, transitionComplete);
emulateTransitionEnd(this._dialog, transitionDuration);
} else {
transitionComplete();
}
@ -329,9 +446,10 @@
_proto._enforceFocus = function _enforceFocus() {
var _this4 = this;
$(document).off(Event.FOCUSIN) // Guard against infinite focus loop
.on(Event.FOCUSIN, function (event) {
if (document !== event.target && _this4._element !== event.target && $(_this4._element).has(event.target).length === 0) {
EventHandler.off(document, Event$1.FOCUSIN); // guard against infinite focus loop
EventHandler.on(document, Event$1.FOCUSIN, function (event) {
if (document !== event.target && _this4._element !== event.target && !_this4._element.contains(event.target)) {
_this4._element.focus();
}
});
@ -341,7 +459,7 @@
var _this5 = this;
if (this._isShown && this._config.keyboard) {
$(this._element).on(Event.KEYDOWN_DISMISS, function (event) {
EventHandler.on(this._element, Event$1.KEYDOWN_DISMISS, function (event) {
if (event.which === ESCAPE_KEYCODE) {
event.preventDefault();
@ -349,7 +467,7 @@
}
});
} else if (!this._isShown) {
$(this._element).off(Event.KEYDOWN_DISMISS);
EventHandler.off(this._element, Event$1.KEYDOWN_DISMISS);
}
};
@ -357,11 +475,11 @@
var _this6 = this;
if (this._isShown) {
$(window).on(Event.RESIZE, function (event) {
EventHandler.on(window, Event$1.RESIZE, function (event) {
return _this6.handleUpdate(event);
});
} else {
$(window).off(Event.RESIZE);
EventHandler.off(window, Event$1.RESIZE);
}
};
@ -377,19 +495,20 @@
this._isTransitioning = false;
this._showBackdrop(function () {
$(document.body).removeClass(ClassName.OPEN);
document.body.classList.remove(ClassName.OPEN);
_this7._resetAdjustments();
_this7._resetScrollbar();
$(_this7._element).trigger(Event.HIDDEN);
EventHandler.trigger(_this7._element, Event$1.HIDDEN);
});
};
_proto._removeBackdrop = function _removeBackdrop() {
if (this._backdrop) {
$(this._backdrop).remove();
this._backdrop.parentNode.removeChild(this._backdrop);
this._backdrop = null;
}
};
@ -397,7 +516,7 @@
_proto._showBackdrop = function _showBackdrop(callback) {
var _this8 = this;
var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : '';
var animate = this._element.classList.contains(ClassName.FADE) ? ClassName.FADE : '';
if (this._isShown && this._config.backdrop) {
this._backdrop = document.createElement('div');
@ -407,8 +526,8 @@
this._backdrop.classList.add(animate);
}
$(this._backdrop).appendTo(document.body);
$(this._element).on(Event.CLICK_DISMISS, function (event) {
document.body.appendChild(this._backdrop);
EventHandler.on(this._element, Event$1.CLICK_DISMISS, function (event) {
if (_this8._ignoreBackdropClick) {
_this8._ignoreBackdropClick = false;
return;
@ -426,10 +545,10 @@
});
if (animate) {
Util.reflow(this._backdrop);
reflow(this._backdrop);
}
$(this._backdrop).addClass(ClassName.SHOW);
this._backdrop.classList.add(ClassName.SHOW);
if (!callback) {
return;
@ -440,10 +559,11 @@
return;
}
var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
$(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration);
var backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);
EventHandler.one(this._backdrop, TRANSITION_END, callback);
emulateTransitionEnd(this._backdrop, backdropTransitionDuration);
} else if (!this._isShown && this._backdrop) {
$(this._backdrop).removeClass(ClassName.SHOW);
this._backdrop.classList.remove(ClassName.SHOW);
var callbackRemove = function callbackRemove() {
_this8._removeBackdrop();
@ -453,10 +573,11 @@
}
};
if ($(this._element).hasClass(ClassName.FADE)) {
var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
if (this._element.classList.contains(ClassName.FADE)) {
var _backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);
$(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration);
EventHandler.one(this._backdrop, TRANSITION_END, callbackRemove);
emulateTransitionEnd(this._backdrop, _backdropTransitionDuration);
} else {
callbackRemove();
}
@ -498,50 +619,58 @@
if (this._isBodyOverflowing) {
// Note: DOMNode.style.paddingRight returns the actual value or '' if not set
// while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
var fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT));
var stickyContent = [].slice.call(document.querySelectorAll(Selector.STICKY_CONTENT)); // Adjust fixed content padding
$(fixedContent).each(function (index, element) {
// Adjust fixed content padding
makeArray(SelectorEngine.find(Selector.FIXED_CONTENT)).forEach(function (element) {
var actualPadding = element.style.paddingRight;
var calculatedPadding = $(element).css('padding-right');
$(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this9._scrollbarWidth + "px");
var calculatedPadding = window.getComputedStyle(element)['padding-right'];
Manipulator.setDataAttribute(element, 'padding-right', actualPadding);
element.style.paddingRight = parseFloat(calculatedPadding) + _this9._scrollbarWidth + "px";
}); // Adjust sticky content margin
$(stickyContent).each(function (index, element) {
makeArray(SelectorEngine.find(Selector.STICKY_CONTENT)).forEach(function (element) {
var actualMargin = element.style.marginRight;
var calculatedMargin = $(element).css('margin-right');
$(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px");
var calculatedMargin = window.getComputedStyle(element)['margin-right'];
Manipulator.setDataAttribute(element, 'margin-right', actualMargin);
element.style.marginRight = parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px";
}); // Adjust body padding
var actualPadding = document.body.style.paddingRight;
var calculatedPadding = $(document.body).css('padding-right');
$(document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px");
var calculatedPadding = window.getComputedStyle(document.body)['padding-right'];
Manipulator.setDataAttribute(document.body, 'padding-right', actualPadding);
document.body.style.paddingRight = parseFloat(calculatedPadding) + this._scrollbarWidth + "px";
}
$(document.body).addClass(ClassName.OPEN);
document.body.classList.add(ClassName.OPEN);
};
_proto._resetScrollbar = function _resetScrollbar() {
// Restore fixed content padding
var fixedContent = [].slice.call(document.querySelectorAll(Selector.FIXED_CONTENT));
$(fixedContent).each(function (index, element) {
var padding = $(element).data('padding-right');
$(element).removeData('padding-right');
element.style.paddingRight = padding ? padding : '';
}); // Restore sticky content
makeArray(SelectorEngine.find(Selector.FIXED_CONTENT)).forEach(function (element) {
var padding = Manipulator.getDataAttribute(element, 'padding-right');
var elements = [].slice.call(document.querySelectorAll("" + Selector.STICKY_CONTENT));
$(elements).each(function (index, element) {
var margin = $(element).data('margin-right');
if (typeof padding !== 'undefined') {
Manipulator.removeDataAttribute(element, 'padding-right');
element.style.paddingRight = padding;
}
}); // Restore sticky content and navbar-toggler margin
makeArray(SelectorEngine.find("" + Selector.STICKY_CONTENT)).forEach(function (element) {
var margin = Manipulator.getDataAttribute(element, 'margin-right');
if (typeof margin !== 'undefined') {
$(element).css('margin-right', margin).removeData('margin-right');
Manipulator.removeDataAttribute(element, 'margin-right');
element.style.marginRight = margin;
}
}); // Restore body padding
var padding = $(document.body).data('padding-right');
$(document.body).removeData('padding-right');
document.body.style.paddingRight = padding ? padding : '';
var padding = Manipulator.getDataAttribute(document.body, 'padding-right');
if (typeof padding !== 'undefined') {
Manipulator.removeDataAttribute(document.body, 'padding-right');
document.body.style.paddingRight = padding;
} else {
document.body.style.paddingRight = '';
}
};
_proto._getScrollbarWidth = function _getScrollbarWidth() {
@ -557,13 +686,12 @@
Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
return this.each(function () {
var data = $(this).data(DATA_KEY);
var data = Data.getData(this, DATA_KEY);
var _config = _objectSpread({}, Default, $(this).data(), typeof config === 'object' && config ? config : {});
var _config = _objectSpread({}, Default, Manipulator.getDataAttributes(this), typeof config === 'object' && config ? config : {});
if (!data) {
data = new Modal(this, _config);
$(this).data(DATA_KEY, data);
}
if (typeof config === 'string') {
@ -578,6 +706,10 @@
});
};
Modal._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY);
};
_createClass(Modal, null, [{
key: "VERSION",
get: function get() {
@ -599,36 +731,41 @@
*/
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
EventHandler.on(document, Event$1.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
var _this10 = this;
var target;
var selector = Util.getSelectorFromElement(this);
var selector = getSelectorFromElement(this);
if (selector) {
target = document.querySelector(selector);
target = SelectorEngine.findOne(selector);
}
var config = $(target).data(DATA_KEY) ? 'toggle' : _objectSpread({}, $(target).data(), $(this).data());
var config = Data.getData(target, DATA_KEY) ? 'toggle' : _objectSpread({}, Manipulator.getDataAttributes(target), Manipulator.getDataAttributes(this));
if (this.tagName === 'A' || this.tagName === 'AREA') {
event.preventDefault();
}
var $target = $(target).one(Event.SHOW, function (showEvent) {
if (showEvent.isDefaultPrevented()) {
// Only register focus restorer if modal will actually get shown
EventHandler.one(target, Event$1.SHOW, function (showEvent) {
if (showEvent.defaultPrevented) {
// only register focus restorer if modal will actually get shown
return;
}
$target.one(Event.HIDDEN, function () {
if ($(_this10).is(':visible')) {
EventHandler.one(target, Event$1.HIDDEN, function () {
if (isVisible(_this10)) {
_this10.focus();
}
});
});
var data = Data.getData(target, DATA_KEY);
Modal._jQueryInterface.call($(target), config, this);
if (!data) {
data = new Modal(target, config);
}
data.show(this);
});
/**
* ------------------------------------------------------------------------
@ -636,13 +773,16 @@
* ------------------------------------------------------------------------
*/
$.fn[NAME] = Modal._jQueryInterface;
$.fn[NAME].Constructor = Modal;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT = jQuery.fn[NAME];
jQuery.fn[NAME] = Modal._jQueryInterface;
jQuery.fn[NAME].Constructor = Modal;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Modal._jQueryInterface;
};
jQuery.fn[NAME].noConflict = function () {
jQuery.fn[NAME] = JQUERY_NO_CONFLICT;
return Modal._jQueryInterface;
};
}
return Modal;

File diff suppressed because one or more lines are too long

71
js/dist/popover.js vendored
View File

@ -4,12 +4,13 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./tooltip.js')) :
typeof define === 'function' && define.amd ? define(['jquery', './tooltip.js'], factory) :
(global = global || self, global.Popover = factory(global.jQuery, global.Tooltip));
}(this, function ($, Tooltip) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/selectorEngine.js'), require('./tooltip.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/selectorEngine.js', './tooltip.js'], factory) :
(global = global || self, global.Popover = factory(global.Data, global.SelectorEngine, global.Tooltip));
}(this, function (Data, SelectorEngine, Tooltip) { 'use strict';
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data;
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine;
Tooltip = Tooltip && Tooltip.hasOwnProperty('default') ? Tooltip['default'] : Tooltip;
function _defineProperties(target, props) {
@ -68,6 +69,14 @@
subClass.__proto__ = superClass;
}
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
var jQuery = window.jQuery; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
/**
* ------------------------------------------------------------------------
* Constants
@ -78,7 +87,6 @@
var VERSION = '4.3.1';
var DATA_KEY = 'bs.popover';
var EVENT_KEY = "." + DATA_KEY;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var CLASS_PREFIX = 'bs-popover';
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
@ -86,7 +94,7 @@
placement: 'right',
trigger: 'click',
content: '',
template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
});
var DefaultType = _objectSpread({}, Tooltip.DefaultType, {
@ -137,18 +145,13 @@
};
_proto.addAttachmentClass = function addAttachmentClass(attachment) {
$(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
};
_proto.getTipElement = function getTipElement() {
this.tip = this.tip || $(this.config.template)[0];
return this.tip;
this.getTipElement().classList.add(CLASS_PREFIX + "-" + attachment);
};
_proto.setContent = function setContent() {
var $tip = $(this.getTipElement()); // We use append for html objects to maintain js events
var tip = this.getTipElement(); // we use append for html objects to maintain js events
this.setElementContent($tip.find(Selector.TITLE), this.getTitle());
this.setElementContent(SelectorEngine.findOne(Selector.TITLE, tip), this.getTitle());
var content = this._getContent();
@ -156,8 +159,9 @@
content = content.call(this.element);
}
this.setElementContent($tip.find(Selector.CONTENT), content);
$tip.removeClass(ClassName.FADE + " " + ClassName.SHOW);
this.setElementContent(SelectorEngine.findOne(Selector.CONTENT, tip), content);
tip.classList.remove(ClassName.FADE);
tip.classList.remove(ClassName.SHOW);
} // Private
;
@ -166,18 +170,22 @@
};
_proto._cleanTipClass = function _cleanTipClass() {
var $tip = $(this.getTipElement());
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
var tip = this.getTipElement();
var tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);
if (tabClass !== null && tabClass.length > 0) {
$tip.removeClass(tabClass.join(''));
tabClass.map(function (token) {
return token.trim();
}).forEach(function (tClass) {
return tip.classList.remove(tClass);
});
}
} // Static
;
Popover._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var data = $(this).data(DATA_KEY);
var data = Data.getData(this, DATA_KEY);
var _config = typeof config === 'object' ? config : null;
@ -187,7 +195,7 @@
if (!data) {
data = new Popover(this, _config);
$(this).data(DATA_KEY, data);
Data.setData(this, DATA_KEY, data);
}
if (typeof config === 'string') {
@ -200,6 +208,10 @@
});
};
Popover._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY);
};
_createClass(Popover, null, [{
key: "VERSION",
// Getters
@ -247,13 +259,16 @@
*/
$.fn[NAME] = Popover._jQueryInterface;
$.fn[NAME].Constructor = Popover;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT = jQuery.fn[NAME];
jQuery.fn[NAME] = Popover._jQueryInterface;
jQuery.fn[NAME].Constructor = Popover;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Popover._jQueryInterface;
};
jQuery.fn[NAME].noConflict = function () {
jQuery.fn[NAME] = JQUERY_NO_CONFLICT;
return Popover._jQueryInterface;
};
}
return Popover;

File diff suppressed because one or more lines are too long

171
js/dist/scrollspy.js vendored
View File

@ -4,13 +4,15 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
(global = global || self, global.ScrollSpy = factory(global.jQuery, global.Util));
}(this, function ($, Util) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/eventHandler.js'), require('./dom/manipulator.js'), require('./dom/selectorEngine.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/eventHandler.js', './dom/manipulator.js', './dom/selectorEngine.js'], factory) :
(global = global || self, global.ScrollSpy = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine));
}(this, function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict';
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data;
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler;
Manipulator = Manipulator && Manipulator.hasOwnProperty('default') ? Manipulator['default'] : Manipulator;
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine;
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@ -62,6 +64,73 @@
return target;
}
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
var MAX_UID = 1000000;
var jQuery = window.jQuery; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
var toType = function toType(obj) {
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
};
/**
* --------------------------------------------------------------------------
* Public Util Api
* --------------------------------------------------------------------------
*/
var getUID = function getUID(prefix) {
do {
// eslint-disable-next-line no-bitwise
prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
} while (document.getElementById(prefix));
return prefix;
};
var getSelectorFromElement = function getSelectorFromElement(element) {
var selector = element.getAttribute('data-target');
if (!selector || selector === '#') {
var hrefAttr = element.getAttribute('href');
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
}
try {
return document.querySelector(selector) ? selector : null;
} catch (err) {
return null;
}
};
var isElement = function isElement(obj) {
return (obj[0] || obj).nodeType;
};
var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
Object.keys(configTypes).forEach(function (property) {
var expectedTypes = configTypes[property];
var value = config[property];
var valueType = value && isElement(value) ? 'element' : toType(value);
if (!new RegExp(expectedTypes).test(valueType)) {
throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
}
});
};
var makeArray = function makeArray(nodeList) {
if (!nodeList) {
return [];
}
return [].slice.call(nodeList);
};
/**
* ------------------------------------------------------------------------
* Constants
@ -73,7 +142,6 @@
var DATA_KEY = 'bs.scrollspy';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
var JQUERY_NO_CONFLICT = $.fn[NAME];
var Default = {
offset: 10,
method: 'auto',
@ -130,12 +198,14 @@
this._targets = [];
this._activeTarget = null;
this._scrollHeight = 0;
$(this._scrollElement).on(Event.SCROLL, function (event) {
EventHandler.on(this._scrollElement, Event.SCROLL, function (event) {
return _this._process(event);
});
this.refresh();
this._process();
Data.setData(element, DATA_KEY, this);
} // Getters
@ -151,13 +221,13 @@
this._offsets = [];
this._targets = [];
this._scrollHeight = this._getScrollHeight();
var targets = [].slice.call(document.querySelectorAll(this._selector));
var targets = makeArray(SelectorEngine.find(this._selector));
targets.map(function (element) {
var target;
var targetSelector = Util.getSelectorFromElement(element);
var targetSelector = getSelectorFromElement(element);
if (targetSelector) {
target = document.querySelector(targetSelector);
target = SelectorEngine.findOne(targetSelector);
}
if (target) {
@ -165,7 +235,7 @@
if (targetBCR.width || targetBCR.height) {
// TODO (fat): remove sketch reliance on jQuery position/offset
return [$(target)[offsetMethod]().top + offsetBase, targetSelector];
return [Manipulator[offsetMethod](target).top + offsetBase, targetSelector];
}
}
@ -182,8 +252,8 @@
};
_proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY);
$(this._scrollElement).off(EVENT_KEY);
Data.removeData(this._element, DATA_KEY);
EventHandler.off(this._scrollElement, EVENT_KEY);
this._element = null;
this._scrollElement = null;
this._config = null;
@ -199,17 +269,17 @@
config = _objectSpread({}, Default, typeof config === 'object' && config ? config : {});
if (typeof config.target !== 'string') {
var id = $(config.target).attr('id');
var id = config.target.id;
if (!id) {
id = Util.getUID(NAME);
$(config.target).attr('id', id);
id = getUID(NAME);
config.target.id = id;
}
config.target = "#" + id;
}
Util.typeCheckConfig(NAME, config, DefaultType);
typeCheckConfig(NAME, config, DefaultType);
return config;
};
@ -274,28 +344,36 @@
return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]";
});
var $link = $([].slice.call(document.querySelectorAll(queries.join(','))));
var link = SelectorEngine.findOne(queries.join(','));
if ($link.hasClass(ClassName.DROPDOWN_ITEM)) {
$link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);
$link.addClass(ClassName.ACTIVE);
if (link.classList.contains(ClassName.DROPDOWN_ITEM)) {
SelectorEngine.findOne(Selector.DROPDOWN_TOGGLE, SelectorEngine.closest(link, Selector.DROPDOWN)).classList.add(ClassName.ACTIVE);
link.classList.add(ClassName.ACTIVE);
} else {
// Set triggered link as active
$link.addClass(ClassName.ACTIVE); // Set triggered links parents as active
// With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
link.classList.add(ClassName.ACTIVE);
SelectorEngine.parents(link, Selector.NAV_LIST_GROUP).forEach(function (listGroup) {
// Set triggered links parents as active
// With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
SelectorEngine.prev(listGroup, Selector.NAV_LINKS + ", " + Selector.LIST_ITEMS).forEach(function (item) {
return item.classList.add(ClassName.ACTIVE);
}); // Handle special case when .nav-link is inside .nav-item
$link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_LINKS + ", " + Selector.LIST_ITEMS).addClass(ClassName.ACTIVE); // Handle special case when .nav-link is inside .nav-item
$link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_ITEMS).children(Selector.NAV_LINKS).addClass(ClassName.ACTIVE);
SelectorEngine.prev(listGroup, Selector.NAV_ITEMS).forEach(function (navItem) {
SelectorEngine.children(navItem, Selector.NAV_LINKS).forEach(function (item) {
return item.classList.add(ClassName.ACTIVE);
});
});
});
}
$(this._scrollElement).trigger(Event.ACTIVATE, {
EventHandler.trigger(this._scrollElement, Event.ACTIVATE, {
relatedTarget: target
});
};
_proto._clear = function _clear() {
[].slice.call(document.querySelectorAll(this._selector)).filter(function (node) {
makeArray(SelectorEngine.find(this._selector)).filter(function (node) {
return node.classList.contains(ClassName.ACTIVE);
}).forEach(function (node) {
return node.classList.remove(ClassName.ACTIVE);
@ -305,13 +383,12 @@
ScrollSpy._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var data = $(this).data(DATA_KEY);
var data = Data.getData(this, DATA_KEY);
var _config = typeof config === 'object' && config;
if (!data) {
data = new ScrollSpy(this, _config);
$(this).data(DATA_KEY, data);
}
if (typeof config === 'string') {
@ -324,6 +401,10 @@
});
};
ScrollSpy._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY);
};
_createClass(ScrollSpy, null, [{
key: "VERSION",
get: function get() {
@ -345,15 +426,10 @@
*/
$(window).on(Event.LOAD_DATA_API, function () {
var scrollSpys = [].slice.call(document.querySelectorAll(Selector.DATA_SPY));
var scrollSpysLength = scrollSpys.length;
for (var i = scrollSpysLength; i--;) {
var $spy = $(scrollSpys[i]);
ScrollSpy._jQueryInterface.call($spy, $spy.data());
}
EventHandler.on(window, Event.LOAD_DATA_API, function () {
makeArray(SelectorEngine.find(Selector.DATA_SPY)).forEach(function (spy) {
return new ScrollSpy(spy, Manipulator.getDataAttributes(spy));
});
});
/**
* ------------------------------------------------------------------------
@ -361,13 +437,16 @@
* ------------------------------------------------------------------------
*/
$.fn[NAME] = ScrollSpy._jQueryInterface;
$.fn[NAME].Constructor = ScrollSpy;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT = jQuery.fn[NAME];
jQuery.fn[NAME] = ScrollSpy._jQueryInterface;
jQuery.fn[NAME].Constructor = ScrollSpy;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return ScrollSpy._jQueryInterface;
};
jQuery.fn[NAME].noConflict = function () {
jQuery.fn[NAME] = JQUERY_NO_CONFLICT;
return ScrollSpy._jQueryInterface;
};
}
return ScrollSpy;

File diff suppressed because one or more lines are too long

205
js/dist/tab.js vendored
View File

@ -4,13 +4,14 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
(global = global || self, global.Tab = factory(global.jQuery, global.Util));
}(this, function ($, Util) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/eventHandler.js'), require('./dom/selectorEngine.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/eventHandler.js', './dom/selectorEngine.js'], factory) :
(global = global || self, global.Tab = factory(global.Data, global.EventHandler, global.SelectorEngine));
}(this, function (Data, EventHandler, SelectorEngine) { 'use strict';
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data;
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler;
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine;
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@ -28,6 +29,88 @@
return Constructor;
}
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
var MILLISECONDS_MULTIPLIER = 1000;
var TRANSITION_END = 'transitionend';
var jQuery = window.jQuery; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
var getSelectorFromElement = function getSelectorFromElement(element) {
var selector = element.getAttribute('data-target');
if (!selector || selector === '#') {
var hrefAttr = element.getAttribute('href');
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
}
try {
return document.querySelector(selector) ? selector : null;
} catch (err) {
return null;
}
};
var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
if (!element) {
return 0;
} // Get transition-duration of the element
var _window$getComputedSt = window.getComputedStyle(element),
transitionDuration = _window$getComputedSt.transitionDuration,
transitionDelay = _window$getComputedSt.transitionDelay;
var floatTransitionDuration = parseFloat(transitionDuration);
var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
if (!floatTransitionDuration && !floatTransitionDelay) {
return 0;
} // If multiple durations are defined, take the first
transitionDuration = transitionDuration.split(',')[0];
transitionDelay = transitionDelay.split(',')[0];
return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
};
var triggerTransitionEnd = function triggerTransitionEnd(element) {
element.dispatchEvent(new Event(TRANSITION_END));
};
var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
var called = false;
var durationPadding = 5;
var emulatedDuration = duration + durationPadding;
function listener() {
called = true;
element.removeEventListener(TRANSITION_END, listener);
}
element.addEventListener(TRANSITION_END, listener);
setTimeout(function () {
if (!called) {
triggerTransitionEnd(element);
}
}, emulatedDuration);
};
var makeArray = function makeArray(nodeList) {
if (!nodeList) {
return [];
}
return [].slice.call(nodeList);
};
var reflow = function reflow(element) {
return element.offsetHeight;
};
/**
* ------------------------------------------------------------------------
* Constants
@ -39,8 +122,7 @@
var DATA_KEY = 'bs.tab';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
var JQUERY_NO_CONFLICT = $.fn[NAME];
var Event = {
var Event$1 = {
HIDE: "hide" + EVENT_KEY,
HIDDEN: "hidden" + EVENT_KEY,
SHOW: "show" + EVENT_KEY,
@ -58,10 +140,10 @@
DROPDOWN: '.dropdown',
NAV_LIST_GROUP: '.nav, .list-group',
ACTIVE: '.active',
ACTIVE_UL: '> li > .active',
ACTIVE_UL: ':scope > li > .active',
DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',
DROPDOWN_TOGGLE: '.dropdown-toggle',
DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active'
DROPDOWN_ACTIVE_CHILD: ':scope > .dropdown-menu .active'
/**
* ------------------------------------------------------------------------
* Class Definition
@ -75,6 +157,7 @@
function () {
function Tab(element) {
this._element = element;
Data.setData(this._element, DATA_KEY, this);
} // Getters
@ -84,53 +167,50 @@
_proto.show = function show() {
var _this = this;
if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName.ACTIVE) || $(this._element).hasClass(ClassName.DISABLED)) {
if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && this._element.classList.contains(ClassName.ACTIVE) || this._element.classList.contains(ClassName.DISABLED)) {
return;
}
var target;
var previous;
var listElement = $(this._element).closest(Selector.NAV_LIST_GROUP)[0];
var selector = Util.getSelectorFromElement(this._element);
var listElement = SelectorEngine.closest(this._element, Selector.NAV_LIST_GROUP);
var selector = getSelectorFromElement(this._element);
if (listElement) {
var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? Selector.ACTIVE_UL : Selector.ACTIVE;
previous = $.makeArray($(listElement).find(itemSelector));
previous = makeArray(SelectorEngine.find(itemSelector, listElement));
previous = previous[previous.length - 1];
}
var hideEvent = $.Event(Event.HIDE, {
relatedTarget: this._element
});
var showEvent = $.Event(Event.SHOW, {
var hideEvent = null;
if (previous) {
hideEvent = EventHandler.trigger(previous, Event$1.HIDE, {
relatedTarget: this._element
});
}
var showEvent = EventHandler.trigger(this._element, Event$1.SHOW, {
relatedTarget: previous
});
if (previous) {
$(previous).trigger(hideEvent);
}
$(this._element).trigger(showEvent);
if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {
if (showEvent.defaultPrevented || hideEvent !== null && hideEvent.defaultPrevented) {
return;
}
if (selector) {
target = document.querySelector(selector);
target = SelectorEngine.findOne(selector);
}
this._activate(this._element, listElement);
var complete = function complete() {
var hiddenEvent = $.Event(Event.HIDDEN, {
EventHandler.trigger(previous, Event$1.HIDDEN, {
relatedTarget: _this._element
});
var shownEvent = $.Event(Event.SHOWN, {
EventHandler.trigger(_this._element, Event$1.SHOWN, {
relatedTarget: previous
});
$(previous).trigger(hiddenEvent);
$(_this._element).trigger(shownEvent);
};
if (target) {
@ -141,7 +221,7 @@
};
_proto.dispose = function dispose() {
$.removeData(this._element, DATA_KEY);
Data.removeData(this._element, DATA_KEY);
this._element = null;
} // Private
;
@ -149,17 +229,19 @@
_proto._activate = function _activate(element, container, callback) {
var _this2 = this;
var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? $(container).find(Selector.ACTIVE_UL) : $(container).children(Selector.ACTIVE);
var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? SelectorEngine.find(Selector.ACTIVE_UL, container) : SelectorEngine.children(container, Selector.ACTIVE);
var active = activeElements[0];
var isTransitioning = callback && active && $(active).hasClass(ClassName.FADE);
var isTransitioning = callback && active && active.classList.contains(ClassName.FADE);
var complete = function complete() {
return _this2._transitionComplete(element, active, callback);
};
if (active && isTransitioning) {
var transitionDuration = Util.getTransitionDurationFromElement(active);
$(active).removeClass(ClassName.SHOW).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
var transitionDuration = getTransitionDurationFromElement(active);
active.classList.remove(ClassName.SHOW);
EventHandler.one(active, TRANSITION_END, complete);
emulateTransitionEnd(active, transitionDuration);
} else {
complete();
}
@ -167,11 +249,11 @@
_proto._transitionComplete = function _transitionComplete(element, active, callback) {
if (active) {
$(active).removeClass(ClassName.ACTIVE);
var dropdownChild = $(active.parentNode).find(Selector.DROPDOWN_ACTIVE_CHILD)[0];
active.classList.remove(ClassName.ACTIVE);
var dropdownChild = SelectorEngine.findOne(Selector.DROPDOWN_ACTIVE_CHILD, active.parentNode);
if (dropdownChild) {
$(dropdownChild).removeClass(ClassName.ACTIVE);
dropdownChild.classList.remove(ClassName.ACTIVE);
}
if (active.getAttribute('role') === 'tab') {
@ -179,24 +261,25 @@
}
}
$(element).addClass(ClassName.ACTIVE);
element.classList.add(ClassName.ACTIVE);
if (element.getAttribute('role') === 'tab') {
element.setAttribute('aria-selected', true);
}
Util.reflow(element);
reflow(element);
if (element.classList.contains(ClassName.FADE)) {
element.classList.add(ClassName.SHOW);
}
if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {
var dropdownElement = $(element).closest(Selector.DROPDOWN)[0];
if (element.parentNode && element.parentNode.classList.contains(ClassName.DROPDOWN_MENU)) {
var dropdownElement = SelectorEngine.closest(element, Selector.DROPDOWN);
if (dropdownElement) {
var dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(Selector.DROPDOWN_TOGGLE));
$(dropdownToggleList).addClass(ClassName.ACTIVE);
makeArray(SelectorEngine.find(Selector.DROPDOWN_TOGGLE)).forEach(function (dropdown) {
return dropdown.classList.add(ClassName.ACTIVE);
});
}
element.setAttribute('aria-expanded', true);
@ -210,13 +293,7 @@
Tab._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var $this = $(this);
var data = $this.data(DATA_KEY);
if (!data) {
data = new Tab(this);
$this.data(DATA_KEY, data);
}
var data = Data.getData(this, DATA_KEY) || new Tab(this);
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
@ -228,6 +305,10 @@
});
};
Tab._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY);
};
_createClass(Tab, null, [{
key: "VERSION",
get: function get() {
@ -244,24 +325,28 @@
*/
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
EventHandler.on(document, Event$1.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
event.preventDefault();
Tab._jQueryInterface.call($(this), 'show');
var data = Data.getData(this, DATA_KEY) || new Tab(this);
data.show();
});
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
* add .tab to jQuery only if jQuery is present
*/
$.fn[NAME] = Tab._jQueryInterface;
$.fn[NAME].Constructor = Tab;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT = jQuery.fn[NAME];
jQuery.fn[NAME] = Tab._jQueryInterface;
jQuery.fn[NAME].Constructor = Tab;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Tab._jQueryInterface;
};
jQuery.fn[NAME].noConflict = function () {
jQuery.fn[NAME] = JQUERY_NO_CONFLICT;
return Tab._jQueryInterface;
};
}
return Tab;

2
js/dist/tab.js.map vendored

File diff suppressed because one or more lines are too long

145
js/dist/toast.js vendored
View File

@ -4,13 +4,14 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
(global = global || self, global.Toast = factory(global.jQuery, global.Util));
}(this, function ($, Util) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/eventHandler.js'), require('./dom/manipulator.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/eventHandler.js', './dom/manipulator.js'], factory) :
(global = global || self, global.Toast = factory(global.Data, global.EventHandler, global.Manipulator));
}(this, function (Data, EventHandler, Manipulator) { 'use strict';
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data;
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler;
Manipulator = Manipulator && Manipulator.hasOwnProperty('default') ? Manipulator['default'] : Manipulator;
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@ -62,6 +63,81 @@
return target;
}
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
var MILLISECONDS_MULTIPLIER = 1000;
var TRANSITION_END = 'transitionend';
var jQuery = window.jQuery; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
var toType = function toType(obj) {
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
};
var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
if (!element) {
return 0;
} // Get transition-duration of the element
var _window$getComputedSt = window.getComputedStyle(element),
transitionDuration = _window$getComputedSt.transitionDuration,
transitionDelay = _window$getComputedSt.transitionDelay;
var floatTransitionDuration = parseFloat(transitionDuration);
var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
if (!floatTransitionDuration && !floatTransitionDelay) {
return 0;
} // If multiple durations are defined, take the first
transitionDuration = transitionDuration.split(',')[0];
transitionDelay = transitionDelay.split(',')[0];
return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
};
var triggerTransitionEnd = function triggerTransitionEnd(element) {
element.dispatchEvent(new Event(TRANSITION_END));
};
var isElement = function isElement(obj) {
return (obj[0] || obj).nodeType;
};
var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
var called = false;
var durationPadding = 5;
var emulatedDuration = duration + durationPadding;
function listener() {
called = true;
element.removeEventListener(TRANSITION_END, listener);
}
element.addEventListener(TRANSITION_END, listener);
setTimeout(function () {
if (!called) {
triggerTransitionEnd(element);
}
}, emulatedDuration);
};
var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
Object.keys(configTypes).forEach(function (property) {
var expectedTypes = configTypes[property];
var value = config[property];
var valueType = value && isElement(value) ? 'element' : toType(value);
if (!new RegExp(expectedTypes).test(valueType)) {
throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
}
});
};
/**
* ------------------------------------------------------------------------
* Constants
@ -72,8 +148,7 @@
var VERSION = '4.3.1';
var DATA_KEY = 'bs.toast';
var EVENT_KEY = "." + DATA_KEY;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var Event = {
var Event$1 = {
CLICK_DISMISS: "click.dismiss" + EVENT_KEY,
HIDE: "hide" + EVENT_KEY,
HIDDEN: "hidden" + EVENT_KEY,
@ -115,6 +190,8 @@
this._timeout = null;
this._setListeners();
Data.setData(element, DATA_KEY, this);
} // Getters
@ -124,7 +201,7 @@
_proto.show = function show() {
var _this = this;
$(this._element).trigger(Event.SHOW);
EventHandler.trigger(this._element, Event$1.SHOW);
if (this._config.animation) {
this._element.classList.add(ClassName.FADE);
@ -135,7 +212,7 @@
_this._element.classList.add(ClassName.SHOW);
$(_this._element).trigger(Event.SHOWN);
EventHandler.trigger(_this._element, Event$1.SHOWN);
if (_this._config.autohide) {
_this.hide();
@ -147,8 +224,9 @@
this._element.classList.add(ClassName.SHOWING);
if (this._config.animation) {
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
var transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, TRANSITION_END, complete);
emulateTransitionEnd(this._element, transitionDuration);
} else {
complete();
}
@ -161,7 +239,7 @@
return;
}
$(this._element).trigger(Event.HIDE);
EventHandler.trigger(this._element, Event$1.HIDE);
if (withoutTimeout) {
this._close();
@ -180,23 +258,23 @@
this._element.classList.remove(ClassName.SHOW);
}
$(this._element).off(Event.CLICK_DISMISS);
$.removeData(this._element, DATA_KEY);
EventHandler.off(this._element, Event$1.CLICK_DISMISS);
Data.removeData(this._element, DATA_KEY);
this._element = null;
this._config = null;
} // Private
;
_proto._getConfig = function _getConfig(config) {
config = _objectSpread({}, Default, $(this._element).data(), typeof config === 'object' && config ? config : {});
Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
config = _objectSpread({}, Default, Manipulator.getDataAttributes(this._element), typeof config === 'object' && config ? config : {});
typeCheckConfig(NAME, config, this.constructor.DefaultType);
return config;
};
_proto._setListeners = function _setListeners() {
var _this3 = this;
$(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function () {
EventHandler.on(this._element, Event$1.CLICK_DISMISS, Selector.DATA_DISMISS, function () {
return _this3.hide(true);
});
};
@ -207,14 +285,15 @@
var complete = function complete() {
_this4._element.classList.add(ClassName.HIDE);
$(_this4._element).trigger(Event.HIDDEN);
EventHandler.trigger(_this4._element, Event$1.HIDDEN);
};
this._element.classList.remove(ClassName.SHOW);
if (this._config.animation) {
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
var transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, TRANSITION_END, complete);
emulateTransitionEnd(this._element, transitionDuration);
} else {
complete();
}
@ -223,14 +302,12 @@
Toast._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var $element = $(this);
var data = $element.data(DATA_KEY);
var data = Data.getData(this, DATA_KEY);
var _config = typeof config === 'object' && config;
if (!data) {
data = new Toast(this, _config);
$element.data(DATA_KEY, data);
}
if (typeof config === 'string') {
@ -243,6 +320,10 @@
});
};
Toast._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY);
};
_createClass(Toast, null, [{
key: "VERSION",
get: function get() {
@ -266,16 +347,20 @@
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
* add .toast to jQuery only if jQuery is present
*/
$.fn[NAME] = Toast._jQueryInterface;
$.fn[NAME].Constructor = Toast;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT = jQuery.fn[NAME];
jQuery.fn[NAME] = Toast._jQueryInterface;
jQuery.fn[NAME].Constructor = Toast;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Toast._jQueryInterface;
};
jQuery.fn[NAME].noConflict = function () {
jQuery.fn[NAME] = JQUERY_NO_CONFLICT;
return Toast._jQueryInterface;
};
}
return Toast;

File diff suppressed because one or more lines are too long

430
js/dist/tooltip.js vendored
View File

@ -4,14 +4,16 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('popper.js'), require('./util.js')) :
typeof define === 'function' && define.amd ? define(['jquery', 'popper.js', './util.js'], factory) :
(global = global || self, global.Tooltip = factory(global.jQuery, global.Popper, global.Util));
}(this, function ($, Popper, Util) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/eventHandler.js'), require('./dom/manipulator.js'), require('popper.js'), require('./dom/selectorEngine.js')) :
typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/eventHandler.js', './dom/manipulator.js', 'popper.js', './dom/selectorEngine.js'], factory) :
(global = global || self, global.Tooltip = factory(global.Data, global.EventHandler, global.Manipulator, global.Popper, global.SelectorEngine));
}(this, function (Data, EventHandler, Manipulator, Popper, SelectorEngine) { 'use strict';
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data;
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler;
Manipulator = Manipulator && Manipulator.hasOwnProperty('default') ? Manipulator['default'] : Manipulator;
Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper;
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine;
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
@ -65,12 +67,178 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): tools/sanitizer.js
* Bootstrap (v4.3.1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
var MAX_UID = 1000000;
var MILLISECONDS_MULTIPLIER = 1000;
var TRANSITION_END = 'transitionend';
var jQuery = window.jQuery; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
var toType = function toType(obj) {
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
};
/**
* --------------------------------------------------------------------------
* Public Util Api
* --------------------------------------------------------------------------
*/
var getUID = function getUID(prefix) {
do {
// eslint-disable-next-line no-bitwise
prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
} while (document.getElementById(prefix));
return prefix;
};
var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
if (!element) {
return 0;
} // Get transition-duration of the element
var _window$getComputedSt = window.getComputedStyle(element),
transitionDuration = _window$getComputedSt.transitionDuration,
transitionDelay = _window$getComputedSt.transitionDelay;
var floatTransitionDuration = parseFloat(transitionDuration);
var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
if (!floatTransitionDuration && !floatTransitionDelay) {
return 0;
} // If multiple durations are defined, take the first
transitionDuration = transitionDuration.split(',')[0];
transitionDelay = transitionDelay.split(',')[0];
return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
};
var triggerTransitionEnd = function triggerTransitionEnd(element) {
element.dispatchEvent(new Event(TRANSITION_END));
};
var isElement = function isElement(obj) {
return (obj[0] || obj).nodeType;
};
var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
var called = false;
var durationPadding = 5;
var emulatedDuration = duration + durationPadding;
function listener() {
called = true;
element.removeEventListener(TRANSITION_END, listener);
}
element.addEventListener(TRANSITION_END, listener);
setTimeout(function () {
if (!called) {
triggerTransitionEnd(element);
}
}, emulatedDuration);
};
var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
Object.keys(configTypes).forEach(function (property) {
var expectedTypes = configTypes[property];
var value = config[property];
var valueType = value && isElement(value) ? 'element' : toType(value);
if (!new RegExp(expectedTypes).test(valueType)) {
throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
}
});
};
var makeArray = function makeArray(nodeList) {
if (!nodeList) {
return [];
}
return [].slice.call(nodeList);
};
var findShadowRoot = function findShadowRoot(element) {
if (!document.documentElement.attachShadow) {
return null;
} // Can find the shadow root otherwise it'll return the document
if (typeof element.getRootNode === 'function') {
var root = element.getRootNode();
return root instanceof ShadowRoot ? root : null;
}
if (element instanceof ShadowRoot) {
return element;
} // when we don't find a shadow root
if (!element.parentNode) {
return null;
}
return findShadowRoot(element.parentNode);
}; // eslint-disable-next-line no-empty-function
var noop = function noop() {
return function () {};
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): util/sanitizer.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href'];
var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
/**
* A pattern that recognizes a commonly useful subset of URLs that are safe.
*
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
*/
var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;
/**
* A pattern that matches safe data URLs. Only matches image, video and audio types.
*
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
*/
var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;
var allowedAttribute = function allowedAttribute(attr, allowedAttributeList) {
var attrName = attr.nodeName.toLowerCase();
if (allowedAttributeList.indexOf(attrName) !== -1) {
if (uriAttrs.indexOf(attrName) !== -1) {
return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN));
}
return true;
}
var regExp = allowedAttributeList.filter(function (attrRegex) {
return attrRegex instanceof RegExp;
}); // Check if a regular expression validates the attribute.
for (var i = 0, l = regExp.length; i < l; i++) {
if (attrName.match(regExp[i])) {
return true;
}
}
return false;
};
var DefaultWhitelist = {
// Global attributes allowed on any supplied element below.
'*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
@ -103,48 +271,9 @@
strong: [],
u: [],
ul: []
/**
* A pattern that recognizes a commonly useful subset of URLs that are safe.
*
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
*/
};
var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;
/**
* A pattern that matches safe data URLs. Only matches image, video and audio types.
*
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
*/
var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;
function allowedAttribute(attr, allowedAttributeList) {
var attrName = attr.nodeName.toLowerCase();
if (allowedAttributeList.indexOf(attrName) !== -1) {
if (uriAttrs.indexOf(attrName) !== -1) {
return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN));
}
return true;
}
var regExp = allowedAttributeList.filter(function (attrRegex) {
return attrRegex instanceof RegExp;
}); // Check if a regular expression validates the attribute.
for (var i = 0, l = regExp.length; i < l; i++) {
if (attrName.match(regExp[i])) {
return true;
}
}
return false;
}
function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
if (unsafeHtml.length === 0) {
if (!unsafeHtml.length) {
return unsafeHtml;
}
@ -155,18 +284,18 @@
var domParser = new window.DOMParser();
var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
var whitelistKeys = Object.keys(whiteList);
var elements = [].slice.call(createdDocument.body.querySelectorAll('*'));
var elements = makeArray(createdDocument.body.querySelectorAll('*'));
var _loop = function _loop(i, len) {
var el = elements[i];
var elName = el.nodeName.toLowerCase();
if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {
if (whitelistKeys.indexOf(elName) === -1) {
el.parentNode.removeChild(el);
return "continue";
}
var attributeList = [].slice.call(el.attributes);
var attributeList = makeArray(el.attributes);
var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
attributeList.forEach(function (attr) {
if (!allowedAttribute(attr, whitelistedAttributes)) {
@ -194,7 +323,6 @@
var VERSION = '4.3.1';
var DATA_KEY = 'bs.tooltip';
var EVENT_KEY = "." + DATA_KEY;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var CLASS_PREFIX = 'bs-tooltip';
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];
@ -224,7 +352,7 @@
};
var Default = {
animation: true,
template: '<div class="tooltip" role="tooltip">' + '<div class="arrow"></div>' + '<div class="tooltip-inner"></div></div>',
template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div></div>',
trigger: 'hover focus',
title: '',
delay: 0,
@ -243,7 +371,7 @@
SHOW: 'show',
OUT: 'out'
};
var Event = {
var Event$1 = {
HIDE: "hide" + EVENT_KEY,
HIDDEN: "hidden" + EVENT_KEY,
SHOW: "show" + EVENT_KEY,
@ -262,7 +390,7 @@
var Selector = {
TOOLTIP: '.tooltip',
TOOLTIP_INNER: '.tooltip-inner',
ARROW: '.arrow'
TOOLTIP_ARROW: '.tooltip-arrow'
};
var Trigger = {
HOVER: 'hover',
@ -286,7 +414,7 @@
* Popper - https://popper.js.org
*/
if (typeof Popper === 'undefined') {
throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org/)');
throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org)');
} // private
@ -301,6 +429,8 @@
this.tip = null;
this._setListeners();
Data.setData(element, this.constructor.DATA_KEY, this);
} // Getters
@ -326,11 +456,11 @@
if (event) {
var dataKey = this.constructor.DATA_KEY;
var context = $(event.currentTarget).data(dataKey);
var context = Data.getData(event.delegateTarget, dataKey);
if (!context) {
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
$(event.currentTarget).data(dataKey, context);
context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
Data.setData(event.delegateTarget, dataKey, context);
}
context._activeTrigger.click = !context._activeTrigger.click;
@ -341,7 +471,7 @@
context._leave(null, context);
}
} else {
if ($(this.getTipElement()).hasClass(ClassName.SHOW)) {
if (this.getTipElement().classList.contains(ClassName.SHOW)) {
this._leave(null, this);
return;
@ -353,12 +483,12 @@
_proto.dispose = function dispose() {
clearTimeout(this._timeout);
$.removeData(this.element, this.constructor.DATA_KEY);
$(this.element).off(this.constructor.EVENT_KEY);
$(this.element).closest('.modal').off('hide.bs.modal');
Data.removeData(this.element, this.constructor.DATA_KEY);
EventHandler.off(this.element, this.constructor.EVENT_KEY);
EventHandler.off(SelectorEngine.closest(this.element, '.modal'), 'hide.bs.modal');
if (this.tip) {
$(this.tip).remove();
this.tip.parentNode.removeChild(this.tip);
}
this._isEnabled = null;
@ -379,29 +509,27 @@
_proto.show = function show() {
var _this = this;
if ($(this.element).css('display') === 'none') {
if (this.element.style.display === 'none') {
throw new Error('Please use show on visible elements');
}
var showEvent = $.Event(this.constructor.Event.SHOW);
if (this.isWithContent() && this._isEnabled) {
$(this.element).trigger(showEvent);
var shadowRoot = Util.findShadowRoot(this.element);
var isInTheDom = $.contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element);
var showEvent = EventHandler.trigger(this.element, this.constructor.Event.SHOW);
var shadowRoot = findShadowRoot(this.element);
var isInTheDom = shadowRoot !== null ? shadowRoot.contains(this.element) : this.element.ownerDocument.documentElement.contains(this.element);
if (showEvent.isDefaultPrevented() || !isInTheDom) {
if (showEvent.defaultPrevented || !isInTheDom) {
return;
}
var tip = this.getTipElement();
var tipId = Util.getUID(this.constructor.NAME);
var tipId = getUID(this.constructor.NAME);
tip.setAttribute('id', tipId);
this.element.setAttribute('aria-describedby', tipId);
this.setContent();
if (this.config.animation) {
$(tip).addClass(ClassName.FADE);
tip.classList.add(ClassName.FADE);
}
var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
@ -412,13 +540,13 @@
var container = this._getContainer();
$(tip).data(this.constructor.DATA_KEY, this);
Data.setData(tip, this.constructor.DATA_KEY, this);
if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {
$(tip).appendTo(container);
if (!this.element.ownerDocument.documentElement.contains(this.tip)) {
container.appendChild(tip);
}
$(this.element).trigger(this.constructor.Event.INSERTED);
EventHandler.trigger(this.element, this.constructor.Event.INSERTED);
this._popper = new Popper(this.element, tip, {
placement: attachment,
modifiers: {
@ -427,7 +555,7 @@
behavior: this.config.fallbackPlacement
},
arrow: {
element: Selector.ARROW
element: Selector.TOOLTIP_ARROW
},
preventOverflow: {
boundariesElement: this.config.boundary
@ -442,13 +570,15 @@
return _this._handlePopperPlacementChange(data);
}
});
$(tip).addClass(ClassName.SHOW); // If this is a touch-enabled device we add extra
tip.classList.add(ClassName.SHOW); // If this is a touch-enabled device we add extra
// empty mouseover listeners to the body's immediate children;
// only needed because of broken event delegation on iOS
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
if ('ontouchstart' in document.documentElement) {
$(document.body).children().on('mouseover', null, $.noop);
makeArray(document.body.children).forEach(function (element) {
EventHandler.on(element, 'mouseover', noop());
});
}
var complete = function complete() {
@ -458,16 +588,17 @@
var prevHoverState = _this._hoverState;
_this._hoverState = null;
$(_this.element).trigger(_this.constructor.Event.SHOWN);
EventHandler.trigger(_this.element, _this.constructor.Event.SHOWN);
if (prevHoverState === HoverState.OUT) {
_this._leave(null, _this);
}
};
if ($(this.tip).hasClass(ClassName.FADE)) {
var transitionDuration = Util.getTransitionDurationFromElement(this.tip);
$(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
if (this.tip.classList.contains(ClassName.FADE)) {
var transitionDuration = getTransitionDurationFromElement(this.tip);
EventHandler.one(this.tip, TRANSITION_END, complete);
emulateTransitionEnd(this.tip, transitionDuration);
} else {
complete();
}
@ -478,7 +609,6 @@
var _this2 = this;
var tip = this.getTipElement();
var hideEvent = $.Event(this.constructor.Event.HIDE);
var complete = function complete() {
if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) {
@ -489,7 +619,7 @@
_this2.element.removeAttribute('aria-describedby');
$(_this2.element).trigger(_this2.constructor.Event.HIDDEN);
EventHandler.trigger(_this2.element, _this2.constructor.Event.HIDDEN);
if (_this2._popper !== null) {
_this2._popper.destroy();
@ -500,26 +630,29 @@
}
};
$(this.element).trigger(hideEvent);
var hideEvent = EventHandler.trigger(this.element, this.constructor.Event.HIDE);
if (hideEvent.isDefaultPrevented()) {
if (hideEvent.defaultPrevented) {
return;
}
$(tip).removeClass(ClassName.SHOW); // If this is a touch-enabled device we remove the extra
tip.classList.remove(ClassName.SHOW); // If this is a touch-enabled device we remove the extra
// empty mouseover listeners we added for iOS support
if ('ontouchstart' in document.documentElement) {
$(document.body).children().off('mouseover', null, $.noop);
makeArray(document.body.children).forEach(function (element) {
return EventHandler.off(element, 'mouseover', noop);
});
}
this._activeTrigger[Trigger.CLICK] = false;
this._activeTrigger[Trigger.FOCUS] = false;
this._activeTrigger[Trigger.HOVER] = false;
if ($(this.tip).hasClass(ClassName.FADE)) {
var transitionDuration = Util.getTransitionDurationFromElement(tip);
$(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
if (this.tip.classList.contains(ClassName.FADE)) {
var transitionDuration = getTransitionDurationFromElement(tip);
EventHandler.one(tip, TRANSITION_END, complete);
emulateTransitionEnd(tip, transitionDuration);
} else {
complete();
}
@ -539,29 +672,45 @@
};
_proto.addAttachmentClass = function addAttachmentClass(attachment) {
$(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
this.getTipElement().classList.add(CLASS_PREFIX + "-" + attachment);
};
_proto.getTipElement = function getTipElement() {
this.tip = this.tip || $(this.config.template)[0];
if (this.tip) {
return this.tip;
}
var element = document.createElement('div');
element.innerHTML = this.config.template;
this.tip = element.children[0];
return this.tip;
};
_proto.setContent = function setContent() {
var tip = this.getTipElement();
this.setElementContent($(tip.querySelectorAll(Selector.TOOLTIP_INNER)), this.getTitle());
$(tip).removeClass(ClassName.FADE + " " + ClassName.SHOW);
this.setElementContent(SelectorEngine.findOne(Selector.TOOLTIP_INNER, tip), this.getTitle());
tip.classList.remove(ClassName.FADE);
tip.classList.remove(ClassName.SHOW);
};
_proto.setElementContent = function setElementContent($element, content) {
_proto.setElementContent = function setElementContent(element, content) {
if (element === null) {
return;
}
if (typeof content === 'object' && (content.nodeType || content.jquery)) {
// Content is a DOM node or a jQuery
if (content.jquery) {
content = content[0];
} // content is a DOM node or a jQuery
if (this.config.html) {
if (!$(content).parent().is($element)) {
$element.empty().append(content);
if (content.parentNode !== element) {
element.innerHTML = '';
element.appendChild(content);
}
} else {
$element.text($(content).text());
element.innerText = content.textContent;
}
return;
@ -572,9 +721,9 @@
content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn);
}
$element.html(content);
element.innerHTML = content;
} else {
$element.text(content);
element.innerText = content;
}
};
@ -611,11 +760,11 @@
return document.body;
}
if (Util.isElement(this.config.container)) {
return $(this.config.container);
if (isElement(this.config.container)) {
return this.config.container;
}
return $(document).find(this.config.container);
return SelectorEngine.findOne(this.config.container);
};
_proto._getAttachment = function _getAttachment(placement) {
@ -628,20 +777,21 @@
var triggers = this.config.trigger.split(' ');
triggers.forEach(function (trigger) {
if (trigger === 'click') {
$(_this4.element).on(_this4.constructor.Event.CLICK, _this4.config.selector, function (event) {
EventHandler.on(_this4.element, _this4.constructor.Event.CLICK, _this4.config.selector, function (event) {
return _this4.toggle(event);
});
} else if (trigger !== Trigger.MANUAL) {
var eventIn = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSEENTER : _this4.constructor.Event.FOCUSIN;
var eventOut = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSELEAVE : _this4.constructor.Event.FOCUSOUT;
$(_this4.element).on(eventIn, _this4.config.selector, function (event) {
EventHandler.on(_this4.element, eventIn, _this4.config.selector, function (event) {
return _this4._enter(event);
}).on(eventOut, _this4.config.selector, function (event) {
});
EventHandler.on(_this4.element, eventOut, _this4.config.selector, function (event) {
return _this4._leave(event);
});
}
});
$(this.element).closest('.modal').on('hide.bs.modal', function () {
EventHandler.on(SelectorEngine.closest(this.element, '.modal'), 'hide.bs.modal', function () {
if (_this4.element) {
_this4.hide();
}
@ -668,18 +818,18 @@
_proto._enter = function _enter(event, context) {
var dataKey = this.constructor.DATA_KEY;
context = context || $(event.currentTarget).data(dataKey);
context = context || Data.getData(event.delegateTarget, dataKey);
if (!context) {
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
$(event.currentTarget).data(dataKey, context);
context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
Data.setData(event.delegateTarget, dataKey, context);
}
if (event) {
context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
}
if ($(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) {
if (context.getTipElement().classList.contains(ClassName.SHOW) || context._hoverState === HoverState.SHOW) {
context._hoverState = HoverState.SHOW;
return;
}
@ -701,11 +851,11 @@
_proto._leave = function _leave(event, context) {
var dataKey = this.constructor.DATA_KEY;
context = context || $(event.currentTarget).data(dataKey);
context = context || Data.getData(event.delegateTarget, dataKey);
if (!context) {
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
$(event.currentTarget).data(dataKey, context);
context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
Data.setData(event.delegateTarget, dataKey, context);
}
if (event) {
@ -742,12 +892,17 @@
};
_proto._getConfig = function _getConfig(config) {
var dataAttributes = $(this.element).data();
var dataAttributes = Manipulator.getDataAttributes(this.element);
Object.keys(dataAttributes).forEach(function (dataAttr) {
if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {
delete dataAttributes[dataAttr];
}
});
if (config && typeof config.container === 'object' && config.container.jquery) {
config.container = config.container[0];
}
config = _objectSpread({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
if (typeof config.delay === 'number') {
@ -765,7 +920,7 @@
config.content = config.content.toString();
}
Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
typeCheckConfig(NAME, config, this.constructor.DefaultType);
if (config.sanitize) {
config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn);
@ -789,11 +944,15 @@
};
_proto._cleanTipClass = function _cleanTipClass() {
var $tip = $(this.getTipElement());
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
var tip = this.getTipElement();
var tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);
if (tabClass !== null && tabClass.length) {
$tip.removeClass(tabClass.join(''));
tabClass.map(function (token) {
return token.trim();
}).forEach(function (tClass) {
return tip.classList.remove(tClass);
});
}
};
@ -814,7 +973,7 @@
return;
}
$(tip).removeClass(ClassName.FADE);
tip.classList.remove(ClassName.FADE);
this.config.animation = false;
this.hide();
this.show();
@ -824,7 +983,7 @@
Tooltip._jQueryInterface = function _jQueryInterface(config) {
return this.each(function () {
var data = $(this).data(DATA_KEY);
var data = Data.getData(this, DATA_KEY);
var _config = typeof config === 'object' && config;
@ -834,7 +993,6 @@
if (!data) {
data = new Tooltip(this, _config);
$(this).data(DATA_KEY, data);
}
if (typeof config === 'string') {
@ -847,6 +1005,10 @@
});
};
Tooltip._getInstance = function _getInstance(element) {
return Data.getData(element, DATA_KEY);
};
_createClass(Tooltip, null, [{
key: "VERSION",
get: function get() {
@ -870,7 +1032,7 @@
}, {
key: "Event",
get: function get() {
return Event;
return Event$1;
}
}, {
key: "EVENT_KEY",
@ -890,16 +1052,20 @@
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
* add .tooltip to jQuery only if jQuery is present
*/
$.fn[NAME] = Tooltip._jQueryInterface;
$.fn[NAME].Constructor = Tooltip;
if (typeof jQuery !== 'undefined') {
var JQUERY_NO_CONFLICT = jQuery.fn[NAME];
jQuery.fn[NAME] = Tooltip._jQueryInterface;
jQuery.fn[NAME].Constructor = Tooltip;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Tooltip._jQueryInterface;
};
jQuery.fn[NAME].noConflict = function () {
jQuery.fn[NAME] = JQUERY_NO_CONFLICT;
return Tooltip._jQueryInterface;
};
}
return Tooltip;

File diff suppressed because one or more lines are too long

172
js/dist/util.js vendored
View File

@ -1,172 +0,0 @@
/*!
* Bootstrap util.js v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) :
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
(global = global || self, global.Util = factory(global.jQuery));
}(this, function ($) { 'use strict';
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): util.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
/**
* ------------------------------------------------------------------------
* Private TransitionEnd Helpers
* ------------------------------------------------------------------------
*/
var TRANSITION_END = 'transitionend';
var MAX_UID = 1000000;
var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
function toType(obj) {
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
}
function getSpecialTransitionEndEvent() {
return {
bindType: TRANSITION_END,
delegateType: TRANSITION_END,
handle: function handle(event) {
if ($(event.target).is(this)) {
return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
}
return undefined; // eslint-disable-line no-undefined
}
};
}
function transitionEndEmulator(duration) {
var _this = this;
var called = false;
$(this).one(Util.TRANSITION_END, function () {
called = true;
});
setTimeout(function () {
if (!called) {
Util.triggerTransitionEnd(_this);
}
}, duration);
return this;
}
function setTransitionEndSupport() {
$.fn.emulateTransitionEnd = transitionEndEmulator;
$.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
}
/**
* --------------------------------------------------------------------------
* Public Util Api
* --------------------------------------------------------------------------
*/
var Util = {
TRANSITION_END: 'bsTransitionEnd',
getUID: function getUID(prefix) {
do {
// eslint-disable-next-line no-bitwise
prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
} while (document.getElementById(prefix));
return prefix;
},
getSelectorFromElement: function getSelectorFromElement(element) {
var selector = element.getAttribute('data-target');
if (!selector || selector === '#') {
var hrefAttr = element.getAttribute('href');
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
}
try {
return document.querySelector(selector) ? selector : null;
} catch (err) {
return null;
}
},
getTransitionDurationFromElement: function getTransitionDurationFromElement(element) {
if (!element) {
return 0;
} // Get transition-duration of the element
var transitionDuration = $(element).css('transition-duration');
var transitionDelay = $(element).css('transition-delay');
var floatTransitionDuration = parseFloat(transitionDuration);
var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
if (!floatTransitionDuration && !floatTransitionDelay) {
return 0;
} // If multiple durations are defined, take the first
transitionDuration = transitionDuration.split(',')[0];
transitionDelay = transitionDelay.split(',')[0];
return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
},
reflow: function reflow(element) {
return element.offsetHeight;
},
triggerTransitionEnd: function triggerTransitionEnd(element) {
$(element).trigger(TRANSITION_END);
},
// TODO: Remove in v5
supportsTransitionEnd: function supportsTransitionEnd() {
return Boolean(TRANSITION_END);
},
isElement: function isElement(obj) {
return (obj[0] || obj).nodeType;
},
typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
for (var property in configTypes) {
if (Object.prototype.hasOwnProperty.call(configTypes, property)) {
var expectedTypes = configTypes[property];
var value = config[property];
var valueType = value && Util.isElement(value) ? 'element' : toType(value);
if (!new RegExp(expectedTypes).test(valueType)) {
throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
}
}
}
},
findShadowRoot: function findShadowRoot(element) {
if (!document.documentElement.attachShadow) {
return null;
} // Can find the shadow root otherwise it'll return the document
if (typeof element.getRootNode === 'function') {
var root = element.getRootNode();
return root instanceof ShadowRoot ? root : null;
}
if (element instanceof ShadowRoot) {
return element;
} // when we don't find a shadow root
if (!element.parentNode) {
return null;
}
return Util.findShadowRoot(element.parentNode);
}
};
setTransitionEndSupport();
return Util;
}));
//# sourceMappingURL=util.js.map

1
js/dist/util.js.map vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -35,9 +35,7 @@ h1, h2, h3, h4, h5, h6 {
}
.nav-scroller .nav {
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: nowrap;
flex-wrap: nowrap;
padding-bottom: 1rem;
margin-top: -1px;
@ -59,7 +57,6 @@ h1, h2, h3, h4, h5, h6 {
}
.flex-auto {
-ms-flex: 0 0 auto;
flex: 0 0 auto;
}

View File

@ -31,7 +31,6 @@ body {
}
body {
display: -ms-flexbox;
display: flex;
color: #fff;
text-shadow: 0 .05rem .1rem rgba(0, 0, 0, .5);

View File

@ -4,9 +4,7 @@ body {
}
body {
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
padding-top: 40px;
padding-bottom: 40px;

View File

@ -38,9 +38,7 @@ body {
}
.nav-scroller .nav {
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: nowrap;
flex-wrap: nowrap;
padding-bottom: 1rem;
margin-top: -1px;

View File

@ -61,12 +61,10 @@
*/
.flex-equal > * {
-ms-flex: 1;
flex: 1;
}
@media (min-width: 768px) {
.flex-md-equal > * {
-ms-flex: 1;
flex: 1;
}
}

View File

@ -4,9 +4,7 @@ body {
}
body {
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
padding-top: 40px;
padding-bottom: 40px;