pptx-react-viewer 1.1.5 → 1.1.6

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 (26) hide show
  1. package/dist/index.js +353 -63
  2. package/dist/index.mjs +354 -64
  3. package/dist/viewer/index.js +353 -63
  4. package/dist/viewer/index.mjs +354 -64
  5. package/node_modules/emf-converter/package.json +1 -1
  6. package/node_modules/mtx-decompressor/package.json +1 -1
  7. package/node_modules/pptx-viewer-core/dist/{SvgExporter-BQ4KbRO9.d.mts → SvgExporter-BTkk4oNQ.d.mts} +1 -1
  8. package/node_modules/pptx-viewer-core/dist/{SvgExporter-0TxiiorD.d.ts → SvgExporter-CTDG-t_z.d.ts} +1 -1
  9. package/node_modules/pptx-viewer-core/dist/cli/index.d.mts +2 -2
  10. package/node_modules/pptx-viewer-core/dist/cli/index.d.ts +2 -2
  11. package/node_modules/pptx-viewer-core/dist/cli/index.js +0 -0
  12. package/node_modules/pptx-viewer-core/dist/cli/index.mjs +0 -0
  13. package/node_modules/pptx-viewer-core/dist/converter/index.d.mts +3 -3
  14. package/node_modules/pptx-viewer-core/dist/converter/index.d.ts +3 -3
  15. package/node_modules/pptx-viewer-core/dist/converter/index.js +0 -0
  16. package/node_modules/pptx-viewer-core/dist/converter/index.mjs +0 -0
  17. package/node_modules/pptx-viewer-core/dist/index.d.mts +867 -49
  18. package/node_modules/pptx-viewer-core/dist/index.d.ts +867 -49
  19. package/node_modules/pptx-viewer-core/dist/index.js +29459 -16809
  20. package/node_modules/pptx-viewer-core/dist/index.mjs +29443 -16809
  21. package/node_modules/pptx-viewer-core/dist/{presentation-ArhfImJ5.d.mts → presentation-4fhI3din.d.mts} +835 -26
  22. package/node_modules/pptx-viewer-core/dist/{presentation-ArhfImJ5.d.ts → presentation-4fhI3din.d.ts} +835 -26
  23. package/node_modules/pptx-viewer-core/dist/{text-operations-rhJV-A_W.d.ts → text-operations-B9EwbptL.d.ts} +1 -1
  24. package/node_modules/pptx-viewer-core/dist/{text-operations-CLj-sJyk.d.mts → text-operations-C89Jn6S0.d.mts} +1 -1
  25. package/node_modules/pptx-viewer-core/package.json +1 -1
  26. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -198,7 +198,7 @@ function generateUUID() {
198
198
  const uuid = _lut[d0 & 255] + _lut[d0 >> 8 & 255] + _lut[d0 >> 16 & 255] + _lut[d0 >> 24 & 255] + "-" + _lut[d1 & 255] + _lut[d1 >> 8 & 255] + "-" + _lut[d1 >> 16 & 15 | 64] + _lut[d1 >> 24 & 255] + "-" + _lut[d2 & 63 | 128] + _lut[d2 >> 8 & 255] + "-" + _lut[d2 >> 16 & 255] + _lut[d2 >> 24 & 255] + _lut[d3 & 255] + _lut[d3 >> 8 & 255] + _lut[d3 >> 16 & 255] + _lut[d3 >> 24 & 255];
199
199
  return uuid.toLowerCase();
200
200
  }
201
- function clamp(value, min2, max2) {
201
+ function clamp2(value, min2, max2) {
202
202
  return Math.max(min2, Math.min(max2, value));
203
203
  }
204
204
  function euclideanModulo(n, m2) {
@@ -573,7 +573,7 @@ function _generateTables() {
573
573
  }
574
574
  function toHalfFloat(val2) {
575
575
  if (Math.abs(val2) > 65504) warn("DataUtils.toHalfFloat(): Value out of range.");
576
- val2 = clamp(val2, -65504, 65504);
576
+ val2 = clamp2(val2, -65504, 65504);
577
577
  _tables.floatView[0] = val2;
578
578
  const f = _tables.uint32View[0];
579
579
  const e2 = f >> 23 & 511;
@@ -2062,7 +2062,7 @@ var init_three_core = __esm({
2062
2062
  * @param {number} max - The max value.
2063
2063
  * @return {number} The clamped value.
2064
2064
  */
2065
- clamp,
2065
+ clamp: clamp2,
2066
2066
  /**
2067
2067
  * Computes the Euclidean modulo of the given parameters that
2068
2068
  * is `( ( n % m ) + m ) % m`.
@@ -2589,8 +2589,8 @@ var init_three_core = __esm({
2589
2589
  * @return {Vector2} A reference to this vector.
2590
2590
  */
2591
2591
  clamp(min2, max2) {
2592
- this.x = clamp(this.x, min2.x, max2.x);
2593
- this.y = clamp(this.y, min2.y, max2.y);
2592
+ this.x = clamp2(this.x, min2.x, max2.x);
2593
+ this.y = clamp2(this.y, min2.y, max2.y);
2594
2594
  return this;
2595
2595
  }
2596
2596
  /**
@@ -2604,8 +2604,8 @@ var init_three_core = __esm({
2604
2604
  * @return {Vector2} A reference to this vector.
2605
2605
  */
2606
2606
  clampScalar(minVal, maxVal) {
2607
- this.x = clamp(this.x, minVal, maxVal);
2608
- this.y = clamp(this.y, minVal, maxVal);
2607
+ this.x = clamp2(this.x, minVal, maxVal);
2608
+ this.y = clamp2(this.y, minVal, maxVal);
2609
2609
  return this;
2610
2610
  }
2611
2611
  /**
@@ -2620,7 +2620,7 @@ var init_three_core = __esm({
2620
2620
  */
2621
2621
  clampLength(min2, max2) {
2622
2622
  const length2 = this.length();
2623
- return this.divideScalar(length2 || 1).multiplyScalar(clamp(length2, min2, max2));
2623
+ return this.divideScalar(length2 || 1).multiplyScalar(clamp2(length2, min2, max2));
2624
2624
  }
2625
2625
  /**
2626
2626
  * The components of this vector are rounded down to the nearest integer value.
@@ -2745,7 +2745,7 @@ var init_three_core = __esm({
2745
2745
  const denominator = Math.sqrt(this.lengthSq() * v.lengthSq());
2746
2746
  if (denominator === 0) return Math.PI / 2;
2747
2747
  const theta = this.dot(v) / denominator;
2748
- return Math.acos(clamp(theta, -1, 1));
2748
+ return Math.acos(clamp2(theta, -1, 1));
2749
2749
  }
2750
2750
  /**
2751
2751
  * Computes the distance from the given vector to this instance.
@@ -3232,7 +3232,7 @@ var init_three_core = __esm({
3232
3232
  * @return {number} The angle in radians.
3233
3233
  */
3234
3234
  angleTo(q) {
3235
- return 2 * Math.acos(Math.abs(clamp(this.dot(q), -1, 1)));
3235
+ return 2 * Math.acos(Math.abs(clamp2(this.dot(q), -1, 1)));
3236
3236
  }
3237
3237
  /**
3238
3238
  * Rotates this quaternion by a given angular step to the given quaternion.
@@ -3938,9 +3938,9 @@ var init_three_core = __esm({
3938
3938
  * @return {Vector3} A reference to this vector.
3939
3939
  */
3940
3940
  clamp(min2, max2) {
3941
- this.x = clamp(this.x, min2.x, max2.x);
3942
- this.y = clamp(this.y, min2.y, max2.y);
3943
- this.z = clamp(this.z, min2.z, max2.z);
3941
+ this.x = clamp2(this.x, min2.x, max2.x);
3942
+ this.y = clamp2(this.y, min2.y, max2.y);
3943
+ this.z = clamp2(this.z, min2.z, max2.z);
3944
3944
  return this;
3945
3945
  }
3946
3946
  /**
@@ -3954,9 +3954,9 @@ var init_three_core = __esm({
3954
3954
  * @return {Vector3} A reference to this vector.
3955
3955
  */
3956
3956
  clampScalar(minVal, maxVal) {
3957
- this.x = clamp(this.x, minVal, maxVal);
3958
- this.y = clamp(this.y, minVal, maxVal);
3959
- this.z = clamp(this.z, minVal, maxVal);
3957
+ this.x = clamp2(this.x, minVal, maxVal);
3958
+ this.y = clamp2(this.y, minVal, maxVal);
3959
+ this.z = clamp2(this.z, minVal, maxVal);
3960
3960
  return this;
3961
3961
  }
3962
3962
  /**
@@ -3971,7 +3971,7 @@ var init_three_core = __esm({
3971
3971
  */
3972
3972
  clampLength(min2, max2) {
3973
3973
  const length2 = this.length();
3974
- return this.divideScalar(length2 || 1).multiplyScalar(clamp(length2, min2, max2));
3974
+ return this.divideScalar(length2 || 1).multiplyScalar(clamp2(length2, min2, max2));
3975
3975
  }
3976
3976
  /**
3977
3977
  * The components of this vector are rounded down to the nearest integer value.
@@ -4181,7 +4181,7 @@ var init_three_core = __esm({
4181
4181
  const denominator = Math.sqrt(this.lengthSq() * v.lengthSq());
4182
4182
  if (denominator === 0) return Math.PI / 2;
4183
4183
  const theta = this.dot(v) / denominator;
4184
- return Math.acos(clamp(theta, -1, 1));
4184
+ return Math.acos(clamp2(theta, -1, 1));
4185
4185
  }
4186
4186
  /**
4187
4187
  * Computes the distance from the given vector to this instance.
@@ -5870,10 +5870,10 @@ var init_three_core = __esm({
5870
5870
  * @return {Vector4} A reference to this vector.
5871
5871
  */
5872
5872
  clamp(min2, max2) {
5873
- this.x = clamp(this.x, min2.x, max2.x);
5874
- this.y = clamp(this.y, min2.y, max2.y);
5875
- this.z = clamp(this.z, min2.z, max2.z);
5876
- this.w = clamp(this.w, min2.w, max2.w);
5873
+ this.x = clamp2(this.x, min2.x, max2.x);
5874
+ this.y = clamp2(this.y, min2.y, max2.y);
5875
+ this.z = clamp2(this.z, min2.z, max2.z);
5876
+ this.w = clamp2(this.w, min2.w, max2.w);
5877
5877
  return this;
5878
5878
  }
5879
5879
  /**
@@ -5887,10 +5887,10 @@ var init_three_core = __esm({
5887
5887
  * @return {Vector4} A reference to this vector.
5888
5888
  */
5889
5889
  clampScalar(minVal, maxVal) {
5890
- this.x = clamp(this.x, minVal, maxVal);
5891
- this.y = clamp(this.y, minVal, maxVal);
5892
- this.z = clamp(this.z, minVal, maxVal);
5893
- this.w = clamp(this.w, minVal, maxVal);
5890
+ this.x = clamp2(this.x, minVal, maxVal);
5891
+ this.y = clamp2(this.y, minVal, maxVal);
5892
+ this.z = clamp2(this.z, minVal, maxVal);
5893
+ this.w = clamp2(this.w, minVal, maxVal);
5894
5894
  return this;
5895
5895
  }
5896
5896
  /**
@@ -5905,7 +5905,7 @@ var init_three_core = __esm({
5905
5905
  */
5906
5906
  clampLength(min2, max2) {
5907
5907
  const length2 = this.length();
5908
- return this.divideScalar(length2 || 1).multiplyScalar(clamp(length2, min2, max2));
5908
+ return this.divideScalar(length2 || 1).multiplyScalar(clamp2(length2, min2, max2));
5909
5909
  }
5910
5910
  /**
5911
5911
  * The components of this vector are rounded down to the nearest integer value.
@@ -7688,7 +7688,7 @@ var init_three_core = __esm({
7688
7688
  const m31 = te[2], m32 = te[6], m33 = te[10];
7689
7689
  switch (order) {
7690
7690
  case "XYZ":
7691
- this._y = Math.asin(clamp(m13, -1, 1));
7691
+ this._y = Math.asin(clamp2(m13, -1, 1));
7692
7692
  if (Math.abs(m13) < 0.9999999) {
7693
7693
  this._x = Math.atan2(-m23, m33);
7694
7694
  this._z = Math.atan2(-m12, m11);
@@ -7698,7 +7698,7 @@ var init_three_core = __esm({
7698
7698
  }
7699
7699
  break;
7700
7700
  case "YXZ":
7701
- this._x = Math.asin(-clamp(m23, -1, 1));
7701
+ this._x = Math.asin(-clamp2(m23, -1, 1));
7702
7702
  if (Math.abs(m23) < 0.9999999) {
7703
7703
  this._y = Math.atan2(m13, m33);
7704
7704
  this._z = Math.atan2(m21, m22);
@@ -7708,7 +7708,7 @@ var init_three_core = __esm({
7708
7708
  }
7709
7709
  break;
7710
7710
  case "ZXY":
7711
- this._x = Math.asin(clamp(m32, -1, 1));
7711
+ this._x = Math.asin(clamp2(m32, -1, 1));
7712
7712
  if (Math.abs(m32) < 0.9999999) {
7713
7713
  this._y = Math.atan2(-m31, m33);
7714
7714
  this._z = Math.atan2(-m12, m22);
@@ -7718,7 +7718,7 @@ var init_three_core = __esm({
7718
7718
  }
7719
7719
  break;
7720
7720
  case "ZYX":
7721
- this._y = Math.asin(-clamp(m31, -1, 1));
7721
+ this._y = Math.asin(-clamp2(m31, -1, 1));
7722
7722
  if (Math.abs(m31) < 0.9999999) {
7723
7723
  this._x = Math.atan2(m32, m33);
7724
7724
  this._z = Math.atan2(m21, m11);
@@ -7728,7 +7728,7 @@ var init_three_core = __esm({
7728
7728
  }
7729
7729
  break;
7730
7730
  case "YZX":
7731
- this._z = Math.asin(clamp(m21, -1, 1));
7731
+ this._z = Math.asin(clamp2(m21, -1, 1));
7732
7732
  if (Math.abs(m21) < 0.9999999) {
7733
7733
  this._x = Math.atan2(-m23, m22);
7734
7734
  this._y = Math.atan2(-m31, m11);
@@ -7738,7 +7738,7 @@ var init_three_core = __esm({
7738
7738
  }
7739
7739
  break;
7740
7740
  case "XZY":
7741
- this._z = Math.asin(-clamp(m12, -1, 1));
7741
+ this._z = Math.asin(-clamp2(m12, -1, 1));
7742
7742
  if (Math.abs(m12) < 0.9999999) {
7743
7743
  this._x = Math.atan2(m32, m22);
7744
7744
  this._y = Math.atan2(m13, m11);
@@ -9362,8 +9362,8 @@ var init_three_core = __esm({
9362
9362
  */
9363
9363
  setHSL(h2, s, l2, colorSpace = ColorManagement.workingColorSpace) {
9364
9364
  h2 = euclideanModulo(h2, 1);
9365
- s = clamp(s, 0, 1);
9366
- l2 = clamp(l2, 0, 1);
9365
+ s = clamp2(s, 0, 1);
9366
+ l2 = clamp2(l2, 0, 1);
9367
9367
  if (s === 0) {
9368
9368
  this.r = this.g = this.b = l2;
9369
9369
  } else {
@@ -9549,7 +9549,7 @@ var init_three_core = __esm({
9549
9549
  */
9550
9550
  getHex(colorSpace = SRGBColorSpace) {
9551
9551
  ColorManagement.workingToColorSpace(_color.copy(this), colorSpace);
9552
- return Math.round(clamp(_color.r * 255, 0, 255)) * 65536 + Math.round(clamp(_color.g * 255, 0, 255)) * 256 + Math.round(clamp(_color.b * 255, 0, 255));
9552
+ return Math.round(clamp2(_color.r * 255, 0, 255)) * 65536 + Math.round(clamp2(_color.g * 255, 0, 255)) * 256 + Math.round(clamp2(_color.b * 255, 0, 255));
9553
9553
  }
9554
9554
  /**
9555
9555
  * Returns the hexadecimal value of this color as a string (for example, 'FFFFFF').
@@ -18480,13 +18480,13 @@ var init_three_core = __esm({
18480
18480
  vec.crossVectors(tangents[i3 - 1], tangents[i3]);
18481
18481
  if (vec.length() > Number.EPSILON) {
18482
18482
  vec.normalize();
18483
- const theta = Math.acos(clamp(tangents[i3 - 1].dot(tangents[i3]), -1, 1));
18483
+ const theta = Math.acos(clamp2(tangents[i3 - 1].dot(tangents[i3]), -1, 1));
18484
18484
  normals[i3].applyMatrix4(mat.makeRotationAxis(vec, theta));
18485
18485
  }
18486
18486
  binormals[i3].crossVectors(tangents[i3], normals[i3]);
18487
18487
  }
18488
18488
  if (closed === true) {
18489
- let theta = Math.acos(clamp(normals[0].dot(normals[segments]), -1, 1));
18489
+ let theta = Math.acos(clamp2(normals[0].dot(normals[segments]), -1, 1));
18490
18490
  theta /= segments;
18491
18491
  if (tangents[0].dot(vec.crossVectors(normals[0], normals[segments])) > 0) {
18492
18492
  theta = -theta;
@@ -20275,7 +20275,7 @@ var init_three_core = __esm({
20275
20275
  phiLength
20276
20276
  };
20277
20277
  segments = Math.floor(segments);
20278
- phiLength = clamp(phiLength, 0, Math.PI * 2);
20278
+ phiLength = clamp2(phiLength, 0, Math.PI * 2);
20279
20279
  const indices = [];
20280
20280
  const vertices = [];
20281
20281
  const uvs = [];
@@ -21491,7 +21491,7 @@ var init_three_core = __esm({
21491
21491
  this.ior = 1.5;
21492
21492
  Object.defineProperty(this, "reflectivity", {
21493
21493
  get: function() {
21494
- return clamp(2.5 * (this.ior - 1) / (this.ior + 1), 0, 1);
21494
+ return clamp2(2.5 * (this.ior - 1) / (this.ior + 1), 0, 1);
21495
21495
  },
21496
21496
  set: function(reflectivity) {
21497
21497
  this.ior = (1 + 0.4 * reflectivity) / (1 - 0.4 * reflectivity);
@@ -29759,7 +29759,7 @@ var init_three_core = __esm({
29759
29759
  */
29760
29760
  makeSafe() {
29761
29761
  const EPS = 1e-6;
29762
- this.phi = clamp(this.phi, EPS, Math.PI - EPS);
29762
+ this.phi = clamp2(this.phi, EPS, Math.PI - EPS);
29763
29763
  return this;
29764
29764
  }
29765
29765
  /**
@@ -29787,7 +29787,7 @@ var init_three_core = __esm({
29787
29787
  this.phi = 0;
29788
29788
  } else {
29789
29789
  this.theta = Math.atan2(x2, z);
29790
- this.phi = Math.acos(clamp(y / this.radius, -1, 1));
29790
+ this.phi = Math.acos(clamp2(y / this.radius, -1, 1));
29791
29791
  }
29792
29792
  return this;
29793
29793
  }
@@ -30302,7 +30302,7 @@ var init_three_core = __esm({
30302
30302
  const startEnd_startP = _startEnd.dot(_startP);
30303
30303
  let t2 = startEnd_startP / startEnd2;
30304
30304
  if (clampToLine) {
30305
- t2 = clamp(t2, 0, 1);
30305
+ t2 = clamp2(t2, 0, 1);
30306
30306
  }
30307
30307
  return t2;
30308
30308
  }
@@ -30348,27 +30348,27 @@ var init_three_core = __esm({
30348
30348
  if (a2 <= EPSILON) {
30349
30349
  s = 0;
30350
30350
  t2 = f / e2;
30351
- t2 = clamp(t2, 0, 1);
30351
+ t2 = clamp2(t2, 0, 1);
30352
30352
  } else {
30353
30353
  const c3 = _d1.dot(_r);
30354
30354
  if (e2 <= EPSILON) {
30355
30355
  t2 = 0;
30356
- s = clamp(-c3 / a2, 0, 1);
30356
+ s = clamp2(-c3 / a2, 0, 1);
30357
30357
  } else {
30358
30358
  const b2 = _d1.dot(_d2);
30359
30359
  const denom = a2 * e2 - b2 * b2;
30360
30360
  if (denom !== 0) {
30361
- s = clamp((b2 * f - c3 * e2) / denom, 0, 1);
30361
+ s = clamp2((b2 * f - c3 * e2) / denom, 0, 1);
30362
30362
  } else {
30363
30363
  s = 0;
30364
30364
  }
30365
30365
  t2 = (b2 * s + f) / e2;
30366
30366
  if (t2 < 0) {
30367
30367
  t2 = 0;
30368
- s = clamp(-c3 / a2, 0, 1);
30368
+ s = clamp2(-c3 / a2, 0, 1);
30369
30369
  } else if (t2 > 1) {
30370
30370
  t2 = 1;
30371
- s = clamp((b2 - c3) / a2, 0, 1);
30371
+ s = clamp2((b2 - c3) / a2, 0, 1);
30372
30372
  }
30373
30373
  }
30374
30374
  }
@@ -70318,6 +70318,55 @@ var ACTION_BUTTON_PRESETS = [
70318
70318
  label: "Return",
70319
70319
  defaultAction: "prevSlide",
70320
70320
  iconPath: "M18 8 L18 14 L6 14 M6 14 L10 10 M6 14 L10 18"
70321
+ },
70322
+ {
70323
+ shapeType: "actionButtonHome",
70324
+ label: "Home",
70325
+ defaultAction: "firstSlide",
70326
+ // House: roof + body
70327
+ iconPath: "M12 4 L20 11 L20 20 L14 20 L14 14 L10 14 L10 20 L4 20 L4 11 Z"
70328
+ },
70329
+ {
70330
+ shapeType: "actionButtonHelp",
70331
+ label: "Help",
70332
+ defaultAction: "none",
70333
+ // Question mark
70334
+ iconPath: "M9 9 a3 3 0 1 1 4 2.8 c-1 0.4 -1 1.2 -1 2 M12 17 v0.5"
70335
+ },
70336
+ {
70337
+ shapeType: "actionButtonInformation",
70338
+ label: "Information",
70339
+ defaultAction: "none",
70340
+ // Lower-case "i": dot + body
70341
+ iconPath: "M12 6 v0.01 M12 10 v8"
70342
+ },
70343
+ {
70344
+ shapeType: "actionButtonDocument",
70345
+ label: "Document",
70346
+ defaultAction: "none",
70347
+ // Document with folded corner
70348
+ iconPath: "M6 4 L14 4 L18 8 L18 20 L6 20 Z M14 4 L14 8 L18 8"
70349
+ },
70350
+ {
70351
+ shapeType: "actionButtonSound",
70352
+ label: "Sound",
70353
+ defaultAction: "none",
70354
+ // Speaker cone + sound waves
70355
+ iconPath: "M4 10 L4 14 L8 14 L12 18 L12 6 L8 10 Z M16 9 a4 4 0 0 1 0 6 M18 7 a7 7 0 0 1 0 10"
70356
+ },
70357
+ {
70358
+ shapeType: "actionButtonMovie",
70359
+ label: "Movie",
70360
+ defaultAction: "none",
70361
+ // Film strip with play triangle
70362
+ iconPath: "M4 6 L20 6 L20 18 L4 18 Z M10 9 L15 12 L10 15 Z"
70363
+ },
70364
+ {
70365
+ shapeType: "actionButtonBlank",
70366
+ label: "Custom",
70367
+ defaultAction: "none",
70368
+ // No glyph — empty path. The button still renders as a rounded rect via clip-path.
70369
+ iconPath: ""
70321
70370
  }
70322
70371
  ];
70323
70372
  Object.fromEntries(ACTION_BUTTON_PRESETS.map((p3) => [p3.shapeType, p3.defaultAction]));
@@ -72597,8 +72646,8 @@ function hexToRgb2(hex) {
72597
72646
  };
72598
72647
  }
72599
72648
  function rgbToHex(r2, g2, b2) {
72600
- const clamp2 = (v) => Math.max(0, Math.min(255, Math.round(v)));
72601
- return `#${clamp2(r2).toString(16).padStart(2, "0")}${clamp2(g2).toString(16).padStart(2, "0")}${clamp2(b2).toString(16).padStart(2, "0")}`;
72649
+ const clamp3 = (v) => Math.max(0, Math.min(255, Math.round(v)));
72650
+ return `#${clamp3(r2).toString(16).padStart(2, "0")}${clamp3(g2).toString(16).padStart(2, "0")}${clamp3(b2).toString(16).padStart(2, "0")}`;
72602
72651
  }
72603
72652
  function rgbToHsl(r2, g2, b2) {
72604
72653
  const rn = r2 / 255;
@@ -74808,6 +74857,11 @@ function getShapeClipPath(shapeType, adjustments, width, height) {
74808
74857
  }
74809
74858
  const normalized = shapeType.toLowerCase();
74810
74859
  if (normalized === "round1rect" || normalized === "round2samerect" || normalized === "round2diagrect" || normalized === "sniproundrect" || normalized === "snip1rect" || normalized === "snip2diagrect") {
74860
+ if (adjustments?.adj !== void 0 && width && height) {
74861
+ const ratio = Math.min(Math.max(adjustments.adj / 1e5, 0), 0.5);
74862
+ const radiusPx = Math.round(Math.min(width, height) * ratio);
74863
+ return `inset(0 round ${radiusPx}px)`;
74864
+ }
74811
74865
  return "inset(0 round 18px)";
74812
74866
  }
74813
74867
  if (normalized === "can" || normalized === "cylinder") {
@@ -75454,6 +75508,128 @@ function mapDagBlendModeToCss(blend) {
75454
75508
  return void 0;
75455
75509
  }
75456
75510
  }
75511
+ function getImageAlphaFilterId(elementId) {
75512
+ return `imgalpha-${elementId}`;
75513
+ }
75514
+ function hasAdvancedImageAlphaEffects(element2) {
75515
+ if (!pptxViewerCore.isImageLikeElement(element2)) {
75516
+ return false;
75517
+ }
75518
+ const e2 = element2.imageEffects;
75519
+ if (!e2) {
75520
+ return false;
75521
+ }
75522
+ return Boolean(
75523
+ typeof e2.alphaModFix === "number" || e2.alphaInv || e2.alphaCeiling || e2.alphaFloor || typeof e2.alphaRepl === "number" || typeof e2.alphaBiLevel === "number" || typeof e2.biLevel === "number" || e2.lum && (typeof e2.lum.bright === "number" || typeof e2.lum.contrast === "number") || e2.hsl && (typeof e2.hsl.sat === "number" || typeof e2.hsl.lum === "number") || e2.tint && typeof e2.tint.amt === "number" || e2.clrRepl
75524
+ );
75525
+ }
75526
+ function renderImageAlphaSvgFilter(element2) {
75527
+ if (!pptxViewerCore.isImageLikeElement(element2)) {
75528
+ return null;
75529
+ }
75530
+ const e2 = element2.imageEffects;
75531
+ if (!e2 || !hasAdvancedImageAlphaEffects(element2)) {
75532
+ return null;
75533
+ }
75534
+ const filterId = getImageAlphaFilterId(element2.id);
75535
+ const primitives = [];
75536
+ let resultIdx = 0;
75537
+ let inputRef = "SourceGraphic";
75538
+ const next = (jsx229) => {
75539
+ const result = `r${resultIdx++}`;
75540
+ primitives.push(jsx229(inputRef, result));
75541
+ inputRef = result;
75542
+ };
75543
+ if (typeof e2.alphaModFix === "number") {
75544
+ const mul = clamp(e2.alphaModFix / 100, 0, 1);
75545
+ next((inp, out) => /* @__PURE__ */ jsxRuntime.jsx(
75546
+ "feColorMatrix",
75547
+ {
75548
+ in: inp,
75549
+ result: out,
75550
+ type: "matrix",
75551
+ values: `1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 ${mul} 0`
75552
+ },
75553
+ out
75554
+ ));
75555
+ }
75556
+ if (e2.alphaInv) {
75557
+ next((inp, out) => /* @__PURE__ */ jsxRuntime.jsx("feComponentTransfer", { in: inp, result: out, children: /* @__PURE__ */ jsxRuntime.jsx("feFuncA", { type: "linear", slope: -1, intercept: 1 }) }, out));
75558
+ }
75559
+ if (e2.alphaCeiling) {
75560
+ next((inp, out) => /* @__PURE__ */ jsxRuntime.jsx("feComponentTransfer", { in: inp, result: out, children: /* @__PURE__ */ jsxRuntime.jsx("feFuncA", { type: "discrete", tableValues: "0 1 1 1 1 1 1 1 1 1" }) }, out));
75561
+ }
75562
+ if (e2.alphaFloor) {
75563
+ next((inp, out) => /* @__PURE__ */ jsxRuntime.jsx("feComponentTransfer", { in: inp, result: out, children: /* @__PURE__ */ jsxRuntime.jsx("feFuncA", { type: "discrete", tableValues: "0 0 0 0 0 0 0 0 0 1" }) }, out));
75564
+ }
75565
+ if (typeof e2.alphaRepl === "number") {
75566
+ const a2 = clamp(e2.alphaRepl / 100, 0, 1);
75567
+ next((inp, out) => /* @__PURE__ */ jsxRuntime.jsx("feComponentTransfer", { in: inp, result: out, children: /* @__PURE__ */ jsxRuntime.jsx("feFuncA", { type: "linear", slope: 0, intercept: a2 }) }, out));
75568
+ }
75569
+ if (typeof e2.alphaBiLevel === "number") {
75570
+ const t2 = clamp(e2.alphaBiLevel / 100, 0, 1);
75571
+ const table = Array.from({ length: 10 }, (_, i3) => i3 / 10 >= t2 ? "1" : "0").join(" ");
75572
+ next((inp, out) => /* @__PURE__ */ jsxRuntime.jsx("feComponentTransfer", { in: inp, result: out, children: /* @__PURE__ */ jsxRuntime.jsx("feFuncA", { type: "discrete", tableValues: table }) }, out));
75573
+ }
75574
+ if (typeof e2.biLevel === "number") {
75575
+ next((inp, out) => /* @__PURE__ */ jsxRuntime.jsx("feColorMatrix", { in: inp, result: out, type: "saturate", values: "0" }, out));
75576
+ const t2 = clamp(e2.biLevel / 100, 0, 1);
75577
+ const tbl = t2 < 0.5 ? "0 1" : "0 1";
75578
+ next((inp, out) => /* @__PURE__ */ jsxRuntime.jsxs("feComponentTransfer", { in: inp, result: out, children: [
75579
+ /* @__PURE__ */ jsxRuntime.jsx("feFuncR", { type: "discrete", tableValues: tbl }),
75580
+ /* @__PURE__ */ jsxRuntime.jsx("feFuncG", { type: "discrete", tableValues: tbl }),
75581
+ /* @__PURE__ */ jsxRuntime.jsx("feFuncB", { type: "discrete", tableValues: tbl })
75582
+ ] }, out));
75583
+ }
75584
+ if (e2.lum && (typeof e2.lum.bright === "number" || typeof e2.lum.contrast === "number")) {
75585
+ const b2 = (e2.lum.bright ?? 0) / 100;
75586
+ const c2 = 1 + (e2.lum.contrast ?? 0) / 100;
75587
+ const slope = c2;
75588
+ const intercept = b2 + (1 - c2) / 2;
75589
+ next((inp, out) => /* @__PURE__ */ jsxRuntime.jsxs("feComponentTransfer", { in: inp, result: out, children: [
75590
+ /* @__PURE__ */ jsxRuntime.jsx("feFuncR", { type: "linear", slope, intercept }),
75591
+ /* @__PURE__ */ jsxRuntime.jsx("feFuncG", { type: "linear", slope, intercept }),
75592
+ /* @__PURE__ */ jsxRuntime.jsx("feFuncB", { type: "linear", slope, intercept })
75593
+ ] }, out));
75594
+ }
75595
+ if (e2.hsl && typeof e2.hsl.sat === "number") {
75596
+ const v = clamp(1 + e2.hsl.sat / 100, 0, 2);
75597
+ next((inp, out) => /* @__PURE__ */ jsxRuntime.jsx("feColorMatrix", { in: inp, result: out, type: "saturate", values: String(v) }, out));
75598
+ }
75599
+ if (e2.tint && typeof e2.tint.amt === "number" && e2.tint.amt < 0) {
75600
+ const v = clamp(1 + e2.tint.amt / 100, 0, 1);
75601
+ next((inp, out) => /* @__PURE__ */ jsxRuntime.jsx("feColorMatrix", { in: inp, result: out, type: "saturate", values: String(v) }, out));
75602
+ }
75603
+ if (e2.clrRepl) {
75604
+ const c2 = hexToRgbUnit(e2.clrRepl.color);
75605
+ next((inp, out) => /* @__PURE__ */ jsxRuntime.jsx(
75606
+ "feColorMatrix",
75607
+ {
75608
+ in: inp,
75609
+ result: out,
75610
+ type: "matrix",
75611
+ values: `0 0 0 0 ${c2.r} 0 0 0 0 ${c2.g} 0 0 0 0 ${c2.b} 0 0 0 1 0`
75612
+ },
75613
+ out
75614
+ ));
75615
+ }
75616
+ if (primitives.length === 0) {
75617
+ return null;
75618
+ }
75619
+ return /* @__PURE__ */ jsxRuntime.jsx(
75620
+ "svg",
75621
+ {
75622
+ width: 0,
75623
+ height: 0,
75624
+ style: { position: "absolute", overflow: "hidden" },
75625
+ "aria-hidden": "true",
75626
+ children: /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx("filter", { id: filterId, colorInterpolationFilters: "sRGB", children: primitives }) })
75627
+ }
75628
+ );
75629
+ }
75630
+ function clamp(v, lo, hi) {
75631
+ return v < lo ? lo : v > hi ? hi : v;
75632
+ }
75457
75633
  function getDagDuotoneFilterId(elementId) {
75458
75634
  return `dag-duotone-${elementId}`;
75459
75635
  }
@@ -75537,6 +75713,9 @@ function getImageEffectsFilter(element2, options) {
75537
75713
  const filterId = getDuotoneFilterId(element2.id);
75538
75714
  filters.push(`url(#${filterId})`);
75539
75715
  }
75716
+ if (hasAdvancedImageAlphaEffects(element2)) {
75717
+ filters.push(`url(#${getImageAlphaFilterId(element2.id)})`);
75718
+ }
75540
75719
  if (effects.artisticEffect) {
75541
75720
  const radius = effects.artisticRadius ?? 5;
75542
75721
  if (needsSvgArtisticFilter(effects.artisticEffect)) {
@@ -75710,6 +75889,39 @@ function getEffectDagCssFilter(style, elementId) {
75710
75889
  return filters.length > 0 ? filters.join(" ") : void 0;
75711
75890
  }
75712
75891
  var getEffectDagFilter = getEffectDagCssFilter;
75892
+ function getResolvedShapeClipPathFor(shapeType, width, height, adjustments) {
75893
+ if (!shapeType) {
75894
+ return void 0;
75895
+ }
75896
+ if (!Number.isFinite(width) || !Number.isFinite(height) || width <= 0 || height <= 0) {
75897
+ return getShapeClipPath(shapeType, adjustments, width, height);
75898
+ }
75899
+ if (adjustments && Object.keys(adjustments).length > 0) {
75900
+ const adjusted = pptxViewerCore.getAdjustmentAwareShapeClipPath(shapeType, width, height, adjustments);
75901
+ if (adjusted !== void 0) {
75902
+ return adjusted;
75903
+ }
75904
+ }
75905
+ const fromPreset = pptxViewerCore.getShapeClipPathFromPreset(shapeType, width, height, adjustments);
75906
+ if (fromPreset !== void 0) {
75907
+ return fromPreset;
75908
+ }
75909
+ const cloud = pptxViewerCore.getCloudPathForRendering(shapeType, width, height);
75910
+ if (cloud !== void 0) {
75911
+ return cloud;
75912
+ }
75913
+ return getShapeClipPath(shapeType, adjustments, width, height);
75914
+ }
75915
+ function getResolvedShapeClipPath(element2, width, height) {
75916
+ const shapeType = element2.shapeType;
75917
+ if (!shapeType) {
75918
+ return void 0;
75919
+ }
75920
+ const w = element2.width;
75921
+ const h2 = element2.height;
75922
+ const adjustments = element2.shapeAdjustments;
75923
+ return getResolvedShapeClipPathFor(shapeType, w, h2, adjustments);
75924
+ }
75713
75925
 
75714
75926
  // src/viewer/utils/shape-round-rect.ts
75715
75927
  function localClampAdjustment(value) {
@@ -75781,6 +75993,27 @@ var MATERIAL_MAP = {
75781
75993
  filter: "brightness(1.1) contrast(0.85)",
75782
75994
  // Translucent powder: slight translucent glow
75783
75995
  backgroundImage: "radial-gradient(ellipse at 30% 30%, rgba(255,255,255,0.1) 0%, transparent 60%)"
75996
+ },
75997
+ // Legacy materials (PowerPoint 2007 / earlier). Render as muted variants
75998
+ // of the modern equivalents so legacy decks still resemble the originals.
75999
+ legacyMatte: {
76000
+ filter: "brightness(0.92) saturate(0.85)",
76001
+ backgroundImage: "linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 50%, rgba(0,0,0,0.04) 100%)"
76002
+ },
76003
+ legacyPlastic: {
76004
+ filter: "brightness(1.02) contrast(1.03)",
76005
+ boxShadow: "inset -2px -2px 5px rgba(255,255,255,0.3)",
76006
+ backgroundImage: "radial-gradient(ellipse 35% 25% at 25% 20%, rgba(255,255,255,0.15) 0%, transparent 70%)"
76007
+ },
76008
+ legacyMetal: {
76009
+ filter: "brightness(1.05) contrast(1.1) saturate(1.1)",
76010
+ boxShadow: "inset -2px -2px 6px rgba(255,255,255,0.35), inset 1px 1px 3px rgba(255,255,255,0.15)",
76011
+ backgroundImage: "linear-gradient(135deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.06) 25%, transparent 50%, rgba(0,0,0,0.05) 80%)"
76012
+ },
76013
+ legacyWireframe: {
76014
+ filter: "brightness(1) contrast(1.4) saturate(0.6)",
76015
+ // Wireframe: high contrast outline-emphasising look
76016
+ boxShadow: "inset 0 0 0 1px rgba(0,0,0,0.4)"
75784
76017
  }
75785
76018
  };
75786
76019
  function getMaterialCssOverrides(material) {
@@ -76735,8 +76968,7 @@ function getShapeVisualStyle(element2, hasFill, fillColor, strokeWidth, strokeCo
76735
76968
  return {};
76736
76969
  }
76737
76970
  const normalizedShapeType = getShapeType(element2.shapeType);
76738
- const shapeType = element2.shapeType || normalizedShapeType;
76739
- const clipPath = getShapeClipPath(shapeType);
76971
+ const clipPath = getResolvedShapeClipPath(element2);
76740
76972
  const fillOpacity = element2.shapeStyle?.fillOpacity;
76741
76973
  const strokeOpacity = element2.shapeStyle?.strokeOpacity;
76742
76974
  const strokeDash = normalizeStrokeDashType(element2.shapeStyle?.strokeDash);
@@ -77338,7 +77570,7 @@ function getImageMaskStyle(element2) {
77338
77570
  if (normalized === "can" || normalized === "cylinder") {
77339
77571
  return { borderRadius: "48% / 12%" };
77340
77572
  }
77341
- const clipPath = getShapeClipPath(shapeType);
77573
+ const clipPath = getResolvedShapeClipPath(element2);
77342
77574
  if (!clipPath) {
77343
77575
  return void 0;
77344
77576
  }
@@ -78001,8 +78233,8 @@ function hexToRgb3(hex) {
78001
78233
  };
78002
78234
  }
78003
78235
  function rgbToHex2(r2, g2, b2) {
78004
- const clamp2 = (v) => Math.max(0, Math.min(255, Math.round(v)));
78005
- return `#${clamp2(r2).toString(16).padStart(2, "0").toUpperCase()}${clamp2(g2).toString(16).padStart(2, "0").toUpperCase()}${clamp2(b2).toString(16).padStart(2, "0").toUpperCase()}`;
78236
+ const clamp3 = (v) => Math.max(0, Math.min(255, Math.round(v)));
78237
+ return `#${clamp3(r2).toString(16).padStart(2, "0").toUpperCase()}${clamp3(g2).toString(16).padStart(2, "0").toUpperCase()}${clamp3(b2).toString(16).padStart(2, "0").toUpperCase()}`;
78006
78238
  }
78007
78239
  function tintColor(hex, tintFactor) {
78008
78240
  const { r: r2, g: g2, b: b2 } = hexToRgb3(hex);
@@ -78933,13 +79165,13 @@ function cellStyleToCss(style) {
78933
79165
  }
78934
79166
  if (style.textDirection) {
78935
79167
  switch (style.textDirection) {
78936
- case "vertical":
79168
+ case "vert":
78937
79169
  case "eaVert":
78938
79170
  case "wordArtVert":
78939
79171
  case "wordArtVertRtl":
78940
79172
  css.writingMode = "vertical-rl";
78941
79173
  break;
78942
- case "vertical270":
79174
+ case "vert270":
78943
79175
  case "mongolianVert":
78944
79176
  css.writingMode = "vertical-lr";
78945
79177
  break;
@@ -79466,8 +79698,8 @@ function hexToRgb4(hex) {
79466
79698
  ];
79467
79699
  }
79468
79700
  function rgbToHex3(r2, g2, b2) {
79469
- const clamp2 = (v) => Math.max(0, Math.min(255, Math.round(v)));
79470
- return `#${clamp2(r2).toString(16).padStart(2, "0")}${clamp2(g2).toString(16).padStart(2, "0")}${clamp2(b2).toString(16).padStart(2, "0")}`;
79701
+ const clamp3 = (v) => Math.max(0, Math.min(255, Math.round(v)));
79702
+ return `#${clamp3(r2).toString(16).padStart(2, "0")}${clamp3(g2).toString(16).padStart(2, "0")}${clamp3(b2).toString(16).padStart(2, "0")}`;
79471
79703
  }
79472
79704
  function tint(hex, amount) {
79473
79705
  const [r2, g2, b2] = hexToRgb4(hex);
@@ -81385,7 +81617,7 @@ function resolveRegionCode(label) {
81385
81617
  return REGION_ALIAS_MAP[normalized];
81386
81618
  }
81387
81619
  function lerpColor(a2, b2, t2) {
81388
- const clamp2 = (v) => Math.max(0, Math.min(255, Math.round(v)));
81620
+ const clamp3 = (v) => Math.max(0, Math.min(255, Math.round(v)));
81389
81621
  const parse = (hex) => {
81390
81622
  const h2 = hex.replace("#", "");
81391
81623
  return [
@@ -81396,9 +81628,9 @@ function lerpColor(a2, b2, t2) {
81396
81628
  };
81397
81629
  const [r1, g1, b1] = parse(a2);
81398
81630
  const [r2, g2, b22] = parse(b2);
81399
- const r3 = clamp2(r1 + (r2 - r1) * t2);
81400
- const g3 = clamp2(g1 + (g2 - g1) * t2);
81401
- const bl = clamp2(b1 + (b22 - b1) * t2);
81631
+ const r3 = clamp3(r1 + (r2 - r1) * t2);
81632
+ const g3 = clamp3(g1 + (g2 - g1) * t2);
81633
+ const bl = clamp3(b1 + (b22 - b1) * t2);
81402
81634
  return `#${r3.toString(16).padStart(2, "0")}${g3.toString(16).padStart(2, "0")}${bl.toString(16).padStart(2, "0")}`;
81403
81635
  }
81404
81636
  function sequentialColorScale(t2) {
@@ -88150,6 +88382,59 @@ function WarpedText({
88150
88382
  }
88151
88383
  );
88152
88384
  }
88385
+ var GLYPH_BY_SHAPE = Object.fromEntries(
88386
+ ACTION_BUTTON_PRESETS.map((p3) => [p3.shapeType, p3.iconPath])
88387
+ );
88388
+ GLYPH_BY_SHAPE["actionButtonForwardOrNext"] = GLYPH_BY_SHAPE["actionButtonForwardNext"];
88389
+ GLYPH_BY_SHAPE["actionButtonBackOrPrevious"] = GLYPH_BY_SHAPE["actionButtonBackPrevious"];
88390
+ function isActionButtonShape(shapeType) {
88391
+ return Boolean(shapeType && shapeType in GLYPH_BY_SHAPE);
88392
+ }
88393
+ function getActionButtonGlyphPath(shapeType) {
88394
+ if (!shapeType) {
88395
+ return void 0;
88396
+ }
88397
+ const path = GLYPH_BY_SHAPE[shapeType];
88398
+ return path && path.length > 0 ? path : void 0;
88399
+ }
88400
+ function ActionButtonGlyphOverlay({
88401
+ element: element2,
88402
+ color
88403
+ }) {
88404
+ const shapeType = "shapeType" in element2 ? element2.shapeType : void 0;
88405
+ const path = getActionButtonGlyphPath(shapeType);
88406
+ if (!path) {
88407
+ return null;
88408
+ }
88409
+ const stroke = color ?? ("textStyle" in element2 && element2.textStyle?.color || "#ffffff");
88410
+ return /* @__PURE__ */ jsxRuntime.jsx(
88411
+ "svg",
88412
+ {
88413
+ viewBox: "0 0 24 24",
88414
+ width: "100%",
88415
+ height: "100%",
88416
+ preserveAspectRatio: "xMidYMid meet",
88417
+ style: {
88418
+ position: "absolute",
88419
+ inset: 0,
88420
+ pointerEvents: "none",
88421
+ padding: "20%"
88422
+ },
88423
+ "aria-hidden": "true",
88424
+ children: /* @__PURE__ */ jsxRuntime.jsx(
88425
+ "path",
88426
+ {
88427
+ d: path,
88428
+ fill: "none",
88429
+ stroke,
88430
+ strokeWidth: 2,
88431
+ strokeLinecap: "round",
88432
+ strokeLinejoin: "round"
88433
+ }
88434
+ )
88435
+ }
88436
+ );
88437
+ }
88153
88438
  function ColorChangedImage({
88154
88439
  src,
88155
88440
  clrChange,
@@ -88420,6 +88705,7 @@ function renderImg(el, style, filter, alt, opacity) {
88420
88705
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
88421
88706
  tileDuotoneColors && renderDuotoneSvgFilter(el.id, tileDuotoneColors.color1, tileDuotoneColors.color2),
88422
88707
  renderArtisticEffectSvgFilter(el.id, artisticEffectName, artisticRadius),
88708
+ renderImageAlphaSvgFilter(el),
88423
88709
  /* @__PURE__ */ jsxRuntime.jsx(
88424
88710
  "div",
88425
88711
  {
@@ -88441,6 +88727,7 @@ function renderImg(el, style, filter, alt, opacity) {
88441
88727
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
88442
88728
  duotoneColors && !useDuotoneCanvas && renderDuotoneSvgFilter(el.id, duotoneColors.color1, duotoneColors.color2),
88443
88729
  renderArtisticEffectSvgFilter(el.id, artisticEffectName, artisticRadius),
88730
+ renderImageAlphaSvgFilter(el),
88444
88731
  useDuotoneCanvas && duotoneColors ? /* @__PURE__ */ jsxRuntime.jsx(
88445
88732
  DuotoneImage,
88446
88733
  {
@@ -90949,8 +91236,11 @@ function renderBody(el, isImg, isEditing, editText, spellCheck, txtSE, txtS, vec
90949
91236
  ...scene3dStyle.perspective ? { perspective: scene3dStyle.perspective } : {},
90950
91237
  ...scene3dStyle.transformStyle ? { transformStyle: scene3dStyle.transformStyle } : {}
90951
91238
  } : void 0;
91239
+ const shapeTypeForGlyph = "shapeType" in el ? el.shapeType : void 0;
91240
+ const showActionButtonGlyph = isActionButtonShape(shapeTypeForGlyph);
90952
91241
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
90953
91242
  vecShape,
91243
+ showActionButtonGlyph && /* @__PURE__ */ jsxRuntime.jsx(ActionButtonGlyphOverlay, { element: el }),
90954
91244
  isTxtEl ? useSvgWarp ? /* @__PURE__ */ jsxRuntime.jsx(
90955
91245
  "div",
90956
91246
  {