maz-ui 3.6.12 → 3.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/components/MazAvatar.mjs +113 -55
- package/components/MazAvatar.umd.js +2 -2
- package/components/MazBackdrop.mjs +49 -23
- package/components/MazBackdrop.umd.js +2 -2
- package/components/MazBadge.mjs +17 -11
- package/components/MazBadge.umd.js +2 -2
- package/components/MazBottomSheet.mjs +160 -88
- package/components/MazBottomSheet.umd.js +2 -2
- package/components/MazBtn.mjs +54 -29
- package/components/MazBtn.umd.js +2 -2
- package/components/MazCard.mjs +322 -193
- package/components/MazCard.umd.js +2 -2
- package/components/MazCarousel.mjs +123 -77
- package/components/MazCarousel.umd.js +2 -2
- package/components/MazChart.d.ts +3 -34
- package/components/MazChart.mjs +2 -2
- package/components/MazChart.umd.js +2 -2
- package/components/MazCheckbox.mjs +25 -19
- package/components/MazCheckbox.umd.js +2 -2
- package/components/MazDialog.d.ts +51 -0
- package/components/MazDialog.mjs +210 -100
- package/components/MazDialog.umd.js +2 -2
- package/components/MazDialogPromise.mjs +234 -105
- package/components/MazDialogPromise.umd.js +2 -2
- package/components/MazDrawer.mjs +149 -80
- package/components/MazDrawer.umd.js +2 -2
- package/components/MazDropzone.d.ts +2 -2
- package/components/MazDropzone.mjs +72 -42
- package/components/MazDropzone.umd.js +2 -2
- package/components/MazGallery.mjs +158 -80
- package/components/MazGallery.umd.js +2 -2
- package/components/MazIcon.mjs +27 -15
- package/components/MazIcon.umd.js +2 -2
- package/components/MazInput.mjs +183 -140
- package/components/MazInput.umd.js +2 -2
- package/components/MazInputNumber.d.ts +1 -1
- package/components/MazInputNumber.mjs +244 -193
- package/components/MazInputNumber.umd.js +2 -2
- package/components/MazInputPrice.d.ts +1 -1
- package/components/MazInputPrice.mjs +207 -156
- package/components/MazInputPrice.umd.js +2 -2
- package/components/MazInputTags.mjs +260 -195
- package/components/MazInputTags.umd.js +2 -2
- package/components/MazLazyImg.mjs +48 -21
- package/components/MazLazyImg.umd.js +2 -2
- package/components/MazPhoneNumberInput.mjs +383 -279
- package/components/MazPhoneNumberInput.umd.js +2 -2
- package/components/MazPicker.mjs +755 -486
- package/components/MazPicker.umd.js +2 -2
- package/components/MazRadioButtons.mjs +52 -36
- package/components/MazRadioButtons.umd.js +2 -2
- package/components/MazSelect.mjs +324 -254
- package/components/MazSelect.umd.js +2 -2
- package/components/MazSlider.d.ts +1 -1
- package/components/MazSlider.mjs +97 -45
- package/components/MazSlider.umd.js +2 -2
- package/components/MazSpinner.mjs +8 -2
- package/components/MazSpinner.umd.js +2 -2
- package/components/MazStepper.mjs +144 -84
- package/components/MazStepper.umd.js +2 -2
- package/components/MazSwitch.mjs +34 -22
- package/components/MazSwitch.umd.js +2 -2
- package/components/MazTabsBar.mjs +111 -57
- package/components/MazTabsBar.umd.js +2 -2
- package/components/MazTabsContent.mjs +14 -8
- package/components/MazTabsContent.umd.js +2 -2
- package/components/MazTabsContentItem.mjs +17 -9
- package/components/MazTabsContentItem.umd.js +2 -2
- package/components/MazTextarea.mjs +52 -40
- package/components/MazTextarea.umd.js +2 -2
- package/components/MazTransitionExpand.mjs +2 -1
- package/components/MazTransitionExpand.umd.js +2 -2
- package/components/assets/no-photography-584c6185.mjs +4 -0
- package/components/index.mjs +1 -1
- package/css/main.css +1 -1
- package/modules/assets/no-photography-584c6185.mjs +4 -0
- package/modules/maz-ui.mjs +81 -40
- package/modules/maz-ui.umd.js +2 -2
- package/package.json +29 -40
- package/components/index.umd.js +0 -35
- package/components/no_photo-410a8f01.mjs +0 -4
- package/modules/no_photo-410a8f01.mjs +0 -4
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode(".m-gallery[data-v-e9dc5a9e]{position:relative;overflow:hidden}.m-gallery__hidden[data-v-e9dc5a9e]{display:none}.m-gallery__item[data-v-e9dc5a9e]{position:absolute;top:0px;margin:0;height:50%;width:100%;overflow:hidden;border-left-width:2px;border-color:transparent;padding:0}.m-gallery__item--1[data-v-e9dc5a9e]{left:0;height:100%}.m-gallery__item--1[data-v-e9dc5a9e]:not(:last-child){width:50%}.m-gallery__item--2[data-v-e9dc5a9e]{left:50%;width:50%;height:50%}.m-gallery__item--2[data-v-e9dc5a9e]:last-child{height:100%}.m-gallery__item--2[data-v-e9dc5a9e]:nth-last-child(4){width:25%}.m-gallery__item--3[data-v-e9dc5a9e]{top:50%;left:50%;width:25%}.m-gallery__item--3[data-v-e9dc5a9e]:last-child{width:50%}.m-gallery__item--3[data-v-e9dc5a9e]:nth-last-child(3){top:0;left:75%}.m-gallery__item--4[data-v-e9dc5a9e]{border-top-width:2px;border-color:transparent;top:50%;left:50%;width:25%}.m-gallery__item--4[data-v-e9dc5a9e]:last-child{left:75%;width:25%}.m-gallery__item--5[data-v-e9dc5a9e]{border-top-width:2px;border-color:transparent;top:50%;left:75%;width:25%}.m-gallery__item[data-v-e9dc5a9e]:first-child{border-left:0}.m-gallery__item--3[data-v-e9dc5a9e]:last-child,.m-gallery__item--3[data-v-e9dc5a9e]:nth-last-child(2),.m-gallery__item--4[data-v-e9dc5a9e]:last-child,.m-gallery__item--5[data-v-e9dc5a9e]{border-top-width:2px;border-color:transparent}.m-gallery__item__image[data-v-e9dc5a9e]{height:100%;max-width:100%;width:100%;background-position:center center;background-size:cover;background-repeat:no-repeat;background-color:#0000007f}.m-gallery__remaining-layer[data-v-e9dc5a9e]{position:absolute;top:0;bottom:0;right:0;left:0}.m-gallery__remaining-layer a span[data-v-e9dc5a9e]{color:#fff;font-size:2rem}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
4
|
var __publicField = (obj, key, value) => {
|
|
5
5
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
6
6
|
return value;
|
|
7
7
|
};
|
|
8
|
-
import { inject, defineComponent, ref, computed, onMounted, watchEffect, openBlock, createElementBlock,
|
|
8
|
+
import { inject, defineComponent, ref, computed, onMounted, watchEffect, openBlock, createElementBlock, Fragment, createCommentVNode, mergeProps, nextTick, onBeforeMount, resolveComponent, resolveDirective, normalizeClass, normalizeStyle, createElementVNode, renderList, withDirectives, toDisplayString, createVNode } from "vue";
|
|
9
9
|
const style = `
|
|
10
10
|
.maz-zoom-img {
|
|
11
11
|
position: fixed;
|
|
@@ -211,7 +211,10 @@ class VueZoomImg {
|
|
|
211
211
|
el.style.cursor = "";
|
|
212
212
|
}
|
|
213
213
|
renderPreview(el, options) {
|
|
214
|
-
el.classList.add(
|
|
214
|
+
el.classList.add(
|
|
215
|
+
"maz-is-open"
|
|
216
|
+
/* OPEN */
|
|
217
|
+
);
|
|
215
218
|
this.addStyle(style);
|
|
216
219
|
const container = document.createElement("div");
|
|
217
220
|
container.classList.add("maz-zoom-img");
|
|
@@ -303,7 +306,10 @@ class VueZoomImg {
|
|
|
303
306
|
".maz-zoom-img-instance.maz-is-open"
|
|
304
307
|
);
|
|
305
308
|
if (instance2)
|
|
306
|
-
instance2.classList.remove(
|
|
309
|
+
instance2.classList.remove(
|
|
310
|
+
"maz-is-open"
|
|
311
|
+
/* OPEN */
|
|
312
|
+
);
|
|
307
313
|
if (container)
|
|
308
314
|
container.classList.remove("maz-animate");
|
|
309
315
|
this.keyboardEventHandler(false);
|
|
@@ -332,8 +338,14 @@ class VueZoomImg {
|
|
|
332
338
|
}
|
|
333
339
|
}
|
|
334
340
|
useNextInstance(currentInstance, nextInstance) {
|
|
335
|
-
currentInstance.classList.remove(
|
|
336
|
-
|
|
341
|
+
currentInstance.classList.remove(
|
|
342
|
+
"maz-is-open"
|
|
343
|
+
/* OPEN */
|
|
344
|
+
);
|
|
345
|
+
nextInstance.classList.add(
|
|
346
|
+
"maz-is-open"
|
|
347
|
+
/* OPEN */
|
|
348
|
+
);
|
|
337
349
|
const src = nextInstance.getAttribute("data-src");
|
|
338
350
|
const alt = nextInstance.getAttribute("data-alt");
|
|
339
351
|
this.wrapper.style.width = "";
|
|
@@ -401,7 +413,7 @@ class LazyImg {
|
|
|
401
413
|
this.onImgErrorCallback = this.imageHasError.bind(this);
|
|
402
414
|
}
|
|
403
415
|
async loadErrorPhoto() {
|
|
404
|
-
const { default: photo } = await
|
|
416
|
+
const { default: photo } = await Promise.resolve().then(() => noPhotography);
|
|
405
417
|
return photo;
|
|
406
418
|
}
|
|
407
419
|
buildOptions(opts) {
|
|
@@ -746,23 +758,39 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
746
758
|
};
|
|
747
759
|
watchEffect(() => getSource(fullSrc.value));
|
|
748
760
|
return (_ctx, _cache) => {
|
|
749
|
-
return
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
761
|
+
return openBlock(), createElementBlock(
|
|
762
|
+
Fragment,
|
|
763
|
+
null,
|
|
764
|
+
[
|
|
765
|
+
createCommentVNode(" eslint-disable vue/no-v-html "),
|
|
766
|
+
createCommentVNode(" eslint-disable vue/html-self-closing "),
|
|
767
|
+
svgElSource.value ? (openBlock(), createElementBlock("svg", mergeProps({
|
|
768
|
+
key: 0,
|
|
769
|
+
ref_key: "svgElem",
|
|
770
|
+
ref: svgElem,
|
|
771
|
+
width: "1em",
|
|
772
|
+
height: "1em"
|
|
773
|
+
}, {
|
|
774
|
+
...getSvgAttrs(svgElSource.value),
|
|
775
|
+
...filterAttrs(_ctx.$attrs)
|
|
776
|
+
}, {
|
|
777
|
+
style: `font-size: ${__props.size}`,
|
|
778
|
+
innerHTML: getSvgContent(svgElSource.value)
|
|
779
|
+
}), null, 16, _hoisted_1$1)) : createCommentVNode("v-if", true),
|
|
780
|
+
createCommentVNode(" eslint-enable vue/no-v-html "),
|
|
781
|
+
createCommentVNode(" eslint-enable vue/html-self-closing ")
|
|
782
|
+
],
|
|
783
|
+
2112
|
|
784
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
785
|
+
);
|
|
762
786
|
};
|
|
763
787
|
}
|
|
764
788
|
});
|
|
765
789
|
const NoPhotographyIcon = "data:image/svg+xml;base64,PHN2ZwogIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICB2aWV3Qm94PSIwIDAgMjQgMjQiCiAgc3Ryb2tlPSJub25lIgogIGZpbGw9ImN1cnJlbnRDb2xvciIKICBhcmlhLWhpZGRlbj0idHJ1ZSIKPgogIDxnPgogICAgPHJlY3QgZmlsbD0ibm9uZSIgaGVpZ2h0PSIyNCIgd2lkdGg9IjI0IiAvPgogICAgPGc+CiAgICAgIDxwYXRoCiAgICAgICAgZD0iTTguOSw2LjA3TDcuNDgsNC42Nkw5LDNoNmwxLjgzLDJIMjBjMS4xLDAsMiwwLjksMiwydjEyYzAsMC4wNS0wLjAxLDAuMS0wLjAyLDAuMTZMMjAsMTcuMTdWN2gtNC4wNWwtMS44My0ySDkuODggTDguOSw2LjA3eiBNMjAuNDksMjMuMzFMMTguMTcsMjFINGMtMS4xLDAtMi0wLjktMi0yVjdjMC0wLjU5LDAuMjctMS4xMiwwLjY4LTEuNDlsLTItMkwyLjEsMi4xbDE5LjgsMTkuOEwyMC40OSwyMy4zMXogTTkuMTksMTIuMDJDOS4wOCwxMi4zMyw5LDEyLjY1LDksMTNjMCwxLjY2LDEuMzQsMywzLDNjMC4zNSwwLDAuNjctMC4wOCwwLjk4LTAuMTlMOS4xOSwxMi4wMnogTTE2LjE3LDE5bC0xLjY4LTEuNjggQzEzLjc2LDE3Ljc1LDEyLjkxLDE4LDEyLDE4Yy0yLjc2LDAtNS0yLjI0LTUtNWMwLTAuOTEsMC4yNS0xLjc2LDAuNjgtMi40OUw0LjE3LDdINHYxMkgxNi4xN3ogTTE0LjgxLDExLjk4bDIuMDcsMi4wNyBDMTYuOTYsMTMuNzEsMTcsMTMuMzYsMTcsMTNjMC0yLjc2LTIuMjQtNS01LTVjLTAuMzYsMC0wLjcxLDAuMDQtMS4wNiwwLjEybDIuMDcsMi4wN0MxMy44NSwxMC40OSwxNC41MSwxMS4xNSwxNC44MSwxMS45OHoiCiAgICAgIC8+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K";
|
|
790
|
+
const noPhotography = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
791
|
+
__proto__: null,
|
|
792
|
+
default: NoPhotographyIcon
|
|
793
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
766
794
|
const _sfc_main = defineComponent({
|
|
767
795
|
components: { MazIcon: _sfc_main$1 },
|
|
768
796
|
directives: {
|
|
@@ -770,21 +798,34 @@ const _sfc_main = defineComponent({
|
|
|
770
798
|
"lazy-img": vLazyImg
|
|
771
799
|
},
|
|
772
800
|
props: {
|
|
801
|
+
// Array of string or object: `['https://via.placeholder.com/500', 'https://via.placeholder.com/600']` or `[{ slug: 'https://via.placeholder.com/500', alt: 'image descripton' }, { slug: 'https://via.placeholder.com/600', alt: 'image descripton' }]`
|
|
773
802
|
images: {
|
|
774
803
|
type: Array,
|
|
775
804
|
default: () => []
|
|
776
805
|
},
|
|
806
|
+
// Images count shown (max: 5)
|
|
777
807
|
imagesShownCount: { type: Number, default: 5 },
|
|
808
|
+
// Remove transparent layer with the remain count (ex: +2)
|
|
778
809
|
noRemaining: { type: Boolean, default: false },
|
|
810
|
+
// Height of gallery
|
|
779
811
|
height: { type: [Number, String], default: 150 },
|
|
812
|
+
// Remove default height
|
|
780
813
|
noHeight: { type: Boolean, default: false },
|
|
814
|
+
// Width of gallery
|
|
781
815
|
width: { type: [Number, String], default: "100%" },
|
|
816
|
+
// Remove default width
|
|
782
817
|
noWidth: { type: Boolean, default: false },
|
|
818
|
+
// Add the default border radius to gallery
|
|
783
819
|
noRadius: { type: Boolean, default: false },
|
|
820
|
+
// Add feature to show the carousel images on click
|
|
784
821
|
noZoom: { type: Boolean, default: false },
|
|
822
|
+
// Layer with photography icon when no images is provided
|
|
785
823
|
hasEmptyLayer: { type: Boolean, default: true },
|
|
824
|
+
// Lazy load image - if false, images are directly loaded
|
|
786
825
|
lazy: { type: Boolean, default: true },
|
|
826
|
+
// Blur animation effect on image hover
|
|
787
827
|
blur: { type: Boolean, default: true },
|
|
828
|
+
// Scale animation effect on image hover
|
|
788
829
|
scale: { type: Boolean, default: true }
|
|
789
830
|
},
|
|
790
831
|
setup(props) {
|
|
@@ -836,7 +877,7 @@ const _sfc_main = defineComponent({
|
|
|
836
877
|
};
|
|
837
878
|
}
|
|
838
879
|
});
|
|
839
|
-
const
|
|
880
|
+
const MazGallery_vue_vue_type_style_index_0_scoped_e9dc5a9e_lang = "";
|
|
840
881
|
const _export_sfc = (sfc, props) => {
|
|
841
882
|
const target = sfc.__vccOpts || sfc;
|
|
842
883
|
for (const [key, val] of props) {
|
|
@@ -855,66 +896,103 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
855
896
|
const _component_MazIcon = resolveComponent("MazIcon");
|
|
856
897
|
const _directive_zoom_img = resolveDirective("zoom-img");
|
|
857
898
|
const _directive_lazy_img = resolveDirective("lazy-img");
|
|
858
|
-
return _ctx.images.length > 0 || _ctx.hasEmptyLayer ? (openBlock(), createElementBlock(
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
899
|
+
return _ctx.images.length > 0 || _ctx.hasEmptyLayer ? (openBlock(), createElementBlock(
|
|
900
|
+
"div",
|
|
901
|
+
{
|
|
902
|
+
key: 0,
|
|
903
|
+
class: normalizeClass(["m-gallery maz-flex", { "maz-rounded": !_ctx.noRadius }]),
|
|
904
|
+
style: normalizeStyle([_ctx.sizeStyle])
|
|
905
|
+
},
|
|
906
|
+
[
|
|
907
|
+
createElementVNode("section", _hoisted_1, [
|
|
908
|
+
(openBlock(true), createElementBlock(
|
|
909
|
+
Fragment,
|
|
910
|
+
null,
|
|
911
|
+
renderList(_ctx.imagesShown, (image, i) => {
|
|
912
|
+
return openBlock(), createElementBlock(
|
|
913
|
+
"figure",
|
|
914
|
+
{
|
|
915
|
+
key: i,
|
|
916
|
+
class: normalizeClass(["m-gallery__item !maz-my-0 maz-flex maz-flex-center", [`m-gallery__item--${i + 1}`]])
|
|
917
|
+
},
|
|
918
|
+
[
|
|
919
|
+
withDirectives(createElementVNode("img", {
|
|
920
|
+
class: "m-gallery__item__image maz-flex-1",
|
|
921
|
+
src: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
|
|
922
|
+
alt: image.alt,
|
|
923
|
+
loading: "lazy"
|
|
924
|
+
}, null, 8, _hoisted_2), [
|
|
925
|
+
[_directive_zoom_img, {
|
|
926
|
+
src: image.src,
|
|
927
|
+
alt: image.alt,
|
|
928
|
+
disabled: _ctx.noZoom || _ctx.shouldHaveRemainingLayer(i),
|
|
929
|
+
blur: _ctx.blur,
|
|
930
|
+
scale: _ctx.scale
|
|
931
|
+
}],
|
|
932
|
+
[_directive_lazy_img, { src: image.src, disabled: !_ctx.lazy }, "bg-image"]
|
|
933
|
+
]),
|
|
934
|
+
_ctx.shouldHaveRemainingLayer(i) ? withDirectives((openBlock(), createElementBlock("div", _hoisted_3, [
|
|
935
|
+
createElementVNode(
|
|
936
|
+
"span",
|
|
937
|
+
_hoisted_4,
|
|
938
|
+
"+" + toDisplayString(_ctx.numberImagesRemaining),
|
|
939
|
+
1
|
|
940
|
+
/* TEXT */
|
|
941
|
+
)
|
|
942
|
+
])), [
|
|
943
|
+
[_directive_zoom_img, {
|
|
944
|
+
src: image.src,
|
|
945
|
+
alt: image.alt,
|
|
946
|
+
disabled: _ctx.noZoom,
|
|
947
|
+
blur: false,
|
|
948
|
+
scale: _ctx.scale
|
|
949
|
+
}]
|
|
950
|
+
]) : createCommentVNode("v-if", true)
|
|
951
|
+
],
|
|
952
|
+
2
|
|
953
|
+
/* CLASS */
|
|
954
|
+
);
|
|
955
|
+
}),
|
|
956
|
+
128
|
|
957
|
+
/* KEYED_FRAGMENT */
|
|
958
|
+
)),
|
|
959
|
+
_ctx.hasEmptyLayer && _ctx.images.length === 0 ? (openBlock(), createElementBlock(
|
|
960
|
+
"div",
|
|
961
|
+
{
|
|
962
|
+
key: 0,
|
|
963
|
+
class: normalizeClass(["flex-center maz-flex maz-w-full maz-bg-color-light maz-text-normal", { "maz-rounded-xl": !_ctx.noRadius }]),
|
|
964
|
+
style: normalizeStyle([_ctx.sizeStyle])
|
|
965
|
+
},
|
|
966
|
+
[
|
|
967
|
+
createVNode(_component_MazIcon, {
|
|
968
|
+
src: _ctx.NoPhotographyIcon,
|
|
969
|
+
size: "2rem"
|
|
970
|
+
}, null, 8, ["src"])
|
|
971
|
+
],
|
|
972
|
+
6
|
|
973
|
+
/* CLASS, STYLE */
|
|
974
|
+
)) : createCommentVNode("v-if", true)
|
|
975
|
+
]),
|
|
976
|
+
(openBlock(true), createElementBlock(
|
|
977
|
+
Fragment,
|
|
978
|
+
null,
|
|
979
|
+
renderList(_ctx.imagesHidden, (image, i) => {
|
|
980
|
+
return withDirectives((openBlock(), createElementBlock("div", {
|
|
981
|
+
key: i,
|
|
982
|
+
class: "m-gallery__hidden"
|
|
983
|
+
})), [
|
|
984
|
+
[_directive_zoom_img, { src: image.src, disabled: _ctx.noZoom }]
|
|
985
|
+
]);
|
|
986
|
+
}),
|
|
987
|
+
128
|
|
988
|
+
/* KEYED_FRAGMENT */
|
|
989
|
+
))
|
|
990
|
+
],
|
|
991
|
+
6
|
|
992
|
+
/* CLASS, STYLE */
|
|
993
|
+
)) : createCommentVNode("v-if", true);
|
|
916
994
|
}
|
|
917
|
-
const MazGallery = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
995
|
+
const MazGallery = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-e9dc5a9e"]]);
|
|
918
996
|
export {
|
|
919
997
|
MazGallery as default
|
|
920
998
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProp=Object.defineProperty,__defNormalProp=(e,t,s)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,__publicField=(e,t,s)=>(__defNormalProp(e,"symbol"!=typeof t?t+"":t,s),s);!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).MazGallery=t(e.Vue)}(this,(function(e){"use strict";const t={close:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',next:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>',previous:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></svg>',spinner:'<svg width="40px" height="40px" version="1.1" xmlns="http://www.w3.org/2000/svg" fill="currentColor" x="0px" y="0px" viewBox="0 0 50 50" xml:space="preserve" class="maz-zoom-img__loader__svg" data-v-6d1cb50c=""><path d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z"></path></svg>'};class s{constructor(e){if(__publicField(this,"options"),__publicField(this,"loader"),__publicField(this,"wrapper"),__publicField(this,"img"),__publicField(this,"keydownHandler"),__publicField(this,"onImgLoadedCallback"),__publicField(this,"buttonsAdded"),__publicField(this,"defaultOptions",{scale:!0,blur:!0,disabled:!1}),__publicField(this,"mouseEnterListener"),__publicField(this,"mouseLeaveListener"),__publicField(this,"renderPreviewListener"),!e.value)throw new Error('[MazUI](zoom-img) Image path must be defined. Ex: `v-zoom-img="<PATH_TO_IMAGE>"`');if("object"==typeof e.value&&!e.value.src)throw new Error("[maz-ui](zoom-img) src of image must be provided");this.buttonsAdded=!1,this.options=this.buildOptions(e),this.keydownHandler=this.keydownLister.bind(this),this.loader=this.getLoader(),this.wrapper=document.createElement("div"),this.wrapper.classList.add("maz-zoom-img__wrapper"),this.wrapper.prepend(this.loader),this.img=document.createElement("img"),this.onImgLoadedCallback=this.onImgLoaded.bind(this),this.imgEventHandler(!0)}buildOptions(e){return{...this.defaultOptions,..."object"==typeof e.value?e.value:{src:e.value}}}get allInstances(){return[...document.querySelectorAll(".maz-zoom-img-instance")]}create(e){this.options.disabled||(e.style.cursor="pointer",setTimeout((()=>e.classList.add("maz-zoom-img-instance"))),e.setAttribute("data-src",this.options.src),this.options.alt&&e.setAttribute("data-alt",this.options.alt),e.style.transition="all 300ms ease-in-out",this.mouseEnterListener=()=>this.mouseEnter(e),this.mouseLeaveListener=()=>this.mouseLeave(e),this.renderPreviewListener=()=>this.renderPreview(e,this.options),e.addEventListener("mouseenter",this.mouseEnterListener),e.addEventListener("mouseleave",this.mouseLeaveListener),e.addEventListener("click",this.renderPreviewListener))}update(e){this.options=this.buildOptions(e)}remove(e){this.imgEventHandler(!1),e.removeEventListener("mouseenter",this.mouseEnterListener),e.removeEventListener("mouseleave",this.mouseLeaveListener),e.removeEventListener("click",this.renderPreviewListener),e.classList.remove("maz-zoom-img-instance"),e.removeAttribute("data-src"),e.removeAttribute("data-alt"),e.style.cursor=""}renderPreview(e,t){e.classList.add("maz-is-open"),this.addStyle("\n.maz-zoom-img {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n padding: 1rem;\n z-index: 1050;\n background-color: hsla(238, 15%, 40%, 0.7);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n}\n\n.maz-zoom-img,\n.maz-zoom-img * {\n box-sizing: border-box;\n}\n\n.maz-zoom-img .maz-zoom-img__wrapper {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n min-width: 0;\n min-height: 0;\n max-width: 100%;\n max-height: 100%;\n transition: all 300ms ease-in-out;\n opacity: 0;\n transform: scale(0.5);\n}\n\n.maz-zoom-img.maz-animate .maz-zoom-img__wrapper {\n opacity: 1;\n transform: scale(1);\n}\n\n.maz-zoom-img.maz-animate .maz-zoom-img__loader {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: hsla(238, 15%, 40%, 0.7);\n border-radius: 1rem;\n z-index: 2;\n min-width: 60px;\n min-height: 60px;\n}\n.maz-zoom-img.maz-animate .maz-zoom-img__loader[hidden] {\n display: none;\n}\n\n@-webkit-keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n}\n\n@keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n}\n\n.maz-zoom-img.maz-animate .maz-zoom-img__loader__svg {\n animation: spin .6s linear infinite;\n}\n\n.maz-zoom-img img {\n max-width: 100%;\n max-height: 100%;\n min-width: 0;\n border-radius: 1rem;\n}\n\n.maz-zoom-img .maz-zoom-btn {\n margin: 0 auto;\n border: none;\n background-color: hsla(0, 0%, 7%, 0.5);\n box-shadow: 0 0 0.5rem 0 hsla(0, 0%, 0%, 0.2);\n height: 2.2rem;\n min-height: 2.2rem;\n width: 2.2rem;\n min-width: 2.2rem;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 2.2rem;\n cursor: pointer;\n flex: 0 0 auto;\n outline: none;\n}\n\n.maz-zoom-img .maz-zoom-btn svg {\n fill: white;\n}\n\n.maz-zoom-img .maz-zoom-btn.maz-zoom-btn--close {\n position: absolute;\n top: 0.5rem;\n right: 0.5rem;\n z-index: 1;\n}\n\n.maz-zoom-img .maz-zoom-btn.maz-zoom-btn--previous {\n position: absolute;\n left: 0.5rem;\n z-index: 1;\n}\n\n.maz-zoom-img .maz-zoom-btn.maz-zoom-btn--next {\n position: absolute;\n right: 0.5rem;\n z-index: 1;\n}\n\n.maz-zoom-img .maz-zoom-btn:hover {\n background-color: hsl(0, 0%, 0%);\n}");const s=document.createElement("div");s.classList.add("maz-zoom-img"),s.setAttribute("id","MazImgPreviewFullsize"),s.addEventListener("click",(e=>{s.isEqualNode(e.target)&&this.closePreview()})),"object"==typeof t&&(this.img.setAttribute("src",t.src),t.alt&&this.img.setAttribute("alt",t.alt),this.img.id="MazImgElement"),this.wrapper.append(this.img),s.append(this.wrapper),document.body.append(s),this.keyboardEventHandler(!0),setTimeout((()=>{s&&s.classList.add("maz-animate")}),100)}onImgLoaded(){this.wrapper.style.width=`${this.img.width}px`,this.wrapper.style.minWidth="200px",this.loader.hidden=!0;const e=this.getButton(),t=[],s=this.allInstances.length>1;if(!this.buttonsAdded){if(this.buttonsAdded=!0,s){const e=this.getButton("previous"),s=this.getButton("next");t.push(e,s)}this.wrapper.append(e),s&&(this.wrapper.prepend(t[0]),this.wrapper.append(t[1]))}}getLoader(){const e=document.createElement("div");return e.classList.add("maz-zoom-img__loader"),e.innerHTML=t.spinner,e}mouseLeave(e){this.options.scale&&(e.style.transform=""),this.options.blur&&(e.style.filter=""),e.style.zIndex=""}mouseEnter(e){e.style.zIndex="1",this.options.scale&&(e.style.transform="scale(1.1)"),this.options.blur&&(e.style.filter="blur(2px)")}keydownLister(e){e.preventDefault(),"Escape"!==e.key&&" "!==e.key||this.closePreview(),"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||this.nextPreviousImage("ArrowRight"===e.key)}getButton(e="close"){const s=document.createElement("button");return s.innerHTML=t[e],s.addEventListener("click",(()=>{"close"===e?this.closePreview():this.allInstances&&this.nextPreviousImage("next"===e)})),s.classList.add("maz-zoom-btn"),s.classList.add(`maz-zoom-btn--${e}`),s}closePreview(){const e=document.querySelector("#MazImgPreviewFullsize"),t=document.querySelector("#MazPreviewStyle"),s=document.querySelector(".maz-zoom-img-instance.maz-is-open");s&&s.classList.remove("maz-is-open"),e&&e.classList.remove("maz-animate"),this.keyboardEventHandler(!1),setTimeout((()=>{e&&e.remove(),t&&t.remove()}),300)}getNewInstanceIndex(e){return e<0?this.allInstances.length-1:e>=this.allInstances.length?0:e}nextPreviousImage(e){const t=e,s=document.querySelector(".maz-zoom-img-instance.maz-is-open");if(s){const e=this.allInstances.indexOf(s),o=t?e+1:e-1,i=this.allInstances[this.getNewInstanceIndex(o)];i&&this.useNextInstance(s,i)}}useNextInstance(e,t){e.classList.remove("maz-is-open"),t.classList.add("maz-is-open");const s=t.getAttribute("data-src"),o=t.getAttribute("data-alt");this.wrapper.style.width="",this.loader.hidden=!1,s&&this.img.setAttribute("src",s),o&&this.img.setAttribute("alt",o)}addStyle(e){const t=document.createElement("style");t.id="MazPreviewStyle",t.textContent=e,document.head.append(t)}keyboardEventHandler(e){if(e)return document.addEventListener("keydown",this.keydownHandler);document.removeEventListener("keydown",this.keydownHandler)}imgEventHandler(e){if(e)return this.img.addEventListener("load",this.onImgLoadedCallback);this.img.removeEventListener("load",this.onImgLoadedCallback)}}let o;const i={created(e,t){o=new s(t),o.create(e)},updated(e,t){o.update(t)},unmounted(e){o.remove(e)}},n={baseClass:"m-lazy-img",loadedClass:"m-lazy-loaded",loadingClass:"m-lazy-loading",errorClass:"m-lazy-error",noPhotoClass:"m-lazy-no-photo",noPhoto:!1,observerOnce:!0,loadOnce:!1,noUseErrorPhoto:!1,observerOptions:{threshold:.1}};class a{constructor(e={}){__publicField(this,"observers",[]),__publicField(this,"defaultOptions",n),__publicField(this,"options"),__publicField(this,"onImgLoadedCallback"),__publicField(this,"onImgErrorCallback"),__publicField(this,"hasImgLoaded",!1),this.options=this.buildOptions(e),this.onImgLoadedCallback=this.imageIsLoaded.bind(this),this.onImgErrorCallback=this.imageHasError.bind(this)}async loadErrorPhoto(){const{default:e}=await Promise.resolve().then((()=>L));return e}buildOptions(e){return{...this.defaultOptions,...e,observerOptions:{...this.defaultOptions.observerOptions,...e.observerOptions}}}removeClass(e,t){e.classList.remove(t)}addClass(e,t){e.classList.add(t)}removeAllStateClasses(e){this.removeClass(e,this.options.loadedClass),this.removeClass(e,this.options.loadingClass),this.removeClass(e,this.options.errorClass),this.removeClass(e,this.options.noPhotoClass)}setBaseClass(e){this.addClass(e,this.options.baseClass)}imageIsLoading(e){var t,s;this.addClass(e,this.options.loadingClass),null==(s=(t=this.options).onLoading)||s.call(t,e)}imageHasNoPhoto(e){this.removeClass(e,this.options.loadingClass),this.addClass(e,this.options.noPhotoClass),this.setDefaultPhoto(e)}imageIsLoaded(e){var t,s;this.hasImgLoaded=!0,this.removeClass(e,this.options.loadingClass),this.addClass(e,this.options.loadedClass),null==(s=(t=this.options).onLoaded)||s.call(t,e)}imageHasError(e,t){var s,o;console.warn("[maz-ui][MazLazyImg] Error while loading image",t),this.removeClass(e,this.options.loadingClass),this.addClass(e,this.options.errorClass),null==(o=(s=this.options).onError)||o.call(s,e),this.setDefaultPhoto(e)}getImageUrl(e,t){const s=this.getImgElement(e).getAttribute("data-src");if(s)return s;const o="object"==typeof t.value?t.value.src:t.value;return o||console.warn("[maz-ui][MazLazyImg] src url is not defined"),o}async setPictureSourceUrls(e){const t=e.querySelectorAll("source");if(t.length>0)for await(const s of t){const e=s.getAttribute("data-srcset");e?s.srcset=e:console.warn('[maz-ui][MazLazyImg] the "[data-srcset]" attribute is not provided on "<source />"')}else console.warn('[maz-ui][MazLazyImg] No "<source />" elements provided into the "<picture />" element'),this.imageHasError(e)}hasBgImgMode(e){return"bg-image"===e.arg}isPictureElement(e){return e instanceof HTMLPictureElement}getImgElement(e){return this.isPictureElement(e)?e.querySelector("img"):e}async setDefaultPhoto(e){if(this.options.noUseErrorPhoto)return;const t=this.options.errorPhoto??await this.loadErrorPhoto(),s=e.querySelectorAll("source");if(s.length>0)for await(const o of s)o.srcset=t;else this.setImgSrc(e,t)}addEventListenerToImg(e){const t=this.getImgElement(e);t.addEventListener("load",(()=>this.onImgLoadedCallback(e)),{once:!0}),t.addEventListener("error",(t=>this.onImgErrorCallback(e,t)),{once:!0})}async loadImage(e,t){if(this.imageIsLoading(e),this.isPictureElement(e))this.addEventListenerToImg(e),await this.setPictureSourceUrls(e);else{const s=this.getImageUrl(e,t);if(!s)return this.imageHasError(e);this.hasBgImgMode(t)?(e.style.backgroundImage=`url('${s}')`,this.imageIsLoaded(e)):(this.addEventListenerToImg(e),this.setImgSrc(e,s))}}setImgSrc(e,t){this.getImgElement(e).src=t}handleIntersectionObserver(e,t,s,o){var i,n;this.observers.push(o);for(const a of s)if(a.isIntersecting){if(null==(n=(i=this.options).onIntersecting)||n.call(i,a.target),this.options.observerOnce&&o.unobserve(e),this.options.loadOnce&&this.hasImgLoaded)return;this.loadImage(e,t)}}createObserver(e,t){const s=this.options.observerOptions;new IntersectionObserver(((s,o)=>{this.handleIntersectionObserver(e,t,s,o)}),s).observe(e)}async imageHandler(e,t,s){if("update"===s)for await(const o of this.observers)o.unobserve(e);window.IntersectionObserver?this.createObserver(e,t):this.loadImage(e,t)}async bindUpdateHandler(e,t,s){if(this.options.noPhoto)return this.imageHasNoPhoto(e);await this.imageHandler(e,t,s)}async add(e,t){if(this.hasBgImgMode(t)&&this.isPictureElement(e))throw new Error('[MazLazyImg] You can\'t use the "bg-image" mode with "<picture />" element');setTimeout((()=>this.setBaseClass(e)),0),e.getAttribute("src")||this.setImgSrc(e,"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"),await this.bindUpdateHandler(e,t,"bind")}async update(e,t){t.value!==t.oldValue&&(this.hasImgLoaded=!1,this.removeAllStateClasses(e),await this.bindUpdateHandler(e,t,"update"))}remove(e,t){this.hasImgLoaded=!1,this.hasBgImgMode(t)&&(e.style.backgroundImage=""),this.removeAllStateClasses(e);for(const s of this.observers)s.unobserve(e);this.observers=[]}}let r;const l={created(e,t){const s="object"==typeof t.value?t.value:{};r=new a(s),r.add(e,t)},updated(e,t){r.update(e,t)},unmounted(e,t){r.remove(e,t)}};const m=["innerHTML"],d=e.defineComponent({__name:"MazIcon",props:{src:{type:String,default:void 0},path:{type:String,default:void 0},name:{type:String,default:void 0},size:{type:String,default:"1.5rem"},title:{type:String,default:void 0},transformSource:{type:Function,default:e=>e}},emits:["loaded","unloaded","error"],setup(t,{emit:s}){const o=t,i={},n=e.ref(),a=e.ref(),r=()=>{try{return function(t,s){const o=e.inject(t,s);if(!o)throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${t}`);return o}("mazIconPath")}catch{return}},l=e.computed((()=>o.path??r())),d=e.computed((()=>o.src?o.src:l.value?`${l.value}/${o.name}.svg`:`/${o.name}.svg`));e.onMounted((()=>{o.name||o.src||console.error('[maz-ui](MazIcon) you should provide "name" or "src" as prop')}));const c=e=>{const t={},s=e.attributes;if(!s)return t;for(let o=s.length-1;o>=0;o--)t[s[o].name]=s[o].value;return t},u=e=>{let t=e.cloneNode(!0);return t=o.transformSource(e),o.title&&((e,t)=>{const s=e.querySelectorAll("title");if(s.length>0)s[0].textContent=t;else{const s=document.createElementNS("http://www.w3.org/2000/svg","title");s.textContent=t,e.append(s)}})(t,o.title),e.innerHTML},g=e=>new Promise(((t,s)=>{const i=new XMLHttpRequest;i.open("GET",e,!0),i.addEventListener("load",(()=>{if(i.status>=200&&i.status<400)try{const e=new DOMParser;let n=e.parseFromString(i.responseText,"text/xml").querySelectorAll("svg")[0];n?(n=o.transformSource(n),t(n)):s(new Error('Loaded file is not valid SVG"'))}catch(e){s(e)}else s(new Error("Error loading SVG"))})),i.addEventListener("error",(()=>s())),i.send()}));return e.watchEffect((()=>(async t=>{i[t]||(i[t]=g(t));try{n.value=await i[t],await e.nextTick(),s("loaded",a.value)}catch(o){n.value&&(n.value=void 0,s("unloaded")),delete i[t],s("error",o)}})(d.value))),(s,o)=>{return n.value?(e.openBlock(),e.createElementBlock("svg",e.mergeProps({key:0,ref_key:"svgElem",ref:a,width:"1em",height:"1em"},{...c(n.value),...(i=s.$attrs,Object.keys(i).reduce(((e,t)=>(!1!==i[t]&&null!==i[t]&&void 0!==i[t]&&(e[t]=i[t]),e)),{}))},{style:`font-size: ${t.size}`,innerHTML:u(n.value)}),null,16,m)):e.createCommentVNode("",!0);var i}}}),c=e.defineComponent({components:{MazIcon:d},directives:{"zoom-img":i,"lazy-img":l},props:{images:{type:Array,default:()=>[]},imagesShownCount:{type:Number,default:5},noRemaining:{type:Boolean,default:!1},height:{type:[Number,String],default:150},noHeight:{type:Boolean,default:!1},width:{type:[Number,String],default:"100%"},noWidth:{type:Boolean,default:!1},noRadius:{type:Boolean,default:!1},noZoom:{type:Boolean,default:!1},hasEmptyLayer:{type:Boolean,default:!0},lazy:{type:Boolean,default:!0},blur:{type:Boolean,default:!0},scale:{type:Boolean,default:!0}},setup(t){e.onBeforeMount((()=>{t.imagesShownCount>5&&console.warn('[MazUI](m-gallery) The maximum of "images-shown-count" is 5')}));const s=e.computed((()=>{const{height:e,width:s,noWidth:o,noHeight:i}=t;return{...o?{}:{flex:"0 0 "+typeof s=="number"?`${s}px`:s,width:"number"==typeof s?`${s}px`:s},...i?{}:{height:"number"==typeof e?`${e}px`:`${e}`,minHeight:"number"==typeof e?`${e}px`:`${e}`}}})),o=e.computed((()=>t.imagesShownCount<=5?t.imagesShownCount:5)),i=e.computed((()=>t.images.length-(t.images.length<o.value?t.images.length:o.value))),n=e.computed((()=>t.images.map((e=>"object"==typeof e?e:{src:e,alt:void 0})))),a=e.computed((()=>n.value.slice(0,o.value))),r=e.computed((()=>n.value.slice(o.value,t.images.length)));return{sizeStyle:s,imagesCount:o,shouldHaveRemainingLayer:e=>i.value&&e+1===a.value.length&&!t.noRemaining,imagesShown:a,numberImagesRemaining:i,imagesHidden:r,NoPhotographyIcon:"data:image/svg+xml;base64,PHN2ZwogIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICB2aWV3Qm94PSIwIDAgMjQgMjQiCiAgc3Ryb2tlPSJub25lIgogIGZpbGw9ImN1cnJlbnRDb2xvciIKICBhcmlhLWhpZGRlbj0idHJ1ZSIKPgogIDxnPgogICAgPHJlY3QgZmlsbD0ibm9uZSIgaGVpZ2h0PSIyNCIgd2lkdGg9IjI0IiAvPgogICAgPGc+CiAgICAgIDxwYXRoCiAgICAgICAgZD0iTTguOSw2LjA3TDcuNDgsNC42Nkw5LDNoNmwxLjgzLDJIMjBjMS4xLDAsMiwwLjksMiwydjEyYzAsMC4wNS0wLjAxLDAuMS0wLjAyLDAuMTZMMjAsMTcuMTdWN2gtNC4wNWwtMS44My0ySDkuODggTDguOSw2LjA3eiBNMjAuNDksMjMuMzFMMTguMTcsMjFINGMtMS4xLDAtMi0wLjktMi0yVjdjMC0wLjU5LDAuMjctMS4xMiwwLjY4LTEuNDlsLTItMkwyLjEsMi4xbDE5LjgsMTkuOEwyMC40OSwyMy4zMXogTTkuMTksMTIuMDJDOS4wOCwxMi4zMyw5LDEyLjY1LDksMTNjMCwxLjY2LDEuMzQsMywzLDNjMC4zNSwwLDAuNjctMC4wOCwwLjk4LTAuMTlMOS4xOSwxMi4wMnogTTE2LjE3LDE5bC0xLjY4LTEuNjggQzEzLjc2LDE3Ljc1LDEyLjkxLDE4LDEyLDE4Yy0yLjc2LDAtNS0yLjI0LTUtNWMwLTAuOTEsMC4yNS0xLjc2LDAuNjgtMi40OUw0LjE3LDdINHYxMkgxNi4xN3ogTTE0LjgxLDExLjk4bDIuMDcsMi4wNyBDMTYuOTYsMTMuNzEsMTcsMTMuMzYsMTcsMTNjMC0yLjc2LTIuMjQtNS01LTVjLTAuMzYsMC0wLjcxLDAuMDQtMS4wNiwwLjEybDIuMDcsMi4wN0MxMy44NSwxMC40OSwxNC41MSwxMS4xNSwxNC44MSwxMS45OHoiCiAgICAgIC8+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K"}}}),u={class:"m-gallery__wrapper maz-flex maz-flex-1"},g=["alt"],h={key:0,class:"m-gallery__remaining-layer maz-flex maz-bg-overlay maz-flex-center"},p={class:"maz-text-2xl maz-text-white"};const w=((e,t)=>{const s=e.__vccOpts||e;for(const[o,i]of t)s[o]=i;return s})(c,[["render",function(t,s,o,i,n,a){const r=e.resolveComponent("MazIcon"),l=e.resolveDirective("zoom-img"),m=e.resolveDirective("lazy-img");return t.images.length>0||t.hasEmptyLayer?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["m-gallery maz-flex",{"maz-rounded":!t.noRadius}]),style:e.normalizeStyle([t.sizeStyle])},[e.createElementVNode("section",u,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.imagesShown,((s,o)=>(e.openBlock(),e.createElementBlock("figure",{key:o,class:e.normalizeClass(["m-gallery__item !maz-my-0 maz-flex maz-flex-center",[`m-gallery__item--${o+1}`]])},[e.withDirectives(e.createElementVNode("img",{class:"m-gallery__item__image maz-flex-1",src:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",alt:s.alt},null,8,g),[[l,{src:s.src,alt:s.alt,disabled:t.noZoom||t.shouldHaveRemainingLayer(o),blur:t.blur,scale:t.scale}],[m,{src:s.src,disabled:!t.lazy},"bg-image"]]),t.shouldHaveRemainingLayer(o)?e.withDirectives((e.openBlock(),e.createElementBlock("div",h,[e.createElementVNode("span",p,"+"+e.toDisplayString(t.numberImagesRemaining),1)])),[[l,{src:s.src,alt:s.alt,disabled:t.noZoom,blur:!1,scale:t.scale}]]):e.createCommentVNode("",!0)],2)))),128)),t.hasEmptyLayer&&0===t.images.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["flex-center maz-flex maz-w-full maz-bg-color-light maz-text-normal",{"maz-rounded-xl":!t.noRadius}]),style:e.normalizeStyle([t.sizeStyle])},[e.createVNode(r,{src:t.NoPhotographyIcon,size:"2rem"},null,8,["src"])],6)):e.createCommentVNode("",!0)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.imagesHidden,((s,o)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:o,class:"m-gallery__hidden"})),[[l,{src:s.src,disabled:t.noZoom}]]))),128))],6)):e.createCommentVNode("",!0)}],["__scopeId","data-v-420c28d9"]]),L=Object.freeze(Object.defineProperty({__proto__:null,default:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjQ4cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjQ4cHgiIGZpbGw9IiNjZGNkY2QiPgogIDxnPgogICAgPHJlY3QgZmlsbD0ibm9uZSIgaGVpZ2h0PSIyNCIgd2lkdGg9IjI0Ii8+CiAgICA8Zz4KICAgICAgPHBhdGggZD0iTTguOSw2LjA3TDcuNDgsNC42Nkw5LDNoNmwxLjgzLDJIMjBjMS4xLDAsMiwwLjksMiwydjEyYzAsMC4wNS0wLjAxLDAuMS0wLjAyLDAuMTZMMjAsMTcuMTdWN2gtNC4wNWwtMS44My0ySDkuODggTDguOSw2LjA3eiBNMjAuNDksMjMuMzFMMTguMTcsMjFINGMtMS4xLDAtMi0wLjktMi0yVjdjMC0wLjU5LDAuMjctMS4xMiwwLjY4LTEuNDlsLTItMkwyLjEsMi4xbDE5LjgsMTkuOEwyMC40OSwyMy4zMXogTTkuMTksMTIuMDJDOS4wOCwxMi4zMyw5LDEyLjY1LDksMTNjMCwxLjY2LDEuMzQsMywzLDNjMC4zNSwwLDAuNjctMC4wOCwwLjk4LTAuMTlMOS4xOSwxMi4wMnogTTE2LjE3LDE5bC0xLjY4LTEuNjggQzEzLjc2LDE3Ljc1LDEyLjkxLDE4LDEyLDE4Yy0yLjc2LDAtNS0yLjI0LTUtNWMwLTAuOTEsMC4yNS0xLjc2LDAuNjgtMi40OUw0LjE3LDdINHYxMkgxNi4xN3ogTTE0LjgxLDExLjk4bDIuMDcsMi4wNyBDMTYuOTYsMTMuNzEsMTcsMTMuMzYsMTcsMTNjMC0yLjc2LTIuMjQtNS01LTVjLTAuMzYsMC0wLjcxLDAuMDQtMS4wNiwwLjEybDIuMDcsMi4wN0MxMy44NSwxMC40OSwxNC41MSwxMS4xNSwxNC44MSwxMS45OHoiLz4KICAgIDwvZz4KICA8L2c+Cjwvc3ZnPg=="},Symbol.toStringTag,{value:"Module"}));return w}));
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode(".m-gallery[data-v-e9dc5a9e]{position:relative;overflow:hidden}.m-gallery__hidden[data-v-e9dc5a9e]{display:none}.m-gallery__item[data-v-e9dc5a9e]{position:absolute;top:0px;margin:0;height:50%;width:100%;overflow:hidden;border-left-width:2px;border-color:transparent;padding:0}.m-gallery__item--1[data-v-e9dc5a9e]{left:0;height:100%}.m-gallery__item--1[data-v-e9dc5a9e]:not(:last-child){width:50%}.m-gallery__item--2[data-v-e9dc5a9e]{left:50%;width:50%;height:50%}.m-gallery__item--2[data-v-e9dc5a9e]:last-child{height:100%}.m-gallery__item--2[data-v-e9dc5a9e]:nth-last-child(4){width:25%}.m-gallery__item--3[data-v-e9dc5a9e]{top:50%;left:50%;width:25%}.m-gallery__item--3[data-v-e9dc5a9e]:last-child{width:50%}.m-gallery__item--3[data-v-e9dc5a9e]:nth-last-child(3){top:0;left:75%}.m-gallery__item--4[data-v-e9dc5a9e]{border-top-width:2px;border-color:transparent;top:50%;left:50%;width:25%}.m-gallery__item--4[data-v-e9dc5a9e]:last-child{left:75%;width:25%}.m-gallery__item--5[data-v-e9dc5a9e]{border-top-width:2px;border-color:transparent;top:50%;left:75%;width:25%}.m-gallery__item[data-v-e9dc5a9e]:first-child{border-left:0}.m-gallery__item--3[data-v-e9dc5a9e]:last-child,.m-gallery__item--3[data-v-e9dc5a9e]:nth-last-child(2),.m-gallery__item--4[data-v-e9dc5a9e]:last-child,.m-gallery__item--5[data-v-e9dc5a9e]{border-top-width:2px;border-color:transparent}.m-gallery__item__image[data-v-e9dc5a9e]{height:100%;max-width:100%;width:100%;background-position:center center;background-size:cover;background-repeat:no-repeat;background-color:#0000007f}.m-gallery__remaining-layer[data-v-e9dc5a9e]{position:absolute;top:0;bottom:0;right:0;left:0}.m-gallery__remaining-layer a span[data-v-e9dc5a9e]{color:#fff;font-size:2rem}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).MazGallery={},e.Vue)}(this,(function(e,t){"use strict";var s=Object.defineProperty,o=(e,t,o)=>(((e,t,o)=>{t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o})(e,"symbol"!=typeof t?t+"":t,o),o);const n={close:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',next:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>',previous:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></svg>',spinner:'<svg width="40px" height="40px" version="1.1" xmlns="http://www.w3.org/2000/svg" fill="currentColor" x="0px" y="0px" viewBox="0 0 50 50" xml:space="preserve" class="maz-zoom-img__loader__svg" data-v-6d1cb50c=""><path d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z"></path></svg>'};class i{constructor(e){if(o(this,"options"),o(this,"loader"),o(this,"wrapper"),o(this,"img"),o(this,"keydownHandler"),o(this,"onImgLoadedCallback"),o(this,"buttonsAdded"),o(this,"defaultOptions",{scale:!0,blur:!0,disabled:!1}),o(this,"mouseEnterListener"),o(this,"mouseLeaveListener"),o(this,"renderPreviewListener"),!e.value)throw new Error('[MazUI](zoom-img) Image path must be defined. Ex: `v-zoom-img="<PATH_TO_IMAGE>"`');if("object"==typeof e.value&&!e.value.src)throw new Error("[maz-ui](zoom-img) src of image must be provided");this.buttonsAdded=!1,this.options=this.buildOptions(e),this.keydownHandler=this.keydownLister.bind(this),this.loader=this.getLoader(),this.wrapper=document.createElement("div"),this.wrapper.classList.add("maz-zoom-img__wrapper"),this.wrapper.prepend(this.loader),this.img=document.createElement("img"),this.onImgLoadedCallback=this.onImgLoaded.bind(this),this.imgEventHandler(!0)}buildOptions(e){return{...this.defaultOptions,..."object"==typeof e.value?e.value:{src:e.value}}}get allInstances(){return[...document.querySelectorAll(".maz-zoom-img-instance")]}create(e){this.options.disabled||(e.style.cursor="pointer",setTimeout((()=>e.classList.add("maz-zoom-img-instance"))),e.setAttribute("data-src",this.options.src),this.options.alt&&e.setAttribute("data-alt",this.options.alt),e.style.transition="all 300ms ease-in-out",this.mouseEnterListener=()=>this.mouseEnter(e),this.mouseLeaveListener=()=>this.mouseLeave(e),this.renderPreviewListener=()=>this.renderPreview(e,this.options),e.addEventListener("mouseenter",this.mouseEnterListener),e.addEventListener("mouseleave",this.mouseLeaveListener),e.addEventListener("click",this.renderPreviewListener))}update(e){this.options=this.buildOptions(e)}remove(e){this.imgEventHandler(!1),e.removeEventListener("mouseenter",this.mouseEnterListener),e.removeEventListener("mouseleave",this.mouseLeaveListener),e.removeEventListener("click",this.renderPreviewListener),e.classList.remove("maz-zoom-img-instance"),e.removeAttribute("data-src"),e.removeAttribute("data-alt"),e.style.cursor=""}renderPreview(e,t){e.classList.add("maz-is-open"),this.addStyle("\n.maz-zoom-img {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n padding: 1rem;\n z-index: 1050;\n background-color: hsla(238, 15%, 40%, 0.7);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n}\n\n.maz-zoom-img,\n.maz-zoom-img * {\n box-sizing: border-box;\n}\n\n.maz-zoom-img .maz-zoom-img__wrapper {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n min-width: 0;\n min-height: 0;\n max-width: 100%;\n max-height: 100%;\n transition: all 300ms ease-in-out;\n opacity: 0;\n transform: scale(0.5);\n}\n\n.maz-zoom-img.maz-animate .maz-zoom-img__wrapper {\n opacity: 1;\n transform: scale(1);\n}\n\n.maz-zoom-img.maz-animate .maz-zoom-img__loader {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: hsla(238, 15%, 40%, 0.7);\n border-radius: 1rem;\n z-index: 2;\n min-width: 60px;\n min-height: 60px;\n}\n.maz-zoom-img.maz-animate .maz-zoom-img__loader[hidden] {\n display: none;\n}\n\n@-webkit-keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n}\n\n@keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n}\n\n.maz-zoom-img.maz-animate .maz-zoom-img__loader__svg {\n animation: spin .6s linear infinite;\n}\n\n.maz-zoom-img img {\n max-width: 100%;\n max-height: 100%;\n min-width: 0;\n border-radius: 1rem;\n}\n\n.maz-zoom-img .maz-zoom-btn {\n margin: 0 auto;\n border: none;\n background-color: hsla(0, 0%, 7%, 0.5);\n box-shadow: 0 0 0.5rem 0 hsla(0, 0%, 0%, 0.2);\n height: 2.2rem;\n min-height: 2.2rem;\n width: 2.2rem;\n min-width: 2.2rem;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 2.2rem;\n cursor: pointer;\n flex: 0 0 auto;\n outline: none;\n}\n\n.maz-zoom-img .maz-zoom-btn svg {\n fill: white;\n}\n\n.maz-zoom-img .maz-zoom-btn.maz-zoom-btn--close {\n position: absolute;\n top: 0.5rem;\n right: 0.5rem;\n z-index: 1;\n}\n\n.maz-zoom-img .maz-zoom-btn.maz-zoom-btn--previous {\n position: absolute;\n left: 0.5rem;\n z-index: 1;\n}\n\n.maz-zoom-img .maz-zoom-btn.maz-zoom-btn--next {\n position: absolute;\n right: 0.5rem;\n z-index: 1;\n}\n\n.maz-zoom-img .maz-zoom-btn:hover {\n background-color: hsl(0, 0%, 0%);\n}");const s=document.createElement("div");s.classList.add("maz-zoom-img"),s.setAttribute("id","MazImgPreviewFullsize"),s.addEventListener("click",(e=>{s.isEqualNode(e.target)&&this.closePreview()})),"object"==typeof t&&(this.img.setAttribute("src",t.src),t.alt&&this.img.setAttribute("alt",t.alt),this.img.id="MazImgElement"),this.wrapper.append(this.img),s.append(this.wrapper),document.body.append(s),this.keyboardEventHandler(!0),setTimeout((()=>{s&&s.classList.add("maz-animate")}),100)}onImgLoaded(){this.wrapper.style.width=`${this.img.width}px`,this.wrapper.style.minWidth="200px",this.loader.hidden=!0;const e=this.getButton(),t=[],s=this.allInstances.length>1;if(!this.buttonsAdded){if(this.buttonsAdded=!0,s){const e=this.getButton("previous"),s=this.getButton("next");t.push(e,s)}this.wrapper.append(e),s&&(this.wrapper.prepend(t[0]),this.wrapper.append(t[1]))}}getLoader(){const e=document.createElement("div");return e.classList.add("maz-zoom-img__loader"),e.innerHTML=n.spinner,e}mouseLeave(e){this.options.scale&&(e.style.transform=""),this.options.blur&&(e.style.filter=""),e.style.zIndex=""}mouseEnter(e){e.style.zIndex="1",this.options.scale&&(e.style.transform="scale(1.1)"),this.options.blur&&(e.style.filter="blur(2px)")}keydownLister(e){e.preventDefault(),"Escape"!==e.key&&" "!==e.key||this.closePreview(),"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||this.nextPreviousImage("ArrowRight"===e.key)}getButton(e="close"){const t=document.createElement("button");return t.innerHTML=n[e],t.addEventListener("click",(()=>{"close"===e?this.closePreview():this.allInstances&&this.nextPreviousImage("next"===e)})),t.classList.add("maz-zoom-btn"),t.classList.add(`maz-zoom-btn--${e}`),t}closePreview(){const e=document.querySelector("#MazImgPreviewFullsize"),t=document.querySelector("#MazPreviewStyle"),s=document.querySelector(".maz-zoom-img-instance.maz-is-open");s&&s.classList.remove("maz-is-open"),e&&e.classList.remove("maz-animate"),this.keyboardEventHandler(!1),setTimeout((()=>{e&&e.remove(),t&&t.remove()}),300)}getNewInstanceIndex(e){return e<0?this.allInstances.length-1:e>=this.allInstances.length?0:e}nextPreviousImage(e){const t=e,s=document.querySelector(".maz-zoom-img-instance.maz-is-open");if(s){const e=this.allInstances.indexOf(s),o=t?e+1:e-1,n=this.allInstances[this.getNewInstanceIndex(o)];n&&this.useNextInstance(s,n)}}useNextInstance(e,t){e.classList.remove("maz-is-open"),t.classList.add("maz-is-open");const s=t.getAttribute("data-src"),o=t.getAttribute("data-alt");this.wrapper.style.width="",this.loader.hidden=!1,s&&this.img.setAttribute("src",s),o&&this.img.setAttribute("alt",o)}addStyle(e){const t=document.createElement("style");t.id="MazPreviewStyle",t.textContent=e,document.head.append(t)}keyboardEventHandler(e){if(e)return document.addEventListener("keydown",this.keydownHandler);document.removeEventListener("keydown",this.keydownHandler)}imgEventHandler(e){if(e)return this.img.addEventListener("load",this.onImgLoadedCallback);this.img.removeEventListener("load",this.onImgLoadedCallback)}}let a;const r={created(e,t){a=new i(t),a.create(e)},updated(e,t){a.update(t)},unmounted(e){a.remove(e)}},l={baseClass:"m-lazy-img",loadedClass:"m-lazy-loaded",loadingClass:"m-lazy-loading",errorClass:"m-lazy-error",noPhotoClass:"m-lazy-no-photo",noPhoto:!1,observerOnce:!0,loadOnce:!1,noUseErrorPhoto:!1,observerOptions:{threshold:.1}};class m{constructor(e={}){o(this,"observers",[]),o(this,"defaultOptions",l),o(this,"options"),o(this,"onImgLoadedCallback"),o(this,"onImgErrorCallback"),o(this,"hasImgLoaded",!1),this.options=this.buildOptions(e),this.onImgLoadedCallback=this.imageIsLoaded.bind(this),this.onImgErrorCallback=this.imageHasError.bind(this)}async loadErrorPhoto(){const{default:e}=await Promise.resolve().then((()=>p));return e}buildOptions(e){return{...this.defaultOptions,...e,observerOptions:{...this.defaultOptions.observerOptions,...e.observerOptions}}}removeClass(e,t){e.classList.remove(t)}addClass(e,t){e.classList.add(t)}removeAllStateClasses(e){this.removeClass(e,this.options.loadedClass),this.removeClass(e,this.options.loadingClass),this.removeClass(e,this.options.errorClass),this.removeClass(e,this.options.noPhotoClass)}setBaseClass(e){this.addClass(e,this.options.baseClass)}imageIsLoading(e){var t,s;this.addClass(e,this.options.loadingClass),null==(s=(t=this.options).onLoading)||s.call(t,e)}imageHasNoPhoto(e){this.removeClass(e,this.options.loadingClass),this.addClass(e,this.options.noPhotoClass),this.setDefaultPhoto(e)}imageIsLoaded(e){var t,s;this.hasImgLoaded=!0,this.removeClass(e,this.options.loadingClass),this.addClass(e,this.options.loadedClass),null==(s=(t=this.options).onLoaded)||s.call(t,e)}imageHasError(e,t){var s,o;console.warn("[maz-ui][MazLazyImg] Error while loading image",t),this.removeClass(e,this.options.loadingClass),this.addClass(e,this.options.errorClass),null==(o=(s=this.options).onError)||o.call(s,e),this.setDefaultPhoto(e)}getImageUrl(e,t){const s=this.getImgElement(e).getAttribute("data-src");if(s)return s;const o="object"==typeof t.value?t.value.src:t.value;return o||console.warn("[maz-ui][MazLazyImg] src url is not defined"),o}async setPictureSourceUrls(e){const t=e.querySelectorAll("source");if(t.length>0)for await(const s of t){const e=s.getAttribute("data-srcset");e?s.srcset=e:console.warn('[maz-ui][MazLazyImg] the "[data-srcset]" attribute is not provided on "<source />"')}else console.warn('[maz-ui][MazLazyImg] No "<source />" elements provided into the "<picture />" element'),this.imageHasError(e)}hasBgImgMode(e){return"bg-image"===e.arg}isPictureElement(e){return e instanceof HTMLPictureElement}getImgElement(e){return this.isPictureElement(e)?e.querySelector("img"):e}async setDefaultPhoto(e){if(this.options.noUseErrorPhoto)return;const t=this.options.errorPhoto??await this.loadErrorPhoto(),s=e.querySelectorAll("source");if(s.length>0)for await(const o of s)o.srcset=t;else this.setImgSrc(e,t)}addEventListenerToImg(e){const t=this.getImgElement(e);t.addEventListener("load",(()=>this.onImgLoadedCallback(e)),{once:!0}),t.addEventListener("error",(t=>this.onImgErrorCallback(e,t)),{once:!0})}async loadImage(e,t){if(this.imageIsLoading(e),this.isPictureElement(e))this.addEventListenerToImg(e),await this.setPictureSourceUrls(e);else{const s=this.getImageUrl(e,t);if(!s)return this.imageHasError(e);this.hasBgImgMode(t)?(e.style.backgroundImage=`url('${s}')`,this.imageIsLoaded(e)):(this.addEventListenerToImg(e),this.setImgSrc(e,s))}}setImgSrc(e,t){this.getImgElement(e).src=t}handleIntersectionObserver(e,t,s,o){var n,i;this.observers.push(o);for(const a of s)if(a.isIntersecting){if(null==(i=(n=this.options).onIntersecting)||i.call(n,a.target),this.options.observerOnce&&o.unobserve(e),this.options.loadOnce&&this.hasImgLoaded)return;this.loadImage(e,t)}}createObserver(e,t){const s=this.options.observerOptions;new IntersectionObserver(((s,o)=>{this.handleIntersectionObserver(e,t,s,o)}),s).observe(e)}async imageHandler(e,t,s){if("update"===s)for await(const o of this.observers)o.unobserve(e);window.IntersectionObserver?this.createObserver(e,t):this.loadImage(e,t)}async bindUpdateHandler(e,t,s){if(this.options.noPhoto)return this.imageHasNoPhoto(e);await this.imageHandler(e,t,s)}async add(e,t){if(this.hasBgImgMode(t)&&this.isPictureElement(e))throw new Error('[MazLazyImg] You can\'t use the "bg-image" mode with "<picture />" element');setTimeout((()=>this.setBaseClass(e)),0),e.getAttribute("src")||this.setImgSrc(e,"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"),await this.bindUpdateHandler(e,t,"bind")}async update(e,t){t.value!==t.oldValue&&(this.hasImgLoaded=!1,this.removeAllStateClasses(e),await this.bindUpdateHandler(e,t,"update"))}remove(e,t){this.hasImgLoaded=!1,this.hasBgImgMode(t)&&(e.style.backgroundImage=""),this.removeAllStateClasses(e);for(const s of this.observers)s.unobserve(e);this.observers=[]}}let d;const c={created(e,t){const s="object"==typeof t.value?t.value:{};d=new m(s),d.add(e,t)},updated(e,t){d.update(e,t)},unmounted(e,t){d.remove(e,t)}};const u=["innerHTML"],h=t.defineComponent({__name:"MazIcon",props:{src:{type:String,default:void 0},path:{type:String,default:void 0},name:{type:String,default:void 0},size:{type:String,default:"1.5rem"},title:{type:String,default:void 0},transformSource:{type:Function,default:e=>e}},emits:["loaded","unloaded","error"],setup(e,{emit:s}){const o=e,n={},i=t.ref(),a=t.ref(),r=()=>{try{return function(e,s){const o=t.inject(e,s);if(!o)throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${e}`);return o}("mazIconPath")}catch{return}},l=t.computed((()=>o.path??r())),m=t.computed((()=>o.src?o.src:l.value?`${l.value}/${o.name}.svg`:`/${o.name}.svg`));t.onMounted((()=>{o.name||o.src||console.error('[maz-ui](MazIcon) you should provide "name" or "src" as prop')}));const d=e=>{const t={},s=e.attributes;if(!s)return t;for(let o=s.length-1;o>=0;o--)t[s[o].name]=s[o].value;return t},c=e=>{let t=e.cloneNode(!0);return t=o.transformSource(e),o.title&&((e,t)=>{const s=e.querySelectorAll("title");if(s.length>0)s[0].textContent=t;else{const s=document.createElementNS("http://www.w3.org/2000/svg","title");s.textContent=t,e.append(s)}})(t,o.title),e.innerHTML},h=e=>new Promise(((t,s)=>{const n=new XMLHttpRequest;n.open("GET",e,!0),n.addEventListener("load",(()=>{if(n.status>=200&&n.status<400)try{const e=new DOMParser;let i=e.parseFromString(n.responseText,"text/xml").querySelectorAll("svg")[0];i?(i=o.transformSource(i),t(i)):s(new Error('Loaded file is not valid SVG"'))}catch(e){s(e)}else s(new Error("Error loading SVG"))})),n.addEventListener("error",(()=>s())),n.send()}));return t.watchEffect((()=>(async e=>{n[e]||(n[e]=h(e));try{i.value=await n[e],await t.nextTick(),s("loaded",a.value)}catch(o){i.value&&(i.value=void 0,s("unloaded")),delete n[e],s("error",o)}})(m.value))),(s,o)=>{return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createCommentVNode(" eslint-disable vue/no-v-html "),t.createCommentVNode(" eslint-disable vue/html-self-closing "),i.value?(t.openBlock(),t.createElementBlock("svg",t.mergeProps({key:0,ref_key:"svgElem",ref:a,width:"1em",height:"1em"},{...d(i.value),...(n=s.$attrs,Object.keys(n).reduce(((e,t)=>(!1!==n[t]&&null!==n[t]&&void 0!==n[t]&&(e[t]=n[t]),e)),{}))},{style:`font-size: ${e.size}`,innerHTML:c(i.value)}),null,16,u)):t.createCommentVNode("v-if",!0),t.createCommentVNode(" eslint-enable vue/no-v-html "),t.createCommentVNode(" eslint-enable vue/html-self-closing ")],2112);var n}}}),g="data:image/svg+xml;base64,PHN2ZwogIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICB2aWV3Qm94PSIwIDAgMjQgMjQiCiAgc3Ryb2tlPSJub25lIgogIGZpbGw9ImN1cnJlbnRDb2xvciIKICBhcmlhLWhpZGRlbj0idHJ1ZSIKPgogIDxnPgogICAgPHJlY3QgZmlsbD0ibm9uZSIgaGVpZ2h0PSIyNCIgd2lkdGg9IjI0IiAvPgogICAgPGc+CiAgICAgIDxwYXRoCiAgICAgICAgZD0iTTguOSw2LjA3TDcuNDgsNC42Nkw5LDNoNmwxLjgzLDJIMjBjMS4xLDAsMiwwLjksMiwydjEyYzAsMC4wNS0wLjAxLDAuMS0wLjAyLDAuMTZMMjAsMTcuMTdWN2gtNC4wNWwtMS44My0ySDkuODggTDguOSw2LjA3eiBNMjAuNDksMjMuMzFMMTguMTcsMjFINGMtMS4xLDAtMi0wLjktMi0yVjdjMC0wLjU5LDAuMjctMS4xMiwwLjY4LTEuNDlsLTItMkwyLjEsMi4xbDE5LjgsMTkuOEwyMC40OSwyMy4zMXogTTkuMTksMTIuMDJDOS4wOCwxMi4zMyw5LDEyLjY1LDksMTNjMCwxLjY2LDEuMzQsMywzLDNjMC4zNSwwLDAuNjctMC4wOCwwLjk4LTAuMTlMOS4xOSwxMi4wMnogTTE2LjE3LDE5bC0xLjY4LTEuNjggQzEzLjc2LDE3Ljc1LDEyLjkxLDE4LDEyLDE4Yy0yLjc2LDAtNS0yLjI0LTUtNWMwLTAuOTEsMC4yNS0xLjc2LDAuNjgtMi40OUw0LjE3LDdINHYxMkgxNi4xN3ogTTE0LjgxLDExLjk4bDIuMDcsMi4wNyBDMTYuOTYsMTMuNzEsMTcsMTMuMzYsMTcsMTNjMC0yLjc2LTIuMjQtNS01LTVjLTAuMzYsMC0wLjcxLDAuMDQtMS4wNiwwLjEybDIuMDcsMi4wN0MxMy44NSwxMC40OSwxNC41MSwxMS4xNSwxNC44MSwxMS45OHoiCiAgICAgIC8+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K",p=Object.freeze(Object.defineProperty({__proto__:null,default:g},Symbol.toStringTag,{value:"Module"})),v=t.defineComponent({components:{MazIcon:h},directives:{"zoom-img":r,"lazy-img":c},props:{images:{type:Array,default:()=>[]},imagesShownCount:{type:Number,default:5},noRemaining:{type:Boolean,default:!1},height:{type:[Number,String],default:150},noHeight:{type:Boolean,default:!1},width:{type:[Number,String],default:"100%"},noWidth:{type:Boolean,default:!1},noRadius:{type:Boolean,default:!1},noZoom:{type:Boolean,default:!1},hasEmptyLayer:{type:Boolean,default:!0},lazy:{type:Boolean,default:!0},blur:{type:Boolean,default:!0},scale:{type:Boolean,default:!0}},setup(e){t.onBeforeMount((()=>{e.imagesShownCount>5&&console.warn('[MazUI](m-gallery) The maximum of "images-shown-count" is 5')}));const s=t.computed((()=>{const{height:t,width:s,noWidth:o,noHeight:n}=e;return{...o?{}:{flex:"0 0 "+typeof s=="number"?`${s}px`:s,width:"number"==typeof s?`${s}px`:s},...n?{}:{height:"number"==typeof t?`${t}px`:`${t}`,minHeight:"number"==typeof t?`${t}px`:`${t}`}}})),o=t.computed((()=>e.imagesShownCount<=5?e.imagesShownCount:5)),n=t.computed((()=>e.images.length-(e.images.length<o.value?e.images.length:o.value))),i=t.computed((()=>e.images.map((e=>"object"==typeof e?e:{src:e,alt:void 0})))),a=t.computed((()=>i.value.slice(0,o.value))),r=t.computed((()=>i.value.slice(o.value,e.images.length)));return{sizeStyle:s,imagesCount:o,shouldHaveRemainingLayer:t=>n.value&&t+1===a.value.length&&!e.noRemaining,imagesShown:a,numberImagesRemaining:n,imagesHidden:r,NoPhotographyIcon:g}}}),z={class:"m-gallery__wrapper maz-flex maz-flex-1"},y=["alt"],w={key:0,class:"m-gallery__remaining-layer maz-flex maz-bg-overlay maz-flex-center"},b={class:"maz-text-2xl maz-text-white"};const L=((e,t)=>{const s=e.__vccOpts||e;for(const[o,n]of t)s[o]=n;return s})(v,[["render",function(e,s,o,n,i,a){const r=t.resolveComponent("MazIcon"),l=t.resolveDirective("zoom-img"),m=t.resolveDirective("lazy-img");return e.images.length>0||e.hasEmptyLayer?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["m-gallery maz-flex",{"maz-rounded":!e.noRadius}]),style:t.normalizeStyle([e.sizeStyle])},[t.createElementVNode("section",z,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.imagesShown,((s,o)=>(t.openBlock(),t.createElementBlock("figure",{key:o,class:t.normalizeClass(["m-gallery__item !maz-my-0 maz-flex maz-flex-center",[`m-gallery__item--${o+1}`]])},[t.withDirectives(t.createElementVNode("img",{class:"m-gallery__item__image maz-flex-1",src:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",alt:s.alt,loading:"lazy"},null,8,y),[[l,{src:s.src,alt:s.alt,disabled:e.noZoom||e.shouldHaveRemainingLayer(o),blur:e.blur,scale:e.scale}],[m,{src:s.src,disabled:!e.lazy},"bg-image"]]),e.shouldHaveRemainingLayer(o)?t.withDirectives((t.openBlock(),t.createElementBlock("div",w,[t.createElementVNode("span",b,"+"+t.toDisplayString(e.numberImagesRemaining),1)])),[[l,{src:s.src,alt:s.alt,disabled:e.noZoom,blur:!1,scale:e.scale}]]):t.createCommentVNode("v-if",!0)],2)))),128)),e.hasEmptyLayer&&0===e.images.length?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["flex-center maz-flex maz-w-full maz-bg-color-light maz-text-normal",{"maz-rounded-xl":!e.noRadius}]),style:t.normalizeStyle([e.sizeStyle])},[t.createVNode(r,{src:e.NoPhotographyIcon,size:"2rem"},null,8,["src"])],6)):t.createCommentVNode("v-if",!0)]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.imagesHidden,((s,o)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",{key:o,class:"m-gallery__hidden"})),[[l,{src:s.src,disabled:e.noZoom}]]))),128))],6)):t.createCommentVNode("v-if",!0)}],["__scopeId","data-v-e9dc5a9e"]]);e.default=L,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
package/components/MazIcon.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { inject, defineComponent, ref, computed, onMounted, watchEffect, openBlock, createElementBlock,
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode(".m-gallery[data-v-e9dc5a9e]{position:relative;overflow:hidden}.m-gallery__hidden[data-v-e9dc5a9e]{display:none}.m-gallery__item[data-v-e9dc5a9e]{position:absolute;top:0px;margin:0;height:50%;width:100%;overflow:hidden;border-left-width:2px;border-color:transparent;padding:0}.m-gallery__item--1[data-v-e9dc5a9e]{left:0;height:100%}.m-gallery__item--1[data-v-e9dc5a9e]:not(:last-child){width:50%}.m-gallery__item--2[data-v-e9dc5a9e]{left:50%;width:50%;height:50%}.m-gallery__item--2[data-v-e9dc5a9e]:last-child{height:100%}.m-gallery__item--2[data-v-e9dc5a9e]:nth-last-child(4){width:25%}.m-gallery__item--3[data-v-e9dc5a9e]{top:50%;left:50%;width:25%}.m-gallery__item--3[data-v-e9dc5a9e]:last-child{width:50%}.m-gallery__item--3[data-v-e9dc5a9e]:nth-last-child(3){top:0;left:75%}.m-gallery__item--4[data-v-e9dc5a9e]{border-top-width:2px;border-color:transparent;top:50%;left:50%;width:25%}.m-gallery__item--4[data-v-e9dc5a9e]:last-child{left:75%;width:25%}.m-gallery__item--5[data-v-e9dc5a9e]{border-top-width:2px;border-color:transparent;top:50%;left:75%;width:25%}.m-gallery__item[data-v-e9dc5a9e]:first-child{border-left:0}.m-gallery__item--3[data-v-e9dc5a9e]:last-child,.m-gallery__item--3[data-v-e9dc5a9e]:nth-last-child(2),.m-gallery__item--4[data-v-e9dc5a9e]:last-child,.m-gallery__item--5[data-v-e9dc5a9e]{border-top-width:2px;border-color:transparent}.m-gallery__item__image[data-v-e9dc5a9e]{height:100%;max-width:100%;width:100%;background-position:center center;background-size:cover;background-repeat:no-repeat;background-color:#0000007f}.m-gallery__remaining-layer[data-v-e9dc5a9e]{position:absolute;top:0;bottom:0;right:0;left:0}.m-gallery__remaining-layer a span[data-v-e9dc5a9e]{color:#fff;font-size:2rem}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
|
|
2
|
+
import { inject, defineComponent, ref, computed, onMounted, watchEffect, openBlock, createElementBlock, Fragment, createCommentVNode, mergeProps, nextTick } from "vue";
|
|
3
3
|
function injectStrict(key, fallback) {
|
|
4
4
|
const resolved = inject(key, fallback);
|
|
5
5
|
if (!resolved) {
|
|
@@ -132,19 +132,31 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
132
132
|
};
|
|
133
133
|
watchEffect(() => getSource(fullSrc.value));
|
|
134
134
|
return (_ctx, _cache) => {
|
|
135
|
-
return
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
135
|
+
return openBlock(), createElementBlock(
|
|
136
|
+
Fragment,
|
|
137
|
+
null,
|
|
138
|
+
[
|
|
139
|
+
createCommentVNode(" eslint-disable vue/no-v-html "),
|
|
140
|
+
createCommentVNode(" eslint-disable vue/html-self-closing "),
|
|
141
|
+
svgElSource.value ? (openBlock(), createElementBlock("svg", mergeProps({
|
|
142
|
+
key: 0,
|
|
143
|
+
ref_key: "svgElem",
|
|
144
|
+
ref: svgElem,
|
|
145
|
+
width: "1em",
|
|
146
|
+
height: "1em"
|
|
147
|
+
}, {
|
|
148
|
+
...getSvgAttrs(svgElSource.value),
|
|
149
|
+
...filterAttrs(_ctx.$attrs)
|
|
150
|
+
}, {
|
|
151
|
+
style: `font-size: ${__props.size}`,
|
|
152
|
+
innerHTML: getSvgContent(svgElSource.value)
|
|
153
|
+
}), null, 16, _hoisted_1)) : createCommentVNode("v-if", true),
|
|
154
|
+
createCommentVNode(" eslint-enable vue/no-v-html "),
|
|
155
|
+
createCommentVNode(" eslint-enable vue/html-self-closing ")
|
|
156
|
+
],
|
|
157
|
+
2112
|
|
158
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
159
|
+
);
|
|
148
160
|
};
|
|
149
161
|
}
|
|
150
162
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode(".m-gallery[data-v-e9dc5a9e]{position:relative;overflow:hidden}.m-gallery__hidden[data-v-e9dc5a9e]{display:none}.m-gallery__item[data-v-e9dc5a9e]{position:absolute;top:0px;margin:0;height:50%;width:100%;overflow:hidden;border-left-width:2px;border-color:transparent;padding:0}.m-gallery__item--1[data-v-e9dc5a9e]{left:0;height:100%}.m-gallery__item--1[data-v-e9dc5a9e]:not(:last-child){width:50%}.m-gallery__item--2[data-v-e9dc5a9e]{left:50%;width:50%;height:50%}.m-gallery__item--2[data-v-e9dc5a9e]:last-child{height:100%}.m-gallery__item--2[data-v-e9dc5a9e]:nth-last-child(4){width:25%}.m-gallery__item--3[data-v-e9dc5a9e]{top:50%;left:50%;width:25%}.m-gallery__item--3[data-v-e9dc5a9e]:last-child{width:50%}.m-gallery__item--3[data-v-e9dc5a9e]:nth-last-child(3){top:0;left:75%}.m-gallery__item--4[data-v-e9dc5a9e]{border-top-width:2px;border-color:transparent;top:50%;left:50%;width:25%}.m-gallery__item--4[data-v-e9dc5a9e]:last-child{left:75%;width:25%}.m-gallery__item--5[data-v-e9dc5a9e]{border-top-width:2px;border-color:transparent;top:50%;left:75%;width:25%}.m-gallery__item[data-v-e9dc5a9e]:first-child{border-left:0}.m-gallery__item--3[data-v-e9dc5a9e]:last-child,.m-gallery__item--3[data-v-e9dc5a9e]:nth-last-child(2),.m-gallery__item--4[data-v-e9dc5a9e]:last-child,.m-gallery__item--5[data-v-e9dc5a9e]{border-top-width:2px;border-color:transparent}.m-gallery__item__image[data-v-e9dc5a9e]{height:100%;max-width:100%;width:100%;background-position:center center;background-size:cover;background-repeat:no-repeat;background-color:#0000007f}.m-gallery__remaining-layer[data-v-e9dc5a9e]{position:absolute;top:0;bottom:0;right:0;left:0}.m-gallery__remaining-layer a span[data-v-e9dc5a9e]{color:#fff;font-size:2rem}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).MazIcon={},e.Vue)}(this,(function(e,t){"use strict";const n=["innerHTML"],r=t.defineComponent({__name:"MazIcon",props:{src:{type:String,default:void 0},path:{type:String,default:void 0},name:{type:String,default:void 0},size:{type:String,default:"1.5rem"},title:{type:String,default:void 0},transformSource:{type:Function,default:e=>e}},emits:["loaded","unloaded","error"],setup(e,{emit:r}){const o=e,l={},a=t.ref(),i=t.ref(),s=()=>{try{return function(e,n){const r=t.inject(e,n);if(!r)throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${e}`);return r}("mazIconPath")}catch{return}},u=t.computed((()=>o.path??s())),c=t.computed((()=>o.src?o.src:u.value?`${u.value}/${o.name}.svg`:`/${o.name}.svg`));t.onMounted((()=>{o.name||o.src||console.error('[maz-ui](MazIcon) you should provide "name" or "src" as prop')}));const d=e=>{const t={},n=e.attributes;if(!n)return t;for(let r=n.length-1;r>=0;r--)t[n[r].name]=n[r].value;return t},m=e=>{let t=e.cloneNode(!0);return t=o.transformSource(e),o.title&&((e,t)=>{const n=e.querySelectorAll("title");if(n.length>0)n[0].textContent=t;else{const n=document.createElementNS("http://www.w3.org/2000/svg","title");n.textContent=t,e.append(n)}})(t,o.title),e.innerHTML},f=e=>new Promise(((t,n)=>{const r=new XMLHttpRequest;r.open("GET",e,!0),r.addEventListener("load",(()=>{if(r.status>=200&&r.status<400)try{const e=new DOMParser;let l=e.parseFromString(r.responseText,"text/xml").querySelectorAll("svg")[0];l?(l=o.transformSource(l),t(l)):n(new Error('Loaded file is not valid SVG"'))}catch(e){n(e)}else n(new Error("Error loading SVG"))})),r.addEventListener("error",(()=>n())),r.send()}));return t.watchEffect((()=>(async e=>{l[e]||(l[e]=f(e));try{a.value=await l[e],await t.nextTick(),r("loaded",i.value)}catch(n){a.value&&(a.value=void 0,r("unloaded")),delete l[e],r("error",n)}})(c.value))),(r,o)=>{return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createCommentVNode(" eslint-disable vue/no-v-html "),t.createCommentVNode(" eslint-disable vue/html-self-closing "),a.value?(t.openBlock(),t.createElementBlock("svg",t.mergeProps({key:0,ref_key:"svgElem",ref:i,width:"1em",height:"1em"},{...d(a.value),...(l=r.$attrs,Object.keys(l).reduce(((e,t)=>(!1!==l[t]&&null!==l[t]&&void 0!==l[t]&&(e[t]=l[t]),e)),{}))},{style:`font-size: ${e.size}`,innerHTML:m(a.value)}),null,16,n)):t.createCommentVNode("v-if",!0),t.createCommentVNode(" eslint-enable vue/no-v-html "),t.createCommentVNode(" eslint-enable vue/html-self-closing ")],2112);var l}}});e.default=r,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|