chore: olho da password em todos os campos, JS morto removido, .gitignore
- assets/js/password-toggle.js, carregado nos dois layouts: liga os botões
existentes e cria um para cada campo de password que não o tenha (eram 3
em 12). aria-pressed, aria-label que muda, fora da ordem de tabulação, e
volta a ocultar ao submeter.
- Removidas 23 bibliotecas/folhas sem nenhuma referência (193 ficheiros),
incluindo o jQuery 3.2.1 (CVE-2020-11022/11023) que se servia por URL, o
Splide (a galeria passou a masonry própria em d70f13a), owl, mixitup,
masonry, magnific-popup, slicknav, jquery.lazy, fullpage, TweenMax,
circle-progress, progressbar, o template polo e cópias antigas do
Bootstrap/FontAwesome em site/assets.
- .table-responsive nas listagens de eventos e galerias.
- .gitignore: sem os 5 padrões herdados do fotografia; *.sql/*.dump
ignorados (exceto migrações e o esquema); .trash/ das imagens; nota sobre
vendor/ versionado de propósito. database/andmore_fitme3070_dev.sql passa a
database/schema.sql (só estrutura, 0 INSERT).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No files matched your search
@@ -1,7 +0,0 @@
|
||||
/*!
|
||||
* Bootstrap v4.3.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2019 The Bootstrap Authors
|
||||
* Copyright 2011-2019 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/:root{--blue:#007bff;--indigo:#6610f2;--purple:#6f42c1;--pink:#e83e8c;--red:#dc3545;--orange:#fd7e14;--yellow:#ffc107;--green:#28a745;--teal:#20c997;--cyan:#17a2b8;--white:#fff;--gray:#6c757d;--gray-dark:#343a40;--primary:#007bff;--secondary:#6c757d;--success:#28a745;--info:#17a2b8;--warning:#ffc107;--danger:#dc3545;--light:#f8f9fa;--dark:#343a40;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--font-family-sans-serif:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:2.5rem}.h2,h2{font-size:2rem}.h3,h3{font-size:1.75rem}.h4,h4{font-size:1.5rem}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:6rem;font-weight:300;line-height:1.2}.display-2{font-size:5.5rem;font-weight:300;line-height:1.2}.display-3{font-size:4.5rem;font-weight:300;line-height:1.2}.display-4{font-size:3.5rem;font-weight:300;line-height:1.2}hr{margin-top:1rem;margin-bottom:1rem;border:0;border-top:1px solid rgba(0,0,0,.1)}.small,Line truncated
|
||||
/*# sourceMappingURL=bootstrap.min.css.map */
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["../../scss/bootstrap.scss","../../scss/_root.scss","../../scss/_reboot.scss","dist/css/bootstrap.css","../../scss/vendor/_rfs.scss","bootstrap.css","../../scss/mixins/_hover.scss","../../scss/_type.scss","../../scss/mixins/_lists.scss","../../scss/_images.scss","../../scss/mixins/_image.scss","../../scss/mixins/_border-radius.scss","../../scss/_code.scss","../../scss/_grid.scss","../../scss/mixins/_grid.scss","../../scss/mixins/_breakpoints.scss","../../scss/mixins/_grid-framework.scss","../../scss/_tables.scss","../../scss/mixins/_table-row.scss","../../scss/_forms.scss","../../scss/mixins/_transition.scss","../../scss/mixins/_forms.scss","../../scss/mixins/_gradients.scss","../../scss/_buttons.scss","../../scss/mixins/_buttons.scss","../../scss/_transitions.scss","../../scss/_dropdown.scss","../../scss/mixins/_caret.scss","../../scss/mixins/_nav-divider.scss","../../scss/_button-group.scss","../../scss/_input-group.scss","../../scss/_custom-forms.scss","../../scss/_nav.scss","../../scss/_navbar.scss","../../scss/_card.scss","../../scss/_breadcrumb.scss","../../scss/_pagination.scss","../../scss/mixins/_pagination.scss","../../scss/_badge.scss","../../scss/mixins/_badge.scss","../../scss/_jumbotron.scss","../../scss/_alert.scss","../../scss/mixins/_alert.scss","../../scss/_progress.scss","../../scss/_media.scss","../../scss/_list-group.scss","../../scss/mixins/_list-group.scss","../../scss/_close.scss","../../scss/_toasts.scss","../../scss/_modal.scss","../../scss/_tooltip.scss","../../scss/mixins/_reset-text.scss","../../scss/_popover.scss","../../scss/_carousel.scss","../../scss/mixins/_clearfix.scss","../../scss/_spinners.scss","../../scss/utilities/_align.scss","../../scss/mixins/_background-variant.scss","../../scss/utilities/_background.scss","../../scss/utilities/_borders.scss","../../scss/utilities/_display.scss","../../scss/utilities/_embed.scss","../../scss/utilities/_flex.scss","../../scss/utilities/_float.scss","../../scss/utilities/_overflow.scss","../../scss/utilities/_position.scss","../../scss/utilities/_screenreaders.scss","../../scss/mixins/_screen-reader.scss","../../scss/utilities/_shadows.scss","../../scss/utilities/_sizing.scss","../../scss/utilities/_stretched-link.scss","../../scss/utilities/_spacing.scss","../../scss/utilities/_text.scss","../../scss/mixins/_text-truncate.scss","../../scss/mixins/_text-emphasis.scss","../../scss/mixins/_text-hide.scss","../../scss/utilities/_visibility.scss","../../scss/_print.scss"],"names":[],"mappings":"AAAA;;;;;ACCA,MAGI,OAAA,QAAA,SAAA,QAAA,SAAA,QAAA,OAAA,QAAA,MAAA,QAAA,SAAA,QAAA,SAAA,QAAA,QAAA,QAAA,OAAA,QAAA,OAAA,QAAA,QAAA,KAAA,OAAA,QAAA,YAAA,QAIA,UAAA,QAAA,YAAA,QAAA,UAAA,QAAA,OAAA,QAAA,UAAA,QAAA,SAAA,QAAA,QAAA,QAAA,OAAA,QAIA,gBAAA,EAAA,gBAAA,MAAA,gBAAA,MAAA,gBAAA,MAAA,gBAAA,OAKF,yBAAA,aAAA,CAAA,kBAAA,CAAA,UAAA,CAAA,MAAA,CAAA,gBAAA,CAAA,KAAA,CAAA,WAAA,CAAA,UAAA,CAAA,mBAAA,CAAA,gBAAA,CAAA,iBAAA,CAAA,mBACA,wBAAA,cAAA,CAAA,KAAA,CAAA,MAAA,CAAA,QAAA,CAAA,iBAAA,CAAA,aAAA,CAAA,UCAF,ECqBA,QADA,SDjBE,WAAA,WAGF,KACE,YAAA,WACA,YAAA,KACA,yBAAA,KACA,4BAAA,YAMF,QAAA,MAAA,WAAA,OAAA,OAAA,OAAA,OAAA,KAAA,IAAA,QACE,QAAA,MAUF,KACE,OAAA,EACA,YAAA,aAAA,CAAA,kBAAA,CAAA,UAAA,CAAA,MAAA,CAAA,gBAAA,CAAA,KAAA,CAAA,WAAA,CAAA,UAAA,CAAA,mBAAA,CAAA,gBAAA,CAAA,iBAAA,CAAA,mBEgFI,UAAA,KF9EJ,YAAA,IACA,YAAA,IACA,MAAA,QACA,WAAA,KACA,iBAAA,KGYF,0CHCE,QAAA,YASF,GACE,WAAA,YACA,OAAA,EACA,SAAA,QAaF,GAAA,GAAA,GAAA,GAAA,GAAA,GACE,WAAA,EACA,cAAA,MAOF,EACE,WAAA,EACA,cAAA,KChBF,0BD2BA,YAEE,gBAAA,UACA,wBAAA,UAAA,OAAA,gBAAA,UAAA,OACA,OAAA,KACA,cAAA,EACA,iCAAA,KAAA,yBAAA,KAGF,QACE,cAAA,KACA,WAAA,OACA,YAAA,QCrBF,GDwBA,GCzBA,GD4BE,WAAA,EACA,cAAA,KAGF,MCxBA,MACA,MAFA,MD6BE,cAAA,EAGF,GACE,YAAA,IAGF,GACE,cAAA,MACA,YAAA,EAGF,WACE,OAAA,EAAA,EAAA,KAGF,ECzBA,OD2BE,YAAA,OAGF,MExFI,UAAA,IFiGJ,IC9BA,IDgCE,SAAA,SEnGE,UAAA,IFqGF,YAAA,EACA,eAAA,SAGF,IAAM,OAAA,OACN,IAAM,IAAA,MAON,EACE,MAAA,QACA,gBAAA,KACA,iBAAA,YIhLA,QJmLE,MAAA,QACA,gBAAA,UASJ,cACE,MAAA,QACA,gBAAA,KI/LA,oBJkME,MAAA,QACA,gBAAA,KC/BJ,KACA,IDuCA,ICtCA,KD0CE,YAAA,cAAA,CAAA,KAAA,CAAA,MAAA,CAAA,QAAA,CAAA,iBAAA,CAAA,aAAA,CAAA,UEpJE,UAAA,IFwJJ,IAEE,WAAA,EAEA,cAAA,KAEA,SAAA,KAQF,OAEE,OAAA,EAAA,EAAA,KAQF,IACE,eAAA,OACA,aAAA,KAGF,IAGE,SAAA,OACA,eAAA,OAQF,MACE,gBAAA,SAGF,QACE,YAAA,OACA,eAAA,OACA,MAAA,QACA,WAAA,KACA,aAAA,OAGF,GAGE,WAAA,QAQF,MAEE,QAAA,aACA,cAAA,MAMF,OAEE,cAAA,EAOF,aACE,QAAA,IAAA,OACA,QAAA,IAAA,KAAA,yBC1EF,OD6EA,MC3EA,SADA,OAEA,SD+EE,OAAA,EACA,YAAA,QErPE,UAAA,QFuPF,YAAA,QAGF,OC7EA,MD+EE,SAAA,QAGF,OC7EA,OD+EE,eAAA,KAMF,OACE,UAAA,OC7EF,cACA,aACA,cDkFA,OAIE,mBAAA,OCjFF,6BACA,4BACA,6BDoFE,sBAKI,OAAA,QCpFN,gCACA,+BACA,gCDwFA,yBAIE,QAAA,EACA,aAAA,KCvFF,qBD0FA,kBAEE,WAAA,WACA,QAAA,EAIF,iBC1FA,2BACA,kBAFA,iBDoGE,mBAAA,QAGF,SACE,SAAA,KAEA,OAAA,SAGF,SAME,UAAA,EAEA,QAAA,EACA,OAAA,EACA,OAAA,EAKF,OACE,QAAA,MACA,MAAA,KACA,UAAA,KACA,QAAA,EACA,cAAA,MEjSI,UAAA,OFmSJ,YAAA,QACA,MAAA,QACA,YAAA,OAGF,SACE,eAAA,SGzGF,yCFGA,yCD4GE,OAAA,KG1GF,cHkHE,eAAA,KACA,mBAAA,KG9GF,yCHsHE,mBAAA,KAQF,6BACE,KAAA,QACA,mBAAA,OAOF,OACE,QAAA,aAGF,QACE,QAAA,Line truncated
|
||||
@@ -1,4 +0,0 @@
|
||||
/*!
|
||||
* Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome
|
||||
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
|
||||
*/@font-face{font-family:'FontAwesome';src:url('../icon-fonts/fontawesome-webfont.eot?v=4.7.0');src:url('../icon-fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'),url('../icon-fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'),url('../icon-fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'),url('../icon-fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'),url('../icon-fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-tLine truncated
|
||||
@@ -1,11 +0,0 @@
|
||||
/*!
|
||||
* fullPage 3.0.5
|
||||
* https://github.com/alvarotrigo/fullPage.js
|
||||
*
|
||||
* @license GPLv3 for open source use only
|
||||
* or Fullpage Commercial License for commercial use
|
||||
* http://alvarotrigo.com/fullPage/pricing/
|
||||
*
|
||||
* Copyright (C) 2018 http://alvarotrigo.com/fullPage - A project by Alvaro Trigo
|
||||
*/.fp-enabled body,html.fp-enabled{margin:0;padding:0;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0)}.fp-section{position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.fp-slide{float:left}.fp-slide,.fp-slidesContainer{height:100%;display:block}.fp-slides{z-index:1;height:100%;overflow:hidden;position:relative;-webkit-transition:all .3s ease-out;transition:all .3s ease-out}.fp-section.fp-table,.fp-slide.fp-table{display:table;table-layout:fixed;width:100%}.fp-tableCell{display:table-cell;vertical-align:middle;width:100%;height:100%}.fp-slidesContainer{float:left;position:relative}.fp-controlArrow{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none;position:absolute;z-index:4;top:50%;cursor:pointer;width:0;height:0;border-style:solid;margin-top:-38px;-webkit-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.fp-controlArrow.fp-prev{left:15px;width:0;border-width:38.5px 34px 38.5px 0;border-color:transparent #fff transparent transparent}.fp-controlArrow.fp-next{right:15px;border-width:38.5px 0 38.5px 34px;border-color:transparent transparent transparent #fff}.fp-scrollable{overflow:hidden;position:relative}.fp-scroller{overflow:hidden}.iScrollIndicator{border:0!important}.fp-notransition{-webkit-transition:none!important;transition:none!important}#fp-nav{position:fixed;z-index:100;margin-top:-32px;top:50%;opacity:1;-webkit-transform:translate3d(0,0,0)}#fp-nav.fp-right{right:17px}#fp-nav.fp-left{left:17px}.fp-slidesNav{position:absolute;z-index:4;opacity:1;-webkit-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);transform:translate3d(0,0,0);left:0!important;right:0;margin:0 auto!important}.fp-slidesNav.fp-bottom{bottom:17px}.fp-slidesNav.fp-top{top:17px}#fp-nav ul,.fp-slidesNav ul{margin:0;padding:0}#fp-nav ul li,.fp-slidesNav ul li{display:block;width:14px;height:13px;margin:7px;position:relative}.fp-slidesNav ul li{display:inline-block}#fp-nav ul li a,.fp-slidesNav ul li a{display:block;position:relative;z-index:1;width:100%;height:100%;cursor:pointer;text-decoration:none}#fp-nav ul li a.active span,#fp-nav ul li:hover a.active span,.fp-slidesNav ul li a.active span,.fp-slidesNav ul li:hover a.active span{height:12px;width:12px;margin:-6px 0 0 -6px;border-radius:100%}#fp-nav ul li a span,.fp-slidesNav ul li a span{border-radius:50%;position:absolute;z-index:1;height:4px;width:4px;border:0;background:#333;left:50%;top:50%;margin:-2px 0 0 -2px;-webkit-transition:all .1s ease-in-out;-moz-transition:all .1s ease-in-out;-o-transition:all .1s ease-in-out;transition:all .1s ease-in-out}#fp-nav ul li:hover a span,.fp-slidesNav ul li:hover a span{width:10px;height:10px;margin:-5px 0 0 -5px}#fp-nav ul li .fp-tooltip{position:absolute;top:-2px;color:#fff;font-size:14px;font-family:arial,helvetica,sans-serif;white-space:nowrap;max-width:220px;overflow:hidden;display:block;opacity:0;width:0;cursor:pointer}#fp-nav ul li:hover .fp-tooltip,#fp-nav.fp-show-active a.active+.fp-tooltip{-webkit-transition:opacity .2s ease-in;transition:opacity .2s ease-in;width:auto;opacity:1}#fp-nav ul li .fp-tooltip.fp-right{right:20px}#fp-nav ul li .fp-tooltip.fp-left{left:20px}.fp-auto-height .fp-slide,.fp-auto-height .fp-tableCell,.fp-auto-height.fp-section{height:auto!important}.fp-responsive .fp-auto-height-responsive .fp-slide,.fp-responsive .fp-auto-height-responsive .fp-tableCell,.fp-responsive .fp-auto-height-responsive.fp-section{height:auto!important}.fp-sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
|
||||
/*# sourceMappingURL=fullpage.min.css.map */
|
||||
@@ -1,351 +0,0 @@
|
||||
/* Magnific Popup CSS */
|
||||
.mfp-bg {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 1042;
|
||||
overflow: hidden;
|
||||
position: fixed;
|
||||
background: #0b0b0b;
|
||||
opacity: 0.8; }
|
||||
|
||||
.mfp-wrap {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 1043;
|
||||
position: fixed;
|
||||
outline: none !important;
|
||||
-webkit-backface-visibility: hidden; }
|
||||
|
||||
.mfp-container {
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
padding: 0 8px;
|
||||
box-sizing: border-box; }
|
||||
|
||||
.mfp-container:before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
height: 100%;
|
||||
vertical-align: middle; }
|
||||
|
||||
.mfp-align-top .mfp-container:before {
|
||||
display: none; }
|
||||
|
||||
.mfp-content {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin: 0 auto;
|
||||
text-align: left;
|
||||
z-index: 1045; }
|
||||
|
||||
.mfp-inline-holder .mfp-content,
|
||||
.mfp-ajax-holder .mfp-content {
|
||||
width: 100%;
|
||||
cursor: auto; }
|
||||
|
||||
.mfp-ajax-cur {
|
||||
cursor: progress; }
|
||||
|
||||
.mfp-zoom-out-cur, .mfp-zoom-out-cur .mfp-image-holder .mfp-close {
|
||||
cursor: -moz-zoom-out;
|
||||
cursor: -webkit-zoom-out;
|
||||
cursor: zoom-out; }
|
||||
|
||||
.mfp-zoom {
|
||||
cursor: pointer;
|
||||
cursor: -webkit-zoom-in;
|
||||
cursor: -moz-zoom-in;
|
||||
cursor: zoom-in; }
|
||||
|
||||
.mfp-auto-cursor .mfp-content {
|
||||
cursor: auto; }
|
||||
|
||||
.mfp-close,
|
||||
.mfp-arrow,
|
||||
.mfp-preloader,
|
||||
.mfp-counter {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
user-select: none; }
|
||||
|
||||
.mfp-loading.mfp-figure {
|
||||
display: none; }
|
||||
|
||||
.mfp-hide {
|
||||
display: none !important; }
|
||||
|
||||
.mfp-preloader {
|
||||
color: #CCC;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: auto;
|
||||
text-align: center;
|
||||
margin-top: -0.8em;
|
||||
left: 8px;
|
||||
right: 8px;
|
||||
z-index: 1044; }
|
||||
.mfp-preloader a {
|
||||
color: #CCC; }
|
||||
.mfp-preloader a:hover {
|
||||
color: #FFF; }
|
||||
|
||||
.mfp-s-ready .mfp-preloader {
|
||||
display: none; }
|
||||
|
||||
.mfp-s-error .mfp-content {
|
||||
display: none; }
|
||||
|
||||
button.mfp-close,
|
||||
button.mfp-arrow {
|
||||
overflow: visible;
|
||||
cursor: pointer;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
-webkit-appearance: none;
|
||||
display: block;
|
||||
outline: none;
|
||||
padding: 0;
|
||||
z-index: 1046;
|
||||
box-shadow: none;
|
||||
touch-action: manipulation; }
|
||||
|
||||
button::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border: 0; }
|
||||
|
||||
.mfp-close {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
line-height: 44px;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
opacity: 0.65;
|
||||
padding: 0 0 18px 10px;
|
||||
color: #FFF;
|
||||
font-style: normal;
|
||||
font-size: 28px;
|
||||
font-family: Arial, Baskerville, monospace; }
|
||||
.mfp-close:hover,
|
||||
.mfp-close:focus {
|
||||
opacity: 1; }
|
||||
.mfp-close:active {
|
||||
top: 1px; }
|
||||
|
||||
.mfp-close-btn-in .mfp-close {
|
||||
color: #333; }
|
||||
|
||||
.mfp-image-holder .mfp-close,
|
||||
.mfp-iframe-holder .mfp-close {
|
||||
color: #FFF;
|
||||
right: -6px;
|
||||
text-align: right;
|
||||
padding-right: 6px;
|
||||
width: 100%; }
|
||||
|
||||
.mfp-counter {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
color: #CCC;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
white-space: nowrap; }
|
||||
|
||||
.mfp-arrow {
|
||||
position: absolute;
|
||||
opacity: 0.65;
|
||||
margin: 0;
|
||||
top: 50%;
|
||||
margin-top: -55px;
|
||||
padding: 0;
|
||||
width: 90px;
|
||||
height: 110px;
|
||||
-webkit-tap-highlight-color: transparent; }
|
||||
.mfp-arrow:active {
|
||||
margin-top: -54px; }
|
||||
.mfp-arrow:hover,
|
||||
.mfp-arrow:focus {
|
||||
opacity: 1; }
|
||||
.mfp-arrow:before,
|
||||
.mfp-arrow:after {
|
||||
content: '';
|
||||
display: block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
margin-top: 35px;
|
||||
margin-left: 35px;
|
||||
border: medium inset transparent; }
|
||||
.mfp-arrow:after {
|
||||
border-top-width: 13px;
|
||||
border-bottom-width: 13px;
|
||||
top: 8px; }
|
||||
.mfp-arrow:before {
|
||||
border-top-width: 21px;
|
||||
border-bottom-width: 21px;
|
||||
opacity: 0.7; }
|
||||
|
||||
.mfp-arrow-left {
|
||||
left: 0; }
|
||||
.mfp-arrow-left:after {
|
||||
border-right: 17px solid #FFF;
|
||||
margin-left: 31px; }
|
||||
.mfp-arrow-left:before {
|
||||
margin-left: 25px;
|
||||
border-right: 27px solid #3F3F3F; }
|
||||
|
||||
.mfp-arrow-right {
|
||||
right: 0; }
|
||||
.mfp-arrow-right:after {
|
||||
border-left: 17px solid #FFF;
|
||||
margin-left: 39px; }
|
||||
.mfp-arrow-right:before {
|
||||
border-left: 27px solid #3F3F3F; }
|
||||
|
||||
.mfp-iframe-holder {
|
||||
padding-top: 40px;
|
||||
padding-bottom: 40px; }
|
||||
.mfp-iframe-holder .mfp-content {
|
||||
line-height: 0;
|
||||
width: 100%;
|
||||
max-width: 900px; }
|
||||
.mfp-iframe-holder .mfp-close {
|
||||
top: -40px; }
|
||||
|
||||
.mfp-iframe-scaler {
|
||||
width: 100%;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
padding-top: 56.25%; }
|
||||
.mfp-iframe-scaler iframe {
|
||||
position: absolute;
|
||||
display: block;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
|
||||
background: #000; }
|
||||
|
||||
/* Main image in popup */
|
||||
img.mfp-img {
|
||||
width: auto;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
display: block;
|
||||
line-height: 0;
|
||||
box-sizing: border-box;
|
||||
padding: 40px 0 40px;
|
||||
margin: 0 auto; }
|
||||
|
||||
/* The shadow behind the image */
|
||||
.mfp-figure {
|
||||
line-height: 0; }
|
||||
.mfp-figure:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 40px;
|
||||
bottom: 40px;
|
||||
display: block;
|
||||
right: 0;
|
||||
width: auto;
|
||||
height: auto;
|
||||
z-index: -1;
|
||||
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
|
||||
background: #444; }
|
||||
.mfp-figure small {
|
||||
color: #BDBDBD;
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
line-height: 14px; }
|
||||
.mfp-figure figure {
|
||||
margin: 0; }
|
||||
|
||||
.mfp-bottom-bar {
|
||||
margin-top: -36px;
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
cursor: auto; }
|
||||
|
||||
.mfp-title {
|
||||
text-align: left;
|
||||
line-height: 18px;
|
||||
color: #F3F3F3;
|
||||
word-wrap: break-word;
|
||||
padding-right: 36px; }
|
||||
|
||||
.mfp-image-holder .mfp-content {
|
||||
max-width: 100%; }
|
||||
|
||||
.mfp-gallery .mfp-image-holder .mfp-figure {
|
||||
cursor: pointer; }
|
||||
|
||||
@media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) {
|
||||
/**
|
||||
* Remove all paddings around the image on small screen
|
||||
*/
|
||||
.mfp-img-mobile .mfp-image-holder {
|
||||
padding-left: 0;
|
||||
padding-right: 0; }
|
||||
.mfp-img-mobile img.mfp-img {
|
||||
padding: 0; }
|
||||
.mfp-img-mobile .mfp-figure:after {
|
||||
top: 0;
|
||||
bottom: 0; }
|
||||
.mfp-img-mobile .mfp-figure small {
|
||||
display: inline;
|
||||
margin-left: 5px; }
|
||||
.mfp-img-mobile .mfp-bottom-bar {
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
bottom: 0;
|
||||
margin: 0;
|
||||
top: auto;
|
||||
padding: 3px 5px;
|
||||
position: fixed;
|
||||
box-sizing: border-box; }
|
||||
.mfp-img-mobile .mfp-bottom-bar:empty {
|
||||
padding: 0; }
|
||||
.mfp-img-mobile .mfp-counter {
|
||||
right: 5px;
|
||||
top: 3px; }
|
||||
.mfp-img-mobile .mfp-close {
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
position: fixed;
|
||||
text-align: center;
|
||||
padding: 0; } }
|
||||
|
||||
@media all and (max-width: 900px) {
|
||||
.mfp-arrow {
|
||||
-webkit-transform: scale(0.75);
|
||||
transform: scale(0.75); }
|
||||
.mfp-arrow-left {
|
||||
-webkit-transform-origin: 0;
|
||||
transform-origin: 0; }
|
||||
.mfp-arrow-right {
|
||||
-webkit-transform-origin: 100%;
|
||||
transform-origin: 100%; }
|
||||
.mfp-container {
|
||||
padding-left: 6px;
|
||||
padding-right: 6px; } }
|
||||
@@ -1,6 +0,0 @@
|
||||
/**
|
||||
* Owl Carousel v2.3.4
|
||||
* Copyright 2013-2018 David Deutsch
|
||||
* Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
|
||||
*/
|
||||
.owl-carousel,.owl-carousel .owl-item{-webkit-tap-highlight-color:transparent;position:relative}.owl-carousel{display:none;width:100%;z-index:1}.owl-carousel .owl-stage{position:relative;-ms-touch-action:pan-Y;touch-action:manipulation;-moz-backface-visibility:hidden}.owl-carousel .owl-stage:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.owl-carousel .owl-stage-outer{position:relative;overflow:hidden;-webkit-transform:translate3d(0,0,0)}.owl-carousel .owl-item,.owl-carousel .owl-wrapper{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0)}.owl-carousel .owl-item{min-height:1px;float:left;-webkit-backface-visibility:hidden;-webkit-touch-callout:none}.owl-carousel .owl-item img{display:block;width:100%}.owl-carousel .owl-dots.disabled,.owl-carousel .owl-nav.disabled{display:none}.no-js .owl-carousel,.owl-carousel.owl-loaded{display:block}.owl-carousel .owl-dot,.owl-carousel .owl-nav .owl-next,.owl-carousel .owl-nav .owl-prev{cursor:pointer;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel .owl-nav button.owl-next,.owl-carousel .owl-nav button.owl-prev,.owl-carousel button.owl-dot{background:0 0;color:inherit;border:none;padding:0!important;font:inherit}.owl-carousel.owl-loading{opacity:0;display:block}.owl-carousel.owl-hidden{opacity:0}.owl-carousel.owl-refresh .owl-item{visibility:hidden}.owl-carousel.owl-drag .owl-item{-ms-touch-action:pan-y;touch-action:pan-y;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-grab{cursor:move;cursor:grab}.owl-carousel.owl-rtl{direction:rtl}.owl-carousel.owl-rtl .owl-item{float:right}.owl-carousel .animated{animation-duration:1s;animation-fill-mode:both}.owl-carousel .owl-animated-in{z-index:0}.owl-carousel .owl-animated-out{z-index:1}.owl-carousel .fadeOut{animation-name:fadeOut}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.owl-height{transition:height .5s ease-in-out}.owl-carousel .owl-item .owl-lazy{opacity:0;transition:opacity .4s ease}.owl-carousel .owl-item .owl-lazy:not([src]),.owl-carousel .owl-item .owl-lazy[src^=""]{max-height:0}.owl-carousel .owl-item img.owl-lazy{transform-style:preserve-3d}.owl-carousel .owl-video-wrapper{position:relative;height:100%;background:#000}.owl-carousel .owl-video-play-icon{position:absolute;height:80px;width:80px;left:50%;top:50%;margin-left:-40px;margin-top:-40px;background:url(owl.video.play.png) no-repeat;cursor:pointer;z-index:1;-webkit-backface-visibility:hidden;transition:transform .1s ease}.owl-carousel .owl-video-play-icon:hover{-ms-transform:scale(1.3,1.3);transform:scale(1.3,1.3)}.owl-carousel .owl-video-playing .owl-video-play-icon,.owl-carousel .owl-video-playing .owl-video-tn{display:none}.owl-carousel .owl-video-tn{opacity:0;height:100%;background-position:center center;background-repeat:no-repeat;background-size:contain;transition:opacity .4s ease}.owl-carousel .owl-video-frame{position:relative;z-index:1;height:100%;width:100%}
|
||||
@@ -1,5 +0,0 @@
|
||||
/*!
|
||||
* SlickNav Responsive Mobile Menu v1.0.10
|
||||
* (c) 2016 Josh Cope
|
||||
* licensed under MIT
|
||||
*/.slicknav_btn,.slicknav_nav .slicknav_item{cursor:pointer}.slicknav_menu,.slicknav_menu *{box-sizing:border-box}.slicknav_btn{position:relative;display:block;vertical-align:middle;float:right;padding:.438em .625em;line-height:1.125em}.slicknav_btn .slicknav_icon-bar+.slicknav_icon-bar{margin-top:.188em}.slicknav_menu .slicknav_menutxt{display:block;line-height:1.188em;float:left;color:#fff;font-weight:700;text-shadow:0 1px 3px #000}.slicknav_menu .slicknav_icon{float:left;width:1.125em;height:.875em;margin:.188em 0 0 .438em}.slicknav_menu .slicknav_icon:before{background:0 0;width:1.125em;height:.875em;display:block;content:"";position:absolute}.slicknav_menu .slicknav_no-text{margin:0}.slicknav_menu .slicknav_icon-bar{display:block;width:1.125em;height:.125em;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.25);-moz-box-shadow:0 1px 0 rgba(0,0,0,.25);box-shadow:0 1px 0 rgba(0,0,0,.25)}.slicknav_menu:after,.slicknav_menu:before{content:" ";display:table}.slicknav_menu:after{clear:both}.slicknav_nav li,.slicknav_nav ul{display:block}.slicknav_nav .slicknav_arrow{font-size:.8em;margin:0 0 0 .4em}.slicknav_nav .slicknav_item a{display:inline}.slicknav_nav .slicknav_row,.slicknav_nav a{display:block}.slicknav_nav .slicknav_parent-link a{display:inline}.slicknav_menu{*zoom:1;font-size:16px;background:#4c4c4c;padding:5px}.slicknav_nav,.slicknav_nav ul{list-style:none;overflow:hidden;padding:0}.slicknav_menu .slicknav_icon-bar{background-color:#fff}.slicknav_btn{margin:5px 5px 6px;text-decoration:none;text-shadow:0 1px 1px rgba(255,255,255,.75);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;background-color:#222}.slicknav_nav{clear:both;color:#fff;margin:0;font-size:.875em}.slicknav_nav ul{margin:0 0 0 20px}.slicknav_nav .slicknav_row,.slicknav_nav a{padding:5px 10px;margin:2px 5px}.slicknav_nav .slicknav_row:hover{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;background:#ccc;color:#fff}.slicknav_nav a{text-decoration:none;color:#fff}.slicknav_nav a:hover{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;background:#ccc;color:#222}.slicknav_nav .slicknav_txtnode{margin-left:15px}.slicknav_nav .slicknav_item a,.slicknav_nav .slicknav_parent-link a{padding:0;margin:0}.slicknav_brand{float:left;color:#fff;font-size:18px;line-height:30px;padding:7px 12px;height:44px}
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"sourceRoot":"","sources":["../sass/style.scss"],"names":[],"mappings":"AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA;AACA;AAAA;AAGC;AAAA;EAEC;EACA;EACA;EACA;;;AAGD;AAAA;AAAA;AAAA;AAAA;AAAA;EAMC;EACA;EACA;EACA;;;AAGD;EACC;;;AAGD;EACC;;;AAGD;EACC;;;AAGD;EACC;;;AAGD;EACC;;;AAGD;EACC;;;AAGD;EACC;EACA;EACA;;;AAGD;EACC;;;AAOA;AAAA;AAAA;AAAA;EACC;;;AAIF;AAAA;EAEC;EACA;;;AAGD;AAAA;EAEC;EACA;;;AAGD;AAAA;AAAA;AAIA;EACC;;AACA;EACC;EACA;;AACA;EACC,YA7FK;EA8FL;EACA;;AAGF;EACC;;AAGA;EACC;;;AAKH;EACC;EACA;EACA;;;AAGD;EACC;EACA;;;AAIA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAUC;;;AAIF;AAAA;AAAA;AAIA;EACC;;;AAGD;EACC;;AACA;EACC;;AAED;EACC;;;AAIF;AAEA;EACC;EACA;EACA;EACA;EACA;EACA;EACA,YAjKO;EAkKP;EACA;EACA;EACA;;AACA;EACC;;AAED;EACC,YAzKS;EA0KT,OA3KM;;AA4KN;EACC,OA7KK;;AAgLP;EACC;EACA;EACA;EACA,OAnLS;;AAoLT;EACC,OArLQ;;;AA0LX;AAEA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;EACC;IACC;IACA;IACA;IACA;;EAED;IACC;IACA;IACA;IACA;;EAED;IACC;IACA;IACA;IACA;;;AAIF;EACC;IACC;IACA;IACA;;EAED;IACC;IACA;IACA;;EAED;IACC;IACA;IACA;;;AAIF;AAEA;EACC;;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA,OAvQU;EAwQV;EACA;EACA;;;AAGD;EACC,YA9QU;EA+QV,OAhRO;;;AAmRR;EACC,YApRO;EAqRP,OApRU;;AAqRV;EACC;EACA,OAvRS;;;AA2RX;EACC;EACA;EACA,OA/RO;;;AAkSR;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,YA3SO;EA4SP,OA3SU;EA4SV;;;AAGD;EACC;;AACA;EACC;EACA;;;AAIF;AAGC;EACC;;AAED;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA,YAtUM;EAuUN;;AAED;EACC;;AAED;EACC;EACA;;AAED;AAAA;EAEC;;AAED;EACC;;AACA;EACC;;;AAKH;AAEA;EACC;EACA;EACA;EACA;;AACA;EACC;EACA;;AAED;EACC;EACA;EACA;EACA;;AACA;EACC;EACA;;AAED;EACC;EACA;EACA;;;AAKH;AAEA;EACC;EACA;;AACA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAED;EACC;;AAED;EACC;;AAGA;EACC,YAzZK;;;AA8ZR;AAAA;AAAA;AAIA;EACC;EACA;;;AAGD;EACC;EACA;;AACA;EACC;EACA;;AACA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EAEC,YAvbI;;;AA6bR;EACC;EACA;;AACA;EACC;EACA;EACA,YAncM;;AAocN;EACC;EACA;;AAED;EACC;;;AAKH;EACC;;;AAGD;AAAA;AAAA;AAIA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;EACC;;AACA;EACC;EACA;EACA;;AACA;EACC,OA3eK;;AA8eP;EACC;;;AAIF;AAAA;AAAA;AAIA;EACC;EACA;;;AAGD;AAAA;AAAA;AAIA;EACC;;;AAGD;EACC;;AACA;EACC;EACA;EACA;EACA;;AACA;EACC,OA5gBK;;AA+gBP;EACC;EACA;;AACA;EACC;EACA;;AACA;EACC;;;AAMJ;AAAA;AAAA;AAIA;EACC;EACA;;;AAGD;EACC;EACA;;AACA;EACC;EACA,YA1iBM;EA2iBN;EACA;;AAED;EACC;EACA;;;AAIF;AAAA;AAAA;AAIA;EACC;;AACA;EACC;;;AAIF;EACC;EACA;EACA;;AACA;EACC;EACA;EACA;EACA;EACA;;AACA;EACC;;AAGF;EACC;;AAED;EACC;;;AAIF;AAAA;AAAA;AAIA;EACC;EACA;;;AAGD;EACC;EACA;EACA;EACA;EACA;;;AAGD;EACC,YAtmBU;EAumBV;EACA;;;AAIA;EACC;EACA;;AAED;AAAA;EAEC;EACA;EACA;EACA;EACA;EACA;;AAED;EACC;EACA;EACA;EACA;;;AAIF;AAAA;AAAA;AAIA;EACC;;AACA;EACC;;;AAIF;EACC;;AACA;EACC;EACA;EACA;EACA;EACA;;;AAIF;AAAA;AAAA;AAIA;EACC;EACA;;;AAGD;EACC;;AACA;EACC;EACA;;AAGA;EACC;EACA;EACA;;AAED;EACC;EACA;EACA;;AAED;EACC;EACA;;AAID;EACC;EACA;EACA;EACA;;;AAKH;EACC;EACA;EACA;EACA;;AACA;EACC;;AACA;EACC,OAzsBK;;;AA8sBR;EACC;EACA;EACA;;AACA;EACC;;AACA;EACC;EACA;EACA;EACA;EACA;;;AAKH;AAAA;AAAA;AAAA;AAAA;AAMA;EACC;EACA;EACA;;AACA;EACC;EACA;EACA;EACA;EACA;;AACA;EACC;EACA;EACA;EACA;EACA;EACA;EACA,YArvBK;;;AA0vBR;AAAA;AAAA;AAIA;EACC;;;AAGD;EACC;EACA;;;AAGD;EACC;;AACA;EACC;EACA;EACA;;;AAIF;EACC;;AACA;EACC,OAnxBM;;AAqxBP;EACC;;;AAMA;EACC;;;AAKH;EACC;EACA;;AACA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAED;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAED;EACC;EACA;EACA;EACA;EACA;;AAED;EACC;;;AAIF;AAAA;AAAA;AAIA;EACC;;AACA;EACC;;;AAIF;EACC;;AACA;EACC;;;AAIF;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACC;EACA;EACA;EACA;EACA;;AAED;EACC;EACA;EACA;EACA;;AAED;EACC;EACA;;AACA;EACC;EACA;EACA;EACA;EACA;EACA;;AACA;EACC;EACA;EACA;EACA;EACA,YA93BI;EA+3BJ;EACA;;AAIH;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;AAED;EACC,YA94BM;EA+4BN,cA/4BM;;AAg5BN;AAAA;AAAA;EAGC,OAl5BQ;;AAo5BT;EACC,YAr5BQ;;AAu5BT;EACC;EACA,YAz5BQ;;;AA85BX;EACC;;AAEC;EACC;;AACA;EACC;;;AAMJ;EACC;;AACA;EACC;;;AAIF;AAAA;AAAA;AAIA;EACC;;;AAGD;EACC;;AACA;EACC;;AAED;EACC;EACA;;AAED;EACC;;AACA;EACC;EACA;EACA;EACA;EACA;;AACA;EACC;EACA;EACA;EACA;;AAIH;EACC;;AAED;EACC;;;AAIF;EACC;EACA;EACA;;AACA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA,OAt+BS;EAu+BT;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACC;EACA;EACA;;;AAKH;EACC;;AACA;EACC;EACA;;AAED;EACC;;AACA;EACC;EACA;;AACA;EACC;EACA;;AAED;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA,OA7gCO;EA8gCP,YA/gCI;EAghCJ;;;AAMJ;EACC;;AACA;EACC;EACA;EACA;EACA;EACA;EACA;;AAED;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAKD;EACC;;AACA;EACC;;AAED;EACC;EACA;EACA;;AAID;EACC;EACA,OA1jCQ;EA2jCR;EACA;;AAGF;EACC;EACA,OAjkCS;EAkkCT;EACA;EACA,YArkCM;;;AA0kCP;EACC;EACA;EACA;EACA,OA7kCS;EA8kCT;EACA;EACA;EACA;;;AAIF;AAAA;AAAA;AAIA;EACC;;;AAGD;EACC;;;AAGD;EACC;;AACA;EACC;;AAGA;EACC;EACA;EACA;;AAED;EACC;EACA;;AAED;EACC;EACA;;;AAKH;EACC;;AACA;AAAA;EAEC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,OAnoCS;;AAqoCV;EACC;EACA;EACA;EACA;;;AAIF;EACC;EACA;EACA;;AACA;EACC;EACA;EACA;EACA;EACA;;;AAIF;AAAA;AAAA;AAIA;EACC;IACC;;;AAIF;AAEA;EACC;IACC;;;EAED;IACC;IACA;;;EAELine truncated
|
||||
@@ -1,17 +0,0 @@
|
||||
/*!
|
||||
* VERSION: 1.19.1
|
||||
* DATE: 2017-01-17
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* Includes all of the following: TweenLite, TweenMax, TimelineLite, TimelineMax, EasePack, CSSPlugin, RoundPropsPlugin, BezierPlugin, AttrPlugin, DirectionalRotationPlugin
|
||||
*
|
||||
* @license Copyright (c) 2008-2017, GreenSock. All rights reserved.
|
||||
* This work is subject to the terms at http://greensock.com/standard-license or for
|
||||
* Club GreenSock members, the software agreement that was issued with your membership.
|
||||
*
|
||||
* @author: Jack Doyle, jack@greensock.com
|
||||
**/
|
||||
var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("TweenMax",["core.Animation","core.SimpleTimeline","TweenLite"],function(a,b,c){var d=function(a){var b,c=[],d=a.length;for(b=0;b!==d;c.push(a[b++]));return c},e=function(a,b,c){var d,e,f=a.cycle;for(d in f)e=f[d],a[d]="function"==typeof e?e(c,b[c]):e[c%e.length];delete a.cycle},f=function(a,b,d){c.call(this,a,b,d),this._cycle=0,this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._dirty=!0,this.render=f.prototype.render},g=1e-10,h=c._internals,i=h.isSelector,j=h.isArray,k=f.prototype=c.to({},.1,{}),l=[];f.version="1.19.1",k.constructor=f,k.kill()._gc=!1,f.killTweensOf=f.killDelayedCallsTo=c.killTweensOf,f.getTweensOf=c.getTweensOf,f.lagSmoothing=c.lagSmoothing,f.ticker=c.ticker,f.render=c.render,k.invalidate=function(){return this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),c.prototype.invalidate.call(this)},k.updateTo=function(a,b){var d,e=this.ratio,f=this.vars.immediateRender||a.immediateRender;b&&this._startTime<this._timeline._time&&(this._startTime=this._timeline._time,this._uncache(!1),this._gc?this._enabled(!0,!1):this._timeline.insert(this,this._startTime-this._delay));for(d in a)this.vars[d]=a[d];if(this._initted||f)if(b)this._initted=!1,f&&this.render(0,!0,!0);else if(this._gc&&this._enabled(!0,!1),this._notifyPluginsOfEnabled&&this._firstPT&&c._onPluginEvent("_onDisable",this),this._time/this._duration>.998){var g=this._totalTime;this.render(0,!0,!1),this._initted=!1,this.render(g,!0,!1)}else if(this._initted=!1,this._init(),this._time>0||f)for(var h,i=1/(1-e),j=this._firstPT;j;)h=j.s+j.c,j.c*=i,j.s=h-j.c,j=j._next;return this},k.render=function(a,b,c){this._initted||0===this._duration&&this.vars.repeat&&this.invalidate();var d,e,f,i,j,k,l,m,n=this._dirty?this.totalDuration():this._totalDuration,o=this._time,p=this._totalTime,q=this._cycle,r=this._duration,s=this._rawPrevTime;if(a>=n-1e-7&&a>=0?(this._totalTime=n,this._cycle=this._repeat,this._yoyo&&0!==(1&this._cycle)?(this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0):(this._time=r,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1),this._reversed||(d=!0,e="onComplete",c=c||this._timeline.autoRemoveChildren),0===r&&(this._initted||!this.vars.lazy||c)&&(this._startTime===this._timeline._duration&&(a=0),(0>s||0>=a&&a>=-1e-7||s===g&&"isPause"!==this.data)&&s!==a&&(c=!0,s>g&&(e="onReverseComplete")),this._rawPrevTime=m=!b||a||s===a?a:g)):1e-7>a?(this._totalTime=this._time=this._cycle=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==p||0===r&&s>0)&&(e="onReverseComplete",d=this._reversed),0>a&&(this._active=!1,0===r&&(this._initted||!this.vars.lazy||c)&&(s>=0&&(c=!0),this._rawPrevTime=m=!b||a||s===a?a:g)),this._initted||(c=!0)):(this._totalTime=this._time=a,0!==this._repeat&&(i=r+this._repeatDelay,this._cycle=this._totalTime/i>>0,0!==this._cycle&&this._cycle===this._totalTime/i&&a>=p&&this._cycle--,this._time=this._totalTime-this._cycle*i,this._yoyo&&0!==(1&this._cycle)&&(this._time=r-this._time),this._time>r?this._time=r:this._time<0&&(this._time=0)),this._easeType?(j=this._time/r,k=this._easeType,l=this._easePower,(1===k||3===k&&j>=.5)&&(j=1-j),3===k&&(j*=2),1===l?j*=j:2===l?j*=j*j:3===l?j*=j*j*j:4===l&&(j*=j*j*j*j),1===k?this.ratio=1-j:2===k?this.ratio=j:this._time/r<.5?this.ratio=j/2:this.ratio=1-j/2):this.ratio=this._ease.getRatio(this._time/r)),o===this._time&&!c&&q===this._cycle)return void(p!==this._totalTime&&this._onUpdate&&(b||this._callback("onUpdate")));if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!c&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=o,this._totalTime=p,this._rawPrevTime=s,this._cycle=q,h.lazyTweens.push(this),void(this._lazy=[a,b]);this._time&&!d?this.ratio=this._ease.getRatio(this._time/r):d&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==o&&a>=0&&(this._active=!0),0===p&&(2===this._initted&&a>0&&this._init(),this._startAt&&(a>=0?this._startAt.render(a,b,c):e||(e="_dummyGS")),this.vars.onStart&&(0!==this._totalTime||0===r)&&(b||this._callback("onStart"))),f=this._firstPT;f;)f.f?f.t[f.p](f.c*this.ratio+f.s):f.t[f.p]=f.c*this.ratio+f.s,f=f._next;this._onUpdate&&(0>a&&this._startAt&&this._startTime&&this._startAt.render(a,b,c),b||(this._totalTime!==p||e)&&this._callback("onUpdate")),this._cycle!==q&&(b||this._gc||this.vars.onRepeat&&this._callback("onRepeat")),e&&(!this._gc||c)&&(0>a&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(a,b,c),d&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[e]&&this._callback(e),0==Line truncated
|
||||
h=m.c-f,i=m.b-f,d=e=0,k=1;c>=k;k++)j=o*k,l=1-j,d=e-(e=(j*j*g+3*l*(j*h+l*i))*j),n=p*c+k-1,b[n]=(b[n]||0)+d*d},o=function(a,b){b=b>>0||6;var c,d,e,f,g=[],h=[],i=0,j=0,k=b-1,l=[],m=[];for(c in a)n(a[c],g,b);for(e=g.length,d=0;e>d;d++)i+=Math.sqrt(g[d]),f=d%b,m[f]=i,f===k&&(j+=i,f=d/b>>0,l[f]=m,h[f]=j,i=0,m=[]);return{length:j,lengths:h,segments:l}},p=_gsScope._gsDefine.plugin({propName:"bezier",priority:-1,version:"1.3.7",API:2,global:!0,init:function(a,b,c){this._target=a,b instanceof Array&&(b={values:b}),this._func={},this._mod={},this._props=[],this._timeRes=null==b.timeResolution?6:parseInt(b.timeResolution,10);var d,e,f,g,h,i=b.values||[],j={},k=i[0],n=b.autoRotate||c.vars.orientToBezier;this._autoRotate=n?n instanceof Array?n:[["x","y","rotation",n===!0?0:Number(n)||0]]:null;for(d in k)this._props.push(d);for(f=this._props.length;--f>-1;)d=this._props[f],this._overwriteProps.push(d),e=this._func[d]="function"==typeof a[d],j[d]=e?a[d.indexOf("set")||"function"!=typeof a["get"+d.substr(3)]?d:"get"+d.substr(3)]():parseFloat(a[d]),h||j[d]!==i[0][d]&&(h=j);if(this._beziers="cubic"!==b.type&&"quadratic"!==b.type&&"soft"!==b.type?l(i,isNaN(b.curviness)?1:b.curviness,!1,"thruBasic"===b.type,b.correlate,h):m(i,b.type,j),this._segCount=this._beziers[d].length,this._timeRes){var p=o(this._beziers,this._timeRes);this._length=p.length,this._lengths=p.lengths,this._segments=p.segments,this._l1=this._li=this._s1=this._si=0,this._l2=this._lengths[0],this._curSeg=this._segments[0],this._s2=this._curSeg[0],this._prec=1/this._curSeg.length}if(n=this._autoRotate)for(this._initialRotations=[],n[0]instanceof Array||(this._autoRotate=n=[n]),f=n.length;--f>-1;){for(g=0;3>g;g++)d=n[f][g],this._func[d]="function"==typeof a[d]?a[d.indexOf("set")||"function"!=typeof a["get"+d.substr(3)]?d:"get"+d.substr(3)]:!1;d=n[f][2],this._initialRotations[f]=(this._func[d]?this._func[d].call(this._target):this._target[d])||0,this._overwriteProps.push(d)}return this._startRatio=c.vars.runBackwards?1:0,!0},set:function(b){var c,d,e,f,g,h,i,j,k,l,m=this._segCount,n=this._func,o=this._target,p=b!==this._startRatio;if(this._timeRes){if(k=this._lengths,l=this._curSeg,b*=this._length,e=this._li,b>this._l2&&m-1>e){for(j=m-1;j>e&&(this._l2=k[++e])<=b;);this._l1=k[e-1],this._li=e,this._curSeg=l=this._segments[e],this._s2=l[this._s1=this._si=0]}else if(b<this._l1&&e>0){for(;e>0&&(this._l1=k[--e])>=b;);0===e&&b<this._l1?this._l1=0:e++,this._l2=k[e],this._li=e,this._curSeg=l=this._segments[e],this._s1=l[(this._si=l.length-1)-1]||0,this._s2=l[this._si]}if(c=e,b-=this._l1,e=this._si,b>this._s2&&e<l.length-1){for(j=l.length-1;j>e&&(this._s2=l[++e])<=b;);this._s1=l[e-1],this._si=e}else if(b<this._s1&&e>0){for(;e>0&&(this._s1=l[--e])>=b;);0===e&&b<this._s1?this._s1=0:e++,this._s2=l[e],this._si=e}h=(e+(b-this._s1)/(this._s2-this._s1))*this._prec||0}else c=0>b?0:b>=1?m-1:m*b>>0,h=(b-c*(1/m))*m;for(d=1-h,e=this._props.length;--e>-1;)f=this._props[e],g=this._beziers[f][c],i=(h*h*g.da+3*d*(h*g.ca+d*g.ba))*h+g.a,this._mod[f]&&(i=this._mod[f](i,o)),n[f]?o[f](i):o[f]=i;if(this._autoRotate){var q,r,s,t,u,v,w,x=this._autoRotate;for(e=x.length;--e>-1;)f=x[e][2],v=x[e][3]||0,w=x[e][4]===!0?1:a,g=this._beziers[x[e][0]],q=this._beziers[x[e][1]],g&&q&&(g=g[c],q=q[c],r=g.a+(g.b-g.a)*h,t=g.b+(g.c-g.b)*h,r+=(t-r)*h,t+=(g.c+(g.d-g.c)*h-t)*h,s=q.a+(q.b-q.a)*h,u=q.b+(q.c-q.b)*h,s+=(u-s)*h,u+=(q.c+(q.d-q.c)*h-u)*h,i=p?Math.atan2(u-s,t-r)*w+v:this._initialRotations[e],this._mod[f]&&(i=this._mod[f](i,o)),n[f]?o[f](i):o[f]=i)}}}),q=p.prototype;p.bezierThrough=l,p.cubicToQuadratic=i,p._autoCSS=!0,p.quadraticToCubic=function(a,b,c){return new g(a,(2*b+a)/3,(2*b+c)/3,c)},p._cssRegister=function(){var a=f.CSSPlugin;if(a){var b=a._internals,c=b._parseToProxy,d=b._setPluginRatio,e=b.CSSPropTween;b._registerComplexSpecialProp("bezier",{parser:function(a,b,f,g,h,i){b instanceof Array&&(b={values:b}),i=new p;var j,k,l,m=b.values,n=m.length-1,o=[],q={};if(0>n)return h;for(j=0;n>=j;j++)l=c(a,m[j],g,h,i,n!==j),o[j]=l.end;for(k in b)q[k]=b[k];return q.values=o,h=new e(a,"bezier",0,0,l.pt,2),h.data=l,h.plugin=i,h.setRatio=d,0===q.autoRotate&&(q.autoRotate=!0),!q.autoRotate||q.autoRotate instanceof Array||(j=q.autoRotate===!0?0:Number(q.autoRotate),q.autoRotate=null!=l.end.left?[["left","top","rotation",j,!1]]:null!=l.end.x?[["x","y","rotation",j,!1]]:!1),q.autoRotate&&(g._transform||g._enableTransforms(!1),l.autoRotate=g._target._gsTransform,l.proxy.rotation=l.autoRotate.rotation||0,g._overwriteProps.push("rotation")),i._onInitTween(l.proxy,q,g._tween),h}})}},q._mod=function(a){for(var b,c=this._overwriteProps,d=c.length;--d>-1;)b=a[c[d]],b&&"function"==typeof b&&(this._mod[c[d]]=b)},q._kill=function(a){var b,c,d=this._props;for(b in this._beziers)if(b in a)for(delete this._beziers[b],delete this._func[b],c=d.length;--c>-1;)d[c]===b&&d.splice(c,1);if(d=this._autoRotate)for(c=d.length;--c>-1;)a[d[c][2]]&&d.splice(c,1);return this._super._kill.call(this,a)}}(),_gsScope._gsDefine("plugins.CSSPlugin",[Line truncated
|
||||
yPercent:ja(A.yPercent,D.yPercent),perspective:ja(A.transformPerspective,D.perspective)},p=A.directionalRotation,null!=p)if("object"==typeof p)for(m in p)A[m]=p[m];else A.rotation=p;"string"==typeof A.x&&-1!==A.x.indexOf("%")&&(l.x=0,l.xPercent=ja(A.x,D.xPercent)),"string"==typeof A.y&&-1!==A.y.indexOf("%")&&(l.y=0,l.yPercent=ja(A.y,D.yPercent)),l.rotation=ka("rotation"in A?A.rotation:"shortRotation"in A?A.shortRotation+"_short":"rotationZ"in A?A.rotationZ:D.rotation,D.rotation,"rotation",B),Fa&&(l.rotationX=ka("rotationX"in A?A.rotationX:"shortRotationX"in A?A.shortRotationX+"_short":D.rotationX||0,D.rotationX,"rotationX",B),l.rotationY=ka("rotationY"in A?A.rotationY:"shortRotationY"in A?A.shortRotationY+"_short":D.rotationY||0,D.rotationY,"rotationY",B)),l.skewX=ka(A.skewX,D.skewX),l.skewY=ka(A.skewY,D.skewY)}for(Fa&&null!=A.force3D&&(D.force3D=A.force3D,o=!0),D.skewType=A.skewType||D.skewType||g.defaultSkewType,n=D.force3D||D.z||D.rotationX||D.rotationY||l.z||l.rotationX||l.rotationY||l.perspective,n||null==A.scale||(l.scaleZ=1);--z>-1;)v=Ba[z],E=l[v]-D[v],(E>y||-y>E||null!=A[v]||null!=M[v])&&(o=!0,f=new ta(D,v,D[v],E,f),v in B&&(f.e=B[v]),f.xs0=0,f.plugin=h,d._overwriteProps.push(f.n));return E=A.transformOrigin,D.svg&&(E||A.svgOrigin)&&(s=D.xOffset,t=D.yOffset,La(a,ha(E),l,A.svgOrigin,A.smoothOrigin),f=ua(D,"xOrigin",(w?D:l).xOrigin,l.xOrigin,f,C),f=ua(D,"yOrigin",(w?D:l).yOrigin,l.yOrigin,f,C),(s!==D.xOffset||t!==D.yOffset)&&(f=ua(D,"xOffset",w?s:D.xOffset,D.xOffset,f,C),f=ua(D,"yOffset",w?t:D.yOffset,D.yOffset,f,C)),E="0px 0px"),(E||Fa&&n&&D.zOrigin)&&(Ca?(o=!0,v=Ea,E=(E||_(a,v,e,!1,"50% 50%"))+"",f=new ta(x,v,0,0,f,-1,C),f.b=x[v],f.plugin=h,Fa?(m=D.zOrigin,E=E.split(" "),D.zOrigin=(E.length>2&&(0===m||"0px"!==E[2])?parseFloat(E[2]):m)||0,f.xs0=f.e=E[0]+" "+(E[1]||"50%")+" 0px",f=new ta(D,"zOrigin",0,0,f,-1,f.n),f.b=m,f.xs0=f.e=D.zOrigin):f.xs0=f.e=E):ha(E+"",D)),o&&(d._transformType=D.svg&&Aa||!n&&3!==this._transformType?2:3),j&&(i[c]=j),k&&(i.scale=k),f},prefix:!0}),ya("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),ya("borderRadius",{defaultValue:"0px",parser:function(a,b,c,f,g,h){b=this.format(b);var i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],z=a.style;for(q=parseFloat(a.offsetWidth),r=parseFloat(a.offsetHeight),i=b.split(" "),j=0;j<y.length;j++)this.p.indexOf("border")&&(y[j]=Z(y[j])),m=l=_(a,y[j],e,!1,"0px"),-1!==m.indexOf(" ")&&(l=m.split(" "),m=l[0],l=l[1]),n=k=i[j],o=parseFloat(m),t=m.substr((o+"").length),u="="===n.charAt(1),u?(p=parseInt(n.charAt(0)+"1",10),n=n.substr(2),p*=parseFloat(n),s=n.substr((p+"").length-(0>p?1:0))||""):(p=parseFloat(n),s=n.substr((p+"").length)),""===s&&(s=d[c]||t),s!==t&&(v=aa(a,"borderLeft",o,t),w=aa(a,"borderTop",o,t),"%"===s?(m=v/q*100+"%",l=w/r*100+"%"):"em"===s?(x=aa(a,"borderLeft",1,"em"),m=v/x+"em",l=w/x+"em"):(m=v+"px",l=w+"px"),u&&(n=parseFloat(m)+p+s,k=parseFloat(l)+p+s)),g=va(z,y[j],m+" "+l,n+" "+k,!1,"0px",g);return g},prefix:!0,formatter:qa("0px 0px 0px 0px",!1,!0)}),ya("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius",{defaultValue:"0px",parser:function(a,b,c,d,f,g){return va(a.style,c,this.format(_(a,c,e,!1,"0px 0px")),this.format(b),!1,"0px",f)},prefix:!0,formatter:qa("0px 0px",!1,!0)}),ya("backgroundPosition",{defaultValue:"0 0",parser:function(a,b,c,d,f,g){var h,i,j,k,l,m,n="background-position",o=e||$(a,null),q=this.format((o?p?o.getPropertyValue(n+"-x")+" "+o.getPropertyValue(n+"-y"):o.getPropertyValue(n):a.currentStyle.backgroundPositionX+" "+a.currentStyle.backgroundPositionY)||"0 0"),r=this.format(b);if(-1!==q.indexOf("%")!=(-1!==r.indexOf("%"))&&r.split(",").length<2&&(m=_(a,"backgroundImage").replace(D,""),m&&"none"!==m)){for(h=q.split(" "),i=r.split(" "),R.setAttribute("src",m),j=2;--j>-1;)q=h[j],k=-1!==q.indexOf("%"),k!==(-1!==i[j].indexOf("%"))&&(l=0===j?a.offsetWidth-R.width:a.offsetHeight-R.height,h[j]=k?parseFloat(q)/100*l+"px":parseFloat(q)/l*100+"%");q=h.join(" ")}return this.parseComplex(a.style,q,r,f,g)},formatter:ha}),ya("backgroundSize",{defaultValue:"0 0",formatter:function(a){return a+="",ha(-1===a.indexOf(" ")?a+" "+a:a)}}),ya("perspective",{defaultValue:"0px",prefix:!0}),ya("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),ya("transformStyle",{prefix:!0}),ya("backfaceVisibility",{prefix:!0}),ya("userSelect",{prefix:!0}),ya("margin",{parser:ra("marginTop,marginRight,marginBottom,marginLeft")}),ya("padding",{parser:ra("paddingTop,paddingRight,paddingBottom,paddingLeft")}),ya("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(a,b,c,d,f,g){var h,i,j;return 9>p?(i=a.currentStyle,j=8>p?" ":",",h="rect("+i.clipTop+j+i.clipRight+j+i.clipBottom+j+i.clipLeft+")",b=this.format(b).split(",").join(j)):(h=this.format(_(a,this.p,e,!1,this.dflt)),b=this.format(b)),this.parseComplex(a.style,h,b,f,g)}}),ya("textShadow",{defaultValue:"0px 0px 0px #999"Line truncated
|
||||
if(D.call(this,c,d),this.render=G.prototype.render,null==b)throw"Cannot tween a null target.";this.target=b="string"!=typeof b?b:G.selector(b)||b;var e,f,g,h=b.jquery||b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType),i=this.vars.overwrite;if(this._overwrite=i=null==i?U[G.defaultOverwrite]:"number"==typeof i?i>>0:U[i],(h||b instanceof Array||b.push&&p(b))&&"number"!=typeof b[0])for(this._targets=g=n(b),this._propLookup=[],this._siblings=[],e=0;e<g.length;e++)f=g[e],f?"string"!=typeof f?f.length&&f!==a&&f[0]&&(f[0]===a||f[0].nodeType&&f[0].style&&!f.nodeType)?(g.splice(e--,1),this._targets=g=g.concat(n(f))):(this._siblings[e]=Z(f,this,!1),1===i&&this._siblings[e].length>1&&_(f,this,null,1,this._siblings[e])):(f=g[e--]=G.selector(f),"string"==typeof f&&g.splice(e+1,1)):g.splice(e--,1);else this._propLookup={},this._siblings=Z(b,this,!1),1===i&&this._siblings.length>1&&_(b,this,null,1,this._siblings);(this.vars.immediateRender||0===c&&0===this._delay&&this.vars.immediateRender!==!1)&&(this._time=-m,this.render(Math.min(0,-this._delay)))},!0),H=function(b){return b&&b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType)},I=function(a,b){var c,d={};for(c in a)T[c]||c in b&&"transform"!==c&&"x"!==c&&"y"!==c&&"width"!==c&&"height"!==c&&"className"!==c&&"border"!==c||!(!Q[c]||Q[c]&&Q[c]._autoCSS)||(d[c]=a[c],delete a[c]);a.css=d};h=G.prototype=new D,h.constructor=G,h.kill()._gc=!1,h.ratio=0,h._firstPT=h._targets=h._overwrittenProps=h._startAt=null,h._notifyPluginsOfEnabled=h._lazy=!1,G.version="1.19.1",G.defaultEase=h._ease=new v(null,null,1,1),G.defaultOverwrite="auto",G.ticker=i,G.autoSleep=120,G.lagSmoothing=function(a,b){i.lagSmoothing(a,b)},G.selector=a.$||a.jQuery||function(b){var c=a.$||a.jQuery;return c?(G.selector=c,c(b)):"undefined"==typeof d?b:d.querySelectorAll?d.querySelectorAll(b):d.getElementById("#"===b.charAt(0)?b.substr(1):b)};var J=[],K={},L=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,M=function(a){for(var b,c=this._firstPT,d=1e-6;c;)b=c.blob?1===a?this.end:a?this.join(""):this.start:c.c*a+c.s,c.m?b=c.m(b,this._target||c.t):d>b&&b>-d&&!c.blob&&(b=0),c.f?c.fp?c.t[c.p](c.fp,b):c.t[c.p](b):c.t[c.p]=b,c=c._next},N=function(a,b,c,d){var e,f,g,h,i,j,k,l=[],m=0,n="",o=0;for(l.start=a,l.end=b,a=l[0]=a+"",b=l[1]=b+"",c&&(c(l),a=l[0],b=l[1]),l.length=0,e=a.match(L)||[],f=b.match(L)||[],d&&(d._next=null,d.blob=1,l._firstPT=l._applyPT=d),i=f.length,h=0;i>h;h++)k=f[h],j=b.substr(m,b.indexOf(k,m)-m),n+=j||!h?j:",",m+=j.length,o?o=(o+1)%5:"rgba("===j.substr(-5)&&(o=1),k===e[h]||e.length<=h?n+=k:(n&&(l.push(n),n=""),g=parseFloat(e[h]),l.push(g),l._firstPT={_next:l._firstPT,t:l,p:l.length-1,s:g,c:("="===k.charAt(1)?parseInt(k.charAt(0)+"1",10)*parseFloat(k.substr(2)):parseFloat(k)-g)||0,f:0,m:o&&4>o?Math.round:0}),m+=k.length;return n+=b.substr(m),n&&l.push(n),l.setRatio=M,l},O=function(a,b,c,d,e,f,g,h,i){"function"==typeof d&&(d=d(i||0,a));var j,k=typeof a[b],l="function"!==k?"":b.indexOf("set")||"function"!=typeof a["get"+b.substr(3)]?b:"get"+b.substr(3),m="get"!==c?c:l?g?a[l](g):a[l]():a[b],n="string"==typeof d&&"="===d.charAt(1),o={t:a,p:b,s:m,f:"function"===k,pg:0,n:e||b,m:f?"function"==typeof f?f:Math.round:0,pr:0,c:n?parseInt(d.charAt(0)+"1",10)*parseFloat(d.substr(2)):parseFloat(d)-m||0};return("number"!=typeof m||"number"!=typeof d&&!n)&&(g||isNaN(m)||!n&&isNaN(d)||"boolean"==typeof m||"boolean"==typeof d?(o.fp=g,j=N(m,n?o.s+o.c:d,h||G.defaultStringFilter,o),o={t:j,p:"setRatio",s:0,c:1,f:2,pg:0,n:e||b,pr:0,m:0}):(o.s=parseFloat(m),n||(o.c=parseFloat(d)-o.s||0))),o.c?((o._next=this._firstPT)&&(o._next._prev=o),this._firstPT=o,o):void 0},P=G._internals={isArray:p,isSelector:H,lazyTweens:J,blobDif:N},Q=G._plugins={},R=P.tweenLookup={},S=0,T=P.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1,id:1},U={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,"true":1,"false":0},V=D._rootFramesTimeline=new F,W=D._rootTimeline=new F,X=30,Y=P.lazyRender=function(){var a,b=J.length;for(K={};--b>-1;)a=J[b],a&&a._lazy!==!1&&(a.render(a._lazy[0],a._lazy[1],!0),a._lazy=!1);J.length=0};W._startTime=i.time,V._startTime=i.frame,W._active=V._active=!0,setTimeout(Y,1),D._updateRoot=G.render=function(){var a,b,c;if(J.length&&Y(),W.render((i.time-W._startTime)*W._timeScale,!1,!1),V.render((i.frame-V._startTime)*V._timeScale,!1,!1),J.length&&Y(),i.frame>=X){X=i.frame+(parseInt(G.autoSleep,10)||120);for(c in R){for(b=R[c].tweens,a=b.length;--a>-1;)b[a]._gc&&b.splice(a,1);0===b.length&&delete R[c]}if(c=W._first,(!c||c._paused)&&G.autoSleep&&!V._first&&1==Line truncated
|
||||
@@ -1,7 +0,0 @@
|
||||
/*!
|
||||
* Bootstrap v4.3.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e((t=t||self).bootstrap={},t.jQuery,t.Popper)}(this,function(t,g,u){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function s(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function l(o){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},e=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),e.forEach(function(t){var e,n,i;e=o,i=r[n=t],n in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i})}return o}g=g&&g.hasOwnProperty("default")?g.default:g,u=u&&u.hasOwnProperty("default")?u.default:u;var e="transitionend";function n(t){var e=this,n=!1;return g(this).one(_.TRANSITION_END,function(){n=!0}),setTimeout(function(){n||_.triggerTransitionEnd(e)},t),this}var _={TRANSITION_END:"bsTransitionEnd",getUID:function(t){for(;t+=~~(1e6*Math.random()),document.getElementById(t););return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");if(!e||"#"===e){var n=t.getAttribute("href");e=n&&"#"!==n?n.trim():""}try{return document.querySelector(e)?e:null}catch(t){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;var e=g(t).css("transition-duration"),n=g(t).css("transition-delay"),i=parseFloat(e),o=parseFloat(n);return i||o?(e=e.split(",")[0],n=n.split(",")[0],1e3*(parseFloat(e)+parseFloat(n))):0},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){g(t).trigger(e)},supportsTransitionEnd:function(){return Boolean(e)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var o=n[i],r=e[i],s=r&&_.isElement(r)?"element":(a=r,{}.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase());if(!new RegExp(o).test(s))throw new Error(t.toUpperCase()+': Option "'+i+'" provided type "'+s+'" but expected type "'+o+'".')}var a},findShadowRoot:function(t){if(!document.documentElement.attachShadow)return null;if("function"!=typeof t.getRootNode)return t instanceof ShadowRoot?t:t.parentNode?_.findShadowRoot(t.parentNode):null;var e=t.getRootNode();return e instanceof ShadowRoot?e:null}};g.fn.emulateTransitionEnd=n,g.event.special[_.TRANSITION_END]={bindType:e,delegateType:e,handle:function(t){if(g(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};var o="alert",r="bs.alert",a="."+r,c=g.fn[o],h={CLOSE:"close"+a,CLOSED:"closed"+a,CLICK_DATA_API:"click"+a+".data-api"},f="alert",d="fade",m="show",p=function(){function i(t){this._element=t}var t=i.prototype;return t.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},t.dispose=function(){g.removeData(this._element,r),this._element=null},t._getRootElement=function(t){var e=_.getSelectorFromElement(t),n=!1;return e&&(n=document.querySelector(e)),n||(n=g(t).closest("."+f)[0]),n},t._triggerCloseEvent=function(t){var e=g.Event(h.CLOSE);return g(t).trigger(e),e},t._removeElement=function(e){var n=this;if(g(e).removeClass(m),g(e).hasClass(d)){var t=_.getTransitionDurationFromElement(e);g(e).one(_.TRANSITION_END,function(t){return n._destroyElement(e,t)}).emulateTransitionEnd(t)}else this._destroyElement(e)},t._destroyElement=function(t){g(t).detach().trigger(h.CLOSED).remove()},i._jQueryInterface=function(n){return this.each(function(){var t=g(this),e=t.data(r);e||(e=new i(this),t.data(r,e)),"close"===n&&e[n](this)})},i._handleDismiss=function(e){return function(t){t&&t.preventDefault(),e.close(this)}},s(i,null,[{key:"VERSION",get:function(){return"4.3.1"}}]),i}();g(document).on(h.CLICK_DATA_API,'[data-dismiss="alert"]',p._handleDismiss(new p)),g.fn[o]=p._jQueryInterface,g.fn[o].Constructor=p,g.fn[o].noConflict=function(){return g.fn[o]=c,p._jQueryInterface};var v="button",y="bs.button",E="."+y,C=".data-api",T=g.fn[v],S="active",b="btn",I="focus",D='[data-toggle^="button"]',w='[data-toggle="buttons"]',A='input:not([type="hidden"])',N=".active",O=".btn",k={CLICK_DATA_API:"click"+E+C,FOCUS_BLUR_DATA_API:"focus"+E+C+" blur"+E+C},P=function(){function n(t){this._element=t}var t=n.prototype;return t.toggle=function(){var t=!0,e=!0,n=g(this._element).closest(w)[0];if(n){var i=this._element.querySelector(A);if(i){if("radio"===i.type)if(i.checked&&this._element.classList.contains(S))t=!1;else{var o=n.querySelector(N);o&&g(o).removeClass(S)}if(t){if(i.hasAttribute("disabled")||n.hasAttribute("disabled")||i.classList.contains("disabled")||n.classList.contains("disabled"))return;i.checked=!this._element.classList.contains(S),g(i).trigger("chLine truncated
|
||||
//# sourceMappingURL=bootstrap.min.js.map
|
||||
@@ -1,10 +0,0 @@
|
||||
/**
|
||||
* jquery-circle-progress - jQuery Plugin to draw animated circular progress bars:
|
||||
* {@link http://kottenator.github.io/jquery-circle-progress/}
|
||||
*
|
||||
* @author Rostyslav Bryzgunov <kottenator@gmail.com>
|
||||
* @version 1.2.2
|
||||
* @licence MIT
|
||||
* @preserve
|
||||
*/
|
||||
!function(i){if("function"==typeof define&&define.amd)define(["jquery"],i);else if("object"==typeof module&&module.exports){var t=require("jquery");i(t),module.exports=t}else i(jQuery)}(function(i){function t(i){this.init(i)}t.prototype={value:0,size:100,startAngle:-Math.PI,thickness:"auto",fill:{gradient:["#3aeabb","#fdd250"]},emptyFill:"rgba(0, 0, 0, .1)",animation:{duration:1200,easing:"circleProgressEasing"},animationStartValue:0,reverse:!1,lineCap:"butt",insertMode:"prepend",constructor:t,el:null,canvas:null,ctx:null,radius:0,arcFill:null,lastFrameValue:0,init:function(t){i.extend(this,t),this.radius=this.size/2,this.initWidget(),this.initFill(),this.draw(),this.el.trigger("circle-inited")},initWidget:function(){this.canvas||(this.canvas=i("<canvas>")["prepend"==this.insertMode?"prependTo":"appendTo"](this.el)[0]);var t=this.canvas;if(t.width=this.size,t.height=this.size,this.ctx=t.getContext("2d"),window.devicePixelRatio>1){var e=window.devicePixelRatio;t.style.width=t.style.height=this.size+"px",t.width=t.height=this.size*e,this.ctx.scale(e,e)}},initFill:function(){function t(){var t=i("<canvas>")[0];t.width=e.size,t.height=e.size,t.getContext("2d").drawImage(g,0,0,r,r),e.arcFill=e.ctx.createPattern(t,"no-repeat"),e.drawFrame(e.lastFrameValue)}var e=this,a=this.fill,n=this.ctx,r=this.size;if(!a)throw Error("The fill is not specified!");if("string"==typeof a&&(a={color:a}),a.color&&(this.arcFill=a.color),a.gradient){var s=a.gradient;if(1==s.length)this.arcFill=s[0];else if(s.length>1){for(var l=a.gradientAngle||0,o=a.gradientDirection||[r/2*(1-Math.cos(l)),r/2*(1+Math.sin(l)),r/2*(1+Math.cos(l)),r/2*(1-Math.sin(l))],h=n.createLinearGradient.apply(n,o),c=0;c<s.length;c++){var d=s[c],u=c/(s.length-1);i.isArray(d)&&(u=d[1],d=d[0]),h.addColorStop(u,d)}this.arcFill=h}}if(a.image){var g;a.image instanceof Image?g=a.image:(g=new Image,g.src=a.image),g.complete?t():g.onload=t}},draw:function(){this.animation?this.drawAnimated(this.value):this.drawFrame(this.value)},drawFrame:function(i){this.lastFrameValue=i,this.ctx.clearRect(0,0,this.size,this.size),this.drawEmptyArc(i),this.drawArc(i)},drawArc:function(i){if(0!==i){var t=this.ctx,e=this.radius,a=this.getThickness(),n=this.startAngle;t.save(),t.beginPath(),this.reverse?t.arc(e,e,e-a/2,n-2*Math.PI*i,n):t.arc(e,e,e-a/2,n,n+2*Math.PI*i),t.lineWidth=a,t.lineCap=this.lineCap,t.strokeStyle=this.arcFill,t.stroke(),t.restore()}},drawEmptyArc:function(i){var t=this.ctx,e=this.radius,a=this.getThickness(),n=this.startAngle;i<1&&(t.save(),t.beginPath(),i<=0?t.arc(e,e,e-a/2,0,2*Math.PI):this.reverse?t.arc(e,e,e-a/2,n,n-2*Math.PI*i):t.arc(e,e,e-a/2,n+2*Math.PI*i,n),t.lineWidth=a,t.strokeStyle=this.emptyFill,t.stroke(),t.restore())},drawAnimated:function(t){var e=this,a=this.el,n=i(this.canvas);n.stop(!0,!1),a.trigger("circle-animation-start"),n.css({animationProgress:0}).animate({animationProgress:1},i.extend({},this.animation,{step:function(i){var n=e.animationStartValue*(1-i)+t*i;e.drawFrame(n),a.trigger("circle-animation-progress",[i,n])}})).promise().always(function(){a.trigger("circle-animation-end")})},getThickness:function(){return i.isNumeric(this.thickness)?this.thickness:this.size/14},getValue:function(){return this.value},setValue:function(i){this.animation&&(this.animationStartValue=this.lastFrameValue),this.value=i,this.draw()}},i.circleProgress={defaults:t.prototype},i.easing.circleProgressEasing=function(i){return i<.5?(i=2*i,.5*i*i*i):(i=2-2*i,1-.5*i*i*i)},i.fn.circleProgress=function(e,a){var n="circle-progress",r=this.data(n);if("widget"==e){if(!r)throw Error('Calling "widget" method on not initialized instance is forbidden');return r.canvas}if("value"==e){if(!r)throw Error('Calling "value" method on not initialized instance is forbidden');if("undefined"==typeof a)return r.getValue();var s=arguments[1];return this.each(function(){i(this).data(n).setValue(s)})}return this.each(function(){var a=i(this),r=a.data(n),s=i.isPlainObject(e)?e:{};if(r)r.init(s);else{var l=i.extend({},a.data());"string"==typeof l.fill&&(l.fill=JSON.parse(l.fill)),"string"==typeof l.animation&&(l.animation=JSON.parse(l.animation)),s=i.extend(l,s),s.el=a,r=new t(s),a.data(n,r)}})}});
|
||||
@@ -1,12 +0,0 @@
|
||||
/*!
|
||||
* fullPage 3.0.5
|
||||
* https://github.com/alvarotrigo/fullPage.js
|
||||
*
|
||||
* @license GPLv3 for open source use only
|
||||
* or Fullpage Commercial License for commercial use
|
||||
* http://alvarotrigo.com/fullPage/pricing/
|
||||
*
|
||||
* Copyright (C) 2018 http://alvarotrigo.com/fullPage - A project by Alvaro Trigo
|
||||
*/
|
||||
!function(e,t,n,o,r){"function"==typeof define&&define.amd?define(function(){return e.fullpage=o(t,n),e.fullpage}):"object"==typeof exports?module.exports=o(t,n):t.fullpage=o(t,n)}(this,window,document,function(Lt,xt){"use strict";var At="fullpage-wrapper",Tt="."+At,kt="fp-responsive",Mt="fp-notransition",Ot="fp-destroyed",Ct="fp-enabled",Ht="fp-viewing",It="active",Bt="."+It,Rt="fp-completely",zt="fp-section",jt="."+zt,Nt=jt+Bt,Pt="fp-tableCell",Dt="."+Pt,Vt="fp-auto-height",Wt="fp-normal-scroll",Yt="fp-nav",Ft="#"+Yt,Ut="fp-tooltip",Xt="fp-slide",_t="."+Xt,Kt=_t+Bt,$t="fp-slides",qt="."+$t,Qt="fp-slidesContainer",Gt="."+Qt,Jt="fp-table",Zt="fp-slidesNav",en="."+Zt,tn=en+" a",e="fp-controlArrow",nn="."+e,on="fp-prev",rn=nn+".fp-prev",ln=nn+".fp-next";function an(e,t){Lt.console&&Lt.console[e]&&Lt.console[e]("fullPage: "+t)}function sn(e,t){return(t=1<arguments.length?t:xt)?t.querySelectorAll(e):null}function cn(e){e=e||{};for(var t=1,n=arguments.length;t<n;++t){var o=arguments[t];if(o)for(var r in o)o.hasOwnProperty(r)&&("[object Object]"!==Object.prototype.toString.call(o[r])?e[r]=o[r]:e[r]=cn(e[r],o[r]))}return e}function un(e,t){return null!=e&&(e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className))}function fn(){return"innerHeight"in Lt?Lt.innerHeight:xt.documentElement.offsetHeight}function dn(e,t){var n;for(n in e=l(e),t)if(t.hasOwnProperty(n)&&null!==n)for(var o=0;o<e.length;o++){e[o].style[n]=t[n]}return e}function n(e,t,n){for(var o=e[n];o&&!zn(o,t);)o=o[n];return o}function vn(e,t){return n(e,t,"previousElementSibling")}function pn(e,t){return n(e,t,"nextElementSibling")}function hn(e){return e.previousElementSibling}function gn(e){return e.nextElementSibling}function mn(e){return e[e.length-1]}function Sn(e,t){e=i(e)?e[0]:e;for(var n=null!=t?sn(t,e.parentNode):e.parentNode.childNodes,o=0,r=0;r<n.length;r++){if(n[r]==e)return o;1==n[r].nodeType&&o++}return-1}function l(e){return i(e)?e:[e]}function bn(e){e=l(e);for(var t=0;t<e.length;t++)e[t].style.display="none";return e}function wn(e){e=l(e);for(var t=0;t<e.length;t++)e[t].style.display="block";return e}function i(e){return"[object Array]"===Object.prototype.toString.call(e)||"[object NodeList]"===Object.prototype.toString.call(e)}function yn(e,t){e=l(e);for(var n=0;n<e.length;n++){var o=e[n];o.classList?o.classList.add(t):o.className+=" "+t}return e}function En(e,t){e=l(e);for(var n=t.split(" "),o=0;o<n.length;o++){t=n[o];for(var r=0;r<e.length;r++){var i=e[r];i.classList?i.classList.remove(t):i.className=i.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}}return e}function Ln(e,t){t.appendChild(e)}function o(e,t,n){var o;t=t||xt.createElement("div");for(var r=0;r<e.length;r++){var i=e[r];(n&&!r||!n)&&(o=t.cloneNode(!0),i.parentNode.insertBefore(o,i)),o.appendChild(i)}return e}function xn(e,t){o(e,t,!0)}function An(e,t){for("string"==typeof t&&(t=Nn(t)),e.appendChild(t);e.firstChild!==t;)t.appendChild(e.firstChild)}function Tn(e){for(var t=xt.createDocumentFragment();e.firstChild;)t.appendChild(e.firstChild);e.parentNode.replaceChild(t,e)}function kn(e,t){return e&&1===e.nodeType?zn(e,t)?e:kn(e.parentNode,t):null}function Mn(e,t){r(e,e.nextSibling,t)}function On(e,t){r(e,e,t)}function r(e,t,n){i(n)||("string"==typeof n&&(n=Nn(n)),n=[n]);for(var o=0;o<n.length;o++)e.parentNode.insertBefore(n[o],t)}function Cn(){var e=xt.documentElement;return(Lt.pageYOffset||e.scrollTop)-(e.clientTop||0)}function Hn(t){return Array.prototype.filter.call(t.parentNode.children,function(e){return e!==t})}function In(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Bn(e){if("function"==typeof e)return!0;var t=Object.prototype.toString(e);return"[object Function]"===t||"[object GeneratorFunction]"===t}function Rn(e,t,n){var o;n=void 0===n?{}:n,"function"==typeof Lt.CustomEvent?o=new CustomEvent(t,{detail:n}):(o=xt.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,n),e.dispatchEvent(o)}function zn(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector).call(e,t)}function jn(e,t){if("boolean"==typeof t)for(var n=0;n<e.length;n++)e[n].style.display=t?"block":"none";return e}function Nn(e){var t=xt.createElement("div");return t.innerHTML=e.trim(),t.firstChild}function Pn(e){e=l(e);for(var t=0;t<e.length;t++){var n=e[t];n&&n.parentElement&&n.parentNode.removeChild(n)}}function a(e,t,n){for(var o=e[n],r=[];o;)(zn(o,t)||null==t)&&r.push(o),o=o[n];return r}function Dn(e,t){return a(e,t,"nextElementSibling")}function Vn(e,t){return a(e,t,"previousElementSibling")}return Lt.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=function(e,t){t=t||Lt;for(var n=0;n<this.length;n++)e.call(t,this[n],n,this)}),Lt.fp_utils={$:sn,deepExtend:cn,hasClass:un,getWindowHeight:fn,css:dn,until:n,prevUntil:vn,nextUntil:pn,prev:hn,next:gn,last:mn,index:Sn,getList:l,hide:bn,show:wn,isArrayOrList:i,addClass:yn,removeClass:Line truncated
|
||||
//# sourceMappingURL=fullpage.min.js.map
|
||||
@@ -1,4 +0,0 @@
|
||||
/*! jQuery v3.2.1 | (c) JS Foundation and other contributors | jquery.org/license */
|
||||
!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.2.1",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null==a?f.call(this):a<0?this[a+this.length]:this[a]},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c<b?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:h,sort:c.sort,splice:c.splice},r.extend=r.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||r.isFunction(g)||(g={}),h===i&&(g=this,h--);h<i;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(r.isPlainObject(d)||(e=Array.isArray(d)))?(e?(e=!1,f=c&&Array.isArray(c)?c:[]):f=c&&r.isPlainObject(c)?c:{},g[b]=r.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},r.extend({expando:"jQuery"+(q+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===r.type(a)},isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=r.type(a);return("number"===b||"string"===b)&&!isNaN(a-parseFloat(a))},isPlainObject:function(a){var b,c;return!(!a||"[object Object]"!==k.call(a))&&(!(b=e(a))||(c=l.call(b,"constructor")&&b.constructor,"function"==typeof c&&m.call(c)===n))},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?j[k.call(a)]||"object":typeof a},globalEval:function(a){p(a)},camelCase:function(a){return a.replace(t,"ms-").replace(u,v)},each:function(a,b){var c,d=0;if(w(a)){for(c=a.length;d<c;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(s,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(w(Object(a))?r.merge(c,"string"==typeof a?[a]:a):h.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:i.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;d<c;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;f<g;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,f=0,h=[];if(w(a))for(d=a.length;f<d;f++)e=b(a[f],f,c),null!=e&&h.push(e);else for(f in a)e=b(a[f],f,c),null!=e&&h.push(e);return g.apply([],h)},guid:1,proxy:function(a,b){var c,d,e;if("string"==typeof b&&(c=a[b],b=a,a=c),r.isFunction(a))return d=f.call(arguments,2),e=function(){return a.apply(b||this,d.concat(f.call(arguments)))},e.guid=a.guid=a.guid||r.guid++,e},now:Date.now,support:o}),"function"==typeof Symbol&&(r.fn[Symbol.iterator]=c[Symbol.iterator]),r.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){j["[object "+b+"]"]=b.toLowerCase()});function w(a){var b=!!a&&"length"in a&&a.length,c=r.type(a);return"function"!==c&&!r.isWindow(a)&&("array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",M="\\["+K+"*("+L+")(?:"+K+"*([*^$|!~]?=)"+K+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+L+"))|)"+K+"*\\]",N=":("+L+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+M+")*)|.*)\\)|)",O=new RegExp(K+"+","g"),P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={IDLine truncated
|
||||
a.removeEventListener("load",S),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",S),a.addEventListener("load",S));var T=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)T(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h<i;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},U=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function V(){this.expando=r.expando+V.uid++}V.uid=1,V.prototype={cache:function(a){var b=a[this.expando];return b||(b={},U(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[r.camelCase(b)]=c;else for(d in b)e[r.camelCase(d)]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][r.camelCase(b)]},access:function(a,b,c){return void 0===b||b&&"string"==typeof b&&void 0===c?this.get(a,b):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d=a[this.expando];if(void 0!==d){if(void 0!==b){Array.isArray(b)?b=b.map(r.camelCase):(b=r.camelCase(b),b=b in d?[b]:b.match(L)||[]),c=b.length;while(c--)delete d[b[c]]}(void 0===b||r.isEmptyObject(d))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!r.isEmptyObject(b)}};var W=new V,X=new V,Y=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Z=/[A-Z]/g;function $(a){return"true"===a||"false"!==a&&("null"===a?null:a===+a+""?+a:Y.test(a)?JSON.parse(a):a)}function _(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Z,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c=$(c)}catch(e){}X.set(a,b,c)}else c=void 0;return c}r.extend({hasData:function(a){return X.hasData(a)||W.hasData(a)},data:function(a,b,c){return X.access(a,b,c)},removeData:function(a,b){X.remove(a,b)},_data:function(a,b,c){return W.access(a,b,c)},_removeData:function(a,b){W.remove(a,b)}}),r.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=X.get(f),1===f.nodeType&&!W.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=r.camelCase(d.slice(5)),_(f,d,e[d])));W.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){X.set(this,a)}):T(this,function(b){var c;if(f&&void 0===b){if(c=X.get(f,a),void 0!==c)return c;if(c=_(f,a),void 0!==c)return c}else this.each(function(){X.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){X.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=W.get(a,b),c&&(!d||Array.isArray(c)?d=W.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return W.get(a,c)||W.access(a,c,{empty:r.Callbacks("once memory").add(function(){W.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?r.queue(this[0],a):void 0===b?this:this.each(function(){var c=r.queue(this,a,b);r._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&r.dequeue(this,a)})},dequeue:function(a){return this.each(function(){r.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=r.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=W.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var aa=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ba=new RegExp("^(?:([+-])=|)("+aa+")([a-z%]*)$","i"),ca=["Top","Right","Bottom","Left"],da=function(a,b){return a=b||a,"none"===a.style.display||""===a.style.display&&r.contains(a.ownerDocument,a)&&"none"===r.css(a,"display")},ea=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};function fa(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return r.css(a,b,"")},i=h(),j=c&&c[3]||(r.cssNumber[b]?"":"px"),k=(r.cssNumber[b]||"px"!==j&&+i)&&ba.exec(r.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,r.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var ga={};function ha(a){var b,c=a.ownerDocument,d=a.nodeName,e=ga[d];return e?e:(b=c.body.appendChild(c.createElement(d)),e=r.css(b,"display"),b.parentNode.removeChild(b),"none"===e&&(e=Line truncated
|
||||
null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&B(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(L);if(e&&1===a.nodeType)while(c=e[d++])a.removeAttribute(c)}}),lb={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=mb[b]||r.find.attr;mb[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=mb[g],mb[g]=e,e=null!=c(a,b,d)?g:null,mb[g]=f),e}});var nb=/^(?:input|select|textarea|button)$/i,ob=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return T(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):nb.test(a.nodeName)||ob.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});function pb(a){var b=a.match(L)||[];return b.join(" ")}function qb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,qb(this)))});if("string"==typeof a&&a){b=a.match(L)||[];while(c=this[i++])if(e=qb(c),d=1===c.nodeType&&" "+pb(e)+" "){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=pb(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeClass(a.call(this,b,qb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(L)||[];while(c=this[i++])if(e=qb(c),d=1===c.nodeType&&" "+pb(e)+" "){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=pb(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,qb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(L)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=qb(this),b&&W.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":W.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+pb(qb(c))+" ").indexOf(b)>-1)return!0;return!1}});var rb=/\r/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":Array.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(rb,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:pb(r.text(a))}},select:{get:function(a){var b,c,d,e=a.options,f=a.selectedIndex,g="select-one"===a.type,h=g?null:[],i=g?f+1:e.length;for(d=f<0?i:g?f:0;d<i;d++)if(c=e[d],(c.selected||d===f)&&!c.disabled&&(!c.parentNode.disabled||!B(c.parentNode,"optgroup"))){if(b=r(c).val(),g)return b;h.push(b)}return h},set:function(a,b){var c,d,e=a.options,f=r.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=r.inArray(r.valHooks.option.get(d),f)>-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){if(Array.isArray(b))return a.checked=r.inArray(r(a).val(),b)>-1}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var sb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!sb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?bLine truncated
|
||||
@@ -1,4 +0,0 @@
|
||||
/*! Magnific Popup - v1.1.0 - 2016-02-20
|
||||
* http://dimsemenov.com/plugins/magnific-popup/
|
||||
* Copyright (c) 2016 Dmitry Semenov; */
|
||||
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isLowIE=b.isIE8=document.all&&!document.addEventListener,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",c.mainEl&&c.mainEl.length?b.ev=c.mainEl.eq(0):b.ev=d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.fixedContentPos?b.wrap.css({overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}):b.wrap.css({top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b.st.autoFocusLast&&b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innLine truncated
|
||||
@@ -1,584 +0,0 @@
|
||||
;(function ($, document, window) {
|
||||
var
|
||||
// default settings object.
|
||||
defaults = {
|
||||
label: 'MENU',
|
||||
duplicate: true,
|
||||
duration: 200,
|
||||
easingOpen: 'swing',
|
||||
easingClose: 'swing',
|
||||
closedSymbol: '►',
|
||||
openedSymbol: '▼',
|
||||
prependTo: 'body',
|
||||
appendTo: '',
|
||||
parentTag: 'a',
|
||||
closeOnClick: false,
|
||||
allowParentLinks: false,
|
||||
nestedParentLinks: true,
|
||||
showChildren: false,
|
||||
removeIds: true,
|
||||
removeClasses: false,
|
||||
removeStyles: false,
|
||||
brand: '',
|
||||
animations: 'jquery',
|
||||
init: function () {},
|
||||
beforeOpen: function () {},
|
||||
beforeClose: function () {},
|
||||
afterOpen: function () {},
|
||||
afterClose: function () {}
|
||||
},
|
||||
mobileMenu = 'slicknav',
|
||||
prefix = 'slicknav',
|
||||
|
||||
Keyboard = {
|
||||
DOWN: 40,
|
||||
ENTER: 13,
|
||||
ESCAPE: 27,
|
||||
LEFT: 37,
|
||||
RIGHT: 39,
|
||||
SPACE: 32,
|
||||
TAB: 9,
|
||||
UP: 38,
|
||||
};
|
||||
|
||||
function Plugin(element, options) {
|
||||
this.element = element;
|
||||
|
||||
// jQuery has an extend method which merges the contents of two or
|
||||
// more objects, storing the result in the first object. The first object
|
||||
// is generally empty as we don't want to alter the default options for
|
||||
// future instances of the plugin
|
||||
this.settings = $.extend({}, defaults, options);
|
||||
|
||||
// Don't remove IDs by default if duplicate is false
|
||||
if (!this.settings.duplicate && !options.hasOwnProperty("removeIds")) {
|
||||
this.settings.removeIds = false;
|
||||
}
|
||||
|
||||
this._defaults = defaults;
|
||||
this._name = mobileMenu;
|
||||
|
||||
this.init();
|
||||
}
|
||||
|
||||
Plugin.prototype.init = function () {
|
||||
var $this = this,
|
||||
menu = $(this.element),
|
||||
settings = this.settings,
|
||||
iconClass,
|
||||
menuBar;
|
||||
|
||||
// clone menu if needed
|
||||
if (settings.duplicate) {
|
||||
$this.mobileNav = menu.clone();
|
||||
} else {
|
||||
$this.mobileNav = menu;
|
||||
}
|
||||
|
||||
// remove IDs if set
|
||||
if (settings.removeIds) {
|
||||
$this.mobileNav.removeAttr('id');
|
||||
$this.mobileNav.find('*').each(function (i, e) {
|
||||
$(e).removeAttr('id');
|
||||
});
|
||||
}
|
||||
|
||||
// remove classes if set
|
||||
if (settings.removeClasses) {
|
||||
$this.mobileNav.removeAttr('class');
|
||||
$this.mobileNav.find('*').each(function (i, e) {
|
||||
$(e).removeAttr('class');
|
||||
});
|
||||
}
|
||||
|
||||
// remove styles if set
|
||||
if (settings.removeStyles) {
|
||||
$this.mobileNav.removeAttr('style');
|
||||
$this.mobileNav.find('*').each(function (i, e) {
|
||||
$(e).removeAttr('style');
|
||||
});
|
||||
}
|
||||
|
||||
// styling class for the button
|
||||
iconClass = prefix + '_icon';
|
||||
|
||||
if (settings.label === '') {
|
||||
iconClass += ' ' + prefix + '_no-text';
|
||||
}
|
||||
|
||||
if (settings.parentTag == 'a') {
|
||||
settings.parentTag = 'a href="#"';
|
||||
}
|
||||
|
||||
// create menu bar
|
||||
$this.mobileNav.attr('class', prefix + '_nav');
|
||||
menuBar = $('<div class="' + prefix + '_menu"></div>');
|
||||
if (settings.brand !== '') {
|
||||
var brand = $('<div class="' + prefix + '_brand">'+settings.brand+'</div>');
|
||||
$(menuBar).append(brand);
|
||||
}
|
||||
$this.btn = $(
|
||||
['<' + settings.parentTag + ' aria-haspopup="true" role="button" tabindex="0" class="' + prefix + '_btn ' + prefix + '_collapsed">',
|
||||
'<span class="' + prefix + '_menutxt">' + settings.label + '</span>',
|
||||
'<span class="' + iconClass + '">',
|
||||
'<span class="' + prefix + '_icon-bar"></span>',
|
||||
'<span class="' + prefix + '_icon-bar"></span>',
|
||||
'<span class="' + prefix + '_icon-bar"></span>',
|
||||
'</span>',
|
||||
'</' + settings.parentTag + '>'
|
||||
].join('')
|
||||
);
|
||||
$(menuBar).append($this.btn);
|
||||
if(settings.appendTo !== '') {
|
||||
$(settings.appendTo).append(menuBar);
|
||||
} else {
|
||||
$(settings.prependTo).prepend(menuBar);
|
||||
}
|
||||
menuBar.append($this.mobileNav);
|
||||
|
||||
// iterate over structure adding additional structure
|
||||
var items = $this.mobileNav.find('li');
|
||||
$(items).each(function () {
|
||||
var item = $(this),
|
||||
data = {};
|
||||
data.children = item.children('ul').attr('role', 'menu');
|
||||
item.data('menu', data);
|
||||
|
||||
// if a list item has a nested menu
|
||||
if (data.children.length > 0) {
|
||||
|
||||
// select all text before the child menu
|
||||
// check for anchors
|
||||
|
||||
var a = item.contents(),
|
||||
containsAnchor = false,
|
||||
nodes = [];
|
||||
|
||||
$(a).each(function () {
|
||||
if (!$(this).is('ul')) {
|
||||
nodes.push(this);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
if($(this).is("a")) {
|
||||
containsAnchor = true;
|
||||
}
|
||||
});
|
||||
|
||||
var wrapElement = $(
|
||||
'<' + settings.parentTag + ' role="menuitem" aria-haspopup="true" tabindex="-1" class="' + prefix + '_item"/>'
|
||||
);
|
||||
|
||||
// wrap item text with tag and add classes unless we are separating parent links
|
||||
if ((!settings.allowParentLinks || settings.nestedParentLinks) || !containsAnchor) {
|
||||
var $wrap = $(nodes).wrapAll(wrapElement).parent();
|
||||
$wrap.addClass(prefix+'_row');
|
||||
} else
|
||||
$(nodes).wrapAll('<span class="'+prefix+'_parent-link '+prefix+'_row"/>').parent();
|
||||
|
||||
if (!settings.showChildren) {
|
||||
item.addClass(prefix+'_collapsed');
|
||||
} else {
|
||||
item.addClass(prefix+'_open');
|
||||
}
|
||||
|
||||
item.addClass(prefix+'_parent');
|
||||
|
||||
// create parent arrow. wrap with link if parent links and separating
|
||||
var arrowElement = $('<span class="'+prefix+'_arrow">'+(settings.showChildren?settings.openedSymbol:settings.closedSymbol)+'</span>');
|
||||
|
||||
if (settings.allowParentLinks && !settings.nestedParentLinks && containsAnchor)
|
||||
arrowElement = arrowElement.wrap(wrapElement).parent();
|
||||
|
||||
//append arrow
|
||||
$(nodes).last().after(arrowElement);
|
||||
|
||||
|
||||
} else if ( item.children().length === 0) {
|
||||
item.addClass(prefix+'_txtnode');
|
||||
}
|
||||
|
||||
// accessibility for links
|
||||
item.children('a').attr('role', 'menuitem').click(function(event){
|
||||
//Ensure that it's not a parent
|
||||
if (settings.closeOnClick && !$(event.target).parent().closest('li').hasClass(prefix+'_parent')) {
|
||||
//Emulate menu close if set
|
||||
$($this.btn).click();
|
||||
}
|
||||
});
|
||||
|
||||
//also close on click if parent links are set
|
||||
if (settings.closeOnClick && settings.allowParentLinks) {
|
||||
item.children('a').children('a').click(function (event) {
|
||||
//Emulate menu close
|
||||
$($this.btn).click();
|
||||
});
|
||||
|
||||
item.find('.'+prefix+'_parent-link a:not(.'+prefix+'_item)').click(function(event){
|
||||
//Emulate menu close
|
||||
$($this.btn).click();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// structure is in place, now hide appropriate items
|
||||
$(items).each(function () {
|
||||
var data = $(this).data('menu');
|
||||
if (!settings.showChildren){
|
||||
$this._visibilityToggle(data.children, null, false, null, true);
|
||||
}
|
||||
});
|
||||
|
||||
// finally toggle entire menu
|
||||
$this._visibilityToggle($this.mobileNav, null, false, 'init', true);
|
||||
|
||||
// accessibility for menu button
|
||||
$this.mobileNav.attr('role','menu');
|
||||
|
||||
// outline prevention when using mouse
|
||||
$(document).mousedown(function(){
|
||||
$this._outlines(false);
|
||||
});
|
||||
|
||||
$(document).keyup(function(){
|
||||
$this._outlines(true);
|
||||
});
|
||||
|
||||
// menu button click
|
||||
$($this.btn).click(function (e) {
|
||||
e.preventDefault();
|
||||
$this._menuToggle();
|
||||
});
|
||||
|
||||
// click on menu parent
|
||||
$this.mobileNav.on('click', '.' + prefix + '_item', function (e) {
|
||||
e.preventDefault();
|
||||
$this._itemClick($(this));
|
||||
});
|
||||
|
||||
// check for keyboard events on menu button and menu parents
|
||||
$($this.btn).keydown(function (e) {
|
||||
var ev = e || event;
|
||||
|
||||
switch(ev.keyCode) {
|
||||
case Keyboard.ENTER:
|
||||
case Keyboard.SPACE:
|
||||
case Keyboard.DOWN:
|
||||
e.preventDefault();
|
||||
if (ev.keyCode !== Keyboard.DOWN || !$($this.btn).hasClass(prefix+'_open')){
|
||||
$this._menuToggle();
|
||||
}
|
||||
|
||||
$($this.btn).next().find('[role="menuitem"]').first().focus();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
$this.mobileNav.on('keydown', '.'+prefix+'_item', function(e) {
|
||||
var ev = e || event;
|
||||
|
||||
switch(ev.keyCode) {
|
||||
case Keyboard.ENTER:
|
||||
e.preventDefault();
|
||||
$this._itemClick($(e.target));
|
||||
break;
|
||||
case Keyboard.RIGHT:
|
||||
e.preventDefault();
|
||||
if ($(e.target).parent().hasClass(prefix+'_collapsed')) {
|
||||
$this._itemClick($(e.target));
|
||||
}
|
||||
$(e.target).next().find('[role="menuitem"]').first().focus();
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
$this.mobileNav.on('keydown', '[role="menuitem"]', function(e) {
|
||||
var ev = e || event;
|
||||
|
||||
switch(ev.keyCode){
|
||||
case Keyboard.DOWN:
|
||||
e.preventDefault();
|
||||
var allItems = $(e.target).parent().parent().children().children('[role="menuitem"]:visible');
|
||||
var idx = allItems.index( e.target );
|
||||
var nextIdx = idx + 1;
|
||||
if (allItems.length <= nextIdx) {
|
||||
nextIdx = 0;
|
||||
}
|
||||
var next = allItems.eq( nextIdx );
|
||||
next.focus();
|
||||
break;
|
||||
case Keyboard.UP:
|
||||
e.preventDefault();
|
||||
var allItems = $(e.target).parent().parent().children().children('[role="menuitem"]:visible');
|
||||
var idx = allItems.index( e.target );
|
||||
var next = allItems.eq( idx - 1 );
|
||||
next.focus();
|
||||
break;
|
||||
case Keyboard.LEFT:
|
||||
e.preventDefault();
|
||||
if ($(e.target).parent().parent().parent().hasClass(prefix+'_open')) {
|
||||
var parent = $(e.target).parent().parent().prev();
|
||||
parent.focus();
|
||||
$this._itemClick(parent);
|
||||
} else if ($(e.target).parent().parent().hasClass(prefix+'_nav')){
|
||||
$this._menuToggle();
|
||||
$($this.btn).focus();
|
||||
}
|
||||
break;
|
||||
case Keyboard.ESCAPE:
|
||||
e.preventDefault();
|
||||
$this._menuToggle();
|
||||
$($this.btn).focus();
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
// allow links clickable within parent tags if set
|
||||
if (settings.allowParentLinks && settings.nestedParentLinks) {
|
||||
$('.'+prefix+'_item a').click(function(e){
|
||||
e.stopImmediatePropagation();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//toggle menu
|
||||
Plugin.prototype._menuToggle = function (el) {
|
||||
var $this = this;
|
||||
var btn = $this.btn;
|
||||
var mobileNav = $this.mobileNav;
|
||||
|
||||
if (btn.hasClass(prefix+'_collapsed')) {
|
||||
btn.removeClass(prefix+'_collapsed');
|
||||
btn.addClass(prefix+'_open');
|
||||
} else {
|
||||
btn.removeClass(prefix+'_open');
|
||||
btn.addClass(prefix+'_collapsed');
|
||||
}
|
||||
btn.addClass(prefix+'_animating');
|
||||
$this._visibilityToggle(mobileNav, btn.parent(), true, btn);
|
||||
};
|
||||
|
||||
// toggle clicked items
|
||||
Plugin.prototype._itemClick = function (el) {
|
||||
var $this = this;
|
||||
var settings = $this.settings;
|
||||
var data = el.data('menu');
|
||||
if (!data) {
|
||||
data = {};
|
||||
data.arrow = el.children('.'+prefix+'_arrow');
|
||||
data.ul = el.next('ul');
|
||||
data.parent = el.parent();
|
||||
//Separated parent link structure
|
||||
if (data.parent.hasClass(prefix+'_parent-link')) {
|
||||
data.parent = el.parent().parent();
|
||||
data.ul = el.parent().next('ul');
|
||||
}
|
||||
el.data('menu', data);
|
||||
}
|
||||
if (data.parent.hasClass(prefix+'_collapsed')) {
|
||||
data.arrow.html(settings.openedSymbol);
|
||||
data.parent.removeClass(prefix+'_collapsed');
|
||||
data.parent.addClass(prefix+'_open');
|
||||
data.parent.addClass(prefix+'_animating');
|
||||
$this._visibilityToggle(data.ul, data.parent, true, el);
|
||||
} else {
|
||||
data.arrow.html(settings.closedSymbol);
|
||||
data.parent.addClass(prefix+'_collapsed');
|
||||
data.parent.removeClass(prefix+'_open');
|
||||
data.parent.addClass(prefix+'_animating');
|
||||
$this._visibilityToggle(data.ul, data.parent, true, el);
|
||||
}
|
||||
};
|
||||
|
||||
// toggle actual visibility and accessibility tags
|
||||
Plugin.prototype._visibilityToggle = function(el, parent, animate, trigger, init) {
|
||||
var $this = this;
|
||||
var settings = $this.settings;
|
||||
var items = $this._getActionItems(el);
|
||||
var duration = 0;
|
||||
if (animate) {
|
||||
duration = settings.duration;
|
||||
}
|
||||
|
||||
function afterOpen(trigger, parent) {
|
||||
$(trigger).removeClass(prefix+'_animating');
|
||||
$(parent).removeClass(prefix+'_animating');
|
||||
|
||||
//Fire afterOpen callback
|
||||
if (!init) {
|
||||
settings.afterOpen(trigger);
|
||||
}
|
||||
}
|
||||
|
||||
function afterClose(trigger, parent) {
|
||||
el.attr('aria-hidden','true');
|
||||
items.attr('tabindex', '-1');
|
||||
$this._setVisAttr(el, true);
|
||||
el.hide(); //jQuery 1.7 bug fix
|
||||
|
||||
$(trigger).removeClass(prefix+'_animating');
|
||||
$(parent).removeClass(prefix+'_animating');
|
||||
|
||||
//Fire init or afterClose callback
|
||||
if (!init){
|
||||
settings.afterClose(trigger);
|
||||
} else if (trigger == 'init'){
|
||||
settings.init();
|
||||
}
|
||||
}
|
||||
|
||||
if (el.hasClass(prefix+'_hidden')) {
|
||||
el.removeClass(prefix+'_hidden');
|
||||
//Fire beforeOpen callback
|
||||
if (!init) {
|
||||
settings.beforeOpen(trigger);
|
||||
}
|
||||
if (settings.animations === 'jquery') {
|
||||
el.stop(true,true).slideDown(duration, settings.easingOpen, function(){
|
||||
afterOpen(trigger, parent);
|
||||
});
|
||||
} else if(settings.animations === 'velocity') {
|
||||
el.velocity("finish").velocity("slideDown", {
|
||||
duration: duration,
|
||||
easing: settings.easingOpen,
|
||||
complete: function() {
|
||||
afterOpen(trigger, parent);
|
||||
}
|
||||
});
|
||||
}
|
||||
el.attr('aria-hidden','false');
|
||||
items.attr('tabindex', '0');
|
||||
$this._setVisAttr(el, false);
|
||||
} else {
|
||||
el.addClass(prefix+'_hidden');
|
||||
|
||||
//Fire init or beforeClose callback
|
||||
if (!init){
|
||||
settings.beforeClose(trigger);
|
||||
}
|
||||
|
||||
if (settings.animations === 'jquery') {
|
||||
el.stop(true,true).slideUp(duration, this.settings.easingClose, function() {
|
||||
afterClose(trigger, parent)
|
||||
});
|
||||
} else if (settings.animations === 'velocity') {
|
||||
|
||||
el.velocity("finish").velocity("slideUp", {
|
||||
duration: duration,
|
||||
easing: settings.easingClose,
|
||||
complete: function() {
|
||||
afterClose(trigger, parent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// set attributes of element and children based on visibility
|
||||
Plugin.prototype._setVisAttr = function(el, hidden) {
|
||||
var $this = this;
|
||||
|
||||
// select all parents that aren't hidden
|
||||
var nonHidden = el.children('li').children('ul').not('.'+prefix+'_hidden');
|
||||
|
||||
// iterate over all items setting appropriate tags
|
||||
if (!hidden) {
|
||||
nonHidden.each(function(){
|
||||
var ul = $(this);
|
||||
ul.attr('aria-hidden','false');
|
||||
var items = $this._getActionItems(ul);
|
||||
items.attr('tabindex', '0');
|
||||
$this._setVisAttr(ul, hidden);
|
||||
});
|
||||
} else {
|
||||
nonHidden.each(function(){
|
||||
var ul = $(this);
|
||||
ul.attr('aria-hidden','true');
|
||||
var items = $this._getActionItems(ul);
|
||||
items.attr('tabindex', '-1');
|
||||
$this._setVisAttr(ul, hidden);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// get all 1st level items that are clickable
|
||||
Plugin.prototype._getActionItems = function(el) {
|
||||
var data = el.data("menu");
|
||||
if (!data) {
|
||||
data = {};
|
||||
var items = el.children('li');
|
||||
var anchors = items.find('a');
|
||||
data.links = anchors.add(items.find('.'+prefix+'_item'));
|
||||
el.data('menu', data);
|
||||
}
|
||||
return data.links;
|
||||
};
|
||||
|
||||
Plugin.prototype._outlines = function(state) {
|
||||
if (!state) {
|
||||
$('.'+prefix+'_item, .'+prefix+'_btn').css('outline','none');
|
||||
} else {
|
||||
$('.'+prefix+'_item, .'+prefix+'_btn').css('outline','');
|
||||
}
|
||||
};
|
||||
|
||||
Plugin.prototype.toggle = function(){
|
||||
var $this = this;
|
||||
$this._menuToggle();
|
||||
};
|
||||
|
||||
Plugin.prototype.open = function(){
|
||||
var $this = this;
|
||||
if ($this.btn.hasClass(prefix+'_collapsed')) {
|
||||
$this._menuToggle();
|
||||
}
|
||||
};
|
||||
|
||||
Plugin.prototype.close = function(){
|
||||
var $this = this;
|
||||
if ($this.btn.hasClass(prefix+'_open')) {
|
||||
$this._menuToggle();
|
||||
}
|
||||
};
|
||||
|
||||
$.fn[mobileMenu] = function ( options ) {
|
||||
var args = arguments;
|
||||
|
||||
// Is the first parameter an object (options), or was omitted, instantiate a new instance
|
||||
if (options === undefined || typeof options === 'object') {
|
||||
return this.each(function () {
|
||||
|
||||
// Only allow the plugin to be instantiated once due to methods
|
||||
if (!$.data(this, 'plugin_' + mobileMenu)) {
|
||||
|
||||
// if it has no instance, create a new one, pass options to our plugin constructor,
|
||||
// and store the plugin instance in the elements jQuery data object.
|
||||
$.data(this, 'plugin_' + mobileMenu, new Plugin( this, options ));
|
||||
}
|
||||
});
|
||||
|
||||
// If is a string and doesn't start with an underscore or 'init' function, treat this as a call to a public method.
|
||||
} else if (typeof options === 'string' && options[0] !== '_' && options !== 'init') {
|
||||
|
||||
// Cache the method call to make it possible to return a value
|
||||
var returns;
|
||||
|
||||
this.each(function () {
|
||||
var instance = $.data(this, 'plugin_' + mobileMenu);
|
||||
|
||||
// Tests that there's already a plugin-instance and checks that the requested public method exists
|
||||
if (instance instanceof Plugin && typeof instance[options] === 'function') {
|
||||
|
||||
// Call the method of our plugin instance, and pass it the supplied arguments.
|
||||
returns = instance[options].apply( instance, Array.prototype.slice.call( args, 1 ) );
|
||||
}
|
||||
});
|
||||
|
||||
// If the earlier cached method gives a value back return the value, otherwise return this to preserve chainability.
|
||||
return returns !== undefined ? returns : this;
|
||||
}
|
||||
};
|
||||
}(jQuery, document, window));
|
||||
@@ -1,375 +0,0 @@
|
||||
Lazy is dual-licensed under MIT and GPL-2.0 license. Please choose one of them, both are listed below.
|
||||
|
||||
|
||||
---------------------------------
|
||||
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2017 Daniel 'Eisbehr' Kern, eisbehr.de
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
||||
---------------------------------
|
||||
|
||||
|
||||
GPL-2.0 License
|
||||
|
||||
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
{description}
|
||||
Copyright (C) {year} {fullname}
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
{signature of Ty Coon}, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
@@ -1,264 +0,0 @@
|
||||
### jQuery & Zepto Lazy - Delayed Content, Image and Background Loader
|
||||
[](http://github.com/dkern/jquery.lazy)
|
||||
[](http://www.npmjs.org/package/jquery-lazy)
|
||||
[](http://bower.io/search/?q=jquery-lazy)
|
||||
[](https://david-dm.org/dkern/jquery.lazy)
|
||||
[](https://david-dm.org/dkern/jquery.lazy?type=dev)
|
||||
|
||||
---
|
||||
|
||||
[](https://jetbrains.com/phpstorm)
|
||||
_This project is friendly supported by [JetBrains](https://jetbrains.com) & [PhpStorm](https://jetbrains.com/phpstorm)!_
|
||||
|
||||
---
|
||||
|
||||
### Table of Contents
|
||||
* [About Lazy](#about-lazy)
|
||||
* [Compatibility](#compatibility)
|
||||
* [Documentation / Examples](#documentation--examples)
|
||||
* [Installation](#installation)
|
||||
* [CDN](#cdn)
|
||||
* [Self-Hosted](#self-hosted)
|
||||
* [Package Managers](#package-managers)
|
||||
* [Basic Usage](#basic-usage)
|
||||
* [Callbacks / Events](#callbacks--events)
|
||||
* [Instances and public Functions](#instances-and-public-functions)
|
||||
* [Custom Content Loaders](#custom-content-loaders)
|
||||
* [Loader Plugins](#loader-plugins)
|
||||
* [Configuration Parameters](#configuration-parameters)
|
||||
* [Build and Validation](#build-and-validation)
|
||||
* [Available gulp Tasks](#available-gulp-tasks)
|
||||
* [Bugs / Feature request](#bugs--feature-request)
|
||||
* [License](#license)
|
||||
* [Donation](#donation)
|
||||
|
||||
---
|
||||
|
||||
## About Lazy
|
||||
Lazy is a fast, feature-rich and lightweight delayed content loading plugin for jQuery and Zepto.
|
||||
It's designed to speed up page loading times and decrease traffic to your users by only loading the content in view.
|
||||
You can use Lazy in all vertical and horizontal scroll ways.
|
||||
It supports images in `<img />` tags and backgrounds, supplied with css like `background-image`, by default.
|
||||
On those elements Lazy can set an default image or a placeholder while loading and supports retina displays as well.
|
||||
But Lazy is even able to load any other content you want by [plugins](#loader-plugins) and [custom loaders](#custom-content-loaders).
|
||||
|
||||
|
||||
## Compatibility
|
||||
Lazy will work with a wide range of browsers and support jQuery versions for years backwards and Zepto as alternative.
|
||||
You can pick any version since jQuery 1.7.2 or Zepto 1.1.6 or greater.
|
||||
There is no way to guarantee, that Lazy will work with all browsers, but all I've tested worked great so far.
|
||||
If you find any problems in specific browsers, [please let me know](http://github.com/dkern/jquery.lazy/issues).
|
||||
|
||||
**Tested in:** IE, Chrome (+ mobile), Firefox (+ mobile), Safari (+ mobile) and Android Browser.
|
||||
|
||||
|
||||
## Documentation / Examples
|
||||
For [documentation](http://jquery.eisbehr.de/lazy/#parameter), [examples](http://jquery.eisbehr.de/lazy/#examples) and other information take a look on the [project page](http://jquery.eisbehr.de/lazy/).
|
||||
|
||||
|
||||
## Installation
|
||||
First of all, you will need a copy of [jQuery](http://jquery.com) or [Zepto](http://zeptojs.com) to use Lazy successfully on your project.
|
||||
If you get this you can install Lazy by different ways.
|
||||
Some examples below:
|
||||
|
||||
#### CDN
|
||||
Lazy and all plugins are available over [cdnjs](http://cdnjs.com) and [jsDelivr](http://jsdelivr.com) CDN and can directly included to every page.
|
||||
```HTML
|
||||
<!-- jsDeliver -->
|
||||
<script type="text/javascript" src="//cdn.jsdelivr.net/gh/dkern/jquery.lazy@1.7.10/jquery.lazy.min.js"></script>
|
||||
<script type="text/javascript" src="//cdn.jsdelivr.net/gh/dkern/jquery.lazy@1.7.10/jquery.lazy.plugins.min.js"></script>
|
||||
|
||||
<!-- cdnjs -->
|
||||
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery.lazy/1.7.10/jquery.lazy.min.js"></script>
|
||||
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery.lazy/1.7.10/jquery.lazy.plugins.min.js"></script>
|
||||
```
|
||||
|
||||
#### Self-Hosted
|
||||
[Download](https://github.com/dkern/jquery.lazy/archive/master.zip) and save one of two available files to include Lazy to your page, either the [development](http://raw.githubusercontent.com/dkern/jquery.lazy/master/jquery.lazy.js) or the [minified](http://raw.githubusercontent.com/dkern/jquery.lazy/master/jquery.lazy.min.js) version.
|
||||
```HTML
|
||||
<script type="text/javascript" src="jquery.lazy.min.js"></script>
|
||||
```
|
||||
|
||||
#### Package Managers
|
||||
Lazy is even available through [NPM](http://npmjs.org) and [Bower](http://bower.io).
|
||||
Just use one of the following commands below:
|
||||
|
||||
[](https://nodei.co/npm/jquery-lazy/)
|
||||
```sh
|
||||
$ npm install jquery-lazy
|
||||
$ bower install jquery-lazy
|
||||
```
|
||||
|
||||
|
||||
## Basic Usage
|
||||
1.) The basic usage of Lazy is pretty easy.
|
||||
First of all you need to prepare all elements you want to lazy load.
|
||||
By default add a `data-src` attribute to images containing the loadable image and/or a `data-loader` attribute to elements witch shall use a [plugin](#loader-plugins) or [custom loaders](#custom-content-loaders).
|
||||
```HTML
|
||||
<img class="lazy" data-src="path/to/image_to_load.jpg" src="" />
|
||||
```
|
||||
|
||||
2.) Start using Lazy by calling it after page load.
|
||||
You don't have to specify your elements exactly, but for better performance, or different options, load your elements over unique classes or any other selector.
|
||||
```JS
|
||||
$(function($) {
|
||||
$("img.lazy").Lazy();
|
||||
});
|
||||
```
|
||||
Take a look at the [documentation](http://jquery.eisbehr.de/lazy/) to get an idea what Lazy is capable of.
|
||||
|
||||
|
||||
## Callbacks / Events
|
||||
Lazy comes with a bunch of [callbacks and events](http://jquery.eisbehr.de/lazy/index.php?c=callback) you can assign to.
|
||||
Just add them by initialization settings:
|
||||
* `beforeLoad` - before item is about to be loaded
|
||||
* `afterLoad` - after the item was loaded successfully
|
||||
* `onError` - whenever an item could not be loaded
|
||||
* `onFinishedAll` - after all items in instance was loaded or returned an error
|
||||
|
||||
|
||||
## Instances and public Functions
|
||||
Lazy supports multiple parallel instances.
|
||||
Just initialize them with different selectors.
|
||||
To access an instances public functions you can initialize them in an object oriented manner or grab the instance bind to every element by default:
|
||||
```JS
|
||||
// object oriented way
|
||||
var instance = $("img.lazy").Lazy({chainable: false});
|
||||
|
||||
// grab from elements (only works well if you use same selectors)
|
||||
$("img.lazy").Lazy();
|
||||
var instance = $("img.lazy").data("plugin_lazy");
|
||||
```
|
||||
|
||||
Every instance has some public available functions to control it's behavior.
|
||||
There are currently six available:
|
||||
```JS
|
||||
instance.config(entryName[, newValue]); // get or set an configuration entry
|
||||
instance.addItems(items); // add new items to current instance
|
||||
instance.getItems(); // get all unhandled items left of current instance
|
||||
instance.update([useThrottle]); // loads all elements in current viewport
|
||||
instance.force(items); // force loading specific items, ignoring the viewport
|
||||
instance.loadAll(); // loads all remaining available elements from this instance
|
||||
instance.destroy(); // unbinds all events and stop execution directly
|
||||
```
|
||||
|
||||
|
||||
## Custom Content Loaders
|
||||
With the custom loaders option there is a powerful solution to load every contents the Lazy way.
|
||||
Lazy will handle everything, you just create a loading method witch got triggered whenever the element hits the visibility threshold.
|
||||
It is still possible to load images and custom loaders in the same Lazy instance.
|
||||
|
||||
To use this just define a loader function inside the Lazy initialisation and pass the loader name to the `data-loader` attribute of the elements witch should be lazy loaded.
|
||||
```HTML
|
||||
<div class="lazy" data-loader="customLoaderName"></div>
|
||||
<img class="lazy" data-src="path/to/image_to_load.jpg" src="" />
|
||||
<div class="lazy" data-loader="customLoaderName"></div>
|
||||
<div class="lazy" data-loader="asyncLoader"></div>
|
||||
```
|
||||
```JS
|
||||
$(".lazy").Lazy({
|
||||
// callback
|
||||
beforeLoad: function(element) {
|
||||
console.log("start loading " + element.prop("tagName"));
|
||||
},
|
||||
|
||||
// custom loaders
|
||||
customLoaderName: function(element) {
|
||||
element.html("element handled by custom loader");
|
||||
element.load();
|
||||
},
|
||||
asyncLoader: function(element, response) {
|
||||
setTimeout(function() {
|
||||
element.html("element handled by async loader");
|
||||
response(true);
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
## Loader Plugins
|
||||
The loader plugins can extend the functionality of Lazy, like loading other elements and data.
|
||||
It is basically the same as the [custom content loaders](#custom-content-loaders), with the difference, that plugins can extend all further instances globally at once permanently and let them handle specific elements like `<video>` by default, without `data-loader` attribute set.
|
||||
With custom content loaders you have to initialize each instance on setup with the loader.
|
||||
With plugins you only load the plugin file and you're done for all instances from now on.
|
||||
|
||||
For more information and examples, take a look at the [existing plugins](https://github.com/dkern/jquery.lazy/tree/master/plugins) or the [readme.md](https://github.com/dkern/jquery.lazy/tree/master/plugins/README.md) in there.
|
||||
|
||||
|
||||
## Configuration Parameters
|
||||
The following configurations is available by default:
|
||||
|
||||
Name | Type | Default | Description
|
||||
------------------ | ---------- | ------------------ | -----------
|
||||
name | *string* | *'lazy'* | Internal name, used for namespaces and bindings.
|
||||
chainable | *boolean* | *true* | By default Lazy is chainable and will return all elements. If set to `false` Lazy will return the created plugin instance itself for further use.
|
||||
autoDestroy | *boolean* | *true* | Will automatically destroy the instance when no further elements are available to handle.
|
||||
bind | *string* | *'load'* | If set to `load`' Lazy starts working directly after page load. If you want to use Lazy on own events set it to `event`'.
|
||||
threshold | *integer* | *500* | Amount of pixels below the viewport, in which all images gets loaded before the user sees them.
|
||||
visibleOnly | *boolean* | *false* | Determine if only visible elements should be load.
|
||||
appendScroll | *integer* | *window* | An element to listen on for scroll events, useful when images are stored in a container.
|
||||
scrollDirection | *string* | *'both'* | Determines the handles scroll direction. Possible values are `both`, `vertical` and `horizontal`.
|
||||
imageBase | *string* | *null* | If defined this will be used as base path for all images loaded by this instance.
|
||||
defaultImage | *string* | *blank image* | Base64 image string, set as default image source for every image without a predefined source attribute.
|
||||
placeholder | *string* | *null* | Base64 image string, set a background on every element as loading placeholder.
|
||||
delay | *integer* | *-1* | If you want to load all elements at once after page load, then you can specify a delay time in milliseconds.
|
||||
combined | *boolean* | *false* | With this parameter, Lazy will combine the event driven and delayed element loading.
|
||||
**attributes** | | |
|
||||
attribute | *string* | *'data-src'* | Name of the image tag `src` attribute, where the image path is stored.
|
||||
srcsetAttribute | *string* | *'data-srcset'* | Name of the image tag `srcset` attribute, where the source set is stored.
|
||||
sizesAttribute | *string* | *'data-sizes'* | Name of the image tag `sizes` attribute, where the size definition for source set is stored.
|
||||
retinaAttribute | *string* | *'data-retina'* | Name of the image tag attribute, where the path for optional retina image is stored.
|
||||
loaderAttribute | *string* | *'data-loader'* | Name or the element attribute, where the identifier of the plugin or customer loader is sored.
|
||||
imageBaseAttribute | *string* | *'data-imagebase'* | Name ot the image tag element, where the specific image base is stored. This will overwrite the global `imageBase` config.
|
||||
removeAttribute | *boolean* | *true* | Determine if the attribute should be removed from the element after loading.
|
||||
handledName | *string* | *'handled'* | Name of the element tag data attribute, to determine if element is already handled.
|
||||
loadedName | *string* | *'loaded'* | Name of the element tag data attribute, to determine if element is already loaded.
|
||||
**effect** | | |
|
||||
effect | *string* | *'show'* | Function name of the effect you want to use to show the loaded images, like `show` or `fadeIn`.
|
||||
effectTime | *integer* | *0* | Time in milliseconds the effect should use to view the image.
|
||||
**throttle** | | |
|
||||
enableThrottle | *boolean* | *true* | Throttle down the loading calls on scrolling event.
|
||||
throttle | *integer* | *250* | Time in milliseconds the throttle will use to limit the loading calls.
|
||||
**callbacks** | | |
|
||||
beforeLoad | *function* | *undefined* | Callback function, which will be called before the element gets loaded. Has current element and response function as parameters. `this` is the current Lazy instance.
|
||||
afterLoad | *function* | *undefined* | Callback function, which will be called after the element was loaded. Has current element and response function as parameters. `this` is the current Lazy instance.
|
||||
onError | *function* | *undefined* | Callback function, which will be called if the element could not be loaded. Has current element and response function as parameters. `this` is the current Lazy instance.
|
||||
onFinishedAll | *function* | *undefined* | Callback function, which will be called after all elements was loaded or returned an error. The callback has no parameters. `this` is the current Lazy instance.
|
||||
|
||||
|
||||
## Build and Validation
|
||||
This project includes an automated build script using `gulp`.
|
||||
To build your own versions of Lazy you need to [install it](#package-managers) via [npm](https://www.npmjs.com/package/jquery-lazy) first.
|
||||
Afterwards you can use the following command in your console to automatically generate all productive files.
|
||||
While building these files everything will be checked with `jshint` for validity too.
|
||||
```sh
|
||||
$ gulp build
|
||||
```
|
||||
|
||||
### Available `gulp` Tasks:
|
||||
|
||||
Name | Description
|
||||
-------------- | -----------
|
||||
build | check & build everything
|
||||
build-main | check & build main project file
|
||||
build-plugins | check & build single plugin files
|
||||
concat-plugins | build concatenated plugins file
|
||||
validate | check all files with `jshint`
|
||||
watch | watches all files to check & build everything on change
|
||||
|
||||
|
||||
## Bugs / Feature request
|
||||
Please [report](http://github.com/dkern/jquery.lazy/issues) bugs and feel free to [ask](http://github.com/dkern/jquery.lazy/issues) for new features directly on GitHub.
|
||||
|
||||
|
||||
## License
|
||||
Lazy is dual-licensed under [MIT](http://www.opensource.org/licenses/mit-license.php) and [GPL-2.0](http://www.gnu.org/licenses/gpl-2.0.html) license.
|
||||
|
||||
|
||||
## Donation
|
||||
_You like to support me?_
|
||||
_You appreciate my work?_
|
||||
_You use it in commercial projects?_
|
||||
|
||||
Feel free to make a little [donation](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FFL6VQJCUZMXC)! :wink:
|
||||
@@ -1,48 +0,0 @@
|
||||
{
|
||||
"name": "jquery-lazy",
|
||||
"description": "Lazy is a fast, feature-rich and lightweight delayed content loading plugin for jQuery and Zepto. It's designed to speed up page loading times and decrease traffic to your users by only loading the content in view. You can use Lazy in all vertical and horizontal scroll ways. It supports images in 'img' tags and backgrounds, supplied with css like 'background-image', by default. On those elements Lazy can set an default image or a placeholder while loading and supports retina displays as well. But Lazy is even able to load any other content you want by plugins and custom loaders.",
|
||||
"version": "1.7.11",
|
||||
"main": "jquery.lazy.min.js",
|
||||
"license": [
|
||||
"MIT",
|
||||
"GPL-2.0"
|
||||
],
|
||||
"ignore": [
|
||||
"*.md",
|
||||
"*.json"
|
||||
],
|
||||
"keywords": [
|
||||
"lazy",
|
||||
"lazyload",
|
||||
"load",
|
||||
"loader",
|
||||
"image",
|
||||
"images",
|
||||
"background",
|
||||
"content",
|
||||
"speed",
|
||||
"delay",
|
||||
"delayed",
|
||||
"pageload",
|
||||
"performance",
|
||||
"retina",
|
||||
"placeholder",
|
||||
"jquery",
|
||||
"jquery-plugin",
|
||||
"zepto",
|
||||
"zepto-plugin"
|
||||
],
|
||||
"authors": [{
|
||||
"name": "Daniel 'Eisbehr' Kern",
|
||||
"email": "jquery@eisbehr.de",
|
||||
"homepage": "http://www.eisbehr.de/"
|
||||
}],
|
||||
"homepage": "http://jquery.eisbehr.de/lazy/",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/dkern/jquery.lazy.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"jquery": ">=1.7.2"
|
||||
}
|
||||
}
|
||||
@@ -1,150 +0,0 @@
|
||||
"use strict";
|
||||
|
||||
var gulp = require("gulp");
|
||||
var util = require("gulp-util");
|
||||
var data = require("gulp-data");
|
||||
var noop = require("gulp-noop");
|
||||
var rename = require("gulp-rename");
|
||||
var header = require("gulp-header");
|
||||
var jshint = require("gulp-jshint");
|
||||
var uglify = require("gulp-uglify");
|
||||
var concat = require("gulp-concat-util");
|
||||
var pkg = require("./package.json");
|
||||
var nl = require("os").EOL;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** CONFIG & PATHS
|
||||
*/
|
||||
|
||||
|
||||
|
||||
var config = {
|
||||
header : "/*! jQuery & Zepto Lazy <%= info %> - <%= pkg.homepage %> - MIT&GPL-2.0 license - Copyright 2012-<%= year %> <%= pkg.author.name %> */",
|
||||
main : pkg.main,
|
||||
plugins : [
|
||||
"plugins/jquery.lazy.*.js",
|
||||
"!plugins/jquery.lazy.*.min.js"
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** PIPES
|
||||
*/
|
||||
|
||||
|
||||
|
||||
var pipes = {};
|
||||
|
||||
// check files with jshint
|
||||
pipes.validateFiles = function(files) {
|
||||
return gulp.src(files, {base: "./"})
|
||||
.pipe(jshint())
|
||||
.pipe(jshint.reporter("jshint-stylish"));
|
||||
};
|
||||
|
||||
// check all files
|
||||
pipes.validate = function() {
|
||||
return pipes.validateFiles([config.main].concat(config.plugins));
|
||||
};
|
||||
|
||||
// build main project file
|
||||
pipes.buildMain = function() {
|
||||
return pipes.validateFiles(config.main)
|
||||
.pipe(uglify())
|
||||
.pipe(header(config.header + nl, {
|
||||
pkg : pkg,
|
||||
info : "v" + pkg.version,
|
||||
year : new Date().getFullYear()
|
||||
}))
|
||||
.pipe(rename(function(path) {
|
||||
path.extname = ".min" + path.extname;
|
||||
}))
|
||||
.pipe(gulp.dest("./"));
|
||||
};
|
||||
|
||||
// build plugin files
|
||||
pipes.buildPlugins = function() {
|
||||
return pipes.validateFiles(config.plugins)
|
||||
.pipe(data(function(file) {
|
||||
var string = String(file.contents).split("\n")[1];
|
||||
var matches = string.match(/\s-\s([a-z ]+)\s-\sv([0-9.]+)/i);
|
||||
|
||||
return {
|
||||
info: "- " + matches[1] + " v" + matches[2]
|
||||
};
|
||||
}))
|
||||
.pipe(uglify())
|
||||
.pipe(header(config.header + nl, {
|
||||
pkg : pkg,
|
||||
year : new Date().getFullYear()
|
||||
}))
|
||||
.pipe(rename(function(path) {
|
||||
path.extname = ".min" + path.extname;
|
||||
}))
|
||||
.pipe(gulp.dest("./"));
|
||||
};
|
||||
|
||||
// concat plugin files
|
||||
pipes.concatPlugins = function() {
|
||||
return gulp.src(config.plugins)
|
||||
.pipe(concat(config.main.replace(".js", ".plugins.js"), {
|
||||
sep: nl + nl
|
||||
}))
|
||||
.pipe(gulp.dest("./"))
|
||||
.pipe(uglify())
|
||||
.pipe(header(config.header + nl, {
|
||||
pkg : pkg,
|
||||
info : "- All Plugins v" + pkg.version,
|
||||
year : new Date().getFullYear()
|
||||
}))
|
||||
.pipe(rename(function(path) {
|
||||
path.extname = ".min" + path.extname;
|
||||
}))
|
||||
.pipe(gulp.dest("./"));
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** TASKS
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// check & build everything
|
||||
gulp.task("build", ["build-main", "build-plugins", "concat-plugins"]);
|
||||
|
||||
// check & build main project file
|
||||
gulp.task("build-main", pipes.buildMain);
|
||||
|
||||
// check & build single plugin files
|
||||
gulp.task("build-plugins", pipes.buildPlugins);
|
||||
|
||||
// build concatenated plugins file
|
||||
gulp.task("concat-plugins", pipes.concatPlugins);
|
||||
|
||||
// check all files
|
||||
gulp.task("validate", pipes.validate);
|
||||
|
||||
// check, build & watch live changes
|
||||
gulp.task("watch", ["build"], function() {
|
||||
// watch main file
|
||||
gulp.watch(config.main, function() {
|
||||
var task = pipes.buildMain();
|
||||
util.log("updated", "'" + util.colors.red("main file") + "'");
|
||||
return task;
|
||||
});
|
||||
|
||||
// watch plugins
|
||||
gulp.watch(config.plugins, function() {
|
||||
var task = pipes.buildPlugins();
|
||||
util.log("updated", "'" + util.colors.red("plugins") + "'");
|
||||
pipes.concatPlugins();
|
||||
util.log("updated", "'" + util.colors.red("concatenated plugins file") + "'");
|
||||
return task;
|
||||
});
|
||||
});
|
||||
@@ -1,872 +0,0 @@
|
||||
/*!
|
||||
* jQuery & Zepto Lazy - v1.7.10
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2018, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
* $("img.lazy").lazy();
|
||||
*/
|
||||
|
||||
;(function(window, undefined) {
|
||||
"use strict";
|
||||
|
||||
// noinspection JSUnresolvedVariable
|
||||
/**
|
||||
* library instance - here and not in construct to be shorter in minimization
|
||||
* @return void
|
||||
*/
|
||||
var $ = window.jQuery || window.Zepto,
|
||||
|
||||
/**
|
||||
* unique plugin instance id counter
|
||||
* @type {number}
|
||||
*/
|
||||
lazyInstanceId = 0,
|
||||
|
||||
/**
|
||||
* helper to register window load for jQuery 3
|
||||
* @type {boolean}
|
||||
*/
|
||||
windowLoaded = false;
|
||||
|
||||
/**
|
||||
* make lazy available to jquery - and make it a bit more case-insensitive :)
|
||||
* @access public
|
||||
* @type {function}
|
||||
* @param {object} settings
|
||||
* @return {LazyPlugin}
|
||||
*/
|
||||
$.fn.Lazy = $.fn.lazy = function(settings) {
|
||||
return new LazyPlugin(this, settings);
|
||||
};
|
||||
|
||||
/**
|
||||
* helper to add plugins to lazy prototype configuration
|
||||
* @access public
|
||||
* @type {function}
|
||||
* @param {string|Array} names
|
||||
* @param {string|Array|function} [elements]
|
||||
* @param {function} loader
|
||||
* @return void
|
||||
*/
|
||||
$.Lazy = $.lazy = function(names, elements, loader) {
|
||||
// make second parameter optional
|
||||
if ($.isFunction(elements)) {
|
||||
loader = elements;
|
||||
elements = [];
|
||||
}
|
||||
|
||||
// exit here if parameter is not a callable function
|
||||
if (!$.isFunction(loader)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// make parameters an array of names to be sure
|
||||
names = $.isArray(names) ? names : [names];
|
||||
elements = $.isArray(elements) ? elements : [elements];
|
||||
|
||||
var config = LazyPlugin.prototype.config,
|
||||
forced = config._f || (config._f = {});
|
||||
|
||||
// add the loader plugin for every name
|
||||
for (var i = 0, l = names.length; i < l; i++) {
|
||||
if (config[names[i]] === undefined || $.isFunction(config[names[i]])) {
|
||||
config[names[i]] = loader;
|
||||
}
|
||||
}
|
||||
|
||||
// add forced elements loader
|
||||
for (var c = 0, a = elements.length; c < a; c++) {
|
||||
forced[elements[c]] = names[0];
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* contains all logic and the whole element handling
|
||||
* is packed in a private function outside class to reduce memory usage, because it will not be created on every plugin instance
|
||||
* @access private
|
||||
* @type {function}
|
||||
* @param {LazyPlugin} instance
|
||||
* @param {object} config
|
||||
* @param {object|Array} items
|
||||
* @param {object} events
|
||||
* @param {string} namespace
|
||||
* @return void
|
||||
*/
|
||||
function _executeLazy(instance, config, items, events, namespace) {
|
||||
/**
|
||||
* a helper to trigger the 'onFinishedAll' callback after all other events
|
||||
* @access private
|
||||
* @type {number}
|
||||
*/
|
||||
var _awaitingAfterLoad = 0,
|
||||
|
||||
/**
|
||||
* visible content width
|
||||
* @access private
|
||||
* @type {number}
|
||||
*/
|
||||
_actualWidth = -1,
|
||||
|
||||
/**
|
||||
* visible content height
|
||||
* @access private
|
||||
* @type {number}
|
||||
*/
|
||||
_actualHeight = -1,
|
||||
|
||||
/**
|
||||
* determine possibly detected high pixel density
|
||||
* @access private
|
||||
* @type {boolean}
|
||||
*/
|
||||
_isRetinaDisplay = false,
|
||||
|
||||
/**
|
||||
* dictionary entry for better minimization
|
||||
* @access private
|
||||
* @type {string}
|
||||
*/
|
||||
_afterLoad = 'afterLoad',
|
||||
|
||||
/**
|
||||
* dictionary entry for better minimization
|
||||
* @access private
|
||||
* @type {string}
|
||||
*/
|
||||
_load = 'load',
|
||||
|
||||
/**
|
||||
* dictionary entry for better minimization
|
||||
* @access private
|
||||
* @type {string}
|
||||
*/
|
||||
_error = 'error',
|
||||
|
||||
/**
|
||||
* dictionary entry for better minimization
|
||||
* @access private
|
||||
* @type {string}
|
||||
*/
|
||||
_img = 'img',
|
||||
|
||||
/**
|
||||
* dictionary entry for better minimization
|
||||
* @access private
|
||||
* @type {string}
|
||||
*/
|
||||
_src = 'src',
|
||||
|
||||
/**
|
||||
* dictionary entry for better minimization
|
||||
* @access private
|
||||
* @type {string}
|
||||
*/
|
||||
_srcset = 'srcset',
|
||||
|
||||
/**
|
||||
* dictionary entry for better minimization
|
||||
* @access private
|
||||
* @type {string}
|
||||
*/
|
||||
_sizes = 'sizes',
|
||||
|
||||
/**
|
||||
* dictionary entry for better minimization
|
||||
* @access private
|
||||
* @type {string}
|
||||
*/
|
||||
_backgroundImage = 'background-image';
|
||||
|
||||
/**
|
||||
* initialize plugin
|
||||
* bind loading to events or set delay time to load all items at once
|
||||
* @access private
|
||||
* @return void
|
||||
*/
|
||||
function _initialize() {
|
||||
// detect actual device pixel ratio
|
||||
// noinspection JSUnresolvedVariable
|
||||
_isRetinaDisplay = window.devicePixelRatio > 1;
|
||||
|
||||
// prepare all initial items
|
||||
items = _prepareItems(items);
|
||||
|
||||
// if delay time is set load all items at once after delay time
|
||||
if (config.delay >= 0) {
|
||||
setTimeout(function() {
|
||||
_lazyLoadItems(true);
|
||||
}, config.delay);
|
||||
}
|
||||
|
||||
// if no delay is set or combine usage is active bind events
|
||||
if (config.delay < 0 || config.combined) {
|
||||
// create unique event function
|
||||
events.e = _throttle(config.throttle, function(event) {
|
||||
// reset detected window size on resize event
|
||||
if (event.type === 'resize') {
|
||||
_actualWidth = _actualHeight = -1;
|
||||
}
|
||||
|
||||
// execute 'lazy magic'
|
||||
_lazyLoadItems(event.all);
|
||||
});
|
||||
|
||||
// create function to add new items to instance
|
||||
events.a = function(additionalItems) {
|
||||
additionalItems = _prepareItems(additionalItems);
|
||||
items.push.apply(items, additionalItems);
|
||||
};
|
||||
|
||||
// create function to get all instance items left
|
||||
events.g = function() {
|
||||
// filter loaded items before return in case internal filter was not running until now
|
||||
return (items = $(items).filter(function() {
|
||||
return !$(this).data(config.loadedName);
|
||||
}));
|
||||
};
|
||||
|
||||
// create function to force loading elements
|
||||
events.f = function(forcedItems) {
|
||||
for (var i = 0; i < forcedItems.length; i++) {
|
||||
// only handle item if available in current instance
|
||||
// use a compare function, because Zepto can't handle object parameter for filter
|
||||
// var item = items.filter(forcedItems[i]);
|
||||
/* jshint loopfunc: true */
|
||||
var item = items.filter(function() {
|
||||
return this === forcedItems[i];
|
||||
});
|
||||
|
||||
if (item.length) {
|
||||
_lazyLoadItems(false, item);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// load initial items
|
||||
_lazyLoadItems();
|
||||
|
||||
// bind lazy load functions to scroll and resize event
|
||||
// noinspection JSUnresolvedVariable
|
||||
$(config.appendScroll).on('scroll.' + namespace + ' resize.' + namespace, events.e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* prepare items before handle them
|
||||
* @access private
|
||||
* @param {Array|object|jQuery} items
|
||||
* @return {Array|object|jQuery}
|
||||
*/
|
||||
function _prepareItems(items) {
|
||||
// fetch used configurations before loops
|
||||
var defaultImage = config.defaultImage,
|
||||
placeholder = config.placeholder,
|
||||
imageBase = config.imageBase,
|
||||
srcsetAttribute = config.srcsetAttribute,
|
||||
loaderAttribute = config.loaderAttribute,
|
||||
forcedTags = config._f || {};
|
||||
|
||||
// filter items and only add those who not handled yet and got needed attributes available
|
||||
items = $(items).filter(function() {
|
||||
var element = $(this),
|
||||
tag = _getElementTagName(this);
|
||||
|
||||
return !element.data(config.handledName) &&
|
||||
(element.attr(config.attribute) || element.attr(srcsetAttribute) || element.attr(loaderAttribute) || forcedTags[tag] !== undefined);
|
||||
})
|
||||
|
||||
// append plugin instance to all elements
|
||||
.data('plugin_' + config.name, instance);
|
||||
|
||||
for (var i = 0, l = items.length; i < l; i++) {
|
||||
var element = $(items[i]),
|
||||
tag = _getElementTagName(items[i]),
|
||||
elementImageBase = element.attr(config.imageBaseAttribute) || imageBase;
|
||||
|
||||
// generate and update source set if an image base is set
|
||||
if (tag === _img && elementImageBase && element.attr(srcsetAttribute)) {
|
||||
element.attr(srcsetAttribute, _getCorrectedSrcSet(element.attr(srcsetAttribute), elementImageBase));
|
||||
}
|
||||
|
||||
// add loader to forced element types
|
||||
if (forcedTags[tag] !== undefined && !element.attr(loaderAttribute)) {
|
||||
element.attr(loaderAttribute, forcedTags[tag]);
|
||||
}
|
||||
|
||||
// set default image on every element without source
|
||||
if (tag === _img && defaultImage && !element.attr(_src)) {
|
||||
element.attr(_src, defaultImage);
|
||||
}
|
||||
|
||||
// set placeholder on every element without background image
|
||||
else if (tag !== _img && placeholder && (!element.css(_backgroundImage) || element.css(_backgroundImage) === 'none')) {
|
||||
element.css(_backgroundImage, "url('" + placeholder + "')");
|
||||
}
|
||||
}
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
/**
|
||||
* the 'lazy magic' - check all items
|
||||
* @access private
|
||||
* @param {boolean} [allItems]
|
||||
* @param {object} [forced]
|
||||
* @return void
|
||||
*/
|
||||
function _lazyLoadItems(allItems, forced) {
|
||||
// skip if no items where left
|
||||
if (!items.length) {
|
||||
// destroy instance if option is enabled
|
||||
if (config.autoDestroy) {
|
||||
// noinspection JSUnresolvedFunction
|
||||
instance.destroy();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var elements = forced || items,
|
||||
loadTriggered = false,
|
||||
imageBase = config.imageBase || '',
|
||||
srcsetAttribute = config.srcsetAttribute,
|
||||
handledName = config.handledName;
|
||||
|
||||
// loop all available items
|
||||
for (var i = 0; i < elements.length; i++) {
|
||||
// item is at least in loadable area
|
||||
if (allItems || forced || _isInLoadableArea(elements[i])) {
|
||||
var element = $(elements[i]),
|
||||
tag = _getElementTagName(elements[i]),
|
||||
attribute = element.attr(config.attribute),
|
||||
elementImageBase = element.attr(config.imageBaseAttribute) || imageBase,
|
||||
customLoader = element.attr(config.loaderAttribute);
|
||||
|
||||
// is not already handled
|
||||
if (!element.data(handledName) &&
|
||||
// and is visible or visibility doesn't matter
|
||||
(!config.visibleOnly || element.is(':visible')) && (
|
||||
// and image source or source set attribute is available
|
||||
(attribute || element.attr(srcsetAttribute)) && (
|
||||
// and is image tag where attribute is not equal source or source set
|
||||
(tag === _img && (elementImageBase + attribute !== element.attr(_src) || element.attr(srcsetAttribute) !== element.attr(_srcset))) ||
|
||||
// or is non image tag where attribute is not equal background
|
||||
(tag !== _img && elementImageBase + attribute !== element.css(_backgroundImage))
|
||||
) ||
|
||||
// or custom loader is available
|
||||
customLoader))
|
||||
{
|
||||
// mark element always as handled as this point to prevent double handling
|
||||
loadTriggered = true;
|
||||
element.data(handledName, true);
|
||||
|
||||
// load item
|
||||
_handleItem(element, tag, elementImageBase, customLoader);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// when something was loaded remove them from remaining items
|
||||
if (loadTriggered) {
|
||||
items = $(items).filter(function() {
|
||||
return !$(this).data(handledName);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* load the given element the lazy way
|
||||
* @access private
|
||||
* @param {object} element
|
||||
* @param {string} tag
|
||||
* @param {string} imageBase
|
||||
* @param {function} [customLoader]
|
||||
* @return void
|
||||
*/
|
||||
function _handleItem(element, tag, imageBase, customLoader) {
|
||||
// increment count of items waiting for after load
|
||||
++_awaitingAfterLoad;
|
||||
|
||||
// extended error callback for correct 'onFinishedAll' handling
|
||||
var errorCallback = function() {
|
||||
_triggerCallback('onError', element);
|
||||
_reduceAwaiting();
|
||||
|
||||
// prevent further callback calls
|
||||
errorCallback = $.noop;
|
||||
};
|
||||
|
||||
// trigger function before loading image
|
||||
_triggerCallback('beforeLoad', element);
|
||||
|
||||
// fetch all double used data here for better code minimization
|
||||
var srcAttribute = config.attribute,
|
||||
srcsetAttribute = config.srcsetAttribute,
|
||||
sizesAttribute = config.sizesAttribute,
|
||||
retinaAttribute = config.retinaAttribute,
|
||||
removeAttribute = config.removeAttribute,
|
||||
loadedName = config.loadedName,
|
||||
elementRetina = element.attr(retinaAttribute);
|
||||
|
||||
// handle custom loader
|
||||
if (customLoader) {
|
||||
// on load callback
|
||||
var loadCallback = function() {
|
||||
// remove attribute from element
|
||||
if (removeAttribute) {
|
||||
element.removeAttr(config.loaderAttribute);
|
||||
}
|
||||
|
||||
// mark element as loaded
|
||||
element.data(loadedName, true);
|
||||
|
||||
// call after load event
|
||||
_triggerCallback(_afterLoad, element);
|
||||
|
||||
// remove item from waiting queue and possibly trigger finished event
|
||||
// it's needed to be asynchronous to run after filter was in _lazyLoadItems
|
||||
setTimeout(_reduceAwaiting, 1);
|
||||
|
||||
// prevent further callback calls
|
||||
loadCallback = $.noop;
|
||||
};
|
||||
|
||||
// bind error event to trigger callback and reduce waiting amount
|
||||
element.off(_error).one(_error, errorCallback)
|
||||
|
||||
// bind after load callback to element
|
||||
.one(_load, loadCallback);
|
||||
|
||||
// trigger custom loader and handle response
|
||||
if (!_triggerCallback(customLoader, element, function(response) {
|
||||
if(response) {
|
||||
element.off(_load);
|
||||
loadCallback();
|
||||
}
|
||||
else {
|
||||
element.off(_error);
|
||||
errorCallback();
|
||||
}
|
||||
})) {
|
||||
element.trigger(_error);
|
||||
}
|
||||
}
|
||||
|
||||
// handle images
|
||||
else {
|
||||
// create image object
|
||||
var imageObj = $(new Image());
|
||||
|
||||
// bind error event to trigger callback and reduce waiting amount
|
||||
imageObj.one(_error, errorCallback)
|
||||
|
||||
// bind after load callback to image
|
||||
.one(_load, function() {
|
||||
// remove element from view
|
||||
element.hide();
|
||||
|
||||
// set image back to element
|
||||
// do it as single 'attr' calls, to be sure 'src' is set after 'srcset'
|
||||
if (tag === _img) {
|
||||
element.attr(_sizes, imageObj.attr(_sizes))
|
||||
.attr(_srcset, imageObj.attr(_srcset))
|
||||
.attr(_src, imageObj.attr(_src));
|
||||
}
|
||||
else {
|
||||
element.css(_backgroundImage, "url('" + imageObj.attr(_src) + "')");
|
||||
}
|
||||
|
||||
// bring it back with some effect!
|
||||
element[config.effect](config.effectTime);
|
||||
|
||||
// remove attribute from element
|
||||
if (removeAttribute) {
|
||||
element.removeAttr(srcAttribute + ' ' + srcsetAttribute + ' ' + retinaAttribute + ' ' + config.imageBaseAttribute);
|
||||
|
||||
// only remove 'sizes' attribute, if it was a custom one
|
||||
if (sizesAttribute !== _sizes) {
|
||||
element.removeAttr(sizesAttribute);
|
||||
}
|
||||
}
|
||||
|
||||
// mark element as loaded
|
||||
element.data(loadedName, true);
|
||||
|
||||
// call after load event
|
||||
_triggerCallback(_afterLoad, element);
|
||||
|
||||
// cleanup image object
|
||||
imageObj.remove();
|
||||
|
||||
// remove item from waiting queue and possibly trigger finished event
|
||||
_reduceAwaiting();
|
||||
});
|
||||
|
||||
// set sources
|
||||
// do it as single 'attr' calls, to be sure 'src' is set after 'srcset'
|
||||
var imageSrc = (_isRetinaDisplay && elementRetina ? elementRetina : element.attr(srcAttribute)) || '';
|
||||
imageObj.attr(_sizes, element.attr(sizesAttribute))
|
||||
.attr(_srcset, element.attr(srcsetAttribute))
|
||||
.attr(_src, imageSrc ? imageBase + imageSrc : null);
|
||||
|
||||
// call after load even on cached image
|
||||
imageObj.complete && imageObj.trigger(_load); // jshint ignore : line
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* check if the given element is inside the current viewport or threshold
|
||||
* @access private
|
||||
* @param {object} element
|
||||
* @return {boolean}
|
||||
*/
|
||||
function _isInLoadableArea(element) {
|
||||
var elementBound = element.getBoundingClientRect(),
|
||||
direction = config.scrollDirection,
|
||||
threshold = config.threshold,
|
||||
vertical = // check if element is in loadable area from top
|
||||
((_getActualHeight() + threshold) > elementBound.top) &&
|
||||
// check if element is even in loadable are from bottom
|
||||
(-threshold < elementBound.bottom),
|
||||
horizontal = // check if element is in loadable area from left
|
||||
((_getActualWidth() + threshold) > elementBound.left) &&
|
||||
// check if element is even in loadable area from right
|
||||
(-threshold < elementBound.right);
|
||||
|
||||
if (direction === 'vertical') {
|
||||
return vertical;
|
||||
}
|
||||
else if (direction === 'horizontal') {
|
||||
return horizontal;
|
||||
}
|
||||
|
||||
return vertical && horizontal;
|
||||
}
|
||||
|
||||
/**
|
||||
* receive the current viewed width of the browser
|
||||
* @access private
|
||||
* @return {number}
|
||||
*/
|
||||
function _getActualWidth() {
|
||||
return _actualWidth >= 0 ? _actualWidth : (_actualWidth = $(window).width());
|
||||
}
|
||||
|
||||
/**
|
||||
* receive the current viewed height of the browser
|
||||
* @access private
|
||||
* @return {number}
|
||||
*/
|
||||
function _getActualHeight() {
|
||||
return _actualHeight >= 0 ? _actualHeight : (_actualHeight = $(window).height());
|
||||
}
|
||||
|
||||
/**
|
||||
* get lowercase tag name of an element
|
||||
* @access private
|
||||
* @param {object} element
|
||||
* @returns {string}
|
||||
*/
|
||||
function _getElementTagName(element) {
|
||||
return element.tagName.toLowerCase();
|
||||
}
|
||||
|
||||
/**
|
||||
* prepend image base to all srcset entries
|
||||
* @access private
|
||||
* @param {string} srcset
|
||||
* @param {string} imageBase
|
||||
* @returns {string}
|
||||
*/
|
||||
function _getCorrectedSrcSet(srcset, imageBase) {
|
||||
if (imageBase) {
|
||||
// trim, remove unnecessary spaces and split entries
|
||||
var entries = srcset.split(',');
|
||||
srcset = '';
|
||||
|
||||
for (var i = 0, l = entries.length; i < l; i++) {
|
||||
srcset += imageBase + entries[i].trim() + (i !== l - 1 ? ',' : '');
|
||||
}
|
||||
}
|
||||
|
||||
return srcset;
|
||||
}
|
||||
|
||||
/**
|
||||
* helper function to throttle down event triggering
|
||||
* @access private
|
||||
* @param {number} delay
|
||||
* @param {function} callback
|
||||
* @return {function}
|
||||
*/
|
||||
function _throttle(delay, callback) {
|
||||
var timeout,
|
||||
lastExecute = 0;
|
||||
|
||||
return function(event, ignoreThrottle) {
|
||||
var elapsed = +new Date() - lastExecute;
|
||||
|
||||
function run() {
|
||||
lastExecute = +new Date();
|
||||
// noinspection JSUnresolvedFunction
|
||||
callback.call(instance, event);
|
||||
}
|
||||
|
||||
timeout && clearTimeout(timeout); // jshint ignore : line
|
||||
|
||||
if (elapsed > delay || !config.enableThrottle || ignoreThrottle) {
|
||||
run();
|
||||
}
|
||||
else {
|
||||
timeout = setTimeout(run, delay - elapsed);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* reduce count of awaiting elements to 'afterLoad' event and fire 'onFinishedAll' if reached zero
|
||||
* @access private
|
||||
* @return void
|
||||
*/
|
||||
function _reduceAwaiting() {
|
||||
--_awaitingAfterLoad;
|
||||
|
||||
// if no items were left trigger finished event
|
||||
if (!items.length && !_awaitingAfterLoad) {
|
||||
_triggerCallback('onFinishedAll');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* single implementation to handle callbacks, pass element and set 'this' to current instance
|
||||
* @access private
|
||||
* @param {string|function} callback
|
||||
* @param {object} [element]
|
||||
* @param {*} [args]
|
||||
* @return {boolean}
|
||||
*/
|
||||
function _triggerCallback(callback, element, args) {
|
||||
if ((callback = config[callback])) {
|
||||
// jQuery's internal '$(arguments).slice(1)' are causing problems at least on old iPads
|
||||
// below is shorthand of 'Array.prototype.slice.call(arguments, 1)'
|
||||
callback.apply(instance, [].slice.call(arguments, 1));
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// if event driven or window is already loaded don't wait for page loading
|
||||
if (config.bind === 'event' || windowLoaded) {
|
||||
_initialize();
|
||||
}
|
||||
|
||||
// otherwise load initial items and start lazy after page load
|
||||
else {
|
||||
// noinspection JSUnresolvedVariable
|
||||
$(window).on(_load + '.' + namespace, _initialize);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* lazy plugin class constructor
|
||||
* @constructor
|
||||
* @access private
|
||||
* @param {object} elements
|
||||
* @param {object} settings
|
||||
* @return {object|LazyPlugin}
|
||||
*/
|
||||
function LazyPlugin(elements, settings) {
|
||||
/**
|
||||
* this lazy plugin instance
|
||||
* @access private
|
||||
* @type {object|LazyPlugin|LazyPlugin.prototype}
|
||||
*/
|
||||
var _instance = this,
|
||||
|
||||
/**
|
||||
* this lazy plugin instance configuration
|
||||
* @access private
|
||||
* @type {object}
|
||||
*/
|
||||
_config = $.extend({}, _instance.config, settings),
|
||||
|
||||
/**
|
||||
* instance generated event executed on container scroll or resize
|
||||
* packed in an object to be referenceable and short named because properties will not be minified
|
||||
* @access private
|
||||
* @type {object}
|
||||
*/
|
||||
_events = {},
|
||||
|
||||
/**
|
||||
* unique namespace for instance related events
|
||||
* @access private
|
||||
* @type {string}
|
||||
*/
|
||||
_namespace = _config.name + '-' + (++lazyInstanceId);
|
||||
|
||||
// noinspection JSUndefinedPropertyAssignment
|
||||
/**
|
||||
* wrapper to get or set an entry from plugin instance configuration
|
||||
* much smaller on minify as direct access
|
||||
* @access public
|
||||
* @type {function}
|
||||
* @param {string} entryName
|
||||
* @param {*} [value]
|
||||
* @return {LazyPlugin|*}
|
||||
*/
|
||||
_instance.config = function(entryName, value) {
|
||||
if (value === undefined) {
|
||||
return _config[entryName];
|
||||
}
|
||||
|
||||
_config[entryName] = value;
|
||||
return _instance;
|
||||
};
|
||||
|
||||
// noinspection JSUndefinedPropertyAssignment
|
||||
/**
|
||||
* add additional items to current instance
|
||||
* @access public
|
||||
* @param {Array|object|string} items
|
||||
* @return {LazyPlugin}
|
||||
*/
|
||||
_instance.addItems = function(items) {
|
||||
_events.a && _events.a($.type(items) === 'string' ? $(items) : items); // jshint ignore : line
|
||||
return _instance;
|
||||
};
|
||||
|
||||
// noinspection JSUndefinedPropertyAssignment
|
||||
/**
|
||||
* get all left items of this instance
|
||||
* @access public
|
||||
* @returns {object}
|
||||
*/
|
||||
_instance.getItems = function() {
|
||||
return _events.g ? _events.g() : {};
|
||||
};
|
||||
|
||||
// noinspection JSUndefinedPropertyAssignment
|
||||
/**
|
||||
* force lazy to load all items in loadable area right now
|
||||
* by default without throttle
|
||||
* @access public
|
||||
* @type {function}
|
||||
* @param {boolean} [useThrottle]
|
||||
* @return {LazyPlugin}
|
||||
*/
|
||||
_instance.update = function(useThrottle) {
|
||||
_events.e && _events.e({}, !useThrottle); // jshint ignore : line
|
||||
return _instance;
|
||||
};
|
||||
|
||||
// noinspection JSUndefinedPropertyAssignment
|
||||
/**
|
||||
* force element(s) to load directly, ignoring the viewport
|
||||
* @access public
|
||||
* @param {Array|object|string} items
|
||||
* @return {LazyPlugin}
|
||||
*/
|
||||
_instance.force = function(items) {
|
||||
_events.f && _events.f($.type(items) === 'string' ? $(items) : items); // jshint ignore : line
|
||||
return _instance;
|
||||
};
|
||||
|
||||
// noinspection JSUndefinedPropertyAssignment
|
||||
/**
|
||||
* force lazy to load all available items right now
|
||||
* this call ignores throttling
|
||||
* @access public
|
||||
* @type {function}
|
||||
* @return {LazyPlugin}
|
||||
*/
|
||||
_instance.loadAll = function() {
|
||||
_events.e && _events.e({all: true}, true); // jshint ignore : line
|
||||
return _instance;
|
||||
};
|
||||
|
||||
// noinspection JSUndefinedPropertyAssignment
|
||||
/**
|
||||
* destroy this plugin instance
|
||||
* @access public
|
||||
* @type {function}
|
||||
* @return undefined
|
||||
*/
|
||||
_instance.destroy = function() {
|
||||
// unbind instance generated events
|
||||
// noinspection JSUnresolvedFunction, JSUnresolvedVariable
|
||||
$(_config.appendScroll).off('.' + _namespace, _events.e);
|
||||
// noinspection JSUnresolvedVariable
|
||||
$(window).off('.' + _namespace);
|
||||
|
||||
// clear events
|
||||
_events = {};
|
||||
|
||||
return undefined;
|
||||
};
|
||||
|
||||
// start using lazy and return all elements to be chainable or instance for further use
|
||||
// noinspection JSUnresolvedVariable
|
||||
_executeLazy(_instance, _config, elements, _events, _namespace);
|
||||
return _config.chainable ? elements : _instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* settings and configuration data
|
||||
* @access public
|
||||
* @type {object|*}
|
||||
*/
|
||||
LazyPlugin.prototype.config = {
|
||||
// general
|
||||
name : 'lazy',
|
||||
chainable : true,
|
||||
autoDestroy : true,
|
||||
bind : 'load',
|
||||
threshold : 500,
|
||||
visibleOnly : false,
|
||||
appendScroll : window,
|
||||
scrollDirection : 'both',
|
||||
imageBase : null,
|
||||
defaultImage : 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==',
|
||||
placeholder : null,
|
||||
delay : -1,
|
||||
combined : false,
|
||||
|
||||
// attributes
|
||||
attribute : 'data-src',
|
||||
srcsetAttribute : 'data-srcset',
|
||||
sizesAttribute : 'data-sizes',
|
||||
retinaAttribute : 'data-retina',
|
||||
loaderAttribute : 'data-loader',
|
||||
imageBaseAttribute : 'data-imagebase',
|
||||
removeAttribute : true,
|
||||
handledName : 'handled',
|
||||
loadedName : 'loaded',
|
||||
|
||||
// effect
|
||||
effect : 'show',
|
||||
effectTime : 0,
|
||||
|
||||
// throttle
|
||||
enableThrottle : true,
|
||||
throttle : 250,
|
||||
|
||||
// callbacks
|
||||
beforeLoad : undefined,
|
||||
afterLoad : undefined,
|
||||
onError : undefined,
|
||||
onFinishedAll : undefined
|
||||
};
|
||||
|
||||
// register window load event globally to prevent not loading elements
|
||||
// since jQuery 3.X ready state is fully async and may be executed after 'load'
|
||||
$(window).on('load', function() {
|
||||
windowLoaded = true;
|
||||
});
|
||||
})(window);
|
||||
@@ -1,2 +0,0 @@
|
||||
/*! jQuery & Zepto Lazy v1.7.10 - http://jquery.eisbehr.de/lazy - MIT&GPL-2.0 license - Copyright 2012-2018 Daniel 'Eisbehr' Kern */
|
||||
!function(t,e){"use strict";function r(r,a,i,u,l){function f(){L=t.devicePixelRatio>1,i=c(i),a.delay>=0&&setTimeout(function(){s(!0)},a.delay),(a.delay<0||a.combined)&&(u.e=v(a.throttle,function(t){"resize"===t.type&&(w=B=-1),s(t.all)}),u.a=function(t){t=c(t),i.push.apply(i,t)},u.g=function(){return i=n(i).filter(function(){return!n(this).data(a.loadedName)})},u.f=function(t){for(var e=0;e<t.length;e++){var r=i.filter(function(){return this===t[e]});r.length&&s(!1,r)}},s(),n(a.appendScroll).on("scroll."+l+" resize."+l,u.e))}function c(t){var i=a.defaultImage,o=a.placeholder,u=a.imageBase,l=a.srcsetAttribute,f=a.loaderAttribute,c=a._f||{};t=n(t).filter(function(){var t=n(this),r=m(this);return!t.data(a.handledName)&&(t.attr(a.attribute)||t.attr(l)||t.attr(f)||c[r]!==e)}).data("plugin_"+a.name,r);for(var s=0,d=t.length;s<d;s++){var A=n(t[s]),g=m(t[s]),h=A.attr(a.imageBaseAttribute)||u;g===N&&h&&A.attr(l)&&A.attr(l,b(A.attr(l),h)),c[g]===e||A.attr(f)||A.attr(f,c[g]),g===N&&i&&!A.attr(E)?A.attr(E,i):g===N||!o||A.css(O)&&"none"!==A.css(O)||A.css(O,"url('"+o+"')")}return t}function s(t,e){if(!i.length)return void(a.autoDestroy&&r.destroy());for(var o=e||i,u=!1,l=a.imageBase||"",f=a.srcsetAttribute,c=a.handledName,s=0;s<o.length;s++)if(t||e||A(o[s])){var g=n(o[s]),h=m(o[s]),b=g.attr(a.attribute),v=g.attr(a.imageBaseAttribute)||l,p=g.attr(a.loaderAttribute);g.data(c)||a.visibleOnly&&!g.is(":visible")||!((b||g.attr(f))&&(h===N&&(v+b!==g.attr(E)||g.attr(f)!==g.attr(F))||h!==N&&v+b!==g.css(O))||p)||(u=!0,g.data(c,!0),d(g,h,v,p))}u&&(i=n(i).filter(function(){return!n(this).data(c)}))}function d(t,e,r,i){++z;var o=function(){y("onError",t),p(),o=n.noop};y("beforeLoad",t);var u=a.attribute,l=a.srcsetAttribute,f=a.sizesAttribute,c=a.retinaAttribute,s=a.removeAttribute,d=a.loadedName,A=t.attr(c);if(i){var g=function(){s&&t.removeAttr(a.loaderAttribute),t.data(d,!0),y(T,t),setTimeout(p,1),g=n.noop};t.off(I).one(I,o).one(D,g),y(i,t,function(e){e?(t.off(D),g()):(t.off(I),o())})||t.trigger(I)}else{var h=n(new Image);h.one(I,o).one(D,function(){t.hide(),e===N?t.attr(C,h.attr(C)).attr(F,h.attr(F)).attr(E,h.attr(E)):t.css(O,"url('"+h.attr(E)+"')"),t[a.effect](a.effectTime),s&&(t.removeAttr(u+" "+l+" "+c+" "+a.imageBaseAttribute),f!==C&&t.removeAttr(f)),t.data(d,!0),y(T,t),h.remove(),p()});var m=(L&&A?A:t.attr(u))||"";h.attr(C,t.attr(f)).attr(F,t.attr(l)).attr(E,m?r+m:null),h.complete&&h.trigger(D)}}function A(t){var e=t.getBoundingClientRect(),r=a.scrollDirection,n=a.threshold,i=h()+n>e.top&&-n<e.bottom,o=g()+n>e.left&&-n<e.right;return"vertical"===r?i:"horizontal"===r?o:i&&o}function g(){return w>=0?w:w=n(t).width()}function h(){return B>=0?B:B=n(t).height()}function m(t){return t.tagName.toLowerCase()}function b(t,e){if(e){var r=t.split(",");t="";for(var a=0,n=r.length;a<n;a++)t+=e+r[a].trim()+(a!==n-1?",":"")}return t}function v(t,e){var n,i=0;return function(o,u){function l(){i=+new Date,e.call(r,o)}var f=+new Date-i;n&&clearTimeout(n),f>t||!a.enableThrottle||u?l():n=setTimeout(l,t-f)}}function p(){--z,i.length||z||y("onFinishedAll")}function y(t,e,n){return!!(t=a[t])&&(t.apply(r,[].slice.call(arguments,1)),!0)}var z=0,w=-1,B=-1,L=!1,T="afterLoad",D="load",I="error",N="img",E="src",F="srcset",C="sizes",O="background-image";"event"===a.bind||o?f():n(t).on(D+"."+l,f)}function a(a,o){var u=this,l=n.extend({},u.config,o),f={},c=l.name+"-"+ ++i;return u.config=function(t,r){return r===e?l[t]:(l[t]=r,u)},u.addItems=function(t){return f.a&&f.a("string"===n.type(t)?n(t):t),u},u.getItems=function(){return f.g?f.g():{}},u.update=function(t){return f.e&&f.e({},!t),u},u.force=function(t){return f.f&&f.f("string"===n.type(t)?n(t):t),u},u.loadAll=function(){return f.e&&f.e({all:!0},!0),u},u.destroy=function(){return n(l.appendScroll).off("."+c,f.e),n(t).off("."+c),f={},e},r(u,l,a,f,c),l.chainable?a:u}var n=t.jQuery||t.Zepto,i=0,o=!1;n.fn.Lazy=n.fn.lazy=function(t){return new a(this,t)},n.Lazy=n.lazy=function(t,r,i){if(n.isFunction(r)&&(i=r,r=[]),n.isFunction(i)){t=n.isArray(t)?t:[t],r=n.isArray(r)?r:[r];for(var o=a.prototype.config,u=o._f||(o._f={}),l=0,f=t.length;l<f;l++)(o[t[l]]===e||n.isFunction(o[t[l]]))&&(o[t[l]]=i);for(var c=0,s=r.length;c<s;c++)u[r[c]]=t[0]}},a.prototype.config={name:"lazy",chainable:!0,autoDestroy:!0,bind:"load",threshold:500,visibleOnly:!1,appendScroll:t,scrollDirection:"both",imageBase:null,defaultImage:"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",placeholder:null,delay:-1,combined:!1,attribute:"data-src",srcsetAttribute:"data-srcset",sizesAttribute:"data-sizes",retinaAttribute:"data-retina",loaderAttribute:"data-loader",imageBaseAttribute:"data-imagebase",removeAttribute:!0,handledName:"handled",loadedName:"loaded",effect:"show",effectTime:0,enableThrottle:!0,throttle:250,beforeLoad:e,afterLoad:e,onError:e,onFinishedAll:e},n(t).on("load",function(){o=!0})}(window);
|
||||
@@ -1,606 +0,0 @@
|
||||
/*!
|
||||
* jQuery & Zepto Lazy - AJAX Plugin - v1.4
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2018, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
;(function($) {
|
||||
// load data by ajax request and pass them to elements inner html, like:
|
||||
// <div data-loader="ajax" data-src="url.html" data-method="post" data-type="html"></div>
|
||||
$.lazy('ajax', function(element, response) {
|
||||
ajaxRequest(this, element, response, element.attr('data-method'));
|
||||
});
|
||||
|
||||
// load data by ajax get request and pass them to elements inner html, like:
|
||||
// <div data-loader="get" data-src="url.html" data-type="html"></div>
|
||||
$.lazy('get', function(element, response) {
|
||||
ajaxRequest(this, element, response, 'GET');
|
||||
});
|
||||
|
||||
// load data by ajax post request and pass them to elements inner html, like:
|
||||
// <div data-loader="post" data-src="url.html" data-type="html"></div>
|
||||
$.lazy('post', function(element, response) {
|
||||
ajaxRequest(this, element, response, 'POST');
|
||||
});
|
||||
|
||||
// load data by ajax put request and pass them to elements inner html, like:
|
||||
// <div data-loader="put" data-src="url.html" data-type="html"></div>
|
||||
$.lazy('put', function(element, response) {
|
||||
ajaxRequest(this, element, response, 'PUT');
|
||||
});
|
||||
|
||||
/**
|
||||
* execute ajax request and handle response
|
||||
* @param {object} instance
|
||||
* @param {jQuery|object} element
|
||||
* @param {function} response
|
||||
* @param {string} [method]
|
||||
*/
|
||||
function ajaxRequest(instance, element, response, method) {
|
||||
method = method ? method.toUpperCase() : 'GET';
|
||||
|
||||
var data;
|
||||
if ((method === 'POST' || method === 'PUT') && instance.config('ajaxCreateData')) {
|
||||
data = instance.config('ajaxCreateData').apply(instance, [element]);
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: element.attr('data-src'),
|
||||
type: method === 'POST' || method === 'PUT' ? method : 'GET',
|
||||
data: data,
|
||||
dataType: element.attr('data-type') || 'html',
|
||||
|
||||
/**
|
||||
* success callback
|
||||
* @access private
|
||||
* @param {*} content
|
||||
* @return {void}
|
||||
*/
|
||||
success: function(content) {
|
||||
// set responded data to element's inner html
|
||||
element.html(content);
|
||||
|
||||
// use response function for Zepto
|
||||
response(true);
|
||||
|
||||
// remove attributes
|
||||
if (instance.config('removeAttribute')) {
|
||||
element.removeAttr('data-src data-method data-type');
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* error callback
|
||||
* @access private
|
||||
* @return {void}
|
||||
*/
|
||||
error: function() {
|
||||
// pass error state to lazy
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
})(window.jQuery || window.Zepto);
|
||||
|
||||
/*!
|
||||
* jQuery & Zepto Lazy - AV Plugin - v1.4
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2018, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
;(function($) {
|
||||
// loads audio and video tags including tracks by two ways, like:
|
||||
// <audio>
|
||||
// <data-src src="audio.ogg" type="video/ogg"></data-src>
|
||||
// <data-src src="audio.mp3" type="video/mp3"></data-src>
|
||||
// </audio>
|
||||
// <video data-poster="poster.jpg">
|
||||
// <data-src src="video.ogv" type="video/ogv"></data-src>
|
||||
// <data-src src="video.webm" type="video/webm"></data-src>
|
||||
// <data-src src="video.mp4" type="video/mp4"></data-src>
|
||||
// <data-track kind="captions" src="captions.vtt" srclang="en"></data-track>
|
||||
// <data-track kind="descriptions" src="descriptions.vtt" srclang="en"></data-track>
|
||||
// <data-track kind="subtitles" src="subtitles.vtt" srclang="de"></data-track>
|
||||
// </video>
|
||||
//
|
||||
// or:
|
||||
// <audio data-src="audio.ogg|video/ogg,video.mp3|video/mp3"></video>
|
||||
// <video data-poster="poster.jpg" data-src="video.ogv|video/ogv,video.webm|video/webm,video.mp4|video/mp4">
|
||||
// <data-track kind="captions" src="captions.vtt" srclang="en"></data-track>
|
||||
// <data-track kind="descriptions" src="descriptions.vtt" srclang="en"></data-track>
|
||||
// <data-track kind="subtitles" src="subtitles.vtt" srclang="de"></data-track>
|
||||
// </video>
|
||||
$.lazy(['av', 'audio', 'video'], ['audio', 'video'], function(element, response) {
|
||||
var elementTagName = element[0].tagName.toLowerCase();
|
||||
|
||||
if (elementTagName === 'audio' || elementTagName === 'video') {
|
||||
var srcAttr = 'data-src',
|
||||
sources = element.find(srcAttr),
|
||||
tracks = element.find('data-track'),
|
||||
sourcesInError = 0,
|
||||
|
||||
// create on error callback for sources
|
||||
onError = function() {
|
||||
if (++sourcesInError === sources.length) {
|
||||
response(false);
|
||||
}
|
||||
},
|
||||
|
||||
// create callback to handle a source or track entry
|
||||
handleSource = function() {
|
||||
var source = $(this),
|
||||
type = source[0].tagName.toLowerCase(),
|
||||
attributes = source.prop('attributes'),
|
||||
target = $(type === srcAttr ? '<source>' : '<track>');
|
||||
|
||||
if (type === srcAttr) {
|
||||
target.one('error', onError);
|
||||
}
|
||||
|
||||
$.each(attributes, function(index, attribute) {
|
||||
target.attr(attribute.name, attribute.value);
|
||||
});
|
||||
|
||||
source.replaceWith(target);
|
||||
};
|
||||
|
||||
// create event for successfull load
|
||||
element.one('loadedmetadata', function() {
|
||||
response(true);
|
||||
})
|
||||
|
||||
// remove default callbacks to ignore loading poster image
|
||||
.off('load error')
|
||||
|
||||
// load poster image
|
||||
.attr('poster', element.attr('data-poster'));
|
||||
|
||||
// load by child tags
|
||||
if (sources.length) {
|
||||
sources.each(handleSource);
|
||||
}
|
||||
|
||||
// load by attribute
|
||||
else if (element.attr(srcAttr)) {
|
||||
// split for every entry by comma
|
||||
$.each(element.attr(srcAttr).split(','), function(index, value) {
|
||||
// split again for file and file type
|
||||
var parts = value.split('|');
|
||||
|
||||
// create a source entry
|
||||
element.append($('<source>')
|
||||
.one('error', onError)
|
||||
.attr({src: parts[0].trim(), type: parts[1].trim()}));
|
||||
});
|
||||
|
||||
// remove now obsolete attribute
|
||||
if (this.config('removeAttribute')) {
|
||||
element.removeAttr(srcAttr);
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
// pass error state
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
|
||||
// load optional tracks
|
||||
if (tracks.length) {
|
||||
tracks.each(handleSource);
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
// pass error state
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
});
|
||||
})(window.jQuery || window.Zepto);
|
||||
|
||||
/*!
|
||||
* jQuery & Zepto Lazy - iFrame Plugin - v1.5
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2018, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
;(function($) {
|
||||
// load iframe content, like:
|
||||
// <iframe data-src="iframe.html"></iframe>
|
||||
//
|
||||
// enable content error check with:
|
||||
// <iframe data-src="iframe.html" data-error-detect="true"></iframe>
|
||||
$.lazy(['frame', 'iframe'], 'iframe', function(element, response) {
|
||||
var instance = this;
|
||||
|
||||
if (element[0].tagName.toLowerCase() === 'iframe') {
|
||||
var srcAttr = 'data-src',
|
||||
errorDetectAttr = 'data-error-detect',
|
||||
errorDetect = element.attr(errorDetectAttr);
|
||||
|
||||
// default way, just replace the 'src' attribute
|
||||
if (errorDetect !== 'true' && errorDetect !== '1') {
|
||||
// set iframe source
|
||||
element.attr('src', element.attr(srcAttr));
|
||||
|
||||
// remove attributes
|
||||
if (instance.config('removeAttribute')) {
|
||||
element.removeAttr(srcAttr + ' ' + errorDetectAttr);
|
||||
}
|
||||
}
|
||||
|
||||
// extended way, even check if the document is available
|
||||
else {
|
||||
$.ajax({
|
||||
url: element.attr(srcAttr),
|
||||
dataType: 'html',
|
||||
crossDomain: true,
|
||||
xhrFields: {withCredentials: true},
|
||||
|
||||
/**
|
||||
* success callback
|
||||
* @access private
|
||||
* @param {*} content
|
||||
* @return {void}
|
||||
*/
|
||||
success: function(content) {
|
||||
// set responded data to element's inner html
|
||||
element.html(content)
|
||||
|
||||
// change iframe src
|
||||
.attr('src', element.attr(srcAttr));
|
||||
|
||||
// remove attributes
|
||||
if (instance.config('removeAttribute')) {
|
||||
element.removeAttr(srcAttr + ' ' + errorDetectAttr);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* error callback
|
||||
* @access private
|
||||
* @return {void}
|
||||
*/
|
||||
error: function() {
|
||||
// pass error state to lazy
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
// pass error state to lazy
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
});
|
||||
})(window.jQuery || window.Zepto);
|
||||
|
||||
/*!
|
||||
* jQuery & Zepto Lazy - NOOP Plugin - v1.2
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2018, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
;(function($) {
|
||||
// will do nothing, used to disable elements or for development
|
||||
// use like:
|
||||
// <div data-loader="noop"></div>
|
||||
|
||||
// does not do anything, just a 'no-operation' helper ;)
|
||||
$.lazy('noop', function() {});
|
||||
|
||||
// does nothing, but response a successfull loading
|
||||
$.lazy('noop-success', function(element, response) {
|
||||
// use response function for Zepto
|
||||
response(true);
|
||||
});
|
||||
|
||||
// does nothing, but response a failed loading
|
||||
$.lazy('noop-error', function(element, response) {
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
});
|
||||
})(window.jQuery || window.Zepto);
|
||||
|
||||
/*!
|
||||
* jQuery & Zepto Lazy - Picture Plugin - v1.3
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2018, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
;(function($) {
|
||||
var srcAttr = 'data-src',
|
||||
srcsetAttr = 'data-srcset',
|
||||
mediaAttr = 'data-media',
|
||||
sizesAttr = 'data-sizes',
|
||||
typeAttr = 'data-type';
|
||||
|
||||
// loads picture elements like:
|
||||
// <picture>
|
||||
// <data-src srcset="1x.jpg 1x, 2x.jpg 2x, 3x.jpg 3x" media="(min-width: 600px)" type="image/jpeg"></data-src>
|
||||
// <data-src srcset="1x.jpg 1x, 2x.jpg 2x, 3x.jpg 3x" media="(min-width: 400px)" type="image/jpeg"></data-src>
|
||||
// <data-img src="default.jpg" >
|
||||
// </picture>
|
||||
//
|
||||
// or:
|
||||
// <picture data-src="default.jpg">
|
||||
// <data-src srcset="1x.jpg 1x, 2x.jpg 2x, 3x.jpg 3x" media="(min-width: 600px)" type="image/jpeg"></data-src>
|
||||
// <data-src srcset="1x.jpg 1x, 2x.jpg 2x, 3x.jpg 3x" media="(min-width: 400px)" type="image/jpeg"></data-src>
|
||||
// </picture>
|
||||
//
|
||||
// or just with attributes in one line:
|
||||
// <picture data-src="default.jpg" data-srcset="1x.jpg 1x, 2x.jpg 2x, 3x.jpg 3x" data-media="(min-width: 600px)" data-sizes="" data-type="image/jpeg" />
|
||||
$.lazy(['pic', 'picture'], ['picture'], function(element, response) {
|
||||
var elementTagName = element[0].tagName.toLowerCase();
|
||||
|
||||
if (elementTagName === 'picture') {
|
||||
var sources = element.find(srcAttr),
|
||||
image = element.find('data-img'),
|
||||
imageBase = this.config('imageBase') || '';
|
||||
|
||||
// handle as child elements
|
||||
if (sources.length) {
|
||||
sources.each(function() {
|
||||
renameElementTag($(this), 'source', imageBase);
|
||||
});
|
||||
|
||||
// create img tag from child
|
||||
if (image.length === 1) {
|
||||
image = renameElementTag(image, 'img', imageBase);
|
||||
|
||||
// bind event callbacks to new image tag
|
||||
image.on('load', function() {
|
||||
response(true);
|
||||
}).on('error', function() {
|
||||
response(false);
|
||||
});
|
||||
|
||||
image.attr('src', image.attr(srcAttr));
|
||||
|
||||
if (this.config('removeAttribute')) {
|
||||
image.removeAttr(srcAttr);
|
||||
}
|
||||
}
|
||||
|
||||
// create img tag from attribute
|
||||
else if (element.attr(srcAttr)) {
|
||||
// create image tag
|
||||
createImageObject(element, imageBase + element.attr(srcAttr), response);
|
||||
|
||||
if (this.config('removeAttribute')) {
|
||||
element.removeAttr(srcAttr);
|
||||
}
|
||||
}
|
||||
|
||||
// pass error state
|
||||
else {
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
}
|
||||
|
||||
// handle as attributes
|
||||
else if( element.attr(srcsetAttr) ) {
|
||||
// create source elements before img tag
|
||||
$('<source>').attr({
|
||||
media: element.attr(mediaAttr),
|
||||
sizes: element.attr(sizesAttr),
|
||||
type: element.attr(typeAttr),
|
||||
srcset: getCorrectedSrcSet(element.attr(srcsetAttr), imageBase)
|
||||
})
|
||||
.appendTo(element);
|
||||
|
||||
// create image tag
|
||||
createImageObject(element, imageBase + element.attr(srcAttr), response);
|
||||
|
||||
// remove attributes from parent picture element
|
||||
if (this.config('removeAttribute')) {
|
||||
element.removeAttr(srcAttr + ' ' + srcsetAttr + ' ' + mediaAttr + ' ' + sizesAttr + ' ' + typeAttr);
|
||||
}
|
||||
}
|
||||
|
||||
// pass error state
|
||||
else {
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
// pass error state
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* create a new child element and copy attributes
|
||||
* @param {jQuery|object} element
|
||||
* @param {string} toType
|
||||
* @param {string} imageBase
|
||||
* @return {jQuery|object}
|
||||
*/
|
||||
function renameElementTag(element, toType, imageBase) {
|
||||
var attributes = element.prop('attributes'),
|
||||
target = $('<' + toType + '>');
|
||||
|
||||
$.each(attributes, function(index, attribute) {
|
||||
// build srcset with image base
|
||||
if (attribute.name === 'srcset' || attribute.name === srcAttr) {
|
||||
attribute.value = getCorrectedSrcSet(attribute.value, imageBase);
|
||||
}
|
||||
|
||||
target.attr(attribute.name, attribute.value);
|
||||
});
|
||||
|
||||
element.replaceWith(target);
|
||||
return target;
|
||||
}
|
||||
|
||||
/**
|
||||
* create a new image element inside parent element
|
||||
* @param {jQuery|object} parent
|
||||
* @param {string} src
|
||||
* @param {function} response
|
||||
* @return void
|
||||
*/
|
||||
function createImageObject(parent, src, response) {
|
||||
// create image tag
|
||||
var imageObj = $('<img>')
|
||||
|
||||
// create image tag an bind callbacks for correct response
|
||||
.one('load', function() {
|
||||
response(true);
|
||||
})
|
||||
.one('error', function() {
|
||||
response(false);
|
||||
})
|
||||
|
||||
// set into picture element
|
||||
.appendTo(parent)
|
||||
|
||||
// set src attribute at last to prevent early kick-in
|
||||
.attr('src', src);
|
||||
|
||||
// call after load even on cached image
|
||||
imageObj.complete && imageObj.load(); // jshint ignore : line
|
||||
}
|
||||
|
||||
/**
|
||||
* prepend image base to all srcset entries
|
||||
* @param {string} srcset
|
||||
* @param {string} imageBase
|
||||
* @returns {string}
|
||||
*/
|
||||
function getCorrectedSrcSet(srcset, imageBase) {
|
||||
if (imageBase) {
|
||||
// trim, remove unnecessary spaces and split entries
|
||||
var entries = srcset.split(',');
|
||||
srcset = '';
|
||||
|
||||
for (var i = 0, l = entries.length; i < l; i++) {
|
||||
srcset += imageBase + entries[i].trim() + (i !== l - 1 ? ',' : '');
|
||||
}
|
||||
}
|
||||
|
||||
return srcset;
|
||||
}
|
||||
})(window.jQuery || window.Zepto);
|
||||
|
||||
/*!
|
||||
* jQuery & Zepto Lazy - Script Plugin - v1.2
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2018, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
;(function($) {
|
||||
// loads javascript files for script tags, like:
|
||||
// <script data-src="file.js" type="text/javascript"></script>
|
||||
$.lazy(['js', 'javascript', 'script'], 'script', function(element, response) {
|
||||
if (element[0].tagName.toLowerCase() === 'script') {
|
||||
element.attr('src', element.attr('data-src'));
|
||||
|
||||
// remove attribute
|
||||
if (this.config('removeAttribute')) {
|
||||
element.removeAttr('data-src');
|
||||
}
|
||||
}
|
||||
else {
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
});
|
||||
})(window.jQuery || window.Zepto);
|
||||
|
||||
/*!
|
||||
* jQuery & Zepto Lazy - Vimeo Plugin - v1.1
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2018, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
;(function($) {
|
||||
// load vimeo video iframe, like:
|
||||
// <iframe data-loader="vimeo" data-src="176894130" width="640" height="360" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
|
||||
$.lazy('vimeo', function(element, response) {
|
||||
if (element[0].tagName.toLowerCase() === 'iframe') {
|
||||
// pass source to iframe
|
||||
element.attr('src', 'https://player.vimeo.com/video/' + element.attr('data-src'));
|
||||
|
||||
// remove attribute
|
||||
if (this.config('removeAttribute')) {
|
||||
element.removeAttr('data-src');
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
// pass error state
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
});
|
||||
})(window.jQuery || window.Zepto);
|
||||
|
||||
/*!
|
||||
* jQuery & Zepto Lazy - YouTube Plugin - v1.5
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2018, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
;(function($) {
|
||||
// load youtube video iframe, like:
|
||||
// <iframe data-loader="yt" data-src="1AYGnw6MwFM" data-nocookie="1" width="560" height="315" frameborder="0" allowfullscreen></iframe>
|
||||
$.lazy(['yt', 'youtube'], function(element, response) {
|
||||
if (element[0].tagName.toLowerCase() === 'iframe') {
|
||||
// pass source to iframe
|
||||
var noCookie = /1|true/.test(element.attr('data-nocookie'));
|
||||
element.attr('src', 'https://www.youtube' + (noCookie ? '-nocookie' : '') + '.com/embed/' + element.attr('data-src') + '?rel=0&showinfo=0');
|
||||
|
||||
// remove attribute
|
||||
if (this.config('removeAttribute')) {
|
||||
element.removeAttr('data-src');
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
// pass error state
|
||||
response(false);
|
||||
}
|
||||
});
|
||||
})(window.jQuery || window.Zepto);
|
||||
@@ -1,2 +0,0 @@
|
||||
/*! jQuery & Zepto Lazy - All Plugins v1.7.10 - http://jquery.eisbehr.de/lazy - MIT&GPL-2.0 license - Copyright 2012-2018 Daniel 'Eisbehr' Kern */
|
||||
!function(t){function a(a,e,r,o){o=o?o.toUpperCase():"GET";var i;"POST"!==o&&"PUT"!==o||!a.config("ajaxCreateData")||(i=a.config("ajaxCreateData").apply(a,[e])),t.ajax({url:e.attr("data-src"),type:"POST"===o||"PUT"===o?o:"GET",data:i,dataType:e.attr("data-type")||"html",success:function(t){e.html(t),r(!0),a.config("removeAttribute")&&e.removeAttr("data-src data-method data-type")},error:function(){r(!1)}})}t.lazy("ajax",function(t,e){a(this,t,e,t.attr("data-method"))}),t.lazy("get",function(t,e){a(this,t,e,"GET")}),t.lazy("post",function(t,e){a(this,t,e,"POST")}),t.lazy("put",function(t,e){a(this,t,e,"PUT")})}(window.jQuery||window.Zepto),function(t){t.lazy(["av","audio","video"],["audio","video"],function(a,e){var r=a[0].tagName.toLowerCase();if("audio"===r||"video"===r){var o=a.find("data-src"),i=a.find("data-track"),n=0,c=function(){++n===o.length&&e(!1)},s=function(){var a=t(this),e=a[0].tagName.toLowerCase(),r=a.prop("attributes"),o=t("data-src"===e?"<source>":"<track>");"data-src"===e&&o.one("error",c),t.each(r,function(t,a){o.attr(a.name,a.value)}),a.replaceWith(o)};a.one("loadedmetadata",function(){e(!0)}).off("load error").attr("poster",a.attr("data-poster")),o.length?o.each(s):a.attr("data-src")?(t.each(a.attr("data-src").split(","),function(e,r){var o=r.split("|");a.append(t("<source>").one("error",c).attr({src:o[0].trim(),type:o[1].trim()}))}),this.config("removeAttribute")&&a.removeAttr("data-src")):e(!1),i.length&&i.each(s)}else e(!1)})}(window.jQuery||window.Zepto),function(t){t.lazy(["frame","iframe"],"iframe",function(a,e){var r=this;if("iframe"===a[0].tagName.toLowerCase()){var o=a.attr("data-error-detect");"true"!==o&&"1"!==o?(a.attr("src",a.attr("data-src")),r.config("removeAttribute")&&a.removeAttr("data-src data-error-detect")):t.ajax({url:a.attr("data-src"),dataType:"html",crossDomain:!0,xhrFields:{withCredentials:!0},success:function(t){a.html(t).attr("src",a.attr("data-src")),r.config("removeAttribute")&&a.removeAttr("data-src data-error-detect")},error:function(){e(!1)}})}else e(!1)})}(window.jQuery||window.Zepto),function(t){t.lazy("noop",function(){}),t.lazy("noop-success",function(t,a){a(!0)}),t.lazy("noop-error",function(t,a){a(!1)})}(window.jQuery||window.Zepto),function(t){function a(a,e,i){var n=a.prop("attributes"),c=t("<"+e+">");return t.each(n,function(t,a){"srcset"!==a.name&&a.name!==o||(a.value=r(a.value,i)),c.attr(a.name,a.value)}),a.replaceWith(c),c}function e(a,e,r){var o=t("<img>").one("load",function(){r(!0)}).one("error",function(){r(!1)}).appendTo(a).attr("src",e);o.complete&&o.load()}function r(t,a){if(a){var e=t.split(",");t="";for(var r=0,o=e.length;r<o;r++)t+=a+e[r].trim()+(r!==o-1?",":"")}return t}var o="data-src";t.lazy(["pic","picture"],["picture"],function(i,n){if("picture"===i[0].tagName.toLowerCase()){var c=i.find(o),s=i.find("data-img"),d=this.config("imageBase")||"";c.length?(c.each(function(){a(t(this),"source",d)}),1===s.length?(s=a(s,"img",d),s.on("load",function(){n(!0)}).on("error",function(){n(!1)}),s.attr("src",s.attr(o)),this.config("removeAttribute")&&s.removeAttr(o)):i.attr(o)?(e(i,d+i.attr(o),n),this.config("removeAttribute")&&i.removeAttr(o)):n(!1)):i.attr("data-srcset")?(t("<source>").attr({media:i.attr("data-media"),sizes:i.attr("data-sizes"),type:i.attr("data-type"),srcset:r(i.attr("data-srcset"),d)}).appendTo(i),e(i,d+i.attr(o),n),this.config("removeAttribute")&&i.removeAttr(o+" data-srcset data-media data-sizes data-type")):n(!1)}else n(!1)})}(window.jQuery||window.Zepto),function(t){t.lazy(["js","javascript","script"],"script",function(t,a){"script"===t[0].tagName.toLowerCase()?(t.attr("src",t.attr("data-src")),this.config("removeAttribute")&&t.removeAttr("data-src")):a(!1)})}(window.jQuery||window.Zepto),function(t){t.lazy("vimeo",function(t,a){"iframe"===t[0].tagName.toLowerCase()?(t.attr("src","https://player.vimeo.com/video/"+t.attr("data-src")),this.config("removeAttribute")&&t.removeAttr("data-src")):a(!1)})}(window.jQuery||window.Zepto),function(t){t.lazy(["yt","youtube"],function(t,a){if("iframe"===t[0].tagName.toLowerCase()){var e=/1|true/.test(t.attr("data-nocookie"));t.attr("src","https://www.youtube"+(e?"-nocookie":"")+".com/embed/"+t.attr("data-src")+"?rel=0&showinfo=0"),this.config("removeAttribute")&&t.removeAttr("data-src")}else a(!1)})}(window.jQuery||window.Zepto);
|
||||
@@ -1,68 +0,0 @@
|
||||
{
|
||||
"name": "jquery-lazy",
|
||||
"title": "jQuery & Zepto Lazy - Delayed Content, Image and Background Loader",
|
||||
"version": "1.7.11",
|
||||
"description": "Lazy is a fast, feature-rich and lightweight delayed content loading plugin for jQuery and Zepto. It's designed to speed up page loading times and decrease traffic to your users by only loading the content in view.",
|
||||
"main": "jquery.lazy.js",
|
||||
"homepage": "http://jquery.eisbehr.de/lazy",
|
||||
"bugs": "http://github.com/dkern/jquery.lazy/issues",
|
||||
"author": {
|
||||
"name": "Daniel 'Eisbehr' Kern",
|
||||
"email": "jquery@eisbehr.de",
|
||||
"url": "http://eisbehr.de/"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:dkern/jquery.lazy.git"
|
||||
},
|
||||
"keywords": [
|
||||
"lazy",
|
||||
"lazyload",
|
||||
"load",
|
||||
"loader",
|
||||
"image",
|
||||
"images",
|
||||
"background",
|
||||
"content",
|
||||
"speed",
|
||||
"delay",
|
||||
"delayed",
|
||||
"pageload",
|
||||
"performance",
|
||||
"retina",
|
||||
"placeholder",
|
||||
"jquery",
|
||||
"jquery-plugin",
|
||||
"zepto",
|
||||
"zepto-plugin"
|
||||
],
|
||||
"licenses": [{
|
||||
"type": "MIT",
|
||||
"url": "http://www.opensource.org/licenses/mit-license.php"
|
||||
},{
|
||||
"type": "GPL-2.0",
|
||||
"url": "http://www.gnu.org/licenses/gpl-2.0.html"
|
||||
}],
|
||||
"dependencies": {
|
||||
"jquery": ">=1.7.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-concat-util": "^0.5.5",
|
||||
"gulp-data": "^1.2.1",
|
||||
"gulp-header": "^1.8.9",
|
||||
"gulp-jshint": "^2.0.4",
|
||||
"gulp-noop": "^1.0.0",
|
||||
"gulp-rename": "^1.2.2",
|
||||
"gulp-uglify": "^2.1.2",
|
||||
"gulp-util": "^3.0.8",
|
||||
"jshint": "^2.9.5",
|
||||
"jshint-stylish": "^2.2.1"
|
||||
},
|
||||
"scripts": {
|
||||
"validate": "gulp validate",
|
||||
"start": "gulp watch",
|
||||
"watch": "gulp watch",
|
||||
"build": "gulp build"
|
||||
}
|
||||
}
|
||||
@@ -1,324 +0,0 @@
|
||||
### jQuery Lazy - Loader Plugins
|
||||
[](http://github.com/dkern/jquery.lazy)
|
||||
[](http://www.npmjs.org/package/jquery-lazy)
|
||||
[](http://bower.io/search/?q=jquery-lazy)
|
||||
[](https://david-dm.org/dkern/jquery.lazy)
|
||||
[](https://david-dm.org/dkern/jquery.lazy?type=dev)
|
||||
|
||||
---
|
||||
|
||||
### Table of Contents
|
||||
* [Document Note](#document-note)
|
||||
* [About Loader Plugins](#about-loader-plugins)
|
||||
* [Create an own Loader Plugin](#create-an-own-loader-plugin)
|
||||
* [AJAX Loader](#ajax-loader)
|
||||
* [Audio / Video Loader](#audio--video-loader)
|
||||
* [iFrame Loader](#iframe-loader)
|
||||
* [NOOP Loader](#noop-loader)
|
||||
* [Picture Loader](#picture-loader)
|
||||
* [JS / Script Loader](#js--script-loader)
|
||||
* [Vimeo Video Loader](#vimeo-video-loader)
|
||||
* [YouTube Video Loader](#youtube-video-loader)
|
||||
* [Bugs / Feature request](#bugs--feature-request)
|
||||
* [License](#license)
|
||||
* [Donation](#donation)
|
||||
|
||||
---
|
||||
|
||||
## Document Note
|
||||
This is not the main readme file of this project.
|
||||
Please go to the [project root](https://github.com/dkern/jquery.lazy) and take a look in the [README.md](https://github.com/dkern/jquery.lazy/blob/master/README.md) to learn more about the basics of Lazy.
|
||||
|
||||
|
||||
## About Loader Plugins
|
||||
The loader plugins for Lazy can be used whenever you want to extend the basic functionality by default or globally for many instances of Lazy.
|
||||
Just add the plugins you want to use or a combined file, containing all plugins, to your page and all instances can use the plugins from now on.
|
||||
```HTML
|
||||
<!-- as single plugin files -->
|
||||
<script type="text/javascript" src="jquery.lazy.min.js"></script>
|
||||
<script type="text/javascript" src="plugins/jquery.lazy.ajax.min.js"></script>
|
||||
<script type="text/javascript" src="plugins/jquery.lazy.av.min.js"></script>
|
||||
<script type="text/javascript" src="plugins/jquery.lazy.iframe.min.js"></script>
|
||||
<script type="text/javascript" src="plugins/jquery.lazy.noop.min.js"></script>
|
||||
<script type="text/javascript" src="plugins/jquery.lazy.picture.min.js"></script>
|
||||
<script type="text/javascript" src="plugins/jquery.lazy.script.min.js"></script>
|
||||
<script type="text/javascript" src="plugins/jquery.lazy.vimeo.min.js"></script>
|
||||
<script type="text/javascript" src="plugins/jquery.lazy.youtube.min.js"></script>
|
||||
|
||||
<!-- or combined in one file -->
|
||||
<script type="text/javascript" src="jquery.lazy.min.js"></script>
|
||||
<script type="text/javascript" src="jquery.lazy.plugins.min.js"></script>
|
||||
```
|
||||
|
||||
|
||||
## Create an own Loader Plugin
|
||||
If you want to, you can easily create own loader plugins.
|
||||
Just use jQuery or Zepto's public function `Lazy` to create and register them.
|
||||
Best practice is to wrap everything by an [IIFE](https://en.wikipedia.org/wiki/Immediately-invoked_function_expression).
|
||||
```JS
|
||||
(function($) {
|
||||
$.Lazy("pluginName", function(element, response) {
|
||||
// add your logic here
|
||||
|
||||
// 'this' is the current instance of Lazy
|
||||
// so it's possible to access all public functions, like:
|
||||
var imageBase = this.config("imageBase");
|
||||
});
|
||||
})(window.jQuery || window.Zepto);
|
||||
```
|
||||
|
||||
This loader can now be called on every element with the attribute `data-loader` (_by default_), like:
|
||||
```HTML
|
||||
<div data-loader="pluginName"></div>
|
||||
```
|
||||
|
||||
It's possible to register a plugin with more than one name / alias.
|
||||
```JS
|
||||
(function($) {
|
||||
$.Lazy(["pluginName", "anotherPluginName"], function(element, response) {
|
||||
// the plugin is now available by 'data-loader="pluginLoaderName"'
|
||||
// and 'data-loader="anotherLoaderName"'
|
||||
});
|
||||
})(window.jQuery || window.Zepto);
|
||||
```
|
||||
|
||||
The optional second parameter gives you the ability to register a plugin by default to an element type.
|
||||
When you do this, there is no need to set the `data-loader` attribute on each element you want to use this loader on.
|
||||
|
||||
But keep in mind, if you register an plugin on often used elements, like `<div>`, Lazy will try to handle each of them!
|
||||
If you want to do so anyway, use a most specific selector for jQuery or Zepto.
|
||||
```JS
|
||||
(function($) {
|
||||
$.Lazy("av", ["audio", "video"], function(element, response) {
|
||||
// this plugin will automatically handle '<audio>' and '<video>' elements,
|
||||
// even when no 'data-loader' attribute was set on the elements
|
||||
});
|
||||
})(window.jQuery || window.Zepto);
|
||||
```
|
||||
|
||||
For more examples, take a look at the [existing plugins](https://github.com/dkern/jquery.lazy/tree/master/plugins).
|
||||
|
||||
|
||||
## AJAX Loader
|
||||
**Names:** `ajax`, `get`, `post`, `put`
|
||||
**Parameters:** `data-src`, `data-method`, `data-type`
|
||||
**Default for:** -
|
||||
|
||||
The AJAX loader can receive data from a given url and paste the response to the inner html of the element.
|
||||
This is useful, when you want do load a bigger amount of content.
|
||||
Use `ajax` as the loader name by default.
|
||||
But there are even some shorthand names for specific request types `GET`, `POST` and `PUT` too.
|
||||
```HTML
|
||||
<!-- simple GET request -->
|
||||
<div data-loader="ajax" data-src="ajax.html"></div>
|
||||
|
||||
<!-- simple post request with configurable response type -->
|
||||
<div data-loader="ajax" data-src="ajax.html" data-method="post" data-type="html"></div>
|
||||
|
||||
<!-- GET request -->
|
||||
<div data-loader="get" data-src="ajax.html"></div>
|
||||
|
||||
<!-- POST request-->
|
||||
<div data-loader="post" data-src="ajax.html"></div>
|
||||
|
||||
<!-- PUT request-->
|
||||
<div data-loader="put" data-src="ajax.html"></div>
|
||||
```
|
||||
|
||||
On `POST` and `PUT` requests, the callback `ajaxCreateData` will be executed before every AJAX call.
|
||||
If used, the callback function should return the value for the `data` parameter of jQuery's AJAX function.
|
||||
```HTML
|
||||
<div data-loader="post" data-src="ajax.html" data-value="post-data"></div>
|
||||
```
|
||||
|
||||
```JS
|
||||
$('div').Lazy({
|
||||
ajaxCreateData: function(element) {
|
||||
return {name: element.data('value')};
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
## Audio / Video Loader
|
||||
**Names:** `av`, `audio`, `video`
|
||||
**Parameters:** `data-src`, `data-poster`
|
||||
**Default for:** `<audio>`, `<video>`
|
||||
|
||||
Loads `<audio>` and `<video>` elements and attach the sources and tracks in the right order.
|
||||
There are two ways you can prepare your audio and/or video tags.
|
||||
First way is to add all sources by `data-src` attribute, separated by comma and type by pipe on the element.
|
||||
```HTML
|
||||
<audio data-src="file.ogg|audio/ogg,file.mp3|audio/mp3,file.wav|audio/wav"></audio>
|
||||
<video data-src="file.ogv|video/ogv,file.mp4|video/mp4,file.webm|video/webm" data-poster="poster.jpg"></video>
|
||||
```
|
||||
|
||||
The other way is to add the sources and tracks like default, as child elements.
|
||||
```HTML
|
||||
<audio>
|
||||
<data-src src="file.ogg" type="audio/ogg"></data-src>
|
||||
<data-src src="file.mp3" type="audio/mp3"></data-src>
|
||||
<data-src src="file.wav" type="audio/wav"></data-src>
|
||||
</audio>
|
||||
|
||||
<video data-poster="poster.jpg">
|
||||
<data-src src="file.ogv" type="video/ogv"></data-src>
|
||||
<data-src src="file.mp4" type="video/mp4"></data-src>
|
||||
<data-src src="file.webm" type="video/webm"></data-src>
|
||||
<data-track kind="captions" src="captions.vtt" srclang="en"></data-track>
|
||||
<data-track kind="descriptions" src="descriptions.vtt" srclang="en"></data-track>
|
||||
<data-track kind="subtitles" src="subtitles.vtt" srclang="de"></data-track>
|
||||
</video>
|
||||
```
|
||||
|
||||
|
||||
## iFrame Loader
|
||||
**Names:** `frame`, `iframe`
|
||||
**Parameters:** `data-src`, `data-error-detect`
|
||||
**Default for:** `<iframe>`
|
||||
|
||||
Loads `<iframe>` contents.
|
||||
The default will return a successfull load, even if the iframe url is not reachable (_like on 404 or wrong url_), because there is no way to check the loaded content in javascript.
|
||||
It might be the fastest and safest way to do that.
|
||||
If you know the requested path is reachable every time or don't care about error checks, you should use this way!
|
||||
```HTML
|
||||
<iframe data-src="iframe.html"></iframe>
|
||||
```
|
||||
|
||||
The second way is more professional and support error checks.
|
||||
It will load the content by AJAX and checks the response.
|
||||
Afterwards pass the HTML content to iframe inner and set the correct url.
|
||||
This is a very secure check, but could be a bit more tricky on some use cases.
|
||||
You should only use this on the same domain origin.
|
||||
|
||||
To enable this feature, set the attribute `data-error-detect` to `true` or `1` on the iframe element.
|
||||
```HTML
|
||||
<iframe data-loader="iframe" data-src="iframe.html" data-error-detect="true"></iframe>
|
||||
```
|
||||
|
||||
|
||||
## NOOP Loader
|
||||
**Names:** `noop`, `noop-success`, `noop-error`
|
||||
**Parameters:** -
|
||||
**Default for:** -
|
||||
|
||||
The NOOP (_or no-operations_) loader will, like the name said, do nothing.
|
||||
There will even be no callbacks triggered, like `beforeLoad` or `onError`, when using a NOOP` loader.
|
||||
It could be useful for developers or to simple, secure and fast disable some other loaders.
|
||||
It can be used with all elements.
|
||||
```HTML
|
||||
<div data-loader="noop"></div>
|
||||
```
|
||||
|
||||
There are two other NOOP loaders, helping to debug your code.
|
||||
The `noop-success` and `noop-error` loaders will return the current state to Lazy and trigger the right callbacks.
|
||||
```HTML
|
||||
<!-- triggers the 'afterLoad' and 'onFinishedAll' callback -->
|
||||
<div data-loader="noop-success"></div>
|
||||
|
||||
<!-- triggers the 'onError' and 'onFinishedAll' callback -->
|
||||
<div data-loader="noop-error"></div>
|
||||
```
|
||||
|
||||
|
||||
## Picture Loader
|
||||
**Names:** `pic`, `picture`
|
||||
**Parameters:** `data-src`, `data-srcset`, `data-media`, `data-sizes`
|
||||
**Default for:** `<picture>`
|
||||
|
||||
Loads `<picture>` elements and attach the sources.
|
||||
There are two ways you can prepare your picture tags.
|
||||
First way is to create all child elements from a single line:
|
||||
```HTML
|
||||
<picture data-src="default.jpg" data-srcset="1x.jpg 1x, 2x.jpg 2x, 3x.jpg 3x" data-media="(min-width: 600px)" data-type="image/jpeg" />
|
||||
```
|
||||
|
||||
The other way is to add the sources like default, as child elements.
|
||||
```HTML
|
||||
<picture>
|
||||
<data-src srcset="1x.jpg 1x, 2x.jpg 2x, 3x.jpg 3x" media="(min-width: 600px)" type="image/jpeg"></data-src>
|
||||
<data-img src="default.jpg"></data-img>
|
||||
</picture>
|
||||
|
||||
<picture data-src="default.jpg">
|
||||
<data-src srcset="1x.jpg 1x, 2x.jpg 2x, 3x.jpg 3x" media="(min-width: 600px)" type="image/jpeg"></data-src>
|
||||
</picture>
|
||||
```
|
||||
|
||||
|
||||
## JS / Script Loader
|
||||
**Names:** `js`, `javascript`, `script`
|
||||
**Parameters:** `data-src`
|
||||
**Default for:** `<script>`
|
||||
|
||||
Loads javascript files on `<script>` element.
|
||||
Change the element like the example below, and the files will be loaded automatically after page load.
|
||||
```HTML
|
||||
<script data-src="script.js" type="text/javascript"></script>
|
||||
```
|
||||
|
||||
**Note:**
|
||||
The viewport detection is not correct in some browsers.
|
||||
So it could happen, that all script files get loaded right after page load, and not when the user scrolls to them.
|
||||
|
||||
|
||||
## Vimeo Video Loader
|
||||
**Names:** `vimeo`
|
||||
**Parameters:** `data-src`
|
||||
**Default for:** -
|
||||
|
||||
Loads vimeo videos in an `<iframe>`.
|
||||
This is the suggested way by vimeo itself.
|
||||
You can prepare the `<iframe>` element as you would do without Lazy.
|
||||
Only add the vimeo video id to the attribute `data-src` and add the loader name.
|
||||
That's all.
|
||||
```HTML
|
||||
<iframe data-loader="vimeo" data-src="176894130" width="640" height="360" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
|
||||
```
|
||||
|
||||
**Please keep in mind:**
|
||||
Because this is an iframe and there is no feedback javascript could check on, this loader can only return success to Lazy.
|
||||
There is no way to check if the video was loaded correctly or your provided video id is existing.
|
||||
|
||||
|
||||
## YouTube Video Loader
|
||||
**Names:** `yt`, `youtube`
|
||||
**Parameters:** `data-src`, `data-nocookie`
|
||||
**Default for:** -
|
||||
|
||||
Loads youtube videos in an `<iframe>`.
|
||||
This is the suggested way by youtube itself.
|
||||
You can prepare the `<iframe>` element as you would do without Lazy.
|
||||
Only add the youtube video id to the attribute `data-src` and add the loader name.
|
||||
That's all.
|
||||
|
||||
```HTML
|
||||
<iframe data-loader="youtube" data-src="1AYGnw6MwFM" width="560" height="315" frameborder="0"></iframe>
|
||||
```
|
||||
|
||||
If you want to, you can control the cookie behavior of the embedded video with `data-nocookie="1"`.
|
||||
This would change the url to `youtube-nocookie.com` instead of `youtube.com`.
|
||||
|
||||
```HTML
|
||||
<iframe data-loader="youtube" data-src="1AYGnw6MwFM" data-nocookie="1" width="560" height="315" frameborder="0"></iframe>
|
||||
```
|
||||
|
||||
**Please keep in mind:**
|
||||
Because this is an iframe and there is no feedback javascript could check on, this loader can only return success to Lazy.
|
||||
There is no way to check if the video was loaded correctly or your provided video id is existing.
|
||||
|
||||
|
||||
## Bugs / Feature request
|
||||
Please [report](http://github.com/dkern/jquery.lazy/issues) bugs and feel free to [ask](http://github.com/dkern/jquery.lazy/issues) for new features and loaders directly on GitHub.
|
||||
|
||||
|
||||
## License
|
||||
Lazy plugins are dual-licensed under [MIT](http://www.opensource.org/licenses/mit-license.php) and [GPL-2.0](http://www.gnu.org/licenses/gpl-2.0.html) license.
|
||||
|
||||
|
||||
## Donation
|
||||
_You like to support me?_
|
||||
_You appreciate my work?_
|
||||
_You use it in commercial projects?_
|
||||
|
||||
Feel free to make a little [donation](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FFL6VQJCUZMXC)! :wink:
|
||||
@@ -1,88 +0,0 @@
|
||||
/*!
|
||||
* jQuery & Zepto Lazy - AJAX Plugin - v1.4
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2018, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
;(function($) {
|
||||
// load data by ajax request and pass them to elements inner html, like:
|
||||
// <div data-loader="ajax" data-src="url.html" data-method="post" data-type="html"></div>
|
||||
$.lazy('ajax', function(element, response) {
|
||||
ajaxRequest(this, element, response, element.attr('data-method'));
|
||||
});
|
||||
|
||||
// load data by ajax get request and pass them to elements inner html, like:
|
||||
// <div data-loader="get" data-src="url.html" data-type="html"></div>
|
||||
$.lazy('get', function(element, response) {
|
||||
ajaxRequest(this, element, response, 'GET');
|
||||
});
|
||||
|
||||
// load data by ajax post request and pass them to elements inner html, like:
|
||||
// <div data-loader="post" data-src="url.html" data-type="html"></div>
|
||||
$.lazy('post', function(element, response) {
|
||||
ajaxRequest(this, element, response, 'POST');
|
||||
});
|
||||
|
||||
// load data by ajax put request and pass them to elements inner html, like:
|
||||
// <div data-loader="put" data-src="url.html" data-type="html"></div>
|
||||
$.lazy('put', function(element, response) {
|
||||
ajaxRequest(this, element, response, 'PUT');
|
||||
});
|
||||
|
||||
/**
|
||||
* execute ajax request and handle response
|
||||
* @param {object} instance
|
||||
* @param {jQuery|object} element
|
||||
* @param {function} response
|
||||
* @param {string} [method]
|
||||
*/
|
||||
function ajaxRequest(instance, element, response, method) {
|
||||
method = method ? method.toUpperCase() : 'GET';
|
||||
|
||||
var data;
|
||||
if ((method === 'POST' || method === 'PUT') && instance.config('ajaxCreateData')) {
|
||||
data = instance.config('ajaxCreateData').apply(instance, [element]);
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: element.attr('data-src'),
|
||||
type: method === 'POST' || method === 'PUT' ? method : 'GET',
|
||||
data: data,
|
||||
dataType: element.attr('data-type') || 'html',
|
||||
|
||||
/**
|
||||
* success callback
|
||||
* @access private
|
||||
* @param {*} content
|
||||
* @return {void}
|
||||
*/
|
||||
success: function(content) {
|
||||
// set responded data to element's inner html
|
||||
element.html(content);
|
||||
|
||||
// use response function for Zepto
|
||||
response(true);
|
||||
|
||||
// remove attributes
|
||||
if (instance.config('removeAttribute')) {
|
||||
element.removeAttr('data-src data-method data-type');
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* error callback
|
||||
* @access private
|
||||
* @return {void}
|
||||
*/
|
||||
error: function() {
|
||||
// pass error state to lazy
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
})(window.jQuery || window.Zepto);
|
||||
@@ -1,2 +0,0 @@
|
||||
/*! jQuery & Zepto Lazy - AJAX Plugin v1.4 - http://jquery.eisbehr.de/lazy - MIT&GPL-2.0 license - Copyright 2012-2018 Daniel 'Eisbehr' Kern */
|
||||
!function(t){function a(a,e,n,o){o=o?o.toUpperCase():"GET";var i;"POST"!==o&&"PUT"!==o||!a.config("ajaxCreateData")||(i=a.config("ajaxCreateData").apply(a,[e])),t.ajax({url:e.attr("data-src"),type:"POST"===o||"PUT"===o?o:"GET",data:i,dataType:e.attr("data-type")||"html",success:function(t){e.html(t),n(!0),a.config("removeAttribute")&&e.removeAttr("data-src data-method data-type")},error:function(){n(!1)}})}t.lazy("ajax",function(t,e){a(this,t,e,t.attr("data-method"))}),t.lazy("get",function(t,e){a(this,t,e,"GET")}),t.lazy("post",function(t,e){a(this,t,e,"POST")}),t.lazy("put",function(t,e){a(this,t,e,"PUT")})}(window.jQuery||window.Zepto);
|
||||
@@ -1,120 +0,0 @@
|
||||
/*!
|
||||
* jQuery & Zepto Lazy - AV Plugin - v1.4
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2018, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
;(function($) {
|
||||
// loads audio and video tags including tracks by two ways, like:
|
||||
// <audio>
|
||||
// <data-src src="audio.ogg" type="video/ogg"></data-src>
|
||||
// <data-src src="audio.mp3" type="video/mp3"></data-src>
|
||||
// </audio>
|
||||
// <video data-poster="poster.jpg">
|
||||
// <data-src src="video.ogv" type="video/ogv"></data-src>
|
||||
// <data-src src="video.webm" type="video/webm"></data-src>
|
||||
// <data-src src="video.mp4" type="video/mp4"></data-src>
|
||||
// <data-track kind="captions" src="captions.vtt" srclang="en"></data-track>
|
||||
// <data-track kind="descriptions" src="descriptions.vtt" srclang="en"></data-track>
|
||||
// <data-track kind="subtitles" src="subtitles.vtt" srclang="de"></data-track>
|
||||
// </video>
|
||||
//
|
||||
// or:
|
||||
// <audio data-src="audio.ogg|video/ogg,video.mp3|video/mp3"></video>
|
||||
// <video data-poster="poster.jpg" data-src="video.ogv|video/ogv,video.webm|video/webm,video.mp4|video/mp4">
|
||||
// <data-track kind="captions" src="captions.vtt" srclang="en"></data-track>
|
||||
// <data-track kind="descriptions" src="descriptions.vtt" srclang="en"></data-track>
|
||||
// <data-track kind="subtitles" src="subtitles.vtt" srclang="de"></data-track>
|
||||
// </video>
|
||||
$.lazy(['av', 'audio', 'video'], ['audio', 'video'], function(element, response) {
|
||||
var elementTagName = element[0].tagName.toLowerCase();
|
||||
|
||||
if (elementTagName === 'audio' || elementTagName === 'video') {
|
||||
var srcAttr = 'data-src',
|
||||
sources = element.find(srcAttr),
|
||||
tracks = element.find('data-track'),
|
||||
sourcesInError = 0,
|
||||
|
||||
// create on error callback for sources
|
||||
onError = function() {
|
||||
if (++sourcesInError === sources.length) {
|
||||
response(false);
|
||||
}
|
||||
},
|
||||
|
||||
// create callback to handle a source or track entry
|
||||
handleSource = function() {
|
||||
var source = $(this),
|
||||
type = source[0].tagName.toLowerCase(),
|
||||
attributes = source.prop('attributes'),
|
||||
target = $(type === srcAttr ? '<source>' : '<track>');
|
||||
|
||||
if (type === srcAttr) {
|
||||
target.one('error', onError);
|
||||
}
|
||||
|
||||
$.each(attributes, function(index, attribute) {
|
||||
target.attr(attribute.name, attribute.value);
|
||||
});
|
||||
|
||||
source.replaceWith(target);
|
||||
};
|
||||
|
||||
// create event for successfull load
|
||||
element.one('loadedmetadata', function() {
|
||||
response(true);
|
||||
})
|
||||
|
||||
// remove default callbacks to ignore loading poster image
|
||||
.off('load error')
|
||||
|
||||
// load poster image
|
||||
.attr('poster', element.attr('data-poster'));
|
||||
|
||||
// load by child tags
|
||||
if (sources.length) {
|
||||
sources.each(handleSource);
|
||||
}
|
||||
|
||||
// load by attribute
|
||||
else if (element.attr(srcAttr)) {
|
||||
// split for every entry by comma
|
||||
$.each(element.attr(srcAttr).split(','), function(index, value) {
|
||||
// split again for file and file type
|
||||
var parts = value.split('|');
|
||||
|
||||
// create a source entry
|
||||
element.append($('<source>')
|
||||
.one('error', onError)
|
||||
.attr({src: parts[0].trim(), type: parts[1].trim()}));
|
||||
});
|
||||
|
||||
// remove now obsolete attribute
|
||||
if (this.config('removeAttribute')) {
|
||||
element.removeAttr(srcAttr);
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
// pass error state
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
|
||||
// load optional tracks
|
||||
if (tracks.length) {
|
||||
tracks.each(handleSource);
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
// pass error state
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
});
|
||||
})(window.jQuery || window.Zepto);
|
||||
@@ -1,2 +0,0 @@
|
||||
/*! jQuery & Zepto Lazy - AV Plugin v1.4 - http://jquery.eisbehr.de/lazy - MIT&GPL-2.0 license - Copyright 2012-2018 Daniel 'Eisbehr' Kern */
|
||||
!function(t){t.lazy(["av","audio","video"],["audio","video"],function(a,e){var r=a[0].tagName.toLowerCase();if("audio"===r||"video"===r){var o=a.find("data-src"),i=a.find("data-track"),n=0,c=function(){++n===o.length&&e(!1)},d=function(){var a=t(this),e=a[0].tagName.toLowerCase(),r=a.prop("attributes"),o=t("data-src"===e?"<source>":"<track>");"data-src"===e&&o.one("error",c),t.each(r,function(t,a){o.attr(a.name,a.value)}),a.replaceWith(o)};a.one("loadedmetadata",function(){e(!0)}).off("load error").attr("poster",a.attr("data-poster")),o.length?o.each(d):a.attr("data-src")?(t.each(a.attr("data-src").split(","),function(e,r){var o=r.split("|");a.append(t("<source>").one("error",c).attr({src:o[0].trim(),type:o[1].trim()}))}),this.config("removeAttribute")&&a.removeAttr("data-src")):e(!1),i.length&&i.each(d)}else e(!1)})}(window.jQuery||window.Zepto);
|
||||
@@ -1,83 +0,0 @@
|
||||
/*!
|
||||
* jQuery & Zepto Lazy - iFrame Plugin - v1.5
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2018, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
;(function($) {
|
||||
// load iframe content, like:
|
||||
// <iframe data-src="iframe.html"></iframe>
|
||||
//
|
||||
// enable content error check with:
|
||||
// <iframe data-src="iframe.html" data-error-detect="true"></iframe>
|
||||
$.lazy(['frame', 'iframe'], 'iframe', function(element, response) {
|
||||
var instance = this;
|
||||
|
||||
if (element[0].tagName.toLowerCase() === 'iframe') {
|
||||
var srcAttr = 'data-src',
|
||||
errorDetectAttr = 'data-error-detect',
|
||||
errorDetect = element.attr(errorDetectAttr);
|
||||
|
||||
// default way, just replace the 'src' attribute
|
||||
if (errorDetect !== 'true' && errorDetect !== '1') {
|
||||
// set iframe source
|
||||
element.attr('src', element.attr(srcAttr));
|
||||
|
||||
// remove attributes
|
||||
if (instance.config('removeAttribute')) {
|
||||
element.removeAttr(srcAttr + ' ' + errorDetectAttr);
|
||||
}
|
||||
}
|
||||
|
||||
// extended way, even check if the document is available
|
||||
else {
|
||||
$.ajax({
|
||||
url: element.attr(srcAttr),
|
||||
dataType: 'html',
|
||||
crossDomain: true,
|
||||
xhrFields: {withCredentials: true},
|
||||
|
||||
/**
|
||||
* success callback
|
||||
* @access private
|
||||
* @param {*} content
|
||||
* @return {void}
|
||||
*/
|
||||
success: function(content) {
|
||||
// set responded data to element's inner html
|
||||
element.html(content)
|
||||
|
||||
// change iframe src
|
||||
.attr('src', element.attr(srcAttr));
|
||||
|
||||
// remove attributes
|
||||
if (instance.config('removeAttribute')) {
|
||||
element.removeAttr(srcAttr + ' ' + errorDetectAttr);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* error callback
|
||||
* @access private
|
||||
* @return {void}
|
||||
*/
|
||||
error: function() {
|
||||
// pass error state to lazy
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
// pass error state to lazy
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
});
|
||||
})(window.jQuery || window.Zepto);
|
||||
@@ -1,2 +0,0 @@
|
||||
/*! jQuery & Zepto Lazy - iFrame Plugin v1.5 - http://jquery.eisbehr.de/lazy - MIT&GPL-2.0 license - Copyright 2012-2018 Daniel 'Eisbehr' Kern */
|
||||
!function(t){t.lazy(["frame","iframe"],"iframe",function(r,a){var e=this;if("iframe"===r[0].tagName.toLowerCase()){var o=r.attr("data-error-detect");"true"!==o&&"1"!==o?(r.attr("src",r.attr("data-src")),e.config("removeAttribute")&&r.removeAttr("data-src data-error-detect")):t.ajax({url:r.attr("data-src"),dataType:"html",crossDomain:!0,xhrFields:{withCredentials:!0},success:function(t){r.html(t).attr("src",r.attr("data-src")),e.config("removeAttribute")&&r.removeAttr("data-src data-error-detect")},error:function(){a(!1)}})}else a(!1)})}(window.jQuery||window.Zepto);
|
||||
@@ -1,30 +0,0 @@
|
||||
/*!
|
||||
* jQuery & Zepto Lazy - NOOP Plugin - v1.2
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2018, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
;(function($) {
|
||||
// will do nothing, used to disable elements or for development
|
||||
// use like:
|
||||
// <div data-loader="noop"></div>
|
||||
|
||||
// does not do anything, just a 'no-operation' helper ;)
|
||||
$.lazy('noop', function() {});
|
||||
|
||||
// does nothing, but response a successfull loading
|
||||
$.lazy('noop-success', function(element, response) {
|
||||
// use response function for Zepto
|
||||
response(true);
|
||||
});
|
||||
|
||||
// does nothing, but response a failed loading
|
||||
$.lazy('noop-error', function(element, response) {
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
});
|
||||
})(window.jQuery || window.Zepto);
|
||||
@@ -1,2 +0,0 @@
|
||||
/*! jQuery & Zepto Lazy - NOOP Plugin v1.2 - http://jquery.eisbehr.de/lazy - MIT&GPL-2.0 license - Copyright 2012-2018 Daniel 'Eisbehr' Kern */
|
||||
!function(o){o.lazy("noop",function(){}),o.lazy("noop-success",function(o,n){n(!0)}),o.lazy("noop-error",function(o,n){n(!1)})}(window.jQuery||window.Zepto);
|
||||
@@ -1,188 +0,0 @@
|
||||
/*!
|
||||
* jQuery & Zepto Lazy - Picture Plugin - v1.3
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2018, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
;(function($) {
|
||||
var srcAttr = 'data-src',
|
||||
srcsetAttr = 'data-srcset',
|
||||
mediaAttr = 'data-media',
|
||||
sizesAttr = 'data-sizes',
|
||||
typeAttr = 'data-type';
|
||||
|
||||
// loads picture elements like:
|
||||
// <picture>
|
||||
// <data-src srcset="1x.jpg 1x, 2x.jpg 2x, 3x.jpg 3x" media="(min-width: 600px)" type="image/jpeg"></data-src>
|
||||
// <data-src srcset="1x.jpg 1x, 2x.jpg 2x, 3x.jpg 3x" media="(min-width: 400px)" type="image/jpeg"></data-src>
|
||||
// <data-img src="default.jpg" >
|
||||
// </picture>
|
||||
//
|
||||
// or:
|
||||
// <picture data-src="default.jpg">
|
||||
// <data-src srcset="1x.jpg 1x, 2x.jpg 2x, 3x.jpg 3x" media="(min-width: 600px)" type="image/jpeg"></data-src>
|
||||
// <data-src srcset="1x.jpg 1x, 2x.jpg 2x, 3x.jpg 3x" media="(min-width: 400px)" type="image/jpeg"></data-src>
|
||||
// </picture>
|
||||
//
|
||||
// or just with attributes in one line:
|
||||
// <picture data-src="default.jpg" data-srcset="1x.jpg 1x, 2x.jpg 2x, 3x.jpg 3x" data-media="(min-width: 600px)" data-sizes="" data-type="image/jpeg" />
|
||||
$.lazy(['pic', 'picture'], ['picture'], function(element, response) {
|
||||
var elementTagName = element[0].tagName.toLowerCase();
|
||||
|
||||
if (elementTagName === 'picture') {
|
||||
var sources = element.find(srcAttr),
|
||||
image = element.find('data-img'),
|
||||
imageBase = this.config('imageBase') || '';
|
||||
|
||||
// handle as child elements
|
||||
if (sources.length) {
|
||||
sources.each(function() {
|
||||
renameElementTag($(this), 'source', imageBase);
|
||||
});
|
||||
|
||||
// create img tag from child
|
||||
if (image.length === 1) {
|
||||
image = renameElementTag(image, 'img', imageBase);
|
||||
|
||||
// bind event callbacks to new image tag
|
||||
image.on('load', function() {
|
||||
response(true);
|
||||
}).on('error', function() {
|
||||
response(false);
|
||||
});
|
||||
|
||||
image.attr('src', image.attr(srcAttr));
|
||||
|
||||
if (this.config('removeAttribute')) {
|
||||
image.removeAttr(srcAttr);
|
||||
}
|
||||
}
|
||||
|
||||
// create img tag from attribute
|
||||
else if (element.attr(srcAttr)) {
|
||||
// create image tag
|
||||
createImageObject(element, imageBase + element.attr(srcAttr), response);
|
||||
|
||||
if (this.config('removeAttribute')) {
|
||||
element.removeAttr(srcAttr);
|
||||
}
|
||||
}
|
||||
|
||||
// pass error state
|
||||
else {
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
}
|
||||
|
||||
// handle as attributes
|
||||
else if( element.attr(srcsetAttr) ) {
|
||||
// create source elements before img tag
|
||||
$('<source>').attr({
|
||||
media: element.attr(mediaAttr),
|
||||
sizes: element.attr(sizesAttr),
|
||||
type: element.attr(typeAttr),
|
||||
srcset: getCorrectedSrcSet(element.attr(srcsetAttr), imageBase)
|
||||
})
|
||||
.appendTo(element);
|
||||
|
||||
// create image tag
|
||||
createImageObject(element, imageBase + element.attr(srcAttr), response);
|
||||
|
||||
// remove attributes from parent picture element
|
||||
if (this.config('removeAttribute')) {
|
||||
element.removeAttr(srcAttr + ' ' + srcsetAttr + ' ' + mediaAttr + ' ' + sizesAttr + ' ' + typeAttr);
|
||||
}
|
||||
}
|
||||
|
||||
// pass error state
|
||||
else {
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
// pass error state
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* create a new child element and copy attributes
|
||||
* @param {jQuery|object} element
|
||||
* @param {string} toType
|
||||
* @param {string} imageBase
|
||||
* @return {jQuery|object}
|
||||
*/
|
||||
function renameElementTag(element, toType, imageBase) {
|
||||
var attributes = element.prop('attributes'),
|
||||
target = $('<' + toType + '>');
|
||||
|
||||
$.each(attributes, function(index, attribute) {
|
||||
// build srcset with image base
|
||||
if (attribute.name === 'srcset' || attribute.name === srcAttr) {
|
||||
attribute.value = getCorrectedSrcSet(attribute.value, imageBase);
|
||||
}
|
||||
|
||||
target.attr(attribute.name, attribute.value);
|
||||
});
|
||||
|
||||
element.replaceWith(target);
|
||||
return target;
|
||||
}
|
||||
|
||||
/**
|
||||
* create a new image element inside parent element
|
||||
* @param {jQuery|object} parent
|
||||
* @param {string} src
|
||||
* @param {function} response
|
||||
* @return void
|
||||
*/
|
||||
function createImageObject(parent, src, response) {
|
||||
// create image tag
|
||||
var imageObj = $('<img>')
|
||||
|
||||
// create image tag an bind callbacks for correct response
|
||||
.one('load', function() {
|
||||
response(true);
|
||||
})
|
||||
.one('error', function() {
|
||||
response(false);
|
||||
})
|
||||
|
||||
// set into picture element
|
||||
.appendTo(parent)
|
||||
|
||||
// set src attribute at last to prevent early kick-in
|
||||
.attr('src', src);
|
||||
|
||||
// call after load even on cached image
|
||||
imageObj.complete && imageObj.load(); // jshint ignore : line
|
||||
}
|
||||
|
||||
/**
|
||||
* prepend image base to all srcset entries
|
||||
* @param {string} srcset
|
||||
* @param {string} imageBase
|
||||
* @returns {string}
|
||||
*/
|
||||
function getCorrectedSrcSet(srcset, imageBase) {
|
||||
if (imageBase) {
|
||||
// trim, remove unnecessary spaces and split entries
|
||||
var entries = srcset.split(',');
|
||||
srcset = '';
|
||||
|
||||
for (var i = 0, l = entries.length; i < l; i++) {
|
||||
srcset += imageBase + entries[i].trim() + (i !== l - 1 ? ',' : '');
|
||||
}
|
||||
}
|
||||
|
||||
return srcset;
|
||||
}
|
||||
})(window.jQuery || window.Zepto);
|
||||
@@ -1,2 +0,0 @@
|
||||
/*! jQuery & Zepto Lazy - Picture Plugin v1.3 - http://jquery.eisbehr.de/lazy - MIT&GPL-2.0 license - Copyright 2012-2018 Daniel 'Eisbehr' Kern */
|
||||
!function(t){function e(e,a,n){var o=e.prop("attributes"),c=t("<"+a+">");return t.each(o,function(t,e){"srcset"!==e.name&&e.name!==i||(e.value=r(e.value,n)),c.attr(e.name,e.value)}),e.replaceWith(c),c}function a(e,a,r){var i=t("<img>").one("load",function(){r(!0)}).one("error",function(){r(!1)}).appendTo(e).attr("src",a);i.complete&&i.load()}function r(t,e){if(e){var a=t.split(",");t="";for(var r=0,i=a.length;r<i;r++)t+=e+a[r].trim()+(r!==i-1?",":"")}return t}var i="data-src";t.lazy(["pic","picture"],["picture"],function(n,o){if("picture"===n[0].tagName.toLowerCase()){var c=n.find(i),s=n.find("data-img"),u=this.config("imageBase")||"";c.length?(c.each(function(){e(t(this),"source",u)}),1===s.length?(s=e(s,"img",u),s.on("load",function(){o(!0)}).on("error",function(){o(!1)}),s.attr("src",s.attr(i)),this.config("removeAttribute")&&s.removeAttr(i)):n.attr(i)?(a(n,u+n.attr(i),o),this.config("removeAttribute")&&n.removeAttr(i)):o(!1)):n.attr("data-srcset")?(t("<source>").attr({media:n.attr("data-media"),sizes:n.attr("data-sizes"),type:n.attr("data-type"),srcset:r(n.attr("data-srcset"),u)}).appendTo(n),a(n,u+n.attr(i),o),this.config("removeAttribute")&&n.removeAttr(i+" data-srcset data-media data-sizes data-type")):o(!1)}else o(!1)})}(window.jQuery||window.Zepto);
|
||||
@@ -1,28 +0,0 @@
|
||||
/*!
|
||||
* jQuery & Zepto Lazy - Script Plugin - v1.2
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2018, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
;(function($) {
|
||||
// loads javascript files for script tags, like:
|
||||
// <script data-src="file.js" type="text/javascript"></script>
|
||||
$.lazy(['js', 'javascript', 'script'], 'script', function(element, response) {
|
||||
if (element[0].tagName.toLowerCase() === 'script') {
|
||||
element.attr('src', element.attr('data-src'));
|
||||
|
||||
// remove attribute
|
||||
if (this.config('removeAttribute')) {
|
||||
element.removeAttr('data-src');
|
||||
}
|
||||
}
|
||||
else {
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
});
|
||||
})(window.jQuery || window.Zepto);
|
||||
@@ -1,2 +0,0 @@
|
||||
/*! jQuery & Zepto Lazy - Script Plugin v1.2 - http://jquery.eisbehr.de/lazy - MIT&GPL-2.0 license - Copyright 2012-2018 Daniel 'Eisbehr' Kern */
|
||||
!function(t){t.lazy(["js","javascript","script"],"script",function(t,r){"script"===t[0].tagName.toLowerCase()?(t.attr("src",t.attr("data-src")),this.config("removeAttribute")&&t.removeAttr("data-src")):r(!1)})}(window.jQuery||window.Zepto);
|
||||
@@ -1,31 +0,0 @@
|
||||
/*!
|
||||
* jQuery & Zepto Lazy - Vimeo Plugin - v1.1
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2018, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
;(function($) {
|
||||
// load vimeo video iframe, like:
|
||||
// <iframe data-loader="vimeo" data-src="176894130" width="640" height="360" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
|
||||
$.lazy('vimeo', function(element, response) {
|
||||
if (element[0].tagName.toLowerCase() === 'iframe') {
|
||||
// pass source to iframe
|
||||
element.attr('src', 'https://player.vimeo.com/video/' + element.attr('data-src'));
|
||||
|
||||
// remove attribute
|
||||
if (this.config('removeAttribute')) {
|
||||
element.removeAttr('data-src');
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
// pass error state
|
||||
// use response function for Zepto
|
||||
response(false);
|
||||
}
|
||||
});
|
||||
})(window.jQuery || window.Zepto);
|
||||
@@ -1,2 +0,0 @@
|
||||
/*! jQuery & Zepto Lazy - Vimeo Plugin v1.1 - http://jquery.eisbehr.de/lazy - MIT&GPL-2.0 license - Copyright 2012-2018 Daniel 'Eisbehr' Kern */
|
||||
!function(t){t.lazy("vimeo",function(t,e){"iframe"===t[0].tagName.toLowerCase()?(t.attr("src","https://player.vimeo.com/video/"+t.attr("data-src")),this.config("removeAttribute")&&t.removeAttr("data-src")):e(!1)})}(window.jQuery||window.Zepto);
|
||||
@@ -1,31 +0,0 @@
|
||||
/*!
|
||||
* jQuery & Zepto Lazy - YouTube Plugin - v1.5
|
||||
* http://jquery.eisbehr.de/lazy/
|
||||
*
|
||||
* Copyright 2012 - 2018, Daniel 'Eisbehr' Kern
|
||||
*
|
||||
* Dual licensed under the MIT and GPL-2.0 licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
;(function($) {
|
||||
// load youtube video iframe, like:
|
||||
// <iframe data-loader="yt" data-src="1AYGnw6MwFM" data-nocookie="1" width="560" height="315" frameborder="0" allowfullscreen></iframe>
|
||||
$.lazy(['yt', 'youtube'], function(element, response) {
|
||||
if (element[0].tagName.toLowerCase() === 'iframe') {
|
||||
// pass source to iframe
|
||||
var noCookie = /1|true/.test(element.attr('data-nocookie'));
|
||||
element.attr('src', 'https://www.youtube' + (noCookie ? '-nocookie' : '') + '.com/embed/' + element.attr('data-src') + '?rel=0&showinfo=0');
|
||||
|
||||
// remove attribute
|
||||
if (this.config('removeAttribute')) {
|
||||
element.removeAttr('data-src');
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
// pass error state
|
||||
response(false);
|
||||
}
|
||||
});
|
||||
})(window.jQuery || window.Zepto);
|
||||
@@ -1,2 +0,0 @@
|
||||
/*! jQuery & Zepto Lazy - YouTube Plugin v1.5 - http://jquery.eisbehr.de/lazy - MIT&GPL-2.0 license - Copyright 2012-2018 Daniel 'Eisbehr' Kern */
|
||||
!function(t){t.lazy(["yt","youtube"],function(t,e){if("iframe"===t[0].tagName.toLowerCase()){var o=/1|true/.test(t.attr("data-nocookie"));t.attr("src","https://www.youtube"+(o?"-nocookie":"")+".com/embed/"+t.attr("data-src")+"?rel=0&showinfo=0"),this.config("removeAttribute")&&t.removeAttr("data-src")}else e(!1)})}(window.jQuery||window.Zepto);
|
||||
@@ -1,9 +0,0 @@
|
||||
/*!
|
||||
* Masonry PACKAGED v4.2.2
|
||||
* Cascading grid layout library
|
||||
* https://masonry.desandro.com
|
||||
* MIT License
|
||||
* by David DeSandro
|
||||
*/
|
||||
|
||||
!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,r,a){function h(t,e,n){var o,r="$()."+i+'("'+e+'")';return t.each(function(t,h){var u=a.data(h,i);if(!u)return void s(i+" not initialized. Cannot call methods, i.e. "+r);var d=u[e];if(!d||"_"==e.charAt(0))return void s(r+" is not a valid method");var l=d.apply(u,n);o=void 0===o?l:o}),void 0!==o?o:t}function u(t,e){t.each(function(t,n){var o=a.data(n,i);o?(o.option(e),o._init()):(o=new r(n,e),a.data(n,i,o))})}a=a||e||t.jQuery,a&&(r.prototype.option||(r.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return h(this,t,e)}return u(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,r=t.console,s="undefined"==typeof r?function(){}:function(t){r.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],o=0;o<i.length;o++){var r=i[o],s=n&&n[r];s&&(this.off(t,r),delete n[r]),r.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t}),function(t,e){"function"==typeof define&&define.amd?define("get-size/get-size",e):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=-1==t.indexOf("%")&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;u>e;e++){var i=h[e];t[i]=0}return t}function n(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),e}function o(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var o=n(e);s=200==Math.round(t(o.width)),r.isBoxSizeOuter=s,i.removeChild(e)}}function r(e){if(o(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var r=n(e);if("none"==r.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==r.boxSizing,l=0;u>l;l++){var c=h[l],f=r[c],m=parseFloat(f);a[c]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,g=a.paddingTop+a.paddingBottom,y=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,z=a.borderTopWidth+a.borderBottomWidth,E=d&&s,b=t(r.width);b!==!1&&(a.width=b+(E?0:p+_));var x=t(r.height);return x!==!1&&(a.height=x+(E?0:g+z)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(g+z),a.outerWidth=a.width+y,a.outerHeight=a.height+v,a}}var s,a="undefined"==typeof console?e:function(t){console.error(t)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],u=h.length,d=!1;return r}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var n=e[i],o=n+"MatchesSelector";if(t[o])return o}}();return function(e,i){return e[t](i)}}),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(t,e){var i={};i.extend=function(t,e){for(var i in e)t[i]=e[i];return t},i.modulo=function(t,e){return(t%e+e)%e};var n=Array.prototype.slice;i.makeArray=function(t)Line truncated
|
||||
@@ -1,18 +0,0 @@
|
||||
/**!
|
||||
* MixItUp v3.3.1
|
||||
* A high-performance, dependency-free library for animated filtering, sorting and more
|
||||
* Build 94e0fbf6-cd0b-4987-b3c0-14b59b67b8a0
|
||||
*
|
||||
* @copyright Copyright 2014-2018 KunkaLabs Limited.
|
||||
* @author KunkaLabs Limited.
|
||||
* @link https://www.kunkalabs.com/mixitup/
|
||||
*
|
||||
* @license Commercial use requires a commercial license.
|
||||
* https://www.kunkalabs.com/mixitup/licenses/
|
||||
*
|
||||
* Non-commercial use permitted under same terms as CC BY-NC 3.0 license.
|
||||
* http://creativecommons.org/licenses/by-nc/3.0/
|
||||
*/
|
||||
!function(t){"use strict";var e=null,n=null;!function(){var e=["webkit","moz","o","ms"],n=t.document.createElement("div"),a=-1;for(a=0;a<e.length&&!t.requestAnimationFrame;a++)t.requestAnimationFrame=t[e[a]+"RequestAnimationFrame"];"undefined"==typeof n.nextElementSibling&&Object.defineProperty(t.Element.prototype,"nextElementSibling",{get:function(){for(var t=this.nextSibling;t;){if(1===t.nodeType)return t;t=t.nextSibling}return null}}),function(t){t.matches=t.matches||t.machesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector||function(t){return Array.prototype.indexOf.call(this.parentElement.querySelectorAll(t),this)>-1}}(t.Element.prototype),Object.keys||(Object.keys=function(){var t=Object.prototype.hasOwnProperty,e=!1,n=[],a=-1;return e=!{toString:null}.propertyIsEnumerable("toString"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=n.length,function(i){var o=[],r="",s=-1;if("object"!=typeof i&&("function"!=typeof i||null===i))throw new TypeError("Object.keys called on non-object");for(r in i)t.call(i,r)&&o.push(r);if(e)for(s=0;s<a;s++)t.call(i,n[s])&&o.push(n[s]);return o}}()),Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),"function"!=typeof Object.create&&(Object.create=function(t){var e=function(){};return function(n,a){if(n!==Object(n)&&null!==n)throw TypeError("Argument must be an object, or null");e.prototype=n||{};var i=new e;return e.prototype=null,a!==t&&Object.defineProperties(i,a),null===n&&(i.__proto__=null),i}}()),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t){var e,n,a,i;if(null===this)throw new TypeError;if(a=Object(this),i=a.length>>>0,0===i)return-1;if(e=0,arguments.length>1&&(e=Number(arguments[1]),e!==e?e=0:0!==e&&e!==1/0&&e!==-(1/0)&&(e=(e>0||-1)*Math.floor(Math.abs(e)))),e>=i)return-1;for(n=e>=0?e:Math.max(i-Math.abs(e),0);n<i;n++)if(n in a&&a[n]===t)return n;return-1}),Function.prototype.bind||(Function.prototype.bind=function(t){var e,n,a,i;if("function"!=typeof this)throw new TypeError;return e=Array.prototype.slice.call(arguments,1),n=this,a=function(){},i=function(){return n.apply(this instanceof a?this:t,e.concat(Array.prototype.slice.call(arguments)))},this.prototype&&(a.prototype=this.prototype),i.prototype=new a,i}),t.Element.prototype.dispatchEvent||(t.Element.prototype.dispatchEvent=function(t){try{return this.fireEvent("on"+t.type,t)}catch(e){}})}(),e=function(a,i,o){var r=null,s=!1,l=null,c=null,u=null,f=null,h=[],d="",m=[],g=-1;if(u=o||t.document,(s=arguments[3])&&(s="boolean"==typeof s),"string"==typeof a)m=u.querySelectorAll(a);else if(a&&"object"==typeof a&&n.isElement(a,u))m=[a];else{if(!a||"object"!=typeof a||!a.length)throw new Error(e.messages.errorFactoryInvalidContainer());m=a}if(m.length<1)throw new Error(e.messages.errorFactoryContainerNotFound());for(g=0;(r=m[g])&&(!(g>0)||s);g++)r.id?d=r.id:(d="MixItUp"+n.randomHex(),r.id=d),e.instances[d]instanceof e.Mixer?(l=e.instances[d],(!i||i&&i.debug&&i.debug.showWarnings!==!1)&&console.warn(e.messages.warningFactoryPreexistingInstance())):(l=new e.Mixer,l.attach(r,u,d,i),e.instances[d]=l),c=new e.Facade(l),i&&i.debug&&i.debug.enable?h.push(l):h.push(c);return f=s?new e.Collection(h):h[0]},e.use=function(t){e.Base.prototype.callActions.call(e,"beforeUse",arguments),"function"==typeof t&&"mixitup-extension"===t.TYPE?"undefined"==typeof e.extensions[t.NAME]&&(t(e),e.extensions[t.NAME]=t):t.fn&&t.fn.jquery&&(e.libraries.$=t),e.Base.prototype.callActions.call(e,"afterUse",arguments)},e.instances={},e.extensions={},e.libraries={},n={hasClass:function(t,e){return!!t.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))},addClass:function(t,e){this.hasClass(t,e)||(t.className+=t.className?" "+e:e)},removeClass:function(t,e){if(this.hasClass(t,e)){var n=new RegExp("(\\s|^)"+e+"(\\s|$)");t.className=t.className.replace(n," ").trim()}},extend:function(t,e,n,a){var i=[],o="",r=-1;n=n||!1,a=a||!1;try{if(Array.isArray(e))for(r=0;r<e.length;r++)i.push(r);else e&&(i=Object.keys(e));for(r=0;r<i.length;r++)o=i[r],!n||"object"!=typeof e[o]||this.isElement(e[o])?t[o]=e[o]:Array.isArray(e[o])?(t[o]||(t[o]=[]),this.extend(t[o],e[o],n,a)):(t[o]||(t[o]={}),this.extend(t[o],e[o],n,a))}catch(s){if(!a)throw s;this.handleExtendError(s,t)}return t},handleExtendError:function(t,n){var a=/property "?(\w*)"?[,:] object/i,i=null,o="",r="",s="",l="",c="",u=-1,f=-1;if(t instanceof TypeError&&(i=a.exec(t.message))){o=i[1];for(c in n){for(f=0;f<o.length&&o.charAt(f)===c.charAt(f);)f++;f>u&&(u=f,l=c)}throw u>1&&(s=e.messages.errorConfigInvalidPropertySuggestion({probableMatch:l})),r=e.messages.errorConfigInvalidProperty({erroneous:o,suggestion:s}),new TypeError(r)}throw t},template:function(t){for(var e=/\${([\w]*)}/g,n={},a=null;a=e.exec(t);)n[a[1]]=new
Line truncated
|
||||
this.lastClicked=null,this.userCallback=null,this.userDeferred=null,this.dom=new e.MixerDom,this.callActions("afterConstruct"),n.seal(this)},e.BaseStatic.call(e.Mixer),e.Mixer.prototype=Object.create(e.Base.prototype),n.extend(e.Mixer.prototype,{constructor:e.Mixer,attach:function(a,i,o,r){var s=this,l=null,c=-1;for(s.callActions("beforeAttach",arguments),s.id=o,r&&n.extend(s.config,r,!0,!0),s.sanitizeConfig(),s.cacheDom(a,i),s.config.layout.containerClassName&&n.addClass(s.dom.container,s.config.layout.containerClassName),e.features.has.transitions||(s.config.animation.enable=!1),"undefined"==typeof t.console&&(s.config.debug.showWarnings=!1),s.config.data.uidKey&&(s.config.controls.enable=!1),s.indexTargets(),s.state=s.getInitialState(),c=0;l=s.lastOperation.toHide[c];c++)l.hide();s.config.controls.enable&&(s.initControls(),s.buildToggleArray(null,s.state),s.updateControls({filter:s.state.activeFilter,sort:s.state.activeSort})),s.parseEffects(),s.callActions("afterAttach",arguments)},sanitizeConfig:function(){var t=this;t.callActions("beforeSanitizeConfig",arguments),t.config.controls.scope=t.config.controls.scope.toLowerCase().trim(),t.config.controls.toggleLogic=t.config.controls.toggleLogic.toLowerCase().trim(),t.config.controls.toggleDefault=t.config.controls.toggleDefault.toLowerCase().trim(),t.config.animation.effects=t.config.animation.effects.trim(),t.callActions("afterSanitizeConfig",arguments)},getInitialState:function(){var t=this,n=new e.State,a=new e.Operation;if(t.callActions("beforeGetInitialState",arguments),n.activeContainerClassName=t.config.layout.containerClassName,t.config.load.dataset){if(!t.config.data.uidKey||"string"!=typeof t.config.data.uidKey)throw new TypeError(e.messages.errorConfigDataUidKeyNotSet());a.startDataset=a.newDataset=n.activeDataset=t.config.load.dataset.slice(),a.startContainerClassName=a.newContainerClassName=n.activeContainerClassName,a.show=t.targets.slice(),n=t.callFilters("stateGetInitialState",n,arguments)}else n.activeFilter=t.parseFilterArgs([t.config.load.filter]).command,n.activeSort=t.parseSortArgs([t.config.load.sort]).command,n.totalTargets=t.targets.length,n=t.callFilters("stateGetInitialState",n,arguments),n.activeSort.collection||n.activeSort.attribute||"random"===n.activeSort.order||"desc"===n.activeSort.order?(a.newSort=n.activeSort,t.sortOperation(a),t.printSort(!1,a),t.targets=a.newOrder):a.startOrder=a.newOrder=t.targets,a.startFilter=a.newFilter=n.activeFilter,a.startSort=a.newSort=n.activeSort,a.startContainerClassName=a.newContainerClassName=n.activeContainerClassName,"all"===a.newFilter.selector?a.newFilter.selector=t.config.selectors.target:"none"===a.newFilter.selector&&(a.newFilter.selector="");return a=t.callFilters("operationGetInitialState",a,[n]),t.lastOperation=a,a.newFilter&&t.filterOperation(a),n=t.buildState(a)},cacheDom:function(t,e){var n=this;n.callActions("beforeCacheDom",arguments),n.dom.document=e,n.dom.body=n.dom.document.querySelector("body"),n.dom.container=t,n.dom.parent=t,n.callActions("afterCacheDom",arguments)},indexTargets:function(){var t=this,a=null,i=null,o=null,r=-1;if(t.callActions("beforeIndexTargets",arguments),t.dom.targets=t.config.layout.allowNestedTargets?t.dom.container.querySelectorAll(t.config.selectors.target):n.children(t.dom.container,t.config.selectors.target,t.dom.document),t.dom.targets=n.arrayFromList(t.dom.targets),t.targets=[],(o=t.config.load.dataset)&&o.length!==t.dom.targets.length)throw new Error(e.messages.errorDatasetPrerenderedMismatch());if(t.dom.targets.length){for(r=0;i=t.dom.targets[r];r++)a=new e.Target,a.init(i,t,o?o[r]:void 0),a.isInDom=!0,t.targets.push(a);t.dom.parent=t.dom.targets[0].parentElement===t.dom.container?t.dom.container:t.dom.targets[0].parentElement}t.origOrder=t.targets,t.callActions("afterIndexTargets",arguments)},initControls:function(){var t=this,n="",a=null,i=null,o=null,r=null,s=null,l=-1,c=-1;switch(t.callActions("beforeInitControls",arguments),t.config.controls.scope){case"local":o=t.dom.container;break;case"global":o=t.dom.document;break;default:throw new Error(e.messages.errorConfigInvalidControlsScope())}for(l=0;n=e.controlDefinitions[l];l++)if(t.config.controls.live||n.live){if(n.parent){if(r=t.dom[n.parent],!r||r.length<0)continue;"number"!=typeof r.length&&(r=[r])}else r=[o];for(c=0;i=r[c];c++)s=t.getControl(i,n.type,n.selector),t.controls.push(s)}else for(a=o.querySelectorAll(t.config.selectors.control+n.selector),c=0;i=a[c];c++)s=t.getControl(i,n.type,""),s&&t.controls.push(s);t.callActions("afterInitControls",arguments)},getControl:function(t,a,i){var o=this,r=null,s=-1;if(o.callActions("beforeGetControl",arguments),!i)for(s=0;r=e.controls[s];s++){if(r.el===t&&r.isBound(o))return o.callFilters("controlGetControl",null,arguments);if(r.el===t&&r.type===a&&r.selector===i)return r.addBinding(o),o.callFilters("controlGetControl",r,arguments)}return r=new e.Control,r.init(t,a,i),r.classNames.base=n.getClassname(o.config.classNames,a),r.classNames.actiLine truncated
|
||||
a.callFilters("promiseQueueMix",i.promise,arguments)},getDataOperation:function(t){var a=this,i=new e.Operation,o=[];if(i=a.callFilters("operationUnmappedGetDataOperation",i,arguments),a.dom.targets.length&&!(o=a.state.activeDataset||[]).length)throw new Error(e.messages.errorDatasetNotSet());return i.id=n.randomHex(),i.startState=a.state,i.startDataset=o,i.newDataset=t.slice(),a.diffDatasets(i),i.startOrder=a.targets,i.newOrder=i.show,a.config.animation.enable&&(a.getStartMixData(i),a.setInter(i),i.docState=n.getDocumentState(a.dom.document),a.getInterMixData(i),a.setFinal(i),a.getFinalMixData(i),a.parseEffects(),i.hasEffect=a.hasEffect(),a.getTweenData(i)),a.targets=i.show.slice(),i.newState=a.buildState(i),Array.prototype.push.apply(a.targets,i.toRemove),i=a.callFilters("operationMappedGetDataOperation",i,arguments)},diffDatasets:function(t){var a=this,i=[],o=[],r=[],s=null,l=null,c=null,u=null,f=null,h={},d="",m=-1;for(a.callActions("beforeDiffDatasets",arguments),m=0;s=t.newDataset[m];m++){if("undefined"==typeof(d=s[a.config.data.uidKey])||d.toString().length<1)throw new TypeError(e.messages.errorDatasetInvalidUidKey({uidKey:a.config.data.uidKey}));if(h[d])throw new Error(e.messages.errorDatasetDuplicateUid({uid:d}));h[d]=!0,(l=a.cache[d])instanceof e.Target?(a.config.data.dirtyCheck&&!n.deepEquals(s,l.data)&&(c=l.render(s),l.data=s,c!==l.dom.el&&(l.isInDom&&(l.unbindEvents(),a.dom.parent.replaceChild(c,l.dom.el)),l.isShown||(c.style.display="none"),l.dom.el=c,l.isInDom&&l.bindEvents())),c=l.dom.el):(l=new e.Target,l.init(null,a,s),l.hide()),l.isInDom?(f=l.dom.el.nextElementSibling,o.push(d),u&&(u.lastElementChild&&u.appendChild(a.dom.document.createTextNode(" ")),a.insertDatasetFrag(u,l.dom.el,r),u=null)):(u||(u=a.dom.document.createDocumentFragment()),u.lastElementChild&&u.appendChild(a.dom.document.createTextNode(" ")),u.appendChild(l.dom.el),l.isInDom=!0,l.unbindEvents(),l.bindEvents(),l.hide(),t.toShow.push(l),r.push(l)),t.show.push(l)}for(u&&(f=f||a.config.layout.siblingAfter,f&&u.appendChild(a.dom.document.createTextNode(" ")),a.insertDatasetFrag(u,f,r)),m=0;s=t.startDataset[m];m++)d=s[a.config.data.uidKey],l=a.cache[d],t.show.indexOf(l)<0?(t.hide.push(l),t.toHide.push(l),t.toRemove.push(l)):i.push(d);n.isEqualArray(i,o)||(t.willSort=!0),a.callActions("afterDiffDatasets",arguments)},insertDatasetFrag:function(t,e,a){var i=this,o=e?n.arrayFromList(i.dom.parent.children).indexOf(e):i.targets.length;for(i.dom.parent.insertBefore(t,e);a.length;)i.targets.splice(o,0,a.shift()),o++},willSort:function(t,e){var n=this,a=!1;return a=!!(n.config.behavior.liveSort||"random"===t.order||t.attribute!==e.attribute||t.order!==e.order||t.collection!==e.collection||null===t.next&&e.next||t.next&&null===e.next)||!(!t.next||!e.next)&&n.willSort(t.next,e.next),n.callFilters("resultWillSort",a,arguments)},show:function(){var t=this;return t.filter("all")},hide:function(){var t=this;return t.filter("none")},isMixing:function(){var t=this;return t.isBusy},filter:function(){var t=this,e=t.parseFilterArgs(arguments);return t.multimix({filter:e.command},e.animate,e.callback)},toggleOn:function(){var t=this,e=t.parseFilterArgs(arguments),n=e.command.selector,a="";return t.isToggling=!0,t.toggleArray.indexOf(n)<0&&t.toggleArray.push(n),a=t.getToggleSelector(),t.multimix({filter:a},e.animate,e.callback)},toggleOff:function(){var t=this,e=t.parseFilterArgs(arguments),n=e.command.selector,a=t.toggleArray.indexOf(n),i="";return t.isToggling=!0,a>-1&&t.toggleArray.splice(a,1),i=t.getToggleSelector(),t.multimix({filter:i},e.animate,e.callback)},sort:function(){var t=this,e=t.parseSortArgs(arguments);return t.multimix({sort:e.command},e.animate,e.callback)},changeLayout:function(){var t=this,e=t.parseChangeLayoutArgs(arguments);return t.multimix({changeLayout:e.command},e.animate,e.callback)},dataset:function(){var t=this,n=t.parseDatasetArgs(arguments),a=null,i=null,o=!1;return t.callActions("beforeDataset",arguments),t.isBusy?(i=new e.QueueItem,i.args=arguments,i.instruction=n,t.queueMix(i)):(n.callback&&(t.userCallback=n.callback),o=n.animate^t.config.animation.enable?n.animate:t.config.animation.enable,a=t.getDataOperation(n.command.dataset),t.goMix(o,a))},multimix:function(){var t=this,n=null,a=!1,i=null,o=t.parseMultimixArgs(arguments);return t.callActions("beforeMultimix",arguments),t.isBusy?(i=new e.QueueItem,i.args=arguments,i.instruction=o,i.triggerElement=t.lastClicked,i.isToggling=t.isToggling,t.queueMix(i)):(n=t.getOperation(o.command),t.config.controls.enable&&(o.command.filter&&!t.isToggling&&(t.toggleArray.length=0,t.buildToggleArray(n.command)),t.queue.length<1&&t.updateControls(n.command)),o.callback&&(t.userCallback=o.callback),a=o.animate^t.config.animation.enable?o.animate:t.config.animation.enable,t.callFilters("operationMultimix",n,arguments),t.goMix(a,n))},getOperation:function(t){var a=this,i=t.sort,o=t.filter,r=t.changeLayout,s=t.remove,l=t.insert,c=new e.Operation;return c=a.callFilters("operationUnmappLine truncated
|
||||
@@ -1,7 +0,0 @@
|
||||
/**
|
||||
* Owl Carousel v2.3.4
|
||||
* Copyright 2013-2018 David Deutsch
|
||||
* Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
|
||||
*/
|
||||
!function(a,b,c,d){function e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},a.each(["onResize","onThrottledResize"],a.proxy(function(b,c){this._handlers[c]=a.proxy(this[c],this)},this)),a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a.charAt(0).toLowerCase()+a.slice(1)]=new b(this)},this)),a.each(e.Workers,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}e.Defaults={items:3,loop:!1,center:!1,rewind:!1,checkVisibility:!0,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,fallbackEasing:"swing",slideTransition:"",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Type={Event:"event",State:"state"},e.Plugins={},e.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(a){var b=this.settings.margin||"",c=!this.settings.autoWidth,d=this.settings.rtl,e={width:"auto","margin-left":d?b:"","margin-right":d?"":b};!c&&this.$stage.children().css(e),a.css=e}},{filter:["width","items","settings"],run:function(a){var b=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,c=null,d=this._items.length,e=!this.settings.autoWidth,f=[];for(a.items={merge:!1,width:b};d--;)c=this._mergers[d],c=this.settings.mergeFit&&Math.min(c,this.settings.items)||c,a.items.merge=c>1||a.items.merge,f[d]=e?b*c:this._items[d].width();this._widths=f}},{filter:["items","settings"],run:function(){var b=[],c=this._items,d=this.settings,e=Math.max(2*d.items,4),f=2*Math.ceil(c.length/2),g=d.loop&&c.length?d.rewind?e:Math.max(e,f):0,h="",i="";for(g/=2;g>0;)b.push(this.normalize(b.length/2,!0)),h+=c[b[b.length-1]][0].outerHTML,b.push(this.normalize(c.length-1-(b.length-1)/2,!0)),i=c[b[b.length-1]][0].outerHTML+i,g-=1;this._clones=b,a(h).addClass("cloned").appendTo(this.$stage),a(i).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var a=this.settings.rtl?1:-1,b=this._clones.length+this._items.length,c=-1,d=0,e=0,f=[];++c<b;)d=f[c-1]||0,e=this._widths[this.relative(c)]+this.settings.margin,f.push(d+e*a);this._coordinates=f}},{filter:["width","items","settings"],run:function(){var a=this.settings.stagePadding,b=this._coordinates,c={width:Math.ceil(Math.abs(b[b.length-1]))+2*a,"padding-left":a||"","padding-right":a||""};this.$stage.css(c)}},{filter:["width","items","settings"],run:function(a){var b=this._coordinates.length,c=!this.settings.autoWidth,d=this.$stage.children();if(c&&a.items.merge)for(;b--;)a.css.width=this._widths[this.relative(b)],d.eq(b).css(a.css);else c&&(a.css.width=a.items.width,d.css(a.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(a){a.current=a.current?this.$stage.children().index(a.current):0,a.current=Math.max(this.minimum(),Math.min(this.maximum(),a.current)),this.reset(a.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var a,b,c,d,e=this.settings.rtl?1:-1,f=2*this.settings.stagePadding,g=this.coordinates(this.current())+f,h=g+this.width()*e,i=[];for(c=0,d=this._coordinates.length;c<d;c++)a=this._coordinates[c-1]||0,b=Math.abs(this._coordinates[c])+f*e,(this.op(a,"<=",g)&&this.op(a,">",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+i.join("), :eq(")+")").addClass("active"),this.$stage.children(".center").removeClass("center"),this.settings.center&&this.$stage.children().eq(this.current()).addClass("center")}}],e.prototype.initializeStage=function(){this.$stage=this.$element.find("."+this.settings.stageClass),this.$stage.length||(this.$elemeLine truncated
|
||||
animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&a.support.animation&&a.support.transition){this.core.speed(0);var b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.one(a.support.animation.end,c).css({left:b+"px"}).addClass("animated owl-animated-out").addClass(g)),f&&e.one(a.support.animation.end,c).addClass("animated owl-animated-in").addClass(f))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._call=null,this._time=0,this._timeout=0,this._paused=!0,this._handlers={"changed.owl.carousel":a.proxy(function(a){a.namespace&&"settings"===a.property.name?this._core.settings.autoplay?this.play():this.stop():a.namespace&&"position"===a.property.name&&this._paused&&(this._time=0)},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":a.proxy(function(a,b,c){a.namespace&&this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(a){a.namespace&&this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=a.extend({},e.Defaults,this._core.options)};e.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},e.prototype._next=function(d){this._call=b.setTimeout(a.proxy(this._next,this,d),this._timeout*(Math.round(this.read()/this._timeout)+1)-this.read()),this._core.is("interacting")||c.hidden||this._core.next(d||this._core.settings.autoplaySpeed)},e.prototype.read=function(){return(new Date).getTime()-this._time},e.prototype.play=function(c,d){var e;this._core.is("rotating")||this._core.enter("rotating"),c=c||this._core.settings.autoplayTimeout,e=Math.min(this._time%(this._timeout||c),c),this._paused?(this._time=this.read(),this._paused=!1):b.clearTimeout(this._call),this._time+=this.read()%c-e,this._timeout=c,this._call=b.setTimeout(a.proxy(this._next,this,d),c-e)},e.prototype.stop=function(){this._core.is("rotating")&&(this._time=0,this._paused=!0,b.clearTimeout(this._call),this._core.leave("rotating"))},e.prototype.pause=function(){this._core.is("rotating")&&!this._paused&&(this._time=this.read(),this._paused=!0,b.clearTimeout(this._call))},e.prototype.destroy=function(){var a,b;this.stop();for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(b){this._core=b,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":a.proxy(function(b){b.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+a(b.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,0,this._templates.pop())},this),"remove.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&this.draw()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreLine truncated
|
||||
@@ -1,8 +0,0 @@
|
||||
/*
|
||||
|
||||
1. Add your custom JavaScript code below
|
||||
2. Place the this code in your template:
|
||||
|
||||
|
||||
|
||||
*/
|
||||
@@ -1,2 +0,0 @@
|
||||
/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */
|
||||
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}k.fn=k.prototype={jquery:f,constructor:k,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=k.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return k.each(this,e)},map:function(n){return this.pushStack(k.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},k.extend=k.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(k.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||k.isPlainObject(n)?n:{},i=!1,a[t]=k.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},k.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t){b(e,{nonce:t&&t.nonce})},each:function(e,t){var n,r=0;if(d(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(p,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(d(Object(e))?k.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(d(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g.apply([],a)},guid:1,support:y}),"function"==typeof Symbol&&(k.fn[Symbol.iterator]=t[Symbol.iterator]),k.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var h=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,k="sizzle"+1*new Date,m=n.document,S=0,r=0,p=ue(),x=ue(),N=ue(),A=ue(),D=function(e,t){return e===t&&(l=!0),0},j={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",$=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",F=new RegExp(M+"+","g"),B=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp($),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+Line truncated
|
||||
@@ -1,123 +0,0 @@
|
||||
/*!
|
||||
* Bootstrap v4.4.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("jquery")):"function"==typeof define&&define.amd?define(["exports","jquery"],t):t((e=e||self).bootstrap={},e.jQuery)}(this,function(e,p){"use strict";function i(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 s(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}function t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function l(o){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?t(Object(r),!0).forEach(function(e){var t,n,i;t=o,i=r[n=e],n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach(function(e){Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(r,e))})}return o}p=p&&p.hasOwnProperty("default")?p.default:p;var n="transitionend";function o(e){var t=this,n=!1;return p(this).one(m.TRANSITION_END,function(){n=!0}),setTimeout(function(){n||m.triggerTransitionEnd(t)},e),this}var m={TRANSITION_END:"bsTransitionEnd",getUID:function(e){for(;e+=~~(1e6*Math.random()),document.getElementById(e););return e},getSelectorFromElement:function(e){var t=e.getAttribute("data-target");if(!t||"#"===t){var n=e.getAttribute("href");t=n&&"#"!==n?n.trim():""}try{return document.querySelector(t)?t:null}catch(e){return null}},getTransitionDurationFromElement:function(e){if(!e)return 0;var t=p(e).css("transition-duration"),n=p(e).css("transition-delay"),i=parseFloat(t),o=parseFloat(n);return i||o?(t=t.split(",")[0],n=n.split(",")[0],1e3*(parseFloat(t)+parseFloat(n))):0},reflow:function(e){return e.offsetHeight},triggerTransitionEnd:function(e){p(e).trigger(n)},supportsTransitionEnd:function(){return Boolean(n)},isElement:function(e){return(e[0]||e).nodeType},typeCheckConfig:function(e,t,n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var o=n[i],r=t[i],s=r&&m.isElement(r)?"element":(a=r,{}.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase());if(!new RegExp(o).test(s))throw new Error(e.toUpperCase()+': Option "'+i+'" provided type "'+s+'" but expected type "'+o+'".')}var a},findShadowRoot:function(e){if(!document.documentElement.attachShadow)return null;if("function"!=typeof e.getRootNode)return e instanceof ShadowRoot?e:e.parentNode?m.findShadowRoot(e.parentNode):null;var t=e.getRootNode();return t instanceof ShadowRoot?t:null},jQueryDetection:function(){if("undefined"==typeof p)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var e=p.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1===e[0]&&9===e[1]&&e[2]<1||4<=e[0])throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};m.jQueryDetection(),p.fn.emulateTransitionEnd=o,p.event.special[m.TRANSITION_END]={bindType:n,delegateType:n,handle:function(e){if(p(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}};var r="alert",a="bs.alert",c="."+a,h=p.fn[r],u={CLOSE:"close"+c,CLOSED:"closed"+c,CLICK_DATA_API:"click"+c+".data-api"},f="alert",d="fade",g="show",_=function(){function i(e){this._element=e}var e=i.prototype;return e.close=function(e){var t=this._element;e&&(t=this._getRootElement(e)),this._triggerCloseEvent(t).isDefaultPrevented()||this._removeElement(t)},e.dispose=function(){p.removeData(this._element,a),this._element=null},e._getRootElement=function(e){var t=m.getSelectorFromElement(e),n=!1;return t&&(n=document.querySelector(t)),n=n||p(e).closest("."+f)[0]},e._triggerCloseEvent=function(e){var t=p.Event(u.CLOSE);return p(e).trigger(t),t},e._removeElement=function(t){var n=this;if(p(t).removeClass(g),p(t).hasClass(d)){var e=m.getTransitionDurationFromElement(t);p(t).one(m.TRANSITION_END,function(e){return n._destroyElement(t,e)}).emulateTransitionEnd(e)}else this._destroyElement(t)},e._destroyElement=function(e){p(e).detach().trigger(u.CLOSED).remove()},i._jQueryInterface=function(n){return this.each(function(){var e=p(this),t=e.data(a);t||(t=new i(this),e.data(a,t)),"close"===n&&t[n](this)})},i._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},s(i,null,[{key:"VERSION",get:function(){return"4.4.1"}}]),i}();p(document).on(u.CLICK_DATA_API,'[data-dismiss="alert"]',_._handleDismiss(new _)),p.fn[r]=_._jQueryInterface,p.fn[r].Constructor=_,p.fn[r].noConflict=function(){return p.fn[r]=h,_._jQueryInterface};var v="button",y="bs.button",E="."+y,b=".data-api",w=p.fn[v],T="active",C="btn",S="focus",D='[data-toggle^="button"]',I='[data-toggle="buttons"]',A='[data-toggle="button"]',O='[data-toggle="buttons"] .btn',N='input:not([type="hidden"])',k=".active",LLine truncated
|
||||
|
||||
/*jquery easing*/
|
||||
!function(n){"function"==typeof define&&define.amd?define(["jquery"],function(e){return n(e)}):"object"==typeof module&&"object"==typeof module.exports?exports=n(require("jquery")):n(jQuery)}(function(n){function e(n){var e=7.5625,t=2.75;return n<1/t?e*n*n:n<2/t?e*(n-=1.5/t)*n+.75:n<2.5/t?e*(n-=2.25/t)*n+.9375:e*(n-=2.625/t)*n+.984375}n.easing.jswing=n.easing.swing;var t=Math.pow,u=Math.sqrt,r=Math.sin,i=Math.cos,a=Math.PI,c=1.70158,o=1.525*c,s=2*a/3,f=2*a/4.5;n.extend(n.easing,{def:"easeOutQuad",swing:function(e){return n.easing[n.easing.def](e)},easeInQuad:function(n){return n*n},easeOutQuad:function(n){return 1-(1-n)*(1-n)},easeInOutQuad:function(n){return n<.5?2*n*n:1-t(-2*n+2,2)/2},easeInCubic:function(n){return n*n*n},easeOutCubic:function(n){return 1-t(1-n,3)},easeInOutCubic:function(n){return n<.5?4*n*n*n:1-t(-2*n+2,3)/2},easeInQuart:function(n){return n*n*n*n},easeOutQuart:function(n){return 1-t(1-n,4)},easeInOutQuart:function(n){return n<.5?8*n*n*n*n:1-t(-2*n+2,4)/2},easeInQuint:function(n){return n*n*n*n*n},easeOutQuint:function(n){return 1-t(1-n,5)},easeInOutQuint:function(n){return n<.5?16*n*n*n*n*n:1-t(-2*n+2,5)/2},easeInSine:function(n){return 1-i(n*a/2)},easeOutSine:function(n){return r(n*a/2)},easeInOutSine:function(n){return-(i(a*n)-1)/2},easeInExpo:function(n){return 0===n?0:t(2,10*n-10)},easeOutExpo:function(n){return 1===n?1:1-t(2,-10*n)},easeInOutExpo:function(n){return 0===n?0:1===n?1:n<.5?t(2,20*n-10)/2:(2-t(2,-20*n+10))/2},easeInCirc:function(n){return 1-u(1-t(n,2))},easeOutCirc:function(n){return u(1-t(n-1,2))},easeInOutCirc:function(n){return n<.5?(1-u(1-t(2*n,2)))/2:(u(1-t(-2*n+2,2))+1)/2},easeInElastic:function(n){return 0===n?0:1===n?1:-t(2,10*n-10)*r((10*n-10.75)*s)},easeOutElastic:function(n){return 0===n?0:1===n?1:t(2,-10*n)*r((10*n-.75)*s)+1},easeInOutElastic:function(n){return 0===n?0:1===n?1:n<.5?-(t(2,20*n-10)*r((20*n-11.125)*f))/2:t(2,-20*n+10)*r((20*n-11.125)*f)/2+1},easeInBack:function(n){return(c+1)*n*n*n-c*n*n},easeOutBack:function(n){return 1+(c+1)*t(n-1,3)+c*t(n-1,2)},easeInOutBack:function(n){return n<.5?t(2*n,2)*(7.189819*n-o)/2:(t(2*n-2,2)*((o+1)*(2*n-2)+o)+2)/2},easeInBounce:function(n){return 1-e(1-n)},easeOutBounce:e,easeInOutBounce:function(n){return n<.5?(1-e(1-2*n))/2:(1+e(2*n-1))/2}})});
|
||||
/*
|
||||
* @license jQuery Breakpoints | MIT | Jerry Low | https://www.github.com/jerrylow/breakpoints
|
||||
*/
|
||||
!function(e){var t=function(t,n){var r=this;r.n="breakpoints",r.settings={},r.currentBp=null,r.getBreakpoint=function(){var e,t=a(),n=r.settings.breakpoints;return n.forEach(function(n){t>=n.width&&(e=n.name)}),e||(e=n[n.length-1].name),e},r.getBreakpointWidth=function(e){var t;return r.settings.breakpoints.forEach(function(n){e==n.name&&(t=n.width)}),t},r.compareCheck=function(e,t,n){var i=a(),o=r.settings.breakpoints,s=r.getBreakpointWidth(t),u=!1;switch(e){case"lessThan":u=i<s;break;case"lessEqualTo":u=i<=s;break;case"greaterThan":case"greaterEqualTo":u=i>s;break;case"inside":var g=o.findIndex(function(e){return e.name===t});if(g===o.length-1)u=i>s;else{var d=r.getBreakpointWidth(o[g+1].name);u=i>=s&&i<d}}u&&n()},r.destroy=function(){e(window).unbind(r.n)};var i=function(){var t=a(),n=r.settings.breakpoints,i=r.currentBp;n.forEach(function(n){i===n.name?n.inside||(e(window).trigger("inside-"+n.name),n.inside=!0):n.inside=!1,t<n.width&&(n.less||(e(window).trigger("lessThan-"+n.name),n.less=!0,n.greater=!1,n.greaterEqual=!1)),t>=n.width&&(n.greaterEqual||(e(window).trigger("greaterEqualTo-"+n.name),n.greaterEqual=!0,n.less=!1),t>n.width&&(n.greater||(e(window).trigger("greaterThan-"+n.name),n.greater=!0,n.less=!1)))})},a=function(){var t=e(window);return r.outerWidth?t.outerWidth():t.width()},o=e.extend({},e.fn.breakpoints.defaults,n);r.settings={breakpoints:o.breakpoints,buffer:o.buffer,triggerOnInit:o.triggerOnInit,outerWidth:o.outerWidth},t.data(r.n,this),r.currentBp=r.getBreakpoint();var s=null;e.isFunction(e(window).on)&&e(window).on("resize."+r.n,function(t){s&&clearTimeout(s),s=setTimeout(function(t){var n;(n=r.getBreakpoint())!==r.currentBp&&(e(window).trigger({type:"breakpoint-change",from:r.currentBp,to:n}),r.currentBp=n),i()},r.settings.buffer)}),r.settings.triggerOnInit&&setTimeout(function(){e(window).trigger({type:"breakpoint-change",from:r.currentBp,to:r.currentBp,initialInit:!0})},r.settings.buffer),setTimeout(function(){i()},0)};e.fn.breakpoints=function(e,n,r){if(this.data("breakpoints")){var i=this.data("breakpoints");return"getBreakpoint"===e?i.getBreakpoint():"getBreakpointWidth"===e?i.getBreakpointWidth(n):["lessThan","lessEqualTo","greaterThan","greaterEqualTo","inside"].indexOf(e)>=0?i.compareCheck(e,n,r):void("destroy"===e&&i.destroy())}new t(this,e)},e.fn.breakpoints.defaults={breakpoints:[{name:"xs",width:0},{name:"sm",width:768},{name:"md",width:992},{name:"lg",width:1200}],buffer:300,triggerOnInit:!1,outerWidth:!1}}(jQuery);
|
||||
|
||||
|
||||
/*!
|
||||
* Isotope PACKAGED v3.0.6
|
||||
*
|
||||
* Licensed GPLv3 for open source use
|
||||
* or Isotope Commercial License for commercial use
|
||||
*
|
||||
* https://isotope.metafizzy.co
|
||||
* Copyright 2010-2018 Metafizzy
|
||||
*/
|
||||
|
||||
!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,s,a){function u(t,e,o){var n,s="$()."+i+'("'+e+'")';return t.each(function(t,u){var h=a.data(u,i);if(!h)return void r(i+" not initialized. Cannot call methods, i.e. "+s);var d=h[e];if(!d||"_"==e.charAt(0))return void r(s+" is not a valid method");var l=d.apply(h,o);n=void 0===n?l:n}),void 0!==n?n:t}function h(t,e){t.each(function(t,o){var n=a.data(o,i);n?(n.option(e),n._init()):(n=new s(o,e),a.data(o,i,n))})}a=a||e||t.jQuery,a&&(s.prototype.option||(s.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=n.call(arguments,1);return u(this,t,e)}return h(this,t),this},o(a))}function o(t){!t||t&&t.bridget||(t.bridget=i)}var n=Array.prototype.slice,s=t.console,r="undefined"==typeof s?function(){}:function(t){s.error(t)};return o(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},o=i[t]=i[t]||[];return o.indexOf(e)==-1&&o.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},o=i[t]=i[t]||{};return o[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var o=i.indexOf(e);return o!=-1&&i.splice(o,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var o=this._onceEvents&&this._onceEvents[t],n=0;n<i.length;n++){var s=i[n],r=o&&o[s];r&&(this.off(t,s),delete o[s]),s.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t}),function(t,e){"function"==typeof define&&define.amd?define("get-size/get-size",e):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=t.indexOf("%")==-1&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;e<h;e++){var i=u[e];t[i]=0}return t}function o(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),e}function n(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var n=o(e);r=200==Math.round(t(n.width)),s.isBoxSizeOuter=r,i.removeChild(e)}}function s(e){if(n(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var s=o(e);if("none"==s.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==s.boxSizing,l=0;l<h;l++){var f=u[l],c=s[f],m=parseFloat(c);a[f]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,y=a.paddingTop+a.paddingBottom,g=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,z=a.borderTopWidth+a.borderBottomWidth,I=d&&r,x=t(s.width);x!==!1&&(a.width=x+(I?0:p+_));var S=t(s.height);return S!==!1&&(a.height=S+(I?0:y+z)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(y+z),a.outerWidth=a.width+g,a.outerHeight=a.height+v,a}}var r,a="undefined"==typeof console?e:function(t){console.error(t)},u=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],h=u.length,d=!1;return s}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var o=e[i],n=o+"MatchesSelector";if(t[n])return n}}();return function(e,i){return e[t](i)}}),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(t,e){var i={};i.extend=function(t,e){for(var i in e)t[i]=e[i];return t},i.modulo=function(t,e){return(t%e+e)%e};var o=Array.prototype.slice;i.makeArray=function(Line truncated
|
||||
}:"function"==typeof t?function(e){return t(e.element)}:function(e){return o(e.element,t)}},l.updateSortData=function(t){var e;t?(t=n.makeArray(t),e=this.getItems(t)):e=this.items,this._getSorters(),this._updateItemsSortData(e)},l._getSorters=function(){var t=this.options.getSortData;for(var e in t){var i=t[e];this._sorters[e]=f(i)}},l._updateItemsSortData=function(t){for(var e=t&&t.length,i=0;e&&i<e;i++){var o=t[i];o.updateSortData()}};var f=function(){function t(t){if("string"!=typeof t)return t;var i=h(t).split(" "),o=i[0],n=o.match(/^\[(.+)\]$/),s=n&&n[1],r=e(s,o),a=d.sortDataParsers[i[1]];return t=a?function(t){return t&&a(r(t))}:function(t){return t&&r(t)}}function e(t,e){return t?function(e){return e.getAttribute(t)}:function(t){var i=t.querySelector(e);return i&&i.textContent}}return t}();d.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},l._sort=function(){if(this.options.sortBy){var t=n.makeArray(this.options.sortBy);this._getIsSameSortBy(t)||(this.sortHistory=t.concat(this.sortHistory));var e=a(this.sortHistory,this.options.sortAscending);this.filteredItems.sort(e)}},l._getIsSameSortBy=function(t){for(var e=0;e<t.length;e++)if(t[e]!=this.sortHistory[e])return!1;return!0},l._mode=function(){var t=this.options.layoutMode,e=this.modes[t];if(!e)throw new Error("No layout mode: "+t);return e.options=this.options[t],e},l._resetLayout=function(){e.prototype._resetLayout.call(this),this._mode()._resetLayout()},l._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},l._manageStamp=function(t){this._mode()._manageStamp(t)},l._getContainerSize=function(){return this._mode()._getContainerSize()},l.needsResizeLayout=function(){return this._mode().needsResizeLayout()},l.appended=function(t){var e=this.addItems(t);if(e.length){var i=this._filterRevealAdded(e);this.filteredItems=this.filteredItems.concat(i)}},l.prepended=function(t){var e=this._itemize(t);if(e.length){this._resetLayout(),this._manageStamps();var i=this._filterRevealAdded(e);this.layoutItems(this.filteredItems),this.filteredItems=i.concat(this.filteredItems),this.items=e.concat(this.items)}},l._filterRevealAdded=function(t){var e=this._filter(t);return this.hide(e.needHide),this.reveal(e.matches),this.layoutItems(e.matches,!0),e.matches},l.insert=function(t){var e=this.addItems(t);if(e.length){var i,o,n=e.length;for(i=0;i<n;i++)o=e[i],this.element.appendChild(o.element);var s=this._filter(e).matches;for(i=0;i<n;i++)e[i].isLayoutInstant=!0;for(this.arrange(),i=0;i<n;i++)delete e[i].isLayoutInstant;this.reveal(s)}};var c=l.remove;return l.remove=function(t){t=n.makeArray(t);var e=this.getItems(t);c.call(this,t);for(var i=e&&e.length,o=0;i&&o<i;o++){var s=e[o];n.removeFrom(this.filteredItems,s)}},l.shuffle=function(){for(var t=0;t<this.items.length;t++){var e=this.items[t];e.sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},l._noTransition=function(t,e){var i=this.options.transitionDuration;this.options.transitionDuration=0;var o=t.apply(this,e);return this.options.transitionDuration=i,o},l.getFilteredItemElements=function(){return this.filteredItems.map(function(t){return t.element})},d});
|
||||
|
||||
/*!
|
||||
* imagesLoaded PACKAGED v4.1.4
|
||||
* JavaScript is all like "You images are done yet or what?"
|
||||
* MIT License
|
||||
*/
|
||||
!function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return n.indexOf(t)==-1&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return n!=-1&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){i=i.slice(0),t=t||[];for(var n=this._onceEvents&&this._onceEvents[e],o=0;o<i.length;o++){var r=i[o],s=n&&n[r];s&&(this.off(e,r),delete n[r]),r.apply(this,t)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e}),function(e,t){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return t(e,i)}):"object"==typeof module&&module.exports?module.exports=t(e,require("ev-emitter")):e.imagesLoaded=t(e,e.EvEmitter)}("undefined"!=typeof window?window:this,function(e,t){function i(e,t){for(var i in t)e[i]=t[i];return e}function n(e){if(Array.isArray(e))return e;var t="object"==typeof e&&"number"==typeof e.length;return t?d.call(e):[e]}function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);var s=e;return"string"==typeof e&&(s=document.querySelectorAll(e)),s?(this.elements=n(s),this.options=i({},this.options),"function"==typeof t?r=t:i(this.options,t),r&&this.on("always",r),this.getImages(),h&&(this.jqDeferred=new h.Deferred),void setTimeout(this.check.bind(this))):void a.error("Bad element for imagesLoaded "+(s||e))}function r(e){this.img=e}function s(e,t){this.url=e,this.element=t,this.img=new Image}var h=e.jQuery,a=e.console,d=Array.prototype.slice;o.prototype=Object.create(t.prototype),o.prototype.options={},o.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},o.prototype.addElementImages=function(e){"IMG"==e.nodeName&&this.addImage(e),this.options.background===!0&&this.addElementBackgroundImages(e);var t=e.nodeType;if(t&&u[t]){for(var i=e.querySelectorAll("img"),n=0;n<i.length;n++){var o=i[n];this.addImage(o)}if("string"==typeof this.options.background){var r=e.querySelectorAll(this.options.background);for(n=0;n<r.length;n++){var s=r[n];this.addElementBackgroundImages(s)}}}};var u={1:!0,9:!0,11:!0};return o.prototype.addElementBackgroundImages=function(e){var t=getComputedStyle(e);if(t)for(var i=/url\((['"])?(.*?)\1\)/gi,n=i.exec(t.backgroundImage);null!==n;){var o=n&&n[2];o&&this.addBackground(o,e),n=i.exec(t.backgroundImage)}},o.prototype.addImage=function(e){var t=new r(e);this.images.push(t)},o.prototype.addBackground=function(e,t){var i=new s(e,t);this.images.push(i)},o.prototype.check=function(){function e(e,i,n){setTimeout(function(){t.progress(e,i,n)})}var t=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(t){t.once("progress",e),t.check()}):void this.complete()},o.prototype.progress=function(e,t,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&a&&a.log("progress: "+i,e,t)},o.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred){var t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},r.prototype=Object.create(t.prototype),r.prototype.check=function(){var e=this.getIsImageComplete();return e?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},r.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},r.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.img,t])},r.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},r.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},r.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},r.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype=Object.create(r.prototype),s.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var e=this.getIsImageCompleteLine truncated
|
||||
|
||||
/*!
|
||||
* Flickity PACKAGED v2.2.1
|
||||
* Touch, responsive, flickable carousels
|
||||
*
|
||||
* Licensed GPLv3 for open source use
|
||||
* or Flickity Commercial License for commercial use
|
||||
*
|
||||
* https://flickity.metafizzy.co
|
||||
* Copyright 2015-2019 Metafizzy
|
||||
*/
|
||||
|
||||
!function(e,i){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(t){return i(e,t)}):"object"==typeof module&&module.exports?module.exports=i(e,require("jquery")):e.jQueryBridget=i(e,e.jQuery)}(window,function(t,e){"use strict";var i=Array.prototype.slice,n=t.console,d=void 0===n?function(){}:function(t){n.error(t)};function s(h,s,c){(c=c||e||t.jQuery)&&(s.prototype.option||(s.prototype.option=function(t){c.isPlainObject(t)&&(this.options=c.extend(!0,this.options,t))}),c.fn[h]=function(t){return"string"==typeof t?function(t,o,r){var a,l="$()."+h+'("'+o+'")';return t.each(function(t,e){var i=c.data(e,h);if(i){var n=i[o];if(n&&"_"!=o.charAt(0)){var s=n.apply(i,r);a=void 0===a?s:a}else d(l+" is not a valid method")}else d(h+" not initialized. Cannot call methods, i.e. "+l)}),void 0!==a?a:t}(this,t,i.call(arguments,1)):(function(t,n){t.each(function(t,e){var i=c.data(e,h);i?(i.option(n),i._init()):(i=new s(e,n),c.data(e,h,i))})}(this,t),this)},o(c))}function o(t){!t||t&&t.bridget||(t.bridget=s)}return o(e||t.jQuery),s}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],s=0;s<i.length;s++){var o=i[s];n&&n[o]&&(this.off(t,o),delete n[o]),o.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t}),function(t,e){"function"==typeof define&&define.amd?define("get-size/get-size",e):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function m(t){var e=parseFloat(t);return-1==t.indexOf("%")&&!isNaN(e)&&e}var i="undefined"==typeof console?function(){}:function(t){console.error(t)},y=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],b=y.length;function E(t){var e=getComputedStyle(t);return e||i("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),e}var S,C=!1;function x(t){if(function(){if(!C){C=!0;var t=document.createElement("div");t.style.width="200px",t.style.padding="1px 2px 3px 4px",t.style.borderStyle="solid",t.style.borderWidth="1px 2px 3px 4px",t.style.boxSizing="border-box";var e=document.body||document.documentElement;e.appendChild(t);var i=E(t);S=200==Math.round(m(i.width)),x.isBoxSizeOuter=S,e.removeChild(t)}}(),"string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var e=E(t);if("none"==e.display)return function(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;e<b;e++){t[y[e]]=0}return t}();var i={};i.width=t.offsetWidth,i.height=t.offsetHeight;for(var n=i.isBorderBox="border-box"==e.boxSizing,s=0;s<b;s++){var o=y[s],r=e[o],a=parseFloat(r);i[o]=isNaN(a)?0:a}var l=i.paddingLeft+i.paddingRight,h=i.paddingTop+i.paddingBottom,c=i.marginLeft+i.marginRight,d=i.marginTop+i.marginBottom,u=i.borderLeftWidth+i.borderRightWidth,f=i.borderTopWidth+i.borderBottomWidth,p=n&&S,g=m(e.width);!1!==g&&(i.width=g+(p?0:l+u));var v=m(e.height);return!1!==v&&(i.height=v+(p?0:h+f)),i.innerWidth=i.width-(l+u),i.innerHeight=i.height-(h+f),i.outerWidth=i.width+c,i.outerHeight=i.height+d,i}}return x}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var i=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var n=e[i]+"MatchesSelector";if(t[n])return n}}();return function(t,e){return t[i](e)}}),function(e,i){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(t){return i(e,t)}):"object"==typeof module&&module.exports?module.exports=i(e,require("desandro-matches-selector")):e.fizzyUIUtils=i(e,e.matchesSelector)}(window,function(h,o){var c={extend:function(t,e){for(var i in e)t[i]=e[i];return t},modulo:function(t,e){return(t%e+e)%e}},e=Array.prototype.slice;c.makeArray=function(t){return Array.isArray(t)?t:null==t?[]:"object"==typeof t&&"number"==typeof t.length?e.caLine truncated
|
||||
|
||||
!function(e,t){"function"==typeof define&&define.amd?define(["flickity/js/index","fizzy-ui-utils/utils"],t):"object"==typeof module&&module.exports?module.exports=t(require("flickity"),require("fizzy-ui-utils")):t(e.Flickity,e.fizzyUIUtils)}(this,function(e,t){var i=e.Slide,s=i.prototype.updateTarget;i.prototype.updateTarget=function(){if(s.apply(this,arguments),this.parent.options.fade){var e=this.target-this.x,t=this.cells[0].x;this.cells.forEach(function(i){var s=i.x-t-e;i.renderPosition(s)})}},i.prototype.setOpacity=function(e){this.cells.forEach(function(t){t.element.style.opacity=e})};var a=e.prototype;e.createMethods.push("_createFade"),a._createFade=function(){this.fadeIndex=this.selectedIndex,this.prevSelectedIndex=this.selectedIndex,this.on("select",this.onSelectFade),this.on("dragEnd",this.onDragEndFade),this.on("settle",this.onSettleFade),this.on("activate",this.onActivateFade),this.on("deactivate",this.onDeactivateFade)};var n=a.updateSlides;a.updateSlides=function(){n.apply(this,arguments),this.options.fade&&this.slides.forEach(function(e,t){var i=t==this.selectedIndex?1:0;e.setOpacity(i)},this)},a.onSelectFade=function(){this.fadeIndex=Math.min(this.prevSelectedIndex,this.slides.length-1),this.prevSelectedIndex=this.selectedIndex},a.onSettleFade=function(){(delete this.didDragEnd,this.options.fade)&&(this.selectedSlide.setOpacity(1),this.slides[this.fadeIndex]&&this.fadeIndex!=this.selectedIndex&&this.slides[this.fadeIndex].setOpacity(0))},a.onDragEndFade=function(){this.didDragEnd=!0},a.onActivateFade=function(){this.options.fade&&this.element.classList.add("is-fade")},a.onDeactivateFade=function(){this.options.fade&&(this.element.classList.remove("is-fade"),this.slides.forEach(function(e){e.setOpacity("")}))};var d=a.positionSlider;a.positionSlider=function(){this.options.fade?(this.fadeSlides(),this.dispatchScrollEvent()):d.apply(this,arguments)};var h=a.positionSliderAtSelected;a.positionSliderAtSelected=function(){this.options.fade&&this.setTranslateX(0),h.apply(this,arguments)},a.fadeSlides=function(){if(!(this.slides.length<2)){var e=this.getFadeIndexes(),t=this.slides[e.a],i=this.slides[e.b],s=this.wrapDifference(t.target,i.target),a=this.wrapDifference(t.target,-this.x);a/=s,t.setOpacity(1-a),i.setOpacity(a);var n=e.a;this.isDragging&&(n=a>.5?e.a:e.b),null!=this.fadeHideIndex&&this.fadeHideIndex!=n&&this.fadeHideIndex!=e.a&&this.fadeHideIndex!=e.b&&this.slides[this.fadeHideIndex].setOpacity(0),this.fadeHideIndex=n}},a.getFadeIndexes=function(){return this.isDragging||this.didDragEnd?this.options.wrapAround?this.getFadeDragWrapIndexes():this.getFadeDragLimitIndexes():{a:this.fadeIndex,b:this.selectedIndex}},a.getFadeDragWrapIndexes=function(){var e=this.slides.map(function(e,t){return this.getSlideDistance(-this.x,t)},this),i=e.map(function(e){return Math.abs(e)}),s=Math.min.apply(Math,i),a=i.indexOf(s),n=e[a],d=this.slides.length,h=n>=0?1:-1;return{a:a,b:t.modulo(a+h,d)}},a.getFadeDragLimitIndexes=function(){for(var e=0,t=0;t<this.slides.length-1;t++){var i=this.slides[t];if(-this.x<i.target)break;e=t}return{a:e,b:e+1}},a.wrapDifference=function(e,t){var i=t-e;if(!this.options.wrapAround)return i;var s=i+this.slideableWidth,a=i-this.slideableWidth;return Math.abs(s)<Math.abs(i)&&(i=s),Math.abs(a)<Math.abs(i)&&(i=a),i};var o=a._getWrapShiftCells;a._getWrapShiftCells=function(){this.options.fade||o.apply(this,arguments)};var r=a.shiftWrapCells;return a.shiftWrapCells=function(){this.options.fade||r.apply(this,arguments)},e});
|
||||
|
||||
!function(e,t){"function"==typeof define&&define.amd?define(["flickity/js/index","fizzy-ui-utils/utils"],t):"object"==typeof module&&module.exports?module.exports=t(require("flickity"),require("fizzy-ui-utils")):e.Flickity=t(e.Flickity,e.fizzyUIUtils)}(window,function(e,t){"use strict";e.createMethods.push("_createAsNavFor");var i=e.prototype;return i._createAsNavFor=function(){this.on("activate",this.activateAsNavFor),this.on("deactivate",this.deactivateAsNavFor),this.on("destroy",this.destroyAsNavFor);var e=this.options.asNavFor;if(e){var t=this;setTimeout(function(){t.setNavCompanion(e)})}},i.setNavCompanion=function(i){i=t.getQueryElement(i);var n=e.data(i);if(n&&n!=this){this.navCompanion=n;var a=this;this.onNavCompanionSelect=function(){a.navCompanionSelect()},n.on("select",this.onNavCompanionSelect),this.on("staticClick",this.onNavStaticClick),this.navCompanionSelect(!0)}},i.navCompanionSelect=function(e){var t=this.navCompanion&&this.navCompanion.selectedCells;if(t){var i,n,a,o=t[0],s=this.navCompanion.cells.indexOf(o),c=s+t.length-1,l=Math.floor((i=s,n=c,a=this.navCompanion.cellAlign,(n-i)*a+i));if(this.selectCell(l,!1,e),this.removeNavSelectedElements(),!(l>=this.cells.length)){var v=this.cells.slice(s,c+1);this.navSelectedElements=v.map(function(e){return e.element}),this.changeNavSelectedClass("add")}}},i.changeNavSelectedClass=function(e){this.navSelectedElements.forEach(function(t){t.classList[e]("is-nav-selected")})},i.activateAsNavFor=function(){this.navCompanionSelect(!0)},i.removeNavSelectedElements=function(){this.navSelectedElements&&(this.changeNavSelectedClass("remove"),delete this.navSelectedElements)},i.onNavStaticClick=function(e,t,i,n){"number"==typeof n&&this.navCompanion.selectCell(n)},i.deactivateAsNavFor=function(){this.removeNavSelectedElements()},i.destroyAsNavFor=function(){this.navCompanion&&(this.navCompanion.off("select",this.onNavCompanionSelect),this.off("staticClick",this.onNavStaticClick),delete this.navCompanion)},e});
|
||||
|
||||
/*
|
||||
* Project: Scrolly : parallax is easy as a matter of fact !
|
||||
* Description: Based on jQuery boilerplate
|
||||
* Author: Victor C. / Octave & Octave web agency
|
||||
* Licence: MIT
|
||||
*/
|
||||
!function(t,i){"function"==typeof define&&define.amd?define(["jquery"],i):i(t.jQuery)}(this,function(t){"use strict";function i(i,o){this.element=i,this.$element=t(this.element),this.options=t.extend({},e,o),this._defaults=e,this._name=s,this.init()}var s="scrolly",e={bgParallax:!1};i.prototype.init=function(){var i=this;this.startPosition=this.$element.position().top,this.offsetTop=this.$element.offset().top,this.height=this.$element.outerHeight(!0),this.velocity=this.$element.attr("data-velocity"),this.bgStart=parseInt(this.$element.attr("data-fit"),10),t(document).scroll(function(){i.didScroll=!0}),setInterval(function(){i.didScroll&&(i.didScroll=!1,i.scrolly())},10)},i.prototype.scrolly=function(){var i=t(window).scrollTop(),s=t(window).height(),e=this.startPosition;this.offsetTop>=i+s?this.$element.addClass("scrolly-invisible"):e=this.$element.hasClass("scrolly-invisible")?this.startPosition+(i+(s-this.offsetTop))*this.velocity:this.startPosition+i*this.velocity,this.bgStart&&(e+=this.bgStart),this.options.bgParallax===!0?this.$element.css({backgroundPositionY: e+"px"}):this.$element.css({top:e})},t.fn[s]=function(e){return this.each(function(){t.data(this,"plugin_"+s)||t.data(this,"plugin_"+s,new i(this,e))})}});
|
||||
|
||||
/*! Magnific Popup - v1.1.0 - 2016-02-20
|
||||
* http://dimsemenov.com/plugins/magnific-popup/
|
||||
* Copyright (c) 2016 Dmitry Semenov; */
|
||||
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isLowIE=b.isIE8=document.all&&!document.addEventListener,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",c.mainEl&&c.mainEl.length?b.ev=c.mainEl.eq(0):b.ev=d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.fixedContentPos?b.wrap.css({overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}):b.wrap.css({top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b.st.autoFocusLast&&b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innLine truncated
|
||||
/*! js-cookie v2.2.1 | MIT */
|
||||
!function(a){var b;if("function"==typeof define&&define.amd&&(define(a),b=!0),"object"==typeof exports&&(module.exports=a(),b=!0),!b){var c=window.Cookies,d=window.Cookies=a();d.noConflict=function(){return window.Cookies=c,d}}}(function(){function a(){for(var a=0,b={};a<arguments.length;a++){var c=arguments[a];for(var d in c)b[d]=c[d]}return b}function b(a){return a.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}function c(d){function e(){}function f(b,c,f){if("undefined"!=typeof document){f=a({path:"/"},e.defaults,f),"number"==typeof f.expires&&(f.expires=new Date(1*new Date+864e5*f.expires)),f.expires=f.expires?f.expires.toUTCString():"";try{var g=JSON.stringify(c);/^[\{\[]/.test(g)&&(c=g)}catch(j){}c=d.write?d.write(c,b):encodeURIComponent(c+"").replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),b=encodeURIComponent(b+"").replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var h="";for(var i in f)f[i]&&(h+="; "+i,!0!==f[i]&&(h+="="+f[i].split(";")[0]));return document.cookie=b+"="+c+h}}function g(a,c){if("undefined"!=typeof document){for(var e={},f=document.cookie?document.cookie.split("; "):[],g=0;g<f.length;g++){var h=f[g].split("="),i=h.slice(1).join("=");c||'"'!==i.charAt(0)||(i=i.slice(1,-1));try{var j=b(h[0]);if(i=(d.read||d)(i,j)||b(i),c)try{i=JSON.parse(i)}catch(k){}if(e[j]=i,a===j)break}catch(k){}}return a?e[a]:e}}return e.set=f,e.get=function(a){return g(a,!1)},e.getJSON=function(a){return g(a,!0)},e.remove=function(b,c){f(b,"",a(c,{expires:-1}))},e.defaults={},e.withConverter=c,e}return c(function(){})});
|
||||
/**
|
||||
* Tweetie: A simple Twitter feed plugin
|
||||
* Author: Sonny T. <hi@sonnyt.com>, sonnyt.com
|
||||
*/
|
||||
!function(e){"use strict";e.fn.twittie=function(){var t=arguments[0]instanceof Object?arguments[0]:{},a="function"==typeof arguments[0]?arguments[0]:arguments[1],r=e.extend({username:null,list:null,hashtag:null,count:10,hideReplies:!1,dateFormat:"%b/%d/%Y",template:"{{date}} - {{tweet}}",apiPath:"api/tweet.php",loadingText:"Loading..."},t);r.list&&!r.username&&e.error("If you want to fetch tweets from a list, you must define the username of the list owner.");var n=function(e){return e.replace(/(https?:\/\/([-\w\.]+)+(:\d+)?(\/([\w\/_\.]*(\?\S+)?)?)?)/gi,'<a href="$1" target="_blank" title="Visit this link">$1</a>').replace(/#([a-zA-Z0-9_]+)/g,'<a href="https://twitter.com/search?q=%23$1&src=hash" target="_blank" title="Search for #$1">#$1</a>').replace(/@([a-zA-Z0-9_]+)/g,'<a href="https://twitter.com/$1" target="_blank" title="$1 on Twitter">@$1</a>')},s=function(e){for(var t=e.split(" "),a=["January","February","March","April","May","June","July","August","September","October","November","December"],n={"%d":(e=new Date(Date.parse(t[1]+" "+t[2]+", "+t[5]+" "+t[3]+" UTC"))).getDate(),"%m":e.getMonth()+1,"%b":a[e.getMonth()].substr(0,3),"%B":a[e.getMonth()],"%y":String(e.getFullYear()).slice(-2),"%Y":e.getFullYear()},s=r.dateFormat,i=r.dateFormat.match(/%[dmbByY]/g),u=0,l=i.length;u<l;u++)s=s.replace(i[u],n[i[u]]);return s},i=function(e){for(var t=r.template,a=["date","tweet","avatar","url","retweeted","screen_name","user_name"],n=0,s=a.length;n<s;n++)t=t.replace(new RegExp("{{"+a[n]+"}}","gi"),e[a[n]]);return t};this.html("<span>"+r.loadingText+"</span>");var u=this;e.getJSON(r.apiPath,{username:r.username,list:r.list,hashtag:r.hashtag,count:r.count,exclude_replies:r.hideReplies},function(e){u.find("span").fadeOut("fast",function(){u.html("<ul></ul>");for(var t=0;t<r.count;t++){var l=!1;if(e[t])l=e[t];else{if(void 0===e.statuses||!e.statuses[t])break;l=e.statuses[t]}var o=l.user.profile_image_url;o.match("^http://")&&(o=o.replace("http://","https://"));var c={user_name:l.user.name,date:s(l.created_at),tweet:l.retweeted?n("RT @"+l.user.screen_name+": "+l.retweeted_status.text):n(l.text),avatar:'<img src="'+o+'" />',url:"https://twitter.com/"+l.user.screen_name+"/status/"+l.id_str,retweeted:l.retweeted,screen_name:n("@"+l.user.screen_name)};u.find("ul").append("<li>"+i(c)+"</li>")}"function"==typeof a&&a()})})}}(jQuery);
|
||||
/*
|
||||
* Copyright (C) 2009 Joel Sutherland
|
||||
* Licenced under the MIT license
|
||||
* http://www.newmediacampaigns.com/page/jquery-flickr-plugin
|
||||
*/
|
||||
(function($){$.fn.jflickrfeed=function(settings,callback){settings=$.extend(true,{flickrbase:'http://api.flickr.com/services/feeds/',feedapi:'photos_public.gne',limit:20,qstrings:{lang:'en-us',format:'json',jsoncallback:'?'},cleanDescription:true,useTemplate:true,itemTemplate:'',itemCallback:function(){}},settings);var url=settings.flickrbase+settings.feedapi+'?';var first=true;for(var key in settings.qstrings){if(!first)
|
||||
url+='&';url+=key+'='+settings.qstrings[key];first=false;}
|
||||
return $(this).each(function(){var $container=$(this);var container=this;$.getJSON(url,function(data){$.each(data.items,function(i,item){if(i<settings.limit){if(settings.cleanDescription){var regex=/<p>(.*?)<\/p>/g;var input=item.description;if(regex.test(input)){item.description=input.match(regex)[2]
|
||||
if(item.description!=undefined)
|
||||
item.description=item.description.replace('<p>','').replace('</p>','');}}
|
||||
item['image_s']=item.media.m.replace('_m','_s');item['image_t']=item.media.m.replace('_m','_t');item['image_m']=item.media.m.replace('_m','_m');item['image']=item.media.m.replace('_m','');item['image_b']=item.media.m.replace('_m','_b');delete item.media;if(settings.useTemplate){var template=settings.itemTemplate;for(var key in item){var rgx=new RegExp('{{'+key+'}}','g');template=template.replace(rgx,item[key]);}
|
||||
$container.append(template)}
|
||||
settings.itemCallback.call(container,item);}});if($.isFunction(callback)){callback.call(container,data);}});});}})(jQuery);
|
||||
/* spectragram.js / by Adrian Quevedo */
|
||||
if(typeof Object.create!=="function"){Object.create=function(obj){function F(){}F.prototype=obj;return new F}}(function($,window,document,undefined){var Instagram={API_URL:"https://graph.instagram.com/me/media?fields=",API_FIELDS:"caption,media_url,media_type,permalink,timestamp,username",initialize:function(options,elem){this.elem=elem;this.$elem=$(elem);this.accessToken=$.fn.spectragram.accessData.accessToken,this.options=$.extend({},$.fn.spectragram.options,options);this.messages={defaultImageAltText:"Instagram Photo",notFound:"This user account is private or doesn't have any photos."};this.getPhotos()},getPhotos:function(){var self=this;self.fetch().done(function(results){if(results.data&&results.data.length){self.displayPhotos(results)}else if(results.error.message){$.error("Spectragram.js - Error: "+results.error.message)}else{$.error("Spectragram.js - Error: user does not have photos.")}})},fetch:function(){var getUrl=this.API_URL+this.API_FIELDS+"&access_token="+this.accessToken;return $.ajax({type:"GET",dataType:"jsonp",cache:false,url:getUrl})},displayPhotos:function(results){var $element,$image,hasCaption,isWrapperEmpty,isImage,imageGroup=[],imageCaption,max,size;var sizeChart={small:160,medium:320,large:640};isWrapperEmpty=$(this.options.wrapEachWith).length===0;max=this.options.max>=results.data.length?results.data.length:this.options.max;size=sizeChart[this.options.size];if(results.data===undefined||results.data.length===0){if(isWrapperEmpty){this.$elem.append(this.messages.notFound)}else{this.$elem.append($(this.options.wrapEachWith).append(this.messages.notFound))}return}for(var i=0;i<max;i++){isImage=results.data[i].media_type==="IMAGE";if(isImage){hasCaption=results.data[i].caption!==null||results.data[i].caption!==undefined;imageCaption=hasCaption?$("<span>").text(results.data[i].caption).html():this.messages.defaultImageAltText;$image=$("<img>",{alt:imageCaption,attr:{height:size,width:size},src:results.data[i].media_url});$element=$("<a>",{href:results.data[i].permalink,target:"_blank",title:imageCaption}).append($image);if(isWrapperEmpty){imageGroup.push($element)}else{imageGroup.push($(this.options.wrapEachWith).append($element))}}}this.$elem.append(imageGroup);if(typeof this.options.complete==="function"){this.options.complete.call(this)}}};jQuery.fn.spectragram=function(options){if(jQuery.fn.spectragram.accessData.accessToken){this.each(function(){var instagram=Object.create(Instagram);instagram.initialize(options,this)})}else{$.error("You must define an accessToken on jQuery.spectragram")}};jQuery.fn.spectragram.options={complete:null,max:25,size:"large",wrapEachWith:"<li></li>"};jQuery.fn.spectragram.accessData={accessToken:null}})(jQuery,window,document);
|
||||
|
||||
/* https://github.com/mhuggins/jquery-countTo */
|
||||
(function(e){function t(e,t){return e.toFixed(t.decimals)}e.fn.countTo=function(t){t=t||{};return e(this).each(function(){function l(){a+=i;u++;c(a);if(typeof n.onUpdate=="function"){n.onUpdate.call(s,a)}if(u>=r){o.removeData("countTo");clearInterval(f.interval);a=n.to;if(typeof n.onComplete=="function"){n.onComplete.call(s,a)}}}function c(e){var t=n.formatter.call(s,e,n);o.text(t)}var n=e.extend({},e.fn.countTo.defaults,{from:e(this).data("from"),to:e(this).data("to"),speed:e(this).data("speed"),refreshInterval:e(this).data("refresh-interval"),decimals:e(this).data("decimals")},t);var r=Math.ceil(n.speed/n.refreshInterval),i=(n.to-n.from)/r;var s=this,o=e(this),u=0,a=n.from,f=o.data("countTo")||{};o.data("countTo",f);if(f.interval){clearInterval(f.interval)}f.interval=setInterval(l,n.refreshInterval);c(a)})};e.fn.countTo.defaults={from:0,to:0,speed:1e3,refreshInterval:100,decimals:0,formatter:t,onUpdate:null,onComplete:null}})(jQuery);
|
||||
|
||||
/*! Morphext - v2.4.7 - 2016-11-04 */
|
||||
!function(a){"use strict";function b(b,c){this.element=a(b),this.settings=a.extend({},d,c),this._defaults=d,this._init()}var c="Morphext",d={animation:"bounceIn",separator:",",speed:2e3,complete:a.noop};b.prototype={_init:function(){var b=this;this.phrases=[],this.element.addClass("morphext"),a.each(this.element.text().split(this.settings.separator),function(c,d){b.phrases.push(a.trim(d))}),this.index=-1,this.animate(),this.start()},animate:function(){this.index=++this.index%this.phrases.length,this.element[0].innerHTML='<span class="animated '+this.settings.animation+'">'+this.phrases[this.index]+"</span>",a.isFunction(this.settings.complete)&&this.settings.complete.call(this)},start:function(){var a=this;this._interval=setInterval(function(){a.animate()},this.settings.speed)},stop:function(){this._interval=clearInterval(this._interval)}},a.fn[c]=function(d){return this.each(function(){a.data(this,"plugin_"+c)||a.data(this,"plugin_"+c,new b(this,d))})}}(jQuery);
|
||||
/*
|
||||
* easy-pie-chart - Lightweight plugin to render simple, animated and retina optimized pie charts - http://robert-fleischmann.de
|
||||
*/
|
||||
!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){var b=function(a,b){var c,d=document.createElement("canvas");a.appendChild(d),"object"==typeof G_vmlCanvasManager&&G_vmlCanvasManager.initElement(d);var e=d.getContext("2d");d.width=d.height=b.size;var f=1;window.devicePixelRatio>1&&(f=window.devicePixelRatio,d.style.width=d.style.height=[b.size,"px"].join(""),d.width=d.height=b.size*f,e.scale(f,f)),e.translate(b.size/2,b.size/2),e.rotate((-0.5+b.rotate/180)*Math.PI);var g=(b.size-b.lineWidth)/2;b.scaleColor&&b.scaleLength&&(g-=b.scaleLength+2),Date.now=Date.now||function(){return+new Date};var h=function(a,b,c){c=Math.min(Math.max(-1,c||0),1);var d=0>=c?!0:!1;e.beginPath(),e.arc(0,0,g,0,2*Math.PI*c,d),e.strokeStyle=a,e.lineWidth=b,e.stroke()},i=function(){var a,c;e.lineWidth=1,e.fillStyle=b.scaleColor,e.save();for(var d=24;d>0;--d)d%6===0?(c=b.scaleLength,a=0):(c=.6*b.scaleLength,a=b.scaleLength-c),e.fillRect(-b.size/2+a,0,c,1),e.rotate(Math.PI/12);e.restore()},j=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(a){window.setTimeout(a,1e3/60)}}(),k=function(){b.scaleColor&&i(),b.trackColor&&h(b.trackColor,b.trackWidth||b.lineWidth,1)};this.getCanvas=function(){return d},this.getCtx=function(){return e},this.clear=function(){e.clearRect(b.size/-2,b.size/-2,b.size,b.size)},this.draw=function(a){b.scaleColor||b.trackColor?e.getImageData&&e.putImageData?c?e.putImageData(c,0,0):(k(),c=e.getImageData(0,0,b.size*f,b.size*f)):(this.clear(),k()):this.clear(),e.lineCap=b.lineCap;var d;d="function"==typeof b.barColor?b.barColor(a):b.barColor,h(d,b.lineWidth,a/100)}.bind(this),this.animate=function(a,c){var d=Date.now();b.onStart(a,c);var e=function(){var f=Math.min(Date.now()-d,b.animate.duration),g=b.easing(this,f,a,c-a,b.animate.duration);this.draw(g),b.onStep(a,c,g),f>=b.animate.duration?b.onStop(a,c):j(e)}.bind(this);j(e)}.bind(this)},c=function(a,c){var d={barColor:"#ef1e25",trackColor:"#f9f9f9",scaleColor:"#dfe0e0",scaleLength:5,lineCap:"round",lineWidth:3,trackWidth:void 0,size:110,rotate:0,animate:{duration:1e3,enabled:!0},easing:function(a,b,c,d,e){return b/=e/2,1>b?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},onStart:function(a,b){},onStep:function(a,b,c){},onStop:function(a,b){}};if("undefined"!=typeof b)d.renderer=b;else{if("undefined"==typeof SVGRenderer)throw new Error("Please load either the SVG- or the CanvasRenderer");d.renderer=SVGRenderer}var e={},f=0,g=function(){this.el=a,this.options=e;for(var b in d)d.hasOwnProperty(b)&&(e[b]=c&&"undefined"!=typeof c[b]?c[b]:d[b],"function"==typeof e[b]&&(e[b]=e[b].bind(this)));"string"==typeof e.easing&&"undefined"!=typeof jQuery&&jQuery.isFunction(jQuery.easing[e.easing])?e.easing=jQuery.easing[e.easing]:e.easing=d.easing,"number"==typeof e.animate&&(e.animate={duration:e.animate,enabled:!0}),"boolean"!=typeof e.animate||e.animate||(e.animate={duration:1e3,enabled:e.animate}),this.renderer=new e.renderer(a,e),this.renderer.draw(f),a.dataset&&a.dataset.percent?this.update(parseFloat(a.dataset.percent)):a.getAttribute&&a.getAttribute("data-percent")&&this.update(parseFloat(a.getAttribute("data-percent")))}.bind(this);this.update=function(a){return a=parseFloat(a),e.animate.enabled?this.renderer.animate(f,a):this.renderer.draw(a),f=a,this}.bind(this),this.disableAnimation=function(){return e.animate.enabled=!1,this},this.enableAnimation=function(){return e.animate.enabled=!0,this},g()};a.fn.easyPieChart=function(b){return this.each(function(){var d;a.data(this,"easyPieChart")||(d=a.extend({},b,a(this).data()),a.data(this,"easyPieChart",new c(this,d)))})}});
|
||||
/*!
|
||||
* The Final Countdown for jQuery v2.2.0 (http://hilios.github.io/jQuery.countdown/)
|
||||
* Copyright (c) 2016 Edson Hilios
|
||||
*/
|
||||
!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){"use strict";function b(a){if(a instanceof Date)return a;if(String(a).match(g))return String(a).match(/^[0-9]*$/)&&(a=Number(a)),String(a).match(/\-/)&&(a=String(a).replace(/\-/g,"/")),new Date(a);throw new Error("Couldn't cast `"+a+"` to a date object.")}function c(a){var b=a.toString().replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");return new RegExp(b)}function d(a){return function(b){var d=b.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi);if(d)for(var f=0,g=d.length;f<g;++f){var h=d[f].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/),j=c(h[0]),k=h[1]||"",l=h[3]||"",m=null;h=h[2],i.hasOwnProperty(h)&&(m=i[h],m=Number(a[m])),null!==m&&("!"===k&&(m=e(l,m)),""===k&&m<10&&(m="0"+m.toString()),b=b.replace(j,m.toString()))}return b=b.replace(/%%/,"%")}}function e(a,b){var c="s",d="";return a&&(a=a.replace(/(:|;|\s)/gi,"").split(/\,/),1===a.length?c=a[0]:(d=a[0],c=a[1])),Math.abs(b)>1?c:d}var f=[],g=[],h={precision:100,elapse:!1,defer:!1};g.push(/^[0-9]*$/.source),g.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g=new RegExp(g.join("|"));var i={Y:"years",m:"months",n:"daysToMonth",d:"daysToWeek",w:"weeks",W:"weeksToMonth",H:"hours",M:"minutes",S:"seconds",D:"totalDays",I:"totalHours",N:"totalMinutes",T:"totalSeconds"},j=function(b,c,d){this.el=b,this.$el=a(b),this.interval=null,this.offset={},this.options=a.extend({},h),this.firstTick=!0,this.instanceNumber=f.length,f.push(this),this.$el.data("countdown-instance",this.instanceNumber),d&&("function"==typeof d?(this.$el.on("update.countdown",d),this.$el.on("stoped.countdown",d),this.$el.on("finish.countdown",d)):this.options=a.extend({},h,d)),this.setFinalDate(c),this.options.defer===!1&&this.start()};a.extend(j.prototype,{start:function(){null!==this.interval&&clearInterval(this.interval);var a=this;this.update(),this.interval=setInterval(function(){a.update.call(a)},this.options.precision)},stop:function(){clearInterval(this.interval),this.interval=null,this.dispatchEvent("stoped")},toggle:function(){this.interval?this.stop():this.start()},pause:function(){this.stop()},resume:function(){this.start()},remove:function(){this.stop.call(this),f[this.instanceNumber]=null,delete this.$el.data().countdownInstance},setFinalDate:function(a){this.finalDate=b(a)},update:function(){if(0===this.$el.closest("html").length)return void this.remove();var a,b=new Date;return a=this.finalDate.getTime()-b.getTime(),a=Math.ceil(a/1e3),a=!this.options.elapse&&a<0?0:Math.abs(a),this.totalSecsLeft===a||this.firstTick?void(this.firstTick=!1):(this.totalSecsLeft=a,this.elapsed=b>=this.finalDate,this.offset={seconds:this.totalSecsLeft%60,minutes:Math.floor(this.totalSecsLeft/60)%60,hours:Math.floor(this.totalSecsLeft/60/60)%24,days:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToWeek:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToMonth:Math.floor(this.totalSecsLeft/60/60/24%30.4368),weeks:Math.floor(this.totalSecsLeft/60/60/24/7),weeksToMonth:Math.floor(this.totalSecsLeft/60/60/24/7)%4,months:Math.floor(this.totalSecsLeft/60/60/24/30.4368),years:Math.abs(this.finalDate.getFullYear()-b.getFullYear()),totalDays:Math.floor(this.totalSecsLeft/60/60/24),totalHours:Math.floor(this.totalSecsLeft/60/60),totalMinutes:Math.floor(this.totalSecsLeft/60),totalSeconds:this.totalSecsLeft},void(this.options.elapse||0!==this.totalSecsLeft?this.dispatchEvent("update"):(this.stop(),this.dispatchEvent("finish"))))},dispatchEvent:function(b){var c=a.Event(b+".countdown");c.finalDate=this.finalDate,c.elapsed=this.elapsed,c.offset=a.extend({},this.offset),c.strftime=d(this.offset),this.$el.trigger(c)}}),a.fn.countdown=function(){var b=Array.prototype.slice.call(arguments,0);return this.each(function(){var c=a(this).data("countdown-instance");if(void 0!==c){var d=f[c],e=b[0];j.prototype.hasOwnProperty(e)?d[e].apply(d,b.slice(1)):null===String(e).match(/^[$A-Z_][0-9A-Z_$]*$/i)?(d.setFinalDate.call(d,e),d.start()):a.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi,e))}else new j(this,b[0],b[1])})}});
|
||||
|
||||
/*sticky sidebar*/
|
||||
!function(i){i.fn.theiaStickySidebar=function(t){function e(t,e){var a=o(t,e);a||(console.log("TSS: Body width smaller than options.minWidth. Init is delayed."),i(document).on("scroll."+t.namespace,function(t,e){return function(a){var n=o(t,e);n&&i(this).unbind(a)}}(t,e)),i(window).on("resize."+t.namespace,function(t,e){return function(a){var n=o(t,e);n&&i(this).unbind(a)}}(t,e)))}function o(t,e){return t.initialized===!0||!(i("body").width()<t.minWidth)&&(a(t,e),!0)}function a(t,e){t.initialized=!0;var o=i("#theia-sticky-sidebar-stylesheet-"+t.namespace);0===o.length&&i("head").append(i('<style id="theia-sticky-sidebar-stylesheet-'+t.namespace+'">.theiaStickySidebar:after {content: ""; display: table; clear: both;}</style>')),e.each(function(){function e(){a.fixedScrollTop=0,a.sidebar.css({"min-height":"1px"}),a.stickySidebar.css({position:"static",width:"",transform:"none"})}function o(t){var e=t.height();return t.children().each(function(){e=Math.max(e,i(this).height())}),e}var a={};if(a.sidebar=i(this),a.options=t||{},a.container=i(a.options.containerSelector),0==a.container.length&&(a.container=a.sidebar.parent()),a.sidebar.parents().css("-webkit-transform","none"),a.sidebar.css({position:a.options.defaultPosition,overflow:"visible","-webkit-box-sizing":"border-box","-moz-box-sizing":"border-box","box-sizing":"border-box"}),a.stickySidebar=a.sidebar.find(".theiaStickySidebar"),0==a.stickySidebar.length){var s=/(?:text|application)\/(?:x-)?(?:javascript|ecmascript)/i;a.sidebar.find("script").filter(function(i,t){return 0===t.type.length||t.type.match(s)}).remove(),a.stickySidebar=i("<div>").addClass("theiaStickySidebar").append(a.sidebar.children()),a.sidebar.append(a.stickySidebar)}a.marginBottom=parseInt(a.sidebar.css("margin-bottom")),a.paddingTop=parseInt(a.sidebar.css("padding-top")),a.paddingBottom=parseInt(a.sidebar.css("padding-bottom"));var r=a.stickySidebar.offset().top,d=a.stickySidebar.outerHeight();a.stickySidebar.css("padding-top",1),a.stickySidebar.css("padding-bottom",1),r-=a.stickySidebar.offset().top,d=a.stickySidebar.outerHeight()-d-r,0==r?(a.stickySidebar.css("padding-top",0),a.stickySidebarPaddingTop=0):a.stickySidebarPaddingTop=1,0==d?(a.stickySidebar.css("padding-bottom",0),a.stickySidebarPaddingBottom=0):a.stickySidebarPaddingBottom=1,a.previousScrollTop=null,a.fixedScrollTop=0,e(),a.onScroll=function(a){if(a.stickySidebar.is(":visible")){if(i("body").width()<a.options.minWidth)return void e();if(a.options.disableOnResponsiveLayouts){var s=a.sidebar.outerWidth("none"==a.sidebar.css("float"));if(s+50>a.container.width())return void e()}var r=i(document).scrollTop(),d="static";if(r>=a.sidebar.offset().top+(a.paddingTop-a.options.additionalMarginTop)){var c,p=a.paddingTop+t.additionalMarginTop,b=a.paddingBottom+a.marginBottom+t.additionalMarginBottom,l=a.sidebar.offset().top,f=a.sidebar.offset().top+o(a.container),h=0+t.additionalMarginTop,g=a.stickySidebar.outerHeight()+p+b<i(window).height();c=g?h+a.stickySidebar.outerHeight():i(window).height()-a.marginBottom-a.paddingBottom-t.additionalMarginBottom;var u=l-r+a.paddingTop,S=f-r-a.paddingBottom-a.marginBottom,y=a.stickySidebar.offset().top-r,m=a.previousScrollTop-r;"fixed"==a.stickySidebar.css("position")&&"modern"==a.options.sidebarBehavior&&(y+=m),"stick-to-top"==a.options.sidebarBehavior&&(y=t.additionalMarginTop),"stick-to-bottom"==a.options.sidebarBehavior&&(y=c-a.stickySidebar.outerHeight()),y=m>0?Math.min(y,h):Math.max(y,c-a.stickySidebar.outerHeight()),y=Math.max(y,u),y=Math.min(y,S-a.stickySidebar.outerHeight());var k=a.container.height()==a.stickySidebar.outerHeight();d=(k||y!=h)&&(k||y!=c-a.stickySidebar.outerHeight())?r+y-a.sidebar.offset().top-a.paddingTop<=t.additionalMarginTop?"static":"absolute":"fixed"}if("fixed"==d){var v=i(document).scrollLeft();a.stickySidebar.css({position:"fixed",width:n(a.stickySidebar)+"px",transform:"translateY("+y+"px)",left:a.sidebar.offset().left+parseInt(a.sidebar.css("padding-left"))-v+"px",top:"0px"})}else if("absolute"==d){var x={};"absolute"!=a.stickySidebar.css("position")&&(x.position="absolute",x.transform="translateY("+(r+y-a.sidebar.offset().top-a.stickySidebarPaddingTop-a.stickySidebarPaddingBottom)+"px)",x.top="0px"),x.width=n(a.stickySidebar)+"px",x.left="",a.stickySidebar.css(x)}else"static"==d&&e();"static"!=d&&1==a.options.updateSidebarHeight&&a.sidebar.css({"min-height":a.stickySidebar.outerHeight()+a.stickySidebar.offset().top-a.sidebar.offset().top+a.paddingBottom}),a.previousScrollTop=r}},a.onScroll(a),i(document).on("scroll."+a.options.namespace,function(i){return function(){i.onScroll(i)}}(a)),i(window).on("resize."+a.options.namespace,function(i){return function(){i.stickySidebar.css({position:"static"}),i.onScroll(i)}}(a)),"undefined"!=typeof ResizeSensor&&new ResizeSensor(a.stickySidebar[0],function(i){return function(){i.onScroll(i)}}(a))})}function n(i){var t;try{t=i[0].getBoundingClientRect().width}catch(i){}return"undefined"==typeof t&&(t=i.width()),t}var sLine truncated
|
||||
/*
|
||||
* Project: Bootstrap Notify = v3.1.5
|
||||
* Description: Turns standard Bootstrap alerts into "Growl-like" notifications.
|
||||
* Author: Mouse0270 aka Robert McIntosh
|
||||
* License: MIT License
|
||||
* Website: https://github.com/mouse0270/bootstrap-growl
|
||||
*/
|
||||
!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof exports?require("jquery"):jQuery)}(function(t){function s(s){var i=!1;return t('[data-notify="container"]').each(function(e,n){var a=t(n),o=a.find('[data-notify="title"]').html().trim(),r=a.find('[data-notify="message"]').html().trim(),l=o===t("<div>"+s.settings.content.title+"</div>").html().trim(),d=r===t("<div>"+s.settings.content.message+"</div>").html().trim(),c=a.hasClass("alert-"+s.settings.type);return l&&d&&c&&(i=!0),!i}),i}function i(i,n,a){var o={content:{message:"object"==typeof n?n.message:n,title:n.title?n.title:"",icon:n.icon?n.icon:"",url:n.url?n.url:"#",target:n.target?n.target:"-"}};a=t.extend(!0,{},o,a),this.settings=t.extend(!0,{},e,a),this._defaults=e,"-"===this.settings.content.target&&(this.settings.content.target=this.settings.url_target),this.animations={start:"webkitAnimationStart oanimationstart MSAnimationStart animationstart",end:"webkitAnimationEnd oanimationend MSAnimationEnd animationend"},"number"==typeof this.settings.offset&&(this.settings.offset={x:this.settings.offset,y:this.settings.offset}),(this.settings.allow_duplicates||!this.settings.allow_duplicates&&!s(this))&&this.init()}var e={element:"body",position:null,type:"info",allow_dismiss:!0,allow_duplicates:!0,newest_on_top:!1,showProgressbar:!1,placement:{from:"top",align:"right"},offset:20,spacing:10,z_index:1031,delay:5e3,timer:1e3,url_target:"_blank",mouse_over:null,animate:{enter:"animated fadeInDown",exit:"animated fadeOutUp"},onShow:null,onShown:null,onClose:null,onClosed:null,onClick:null,icon_type:"class",template:'<div data-notify="container" class="col-11 col-md-4 alert alert-{0}" role="alert"><button type="button" aria-hidden="true" class="close" data-notify="dismiss">×</button><span data-notify="icon"></span> <span data-notify="title">{1}</span> <span data-notify="message">{2}</span><div class="progress" data-notify="progressbar"><div class="p-progress-bar progress-bar-{0}" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div></div><a href="{3}" target="{4}" data-notify="url"></a></div>'};String.format=function(){var t=arguments,s=arguments[0];return s.replace(/(\{\{\d\}\}|\{\d\})/g,function(s){if("{{"===s.substring(0,2))return s;var i=parseInt(s.match(/\d/)[0]);return t[i+1]})},t.extend(i.prototype,{init:function(){var t=this;this.buildNotify(),this.settings.content.icon&&this.setIcon(),"#"!=this.settings.content.url&&this.styleURL(),this.styleDismiss(),this.placement(),this.bind(),this.notify={$ele:this.$ele,update:function(s,i){var e={};"string"==typeof s?e[s]=i:e=s;for(var n in e)switch(n){case"type":this.$ele.removeClass("alert-"+t.settings.type),this.$ele.find('[data-notify="progressbar"] > .progress-bar').removeClass("p-progress-bar-"+t.settings.type),t.settings.type=e[n],this.$ele.addClass("alert-"+e[n]).find('[data-notify="progressbar"] > .progress-bar').addClass("p-progress-bar-"+e[n]);break;case"icon":var a=this.$ele.find('[data-notify="icon"]');"class"===t.settings.icon_type.toLowerCase()?a.removeClass(t.settings.content.icon).addClass(e[n]):(a.is("img")||a.find("img"),a.attr("src",e[n])),t.settings.content.icon=e[s];break;case"progress":var o=t.settings.delay-t.settings.delay*(e[n]/100);this.$ele.data("notify-delay",o),this.$ele.find('[data-notify="progressbar"] > div').attr("aria-valuenow",e[n]).css("width",e[n]+"%");break;case"url":this.$ele.find('[data-notify="url"]').attr("href",e[n]);break;case"target":this.$ele.find('[data-notify="url"]').attr("target",e[n]);break;default:this.$ele.find('[data-notify="'+n+'"]').html(e[n])}var r=this.$ele.outerHeight()+parseInt(t.settings.spacing)+parseInt(t.settings.offset.y);t.reposition(r)},close:function(){t.close()}}},buildNotify:function(){var s=this.settings.content;this.$ele=t(String.format(this.settings.template,this.settings.type,s.title,s.message,s.url,s.target)),this.$ele.attr("data-notify-position",this.settings.placement.from+"-"+this.settings.placement.align),this.settings.allow_dismiss||this.$ele.find('[data-notify="dismiss"]').css("display","none"),(this.settings.delay<=0&&!this.settings.showProgressbar||!this.settings.showProgressbar)&&this.$ele.find('[data-notify="progressbar"]').remove()},setIcon:function(){"class"===this.settings.icon_type.toLowerCase()?this.$ele.find('[data-notify="icon"]').addClass(this.settings.content.icon):this.$ele.find('[data-notify="icon"]').is("img")?this.$ele.find('[data-notify="icon"]').attr("src",this.settings.content.icon):this.$ele.find('[data-notify="icon"]').append('<img src="'+this.settings.content.icon+'" alt="Notify Icon" />')},styleDismiss:function(){this.$ele.find('[data-notify="dismiss"]').css({position:"absolute",right:"10px",top:"5px",zIndex:this.settings.z_index+2})},styleURL:function(){this.$ele.find('[data-notify="url"]').css({backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)",height:"100%",left:0,Line truncated
|
||||
|
||||
|
||||
/*! lazyload https://github.com/verlok/lazyload */
|
||||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t=t||self).LazyLoad=n()}(this,(function(){"use strict";function t(){return(t=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])}return t}).apply(this,arguments)}var n="undefined"!=typeof window,e=n&&!("onscroll"in window)||"undefined"!=typeof navigator&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),a=n&&"IntersectionObserver"in window,o=n&&"classList"in document.createElement("p"),i=n&&window.devicePixelRatio>1,r={elements_selector:"img",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",load_delay:0,auto_unobserve:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,use_native:!1},l=function(n){return t({},r,n)},c=function(t,n){var e,a=new t(n);try{e=new CustomEvent("LazyLoad::Initialized",{detail:{instance:a}})}catch(t){(e=document.createEvent("CustomEvent")).initCustomEvent("LazyLoad::Initialized",!1,!1,{instance:a})}window.dispatchEvent(e)},s=function(t,n){return t.getAttribute("data-"+n)},u=function(t,n,e){var a="data-"+n;null!==e?t.setAttribute(a,e):t.removeAttribute(a)},d=function(t,n){return u(t,"ll-status",n)},f=function(t,n){return u(t,"ll-timeout",n)},_=function(t){return s(t,"ll-timeout")},g=function(t,n,e,a){t&&(void 0===a?void 0===e?t(n):t(n,e):t(n,e,a))},v=function(t,n){o?t.classList.add(n):t.className+=(t.className?" ":"")+n},p=function(t,n){o?t.classList.remove(n):t.className=t.className.replace(new RegExp("(^|\\s+)"+n+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},b=function(t){return t.llTempImage},h=function(t){t&&(t.loadingCount+=1)},m=function(t){for(var n,e=[],a=0;n=t.children[a];a+=1)"SOURCE"===n.tagName&&e.push(n);return e},y=function(t,n,e){e&&t.setAttribute(n,e)},E=function(t,n){y(t,"sizes",s(t,n.data_sizes)),y(t,"srcset",s(t,n.data_srcset)),y(t,"src",s(t,n.data_src))},w={IMG:function(t,n){var e=t.parentNode;e&&"PICTURE"===e.tagName&&m(e).forEach((function(t){E(t,n)}));E(t,n)},IFRAME:function(t,n){y(t,"src",s(t,n.data_src))},VIDEO:function(t,n){m(t).forEach((function(t){y(t,"src",s(t,n.data_src))})),y(t,"poster",s(t,n.data_poster)),y(t,"src",s(t,n.data_src)),t.load()}},I=function(t,n,e){var a=w[t.tagName];a&&(a(t,n),h(e),v(t,n.class_loading),d(t,"loading"),g(n.callback_loading,t,e),g(n.callback_reveal,t,e))},k=["IMG","IFRAME","VIDEO"],L=function(t,n){!n||n.toLoadCount||n.loadingCount||g(t.callback_finish,n)},C=function(t,n,e){t.addEventListener(n,e)},A=function(t,n,e){t.removeEventListener(n,e)},z=function(t,n,e){A(t,"load",n),A(t,"loadeddata",n),A(t,"error",e)},O=function(t,n,e){!function(t){delete t.llTempImage}(t),function(t,n){n&&(n.loadingCount-=1)}(0,e),p(t,n.class_loading)},N=function(t,n,e){var a=b(t)||t,o=function o(r){!function(t,n,e,a){O(n,e,a),v(n,e.class_loaded),d(n,"loaded"),g(e.callback_loaded,n,a),L(e,a)}(0,t,n,e),z(a,o,i)},i=function i(r){!function(t,n,e,a){O(n,e,a),v(n,e.class_error),d(n,"error"),g(e.callback_error,n,a),L(e,a)}(0,t,n,e),z(a,o,i)};!function(t,n,e){C(t,"load",n),C(t,"loadeddata",n),C(t,"error",e)}(a,o,i)},x=function(t,n){n&&(n.toLoadCount-=1)},M=function(t,n,e){!function(t){t.llTempImage=document.createElement("img")}(t),N(t,n,e),function(t,n,e){var a=s(t,n.data_bg),o=s(t,n.data_bg_hidpi),r=i&&o?o:a;r&&(t.style.backgroundImage='url("'.concat(r,'")'),b(t).setAttribute("src",r),h(e),v(t,n.class_loading),d(t,"loading"),g(n.callback_loading,t,e),g(n.callback_reveal,t,e))}(t,n,e),function(t,n,e){var a=s(t,n.data_bg_multi),o=s(t,n.data_bg_multi_hidpi),r=i&&o?o:a;r&&(t.style.backgroundImage=r,v(t,n.class_applied),d(t,"applied"),g(n.callback_applied,t,e))}(t,n,e)},R=function(t,n,e){!function(t){return k.indexOf(t.tagName)>-1}(t)?M(t,n,e):function(t,n,e){N(t,n,e),I(t,n,e)}(t,n,e),x(0,e),function(t,n){if(n){var e=n._observer;e&&n._settings.auto_unobserve&&e.unobserve(t)}}(t,e),L(n,e)},T=function(t){var n=_(t);n&&(clearTimeout(n),f(t,null))},j=function(t,n,e){var a=e._settings;g(a.callback_enter,t,n,e),a.load_delay?function(t,n,e){var a=n.load_delay,o=_(t);o||(o=setTimeout((function(){R(t,n,e),T(t)}),a),f(t,o))}(t,a,e):R(t,a,e)},F=["IMG","IFRAME"],G=function(t){return t.use_native&&"loading"in HTMLImageElement.prototype},P=function(t,n,e){t.forEach((function(t){-1!==F.indexOf(t.tagName)&&(t.setAttribute("loading","lazy"),function(t,n,e){N(t,n,e),I(t,n,e),x(0,e),d(t,"native"),L(n,e)}(t,n,e))})),e.toLoadCount=0},D=function(t,n){!function(t){t.disconnect()}(t),function(t,n){n.forEach((function(n){t.observe(n),d(n,"observed")}))}(t,n)},S=function(Line truncated
|
||||
/*!
|
||||
Waypoints - 4.0.1
|
||||
Copyright © 2011-2016 Caleb Troughton
|
||||
Licensed under the MIT license.
|
||||
https://github.com/imakewebthings/waypoints/blob/master/licenses.txt
|
||||
*/
|
||||
!function(){"use strict";function t(o){if(!o)throw new Error("No options passed to Waypoint constructor");if(!o.element)throw new Error("No element option passed to Waypoint constructor");if(!o.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+e,this.options=t.Adapter.extend({},t.defaults,o),this.element=this.options.element,this.adapter=new t.Adapter(this.element),this.callback=o.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=t.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=t.Context.findOrCreateByElement(this.options.context),t.offsetAliases[this.options.offset]&&(this.options.offset=t.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),i[this.key]=this,e+=1}var e=0,i={};t.prototype.queueTrigger=function(t){this.group.queueTrigger(this,t)},t.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},t.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete i[this.key]},t.prototype.disable=function(){return this.enabled=!1,this},t.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},t.prototype.next=function(){return this.group.next(this)},t.prototype.previous=function(){return this.group.previous(this)},t.invokeAll=function(t){var e=[];for(var o in i)e.push(i[o]);for(var n=0,r=e.length;r>n;n++)e[n][t]()},t.destroyAll=function(){t.invokeAll("destroy")},t.disableAll=function(){t.invokeAll("disable")},t.enableAll=function(){t.Context.refreshAll();for(var e in i)i[e].enabled=!0;return this},t.refreshAll=function(){t.Context.refreshAll()},t.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},t.viewportWidth=function(){return document.documentElement.clientWidth},t.adapters=[],t.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},t.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=t}(),function(){"use strict";function t(t){window.setTimeout(t,1e3/60)}function e(t){this.element=t,this.Adapter=n.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+i,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,o[t.waypointContextKey]=this,i+=1,n.windowContext||(n.windowContext=!0,n.windowContext=new e(window)),this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}var i=0,o={},n=window.Waypoint,r=window.onload;e.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},e.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical),i=this.element==this.element.window;t&&e&&!i&&(this.adapter.off(".waypoints"),delete o[this.key])},e.prototype.createThrottledResizeHandler=function(){function t(){e.handleResize(),e.didResize=!1}var e=this;this.adapter.on("resize.waypoints",function(){e.didResize||(e.didResize=!0,n.requestAnimationFrame(t))})},e.prototype.createThrottledScrollHandler=function(){function t(){e.handleScroll(),e.didScroll=!1}var e=this;this.adapter.on("scroll.waypoints",function(){(!e.didScroll||n.isTouch)&&(e.didScroll=!0,n.requestAnimationFrame(t))})},e.prototype.handleResize=function(){n.Context.refreshAll()},e.prototype.handleScroll=function(){var t={},e={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var i in e){var o=e[i],n=o.newScroll>o.oldScroll,r=n?o.forward:o.backward;for(var s in this.waypoints[i]){var a=this.waypoints[i][s];if(null!==a.triggerPoint){var l=o.oldScroll<a.triggerPoint,h=o.newScroll>=a.triggerPoint,p=l&&h,u=!l&&!h;(p||u)&&(a.queueTrigger(r),t[a.group.id]=a.group)}}}for(var c in t)t[c].flushTriggers();this.oldScroll={x:e.horizontal.newScroll,y:e.vertical.newScroll}},e.prototype.innerHeight=function(){return this.element==this.element.window?n.viewportHeight():this.adapter.innerHeight()},e.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkEmpty()},e.prototype.innerWidth=function(){return this.element==this.element.window?n.viewportWidth():this.adapter.innerWidth()},e.prototype.destroy=function(){var t=[];for(var e in this.waypoints)for(var i in this.waypoints[e])t.push(this.waypoints[e][i]);for(var o=0,n=t.length;n>o;o++)t[o].destroy()},e.prototype.refresh=function(){var t,e=this.element==this.element.window,i=e?void 0:this.adapter.offset(),o={};this.handleScroll(),t={horizontal:{contextOffset:eLine truncated
|
||||
@@ -1,20 +0,0 @@
|
||||
/*!
|
||||
* html2canvas 1.0.0-rc.7 <https://html2canvas.hertzen.com>
|
||||
* Copyright (c) 2020 Niklas von Hertzen <https://hertzen.com>
|
||||
* Released under MIT License
|
||||
*/
|
||||
!function(A,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(A=A||self).html2canvas=e()}(this,function(){"use strict";
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||||
this file except in compliance with the License. You may obtain a copy of the
|
||||
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
||||
|
||||
See the Apache Version 2.0 License for specific language governing permissions
|
||||
and limitations under the License.
|
||||
***************************************************************************** */var r=function(A,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,e){A.__proto__=e}||function(A,e){for(var t in e)e.hasOwnProperty(t)&&(A[t]=e[t])})(A,e)};function A(A,e){function t(){this.constructor=A}r(A,e),A.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}var K=function(){return(K=Object.assign||function(A){for(var e,t=1,r=arguments.length;t<r;t++)for(var n in e=arguments[t])Object.prototype.hasOwnProperty.call(e,n)&&(A[n]=e[n]);return A}).apply(this,arguments)};function a(B,s,o,i){return new(o||(o=Promise))(function(A,e){function t(A){try{n(i.next(A))}catch(A){e(A)}}function r(A){try{n(i.throw(A))}catch(A){e(A)}}function n(e){e.done?A(e.value):new o(function(A){A(e.value)}).then(t,r)}n((i=i.apply(B,s||[])).next())})}function S(t,r){var n,B,s,A,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return A={next:e(0),throw:e(1),return:e(2)},"function"==typeof Symbol&&(A[Symbol.iterator]=function(){return this}),A;function e(e){return function(A){return function(e){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,B&&(s=2&e[0]?B.return:e[0]?B.throw||((s=B.return)&&s.call(B),0):B.next)&&!(s=s.call(B,e[1])).done)return s;switch(B=0,s&&(e=[2&e[0],s.value]),e[0]){case 0:case 1:s=e;break;case 4:return o.label++,{value:e[1],done:!1};case 5:o.label++,B=e[1],e=[0];continue;case 7:e=o.ops.pop(),o.trys.pop();continue;default:if(!(s=0<(s=o.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){o=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){o.label=e[1];break}if(6===e[0]&&o.label<s[1]){o.label=s[1],s=e;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(e);break}s[2]&&o.ops.pop(),o.trys.pop();continue}e=r.call(t,o)}catch(A){e=[6,A],B=0}finally{n=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,A])}}}var I=(n.prototype.add=function(A,e,t,r){return new n(this.left+A,this.top+e,this.width+t,this.height+r)},n.fromClientRect=function(A){return new n(A.left,A.top,A.width,A.height)},n);function n(A,e,t,r){this.left=A,this.top=e,this.width=t,this.height=r}for(var T=function(A){return I.fromClientRect(A.getBoundingClientRect())},c=function(A){for(var e=[],t=0,r=A.length;t<r;){var n=A.charCodeAt(t++);if(55296<=n&&n<=56319&&t<r){var B=A.charCodeAt(t++);56320==(64512&B)?e.push(((1023&n)<<10)+(1023&B)+65536):(e.push(n),t--)}else e.push(n)}return e},l=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];if(String.fromCodePoint)return String.fromCodePoint.apply(String,A);var t=A.length;if(!t)return"";for(var r=[],n=-1,B="";++n<t;){var s=A[n];s<=65535?r.push(s):(s-=65536,r.push(55296+(s>>10),s%1024+56320)),(n+1===t||16384<r.length)&&(B+=String.fromCharCode.apply(String,r),r.length=0)}return B},e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Q="undefined"==typeof Uint8Array?[]:new Uint8Array(256),t=0;t<e.length;t++)Q[e.charCodeAt(t)]=t;function B(A,e,t){return A.slice?A.slice(e,t):new Uint16Array(Array.prototype.slice.call(A,e,t))}var s=(o.prototype.get=function(A){var e;if(0<=A){if(A<55296||56319<A&&A<=65535)return e=((e=this.index[A>>5])<<2)+(31&A),this.data[e];if(A<=65535)return e=((e=this.index[2048+(A-55296>>5)])<<2)+(31&A),this.data[e];if(A<this.highStart)return e=2080+(A>>11),e=this.index[e],e+=A>>5&63,e=((e=this.index[e])<<2)+(31&A),this.data[e];if(A<=1114111)return this.data[this.highValueIndex]}return this.errorValue},o);function o(A,e,t,r,n,B){this.initialValue=A,this.errorValue=e,this.highStart=t,this.highValueIndex=r,this.index=n,this.data=B}function C(A,e,t,r){var n=r[t];if(Array.isArray(A)?-1!==A.indexOf(n):A===n)for(var B=t;B<=r.length;){if((i=r[++B])===e)return!0;if(i!==H)break}if(n===H)for(B=t;0<B;){var s=r[--B];if(Array.isArray(A)?-1!==A.indexOf(s):A===s)for(var o=t;o<=r.length;){var i;if((i=r[++o])===e)return!0;if(i!==H)break}if(s!==H)break}return!1}function g(A,e){for(var t=A;0<=t;){var r=e[t];if(r!==H)return r;t--}return 0}function w(A,e,t,r,n){if(0===t[r])return Y;var B=r-1;if(Array.isArray(n)&&!0===n[B])return Y;var s=B-1,o=1+B,i=e[B],a=0<=s?e[s]:0,c=e[o];if(2===i&&3===c)return Y;if(-1!==j.indexOf(i))return"!";if(-1!==j.indexOf(c))return Y;if(-1!==$.indexOf(c))return Y;if(8===g(B,e))return"÷";if(11===q.get(A[B])&&(c===X||c===P||c===x))return Y;if(7===i||7===c)return Y;if(9===i)return Y;if(-1===[H,d,f].indexOf(i)&&9===c)return Y;if(-1!==[p,N,m,O,y].indexOf(c))return Y;if(g(B,e)===v)return Y;if(C(23,v,B,e))return Y;if(C([p,N],L,B,e))return Y;if(C(12,12,B,e))return Y;if(i===H)return"÷";if(23===i||23===c)return Y;if(16===c||16===i)return"÷";if(-1!==[d,f,L].indexOf(c)||14===i)return Y;if(36===a&&-1!==rA.indexOf(i))return Y;if(i===y&&36===c)return Y;if(c===R&&-1!==Z.concat(R,m,D,X,P,x).indexOf(i))return Y;if(-1!==Z.indexOf(c)&&i===D||-1!==Z.indexOf(i)&&c===D)return Y;if(i===M&&-1!==[X,P,x].indexOf(c)||-1!==[X,P,x].indexOf(i)&&c===b)return Y;if(-1!==Z.indexOf(i)&&-1!==AA.inLine truncated
|
||||
@@ -1,6 +0,0 @@
|
||||
// ProgressBar.js 1.0.1
|
||||
// https://kimmobrunfeldt.github.io/progressbar.js
|
||||
// License: MIT
|
||||
|
||||
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.ProgressBar=a()}}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return e(c?c:b)},k,k.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(b,c,d){(function(){var b=this||Function("return this")(),e=function(){"use strict";function e(){}function f(a,b){var c;for(c in a)Object.hasOwnProperty.call(a,c)&&b(c)}function g(a,b){return f(b,function(c){a[c]=b[c]}),a}function h(a,b){f(b,function(c){"undefined"==typeof a[c]&&(a[c]=b[c])})}function i(a,b,c,d,e,f,g){var h,i,k,l=f>a?0:(a-f)/e;for(h in b)b.hasOwnProperty(h)&&(i=g[h],k="function"==typeof i?i:o[i],b[h]=j(c[h],d[h],k,l));return b}function j(a,b,c,d){return a+(b-a)*c(d)}function k(a,b){var c=n.prototype.filter,d=a._filterArgs;f(c,function(e){"undefined"!=typeof c[e][b]&&c[e][b].apply(a,d)})}function l(a,b,c,d,e,f,g,h,j,l,m){v=b+c+d,w=Math.min(m||u(),v),x=w>=v,y=d-(v-w),a.isPlaying()&&(x?(j(g,a._attachment,y),a.stop(!0)):(a._scheduleId=l(a._timeoutHandler,s),k(a,"beforeTween"),b+c>w?i(1,e,f,g,1,1,h):i(w,e,f,g,d,b+c,h),k(a,"afterTween"),j(e,a._attachment,y)))}function m(a,b){var c={},d=typeof b;return"string"===d||"function"===d?f(a,function(a){c[a]=b}):f(a,function(a){c[a]||(c[a]=b[a]||q)}),c}function n(a,b){this._currentState=a||{},this._configured=!1,this._scheduleFunction=p,"undefined"!=typeof b&&this.setConfig(b)}var o,p,q="linear",r=500,s=1e3/60,t=Date.now?Date.now:function(){return+new Date},u="undefined"!=typeof SHIFTY_DEBUG_NOW?SHIFTY_DEBUG_NOW:t;p="undefined"!=typeof window?window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||window.mozCancelRequestAnimationFrame&&window.mozRequestAnimationFrame||setTimeout:setTimeout;var v,w,x,y;return n.prototype.tween=function(a){return this._isTweening?this:(void 0===a&&this._configured||this.setConfig(a),this._timestamp=u(),this._start(this.get(),this._attachment),this.resume())},n.prototype.setConfig=function(a){a=a||{},this._configured=!0,this._attachment=a.attachment,this._pausedAtTime=null,this._scheduleId=null,this._delay=a.delay||0,this._start=a.start||e,this._step=a.step||e,this._finish=a.finish||e,this._duration=a.duration||r,this._currentState=g({},a.from)||this.get(),this._originalState=this.get(),this._targetState=g({},a.to)||this.get();var b=this;this._timeoutHandler=function(){l(b,b._timestamp,b._delay,b._duration,b._currentState,b._originalState,b._targetState,b._easing,b._step,b._scheduleFunction)};var c=this._currentState,d=this._targetState;return h(d,c),this._easing=m(c,a.easing||q),this._filterArgs=[c,this._originalState,d,this._easing],k(this,"tweenCreated"),this},n.prototype.get=function(){return g({},this._currentState)},n.prototype.set=function(a){this._currentState=a},n.prototype.pause=function(){return this._pausedAtTime=u(),this._isPaused=!0,this},n.prototype.resume=function(){return this._isPaused&&(this._timestamp+=u()-this._pausedAtTime),this._isPaused=!1,this._isTweening=!0,this._timeoutHandler(),this},n.prototype.seek=function(a){a=Math.max(a,0);var b=u();return this._timestamp+a===0?this:(this._timestamp=b-a,this.isPlaying()||(this._isTweening=!0,this._isPaused=!1,l(this,this._timestamp,this._delay,this._duration,this._currentState,this._originalState,this._targetState,this._easing,this._step,this._scheduleFunction,b),this.pause()),this)},n.prototype.stop=function(a){return this._isTweening=!1,this._isPaused=!1,this._timeoutHandler=e,(b.cancelAnimationFrame||b.webkitCancelAnimationFrame||b.oCancelAnimationFrame||b.msCancelAnimationFrame||b.mozCancelRequestAnimationFrame||b.clearTimeout)(this._scheduleId),a&&(k(this,"beforeTween"),i(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),k(this,"afterTween"),k(this,"afterTweenEnd"),this._finish.call(this,this._currentState,this._attachment)),this},n.prototype.isPlaying=function(){return this._isTweening&&!this._isPaused},n.prototype.setScheduleFunction=function(a){this._scheduleFunction=a},n.prototype.dispose=function(){var a;for(a in this)this.hasOwnProperty(a)&&delete this[a]},n.prototype.filter={},n.prototype.formula={linear:function(a){return a}},o=n.prototype.formula,g(n,{now:u,each:f,tweenProps:i,tweenProp:j,applyFilter:k,shallowCopy:g,defaults:h,composeEasingObject:m}),"function"==typeof SHIFTY_DEBUG_NOW&&(b.timeoutHandler=l),"object"==typeof d?c.exports=n:"function"==typeof a&&a.amd?a(function(){return n}):"undefined"==typLine truncated
|
||||
//# sourceMappingURL=progressbar.min.js.map
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"presets": [
|
||||
[
|
||||
"@babel/env",
|
||||
{
|
||||
"modules": false,
|
||||
"loose": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"env": {
|
||||
"test": {
|
||||
"presets": [
|
||||
[
|
||||
"@babel/env"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = tab
|
||||
indent_size = 2
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
@@ -1,27 +0,0 @@
|
||||
{
|
||||
"extends": "eslint:recommended",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2018,
|
||||
"sourceType": "module"
|
||||
},
|
||||
"env": {
|
||||
"browser": true,
|
||||
"jest": true,
|
||||
"node": true
|
||||
},
|
||||
"rules": {
|
||||
"array-bracket-spacing": [ "error", "always" ],
|
||||
"camelcase": "error",
|
||||
"comma-dangle": [ "error", {
|
||||
"arrays": "always-multiline",
|
||||
"objects": "always-multiline",
|
||||
"imports": "always-multiline",
|
||||
"exports": "always-multiline",
|
||||
"functions": "never"
|
||||
} ],
|
||||
"comma-spacing": [ "error", { "before": false, "after": true } ],
|
||||
"eqeqeq": "error",
|
||||
"indent": [ "error", "tab", { "SwitchCase": 1 } ],
|
||||
"no-console": [ "error", { "allow": [ "warn", "error" ] } ]
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
node_modules/
|
||||
@@ -1,7 +0,0 @@
|
||||
node_modules/
|
||||
images/
|
||||
|
||||
.editorconfig
|
||||
|
||||
tests/
|
||||
jest.config.js
|
||||
@@ -1,20 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2020 Naotoshi Fujita
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -1,180 +0,0 @@
|
||||
# Splide
|
||||
<p align="center">
|
||||
<a href="https://splidejs.com/" target="_blank">
|
||||
<img src="images/hero.png">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
**[Splide](https://splidejs.com/) is a lightweight, powerful and flexible slider and carousel, written in pure JavaScript without any dependencies.**
|
||||
|
||||
* [Demo](https://splidejs.com/)
|
||||
* [Documents](https://splidejs.com/category/users-guide/)
|
||||
|
||||
## News
|
||||
* Transform Splidejs to the organization.
|
||||
* Add `slideFocus` and `waitForTransition` options.
|
||||
* Add [type definitions](https://github.com/Splidejs/splide/blob/master/src/js/splide.d.ts) for typescript.
|
||||
* [React Splide](https://splidejs.com/integration-react-splide/) is released.
|
||||
* [Vue Splide](https://splidejs.com/integration-vue-splide/) is released.
|
||||
* Add `resetProgress` and `throttle` options.
|
||||
* Breakpoints accept `drag` and `pagination`.
|
||||
* Add some [themes](https://splidejs.com/themes/).
|
||||
* [Grid](https://splidejs.com/extension-grid/) extension is released.
|
||||
* [Auto Width](https://splidejs.com/auto-width/) is implemented. Each slide can have its own width.
|
||||
* [Breakpoints](https://splidejs.com/options/#breakpoints) accept 'destroy' option.
|
||||
* Merge Slides component to Elements.
|
||||
* Splide can be destroyed.
|
||||
* Add or remove slides dynamically.
|
||||
* [Video](https://splidejs.com/extension-video/) extension is released.
|
||||
* [URL Hash Navigation](https://splidejs.com/extension-url-hash-navigation/) extension is released.
|
||||
|
||||
## Features
|
||||
* Pure JavaScript without any dependencies
|
||||
* Small size, less than 29kB(11kB gzipped)
|
||||
* Flexible and extensible
|
||||
* Multiple slides
|
||||
* Slide or fade transition by CSS
|
||||
* Responsive, supporting breakpoints
|
||||
* Accepting CSS relative units, such as vw, %, rem, etc
|
||||
* No need to crop images
|
||||
* Autoplay with progress bar and play/pause buttons
|
||||
* "Right to left" and vertical direction
|
||||
* Mouse drag and touch swipe
|
||||
* Nested slider
|
||||
* Lazy loading
|
||||
* Thumbnail slider
|
||||
* Accessibility friendly, supporting keyboard control and ARIA attributes
|
||||
* Dynamically adding/removing slides
|
||||
* Internet Explorer 10
|
||||
|
||||
## Installation
|
||||
There are 3 ways to install the Splide on your site.
|
||||
* NPM
|
||||
* Download
|
||||
* CDN
|
||||
|
||||
Only the NPM way is explained in the following steps. Visit [this page](https://splidejs.com/getting-started/) for other methods.
|
||||
|
||||
1. Get the latest version by NPM:
|
||||
```bash
|
||||
$ npm install @splidejs/splide
|
||||
```
|
||||
1. Link to the stylesheet:
|
||||
```html
|
||||
<link rel="stylesheet" href="node_modules/@splidejs/splide/dist/css/splide.min.css">
|
||||
```
|
||||
1. Write HTML for building a slider:
|
||||
```html
|
||||
<div id="splide" class="splide">
|
||||
<div class="splide__track">
|
||||
<ul class="splide__list">
|
||||
<li class="splide__slide">Slide 01</li>
|
||||
<li class="splide__slide">Slide 02</li>
|
||||
<li class="splide__slide">Slide 03</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
1. Initialize Splide. The selector accepts an ID, a class name or an Element itself:
|
||||
```javascript
|
||||
import Splide from '@splidejs/splide';
|
||||
new Splide( '#splide' ).mount();
|
||||
```
|
||||
Note that only the first element will be initialized even if using a class name.
|
||||
|
||||
See the [Integration](#integration) section for your Vue or React project.
|
||||
|
||||
## Options
|
||||
### Changing Options
|
||||
Pass an object to the second argument of the `Splide` constructor:
|
||||
```javascript
|
||||
new Splide( '#splide', {
|
||||
type : 'loop',
|
||||
perPage: 3,
|
||||
} );
|
||||
```
|
||||
Or set a `data-splide` attribute to a root element in a JSON format:
|
||||
```html
|
||||
<div id="splide" class="splide" data-splide='{"type":"loop","perPage":3}'>
|
||||
</div>
|
||||
```
|
||||
### Available Options
|
||||
Here is a list of options and brief explanations. Visit [this page](https://splidejs.com/options/) for more details.
|
||||
|
||||
* **type**: Determine a slider type.
|
||||
* **rewind**: Whether to rewind a slider before the first slide or after the last one.
|
||||
* **speed**: Transition speed in milliseconds.
|
||||
* **rewindSpeed**: Transition speed on rewind in milliseconds.
|
||||
* **waitForTransition**: Whether to prevent any actions while a slider is transitioning.
|
||||
* **width**: Define slider max width.
|
||||
* **height**: Define slider height.
|
||||
* **fixedWidth**: Fix width of slides.
|
||||
* **fixedHeight**: Fix height of slides.
|
||||
* **heightRatio**: Determine height of slides by ratio to a slider width.
|
||||
* **autoWidth**: If true, slide width will be determined by the element width itself. This is for a horizontal slider.
|
||||
* **autoHeight**: If true, slide height will be determined by the element height itself. This is for a vertical slider.
|
||||
* **perPage**: Determine how many slides should be displayed per page.
|
||||
* **perMove**: Determine how many slides should be moved when a slider goes to next or previous page.
|
||||
* **clones**: Manually determine how many clones should be generated on one side.
|
||||
* **start**: Start index.
|
||||
* **focus**: Determine which slide should be focused.
|
||||
* **gap**: Gap between slides.
|
||||
* **padding**: Set padding-left/right in horizontal mode or padding-top/bottom in vertical one.
|
||||
* **easing**: Animation timing function for CSS transition.
|
||||
* **arrows**: Whether to append arrows.
|
||||
* **arrowPath**: Change the arrow SVG path.
|
||||
* **pagination**: Whether to append pagination(indicator dots).
|
||||
* **autoplay**: Whether to enable autoplay.
|
||||
* **interval**: Autoplay interval in milliseconds.
|
||||
* **pauseOnHover**: Whether to stop autoplay while a slider is hovered.
|
||||
* **pauseOnFocus**: Whether to stop autoplay while a slider elements are focused.
|
||||
* **resetProgress**: Whether to reset progress of the autoplay timer when resumed.
|
||||
* **lazyLoad**: Enable lazy load for images.
|
||||
* **preloadPages**: Determine how many pages around an active slide should be loaded beforehand. This only works the lazyLoad option is “nearby”.
|
||||
* **keyboard**: Whether to control a slider via keyboard.
|
||||
* **drag**: Whether to allow mouse drag and touch swipe.
|
||||
* **dragAngleThreshold**: The angle threshold for drag.
|
||||
* **swipeDistanceThreshold**: Distance threshold for determining if the action is "flick" or "swipe".
|
||||
* **flickVelocityThreshold**: Velocity threshold for determining if the action is "flick" or "swipe".
|
||||
* **flickPower**: Determine power of flick. The larger number this is, the farther a slider runs by flick.
|
||||
* **flickMaxPages**: Limit a number of pages to move by flick.
|
||||
* **direction**: Slider direction.
|
||||
* **cover**: Whether to convert an img src to background-image of its parent element. height, fixedHeight or heightRatio is required.
|
||||
* **accessibility**: Whether to enable accessibility(ARIA attributes) or not.
|
||||
* **slideFocus**: Whether to add tabindex="0" to visible slides or not.
|
||||
* **isNavigation**: Determine if a slider is navigation for another.
|
||||
* **trimSpace**: Whether to trim spaces before the fist slide or after the last one.
|
||||
* **updateOnMove**: If true, "is-active" class added to the slide element before transition.
|
||||
* **throttle**: Throttle duration for the resize event.
|
||||
* **breakpoints**: Breakpoints definitions.
|
||||
* **classes**: Collection of class names.
|
||||
* **i18n**: Collection of texts for i18n.
|
||||
|
||||
## Extensions
|
||||
* [Video](https://splidejs.com/extension-video/): Assign HTML video, YouTube or Vimeo to slides.
|
||||
* [URL Hash Navigation](https://splidejs.com/extension-url-hash-navigation/): Listen to hash change and move a slider to a slide having the hash data attribute.
|
||||
* [Grid](https://splidejs.com/extension-grid/): Create rows and cols in a slider.
|
||||
|
||||
## Integration
|
||||
<p>
|
||||
<a href="https://vuejs.org/" target="_blank">
|
||||
<img width="100px" src="images/vue-logo.png">
|
||||
</a>
|
||||
<a href="https://reactjs.org/" target="_blank">
|
||||
<img width="100px" src="images/react-logo.png">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
Easy to integrate the Splide slider or carousel into your Vue or React project.
|
||||
|
||||
* [Vue Splide](https://splidejs.com/integration-vue-splide/)
|
||||
* [React Splide](https://splidejs.com/integration-react-splide/)
|
||||
|
||||
## API and Extension
|
||||
Splide provides some APIs and the way to customize the behaviour programmatically.
|
||||
* [APIs](https://splidejs.com/apis/)
|
||||
* [Extension](https://splidejs.com/extension/)
|
||||
|
||||
## License
|
||||
Splide is released under the MIT license.
|
||||
© 2020 Naotoshi Fujita
|
||||
@@ -1,8 +0,0 @@
|
||||
const info = require( '../package' );
|
||||
|
||||
module.exports = `/*!
|
||||
* Splide.js
|
||||
* Version : ${ info.version }
|
||||
* License : ${ info.license }
|
||||
* Copyright: 2020 ${ info.author }
|
||||
*/`;
|
||||
@@ -1,22 +0,0 @@
|
||||
/**
|
||||
* Export "Splide" class for frontend with full components.
|
||||
*
|
||||
* @author Naotoshi Fujita
|
||||
* @copyright Naotoshi Fujita. All rights reserved.
|
||||
*/
|
||||
|
||||
import { default as Core } from '../../src/js/splide';
|
||||
import { COMPLETE } from '../../src/js/components';
|
||||
|
||||
|
||||
/**
|
||||
* Export Splide with all components.
|
||||
*/
|
||||
export class Splide extends Core {
|
||||
constructor( root, options ) {
|
||||
super( root, options, COMPLETE );
|
||||
}
|
||||
}
|
||||
|
||||
// Register the class as a global variable for non-ES6 environment.
|
||||
window.Splide = Splide;
|
||||
@@ -1,12 +0,0 @@
|
||||
const uglify = require( 'uglifyjs-webpack-plugin' );
|
||||
const config = require( './config' );
|
||||
|
||||
module.exports = {
|
||||
...config,
|
||||
output: {
|
||||
filename: 'splide.min.js',
|
||||
},
|
||||
optimization: {
|
||||
minimizer: [ new uglify() ],
|
||||
},
|
||||
};
|
||||
@@ -1,27 +0,0 @@
|
||||
const webpack = require( 'webpack' );
|
||||
|
||||
module.exports = {
|
||||
entry: './build/complete/complete.js',
|
||||
output: {
|
||||
filename: 'splide.js',
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test : /.js$/,
|
||||
loader : 'babel-loader',
|
||||
exclude: /node_modules/,
|
||||
},
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
new webpack.BannerPlugin( {
|
||||
banner: require( '../banner' ),
|
||||
raw : true,
|
||||
} ),
|
||||
],
|
||||
optimization: {
|
||||
minimize: false,
|
||||
},
|
||||
mode: 'production',
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
const config = require( '../complete/config' );
|
||||
|
||||
module.exports = {
|
||||
...config,
|
||||
entry: './build/module/module.js',
|
||||
output: {
|
||||
filename : 'splide.esm.js',
|
||||
library : 'Splide',
|
||||
libraryTarget: 'umd',
|
||||
},
|
||||
mode: 'production',
|
||||
};
|
||||
@@ -1,19 +0,0 @@
|
||||
/**
|
||||
* Export Splide class for import.
|
||||
*
|
||||
* @author Naotoshi Fujita
|
||||
* @copyright Naotoshi Fujita. All rights reserved.
|
||||
*/
|
||||
|
||||
import { default as Core } from '../../src/js/splide';
|
||||
import { COMPLETE } from '../../src/js/components';
|
||||
|
||||
|
||||
/**
|
||||
* Export Splide class for import from other projects.
|
||||
*/
|
||||
export default class Splide extends Core {
|
||||
constructor( root, options ) {
|
||||
super( root, options, COMPLETE );
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
@keyframes splide-loading{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.splide__container{position:relative;box-sizing:border-box}.splide__list{margin:0!important;padding:0!important;width:-webkit-max-content;width:max-content;will-change:trasform}.splide.is-active .splide__list{display:flex}.splide__pagination{display:inline-flex;align-items:center;width:95%;flex-wrap:wrap;justify-content:center;margin:0}.splide__pagination li{list-style-type:none;display:inline-block;line-height:1;margin:0}.splide{visibility:hidden}.splide,.splide__slide{position:relative;outline:none}.splide__slide{box-sizing:border-box;list-style-type:none!important;margin:0;flex-shrink:0}.splide__slide img{vertical-align:bottom}.splide__slider{position:relative}.splide__spinner{position:absolute;top:0;left:0;right:0;bottom:0;margin:auto;display:inline-block;width:20px;height:20px;border-radius:50%;border:2px solid #999;border-left-color:transparent;animation:splide-loading 1s linear infinite}.splide__track{position:relative;z-index:0;overflow:hidden}.splide--draggable>.splide__track>.splide__list>.splide__slide{-webkit-user-select:none;user-select:none}.splide--fade>.splide__track>.splide__list{display:block}.splide--fade>.splide__track>.splide__list>.splide__slide{position:absolute;top:0;left:0;z-index:0;opacity:0}.splide--fade>.splide__track>.splide__list>.splide__slide.is-active{position:relative;z-index:1;opacity:1}.splide--rtl{direction:rtl}.splide--ttb>.splide__track>.splide__list{display:block}.splide--ttb>.splide__pagination{width:auto}
|
||||
@@ -1 +0,0 @@
|
||||
@keyframes splide-loading{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.splide__container{position:relative;box-sizing:border-box}.splide__list{margin:0!important;padding:0!important;width:-webkit-max-content;width:max-content;will-change:trasform}.splide.is-active .splide__list{display:flex}.splide__pagination{display:inline-flex;align-items:center;width:95%;flex-wrap:wrap;justify-content:center;margin:0}.splide__pagination li{list-style-type:none;display:inline-block;line-height:1;margin:0}.splide{visibility:hidden}.splide,.splide__slide{position:relative;outline:none}.splide__slide{box-sizing:border-box;list-style-type:none!important;margin:0;flex-shrink:0}.splide__slide img{vertical-align:bottom}.splide__slider{position:relative}.splide__spinner{position:absolute;top:0;left:0;right:0;bottom:0;margin:auto;display:inline-block;width:20px;height:20px;border-radius:50%;border:2px solid #999;border-left-color:transparent;animation:splide-loading 1s linear infinite}.splide__track{position:relative;z-index:0;overflow:hidden}.splide--draggable>.splide__track>.splide__list>.splide__slide{-webkit-user-select:none;user-select:none}.splide--fade>.splide__track>.splide__list{display:block}.splide--fade>.splide__track>.splide__list>.splide__slide{position:absolute;top:0;left:0;z-index:0;opacity:0}.splide--fade>.splide__track>.splide__list>.splide__slide.is-active{position:relative;z-index:1;opacity:1}.splide--rtl{direction:rtl}.splide--ttb>.splide__track>.splide__list{display:block}.splide--ttb>.splide__pagination{width:auto}.splide__arrow{position:absolute;z-index:1;top:50%;transform:translateY(-50%);width:2em;height:2em;border-radius:50%;display:flex;align-items:center;justify-content:center;border:none;padding:0;opacity:.7;background:#ccc}.splide__arrow svg{width:1.2em;height:1.2em}.splide__arrow:hover{cursor:pointer;opacity:.9}.splide__arrow:focus{outline:none}.splide__arrow--prev{left:1em}.splide__arrow--prev svg{transform:scaleX(-1)}.splide__arrow--next{right:1em}.splide__pagination{position:absolute;z-index:1;bottom:.5em;left:50%;transform:translateX(-50%);padding:0}.splide__pagination__page{display:inline-block;width:8px;height:8px;background:#ccc;border-radius:50%;margin:3px;padding:0;transition:transfrom .2s linear;border:none;opacity:.7}.splide__pagination__page.is-active{transform:scale(1.4);background:#fff}.splide__pagination__page:hover{cursor:pointer;opacity:.9}.splide__pagination__page:focus{outline:none}.splide__progress__bar{width:0;height:3px;background:#ccc}.splide--nav>.splide__track>.splide__list>.splide__slide{border:3px solid transparent}.splide--nav>.splide__track>.splide__list>.splide__slide.is-active{border-color:#000}.splide--nav>.splide__track>.splide__list>.splide__slide:focus{outline:none}.splide--rtl>.splide__arrows .splide__arrow--prev,.splide--rtl>.splide__track>.splide__arrows .splide__arrow--prev{right:1em;left:auto}.splide--rtl>.splide__arrows .splide__arrow--prev svg,.splide--rtl>.splide__track>.splide__arrows .splide__arrow--prev svg{transform:scaleX(1)}.splide--rtl>.splide__arrows .splide__arrow--next,.splide--rtl>.splide__track>.splide__arrows .splide__arrow--next{left:1em;right:auto}.splide--rtl>.splide__arrows .splide__arrow--next svg,.splide--rtl>.splide__track>.splide__arrows .splide__arrow--next svg{transform:scaleX(-1)}.splide--ttb>.splide__arrows .splide__arrow,.splide--ttb>.splide__track>.splide__arrows .splide__arrow{left:50%;transform:translate(-50%)}.splide--ttb>.splide__arrows .splide__arrow--prev,.splide--ttb>.splide__track>.splide__arrows .splide__arrow--prev{top:1em}.splide--ttb>.splide__arrows .splide__arrow--prev svg,.splide--ttb>.splide__track>.splide__arrows .splide__arrow--prev svg{transform:rotate(-90deg)}.splide--ttb>.splide__arrows .splide__arrow--next,.splide--ttb>.splide__track>.splide__arrows .splide__arrow--next{top:auto;bottom:1em}.splide--ttb>.splide__arrows .splide__arrow--next svg,.splide--ttb>.splide__track>.splide__arrows .splide__arrow--next svg{transform:rotate(90deg)}.splide--ttb>.splide__pagination{display:flex;flex-direction:column;bottom:50%;left:auto;right:.5em;transform:translateY(50%)}
|
||||
@@ -1 +0,0 @@
|
||||
@keyframes splide-loading{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.splide__container{position:relative;box-sizing:border-box}.splide__list{margin:0!important;padding:0!important;width:-webkit-max-content;width:max-content;will-change:trasform}.splide.is-active .splide__list{display:flex}.splide__pagination{display:inline-flex;align-items:center;width:95%;flex-wrap:wrap;justify-content:center;margin:0}.splide__pagination li{list-style-type:none;display:inline-block;line-height:1;margin:0}.splide{visibility:hidden}.splide,.splide__slide{position:relative;outline:none}.splide__slide{box-sizing:border-box;list-style-type:none!important;margin:0;flex-shrink:0}.splide__slide img{vertical-align:bottom}.splide__slider{position:relative}.splide__spinner{position:absolute;top:0;left:0;right:0;bottom:0;margin:auto;display:inline-block;width:20px;height:20px;border-radius:50%;border:2px solid #999;border-left-color:transparent;animation:splide-loading 1s linear infinite}.splide__track{position:relative;z-index:0;overflow:hidden}.splide--draggable>.splide__track>.splide__list>.splide__slide{-webkit-user-select:none;user-select:none}.splide--fade>.splide__track>.splide__list{display:block}.splide--fade>.splide__track>.splide__list>.splide__slide{position:absolute;top:0;left:0;z-index:0;opacity:0}.splide--fade>.splide__track>.splide__list>.splide__slide.is-active{position:relative;z-index:1;opacity:1}.splide--rtl{direction:rtl}.splide--ttb>.splide__track>.splide__list{display:block}.splide--ttb>.splide__pagination{width:auto}.splide__arrow{position:absolute;z-index:1;top:50%;transform:translateY(-50%);width:2em;height:2em;border-radius:50%;display:flex;align-items:center;justify-content:center;border:none;padding:0;opacity:.7;background:#ccc}.splide__arrow svg{width:1.2em;height:1.2em}.splide__arrow:hover{cursor:pointer;opacity:.9}.splide__arrow:focus{outline:none}.splide__arrow--prev{left:1em}.splide__arrow--prev svg{transform:scaleX(-1)}.splide__arrow--next{right:1em}.splide__pagination{position:absolute;z-index:1;bottom:.5em;left:50%;transform:translateX(-50%);padding:0}.splide__pagination__page{display:inline-block;width:8px;height:8px;background:#ccc;border-radius:50%;margin:3px;padding:0;transition:transfrom .2s linear;border:none;opacity:.7}.splide__pagination__page.is-active{transform:scale(1.4);background:#fff}.splide__pagination__page:hover{cursor:pointer;opacity:.9}.splide__pagination__page:focus{outline:none}.splide__progress__bar{width:0;height:3px;background:#ccc}.splide--nav>.splide__track>.splide__list>.splide__slide{border:3px solid transparent}.splide--nav>.splide__track>.splide__list>.splide__slide.is-active{border-color:#000}.splide--nav>.splide__track>.splide__list>.splide__slide:focus{outline:none}.splide--rtl>.splide__arrows .splide__arrow--prev,.splide--rtl>.splide__track>.splide__arrows .splide__arrow--prev{right:1em;left:auto}.splide--rtl>.splide__arrows .splide__arrow--prev svg,.splide--rtl>.splide__track>.splide__arrows .splide__arrow--prev svg{transform:scaleX(1)}.splide--rtl>.splide__arrows .splide__arrow--next,.splide--rtl>.splide__track>.splide__arrows .splide__arrow--next{left:1em;right:auto}.splide--rtl>.splide__arrows .splide__arrow--next svg,.splide--rtl>.splide__track>.splide__arrows .splide__arrow--next svg{transform:scaleX(-1)}.splide--ttb>.splide__arrows .splide__arrow,.splide--ttb>.splide__track>.splide__arrows .splide__arrow{left:50%;transform:translate(-50%)}.splide--ttb>.splide__arrows .splide__arrow--prev,.splide--ttb>.splide__track>.splide__arrows .splide__arrow--prev{top:1em}.splide--ttb>.splide__arrows .splide__arrow--prev svg,.splide--ttb>.splide__track>.splide__arrows .splide__arrow--prev svg{transform:rotate(-90deg)}.splide--ttb>.splide__arrows .splide__arrow--next,.splide--ttb>.splide__track>.splide__arrows .splide__arrow--next{top:auto;bottom:1em}.splide--ttb>.splide__arrows .splide__arrow--next svg,.splide--ttb>.splide__track>.splide__arrows .splide__arrow--next svg{transform:rotate(90deg)}.splide--ttb>.splide__pagination{display:flex;flex-direction:column;bottom:50%;left:auto;right:.5em;transform:translateY(50%)}
|
||||
@@ -1 +0,0 @@
|
||||
@keyframes splide-loading{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.splide__container{position:relative;box-sizing:border-box}.splide__list{margin:0!important;padding:0!important;width:-webkit-max-content;width:max-content;will-change:trasform}.splide.is-active .splide__list{display:flex}.splide__pagination{display:inline-flex;align-items:center;width:95%;flex-wrap:wrap;justify-content:center;margin:0}.splide__pagination li{list-style-type:none;display:inline-block;line-height:1;margin:0}.splide{visibility:hidden}.splide,.splide__slide{position:relative;outline:none}.splide__slide{box-sizing:border-box;list-style-type:none!important;margin:0;flex-shrink:0}.splide__slide img{vertical-align:bottom}.splide__slider{position:relative}.splide__spinner{position:absolute;top:0;left:0;right:0;bottom:0;margin:auto;display:inline-block;width:20px;height:20px;border-radius:50%;border:2px solid #999;animation:splide-loading 1s linear infinite}.splide__track{position:relative;z-index:0;overflow:hidden}.splide--draggable>.splide__track>.splide__list>.splide__slide{-webkit-user-select:none;user-select:none}.splide--fade>.splide__track>.splide__list{display:block}.splide--fade>.splide__track>.splide__list>.splide__slide{position:absolute;top:0;left:0;z-index:0;opacity:0}.splide--fade>.splide__track>.splide__list>.splide__slide.is-active{position:relative;z-index:1;opacity:1}.splide--rtl{direction:rtl}.splide--ttb>.splide__track>.splide__list{display:block}.splide--ttb>.splide__pagination{width:auto}.splide__arrow{position:absolute;z-index:1;top:50%;transform:translateY(-50%);border:none;padding:0;background:transparent}.splide__arrow svg{width:2.5em;height:2.5em;fill:#20b2aa;transition:fill .2s linear}.splide__arrow:hover{cursor:pointer}.splide__arrow:hover svg{fill:#57e1d9}.splide__arrow:focus{outline:none}.splide__arrow--prev{left:1em}.splide__arrow--prev svg{transform:scaleX(-1)}.splide__arrow--next{right:1em}.splide__slider>.splide__arrows .splide__arrow--prev{left:-2.5em}.splide__slider>.splide__arrows .splide__arrow--next{right:-2.5em}.splide__pagination{position:absolute;z-index:1;bottom:1em;left:50%;transform:translateX(-50%);padding:0}.splide__pagination__page{display:inline-block;width:20px;height:5px;background:#ccc;border-radius:2.5px;margin:3px;padding:0;transition:all .2s linear;border:none}.splide__pagination__page.is-active{background:#20b2aa}.splide__pagination__page:hover{cursor:pointer;background:#57e1d9}.splide__pagination__page:focus{outline:none}.splide__progress__bar{width:0;height:3px;background:#20b2aa}.splide{padding:3em}.splide__slide{border-radius:4px}.splide__spinner{border:2px solid #20b2aa;border-left-color:transparent}.splide--nav>.splide__track>.splide__list>.splide__slide{border:3px solid #fff;cursor:pointer;opacity:.7;border-radius:4px}.splide--nav>.splide__track>.splide__list>.splide__slide.is-active{border-color:#20b2aa;opacity:1}.splide--nav>.splide__track>.splide__list>.splide__slide:focus{outline:none}.splide--rtl>.splide__arrows .splide__arrow--prev,.splide--rtl>.splide__track>.splide__arrows .splide__arrow--prev{right:1em;left:auto}.splide--rtl>.splide__arrows .splide__arrow--prev svg,.splide--rtl>.splide__track>.splide__arrows .splide__arrow--prev svg{transform:scaleX(1)}.splide--rtl>.splide__arrows .splide__arrow--next,.splide--rtl>.splide__track>.splide__arrows .splide__arrow--next{left:1em;right:auto}.splide--rtl>.splide__arrows .splide__arrow--next svg,.splide--rtl>.splide__track>.splide__arrows .splide__arrow--next svg{transform:scaleX(-1)}.splide--ttb>.splide__arrows .splide__arrow,.splide--ttb>.splide__track>.splide__arrows .splide__arrow{left:50%;transform:translate(-50%)}.splide--ttb>.splide__arrows .splide__arrow--prev,.splide--ttb>.splide__track>.splide__arrows .splide__arrow--prev{top:1em}.splide--ttb>.splide__arrows .splide__arrow--prev svg,.splide--ttb>.splide__track>.splide__arrows .splide__arrow--prev svg{transform:rotate(-90deg)}.splide--ttb>.splide__arrows .splide__arrow--next,.splide--ttb>.splide__track>.splide__arrows .splide__arrow--next{top:auto;bottom:1em}.splide--ttb>.splide__arrows .splide__arrow--next svg,.splide--ttb>.splide__track>.splide__arrows .splide__arrow--next svg{transform:rotate(90deg)}.splide--ttb>.splide__pagination{display:flex;flex-direction:column;bottom:50%;left:auto;right:1em;transform:translateY(50%)}.splide--ttb>.splide__pagination .splide__pagination__page{width:5px;height:20px}
|
||||
@@ -1 +0,0 @@
|
||||
@keyframes splide-loading{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.splide__container{position:relative;box-sizing:border-box}.splide__list{margin:0!important;padding:0!important;width:-webkit-max-content;width:max-content;will-change:trasform}.splide.is-active .splide__list{display:flex}.splide__pagination{display:inline-flex;align-items:center;width:95%;flex-wrap:wrap;justify-content:center;margin:0}.splide__pagination li{list-style-type:none;display:inline-block;line-height:1;margin:0}.splide{visibility:hidden}.splide,.splide__slide{position:relative;outline:none}.splide__slide{box-sizing:border-box;list-style-type:none!important;margin:0;flex-shrink:0}.splide__slide img{vertical-align:bottom}.splide__slider{position:relative}.splide__spinner{position:absolute;top:0;left:0;right:0;bottom:0;margin:auto;display:inline-block;width:20px;height:20px;border-radius:50%;border:2px solid #999;animation:splide-loading 1s linear infinite}.splide__track{position:relative;z-index:0;overflow:hidden}.splide--draggable>.splide__track>.splide__list>.splide__slide{-webkit-user-select:none;user-select:none}.splide--fade>.splide__track>.splide__list{display:block}.splide--fade>.splide__track>.splide__list>.splide__slide{position:absolute;top:0;left:0;z-index:0;opacity:0}.splide--fade>.splide__track>.splide__list>.splide__slide.is-active{position:relative;z-index:1;opacity:1}.splide--rtl{direction:rtl}.splide--ttb>.splide__track>.splide__list{display:block}.splide--ttb>.splide__pagination{width:auto}.splide__arrow{position:absolute;z-index:1;top:50%;transform:translateY(-50%);border:none;padding:0;background:transparent}.splide__arrow svg{width:2.5em;height:2.5em;fill:#00bfff;transition:fill .2s linear}.splide__arrow:hover{cursor:pointer}.splide__arrow:hover svg{fill:#66d9ff}.splide__arrow:focus{outline:none}.splide__arrow--prev{left:1em}.splide__arrow--prev svg{transform:scaleX(-1)}.splide__arrow--next{right:1em}.splide__pagination{position:absolute;z-index:1;bottom:.5em;left:50%;transform:translateX(-50%);padding:0}.splide__pagination__page{display:inline-block;width:10px;height:10px;background:#ccc;border-radius:50%;margin:3px;padding:0;transition:all .2s linear;border:none}.splide__pagination__page.is-active{transform:scale(1.4);background:#00bfff}.splide__pagination__page:hover{cursor:pointer;background:#66d9ff}.splide__pagination__page:focus{outline:none}.splide__progress__bar{width:0;height:3px;background:#00bfff}.splide__spinner{border:2px solid #00bfff;border-left-color:transparent}.splide--nav>.splide__track>.splide__list>.splide__slide{border:3px solid transparent;cursor:pointer;opacity:.7}.splide--nav>.splide__track>.splide__list>.splide__slide.is-active{border-color:#00bfff;opacity:1}.splide--nav>.splide__track>.splide__list>.splide__slide:focus{outline:none}.splide--rtl>.splide__arrows .splide__arrow--prev,.splide--rtl>.splide__track>.splide__arrows .splide__arrow--prev{right:1em;left:auto}.splide--rtl>.splide__arrows .splide__arrow--prev svg,.splide--rtl>.splide__track>.splide__arrows .splide__arrow--prev svg{transform:scaleX(1)}.splide--rtl>.splide__arrows .splide__arrow--next,.splide--rtl>.splide__track>.splide__arrows .splide__arrow--next{left:1em;right:auto}.splide--rtl>.splide__arrows .splide__arrow--next svg,.splide--rtl>.splide__track>.splide__arrows .splide__arrow--next svg{transform:scaleX(-1)}.splide--ttb>.splide__arrows .splide__arrow,.splide--ttb>.splide__track>.splide__arrows .splide__arrow{left:50%;transform:translate(-50%)}.splide--ttb>.splide__arrows .splide__arrow--prev,.splide--ttb>.splide__track>.splide__arrows .splide__arrow--prev{top:1em}.splide--ttb>.splide__arrows .splide__arrow--prev svg,.splide--ttb>.splide__track>.splide__arrows .splide__arrow--prev svg{transform:rotate(-90deg)}.splide--ttb>.splide__arrows .splide__arrow--next,.splide--ttb>.splide__track>.splide__arrows .splide__arrow--next{top:auto;bottom:1em}.splide--ttb>.splide__arrows .splide__arrow--next svg,.splide--ttb>.splide__track>.splide__arrows .splide__arrow--next svg{transform:rotate(90deg)}.splide--ttb>.splide__pagination{display:flex;flex-direction:column;bottom:50%;left:auto;right:.5em;transform:translateY(50%)}
|
||||
@@ -1,6 +0,0 @@
|
||||
/*!
|
||||
* Splide.js
|
||||
* Version : 2.4.10
|
||||
* License : MIT
|
||||
* Copyright: 2020 Naotoshi Fujita
|
||||
*/!function(e){var i={};function o(t){if(i[t])return i[t].exports;var n=i[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=i,o.d=function(t,n,e){o.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:e})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(n,t){if(1&t&&(n=o(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var e=Object.create(null);if(o.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var i in n)o.d(e,i,function(t){return n[t]}.bind(null,i));return e},o.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(n,"a",n),n},o.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},o.p="",o(o.s=0)}([function(t,n,e){"use strict";e.r(n),e.d(n,"Splide",function(){return At});var s={};e.r(s),e.d(s,"CREATED",function(){return G}),e.d(s,"MOUNTED",function(){return X}),e.d(s,"IDLE",function(){return V}),e.d(s,"MOVING",function(){return U}),e.d(s,"DESTROYED",function(){return Y});function i(){return(i=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t}).apply(this,arguments)}var b=Object.keys;function m(e,i){b(e).some(function(t,n){return i(e[t],t,n)})}function g(n){return b(n).map(function(t){return n[t]})}function o(t){return"object"==typeof t}function u(t,n){var e=i({},t);return m(n,function(t,n){o(t)?(o(e[n])||(e[n]={}),e[n]=u(e[n],t)):e[n]=t}),e}function r(t){return Array.isArray(t)?t:[t]}function y(t,n,e){return Math.min(Math.max(t,e<n?e:n),e<n?n:e)}function h(t,n){var e=0;return t.replace(/%s/g,function(){return r(n)[e++]})}function w(t){var n=typeof t;return"number"==n&&0<t?parseFloat(t)+"px":"string"==n?t:""}function v(t){return t<10?"0"+t:t}function x(t,n){var e;return"string"==typeof n&&(P(e=f("div",{}),{position:"absolute",width:n}),k(t,e),n=e.clientWidth,E(e)),+n||0}function c(t,n){return t?t.querySelector(n.split(" ")[0]):null}function _(t,n){return d(t,n)[0]}function d(t,n){return t?g(t.children).filter(function(t){return z(t,n.split(" ")[0])||t.tagName===n}):[]}function f(t,n){var e=document.createElement(t);return m(n,function(t,n){return M(e,n,t)}),e}function l(t){var n=f("div",{});return n.innerHTML=t,n.firstChild}function E(t){r(t).forEach(function(t){var n;!t||(n=t.parentElement)&&n.removeChild(t)})}function k(t,n){t&&t.appendChild(n)}function S(t,n){var e;t&&n&&((e=n.parentElement)&&e.insertBefore(t,n))}function P(e,t){e&&m(t,function(t,n){null!==t&&(e.style[n]=t)})}function a(n,t,e){n&&r(t).forEach(function(t){t&&n.classList[e?"remove":"add"](t)})}function C(t,n){a(t,n,!1)}function I(t,n){a(t,n,!0)}function z(t,n){return!!t&&t.classList.contains(n)}function M(t,n,e){t&&t.setAttribute(n,e)}function O(t,n){return t?t.getAttribute(n):""}function A(t,n){r(n).forEach(function(n){r(t).forEach(function(t){return t&&t.removeAttribute(n)})})}function T(t){return t.getBoundingClientRect()}function p(u,c){var d,l;return{mount:function(){d=c.Elements.list,u.on("transitionend",function(t){t.target===d&&l&&l()},d)},start:function(t,n,e,i,o){var r=u.options,s=c.Controller.edgeIndex,a=r.speed;l=o,u.is(j)&&(0===e&&s<=n||s<=e&&0===n)&&(a=r.rewindSpeed||a),P(d,{transition:"transform "+a+"ms "+r.easing,transform:"translate("+i.x+"px,"+i.y+"px)"})}}}function L(e,s){function a(t){var n=e.options;P(s.Elements.slides[t],{transition:"opacity "+n.speed+"ms "+n.easing})}return{mount:function(){a(e.index)},start:function(t,n,e,i,o){var r=s.Elements.track;P(r,{height:w(r.clientHeight)}),a(n),o(),P(r,{height:""})}}}var j="slide",W="loop",H="fade";var q="[SPLIDE]";function D(t){console.error(q+" "+t)}function N(t,n){if(!t)throw new Error(n)}var R="splide",B={active:"is-active",visible:"is-visible",loading:"is-loading"},F={type:"slide",rewind:!1,speed:400,rewindSpeed:0,waitForTransition:!0,width:0,height:0,fixedWidth:0,fixedHeight:0,heightRatio:0,autoWidth:!1,autoHeight:!1,perPage:1,perMove:0,clones:0,start:0,focus:!1,gap:0,padding:0,arrows:!0,arrowPath:"",pagination:!0,autoplay:!1,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,lazyLoad:!1,preloadPages:1,easing:"cubic-bezier(.42,.65,.27,.99)",keyboard:"global",drag:!0,dragAngleThreshold:30,swipeDistanceThreshold:150,flickVelocityThreshold:.6,flickPower:600,flickMaxPages:1,direction:"ltr",cover:!1,accessibility:!0,slideFocus:!0,isNavigation:!1,trimSpace:!0,updateOnMove:!1,throttle:100,destroy:!1,breakpoints:!1,classes:{root:R,slider:R+"__slider",track:R+"__track",list:R+"__list",slide:R+"__slide",container:R+"__slide__container",arrows:R+"__arrows",arrow:R+"__arrow",prev:R+"__arrow--prev",next:R+"__arrow--next",pagination:R+"__pagination",page:R+"__pagination__page",clone:R+"__slide--clone",progress:R+"__progress",bar:R+"__progress__bar",autoplay:R+Line truncated
|
||||
@@ -1,141 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
/*
|
||||
* Dependencies.
|
||||
*/
|
||||
const gulp = require( 'gulp' );
|
||||
const rename = require( 'gulp-rename' );
|
||||
const sass = require( 'gulp-sass' );
|
||||
const sassGlob = require( 'gulp-sass-glob' );
|
||||
const postcss = require( 'gulp-postcss' );
|
||||
const autoprefixer = require( 'autoprefixer' );
|
||||
const cssnano = require( 'cssnano' );
|
||||
const merge = require( 'merge-stream' );
|
||||
const concat = require( 'gulp-concat' );
|
||||
const webpackStream = require( 'webpack-stream' );
|
||||
const eslint = require( 'gulp-eslint' );
|
||||
const gzip = require( 'gulp-gzip' );
|
||||
|
||||
/*
|
||||
* Webpack config paths.
|
||||
*/
|
||||
const js = {
|
||||
complete: {
|
||||
path: './build/complete/config',
|
||||
dest: './dist/js',
|
||||
},
|
||||
minified: {
|
||||
path: './build/complete/config-min',
|
||||
dest: './dist/js',
|
||||
gzip: true,
|
||||
},
|
||||
modular: {
|
||||
path: './build/module/config',
|
||||
dest: './dist/js',
|
||||
},
|
||||
};
|
||||
|
||||
/*
|
||||
* Path definitions.
|
||||
*/
|
||||
const css = {
|
||||
all: {
|
||||
path : './src/sass/core/*.scss',
|
||||
dest : './dist/css',
|
||||
merge: {
|
||||
filename: 'splide.css',
|
||||
path : './src/sass/themes/default/*.scss',
|
||||
},
|
||||
},
|
||||
core: {
|
||||
path: './src/sass/core/*.scss',
|
||||
dest: './dist/css',
|
||||
},
|
||||
default: {
|
||||
path : './src/sass/core/*.scss',
|
||||
dest : './dist/css/themes',
|
||||
basename: 'splide-default',
|
||||
merge : {
|
||||
filename: 'splide.css',
|
||||
path : './src/sass/themes/default/*.scss',
|
||||
},
|
||||
},
|
||||
skyblue: {
|
||||
path : './src/sass/core/*.scss',
|
||||
dest : './dist/css/themes',
|
||||
basename: 'splide-skyblue',
|
||||
merge : {
|
||||
filename: 'splide.css',
|
||||
path : './src/sass/themes/sky-blue/*.scss',
|
||||
},
|
||||
},
|
||||
seagreen: {
|
||||
path : './src/sass/core/*.scss',
|
||||
dest : './dist/css/themes',
|
||||
basename: 'splide-sea-green',
|
||||
merge : {
|
||||
filename: 'splide.css',
|
||||
path : './src/sass/themes/sea-green/*.scss',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
/*
|
||||
* Build a script file.
|
||||
*/
|
||||
gulp.task( 'build:js', done => {
|
||||
Object.values( js ).forEach( settings => {
|
||||
const stream = webpackStream( { config: require( settings.path ) } )
|
||||
.pipe( gulp.dest( settings.dest ) );
|
||||
|
||||
if ( settings.gzip ) {
|
||||
stream.pipe( gzip() ).pipe( gulp.dest( settings.dest ) );
|
||||
}
|
||||
} );
|
||||
|
||||
done();
|
||||
} );
|
||||
|
||||
/*
|
||||
* Build sass files.
|
||||
*/
|
||||
gulp.task( 'build:sass', done => {
|
||||
Object.values( css ).forEach( settings => {
|
||||
let stream = gulp.src( settings.path );
|
||||
|
||||
if ( settings.merge ) {
|
||||
stream = merge( stream, gulp.src( settings.merge.path ) )
|
||||
.pipe( sassGlob() )
|
||||
.pipe( sass() )
|
||||
.pipe( concat( settings.merge.filename ) );
|
||||
}
|
||||
|
||||
stream = stream
|
||||
.pipe( sassGlob() )
|
||||
.pipe( sass() )
|
||||
.pipe( postcss( [
|
||||
cssnano( { reduceIdents: false } ),
|
||||
autoprefixer( { overrideBrowserslist: [ '> 5%' ] } )
|
||||
] ) );
|
||||
|
||||
if ( settings.basename ) {
|
||||
stream = stream.pipe( rename( { basename: settings.basename } ) );
|
||||
}
|
||||
|
||||
stream
|
||||
.pipe( rename( { suffix: '.min' } ) )
|
||||
.pipe( gulp.dest( settings.dest ) );
|
||||
} );
|
||||
|
||||
done();
|
||||
} );
|
||||
|
||||
/*
|
||||
* Run lint.
|
||||
*/
|
||||
gulp.task( 'lint', () => {
|
||||
return gulp.src( [ './src/**/*.js', './tests/**/*.js' ] )
|
||||
.pipe( eslint( { useEslintrc: true } ) )
|
||||
.pipe( eslint.format() )
|
||||
.pipe( eslint.failAfterError() );
|
||||
} );
|
||||
|
Before Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
@@ -1,3 +0,0 @@
|
||||
module.exports = {
|
||||
rootDir: './tests',
|
||||
};
|
||||
@@ -1,56 +0,0 @@
|
||||
{
|
||||
"name": "@splidejs/splide",
|
||||
"version": "2.4.10",
|
||||
"description": "Splide is a lightweight and powerful slider without any dependencies.",
|
||||
"author": "Naotoshi Fujita",
|
||||
"license": "MIT",
|
||||
"main": "dist/js/splide.js",
|
||||
"module": "dist/js/splide.esm.js",
|
||||
"types": "src/js/splide.d.ts",
|
||||
"keywords": [
|
||||
"splide",
|
||||
"slider",
|
||||
"carousel",
|
||||
"slideshow",
|
||||
"lightweight",
|
||||
"touch",
|
||||
"responsive"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/Splidejs/splide.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/Splidejs/splide/issues"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.10.5",
|
||||
"@babel/preset-env": "^7.10.4",
|
||||
"autoprefixer": "^9.8.5",
|
||||
"babel-jest": "^26.1.0",
|
||||
"babel-loader": "^8.1.0",
|
||||
"cssnano": "^4.1.10",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-concat": "^2.6.1",
|
||||
"gulp-eslint": "^6.0.0",
|
||||
"gulp-gzip": "^1.4.2",
|
||||
"gulp-postcss": "^8.0.0",
|
||||
"gulp-rename": "^2.0.0",
|
||||
"gulp-rollup": "^2.17.0",
|
||||
"gulp-sass": "^4.1.0",
|
||||
"gulp-sass-glob": "^1.1.0",
|
||||
"gulp-uglify": "^3.0.2",
|
||||
"jest": "^26.1.0",
|
||||
"merge-stream": "^2.0.0",
|
||||
"serialize-javascript": "^4.0.0",
|
||||
"uglifyjs-webpack-plugin": "^2.2.0",
|
||||
"webpack": "^4.44.0",
|
||||
"webpack-stream": "^5.2.1"
|
||||
},
|
||||
"scripts": {
|
||||
"build:js": "gulp build:js",
|
||||
"build:sass": "gulp build:sass",
|
||||
"test": "jest --clearCache && jest",
|
||||
"lint": "gulp lint"
|
||||
}
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
id="svg4265"
|
||||
viewBox="0 0 20 20"
|
||||
height="20"
|
||||
width="20"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="arrow.svg">
|
||||
<defs
|
||||
id="defs3732" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="2560"
|
||||
inkscape:window-height="1027"
|
||||
id="namedview3730"
|
||||
showgrid="false"
|
||||
inkscape:zoom="11.313708"
|
||||
inkscape:cx="-9.3010233"
|
||||
inkscape:cy="13.84035"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="22"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg4265" />
|
||||
<metadata
|
||||
id="metadata4270">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<text
|
||||
id="text3719"
|
||||
style="word-spacing:0px;letter-spacing:0px"
|
||||
xml:space="preserve"
|
||||
font-size="40px"
|
||||
line-height="125%"
|
||||
y="1.8054396"
|
||||
x="-16.2097"
|
||||
font-family="'Helvetica Neue LT Pro'"
|
||||
fill="#000000"><tspan
|
||||
id="tspan3721"
|
||||
y="1.8054396"
|
||||
x="-16.2097"
|
||||
font-family="'Helvetica Neue LT Pro'" /></text>
|
||||
<g
|
||||
id="g3802"
|
||||
transform="matrix(0.70710678,0.70710678,-0.70710678,0.70710678,39.987438,-18.294548)">
|
||||
<rect
|
||||
transform="matrix(0,-1,1,0,0,0)"
|
||||
y="17"
|
||||
x="-33"
|
||||
height="3"
|
||||
width="13"
|
||||
id="rect3732-3-0-0"
|
||||
style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:8;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke" />
|
||||
<rect
|
||||
y="20"
|
||||
x="7"
|
||||
height="3"
|
||||
width="13"
|
||||
id="rect3732-3-0-0-6"
|
||||
style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:8;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke" />
|
||||
</g>
|
||||
<path
|
||||
style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:8;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke"
|
||||
d="M 6.4648432,0.80664065 4.3437497,2.9296875 11.414062,10 4.3437497,17.070312 6.4648432,19.193359 13.535156,12.121094 15.65625,10 13.535156,7.8789062 6.4648432,0.80664065 Z"
|
||||
id="rect3732-3-0-0-3"
|
||||
inkscape:connector-curvature="0" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 3.2 KiB |
@@ -1,4 +0,0 @@
|
||||
<svg id="svg4265" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" height="40" width="40" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<text id="text3719" style="word-spacing:0px;letter-spacing:0px" xml:space="preserve" font-size="40px" line-height="125%" y="21.805439" x="-16.2097" font-family="'Helvetica Neue LT Pro'" fill="#000000"><tspan id="tspan3721" y="21.805439" x="-16.2097" font-family="'Helvetica Neue LT Pro'"/></text>
|
||||
<path id="rect3732-3-0-0-3" style="paint-order:markers fill stroke" d="m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 739 B |
@@ -1,250 +0,0 @@
|
||||
/**
|
||||
* The component for enhancing accessibility.
|
||||
*
|
||||
* @author Naotoshi Fujita
|
||||
* @copyright Naotoshi Fujita. All rights reserved.
|
||||
*/
|
||||
|
||||
import { setAttribute, removeAttribute } from '../../utils/dom';
|
||||
import { sprintf } from '../../utils/utils';
|
||||
import { ARIA_CONTROLS, ARIA_CURRENRT, ARIA_HIDDEN, ARIA_LABEL, TAB_INDEX } from '../../constants/a11y';
|
||||
|
||||
|
||||
/**
|
||||
* The component for enhancing accessibility.
|
||||
*
|
||||
* @param {Splide} Splide - A Splide instance.
|
||||
* @param {Object} Components - An object containing components.
|
||||
*
|
||||
* @return {Object} - The component object.
|
||||
*/
|
||||
export default ( Splide, Components ) => {
|
||||
/**
|
||||
* Hold a i18n object.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
const i18n = Splide.i18n;
|
||||
|
||||
/**
|
||||
* Hold the Elements component.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
const Elements = Components.Elements;
|
||||
|
||||
/**
|
||||
* All attributes related with A11y.
|
||||
*
|
||||
* @type {string[]}
|
||||
*/
|
||||
const allAttributes = [ ARIA_HIDDEN, TAB_INDEX, ARIA_CONTROLS, ARIA_LABEL, ARIA_CURRENRT, 'role' ];
|
||||
|
||||
/**
|
||||
* A11y component object.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
const A11y = {
|
||||
/**
|
||||
* Required only when the accessibility option is true.
|
||||
*
|
||||
* @type {boolean}
|
||||
*/
|
||||
required: Splide.options.accessibility,
|
||||
|
||||
/**
|
||||
* Called when the component is mounted.
|
||||
*/
|
||||
mount() {
|
||||
Splide
|
||||
.on( 'visible', Slide => { updateSlide( Slide.slide, true ) } )
|
||||
.on( 'hidden', Slide => { updateSlide( Slide.slide, false ) } )
|
||||
.on( 'arrows:mounted', initArrows )
|
||||
.on( 'arrows:updated', updateArrows )
|
||||
.on( 'pagination:mounted', initPagination )
|
||||
.on( 'pagination:updated', updatePagination )
|
||||
.on( 'refresh', () => { removeAttribute( Components.Clones.clones, allAttributes ) } );
|
||||
|
||||
if ( Splide.options.isNavigation ) {
|
||||
Splide
|
||||
.on( 'navigation:mounted', initNavigation )
|
||||
.on( 'active', Slide => { updateNavigation( Slide, true ) } )
|
||||
.on( 'inactive', Slide => { updateNavigation( Slide, false ) } );
|
||||
}
|
||||
|
||||
initAutoplay();
|
||||
},
|
||||
|
||||
/**
|
||||
* Destroy.
|
||||
*/
|
||||
destroy() {
|
||||
const Arrows = Components.Arrows;
|
||||
const arrows = Arrows ? Arrows.arrows : {};
|
||||
|
||||
removeAttribute(
|
||||
Elements.slides.concat( [ arrows.prev, arrows.next, Elements.play, Elements.pause ] ),
|
||||
allAttributes
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Update slide attributes when it gets visible or hidden.
|
||||
*
|
||||
* @param {Element} slide - A slide element.
|
||||
* @param {Boolean} visible - True when the slide gets visible, or false when hidden.
|
||||
*/
|
||||
function updateSlide( slide, visible ) {
|
||||
setAttribute( slide, ARIA_HIDDEN, ! visible );
|
||||
|
||||
if ( Splide.options.slideFocus ) {
|
||||
setAttribute( slide, TAB_INDEX, visible ? 0 : -1 );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize arrows if they are available.
|
||||
* Append screen reader elements and add aria-controls attribute.
|
||||
*
|
||||
* @param {Element} prev - Previous arrow element.
|
||||
* @param {Element} next - Next arrow element.
|
||||
*/
|
||||
function initArrows( prev, next ) {
|
||||
const controls = Elements.track.id;
|
||||
|
||||
setAttribute( prev, ARIA_CONTROLS, controls );
|
||||
setAttribute( next, ARIA_CONTROLS, controls );
|
||||
}
|
||||
|
||||
/**
|
||||
* Update arrow attributes.
|
||||
*
|
||||
* @param {Element} prev - Previous arrow element.
|
||||
* @param {Element} next - Next arrow element.
|
||||
* @param {number} prevIndex - Previous slide index or -1 when there is no precede slide.
|
||||
* @param {number} nextIndex - Next slide index or -1 when there is no next slide.
|
||||
*/
|
||||
function updateArrows( prev, next, prevIndex, nextIndex ) {
|
||||
const index = Splide.index;
|
||||
const prevLabel = prevIndex > -1 && index < prevIndex ? i18n.last : i18n.prev;
|
||||
const nextLabel = nextIndex > -1 && index > nextIndex ? i18n.first : i18n.next;
|
||||
|
||||
setAttribute( prev, ARIA_LABEL, prevLabel );
|
||||
setAttribute( next, ARIA_LABEL, nextLabel );
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize pagination if it's available.
|
||||
* Append a screen reader element and add aria-controls/label attribute to each item.
|
||||
*
|
||||
* @param {Object} data - Data object containing all items.
|
||||
* @param {Object} activeItem - An initial active item.
|
||||
*/
|
||||
function initPagination( data, activeItem ) {
|
||||
if ( activeItem ) {
|
||||
setAttribute( activeItem.button, ARIA_CURRENRT, true );
|
||||
}
|
||||
|
||||
data.items.forEach( item => {
|
||||
const options = Splide.options;
|
||||
const text = options.focus === false && options.perPage > 1 ? i18n.pageX : i18n.slideX;
|
||||
const label = sprintf( text, item.page + 1 );
|
||||
const button = item.button;
|
||||
const controls = item.Slides.map( Slide => Slide.slide.id );
|
||||
|
||||
setAttribute( button, ARIA_CONTROLS, controls.join( ' ' ) );
|
||||
setAttribute( button, ARIA_LABEL, label );
|
||||
} );
|
||||
}
|
||||
|
||||
/**
|
||||
* Update pagination attributes.
|
||||
*
|
||||
* @param {Object} data - Data object containing all items.
|
||||
* @param {Element} prev - A previous active element.
|
||||
* @param {Element} curr - A current active element.
|
||||
*/
|
||||
function updatePagination( data, prev, curr ) {
|
||||
if ( prev ) {
|
||||
removeAttribute( prev.button, ARIA_CURRENRT );
|
||||
}
|
||||
|
||||
if ( curr ) {
|
||||
setAttribute( curr.button, ARIA_CURRENRT, true );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize autoplay buttons.
|
||||
*/
|
||||
function initAutoplay() {
|
||||
[ 'play', 'pause' ].forEach( name => {
|
||||
const elm = Elements[ name ];
|
||||
|
||||
if ( elm ) {
|
||||
if ( ! isButton( elm ) ) {
|
||||
setAttribute( elm, 'role', 'button' );
|
||||
}
|
||||
|
||||
setAttribute( elm, ARIA_CONTROLS, Elements.track.id );
|
||||
setAttribute( elm, ARIA_LABEL, i18n[ name ] );
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize navigation slider.
|
||||
* Add button role, aria-label, aria-controls to slide elements and append screen reader text to them.
|
||||
*
|
||||
* @param {Splide} main - A main Splide instance.
|
||||
*/
|
||||
function initNavigation( main ) {
|
||||
Elements.each( Slide => {
|
||||
const slide = Slide.slide;
|
||||
const realIndex = Slide.realIndex;
|
||||
|
||||
if ( ! isButton( slide ) ) {
|
||||
setAttribute( slide, 'role', 'button' );
|
||||
}
|
||||
|
||||
const slideIndex = realIndex > -1 ? realIndex : Slide.index;
|
||||
const label = sprintf( i18n.slideX, slideIndex + 1 );
|
||||
const mainSlide = main.Components.Elements.getSlide( slideIndex );
|
||||
|
||||
setAttribute( slide, ARIA_LABEL, label );
|
||||
|
||||
if ( mainSlide ) {
|
||||
setAttribute( slide, ARIA_CONTROLS, mainSlide.slide.id );
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
/**
|
||||
* Update navigation attributes.
|
||||
*
|
||||
* @param {Object} Slide - A target Slide object.
|
||||
* @param {boolean} active - True if the slide is active or false if inactive.
|
||||
*/
|
||||
function updateNavigation( { slide }, active ) {
|
||||
if ( active ) {
|
||||
setAttribute( slide, ARIA_CURRENRT, true );
|
||||
} else {
|
||||
removeAttribute( slide, ARIA_CURRENRT );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the given element is button or not.
|
||||
*
|
||||
* @param {Element} elm - An element to be checked.
|
||||
*
|
||||
* @return {boolean} - True if the given element is button.
|
||||
*/
|
||||
function isButton( elm ) {
|
||||
return elm.tagName === 'BUTTON';
|
||||
}
|
||||
|
||||
return A11y;
|
||||
}
|
||||
@@ -1,175 +0,0 @@
|
||||
/**
|
||||
* The component for appending prev/next arrows.
|
||||
*
|
||||
* @author Naotoshi Fujita
|
||||
* @copyright Naotoshi Fujita. All rights reserved.
|
||||
*/
|
||||
|
||||
import { create, append, before, domify, remove, removeAttribute } from '../../utils/dom';
|
||||
import { XML_NAME_SPACE, PATH, SIZE } from './path';
|
||||
import { LOOP } from "../../constants/types";
|
||||
|
||||
|
||||
/**
|
||||
* The component for appending prev/next arrows.
|
||||
*
|
||||
* @param {Splide} Splide - A Splide instance.
|
||||
* @param {Object} Components - An object containing components.
|
||||
* @param {string} name - A component name as a lowercase string.
|
||||
*
|
||||
* @return {Object} - The component object.
|
||||
*/
|
||||
export default ( Splide, Components, name ) => {
|
||||
/**
|
||||
* Previous arrow element.
|
||||
*
|
||||
* @type {Element|undefined}
|
||||
*/
|
||||
let prev;
|
||||
|
||||
/**
|
||||
* Next arrow element.
|
||||
*
|
||||
* @type {Element|undefined}
|
||||
*/
|
||||
let next;
|
||||
|
||||
/**
|
||||
* Store the class list.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
const classes = Splide.classes;
|
||||
|
||||
/**
|
||||
* Hold the root element.
|
||||
*
|
||||
* @type {Element}
|
||||
*/
|
||||
const root = Splide.root;
|
||||
|
||||
/**
|
||||
* Whether arrows are created programmatically or not.
|
||||
*
|
||||
* @type {boolean}
|
||||
*/
|
||||
let created;
|
||||
|
||||
/**
|
||||
* Hold the Elements component.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
const Elements = Components.Elements;
|
||||
|
||||
/**
|
||||
* Arrows component object.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
const Arrows = {
|
||||
/**
|
||||
* Required when the arrows option is true.
|
||||
*
|
||||
* @type {boolean}
|
||||
*/
|
||||
required: Splide.options.arrows,
|
||||
|
||||
/**
|
||||
* Called when the component is mounted.
|
||||
*/
|
||||
mount() {
|
||||
// Attempt to get arrows from HTML source.
|
||||
prev = Elements.arrows.prev;
|
||||
next = Elements.arrows.next;
|
||||
|
||||
// If arrows were not found in HTML, let's generate them.
|
||||
if ( ( ! prev || ! next ) && Splide.options.arrows ) {
|
||||
prev = createArrow( true );
|
||||
next = createArrow( false );
|
||||
created = true;
|
||||
|
||||
appendArrows();
|
||||
}
|
||||
|
||||
if ( prev && next ) {
|
||||
bind();
|
||||
}
|
||||
|
||||
this.arrows = { prev, next };
|
||||
},
|
||||
|
||||
/**
|
||||
* Called after all components are mounted.
|
||||
*/
|
||||
mounted() {
|
||||
Splide.emit( `${ name }:mounted`, prev, next );
|
||||
},
|
||||
|
||||
/**
|
||||
* Destroy.
|
||||
*/
|
||||
destroy() {
|
||||
removeAttribute( [ prev, next ], 'disabled' );
|
||||
|
||||
if ( created ) {
|
||||
remove( prev.parentElement );
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Listen to native and custom events.
|
||||
*/
|
||||
function bind() {
|
||||
Splide
|
||||
.on( 'click', () => { Splide.go( '<' ) }, prev )
|
||||
.on( 'click', () => { Splide.go( '>' ) }, next )
|
||||
.on( 'mounted move updated refresh', updateDisabled );
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a disabled attribute.
|
||||
*/
|
||||
function updateDisabled() {
|
||||
const { prevIndex, nextIndex } = Components.Controller;
|
||||
const isEnough = Splide.length > Splide.options.perPage || Splide.is( LOOP );
|
||||
|
||||
prev.disabled = prevIndex < 0 || ! isEnough;
|
||||
next.disabled = nextIndex < 0 || ! isEnough;
|
||||
|
||||
Splide.emit( `${ name }:updated`, prev, next, prevIndex, nextIndex );
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a wrapper element and append arrows.
|
||||
*/
|
||||
function appendArrows() {
|
||||
const wrapper = create( 'div', { class: classes.arrows } );
|
||||
|
||||
append( wrapper, prev );
|
||||
append( wrapper, next );
|
||||
|
||||
const slider = Elements.slider;
|
||||
const parent = Splide.options.arrows === 'slider' && slider ? slider : root;
|
||||
|
||||
before( wrapper, parent.firstElementChild );
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an arrow element.
|
||||
*
|
||||
* @param {boolean} prev - Determine to create a prev arrow or next arrow.
|
||||
*
|
||||
* @return {Element} - A created arrow element.
|
||||
*/
|
||||
function createArrow( prev ) {
|
||||
const arrow = `<button class="${ classes.arrow } ${ prev ? classes.prev : classes.next }" type="button">`
|
||||
+ `<svg xmlns="${ XML_NAME_SPACE }" viewBox="0 0 ${ SIZE } ${ SIZE }" width="${ SIZE }" height="${ SIZE }">`
|
||||
+ `<path d="${ Splide.options.arrowPath || PATH }" />`;
|
||||
|
||||
return domify( arrow );
|
||||
}
|
||||
|
||||
return Arrows;
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
/**
|
||||
* Export vector path for an arrow.
|
||||
*
|
||||
* @author Naotoshi Fujita
|
||||
* @copyright Naotoshi Fujita. All rights reserved.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Namespace definition for SVG element.
|
||||
*
|
||||
* @type {string}
|
||||
*/
|
||||
export const XML_NAME_SPACE = 'http://www.w3.org/2000/svg';
|
||||
|
||||
/**
|
||||
* The arrow vector path.
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
export const PATH = 'm15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z';
|
||||
|
||||
/**
|
||||
* SVG width and height.
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
export const SIZE = 40;
|
||||
@@ -1,164 +0,0 @@
|
||||
/**
|
||||
* The component for playing slides automatically.
|
||||
*
|
||||
* @author Naotoshi Fujita
|
||||
* @copyright Naotoshi Fujita. All rights reserved.
|
||||
*/
|
||||
|
||||
import { applyStyle } from '../../utils/dom';
|
||||
import { createInterval } from '../../utils/time';
|
||||
|
||||
/**
|
||||
* Set of pause flags.
|
||||
*/
|
||||
const PAUSE_FLAGS = {
|
||||
HOVER : 1,
|
||||
FOCUS : 2,
|
||||
MANUAL: 3,
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* The component for playing slides automatically.
|
||||
*
|
||||
* @param {Splide} Splide - A Splide instance.
|
||||
* @param {Object} Components - An object containing components.
|
||||
* @param {string} name - A component name as a lowercase string.
|
||||
*
|
||||
* @return {Object} - The component object.
|
||||
*/
|
||||
export default ( Splide, Components, name ) => {
|
||||
/**
|
||||
* Store pause flags.
|
||||
*
|
||||
* @type {Array}
|
||||
*/
|
||||
let flags = [];
|
||||
|
||||
/**
|
||||
* Store an interval object.
|
||||
*
|
||||
* @type {Object};
|
||||
*/
|
||||
let interval;
|
||||
|
||||
/**
|
||||
* Keep the Elements component.
|
||||
*
|
||||
* @type {string}
|
||||
*/
|
||||
const Elements = Components.Elements;
|
||||
|
||||
/**
|
||||
* Autoplay component object.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
const Autoplay = {
|
||||
/**
|
||||
* Required only when the autoplay option is true.
|
||||
*
|
||||
* @type {boolean}
|
||||
*/
|
||||
required: Splide.options.autoplay,
|
||||
|
||||
/**
|
||||
* Called when the component is mounted.
|
||||
* Note that autoplay starts only if there are slides over perPage number.
|
||||
*/
|
||||
mount() {
|
||||
const options = Splide.options;
|
||||
|
||||
if ( Elements.slides.length > options.perPage ) {
|
||||
interval = createInterval( () => { Splide.go( '>' ) }, options.interval, rate => {
|
||||
Splide.emit( `${ name }:playing`, rate );
|
||||
|
||||
if ( Elements.bar ) {
|
||||
applyStyle( Elements.bar, { width: `${ rate * 100 }%` } );
|
||||
}
|
||||
} );
|
||||
|
||||
bind();
|
||||
this.play();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Start autoplay.
|
||||
*
|
||||
* @param {number} flag - A pause flag to be removed.
|
||||
*/
|
||||
play( flag = 0 ) {
|
||||
flags = flags.filter( f => f !== flag );
|
||||
|
||||
if ( ! flags.length ) {
|
||||
Splide.emit( `${ name }:play` );
|
||||
interval.play( Splide.options.resetProgress );
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Pause autoplay.
|
||||
* Note that Array.includes is not supported by IE.
|
||||
*
|
||||
* @param {number} flag - A pause flag to be added.
|
||||
*/
|
||||
pause( flag = 0 ) {
|
||||
interval.pause();
|
||||
|
||||
if ( flags.indexOf( flag ) === -1 ) {
|
||||
flags.push( flag );
|
||||
}
|
||||
|
||||
if ( flags.length === 1 ) {
|
||||
Splide.emit( `${ name }:pause` );
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Listen some events.
|
||||
*/
|
||||
function bind() {
|
||||
const options = Splide.options;
|
||||
const sibling = Splide.sibling;
|
||||
const elms = [ Splide.root, sibling ? sibling.root : null ];
|
||||
|
||||
if ( options.pauseOnHover ) {
|
||||
switchOn( elms, 'mouseleave', PAUSE_FLAGS.HOVER, true );
|
||||
switchOn( elms, 'mouseenter', PAUSE_FLAGS.HOVER, false );
|
||||
}
|
||||
|
||||
if ( options.pauseOnFocus ) {
|
||||
switchOn( elms, 'focusout', PAUSE_FLAGS.FOCUS, true );
|
||||
switchOn( elms, 'focusin', PAUSE_FLAGS.FOCUS, false );
|
||||
}
|
||||
|
||||
Splide
|
||||
.on( 'click', () => {
|
||||
// Need to be removed a focus flag at first.
|
||||
Autoplay.play( PAUSE_FLAGS.FOCUS );
|
||||
Autoplay.play( PAUSE_FLAGS.MANUAL );
|
||||
}, Elements.play )
|
||||
.on( 'move refresh', () => { Autoplay.play() } ) // Rewind the timer.
|
||||
.on( 'destroy', () => { Autoplay.pause() } );
|
||||
|
||||
switchOn( [ Elements.pause ], 'click', PAUSE_FLAGS.MANUAL, false );
|
||||
}
|
||||
|
||||
/**
|
||||
* Play or pause on the given event.
|
||||
*
|
||||
* @param {Element[]} elms - Elements.
|
||||
* @param {string} event - An event name or names.
|
||||
* @param {number} flag - A pause flag defined on the top.
|
||||
* @param {boolean} play - Determine whether to play or pause.
|
||||
*/
|
||||
function switchOn( elms, event, flag, play ) {
|
||||
elms.forEach( elm => {
|
||||
Splide.on( event, () => { Autoplay[ play ? 'play' : 'pause' ]( flag ) }, elm );
|
||||
} );
|
||||
}
|
||||
|
||||
return Autoplay;
|
||||
}
|
||||
@@ -1,146 +0,0 @@
|
||||
/**
|
||||
* The component for updating options according to a current window width.
|
||||
*
|
||||
* @author Naotoshi Fujita
|
||||
* @copyright Naotoshi Fujita. All rights reserved.
|
||||
*/
|
||||
|
||||
import { throttle } from "../../utils/time";
|
||||
import { CREATED, DESTROYED } from "../../constants/states";
|
||||
|
||||
/**
|
||||
* Interval time for throttle.
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
const THROTTLE = 50;
|
||||
|
||||
/**
|
||||
* The component for updating options according to a current window width.
|
||||
*
|
||||
* @param {Splide} Splide - A Splide instance.
|
||||
*
|
||||
* @return {Object} - The component object.
|
||||
*/
|
||||
export default ( Splide ) => {
|
||||
/**
|
||||
* Store breakpoints.
|
||||
*
|
||||
* @type {Object|boolean}
|
||||
*/
|
||||
const breakpoints = Splide.options.breakpoints;
|
||||
|
||||
/**
|
||||
* The check function whose frequency of call is reduced.
|
||||
*
|
||||
* @type {Function}
|
||||
*/
|
||||
const throttledCheck = throttle( check, THROTTLE );
|
||||
|
||||
/**
|
||||
* Keep initial options.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
let initialOptions;
|
||||
|
||||
/**
|
||||
* An array containing objects of point and MediaQueryList.
|
||||
*
|
||||
* @type {Object[]}
|
||||
*/
|
||||
let map = [];
|
||||
|
||||
/**
|
||||
* Hold the previous breakpoint.
|
||||
*
|
||||
* @type {number|undefined}
|
||||
*/
|
||||
let prevPoint;
|
||||
|
||||
/**
|
||||
* Breakpoints component object.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
const Breakpoints = {
|
||||
/**
|
||||
* Required only when the breakpoints definition is provided and browser supports matchMedia.
|
||||
*
|
||||
* @type {boolean}
|
||||
*/
|
||||
required: breakpoints && matchMedia,
|
||||
|
||||
/**
|
||||
* Called when the component is mounted.
|
||||
*/
|
||||
mount() {
|
||||
map = Object.keys( breakpoints )
|
||||
.sort( ( n, m ) => +n - +m )
|
||||
.map( point => ( { point, mql: matchMedia( `(max-width:${ point }px)` ) } ) );
|
||||
|
||||
/*
|
||||
* To keep monitoring resize event after destruction without "completely",
|
||||
* use native addEventListener instead of Splide.on.
|
||||
*/
|
||||
this.destroy( true );
|
||||
addEventListener( 'resize', throttledCheck );
|
||||
|
||||
// Keep initial options to apply them when no breakpoint matches.
|
||||
initialOptions = Splide.options;
|
||||
|
||||
check();
|
||||
},
|
||||
|
||||
/**
|
||||
* Destroy.
|
||||
*
|
||||
* @param {boolean} completely - Whether to destroy Splide completely.
|
||||
*/
|
||||
destroy( completely ) {
|
||||
if ( completely ) {
|
||||
removeEventListener( 'resize', throttledCheck );
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Check the breakpoint.
|
||||
*/
|
||||
function check() {
|
||||
const point = getPoint();
|
||||
|
||||
if ( point !== prevPoint ) {
|
||||
prevPoint = point;
|
||||
|
||||
const State = Splide.State;
|
||||
const options = breakpoints[ point ] || initialOptions;
|
||||
const destroy = options.destroy;
|
||||
|
||||
if ( destroy ) {
|
||||
Splide.options = initialOptions;
|
||||
Splide.destroy( destroy === 'completely' );
|
||||
} else {
|
||||
if ( State.is( DESTROYED ) ) {
|
||||
State.set( CREATED );
|
||||
Splide.mount();
|
||||
}
|
||||
|
||||
Splide.options = options;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the breakpoint matching current window width.
|
||||
* Note that Array.prototype.find is not supported by IE.
|
||||
*
|
||||
* @return {number|string} - A breakpoint as number or string. -1 if no point matches.
|
||||
*/
|
||||
function getPoint() {
|
||||
const item = map.filter( item => item.mql.matches )[0];
|
||||
return item ? item.point : -1;
|
||||
}
|
||||
|
||||
return Breakpoints;
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
/**
|
||||
* The component for handling a click event.
|
||||
*
|
||||
* @author Naotoshi Fujita
|
||||
* @copyright Naotoshi Fujita. All rights reserved.
|
||||
*/
|
||||
|
||||
import { FADE } from "../../constants/types";
|
||||
|
||||
|
||||
/**
|
||||
* The component for handling a click event.
|
||||
* Click should be disabled during drag/swipe.
|
||||
*
|
||||
* @param {Splide} Splide - A Splide instance.
|
||||
* @param {Object} Components - An object containing components.
|
||||
*
|
||||
* @return {Object} - The component object.
|
||||
*/
|
||||
export default ( Splide, Components ) => {
|
||||
/**
|
||||
* Whether click is disabled or not.
|
||||
*
|
||||
* @type {boolean}
|
||||
*/
|
||||
let disabled = false;
|
||||
|
||||
/**
|
||||
* Click component object.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
const Click = {
|
||||
/**
|
||||
* Mount only when the drag is activated and the slide type is not "fade".
|
||||
*
|
||||
* @type {boolean}
|
||||
*/
|
||||
required: Splide.options.drag && ! Splide.is( FADE ),
|
||||
|
||||
/**
|
||||
* Called when the component is mounted.
|
||||
*/
|
||||
mount() {
|
||||
Splide
|
||||
.on( 'click', onClick, Components.Elements.track, { capture: true } )
|
||||
.on( 'drag', () => { disabled = true } )
|
||||
.on( 'moved', () => { disabled = false } );
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Called when a track element is clicked.
|
||||
*
|
||||
* @param {Event} e - A click event.
|
||||
*/
|
||||
function onClick( e ) {
|
||||
if ( disabled ) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
e.stopImmediatePropagation();
|
||||
}
|
||||
}
|
||||
|
||||
return Click;
|
||||
}
|
||||
@@ -1,188 +0,0 @@
|
||||
/**
|
||||
* The component for cloning some slides for "loop" mode of the track.
|
||||
*
|
||||
* @author Naotoshi Fujita
|
||||
* @copyright Naotoshi Fujita. All rights reserved.
|
||||
*/
|
||||
|
||||
import { addClass, removeAttribute, append, before, remove } from '../../utils/dom';
|
||||
import { LOOP } from '../../constants/types';
|
||||
import { TTB } from "../../constants/directions";
|
||||
import { toPixel } from "../../utils/utils";
|
||||
|
||||
|
||||
/**
|
||||
* The component for cloning some slides for "loop" mode of the track.
|
||||
*
|
||||
* @param {Splide} Splide - A Splide instance.
|
||||
* @param {Object} Components - An object containing components.
|
||||
*
|
||||
* @return {Object} - The component object.
|
||||
*/
|
||||
export default ( Splide, Components ) => {
|
||||
/**
|
||||
* Store information of all clones.
|
||||
*
|
||||
* @type {Array}
|
||||
*/
|
||||
let clones = [];
|
||||
|
||||
/**
|
||||
* Store the current clone count on one side.
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
let cloneCount = 0;
|
||||
|
||||
/**
|
||||
* Keep Elements component.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
const Elements = Components.Elements;
|
||||
|
||||
/**
|
||||
* Clones component object.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
const Clones = {
|
||||
/**
|
||||
* Called when the component is mounted.
|
||||
*/
|
||||
mount() {
|
||||
if ( Splide.is( LOOP ) ) {
|
||||
init();
|
||||
|
||||
Splide
|
||||
.on( 'refresh', init )
|
||||
.on( 'resize', () => {
|
||||
if ( cloneCount !== getCloneCount() ) {
|
||||
// Destroy before refresh not to collect clones by the Elements component.
|
||||
this.destroy();
|
||||
Splide.refresh();
|
||||
}
|
||||
} );
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Destroy.
|
||||
*/
|
||||
destroy() {
|
||||
remove( clones );
|
||||
clones = [];
|
||||
},
|
||||
|
||||
/**
|
||||
* Return all clones.
|
||||
*
|
||||
* @return {Element[]} - Cloned elements.
|
||||
*/
|
||||
get clones() {
|
||||
return clones;
|
||||
},
|
||||
|
||||
/**
|
||||
* Return clone length.
|
||||
*
|
||||
* @return {number} - A length of clones.
|
||||
*/
|
||||
get length() {
|
||||
return clones.length;
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Initialization.
|
||||
*/
|
||||
function init() {
|
||||
Clones.destroy();
|
||||
cloneCount = getCloneCount();
|
||||
generateClones( cloneCount );
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate and append/prepend clones.
|
||||
*
|
||||
* @param {number} count - The half number of clones.
|
||||
*/
|
||||
function generateClones( count ) {
|
||||
const { length, register } = Elements;
|
||||
|
||||
if ( length ) {
|
||||
let slides = Elements.slides;
|
||||
|
||||
while ( slides.length < count ) {
|
||||
slides = slides.concat( slides );
|
||||
}
|
||||
|
||||
// Clones after the last element.
|
||||
slides.slice( 0, count ).forEach( ( elm, index ) => {
|
||||
const clone = cloneDeeply( elm );
|
||||
append( Elements.list, clone );
|
||||
clones.push( clone );
|
||||
|
||||
register( clone, index + length, index % length );
|
||||
} );
|
||||
|
||||
// Clones before the first element.
|
||||
slides.slice( -count ).forEach( ( elm, index ) => {
|
||||
const clone = cloneDeeply( elm );
|
||||
before( clone, slides[0] );
|
||||
clones.push( clone );
|
||||
|
||||
register( clone, index - count, ( length + index - count % length ) % length );
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return half count of clones to be generated.
|
||||
* Clone count is determined by:
|
||||
* - "clones" value in the options.
|
||||
* - Number of slides that can be placed in a view in "fixed" mode.
|
||||
* - Max pages a flick action can move.
|
||||
* - Whether the slide length is enough for perPage.
|
||||
*
|
||||
* @return {number} - Count for clones.
|
||||
*/
|
||||
function getCloneCount() {
|
||||
const options = Splide.options;
|
||||
|
||||
if ( options.clones ) {
|
||||
return options.clones;
|
||||
}
|
||||
|
||||
// Use the slide length in autoWidth mode because the number cannot be calculated.
|
||||
let baseCount = options.autoWidth || options.autoHeight ? Elements.length : options.perPage;
|
||||
|
||||
const dimension = options.direction === TTB ? 'Height' : 'Width';
|
||||
const fixedSize = toPixel( Splide.root, options[ `fixed${ dimension }` ] );
|
||||
|
||||
if ( fixedSize ) {
|
||||
// Roughly calculate the count. This needs not to be strict.
|
||||
baseCount = Math.ceil( Elements.track[ `client${ dimension }` ] / fixedSize );
|
||||
}
|
||||
|
||||
return baseCount * ( options.drag ? options.flickMaxPages + 1 : 1 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Clone deeply the given element.
|
||||
*
|
||||
* @param {Element} elm - An element being duplicated.
|
||||
*
|
||||
* @return {Node} - A cloned node(element).
|
||||
*/
|
||||
function cloneDeeply( elm ) {
|
||||
const clone = elm.cloneNode( true );
|
||||
addClass( clone, Splide.classes.clone );
|
||||
|
||||
// ID should not be duplicated.
|
||||
removeAttribute( clone, 'id' );
|
||||
return clone;
|
||||
}
|
||||
|
||||
return Clones;
|
||||
}
|
||||
@@ -1,314 +0,0 @@
|
||||
/**
|
||||
* The component for controlling the track.
|
||||
*
|
||||
* @author Naotoshi Fujita
|
||||
* @copyright Naotoshi Fujita. All rights reserved.
|
||||
*/
|
||||
|
||||
import { LOOP } from "../../constants/types";
|
||||
import { RTL } from '../../constants/directions';
|
||||
import { between } from '../../utils/utils';
|
||||
|
||||
const { floor } = Math;
|
||||
|
||||
|
||||
/**
|
||||
* The component for controlling the track.
|
||||
*
|
||||
* @param {Splide} Splide - A Splide instance.
|
||||
* @param {Object} Components - An object containing components.
|
||||
*
|
||||
* @return {Object} - The component object.
|
||||
*/
|
||||
export default ( Splide, Components ) => {
|
||||
/**
|
||||
* Store current options.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
let options;
|
||||
|
||||
/**
|
||||
* True if the slide is LOOP mode.
|
||||
*
|
||||
* @type {boolean}
|
||||
*/
|
||||
let isLoop;
|
||||
|
||||
/**
|
||||
* Controller component object.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
const Controller = {
|
||||
/**
|
||||
* Called when the component is mounted.
|
||||
*/
|
||||
mount() {
|
||||
options = Splide.options;
|
||||
isLoop = Splide.is( LOOP );
|
||||
bind();
|
||||
},
|
||||
|
||||
/**
|
||||
* Make track run by the given control.
|
||||
* - "+{i}" : Increment the slide index by i.
|
||||
* - "-{i}" : Decrement the slide index by i.
|
||||
* - "{i}" : Go to the slide whose index is i.
|
||||
* - ">" : Go to next page.
|
||||
* - "<" : Go to prev page.
|
||||
* - ">{i}" : Go to page i.
|
||||
*
|
||||
* @param {string|number} control - A control pattern.
|
||||
* @param {boolean} silently - Go to the destination without event emission.
|
||||
*/
|
||||
go( control, silently ) {
|
||||
const destIndex = this.trim( this.parse( control ) );
|
||||
Components.Track.go( destIndex, this.rewind( destIndex ), silently );
|
||||
},
|
||||
|
||||
/**
|
||||
* Parse the given control and return the destination index for the track.
|
||||
*
|
||||
* @param {string} control - A control target pattern.
|
||||
*
|
||||
* @return {number} - A parsed target.
|
||||
*/
|
||||
parse( control ) {
|
||||
let index = Splide.index;
|
||||
|
||||
const matches = String( control ).match( /([+\-<>]+)(\d+)?/ );
|
||||
const indicator = matches ? matches[1] : '';
|
||||
const number = matches ? parseInt( matches[2] ) : 0;
|
||||
|
||||
switch ( indicator ) {
|
||||
case '+':
|
||||
index += number || 1;
|
||||
break;
|
||||
|
||||
case '-':
|
||||
index -= number || 1;
|
||||
break;
|
||||
|
||||
case '>':
|
||||
case '<':
|
||||
index = parsePage( number, index, indicator === '<' );
|
||||
break;
|
||||
|
||||
default:
|
||||
index = parseInt( control );
|
||||
}
|
||||
|
||||
return index;
|
||||
},
|
||||
|
||||
/**
|
||||
* Compute index from the given page number.
|
||||
*
|
||||
* @param {number} page - Page number.
|
||||
*
|
||||
* @return {number} - A computed page number.
|
||||
*/
|
||||
toIndex( page ) {
|
||||
if ( hasFocus() ) {
|
||||
return page;
|
||||
}
|
||||
|
||||
const length = Splide.length;
|
||||
const perPage = options.perPage;
|
||||
|
||||
let index = page * perPage;
|
||||
index = index - ( this.pageLength * perPage - length ) * floor( index / length );
|
||||
|
||||
// Adjustment for the last page.
|
||||
if ( length - perPage <= index && index < length ) {
|
||||
index = length - perPage;
|
||||
}
|
||||
|
||||
return index;
|
||||
},
|
||||
|
||||
/**
|
||||
* Compute page number from the given slide index.
|
||||
*
|
||||
* @param {number} index - Slide index.
|
||||
*
|
||||
* @return {number} - A computed page number.
|
||||
*/
|
||||
toPage( index ) {
|
||||
if ( hasFocus() ) {
|
||||
return index;
|
||||
}
|
||||
|
||||
const length = Splide.length;
|
||||
const perPage = options.perPage;
|
||||
|
||||
// Make the last "perPage" number of slides belong to the last page.
|
||||
if ( length - perPage <= index && index < length ) {
|
||||
return floor( ( length - 1 ) / perPage );
|
||||
}
|
||||
|
||||
return floor( index / perPage );
|
||||
},
|
||||
|
||||
/**
|
||||
* Trim the given index according to the current mode.
|
||||
* Index being returned could be less than 0 or greater than the length in Loop mode.
|
||||
*
|
||||
* @param {number} index - An index being trimmed.
|
||||
*
|
||||
* @return {number} - A trimmed index.
|
||||
*/
|
||||
trim( index ) {
|
||||
if ( ! isLoop ) {
|
||||
index = options.rewind ? this.rewind( index ) : between( index, 0, this.edgeIndex );
|
||||
}
|
||||
|
||||
return index;
|
||||
},
|
||||
|
||||
/**
|
||||
* Rewind the given index if it's out of range.
|
||||
*
|
||||
* @param {number} index - An index.
|
||||
*
|
||||
* @return {number} - A rewound index.
|
||||
*/
|
||||
rewind( index ) {
|
||||
const edge = this.edgeIndex;
|
||||
|
||||
if ( isLoop ) {
|
||||
while( index > edge ) {
|
||||
index -= edge + 1;
|
||||
}
|
||||
|
||||
while( index < 0 ) {
|
||||
index += edge + 1;
|
||||
}
|
||||
} else {
|
||||
if ( index > edge ) {
|
||||
index = 0;
|
||||
} else if ( index < 0 ) {
|
||||
index = edge;
|
||||
}
|
||||
}
|
||||
|
||||
return index;
|
||||
},
|
||||
|
||||
/**
|
||||
* Check if the direction is "rtl" or not.
|
||||
*
|
||||
* @return {boolean} - True if "rtl" or false if not.
|
||||
*/
|
||||
isRtl() {
|
||||
return options.direction === RTL;
|
||||
},
|
||||
|
||||
/**
|
||||
* Return the page length.
|
||||
*
|
||||
* @return {number} - Max page number.
|
||||
*/
|
||||
get pageLength() {
|
||||
const length = Splide.length;
|
||||
return hasFocus() ? length : Math.ceil( length / options.perPage );
|
||||
},
|
||||
|
||||
/**
|
||||
* Return the edge index.
|
||||
*
|
||||
* @return {number} - Edge index.
|
||||
*/
|
||||
get edgeIndex() {
|
||||
const length = Splide.length;
|
||||
|
||||
if ( ! length ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ( hasFocus() || options.isNavigation || isLoop ) {
|
||||
return length - 1;
|
||||
}
|
||||
|
||||
return length - options.perPage;
|
||||
},
|
||||
|
||||
/**
|
||||
* Return the index of the previous slide.
|
||||
*
|
||||
* @return {number} - The index of the previous slide if available. -1 otherwise.
|
||||
*/
|
||||
get prevIndex() {
|
||||
let prev = Splide.index - 1;
|
||||
|
||||
if ( isLoop || options.rewind ) {
|
||||
prev = this.rewind( prev );
|
||||
}
|
||||
|
||||
return prev > -1 ? prev : -1;
|
||||
},
|
||||
|
||||
/**
|
||||
* Return the index of the next slide.
|
||||
*
|
||||
* @return {number} - The index of the next slide if available. -1 otherwise.
|
||||
*/
|
||||
get nextIndex() {
|
||||
let next = Splide.index + 1;
|
||||
|
||||
if ( isLoop || options.rewind ) {
|
||||
next = this.rewind( next );
|
||||
}
|
||||
|
||||
return ( Splide.index < next && next <= this.edgeIndex ) || next === 0 ? next : -1;
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Listen to some events.
|
||||
*/
|
||||
function bind() {
|
||||
Splide
|
||||
.on( 'move', newIndex => { Splide.index = newIndex } )
|
||||
.on( 'updated refresh', newOptions => {
|
||||
options = newOptions || options;
|
||||
Splide.index = between( Splide.index, 0, Controller.edgeIndex );
|
||||
} );
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify if the focus option is available or not.
|
||||
*
|
||||
* @return {boolean} - True if a slider has the focus option.
|
||||
*/
|
||||
function hasFocus() {
|
||||
return options.focus !== false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the next or previous page index computed by the page number and current index.
|
||||
*
|
||||
* @param {number} number - Specify the page number.
|
||||
* @param {number} index - Current index.
|
||||
* @param {boolean} prev - Prev or next.
|
||||
*
|
||||
* @return {number} - Slide index.
|
||||
*/
|
||||
function parsePage( number, index, prev ) {
|
||||
if ( number > -1 ) {
|
||||
return Controller.toIndex( number );
|
||||
}
|
||||
|
||||
const perMove = options.perMove;
|
||||
const sign = prev ? -1 : 1;
|
||||
|
||||
if ( perMove ) {
|
||||
return index + perMove * sign;
|
||||
}
|
||||
|
||||
return Controller.toIndex( Controller.toPage( index ) + sign );
|
||||
}
|
||||
|
||||
return Controller;
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
/**
|
||||
* The component for change an img element to background image of its wrapper.
|
||||
*
|
||||
* @author Naotoshi Fujita
|
||||
* @copyright Naotoshi Fujita. All rights reserved.
|
||||
*/
|
||||
|
||||
import { applyStyle, child } from '../../utils/dom';
|
||||
|
||||
|
||||
/**
|
||||
* The component for change an img element to background image of its wrapper.
|
||||
*
|
||||
* @param {Splide} Splide - A Splide instance.
|
||||
* @param {Object} Components - An object containing components.
|
||||
*
|
||||
* @return {Object} - The component object.
|
||||
*/
|
||||
export default ( Splide, Components ) => {
|
||||
/**
|
||||
* Hold options.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
const options = Splide.options;
|
||||
|
||||
/**
|
||||
* Cover component object.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
const Cover = {
|
||||
/**
|
||||
* Required only when "cover" option is true.
|
||||
*
|
||||
* @type {boolean}
|
||||
*/
|
||||
required: options.cover,
|
||||
|
||||
/**
|
||||
* Called when the component is mounted.
|
||||
*/
|
||||
mount() {
|
||||
Splide.on( 'lazyload:loaded', img => { cover( img, false ) } );
|
||||
Splide.on( 'mounted updated refresh', () => apply( false ) );
|
||||
},
|
||||
|
||||
/**
|
||||
* Destroy.
|
||||
*/
|
||||
destroy() {
|
||||
apply( true );
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Apply "cover" to all slides.
|
||||
*
|
||||
* @param {boolean} uncover - If true, "cover" will be clear.
|
||||
*/
|
||||
function apply( uncover ) {
|
||||
Components.Elements.each( Slide => {
|
||||
const img = child( Slide.slide, 'IMG' ) || child( Slide.container, 'IMG' );
|
||||
|
||||
if ( img && img.src ) {
|
||||
cover( img, uncover );
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
/**
|
||||
* Set background image of the parent element, using source of the given image element.
|
||||
*
|
||||
* @param {Element} img - An image element.
|
||||
* @param {boolean} uncover - Reset "cover".
|
||||
*/
|
||||
function cover( img, uncover ) {
|
||||
applyStyle( img.parentElement, { background: uncover ? '' : `center/cover no-repeat url("${ img.src }")` } );
|
||||
applyStyle( img, { display: uncover ? '' : 'none' } );
|
||||
}
|
||||
|
||||
return Cover;
|
||||
}
|
||||
@@ -1,322 +0,0 @@
|
||||
/**
|
||||
* The component for supporting mouse drag and swipe.
|
||||
*
|
||||
* @author Naotoshi Fujita
|
||||
* @copyright Naotoshi Fujita. All rights reserved.
|
||||
*/
|
||||
|
||||
import { FADE, SLIDE } from '../../constants/types';
|
||||
import { TTB } from '../../constants/directions';
|
||||
import { MOVING } from '../../constants/states';
|
||||
import { between } from '../../utils/utils';
|
||||
import { each } from "../../utils/object";
|
||||
|
||||
const { abs } = Math;
|
||||
|
||||
/**
|
||||
* If the absolute velocity is greater thant this value,
|
||||
* a slider always goes to a different slide after drag, not allowed to stay on a current slide.
|
||||
*/
|
||||
const MIN_VELOCITY = 0.1;
|
||||
|
||||
/**
|
||||
* Adjust how much the track can be pulled on the first or last page.
|
||||
* The larger number this is, the farther the track moves.
|
||||
* This should be around 5 - 9.
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
const FRICTION_REDUCER = 7;
|
||||
|
||||
|
||||
/**
|
||||
* The component supporting mouse drag and swipe.
|
||||
*
|
||||
* @param {Splide} Splide - A Splide instance.
|
||||
* @param {Object} Components - An object containing components.
|
||||
*
|
||||
* @return {Object} - The component object.
|
||||
*/
|
||||
export default ( Splide, Components ) => {
|
||||
/**
|
||||
* Store the Move component.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
const Track = Components.Track;
|
||||
|
||||
/**
|
||||
* Store the Controller component.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
const Controller = Components.Controller;
|
||||
|
||||
/**
|
||||
* Coordinate of the track on starting drag.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
let startCoord;
|
||||
|
||||
/**
|
||||
* Analyzed info on starting drag.
|
||||
*
|
||||
* @type {Object|null}
|
||||
*/
|
||||
let startInfo;
|
||||
|
||||
/**
|
||||
* Analyzed info being updated while dragging/swiping.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
let currentInfo;
|
||||
|
||||
/**
|
||||
* Determine whether slides are being dragged or not.
|
||||
*
|
||||
* @type {boolean}
|
||||
*/
|
||||
let isDragging;
|
||||
|
||||
/**
|
||||
* Whether the slider direction is vertical or not.
|
||||
*
|
||||
* @type {boolean}
|
||||
*/
|
||||
const isVertical = Splide.options.direction === TTB;
|
||||
|
||||
/**
|
||||
* Axis for the direction.
|
||||
*
|
||||
* @type {string}
|
||||
*/
|
||||
const axis = isVertical ? 'y' : 'x';
|
||||
|
||||
/**
|
||||
* Drag component object.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
const Drag = {
|
||||
/**
|
||||
* Whether dragging is disabled or not.
|
||||
*
|
||||
* @type {boolean}
|
||||
*/
|
||||
disabled: false,
|
||||
|
||||
/**
|
||||
* Called when the component is mounted.
|
||||
*/
|
||||
mount() {
|
||||
const Elements = Components.Elements;
|
||||
const track = Elements.track;
|
||||
|
||||
Splide
|
||||
.on( 'touchstart mousedown', start, track )
|
||||
.on( 'touchmove mousemove', move, track, { passive: false } )
|
||||
.on( 'touchend touchcancel mouseleave mouseup dragend', end, track )
|
||||
.on( 'mounted refresh', () => {
|
||||
// Prevent dragging an image or anchor itself.
|
||||
each( Elements.list.querySelectorAll( 'img, a' ), elm => {
|
||||
Splide
|
||||
.off( 'dragstart', elm )
|
||||
.on( 'dragstart', e => { e.preventDefault() }, elm, { passive: false } );
|
||||
} );
|
||||
} )
|
||||
.on( 'mounted updated', () => {
|
||||
this.disabled = ! Splide.options.drag;
|
||||
} );
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Called when the track starts to be dragged.
|
||||
*
|
||||
* @param {TouchEvent|MouseEvent} e - TouchEvent or MouseEvent object.
|
||||
*/
|
||||
function start( e ) {
|
||||
if ( ! Drag.disabled && ! isDragging ) {
|
||||
// These prams are used to evaluate whether the slider should start moving.
|
||||
init( e );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize parameters.
|
||||
*
|
||||
* @param {TouchEvent|MouseEvent} e - TouchEvent or MouseEvent object.
|
||||
*/
|
||||
function init( e ) {
|
||||
startCoord = Track.toCoord( Track.position );
|
||||
startInfo = analyze( e, {} );
|
||||
currentInfo = startInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called while the track being dragged.
|
||||
*
|
||||
* @param {TouchEvent|MouseEvent} e - TouchEvent or MouseEvent object.
|
||||
*/
|
||||
function move( e ) {
|
||||
if ( startInfo ) {
|
||||
currentInfo = analyze( e, startInfo );
|
||||
|
||||
if ( isDragging ) {
|
||||
if ( e.cancelable ) {
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
if ( ! Splide.is( FADE ) ) {
|
||||
const position = startCoord[ axis ] + currentInfo.offset[ axis ];
|
||||
Track.translate( resist( position ) );
|
||||
}
|
||||
} else {
|
||||
if ( shouldMove( currentInfo ) ) {
|
||||
Splide.emit( 'drag', startInfo );
|
||||
isDragging = true;
|
||||
Track.cancel();
|
||||
|
||||
// These params are actual drag data.
|
||||
init( e );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether to start moving the track or not by drag angle.
|
||||
*
|
||||
* @param {Object} info - An information object.
|
||||
*
|
||||
* @return {boolean} - True if the track should be moved or false if not.
|
||||
*/
|
||||
function shouldMove( { offset } ) {
|
||||
if ( Splide.State.is( MOVING ) && Splide.options.waitForTransition ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let angle = Math.atan( abs( offset.y ) / abs( offset.x ) ) * 180 / Math.PI;
|
||||
|
||||
if ( isVertical ) {
|
||||
angle = 90 - angle;
|
||||
}
|
||||
|
||||
return angle < Splide.options.dragAngleThreshold;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resist dragging the track on the first/last page because there is no more.
|
||||
*
|
||||
* @param {number} position - A position being applied to the track.
|
||||
*
|
||||
* @return {Object} - Adjusted position.
|
||||
*/
|
||||
function resist( position ) {
|
||||
if ( Splide.is( SLIDE ) ) {
|
||||
const sign = Track.sign;
|
||||
const start = sign * Track.trim( Track.toPosition( 0 ) );
|
||||
const end = sign * Track.trim( Track.toPosition( Controller.edgeIndex ) );
|
||||
|
||||
position *= sign;
|
||||
|
||||
if ( position < start ) {
|
||||
position = start - FRICTION_REDUCER * Math.log( start - position );
|
||||
} else if ( position > end ) {
|
||||
position = end + FRICTION_REDUCER * Math.log( position - end );
|
||||
}
|
||||
|
||||
position *= sign;
|
||||
}
|
||||
|
||||
return position;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when dragging ends.
|
||||
*/
|
||||
function end() {
|
||||
startInfo = null;
|
||||
|
||||
if ( isDragging ) {
|
||||
Splide.emit( 'dragged', currentInfo );
|
||||
go( currentInfo );
|
||||
isDragging = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Go to the slide determined by the analyzed data.
|
||||
*
|
||||
* @param {Object} info - An info object.
|
||||
*/
|
||||
function go( info ) {
|
||||
const velocity = info.velocity[ axis ];
|
||||
const absV = abs( velocity );
|
||||
|
||||
if ( absV > 0 ) {
|
||||
const options = Splide.options;
|
||||
const index = Splide.index;
|
||||
const sign = velocity < 0 ? -1 : 1;
|
||||
|
||||
let destIndex = index;
|
||||
|
||||
if ( ! Splide.is( FADE ) ) {
|
||||
let destination = Track.position;
|
||||
|
||||
if ( absV > options.flickVelocityThreshold && abs( info.offset[ axis ] ) < options.swipeDistanceThreshold ) {
|
||||
destination += sign * Math.min(
|
||||
absV * options.flickPower,
|
||||
Components.Layout.size * ( options.flickMaxPages || 1 )
|
||||
);
|
||||
}
|
||||
|
||||
destIndex = Track.toIndex( destination );
|
||||
}
|
||||
|
||||
/*
|
||||
* Do not allow the track to go to a previous position if there is enough velocity.
|
||||
* Always use the adjacent index for the fade mode.
|
||||
*/
|
||||
if ( destIndex === index && absV > MIN_VELOCITY ) {
|
||||
destIndex = index + sign * Track.sign;
|
||||
}
|
||||
|
||||
if ( Splide.is( SLIDE ) ) {
|
||||
destIndex = between( destIndex, 0, Controller.edgeIndex );
|
||||
}
|
||||
|
||||
Controller.go( destIndex, options.isNavigation );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Analyze the given event object and return important information for handling swipe behavior.
|
||||
*
|
||||
* @param {Event} e - Touch or Mouse event object.
|
||||
* @param {Object} startInfo - Information analyzed on start for calculating difference from the current one.
|
||||
*
|
||||
* @return {Object} - An object containing analyzed information, such as offset, velocity, etc.
|
||||
*/
|
||||
function analyze( e, startInfo ) {
|
||||
const { timeStamp, touches } = e;
|
||||
const { clientX, clientY } = touches ? touches[0] : e;
|
||||
const { x: fromX = clientX, y: fromY = clientY } = startInfo.to || {};
|
||||
|
||||
const startTime = startInfo.time || 0;
|
||||
const offset = { x: clientX - fromX, y: clientY - fromY };
|
||||
const duration = timeStamp - startTime;
|
||||
const velocity = { x: offset.x / duration, y: offset.y / duration };
|
||||
|
||||
return {
|
||||
to: { x: clientX, y: clientY },
|
||||
offset,
|
||||
time: timeStamp,
|
||||
velocity,
|
||||
};
|
||||
}
|
||||
|
||||
return Drag;
|
||||
}
|
||||
@@ -1,291 +0,0 @@
|
||||
/**
|
||||
* The component for main elements.
|
||||
*
|
||||
* @author Naotoshi Fujita
|
||||
* @copyright Naotoshi Fujita. All rights reserved.
|
||||
*/
|
||||
|
||||
import Slide from './slide';
|
||||
import {
|
||||
find,
|
||||
addClass,
|
||||
removeClass,
|
||||
child,
|
||||
children,
|
||||
remove,
|
||||
append,
|
||||
before,
|
||||
domify,
|
||||
applyStyle,
|
||||
loaded,
|
||||
} from '../../utils/dom';
|
||||
import { exist } from '../../utils/error';
|
||||
import { pad } from "../../utils/utils";
|
||||
import { STATUS_CLASSES } from "../../constants/classes";
|
||||
|
||||
|
||||
/**
|
||||
* The property name for UID stored in a window object.
|
||||
*
|
||||
* @type {string}
|
||||
*/
|
||||
const UID_NAME = 'uid';
|
||||
|
||||
|
||||
/**
|
||||
* The component for main elements.
|
||||
*
|
||||
* @param {Splide} Splide - A Splide instance.
|
||||
* @param {Object} Components - An object containing components.
|
||||
*
|
||||
* @return {Object} - The component object.
|
||||
*/
|
||||
export default ( Splide, Components ) => {
|
||||
/**
|
||||
* Hold the root element.
|
||||
*
|
||||
* @type {Element}
|
||||
*/
|
||||
const root = Splide.root;
|
||||
|
||||
/**
|
||||
* Hold the class list.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
const classes = Splide.classes;
|
||||
|
||||
/**
|
||||
* Store Slide objects.
|
||||
*
|
||||
* @type {Array}
|
||||
*/
|
||||
let Slides = [];
|
||||
|
||||
/*
|
||||
* Assign unique ID to the root element if it doesn't have the one.
|
||||
* Note that IE doesn't support padStart() to fill the uid by 0.
|
||||
*/
|
||||
if ( ! root.id ) {
|
||||
window.splide = window.splide || {};
|
||||
let uid = window.splide[ UID_NAME ] || 0;
|
||||
window.splide[ UID_NAME ] = ++uid;
|
||||
root.id = `splide${ pad( uid ) }`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Elements component object.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
const Elements = {
|
||||
/**
|
||||
* Called when the component is mounted.
|
||||
* Collect main elements and store them as member properties.
|
||||
*/
|
||||
mount() {
|
||||
this.init();
|
||||
|
||||
Splide
|
||||
.on( 'refresh', () => {
|
||||
this.destroy();
|
||||
this.init();
|
||||
} ).on( 'updated', () => {
|
||||
removeClass( root, getClasses() );
|
||||
addClass( root, getClasses() );
|
||||
} );
|
||||
},
|
||||
|
||||
/**
|
||||
* Destroy.
|
||||
*/
|
||||
destroy() {
|
||||
Slides.forEach( Slide => { Slide.destroy() } );
|
||||
Slides = [];
|
||||
removeClass( root, getClasses() );
|
||||
},
|
||||
|
||||
/**
|
||||
* Initialization.
|
||||
*/
|
||||
init() {
|
||||
collect();
|
||||
addClass( root, getClasses() );
|
||||
|
||||
this.slides.forEach( ( slide, index ) => {
|
||||
this.register( slide, index, -1 );
|
||||
} );
|
||||
},
|
||||
|
||||
/**
|
||||
* Register a slide to create a Slide object and handle its behavior.
|
||||
*
|
||||
* @param {Element} slide - A slide element.
|
||||
* @param {number} index - A unique index. This can be negative.
|
||||
* @param {number} realIndex - A real index for clones. Set -1 for real slides.
|
||||
*/
|
||||
register( slide, index, realIndex ) {
|
||||
const SlideObject = Slide( Splide, index, realIndex, slide );
|
||||
SlideObject.mount();
|
||||
Slides.push( SlideObject );
|
||||
},
|
||||
|
||||
/**
|
||||
* Return the Slide object designated by the index.
|
||||
* Note that "find" is not supported by IE.
|
||||
*
|
||||
* @return {Object|undefined} - A Slide object if available. Undefined if not.
|
||||
*/
|
||||
getSlide( index ) {
|
||||
return Slides.filter( Slide => Slide.index === index )[0];
|
||||
},
|
||||
|
||||
/**
|
||||
* Return all Slide objects.
|
||||
*
|
||||
* @param {boolean} includeClones - Whether to include cloned slides or not.
|
||||
*
|
||||
* @return {Object[]} - Slide objects.
|
||||
*/
|
||||
getSlides( includeClones ) {
|
||||
return includeClones ? Slides : Slides.filter( Slide => ! Slide.isClone );
|
||||
},
|
||||
|
||||
/**
|
||||
* Return Slide objects belonging to the given page.
|
||||
*
|
||||
* @param {number} page - A page number.
|
||||
*
|
||||
* @return {Object[]} - An array containing Slide objects.
|
||||
*/
|
||||
getSlidesByPage( page ) {
|
||||
const idx = Components.Controller.toIndex( page );
|
||||
const options = Splide.options;
|
||||
const max = options.focus !== false ? 1 : options.perPage;
|
||||
|
||||
return Slides.filter( ( { index } ) => idx <= index && index < idx + max );
|
||||
},
|
||||
|
||||
/**
|
||||
* Insert a slide to a slider.
|
||||
* Need to refresh Splide after adding a slide.
|
||||
*
|
||||
* @param {Node|string} slide - A slide element to be added.
|
||||
* @param {number} index - A slide will be added at the position.
|
||||
* @param {Function} callback - Called right after the slide is added to the DOM tree.
|
||||
*/
|
||||
add( slide, index, callback ) {
|
||||
if ( typeof slide === 'string' ) {
|
||||
slide = domify( slide );
|
||||
}
|
||||
|
||||
if ( slide instanceof Element ) {
|
||||
const ref = this.slides[ index ];
|
||||
|
||||
// This will be removed in mount() of a Slide component.
|
||||
applyStyle( slide, { display: 'none' } );
|
||||
|
||||
if ( ref ) {
|
||||
before( slide, ref );
|
||||
this.slides.splice( index, 0, slide );
|
||||
} else {
|
||||
append( this.list, slide );
|
||||
this.slides.push( slide );
|
||||
}
|
||||
|
||||
loaded( slide, () => { callback && callback( slide ) } );
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Remove a slide from a slider.
|
||||
* Need to refresh Splide after removing a slide.
|
||||
*
|
||||
* @param index - Slide index.
|
||||
*/
|
||||
remove( index ) {
|
||||
remove( this.slides.splice( index, 1 )[0] );
|
||||
},
|
||||
|
||||
/**
|
||||
* Trigger the provided callback for each Slide object.
|
||||
*
|
||||
* @param {Function} callback - A callback function. The first argument will be the Slide object.
|
||||
*/
|
||||
each( callback ) {
|
||||
Slides.forEach( callback );
|
||||
},
|
||||
|
||||
/**
|
||||
* Return slides length without clones.
|
||||
*
|
||||
* @return {number} - Slide length.
|
||||
*/
|
||||
get length() {
|
||||
return this.slides.length;
|
||||
},
|
||||
|
||||
/**
|
||||
* Return "SlideObjects" length including clones.
|
||||
*
|
||||
* @return {number} - Slide length including clones.
|
||||
*/
|
||||
get total() {
|
||||
return Slides.length;
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Collect elements.
|
||||
*/
|
||||
function collect() {
|
||||
Elements.slider = child( root, classes.slider );
|
||||
Elements.track = find( root, `.${ classes.track }` );
|
||||
Elements.list = child( Elements.track, classes.list );
|
||||
|
||||
exist( Elements.track && Elements.list, 'Track or list was not found.' );
|
||||
|
||||
Elements.slides = children( Elements.list, classes.slide );
|
||||
|
||||
const arrows = findParts( classes.arrows );
|
||||
Elements.arrows = {
|
||||
prev: find( arrows, `.${ classes.prev }` ),
|
||||
next: find( arrows, `.${ classes.next }` ),
|
||||
};
|
||||
|
||||
const autoplay = findParts( classes.autoplay );
|
||||
Elements.bar = find( findParts( classes.progress ), `.${ classes.bar }` );
|
||||
Elements.play = find( autoplay, `.${ classes.play }` );
|
||||
Elements.pause = find( autoplay, `.${ classes.pause }` );
|
||||
|
||||
Elements.track.id = Elements.track.id || `${ root.id }-track`;
|
||||
Elements.list.id = Elements.list.id || `${ root.id }-list`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return class names for the root element.
|
||||
*/
|
||||
function getClasses() {
|
||||
const rootClass = classes.root;
|
||||
const options = Splide.options;
|
||||
|
||||
return [
|
||||
`${ rootClass }--${ options.type }`,
|
||||
`${ rootClass }--${ options.direction }`,
|
||||
options.drag ? `${ rootClass }--draggable` : '',
|
||||
options.isNavigation ? `${ rootClass }--nav` : '',
|
||||
STATUS_CLASSES.active,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Find parts only from children of the root or track.
|
||||
*
|
||||
* @return {Element} - A found element or undefined.
|
||||
*/
|
||||
function findParts( className ) {
|
||||
return child( root, className ) || child( Elements.slider, className );
|
||||
}
|
||||
|
||||
return Elements;
|
||||
}
|
||||
@@ -1,231 +0,0 @@
|
||||
/**
|
||||
* The sub component for handling each slide.
|
||||
*
|
||||
* @author Naotoshi Fujita
|
||||
* @copyright Naotoshi Fujita. All rights reserved.
|
||||
*/
|
||||
|
||||
import {
|
||||
child,
|
||||
addClass,
|
||||
removeClass,
|
||||
hasClass,
|
||||
getAttribute,
|
||||
setAttribute,
|
||||
removeAttribute,
|
||||
applyStyle,
|
||||
getRect,
|
||||
} from '../../utils/dom';
|
||||
import { FADE, SLIDE } from '../../constants/types';
|
||||
import { STATUS_CLASSES } from '../../constants/classes';
|
||||
import { values } from "../../utils/object";
|
||||
import { pad } from "../../utils/utils";
|
||||
import { TTB } from "../../constants/directions";
|
||||
|
||||
/**
|
||||
* Events for restoring original styles.
|
||||
*
|
||||
* @type {string}
|
||||
*/
|
||||
const STYLE_RESTORE_EVENTS = 'update.slide';
|
||||
|
||||
|
||||
/**
|
||||
* The sub component for handling each slide.
|
||||
*
|
||||
* @param {Splide} Splide - A Splide instance.
|
||||
* @param {number} index - An unique slide index.
|
||||
* @param {number} realIndex - Clones should pass a real slide index.
|
||||
* @param {Element} slide - A slide element.
|
||||
*
|
||||
* @return {Object} - The sub component object.
|
||||
*/
|
||||
export default ( Splide, index, realIndex, slide ) => {
|
||||
/**
|
||||
* Whether to update "is-active" class before or after transition.
|
||||
*
|
||||
* @type {boolean}
|
||||
*/
|
||||
const updateOnMove = Splide.options.updateOnMove;
|
||||
|
||||
/**
|
||||
* Events when the slide status is updated.
|
||||
* Append a namespace to remove listeners later.
|
||||
*
|
||||
* @type {string}
|
||||
*/
|
||||
const STATUS_UPDATE_EVENTS = 'ready.slide updated.slide resize.slide moved.slide'
|
||||
+ ( updateOnMove ? ' move.slide' : '' );
|
||||
|
||||
/**
|
||||
* Slide sub component object.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
const Slide = {
|
||||
/**
|
||||
* Slide element.
|
||||
*
|
||||
* @type {Element}
|
||||
*/
|
||||
slide,
|
||||
|
||||
/**
|
||||
* Slide index.
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
index,
|
||||
|
||||
/**
|
||||
* Real index for clones.
|
||||
*
|
||||
* @type {number}
|
||||
*/
|
||||
realIndex,
|
||||
|
||||
/**
|
||||
* Container element if available.
|
||||
*
|
||||
* @type {Element|undefined}
|
||||
*/
|
||||
container: child( slide, Splide.classes.container ),
|
||||
|
||||
/**
|
||||
* Whether this is a cloned slide or not.
|
||||
*
|
||||
* @type {boolean}
|
||||
*/
|
||||
isClone: realIndex > -1,
|
||||
|
||||
/**
|
||||
* Called when the component is mounted.
|
||||
*/
|
||||
mount() {
|
||||
if ( ! this.isClone ) {
|
||||
slide.id = `${ Splide.root.id }-slide${ pad( index + 1 ) }`;
|
||||
}
|
||||
|
||||
Splide
|
||||
.on( STATUS_UPDATE_EVENTS, () => this.update() )
|
||||
.on( STYLE_RESTORE_EVENTS, restoreStyles )
|
||||
.on( 'click', () => Splide.emit( 'click', this ), slide );
|
||||
|
||||
/*
|
||||
* Add "is-active" class to a clone element temporarily
|
||||
* and it will be removed on "moved" event.
|
||||
*/
|
||||
if ( updateOnMove ) {
|
||||
Splide.on( 'move.slide', newIndex => {
|
||||
if ( newIndex === realIndex ) {
|
||||
update( true, false );
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
// Make sure the slide is shown.
|
||||
applyStyle( slide, { display: '' } );
|
||||
|
||||
// Hold the original styles.
|
||||
this.styles = getAttribute( slide, 'style' ) || '';
|
||||
},
|
||||
|
||||
/**
|
||||
* Destroy.
|
||||
*/
|
||||
destroy() {
|
||||
Splide.off( STATUS_UPDATE_EVENTS ).off( STYLE_RESTORE_EVENTS ).off( 'click', slide );
|
||||
removeClass( slide, values( STATUS_CLASSES ) );
|
||||
restoreStyles();
|
||||
removeAttribute( this.container, 'style' );
|
||||
},
|
||||
|
||||
/**
|
||||
* Update active and visible status.
|
||||
*/
|
||||
update() {
|
||||
update( this.isActive(), false );
|
||||
update( this.isVisible(), true );
|
||||
},
|
||||
|
||||
/**
|
||||
* Check whether this slide is active or not.
|
||||
*
|
||||
* @return {boolean} - True if the slide is active or false if not.
|
||||
*/
|
||||
isActive() {
|
||||
return Splide.index === index;
|
||||
},
|
||||
|
||||
/**
|
||||
* Check whether this slide is visible in the viewport or not.
|
||||
*
|
||||
* @return {boolean} - True if the slide is visible or false if not.
|
||||
*/
|
||||
isVisible() {
|
||||
const active = this.isActive();
|
||||
|
||||
if ( Splide.is( FADE ) || active ) {
|
||||
return active;
|
||||
}
|
||||
|
||||
const trackRect = getRect( Splide.Components.Elements.track );
|
||||
const slideRect = getRect( slide );
|
||||
|
||||
if ( Splide.options.direction === TTB ) {
|
||||
return trackRect.top <= slideRect.top && slideRect.bottom <= trackRect.bottom;
|
||||
}
|
||||
|
||||
return trackRect.left <= slideRect.left && slideRect.right <= trackRect.right;
|
||||
},
|
||||
|
||||
/**
|
||||
* Calculate how far this slide is from another slide and
|
||||
* return true if the distance is within the given number.
|
||||
*
|
||||
* @param {number} from - Index of a target slide.
|
||||
* @param {number} within - True if the slide is within this number.
|
||||
*
|
||||
* @return {boolean} - True if the slide is within the number or false otherwise.
|
||||
*/
|
||||
isWithin( from, within ) {
|
||||
let diff = Math.abs( from - index );
|
||||
|
||||
if ( ! Splide.is( SLIDE ) && ! this.isClone ) {
|
||||
diff = Math.min( diff, Splide.length - diff );
|
||||
}
|
||||
|
||||
return diff < within;
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Update classes for activity or visibility.
|
||||
*
|
||||
* @param {boolean} active - Is active/visible or not.
|
||||
* @param {boolean} forVisibility - Toggle classes for activity or visibility.
|
||||
*/
|
||||
function update( active, forVisibility ) {
|
||||
const type = forVisibility ? 'visible' : 'active';
|
||||
const className = STATUS_CLASSES[ type ];
|
||||
|
||||
if ( active ) {
|
||||
addClass( slide, className );
|
||||
Splide.emit( `${ type }`, Slide );
|
||||
} else {
|
||||
if ( hasClass( slide, className ) ) {
|
||||
removeClass( slide, className );
|
||||
Splide.emit( `${ forVisibility ? 'hidden' : 'inactive' }`, Slide );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore the original styles.
|
||||
*/
|
||||
function restoreStyles() {
|
||||
setAttribute( slide, 'style', Slide.styles );
|
||||
}
|
||||
|
||||
return Slide;
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
/**
|
||||
* Export components.
|
||||
*
|
||||
* @author Naotoshi Fujita
|
||||
* @copyright Naotoshi Fujita. All rights reserved.
|
||||
*/
|
||||
|
||||
import Options from './options';
|
||||
import Elements from './elements';
|
||||
import Controller from './controller';
|
||||
import Track from './track';
|
||||
import Clones from './clones';
|
||||
import Layout from './layout';
|
||||
import Drag from './drag';
|
||||
import Click from './click';
|
||||
import Autoplay from './autoplay';
|
||||
import Cover from './cover';
|
||||
import Arrows from './arrows';
|
||||
import Pagination from './pagination';
|
||||
import LazyLoad from './lazyload';
|
||||
import Keyboard from './keyboard';
|
||||
import A11y from './a11y';
|
||||
import Sync from './sync';
|
||||
import Breakpoints from './breakpoints';
|
||||
|
||||
export const COMPLETE = {
|
||||
Options,
|
||||
Breakpoints,
|
||||
Controller,
|
||||
Elements,
|
||||
Track,
|
||||
Clones,
|
||||
Layout,
|
||||
Drag,
|
||||
Click,
|
||||
Autoplay,
|
||||
Cover,
|
||||
Arrows,
|
||||
Pagination,
|
||||
LazyLoad,
|
||||
Keyboard,
|
||||
Sync,
|
||||
A11y,
|
||||
};
|
||||
|
||||
export const LIGHT = {
|
||||
Options,
|
||||
Controller,
|
||||
Elements,
|
||||
Track,
|
||||
Clones,
|
||||
Layout,
|
||||
Drag,
|
||||
Click,
|
||||
Arrows,
|
||||
Pagination,
|
||||
A11y,
|
||||
};
|
||||
@@ -1,89 +0,0 @@
|
||||
/**
|
||||
* The component for controlling slides via keyboard.
|
||||
*
|
||||
* @author Naotoshi Fujita
|
||||
* @copyright Naotoshi Fujita. All rights reserved.
|
||||
*/
|
||||
|
||||
import { removeAttribute, setAttribute } from "../../utils/dom";
|
||||
import { TAB_INDEX } from "../../constants/a11y";
|
||||
|
||||
/**
|
||||
* Map a key to a slide control.
|
||||
*
|
||||
* @type {Object}
|
||||
*/
|
||||
const KEY_MAP = {
|
||||
ltr: {
|
||||
ArrowLeft : '<',
|
||||
ArrowRight: '>',
|
||||
// For IE.
|
||||
Left : '<',
|
||||
Right: '>',
|
||||
},
|
||||
rtl: {
|
||||
ArrowLeft : '>',
|
||||
ArrowRight: '<',
|
||||
// For IE.
|
||||
Left : '>',
|
||||
Right: '<',
|
||||
},
|
||||
ttb: {
|
||||
ArrowUp : '<',
|
||||
ArrowDown: '>',
|
||||
// For IE.
|
||||
Up : '<',
|
||||
Down: '>',
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* The component for controlling slides via keyboard.
|
||||
*
|
||||
* @param {Splide} Splide - A Splide instance.
|
||||
*
|
||||
* @return {Object} - The component object.
|
||||
*/
|
||||
export default ( Splide ) => {
|
||||
/**
|
||||
* Hold the target element.
|
||||
*
|
||||
* @type {Element|Document|undefined}
|
||||
*/
|
||||
let target;
|
||||
|
||||
return {
|
||||
/**
|
||||
* Called when the component is mounted.
|
||||
*/
|
||||
mount() {
|
||||
Splide.on( 'mounted updated', () => {
|
||||
const options = Splide.options;
|
||||
const root = Splide.root;
|
||||
const map = KEY_MAP[ options.direction ];
|
||||
const keyboard = options.keyboard;
|
||||
|
||||
if ( target ) {
|
||||
Splide.off( 'keydown', target );
|
||||
removeAttribute( root, TAB_INDEX );
|
||||
}
|
||||
|
||||
if ( keyboard ) {
|
||||
if ( keyboard === 'focused' ) {
|
||||
target = root;
|
||||
setAttribute( root, TAB_INDEX, 0 );
|
||||
} else {
|
||||
target = document;
|
||||
}
|
||||
|
||||
Splide.on( 'keydown', e => {
|
||||
if ( map[ e.key ] ) {
|
||||
Splide.go( map[ e.key ] );
|
||||
}
|
||||
}, target );
|
||||
}
|
||||
} );
|
||||
},
|
||||
};
|
||||
}
|
||||