@realsee/dnalogel 2.1.0-alpha.26 → 2.1.0-alpha.28

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 (122) hide show
  1. package/dist/index.cjs.js +556 -0
  2. package/dist/index.es.js +21392 -0
  3. package/dist/index.js +5104 -4997
  4. package/dist/index.umd.js +556 -0
  5. package/docs/classes/CruisePluginController.html +14 -14
  6. package/docs/classes/Magnifier.html +4 -4
  7. package/docs/classes/ModelRoomLabelController.html +4 -4
  8. package/docs/classes/Object3DHelperController.html +9 -9
  9. package/docs/classes/PaintBrush.html +3 -3
  10. package/docs/classes/PanoTagPluginController.html +23 -23
  11. package/docs/enums/CameraMovementEffect.html +2 -2
  12. package/docs/enums/ContentType.html +7 -7
  13. package/docs/enums/DIRECTION.html +1 -1
  14. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -1
  15. package/docs/enums/DimensionType.html +1 -1
  16. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
  17. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +1 -1
  18. package/docs/enums/LinkType.html +1 -1
  19. package/docs/enums/PaintBrushTypeEnum.html +1 -1
  20. package/docs/enums/PointType.html +1 -1
  21. package/docs/enums/Rotation.html +2 -2
  22. package/docs/index.html +1 -1
  23. package/docs/interfaces/CSS3DRenderPluginEventMap.html +2 -2
  24. package/docs/interfaces/CSS3DRenderPluginState.html +2 -2
  25. package/docs/interfaces/CameraMovementPluginExportType.html +2 -2
  26. package/docs/interfaces/ContentTypeMap.html +3 -3
  27. package/docs/interfaces/FloorplanBounding.html +4 -4
  28. package/docs/interfaces/FloorplanData.html +2 -2
  29. package/docs/interfaces/FloorplanEntrance.html +7 -7
  30. package/docs/interfaces/FloorplanExtraObject.html +3 -3
  31. package/docs/interfaces/FloorplanExtraObject3D.html +2 -2
  32. package/docs/interfaces/FloorplanFloorData.html +2 -2
  33. package/docs/interfaces/FloorplanImagePosition.html +2 -2
  34. package/docs/interfaces/FloorplanObserver.html +2 -2
  35. package/docs/interfaces/FloorplanOutlineItem.html +2 -2
  36. package/docs/interfaces/FloorplanPosition.html +2 -2
  37. package/docs/interfaces/FloorplanRoomItem.html +6 -6
  38. package/docs/interfaces/FloorplanRoomLabelItem.html +3 -3
  39. package/docs/interfaces/FloorplanServerBounding.html +4 -4
  40. package/docs/interfaces/FloorplanServerComputedData.html +1 -1
  41. package/docs/interfaces/FloorplanServerData.html +2 -2
  42. package/docs/interfaces/FloorplanServerDoorItem.html +1 -1
  43. package/docs/interfaces/FloorplanServerDoorPosition.html +1 -1
  44. package/docs/interfaces/FloorplanServerEntrance.html +7 -7
  45. package/docs/interfaces/FloorplanServerFloorData.html +2 -2
  46. package/docs/interfaces/FloorplanServerImagePosition.html +2 -2
  47. package/docs/interfaces/FloorplanServerObserver.html +2 -2
  48. package/docs/interfaces/FloorplanServerOutlineItem.html +2 -2
  49. package/docs/interfaces/FloorplanServerPosition.html +2 -2
  50. package/docs/interfaces/FloorplanServerRoomItem.html +7 -7
  51. package/docs/interfaces/FloorplanServerRoomLabelItem.html +3 -3
  52. package/docs/interfaces/ItemLabelPluginData.html +1 -1
  53. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +1 -1
  54. package/docs/interfaces/ItemLabelPluginParametersType.html +1 -1
  55. package/docs/interfaces/LineJson.html +1 -1
  56. package/docs/interfaces/ModelChassisCompassPluginData.html +1 -1
  57. package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -1
  58. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -1
  59. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -1
  60. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -1
  61. package/docs/interfaces/ModelItemLabelPluginData.html +1 -1
  62. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -1
  63. package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -1
  64. package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
  65. package/docs/interfaces/ModelTVVideoPluginData.html +1 -1
  66. package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -1
  67. package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -1
  68. package/docs/interfaces/ModelViewPluginExportType.html +1 -1
  69. package/docs/interfaces/Object3DHelperState.html +1 -1
  70. package/docs/interfaces/OpenParameter.html +2 -2
  71. package/docs/interfaces/PaintBrushAction.html +7 -7
  72. package/docs/interfaces/PaintBrushConfigs.html +1 -1
  73. package/docs/interfaces/PaintBrushState.html +1 -1
  74. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
  75. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -1
  76. package/docs/interfaces/PanoMeasureParameterType.html +2 -2
  77. package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
  78. package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
  79. package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
  80. package/docs/interfaces/PanoRulerProPluginExportType.html +1 -1
  81. package/docs/interfaces/PanoRulerProPluginOptions.html +1 -1
  82. package/docs/interfaces/PanoRulerProPluginParameterType.html +1 -1
  83. package/docs/interfaces/PanoRulerProPluginState.html +1 -1
  84. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -1
  85. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -1
  86. package/docs/interfaces/PanoSpatialTagPluginData.html +1 -1
  87. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -1
  88. package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -1
  89. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -1
  90. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -1
  91. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -1
  92. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -1
  93. package/docs/interfaces/Point.html +1 -1
  94. package/docs/interfaces/PointJson.html +1 -1
  95. package/docs/interfaces/Room.html +1 -1
  96. package/docs/interfaces/RoomInfo.html +1 -1
  97. package/docs/interfaces/RoomLabel.html +7 -7
  98. package/docs/interfaces/RoomRules.html +1 -1
  99. package/docs/interfaces/Rooms.html +1 -1
  100. package/docs/interfaces/Scissor.html +5 -5
  101. package/docs/interfaces/TagConfig.html +3 -3
  102. package/docs/interfaces/Tags.html +3 -3
  103. package/docs/modules.html +21 -21
  104. package/libs/CSS3DRenderPlugin/CSS3DRender.d.ts +15 -4
  105. package/libs/CSS3DRenderPlugin/CSS3DRender.js +197 -143
  106. package/libs/CSS3DRenderPlugin/Controller.d.ts +2 -0
  107. package/libs/CSS3DRenderPlugin/Controller.js +47 -26
  108. package/libs/CSS3DRenderPlugin/utils/CSS3DObjectPlus.d.ts +22 -4
  109. package/libs/CSS3DRenderPlugin/utils/CSS3DObjectPlus.js +56 -37
  110. package/libs/Object3DHelperPlugin/Controller.js +24 -23
  111. package/libs/PanoTagPlugin/Components/Common/MediaItem.js +81 -81
  112. package/libs/PanoTagPlugin/Components/Tag/ImageTextTag.js +69 -68
  113. package/libs/PanoTagPlugin/controller/index.js +1 -1
  114. package/libs/shared-utils/Object3DHelper/Base/BaseController.js +63 -53
  115. package/libs/shared-utils/Object3DHelper/Controller/MoveController.js +12 -13
  116. package/libs/shared-utils/Object3DHelper/Controller/RectangleScaleController.js +43 -45
  117. package/libs/shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js +16 -10
  118. package/libs/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -1
  119. package/libs/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.js +43 -43
  120. package/libs/shared-utils/Object3DHelper/Helper/RotateHelper.js +2 -2
  121. package/libs/shared-utils/Object3DHelper/index.js +12 -12
  122. package/package.json +2 -2
@@ -1,48 +1,67 @@
1
1
  var P = Object.defineProperty;
2
- var W = (c, o, t) => o in c ? P(c, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[o] = t;
3
- var i = (c, o, t) => (W(c, typeof o != "symbol" ? o + "" : o, t), t);
2
+ var k = (p, h, t) => h in p ? P(p, h, { enumerable: !0, configurable: !0, writable: !0, value: t }) : p[h] = t;
3
+ var s = (p, h, t) => (k(p, typeof h != "symbol" ? h + "" : h, t), t);
4
4
  import { CSS3DObject as D } from "three/examples/jsm/renderers/CSS3DRenderer";
5
- import { Vector3 as m } from "three";
6
- import { evenNumber as V } from "./evenNumber.js";
7
- import { centerPoint as E } from "./centerPoint.js";
8
- const f = "1.0.1", H = `CSS3DObjectPlus@${f}`, j = 216e-5, v = 3e-3;
9
- class T extends D {
10
- constructor(t, e, h = v, u = 1) {
11
- const l = Math.max(j, h), p = e[0].distanceTo(e[1]), a = e[1].distanceTo(e[2]), n = V(p / h * u), d = V(a / h * u), x = E(...e);
12
- let g;
13
- if (l === h)
14
- t.style.width = `${n}px`, t.style.height = `${d}px`, g = t;
5
+ import { Vector3 as n } from "three";
6
+ import { evenNumber as f } from "./evenNumber.js";
7
+ import { centerPoint as W } from "./centerPoint.js";
8
+ import { Subscribe as j } from "../../shared-utils/Subscribe.js";
9
+ const w = "1.0.2", v = `CSS3DObjectPlus@${w}`, C = 216e-5, E = 3e-3;
10
+ class z extends D {
11
+ constructor(t, e, o = E, x = 1, M = "front") {
12
+ const l = Math.max(C, o), d = e[0].distanceTo(e[1]), m = e[1].distanceTo(e[2]), c = f(d / o * x), a = f(m / o * x), r = W(...e);
13
+ let u;
14
+ if (l === o)
15
+ t.style.width = `${c}px`, t.style.height = `${a}px`, u = t;
15
16
  else {
16
- const s = document.createElement("div");
17
- s.style.width = `${n}px`, s.style.height = `${d}px`, s.style.pointerEvents = "none";
18
- const b = h / l;
19
- t.style.position = "absolute", t.style.left = "0", t.style.top = "0", t.style.width = `${b * n}px`, t.style.height = `${b * d}px`, s.appendChild(t), g = s;
17
+ const i = document.createElement("div");
18
+ i.style.width = `${c}px`, i.style.height = `${a}px`, i.style.pointerEvents = "none";
19
+ const b = o / l;
20
+ t.style.position = "absolute", t.style.left = "0", t.style.top = "0", t.style.width = `${b * c}px`, t.style.height = `${b * a}px`, i.appendChild(t), u = i;
20
21
  }
21
- super(g);
22
- i(this, "version", f);
23
- i(this, "width");
24
- i(this, "height");
25
- i(this, "domWidthPx");
26
- i(this, "domHeightPx");
27
- i(this, "cornerPoints");
28
- i(this, "ratio");
29
- i(this, "container");
30
- i(this, "centerPosition");
31
- if (this.scale.set(l, l, l), this.cornerPoints = e, this.ratio = h, this.container = t, l === h)
32
- this.width = p, this.height = a, this.domWidthPx = n, this.domHeightPx = d, this.centerPosition = x;
22
+ super(u);
23
+ s(this, "version", w);
24
+ s(this, "width");
25
+ s(this, "height");
26
+ s(this, "domWidthPx");
27
+ s(this, "domHeightPx");
28
+ s(this, "cornerPoints");
29
+ s(this, "ratio");
30
+ s(this, "container");
31
+ s(this, "centerPosition");
32
+ s(this, "mode", "front");
33
+ s(this, "hooks", new j());
34
+ s(this, "isCSS3DObjectPlus", !0);
35
+ if (this.scale.set(l, l, l), this.cornerPoints = e, this.ratio = o, this.container = t, this.mode = M, l === o)
36
+ this.width = d, this.height = m, this.domWidthPx = c, this.domHeightPx = a, this.centerPosition = r;
33
37
  else {
34
- const s = h / l;
35
- this.width = s * p, this.height = s * a, this.domWidthPx = s * n, this.domHeightPx = s * d, this.centerPosition = new m().subVectors(x, e[0]).multiplyScalar(s).add(e[0]);
38
+ const i = o / l;
39
+ this.width = i * d, this.height = i * m, this.domWidthPx = i * c, this.domHeightPx = i * a, this.centerPosition = new n().subVectors(r, e[0]).multiplyScalar(i).add(e[0]);
36
40
  }
37
- t.classList.add(`${H}__container`);
38
- const S = new m().subVectors(e[1], e[0]), r = new m().subVectors(e[3], e[0]), $ = new m().crossVectors(S, r).normalize();
41
+ t.classList.add(`${v}__container`);
42
+ const V = new n().subVectors(e[1], e[0]), y = new n().subVectors(e[3], e[0]), $ = new n().crossVectors(V, y).normalize();
39
43
  this.lookAt($);
40
- const y = this.up.clone().applyQuaternion(this.quaternion), w = r.clone(), O = new m().crossVectors(y, w).normalize();
41
- this.rotateOnWorldAxis(O, y.angleTo(w)), this.position.copy(x);
44
+ const g = this.up.clone().applyQuaternion(this.quaternion), S = y.clone(), O = new n().crossVectors(g, S).normalize();
45
+ this.rotateOnWorldAxis(O, g.angleTo(S)), this.position.copy(r);
46
+ }
47
+ changeMode(t, e) {
48
+ if (t === this.mode)
49
+ return;
50
+ const o = this.mode;
51
+ this.mode = t, this.hooks.emit("changeMode", t, o, e);
52
+ }
53
+ applyScaleMatrix4(t) {
54
+ this.scale.applyMatrix4(t), this.hooks.emit("applyScaleMatrix4", t);
55
+ }
56
+ applyMatrix4(t) {
57
+ super.applyMatrix4(t), this.hooks.emit("applyMatrix4", t);
58
+ }
59
+ applyQuaternion(t) {
60
+ return super.applyQuaternion(t), this.hooks.emit("applyQuaternion", t), this;
42
61
  }
43
62
  }
44
63
  export {
45
- T as CSS3DObjectPlus,
46
- v as DefaultRatio,
47
- j as MinRatio
64
+ z as CSS3DObjectPlus,
65
+ E as DefaultRatio,
66
+ C as MinRatio
48
67
  };
@@ -1,16 +1,16 @@
1
1
  var C = Object.defineProperty;
2
- var w = (i, o, e) => o in i ? C(i, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[o] = e;
3
- var n = (i, o, e) => (w(i, typeof o != "symbol" ? o + "" : o, e), e);
4
- import { Controller as S } from "../base/BasePlugin.js";
2
+ var S = (o, i, e) => i in o ? C(o, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[i] = e;
3
+ var n = (o, i, e) => (S(o, typeof i != "symbol" ? i + "" : i, e), e);
4
+ import { Controller as g } from "../base/BasePlugin.js";
5
5
  import "three";
6
- import { MoveHelper as g } from "../shared-utils/Object3DHelper/Helper/MoveHelper.js";
6
+ import { MoveHelper as w } from "../shared-utils/Object3DHelper/Helper/MoveHelper.js";
7
7
  import { RotateHelper as E } from "../shared-utils/Object3DHelper/Helper/RotateHelper.js";
8
8
  import { RectangleScaleHelper as M } from "../shared-utils/Object3DHelper/Helper/RectangleScaleHelper.js";
9
9
  import "../shared-utils/Object3DHelper/Helper/OutlineHelper.js";
10
10
  import { MoveController as O } from "../shared-utils/Object3DHelper/Controller/MoveController.js";
11
11
  import { ControllerWrapper as p } from "./FiveControllerWrapper.js";
12
- import { Object3DHelper as y } from "../shared-utils/Object3DHelper/index.js";
13
- import { RotateController as D } from "../shared-utils/Object3DHelper/Controller/RotateController.js";
12
+ import { Object3DHelper as D } from "../shared-utils/Object3DHelper/index.js";
13
+ import { RotateController as y } from "../shared-utils/Object3DHelper/Controller/RotateController.js";
14
14
  import { CSS3DScaleController as I } from "../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
15
15
  import "../shared-utils/Subscribe.js";
16
16
  import "../shared-utils/Object3DHelper/Base/BaseHelper.js";
@@ -33,14 +33,14 @@ import "../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
33
33
  import "../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
34
34
  import "../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
35
35
  import "../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
36
- const f = "v1.0.0", d = "Object3DHelperPlugin", h = `${d}@${f}`, j = () => {
36
+ const f = "v1.0.0", d = "Object3DHelperPlugin", h = `${d}@${f}`, k = () => {
37
37
  console.error(`${h} is disposed`);
38
- }, $ = () => {
38
+ }, F = () => {
39
39
  console.warn(`${h} is disabled`);
40
- }, L = () => {
40
+ }, P = () => {
41
41
  console.error(`${h} is disabled`);
42
42
  };
43
- class he extends S {
43
+ class he extends g {
44
44
  constructor(e) {
45
45
  super(e);
46
46
  n(this, "version", f);
@@ -51,7 +51,7 @@ class he extends S {
51
51
  disposed: !1
52
52
  });
53
53
  n(this, "objectHelperMap", /* @__PURE__ */ new Map());
54
- this.five = e, Object.assign(window, { [`__${d.toUpperCase()}_DEBUG__`]: this });
54
+ this.five = e, console.warn("Object3DHelper: \u4F7F\u7528\u6B64\u63D2\u4EF6\u9700\u8981\u5728\u521D\u59CB\u5316five\u65F6\uFF0C\u8BBE\u7F6Efive\u53C2\u6570: { backgroundAlpha: 0, backgroundColor: 0x000000 }"), Object.assign(window, { [`__${d.toUpperCase()}_DEBUG__`]: this });
55
55
  }
56
56
  async show(e) {
57
57
  this.setState({ visible: !0 }, e);
@@ -70,9 +70,9 @@ class he extends S {
70
70
  }
71
71
  setState(e, t) {
72
72
  if (this.state.disposed)
73
- return j();
73
+ return k();
74
74
  if (!this.state.enabled && e.enabled !== !0 && e.disposed !== !0)
75
- return L();
75
+ return P();
76
76
  const r = { ...this.state };
77
77
  this.state = { ...this.state, ...e }, e.disposed !== void 0 && e.disposed !== r.disposed && e.disposed && this.handleDispose(), e.visible !== void 0 && e.visible !== r.visible && this.handleVisible(e.visible), e.enabled !== void 0 && e.enabled !== r.enabled && this.handleEnable(e.enabled), this.hooks.emit("stateChange", { state: this.state, prevState: r });
78
78
  }
@@ -84,30 +84,31 @@ class he extends S {
84
84
  if (!e)
85
85
  return console.error("Object3D is undefined");
86
86
  if (this.objectHelperMap.has(e)) {
87
- console.warn(`Object3DHelperPlugin: object3D ${e.name} already has helper`);
87
+ console.warn(`Object3DHelperPlugin: object3D ${e.name} is already has helper`);
88
88
  return;
89
89
  }
90
- const r = new y();
90
+ const r = new D();
91
91
  this.objectHelperMap.set(e, r);
92
- const a = (c = this.five.getElement()) == null ? void 0 : c.parentElement, m = this.five.camera, { moveHelper: b = !0, rotateHelper: v = !0, scaleHelper: H = !0 } = t;
92
+ const a = (c = this.five.getElement()) == null ? void 0 : c.parentElement, m = this.five.camera, { moveHelper: b = !0, rotateHelper: u = !0, scaleHelper: v = !0 } = t;
93
93
  if (b) {
94
- const s = new g(e), l = new p(this.five, O, e, s);
94
+ const s = new w(e), l = new p(this.five, O, e, s);
95
95
  r.addControllers({ moveController: l.helperController });
96
96
  }
97
- if (v) {
97
+ if (u) {
98
98
  let s;
99
99
  a && m && (s = { container: a });
100
- const l = new E(e, s), u = new p(this.five, D, e, l);
101
- r.addControllers({ rotateController: u.helperController });
100
+ const l = new E(e, s), H = new p(this.five, y, e, l);
101
+ r.addControllers({ rotateController: H.helperController });
102
102
  }
103
- if (H && a) {
103
+ if (v && a) {
104
104
  const s = new M(e, a, m, this.five.scene), l = new p(this.five, I, e, s);
105
105
  r.addControllers({ scaleController: l.helperController });
106
106
  }
107
+ e.isCSS3DObjectPlus && e.changeMode("behind", this.five.scene);
107
108
  }
108
109
  removeObject3DHelper(e) {
109
110
  const t = this.objectHelperMap.get(e);
110
- !t || (this.objectHelperMap.delete(e), t.dispose());
111
+ !t || (e.isCSS3DObjectPlus && e.changeMode("front"), this.objectHelperMap.delete(e), t.dispose());
111
112
  }
112
113
  handleEnable(e, t = !0) {
113
114
  e ? (this.everyHelperDo((r) => r.enable()), this.hooks.emit("enable", { userAction: t })) : (this.everyHelperDo((r) => r.disable()), this.hooks.emit("disable", { userAction: t })), this.state.enabled = e;
@@ -126,7 +127,7 @@ class he extends S {
126
127
  actionIfStateIsEnabled(e, t) {
127
128
  if (this.state.enabled)
128
129
  return e();
129
- t != null && t.warnLog && $();
130
+ t != null && t.warnLog && F();
130
131
  }
131
132
  }
132
133
  export {
@@ -1,147 +1,147 @@
1
- import { S as j, i as C, s as N, a as F, r as U, c as m, n as h, g as _, e as d, b as r, G as q, o as S, l as g, I as f, q as y, p as z, K as k, L } from "../../../index.164f1850.js";
2
- import { Image_Play_Large as P, Image_Play_Small as B } from "../../Assets/Icon.js";
3
- function G(l) {
4
- F(l, "svelte-cwtvzu", ".media-item.svelte-cwtvzu.svelte-cwtvzu{height:100%}.media-content.svelte-cwtvzu.svelte-cwtvzu{width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;-o-object-fit:inherit;object-fit:inherit}.video-icon.svelte-cwtvzu.svelte-cwtvzu{width:12.5rem;height:6.25rem;max-width:60%;max-height:60%;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.video-play-button-container.svelte-cwtvzu.svelte-cwtvzu{display:none;pointer-events:auto;position:absolute;width:100%;height:100%;top:0;left:0}.video-play-button-container.showPlayButton.svelte-cwtvzu.svelte-cwtvzu{display:block}.video-icon.large.svelte-cwtvzu.svelte-cwtvzu{width:12.5rem;height:6.25rem}.video-icon.small.svelte-cwtvzu.svelte-cwtvzu{width:1.75rem;height:1.75rem}.video-icon.svelte-cwtvzu .video-icon-img.svelte-cwtvzu{width:100%;height:100%;background-position:center center;background-size:contain;background-repeat:no-repeat}.video-icon.svelte-cwtvzu .video-icon-img.canPlay.svelte-cwtvzu{cursor:pointer}");
1
+ import { S as C, i as N, s as F, a as U, r as q, c as _, n as y, g as p, e as m, b as u, G as S, o as L, l as b, I as d, q as z, p as k, K as P, L as G } from "../../../index.164f1850.js";
2
+ import { Image_Play_Large as j, Image_Play_Small as B } from "../../Assets/Icon.js";
3
+ function K(o) {
4
+ U(o, "svelte-cwtvzu", ".media-item.svelte-cwtvzu.svelte-cwtvzu{height:100%}.media-content.svelte-cwtvzu.svelte-cwtvzu{width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;-o-object-fit:inherit;object-fit:inherit}.video-icon.svelte-cwtvzu.svelte-cwtvzu{width:12.5rem;height:6.25rem;max-width:60%;max-height:60%;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.video-play-button-container.svelte-cwtvzu.svelte-cwtvzu{display:none;pointer-events:auto;position:absolute;width:100%;height:100%;top:0;left:0}.video-play-button-container.showPlayButton.svelte-cwtvzu.svelte-cwtvzu{display:block}.video-icon.large.svelte-cwtvzu.svelte-cwtvzu{width:12.5rem;height:6.25rem}.video-icon.small.svelte-cwtvzu.svelte-cwtvzu{width:1.75rem;height:1.75rem}.video-icon.svelte-cwtvzu .video-icon-img.svelte-cwtvzu{width:100%;height:100%;background-position:center center;background-size:contain;background-repeat:no-repeat}.video-icon.svelte-cwtvzu .video-icon-img.canPlay.svelte-cwtvzu{cursor:pointer}");
5
5
  }
6
- function I(l) {
7
- let e, t;
8
- function a(u, i) {
9
- if (u[0].type === "Image")
6
+ function I(o) {
7
+ let e;
8
+ function t(a, c) {
9
+ if (a[0].type === "Image")
10
+ return V;
11
+ if (a[0].type === "Video")
10
12
  return M;
11
- if (u[0].type === "Video")
12
- return K;
13
13
  }
14
- let s = a(l), o = s && s(l);
14
+ let s = t(o), i = s && s(o);
15
15
  return {
16
16
  c() {
17
- e = d("div"), o && o.c(), r(e, "class", "media-item svelte-cwtvzu"), r(e, "style", t = `object-fit: ${l[3]};`);
17
+ e = m("div"), i && i.c(), u(e, "class", "media-item svelte-cwtvzu");
18
18
  },
19
- m(u, i) {
20
- m(u, e, i), o && o.m(e, null);
19
+ m(a, c) {
20
+ _(a, e, c), i && i.m(e, null);
21
21
  },
22
- p(u, i) {
23
- s === (s = a(u)) && o ? o.p(u, i) : (o && o.d(1), o = s && s(u), o && (o.c(), o.m(e, null))), i & 8 && t !== (t = `object-fit: ${u[3]};`) && r(e, "style", t);
22
+ p(a, c) {
23
+ s === (s = t(a)) && i ? i.p(a, c) : (i && i.d(1), i = s && s(a), i && (i.c(), i.m(e, null)));
24
24
  },
25
- d(u) {
26
- u && _(e), o && o.d();
25
+ d(a) {
26
+ a && p(e), i && i.d();
27
27
  }
28
28
  };
29
29
  }
30
- function K(l) {
31
- let e, t, a, s, o, u, i, v, p, w;
30
+ function M(o) {
31
+ let e, t, s, i, a, c, n, f, v, w, g;
32
32
  return {
33
33
  c() {
34
- var c;
35
- e = d("video"), o = S(), u = d("div"), i = d("div"), v = d("div"), r(e, "class", "media-content svelte-cwtvzu"), g(e.src, t = l[0].url) || r(e, "src", t), r(e, "poster", a = (c = l[0].videoCoverUrl) != null ? c : void 0), r(e, "preload", s = l[0].videoCoverUrl ? void 0 : "auto"), e.playsInline = !0, r(e, "paused", ""), e.loop = !1, r(e, "crossorigin", ""), e.controls = !1, f(e, "showPlayButton", l[5]), r(v, "class", "video-icon-img svelte-cwtvzu"), y(v, "background-image", "url(" + (l[1] === "large" ? P : B) + ")"), f(v, "canPlay", l[2]), r(i, "class", "video-icon svelte-cwtvzu"), f(i, "large", l[1] === "large"), f(i, "small", l[1] === "small"), r(u, "class", "video-play-button-container svelte-cwtvzu"), f(u, "showPlayButton", l[5]);
34
+ var l;
35
+ e = m("video"), c = L(), n = m("div"), f = m("div"), v = m("div"), u(e, "class", "media-content svelte-cwtvzu"), u(e, "style", t = `object-fit: ${o[3]};`), b(e.src, s = o[0].url) || u(e, "src", s), u(e, "poster", i = (l = o[0].videoCoverUrl) != null ? l : void 0), u(e, "preload", a = o[0].videoCoverUrl ? void 0 : "auto"), e.playsInline = !0, u(e, "paused", ""), e.loop = !1, u(e, "crossorigin", ""), e.controls = !1, d(e, "showPlayButton", o[5]), u(v, "class", "video-icon-img svelte-cwtvzu"), z(v, "background-image", "url(" + (o[1] === "large" ? j : B) + ")"), d(v, "canPlay", o[2]), u(f, "class", "video-icon svelte-cwtvzu"), d(f, "large", o[1] === "large"), d(f, "small", o[1] === "small"), u(n, "class", "video-play-button-container svelte-cwtvzu"), d(n, "showPlayButton", o[5]);
36
36
  },
37
- m(c, n) {
38
- m(c, e, n), l[7](e), m(c, o, n), m(c, u, n), z(u, i), z(i, v), p || (w = [
39
- k(e, "click", l[6]),
40
- k(v, "click", l[8])
41
- ], p = !0);
37
+ m(l, r) {
38
+ _(l, e, r), o[7](e), _(l, c, r), _(l, n, r), k(n, f), k(f, v), w || (g = [
39
+ P(e, "click", o[6]),
40
+ P(v, "click", o[8])
41
+ ], w = !0);
42
42
  },
43
- p(c, n) {
44
- var b;
45
- n & 1 && !g(e.src, t = c[0].url) && r(e, "src", t), n & 1 && a !== (a = (b = c[0].videoCoverUrl) != null ? b : void 0) && r(e, "poster", a), n & 1 && s !== (s = c[0].videoCoverUrl ? void 0 : "auto") && r(e, "preload", s), n & 32 && f(e, "showPlayButton", c[5]), n & 2 && y(v, "background-image", "url(" + (c[1] === "large" ? P : B) + ")"), n & 4 && f(v, "canPlay", c[2]), n & 2 && f(i, "large", c[1] === "large"), n & 2 && f(i, "small", c[1] === "small"), n & 32 && f(u, "showPlayButton", c[5]);
43
+ p(l, r) {
44
+ var h;
45
+ r & 8 && t !== (t = `object-fit: ${l[3]};`) && u(e, "style", t), r & 1 && !b(e.src, s = l[0].url) && u(e, "src", s), r & 1 && i !== (i = (h = l[0].videoCoverUrl) != null ? h : void 0) && u(e, "poster", i), r & 1 && a !== (a = l[0].videoCoverUrl ? void 0 : "auto") && u(e, "preload", a), r & 32 && d(e, "showPlayButton", l[5]), r & 2 && z(v, "background-image", "url(" + (l[1] === "large" ? j : B) + ")"), r & 4 && d(v, "canPlay", l[2]), r & 2 && d(f, "large", l[1] === "large"), r & 2 && d(f, "small", l[1] === "small"), r & 32 && d(n, "showPlayButton", l[5]);
46
46
  },
47
- d(c) {
48
- c && _(e), l[7](null), c && _(o), c && _(u), p = !1, L(w);
47
+ d(l) {
48
+ l && p(e), o[7](null), l && p(c), l && p(n), w = !1, G(g);
49
49
  }
50
50
  };
51
51
  }
52
- function M(l) {
53
- let e, t, a;
52
+ function V(o) {
53
+ let e, t, s, i;
54
54
  return {
55
55
  c() {
56
- e = d("img"), r(e, "class", "media-content svelte-cwtvzu"), g(e.src, t = l[0].url) || r(e, "src", t), r(e, "alt", a = l[0].name);
56
+ e = m("img"), u(e, "class", "media-content svelte-cwtvzu"), u(e, "style", t = `object-fit: ${o[3]};`), b(e.src, s = o[0].url) || u(e, "src", s), u(e, "alt", i = o[0].name);
57
57
  },
58
- m(s, o) {
59
- m(s, e, o);
58
+ m(a, c) {
59
+ _(a, e, c);
60
60
  },
61
- p(s, o) {
62
- o & 1 && !g(e.src, t = s[0].url) && r(e, "src", t), o & 1 && a !== (a = s[0].name) && r(e, "alt", a);
61
+ p(a, c) {
62
+ c & 8 && t !== (t = `object-fit: ${a[3]};`) && u(e, "style", t), c & 1 && !b(e.src, s = a[0].url) && u(e, "src", s), c & 1 && i !== (i = a[0].name) && u(e, "alt", i);
63
63
  },
64
- d(s) {
65
- s && _(e);
64
+ d(a) {
65
+ a && p(e);
66
66
  }
67
67
  };
68
68
  }
69
- function V(l) {
70
- let e, t = l[0] && I(l);
69
+ function A(o) {
70
+ let e, t = o[0] && I(o);
71
71
  return {
72
72
  c() {
73
- t && t.c(), e = U();
73
+ t && t.c(), e = q();
74
74
  },
75
- m(a, s) {
76
- t && t.m(a, s), m(a, e, s);
75
+ m(s, i) {
76
+ t && t.m(s, i), _(s, e, i);
77
77
  },
78
- p(a, [s]) {
79
- a[0] ? t ? t.p(a, s) : (t = I(a), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null);
78
+ p(s, [i]) {
79
+ s[0] ? t ? t.p(s, i) : (t = I(s), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null);
80
80
  },
81
- i: h,
82
- o: h,
83
- d(a) {
84
- t && t.d(a), a && _(e);
81
+ i: y,
82
+ o: y,
83
+ d(s) {
84
+ t && t.d(s), s && p(e);
85
85
  }
86
86
  };
87
87
  }
88
- function A(l, e, t) {
89
- let { media: a } = e, { playButtonIfNeed: s = "small" } = e, { canPlay: o = !0 } = e, { objectFit: u = "cover" } = e, i, v = !1;
90
- const p = () => i == null ? void 0 : i.pause();
91
- function w(n) {
92
- q[n ? "unshift" : "push"](() => {
93
- i = n, t(4, i);
88
+ function D(o, e, t) {
89
+ let { media: s } = e, { playButtonIfNeed: i = "small" } = e, { canPlay: a = !0 } = e, { objectFit: c = "cover" } = e, n, f = !1;
90
+ const v = () => n == null ? void 0 : n.pause();
91
+ function w(l) {
92
+ S[l ? "unshift" : "push"](() => {
93
+ n = l, t(4, n);
94
94
  });
95
95
  }
96
- const c = () => {
97
- !o || i && i.play();
96
+ const g = () => {
97
+ !a || n && n.play();
98
98
  };
99
- return l.$$set = (n) => {
100
- "media" in n && t(0, a = n.media), "playButtonIfNeed" in n && t(1, s = n.playButtonIfNeed), "canPlay" in n && t(2, o = n.canPlay), "objectFit" in n && t(3, u = n.objectFit);
101
- }, l.$$.update = () => {
102
- l.$$.dirty & 16 && i && (t(5, v = i.paused), t(
99
+ return o.$$set = (l) => {
100
+ "media" in l && t(0, s = l.media), "playButtonIfNeed" in l && t(1, i = l.playButtonIfNeed), "canPlay" in l && t(2, a = l.canPlay), "objectFit" in l && t(3, c = l.objectFit);
101
+ }, o.$$.update = () => {
102
+ o.$$.dirty & 16 && n && (t(5, f = n.paused), t(
103
103
  4,
104
- i.onplay = () => {
105
- t(5, v = !1);
104
+ n.onplay = () => {
105
+ t(5, f = !1);
106
106
  },
107
- i
107
+ n
108
108
  ), t(
109
109
  4,
110
- i.onpause = () => {
111
- t(5, v = !0);
110
+ n.onpause = () => {
111
+ t(5, f = !0);
112
112
  },
113
- i
113
+ n
114
114
  ));
115
115
  }, [
116
- a,
117
116
  s,
118
- o,
119
- u,
120
117
  i,
118
+ a,
119
+ c,
120
+ n,
121
+ f,
121
122
  v,
122
- p,
123
123
  w,
124
- c
124
+ g
125
125
  ];
126
126
  }
127
- class H extends j {
127
+ class J extends C {
128
128
  constructor(e) {
129
- super(), C(
129
+ super(), N(
130
130
  this,
131
131
  e,
132
+ D,
132
133
  A,
133
- V,
134
- N,
134
+ F,
135
135
  {
136
136
  media: 0,
137
137
  playButtonIfNeed: 1,
138
138
  canPlay: 2,
139
139
  objectFit: 3
140
140
  },
141
- G
141
+ K
142
142
  );
143
143
  }
144
144
  }
145
145
  export {
146
- H as default
146
+ J as default
147
147
  };