@orangelogic/design-system 2.108.0 → 2.110.0
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/library/assets/design-system.css +1 -1
- package/library/chunks/{asset.BOex8mNF.js → asset.NgymQ3Zx.js} +139 -128
- package/library/chunks/{button.BgLgpUch.js → button.i88sSbTZ.js} +1 -1
- package/library/chunks/{color-swatch-group.CJR5NTAx.js → color-swatch-group.mIHaCJsh.js} +5 -5
- package/library/chunks/{color-swatch.LWXX_hoG.js → color-swatch.D9vkPoV2.js} +1 -1
- package/library/chunks/{confirm-popover.BzpCIDBx.js → confirm-popover.UuBhn8GA.js} +3 -3
- package/library/chunks/{content-builder.B-bd8FaV.js → content-builder.OsUmm8Wu.js} +15 -15
- package/library/chunks/{dialog.BTYaKnFg.js → dialog.Bso6gK-8.js} +2 -2
- package/library/chunks/document-viewer.C6eclRvd.js +25232 -0
- package/library/chunks/{dot-pagination.Do9tKlWY.js → dot-pagination.CNnUuI-Z.js} +1 -1
- package/library/chunks/{file-on-demand.DICkRgvk.js → file-on-demand.Cf2ujTeF.js} +8 -8
- package/library/chunks/{folder-select.DLjFwi4I.js → folder-select.ByNUfTia.js} +3 -3
- package/library/chunks/{header.CLZWpAF-.js → header.hj2Kw-N7.js} +1 -1
- package/library/chunks/{i18n.ju3y72qp.js → i18n.D6AYDPK-.js} +3 -0
- package/library/chunks/{icon-button.CLlmo1AF.js → icon-button.ztYU-DHy.js} +1 -1
- package/library/chunks/{iframe.CqtDcvOS.js → iframe.uLxZ6LsL.js} +1 -1
- package/library/chunks/{image.CfNFiNFB.js → image.DKB6yEQO.js} +187 -187
- package/library/chunks/inheritsLoose.BuSn_CvZ.js +27 -0
- package/library/chunks/{cropper.CMfBGsNv.js → jsx-runtime.CTpPVMxj.js} +9462 -10423
- package/library/chunks/{list-editor.zY8vlbde.js → list-editor.GT2kQsmR.js} +87 -86
- package/library/chunks/{option.BOZYPQZH.js → option.BAYtHIvG.js} +1 -1
- package/library/chunks/{pagination.BGjp2gVJ.js → pagination.CCJD61IB.js} +4 -4
- package/library/chunks/{resizable-component.styles.sAhMVN1H.js → resizable-component.styles.DpK0TTP5.js} +6 -6
- package/library/chunks/{responsive.Aigicabj.js → responsive.C8NCkfCG.js} +1 -1
- package/library/chunks/{tab-group.hmlZakLy.js → tab-group.BsR8tdVY.js} +3 -3
- package/library/chunks/{table.XsBhq1U3.js → table.DL_CEeYh.js} +5 -5
- package/library/chunks/{tree.DAhCAxwV.js → tree.KmZRWZ0F.js} +1 -1
- package/library/components/alert.js +2 -2
- package/library/components/asset-link-format.js +6 -6
- package/library/components/atoms.js +147 -145
- package/library/components/audio.js +3 -3
- package/library/components/border-input-group.js +1 -1
- package/library/components/breadcrumb.js +1 -1
- package/library/components/button.js +2 -2
- package/library/components/color-picker.js +2 -2
- package/library/components/color-swatch-group.js +6 -6
- package/library/components/color-swatch.js +2 -2
- package/library/components/confirm-popover.js +4 -4
- package/library/components/copy-button.js +1 -1
- package/library/components/corner-position-input-group.js +2 -2
- package/library/components/cropper.js +961 -10
- package/library/components/details.js +1 -1
- package/library/components/dialog.js +3 -3
- package/library/components/document-viewer.d.ts +3 -0
- package/library/components/document-viewer.js +17 -0
- package/library/components/dot-pagination.js +2 -2
- package/library/components/drawer.js +2 -2
- package/library/components/dropdown.js +1 -1
- package/library/components/dynamic-select.js +4 -4
- package/library/components/e-chart.js +1 -1
- package/library/components/element-clamp.js +2 -2
- package/library/components/file-on-demand.js +9 -9
- package/library/components/folder-select.js +3 -3
- package/library/components/format-bytes.js +1 -1
- package/library/components/format-date.js +1 -1
- package/library/components/format-number.js +1 -1
- package/library/components/format-time.js +1 -1
- package/library/components/header.js +2 -2
- package/library/components/icon-button.js +2 -2
- package/library/components/iframe.js +2 -2
- package/library/components/image-comparer.js +1 -1
- package/library/components/image.js +3 -3
- package/library/components/input.js +1 -1
- package/library/components/line-clamp.js +1 -1
- package/library/components/list-editor.js +6 -6
- package/library/components/masonry.js +2 -2
- package/library/components/menu-item.js +1 -1
- package/library/components/menu.js +1 -1
- package/library/components/molecules.js +7 -7
- package/library/components/option.js +2 -2
- package/library/components/organisms.js +2 -2
- package/library/components/pagination.js +5 -5
- package/library/components/popup.js +1 -1
- package/library/components/position-picker.js +1 -1
- package/library/components/progress-bar.js +1 -1
- package/library/components/progress-ring.js +1 -1
- package/library/components/range.js +1 -1
- package/library/components/rating.js +1 -1
- package/library/components/relative-time.js +1 -1
- package/library/components/select.js +2 -2
- package/library/components/share-option-list.js +1 -1
- package/library/components/sidebar.js +1 -1
- package/library/components/size-input-group.js +2 -2
- package/library/components/spinner.js +1 -1
- package/library/components/split-panel.js +1 -1
- package/library/components/tab-group.js +4 -4
- package/library/components/tab.js +2 -2
- package/library/components/table.js +5 -5
- package/library/components/tag.js +2 -2
- package/library/components/tooltip.js +1 -1
- package/library/components/tree-item.js +2 -2
- package/library/components/tree.js +2 -2
- package/library/components/typeface.js +2 -2
- package/library/components/types.js +17110 -17307
- package/library/components/video.js +3605 -3625
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/document-viewer/document-viewer.d.ts +60 -0
- package/library/packages/atoms/src/components/document-viewer/document-viewer.styles.d.ts +2 -0
- package/library/packages/atoms/src/index.d.ts +1 -0
- package/library/packages/events/src/cx-document-viewer-open-asset.d.ts +8 -0
- package/library/packages/events/src/events.d.ts +1 -0
- package/library/packages/hybrid/book-reader/src/book-reader/book-reader.d.ts +99 -0
- package/library/packages/hybrid/book-reader/src/book-reader/book-reader.styles.d.ts +2 -0
- package/library/packages/hybrid/book-reader/src/react/BookReader.d.ts +6 -0
- package/library/packages/hybrid/book-reader/src/react/components/Album/Album.d.ts +31 -0
- package/library/packages/hybrid/book-reader/src/react/components/Album/AlbumThumbnails.d.ts +17 -0
- package/library/packages/hybrid/book-reader/src/react/components/Album/ErrorImage.d.ts +5 -0
- package/library/packages/hybrid/book-reader/src/react/components/Album/Page.d.ts +21 -0
- package/library/packages/hybrid/book-reader/src/react/components/Album/index.d.ts +1 -0
- package/library/packages/hybrid/book-reader/src/react/components/Book/Book.d.ts +20 -0
- package/library/packages/hybrid/book-reader/src/react/components/Book/BookThumbnails.d.ts +17 -0
- package/library/packages/hybrid/book-reader/src/react/components/Book/Page.d.ts +20 -0
- package/library/packages/hybrid/book-reader/src/react/components/Book/PageError.d.ts +5 -0
- package/library/packages/hybrid/book-reader/src/react/components/Book/PageRenderer/PageRenderer.d.ts +8 -0
- package/library/packages/hybrid/book-reader/src/react/components/Book/PageRenderer/RendererContext.d.ts +5 -0
- package/library/packages/hybrid/book-reader/src/react/components/Book/PageRenderer/StructTree.d.ts +1 -0
- package/library/packages/hybrid/book-reader/src/react/components/Book/PageRenderer/StructTreeItem.d.ts +9 -0
- package/library/packages/hybrid/book-reader/src/react/components/Book/PageRenderer/index.d.ts +2 -0
- package/library/packages/hybrid/book-reader/src/react/components/ColdStorageAsset/ColdStorageAsset.d.ts +7 -0
- package/library/packages/hybrid/book-reader/src/react/components/ColdStorageAsset/ColdStorageAsset.styles.d.ts +2 -0
- package/library/packages/hybrid/book-reader/src/react/components/ColdStorageAsset/index.d.ts +1 -0
- package/library/packages/hybrid/book-reader/src/react/components/Container/Container.d.ts +7 -0
- package/library/packages/hybrid/book-reader/src/react/components/Container/index.d.ts +1 -0
- package/library/packages/hybrid/book-reader/src/react/components/Controller/Controller.d.ts +39 -0
- package/library/packages/hybrid/book-reader/src/react/components/Controller/Controller.styles.d.ts +2 -0
- package/library/packages/hybrid/book-reader/src/react/components/Controller/PageControl.d.ts +12 -0
- package/library/packages/hybrid/book-reader/src/react/components/Controller/ScaleControl.d.ts +10 -0
- package/library/packages/hybrid/book-reader/src/react/components/Controller/ToggleFullscreen.d.ts +7 -0
- package/library/packages/hybrid/book-reader/src/react/components/Controller/ToggleSearchBox.d.ts +7 -0
- package/library/packages/hybrid/book-reader/src/react/components/Controller/ToggleSidebar.d.ts +7 -0
- package/library/packages/hybrid/book-reader/src/react/components/Controller/ViewControl.d.ts +7 -0
- package/library/packages/hybrid/book-reader/src/react/components/Controller/index.d.ts +1 -0
- package/library/packages/hybrid/book-reader/src/react/components/Drawer/Drawer.d.ts +9 -0
- package/library/packages/hybrid/book-reader/src/react/components/Drawer/index.d.ts +1 -0
- package/library/packages/hybrid/book-reader/src/react/components/EmptyDocument/EmptyDocument.d.ts +2 -0
- package/library/packages/hybrid/book-reader/src/react/components/EmptyDocument/EmptyDocument.styles.d.ts +2 -0
- package/library/packages/hybrid/book-reader/src/react/components/EmptyDocument/index.d.ts +1 -0
- package/library/packages/hybrid/book-reader/src/react/components/Loading/DocumentLoading.d.ts +5 -0
- package/library/packages/hybrid/book-reader/src/react/components/Loading/Loading.styles.d.ts +2 -0
- package/library/packages/hybrid/book-reader/src/react/components/Loading/PageLoading.d.ts +5 -0
- package/library/packages/hybrid/book-reader/src/react/components/Loading/index.d.ts +2 -0
- package/library/packages/hybrid/book-reader/src/react/components/PPTProgressBar/PPTProgressBar.d.ts +5 -0
- package/library/packages/hybrid/book-reader/src/react/components/PPTProgressBar/index.d.ts +1 -0
- package/library/packages/hybrid/book-reader/src/react/components/PasswordInput/PasswordInput.d.ts +7 -0
- package/library/packages/hybrid/book-reader/src/react/components/PasswordInput/PasswordInput.styles.d.ts +2 -0
- package/library/packages/hybrid/book-reader/src/react/components/PasswordInput/index.d.ts +1 -0
- package/library/packages/hybrid/book-reader/src/react/components/ProgressBar/ProgressBar.d.ts +7 -0
- package/library/packages/hybrid/book-reader/src/react/components/ProgressBar/index.d.ts +1 -0
- package/library/packages/hybrid/book-reader/src/react/components/ScaleBox/ScaleBox.d.ts +21 -0
- package/library/packages/hybrid/book-reader/src/react/components/SearchBox/SearchBox.d.ts +18 -0
- package/library/packages/hybrid/book-reader/src/react/components/SearchBox/SearchBox.styles.d.ts +2 -0
- package/library/packages/hybrid/book-reader/src/react/components/SearchBox/index.d.ts +1 -0
- package/library/packages/hybrid/book-reader/src/react/components/TextHighlight/TextHighlight.d.ts +9 -0
- package/library/packages/hybrid/book-reader/src/react/components/TextHighlight/index.d.ts +1 -0
- package/library/packages/hybrid/book-reader/src/react/components/Thumbnails/Thumbnails.d.ts +32 -0
- package/library/packages/hybrid/book-reader/src/react/components/Thumbnails/index.d.ts +1 -0
- package/library/packages/hybrid/book-reader/src/react/components/ZoomPanPinchWrapper/ZoomPanPinchWrapper.d.ts +12 -0
- package/library/packages/hybrid/book-reader/src/react/components/ZoomPanPinchWrapper/ZoomPanPinchWrapper.styles.d.ts +2 -0
- package/library/packages/hybrid/book-reader/src/react/components/ZoomPanPinchWrapper/index.d.ts +1 -0
- package/library/packages/hybrid/book-reader/src/react/constant.d.ts +81 -0
- package/library/packages/hybrid/book-reader/src/react/contexts/AlbumContext.d.ts +8 -0
- package/library/packages/hybrid/book-reader/src/react/contexts/BookContext.d.ts +4 -0
- package/library/packages/hybrid/book-reader/src/react/contexts/BreakpointsContext.d.ts +4 -0
- package/library/packages/hybrid/book-reader/src/react/contexts/ComponentContext.d.ts +3 -0
- package/library/packages/hybrid/book-reader/src/react/contexts/TranslationContext.d.ts +7 -0
- package/library/packages/hybrid/book-reader/src/react/hooks/useAlbumContext.d.ts +1 -0
- package/library/packages/hybrid/book-reader/src/react/hooks/useBookContext.d.ts +1 -0
- package/library/packages/hybrid/book-reader/src/react/hooks/useBookEvents.d.ts +13 -0
- package/library/packages/hybrid/book-reader/src/react/hooks/useBreakpoint.d.ts +6 -0
- package/library/packages/hybrid/book-reader/src/react/hooks/useDrawer.d.ts +13 -0
- package/library/packages/hybrid/book-reader/src/react/hooks/useImageTextSearch.d.ts +4 -0
- package/library/packages/hybrid/book-reader/src/react/hooks/useKeyboardShortcuts.d.ts +12 -0
- package/library/packages/hybrid/book-reader/src/react/hooks/usePageFlip.d.ts +10 -0
- package/library/packages/hybrid/book-reader/src/react/hooks/usePdfTextSearch.d.ts +4 -0
- package/library/packages/hybrid/book-reader/src/react/hooks/usePopoverMenu.d.ts +7 -0
- package/library/packages/hybrid/book-reader/src/react/hooks/useRendererContext.d.ts +1 -0
- package/library/packages/hybrid/book-reader/src/react/hooks/useResolver.d.ts +21 -0
- package/library/packages/hybrid/book-reader/src/react/hooks/useScale.d.ts +19 -0
- package/library/packages/hybrid/book-reader/src/react/hooks/useSearch.d.ts +19 -0
- package/library/packages/hybrid/book-reader/src/react/page-flip/PageFlip.d.ts +215 -0
- package/library/packages/hybrid/book-reader/src/react/page-flip/Settings.d.ts +59 -0
- package/library/packages/hybrid/book-reader/src/react/page-flip/collection/HTMLPageCollection.d.ts +13 -0
- package/library/packages/hybrid/book-reader/src/react/page-flip/collection/ImagePageCollection.d.ts +12 -0
- package/library/packages/hybrid/book-reader/src/react/page-flip/collection/PageCollection.d.ts +116 -0
- package/library/packages/hybrid/book-reader/src/react/page-flip/event/EventObject.d.ts +34 -0
- package/library/packages/hybrid/book-reader/src/react/page-flip/flip/Flip.d.ts +126 -0
- package/library/packages/hybrid/book-reader/src/react/page-flip/flip/FlipCalculation.d.ts +99 -0
- package/library/packages/hybrid/book-reader/src/react/page-flip/index.d.ts +22 -0
- package/library/packages/hybrid/book-reader/src/react/page-flip/page/HTMLPage.d.ts +24 -0
- package/library/packages/hybrid/book-reader/src/react/page-flip/page/ImagePage.d.ts +19 -0
- package/library/packages/hybrid/book-reader/src/react/page-flip/page/Page.d.ts +123 -0
- package/library/packages/hybrid/book-reader/src/react/page-flip/render/CanvasRender.d.ts +19 -0
- package/library/packages/hybrid/book-reader/src/react/page-flip/render/HTMLRender.d.ts +58 -0
- package/library/packages/hybrid/book-reader/src/react/page-flip/render/Render.d.ts +233 -0
- package/library/packages/hybrid/book-reader/src/react/page-flip/ui/CanvasUI.d.ts +17 -0
- package/library/packages/hybrid/book-reader/src/react/page-flip/ui/HTMLUI.d.ts +19 -0
- package/library/packages/hybrid/book-reader/src/react/page-flip/ui/UI.d.ts +78 -0
- package/library/packages/hybrid/book-reader/src/react/types.d.ts +206 -0
- package/library/packages/hybrid/book-reader/src/react/utils/CalculateScale.d.ts +1 -0
- package/library/packages/hybrid/book-reader/src/react/utils/EscapeRegex.d.ts +2 -0
- package/library/packages/hybrid/book-reader/src/react/utils/Fullscreen.d.ts +4 -0
- package/library/packages/hybrid/book-reader/src/react/utils/GetActivePage.d.ts +1 -0
- package/library/packages/hybrid/book-reader/src/react/utils/GetIIIFImageUrl.d.ts +7 -0
- package/library/packages/hybrid/book-reader/src/react/utils/GetVisiblePageNumber.d.ts +1 -0
- package/library/packages/hybrid/book-reader/src/react/utils/IsImageBook.d.ts +3 -0
- package/library/packages/hybrid/book-reader/src/react/utils/IsPDFBook.d.ts +3 -0
- package/library/packages/hybrid/book-reader/src/react/utils/MergeRefs.d.ts +14 -0
- package/library/packages/hybrid/book-reader/src/react/utils/NormalizeString.d.ts +1 -0
- package/library/packages/hybrid/book-reader/src/react/utils/PageFlipGeometry.d.ts +86 -0
- package/library/packages/hybrid/book-reader/src/react/utils/PagePosition.d.ts +2 -0
- package/library/packages/hybrid/book-reader/src/react/utils/PageRendererUtil.d.ts +350 -0
- package/library/packages/hybrid/book-reader/src/react/utils/PdfWorker.d.ts +17 -0
- package/library/packages/hybrid/book-reader/src/react/utils/Random.d.ts +1 -0
- package/library/packages/hybrid/book-reader/src/react/utils/RenderingQueue.d.ts +8 -0
- package/library/packages/organisms/src/content-builder/configs/document-viewer.d.ts +24 -0
- package/library/packages/organisms/src/content-builder/configs/index.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs-controller.d.ts +50 -24
- package/library/packages/organisms/src/content-builder/content-builder-config.d.ts +3 -0
- package/library/packages/organisms/src/content-builder/plugins/document-viewer.d.ts +5 -0
- package/library/packages/organisms/src/content-builder/plugins/index.d.ts +1 -0
- package/library/packages/react-web-component.d.ts +6581 -0
- package/library/packages/services/src/api/asset/asset.d.ts +10 -0
- package/library/packages/services/src/api/endpoints.d.ts +1 -0
- package/library/packages/types/src/book-reader.d.ts +9 -0
- package/library/packages/types/src/content-builder.d.ts +3 -1
- package/library/packages/utils/src/custom-element/i18n.d.ts +3 -0
- package/library/react-web-component.d.ts +110 -4
- package/library/utils.js +3 -3
- package/package.json +1 -1
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
import { r as
|
|
2
|
-
import { c as
|
|
3
|
-
import { a as
|
|
4
|
-
import { c as
|
|
5
|
-
import { d as
|
|
6
|
-
import { L as
|
|
1
|
+
import { r as we, R as Ee, H as Y, a as ee, b as ke } from "./resizable-component.styles.DpK0TTP5.js";
|
|
2
|
+
import { c as Ce } from "./component.styles.CRO4Odto.js";
|
|
3
|
+
import { a as Le } from "./index.Cpamj0jB.js";
|
|
4
|
+
import { c as Se } from "./custom-element.L4WJXn1j.js";
|
|
5
|
+
import { d as $e } from "./debounce.CIEhztrj.js";
|
|
6
|
+
import { L as He } from "./i18n.D6AYDPK-.js";
|
|
7
7
|
import { w as Z } from "./watch.CThbualB.js";
|
|
8
|
-
import { E as
|
|
8
|
+
import { E as oe, i as re, x as C } from "./lit-element.jLBm65_O.js";
|
|
9
9
|
import { n as y } from "./lib-cortex-element.CVMmyPMC.js";
|
|
10
10
|
import { r as $ } from "./state.CSDxrqLd.js";
|
|
11
|
-
import { e as
|
|
11
|
+
import { e as K } from "./query.BBf1UFkC.js";
|
|
12
12
|
import { e as L } from "./class-map.BiVq-cVR.js";
|
|
13
|
-
import { o as
|
|
14
|
-
import { e as
|
|
15
|
-
import { m as
|
|
16
|
-
import { o as
|
|
17
|
-
import { n as
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
13
|
+
import { o as V } from "./if-defined.BRoBj_Rp.js";
|
|
14
|
+
import { e as Re, i as Te } from "./directive.oAbCiebi.js";
|
|
15
|
+
import { m as Ae } from "./directive-helpers.Dm4rc594.js";
|
|
16
|
+
import { o as Oe } from "./style-map.llVFPd__.js";
|
|
17
|
+
import { n as T } from "./when.Dr1es41R.js";
|
|
18
|
+
import je from "../components/icon.js";
|
|
19
|
+
import Ze from "../components/popup.js";
|
|
20
|
+
import _e from "../components/resize-observer.js";
|
|
21
|
+
import Ie from "../components/skeleton.js";
|
|
22
|
+
import Me from "../components/space.js";
|
|
23
23
|
var j = /* @__PURE__ */ ((i) => (i.Automatic = "automatic", i.Manual = "manual", i))(j || {});
|
|
24
24
|
/**
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2021 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
28
|
*/
|
|
29
|
-
const
|
|
29
|
+
const Ne = Re(class extends Te {
|
|
30
30
|
constructor() {
|
|
31
|
-
super(...arguments), this.key =
|
|
31
|
+
super(...arguments), this.key = oe;
|
|
32
32
|
}
|
|
33
33
|
render(i, t) {
|
|
34
34
|
return this.key = i, t;
|
|
35
35
|
}
|
|
36
|
-
update(i, [t,
|
|
37
|
-
return t !== this.key && (
|
|
36
|
+
update(i, [t, o]) {
|
|
37
|
+
return t !== this.key && (Ae(i), this.key = t), o;
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
40
|
/*! medium-zoom 1.1.0 | MIT License | https://github.com/francoischalifour/medium-zoom */
|
|
41
41
|
var S = Object.assign || function(i) {
|
|
42
42
|
for (var t = 1; t < arguments.length; t++) {
|
|
43
|
-
var
|
|
44
|
-
for (var
|
|
45
|
-
Object.prototype.hasOwnProperty.call(
|
|
43
|
+
var o = arguments[t];
|
|
44
|
+
for (var s in o)
|
|
45
|
+
Object.prototype.hasOwnProperty.call(o, s) && (i[s] = o[s]);
|
|
46
46
|
}
|
|
47
47
|
return i;
|
|
48
|
-
},
|
|
48
|
+
}, P = function(t) {
|
|
49
49
|
return t.tagName === "IMG";
|
|
50
|
-
},
|
|
50
|
+
}, Pe = function(t) {
|
|
51
51
|
return NodeList.prototype.isPrototypeOf(t);
|
|
52
52
|
}, F = function(t) {
|
|
53
53
|
return t && t.nodeType === 1;
|
|
54
|
-
}, ee = function(t) {
|
|
55
|
-
var r = t.currentSrc || t.src;
|
|
56
|
-
return r.substr(-4).toLowerCase() === ".svg";
|
|
57
54
|
}, te = function(t) {
|
|
55
|
+
var o = t.currentSrc || t.src;
|
|
56
|
+
return o.substr(-4).toLowerCase() === ".svg";
|
|
57
|
+
}, ie = function(t) {
|
|
58
58
|
try {
|
|
59
|
-
return Array.isArray(t) ? t.filter(
|
|
59
|
+
return Array.isArray(t) ? t.filter(P) : Pe(t) ? [].slice.call(t).filter(P) : F(t) ? [t].filter(P) : typeof t == "string" ? [].slice.call(document.querySelectorAll(t)).filter(P) : [];
|
|
60
60
|
} catch {
|
|
61
61
|
throw new TypeError(`The provided selector is invalid.
|
|
62
62
|
Expects a CSS selector, a Node element, a NodeList or an array.
|
|
63
63
|
See: https://github.com/francoischalifour/medium-zoom`);
|
|
64
64
|
}
|
|
65
|
-
},
|
|
66
|
-
var
|
|
67
|
-
return
|
|
68
|
-
},
|
|
69
|
-
var
|
|
70
|
-
return
|
|
71
|
-
},
|
|
72
|
-
var
|
|
65
|
+
}, Fe = function(t) {
|
|
66
|
+
var o = document.createElement("div");
|
|
67
|
+
return o.classList.add("medium-zoom-overlay"), o.style.background = t, o;
|
|
68
|
+
}, We = function(t) {
|
|
69
|
+
var o = t.getBoundingClientRect(), s = o.top, c = o.left, E = o.width, k = o.height, b = t.cloneNode(), W = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0, _ = window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0;
|
|
70
|
+
return b.removeAttribute("id"), b.style.position = "absolute", b.style.top = s + W + "px", b.style.left = c + _ + "px", b.style.width = E + "px", b.style.height = k + "px", b.style.transform = "", b;
|
|
71
|
+
}, A = function(t, o) {
|
|
72
|
+
var s = S({
|
|
73
73
|
bubbles: !1,
|
|
74
74
|
cancelable: !1,
|
|
75
75
|
detail: void 0
|
|
76
|
-
},
|
|
76
|
+
}, o);
|
|
77
77
|
if (typeof window.CustomEvent == "function")
|
|
78
|
-
return new CustomEvent(t,
|
|
78
|
+
return new CustomEvent(t, s);
|
|
79
79
|
var c = document.createEvent("CustomEvent");
|
|
80
|
-
return c.initCustomEvent(t,
|
|
81
|
-
},
|
|
82
|
-
var
|
|
80
|
+
return c.initCustomEvent(t, s.bubbles, s.cancelable, s.detail), c;
|
|
81
|
+
}, Ue = function i(t) {
|
|
82
|
+
var o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = window.Promise || function(r) {
|
|
83
83
|
function a() {
|
|
84
84
|
}
|
|
85
|
-
|
|
86
|
-
}, c = function(
|
|
87
|
-
var a =
|
|
85
|
+
r(a, a);
|
|
86
|
+
}, c = function(r) {
|
|
87
|
+
var a = r.target;
|
|
88
88
|
if (a === M) {
|
|
89
89
|
x();
|
|
90
90
|
return;
|
|
@@ -92,70 +92,70 @@ See: https://github.com/francoischalifour/medium-zoom`);
|
|
|
92
92
|
v.indexOf(a) !== -1 && G({ target: a });
|
|
93
93
|
}, E = function() {
|
|
94
94
|
if (!(H || !e.original)) {
|
|
95
|
-
var
|
|
96
|
-
Math.abs(J -
|
|
95
|
+
var r = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
|
|
96
|
+
Math.abs(J - r) > d.scrollOffset && setTimeout(x, 150);
|
|
97
97
|
}
|
|
98
|
-
}, k = function(
|
|
99
|
-
var a =
|
|
98
|
+
}, k = function(r) {
|
|
99
|
+
var a = r.key || r.keyCode;
|
|
100
100
|
(a === "Escape" || a === "Esc" || a === 27) && x();
|
|
101
|
-
},
|
|
102
|
-
var
|
|
103
|
-
if (
|
|
104
|
-
var m = F(
|
|
101
|
+
}, b = function() {
|
|
102
|
+
var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, a = r;
|
|
103
|
+
if (r.background && (M.style.background = r.background), r.container && r.container instanceof Object && (a.container = S({}, d.container, r.container)), r.template) {
|
|
104
|
+
var m = F(r.template) ? r.template : document.querySelector(r.template);
|
|
105
105
|
a.template = m;
|
|
106
106
|
}
|
|
107
107
|
return d = S({}, d, a), v.forEach(function(g) {
|
|
108
|
-
g.dispatchEvent(
|
|
108
|
+
g.dispatchEvent(A("medium-zoom:update", {
|
|
109
109
|
detail: { zoom: u }
|
|
110
110
|
}));
|
|
111
111
|
}), u;
|
|
112
112
|
}, W = function() {
|
|
113
|
-
var
|
|
114
|
-
return i(S({}, d,
|
|
113
|
+
var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
114
|
+
return i(S({}, d, r));
|
|
115
115
|
}, _ = function() {
|
|
116
|
-
for (var
|
|
116
|
+
for (var r = arguments.length, a = Array(r), m = 0; m < r; m++)
|
|
117
117
|
a[m] = arguments[m];
|
|
118
118
|
var g = a.reduce(function(n, f) {
|
|
119
|
-
return [].concat(n,
|
|
119
|
+
return [].concat(n, ie(f));
|
|
120
120
|
}, []);
|
|
121
121
|
return g.filter(function(n) {
|
|
122
122
|
return v.indexOf(n) === -1;
|
|
123
123
|
}).forEach(function(n) {
|
|
124
124
|
v.push(n), n.classList.add("medium-zoom-image");
|
|
125
125
|
}), I.forEach(function(n) {
|
|
126
|
-
var f = n.type,
|
|
126
|
+
var f = n.type, z = n.listener, R = n.options;
|
|
127
127
|
g.forEach(function(w) {
|
|
128
|
-
w.addEventListener(f,
|
|
128
|
+
w.addEventListener(f, z, R);
|
|
129
129
|
});
|
|
130
130
|
}), u;
|
|
131
|
-
},
|
|
132
|
-
for (var
|
|
131
|
+
}, ae = function() {
|
|
132
|
+
for (var r = arguments.length, a = Array(r), m = 0; m < r; m++)
|
|
133
133
|
a[m] = arguments[m];
|
|
134
134
|
e.zoomed && x();
|
|
135
135
|
var g = a.length > 0 ? a.reduce(function(n, f) {
|
|
136
|
-
return [].concat(n,
|
|
136
|
+
return [].concat(n, ie(f));
|
|
137
137
|
}, []) : v;
|
|
138
138
|
return g.forEach(function(n) {
|
|
139
|
-
n.classList.remove("medium-zoom-image"), n.dispatchEvent(
|
|
139
|
+
n.classList.remove("medium-zoom-image"), n.dispatchEvent(A("medium-zoom:detach", {
|
|
140
140
|
detail: { zoom: u }
|
|
141
141
|
}));
|
|
142
142
|
}), v = v.filter(function(n) {
|
|
143
143
|
return g.indexOf(n) === -1;
|
|
144
144
|
}), u;
|
|
145
|
-
},
|
|
145
|
+
}, ne = function(r, a) {
|
|
146
146
|
var m = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
147
147
|
return v.forEach(function(g) {
|
|
148
|
-
g.addEventListener("medium-zoom:" +
|
|
149
|
-
}), I.push({ type: "medium-zoom:" +
|
|
150
|
-
},
|
|
148
|
+
g.addEventListener("medium-zoom:" + r, a, m);
|
|
149
|
+
}), I.push({ type: "medium-zoom:" + r, listener: a, options: m }), u;
|
|
150
|
+
}, se = function(r, a) {
|
|
151
151
|
var m = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
152
152
|
return v.forEach(function(g) {
|
|
153
|
-
g.removeEventListener("medium-zoom:" +
|
|
153
|
+
g.removeEventListener("medium-zoom:" + r, a, m);
|
|
154
154
|
}), I = I.filter(function(g) {
|
|
155
|
-
return !(g.type === "medium-zoom:" +
|
|
155
|
+
return !(g.type === "medium-zoom:" + r && g.listener.toString() === a.toString());
|
|
156
156
|
}), u;
|
|
157
157
|
}, X = function() {
|
|
158
|
-
var
|
|
158
|
+
var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, a = r.target, m = function() {
|
|
159
159
|
var n = {
|
|
160
160
|
width: document.documentElement.clientWidth,
|
|
161
161
|
height: document.documentElement.clientHeight,
|
|
@@ -163,30 +163,30 @@ See: https://github.com/francoischalifour/medium-zoom`);
|
|
|
163
163
|
top: 0,
|
|
164
164
|
right: 0,
|
|
165
165
|
bottom: 0
|
|
166
|
-
}, f = void 0,
|
|
166
|
+
}, f = void 0, z = void 0;
|
|
167
167
|
if (d.container)
|
|
168
168
|
if (d.container instanceof Object)
|
|
169
|
-
n = S({}, n, d.container), f = n.width - n.left - n.right - d.margin * 2,
|
|
169
|
+
n = S({}, n, d.container), f = n.width - n.left - n.right - d.margin * 2, z = n.height - n.top - n.bottom - d.margin * 2;
|
|
170
170
|
else {
|
|
171
|
-
var
|
|
171
|
+
var R = F(d.container) ? d.container : document.querySelector(d.container), w = R.getBoundingClientRect(), U = w.width, ce = w.height, me = w.left, ge = w.top;
|
|
172
172
|
n = S({}, n, {
|
|
173
173
|
width: U,
|
|
174
|
-
height:
|
|
175
|
-
left:
|
|
176
|
-
top:
|
|
174
|
+
height: ce,
|
|
175
|
+
left: me,
|
|
176
|
+
top: ge
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
|
-
f = f || n.width - d.margin * 2,
|
|
180
|
-
var
|
|
179
|
+
f = f || n.width - d.margin * 2, z = z || n.height - d.margin * 2;
|
|
180
|
+
var O = e.zoomedHd || e.original, ue = te(O) ? f : O.naturalWidth || f, pe = te(O) ? z : O.naturalHeight || z, N = O.getBoundingClientRect(), fe = N.top, ve = N.left, B = N.width, D = N.height, ye = Math.min(Math.max(B, ue), f) / B, ze = Math.min(Math.max(D, pe), z) / D, q = Math.min(ye, ze), be = (-ve + (f - B) / 2 + d.margin + n.left) / q, xe = (-fe + (z - D) / 2 + d.margin + n.top) / q, Q = "scale(" + q + ") translate3d(" + be + "px, " + xe + "px, 0)";
|
|
181
181
|
e.zoomed.style.transform = Q, e.zoomedHd && (e.zoomedHd.style.transform = Q);
|
|
182
182
|
};
|
|
183
|
-
return new
|
|
183
|
+
return new s(function(g) {
|
|
184
184
|
if (a && v.indexOf(a) === -1) {
|
|
185
185
|
g(u);
|
|
186
186
|
return;
|
|
187
187
|
}
|
|
188
188
|
var n = function U() {
|
|
189
|
-
H = !1, e.zoomed.removeEventListener("transitionend", U), e.original.dispatchEvent(
|
|
189
|
+
H = !1, e.zoomed.removeEventListener("transitionend", U), e.original.dispatchEvent(A("medium-zoom:opened", {
|
|
190
190
|
detail: { zoom: u }
|
|
191
191
|
})), g(u);
|
|
192
192
|
};
|
|
@@ -203,20 +203,20 @@ See: https://github.com/francoischalifour/medium-zoom`);
|
|
|
203
203
|
g(u);
|
|
204
204
|
return;
|
|
205
205
|
}
|
|
206
|
-
if (e.original.dispatchEvent(
|
|
206
|
+
if (e.original.dispatchEvent(A("medium-zoom:open", {
|
|
207
207
|
detail: { zoom: u }
|
|
208
|
-
})), J = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0, H = !0, e.zoomed =
|
|
209
|
-
var
|
|
210
|
-
e.template = document.createElement("div"), e.template.appendChild(
|
|
208
|
+
})), J = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0, H = !0, e.zoomed = We(e.original), document.body.appendChild(M), d.template) {
|
|
209
|
+
var z = F(d.template) ? d.template : document.querySelector(d.template);
|
|
210
|
+
e.template = document.createElement("div"), e.template.appendChild(z.content.cloneNode(!0)), document.body.appendChild(e.template);
|
|
211
211
|
}
|
|
212
212
|
if (e.original.parentElement && e.original.parentElement.tagName === "PICTURE" && e.original.currentSrc && (e.zoomed.src = e.original.currentSrc), document.body.appendChild(e.zoomed), window.requestAnimationFrame(function() {
|
|
213
213
|
document.body.classList.add("medium-zoom--opened");
|
|
214
214
|
}), e.original.classList.add("medium-zoom-image--hidden"), e.zoomed.classList.add("medium-zoom-image--opened"), e.zoomed.addEventListener("click", x), e.zoomed.addEventListener("transitionend", n), e.original.getAttribute("data-zoom-src")) {
|
|
215
215
|
e.zoomedHd = e.zoomed.cloneNode(), e.zoomedHd.removeAttribute("srcset"), e.zoomedHd.removeAttribute("sizes"), e.zoomedHd.removeAttribute("loading"), e.zoomedHd.src = e.zoomed.getAttribute("data-zoom-src"), e.zoomedHd.onerror = function() {
|
|
216
|
-
clearInterval(
|
|
216
|
+
clearInterval(R), console.warn("Unable to reach the zoom image target " + e.zoomedHd.src), e.zoomedHd = null, m();
|
|
217
217
|
};
|
|
218
|
-
var
|
|
219
|
-
e.zoomedHd.complete && (clearInterval(
|
|
218
|
+
var R = setInterval(function() {
|
|
219
|
+
e.zoomedHd.complete && (clearInterval(R), e.zoomedHd.classList.add("medium-zoom-image--opened"), e.zoomedHd.addEventListener("click", x), document.body.appendChild(e.zoomedHd), m());
|
|
220
220
|
}, 10);
|
|
221
221
|
} else if (e.original.hasAttribute("srcset")) {
|
|
222
222
|
e.zoomedHd = e.zoomed.cloneNode(), e.zoomedHd.removeAttribute("sizes"), e.zoomedHd.removeAttribute("loading");
|
|
@@ -227,30 +227,30 @@ See: https://github.com/francoischalifour/medium-zoom`);
|
|
|
227
227
|
m();
|
|
228
228
|
});
|
|
229
229
|
}, x = function() {
|
|
230
|
-
return new
|
|
230
|
+
return new s(function(r) {
|
|
231
231
|
if (H || !e.original) {
|
|
232
|
-
|
|
232
|
+
r(u);
|
|
233
233
|
return;
|
|
234
234
|
}
|
|
235
235
|
var a = function m() {
|
|
236
|
-
e.original.classList.remove("medium-zoom-image--hidden"), document.body.removeChild(e.zoomed), e.zoomedHd && document.body.removeChild(e.zoomedHd), document.body.removeChild(M), e.zoomed.classList.remove("medium-zoom-image--opened"), e.template && document.body.removeChild(e.template), H = !1, e.zoomed.removeEventListener("transitionend", m), e.original.dispatchEvent(
|
|
236
|
+
e.original.classList.remove("medium-zoom-image--hidden"), document.body.removeChild(e.zoomed), e.zoomedHd && document.body.removeChild(e.zoomedHd), document.body.removeChild(M), e.zoomed.classList.remove("medium-zoom-image--opened"), e.template && document.body.removeChild(e.template), H = !1, e.zoomed.removeEventListener("transitionend", m), e.original.dispatchEvent(A("medium-zoom:closed", {
|
|
237
237
|
detail: { zoom: u }
|
|
238
|
-
})), e.original = null, e.zoomed = null, e.zoomedHd = null, e.template = null,
|
|
238
|
+
})), e.original = null, e.zoomed = null, e.zoomedHd = null, e.template = null, r(u);
|
|
239
239
|
};
|
|
240
|
-
H = !0, document.body.classList.remove("medium-zoom--opened"), e.zoomed.style.transform = "", e.zoomedHd && (e.zoomedHd.style.transform = ""), e.template && (e.template.style.transition = "opacity 150ms", e.template.style.opacity = 0), e.original.dispatchEvent(
|
|
240
|
+
H = !0, document.body.classList.remove("medium-zoom--opened"), e.zoomed.style.transform = "", e.zoomedHd && (e.zoomedHd.style.transform = ""), e.template && (e.template.style.transition = "opacity 150ms", e.template.style.opacity = 0), e.original.dispatchEvent(A("medium-zoom:close", {
|
|
241
241
|
detail: { zoom: u }
|
|
242
242
|
})), e.zoomed.addEventListener("transitionend", a);
|
|
243
243
|
});
|
|
244
244
|
}, G = function() {
|
|
245
|
-
var
|
|
245
|
+
var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, a = r.target;
|
|
246
246
|
return e.original ? x() : X({ target: a });
|
|
247
|
-
}, se = function() {
|
|
248
|
-
return d;
|
|
249
247
|
}, le = function() {
|
|
250
|
-
return
|
|
248
|
+
return d;
|
|
251
249
|
}, he = function() {
|
|
250
|
+
return v;
|
|
251
|
+
}, de = function() {
|
|
252
252
|
return e.original;
|
|
253
|
-
}, v = [], I = [], H = !1, J = 0, d =
|
|
253
|
+
}, v = [], I = [], H = !1, J = 0, d = o, e = {
|
|
254
254
|
original: null,
|
|
255
255
|
zoomed: null,
|
|
256
256
|
zoomedHd: null,
|
|
@@ -264,35 +264,35 @@ See: https://github.com/francoischalifour/medium-zoom`);
|
|
|
264
264
|
container: null,
|
|
265
265
|
template: null
|
|
266
266
|
}, d);
|
|
267
|
-
var M =
|
|
267
|
+
var M = Fe(d.background);
|
|
268
268
|
document.addEventListener("click", c), document.addEventListener("keyup", k), document.addEventListener("scroll", E), window.addEventListener("resize", x);
|
|
269
269
|
var u = {
|
|
270
270
|
open: X,
|
|
271
271
|
close: x,
|
|
272
272
|
toggle: G,
|
|
273
|
-
update:
|
|
273
|
+
update: b,
|
|
274
274
|
clone: W,
|
|
275
275
|
attach: _,
|
|
276
|
-
detach:
|
|
277
|
-
on:
|
|
278
|
-
off:
|
|
279
|
-
getOptions:
|
|
280
|
-
getImages:
|
|
281
|
-
getZoomedImage:
|
|
276
|
+
detach: ae,
|
|
277
|
+
on: ne,
|
|
278
|
+
off: se,
|
|
279
|
+
getOptions: le,
|
|
280
|
+
getImages: he,
|
|
281
|
+
getZoomedImage: de
|
|
282
282
|
};
|
|
283
283
|
return u;
|
|
284
284
|
};
|
|
285
|
-
function
|
|
285
|
+
function Be(i, t) {
|
|
286
286
|
t === void 0 && (t = {});
|
|
287
|
-
var
|
|
287
|
+
var o = t.insertAt;
|
|
288
288
|
if (!(typeof document > "u")) {
|
|
289
|
-
var
|
|
290
|
-
c.type = "text/css",
|
|
289
|
+
var s = document.head || document.getElementsByTagName("head")[0], c = document.createElement("style");
|
|
290
|
+
c.type = "text/css", o === "top" && s.firstChild ? s.insertBefore(c, s.firstChild) : s.appendChild(c), c.styleSheet ? c.styleSheet.cssText = i : c.appendChild(document.createTextNode(i));
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
|
-
var
|
|
294
|
-
|
|
295
|
-
const
|
|
293
|
+
var De = ".medium-zoom-overlay{position:fixed;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .3s;will-change:opacity}.medium-zoom--opened .medium-zoom-overlay{cursor:pointer;cursor:zoom-out;opacity:1}.medium-zoom-image{cursor:pointer;cursor:zoom-in;transition:transform .3s cubic-bezier(.2,0,.2,1)!important}.medium-zoom-image--hidden{visibility:hidden}.medium-zoom-image--opened{position:relative;cursor:pointer;cursor:zoom-out;will-change:transform}";
|
|
294
|
+
Be(De);
|
|
295
|
+
const qe = re`:host([effect=jump]) .container,:host([effect=text-reveal]) .container,:host([effect=zoom]) .container{overflow:initial}:host([effect=jump]) .highlighter{transition:all var(--transition-duration,.5s) var(--easing,linear), transform var(--transition-transform-duration,.5s) var(--easing,linear)}:host([effect=jump]) .highlighter:hover{transform:translateY(calc(var(--highlightable-item-effect-jump-distance,0) * -1))}.highlighter--effect-text-reveal,:host([effect=zoom]) .highlighter--zoom-style-within-borders{overflow:hidden}:host([effect=zoom][zoom-style=pop-out]) .highlighter:hover{z-index:3;animation:none}:host([effect=zoom][zoom-style=pop-out]) .highlighter:not(:hover){animation:drop-z var(--transition-transform-duration) forwards}@keyframes drop-z{0%{z-index:2}99%{z-index:2}to{z-index:0}}.highlighter--can-hover:hover:after,.highlighter--selected:after,.highlighter--color-overlay:after{content:"";pointer-events:none;width:100%;height:100%;transition:all var(--transition-duration,.5s) var(--easing,linear);position:absolute;top:0;left:0}.highlighter--can-hover:hover:after,.highlighter--selected:after{outline:2px solid var(--cx-color-primary)}.highlighter--border:hover .image{border-color:var(--highlightable-item-highlight-border-color,var(--cx-color-primary))}.highlighter--color-overlay:after{border-radius:var(--border-radius,none)}.highlighter--color-overlay:hover:after{background-color:var(--highlightable-item-highlight-color-overlay-color,transparent)}.highlighter--drop-shadow:hover .image{box-shadow:var(--highlightable-item-highlight-drop-shadow,none)}.highlighter--background:hover .highlightable-item{--content-background-color:var(--highlightable-item-highlight-background,transparent);--highlightable-item-background-color:var(--highlightable-item-highlight-background,transparent)}.highlighter--opacity{opacity:var(--highlightable-item-highlight-opacity,1)}:host([effect=zoom][zoom-style=within-borders]) .highlighter .image,:host([effect=zoom][zoom-style=pop-out]) .highlighter{transition:transform var(--transition-transform-duration,.5s) var(--easing,linear)}:host([effect=zoom][zoom-style=within-borders]) .highlighter:hover .image,:host([effect=zoom][zoom-style=pop-out]) .highlighter:hover{transform:scale(var(--highlightable-item-effect-zoom-scale,1))}.highlightable-item{transition:background-color var(--transition-duration,.5s) var(--easing,linear), border-color var(--transition-duration,.5s) var(--easing,linear), box-shadow var(--transition-duration,.5s) var(--easing,linear), opacity var(--transition-duration,.5s) var(--easing,linear), transform var(--transition-transform-duration,.5s) var(--easing,linear), visibility var(--transition-duration,.5s) var(--easing,linear)}`, Ye = re`
|
|
296
296
|
:host {
|
|
297
297
|
--justify-content: flex-start;
|
|
298
298
|
--border-radius: 0px;
|
|
@@ -345,7 +345,7 @@ const Be = oe`:host([effect=jump]) .container,:host([effect=text-reveal]) .conta
|
|
|
345
345
|
max-height: 100%;
|
|
346
346
|
}
|
|
347
347
|
|
|
348
|
-
${
|
|
348
|
+
${qe}
|
|
349
349
|
|
|
350
350
|
:host([block]) {
|
|
351
351
|
width: 100%;
|
|
@@ -538,14 +538,14 @@ const Be = oe`:host([effect=jump]) .container,:host([effect=text-reveal]) .conta
|
|
|
538
538
|
--font-size: var(--cx-font-size-4x-large);
|
|
539
539
|
}
|
|
540
540
|
`;
|
|
541
|
-
var
|
|
542
|
-
for (var c =
|
|
543
|
-
(k = i[E]) && (c = (
|
|
544
|
-
return
|
|
541
|
+
var Ve = Object.defineProperty, Ke = Object.getOwnPropertyDescriptor, h = (i, t, o, s) => {
|
|
542
|
+
for (var c = s > 1 ? void 0 : s ? Ke(t, o) : t, E = i.length - 1, k; E >= 0; E--)
|
|
543
|
+
(k = i[E]) && (c = (s ? k(t, o, c) : k(c)) || c);
|
|
544
|
+
return s && c && Ve(t, o, c), c;
|
|
545
545
|
};
|
|
546
|
-
let
|
|
546
|
+
let l = class extends Ee {
|
|
547
547
|
constructor() {
|
|
548
|
-
super(...arguments), this.localize = new
|
|
548
|
+
super(...arguments), this.localize = new He(this), this._retryCount = 0, this._retryTimer = null, this.isLoaded = !1, this.isError = !1, this._retryIndex = 0, this.src = "", this.placeholder = "", this.alt = "", this.objectFit = Le.Fill, this.skeleton = !1, this.fallback = !1, this.canZoom = !1, this.loading = !1, this.block = !1, this.htmlLoading = "lazy", this.clickHandlerType = j.Automatic, this.retryOnError = !1, this.maxRetries = 3, this.isZoomed = !1, this.imageRatio = 1, this.parsedAlt = "", this.parsedAltDarkMode = "", this.zoom = null, this.lastPatchedWidth = null;
|
|
549
549
|
}
|
|
550
550
|
get currentAltValue() {
|
|
551
551
|
return this.alt;
|
|
@@ -568,8 +568,8 @@ let s = class extends we {
|
|
|
568
568
|
}
|
|
569
569
|
get imageClass() {
|
|
570
570
|
let i = "landscape", t = this.ratio;
|
|
571
|
-
const
|
|
572
|
-
return
|
|
571
|
+
const o = this.width.endsWith("%") ? this.clientWidth : Number.parseFloat(this.width), s = this.isResizing ? this.resizeSize.width : o, c = this.isResizing ? this.resizeSize.height : Number.parseFloat(this.height);
|
|
572
|
+
return s && c && (t = s / c), t > this.imageRatio && (i = "portrait"), {
|
|
573
573
|
image: !0,
|
|
574
574
|
[`image--${this.objectFit}`]: !0,
|
|
575
575
|
[`image--${i}`]: !0,
|
|
@@ -637,7 +637,7 @@ let s = class extends we {
|
|
|
637
637
|
}, i);
|
|
638
638
|
}
|
|
639
639
|
async initZoom() {
|
|
640
|
-
this.zoomImageElement && !this.zoom && this.isLoaded && (this.zoom =
|
|
640
|
+
this.zoomImageElement && !this.zoom && this.isLoaded && (this.zoom = Ue(this.zoomImageElement, {
|
|
641
641
|
background: "light-dark(rgba(255, 255, 255, 0.8), rgba(0, 0, 0, 0.8))",
|
|
642
642
|
margin: 0,
|
|
643
643
|
scrollOffset: 0
|
|
@@ -651,8 +651,8 @@ let s = class extends we {
|
|
|
651
651
|
const t = i?.currentTarget ?? this.imageElement;
|
|
652
652
|
if (!t)
|
|
653
653
|
return;
|
|
654
|
-
const { naturalHeight:
|
|
655
|
-
this.imageRatio =
|
|
654
|
+
const { naturalHeight: o, naturalWidth: s } = t;
|
|
655
|
+
this.imageRatio = s / o, this.isLoaded || (this.emit("cx-load"), this.isLoaded = !0, this.isError = !1);
|
|
656
656
|
}
|
|
657
657
|
handleError() {
|
|
658
658
|
if (this.retryOnError && this._retryCount < this.maxRetries) {
|
|
@@ -662,13 +662,13 @@ let s = class extends we {
|
|
|
662
662
|
this.emit("cx-error"), this.isLoaded = !0, this.isError = !0;
|
|
663
663
|
}
|
|
664
664
|
handleSizeChange() {
|
|
665
|
-
const i = this.isResizing ? `${this.resizeSize.width}px` : this.width,
|
|
666
|
-
this.width || this.isResizing ? this.style.setProperty("--width",
|
|
665
|
+
const i = this.resizeDirection !== ee.Vertical, t = this.resizeDirection !== ee.Horizontal, o = this.isResizing ? `${this.resizeSize.width}px` : this.width, s = this.isResizing ? `${this.resizeSize.height}px` : this.height;
|
|
666
|
+
i && (this.width || this.isResizing ? this.style.setProperty("--width", o) : this.style.removeProperty("--width")), t && (this.heightMode !== ke.Auto && (this.height || this.isResizing) ? this.style.setProperty("--height", s) : this.style.removeProperty("--height"));
|
|
667
667
|
}
|
|
668
668
|
handleResize(i) {
|
|
669
669
|
const { entries: t } = i.detail;
|
|
670
|
-
for (const
|
|
671
|
-
|
|
670
|
+
for (const o of t)
|
|
671
|
+
o.target === this.highlighterElement && this.width.endsWith("%") && !this.isResizing && Math.abs(o.contentRect.width - (this.lastPatchedWidth ?? 0)) > 1 && this.updateLastPatchedWidth(o.contentRect.width);
|
|
672
672
|
}
|
|
673
673
|
updateLastPatchedWidth(i) {
|
|
674
674
|
this.lastPatchedWidth = i, this.requestUpdate();
|
|
@@ -680,145 +680,145 @@ let s = class extends we {
|
|
|
680
680
|
!(i.target instanceof HTMLElement) || this.clickHandlerType === j.Manual || this.canZoom && this.openZoom();
|
|
681
681
|
}
|
|
682
682
|
updated(i) {
|
|
683
|
-
super.updated(i), (i.has("width") || i.has("height") || i.has("resizeSize")) && this.handleSizeChange();
|
|
683
|
+
super.updated(i), (i.has("width") || i.has("height") || i.has("heightMode") || i.has("resizeSize")) && this.handleSizeChange();
|
|
684
684
|
}
|
|
685
685
|
openZoom() {
|
|
686
686
|
this.zoom && this.zoom.open();
|
|
687
687
|
}
|
|
688
688
|
renderContent() {
|
|
689
689
|
const i = this.currentSrc, t = this.currentAltValue;
|
|
690
|
-
return C`<div part="content" slot="anchor" class=${L(this.highlighterClass)}>${
|
|
690
|
+
return C`<div part="content" slot="anchor" class=${L(this.highlighterClass)}>${Ne(
|
|
691
691
|
this._retryIndex,
|
|
692
|
-
C`<img part="image" class=${L(this.imageClass)} src=${i || this.placeholder} alt=${t} aria-label=${t} crossorigin=${
|
|
692
|
+
C`<img part="image" class=${L(this.imageClass)} src=${i || this.placeholder} alt=${t} aria-label=${t} crossorigin=${V(this.crossorigin)} @load=${this.handleLoad} @error=${this.handleError} loading=${this.htmlLoading}>`
|
|
693
693
|
)}</div>`;
|
|
694
694
|
}
|
|
695
695
|
render() {
|
|
696
|
-
const i = this.hasZoomAction, t = this.currentAltValue,
|
|
696
|
+
const i = this.hasZoomAction, t = this.currentAltValue, o = !this.currentSrc && !this.placeholder;
|
|
697
697
|
return C`<div part="base" class=${L({
|
|
698
698
|
container: !0,
|
|
699
|
-
"container--empty":
|
|
699
|
+
"container--empty": o,
|
|
700
700
|
"container--loading": this.loading,
|
|
701
701
|
"container--resizing": this.resizable && this.isResizeActive
|
|
702
|
-
})} style=${
|
|
702
|
+
})} style=${Oe({
|
|
703
703
|
"--easing": this.easeCSSVariable
|
|
704
|
-
})} data-empty-label=${this.localize.term("emptyImage")} @click=${this.startResizing} @keydown=${this.handleKeyDown}><cx-resize-observer @cx-resize=${this.handleResize}><div part="highlighter" tabindex=${
|
|
705
|
-
|
|
706
|
-
() =>
|
|
707
|
-
() =>
|
|
704
|
+
})} data-empty-label=${this.localize.term("emptyImage")} @click=${this.startResizing} @keydown=${this.handleKeyDown}><cx-resize-observer @cx-resize=${this.handleResize}><div part="highlighter" tabindex=${V(this.highlighterTabindex)} role=${this.highlighterRole} aria-label=${t} aria-roledescription=${this.localize.term("image")} class=${L(o ? {} : this.getHighlighterClass())} @click=${this.handleClickAction} @mouseenter=${this.handleMouseEnter} @mouseleave=${this.handleMouseLeave} @blur=${this.handleBlur}>${T(
|
|
705
|
+
o,
|
|
706
|
+
() => oe,
|
|
707
|
+
() => T(
|
|
708
708
|
this.effect === Y.Jump || this.effect === Y.Zoom,
|
|
709
709
|
() => C`<cx-popup class="popup-container" strategy="absolute" active placement="center" sync="both">${this.renderContent()}</cx-popup>`,
|
|
710
710
|
() => this.renderContent()
|
|
711
711
|
)
|
|
712
|
-
)}<div class="zoom-image-container">${
|
|
712
|
+
)}<div class="zoom-image-container">${T(
|
|
713
713
|
i,
|
|
714
714
|
() => C`<img part="zoom-image" class=${L({
|
|
715
715
|
"zoom-image": !0,
|
|
716
716
|
"zoom-image--hidden": !this.isZoomed
|
|
717
|
-
})} src=${this.currentSrc || this.placeholder} alt="" aria-hidden="true" decoding="async" draggable="false" crossorigin=${
|
|
718
|
-
)}</div>${
|
|
717
|
+
})} src=${this.currentSrc || this.placeholder} alt="" aria-hidden="true" decoding="async" draggable="false" crossorigin=${V(this.crossorigin)}>`
|
|
718
|
+
)}</div>${T(
|
|
719
719
|
this.skeleton && !this.isLoaded && !this.isError || this.loading,
|
|
720
720
|
() => C`<slot name="skeleton" part="skeleton"><div class=${L({
|
|
721
721
|
skeleton: !0
|
|
722
722
|
})}><cx-skeleton effect="sheen"></cx-skeleton></div></slot>`
|
|
723
723
|
)}
|
|
724
|
-
${
|
|
724
|
+
${T(this.isError && this.fallback, () => C`<slot name="fallback" part="fallback"><cx-space class=${L({ fallback: !0 })} direction="column" align-items="center" justify-content="center"><cx-icon name="hide_image" part="fallback-icon"> </cx-icon></cx-space></slot>`)}</div></cx-resize-observer>${T(this.resizable && this.isResizeActive, () => this.renderResizer())}</div>`;
|
|
725
725
|
}
|
|
726
726
|
};
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
"cx-icon":
|
|
730
|
-
"cx-popup":
|
|
731
|
-
"cx-resize-observer":
|
|
732
|
-
"cx-skeleton":
|
|
733
|
-
"cx-space":
|
|
727
|
+
l.styles = [Ce, we, Ye];
|
|
728
|
+
l.dependencies = {
|
|
729
|
+
"cx-icon": je,
|
|
730
|
+
"cx-popup": Ze,
|
|
731
|
+
"cx-resize-observer": _e,
|
|
732
|
+
"cx-skeleton": Ie,
|
|
733
|
+
"cx-space": Me
|
|
734
734
|
};
|
|
735
735
|
h([
|
|
736
|
-
|
|
737
|
-
],
|
|
736
|
+
K(".image")
|
|
737
|
+
], l.prototype, "imageElement", 2);
|
|
738
738
|
h([
|
|
739
|
-
|
|
740
|
-
],
|
|
739
|
+
K(".zoom-image")
|
|
740
|
+
], l.prototype, "zoomImageElement", 2);
|
|
741
741
|
h([
|
|
742
|
-
|
|
743
|
-
],
|
|
742
|
+
K(".highlighter")
|
|
743
|
+
], l.prototype, "highlighterElement", 2);
|
|
744
744
|
h([
|
|
745
745
|
$()
|
|
746
|
-
],
|
|
746
|
+
], l.prototype, "isLoaded", 2);
|
|
747
747
|
h([
|
|
748
748
|
$()
|
|
749
|
-
],
|
|
749
|
+
], l.prototype, "isError", 2);
|
|
750
750
|
h([
|
|
751
751
|
$()
|
|
752
|
-
],
|
|
752
|
+
], l.prototype, "_retryIndex", 2);
|
|
753
753
|
h([
|
|
754
754
|
y({ reflect: !0, type: String })
|
|
755
|
-
],
|
|
755
|
+
], l.prototype, "src", 2);
|
|
756
756
|
h([
|
|
757
757
|
y({ reflect: !0, type: String })
|
|
758
|
-
],
|
|
758
|
+
], l.prototype, "placeholder", 2);
|
|
759
759
|
h([
|
|
760
760
|
y({ reflect: !0, type: String })
|
|
761
|
-
],
|
|
761
|
+
], l.prototype, "alt", 2);
|
|
762
762
|
h([
|
|
763
763
|
y({ attribute: "object-fit", reflect: !0 })
|
|
764
|
-
],
|
|
764
|
+
], l.prototype, "objectFit", 2);
|
|
765
765
|
h([
|
|
766
766
|
y({ reflect: !0, type: Boolean })
|
|
767
|
-
],
|
|
767
|
+
], l.prototype, "skeleton", 2);
|
|
768
768
|
h([
|
|
769
769
|
y({ reflect: !0, type: Boolean })
|
|
770
|
-
],
|
|
770
|
+
], l.prototype, "fallback", 2);
|
|
771
771
|
h([
|
|
772
772
|
y({ attribute: "can-zoom", reflect: !0, type: Boolean })
|
|
773
|
-
],
|
|
773
|
+
], l.prototype, "canZoom", 2);
|
|
774
774
|
h([
|
|
775
775
|
y({ reflect: !0, type: Boolean })
|
|
776
|
-
],
|
|
776
|
+
], l.prototype, "loading", 2);
|
|
777
777
|
h([
|
|
778
778
|
y({ reflect: !0, type: Boolean })
|
|
779
|
-
],
|
|
779
|
+
], l.prototype, "block", 2);
|
|
780
780
|
h([
|
|
781
781
|
y({ attribute: "html-loading", reflect: !0, type: String })
|
|
782
|
-
],
|
|
782
|
+
], l.prototype, "htmlLoading", 2);
|
|
783
783
|
h([
|
|
784
784
|
y({ attribute: "click-handler-type", reflect: !0, type: String })
|
|
785
|
-
],
|
|
785
|
+
], l.prototype, "clickHandlerType", 2);
|
|
786
786
|
h([
|
|
787
787
|
y({ attribute: "retry-on-error", type: Boolean })
|
|
788
|
-
],
|
|
788
|
+
], l.prototype, "retryOnError", 2);
|
|
789
789
|
h([
|
|
790
790
|
y({ attribute: "max-retries", type: Number })
|
|
791
|
-
],
|
|
791
|
+
], l.prototype, "maxRetries", 2);
|
|
792
792
|
h([
|
|
793
793
|
$()
|
|
794
|
-
],
|
|
794
|
+
], l.prototype, "isZoomed", 2);
|
|
795
795
|
h([
|
|
796
796
|
$()
|
|
797
|
-
],
|
|
797
|
+
], l.prototype, "imageRatio", 2);
|
|
798
798
|
h([
|
|
799
799
|
$()
|
|
800
|
-
],
|
|
800
|
+
], l.prototype, "parsedAlt", 2);
|
|
801
801
|
h([
|
|
802
802
|
$()
|
|
803
|
-
],
|
|
803
|
+
], l.prototype, "parsedAltDarkMode", 2);
|
|
804
804
|
h([
|
|
805
805
|
Z("isLoaded"),
|
|
806
806
|
Z("canZoom", { waitUntilFirstUpdate: !0 })
|
|
807
|
-
],
|
|
807
|
+
], l.prototype, "handleCanZoomChange", 1);
|
|
808
808
|
h([
|
|
809
809
|
Z("objectFit", { waitUntilFirstUpdate: !0 })
|
|
810
|
-
],
|
|
810
|
+
], l.prototype, "handleObjectFitChange", 1);
|
|
811
811
|
h([
|
|
812
812
|
Z("src"),
|
|
813
813
|
Z("srcDarkMode")
|
|
814
|
-
],
|
|
814
|
+
], l.prototype, "handleSrcChange", 1);
|
|
815
815
|
h([
|
|
816
|
-
|
|
817
|
-
],
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
],
|
|
816
|
+
$e(100)
|
|
817
|
+
], l.prototype, "updateLastPatchedWidth", 1);
|
|
818
|
+
l = h([
|
|
819
|
+
Se("cx-image")
|
|
820
|
+
], l);
|
|
821
821
|
export {
|
|
822
|
-
|
|
822
|
+
l as C,
|
|
823
823
|
j as a
|
|
824
824
|
};
|