@orangelogic/design-system 4.2.0 → 4.4.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.
Files changed (243) hide show
  1. package/library/chunks/{_baseXor.DixEm6JQ.js → _baseXor.BCxbgizO.js} +2 -2
  2. package/library/chunks/{asset-link-format.CVwjA_yf.js → asset-link-format.DTLA2CFh.js} +435 -415
  3. package/library/chunks/{button.D1YIxtv-.js → button.cbDkxJHn.js} +3 -3
  4. package/library/chunks/button.styles.D3GdfF7I.js +5 -0
  5. package/library/chunks/{color-swatch-group.BPXiMxjh.js → color-swatch-group.CZSeCrot.js} +3279 -2903
  6. package/library/chunks/color.CIHdfM_a.js +187 -0
  7. package/library/chunks/{confirm-popover.CJXyEa5A.js → confirm-popover.Dvgoz-oA.js} +4 -4
  8. package/library/chunks/content-builder.CBBdfVOl.js +55 -0
  9. package/library/chunks/{dialog.BbQ4Du0M.js → dialog.BvSMV36r.js} +2 -2
  10. package/library/chunks/{document-viewer.DtBW-p7z.js → document-viewer.BLdEjbza.js} +11 -10
  11. package/library/chunks/{dom.DL-cNKsj.js → dom.D0lSUoEI.js} +1 -1
  12. package/library/chunks/{dot-pagination.CJRAtM51.js → dot-pagination.CukHxNBk.js} +1 -1
  13. package/library/chunks/{folder-select.BAPsI-gg.js → folder-select.DAZQRdLq.js} +5 -5
  14. package/library/chunks/form-control.styles.CHC7Q08Q.js +5 -0
  15. package/library/chunks/{form.DN2v7-DH.js → form.LpappO1d.js} +1 -1
  16. package/library/chunks/{header.BioJzPlg.js → header.2RH_nPmz.js} +132 -90
  17. package/library/chunks/{i18n.rtxrs1c1.js → i18n.BSPmBQ73.js} +94 -12
  18. package/library/chunks/{icon-button.CbUddcgI.js → icon-button.DV5Fks8j.js} +1 -1
  19. package/library/chunks/{iframe.y7iCAVZP.js → iframe.ddX2kGu3.js} +1 -1
  20. package/library/chunks/{image.A2hE1WoV.js → image.BM7bPTub.js} +407 -276
  21. package/library/chunks/index.DKKvxBAi.js +1130 -0
  22. package/library/chunks/{input.D1FFprPl.js → input.7pumTpdu.js} +3 -3
  23. package/library/chunks/{markdown.Dd_GFJK8.js → markdown.LHSzm035.js} +3 -3
  24. package/library/chunks/{menu-item.CbqZ66to.js → menu-item.CqPvDGeN.js} +1 -1
  25. package/library/chunks/{option.CkhHTlpl.js → option.dBUWN4sF.js} +1 -1
  26. package/library/chunks/{pagination.BlQRt932.js → pagination.C2f8lUVb.js} +6 -6
  27. package/library/chunks/{position-picker.DjnhxIKF.js → position-picker.qkbJlboF.js} +12 -0
  28. package/library/chunks/{resizable-component.styles.CAfXABBc.js → resizable-component.styles.kMFDlGgv.js} +2 -2
  29. package/library/chunks/responsive.BmBJSzC4.js +17 -0
  30. package/library/chunks/{string.Demn8Xmk.js → string.CfI2ejyR.js} +3 -3
  31. package/library/chunks/{tab-group.CQfcMVEw.js → tab-group.DOnaT12G.js} +312 -310
  32. package/library/chunks/toast.D3AW3RWv.js +94 -0
  33. package/library/chunks/transformation.Dm-pK2ft.js +352 -0
  34. package/library/chunks/{tree.B7IKBX3n.js → tree.CHQ1WjZV.js} +1 -1
  35. package/library/chunks/{types.MwUT4xFk.js → types.PdpKNndx.js} +77402 -54714
  36. package/library/chunks/typography.BLYdTF0n.js +102 -0
  37. package/library/components/alert.js +2 -2
  38. package/library/components/asset-link-format.js +6 -6
  39. package/library/components/atoms.js +161 -159
  40. package/library/components/audio.js +4 -4
  41. package/library/components/bicolor-picker.js +2 -2
  42. package/library/components/border-input-group.js +2 -2
  43. package/library/components/box.d.ts +3 -0
  44. package/library/components/box.js +22 -0
  45. package/library/components/breadcrumb.js +1 -1
  46. package/library/components/button.js +4 -4
  47. package/library/components/card.js +7 -7
  48. package/library/components/checkbox.js +2 -2
  49. package/library/components/color-picker.js +36 -32
  50. package/library/components/color-swatch-group.js +8 -7
  51. package/library/components/color-swatch.js +246 -22
  52. package/library/components/confirm-popover.js +5 -5
  53. package/library/components/copy-button.js +2 -2
  54. package/library/components/corner-position-input-group.js +3 -3
  55. package/library/components/date-calendar.js +1 -1
  56. package/library/components/details.js +19 -19
  57. package/library/components/dialog.js +3 -3
  58. package/library/components/diff.js +1 -1
  59. package/library/components/document-viewer.js +5 -5
  60. package/library/components/dot-pagination.js +2 -2
  61. package/library/components/drawer.js +2 -2
  62. package/library/components/dropdown.js +2 -2
  63. package/library/components/dynamic-select.js +95 -92
  64. package/library/components/e-chart.js +1 -1
  65. package/library/components/element-clamp.js +2 -2
  66. package/library/components/file-on-demand.js +12 -12
  67. package/library/components/folder-select.js +5 -5
  68. package/library/components/format-bytes.js +1 -1
  69. package/library/components/format-date.js +1 -1
  70. package/library/components/format-number.js +1 -1
  71. package/library/components/format-time.js +1 -1
  72. package/library/components/header.js +6 -3
  73. package/library/components/icon-button.js +2 -2
  74. package/library/components/iframe.js +2 -2
  75. package/library/components/image-comparer.js +1 -1
  76. package/library/components/image.js +5 -4
  77. package/library/components/input-group.js +1 -1
  78. package/library/components/input.js +4 -4
  79. package/library/components/line-clamp.js +1 -1
  80. package/library/components/markdown.js +4 -4
  81. package/library/components/masonry.js +70 -56
  82. package/library/components/menu-item.js +2 -2
  83. package/library/components/menu.js +2 -2
  84. package/library/components/molecules.js +4 -4
  85. package/library/components/mutation-observer.js +25 -23
  86. package/library/components/option.js +2 -2
  87. package/library/components/organisms.js +2 -2
  88. package/library/components/padding-input-group.js +1 -1
  89. package/library/components/pagination.js +7 -7
  90. package/library/components/popup.js +1 -1
  91. package/library/components/position-picker.js +2 -2
  92. package/library/components/progress-bar.js +1 -1
  93. package/library/components/progress-ring.js +1 -1
  94. package/library/components/radio-button.js +1 -1
  95. package/library/components/radio-card.js +1 -1
  96. package/library/components/radio-group.js +2 -2
  97. package/library/components/range.js +3 -3
  98. package/library/components/rating.js +1 -1
  99. package/library/components/relative-time.js +1 -1
  100. package/library/components/select.js +5 -5
  101. package/library/components/shadow-input-group.js +1 -1
  102. package/library/components/share-option-list.js +3 -3
  103. package/library/components/sidebar.js +1 -1
  104. package/library/components/size-input-group.js +3 -3
  105. package/library/components/spinner.js +1 -1
  106. package/library/components/split-panel.js +1 -1
  107. package/library/components/switch.js +2 -2
  108. package/library/components/tab-group.js +6 -6
  109. package/library/components/tab-panel.js +1 -1
  110. package/library/components/tab.js +16 -16
  111. package/library/components/tag.js +2 -2
  112. package/library/components/textarea.js +2 -2
  113. package/library/components/timecode.js +2 -2
  114. package/library/components/tooltip.js +1 -1
  115. package/library/components/tree-item.js +2 -2
  116. package/library/components/tree.js +2 -2
  117. package/library/components/typeface.js +3 -3
  118. package/library/components/types.js +496 -487
  119. package/library/components/typography.js +3 -2
  120. package/library/components/video.js +5277 -5209
  121. package/library/css/ol-base.css +1 -0
  122. package/library/package.json +1 -1
  123. package/library/packages/atoms/src/components/box/box.d.ts +26 -0
  124. package/library/packages/atoms/src/components/box/box.styles.d.ts +7 -0
  125. package/library/packages/atoms/src/components/button/button.d.ts +4 -0
  126. package/library/packages/atoms/src/components/card/card.d.ts +1 -0
  127. package/library/packages/atoms/src/components/color-picker/color-picker.d.ts +11 -0
  128. package/library/packages/atoms/src/components/copy-button/copy-button.d.ts +1 -0
  129. package/library/packages/atoms/src/components/details/details.d.ts +6 -1
  130. package/library/packages/atoms/src/components/header/header.d.ts +38 -2
  131. package/library/packages/atoms/src/components/image/image.d.ts +30 -0
  132. package/library/packages/atoms/src/components/mutation-observer/mutation-observer.d.ts +1 -1
  133. package/library/packages/atoms/src/components/radio-card/radio-card.d.ts +1 -0
  134. package/library/packages/atoms/src/components/tab/tab.d.ts +17 -0
  135. package/library/packages/atoms/src/components/typography/typography.d.ts +31 -0
  136. package/library/packages/atoms/src/components/video/video.d.ts +24 -0
  137. package/library/packages/atoms/src/index.d.ts +1 -0
  138. package/library/packages/events/src/cx-asset-transformation-dialog-confirm.d.ts +2 -0
  139. package/library/packages/events/src/cx-color-swatch-picker-columns-change.d.ts +15 -0
  140. package/library/packages/events/src/events.d.ts +1 -0
  141. package/library/packages/hybrid/table-core/src/table/table.d.ts +10 -1
  142. package/library/packages/molecules/src/color-swatch/color-swatch.d.ts +35 -1
  143. package/library/packages/molecules/src/data-tab-group/data-tab-group.d.ts +30 -1
  144. package/library/packages/molecules/src/details-group/details-group.d.ts +105 -3
  145. package/library/packages/molecules/src/dynamic-select/dynamic-select.d.ts +5 -0
  146. package/library/packages/molecules/src/font-picker/font-picker.d.ts +3 -0
  147. package/library/packages/molecules/src/gallery-item/gallery-item.d.ts +10 -0
  148. package/library/packages/molecules/src/icon-picker/icon-picker.d.ts +5 -6
  149. package/library/packages/molecules/src/index.d.ts +0 -1
  150. package/library/packages/molecules/src/masonry/masonry.d.ts +5 -0
  151. package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +6 -0
  152. package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.d.ts +5 -1
  153. package/library/packages/organisms/src/color-swatch-group/color-swatch-group.constants.d.ts +37 -45
  154. package/library/packages/organisms/src/color-swatch-group/color-swatch-group.d.ts +210 -10
  155. package/library/packages/organisms/src/content-builder/blocks/font-kit-advanced/font-kit-advanced.utils.d.ts +85 -0
  156. package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +32 -9
  157. package/library/packages/organisms/src/content-builder/components/block-picker/block-picker.d.ts +24 -8
  158. package/library/packages/organisms/src/content-builder/components/color-swatch-picker/color-swatch-picker.d.ts +70 -1
  159. package/library/packages/organisms/src/content-builder/components/config-form/config-form-controller.d.ts +1 -22
  160. package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts +7 -0
  161. package/library/packages/organisms/src/content-builder/components/gallery-config/gallery-config.d.ts +6 -0
  162. package/library/packages/organisms/src/content-builder/components/gallery-picker/gallery-picker.d.ts +1 -0
  163. package/library/packages/organisms/src/content-builder/configs/accordion.d.ts +7 -0
  164. package/library/packages/organisms/src/content-builder/configs/audio.d.ts +1 -0
  165. package/library/packages/organisms/src/content-builder/configs/button.d.ts +2 -1
  166. package/library/packages/organisms/src/content-builder/configs/carousel.d.ts +11 -1
  167. package/library/packages/organisms/src/content-builder/configs/color-swatches.d.ts +19 -1
  168. package/library/packages/organisms/src/content-builder/configs/column-group.d.ts +11 -2
  169. package/library/packages/organisms/src/content-builder/configs/column.d.ts +13 -3
  170. package/library/packages/organisms/src/content-builder/configs/dam-view.d.ts +1 -0
  171. package/library/packages/organisms/src/content-builder/configs/divider.d.ts +1 -0
  172. package/library/packages/organisms/src/content-builder/configs/document-viewer.d.ts +1 -0
  173. package/library/packages/organisms/src/content-builder/configs/font-kit-advanced.d.ts +19 -0
  174. package/library/packages/organisms/src/content-builder/configs/font-kit.d.ts +2 -0
  175. package/library/packages/organisms/src/content-builder/configs/gallery.d.ts +15 -1
  176. package/library/packages/organisms/src/content-builder/configs/header.d.ts +3 -1
  177. package/library/packages/organisms/src/content-builder/configs/image.d.ts +4 -0
  178. package/library/packages/organisms/src/content-builder/configs/index.d.ts +1 -0
  179. package/library/packages/organisms/src/content-builder/configs/search-box.d.ts +5 -1
  180. package/library/packages/organisms/src/content-builder/configs/tab-group.d.ts +7 -4
  181. package/library/packages/organisms/src/content-builder/configs/timeline.d.ts +1 -0
  182. package/library/packages/organisms/src/content-builder/configs/video.d.ts +3 -0
  183. package/library/packages/organisms/src/content-builder/configs-controller.d.ts +168 -13
  184. package/library/packages/organisms/src/content-builder/content-builder-config.d.ts +60 -0
  185. package/library/packages/organisms/src/content-builder/content-builder-constants.d.ts +27 -0
  186. package/library/packages/organisms/src/content-builder/content-builder.d.ts +122 -2
  187. package/library/packages/organisms/src/content-builder/content-builder.sections.utils.d.ts +78 -0
  188. package/library/packages/organisms/src/content-builder/content-builder.utils.d.ts +33 -2
  189. package/library/packages/organisms/src/content-builder/plugins/font-kit-advanced.d.ts +5 -0
  190. package/library/packages/organisms/src/content-builder/plugins/gallery.d.ts +6 -0
  191. package/library/packages/organisms/src/content-builder/plugins/header.d.ts +7 -1
  192. package/library/packages/organisms/src/content-builder/plugins/index.d.ts +2 -1
  193. package/library/packages/organisms/src/content-builder/plugins/rich-text-editor/components/rte-bubble-menu/rte-bubble-menu.d.ts +21 -1
  194. package/library/packages/organisms/src/content-builder/plugins/rich-text-editor/extensions/index.d.ts +2 -0
  195. package/library/packages/organisms/src/content-builder/plugins/rich-text-editor/rte-configs.d.ts +14 -0
  196. package/library/packages/organisms/src/content-builder/plugins/sections/section-fragment-component.d.ts +22 -0
  197. package/library/packages/organisms/src/content-builder/plugins/sections/section-host-mounting.d.ts +15 -0
  198. package/library/packages/organisms/src/content-builder/plugins/sections/sections-canvas-patches.d.ts +20 -0
  199. package/library/packages/organisms/src/content-builder/plugins/sections/sections-plugin.d.ts +7 -0
  200. package/library/packages/organisms/src/content-builder/plugins/toolbar.d.ts +10 -1
  201. package/library/packages/organisms/src/content-builder/plugins/utils/block-width.d.ts +20 -0
  202. package/library/packages/organisms/src/content-builder/styleController.d.ts +11 -5
  203. package/library/packages/organisms/src/content-builder-viewer/content-builder-viewer.d.ts +1 -0
  204. package/library/packages/organisms/src/form/control-renderer/control-renderer.d.ts +176 -0
  205. package/library/packages/organisms/src/form/control-renderer/control-renderer.styles.d.ts +9 -0
  206. package/library/packages/organisms/src/list-editor/list-editor.d.ts +181 -6
  207. package/library/packages/tools/src/tiptap/extensions/metafield/index.d.ts +12 -0
  208. package/library/packages/tools/src/tiptap/utils/md/schema.d.ts +1 -1
  209. package/library/packages/types/src/asset-link-format.d.ts +0 -1
  210. package/library/packages/types/src/button.d.ts +1 -1
  211. package/library/packages/types/src/color-swatch-group.d.ts +56 -0
  212. package/library/packages/types/src/color-swatch.d.ts +22 -0
  213. package/library/packages/types/src/column.d.ts +13 -0
  214. package/library/packages/types/src/content-builder.d.ts +73 -4
  215. package/library/packages/types/src/details-group.d.ts +80 -0
  216. package/library/packages/types/src/font-kit-advanced.d.ts +28 -0
  217. package/library/packages/types/src/font-kit.d.ts +19 -0
  218. package/library/packages/types/src/font-picker.d.ts +2 -0
  219. package/library/packages/types/src/gallery-item.d.ts +3 -1
  220. package/library/packages/types/src/gallery.d.ts +2 -1
  221. package/library/packages/types/src/index.d.ts +1 -0
  222. package/library/packages/types/src/masonry.d.ts +1 -0
  223. package/library/packages/types/src/position-picker.d.ts +6 -0
  224. package/library/packages/types/src/sb-button.d.ts +7 -0
  225. package/library/packages/types/src/search-box.d.ts +4 -0
  226. package/library/packages/utils/src/color/color.d.ts +27 -3
  227. package/library/packages/utils/src/custom-element/i18n.d.ts +86 -0
  228. package/library/packages/utils/src/font/font.d.ts +12 -0
  229. package/library/packages/utils/src/transformation/transformation.d.ts +11 -3
  230. package/library/react-web-component.d.ts +514 -156
  231. package/library/utils.js +415 -395
  232. package/package.json +1 -1
  233. package/library/chunks/button.styles.BWgHrfLD.js +0 -5
  234. package/library/chunks/color-swatch.DdsUysbF.js +0 -223
  235. package/library/chunks/color.LzSGBy7o.js +0 -164
  236. package/library/chunks/form-control.styles.CaGWmeAS.js +0 -5
  237. package/library/chunks/index.BO_sT6SH.js +0 -20123
  238. package/library/chunks/toast.BOkYwUIj.js +0 -109
  239. package/library/chunks/transformation.B8m0Nbao.js +0 -384
  240. package/library/chunks/typography.T72DuoCa.js +0 -52
  241. package/library/packages/molecules/src/search-box/search-box.d.ts +0 -114
  242. package/library/packages/organisms/src/content-builder/plugins/wrapper-container.d.ts +0 -15
  243. /package/library/packages/{molecules/src/search-box/search-box.styles.d.ts → organisms/src/content-builder-viewer/content-builder-viewer.styles.d.ts} +0 -0
@@ -1,145 +1,146 @@
1
- import { r as Se, R as Re, H as K, a as ie, b as $e } from "./resizable-component.styles.CAfXABBc.js";
1
+ import { r as $e, R as je, H as K, a as ie, b as oe } from "./resizable-component.styles.kMFDlGgv.js";
2
2
  import { c as He } from "./component.styles.CAS3c9pM.js";
3
- import { a as Te } from "./index.Cpamj0jB.js";
4
- import { c as Ae } from "./custom-element.L4WJXn1j.js";
3
+ import { a as re } from "./index.Cpamj0jB.js";
4
+ import { P as Ae } from "./position-picker.qkbJlboF.js";
5
+ import { c as Te } from "./custom-element.L4WJXn1j.js";
5
6
  import { d as Oe } from "./debounce.DaHuiSGU.js";
6
- import { L as je } from "./i18n.rtxrs1c1.js";
7
+ import { L as Ze } from "./i18n.BSPmBQ73.js";
7
8
  import { w as M } from "./watch.DJF5K-8U.js";
8
- import { a as Ze } from "./url.CGdWC06g.js";
9
- import { i as se, E as X, x as L } from "./lit-element.jLBm65_O.js";
9
+ import { a as Ie } from "./url.CGdWC06g.js";
10
+ import { i as he, E as X, x as R } from "./lit-element.jLBm65_O.js";
10
11
  import { n as p } from "./lib-cortex-element.CVMmyPMC.js";
11
12
  import { r as E } from "./state.CSDxrqLd.js";
12
13
  import { e as G } from "./query.BBf1UFkC.js";
13
- import { e as S } from "./class-map.BiVq-cVR.js";
14
- import { o as R } 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";
14
+ import { e as L } from "./class-map.BiVq-cVR.js";
15
+ import { o as S } from "./if-defined.BRoBj_Rp.js";
16
+ import { i as Me } from "./keyed.DdOUTIg-.js";
17
+ import { o as Pe } from "./style-map.llVFPd__.js";
17
18
  import { n as A } from "./when.Dr1es41R.js";
18
- import { C as _e } from "./icon.BLXWp6CU.js";
19
- import Pe from "../components/popup.js";
19
+ import { C as Fe } from "./icon.BLXWp6CU.js";
20
+ import _e from "../components/popup.js";
20
21
  import Ne from "../components/resize-observer.js";
21
22
  import We from "../components/skeleton.js";
22
23
  import Be from "../components/space.js";
23
- var I = /* @__PURE__ */ ((i) => (i.Automatic = "automatic", i.Manual = "manual", i))(I || {});
24
+ var I = /* @__PURE__ */ ((e) => (e.Automatic = "automatic", e.Manual = "manual", e))(I || {});
24
25
  /*! medium-zoom 1.1.0 | MIT License | https://github.com/francoischalifour/medium-zoom */
25
- var $ = Object.assign || function(i) {
26
- for (var t = 1; t < arguments.length; t++) {
27
- var o = arguments[t];
28
- for (var l in o)
29
- Object.prototype.hasOwnProperty.call(o, l) && (i[l] = o[l]);
30
- }
31
- return i;
32
- }, B = function(t) {
33
- return t.tagName === "IMG";
34
- }, Fe = function(t) {
35
- return NodeList.prototype.isPrototypeOf(t);
36
- }, F = function(t) {
37
- return t && t.nodeType === 1;
38
- }, oe = function(t) {
39
- var o = t.currentSrc || t.src;
26
+ var $ = Object.assign || function(e) {
27
+ for (var i = 1; i < arguments.length; i++) {
28
+ var o = arguments[i];
29
+ for (var h in o)
30
+ Object.prototype.hasOwnProperty.call(o, h) && (e[h] = o[h]);
31
+ }
32
+ return e;
33
+ }, W = function(i) {
34
+ return i.tagName === "IMG";
35
+ }, Ue = function(i) {
36
+ return NodeList.prototype.isPrototypeOf(i);
37
+ }, B = function(i) {
38
+ return i && i.nodeType === 1;
39
+ }, ae = function(i) {
40
+ var o = i.currentSrc || i.src;
40
41
  return o.substr(-4).toLowerCase() === ".svg";
41
- }, re = function(t) {
42
+ }, ne = function(i) {
42
43
  try {
43
- return Array.isArray(t) ? t.filter(B) : Fe(t) ? [].slice.call(t).filter(B) : F(t) ? [t].filter(B) : typeof t == "string" ? [].slice.call(document.querySelectorAll(t)).filter(B) : [];
44
+ return Array.isArray(i) ? i.filter(W) : Ue(i) ? [].slice.call(i).filter(W) : B(i) ? [i].filter(W) : typeof i == "string" ? [].slice.call(document.querySelectorAll(i)).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
- }, Ue = function(t) {
50
+ }, De = function(i) {
50
51
  var o = document.createElement("div");
51
- return o.classList.add("medium-zoom-overlay"), o.style.background = t, o;
52
- }, De = function(t) {
53
- var o = t.getBoundingClientRect(), l = o.top, c = o.left, C = o.width, k = o.height, b = t.cloneNode(), U = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0, _ = window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0;
54
- return b.removeAttribute("id"), b.style.position = "absolute", b.style.top = l + U + "px", b.style.left = c + _ + "px", b.style.width = C + "px", b.style.height = k + "px", b.style.transform = "", b;
55
- }, O = function(t, o) {
56
- var l = $({
52
+ return o.classList.add("medium-zoom-overlay"), o.style.background = i, o;
53
+ }, qe = function(i) {
54
+ var o = i.getBoundingClientRect(), h = o.top, d = o.left, C = o.width, k = o.height, z = i.cloneNode(), U = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0, P = window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0;
55
+ return z.removeAttribute("id"), z.style.position = "absolute", z.style.top = h + U + "px", z.style.left = d + P + "px", z.style.width = C + "px", z.style.height = k + "px", z.style.transform = "", z;
56
+ }, T = function(i, o) {
57
+ var h = $({
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, l);
63
- var c = document.createEvent("CustomEvent");
64
- return c.initCustomEvent(t, l.bubbles, l.cancelable, l.detail), c;
65
- }, qe = function i(t) {
66
- var o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, l = window.Promise || function(r) {
67
- function a() {
63
+ return new CustomEvent(i, h);
64
+ var d = document.createEvent("CustomEvent");
65
+ return d.initCustomEvent(i, h.bubbles, h.cancelable, h.detail), d;
66
+ }, Ve = function e(i) {
67
+ var o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, h = window.Promise || function(r) {
68
+ function n() {
68
69
  }
69
- r(a, a);
70
- }, c = function(r) {
71
- var a = r.target;
72
- if (a === N) {
70
+ r(n, n);
71
+ }, d = function(r) {
72
+ var n = r.target;
73
+ if (n === _) {
73
74
  x();
74
75
  return;
75
76
  }
76
- y.indexOf(a) !== -1 && Q({ target: a });
77
+ y.indexOf(n) !== -1 && Q({ target: n });
77
78
  }, C = function() {
78
- if (!(H || !e.original)) {
79
+ if (!(j || !t.original)) {
79
80
  var r = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
80
- Math.abs(ee - r) > d.scrollOffset && setTimeout(x, 150);
81
+ Math.abs(ee - r) > c.scrollOffset && setTimeout(x, 150);
81
82
  }
82
83
  }, k = function(r) {
83
- var a = r.key || r.keyCode;
84
- (a === "Escape" || a === "Esc" || a === 27) && x();
85
- }, b = function() {
86
- var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, a = r;
87
- if (r.background && (N.style.background = r.background), r.container && r.container instanceof Object && (a.container = $({}, d.container, r.container)), r.template) {
88
- var m = F(r.template) ? r.template : document.querySelector(r.template);
89
- a.template = m;
84
+ var n = r.key || r.keyCode;
85
+ (n === "Escape" || n === "Esc" || n === 27) && x();
86
+ }, z = function() {
87
+ var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = r;
88
+ if (r.background && (_.style.background = r.background), r.container && r.container instanceof Object && (n.container = $({}, c.container, r.container)), r.template) {
89
+ var m = B(r.template) ? r.template : document.querySelector(r.template);
90
+ n.template = m;
90
91
  }
91
- return d = $({}, d, a), y.forEach(function(g) {
92
- g.dispatchEvent(O("medium-zoom:update", {
92
+ return c = $({}, c, n), y.forEach(function(g) {
93
+ g.dispatchEvent(T("medium-zoom:update", {
93
94
  detail: { zoom: u }
94
95
  }));
95
96
  }), u;
96
97
  }, U = function() {
97
98
  var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
98
- return i($({}, d, r));
99
- }, _ = function() {
100
- for (var r = arguments.length, a = Array(r), m = 0; m < r; m++)
101
- a[m] = arguments[m];
102
- var g = a.reduce(function(s, v) {
103
- return [].concat(s, re(v));
99
+ return e($({}, c, r));
100
+ }, P = function() {
101
+ for (var r = arguments.length, n = Array(r), m = 0; m < r; m++)
102
+ n[m] = arguments[m];
103
+ var g = n.reduce(function(s, v) {
104
+ return [].concat(s, ne(v));
104
105
  }, []);
105
106
  return g.filter(function(s) {
106
107
  return y.indexOf(s) === -1;
107
108
  }).forEach(function(s) {
108
109
  y.push(s), s.classList.add("medium-zoom-image");
109
- }), P.forEach(function(s) {
110
- var v = s.type, z = s.listener, T = s.options;
110
+ }), F.forEach(function(s) {
111
+ var v = s.type, b = s.listener, H = s.options;
111
112
  g.forEach(function(w) {
112
- w.addEventListener(v, z, T);
113
+ w.addEventListener(v, b, H);
113
114
  });
114
115
  }), u;
115
- }, de = function() {
116
- for (var r = arguments.length, a = Array(r), m = 0; m < r; m++)
117
- a[m] = arguments[m];
118
- e.zoomed && x();
119
- var g = a.length > 0 ? a.reduce(function(s, v) {
120
- return [].concat(s, re(v));
116
+ }, me = function() {
117
+ for (var r = arguments.length, n = Array(r), m = 0; m < r; m++)
118
+ n[m] = arguments[m];
119
+ t.zoomed && x();
120
+ var g = n.length > 0 ? n.reduce(function(s, v) {
121
+ return [].concat(s, ne(v));
121
122
  }, []) : y;
122
123
  return g.forEach(function(s) {
123
- s.classList.remove("medium-zoom-image"), s.dispatchEvent(O("medium-zoom:detach", {
124
+ s.classList.remove("medium-zoom-image"), s.dispatchEvent(T("medium-zoom:detach", {
124
125
  detail: { zoom: u }
125
126
  }));
126
127
  }), y = y.filter(function(s) {
127
128
  return g.indexOf(s) === -1;
128
129
  }), u;
129
- }, ce = function(r, a) {
130
+ }, ge = function(r, n) {
130
131
  var m = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
131
132
  return y.forEach(function(g) {
132
- g.addEventListener("medium-zoom:" + r, a, m);
133
- }), P.push({ type: "medium-zoom:" + r, listener: a, options: m }), u;
134
- }, me = function(r, a) {
133
+ g.addEventListener("medium-zoom:" + r, n, m);
134
+ }), F.push({ type: "medium-zoom:" + r, listener: n, options: m }), u;
135
+ }, ue = function(r, n) {
135
136
  var m = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
136
137
  return y.forEach(function(g) {
137
- g.removeEventListener("medium-zoom:" + r, a, m);
138
- }), P = P.filter(function(g) {
139
- return !(g.type === "medium-zoom:" + r && g.listener.toString() === a.toString());
138
+ g.removeEventListener("medium-zoom:" + r, n, m);
139
+ }), F = F.filter(function(g) {
140
+ return !(g.type === "medium-zoom:" + r && g.listener.toString() === n.toString());
140
141
  }), u;
141
142
  }, J = function() {
142
- var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, a = r.target, m = function() {
143
+ var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = r.target, m = function() {
143
144
  var s = {
144
145
  width: document.documentElement.clientWidth,
145
146
  height: document.documentElement.clientHeight,
@@ -147,136 +148,136 @@ See: https://github.com/francoischalifour/medium-zoom`);
147
148
  top: 0,
148
149
  right: 0,
149
150
  bottom: 0
150
- }, v = void 0, z = void 0;
151
- if (d.container)
152
- if (d.container instanceof Object)
153
- s = $({}, s, d.container), v = s.width - s.left - s.right - d.margin * 2, z = s.height - s.top - s.bottom - d.margin * 2;
151
+ }, v = void 0, b = void 0;
152
+ if (c.container)
153
+ if (c.container instanceof Object)
154
+ s = $({}, s, c.container), v = s.width - s.left - s.right - c.margin * 2, b = s.height - s.top - s.bottom - c.margin * 2;
154
155
  else {
155
- var T = F(d.container) ? d.container : document.querySelector(d.container), w = T.getBoundingClientRect(), D = w.width, fe = w.height, ve = w.left, ye = w.top;
156
+ var H = B(c.container) ? c.container : document.querySelector(c.container), w = H.getBoundingClientRect(), D = w.width, ye = w.height, be = w.left, ze = w.top;
156
157
  s = $({}, s, {
157
158
  width: D,
158
- height: fe,
159
- left: ve,
160
- top: ye
159
+ height: ye,
160
+ left: be,
161
+ top: ze
161
162
  });
162
163
  }
163
- v = v || s.width - d.margin * 2, z = z || s.height - d.margin * 2;
164
- var Z = e.zoomedHd || e.original, ze = oe(Z) ? v : Z.naturalWidth || v, be = oe(Z) ? z : Z.naturalHeight || z, W = Z.getBoundingClientRect(), xe = W.top, we = W.left, q = W.width, Y = W.height, Ee = Math.min(Math.max(q, ze), v) / q, Ce = Math.min(Math.max(Y, be), z) / Y, V = Math.min(Ee, Ce), ke = (-we + (v - q) / 2 + d.margin + s.left) / V, Le = (-xe + (z - Y) / 2 + d.margin + s.top) / V, te = "scale(" + V + ") translate3d(" + ke + "px, " + Le + "px, 0)";
165
- e.zoomed.style.transform = te, e.zoomedHd && (e.zoomedHd.style.transform = te);
164
+ v = v || s.width - c.margin * 2, b = b || s.height - c.margin * 2;
165
+ var Z = t.zoomedHd || t.original, xe = ae(Z) ? v : Z.naturalWidth || v, we = ae(Z) ? b : Z.naturalHeight || b, N = Z.getBoundingClientRect(), Ee = N.top, Ce = N.left, q = N.width, V = N.height, ke = Math.min(Math.max(q, xe), v) / q, Re = Math.min(Math.max(V, we), b) / V, Y = Math.min(ke, Re), Le = (-Ce + (v - q) / 2 + c.margin + s.left) / Y, Se = (-Ee + (b - V) / 2 + c.margin + s.top) / Y, te = "scale(" + Y + ") translate3d(" + Le + "px, " + Se + "px, 0)";
166
+ t.zoomed.style.transform = te, t.zoomedHd && (t.zoomedHd.style.transform = te);
166
167
  };
167
- return new l(function(g) {
168
- if (a && y.indexOf(a) === -1) {
168
+ return new h(function(g) {
169
+ if (n && y.indexOf(n) === -1) {
169
170
  g(u);
170
171
  return;
171
172
  }
172
173
  var s = function D() {
173
- H = !1, e.zoomed.removeEventListener("transitionend", D), e.original.dispatchEvent(O("medium-zoom:opened", {
174
+ j = !1, t.zoomed.removeEventListener("transitionend", D), t.original.dispatchEvent(T("medium-zoom:opened", {
174
175
  detail: { zoom: u }
175
176
  })), g(u);
176
177
  };
177
- if (e.zoomed) {
178
+ if (t.zoomed) {
178
179
  g(u);
179
180
  return;
180
181
  }
181
- if (a)
182
- e.original = a;
182
+ if (n)
183
+ t.original = n;
183
184
  else if (y.length > 0) {
184
185
  var v = y;
185
- e.original = v[0];
186
+ t.original = v[0];
186
187
  } else {
187
188
  g(u);
188
189
  return;
189
190
  }
190
- if (e.original.dispatchEvent(O("medium-zoom:open", {
191
+ if (t.original.dispatchEvent(T("medium-zoom:open", {
191
192
  detail: { zoom: u }
192
- })), ee = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0, H = !0, e.zoomed = De(e.original), document.body.appendChild(N), d.template) {
193
- var z = F(d.template) ? d.template : document.querySelector(d.template);
194
- e.template = document.createElement("div"), e.template.appendChild(z.content.cloneNode(!0)), document.body.appendChild(e.template);
193
+ })), ee = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0, j = !0, t.zoomed = qe(t.original), document.body.appendChild(_), c.template) {
194
+ var b = B(c.template) ? c.template : document.querySelector(c.template);
195
+ t.template = document.createElement("div"), t.template.appendChild(b.content.cloneNode(!0)), document.body.appendChild(t.template);
195
196
  }
196
- 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
+ if (t.original.parentElement && t.original.parentElement.tagName === "PICTURE" && t.original.currentSrc && (t.zoomed.src = t.original.currentSrc), document.body.appendChild(t.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", s), e.original.getAttribute("data-zoom-src")) {
199
- 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
- clearInterval(T), console.warn("Unable to reach the zoom image target " + e.zoomedHd.src), e.zoomedHd = null, m();
199
+ }), t.original.classList.add("medium-zoom-image--hidden"), t.zoomed.classList.add("medium-zoom-image--opened"), t.zoomed.addEventListener("click", x), t.zoomed.addEventListener("transitionend", s), t.original.getAttribute("data-zoom-src")) {
200
+ t.zoomedHd = t.zoomed.cloneNode(), t.zoomedHd.removeAttribute("srcset"), t.zoomedHd.removeAttribute("sizes"), t.zoomedHd.removeAttribute("loading"), t.zoomedHd.src = t.zoomed.getAttribute("data-zoom-src"), t.zoomedHd.onerror = function() {
201
+ clearInterval(H), console.warn("Unable to reach the zoom image target " + t.zoomedHd.src), t.zoomedHd = null, m();
201
202
  };
202
- var T = setInterval(function() {
203
- e.zoomedHd.complete && (clearInterval(T), e.zoomedHd.classList.add("medium-zoom-image--opened"), e.zoomedHd.addEventListener("click", x), document.body.appendChild(e.zoomedHd), m());
203
+ var H = setInterval(function() {
204
+ t.zoomedHd.complete && (clearInterval(H), t.zoomedHd.classList.add("medium-zoom-image--opened"), t.zoomedHd.addEventListener("click", x), document.body.appendChild(t.zoomedHd), m());
204
205
  }, 10);
205
- } else if (e.original.hasAttribute("srcset")) {
206
- e.zoomedHd = e.zoomed.cloneNode(), e.zoomedHd.removeAttribute("sizes"), e.zoomedHd.removeAttribute("loading");
207
- var w = e.zoomedHd.addEventListener("load", function() {
208
- e.zoomedHd.removeEventListener("load", w), e.zoomedHd.classList.add("medium-zoom-image--opened"), e.zoomedHd.addEventListener("click", x), document.body.appendChild(e.zoomedHd), m();
206
+ } else if (t.original.hasAttribute("srcset")) {
207
+ t.zoomedHd = t.zoomed.cloneNode(), t.zoomedHd.removeAttribute("sizes"), t.zoomedHd.removeAttribute("loading");
208
+ var w = t.zoomedHd.addEventListener("load", function() {
209
+ t.zoomedHd.removeEventListener("load", w), t.zoomedHd.classList.add("medium-zoom-image--opened"), t.zoomedHd.addEventListener("click", x), document.body.appendChild(t.zoomedHd), m();
209
210
  });
210
211
  } else
211
212
  m();
212
213
  });
213
214
  }, x = function() {
214
- return new l(function(r) {
215
- if (H || !e.original) {
215
+ return new h(function(r) {
216
+ if (j || !t.original) {
216
217
  r(u);
217
218
  return;
218
219
  }
219
- var a = function m() {
220
- e.original.classList.remove("medium-zoom-image--hidden"), document.body.removeChild(e.zoomed), e.zoomedHd && document.body.removeChild(e.zoomedHd), document.body.removeChild(N), 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(O("medium-zoom:closed", {
220
+ var n = function m() {
221
+ t.original.classList.remove("medium-zoom-image--hidden"), document.body.removeChild(t.zoomed), t.zoomedHd && document.body.removeChild(t.zoomedHd), document.body.removeChild(_), t.zoomed.classList.remove("medium-zoom-image--opened"), t.template && document.body.removeChild(t.template), j = !1, t.zoomed.removeEventListener("transitionend", m), t.original.dispatchEvent(T("medium-zoom:closed", {
221
222
  detail: { zoom: u }
222
- })), e.original = null, e.zoomed = null, e.zoomedHd = null, e.template = null, r(u);
223
+ })), t.original = null, t.zoomed = null, t.zoomedHd = null, t.template = null, r(u);
223
224
  };
224
- 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(O("medium-zoom:close", {
225
+ j = !0, document.body.classList.remove("medium-zoom--opened"), t.zoomed.style.transform = "", t.zoomedHd && (t.zoomedHd.style.transform = ""), t.template && (t.template.style.transition = "opacity 150ms", t.template.style.opacity = 0), t.original.dispatchEvent(T("medium-zoom:close", {
225
226
  detail: { zoom: u }
226
- })), e.zoomed.addEventListener("transitionend", a);
227
+ })), t.zoomed.addEventListener("transitionend", n);
227
228
  });
228
229
  }, Q = function() {
229
- var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, a = r.target;
230
- return e.original ? x() : J({ target: a });
231
- }, ge = function() {
232
- return d;
233
- }, ue = function() {
234
- return y;
230
+ var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = r.target;
231
+ return t.original ? x() : J({ target: n });
235
232
  }, pe = function() {
236
- return e.original;
237
- }, y = [], P = [], H = !1, ee = 0, d = o, e = {
233
+ return c;
234
+ }, fe = function() {
235
+ return y;
236
+ }, ve = function() {
237
+ return t.original;
238
+ }, y = [], F = [], j = !1, ee = 0, c = o, t = {
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") && _(t), d = $({
245
+ Object.prototype.toString.call(i) === "[object Object]" ? c = i : (i || typeof i == "string") && P(i), c = $({
245
246
  margin: 0,
246
247
  background: "#fff",
247
248
  scrollOffset: 40,
248
249
  container: null,
249
250
  template: null
250
- }, d);
251
- var N = Ue(d.background);
252
- document.addEventListener("click", c), document.addEventListener("keyup", k), document.addEventListener("scroll", C), window.addEventListener("resize", x);
251
+ }, c);
252
+ var _ = De(c.background);
253
+ document.addEventListener("click", d), document.addEventListener("keyup", k), document.addEventListener("scroll", C), window.addEventListener("resize", x);
253
254
  var u = {
254
255
  open: J,
255
256
  close: x,
256
257
  toggle: Q,
257
- update: b,
258
+ update: z,
258
259
  clone: U,
259
- attach: _,
260
- detach: de,
261
- on: ce,
262
- off: me,
263
- getOptions: ge,
264
- getImages: ue,
265
- getZoomedImage: pe
260
+ attach: P,
261
+ detach: me,
262
+ on: ge,
263
+ off: ue,
264
+ getOptions: pe,
265
+ getImages: fe,
266
+ getZoomedImage: ve
266
267
  };
267
268
  return u;
268
269
  };
269
- function Ye(i, t) {
270
- t === void 0 && (t = {});
271
- var o = t.insertAt;
270
+ function Ye(e, i) {
271
+ i === void 0 && (i = {});
272
+ var o = i.insertAt;
272
273
  if (!(typeof document > "u")) {
273
- var l = document.head || document.getElementsByTagName("head")[0], c = document.createElement("style");
274
- c.type = "text/css", o === "top" && l.firstChild ? l.insertBefore(c, l.firstChild) : l.appendChild(c), c.styleSheet ? c.styleSheet.cssText = i : c.appendChild(document.createTextNode(i));
274
+ var h = document.head || document.getElementsByTagName("head")[0], d = document.createElement("style");
275
+ d.type = "text/css", o === "top" && h.firstChild ? h.insertBefore(d, h.firstChild) : h.appendChild(d), d.styleSheet ? d.styleSheet.cssText = e : d.appendChild(document.createTextNode(e));
275
276
  }
276
277
  }
277
- var Ve = ".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}";
278
- Ye(Ve);
279
- const Ke = 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))}:host([effect=zoom][zoom-style=pop-out]){overflow-clip-margin:var(--column-padding,10px);overflow:clip}.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)}`, Xe = se`
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
+ Ye(Ke);
280
+ const Xe = he`: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))}:host([effect=zoom][zoom-style=pop-out]){overflow-clip-margin:var(--column-padding,10px);overflow:clip}.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 = he`
280
281
  :host {
281
282
  --justify-content: flex-start;
282
283
  --border-radius: 0px;
@@ -330,7 +331,7 @@ const Ke = se`:host([effect=jump]) .container,:host([effect=text-reveal]) .conta
330
331
  max-height: 100%;
331
332
  }
332
333
 
333
- ${Ke}
334
+ ${Xe}
334
335
 
335
336
  :host([block]) {
336
337
  width: 100%;
@@ -404,6 +405,19 @@ const Ke = se`:host([effect=jump]) .container,:host([effect=text-reveal]) .conta
404
405
  outline: none;
405
406
  }
406
407
 
408
+ .highlighter--loading-ratio {
409
+ aspect-ratio: var(--image-loading-aspect-ratio);
410
+ height: auto;
411
+ min-height: 0;
412
+ }
413
+
414
+ /* Jump/Zoom put the image in the popup's anchor slot; its host is display: contents. */
415
+ .highlighter--loading-ratio > .highlightable-item,
416
+ .highlighter--loading-ratio > .popup-container > .highlightable-item[slot='anchor'] {
417
+ position: absolute;
418
+ inset: 0;
419
+ }
420
+
407
421
  .highlighter--centered {
408
422
  display: flex;
409
423
  justify-content: center;
@@ -424,6 +438,56 @@ const Ke = se`:host([effect=jump]) .container,:host([effect=text-reveal]) .conta
424
438
  cursor: pointer;
425
439
  }
426
440
 
441
+ /**
442
+ * Only used under object-fit: contain, where the image shrinks to fit and object-position
443
+ * has no free space to shift content within the <img> box — so the focal point is applied
444
+ * by aligning the <img> itself within this flex parent instead.
445
+ */
446
+ .highlightable-item--crop-focus-top-left {
447
+ align-items: flex-start;
448
+ justify-content: flex-start;
449
+ }
450
+
451
+ .highlightable-item--crop-focus-top-center {
452
+ align-items: flex-start;
453
+ justify-content: center;
454
+ }
455
+
456
+ .highlightable-item--crop-focus-top-right {
457
+ align-items: flex-start;
458
+ justify-content: flex-end;
459
+ }
460
+
461
+ .highlightable-item--crop-focus-center-left {
462
+ align-items: center;
463
+ justify-content: flex-start;
464
+ }
465
+
466
+ .highlightable-item--crop-focus-center-center {
467
+ align-items: center;
468
+ justify-content: center;
469
+ }
470
+
471
+ .highlightable-item--crop-focus-center-right {
472
+ align-items: center;
473
+ justify-content: flex-end;
474
+ }
475
+
476
+ .highlightable-item--crop-focus-bottom-left {
477
+ align-items: flex-end;
478
+ justify-content: flex-start;
479
+ }
480
+
481
+ .highlightable-item--crop-focus-bottom-center {
482
+ align-items: flex-end;
483
+ justify-content: center;
484
+ }
485
+
486
+ .highlightable-item--crop-focus-bottom-right {
487
+ align-items: flex-end;
488
+ justify-content: flex-end;
489
+ }
490
+
427
491
  .image {
428
492
  border-radius: var(--border-radius);
429
493
  border: var(--border) solid;
@@ -455,6 +519,42 @@ const Ke = se`:host([effect=jump]) .container,:host([effect=text-reveal]) .conta
455
519
  object-fit: scale-down;
456
520
  }
457
521
 
522
+ .image--crop-focus-top-left {
523
+ object-position: left top;
524
+ }
525
+
526
+ .image--crop-focus-top-center {
527
+ object-position: center top;
528
+ }
529
+
530
+ .image--crop-focus-top-right {
531
+ object-position: right top;
532
+ }
533
+
534
+ .image--crop-focus-center-left {
535
+ object-position: left center;
536
+ }
537
+
538
+ .image--crop-focus-center-center {
539
+ object-position: center center;
540
+ }
541
+
542
+ .image--crop-focus-center-right {
543
+ object-position: right center;
544
+ }
545
+
546
+ .image--crop-focus-bottom-left {
547
+ object-position: left bottom;
548
+ }
549
+
550
+ .image--crop-focus-bottom-center {
551
+ object-position: center bottom;
552
+ }
553
+
554
+ .image--crop-focus-bottom-right {
555
+ object-position: right bottom;
556
+ }
557
+
458
558
  .image--hidden {
459
559
  display: none;
460
560
  }
@@ -468,13 +568,13 @@ const Ke = se`:host([effect=jump]) .container,:host([effect=text-reveal]) .conta
468
568
  }
469
569
 
470
570
  .image--contain.image--landscape {
471
- width: 100%;
571
+ width: var(--image-contain-fill, 100%);
472
572
  height: auto;
473
573
  }
474
574
 
475
575
  .image--contain.image--portrait {
476
576
  width: auto;
477
- height: 100%;
577
+ height: var(--image-contain-fill, 100%);
478
578
  }
479
579
 
480
580
  .popup-container::part(popup) {
@@ -535,16 +635,16 @@ const Ke = se`:host([effect=jump]) .container,:host([effect=text-reveal]) .conta
535
635
  color: var(--fallback-icon-color);
536
636
  }
537
637
  `;
538
- var Ge = Object.defineProperty, Je = Object.getOwnPropertyDescriptor, le = (i) => {
539
- throw TypeError(i);
540
- }, h = (i, t, o, l) => {
541
- for (var c = l > 1 ? void 0 : l ? Je(t, o) : t, C = i.length - 1, k; C >= 0; C--)
542
- (k = i[C]) && (c = (l ? k(t, o, c) : k(c)) || c);
543
- return l && c && Ge(t, o, c), c;
544
- }, 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)), Qe = (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, l) => (he(i, t, "write to private field"), t.set(i, o), o), j;
545
- let n = class extends Re {
638
+ var Je = Object.defineProperty, Qe = Object.getOwnPropertyDescriptor, ce = (e) => {
639
+ throw TypeError(e);
640
+ }, l = (e, i, o, h) => {
641
+ for (var d = h > 1 ? void 0 : h ? Qe(i, o) : i, C = e.length - 1, k; C >= 0; C--)
642
+ (k = e[C]) && (d = (h ? k(i, o, d) : k(d)) || d);
643
+ return h && d && Je(i, o, d), d;
644
+ }, de = (e, i, o) => i.has(e) || ce("Cannot " + o), se = (e, i, o) => (de(e, i, "read from private field"), o ? o.call(e) : i.get(e)), et = (e, i, o) => i.has(e) ? ce("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(e) : i.set(e, o), le = (e, i, o, h) => (de(e, i, "write to private field"), i.set(e, o), o), O;
645
+ let a = class extends je {
546
646
  constructor() {
547
- 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.srcset = "", this.sizes = "", 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.noCrossorigin = !1, this.clickHandlerType = I.Automatic, this.retryOnError = !1, this.maxRetries = 10, this.isZoomed = !1, this.imageRatio = 1, this.parsedAlt = "", this.parsedAltDarkMode = "", this.zoom = null, this.lastPatchedWidth = null, Qe(this, j, "");
647
+ super(...arguments), this.localize = new Ze(this), this.retryCount = 0, this.retryTimer = null, this.isLoaded = !1, this.isError = !1, this.isRetrying = !1, this.retryIndex = 0, this.src = "", this.aspectRatio = 0, this.srcset = "", this.sizes = "", this.placeholder = "", this.alt = "", this.objectFit = re.Fill, this.cropFocus = Ae.CenterCenter, this.skeleton = !1, this.fallback = !1, this.canZoom = !1, this.loading = !1, this.block = !1, this.htmlLoading = "lazy", this.noCrossorigin = !1, this.clickHandlerType = I.Automatic, this.retryOnError = !1, this.maxRetries = 10, this.isZoomed = !1, this.imageRatio = 1, this.parsedAlt = "", this.parsedAltDarkMode = "", this.zoom = null, this.lastPatchedWidth = null, et(this, O, "");
548
648
  }
549
649
  get currentAltValue() {
550
650
  return this.alt;
@@ -558,21 +658,44 @@ let n = class extends Re {
558
658
  get highlighterRole() {
559
659
  return this.hasZoomAction && this.clickHandlerType === I.Automatic ? "button" : "img";
560
660
  }
661
+ /**
662
+ * `object-position` only shifts content already stretched to fill the `<img>` box, so
663
+ * under `contain` (where the image shrinks to fit and never fills that box on both axes)
664
+ * the focal point must instead be applied by aligning the `<img>` within this flex parent.
665
+ */
666
+ get highlighterCropFocusClass() {
667
+ return this.objectFit === re.Contain ? { [`highlightable-item--crop-focus-${this.cropFocus}`]: !0 } : {};
668
+ }
561
669
  get highlighterClass() {
562
670
  return {
563
671
  "highlightable-item": !0,
564
672
  "highlightable-item--effect-text-reveal": this.effect === K.TextReveal,
565
- [`highlightable-item--text-reveal-style-${this.textRevealStyle}`]: !0
673
+ [`highlightable-item--text-reveal-style-${this.textRevealStyle}`]: !0,
674
+ ...this.highlighterCropFocusClass
675
+ };
676
+ }
677
+ get currentAspectRatio() {
678
+ return this.aspectRatio;
679
+ }
680
+ get loadingAspectRatio() {
681
+ const e = this.currentAspectRatio;
682
+ return this.heightMode === ie.Auto && !this.isLoaded && !this.isEmpty && Number.isFinite(e) && e > 0 ? e : void 0;
683
+ }
684
+ getHighlighterClass(e = !1) {
685
+ return {
686
+ ...super.getHighlighterClass(e),
687
+ "highlighter--loading-ratio": this.loadingAspectRatio !== void 0
566
688
  };
567
689
  }
568
690
  get imageClass() {
569
- let i = "landscape", t = this.ratio;
570
- const o = this.width.endsWith("%") ? this.clientWidth : Number.parseFloat(this.width), l = this.isResizing ? this.resizeSize.width : o, c = this.isResizing ? this.resizeSize.height : Number.parseFloat(this.height);
571
- return l && c && (t = l / c), t > this.imageRatio && (i = "portrait"), {
691
+ let e = "landscape", i = this.ratio;
692
+ const o = this.width.endsWith("%") ? this.clientWidth : Number.parseFloat(this.width), h = this.isResizing ? this.resizeSize.width : o, d = this.isResizing ? this.resizeSize.height : Number.parseFloat(this.height);
693
+ return h && d && (i = h / d), i > this.imageRatio && (e = "portrait"), {
572
694
  image: !0,
573
695
  [`image--${this.objectFit}`]: !0,
574
- [`image--${i}`]: !0,
696
+ [`image--${e}`]: !0,
575
697
  [`image--height-${this.heightMode}`]: !0,
698
+ [`image--crop-focus-${this.cropFocus}`]: !0,
576
699
  "image--can-zoom": this.canZoom,
577
700
  "image--has-action": this.hasZoomAction,
578
701
  "image--hidden": this.isEmpty || this.isError || this.isRetrying
@@ -630,8 +753,8 @@ let n = class extends Re {
630
753
  handleBlur() {
631
754
  this.isZoomed && this.zoom?.close();
632
755
  }
633
- handleKeyDown(i) {
634
- i.target === this.highlighterElement && (i.key === "Enter" || i.key === " ") && (i.preventDefault(), this.highlighterElement.click());
756
+ handleKeyDown(e) {
757
+ e.target === this.highlighterElement && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.highlighterElement.click());
635
758
  }
636
759
  async handleCanZoomChange() {
637
760
  await this.updateComplete, this.hasZoomAction ? this.initZoom() : (this.zoom?.detach(), this.zoom = null);
@@ -640,23 +763,23 @@ let n = class extends Re {
640
763
  await this.updateComplete, this.requestUpdate();
641
764
  }
642
765
  handleSrcChange() {
643
- this.isLoaded = !1, this.isError = !1, this.isRetrying = !1, this.retryCount = 0, this.retryIndex = 0, ne(this, j, ""), this.clearRetryTimer();
766
+ this.isLoaded = !1, this.isError = !1, this.isRetrying = !1, this.retryCount = 0, this.retryIndex = 0, le(this, O, ""), this.clearRetryTimer();
644
767
  }
645
768
  clearRetryTimer() {
646
769
  this.retryTimer !== null && (clearTimeout(this.retryTimer), this.retryTimer = null);
647
770
  }
648
771
  scheduleRetry() {
649
- const i = Math.min(1e3 * Math.pow(2, this.retryCount - 1), 1e4);
772
+ const e = Math.min(1e3 * Math.pow(2, this.retryCount - 1), 1e4);
650
773
  this.retryTimer = setTimeout(() => {
651
- this.retryTimer = null, ne(this, j, `${this.retryCount}-${Math.random().toString(36).slice(2)}`), this.retryIndex += 1;
652
- }, i);
774
+ this.retryTimer = null, le(this, O, `${this.retryCount}-${Math.random().toString(36).slice(2)}`), this.retryIndex += 1;
775
+ }, e);
653
776
  }
654
777
  /** 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. */
655
- applyRetryCacheBust(i) {
656
- return this.retryIndex === 0 || !ae(this, j) || !i ? i : Ze(i, "cachebust", ae(this, j));
778
+ applyRetryCacheBust(e) {
779
+ return this.retryIndex === 0 || !se(this, O) || !e ? e : Ie(e, "cachebust", se(this, O));
657
780
  }
658
781
  async initZoom() {
659
- this.zoomImageElement && !this.zoom && this.isLoaded && (this.zoom = qe(this.zoomImageElement, {
782
+ this.zoomImageElement && !this.zoom && this.isLoaded && (this.zoom = Ve(this.zoomImageElement, {
660
783
  background: "light-dark(rgba(255, 255, 255, 0.8), rgba(0, 0, 0, 0.8))",
661
784
  margin: 0,
662
785
  scrollOffset: 0
@@ -666,12 +789,12 @@ let n = class extends Re {
666
789
  this.emit("cx-image-zoom-close"), this.isZoomed = !1;
667
790
  }));
668
791
  }
669
- handleLoad(i) {
670
- const t = i?.currentTarget ?? this.imageElement;
671
- if (!t)
792
+ handleLoad(e) {
793
+ const i = e?.currentTarget ?? this.imageElement;
794
+ if (!i)
672
795
  return;
673
- const { naturalHeight: o, naturalWidth: l } = t;
674
- this.imageRatio = l / o, this.clearRetryTimer(), this.retryCount = 0, this.isRetrying = !1, this.isLoaded || this.emit("cx-load"), this.isLoaded = !0, this.isError = !1;
796
+ const { naturalHeight: o, naturalWidth: h } = i;
797
+ this.imageRatio = h / o, this.clearRetryTimer(), this.retryCount = 0, this.isRetrying = !1, this.isLoaded || this.emit("cx-load"), this.isLoaded = !0, this.isError = !1;
675
798
  }
676
799
  handleError() {
677
800
  if (this.retryOnError && this.retryCount < this.maxRetries) {
@@ -681,178 +804,186 @@ let n = class extends Re {
681
804
  this.isRetrying = !1, this.emit("cx-error"), this.isLoaded = !0, this.isError = !0;
682
805
  }
683
806
  handleSizeChange() {
684
- const i = this.resizeDirection !== ie.Vertical, t = this.resizeDirection !== ie.Horizontal, o = this.isResizing ? `${this.resizeSize.width}px` : this.width, l = this.isResizing ? `${this.resizeSize.height}px` : this.height;
685
- 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", l) : this.style.removeProperty("--height"));
807
+ const e = this.resizeDirection !== oe.Vertical, i = this.resizeDirection !== oe.Horizontal, o = this.isResizing ? `${this.resizeSize.width}px` : this.width, h = this.isResizing ? `${this.resizeSize.height}px` : this.height;
808
+ e && (this.width || this.isResizing ? this.style.setProperty("--width", o) : this.style.removeProperty("--width")), i && (this.heightMode !== ie.Auto && (this.height || this.isResizing) ? this.style.setProperty("--height", h) : this.style.removeProperty("--height"));
686
809
  }
687
- handleResize(i) {
688
- const { entries: t } = i.detail;
689
- for (const o of t)
810
+ handleResize(e) {
811
+ const { entries: i } = e.detail;
812
+ for (const o of i)
690
813
  o.target === this.highlighterElement && this.width.endsWith("%") && !this.isResizing && Math.abs(o.contentRect.width - (this.lastPatchedWidth ?? 0)) > 1 && this.updateLastPatchedWidth(o.contentRect.width);
691
814
  }
692
- updateLastPatchedWidth(i) {
693
- this.lastPatchedWidth = i, this.requestUpdate();
815
+ updateLastPatchedWidth(e) {
816
+ this.lastPatchedWidth = e, this.requestUpdate();
694
817
  }
695
818
  /**
696
819
  * Support CMS5 click action for the image.
697
820
  */
698
- handleClickAction(i) {
699
- !(i.target instanceof HTMLElement) || this.clickHandlerType === I.Manual || this.canZoom && this.openZoom();
821
+ handleClickAction(e) {
822
+ !(e.target instanceof HTMLElement) || this.clickHandlerType === I.Manual || this.canZoom && this.openZoom();
700
823
  }
701
- updated(i) {
702
- super.updated(i), (i.has("width") || i.has("height") || i.has("heightMode") || i.has("resizeSize")) && this.handleSizeChange();
824
+ updated(e) {
825
+ super.updated(e);
826
+ const i = this.loadingAspectRatio;
827
+ i !== void 0 ? this.style.setProperty("--image-loading-aspect-ratio", String(i)) : this.style.removeProperty("--image-loading-aspect-ratio"), (e.has("width") || e.has("height") || e.has("heightMode") || e.has("resizeSize")) && this.handleSizeChange();
703
828
  }
704
829
  openZoom() {
705
830
  this.zoom && this.zoom.open();
706
831
  }
707
832
  renderContent() {
708
- const i = this.applyRetryCacheBust(this.currentSrc), t = this.currentAltValue;
833
+ const e = this.applyRetryCacheBust(this.currentSrc), i = this.currentAltValue;
709
834
  if (this.retryOnError) {
710
835
  if (this.isError && this.retryCount >= this.maxRetries)
711
836
  return X;
712
837
  } else if (this.isError)
713
838
  return X;
714
- return L`<div part="content" slot="anchor" class=${S(this.highlighterClass)}>${Ie(
839
+ return R`<div part="content" slot="anchor" class=${L(this.highlighterClass)}>${Me(
715
840
  this.retryIndex,
716
- L`<img part="image" class=${S(this.imageClass)} src=${i || this.placeholder} srcset=${R(this.srcset || void 0)} sizes=${R(this.sizes || void 0)} alt=${t} aria-label=${t} crossorigin=${R(this.crossorigin)} @load=${this.handleLoad} @error=${this.handleError} loading=${this.retryIndex > 0 ? "eager" : this.htmlLoading} decoding="async" width=${R(this.width || void 0)} height=${R(this.height || void 0)}>`
841
+ R`<img part="image" class=${L(this.imageClass)} src=${e || this.placeholder} srcset=${S(this.srcset || void 0)} sizes=${S(this.sizes || void 0)} alt=${i} aria-label=${i} crossorigin=${S(this.crossorigin)} @load=${this.handleLoad} @error=${this.handleError} loading=${this.retryIndex > 0 ? "eager" : this.htmlLoading} decoding="async" width=${S(this.width || void 0)} height=${S(this.height || void 0)}>`
717
842
  )}</div>`;
718
843
  }
719
844
  render() {
720
- const i = this.hasZoomAction, t = this.currentAltValue;
721
- return L`<div part="base" class=${S({
845
+ const e = this.hasZoomAction, i = this.currentAltValue;
846
+ return R`<div part="base" class=${L({
722
847
  container: !0,
723
848
  "container--empty": this.isEmpty,
724
849
  "container--loading": this.loading,
725
850
  "container--resizing": this.resizable && this.isResizeActive
726
- })} style=${Me({
851
+ })} style=${Pe({
727
852
  "--easing": this.easeCSSVariable
728
- })} data-empty-label=${this.localize.term("emptyImage")} @click=${this.startResizing} @keydown=${this.handleKeyDown}><cx-resize-observer @cx-resize=${this.handleResize}><div part="highlighter" tabindex=${R(this.highlighterTabindex)} role=${this.highlighterRole} aria-label=${t} aria-roledescription=${this.localize.term("image")} class=${S(this.isEmpty ? {} : this.getHighlighterClass(this.isError))} @click=${this.handleClickAction} @mouseenter=${this.handleMouseEnter} @mouseleave=${this.handleMouseLeave} @blur=${this.handleBlur}>${A(
853
+ })} data-empty-label=${this.localize.term("emptyImage")} @click=${this.startResizing} @keydown=${this.handleKeyDown}><cx-resize-observer @cx-resize=${this.handleResize}><div part="highlighter" tabindex=${S(this.highlighterTabindex)} role=${this.highlighterRole} aria-label=${i} aria-roledescription=${this.localize.term("image")} class=${L(this.isEmpty ? {} : this.getHighlighterClass(this.isError))} @click=${this.handleClickAction} @mouseenter=${this.handleMouseEnter} @mouseleave=${this.handleMouseLeave} @blur=${this.handleBlur}>${A(
729
854
  this.isEmpty,
730
855
  () => X,
731
856
  () => A(
732
857
  this.effect === K.Jump || this.effect === K.Zoom,
733
- () => L`<cx-popup class="popup-container" strategy="absolute" active placement="center" sync="both">${this.renderContent()}</cx-popup>`,
858
+ () => R`<cx-popup class="popup-container" strategy="absolute" active placement="center" sync="both">${this.renderContent()}</cx-popup>`,
734
859
  () => this.renderContent()
735
860
  )
736
861
  )}<div class="zoom-image-container">${A(
737
- i,
738
- () => L`<img part="zoom-image" class=${S({
862
+ e,
863
+ () => R`<img part="zoom-image" class=${L({
739
864
  "zoom-image": !0,
740
865
  "zoom-image--hidden": !this.isZoomed
741
- })} src=${this.applyRetryCacheBust(this.currentSrc) || this.placeholder} alt="" aria-hidden="true" decoding="async" draggable="false" crossorigin=${R(this.crossorigin)}>`
742
- )}</div>${A(this.showPlaceholderSkeleton, () => L`<slot name="skeleton" part="skeleton"><div class=${S({
866
+ })} src=${this.applyRetryCacheBust(this.currentSrc) || this.placeholder} alt="" aria-hidden="true" decoding="async" draggable="false" crossorigin=${S(this.crossorigin)}>`
867
+ )}</div>${A(this.showPlaceholderSkeleton, () => R`<slot name="skeleton" part="skeleton"><div class=${L({
743
868
  skeleton: !0
744
869
  })}><cx-skeleton effect="none" role="status" aria-live="polite" aria-label=${this.localize.term("loading")}></cx-skeleton></div></slot>`)}
745
- ${A(this.isError, () => L`<slot name="fallback" part="fallback"><cx-space class=${S({ 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>${A(this.resizable && this.isResizeActive, () => this.renderResizer())}</div>`;
870
+ ${A(this.isError, () => R`<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>${A(this.resizable && this.isResizeActive, () => this.renderResizer())}</div>`;
746
871
  }
747
872
  };
748
- j = /* @__PURE__ */ new WeakMap();
749
- n.styles = [He, Se, Xe];
750
- n.dependencies = {
751
- "cx-icon": _e,
752
- "cx-popup": Pe,
873
+ O = /* @__PURE__ */ new WeakMap();
874
+ a.styles = [He, $e, Ge];
875
+ a.dependencies = {
876
+ "cx-icon": Fe,
877
+ "cx-popup": _e,
753
878
  "cx-resize-observer": Ne,
754
879
  "cx-skeleton": We,
755
880
  "cx-space": Be
756
881
  };
757
- h([
882
+ l([
758
883
  G(".image")
759
- ], n.prototype, "imageElement", 2);
760
- h([
884
+ ], a.prototype, "imageElement", 2);
885
+ l([
761
886
  G(".zoom-image")
762
- ], n.prototype, "zoomImageElement", 2);
763
- h([
887
+ ], a.prototype, "zoomImageElement", 2);
888
+ l([
764
889
  G(".highlighter")
765
- ], n.prototype, "highlighterElement", 2);
766
- h([
890
+ ], a.prototype, "highlighterElement", 2);
891
+ l([
767
892
  E()
768
- ], n.prototype, "isLoaded", 2);
769
- h([
893
+ ], a.prototype, "isLoaded", 2);
894
+ l([
770
895
  E()
771
- ], n.prototype, "isError", 2);
772
- h([
896
+ ], a.prototype, "isError", 2);
897
+ l([
773
898
  E()
774
- ], n.prototype, "isRetrying", 2);
775
- h([
899
+ ], a.prototype, "isRetrying", 2);
900
+ l([
776
901
  E()
777
- ], n.prototype, "retryIndex", 2);
778
- h([
902
+ ], a.prototype, "retryIndex", 2);
903
+ l([
779
904
  p({ reflect: !0, type: String })
780
- ], n.prototype, "src", 2);
781
- h([
905
+ ], a.prototype, "src", 2);
906
+ l([
907
+ p({ attribute: "aspect-ratio", reflect: !0, type: Number })
908
+ ], a.prototype, "aspectRatio", 2);
909
+ l([
782
910
  p({ reflect: !0, type: String })
783
- ], n.prototype, "srcset", 2);
784
- h([
911
+ ], a.prototype, "srcset", 2);
912
+ l([
785
913
  p({ reflect: !0, type: String })
786
- ], n.prototype, "sizes", 2);
787
- h([
914
+ ], a.prototype, "sizes", 2);
915
+ l([
788
916
  p({ reflect: !0, type: String })
789
- ], n.prototype, "placeholder", 2);
790
- h([
917
+ ], a.prototype, "placeholder", 2);
918
+ l([
791
919
  p({ reflect: !0, type: String })
792
- ], n.prototype, "alt", 2);
793
- h([
920
+ ], a.prototype, "alt", 2);
921
+ l([
794
922
  p({ attribute: "object-fit", reflect: !0 })
795
- ], n.prototype, "objectFit", 2);
796
- h([
923
+ ], a.prototype, "objectFit", 2);
924
+ l([
925
+ p({ attribute: "crop-focus", reflect: !0 })
926
+ ], a.prototype, "cropFocus", 2);
927
+ l([
797
928
  p({ reflect: !0, type: Boolean })
798
- ], n.prototype, "skeleton", 2);
799
- h([
929
+ ], a.prototype, "skeleton", 2);
930
+ l([
800
931
  p({ reflect: !0, type: Boolean })
801
- ], n.prototype, "fallback", 2);
802
- h([
932
+ ], a.prototype, "fallback", 2);
933
+ l([
803
934
  p({ attribute: "can-zoom", reflect: !0, type: Boolean })
804
- ], n.prototype, "canZoom", 2);
805
- h([
935
+ ], a.prototype, "canZoom", 2);
936
+ l([
806
937
  p({ reflect: !0, type: Boolean })
807
- ], n.prototype, "loading", 2);
808
- h([
938
+ ], a.prototype, "loading", 2);
939
+ l([
809
940
  p({ reflect: !0, type: Boolean })
810
- ], n.prototype, "block", 2);
811
- h([
941
+ ], a.prototype, "block", 2);
942
+ l([
812
943
  p({ attribute: "html-loading", reflect: !0, type: String })
813
- ], n.prototype, "htmlLoading", 2);
814
- h([
944
+ ], a.prototype, "htmlLoading", 2);
945
+ l([
815
946
  p({ attribute: "no-crossorigin", reflect: !0, type: Boolean })
816
- ], n.prototype, "noCrossorigin", 2);
817
- h([
947
+ ], a.prototype, "noCrossorigin", 2);
948
+ l([
818
949
  p({ attribute: "click-handler-type", reflect: !0, type: String })
819
- ], n.prototype, "clickHandlerType", 2);
820
- h([
950
+ ], a.prototype, "clickHandlerType", 2);
951
+ l([
821
952
  p({ attribute: "retry-on-error", reflect: !0, type: Boolean })
822
- ], n.prototype, "retryOnError", 2);
823
- h([
953
+ ], a.prototype, "retryOnError", 2);
954
+ l([
824
955
  p({ attribute: "max-retries", type: Number })
825
- ], n.prototype, "maxRetries", 2);
826
- h([
956
+ ], a.prototype, "maxRetries", 2);
957
+ l([
827
958
  E()
828
- ], n.prototype, "isZoomed", 2);
829
- h([
959
+ ], a.prototype, "isZoomed", 2);
960
+ l([
830
961
  E()
831
- ], n.prototype, "imageRatio", 2);
832
- h([
962
+ ], a.prototype, "imageRatio", 2);
963
+ l([
833
964
  E()
834
- ], n.prototype, "parsedAlt", 2);
835
- h([
965
+ ], a.prototype, "parsedAlt", 2);
966
+ l([
836
967
  E()
837
- ], n.prototype, "parsedAltDarkMode", 2);
838
- h([
968
+ ], a.prototype, "parsedAltDarkMode", 2);
969
+ l([
839
970
  M("isLoaded"),
840
971
  M("canZoom", { waitUntilFirstUpdate: !0 })
841
- ], n.prototype, "handleCanZoomChange", 1);
842
- h([
972
+ ], a.prototype, "handleCanZoomChange", 1);
973
+ l([
843
974
  M("objectFit", { waitUntilFirstUpdate: !0 })
844
- ], n.prototype, "handleObjectFitChange", 1);
845
- h([
975
+ ], a.prototype, "handleObjectFitChange", 1);
976
+ l([
846
977
  M("src"),
847
978
  M("srcDarkMode")
848
- ], n.prototype, "handleSrcChange", 1);
849
- h([
979
+ ], a.prototype, "handleSrcChange", 1);
980
+ l([
850
981
  Oe(100)
851
- ], n.prototype, "updateLastPatchedWidth", 1);
852
- n = h([
853
- Ae("cx-image")
854
- ], n);
982
+ ], a.prototype, "updateLastPatchedWidth", 1);
983
+ a = l([
984
+ Te("cx-image")
985
+ ], a);
855
986
  export {
856
- n as C,
987
+ a as C,
857
988
  I as a
858
989
  };