UPDATE: Build system

This commit is contained in:
Tony Air 2020-05-15 00:17:10 +07:00
parent 4559e2cdc7
commit 09893e4670
11 changed files with 491 additions and 745 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
node_modules
yarn-error.log
package-lock.json
pnpm-lock.yaml

2
.npmrc Executable file
View File

@ -0,0 +1,2 @@
registry=https://npm.pkg.github.com/a2nt
registry=https://registry.npmjs.org/

299
dist/css/app.css vendored
View File

@ -1,301 +1,4 @@
.meta-lightbox-overlay {
position: fixed;
top: 0;
left: 0;
z-index: 99998;
width: 100%;
height: 100%;
overflow: hidden;
visibility: hidden;
opacity: 0;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.meta-lightbox-overlay.meta-lightbox-open {
visibility: visible;
opacity: 1;
}
.meta-lightbox-wrap {
position: absolute;
top: 10%;
bottom: 10%;
left: 10%;
right: 10%;
}
.meta-lightbox-content {
width: 100%;
height: 100%;
}
.meta-lightbox-content .meta-lightbox-zoom-wrapper {
display: block;
height: 100%;
width: 100%;
}
.meta-lightbox-content .meta-lightbox-zoom-wrapper:after {
color: #fff;
font: normal normal normal 14px/1 FontAwesome;
content: '\f00e';
position: absolute;
right: 1em;
bottom: 1em;
right: 1em;
text-shadow: 1px 1px 1px #000;
}
.meta-lightbox-title-wrap {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
z-index: 99999;
text-align: center;
}
.meta-lightbox-nav {
display: none;
}
.meta-lightbox-prev {
position: absolute;
top: 50%;
left: 0;
}
.meta-lightbox-next {
position: absolute;
top: 50%;
right: 0;
}
.meta-lightbox-close {
position: absolute;
top: 2%;
right: 2%;
}
.meta-lightbox-image {
text-align: center;
}
.meta-lightbox-image img {
max-width: 100%;
max-height: 100%;
width: auto;
height: auto;
vertical-align: middle;
}
.meta-lightbox-content iframe {
width: 100%;
height: 100%;
}
.meta-lightbox-inline,
.meta-lightbox-ajax {
max-height: 100%;
overflow: auto;
}
.meta-lightbox-error {
display: table;
text-align: center;
width: 100%;
height: 100%;
color: #fff;
text-shadow: 0 1px 1px #000;
}
.meta-lightbox-error p {
display: table-cell;
vertical-align: middle;
}
/* Effects
**********************************************/
.meta-lightbox-notouch .meta-lightbox-effect-fade,
.meta-lightbox-notouch .meta-lightbox-effect-fadeScale,
.meta-lightbox-notouch .meta-lightbox-effect-slideLeft,
.meta-lightbox-notouch .meta-lightbox-effect-slideRight,
.meta-lightbox-notouch .meta-lightbox-effect-slideUp,
.meta-lightbox-notouch .meta-lightbox-effect-slideDown,
.meta-lightbox-notouch .meta-lightbox-effect-fall {
-webkit-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
/* fadeScale */
.meta-lightbox-effect-fadeScale .meta-lightbox-wrap {
-webkit-transition: all 0.3s;
transition: all 0.3s;
-webkit-transform: scale(0.7);
transform: scale(0.7);
}
.meta-lightbox-effect-fadeScale.meta-lightbox-open .meta-lightbox-wrap {
-webkit-transform: scale(1);
transform: scale(1);
}
/* slideLeft / slideRight / slideUp / slideDown */
.meta-lightbox-effect-slideLeft .meta-lightbox-wrap,
.meta-lightbox-effect-slideRight .meta-lightbox-wrap,
.meta-lightbox-effect-slideUp .meta-lightbox-wrap,
.meta-lightbox-effect-slideDown .meta-lightbox-wrap {
-webkit-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
}
.meta-lightbox-effect-slideLeft .meta-lightbox-wrap {
-webkit-transform: translateX(-10%);
transform: translateX(-10%);
}
.meta-lightbox-effect-slideRight .meta-lightbox-wrap {
-webkit-transform: translateX(10%);
transform: translateX(10%);
}
.meta-lightbox-effect-slideLeft.meta-lightbox-open .meta-lightbox-wrap,
.meta-lightbox-effect-slideRight.meta-lightbox-open .meta-lightbox-wrap {
-webkit-transform: translateX(0);
transform: translateX(0);
}
.meta-lightbox-effect-slideDown .meta-lightbox-wrap {
-webkit-transform: translateY(-10%);
transform: translateY(-10%);
}
.meta-lightbox-effect-slideUp .meta-lightbox-wrap {
-webkit-transform: translateY(10%);
transform: translateY(10%);
}
.meta-lightbox-effect-slideUp.meta-lightbox-open .meta-lightbox-wrap,
.meta-lightbox-effect-slideDown.meta-lightbox-open .meta-lightbox-wrap {
-webkit-transform: translateY(0);
transform: translateY(0);
}
/* fall */
.meta-lightbox-body-effect-fall .meta-lightbox-effect-fall {
-webkit-perspective: 1000px;
perspective: 1000px;
}
.meta-lightbox-effect-fall .meta-lightbox-wrap {
-webkit-transition: all 0.3s ease-out;
transition: all 0.3s ease-out;
-webkit-transform: translateZ(300px);
transform: translateZ(300px);
}
.meta-lightbox-effect-fall.meta-lightbox-open .meta-lightbox-wrap {
-webkit-transform: translateZ(0);
transform: translateZ(0);
}
.meta-lightbox-theme-default.meta-lightbox-overlay {
background: #666;
background: rgba(0, 0, 0, 0.6);
}
.meta-lightbox-theme-default .meta-lightbox-nav {
top: 10%;
width: 20%;
height: 80%;
background-repeat: no-repeat;
background-position: 50% 50%;
opacity: 0.5;
color: #fff;
font-size: 3em;
text-decoration: none;
text-shadow: 1px 1px 0 #000;
}
@media (min-width: 576px) {
.meta-lightbox-theme-default .meta-lightbox-nav {
width: 8%;
}
}
.meta-lightbox-theme-default .meta-lightbox-nav .fa {
position: absolute;
top: 50%;
left: 50%;
margin-top: -1em;
margin-left: -0.2em;
}
.meta-lightbox-theme-default .meta-lightbox-nav:hover {
color: #007bff;
opacity: 1;
background-color: rgba(0, 0, 0, 0.5);
}
.meta-lightbox-theme-default .meta-lightbox-close {
display: block;
opacity: 0.5;
color: #fff;
text-decoration: none;
font-size: 2em;
text-shadow: 1px 1px 0 #000;
text-align: center;
width: 1.2em;
height: 1.2em;
}
.meta-lightbox-theme-default .meta-lightbox-close:focus {
color: #007bff;
opacity: 1;
background-color: rgba(0, 0, 0, 0.5);
}
.meta-lightbox-theme-default .meta-lightbox-title {
background: #000;
color: #fff;
padding: 7px 15px;
}
.meta-lightbox-theme-default .meta-lightbox-ajax,
.meta-lightbox-theme-default .meta-lightbox-inline {
background: #fff;
padding: 2em;
-webkit-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.6);
box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.6);
}
@media (max-width: 576px) {
.meta-lightbox-wrap {
top: 5px !important;
bottom: 5px;
left: 5px;
right: 5px;
}
.meta-lightbox-theme-default .meta-lightbox-nav {
height: 100%;
opacity: 1;
font-size: 2em;
}
.meta-lightbox-theme-default .meta-lightbox-nav .fa {
margin-left: -0.4em;
}
.meta-lightbox-theme-default .meta-lightbox-close {
opacity: 1;
}
}
.meta-lightbox-overlay{position:fixed;top:0;left:0;z-index:99998;width:100%;height:100%;overflow:hidden;visibility:hidden;opacity:0;box-sizing:border-box}.meta-lightbox-overlay.meta-lightbox-open{visibility:visible;opacity:1}.meta-lightbox-wrap{position:absolute;top:10%;bottom:10%;left:10%;right:10%}.meta-lightbox-content{width:100%;height:100%}.meta-lightbox-content .meta-lightbox-zoom-wrapper{display:block;height:100%;width:100%}.meta-lightbox-content .meta-lightbox-zoom-wrapper:after{color:#fff;font:normal normal normal 14px/1 FontAwesome;content:'\f00e';position:absolute;right:1em;bottom:1em;right:1em;text-shadow:1px 1px 1px #000}.meta-lightbox-title-wrap{position:absolute;bottom:0;left:0;width:100%;z-index:99999;text-align:center}.meta-lightbox-nav{display:none}.meta-lightbox-prev{position:absolute;top:50%;left:0}.meta-lightbox-next{position:absolute;top:50%;right:0}.meta-lightbox-close{position:absolute;top:2%;right:2%}.meta-lightbox-image{text-align:center}.meta-lightbox-image img{max-width:100%;max-height:100%;width:auto;height:auto;vertical-align:middle}.meta-lightbox-content iframe{width:100%;height:100%}.meta-lightbox-inline,.meta-lightbox-ajax{max-height:100%;overflow:auto}.meta-lightbox-error{display:table;text-align:center;width:100%;height:100%;color:#fff;text-shadow:0 1px 1px #000}.meta-lightbox-error p{display:table-cell;vertical-align:middle}.meta-lightbox-notouch .meta-lightbox-effect-fade,.meta-lightbox-notouch .meta-lightbox-effect-fadeScale,.meta-lightbox-notouch .meta-lightbox-effect-slideLeft,.meta-lightbox-notouch .meta-lightbox-effect-slideRight,.meta-lightbox-notouch .meta-lightbox-effect-slideUp,.meta-lightbox-notouch .meta-lightbox-effect-slideDown,.meta-lightbox-notouch .meta-lightbox-effect-fall{transition:all 0.2s ease-in-out}.meta-lightbox-effect-fadeScale .meta-lightbox-wrap{transition:all 0.3s;transform:scale(0.7)}.meta-lightbox-effect-fadeScale.meta-lightbox-open .meta-lightbox-wrap{transform:scale(1)}.meta-lightbox-effect-slideLeft .meta-lightbox-wrap,.meta-lightbox-effect-slideRight .meta-lightbox-wrap,.meta-lightbox-effect-slideUp .meta-lightbox-wrap,.meta-lightbox-effect-slideDown .meta-lightbox-wrap{transition:all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9)}.meta-lightbox-effect-slideLeft .meta-lightbox-wrap{transform:translateX(-10%)}.meta-lightbox-effect-slideRight .meta-lightbox-wrap{transform:translateX(10%)}.meta-lightbox-effect-slideLeft.meta-lightbox-open .meta-lightbox-wrap,.meta-lightbox-effect-slideRight.meta-lightbox-open .meta-lightbox-wrap{transform:translateX(0)}.meta-lightbox-effect-slideDown .meta-lightbox-wrap{transform:translateY(-10%)}.meta-lightbox-effect-slideUp .meta-lightbox-wrap{transform:translateY(10%)}.meta-lightbox-effect-slideUp.meta-lightbox-open .meta-lightbox-wrap,.meta-lightbox-effect-slideDown.meta-lightbox-open .meta-lightbox-wrap{transform:translateY(0)}.meta-lightbox-body-effect-fall .meta-lightbox-effect-fall{perspective:1000px}.meta-lightbox-effect-fall .meta-lightbox-wrap{transition:all 0.3s ease-out;transform:translateZ(300px)}.meta-lightbox-effect-fall.meta-lightbox-open .meta-lightbox-wrap{transform:translateZ(0)}.meta-lightbox-theme-default.meta-lightbox-overlay{background:#666;background:rgba(0,0,0,0.6)}.meta-lightbox-theme-default .meta-lightbox-nav{top:10%;width:20%;height:80%;background-repeat:no-repeat;background-position:50% 50%;opacity:0.5;color:#fff;font-size:3em;text-decoration:none;text-shadow:1px 1px 0 #000}@media (min-width: 576px){.meta-lightbox-theme-default .meta-lightbox-nav{width:8%}}.meta-lightbox-theme-default .meta-lightbox-nav .fa{position:absolute;top:50%;left:50%;margin-top:-1em;margin-left:-0.2em}.meta-lightbox-theme-default .meta-lightbox-nav:hover{color:#007bff;opacity:1;background-color:rgba(0,0,0,0.5)}.meta-lightbox-theme-default .meta-lightbox-close{display:block;opacity:0.5;color:#fff;text-decoration:none;font-size:2em;text-shadow:1px 1px 0 #000;text-align:center;width:1.2em;height:1.2em}.meta-lightbox-theme-default .meta-lightbox-close:focus{color:#007bff;opacity:1;background-color:rgba(0,0,0,0.5)}.meta-lightbox-theme-default .meta-lightbox-title{background:#000;color:#fff;padding:7px 15px}.meta-lightbox-theme-default .meta-lightbox-ajax,.meta-lightbox-theme-default .meta-lightbox-inline{background:#fff;padding:2em;box-shadow:0px 1px 1px rgba(0,0,0,0.6)}@media (max-width: 576px){.meta-lightbox-wrap{top:5px !important;bottom:5px;left:5px;right:5px}.meta-lightbox-theme-default .meta-lightbox-nav{height:100%;opacity:1;font-size:2em}.meta-lightbox-theme-default .meta-lightbox-nav .fa{margin-left:-0.4em}.meta-lightbox-theme-default .meta-lightbox-close{opacity:1}}
/*# sourceMappingURL=app.css.map*/

View File

@ -1 +1 @@
{"version":3,"sources":["webpack:///./src/scss/meta-lightbox.scss","webpack:///index.scss","webpack:///./src/scss/meta-lightbox-theme.scss"],"names":[],"mappings":"AAEA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;UAAA;ACAJ;;ADVA;EAaQ;EACA;ACCR;;ADGA;EACI;EACA;EACA;EACA;EACA;ACAJ;;ADGA;EACI;EACA;ACAJ;;ADFA;EAKQ;EACA;EACA;ACCR;;ADRA;EAUY;EACA;EACA;EACA;EACA;EACA;EACA;EACA;ACEZ;;ADGA;EACI;EACA;EACA;EACA;EACA;EACA;ACAJ;;ADGA;EACI;ACAJ;;ADGA;EACI;EACA;EACA;ACAJ;;ADGA;EACI;EACA;EACA;ACAJ;;ADGA;EACI;EACA;EACA;ACAJ;;ADGA;EACI;ACAJ;;ADDA;EAIQ;EACA;EACA;EACA;EACA;ACCR;;ADGA;EACI;EACA;ACAJ;;ADGA;;EAEI;EACA;ACAJ;;ADGA;EACI;EACA;EACA;EACA;EACA;EACA;ACAJ;;ADGA;EACI;EACA;ACAJ;;ADGA;+CCA+C;;ADE/C;;;;;;;EAOI;EAAA;ACEJ;;ADCA;;AACA;EACI;EAAA;EACA;UAAA;ACKJ;;ADFA;EACI;UAAA;ACMJ;;ADHA;;AACA;;;;EAII;EAAA;ACQJ;;ADLA;EACI;UAAA;ACSJ;;ADNA;EACI;UAAA;ACUJ;;ADPA;;EAEI;UAAA;ACWJ;;ADRA;EACI;UAAA;ACYJ;;ADTA;EACI;UAAA;ACaJ;;ADVA;;EAEI;UAAA;ACcJ;;ADXA;;AACA;EACI;UAAA;ACgBJ;;ADbA;EACI;EAAA;EACA;UAAA;ACkBJ;;ADfA;EACI;UAAA;ACmBJ;;AC5MA;EACI;EACA;AD+MJ;;AC5MA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AD+MJ;;AC7MI;EAZJ;IAaQ;EDiNN;AACF;;AC/NA;EAgBQ;EACA;EACA;EACA;EACA;ADmNR;;ACvOA;EAwBQ;EACA;EACA;ADmNR;;AC/MA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;ADkNJ;;AC3NA;EAYQ;EACA;EACA;ADmNR;;AC/MA;EACI;EACA;EACA;ADkNJ;;AC/MA;;EAEI;EACA;EACA;UAAA;ADmNJ;;AChNA;EACI;IACI;IACA;IACA;IACA;EDmNN;;EChNE;IACI;IACA;IACA;EDmNN;;ECtNE;IAMQ;EDoNV;;EChNE;IACI;EDmNN;AACF","file":"css/app.css","sourcesContent":["@import '_variables';\n\n.meta-lightbox-overlay {\n position: fixed;\n top: 0;\n left: 0;\n z-index: 99998;\n width: 100%;\n height: 100%;\n overflow: hidden;\n visibility: hidden;\n opacity: 0;\n box-sizing: border-box;\n\n &.meta-lightbox-open {\n visibility: visible;\n opacity: 1;\n }\n}\n\n.meta-lightbox-wrap {\n position: absolute;\n top: 10%;\n bottom: 10%;\n left: 10%;\n right: 10%;\n}\n\n.meta-lightbox-content {\n width: 100%;\n height: 100%;\n\n .meta-lightbox-zoom-wrapper {\n display: block;\n height: 100%;\n width: 100%;\n\n &:after {\n color: $white;\n font: normal normal normal 14px/1 FontAwesome;\n content: '\\f00e';\n position: absolute;\n right: 1em;\n bottom: 1em;\n right: 1em;\n text-shadow: 1px 1px 1px $black;\n }\n }\n}\n\n.meta-lightbox-title-wrap {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n z-index: 99999;\n text-align: center;\n}\n\n.meta-lightbox-nav {\n display: none;\n}\n\n.meta-lightbox-prev {\n position: absolute;\n top: 50%;\n left: 0;\n}\n\n.meta-lightbox-next {\n position: absolute;\n top: 50%;\n right: 0;\n}\n\n.meta-lightbox-close {\n position: absolute;\n top: 2%;\n right: 2%;\n}\n\n.meta-lightbox-image {\n text-align: center;\n\n img {\n max-width: 100%;\n max-height: 100%;\n width: auto;\n height: auto;\n vertical-align: middle;\n }\n}\n\n.meta-lightbox-content iframe {\n width: 100%;\n height: 100%;\n}\n\n.meta-lightbox-inline,\n.meta-lightbox-ajax {\n max-height: 100%;\n overflow: auto;\n}\n\n.meta-lightbox-error {\n display: table;\n text-align: center;\n width: 100%;\n height: 100%;\n color: $white;\n text-shadow: 0 1px 1px $black;\n}\n\n.meta-lightbox-error p {\n display: table-cell;\n vertical-align: middle;\n}\n\n/* Effects\n **********************************************/\n.meta-lightbox-notouch .meta-lightbox-effect-fade,\n.meta-lightbox-notouch .meta-lightbox-effect-fadeScale,\n.meta-lightbox-notouch .meta-lightbox-effect-slideLeft,\n.meta-lightbox-notouch .meta-lightbox-effect-slideRight,\n.meta-lightbox-notouch .meta-lightbox-effect-slideUp,\n.meta-lightbox-notouch .meta-lightbox-effect-slideDown,\n.meta-lightbox-notouch .meta-lightbox-effect-fall {\n transition: all 0.2s ease-in-out;\n}\n\n/* fadeScale */\n.meta-lightbox-effect-fadeScale .meta-lightbox-wrap {\n transition: all 0.3s;\n transform: scale(0.7);\n}\n\n.meta-lightbox-effect-fadeScale.meta-lightbox-open .meta-lightbox-wrap {\n transform: scale(1);\n}\n\n/* slideLeft / slideRight / slideUp / slideDown */\n.meta-lightbox-effect-slideLeft .meta-lightbox-wrap,\n.meta-lightbox-effect-slideRight .meta-lightbox-wrap,\n.meta-lightbox-effect-slideUp .meta-lightbox-wrap,\n.meta-lightbox-effect-slideDown .meta-lightbox-wrap {\n transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);\n}\n\n.meta-lightbox-effect-slideLeft .meta-lightbox-wrap {\n transform: translateX(-10%);\n}\n\n.meta-lightbox-effect-slideRight .meta-lightbox-wrap {\n transform: translateX(10%);\n}\n\n.meta-lightbox-effect-slideLeft.meta-lightbox-open .meta-lightbox-wrap,\n.meta-lightbox-effect-slideRight.meta-lightbox-open .meta-lightbox-wrap {\n transform: translateX(0);\n}\n\n.meta-lightbox-effect-slideDown .meta-lightbox-wrap {\n transform: translateY(-10%);\n}\n\n.meta-lightbox-effect-slideUp .meta-lightbox-wrap {\n transform: translateY(10%);\n}\n\n.meta-lightbox-effect-slideUp.meta-lightbox-open .meta-lightbox-wrap,\n.meta-lightbox-effect-slideDown.meta-lightbox-open .meta-lightbox-wrap {\n transform: translateY(0);\n}\n\n/* fall */\n.meta-lightbox-body-effect-fall .meta-lightbox-effect-fall {\n perspective: 1000px;\n}\n\n.meta-lightbox-effect-fall .meta-lightbox-wrap {\n transition: all 0.3s ease-out;\n transform: translateZ(300px);\n}\n\n.meta-lightbox-effect-fall.meta-lightbox-open .meta-lightbox-wrap {\n transform: translateZ(0);\n}\n\n@import 'meta-lightbox-theme';\n",".meta-lightbox-overlay {\n position: fixed;\n top: 0;\n left: 0;\n z-index: 99998;\n width: 100%;\n height: 100%;\n overflow: hidden;\n visibility: hidden;\n opacity: 0;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n.meta-lightbox-overlay.meta-lightbox-open {\n visibility: visible;\n opacity: 1;\n}\n\n.meta-lightbox-wrap {\n position: absolute;\n top: 10%;\n bottom: 10%;\n left: 10%;\n right: 10%;\n}\n\n.meta-lightbox-content {\n width: 100%;\n height: 100%;\n}\n\n.meta-lightbox-content .meta-lightbox-zoom-wrapper {\n display: block;\n height: 100%;\n width: 100%;\n}\n\n.meta-lightbox-content .meta-lightbox-zoom-wrapper:after {\n color: #fff;\n font: normal normal normal 14px/1 FontAwesome;\n content: '\\f00e';\n position: absolute;\n right: 1em;\n bottom: 1em;\n right: 1em;\n text-shadow: 1px 1px 1px #000;\n}\n\n.meta-lightbox-title-wrap {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n z-index: 99999;\n text-align: center;\n}\n\n.meta-lightbox-nav {\n display: none;\n}\n\n.meta-lightbox-prev {\n position: absolute;\n top: 50%;\n left: 0;\n}\n\n.meta-lightbox-next {\n position: absolute;\n top: 50%;\n right: 0;\n}\n\n.meta-lightbox-close {\n position: absolute;\n top: 2%;\n right: 2%;\n}\n\n.meta-lightbox-image {\n text-align: center;\n}\n\n.meta-lightbox-image img {\n max-width: 100%;\n max-height: 100%;\n width: auto;\n height: auto;\n vertical-align: middle;\n}\n\n.meta-lightbox-content iframe {\n width: 100%;\n height: 100%;\n}\n\n.meta-lightbox-inline,\n.meta-lightbox-ajax {\n max-height: 100%;\n overflow: auto;\n}\n\n.meta-lightbox-error {\n display: table;\n text-align: center;\n width: 100%;\n height: 100%;\n color: #fff;\n text-shadow: 0 1px 1px #000;\n}\n\n.meta-lightbox-error p {\n display: table-cell;\n vertical-align: middle;\n}\n\n/* Effects\n **********************************************/\n\n.meta-lightbox-notouch .meta-lightbox-effect-fade,\n.meta-lightbox-notouch .meta-lightbox-effect-fadeScale,\n.meta-lightbox-notouch .meta-lightbox-effect-slideLeft,\n.meta-lightbox-notouch .meta-lightbox-effect-slideRight,\n.meta-lightbox-notouch .meta-lightbox-effect-slideUp,\n.meta-lightbox-notouch .meta-lightbox-effect-slideDown,\n.meta-lightbox-notouch .meta-lightbox-effect-fall {\n -webkit-transition: all 0.2s ease-in-out;\n transition: all 0.2s ease-in-out;\n}\n\n/* fadeScale */\n\n.meta-lightbox-effect-fadeScale .meta-lightbox-wrap {\n -webkit-transition: all 0.3s;\n transition: all 0.3s;\n -webkit-transform: scale(0.7);\n transform: scale(0.7);\n}\n\n.meta-lightbox-effect-fadeScale.meta-lightbox-open .meta-lightbox-wrap {\n -webkit-transform: scale(1);\n transform: scale(1);\n}\n\n/* slideLeft / slideRight / slideUp / slideDown */\n\n.meta-lightbox-effect-slideLeft .meta-lightbox-wrap,\n.meta-lightbox-effect-slideRight .meta-lightbox-wrap,\n.meta-lightbox-effect-slideUp .meta-lightbox-wrap,\n.meta-lightbox-effect-slideDown .meta-lightbox-wrap {\n -webkit-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);\n transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);\n}\n\n.meta-lightbox-effect-slideLeft .meta-lightbox-wrap {\n -webkit-transform: translateX(-10%);\n transform: translateX(-10%);\n}\n\n.meta-lightbox-effect-slideRight .meta-lightbox-wrap {\n -webkit-transform: translateX(10%);\n transform: translateX(10%);\n}\n\n.meta-lightbox-effect-slideLeft.meta-lightbox-open .meta-lightbox-wrap,\n.meta-lightbox-effect-slideRight.meta-lightbox-open .meta-lightbox-wrap {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n}\n\n.meta-lightbox-effect-slideDown .meta-lightbox-wrap {\n -webkit-transform: translateY(-10%);\n transform: translateY(-10%);\n}\n\n.meta-lightbox-effect-slideUp .meta-lightbox-wrap {\n -webkit-transform: translateY(10%);\n transform: translateY(10%);\n}\n\n.meta-lightbox-effect-slideUp.meta-lightbox-open .meta-lightbox-wrap,\n.meta-lightbox-effect-slideDown.meta-lightbox-open .meta-lightbox-wrap {\n -webkit-transform: translateY(0);\n transform: translateY(0);\n}\n\n/* fall */\n\n.meta-lightbox-body-effect-fall .meta-lightbox-effect-fall {\n -webkit-perspective: 1000px;\n perspective: 1000px;\n}\n\n.meta-lightbox-effect-fall .meta-lightbox-wrap {\n -webkit-transition: all 0.3s ease-out;\n transition: all 0.3s ease-out;\n -webkit-transform: translateZ(300px);\n transform: translateZ(300px);\n}\n\n.meta-lightbox-effect-fall.meta-lightbox-open .meta-lightbox-wrap {\n -webkit-transform: translateZ(0);\n transform: translateZ(0);\n}\n\n.meta-lightbox-theme-default.meta-lightbox-overlay {\n background: #666;\n background: rgba(0, 0, 0, 0.6);\n}\n\n.meta-lightbox-theme-default .meta-lightbox-nav {\n top: 10%;\n width: 20%;\n height: 80%;\n background-repeat: no-repeat;\n background-position: 50% 50%;\n opacity: 0.5;\n color: #fff;\n font-size: 3em;\n text-decoration: none;\n text-shadow: 1px 1px 0 #000;\n}\n\n@media (min-width: 576px) {\n .meta-lightbox-theme-default .meta-lightbox-nav {\n width: 8%;\n }\n}\n\n.meta-lightbox-theme-default .meta-lightbox-nav .fa {\n position: absolute;\n top: 50%;\n left: 50%;\n margin-top: -1em;\n margin-left: -0.2em;\n}\n\n.meta-lightbox-theme-default .meta-lightbox-nav:hover {\n color: #007bff;\n opacity: 1;\n background-color: rgba(0, 0, 0, 0.5);\n}\n\n.meta-lightbox-theme-default .meta-lightbox-close {\n display: block;\n opacity: 0.5;\n color: #fff;\n text-decoration: none;\n font-size: 2em;\n text-shadow: 1px 1px 0 #000;\n text-align: center;\n width: 1.2em;\n height: 1.2em;\n}\n\n.meta-lightbox-theme-default .meta-lightbox-close:focus {\n color: #007bff;\n opacity: 1;\n background-color: rgba(0, 0, 0, 0.5);\n}\n\n.meta-lightbox-theme-default .meta-lightbox-title {\n background: #000;\n color: #fff;\n padding: 7px 15px;\n}\n\n.meta-lightbox-theme-default .meta-lightbox-ajax,\n.meta-lightbox-theme-default .meta-lightbox-inline {\n background: #fff;\n padding: 2em;\n -webkit-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.6);\n box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.6);\n}\n\n@media (max-width: 576px) {\n .meta-lightbox-wrap {\n top: 5px !important;\n bottom: 5px;\n left: 5px;\n right: 5px;\n }\n\n .meta-lightbox-theme-default .meta-lightbox-nav {\n height: 100%;\n opacity: 1;\n font-size: 2em;\n }\n\n .meta-lightbox-theme-default .meta-lightbox-nav .fa {\n margin-left: -0.4em;\n }\n\n .meta-lightbox-theme-default .meta-lightbox-close {\n opacity: 1;\n }\n}\n\n",".meta-lightbox-theme-default.meta-lightbox-overlay {\n background: #666;\n background: rgba(0, 0, 0, 0.6);\n}\n\n.meta-lightbox-theme-default .meta-lightbox-nav {\n top: 10%;\n width: 20%;\n height: 80%;\n background-repeat: no-repeat;\n background-position: 50% 50%;\n opacity: 0.5;\n color: $white;\n font-size: 3em;\n text-decoration: none;\n text-shadow: 1px 1px 0 $black;\n\n @media (min-width: map-get($grid-breakpoints, 'sm')) {\n width: 8%;\n }\n .fa {\n position: absolute;\n top: 50%;\n left: 50%;\n margin-top: -1em;\n margin-left: -0.2em;\n }\n\n &:hover {\n color: $lightbox-link-hover-color;\n opacity: 1;\n background-color: transparentize($black, 0.5);\n }\n}\n\n.meta-lightbox-theme-default .meta-lightbox-close {\n display: block;\n opacity: 0.5;\n color: $white;\n text-decoration: none;\n font-size: 2em;\n text-shadow: 1px 1px 0 $black;\n text-align: center;\n width: 1.2em;\n height: 1.2em;\n\n &:focus {\n color: $lightbox-link-hover-color;\n opacity: 1;\n background-color: transparentize($black, 0.5);\n }\n}\n\n.meta-lightbox-theme-default .meta-lightbox-title {\n background: $black;\n color: $white;\n padding: 7px 15px;\n}\n\n.meta-lightbox-theme-default .meta-lightbox-ajax,\n.meta-lightbox-theme-default .meta-lightbox-inline {\n background: $white;\n padding: 2em;\n box-shadow: 0px 1px 1px transparentize($black, 0.4);\n}\n\n@media (max-width: $lightbox-breakpoint) {\n .meta-lightbox-wrap {\n top: 5px !important;\n bottom: 5px;\n left: 5px;\n right: 5px;\n }\n\n .meta-lightbox-theme-default .meta-lightbox-nav {\n height: 100%;\n opacity: 1;\n font-size: 2em;\n\n .fa {\n margin-left: -0.4em;\n }\n }\n\n .meta-lightbox-theme-default .meta-lightbox-close {\n opacity: 1;\n }\n}\n"],"sourceRoot":""}
{"version":3,"sources":["webpack:///meta-lightbox.scss","webpack:///_variables.scss","webpack:///meta-lightbox-theme.scss"],"names":[],"mappings":"AAEA,uBACI,cAAe,CACf,KAAM,CACN,MAAO,CACP,aAAc,CACd,UAAW,CACX,WAAY,CACZ,eAAgB,CAChB,iBAAkB,CAClB,SAAU,CACV,qBAAsB,CAV1B,0CAaQ,kBAAmB,CACnB,SAAU,CACb,oBAID,iBAAkB,CAClB,OAAQ,CACR,UAAW,CACX,QAAS,CACT,SAAU,CACb,uBAGG,UAAW,CACX,WAAY,CAFhB,mDAKQ,aAAc,CACd,WAAY,CACZ,UAAW,CAPnB,yDAUY,UCtCA,CDuCA,4CAA6C,CAC7C,eAAgB,CAChB,iBAAkB,CAClB,SAAU,CACV,UAAW,CACX,SAAU,CACV,4BC5CA,CD6CH,0BAKL,iBAAkB,CAClB,QAAS,CACT,MAAO,CACP,UAAW,CACX,aAAc,CACd,iBAAkB,CACrB,mBAGG,YAAa,CAChB,oBAGG,iBAAkB,CAClB,OAAQ,CACR,MAAO,CACV,oBAGG,iBAAkB,CAClB,OAAQ,CACR,OAAQ,CACX,qBAGG,iBAAkB,CAClB,MAAO,CACP,QAAS,CACZ,qBAGG,iBAAkB,CADtB,yBAIQ,cAAe,CACf,eAAgB,CAChB,UAAW,CACX,WAAY,CACZ,qBAAsB,CACzB,8BAID,UAAW,CACX,WAAY,CACf,0CAIG,eAAgB,CAChB,aAAc,CACjB,qBAGG,aAAc,CACd,iBAAkB,CAClB,UAAW,CACX,WAAY,CACZ,UC7GQ,CD8GR,0BC7GQ,CD8GX,uBAGG,kBAAmB,CACnB,qBAAsB,CACzB,sXAWG,+BAAgC,CACnC,oDAIG,mBAAoB,CACpB,oBAAqB,CACxB,uEAGG,kBAAmB,CACtB,+MAOG,qDAAsD,CACzD,oDAGG,0BAA2B,CAC9B,qDAGG,yBAA0B,CAC7B,+IAIG,uBAAwB,CAC3B,oDAGG,0BAA2B,CAC9B,kDAGG,yBAA0B,CAC7B,4IAIG,uBAAwB,CAC3B,2DAIG,kBAAmB,CACtB,+CAGG,4BAA6B,CAC7B,2BAA4B,CAC/B,kEAGG,uBAAwB,CAC3B,mDEzLG,eAAgB,CAChB,0BAA8B,CACjC,gDAGG,OAAQ,CACR,SAAU,CACV,UAAW,CACX,2BAA4B,CAC5B,2BAA4B,CAC5B,WAAY,CACZ,UDZQ,CCaR,aAAc,CACd,oBAAqB,CACrB,0BDdQ,CCgBR,0BAZJ,gDAaQ,QAAS,CAehB,CA5BD,oDAgBQ,iBAAkB,CAClB,OAAQ,CACR,QAAS,CACT,eAAgB,CAChB,kBAAmB,CApB3B,sDAwBQ,aD3B2B,CC4B3B,SAAU,CACV,gCAA6C,CAChD,kDAID,aAAc,CACd,WAAY,CACZ,UDtCQ,CCuCR,oBAAqB,CACrB,aAAc,CACd,0BDxCQ,CCyCR,iBAAkB,CAClB,WAAY,CACZ,YAAa,CATjB,wDAYQ,aD7C2B,CC8C3B,SAAU,CACV,gCAA6C,CAChD,kDAID,eDrDQ,CCsDR,UDvDQ,CCwDR,gBAAiB,CACpB,oGAIG,eD7DQ,CC8DR,WAAY,CACZ,sCAAmD,CACtD,0BAGG,oBACI,kBAAmB,CACnB,UAAW,CACX,QAAS,CACT,SAAU,CACb,gDAGG,WAAY,CACZ,SAAU,CACV,aAAc,CAHlB,oDAMQ,kBAAmB,CACtB,kDAID,SAAU,CACb","file":"css/app.css","sourcesContent":["@import '_variables';\n\n.meta-lightbox-overlay {\n position: fixed;\n top: 0;\n left: 0;\n z-index: 99998;\n width: 100%;\n height: 100%;\n overflow: hidden;\n visibility: hidden;\n opacity: 0;\n box-sizing: border-box;\n\n &.meta-lightbox-open {\n visibility: visible;\n opacity: 1;\n }\n}\n\n.meta-lightbox-wrap {\n position: absolute;\n top: 10%;\n bottom: 10%;\n left: 10%;\n right: 10%;\n}\n\n.meta-lightbox-content {\n width: 100%;\n height: 100%;\n\n .meta-lightbox-zoom-wrapper {\n display: block;\n height: 100%;\n width: 100%;\n\n &:after {\n color: $white;\n font: normal normal normal 14px/1 FontAwesome;\n content: '\\f00e';\n position: absolute;\n right: 1em;\n bottom: 1em;\n right: 1em;\n text-shadow: 1px 1px 1px $black;\n }\n }\n}\n\n.meta-lightbox-title-wrap {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n z-index: 99999;\n text-align: center;\n}\n\n.meta-lightbox-nav {\n display: none;\n}\n\n.meta-lightbox-prev {\n position: absolute;\n top: 50%;\n left: 0;\n}\n\n.meta-lightbox-next {\n position: absolute;\n top: 50%;\n right: 0;\n}\n\n.meta-lightbox-close {\n position: absolute;\n top: 2%;\n right: 2%;\n}\n\n.meta-lightbox-image {\n text-align: center;\n\n img {\n max-width: 100%;\n max-height: 100%;\n width: auto;\n height: auto;\n vertical-align: middle;\n }\n}\n\n.meta-lightbox-content iframe {\n width: 100%;\n height: 100%;\n}\n\n.meta-lightbox-inline,\n.meta-lightbox-ajax {\n max-height: 100%;\n overflow: auto;\n}\n\n.meta-lightbox-error {\n display: table;\n text-align: center;\n width: 100%;\n height: 100%;\n color: $white;\n text-shadow: 0 1px 1px $black;\n}\n\n.meta-lightbox-error p {\n display: table-cell;\n vertical-align: middle;\n}\n\n/* Effects\n **********************************************/\n.meta-lightbox-notouch .meta-lightbox-effect-fade,\n.meta-lightbox-notouch .meta-lightbox-effect-fadeScale,\n.meta-lightbox-notouch .meta-lightbox-effect-slideLeft,\n.meta-lightbox-notouch .meta-lightbox-effect-slideRight,\n.meta-lightbox-notouch .meta-lightbox-effect-slideUp,\n.meta-lightbox-notouch .meta-lightbox-effect-slideDown,\n.meta-lightbox-notouch .meta-lightbox-effect-fall {\n transition: all 0.2s ease-in-out;\n}\n\n/* fadeScale */\n.meta-lightbox-effect-fadeScale .meta-lightbox-wrap {\n transition: all 0.3s;\n transform: scale(0.7);\n}\n\n.meta-lightbox-effect-fadeScale.meta-lightbox-open .meta-lightbox-wrap {\n transform: scale(1);\n}\n\n/* slideLeft / slideRight / slideUp / slideDown */\n.meta-lightbox-effect-slideLeft .meta-lightbox-wrap,\n.meta-lightbox-effect-slideRight .meta-lightbox-wrap,\n.meta-lightbox-effect-slideUp .meta-lightbox-wrap,\n.meta-lightbox-effect-slideDown .meta-lightbox-wrap {\n transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);\n}\n\n.meta-lightbox-effect-slideLeft .meta-lightbox-wrap {\n transform: translateX(-10%);\n}\n\n.meta-lightbox-effect-slideRight .meta-lightbox-wrap {\n transform: translateX(10%);\n}\n\n.meta-lightbox-effect-slideLeft.meta-lightbox-open .meta-lightbox-wrap,\n.meta-lightbox-effect-slideRight.meta-lightbox-open .meta-lightbox-wrap {\n transform: translateX(0);\n}\n\n.meta-lightbox-effect-slideDown .meta-lightbox-wrap {\n transform: translateY(-10%);\n}\n\n.meta-lightbox-effect-slideUp .meta-lightbox-wrap {\n transform: translateY(10%);\n}\n\n.meta-lightbox-effect-slideUp.meta-lightbox-open .meta-lightbox-wrap,\n.meta-lightbox-effect-slideDown.meta-lightbox-open .meta-lightbox-wrap {\n transform: translateY(0);\n}\n\n/* fall */\n.meta-lightbox-body-effect-fall .meta-lightbox-effect-fall {\n perspective: 1000px;\n}\n\n.meta-lightbox-effect-fall .meta-lightbox-wrap {\n transition: all 0.3s ease-out;\n transform: translateZ(300px);\n}\n\n.meta-lightbox-effect-fall.meta-lightbox-open .meta-lightbox-wrap {\n transform: translateZ(0);\n}\n\n@import 'meta-lightbox-theme';\n","$white: #fff !default;\n$black: #000 !default;\n$lightbox-link-hover-color: #007bff !default;\n$lightbox-breakpoint: 576px !default;\n\n$grid-breakpoints: (\n xs: 0,\n sm: 576px,\n md: 768px,\n lg: 992px,\n xl: 1200px,\n xxl: 1390px,\n xxxl: 1590px\n) !default;\n$container-max-widths: (\n sm: 540px,\n md: 720px,\n lg: 960px,\n xl: 1140px,\n xxl: 1330px,\n xxxl: 1560px\n) !default;\n",".meta-lightbox-theme-default.meta-lightbox-overlay {\n background: #666;\n background: rgba(0, 0, 0, 0.6);\n}\n\n.meta-lightbox-theme-default .meta-lightbox-nav {\n top: 10%;\n width: 20%;\n height: 80%;\n background-repeat: no-repeat;\n background-position: 50% 50%;\n opacity: 0.5;\n color: $white;\n font-size: 3em;\n text-decoration: none;\n text-shadow: 1px 1px 0 $black;\n\n @media (min-width: map-get($grid-breakpoints, 'sm')) {\n width: 8%;\n }\n .fa {\n position: absolute;\n top: 50%;\n left: 50%;\n margin-top: -1em;\n margin-left: -0.2em;\n }\n\n &:hover {\n color: $lightbox-link-hover-color;\n opacity: 1;\n background-color: transparentize($black, 0.5);\n }\n}\n\n.meta-lightbox-theme-default .meta-lightbox-close {\n display: block;\n opacity: 0.5;\n color: $white;\n text-decoration: none;\n font-size: 2em;\n text-shadow: 1px 1px 0 $black;\n text-align: center;\n width: 1.2em;\n height: 1.2em;\n\n &:focus {\n color: $lightbox-link-hover-color;\n opacity: 1;\n background-color: transparentize($black, 0.5);\n }\n}\n\n.meta-lightbox-theme-default .meta-lightbox-title {\n background: $black;\n color: $white;\n padding: 7px 15px;\n}\n\n.meta-lightbox-theme-default .meta-lightbox-ajax,\n.meta-lightbox-theme-default .meta-lightbox-inline {\n background: $white;\n padding: 2em;\n box-shadow: 0px 1px 1px transparentize($black, 0.4);\n}\n\n@media (max-width: $lightbox-breakpoint) {\n .meta-lightbox-wrap {\n top: 5px !important;\n bottom: 5px;\n left: 5px;\n right: 5px;\n }\n\n .meta-lightbox-theme-default .meta-lightbox-nav {\n height: 100%;\n opacity: 1;\n font-size: 2em;\n\n .fa {\n margin-left: -0.4em;\n }\n }\n\n .meta-lightbox-theme-default .meta-lightbox-close {\n opacity: 1;\n }\n}\n"],"sourceRoot":""}

2
dist/js/app.js vendored
View File

@ -1,3 +1,3 @@
/*! For license information please see app.js.LICENSE.txt */
!function(t){var e={};function o(a){if(e[a])return e[a].exports;var i=e[a]={i:a,l:!1,exports:{}};return t[a].call(i.exports,i,i.exports,o),i.l=!0,i.exports}o.m=t,o.c=e,o.d=function(t,e,a){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},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(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(o.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)o.d(a,i,function(e){return t[e]}.bind(null,i));return a},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="/mnt/data/srv/dist/repositories/meta-lightbox/dist",o(o.s="./src/js/index.js")}({"./src/js/index.js":function(t,e,o){"use strict";o.r(e);o("./src/scss/index.scss"),o("./src/js/meta-lightbox.js")},"./src/js/meta-lightbox.js":function(t,e){function o(t){return(o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t,e,a){var i={effect:"fade",theme:"default",keyboardNav:!0,clickOverlayToClose:!0,onInit:function(){},beforeShowLightbox:function(){},afterShowLightbox:function(t){},beforeHideLightbox:function(){},afterHideLightbox:function(){},onPrev:function(t){},onNext:function(t){},errorMessage:"The requested content cannot be loaded. Please try again later."};function n(e,o){this.options=t.extend({},i,o),this._defaults=i,this._name="metaLightbox",this.init()}n.prototype={init:function(){var e=this,o=t("html");this.ajaxLoaded=!1,a.MetaLightbox=this,o.hasClass("meta-lightbox-notouch")||o.addClass("meta-lightbox-notouch"),"ontouchstart"in a&&o.removeClass("meta-lightbox-notouch"),t(a).on("click",'[data-toggle="lightbox"],[data-lightbox-gallery]',(function(t){return t.preventDefault(),t.stopPropagation(),e.showLightbox(this),!1})),this.options.keyboardNav&&t("body").off("keyup").on("keyup",(function(o){var a=o.keyCode?o.keyCode:o.which;27===a&&e.destructLightbox(),37===a&&t(".meta-lightbox-prev").trigger("click"),39===a&&t(".meta-lightbox-next").trigger("click")})),this.options.onInit.call(this)},showLightbox:function(e){this.el=e,this.$el=t(this.el);var o,a,i,n,s=this;this.options.beforeShowLightbox.call(this),(o=this.constructLightbox())&&(a=o.find(".meta-lightbox-content"))&&(i=this.$el,t("body").addClass("meta-lightbox-body-effect-".concat(this.options.effect)),this.processContent(a,i),this.$el.data("lightbox-gallery")&&(1===(n=t('[data-lightbox-gallery="'.concat(this.$el.data("lightbox-gallery"),'"]'))).length?t(".meta-lightbox-nav").hide():t(".meta-lightbox-nav").show(),t(".meta-lightbox-prev").off("click").on("click",(function(e){e.preventDefault();var o=n.index(i);i=n.eq(o-1),t(i).length||(i=n.last()),s.processContent(a,i),s.options.onPrev.call(this,[i])})),t(".meta-lightbox-next").off("click").on("click",(function(e){e.preventDefault();var o=n.index(i);i=n.eq(o+1),t(i).length||(i=n.first()),s.processContent(a,i),s.options.onNext.call(this,[i])}))),setTimeout((function(){o.addClass("meta-lightbox-open"),s.options.afterShowLightbox.call(this,[o])}),1))},processContent:function(i,n){var s,l,r,c,h,g,f=this;href=n.attr("href"),href||(href=n.data("href")),i.html("").addClass("meta-lightbox-loading"),this.isHidpi()&&n.data("lightbox-hidpi")&&(href=n.data("lightbox-hidpi")),null!=href.match(/\.(jpeg|jpg|gif|png)$/i)?((s=t("<img>",{src:href})).on("load",(function(){var o=t('<div class="meta-lightbox-image"></div>'),a=t(".meta-lightbox-content"),n=t('<span class="meta-lightbox-zoom-wrapper"></span>');n.append(s),o.append(n),o.css({"line-height":"".concat(a.height(),"px"),height:"".concat(a.height(),"px")}),t(e).resize((function(){o.css({"line-height":"".concat(a.height(),"px"),height:"".concat(a.height(),"px")})})),"undefined"!==typeof n.zoom&&n.zoom(),i.html(o).removeClass("meta-lightbox-loading"),f.contentLoaded()})),s.on("error",(function(){var e=t('<div class="meta-lightbox-error"><p>'.concat(f.options.errorMessage,"</p></div>"));i.html(e).removeClass("meta-lightbox-loading"),f.contentLoaded()})),n.data("title")?f.setTitle(n.data("title")):n.attr("title")?f.setTitle(n.attr("title")):t(".meta-lightbox-title-wrap").html(""),"function"===typeof ga&&ga("send","event","meta","Image Click",href)):(l=href.match(/(youtube|youtube-nocookie|youtu|vimeo)\.(com|be)\/(watch\?v=([\w-]+)|([\w-]+))/))?(r="",c="meta-lightbox-video","youtube"==l[1]&&(r="https://www.youtube.com/embed/".concat(l[4]),c="meta-lightbox-youtube"),"youtu"==l[1]&&(r="https://www.youtube.com/embed/".concat(l[3]),c="meta-lightbox-youtube"),"youtube-nocookie"==l[1]&&(r="https://www.youtube-nocookie.com/embed/".concat(l[4]),c="nivo-lightbox-youtube"),"vimeo"==l[1]&&(r="https://player.vimeo.com/video/".concat(l[3]),c="meta-lightbox-vimeo"),r&&(h=t("<iframe>",{src:r,class:c,frameborder:0,vspace:0,hspace:0,scrolling:"auto"}),i.html(h),h.on("load",(function(){i.removeClass("meta-lightbox-loading"),f.contentLoaded()}))),n.data("title")?f.setTitle(n.data("title")):n.attr("title")?f.setTitle(n.attr("title")):t(".meta-lightbox-title-wrap").html(""),"function"===typeof ga&&ga("send","event","meta","Video Click",l)):"#"==href.substring(0,1)?(t(href).length?((g=t('<div class="meta-lightbox-inline" />')).append(t(href).clone().show()),g.outerHeight()<i.height()&&g.css({position:"relative",top:"50%","margin-top":"".concat(-g.outerHeight()/2,"px")}),t(e).resize((function(){g.outerHeight()<i.height()&&g.css({position:"relative",top:"50%","margin-top":"".concat(-g.outerHeight()/2,"px")})})),i.html(g).removeClass("meta-lightbox-loading"),f.contentLoaded()):(g=t('<div class="meta-lightbox-error"><p>'.concat(f.options.errorMessage,"</p></div>")),i.html(g).removeClass("meta-lightbox-loading"),f.contentLoaded()),t(".meta-lightbox-title-wrap").html(""),"function"===typeof ga&&ga("send","event","meta","inline HTML click",href)):t.ajax({sync:!1,async:!0,url:href,dataType:"html",method:"GET",cache:!1,statusCode:{404:function(){console.log("page not found"),e.location.href=url},302:function(){console.log("redirect 302"),e.location.href=url}},error:function(e){console.log("AJAX request failure.".concat(e.statusText));var o=t('<div class="meta-lightbox-error"><p>'.concat(f.options.errorMessage,"</p></div>"));i.html(o).removeClass("meta-lightbox-loading"),f.contentLoaded(),"function"===typeof ga&&ga("send","event","error","AJAX ERROR",e.statusText)},success:function(n,s,l){try{var r=t.parseJSON(n);if("object"===o(r)){if("object"===o(r.regions)&&"undefinded"!==typeof r.regions.LayoutAjax)(g=t('<div class="meta-lightbox-ajax" />')).html(r.regions.LayoutAjax),i.html(g).removeClass("meta-lightbox-loading");var c=l.getResponseHeader("X-Title"),h=l.getResponseHeader("X-Link");c&&c.length&&h&&h.length&&h!==e.location.href&&h.substring(0,h.indexOf("#"))!==e.location.href.replace(t("base").attr("href"),"/")&&(t(".meta-lightbox-ajax").data("curr-title",a.title),t(".meta-lightbox-ajax").data("curr-link",e.location.href),"undefined"!==typeof e.localStorage&&"/"!==h&&e.localStorage.setItem("current-page",h),a.URL!==h&&a.URL!==t("base").attr("href")+h&&a.URL!=="".concat(t("base").attr("href"),"/").concat(h)&&e.history.pushState({title:c,page:h,ajax:"true"},c,h),t(".meta-lightbox-title-wrap").html(""),"function"===typeof ga&&(ga("set",{page:h.replace(t("base").attr("href"),""),title:c}),ga("send","pageview")))}}catch(d){var g;(g=t('<div class="meta-lightbox-ajax" />')).append(n),i.html(g).removeClass("meta-lightbox-loading")}g.outerHeight()<i.height()&&g.css({position:"relative",top:"50%","margin-top":"".concat(-g.outerHeight()/2,"px")}),t(e).resize((function(){g.outerHeight()<i.height()&&g.css({position:"relative",top:"50%","margin-top":"".concat(-g.outerHeight()/2,"px")})})),setTimeout((function(){t(e).resize(),"function"===typeof e.imagesLoaded&&e.imagesLoaded().then((function(){t(e).resize()}))}),500),f.contentLoaded()}})},setTitle:function(e){var o=t("<div>",{class:"meta-lightbox-title"});o.text(e),t(".meta-lightbox-title-wrap").html(o)},contentLoaded:function(){setTimeout((function(){t(e).trigger("meta-lightbox-loaded")}),1),setTimeout((function(){t("body").addClass("meta-lightbox-body-effect-fade")}),600)},constructLightbox:function(){var e=this,o=t("<div>",{class:"meta-lightbox-overlay meta-lightbox-theme-".concat(this.options.theme," meta-lightbox-effect-").concat(this.options.effect)}),a=t("<div>",{class:"meta-lightbox-wrap"}),i=t("<div>",{class:"meta-lightbox-content"}),n=t('<a href="#" class="meta-lightbox-nav meta-lightbox-prev"><i class="fas fa fa-chevron-left"></i> <span class="sr-only">Previous</span></a><a href="#" class="meta-lightbox-nav meta-lightbox-next"><i class="fa fas fa-chevron-right"></i> <span class="sr-only">Next</span></a>'),s=t('<a href="#" class="meta-lightbox-close fas fa fa-times" title="Close"><span class="sr-only">Close</span></a>'),l=t("<div>",{class:"meta-lightbox-title-wrap"}),r=t(".meta-lightbox-overlay");return r.length?r:(a.append(i),a.append(l),o.append(a),o.append(n),o.append(s),t("body").append(o),e.options.clickOverlayToClose&&o.on("click",(function(o){var a=t(o.target);(a.hasClass("meta-lightbox-zoom-wrapper")||a.hasClass("meta-lightbox-content")||a.hasClass("meta-lightbox-wrap")||a.hasClass("meta-lightbox-image")||a.hasClass("meta-lightbox-overlay"))&&e.destructLightbox()})),s.on("click",(function(t){t.preventDefault(),e.destructLightbox()})),o)},destructLightbox:function(){var o=t(".meta-lightbox-overlay");this.options.beforeHideLightbox.call(this);var i=t(".meta-lightbox-ajax").data("curr-title"),n=t(".meta-lightbox-ajax").data("curr-link");i&&n&&("undefined"!==typeof e.localStorage&&"/"!==n&&e.localStorage.setItem("current-page",n),a.URL!==n&&a.URL!==t("base").attr("href")+n&&a.URL!=="".concat(t("base").attr("href"),"/").concat(n)&&e.history.replaceState({title:i,page:n,ajax:"true"},i,n)),o.removeClass("meta-lightbox-open"),t(".meta-lightbox-nav").hide(),t("body").removeClass("meta-lightbox-body-effect-".concat(this.options.effect)),t(".meta-lightbox-content .meta-lightbox-zoom-wrapper").trigger("zoom.destroy"),t(".meta-lightbox-prev").off("click"),t(".meta-lightbox-next").off("click"),t(".meta-lightbox-content").empty(),t("body").removeClass("meta-lightbox-body-effect-fade"),this.options.afterHideLightbox.call(this)},isHidpi:function(){return e.devicePixelRatio>1||e.matchMedia&&e.matchMedia("(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)").matches}},t.fn.metaLightbox=function(e){return this.each((function(){t.data(this,"metaLightbox")||t.data(this,"metaLightbox",new n(this,e))}))},t(a).metaLightbox()}(jQuery,this,document)},"./src/scss/index.scss":function(t,e){}});
!function(t){var e={};function o(a){if(e[a])return e[a].exports;var i=e[a]={i:a,l:!1,exports:{}};return t[a].call(i.exports,i,i.exports,o),i.l=!0,i.exports}o.m=t,o.c=e,o.d=function(t,e,a){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},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(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(o.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)o.d(a,i,function(e){return t[e]}.bind(null,i));return a},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="/mnt/data/srv/dist/repositories/meta-lightbox/dist",o(o.s="./src/js/app.js")}({"./src/js/app.js":function(t,e,o){"use strict";o.r(e);o("./src/scss/app.scss"),o("./src/js/meta-lightbox.js")},"./src/js/meta-lightbox.js":function(t,e){function o(t){return(o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t,e,a){var i={effect:"fade",theme:"default",keyboardNav:!0,clickOverlayToClose:!0,onInit:function(){},beforeShowLightbox:function(){},afterShowLightbox:function(t){},beforeHideLightbox:function(){},afterHideLightbox:function(){},onPrev:function(t){},onNext:function(t){},errorMessage:"The requested content cannot be loaded. Please try again later."};function n(e,o){this.options=t.extend({},i,o),this._defaults=i,this._name="metaLightbox",this.init()}n.prototype={init:function(){var e=this,o=t("html");this.ajaxLoaded=!1,a.MetaLightbox=this,o.hasClass("meta-lightbox-notouch")||o.addClass("meta-lightbox-notouch"),"ontouchstart"in a&&o.removeClass("meta-lightbox-notouch"),t(a).on("click",'[data-toggle="lightbox"],[data-lightbox-gallery]',(function(t){return t.preventDefault(),t.stopPropagation(),e.showLightbox(this),!1})),this.options.keyboardNav&&t("body").off("keyup").on("keyup",(function(o){var a=o.keyCode?o.keyCode:o.which;27===a&&e.destructLightbox(),37===a&&t(".meta-lightbox-prev").trigger("click"),39===a&&t(".meta-lightbox-next").trigger("click")})),this.options.onInit.call(this)},showLightbox:function(e){this.el=e,this.$el=t(this.el);var o,a,i,n,s=this;this.options.beforeShowLightbox.call(this),(o=this.constructLightbox())&&(a=o.find(".meta-lightbox-content"))&&(i=this.$el,t("body").addClass("meta-lightbox-body-effect-".concat(this.options.effect)),this.processContent(a,i),this.$el.data("lightbox-gallery")&&(1===(n=t('[data-lightbox-gallery="'.concat(this.$el.data("lightbox-gallery"),'"]'))).length?t(".meta-lightbox-nav").hide():t(".meta-lightbox-nav").show(),t(".meta-lightbox-prev").off("click").on("click",(function(e){e.preventDefault();var o=n.index(i);i=n.eq(o-1),t(i).length||(i=n.last()),s.processContent(a,i),s.options.onPrev.call(this,[i])})),t(".meta-lightbox-next").off("click").on("click",(function(e){e.preventDefault();var o=n.index(i);i=n.eq(o+1),t(i).length||(i=n.first()),s.processContent(a,i),s.options.onNext.call(this,[i])}))),setTimeout((function(){o.addClass("meta-lightbox-open"),s.options.afterShowLightbox.call(this,[o])}),1))},processContent:function(i,n){var s,l,r,c,h,g,f=this;href=n.attr("href"),href||(href=n.data("href")),i.html("").addClass("meta-lightbox-loading"),this.isHidpi()&&n.data("lightbox-hidpi")&&(href=n.data("lightbox-hidpi")),null!=href.match(/\.(jpeg|jpg|gif|png)$/i)?((s=t("<img>",{src:href})).on("load",(function(){var o=t('<div class="meta-lightbox-image"></div>'),a=t(".meta-lightbox-content"),n=t('<span class="meta-lightbox-zoom-wrapper"></span>');n.append(s),o.append(n),o.css({"line-height":"".concat(a.height(),"px"),height:"".concat(a.height(),"px")}),t(e).resize((function(){o.css({"line-height":"".concat(a.height(),"px"),height:"".concat(a.height(),"px")})})),"undefined"!==typeof n.zoom&&n.zoom(),i.html(o).removeClass("meta-lightbox-loading"),f.contentLoaded()})),s.on("error",(function(){var e=t('<div class="meta-lightbox-error"><p>'.concat(f.options.errorMessage,"</p></div>"));i.html(e).removeClass("meta-lightbox-loading"),f.contentLoaded()})),n.data("title")?f.setTitle(n.data("title")):n.attr("title")?f.setTitle(n.attr("title")):t(".meta-lightbox-title-wrap").html(""),"function"===typeof ga&&ga("send","event","meta","Image Click",href)):(l=href.match(/(youtube|youtube-nocookie|youtu|vimeo)\.(com|be)\/(watch\?v=([\w-]+)|([\w-]+))/))?(r="",c="meta-lightbox-video","youtube"==l[1]&&(r="https://www.youtube.com/embed/".concat(l[4]),c="meta-lightbox-youtube"),"youtu"==l[1]&&(r="https://www.youtube.com/embed/".concat(l[3]),c="meta-lightbox-youtube"),"youtube-nocookie"==l[1]&&(r="https://www.youtube-nocookie.com/embed/".concat(l[4]),c="nivo-lightbox-youtube"),"vimeo"==l[1]&&(r="https://player.vimeo.com/video/".concat(l[3]),c="meta-lightbox-vimeo"),r&&(h=t("<iframe>",{src:r,class:c,frameborder:0,vspace:0,hspace:0,scrolling:"auto"}),i.html(h),h.on("load",(function(){i.removeClass("meta-lightbox-loading"),f.contentLoaded()}))),n.data("title")?f.setTitle(n.data("title")):n.attr("title")?f.setTitle(n.attr("title")):t(".meta-lightbox-title-wrap").html(""),"function"===typeof ga&&ga("send","event","meta","Video Click",l)):"#"==href.substring(0,1)?(t(href).length?((g=t('<div class="meta-lightbox-inline" />')).append(t(href).clone().show()),g.outerHeight()<i.height()&&g.css({position:"relative",top:"50%","margin-top":"".concat(-g.outerHeight()/2,"px")}),t(e).resize((function(){g.outerHeight()<i.height()&&g.css({position:"relative",top:"50%","margin-top":"".concat(-g.outerHeight()/2,"px")})})),i.html(g).removeClass("meta-lightbox-loading"),f.contentLoaded()):(g=t('<div class="meta-lightbox-error"><p>'.concat(f.options.errorMessage,"</p></div>")),i.html(g).removeClass("meta-lightbox-loading"),f.contentLoaded()),t(".meta-lightbox-title-wrap").html(""),"function"===typeof ga&&ga("send","event","meta","inline HTML click",href)):t.ajax({sync:!1,async:!0,url:href,dataType:"html",method:"GET",cache:!1,statusCode:{404:function(){console.log("page not found"),e.location.href=url},302:function(){console.log("redirect 302"),e.location.href=url}},error:function(e){console.log("AJAX request failure.".concat(e.statusText));var o=t('<div class="meta-lightbox-error"><p>'.concat(f.options.errorMessage,"</p></div>"));i.html(o).removeClass("meta-lightbox-loading"),f.contentLoaded(),"function"===typeof ga&&ga("send","event","error","AJAX ERROR",e.statusText)},success:function(n,s,l){try{var r=t.parseJSON(n);if("object"===o(r)){if("object"===o(r.regions)&&"undefinded"!==typeof r.regions.LayoutAjax)(g=t('<div class="meta-lightbox-ajax" />')).html(r.regions.LayoutAjax),i.html(g).removeClass("meta-lightbox-loading");var c=l.getResponseHeader("X-Title"),h=l.getResponseHeader("X-Link");c&&c.length&&h&&h.length&&h!==e.location.href&&h.substring(0,h.indexOf("#"))!==e.location.href.replace(t("base").attr("href"),"/")&&(t(".meta-lightbox-ajax").data("curr-title",a.title),t(".meta-lightbox-ajax").data("curr-link",e.location.href),"undefined"!==typeof e.localStorage&&"/"!==h&&e.localStorage.setItem("current-page",h),a.URL!==h&&a.URL!==t("base").attr("href")+h&&a.URL!=="".concat(t("base").attr("href"),"/").concat(h)&&e.history.pushState({title:c,page:h,ajax:"true"},c,h),t(".meta-lightbox-title-wrap").html(""),"function"===typeof ga&&(ga("set",{page:h.replace(t("base").attr("href"),""),title:c}),ga("send","pageview")))}}catch(d){var g;(g=t('<div class="meta-lightbox-ajax" />')).append(n),i.html(g).removeClass("meta-lightbox-loading")}g.outerHeight()<i.height()&&g.css({position:"relative",top:"50%","margin-top":"".concat(-g.outerHeight()/2,"px")}),t(e).resize((function(){g.outerHeight()<i.height()&&g.css({position:"relative",top:"50%","margin-top":"".concat(-g.outerHeight()/2,"px")})})),setTimeout((function(){t(e).resize(),"function"===typeof e.imagesLoaded&&e.imagesLoaded().then((function(){t(e).resize()}))}),500),f.contentLoaded()}})},setTitle:function(e){var o=t("<div>",{class:"meta-lightbox-title"});o.text(e),t(".meta-lightbox-title-wrap").html(o)},contentLoaded:function(){setTimeout((function(){t(e).trigger("meta-lightbox-loaded")}),1),setTimeout((function(){t("body").addClass("meta-lightbox-body-effect-fade")}),600)},constructLightbox:function(){var e=this,o=t("<div>",{class:"meta-lightbox-overlay meta-lightbox-theme-".concat(this.options.theme," meta-lightbox-effect-").concat(this.options.effect)}),a=t("<div>",{class:"meta-lightbox-wrap"}),i=t("<div>",{class:"meta-lightbox-content"}),n=t('<a href="#" class="meta-lightbox-nav meta-lightbox-prev"><i class="fas fa fa-chevron-left"></i> <span class="sr-only">Previous</span></a><a href="#" class="meta-lightbox-nav meta-lightbox-next"><i class="fa fas fa-chevron-right"></i> <span class="sr-only">Next</span></a>'),s=t('<a href="#" class="meta-lightbox-close fas fa fa-times" title="Close"><span class="sr-only">Close</span></a>'),l=t("<div>",{class:"meta-lightbox-title-wrap"}),r=t(".meta-lightbox-overlay");return r.length?r:(a.append(i),a.append(l),o.append(a),o.append(n),o.append(s),t("body").append(o),e.options.clickOverlayToClose&&o.on("click",(function(o){var a=t(o.target);(a.hasClass("meta-lightbox-zoom-wrapper")||a.hasClass("meta-lightbox-content")||a.hasClass("meta-lightbox-wrap")||a.hasClass("meta-lightbox-image")||a.hasClass("meta-lightbox-overlay"))&&e.destructLightbox()})),s.on("click",(function(t){t.preventDefault(),e.destructLightbox()})),o)},destructLightbox:function(){var o=t(".meta-lightbox-overlay");this.options.beforeHideLightbox.call(this);var i=t(".meta-lightbox-ajax").data("curr-title"),n=t(".meta-lightbox-ajax").data("curr-link");i&&n&&("undefined"!==typeof e.localStorage&&"/"!==n&&e.localStorage.setItem("current-page",n),a.URL!==n&&a.URL!==t("base").attr("href")+n&&a.URL!=="".concat(t("base").attr("href"),"/").concat(n)&&e.history.replaceState({title:i,page:n,ajax:"true"},i,n)),o.removeClass("meta-lightbox-open"),t(".meta-lightbox-nav").hide(),t("body").removeClass("meta-lightbox-body-effect-".concat(this.options.effect)),t(".meta-lightbox-content .meta-lightbox-zoom-wrapper").trigger("zoom.destroy"),t(".meta-lightbox-prev").off("click"),t(".meta-lightbox-next").off("click"),t(".meta-lightbox-content").empty(),t("body").removeClass("meta-lightbox-body-effect-fade"),this.options.afterHideLightbox.call(this)},isHidpi:function(){return e.devicePixelRatio>1||e.matchMedia&&e.matchMedia("(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)").matches}},t.fn.metaLightbox=function(e){return this.each((function(){t.data(this,"metaLightbox")||t.data(this,"metaLightbox",new n(this,e))}))},t(a).metaLightbox()}(jQuery,this,document)},"./src/scss/app.scss":function(t,e,o){}});
//# sourceMappingURL=app.js.map

2
dist/js/app.js.map vendored
View File

@ -1 +1 @@
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/js/index.js","webpack:///./src/js/meta-lightbox.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","$","window","document","defaults","effect","theme","keyboardNav","clickOverlayToClose","onInit","beforeShowLightbox","afterShowLightbox","lightbox","beforeHideLightbox","afterHideLightbox","onPrev","element","onNext","errorMessage","MetaLightbox","options","this","extend","_defaults","_name","init","$this","$html","ajaxLoaded","hasClass","addClass","removeClass","on","e","preventDefault","stopPropagation","showLightbox","off","code","keyCode","which","destructLightbox","trigger","el","$el","content","currentLink","galleryItems","constructLightbox","find","processContent","data","length","hide","show","index","eq","last","first","setTimeout","link","img","video","src","classTerm","iframe","wrap","href","attr","html","isHidpi","match","$content","imgwrapper","append","css","height","resize","zoom","contentLoaded","setTitle","ga","class","frameborder","vspace","hspace","scrolling","substring","clone","outerHeight","position","top","ajax","sync","async","url","dataType","method","cache","statusCode","404","console","log","location","302","error","jqXHR","statusText","success","status","dataJson","parseJSON","title","getResponseHeader","indexOf","replace","localStorage","setItem","URL","history","pushState","page","imagesLoaded","then","text","titleWrap","overlay","nav","close","$overlay","$target","target","replaceState","empty","devicePixelRatio","matchMedia","matches","fn","each","metaLightbox","jQuery"],"mappings":";aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,E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B,SAASrH,GAC1B,OAAOC,KAAKqH,MAAK,WACVzI,EAAEkD,KAAK9B,KA7nBC,iBA8nBXpB,EAAEkD,KAAK9B,KA9nBI,eA8nBc,IAAIF,EAAaE,KAAMD,QAKtDnB,EAAEE,GAAUwI,eApoBd,CAqoBGC,OAAQvH,KAAMlB,W","file":"js/app.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/mnt/data/srv/dist/repositories/meta-lightbox/dist\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/js/index.js\");\n","/*\n * MetaLightbox\n * https://tony.twma.pro\n *\n */\n\n\nimport '../scss/index.scss';\nimport './meta-lightbox';\n","/*\n * MetaLightbox v0.61\n * https://tony.twma.pro\n *\n */\n\n//=require ../../bower_components/jquery-zoom/jquery.zoom.js\n\n(function($, window, document) {\n var pluginName = 'metaLightbox',\n defaults = {\n effect: 'fade',\n theme: 'default',\n keyboardNav: true,\n clickOverlayToClose: true,\n onInit: function() {},\n beforeShowLightbox: function() {},\n afterShowLightbox: function(lightbox) {},\n beforeHideLightbox: function() {},\n afterHideLightbox: function() {},\n onPrev: function(element) {},\n onNext: function(element) {},\n errorMessage:\n 'The requested content cannot be loaded. Please try again later.',\n };\n\n function MetaLightbox(element, options) {\n /*this.el = element;\n this.$el = $(this.el);*/\n\n this.options = $.extend({}, defaults, options);\n\n this._defaults = defaults;\n this._name = pluginName;\n\n this.init();\n }\n\n MetaLightbox.prototype = {\n init: function() {\n var $this = this,\n $html = $('html');\n\n this.ajaxLoaded = false;\n\n // make object globally accessible\n document.MetaLightbox = this;\n\n // Need this so we don't use CSS transitions in mobile\n if (!$html.hasClass('meta-lightbox-notouch'))\n $html.addClass('meta-lightbox-notouch');\n if ('ontouchstart' in document)\n $html.removeClass('meta-lightbox-notouch');\n\n // Setup the click\n $(document).on(\n 'click',\n '[data-toggle=\"lightbox\"],[data-lightbox-gallery]',\n function(e) {\n e.preventDefault();\n e.stopPropagation();\n\n $this.showLightbox(this);\n return false;\n },\n );\n\n // keyboardNav\n if (this.options.keyboardNav) {\n $('body')\n .off('keyup')\n .on('keyup', (e) => {\n var code = e.keyCode ? e.keyCode : e.which;\n // Escape\n if (code === 27) {\n $this.destructLightbox();\n }\n // Left\n if (code === 37) {\n $('.meta-lightbox-prev').trigger('click');\n }\n // Right\n if (code === 39) {\n $('.meta-lightbox-next').trigger('click');\n }\n });\n }\n\n this.options.onInit.call(this);\n },\n\n showLightbox: function(element) {\n this.el = element;\n this.$el = $(this.el);\n\n var $this = this,\n lightbox,\n content,\n currentLink,\n galleryItems;\n\n this.options.beforeShowLightbox.call(this);\n\n lightbox = this.constructLightbox();\n if (!lightbox) return;\n content = lightbox.find('.meta-lightbox-content');\n if (!content) return;\n currentLink = this.$el;\n $('body').addClass(`meta-lightbox-body-effect-${this.options.effect}`);\n\n // Add content\n this.processContent(content, currentLink);\n\n // Nav\n if (this.$el.data('lightbox-gallery')) {\n galleryItems = $(\n `[data-lightbox-gallery=\"${this.$el.data('lightbox-gallery')}\"]`,\n );\n\n if (galleryItems.length === 1) {\n $('.meta-lightbox-nav').hide();\n } else {\n $('.meta-lightbox-nav').show();\n }\n\n // Prev\n $('.meta-lightbox-prev')\n .off('click')\n .on('click', function(e) {\n e.preventDefault();\n var index = galleryItems.index(currentLink);\n currentLink = galleryItems.eq(index - 1);\n if (!$(currentLink).length) currentLink = galleryItems.last();\n $this.processContent(content, currentLink);\n $this.options.onPrev.call(this, [currentLink]);\n });\n\n // Next\n $('.meta-lightbox-next')\n .off('click')\n .on('click', function(e) {\n e.preventDefault();\n var index = galleryItems.index(currentLink);\n currentLink = galleryItems.eq(index + 1);\n if (!$(currentLink).length) currentLink = galleryItems.first();\n $this.processContent(content, currentLink);\n $this.options.onNext.call(this, [currentLink]);\n });\n }\n\n setTimeout(function() {\n lightbox.addClass('meta-lightbox-open');\n $this.options.afterShowLightbox.call(this, [lightbox]);\n }, 1); // For CSS transitions\n },\n\n processContent: function(content, link) {\n var $this = this,\n img,\n video,\n src,\n classTerm,\n iframe,\n wrap;\n\n href = link.attr('href');\n if (!href) {\n href = link.data('href');\n }\n\n content.html('').addClass('meta-lightbox-loading');\n\n // Is HiDPI?\n if (this.isHidpi() && link.data('lightbox-hidpi')) {\n href = link.data('lightbox-hidpi');\n }\n\n // Image\n if (href.match(/\\.(jpeg|jpg|gif|png)$/i) != null) {\n /*if ($(window).width() < 768) {\n window.open(href, '_blank');\n }*/\n img = $('<img>', {\n src: href,\n });\n img.on('load', () => {\n var wrap = $('<div class=\"meta-lightbox-image\"></div>'),\n $content = $('.meta-lightbox-content'),\n imgwrapper = $('<span class=\"meta-lightbox-zoom-wrapper\"></span>');\n\n imgwrapper.append(img);\n wrap.append(imgwrapper);\n\n // Vertically center images\n wrap.css({\n 'line-height': `${$content.height()}px`,\n height: `${$content.height()}px`, // For Firefox\n });\n $(window).resize(() => {\n wrap.css({\n 'line-height': `${$content.height()}px`,\n height: `${$content.height()}px`, // For Firefox\n });\n });\n\n if (typeof imgwrapper['zoom'] !== 'undefined') {\n imgwrapper.zoom();\n }\n\n content.html(wrap).removeClass('meta-lightbox-loading');\n $this.contentLoaded();\n });\n /*.each(function () {\n if (this.complete) $(this).load();\n });*/\n\n img.on('error', () => {\n var wrap = $(\n `<div class=\"meta-lightbox-error\"><p>${$this.options.errorMessage}</p></div>`,\n );\n content.html(wrap).removeClass('meta-lightbox-loading');\n $this.contentLoaded();\n });\n\n // Set the title\n if (link.data('title')) {\n $this.setTitle(link.data('title'));\n } else if (link.attr('title')) {\n $this.setTitle(link.attr('title'));\n } else {\n $('.meta-lightbox-title-wrap').html('');\n }\n\n // google analytics\n if (typeof ga === 'function') {\n ga('send', 'event', 'meta', 'Image Click', href);\n }\n }\n // Video (Youtube/Vimeo)\n else if (\n (video = href.match(\n /(youtube|youtube-nocookie|youtu|vimeo)\\.(com|be)\\/(watch\\?v=([\\w-]+)|([\\w-]+))/,\n ))\n ) {\n src = '';\n classTerm = 'meta-lightbox-video';\n\n if (video[1] == 'youtube') {\n src = `https://www.youtube.com/embed/${video[4]}`;\n classTerm = 'meta-lightbox-youtube';\n }\n if (video[1] == 'youtu') {\n src = `https://www.youtube.com/embed/${video[3]}`;\n classTerm = 'meta-lightbox-youtube';\n }\n if (video[1] == 'youtube-nocookie') {\n src = `https://www.youtube-nocookie.com/embed/${video[4]}`;\n classTerm = 'nivo-lightbox-youtube';\n }\n if (video[1] == 'vimeo') {\n src = `https://player.vimeo.com/video/${video[3]}`;\n classTerm = 'meta-lightbox-vimeo';\n }\n\n if (src) {\n iframe = $('<iframe>', {\n src,\n class: classTerm,\n frameborder: 0,\n vspace: 0,\n hspace: 0,\n scrolling: 'auto',\n });\n content.html(iframe);\n iframe.on('load', () => {\n content.removeClass('meta-lightbox-loading');\n $this.contentLoaded();\n });\n }\n\n // Set the title\n if (link.data('title')) {\n $this.setTitle(link.data('title'));\n } else if (link.attr('title')) {\n $this.setTitle(link.attr('title'));\n } else {\n $('.meta-lightbox-title-wrap').html('');\n }\n\n // google analytics\n if (typeof ga === 'function') {\n ga('send', 'event', 'meta', 'Video Click', video);\n }\n }\n // Inline HTML\n else if (href.substring(0, 1) == '#') {\n if ($(href).length) {\n wrap = $('<div class=\"meta-lightbox-inline\" />');\n wrap.append(\n $(href)\n .clone()\n .show(),\n );\n\n // Vertically center html\n if (wrap.outerHeight() < content.height()) {\n wrap.css({\n position: 'relative',\n top: '50%',\n 'margin-top': `${-(wrap.outerHeight() / 2)}px`,\n });\n }\n $(window).resize(() => {\n if (wrap.outerHeight() < content.height()) {\n wrap.css({\n position: 'relative',\n top: '50%',\n 'margin-top': `${-(wrap.outerHeight() / 2)}px`,\n });\n }\n });\n\n content.html(wrap).removeClass('meta-lightbox-loading');\n $this.contentLoaded();\n } else {\n wrap = $(\n `<div class=\"meta-lightbox-error\"><p>${$this.options.errorMessage}</p></div>`,\n );\n content.html(wrap).removeClass('meta-lightbox-loading');\n $this.contentLoaded();\n }\n\n $('.meta-lightbox-title-wrap').html('');\n\n // google analytics\n if (typeof ga === 'function') {\n ga('send', 'event', 'meta', 'inline HTML click', href);\n }\n }\n // AJAX/iFrame (default)\n else {\n $.ajax({\n sync: false,\n async: true,\n url: href,\n dataType: 'html',\n method: 'GET',\n cache: false,\n statusCode: {\n 404: function() {\n console.log('page not found');\n window.location.href = url;\n },\n 302: function() {\n console.log('redirect 302');\n window.location.href = url;\n },\n },\n error: function(jqXHR) {\n console.log(`AJAX request failure.${jqXHR.statusText}`);\n\n var wrap = $(\n `<div class=\"meta-lightbox-error\"><p>${$this.options.errorMessage}</p></div>`,\n );\n content.html(wrap).removeClass('meta-lightbox-loading');\n $this.contentLoaded();\n\n // google analytics\n if (typeof ga === 'function') {\n ga('send', 'event', 'error', 'AJAX ERROR', jqXHR.statusText);\n }\n },\n success: function(data, status, jqXHR) {\n try {\n const dataJson = $.parseJSON(data);\n if (typeof dataJson === 'object') {\n // Replace regions\n if (\n typeof dataJson['regions'] === 'object' &&\n typeof dataJson['regions']['LayoutAjax'] !== 'undefinded'\n ) {\n var wrap = $('<div class=\"meta-lightbox-ajax\" />');\n wrap.html(dataJson['regions']['LayoutAjax']);\n content.html(wrap).removeClass('meta-lightbox-loading');\n }\n\n // trigger events\n /*if (typeof (data['events']) === 'object') {\n for (var eventName in data.events) {\n $(document).trigger(eventName, [data['events'][eventName]]);\n }\n }*/\n\n var title = jqXHR.getResponseHeader('X-Title'),\n link = jqXHR.getResponseHeader('X-Link');\n\n if (\n title &&\n title.length &&\n link &&\n link.length &&\n link !== window.location.href &&\n link.substring(0, link.indexOf('#')) !==\n window.location.href.replace($('base').attr('href'), '/')\n ) {\n $('.meta-lightbox-ajax').data('curr-title', document.title);\n $('.meta-lightbox-ajax').data(\n 'curr-link',\n window.location.href,\n );\n\n if (\n typeof window.localStorage !== 'undefined' &&\n link !== '/'\n ) {\n window.localStorage.setItem('current-page', link);\n }\n\n if (\n document.URL !== link &&\n document.URL !== $('base').attr('href') + link &&\n document.URL !== `${$('base').attr('href')}/${link}`\n ) {\n window.history.pushState(\n {\n title,\n page: link,\n ajax: 'true',\n },\n title,\n link,\n );\n }\n\n // update redirect urls\n /*var pattern = new RegExp('\\\\b(redirect_uri=).*?(&|$)');\n $('a').each(function () {\n var $this = $(this);\n $this.attr('href', $this.attr('href').replace(pattern, 'redirect_uri=' + encodeURI($('base').attr('href') + link)));\n });*/\n\n $('.meta-lightbox-title-wrap').html('');\n\n // google analytics\n if (typeof ga === 'function') {\n ga('set', {\n page: link.replace($('base').attr('href'), ''),\n title,\n });\n ga('send', 'pageview');\n }\n }\n }\n } catch (e) {\n var wrap = $('<div class=\"meta-lightbox-ajax\" />');\n wrap.append(data);\n content.html(wrap).removeClass('meta-lightbox-loading');\n }\n\n // Vertically center html\n if (wrap.outerHeight() < content.height()) {\n wrap.css({\n position: 'relative',\n top: '50%',\n 'margin-top': `${-(wrap.outerHeight() / 2)}px`,\n });\n }\n $(window).resize(() => {\n if (wrap.outerHeight() < content.height()) {\n wrap.css({\n position: 'relative',\n top: '50%',\n 'margin-top': `${-(wrap.outerHeight() / 2)}px`,\n });\n }\n });\n\n setTimeout(() => {\n $(window).resize();\n\n if (typeof window.imagesLoaded === 'function') {\n window.imagesLoaded().then(() => {\n $(window).resize();\n });\n }\n }, 500);\n\n $this.contentLoaded();\n },\n });\n }\n },\n\n setTitle: function(text) {\n var titleWrap = $('<div>', {\n class: 'meta-lightbox-title',\n });\n titleWrap.text(text);\n $('.meta-lightbox-title-wrap').html(titleWrap);\n },\n\n contentLoaded: function() {\n setTimeout(() => {\n $(window).trigger('meta-lightbox-loaded');\n }, 1); // For CSS transitions\n\n setTimeout(() => {\n $('body').addClass('meta-lightbox-body-effect-fade');\n }, 600);\n },\n\n constructLightbox: function() {\n var $this = this,\n overlay = $('<div>', {\n class: `meta-lightbox-overlay meta-lightbox-theme-${this.options.theme} meta-lightbox-effect-${this.options.effect}`,\n }),\n wrap = $('<div>', {\n class: 'meta-lightbox-wrap',\n }),\n content = $('<div>', {\n class: 'meta-lightbox-content',\n }),\n nav = $(\n '<a href=\"#\" class=\"meta-lightbox-nav meta-lightbox-prev\"><i class=\"fas fa fa-chevron-left\"></i> <span class=\"sr-only\">Previous</span></a><a href=\"#\" class=\"meta-lightbox-nav meta-lightbox-next\"><i class=\"fa fas fa-chevron-right\"></i> <span class=\"sr-only\">Next</span></a>',\n ),\n close = $(\n '<a href=\"#\" class=\"meta-lightbox-close fas fa fa-times\" title=\"Close\"><span class=\"sr-only\">Close</span></a>',\n ),\n title = $('<div>', {\n class: 'meta-lightbox-title-wrap',\n }),\n isMSIE = /*@cc_on!@*/ 0,\n $overlay = $('.meta-lightbox-overlay');\n\n if ($overlay.length) return $overlay;\n\n if (isMSIE) overlay.addClass('meta-lightbox-ie');\n\n wrap.append(content);\n wrap.append(title);\n overlay.append(wrap);\n overlay.append(nav);\n overlay.append(close);\n $('body').append(overlay);\n\n if ($this.options.clickOverlayToClose) {\n overlay.on('click', (e) => {\n var $target = $(e.target);\n\n if (\n $target.hasClass('meta-lightbox-zoom-wrapper') ||\n $target.hasClass('meta-lightbox-content') ||\n $target.hasClass('meta-lightbox-wrap') ||\n $target.hasClass('meta-lightbox-image') ||\n $target.hasClass('meta-lightbox-overlay')\n ) {\n $this.destructLightbox();\n }\n });\n }\n\n close.on('click', (e) => {\n e.preventDefault();\n $this.destructLightbox();\n });\n\n return overlay;\n },\n\n destructLightbox: function() {\n var $this = this,\n $overlay = $('.meta-lightbox-overlay'),\n isMSIE = /*@cc_on!@*/ 0;\n this.options.beforeHideLightbox.call(this);\n\n var title = $('.meta-lightbox-ajax').data('curr-title'),\n link = $('.meta-lightbox-ajax').data('curr-link');\n if (title && link) {\n if (typeof window.localStorage !== 'undefined' && link !== '/') {\n window.localStorage.setItem('current-page', link);\n }\n\n if (\n document.URL !== link &&\n document.URL !== $('base').attr('href') + link &&\n document.URL !== `${$('base').attr('href')}/${link}`\n ) {\n window.history.replaceState(\n {\n title,\n page: link,\n ajax: 'true',\n },\n title,\n link,\n );\n }\n\n // update redirect urls\n /*var pattern = new RegExp('\\\\b(redirect_uri=).*?(&|$)');\n $('a').each(function () {\n var $this = $(this);\n $this.attr('href', $this.attr('href').replace(pattern, 'redirect_uri=' + encodeURI($('base').attr('href') + link)));\n });*/\n }\n\n $overlay.removeClass('meta-lightbox-open');\n $('.meta-lightbox-nav').hide();\n $('body').removeClass(\n `meta-lightbox-body-effect-${$this.options.effect}`,\n );\n $('.meta-lightbox-content .meta-lightbox-zoom-wrapper').trigger(\n 'zoom.destroy',\n );\n\n // For IE\n if (isMSIE) {\n $overlay.find('iframe').attr('src', ' ');\n $overlay.find('iframe').remove();\n }\n $('.meta-lightbox-prev').off('click');\n\n // Remove click handlers\n $('.meta-lightbox-next').off('click');\n\n // Empty content (for videos)\n $('.meta-lightbox-content').empty();\n\n $('body').removeClass('meta-lightbox-body-effect-fade');\n\n this.options.afterHideLightbox.call(this);\n },\n\n isHidpi: function() {\n var mediaQuery =\n '(-webkit-min-device-pixel-ratio: 1.5),\\\n (min--moz-device-pixel-ratio: 1.5),\\\n (-o-min-device-pixel-ratio: 3/2),\\\n (min-resolution: 1.5dppx)';\n if (window.devicePixelRatio > 1) return true;\n return window.matchMedia && window.matchMedia(mediaQuery).matches;\n },\n };\n\n $.fn[pluginName] = function(options) {\n return this.each(function() {\n if (!$.data(this, pluginName)) {\n $.data(this, pluginName, new MetaLightbox(this, options));\n }\n });\n };\n\n $(document).metaLightbox();\n})(jQuery, this, document);\n"],"sourceRoot":""}
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/js/app.js","webpack:///./src/js/meta-lightbox.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","$","window","document","defaults","effect","theme","keyboardNav","clickOverlayToClose","onInit","beforeShowLightbox","afterShowLightbox","lightbox","beforeHideLightbox","afterHideLightbox","onPrev","element","onNext","errorMessage","MetaLightbox","options","this","extend","_defaults","_name","init","$this","$html","ajaxLoaded","hasClass","addClass","removeClass","on","e","preventDefault","stopPropagation","showLightbox","off","code","keyCode","which","destructLightbox","trigger","el","$el","content","currentLink","galleryItems","constructLightbox","find","processContent","data","length","hide","show","index","eq","last","first","setTimeout","link","img","video","src","classTerm","iframe","wrap","href","attr","html","isHidpi","match","$content","imgwrapper","append","css","height","resize","zoom","contentLoaded","setTitle","ga","class","frameborder","vspace","hspace","scrolling","substring","clone","outerHeight","position","top","ajax","sync","async","url","dataType","method","cache","statusCode","404","console","log","location","302","error","jqXHR","statusText","success","status","dataJson","parseJSON","title","getResponseHeader","indexOf","replace","localStorage","setItem","URL","history","pushState","page","imagesLoaded","then","text","titleWrap","overlay","nav","close","$overlay","$target","target","replaceState","empty","devicePixelRatio","matchMedia","matches","fn","each","metaLightbox","jQuery"],"mappings":";aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EA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AAK9B,KA9nBI,eA8nBc,IAAIF,EAAaE,KAAMD,QAKtDnB,EAAEE,GAAUwI,eApoBd,CAqoBGC,OAAQvH,KAAMlB,W","file":"js/app.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/mnt/data/srv/dist/repositories/meta-lightbox/dist\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/js/app.js\");\n","/*\n * MetaLightbox\n * https://tony.twma.pro\n *\n */\n\nimport '../scss/app.scss';\nimport './meta-lightbox';\n","/*\n * MetaLightbox v0.61\n * https://tony.twma.pro\n *\n */\n\n//=require ../../bower_components/jquery-zoom/jquery.zoom.js\n\n(function($, window, document) {\n var pluginName = 'metaLightbox',\n defaults = {\n effect: 'fade',\n theme: 'default',\n keyboardNav: true,\n clickOverlayToClose: true,\n onInit: function() {},\n beforeShowLightbox: function() {},\n afterShowLightbox: function(lightbox) {},\n beforeHideLightbox: function() {},\n afterHideLightbox: function() {},\n onPrev: function(element) {},\n onNext: function(element) {},\n errorMessage:\n 'The requested content cannot be loaded. Please try again later.',\n };\n\n function MetaLightbox(element, options) {\n /*this.el = element;\n this.$el = $(this.el);*/\n\n this.options = $.extend({}, defaults, options);\n\n this._defaults = defaults;\n this._name = pluginName;\n\n this.init();\n }\n\n MetaLightbox.prototype = {\n init: function() {\n var $this = this,\n $html = $('html');\n\n this.ajaxLoaded = false;\n\n // make object globally accessible\n document.MetaLightbox = this;\n\n // Need this so we don't use CSS transitions in mobile\n if (!$html.hasClass('meta-lightbox-notouch'))\n $html.addClass('meta-lightbox-notouch');\n if ('ontouchstart' in document)\n $html.removeClass('meta-lightbox-notouch');\n\n // Setup the click\n $(document).on(\n 'click',\n '[data-toggle=\"lightbox\"],[data-lightbox-gallery]',\n function(e) {\n e.preventDefault();\n e.stopPropagation();\n\n $this.showLightbox(this);\n return false;\n },\n );\n\n // keyboardNav\n if (this.options.keyboardNav) {\n $('body')\n .off('keyup')\n .on('keyup', (e) => {\n var code = e.keyCode ? e.keyCode : e.which;\n // Escape\n if (code === 27) {\n $this.destructLightbox();\n }\n // Left\n if (code === 37) {\n $('.meta-lightbox-prev').trigger('click');\n }\n // Right\n if (code === 39) {\n $('.meta-lightbox-next').trigger('click');\n }\n });\n }\n\n this.options.onInit.call(this);\n },\n\n showLightbox: function(element) {\n this.el = element;\n this.$el = $(this.el);\n\n var $this = this,\n lightbox,\n content,\n currentLink,\n galleryItems;\n\n this.options.beforeShowLightbox.call(this);\n\n lightbox = this.constructLightbox();\n if (!lightbox) return;\n content = lightbox.find('.meta-lightbox-content');\n if (!content) return;\n currentLink = this.$el;\n $('body').addClass(`meta-lightbox-body-effect-${this.options.effect}`);\n\n // Add content\n this.processContent(content, currentLink);\n\n // Nav\n if (this.$el.data('lightbox-gallery')) {\n galleryItems = $(\n `[data-lightbox-gallery=\"${this.$el.data('lightbox-gallery')}\"]`,\n );\n\n if (galleryItems.length === 1) {\n $('.meta-lightbox-nav').hide();\n } else {\n $('.meta-lightbox-nav').show();\n }\n\n // Prev\n $('.meta-lightbox-prev')\n .off('click')\n .on('click', function(e) {\n e.preventDefault();\n var index = galleryItems.index(currentLink);\n currentLink = galleryItems.eq(index - 1);\n if (!$(currentLink).length) currentLink = galleryItems.last();\n $this.processContent(content, currentLink);\n $this.options.onPrev.call(this, [currentLink]);\n });\n\n // Next\n $('.meta-lightbox-next')\n .off('click')\n .on('click', function(e) {\n e.preventDefault();\n var index = galleryItems.index(currentLink);\n currentLink = galleryItems.eq(index + 1);\n if (!$(currentLink).length) currentLink = galleryItems.first();\n $this.processContent(content, currentLink);\n $this.options.onNext.call(this, [currentLink]);\n });\n }\n\n setTimeout(function() {\n lightbox.addClass('meta-lightbox-open');\n $this.options.afterShowLightbox.call(this, [lightbox]);\n }, 1); // For CSS transitions\n },\n\n processContent: function(content, link) {\n var $this = this,\n img,\n video,\n src,\n classTerm,\n iframe,\n wrap;\n\n href = link.attr('href');\n if (!href) {\n href = link.data('href');\n }\n\n content.html('').addClass('meta-lightbox-loading');\n\n // Is HiDPI?\n if (this.isHidpi() && link.data('lightbox-hidpi')) {\n href = link.data('lightbox-hidpi');\n }\n\n // Image\n if (href.match(/\\.(jpeg|jpg|gif|png)$/i) != null) {\n /*if ($(window).width() < 768) {\n window.open(href, '_blank');\n }*/\n img = $('<img>', {\n src: href,\n });\n img.on('load', () => {\n var wrap = $('<div class=\"meta-lightbox-image\"></div>'),\n $content = $('.meta-lightbox-content'),\n imgwrapper = $('<span class=\"meta-lightbox-zoom-wrapper\"></span>');\n\n imgwrapper.append(img);\n wrap.append(imgwrapper);\n\n // Vertically center images\n wrap.css({\n 'line-height': `${$content.height()}px`,\n height: `${$content.height()}px`, // For Firefox\n });\n $(window).resize(() => {\n wrap.css({\n 'line-height': `${$content.height()}px`,\n height: `${$content.height()}px`, // For Firefox\n });\n });\n\n if (typeof imgwrapper['zoom'] !== 'undefined') {\n imgwrapper.zoom();\n }\n\n content.html(wrap).removeClass('meta-lightbox-loading');\n $this.contentLoaded();\n });\n /*.each(function () {\n if (this.complete) $(this).load();\n });*/\n\n img.on('error', () => {\n var wrap = $(\n `<div class=\"meta-lightbox-error\"><p>${$this.options.errorMessage}</p></div>`,\n );\n content.html(wrap).removeClass('meta-lightbox-loading');\n $this.contentLoaded();\n });\n\n // Set the title\n if (link.data('title')) {\n $this.setTitle(link.data('title'));\n } else if (link.attr('title')) {\n $this.setTitle(link.attr('title'));\n } else {\n $('.meta-lightbox-title-wrap').html('');\n }\n\n // google analytics\n if (typeof ga === 'function') {\n ga('send', 'event', 'meta', 'Image Click', href);\n }\n }\n // Video (Youtube/Vimeo)\n else if (\n (video = href.match(\n /(youtube|youtube-nocookie|youtu|vimeo)\\.(com|be)\\/(watch\\?v=([\\w-]+)|([\\w-]+))/,\n ))\n ) {\n src = '';\n classTerm = 'meta-lightbox-video';\n\n if (video[1] == 'youtube') {\n src = `https://www.youtube.com/embed/${video[4]}`;\n classTerm = 'meta-lightbox-youtube';\n }\n if (video[1] == 'youtu') {\n src = `https://www.youtube.com/embed/${video[3]}`;\n classTerm = 'meta-lightbox-youtube';\n }\n if (video[1] == 'youtube-nocookie') {\n src = `https://www.youtube-nocookie.com/embed/${video[4]}`;\n classTerm = 'nivo-lightbox-youtube';\n }\n if (video[1] == 'vimeo') {\n src = `https://player.vimeo.com/video/${video[3]}`;\n classTerm = 'meta-lightbox-vimeo';\n }\n\n if (src) {\n iframe = $('<iframe>', {\n src,\n class: classTerm,\n frameborder: 0,\n vspace: 0,\n hspace: 0,\n scrolling: 'auto',\n });\n content.html(iframe);\n iframe.on('load', () => {\n content.removeClass('meta-lightbox-loading');\n $this.contentLoaded();\n });\n }\n\n // Set the title\n if (link.data('title')) {\n $this.setTitle(link.data('title'));\n } else if (link.attr('title')) {\n $this.setTitle(link.attr('title'));\n } else {\n $('.meta-lightbox-title-wrap').html('');\n }\n\n // google analytics\n if (typeof ga === 'function') {\n ga('send', 'event', 'meta', 'Video Click', video);\n }\n }\n // Inline HTML\n else if (href.substring(0, 1) == '#') {\n if ($(href).length) {\n wrap = $('<div class=\"meta-lightbox-inline\" />');\n wrap.append(\n $(href)\n .clone()\n .show(),\n );\n\n // Vertically center html\n if (wrap.outerHeight() < content.height()) {\n wrap.css({\n position: 'relative',\n top: '50%',\n 'margin-top': `${-(wrap.outerHeight() / 2)}px`,\n });\n }\n $(window).resize(() => {\n if (wrap.outerHeight() < content.height()) {\n wrap.css({\n position: 'relative',\n top: '50%',\n 'margin-top': `${-(wrap.outerHeight() / 2)}px`,\n });\n }\n });\n\n content.html(wrap).removeClass('meta-lightbox-loading');\n $this.contentLoaded();\n } else {\n wrap = $(\n `<div class=\"meta-lightbox-error\"><p>${$this.options.errorMessage}</p></div>`,\n );\n content.html(wrap).removeClass('meta-lightbox-loading');\n $this.contentLoaded();\n }\n\n $('.meta-lightbox-title-wrap').html('');\n\n // google analytics\n if (typeof ga === 'function') {\n ga('send', 'event', 'meta', 'inline HTML click', href);\n }\n }\n // AJAX/iFrame (default)\n else {\n $.ajax({\n sync: false,\n async: true,\n url: href,\n dataType: 'html',\n method: 'GET',\n cache: false,\n statusCode: {\n 404: function() {\n console.log('page not found');\n window.location.href = url;\n },\n 302: function() {\n console.log('redirect 302');\n window.location.href = url;\n },\n },\n error: function(jqXHR) {\n console.log(`AJAX request failure.${jqXHR.statusText}`);\n\n var wrap = $(\n `<div class=\"meta-lightbox-error\"><p>${$this.options.errorMessage}</p></div>`,\n );\n content.html(wrap).removeClass('meta-lightbox-loading');\n $this.contentLoaded();\n\n // google analytics\n if (typeof ga === 'function') {\n ga('send', 'event', 'error', 'AJAX ERROR', jqXHR.statusText);\n }\n },\n success: function(data, status, jqXHR) {\n try {\n const dataJson = $.parseJSON(data);\n if (typeof dataJson === 'object') {\n // Replace regions\n if (\n typeof dataJson['regions'] === 'object' &&\n typeof dataJson['regions']['LayoutAjax'] !== 'undefinded'\n ) {\n var wrap = $('<div class=\"meta-lightbox-ajax\" />');\n wrap.html(dataJson['regions']['LayoutAjax']);\n content.html(wrap).removeClass('meta-lightbox-loading');\n }\n\n // trigger events\n /*if (typeof (data['events']) === 'object') {\n for (var eventName in data.events) {\n $(document).trigger(eventName, [data['events'][eventName]]);\n }\n }*/\n\n var title = jqXHR.getResponseHeader('X-Title'),\n link = jqXHR.getResponseHeader('X-Link');\n\n if (\n title &&\n title.length &&\n link &&\n link.length &&\n link !== window.location.href &&\n link.substring(0, link.indexOf('#')) !==\n window.location.href.replace($('base').attr('href'), '/')\n ) {\n $('.meta-lightbox-ajax').data('curr-title', document.title);\n $('.meta-lightbox-ajax').data(\n 'curr-link',\n window.location.href,\n );\n\n if (\n typeof window.localStorage !== 'undefined' &&\n link !== '/'\n ) {\n window.localStorage.setItem('current-page', link);\n }\n\n if (\n document.URL !== link &&\n document.URL !== $('base').attr('href') + link &&\n document.URL !== `${$('base').attr('href')}/${link}`\n ) {\n window.history.pushState(\n {\n title,\n page: link,\n ajax: 'true',\n },\n title,\n link,\n );\n }\n\n // update redirect urls\n /*var pattern = new RegExp('\\\\b(redirect_uri=).*?(&|$)');\n $('a').each(function () {\n var $this = $(this);\n $this.attr('href', $this.attr('href').replace(pattern, 'redirect_uri=' + encodeURI($('base').attr('href') + link)));\n });*/\n\n $('.meta-lightbox-title-wrap').html('');\n\n // google analytics\n if (typeof ga === 'function') {\n ga('set', {\n page: link.replace($('base').attr('href'), ''),\n title,\n });\n ga('send', 'pageview');\n }\n }\n }\n } catch (e) {\n var wrap = $('<div class=\"meta-lightbox-ajax\" />');\n wrap.append(data);\n content.html(wrap).removeClass('meta-lightbox-loading');\n }\n\n // Vertically center html\n if (wrap.outerHeight() < content.height()) {\n wrap.css({\n position: 'relative',\n top: '50%',\n 'margin-top': `${-(wrap.outerHeight() / 2)}px`,\n });\n }\n $(window).resize(() => {\n if (wrap.outerHeight() < content.height()) {\n wrap.css({\n position: 'relative',\n top: '50%',\n 'margin-top': `${-(wrap.outerHeight() / 2)}px`,\n });\n }\n });\n\n setTimeout(() => {\n $(window).resize();\n\n if (typeof window.imagesLoaded === 'function') {\n window.imagesLoaded().then(() => {\n $(window).resize();\n });\n }\n }, 500);\n\n $this.contentLoaded();\n },\n });\n }\n },\n\n setTitle: function(text) {\n var titleWrap = $('<div>', {\n class: 'meta-lightbox-title',\n });\n titleWrap.text(text);\n $('.meta-lightbox-title-wrap').html(titleWrap);\n },\n\n contentLoaded: function() {\n setTimeout(() => {\n $(window).trigger('meta-lightbox-loaded');\n }, 1); // For CSS transitions\n\n setTimeout(() => {\n $('body').addClass('meta-lightbox-body-effect-fade');\n }, 600);\n },\n\n constructLightbox: function() {\n var $this = this,\n overlay = $('<div>', {\n class: `meta-lightbox-overlay meta-lightbox-theme-${this.options.theme} meta-lightbox-effect-${this.options.effect}`,\n }),\n wrap = $('<div>', {\n class: 'meta-lightbox-wrap',\n }),\n content = $('<div>', {\n class: 'meta-lightbox-content',\n }),\n nav = $(\n '<a href=\"#\" class=\"meta-lightbox-nav meta-lightbox-prev\"><i class=\"fas fa fa-chevron-left\"></i> <span class=\"sr-only\">Previous</span></a><a href=\"#\" class=\"meta-lightbox-nav meta-lightbox-next\"><i class=\"fa fas fa-chevron-right\"></i> <span class=\"sr-only\">Next</span></a>',\n ),\n close = $(\n '<a href=\"#\" class=\"meta-lightbox-close fas fa fa-times\" title=\"Close\"><span class=\"sr-only\">Close</span></a>',\n ),\n title = $('<div>', {\n class: 'meta-lightbox-title-wrap',\n }),\n isMSIE = /*@cc_on!@*/ 0,\n $overlay = $('.meta-lightbox-overlay');\n\n if ($overlay.length) return $overlay;\n\n if (isMSIE) overlay.addClass('meta-lightbox-ie');\n\n wrap.append(content);\n wrap.append(title);\n overlay.append(wrap);\n overlay.append(nav);\n overlay.append(close);\n $('body').append(overlay);\n\n if ($this.options.clickOverlayToClose) {\n overlay.on('click', (e) => {\n var $target = $(e.target);\n\n if (\n $target.hasClass('meta-lightbox-zoom-wrapper') ||\n $target.hasClass('meta-lightbox-content') ||\n $target.hasClass('meta-lightbox-wrap') ||\n $target.hasClass('meta-lightbox-image') ||\n $target.hasClass('meta-lightbox-overlay')\n ) {\n $this.destructLightbox();\n }\n });\n }\n\n close.on('click', (e) => {\n e.preventDefault();\n $this.destructLightbox();\n });\n\n return overlay;\n },\n\n destructLightbox: function() {\n var $this = this,\n $overlay = $('.meta-lightbox-overlay'),\n isMSIE = /*@cc_on!@*/ 0;\n this.options.beforeHideLightbox.call(this);\n\n var title = $('.meta-lightbox-ajax').data('curr-title'),\n link = $('.meta-lightbox-ajax').data('curr-link');\n if (title && link) {\n if (typeof window.localStorage !== 'undefined' && link !== '/') {\n window.localStorage.setItem('current-page', link);\n }\n\n if (\n document.URL !== link &&\n document.URL !== $('base').attr('href') + link &&\n document.URL !== `${$('base').attr('href')}/${link}`\n ) {\n window.history.replaceState(\n {\n title,\n page: link,\n ajax: 'true',\n },\n title,\n link,\n );\n }\n\n // update redirect urls\n /*var pattern = new RegExp('\\\\b(redirect_uri=).*?(&|$)');\n $('a').each(function () {\n var $this = $(this);\n $this.attr('href', $this.attr('href').replace(pattern, 'redirect_uri=' + encodeURI($('base').attr('href') + link)));\n });*/\n }\n\n $overlay.removeClass('meta-lightbox-open');\n $('.meta-lightbox-nav').hide();\n $('body').removeClass(\n `meta-lightbox-body-effect-${$this.options.effect}`,\n );\n $('.meta-lightbox-content .meta-lightbox-zoom-wrapper').trigger(\n 'zoom.destroy',\n );\n\n // For IE\n if (isMSIE) {\n $overlay.find('iframe').attr('src', ' ');\n $overlay.find('iframe').remove();\n }\n $('.meta-lightbox-prev').off('click');\n\n // Remove click handlers\n $('.meta-lightbox-next').off('click');\n\n // Empty content (for videos)\n $('.meta-lightbox-content').empty();\n\n $('body').removeClass('meta-lightbox-body-effect-fade');\n\n this.options.afterHideLightbox.call(this);\n },\n\n isHidpi: function() {\n var mediaQuery =\n '(-webkit-min-device-pixel-ratio: 1.5),\\\n (min--moz-device-pixel-ratio: 1.5),\\\n (-o-min-device-pixel-ratio: 3/2),\\\n (min-resolution: 1.5dppx)';\n if (window.devicePixelRatio > 1) return true;\n return window.matchMedia && window.matchMedia(mediaQuery).matches;\n },\n };\n\n $.fn[pluginName] = function(options) {\n return this.each(function() {\n if (!$.data(this, pluginName)) {\n $.data(this, pluginName, new MetaLightbox(this, options));\n }\n });\n };\n\n $(document).metaLightbox();\n})(jQuery, this, document);\n"],"sourceRoot":""}

View File

@ -1 +1 @@
import './src/js/index';
import './src/js/app';

View File

@ -1,175 +1,158 @@
{
"name": "@a2nt/meta-lightbox",
"version": "1.2.7",
"description": "Universal Lightbox window",
"main": "meta-lightbox.js",
"author": "Tony Air <tony@twma.pro>",
"license": "BSD-2-Clause",
"repository": {
"type": "git",
"url": "git+https://github.com/a2nt/meta-lightbox.git"
},
"engines": {
"yarn": ">= 1.0.0"
},
"scripts": {
"start": "cross-env NODE_ENV=development webpack-dev-server --https -d --config webpack.config.js",
"dash": "cross-env NODE_ENV=development webpack-dashboard -- webpack-dev-server --config webpack.config.js",
"build": "cross-env NODE_ENV=production webpack -p --config webpack.config.js --progress",
"lint:check": "eslint ./src --config .eslintrc && sass-lint ./src --config .sasslintrc -v -q",
"lint:fix": "eslint ./src --config .eslintrc --fix && sass-lint ./src --config .sasslintrc -v -q --fix",
"lint:js": "eslint ./src --config .eslintrc",
"lint:sass": "sass-lint ./src --config .sasslintrc -v -q",
"prebuild": "yarn lint:fix && rimraf dist",
"prepare": "yarn lint:fix && yarn build",
"prunecaches": "rimraf ./node_modules/.cache/",
"postinstall": "npm run prunecaches",
"postuninstall": "npm run prunecaches"
},
"dependencies": {
"@google/markerclusterer": "^1.0.3",
"animate.css": "^3.7.0",
"bootbox": "^4.4.0",
"bootstrap": "^4.4.1",
"bootstrap-confirmation2": "^4.1.0",
"bootstrap-datepicker": "^1.9.0",
"bootstrap-offcanvas": "^1.0.0",
"bootstrap-table": "^1.16.0",
"bootstrap-timepicker": "^0.5.2",
"browserslist": "^4.11.1",
"caniuse-lite": "^1.0.30001043",
"core-util-is": "^1.0.2",
"croppie": "^2.6.4",
"exif-js": "^2.3.0",
"font-awesome": "^4.7.0",
"foundation-emails": "^2.2.1",
"gijgo": "^1.9.13",
"inputmask": "^5.0.3",
"jquery": "^3.5.0",
"jquery-hammerjs": "^2.0.0",
"jquery-hoverintent": "^1.10.1",
"jquery-zoom": "^1.7.21",
"jquery.appear": "^1.0.1",
"laravel-mix": "^4.1.2",
"mapbox-gl": "^1.9.1",
"offcanvas-bootstrap": "^2.5.2",
"popper.js": "^1.16.1",
"pouchdb": "^6.4.3",
"quill": "^1.3.7",
"react-bootstrap4-form-validation": "^1.0.10",
"routie": "0.0.1",
"select2": "^4.0.13",
"smooth-scroll": "^14.2.1",
"sticky-sidebar": "^3.3.1",
"yarn": "^1.22.0"
},
"devDependencies": {
"@a2nt/image-sprite-webpack-plugin": "^0.2.5",
"@babel/core": "^7.8.4",
"@babel/plugin-proposal-object-rest-spread": "^7.9.5",
"@babel/plugin-transform-react-jsx": "^7.9.4",
"@babel/preset-env": "^7.9.5",
"autoprefixer": "^7.2.5",
"babel-eslint": "^8.2.6",
"babel-loader": "^8.0.6",
"browser-sync": "^2.24.5",
"browser-sync-webpack-plugin": "^2.2.2",
"copy-webpack-plugin": "^4.6.0",
"copyfiles": "^1.2.0",
"cross-env": "^5.1.6",
"css-loader": "^3.5.2",
"eslint": "^4.18.1",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-jquery": "^1.5.1",
"eslint-plugin-react": "^7.18.3",
"exports-loader": "^0.7.0",
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"favicons-webpack-plugin": "^1.0.2",
"file-loader": "^1.1.5",
"hard-source-webpack-plugin": "^0.13.1",
"html-loader": "^0.5.5",
"html-webpack-plugin": "^4.2.0",
"imagemin-gifsicle": "^7.0.0",
"imagemin-jpegtran": "^6.0.0",
"imagemin-optipng": "^7.1.0",
"imagemin-svgo": "^7.0.0",
"imagemin-webpack": "^5.1.1",
"loglevel": "^1.6.8",
"lost": "^8.3.1",
"material-design-color": "^2.3.2",
"node-sass": "^4.13.1",
"object-assign": "^4.1.1",
"optimize-css-assets-webpack-plugin": "^5.0.3",
"postcss-loader": "^2.1.5",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-hot-loader": "^3.1.3",
"redux": "^3.7.2",
"redux-devtools-extension": "^2.13.8",
"resolve-url-loader": "^2.3.2",
"rimraf": "^2.6.3",
"sass-lint": "^1.13.1",
"sass-lint-fix": "^1.12.1",
"sass-loader": "^6.0.6",
"script-ext-html-webpack-plugin": "^2.1.4",
"style-loader": "^0.19.0",
"svg-url-loader": "^2.3.3",
"terser-webpack-plugin": "^2.3.4",
"url-loader": "^0.6.2",
"webpack": "^4.42.1",
"webpack-cli": "^3.3.11",
"webpack-dev-server": "^3.10.3",
"webpack-manifest-plugin": "^1.3.2",
"webpack-merge": "^4.1.1"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com/"
},
"browserslist": [
"defaults",
"ie>=11"
],
"stylelint": {
"rules": {
"block-no-empty": null,
"color-no-invalid-hex": true,
"comment-empty-line-before": [
"always",
{
"ignore": [
"stylelint-commands",
"after-comment"
]
}
],
"declaration-colon-space-after": "always",
"indentation": [
4,
{
"except": [
"value"
]
}
],
"max-empty-lines": 2,
"rule-empty-line-before": [
"always",
{
"except": [
"first-nested"
],
"ignore": [
"after-comment"
]
}
],
"unit-whitelist": [
"em",
"rem",
"%",
"s",
"px"
]
}
}
"name": "@a2nt/meta-lightbox",
"version": "2.0.9",
"description": "Universal Lightbox window",
"main": "meta-lightbox.js",
"author": "Tony Air <tony@twma.pro>",
"license": "BSD-2-Clause",
"repository": {
"type": "git",
"url": "git+https://github.com/a2nt/meta-lightbox.git"
},
"engines": {
"yarn": ">= 1.0.0"
},
"scripts": {
"start": "cross-env NODE_ENV=development webpack-dev-server --https -d --config webpack.config.js",
"dash": "cross-env NODE_ENV=development webpack-dashboard -- webpack-dev-server --config webpack.config.js",
"build": "cross-env NODE_ENV=production webpack -p --config webpack.config.js --progress",
"lint:check": "eslint ./src --config .eslintrc && sass-lint ./src --config .sasslintrc -v -q",
"lint:fix": "eslint ./src --config .eslintrc --fix && sass-lint ./src --config .sasslintrc -v -q --fix",
"lint:js": "eslint ./src --config .eslintrc",
"lint:sass": "sass-lint ./src --config .sasslintrc -v -q",
"prebuild": "yarn lint:fix && rimraf dist",
"prepare": "yarn lint:fix && yarn build",
"prunecaches": "rimraf ./node_modules/.cache/",
"postinstall": "npm run prunecaches",
"postuninstall": "npm run prunecaches",
"preinstall": "npx only-allow pnpm"
},
"browserslist": [
"defaults",
"ie>=11"
],
"dependencies": {
"@a2nt/ss-bootstrap-ui-webpack-boilerplate": "^2.0.7",
"bootbox": "^4.4.0",
"bootstrap": "^4.5.0",
"bootstrap-confirmation2": "^4.1.0",
"bootstrap-datepicker": "^1.9.0",
"bootstrap-offcanvas": "^1.0.0",
"bootstrap-table": "^1.16.0",
"bootstrap-timepicker": "^0.5.2",
"font-awesome": "^4.7.0",
"hammerjs": "^2.0.8",
"inputmask": "^5.0.3",
"jquery": "^3.5.1",
"jquery-hammerjs": "^2.0.0",
"jquery-hoverintent": "*",
"jquery-zoom": "^1.7.21",
"jquery.appear": "^1.0.1",
"mapbox-gl": "^1.10.0",
"material-design-color": "^2.3.2",
"offcanvas-bootstrap": "^2.5.2",
"popper.js": "*",
"pouchdb": "^6.4.3",
"select2": "^4.0.8",
"smooth-scroll": "^14.2.1",
"sticky-sidebar": "^3.3.1",
"yarn": "^1.22.4"
},
"devDependencies": {
"@a2nt/image-sprite-webpack-plugin": "^0.2.5",
"@babel/core": "^7.8.4",
"@babel/plugin-proposal-object-rest-spread": "^7.8.3",
"@babel/plugin-transform-react-jsx": "^7.9.4",
"@babel/preset-env": "^7.9.6",
"@google/markerclusterer": "^1.0.3",
"animate.css": "^3.7.0",
"autoprefixer": "^9.7.4",
"babel-eslint": "^8.2.6",
"babel-loader": "^8.1.0",
"copy-webpack-plugin": "^4.6.0",
"croppie": "^2.6.4",
"cross-env": "^5.2.1",
"css-loader": "^3.5.3",
"eslint": "^4.18.1",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-jquery": "^1.5.1",
"eslint-plugin-react": "^7.20.0",
"exports-loader": "^0.7.0",
"favicons-webpack-plugin": "0.0.9",
"file-loader": "^5.1.0",
"font-awesome": "^4.7.0",
"hard-source-webpack-plugin": "^0.13.1",
"html-loader": "^1.1.0",
"html-webpack-plugin": "^4.3.0",
"imagemin-gifsicle": "^7.0.0",
"imagemin-jpegtran": "^6.0.0",
"imagemin-optipng": "^7.1.0",
"imagemin-svgo": "^7.1.0",
"imagemin-webpack": "^5.1.1",
"loglevel": "^1.6.8",
"mini-css-extract-plugin": "^0.9.0",
"node-sass": "^4.14.1",
"optimize-css-assets-webpack-plugin": "^5.0.3",
"postcss-loader": "^3.0.0",
"react-hot-loader": "^4.12.21",
"resolve-url-loader": "^3.1.1",
"rimraf": "^2.7.1",
"routie": "0.0.1",
"sass-lint": "^1.13.1",
"sass-lint-fix": "^1.12.1",
"sass-loader": "^8.0.2",
"script-ext-html-webpack-plugin": "^2.1.4",
"style-loader": "^0.19.0",
"svg-url-loader": "^2.3.3",
"terser-webpack-plugin": "^2.3.6",
"url-loader": "^0.6.2",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.11",
"webpack-dev-server": "^3.10.3",
"webpack-manifest-plugin": "^1.3.2",
"webpack-merge": "^4.2.2"
},
"stylelint": {
"rules": {
"block-no-empty": null,
"color-no-invalid-hex": true,
"comment-empty-line-before": [
"always",
{
"ignore": [
"stylelint-commands",
"after-comment"
]
}
],
"declaration-colon-space-after": "always",
"indentation": [
4,
{
"except": [
"value"
]
}
],
"max-empty-lines": 2,
"rule-empty-line-before": [
"always",
{
"except": [
"first-nested"
],
"ignore": [
"after-comment"
]
}
],
"unit-whitelist": [
"em",
"rem",
"%",
"s",
"px"
]
}
}
}

View File

@ -4,6 +4,5 @@
*
*/
import '../scss/index.scss';
import '../scss/app.scss';
import './meta-lightbox';

View File

@ -9,7 +9,7 @@ const filesystem = require('fs');
const autoprefixer = require('autoprefixer');
const HardSourceWebpackPlugin = require('hard-source-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const TerserPlugin = require('terser-webpack-plugin');
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
@ -17,180 +17,238 @@ const ImageminPlugin = require('imagemin-webpack');
const ImageSpritePlugin = require('@a2nt/image-sprite-webpack-plugin');
const plugins = [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('production'),
},
}),
new HardSourceWebpackPlugin(),
new webpack.LoaderOptionsPlugin({
minimize: COMPRESS,
debug: false,
}),
new ExtractTextPlugin({
filename: 'css/[name].css',
allChunks: true,
}),
/**/
new HtmlWebpackPlugin({
template: './src/index.html',
}),
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('production'),
},
}),
new HardSourceWebpackPlugin(),
new webpack.LoaderOptionsPlugin({
minimize: COMPRESS,
debug: false,
}),
new MiniCssExtractPlugin({
filename: 'css/[name].css',
allChunks: true,
}),
/**/
new HtmlWebpackPlugin({
template: './src/index.html',
}),
];
if (COMPRESS) {
plugins.push(
new OptimizeCssAssetsPlugin({
//assetNameRegExp: /\.optimize\.css$/g,
cssProcessor: require('cssnano'),
cssProcessorPluginOptions: {
preset: ['default'],
},
cssProcessorOptions: {
zindex: true,
cssDeclarationSorter: true,
reduceIdents: false,
mergeIdents: true,
mergeRules: true,
mergeLonghand: true,
discardUnused: true,
discardOverridden: true,
discardDuplicates: true,
discardComments: {
removeAll: true,
},
},
canPrint: true,
}),
);
plugins.push(
new OptimizeCssAssetsPlugin({
//assetNameRegExp: /\.optimize\.css$/g,
cssProcessor: require('cssnano'),
cssProcessorPluginOptions: {
preset: ['default'],
},
cssProcessorOptions: {
zindex: true,
cssDeclarationSorter: true,
reduceIdents: false,
mergeIdents: true,
mergeRules: true,
mergeLonghand: true,
discardUnused: true,
discardOverridden: true,
discardDuplicates: true,
discardComments: {
removeAll: true,
},
},
canPrint: true,
}),
);
plugins.push(
new ImageminPlugin({
bail: false, // Ignore errors on corrupted images
cache: true,
filter: (source, sourcePath) => {
if (source.byteLength < 512000) {
return false;
}
plugins.push(
new ImageminPlugin({
bail: false, // Ignore errors on corrupted images
cache: true,
filter: (source, sourcePath) => {
if (source.byteLength < 512000) {
return false;
}
return true;
},
imageminOptions: {
plugins: [
['gifsicle', { interlaced: true }],
['jpegtran', { progressive: true }],
['optipng', { optimizationLevel: 5 }],
[
'svgo',
{
plugins: [
{
removeViewBox: false,
},
],
},
],
],
},
}),
);
return true;
},
imageminOptions: {
plugins: [
['gifsicle', { interlaced: true }],
['jpegtran', { progressive: true }],
['optipng', { optimizationLevel: 5 }],
[
'svgo',
{
plugins: [
{
removeViewBox: false,
},
],
},
],
],
},
}),
);
plugins.push(
new ImageSpritePlugin({
exclude: /exclude|original|default-|icons|sprite/,
commentOrigin: false,
compress: true,
extensions: ['png'],
indent: '',
log: true,
//outputPath: path.join(__dirname, conf.APPDIR, conf.DIST),
outputFilename: 'img/sprite-[hash].png',
padding: 0,
}),
);
plugins.push(
new ImageSpritePlugin({
exclude: /exclude|original|default-|icons|sprite/,
commentOrigin: false,
compress: true,
extensions: ['png'],
indent: '',
log: true,
//outputPath: path.join(__dirname, conf.APPDIR, conf.DIST),
outputFilename: 'img/sprite-[hash].png',
padding: 0,
}),
);
}
const includes = {
app: './src/js/index.js',
const includes = {};
const _addAppFiles = (theme) => {
const dirPath = path.resolve(__dirname, theme);
const themeName = path.basename(theme);
if (filesystem.existsSync(path.join(dirPath, 'js', 'app.js'))) {
includes['app'] = path.join(dirPath, 'js', 'app.js');
} else if (filesystem.existsSync(path.join(dirPath, 'scss', 'app.scss'))) {
includes['app'] = path.join(dirPath, 'scss', 'app.scss');
}
const _getAllFilesFromFolder = function (dir, includeSubFolders = true) {
const dirPath = path.resolve(__dirname, dir);
let results = [];
filesystem.readdirSync(dirPath).forEach((file) => {
if (file.charAt(0) === '_') {
return;
}
const filePath = path.join(dirPath, file);
const stat = filesystem.statSync(filePath);
if (stat && stat.isDirectory() && includeSubFolders) {
results = results.concat(
_getAllFilesFromFolder(filePath, includeSubFolders),
);
} else {
results.push(filePath);
}
});
return results;
};
// add page specific scripts
const typesJSPath = path.join(theme, 'js/types');
if (filesystem.existsSync(typesJSPath)) {
const pageScripts = _getAllFilesFromFolder(typesJSPath, true);
pageScripts.forEach((file) => {
includes[`app_${path.basename(file, '.js')}`] = file;
});
}
// add page specific scss
const typesSCSSPath = path.join(theme, 'scss/types');
if (filesystem.existsSync(typesSCSSPath)) {
const scssIncludes = _getAllFilesFromFolder(typesSCSSPath, true);
scssIncludes.forEach((file) => {
includes[`app_${path.basename(file, '.scss')}`] = file;
});
}
};
_addAppFiles(SOURCEDIR);
// remove unnecessary elements for the demo
delete includes['app_cms'];
delete includes['app_editor'];
delete includes['app_order'];
module.exports = {
entry: includes,
output: {
path: path.resolve(__dirname, 'dist'),
filename: path.join('js', '[name].js'),
publicPath: path.resolve(__dirname, 'dist'),
},
devtool: COMPRESS ? '' : 'source-map',
externals: {
jquery: 'jQuery',
},
optimization: {
namedModules: true, // NamedModulesPlugin()
splitChunks: {
// CommonsChunkPlugin()
name: 'vendor',
minChunks: 2,
},
noEmitOnErrors: true, // NoEmitOnErrorsPlugin
concatenateModules: true, //ModuleConcatenationPlugin
minimizer: [
new TerserPlugin({
terserOptions: {
parse: {
// we want terser to parse ecma 8 code. However, we don't want it
// to apply any minfication steps that turns valid ecma 5 code
// into invalid ecma 5 code. This is why the 'compress' and 'output'
// sections only apply transformations that are ecma 5 safe
// https://github.com/facebook/create-react-app/pull/4234
ecma: 8,
},
compress: {
ecma: 5,
warnings: false,
// Disabled because of an issue with Uglify breaking seemingly valid code:
// https://github.com/facebook/create-react-app/issues/2376
// Pending further investigation:
// https://github.com/mishoo/UglifyJS2/issues/2011
comparisons: false,
},
mangle: {
safari10: true,
},
output: {
ecma: 5,
comments: false,
// Turned on because emoji and regex is not minified properly using default
// https://github.com/facebook/create-react-app/issues/2488
ascii_only: true,
},
},
// Use multi-process parallel running to improve the build speed
// Default number of concurrent runs: os.cpus().length - 1
parallel: true,
// Enable file caching
cache: true,
}),
],
},
module: {
rules: [
{
test: /\.jsx?$/,
//exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'], //Preset used for env setup
plugins: [
['@babel/transform-react-jsx'],
['react-hot-loader/babel'],
],
cacheDirectory: true,
cacheCompression: false,
},
},
},
/*{
entry: includes,
output: {
path: path.resolve(__dirname, 'dist'),
filename: path.join('js', '[name].js'),
publicPath: path.resolve(__dirname, 'dist'),
},
devtool: COMPRESS ? '' : 'source-map',
externals: {
jquery: 'jQuery',
},
optimization: {
namedModules: true, // NamedModulesPlugin()
splitChunks: {
// CommonsChunkPlugin()
name: 'vendor',
minChunks: 2,
},
noEmitOnErrors: true, // NoEmitOnErrorsPlugin
concatenateModules: true, //ModuleConcatenationPlugin
minimizer: [
new TerserPlugin({
terserOptions: {
parse: {
// we want terser to parse ecma 8 code. However, we don't want it
// to apply any minfication steps that turns valid ecma 5 code
// into invalid ecma 5 code. This is why the 'compress' and 'output'
// sections only apply transformations that are ecma 5 safe
// https://github.com/facebook/create-react-app/pull/4234
ecma: 8,
},
compress: {
ecma: 5,
warnings: false,
// Disabled because of an issue with Uglify breaking seemingly valid code:
// https://github.com/facebook/create-react-app/issues/2376
// Pending further investigation:
// https://github.com/mishoo/UglifyJS2/issues/2011
comparisons: false,
},
mangle: {
safari10: true,
},
output: {
ecma: 5,
comments: false,
// Turned on because emoji and regex is not minified properly using default
// https://github.com/facebook/create-react-app/issues/2488
ascii_only: true,
},
},
// Use multi-process parallel running to improve the build speed
// Default number of concurrent runs: os.cpus().length - 1
parallel: true,
// Enable file caching
cache: true,
}),
],
},
module: {
rules: [
{
test: /\.jsx?$/,
//exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'], //Preset used for env setup
plugins: [
['@babel/transform-react-jsx'],
['react-hot-loader/babel'],
],
cacheDirectory: true,
cacheCompression: false,
},
},
},
/*{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
@ -199,109 +257,109 @@ module.exports = {
test: /\.coffee?$/,
use: 'coffee-loader',
},*/
{
test: /\.worker\.js$/,
use: {
loader: 'worker-loader',
},
},
{
test: /\.s?css$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [
{
loader: 'css-loader',
options: {
sourceMap: !COMPRESS,
},
},
{
loader: 'postcss-loader',
options: {
sourceMap: !COMPRESS,
plugins: [autoprefixer()],
},
},
{
loader: 'resolve-url-loader',
},
{
loader: 'sass-loader',
options: {
sourceMap: !COMPRESS,
},
},
],
}),
},
{
test: /fontawesome([^.]+).(ttf|otf|eot|svg|woff(2)?)(\?[a-z0-9]+)?$/,
use: [
{
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: 'fonts/',
publicPath: '../fonts/',
},
},
],
},
{
test: /\.(ttf|otf|eot|svg|woff(2)?)$/,
use: [
{
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: 'fonts/',
publicPath: '../fonts/',
},
},
],
},
{
test: /\.(png|jpg|jpeg|gif|svg)$/,
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: 'img/',
publicPath: '../img/',
},
},
],
},
resolve: {
modules: [
path.resolve(__dirname, 'src'),
path.resolve(__dirname, 'node_modules'),
],
alias: {
jquery: require.resolve('jquery'),
jQuery: require.resolve('jquery'),
},
},
plugins: plugins,
{
test: /\.worker\.js$/,
use: {
loader: 'worker-loader',
},
},
{
test: /\.s?css$/,
use: [
{
loader: MiniCssExtractPlugin.loader,
},
{
loader: 'css-loader',
options: {
sourceMap: !COMPRESS,
},
},
{
loader: 'postcss-loader',
options: {
sourceMap: !COMPRESS,
plugins: [autoprefixer()],
},
},
{
loader: 'resolve-url-loader',
},
{
loader: 'sass-loader',
options: {
sourceMap: !COMPRESS,
},
},
],
},
{
test: /fontawesome([^.]+).(ttf|otf|eot|svg|woff(2)?)(\?[a-z0-9]+)?$/,
use: [
{
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: 'fonts/',
publicPath: '../fonts/',
},
},
],
},
{
test: /\.(ttf|otf|eot|svg|woff(2)?)$/,
use: [
{
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: 'fonts/',
publicPath: '../fonts/',
},
},
],
},
{
test: /\.(png|jpg|jpeg|gif|svg)$/,
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: 'img/',
publicPath: '../img/',
},
},
],
},
resolve: {
modules: [
path.resolve(__dirname, 'src'),
path.resolve(__dirname, 'node_modules'),
],
alias: {
jquery: require.resolve('jquery'),
jQuery: require.resolve('jquery'),
},
},
plugins: plugins,
devServer: {
host: '127.0.0.1',
port: 8001,
historyApiFallback: true,
hot: false,
clientLogLevel: 'info',
contentBase: [
path.resolve(__dirname, 'src'),
path.resolve(__dirname, 'node_modules'),
path.resolve(__dirname, 'dist'),
],
//watchContentBase: true,
overlay: {
warnings: true,
errors: true,
},
headers: {
'Access-Control-Allow-Origin': '*',
},
},
devServer: {
host: '127.0.0.1',
port: 8001,
historyApiFallback: true,
hot: false,
clientLogLevel: 'info',
contentBase: [
path.resolve(__dirname, 'src'),
path.resolve(__dirname, 'node_modules'),
path.resolve(__dirname, 'dist'),
],
//watchContentBase: true,
overlay: {
warnings: true,
errors: true,
},
headers: {
'Access-Control-Allow-Origin': '*',
},
},
};