@orangelogic/design-system 2.134.0 → 2.136.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/chunks/asset-link-format.BBWyY5fn.js +2627 -0
- package/library/chunks/{button.DYoFn504.js → button.3giRMk79.js} +2 -2
- package/library/chunks/{checkbox.BzbWmmJ0.js → checkbox.B-2O517F.js} +2 -2
- package/library/chunks/{table.DWcxLbq6.js → color-swatch-group.DC6vIYo4.js} +3133 -2887
- package/library/chunks/{color-swatch.0zyBEfL_.js → color-swatch.g3FPUnxM.js} +2 -2
- package/library/chunks/{confirm-popover.DpVYvK20.js → confirm-popover.DtndPsMa.js} +3 -3
- package/library/chunks/{dialog.BwBD_hJi.js → dialog.BQq3xBeH.js} +2 -2
- package/library/chunks/directive-helpers.DEDMV45_.js +42 -0
- package/library/chunks/{document-viewer.BM716ovi.js → document-viewer.BQPJD2lJ.js} +8 -8
- package/library/chunks/{dom.BXeuEG1b.js → dom.acWb8KCK.js} +1 -1
- package/library/chunks/{dot-pagination.B70lV5Av.js → dot-pagination.DBk9Rz1e.js} +1 -1
- package/library/chunks/{endpoints.6E17hFiK.js → endpoints.tU0_RZ_7.js} +4 -4
- package/library/chunks/{file-on-demand.CsT96fvk.js → file-on-demand.Bnloo9Ui.js} +12 -12
- package/library/chunks/folder-select.DuG4dSPm.js +942 -0
- package/library/chunks/{form.3af0bYrm.js → form.K1XOtu3S.js} +1 -1
- package/library/chunks/{header.BMGvKrdP.js → header.Bpjw08j7.js} +1 -1
- package/library/chunks/{i18n.DoMIwXr2.js → i18n.DJikbkDK.js} +48 -12
- package/library/chunks/{icon-button.B-Jf9W3v.js → icon-button.xobY-9OH.js} +1 -1
- package/library/chunks/{iframe.Cdv6esyS.js → iframe.BkvxcywO.js} +1 -1
- package/library/chunks/{image.SLqIVjqc.js → image.KZRXIthe.js} +241 -229
- package/library/chunks/{input.CQNhMu4z.js → input.GUw7x9tK.js} +3 -3
- package/library/chunks/{keyed.C0rkKrxH.js → keyed.DdOUTIg-.js} +1 -1
- package/library/chunks/{live.SCz6M8Gs.js → live.DCegntDo.js} +1 -1
- package/library/chunks/{option.SCVixE2L.js → option.uHye0aDT.js} +1 -1
- package/library/chunks/{pagination.BFE6Nk3_.js → pagination.D8Hzwlan.js} +6 -6
- package/library/chunks/{ref.bzeTdX0K.js → ref.DktKp7fP.js} +1 -1
- package/library/chunks/{repeat.DbF2p5ae.js → repeat.CFjcER6_.js} +1 -1
- package/library/chunks/{resizable-component.styles.BVhOesNE.js → resizable-component.styles.CAfXABBc.js} +5 -5
- package/library/chunks/{string.CbnVBzsd.js → string.CjJ09HK3.js} +14 -11
- package/library/chunks/{tab-group.C-p2Dljr.js → tab-group.0_aOE22R.js} +5 -5
- package/library/chunks/toast.Bz-j7zP2.js +109 -0
- package/library/chunks/{tree.C2mLhREj.js → tree.C14rLLol.js} +3 -3
- package/library/chunks/url.-WDYqplj.js +42 -0
- package/library/components/alert.js +2 -2
- package/library/components/asset-link-format.js +16 -2163
- package/library/components/atoms.js +49 -51
- package/library/components/audio.js +3 -3
- package/library/components/border-input-group.js +2 -2
- package/library/components/breadcrumb.js +1 -1
- package/library/components/button.js +3 -3
- package/library/components/checkbox.js +3 -3
- package/library/components/color-picker.js +4 -4
- package/library/components/color-swatch-group.js +6 -7
- package/library/components/color-swatch.js +3 -3
- package/library/components/confirm-popover.js +4 -4
- package/library/components/copy-button.js +1 -1
- package/library/components/corner-position-input-group.js +3 -3
- package/library/components/date-calendar.js +2 -2
- package/library/components/details.js +1 -1
- package/library/components/dialog.js +3 -3
- package/library/components/diff.js +1 -1
- package/library/components/document-viewer.js +4 -4
- package/library/components/dot-pagination.js +2 -2
- package/library/components/drawer.js +2 -2
- package/library/components/dropdown.js +2 -2
- package/library/components/dynamic-select.js +88 -85
- package/library/components/e-chart.js +1 -1
- package/library/components/element-clamp.js +2 -2
- package/library/components/file-on-demand.js +13 -13
- package/library/components/folder-select.js +5 -5
- 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 +6 -5
- package/library/components/input.js +4 -4
- package/library/components/line-clamp.js +1 -1
- package/library/components/masonry.js +3 -3
- package/library/components/menu-item.js +2 -2
- package/library/components/menu.js +1 -1
- package/library/components/molecules.js +27 -29
- package/library/components/option.js +2 -2
- package/library/components/organisms.js +6 -6
- package/library/components/padding-input-group.js +2 -2
- package/library/components/pagination.js +7 -7
- 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/radio-group.js +1 -1
- package/library/components/range.js +5 -5
- package/library/components/rating.js +2 -2
- package/library/components/relative-time.js +1 -1
- package/library/components/select.js +10 -7
- package/library/components/shadow-input-group.js +2 -2
- package/library/components/share-option-list.js +3 -3
- package/library/components/sidebar.js +1 -1
- package/library/components/size-input-group.js +3 -3
- package/library/components/spinner.js +1 -1
- package/library/components/split-panel.js +1 -1
- package/library/components/stepper-wizard.js +1 -1
- package/library/components/switch.js +2 -2
- package/library/components/tab-group.js +5 -5
- package/library/components/tab.js +2 -2
- package/library/components/tag.js +2 -2
- package/library/components/textarea.js +2 -2
- package/library/components/timecode.js +1 -1
- package/library/components/tooltip.js +1 -1
- package/library/components/tree-item.js +4 -4
- package/library/components/tree.js +2 -2
- package/library/components/typeface.js +2 -2
- package/library/components/types.js +46083 -43779
- package/library/components/video.js +3 -3
- package/library/package.json +3 -1
- package/library/packages/atoms/src/components/image/image.d.ts +3 -0
- package/library/packages/atoms/src/components/select/select.d.ts +6 -0
- package/library/packages/atoms/src/components/tab-group/tab-group.d.ts +1 -0
- package/library/packages/atoms/src/index.d.ts +0 -1
- package/library/packages/events/src/cx-folder-select-selection-seeded.d.ts +6 -0
- package/library/packages/events/src/cx-image-src-resolved.d.ts +9 -0
- package/library/packages/events/src/cx-pdf-viewer-annotation-draw-mode-change.d.ts +10 -0
- package/library/packages/events/src/cx-pdf-viewer-annotation-draw-params-change.d.ts +11 -0
- package/library/packages/events/src/cx-pdf-viewer-more-options-select.d.ts +8 -0
- package/library/packages/events/src/cx-pdf-viewer-toolbar-annotation-mode-change.d.ts +10 -0
- package/library/packages/events/src/cx-pdf-viewer-toolbar-annotation-params-change.d.ts +11 -0
- package/library/packages/events/src/cx-pdf-viewer-toolbar-click.d.ts +8 -0
- package/library/packages/events/src/cx-pdf-viewer-toolbar-page-change.d.ts +8 -0
- package/library/packages/events/src/cx-pdf-viewer-toolbar-scale-change.d.ts +8 -0
- package/library/packages/events/src/cx-pdf-viewer-toolbar-view-toggle.d.ts +11 -0
- package/library/packages/events/src/cx-pdf-viewer-view-on-asset-toggle.d.ts +11 -0
- package/library/packages/events/src/cx-video-src-resolved.d.ts +8 -0
- package/library/packages/events/src/events.d.ts +13 -0
- package/library/packages/hybrid/table-core/src/index.d.ts +3 -0
- package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/table-row-actions/table-row-actions-dropdown.d.ts +8 -8
- package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/table-row-actions/table-row-actions.d.ts +6 -5
- package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/table-toolbar/table-dropdown-filter.d.ts +4 -4
- package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/table-toolbar/table-group-by-dropdown.d.ts +4 -4
- package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/table-toolbar/table-saved-search-dropdown.d.ts +6 -5
- package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/table-toolbar/table-toolbar.d.ts +12 -12
- package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/table.d.ts +11 -11
- package/library/packages/hybrid/table-core/src/tabulator-tables/modules/Clipboard/Clipboard.d.ts +1 -1
- package/library/packages/hybrid/table-core/src/tabulator-tables/modules/Clipboard/extensions/extensions.d.ts +1 -1
- package/library/packages/hybrid/table-core/src/tabulator-tables/modules/History/History.d.ts +1 -1
- package/library/packages/hybrid/table-core/src/tabulator-tables/modules/History/extensions/extensions.d.ts +1 -1
- package/library/packages/hybrid/table-core/src/tabulator-tables/modules/HoverMenu/HoverMenu.d.ts +1 -1
- package/library/packages/hybrid/table-core/src/tabulator-tables/modules/Import/defaults/importers.d.ts +1 -1
- package/library/packages/hybrid/table-core/src/tabulator-tables/modules/SelectRange/SelectRange.d.ts +4 -4
- package/library/packages/hybrid/table-core/src/tabulator-tables/modules/SelectRange/extensions/extensions.d.ts +2 -2
- package/library/packages/molecules/src/asset-picker/asset-picker.d.ts +1 -1
- package/library/packages/molecules/src/dynamic-select/dynamic-select.d.ts +5 -0
- package/library/packages/molecules/src/folder-select/components/folder-select-tree-item/folder-select-tree-item.d.ts +32 -0
- package/library/packages/molecules/src/folder-select/folder-select.d.ts +20 -3
- package/library/packages/molecules/src/gallery-item/gallery-item.d.ts +5 -0
- package/library/packages/molecules/src/index.d.ts +1 -1
- package/library/packages/molecules/src/library-index.d.ts +0 -1
- package/library/packages/molecules/src/pdf-viewer-toolbar/components/index.d.ts +3 -0
- package/library/packages/molecules/src/pdf-viewer-toolbar/components/pdf-viewer-annotation-draw/pdf-viewer-annotation-draw.d.ts +92 -0
- package/library/packages/molecules/src/pdf-viewer-toolbar/components/pdf-viewer-more-options/pdf-viewer-more-options.d.ts +43 -0
- package/library/packages/molecules/src/pdf-viewer-toolbar/components/pdf-viewer-more-options/pdf-viewer-more-options.styles.d.ts +2 -0
- package/library/packages/molecules/src/pdf-viewer-toolbar/components/pdf-viewer-view-on-asset/pdf-viewer-view-on-asset.d.ts +42 -0
- package/library/packages/molecules/src/pdf-viewer-toolbar/components/pdf-viewer-view-on-asset/pdf-viewer-view-on-asset.styles.d.ts +2 -0
- package/library/packages/molecules/src/pdf-viewer-toolbar/pdf-viewer-toolbar.d.ts +101 -0
- package/library/packages/molecules/src/pdf-viewer-toolbar/pdf-viewer-toolbar.styles.d.ts +2 -0
- package/library/packages/organisms/src/bento-grid/bento-grid.d.ts +66 -0
- package/library/packages/organisms/src/color-swatch-group/color-swatch-group.constants.d.ts +1 -1
- package/library/packages/organisms/src/color-swatch-group/color-swatch-group.d.ts +1 -1
- package/library/packages/organisms/src/content-builder/components/color-swatch-picker/color-swatch-picker.constants.d.ts +1 -1
- package/library/packages/organisms/src/content-builder/components/color-swatch-picker/color-swatch-picker.d.ts +1 -1
- package/library/packages/organisms/src/content-builder/components/config-form/config-form-controller.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/components/config-form/config-form.d.ts +2 -9
- package/library/packages/organisms/src/content-builder/configs/dam-view.d.ts +1 -7
- package/library/packages/organisms/src/content-builder/configs-controller.d.ts +2 -14
- package/library/packages/organisms/src/content-builder/styleController.d.ts +1 -1
- package/library/packages/organisms/src/dam-custom-toolbar-buttons-editor/dam-custom-toolbar-buttons-editor.d.ts +9 -1
- package/library/packages/organisms/src/dashboard-table/dashboard-table.d.ts +1 -1
- package/library/packages/organisms/src/index.d.ts +1 -0
- package/library/packages/{molecules → organisms}/src/list-editor/list-editor.d.ts +9 -3
- package/library/packages/organisms/src/list-editor/list-editor.styles.d.ts +2 -0
- package/library/packages/organisms/src/video-chapters-manager/video-chapters-manager.d.ts +1 -1
- package/library/packages/services/src/api/folder/folder.types.d.ts +9 -2
- package/library/packages/tools/src/fetch-asset/fetch-asset.d.ts +16 -0
- package/library/packages/types/src/content-builder.d.ts +1 -1
- package/library/packages/types/src/dam-view.d.ts +1 -0
- package/library/packages/types/src/folder-select.d.ts +8 -1
- package/library/packages/types/src/pdf-viewer-toolbar.d.ts +82 -0
- package/library/packages/utils/src/custom-element/i18n.d.ts +43 -7
- package/library/packages/utils/src/string/string.d.ts +1 -1
- package/library/packages/utils/src/url/url.d.ts +12 -2
- package/library/react-web-component.d.ts +1829 -1679
- package/library/utils.js +200 -199
- package/package.json +3 -1
- package/library/chunks/asset.CcxcYY9d.js +0 -469
- package/library/chunks/color-swatch-group.Dx6-kWC-.js +0 -362
- package/library/chunks/directive-helpers.Dm4rc594.js +0 -37
- package/library/chunks/folder-select.DwZ7lczk.js +0 -884
- package/library/chunks/list-editor.BhMNYL8R.js +0 -1394
- package/library/chunks/responsive.Cf65FCWd.js +0 -17
- package/library/chunks/toast.D3AW3RWv.js +0 -94
- package/library/chunks/url.Cj9cIQXJ.js +0 -27
- package/library/components/list-editor.d.ts +0 -3
- package/library/components/list-editor.js +0 -33
- package/library/components/table.d.ts +0 -3
- package/library/components/table.js +0 -84
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/index.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/table-footer/table-footer.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/table-footer/table-footer.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/table-row-actions/table-row-actions.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/table-toolbar/table-toolbar.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/controllers/ajax-facets/ajax-facet-data-controller.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/controllers/ajax-facets/ajax-facet-filter-controller.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/controllers/filter-controller.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/controllers/select-all-controller.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-alert.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-base.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-calcs.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-clickable-cell.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-data-tree.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-edit.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-footer.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-format.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-group-rows.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-header.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-hover-menu.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-move-rows.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-page.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-placeholder.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-popup.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-print.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-resize.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-responsive-layout.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-rows.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-rtl.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-select-range.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-spreadsheet.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/table-data-loader.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/table.styles.d.ts +0 -0
- /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/table.utils.d.ts +0 -0
- /package/library/packages/molecules/src/{list-editor/list-editor.styles.d.ts → pdf-viewer-toolbar/components/pdf-viewer-annotation-draw/pdf-viewer-annotation-draw.styles.d.ts} +0 -0
|
@@ -1,146 +1,147 @@
|
|
|
1
|
-
import { r as
|
|
2
|
-
import { c as
|
|
3
|
-
import { a as
|
|
4
|
-
import { c as
|
|
5
|
-
import { d as
|
|
6
|
-
import { L as
|
|
7
|
-
import { w as
|
|
8
|
-
import {
|
|
1
|
+
import { r as Re, R as Se, H as V, a as ie, b as $e } from "./resizable-component.styles.CAfXABBc.js";
|
|
2
|
+
import { c as He } from "./component.styles.CRO4Odto.js";
|
|
3
|
+
import { a as Te } from "./index.Cpamj0jB.js";
|
|
4
|
+
import { c as Ae } from "./custom-element.L4WJXn1j.js";
|
|
5
|
+
import { d as Oe } from "./debounce.DaHuiSGU.js";
|
|
6
|
+
import { L as je } from "./i18n.DJikbkDK.js";
|
|
7
|
+
import { w as I } from "./watch.CThbualB.js";
|
|
8
|
+
import { a as Ze } from "./url.-WDYqplj.js";
|
|
9
|
+
import { i as se, E as K, x as E } from "./lit-element.jLBm65_O.js";
|
|
9
10
|
import { n as y } from "./lib-cortex-element.CVMmyPMC.js";
|
|
10
11
|
import { r as k } from "./state.CSDxrqLd.js";
|
|
11
|
-
import { e as
|
|
12
|
+
import { e as G } from "./query.BBf1UFkC.js";
|
|
12
13
|
import { e as C } from "./class-map.BiVq-cVR.js";
|
|
13
|
-
import { o as
|
|
14
|
-
import { i as
|
|
15
|
-
import { o as
|
|
14
|
+
import { o as X } from "./if-defined.BRoBj_Rp.js";
|
|
15
|
+
import { i as Ie } from "./keyed.DdOUTIg-.js";
|
|
16
|
+
import { o as Me } from "./style-map.llVFPd__.js";
|
|
16
17
|
import { n as S } from "./when.Dr1es41R.js";
|
|
17
|
-
import { C as
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
var
|
|
18
|
+
import { C as _e } from "./icon.DnBh6-56.js";
|
|
19
|
+
import Pe from "../components/popup.js";
|
|
20
|
+
import Ne from "../components/resize-observer.js";
|
|
21
|
+
import We from "../components/skeleton.js";
|
|
22
|
+
import Be from "../components/space.js";
|
|
23
|
+
import Fe from "../components/spinner.js";
|
|
24
|
+
var Z = /* @__PURE__ */ ((i) => (i.Automatic = "automatic", i.Manual = "manual", i))(Z || {});
|
|
24
25
|
/*! medium-zoom 1.1.0 | MIT License | https://github.com/francoischalifour/medium-zoom */
|
|
25
26
|
var $ = Object.assign || function(i) {
|
|
26
27
|
for (var t = 1; t < arguments.length; t++) {
|
|
27
|
-
var
|
|
28
|
-
for (var
|
|
29
|
-
Object.prototype.hasOwnProperty.call(
|
|
28
|
+
var o = arguments[t];
|
|
29
|
+
for (var s in o)
|
|
30
|
+
Object.prototype.hasOwnProperty.call(o, s) && (i[s] = o[s]);
|
|
30
31
|
}
|
|
31
32
|
return i;
|
|
32
|
-
},
|
|
33
|
+
}, W = function(t) {
|
|
33
34
|
return t.tagName === "IMG";
|
|
34
|
-
},
|
|
35
|
+
}, Ue = function(t) {
|
|
35
36
|
return NodeList.prototype.isPrototypeOf(t);
|
|
36
|
-
},
|
|
37
|
+
}, B = function(t) {
|
|
37
38
|
return t && t.nodeType === 1;
|
|
38
|
-
}, ie = function(t) {
|
|
39
|
-
var r = t.currentSrc || t.src;
|
|
40
|
-
return r.substr(-4).toLowerCase() === ".svg";
|
|
41
39
|
}, oe = function(t) {
|
|
40
|
+
var o = t.currentSrc || t.src;
|
|
41
|
+
return o.substr(-4).toLowerCase() === ".svg";
|
|
42
|
+
}, re = function(t) {
|
|
42
43
|
try {
|
|
43
|
-
return Array.isArray(t) ? t.filter(
|
|
44
|
+
return Array.isArray(t) ? t.filter(W) : Ue(t) ? [].slice.call(t).filter(W) : B(t) ? [t].filter(W) : typeof t == "string" ? [].slice.call(document.querySelectorAll(t)).filter(W) : [];
|
|
44
45
|
} catch {
|
|
45
46
|
throw new TypeError(`The provided selector is invalid.
|
|
46
47
|
Expects a CSS selector, a Node element, a NodeList or an array.
|
|
47
48
|
See: https://github.com/francoischalifour/medium-zoom`);
|
|
48
49
|
}
|
|
49
|
-
},
|
|
50
|
-
var
|
|
51
|
-
return
|
|
52
|
-
},
|
|
53
|
-
var
|
|
54
|
-
return b.removeAttribute("id"), b.style.position = "absolute", b.style.top =
|
|
55
|
-
}, A = function(t,
|
|
56
|
-
var
|
|
50
|
+
}, De = function(t) {
|
|
51
|
+
var o = document.createElement("div");
|
|
52
|
+
return o.classList.add("medium-zoom-overlay"), o.style.background = t, o;
|
|
53
|
+
}, qe = function(t) {
|
|
54
|
+
var o = t.getBoundingClientRect(), s = o.top, c = o.left, L = o.width, R = o.height, b = t.cloneNode(), F = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0, M = window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0;
|
|
55
|
+
return b.removeAttribute("id"), b.style.position = "absolute", b.style.top = s + F + "px", b.style.left = c + M + "px", b.style.width = L + "px", b.style.height = R + "px", b.style.transform = "", b;
|
|
56
|
+
}, A = function(t, o) {
|
|
57
|
+
var s = $({
|
|
57
58
|
bubbles: !1,
|
|
58
59
|
cancelable: !1,
|
|
59
60
|
detail: void 0
|
|
60
|
-
},
|
|
61
|
+
}, o);
|
|
61
62
|
if (typeof window.CustomEvent == "function")
|
|
62
|
-
return new CustomEvent(t,
|
|
63
|
+
return new CustomEvent(t, s);
|
|
63
64
|
var c = document.createEvent("CustomEvent");
|
|
64
|
-
return c.initCustomEvent(t,
|
|
65
|
-
},
|
|
66
|
-
var
|
|
67
|
-
function
|
|
65
|
+
return c.initCustomEvent(t, s.bubbles, s.cancelable, s.detail), c;
|
|
66
|
+
}, Ye = function i(t) {
|
|
67
|
+
var o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = window.Promise || function(r) {
|
|
68
|
+
function a() {
|
|
68
69
|
}
|
|
69
|
-
|
|
70
|
-
}, c = function(
|
|
71
|
-
var
|
|
72
|
-
if (
|
|
70
|
+
r(a, a);
|
|
71
|
+
}, c = function(r) {
|
|
72
|
+
var a = r.target;
|
|
73
|
+
if (a === P) {
|
|
73
74
|
x();
|
|
74
75
|
return;
|
|
75
76
|
}
|
|
76
|
-
v.indexOf(
|
|
77
|
+
v.indexOf(a) !== -1 && Q({ target: a });
|
|
77
78
|
}, L = function() {
|
|
78
79
|
if (!(H || !e.original)) {
|
|
79
|
-
var
|
|
80
|
-
Math.abs(
|
|
80
|
+
var r = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
|
|
81
|
+
Math.abs(ee - r) > d.scrollOffset && setTimeout(x, 150);
|
|
81
82
|
}
|
|
82
|
-
}, R = function(
|
|
83
|
-
var
|
|
84
|
-
(
|
|
83
|
+
}, R = function(r) {
|
|
84
|
+
var a = r.key || r.keyCode;
|
|
85
|
+
(a === "Escape" || a === "Esc" || a === 27) && x();
|
|
85
86
|
}, b = function() {
|
|
86
|
-
var
|
|
87
|
-
if (
|
|
88
|
-
var m =
|
|
89
|
-
|
|
87
|
+
var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, a = r;
|
|
88
|
+
if (r.background && (P.style.background = r.background), r.container && r.container instanceof Object && (a.container = $({}, d.container, r.container)), r.template) {
|
|
89
|
+
var m = B(r.template) ? r.template : document.querySelector(r.template);
|
|
90
|
+
a.template = m;
|
|
90
91
|
}
|
|
91
|
-
return d = $({}, d,
|
|
92
|
+
return d = $({}, d, a), v.forEach(function(g) {
|
|
92
93
|
g.dispatchEvent(A("medium-zoom:update", {
|
|
93
94
|
detail: { zoom: u }
|
|
94
95
|
}));
|
|
95
96
|
}), u;
|
|
96
|
-
},
|
|
97
|
-
var
|
|
98
|
-
return i($({}, d,
|
|
99
|
-
},
|
|
100
|
-
for (var
|
|
101
|
-
|
|
102
|
-
var g =
|
|
103
|
-
return [].concat(
|
|
97
|
+
}, F = function() {
|
|
98
|
+
var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
99
|
+
return i($({}, d, r));
|
|
100
|
+
}, M = function() {
|
|
101
|
+
for (var r = arguments.length, a = Array(r), m = 0; m < r; m++)
|
|
102
|
+
a[m] = arguments[m];
|
|
103
|
+
var g = a.reduce(function(n, f) {
|
|
104
|
+
return [].concat(n, re(f));
|
|
104
105
|
}, []);
|
|
105
|
-
return g.filter(function(
|
|
106
|
-
return v.indexOf(
|
|
107
|
-
}).forEach(function(
|
|
108
|
-
v.push(
|
|
109
|
-
}),
|
|
110
|
-
var f =
|
|
106
|
+
return g.filter(function(n) {
|
|
107
|
+
return v.indexOf(n) === -1;
|
|
108
|
+
}).forEach(function(n) {
|
|
109
|
+
v.push(n), n.classList.add("medium-zoom-image");
|
|
110
|
+
}), _.forEach(function(n) {
|
|
111
|
+
var f = n.type, z = n.listener, T = n.options;
|
|
111
112
|
g.forEach(function(w) {
|
|
112
113
|
w.addEventListener(f, z, T);
|
|
113
114
|
});
|
|
114
115
|
}), u;
|
|
115
|
-
},
|
|
116
|
-
for (var
|
|
117
|
-
|
|
116
|
+
}, de = function() {
|
|
117
|
+
for (var r = arguments.length, a = Array(r), m = 0; m < r; m++)
|
|
118
|
+
a[m] = arguments[m];
|
|
118
119
|
e.zoomed && x();
|
|
119
|
-
var g =
|
|
120
|
-
return [].concat(
|
|
120
|
+
var g = a.length > 0 ? a.reduce(function(n, f) {
|
|
121
|
+
return [].concat(n, re(f));
|
|
121
122
|
}, []) : v;
|
|
122
|
-
return g.forEach(function(
|
|
123
|
-
|
|
123
|
+
return g.forEach(function(n) {
|
|
124
|
+
n.classList.remove("medium-zoom-image"), n.dispatchEvent(A("medium-zoom:detach", {
|
|
124
125
|
detail: { zoom: u }
|
|
125
126
|
}));
|
|
126
|
-
}), v = v.filter(function(
|
|
127
|
-
return g.indexOf(
|
|
127
|
+
}), v = v.filter(function(n) {
|
|
128
|
+
return g.indexOf(n) === -1;
|
|
128
129
|
}), u;
|
|
129
|
-
},
|
|
130
|
+
}, ce = function(r, a) {
|
|
130
131
|
var m = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
131
132
|
return v.forEach(function(g) {
|
|
132
|
-
g.addEventListener("medium-zoom:" +
|
|
133
|
-
}),
|
|
134
|
-
},
|
|
133
|
+
g.addEventListener("medium-zoom:" + r, a, m);
|
|
134
|
+
}), _.push({ type: "medium-zoom:" + r, listener: a, options: m }), u;
|
|
135
|
+
}, me = function(r, a) {
|
|
135
136
|
var m = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
136
137
|
return v.forEach(function(g) {
|
|
137
|
-
g.removeEventListener("medium-zoom:" +
|
|
138
|
-
}),
|
|
139
|
-
return !(g.type === "medium-zoom:" +
|
|
138
|
+
g.removeEventListener("medium-zoom:" + r, a, m);
|
|
139
|
+
}), _ = _.filter(function(g) {
|
|
140
|
+
return !(g.type === "medium-zoom:" + r && g.listener.toString() === a.toString());
|
|
140
141
|
}), u;
|
|
141
|
-
},
|
|
142
|
-
var
|
|
143
|
-
var
|
|
142
|
+
}, J = function() {
|
|
143
|
+
var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, a = r.target, m = function() {
|
|
144
|
+
var n = {
|
|
144
145
|
width: document.documentElement.clientWidth,
|
|
145
146
|
height: document.documentElement.clientHeight,
|
|
146
147
|
left: 0,
|
|
@@ -150,27 +151,27 @@ See: https://github.com/francoischalifour/medium-zoom`);
|
|
|
150
151
|
}, f = void 0, z = void 0;
|
|
151
152
|
if (d.container)
|
|
152
153
|
if (d.container instanceof Object)
|
|
153
|
-
|
|
154
|
+
n = $({}, n, d.container), f = n.width - n.left - n.right - d.margin * 2, z = n.height - n.top - n.bottom - d.margin * 2;
|
|
154
155
|
else {
|
|
155
|
-
var T =
|
|
156
|
-
|
|
157
|
-
width:
|
|
158
|
-
height:
|
|
159
|
-
left:
|
|
160
|
-
top:
|
|
156
|
+
var T = B(d.container) ? d.container : document.querySelector(d.container), w = T.getBoundingClientRect(), U = w.width, fe = w.height, ve = w.left, ye = w.top;
|
|
157
|
+
n = $({}, n, {
|
|
158
|
+
width: U,
|
|
159
|
+
height: fe,
|
|
160
|
+
left: ve,
|
|
161
|
+
top: ye
|
|
161
162
|
});
|
|
162
163
|
}
|
|
163
|
-
f = f ||
|
|
164
|
-
var
|
|
165
|
-
e.zoomed.style.transform =
|
|
164
|
+
f = f || n.width - d.margin * 2, z = z || n.height - d.margin * 2;
|
|
165
|
+
var j = e.zoomedHd || e.original, ze = oe(j) ? f : j.naturalWidth || f, be = oe(j) ? z : j.naturalHeight || z, N = j.getBoundingClientRect(), xe = N.top, we = N.left, D = N.width, q = N.height, Ee = Math.min(Math.max(D, ze), f) / D, Ce = Math.min(Math.max(q, be), z) / q, Y = Math.min(Ee, Ce), ke = (-we + (f - D) / 2 + d.margin + n.left) / Y, Le = (-xe + (z - q) / 2 + d.margin + n.top) / Y, te = "scale(" + Y + ") translate3d(" + ke + "px, " + Le + "px, 0)";
|
|
166
|
+
e.zoomed.style.transform = te, e.zoomedHd && (e.zoomedHd.style.transform = te);
|
|
166
167
|
};
|
|
167
|
-
return new
|
|
168
|
-
if (
|
|
168
|
+
return new s(function(g) {
|
|
169
|
+
if (a && v.indexOf(a) === -1) {
|
|
169
170
|
g(u);
|
|
170
171
|
return;
|
|
171
172
|
}
|
|
172
|
-
var
|
|
173
|
-
H = !1, e.zoomed.removeEventListener("transitionend",
|
|
173
|
+
var n = function U() {
|
|
174
|
+
H = !1, e.zoomed.removeEventListener("transitionend", U), e.original.dispatchEvent(A("medium-zoom:opened", {
|
|
174
175
|
detail: { zoom: u }
|
|
175
176
|
})), g(u);
|
|
176
177
|
};
|
|
@@ -178,8 +179,8 @@ See: https://github.com/francoischalifour/medium-zoom`);
|
|
|
178
179
|
g(u);
|
|
179
180
|
return;
|
|
180
181
|
}
|
|
181
|
-
if (
|
|
182
|
-
e.original =
|
|
182
|
+
if (a)
|
|
183
|
+
e.original = a;
|
|
183
184
|
else if (v.length > 0) {
|
|
184
185
|
var f = v;
|
|
185
186
|
e.original = f[0];
|
|
@@ -189,13 +190,13 @@ See: https://github.com/francoischalifour/medium-zoom`);
|
|
|
189
190
|
}
|
|
190
191
|
if (e.original.dispatchEvent(A("medium-zoom:open", {
|
|
191
192
|
detail: { zoom: u }
|
|
192
|
-
})),
|
|
193
|
-
var z =
|
|
193
|
+
})), ee = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0, H = !0, e.zoomed = qe(e.original), document.body.appendChild(P), d.template) {
|
|
194
|
+
var z = B(d.template) ? d.template : document.querySelector(d.template);
|
|
194
195
|
e.template = document.createElement("div"), e.template.appendChild(z.content.cloneNode(!0)), document.body.appendChild(e.template);
|
|
195
196
|
}
|
|
196
197
|
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() {
|
|
197
198
|
document.body.classList.add("medium-zoom--opened");
|
|
198
|
-
}), 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",
|
|
199
|
+
}), 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")) {
|
|
199
200
|
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() {
|
|
200
201
|
clearInterval(T), console.warn("Unable to reach the zoom image target " + e.zoomedHd.src), e.zoomedHd = null, m();
|
|
201
202
|
};
|
|
@@ -211,72 +212,72 @@ See: https://github.com/francoischalifour/medium-zoom`);
|
|
|
211
212
|
m();
|
|
212
213
|
});
|
|
213
214
|
}, x = function() {
|
|
214
|
-
return new
|
|
215
|
+
return new s(function(r) {
|
|
215
216
|
if (H || !e.original) {
|
|
216
|
-
|
|
217
|
+
r(u);
|
|
217
218
|
return;
|
|
218
219
|
}
|
|
219
|
-
var
|
|
220
|
-
e.original.classList.remove("medium-zoom-image--hidden"), document.body.removeChild(e.zoomed), e.zoomedHd && document.body.removeChild(e.zoomedHd), document.body.removeChild(
|
|
220
|
+
var a = function m() {
|
|
221
|
+
e.original.classList.remove("medium-zoom-image--hidden"), document.body.removeChild(e.zoomed), e.zoomedHd && document.body.removeChild(e.zoomedHd), document.body.removeChild(P), 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", {
|
|
221
222
|
detail: { zoom: u }
|
|
222
|
-
})), e.original = null, e.zoomed = null, e.zoomedHd = null, e.template = null,
|
|
223
|
+
})), e.original = null, e.zoomed = null, e.zoomedHd = null, e.template = null, r(u);
|
|
223
224
|
};
|
|
224
225
|
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", {
|
|
225
226
|
detail: { zoom: u }
|
|
226
|
-
})), e.zoomed.addEventListener("transitionend",
|
|
227
|
+
})), e.zoomed.addEventListener("transitionend", a);
|
|
227
228
|
});
|
|
228
|
-
},
|
|
229
|
-
var
|
|
230
|
-
return e.original ? x() :
|
|
231
|
-
},
|
|
229
|
+
}, Q = function() {
|
|
230
|
+
var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, a = r.target;
|
|
231
|
+
return e.original ? x() : J({ target: a });
|
|
232
|
+
}, ge = function() {
|
|
232
233
|
return d;
|
|
233
|
-
},
|
|
234
|
+
}, ue = function() {
|
|
234
235
|
return v;
|
|
235
|
-
},
|
|
236
|
+
}, pe = function() {
|
|
236
237
|
return e.original;
|
|
237
|
-
}, v = [],
|
|
238
|
+
}, v = [], _ = [], H = !1, ee = 0, d = o, e = {
|
|
238
239
|
original: null,
|
|
239
240
|
zoomed: null,
|
|
240
241
|
zoomedHd: null,
|
|
241
242
|
template: null
|
|
242
243
|
// If the selector is omitted, it's replaced by the options
|
|
243
244
|
};
|
|
244
|
-
Object.prototype.toString.call(t) === "[object Object]" ? d = t : (t || typeof t == "string") &&
|
|
245
|
+
Object.prototype.toString.call(t) === "[object Object]" ? d = t : (t || typeof t == "string") && M(t), d = $({
|
|
245
246
|
margin: 0,
|
|
246
247
|
background: "#fff",
|
|
247
248
|
scrollOffset: 40,
|
|
248
249
|
container: null,
|
|
249
250
|
template: null
|
|
250
251
|
}, d);
|
|
251
|
-
var
|
|
252
|
+
var P = De(d.background);
|
|
252
253
|
document.addEventListener("click", c), document.addEventListener("keyup", R), document.addEventListener("scroll", L), window.addEventListener("resize", x);
|
|
253
254
|
var u = {
|
|
254
|
-
open:
|
|
255
|
+
open: J,
|
|
255
256
|
close: x,
|
|
256
|
-
toggle:
|
|
257
|
+
toggle: Q,
|
|
257
258
|
update: b,
|
|
258
|
-
clone:
|
|
259
|
-
attach:
|
|
260
|
-
detach:
|
|
261
|
-
on:
|
|
262
|
-
off:
|
|
263
|
-
getOptions:
|
|
264
|
-
getImages:
|
|
265
|
-
getZoomedImage:
|
|
259
|
+
clone: F,
|
|
260
|
+
attach: M,
|
|
261
|
+
detach: de,
|
|
262
|
+
on: ce,
|
|
263
|
+
off: me,
|
|
264
|
+
getOptions: ge,
|
|
265
|
+
getImages: ue,
|
|
266
|
+
getZoomedImage: pe
|
|
266
267
|
};
|
|
267
268
|
return u;
|
|
268
269
|
};
|
|
269
|
-
function
|
|
270
|
+
function Ve(i, t) {
|
|
270
271
|
t === void 0 && (t = {});
|
|
271
|
-
var
|
|
272
|
+
var o = t.insertAt;
|
|
272
273
|
if (!(typeof document > "u")) {
|
|
273
|
-
var
|
|
274
|
-
c.type = "text/css",
|
|
274
|
+
var s = document.head || document.getElementsByTagName("head")[0], c = document.createElement("style");
|
|
275
|
+
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));
|
|
275
276
|
}
|
|
276
277
|
}
|
|
277
|
-
var
|
|
278
|
-
|
|
279
|
-
const
|
|
278
|
+
var Ke = ".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}";
|
|
279
|
+
Ve(Ke);
|
|
280
|
+
const Xe = se`: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)}`, Ge = se`
|
|
280
281
|
:host {
|
|
281
282
|
--justify-content: flex-start;
|
|
282
283
|
--border-radius: 0px;
|
|
@@ -330,7 +331,7 @@ const De = re`:host([effect=jump]) .container,:host([effect=text-reveal]) .conta
|
|
|
330
331
|
max-height: 100%;
|
|
331
332
|
}
|
|
332
333
|
|
|
333
|
-
${
|
|
334
|
+
${Xe}
|
|
334
335
|
|
|
335
336
|
:host([block]) {
|
|
336
337
|
width: 100%;
|
|
@@ -534,7 +535,11 @@ const De = re`:host([effect=jump]) .container,:host([effect=text-reveal]) .conta
|
|
|
534
535
|
}
|
|
535
536
|
|
|
536
537
|
.fallback {
|
|
537
|
-
|
|
538
|
+
align-items: center;
|
|
539
|
+
display: flex;
|
|
540
|
+
inset: 0;
|
|
541
|
+
justify-content: center;
|
|
542
|
+
position: absolute;
|
|
538
543
|
}
|
|
539
544
|
|
|
540
545
|
.fallback cx-icon {
|
|
@@ -542,14 +547,16 @@ const De = re`:host([effect=jump]) .container,:host([effect=text-reveal]) .conta
|
|
|
542
547
|
color: var(--fallback-icon-color);
|
|
543
548
|
}
|
|
544
549
|
`;
|
|
545
|
-
var
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
550
|
+
var Je = Object.defineProperty, Qe = Object.getOwnPropertyDescriptor, le = (i) => {
|
|
551
|
+
throw TypeError(i);
|
|
552
|
+
}, h = (i, t, o, s) => {
|
|
553
|
+
for (var c = s > 1 ? void 0 : s ? Qe(t, o) : t, L = i.length - 1, R; L >= 0; L--)
|
|
554
|
+
(R = i[L]) && (c = (s ? R(t, o, c) : R(c)) || c);
|
|
555
|
+
return s && c && Je(t, o, c), c;
|
|
556
|
+
}, he = (i, t, o) => t.has(i) || le("Cannot " + o), ae = (i, t, o) => (he(i, t, "read from private field"), o ? o.call(i) : t.get(i)), et = (i, t, o) => t.has(i) ? le("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(i) : t.set(i, o), ne = (i, t, o, s) => (he(i, t, "write to private field"), t.set(i, o), o), O;
|
|
557
|
+
let l = class extends Se {
|
|
551
558
|
constructor() {
|
|
552
|
-
super(...arguments), this.localize = new
|
|
559
|
+
super(...arguments), this.localize = new je(this), this.retryCount = 0, this.retryTimer = null, this.isLoaded = !1, this.isError = !1, this.isRetrying = !1, this.retryIndex = 0, this.src = "", this.placeholder = "", this.alt = "", this.objectFit = Te.Fill, this.skeleton = !1, this.fallback = !1, this.canZoom = !1, this.loading = !1, this.block = !1, this.htmlLoading = "lazy", this.clickHandlerType = Z.Automatic, this.retryOnError = !1, this.maxRetries = 3, this.isZoomed = !1, this.imageRatio = 1, this.parsedAlt = "", this.parsedAltDarkMode = "", this.zoom = null, this.lastPatchedWidth = null, et(this, O, "");
|
|
553
560
|
}
|
|
554
561
|
get currentAltValue() {
|
|
555
562
|
return this.alt;
|
|
@@ -558,22 +565,22 @@ let s = class extends Ee {
|
|
|
558
565
|
return this.src;
|
|
559
566
|
}
|
|
560
567
|
get highlighterTabindex() {
|
|
561
|
-
return this.hasZoomAction && this.clickHandlerType ===
|
|
568
|
+
return this.hasZoomAction && this.clickHandlerType === Z.Automatic ? "0" : void 0;
|
|
562
569
|
}
|
|
563
570
|
get highlighterRole() {
|
|
564
|
-
return this.hasZoomAction && this.clickHandlerType ===
|
|
571
|
+
return this.hasZoomAction && this.clickHandlerType === Z.Automatic ? "button" : "img";
|
|
565
572
|
}
|
|
566
573
|
get highlighterClass() {
|
|
567
574
|
return {
|
|
568
575
|
"highlightable-item": !0,
|
|
569
|
-
"highlightable-item--effect-text-reveal": this.effect ===
|
|
576
|
+
"highlightable-item--effect-text-reveal": this.effect === V.TextReveal,
|
|
570
577
|
[`highlightable-item--text-reveal-style-${this.textRevealStyle}`]: !0
|
|
571
578
|
};
|
|
572
579
|
}
|
|
573
580
|
get imageClass() {
|
|
574
581
|
let i = "landscape", t = this.ratio;
|
|
575
|
-
const
|
|
576
|
-
return
|
|
582
|
+
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);
|
|
583
|
+
return s && c && (t = s / c), t > this.imageRatio && (i = "portrait"), {
|
|
577
584
|
image: !0,
|
|
578
585
|
[`image--${this.objectFit}`]: !0,
|
|
579
586
|
[`image--${i}`]: !0,
|
|
@@ -629,7 +636,7 @@ let s = class extends Ee {
|
|
|
629
636
|
await this.updateComplete, this.requestUpdate();
|
|
630
637
|
}
|
|
631
638
|
handleSrcChange() {
|
|
632
|
-
this.isLoaded = !1, this.isError = !1, this.isRetrying = !1, this.retryCount = 0, this.retryIndex = 0, this.clearRetryTimer();
|
|
639
|
+
this.isLoaded = !1, this.isError = !1, this.isRetrying = !1, this.retryCount = 0, this.retryIndex = 0, ne(this, O, ""), this.clearRetryTimer();
|
|
633
640
|
}
|
|
634
641
|
clearRetryTimer() {
|
|
635
642
|
this.retryTimer !== null && (clearTimeout(this.retryTimer), this.retryTimer = null);
|
|
@@ -637,11 +644,15 @@ let s = class extends Ee {
|
|
|
637
644
|
scheduleRetry() {
|
|
638
645
|
const i = Math.min(1e3 * Math.pow(2, this.retryCount - 1), 1e4);
|
|
639
646
|
this.retryTimer = setTimeout(() => {
|
|
640
|
-
this.retryTimer = null, this.retryIndex += 1;
|
|
647
|
+
this.retryTimer = null, ne(this, O, `${this.retryCount}-${Math.random().toString(36).slice(2)}`), this.retryIndex += 1;
|
|
641
648
|
}, i);
|
|
642
649
|
}
|
|
650
|
+
/** Appends the retry cache-bust param to `src` while a retry attempt is in flight, so a CDN edge caching a corrupted/truncated response is bypassed in favor of a fresh origin fetch. */
|
|
651
|
+
applyRetryCacheBust(i) {
|
|
652
|
+
return this.retryIndex === 0 || !ae(this, O) || !i ? i : Ze(i, "cachebust", ae(this, O));
|
|
653
|
+
}
|
|
643
654
|
async initZoom() {
|
|
644
|
-
this.zoomImageElement && !this.zoom && this.isLoaded && (this.zoom =
|
|
655
|
+
this.zoomImageElement && !this.zoom && this.isLoaded && (this.zoom = Ye(this.zoomImageElement, {
|
|
645
656
|
background: "light-dark(rgba(255, 255, 255, 0.8), rgba(0, 0, 0, 0.8))",
|
|
646
657
|
margin: 0,
|
|
647
658
|
scrollOffset: 0
|
|
@@ -655,8 +666,8 @@ let s = class extends Ee {
|
|
|
655
666
|
const t = i?.currentTarget ?? this.imageElement;
|
|
656
667
|
if (!t)
|
|
657
668
|
return;
|
|
658
|
-
const { naturalHeight:
|
|
659
|
-
this.imageRatio =
|
|
669
|
+
const { naturalHeight: o, naturalWidth: s } = t;
|
|
670
|
+
this.imageRatio = s / o, this.clearRetryTimer(), this.retryCount = 0, this.isRetrying = !1, this.isLoaded || (this.emit("cx-load"), this.isLoaded = !0, this.isError = !1);
|
|
660
671
|
}
|
|
661
672
|
handleError() {
|
|
662
673
|
if (this.retryOnError && this.retryCount < this.maxRetries) {
|
|
@@ -666,13 +677,13 @@ let s = class extends Ee {
|
|
|
666
677
|
this.isRetrying = !1, this.emit("cx-error"), this.isLoaded = !0, this.isError = !0;
|
|
667
678
|
}
|
|
668
679
|
handleSizeChange() {
|
|
669
|
-
const i = this.resizeDirection !==
|
|
670
|
-
i && (this.width || this.isResizing ? this.style.setProperty("--width",
|
|
680
|
+
const i = this.resizeDirection !== ie.Vertical, t = this.resizeDirection !== ie.Horizontal, o = this.isResizing ? `${this.resizeSize.width}px` : this.width, s = this.isResizing ? `${this.resizeSize.height}px` : this.height;
|
|
681
|
+
i && (this.width || this.isResizing ? this.style.setProperty("--width", o) : this.style.removeProperty("--width")), t && (this.heightMode !== $e.Auto && (this.height || this.isResizing) ? this.style.setProperty("--height", s) : this.style.removeProperty("--height"));
|
|
671
682
|
}
|
|
672
683
|
handleResize(i) {
|
|
673
684
|
const { entries: t } = i.detail;
|
|
674
|
-
for (const
|
|
675
|
-
|
|
685
|
+
for (const o of t)
|
|
686
|
+
o.target === this.highlighterElement && this.width.endsWith("%") && !this.isResizing && Math.abs(o.contentRect.width - (this.lastPatchedWidth ?? 0)) > 1 && this.updateLastPatchedWidth(o.contentRect.width);
|
|
676
687
|
}
|
|
677
688
|
updateLastPatchedWidth(i) {
|
|
678
689
|
this.lastPatchedWidth = i, this.requestUpdate();
|
|
@@ -681,7 +692,7 @@ let s = class extends Ee {
|
|
|
681
692
|
* Support CMS5 click action for the image.
|
|
682
693
|
*/
|
|
683
694
|
handleClickAction(i) {
|
|
684
|
-
!(i.target instanceof HTMLElement) || this.clickHandlerType ===
|
|
695
|
+
!(i.target instanceof HTMLElement) || this.clickHandlerType === Z.Manual || this.canZoom && this.openZoom();
|
|
685
696
|
}
|
|
686
697
|
updated(i) {
|
|
687
698
|
super.updated(i), (i.has("width") || i.has("height") || i.has("heightMode") || i.has("resizeSize")) && this.handleSizeChange();
|
|
@@ -690,31 +701,31 @@ let s = class extends Ee {
|
|
|
690
701
|
this.zoom && this.zoom.open();
|
|
691
702
|
}
|
|
692
703
|
renderContent() {
|
|
693
|
-
const i = this.currentSrc, t = this.currentAltValue;
|
|
704
|
+
const i = this.applyRetryCacheBust(this.currentSrc), t = this.currentAltValue;
|
|
694
705
|
if (this.retryOnError) {
|
|
695
706
|
if (this.isError && this.retryCount >= this.maxRetries)
|
|
696
|
-
return
|
|
707
|
+
return K;
|
|
697
708
|
} else if (this.isError)
|
|
698
|
-
return
|
|
699
|
-
return E`<div part="content" slot="anchor" class=${C(this.highlighterClass)}>${
|
|
709
|
+
return K;
|
|
710
|
+
return E`<div part="content" slot="anchor" class=${C(this.highlighterClass)}>${Ie(
|
|
700
711
|
this.retryIndex,
|
|
701
|
-
E`<img part="image" class=${C(this.imageClass)} src=${i || this.placeholder} alt=${t} aria-label=${t} crossorigin=${
|
|
712
|
+
E`<img part="image" class=${C(this.imageClass)} src=${i || this.placeholder} alt=${t} aria-label=${t} crossorigin=${X(this.crossorigin)} @load=${this.handleLoad} @error=${this.handleError} loading=${this.retryIndex > 0 ? "eager" : this.htmlLoading}>`
|
|
702
713
|
)}</div>`;
|
|
703
714
|
}
|
|
704
715
|
render() {
|
|
705
|
-
const i = this.hasZoomAction, t = this.currentAltValue,
|
|
716
|
+
const i = this.hasZoomAction, t = this.currentAltValue, o = !this.currentSrc && !this.placeholder;
|
|
706
717
|
return E`<div part="base" class=${C({
|
|
707
718
|
container: !0,
|
|
708
|
-
"container--empty":
|
|
719
|
+
"container--empty": o,
|
|
709
720
|
"container--loading": this.loading,
|
|
710
721
|
"container--resizing": this.resizable && this.isResizeActive
|
|
711
|
-
})} style=${
|
|
722
|
+
})} style=${Me({
|
|
712
723
|
"--easing": this.easeCSSVariable
|
|
713
|
-
})} data-empty-label=${this.localize.term("emptyImage")} @click=${this.startResizing} @keydown=${this.handleKeyDown}><cx-resize-observer @cx-resize=${this.handleResize}><div part="highlighter" tabindex=${
|
|
714
|
-
|
|
715
|
-
() =>
|
|
724
|
+
})} data-empty-label=${this.localize.term("emptyImage")} @click=${this.startResizing} @keydown=${this.handleKeyDown}><cx-resize-observer @cx-resize=${this.handleResize}><div part="highlighter" tabindex=${X(this.highlighterTabindex)} role=${this.highlighterRole} aria-label=${t} aria-roledescription=${this.localize.term("image")} class=${C(o ? {} : this.getHighlighterClass(this.isError))} @click=${this.handleClickAction} @mouseenter=${this.handleMouseEnter} @mouseleave=${this.handleMouseLeave} @blur=${this.handleBlur}>${S(
|
|
725
|
+
o,
|
|
726
|
+
() => K,
|
|
716
727
|
() => S(
|
|
717
|
-
this.effect ===
|
|
728
|
+
this.effect === V.Jump || this.effect === V.Zoom,
|
|
718
729
|
() => E`<cx-popup class="popup-container" strategy="absolute" active placement="center" sync="both">${this.renderContent()}</cx-popup>`,
|
|
719
730
|
() => this.renderContent()
|
|
720
731
|
)
|
|
@@ -723,7 +734,7 @@ let s = class extends Ee {
|
|
|
723
734
|
() => E`<img part="zoom-image" class=${C({
|
|
724
735
|
"zoom-image": !0,
|
|
725
736
|
"zoom-image--hidden": !this.isZoomed
|
|
726
|
-
})} src=${this.currentSrc || this.placeholder} alt="" aria-hidden="true" decoding="async" draggable="false" crossorigin=${
|
|
737
|
+
})} src=${this.applyRetryCacheBust(this.currentSrc) || this.placeholder} alt="" aria-hidden="true" decoding="async" draggable="false" crossorigin=${X(this.crossorigin)}>`
|
|
727
738
|
)}</div>${S(
|
|
728
739
|
(this.skeleton && !this.isLoaded && !this.isError || this.loading) && !this.isRetrying,
|
|
729
740
|
() => E`<slot name="skeleton" part="skeleton"><div class=${C({
|
|
@@ -734,105 +745,106 @@ let s = class extends Ee {
|
|
|
734
745
|
${S(this.isError, () => E`<slot name="fallback" part="fallback"><cx-space class=${C({ 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>${S(this.resizable && this.isResizeActive, () => this.renderResizer())}</div>`;
|
|
735
746
|
}
|
|
736
747
|
};
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
"cx-
|
|
741
|
-
"cx-
|
|
742
|
-
"cx-
|
|
743
|
-
"cx-
|
|
744
|
-
"cx-
|
|
748
|
+
O = /* @__PURE__ */ new WeakMap();
|
|
749
|
+
l.styles = [He, Re, Ge];
|
|
750
|
+
l.dependencies = {
|
|
751
|
+
"cx-icon": _e,
|
|
752
|
+
"cx-popup": Pe,
|
|
753
|
+
"cx-resize-observer": Ne,
|
|
754
|
+
"cx-skeleton": We,
|
|
755
|
+
"cx-space": Be,
|
|
756
|
+
"cx-spinner": Fe
|
|
745
757
|
};
|
|
746
758
|
h([
|
|
747
|
-
|
|
748
|
-
],
|
|
759
|
+
G(".image")
|
|
760
|
+
], l.prototype, "imageElement", 2);
|
|
749
761
|
h([
|
|
750
|
-
|
|
751
|
-
],
|
|
762
|
+
G(".zoom-image")
|
|
763
|
+
], l.prototype, "zoomImageElement", 2);
|
|
752
764
|
h([
|
|
753
|
-
|
|
754
|
-
],
|
|
765
|
+
G(".highlighter")
|
|
766
|
+
], l.prototype, "highlighterElement", 2);
|
|
755
767
|
h([
|
|
756
768
|
k()
|
|
757
|
-
],
|
|
769
|
+
], l.prototype, "isLoaded", 2);
|
|
758
770
|
h([
|
|
759
771
|
k()
|
|
760
|
-
],
|
|
772
|
+
], l.prototype, "isError", 2);
|
|
761
773
|
h([
|
|
762
774
|
k()
|
|
763
|
-
],
|
|
775
|
+
], l.prototype, "isRetrying", 2);
|
|
764
776
|
h([
|
|
765
777
|
k()
|
|
766
|
-
],
|
|
778
|
+
], l.prototype, "retryIndex", 2);
|
|
767
779
|
h([
|
|
768
780
|
y({ reflect: !0, type: String })
|
|
769
|
-
],
|
|
781
|
+
], l.prototype, "src", 2);
|
|
770
782
|
h([
|
|
771
783
|
y({ reflect: !0, type: String })
|
|
772
|
-
],
|
|
784
|
+
], l.prototype, "placeholder", 2);
|
|
773
785
|
h([
|
|
774
786
|
y({ reflect: !0, type: String })
|
|
775
|
-
],
|
|
787
|
+
], l.prototype, "alt", 2);
|
|
776
788
|
h([
|
|
777
789
|
y({ attribute: "object-fit", reflect: !0 })
|
|
778
|
-
],
|
|
790
|
+
], l.prototype, "objectFit", 2);
|
|
779
791
|
h([
|
|
780
792
|
y({ reflect: !0, type: Boolean })
|
|
781
|
-
],
|
|
793
|
+
], l.prototype, "skeleton", 2);
|
|
782
794
|
h([
|
|
783
795
|
y({ reflect: !0, type: Boolean })
|
|
784
|
-
],
|
|
796
|
+
], l.prototype, "fallback", 2);
|
|
785
797
|
h([
|
|
786
798
|
y({ attribute: "can-zoom", reflect: !0, type: Boolean })
|
|
787
|
-
],
|
|
799
|
+
], l.prototype, "canZoom", 2);
|
|
788
800
|
h([
|
|
789
801
|
y({ reflect: !0, type: Boolean })
|
|
790
|
-
],
|
|
802
|
+
], l.prototype, "loading", 2);
|
|
791
803
|
h([
|
|
792
804
|
y({ reflect: !0, type: Boolean })
|
|
793
|
-
],
|
|
805
|
+
], l.prototype, "block", 2);
|
|
794
806
|
h([
|
|
795
807
|
y({ attribute: "html-loading", reflect: !0, type: String })
|
|
796
|
-
],
|
|
808
|
+
], l.prototype, "htmlLoading", 2);
|
|
797
809
|
h([
|
|
798
810
|
y({ attribute: "click-handler-type", reflect: !0, type: String })
|
|
799
|
-
],
|
|
811
|
+
], l.prototype, "clickHandlerType", 2);
|
|
800
812
|
h([
|
|
801
813
|
y({ attribute: "retry-on-error", type: Boolean })
|
|
802
|
-
],
|
|
814
|
+
], l.prototype, "retryOnError", 2);
|
|
803
815
|
h([
|
|
804
816
|
y({ attribute: "max-retries", type: Number })
|
|
805
|
-
],
|
|
817
|
+
], l.prototype, "maxRetries", 2);
|
|
806
818
|
h([
|
|
807
819
|
k()
|
|
808
|
-
],
|
|
820
|
+
], l.prototype, "isZoomed", 2);
|
|
809
821
|
h([
|
|
810
822
|
k()
|
|
811
|
-
],
|
|
823
|
+
], l.prototype, "imageRatio", 2);
|
|
812
824
|
h([
|
|
813
825
|
k()
|
|
814
|
-
],
|
|
826
|
+
], l.prototype, "parsedAlt", 2);
|
|
815
827
|
h([
|
|
816
828
|
k()
|
|
817
|
-
],
|
|
829
|
+
], l.prototype, "parsedAltDarkMode", 2);
|
|
818
830
|
h([
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
],
|
|
831
|
+
I("isLoaded"),
|
|
832
|
+
I("canZoom", { waitUntilFirstUpdate: !0 })
|
|
833
|
+
], l.prototype, "handleCanZoomChange", 1);
|
|
822
834
|
h([
|
|
823
|
-
|
|
824
|
-
],
|
|
835
|
+
I("objectFit", { waitUntilFirstUpdate: !0 })
|
|
836
|
+
], l.prototype, "handleObjectFitChange", 1);
|
|
825
837
|
h([
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
],
|
|
838
|
+
I("src"),
|
|
839
|
+
I("srcDarkMode")
|
|
840
|
+
], l.prototype, "handleSrcChange", 1);
|
|
829
841
|
h([
|
|
830
|
-
|
|
831
|
-
],
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
],
|
|
842
|
+
Oe(100)
|
|
843
|
+
], l.prototype, "updateLastPatchedWidth", 1);
|
|
844
|
+
l = h([
|
|
845
|
+
Ae("cx-image")
|
|
846
|
+
], l);
|
|
835
847
|
export {
|
|
836
|
-
|
|
837
|
-
|
|
848
|
+
l as C,
|
|
849
|
+
Z as a
|
|
838
850
|
};
|