UNPKG

npm-moa-gallery

Version:
1 lines 7.92 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("blueimp-gallery/css/blueimp-gallery.min.css"),require("blueimp-gallery/js/blueimp-gallery-fullscreen.js"),require("blueimp-gallery/js/blueimp-gallery-video.js"),require("blueimp-gallery/js/blueimp-gallery-youtube.js"),require("blueimp-gallery/js/blueimp-gallery.js")):"function"==typeof define&&define.amd?define(["exports","blueimp-gallery/css/blueimp-gallery.min.css","blueimp-gallery/js/blueimp-gallery-fullscreen.js","blueimp-gallery/js/blueimp-gallery-video.js","blueimp-gallery/js/blueimp-gallery-youtube.js","blueimp-gallery/js/blueimp-gallery.js"],t):t((e=e||self).Gallery={},null,null,null,null,e.blueimp)}(this,function(e,t,i,n,l,a){"use strict";a=a&&a.hasOwnProperty("default")?a.default:a;var o={name:"BlueMapGallery",props:{images:{type:Array,default:function(){return[]}},options:{type:Object,default:function(){return{}}},carousel:{type:Boolean,default:!1},index:{type:Number},id:{type:String,default:"blueimp-gallery"}},data:function(){return{instance:null}},watch:{index:function(e){this.carousel||(null!==e?this.open(e):(this.instance&&this.instance.close(),this.$emit("close")))}},mounted:function(){this.carousel&&this.open()},destroyed:function(){null!==this.instance&&(this.instance.destroyEventListeners(),this.instance.close(),this.instance=null)},methods:{open:function(e){var t=this;void 0===e&&(e=0);var i=void 0!==a.Gallery?a.Gallery:a,n=Object.assign({toggleControlsOnReturn:!1,toggleControlsOnSlideClick:!1,closeOnSlideClick:!1,carousel:this.carousel,container:"#"+this.id,index:e,onopen:function(){return t.$emit("onopen")},onopened:function(){return t.$emit("onopened")},onslide:this.onSlideCustom,onslideend:function(e,i){return t.$emit("onslideend",{index:e,slide:i})},onslidecomplete:function(e,i){return t.$emit("onslidecomplete",{index:e,slide:i})},onclose:function(){return t.$emit("close")},onclosed:function(){return t.$emit("onclosed")}},this.options);this.carousel&&(n.container=this.$el),this.instance=i(this.images,n)},onSlideCustom:function(e,t){this.$emit("onslide",{index:e,slide:t});var i=this.images[e];if(void 0!==i){var n=i.description,l=this.instance.container.find(".description");n&&(l.empty(),l[0].appendChild(document.createTextNode(n)))}}}};var s=function(e,t,i,n,l,a,o,s,r,d){"boolean"!=typeof o&&(r=s,s=o,o=!1);var c,u="function"==typeof i?i.options:i;if(e&&e.render&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0,l&&(u.functional=!0)),n&&(u._scopeId=n),a?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,r(e)),e&&e._registeredComponents&&e._registeredComponents.add(a)},u._ssrRegister=c):t&&(c=o?function(){t.call(this,d(this.$root.$options.shadowRoot))}:function(e){t.call(this,s(e))}),c)if(u.functional){var p=u.render;u.render=function(e,t){return c.call(t),p(e,t)}}else{var m=u.beforeCreate;u.beforeCreate=m?[].concat(m,c):[c]}return i},r="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());var d=document.head||document.getElementsByTagName("head")[0],c={};var u=function(e){return function(e,t){return function(e,t){var i=r?t.media||"default":e,n=c[i]||(c[i]={ids:new Set,styles:[]});if(!n.ids.has(e)){n.ids.add(e);var l=t.source;if(t.map&&(l+="\n/*# sourceURL="+t.map.sources[0]+" */",l+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t.map))))+" */"),n.element||(n.element=document.createElement("style"),n.element.type="text/css",t.media&&n.element.setAttribute("media",t.media),d.appendChild(n.element)),"styleSheet"in n.element)n.styles.push(l),n.element.styleSheet.cssText=n.styles.filter(Boolean).join("\n");else{var a=n.ids.size-1,o=document.createTextNode(l),s=n.element.childNodes;s[a]&&n.element.removeChild(s[a]),s.length?n.element.insertBefore(o,s[a]):n.element.appendChild(o)}}}(e,t)}},p=s({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"blueimp-gallery blueimp-gallery-controls",class:{"blueimp-gallery-carousel":e.carousel},attrs:{id:e.id}},[i("div",{staticClass:"slides"}),e._v(" "),i("h3",{staticClass:"title"}),e._v(" "),i("p",{staticClass:"description"}),e._v(" "),i("a",{staticClass:"prev"},[e._t("prev",[e._v("‹")])],2),e._v(" "),i("a",{staticClass:"next"},[e._t("next",[e._v("›")])],2),e._v(" "),e.carousel?e._e():i("a",{staticClass:"close"},[e._t("close",[e._v("X")])],2),e._v(" "),e.carousel?e._e():i("ol",{staticClass:"indicator"}),e._v(" "),e.carousel?e._e():i("a",{staticClass:"play-pause"})])},staticRenderFns:[]},function(e){e&&e("data-v-042c19f6_0",{source:".blueimp-gallery>.description[data-v-042c19f6]{position:absolute;top:30px;left:15px;color:#fff;display:none}.blueimp-gallery-controls>.description[data-v-042c19f6]{display:block}.blueimp-gallery>.next[data-v-042c19f6],.blueimp-gallery>.prev[data-v-042c19f6]{color:#fff!important;background:0 0;border:0;opacity:.8;font-size:90px;font-weight:100}.blueimp-gallery>.close[data-v-042c19f6],.blueimp-gallery>.title[data-v-042c19f6]{color:#fff!important;opacity:.7}",map:void 0,media:void 0})},o,"data-v-042c19f6",!1,void 0,u,void 0),m=s({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return null!=e.images&&e.images.length>0?i("div",{staticClass:"inner-banner-outer pt-0"},[e.images.length>=5?i("div",{staticClass:"col-12 img-main"},[i("div",{staticClass:"row"},[i("BlueMapGallery",{attrs:{images:e.images,index:e.index},on:{close:function(t){e.index=null}}}),e._v(" "),i("div",{staticClass:"col-6 p-0 img-left",style:{backgroundImage:"url("+e.images[0].href+")"},on:{click:function(t){e.index=0}}}),e._v(" "),i("div",{staticClass:"col-md-6 col-sm-12 p-0"},[i("div",{staticClass:"row m-0"},e._l(4,function(t){return i("div",{key:t,staticClass:"col-md-6 col-sm-12 p-0 img-right",style:{backgroundImage:"url("+e.images[t].href+")"},on:{click:function(i){e.index=t}}})}),0)])],1)]):i("div",{staticClass:"p-0 col-12 img-main"},[i("BlueMapGallery",{attrs:{images:e.images,index:e.index},on:{close:function(t){e.index=null}}}),e._v(" "),i("div",{staticClass:"img-left",style:{backgroundImage:"url("+e.images[0].href+")"},on:{click:function(t){e.index=0}}})],1),e._v(" "),i("div",{staticClass:"col-12 text-right more-btn-main"},[i("button",{staticClass:"btn more-btn",on:{click:function(t){e.index=0}}},[e._v("View Photos")])])]):e._e()},staticRenderFns:[]},function(e){e&&e("data-v-2f4d08ea_0",{source:".img-right[data-v-2f4d08ea]{opacity:1;height:350px;background-repeat:no-repeat;background-size:cover;background-position:center;transition:all .5s ease;border:solid 1px #000}.img-left[data-v-2f4d08ea]:hover,.img-right[data-v-2f4d08ea]:hover{cursor:pointer;opacity:.8}.img-left[data-v-2f4d08ea]{height:700px;opacity:1;background-repeat:no-repeat;background-position:center;background-size:cover;border:solid 1px #000}.img-sect[data-v-2f4d08ea]{width:100%;padding-top:70px;padding-bottom:50px;border-top:4px solid rgba(0,166,127,.2);float:left;width:100%}.img-main[data-v-2f4d08ea]{background-color:#000}.more-btn-main[data-v-2f4d08ea]{position:relative;top:-83px;right:20px}.more-btn[data-v-2f4d08ea]:hover{background:#00a59c;color:#fff}.more-btn[data-v-2f4d08ea]{padding:10px 33px;background:#383838;color:#fff;font-weight:900;font-size:18px;text-transform:capitalize}",map:void 0,media:void 0})},{name:"Gallery",props:{images:{type:Array,default:function(){return[]}}},data:function(){return{index:null}},components:{BlueMapGallery:p},methods:{}},"data-v-2f4d08ea",!1,void 0,u,void 0);function f(e){f.installed||(f.installed=!0,e.component("Gallery",m))}var g={install:f},v=null;"undefined"!=typeof window?v=window.Vue:"undefined"!=typeof global&&(v=global.Vue),v&&v.use(g),m.install=f,e.default=m,Object.defineProperty(e,"__esModule",{value:!0})});