@projektemacher/storymapjs 0.10.3 → 0.10.5

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.
@@ -196,7 +196,7 @@ var k = {
196
196
  language: { type: "string" },
197
197
  map_type: {
198
198
  type: "string",
199
- description: "Basemap type: osm:<style>, osm (classic raster), mapbox://styles/<user>/<style>, stadia:<style>, stamen:<style> (deprecated, remapped), https://... (tile url template or style JSON), iiif, ch-watercolor, zoomify (legacy image pyramid, needs the zoomify options)."
199
+ description: "Basemap type: osm:<style>, osm (classic raster), mapbox://styles/<user>/<style>, stadia:<style>, stamen:<style> (deprecated, remapped), tile URL template or style JSON URL (absolute https://... or relative ./tiles/{z}/{x}/{y}.png, /tiles/{z}/...), iiif, ch-watercolor, zoomify (legacy image pyramid, needs the zoomify options)."
200
200
  },
201
201
  zoomify: { anyOf: [{
202
202
  type: "object",
@@ -223,6 +223,10 @@ var k = {
223
223
  minItems: 4,
224
224
  maxItems: 4
225
225
  }, { type: "null" }] },
226
+ map_area: {
227
+ type: "string",
228
+ enum: ["full", "left"]
229
+ },
226
230
  consent_required: { type: "boolean" },
227
231
  map_center_offset: {
228
232
  type: "object",
@@ -23164,7 +23168,16 @@ var Px = {
23164
23168
  lon: this.data.location.lon
23165
23169
  } : {};
23166
23170
  }
23167
- }, Bx = 19, Vx = Array.from({ length: 25 }, (e, t) => 2 ** (16 - t)), Hx = class extends Ix {
23171
+ };
23172
+ function Bx(e, t) {
23173
+ if (t.naturalWidth !== 256 || t.naturalHeight !== 256) {
23174
+ let n = document.createElement("canvas");
23175
+ n.width = 256, n.height = 256, n.getContext("2d")?.drawImage(t, 0, 0), e.setImage(n);
23176
+ }
23177
+ }
23178
+ //#endregion
23179
+ //#region src/map/openlayers/Map.OpenLayers.ts
23180
+ var Vx = 19, Hx = Array.from({ length: 25 }, (e, t) => 2 ** (16 - t)), Ux = class extends Ix {
23168
23181
  _createMap() {
23169
23182
  let e = this.options.map_type === "iiif" && this.options.map_as_image, t = this.options.map_options ?? {}, { element: n, view: r, ...i } = t, a = r ?? {}, o = this._bboxExtent();
23170
23183
  this._map = new gd({
@@ -23177,13 +23190,16 @@ var Px = {
23177
23190
  center: [0, 0],
23178
23191
  zoom: 0,
23179
23192
  minZoom: 0,
23180
- maxZoom: e ? Vx.length - 1 : Bx,
23193
+ maxZoom: e ? Hx.length - 1 : Vx,
23181
23194
  ...e ? {
23182
23195
  multiWorld: !0,
23183
- resolutions: Vx
23196
+ resolutions: Hx
23184
23197
  } : {},
23185
23198
  ...this.options.map_type === "zoomify" ? { multiWorld: !0 } : {},
23186
- ...o ? { extent: o } : {},
23199
+ ...o ? {
23200
+ extent: o,
23201
+ constrainOnlyCenter: !0
23202
+ } : {},
23187
23203
  ...a
23188
23204
  })
23189
23205
  }), this._map.on("loadend", () => {
@@ -23319,6 +23335,10 @@ var Px = {
23319
23335
  let l = 0;
23320
23336
  for (let e = 0; e < c; e++) l += i(e) * a(e);
23321
23337
  return l += s * i(c) + o, `${t}TileGroup${Math.floor(l / 256)}/${c}-${o}-${s}.jpg`;
23338
+ },
23339
+ tileLoadFunction: (e, t) => {
23340
+ let n = e, r = n.getImage();
23341
+ r.onload = () => Bx(n, r), r.src = t;
23322
23342
  }
23323
23343
  }) });
23324
23344
  }
@@ -23326,7 +23346,11 @@ var Px = {
23326
23346
  let e = t.length > 1 ? t[1] : "";
23327
23347
  return e ? this._createVectorStyleLayer(`https://tiles.openfreemap.org/styles/${e}`) : new Up({ source: new Bm({ attributions: [] }) });
23328
23348
  }
23329
- default: return new Up({ source: new Bm({ attributions: [] }) });
23349
+ default: return e.includes("{z}") ? new Up({ source: new ym({
23350
+ url: e,
23351
+ attributions: [],
23352
+ crossOrigin: "anonymous"
23353
+ }) }) : e.includes("/") || e.endsWith(".json") ? this._createVectorStyleLayer(e) : new Up({ source: new Bm({ attributions: [] }) });
23330
23354
  }
23331
23355
  }
23332
23356
  _createVectorStyleLayer(e) {
@@ -23340,7 +23364,7 @@ var Px = {
23340
23364
  this.options.map_as_image && (this.zoom_min_max.min = 0), this.bounds_array ||= this._getAllMarkersBounds(this._markers);
23341
23365
  let e = Pe(this.options), t = Fe("consent_service_tiles", "map tiles"), n = !(this.options.consent_required && e && !e.isGranted(t));
23342
23366
  this._tile_layer_mini = n ? this._createTileLayer(this.options.map_type) : null;
23343
- let r = this.options.map_type === "iiif" && this.options.map_as_image, i = this.options.map_type === "zoomify", a = i ? this._zoomifyPyramid() : null;
23367
+ let r = this.options.map_type === "iiif" && this.options.map_as_image, i = this.options.map_type === "zoomify", a = i ? this._zoomifyPyramid() : null, o = a ? a.tileGrid.getResolutions() : null;
23344
23368
  if (this._mini_map = new Km({
23345
23369
  ...r || a ? { view: new bo({
23346
23370
  projection: this._map.getView().getProjection(),
@@ -23348,16 +23372,16 @@ var Px = {
23348
23372
  zoom: this.zoom_min_max.min || 0,
23349
23373
  ...r ? {
23350
23374
  multiWorld: !0,
23351
- resolutions: Vx,
23375
+ resolutions: Hx,
23352
23376
  minZoom: 0,
23353
- maxZoom: Vx.length - 1
23377
+ maxZoom: Hx.length - 1
23354
23378
  } : {},
23355
- ...a ? {
23379
+ ...a && o ? {
23356
23380
  constrainOnlyCenter: !0,
23357
23381
  extent: a.extent,
23382
+ resolutions: o,
23358
23383
  minZoom: 0,
23359
- maxZoom: 0,
23360
- zoom: 0,
23384
+ maxZoom: o.length - 1,
23361
23385
  center: [(a.extent[0] + a.extent[2]) / 2, (a.extent[1] + a.extent[3]) / 2]
23362
23386
  } : {}
23363
23387
  }) } : {},
@@ -23366,9 +23390,12 @@ var Px = {
23366
23390
  label: "»",
23367
23391
  collapsed: !0
23368
23392
  }), this._map.addControl(this._mini_map), a) {
23369
- let e = this._mini_map.getOverviewMap(), t = e.getSize(), n = t && t[0] >= 50 && t[1] >= 50 ? t : [150, 150];
23370
- e.getView().fit(a.extent, { size: n });
23371
- } else !i && this.bounds_array && this.bounds_array.length && this._fitView(this._mini_map.getOverviewMap(), this.bounds_array);
23393
+ let e = this._mini_map.getOverviewMap(), t = () => {
23394
+ let t = e.getSize(), n = t && t[0] >= 50 && t[1] >= 50 ? t : [150, 100];
23395
+ e.getView().fit(a.extent, { size: n });
23396
+ };
23397
+ t(), e.on("change:size", t);
23398
+ } else !i && this.bounds_array && this.bounds_array.length && this._fitView(this._mini_map.getOverviewMap(), this.bounds_array, 0, this._bboxExtent() !== null);
23372
23399
  this.options.map_type === "iiif" && this.options.map_as_image && this._fitMiniMapToImage();
23373
23400
  }
23374
23401
  _fitMiniMapToImage() {
@@ -23457,12 +23484,19 @@ var Px = {
23457
23484
  let i = r[1].split(/[,\s/]+/).filter((e) => e !== "").map(Number);
23458
23485
  if ((i.length >= 4 ? i[3] : 1) < .9) return e;
23459
23486
  let a = this._el.map.getBoundingClientRect(), o = t.getBoundingClientRect();
23460
- return !a.width || !o.width || (this.options.layout === "portrait" ? e[2] += Math.max(0, a.bottom - o.top) : e[1] += Math.max(0, o.right - a.left)), e;
23487
+ return !a.width || !o.width || !(o.left < a.right && o.right > a.left && o.top < a.bottom && o.bottom > a.top) || (this.options.layout === "portrait" ? e[2] += Math.max(0, a.bottom - o.top) : e[1] += Math.max(0, o.right - a.left)), e;
23461
23488
  }
23462
- _fitView(e, t, n = 0) {
23489
+ _fitView(e, t, n = 0, r = !1) {
23463
23490
  if (!t || !t.length) return;
23464
- let r = un(this._markerCoordsToViewCoords(t));
23465
- e.getView().fit(r, {
23491
+ let i = un(this._markerCoordsToViewCoords(t));
23492
+ if (r) {
23493
+ let e = this._bboxExtent();
23494
+ if (e) {
23495
+ let t = Rn(i, e);
23496
+ i = t[0] <= t[2] && t[1] <= t[3] ? t : e;
23497
+ }
23498
+ }
23499
+ e.getView().fit(i, {
23466
23500
  size: e.getSize(),
23467
23501
  padding: this._opaquePanelPadding(),
23468
23502
  maxZoom: 12,
@@ -23707,7 +23741,7 @@ var Px = {
23707
23741
  });
23708
23742
  }
23709
23743
  } else {
23710
- this._fitView(this._map, this.bounds_array, 0);
23744
+ this._fitView(this._map, this.bounds_array, 0, this._bboxExtent() !== null);
23711
23745
  let t = this._map.getView(), n = t.getZoom();
23712
23746
  if (n !== void 0) {
23713
23747
  let r = this._fromViewCoords(t.getCenter(), t.getProjection()), i = this._getMapCenterOffset(r, n);
@@ -23722,12 +23756,29 @@ var Px = {
23722
23756
  }
23723
23757
  this._mini_map && this._mini_map.setCollapsed(!0);
23724
23758
  }
23759
+ _refreshMiniMapLayer() {
23760
+ if (!this._mini_map) return;
23761
+ let e = this._mini_map.getOverviewMap();
23762
+ e.getLayers().clear();
23763
+ let t = Pe(this.options), n = Fe("consent_service_tiles", "map tiles");
23764
+ if (this.options.consent_required && t && !t.isGranted(n)) {
23765
+ this._tile_layer_mini = null;
23766
+ return;
23767
+ }
23768
+ this._tile_layer_mini = this._createTileLayer(this.options.map_type), e.addLayer(this._tile_layer_mini);
23769
+ let r = this.options.map_type === "zoomify" ? this._zoomifyPyramid() : null;
23770
+ if (r) {
23771
+ let t = e.getSize(), n = t && t[0] >= 50 && t[1] >= 50 ? t : [150, 100];
23772
+ e.getView().fit(r.extent, { size: n });
23773
+ } else this.bounds_array && this.bounds_array.length && this._fitView(e, this.bounds_array, 0, this._bboxExtent() !== null);
23774
+ this.options.map_type === "iiif" && this.options.map_as_image && this._fitMiniMapToImage();
23775
+ }
23725
23776
  applyOptions(e) {
23726
23777
  for (let t of e) switch (t) {
23727
23778
  case "map_type": {
23728
23779
  this._tile_layer && this._map.removeLayer(this._tile_layer);
23729
23780
  let e = Pe(this.options), t = Fe("consent_service_tiles", "map tiles");
23730
- this.options.consent_required && e && !e.isGranted(t) || (this._tile_layer = this._createTileLayer(this.options.map_type), this._map.addLayer(this._tile_layer)), this._el.map.style.backgroundColor = this.options.map_background_color;
23781
+ this.options.consent_required && e && !e.isGranted(t) || (this._tile_layer = this._createTileLayer(this.options.map_type), this._map.addLayer(this._tile_layer)), this._refreshMiniMapLayer(), this._el.map.style.backgroundColor = this.options.map_background_color;
23731
23782
  break;
23732
23783
  }
23733
23784
  case "show_lines":
@@ -23787,7 +23838,7 @@ var Px = {
23787
23838
  let r = this._map.getView();
23788
23839
  r.setZoom(t), r.setCenter(this._toViewCoords(n)), this._map.renderSync();
23789
23840
  }
23790
- }, Ux = {
23841
+ }, Wx = {
23791
23842
  addListener: function(e, t, n, r) {
23792
23843
  let i = function(t) {
23793
23844
  return n.call(r || e, t);
@@ -23801,7 +23852,7 @@ var Px = {
23801
23852
  preventDefault: function(e) {
23802
23853
  e.preventDefault ? e.preventDefault() : e.returnValue = !1;
23803
23854
  }
23804
- }, Wx = class {
23855
+ }, Gx = class {
23805
23856
  constructor(e, t, n) {
23806
23857
  this._el = {
23807
23858
  parent: {},
@@ -23872,16 +23923,16 @@ var Px = {
23872
23923
  this.collapsed ? (this.collapsed = !1, this.show(), this._el.button_overview.style.display = "inline", this.fire("collapse", { y: this.options.menubar_default_y }), Px.mobile ? this._el.button_collapse_toggle.innerHTML = "<span class='vco-icon-arrow-up'></span>" : this._el.button_collapse_toggle.innerHTML = M.buttons.collapse_toggle + "<span class='vco-icon-arrow-up'></span>") : (this.collapsed = !0, this.hide(25), this._el.button_overview.style.display = "none", this.fire("collapse", { y: 1 }), Px.mobile ? this._el.button_collapse_toggle.innerHTML = "<span class='vco-icon-arrow-down'></span>" : this._el.button_collapse_toggle.innerHTML = M.buttons.uncollapse_toggle + "<span class='vco-icon-arrow-down'></span>");
23873
23924
  }
23874
23925
  _initLayout() {
23875
- this._el.button_overview = N.create("span", "vco-menubar-button", this._el.container), Ux.addListener(this._el.button_overview, "click", this._onButtonOverview, this), this.options.show_overview === !1 && (this._el.button_overview.style.display = "none"), this._el.button_backtostart = N.create("span", "vco-menubar-button", this._el.container), Ux.addListener(this._el.button_backtostart, "click", this._onButtonBackToStart, this), this.options.show_back_to_start === !1 && (this._el.button_backtostart.style.display = "none"), this._el.button_fullscreen = N.create("span", "vco-menubar-button", this._el.container), Ux.addListener(this._el.button_fullscreen, "click", this._onButtonFullscreen, this), this.options.fullscreen === !1 && (this._el.button_fullscreen.style.display = "none"), this._el.button_collapse_toggle = N.create("span", "vco-menubar-button", this._el.container), Ux.addListener(this._el.button_collapse_toggle, "click", this._onButtonCollapseMap, this), this.options.map_as_image ? this._el.button_overview.innerHTML = M.buttons.overview : this._el.button_overview.innerHTML = M.buttons.map_overview, this.options.show_progress && (this._el.progress = N.create("span", "vco-menubar-progress", this._el.container), this._el.progress_fill = N.create("span", "vco-menubar-progress-fill", this._el.progress)), this.options.show_distance && (this._el.distance = N.create("span", "vco-menubar-distance", this._el.container)), Px.mobile ? (this._el.button_backtostart.innerHTML = "<span class='vco-icon-goback'></span>", this._el.button_collapse_toggle.innerHTML = "<span class='vco-icon-arrow-up'></span>", this._el.button_fullscreen.innerHTML = "<span class='vco-icon-resize-full'></span>", this._el.container.setAttribute("ontouchstart", " ")) : (this._el.button_backtostart.innerHTML = M.buttons.backtostart + " <span class='vco-icon-goback'></span>", this._el.button_collapse_toggle.innerHTML = M.buttons.collapse_toggle + "<span class='vco-icon-arrow-up'></span>", this._el.button_fullscreen.innerHTML = M.buttons.fullscreen + " <span class='vco-icon-resize-full'></span>"), this.options.layout === "landscape" && (this._el.button_collapse_toggle.style.display = "none");
23926
+ this._el.button_overview = N.create("span", "vco-menubar-button", this._el.container), Wx.addListener(this._el.button_overview, "click", this._onButtonOverview, this), this.options.show_overview === !1 && (this._el.button_overview.style.display = "none"), this._el.button_backtostart = N.create("span", "vco-menubar-button", this._el.container), Wx.addListener(this._el.button_backtostart, "click", this._onButtonBackToStart, this), this.options.show_back_to_start === !1 && (this._el.button_backtostart.style.display = "none"), this._el.button_fullscreen = N.create("span", "vco-menubar-button", this._el.container), Wx.addListener(this._el.button_fullscreen, "click", this._onButtonFullscreen, this), this.options.fullscreen === !1 && (this._el.button_fullscreen.style.display = "none"), this._el.button_collapse_toggle = N.create("span", "vco-menubar-button", this._el.container), Wx.addListener(this._el.button_collapse_toggle, "click", this._onButtonCollapseMap, this), this.options.map_as_image ? this._el.button_overview.innerHTML = M.buttons.overview : this._el.button_overview.innerHTML = M.buttons.map_overview, this.options.show_progress && (this._el.progress = N.create("span", "vco-menubar-progress", this._el.container), this._el.progress_fill = N.create("span", "vco-menubar-progress-fill", this._el.progress)), this.options.show_distance && (this._el.distance = N.create("span", "vco-menubar-distance", this._el.container)), Px.mobile ? (this._el.button_backtostart.innerHTML = "<span class='vco-icon-goback'></span>", this._el.button_collapse_toggle.innerHTML = "<span class='vco-icon-arrow-up'></span>", this._el.button_fullscreen.innerHTML = "<span class='vco-icon-resize-full'></span>", this._el.container.setAttribute("ontouchstart", " ")) : (this._el.button_backtostart.innerHTML = M.buttons.backtostart + " <span class='vco-icon-goback'></span>", this._el.button_collapse_toggle.innerHTML = M.buttons.collapse_toggle + "<span class='vco-icon-arrow-up'></span>", this._el.button_fullscreen.innerHTML = M.buttons.fullscreen + " <span class='vco-icon-resize-full'></span>"), this.options.layout === "landscape" && (this._el.button_collapse_toggle.style.display = "none");
23876
23927
  }
23877
23928
  _updateDisplay(e, t, n) {
23878
23929
  e && (this.options.width = e), t && (this.options.height = t);
23879
23930
  }
23880
- }, Gx = class extends Ze(Xe(Wx)) {
23931
+ }, Kx = class extends Ze(Xe(Gx)) {
23881
23932
  constructor(...e) {
23882
23933
  super(...e);
23883
23934
  }
23884
- }, Kx = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
23935
+ }, qx = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
23885
23936
  (function(e, n) {
23886
23937
  typeof define == "function" ? define(n) : t === void 0 ? this[e] = n() : t.exports = n();
23887
23938
  })("morpheus", function() {
@@ -24042,7 +24093,7 @@ var Px = {
24042
24093
  }
24043
24094
  return oe.tween = A, oe.getStyle = v, oe.bezier = ne, oe.transform = g, oe.parseTransform = T, oe.formatTransform = E, oe.animationFrame = y, oe.easings = {}, oe;
24044
24095
  });
24045
- })))(), 1), qx = class {
24096
+ })))(), 1), Jx = class {
24046
24097
  constructor(e, t, n) {
24047
24098
  this._el = {
24048
24099
  container: {},
@@ -24072,7 +24123,7 @@ var Px = {
24072
24123
  for (let n in e) Object.hasOwn(e, n) && (o[n] = t ? e[n] + "%" : e[n] + "px");
24073
24124
  this.animator_position && this.animator_position.stop();
24074
24125
  let c;
24075
- c = o.right ? "right" : "left", t ? this._el.container.style[c] = s + "%" : this._el.container.style[c] = s + "px", this.animator_position = (0, Kx.default)(this._el.container, o);
24126
+ c = o.right ? "right" : "left", t ? this._el.container.style[c] = s + "%" : this._el.container.style[c] = s + "px", this.animator_position = (0, qx.default)(this._el.container, o);
24076
24127
  }
24077
24128
  _onUpdatePositionComplete(e) {
24078
24129
  e && (this._el.container.style.left = "", this._el.container.style.right = "");
@@ -24087,13 +24138,13 @@ var Px = {
24087
24138
  this._el.content_container = N.create("div", "vco-slidenav-content-container", this._el.container), this._el.icon = N.create("div", "vco-slidenav-icon", this._el.content_container), this._el.title = N.create("div", "vco-slidenav-title", this._el.content_container), this._el.description = N.create("div", "vco-slidenav-description", this._el.content_container), this._el.icon.innerHTML = "&nbsp;", this._update();
24088
24139
  }
24089
24140
  _initEvents() {
24090
- Ux.addListener(this._el.container, "click", this._onMouseClick, this);
24141
+ Wx.addListener(this._el.container, "click", this._onMouseClick, this);
24091
24142
  }
24092
- }, Jx = class extends Ze(Xe(qx)) {
24143
+ }, Yx = class extends Ze(Xe(Jx)) {
24093
24144
  constructor(...e) {
24094
24145
  super(...e);
24095
24146
  }
24096
- }, Yx = class {
24147
+ }, Xx = class {
24097
24148
  data;
24098
24149
  constructor(e, t, n) {
24099
24150
  this._el = {
@@ -24122,13 +24173,13 @@ var Px = {
24122
24173
  this._el.message_container = N.create("div", "vco-message-container", this._el.container), this._el.loading_icon = N.create("div", this.options.message_icon_class, this._el.message_container), this._el.message = N.create("div", "vco-message-content", this._el.message_container), this._updateMessage();
24123
24174
  }
24124
24175
  _initEvents() {
24125
- Ux.addListener(this._el.container, "click", this._onMouseClick, this);
24176
+ Wx.addListener(this._el.container, "click", this._onMouseClick, this);
24126
24177
  }
24127
- }, Xx = class extends Ze(Xe(Yx)) {
24178
+ }, Zx = class extends Ze(Xe(Xx)) {
24128
24179
  constructor(...e) {
24129
24180
  super(...e);
24130
24181
  }
24131
- }, Zx = class {
24182
+ }, Qx = class {
24132
24183
  constructor(e, t, n) {
24133
24184
  this._el = {
24134
24185
  container: {},
@@ -24236,7 +24287,7 @@ var Px = {
24236
24287
  this.fire("removed", this.data);
24237
24288
  }
24238
24289
  _initLayout() {
24239
- if (this.message = new Xx({}, this.options), this.message.addTo(this._el.container), this._el.content_container = N.create("div", "vco-media-content-container", this._el.container), this.data.link && this.data.link !== "") {
24290
+ if (this.message = new Zx({}, this.options), this.message.addTo(this._el.container), this._el.content_container = N.create("div", "vco-media-content-container", this._el.container), this.data.link && this.data.link !== "") {
24240
24291
  this._el.link = N.create("a", "vco-media-link", this._el.content_container);
24241
24292
  let e = this._el.link;
24242
24293
  e.href = this.data.link, e.target = this.data.link_target && this.data.link_target !== "" ? this.data.link_target : "_blank", this._el.content = N.create("div", "vco-media-content", this._el.link);
@@ -24246,11 +24297,11 @@ var Px = {
24246
24297
  e && (this.options.width = e), t && (this.options.height = t), n && (this.options.layout = n), this._el.credit && (this.options.credit_height = this._el.credit.offsetHeight), this._el.caption && (this.options.caption_height = this._el.caption.offsetHeight + 5), this.updateMediaDisplay(this.options.layout);
24247
24298
  }
24248
24299
  _stopMedia() {}
24249
- }, Qx = class extends Xe(Zx) {
24300
+ }, $x = class extends Xe(Qx) {
24250
24301
  constructor(...e) {
24251
24302
  super(...e);
24252
24303
  }
24253
- }, $x = class extends Qx {
24304
+ }, eS = class extends $x {
24254
24305
  _loadMedia() {
24255
24306
  if (this.message.updateMessage(M.messages.loading + " " + this.options.media_name), this.data.link) {
24256
24307
  this._el.content_link = N.create("a", "", this._el.content);
@@ -24262,7 +24313,7 @@ var Px = {
24262
24313
  }), this._el.content_item.src = this.data.url, this.onLoaded();
24263
24314
  }
24264
24315
  _updateMediaDisplay(e) {}
24265
- }, eS = class extends Qx {
24316
+ }, tS = class extends $x {
24266
24317
  async _loadMedia() {
24267
24318
  this.message.updateMessage(M.messages.loading + " " + this.options.media_name), this.youtube_loaded = !1, this._el.content_item = N.create("div", "vco-media-item vco-media-youtube vco-media-shadow", this._el.content), this._el.content_item.id = v(7);
24268
24319
  let e = x(this.data.url);
@@ -24332,7 +24383,7 @@ var Px = {
24332
24383
  let t = YT;
24333
24384
  e.data === t.PlayerState.ENDED && (e.target.seekTo(0), e.target.pauseVideo());
24334
24385
  }
24335
- }, tS = [
24386
+ }, nS = [
24336
24387
  "width",
24337
24388
  "height",
24338
24389
  "frameborder",
@@ -24340,7 +24391,7 @@ var Px = {
24340
24391
  "allow",
24341
24392
  "scrolling",
24342
24393
  "title"
24343
- ], nS = [
24394
+ ], rS = [
24344
24395
  "BLOCKQUOTE",
24345
24396
  "P",
24346
24397
  "CITE",
@@ -24360,7 +24411,7 @@ var Px = {
24360
24411
  "UL",
24361
24412
  "OL",
24362
24413
  "LI"
24363
- ], rS = [
24414
+ ], iS = [
24364
24415
  "SCRIPT",
24365
24416
  "STYLE",
24366
24417
  "TEMPLATE",
@@ -24380,53 +24431,53 @@ var Px = {
24380
24431
  "TEXTAREA",
24381
24432
  "SELECT"
24382
24433
  ];
24383
- function iS(e) {
24434
+ function aS(e) {
24384
24435
  return new DOMParser().parseFromString(e, "text/html");
24385
24436
  }
24386
- function aS(e) {
24437
+ function oS(e) {
24387
24438
  if (!e) return null;
24388
24439
  let t = document.createElement("a");
24389
24440
  return t.href = e, t.protocol === "http:" || t.protocol === "https:" ? t.href : null;
24390
24441
  }
24391
- function oS(e) {
24392
- let t = iS(e).querySelector("iframe"), n = null;
24393
- if (t ? n = aS(t.getAttribute("src")) : /^https?:\/\/\S+$/i.test(e.trim()) && (n = aS(e.trim())), !n) return null;
24442
+ function sS(e) {
24443
+ let t = aS(e).querySelector("iframe"), n = null;
24444
+ if (t ? n = oS(t.getAttribute("src")) : /^https?:\/\/\S+$/i.test(e.trim()) && (n = oS(e.trim())), !n) return null;
24394
24445
  let r = document.createElement("iframe");
24395
- if (r.setAttribute("src", n), t) for (let e = 0; e < tS.length; e++) t.hasAttribute(tS[e]) && r.setAttribute(tS[e], t.getAttribute(tS[e]));
24446
+ if (r.setAttribute("src", n), t) for (let e = 0; e < nS.length; e++) t.hasAttribute(nS[e]) && r.setAttribute(nS[e], t.getAttribute(nS[e]));
24396
24447
  else r.setAttribute("width", "100%"), r.setAttribute("height", "100%"), r.setAttribute("frameborder", "0"), r.setAttribute("allowfullscreen", "");
24397
24448
  return r;
24398
24449
  }
24399
- function sS(e) {
24450
+ function cS(e) {
24400
24451
  let t = document.createDocumentFragment();
24401
- return cS(iS(e).body, t), t;
24452
+ return lS(aS(e).body, t), t;
24402
24453
  }
24403
- function cS(e, t) {
24454
+ function lS(e, t) {
24404
24455
  for (let n = 0; n < e.childNodes.length; n++) {
24405
24456
  let r = e.childNodes[n];
24406
24457
  if (r.nodeType === 3) t.appendChild(document.createTextNode(r.nodeValue));
24407
24458
  else if (r.nodeType === 1) {
24408
24459
  let e = r.nodeName.toUpperCase();
24409
- if (rS.includes(e)) continue;
24410
- if (nS.includes(e)) {
24460
+ if (iS.includes(e)) continue;
24461
+ if (rS.includes(e)) {
24411
24462
  let n = document.createElement(e);
24412
24463
  if (e === "A") {
24413
- let e = aS(r.getAttribute("href"));
24464
+ let e = oS(r.getAttribute("href"));
24414
24465
  e && (n.setAttribute("href", e), n.setAttribute("target", "_blank"));
24415
24466
  }
24416
- cS(r, n), t.appendChild(n);
24417
- } else cS(r, t);
24467
+ lS(r, n), t.appendChild(n);
24468
+ } else lS(r, t);
24418
24469
  }
24419
24470
  }
24420
24471
  }
24421
24472
  //#endregion
24422
24473
  //#region src/media/types/Blockquote.ts
24423
- var lS = class extends Qx {
24474
+ var uS = class extends $x {
24424
24475
  _loadMedia() {
24425
- this.message.updateMessage(M.messages.loading + " " + this.options.media_name), this._el.content_item = N.create("div", "vco-media-item vco-media-blockquote", this._el.content), this.media_id = this.data.url, this._el.content_item.appendChild(sS(this.media_id)), this.onLoaded();
24476
+ this.message.updateMessage(M.messages.loading + " " + this.options.media_name), this._el.content_item = N.create("div", "vco-media-item vco-media-blockquote", this._el.content), this.media_id = this.data.url, this._el.content_item.appendChild(cS(this.media_id)), this.onLoaded();
24426
24477
  }
24427
24478
  updateMediaDisplay() {}
24428
24479
  _updateMediaDisplay() {}
24429
- }, uS = class extends Qx {
24480
+ }, dS = class extends $x {
24430
24481
  _loadMedia() {
24431
24482
  this.message.updateMessage(M.messages.loading + " " + this.options.media_name), this._el.content_item = N.create("div", "vco-media-item vco-media-wikipedia", this._el.content), this.media_id = this.data.url.split("wiki/")[1].split("#")[0].replace("_", " "), this.media_id = this.media_id.replace(" ", "%20");
24432
24483
  let e = this.data.url.split("//")[1].split(".wikipedia")[0], t = "wikipediaCallback_" + this.media_id.replace(/[^0-9a-z]/gi, "").slice(0, 494), n = `https://${e}.wikipedia.org/w/api.php?action=query&prop=extracts&redirects=&titles=${this.media_id}&exintro=1&format=json&callback=${t}`;
@@ -24457,7 +24508,7 @@ var lS = class extends Qx {
24457
24508
  }
24458
24509
  updateMediaDisplay() {}
24459
24510
  _updateMediaDisplay() {}
24460
- }, dS = class extends Qx {
24511
+ }, fS = class extends $x {
24461
24512
  async _loadMedia() {
24462
24513
  this.message.updateMessage(M.messages.loading + " " + this.options.media_name), this._el.content_item = N.create("div", "vco-media-item vco-media-iframe vco-media-soundcloud vco-media-shadow", this._el.content), this.media_id = this.data.url;
24463
24514
  let e = "https://soundcloud.com/oembed?url=" + this.media_id + "&format=json";
@@ -24481,7 +24532,7 @@ var lS = class extends Qx {
24481
24532
  _stopMedia() {
24482
24533
  this.soundCloudCreated && this.widget?.pause();
24483
24534
  }
24484
- }, fS = class extends Qx {
24535
+ }, pS = class extends $x {
24485
24536
  _loadMedia() {
24486
24537
  this.message.updateMessage(M.messages.loading + " " + this.options.media_name), this._el.content_item = N.create("div", "vco-media-item vco-media-iframe vco-media-vimeo vco-media-shadow", this._el.content);
24487
24538
  let e = this.data.url.split(/video\/|\/\/vimeo\.com\//);
@@ -24500,7 +24551,7 @@ var lS = class extends Qx {
24500
24551
  console.log(e);
24501
24552
  }
24502
24553
  }
24503
- }, pS = class extends Qx {
24554
+ }, mS = class extends $x {
24504
24555
  _loadMedia() {
24505
24556
  this.message.updateMessage(M.messages.loading + " " + this.options.media_name), this._el.content_item = N.create("video", "vco-media-item vco-media-video vco-media-shadow", this._el.content);
24506
24557
  let e = this._el.content_item;
@@ -24532,7 +24583,7 @@ var lS = class extends Qx {
24532
24583
  }
24533
24584
  return r;
24534
24585
  }
24535
- }, mS = class extends Qx {
24586
+ }, hS = class extends $x {
24536
24587
  _loadMedia() {
24537
24588
  this.message.updateMessage(M.messages.loading + " " + this.options.media_name), this._el.content_item = N.create("audio", "vco-media-item vco-media-audio vco-media-shadow", this._el.content);
24538
24589
  let e = this._el.content_item;
@@ -24567,7 +24618,7 @@ var lS = class extends Qx {
24567
24618
  }
24568
24619
  return r;
24569
24620
  }
24570
- }, hS = class extends Qx {
24621
+ }, gS = class extends $x {
24571
24622
  _loadMedia() {
24572
24623
  this.message.updateMessage(M.messages.loading + " " + this.options.media_name), this._el.content_item = N.create("div", "vco-media-item vco-media-iframe vco-media-dailymotion", this._el.content);
24573
24624
  let e = this.data.url.match("video") ? this.data.url.split("video/")[1] : this.data.url.split("embed/")[1];
@@ -24582,7 +24633,7 @@ var lS = class extends Qx {
24582
24633
  _stopMedia() {
24583
24634
  (this._el.content_item?.querySelector("iframe"))?.contentWindow?.postMessage("{\"command\":\"pause\",\"parameters\":[]}", "*");
24584
24635
  }
24585
- }, gS = class extends Qx {
24636
+ }, _S = class extends $x {
24586
24637
  _loadMedia() {
24587
24638
  this.message.updateMessage(M.messages.loading + " " + this.options.media_name), this._el.content_item = N.create("div", "vco-media-twitter", this._el.content);
24588
24639
  let e = /(?:twitter\.com|x\.com)\/(.+?)\/status\/(\d+)/.exec(this.data.url);
@@ -24605,7 +24656,7 @@ var lS = class extends Qx {
24605
24656
  }
24606
24657
  updateMediaDisplay() {}
24607
24658
  _updateMediaDisplay() {}
24608
- }, _S = class extends Qx {
24659
+ }, vS = class extends $x {
24609
24660
  _loadMedia() {
24610
24661
  this.message.updateMessage(M.messages.loading + " " + this.options.media_name), this._el.content_item = N.create("img", "vco-media-item vco-media-image vco-media-flickr vco-media-shadow", this._el.content), this._el.content_item.addEventListener("load", (e) => {
24611
24662
  this.onMediaLoaded();
@@ -24641,10 +24692,10 @@ var lS = class extends Qx {
24641
24692
  let t;
24642
24693
  return t = e <= 75 ? e <= 0 ? "Large" : "Thumbnail" : e <= 180 ? "Small" : e <= 240 ? "Small 320" : e <= 375 ? "Medium" : e <= 480 ? "Medium 640" : "Large", t;
24643
24694
  }
24644
- }, vS = class extends Qx {
24695
+ }, yS = class extends $x {
24645
24696
  _loadMedia() {
24646
24697
  this.message.updateMessage(M.messages.loading + " " + this.options.media_name), this._el.content_item = N.create("div", "vco-media-item vco-media-iframe", this._el.content), this.media_id = this.data.url;
24647
- let e = aS(this.media_id);
24698
+ let e = oS(this.media_id);
24648
24699
  if (!e) {
24649
24700
  this.loadErrorDisplay("Invalid URL.");
24650
24701
  return;
@@ -24655,10 +24706,10 @@ var lS = class extends Qx {
24655
24706
  _updateMediaDisplay() {
24656
24707
  this._el.content_item.style.height = this.options.height + "px";
24657
24708
  }
24658
- }, yS = class extends Qx {
24709
+ }, bS = class extends $x {
24659
24710
  _loadMedia() {
24660
24711
  this.message.updateMessage(M.messages.loading + " " + this.options.media_name), this._el.content_item = N.create("div", "vco-media-item vco-media-iframe", this._el.content), this.media_id = this.data.url;
24661
- let e = oS(this.media_id);
24712
+ let e = sS(this.media_id);
24662
24713
  if (!e) {
24663
24714
  this.loadErrorDisplay("Invalid embed code. Paste an iframe embed code with an http(s) source URL.");
24664
24715
  return;
@@ -24668,10 +24719,10 @@ var lS = class extends Qx {
24668
24719
  _updateMediaDisplay() {
24669
24720
  this._el.content_item.style.height = this.options.height + "px";
24670
24721
  }
24671
- }, bS = class extends Qx {
24722
+ }, xS = class extends $x {
24672
24723
  _loadMedia() {
24673
24724
  this.message.updateMessage(M.messages.loading + " " + this.options.media_name), this._el.content_item = N.create("div", "vco-media-item vco-media-iframe", this._el.content), this.media_id = this.data.url;
24674
- let e = aS(this.media_id);
24725
+ let e = oS(this.media_id);
24675
24726
  if (!e) {
24676
24727
  this.loadErrorDisplay("Invalid URL.");
24677
24728
  return;
@@ -24682,7 +24733,7 @@ var lS = class extends Qx {
24682
24733
  _updateMediaDisplay() {
24683
24734
  this._el.content_item.style.height = this.options.height + "px";
24684
24735
  }
24685
- }, xS = class extends Qx {
24736
+ }, SS = class extends $x {
24686
24737
  _loadMedia() {
24687
24738
  this.message.updateMessage(M.messages.loading + " " + this.options.media_name), this._el.content_item = N.create("div", "vco-media-item vco-media-iframe vco-media-facebook", this._el.content);
24688
24739
  let e = this.data.url, t = encodeURIComponent(e), n = /\/videos?\//.test(e) || /\/watch/.test(e) || /\/reel\//.test(e) ? `https://www.facebook.com/plugins/video.php?href=${t}&show_text=true` : `https://www.facebook.com/plugins/post.php?href=${t}&show_text=true`;
@@ -24691,10 +24742,10 @@ var lS = class extends Qx {
24691
24742
  _updateMediaDisplay() {
24692
24743
  this._el.content_item.style.height = this.options.height + "px";
24693
24744
  }
24694
- }, SS = class extends Qx {
24745
+ }, CS = class extends $x {
24695
24746
  _loadMedia() {
24696
24747
  this.message.updateMessage(M.messages.loading + " " + this.options.media_name), this._el.content_item = N.create("div", "vco-media-item vco-media-iframe vco-media-documentcloud", this._el.content);
24697
- let e = aS(this.data.url);
24748
+ let e = oS(this.data.url);
24698
24749
  if (!e) {
24699
24750
  this.loadErrorDisplay("Invalid URL.");
24700
24751
  return;
@@ -24705,7 +24756,7 @@ var lS = class extends Qx {
24705
24756
  _updateMediaDisplay() {
24706
24757
  this._el.content_item.style.height = this.options.height + "px";
24707
24758
  }
24708
- }, CS = class extends Qx {
24759
+ }, wS = class extends $x {
24709
24760
  _loadMedia() {
24710
24761
  this.message.updateMessage(M.messages.loading + " " + this.options.media_name), this._el.content_item = N.create("div", "vco-media-item vco-media-iframe vco-media-juxtapose", this._el.content), this._el.content_item.innerHTML = `<iframe src="${this.data.url}" />`, this.onLoaded();
24711
24762
  }
@@ -24715,115 +24766,115 @@ var lS = class extends Qx {
24715
24766
  };
24716
24767
  //#endregion
24717
24768
  //#region src/media/MediaType.ts
24718
- function wS(e) {
24769
+ function TS(e) {
24719
24770
  let t = [
24720
24771
  {
24721
24772
  type: "youtube",
24722
24773
  name: "YouTube",
24723
24774
  match_str: "(www.)?youtube|youtu.be",
24724
- cls: eS
24775
+ cls: tS
24725
24776
  },
24726
24777
  {
24727
24778
  type: "vimeo",
24728
24779
  name: "Vimeo",
24729
24780
  match_str: "(player.)?vimeo.com",
24730
- cls: fS
24781
+ cls: pS
24731
24782
  },
24732
24783
  {
24733
24784
  type: "dailymotion",
24734
24785
  name: "DailyMotion",
24735
24786
  match_str: "(www.)?dailymotion.com",
24736
- cls: hS
24787
+ cls: gS
24737
24788
  },
24738
24789
  {
24739
24790
  type: "soundcloud",
24740
24791
  name: "SoundCloud",
24741
24792
  match_str: "(player.)?soundcloud.com",
24742
- cls: dS
24793
+ cls: fS
24743
24794
  },
24744
24795
  {
24745
24796
  type: "twitter",
24746
24797
  name: "Twitter",
24747
24798
  match_str: "^(https?:)?/+(www.)?(twitter|x).com",
24748
- cls: gS
24799
+ cls: _S
24749
24800
  },
24750
24801
  {
24751
24802
  type: "flickr",
24752
24803
  name: "Flickr",
24753
24804
  match_str: "flickr.com/photos",
24754
- cls: _S
24805
+ cls: vS
24755
24806
  },
24756
24807
  {
24757
24808
  type: "image",
24758
24809
  name: "Image",
24759
24810
  match_str: /jpg|jpeg|png|gif|webp/i,
24760
- cls: $x
24811
+ cls: eS
24761
24812
  },
24762
24813
  {
24763
24814
  type: "video",
24764
24815
  name: "Video",
24765
24816
  match_str: /(mp4|webm)(\?.*)?$/i,
24766
- cls: pS
24817
+ cls: mS
24767
24818
  },
24768
24819
  {
24769
24820
  type: "audio",
24770
24821
  name: "Audio",
24771
24822
  match_str: /(mp3|wav|m4a)(\?.*)?$/i,
24772
- cls: mS
24823
+ cls: hS
24773
24824
  },
24774
24825
  {
24775
24826
  type: "googledocs",
24776
24827
  name: "Google Doc",
24777
24828
  match_str: "^(https?:)?/*[^.]*.google.com/[^/]*/d/[^/]*/[^/]*?usp=sharing|^(https?:)?/*drive.google.com/open?id=[^&]*&authuser=0|^(https?:)?//*drive.google.com/open\\?id=[^&]*|^(https?:)?/*[^.]*.googledrive.com/host/[^/]*/",
24778
- cls: vS
24829
+ cls: yS
24779
24830
  },
24780
24831
  {
24781
24832
  type: "wikipedia",
24782
24833
  name: "Wikipedia",
24783
24834
  match_str: "(www.)?wikipedia.org",
24784
- cls: uS
24835
+ cls: dS
24785
24836
  },
24786
24837
  {
24787
24838
  type: "iframe",
24788
24839
  name: "iFrame",
24789
24840
  match_str: "iframe",
24790
- cls: yS
24841
+ cls: bS
24791
24842
  },
24792
24843
  {
24793
24844
  type: "facebook",
24794
24845
  name: "Facebook",
24795
24846
  match_str: "(www.)?facebook.com",
24796
- cls: xS
24847
+ cls: SS
24797
24848
  },
24798
24849
  {
24799
24850
  type: "documentcloud",
24800
24851
  name: "DocumentCloud",
24801
24852
  match_str: "documentcloud.org/documents/",
24802
- cls: SS
24853
+ cls: CS
24803
24854
  },
24804
24855
  {
24805
24856
  type: "juxtapose",
24806
24857
  name: "Juxtapose",
24807
24858
  match_str: "juxtapose",
24808
- cls: CS
24859
+ cls: wS
24809
24860
  },
24810
24861
  {
24811
24862
  type: "blockquote",
24812
24863
  name: "Quote",
24813
24864
  match_str: "blockquote",
24814
- cls: lS
24865
+ cls: uS
24815
24866
  },
24816
24867
  {
24817
24868
  type: "website",
24818
24869
  name: "Website",
24819
24870
  match_str: "https?://",
24820
- cls: bS
24871
+ cls: xS
24821
24872
  },
24822
24873
  {
24823
24874
  type: "",
24824
24875
  name: "",
24825
24876
  match_str: "",
24826
- cls: Qx
24877
+ cls: $x
24827
24878
  }
24828
24879
  ];
24829
24880
  for (let n of t) if (typeof e.url == "string" && e.url.match(n.match_str)) return n;
@@ -24831,7 +24882,7 @@ function wS(e) {
24831
24882
  }
24832
24883
  //#endregion
24833
24884
  //#region src/media/types/Text.ts
24834
- var TS = class {
24885
+ var ES = class {
24835
24886
  constructor(e, t, n) {
24836
24887
  this._el = {
24837
24888
  container: {},
@@ -24882,11 +24933,11 @@ var TS = class {
24882
24933
  }
24883
24934
  this.onLoaded();
24884
24935
  }
24885
- }, ES = class extends Xe(TS) {
24936
+ }, DS = class extends Xe(ES) {
24886
24937
  constructor(...e) {
24887
24938
  super(...e);
24888
24939
  }
24889
- }, DS = class {
24940
+ }, OS = class {
24890
24941
  constructor(e, t, n) {
24891
24942
  this._el = {
24892
24943
  container: {},
@@ -24895,7 +24946,7 @@ var TS = class {
24895
24946
  content_container: {},
24896
24947
  content: {},
24897
24948
  call_to_action: null
24898
- }, this._media = null, this._mediaclass = {}, this._text = {}, this._state = { loaded: !1 }, this.has = {
24949
+ }, this._media = null, this._mediaclass = {}, this._text = {}, this._state = { loaded: !1 }, this._scroll_hint = null, this._scroll_hint_dismissed = !1, this.has = {
24899
24950
  headline: !1,
24900
24951
  text: !1,
24901
24952
  media: !1,
@@ -24925,7 +24976,7 @@ var TS = class {
24925
24976
  show() {}
24926
24977
  hide() {}
24927
24978
  setActive(e) {
24928
- this.active = e, this.active ? (this.data.background && this.fire("background_change", this.has.background), this.loadMedia()) : this.stopMedia();
24979
+ this.active = e, this.active ? (this.data.background && this.fire("background_change", this.has.background), this._scroll_hint_dismissed = !1, this.loadMedia(), this._updateScrollHint()) : (this.stopMedia(), this._hideScrollHint());
24929
24980
  }
24930
24981
  updateDisplay(e, t, n) {
24931
24982
  this._updateDisplay(e, t, n);
@@ -24950,31 +25001,56 @@ var TS = class {
24950
25001
  scrollToTop() {
24951
25002
  this._el.container.scrollTop = 0;
24952
25003
  }
25004
+ _updateScrollHint() {
25005
+ if (!this.active || this._scroll_hint_dismissed) {
25006
+ this._hideScrollHint();
25007
+ return;
25008
+ }
25009
+ let e = this._el.container;
25010
+ if (!(e.scrollHeight > e.clientHeight + 1)) {
25011
+ this._hideScrollHint();
25012
+ return;
25013
+ }
25014
+ this._scroll_hint || (this._scroll_hint = N.create("div", "vco-slide-scroll-hint", e), this._scroll_hint.innerHTML = "<span class='vco-icon-arrow-down'></span>", Wx.addListener(this._scroll_hint, "click", this._onScrollHintClick, this)), this._scroll_hint.style.display = "flex";
25015
+ }
25016
+ _hideScrollHint() {
25017
+ this._scroll_hint && (this._scroll_hint.style.display = "none");
25018
+ }
25019
+ _onScrollHintClick() {
25020
+ let e = this._el.container;
25021
+ e.scrollBy({
25022
+ top: e.clientHeight * .8,
25023
+ behavior: "smooth"
25024
+ }), this._scroll_hint_dismissed = !0, this._hideScrollHint();
25025
+ }
25026
+ _onSlideScroll() {
25027
+ this.active && !this._scroll_hint_dismissed && (this._scroll_hint_dismissed = !0, this._hideScrollHint());
25028
+ }
24953
25029
  addCallToAction(e) {
24954
- this._el.call_to_action = N.create("div", "vco-slide-calltoaction", this._el.content_container), this._el.call_to_action.innerHTML = "<span class='vco-slide-calltoaction-button-text'>" + e + "</span>", Ux.addListener(this._el.call_to_action, "click", this._onCallToAction, this);
25030
+ this._el.call_to_action = N.create("div", "vco-slide-calltoaction", this._el.content_container), this._el.call_to_action.innerHTML = "<span class='vco-slide-calltoaction-button-text'>" + e + "</span>", Wx.addListener(this._el.call_to_action, "click", this._onCallToAction, this);
24955
25031
  }
24956
25032
  _onCallToAction(e) {
24957
25033
  this.fire("call_to_action", e);
24958
25034
  }
24959
25035
  _initLayout() {
24960
- if (this._el.container = N.create("div", "vco-slide"), this.data.uniqueid && (this._el.container.id = this.data.uniqueid), this._el.scroll_container = N.create("div", "vco-slide-scrollable-container", this._el.container), this._el.content_container = N.create("div", "vco-slide-content-container", this._el.scroll_container), this._el.content = N.create("div", "vco-slide-content", this._el.content_container), this._el.background = N.create("div", "vco-slide-background", this._el.container), this.data.background) {
25036
+ if (this._el.container = N.create("div", "vco-slide"), this.data.uniqueid && (this._el.container.id = this.data.uniqueid), this._el.scroll_container = N.create("div", "vco-slide-scrollable-container", this._el.container), this._el.content_container = N.create("div", "vco-slide-content-container", this._el.scroll_container), this._el.content = N.create("div", "vco-slide-content", this._el.content_container), this._el.background = N.create("div", "vco-slide-background", this._el.container), this._el.container.addEventListener("scroll", this._onSlideScroll.bind(this), { passive: !0 }), this.data.background) {
24961
25037
  let e = this.data.background;
24962
25038
  e.url && (this.has.background.image = !0, this._el.container.className += " vco-full-image-background", this.has.background.color_value = "#000", this._el.background.style.backgroundImage = "url('" + e.url + "')", this._el.background.style.display = "block"), e.color && (this.has.background.color = !0, this._el.container.className += " vco-full-color-background", this.has.background.color_value = e.color), e.text_background && (this._el.container.className += " vco-text-background");
24963
25039
  }
24964
- this.data.media && this.data.media.url && this.data.media.url !== "" && (this.has.media = !0), this.data.text && this.data.text.text && (this.has.text = !0), this.data.text && this.data.text.headline && (this.has.headline = !0, this.title = this.data.text.headline), this.has.media && (this.data.media.mediatype = wS(this.data.media), this.options.media_name = this.data.media.mediatype.name, this.options.media_type = this.data.media.mediatype.type, this._media = new this.data.media.mediatype.cls(this.data.media, this.options)), (this.has.text || this.has.headline) && (this._text = new ES(this.data.text, {
25040
+ this.data.media && this.data.media.url && this.data.media.url !== "" && (this.has.media = !0), this.data.text && this.data.text.text && (this.has.text = !0), this.data.text && this.data.text.headline && (this.has.headline = !0, this.title = this.data.text.headline), this.has.media && (this.data.media.mediatype = TS(this.data.media), this.options.media_name = this.data.media.mediatype.name, this.options.media_type = this.data.media.mediatype.type, this._media = new this.data.media.mediatype.cls(this.data.media, this.options), this._media.on?.("media_loaded", () => this._updateScrollHint())), (this.has.text || this.has.headline) && (this._text = new DS(this.data.text, {
24965
25041
  title: this.has.title,
24966
25042
  text_align: this.options.text_align
24967
25043
  })), !this.has.text && !this.has.headline && this.has.media ? (this._el.container.className += " vco-slide-media-only", this._media.addTo(this._el.content)) : this.has.headline && this.has.media && !this.has.text ? (this._el.container.className += " vco-slide-media-only", this._text.addTo(this._el.content), this._media.addTo(this._el.content)) : this.has.text && this.has.media ? (this._media.addTo(this._el.content), this._text.addTo(this._el.content)) : (this.has.text || this.has.headline) && (this._el.container.className += " vco-slide-text-only", this._text.addTo(this._el.content)), this.onLoaded();
24968
25044
  }
24969
25045
  _updateDisplay(e, t, n) {
24970
25046
  let r, i, a;
24971
- e ? this.options.width = e : this.options.width = this._el.container.offsetWidth, Px.mobile && this.options.width <= this.options.skinny_size ? (r = "0px", i = "0px", a = this.options.width - 0 + "px") : n === "landscape" ? (r = "40px", i = "75px", a = this.options.width - 115 + "px") : (this.options.width, this.options.skinny_size, r = this.options.slide_padding_lr + "px", i = this.options.slide_padding_lr + "px", a = this.options.width - this.options.slide_padding_lr * 2 + "px"), this._el.content.style.paddingLeft = r, this._el.content.style.paddingRight = i, this._el.content.style.width = a, this._el.call_to_action && (this._el.call_to_action.style.paddingLeft = r, this._el.call_to_action.style.paddingRight = i, this._el.call_to_action.style.width = a), t ? this.options.height = t : this.options.height = this._el.container.offsetHeight, this._media && (!this.has.text && this.has.headline ? this._media.updateDisplay(this.options.width, this.options.height - this._text.headlineHeight(), n) : this._media.updateDisplay(this.options.width, this.options.height, n));
25047
+ e ? this.options.width = e : this.options.width = this._el.container.offsetWidth, Px.mobile && this.options.width <= this.options.skinny_size ? (r = "0px", i = "0px", a = this.options.width - 0 + "px") : n === "landscape" ? (r = "40px", i = "75px", a = this.options.width - 115 + "px") : (this.options.width, this.options.skinny_size, r = this.options.slide_padding_lr + "px", i = this.options.slide_padding_lr + "px", a = this.options.width - this.options.slide_padding_lr * 2 + "px"), this._el.content.style.paddingLeft = r, this._el.content.style.paddingRight = i, this._el.content.style.width = a, this._el.call_to_action && (this._el.call_to_action.style.paddingLeft = r, this._el.call_to_action.style.paddingRight = i, this._el.call_to_action.style.width = a), t ? this.options.height = t : this.options.height = this._el.container.offsetHeight, this._media && (!this.has.text && this.has.headline ? this._media.updateDisplay(this.options.width, this.options.height - this._text.headlineHeight(), n) : this._media.updateDisplay(this.options.width, this.options.height, n)), this._updateScrollHint();
24972
25048
  }
24973
- }, OS = class extends Ze(Xe(DS)) {
25049
+ }, kS = class extends Ze(Xe(OS)) {
24974
25050
  constructor(...e) {
24975
25051
  super(...e);
24976
25052
  }
24977
- }, kS = class {
25053
+ }, AS = class {
24978
25054
  constructor(e, t, n) {
24979
25055
  this.mousedrag = {
24980
25056
  down: "mousedown",
@@ -25041,10 +25117,10 @@ var TS = class {
25041
25117
  }, f(this.options, n);
25042
25118
  }
25043
25119
  enable(e) {
25044
- Ux.addListener(this._el.drag, this.dragevent.down, this._onDragStart, this), Ux.addListener(this._el.drag, this.dragevent.up, this._onDragEnd, this), this.data.pos.start = 0, this._el.move.style.left = this.data.pos.start.x + "px", this._el.move.style.top = this.data.pos.start.y + "px", this._el.move.style.position = "absolute";
25120
+ Wx.addListener(this._el.drag, this.dragevent.down, this._onDragStart, this), Wx.addListener(this._el.drag, this.dragevent.up, this._onDragEnd, this), this.data.pos.start = 0, this._el.move.style.left = this.data.pos.start.x + "px", this._el.move.style.top = this.data.pos.start.y + "px", this._el.move.style.position = "absolute";
25045
25121
  }
25046
25122
  disable() {
25047
- Ux.removeListener(this._el.drag, this.dragevent.down, this._onDragStart, this), Ux.removeListener(this._el.drag, this.dragevent.up, this._onDragEnd, this);
25123
+ Wx.removeListener(this._el.drag, this.dragevent.down, this._onDragStart, this), Wx.removeListener(this._el.drag, this.dragevent.up, this._onDragEnd, this);
25048
25124
  }
25049
25125
  stopMomentum() {
25050
25126
  this.animator && this.animator.stop();
@@ -25056,10 +25132,10 @@ var TS = class {
25056
25132
  this.animator && this.animator.stop(), Px.touch ? e.originalEvent ? (this.data.pagex.start = e.originalEvent.touches[0].screenX, this.data.pagey.start = e.originalEvent.touches[0].screenY) : (this.data.pagex.start = e.targetTouches[0].screenX, this.data.pagey.start = e.targetTouches[0].screenY) : (this.data.pagex.start = e.pageX, this.data.pagey.start = e.pageY), this.options.enable.x, this.options.enable.y, this.data.pos.start = {
25057
25133
  x: this._el.move.offsetLeft,
25058
25134
  y: this._el.move.offsetTop
25059
- }, this.data.time.start = Date.now(), this.fire("dragstart", this.data), Ux.addListener(this._el.drag, this.dragevent.move, this._onDragMove, this), Ux.addListener(this._el.drag, this.dragevent.leave, this._onDragEnd, this);
25135
+ }, this.data.time.start = Date.now(), this.fire("dragstart", this.data), Wx.addListener(this._el.drag, this.dragevent.move, this._onDragMove, this), Wx.addListener(this._el.drag, this.dragevent.leave, this._onDragEnd, this);
25060
25136
  }
25061
25137
  _onDragEnd(e) {
25062
- this.data.sliding = !1, Ux.removeListener(this._el.drag, this.dragevent.move, this._onDragMove, this), Ux.removeListener(this._el.drag, this.dragevent.leave, this._onDragEnd, this), this.fire("dragend", this.data), this._momentum();
25138
+ this.data.sliding = !1, Wx.removeListener(this._el.drag, this.dragevent.move, this._onDragMove, this), Wx.removeListener(this._el.drag, this.dragevent.leave, this._onDragEnd, this), this.fire("dragend", this.data), this._momentum();
25063
25139
  }
25064
25140
  _onDragMove(e) {
25065
25141
  let t = {
@@ -25084,7 +25160,7 @@ var TS = class {
25084
25160
  x: !1,
25085
25161
  y: !1
25086
25162
  }, r = !1;
25087
- this.data.direction = null, e.time = (Date.now() - this.data.time.start) * 10, t.time = (Date.now() - this.data.time.start) * 10, t.x = this.options.momentum_multiplier * (Math.abs(this.data.pagex.end) - Math.abs(this.data.pagex.start)), t.y = this.options.momentum_multiplier * (Math.abs(this.data.pagey.end) - Math.abs(this.data.pagey.start)), e.x = Math.round(t.x / t.time), e.y = Math.round(t.y / t.time), this.data.new_pos.x = this.data.pos.end.x + e.x, this.data.new_pos.y = this.data.pos.end.y + e.y, this.options.enable.x ? this.data.new_pos.x > 0 && (this.data.new_pos.x = 0) : this.data.new_pos.x = this.data.pos.start.x, this.options.enable.y ? this.data.new_pos.y < 0 && (this.data.new_pos.y = 0) : this.data.new_pos.y = this.data.pos.start.y, t.time < 2e3 && (r = !0), this.options.enable.x && this.options.enable.y ? Math.abs(t.x) > Math.abs(t.y) ? n.x = !0 : n.y = !0 : this.options.enable.x ? Math.abs(t.x) > Math.abs(t.y) && (n.x = !0) : Math.abs(t.y) > Math.abs(t.x) && (n.y = !0), n.x && (Math.abs(t.x) > this._el.drag.offsetWidth / 2 && (r = !0), Math.abs(t.x) > 1e4 && (this.data.direction = "left", t.x > 0 && (this.data.direction = "right"))), n.y && (Math.abs(t.y) > this._el.drag.offsetHeight / 2 && (r = !0), Math.abs(t.y) > 1e4 && (this.data.direction = "up", t.y > 0 && (this.data.direction = "down"))), this._animateMomentum(), r && this.data.direction ? this.fire("swipe_" + this.data.direction, this.data) : this.data.direction ? this.fire("swipe_nodirection", this.data) : this.options.snap && (this.animator.stop(), this.animator = (0, Kx.default)(this._el.move, {
25163
+ this.data.direction = null, e.time = (Date.now() - this.data.time.start) * 10, t.time = (Date.now() - this.data.time.start) * 10, t.x = this.options.momentum_multiplier * (Math.abs(this.data.pagex.end) - Math.abs(this.data.pagex.start)), t.y = this.options.momentum_multiplier * (Math.abs(this.data.pagey.end) - Math.abs(this.data.pagey.start)), e.x = Math.round(t.x / t.time), e.y = Math.round(t.y / t.time), this.data.new_pos.x = this.data.pos.end.x + e.x, this.data.new_pos.y = this.data.pos.end.y + e.y, this.options.enable.x ? this.data.new_pos.x > 0 && (this.data.new_pos.x = 0) : this.data.new_pos.x = this.data.pos.start.x, this.options.enable.y ? this.data.new_pos.y < 0 && (this.data.new_pos.y = 0) : this.data.new_pos.y = this.data.pos.start.y, t.time < 2e3 && (r = !0), this.options.enable.x && this.options.enable.y ? Math.abs(t.x) > Math.abs(t.y) ? n.x = !0 : n.y = !0 : this.options.enable.x ? Math.abs(t.x) > Math.abs(t.y) && (n.x = !0) : Math.abs(t.y) > Math.abs(t.x) && (n.y = !0), n.x && (Math.abs(t.x) > this._el.drag.offsetWidth / 2 && (r = !0), Math.abs(t.x) > 1e4 && (this.data.direction = "left", t.x > 0 && (this.data.direction = "right"))), n.y && (Math.abs(t.y) > this._el.drag.offsetHeight / 2 && (r = !0), Math.abs(t.y) > 1e4 && (this.data.direction = "up", t.y > 0 && (this.data.direction = "down"))), this._animateMomentum(), r && this.data.direction ? this.fire("swipe_" + this.data.direction, this.data) : this.data.direction ? this.fire("swipe_nodirection", this.data) : this.options.snap && (this.animator.stop(), this.animator = (0, qx.default)(this._el.move, {
25088
25164
  top: this.data.pos.start.y,
25089
25165
  left: this.data.pos.start.x,
25090
25166
  duration: this.options.duration,
@@ -25099,13 +25175,13 @@ var TS = class {
25099
25175
  duration: this.options.duration,
25100
25176
  easing: Je
25101
25177
  };
25102
- this.options.enable.y && ((this.options.constraint.top || this.options.constraint.bottom) && (e.y > this.options.constraint.bottom ? e.y = this.options.constraint.bottom : e.y < this.options.constraint.top && (e.y = this.options.constraint.top)), t.top = Math.floor(e.y) + "px"), this.options.enable.x && ((this.options.constraint.left || this.options.constraint.right) && (e.x >= this.options.constraint.left ? e.x = this.options.constraint.left : e.x < this.options.constraint.right && (e.x = this.options.constraint.right)), t.left = Math.floor(e.x) + "px"), this.animator = (0, Kx.default)(this._el.move, t), this.fire("momentum", this.data);
25178
+ this.options.enable.y && ((this.options.constraint.top || this.options.constraint.bottom) && (e.y > this.options.constraint.bottom ? e.y = this.options.constraint.bottom : e.y < this.options.constraint.top && (e.y = this.options.constraint.top)), t.top = Math.floor(e.y) + "px"), this.options.enable.x && ((this.options.constraint.left || this.options.constraint.right) && (e.x >= this.options.constraint.left ? e.x = this.options.constraint.left : e.x < this.options.constraint.right && (e.x = this.options.constraint.right)), t.left = Math.floor(e.x) + "px"), this.animator = (0, qx.default)(this._el.move, t), this.fire("momentum", this.data);
25103
25179
  }
25104
- }, AS = class extends Xe(kS) {
25180
+ }, jS = class extends Xe(AS) {
25105
25181
  constructor(...e) {
25106
25182
  super(...e);
25107
25183
  }
25108
- }, jS = class {
25184
+ }, MS = class {
25109
25185
  constructor(e, t, n, r) {
25110
25186
  this._el = {
25111
25187
  container: {},
@@ -25122,9 +25198,9 @@ var TS = class {
25122
25198
  width: 600,
25123
25199
  height: 600,
25124
25200
  default_bg_color: {
25125
- r: 256,
25126
- g: 256,
25127
- b: 256
25201
+ r: 255,
25202
+ g: 255,
25203
+ b: 255
25128
25204
  },
25129
25205
  slide_padding_lr: 40,
25130
25206
  start_at_slide: 1,
@@ -25151,7 +25227,7 @@ var TS = class {
25151
25227
  for (let t = 0; t < e.length; t++) e[t].uniqueid === "" && (e[t].uniqueid = v(6, "vco-slide")), t === 0 ? this._createSlide(e[t], !0) : this._createSlide(e[t], !1);
25152
25228
  }
25153
25229
  _createSlide(e, t) {
25154
- let n = new OS(e, this.options, t);
25230
+ let n = new kS(e, this.options, t);
25155
25231
  this._addSlide(n), this._slides.push(n);
25156
25232
  }
25157
25233
  _addSlide(e) {
@@ -25171,7 +25247,7 @@ var TS = class {
25171
25247
  let r = this.current_slide;
25172
25248
  this.current_slide = e;
25173
25249
  let i = Math.abs(e - r), a = Math.max(600, Math.min(1e3 + i * 120, 2e3));
25174
- this.animator && this.animator.stop(), this._swipable && this._swipable.stopMomentum(), t ? (this._el.slider_container.style.left = -(this.slide_spacing * e) + "px", this._onSlideChange(n)) : (this._onSlideChange(n), this.animator = (0, Kx.default)(this._el.slider_container, {
25250
+ this.animator && this.animator.stop(), this._swipable && this._swipable.stopMomentum(), t ? (this._el.slider_container.style.left = -(this.slide_spacing * e) + "px", this._onSlideChange(n)) : (this._onSlideChange(n), this.animator = (0, qx.default)(this._el.slider_container, {
25175
25251
  left: -(this.slide_spacing * e) + "px",
25176
25252
  duration: a,
25177
25253
  easing: this.options.ease
@@ -25205,7 +25281,7 @@ var TS = class {
25205
25281
  let t = !1, n, r = this.options.slide_default_fade, i = "";
25206
25282
  this._el.background.getAttribute("style"), n = e.color_value ? y(e.color_value) : this.options.default_bg_color, this.animator_background && this.animator_background.stop();
25207
25283
  let a = n.r + "," + n.g + "," + n.b;
25208
- (!this.current_bg_color || this.current_bg_color !== a) && (this.current_bg_color = a, t = !0), t && (this.options.layout === "landscape" ? (this._nav.next.setColor(!1), this._nav.previous.setColor(!1), n.r < 255 && n.g < 255 && n.b < 255 && (r = "15%"), e.image && (r = "0%"), i += "opacity:0;", i += "background-image: linear-gradient(to right, rgba(" + a + ",0.0001 ) " + r + ", rgba(" + a + ",0.87) 15%);", i += "background-repeat: repeat-x;", i += "filter: e(%('progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)',argb(" + a + ", 0.0001),argb(" + a + ",0.80)));") : (e.color_value ? i += "background-color:" + e.color_value + ";" : i += "background-color:#FFF;", n.r < 255 && n.g < 255 && n.b < 255 || e.image ? (this._nav.next.setColor(!0), this._nav.previous.setColor(!0)) : (this._nav.next.setColor(!1), this._nav.previous.setColor(!1))), this.animator_background = (0, Kx.default)(this._el.background, {
25284
+ (!this.current_bg_color || this.current_bg_color !== a) && (this.current_bg_color = a, t = !0), t && (this.options.layout === "landscape" ? (this._nav.next.setColor(!1), this._nav.previous.setColor(!1), n.r < 255 && n.g < 255 && n.b < 255 && (r = "15%"), e.image && (r = "0%"), i += "opacity:0;", i += "background-image: linear-gradient(to right, rgba(" + a + ",0.0001 ) " + r + ", rgba(" + a + ",0.87) 15%);", i += "background-repeat: repeat-x;") : (e.color_value ? i += "background-color:" + e.color_value + ";" : i += "background-color:#FFF;", n.r < 255 && n.g < 255 && n.b < 255 || e.image ? (this._nav.next.setColor(!0), this._nav.previous.setColor(!0)) : (this._nav.next.setColor(!1), this._nav.previous.setColor(!1))), this.animator_background = (0, qx.default)(this._el.background, {
25209
25285
  opacity: 0,
25210
25286
  duration: this.options.duration / 2,
25211
25287
  easing: this.options.ease,
@@ -25215,7 +25291,7 @@ var TS = class {
25215
25291
  }));
25216
25292
  }
25217
25293
  fadeInBackground(e) {
25218
- this.animator_background && this.animator_background.stop(), e && this._el.background.setAttribute("style", e), this.animator_background = (0, Kx.default)(this._el.background, {
25294
+ this.animator_background && this.animator_background.stop(), e && this._el.background.setAttribute("style", e), this.animator_background = (0, qx.default)(this._el.background, {
25219
25295
  opacity: 1,
25220
25296
  duration: this.options.duration / 2,
25221
25297
  easing: this.options.ease
@@ -25240,29 +25316,29 @@ var TS = class {
25240
25316
  this.options.width <= this.options.skinny_size || (this._nav.next.updatePosition({ right: "130" }, !1, this.options.duration * 3, this.options.ease, -100, !0), this._nav.previous.updatePosition({ left: "-100" }, !0, this.options.duration * 3, this.options.ease, -200, !0));
25241
25317
  }
25242
25318
  _initLayout() {
25243
- this._el.container.className += " vco-storyslider", this._el.slider_container_mask = N.create("div", "vco-slider-container-mask", this._el.container), this._el.background = N.create("div", "vco-slider-background", this._el.container), this._el.slider_container = N.create("div", "vco-slider-container", this._el.slider_container_mask), this._el.slider_item_container = N.create("div", "vco-slider-item-container", this._el.slider_container), this.options.width = this._el.container.offsetWidth, this.options.height = this._el.container.offsetHeight, this._nav.previous = new Jx({
25319
+ this._el.container.className += " vco-storyslider", this._el.slider_container_mask = N.create("div", "vco-slider-container-mask", this._el.container), this._el.background = N.create("div", "vco-slider-background", this._el.container), this._el.slider_container = N.create("div", "vco-slider-container", this._el.slider_container_mask), this._el.slider_item_container = N.create("div", "vco-slider-item-container", this._el.slider_container), this.options.width = this._el.container.offsetWidth, this.options.height = this._el.container.offsetHeight, this._nav.previous = new Yx({
25244
25320
  title: "Previous",
25245
25321
  description: "description"
25246
- }, { direction: "previous" }), this._nav.next = new Jx({
25322
+ }, { direction: "previous" }), this._nav.next = new Yx({
25247
25323
  title: "Next",
25248
25324
  description: "description"
25249
- }, { direction: "next" }), this._nav.next.addTo(this._el.container), this._nav.previous.addTo(this._el.container), this._el.slider_container.style.left = "0px", Px.touch && (this._swipable = new AS(this._el.slider_container_mask, this._el.slider_container, {
25325
+ }, { direction: "next" }), this._nav.next.addTo(this._el.container), this._nav.previous.addTo(this._el.container), this._el.slider_container.style.left = "0px", Px.touch && (this._swipable = new jS(this._el.slider_container_mask, this._el.slider_container, {
25250
25326
  enable: {
25251
25327
  x: !0,
25252
25328
  y: !1
25253
25329
  },
25254
25330
  snap: !0
25255
- }), this._swipable.enable(), this._message = new Xx({}, {
25331
+ }), this._swipable.enable(), this._message = new Zx({}, {
25256
25332
  message_class: "vco-message-full",
25257
25333
  message_icon_class: "vco-icon-swipe-left"
25258
25334
  }), this._message.updateMessage(M.buttons.swipe_to_navigate), this._message.addTo(this._el.container));
25259
25335
  }
25260
25336
  _initEvents() {
25261
- this._nav.next.on("clicked", this._onNavigation, this), this._nav.previous.on("clicked", this._onNavigation, this), this._message && this._message.on("clicked", this._onMessageClick, this), this._swipable && (this._swipable.on("swipe_left", this._onNavigation, this), this._swipable.on("swipe_right", this._onNavigation, this), this._swipable.on("swipe_nodirection", this._onSwipeNoDirection, this)), this._el.container.setAttribute("tabindex", "0"), Ux.addListener(this._el.container, "keydown", this._onKeyDown, this);
25337
+ this._nav.next.on("clicked", this._onNavigation, this), this._nav.previous.on("clicked", this._onNavigation, this), this._message && this._message.on("clicked", this._onMessageClick, this), this._swipable && (this._swipable.on("swipe_left", this._onNavigation, this), this._swipable.on("swipe_right", this._onNavigation, this), this._swipable.on("swipe_nodirection", this._onSwipeNoDirection, this)), this._el.container.setAttribute("tabindex", "0"), Wx.addListener(this._el.container, "keydown", this._onKeyDown, this);
25262
25338
  }
25263
25339
  _onKeyDown(e) {
25264
25340
  let t = e.key, n = e.target, r = n?.tagName?.toLowerCase();
25265
- r === "input" || r === "textarea" || r === "select" || n?.isContentEditable || (t === "ArrowRight" || t === "ArrowDown" ? (Ux.preventDefault(e), this.next()) : (t === "ArrowLeft" || t === "ArrowUp") && (Ux.preventDefault(e), this.previous()));
25341
+ r === "input" || r === "textarea" || r === "select" || n?.isContentEditable || (t === "ArrowRight" || t === "ArrowDown" ? (Wx.preventDefault(e), this.next()) : (t === "ArrowLeft" || t === "ArrowUp") && (Wx.preventDefault(e), this.previous()));
25266
25342
  }
25267
25343
  _initData() {
25268
25344
  this._createSlides(this.data.slides);
@@ -25292,11 +25368,11 @@ var TS = class {
25292
25368
  _onLoaded() {
25293
25369
  this.fire("loaded", this.data), this._slides.length > 0 && this.fire("title", { title: this._slides[0].title });
25294
25370
  }
25295
- }, MS = class extends Xe(jS) {
25371
+ }, NS = class extends Xe(MS) {
25296
25372
  constructor(...e) {
25297
25373
  super(...e);
25298
25374
  }
25299
- }, NS = class {
25375
+ }, PS = class {
25300
25376
  constructor(e, t, n, r) {
25301
25377
  for (let e in r) {
25302
25378
  let t = r[e];
@@ -25312,7 +25388,7 @@ var TS = class {
25312
25388
  storyslider: !1,
25313
25389
  map: !1
25314
25390
  }, this.data = {}, this.options = {
25315
- script_path: PS.SCRIPT_PATH,
25391
+ script_path: FS.SCRIPT_PATH,
25316
25392
  height: this._el.container.offsetHeight,
25317
25393
  width: this._el.container.offsetWidth,
25318
25394
  layout: "landscape",
@@ -25350,6 +25426,7 @@ var TS = class {
25350
25426
  map_as_image: !1,
25351
25427
  map_access_token: "",
25352
25428
  map_background_color: "#d9d9d9",
25429
+ map_area: "full",
25353
25430
  map_bbox: null,
25354
25431
  consent_required: !1,
25355
25432
  zoomify: void 0,
@@ -25418,7 +25495,10 @@ var TS = class {
25418
25495
  }
25419
25496
  }
25420
25497
  _initOptions() {
25421
- if (p(this.options, this.data), this._data_from_manifest && delete this.options.zoomify, this.options.layout === "landscape" && (this.options.map_center_offset = {
25498
+ if (p(this.options, this.data), this._data_from_manifest && delete this.options.zoomify, this.options.layout === "landscape" && (this.options.map_area === "left" ? this.options.map_center_offset = {
25499
+ left: 0,
25500
+ top: 0
25501
+ } : this.options.map_center_offset = {
25422
25502
  left: -200,
25423
25503
  top: 0
25424
25504
  }), this.options.map_type === "iiif" && this.options.map_as_image && (this.options.map_size_sticky = 2), this.options.map_type === "zoomify" && (this.options.map_size_sticky = 2), this.options.map_as_image && (this.options.calculate_zoom = !1), this.options.map_type === "zoomify") {
@@ -25470,25 +25550,25 @@ var TS = class {
25470
25550
  this.ready && (this.options.text_color && this._el.container.style.setProperty("--vco-color-text", this.options.text_color), this.options.text_background_color && this._el.container.style.setProperty("--vco-color-text-background", this.options.text_background_color), this.updateDisplay());
25471
25551
  }
25472
25552
  _initLayout() {
25473
- this._el.container.className += " vco-storymap", this.options.base_class = this._el.container.className, this.options.text_color && this._el.container.style.setProperty("--vco-color-text", this.options.text_color), this.options.text_background_color && this._el.container.style.setProperty("--vco-color-text-background", this.options.text_background_color), this._el.menubar = N.create("div", "vco-menubar", this._el.container), this._el.map = this._resolveMapElement(), this._el.map || (this._el.map = N.create("div", "vco-map", this._el.container)), this._el.storyslider = N.create("div", "vco-storyslider", this._el.container), this.options.width = this._el.container.offsetWidth, this.options.height = this._el.container.offsetHeight, this._el.map.style.height = "1px", this._el.storyslider.style.top = "1px", this._map = new Hx(this._el.map, this.data, this.options), this.map = this._map._map, this._map.on("loaded", this._onMapLoaded, this), this._el.map.style.backgroundColor = this.options.map_background_color, this._menubar = new Gx(this._el.menubar, this._el.container, this.options), this._storyslider = new MS(this._el.storyslider, this.data, this.options), this._storyslider.on("loaded", this._onStorySliderLoaded, this), this._storyslider.on("title", this._onTitle, this), this._storyslider.init(), this.options.layout === "portrait" ? (this.options.map_height = this.options.height / this.options.map_size_sticky, this.options.storyslider_height = this.options.height - this._el.menubar.offsetHeight - this.options.map_height - 1, this._menubar.setSticky(0)) : (this.options.menubar_height = this._el.menubar.offsetHeight, this.options.map_height = this.options.height, this.options.storyslider_height = this.options.height - this._el.menubar.offsetHeight - 1, this._menubar.setSticky(this.options.menubar_height)), this._updateDisplay(this.options.map_height, !0, 2e3), this._menubar.show(2e3);
25553
+ this._el.container.className += " vco-storymap", this.options.base_class = this._el.container.className, this.options.text_color && this._el.container.style.setProperty("--vco-color-text", this.options.text_color), this.options.text_background_color && this._el.container.style.setProperty("--vco-color-text-background", this.options.text_background_color), this._el.menubar = N.create("div", "vco-menubar", this._el.container), this._el.map = this._resolveMapElement(), this._el.map || (this._el.map = N.create("div", "vco-map", this._el.container)), this._el.storyslider = N.create("div", "vco-storyslider", this._el.container), this.options.width = this._el.container.offsetWidth, this.options.height = this._el.container.offsetHeight, this._el.map.style.height = "1px", this._el.storyslider.style.top = "1px", this._map = new Ux(this._el.map, this.data, this.options), this.map = this._map._map, this._map.on("loaded", this._onMapLoaded, this), this._el.map.style.backgroundColor = this.options.map_background_color, this._menubar = new Kx(this._el.menubar, this._el.container, this.options), this._storyslider = new NS(this._el.storyslider, this.data, this.options), this._storyslider.on("loaded", this._onStorySliderLoaded, this), this._storyslider.on("title", this._onTitle, this), this._storyslider.init(), this.options.layout === "portrait" ? (this.options.map_height = this.options.height / this.options.map_size_sticky, this.options.storyslider_height = this.options.height - this._el.menubar.offsetHeight - this.options.map_height - 1, this._menubar.setSticky(0)) : (this.options.menubar_height = this._el.menubar.offsetHeight, this.options.map_height = this.options.height, this.options.storyslider_height = this.options.height - this._el.menubar.offsetHeight - 1, this._menubar.setSticky(this.options.menubar_height)), this._updateDisplay(this.options.map_height, !0, 2e3), this._menubar.show(2e3);
25474
25554
  }
25475
25555
  _initEvents() {
25476
25556
  this._menubar.on("collapse", this._onMenuBarCollapse, this), this._menubar.on("back_to_start", this._onBackToStart, this), this._menubar.on("overview", this._onOverview, this), this._menubar.on("fullscreen", this._onFullscreenToggle, this), this._storyslider.on("change", this._onSlideChange, this), this._storyslider.on("colorchange", this._onColorChange, this), this._map.on("change", this._onMapChange, this), document.addEventListener("fullscreenchange", this._onFullscreenChange.bind(this));
25477
25557
  }
25478
25558
  _updateDisplay(e, t, n) {
25479
25559
  let r = this.options.duration, i = this.options.base_class;
25480
- n && (r = n), this.options.width = this._el.container.offsetWidth, this.options.height = this._el.container.offsetHeight, this.options.width <= this.options.skinny_size ? this.options.layout = "portrait" : this.options.layout = "landscape", e && (this.options.map_height = e), Px.touch && (this.options.layout = Px.orientation(), i += " vco-mobile"), this.options.layout === "portrait" ? (i += " vco-skinny", this._map.setMapOffset(0, 0), this.options.map_height = this.options.height / this.options.map_size_sticky, this.options.storyslider_height = this.options.height - this.options.map_height - 1, this._menubar.setSticky(0), i += " vco-layout-portrait", t ? (this.animator_map && this.animator_map.stop(), this.animator_map = (0, Kx.default)(this._el.map, {
25560
+ n && (r = n), this.options.width = this._el.container.offsetWidth, this.options.height = this._el.container.offsetHeight, this.options.width <= this.options.skinny_size ? this.options.layout = "portrait" : this.options.layout = "landscape", e && (this.options.map_height = e), Px.touch && (this.options.layout = Px.orientation(), i += " vco-mobile"), this.options.layout === "portrait" ? (i += " vco-skinny", this._map.setMapOffset(0, 0), this.options.map_height = this.options.height / this.options.map_size_sticky, this.options.storyslider_height = this.options.height - this.options.map_height - 1, this._menubar.setSticky(0), i += " vco-layout-portrait", this._el.map.style.width = "100%", t ? (this.animator_map && this.animator_map.stop(), this.animator_map = (0, qx.default)(this._el.map, {
25481
25561
  height: this.options.map_height + "px",
25482
25562
  duration: r,
25483
25563
  easing: Je,
25484
25564
  complete: () => {
25485
25565
  this._map.updateDisplay(this.options.width, this.options.map_height, t, n, this.options.menubar_height);
25486
25566
  }
25487
- }), this.animator_storyslider && this.animator_storyslider.stop(), this.animator_storyslider = (0, Kx.default)(this._el.storyslider, {
25567
+ }), this.animator_storyslider && this.animator_storyslider.stop(), this.animator_storyslider = (0, qx.default)(this._el.storyslider, {
25488
25568
  height: this.options.storyslider_height + "px",
25489
25569
  duration: r,
25490
25570
  easing: Je
25491
- })) : (this._el.map.style.height = Math.ceil(this.options.map_height) + "px", this._el.storyslider.style.height = this.options.storyslider_height + "px"), this._menubar.updateDisplay(this.options.width, this.options.height, t), this._map.updateDisplay(this.options.width, this.options.height, !1), this._storyslider.updateDisplay(this.options.width, this.options.storyslider_height, t, this.options.layout)) : (i += " vco-layout-landscape", this.options.menubar_height = this._el.menubar.offsetHeight, this.options.map_height = this.options.height, this.options.storyslider_height = this.options.height, this._menubar.setSticky(this.options.menubar_height), this._menubar.setSticky(this.options.menubar_height), this._el.map.style.height = this.options.height + "px", this._map.setMapOffset(-(this.options.width / 4), 0), this._el.storyslider.style.top = "0", this._el.storyslider.style.height = this.options.storyslider_height + "px", this._menubar.updateDisplay(this.options.width, this.options.height, t), this._map.updateDisplay(this.options.width, this.options.height, t, n), this._storyslider.updateDisplay(this.options.width / 2, this.options.storyslider_height, t, this.options.layout)), this.options.language.direction === "rtl" && (i += " vco-rtl"), this._el.container.className = i;
25571
+ })) : (this._el.map.style.height = Math.ceil(this.options.map_height) + "px", this._el.storyslider.style.height = this.options.storyslider_height + "px"), this._menubar.updateDisplay(this.options.width, this.options.height, t), this._map.updateDisplay(this.options.width, this.options.height, !1), this._storyslider.updateDisplay(this.options.width, this.options.storyslider_height, t, this.options.layout)) : (i += " vco-layout-landscape", this.options.menubar_height = this._el.menubar.offsetHeight, this.options.map_height = this.options.height, this.options.storyslider_height = this.options.height, this._menubar.setSticky(this.options.menubar_height), this._menubar.setSticky(this.options.menubar_height), this._el.map.style.height = this.options.height + "px", this.options.map_area === "left" ? (i += " vco-map-area-left", this._el.map.style.width = Math.floor(this.options.width / 2) + "px", this._map.setMapOffset(0, 0)) : (this._el.map.style.width = "100%", this._map.setMapOffset(-(this.options.width / 4), 0)), this._el.storyslider.style.top = "0", this._el.storyslider.style.height = this.options.storyslider_height + "px", this._menubar.updateDisplay(this.options.width, this.options.height, t), this._map.updateDisplay(this.options.width, this.options.height, t, n), this._storyslider.updateDisplay(this.options.width / 2, this.options.storyslider_height, t, this.options.layout)), this.options.language.direction === "rtl" && (i += " vco-rtl"), this._el.container.className = i;
25492
25572
  }
25493
25573
  _onDataLoaded(e) {
25494
25574
  this.options.consent_manager = new Ne(), this.fire("dataloaded"), this._initLayout(), this._loadFontCss().catch((e) => {
@@ -25590,13 +25670,13 @@ var TS = class {
25590
25670
  _onLoaded() {
25591
25671
  this._loaded.storyslider && this._loaded.map && (this.fire("loaded", this.data), this._hash_initialized || (this._hash_initialized = !0, this._applyHashSlide(), window.addEventListener("hashchange", () => this._applyHashSlide()), this._syncHash()), this._updateProgress(), this._updateDistance());
25592
25672
  }
25593
- }, PS = class extends Xe(NS) {
25673
+ }, FS = class extends Xe(PS) {
25594
25674
  static SCRIPT_PATH = new URL("../", "" + import.meta.url).href;
25595
25675
  constructor(...e) {
25596
25676
  super(...e);
25597
25677
  }
25598
25678
  };
25599
25679
  //#endregion
25600
- export { wS as MediaType, PS as StoryMap, D as loadCSS, Ae as setLanguage, A as validateStorymap, ne as validateStorymapAndReport };
25680
+ export { TS as MediaType, FS as StoryMap, D as loadCSS, Ae as setLanguage, A as validateStorymap, ne as validateStorymapAndReport };
25601
25681
 
25602
25682
  //# sourceMappingURL=storymap.js.map