diff --git a/templates/assets/libs/artalk/Artalk.css b/templates/assets/libs/artalk/Artalk.css new file mode 100644 index 00000000..b3511e97 --- /dev/null +++ b/templates/assets/libs/artalk/Artalk.css @@ -0,0 +1,1772 @@ +.artalk,.atk-layer-wrap,#owo-big { + --at-color-font: #2a2e2e; + --at-color-deep: #2a2e2e; + --at-color-sub: #757575; + --at-color-grey: #747474; + --at-color-meta: #697182; + --at-color-border: #eceff2; + --at-color-light: #4285f4; + --at-color-bg: #FFF; + --at-color-bg-transl: rgba(255, 255, 255, .94); + --at-color-bg-grey: #F4F4F4; + --at-color-bg-grey-transl: rgba(244, 244, 244, .75); + --at-color-bg-light: rgba(29, 161, 242, .1); + --at-color-main: #0083ff; + --at-color-red: #ff5652; + --at-color-pink: #fa5a57; + --at-color-yellow: #ff7c37; + --at-color-green: #4caf50; + --at-color-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255)); + --at-color-owo: rgba(255, 255, 255, .5) +} + +.artalk.atk-dark-mode,.atk-layer-wrap.atk-dark-mode,#owo-big.atk-dark-mode { + --at-color-font: rgba(238, 238, 238, .9); + --at-color-deep: rgba(231, 231, 231, .85); + --at-color-sub: rgba(231, 231, 231, .9); + --at-color-grey: rgba(238, 238, 238, .5); + --at-color-meta: #bfbfbfde; + --at-color-border: #2d3235; + --at-color-light: #687a86; + --at-color-bg: #1e2224; + --at-color-bg-transl: rgba(30, 34, 36, .95); + --at-color-bg-grey: #171718; + --at-color-bg-grey-transl: rgba(8, 8, 8, .95); + --at-color-bg-light: rgba(29, 161, 242, .1); + --at-color-main: #0083ff; + --at-color-red: #ff5652; + --at-color-pink: #fa5a57; + --at-color-yellow: #ff7c37; + --at-color-green: #4caf50; + --at-color-gradient: linear-gradient(180deg, rgba(30, 34, 36, 0), #1e2224); + --at-color-owo: rgba(74, 74, 74, .5) +} + +.atk-comment-wrap { + overflow: inherit; + position: relative; + border-bottom: none +} + +.atk-comment-wrap.atk-flash-once { + -webkit-animation: atkFlashOnce 1s ease-in-out 0s; + animation: atkFlashOnce 1s ease-in-out 0s +} + +@keyframes atkFlashOnce { + 0% { + background: rgba(0,131,255,.2) + } + + to { + background: transparent + } +} + +.atk-comment-wrap.atk-unread:before { + content: " "; + position: absolute; + left: 0; + top: 10%; + width: 3px; + height: 80%; + background: var(--at-color-main) +} + +.atk-comment-wrap.atk-openable { + cursor: pointer +} + +.atk-comment-wrap.atk-openable:hover { + background: var(--at-color-bg-grey) +} + +.atk-comment-wrap.atk-openable .atk-height-limit:after { + background: transparent!important +} + +.atk-comment-wrap:last-child { + border-bottom: none +} + +.atk-comment { + display: block; + padding: 12px 10px +} + +.atk-comment>.atk-avatar { + display: block; + padding: 2px 0; + float: left; + width: 48px; + height: 48px +} + +.atk-comment>.atk-avatar img { + width: 48px; + height: 48px; + border-radius: 50%; + transition: all .3s ease +} + +.atk-comment>.atk-avatar img.error:before { + width: 48px!important; + height: 48px!important; + border-radius: 3px +} + +.atk-comment>.atk-avatar img.error:after { + display: none +} + +.atk-comment>.atk-avatar img:hover { + transform: scale(1.2); + border-radius: 4px +} + +.atk-comment>.atk-main { + display: block; + margin-left: 63px +} + +.atk-comment>.atk-main>.atk-header { + line-height: 1.5; + font-size: 13px; + margin-bottom: .5em; + overflow: hidden; + position: relative; + display: flex; + flex-wrap: wrap; + align-items: center +} + +.atk-comment>.atk-main>.atk-header .atk-item { + display: flex; + align-items: center; + margin-top: 2px; + margin-bottom: 2px; + color: var(--at-color-meta) +} + +.atk-comment>.atk-main>.atk-header .atk-item:not(:last-child) { + margin-right: 6px +} + +.atk-comment>.atk-main>.atk-header .atk-item.atk-nick,.atk-comment>.atk-main>.atk-header .atk-item.atk-nick a { + font-size: 14px; + color: var(--at-color-main); + text-decoration: none; + font-weight: 700 +} + +.atk-comment>.atk-main>.atk-header .atk-item.atk-reply-at { + margin-left: 2px +} + +.atk-comment>.atk-main>.atk-header .atk-item.atk-reply-at>.atk-arrow:before { + content: ""; + vertical-align: middle; + transform: rotate(90deg); + border-bottom: 4px solid var(--at-color-grey); + border-left: 3px solid transparent; + border-right: 3px solid transparent; + display: inline-block; + margin-top: -1px +} + +.atk-comment>.atk-main>.atk-header .atk-item.atk-reply-at>.atk-nick { + color: var(--at-color-main); + cursor: pointer; + margin-left: 6px +} + +.atk-comment>.atk-main>.atk-header .atk-badge-wrap>*:last-child { + margin-right: 6px +} + +.atk-comment>.atk-main>.atk-header .atk-badge { + display: inline-block; + color: var(--at-color-meta); + background: var(--at-color-bg-grey); + padding: 0 6px; + line-height: 17px; + border-radius: 3px; + color: #fff +} + +.atk-comment>.atk-main>.atk-header .atk-badge:not(:last-child) { + margin-right: 6px +} + +.atk-comment>.atk-main>.atk-header .atk-pinned-badge { + display: inline-block; + color: var(--at-color-meta); + background: var(--at-color-bg-grey); + padding: 0 6px; + line-height: 17px; + border-radius: 3px; + color: #fff; + background: #f44336 +} + +.atk-comment>.atk-main>.atk-header .atk-pinned-badge:not(:last-child) { + margin-right: 6px +} + +.atk-comment>.atk-main>.atk-header .atk-ua { + display: inline-block; + color: var(--at-color-meta); + background: var(--at-color-bg-grey); + padding: 0 6px; + line-height: 17px; + border-radius: 3px +} + +.atk-comment>.atk-main>.atk-header .atk-ua:not(:last-child) { + margin-right: 6px +} + +@media only screen and (max-width: 768px) { + .atk-comment>.atk-main>.atk-header .atk-ua-wrap { + display:block; + margin-top: 5px + } +} + +.atk-comment>.atk-main>.atk-body { + display: block; + overflow: hidden; + position: relative +} + +.atk-comment>.atk-main>.atk-body img { + max-width: 100% +} + +.atk-comment>.atk-main>.atk-body>.atk-content { + word-break: break-all +} + +.atk-comment>.atk-main>.atk-body>.atk-content.atk-type-collapsed { + border: 3px solid var(--at-color-bg-grey); + border-bottom: 0; + padding: 5px 10px; + border-radius: 6px 6px 0 0; + margin-bottom: -5px +} + +.atk-comment>.atk-main>.atk-body>.atk-content>*:first-child { + margin-top: 0 +} + +.atk-comment>.atk-main>.atk-body>.atk-content>*:last-child { + margin-bottom: 0 +} + +.atk-comment>.atk-main>.atk-body>.atk-content .atk-height-limit-btn { + bottom: 5px +} + +.atk-comment>.atk-main>.atk-body>.atk-pending { + color: var(--at-color-meta); + margin: 3px 0; + font-size: 13px; + padding: 10px 18px; + display: block; + background: var(--at-color-bg-grey); + border-left: 4px solid #f44336 +} + +.atk-comment>.atk-main>.atk-body>.atk-reply-to { + padding: 5px 15px; + border-left: 3px solid var(--at-color-border); + margin-bottom: 10px; + position: relative; + margin-top: 10px +} + +.atk-comment>.atk-main>.atk-body>.atk-reply-to .atk-meta { + font-size: 15px +} + +.atk-comment>.atk-main>.atk-body>.atk-reply-to .atk-meta .atk-nick { + color: var(--at-color-main) +} + +.atk-comment>.atk-main>.atk-body>.atk-reply-to .atk-content { + margin-top: 5px +} + +.atk-comment>.atk-main>.atk-body>.atk-collapsed { + margin: 3px 0; + font-size: 13px; + padding: 10px 18px; + display: block; + background: var(--at-color-bg-grey); + border-radius: 6px +} + +.atk-comment>.atk-main>.atk-body>.atk-collapsed .atk-text { + color: var(--at-color-meta) +} + +.atk-comment>.atk-main>.atk-body>.atk-collapsed .atk-show-btn { + color: var(--at-color-main); + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + margin-left: 3px +} + +.atk-comment>.atk-main>.atk-body>.atk-collapsed .atk-show-btn:hover { + color: var(--at-color-main) +} + +.atk-comment>.atk-main>.atk-footer { + margin-top: 12px +} + +.atk-comment>.atk-main>.atk-footer .atk-actions { + display: flex; + flex-direction: row; + align-items: center; + flex-wrap: wrap; + margin-bottom: -15px +} + +.atk-comment>.atk-main>.atk-footer .atk-actions>span { + color: var(--at-color-meta); + font-size: 13px; + line-height: 15px; + display: inline-flex; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + margin-bottom: 15px +} + +.atk-comment>.atk-main>.atk-footer .atk-actions>span.atk-error,.atk-comment>.atk-main>.atk-footer .atk-actions>span.atk-error:hover { + color: var(--at-color-red) +} + +.atk-comment>.atk-main>.atk-footer .atk-actions>span:not(:last-child):not(.atk-hide) { + margin-right: 16px +} + +.atk-comment>.atk-main>.atk-footer .atk-actions>span:hover { + color: var(--at-color-deep) +} + +.atk-comment .atk-height-limit:after { + position: absolute; + z-index: 1; + display: block; + overflow: hidden; + width: 100%; + content: " "; + bottom: 0; + left: 0; + height: 80px; + background: var(--at-color-gradient) +} + +.atk-comment .atk-height-limit-btn { + z-index: 10; + position: absolute; + left: 50%; + bottom: 10px; + transform: translate(-50%); + cursor: pointer; + border: 1px solid var(--at-color-border); + border-radius: 6px; + background: var(--at-color-bg); + padding: 1px 20px; + font-size: 15px; + color: var(--at-color-meta); + -webkit-user-select: none; + -moz-user-select: none; + user-select: none +} + +.atk-comment .atk-height-limit-btn:hover { + background: var(--at-color-bg-grey) +} + +.atk-comment .atk-height-limit .atk-height-limit .atk-height-limit-btn { + display: none +} + +.atk-comment-children>.atk-comment-wrap { + margin-top: 10px; + border-left: 1px dashed transparent; + border-bottom-color: transparent +} + +.atk-comment-children>.atk-comment-wrap:not(:last-child) { + margin-bottom: 5px +} + +.atk-comment-children>.atk-comment-wrap>.atk-comment { + padding: 4px 0 +} + +.atk-comment-children>.atk-comment-wrap>.atk-comment>.atk-avatar img { + width: 36px; + height: 36px +} + +.atk-comment-children>.atk-comment-wrap>.atk-comment>.atk-main { + margin-left: 47px +} + +.artalk>.atk-list { + display: contents; + position: relative +} + +.artalk>.atk-list>.atk-list-header { + display: flex; + flex-direction: row; + padding: 10px 17px +} + +.artalk>.atk-list>.atk-list-header .atk-text { + display: inline-block +} + +.artalk>.atk-list>.atk-list-header .atk-dropdown-wrap { + position: relative; + cursor: pointer +} + +.artalk>.atk-list>.atk-list-header .atk-dropdown-wrap .atk-arrow-down-icon { + cursor: pointer; + vertical-align: middle; + border-top: 5px solid var(--at-color-grey); + border-left: 3px solid transparent; + border-right: 3px solid transparent; + margin-top: -1px; + margin-left: .8rem; + display: inline-block +} + +.artalk>.atk-list>.atk-list-header .atk-dropdown-wrap:hover .atk-dropdown { + display: block +} + +.artalk>.atk-list>.atk-list-header .atk-dropdown-wrap .atk-dropdown { + z-index: 888; + display: none; + height: auto!important; + max-height: calc(100vh - 2.7rem); + overflow-y: auto; + position: absolute; + top: 100%; + right: 0; + width: 100%; + background-color: var(--at-color-bg); + padding: .6rem 0; + border: 1px solid var(--at-color-border); + text-align: center; + border-radius: 6px; + white-space: nowrap; + margin: 0; + list-style: none +} + +.artalk>.atk-list>.atk-list-header .atk-dropdown-wrap .atk-dropdown-item span,.artalk>.atk-list>.atk-list-header .atk-dropdown-wrap .atk-dropdown-item a { + display: block; + line-height: 2rem; + position: relative; + border-bottom: none; + font-weight: 400; + padding: 0 1.5rem +} + +.artalk>.atk-list>.atk-list-header .atk-dropdown-wrap .atk-dropdown-item span:hover,.artalk>.atk-list>.atk-list-header .atk-dropdown-wrap .atk-dropdown-item a:hover { + color: var(--at-color-main) +} + +.artalk>.atk-list>.atk-list-header .atk-dropdown-wrap .atk-dropdown-item.active span,.artalk>.atk-list>.atk-list-header .atk-dropdown-wrap .atk-dropdown-item a { + color: var(--at-color-main) +} + +.artalk>.atk-list>.atk-list-header .atk-comment-count { + font-size: 15px +} + +.artalk>.atk-list>.atk-list-header .atk-comment-count .atk-comment-count-num { + font-size: 22px; + margin-right: 4px +} + +.artalk>.atk-list>.atk-list-header .atk-right-action { + display: flex; + flex: 1; + flex-direction: row; + align-items: center; + justify-content: flex-end +} + +.artalk>.atk-list>.atk-list-header .atk-right-action>span { + font-size: 14px; + color: var(--at-color-meta); + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + position: relative +} + +.artalk>.atk-list>.atk-list-header .atk-right-action>span.atk-on,.artalk>.atk-list>.atk-list-header .atk-right-action>span.atk-on * { + color: var(--at-color-main) +} + +.artalk>.atk-list>.atk-list-header .atk-right-action>span:not(:last-child):not(.atk-hide) { + margin-right: 10px; + padding-right: 10px +} + +.artalk>.atk-list>.atk-list-header .atk-right-action>span .atk-unread-badge { + position: absolute; + top: -5px; + left: -6px; + color: #fff; + background: var(--at-color-pink); + text-align: center; + min-width: 16px; + height: 16px; + padding: 0 3px; + border-radius: 8px; + line-height: 16px; + font-size: 12px +} + +.artalk>.atk-list>.atk-list-footer { + z-index: 1; + position: absolute; + bottom: 5px; + right: 0 +} + +@media only screen and (max-width: 768px) { + .artalk>.atk-list>.atk-list-footer { + position:relative; + margin-top: 10px; + text-align: center + } +} + +.artalk>.atk-list>.atk-list-footer .atk-copyright { + display: block; + font-size: 12px; + color: var(--at-color-meta); + padding-right: 15px; + margin-top: 5px +} + +.artalk>.atk-list>.atk-list-footer .atk-copyright a { + color: var(--at-color-main); + text-decoration: none +} + +.atk-list-no-comment { + text-align: center; + height: 150px; + line-height: 150px; + display: block; + font-size: 19px +} + +.atk-list-read-more { + border-top: 1px dashed var(--at-color-border); + margin-top: 28px; + padding-bottom: 25px +} + +@media only screen and (max-width: 768px) { + .atk-list-read-more { + padding-bottom:10px + } +} + +.atk-list-read-more.atk-err .atk-text { + color: var(--at-color-red)!important +} + +.atk-list-read-more .atk-list-read-more-inner { + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + padding: 0 15px; + font-size: 14px; + border-radius: 6px; + border: 1px solid transparent; + display: flex; + height: 30px; + flex-direction: row; + place-content: center; + align-items: center; + width: 120px; + margin: -15px auto 0; + background: var(--at-color-bg); + border-color: var(--at-color-border) +} + +.atk-list-read-more .atk-list-read-more-inner>.atk-loading-icon { + height: 15px; + width: 15px +} + +.atk-list-read-more .atk-list-read-more-inner>.atk-text { + color: var(--at-color-meta) +} + +.atk-list-read-more .atk-list-read-more-inner:hover { + background: var(--at-color-bg-grey) +} + +.atk-pagination { + display: flex; + flex-direction: row; + justify-content: center; + padding: 10px 0; + position: relative +} + +.atk-pagination>.atk-btn,.atk-pagination>.atk-input { + font-size: 15px; + height: 30px; + border: 1px solid var(--at-color-border); + border-radius: 3px; + padding: 0 5px; + text-align: center; + background: var(--at-color-bg) +} + +.atk-pagination>.atk-btn { + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + width: 70px; + cursor: pointer; + display: flex; + justify-content: center; + align-items: center +} + +.atk-pagination>.atk-btn:hover { + background: var(--at-color-bg-grey) +} + +.atk-pagination>.atk-btn.atk-disabled { + color: var(--at-color-sub) +} + +.atk-pagination>.atk-btn.atk-disabled:hover { + cursor: default; + background: initial +} + +.atk-pagination>.atk-input { + background: transparent; + color: var(--at-color-font); + font-size: 18px; + width: 60px; + outline: none +} + +.atk-pagination>.atk-input:focus { + border-color: var(--at-color-main) +} + +.atk-pagination>*:not(:last-child) { + margin-right: 10px +} + +.atk-main-editor { + z-index: 5; + position: relative; + background: var(--at-color-bg); + border: 1px solid var(--at-color-border); + border-radius: 6px; + margin-bottom: 10px +} + +@media only screen and (max-width: 768px) { + .atk-main-editor { + margin-bottom:7px + } +} + +.atk-main-editor>.atk-header { + display: flex; + flex-direction: row; + padding: 10px 14px 0 +} + +.atk-main-editor>.atk-header .label { + display: contents +} + +.atk-main-editor>.atk-header input { + flex: 1; + width: 100%; + font-size: 14px; + background: transparent; + border: 2px solid transparent; + border-radius: 3px; + padding: 6px 5px; + resize: none; + outline: none +} + +.atk-main-editor>.atk-header input:not(:last-child) { + margin-right: 2px +} + +.atk-main-editor>.atk-textarea-wrap { + position: relative +} + +.atk-main-editor>.atk-textarea-wrap>.atk-textarea { + display: block; + overflow: hidden; + color: var(--at-color-font); + font-size: 15px; + background-color: var(--at-color-bg); + border: 2px solid transparent; + border-radius: 3px; + width: 100%; + min-height: 120px; + margin-top: 2px; + padding: 10px 20px; + resize: none; + word-wrap: break-word; + outline: none +} + +.atk-main-editor>.atk-textarea-wrap>.atk-comment-closed { + pointer-events: none; + color: var(--at-color-meta); + font-size: 12px; + background-color: var(--at-color-bg); + border-top: 1px solid var(--at-color-border); + padding: 5px 15px; + margin-top: 10px +} + +.atk-main-editor>.atk-textarea-wrap>.atk-send-reply { + z-index: 2; + position: absolute; + right: 7px; + bottom: 2px; + max-width: calc(100% - 20px); + height: 30px; + line-height: 30px; + font-size: 14px; + background: var(--at-color-bg-grey-transl); + padding: 0 30px 0 10px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + cursor: pointer; + border-radius: 3px +} + +@media screen and (max-width: 500px) { + .atk-main-editor>.atk-textarea-wrap>.atk-send-reply { + position:absolute; + right: 6px; + bottom: 6px + } +} + +.atk-main-editor>.atk-textarea-wrap>.atk-send-reply .atk-cancel { + position: absolute; + right: 0; + bottom: 0; + height: 30px; + text-align: center; + width: 30px; + line-height: 30px; + font-weight: 700 +} + +.atk-main-editor>.atk-textarea-wrap>.atk-send-reply .atk-cancel:hover { + color: var(--at-color-deep) +} + +.atk-main-editor>.atk-plug-panel-wrap { + overflow: hidden; + -webkit-animation: .3s both atkFadeIn; + animation: .3s both atkFadeIn; + transition: .2s height ease-in-out; + display: contents +} + +.atk-main-editor>.atk-bottom { + display: flex; + flex-direction: row; + justify-content: space-between; + padding: 5px +} + +.atk-main-editor>.atk-bottom>.atk-item { + display: flex; + flex-direction: row; + align-items: center +} + +.atk-main-editor>.atk-bottom .atk-plug-btn { + padding: 0 8px; + line-height: 24px; + cursor: pointer; + color: var(--at-color-grey); + font-size: 14px; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + border-radius: 3px; + display: inline-flex; + align-content: center; + justify-content: center +} + +.atk-main-editor>.atk-bottom .atk-plug-btn:not(:last-child) { + margin-right: 2px; + border-right: 1px solid var(--at-color-border) +} + +.atk-main-editor>.atk-bottom .atk-plug-btn:hover { + background: var(--at-color-bg-grey) +} + +.atk-main-editor>.atk-bottom .atk-plug-btn.active { + color: var(--at-color-main) +} + +.atk-main-editor>.atk-bottom .atk-plug-btn.active svg.markdown path { + fill: var(--at-color-main) +} + +.atk-main-editor>.atk-bottom .atk-plug-btn i { + color: var(--at-color-grey); + display: inline-flex; + vertical-align: sub; + margin-left: 4px +} + +.atk-main-editor>.atk-bottom .atk-plug-btn i svg.markdown path { + fill: var(--at-color-grey) +} + +.atk-main-editor>.atk-notify-wrap { + z-index: 9; + position: absolute; + right: -2px; + bottom: 40px; + width: 225px; + opacity: .83 +} + + + +.atk-main-editor>.atk-bottom .atk-send-btn { + background: var(--at-color-main); + color: #fff; + font-size: 14px; + border: none; + margin: 0; + height: 30px; + width: 8em; + cursor: pointer; + transition: opacity .3s ease-in-out; + outline: none; + border-radius: 3px +} + +.atk-main-editor>.atk-textarea-wrap .atk-send-btn:active { + opacity: .9 +} + +.atk-header input:focus-within { + border-bottom: 1px solid var(--at-color-border) +} + +.atk-sidebar-layer { + position: fixed; + z-index: 99999; + top: 10%; + left: 20%; + width: 60%; + height: 80%; + background: var(--at-color-bg); + transition: transform .45s cubic-bezier(.23,1,.32,1) 0ms; + transform: translateY(120%); + border-radius: 12px; + padding: 10px 0 +} + +@media only screen and (max-width: 600px) { + .atk-sidebar-layer { + width:100%; + height: 100%; + left: 0; + top: 0; + border-radius: 0 + } +} + +.atk-sidebar-layer .atk-sidebar-inner { + position: relative; + height: 100% +} + +.atk-sidebar-layer .atk-sidebar-header { + position: absolute; + top: 0; + right: 0; + display: flex; + flex-direction: row; + align-items: center; + z-index: 99999 +} + +.atk-sidebar-layer .atk-sidebar-header .atk-sidebar-close { + display: flex; + flex-direction: column; + width: 60px; + height: 60px; + align-items: center; + place-content: center; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + margin-left: 10px +} + +.atk-sidebar-layer .atk-sidebar-header .atk-sidebar-close:hover .atk-icon-close { + background-color: #e81123e6 +} + +.atk-sidebar-layer .atk-sidebar-iframe-wrap { + height: 100%; + position: relative +} + +.atk-sidebar-layer .atk-sidebar-iframe-wrap iframe { + border: 0; + width: 100%; + height: 100% +} + +.atk-sidebar-layer .atk-sidebar-iframe-wrap .atk-err-alert { + z-index: 9999; + top: 50%; + left: 50%; + transform: translate(-50%,-50%); + position: absolute; + background: var(--at-color-bg); + padding: 40px 30px; + width: 80%; + text-align: center; + border-radius: 4px +} + +.atk-sidebar-layer .atk-sidebar-iframe-wrap .atk-err-alert .atk-title { + font-size: 1.4em; + margin-bottom: 20px; + color: var(--at-color-font) +} + +.atk-sidebar-layer .atk-sidebar-iframe-wrap .atk-err-alert .atk-text { + color: var(--at-color-font) +} + +.atk-sidebar-layer .atk-sidebar-iframe-wrap .atk-err-alert .atk-text span { + cursor: pointer; + color: var(--at-color-main) +} + +.artalk { + position: relative; + width: 100%; + min-height: 200px +} + +.artalk,.atk-layer-wrap { + color: var(--at-color-font); + word-wrap: break-word; + word-break: break-all +} + +.artalk *,.atk-layer-wrap * { + box-sizing: border-box +} + +.artalk input,.artalk textarea,.artalk button,.artalk optgroup,.artalk select,.atk-layer-wrap input,.atk-layer-wrap textarea,.atk-layer-wrap button,.atk-layer-wrap optgroup,.atk-layer-wrap select { + font-family: inherit; + color: inherit; + font-size: inherit +} + +.artalk code,.atk-layer-wrap code { + font-family: source code pro,Consolas,Monaco,Menlo,sans-serif; + margin: 0 .05em; + padding: 0 .4em; + display: inline-block; + vertical-align: middle; + font-size: .9em; + background-color: var(--at-color-bg-grey); + color: var(--at-color-font); + border-radius: 2px +} + +.artalk pre,.atk-layer-wrap pre { + margin: 10px 0 0; + padding: 0; + line-height: 0 +} + +.artalk pre code,.atk-layer-wrap pre code { + line-height: 1.6em; + display: block; + padding: 10px 15px; + white-space: pre-wrap!important; + background-color: var(--at-color-bg-grey); + color: var(--at-color-font); + margin: 0 +} + +.artalk pre code *,.atk-layer-wrap pre code * { + font-family: source code pro,Consolas,Monaco,Menlo,sans-serif +} + +.artalk pre code:before,.atk-layer-wrap pre code:before { + position: absolute; + font-size: 13px; + padding: 4px 8px; + right: 0; + top: 0 +} + + +.artalk a,.atk-layer-wrap a { + color: var(--at-color-main); + text-decoration: none +} + +.artalk blockquote,.atk-layer-wrap blockquote { + position: static; + margin: 10px 0; + padding: 10px 20px; + background: var(--at-color-bg-grey); + border-left: 4px solid #687a86; + color: var(--at-color-font) +} + +.artalk p:first-child,.atk-layer-wrap p:first-child { + margin-top: 0 +} + +.artalk p:last-child,.atk-layer-wrap p:last-child { + margin-bottom: 0 +} + +.artalk img,.atk-layer-wrap img { + max-width: 100% +} + +.artalk table,.atk-layer-wrap table { + width: 100%; + border-collapse: collapse; + border-spacing: 0; + margin-bottom: 1.5em; + font-size: .96em +} + +.artalk td,.atk-layer-wrap td,.artalk th,.atk-layer-wrap th { + text-align: left; + padding: 4px 8px 4px 10px; + border: 1px solid var(--at-color-border) +} + +.artalk td,.atk-layer-wrap td { + vertical-align: top +} + +.artalk tr:nth-child(even),.atk-layer-wrap tr:nth-child(even) { + background-color: var(--at-color-bg-grey) +} + +.artalk ul,.atk-layer-wrap ul { + list-style: disc +} + +.artalk ol,.atk-layer-wrap ol { + list-style: decimal +} + +.artalk li+li,.atk-layer-wrap li+li { + margin-top: 8px +} + +.artalk li>ol,.atk-layer-wrap li>ol,.artalk li>ul,.atk-layer-wrap li>ul { + margin: 8px 0 0 +} + +.atk-hide { + display: none!important +} + +.atk-full-layer,.atk-loading,.atk-error-layer,.atk-layer-dialog-wrap { + width: 100%; + height: 100%; + position: absolute; + top: 0; + left: 0; + background: var(--at-color-bg); + z-index: 10; + align-items: center; + justify-content: center; + flex-flow: column; + display: flex +} + +.atk-loading { + z-index: 11 +} + +.atk-loading-spinner { + position: relative; + width: 50px; + height: 50px +} + +.atk-loading-spinner svg { + -webkit-animation: atkRotate 2s linear infinite; + animation: atkRotate 2s linear infinite; + transform-origin: center center; + width: 100%; + height: 100%; + position: absolute; + top: 0; + left: 0 +} + +.atk-loading-spinner svg circle { + stroke-dasharray: 1,200; + stroke-dashoffset: 0; + -webkit-animation: atkDash 1.5s ease-in-out infinite,atkColor 6s ease-in-out infinite; + animation: atkDash 1.5s ease-in-out infinite,atkColor 6s ease-in-out infinite; + stroke-linecap: round +} + +@-webkit-keyframes atkRotate { + to { + transform: rotate(360deg) + } +} + +@keyframes atkRotate { + to { + transform: rotate(360deg) + } +} + +@-webkit-keyframes atkDash { + 0% { + stroke-dasharray: 1,200; + stroke-dashoffset: 0 + } + + 50% { + stroke-dasharray: 89,200; + stroke-dashoffset: -35px + } + + to { + stroke-dasharray: 89,200; + stroke-dashoffset: -124px + } +} + +@keyframes atkDash { + 0% { + stroke-dasharray: 1,200; + stroke-dashoffset: 0 + } + + 50% { + stroke-dasharray: 89,200; + stroke-dashoffset: -35px + } + + to { + stroke-dasharray: 89,200; + stroke-dashoffset: -124px + } +} + +@-webkit-keyframes atkColor { + 0%,to { + stroke: #ff5652 + } + + 40% { + stroke: #2196f3 + } + + 66% { + stroke: #32c787 + } + + 80%,90% { + stroke: #ffc107 + } +} + +@keyframes atkColor { + 0%,to { + stroke: #ff5652 + } + + 40% { + stroke: #2196f3 + } + + 66% { + stroke: #32c787 + } + + 80%,90% { + stroke: #ffc107 + } +} + +@-webkit-keyframes atkLoadingIconRotate { + 0% { + transform: rotate(0) + } + + to { + transform: rotate(360deg) + } +} + +@keyframes atkLoadingIconRotate { + 0% { + transform: rotate(0) + } + + to { + transform: rotate(360deg) + } +} + +.atk-loading-icon { + width: 18px; + height: 18px; + box-sizing: border-box; + border: solid 1px transparent; + border-top-color: #29d; + border-left-color: #29d; + border-radius: 50%; + -webkit-animation: atkLoadingIconRotate .4s linear infinite; + animation: atkLoadingIconRotate .4s linear infinite +} + +.atk-fade-in { + -webkit-animation: atkFadeIn both .3s; + animation: atkFadeIn both .3s +} + +.atk-fade-out { + -webkit-animation: atkFadeOut both .2s; + animation: atkFadeOut both .2s +} + +.atk-rotate { + -webkit-animation: atkRotate 2s linear infinite; + animation: atkRotate 2s linear infinite +} + +@-webkit-keyframes atkFadeIn { + 0% { + opacity: 0 + } + + to { + opacity: 1 + } +} + +@keyframes atkFadeIn { + 0% { + opacity: 0 + } + + to { + opacity: 1 + } +} + +@-webkit-keyframes atkFadeOut { + to { + opacity: 0 + } +} + +@keyframes atkFadeOut { + to { + opacity: 0 + } +} + +@keyframes atkRotate { + 0% { + transform: rotate(0) + } + + to { + transform: rotate(360deg) + } +} + +i.atk-icon { + width: 20px; + height: 20px; + background-color: var(--at-color-deep); + background-size: contain; + background-repeat: no-repeat; + -webkit-mask-repeat: no-repeat; + mask-repeat: no-repeat; + -webkit-mask-position: center; + mask-position: center; + -webkit-mask-size: contain; + mask-size: contain +} + +.atk-icon-sync { + -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.99133 4.87635C2.22512 7.64257 2.22512 12.1275 4.99133 14.8937C6.04677 15.9491 7.3524 16.6019 8.71732 16.8519' stroke='%234E5969' stroke-width='2'/%3E%3Cpath d='M14.4179 15.4815L15.0072 14.8922C17.7734 12.126 17.7734 7.64107 15.0072 4.87486C13.9518 3.81942 12.6461 3.16668 11.2812 2.91664' stroke='%234E5969' stroke-width='2'/%3E%3Cpath d='M6.17106 4.99252L5.58181 4.40327L4.99255 3.81401H6.17106V4.99252Z' fill='%23C4C4C4' stroke='%234E5969' stroke-width='2'/%3E%3Cpath d='M13.8299 15.0084L14.4192 15.5976L15.0084 16.1869H13.8299V15.0084Z' fill='%23C4C4C4' stroke='%234E5969' stroke-width='2'/%3E%3C/svg%3E"); + mask-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.99133 4.87635C2.22512 7.64257 2.22512 12.1275 4.99133 14.8937C6.04677 15.9491 7.3524 16.6019 8.71732 16.8519' stroke='%234E5969' stroke-width='2'/%3E%3Cpath d='M14.4179 15.4815L15.0072 14.8922C17.7734 12.126 17.7734 7.64107 15.0072 4.87486C13.9518 3.81942 12.6461 3.16668 11.2812 2.91664' stroke='%234E5969' stroke-width='2'/%3E%3Cpath d='M6.17106 4.99252L5.58181 4.40327L4.99255 3.81401H6.17106V4.99252Z' fill='%23C4C4C4' stroke='%234E5969' stroke-width='2'/%3E%3Cpath d='M13.8299 15.0084L14.4192 15.5976L15.0084 16.1869H13.8299V15.0084Z' fill='%23C4C4C4' stroke='%234E5969' stroke-width='2'/%3E%3C/svg%3E") +} + +.atk-icon-del { + background-color: var(--at-color-red)!important; + -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.29167 5.04166L4.81251 5.04166M4.81251 5.04166L4.81251 18.3333C4.81251 18.5865 5.01771 18.7917 5.27084 18.7917L16.7292 18.7917C16.9823 18.7917 17.1875 18.5865 17.1875 18.3333V5.04166M4.81251 5.04166L7.33334 5.04166M17.1875 5.04166L19.7083 5.04166M17.1875 5.04166L14.6667 5.04166M7.33334 5.04166V3.20833L14.6667 3.20833V5.04166M7.33334 5.04166L14.6667 5.04166' stroke='%23D06565' stroke-width='2'/%3E%3Cpath d='M9.16667 8.25V15.125M12.8333 8.25V15.125' stroke='%23D06565' stroke-width='2'/%3E%3C/svg%3E"); + mask-image: url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.29167 5.04166L4.81251 5.04166M4.81251 5.04166L4.81251 18.3333C4.81251 18.5865 5.01771 18.7917 5.27084 18.7917L16.7292 18.7917C16.9823 18.7917 17.1875 18.5865 17.1875 18.3333V5.04166M4.81251 5.04166L7.33334 5.04166M17.1875 5.04166L19.7083 5.04166M17.1875 5.04166L14.6667 5.04166M7.33334 5.04166V3.20833L14.6667 3.20833V5.04166M7.33334 5.04166L14.6667 5.04166' stroke='%23D06565' stroke-width='2'/%3E%3Cpath d='M9.16667 8.25V15.125M12.8333 8.25V15.125' stroke='%23D06565' stroke-width='2'/%3E%3C/svg%3E") +} + +.atk-icon-edit { + -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.70618 4.08515L12.6081 7.06376M1.00041 13.021L11.7376 2L14.6392 4.97861L3.90274 16H1L1.00041 13.021Z' stroke='%234E5969' stroke-width='1.5'/%3E%3C/svg%3E"); + mask-image: url("data:image/svg+xml,%3Csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.70618 4.08515L12.6081 7.06376M1.00041 13.021L11.7376 2L14.6392 4.97861L3.90274 16H1L1.00041 13.021Z' stroke='%234E5969' stroke-width='1.5'/%3E%3C/svg%3E") +} + +.atk-icon-no,.atk-icon-close { + -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='25' height='25' viewBox='0 0 25 25' fill='none'%3E%3Cpath d='M19.8657 5.13431L12.5 12.5L5.13431 19.8657' stroke='%234E5969'/%3E%3Cpath d='M5.13431 5.13432L12.5 12.5L19.8657 19.8657' stroke='%234E5969'/%3E%3C/svg%3E"); + mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='25' height='25' viewBox='0 0 25 25' fill='none'%3E%3Cpath d='M19.8657 5.13431L12.5 12.5L5.13431 19.8657' stroke='%234E5969'/%3E%3Cpath d='M5.13431 5.13432L12.5 12.5L19.8657 19.8657' stroke='%234E5969'/%3E%3C/svg%3E") +} + +.atk-icon-yes { + -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='25' height='25' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21.7071 5.75533L9.92197 17.5404L3.29285 10.9113' stroke='%234E5969'/%3E%3C/svg%3E"); + mask-image: url("data:image/svg+xml,%3Csvg width='25' height='25' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21.7071 5.75533L9.92197 17.5404L3.29285 10.9113' stroke='%234E5969'/%3E%3C/svg%3E") +} + +.atk-icon-plus { + -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.08331 10H17.9166' stroke='%234E5969' stroke-width='2'/%3E%3Cpath d='M10 2.08334L10 17.9167' stroke='%234E5969' stroke-width='2'/%3E%3C/svg%3E"); + mask-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.08331 10H17.9166' stroke='%234E5969' stroke-width='2'/%3E%3Cpath d='M10 2.08334L10 17.9167' stroke='%234E5969' stroke-width='2'/%3E%3C/svg%3E") +} + +.atk-error-layer { + background-color: var(--at-color-bg-transl) +} + +.atk-error-layer .atk-error-title { + color: var(--at-color-red) +} + +.atk-error-layer .atk-warn-title { + color: var(--at-color-yellow) +} + +.atk-error-layer .atk-error-title,.atk-error-layer .atk-warn-title { + display: inline-block; + padding: 0 15px; + margin-bottom: 20px; + font-size: 20px; + letter-spacing: -.5px +} + +.atk-error-layer .atk-error-text { + text-align: center; + padding: 0 20px +} + +.atk-error-layer .atk-error-text * { + color: var(--at-color-deep) +} + +.atk-error-layer .atk-error-text a { + color: var(--at-color-meta) +} + +.atk-layer-dialog-wrap { + background-color: var(--at-color-bg-transl) +} + +.atk-layer-dialog-wrap>.atk-layer-dialog { + width: 25% +} + +.atk-layer-dialog-wrap>.atk-layer-dialog>.atk-layer-dialog-content .atk-captcha-img { + cursor: pointer; + width: 170px; + height: auto; + margin-right: 10px; + padding-right: 10px; + border-right: 1px solid var(--at-color-border); + vertical-align: bottom +} + +.atk-layer-dialog-wrap>.atk-layer-dialog>.atk-layer-dialog-content input { + width: 100%; + line-height: 34px; + background-color: var(--at-color-bg); + border: 1px solid var(--at-color-border); + border-radius: 3px; + outline: none; + padding: 0 6px; + display: block; + margin-top: 10px; + margin-bottom: 5px; + text-align: center +} + +.atk-layer-dialog-wrap>.atk-layer-dialog>.atk-layer-dialog-actions { + display: flex; + flex-direction: row +} + +.atk-layer-dialog-wrap>.atk-layer-dialog>.atk-layer-dialog-actions button { + flex: 1; + display: block; + cursor: pointer; + border: 1px solid var(--at-color-main); + background: transparent; + color: var(--at-color-main); + border-radius: 3px; + padding: 0 15px; + line-height: 30px; + outline: none +} + +.atk-layer-dialog-wrap>.atk-layer-dialog>.atk-layer-dialog-actions button:active { + color: #fff; + background: var(--at-color-main) +} + +.atk-layer-dialog-wrap>.atk-layer-dialog>.atk-layer-dialog-actions button:not(:last-child) { + margin-right: 5px +} + +.atk-layer-dialog-wrap>.atk-layer-dialog>.atk-layer-dialog-actions button.error { + color: #fff; + background: #ff5652; + border-color: #ff5652 +} + +.atk-layer-dialog-wrap>.atk-layer-dialog .atk-checker-iframe-wrap { + position: fixed; + z-index: 999998; + left: 0; + top: 0; + height: 100vh; + width: 100vw +} + +.atk-layer-dialog-wrap>.atk-layer-dialog .atk-checker-iframe-wrap>iframe { + width: 100%; + height: 100%; + border: 0 +} + +.atk-layer-dialog-wrap>.atk-layer-dialog .atk-checker-iframe-wrap .atk-close-btn { + z-index: 999999; + position: fixed; + top: 20px; + right: 20px; + display: flex; + flex-direction: column; + width: 50px; + height: 50px; + align-items: center; + place-content: center; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + margin-left: 10px +} + +.atk-layer-dialog-wrap>.atk-layer-dialog .atk-checker-iframe-wrap .atk-close-btn:hover .atk-icon-close { + background-color: #e81123e6 +} + +@media only screen and (max-width: 768px) { + .atk-layer-dialog-wrap>.atk-layer-dialog { + width:90%!important + } +} + +.atk-notify { + display: block; + overflow: hidden; + background-color: #2c2c2c; + color: #fff; + border-radius: 3px; + cursor: pointer; + font-size: 14px; + padding: 5px 15px +} + +.atk-notify:not(:last-child) { + margin-bottom: 3px +} + +.atk-notify .atk-notify-content { + color: #fff +} + +.atk-layer-wrap .atk-layer-mask { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 99998; + background: rgba(0,0,0,.3); + -webkit-backdrop-filter: blur(10px); + backdrop-filter: blur(10px) +} + +.atk-layer-wrap .atk-layer-item { + position: fixed; + z-index: 99999; + top: 0; + right: 0; + width: 100%; + height: 100% +} + +.atk-common-action-btn.atk-btn-confirm,.atk-common-action-btn.atk-btn-warn { + color: var(--at-color-yellow)!important +} + +.atk-common-action-btn.atk-btn-error { + color: var(--at-color-red)!important +} + +.atk-common-action-btn.atk-btn-success { + color: var(--at-color-green)!important +} + +img[atk-emoticon] { + width: 3em; + height: auto; + vertical-align: middle; + max-height: 60px; + display: initial +} + +#owo-big { + position: fixed; + align-items: center; + background-color: var(--at-color-owo); + -webkit-backdrop-filter: saturate(200%) blur(6px); + backdrop-filter: saturate(200%) blur(6px); + border: 1px solid var(--at-color-bg-light); + border-radius: 12px; + box-shadow: 0 0 12px 4px #0000000d; + z-index: 9999; + display: none; + transform: translateY(-105%); + overflow: hidden; + -webkit-animation: owoIn .3s cubic-bezier(.42,0,.3,1.11); + animation: owoIn .3s cubic-bezier(.42,0,.3,1.11); + padding: 16px; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none +} + +#owo-big img { + width: 100%; + border-radius: 10px +} + +#owo-big p { + color: var(--at-color-meta); + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + text-align: center; + font-size: 12px; + margin: 0 +} + +#owo-big p { + margin-top: -14px!important; +} + +@-webkit-keyframes owoIn { + 0% { + transform: translateY(-95%); + opacity: 0 + } + + to { + transform: translateY(-105%); + opacity: 1 + } +} + +@keyframes owoIn { + 0% { + transform: translateY(-95%); + opacity: 0 + } + + to { + transform: translateY(-105%); + opacity: 1 + } +} + +.atk-editor-plug-emoticons { + position: absolute; + top: 98%; + left: 1rem; + border: 1px solid var(--at-color-border); + background-color: var(--at-color-bg); + border-radius: 12px; + box-shadow: 0 0 12px 4px #0000000d; + height: 232px; + width: 100%; + max-width: 468px +} + +@media screen and (max-width: 840px) { + .atk-editor-plug-emoticons { + max-width:100%; + left: 0 + } +} + +.atk-editor-plug-emoticons>.atk-grp-wrap { + overflow-y: scroll; + overflow-x: hidden; + width: 100%; + margin: 8px -5px !important; + max-height: 197px; +} + +.atk-editor-plug-emoticons>.atk-grp-wrap::-webkit-scrollbar { + width: 4px; + height: 4px; + background: transparent +} + +.atk-editor-plug-emoticons>.atk-grp-wrap::-webkit-scrollbar-thumb,.atk-editor-plug-emoticons>.atk-grp-wrap::-webkit-scrollbar-thumb:window-inactive { + background: rgba(86,86,86,.3) +} + +.atk-editor-plug-emoticons>.atk-grp-wrap::-webkit-scrollbar-thumb:vertical:hover { + background: rgba(65,74,82,.77) +} + +.atk-editor-plug-emoticons>.atk-grp-wrap::-webkit-scrollbar-thumb:vertical:active { + background: rgba(41,47,53,.77) +} + +.atk-editor-plug-emoticons>.atk-grp-wrap>.atk-grp { + display: flex; + flex-wrap: wrap; + flex-direction: row; + padding: 5px 10px 35px +} + +.atk-editor-plug-emoticons>.atk-grp-wrap>.atk-grp[data-type=image]>.atk-item { + height: 63px; + width: 63px +} + +.atk-editor-plug-emoticons>.atk-grp-wrap>.atk-grp>.atk-item { + display: flex; + align-items: center; + justify-content: center; + padding: 5px; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + border-radius: 3px; + font-size: 16px; + min-width: 35px +} + +.atk-editor-plug-emoticons>.atk-grp-wrap>.atk-grp>.atk-item>img { + max-height: 100%; + width: auto +} + +.atk-editor-plug-emoticons>.atk-grp-wrap>.atk-grp>.atk-item:hover { + background: var(--at-color-bg-grey) +} + +.atk-editor-plug-emoticons>.atk-grp-switcher { + position: absolute; + margin: 0; + padding: 0; + font-size: 0; + width: 100%; + background: var(--heo-background); + border-bottom-right-radius: 8px; + border-bottom-left-radius: 8px; +} + +.atk-editor-plug-emoticons>.atk-grp-switcher>span { + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + padding: 0 10px; + line-height: 30px; + float: left; + display: block; + cursor: pointer; + font-size: 14px; + border-bottom-right-radius: 10px; + border-bottom-left-radius: 10px +} + +.atk-editor-plug-emoticons>.atk-grp-switcher>span:hover,.atk-editor-plug-emoticons>.atk-grp-switcher>span.active { + background: var(--at-color-bg-grey) +} + +.atk-editor-plug-preview { + overflow-y: auto; + overflow-x: hidden; + height: 100%; + width: 100%; + padding: 10px 15px; + border-top: 1px solid var(--at-color-border); + border-bottom: 1px solid var(--at-color-border); + max-height: 200px; + display: inline-block; + margin-top: 5px +} diff --git a/templates/assets/libs/artalk/Artalk.js b/templates/assets/libs/artalk/Artalk.js new file mode 100644 index 00000000..a8277f64 --- /dev/null +++ b/templates/assets/libs/artalk/Artalk.js @@ -0,0 +1,7031 @@ +// Artalk v2.6.2 +var __defProp = Object.defineProperty + , __defProps = Object.defineProperties + , __getOwnPropDescs = Object.getOwnPropertyDescriptors + , __getOwnPropSymbols = Object.getOwnPropertySymbols + , __hasOwnProp = Object.prototype.hasOwnProperty + , __propIsEnum = Object.prototype.propertyIsEnumerable + , __defNormalProp = (e,t,n)=>t in e ? __defProp(e, t, { + enumerable: !0, + configurable: !0, + writable: !0, + value: n +}) : e[t] = n + , __spreadValues = (e,t)=>{ + for (var n in t || (t = {})) + __hasOwnProp.call(t, n) && __defNormalProp(e, n, t[n]); + if (__getOwnPropSymbols) + for (var n of __getOwnPropSymbols(t)) + __propIsEnum.call(t, n) && __defNormalProp(e, n, t[n]); + return e +} + , __spreadProps = (e,t)=>__defProps(e, __getOwnPropDescs(t)) + , __publicField = (e,t,n)=>(__defNormalProp(e, "symbol" != typeof t ? t + "" : t, n), + n) + , __accessCheck = (e,t,n)=>{ + if (!t.has(e)) + throw TypeError("Cannot " + n) +} + , __privateAdd = (e,t,n)=>{ + if (t.has(e)) + throw TypeError("Cannot add the same private member more than once"); + t instanceof WeakSet ? t.add(e) : t.set(e, n) +} + , __privateMethod = (e,t,n)=>(__accessCheck(e, t, "access private method"), + n) + , __async = (e,t,n)=>new Promise(((i,s)=>{ + var r = e=>{ + try { + o(n.next(e)) + } catch (t) { + s(t) + } + } + , a = e=>{ + try { + o(n.throw(e)) + } catch (t) { + s(t) + } + } + , o = e=>e.done ? i(e.value) : Promise.resolve(e.value).then(r, a); + o((n = n.apply(e, t)).next()) + } +)); +!function(e, t) { + "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).Artalk = t() +}(this, (function() { + var e, t, n, i; + function s(e="") { + const t = document.createElement("div"); + return t.innerHTML = e.trim(), + t.firstElementChild || t + } + function r(e) { + return parseFloat(getComputedStyle(e, null).height.replace("px", "")) + } + function a(e) { + const t = RegExp(`[?&]${e}=([^&]*)`).exec(window.location.search); + return t && decodeURIComponent(t[1].replace(/\+/g, " ")) + } + function o(e) { + const t = e.getBoundingClientRect(); + return { + top: t.top + window.scrollY, + left: t.left + window.scrollX + } + } + function l(e, t) { + let n = e.toString(); + for (; n.length < t; ) + n = `0 ${n}`; + return n + } + function c(e, t) { + try { + const n = e.getTime() + , i = (new Date).getTime() - n + , s = Math.floor(i / 864e5); + if (0 === s) { + const e = i % 864e5 + , n = Math.floor(e / 36e5); + if (0 === n) { + const n = e % 36e5 + , i = Math.floor(n / 6e4); + if (0 === i) { + const e = n % 6e4 + , i = Math.round(e / 1e3); + return i < 10 ? t.$t("now") : `${i} ${t.$t("seconds")}` + } + return `${i} ${t.$t("minutes")}` + } + return `${n} ${t.$t("hours")}` + } + return s < 0 ? t.$t("now") : s < 8 ? `${s} ${t.$t("days")}` : function(e) { + const t = l(e.getDate(), 2) + , n = l(e.getMonth() + 1, 2); + return `${l(e.getFullYear(), 2)}-${n}-${t}` + }(e) + } catch (n) { + return console.error(n), + " - " + } + } + function d() { + return __async(this, null, (function*() { + const e = navigator.userAgent; + if (!navigator.userAgentData || !navigator.userAgentData.getHighEntropyValues) + return e; + const t = navigator.userAgentData; + let n = null; + try { + n = yield t.getHighEntropyValues(["platformVersion"]) + } catch (s) { + return console.error(s), + e + } + const i = Number(n.platformVersion.split(".")[0]); + return "Windows" === t.platform && i >= 13 ? e.replace(/Windows NT 10.0/, "Windows NT 11.0") : "macOS" === t.platform && i >= 11 ? e.replace(/(Mac OS X \d+_\d+_\d+|Mac OS X)/, `Mac OS X ${n.platformVersion.replace(/\./g, "_")}`) : e + } + )) + } + function h(e) { + let t; + try { + t = new URL(e) + } catch (n) { + return !1 + } + return "http:" === t.protocol || "https:" === t.protocol + } + function u(e, t) { + return function(e, t) { + return `${e.replace(/\/$/, "")}/${t.replace(/^\//, "")}` + }(e.conf.server, t) + } + function p(e, t) { + const n = e=>e && "object" == typeof e; + return n(e) && n(t) ? (Object.keys(t).forEach((i=>{ + const s = e[i] + , r = t[i]; + Array.isArray(s) && Array.isArray(r) ? e[i] = s.concat(r) : n(s) && n(r) ? e[i] = p(__spreadValues({}, s), r) : e[i] = r + } + )), + e) : t + } + class m { + constructor(e) { + __publicField(this, "$el"), + __publicField(this, "ctx"), + __publicField(this, "conf"), + this.ctx = e, + this.conf = e.conf + } + $t(e, t={}) { + return this.ctx.$t(e, t) + } + } + function g(e, t) { + let n = e.querySelector(":scope > .atk-loading"); + n || (n = s(''), + (null == t ? void 0 : t.transparentBg) && (n.style.background = "transparent"), + e.appendChild(n)), + n.style.display = ""; + const i = n.querySelector(".atk-loading-spinner"); + i && (i.style.display = "none", + window.setTimeout((()=>{ + i.style.display = "" + } + ), 500)) + } + function f(e) { + const t = e.querySelector(":scope > .atk-loading"); + t && (t.style.display = "none") + } + function k(e, t=!0) { + const n = o(e).top + r(e) / 2 - document.documentElement.clientHeight / 2; + t ? window.scroll({ + top: n > 0 ? n : 0, + left: 0 + }) : window.scroll(0, n > 0 ? n : 0) + } + function y(e, t, n) { + const i = s(`
`); + i.querySelector(".atk-notify-content").innerHTML = function(e) { + const t = document.createElement("div"); + return t.innerText = e, + t.innerHTML + }(t).replace("\n", "
"), + e.appendChild(i); + const r = ()=>{ + i.classList.add("atk-fade-out"), + setTimeout((()=>{ + i.remove() + } + ), 200) + } + ; + let a; + a = window.setTimeout((()=>{ + r() + } + ), 3e3), + i.addEventListener("click", (()=>{ + r(), + window.clearTimeout(a) + } + )) + } + function b(e, t) { + !function(e, t, n="in") { + e.classList.add(`atk-fade-${n}`); + const i = ()=>{ + e.classList.remove(`atk-fade-${n}`), + e.removeEventListener("animationend", i), + t && t() + } + ; + e.addEventListener("animationend", i) + }(e, t, "in") + } + function _(e, t, n='Artalk Error') { + let i = e.querySelector(".atk-error-layer"); + if (null === t) + return void (null !== i && i.remove()); + i || (i = s(`
${n}
`), + e.appendChild(i)); + const r = i.querySelector(".atk-error-text"); + r.innerHTML = "", + null !== t && (t instanceof HTMLElement ? r.appendChild(t) : r.innerText = t) + } + const $ = class e extends m { + constructor(e, t, n) { + super(e), + __publicField(this, "name"), + __publicField(this, "$wrap"), + __publicField(this, "$mask"), + __publicField(this, "maskClickHideEnable", !0), + __publicField(this, "afterHide"), + this.name = t; + const {$wrap: i, $mask: r} = v(); + this.$wrap = i, + this.$mask = r, + this.$el = this.$wrap.querySelector(`[data-layer-name="${t}"].atk-layer-item`), + null === this.$el && (n ? this.$el = n : (this.$el = s(), + this.$el.classList.add("atk-layer-item"))), + this.$el.setAttribute("data-layer-name", t), + this.$el.style.display = "none", + this.$wrap.append(this.$el) + } + getName() { + return this.name + } + getWrapEl() { + return this.$wrap + } + getEl() { + return this.$el + } + show() { + this.fireAllActionTimer(), + this.$wrap.style.display = "block", + this.$mask.style.display = "block", + this.$mask.classList.add("atk-fade-in"), + this.$el.style.display = "", + this.$mask.onclick = ()=>{ + this.maskClickHideEnable && this.hide() + } + , + this.pageBodyScrollBarHide() + } + hide() { + this.afterHide && this.afterHide(), + this.$wrap.classList.add("atk-fade-out"), + this.$el.style.display = "none", + this.pageBodyScrollBarShow(), + this.newActionTimer((()=>{ + this.$wrap.style.display = "none", + this.checkCleanLayer() + } + ), 450), + this.newActionTimer((()=>{ + this.$wrap.style.display = "none", + this.$wrap.classList.remove("atk-fade-out") + } + ), 200) + } + setMaskClickHide(e) { + this.maskClickHideEnable = e + } + pageBodyScrollBarHide() { + document.body.style.overflow = "hidden"; + const e = parseInt(window.getComputedStyle(document.body, null).getPropertyValue("padding-right"), 10); + document.body.style.paddingRight = `${function() { + const e = document.createElement("p"); + e.style.width = "100%", + e.style.height = "200px"; + const t = document.createElement("div"); + t.style.position = "absolute", + t.style.top = "0px", + t.style.left = "0px", + t.style.visibility = "hidden", + t.style.width = "200px", + t.style.height = "150px", + t.style.overflow = "hidden", + t.appendChild(e), + document.body.appendChild(t); + const n = e.offsetWidth; + t.style.overflow = "scroll"; + let i = e.offsetWidth; + return n === i && (i = t.clientWidth), + document.body.removeChild(t), + n - i + }() + e || 0}px` + } + pageBodyScrollBarShow() { + document.body.style.overflow = e.BodyOrgOverflow, + document.body.style.paddingRight = e.BodyOrgPaddingRight + } + newActionTimer(t, n) { + const i = ()=>{ + t(), + e.actionTimers = e.actionTimers.filter((e=>e.act !== i)) + } + , s = window.setTimeout((()=>i()), n); + e.actionTimers.push({ + act: i, + tid: s + }) + } + fireAllActionTimer() { + e.actionTimers.forEach((e=>{ + clearTimeout(e.tid), + e.act() + } + )) + } + disposeNow() { + this.$el.remove(), + this.pageBodyScrollBarShow(), + this.checkCleanLayer() + } + dispose() { + this.hide(), + this.$el.remove(), + this.checkCleanLayer() + } + checkCleanLayer() { + 0 === this.getWrapEl().querySelectorAll(".atk-layer-item").length && (this.$wrap.style.display = "none") + } + } + ; + __publicField($, "BodyOrgOverflow"), + __publicField($, "BodyOrgPaddingRight"), + __publicField($, "actionTimers", []); + let x = $; + function v() { + let e = document.querySelector(".atk-layer-wrap"); + e || (e = s(''), + document.body.appendChild(e)); + const t = e.querySelector(".atk-layer-mask"); + return { + $wrap: e, + $mask: t + } + } + const w = window.matchMedia("(prefers-color-scheme: dark)"); + let C; + function S(e) { + T(e, e.conf.darkMode, !1) + } + function T(e, t, n=!0) { + const i = t=>{ + !function(e, t) { + t ? e.$root.classList.add(E) : e.$root.classList.remove(E); + const {$wrap: n} = v(); + n && (t ? n.classList.add(E) : n.classList.remove(E)) + }(e, t), + n && function(e, t) { + e.conf.darkMode = t + }(e, t) + } + ; + "auto" === t ? (C || (C = e=>i(e.matches), + w.addEventListener("change", C)), + i(w.matches)) : (C && w.removeEventListener("change", C), + i(t)) + } + const E = "atk-dark-mode" + function L() { + return { + async: !1, + baseUrl: null, + breaks: !1, + extensions: null, + gfm: !0, + headerIds: !1, + headerPrefix: "", + highlight: null, + hooks: null, + langPrefix: "language-", + mangle: !1, + pedantic: !1, + renderer: null, + sanitize: !1, + sanitizer: null, + silent: !1, + smartypants: !1, + tokenizer: null, + walkTokens: null, + xhtml: !1 + } + } + let A = { + async: !1, + baseUrl: null, + breaks: !1, + extensions: null, + gfm: !0, + headerIds: !1, + headerPrefix: "", + highlight: null, + hooks: null, + langPrefix: "language-", + mangle: !1, + pedantic: !1, + renderer: null, + sanitize: !1, + sanitizer: null, + silent: !1, + smartypants: !1, + tokenizer: null, + walkTokens: null, + xhtml: !1 + }; + function F(e) { + A = e + } + const O = /[&<>"']/ + , M = new RegExp(O.source,"g") + , R = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/ + , P = new RegExp(R.source,"g") + , B = { + "&": "&", + "<": "<", + ">": ">", + '"': """, + "'": "'" + } + , I = e=>B[e]; + function U(e, t) { + if (t) { + if (O.test(e)) + return e.replace(M, I) + } else if (R.test(e)) + return e.replace(P, I); + return e + } + const D = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi; + function q(e) { + return e.replace(D, ((e,t)=>"colon" === (t = t.toLowerCase()) ? ":" : "#" === t.charAt(0) ? "x" === t.charAt(1) ? String.fromCharCode(parseInt(t.substring(2), 16)) : String.fromCharCode(+t.substring(1)) : "")) + } + const z = /(^|[^\[])\^/g; + function j(e, t) { + e = "string" == typeof e ? e : e.source, + t = t || ""; + const n = { + replace: (t,i)=>(i = (i = "object" == typeof i && "source"in i ? i.source : i).replace(z, "$1"), + e = e.replace(t, i), + n), + getRegex: ()=>new RegExp(e,t) + }; + return n + } + const W = /[^\w:]/g + , N = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i; + function H(e, t, n) { + if (e) { + let e; + try { + e = decodeURIComponent(q(n)).replace(W, "").toLowerCase() + } catch (i) { + return null + } + if (0 === e.indexOf("javascript:") || 0 === e.indexOf("vbscript:") || 0 === e.indexOf("data:")) + return null + } + t && !N.test(n) && (n = function(e, t) { + V[" " + e] || (Q.test(e) ? V[" " + e] = e + "/" : V[" " + e] = X(e, "/", !0)); + e = V[" " + e]; + const n = -1 === e.indexOf(":"); + return "//" === t.substring(0, 2) ? n ? t : e.replace(Z, "$1") + t : "/" === t.charAt(0) ? n ? t : e.replace(G, "$1") + t : e + t + }(t, n)); + try { + n = encodeURI(n).replace(/%25/g, "%") + } catch (i) { + return null + } + return n + } + const V = {} + , Q = /^[^:]+:\/*[^/]*$/ + , Z = /^([^:]+:)[\s\S]*$/ + , G = /^([^:]+:\/*[^/]*)[\s\S]*$/; + const K = { + exec: ()=>null + }; + function Y(e, t) { + const n = e.replace(/\|/g, ((e,t,n)=>{ + let i = !1 + , s = t; + for (; --s >= 0 && "\\" === n[s]; ) + i = !i; + return i ? "|" : " |" + } + )).split(/ \|/); + let i = 0; + if (n[0].trim() || n.shift(), + n.length > 0 && !n[n.length - 1].trim() && n.pop(), + t) + if (n.length > t) + n.splice(t); + else + for (; n.length < t; ) + n.push(""); + for (; i < n.length; i++) + n[i] = n[i].trim().replace(/\\\|/g, "|"); + return n + } + function X(e, t, n) { + const i = e.length; + if (0 === i) + return ""; + let s = 0; + for (; s < i; ) { + const r = e.charAt(i - s - 1); + if (r !== t || n) { + if (r === t || !n) + break; + s++ + } else + s++ + } + return e.slice(0, i - s) + } + function J(e, t, n, i) { + const s = t.href + , r = t.title ? U(t.title) : null + , a = e[1].replace(/\\([\[\]])/g, "$1"); + if ("!" !== e[0].charAt(0)) { + i.state.inLink = !0; + const e = { + type: "link", + raw: n, + href: s, + title: r, + text: a, + tokens: i.inlineTokens(a) + }; + return i.state.inLink = !1, + e + } + return { + type: "image", + raw: n, + href: s, + title: r, + text: U(a) + } + } + class ee { + constructor(e) { + __publicField(this, "options"), + __publicField(this, "rules"), + __publicField(this, "lexer"), + this.options = e || A + } + space(e) { + const t = this.rules.block.newline.exec(e); + if (t && t[0].length > 0) + return { + type: "space", + raw: t[0] + } + } + code(e) { + const t = this.rules.block.code.exec(e); + if (t) { + const e = t[0].replace(/^ {1,4}/gm, ""); + return { + type: "code", + raw: t[0], + codeBlockStyle: "indented", + text: this.options.pedantic ? e : X(e, "\n") + } + } + } + fences(e) { + const t = this.rules.block.fences.exec(e); + if (t) { + const e = t[0] + , n = function(e, t) { + const n = e.match(/^(\s+)(?:```)/); + if (null === n) + return t; + const i = n[1]; + return t.split("\n").map((e=>{ + const t = e.match(/^\s+/); + if (null === t) + return e; + const [n] = t; + return n.length >= i.length ? e.slice(i.length) : e + } + )).join("\n") + }(e, t[3] || ""); + return { + type: "code", + raw: e, + lang: t[2] ? t[2].trim().replace(this.rules.inline._escapes, "$1") : t[2], + text: n + } + } + } + heading(e) { + const t = this.rules.block.heading.exec(e); + if (t) { + let e = t[2].trim(); + if (/#$/.test(e)) { + const t = X(e, "#"); + this.options.pedantic ? e = t.trim() : t && !/ $/.test(t) || (e = t.trim()) + } + return { + type: "heading", + raw: t[0], + depth: t[1].length, + text: e, + tokens: this.lexer.inline(e) + } + } + } + hr(e) { + const t = this.rules.block.hr.exec(e); + if (t) + return { + type: "hr", + raw: t[0] + } + } + blockquote(e) { + const t = this.rules.block.blockquote.exec(e); + if (t) { + const e = t[0].replace(/^ *>[ \t]?/gm, "") + , n = this.lexer.state.top; + this.lexer.state.top = !0; + const i = this.lexer.blockTokens(e); + return this.lexer.state.top = n, + { + type: "blockquote", + raw: t[0], + tokens: i, + text: e + } + } + } + list(e) { + let t = this.rules.block.list.exec(e); + if (t) { + let n = t[1].trim(); + const i = n.length > 1 + , s = { + type: "list", + raw: "", + ordered: i, + start: i ? +n.slice(0, -1) : "", + loose: !1, + items: [] + }; + n = i ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, + this.options.pedantic && (n = i ? n : "[*+-]"); + const r = new RegExp(`^( {0,3}${n})((?:[\t ][^\\n]*)?(?:\\n|$))`); + let a = "" + , o = "" + , l = !1; + for (; e; ) { + let n = !1; + if (!(t = r.exec(e))) + break; + if (this.rules.block.hr.test(e)) + break; + a = t[0], + e = e.substring(a.length); + let i = t[2].split("\n", 1)[0].replace(/^\t+/, (e=>" ".repeat(3 * e.length))) + , c = e.split("\n", 1)[0] + , d = 0; + this.options.pedantic ? (d = 2, + o = i.trimLeft()) : (d = t[2].search(/[^ ]/), + d = d > 4 ? 1 : d, + o = i.slice(d), + d += t[1].length); + let h = !1; + if (!i && /^ *$/.test(c) && (a += c + "\n", + e = e.substring(c.length + 1), + n = !0), + !n) { + const t = new RegExp(`^ {0,${Math.min(3, d - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`) + , n = new RegExp(`^ {0,${Math.min(3, d - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`) + , s = new RegExp(`^ {0,${Math.min(3, d - 1)}}(?:\`\`\`|~~~)`) + , r = new RegExp(`^ {0,${Math.min(3, d - 1)}}#`); + for (; e; ) { + const l = e.split("\n", 1)[0]; + if (c = l, + this.options.pedantic && (c = c.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), + s.test(c)) + break; + if (r.test(c)) + break; + if (t.test(c)) + break; + if (n.test(e)) + break; + if (c.search(/[^ ]/) >= d || !c.trim()) + o += "\n" + c.slice(d); + else { + if (h) + break; + if (i.search(/[^ ]/) >= 4) + break; + if (s.test(i)) + break; + if (r.test(i)) + break; + if (n.test(i)) + break; + o += "\n" + c + } + h || c.trim() || (h = !0), + a += l + "\n", + e = e.substring(l.length + 1), + i = c.slice(d) + } + } + s.loose || (l ? s.loose = !0 : /\n *\n *$/.test(a) && (l = !0)); + let u, p = null; + this.options.gfm && (p = /^\[[ xX]\] /.exec(o), + p && (u = "[ ] " !== p[0], + o = o.replace(/^\[[ xX]\] +/, ""))), + s.items.push({ + type: "list_item", + raw: a, + task: !!p, + checked: u, + loose: !1, + text: o, + tokens: [] + }), + s.raw += a + } + s.items[s.items.length - 1].raw = a.trimRight(), + s.items[s.items.length - 1].text = o.trimRight(), + s.raw = s.raw.trimRight(); + for (let e = 0; e < s.items.length; e++) + if (this.lexer.state.top = !1, + s.items[e].tokens = this.lexer.blockTokens(s.items[e].text, []), + !s.loose) { + const t = s.items[e].tokens.filter((e=>"space" === e.type)) + , n = t.length > 0 && t.some((e=>/\n.*\n/.test(e.raw))); + s.loose = n + } + if (s.loose) + for (let e = 0; e < s.items.length; e++) + s.items[e].loose = !0; + return s + } + } + html(e) { + const t = this.rules.block.html.exec(e); + if (t) { + const e = { + type: "html", + block: !0, + raw: t[0], + pre: !this.options.sanitizer && ("pre" === t[1] || "script" === t[1] || "style" === t[1]), + text: t[0] + }; + if (this.options.sanitize) { + const n = this.options.sanitizer ? this.options.sanitizer(t[0]) : U(t[0]) + , i = e; + i.type = "paragraph", + i.text = n, + i.tokens = this.lexer.inline(n) + } + return e + } + } + def(e) { + const t = this.rules.block.def.exec(e); + if (t) { + const e = t[1].toLowerCase().replace(/\s+/g, " ") + , n = t[2] ? t[2].replace(/^<(.*)>$/, "$1").replace(this.rules.inline._escapes, "$1") : "" + , i = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline._escapes, "$1") : t[3]; + return { + type: "def", + tag: e, + raw: t[0], + href: n, + title: i + } + } + } + table(e) { + const t = this.rules.block.table.exec(e); + if (t) { + const e = { + type: "table", + raw: t[0], + header: Y(t[1]).map((e=>({ + text: e, + tokens: [] + }))), + align: t[2].replace(/^ *|\| *$/g, "").split(/ *\| */), + rows: t[3] && t[3].trim() ? t[3].replace(/\n[ \t]*$/, "").split("\n") : [] + }; + if (e.header.length === e.align.length) { + let t, n, i, s, r = e.align.length; + for (t = 0; t < r; t++) { + const n = e.align[t]; + n && (/^ *-+: *$/.test(n) ? e.align[t] = "right" : /^ *:-+: *$/.test(n) ? e.align[t] = "center" : /^ *:-+ *$/.test(n) ? e.align[t] = "left" : e.align[t] = null) + } + for (r = e.rows.length, + t = 0; t < r; t++) + e.rows[t] = Y(e.rows[t], e.header.length).map((e=>({ + text: e, + tokens: [] + }))); + for (r = e.header.length, + n = 0; n < r; n++) + e.header[n].tokens = this.lexer.inline(e.header[n].text); + for (r = e.rows.length, + n = 0; n < r; n++) + for (s = e.rows[n], + i = 0; i < s.length; i++) + s[i].tokens = this.lexer.inline(s[i].text); + return e + } + } + } + lheading(e) { + const t = this.rules.block.lheading.exec(e); + if (t) + return { + type: "heading", + raw: t[0], + depth: "=" === t[2].charAt(0) ? 1 : 2, + text: t[1], + tokens: this.lexer.inline(t[1]) + } + } + paragraph(e) { + const t = this.rules.block.paragraph.exec(e); + if (t) { + const e = "\n" === t[1].charAt(t[1].length - 1) ? t[1].slice(0, -1) : t[1]; + return { + type: "paragraph", + raw: t[0], + text: e, + tokens: this.lexer.inline(e) + } + } + } + text(e) { + const t = this.rules.block.text.exec(e); + if (t) + return { + type: "text", + raw: t[0], + text: t[0], + tokens: this.lexer.inline(t[0]) + } + } + escape(e) { + const t = this.rules.inline.escape.exec(e); + if (t) + return { + type: "escape", + raw: t[0], + text: U(t[1]) + } + } + tag(e) { + const t = this.rules.inline.tag.exec(e); + if (t) + return !this.lexer.state.inLink && /^/i.test(t[0]) && (this.lexer.state.inLink = !1), + !this.lexer.state.inRawBlock && /^<(pre|code|kbd|script)(\s|>)/i.test(t[0]) ? this.lexer.state.inRawBlock = !0 : this.lexer.state.inRawBlock && /^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0]) && (this.lexer.state.inRawBlock = !1), + { + type: this.options.sanitize ? "text" : "html", + raw: t[0], + inLink: this.lexer.state.inLink, + inRawBlock: this.lexer.state.inRawBlock, + block: !1, + text: this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(t[0]) : U(t[0]) : t[0] + } + } + link(e) { + const t = this.rules.inline.link.exec(e); + if (t) { + const e = t[2].trim(); + if (!this.options.pedantic && /^$/.test(e)) + return; + const t = X(e.slice(0, -1), "\\"); + if ((e.length - t.length) % 2 == 0) + return + } else { + const e = function(e, t) { + if (-1 === e.indexOf(t[1])) + return -1; + let n = 0; + for (let i = 0; i < e.length; i++) + if ("\\" === e[i]) + i++; + else if (e[i] === t[0]) + n++; + else if (e[i] === t[1] && (n--, + n < 0)) + return i; + return -1 + }(t[2], "()"); + if (e > -1) { + const n = (0 === t[0].indexOf("!") ? 5 : 4) + t[1].length + e; + t[2] = t[2].substring(0, e), + t[0] = t[0].substring(0, n).trim(), + t[3] = "" + } + } + let n = t[2] + , i = ""; + if (this.options.pedantic) { + const e = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n); + e && (n = e[1], + i = e[3]) + } else + i = t[3] ? t[3].slice(1, -1) : ""; + return n = n.trim(), + /^$/.test(e) ? n.slice(1) : n.slice(1, -1)), + J(t, { + href: n ? n.replace(this.rules.inline._escapes, "$1") : n, + title: i ? i.replace(this.rules.inline._escapes, "$1") : i + }, t[0], this.lexer) + } + } + reflink(e, t) { + let n; + if ((n = this.rules.inline.reflink.exec(e)) || (n = this.rules.inline.nolink.exec(e))) { + let e = (n[2] || n[1]).replace(/\s+/g, " "); + if (e = t[e.toLowerCase()], + !e) { + const e = n[0].charAt(0); + return { + type: "text", + raw: e, + text: e + } + } + return J(n, e, n[0], this.lexer) + } + } + emStrong(e, t, n="") { + let i = this.rules.inline.emStrong.lDelim.exec(e); + if (!i) + return; + if (i[3] && n.match(/[\p{L}\p{N}]/u)) + return; + if (!(i[1] || i[2] || "") || !n || this.rules.inline.punctuation.exec(n)) { + const n = [...i[0]].length - 1; + let s, r, a = n, o = 0; + const l = "*" === i[0][0] ? this.rules.inline.emStrong.rDelimAst : this.rules.inline.emStrong.rDelimUnd; + for (l.lastIndex = 0, + t = t.slice(-1 * e.length + n); null != (i = l.exec(t)); ) { + if (s = i[1] || i[2] || i[3] || i[4] || i[5] || i[6], + !s) + continue; + if (r = [...s].length, + i[3] || i[4]) { + a += r; + continue + } + if ((i[5] || i[6]) && n % 3 && !((n + r) % 3)) { + o += r; + continue + } + if (a -= r, + a > 0) + continue; + r = Math.min(r, r + a + o); + const t = [...e].slice(0, n + i.index + r + 1).join(""); + if (Math.min(n, r) % 2) { + const e = t.slice(1, -1); + return { + type: "em", + raw: t, + text: e, + tokens: this.lexer.inlineTokens(e) + } + } + const l = t.slice(2, -2); + return { + type: "strong", + raw: t, + text: l, + tokens: this.lexer.inlineTokens(l) + } + } + } + } + codespan(e) { + const t = this.rules.inline.code.exec(e); + if (t) { + let e = t[2].replace(/\n/g, " "); + const n = /[^ ]/.test(e) + , i = /^ /.test(e) && / $/.test(e); + return n && i && (e = e.substring(1, e.length - 1)), + e = U(e, !0), + { + type: "codespan", + raw: t[0], + text: e + } + } + } + br(e) { + const t = this.rules.inline.br.exec(e); + if (t) + return { + type: "br", + raw: t[0] + } + } + del(e) { + const t = this.rules.inline.del.exec(e); + if (t) + return { + type: "del", + raw: t[0], + text: t[2], + tokens: this.lexer.inlineTokens(t[2]) + } + } + autolink(e, t) { + const n = this.rules.inline.autolink.exec(e); + if (n) { + let e, i; + return "@" === n[2] ? (e = U(this.options.mangle ? t(n[1]) : n[1]), + i = "mailto:" + e) : (e = U(n[1]), + i = e), + { + type: "link", + raw: n[0], + text: e, + href: i, + tokens: [{ + type: "text", + raw: e, + text: e + }] + } + } + } + url(e, t) { + let n; + if (n = this.rules.inline.url.exec(e)) { + let e, i; + if ("@" === n[2]) + e = U(this.options.mangle ? t(n[0]) : n[0]), + i = "mailto:" + e; + else { + let t; + do { + t = n[0], + n[0] = this.rules.inline._backpedal.exec(n[0])[0] + } while (t !== n[0]); + e = U(n[0]), + i = "www." === n[1] ? "http://" + n[0] : n[0] + } + return { + type: "link", + raw: n[0], + text: e, + href: i, + tokens: [{ + type: "text", + raw: e, + text: e + }] + } + } + } + inlineText(e, t) { + const n = this.rules.inline.text.exec(e); + if (n) { + let e; + return e = this.lexer.state.inRawBlock ? this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(n[0]) : U(n[0]) : n[0] : U(this.options.smartypants ? t(n[0]) : n[0]), + { + type: "text", + raw: n[0], + text: e + } + } + } + } + const te = { + newline: /^(?: *(?:\n|$))+/, + code: /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, + fences: /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, + hr: /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, + heading: /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, + blockquote: /^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/, + list: /^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/, + html: "^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))", + def: /^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/, + table: K, + lheading: /^((?:(?!^bull ).|\n(?!\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, + _paragraph: /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, + text: /^[^\n]+/, + _label: /(?!\s*\])(?:\\.|[^\[\]\\])+/, + _title: /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/ + }; + te.def = j(te.def).replace("label", te._label).replace("title", te._title).getRegex(), + te.bullet = /(?:[*+-]|\d{1,9}[.)])/, + te.listItemStart = j(/^( *)(bull) */).replace("bull", te.bullet).getRegex(), + te.list = j(te.list).replace(/bull/g, te.bullet).replace("hr", "\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def", "\\n+(?=" + te.def.source + ")").getRegex(), + te._tag = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", + te._comment = /|$)/, + te.html = j(te.html, "i").replace("comment", te._comment).replace("tag", te._tag).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), + te.lheading = j(te.lheading).replace(/bull/g, te.bullet).getRegex(), + te.paragraph = j(te._paragraph).replace("hr", te.hr).replace("heading", " {0,3}#{1,6} ").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", ")|<(?:script|pre|style|textarea|!--)").replace("tag", te._tag).getRegex(), + te.blockquote = j(te.blockquote).replace("paragraph", te.paragraph).getRegex(), + te.normal = __spreadValues({}, te), + te.gfm = __spreadProps(__spreadValues({}, te.normal), { + table: "^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)" + }), + te.gfm.table = j(te.gfm.table).replace("hr", te.hr).replace("heading", " {0,3}#{1,6} ").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", ")|<(?:script|pre|style|textarea|!--)").replace("tag", te._tag).getRegex(), + te.gfm.paragraph = j(te._paragraph).replace("hr", te.hr).replace("heading", " {0,3}#{1,6} ").replace("|lheading", "").replace("table", te.gfm.table).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", ")|<(?:script|pre|style|textarea|!--)").replace("tag", te._tag).getRegex(), + te.pedantic = __spreadProps(__spreadValues({}, te.normal), { + html: j("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", te._comment).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), + def: /^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, + heading: /^(#{1,6})(.*)(?:\n+|$)/, + fences: K, + lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, + paragraph: j(te.normal._paragraph).replace("hr", te.hr).replace("heading", " *#{1,6} *[^\n]").replace("lheading", te.lheading).replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").getRegex() + }); + const ne = { + escape: /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, + autolink: /^<(scheme:[^\s\x00-\x1f<>]*|email)>/, + url: K, + tag: "^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^", + link: /^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/, + reflink: /^!?\[(label)\]\[(ref)\]/, + nolink: /^!?\[(ref)\](?:\[\])?/, + reflinkSearch: "reflink|nolink(?!\\()", + emStrong: { + lDelim: /^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, + rDelimAst: /^[^_*]*?__[^_*]*?\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\*)[punct](\*+)(?=[\s]|$)|[^punct\s](\*+)(?!\*)(?=[punct\s]|$)|(?!\*)[punct\s](\*+)(?=[^punct\s])|[\s](\*+)(?!\*)(?=[punct])|(?!\*)[punct](\*+)(?!\*)(?=[punct])|[^punct\s](\*+)(?=[^punct\s])/, + rDelimUnd: /^[^_*]*?\*\*[^_*]*?_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\s]|$)|[^punct\s](_+)(?!_)(?=[punct\s]|$)|(?!_)[punct\s](_+)(?=[^punct\s])|[\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])/ + }, + code: /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, + br: /^( {2,}|\\)\n(?!\s*$)/, + del: K, + text: /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\ .5 ? "x" + e.charCodeAt(n).toString(16) : e.charCodeAt(n).toString()) + ";" + } + return t + } + ne._punctuation = "\\p{P}$+<=>`^|~", + ne.punctuation = j(ne.punctuation, "u").replace(/punctuation/g, ne._punctuation).getRegex(), + ne.blockSkip = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g, + ne.anyPunctuation = /\\[punct]/g, + ne._escapes = /\\([punct])/g, + ne._comment = j(te._comment).replace("(?:--\x3e|$)", "--\x3e").getRegex(), + ne.emStrong.lDelim = j(ne.emStrong.lDelim, "u").replace(/punct/g, ne._punctuation).getRegex(), + ne.emStrong.rDelimAst = j(ne.emStrong.rDelimAst, "gu").replace(/punct/g, ne._punctuation).getRegex(), + ne.emStrong.rDelimUnd = j(ne.emStrong.rDelimUnd, "gu").replace(/punct/g, ne._punctuation).getRegex(), + ne.anyPunctuation = j(ne.anyPunctuation, "gu").replace(/punct/g, ne._punctuation).getRegex(), + ne._escapes = j(ne._escapes, "gu").replace(/punct/g, ne._punctuation).getRegex(), + ne._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/, + ne._email = /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/, + ne.autolink = j(ne.autolink).replace("scheme", ne._scheme).replace("email", ne._email).getRegex(), + ne._attribute = /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/, + ne.tag = j(ne.tag).replace("comment", ne._comment).replace("attribute", ne._attribute).getRegex(), + ne._label = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, + ne._href = /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/, + ne._title = /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/, + ne.link = j(ne.link).replace("label", ne._label).replace("href", ne._href).replace("title", ne._title).getRegex(), + ne.reflink = j(ne.reflink).replace("label", ne._label).replace("ref", te._label).getRegex(), + ne.nolink = j(ne.nolink).replace("ref", te._label).getRegex(), + ne.reflinkSearch = j(ne.reflinkSearch, "g").replace("reflink", ne.reflink).replace("nolink", ne.nolink).getRegex(), + ne.normal = __spreadValues({}, ne), + ne.pedantic = __spreadProps(__spreadValues({}, ne.normal), { + strong: { + start: /^__|\*\*/, + middle: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/, + endAst: /\*\*(?!\*)/g, + endUnd: /__(?!_)/g + }, + em: { + start: /^_|\*/, + middle: /^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/, + endAst: /\*(?!\*)/g, + endUnd: /_(?!_)/g + }, + link: j(/^!?\[(label)\]\((.*?)\)/).replace("label", ne._label).getRegex(), + reflink: j(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", ne._label).getRegex() + }), + ne.gfm = __spreadProps(__spreadValues({}, ne.normal), { + escape: j(ne.escape).replace("])", "~|])").getRegex(), + _extended_email: /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/, + url: /^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, + _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, + del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/, + text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\t + " ".repeat(n.length))); e; ) + if (!(this.options.extensions && this.options.extensions.block && this.options.extensions.block.some((i=>!!(n = i.call({ + lexer: this + }, e, t)) && (e = e.substring(n.raw.length), + t.push(n), + !0))))) + if (n = this.tokenizer.space(e)) + e = e.substring(n.raw.length), + 1 === n.raw.length && t.length > 0 ? t[t.length - 1].raw += "\n" : t.push(n); + else if (n = this.tokenizer.code(e)) + e = e.substring(n.raw.length), + i = t[t.length - 1], + !i || "paragraph" !== i.type && "text" !== i.type ? t.push(n) : (i.raw += "\n" + n.raw, + i.text += "\n" + n.text, + this.inlineQueue[this.inlineQueue.length - 1].src = i.text); + else if (n = this.tokenizer.fences(e)) + e = e.substring(n.raw.length), + t.push(n); + else if (n = this.tokenizer.heading(e)) + e = e.substring(n.raw.length), + t.push(n); + else if (n = this.tokenizer.hr(e)) + e = e.substring(n.raw.length), + t.push(n); + else if (n = this.tokenizer.blockquote(e)) + e = e.substring(n.raw.length), + t.push(n); + else if (n = this.tokenizer.list(e)) + e = e.substring(n.raw.length), + t.push(n); + else if (n = this.tokenizer.html(e)) + e = e.substring(n.raw.length), + t.push(n); + else if (n = this.tokenizer.def(e)) + e = e.substring(n.raw.length), + i = t[t.length - 1], + !i || "paragraph" !== i.type && "text" !== i.type ? this.tokens.links[n.tag] || (this.tokens.links[n.tag] = { + href: n.href, + title: n.title + }) : (i.raw += "\n" + n.raw, + i.text += "\n" + n.raw, + this.inlineQueue[this.inlineQueue.length - 1].src = i.text); + else if (n = this.tokenizer.table(e)) + e = e.substring(n.raw.length), + t.push(n); + else if (n = this.tokenizer.lheading(e)) + e = e.substring(n.raw.length), + t.push(n); + else { + if (s = e, + this.options.extensions && this.options.extensions.startBlock) { + let t = 1 / 0; + const n = e.slice(1); + let i; + this.options.extensions.startBlock.forEach((e=>{ + i = e.call({ + lexer: this + }, n), + "number" == typeof i && i >= 0 && (t = Math.min(t, i)) + } + )), + t < 1 / 0 && t >= 0 && (s = e.substring(0, t + 1)) + } + if (this.state.top && (n = this.tokenizer.paragraph(s))) + i = t[t.length - 1], + r && "paragraph" === i.type ? (i.raw += "\n" + n.raw, + i.text += "\n" + n.text, + this.inlineQueue.pop(), + this.inlineQueue[this.inlineQueue.length - 1].src = i.text) : t.push(n), + r = s.length !== e.length, + e = e.substring(n.raw.length); + else if (n = this.tokenizer.text(e)) + e = e.substring(n.raw.length), + i = t[t.length - 1], + i && "text" === i.type ? (i.raw += "\n" + n.raw, + i.text += "\n" + n.text, + this.inlineQueue.pop(), + this.inlineQueue[this.inlineQueue.length - 1].src = i.text) : t.push(n); + else if (e) { + const t = "Infinite loop on byte: " + e.charCodeAt(0); + if (this.options.silent) { + console.error(t); + break + } + throw new Error(t) + } + } + return this.state.top = !0, + t + } + inline(e, t=[]) { + return this.inlineQueue.push({ + src: e, + tokens: t + }), + t + } + inlineTokens(e, t=[]) { + let n, i, s, r, a, o, l = e; + if (this.tokens.links) { + const e = Object.keys(this.tokens.links); + if (e.length > 0) + for (; null != (r = this.tokenizer.rules.inline.reflinkSearch.exec(l)); ) + e.includes(r[0].slice(r[0].lastIndexOf("[") + 1, -1)) && (l = l.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex)) + } + for (; null != (r = this.tokenizer.rules.inline.blockSkip.exec(l)); ) + l = l.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex); + for (; null != (r = this.tokenizer.rules.inline.anyPunctuation.exec(l)); ) + l = l.slice(0, r.index) + "++" + l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex); + for (; e; ) + if (a || (o = ""), + a = !1, + !(this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some((i=>!!(n = i.call({ + lexer: this + }, e, t)) && (e = e.substring(n.raw.length), + t.push(n), + !0))))) + if (n = this.tokenizer.escape(e)) + e = e.substring(n.raw.length), + t.push(n); + else if (n = this.tokenizer.tag(e)) + e = e.substring(n.raw.length), + i = t[t.length - 1], + i && "text" === n.type && "text" === i.type ? (i.raw += n.raw, + i.text += n.text) : t.push(n); + else if (n = this.tokenizer.link(e)) + e = e.substring(n.raw.length), + t.push(n); + else if (n = this.tokenizer.reflink(e, this.tokens.links)) + e = e.substring(n.raw.length), + i = t[t.length - 1], + i && "text" === n.type && "text" === i.type ? (i.raw += n.raw, + i.text += n.text) : t.push(n); + else if (n = this.tokenizer.emStrong(e, l, o)) + e = e.substring(n.raw.length), + t.push(n); + else if (n = this.tokenizer.codespan(e)) + e = e.substring(n.raw.length), + t.push(n); + else if (n = this.tokenizer.br(e)) + e = e.substring(n.raw.length), + t.push(n); + else if (n = this.tokenizer.del(e)) + e = e.substring(n.raw.length), + t.push(n); + else if (n = this.tokenizer.autolink(e, se)) + e = e.substring(n.raw.length), + t.push(n); + else if (this.state.inLink || !(n = this.tokenizer.url(e, se))) { + if (s = e, + this.options.extensions && this.options.extensions.startInline) { + let t = 1 / 0; + const n = e.slice(1); + let i; + this.options.extensions.startInline.forEach((e=>{ + i = e.call({ + lexer: this + }, n), + "number" == typeof i && i >= 0 && (t = Math.min(t, i)) + } + )), + t < 1 / 0 && t >= 0 && (s = e.substring(0, t + 1)) + } + if (n = this.tokenizer.inlineText(s, ie)) + e = e.substring(n.raw.length), + "_" !== n.raw.slice(-1) && (o = n.raw.slice(-1)), + a = !0, + i = t[t.length - 1], + i && "text" === i.type ? (i.raw += n.raw, + i.text += n.text) : t.push(n); + else if (e) { + const t = "Infinite loop on byte: " + e.charCodeAt(0); + if (this.options.silent) { + console.error(t); + break + } + throw new Error(t) + } + } else + e = e.substring(n.raw.length), + t.push(n); + return t + } + } + class ae { + constructor(e) { + __publicField(this, "options"), + this.options = e || A + } + code(e, t, n) { + var i; + const s = null == (i = (t || "").match(/^\S*/)) ? void 0 : i[0]; + if (this.options.highlight) { + const t = this.options.highlight(e, s); + null != t && t !== e && (n = !0, + e = t) + } + return e = e.replace(/\n$/, "") + "\n", + s ? '
' + (n ? e : U(e, !0)) + "
\n" : "
" + (n ? e : U(e, !0)) + "
\n" + } + blockquote(e) { + return `
\n ${e}
\n` + } + html(e, t) { + return e + } + heading(e, t, n, i) { + if (this.options.headerIds) { + return `${e}\n` + } + return `${e}\n` + } + hr() { + return this.options.xhtml ? "
\n" : "
\n" + } + list(e, t, n) { + const i = t ? "ol" : "ul"; + return "<" + i + (t && 1 !== n ? ' start="' + n + '"' : "") + ">\n" + e + "\n" + } + listitem(e, t, n) { + return `
  • ${e}
  • \n` + } + checkbox(e) { + return " " + } + paragraph(e) { + return `

    ${e}

    \n` + } + table(e, t) { + return t && (t = `${t}`), + "\n\n" + e + "\n" + t + "
    \n" + } + tablerow(e) { + return `\n ${e}\n` + } + tablecell(e, t) { + const n = t.header ? "th" : "td"; + return (t.align ? `<${n} align="${t.align}">` : `<${n}>`) + e + `\n` + } + strong(e) { + return `${e}` + } + em(e) { + return `${e}` + } + codespan(e) { + return `${e}` + } + br() { + return this.options.xhtml ? "
    " : "
    " + } + del(e) { + return `${e}` + } + link(e, t, n) { + const i = H(this.options.sanitize, this.options.baseUrl, e); + if (null === i) + return n; + let s = '
    ", + s + } + image(e, t, n) { + const i = H(this.options.sanitize, this.options.baseUrl, e); + if (null === i) + return n; + let s = `${n}" : ">", + s + } + text(e) { + return e + } + } + class oe { + strong(e) { + return e + } + em(e) { + return e + } + codespan(e) { + return e + } + del(e) { + return e + } + html(e) { + return e + } + text(e) { + return e + } + link(e, t, n) { + return "" + n + } + image(e, t, n) { + return "" + n + } + br() { + return "" + } + } + class le { + constructor() { + __publicField(this, "seen"), + this.seen = {} + } + serialize(e) { + return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi, "").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g, "").replace(/\s/g, "-") + } + getNextSafeSlug(e, t) { + let n = e + , i = 0; + if (this.seen.hasOwnProperty(n)) { + i = this.seen[e]; + do { + i++, + n = e + "-" + i + } while (this.seen.hasOwnProperty(n)) + } + return t || (this.seen[e] = i, + this.seen[n] = 0), + n + } + slug(e, t={}) { + const n = this.serialize(e); + return this.getNextSafeSlug(n, t.dryrun) + } + } + class ce { + constructor(e) { + __publicField(this, "options"), + __publicField(this, "renderer"), + __publicField(this, "textRenderer"), + __publicField(this, "slugger"), + this.options = e || A, + this.options.renderer = this.options.renderer || new ae, + this.renderer = this.options.renderer, + this.renderer.options = this.options, + this.textRenderer = new oe, + this.slugger = new le + } + static parse(e, t) { + return new ce(t).parse(e) + } + static parseInline(e, t) { + return new ce(t).parseInline(e) + } + parse(e, t=!0) { + let n = ""; + for (let i = 0; i < e.length; i++) { + const s = e[i]; + if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[s.type]) { + const e = s + , t = this.options.extensions.renderers[e.type].call({ + parser: this + }, e); + if (!1 !== t || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "paragraph", "text"].includes(e.type)) { + n += t || ""; + continue + } + } + switch (s.type) { + case "space": + continue; + case "hr": + n += this.renderer.hr(); + continue; + case "heading": + { + const e = s; + n += this.renderer.heading(this.parseInline(e.tokens), e.depth, q(this.parseInline(e.tokens, this.textRenderer)), this.slugger); + continue + } + case "code": + { + const e = s; + n += this.renderer.code(e.text, e.lang, !!e.escaped); + continue + } + case "table": + { + const e = s; + let t = "" + , i = ""; + for (let n = 0; n < e.header.length; n++) + i += this.renderer.tablecell(this.parseInline(e.header[n].tokens), { + header: !0, + align: e.align[n] + }); + t += this.renderer.tablerow(i); + let r = ""; + for (let n = 0; n < e.rows.length; n++) { + const t = e.rows[n]; + i = ""; + for (let n = 0; n < t.length; n++) + i += this.renderer.tablecell(this.parseInline(t[n].tokens), { + header: !1, + align: e.align[n] + }); + r += this.renderer.tablerow(i) + } + n += this.renderer.table(t, r); + continue + } + case "blockquote": + { + const e = s + , t = this.parse(e.tokens); + n += this.renderer.blockquote(t); + continue + } + case "list": + { + const e = s + , t = e.ordered + , i = e.start + , r = e.loose; + let a = ""; + for (let n = 0; n < e.items.length; n++) { + const t = e.items[n] + , i = t.checked + , s = t.task; + let o = ""; + if (t.task) { + const e = this.renderer.checkbox(!!i); + r ? t.tokens.length > 0 && "paragraph" === t.tokens[0].type ? (t.tokens[0].text = e + " " + t.tokens[0].text, + t.tokens[0].tokens && t.tokens[0].tokens.length > 0 && "text" === t.tokens[0].tokens[0].type && (t.tokens[0].tokens[0].text = e + " " + t.tokens[0].tokens[0].text)) : t.tokens.unshift({ + type: "text", + text: e + }) : o += e + } + o += this.parse(t.tokens, r), + a += this.renderer.listitem(o, s, !!i) + } + n += this.renderer.list(a, t, i); + continue + } + case "html": + { + const e = s; + n += this.renderer.html(e.text, e.block); + continue + } + case "paragraph": + { + const e = s; + n += this.renderer.paragraph(this.parseInline(e.tokens)); + continue + } + case "text": + { + let r = s + , a = r.tokens ? this.parseInline(r.tokens) : r.text; + for (; i + 1 < e.length && "text" === e[i + 1].type; ) + r = e[++i], + a += "\n" + (r.tokens ? this.parseInline(r.tokens) : r.text); + n += t ? this.renderer.paragraph(a) : a; + continue + } + default: + { + const e = 'Token with "' + s.type + '" type was not found.'; + if (this.options.silent) + return console.error(e), + ""; + throw new Error(e) + } + } + } + return n + } + parseInline(e, t) { + t = t || this.renderer; + let n = ""; + for (let i = 0; i < e.length; i++) { + const s = e[i]; + if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[s.type]) { + const e = this.options.extensions.renderers[s.type].call({ + parser: this + }, s); + if (!1 !== e || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(s.type)) { + n += e || ""; + continue + } + } + switch (s.type) { + case "escape": + { + const e = s; + n += t.text(e.text); + break + } + case "html": + { + const e = s; + n += t.html(e.text); + break + } + case "link": + { + const e = s; + n += t.link(e.href, e.title, this.parseInline(e.tokens, t)); + break + } + case "image": + { + const e = s; + n += t.image(e.href, e.title, e.text); + break + } + case "strong": + { + const e = s; + n += t.strong(this.parseInline(e.tokens, t)); + break + } + case "em": + { + const e = s; + n += t.em(this.parseInline(e.tokens, t)); + break + } + case "codespan": + { + const e = s; + n += t.codespan(e.text); + break + } + case "br": + n += t.br(); + break; + case "del": + { + const e = s; + n += t.del(this.parseInline(e.tokens, t)); + break + } + case "text": + { + const e = s; + n += t.text(e.text); + break + } + default: + { + const e = 'Token with "' + s.type + '" type was not found.'; + if (this.options.silent) + return console.error(e), + ""; + throw new Error(e) + } + } + } + return n + } + } + class de { + constructor(e) { + __publicField(this, "options"), + this.options = e || A + } + preprocess(e) { + return e + } + postprocess(e) { + return e + } + } + __publicField(de, "passThroughHooks", new Set(["preprocess", "postprocess"])); + e = new WeakSet, + t = function(e, t) { + return (s,r,a)=>{ + "function" == typeof r && (a = r, + r = null); + const o = __spreadValues({}, r) + , l = __spreadValues(__spreadValues({}, this.defaults), o); + !0 === this.defaults.async && !1 === o.async && (l.silent || console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."), + l.async = !0); + const c = __privateMethod(this, n, i).call(this, !!l.silent, !!l.async, a); + if (null == s) + return c(new Error("marked(): input parameter is undefined or null")); + if ("string" != typeof s) + return c(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(s) + ", string expected")); + if (function(e, t) { + e && !e.silent && (t && console.warn("marked(): callback is deprecated since version 5.0.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/using_pro#async"), + (e.sanitize || e.sanitizer) && console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options"), + (e.highlight || "language-" !== e.langPrefix) && console.warn("marked(): highlight and langPrefix parameters are deprecated since version 5.0.0, should not be used and will be removed in the future. Instead use https://www.npmjs.com/package/marked-highlight."), + e.mangle && console.warn("marked(): mangle parameter is enabled by default, but is deprecated since version 5.0.0, and will be removed in the future. To clear this warning, install https://www.npmjs.com/package/marked-mangle, or disable by setting `{mangle: false}`."), + e.baseUrl && console.warn("marked(): baseUrl parameter is deprecated since version 5.0.0, should not be used and will be removed in the future. Instead use https://www.npmjs.com/package/marked-base-url."), + e.smartypants && console.warn("marked(): smartypants parameter is deprecated since version 5.0.0, should not be used and will be removed in the future. Instead use https://www.npmjs.com/package/marked-smartypants."), + e.xhtml && console.warn("marked(): xhtml parameter is deprecated since version 5.0.0, should not be used and will be removed in the future. Instead use https://www.npmjs.com/package/marked-xhtml."), + (e.headerIds || e.headerPrefix) && console.warn("marked(): headerIds and headerPrefix parameters enabled by default, but are deprecated since version 5.0.0, and will be removed in the future. To clear this warning, install https://www.npmjs.com/package/marked-gfm-heading-id, or disable by setting `{headerIds: false}`.")) + }(l, a), + l.hooks && (l.hooks.options = l), + a) { + const n = a + , i = l.highlight; + let r; + try { + l.hooks && (s = l.hooks.preprocess(s)), + r = e(s, l) + } catch (d) { + return c(d) + } + const o = e=>{ + let s; + if (!e) + try { + l.walkTokens && this.walkTokens(r, l.walkTokens), + s = t(r, l), + l.hooks && (s = l.hooks.postprocess(s)) + } catch (d) { + e = d + } + return l.highlight = i, + e ? c(e) : n(null, s) + } + ; + if (!i || i.length < 3) + return o(); + if (delete l.highlight, + !r.length) + return o(); + let h = 0; + return this.walkTokens(r, (e=>{ + "code" === e.type && (h++, + setTimeout((()=>{ + i(e.text, e.lang, ((t,n)=>{ + if (t) + return o(t); + null != n && n !== e.text && (e.text = n, + e.escaped = !0), + h--, + 0 === h && o() + } + )) + } + ), 0)) + } + )), + void (0 === h && o()) + } + if (l.async) + return Promise.resolve(l.hooks ? l.hooks.preprocess(s) : s).then((t=>e(t, l))).then((e=>l.walkTokens ? Promise.all(this.walkTokens(e, l.walkTokens)).then((()=>e)) : e)).then((e=>t(e, l))).then((e=>l.hooks ? l.hooks.postprocess(e) : e)).catch(c); + try { + l.hooks && (s = l.hooks.preprocess(s)); + const n = e(s, l); + l.walkTokens && this.walkTokens(n, l.walkTokens); + let i = t(n, l); + return l.hooks && (i = l.hooks.postprocess(i)), + i + } catch (d) { + return c(d) + } + } + } + , + n = new WeakSet, + i = function(e, t, n) { + return i=>{ + if (i.message += "\nPlease report this to https://github.com/markedjs/marked.", + e) { + const e = "

    An error occurred:

    " + U(i.message + "", !0) + "
    "; + return t ? Promise.resolve(e) : n ? void n(null, e) : e + } + if (t) + return Promise.reject(i); + if (!n) + throw i; + n(i) + } + } + ; + const he = new class { + constructor(...i) { + __privateAdd(this, e), + __privateAdd(this, n), + __publicField(this, "defaults", { + async: !1, + baseUrl: null, + breaks: !1, + extensions: null, + gfm: !0, + headerIds: !1, + headerPrefix: "", + highlight: null, + hooks: null, + langPrefix: "language-", + mangle: !1, + pedantic: !1, + renderer: null, + sanitize: !1, + sanitizer: null, + silent: !1, + smartypants: !1, + tokenizer: null, + walkTokens: null, + xhtml: !1 + }), + __publicField(this, "options", this.setOptions), + __publicField(this, "parse", __privateMethod(this, e, t).call(this, re.lex, ce.parse)), + __publicField(this, "parseInline", __privateMethod(this, e, t).call(this, re.lexInline, ce.parseInline)), + __publicField(this, "Parser", ce), + __publicField(this, "parser", ce.parse), + __publicField(this, "Renderer", ae), + __publicField(this, "TextRenderer", oe), + __publicField(this, "Lexer", re), + __publicField(this, "lexer", re.lex), + __publicField(this, "Tokenizer", ee), + __publicField(this, "Slugger", le), + __publicField(this, "Hooks", de), + this.use(...i) + } + walkTokens(e, t) { + var n, i; + let s = []; + for (const r of e) + switch (s = s.concat(t.call(this, r)), + r.type) { + case "table": + { + const e = r; + for (const n of e.header) + s = s.concat(this.walkTokens(n.tokens, t)); + for (const n of e.rows) + for (const e of n) + s = s.concat(this.walkTokens(e.tokens, t)); + break + } + case "list": + { + const e = r; + s = s.concat(this.walkTokens(e.items, t)); + break + } + default: + { + const e = r; + (null == (i = null == (n = this.defaults.extensions) ? void 0 : n.childTokens) ? void 0 : i[e.type]) ? this.defaults.extensions.childTokens[e.type].forEach((n=>{ + s = s.concat(this.walkTokens(e[n], t)) + } + )) : e.tokens && (s = s.concat(this.walkTokens(e.tokens, t))) + } + } + return s + } + use(...e) { + const t = this.defaults.extensions || { + renderers: {}, + childTokens: {} + }; + return e.forEach((e=>{ + const n = __spreadValues({}, e); + if (n.async = this.defaults.async || n.async || !1, + e.extensions && (e.extensions.forEach((e=>{ + if (!e.name) + throw new Error("extension name required"); + if ("renderer"in e) { + const n = t.renderers[e.name]; + t.renderers[e.name] = n ? function(...t) { + let i = e.renderer.apply(this, t); + return !1 === i && (i = n.apply(this, t)), + i + } + : e.renderer + } + if ("tokenizer"in e) { + if (!e.level || "block" !== e.level && "inline" !== e.level) + throw new Error("extension level must be 'block' or 'inline'"); + const n = t[e.level]; + n ? n.unshift(e.tokenizer) : t[e.level] = [e.tokenizer], + e.start && ("block" === e.level ? t.startBlock ? t.startBlock.push(e.start) : t.startBlock = [e.start] : "inline" === e.level && (t.startInline ? t.startInline.push(e.start) : t.startInline = [e.start])) + } + "childTokens"in e && e.childTokens && (t.childTokens[e.name] = e.childTokens) + } + )), + n.extensions = t), + e.renderer) { + const t = this.defaults.renderer || new ae(this.defaults); + for (const n in e.renderer) { + const i = e.renderer[n] + , s = n + , r = t[s]; + t[s] = (...e)=>{ + let n = i.apply(t, e); + return !1 === n && (n = r.apply(t, e)), + n || "" + } + } + n.renderer = t + } + if (e.tokenizer) { + const t = this.defaults.tokenizer || new ee(this.defaults); + for (const n in e.tokenizer) { + const i = e.tokenizer[n] + , s = n + , r = t[s]; + t[s] = (...e)=>{ + let n = i.apply(t, e); + return !1 === n && (n = r.apply(t, e)), + n + } + } + n.tokenizer = t + } + if (e.hooks) { + const t = this.defaults.hooks || new de; + for (const n in e.hooks) { + const i = e.hooks[n] + , s = n + , r = t[s]; + de.passThroughHooks.has(n) ? t[s] = e=>{ + if (this.defaults.async) + return Promise.resolve(i.call(t, e)).then((e=>r.call(t, e))); + const n = i.call(t, e); + return r.call(t, n) + } + : t[s] = (...e)=>{ + let n = i.apply(t, e); + return !1 === n && (n = r.apply(t, e)), + n + } + } + n.hooks = t + } + if (e.walkTokens) { + const t = this.defaults.walkTokens + , i = e.walkTokens; + n.walkTokens = function(e) { + let n = []; + return n.push(i.call(this, e)), + t && (n = n.concat(t.call(this, e))), + n + } + } + this.defaults = __spreadValues(__spreadValues({}, this.defaults), n) + } + )), + this + } + setOptions(e) { + return this.defaults = __spreadValues(__spreadValues({}, this.defaults), e), + this + } + } + ; + function ue(e, t, n) { + return he.parse(e, t, n) + } + ue.options = ue.setOptions = function(e) { + return he.setOptions(e), + ue.defaults = he.defaults, + F(ue.defaults), + ue + } + , + ue.getDefaults = L, + ue.defaults = A, + ue.use = function(...e) { + return he.use(...e), + ue.defaults = he.defaults, + F(ue.defaults), + ue + } + , + ue.walkTokens = function(e, t) { + return he.walkTokens(e, t) + } + , + ue.parseInline = he.parseInline, + ue.Parser = ce, + ue.parser = ce.parse, + ue.Renderer = ae, + ue.TextRenderer = oe, + ue.Lexer = re, + ue.lexer = re.lex, + ue.Tokenizer = ee, + ue.Slugger = le, + ue.Hooks = de, + ue.parse = ue, + ue.options, + ue.setOptions, + ue.use, + ue.walkTokens, + ue.parseInline; + var pe = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; + function me(e) { + return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e + } + var ge = { + "&": "&", + "<": "<", + ">": ">", + '"': """, + "'": "'" + } + , fe = { + "&": "&", + "<": "<", + ">": ">", + """: '"', + "'": "'" + } + , ke = /(&|<|>|"|')/g + , ye = /[&<>"']/g; + function be(e) { + return ge[e] + } + function _e(e) { + return fe[e] + } + function $e(e) { + return null == e ? "" : String(e).replace(ye, be) + } + function xe(e) { + return null == e ? "" : String(e).replace(ke, _e) + } + $e.options = xe.options = {}; + var ve = { + encode: $e, + escape: $e, + decode: xe, + unescape: xe, + version: "1.0.0-browser" + }; + var we = function e(t) { + for (var n, i, s = Array.prototype.slice.call(arguments, 1); s.length; ) + for (i in n = s.shift()) + n.hasOwnProperty(i) && ("[object Object]" === Object.prototype.toString.call(t[i]) ? t[i] = e(t[i], n[i]) : t[i] = n[i]); + return t + } + , Ce = function(e) { + return "string" == typeof e ? e.toLowerCase() : e + }; + function Se(e, t) { + return e[t] = !0, + e + } + var Te = function(e) { + return e.reduce(Se, {}) + } + , Ee = { + uris: Te(["background", "base", "cite", "href", "longdesc", "src", "usemap"]) + } + , Le = { + voids: Te(["area", "br", "col", "hr", "img", "wbr", "input", "base", "basefont", "link", "meta"]) + } + , Ae = ve + , Fe = Ce + , Oe = Le + , Me = /^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/ + , Re = /^<\s*\/\s*([\w:-]+)[^>]*>/ + , Pe = /([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g + , Be = /^= 0 && (t.comment && t.comment(e.substring(4, i)), + e = e.substring(i + 3), + n = !1) : Ie.test(e) ? a(Re, l) : Be.test(e) && a(Me, o); + var i; + !function() { + if (!n) + return; + var i, s = e.indexOf("<"); + s >= 0 ? (i = e.substring(0, s), + e = e.substring(s)) : (i = e, + e = ""); + t.chars && t.chars(i) + }() + }(); + var i = e === s; + s = e, + i && (e = "") + } + function a(t, i) { + var s = e.match(t); + s && (e = e.substring(s[0].length), + s[0].replace(t, i), + n = !1) + } + function o(e, n, s, r) { + var a = {} + , o = Fe(n) + , l = Oe.voids[o] || !!r; + s.replace(Pe, (function(e, t, n, i, s) { + a[t] = void 0 === n && void 0 === i && void 0 === s ? void 0 : Ae.decode(n || i || s || "") + } + )), + l || i.push(o), + t.start && t.start(o, a, l) + } + function l(e, n) { + var s, r = 0, a = Fe(n); + if (a) + for (r = i.length - 1; r >= 0 && i[r] !== a; r--) + ; + if (r >= 0) { + for (s = i.length - 1; s >= r; s--) + t.end && t.end(i[s]); + i.length = r + } + } + l() + } + , Ne = function(e, t) { + var n, i = t || {}; + return o(), + { + start: function(e, t, a) { + var o = De(e); + if (n.ignoring) + return void r(o); + if (-1 === (i.allowedTags || []).indexOf(o)) + return void r(o); + if (i.filter && !i.filter({ + tag: o, + attrs: t + })) + return void r(o); + s("<"), + s(o), + Object.keys(t).forEach((function(e) { + var n = t[e] + , r = (i.allowedClasses || {})[o] || [] + , a = (i.allowedAttributes || {})[o] || [] + , l = De(e); + ("class" === l && -1 === a.indexOf(l) ? (n = n.split(" ").filter((function(e) { + return r && -1 !== r.indexOf(e) + } + )).join(" ").trim()).length : -1 !== a.indexOf(l) && (!0 !== qe.uris[l] || function(e) { + var t = e[0]; + if ("#" === t || "/" === t) + return !0; + var n = e.indexOf(":"); + if (-1 === n) + return !0; + var s = e.indexOf("?"); + if (-1 !== s && n > s) + return !0; + var r = e.indexOf("#"); + return -1 !== r && n > r || i.allowedSchemes.some(a); + function a(t) { + return 0 === e.indexOf(t + ":") + } + }(n))) && (s(" "), + s(e), + "string" == typeof n && (s('="'), + s(Ue.encode(n)), + s('"'))) + } + )), + s(a ? "/>" : ">") + }, + end: function(e) { + var t = De(e); + -1 !== (i.allowedTags || []).indexOf(t) && !1 === n.ignoring ? (s("")) : a(t) + }, + chars: function(e) { + !1 === n.ignoring && s(i.transformText ? i.transformText(e) : e) + } + }; + function s(t) { + e.push(t) + } + function r(e) { + ze.voids[e] || (!1 === n.ignoring ? n = { + ignoring: e, + depth: 1 + } : n.ignoring === e && n.depth++) + } + function a(e) { + n.ignoring === e && --n.depth <= 0 && o() + } + function o() { + n = { + ignoring: !1, + depth: 0 + } + } + } + , He = { + allowedAttributes: { + a: ["href", "name", "target", "title", "aria-label"], + iframe: ["allowfullscreen", "frameborder", "src"], + img: ["src", "alt", "title", "aria-label"] + }, + allowedClasses: {}, + allowedSchemes: ["http", "https", "mailto"], + allowedTags: ["a", "abbr", "article", "b", "blockquote", "br", "caption", "code", "del", "details", "div", "em", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "img", "ins", "kbd", "li", "main", "mark", "ol", "p", "pre", "section", "span", "strike", "strong", "sub", "summary", "sup", "table", "tbody", "td", "th", "thead", "tr", "u", "ul"], + filter: null + }; + function Ve(e, t, n) { + var i = [] + , s = !0 === n ? t : je({}, He, t) + , r = Ne(i, s); + return We(e, r), + i.join("") + } + Ve.defaults = He; + const Qe = me(Ve); + var Ze = { + exports: {} + }; + Ze.exports = function() { + function e(e, t) { + return e(t = { + exports: {} + }, t.exports), + t.exports + } + var t = e((function(e) { + var t = e.exports = function() { + return new RegExp("(?:" + t.line().source + ")|(?:" + t.block().source + ")","gm") + } + ; + t.line = function() { + return /(?:^|\s)\/\/(.+?)$/gm + } + , + t.block = function() { + return /\/\*([\S\s]*?)\*\//gm + } + } + )) + , n = ["23AC69", "91C132", "F19726", "E8552D", "1AAB8E", "E1147F", "2980C1", "1BA1E6", "9FA0A0", "F19726", "E30B20", "E30B20", "A3338B"]; + function i(e) { + return '' + e + "" + } + return function(e, s) { + void 0 === s && (s = {}); + var r = s.colors; + void 0 === r && (r = n); + var a = 0 + , o = {} + , l = new RegExp("(" + /[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af\u0400-\u04FF]+|\w+/.source + "|" + /' + t + ""; + return a = ++a % r.length, + l + } + )) + } + }(); + const Ge = me(Ze.exports); + let Ke; + function Ye() { + return Ke + } + function Xe(e, t) { + var n; + let i = null == (n = Ye()) ? void 0 : n.parse(t); + i || (i = t.replace(/```\s*([^]+?.*?[^]+?[^]+?)```/g, ((e,t)=>`
    ${Ge(t)}
    `)).replace(/!\[(.*?)\]\((.*?)\)/g, ((e,t,n)=>`${t}`)).replace(/\[(.*?)\]\((.*?)\)/g, ((e,t,n)=>`
    ${t}`)).replace(/\n/g, "
    ")); + let s = Qe(i, { + allowedClasses: {}, + allowedSchemes: ["http", "https", "mailto", "data"], + allowedTags: ["a", "abbr", "article", "b", "blockquote", "br", "caption", "code", "del", "details", "div", "em", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "img", "ins", "kbd", "li", "main", "mark", "ol", "p", "pre", "section", "span", "strike", "strong", "sub", "summary", "sup", "table", "tbody", "td", "th", "thead", "tr", "u", "ul"], + allowedAttributes: { + "*": ["title", "accesskey"], + a: ["href", "name", "target", "aria-label", "rel"], + img: ["src", "alt", "title", "atk-emoticon", "aria-label"], + code: ["class"], + span: ["class", "style"] + }, + filter: e=>([["code", /^hljs\W+language-(.*)$/], ["span", /^(hljs-.*)$/]].forEach((([t,n])=>{ + e.tag === t && e.attrs.class && !n.test(e.attrs.class) && delete e.attrs.class + } + )), + "span" === e.tag && e.attrs.style && !/^color:(\W+)?#[0-9a-f]{3,6};?$/i.test(e.attrs.style) && delete e.attrs.style, + !0) + }); + return e.markedReplacers.forEach((e=>{ + "function" == typeof e && (s = e(s)) + } + )), + s + } + const Je = { + placeholder: "Leave a comment", + noComment: "No Comment", + send: "Send", + save: "Save", + nick: "Nickname", + email: "Email", + link: "Website", + emoticon: "Emoji", + preview: "Preview", + image: "Image", + refresh: "Refresh", + uploadFail: "Upload Failed", + commentFail: "Failed to comment", + restoredMsg: "Content has been restored", + onlyAdminCanReply: "Only admin can reply", + uploadLoginMsg: "Please fill in your name and email to upload", + counter: "{count} Comments", + sortLatest: "Latest", + sortOldest: "Oldest", + sortBest: "Best", + sortAuthor: "Author", + openComment: "Open Comment", + closeComment: "Close Comment", + listLoadFailMsg: "Failed to load comments", + listRetry: "Click to retry", + loadMore: "Load More", + admin: "Admin", + reply: "Reply", + voteUp: "Up", + voteDown: "Down", + voteFail: "Vote Failed", + readMore: "Read More", + actionConfirm: "Confirm", + collapse: "Collapse", + collapsed: "Collapsed", + collapsedMsg: "This comment has been collapsed", + expand: "Expand", + approved: "Approved", + pending: "Pending", + pendingMsg: "Pending, visible only to commenter.", + edit: "Edit", + editCancel: "Cancel Edit", + delete: "Delete", + deleteConfirm: "Confirm", + pin: "Pin", + unpin: "Unpin", + seconds: "seconds ago", + minutes: "minutes ago", + hours: "hours ago", + days: "days ago", + now: "just now", + adminCheck: "Enter admin password:", + captchaCheck: "Enter the CAPTCHA to continue:", + confirm: "Confirm", + cancel: "Cancel", + msgCenter: "Messages", + ctrlCenter: "Admin", + frontend: "Frontend", + backend: "Backend", + loading: "Loading", + loadFail: "Load Failed", + editing: "Editing", + editFail: "Edit Failed", + deleting: "Deleting", + deleteFail: "Delete Failed", + reqGot: "Request got", + reqAborted: "Request timed out or terminated unexpectedly" + } + , et = "ArtalkI18n" + , tt = { + en: Je, + "en-US": Je, + "zh-CN": { + placeholder: "键入内容...", + noComment: "「此时无声胜有声」", + send: "发送评论", + save: "保存评论", + nick: "昵称", + email: "邮箱", + link: "网址", + emoticon: '', + preview: '', + image: '', + refresh: '', + uploadFail: "上传失败", + commentFail: "评论失败", + restoredMsg: "内容已自动恢复", + onlyAdminCanReply: "仅管理员可评论", + uploadLoginMsg: "填入你的名字邮箱才能上传哦", + counter: "{count} 条评论", + sortLatest: "最新", + sortOldest: "最早", + sortBest: "最热", + sortAuthor: "作者", + openComment: "打开评论", + closeComment: "关闭评论", + listLoadFailMsg: "无法获取评论列表数据", + listRetry: "点击重新获取", + loadMore: "加载更多", + admin: "管理员", + reply: "回复", + voteUp: "赞同", + voteDown: "反对", + voteFail: "投票失败", + readMore: "阅读更多", + actionConfirm: "确认操作", + collapse: "折叠", + collapsed: "已折叠", + collapsedMsg: "该评论已被系统或管理员折叠", + expand: "展开", + approved: "已审", + pending: "待审", + pendingMsg: "审核中,仅本人可见。", + edit: "编辑", + editCancel: "取消编辑", + delete: "删除", + deleteConfirm: "确认删除", + pin: "置顶", + unpin: "取消置顶", + seconds: "秒前", + minutes: "分钟前", + hours: "小时前", + days: "天前", + now: "刚刚", + adminCheck: "键入密码来验证管理员身份:", + captchaCheck: "键入验证码继续:", + confirm: "确认", + cancel: "取消", + msgCenter: "通知中心", + ctrlCenter: "控制中心", + frontend: "前端", + backend: "后端", + loading: "加载中", + loadFail: "加载失败", + editing: "修改中", + editFail: "修改失败", + deleting: "删除中", + deleteFail: "删除失败", + reqGot: "请求响应", + reqAborted: "请求超时或意外终止" + } + }; + function nt(e) { + return e = e.replace(/^([a-zA-Z]+)(-[a-zA-Z]+)?$/, ((e,t,n)=>t.toLowerCase() + (n || "").toUpperCase())), + tt[e] ? tt[e] : window[et] && window[et][e] ? window[et][e] : tt.en + } + let it = "en" + , st = nt(it); + function rt(e) { + e !== it && (it = e, + st = "string" == typeof e ? nt(e) : e) + } + function at(e, t={}) { + let n = (null == st ? void 0 : st[e]) || e; + return n = n.replace(/\{\s*(\w+?)\s*\}/g, ((e,n)=>t[n] || "")), + n + } + const ot = "2.6.2"; + const lt = new class { + constructor() { + __publicField(this, "ctx"), + __publicField(this, "data"); + const e = JSON.parse(window.localStorage.getItem("ArtalkUser") || "{}"); + this.data = { + nick: e.nick || "", + email: e.email || "", + link: e.link || "", + token: e.token || "", + isAdmin: e.isAdmin || !1 + } + } + setContext(e) { + this.ctx = e + } + update(e={}) { + var t; + Object.entries(e).forEach((([e,t])=>{ + this.data[e] = t + } + )), + window.localStorage.setItem("ArtalkUser", JSON.stringify(this.data)), + null == (t = this.ctx) || t.trigger("user-changed", this.data) + } + logout() { + this.update({ + token: "", + isAdmin: !1 + }) + } + checkHasBasicUserInfo() { + return !!this.data.nick && !!this.data.email + } + } + , ct = window || {} + , dt = navigator || {}; + class ht { + constructor(e) { + __publicField(this, "comment"), + __publicField(this, "$el"), + __publicField(this, "$main"), + __publicField(this, "$header"), + __publicField(this, "$headerNick"), + __publicField(this, "$headerBadgeWrap"), + __publicField(this, "$body"), + __publicField(this, "$content"), + __publicField(this, "$childrenWrap"), + __publicField(this, "$actions"), + __publicField(this, "voteBtnUp"), + __publicField(this, "voteBtnDown"), + __publicField(this, "$replyTo"), + __publicField(this, "$replyAt"), + this.comment = e + } + get ctx() { + return this.comment.ctx + } + get data() { + return this.comment.getData() + } + get conf() { + return this.comment.conf + } + get cConf() { + return this.comment.getConf() + } + } + function ut(e) { + if (e.$headerNick = e.$el.querySelector(".atk-nick"), + e.data.link) { + const t = s(''); + t.innerText = e.data.nick, + t.href = h(e.data.link) ? e.data.link : `https://${e.data.link}`, + e.$headerNick.append(t) + } else + e.$headerNick.innerText = e.data.nick + } + function pt(e) { + e.$headerBadgeWrap = e.$el.querySelector(".atk-badge-wrap"), + e.$headerBadgeWrap.innerHTML = ""; + const t = e.data.badge_name + , n = e.data.badge_color; + if (t) { + const i = s(''); + i.innerText = t.replace("管理员", e.ctx.$t("admin")), + i.style.backgroundColor = n || "", + e.$headerBadgeWrap.append(i) + } + if (e.data.is_pinned) { + const t = s(`${e.ctx.$t("pin")}`); + e.$headerBadgeWrap.append(t) + } + } + function mt(e) { + const t = e.$el.querySelector(".atk-date"); + t.innerText = e.comment.getDateFormatted(), + t.setAttribute("data-atk-comment-date", String(+new Date(e.data.date))) + } + function gt(e) { + if (!e.ctx.conf.uaBadge && !e.data.ip_region) + return; + let t = e.$header.querySelector("atk-ua-wrap"); + if (t || (t = s(''), + e.$header.append(t)), + t.innerHTML = "", + e.data.ip_region) { + const n = s(''); + n.innerText = e.data.ip_region, + t.append(n) + } + if (e.ctx.conf.uaBadge) { + const {browser: n, os: i} = e.comment.getUserUA(); + if (String(n).trim()) { + const e = s(''); + e.innerText = n, + t.append(e) + } + if (String(i).trim()) { + const e = s(''); + e.innerText = i, + t.append(e) + } + } + } + class ft { + constructor(e, t) { + __publicField(this, "ctx"), + __publicField(this, "conf"), + __publicField(this, "$el"), + __publicField(this, "isLoading", !1), + __publicField(this, "msgRecTimer"), + __publicField(this, "msgRecTimerFunc"), + __publicField(this, "isConfirming", !1), + __publicField(this, "confirmRecTimer"), + this.ctx = e, + this.$el = s(''), + this.conf = "object" != typeof t ? { + text: t + } : t, + this.$el.innerText = this.getText(), + this.conf.adminOnly && this.$el.setAttribute("atk-only-admin-show", "") + } + get isMessaging() { + return !!this.msgRecTimer + } + appendTo(e) { + return e.append(this.$el), + this + } + getText() { + return "string" == typeof this.conf.text ? this.conf.text : this.conf.text() + } + setClick(e) { + this.$el.onclick = t=>{ + if (t.stopPropagation(), + !this.isLoading) { + if (this.conf.confirm && !this.isMessaging) { + const e = ()=>{ + this.isConfirming = !1, + this.$el.classList.remove("atk-btn-confirm"), + this.$el.innerText = this.getText() + } + ; + if (!this.isConfirming) + return this.isConfirming = !0, + this.$el.classList.add("atk-btn-confirm"), + this.$el.innerText = this.conf.confirmText || this.ctx.$t("actionConfirm"), + void (this.confirmRecTimer = window.setTimeout((()=>e()), 5e3)); + this.confirmRecTimer && window.clearTimeout(this.confirmRecTimer), + e() + } + if (this.msgRecTimer) + return this.fireMsgRecTimer(), + void this.clearMsgRecTimer(); + e() + } + } + } + updateText(e) { + e && (this.conf.text = e), + this.setLoading(!1), + this.$el.innerText = this.getText() + } + setLoading(e, t) { + this.isLoading !== e && (this.isLoading = e, + e ? (this.$el.classList.add("atk-btn-loading"), + this.$el.innerText = t || `${this.ctx.$t("loading")}...`) : (this.$el.classList.remove("atk-btn-loading"), + this.$el.innerText = this.getText())) + } + setError(e) { + this.setMsg(e, "atk-btn-error") + } + setWarn(e) { + this.setMsg(e, "atk-btn-warn") + } + setSuccess(e) { + this.setMsg(e, "atk-btn-success") + } + setMsg(e, t, n, i) { + this.setLoading(!1), + t && this.$el.classList.add(t), + this.$el.innerText = e, + this.setMsgRecTimer((()=>{ + this.$el.innerText = this.getText(), + t && this.$el.classList.remove(t), + i && i() + } + ), n || 2500) + } + setMsgRecTimer(e, t) { + this.fireMsgRecTimer(), + this.clearMsgRecTimer(), + this.msgRecTimerFunc = e, + this.msgRecTimer = window.setTimeout((()=>{ + e(), + this.clearMsgRecTimer() + } + ), t) + } + fireMsgRecTimer() { + this.msgRecTimerFunc && this.msgRecTimerFunc() + } + clearMsgRecTimer() { + this.msgRecTimer && window.clearTimeout(this.msgRecTimer), + this.msgRecTimer = void 0, + this.msgRecTimerFunc = void 0 + } + } + function kt(e) { + e.ctx.conf.vote && (e.voteBtnUp = new ft(e.ctx,(()=>`${e.ctx.$t("voteUp")} (${e.data.vote_up || 0})`)).appendTo(e.$actions), + e.voteBtnUp.setClick((()=>{ + e.comment.getActions().vote("up") + } + )), + e.ctx.conf.voteDown && (e.voteBtnDown = new ft(e.ctx,(()=>`${e.ctx.$t("voteDown")} (${e.data.vote_down || 0})`)).appendTo(e.$actions), + e.voteBtnDown.setClick((()=>{ + e.comment.getActions().vote("down") + } + )))) + } + function yt(e) { + if (!e.data.is_allow_reply) + return; + const t = s(`${e.ctx.$t("reply")}`); + e.$actions.append(t), + t.addEventListener("click", (t=>{ + t.stopPropagation(), + e.cConf.onReplyBtnClick ? e.cConf.onReplyBtnClick() : e.ctx.replyComment(e.data, e.$el) + } + )) + } + function bt(e) { + const t = new ft(e.ctx,{ + text: ()=>e.data.is_collapsed ? e.ctx.$t("expand") : e.ctx.$t("collapse"), + adminOnly: !0 + }); + t.appendTo(e.$actions), + t.setClick((()=>{ + e.comment.getActions().adminEdit("collapsed", t) + } + )) + } + function _t(e) { + const t = new ft(e.ctx,{ + text: ()=>e.data.is_pending ? e.ctx.$t("pending") : e.ctx.$t("approved"), + adminOnly: !0 + }); + t.appendTo(e.$actions), + t.setClick((()=>{ + e.comment.getActions().adminEdit("pending", t) + } + )) + } + function $t(e) { + const t = new ft(e.ctx,{ + text: ()=>e.data.is_pinned ? e.ctx.$t("unpin") : e.ctx.$t("pin"), + adminOnly: !0 + }); + t.appendTo(e.$actions), + t.setClick((()=>{ + e.comment.getActions().adminEdit("pinned", t) + } + )) + } + function xt(e) { + const t = new ft(e.ctx,{ + text: e.ctx.$t("edit"), + adminOnly: !0 + }); + t.appendTo(e.$actions), + t.setClick((()=>{ + e.ctx.editComment(e.data, e.$el) + } + )) + } + function vt(e) { + const t = new ft(e.ctx,{ + text: e.ctx.$t("delete"), + confirm: !0, + confirmText: e.ctx.$t("deleteConfirm"), + adminOnly: !0 + }); + t.appendTo(e.$actions), + t.setClick((()=>{ + e.comment.getActions().adminDelete(t) + } + )) + } + const wt = { + Avatar: function(e) { + const t = e.$el.querySelector(".atk-avatar") + , n = s("") + , i = e.conf.avatarURLBuilder; + if (n.src = i ? i(e.data) : e.comment.getGravatarURL(), + e.data.link) { + const i = s(''); + i.href = h(e.data.link) ? e.data.link : `https://${e.data.link}`, + i.append(n), + t.append(i) + } else + t.append(n) + }, + Header: function(e) { + Object.entries({ + renderNick: ut, + renderVerifyBadge: pt, + renderDate: mt, + renderUABadge: gt + }).forEach((([t,n])=>{ + n(e) + } + )) + }, + Content: function(e) { + if (!e.data.is_collapsed) + return e.$content.innerHTML = e.comment.getContentMarked(), + void e.$content.classList.remove("atk-hide", "atk-collapsed"); + e.$content.classList.add("atk-hide", "atk-type-collapsed"); + const t = s(`\n
    \n ${e.ctx.$t("collapsedMsg")}\n ${e.ctx.$t("expand")}\n
    `); + e.$body.insertAdjacentElement("beforeend", t); + const n = t.querySelector(".atk-show-btn"); + n.addEventListener("click", (t=>{ + t.stopPropagation(), + e.$content.classList.contains("atk-hide") ? (e.$content.innerHTML = e.comment.getContentMarked(), + e.$content.classList.remove("atk-hide"), + b(e.$content), + n.innerHTML = e.ctx.$t("collapse")) : (e.$content.innerHTML = "", + e.$content.classList.add("atk-hide"), + n.innerHTML = e.ctx.$t("expand")) + } + )) + }, + ReplyAt: function(e) { + e.cConf.isFlatMode || 0 === e.data.rid || e.cConf.replyTo && (e.$replyAt = s(''), + e.$replyAt.querySelector(".atk-nick").innerText = `${e.cConf.replyTo.nick}`, + e.$replyAt.onclick = ()=>{ + e.comment.getActions().goToReplyComment() + } + , + e.$headerBadgeWrap.insertAdjacentElement("afterend", e.$replyAt)) + }, + ReplyTo: function(e) { + if (!e.cConf.isFlatMode) + return; + if (!e.cConf.replyTo) + return; + e.$replyTo = s(`\n
    \n
    ${e.ctx.$t("reply")} :
    \n
    \n
    `); + const t = e.$replyTo.querySelector(".atk-nick"); + t.innerText = `@${e.cConf.replyTo.nick}`, + t.onclick = ()=>{ + e.comment.getActions().goToReplyComment() + } + ; + let n = Xe(e.ctx, e.cConf.replyTo.content); + e.cConf.replyTo.is_collapsed && (n = `[${e.ctx.$t("collapsed")}]`), + e.$replyTo.querySelector(".atk-content").innerHTML = n, + e.$body.prepend(e.$replyTo) + }, + Pending: function(e) { + if (!e.data.is_pending) + return; + const t = s(`
    ${e.ctx.$t("pendingMsg")}
    `); + e.$body.prepend(t) + }, + Actions: function(e) { + Object.entries({ + renderVote: kt, + renderReply: yt, + renderCollapse: bt, + renderModerator: _t, + renderPin: $t, + renderEdit: xt, + renderDel: vt + }).forEach((([t,n])=>{ + n(e) + } + )) + } + }; + function Ct(e, t) { + t.forEach((({el: t, max: n, imgContains: i})=>{ + const a = ()=>{ + t && (e.scrollable ? function(e) { + if (!e.el) + return; + if (e.el.classList.contains(Et)) + return; + e.el.classList.add(Et), + e.el.style.height = `${e.maxHeight}px` + }({ + el: t, + maxHeight: n + }) : function(e) { + if (!e.el) + return; + if (!e.maxHeight) + return; + if (e.el.classList.contains(St)) + return; + e.el.classList.add(St), + e.el.style.height = `${e.maxHeight}px`, + e.el.style.overflow = "hidden"; + const t = s(`
    ${at("readMore")}`); + t.onclick = t=>{ + t.stopPropagation(), + Tt(e.el), + e.postBtnClick && e.postBtnClick(t) + } + , + e.el.append(t) + }({ + el: t, + maxHeight: n, + postBtnClick: e.postExpandBtnClick + })) + } + , o = ()=>{ + t && r(t) > n && a() + } + ; + o(), + i && t && function(e, t) { + if (!e) + return; + const n = e.getElementsByTagName("img"); + if (!n.length) + return; + let i = n.length; + for (let s = 0; s < n.length; s++) + n[s].complete ? i-- : n[s].addEventListener("load", (()=>{ + i--, + 0 === i && t() + } + )), + 0 === i && t() + }(t, (()=>o())) + } + )) + } + const St = "atk-height-limit"; + function Tt(e) { + e && e.classList.contains(St) && (e.classList.remove(St), + Array.from(e.children).forEach((e=>{ + e.classList.contains("atk-height-limit-btn") && e.remove() + } + )), + e.style.height = "", + e.style.overflow = "") + } + const Et = "atk-height-limit-scroll"; + class Lt extends ht { + constructor(e) { + super(e) + } + render() { + var e; + return this.$el = s('
    \n
    \n
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n'), + this.$main = this.$el.querySelector(".atk-main"), + this.$header = this.$el.querySelector(".atk-header"), + this.$body = this.$el.querySelector(".atk-body"), + this.$content = this.$body.querySelector(".atk-content"), + this.$actions = this.$el.querySelector(".atk-actions"), + this.$el.setAttribute("id", `atk-comment-${this.data.id}`), + e = this, + Object.entries(wt).forEach((([t,n])=>{ + n(e) + } + )), + this.recoveryChildrenWrap(), + this.$el + } + checkHeightLimit() { + const e = this.ctx.conf.heightLimit; + if (!e || !e.content || !e.children) + return; + const t = e.content + , n = e.children; + Ct({ + postExpandBtnClick: ()=>{ + const e = this.comment.getChildren(); + 1 === e.length && Tt(e[0].getRender().$content) + } + , + scrollable: e.scrollable + }, [{ + el: this.$content, + max: t, + imgContains: !0 + }, { + el: this.$replyTo, + max: t, + imgContains: !0 + }, { + el: this.$childrenWrap, + max: n, + imgContains: !1 + }]) + } + heightLimitRemoveForChildren() { + this.$childrenWrap && Tt(this.$childrenWrap) + } + playFadeAnim() { + b(this.comment.getRender().$el) + } + playFadeAnimForBody() { + b(this.comment.getRender().$body) + } + getChildrenWrap() { + return this.$childrenWrap + } + renderChildrenWrap() { + return this.$childrenWrap || (this.$childrenWrap = s('
    '), + this.$main.append(this.$childrenWrap)), + this.$childrenWrap + } + recoveryChildrenWrap() { + this.$childrenWrap && this.$main.append(this.$childrenWrap) + } + setUnread(e) { + e ? this.$el.classList.add("atk-unread") : this.$el.classList.remove("atk-unread") + } + setOpenable(e) { + e ? this.$el.classList.add("atk-openable") : this.$el.classList.remove("atk-openable") + } + setOpenURL(e) { + this.setOpenable(!0), + this.$el.onclick = t=>{ + t.preventDefault(), + window.open(e), + this.cConf.openEvt && this.cConf.openEvt() + } + } + setOpenAction(e) { + this.setOpenable(!0), + this.$el.onclick = t=>{ + t.preventDefault(), + e() + } + } + } + class At { + constructor(e) { + __publicField(this, "comment"), + this.comment = e + } + get ctx() { + return this.comment.ctx + } + get data() { + return this.comment.getData() + } + get cConf() { + return this.comment.getConf() + } + vote(e) { + const t = "up" === e ? this.comment.getRender().voteBtnUp : this.comment.getRender().voteBtnDown; + this.ctx.getApi().comment.vote(this.data.id, `comment_ ${e}`).then((e=>{ + var t, n; + this.data.vote_up = e.up, + this.data.vote_down = e.down, + null == (t = this.comment.getRender().voteBtnUp) || t.updateText(), + null == (n = this.comment.getRender().voteBtnDown) || n.updateText() + } + )).catch((e=>{ + null == t || t.setError(this.ctx.$t("voteFail")), + console.log(e) + } + )) + } + adminEdit(e, t) { + if (t.isLoading) + return; + t.setLoading(!0, `${this.ctx.$t("editing")}...`); + const n = __spreadValues({}, this.data); + "collapsed" === e ? n.is_collapsed = !n.is_collapsed : "pending" === e ? n.is_pending = !n.is_pending : "pinned" === e && (n.is_pinned = !n.is_pinned), + this.ctx.getApi().comment.commentEdit(n).then((e=>{ + t.setLoading(!1), + this.comment.setData(e), + this.ctx.listRefreshUI() + } + )).catch((e=>{ + console.error(e), + t.setError(this.ctx.$t("editFail")) + } + )) + } + adminDelete(e) { + e.isLoading || (e.setLoading(!0, `${this.ctx.$t("deleting")}...`), + this.ctx.getApi().comment.commentDel(this.data.id, this.data.site_name).then((()=>{ + e.setLoading(!1), + this.cConf.onDelete && this.cConf.onDelete(this.comment) + } + )).catch((t=>{ + console.error(t), + e.setError(this.ctx.$t("deleteFail")) + } + ))) + } + goToReplyComment() { + const e = window.location.hash + , t = `#atk-comment-${this.data.rid}`; + window.location.hash = t, + t === e && window.dispatchEvent(new Event("hashchange")) + } + } + class Ft extends m { + constructor(e, t, n) { + super(e), + __publicField(this, "renderInstance"), + __publicField(this, "actionInstance"), + __publicField(this, "data"), + __publicField(this, "cConf"), + __publicField(this, "parent"), + __publicField(this, "children", []), + __publicField(this, "nestCurt"), + __publicField(this, "nestMax"), + this.nestMax = e.conf.nestMax || 3, + this.cConf = n, + this.data = __spreadValues({}, t), + this.data.date = this.data.date.replace(/-/g, "/"), + this.parent = null, + this.nestCurt = 1, + this.actionInstance = new At(this), + this.renderInstance = new Lt(this) + } + render() { + const e = this.renderInstance.render(); + this.$el && this.$el.replaceWith(e), + this.$el = e, + this.cConf.afterRender && this.cConf.afterRender() + } + getActions() { + return this.actionInstance + } + getRender() { + return this.renderInstance + } + getData() { + return this.data + } + setData(e) { + this.data = e, + this.render(), + this.getRender().playFadeAnimForBody() + } + getParent() { + return this.parent + } + getChildren() { + return this.children + } + getNestCurt() { + return this.nestCurt + } + getIsRoot() { + return 0 === this.data.rid + } + getID() { + return this.data.id + } + putChild(e, t="append") { + e.parent = this, + e.nestCurt = this.nestCurt + 1, + this.children.push(e); + const n = this.getChildrenEl(); + "append" === t ? n.append(e.getEl()) : "prepend" === t && n.prepend(e.getEl()), + e.getRender().playFadeAnim(), + e.getRender().checkHeightLimit() + } + getChildrenEl() { + let e = this.getRender().getChildrenWrap(); + return e || (e = this.nestCurt < this.nestMax ? this.getRender().renderChildrenWrap() : this.parent.getChildrenEl()), + e + } + getParents() { + const e = [] + , t = n=>{ + n.parent && (e.push(n.parent), + t(n.parent)) + } + ; + return t(this), + e + } + getEl() { + return this.$el + } + getGravatarURL() { + return function(e, t) { + const {mirror: n, params: i} = e.conf.gravatar; + return `${n.replace(/\/$/, "")}/${t}?${i.replace(/^\?/, "")}` + }(this.ctx, this.data.email_encrypted) + } + getContentMarked() { + return Xe(this.ctx, this.data.content) + } + getDateFormatted() { + return c(new Date(this.data.date), this.ctx) + } + getUserUA() { + const e = function(e) { + const t = String(e || dt.userAgent) + , n = { + os: "", + osVersion: "", + engine: "", + browser: "", + device: "", + language: "", + version: "" + } + , i = { + Trident: t.includes("Trident") || t.includes("NET CLR"), + Presto: t.includes("Presto"), + WebKit: t.includes("AppleWebKit"), + Gecko: t.includes("Gecko/") + } + , s = { + Safari: t.includes("Safari"), + Chrome: t.includes("Chrome") || t.includes("CriOS"), + IE: t.includes("MSIE") || t.includes("Trident"), + Edge: t.includes("Edge") || t.includes("Edg"), + Firefox: t.includes("Firefox") || t.includes("FxiOS"), + "Firefox Focus": t.includes("Focus"), + Chromium: t.includes("Chromium"), + Opera: t.includes("Opera") || t.includes("OPR"), + Vivaldi: t.includes("Vivaldi"), + Yandex: t.includes("YaBrowser"), + Kindle: t.includes("Kindle") || t.includes("Silk/"), + 360: t.includes("360EE") || t.includes("360SE"), + UC: t.includes("UC") || t.includes(" UBrowser"), + QQBrowser: t.includes("QQBrowser"), + QQ: t.includes("QQ/"), + Baidu: t.includes("Baidu") || t.includes("BIDUBrowser"), + Maxthon: t.includes("Maxthon"), + Sogou: t.includes("MetaSr") || t.includes("Sogou"), + LBBROWSER: t.includes("LBBROWSER"), + "2345Explorer": t.includes("2345Explorer"), + TheWorld: t.includes("TheWorld"), + MIUI: t.includes("MiuiBrowser"), + Quark: t.includes("Quark"), + Qiyu: t.includes("Qiyu"), + Wechat: t.includes("MicroMessenger"), + Taobao: t.includes("AliApp(TB"), + Alipay: t.includes("AliApp(AP"), + Weibo: t.includes("Weibo"), + Douban: t.includes("com.douban.frodo"), + Suning: t.includes("SNEBUY-APP"), + iQiYi: t.includes("IqiyiApp") + } + , r = { + Windows: t.includes("Windows"), + Linux: t.includes("Linux") || t.includes("X11"), + macOS: t.includes("Macintosh"), + Android: t.includes("Android") || t.includes("Adr"), + Ubuntu: t.includes("Ubuntu"), + FreeBSD: t.includes("FreeBSD"), + Debian: t.includes("Debian"), + "Windows Phone": t.includes("IEMobile") || t.includes("Windows Phone"), + BlackBerry: t.includes("BlackBerry") || t.includes("RIM"), + MeeGo: t.includes("MeeGo"), + Symbian: t.includes("Symbian"), + iOS: t.includes("like Mac OS X"), + "Chrome OS": t.includes("CrOS"), + WebOS: t.includes("hpwOS") + } + , a = { + Mobile: t.includes("Mobi") || t.includes("iPh") || t.includes("480"), + Tablet: t.includes("Tablet") || t.includes("Pad") || t.includes("Nexus 7") + }; + a.Mobile ? a.Mobile = !t.includes("iPad") : s.Chrome && t.includes("Edg") ? (s.Chrome = !1, + s.Edge = !0) : ct.showModalDialog && ct.chrome && (s.Chrome = !1, + s[360] = !0), + n.device = "PC", + n.language = (()=>{ + const e = (dt.browserLanguage || dt.language).split("-"); + return e[1] && (e[1] = e[1].toUpperCase()), + e.join("_") + } + )(); + const o = { + engine: i, + browser: s, + os: r, + device: a + }; + Object.entries(o).forEach((([e,t])=>{ + Object.entries(t).forEach((([t,i])=>{ + !0 === i && (n[e] = t) + } + )) + } + )); + const l = { + Windows: ()=>{ + const e = t.replace(/^.*Windows NT ([\d.]+);.*$/, "$1"); + return { + 6.4: "10", + 6.3: "8.1", + 6.2: "8", + 6.1: "7", + "6.0": "Vista", + 5.2: "XP", + 5.1: "XP", + "5.0": "2000", + "10.0": "10", + "11.0": "11" + }[e] || e + } + , + Android: ()=>t.replace(/^.*Android ([\d.]+);.*$/, "$1"), + iOS: ()=>t.replace(/^.*OS ([\d_]+) like.*$/, "$1").replace(/_/g, "."), + Debian: ()=>t.replace(/^.*Debian\/([\d.]+).*$/, "$1"), + "Windows Phone": ()=>t.replace(/^.*Windows Phone( OS)? ([\d.]+);.*$/, "$2"), + macOS: ()=>t.replace(/^.*Mac OS X ([\d_]+).*$/, "$1").replace(/_/g, "."), + WebOS: ()=>t.replace(/^.*hpwOS\/([\d.]+);.*$/, "$1") + }; + n.osVersion = "", + l[n.os] && (n.osVersion = l[n.os](), + n.osVersion === t && (n.osVersion = "")); + const c = { + Safari: ()=>t.replace(/^.*Version\/([\d.]+).*$/, "$1"), + Chrome: ()=>t.replace(/^.*Chrome\/([\d.]+).*$/, "$1").replace(/^.*CriOS\/([\d.]+).*$/, "$1"), + IE: ()=>t.replace(/^.*MSIE ([\d.]+).*$/, "$1").replace(/^.*rv:([\d.]+).*$/, "$1"), + Edge: ()=>t.replace(/^.*(Edge|Edg|Edg[A-Z]{1})\/([\d.]+).*$/, "$2"), + Firefox: ()=>t.replace(/^.*Firefox\/([\d.]+).*$/, "$1").replace(/^.*FxiOS\/([\d.]+).*$/, "$1"), + "Firefox Focus": ()=>t.replace(/^.*Focus\/([\d.]+).*$/, "$1"), + Chromium: ()=>t.replace(/^.*Chromium\/([\d.]+).*$/, "$1"), + Opera: ()=>t.replace(/^.*Opera\/([\d.]+).*$/, "$1").replace(/^.*OPR\/([\d.]+).*$/, "$1"), + Vivaldi: ()=>t.replace(/^.*Vivaldi\/([\d.]+).*$/, "$1"), + Yandex: ()=>t.replace(/^.*YaBrowser\/([\d.]+).*$/, "$1"), + Kindle: ()=>t.replace(/^.*Version\/([\d.]+).*$/, "$1"), + Maxthon: ()=>t.replace(/^.*Maxthon\/([\d.]+).*$/, "$1"), + QQBrowser: ()=>t.replace(/^.*QQBrowser\/([\d.]+).*$/, "$1"), + QQ: ()=>t.replace(/^.*QQ\/([\d.]+).*$/, "$1"), + Baidu: ()=>t.replace(/^.*BIDUBrowser[\s/]([\d.]+).*$/, "$1"), + UC: ()=>t.replace(/^.*UC?Browser\/([\d.]+).*$/, "$1"), + Sogou: ()=>t.replace(/^.*SE ([\d.X]+).*$/, "$1").replace(/^.*SogouMobileBrowser\/([\d.]+).*$/, "$1"), + "2345Explorer": ()=>t.replace(/^.*2345Explorer\/([\d.]+).*$/, "$1"), + TheWorld: ()=>t.replace(/^.*TheWorld ([\d.]+).*$/, "$1"), + MIUI: ()=>t.replace(/^.*MiuiBrowser\/([\d.]+).*$/, "$1"), + Quark: ()=>t.replace(/^.*Quark\/([\d.]+).*$/, "$1"), + Qiyu: ()=>t.replace(/^.*Qiyu\/([\d.]+).*$/, "$1"), + Wechat: ()=>t.replace(/^.*MicroMessenger\/([\d.]+).*$/, "$1"), + Taobao: ()=>t.replace(/^.*AliApp\(TB\/([\d.]+).*$/, "$1"), + Alipay: ()=>t.replace(/^.*AliApp\(AP\/([\d.]+).*$/, "$1"), + Weibo: ()=>t.replace(/^.*weibo__([\d.]+).*$/, "$1"), + Douban: ()=>t.replace(/^.*com.douban.frodo\/([\d.]+).*$/, "$1"), + Suning: ()=>t.replace(/^.*SNEBUY-APP([\d.]+).*$/, "$1"), + iQiYi: ()=>t.replace(/^.*IqiyiVersion\/([\d.]+).*$/, "$1") + }; + return n.version = "", + c[n.browser] && (n.version = c[n.browser](), + n.version === t && (n.version = "")), + n.version.indexOf(".") && (n.version = n.version.substring(0, n.version.indexOf("."))), + "iOS" === n.os && t.includes("iPad") ? n.os = "iPadOS" : "Edge" !== n.browser || t.includes("Edg") ? "MIUI" === n.browser ? n.os = "Android" : "Chrome" === n.browser && Number(n.version) > 27 || "Opera" === n.browser && Number(n.version) > 12 || "Yandex" === n.browser ? n.engine = "Blink" : void 0 === n.browser && (n.browser = "Unknow App") : n.engine = "EdgeHTML", + n + }(this.data.ua); + return { + browser: `${e.browser} ${e.version}`, + os: `${e.os} ${e.osVersion}` + } + } + getConf() { + return this.cConf + } + } + class Ot { + constructor(e, t) { + __publicField(this, "conf"), + __publicField(this, "total"), + __publicField(this, "$el"), + __publicField(this, "$input"), + __publicField(this, "inputTimer"), + __publicField(this, "$prevBtn"), + __publicField(this, "$nextBtn"), + __publicField(this, "page", 1), + this.total = e, + this.conf = t, + this.$el = s('
    \n
    \n
    Prev
    \n \n
    Next
    \n
    \n
    '), + this.$input = this.$el.querySelector(".atk-input"), + this.$input.value = `${this.page}`, + this.$input.oninput = ()=>this.input(), + this.$input.onkeydown = e=>this.keydown(e), + this.$prevBtn = this.$el.querySelector(".atk-btn-prev"), + this.$nextBtn = this.$el.querySelector(".atk-btn-next"), + this.$prevBtn.onclick = ()=>this.prev(), + this.$nextBtn.onclick = ()=>this.next(), + this.checkDisabled() + } + get pageSize() { + return this.conf.pageSize + } + get offset() { + return this.pageSize * (this.page - 1) + } + get maxPage() { + return Math.ceil(this.total / this.pageSize) + } + update(e, t) { + this.page = Math.ceil(e / this.pageSize) + 1, + this.total = t, + this.setInput(this.page), + this.checkDisabled() + } + setInput(e) { + this.$input.value = `${e}` + } + input(e=!1) { + window.clearTimeout(this.inputTimer); + const t = this.$input.value.trim() + , n = ()=>{ + if ("" === t) + return void this.setInput(this.page); + let e = Number(t); + Number.isNaN(e) || e < 1 ? this.setInput(this.page) : (e > this.maxPage && (this.setInput(this.maxPage), + e = this.maxPage), + this.change(e)) + } + ; + e ? n() : this.inputTimer = window.setTimeout((()=>n()), 800) + } + prev() { + const e = this.page - 1; + e < 1 || this.change(e) + } + next() { + const e = this.page + 1; + e > this.maxPage || this.change(e) + } + change(e) { + this.page = e, + this.conf.onChange(this.offset), + this.setInput(e), + this.checkDisabled() + } + checkDisabled() { + this.page + 1 > this.maxPage ? this.$nextBtn.classList.add("atk-disabled") : this.$nextBtn.classList.remove("atk-disabled"), + this.page - 1 < 1 ? this.$prevBtn.classList.add("atk-disabled") : this.$prevBtn.classList.remove("atk-disabled") + } + keydown(e) { + const t = e.keyCode || e.which; + if (38 === t) { + const e = Number(this.$input.value) + 1; + if (e > this.maxPage) + return; + this.setInput(e), + this.input() + } else if (40 === t) { + const e = Number(this.$input.value) - 1; + if (e < 1) + return; + this.setInput(e), + this.input() + } else + 13 === t && this.input(!0) + } + setLoading(e) { + e ? g(this.$el) : f(this.$el) + } + } + const Mt = { + createInstance(e) { + const t = new Ot(e.total,{ + pageSize: e.pageSize, + onChange: t=>__async(this, null, (function*() { + if (!0 === e.list.conf.editorTravel && e.list.ctx.editorTravelBack(), + yield e.list.fetchComments(t), + e.list.repositionAt) { + (e.list.scrollListenerAt || window).scroll({ + top: e.list.repositionAt ? o(e.list.repositionAt).top : 0, + left: 0 + }) + } + } + )) + }); + return [t, t.$el] + }, + setLoading(e) { + this.instance.setLoading(e) + }, + update(e, t) { + this.instance.update(e, t) + }, + next() { + this.instance.next() + } + }; + class Rt { + constructor(e) { + __publicField(this, "conf"), + __publicField(this, "$el"), + __publicField(this, "$loading"), + __publicField(this, "$text"), + __publicField(this, "offset", 0), + __publicField(this, "total", 0), + __publicField(this, "origText", "Load More"), + this.conf = e, + this.origText = this.conf.text || this.origText, + this.$el = s(``), + this.$loading = this.$el.querySelector(".atk-loading-icon"), + this.$text = this.$el.querySelector(".atk-text"), + this.$el.onclick = ()=>{ + this.click() + } + } + get hasMore() { + return this.total > this.offset + this.conf.pageSize + } + click() { + this.hasMore && this.conf.onClick(this.offset + this.conf.pageSize), + this.checkDisabled() + } + show() { + this.$el.style.display = "" + } + hide() { + this.$el.style.display = "none" + } + setLoading(e) { + this.$loading.style.display = e ? "" : "none", + this.$text.style.display = e ? "none" : "" + } + showErr(e) { + this.setLoading(!1), + this.$text.innerText = e, + this.$el.classList.add("atk-err"), + window.setTimeout((()=>{ + this.$text.innerText = this.origText, + this.$el.classList.remove("atk-err") + } + ), 2e3) + } + update(e, t) { + this.offset = e, + this.total = t, + this.checkDisabled() + } + checkDisabled() { + this.hasMore ? this.show() : this.hide() + } + } + const Pt = { + pagination: Mt, + "read-more": { + createInstance(e) { + const t = new Rt({ + pageSize: e.pageSize, + onClick: t=>__async(this, null, (function*() { + yield e.list.fetchComments(t) + } + )), + text: at("loadMore") + }); + if (e.list.conf.pagination.autoLoad) { + const n = e.list.scrollListenerAt || document; + this.autoLoadScrollEvent && n.removeEventListener("scroll", this.autoLoadScrollEvent), + this.autoLoadScrollEvent = ()=>{ + if ("read-more" !== e.mode || !(null == t ? void 0 : t.hasMore) || e.list.getLoading()) + return; + const n = e.list.$el.querySelector(".atk-list-comments-wrap > .atk-comment-wrap:nth-last-child(3)"); + n && function(e, t=document.documentElement) { + const n = t.clientHeight + , i = t.scrollTop + , s = i + n + , r = e.getBoundingClientRect(); + return r.top + i + r.height <= s + }(n, e.list.scrollListenerAt) && t.click() + } + , + n.addEventListener("scroll", this.autoLoadScrollEvent) + } + return [t, t.$el] + }, + setLoading(e) { + this.instance.setLoading(e) + }, + update(e, t) { + this.instance.update(e, t) + }, + showErr(e) { + this.instance.showErr(e) + }, + next() { + this.instance.click() + } + } + }; + class Bt { + constructor(e) { + __publicField(this, "conf"), + this.conf = e, + this.init() + } + getAdaptor() { + return Pt[this.conf.mode] + } + init() { + const e = this.getAdaptor() + , [t,n] = e.createInstance(this.conf); + e.instance = t, + e.el = n, + this.conf.list.$el.append(e.el) + } + setLoading(e) { + this.getAdaptor().setLoading(e) + } + update(e, t) { + this.getAdaptor().update(e, t) + } + getEl() { + return this.getAdaptor().el + } + showErr(e) { + const t = this.getAdaptor() + , n = t.showErr; + n && n.bind(t)(e) + } + setMode(e) { + e !== this.conf.mode && (this.getEl().remove(), + this.conf.mode = e, + this.init()) + } + next() { + this.getAdaptor().next() + } + } + function It(e, t, n) { + const i = function(e, t) { + const n = e.split(".") + , i = t.split("."); + for (let s = 0; s < 3; s++) { + const e = Number(n[s]) + , t = Number(i[s]); + if (e > t) + return 1; + if (t > e) + return -1; + if (!Number.isNaN(e) && Number.isNaN(t)) + return 1; + if (Number.isNaN(e) && !Number.isNaN(t)) + return -1 + } + return 0 + }(t, n); + if (0 !== i) { + const r = s(`
    请更新 Artalk ${at(i < 0 ? "frontend" : "backend")}以获得完整体验 (帮助文档)

    当前版本:${at("frontend")} ${t} / ${at("backend")} ${n}

    `) + , a = s('忽略'); + return a.onclick = ()=>{ + _(e.$el.parentElement, null), + e.ctx.conf.versionCheck = !1, + e.fetchComments(0) + } + , + r.append(a), + _(e.$el.parentElement, r, 'Artalk Warn'), + !0 + } + return !1 + } + function Ut(e) { + const {$dropdownWrap: t, dropdownList: n} = e; + if (t.querySelector(".atk-dropdown")) + return; + t.classList.add("atk-dropdown-wrap"), + t.append(s('')); + let i = 0; + const r = s(''); + n.forEach(((e,t)=>{ + const n = e[0] + , a = e[1] + , o = s('
  • ') + , l = o.querySelector("span"); + l.innerText = n, + l.onclick = ()=>{ + ((e,t,n,s)=>{ + s(), + i = e, + r.querySelectorAll(".active").forEach((e=>{ + e.classList.remove("active") + } + )), + t.classList.add("active"), + r.style.display = "none", + setTimeout((()=>{ + r.style.display = "" + } + ), 80) + } + )(t, o, 0, a) + } + , + r.append(o), + t === i && o.classList.add("active") + } + )), + t.append(r) + } + const Dt = { + el: "", + pageKey: "", + pageTitle: "", + server: "", + site: "", + placeholder: "", + noComment: "", + sendBtn: "", + darkMode: !1, + editorTravel: !0, + flatMode: "auto", + nestMax: 2, + nestSort: "DATE_ASC", + emoticons: "https://cdn.jsdelivr.net/gh/ArtalkJS/Emoticons/grps/default.json", + vote: !0, + voteDown: !1, + uaBadge: !0, + listSort: !0, + preview: !0, + countEl: "#ArtalkCount", + pvEl: "#ArtalkPV", + gravatar: { + mirror: "https://cravatar.cn/avatar/", + params: "d=mp&s=240" + }, + pagination: { + pageSize: 20, + readMore: !0, + autoLoad: !0 + }, + heightLimit: { + content: 300, + children: 400, + scrollable: !1 + }, + imgUpload: !0, + reqTimeout: 15e3, + versionCheck: !0, + useBackendConf: !0, + locale: "zh-CN" + }; + function qt(e) { + const t = p(Dt, e); + if ("string" == typeof t.el && t.el) + try { + const e = document.querySelector(t.el); + if (!e) + throw Error(`Target element "${t.el}" was not found.`); + t.el = e + } catch (n) { + throw console.error(n), + new Error("Please check your Artalk `el` config.") + } + return t.server = t.server.replace(/\/$/, "").replace(/\/api\/?$/, ""), + t.pageKey || (t.pageKey = `${window.location.pathname}`), + t.pageTitle || (t.pageTitle = `${document.title}`), + "auto" === t.locale && (t.locale = navigator.language), + t + } + function zt(e) { + const t = ["el", "pageKey", "pageTitle", "server", "site", "darkMode"]; + return Object.keys(e).forEach((n=>{ + t.includes(n) && delete e[n] + } + )), + e.emoticons && "string" == typeof e.emoticons && (e.emoticons = e.emoticons.trim(), + e.emoticons.startsWith("[") || e.emoticons.startsWith("{") ? e.emoticons = JSON.parse(e.emoticons) : "false" === e.emoticons && (e.emoticons = !1)), + e + } + class jt extends m { + constructor(e) { + super(e), + __publicField(this, "$commentsWrap"), + __publicField(this, "data"), + __publicField(this, "isLoading", !1), + __publicField(this, "confLoaded", !1), + __publicField(this, "noCommentText"), + __publicField(this, "_nestSortBy"), + __publicField(this, "_flatMode"), + __publicField(this, "_pageMode"), + __publicField(this, "pgHolder"), + __publicField(this, "_pageSize"), + __publicField(this, "scrollListenerAt"), + __publicField(this, "repositionAt"), + __publicField(this, "renderComment"), + __publicField(this, "paramsEditor"), + __publicField(this, "onAfterLoad"), + __publicField(this, "unread", []), + __publicField(this, "unreadHighlight"), + this.$el = s('
    \n
    \n
    '), + this.$commentsWrap = this.$el.querySelector(".atk-list-comments-wrap"), + window.setInterval((()=>{ + this.$el.querySelectorAll("[data-atk-comment-date]").forEach((e=>{ + const t = e.getAttribute("data-atk-comment-date"); + e.innerText = c(new Date(Number(t)), this.ctx) + } + )) + } + ), 3e4), + this.ctx.on("conf-loaded", (()=>{} + )) + } + get nestSortBy() { + return this._nestSortBy || this.ctx.conf.nestSort || "DATE_ASC" + } + set nestSortBy(e) { + this._nestSortBy = e + } + get flatMode() { + return void 0 !== this._flatMode ? this._flatMode : !0 === this.ctx.conf.flatMode || Number(this.ctx.conf.nestMax) <= 1 || !("auto" !== this.ctx.conf.flatMode || !window.matchMedia("(max-width: 768px)").matches) + } + set flatMode(e) { + this._flatMode = e + } + get pageMode() { + return this._pageMode || (this.conf.pagination.readMore ? "read-more" : "pagination") + } + set pageMode(e) { + var t; + this._pageMode = e, + null == (t = this.pgHolder) || t.setMode(this._pageMode) + } + get pageSize() { + return this._pageSize || this.conf.pagination.pageSize + } + set pageSize(e) { + this._pageSize = e + } + getData() { + return this.data + } + clearData() { + this.data = void 0 + } + getLoading() { + return this.isLoading + } + getCommentsWrapEl() { + return this.$commentsWrap + } + setLoading(e, t=!1) { + var n; + this.isLoading = e, + t ? function(e, t) { + e ? g(t) : f(t) + }(e, this.$el) : null == (n = this.pgHolder) || n.setLoading(e) + } + fetchComments(e) { + return __async(this, null, (function*() { + if (this.isLoading) + return; + const t = 0 === e + , n = e=>this.setLoading(e, t); + let i; + n(!0), + this.ctx.trigger("list-load"), + ("read-more" === this.pageMode && t || "pagination" === this.pageMode) && this.ctx.clearAllComments(); + try { + i = yield this.ctx.getApi().comment.get(e, this.pageSize, this.flatMode, this.paramsEditor) + } catch (s) { + throw this.onError(s.msg || String(s), e, s.data), + s + } finally { + n(!1) + } + _(this.$el, null); + try { + this.onLoad(i, e) + } catch (s) { + throw this.onError(String(s), e), + s + } finally { + n(!1) + } + } + )) + } + onLoad(e, t) { + if (this.data = e, + !this.confLoaded) { + const t = zt(e.conf.frontend_conf); + this.conf.useBackendConf ? this.ctx.updateConf(t) : this.ctx.updateConf({}), + this.confLoaded = !0 + } + this.ctx.conf.versionCheck && It(this, ot, e.api_version.version) || (this.importComments(e.comments), + this.refreshPagination(t, this.flatMode ? e.total : e.total_roots), + this.refreshUI(), + this.ctx.updateNotifies(e.unread || []), + this.ctx.trigger("list-loaded"), + this.onAfterLoad && this.onAfterLoad(e)) + } + refreshPagination(e, t) { + var n; + this.pgHolder || (this.pgHolder = new Bt({ + list: this, + mode: this.pageMode, + pageSize: this.pageSize, + total: t + })), + null == (n = this.pgHolder) || n.update(e, t) + } + onError(e, t, n) { + var i; + this.confLoaded || this.ctx.updateConf({}), + e = String(e), + console.error(e), + 0 === t || "read-more" !== this.pageMode ? _(this.$el, function(e, t, n) { + const i = s(`${t},${at("listLoadFailMsg")}
    `) + , r = s(`${at("listRetry")}`); + r.onclick = ()=>e.fetchComments(0), + i.appendChild(r); + const a = s(' | 打开控制台'); + i.appendChild(a), + lt.data.isAdmin || a.classList.add("atk-hide"); + let o = ""; + if (null == n ? void 0 : n.err_no_site) { + const t = { + create_name: e.ctx.conf.site, + create_urls: `${window.location.protocol}//${window.location.host}` + }; + o = `sites|${JSON.stringify(t)}` + } + return a.onclick = ()=>e.ctx.showSidebar({ + view: o + }), + i + }(this, e, n)) : null == (i = this.pgHolder) || i.showErr(this.$t("loadFail")) + } + refreshUI() { + !function(e) { + const t = e.ctx.getCommentList().length <= 0; + let n = e.getCommentsWrapEl().querySelector(".atk-list-no-comment"); + t ? n || (n = s('
    '), + n.innerHTML = e.noCommentText || e.ctx.conf.noComment || e.ctx.$t("noComment"), + e.getCommentsWrapEl().appendChild(n)) : null == n || n.remove(), + e.ctx.checkAdminShowEl() + }(this) + } + reload() { + this.fetchComments(0) + } + createComment(e, t) { + t || (t = this.ctx.getCommentDataList()); + const n = new Ft(this.ctx,e,{ + isFlatMode: this.flatMode, + afterRender: ()=>{ + this.renderComment && this.renderComment(n) + } + , + onDelete: e=>{ + this.ctx.deleteComment(e), + this.refreshUI() + } + , + replyTo: e.rid ? t.find((t=>t.id === e.rid)) : void 0 + }); + return n.render(), + this.ctx.getCommentList().push(n), + n + } + importComments(e) { + this.flatMode ? e.forEach((t=>{ + this.putCommentFlatMode(t, e, "append") + } + )) : this.importCommentsNest(e) + } + importCommentsNest(e) { + const t = function(e, t="DATE_DESC", n=2) { + const i = []; + e.filter((e=>0 === e.rid)).forEach((t=>{ + const s = { + id: t.id, + comment: t, + children: [], + level: 1 + }; + s.parent = s, + i.push(s), + function t(i) { + const s = e.filter((e=>e.rid === i.id)); + 0 !== s.length && (i.level >= n && (i = i.parent), + s.forEach((e=>{ + const n = { + id: e.id, + comment: e, + children: [], + parent: i, + level: i.level + 1 + }; + i.children.push(n), + t(n) + } + ))) + }(s) + } + )); + const s = (n,i)=>{ + let s = n.id - i.id; + return "DATE_ASC" === t ? s = +new Date(n.comment.date) - +new Date(i.comment.date) : "DATE_DESC" === t ? s = +new Date(i.comment.date) - +new Date(n.comment.date) : "SRC_INDEX" === t ? s = e.indexOf(n.comment) - e.indexOf(i.comment) : "VOTE_UP_DESC" === t && (s = i.comment.vote_up - n.comment.vote_up), + s + } + ; + return function e(t) { + t.forEach((t=>{ + t.children = t.children.sort(s), + e(t.children) + } + )) + }(i), + i + }(e, this.nestSortBy, this.conf.nestMax); + t.forEach((t=>{ + const n = this.createComment(t.comment, e); + this.$commentsWrap.appendChild(n.getEl()), + n.getRender().playFadeAnim(); + const i = this; + !function t(n, s) { + s.children.forEach((s=>{ + const r = s.comment + , a = i.createComment(r, e); + n.putChild(a), + t(a, s) + } + )) + }(n, t), + n.getRender().checkHeightLimit() + } + )) + } + putCommentFlatMode(e, t, n) { + e.is_collapsed && (e.is_allow_reply = !1); + const i = this.createComment(e, t); + return e.visible && ("append" === n && this.$commentsWrap.append(i.getEl()), + "prepend" === n && this.$commentsWrap.prepend(i.getEl()), + i.getRender().playFadeAnim()), + i.getRender().checkHeightLimit(), + i + } + insertComment(e) { + if (this.flatMode) { + k(this.putCommentFlatMode(e, this.ctx.getCommentDataList(), "prepend").getEl()) + } else { + const t = this.createComment(e); + if (0 === e.rid) + this.$commentsWrap.prepend(t.getEl()); + else { + const n = this.ctx.findComment(e.rid); + n && (n.putChild(t, "DATE_ASC" === this.nestSortBy ? "append" : "prepend"), + t.getParents().forEach((e=>{ + e.getRender().heightLimitRemoveForChildren() + } + ))) + } + t.getRender().checkHeightLimit(), + k(t.getEl()), + t.getRender().playFadeAnim() + } + this.data && (this.data.total += 1), + this.refreshUI(), + this.ctx.trigger("list-loaded"), + this.ctx.trigger("list-inserted", e) + } + updateComment(e) { + const t = this.ctx.findComment(e.id); + t && t.setData(e) + } + updateUnread(e) { + this.unread = e, + !0 === this.unreadHighlight && this.ctx.getCommentList().forEach((e=>{ + const t = this.unread.find((t=>t.comment_id === e.getID())); + t ? (e.getRender().setUnread(!0), + e.getRender().setOpenAction((()=>{ + window.open(t.read_link), + this.unread = this.unread.filter((t=>t.comment_id !== e.getID())), + this.ctx.updateNotifies(this.unread) + } + ))) : e.getRender().setUnread(!1) + } + )) + } + } + class Wt extends jt { + constructor(e) { + const t = s('
    \n
    \n
    \n
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n
    \n \n
    \n'); + super(e), + __publicField(this, "$closeCommentBtn"), + __publicField(this, "$openSidebarBtn"), + __publicField(this, "$unreadBadge"), + __publicField(this, "$commentCount"), + __publicField(this, "$commentCountNum"), + __publicField(this, "$dropdownWrap"), + __publicField(this, "goToCommentFounded", !1), + __publicField(this, "goToCommentDelay", !0), + t.querySelector(".atk-list-body").append(this.$el), + this.$el = t, + this.repositionAt = this.$el, + this.initListActionBtn(); + this.$commentCount = this.$el.querySelector(".atk-comment-count"); + const n = ()=>{ + this.$commentCount.innerHTML = this.$t("counter", { + count: '0' + }), + this.$commentCountNum = this.$commentCount.querySelector(".atk-comment-count-num") + } + ; + n(), + this.$el.querySelector(".atk-copyright").innerHTML = `Powered By Artalk`, + this.ctx.on("conf-loaded", (()=>{ + n(), + this.refreshUI() + } + )) + } + initListActionBtn() { + this.$openSidebarBtn = this.$el.querySelector('[data-action="open-sidebar"]'), + this.$closeCommentBtn = this.$el.querySelector('[data-action="admin-close-comment"]'), + this.$unreadBadge = this.$el.querySelector(".atk-unread-badge"), + this.$openSidebarBtn.addEventListener("click", (()=>{ + this.ctx.showSidebar() + } + )), + this.$closeCommentBtn.addEventListener("click", (()=>{ + this.data && (this.data.page.admin_only = !this.data.page.admin_only, + this.adminPageEditSave()) + } + )) + } + refreshUI() { + var e; + super.refreshUI(), + this.$commentCountNum.innerText = String(Number(null == (e = this.data) ? void 0 : e.total) || 0), + lt.data.nick && lt.data.email ? this.$openSidebarBtn.classList.remove("atk-hide") : this.$openSidebarBtn.classList.add("atk-hide"), + this.$openSidebarBtn.querySelector(".atk-text").innerText = lt.data.isAdmin ? this.$t("ctrlCenter") : this.$t("msgCenter"), + this.data && this.data.page && !0 === this.data.page.admin_only ? (this.ctx.editorClose(), + this.$closeCommentBtn.innerHTML = this.$t("openComment")) : (this.ctx.editorOpen(), + this.$closeCommentBtn.innerHTML = this.$t("closeComment")), + this.ctx.conf.listSort ? this.initDropdown() : function(e) { + var t, n; + const {$dropdownWrap: i} = e; + i.classList.remove("atk-dropdown-wrap"), + null == (t = i.querySelector(".atk-arrow-down-icon")) || t.remove(), + null == (n = i.querySelector(".atk-dropdown")) || n.remove() + }({ + $dropdownWrap: this.$commentCount + }) + } + onLoad(e, t) { + super.onLoad(e, t), + this.goToCommentFounded || this.checkGoToCommentByUrlHash(), + !0 === this.ctx.conf.editorTravel && this.ctx.editorTravelBack() + } + checkGoToCommentByUrlHash() { + var e; + let t = Number(a("atk_comment")); + if (!t) { + const e = window.location.hash.match(/#atk-comment-([0-9]+)/); + if (!e || !e[1] || Number.isNaN(Number(e[1]))) + return; + t = Number(e[1]) + } + if (!t) + return; + const n = this.ctx.findComment(t); + if (!n) + return void (null == (e = this.pgHolder) || e.next()); + const i = a("atk_notify_key"); + i && this.ctx.getApi().user.markRead(t, i).then((()=>{ + this.unread = this.unread.filter((e=>e.comment_id !== t)), + this.updateUnread(this.unread) + } + )), + n.getParents().forEach((e=>{ + e.getRender().heightLimitRemoveForChildren() + } + )); + const s = ()=>{ + k(n.getEl(), !1), + n.getEl().classList.remove("atk-flash-once"), + window.setTimeout((()=>{ + n.getEl().classList.add("atk-flash-once") + } + ), 150) + } + ; + this.goToCommentDelay ? window.setTimeout((()=>s()), 350) : s(), + this.goToCommentFounded = !0, + this.goToCommentDelay = !0 + } + adminPageEditSave() { + this.data && this.data.page && (this.ctx.editorShowLoading(), + this.ctx.getApi().page.pageEdit(this.data.page).then((e=>{ + this.data && (this.data.page = __spreadValues({}, e)), + this.refreshUI() + } + )).catch((e=>{ + this.ctx.editorShowNotify(`${this.$t("editFail")}: ${e.msg || String(e)}`, "e") + } + )).finally((()=>{ + this.ctx.editorHideLoading() + } + ))) + } + showUnreadBadge(e) { + e > 0 ? (this.$unreadBadge.innerText = `${Number(e || 0)}`, + this.$unreadBadge.style.display = "block") : this.$unreadBadge.style.display = "none" + } + initDropdown() { + const e = e=>{ + this.paramsEditor = e, + this.fetchComments(0) + } + ; + Ut({ + $dropdownWrap: this.$commentCount, + dropdownList: [[this.$t("sortLatest"), ()=>{ + e((e=>{ + e.sort_by = "date_desc" + } + )) + } + ], [this.$t("sortBest"), ()=>{ + e((e=>{ + e.sort_by = "vote" + } + )) + } + ], [this.$t("sortOldest"), ()=>{ + e((e=>{ + e.sort_by = "date_asc" + } + )) + } + ], [this.$t("sortAuthor"), ()=>{ + e((e=>{ + e.view_only_admin = !0 + } + )) + } + ]] + }) + } + updateUnread(e) { + super.updateUnread(e), + this.showUnreadBadge((null == e ? void 0 : e.length) || 0) + } + } + class Nt { + constructor(e, t) { + __publicField(this, "conf"), + __publicField(this, "$root"), + __publicField(this, "markedReplacers", []), + __publicField(this, "commentList", []), + __publicField(this, "eventList", []), + this.conf = e, + this.$root = t || document.createElement("div"), + this.$root.classList.add("artalk"), + this.$root.innerHTML = "" + } + inject(e, t) { + this[e] = t + } + get(e) { + return this[e] + } + getApi() { + return this.api + } + getCommentList() { + return this.commentList + } + getCommentDataList() { + return this.commentList.map((e=>e.getData())) + } + findComment(e) { + return this.commentList.find((t=>t.getData().id === e)) + } + deleteComment(e) { + let t; + if ("number" == typeof e) { + const n = this.findComment(e); + if (!n) + throw Error(`Comment ${e} cannot be found`); + t = n + } else + t = e; + if (t.getEl().remove(), + this.commentList.splice(this.commentList.indexOf(t), 1), + this.list) { + const e = this.list.getData(); + e && (e.total -= 1), + this.list.refreshUI() + } + } + clearAllComments() { + this.list && (this.list.getCommentsWrapEl().innerHTML = "", + this.list.clearData()), + this.commentList = [] + } + insertComment(e) { + var t; + null == (t = this.list) || t.insertComment(e) + } + updateComment(e) { + var t; + null == (t = this.list) || t.updateComment(e) + } + replyComment(e, t, n) { + this.editor.setReply(e, t, n) + } + cancelReplyComment() { + this.editor.cancelReply() + } + editComment(e, t) { + this.editor.setEditComment(e, t) + } + cancelEditComment() { + this.editor.cancelEditComment() + } + updateNotifies(e) { + var t; + null == (t = this.list) || t.updateUnread(e) + } + listReload() { + var e; + null == (e = this.list) || e.reload() + } + reload() { + this.listReload() + } + listRefreshUI() { + var e; + null == (e = this.list) || e.refreshUI() + } + listHashGotoCheck() { + if (!(this.list && this.list instanceof Wt)) + return; + const e = this.list; + e.goToCommentDelay = !1, + e.checkGoToCommentByUrlHash() + } + editorOpen() { + this.editor.open() + } + editorClose() { + this.editor.close() + } + editorShowLoading() { + this.editor.showLoading() + } + editorHideLoading() { + this.editor.hideLoading() + } + editorShowNotify(e, t) { + this.editor.showNotify(e, t) + } + editorTravel(e) { + this.editor.travel(e) + } + editorTravelBack() { + this.editor.travelBack() + } + showSidebar(e) { + this.sidebarLayer.show(e) + } + hideSidebar() { + this.sidebarLayer.hide() + } + checkAdmin(e) { + this.checkerLauncher.checkAdmin(e) + } + checkCaptcha(e) { + this.checkerLauncher.checkCaptcha(e) + } + checkAdminShowEl() { + const e = []; + this.$root.querySelectorAll("[atk-only-admin-show]").forEach((t=>e.push(t))); + const {$wrap: t} = v(); + t && t.querySelectorAll("[atk-only-admin-show]").forEach((t=>e.push(t))); + const n = document.querySelector(".atk-sidebar"); + n && n.querySelectorAll("[atk-only-admin-show]").forEach((t=>e.push(t))), + e.forEach((e=>{ + this.user.data.isAdmin ? e.classList.remove("atk-hide") : e.classList.add("atk-hide") + } + )) + } + on(e, t, n="internal") { + this.eventList.push({ + name: e, + handler: t, + scope: n + }) + } + off(e, t, n="internal") { + this.eventList = this.eventList.filter((i=>t ? !(i.name === e && i.handler === t && i.scope === n) : !(i.name === e && i.scope === n))) + } + trigger(e, t, n) { + this.eventList.filter((t=>t.name === e && (!n || t.scope === n))).map((e=>e.handler)).forEach((e=>e(t))) + } + $t(e, t={}) { + return at(e, t) + } + setDarkMode(e) { + T(this, e) + } + updateConf(e) { + this.conf = p(this.conf, e), + this.trigger("conf-loaded") + } + getMarkedInstance() { + return Ye() + } + } + class Ht { + constructor(e, t) { + return __publicField(this, "ctx"), + __publicField(this, "$el"), + __publicField(this, "$content"), + __publicField(this, "$actions"), + this.ctx = e, + this.$el = s('
    \n
    \n
    \n
    \n
    \n
    '), + this.$actions = this.$el.querySelector(".atk-layer-dialog-actions"), + this.$content = this.$el.querySelector(".atk-layer-dialog-content"), + this.$content.appendChild(t), + this + } + setYes(e) { + const t = s(``); + return t.onclick = this.onBtnClick(e), + this.$actions.appendChild(t), + this + } + setNo(e) { + const t = s(``); + return t.onclick = this.onBtnClick(e), + this.$actions.appendChild(t), + this + } + onBtnClick(e) { + return t=>{ + const n = e(t.currentTarget, this); + void 0 !== n && !0 !== n || this.$el.remove() + } + } + } + function Vt(e) { + const t = s('
    ') + , n = s(''); + n.style.display = "none", + g(t, { + transparentBg: !0 + }), + n.src = `${e.getCtx().conf.server}/api/captcha/get?t=${+new Date}`, + n.onload = ()=>{ + n.style.display = "", + f(t) + } + , + t.append(n); + const i = s('
    '); + t.append(i), + e.hideInteractInput(); + let r = !1; + return function t() { + return __async(this, null, (function*() { + var n; + if (yield(n = 1e3, + new Promise((e=>{ + window.setTimeout((()=>{ + e(null) + } + ), n) + } + ))), + r) + return; + let i = !1; + try { + i = (yield e.getCtx().getApi().captcha.captchaStatus()).is_pass + } catch (s) { + i = !1 + } + i ? e.triggerSuccess() : t() + } + )) + }(), + i.onclick = ()=>{ + r = !0, + e.cancel() + } + , + t + } + const Qt = { + request: (e,t)=>e.getApi().captcha.captchaCheck(t), + body: e=>e.get("iframe") ? Vt(e) : function(e) { + const t = s(`${e.getCtx().$t("captchaCheck")}`); + return t.querySelector(".atk-captcha-img").onclick = ()=>{ + const n = t.querySelector(".atk-captcha-img"); + e.getApi().captcha.captchaGet().then((e=>{ + n.setAttribute("src", e) + } + )).catch((e=>{ + console.error("Failed to get captcha image ", e) + } + )) + } + , + t + }(e), + onSuccess(e, t, n, i) { + e.set("val", n) + }, + onError(e, t, n, i) { + i.querySelector(".atk-captcha-img").click(), + i.querySelector('input[type="text"]').value = "" + } + } + , Zt = { + inputType: "password", + request(e, t) { + const n = { + name: lt.data.nick, + email: lt.data.email, + password: t + }; + return (()=>__async(this, null, (function*() { + return (yield e.getApi().user.login(n.name, n.email, n.password)).token + } + )))() + }, + body: e=>s(`${e.getCtx().$t("adminCheck")}`), + onSuccess(e, t, n, i) { + lt.update({ + isAdmin: !0, + token: t + }), + e.getCtx().trigger("user-changed", lt.data), + e.getCtx().listReload() + }, + onError(e, t, n, i) {} + }; + class Gt { + constructor(e) { + __publicField(this, "ctx"), + __publicField(this, "launched", []), + this.ctx = e + } + checkCaptcha(e) { + this.fire(Qt, e, (t=>{ + t.set("img_data", e.imgData), + t.set("iframe", e.iframe) + } + )) + } + checkAdmin(e) { + this.fire(Zt, e) + } + fire(e, t, n) { + if (this.launched.includes(e)) + return; + this.launched.push(e); + const i = new x(this.ctx,`checker-${(new Date).getTime()}`); + i.setMaskClickHide(!1), + i.show(); + const r = {}; + let a = !1; + const o = { + set: (e,t)=>{ + r[e] = t + } + , + get: e=>r[e], + getCtx: ()=>this.ctx, + getApi: ()=>this.ctx.getApi(), + getLayer: ()=>i, + hideInteractInput: ()=>{ + a = !0 + } + , + triggerSuccess: ()=>{ + this.close(e, i), + e.onSuccess && e.onSuccess(o, "", "", l), + t.onSuccess && t.onSuccess("", h.$el) + } + , + cancel: ()=>{ + this.close(e, i), + t.onCancel && t.onCancel() + } + }; + n && n(o); + const l = s(); + l.appendChild(e.body(o)); + const c = s(``); + let d; + l.appendChild(c), + setTimeout((()=>c.focus()), 80), + c.onkeyup = e=>{ + "Enter" !== e.key && 13 !== e.keyCode || (e.preventDefault(), + i.getEl().querySelector('button[data-action="confirm"]').click()) + } + ; + const h = new Ht(this.ctx,l); + h.setYes((n=>{ + const s = c.value.trim(); + d || (d = n.innerText); + const r = ()=>{ + n.innerText = d || "", + n.classList.remove("error") + } + ; + return n.innerText = `${this.ctx.$t("loading")}...`, + e.request(o, s).then((n=>{ + this.close(e, i), + e.onSuccess && e.onSuccess(o, n, s, l), + t.onSuccess && t.onSuccess(s, h.$el) + } + )).catch((t=>{ + var i; + i = String(t.msg || String(t)), + n.innerText = i, + n.classList.add("error"), + e.onError && e.onError(o, t, s, l); + const a = setTimeout((()=>r()), 3e3); + c.onfocus = ()=>{ + r(), + clearTimeout(a) + } + } + )), + !1 + } + )), + h.setNo((()=>(this.close(e, i), + t.onCancel && t.onCancel(), + !1))), + a && (c.style.display = "none", + h.$el.querySelector(".atk-layer-dialog-actions").style.display = "none"), + i.getEl().append(h.$el), + t.onMount && t.onMount(h.$el) + } + close(e, t) { + t.disposeNow(), + this.launched = this.launched.filter((t=>t !== e)) + } + } + function Kt(e, t, n, i) { + return __async(this, null, (function*() { + var s, r; + if (lt.data.token) { + const e = new Headers(n.headers); + e.set("Authorization", `Bearer ${lt.data.token}`), + n.headers = e + } + const a = yield function(e, t, n, i) { + var s; + const r = new AbortController; + null == (s = i.signal) || s.addEventListener("abort", (()=>r.abort())); + let a = fetch(t, __spreadProps(__spreadValues({}, i), { + signal: r.signal + })); + if (n > 0) { + const e = setTimeout((()=>r.abort()), n); + a.finally((()=>{ + clearTimeout(e) + } + )) + } + return a = a.catch((e=>{ + throw "AbortError" === (e || {}).name ? new Error(at("reqAborted")) : e + } + )), + a + }(0, t, i || e.conf.reqTimeout || 15e3, n) + , o = a.status + , l = [401, 400].includes(o); + if (!a.ok && !l) + throw new Error(`${at("reqGot")} ${o}`); + let c = yield a.json(); + const d = (i,s)=>{ + Kt(e, t, n).then((e=>{ + i(e) + } + )).catch((e=>{ + s(e) + } + )) + } + ; + if ((null == (s = c.data) ? void 0 : s.need_captcha) ? c = yield new Promise(((t,n)=>{ + e.checkCaptcha({ + imgData: c.data.img_data, + iframe: c.data.iframe, + onSuccess: ()=>{ + d(t, n) + } + , + onCancel: ()=>{ + n(c) + } + }) + } + )) : ((null == (r = c.data) ? void 0 : r.need_login) || l) && (c = yield new Promise(((t,n)=>{ + e.checkAdmin({ + onSuccess: ()=>{ + d(t, n) + } + , + onCancel: ()=>{ + n(c) + } + }) + } + ))), + !c.success) + throw c; + return c + } + )) + } + function Yt(e) { + const t = new FormData; + return Object.keys(e).forEach((n=>t.append(n, String(e[n])))), + t + } + !function() { + function e(e, t) { + if (!(e instanceof t)) + throw new TypeError("Cannot call a class as a function") + } + function t(e, t) { + for (var n = 0; n < t.length; n++) { + var i = t[n]; + i.enumerable = i.enumerable || !1, + i.configurable = !0, + "value"in i && (i.writable = !0), + Object.defineProperty(e, i.key, i) + } + } + function n(e, n, i) { + return n && t(e.prototype, n), + i && t(e, i), + Object.defineProperty(e, "prototype", { + writable: !1 + }), + e + } + function i(e, t) { + if ("function" != typeof t && null !== t) + throw new TypeError("Super expression must either be null or a function"); + e.prototype = Object.create(t && t.prototype, { + constructor: { + value: e, + writable: !0, + configurable: !0 + } + }), + Object.defineProperty(e, "prototype", { + writable: !1 + }), + t && r(e, t) + } + function s(e) { + return (s = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) { + return e.__proto__ || Object.getPrototypeOf(e) + } + )(e) + } + function r(e, t) { + return (r = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) { + return e.__proto__ = t, + e + } + )(e, t) + } + function a() { + if ("undefined" == typeof Reflect || !Reflect.construct) + return !1; + if (Reflect.construct.sham) + return !1; + if ("function" == typeof Proxy) + return !0; + try { + return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {} + ))), + !0 + } catch (e) { + return !1 + } + } + function o(e) { + if (void 0 === e) + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return e + } + function l(e, t) { + if (t && ("object" == typeof t || "function" == typeof t)) + return t; + if (void 0 !== t) + throw new TypeError("Derived constructors may only return object or undefined"); + return o(e) + } + function c(e) { + var t = a(); + return function() { + var n, i = s(e); + if (t) { + var r = s(this).constructor; + n = Reflect.construct(i, arguments, r) + } else + n = i.apply(this, arguments); + return l(this, n) + } + } + function d(e, t) { + for (; !Object.prototype.hasOwnProperty.call(e, t) && null !== (e = s(e)); ) + ; + return e + } + function h() { + return h = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function(e, t, n) { + var i = d(e, t); + if (i) { + var s = Object.getOwnPropertyDescriptor(i, t); + return s.get ? s.get.call(arguments.length < 3 ? e : n) : s.value + } + } + , + h.apply(this, arguments) + } + var u = function() { + function t() { + e(this, t), + Object.defineProperty(this, "listeners", { + value: {}, + writable: !0, + configurable: !0 + }) + } + return n(t, [{ + key: "addEventListener", + value: function(e, t, n) { + e in this.listeners || (this.listeners[e] = []), + this.listeners[e].push({ + callback: t, + options: n + }) + } + }, { + key: "removeEventListener", + value: function(e, t) { + if (e in this.listeners) + for (var n = this.listeners[e], i = 0, s = n.length; i < s; i++) + if (n[i].callback === t) + return void n.splice(i, 1) + } + }, { + key: "dispatchEvent", + value: function(e) { + if (e.type in this.listeners) { + for (var t = this.listeners[e.type].slice(), n = 0, i = t.length; n < i; n++) { + var s = t[n]; + try { + s.callback.call(this, e) + } catch (r) { + Promise.resolve().then((function() { + throw r + } + )) + } + s.options && s.options.once && this.removeEventListener(e.type, s.callback) + } + return !e.defaultPrevented + } + } + }]), + t + }() + , p = function(t) { + i(a, t); + var r = c(a); + function a() { + var t; + return e(this, a), + (t = r.call(this)).listeners || u.call(o(t)), + Object.defineProperty(o(t), "aborted", { + value: !1, + writable: !0, + configurable: !0 + }), + Object.defineProperty(o(t), "onabort", { + value: null, + writable: !0, + configurable: !0 + }), + Object.defineProperty(o(t), "reason", { + value: void 0, + writable: !0, + configurable: !0 + }), + t + } + return n(a, [{ + key: "toString", + value: function() { + return "[object AbortSignal]" + } + }, { + key: "dispatchEvent", + value: function(e) { + "abort" === e.type && (this.aborted = !0, + "function" == typeof this.onabort && this.onabort.call(this, e)), + h(s(a.prototype), "dispatchEvent", this).call(this, e) + } + }]), + a + }(u) + , m = function() { + function t() { + e(this, t), + Object.defineProperty(this, "signal", { + value: new p, + writable: !0, + configurable: !0 + }) + } + return n(t, [{ + key: "abort", + value: function(e) { + var t; + try { + t = new Event("abort") + } catch (i) { + "undefined" != typeof document ? document.createEvent ? (t = document.createEvent("Event")).initEvent("abort", !1, !1) : (t = document.createEventObject()).type = "abort" : t = { + type: "abort", + bubbles: !1, + cancelable: !1 + } + } + var n = e; + if (void 0 === n) + if ("undefined" == typeof document) + (n = new Error("This operation was aborted")).name = "AbortError"; + else + try { + n = new DOMException("signal is aborted without reason") + } catch (s) { + (n = new Error("This operation was aborted")).name = "AbortError" + } + this.signal.reason = n, + this.signal.dispatchEvent(t) + } + }, { + key: "toString", + value: function() { + return "[object AbortController]" + } + }]), + t + }(); + function g(e) { + return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL ? (console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"), + !0) : "function" == typeof e.Request && !e.Request.prototype.hasOwnProperty("signal") || !e.AbortController + } + function f(e) { + "function" == typeof e && (e = { + fetch: e + }); + var t = e + , n = t.fetch + , i = t.Request + , s = void 0 === i ? n.Request : i + , r = t.AbortController + , a = t.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL + , o = void 0 !== a && a; + if (!g({ + fetch: n, + Request: s, + AbortController: r, + __FORCE_INSTALL_ABORTCONTROLLER_POLYFILL: o + })) + return { + fetch: n, + Request: l + }; + var l = s; + (l && !l.prototype.hasOwnProperty("signal") || o) && ((l = function(e, t) { + var n; + t && t.signal && (n = t.signal, + delete t.signal); + var i = new s(e,t); + return n && Object.defineProperty(i, "signal", { + writable: !1, + enumerable: !1, + configurable: !0, + value: n + }), + i + } + ).prototype = s.prototype); + var c = n; + return { + fetch: function(e, t) { + var n = l && l.prototype.isPrototypeOf(e) ? e.signal : t ? t.signal : void 0; + if (n) { + var i; + try { + i = new DOMException("Aborted","AbortError") + } catch (r) { + (i = new Error("Aborted")).name = "AbortError" + } + if (n.aborted) + return Promise.reject(i); + var s = new Promise((function(e, t) { + n.addEventListener("abort", (function() { + return t(i) + } + ), { + once: !0 + }) + } + )); + return t && t.signal && delete t.signal, + Promise.race([s, c(e, t)]) + } + return c(e, t) + }, + Request: l + } + } + "undefined" != typeof Symbol && Symbol.toStringTag && (m.prototype[Symbol.toStringTag] = "AbortController", + p.prototype[Symbol.toStringTag] = "AbortSignal"), + function(e) { + if (g(e)) + if (e.fetch) { + var t = f(e) + , n = t.fetch + , i = t.Request; + e.fetch = n, + e.Request = i, + Object.defineProperty(e, "AbortController", { + writable: !0, + enumerable: !1, + configurable: !0, + value: m + }), + Object.defineProperty(e, "AbortSignal", { + writable: !0, + enumerable: !1, + configurable: !0, + value: p + }) + } else + console.warn("fetch() is not available, cannot install abortcontroller-polyfill") + }("undefined" != typeof self ? self : pe) + }(); + class Xt { + constructor(e, t) { + __publicField(this, "api"), + __publicField(this, "ctx"), + this.api = e, + this.ctx = t + } + POST(e, t) { + return __async(this, null, (function*() { + return function(e, t, n) { + return __async(this, null, (function*() { + const i = { + method: "POST" + }; + return n = __spreadValues({ + site_name: e.conf.site || "" + }, n || {}), + i.body = Yt(n), + (yield Kt(e, t, i)).data || {} + } + )) + }(this.ctx, this.api.baseURL + e, t) + } + )) + } + Fetch(e, t, n) { + return __async(this, null, (function*() { + return Kt(this.ctx, this.api.baseURL + e, t, n) + } + )) + } + } + const Jt = { + comment: class extends Xt { + get(e, t, n, i) { + const s = { + page_key: this.ctx.conf.pageKey, + site_name: this.ctx.conf.site || "", + limit: t, + offset: e + }; + return n && (s.flat_mode = n), + lt.checkHasBasicUserInfo() && (s.name = lt.data.nick, + s.email = lt.data.email), + i && i(s), + this.POST("/get", s) + } + add(e) { + return __async(this, null, (function*() { + const t = { + name: e.nick, + email: e.email, + link: e.link, + content: e.content, + rid: e.rid, + page_key: e.page_key, + ua: yield d() + }; + e.page_title && (t.page_title = e.page_title), + e.site_name && (t.site_name = e.site_name); + return (yield this.POST("/add", t)).comment + } + )) + } + commentEdit(e) { + return __async(this, null, (function*() { + const t = __spreadValues({}, e); + return (yield this.POST("/admin/comment-edit", t)).comment + } + )) + } + commentDel(e, t) { + const n = { + id: String(e), + site_name: t || "" + }; + return this.POST("/admin/comment-del", n) + } + vote(e, t) { + return __async(this, null, (function*() { + const n = { + target_id: e, + type: t + }; + lt.checkHasBasicUserInfo() && (n.name = lt.data.nick, + n.email = lt.data.email); + return yield this.POST("/vote", n) + } + )) + } + } + , + page: class extends Xt { + pageGet(e, t, n) { + return __async(this, null, (function*() { + const i = { + site_name: e || "", + offset: t || 0, + limit: n || 15 + }; + return yield this.POST("/admin/page-get", i) + } + )) + } + pageEdit(e) { + return __async(this, null, (function*() { + const t = { + id: e.id, + key: e.key, + title: e.title, + admin_only: e.admin_only, + site_name: e.site_name || this.ctx.conf.site + }; + return (yield this.POST("/admin/page-edit", t)).page + } + )) + } + pageDel(e, t) { + const n = { + key: String(e), + site_name: t || "" + }; + return this.POST("/admin/page-del", n) + } + pageFetch(e, t, n) { + return __async(this, null, (function*() { + const i = {}; + e && (i.id = e), + t && (i.site_name = t), + n && (i.get_status = n); + return yield this.POST("/admin/page-fetch", i) + } + )) + } + pv() { + return __async(this, null, (function*() { + const e = { + page_key: this.ctx.conf.pageKey || "", + page_title: this.ctx.conf.pageTitle || "" + }; + return (yield this.POST("/pv", e)).pv + } + )) + } + stat(e, t, n) { + return __async(this, null, (function*() { + const i = { + type: e + }; + t && (i.page_keys = Array.isArray(t) ? t.join(",") : t), + n && (i.limit = n); + return yield this.POST("/stat", i) + } + )) + } + } + , + site: class extends Xt { + siteGet() { + return __async(this, null, (function*() { + return (yield this.POST("/admin/site-get", {})).sites + } + )) + } + siteAdd(e, t) { + return __async(this, null, (function*() { + const n = { + name: e, + urls: t, + site_name: "" + }; + return (yield this.POST("/admin/site-add", n)).site + } + )) + } + siteEdit(e) { + return __async(this, null, (function*() { + const t = { + id: e.id, + name: e.name || "", + urls: e.urls || "" + }; + return (yield this.POST("/admin/site-edit", t)).site + } + )) + } + siteDel(e, t=!1) { + const n = { + id: e, + del_content: t + }; + return this.POST("/admin/site-del", n) + } + export() { + return __async(this, null, (function*() { + var e; + return (null == (e = (yield this.Fetch("/admin/export", { + method: "POST" + }, 0)).data) ? void 0 : e.data) || "" + } + )) + } + } + , + user: class extends Xt { + login(e, t, n) { + return __async(this, null, (function*() { + const i = { + name: e, + email: t, + password: n + }; + return yield this.POST("/login", i) + } + )) + } + userGet(e, t) { + const n = new AbortController + , i = { + name: e, + email: t + }; + return { + req: this.Fetch("/user-get", { + method: "POST", + body: Yt(i), + signal: n.signal + }).then((e=>({ + user: e.data.user, + is_login: e.data.is_login, + unread: e.data.unread || [], + unread_count: e.data.unread_count || 0 + }))), + abort: ()=>{ + n.abort() + } + } + } + loginStatus() { + return __async(this, null, (function*() { + return (yield this.POST("/login-status", { + name: lt.data.nick, + email: lt.data.email + })) || { + is_login: !1, + is_admin: !1 + } + } + )) + } + logout() { + return __async(this, null, (function*() { + return this.POST("/logout") + } + )) + } + markRead(e, t, n=!1) { + const i = { + comment_id: e, + notify_key: t + }; + return n && (delete i.comment_id, + delete i.notify_key, + i.read_all = !0, + i.name = lt.data.nick, + i.email = lt.data.email), + this.POST("/mark-read", i) + } + userList(e, t, n) { + return __async(this, null, (function*() { + const i = { + offset: e || 0, + limit: t || 15 + }; + n && (i.type = n); + return yield this.POST("/admin/user-get", i) + } + )) + } + userAdd(e, t) { + return __async(this, null, (function*() { + const n = { + name: e.name || "", + email: e.email || "", + password: t || "", + link: e.link || "", + is_admin: e.is_admin || !1, + site_names: e.site_names_raw || "", + receive_email: e.receive_email || !0, + badge_name: e.badge_name || "", + badge_color: e.badge_color || "" + }; + return (yield this.POST("/admin/user-add", n)).user + } + )) + } + userEdit(e, t) { + return __async(this, null, (function*() { + const n = { + id: e.id, + name: e.name || "", + email: e.email || "", + password: t || "", + link: e.link || "", + is_admin: e.is_admin || !1, + site_names: e.site_names_raw || "", + receive_email: e.receive_email || !0, + badge_name: e.badge_name || "", + badge_color: e.badge_color || "" + }; + return (yield this.POST("/admin/user-edit", n)).user + } + )) + } + userDel(e) { + return this.POST("/admin/user-del", { + id: String(e) + }) + } + } + , + system: class extends Xt { + conf() { + return __async(this, null, (function*() { + return zt((yield this.POST("/conf")).frontend_conf || {}) + } + )) + } + getSettings() { + return __async(this, null, (function*() { + return yield this.POST("/admin/setting-get") + } + )) + } + saveSettings(e) { + return __async(this, null, (function*() { + return yield this.POST("/admin/setting-save", { + data: e + }) + } + )) + } + version() { + return __async(this, null, (function*() { + const e = yield fetch(`${this.api.baseURL}/version`, { + method: "POST" + }); + return yield e.json() + } + )) + } + } + , + captcha: class extends Xt { + captchaGet() { + return __async(this, null, (function*() { + return (yield this.POST("/captcha/refresh")).img_data || "" + } + )) + } + captchaCheck(e) { + return __async(this, null, (function*() { + return (yield this.POST("/captcha/check", { + value: e + })).img_data || "" + } + )) + } + captchaStatus() { + return __async(this, null, (function*() { + return (yield this.POST("/captcha/status")) || { + is_pass: !1 + } + } + )) + } + } + , + admin: class extends Xt { + cacheFlushAll() { + return this.POST("/admin/cache-flush", { + flush_all: !0 + }) + } + cacheWarmUp() { + return this.POST("/admin/cache-warm", {}) + } + } + , + upload: class extends Xt { + imgUpload(e) { + return __async(this, null, (function*() { + const t = Yt({ + name: lt.data.nick, + email: lt.data.email, + page_key: this.ctx.conf.pageKey + }); + t.set("file", e); + const n = { + method: "POST", + body: t + }; + return (yield this.Fetch("/img-upload", n)).data || {} + } + )) + } + } + }; + class en { + constructor(e) { + __publicField(this, "ctx"), + this.ctx = e, + Object.entries(Jt).forEach((([e,t])=>{ + this[e] = new t(this,this.ctx) + } + )) + } + get baseURL() { + return `${this.ctx.conf.server}/api` + } + } + function tn(e) { + const t = { + editor: e, + isMoved: !1, + move: e=>function(e, t) { + if (e.isMoved) + return; + e.isMoved = !0; + const n = e.editor.getUI().$el; + n.after(s('
    ')); + const i = s("
    "); + t.after(i), + i.replaceWith(n), + n.classList.add("atk-fade-in") + }(t, e), + back: ()=>function(e) { + var t; + if (!e.isMoved) + return; + e.isMoved = !1, + null == (t = e.editor.ctx.$root.querySelector(".atk-editor-travel-placeholder")) || t.replaceWith(e.editor.getUI().$el), + e.editor.cancelReply() + }(t) + }; + return t + } + class nn { + constructor(e) { + __publicField(this, "editor"), + __publicField(this, "$panel"), + __publicField(this, "$btn"), + __publicField(this, "onHeaderInput"), + __publicField(this, "contentTransformer"), + __publicField(this, "onContentUpdated"), + this.editor = e + } + get ctx() { + return this.editor.ctx + } + registerPanel(e="
    ") { + return this.$panel = s(e), + this.$panel + } + registerBtn(e) { + return this.$btn = s(`${e}`), + this.$btn + } + registerHeaderInputEvt(e) { + this.onHeaderInput = e + } + registerContentTransformer(e) { + this.contentTransformer = e + } + registerContentUpdatedEvt(e) { + this.onContentUpdated = e + } + getPanel() { + return this.$panel + } + getBtn() { + return this.$btn + } + } + __publicField(nn, "Name"); + class sn extends nn { + constructor(e) { + super(e), + __publicField(this, "emoticons", []), + __publicField(this, "loadingTask", null), + __publicField(this, "$grpWrap"), + __publicField(this, "$grpSwitcher"), + __publicField(this, "isListLoaded", !1), + __publicField(this, "isImgLoaded", !1), + this.editor = e, + this.registerPanel('
    '), + this.registerBtn(this.ctx.$t("emoticon")), + this.registerContentTransformer((e=>this.transEmoticonImageText(e))), + window.setTimeout((()=>{ + this.loadEmoticonsData() + } + ), 1e3) + } + onPanelShow() { + (()=>{ + __async(this, null, (function*() { + yield this.loadEmoticonsData(), + this.isImgLoaded || (this.initEmoticonsList(), + this.isImgLoaded = !0), + setTimeout((()=>{ + this.changeListHeight() + } + ), 30) + } + )) + } + )() + } + onPanelHide() { + this.$panel.parentElement.style.height = "", + this.$btn.classList.remove('active') + } + loadEmoticonsData() { + return __async(this, null, (function*() { + this.isListLoaded || (null === this.loadingTask ? (this.loadingTask = (()=>__async(this, null, (function*() { + g(this.$panel), + this.emoticons = yield this.handleData(this.ctx.conf.emoticons), + f(this.$panel), + this.loadingTask = null, + this.isListLoaded = !0 + } + )))(), + yield this.loadingTask) : yield this.loadingTask) + } + )) + } + handleData(e) { + return __async(this, null, (function*() { + if (!Array.isArray(e) && ["object", "string"].includes(typeof e) && (e = [e]), + !Array.isArray(e)) + return _(this.$panel, "表情包数据必须为 Array/Object/String 类型"), + f(this.$panel), + []; + const t = t=>{ + "object" == typeof t && (t.name && e.find((e=>e.name === t.name)) || e.push(t)) + } + , n = e=>__async(this, null, (function*() { + yield Promise.all(e.map(((e,i)=>__async(this, null, (function*() { + if ("object" != typeof e || Array.isArray(e)) { + if (Array.isArray(e)) + yield n(e); + else if ("string" == typeof e) { + const i = yield this.remoteLoad(e); + Array.isArray(i) ? yield n(i) : "object" == typeof i && t(i) + } + } else + t(e) + } + ))))) + } + )); + return yield n(e), + e.forEach((e=>{ + if (this.isOwOFormat(e)) { + this.convertOwO(e).forEach((e=>{ + t(e) + } + )) + } else + Array.isArray(e) && e.forEach((e=>{ + t(e) + } + )) + } + )), + e = e.filter((e=>"object" == typeof e && !Array.isArray(e) && !!e && !!e.name)), + this.solveNullKey(e), + this.solveSameKey(e), + e + } + )) + } + remoteLoad(e) { + return __async(this, null, (function*() { + if (!e) + return []; + try { + const t = yield fetch(e); + return yield t.json() + } catch (t) { + return f(this.$panel), + _(this.$panel, `表情加载失败 ${String(t)}`), + [] + } + } + )) + } + solveNullKey(e) { + e.forEach((e=>{ + e.items.forEach(((t,n)=>{ + t.key || (t.key = `${e.name} ${n + 1}`) + } + )) + } + )) + } + solveSameKey(e) { + const t = {}; + e.forEach((e=>{ + e.items.forEach((e=>{ + e.key && "" !== String(e.key).trim() && (t[e.key] ? t[e.key]++ : t[e.key] = 1, + t[e.key] > 1 && (e.key = `${e.key} ${t[e.key]}`)) + } + )) + } + )) + } + isOwOFormat(e) { + try { + return "object" == typeof e && !!Object.values(e).length && Array.isArray(Object.keys(Object.values(e)[0].container)) && Object.keys(Object.values(e)[0].container[0]).includes("icon") + } catch (t) { + return !1 + } + } + convertOwO(e) { + const t = []; + return Object.entries(e).forEach((([e,n])=>{ + const i = { + name: e, + type: n.type, + items: [] + }; + n.container.forEach(((t,n)=>{ + const s = t.icon; + if (/<(img|IMG)/.test(s)) { + const e = /src=["'](.*?)["']/.exec(s); + e && e.length > 1 && (t.icon = e[1]) + } + i.items.push({ + key: t.text || `${e} ${n + 1}`, + val: t.icon + }) + } + )), + t.push(i) + } + )), + t + } + initEmoticonsList() { + this.$grpWrap = s('
    '), + this.$panel.append(this.$grpWrap), + this.emoticons.forEach(((e,t)=>{ + const n = s(''); + this.$grpWrap.append(n), + n.setAttribute("data-index", String(t)), + n.setAttribute("data-grp-name", e.name), + n.setAttribute("data-type", e.type), + e.items.forEach((t=>{ + const i = s(''); + if (n.append(i), + "image" === e.type) { + const e = document.createElement("img"); + e.src = t.val, + e.alt = t.key.replace(/\s[0-9]/i, ""), + e.setAttribute("atk-emoticon", t.key), + t.notitle && e.setAttribute("notitle", t.notitle), + i.append(e) + } else + i.innerText = t.val; + i.onclick = ()=>{ + "image" === e.type ? this.editor.insertContent(`:[${t.key}]`) : this.editor.insertContent(t.val || "") + } + } + )) + } + )), + this.emoticons.length > 1 && (this.$grpSwitcher = s('
    '), + this.$panel.append(this.$grpSwitcher), + this.emoticons.forEach(((e,t)=>{ + const n = s(""); + n.innerText = e.name, + n.setAttribute("data-index", String(t)), + n.onclick = ()=>this.openGrp(t), + this.$grpSwitcher.append(n) + } + ))), + this.emoticons.length > 0 && this.openGrp(0) + } + openGrp(e) { + var t, n, i; + Array.from(this.$grpWrap.children).forEach((t=>{ + const n = t; + n.getAttribute("data-index") !== String(e) ? n.style.display = "none" : n.style.display = "" + } + )), + null == (t = this.$grpSwitcher) || t.querySelectorAll("span.active").forEach((e=>e.classList.remove("active"))), + null == (i = null == (n = this.$grpSwitcher) ? void 0 : n.querySelector(`span[data-index="${e}"]`)) || i.classList.add("active"), + this.changeListHeight() + } + changeListHeight() {} + transEmoticonImageText(e) { + return this.emoticons && Array.isArray(this.emoticons) ? (this.emoticons.forEach((t=>{ + "image" === t.type && Object.entries(t.items).forEach((([t,i])=>{ + e = "true" === i.notitle ? e.split(`:[${i.key}]`).join(``) : e.split(`:[${i.key}]`).join(`${i.key.replace(/\s[0-9]/i, `) + } + )) + } + )), + e) : e + } + } + __publicField(sn, "Name", "emoticons"); + class rn extends nn { + constructor(e) { + super(e), + __publicField(this, "$imgUploadInput"), + __publicField(this, "allowImgExts", ["png", "jpg", "jpeg", "gif", "bmp", "svg", "webp"]), + this.$imgUploadInput = document.createElement("input"), + this.$imgUploadInput.type = "file", + this.$imgUploadInput.style.display = "none", + this.$imgUploadInput.accept = this.allowImgExts.map((e=>`.${e}`)).join(","); + const t = this.registerBtn(`${this.ctx.$t("image")}`); + t.after(this.$imgUploadInput), + t.onclick = ()=>{ + const e = this.$imgUploadInput; + e.onchange = ()=>{ + (()=>{ + __async(this, null, (function*() { + if (!e.files || 0 === e.files.length) + return; + const t = e.files[0]; + this.uploadImg(t) + } + )) + } + )() + } + , + e.click() + } + , + this.ctx.conf.imgUpload || this.getBtn().setAttribute("atk-only-admin-show", ""); + const n = e=>{ + if (e) + for (let t = 0; t < e.length; t++) { + const n = e[t]; + this.uploadImg(n) + } + } + ; + this.editor.getUI().$textarea.addEventListener("dragover", (e=>{ + e.stopPropagation(), + e.preventDefault() + } + )), + this.editor.getUI().$textarea.addEventListener("drop", (e=>{ + var t; + const i = null == (t = e.dataTransfer) ? void 0 : t.files; + (null == i ? void 0 : i.length) && (e.preventDefault(), + n(i)) + } + )), + this.editor.getUI().$textarea.addEventListener("paste", (e=>{ + var t; + const i = null == (t = e.clipboardData) ? void 0 : t.files; + (null == i ? void 0 : i.length) && (e.preventDefault(), + n(i)) + } + )) + } + uploadImg(e) { + return __async(this, null, (function*() { + const t = /[^.]+$/.exec(e.name); + if (!t || !this.allowImgExts.includes(t[0])) + return; + if (!lt.checkHasBasicUserInfo()) + return void this.editor.showNotify(this.ctx.$t("uploadLoginMsg"), "w"); + let n = "\n"; + "" === this.editor.getUI().$textarea.value.trim() && (n = ""); + const i = `${n}![](Uploading ${e.name}...)`; + let s; + this.editor.insertContent(i); + try { + s = this.ctx.conf.imgUploader ? { + img_url: yield this.ctx.conf.imgUploader(e) + } : yield this.ctx.getApi().upload.imgUpload(e) + } catch (r) { + console.error(r), + this.editor.showNotify(`${this.ctx.$t("uploadFail")},${r.msg}`, "e") + } + if (s && s.img_url) { + let e = s.img_url; + h(e) || (e = u(this.ctx, e)), + this.editor.setContent(this.editor.getUI().$textarea.value.replace(i, `${n}![](${e})`)) + } else + this.editor.setContent(this.editor.getUI().$textarea.value.replace(i, "")) + } + )) + } + } + __publicField(rn, "Name", "upload"); + class an extends nn { + constructor(e) { + super(e), + __publicField(this, "isBind", !1), + this.registerPanel('
    '); + const t = this.editor.$t("preview"); + this.registerBtn(t) + } + onPanelShow() { + if (this.updateContent(), + !this.isBind) { + const e = ()=>{ + this.updateContent() + } + ; + this.editor.getUI().$textarea.addEventListener("input", e), + this.editor.getUI().$textarea.addEventListener("change", e), + this.isBind = !0 + } + } + updateContent() { + "none" !== this.$panel.style.display && (this.$panel.innerHTML = this.editor.getContentMarked()) + } + } + __publicField(an, "Name", "preview"); + class on extends nn { + constructor(e) { + super(e), + __publicField(this, "queryUserInfo", { + timeout: null, + abortFunc: null + }), + this.registerHeaderInputEvt(((e,t)=>{ + "nick" !== e && "email" !== e || this.fetchUserInfo() + } + )), + this.editor.getUI().$link.addEventListener("change", (()=>{ + const e = this.editor.getUI().$link.value.trim(); + e && !/^(http|https):\/\//.test(e) && (this.editor.getUI().$link.value = `https://${e}`, + lt.update({ + link: this.editor.getUI().$link.value + })) + } + )) + } + fetchUserInfo() { + lt.logout(), + this.queryUserInfo.timeout && window.clearTimeout(this.queryUserInfo.timeout), + this.queryUserInfo.abortFunc && this.queryUserInfo.abortFunc(), + this.queryUserInfo.timeout = window.setTimeout((()=>{ + this.queryUserInfo.timeout = null; + const {req: e, abort: t} = this.ctx.getApi().user.userGet(lt.data.nick, lt.data.email); + this.queryUserInfo.abortFunc = t, + e.then((e=>{ + var t; + e.is_login || lt.logout(), + this.ctx.updateNotifies(e.unread), + lt.checkHasBasicUserInfo() && !e.is_login && (null == (t = e.user) ? void 0 : t.is_admin) && this.showLoginDialog(), + e.user && e.user.link && (this.editor.getUI().$link.value = e.user.link, + lt.update({ + link: e.user.link + })) + } + )).catch((()=>{} + )).finally((()=>{ + this.queryUserInfo.abortFunc = null + } + )) + } + ), 400) + } + showLoginDialog() { + this.ctx.checkAdmin({ + onSuccess: ()=>{} + }) + } + } + __publicField(on, "Name", "headerInput"); + const ln = [sn, rn, an, on]; + function cn(e) { + const t = { + editor: e, + plugList: {}, + openedPlugName: null, + openPlugPanel: e=>dn(t, e), + closePlugPanel: ()=>hn(t), + triggerHeaderInputEvt: (e,n)=>function(e, t, n) { + Object.entries(e.plugList).forEach((([e,i])=>{ + i.onHeaderInput && i.onHeaderInput(t, n) + } + )) + }(t, e, n), + triggerContentUpdatedEvt: e=>function(e, t) { + Object.entries(e.plugList).forEach((([e,n])=>{ + n.onContentUpdated && n.onContentUpdated(t) + } + )) + }(t, e), + getTransformedContent: e=>function(e, t) { + let n = t; + return Object.entries(e.plugList).forEach((([e,t])=>{ + t.contentTransformer && (n = t.contentTransformer(n)) + } + )), + n + }(t, e) + }; + e.getUI().$plugPanelWrap.innerHTML = "", + e.getUI().$plugPanelWrap.style.display = "none", + e.getUI().$plugBtnWrap.innerHTML = ""; + const n = [{ + k: "upload", + v: (i = e.conf).imgUpload + }, { + k: "emoticons", + v: i.emoticons + }, { + k: "preview", + v: i.preview + }].filter((e=>!e.v)).flatMap((e=>e.k)); + var i; + return ln.filter((e=>!n.includes(e.Name))).forEach((e=>{ + !function(e, t) { + const n = t.Name + , i = new t(e.editor); + e.plugList[n] = i, + function(e, t, n) { + const i = n.getBtn(); + if (!i) + return; + e.editor.getUI().$plugBtnWrap.appendChild(i), + i.onclick = i.onclick || (s=>{ + s.stopPropagation(), + e.editor.getUI().$plugBtnWrap.querySelectorAll(".active").forEach((e=>e.classList.remove("active"))), + t !== e.openedPlugName ? (dn(e, t), + i.classList.add("active")) : hn(e) + } + ); + const s = n.getPanel(); + s && (s.setAttribute("data-plug-name", t), + s.style.display = "none", + e.editor.getUI().$plugPanelWrap.appendChild(s)) + }(e, n, i) + }(t, e) + } + )), + t + } + function dn(e, t) { + Object.entries(e.plugList).forEach((([e,n])=>{ + const i = n.getPanel(); + i && (e === t ? (i.style.display = "", + n.onPanelShow && n.onPanelShow()) : (i.style.display = "none", + n.onPanelHide && n.onPanelHide())) + } + )), + e.editor.getUI().$plugPanelWrap.style.display = "", + e.openedPlugName = t + } + function hn(e) { + if (!e.openedPlugName) + return; + const t = e.plugList[e.openedPlugName]; + t && (t.onPanelHide && t.onPanelHide(), + e.editor.getUI().$plugPanelWrap.style.display = "none", + e.openedPlugName = null) + } + function un(e) { + const t = { + editor: e, + comment: void 0, + setReply: (e,n,i)=>function(e, t, n, i=!0) { + e.editor.cancelEditComment(), + pn(e); + const r = e.editor.getUI(); + r.$sendReply || (r.$sendReply = s(`
    ${e.editor.$t("reply")} ×
    `), + r.$sendReply.querySelector(".atk-text").innerText = `@${t.nick}`, + r.$sendReply.addEventListener("click", (()=>{ + e.editor.cancelReply() + } + )), + r.$textareaWrap.append(r.$sendReply)); + e.comment = t, + e.editor.travel(n), + i && k(r.$el); + r.$textarea.focus() + }(t, e, n, i), + cancelReply: ()=>pn(t) + }; + return t + } + function pn(e) { + if (!e.comment) + return; + const t = e.editor.getUI(); + t.$sendReply && (t.$sendReply.remove(), + t.$sendReply = void 0), + e.comment = void 0, + e.editor.travelBack() + } + function mn(e) { + const t = { + editor: e, + comment: void 0, + setEdit: (e,n)=>function(e, t, n) { + gn(e), + e.editor.cancelReply(); + const i = e.editor.getUI(); + if (!i.$editCancelBtn) { + const t = s(`
    ${e.editor.$t("editCancel")} ×
    `); + t.onclick = ()=>{ + gn(e) + } + , + i.$textareaWrap.append(t), + i.$editCancelBtn = t + } + e.comment = t, + i.$header.style.display = "none", + e.editor.travel(n), + i.$nick.value = t.nick || "", + i.$email.value = t.email || "", + i.$link.value = t.link || "", + e.editor.setContent(t.content), + i.$textarea.focus(), + e.editor.refreshSendBtnText() + }(t, e, n), + cancelEdit: ()=>gn(t) + }; + return function(e) { + e.editor.getSubmitManager().registerCustom({ + activeCond: ()=>!!e.comment, + req: ()=>__async(this, null, (function*() { + const t = { + content: e.editor.getFinalContent(), + nick: e.editor.getUI().$nick.value, + email: e.editor.getUI().$email.value, + link: e.editor.getUI().$link.value + }; + return yield e.editor.ctx.getApi().comment.commentEdit(__spreadValues(__spreadValues({}, e.comment), t)) + } + )), + post: t=>{ + e.editor.ctx.updateComment(t) + } + }) + }(t), + t + } + function gn(e) { + if (!e.comment) + return; + const t = e.editor.getUI(); + t.$editCancelBtn && (t.$editCancelBtn.remove(), + t.$editCancelBtn = void 0), + e.comment = void 0, + e.editor.travelBack(); + const {nick: n, email: i, link: s} = lt.data; + t.$nick.value = n, + t.$email.value = i, + t.$link.value = s, + e.editor.setContent(""), + e.editor.refreshSendBtnText(), + t.$header.style.display = "" + } + function fn(e) { + const t = { + editor: e, + do: ()=>function(e) { + return __async(this, null, (function*() { + if ("" === e.editor.getFinalContent().trim()) + return void e.editor.focus(); + const t = e.customs.find((e=>e.activeCond())); + e.editor.ctx.trigger("editor-submit"), + e.editor.showLoading(); + try { + let n; + (null == t ? void 0 : t.pre) && t.pre(), + n = (null == t ? void 0 : t.req) ? yield t.req() : yield function(e) { + return __async(this, null, (function*() { + const t = yield e.editor.ctx.getApi().comment.add(__spreadValues({}, function(e) { + var t; + const {nick: n, email: i, link: s} = lt.data + , r = e.editor.ctx.conf + , a = null == (t = e.editor.getReplyManager()) ? void 0 : t.comment; + return { + content: e.editor.getFinalContent(), + nick: n, + email: i, + link: s, + rid: a ? a.id : 0, + page_key: a ? a.page_key : r.pageKey, + page_title: a ? void 0 : r.pageTitle, + site_name: a ? a.site_name : r.site + } + }(e))); + return t + } + )) + }(e), + (null == t ? void 0 : t.post) ? t.post(n) : function(e, t) { + const n = e.editor.getReplyManager() + , i = e.editor.ctx.conf; + (null == n ? void 0 : n.comment) && n.comment.page_key !== i.pageKey && window.open(`${n.comment.page_url}#atk-comment-${t.id}`); + e.editor.ctx.insertComment(t) + }(e, n) + } catch (n) { + return console.error(n), + void e.editor.showNotify(`${e.editor.$t("commentFail")},${n.msg || String(n)}`, "e") + } finally { + e.editor.hideLoading() + } + e.editor.reset(), + e.editor.ctx.trigger("editor-submitted") + } + )) + }(t), + customs: [], + registerCustom: e=>{ + t.customs.push(e) + } + }; + return t + } + const kn = { + localStorage: function(e) { + const t = window.localStorage.getItem("ArtalkContent") || ""; + "" !== t.trim() && (e.showNotify(e.$t("restoredMsg"), "i"), + e.setContent(t)); + e.getUI().$textarea.addEventListener("input", (()=>e.saveToLocalStorage())) + }, + header: function(e) { + const t = e.getHeaderInputEls(); + Object.entries(t).forEach((([t,n])=>{ + n.value = lt.data[t] || "", + n.addEventListener("input", (()=>function(e, t, n) { + var i; + if (e.isEditMode) + return; + lt.update({ + [t]: n.value.trim() + }), + null == (i = e.getPlugs()) || i.triggerHeaderInputEvt(t, n) + }(e, t, n))), + n.placeholder = `${e.$t(t)}` + } + )) + }, + textarea: function(e) { + e.getUI().$textarea.placeholder = e.ctx.conf.placeholder || e.$t("placeholder"), + e.getUI().$textarea.addEventListener("keydown", (t=>{ + 9 === (t.keyCode || t.which) && (t.preventDefault(), + e.insertContent("\t")) + } + )), + e.getUI().$textarea.addEventListener("input", (()=>{ + e.adjustTextareaHeight() + } + )) + }, + submitBtn: function(e) { + e.refreshSendBtnText(), + e.getUI().$submitBtn.addEventListener("click", (()=>e.submit())) + }, + submitManager: function(e) { + e.setSubmitManager(fn(e)) + }, + plugs: function(e) { + e.setPlugs(cn(e)) + }, + mover: function(e) { + if (!e.conf.editorTravel) + return; + e.setMover(tn(e)) + }, + replyManager: function(e) { + e.setReplyManager(un(e)) + }, + editModeManager: function(e) { + e.setEditModeManager(mn(e)) + } + }; + const yn = { + $header: ".atk-header", + $nick: '.atk-header [name="nick"]', + $email: '.atk-header [name="email"]', + $link: '.atk-header [name="link"]', + $textareaWrap: ".atk-textarea-wrap", + $textarea: ".atk-textarea", + $bottom: ".atk-bottom", + $submitBtn: ".atk-send-btn", + $notifyWrap: ".atk-notify-wrap", + $plugBtnWrap: ".atk-plug-btn-wrap", + $plugPanelWrap: ".atk-plug-panel-wrap" + }; + class bn extends m { + constructor(e) { + super(e), + __publicField(this, "ui"), + __publicField(this, "plugs"), + __publicField(this, "mover"), + __publicField(this, "reply"), + __publicField(this, "editMode"), + __publicField(this, "submitManager"), + this.ui = function() { + const e = s('
    \n
    \n \n \n \n
    \n
    \n \n
    \n \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n') + , t = { + $el: e + }; + return Object.entries(yn).forEach((([n,i])=>{ + t[n] = e.querySelector(i) + } + )), + t + }(), + this.$el = this.ui.$el, + this.ctx.on("conf-loaded", (()=>{ + var e; + e = this, + Object.entries(kn).forEach((([t,n])=>{ + n(e) + } + )) + } + )) + } + getUI() { + return this.ui + } + getPlugs() { + return this.plugs + } + setPlugs(e) { + this.plugs = e + } + setMover(e) { + this.mover = e + } + setReplyManager(e) { + this.reply = e + } + getReplyManager() { + return this.reply + } + get isReplyMode() { + var e; + return !!(null == (e = this.reply) ? void 0 : e.comment) + } + setEditModeManager(e) { + this.editMode = e + } + get isEditMode() { + var e; + return !!(null == (e = this.editMode) ? void 0 : e.comment) + } + setSubmitManager(e) { + this.submitManager = e + } + getSubmitManager() { + return this.submitManager + } + getHeaderInputEls() { + return { + nick: this.ui.$nick, + email: this.ui.$email, + link: this.ui.$link + } + } + saveToLocalStorage() { + window.localStorage.setItem("ArtalkContent", this.getContentOriginal().trim()) + } + refreshSendBtnText() { + this.isEditMode ? this.ui.$submitBtn.innerText = this.$t("save") : this.ui.$submitBtn.innerText = this.ctx.conf.sendBtn || this.$t("send") + } + getFinalContent() { + let e = this.getContentOriginal(); + return this.plugs && (e = this.plugs.getTransformedContent(e)), + e + } + getContentOriginal() { + return this.ui.$textarea.value || "" + } + getContentMarked() { + return Xe(this.ctx, this.getFinalContent()) + } + setContent(e) { + this.ui.$textarea.value = e, + this.saveToLocalStorage(), + this.plugs && this.plugs.triggerContentUpdatedEvt(e), + window.setTimeout((()=>{ + this.adjustTextareaHeight() + } + ), 80) + } + insertContent(e) { + const t = document.querySelector("#owo-big"); + if (t && t.style && (t.style.display = "none"), + document.selection) + this.ui.$textarea.focus(), + document.selection.createRange().text = e, + this.ui.$textarea.focus(); + else if (this.ui.$textarea.selectionStart || 0 === this.ui.$textarea.selectionStart) { + const t = this.ui.$textarea.selectionStart + , n = this.ui.$textarea.selectionEnd + , i = this.ui.$textarea.scrollTop; + this.setContent(this.ui.$textarea.value.substring(0, t) + e + this.ui.$textarea.value.substring(n, this.ui.$textarea.value.length)), + this.ui.$textarea.focus(), + this.ui.$textarea.selectionStart = t + e.length, + this.ui.$textarea.selectionEnd = t + e.length, + this.ui.$textarea.scrollTop = i + } else + this.ui.$textarea.focus(), + this.ui.$textarea.value += e + } + adjustTextareaHeight() { + const e = this.ui.$textarea.offsetHeight - this.ui.$textarea.clientHeight; + this.ui.$textarea.style.height = "0px", + this.ui.$textarea.style.height = `${this.ui.$textarea.scrollHeight + e}px` + } + focus() { + this.ui.$textarea.focus() + } + reset() { + this.setContent(""), + this.cancelReply(), + this.cancelEditComment() + } + setReply(e, t, n=!0) { + var i; + null == (i = this.reply) || i.setReply(e, t, n) + } + cancelReply() { + var e; + null == (e = this.reply) || e.cancelReply() + } + setEditComment(e, t) { + var n; + null == (n = this.editMode) || n.setEdit(e, t) + } + cancelEditComment() { + var e; + null == (e = this.editMode) || e.cancelEdit() + } + showNotify(e, t) { + y(this.ui.$notifyWrap, e, t) + } + showLoading() { + g(this.ui.$el) + } + hideLoading() { + f(this.ui.$el) + } + submit() { + return __async(this, null, (function*() { + this.submitManager && (yield this.submitManager.do()) + } + )) + } + close() { + this.ui.$textareaWrap.querySelector(".atk-comment-closed") || this.ui.$textareaWrap.prepend(s(`
    ${this.$t("onlyAdminCanReply")}
    `)), + lt.data.isAdmin ? (this.ui.$textarea.style.display = "", + this.ui.$bottom.style.display = "") : (this.ui.$textarea.style.display = "none", + this.closePlugPanel(), + this.ui.$bottom.style.display = "none") + } + open() { + var e; + null == (e = this.ui.$textareaWrap.querySelector(".atk-comment-closed")) || e.remove(), + this.ui.$textarea.style.display = "", + this.ui.$bottom.style.display = "" + } + travel(e) { + var t; + null == (t = this.mover) || t.move(e) + } + travelBack() { + var e; + null == (e = this.mover) || e.back() + } + openPlugPanel(e) { + var t; + null == (t = this.plugs) || t.openPlugPanel(e) + } + closePlugPanel() { + var e; + null == (e = this.plugs) || e.closePlugPanel() + } + } + class _n extends m { + constructor(e) { + super(e), + __publicField(this, "layer"), + __publicField(this, "$header"), + __publicField(this, "$closeBtn"), + __publicField(this, "$iframeWrap"), + __publicField(this, "$iframe"), + __publicField(this, "firstShow", !0), + this.$el = s('
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n'), + this.$header = this.$el.querySelector(".atk-sidebar-header"), + this.$closeBtn = this.$header.querySelector(".atk-sidebar-close"), + this.$iframeWrap = this.$el.querySelector(".atk-sidebar-iframe-wrap"), + this.$closeBtn.onclick = ()=>{ + this.hide() + } + , + this.ctx.on("user-changed", (()=>{ + this.firstShow = !0 + } + )) + } + show() { + return __async(this, arguments, (function*(e={}) { + if (this.$el.style.transform = "", + null == this.layer && (this.layer = new x(this.ctx,"sidebar",this.$el), + this.layer.afterHide = ()=>{ + !0 === this.ctx.conf.editorTravel && this.ctx.editorTravelBack() + } + ), + this.layer.show(), + (()=>{ + __async(this, null, (function*() { + var t; + const n = yield this.ctx.getApi().user.loginStatus(); + n.is_admin && !n.is_login && (null == (t = this.layer) || t.hide(), + this.firstShow = !0, + this.ctx.checkAdmin({ + onSuccess: ()=>{ + setTimeout((()=>{ + this.show(e) + } + ), 500) + } + , + onCancel: ()=>{} + })) + } + )) + } + )(), + this.firstShow) { + this.$iframeWrap.innerHTML = "", + this.$iframe = s(""); + const t = u(this.ctx, "/sidebar/") + , n = { + pageKey: this.conf.pageKey, + site: this.conf.site || "", + user: JSON.stringify(lt.data), + time: +new Date + }; + e.view && (n.view = e.view), + this.conf.darkMode && (n.darkMode = "1"), + "string" == typeof this.conf.locale && (n.locale = this.conf.locale); + const i = new URLSearchParams(n); + this.iframeLoad(`${t}?${i.toString()}`), + this.$iframeWrap.append(this.$iframe), + this.firstShow = !1 + } else { + const e = this.$iframe.src.includes("darkMode=1"); + this.conf.darkMode && !e && this.iframeLoad(`${this.$iframe.src}&darkMode=1`), + !this.conf.darkMode && e && this.iframeLoad(this.$iframe.src.replace("&darkMode=1", "")) + } + setTimeout((()=>{ + this.$el.style.transform = "translate(0, 0)" + } + ), 100), + setTimeout((()=>{ + this.ctx.updateNotifies([]) + } + ), 0), + this.ctx.trigger("sidebar-show") + } + )) + } + hide() { + var e; + this.$el.style.transform = "", + null == (e = this.layer) || e.hide(), + this.ctx.trigger("sidebar-hide") + } + iframeLoad(e) { + this.$iframe && (this.$iframe.src = e, + g(this.$iframeWrap), + this.$iframe.onload = ()=>{ + f(this.$iframeWrap) + } + ) + } + } + const $n = { + i18n(e) { + rt(e.conf.locale), + e.on("conf-loaded", (()=>{ + rt(e.conf.locale) + } + )) + }, + markdown() { + !function() { + try { + if (!ue.name) + return + } catch (i) { + return + } + const e = new ue.Renderer + , t = e.link; + e.link = (n,i,s)=>{ + const r = null == n ? void 0 : n.startsWith(`${window.location.protocol}//${window.location.hostname}`); + return t.call(e, n, i, s).replace(/^{ + const n = t || "plaintext"; + let i = e; + return window.hljs ? n && window.hljs.getLanguage(n) && (i = window.hljs.highlight(n, e).value) : i = Ge(e), + `
    \n${i.replace(/&/g, "&")}\n
    ` + } + ; + const n = ue; + ue.setOptions({ + renderer: e, + pedantic: !1, + gfm: !0, + breaks: !0, + smartLists: !0, + smartypants: !0, + xhtml: !1, + sanitize: !1, + silent: !0 + }), + Ke = n + }() + }, + user: e=>(lt.setContext(e), + lt), + api: e=>new en(e), + checkerLauncher: e=>new Gt(e), + editor(e) { + const t = new bn(e); + return e.$root.appendChild(t.$el), + t + }, + list(e) { + const t = new Wt(e); + return e.$root.appendChild(t.$el), + t.fetchComments(0), + t + }, + layer(e) { + x.BodyOrgOverflow = document.body.style.overflow, + x.BodyOrgPaddingRight = document.body.style.paddingRight + }, + sidebarLayer: e=>new _n(e), + eventsDefault(e) { + window.addEventListener("hashchange", (()=>{ + e.listHashGotoCheck() + } + )), + e.on("user-changed", (()=>{ + e.checkAdminShowEl(), + e.listRefreshUI() + } + )) + }, + darkMode(e) { + S(e), + e.on("conf-loaded", (()=>{ + S(e) + } + )) + } + }; + function xn(e) { + return __async(this, null, (function*() { + const t = e.ctx.conf.countEl; + t && document.querySelector(t) && vn(e, { + api: "page_comment", + countEl: t + }); + const n = e.pvAdd ? yield e.ctx.getApi().page.pv() : void 0 + , i = e.ctx.conf.pvEl; + i && document.querySelector(i) && vn(e, { + api: "page_pv", + countEl: i, + curtPageCount: n + }) + } + )) + } + function vn(e, t) { + return __async(this, null, (function*() { + let n = {}; + const i = e.ctx.conf.pageKey; + t.curtPageCount && (n[i] = t.curtPageCount); + let s = Array.from(document.querySelectorAll(t.countEl)).map((e=>e.getAttribute("data-page-key") || i)).filter((e=>void 0 === n[e])); + if (s = [...new Set(s)], + s.length > 0) { + const i = yield e.ctx.getApi().page.stat(t.api, s); + n = __spreadValues(__spreadValues({}, n), i) + } + document.querySelectorAll(t.countEl).forEach((e=>{ + const t = e.getAttribute("data-page-key") || i; + e.innerHTML = `${Number(n[t] || 0)}` + } + )) + } + )) + } + const wn = class e { + constructor(t) { + __publicField(this, "conf"), + __publicField(this, "ctx"), + __publicField(this, "$root"), + e.instance && e.destroy(), + this.conf = qt(t), + this.conf.el instanceof HTMLElement && (this.$root = this.conf.el), + this.showOwoBig(this.conf.el), + this.ctx = new Nt(this.conf,this.$root), + Object.entries($n).forEach((([t,n])=>{ + if (e.DisabledComponents.includes(t)) + return; + const i = n(this.ctx); + i && this.ctx.inject(t, i) + } + )), + e.plugins.forEach((e=>{ + "function" == typeof e && e(this.ctx) + } + )) + } + /** 表情包放大 */ + showOwoBig(e) { + const t = 200 + , i = document.querySelector("body"); + let n = document.createElement("div"); + document.querySelector("#owo-big") ? n = document.querySelector("#owo-big") : (n.id = "owo-big", + i.appendChild(n)); + new MutationObserver((e=>{ + var s, r, a, o, l, c, h, d; + for (let u = 0; u < e.length; u++) { + const p = e[u].addedNodes; + let m = 1 + , g = 0; + ((null == (r = null == (s = p[0]) ? void 0 : s.classList) ? void 0 : r.contains("atk-grp")) || (null == (o = null == (a = p[0]) ? void 0 : a.classList) ? void 0 : o.contains("atk-comment-wrap")) || (null == (l = p[0]) ? void 0 : l.attributes) && (null == (c = p[0]) ? void 0 : c.attributes["atk-emoticon"]) || "function" == typeof (null == (h = p[0]) ? void 0 : h.querySelector) && (null == (d = p[0]) ? void 0 : d.querySelector("img[atk-emoticon]"))) && (p[0].onmouseover = e=>{ + m && "IMG" === e.target.tagName && e.target.attributes["atk-emoticon"] && (m = 0, + g = setTimeout((()=>{ + const s = "true" === e.target.getAttribute("notitle") ? "" : e.target.alt || "" + , r = e.target.clientHeight + , a = e.target.clientWidth; + if (r <= t && a <= t) { + const o = e.target.naturalHeight + , l = e.target.naturalWidth + , c = 2 * r + , h = 2 * a + , d = o > r ? c < o && o < t ? c : o : r + , u = l > a ? h < l && l < t ? h : l : a; + let p = 0 + , m = 0; + u / d >= 1 ? u >= t ? (p = t, + m = d * t / u) : (p = u, + m = d) : d >= t ? (m = t, + p = u * t / d) : (p = u, + m = d); + const g = e.y - e.offsetY; + let f = e.x - e.offsetX - (p - e.target.clientWidth) / 2; + f + p > i.clientWidth && (f -= f + p - i.clientWidth + 10), + f < 0 && (f = 10), + "" !== s && (m += 10), + n.style.cssText = `display:block;height:${m + 34}px;width:${p + 34}px;left:${f}px;top:${g}px;`, + n.innerHTML = `

    ${s}

    ` + } + } + ), 300)) + } + , + p[0].onmouseout = ()=>{ + m = 1, + n.style.display = "none", + clearTimeout(g) + } + ) + } + } + )).observe(e, { + subtree: !0, + childList: !0 + }) + } + static init(t) { + return this.instance && e.destroy(), + this.instance = new e(t), + this.instance + } + use(t) { + e.plugins.push(t), + "function" == typeof t && t(this.ctx) + } + update(t) { + if (!e.instance) + throw Error("cannot call `update` function before call `load`"); + return e.instance.ctx.updateConf(t), + e.instance + } + reload() { + this.ctx.listReload() + } + destroy() { + if (!e.instance) + throw Error("cannot call `destroy` function before call `load`"); + e.instance.$root.remove(), + delete e.instance + } + on(e, t) { + this.ctx.on(e, t, "external") + } + off(e, t) { + this.ctx.off(e, t, "external") + } + trigger(e, t) { + this.ctx.trigger(e, t, "external") + } + setDarkMode(e) { + this.ctx.setDarkMode(e) + } + static use(e) { + this.plugins.push(e), + this.instance && "function" == typeof e && e(this.instance.ctx) + } + static update(e) { + var t; + return null == (t = this.instance) ? void 0 : t.update(e) + } + static reload() { + var e; + null == (e = this.instance) || e.reload() + } + static destroy() { + var e; + null == (e = this.instance) || e.destroy() + } + static on(e, t) { + var n; + null == (n = this.instance) || n.on(e, t) + } + static off(e, t) { + var n; + null == (n = this.instance) || n.off(e, t) + } + static trigger(e, t) { + var n; + null == (n = this.instance) || n.trigger(e, t) + } + static setDarkMode(e) { + var t; + null == (t = this.instance) || t.setDarkMode(e) + } + static loadCountWidget(e) { + const t = new Nt(qt(e)); + t.inject("api", new en(t)), + xn({ + ctx: t, + pvAdd: !1 + }) + } + static LoadCountWidget(e) { + console.warn("The method `LoadCountWidget` is deprecated, please use `loadCountWidget` instead."), + this.loadCountWidget(e) + } + } + ; + return __publicField(wn, "instance"), + __publicField(wn, "ListLite", jt), + __publicField(wn, "defaults", Dt), + __publicField(wn, "plugins", [e=>{ + e.conf.useBackendConf ? e.on("list-loaded", (()=>{ + xn({ + ctx: e, + pvAdd: !0 + }) + } + )) : xn({ + ctx: e, + pvAdd: !0 + }) + } + ]), + __publicField(wn, "DisabledComponents", []), + wn + } +)); diff --git a/templates/assets/libs/color-thief/color-thief.umd.js b/templates/assets/libs/color-thief/color-thief.umd.js deleted file mode 100644 index 13ae4072..00000000 --- a/templates/assets/libs/color-thief/color-thief.umd.js +++ /dev/null @@ -1 +0,0 @@ -!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):t.ColorThief=r()}(this,function(){if(!t)var t={map:function(t,r){var n={};return r?t.map(function(t,o){return n.index=o,r.call(n,t)}):t.slice()},naturalOrder:function(t,r){return tr?1:0},sum:function(t,r){var n={};return t.reduce(r?function(t,o,e){return n.index=e,t+r.call(n,o)}:function(t,r){return t+r},0)},max:function(r,n){return Math.max.apply(null,n?t.map(r,n):r)}};var r=function(){var r=5,n=8-r,o=1e3;function e(t,n,o){return(t<<2*r)+(n<f/2){for(e=n.copy(),i=n.copy(),u=(r=a-n[s])<=(o=n[h]-a)?Math.min(n[h]-1,~~(a+o/2)):Math.max(n[s],~~(a-1-r/2));!v[u];)u++;for(c=l[u];!c&&v[u-1];)c=l[--u];return e[h]=u,i[s]=e[h]+1,[e,i]}}(u==o?"r":u==i?"g":"b")}}return u.prototype={volume:function(t){return this._volume&&!t||(this._volume=(this.r2-this.r1+1)*(this.g2-this.g1+1)*(this.b2-this.b1+1)),this._volume},count:function(t){var r=this.histo;if(!this._count_set||t){var n,o,i,u=0;for(n=this.r1;n<=this.r2;n++)for(o=this.g1;o<=this.g2;o++)for(i=this.b1;i<=this.b2;i++)u+=r[e(n,o,i)]||0;this._count=u,this._count_set=!0}return this._count},copy:function(){return new u(this.r1,this.r2,this.g1,this.g2,this.b1,this.b2,this.histo)},avg:function(t){var n=this.histo;if(!this._avg||t){var o,i,u,a,s=0,h=1<<8-r,c=0,f=0,v=0;for(i=this.r1;i<=this.r2;i++)for(u=this.g1;u<=this.g2;u++)for(a=this.b1;a<=this.b2;a++)s+=o=n[e(i,u,a)]||0,c+=o*(i+.5)*h,f+=o*(u+.5)*h,v+=o*(a+.5)*h;this._avg=s?[~~(c/s),~~(f/s),~~(v/s)]:[~~(h*(this.r1+this.r2+1)/2),~~(h*(this.g1+this.g2+1)/2),~~(h*(this.b1+this.b2+1)/2)]}return this._avg},contains:function(t){var r=t[0]>>n;return gval=t[1]>>n,bval=t[2]>>n,r>=this.r1&&r<=this.r2&&gval>=this.g1&&gval<=this.g2&&bval>=this.b1&&bval<=this.b2}},a.prototype={push:function(t){this.vboxes.push({vbox:t,color:t.avg()})},palette:function(){return this.vboxes.map(function(t){return t.color})},size:function(){return this.vboxes.size()},map:function(t){for(var r=this.vboxes,n=0;n251&&e[1]>251&&e[2]>251&&(r[o].color=[255,255,255])}},{quantize:function(h,c){if(!h.length||c<2||c>256)return!1;var f=function(t){var o,i=new Array(1<<3*r);return t.forEach(function(t){o=e(t[0]>>n,t[1]>>n,t[2]>>n),i[o]=(i[o]||0)+1}),i}(h);f.forEach(function(){});var v=function(t,r){var o,e,i,a=1e6,s=0,h=1e6,c=0,f=1e6,v=0;return t.forEach(function(t){(o=t[0]>>n)s&&(s=o),(e=t[1]>>n)c&&(c=e),(i=t[2]>>n)v&&(v=i)}),new u(a,s,h,c,f,v,r)}(h,f),l=new i(function(r,n){return t.naturalOrder(r.count(),n.count())});function g(t,r){for(var n,e=t.size(),i=0;i=r)return;if(i++>o)return;if((n=t.pop()).count()){var u=s(f,n),a=u[0],h=u[1];if(!a)return;t.push(a),h&&(t.push(h),e++)}else t.push(n),i++}}l.push(v),g(l,.75*c);for(var p=new i(function(r,n){return t.naturalOrder(r.count()*r.volume(),n.count()*n.volume())});l.size();)p.push(l.pop());g(p,c);for(var d=new a;p.size();)d.push(p.pop());return d}}}().quantize,n=function(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.width=this.canvas.width=t.naturalWidth,this.height=this.canvas.height=t.naturalHeight,this.context.drawImage(t,0,0,this.width,this.height)};n.prototype.getImageData=function(){return this.context.getImageData(0,0,this.width,this.height)};var o=function(){};return o.prototype.getColor=function(t,r){return void 0===r&&(r=10),this.getPalette(t,5,r)[0]},o.prototype.getPalette=function(t,o,e){var i=function(t){var r=t.colorCount,n=t.quality;if(void 0!==r&&Number.isInteger(r)){if(1===r)throw new Error("colorCount should be between 2 and 20. To get one color, call getColor() instead of getPalette()");r=Math.max(r,2),r=Math.min(r,20)}else r=10;return(void 0===n||!Number.isInteger(n)||n<1)&&(n=10),{colorCount:r,quality:n}}({colorCount:o,quality:e}),u=new n(t),a=function(t,r,n){for(var o=t,e=[],i=0,u=void 0,a=void 0,s=void 0,h=void 0,c=void 0;i=125)&&(a>250&&s>250&&h>250||e.push([a,s,h]));return e}(u.getImageData().data,u.width*u.height,i.quality),s=r(a,i.colorCount);return s?s.palette():null},o.prototype.getColorFromUrl=function(t,r,n){var o=this,e=document.createElement("img");e.addEventListener("load",function(){var i=o.getPalette(e,5,n);r(i[0],t)}),e.src=t},o.prototype.getImageData=function(t,r){var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=function(){if(200==this.status){var t=new Uint8Array(this.response);i=t.length;for(var n=new Array(i),o=0;o",preload:!0,css:{},attr:{scrolling:"auto"}},video:{tpl:"
    download and watch with your favorite video player!",format:"",autoStart:!0},defaultType:"image",animationEffect:"zoom",animationDuration:366,zoomOpacity:"auto",transitionEffect:"fade",transitionDuration:366,slideClass:"",baseClass:"",baseTpl:"
     / 
    {{buttons}}
    {{arrows}}
    ",spinnerTpl:"
    ",errorTpl:"

    {{ERROR}}

    ",btnTpl:{download:"",zoom:"",close:"",arrowLeft:"",arrowRight:"",smallBtn:""},parentEl:"body",hideScrollbar:!0,autoFocus:!0,backFocus:!0,trapFocus:!0,fullScreen:{autoStart:!1},touch:{vertical:!0,momentum:!0},hash:null,media:{},slideShow:{autoStart:!1,speed:3e3},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".fancybox-container",axis:"y"},wheel:"auto",onInit:n.noop,beforeLoad:n.noop,afterLoad:n.noop,beforeShow:n.noop,afterShow:n.noop,beforeClose:n.noop,afterClose:n.noop,onActivate:n.noop,onDeactivate:n.noop,clickContent:function(t,e){return"image"===t.type&&"zoom";},clickSlide:"close",clickOutside:"close",dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1,mobile:{preventCaptionOverlap:!1,idleTime:!1,clickContent:function(t,e){return"image"===t.type&&"toggleControls";},clickSlide:function(t,e){return"image"===t.type?"toggleControls":"close";},dblclickContent:function(t,e){return"image"===t.type&&"zoom";},dblclickSlide:function(t,e){return"image"===t.type&&"zoom";}},lang:"en",i18n:{en:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",ERROR:"The requested content cannot be loaded.
    Please try again later.",PLAY_START:"Start slideshow",PLAY_STOP:"Pause slideshow",FULL_SCREEN:"Full screen",THUMBS:"Thumbnails",DOWNLOAD:"Download",SHARE:"Share",ZOOM:"Zoom"},de:{CLOSE:"Schließen",NEXT:"Weiter",PREV:"Zurück",ERROR:"Die angeforderten Daten konnten nicht geladen werden.
    Bitte versuchen Sie es später nochmal.",PLAY_START:"Diaschau starten",PLAY_STOP:"Diaschau beenden",FULL_SCREEN:"Vollbild",THUMBS:"Vorschaubilder",DOWNLOAD:"Herunterladen",SHARE:"Teilen",ZOOM:"Vergrößern"}}},s=n(t),r=n(e),c=0,l=function(t){return t&&t.hasOwnProperty&&t instanceof n;},d=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60);};}(),u=function(){return t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||function(e){t.clearTimeout(e);};}(),f=function(){var t,n=e.createElement("fakeelement"),o={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in o)if(void 0!==n.style[t])return o[t];return"transitionend";}(),p=function(t){return t&&t.length&&t[0].offsetHeight;},h=function(t,e){var o=n.extend(!0,{},t,e);return n.each(e,function(t,e){n.isArray(e)&&(o[t]=e);}),o;},g=function(t){var o,i;return!(!t||t.ownerDocument!==e)&&(n(".fancybox-container").css("pointer-events","none"),o={x:t.getBoundingClientRect().left+t.offsetWidth/2,y:t.getBoundingClientRect().top+t.offsetHeight/2},i=e.elementFromPoint(o.x,o.y)===t,n(".fancybox-container").css("pointer-events",""),i);},b=function(t,e,o){var i=this;i.opts=h({index:o},n.fancybox.defaults),n.isPlainObject(e)&&(i.opts=h(i.opts,e)),n.fancybox.isMobile&&(i.opts=h(i.opts,i.opts.mobile)),i.id=i.opts.id||++c,i.currIndex=parseInt(i.opts.index,10)||0,i.prevIndex=null,i.prevPos=null,i.currPos=0,i.firstRun=!0,i.group=[],i.slides={},i.addContent(t),i.group.length&&i.init();};n.extend(b.prototype,{init:function(){var o,i,a=this,s=a.group[a.currIndex],r=s.opts;r.closeExisting&&n.fancybox.close(!0),n("body").addClass("fancybox-active"),!n.fancybox.getInstance()&&!1!==r.hideScrollbar&&!n.fancybox.isMobile&&e.body.scrollHeight>t.innerHeight&&(n("head").append(""),n("body").addClass("compensate-for-scrollbar")),i="",n.each(r.buttons,function(t,e){i+=r.btnTpl[e]||"";}),o=n(a.translate(a,r.baseTpl.replace("{{buttons}}",i).replace("{{arrows}}",r.btnTpl.arrowLeft+r.btnTpl.arrowRight))).attr("id","fancybox-container-"+a.id).addClass(r.baseClass).data("FancyBox",a).appendTo(r.parentEl),a.$refs={container:o},["bg","inner","infobar","toolbar","stage","caption","navigation"].forEach(function(t){a.$refs[t]=o.find(".fancybox-"+t);}),a.trigger("onInit"),a.activate(),a.jumpTo(a.currIndex);},translate:function(t,e){var n=t.opts.i18n[t.opts.lang]||t.opts.i18n.en;return e.replace(/\{\{(\w+)\}\}/g,function(t,e){return void 0===n[e]?t:n[e];});},addContent:function(t){var e,o=this,i=n.makeArray(t);n.each(i,function(t,e){var i,a,s,r,c,l={},d={};n.isPlainObject(e)?(l=e,d=e.opts||e):"object"===n.type(e)&&n(e).length?(i=n(e),d=i.data()||{},d=n.extend(!0,{},d,d.options),d.$orig=i,l.src=o.opts.src||d.src||i.attr("href"),l.type||l.src||(l.type="inline",l.src=e)):l={type:"html",src:e+""},l.opts=n.extend(!0,{},o.opts,d),n.isArray(d.buttons)&&(l.opts.buttons=d.buttons),n.fancybox.isMobile&&l.opts.mobile&&(l.opts=h(l.opts,l.opts.mobile)),a=l.type||l.opts.type,r=l.src||"",!a&&r&&((s=r.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(a="video",l.opts.video.format||(l.opts.video.format="video/"+("ogv"===s[1]?"ogg":s[1]))):r.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?a="image":r.match(/\.(pdf)((\?|#).*)?$/i)?(a="iframe",l=n.extend(!0,l,{contentType:"pdf",opts:{iframe:{preload:!1}}})):"#"===r.charAt(0)&&(a="inline")),a?l.type=a:o.trigger("objectNeedsType",l),l.contentType||(l.contentType=n.inArray(l.type,["html","inline","ajax"])>-1?"html":l.type),l.index=o.group.length,"auto"==l.opts.smallBtn&&(l.opts.smallBtn=n.inArray(l.type,["html","inline","ajax"])>-1),"auto"===l.opts.toolbar&&(l.opts.toolbar=!l.opts.smallBtn),l.$thumb=l.opts.$thumb||null,l.opts.$trigger&&l.index===o.opts.index&&(l.$thumb=l.opts.$trigger.find("img:first"),l.$thumb.length&&(l.opts.$orig=l.opts.$trigger)),l.$thumb&&l.$thumb.length||!l.opts.$orig||(l.$thumb=l.opts.$orig.find("img:first")),l.$thumb&&!l.$thumb.length&&(l.$thumb=null),l.thumb=l.opts.thumb||(l.$thumb?l.$thumb[0].src:null),"function"===n.type(l.opts.caption)&&(l.opts.caption=l.opts.caption.apply(e,[o,l])),"function"===n.type(o.opts.caption)&&(l.opts.caption=o.opts.caption.apply(e,[o,l])),l.opts.caption instanceof n||(l.opts.caption=void 0===l.opts.caption?"":l.opts.caption+""),"ajax"===l.type&&(c=r.split(/\s+/,2),c.length>1&&(l.src=c.shift(),l.opts.filter=c.shift())),l.opts.modal&&(l.opts=n.extend(!0,l.opts,{trapFocus:!0,infobar:0,toolbar:0,smallBtn:0,keyboard:0,slideShow:0,fullScreen:0,thumbs:0,touch:0,clickContent:!1,clickSlide:!1,clickOutside:!1,dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1})),o.group.push(l);}),Object.keys(o.slides).length&&(o.updateControls(),(e=o.Thumbs)&&e.isActive&&(e.create(),e.focus()));},addEvents:function(){var e=this;e.removeEvents(),e.$refs.container.on("click.fb-close","[data-fancybox-close]",function(t){t.stopPropagation(),t.preventDefault(),e.close(t);}).on("touchstart.fb-prev click.fb-prev","[data-fancybox-prev]",function(t){t.stopPropagation(),t.preventDefault(),e.previous();}).on("touchstart.fb-next click.fb-next","[data-fancybox-next]",function(t){t.stopPropagation(),t.preventDefault(),e.next();}).on("click.fb","[data-fancybox-zoom]",function(t){e[e.isScaledDown()?"scaleToActual":"scaleToFit"]();}),s.on("orientationchange.fb resize.fb",function(t){t&&t.originalEvent&&"resize"===t.originalEvent.type?(e.requestId&&u(e.requestId),e.requestId=d(function(){e.update(t);})):(e.current&&"iframe"===e.current.type&&e.$refs.stage.hide(),setTimeout(function(){e.$refs.stage.show(),e.update(t);},n.fancybox.isMobile?600:250));}),r.on("keydown.fb",function(t){var o=n.fancybox?n.fancybox.getInstance():null,i=o.current,a=t.keyCode||t.which;if(9==a)return void(i.opts.trapFocus&&e.focus(t));if(!(!i.opts.keyboard||t.ctrlKey||t.altKey||t.shiftKey||n(t.target).is("input,textarea,video,audio,select")))return 8===a||27===a?(t.preventDefault(),void e.close(t)):37===a||38===a?(t.preventDefault(),void e.previous()):39===a||40===a?(t.preventDefault(),void e.next()):void e.trigger("afterKeydown",t,a);}),e.group[e.currIndex].opts.idleTime&&(e.idleSecondsCounter=0,r.on("mousemove.fb-idle mouseleave.fb-idle mousedown.fb-idle touchstart.fb-idle touchmove.fb-idle scroll.fb-idle keydown.fb-idle",function(t){e.idleSecondsCounter=0,e.isIdle&&e.showControls(),e.isIdle=!1;}),e.idleInterval=t.setInterval(function(){++e.idleSecondsCounter>=e.group[e.currIndex].opts.idleTime&&!e.isDragging&&(e.isIdle=!0,e.idleSecondsCounter=0,e.hideControls());},1e3));},removeEvents:function(){var e=this;s.off("orientationchange.fb resize.fb"),r.off("keydown.fb .fb-idle"),this.$refs.container.off(".fb-close .fb-prev .fb-next"),e.idleInterval&&(t.clearInterval(e.idleInterval),e.idleInterval=null);},previous:function(t){return this.jumpTo(this.currPos-1,t);},next:function(t){return this.jumpTo(this.currPos+1,t);},jumpTo:function(t,e){var o,i,a,s,r,c,l,d,u,f=this,h=f.group.length;if(!(f.isDragging||f.isClosing||f.isAnimating&&f.firstRun)){if(t=parseInt(t,10),!(a=f.current?f.current.opts.loop:f.opts.loop)&&(t<0||t>=h))return!1;if(o=f.firstRun=!Object.keys(f.slides).length,r=f.current,f.prevIndex=f.currIndex,f.prevPos=f.currPos,s=f.createSlide(t),h>1&&((a||s.index0)&&f.createSlide(t-1)),f.current=s,f.currIndex=s.index,f.currPos=s.pos,f.trigger("beforeShow",o),f.updateControls(),s.forcedDuration=void 0,n.isNumeric(e)?s.forcedDuration=e:e=s.opts[o?"animationDuration":"transitionDuration"],e=parseInt(e,10),i=f.isMoved(s),s.$slide.addClass("fancybox-slide--current"),o)return s.opts.animationEffect&&e&&f.$refs.container.css("transition-duration",e+"ms"),f.$refs.container.addClass("fancybox-is-open").trigger("focus"),f.loadSlide(s),void f.preload("image");c=n.fancybox.getTranslate(r.$slide),l=n.fancybox.getTranslate(f.$refs.stage),n.each(f.slides,function(t,e){n.fancybox.stop(e.$slide,!0);}),r.pos!==s.pos&&(r.isComplete=!1),r.$slide.removeClass("fancybox-slide--complete fancybox-slide--current"),i?(u=c.left-(r.pos*c.width+r.pos*r.opts.gutter),n.each(f.slides,function(t,o){o.$slide.removeClass("fancybox-animated").removeClass(function(t,e){return(e.match(/(^|\s)fancybox-fx-\S+/g)||[]).join(" ");});var i=o.pos*c.width+o.pos*o.opts.gutter;n.fancybox.setTranslate(o.$slide,{top:0,left:i-l.left+u}),o.pos!==s.pos&&o.$slide.addClass("fancybox-slide--"+(o.pos>s.pos?"next":"previous")),p(o.$slide),n.fancybox.animate(o.$slide,{top:0,left:(o.pos-s.pos)*c.width+(o.pos-s.pos)*o.opts.gutter},e,function(){o.$slide.css({transform:"",opacity:""}).removeClass("fancybox-slide--next fancybox-slide--previous"),o.pos===f.currPos&&f.complete();});})):e&&s.opts.transitionEffect&&(d="fancybox-animated fancybox-fx-"+s.opts.transitionEffect,r.$slide.addClass("fancybox-slide--"+(r.pos>s.pos?"next":"previous")),n.fancybox.animate(r.$slide,d,e,function(){r.$slide.removeClass(d).removeClass("fancybox-slide--next fancybox-slide--previous");},!1)),s.isLoaded?f.revealContent(s):f.loadSlide(s),f.preload("image");}},createSlide:function(t){var e,o,i=this;return o=t%i.group.length,o=o<0?i.group.length+o:o,!i.slides[t]&&i.group[o]&&(e=n("
    ").appendTo(i.$refs.stage),i.slides[t]=n.extend(!0,{},i.group[o],{pos:t,$slide:e,isLoaded:!1}),i.updateSlide(i.slides[t])),i.slides[t];},scaleToActual:function(t,e,o){var i,a,s,r,c,l=this,d=l.current,u=d.$content,f=n.fancybox.getTranslate(d.$slide).width,p=n.fancybox.getTranslate(d.$slide).height,h=d.width,g=d.height;l.isAnimating||l.isMoved()||!u||"image"!=d.type||!d.isLoaded||d.hasError||(l.isAnimating=!0,n.fancybox.stop(u),t=void 0===t?.5*f:t,e=void 0===e?.5*p:e,i=n.fancybox.getTranslate(u),i.top-=n.fancybox.getTranslate(d.$slide).top,i.left-=n.fancybox.getTranslate(d.$slide).left,r=h/i.width,c=g/i.height,a=.5*f-.5*h,s=.5*p-.5*g,h>f&&(a=i.left*r-(t*r-t),a>0&&(a=0),ap&&(s=i.top*c-(e*c-e),s>0&&(s=0),se-.5&&(l=e),d>o-.5&&(d=o),"image"===t.type?(u.top=Math.floor(.5*(o-d))+parseFloat(c.css("paddingTop")),u.left=Math.floor(.5*(e-l))+parseFloat(c.css("paddingLeft"))):"video"===t.contentType&&(a=t.opts.width&&t.opts.height?l/d:t.opts.ratio||16/9,d>l/a?d=l/a:l>d*a&&(l=d*a)),u.width=l,u.height=d,u);},update:function(t){var e=this;n.each(e.slides,function(n,o){e.updateSlide(o,t);});},updateSlide:function(t,e){var o=this,i=t&&t.$content,a=t.width||t.opts.width,s=t.height||t.opts.height,r=t.$slide;o.adjustCaption(t),i&&(a||s||"video"===t.contentType)&&!t.hasError&&(n.fancybox.stop(i),n.fancybox.setTranslate(i,o.getFitPos(t)),t.pos===o.currPos&&(o.isAnimating=!1,o.updateCursor())),o.adjustLayout(t),r.length&&(r.trigger("refresh"),t.pos===o.currPos&&o.$refs.toolbar.add(o.$refs.navigation.find(".fancybox-button--arrow_right")).toggleClass("compensate-for-scrollbar",r.get(0).scrollHeight>r.get(0).clientHeight)),o.trigger("onUpdate",t,e);},centerSlide:function(t){var e=this,o=e.current,i=o.$slide;!e.isClosing&&o&&(i.siblings().css({transform:"",opacity:""}),i.parent().children().removeClass("fancybox-slide--previous fancybox-slide--next"),n.fancybox.animate(i,{top:0,left:0,opacity:1},void 0===t?0:t,function(){i.css({transform:"",opacity:""}),o.isComplete||e.complete();},!1));},isMoved:function(t){var e,o,i=t||this.current;return!!i&&(o=n.fancybox.getTranslate(this.$refs.stage),e=n.fancybox.getTranslate(i.$slide),!i.$slide.hasClass("fancybox-animated")&&(Math.abs(e.top-o.top)>.5||Math.abs(e.left-o.left)>.5));},updateCursor:function(t,e){var o,i,a=this,s=a.current,r=a.$refs.container;s&&!a.isClosing&&a.Guestures&&(r.removeClass("fancybox-is-zoomable fancybox-can-zoomIn fancybox-can-zoomOut fancybox-can-swipe fancybox-can-pan"),o=a.canPan(t,e),i=!!o||a.isZoomable(),r.toggleClass("fancybox-is-zoomable",i),n("[data-fancybox-zoom]").prop("disabled",!i),o?r.addClass("fancybox-can-pan"):i&&("zoom"===s.opts.clickContent||n.isFunction(s.opts.clickContent)&&"zoom"==s.opts.clickContent(s))?r.addClass("fancybox-can-zoomIn"):s.opts.touch&&(s.opts.touch.vertical||a.group.length>1)&&"video"!==s.contentType&&r.addClass("fancybox-can-swipe"));},isZoomable:function(){var t,e=this,n=e.current;if(n&&!e.isClosing&&"image"===n.type&&!n.hasError){if(!n.isLoaded)return!0;if((t=e.getFitPos(n))&&(n.width>t.width||n.height>t.height))return!0;}return!1;},isScaledDown:function(t,e){var o=this,i=!1,a=o.current,s=a.$content;return void 0!==t&&void 0!==e?i=t1.5||Math.abs(a.height-s.height)>1.5)),s;},loadSlide:function(t){var e,o,i,a=this;if(!t.isLoading&&!t.isLoaded){if(t.isLoading=!0,!1===a.trigger("beforeLoad",t))return t.isLoading=!1,!1;switch(e=t.type,o=t.$slide,o.off("refresh").trigger("onReset").addClass(t.opts.slideClass),e){case"image":a.setImage(t);break;case"iframe":a.setIframe(t);break;case"html":a.setContent(t,t.src||t.content);break;case"video":a.setContent(t,t.opts.video.tpl.replace(/\{\{src\}\}/gi,t.src).replace("{{format}}",t.opts.videoFormat||t.opts.video.format||"").replace("{{poster}}",t.thumb||""));break;case"inline":n(t.src).length?a.setContent(t,n(t.src)):a.setError(t);break;case"ajax":a.showLoading(t),i=n.ajax(n.extend({},t.opts.ajax.settings,{url:t.src,success:function(e,n){"success"===n&&a.setContent(t,e);},error:function(e,n){e&&"abort"!==n&&a.setError(t);}})),o.one("onReset",function(){i.abort();});break;default:a.setError(t);}return!0;}},setImage:function(t){var o,i=this;setTimeout(function(){var e=t.$image;i.isClosing||!t.isLoading||e&&e.length&&e[0].complete||t.hasError||i.showLoading(t);},50),i.checkSrcset(t),t.$content=n("
    ").addClass("fancybox-is-hidden").appendTo(t.$slide.addClass("fancybox-slide--image")),!1!==t.opts.preload&&t.opts.width&&t.opts.height&&t.thumb&&(t.width=t.opts.width,t.height=t.opts.height,o=e.createElement("img"),o.onerror=function(){n(this).remove(),t.$ghost=null;},o.onload=function(){i.afterLoad(t);},t.$ghost=n(o).addClass("fancybox-image").appendTo(t.$content).attr("src",t.thumb)),i.setBigImage(t);},checkSrcset:function(e){var n,o,i,a,s=e.opts.srcset||e.opts.image.srcset;if(s){i=t.devicePixelRatio||1,a=t.innerWidth*i,o=s.split(",").map(function(t){var e={};return t.trim().split(/\s+/).forEach(function(t,n){var o=parseInt(t.substring(0,t.length-1),10);if(0===n)return e.url=t;o&&(e.value=o,e.postfix=t[t.length-1]);}),e;}),o.sort(function(t,e){return t.value-e.value;});for(var r=0;r=a||"x"===c.postfix&&c.value>=i){n=c;break;}}!n&&o.length&&(n=o[o.length-1]),n&&(e.src=n.url,e.width&&e.height&&"w"==n.postfix&&(e.height=e.width/e.height*n.value,e.width=n.value),e.opts.srcset=s);}},setBigImage:function(t){var o=this,i=e.createElement("img"),a=n(i);t.$image=a.one("error",function(){o.setError(t);}).one("load",function(){var e;t.$ghost||(o.resolveImageSlideSize(t,this.naturalWidth,this.naturalHeight),o.afterLoad(t)),o.isClosing||(t.opts.srcset&&(e=t.opts.sizes,e&&"auto"!==e||(e=(t.width/t.height>1&&s.width()/s.height()>1?"100":Math.round(t.width/t.height*100))+"vw"),a.attr("sizes",e).attr("srcset",t.opts.srcset)),t.$ghost&&setTimeout(function(){t.$ghost&&!o.isClosing&&t.$ghost.hide();},Math.min(300,Math.max(1e3,t.height/1600))),o.hideLoading(t));}).addClass("fancybox-image").attr("src",t.src).appendTo(t.$content),(i.complete||"complete"==i.readyState)&&a.naturalWidth&&a.naturalHeight?a.trigger("load"):i.error&&a.trigger("error");},resolveImageSlideSize:function(t,e,n){var o=parseInt(t.opts.width,10),i=parseInt(t.opts.height,10);t.width=e,t.height=n,o>0&&(t.width=o,t.height=Math.floor(o*n/e)),i>0&&(t.width=Math.floor(i*e/n),t.height=i);},setIframe:function(t){var e,o=this,i=t.opts.iframe,a=t.$slide;t.$content=n("
    ").css(i.css).appendTo(a),a.addClass("fancybox-slide--"+t.contentType),t.$iframe=e=n(i.tpl.replace(/\{rnd\}/g,(new Date).getTime())).attr(i.attr).appendTo(t.$content),i.preload?(o.showLoading(t),e.on("load.fb error.fb",function(e){this.isReady=1,t.$slide.trigger("refresh"),o.afterLoad(t);}),a.on("refresh.fb",function(){var n,o,s=t.$content,r=i.css.width,c=i.css.height;if(1===e[0].isReady){try{n=e.contents(),o=n.find("body");}catch(t){}o&&o.length&&o.children().length&&(a.css("overflow","visible"),s.css({width:"100%","max-width":"100%",height:"9999px"}),void 0===r&&(r=Math.ceil(Math.max(o[0].clientWidth,o.outerWidth(!0)))),s.css("width",r||"").css("max-width",""),void 0===c&&(c=Math.ceil(Math.max(o[0].clientHeight,o.outerHeight(!0)))),s.css("height",c||""),a.css("overflow","auto")),s.removeClass("fancybox-is-hidden");}})):o.afterLoad(t),e.attr("src",t.src),a.one("onReset",function(){try{n(this).find("iframe").hide().unbind().attr("src","//about:blank");}catch(t){}n(this).off("refresh.fb").empty(),t.isLoaded=!1,t.isRevealed=!1;});},setContent:function(t,e){var o=this;o.isClosing||(o.hideLoading(t),t.$content&&n.fancybox.stop(t.$content),t.$slide.empty(),l(e)&&e.parent().length?((e.hasClass("fancybox-content")||e.parent().hasClass("fancybox-content"))&&e.parents(".fancybox-slide").trigger("onReset"),t.$placeholder=n("
    ").hide().insertAfter(e),e.css("display","inline-block")):t.hasError||("string"===n.type(e)&&(e=n("
    ").append(n.trim(e)).contents()),t.opts.filter&&(e=n("
    ").html(e).find(t.opts.filter))),t.$slide.one("onReset",function(){n(this).find("video,audio").trigger("pause"),t.$placeholder&&(t.$placeholder.after(e.removeClass("fancybox-content").hide()).remove(),t.$placeholder=null),t.$smallBtn&&(t.$smallBtn.remove(),t.$smallBtn=null),t.hasError||(n(this).empty(),t.isLoaded=!1,t.isRevealed=!1);}),n(e).appendTo(t.$slide),n(e).is("video,audio")&&(n(e).addClass("fancybox-video"),n(e).wrap("
    "),t.contentType="video",t.opts.width=t.opts.width||n(e).attr("width"),t.opts.height=t.opts.height||n(e).attr("height")),t.$content=t.$slide.children().filter("div,form,main,video,audio,article,.fancybox-content").first(),t.$content.siblings().hide(),t.$content.length||(t.$content=t.$slide.wrapInner("
    ").children().first()),t.$content.addClass("fancybox-content"),t.$slide.addClass("fancybox-slide--"+t.contentType),o.afterLoad(t));},setError:function(t){t.hasError=!0,t.$slide.trigger("onReset").removeClass("fancybox-slide--"+t.contentType).addClass("fancybox-slide--error"),t.contentType="html",this.setContent(t,this.translate(t,t.opts.errorTpl)),t.pos===this.currPos&&(this.isAnimating=!1);},showLoading:function(t){var e=this;(t=t||e.current)&&!t.$spinner&&(t.$spinner=n(e.translate(e,e.opts.spinnerTpl)).appendTo(t.$slide).hide().fadeIn("fast"));},hideLoading:function(t){var e=this;(t=t||e.current)&&t.$spinner&&(t.$spinner.stop().remove(),delete t.$spinner);},afterLoad:function(t){var e=this;e.isClosing||(t.isLoading=!1,t.isLoaded=!0,e.trigger("afterLoad",t),e.hideLoading(t),!t.opts.smallBtn||t.$smallBtn&&t.$smallBtn.length||(t.$smallBtn=n(e.translate(t,t.opts.btnTpl.smallBtn)).appendTo(t.$content)),t.opts.protect&&t.$content&&!t.hasError&&(t.$content.on("contextmenu.fb",function(t){return 2==t.button&&t.preventDefault(),!0;}),"image"===t.type&&n("
    ").appendTo(t.$content)),e.adjustCaption(t),e.adjustLayout(t),t.pos===e.currPos&&e.updateCursor(),e.revealContent(t));},adjustCaption:function(t){var e,n=this,o=t||n.current,i=o.opts.caption,a=o.opts.preventCaptionOverlap,s=n.$refs.caption,r=!1;s.toggleClass("fancybox-caption--separate",a),a&&i&&i.length&&(o.pos!==n.currPos?(e=s.clone().appendTo(s.parent()),e.children().eq(0).empty().html(i),r=e.outerHeight(!0),e.empty().remove()):n.$caption&&(r=n.$caption.outerHeight(!0)),o.$slide.css("padding-bottom",r||""));},adjustLayout:function(t){var e,n,o,i,a=this,s=t||a.current;s.isLoaded&&!0!==s.opts.disableLayoutFix&&(s.$content.css("margin-bottom",""),s.$content.outerHeight()>s.$slide.height()+.5&&(o=s.$slide[0].style["padding-bottom"],i=s.$slide.css("padding-bottom"),parseFloat(i)>0&&(e=s.$slide[0].scrollHeight,s.$slide.css("padding-bottom",0),Math.abs(e-s.$slide[0].scrollHeight)<1&&(n=i),s.$slide.css("padding-bottom",o))),s.$content.css("margin-bottom",n));},revealContent:function(t){var e,o,i,a,s=this,r=t.$slide,c=!1,l=!1,d=s.isMoved(t),u=t.isRevealed;return t.isRevealed=!0,e=t.opts[s.firstRun?"animationEffect":"transitionEffect"],i=t.opts[s.firstRun?"animationDuration":"transitionDuration"],i=parseInt(void 0===t.forcedDuration?i:t.forcedDuration,10),!d&&t.pos===s.currPos&&i||(e=!1),"zoom"===e&&(t.pos===s.currPos&&i&&"image"===t.type&&!t.hasError&&(l=s.getThumbPos(t))?c=s.getFitPos(t):e="fade"),"zoom"===e?(s.isAnimating=!0,c.scaleX=c.width/l.width,c.scaleY=c.height/l.height,a=t.opts.zoomOpacity,"auto"==a&&(a=Math.abs(t.width/t.height-l.width/l.height)>.1),a&&(l.opacity=.1,c.opacity=1),n.fancybox.setTranslate(t.$content.removeClass("fancybox-is-hidden"),l),p(t.$content),void n.fancybox.animate(t.$content,c,i,function(){s.isAnimating=!1,s.complete();})):(s.updateSlide(t),e?(n.fancybox.stop(r),o="fancybox-slide--"+(t.pos>=s.prevPos?"next":"previous")+" fancybox-animated fancybox-fx-"+e,r.addClass(o).removeClass("fancybox-slide--current"),t.$content.removeClass("fancybox-is-hidden"),p(r),"image"!==t.type&&t.$content.hide().show(0),void n.fancybox.animate(r,"fancybox-slide--current",i,function(){r.removeClass(o).css({transform:"",opacity:""}),t.pos===s.currPos&&s.complete();},!0)):(t.$content.removeClass("fancybox-is-hidden"),u||!d||"image"!==t.type||t.hasError||t.$content.hide().fadeIn("fast"),void(t.pos===s.currPos&&s.complete())));},getThumbPos:function(t){var e,o,i,a,s,r=!1,c=t.$thumb;return!(!c||!g(c[0]))&&(e=n.fancybox.getTranslate(c),o=parseFloat(c.css("border-top-width")||0),i=parseFloat(c.css("border-right-width")||0),a=parseFloat(c.css("border-bottom-width")||0),s=parseFloat(c.css("border-left-width")||0),r={top:e.top+o,left:e.left+s,width:e.width-i-s,height:e.height-o-a,scaleX:1,scaleY:1},e.width>0&&e.height>0&&r);},complete:function(){var t,e=this,o=e.current,i={};!e.isMoved()&&o.isLoaded&&(o.isComplete||(o.isComplete=!0,o.$slide.siblings().trigger("onReset"),e.preload("inline"),p(o.$slide),o.$slide.addClass("fancybox-slide--complete"),n.each(e.slides,function(t,o){o.pos>=e.currPos-1&&o.pos<=e.currPos+1?i[o.pos]=o:o&&(n.fancybox.stop(o.$slide),o.$slide.off().remove());}),e.slides=i),e.isAnimating=!1,e.updateCursor(),e.trigger("afterShow"),o.opts.video.autoStart&&o.$slide.find("video,audio").filter(":visible:first").trigger("play").one("ended",function(){Document.exitFullscreen?Document.exitFullscreen():this.webkitExitFullscreen&&this.webkitExitFullscreen(),e.next();}),o.opts.autoFocus&&"html"===o.contentType&&(t=o.$content.find("input[autofocus]:enabled:visible:first"),t.length?t.trigger("focus"):e.focus(null,!0)),o.$slide.scrollTop(0).scrollLeft(0));},preload:function(t){var e,n,o=this;o.group.length<2||(n=o.slides[o.currPos+1],e=o.slides[o.currPos-1],e&&e.type===t&&o.loadSlide(e),n&&n.type===t&&o.loadSlide(n));},focus:function(t,o){var i,a,s=this,r=["a[href]","area[href]","input:not([disabled]):not([type=\"hidden\"]):not([aria-hidden])","select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","video","audio","[contenteditable]","[tabindex]:not([tabindex^=\"-\"])"].join(",");s.isClosing||(i=!t&&s.current&&s.current.isComplete?s.current.$slide.find("*:visible"+(o?":not(.fancybox-close-small)":"")):s.$refs.container.find("*:visible"),i=i.filter(r).filter(function(){return"hidden"!==n(this).css("visibility")&&!n(this).hasClass("disabled");}),i.length?(a=i.index(e.activeElement),t&&t.shiftKey?(a<0||0==a)&&(t.preventDefault(),i.eq(i.length-1).trigger("focus")):(a<0||a==i.length-1)&&(t&&t.preventDefault(),i.eq(0).trigger("focus"))):s.$refs.container.trigger("focus"));},activate:function(){var t=this;n(".fancybox-container").each(function(){var e=n(this).data("FancyBox");e&&e.id!==t.id&&!e.isClosing&&(e.trigger("onDeactivate"),e.removeEvents(),e.isVisible=!1);}),t.isVisible=!0,(t.current||t.isIdle)&&(t.update(),t.updateControls()),t.trigger("onActivate"),t.addEvents();},close:function(t,e){var o,i,a,s,r,c,l,u=this,f=u.current,h=function(){u.cleanUp(t);};return!u.isClosing&&(u.isClosing=!0,!1===u.trigger("beforeClose",t)?(u.isClosing=!1,d(function(){u.update();}),!1):(u.removeEvents(),a=f.$content,o=f.opts.animationEffect,i=n.isNumeric(e)?e:o?f.opts.animationDuration:0,f.$slide.removeClass("fancybox-slide--complete fancybox-slide--next fancybox-slide--previous fancybox-animated"),!0!==t?n.fancybox.stop(f.$slide):o=!1,f.$slide.siblings().trigger("onReset").remove(),i&&u.$refs.container.removeClass("fancybox-is-open").addClass("fancybox-is-closing").css("transition-duration",i+"ms"),u.hideLoading(f),u.hideControls(!0),u.updateCursor(),"zoom"!==o||a&&i&&"image"===f.type&&!u.isMoved()&&!f.hasError&&(l=u.getThumbPos(f))||(o="fade"),"zoom"===o?(n.fancybox.stop(a),s=n.fancybox.getTranslate(a),c={top:s.top,left:s.left,scaleX:s.width/l.width,scaleY:s.height/l.height,width:l.width,height:l.height},r=f.opts.zoomOpacity, -"auto"==r&&(r=Math.abs(f.width/f.height-l.width/l.height)>.1),r&&(l.opacity=0),n.fancybox.setTranslate(a,c),p(a),n.fancybox.animate(a,l,i,h),!0):(o&&i?n.fancybox.animate(f.$slide.addClass("fancybox-slide--previous").removeClass("fancybox-slide--current"),"fancybox-animated fancybox-fx-"+o,i,h):!0===t?setTimeout(h,i):h(),!0)));},cleanUp:function(e){var o,i,a,s=this,r=s.current.opts.$orig;s.current.$slide.trigger("onReset"),s.$refs.container.empty().remove(),s.trigger("afterClose",e),s.current.opts.backFocus&&(r&&r.length&&r.is(":visible")||(r=s.$trigger),r&&r.length&&(i=t.scrollX,a=t.scrollY,r.trigger("focus"),n("html, body").scrollTop(a).scrollLeft(i))),s.current=null,o=n.fancybox.getInstance(),o?o.activate():(n("body").removeClass("fancybox-active compensate-for-scrollbar"),n("#fancybox-style-noscroll").remove());},trigger:function(t,e){var o,i=Array.prototype.slice.call(arguments,1),a=this,s=e&&e.opts?e:a.current;if(s?i.unshift(s):s=a,i.unshift(a),n.isFunction(s.opts[t])&&(o=s.opts[t].apply(s,i)),!1===o)return o;"afterClose"!==t&&a.$refs?a.$refs.container.trigger(t+".fb",i):r.trigger(t+".fb",i);},updateControls:function(){var t=this,o=t.current,i=o.index,a=t.$refs.container,s=t.$refs.caption,r=o.opts.caption;o.$slide.trigger("refresh"),r&&r.length?(t.$caption=s,s.children().eq(0).html(r)):t.$caption=null,t.hasHiddenControls||t.isIdle||t.showControls(),a.find("[data-fancybox-count]").html(t.group.length),a.find("[data-fancybox-index]").html(i+1),a.find("[data-fancybox-prev]").prop("disabled",!o.opts.loop&&i<=0),a.find("[data-fancybox-next]").prop("disabled",!o.opts.loop&&i>=t.group.length-1),"image"===o.type?a.find("[data-fancybox-zoom]").show().end().find("[data-fancybox-download]").attr("href",o.opts.image.src||o.src).show():o.opts.toolbar&&a.find("[data-fancybox-download],[data-fancybox-zoom]").hide(),n(e.activeElement).is(":hidden,[disabled]")&&t.$refs.container.trigger("focus");},hideControls:function(t){var e=this,n=["infobar","toolbar","nav"];!t&&e.current.opts.preventCaptionOverlap||n.push("caption"),this.$refs.container.removeClass(n.map(function(t){return"fancybox-show-"+t;}).join(" ")),this.hasHiddenControls=!0;},showControls:function(){var t=this,e=t.current?t.current.opts:t.opts,n=t.$refs.container;t.hasHiddenControls=!1,t.idleSecondsCounter=0,n.toggleClass("fancybox-show-toolbar",!(!e.toolbar||!e.buttons)).toggleClass("fancybox-show-infobar",!!(e.infobar&&t.group.length>1)).toggleClass("fancybox-show-caption",!!t.$caption).toggleClass("fancybox-show-nav",!!(e.arrows&&t.group.length>1)).toggleClass("fancybox-is-modal",!!e.modal);},toggleControls:function(){this.hasHiddenControls?this.showControls():this.hideControls();}}),n.fancybox={version:"3.5.7",defaults:a,getInstance:function(t){var e=n(".fancybox-container:not(\".fancybox-is-closing\"):last").data("FancyBox"),o=Array.prototype.slice.call(arguments,1);return e instanceof b&&("string"===n.type(t)?e[t].apply(e,o):"function"===n.type(t)&&t.apply(e,o),e);},open:function(t,e,n){return new b(t,e,n);},close:function(t){var e=this.getInstance();e&&(e.close(),!0===t&&this.close(t));},destroy:function(){this.close(!0),r.add("body").off("click.fb-start","**");},isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),use3d:function(){var n=e.createElement("div");return t.getComputedStyle&&t.getComputedStyle(n)&&t.getComputedStyle(n).getPropertyValue("transform")&&!(e.documentMode&&e.documentMode<11);}(),getTranslate:function(t){var e;return!(!t||!t.length)&&(e=t[0].getBoundingClientRect(),{top:e.top||0,left:e.left||0,width:e.width,height:e.height,opacity:parseFloat(t.css("opacity"))});},setTranslate:function(t,e){var n="",o={};if(t&&e)return void 0===e.left&&void 0===e.top||(n=(void 0===e.left?t.position().left:e.left)+"px, "+(void 0===e.top?t.position().top:e.top)+"px",n=this.use3d?"translate3d("+n+", 0px)":"translate("+n+")"),void 0!==e.scaleX&&void 0!==e.scaleY?n+=" scale("+e.scaleX+", "+e.scaleY+")":void 0!==e.scaleX&&(n+=" scaleX("+e.scaleX+")"),n.length&&(o.transform=n),void 0!==e.opacity&&(o.opacity=e.opacity),void 0!==e.width&&(o.width=e.width),void 0!==e.height&&(o.height=e.height),t.css(o);},animate:function(t,e,o,i,a){var s,r=this;n.isFunction(o)&&(i=o,o=null),r.stop(t),s=r.getTranslate(t),t.on(f,function(c){(!c||!c.originalEvent||t.is(c.originalEvent.target)&&"z-index"!=c.originalEvent.propertyName)&&(r.stop(t),n.isNumeric(o)&&t.css("transition-duration",""),n.isPlainObject(e)?void 0!==e.scaleX&&void 0!==e.scaleY&&r.setTranslate(t,{top:e.top,left:e.left,width:s.width*e.scaleX,height:s.height*e.scaleY,scaleX:1,scaleY:1}):!0!==a&&t.removeClass(e),n.isFunction(i)&&i(c));}),n.isNumeric(o)&&t.css("transition-duration",o+"ms"),n.isPlainObject(e)?(void 0!==e.scaleX&&void 0!==e.scaleY&&(delete e.width,delete e.height,t.parent().hasClass("fancybox-slide--image")&&t.parent().addClass("fancybox-is-scaling")),n.fancybox.setTranslate(t,e)):t.addClass(e),t.data("timer",setTimeout(function(){t.trigger(f);},o+33));},stop:function(t,e){t&&t.length&&(clearTimeout(t.data("timer")),e&&t.trigger(f),t.off(f).css("transition-duration",""),t.parent().removeClass("fancybox-is-scaling"));}},n.fn.fancybox=function(t){var e;return t=t||{},e=t.selector||!1,e?n("body").off("click.fb-start",e).on("click.fb-start",e,{options:t},i):this.off("click.fb-start").on("click.fb-start",{items:this,options:t},i),this;},r.on("click.fb-start","[data-fancybox]",i),r.on("click.fb-start","[data-fancybox-trigger]",function(t){n("[data-fancybox=\""+n(this).attr("data-fancybox-trigger")+"\"]").eq(n(this).attr("data-fancybox-index")||0).trigger("click.fb-start",{$trigger:n(this)});}),function(){var t=null;r.on("mousedown mouseup focus blur",".fancybox-button",function(e){switch(e.type){case"mousedown":t=n(this);break;case"mouseup":t=null;break;case"focusin":n(".fancybox-button").removeClass("fancybox-focus"),n(this).is(t)||n(this).is("[disabled]")||n(this).addClass("fancybox-focus");break;case"focusout":n(".fancybox-button").removeClass("fancybox-focus");}});}();}}(window,document,jQuery),function(t){"use strict";var e={youtube:{matcher:/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},paramPlace:8,type:"iframe",url:"https://www.youtube-nocookie.com/embed/$4",thumb:"https://img.youtube.com/vi/$4/hqdefault.jpg"},vimeo:{matcher:/^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},paramPlace:3,type:"iframe",url:"//player.vimeo.com/video/$2"},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:"image",url:"//$1/p/$2/media/?size=l"},gmap_place:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/?ll="+(t[9]?t[9]+"&z="+Math.floor(t[10])+(t[12]?t[12].replace(/^\//,"&"):""):t[12]+"").replace(/\?/,"&")+"&output="+(t[12]&&t[12].indexOf("layer=c")>0?"svembed":"embed");}},gmap_search:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(maps\/search\/)(.*)/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/maps?q="+t[5].replace("query=","q=").replace("api=1","")+"&output=embed";}}},n=function(e,n,o){if(e)return o=o||"","object"===t.type(o)&&(o=t.param(o,!0)),t.each(n,function(t,n){e=e.replace("$"+t,n||"");}),o.length&&(e+=(e.indexOf("?")>0?"&":"?")+o),e;};t(document).on("objectNeedsType.fb",function(o,i,a){var s,r,c,l,d,u,f,p=a.src||"",h=!1;s=t.extend(!0,{},e,a.opts.media),t.each(s,function(e,o){if(c=p.match(o.matcher)){if(h=o.type,f=e,u={},o.paramPlace&&c[o.paramPlace]){d=c[o.paramPlace],"?"==d[0]&&(d=d.substring(1)),d=d.split("&");for(var i=0;i1&&("youtube"===n.contentSource||"vimeo"===n.contentSource)&&o.load(n.contentSource);}});}(jQuery),function(t,e,n){"use strict";var o=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60);};}(),i=function(){return t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||function(e){t.clearTimeout(e);};}(),a=function(e){var n=[];e=e.originalEvent||e||t.e,e=e.touches&&e.touches.length?e.touches:e.changedTouches&&e.changedTouches.length?e.changedTouches:[e];for(var o in e)e[o].pageX?n.push({x:e[o].pageX,y:e[o].pageY}):e[o].clientX&&n.push({x:e[o].clientX,y:e[o].clientY});return n;},s=function(t,e,n){return e&&t?"x"===n?t.x-e.x:"y"===n?t.y-e.y:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0;},r=function(t){if(t.is("a,area,button,[role=\"button\"],input,label,select,summary,textarea,video,audio,iframe")||n.isFunction(t.get(0).onclick)||t.data("selectable"))return!0;for(var e=0,o=t[0].attributes,i=o.length;ee.clientHeight,a=("scroll"===o||"auto"===o)&&e.scrollWidth>e.clientWidth;return i||a;},l=function(t){for(var e=!1;;){if(e=c(t.get(0)))break;if(t=t.parent(),!t.length||t.hasClass("fancybox-stage")||t.is("body"))break;}return e;},d=function(t){var e=this;e.instance=t,e.$bg=t.$refs.bg,e.$stage=t.$refs.stage,e.$container=t.$refs.container,e.destroy(),e.$container.on("touchstart.fb.touch mousedown.fb.touch",n.proxy(e,"ontouchstart"));};d.prototype.destroy=function(){var t=this;t.$container.off(".fb.touch"),n(e).off(".fb.touch"),t.requestId&&(i(t.requestId),t.requestId=null),t.tapped&&(clearTimeout(t.tapped),t.tapped=null);},d.prototype.ontouchstart=function(o){var i=this,c=n(o.target),d=i.instance,u=d.current,f=u.$slide,p=u.$content,h="touchstart"==o.type;if(h&&i.$container.off("mousedown.fb.touch"),(!o.originalEvent||2!=o.originalEvent.button)&&f.length&&c.length&&!r(c)&&!r(c.parent())&&(c.is("img")||!(o.originalEvent.clientX>c[0].clientWidth+c.offset().left))){if(!u||d.isAnimating||u.$slide.hasClass("fancybox-animated"))return o.stopPropagation(),void o.preventDefault();i.realPoints=i.startPoints=a(o),i.startPoints.length&&(u.touch&&o.stopPropagation(),i.startEvent=o,i.canTap=!0,i.$target=c,i.$content=p,i.opts=u.opts.touch,i.isPanning=!1,i.isSwiping=!1,i.isZooming=!1,i.isScrolling=!1,i.canPan=d.canPan(),i.startTime=(new Date).getTime(),i.distanceX=i.distanceY=i.distance=0,i.canvasWidth=Math.round(f[0].clientWidth),i.canvasHeight=Math.round(f[0].clientHeight),i.contentLastPos=null,i.contentStartPos=n.fancybox.getTranslate(i.$content)||{top:0,left:0},i.sliderStartPos=n.fancybox.getTranslate(f),i.stagePos=n.fancybox.getTranslate(d.$refs.stage),i.sliderStartPos.top-=i.stagePos.top,i.sliderStartPos.left-=i.stagePos.left,i.contentStartPos.top-=i.stagePos.top,i.contentStartPos.left-=i.stagePos.left,n(e).off(".fb.touch").on(h?"touchend.fb.touch touchcancel.fb.touch":"mouseup.fb.touch mouseleave.fb.touch",n.proxy(i,"ontouchend")).on(h?"touchmove.fb.touch":"mousemove.fb.touch",n.proxy(i,"ontouchmove")),n.fancybox.isMobile&&e.addEventListener("scroll",i.onscroll,!0),((i.opts||i.canPan)&&(c.is(i.$stage)||i.$stage.find(c).length)||(c.is(".fancybox-image")&&o.preventDefault(),n.fancybox.isMobile&&c.parents(".fancybox-caption").length))&&(i.isScrollable=l(c)||l(c.parent()),n.fancybox.isMobile&&i.isScrollable||o.preventDefault(),(1===i.startPoints.length||u.hasError)&&(i.canPan?(n.fancybox.stop(i.$content),i.isPanning=!0):i.isSwiping=!0,i.$container.addClass("fancybox-is-grabbing")),2===i.startPoints.length&&"image"===u.type&&(u.isLoaded||u.$ghost)&&(i.canTap=!1,i.isSwiping=!1,i.isPanning=!1,i.isZooming=!0,n.fancybox.stop(i.$content),i.centerPointStartX=.5*(i.startPoints[0].x+i.startPoints[1].x)-n(t).scrollLeft(),i.centerPointStartY=.5*(i.startPoints[0].y+i.startPoints[1].y)-n(t).scrollTop(),i.percentageOfImageAtPinchPointX=(i.centerPointStartX-i.contentStartPos.left)/i.contentStartPos.width,i.percentageOfImageAtPinchPointY=(i.centerPointStartY-i.contentStartPos.top)/i.contentStartPos.height,i.startDistanceBetweenFingers=s(i.startPoints[0],i.startPoints[1]))));}},d.prototype.onscroll=function(t){var n=this;n.isScrolling=!0,e.removeEventListener("scroll",n.onscroll,!0);},d.prototype.ontouchmove=function(t){var e=this;return void 0!==t.originalEvent.buttons&&0===t.originalEvent.buttons?void e.ontouchend(t):e.isScrolling?void(e.canTap=!1):(e.newPoints=a(t),void((e.opts||e.canPan)&&e.newPoints.length&&e.newPoints.length&&(e.isSwiping&&!0===e.isSwiping||t.preventDefault(),e.distanceX=s(e.newPoints[0],e.startPoints[0],"x"),e.distanceY=s(e.newPoints[0],e.startPoints[0],"y"),e.distance=s(e.newPoints[0],e.startPoints[0]),e.distance>0&&(e.isSwiping?e.onSwipe(t):e.isPanning?e.onPan():e.isZooming&&e.onZoom()))));},d.prototype.onSwipe=function(e){var a,s=this,r=s.instance,c=s.isSwiping,l=s.sliderStartPos.left||0;if(!0!==c)"x"==c&&(s.distanceX>0&&(s.instance.group.length<2||0===s.instance.current.index&&!s.instance.current.opts.loop)?l+=Math.pow(s.distanceX,.8):s.distanceX<0&&(s.instance.group.length<2||s.instance.current.index===s.instance.group.length-1&&!s.instance.current.opts.loop)?l-=Math.pow(-s.distanceX,.8):l+=s.distanceX),s.sliderLastPos={top:"x"==c?0:s.sliderStartPos.top+s.distanceY,left:l},s.requestId&&(i(s.requestId),s.requestId=null),s.requestId=o(function(){s.sliderLastPos&&(n.each(s.instance.slides,function(t,e){var o=e.pos-s.instance.currPos;n.fancybox.setTranslate(e.$slide,{top:s.sliderLastPos.top,left:s.sliderLastPos.left+o*s.canvasWidth+o*e.opts.gutter});}),s.$container.addClass("fancybox-is-sliding"));});else if(Math.abs(s.distance)>10){if(s.canTap=!1,r.group.length<2&&s.opts.vertical?s.isSwiping="y":r.isDragging||!1===s.opts.vertical||"auto"===s.opts.vertical&&n(t).width()>800?s.isSwiping="x":(a=Math.abs(180*Math.atan2(s.distanceY,s.distanceX)/Math.PI),s.isSwiping=a>45&&a<135?"y":"x"),"y"===s.isSwiping&&n.fancybox.isMobile&&s.isScrollable)return void(s.isScrolling=!0);r.isDragging=s.isSwiping,s.startPoints=s.newPoints,n.each(r.slides,function(t,e){var o,i;n.fancybox.stop(e.$slide),o=n.fancybox.getTranslate(e.$slide),i=n.fancybox.getTranslate(r.$refs.stage),e.$slide.css({transform:"",opacity:"","transition-duration":""}).removeClass("fancybox-animated").removeClass(function(t,e){return(e.match(/(^|\s)fancybox-fx-\S+/g)||[]).join(" ");}),e.pos===r.current.pos&&(s.sliderStartPos.top=o.top-i.top,s.sliderStartPos.left=o.left-i.left),n.fancybox.setTranslate(e.$slide,{top:o.top-i.top,left:o.left-i.left});}),r.SlideShow&&r.SlideShow.isActive&&r.SlideShow.stop();}},d.prototype.onPan=function(){var t=this;if(s(t.newPoints[0],t.realPoints[0])<(n.fancybox.isMobile?10:5))return void(t.startPoints=t.newPoints);t.canTap=!1,t.contentLastPos=t.limitMovement(),t.requestId&&i(t.requestId),t.requestId=o(function(){n.fancybox.setTranslate(t.$content,t.contentLastPos);});},d.prototype.limitMovement=function(){var t,e,n,o,i,a,s=this,r=s.canvasWidth,c=s.canvasHeight,l=s.distanceX,d=s.distanceY,u=s.contentStartPos,f=u.left,p=u.top,h=u.width,g=u.height;return i=h>r?f+l:f,a=p+d,t=Math.max(0,.5*r-.5*h),e=Math.max(0,.5*c-.5*g),n=Math.min(r-h,.5*r-.5*h),o=Math.min(c-g,.5*c-.5*g),l>0&&i>t&&(i=t-1+Math.pow(-t+f+l,.8)||0),l<0&&i0&&a>e&&(a=e-1+Math.pow(-e+p+d,.8)||0),d<0&&aa?(t=t>0?0:t,t=ts?(e=e>0?0:e,e=e1&&(o.dMs>130&&s>10||s>50);o.sliderLastPos=null,"y"==t&&!e&&Math.abs(o.distanceY)>50?(n.fancybox.animate(o.instance.current.$slide,{top:o.sliderStartPos.top+o.distanceY+150*o.velocityY,opacity:0},200),i=o.instance.close(!0,250)):r&&o.distanceX>0?i=o.instance.previous(300):r&&o.distanceX<0&&(i=o.instance.next(300)),!1!==i||"x"!=t&&"y"!=t||o.instance.centerSlide(200),o.$container.removeClass("fancybox-is-sliding");},d.prototype.endPanning=function(){var t,e,o,i=this;i.contentLastPos&&(!1===i.opts.momentum||i.dMs>350?(t=i.contentLastPos.left,e=i.contentLastPos.top):(t=i.contentLastPos.left+500*i.velocityX,e=i.contentLastPos.top+500*i.velocityY),o=i.limitPosition(t,e,i.contentStartPos.width,i.contentStartPos.height),o.width=i.contentStartPos.width,o.height=i.contentStartPos.height,n.fancybox.animate(i.$content,o,366));},d.prototype.endZooming=function(){var t,e,o,i,a=this,s=a.instance.current,r=a.newWidth,c=a.newHeight;a.contentLastPos&&(t=a.contentLastPos.left,e=a.contentLastPos.top,i={top:e,left:t,width:r,height:c,scaleX:1,scaleY:1},n.fancybox.setTranslate(a.$content,i),rs.width||c>s.height?a.instance.scaleToActual(a.centerPointStartX,a.centerPointStartY,150):(o=a.limitPosition(t,e,r,c),n.fancybox.animate(a.$content,o,150)));},d.prototype.onTap=function(e){var o,i=this,s=n(e.target),r=i.instance,c=r.current,l=e&&a(e)||i.startPoints,d=l[0]?l[0].x-n(t).scrollLeft()-i.stagePos.left:0,u=l[0]?l[0].y-n(t).scrollTop()-i.stagePos.top:0,f=function(t){var o=c.opts[t];if(n.isFunction(o)&&(o=o.apply(r,[c,e])),o)switch(o){case"close":r.close(i.startEvent);break;case"toggleControls":r.toggleControls();break;case"next":r.next();break;case"nextOrClose":r.group.length>1?r.next():r.close(i.startEvent);break;case"zoom":"image"==c.type&&(c.isLoaded||c.$ghost)&&(r.canPan()?r.scaleToFit():r.isScaledDown()?r.scaleToActual(d,u):r.group.length<2&&r.close(i.startEvent));}};if((!e.originalEvent||2!=e.originalEvent.button)&&(s.is("img")||!(d>s[0].clientWidth+s.offset().left))){if(s.is(".fancybox-bg,.fancybox-inner,.fancybox-outer,.fancybox-container"))o="Outside";else if(s.is(".fancybox-slide"))o="Slide";else{if(!r.current.$content||!r.current.$content.find(s).addBack().filter(s).length)return;o="Content";}if(i.tapped){if(clearTimeout(i.tapped),i.tapped=null,Math.abs(d-i.tapX)>50||Math.abs(u-i.tapY)>50)return this;f("dblclick"+o);}else i.tapX=d,i.tapY=u,c.opts["dblclick"+o]&&c.opts["dblclick"+o]!==c.opts["click"+o]?i.tapped=setTimeout(function(){i.tapped=null,r.isAnimating||f("click"+o);},500):f("click"+o);return this;}},n(e).on("onActivate.fb",function(t,e){e&&!e.Guestures&&(e.Guestures=new d(e));}).on("beforeClose.fb",function(t,e){e&&e.Guestures&&e.Guestures.destroy();});}(window,document,jQuery),function(t,e){"use strict";e.extend(!0,e.fancybox.defaults,{btnTpl:{slideShow:""},slideShow:{autoStart:!1,speed:3e3,progress:!0}});var n=function(t){this.instance=t,this.init();};e.extend(n.prototype,{timer:null,isActive:!1,$button:null,init:function(){var t=this,n=t.instance,o=n.group[n.currIndex].opts.slideShow;t.$button=n.$refs.toolbar.find("[data-fancybox-play]").on("click",function(){t.toggle();}),n.group.length<2||!o?t.$button.hide():o.progress&&(t.$progress=e("
    ").appendTo(n.$refs.inner));},set:function(t){var n=this,o=n.instance,i=o.current;i&&(!0===t||i.opts.loop||o.currIndex"},fullScreen:{autoStart:!1}}),e(t).on(n.fullscreenchange,function(){var t=o.isFullscreen(),n=e.fancybox.getInstance();n&&(n.current&&"image"===n.current.type&&n.isAnimating&&(n.isAnimating=!1,n.update(!0,!0,0),n.isComplete||n.complete()),n.trigger("onFullscreenChange",t),n.$refs.container.toggleClass("fancybox-is-fullscreen",t),n.$refs.toolbar.find("[data-fancybox-fullscreen]").toggleClass("fancybox-button--fsenter",!t).toggleClass("fancybox-button--fsexit",t));});}e(t).on({"onInit.fb":function(t,e){var i;if(!n)return void e.$refs.toolbar.find("[data-fancybox-fullscreen]").remove();e&&e.group[e.currIndex].opts.fullScreen?(i=e.$refs.container,i.on("click.fb-fullscreen","[data-fancybox-fullscreen]",function(t){t.stopPropagation(),t.preventDefault(),o.toggle();}),e.opts.fullScreen&&!0===e.opts.fullScreen.autoStart&&o.request(),e.FullScreen=o):e&&e.$refs.toolbar.find("[data-fancybox-fullscreen]").hide();},"afterKeydown.fb":function(t,e,n,o,i){e&&e.FullScreen&&70===i&&(o.preventDefault(),e.FullScreen.toggle());},"beforeClose.fb":function(t,e){e&&e.FullScreen&&e.$refs.container.hasClass("fancybox-is-fullscreen")&&o.exit();}});}(document,jQuery),function(t,e){"use strict";var n="fancybox-thumbs";e.fancybox.defaults=e.extend(!0,{btnTpl:{thumbs:""},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".fancybox-container",axis:"y"}},e.fancybox.defaults);var o=function(t){this.init(t);};e.extend(o.prototype,{$button:null,$grid:null,$list:null,isVisible:!1,isActive:!1,init:function(t){var e=this,n=t.group,o=0;e.instance=t,e.opts=n[t.currIndex].opts.thumbs,t.Thumbs=e,e.$button=t.$refs.toolbar.find("[data-fancybox-thumbs]");for(var i=0,a=n.length;i1));i++);o>1&&e.opts?(e.$button.removeAttr("style").on("click",function(){e.toggle();}),e.isActive=!0):e.$button.hide();},create:function(){var t,o=this,i=o.instance,a=o.opts.parentEl,s=[];o.$grid||(o.$grid=e("
    ").appendTo(i.$refs.container.find(a).addBack().filter(a)),o.$grid.on("click","a",function(){i.jumpTo(e(this).attr("data-index"));})),o.$list||(o.$list=e("
    ").appendTo(o.$grid)),e.each(i.group,function(e,n){t=n.thumb,t||"image"!==n.type||(t=n.src),s.push("");}),o.$list[0].innerHTML=s.join(""),"x"===o.opts.axis&&o.$list.width(parseInt(o.$grid.css("padding-right"),10)+i.group.length*o.$list.children().eq(0).outerWidth(!0));},focus:function(t){var e,n,o=this,i=o.$list,a=o.$grid;o.instance.current&&(e=i.children().removeClass("fancybox-thumbs-active").filter("[data-index=\""+o.instance.current.index+"\"]").addClass("fancybox-thumbs-active"),n=e.position(),"y"===o.opts.axis&&(n.top<0||n.top>i.height()-e.outerHeight())?i.stop().animate({scrollTop:i.scrollTop()+n.top},t):"x"===o.opts.axis&&(n.lefta.scrollLeft()+(a.width()-e.outerWidth()))&&i.parent().stop().animate({scrollLeft:n.left},t));},update:function(){var t=this;t.instance.$refs.container.toggleClass("fancybox-show-thumbs",this.isVisible),t.isVisible?(t.$grid||t.create(),t.instance.trigger("onThumbsShow"),t.focus(0)):t.$grid&&t.instance.trigger("onThumbsHide"),t.instance.update();},hide:function(){this.isVisible=!1,this.update();},show:function(){this.isVisible=!0,this.update();},toggle:function(){this.isVisible=!this.isVisible,this.update();}}),e(t).on({"onInit.fb":function(t,e){var n;e&&!e.Thumbs&&(n=new o(e),n.isActive&&!0===n.opts.autoStart&&n.show());},"beforeShow.fb":function(t,e,n,o){var i=e&&e.Thumbs;i&&i.isVisible&&i.focus(o?0:250);},"afterKeydown.fb":function(t,e,n,o,i){var a=e&&e.Thumbs;a&&a.isActive&&71===i&&(o.preventDefault(),a.toggle());},"beforeClose.fb":function(t,e){var n=e&&e.Thumbs;n&&n.isVisible&&!1!==n.opts.hideOnClose&&n.$grid.hide();}});}(document,jQuery),function(t,e){"use strict";function n(t){var e={"&":"&","<":"<",">":">","\"":""","'":"'","/":"/","`":"`","=":"="};return String(t).replace(/[&<>"'`=\/]/g,function(t){return e[t];});}e.extend(!0,e.fancybox.defaults,{btnTpl:{share:""},share:{url:function(t,e){return!t.currentHash&&"inline"!==e.type&&"html"!==e.type&&(e.origSrc||e.src)||window.location;}, - tpl:""}}),e(t).on("click","[data-fancybox-share]",function(){var t,o,i=e.fancybox.getInstance(),a=i.current||null;a&&("function"===e.type(a.opts.share.url)&&(t=a.opts.share.url.apply(a,[i,a])),o=a.opts.share.tpl.replace(/\{\{media\}\}/g,"image"===a.type?encodeURIComponent(a.src):"").replace(/\{\{url\}\}/g,encodeURIComponent(t)).replace(/\{\{url_raw\}\}/g,n(t)).replace(/\{\{descr\}\}/g,i.$caption?encodeURIComponent(i.$caption.text()):""),e.fancybox.open({src:i.translate(i,o),type:"html",opts:{touch:!1,animationEffect:!1,afterLoad:function(t,e){i.$refs.container.one("beforeClose.fb",function(){t.close(null,0);}),e.$content.find(".fancybox-share__button").click(function(){return window.open(this.href,"Share","width=550, height=450"),!1;});},mobile:{autoFocus:!1}}}));});}(document,jQuery),function(t,e,n){"use strict";function o(){var e=t.location.hash.substr(1),n=e.split("-"),o=n.length>1&&/^\+?\d+$/.test(n[n.length-1])?parseInt(n.pop(-1),10)||1:1,i=n.join("-");return{hash:e,index:o<1?1:o,gallery:i};}function i(t){""!==t.gallery&&n("[data-fancybox='"+n.escapeSelector(t.gallery)+"']").eq(t.index-1).focus().trigger("click.fb-start");}function a(t){var e,n;return!!t&&(e=t.current?t.current.opts:t.opts,""!==(n=e.hash||(e.$orig?e.$orig.data("fancybox")||e.$orig.data("fancybox-trigger"):""))&&n);}n.escapeSelector||(n.escapeSelector=function(t){return(t+"").replace(/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t;});}),n(function(){!1!==n.fancybox.defaults.hash&&(n(e).on({"onInit.fb":function(t,e){var n,i;!1!==e.group[e.currIndex].opts.hash&&(n=o(),(i=a(e))&&n.gallery&&i==n.gallery&&(e.currIndex=n.index-1));},"beforeShow.fb":function(n,o,i,s){var r;i&&!1!==i.opts.hash&&(r=a(o))&&(o.currentHash=r+(o.group.length>1?"-"+(i.index+1):""),t.location.hash!=="#"+o.currentHash&&(s&&!o.origHash&&(o.origHash=t.location.hash),o.hashTimer&&clearTimeout(o.hashTimer),o.hashTimer=setTimeout(function(){"replaceState"in t.history?(t.history[s?"pushState":"replaceState"]({},e.title,t.location.pathname+t.location.search+"#"+o.currentHash),s&&(o.hasCreatedHistory=!0)):t.location.hash=o.currentHash,o.hashTimer=null;},300)));},"beforeClose.fb":function(n,o,i){i&&!1!==i.opts.hash&&(clearTimeout(o.hashTimer),o.currentHash&&o.hasCreatedHistory?t.history.back():o.currentHash&&("replaceState"in t.history?t.history.replaceState({},e.title,t.location.pathname+t.location.search+(o.origHash||"")):t.location.hash=o.origHash),o.currentHash=null);}}),n(t).on("hashchange.fb",function(){var t=o(),e=null;n.each(n(".fancybox-container").get().reverse(),function(t,o){var i=n(o).data("FancyBox");if(i&&i.currentHash)return e=i,!1;}),e?e.currentHash===t.gallery+"-"+t.index||1===t.index&&e.currentHash==t.gallery||(e.currentHash=null,e.close()):""!==t.gallery&&i(t);}),setTimeout(function(){n.fancybox.getInstance()||i(o());},50));});}(window,document,jQuery),function(t,e){"use strict";var n=(new Date).getTime();e(t).on({"onInit.fb":function(t,e,o){e.$refs.stage.on("mousewheel DOMMouseScroll wheel MozMousePixelScroll",function(t){var o=e.current,i=(new Date).getTime();e.group.length<2||!1===o.opts.wheel||"auto"===o.opts.wheel&&"image"!==o.type||(t.preventDefault(),t.stopPropagation(),o.$slide.hasClass("fancybox-animated")||(t=t.originalEvent||t,i-n<250||(n=i,e[(-t.deltaY||-t.deltaX||t.wheelDelta||-t.detail)<0?"next":"previous"]())));});}});}(document,jQuery); \ No newline at end of file diff --git a/templates/assets/libs/instantpage/instantpage.min.js b/templates/assets/libs/instantpage/instantpage.min.js deleted file mode 100644 index 7a95c59c..00000000 --- a/templates/assets/libs/instantpage/instantpage.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! instant.page v5.1.1 - (C) 2019-2020 Alexandre Dieulot - https://instant.page/license */ -let t,e;const n=new Set,o=document.createElement("link"),i=o.relList&&o.relList.supports&&o.relList.supports("prefetch")&&window.IntersectionObserver&&"isIntersecting"in IntersectionObserverEntry.prototype,s="instantAllowQueryString"in document.body.dataset,a="instantAllowExternalLinks"in document.body.dataset,r="instantWhitelist"in document.body.dataset,c="instantMousedownShortcut"in document.body.dataset,d=1111;let l=65,u=!1,f=!1,m=!1;if("instantIntensity"in document.body.dataset){const t=document.body.dataset.instantIntensity;if("mousedown"==t.substr(0,"mousedown".length))u=!0,"mousedown-only"==t&&(f=!0);else if("viewport"==t.substr(0,"viewport".length))navigator.connection&&(navigator.connection.saveData||navigator.connection.effectiveType&&navigator.connection.effectiveType.includes("2g"))||("viewport"==t?document.documentElement.clientWidth*document.documentElement.clientHeight<45e4&&(m=!0):"viewport-all"==t&&(m=!0));else{const e=parseInt(t);isNaN(e)||(l=e)}}if(i){const n={capture:!0,passive:!0};if(f||document.addEventListener("touchstart",function(t){e=performance.now();const n=t.target.closest("a");if(!h(n))return;v(n.href)},n),u?c||document.addEventListener("mousedown",function(t){const e=t.target.closest("a");if(!h(e))return;v(e.href)},n):document.addEventListener("mouseover",function(n){if(performance.now()-e{v(o.href),t=void 0},l)},n),c&&document.addEventListener("mousedown",function(t){if(performance.now()-e1||t.metaKey||t.ctrlKey)return;if(!n)return;n.addEventListener("click",function(t){1337!=t.detail&&t.preventDefault()},{capture:!0,passive:!1,once:!0});const o=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1,detail:1337});n.dispatchEvent(o)},n),m){let t;(t=window.requestIdleCallback?t=>{requestIdleCallback(t,{timeout:1500})}:t=>{t()})(()=>{const t=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){const n=e.target;t.unobserve(n),v(n.href)}})});document.querySelectorAll("a").forEach(e=>{h(e)&&t.observe(e)})})}}function p(e){e.relatedTarget&&e.target.closest("a")==e.relatedTarget.closest("a")||t&&(clearTimeout(t),t=void 0)}function h(t){if(t&&t.href&&(!r||"instant"in t.dataset)&&(a||t.origin==location.origin||"instant"in t.dataset)&&["http:","https:"].includes(t.protocol)&&("http:"!=t.protocol||"https:"!=location.protocol)&&(s||!t.search||"instant"in t.dataset)&&!(t.hash&&t.pathname+t.search==location.pathname+location.search||"noInstant"in t.dataset))return!0}function v(t){if(n.has(t))return;const e=document.createElement("link");e.rel="prefetch",e.href=t,document.head.appendChild(e),n.add(t)} \ No newline at end of file diff --git a/templates/assets/libs/lazyload/lazyload.iife.min.js b/templates/assets/libs/lazyload/lazyload.iife.min.js deleted file mode 100644 index 065144c1..00000000 --- a/templates/assets/libs/lazyload/lazyload.iife.min.js +++ /dev/null @@ -1 +0,0 @@ -var LazyLoad=function(){"use strict";function t(){return(t=Object.assign||function(t){for(var n=1;n1,o={elements_selector:".lazy",container:e||n?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_bg_hidpi:"bg-hidpi",data_bg_multi:"bg-multi",data_bg_multi_hidpi:"bg-multi-hidpi",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",class_entered:"entered",class_exited:"exited",unobserve_completed:!0,unobserve_entered:!1,cancel_on_exit:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,callback_cancel:null,use_native:!1},c=function(n){return t({},o,n)},s=function(t,n){var e,i="LazyLoad::Initialized",r=new t(n);try{e=new CustomEvent(i,{detail:{instance:r}})}catch(t){(e=document.createEvent("CustomEvent")).initCustomEvent(i,!1,!1,{instance:r})}window.dispatchEvent(e)},l="loading",u="loaded",d="applied",f="error",_="native",g="data-",v="ll-status",b=function(t,n){return t.getAttribute(g+n)},p=function(t){return b(t,v)},h=function(t,n){return function(t,n,e){var i="data-ll-status";null!==e?t.setAttribute(i,e):t.removeAttribute(i)}(t,0,n)},m=function(t){return h(t,null)},E=function(t){return null===p(t)},A=function(t){return p(t)===_},I=[l,u,d,f],L=function(t,n,e,i){t&&(void 0===i?void 0===e?t(n):t(n,e):t(n,e,i))},w=function(t,n){r?t.classList.add(n):t.className+=(t.className?" ":"")+n},y=function(t,n){r?t.classList.remove(n):t.className=t.className.replace(new RegExp("(^|\\s+)"+n+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},k=function(t){return t.llTempImage},O=function(t,n){if(n){var e=n._observer;e&&e.unobserve(t)}},z=function(t,n){t&&(t.loadingCount+=n)},x=function(t,n){t&&(t.toLoadCount=n)},C=function(t){for(var n,e=[],i=0;n=t.children[i];i+=1)"SOURCE"===n.tagName&&e.push(n);return e},N=function(t,n,e){e&&t.setAttribute(n,e)},M=function(t,n){t.removeAttribute(n)},R=function(t){return!!t.llOriginalAttrs},G=function(t){if(!R(t)){var n={};n.src=t.getAttribute("src"),n.srcset=t.getAttribute("srcset"),n.sizes=t.getAttribute("sizes"),t.llOriginalAttrs=n}},T=function(t){if(R(t)){var n=t.llOriginalAttrs;N(t,"src",n.src),N(t,"srcset",n.srcset),N(t,"sizes",n.sizes)}},D=function(t,n){N(t,"sizes",b(t,n.data_sizes)),N(t,"srcset",b(t,n.data_srcset)),N(t,"src",b(t,n.data_src))},F=function(t){M(t,"src"),M(t,"srcset"),M(t,"sizes")},P=function(t,n){var e=t.parentNode;e&&"PICTURE"===e.tagName&&C(e).forEach(n)},S={IMG:function(t,n){P(t,(function(t){G(t),D(t,n)})),G(t),D(t,n)},IFRAME:function(t,n){N(t,"src",b(t,n.data_src))},VIDEO:function(t,n){!function(t,e){C(t).forEach((function(t){N(t,"src",b(t,n.data_src))}))}(t),N(t,"poster",b(t,n.data_poster)),N(t,"src",b(t,n.data_src)),t.load()}},V=function(t,n){var e=S[t.tagName];e&&e(t,n)},j=function(t,n,e){z(e,1),w(t,n.class_loading),h(t,l),L(n.callback_loading,t,e)},U=["IMG","IFRAME","VIDEO"],$=function(t,n){!n||function(t){return t.loadingCount>0}(n)||function(t){return t.toLoadCount>0}(n)||L(t.callback_finish,n)},q=function(t,n,e){t.addEventListener(n,e),t.llEvLisnrs[n]=e},H=function(t,n,e){t.removeEventListener(n,e)},B=function(t){return!!t.llEvLisnrs},J=function(t){if(B(t)){var n=t.llEvLisnrs;for(var e in n){var i=n[e];H(t,e,i)}delete t.llEvLisnrs}},K=function(t,n,e){!function(t){delete t.llTempImage}(t),z(e,-1),function(t){t&&(t.toLoadCount-=1)}(e),y(t,n.class_loading),n.unobserve_completed&&O(t,e)},Q=function(t,n,e){var i=k(t)||t;B(i)||function(t,n,e){B(t)||(t.llEvLisnrs={});var i="VIDEO"===t.tagName?"loadeddata":"load";q(t,i,n),q(t,"error",e)}(i,(function(r){!function(t,n,e,i){var r=A(n);K(n,e,i),w(n,e.class_loaded),h(n,u),L(e.callback_loaded,n,i),r||$(e,i)}(0,t,n,e),J(i)}),(function(r){!function(t,n,e,i){var r=A(n);K(n,e,i),w(n,e.class_error),h(n,f),L(e.callback_error,n,i),r||$(e,i)}(0,t,n,e),J(i)}))},W=function(t,n,e){!function(t){t.llTempImage=document.createElement("IMG")}(t),Q(t,n,e),function(t,n,e){var i=b(t,n.data_bg),r=b(t,n.data_bg_hidpi),o=a&&r?r:i;o&&(t.style.backgroundImage='url("'.concat(o,'")'),k(t).setAttribute("src",o),j(t,n,e))}(t,n,e),function(t,n,e){var i=b(t,n.data_bg_multi),r=b(t,n.data_bg_multi_hidpi),o=a&&r?r:i;o&&(t.style.backgroundImage=o,function(t,n,e){w(t,n.class_applied),h(t,d),n.unobserve_completed&&O(t,n),L(n.callback_applied,t,e)}(t,n,e))}(t,n,e)},X=function(t,n,e){!function(t){return U.indexOf(t.tagName)>-1}(t)?W(t,n,e):function(t,n,e){Q(t,n,e),V(t,n),j(t,n,e)}(t,n,e)},Y=["IMG","IFRAME"],Z=function(t){return t.use_native&&"loading"in HTMLImageElement.prototype},tt=function(t,n,e){t.forEach((function(t){return function(t){return t.isIntersecting||t.intersectionRatio>0}(t)?function(t,n,e,i){h(t,"entered"),w(t,e.class_entered),y(t,e.class_exited),function(t,n,e){n.unobserve_entered&&O(t,e)}(t,e,i),L(e.callback_enter,t,n,i),function(t){return I.indexOf(p(t))>=0}(t)||X(t,e,i)}(t.target,t,n,e):function(t,n,e,i){E(t)||(w(t,e.class_exited),function(t,n,e,i){e.cancel_on_exit&&function(t){return p(t)===l}(t)&&"IMG"===t.tagName&&(J(t),function(t){P(t,(function(t){F(t)})),F(t)}(t),function(t){P(t,(function(t){T(t)})),T(t)}(t),y(t,e.class_loading),z(i,-1),m(t),L(e.callback_cancel,t,n,i))}(t,n,e,i),L(e.callback_exit,t,n,i))}(t.target,t,n,e)}))},nt=function(t){return Array.prototype.slice.call(t)},et=function(t){return t.container.querySelectorAll(t.elements_selector)},it=function(t){return function(t){return p(t)===f}(t)},rt=function(t,n){return function(t){return nt(t).filter(E)}(t||et(n))},at=function(t,e){var r=c(t);this._settings=r,this.loadingCount=0,function(t,n){i&&!Z(t)&&(n._observer=new IntersectionObserver((function(e){tt(e,t,n)}),function(t){return{root:t.container===document?null:t.container,rootMargin:t.thresholds||t.threshold+"px"}}(t)))}(r,this),function(t,e){n&&window.addEventListener("online",(function(){!function(t,n){var e;(e=et(t),nt(e).filter(it)).forEach((function(n){y(n,t.class_error),m(n)})),n.update()}(t,e)}))}(r,this),this.update(e)};return at.prototype={update:function(t){var n,r,a=this._settings,o=rt(t,a);x(this,o.length),!e&&i?Z(a)?function(t,n,e){t.forEach((function(t){-1!==Y.indexOf(t.tagName)&&(t.setAttribute("loading","lazy"),function(t,n,e){Q(t,n,e),V(t,n),h(t,_)}(t,n,e))})),x(e,0)}(o,a,this):(r=o,function(t){t.disconnect()}(n=this._observer),function(t,n){n.forEach((function(n){t.observe(n)}))}(n,r)):this.loadAll(o)},destroy:function(){this._observer&&this._observer.disconnect(),et(this._settings).forEach((function(t){delete t.llOriginalAttrs})),delete this._observer,delete this._settings,delete this.loadingCount,delete this.toLoadCount},loadAll:function(t){var n=this,e=this._settings;rt(t,e).forEach((function(t){O(t,n),X(t,e,n)}))}},at.load=function(t,n){var e=c(n);X(t,e)},at.resetStatus=function(t){m(t)},n&&function(t,n){if(n)if(n.length)for(var e,i=0;e=n[i];i+=1)s(t,e);else s(t,n)}(at,window.lazyLoadOptions),at}(); diff --git a/templates/assets/libs/snackbar/snackbar.min.css b/templates/assets/libs/snackbar/snackbar.min.css deleted file mode 100644 index e74cee78..00000000 --- a/templates/assets/libs/snackbar/snackbar.min.css +++ /dev/null @@ -1 +0,0 @@ -.snackbar-container{transition:all .5s ease;transition-property:top,right,bottom,left,opacity;font-family:Roboto,sans-serif;font-size:14px;min-height:14px;background-color:#070b0e;position:fixed;display:flex;justify-content:space-between;align-items:center;color:#fff;line-height:22px;padding:18px 24px;bottom:-100px;top:-100px;opacity:0;z-index:9999}.snackbar-container .action{background:inherit;display:inline-block;border:none;font-size:inherit;text-transform:uppercase;color:#4caf50;margin:0 0 0 24px;padding:0;min-width:min-content;cursor:pointer}@media (min-width:640px){.snackbar-container{min-width:288px;max-width:568px;display:inline-flex;border-radius:2px;margin:24px}}@media (max-width:640px){.snackbar-container{left:0;right:0;width:100%}}.snackbar-pos.bottom-center{top:auto!important;bottom:0;left:50%;transform:translate(-50%,0)}.snackbar-pos.bottom-left{top:auto!important;bottom:0;left:0}.snackbar-pos.bottom-right{top:auto!important;bottom:0;right:0}.snackbar-pos.top-left{bottom:auto!important;top:0;left:0}.snackbar-pos.top-center{bottom:auto!important;top:0;left:50%;transform:translate(-50%,0)}.snackbar-pos.top-right{bottom:auto!important;top:0;right:0}@media (max-width:640px){.snackbar-pos.bottom-center,.snackbar-pos.top-center{left:0;transform:none}} \ No newline at end of file diff --git a/templates/assets/libs/snackbar/snackbar.min.js b/templates/assets/libs/snackbar/snackbar.min.js deleted file mode 100644 index df295923..00000000 --- a/templates/assets/libs/snackbar/snackbar.min.js +++ /dev/null @@ -1,16 +0,0 @@ -/*! - * Snackbar v0.1.14 - * http://polonel.com/Snackbar - * - * Copyright 2018 Chris Brame and other contributors - * Released under the MIT license - * https://github.com/polonel/Snackbar/blob/master/LICENSE - */ -!function(a,b){"use strict";"function"==typeof define&&define.amd?define([],function(){return a.Snackbar=b()}):"object"==typeof module&&module.exports?module.exports=a.Snackbar=b():a.Snackbar=b()}(this,function(){var a={};a.current=null;var b={text:"Default Text",textColor:"#FFFFFF",width:"auto",showAction:!0,actionText:"Dismiss",actionTextAria:"Dismiss, Description for Screen Readers",alertScreenReader:!1,actionTextColor:"#4CAF50",showSecondButton:!1,secondButtonText:"",secondButtonAria:"Description for Screen Readers",secondButtonTextColor:"#4CAF50",backgroundColor:"#323232",pos:"bottom-left",duration:5e3,customClass:"",onActionClick:function(a){a.style.opacity=0},onSecondButtonClick:function(a){},onClose:function(a){}};a.show=function(d){var e=c(!0,b,d);a.current&&(a.current.style.opacity=0,setTimeout(function(){var a=this.parentElement;a&& - // possible null if too many/fast Snackbars - a.removeChild(this)}.bind(a.current),500)),a.snackbar=document.createElement("div"),a.snackbar.className="snackbar-container "+e.customClass,a.snackbar.style.width=e.width;var f=document.createElement("p");if(f.style.margin=0,f.style.padding=0,f.style.color=e.textColor,f.style.fontSize="14px",f.style.fontWeight=300,f.style.lineHeight="1em",f.innerHTML=e.text,a.snackbar.appendChild(f),a.snackbar.style.background=e.backgroundColor,e.showSecondButton){var g=document.createElement("button");g.className="action",g.innerHTML=e.secondButtonText,g.setAttribute("aria-label",e.secondButtonAria),g.style.color=e.secondButtonTextColor,g.addEventListener("click",function(){e.onSecondButtonClick(a.snackbar)}),a.snackbar.appendChild(g)}if(e.showAction){var h=document.createElement("button");h.className="action",h.innerHTML=e.actionText,h.setAttribute("aria-label",e.actionTextAria),h.style.color=e.actionTextColor,h.addEventListener("click",function(){e.onActionClick(a.snackbar)}),a.snackbar.appendChild(h)}e.duration&&setTimeout(function(){a.current===this&&(a.current.style.opacity=0, - // When natural remove event occurs let's move the snackbar to its origins - a.current.style.top="-100px",a.current.style.bottom="-100px")}.bind(a.snackbar),e.duration),e.alertScreenReader&&a.snackbar.setAttribute("role","alert"),a.snackbar.addEventListener("transitionend",function(b,c){"opacity"===b.propertyName&&"0"===this.style.opacity&&("function"==typeof e.onClose&&e.onClose(this),this.parentElement.removeChild(this),a.current===this&&(a.current=null))}.bind(a.snackbar)),a.current=a.snackbar,document.body.appendChild(a.snackbar);getComputedStyle(a.snackbar).bottom,getComputedStyle(a.snackbar).top;a.snackbar.style.opacity=1,a.snackbar.className="snackbar-container "+e.customClass+" snackbar-pos "+e.pos},a.close=function(){a.current&&(a.current.style.opacity=0)}; - // Pure JS Extend - // http://gomakethings.com/vanilla-javascript-version-of-jquery-extend/ - var c=function(){var a={},b=!1,d=0,e=arguments.length;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(b=arguments[0],d++);for(var f=function(d){for(var e in d)Object.prototype.hasOwnProperty.call(d,e)&&(b&&"[object Object]"===Object.prototype.toString.call(d[e])?a[e]=c(!0,a[e],d[e]):a[e]=d[e])};d.swiper-wrapper{flex-direction:column}.swiper-wrapper{width:100%;height:100%;display:flex;transition-property:transform;box-sizing:content-box}.swiper-android .swiper-slide,.swiper-wrapper{transform:translate3d(0,0,0)}.swiper-pointer-events{touch-action:pan-y}.swiper-pointer-events.swiper-vertical{touch-action:pan-x}.swiper-slide{flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight .swiper-slide{height:auto}.swiper-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-backface-hidden .swiper-slide{transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-3d,.swiper-3d.swiper-css-mode .swiper-wrapper{perspective:1200px}.swiper-3d .swiper-cube-shadow,.swiper-3d .swiper-slide,.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-bottom,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-wrapper{transform-style:preserve-3d}.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-bottom,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-3d .swiper-slide-shadow{background:rgba(0,0,0,.15)}.swiper-3d .swiper-slide-shadow-left{background-image:linear-gradient(to left,rgba(0,0,0,.5),transparent)}.swiper-3d .swiper-slide-shadow-right{background-image:linear-gradient(to right,rgba(0,0,0,.5),transparent)}.swiper-3d .swiper-slide-shadow-top{background-image:linear-gradient(to top,rgba(0,0,0,.5),transparent)}.swiper-3d .swiper-slide-shadow-bottom{background-image:linear-gradient(to bottom,rgba(0,0,0,.5),transparent)}.swiper-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-horizontal.swiper-css-mode>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-vertical.swiper-css-mode>.swiper-wrapper{scroll-snap-type:y mandatory}.swiper-centered>.swiper-wrapper::before{content:"";flex-shrink:0;order:9999}.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{margin-inline-start:var(--swiper-centered-offset-before)}.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{margin-block-start:var(--swiper-centered-offset-before)}.swiper-centered>.swiper-wrapper>.swiper-slide{scroll-snap-align:center center}.swiper-virtual .swiper-slide{-webkit-backface-visibility:hidden;transform:translateZ(0)}.swiper-virtual.swiper-css-mode .swiper-wrapper::after{content:"";position:absolute;left:0;top:0;pointer-events:none}.swiper-virtual.swiper-css-mode.swiper-horizontal .swiper-wrapper::after{height:1px;width:var(--swiper-virtual-size)}.swiper-virtual.swiper-css-mode.swiper-vertical .swiper-wrapper::after{width:1px;height:var(--swiper-virtual-size)}:root{--swiper-navigation-size:44px}.swiper-button-next,.swiper-button-prev{position:absolute;top:50%;width:calc(var(--swiper-navigation-size)/44*27);height:var(--swiper-navigation-size);margin-top:calc(0px - (var(--swiper-navigation-size)/2));z-index:10;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--swiper-navigation-color,var(--swiper-theme-color))}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-next:after,.swiper-button-prev:after{font-family:swiper-icons;font-size:var(--swiper-navigation-size);text-transform:none!important;letter-spacing:0;font-variant:initial;line-height:1}.swiper-button-prev,.swiper-rtl .swiper-button-next{left:10px;right:auto}.swiper-button-prev:after,.swiper-rtl .swiper-button-next:after{content:"prev"}.swiper-button-next,.swiper-rtl .swiper-button-prev{right:10px;left:auto}.swiper-button-next:after,.swiper-rtl .swiper-button-prev:after{content:"next"}.swiper-button-lock{display:none}.swiper-pagination{position:absolute;text-align:center;transition:.3s opacity;transform:translate3d(0,0,0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-bullets.swiper-pagination-horizontal,.swiper-pagination-custom,.swiper-pagination-fraction{bottom:10px;left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active,.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{transform:scale(.33)}.swiper-pagination-bullet{width:var(--swiper-pagination-bullet-width,var(--swiper-pagination-bullet-size,8px));height:var(--swiper-pagination-bullet-height,var(--swiper-pagination-bullet-size,8px));display:inline-block;border-radius:50%;background:var(--swiper-pagination-bullet-inactive-color,#000);opacity:var(--swiper-pagination-bullet-inactive-opacity, .2)}button.swiper-pagination-bullet{border:0;margin:0;padding:0;box-shadow:none;-webkit-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet:only-child{display:none!important}.swiper-pagination-bullet-active{opacity:var(--swiper-pagination-bullet-opacity, 1);background:var(--swiper-pagination-color,var(--swiper-theme-color))}.swiper-pagination-vertical.swiper-pagination-bullets,.swiper-vertical>.swiper-pagination-bullets{right:10px;top:50%;transform:translate3d(0,-50%,0)}.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets .swiper-pagination-bullet{margin:var(--swiper-pagination-bullet-vertical-gap,6px)0;display:block}.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;transform:translateY(-50%);width:8px}.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;transition:.2s transform,.2s top}.swiper-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 var(--swiper-pagination-bullet-horizontal-gap,4px)}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;transform:translateX(-50%);white-space:nowrap}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s left}.swiper-horizontal.swiper-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s right}.swiper-pagination-progressbar{background:rgba(0,0,0,.25);position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:var(--swiper-pagination-color,var(--swiper-theme-color));position:absolute;left:0;top:0;width:100%;height:100%;transform:scale(0);transform-origin:left top}.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{transform-origin:right top}.swiper-horizontal>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-horizontal,.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite,.swiper-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite{width:100%;height:4px;left:0;top:0}.swiper-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-vertical,.swiper-vertical>.swiper-pagination-progressbar{width:4px;height:100%;left:0;top:0}.swiper-pagination-lock{display:none}.swiper-scrollbar{border-radius:10px;position:relative;-ms-touch-action:none;background:rgba(0,0,0,.1)}.swiper-horizontal>.swiper-scrollbar{position:absolute;left:1%;bottom:3px;z-index:50;height:5px;width:98%}.swiper-vertical>.swiper-scrollbar{position:absolute;right:3px;top:1%;z-index:50;width:5px;height:98%}.swiper-scrollbar-drag{height:100%;width:100%;position:relative;background:rgba(0,0,0,.5);border-radius:10px;left:0;top:0}.swiper-scrollbar-cursor-drag{cursor:move}.swiper-scrollbar-lock{display:none}.swiper-zoom-container{width:100%;height:100%;display:flex;justify-content:center;align-items:center;text-align:center}.swiper-zoom-container>canvas,.swiper-zoom-container>img,.swiper-zoom-container>svg{max-width:100%;max-height:100%;object-fit:contain}.swiper-slide-zoomed{cursor:move}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;transform-origin:50%;box-sizing:border-box;border:4px solid var(--swiper-preloader-color,var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}.swiper-slide-visible .swiper-lazy-preloader{animation:swiper-preloader-spin 1s infinite linear}.swiper-lazy-preloader-white{--swiper-preloader-color:#fff}.swiper-lazy-preloader-black{--swiper-preloader-color:#000}.swiper .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}.swiper-free-mode>.swiper-wrapper{transition-timing-function:ease-out;margin:0 auto}.swiper-grid>.swiper-wrapper{flex-wrap:wrap}.swiper-grid-column>.swiper-wrapper{flex-wrap:wrap;flex-direction:column}.swiper-fade.swiper-free-mode .swiper-slide{transition-timing-function:ease-out}.swiper-fade .swiper-slide{pointer-events:none;transition-property:opacity}.swiper-fade .swiper-slide .swiper-slide{pointer-events:none}.swiper-fade .swiper-slide-active,.swiper-fade .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-cards,.swiper-cube,.swiper-flip{overflow:visible}.swiper-cube .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1;visibility:hidden;transform-origin:0 0;width:100%;height:100%}.swiper-cube .swiper-slide .swiper-slide{pointer-events:none}.swiper-cube.swiper-rtl .swiper-slide{transform-origin:100%0}.swiper-cube .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-cube .swiper-slide-active,.swiper-cube .swiper-slide-next,.swiper-cube .swiper-slide-next+.swiper-slide,.swiper-cube .swiper-slide-prev{pointer-events:auto;visibility:visible}.swiper-cube .swiper-slide-shadow-bottom,.swiper-cube .swiper-slide-shadow-left,.swiper-cube .swiper-slide-shadow-right,.swiper-cube .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-cube .swiper-cube-shadow{position:absolute;left:0;bottom:0;width:100%;height:100%;opacity:.6;z-index:0}.swiper-cube .swiper-cube-shadow:before{content:"";background:#000;position:absolute;left:0;top:0;bottom:0;right:0;filter:blur(50px)}.swiper-flip .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1}.swiper-flip .swiper-slide .swiper-slide{pointer-events:none}.swiper-flip .swiper-slide-active,.swiper-flip .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-flip .swiper-slide-shadow-bottom,.swiper-flip .swiper-slide-shadow-left,.swiper-flip .swiper-slide-shadow-right,.swiper-flip .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-cards .swiper-slide,.swiper-creative .swiper-slide{-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden}.swiper-creative .swiper-slide{transition-property:transform,opacity,height}.swiper-cards .swiper-slide{transform-origin:center bottom} \ No newline at end of file diff --git a/templates/assets/libs/swiper/swiper-bundle.min.js b/templates/assets/libs/swiper/swiper-bundle.min.js deleted file mode 100644 index 7d993faf..00000000 --- a/templates/assets/libs/swiper/swiper-bundle.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Swiper=t()}(this,(function(){"use strict";function e(e,t){for(var a=0;a0&&i(e[s],t[s])}))}var s={body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},createElementNS:function(){return{}},importNode:function(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function r(){var e="undefined"!=typeof document?document:{};return i(e,s),e}var n={document:s,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState:function(){},pushState:function(){},go:function(){},back:function(){}},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){},matchMedia:function(){return{}},requestAnimationFrame:function(e){return"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0)},cancelAnimationFrame:function(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function l(){var e="undefined"!=typeof window?window:{};return i(e,n),e}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function u(e,t,a){return(u=p()?Reflect.construct:function(e,t,a){var i=[null];i.push.apply(i,t);var s=new(Function.bind.apply(e,i));return a&&d(s,a.prototype),s}).apply(null,arguments)}function c(e){var t="function"==typeof Map?new Map:void 0;return(c=function(e){if(null===e||(a=e,-1===Function.toString.call(a).indexOf("[native code]")))return e;var a;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return u(e,arguments,o(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),d(i,e)})(e)}var h=function(e){var t,a;function i(t){var a,i,s;return i=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(a=e.call.apply(e,[this].concat(t))||this),s=i.__proto__,Object.defineProperty(i,"__proto__",{get:function(){return s},set:function(e){s.__proto__=e}}),a}return a=e,(t=i).prototype=Object.create(a.prototype),t.prototype.constructor=t,t.__proto__=a,i}(c(Array));function v(e){void 0===e&&(e=[]);var t=[];return e.forEach((function(e){Array.isArray(e)?t.push.apply(t,v(e)):t.push(e)})),t}function f(e,t){return Array.prototype.filter.call(e,t)}function m(e,t){var a=l(),i=r(),s=[];if(!t&&e instanceof h)return e;if(!e)return new h(s);if("string"==typeof e){var n=e.trim();if(n.indexOf("<")>=0&&n.indexOf(">")>=0){var o="div";0===n.indexOf("0})).length>0},toggleClass:function(){for(var e=arguments.length,t=new Array(e),a=0;a=0;h-=1){var v=c[h];r&&v.listener===r||r&&v.listener&&v.listener.dom7proxy&&v.listener.dom7proxy===r?(u.removeEventListener(d,v.proxyListener,n),c.splice(h,1)):r||(u.removeEventListener(d,v.proxyListener,n),c.splice(h,1))}}return this},trigger:function(){for(var e=l(),t=arguments.length,a=new Array(t),i=0;i0})),p.dispatchEvent(u),p.dom7EventData=[],delete p.dom7EventData}}return this},transitionEnd:function(e){var t=this;return e&&t.on("transitionend",(function a(i){i.target===this&&(e.call(this,i),t.off("transitionend",a))})),this},outerWidth:function(e){if(this.length>0){if(e){var t=this.styles();return this[0].offsetWidth+parseFloat(t.getPropertyValue("margin-right"))+parseFloat(t.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},outerHeight:function(e){if(this.length>0){if(e){var t=this.styles();return this[0].offsetHeight+parseFloat(t.getPropertyValue("margin-top"))+parseFloat(t.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},styles:function(){var e=l();return this[0]?e.getComputedStyle(this[0],null):{}},offset:function(){if(this.length>0){var e=l(),t=r(),a=this[0],i=a.getBoundingClientRect(),s=t.body,n=a.clientTop||s.clientTop||0,o=a.clientLeft||s.clientLeft||0,d=a===e?e.scrollY:a.scrollTop,p=a===e?e.scrollX:a.scrollLeft;return{top:i.top+d-n,left:i.left+p-o}}return null},css:function(e,t){var a,i=l();if(1===arguments.length){if("string"!=typeof e){for(a=0;at-1)return m([]);if(e<0){var a=t+e;return m(a<0?[]:[this[a]])}return m([this[e]])},append:function(){for(var e,t=r(),a=0;a=0;a-=1)this[t].insertBefore(s.childNodes[a],this[t].childNodes[0])}else if(e instanceof h)for(a=0;a0?e?this[0].nextElementSibling&&m(this[0].nextElementSibling).is(e)?m([this[0].nextElementSibling]):m([]):this[0].nextElementSibling?m([this[0].nextElementSibling]):m([]):m([])},nextAll:function(e){var t=[],a=this[0];if(!a)return m([]);for(;a.nextElementSibling;){var i=a.nextElementSibling;e?m(i).is(e)&&t.push(i):t.push(i),a=i}return m(t)},prev:function(e){if(this.length>0){var t=this[0];return e?t.previousElementSibling&&m(t.previousElementSibling).is(e)?m([t.previousElementSibling]):m([]):t.previousElementSibling?m([t.previousElementSibling]):m([])}return m([])},prevAll:function(e){var t=[],a=this[0];if(!a)return m([]);for(;a.previousElementSibling;){var i=a.previousElementSibling;e?m(i).is(e)&&t.push(i):t.push(i),a=i}return m(t)},parent:function(e){for(var t=[],a=0;a6&&(i=i.split(", ").map((function(e){return e.replace(",",".")})).join(", ")),s=new r.WebKitCSSMatrix("none"===i?"":i)):a=(s=n.MozTransform||n.OTransform||n.MsTransform||n.msTransform||n.transform||n.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(","),"x"===t&&(i=r.WebKitCSSMatrix?s.m41:16===a.length?parseFloat(a[12]):parseFloat(a[4])),"y"===t&&(i=r.WebKitCSSMatrix?s.m42:16===a.length?parseFloat(a[13]):parseFloat(a[5])),i||0}function C(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function S(){for(var e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"],a=1;a=0,observer:"MutationObserver"in e||"WebkitMutationObserver"in e,passiveListener:function(){var t=!1;try{var a=Object.defineProperty({},"passive",{get:function(){t=!0}});e.addEventListener("testPassiveListener",null,a)}catch(e){}return t}(),gestures:"ongesturestart"in e}}()),g}function k(e){return void 0===e&&(e={}),b||(b=function(e){var t=(void 0===e?{}:e).userAgent,a=P(),i=l(),s=i.navigator.platform,r=t||i.navigator.userAgent,n={ios:!1,android:!1},o=i.screen.width,d=i.screen.height,p=r.match(/(Android);?[\s\/]+([\d.]+)?/),u=r.match(/(iPad).*OS\s([\d_]+)/),c=r.match(/(iPod)(.*OS\s([\d_]+))?/),h=!u&&r.match(/(iPhone\sOS|iOS)\s([\d_]+)/),v="Win32"===s,f="MacIntel"===s;return!u&&f&&a.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(o+"x"+d)>=0&&((u=r.match(/(Version)\/([\d.]+)/))||(u=[0,1,"13_0_0"]),f=!1),p&&!v&&(n.os="android",n.android=!0),(u||h||c)&&(n.os="ios",n.ios=!0),n}(e)),b}function $(){return y||(y=function(){var e,t=l();return{isEdge:!!t.navigator.userAgent.match(/Edge/g),isSafari:(e=t.navigator.userAgent.toLowerCase(),e.indexOf("safari")>=0&&e.indexOf("chrome")<0&&e.indexOf("android")<0),isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(t.navigator.userAgent)}}()),y}Object.keys(w).forEach((function(e){Object.defineProperty(m.fn,e,{value:w[e],writable:!0})}));var L={name:"resize",create:function(){var e=this;S(e,{resize:{observer:null,createObserver:function(){e&&!e.destroyed&&e.initialized&&(e.resize.observer=new ResizeObserver((function(t){var a=e.width,i=e.height,s=a,r=i;t.forEach((function(t){var a=t.contentBoxSize,i=t.contentRect,n=t.target;n&&n!==e.el||(s=i?i.width:(a[0]||a).inlineSize,r=i?i.height:(a[0]||a).blockSize)})),s===a&&r===i||e.resize.resizeHandler()})),e.resize.observer.observe(e.el))},removeObserver:function(){e.resize.observer&&e.resize.observer.unobserve&&e.el&&(e.resize.observer.unobserve(e.el),e.resize.observer=null)},resizeHandler:function(){e&&!e.destroyed&&e.initialized&&(e.emit("beforeResize"),e.emit("resize"))},orientationChangeHandler:function(){e&&!e.destroyed&&e.initialized&&e.emit("orientationchange")}}})},on:{init:function(e){var t=l();e.params.resizeObserver&&void 0!==l().ResizeObserver?e.resize.createObserver():(t.addEventListener("resize",e.resize.resizeHandler),t.addEventListener("orientationchange",e.resize.orientationChangeHandler))},destroy:function(e){var t=l();e.resize.removeObserver(),t.removeEventListener("resize",e.resize.resizeHandler),t.removeEventListener("orientationchange",e.resize.orientationChangeHandler)}}},I={attach:function(e,t){void 0===t&&(t={});var a=l(),i=this,s=new(a.MutationObserver||a.WebkitMutationObserver)((function(e){if(1!==e.length){var t=function(){i.emit("observerUpdate",e[0])};a.requestAnimationFrame?a.requestAnimationFrame(t):a.setTimeout(t,0)}else i.emit("observerUpdate",e[0])}));s.observe(e,{attributes:void 0===t.attributes||t.attributes,childList:void 0===t.childList||t.childList,characterData:void 0===t.characterData||t.characterData}),i.observer.observers.push(s)},init:function(){var e=this;if(e.support.observer&&e.params.observer){if(e.params.observeParents)for(var t=e.$el.parents(),a=0;a0||s.isTouched&&s.isMoved)))if(!!n.noSwipingClass&&""!==n.noSwipingClass&&d.target&&d.target.shadowRoot&&e.path&&e.path[0]&&(p=m(e.path[0])),n.noSwiping&&p.closest(n.noSwipingSelector?n.noSwipingSelector:"."+n.noSwipingClass)[0])t.allowClick=!0;else if(!n.swipeHandler||p.closest(n.swipeHandler)[0]){o.currentX="touchstart"===d.type?d.targetTouches[0].pageX:d.pageX,o.currentY="touchstart"===d.type?d.targetTouches[0].pageY:d.pageY;var u=o.currentX,c=o.currentY,h=n.edgeSwipeDetection||n.iOSEdgeSwipeDetection,v=n.edgeSwipeThreshold||n.iOSEdgeSwipeThreshold;if(h&&(u<=v||u>=i.innerWidth-v)){if("prevent"!==h)return;e.preventDefault()}if(S(s,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),o.startX=u,o.startY=c,s.touchStartTime=x(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,n.threshold>0&&(s.allowThresholdMove=!1),"touchstart"!==d.type){var f=!0;p.is(s.formElements)&&(f=!1),a.activeElement&&m(a.activeElement).is(s.formElements)&&a.activeElement!==p[0]&&a.activeElement.blur();var g=f&&t.allowTouchMove&&n.touchStartPreventDefault;!n.touchStartForcePreventDefault&&!g||p[0].isContentEditable||d.preventDefault()}t.emit("touchStart",d)}}}function D(e){var t=r(),a=this,i=a.touchEventsData,s=a.params,n=a.touches,l=a.rtlTranslate;if(a.enabled){var o=e;if(o.originalEvent&&(o=o.originalEvent),i.isTouched){if(!i.isTouchEvent||"touchmove"===o.type){var d="touchmove"===o.type&&o.targetTouches&&(o.targetTouches[0]||o.changedTouches[0]),p="touchmove"===o.type?d.pageX:o.pageX,u="touchmove"===o.type?d.pageY:o.pageY;if(o.preventedByNestedSwiper)return n.startX=p,void(n.startY=u);if(!a.allowTouchMove)return a.allowClick=!1,void(i.isTouched&&(S(n,{startX:p,startY:u,currentX:p,currentY:u}),i.touchStartTime=x()));if(i.isTouchEvent&&s.touchReleaseOnEdges&&!s.loop)if(a.isVertical()){if(un.startY&&a.translate>=a.minTranslate())return i.isTouched=!1,void(i.isMoved=!1)}else if(pn.startX&&a.translate>=a.minTranslate())return;if(i.isTouchEvent&&t.activeElement&&o.target===t.activeElement&&m(o.target).is(i.formElements))return i.isMoved=!0,void(a.allowClick=!1);if(i.allowTouchCallbacks&&a.emit("touchMove",o),!(o.targetTouches&&o.targetTouches.length>1)){n.currentX=p,n.currentY=u;var v,c=n.currentX-n.startX,h=n.currentY-n.startY;if(!(a.params.threshold&&Math.sqrt(Math.pow(c,2)+Math.pow(h,2))=25&&(v=180*Math.atan2(Math.abs(h),Math.abs(c))/Math.PI,i.isScrolling=a.isHorizontal()?v>s.touchAngle:90-v>s.touchAngle)),i.isScrolling&&a.emit("touchMoveOpposite",o),void 0===i.startMoving&&(n.currentX===n.startX&&n.currentY===n.startY||(i.startMoving=!0)),i.isScrolling)i.isTouched=!1;else if(i.startMoving){a.allowClick=!1,!s.cssMode&&o.cancelable&&o.preventDefault(),s.touchMoveStopPropagation&&!s.nested&&o.stopPropagation(),i.isMoved||(s.loop&&a.loopFix(),i.startTranslate=a.getTranslate(),a.setTransition(0),a.animating&&a.$wrapperEl.trigger("webkitTransitionEnd transitionend"),i.allowMomentumBounce=!1,!s.grabCursor||!0!==a.allowSlideNext&&!0!==a.allowSlidePrev||a.setGrabCursor(!0),a.emit("sliderFirstMove",o)),a.emit("sliderMove",o),i.isMoved=!0;var f=a.isHorizontal()?c:h;n.diff=f,f*=s.touchRatio,l&&(f=-f),a.swipeDirection=f>0?"prev":"next",i.currentTranslate=f+i.startTranslate;var g=!0,b=s.resistanceRatio;if(s.touchReleaseOnEdges&&(b=0),f>0&&i.currentTranslate>a.minTranslate()?(g=!1,s.resistance&&(i.currentTranslate=a.minTranslate()-1+Math.pow(-a.minTranslate()+i.startTranslate+f,b))):f<0&&i.currentTranslatei.startTranslate&&(i.currentTranslate=i.startTranslate),a.allowSlidePrev||a.allowSlideNext||(i.currentTranslate=i.startTranslate),s.threshold>0){if(!(Math.abs(f)>s.threshold||i.allowThresholdMove))return void(i.currentTranslate=i.startTranslate);if(!i.allowThresholdMove)return i.allowThresholdMove=!0,n.startX=n.currentX,n.startY=n.currentY,i.currentTranslate=i.startTranslate,void(n.diff=a.isHorizontal()?n.currentX-n.startX:n.currentY-n.startY)}s.followFinger&&!s.cssMode&&((s.freeMode||s.watchSlidesProgress||s.watchSlidesVisibility)&&(a.updateActiveIndex(),a.updateSlidesClasses()),s.freeMode&&(0===i.velocities.length&&i.velocities.push({position:n[a.isHorizontal()?"startX":"startY"],time:i.touchStartTime}),i.velocities.push({position:n[a.isHorizontal()?"currentX":"currentY"],time:x()})),a.updateProgress(i.currentTranslate),a.setTranslate(i.currentTranslate))}}}}else i.startMoving&&i.isScrolling&&a.emit("touchMoveOpposite",o)}}function N(e){var t=this,a=t.touchEventsData,i=t.params,s=t.touches,r=t.rtlTranslate,n=t.$wrapperEl,l=t.slidesGrid,o=t.snapGrid;if(t.enabled){var d=e;if(d.originalEvent&&(d=d.originalEvent),a.allowTouchCallbacks&&t.emit("touchEnd",d),a.allowTouchCallbacks=!1,!a.isTouched)return a.isMoved&&i.grabCursor&&t.setGrabCursor(!1),a.isMoved=!1,void(a.startMoving=!1);i.grabCursor&&a.isMoved&&a.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);var p,u=x(),c=u-a.touchStartTime;if(t.allowClick&&(t.updateClickedSlide(d),t.emit("tap click",d),c<300&&u-a.lastClickTime<300&&t.emit("doubleTap doubleClick",d)),a.lastClickTime=x(),E((function(){t.destroyed||(t.allowClick=!0)})),!a.isTouched||!a.isMoved||!t.swipeDirection||0===s.diff||a.currentTranslate===a.startTranslate)return a.isTouched=!1,a.isMoved=!1,void(a.startMoving=!1);if(a.isTouched=!1,a.isMoved=!1,a.startMoving=!1,p=i.followFinger?r?t.translate:-t.translate:-a.currentTranslate,!i.cssMode)if(i.freeMode){if(p<-t.minTranslate())return void t.slideTo(t.activeIndex);if(p>-t.maxTranslate())return void(t.slides.length1){var h=a.velocities.pop(),v=a.velocities.pop(),f=h.position-v.position,m=h.time-v.time;t.velocity=f/m,t.velocity/=2,Math.abs(t.velocity)150||x()-h.time>300)&&(t.velocity=0)}else t.velocity=0;t.velocity*=i.freeModeMomentumVelocityRatio,a.velocities.length=0;var g=1e3*i.freeModeMomentumRatio,b=t.velocity*g,y=t.translate+b;r&&(y=-y);var w,T,C=!1,S=20*Math.abs(t.velocity)*i.freeModeMomentumBounceRatio;if(yt.minTranslate())i.freeModeMomentumBounce?(y-t.minTranslate()>S&&(y=t.minTranslate()+S),w=t.minTranslate(),C=!0,a.allowMomentumBounce=!0):y=t.minTranslate(),i.loop&&i.centeredSlides&&(T=!0);else if(i.freeModeSticky){for(var M,z=0;z-y){M=z;break}y=-(y=Math.abs(o[M]-y)=i.longSwipesMs)&&(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses())}else{for(var $=0,L=t.slidesSizesGrid[0],I=0;I=l[I]&&p=l[I]&&($=I,L=l[l.length-1]-l[l.length-2])}var A=(p-l[$])/L,D=$i.longSwipesMs){if(!i.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(A>=i.longSwipesRatio?t.slideTo($+D):t.slideTo($)),"prev"===t.swipeDirection&&(A>1-i.longSwipesRatio?t.slideTo($+D):t.slideTo($))}else{if(!i.shortSwipes)return void t.slideTo(t.activeIndex);!t.navigation||d.target!==t.navigation.nextEl&&d.target!==t.navigation.prevEl?("next"===t.swipeDirection&&t.slideTo($+D),"prev"===t.swipeDirection&&t.slideTo($)):d.target===t.navigation.nextEl?t.slideTo($+D):t.slideTo($)}}}}function G(){var e=this,t=e.params,a=e.el;if(!a||0!==a.offsetWidth){t.breakpoints&&e.setBreakpoint();var i=e.allowSlideNext,s=e.allowSlidePrev,r=e.snapGrid;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses(),("auto"===t.slidesPerView||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.run(),e.allowSlidePrev=s,e.allowSlideNext=i,e.params.watchOverflow&&r!==e.snapGrid&&e.checkOverflow()}}function B(e){var t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function H(){var e=this,t=e.wrapperEl,a=e.rtlTranslate;if(e.enabled){e.previousTranslate=e.translate,e.isHorizontal()?e.translate=a?t.scrollWidth-t.offsetWidth-t.scrollLeft:-t.scrollLeft:e.translate=-t.scrollTop,-0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();var i=e.maxTranslate()-e.minTranslate();(0===i?0:(e.translate-e.minTranslate())/i)!==e.progress&&e.updateProgress(a?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}}var X=!1;function Y(){}var R={init:!0,direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!1,nested:!1,enabled:!0,width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,slidesPerGroupSkip:0,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!1,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:0,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,loopFillGroupWithBlank:!1,loopPreventsSlide:!0,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,containerModifierClass:"swiper-container-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-invisible-blank",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",runCallbacksOnInit:!0,_emitClasses:!1},W={modular:{useParams:function(e){var t=this;t.modules&&Object.keys(t.modules).forEach((function(a){var i=t.modules[a];i.params&&S(e,i.params)}))},useModules:function(e){void 0===e&&(e={});var t=this;t.modules&&Object.keys(t.modules).forEach((function(a){var i=t.modules[a],s=e[a]||{};i.on&&t.on&&Object.keys(i.on).forEach((function(e){t.on(e,i.on[e])})),i.create&&i.create.bind(t)(s)}))}},eventsEmitter:{on:function(e,t,a){var i=this;if("function"!=typeof t)return i;var s=a?"unshift":"push";return e.split(" ").forEach((function(e){i.eventsListeners[e]||(i.eventsListeners[e]=[]),i.eventsListeners[e][s](t)})),i},once:function(e,t,a){var i=this;if("function"!=typeof t)return i;function s(){i.off(e,s),s.__emitterProxy&&delete s.__emitterProxy;for(var a=arguments.length,r=new Array(a),n=0;n=0&&t.eventsAnyListeners.splice(a,1),t},off:function(e,t){var a=this;return a.eventsListeners?(e.split(" ").forEach((function(e){void 0===t?a.eventsListeners[e]=[]:a.eventsListeners[e]&&a.eventsListeners[e].forEach((function(i,s){(i===t||i.__emitterProxy&&i.__emitterProxy===t)&&a.eventsListeners[e].splice(s,1)}))})),a):a},emit:function(){var e,t,a,i=this;if(!i.eventsListeners)return i;for(var s=arguments.length,r=new Array(s),n=0;n=0&&(y=parseFloat(y.replace("%",""))/100*r),e.virtualSize=-y,n?p.css({marginLeft:"",marginTop:""}):p.css({marginRight:"",marginBottom:""}),i.slidesPerColumn>1&&(T=Math.floor(u/i.slidesPerColumn)===u/e.params.slidesPerColumn?u:Math.ceil(u/i.slidesPerColumn)*i.slidesPerColumn,"auto"!==i.slidesPerView&&"row"===i.slidesPerColumnFill&&(T=Math.max(T,i.slidesPerView*i.slidesPerColumn)));for(var M,z,P,k=i.slidesPerColumn,$=T/k,L=Math.floor(u/i.slidesPerColumn),I=0;I1){var A=void 0,D=void 0,N=void 0;if("row"===i.slidesPerColumnFill&&i.slidesPerGroup>1){var G=Math.floor(I/(i.slidesPerGroup*i.slidesPerColumn)),B=I-i.slidesPerColumn*i.slidesPerGroup*G,H=0===G?i.slidesPerGroup:Math.min(Math.ceil((u-G*k*i.slidesPerGroup)/k),i.slidesPerGroup);A=(D=B-(N=Math.floor(B/H))*H+G*i.slidesPerGroup)+N*T/k,O.css({"-webkit-box-ordinal-group":A,"-moz-box-ordinal-group":A,"-ms-flex-order":A,"-webkit-order":A,order:A})}else"column"===i.slidesPerColumnFill?(N=I-(D=Math.floor(I/k))*k,(D>L||D===L&&N===k-1)&&(N+=1)>=k&&(N=0,D+=1)):D=I-(N=Math.floor(I/$))*$;O.css(t("margin-top"),0!==N&&i.spaceBetween&&i.spaceBetween+"px")}if("none"!==O.css("display")){if("auto"===i.slidesPerView){var X=getComputedStyle(O[0]),Y=O[0].style.transform,R=O[0].style.webkitTransform;if(Y&&(O[0].style.transform="none"),R&&(O[0].style.webkitTransform="none"),i.roundLengths)C=e.isHorizontal()?O.outerWidth(!0):O.outerHeight(!0);else{var W=a(X,"width"),V=a(X,"padding-left"),F=a(X,"padding-right"),_=a(X,"margin-left"),q=a(X,"margin-right"),j=X.getPropertyValue("box-sizing");if(j&&"border-box"===j)C=W+_+q;else{var U=O[0],K=U.clientWidth;C=W+V+F+_+q+(U.offsetWidth-K)}}Y&&(O[0].style.transform=Y),R&&(O[0].style.webkitTransform=R),i.roundLengths&&(C=Math.floor(C))}else C=(r-(i.slidesPerView-1)*y)/i.slidesPerView,i.roundLengths&&(C=Math.floor(C)),p[I]&&(p[I].style[t("width")]=C+"px");p[I]&&(p[I].swiperSlideSize=C),v.push(C),i.centeredSlides?(w=w+C/2+E/2+y,0===E&&0!==I&&(w=w-r/2-y),0===I&&(w=w-r/2-y),Math.abs(w)<.001&&(w=0),i.roundLengths&&(w=Math.floor(w)),x%i.slidesPerGroup==0&&c.push(w),h.push(w)):(i.roundLengths&&(w=Math.floor(w)),(x-Math.min(e.params.slidesPerGroupSkip,x))%e.params.slidesPerGroup==0&&c.push(w),h.push(w),w=w+C+y),e.virtualSize+=C+y,E=C,x+=1}}if(e.virtualSize=Math.max(e.virtualSize,r)+m,n&&l&&("slide"===i.effect||"coverflow"===i.effect)&&s.css({width:e.virtualSize+i.spaceBetween+"px"}),i.setWrapperSize&&s.css(((z={})[t("width")]=e.virtualSize+i.spaceBetween+"px",z)),i.slidesPerColumn>1&&(e.virtualSize=(C+i.spaceBetween)*T,e.virtualSize=Math.ceil(e.virtualSize/i.slidesPerColumn)-i.spaceBetween,s.css(((P={})[t("width")]=e.virtualSize+i.spaceBetween+"px",P)),i.centeredSlides)){M=[];for(var Z=0;Z1&&c.push(e.virtualSize-r)}if(0===c.length&&(c=[0]),0!==i.spaceBetween){var te,ae=e.isHorizontal()&&n?"marginLeft":t("marginRight");p.filter((function(e,t){return!i.cssMode||t!==p.length-1})).css(((te={})[ae]=y+"px",te))}if(i.centeredSlides&&i.centeredSlidesBounds){var ie=0;v.forEach((function(e){ie+=e+(i.spaceBetween?i.spaceBetween:0)}));var se=(ie-=i.spaceBetween)-r;c=c.map((function(e){return e<0?-f:e>se?se+m:e}))}if(i.centerInsufficientSlides){var re=0;if(v.forEach((function(e){re+=e+(i.spaceBetween?i.spaceBetween:0)})),(re-=i.spaceBetween)1)if(a.params.centeredSlides)a.visibleSlides.each((function(e){i.push(e)}));else for(t=0;ta.slides.length&&!s)break;i.push(n(l))}else i.push(n(a.activeIndex));for(t=0;tr?o:r}r&&a.$wrapperEl.css("height",r+"px")},updateSlidesOffset:function(){for(var e=this.slides,t=0;t=0&&d1&&p<=t.size||d<=0&&p>=t.size)&&(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(n),i.eq(n).addClass(a.slideVisibleClass))}l.progress=s?-o:o}t.visibleSlides=m(t.visibleSlides)}},updateProgress:function(e){var t=this;if(void 0===e){var a=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*a||0}var i=t.params,s=t.maxTranslate()-t.minTranslate(),r=t.progress,n=t.isBeginning,l=t.isEnd,o=n,d=l;0===s?(r=0,n=!0,l=!0):(n=(r=(e-t.minTranslate())/s)<=0,l=r>=1),S(t,{progress:r,isBeginning:n,isEnd:l}),(i.watchSlidesProgress||i.watchSlidesVisibility||i.centeredSlides&&i.autoHeight)&&t.updateSlidesProgress(e),n&&!o&&t.emit("reachBeginning toEdge"),l&&!d&&t.emit("reachEnd toEdge"),(o&&!n||d&&!l)&&t.emit("fromEdge"),t.emit("progress",r)},updateSlidesClasses:function(){var e,t=this,a=t.slides,i=t.params,s=t.$wrapperEl,r=t.activeIndex,n=t.realIndex,l=t.virtual&&i.virtual.enabled;a.removeClass(i.slideActiveClass+" "+i.slideNextClass+" "+i.slidePrevClass+" "+i.slideDuplicateActiveClass+" "+i.slideDuplicateNextClass+" "+i.slideDuplicatePrevClass),(e=l?t.$wrapperEl.find("."+i.slideClass+'[data-swiper-slide-index="'+r+'"]'):a.eq(r)).addClass(i.slideActiveClass),i.loop&&(e.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+n+'"]').addClass(i.slideDuplicateActiveClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+n+'"]').addClass(i.slideDuplicateActiveClass));var o=e.nextAll("."+i.slideClass).eq(0).addClass(i.slideNextClass);i.loop&&0===o.length&&(o=a.eq(0)).addClass(i.slideNextClass);var d=e.prevAll("."+i.slideClass).eq(0).addClass(i.slidePrevClass);i.loop&&0===d.length&&(d=a.eq(-1)).addClass(i.slidePrevClass),i.loop&&(o.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+o.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicateNextClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+o.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicateNextClass),d.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+d.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicatePrevClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+d.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicatePrevClass)),t.emitSlidesClasses()},updateActiveIndex:function(e){var t,a=this,i=a.rtlTranslate?a.translate:-a.translate,s=a.slidesGrid,r=a.snapGrid,n=a.params,l=a.activeIndex,o=a.realIndex,d=a.snapIndex,p=e;if(void 0===p){for(var u=0;u=s[u]&&i=s[u]&&i=s[u]&&(p=u);n.normalizeSlideIndex&&(p<0||void 0===p)&&(p=0)}if(r.indexOf(i)>=0)t=r.indexOf(i);else{var c=Math.min(n.slidesPerGroupSkip,p);t=c+Math.floor((p-c)/n.slidesPerGroup)}if(t>=r.length&&(t=r.length-1),p!==l){var h=parseInt(a.slides.eq(p).attr("data-swiper-slide-index")||p,10);S(a,{snapIndex:t,realIndex:h,previousIndex:l,activeIndex:p}),a.emit("activeIndexChange"),a.emit("snapIndexChange"),o!==h&&a.emit("realIndexChange"),(a.initialized||a.params.runCallbacksOnInit)&&a.emit("slideChange")}else t!==d&&(a.snapIndex=t,a.emit("snapIndexChange"))},updateClickedSlide:function(e){var t,a=this,i=a.params,s=m(e.target).closest("."+i.slideClass)[0],r=!1;if(s)for(var n=0;nd?d:i&&er?"next":is?"next":i=d.length&&(g=d.length-1),(c||o.initialSlide||0)===(u||0)&&a&&n.emit("beforeSlideChangeStart");var b,y=-d[g];if(n.updateProgress(y),o.normalizeSlideIndex)for(var w=0;w=x&&E=x&&E=x&&(l=w)}if(n.initialized&&l!==c){if(!n.allowSlideNext&&yn.translate&&y>n.maxTranslate()&&(c||0)!==l)return!1}if(b=l>c?"next":l=e&&(h=e)})),void 0!==h&&(c=l.indexOf(h))<0&&(c=i.activeIndex-1),i.slideTo(c,e,t,a)},slideReset:function(e,t,a){return void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),this.slideTo(this.activeIndex,e,t,a)},slideToClosest:function(e,t,a,i){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),void 0===i&&(i=.5);var s=this,r=s.activeIndex,n=Math.min(s.params.slidesPerGroupSkip,r),l=n+Math.floor((r-n)/s.params.slidesPerGroup),o=s.rtlTranslate?s.translate:-s.translate;if(o>=s.snapGrid[l]){var d=s.snapGrid[l];o-d>(s.snapGrid[l+1]-d)*i&&(r+=s.params.slidesPerGroup)}else{var p=s.snapGrid[l-1];o-p<=(s.snapGrid[l]-p)*i&&(r-=s.params.slidesPerGroup)}return r=Math.max(r,0),r=Math.min(r,s.slidesGrid.length-1),s.slideTo(r,e,t,a)},slideToClickedSlide:function(){var e,t=this,a=t.params,i=t.$wrapperEl,s="auto"===a.slidesPerView?t.slidesPerViewDynamic():a.slidesPerView,r=t.clickedIndex;if(a.loop){if(t.animating)return;e=parseInt(m(t.clickedSlide).attr("data-swiper-slide-index"),10),a.centeredSlides?rt.slides.length-t.loopedSlides+s/2?(t.loopFix(),r=i.children("."+a.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+a.slideDuplicateClass+")").eq(0).index(),E((function(){t.slideTo(r)}))):t.slideTo(r):r>t.slides.length-s?(t.loopFix(),r=i.children("."+a.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+a.slideDuplicateClass+")").eq(0).index(),E((function(){t.slideTo(r)}))):t.slideTo(r)}else t.slideTo(r)}},loop:{loopCreate:function(){var e=this,t=r(),a=e.params,i=e.$wrapperEl;i.children("."+a.slideClass+"."+a.slideDuplicateClass).remove();var s=i.children("."+a.slideClass);if(a.loopFillGroupWithBlank){var n=a.slidesPerGroup-s.length%a.slidesPerGroup;if(n!==a.slidesPerGroup){for(var l=0;ls.length&&(e.loopedSlides=s.length);var d=[],p=[];s.each((function(t,a){var i=m(t);a=s.length-e.loopedSlides&&d.push(t),i.attr("data-swiper-slide-index",a)}));for(var u=0;u=0;c-=1)i.prepend(m(d[c].cloneNode(!0)).addClass(a.slideDuplicateClass))},loopFix:function(){var e=this;e.emit("beforeLoopFix");var t,a=e.activeIndex,i=e.slides,s=e.loopedSlides,r=e.allowSlidePrev,n=e.allowSlideNext,l=e.snapGrid,o=e.rtlTranslate;e.allowSlidePrev=!0,e.allowSlideNext=!0;var d=-l[a]-e.getTranslate();a=i.length-s&&(t=-i.length+a+s,t+=s,e.slideTo(t,0,!1,!0)&&0!==d&&e.setTranslate((o?-e.translate:e.translate)-d)),e.allowSlidePrev=r,e.allowSlideNext=n,e.emit("loopFix")},loopDestroy:function(){var e=this,t=e.$wrapperEl,a=e.params,i=e.slides;t.children("."+a.slideClass+"."+a.slideDuplicateClass+",."+a.slideClass+"."+a.slideBlankClass).remove(),i.removeAttr("data-swiper-slide-index")}},grabCursor:{setGrabCursor:function(e){var t=this;if(!(t.support.touch||!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)){var a=t.el;a.style.cursor="move",a.style.cursor=e?"-webkit-grabbing":"-webkit-grab",a.style.cursor=e?"-moz-grabbin":"-moz-grab",a.style.cursor=e?"grabbing":"grab"}},unsetGrabCursor:function(){var e=this;e.support.touch||e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.el.style.cursor="")}},manipulation:{appendSlide:function(e){var t=this,a=t.$wrapperEl,i=t.params;if(i.loop&&t.loopDestroy(),"object"==typeof e&&"length"in e)for(var s=0;s=n)a.appendSlide(t);else{for(var l=r>e?r+1:r,o=[],d=n-1;d>=e;d-=1){var p=a.slides.eq(d);p.remove(),o.unshift(p)}if("object"==typeof t&&"length"in t){for(var u=0;ue?r+t.length:r}else i.append(t);for(var c=0;c1,c=p.slidesPerColumn>1,h=r.enabled;u&&!c?(n.removeClass(r.containerModifierClass+"multirow "+r.containerModifierClass+"multirow-column"),e.emitContainerClasses()):!u&&c&&(n.addClass(r.containerModifierClass+"multirow"),"column"===p.slidesPerColumnFill&&n.addClass(r.containerModifierClass+"multirow-column"),e.emitContainerClasses());var v=p.direction&&p.direction!==r.direction,f=r.loop&&(p.slidesPerView!==r.slidesPerView||v);v&&a&&e.changeDirection(),S(e.params,p);var m=e.params.enabled;S(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),h&&!m?e.disable():!h&&m&&e.enable(),e.currentBreakpoint=o,e.emit("_beforeBreakpoint",p),f&&a&&(e.loopDestroy(),e.loopCreate(),e.updateSlides(),e.slideTo(t-s+e.loopedSlides,0,!1)),e.emit("breakpoint",p)}}},getBreakpoint:function(e,t,a){if(void 0===t&&(t="window"),e&&("container"!==t||a)){var i=!1,s=l(),r="window"===t?s.innerWidth:a.clientWidth,n="window"===t?s.innerHeight:a.clientHeight,o=Object.keys(e).map((function(e){if("string"==typeof e&&0===e.indexOf("@")){var t=parseFloat(e.substr(1));return{value:n*t,point:e}}return{value:e,point:e}}));o.sort((function(e,t){return parseInt(e.value,10)-parseInt(t.value,10)}));for(var d=0;d0&&t.slidesOffsetBefore+t.spaceBetween*(e.slides.length-1)+e.slides[0].offsetWidth*e.slides.length;t.slidesOffsetBefore&&t.slidesOffsetAfter&&i?e.isLocked=i<=e.size:e.isLocked=1===e.snapGrid.length,e.allowSlideNext=!e.isLocked,e.allowSlidePrev=!e.isLocked,a!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock"),a&&a!==e.isLocked&&(e.isEnd=!1,e.navigation&&e.navigation.update())}},classes:{addClasses:function(){var e,t,a,i=this,s=i.classNames,r=i.params,n=i.rtl,l=i.$el,o=i.device,d=i.support,p=(e=["initialized",r.direction,{"pointer-events":d.pointerEvents&&!d.touch},{"free-mode":r.freeMode},{autoheight:r.autoHeight},{rtl:n},{multirow:r.slidesPerColumn>1},{"multirow-column":r.slidesPerColumn>1&&"column"===r.slidesPerColumnFill},{android:o.android},{ios:o.ios},{"css-mode":r.cssMode}],t=r.containerModifierClass,a=[],e.forEach((function(e){"object"==typeof e?Object.keys(e).forEach((function(i){e[i]&&a.push(t+i)})):"string"==typeof e&&a.push(t+e)})),a);s.push.apply(s,p),l.addClass([].concat(s).join(" ")),i.emitContainerClasses()},removeClasses:function(){var e=this,t=e.$el,a=e.classNames;t.removeClass(a.join(" ")),e.emitContainerClasses()}},images:{loadImage:function(e,t,a,i,s,r){var n,o=l();function d(){r&&r()}m(e).parent("picture")[0]||e.complete&&s?d():t?((n=new o.Image).onload=d,n.onerror=d,i&&(n.sizes=i),a&&(n.srcset=a),t&&(n.src=t)):d()},preloadImages:function(){var e=this;function t(){null!=e&&e&&!e.destroyed&&(void 0!==e.imagesLoaded&&(e.imagesLoaded+=1),e.imagesLoaded===e.imagesToLoad.length&&(e.params.updateOnImagesReady&&e.update(),e.emit("imagesReady")))}e.imagesToLoad=e.$el.find("img");for(var a=0;a1){var n=[];return m(a.el).each((function(e){var i=S({},a,{el:e});n.push(new t(i))})),n}var l=this;l.__swiper__=!0,l.support=P(),l.device=k({userAgent:a.userAgent}),l.browser=$(),l.eventsListeners={},l.eventsAnyListeners=[],void 0===l.modules&&(l.modules={}),Object.keys(l.modules).forEach((function(e){var t=l.modules[e];if(t.params){var i=Object.keys(t.params)[0],s=t.params[i];if("object"!=typeof s||null===s)return;if(!(i in a)||!("enabled"in s))return;!0===a[i]&&(a[i]={enabled:!0}),"object"!=typeof a[i]||"enabled"in a[i]||(a[i].enabled=!0),a[i]||(a[i]={enabled:!1})}}));var o,d,p=S({},R);return l.useParams(p),l.params=S({},p,V,a),l.originalParams=S({},l.params),l.passedParams=S({},a),l.params&&l.params.on&&Object.keys(l.params.on).forEach((function(e){l.on(e,l.params.on[e])})),l.params&&l.params.onAny&&l.onAny(l.params.onAny),l.$=m,S(l,{enabled:l.params.enabled,el:e,classNames:[],slides:m(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:function(){return"horizontal"===l.params.direction},isVertical:function(){return"vertical"===l.params.direction},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:l.params.allowSlideNext,allowSlidePrev:l.params.allowSlidePrev,touchEvents:(o=["touchstart","touchmove","touchend","touchcancel"],d=["mousedown","mousemove","mouseup"],l.support.pointerEvents&&(d=["pointerdown","pointermove","pointerup"]),l.touchEventsTouch={start:o[0],move:o[1],end:o[2],cancel:o[3]},l.touchEventsDesktop={start:d[0],move:d[1],end:d[2]},l.support.touch||!l.params.simulateTouch?l.touchEventsTouch:l.touchEventsDesktop),touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,formElements:"input, select, option, textarea, button, video, label",lastClickTime:x(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:l.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),l.useModules(),l.emit("_swiper"),l.params.init&&l.init(),l}var a,s,r=t.prototype;return r.enable=function(){var e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))},r.disable=function(){var e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))},r.setProgress=function(e,t){var a=this;e=Math.min(Math.max(e,0),1);var i=a.minTranslate(),s=(a.maxTranslate()-i)*e+i;a.translateTo(s,void 0===t?0:t),a.updateActiveIndex(),a.updateSlidesClasses()},r.emitContainerClasses=function(){var e=this;if(e.params._emitClasses&&e.el){var t=e.el.className.split(" ").filter((function(t){return 0===t.indexOf("swiper-container")||0===t.indexOf(e.params.containerModifierClass)}));e.emit("_containerClasses",t.join(" "))}},r.getSlideClasses=function(e){var t=this;return e.className.split(" ").filter((function(e){return 0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass)})).join(" ")},r.emitSlidesClasses=function(){var e=this;if(e.params._emitClasses&&e.el){var t=[];e.slides.each((function(a){var i=e.getSlideClasses(a);t.push({slideEl:a,classNames:i}),e.emit("_slideClass",a,i)})),e.emit("_slideClasses",t)}},r.slidesPerViewDynamic=function(){var e=this,t=e.params,a=e.slides,i=e.slidesGrid,s=e.size,r=e.activeIndex,n=1;if(t.centeredSlides){for(var l,o=a[r].swiperSlideSize,d=r+1;ds&&(l=!0));for(var p=r-1;p>=0;p-=1)a[p]&&!l&&(n+=1,(o+=a[p].swiperSlideSize)>s&&(l=!0))}else for(var u=r+1;u1)&&e.isEnd&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0))||i(),a.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}function i(){var t=e.rtlTranslate?-1*e.translate:e.translate,a=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(a),e.updateActiveIndex(),e.updateSlidesClasses()}},r.changeDirection=function(e,t){void 0===t&&(t=!0);var a=this,i=a.params.direction;return e||(e="horizontal"===i?"vertical":"horizontal"),e===i||"horizontal"!==e&&"vertical"!==e||(a.$el.removeClass(""+a.params.containerModifierClass+i).addClass(""+a.params.containerModifierClass+e),a.emitContainerClasses(),a.params.direction=e,a.slides.each((function(t){"vertical"===e?t.style.width="":t.style.height=""})),a.emit("changeDirection"),t&&a.update()),a},r.mount=function(e){var t=this;if(t.mounted)return!0;var a,i=m(e||t.params.el);return!!(e=i[0])&&(e.swiper=t,e&&e.shadowRoot&&e.shadowRoot.querySelector?(a=m(e.shadowRoot.querySelector("."+t.params.wrapperClass))).children=function(e){return i.children(e)}:a=i.children("."+t.params.wrapperClass),S(t,{$el:i,el:e,$wrapperEl:a,wrapperEl:a[0],mounted:!0,rtl:"rtl"===e.dir.toLowerCase()||"rtl"===i.css("direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===e.dir.toLowerCase()||"rtl"===i.css("direction")),wrongRTL:"-webkit-box"===a.css("display")}),!0)},r.init=function(e){var t=this;return t.initialized||!1===t.mount(e)||(t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.params.loop&&t.loopCreate(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.preloadImages&&t.preloadImages(),t.params.loop?t.slideTo(t.params.initialSlide+t.loopedSlides,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.attachEvents(),t.initialized=!0,t.emit("init"),t.emit("afterInit")),t},r.destroy=function(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);var a,i=this,s=i.params,r=i.$el,n=i.$wrapperEl,l=i.slides;return void 0===i.params||i.destroyed||(i.emit("beforeDestroy"),i.initialized=!1,i.detachEvents(),s.loop&&i.loopDestroy(),t&&(i.removeClasses(),r.removeAttr("style"),n.removeAttr("style"),l&&l.length&&l.removeClass([s.slideVisibleClass,s.slideActiveClass,s.slideNextClass,s.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index")),i.emit("destroy"),Object.keys(i.eventsListeners).forEach((function(e){i.off(e)})),!1!==e&&(i.$el[0].swiper=null,a=i,Object.keys(a).forEach((function(e){try{a[e]=null}catch(e){}try{delete a[e]}catch(e){}}))),i.destroyed=!0),null},t.extendDefaults=function(e){S(V,e)},t.installModule=function(e){t.prototype.modules||(t.prototype.modules={});var a=e.name||Object.keys(t.prototype.modules).length+"_"+x();t.prototype.modules[a]=e},t.use=function(e){return Array.isArray(e)?(e.forEach((function(e){return t.installModule(e)})),t):(t.installModule(e),t)},a=t,s=[{key:"extendedDefaults",get:function(){return V}},{key:"defaults",get:function(){return R}}],null&&e(a.prototype,null),s&&e(a,s),t}();Object.keys(W).forEach((function(e){Object.keys(W[e]).forEach((function(t){F.prototype[t]=W[e][t]}))})),F.use([L,O]);var _={update:function(e){var t=this,a=t.params,i=a.slidesPerView,s=a.slidesPerGroup,r=a.centeredSlides,n=t.params.virtual,l=n.addSlidesBefore,o=n.addSlidesAfter,d=t.virtual,p=d.from,u=d.to,c=d.slides,h=d.slidesGrid,v=d.renderSlide,f=d.offset;t.updateActiveIndex();var m,g,b,y=t.activeIndex||0;m=t.rtlTranslate?"right":t.isHorizontal()?"left":"top",r?(g=Math.floor(i/2)+s+o,b=Math.floor(i/2)+s+l):(g=i+(s-1)+o,b=s+l);var w=Math.max((y||0)-b,0),E=Math.min((y||0)+g,c.length-1),x=(t.slidesGrid[w]||0)-(t.slidesGrid[0]||0);function T(){t.updateSlides(),t.updateProgress(),t.updateSlidesClasses(),t.lazy&&t.params.lazy.enabled&&t.lazy.load()}if(S(t.virtual,{from:w,to:E,offset:x,slidesGrid:t.slidesGrid}),p===w&&u===E&&!e)return t.slidesGrid!==h&&x!==f&&t.slides.css(m,x+"px"),void t.updateProgress();if(t.params.virtual.renderExternal)return t.params.virtual.renderExternal.call(t,{offset:x,from:w,to:E,slides:function(){for(var e=[],t=w;t<=E;t+=1)e.push(c[t]);return e}()}),void(t.params.virtual.renderExternalUpdate&&T());var C=[],M=[];if(e)t.$wrapperEl.find("."+t.params.slideClass).remove();else for(var z=p;z<=u;z+=1)(zE)&&t.$wrapperEl.find("."+t.params.slideClass+'[data-swiper-slide-index="'+z+'"]').remove();for(var P=0;P=w&&P<=E&&(void 0===u||e?M.push(P):(P>u&&M.push(P),P'+e+"
    ");return s.attr("data-swiper-slide-index")||s.attr("data-swiper-slide-index",t),i.cache&&(a.virtual.cache[t]=s),s},appendSlide:function(e){var t=this;if("object"==typeof e&&"length"in e)for(var a=0;a=0;i-=1)t.virtual.slides.splice(e[i],1),t.params.virtual.cache&&delete t.virtual.cache[e[i]],e[i]0&&0===t.$el.parents("."+t.params.slideActiveClass).length)return;var g=t.$el,b=g[0].clientWidth,y=g[0].clientHeight,w=a.innerWidth,E=a.innerHeight,x=t.$el.offset();s&&(x.left-=t.$el[0].scrollLeft);for(var T=[[x.left,x.top],[x.left+b,x.top],[x.left,x.top+y],[x.left+b,x.top+y]],C=0;C=0&&S[0]<=w&&S[1]>=0&&S[1]<=E){if(0===S[0]&&0===S[1])continue;m=!0}}if(!m)return}t.isHorizontal()?((p||u||c||h)&&(n.preventDefault?n.preventDefault():n.returnValue=!1),((u||h)&&!s||(p||c)&&s)&&t.slideNext(),((p||c)&&!s||(u||h)&&s)&&t.slidePrev()):((p||u||v||f)&&(n.preventDefault?n.preventDefault():n.returnValue=!1),(u||f)&&t.slideNext(),(p||v)&&t.slidePrev()),t.emit("keyPress",o)}}},enable:function(){var e=this,t=r();e.keyboard.enabled||(m(t).on("keydown",e.keyboard.handle),e.keyboard.enabled=!0)},disable:function(){var e=this,t=r();e.keyboard.enabled&&(m(t).off("keydown",e.keyboard.handle),e.keyboard.enabled=!1)}},U={name:"keyboard",params:{keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0}},create:function(){M(this,{keyboard:t({enabled:!1},j)})},on:{init:function(e){e.params.keyboard.enabled&&e.keyboard.enable()},destroy:function(e){e.keyboard.enabled&&e.keyboard.disable()}}},K={lastScrollTime:x(),lastEventBeforeSnap:void 0,recentWheelEvents:[],event:function(){return l().navigator.userAgent.indexOf("firefox")>-1?"DOMMouseScroll":function(){var e=r(),t="onwheel",a=t in e;if(!a){var i=e.createElement("div");i.setAttribute(t,"return;"),a="function"==typeof i.onwheel}return!a&&e.implementation&&e.implementation.hasFeature&&!0!==e.implementation.hasFeature("","")&&(a=e.implementation.hasFeature("Events.wheel","3.0")),a}()?"wheel":"mousewheel"},normalize:function(e){var t=0,a=0,i=0,s=0;return"detail"in e&&(a=e.detail),"wheelDelta"in e&&(a=-e.wheelDelta/120),"wheelDeltaY"in e&&(a=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=a,a=0),i=10*t,s=10*a,"deltaY"in e&&(s=e.deltaY),"deltaX"in e&&(i=e.deltaX),e.shiftKey&&!i&&(i=s,s=0),(i||s)&&e.deltaMode&&(1===e.deltaMode?(i*=40,s*=40):(i*=800,s*=800)),i&&!t&&(t=i<1?-1:1),s&&!a&&(a=s<1?-1:1),{spinX:t,spinY:a,pixelX:i,pixelY:s}},handleMouseEnter:function(){this.enabled&&(this.mouseEntered=!0)},handleMouseLeave:function(){this.enabled&&(this.mouseEntered=!1)},handle:function(e){var t=e,a=this;if(a.enabled){var i=a.params.mousewheel;a.params.cssMode&&t.preventDefault();var s=a.$el;if("container"!==a.params.mousewheel.eventsTarget&&(s=m(a.params.mousewheel.eventsTarget)),!a.mouseEntered&&!s[0].contains(t.target)&&!i.releaseOnEdges)return!0;t.originalEvent&&(t=t.originalEvent);var r=0,n=a.rtlTranslate?-1:1,l=K.normalize(t);if(i.forceToAxis)if(a.isHorizontal()){if(!(Math.abs(l.pixelX)>Math.abs(l.pixelY)))return!0;r=-l.pixelX*n}else{if(!(Math.abs(l.pixelY)>Math.abs(l.pixelX)))return!0;r=-l.pixelY}else r=Math.abs(l.pixelX)>Math.abs(l.pixelY)?-l.pixelX*n:-l.pixelY;if(0===r)return!0;i.invert&&(r=-r);var o=a.getTranslate()+r*i.sensitivity;if(o>=a.minTranslate()&&(o=a.minTranslate()),o<=a.maxTranslate()&&(o=a.maxTranslate()),(!!a.params.loop||!(o===a.minTranslate()||o===a.maxTranslate()))&&a.params.nested&&t.stopPropagation(),a.params.freeMode){var d={time:x(),delta:Math.abs(r),direction:Math.sign(r)},p=a.mousewheel.lastEventBeforeSnap,u=p&&d.time=a.minTranslate()&&(c=a.minTranslate()),c<=a.maxTranslate()&&(c=a.maxTranslate()),a.setTransition(0),a.setTranslate(c),a.updateProgress(),a.updateActiveIndex(),a.updateSlidesClasses(),(!h&&a.isBeginning||!v&&a.isEnd)&&a.updateSlidesClasses(),a.params.freeModeSticky){clearTimeout(a.mousewheel.timeout),a.mousewheel.timeout=void 0;var f=a.mousewheel.recentWheelEvents;f.length>=15&&f.shift();var g=f.length?f[f.length-1]:void 0,b=f[0];if(f.push(d),g&&(d.delta>g.delta||d.direction!==g.direction))f.splice(0);else if(f.length>=15&&d.time-b.time<500&&b.delta-d.delta>=1&&d.delta<=6){var y=r>0?.8:.2;a.mousewheel.lastEventBeforeSnap=d,f.splice(0),a.mousewheel.timeout=E((function(){a.slideToClosest(a.params.speed,!0,void 0,y)}),0)}a.mousewheel.timeout||(a.mousewheel.timeout=E((function(){a.mousewheel.lastEventBeforeSnap=d,f.splice(0),a.slideToClosest(a.params.speed,!0,void 0,.5)}),500))}if(u||a.emit("scroll",t),a.params.autoplay&&a.params.autoplayDisableOnInteraction&&a.autoplay.stop(),c===a.minTranslate()||c===a.maxTranslate())return!0}}else{var w={time:x(),delta:Math.abs(r),direction:Math.sign(r),raw:e},T=a.mousewheel.recentWheelEvents;T.length>=2&&T.shift();var C=T.length?T[T.length-1]:void 0;if(T.push(w),C?(w.direction!==C.direction||w.delta>C.delta||w.time>C.time+150)&&a.mousewheel.animateSlider(w):a.mousewheel.animateSlider(w),a.mousewheel.releaseScroll(w))return!0}return t.preventDefault?t.preventDefault():t.returnValue=!1,!1}},animateSlider:function(e){var t=this,a=l();return!(this.params.mousewheel.thresholdDelta&&e.delta=6&&x()-t.mousewheel.lastScrollTime<60)&&(e.direction<0?t.isEnd&&!t.params.loop||t.animating||(t.slideNext(),t.emit("scroll",e.raw)):t.isBeginning&&!t.params.loop||t.animating||(t.slidePrev(),t.emit("scroll",e.raw)),t.mousewheel.lastScrollTime=(new a.Date).getTime(),1))},releaseScroll:function(e){var t=this,a=t.params.mousewheel;if(e.direction<0){if(t.isEnd&&!t.params.loop&&a.releaseOnEdges)return!0}else if(t.isBeginning&&!t.params.loop&&a.releaseOnEdges)return!0;return!1},enable:function(){var e=this,t=K.event();if(e.params.cssMode)return e.wrapperEl.removeEventListener(t,e.mousewheel.handle),!0;if(!t)return!1;if(e.mousewheel.enabled)return!1;var a=e.$el;return"container"!==e.params.mousewheel.eventsTarget&&(a=m(e.params.mousewheel.eventsTarget)),a.on("mouseenter",e.mousewheel.handleMouseEnter),a.on("mouseleave",e.mousewheel.handleMouseLeave),a.on(t,e.mousewheel.handle),e.mousewheel.enabled=!0,!0},disable:function(){var e=this,t=K.event();if(e.params.cssMode)return e.wrapperEl.addEventListener(t,e.mousewheel.handle),!0;if(!t)return!1;if(!e.mousewheel.enabled)return!1;var a=e.$el;return"container"!==e.params.mousewheel.eventsTarget&&(a=m(e.params.mousewheel.eventsTarget)),a.off(t,e.mousewheel.handle),e.mousewheel.enabled=!1,!0}},Z={toggleEl:function(e,t){e[t?"addClass":"removeClass"](this.params.navigation.disabledClass),e[0]&&"BUTTON"===e[0].tagName&&(e[0].disabled=t)},update:function(){var e=this,t=e.params.navigation,a=e.navigation.toggleEl;if(!e.params.loop){var i=e.navigation,s=i.$nextEl,r=i.$prevEl;r&&r.length>0&&(e.isBeginning?a(r,!0):a(r,!1),e.params.watchOverflow&&e.enabled&&r[e.isLocked?"addClass":"removeClass"](t.lockClass)),s&&s.length>0&&(e.isEnd?a(s,!0):a(s,!1),e.params.watchOverflow&&e.enabled&&s[e.isLocked?"addClass":"removeClass"](t.lockClass))}},onPrevClick:function(e){var t=this;e.preventDefault(),t.isBeginning&&!t.params.loop||t.slidePrev()},onNextClick:function(e){var t=this;e.preventDefault(),t.isEnd&&!t.params.loop||t.slideNext()},init:function(){var e,t,a=this,i=a.params.navigation;(i.nextEl||i.prevEl)&&(i.nextEl&&(e=m(i.nextEl),a.params.uniqueNavElements&&"string"==typeof i.nextEl&&e.length>1&&1===a.$el.find(i.nextEl).length&&(e=a.$el.find(i.nextEl))),i.prevEl&&(t=m(i.prevEl),a.params.uniqueNavElements&&"string"==typeof i.prevEl&&t.length>1&&1===a.$el.find(i.prevEl).length&&(t=a.$el.find(i.prevEl))),e&&e.length>0&&e.on("click",a.navigation.onNextClick),t&&t.length>0&&t.on("click",a.navigation.onPrevClick),S(a.navigation,{$nextEl:e,nextEl:e&&e[0],$prevEl:t,prevEl:t&&t[0]}),a.enabled||(e&&e.addClass(i.lockClass),t&&t.addClass(i.lockClass)))},destroy:function(){var e=this,t=e.navigation,a=t.$nextEl,i=t.$prevEl;a&&a.length&&(a.off("click",e.navigation.onNextClick),a.removeClass(e.params.navigation.disabledClass)),i&&i.length&&(i.off("click",e.navigation.onPrevClick),i.removeClass(e.params.navigation.disabledClass))}},J={update:function(){var e=this,t=e.rtl,a=e.params.pagination;if(a.el&&e.pagination.el&&e.pagination.$el&&0!==e.pagination.$el.length){var i,s=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,r=e.pagination.$el,n=e.params.loop?Math.ceil((s-2*e.loopedSlides)/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?((i=Math.ceil((e.activeIndex-e.loopedSlides)/e.params.slidesPerGroup))>s-1-2*e.loopedSlides&&(i-=s-2*e.loopedSlides),i>n-1&&(i-=n),i<0&&"bullets"!==e.params.paginationType&&(i=n+i)):i=void 0!==e.snapIndex?e.snapIndex:e.activeIndex||0,"bullets"===a.type&&e.pagination.bullets&&e.pagination.bullets.length>0){var l,o,d,p=e.pagination.bullets;if(a.dynamicBullets&&(e.pagination.bulletSize=p.eq(0)[e.isHorizontal()?"outerWidth":"outerHeight"](!0),r.css(e.isHorizontal()?"width":"height",e.pagination.bulletSize*(a.dynamicMainBullets+4)+"px"),a.dynamicMainBullets>1&&void 0!==e.previousIndex&&(e.pagination.dynamicBulletIndex+=i-e.previousIndex,e.pagination.dynamicBulletIndex>a.dynamicMainBullets-1?e.pagination.dynamicBulletIndex=a.dynamicMainBullets-1:e.pagination.dynamicBulletIndex<0&&(e.pagination.dynamicBulletIndex=0)),l=i-e.pagination.dynamicBulletIndex,d=((o=l+(Math.min(p.length,a.dynamicMainBullets)-1))+l)/2),p.removeClass(a.bulletActiveClass+" "+a.bulletActiveClass+"-next "+a.bulletActiveClass+"-next-next "+a.bulletActiveClass+"-prev "+a.bulletActiveClass+"-prev-prev "+a.bulletActiveClass+"-main"),r.length>1)p.each((function(e){var t=m(e),s=t.index();s===i&&t.addClass(a.bulletActiveClass),a.dynamicBullets&&(s>=l&&s<=o&&t.addClass(a.bulletActiveClass+"-main"),s===l&&t.prev().addClass(a.bulletActiveClass+"-prev").prev().addClass(a.bulletActiveClass+"-prev-prev"),s===o&&t.next().addClass(a.bulletActiveClass+"-next").next().addClass(a.bulletActiveClass+"-next-next"))}));else{var u=p.eq(i),c=u.index();if(u.addClass(a.bulletActiveClass),a.dynamicBullets){for(var h=p.eq(l),v=p.eq(o),f=l;f<=o;f+=1)p.eq(f).addClass(a.bulletActiveClass+"-main");if(e.params.loop)if(c>=p.length-a.dynamicMainBullets){for(var g=a.dynamicMainBullets;g>=0;g-=1)p.eq(p.length-g).addClass(a.bulletActiveClass+"-main");p.eq(p.length-a.dynamicMainBullets-1).addClass(a.bulletActiveClass+"-prev")}else h.prev().addClass(a.bulletActiveClass+"-prev").prev().addClass(a.bulletActiveClass+"-prev-prev"),v.next().addClass(a.bulletActiveClass+"-next").next().addClass(a.bulletActiveClass+"-next-next");else h.prev().addClass(a.bulletActiveClass+"-prev").prev().addClass(a.bulletActiveClass+"-prev-prev"),v.next().addClass(a.bulletActiveClass+"-next").next().addClass(a.bulletActiveClass+"-next-next")}}if(a.dynamicBullets){var b=Math.min(p.length,a.dynamicMainBullets+4),y=(e.pagination.bulletSize*b-e.pagination.bulletSize)/2-d*e.pagination.bulletSize,w=t?"right":"left";p.css(e.isHorizontal()?w:"top",y+"px")}}if("fraction"===a.type&&(r.find(z(a.currentClass)).text(a.formatFractionCurrent(i+1)),r.find(z(a.totalClass)).text(a.formatFractionTotal(n))),"progressbar"===a.type){var E;E=a.progressbarOpposite?e.isHorizontal()?"vertical":"horizontal":e.isHorizontal()?"horizontal":"vertical";var x=(i+1)/n,T=1,C=1;"horizontal"===E?T=x:C=x,r.find(z(a.progressbarFillClass)).transform("translate3d(0,0,0) scaleX("+T+") scaleY("+C+")").transition(e.params.speed)}"custom"===a.type&&a.renderCustom?(r.html(a.renderCustom(e,i+1,n)),e.emit("paginationRender",r[0])):e.emit("paginationUpdate",r[0]),e.params.watchOverflow&&e.enabled&&r[e.isLocked?"addClass":"removeClass"](a.lockClass)}},render:function(){var e=this,t=e.params.pagination;if(t.el&&e.pagination.el&&e.pagination.$el&&0!==e.pagination.$el.length){var a=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,i=e.pagination.$el,s="";if("bullets"===t.type){var r=e.params.loop?Math.ceil((a-2*e.loopedSlides)/e.params.slidesPerGroup):e.snapGrid.length;e.params.freeMode&&!e.params.loop&&r>a&&(r=a);for(var n=0;n";i.html(s),e.pagination.bullets=i.find(z(t.bulletClass))}"fraction"===t.type&&(s=t.renderFraction?t.renderFraction.call(e,t.currentClass,t.totalClass):' / ',i.html(s)),"progressbar"===t.type&&(s=t.renderProgressbar?t.renderProgressbar.call(e,t.progressbarFillClass):'',i.html(s)),"custom"!==t.type&&e.emit("paginationRender",e.pagination.$el[0])}},init:function(){var e=this,t=e.params.pagination;if(t.el){var a=m(t.el);0!==a.length&&(e.params.uniqueNavElements&&"string"==typeof t.el&&a.length>1&&(a=e.$el.find(t.el)),"bullets"===t.type&&t.clickable&&a.addClass(t.clickableClass),a.addClass(t.modifierClass+t.type),"bullets"===t.type&&t.dynamicBullets&&(a.addClass(""+t.modifierClass+t.type+"-dynamic"),e.pagination.dynamicBulletIndex=0,t.dynamicMainBullets<1&&(t.dynamicMainBullets=1)),"progressbar"===t.type&&t.progressbarOpposite&&a.addClass(t.progressbarOppositeClass),t.clickable&&a.on("click",z(t.bulletClass),(function(t){t.preventDefault();var a=m(this).index()*e.params.slidesPerGroup;e.params.loop&&(a+=e.loopedSlides),e.slideTo(a)})),S(e.pagination,{$el:a,el:a[0]}),e.enabled||a.addClass(t.lockClass))}},destroy:function(){var e=this,t=e.params.pagination;if(t.el&&e.pagination.el&&e.pagination.$el&&0!==e.pagination.$el.length){var a=e.pagination.$el;a.removeClass(t.hiddenClass),a.removeClass(t.modifierClass+t.type),e.pagination.bullets&&e.pagination.bullets.removeClass(t.bulletActiveClass),t.clickable&&a.off("click",z(t.bulletClass))}}},Q={setTranslate:function(){var e=this;if(e.params.scrollbar.el&&e.scrollbar.el){var t=e.scrollbar,a=e.rtlTranslate,i=e.progress,s=t.dragSize,r=t.trackSize,n=t.$dragEl,l=t.$el,o=e.params.scrollbar,d=s,p=(r-s)*i;a?(p=-p)>0?(d=s-p,p=0):-p+s>r&&(d=r+p):p<0?(d=s+p,p=0):p+s>r&&(d=r-p),e.isHorizontal()?(n.transform("translate3d("+p+"px, 0, 0)"),n[0].style.width=d+"px"):(n.transform("translate3d(0px, "+p+"px, 0)"),n[0].style.height=d+"px"),o.hide&&(clearTimeout(e.scrollbar.timeout),l[0].style.opacity=1,e.scrollbar.timeout=setTimeout((function(){l[0].style.opacity=0,l.transition(400)}),1e3))}},setTransition:function(e){var t=this;t.params.scrollbar.el&&t.scrollbar.el&&t.scrollbar.$dragEl.transition(e)},updateSize:function(){var e=this;if(e.params.scrollbar.el&&e.scrollbar.el){var t=e.scrollbar,a=t.$dragEl,i=t.$el;a[0].style.width="",a[0].style.height="";var s,r=e.isHorizontal()?i[0].offsetWidth:i[0].offsetHeight,n=e.size/e.virtualSize,l=n*(r/e.size);s="auto"===e.params.scrollbar.dragSize?r*n:parseInt(e.params.scrollbar.dragSize,10),e.isHorizontal()?a[0].style.width=s+"px":a[0].style.height=s+"px",i[0].style.display=n>=1?"none":"",e.params.scrollbar.hide&&(i[0].style.opacity=0),S(t,{trackSize:r,divider:n,moveDivider:l,dragSize:s}),e.params.watchOverflow&&e.enabled&&t.$el[e.isLocked?"addClass":"removeClass"](e.params.scrollbar.lockClass)}},getPointerPosition:function(e){return this.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].clientX:e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].clientY:e.clientY},setDragPosition:function(e){var t,a=this,i=a.scrollbar,s=a.rtlTranslate,r=i.$el,n=i.dragSize,l=i.trackSize,o=i.dragStartPos;t=(i.getPointerPosition(e)-r.offset()[a.isHorizontal()?"left":"top"]-(null!==o?o:n/2))/(l-n),t=Math.max(Math.min(t,1),0),s&&(t=1-t);var d=a.minTranslate()+(a.maxTranslate()-a.minTranslate())*t;a.updateProgress(d),a.setTranslate(d),a.updateActiveIndex(),a.updateSlidesClasses()},onDragStart:function(e){var t=this,a=t.params.scrollbar,i=t.scrollbar,s=t.$wrapperEl,r=i.$el,n=i.$dragEl;t.scrollbar.isTouched=!0,t.scrollbar.dragStartPos=e.target===n[0]||e.target===n?i.getPointerPosition(e)-e.target.getBoundingClientRect()[t.isHorizontal()?"left":"top"]:null,e.preventDefault(),e.stopPropagation(),s.transition(100),n.transition(100),i.setDragPosition(e),clearTimeout(t.scrollbar.dragTimeout),r.transition(0),a.hide&&r.css("opacity",1),t.params.cssMode&&t.$wrapperEl.css("scroll-snap-type","none"),t.emit("scrollbarDragStart",e)},onDragMove:function(e){var t=this,a=t.scrollbar,i=t.$wrapperEl,s=a.$el,r=a.$dragEl;t.scrollbar.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,a.setDragPosition(e),i.transition(0),s.transition(0),r.transition(0),t.emit("scrollbarDragMove",e))},onDragEnd:function(e){var t=this,a=t.params.scrollbar,i=t.scrollbar,s=t.$wrapperEl,r=i.$el;t.scrollbar.isTouched&&(t.scrollbar.isTouched=!1,t.params.cssMode&&(t.$wrapperEl.css("scroll-snap-type",""),s.transition("")),a.hide&&(clearTimeout(t.scrollbar.dragTimeout),t.scrollbar.dragTimeout=E((function(){r.css("opacity",0),r.transition(400)}),1e3)),t.emit("scrollbarDragEnd",e),a.snapOnRelease&&t.slideToClosest())},enableDraggable:function(){var e=this;if(e.params.scrollbar.el){var t=r(),a=e.scrollbar,i=e.touchEventsTouch,s=e.touchEventsDesktop,n=e.params,l=e.support,o=a.$el[0],d=!(!l.passiveListener||!n.passiveListeners)&&{passive:!1,capture:!1},p=!(!l.passiveListener||!n.passiveListeners)&&{passive:!0,capture:!1};o&&(l.touch?(o.addEventListener(i.start,e.scrollbar.onDragStart,d),o.addEventListener(i.move,e.scrollbar.onDragMove,d),o.addEventListener(i.end,e.scrollbar.onDragEnd,p)):(o.addEventListener(s.start,e.scrollbar.onDragStart,d),t.addEventListener(s.move,e.scrollbar.onDragMove,d),t.addEventListener(s.end,e.scrollbar.onDragEnd,p)))}},disableDraggable:function(){var e=this;if(e.params.scrollbar.el){var t=r(),a=e.scrollbar,i=e.touchEventsTouch,s=e.touchEventsDesktop,n=e.params,l=e.support,o=a.$el[0],d=!(!l.passiveListener||!n.passiveListeners)&&{passive:!1,capture:!1},p=!(!l.passiveListener||!n.passiveListeners)&&{passive:!0,capture:!1};o&&(l.touch?(o.removeEventListener(i.start,e.scrollbar.onDragStart,d),o.removeEventListener(i.move,e.scrollbar.onDragMove,d),o.removeEventListener(i.end,e.scrollbar.onDragEnd,p)):(o.removeEventListener(s.start,e.scrollbar.onDragStart,d),t.removeEventListener(s.move,e.scrollbar.onDragMove,d),t.removeEventListener(s.end,e.scrollbar.onDragEnd,p)))}},init:function(){var e=this;if(e.params.scrollbar.el){var t=e.scrollbar,a=e.$el,i=e.params.scrollbar,s=m(i.el);e.params.uniqueNavElements&&"string"==typeof i.el&&s.length>1&&1===a.find(i.el).length&&(s=a.find(i.el));var r=s.find("."+e.params.scrollbar.dragClass);0===r.length&&(r=m('
    '),s.append(r)),S(t,{$el:s,el:s[0],$dragEl:r,dragEl:r[0]}),i.draggable&&t.enableDraggable(),s&&s[e.enabled?"removeClass":"addClass"](e.params.scrollbar.lockClass)}},destroy:function(){this.scrollbar.disableDraggable()}},ee={setTransform:function(e,t){var a=this.rtl,i=m(e),s=a?-1:1,r=i.attr("data-swiper-parallax")||"0",n=i.attr("data-swiper-parallax-x"),l=i.attr("data-swiper-parallax-y"),o=i.attr("data-swiper-parallax-scale"),d=i.attr("data-swiper-parallax-opacity");if(n||l?(n=n||"0",l=l||"0"):this.isHorizontal()?(n=r,l="0"):(l=r,n="0"),n=n.indexOf("%")>=0?parseInt(n,10)*t*s+"%":n*t*s+"px",l=l.indexOf("%")>=0?parseInt(l,10)*t+"%":l*t+"px",null!=d){var p=d-(d-1)*(1-Math.abs(t));i[0].style.opacity=p}if(null==o)i.transform("translate3d("+n+", "+l+", 0px)");else{var u=o-(o-1)*(1-Math.abs(t));i.transform("translate3d("+n+", "+l+", 0px) scale("+u+")")}},setTranslate:function(){var e=this,t=e.$el,a=e.slides,i=e.progress,s=e.snapGrid;t.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function(t){e.parallax.setTransform(t,i)})),a.each((function(t,a){var r=t.progress;e.params.slidesPerGroup>1&&"auto"!==e.params.slidesPerView&&(r+=Math.ceil(a/2)-i*(s.length-1)),r=Math.min(Math.max(r,-1),1),m(t).find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function(t){e.parallax.setTransform(t,r)}))}))},setTransition:function(e){void 0===e&&(e=this.params.speed),this.$el.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function(t){var a=m(t),i=parseInt(a.attr("data-swiper-parallax-duration"),10)||e;0===e&&(i=0),a.transition(i)}))}},te={getDistanceBetweenTouches:function(e){if(e.targetTouches.length<2)return 1;var t=e.targetTouches[0].pageX,a=e.targetTouches[0].pageY,i=e.targetTouches[1].pageX,s=e.targetTouches[1].pageY;return Math.sqrt(Math.pow(i-t,2)+Math.pow(s-a,2))},onGestureStart:function(e){var t=this,a=t.support,i=t.params.zoom,s=t.zoom,r=s.gesture;if(s.fakeGestureTouched=!1,s.fakeGestureMoved=!1,!a.gestures){if("touchstart"!==e.type||"touchstart"===e.type&&e.targetTouches.length<2)return;s.fakeGestureTouched=!0,r.scaleStart=te.getDistanceBetweenTouches(e)}r.$slideEl&&r.$slideEl.length||(r.$slideEl=m(e.target).closest("."+t.params.slideClass),0===r.$slideEl.length&&(r.$slideEl=t.slides.eq(t.activeIndex)),r.$imageEl=r.$slideEl.find("img, svg, canvas, picture, .swiper-zoom-target"),r.$imageWrapEl=r.$imageEl.parent("."+i.containerClass),r.maxRatio=r.$imageWrapEl.attr("data-swiper-zoom")||i.maxRatio,0!==r.$imageWrapEl.length)?(r.$imageEl&&r.$imageEl.transition(0),t.zoom.isScaling=!0):r.$imageEl=void 0},onGestureChange:function(e){var t=this,a=t.support,i=t.params.zoom,s=t.zoom,r=s.gesture;if(!a.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;s.fakeGestureMoved=!0,r.scaleMove=te.getDistanceBetweenTouches(e)}r.$imageEl&&0!==r.$imageEl.length?(a.gestures?s.scale=e.scale*s.currentScale:s.scale=r.scaleMove/r.scaleStart*s.currentScale,s.scale>r.maxRatio&&(s.scale=r.maxRatio-1+Math.pow(s.scale-r.maxRatio+1,.5)),s.scales.touchesStart.x))return void(s.isTouched=!1);if(!t.isHorizontal()&&(Math.floor(s.minY)===Math.floor(s.startY)&&s.touchesCurrent.ys.touchesStart.y))return void(s.isTouched=!1)}e.cancelable&&e.preventDefault(),e.stopPropagation(),s.isMoved=!0,s.currentX=s.touchesCurrent.x-s.touchesStart.x+s.startX,s.currentY=s.touchesCurrent.y-s.touchesStart.y+s.startY,s.currentXs.maxX&&(s.currentX=s.maxX-1+Math.pow(s.currentX-s.maxX+1,.8)),s.currentYs.maxY&&(s.currentY=s.maxY-1+Math.pow(s.currentY-s.maxY+1,.8)),r.prevPositionX||(r.prevPositionX=s.touchesCurrent.x),r.prevPositionY||(r.prevPositionY=s.touchesCurrent.y),r.prevTime||(r.prevTime=Date.now()),r.x=(s.touchesCurrent.x-r.prevPositionX)/(Date.now()-r.prevTime)/2,r.y=(s.touchesCurrent.y-r.prevPositionY)/(Date.now()-r.prevTime)/2,Math.abs(s.touchesCurrent.x-r.prevPositionX)<2&&(r.x=0),Math.abs(s.touchesCurrent.y-r.prevPositionY)<2&&(r.y=0),r.prevPositionX=s.touchesCurrent.x,r.prevPositionY=s.touchesCurrent.y,r.prevTime=Date.now(),i.$imageWrapEl.transform("translate3d("+s.currentX+"px, "+s.currentY+"px,0)")}}},onTouchEnd:function(){var e=this.zoom,t=e.gesture,a=e.image,i=e.velocity;if(t.$imageEl&&0!==t.$imageEl.length){if(!a.isTouched||!a.isMoved)return a.isTouched=!1,void(a.isMoved=!1);a.isTouched=!1,a.isMoved=!1;var s=300,r=300,n=i.x*s,l=a.currentX+n,o=i.y*r,d=a.currentY+o;0!==i.x&&(s=Math.abs((l-a.currentX)/i.x)),0!==i.y&&(r=Math.abs((d-a.currentY)/i.y));var p=Math.max(s,r);a.currentX=l,a.currentY=d;var u=a.width*e.scale,c=a.height*e.scale;a.minX=Math.min(t.slideWidth/2-u/2,0),a.maxX=-a.minX,a.minY=Math.min(t.slideHeight/2-c/2,0),a.maxY=-a.minY,a.currentX=Math.max(Math.min(a.currentX,a.maxX),a.minX),a.currentY=Math.max(Math.min(a.currentY,a.maxY),a.minY),t.$imageWrapEl.transition(p).transform("translate3d("+a.currentX+"px, "+a.currentY+"px,0)")}},onTransitionEnd:function(){var e=this,t=e.zoom,a=t.gesture;a.$slideEl&&e.previousIndex!==e.activeIndex&&(a.$imageEl&&a.$imageEl.transform("translate3d(0,0,0) scale(1)"),a.$imageWrapEl&&a.$imageWrapEl.transform("translate3d(0,0,0)"),t.scale=1,t.currentScale=1,a.$slideEl=void 0,a.$imageEl=void 0,a.$imageWrapEl=void 0)},toggle:function(e){var t=this.zoom;t.scale&&1!==t.scale?t.out():t.in(e)},in:function(e){var t,a,i,s,r,n,o,d,p,u,c,h,v,f,m,g,b=this,y=l(),w=b.zoom,E=b.params.zoom,x=w.gesture,T=w.image;x.$slideEl||(b.params.virtual&&b.params.virtual.enabled&&b.virtual?x.$slideEl=b.$wrapperEl.children("."+b.params.slideActiveClass):x.$slideEl=b.slides.eq(b.activeIndex),x.$imageEl=x.$slideEl.find("img, svg, canvas, picture, .swiper-zoom-target"),x.$imageWrapEl=x.$imageEl.parent("."+E.containerClass)),x.$imageEl&&0!==x.$imageEl.length&&x.$imageWrapEl&&0!==x.$imageWrapEl.length&&(x.$slideEl.addClass(""+E.zoomedSlideClass),void 0===T.touchesStart.x&&e?(t="touchend"===e.type?e.changedTouches[0].pageX:e.pageX,a="touchend"===e.type?e.changedTouches[0].pageY:e.pageY):(t=T.touchesStart.x,a=T.touchesStart.y),w.scale=x.$imageWrapEl.attr("data-swiper-zoom")||E.maxRatio,w.currentScale=x.$imageWrapEl.attr("data-swiper-zoom")||E.maxRatio,e?(m=x.$slideEl[0].offsetWidth,g=x.$slideEl[0].offsetHeight,i=x.$slideEl.offset().left+y.scrollX+m/2-t,s=x.$slideEl.offset().top+y.scrollY+g/2-a,o=x.$imageEl[0].offsetWidth,d=x.$imageEl[0].offsetHeight,p=o*w.scale,u=d*w.scale,v=-(c=Math.min(m/2-p/2,0)),f=-(h=Math.min(g/2-u/2,0)),(r=i*w.scale)v&&(r=v),(n=s*w.scale)f&&(n=f)):(r=0,n=0),x.$imageWrapEl.transition(300).transform("translate3d("+r+"px, "+n+"px,0)"),x.$imageEl.transition(300).transform("translate3d(0,0,0) scale("+w.scale+")"))},out:function(){var e=this,t=e.zoom,a=e.params.zoom,i=t.gesture;i.$slideEl||(e.params.virtual&&e.params.virtual.enabled&&e.virtual?i.$slideEl=e.$wrapperEl.children("."+e.params.slideActiveClass):i.$slideEl=e.slides.eq(e.activeIndex),i.$imageEl=i.$slideEl.find("img, svg, canvas, picture, .swiper-zoom-target"),i.$imageWrapEl=i.$imageEl.parent("."+a.containerClass)),i.$imageEl&&0!==i.$imageEl.length&&i.$imageWrapEl&&0!==i.$imageWrapEl.length&&(t.scale=1,t.currentScale=1,i.$imageWrapEl.transition(300).transform("translate3d(0,0,0)"),i.$imageEl.transition(300).transform("translate3d(0,0,0) scale(1)"),i.$slideEl.removeClass(""+a.zoomedSlideClass),i.$slideEl=void 0)},toggleGestures:function(e){var t=this,a=t.zoom,i=a.slideSelector,s=a.passiveListener;t.$wrapperEl[e]("gesturestart",i,a.onGestureStart,s),t.$wrapperEl[e]("gesturechange",i,a.onGestureChange,s),t.$wrapperEl[e]("gestureend",i,a.onGestureEnd,s)},enableGestures:function(){this.zoom.gesturesEnabled||(this.zoom.gesturesEnabled=!0,this.zoom.toggleGestures("on"))},disableGestures:function(){this.zoom.gesturesEnabled&&(this.zoom.gesturesEnabled=!1,this.zoom.toggleGestures("off"))},enable:function(){var e=this,t=e.support,a=e.zoom;if(!a.enabled){a.enabled=!0;var i=!("touchstart"!==e.touchEvents.start||!t.passiveListener||!e.params.passiveListeners)&&{passive:!0,capture:!1},s=!t.passiveListener||{passive:!1,capture:!0},r="."+e.params.slideClass;e.zoom.passiveListener=i,e.zoom.slideSelector=r,t.gestures?(e.$wrapperEl.on(e.touchEvents.start,e.zoom.enableGestures,i),e.$wrapperEl.on(e.touchEvents.end,e.zoom.disableGestures,i)):"touchstart"===e.touchEvents.start&&(e.$wrapperEl.on(e.touchEvents.start,r,a.onGestureStart,i),e.$wrapperEl.on(e.touchEvents.move,r,a.onGestureChange,s),e.$wrapperEl.on(e.touchEvents.end,r,a.onGestureEnd,i),e.touchEvents.cancel&&e.$wrapperEl.on(e.touchEvents.cancel,r,a.onGestureEnd,i)),e.$wrapperEl.on(e.touchEvents.move,"."+e.params.zoom.containerClass,a.onTouchMove,s)}},disable:function(){var e=this,t=e.zoom;if(t.enabled){var a=e.support;e.zoom.enabled=!1;var i=!("touchstart"!==e.touchEvents.start||!a.passiveListener||!e.params.passiveListeners)&&{passive:!0,capture:!1},s=!a.passiveListener||{passive:!1,capture:!0},r="."+e.params.slideClass;a.gestures?(e.$wrapperEl.off(e.touchEvents.start,e.zoom.enableGestures,i),e.$wrapperEl.off(e.touchEvents.end,e.zoom.disableGestures,i)):"touchstart"===e.touchEvents.start&&(e.$wrapperEl.off(e.touchEvents.start,r,t.onGestureStart,i),e.$wrapperEl.off(e.touchEvents.move,r,t.onGestureChange,s),e.$wrapperEl.off(e.touchEvents.end,r,t.onGestureEnd,i),e.touchEvents.cancel&&e.$wrapperEl.off(e.touchEvents.cancel,r,t.onGestureEnd,i)),e.$wrapperEl.off(e.touchEvents.move,"."+e.params.zoom.containerClass,t.onTouchMove,s)}}},ae={loadInSlide:function(e,t){void 0===t&&(t=!0);var a=this,i=a.params.lazy;if(void 0!==e&&0!==a.slides.length){var s=a.virtual&&a.params.virtual.enabled?a.$wrapperEl.children("."+a.params.slideClass+'[data-swiper-slide-index="'+e+'"]'):a.slides.eq(e),r=s.find("."+i.elementClass+":not(."+i.loadedClass+"):not(."+i.loadingClass+")");!s.hasClass(i.elementClass)||s.hasClass(i.loadedClass)||s.hasClass(i.loadingClass)||r.push(s[0]),0!==r.length&&r.each((function(e){var r=m(e);r.addClass(i.loadingClass);var n=r.attr("data-background"),l=r.attr("data-src"),o=r.attr("data-srcset"),d=r.attr("data-sizes"),p=r.parent("picture");a.loadImage(r[0],l||n,o,d,!1,(function(){if(null!=a&&a&&(!a||a.params)&&!a.destroyed){if(n?(r.css("background-image",'url("'+n+'")'),r.removeAttr("data-background")):(o&&(r.attr("srcset",o),r.removeAttr("data-srcset")),d&&(r.attr("sizes",d),r.removeAttr("data-sizes")),p.length&&p.children("source").each((function(e){var t=m(e);t.attr("data-srcset")&&(t.attr("srcset",t.attr("data-srcset")),t.removeAttr("data-srcset"))})),l&&(r.attr("src",l),r.removeAttr("data-src"))),r.addClass(i.loadedClass).removeClass(i.loadingClass),s.find("."+i.preloaderClass).remove(),a.params.loop&&t){var e=s.attr("data-swiper-slide-index");if(s.hasClass(a.params.slideDuplicateClass)){var u=a.$wrapperEl.children('[data-swiper-slide-index="'+e+'"]:not(.'+a.params.slideDuplicateClass+")");a.lazy.loadInSlide(u.index(),!1)}else{var c=a.$wrapperEl.children("."+a.params.slideDuplicateClass+'[data-swiper-slide-index="'+e+'"]');a.lazy.loadInSlide(c.index(),!1)}}a.emit("lazyImageReady",s[0],r[0]),a.params.autoHeight&&a.updateAutoHeight()}})),a.emit("lazyImageLoad",s[0],r[0])}))}},load:function(){var e=this,t=e.$wrapperEl,a=e.params,i=e.slides,s=e.activeIndex,r=e.virtual&&a.virtual.enabled,n=a.lazy,l=a.slidesPerView;function o(e){if(r){if(t.children("."+a.slideClass+'[data-swiper-slide-index="'+e+'"]').length)return!0}else if(i[e])return!0;return!1}function d(e){return r?m(e).attr("data-swiper-slide-index"):m(e).index()}if("auto"===l&&(l=0),e.lazy.initialImageLoaded||(e.lazy.initialImageLoaded=!0),e.params.watchSlidesVisibility)t.children("."+a.slideVisibleClass).each((function(t){var a=r?m(t).attr("data-swiper-slide-index"):m(t).index();e.lazy.loadInSlide(a)}));else if(l>1)for(var p=s;p1||n.loadPrevNextAmount&&n.loadPrevNextAmount>1){for(var u=n.loadPrevNextAmount,c=l,h=Math.min(s+c+Math.max(u,c),i.length),v=Math.max(s-Math.max(c,u),0),f=s+l;f0&&e.lazy.loadInSlide(d(b));var y=t.children("."+a.slidePrevClass);y.length>0&&e.lazy.loadInSlide(d(y))}},checkInViewOnLoad:function(){var e=l(),t=this;if(t&&!t.destroyed){var a=t.params.lazy.scrollingElement?m(t.params.lazy.scrollingElement):m(e),i=a[0]===e,s=i?e.innerWidth:a[0].offsetWidth,r=i?e.innerHeight:a[0].offsetHeight,n=t.$el.offset(),o=!1;t.rtlTranslate&&(n.left-=t.$el[0].scrollLeft);for(var d=[[n.left,n.top],[n.left+t.width,n.top],[n.left,n.top+t.height],[n.left+t.width,n.top+t.height]],p=0;p=0&&u[0]<=s&&u[1]>=0&&u[1]<=r){if(0===u[0]&&0===u[1])continue;o=!0}}o?(t.lazy.load(),a.off("scroll",t.lazy.checkInViewOnLoad)):t.lazy.scrollHandlerAttached||(t.lazy.scrollHandlerAttached=!0,a.on("scroll",t.lazy.checkInViewOnLoad))}}},ie={LinearSpline:function(e,t){var a,i,s,r,n;return this.x=e,this.y=t,this.lastIndex=e.length-1,this.interpolate=function(e){return e?(n=function(e,t){for(i=-1,a=e.length;a-i>1;)e[s=a+i>>1]<=t?i=s:a=s;return a}(this.x,e),r=n-1,(e-this.x[r])*(this.y[n]-this.y[r])/(this.x[n]-this.x[r])+this.y[r]):0},this},getInterpolateFunction:function(e){var t=this;t.controller.spline||(t.controller.spline=t.params.loop?new ie.LinearSpline(t.slidesGrid,e.slidesGrid):new ie.LinearSpline(t.snapGrid,e.snapGrid))},setTranslate:function(e,t){var a,i,s=this,r=s.controller.control,n=s.constructor;function l(e){var t=s.rtlTranslate?-s.translate:s.translate;"slide"===s.params.controller.by&&(s.controller.getInterpolateFunction(e),i=-s.controller.spline.interpolate(-t)),i&&"container"!==s.params.controller.by||(a=(e.maxTranslate()-e.minTranslate())/(s.maxTranslate()-s.minTranslate()),i=(t-s.minTranslate())*a+e.minTranslate()),s.params.controller.inverse&&(i=e.maxTranslate()-i),e.updateProgress(i),e.setTranslate(i,s),e.updateActiveIndex(),e.updateSlidesClasses()}if(Array.isArray(r))for(var o=0;o0&&(e.isBeginning?(e.a11y.disableEl(i),e.a11y.makeElNotFocusable(i)):(e.a11y.enableEl(i),e.a11y.makeElFocusable(i))),a&&a.length>0&&(e.isEnd?(e.a11y.disableEl(a),e.a11y.makeElNotFocusable(a)):(e.a11y.enableEl(a),e.a11y.makeElFocusable(a)))}},updatePagination:function(){var e=this,t=e.params.a11y;e.pagination&&e.params.pagination.clickable&&e.pagination.bullets&&e.pagination.bullets.length&&e.pagination.bullets.each((function(a){var i=m(a);e.a11y.makeElFocusable(i),e.params.pagination.renderBullet||(e.a11y.addElRole(i,"button"),e.a11y.addElLabel(i,t.paginationBulletMessage.replace(/\{\{index\}\}/,i.index()+1)))}))},init:function(){var e=this,t=e.params.a11y;e.$el.append(e.a11y.liveRegion);var a=e.$el;t.containerRoleDescriptionMessage&&e.a11y.addElRoleDescription(a,t.containerRoleDescriptionMessage),t.containerMessage&&e.a11y.addElLabel(a,t.containerMessage);var i,s,r=e.$wrapperEl,n=r.attr("id")||"swiper-wrapper-"+e.a11y.getRandomNumber(16),l=e.params.autoplay&&e.params.autoplay.enabled?"off":"polite";e.a11y.addElId(r,n),e.a11y.addElLive(r,l),t.itemRoleDescriptionMessage&&e.a11y.addElRoleDescription(m(e.slides),t.itemRoleDescriptionMessage),e.a11y.addElRole(m(e.slides),t.slideRole),e.slides.each((function(a){var i=m(a),s=t.slideLabelMessage.replace(/\{\{index\}\}/,i.index()+1).replace(/\{\{slidesLength\}\}/,e.slides.length);e.a11y.addElLabel(i,s)})),e.navigation&&e.navigation.$nextEl&&(i=e.navigation.$nextEl),e.navigation&&e.navigation.$prevEl&&(s=e.navigation.$prevEl),i&&i.length&&(e.a11y.makeElFocusable(i),"BUTTON"!==i[0].tagName&&(e.a11y.addElRole(i,"button"),i.on("keydown",e.a11y.onEnterOrSpaceKey)),e.a11y.addElLabel(i,t.nextSlideMessage),e.a11y.addElControls(i,n)),s&&s.length&&(e.a11y.makeElFocusable(s),"BUTTON"!==s[0].tagName&&(e.a11y.addElRole(s,"button"),s.on("keydown",e.a11y.onEnterOrSpaceKey)),e.a11y.addElLabel(s,t.prevSlideMessage),e.a11y.addElControls(s,n)),e.pagination&&e.params.pagination.clickable&&e.pagination.bullets&&e.pagination.bullets.length&&e.pagination.$el.on("keydown",z(e.params.pagination.bulletClass),e.a11y.onEnterOrSpaceKey)},destroy:function(){var e,t,a=this;a.a11y.liveRegion&&a.a11y.liveRegion.length>0&&a.a11y.liveRegion.remove(),a.navigation&&a.navigation.$nextEl&&(e=a.navigation.$nextEl),a.navigation&&a.navigation.$prevEl&&(t=a.navigation.$prevEl),e&&e.off("keydown",a.a11y.onEnterOrSpaceKey),t&&t.off("keydown",a.a11y.onEnterOrSpaceKey),a.pagination&&a.params.pagination.clickable&&a.pagination.bullets&&a.pagination.bullets.length&&a.pagination.$el.off("keydown",z(a.params.pagination.bulletClass),a.a11y.onEnterOrSpaceKey)}},re={init:function(){var e=this,t=l();if(e.params.history){if(!t.history||!t.history.pushState)return e.params.history.enabled=!1,void(e.params.hashNavigation.enabled=!0);var a=e.history;a.initialized=!0,a.paths=re.getPathValues(e.params.url),(a.paths.key||a.paths.value)&&(a.scrollToSlide(0,a.paths.value,e.params.runCallbacksOnInit),e.params.history.replaceState||t.addEventListener("popstate",e.history.setHistoryPopState))}},destroy:function(){var e=l();this.params.history.replaceState||e.removeEventListener("popstate",this.history.setHistoryPopState)},setHistoryPopState:function(){var e=this;e.history.paths=re.getPathValues(e.params.url),e.history.scrollToSlide(e.params.speed,e.history.paths.value,!1)},getPathValues:function(e){var t=l(),a=(e?new URL(e):t.location).pathname.slice(1).split("/").filter((function(e){return""!==e})),i=a.length;return{key:a[i-2],value:a[i-1]}},setHistory:function(e,t){var a=this,i=l();if(a.history.initialized&&a.params.history.enabled){var s;s=a.params.url?new URL(a.params.url):i.location;var r=a.slides.eq(t),n=re.slugify(r.attr("data-history"));if(a.params.history.root.length>0){var o=a.params.history.root;"/"===o[o.length-1]&&(o=o.slice(0,o.length-1)),n=o+"/"+e+"/"+n}else s.pathname.includes(e)||(n=e+"/"+n);var d=i.history.state;d&&d.value===n||(a.params.history.replaceState?i.history.replaceState({value:n},null,n):i.history.pushState({value:n},null,n))}},slugify:function(e){return e.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},scrollToSlide:function(e,t,a){var i=this;if(t)for(var s=0,r=i.slides.length;s
    '),i.append(e)),e.css({height:r+"px"})):0===(e=a.find(".swiper-cube-shadow")).length&&(e=m('
    '),a.append(e)));for(var v=0;v-1&&(h=90*g+90*w,l&&(h=90*-g-90*w)),f.transform(C),p.slideShadows){var S=u?f.find(".swiper-slide-shadow-left"):f.find(".swiper-slide-shadow-top"),M=u?f.find(".swiper-slide-shadow-right"):f.find(".swiper-slide-shadow-bottom");0===S.length&&(S=m('
    '),f.append(S)),0===M.length&&(M=m('
    '),f.append(M)),S.length&&(S[0].style.opacity=Math.max(-w,0)),M.length&&(M[0].style.opacity=Math.max(w,0))}}if(i.css({"-webkit-transform-origin":"50% 50% -"+o/2+"px","-moz-transform-origin":"50% 50% -"+o/2+"px","-ms-transform-origin":"50% 50% -"+o/2+"px","transform-origin":"50% 50% -"+o/2+"px"}),p.shadow)if(u)e.transform("translate3d(0px, "+(r/2+p.shadowOffset)+"px, "+-r/2+"px) rotateX(90deg) rotateZ(0deg) scale("+p.shadowScale+")");else{var z=Math.abs(h)-90*Math.floor(Math.abs(h)/90),P=1.5-(Math.sin(2*z*Math.PI/360)/2+Math.cos(2*z*Math.PI/360)/2),k=p.shadowScale,$=p.shadowScale/P,L=p.shadowOffset;e.transform("scale3d("+k+", 1, "+$+") translate3d(0px, "+(n/2+L)+"px, "+-n/2/$+"px) rotateX(-90deg)")}var I=d.isSafari||d.isWebView?-o/2:0;i.transform("translate3d(0px,0,"+I+"px) rotateX("+(t.isHorizontal()?0:h)+"deg) rotateY("+(t.isHorizontal()?-h:0)+"deg)")},setTransition:function(e){var t=this,a=t.$el;t.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),t.params.cubeEffect.shadow&&!t.isHorizontal()&&a.find(".swiper-cube-shadow").transition(e)}},pe={setTranslate:function(){for(var e=this,t=e.slides,a=e.rtlTranslate,i=0;i
    '),s.append(p)),0===u.length&&(u=m('
    '),s.append(u)),p.length&&(p[0].style.opacity=Math.max(-r,0)),u.length&&(u[0].style.opacity=Math.max(r,0))}s.transform("translate3d("+o+"px, "+d+"px, 0px) rotateX("+l+"deg) rotateY("+n+"deg)")}},setTransition:function(e){var t=this,a=t.slides,i=t.activeIndex,s=t.$wrapperEl;if(a.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),t.params.virtualTranslate&&0!==e){var r=!1;a.eq(i).transitionEnd((function(){if(!r&&t&&!t.destroyed){r=!0,t.animating=!1;for(var e=["webkitTransitionEnd","transitionend"],a=0;a
    '),h.append(S)),0===M.length&&(M=m('
    '),h.append(M)),S.length&&(S[0].style.opacity=f>0?f:0),M.length&&(M[0].style.opacity=-f>0?-f:0)}}},setTransition:function(e){this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)}},ce={init:function(){var e=this,t=e.params.thumbs;if(e.thumbs.initialized)return!1;e.thumbs.initialized=!0;var a=e.constructor;return t.swiper instanceof a?(e.thumbs.swiper=t.swiper,S(e.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),S(e.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1})):C(t.swiper)&&(e.thumbs.swiper=new a(S({},t.swiper,{watchSlidesVisibility:!0,watchSlidesProgress:!0,slideToClickedSlide:!1})),e.thumbs.swiperCreated=!0),e.thumbs.swiper.$el.addClass(e.params.thumbs.thumbsContainerClass),e.thumbs.swiper.on("tap",e.thumbs.onThumbClick),!0},onThumbClick:function(){var e=this,t=e.thumbs.swiper;if(t){var a=t.clickedIndex,i=t.clickedSlide;if(!(i&&m(i).hasClass(e.params.thumbs.slideThumbActiveClass)||null==a)){var s;if(s=t.params.loop?parseInt(m(t.clickedSlide).attr("data-swiper-slide-index"),10):a,e.params.loop){var r=e.activeIndex;e.slides.eq(r).hasClass(e.params.slideDuplicateClass)&&(e.loopFix(),e._clientLeft=e.$wrapperEl[0].clientLeft,r=e.activeIndex);var n=e.slides.eq(r).prevAll('[data-swiper-slide-index="'+s+'"]').eq(0).index(),l=e.slides.eq(r).nextAll('[data-swiper-slide-index="'+s+'"]').eq(0).index();s=void 0===n?l:void 0===l?n:l-rt.previousIndex?"next":"prev"}else l=(n=t.realIndex)>t.previousIndex?"next":"prev";r&&(n+="next"===l?s:-1*s),a.visibleSlidesIndexes&&a.visibleSlidesIndexes.indexOf(n)<0&&(a.params.centeredSlides?n=n>o?n-Math.floor(i/2)+1:n+Math.floor(i/2)-1:n>o&&(n=n-i+1),a.slideTo(n,e?0:void 0))}var u=1,c=t.params.thumbs.slideThumbActiveClass;if(t.params.slidesPerView>1&&!t.params.centeredSlides&&(u=t.params.slidesPerView),t.params.thumbs.multipleActiveThumbs||(u=1),u=Math.floor(u),a.slides.removeClass(c),a.params.loop||a.params.virtual&&a.params.virtual.enabled)for(var h=0;h0&&!m(a).hasClass(e.params.pagination.bulletClass)){if(e.navigation&&(e.navigation.nextEl&&a===e.navigation.nextEl||e.navigation.prevEl&&a===e.navigation.prevEl))return;!0===e.pagination.$el.hasClass(e.params.pagination.hiddenClass)?e.emit("paginationShow"):e.emit("paginationHide"),e.pagination.$el.toggleClass(e.params.pagination.hiddenClass)}}}},{name:"scrollbar",params:{scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag"}},create:function(){M(this,{scrollbar:t({isTouched:!1,timeout:null,dragTimeout:null},Q)})},on:{init:function(e){e.scrollbar.init(),e.scrollbar.updateSize(),e.scrollbar.setTranslate()},update:function(e){e.scrollbar.updateSize()},resize:function(e){e.scrollbar.updateSize()},observerUpdate:function(e){e.scrollbar.updateSize()},setTranslate:function(e){e.scrollbar.setTranslate()},setTransition:function(e,t){e.scrollbar.setTransition(t)},"enable disable":function(e){var t=e.scrollbar.$el;t&&t[e.enabled?"removeClass":"addClass"](e.params.scrollbar.lockClass)},destroy:function(e){e.scrollbar.destroy()}}},{name:"parallax",params:{parallax:{enabled:!1}},create:function(){M(this,{parallax:t({},ee)})},on:{beforeInit:function(e){e.params.parallax.enabled&&(e.params.watchSlidesProgress=!0,e.originalParams.watchSlidesProgress=!0)},init:function(e){e.params.parallax.enabled&&e.parallax.setTranslate()},setTranslate:function(e){e.params.parallax.enabled&&e.parallax.setTranslate()},setTransition:function(e,t){e.params.parallax.enabled&&e.parallax.setTransition(t)}}},{name:"zoom",params:{zoom:{enabled:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}},create:function(){var e=this;M(e,{zoom:t({enabled:!1,scale:1,currentScale:1,isScaling:!1,gesture:{$slideEl:void 0,slideWidth:void 0,slideHeight:void 0,$imageEl:void 0,$imageWrapEl:void 0,maxRatio:3},image:{isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},velocity:{x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0}},te)});var a=1;Object.defineProperty(e.zoom,"scale",{get:function(){return a},set:function(t){if(a!==t){var i=e.zoom.gesture.$imageEl?e.zoom.gesture.$imageEl[0]:void 0,s=e.zoom.gesture.$slideEl?e.zoom.gesture.$slideEl[0]:void 0;e.emit("zoomChange",t,i,s)}a=t}})},on:{init:function(e){e.params.zoom.enabled&&e.zoom.enable()},destroy:function(e){e.zoom.disable()},touchStart:function(e,t){e.zoom.enabled&&e.zoom.onTouchStart(t)},touchEnd:function(e,t){e.zoom.enabled&&e.zoom.onTouchEnd(t)},doubleTap:function(e,t){!e.animating&&e.params.zoom.enabled&&e.zoom.enabled&&e.params.zoom.toggle&&e.zoom.toggle(t)},transitionEnd:function(e){e.zoom.enabled&&e.params.zoom.enabled&&e.zoom.onTransitionEnd()},slideChange:function(e){e.zoom.enabled&&e.params.zoom.enabled&&e.params.cssMode&&e.zoom.onTransitionEnd()}}},{name:"lazy",params:{lazy:{checkInView:!1,enabled:!1,loadPrevNext:!1,loadPrevNextAmount:1,loadOnTransitionStart:!1,scrollingElement:"",elementClass:"swiper-lazy",loadingClass:"swiper-lazy-loading",loadedClass:"swiper-lazy-loaded",preloaderClass:"swiper-lazy-preloader"}},create:function(){M(this,{lazy:t({initialImageLoaded:!1},ae)})},on:{beforeInit:function(e){e.params.lazy.enabled&&e.params.preloadImages&&(e.params.preloadImages=!1)},init:function(e){e.params.lazy.enabled&&!e.params.loop&&0===e.params.initialSlide&&(e.params.lazy.checkInView?e.lazy.checkInViewOnLoad():e.lazy.load())},scroll:function(e){e.params.freeMode&&!e.params.freeModeSticky&&e.lazy.load()},"scrollbarDragMove resize _freeModeNoMomentumRelease":function(e){e.params.lazy.enabled&&e.lazy.load()},transitionStart:function(e){e.params.lazy.enabled&&(e.params.lazy.loadOnTransitionStart||!e.params.lazy.loadOnTransitionStart&&!e.lazy.initialImageLoaded)&&e.lazy.load()},transitionEnd:function(e){e.params.lazy.enabled&&!e.params.lazy.loadOnTransitionStart&&e.lazy.load()},slideChange:function(e){e.params.lazy.enabled&&e.params.cssMode&&e.lazy.load()}}},{name:"controller",params:{controller:{control:void 0,inverse:!1,by:"slide"}},create:function(){M(this,{controller:t({control:this.params.controller.control},ie)})},on:{update:function(e){e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},resize:function(e){e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},observerUpdate:function(e){e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},setTranslate:function(e,t,a){e.controller.control&&e.controller.setTranslate(t,a)},setTransition:function(e,t,a){e.controller.control&&e.controller.setTransition(t,a)}}},{name:"a11y",params:{a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",slideLabelMessage:"{{index}} / {{slidesLength}}",containerMessage:null,containerRoleDescriptionMessage:null,itemRoleDescriptionMessage:null,slideRole:"group"}},create:function(){M(this,{a11y:t({},se,{liveRegion:m('')})})},on:{afterInit:function(e){e.params.a11y.enabled&&(e.a11y.init(),e.a11y.updateNavigation())},toEdge:function(e){e.params.a11y.enabled&&e.a11y.updateNavigation()},fromEdge:function(e){e.params.a11y.enabled&&e.a11y.updateNavigation()},paginationUpdate:function(e){e.params.a11y.enabled&&e.a11y.updatePagination()},destroy:function(e){e.params.a11y.enabled&&e.a11y.destroy()}}},{name:"history",params:{history:{enabled:!1,root:"",replaceState:!1,key:"slides"}},create:function(){M(this,{history:t({},re)})},on:{init:function(e){e.params.history.enabled&&e.history.init()},destroy:function(e){e.params.history.enabled&&e.history.destroy()},"transitionEnd _freeModeNoMomentumRelease":function(e){e.history.initialized&&e.history.setHistory(e.params.history.key,e.activeIndex)},slideChange:function(e){e.history.initialized&&e.params.cssMode&&e.history.setHistory(e.params.history.key,e.activeIndex)}}},{name:"hash-navigation",params:{hashNavigation:{enabled:!1,replaceState:!1,watchState:!1}},create:function(){M(this,{hashNavigation:t({initialized:!1},ne)})},on:{init:function(e){e.params.hashNavigation.enabled&&e.hashNavigation.init()},destroy:function(e){e.params.hashNavigation.enabled&&e.hashNavigation.destroy()},"transitionEnd _freeModeNoMomentumRelease":function(e){e.hashNavigation.initialized&&e.hashNavigation.setHash()},slideChange:function(e){e.hashNavigation.initialized&&e.params.cssMode&&e.hashNavigation.setHash()}}},{name:"autoplay",params:{autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}},create:function(){M(this,{autoplay:t({},le,{running:!1,paused:!1})})},on:{init:function(e){e.params.autoplay.enabled&&(e.autoplay.start(),r().addEventListener("visibilitychange",e.autoplay.onVisibilityChange),e.autoplay.attachMouseEvents())},beforeTransitionStart:function(e,t,a){e.autoplay.running&&(a||!e.params.autoplay.disableOnInteraction?e.autoplay.pause(t):e.autoplay.stop())},sliderFirstMove:function(e){e.autoplay.running&&(e.params.autoplay.disableOnInteraction?e.autoplay.stop():e.autoplay.pause())},touchEnd:function(e){e.params.cssMode&&e.autoplay.paused&&!e.params.autoplay.disableOnInteraction&&e.autoplay.run()},destroy:function(e){e.autoplay.detachMouseEvents(),e.autoplay.running&&e.autoplay.stop(),r().removeEventListener("visibilitychange",e.autoplay.onVisibilityChange)}}},{name:"effect-fade",params:{fadeEffect:{crossFade:!1}},create:function(){M(this,{fadeEffect:t({},oe)})},on:{beforeInit:function(e){if("fade"===e.params.effect){e.classNames.push(e.params.containerModifierClass+"fade");var t={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};S(e.params,t),S(e.originalParams,t)}},setTranslate:function(e){"fade"===e.params.effect&&e.fadeEffect.setTranslate()},setTransition:function(e,t){"fade"===e.params.effect&&e.fadeEffect.setTransition(t)}}},{name:"effect-cube",params:{cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}},create:function(){M(this,{cubeEffect:t({},de)})},on:{beforeInit:function(e){if("cube"===e.params.effect){e.classNames.push(e.params.containerModifierClass+"cube"),e.classNames.push(e.params.containerModifierClass+"3d");var t={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0};S(e.params,t),S(e.originalParams,t)}},setTranslate:function(e){"cube"===e.params.effect&&e.cubeEffect.setTranslate()},setTransition:function(e,t){"cube"===e.params.effect&&e.cubeEffect.setTransition(t)}}},{name:"effect-flip",params:{flipEffect:{slideShadows:!0,limitRotation:!0}},create:function(){M(this,{flipEffect:t({},pe)})},on:{beforeInit:function(e){if("flip"===e.params.effect){e.classNames.push(e.params.containerModifierClass+"flip"),e.classNames.push(e.params.containerModifierClass+"3d");var t={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};S(e.params,t),S(e.originalParams,t)}},setTranslate:function(e){"flip"===e.params.effect&&e.flipEffect.setTranslate()},setTransition:function(e,t){"flip"===e.params.effect&&e.flipEffect.setTransition(t)}}},{name:"effect-coverflow",params:{coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}},create:function(){M(this,{coverflowEffect:t({},ue)})},on:{beforeInit:function(e){"coverflow"===e.params.effect&&(e.classNames.push(e.params.containerModifierClass+"coverflow"),e.classNames.push(e.params.containerModifierClass+"3d"),e.params.watchSlidesProgress=!0,e.originalParams.watchSlidesProgress=!0)},setTranslate:function(e){"coverflow"===e.params.effect&&e.coverflowEffect.setTranslate()},setTransition:function(e,t){"coverflow"===e.params.effect&&e.coverflowEffect.setTransition(t)}}},{name:"thumbs",params:{thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-container-thumbs"}},create:function(){M(this,{thumbs:t({swiper:null,initialized:!1},ce)})},on:{beforeInit:function(e){var t=e.params.thumbs;t&&t.swiper&&(e.thumbs.init(),e.thumbs.update(!0))},slideChange:function(e){e.thumbs.swiper&&e.thumbs.update()},update:function(e){e.thumbs.swiper&&e.thumbs.update()},resize:function(e){e.thumbs.swiper&&e.thumbs.update()},observerUpdate:function(e){e.thumbs.swiper&&e.thumbs.update()},setTransition:function(e,t){var a=e.thumbs.swiper;a&&a.setTransition(t)},beforeDestroy:function(e){var t=e.thumbs.swiper;t&&e.thumbs.swiperCreated&&t&&t.destroy()}}}];return F.use(he),F})); \ No newline at end of file diff --git a/templates/modules/head.html b/templates/modules/head.html index 1bb29eed..beac374d 100644 --- a/templates/modules/head.html +++ b/templates/modules/head.html @@ -237,8 +237,8 @@ }, artalk:{ - js:[[${not #strings.isEmpty(theme.config.comments.artalks.artalkJs) ? theme.config.comments.artalks.artalkJs : 'https://cdn.bootcdn.net/ajax/libs/artalk/2.6.2/Artalk.js' }]], - css:[[${not #strings.isEmpty(theme.config.comments.artalks.artalkCss) ? theme.config.comments.artalks.artalkCss : 'https://cdn.bootcdn.net/ajax/libs/artalk/2.6.2/Artalk.css' }]], + js:[[${not #strings.isEmpty(theme.config.comments.artalks.artalkJs) ? theme.config.comments.artalks.artalkJs : assets_link +'/libs/artalk/Artalk.js' }]], + css:[[${not #strings.isEmpty(theme.config.comments.artalks.artalkCss) ? theme.config.comments.artalks.artalkCss : assets_link +'/libs/artalk/Artalk.css' }]], artalkUrl: "[(${theme.config.comments.artalks.server})]", siteName: "[(${theme.config.comments.artalks.siteName})]", },