@roomle/web-sdk 3.6.0 → 3.7.0-alpha.1

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 (105) hide show
  1. package/lib/{BufferGeometry-DLEagG41.mjs → BufferGeometry-BLeRuMkh.mjs} +1 -1
  2. package/lib/{BufferGeometry-DLEagG41.mjs.map → BufferGeometry-BLeRuMkh.mjs.map} +1 -1
  3. package/lib/ConfiguratorKernel.js +54 -73
  4. package/lib/ConfiguratorKernel.wasm +0 -0
  5. package/lib/{GLTFExporter-D8qsdwDK.mjs → GLTFExporter-CFXCqoLa.mjs} +141 -141
  6. package/lib/{GLTFExporter-D8qsdwDK.mjs.map → GLTFExporter-CFXCqoLa.mjs.map} +1 -1
  7. package/lib/{PointLightHelper-BnjxGaOG.mjs → PointLightHelper-BEJEy6l_.mjs} +2 -2
  8. package/lib/{PointLightHelper-BnjxGaOG.mjs.map → PointLightHelper-BEJEy6l_.mjs.map} +1 -1
  9. package/lib/RoomleCore.js +59 -79
  10. package/lib/RoomleCore.wasm +0 -0
  11. package/lib/RoomleToolsCore.js +54 -74
  12. package/lib/RoomleToolsCore.wasm +0 -0
  13. package/lib/{SpotLightHelper-DqsfqCrs.mjs → SpotLightHelper-aXFW8qaJ.mjs} +2 -2
  14. package/lib/{SpotLightHelper-DqsfqCrs.mjs.map → SpotLightHelper-aXFW8qaJ.mjs.map} +1 -1
  15. package/lib/{USDZExporter-DxIqi8St.mjs → USDZExporter-B4hsiwhd.mjs} +2 -2
  16. package/lib/{USDZExporter-DxIqi8St.mjs.map → USDZExporter-B4hsiwhd.mjs.map} +1 -1
  17. package/lib/{api-xDJ-Uyom.mjs → api-C2-6Jm5W.mjs} +2 -2
  18. package/lib/{api-xDJ-Uyom.mjs.map → api-C2-6Jm5W.mjs.map} +1 -1
  19. package/lib/{banana-for-scale-C_iNmlCT.mjs → banana-for-scale-BV_na-g3.mjs} +4 -4
  20. package/lib/banana-for-scale-BV_na-g3.mjs.map +1 -0
  21. package/lib/chunk-C97zSiVS.mjs +20 -0
  22. package/lib/{common-utils-DMSTohiS.mjs → common-utils-qErzZAiR.mjs} +2 -2
  23. package/lib/common-utils-qErzZAiR.mjs.map +1 -0
  24. package/lib/{component-dimensioning-CvRmUja4.mjs → component-dimensioning-DCQTqssC.mjs} +49 -49
  25. package/lib/{component-dimensioning-CvRmUja4.mjs.map → component-dimensioning-DCQTqssC.mjs.map} +1 -1
  26. package/lib/{component-raycast-helper-CEp7wy9c.mjs → component-raycast-helper-B3WXp3oq.mjs} +20 -24
  27. package/lib/component-raycast-helper-B3WXp3oq.mjs.map +1 -0
  28. package/lib/configurator-CrNkzBp9.mjs +2 -0
  29. package/lib/configurator-Dx6kcXY_.mjs +45 -0
  30. package/lib/{configurator-CmuhFgC9.mjs.map → configurator-Dx6kcXY_.mjs.map} +1 -1
  31. package/lib/{continuous-drawing-helper-v_5UAM9A.mjs → continuous-drawing-helper-DzULJ9d1.mjs} +12 -12
  32. package/lib/continuous-drawing-helper-DzULJ9d1.mjs.map +1 -0
  33. package/lib/{decorate-C1QnXPYw.mjs → decorate-BIflHDAa.mjs} +1 -1
  34. package/lib/{decorate-C1QnXPYw.mjs.map → decorate-BIflHDAa.mjs.map} +1 -1
  35. package/lib/{dimensioning-helper-Fwpt1HTT.mjs → dimensioning-helper-Cj20VTW0.mjs} +66 -57
  36. package/lib/{dimensioning-helper-Fwpt1HTT.mjs.map → dimensioning-helper-Cj20VTW0.mjs.map} +1 -1
  37. package/lib/{glb-viewer-BzNA9-zH.mjs → glb-viewer-BqFcaUlb.mjs} +52 -52
  38. package/lib/glb-viewer-BqFcaUlb.mjs.map +1 -0
  39. package/lib/glb-viewer-FYw7R-ya.mjs +2 -0
  40. package/lib/{homag-intelligence-BwGjJEws.mjs → homag-intelligence-Dkz0AhB4.mjs} +3 -3
  41. package/lib/{homag-intelligence-BwGjJEws.mjs.map → homag-intelligence-Dkz0AhB4.mjs.map} +1 -1
  42. package/lib/{imos-ix-poc-export-helper-CQh94HsO.mjs → imos-ix-poc-export-helper-BjIgAfUu.mjs} +4 -3
  43. package/lib/imos-ix-poc-export-helper-BjIgAfUu.mjs.map +1 -0
  44. package/lib/kernel-BAQSG9r5.mjs.map +1 -1
  45. package/lib/{kernel-utils-H74uNY1h.mjs → kernel-utils-CfGzR_WC.mjs} +15 -15
  46. package/lib/{kernel-utils-H74uNY1h.mjs.map → kernel-utils-CfGzR_WC.mjs.map} +1 -1
  47. package/lib/{layer-C_JtkhdO.mjs → layer-CFAr2mK_.mjs} +1 -1
  48. package/lib/{layer-C_JtkhdO.mjs.map → layer-CFAr2mK_.mjs.map} +1 -1
  49. package/lib/{main-CtVIB52l.mjs → main-DMIVdAcT.mjs} +14471 -14300
  50. package/lib/main-DMIVdAcT.mjs.map +1 -0
  51. package/lib/{material-viewer-Bq4smZ6f.mjs → material-viewer-BkwvhHbQ.mjs} +40 -40
  52. package/lib/material-viewer-BkwvhHbQ.mjs.map +1 -0
  53. package/lib/planner-BPlxsTRJ.mjs +44 -0
  54. package/lib/{planner-CVw_xzGh.mjs.map → planner-BPlxsTRJ.mjs.map} +1 -1
  55. package/lib/planner-oj08ktHE.mjs +2 -0
  56. package/lib/{plugin-system-D9K46xJk.mjs → plugin-system-XhOJU1MI.mjs} +3 -3
  57. package/lib/{plugin-system-D9K46xJk.mjs.map → plugin-system-XhOJU1MI.mjs.map} +1 -1
  58. package/lib/roomle-renderer-BwPvUqSW.mjs +49 -0
  59. package/lib/roomle-renderer-BwPvUqSW.mjs.map +1 -0
  60. package/lib/roomle-sdk.d.ts +114 -1116
  61. package/lib/roomle-sdk.js +6 -6
  62. package/lib/roomle-webgpu-renderer-CSC5zFdC.mjs +217 -0
  63. package/lib/roomle-webgpu-renderer-CSC5zFdC.mjs.map +1 -0
  64. package/lib/{scene-renderer-D8HkTFeZ.mjs → scene-renderer-DWY_zPvU.mjs} +496 -513
  65. package/lib/scene-renderer-DWY_zPvU.mjs.map +1 -0
  66. package/lib/{script-loader-D8xCRzTr.mjs → script-loader-CA-XHFKN.mjs} +3 -3
  67. package/lib/{script-loader-D8xCRzTr.mjs.map → script-loader-CA-XHFKN.mjs.map} +1 -1
  68. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/package.json +1 -1
  69. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/configuratorCoreInterface.d.ts +0 -1
  70. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.d.ts +3 -3
  71. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.js +54 -73
  72. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
  73. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.js +59 -79
  74. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
  75. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.js +54 -74
  76. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
  77. package/lib/{stats-helper-HM0TaIM5.mjs → stats-helper-C954Cfgh.mjs} +4 -3
  78. package/lib/{stats-helper-HM0TaIM5.mjs.map → stats-helper-C954Cfgh.mjs.map} +1 -1
  79. package/lib/{three.core-CLIofecG.mjs → three.core-mM-jZdgg.mjs} +926 -926
  80. package/lib/{three.core-CLIofecG.mjs.map → three.core-mM-jZdgg.mjs.map} +1 -1
  81. package/lib/{three.module-C4Q1skJQ.mjs → three.module-Bmy3sVQ-.mjs} +1210 -1210
  82. package/lib/{three.module-C4Q1skJQ.mjs.map → three.module-Bmy3sVQ-.mjs.map} +1 -1
  83. package/lib/{three.webgpu-dFspy2yF.mjs → three.webgpu-0l2TztLa.mjs} +5355 -2935
  84. package/lib/{three.webgpu-dFspy2yF.mjs.map → three.webgpu-0l2TztLa.mjs.map} +1 -1
  85. package/lib/{threejs-utils-jEzvlJF1.mjs → threejs-utils-8zlxt158.mjs} +430 -431
  86. package/lib/threejs-utils-8zlxt158.mjs.map +1 -0
  87. package/lib/{tools-core-Bf9WsK5v.mjs → tools-core-BzhFD2Wk.mjs} +3 -3
  88. package/lib/{tools-core-Bf9WsK5v.mjs.map → tools-core-BzhFD2Wk.mjs.map} +1 -1
  89. package/package.json +1 -1
  90. package/lib/banana-for-scale-C_iNmlCT.mjs.map +0 -1
  91. package/lib/common-utils-DMSTohiS.mjs.map +0 -1
  92. package/lib/component-raycast-helper-CEp7wy9c.mjs.map +0 -1
  93. package/lib/configurator-BaUt4_LF.mjs +0 -2
  94. package/lib/configurator-CmuhFgC9.mjs +0 -45
  95. package/lib/continuous-drawing-helper-v_5UAM9A.mjs.map +0 -1
  96. package/lib/dimensioning-helper-DTcW85Oq.mjs +0 -2
  97. package/lib/glb-viewer-BzNA9-zH.mjs.map +0 -1
  98. package/lib/glb-viewer-DOxBD5k-.mjs +0 -2
  99. package/lib/imos-ix-poc-export-helper-CQh94HsO.mjs.map +0 -1
  100. package/lib/main-CtVIB52l.mjs.map +0 -1
  101. package/lib/material-viewer-Bq4smZ6f.mjs.map +0 -1
  102. package/lib/planner-CVw_xzGh.mjs +0 -44
  103. package/lib/planner-si70gWA2.mjs +0 -2
  104. package/lib/scene-renderer-D8HkTFeZ.mjs.map +0 -1
  105. package/lib/threejs-utils-jEzvlJF1.mjs.map +0 -1
@@ -1,6 +1,7 @@
1
- import { $n as e, E as t, Ft as n, Ht as r, K as i, Nt as a, Pt as o, Rr as s, Ut as c, h as l, lr as u, o as d, on as f, pn as p, sr as m, wr as h } from "./three.core-CLIofecG.mjs";
2
- import { V as g, b as _ } from "./common-utils-DMSTohiS.mjs";
3
- import { a as ee } from "./kernel-utils-H74uNY1h.mjs";
1
+ import { B as e, C as t, In as n, Vr as r, Wn as i, cn as a, d as o, gn as s, hn as c, jr as l, oi as u, on as d, sn as f, ut as p, xi as m, zr as h } from "./three.core-mM-jZdgg.mjs";
2
+ import { r as g } from "./three.module-Bmy3sVQ-.mjs";
3
+ import { V as _, b as v } from "./common-utils-qErzZAiR.mjs";
4
+ import { a as ee } from "./kernel-utils-CfGzR_WC.mjs";
4
5
  //#region packages/common-core/src/utils/math-helper.ts
5
6
  var te = function(e) {
6
7
  return Math.PI / 180 * e;
@@ -12,7 +13,7 @@ var te = function(e) {
12
13
  e = Math.sqrt(e * e + n * n);
13
14
  let o = i / a || 1, s = 2 * Math.atan(Math.tan(r * Math.PI / 180 / 2) * o) * 180 / Math.PI, c = te(r), l = t / 2 / Math.tan(c / 2), u = e / (2 * Math.atan(Math.PI * s / 360));
14
15
  return Math.max(l, u);
15
- }, v = function(e) {
16
+ }, y = function(e) {
16
17
  return Math.round(e * 1e3) / 1e3;
17
18
  }, ae = function(e, t) {
18
19
  return Math.abs(e.y - t.y) + Math.abs(e.x - t.x);
@@ -52,7 +53,7 @@ function he(e) {
52
53
  return t.setAttribute("type", "text/css"), t.innerHTML = e, document.head.appendChild(t), e;
53
54
  }
54
55
  }
55
- function y(e, t) {
56
+ function b(e, t) {
56
57
  var n = e.__state.conversionName.toString(), r = Math.round(e.r), i = Math.round(e.g), a = Math.round(e.b), o = e.a, s = Math.round(e.h), c = e.s.toFixed(1), l = e.v.toFixed(1);
57
58
  if (t || n === "THREE_CHAR_HEX" || n === "SIX_CHAR_HEX") {
58
59
  for (var u = e.hex.toString(16); u.length < 6;) u = "0" + u;
@@ -68,26 +69,26 @@ function y(e, t) {
68
69
  else if (n === "HSVA_OBJ") return "{h:" + s + ",s:" + c + ",v:" + l + ",a:" + o + "}";
69
70
  return "unknown format";
70
71
  }
71
- var ge = Array.prototype.forEach, b = Array.prototype.slice, x = {
72
+ var ge = Array.prototype.forEach, x = Array.prototype.slice, S = {
72
73
  BREAK: {},
73
74
  extend: function(e) {
74
- return this.each(b.call(arguments, 1), function(t) {
75
+ return this.each(x.call(arguments, 1), function(t) {
75
76
  (this.isObject(t) ? Object.keys(t) : []).forEach(function(n) {
76
77
  this.isUndefined(t[n]) || (e[n] = t[n]);
77
78
  }.bind(this));
78
79
  }, this), e;
79
80
  },
80
81
  defaults: function(e) {
81
- return this.each(b.call(arguments, 1), function(t) {
82
+ return this.each(x.call(arguments, 1), function(t) {
82
83
  (this.isObject(t) ? Object.keys(t) : []).forEach(function(n) {
83
84
  this.isUndefined(e[n]) && (e[n] = t[n]);
84
85
  }.bind(this));
85
86
  }, this), e;
86
87
  },
87
88
  compose: function() {
88
- var e = b.call(arguments);
89
+ var e = x.call(arguments);
89
90
  return function() {
90
- for (var t = b.call(arguments), n = e.length - 1; n >= 0; n--) t = [e[n].apply(this, t)];
91
+ for (var t = x.call(arguments), n = e.length - 1; n >= 0; n--) t = [e[n].apply(this, t)];
91
92
  return t[0];
92
93
  };
93
94
  },
@@ -115,7 +116,7 @@ var ge = Array.prototype.forEach, b = Array.prototype.slice, x = {
115
116
  };
116
117
  },
117
118
  toArray: function(e) {
118
- return e.toArray ? e.toArray() : b.call(e);
119
+ return e.toArray ? e.toArray() : x.call(e);
119
120
  },
120
121
  isUndefined: function(e) {
121
122
  return e === void 0;
@@ -153,7 +154,7 @@ var ge = Array.prototype.forEach, b = Array.prototype.slice, x = {
153
154
  }
154
155
  }, _e = [
155
156
  {
156
- litmus: x.isString,
157
+ litmus: S.isString,
157
158
  conversions: {
158
159
  THREE_CHAR_HEX: {
159
160
  read: function(e) {
@@ -163,7 +164,7 @@ var ge = Array.prototype.forEach, b = Array.prototype.slice, x = {
163
164
  hex: parseInt("0x" + t[1].toString() + t[1].toString() + t[2].toString() + t[2].toString() + t[3].toString() + t[3].toString(), 0)
164
165
  };
165
166
  },
166
- write: y
167
+ write: b
167
168
  },
168
169
  SIX_CHAR_HEX: {
169
170
  read: function(e) {
@@ -173,7 +174,7 @@ var ge = Array.prototype.forEach, b = Array.prototype.slice, x = {
173
174
  hex: parseInt("0x" + t[1].toString(), 0)
174
175
  };
175
176
  },
176
- write: y
177
+ write: b
177
178
  },
178
179
  CSS_RGB: {
179
180
  read: function(e) {
@@ -185,7 +186,7 @@ var ge = Array.prototype.forEach, b = Array.prototype.slice, x = {
185
186
  b: parseFloat(t[3])
186
187
  };
187
188
  },
188
- write: y
189
+ write: b
189
190
  },
190
191
  CSS_RGBA: {
191
192
  read: function(e) {
@@ -198,12 +199,12 @@ var ge = Array.prototype.forEach, b = Array.prototype.slice, x = {
198
199
  a: parseFloat(t[4])
199
200
  };
200
201
  },
201
- write: y
202
+ write: b
202
203
  }
203
204
  }
204
205
  },
205
206
  {
206
- litmus: x.isNumber,
207
+ litmus: S.isNumber,
207
208
  conversions: { HEX: {
208
209
  read: function(e) {
209
210
  return {
@@ -218,7 +219,7 @@ var ge = Array.prototype.forEach, b = Array.prototype.slice, x = {
218
219
  } }
219
220
  },
220
221
  {
221
- litmus: x.isArray,
222
+ litmus: S.isArray,
222
223
  conversions: {
223
224
  RGB_ARRAY: {
224
225
  read: function(e) {
@@ -259,11 +260,11 @@ var ge = Array.prototype.forEach, b = Array.prototype.slice, x = {
259
260
  }
260
261
  },
261
262
  {
262
- litmus: x.isObject,
263
+ litmus: S.isObject,
263
264
  conversions: {
264
265
  RGBA_OBJ: {
265
266
  read: function(e) {
266
- return x.isNumber(e.r) && x.isNumber(e.g) && x.isNumber(e.b) && x.isNumber(e.a) ? {
267
+ return S.isNumber(e.r) && S.isNumber(e.g) && S.isNumber(e.b) && S.isNumber(e.a) ? {
267
268
  space: "RGB",
268
269
  r: e.r,
269
270
  g: e.g,
@@ -282,7 +283,7 @@ var ge = Array.prototype.forEach, b = Array.prototype.slice, x = {
282
283
  },
283
284
  RGB_OBJ: {
284
285
  read: function(e) {
285
- return x.isNumber(e.r) && x.isNumber(e.g) && x.isNumber(e.b) ? {
286
+ return S.isNumber(e.r) && S.isNumber(e.g) && S.isNumber(e.b) ? {
286
287
  space: "RGB",
287
288
  r: e.r,
288
289
  g: e.g,
@@ -299,7 +300,7 @@ var ge = Array.prototype.forEach, b = Array.prototype.slice, x = {
299
300
  },
300
301
  HSVA_OBJ: {
301
302
  read: function(e) {
302
- return x.isNumber(e.h) && x.isNumber(e.s) && x.isNumber(e.v) && x.isNumber(e.a) ? {
303
+ return S.isNumber(e.h) && S.isNumber(e.s) && S.isNumber(e.v) && S.isNumber(e.a) ? {
303
304
  space: "HSV",
304
305
  h: e.h,
305
306
  s: e.s,
@@ -318,7 +319,7 @@ var ge = Array.prototype.forEach, b = Array.prototype.slice, x = {
318
319
  },
319
320
  HSV_OBJ: {
320
321
  read: function(e) {
321
- return x.isNumber(e.h) && x.isNumber(e.s) && x.isNumber(e.v) ? {
322
+ return S.isNumber(e.h) && S.isNumber(e.s) && S.isNumber(e.v) ? {
322
323
  space: "HSV",
323
324
  h: e.h,
324
325
  s: e.s,
@@ -335,15 +336,15 @@ var ge = Array.prototype.forEach, b = Array.prototype.slice, x = {
335
336
  }
336
337
  }
337
338
  }
338
- ], S = void 0, C = void 0, ve = function() {
339
- C = !1;
340
- var e = arguments.length > 1 ? x.toArray(arguments) : arguments[0];
341
- return x.each(_e, function(t) {
342
- if (t.litmus(e)) return x.each(t.conversions, function(t, n) {
343
- if (S = t.read(e), C === !1 && S !== !1) return C = S, S.conversionName = n, S.conversion = t, x.BREAK;
344
- }), x.BREAK;
345
- }), C;
346
- }, ye = void 0, w = {
339
+ ], C = void 0, w = void 0, ve = function() {
340
+ w = !1;
341
+ var e = arguments.length > 1 ? S.toArray(arguments) : arguments[0];
342
+ return S.each(_e, function(t) {
343
+ if (t.litmus(e)) return S.each(t.conversions, function(t, n) {
344
+ if (C = t.read(e), w === !1 && C !== !1) return w = C, C.conversionName = n, C.conversion = t, S.BREAK;
345
+ }), S.BREAK;
346
+ }), w;
347
+ }, ye = void 0, T = {
347
348
  hsv_to_rgb: function(e, t, n) {
348
349
  var r = Math.floor(e / 60) % 6, i = e / 60 - Math.floor(e / 60), a = n * (1 - t), o = n * (1 - i * t), s = n * (1 - (1 - i) * t), c = [
349
350
  [
@@ -411,9 +412,9 @@ var ge = Array.prototype.forEach, b = Array.prototype.slice, x = {
411
412
  return typeof e;
412
413
  } : function(e) {
413
414
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
414
- }, T = function(e, t) {
415
+ }, E = function(e, t) {
415
416
  if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
416
- }, E = function() {
417
+ }, D = function() {
417
418
  function e(e, t) {
418
419
  for (var n = 0; n < t.length; n++) {
419
420
  var r = t[n];
@@ -423,7 +424,7 @@ var ge = Array.prototype.forEach, b = Array.prototype.slice, x = {
423
424
  return function(t, n, r) {
424
425
  return n && e(t.prototype, n), r && e(t, r), t;
425
426
  };
426
- }(), D = function e(t, n, r) {
427
+ }(), O = function e(t, n, r) {
427
428
  t === null && (t = Function.prototype);
428
429
  var i = Object.getOwnPropertyDescriptor(t, n);
429
430
  if (i === void 0) {
@@ -434,7 +435,7 @@ var ge = Array.prototype.forEach, b = Array.prototype.slice, x = {
434
435
  var o = i.get;
435
436
  return o === void 0 ? void 0 : o.call(r);
436
437
  }
437
- }, O = function(e, t) {
438
+ }, k = function(e, t) {
438
439
  if (typeof t != "function" && t !== null) throw TypeError("Super expression must either be null or a function, not " + typeof t);
439
440
  e.prototype = Object.create(t && t.prototype, { constructor: {
440
441
  value: e,
@@ -442,25 +443,25 @@ var ge = Array.prototype.forEach, b = Array.prototype.slice, x = {
442
443
  writable: !0,
443
444
  configurable: !0
444
445
  } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
445
- }, k = function(e, t) {
446
+ }, A = function(e, t) {
446
447
  if (!e) throw ReferenceError("this hasn't been initialised - super() hasn't been called");
447
448
  return t && (typeof t == "object" || typeof t == "function") ? t : e;
448
- }, A = function() {
449
+ }, j = function() {
449
450
  function e() {
450
- if (T(this, e), this.__state = ve.apply(this, arguments), this.__state === !1) throw Error("Failed to interpret color arguments");
451
+ if (E(this, e), this.__state = ve.apply(this, arguments), this.__state === !1) throw Error("Failed to interpret color arguments");
451
452
  this.__state.a = this.__state.a || 1;
452
453
  }
453
- return E(e, [
454
+ return D(e, [
454
455
  {
455
456
  key: "toString",
456
457
  value: function() {
457
- return y(this);
458
+ return b(this);
458
459
  }
459
460
  },
460
461
  {
461
462
  key: "toHexString",
462
463
  value: function() {
463
- return y(this, !0);
464
+ return b(this, !0);
464
465
  }
465
466
  },
466
467
  {
@@ -474,34 +475,34 @@ var ge = Array.prototype.forEach, b = Array.prototype.slice, x = {
474
475
  function xe(e, t, n) {
475
476
  Object.defineProperty(e, t, {
476
477
  get: function() {
477
- return this.__state.space === "RGB" || A.recalculateRGB(this, t, n), this.__state[t];
478
+ return this.__state.space === "RGB" || j.recalculateRGB(this, t, n), this.__state[t];
478
479
  },
479
480
  set: function(e) {
480
- this.__state.space !== "RGB" && (A.recalculateRGB(this, t, n), this.__state.space = "RGB"), this.__state[t] = e;
481
+ this.__state.space !== "RGB" && (j.recalculateRGB(this, t, n), this.__state.space = "RGB"), this.__state[t] = e;
481
482
  }
482
483
  });
483
484
  }
484
485
  function Se(e, t) {
485
486
  Object.defineProperty(e, t, {
486
487
  get: function() {
487
- return this.__state.space === "HSV" || A.recalculateHSV(this), this.__state[t];
488
+ return this.__state.space === "HSV" || j.recalculateHSV(this), this.__state[t];
488
489
  },
489
490
  set: function(e) {
490
- this.__state.space !== "HSV" && (A.recalculateHSV(this), this.__state.space = "HSV"), this.__state[t] = e;
491
+ this.__state.space !== "HSV" && (j.recalculateHSV(this), this.__state.space = "HSV"), this.__state[t] = e;
491
492
  }
492
493
  });
493
494
  }
494
- A.recalculateRGB = function(e, t, n) {
495
- if (e.__state.space === "HEX") e.__state[t] = w.component_from_hex(e.__state.hex, n);
496
- else if (e.__state.space === "HSV") x.extend(e.__state, w.hsv_to_rgb(e.__state.h, e.__state.s, e.__state.v));
495
+ j.recalculateRGB = function(e, t, n) {
496
+ if (e.__state.space === "HEX") e.__state[t] = T.component_from_hex(e.__state.hex, n);
497
+ else if (e.__state.space === "HSV") S.extend(e.__state, T.hsv_to_rgb(e.__state.h, e.__state.s, e.__state.v));
497
498
  else throw Error("Corrupted color state");
498
- }, A.recalculateHSV = function(e) {
499
- var t = w.rgb_to_hsv(e.r, e.g, e.b);
500
- x.extend(e.__state, {
499
+ }, j.recalculateHSV = function(e) {
500
+ var t = T.rgb_to_hsv(e.r, e.g, e.b);
501
+ S.extend(e.__state, {
501
502
  s: t.s,
502
503
  v: t.v
503
- }), x.isNaN(t.h) ? x.isUndefined(e.__state.h) && (e.__state.h = 0) : e.__state.h = t.h;
504
- }, A.COMPONENTS = [
504
+ }), S.isNaN(t.h) ? S.isUndefined(e.__state.h) && (e.__state.h = 0) : e.__state.h = t.h;
505
+ }, j.COMPONENTS = [
505
506
  "r",
506
507
  "g",
507
508
  "b",
@@ -510,26 +511,26 @@ A.recalculateRGB = function(e, t, n) {
510
511
  "v",
511
512
  "hex",
512
513
  "a"
513
- ], xe(A.prototype, "r", 2), xe(A.prototype, "g", 1), xe(A.prototype, "b", 0), Se(A.prototype, "h"), Se(A.prototype, "s"), Se(A.prototype, "v"), Object.defineProperty(A.prototype, "a", {
514
+ ], xe(j.prototype, "r", 2), xe(j.prototype, "g", 1), xe(j.prototype, "b", 0), Se(j.prototype, "h"), Se(j.prototype, "s"), Se(j.prototype, "v"), Object.defineProperty(j.prototype, "a", {
514
515
  get: function() {
515
516
  return this.__state.a;
516
517
  },
517
518
  set: function(e) {
518
519
  this.__state.a = e;
519
520
  }
520
- }), Object.defineProperty(A.prototype, "hex", {
521
+ }), Object.defineProperty(j.prototype, "hex", {
521
522
  get: function() {
522
- return this.__state.space !== "HEX" && (this.__state.hex = w.rgb_to_hex(this.r, this.g, this.b), this.__state.space = "HEX"), this.__state.hex;
523
+ return this.__state.space !== "HEX" && (this.__state.hex = T.rgb_to_hex(this.r, this.g, this.b), this.__state.space = "HEX"), this.__state.hex;
523
524
  },
524
525
  set: function(e) {
525
526
  this.__state.space = "HEX", this.__state.hex = e;
526
527
  }
527
528
  });
528
- var j = function() {
529
+ var M = function() {
529
530
  function e(t, n) {
530
- T(this, e), this.initialValue = t[n], this.domElement = document.createElement("div"), this.object = t, this.property = n, this.__onChange = void 0, this.__onFinishChange = void 0;
531
+ E(this, e), this.initialValue = t[n], this.domElement = document.createElement("div"), this.object = t, this.property = n, this.__onChange = void 0, this.__onFinishChange = void 0;
531
532
  }
532
- return E(e, [
533
+ return D(e, [
533
534
  {
534
535
  key: "onChange",
535
536
  value: function(e) {
@@ -578,18 +579,18 @@ var j = function() {
578
579
  ],
579
580
  KeyboardEvents: ["keydown"]
580
581
  }, we = {};
581
- x.each(Ce, function(e, t) {
582
- x.each(e, function(e) {
582
+ S.each(Ce, function(e, t) {
583
+ S.each(e, function(e) {
583
584
  we[e] = t;
584
585
  });
585
586
  });
586
587
  var Te = /(\d+(\.\d+)?)px/;
587
- function M(e) {
588
- if (e === "0" || x.isUndefined(e)) return 0;
588
+ function N(e) {
589
+ if (e === "0" || S.isUndefined(e)) return 0;
589
590
  var t = e.match(Te);
590
- return x.isNull(t) ? 0 : parseFloat(t[1]);
591
+ return S.isNull(t) ? 0 : parseFloat(t[1]);
591
592
  }
592
- var N = {
593
+ var P = {
593
594
  makeSelectable: function(e, t) {
594
595
  e === void 0 || e.style === void 0 || (e.onselectstart = t ? function() {
595
596
  return !1;
@@ -597,7 +598,7 @@ var N = {
597
598
  },
598
599
  makeFullscreen: function(e, t, n) {
599
600
  var r = n, i = t;
600
- x.isUndefined(i) && (i = !0), x.isUndefined(r) && (r = !0), e.style.position = "absolute", i && (e.style.left = 0, e.style.right = 0), r && (e.style.top = 0, e.style.bottom = 0);
601
+ S.isUndefined(i) && (i = !0), S.isUndefined(r) && (r = !0), e.style.position = "absolute", i && (e.style.left = 0, e.style.right = 0), r && (e.style.top = 0, e.style.bottom = 0);
601
602
  },
602
603
  fakeEvent: function(e, t, n, r) {
603
604
  var i = n || {}, a = we[t];
@@ -610,7 +611,7 @@ var N = {
610
611
  break;
611
612
  case "KeyboardEvents":
612
613
  var l = o.initKeyboardEvent || o.initKeyEvent;
613
- x.defaults(i, {
614
+ S.defaults(i, {
614
615
  cancelable: !0,
615
616
  ctrlKey: !1,
616
617
  altKey: !1,
@@ -624,15 +625,15 @@ var N = {
624
625
  o.initEvent(t, i.bubbles || !1, i.cancelable || !0);
625
626
  break;
626
627
  }
627
- x.defaults(o, r), e.dispatchEvent(o);
628
+ S.defaults(o, r), e.dispatchEvent(o);
628
629
  },
629
630
  bind: function(e, t, n, r) {
630
631
  var i = r || !1;
631
- return e.addEventListener ? e.addEventListener(t, n, i) : e.attachEvent && e.attachEvent("on" + t, n), N;
632
+ return e.addEventListener ? e.addEventListener(t, n, i) : e.attachEvent && e.attachEvent("on" + t, n), P;
632
633
  },
633
634
  unbind: function(e, t, n, r) {
634
635
  var i = r || !1;
635
- return e.removeEventListener ? e.removeEventListener(t, n, i) : e.detachEvent && e.detachEvent("on" + t, n), N;
636
+ return e.removeEventListener ? e.removeEventListener(t, n, i) : e.detachEvent && e.detachEvent("on" + t, n), P;
636
637
  },
637
638
  addClass: function(e, t) {
638
639
  if (e.className === void 0) e.className = t;
@@ -640,7 +641,7 @@ var N = {
640
641
  var n = e.className.split(/ +/);
641
642
  n.indexOf(t) === -1 && (n.push(t), e.className = n.join(" ").replace(/^\s+/, "").replace(/\s+$/, ""));
642
643
  }
643
- return N;
644
+ return P;
644
645
  },
645
646
  removeClass: function(e, t) {
646
647
  if (t) if (e.className === t) e.removeAttribute("class");
@@ -649,18 +650,18 @@ var N = {
649
650
  r !== -1 && (n.splice(r, 1), e.className = n.join(" "));
650
651
  }
651
652
  else e.className = void 0;
652
- return N;
653
+ return P;
653
654
  },
654
655
  hasClass: function(e, t) {
655
656
  return RegExp("(?:^|\\s+)" + t + "(?:\\s+|$)").test(e.className) || !1;
656
657
  },
657
658
  getWidth: function(e) {
658
659
  var t = getComputedStyle(e);
659
- return M(t["border-left-width"]) + M(t["border-right-width"]) + M(t["padding-left"]) + M(t["padding-right"]) + M(t.width);
660
+ return N(t["border-left-width"]) + N(t["border-right-width"]) + N(t["padding-left"]) + N(t["padding-right"]) + N(t.width);
660
661
  },
661
662
  getHeight: function(e) {
662
663
  var t = getComputedStyle(e);
663
- return M(t["border-top-width"]) + M(t["border-bottom-width"]) + M(t["padding-top"]) + M(t["padding-bottom"]) + M(t.height);
664
+ return N(t["border-top-width"]) + N(t["border-bottom-width"]) + N(t["padding-top"]) + N(t["padding-bottom"]) + N(t.height);
664
665
  },
665
666
  getOffset: function(e) {
666
667
  var t = e, n = {
@@ -676,98 +677,98 @@ var N = {
676
677
  return e === document.activeElement && (e.type || e.href);
677
678
  }
678
679
  }, Ee = function(e) {
679
- O(t, e);
680
+ k(t, e);
680
681
  function t(e, n) {
681
- T(this, t);
682
- var r = k(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e, n)), i = r;
682
+ E(this, t);
683
+ var r = A(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e, n)), i = r;
683
684
  r.__prev = r.getValue(), r.__checkbox = document.createElement("input"), r.__checkbox.setAttribute("type", "checkbox");
684
685
  function a() {
685
686
  i.setValue(!i.__prev);
686
687
  }
687
- return N.bind(r.__checkbox, "change", a, !1), r.domElement.appendChild(r.__checkbox), r.updateDisplay(), r;
688
+ return P.bind(r.__checkbox, "change", a, !1), r.domElement.appendChild(r.__checkbox), r.updateDisplay(), r;
688
689
  }
689
- return E(t, [{
690
+ return D(t, [{
690
691
  key: "setValue",
691
692
  value: function(e) {
692
- var n = D(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "setValue", this).call(this, e);
693
+ var n = O(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "setValue", this).call(this, e);
693
694
  return this.__onFinishChange && this.__onFinishChange.call(this, this.getValue()), this.__prev = this.getValue(), n;
694
695
  }
695
696
  }, {
696
697
  key: "updateDisplay",
697
698
  value: function() {
698
- return this.getValue() === !0 ? (this.__checkbox.setAttribute("checked", "checked"), this.__checkbox.checked = !0, this.__prev = !0) : (this.__checkbox.checked = !1, this.__prev = !1), D(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "updateDisplay", this).call(this);
699
+ return this.getValue() === !0 ? (this.__checkbox.setAttribute("checked", "checked"), this.__checkbox.checked = !0, this.__prev = !0) : (this.__checkbox.checked = !1, this.__prev = !1), O(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "updateDisplay", this).call(this);
699
700
  }
700
701
  }]), t;
701
- }(j), De = function(e) {
702
- O(t, e);
702
+ }(M), De = function(e) {
703
+ k(t, e);
703
704
  function t(e, n, r) {
704
- T(this, t);
705
- var i = k(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e, n)), a = r, o = i;
706
- if (i.__select = document.createElement("select"), x.isArray(a)) {
705
+ E(this, t);
706
+ var i = A(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e, n)), a = r, o = i;
707
+ if (i.__select = document.createElement("select"), S.isArray(a)) {
707
708
  var s = {};
708
- x.each(a, function(e) {
709
+ S.each(a, function(e) {
709
710
  s[e] = e;
710
711
  }), a = s;
711
712
  }
712
- return x.each(a, function(e, t) {
713
+ return S.each(a, function(e, t) {
713
714
  var n = document.createElement("option");
714
715
  n.innerHTML = t, n.setAttribute("value", e), o.__select.appendChild(n);
715
- }), i.updateDisplay(), N.bind(i.__select, "change", function() {
716
+ }), i.updateDisplay(), P.bind(i.__select, "change", function() {
716
717
  var e = this.options[this.selectedIndex].value;
717
718
  o.setValue(e);
718
719
  }), i.domElement.appendChild(i.__select), i;
719
720
  }
720
- return E(t, [{
721
+ return D(t, [{
721
722
  key: "setValue",
722
723
  value: function(e) {
723
- var n = D(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "setValue", this).call(this, e);
724
+ var n = O(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "setValue", this).call(this, e);
724
725
  return this.__onFinishChange && this.__onFinishChange.call(this, this.getValue()), n;
725
726
  }
726
727
  }, {
727
728
  key: "updateDisplay",
728
729
  value: function() {
729
- return N.isActive(this.__select) ? this : (this.__select.value = this.getValue(), D(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "updateDisplay", this).call(this));
730
+ return P.isActive(this.__select) ? this : (this.__select.value = this.getValue(), O(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "updateDisplay", this).call(this));
730
731
  }
731
732
  }]), t;
732
- }(j), Oe = function(e) {
733
- O(t, e);
733
+ }(M), Oe = function(e) {
734
+ k(t, e);
734
735
  function t(e, n) {
735
- T(this, t);
736
- var r = k(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e, n)), i = r;
736
+ E(this, t);
737
+ var r = A(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e, n)), i = r;
737
738
  function a() {
738
739
  i.setValue(i.__input.value);
739
740
  }
740
741
  function o() {
741
742
  i.__onFinishChange && i.__onFinishChange.call(i, i.getValue());
742
743
  }
743
- return r.__input = document.createElement("input"), r.__input.setAttribute("type", "text"), N.bind(r.__input, "keyup", a), N.bind(r.__input, "change", a), N.bind(r.__input, "blur", o), N.bind(r.__input, "keydown", function(e) {
744
+ return r.__input = document.createElement("input"), r.__input.setAttribute("type", "text"), P.bind(r.__input, "keyup", a), P.bind(r.__input, "change", a), P.bind(r.__input, "blur", o), P.bind(r.__input, "keydown", function(e) {
744
745
  e.keyCode === 13 && this.blur();
745
746
  }), r.updateDisplay(), r.domElement.appendChild(r.__input), r;
746
747
  }
747
- return E(t, [{
748
+ return D(t, [{
748
749
  key: "updateDisplay",
749
750
  value: function() {
750
- return N.isActive(this.__input) || (this.__input.value = this.getValue()), D(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "updateDisplay", this).call(this);
751
+ return P.isActive(this.__input) || (this.__input.value = this.getValue()), O(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "updateDisplay", this).call(this);
751
752
  }
752
753
  }]), t;
753
- }(j);
754
+ }(M);
754
755
  function ke(e) {
755
756
  var t = e.toString();
756
757
  return t.indexOf(".") > -1 ? t.length - t.indexOf(".") - 1 : 0;
757
758
  }
758
759
  var Ae = function(e) {
759
- O(t, e);
760
+ k(t, e);
760
761
  function t(e, n, r) {
761
- T(this, t);
762
- var i = k(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e, n)), a = r || {};
763
- return i.__min = a.min, i.__max = a.max, i.__step = a.step, x.isUndefined(i.__step) ? i.initialValue === 0 ? i.__impliedStep = 1 : i.__impliedStep = 10 ** Math.floor(Math.log(Math.abs(i.initialValue)) / Math.LN10) / 10 : i.__impliedStep = i.__step, i.__precision = ke(i.__impliedStep), i;
762
+ E(this, t);
763
+ var i = A(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e, n)), a = r || {};
764
+ return i.__min = a.min, i.__max = a.max, i.__step = a.step, S.isUndefined(i.__step) ? i.initialValue === 0 ? i.__impliedStep = 1 : i.__impliedStep = 10 ** Math.floor(Math.log(Math.abs(i.initialValue)) / Math.LN10) / 10 : i.__impliedStep = i.__step, i.__precision = ke(i.__impliedStep), i;
764
765
  }
765
- return E(t, [
766
+ return D(t, [
766
767
  {
767
768
  key: "setValue",
768
769
  value: function(e) {
769
770
  var n = e;
770
- return this.__min !== void 0 && n < this.__min ? n = this.__min : this.__max !== void 0 && n > this.__max && (n = this.__max), this.__step !== void 0 && n % this.__step !== 0 && (n = Math.round(n / this.__step) * this.__step), D(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "setValue", this).call(this, n);
771
+ return this.__min !== void 0 && n < this.__min ? n = this.__min : this.__max !== void 0 && n > this.__max && (n = this.__max), this.__step !== void 0 && n % this.__step !== 0 && (n = Math.round(n / this.__step) * this.__step), O(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "setValue", this).call(this, n);
771
772
  }
772
773
  },
773
774
  {
@@ -789,21 +790,21 @@ var Ae = function(e) {
789
790
  }
790
791
  }
791
792
  ]), t;
792
- }(j);
793
+ }(M);
793
794
  function je(e, t) {
794
795
  var n = 10 ** t;
795
796
  return Math.round(e * n) / n;
796
797
  }
797
- var P = function(e) {
798
- O(t, e);
798
+ var F = function(e) {
799
+ k(t, e);
799
800
  function t(e, n, r) {
800
- T(this, t);
801
- var i = k(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e, n, r));
801
+ E(this, t);
802
+ var i = A(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e, n, r));
802
803
  i.__truncationSuspended = !1;
803
804
  var a = i, o = void 0;
804
805
  function s() {
805
806
  var e = parseFloat(a.__input.value);
806
- x.isNaN(e) || a.setValue(e);
807
+ S.isNaN(e) || a.setValue(e);
807
808
  }
808
809
  function c() {
809
810
  a.__onFinishChange && a.__onFinishChange.call(a, a.getValue());
@@ -816,19 +817,19 @@ var P = function(e) {
816
817
  a.setValue(a.getValue() + t * a.__impliedStep), o = e.clientY;
817
818
  }
818
819
  function d() {
819
- N.unbind(window, "mousemove", u), N.unbind(window, "mouseup", d), c();
820
+ P.unbind(window, "mousemove", u), P.unbind(window, "mouseup", d), c();
820
821
  }
821
822
  function f(e) {
822
- N.bind(window, "mousemove", u), N.bind(window, "mouseup", d), o = e.clientY;
823
+ P.bind(window, "mousemove", u), P.bind(window, "mouseup", d), o = e.clientY;
823
824
  }
824
- return i.__input = document.createElement("input"), i.__input.setAttribute("type", "text"), N.bind(i.__input, "change", s), N.bind(i.__input, "blur", l), N.bind(i.__input, "mousedown", f), N.bind(i.__input, "keydown", function(e) {
825
+ return i.__input = document.createElement("input"), i.__input.setAttribute("type", "text"), P.bind(i.__input, "change", s), P.bind(i.__input, "blur", l), P.bind(i.__input, "mousedown", f), P.bind(i.__input, "keydown", function(e) {
825
826
  e.keyCode === 13 && (a.__truncationSuspended = !0, this.blur(), a.__truncationSuspended = !1, c());
826
827
  }), i.updateDisplay(), i.domElement.appendChild(i.__input), i;
827
828
  }
828
- return E(t, [{
829
+ return D(t, [{
829
830
  key: "updateDisplay",
830
831
  value: function() {
831
- return this.__input.value = this.__truncationSuspended ? this.getValue() : je(this.getValue(), this.__precision), D(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "updateDisplay", this).call(this);
832
+ return this.__input.value = this.__truncationSuspended ? this.getValue() : je(this.getValue(), this.__precision), O(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "updateDisplay", this).call(this);
832
833
  }
833
834
  }]), t;
834
835
  }(Ae);
@@ -836,17 +837,17 @@ function Me(e, t, n, r, i) {
836
837
  return r + (i - r) * ((e - t) / (n - t));
837
838
  }
838
839
  var Ne = function(e) {
839
- O(t, e);
840
+ k(t, e);
840
841
  function t(e, n, r, i, a) {
841
- T(this, t);
842
- var o = k(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e, n, {
842
+ E(this, t);
843
+ var o = A(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e, n, {
843
844
  min: r,
844
845
  max: i,
845
846
  step: a
846
847
  })), s = o;
847
- o.__background = document.createElement("div"), o.__foreground = document.createElement("div"), N.bind(o.__background, "mousedown", c), N.bind(o.__background, "touchstart", d), N.addClass(o.__background, "slider"), N.addClass(o.__foreground, "slider-fg");
848
+ o.__background = document.createElement("div"), o.__foreground = document.createElement("div"), P.bind(o.__background, "mousedown", c), P.bind(o.__background, "touchstart", d), P.addClass(o.__background, "slider"), P.addClass(o.__foreground, "slider-fg");
848
849
  function c(e) {
849
- document.activeElement.blur(), N.bind(window, "mousemove", l), N.bind(window, "mouseup", u), l(e);
850
+ document.activeElement.blur(), P.bind(window, "mousemove", l), P.bind(window, "mouseup", u), l(e);
850
851
  }
851
852
  function l(e) {
852
853
  e.preventDefault();
@@ -854,68 +855,68 @@ var Ne = function(e) {
854
855
  return s.setValue(Me(e.clientX, t.left, t.right, s.__min, s.__max)), !1;
855
856
  }
856
857
  function u() {
857
- N.unbind(window, "mousemove", l), N.unbind(window, "mouseup", u), s.__onFinishChange && s.__onFinishChange.call(s, s.getValue());
858
+ P.unbind(window, "mousemove", l), P.unbind(window, "mouseup", u), s.__onFinishChange && s.__onFinishChange.call(s, s.getValue());
858
859
  }
859
860
  function d(e) {
860
- e.touches.length === 1 && (N.bind(window, "touchmove", f), N.bind(window, "touchend", p), f(e));
861
+ e.touches.length === 1 && (P.bind(window, "touchmove", f), P.bind(window, "touchend", p), f(e));
861
862
  }
862
863
  function f(e) {
863
864
  var t = e.touches[0].clientX, n = s.__background.getBoundingClientRect();
864
865
  s.setValue(Me(t, n.left, n.right, s.__min, s.__max));
865
866
  }
866
867
  function p() {
867
- N.unbind(window, "touchmove", f), N.unbind(window, "touchend", p), s.__onFinishChange && s.__onFinishChange.call(s, s.getValue());
868
+ P.unbind(window, "touchmove", f), P.unbind(window, "touchend", p), s.__onFinishChange && s.__onFinishChange.call(s, s.getValue());
868
869
  }
869
870
  return o.updateDisplay(), o.__background.appendChild(o.__foreground), o.domElement.appendChild(o.__background), o;
870
871
  }
871
- return E(t, [{
872
+ return D(t, [{
872
873
  key: "updateDisplay",
873
874
  value: function() {
874
875
  var e = (this.getValue() - this.__min) / (this.__max - this.__min);
875
- return this.__foreground.style.width = e * 100 + "%", D(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "updateDisplay", this).call(this);
876
+ return this.__foreground.style.width = e * 100 + "%", O(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "updateDisplay", this).call(this);
876
877
  }
877
878
  }]), t;
878
879
  }(Ae), Pe = function(e) {
879
- O(t, e);
880
+ k(t, e);
880
881
  function t(e, n, r) {
881
- T(this, t);
882
- var i = k(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e, n)), a = i;
883
- return i.__button = document.createElement("div"), i.__button.innerHTML = r === void 0 ? "Fire" : r, N.bind(i.__button, "click", function(e) {
882
+ E(this, t);
883
+ var i = A(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e, n)), a = i;
884
+ return i.__button = document.createElement("div"), i.__button.innerHTML = r === void 0 ? "Fire" : r, P.bind(i.__button, "click", function(e) {
884
885
  return e.preventDefault(), a.fire(), !1;
885
- }), N.addClass(i.__button, "button"), i.domElement.appendChild(i.__button), i;
886
+ }), P.addClass(i.__button, "button"), i.domElement.appendChild(i.__button), i;
886
887
  }
887
- return E(t, [{
888
+ return D(t, [{
888
889
  key: "fire",
889
890
  value: function() {
890
891
  this.__onChange && this.__onChange.call(this), this.getValue().call(this.object), this.__onFinishChange && this.__onFinishChange.call(this, this.getValue());
891
892
  }
892
893
  }]), t;
893
- }(j), F = function(e) {
894
- O(t, e);
894
+ }(M), Fe = function(e) {
895
+ k(t, e);
895
896
  function t(e, n) {
896
- T(this, t);
897
- var r = k(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e, n));
898
- r.__color = new A(r.getValue()), r.__temp = new A(0);
897
+ E(this, t);
898
+ var r = A(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e, n));
899
+ r.__color = new j(r.getValue()), r.__temp = new j(0);
899
900
  var i = r;
900
- r.domElement = document.createElement("div"), N.makeSelectable(r.domElement, !1), r.__selector = document.createElement("div"), r.__selector.className = "selector", r.__saturation_field = document.createElement("div"), r.__saturation_field.className = "saturation-field", r.__field_knob = document.createElement("div"), r.__field_knob.className = "field-knob", r.__field_knob_border = "2px solid ", r.__hue_knob = document.createElement("div"), r.__hue_knob.className = "hue-knob", r.__hue_field = document.createElement("div"), r.__hue_field.className = "hue-field", r.__input = document.createElement("input"), r.__input.type = "text", r.__input_textShadow = "0 1px 1px ", N.bind(r.__input, "keydown", function(e) {
901
+ r.domElement = document.createElement("div"), P.makeSelectable(r.domElement, !1), r.__selector = document.createElement("div"), r.__selector.className = "selector", r.__saturation_field = document.createElement("div"), r.__saturation_field.className = "saturation-field", r.__field_knob = document.createElement("div"), r.__field_knob.className = "field-knob", r.__field_knob_border = "2px solid ", r.__hue_knob = document.createElement("div"), r.__hue_knob.className = "hue-knob", r.__hue_field = document.createElement("div"), r.__hue_field.className = "hue-field", r.__input = document.createElement("input"), r.__input.type = "text", r.__input_textShadow = "0 1px 1px ", P.bind(r.__input, "keydown", function(e) {
901
902
  e.keyCode === 13 && u.call(this);
902
- }), N.bind(r.__input, "blur", u), N.bind(r.__selector, "mousedown", function() {
903
- N.addClass(this, "drag").bind(window, "mouseup", function() {
904
- N.removeClass(i.__selector, "drag");
903
+ }), P.bind(r.__input, "blur", u), P.bind(r.__selector, "mousedown", function() {
904
+ P.addClass(this, "drag").bind(window, "mouseup", function() {
905
+ P.removeClass(i.__selector, "drag");
905
906
  });
906
- }), N.bind(r.__selector, "touchstart", function() {
907
- N.addClass(this, "drag").bind(window, "touchend", function() {
908
- N.removeClass(i.__selector, "drag");
907
+ }), P.bind(r.__selector, "touchstart", function() {
908
+ P.addClass(this, "drag").bind(window, "touchend", function() {
909
+ P.removeClass(i.__selector, "drag");
909
910
  });
910
911
  });
911
912
  var a = document.createElement("div");
912
- x.extend(r.__selector.style, {
913
+ S.extend(r.__selector.style, {
913
914
  width: "122px",
914
915
  height: "102px",
915
916
  padding: "3px",
916
917
  backgroundColor: "#222",
917
918
  boxShadow: "0px 1px 3px rgba(0,0,0,0.3)"
918
- }), x.extend(r.__field_knob.style, {
919
+ }), S.extend(r.__field_knob.style, {
919
920
  position: "absolute",
920
921
  width: "12px",
921
922
  height: "12px",
@@ -923,24 +924,24 @@ var Ne = function(e) {
923
924
  boxShadow: "0px 1px 3px rgba(0,0,0,0.5)",
924
925
  borderRadius: "12px",
925
926
  zIndex: 1
926
- }), x.extend(r.__hue_knob.style, {
927
+ }), S.extend(r.__hue_knob.style, {
927
928
  position: "absolute",
928
929
  width: "15px",
929
930
  height: "2px",
930
931
  borderRight: "4px solid #fff",
931
932
  zIndex: 1
932
- }), x.extend(r.__saturation_field.style, {
933
+ }), S.extend(r.__saturation_field.style, {
933
934
  width: "100px",
934
935
  height: "100px",
935
936
  border: "1px solid #555",
936
937
  marginRight: "3px",
937
938
  display: "inline-block",
938
939
  cursor: "pointer"
939
- }), x.extend(a.style, {
940
+ }), S.extend(a.style, {
940
941
  width: "100%",
941
942
  height: "100%",
942
943
  background: "none"
943
- }), Ie(a, "top", "rgba(0,0,0,0)", "#000"), x.extend(r.__hue_field.style, {
944
+ }), Le(a, "top", "rgba(0,0,0,0)", "#000"), S.extend(r.__hue_field.style, {
944
945
  width: "15px",
945
946
  height: "100px",
946
947
  border: "1px solid #555",
@@ -948,25 +949,25 @@ var Ne = function(e) {
948
949
  position: "absolute",
949
950
  top: "3px",
950
951
  right: "3px"
951
- }), Le(r.__hue_field), x.extend(r.__input.style, {
952
+ }), Re(r.__hue_field), S.extend(r.__input.style, {
952
953
  outline: "none",
953
954
  textAlign: "center",
954
955
  color: "#fff",
955
956
  border: 0,
956
957
  fontWeight: "bold",
957
958
  textShadow: r.__input_textShadow + "rgba(0,0,0,0.7)"
958
- }), N.bind(r.__saturation_field, "mousedown", o), N.bind(r.__saturation_field, "touchstart", o), N.bind(r.__field_knob, "mousedown", o), N.bind(r.__field_knob, "touchstart", o), N.bind(r.__hue_field, "mousedown", s), N.bind(r.__hue_field, "touchstart", s);
959
+ }), P.bind(r.__saturation_field, "mousedown", o), P.bind(r.__saturation_field, "touchstart", o), P.bind(r.__field_knob, "mousedown", o), P.bind(r.__field_knob, "touchstart", o), P.bind(r.__hue_field, "mousedown", s), P.bind(r.__hue_field, "touchstart", s);
959
960
  function o(e) {
960
- f(e), N.bind(window, "mousemove", f), N.bind(window, "touchmove", f), N.bind(window, "mouseup", c), N.bind(window, "touchend", c);
961
+ f(e), P.bind(window, "mousemove", f), P.bind(window, "touchmove", f), P.bind(window, "mouseup", c), P.bind(window, "touchend", c);
961
962
  }
962
963
  function s(e) {
963
- p(e), N.bind(window, "mousemove", p), N.bind(window, "touchmove", p), N.bind(window, "mouseup", l), N.bind(window, "touchend", l);
964
+ p(e), P.bind(window, "mousemove", p), P.bind(window, "touchmove", p), P.bind(window, "mouseup", l), P.bind(window, "touchend", l);
964
965
  }
965
966
  function c() {
966
- N.unbind(window, "mousemove", f), N.unbind(window, "touchmove", f), N.unbind(window, "mouseup", c), N.unbind(window, "touchend", c), d();
967
+ P.unbind(window, "mousemove", f), P.unbind(window, "touchmove", f), P.unbind(window, "mouseup", c), P.unbind(window, "touchend", c), d();
967
968
  }
968
969
  function l() {
969
- N.unbind(window, "mousemove", p), N.unbind(window, "touchmove", p), N.unbind(window, "mouseup", l), N.unbind(window, "touchend", l), d();
970
+ P.unbind(window, "mousemove", p), P.unbind(window, "touchmove", p), P.unbind(window, "mouseup", l), P.unbind(window, "touchend", l), d();
970
971
  }
971
972
  function u() {
972
973
  var e = ve(this.value);
@@ -988,46 +989,46 @@ var Ne = function(e) {
988
989
  }
989
990
  return r;
990
991
  }
991
- return E(t, [{
992
+ return D(t, [{
992
993
  key: "updateDisplay",
993
994
  value: function() {
994
995
  var e = ve(this.getValue());
995
996
  if (e !== !1) {
996
997
  var t = !1;
997
- x.each(A.COMPONENTS, function(n) {
998
- if (!x.isUndefined(e[n]) && !x.isUndefined(this.__color.__state[n]) && e[n] !== this.__color.__state[n]) return t = !0, {};
999
- }, this), t && x.extend(this.__color.__state, e);
998
+ S.each(j.COMPONENTS, function(n) {
999
+ if (!S.isUndefined(e[n]) && !S.isUndefined(this.__color.__state[n]) && e[n] !== this.__color.__state[n]) return t = !0, {};
1000
+ }, this), t && S.extend(this.__color.__state, e);
1000
1001
  }
1001
- x.extend(this.__temp.__state, this.__color.__state), this.__temp.a = 1;
1002
+ S.extend(this.__temp.__state, this.__color.__state), this.__temp.a = 1;
1002
1003
  var n = this.__color.v < .5 || this.__color.s > .5 ? 255 : 0, r = 255 - n;
1003
- x.extend(this.__field_knob.style, {
1004
+ S.extend(this.__field_knob.style, {
1004
1005
  marginLeft: 100 * this.__color.s - 7 + "px",
1005
1006
  marginTop: 100 * (1 - this.__color.v) - 7 + "px",
1006
1007
  backgroundColor: this.__temp.toHexString(),
1007
1008
  border: this.__field_knob_border + "rgb(" + n + "," + n + "," + n + ")"
1008
- }), this.__hue_knob.style.marginTop = (1 - this.__color.h / 360) * 100 + "px", this.__temp.s = 1, this.__temp.v = 1, Ie(this.__saturation_field, "left", "#fff", this.__temp.toHexString()), this.__input.value = this.__color.toString(), x.extend(this.__input.style, {
1009
+ }), this.__hue_knob.style.marginTop = (1 - this.__color.h / 360) * 100 + "px", this.__temp.s = 1, this.__temp.v = 1, Le(this.__saturation_field, "left", "#fff", this.__temp.toHexString()), this.__input.value = this.__color.toString(), S.extend(this.__input.style, {
1009
1010
  backgroundColor: this.__color.toHexString(),
1010
1011
  color: "rgb(" + n + "," + n + "," + n + ")",
1011
1012
  textShadow: this.__input_textShadow + "rgba(" + r + "," + r + "," + r + ",.7)"
1012
1013
  });
1013
1014
  }
1014
1015
  }]), t;
1015
- }(j), Fe = [
1016
+ }(M), Ie = [
1016
1017
  "-moz-",
1017
1018
  "-o-",
1018
1019
  "-webkit-",
1019
1020
  "-ms-",
1020
1021
  ""
1021
1022
  ];
1022
- function Ie(e, t, n, r) {
1023
- e.style.background = "", x.each(Fe, function(i) {
1023
+ function Le(e, t, n, r) {
1024
+ e.style.background = "", S.each(Ie, function(i) {
1024
1025
  e.style.cssText += "background: " + i + "linear-gradient(" + t + ", " + n + " 0%, " + r + " 100%); ";
1025
1026
  });
1026
1027
  }
1027
- function Le(e) {
1028
+ function Re(e) {
1028
1029
  e.style.background = "", e.style.cssText += "background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);", e.style.cssText += "background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", e.style.cssText += "background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", e.style.cssText += "background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", e.style.cssText += "background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);";
1029
1030
  }
1030
- var Re = {
1031
+ var ze = {
1031
1032
  load: function(e, t) {
1032
1033
  var n = t || document, r = n.createElement("link");
1033
1034
  r.type = "text/css", r.rel = "stylesheet", r.href = e, n.getElementsByTagName("head")[0].appendChild(r);
@@ -1040,23 +1041,23 @@ var Re = {
1040
1041
  i.appendChild(r);
1041
1042
  } catch {}
1042
1043
  }
1043
- }, ze = "<div id=\"dg-save\" class=\"dg dialogue\">\n\n Here's the new load parameter for your <code>GUI</code>'s constructor:\n\n <textarea id=\"dg-new-constructor\"></textarea>\n\n <div id=\"dg-save-locally\">\n\n <input id=\"dg-local-storage\" type=\"checkbox\"/> Automatically save\n values to <code>localStorage</code> on exit.\n\n <div id=\"dg-local-explain\">The values saved to <code>localStorage</code> will\n override those passed to <code>dat.GUI</code>'s constructor. This makes it\n easier to work incrementally, but <code>localStorage</code> is fragile,\n and your friends may not see the same values you do.\n\n </div>\n\n </div>\n\n</div>", Be = function(e, t) {
1044
+ }, Be = "<div id=\"dg-save\" class=\"dg dialogue\">\n\n Here's the new load parameter for your <code>GUI</code>'s constructor:\n\n <textarea id=\"dg-new-constructor\"></textarea>\n\n <div id=\"dg-save-locally\">\n\n <input id=\"dg-local-storage\" type=\"checkbox\"/> Automatically save\n values to <code>localStorage</code> on exit.\n\n <div id=\"dg-local-explain\">The values saved to <code>localStorage</code> will\n override those passed to <code>dat.GUI</code>'s constructor. This makes it\n easier to work incrementally, but <code>localStorage</code> is fragile,\n and your friends may not see the same values you do.\n\n </div>\n\n </div>\n\n</div>", Ve = function(e, t) {
1044
1045
  var n = e[t];
1045
- return x.isArray(arguments[2]) || x.isObject(arguments[2]) ? new De(e, t, arguments[2]) : x.isNumber(n) ? x.isNumber(arguments[2]) && x.isNumber(arguments[3]) ? x.isNumber(arguments[4]) ? new Ne(e, t, arguments[2], arguments[3], arguments[4]) : new Ne(e, t, arguments[2], arguments[3]) : x.isNumber(arguments[4]) ? new P(e, t, {
1046
+ return S.isArray(arguments[2]) || S.isObject(arguments[2]) ? new De(e, t, arguments[2]) : S.isNumber(n) ? S.isNumber(arguments[2]) && S.isNumber(arguments[3]) ? S.isNumber(arguments[4]) ? new Ne(e, t, arguments[2], arguments[3], arguments[4]) : new Ne(e, t, arguments[2], arguments[3]) : S.isNumber(arguments[4]) ? new F(e, t, {
1046
1047
  min: arguments[2],
1047
1048
  max: arguments[3],
1048
1049
  step: arguments[4]
1049
- }) : new P(e, t, {
1050
+ }) : new F(e, t, {
1050
1051
  min: arguments[2],
1051
1052
  max: arguments[3]
1052
- }) : x.isString(n) ? new Oe(e, t) : x.isFunction(n) ? new Pe(e, t, "") : x.isBoolean(n) ? new Ee(e, t) : null;
1053
+ }) : S.isString(n) ? new Oe(e, t) : S.isFunction(n) ? new Pe(e, t, "") : S.isBoolean(n) ? new Ee(e, t) : null;
1053
1054
  };
1054
- function Ve(e) {
1055
+ function He(e) {
1055
1056
  setTimeout(e, 1e3 / 60);
1056
1057
  }
1057
- var He = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || Ve, Ue = function() {
1058
+ var Ue = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || He, We = function() {
1058
1059
  function e() {
1059
- T(this, e), this.backgroundElement = document.createElement("div"), x.extend(this.backgroundElement.style, {
1060
+ E(this, e), this.backgroundElement = document.createElement("div"), S.extend(this.backgroundElement.style, {
1060
1061
  backgroundColor: "rgba(0,0,0,0.8)",
1061
1062
  top: 0,
1062
1063
  left: 0,
@@ -1065,7 +1066,7 @@ var He = window.requestAnimationFrame || window.webkitRequestAnimationFrame || w
1065
1066
  opacity: 0,
1066
1067
  WebkitTransition: "opacity 0.2s linear",
1067
1068
  transition: "opacity 0.2s linear"
1068
- }), N.makeFullscreen(this.backgroundElement), this.backgroundElement.style.position = "fixed", this.domElement = document.createElement("div"), x.extend(this.domElement.style, {
1069
+ }), P.makeFullscreen(this.backgroundElement), this.backgroundElement.style.position = "fixed", this.domElement = document.createElement("div"), S.extend(this.domElement.style, {
1069
1070
  position: "fixed",
1070
1071
  display: "none",
1071
1072
  zIndex: "1001",
@@ -1074,16 +1075,16 @@ var He = window.requestAnimationFrame || window.webkitRequestAnimationFrame || w
1074
1075
  transition: "transform 0.2s ease-out, opacity 0.2s linear"
1075
1076
  }), document.body.appendChild(this.backgroundElement), document.body.appendChild(this.domElement);
1076
1077
  var t = this;
1077
- N.bind(this.backgroundElement, "click", function() {
1078
+ P.bind(this.backgroundElement, "click", function() {
1078
1079
  t.hide();
1079
1080
  });
1080
1081
  }
1081
- return E(e, [
1082
+ return D(e, [
1082
1083
  {
1083
1084
  key: "show",
1084
1085
  value: function() {
1085
1086
  var e = this;
1086
- this.backgroundElement.style.display = "block", this.domElement.style.display = "block", this.domElement.style.opacity = 0, this.domElement.style.webkitTransform = "scale(1.1)", this.layout(), x.defer(function() {
1087
+ this.backgroundElement.style.display = "block", this.domElement.style.display = "block", this.domElement.style.opacity = 0, this.domElement.style.webkitTransform = "scale(1.1)", this.layout(), S.defer(function() {
1087
1088
  e.backgroundElement.style.opacity = 1, e.domElement.style.opacity = 1, e.domElement.style.webkitTransform = "scale(1)";
1088
1089
  });
1089
1090
  }
@@ -1092,36 +1093,36 @@ var He = window.requestAnimationFrame || window.webkitRequestAnimationFrame || w
1092
1093
  key: "hide",
1093
1094
  value: function() {
1094
1095
  var e = this, t = function t() {
1095
- e.domElement.style.display = "none", e.backgroundElement.style.display = "none", N.unbind(e.domElement, "webkitTransitionEnd", t), N.unbind(e.domElement, "transitionend", t), N.unbind(e.domElement, "oTransitionEnd", t);
1096
+ e.domElement.style.display = "none", e.backgroundElement.style.display = "none", P.unbind(e.domElement, "webkitTransitionEnd", t), P.unbind(e.domElement, "transitionend", t), P.unbind(e.domElement, "oTransitionEnd", t);
1096
1097
  };
1097
- N.bind(this.domElement, "webkitTransitionEnd", t), N.bind(this.domElement, "transitionend", t), N.bind(this.domElement, "oTransitionEnd", t), this.backgroundElement.style.opacity = 0, this.domElement.style.opacity = 0, this.domElement.style.webkitTransform = "scale(1.1)";
1098
+ P.bind(this.domElement, "webkitTransitionEnd", t), P.bind(this.domElement, "transitionend", t), P.bind(this.domElement, "oTransitionEnd", t), this.backgroundElement.style.opacity = 0, this.domElement.style.opacity = 0, this.domElement.style.webkitTransform = "scale(1.1)";
1098
1099
  }
1099
1100
  },
1100
1101
  {
1101
1102
  key: "layout",
1102
1103
  value: function() {
1103
- this.domElement.style.left = window.innerWidth / 2 - N.getWidth(this.domElement) / 2 + "px", this.domElement.style.top = window.innerHeight / 2 - N.getHeight(this.domElement) / 2 + "px";
1104
+ this.domElement.style.left = window.innerWidth / 2 - P.getWidth(this.domElement) / 2 + "px", this.domElement.style.top = window.innerHeight / 2 - P.getHeight(this.domElement) / 2 + "px";
1104
1105
  }
1105
1106
  }
1106
1107
  ]), e;
1107
- }(), We = he(".dg ul{list-style:none;margin:0;padding:0;width:100%;clear:both}.dg.ac{position:fixed;top:0;left:0;right:0;height:0;z-index:0}.dg:not(.ac) .main{overflow:hidden}.dg.main{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear}.dg.main.taller-than-window{overflow-y:auto}.dg.main.taller-than-window .close-button{opacity:1;margin-top:-1px;border-top:1px solid #2c2c2c}.dg.main ul.closed .close-button{opacity:1 !important}.dg.main:hover .close-button,.dg.main .close-button.drag{opacity:1}.dg.main .close-button{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear;border:0;line-height:19px;height:20px;cursor:pointer;text-align:center;background-color:#000}.dg.main .close-button.close-top{position:relative}.dg.main .close-button.close-bottom{position:absolute}.dg.main .close-button:hover{background-color:#111}.dg.a{float:right;margin-right:15px;overflow-y:visible}.dg.a.has-save>ul.close-top{margin-top:0}.dg.a.has-save>ul.close-bottom{margin-top:27px}.dg.a.has-save>ul.closed{margin-top:0}.dg.a .save-row{top:0;z-index:1002}.dg.a .save-row.close-top{position:relative}.dg.a .save-row.close-bottom{position:fixed}.dg li{-webkit-transition:height .1s ease-out;-o-transition:height .1s ease-out;-moz-transition:height .1s ease-out;transition:height .1s ease-out;-webkit-transition:overflow .1s linear;-o-transition:overflow .1s linear;-moz-transition:overflow .1s linear;transition:overflow .1s linear}.dg li:not(.folder){cursor:auto;height:27px;line-height:27px;padding:0 4px 0 5px}.dg li.folder{padding:0;border-left:4px solid rgba(0,0,0,0)}.dg li.title{cursor:pointer;margin-left:-4px}.dg .closed li:not(.title),.dg .closed ul li,.dg .closed ul li>*{height:0;overflow:hidden;border:0}.dg .cr{clear:both;padding-left:3px;height:27px;overflow:hidden}.dg .property-name{cursor:default;float:left;clear:left;width:40%;overflow:hidden;text-overflow:ellipsis}.dg .cr.function .property-name{width:100%}.dg .c{float:left;width:60%;position:relative}.dg .c input[type=text]{border:0;margin-top:4px;padding:3px;width:100%;float:right}.dg .has-slider input[type=text]{width:30%;margin-left:0}.dg .slider{float:left;width:66%;margin-left:-5px;margin-right:0;height:19px;margin-top:4px}.dg .slider-fg{height:100%}.dg .c input[type=checkbox]{margin-top:7px}.dg .c select{margin-top:5px}.dg .cr.function,.dg .cr.function .property-name,.dg .cr.function *,.dg .cr.boolean,.dg .cr.boolean *{cursor:pointer}.dg .cr.color{overflow:visible}.dg .selector{display:none;position:absolute;margin-left:-9px;margin-top:23px;z-index:10}.dg .c:hover .selector,.dg .selector.drag{display:block}.dg li.save-row{padding:0}.dg li.save-row .button{display:inline-block;padding:0px 6px}.dg.dialogue{background-color:#222;width:460px;padding:15px;font-size:13px;line-height:15px}#dg-new-constructor{padding:10px;color:#222;font-family:Monaco, monospace;font-size:10px;border:0;resize:none;box-shadow:inset 1px 1px 1px #888;word-wrap:break-word;margin:12px 0;display:block;width:440px;overflow-y:scroll;height:100px;position:relative}#dg-local-explain{display:none;font-size:11px;line-height:17px;border-radius:3px;background-color:#333;padding:8px;margin-top:10px}#dg-local-explain code{font-size:10px}#dat-gui-save-locally{display:none}.dg{color:#eee;font:11px 'Lucida Grande', sans-serif;text-shadow:0 -1px 0 #111}.dg.main::-webkit-scrollbar{width:5px;background:#1a1a1a}.dg.main::-webkit-scrollbar-corner{height:0;display:none}.dg.main::-webkit-scrollbar-thumb{border-radius:5px;background:#676767}.dg li:not(.folder){background:#1a1a1a;border-bottom:1px solid #2c2c2c}.dg li.save-row{line-height:25px;background:#dad5cb;border:0}.dg li.save-row select{margin-left:5px;width:108px}.dg li.save-row .button{margin-left:5px;margin-top:1px;border-radius:2px;font-size:9px;line-height:7px;padding:4px 4px 5px 4px;background:#c5bdad;color:#fff;text-shadow:0 1px 0 #b0a58f;box-shadow:0 -1px 0 #b0a58f;cursor:pointer}.dg li.save-row .button.gears{background:#c5bdad url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;height:7px;width:8px}.dg li.save-row .button:hover{background-color:#bab19e;box-shadow:0 -1px 0 #b0a58f}.dg li.folder{border-bottom:0}.dg li.title{padding-left:16px;background:#000 url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;cursor:pointer;border-bottom:1px solid rgba(255,255,255,0.2)}.dg .closed li.title{background-image:url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==)}.dg .cr.boolean{border-left:3px solid #806787}.dg .cr.color{border-left:3px solid}.dg .cr.function{border-left:3px solid #e61d5f}.dg .cr.number{border-left:3px solid #2FA1D6}.dg .cr.number input[type=text]{color:#2FA1D6}.dg .cr.string{border-left:3px solid #1ed36f}.dg .cr.string input[type=text]{color:#1ed36f}.dg .cr.function:hover,.dg .cr.boolean:hover{background:#111}.dg .c input[type=text]{background:#303030;outline:none}.dg .c input[type=text]:hover{background:#3c3c3c}.dg .c input[type=text]:focus{background:#494949;color:#fff}.dg .c .slider{background:#303030;cursor:ew-resize}.dg .c .slider-fg{background:#2FA1D6;max-width:100%}.dg .c .slider:hover{background:#3c3c3c}.dg .c .slider:hover .slider-fg{background:#44abda}\n");
1108
- Re.inject(We);
1109
- var Ge = "dg", Ke = 72, qe = 20, I = "Default", L = function() {
1108
+ }(), Ge = he(".dg ul{list-style:none;margin:0;padding:0;width:100%;clear:both}.dg.ac{position:fixed;top:0;left:0;right:0;height:0;z-index:0}.dg:not(.ac) .main{overflow:hidden}.dg.main{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear}.dg.main.taller-than-window{overflow-y:auto}.dg.main.taller-than-window .close-button{opacity:1;margin-top:-1px;border-top:1px solid #2c2c2c}.dg.main ul.closed .close-button{opacity:1 !important}.dg.main:hover .close-button,.dg.main .close-button.drag{opacity:1}.dg.main .close-button{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear;border:0;line-height:19px;height:20px;cursor:pointer;text-align:center;background-color:#000}.dg.main .close-button.close-top{position:relative}.dg.main .close-button.close-bottom{position:absolute}.dg.main .close-button:hover{background-color:#111}.dg.a{float:right;margin-right:15px;overflow-y:visible}.dg.a.has-save>ul.close-top{margin-top:0}.dg.a.has-save>ul.close-bottom{margin-top:27px}.dg.a.has-save>ul.closed{margin-top:0}.dg.a .save-row{top:0;z-index:1002}.dg.a .save-row.close-top{position:relative}.dg.a .save-row.close-bottom{position:fixed}.dg li{-webkit-transition:height .1s ease-out;-o-transition:height .1s ease-out;-moz-transition:height .1s ease-out;transition:height .1s ease-out;-webkit-transition:overflow .1s linear;-o-transition:overflow .1s linear;-moz-transition:overflow .1s linear;transition:overflow .1s linear}.dg li:not(.folder){cursor:auto;height:27px;line-height:27px;padding:0 4px 0 5px}.dg li.folder{padding:0;border-left:4px solid rgba(0,0,0,0)}.dg li.title{cursor:pointer;margin-left:-4px}.dg .closed li:not(.title),.dg .closed ul li,.dg .closed ul li>*{height:0;overflow:hidden;border:0}.dg .cr{clear:both;padding-left:3px;height:27px;overflow:hidden}.dg .property-name{cursor:default;float:left;clear:left;width:40%;overflow:hidden;text-overflow:ellipsis}.dg .cr.function .property-name{width:100%}.dg .c{float:left;width:60%;position:relative}.dg .c input[type=text]{border:0;margin-top:4px;padding:3px;width:100%;float:right}.dg .has-slider input[type=text]{width:30%;margin-left:0}.dg .slider{float:left;width:66%;margin-left:-5px;margin-right:0;height:19px;margin-top:4px}.dg .slider-fg{height:100%}.dg .c input[type=checkbox]{margin-top:7px}.dg .c select{margin-top:5px}.dg .cr.function,.dg .cr.function .property-name,.dg .cr.function *,.dg .cr.boolean,.dg .cr.boolean *{cursor:pointer}.dg .cr.color{overflow:visible}.dg .selector{display:none;position:absolute;margin-left:-9px;margin-top:23px;z-index:10}.dg .c:hover .selector,.dg .selector.drag{display:block}.dg li.save-row{padding:0}.dg li.save-row .button{display:inline-block;padding:0px 6px}.dg.dialogue{background-color:#222;width:460px;padding:15px;font-size:13px;line-height:15px}#dg-new-constructor{padding:10px;color:#222;font-family:Monaco, monospace;font-size:10px;border:0;resize:none;box-shadow:inset 1px 1px 1px #888;word-wrap:break-word;margin:12px 0;display:block;width:440px;overflow-y:scroll;height:100px;position:relative}#dg-local-explain{display:none;font-size:11px;line-height:17px;border-radius:3px;background-color:#333;padding:8px;margin-top:10px}#dg-local-explain code{font-size:10px}#dat-gui-save-locally{display:none}.dg{color:#eee;font:11px 'Lucida Grande', sans-serif;text-shadow:0 -1px 0 #111}.dg.main::-webkit-scrollbar{width:5px;background:#1a1a1a}.dg.main::-webkit-scrollbar-corner{height:0;display:none}.dg.main::-webkit-scrollbar-thumb{border-radius:5px;background:#676767}.dg li:not(.folder){background:#1a1a1a;border-bottom:1px solid #2c2c2c}.dg li.save-row{line-height:25px;background:#dad5cb;border:0}.dg li.save-row select{margin-left:5px;width:108px}.dg li.save-row .button{margin-left:5px;margin-top:1px;border-radius:2px;font-size:9px;line-height:7px;padding:4px 4px 5px 4px;background:#c5bdad;color:#fff;text-shadow:0 1px 0 #b0a58f;box-shadow:0 -1px 0 #b0a58f;cursor:pointer}.dg li.save-row .button.gears{background:#c5bdad url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;height:7px;width:8px}.dg li.save-row .button:hover{background-color:#bab19e;box-shadow:0 -1px 0 #b0a58f}.dg li.folder{border-bottom:0}.dg li.title{padding-left:16px;background:#000 url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;cursor:pointer;border-bottom:1px solid rgba(255,255,255,0.2)}.dg .closed li.title{background-image:url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==)}.dg .cr.boolean{border-left:3px solid #806787}.dg .cr.color{border-left:3px solid}.dg .cr.function{border-left:3px solid #e61d5f}.dg .cr.number{border-left:3px solid #2FA1D6}.dg .cr.number input[type=text]{color:#2FA1D6}.dg .cr.string{border-left:3px solid #1ed36f}.dg .cr.string input[type=text]{color:#1ed36f}.dg .cr.function:hover,.dg .cr.boolean:hover{background:#111}.dg .c input[type=text]{background:#303030;outline:none}.dg .c input[type=text]:hover{background:#3c3c3c}.dg .c input[type=text]:focus{background:#494949;color:#fff}.dg .c .slider{background:#303030;cursor:ew-resize}.dg .c .slider-fg{background:#2FA1D6;max-width:100%}.dg .c .slider:hover{background:#3c3c3c}.dg .c .slider:hover .slider-fg{background:#44abda}\n");
1109
+ ze.inject(Ge);
1110
+ var Ke = "dg", qe = 72, Je = 20, I = "Default", L = function() {
1110
1111
  try {
1111
1112
  return !!window.localStorage;
1112
1113
  } catch {
1113
1114
  return !1;
1114
1115
  }
1115
- }(), R = void 0, Je = !0, z = void 0, Ye = !1, Xe = [], B = function e(t) {
1116
+ }(), R = void 0, Ye = !0, z = void 0, Xe = !1, Ze = [], B = function e(t) {
1116
1117
  var n = this, r = t || {};
1117
- this.domElement = document.createElement("div"), this.__ul = document.createElement("ul"), this.domElement.appendChild(this.__ul), N.addClass(this.domElement, Ge), this.__folders = {}, this.__controllers = [], this.__rememberedObjects = [], this.__rememberedObjectIndecesToControllers = [], this.__listening = [], r = x.defaults(r, {
1118
+ this.domElement = document.createElement("div"), this.__ul = document.createElement("ul"), this.domElement.appendChild(this.__ul), P.addClass(this.domElement, Ke), this.__folders = {}, this.__controllers = [], this.__rememberedObjects = [], this.__rememberedObjectIndecesToControllers = [], this.__listening = [], r = S.defaults(r, {
1118
1119
  closeOnTop: !1,
1119
1120
  autoPlace: !0,
1120
1121
  width: e.DEFAULT_WIDTH
1121
- }), r = x.defaults(r, {
1122
+ }), r = S.defaults(r, {
1122
1123
  resizable: r.autoPlace,
1123
1124
  hideable: r.autoPlace
1124
- }), x.isUndefined(r.load) ? r.load = { preset: I } : r.preset && (r.load.preset = r.preset), x.isUndefined(r.parent) && r.hideable && Xe.push(this), r.resizable = x.isUndefined(r.parent) && r.resizable, r.autoPlace && x.isUndefined(r.scrollable) && (r.scrollable = !0);
1125
+ }), S.isUndefined(r.load) ? r.load = { preset: I } : r.preset && (r.load.preset = r.preset), S.isUndefined(r.parent) && r.hideable && Ze.push(this), r.resizable = S.isUndefined(r.parent) && r.resizable, r.autoPlace && S.isUndefined(r.scrollable) && (r.scrollable = !0);
1125
1126
  var i = L && localStorage.getItem(H(this, "isLocal")) === "true", a = void 0, o = void 0;
1126
1127
  if (Object.defineProperties(this, {
1127
1128
  parent: { get: function() {
@@ -1141,7 +1142,7 @@ var Ge = "dg", Ke = 72, qe = 20, I = "Default", L = function() {
1141
1142
  return n.parent ? n.getRoot().preset : r.load.preset;
1142
1143
  },
1143
1144
  set: function(e) {
1144
- n.parent ? n.getRoot().preset = e : r.load.preset = e, st(this), n.revert();
1145
+ n.parent ? n.getRoot().preset = e : r.load.preset = e, ct(this), n.revert();
1145
1146
  }
1146
1147
  },
1147
1148
  width: {
@@ -1149,7 +1150,7 @@ var Ge = "dg", Ke = 72, qe = 20, I = "Default", L = function() {
1149
1150
  return r.width;
1150
1151
  },
1151
1152
  set: function(e) {
1152
- r.width = e, ot(n, e);
1153
+ r.width = e, st(n, e);
1153
1154
  }
1154
1155
  },
1155
1156
  name: {
@@ -1165,7 +1166,7 @@ var Ge = "dg", Ke = 72, qe = 20, I = "Default", L = function() {
1165
1166
  return r.closed;
1166
1167
  },
1167
1168
  set: function(t) {
1168
- r.closed = t, r.closed ? N.addClass(n.__ul, e.CLASS_CLOSED) : N.removeClass(n.__ul, e.CLASS_CLOSED), this.onResize(), n.__closeButton && (n.__closeButton.innerHTML = t ? e.TEXT_OPEN : e.TEXT_CLOSED);
1169
+ r.closed = t, r.closed ? P.addClass(n.__ul, e.CLASS_CLOSED) : P.removeClass(n.__ul, e.CLASS_CLOSED), this.onResize(), n.__closeButton && (n.__closeButton.innerHTML = t ? e.TEXT_OPEN : e.TEXT_CLOSED);
1169
1170
  }
1170
1171
  },
1171
1172
  load: { get: function() {
@@ -1176,45 +1177,45 @@ var Ge = "dg", Ke = 72, qe = 20, I = "Default", L = function() {
1176
1177
  return i;
1177
1178
  },
1178
1179
  set: function(e) {
1179
- L && (i = e, e ? N.bind(window, "unload", a) : N.unbind(window, "unload", a), localStorage.setItem(H(n, "isLocal"), e));
1180
+ L && (i = e, e ? P.bind(window, "unload", a) : P.unbind(window, "unload", a), localStorage.setItem(H(n, "isLocal"), e));
1180
1181
  }
1181
1182
  }
1182
- }), x.isUndefined(r.parent)) {
1183
- if (this.closed = r.closed || !1, N.addClass(this.domElement, e.CLASS_MAIN), N.makeSelectable(this.domElement, !1), L && i) {
1183
+ }), S.isUndefined(r.parent)) {
1184
+ if (this.closed = r.closed || !1, P.addClass(this.domElement, e.CLASS_MAIN), P.makeSelectable(this.domElement, !1), L && i) {
1184
1185
  n.useLocalStorage = !0;
1185
1186
  var s = localStorage.getItem(H(this, "gui"));
1186
1187
  s && (r.load = JSON.parse(s));
1187
1188
  }
1188
- this.__closeButton = document.createElement("div"), this.__closeButton.innerHTML = e.TEXT_CLOSED, N.addClass(this.__closeButton, e.CLASS_CLOSE_BUTTON), r.closeOnTop ? (N.addClass(this.__closeButton, e.CLASS_CLOSE_TOP), this.domElement.insertBefore(this.__closeButton, this.domElement.childNodes[0])) : (N.addClass(this.__closeButton, e.CLASS_CLOSE_BOTTOM), this.domElement.appendChild(this.__closeButton)), N.bind(this.__closeButton, "click", function() {
1189
+ this.__closeButton = document.createElement("div"), this.__closeButton.innerHTML = e.TEXT_CLOSED, P.addClass(this.__closeButton, e.CLASS_CLOSE_BUTTON), r.closeOnTop ? (P.addClass(this.__closeButton, e.CLASS_CLOSE_TOP), this.domElement.insertBefore(this.__closeButton, this.domElement.childNodes[0])) : (P.addClass(this.__closeButton, e.CLASS_CLOSE_BOTTOM), this.domElement.appendChild(this.__closeButton)), P.bind(this.__closeButton, "click", function() {
1189
1190
  n.closed = !n.closed;
1190
1191
  });
1191
1192
  } else {
1192
1193
  r.closed === void 0 && (r.closed = !0);
1193
1194
  var c = document.createTextNode(r.name);
1194
- N.addClass(c, "controller-name"), o = Ze(n, c), N.addClass(this.__ul, e.CLASS_CLOSED), N.addClass(o, "title"), N.bind(o, "click", function(e) {
1195
+ P.addClass(c, "controller-name"), o = Qe(n, c), P.addClass(this.__ul, e.CLASS_CLOSED), P.addClass(o, "title"), P.bind(o, "click", function(e) {
1195
1196
  return e.preventDefault(), n.closed = !n.closed, !1;
1196
1197
  }), r.closed || (this.closed = !1);
1197
1198
  }
1198
- r.autoPlace && (x.isUndefined(r.parent) && (Je &&= (z = document.createElement("div"), N.addClass(z, Ge), N.addClass(z, e.CLASS_AUTO_PLACE_CONTAINER), document.body.appendChild(z), !1), z.appendChild(this.domElement), N.addClass(this.domElement, e.CLASS_AUTO_PLACE)), this.parent || ot(n, r.width)), this.__resizeHandler = function() {
1199
+ r.autoPlace && (S.isUndefined(r.parent) && (Ye &&= (z = document.createElement("div"), P.addClass(z, Ke), P.addClass(z, e.CLASS_AUTO_PLACE_CONTAINER), document.body.appendChild(z), !1), z.appendChild(this.domElement), P.addClass(this.domElement, e.CLASS_AUTO_PLACE)), this.parent || st(n, r.width)), this.__resizeHandler = function() {
1199
1200
  n.onResizeDebounced();
1200
- }, N.bind(window, "resize", this.__resizeHandler), N.bind(this.__ul, "webkitTransitionEnd", this.__resizeHandler), N.bind(this.__ul, "transitionend", this.__resizeHandler), N.bind(this.__ul, "oTransitionEnd", this.__resizeHandler), this.onResize(), r.resizable && at(this), a = function() {
1201
+ }, P.bind(window, "resize", this.__resizeHandler), P.bind(this.__ul, "webkitTransitionEnd", this.__resizeHandler), P.bind(this.__ul, "transitionend", this.__resizeHandler), P.bind(this.__ul, "oTransitionEnd", this.__resizeHandler), this.onResize(), r.resizable && ot(this), a = function() {
1201
1202
  L && localStorage.getItem(H(n, "isLocal")) === "true" && localStorage.setItem(H(n, "gui"), JSON.stringify(n.getSaveObject()));
1202
1203
  }, this.saveToLocalStorageIfPossible = a;
1203
1204
  function l() {
1204
1205
  var e = n.getRoot();
1205
- e.width += 1, x.defer(function() {
1206
+ e.width += 1, S.defer(function() {
1206
1207
  --e.width;
1207
1208
  });
1208
1209
  }
1209
1210
  r.parent || l();
1210
1211
  };
1211
1212
  B.toggleHide = function() {
1212
- Ye = !Ye, x.each(Xe, function(e) {
1213
- e.domElement.style.display = Ye ? "none" : "";
1213
+ Xe = !Xe, S.each(Ze, function(e) {
1214
+ e.domElement.style.display = Xe ? "none" : "";
1214
1215
  });
1215
1216
  }, B.CLASS_AUTO_PLACE = "a", B.CLASS_AUTO_PLACE_CONTAINER = "ac", B.CLASS_MAIN = "main", B.CLASS_CONTROLLER_ROW = "cr", B.CLASS_TOO_TALL = "taller-than-window", B.CLASS_CLOSED = "closed", B.CLASS_CLOSE_BUTTON = "close-button", B.CLASS_CLOSE_TOP = "close-top", B.CLASS_CLOSE_BOTTOM = "close-bottom", B.CLASS_DRAG = "drag", B.DEFAULT_WIDTH = 245, B.TEXT_CLOSED = "Close Controls", B.TEXT_OPEN = "Open Controls", B._keydownHandler = function(e) {
1216
- document.activeElement.type !== "text" && (e.which === Ke || e.keyCode === Ke) && B.toggleHide();
1217
- }, N.bind(window, "keydown", B._keydownHandler, !1), x.extend(B.prototype, {
1217
+ document.activeElement.type !== "text" && (e.which === qe || e.keyCode === qe) && B.toggleHide();
1218
+ }, P.bind(window, "keydown", B._keydownHandler, !1), S.extend(B.prototype, {
1218
1219
  add: function(e, t) {
1219
1220
  return V(this, e, t, { factoryArgs: Array.prototype.slice.call(arguments, 2) });
1220
1221
  },
@@ -1224,7 +1225,7 @@ B.toggleHide = function() {
1224
1225
  remove: function(e) {
1225
1226
  this.__ul.removeChild(e.__li), this.__controllers.splice(this.__controllers.indexOf(e), 1);
1226
1227
  var t = this;
1227
- x.defer(function() {
1228
+ S.defer(function() {
1228
1229
  t.onResize();
1229
1230
  });
1230
1231
  },
@@ -1232,9 +1233,9 @@ B.toggleHide = function() {
1232
1233
  if (this.parent) throw Error("Only the root GUI should be removed with .destroy(). For subfolders, use gui.removeFolder(folder) instead.");
1233
1234
  this.autoPlace && z.removeChild(this.domElement);
1234
1235
  var e = this;
1235
- x.each(this.__folders, function(t) {
1236
+ S.each(this.__folders, function(t) {
1236
1237
  e.removeFolder(t);
1237
- }), N.unbind(window, "keydown", B._keydownHandler, !1), Qe(this);
1238
+ }), P.unbind(window, "keydown", B._keydownHandler, !1), $e(this);
1238
1239
  },
1239
1240
  addFolder: function(e) {
1240
1241
  if (this.__folders[e] !== void 0) throw Error("You already have a folder in this GUI by the name \"" + e + "\"");
@@ -1245,15 +1246,15 @@ B.toggleHide = function() {
1245
1246
  t.autoPlace = this.autoPlace, this.load && this.load.folders && this.load.folders[e] && (t.closed = this.load.folders[e].closed, t.load = this.load.folders[e]);
1246
1247
  var n = new B(t);
1247
1248
  this.__folders[e] = n;
1248
- var r = Ze(this, n.domElement);
1249
- return N.addClass(r, "folder"), n;
1249
+ var r = Qe(this, n.domElement);
1250
+ return P.addClass(r, "folder"), n;
1250
1251
  },
1251
1252
  removeFolder: function(e) {
1252
- this.__ul.removeChild(e.domElement.parentElement), delete this.__folders[e.name], this.load && this.load.folders && this.load.folders[e.name] && delete this.load.folders[e.name], Qe(e);
1253
+ this.__ul.removeChild(e.domElement.parentElement), delete this.__folders[e.name], this.load && this.load.folders && this.load.folders[e.name] && delete this.load.folders[e.name], $e(e);
1253
1254
  var t = this;
1254
- x.each(e.__folders, function(t) {
1255
+ S.each(e.__folders, function(t) {
1255
1256
  e.removeFolder(t);
1256
- }), x.defer(function() {
1257
+ }), S.defer(function() {
1257
1258
  t.onResize();
1258
1259
  });
1259
1260
  },
@@ -1272,24 +1273,24 @@ B.toggleHide = function() {
1272
1273
  onResize: function() {
1273
1274
  var e = this.getRoot();
1274
1275
  if (e.scrollable) {
1275
- var t = N.getOffset(e.__ul).top, n = 0;
1276
- x.each(e.__ul.childNodes, function(t) {
1277
- e.autoPlace && t === e.__save_row || (n += N.getHeight(t));
1278
- }), window.innerHeight - t - qe < n ? (N.addClass(e.domElement, B.CLASS_TOO_TALL), e.__ul.style.height = window.innerHeight - t - qe + "px") : (N.removeClass(e.domElement, B.CLASS_TOO_TALL), e.__ul.style.height = "auto");
1276
+ var t = P.getOffset(e.__ul).top, n = 0;
1277
+ S.each(e.__ul.childNodes, function(t) {
1278
+ e.autoPlace && t === e.__save_row || (n += P.getHeight(t));
1279
+ }), window.innerHeight - t - Je < n ? (P.addClass(e.domElement, B.CLASS_TOO_TALL), e.__ul.style.height = window.innerHeight - t - Je + "px") : (P.removeClass(e.domElement, B.CLASS_TOO_TALL), e.__ul.style.height = "auto");
1279
1280
  }
1280
- e.__resize_handle && x.defer(function() {
1281
+ e.__resize_handle && S.defer(function() {
1281
1282
  e.__resize_handle.style.height = e.__ul.offsetHeight + "px";
1282
1283
  }), e.__closeButton && (e.__closeButton.style.width = e.width + "px");
1283
1284
  },
1284
- onResizeDebounced: x.debounce(function() {
1285
+ onResizeDebounced: S.debounce(function() {
1285
1286
  this.onResize();
1286
1287
  }, 50),
1287
1288
  remember: function() {
1288
- if (x.isUndefined(R) && (R = new Ue(), R.domElement.innerHTML = ze), this.parent) throw Error("You can only call remember on a top level GUI.");
1289
+ if (S.isUndefined(R) && (R = new We(), R.domElement.innerHTML = Be), this.parent) throw Error("You can only call remember on a top level GUI.");
1289
1290
  var e = this;
1290
- x.each(Array.prototype.slice.call(arguments), function(t) {
1291
- e.__rememberedObjects.length === 0 && it(e), e.__rememberedObjects.indexOf(t) === -1 && e.__rememberedObjects.push(t);
1292
- }), this.autoPlace && ot(this, this.width);
1291
+ S.each(Array.prototype.slice.call(arguments), function(t) {
1292
+ e.__rememberedObjects.length === 0 && at(e), e.__rememberedObjects.indexOf(t) === -1 && e.__rememberedObjects.push(t);
1293
+ }), this.autoPlace && st(this, this.width);
1293
1294
  },
1294
1295
  getRoot: function() {
1295
1296
  for (var e = this; e.parent;) e = e.parent;
@@ -1297,57 +1298,57 @@ B.toggleHide = function() {
1297
1298
  },
1298
1299
  getSaveObject: function() {
1299
1300
  var e = this.load;
1300
- return e.closed = this.closed, this.__rememberedObjects.length > 0 && (e.preset = this.preset, e.remembered ||= {}, e.remembered[this.preset] = U(this)), e.folders = {}, x.each(this.__folders, function(t, n) {
1301
+ return e.closed = this.closed, this.__rememberedObjects.length > 0 && (e.preset = this.preset, e.remembered ||= {}, e.remembered[this.preset] = U(this)), e.folders = {}, S.each(this.__folders, function(t, n) {
1301
1302
  e.folders[n] = t.getSaveObject();
1302
1303
  }), e;
1303
1304
  },
1304
1305
  save: function() {
1305
- this.load.remembered || (this.load.remembered = {}), this.load.remembered[this.preset] = U(this), $e(this, !1), this.saveToLocalStorageIfPossible();
1306
+ this.load.remembered || (this.load.remembered = {}), this.load.remembered[this.preset] = U(this), et(this, !1), this.saveToLocalStorageIfPossible();
1306
1307
  },
1307
1308
  saveAs: function(e) {
1308
- this.load.remembered || (this.load.remembered = {}, this.load.remembered[I] = U(this, !0)), this.load.remembered[e] = U(this), this.preset = e, nt(this, e, !0), this.saveToLocalStorageIfPossible();
1309
+ this.load.remembered || (this.load.remembered = {}, this.load.remembered[I] = U(this, !0)), this.load.remembered[e] = U(this), this.preset = e, rt(this, e, !0), this.saveToLocalStorageIfPossible();
1309
1310
  },
1310
1311
  revert: function(e) {
1311
- x.each(this.__controllers, function(t) {
1312
- this.getRoot().load.remembered ? tt(e || this.getRoot(), t) : t.setValue(t.initialValue), t.__onFinishChange && t.__onFinishChange.call(t, t.getValue());
1313
- }, this), x.each(this.__folders, function(e) {
1312
+ S.each(this.__controllers, function(t) {
1313
+ this.getRoot().load.remembered ? nt(e || this.getRoot(), t) : t.setValue(t.initialValue), t.__onFinishChange && t.__onFinishChange.call(t, t.getValue());
1314
+ }, this), S.each(this.__folders, function(e) {
1314
1315
  e.revert(e);
1315
- }), e || $e(this.getRoot(), !1);
1316
+ }), e || et(this.getRoot(), !1);
1316
1317
  },
1317
1318
  listen: function(e) {
1318
1319
  var t = this.__listening.length === 0;
1319
- this.__listening.push(e), t && ct(this.__listening);
1320
+ this.__listening.push(e), t && lt(this.__listening);
1320
1321
  },
1321
1322
  updateDisplay: function() {
1322
- x.each(this.__controllers, function(e) {
1323
+ S.each(this.__controllers, function(e) {
1323
1324
  e.updateDisplay();
1324
- }), x.each(this.__folders, function(e) {
1325
+ }), S.each(this.__folders, function(e) {
1325
1326
  e.updateDisplay();
1326
1327
  });
1327
1328
  }
1328
1329
  });
1329
- function Ze(e, t, n) {
1330
+ function Qe(e, t, n) {
1330
1331
  var r = document.createElement("li");
1331
1332
  return t && r.appendChild(t), n ? e.__ul.insertBefore(r, n) : e.__ul.appendChild(r), e.onResize(), r;
1332
1333
  }
1333
- function Qe(e) {
1334
- N.unbind(window, "resize", e.__resizeHandler), e.saveToLocalStorageIfPossible && N.unbind(window, "unload", e.saveToLocalStorageIfPossible);
1334
+ function $e(e) {
1335
+ P.unbind(window, "resize", e.__resizeHandler), e.saveToLocalStorageIfPossible && P.unbind(window, "unload", e.saveToLocalStorageIfPossible);
1335
1336
  }
1336
- function $e(e, t) {
1337
+ function et(e, t) {
1337
1338
  var n = e.__preset_select[e.__preset_select.selectedIndex];
1338
1339
  t ? n.innerHTML = n.value + "*" : n.innerHTML = n.value;
1339
1340
  }
1340
- function et(e, t, n) {
1341
- if (n.__li = t, n.__gui = e, x.extend(n, {
1341
+ function tt(e, t, n) {
1342
+ if (n.__li = t, n.__gui = e, S.extend(n, {
1342
1343
  options: function(t) {
1343
1344
  if (arguments.length > 1) {
1344
1345
  var r = n.__li.nextElementSibling;
1345
1346
  return n.remove(), V(e, n.object, n.property, {
1346
1347
  before: r,
1347
- factoryArgs: [x.toArray(arguments)]
1348
+ factoryArgs: [S.toArray(arguments)]
1348
1349
  });
1349
1350
  }
1350
- if (x.isArray(t) || x.isObject(t)) {
1351
+ if (S.isArray(t) || S.isObject(t)) {
1351
1352
  var i = n.__li.nextElementSibling;
1352
1353
  return n.remove(), V(e, n.object, n.property, {
1353
1354
  before: i,
@@ -1365,12 +1366,12 @@ function et(e, t, n) {
1365
1366
  return n.__gui.remove(n), n;
1366
1367
  }
1367
1368
  }), n instanceof Ne) {
1368
- var r = new P(n.object, n.property, {
1369
+ var r = new F(n.object, n.property, {
1369
1370
  min: n.__min,
1370
1371
  max: n.__max,
1371
1372
  step: n.__step
1372
1373
  });
1373
- x.each([
1374
+ S.each([
1374
1375
  "updateDisplay",
1375
1376
  "onChange",
1376
1377
  "onFinishChange",
@@ -1383,10 +1384,10 @@ function et(e, t, n) {
1383
1384
  var e = Array.prototype.slice.call(arguments);
1384
1385
  return i.apply(r, e), t.apply(n, e);
1385
1386
  };
1386
- }), N.addClass(t, "has-slider"), n.domElement.insertBefore(r.domElement, n.domElement.firstElementChild);
1387
- } else if (n instanceof P) {
1387
+ }), P.addClass(t, "has-slider"), n.domElement.insertBefore(r.domElement, n.domElement.firstElementChild);
1388
+ } else if (n instanceof F) {
1388
1389
  var i = function(t) {
1389
- if (x.isNumber(n.__min) && x.isNumber(n.__max)) {
1390
+ if (S.isNumber(n.__min) && S.isNumber(n.__max)) {
1390
1391
  var r = n.__li.firstElementChild.firstElementChild.innerHTML, i = n.__gui.__listening.indexOf(n) > -1;
1391
1392
  n.remove();
1392
1393
  var a = V(e, n.object, n.property, {
@@ -1401,25 +1402,25 @@ function et(e, t, n) {
1401
1402
  }
1402
1403
  return t;
1403
1404
  };
1404
- n.min = x.compose(i, n.min), n.max = x.compose(i, n.max);
1405
- } else n instanceof Ee ? (N.bind(t, "click", function() {
1406
- N.fakeEvent(n.__checkbox, "click");
1407
- }), N.bind(n.__checkbox, "click", function(e) {
1405
+ n.min = S.compose(i, n.min), n.max = S.compose(i, n.max);
1406
+ } else n instanceof Ee ? (P.bind(t, "click", function() {
1407
+ P.fakeEvent(n.__checkbox, "click");
1408
+ }), P.bind(n.__checkbox, "click", function(e) {
1408
1409
  e.stopPropagation();
1409
- })) : n instanceof Pe ? (N.bind(t, "click", function() {
1410
- N.fakeEvent(n.__button, "click");
1411
- }), N.bind(t, "mouseover", function() {
1412
- N.addClass(n.__button, "hover");
1413
- }), N.bind(t, "mouseout", function() {
1414
- N.removeClass(n.__button, "hover");
1415
- })) : n instanceof F && (N.addClass(t, "color"), n.updateDisplay = x.compose(function(e) {
1410
+ })) : n instanceof Pe ? (P.bind(t, "click", function() {
1411
+ P.fakeEvent(n.__button, "click");
1412
+ }), P.bind(t, "mouseover", function() {
1413
+ P.addClass(n.__button, "hover");
1414
+ }), P.bind(t, "mouseout", function() {
1415
+ P.removeClass(n.__button, "hover");
1416
+ })) : n instanceof Fe && (P.addClass(t, "color"), n.updateDisplay = S.compose(function(e) {
1416
1417
  return t.style.borderLeftColor = n.__color.toString(), e;
1417
1418
  }, n.updateDisplay), n.updateDisplay());
1418
- n.setValue = x.compose(function(t) {
1419
- return e.getRoot().__preset_select && n.isModified() && $e(e.getRoot(), !0), t;
1419
+ n.setValue = S.compose(function(t) {
1420
+ return e.getRoot().__preset_select && n.isModified() && et(e.getRoot(), !0), t;
1420
1421
  }, n.setValue);
1421
1422
  }
1422
- function tt(e, t) {
1423
+ function nt(e, t) {
1423
1424
  var n = e.getRoot(), r = n.__rememberedObjects.indexOf(t.object);
1424
1425
  if (r !== -1) {
1425
1426
  var i = n.__rememberedObjectIndecesToControllers[r];
@@ -1438,69 +1439,69 @@ function tt(e, t) {
1438
1439
  function V(e, t, n, r) {
1439
1440
  if (t[n] === void 0) throw Error("Object \"" + t + "\" has no property \"" + n + "\"");
1440
1441
  var i = void 0;
1441
- if (r.color) i = new F(t, n);
1442
+ if (r.color) i = new Fe(t, n);
1442
1443
  else {
1443
1444
  var a = [t, n].concat(r.factoryArgs);
1444
- i = Be.apply(e, a);
1445
+ i = Ve.apply(e, a);
1445
1446
  }
1446
- r.before instanceof j && (r.before = r.before.__li), tt(e, i), N.addClass(i.domElement, "c");
1447
+ r.before instanceof M && (r.before = r.before.__li), nt(e, i), P.addClass(i.domElement, "c");
1447
1448
  var o = document.createElement("span");
1448
- N.addClass(o, "property-name"), o.innerHTML = i.property;
1449
+ P.addClass(o, "property-name"), o.innerHTML = i.property;
1449
1450
  var s = document.createElement("div");
1450
1451
  s.appendChild(o), s.appendChild(i.domElement);
1451
- var c = Ze(e, s, r.before);
1452
- return N.addClass(c, B.CLASS_CONTROLLER_ROW), i instanceof F ? N.addClass(c, "color") : N.addClass(c, be(i.getValue())), et(e, c, i), e.__controllers.push(i), i;
1452
+ var c = Qe(e, s, r.before);
1453
+ return P.addClass(c, B.CLASS_CONTROLLER_ROW), i instanceof Fe ? P.addClass(c, "color") : P.addClass(c, be(i.getValue())), tt(e, c, i), e.__controllers.push(i), i;
1453
1454
  }
1454
1455
  function H(e, t) {
1455
1456
  return document.location.href + "." + t;
1456
1457
  }
1457
- function nt(e, t, n) {
1458
+ function rt(e, t, n) {
1458
1459
  var r = document.createElement("option");
1459
1460
  r.innerHTML = t, r.value = t, e.__preset_select.appendChild(r), n && (e.__preset_select.selectedIndex = e.__preset_select.length - 1);
1460
1461
  }
1461
- function rt(e, t) {
1462
+ function it(e, t) {
1462
1463
  t.style.display = e.useLocalStorage ? "block" : "none";
1463
1464
  }
1464
- function it(e) {
1465
+ function at(e) {
1465
1466
  var t = e.__save_row = document.createElement("li");
1466
- N.addClass(e.domElement, "has-save"), e.__ul.insertBefore(t, e.__ul.firstChild), N.addClass(t, "save-row");
1467
+ P.addClass(e.domElement, "has-save"), e.__ul.insertBefore(t, e.__ul.firstChild), P.addClass(t, "save-row");
1467
1468
  var n = document.createElement("span");
1468
- n.innerHTML = "&nbsp;", N.addClass(n, "button gears");
1469
+ n.innerHTML = "&nbsp;", P.addClass(n, "button gears");
1469
1470
  var r = document.createElement("span");
1470
- r.innerHTML = "Save", N.addClass(r, "button"), N.addClass(r, "save");
1471
+ r.innerHTML = "Save", P.addClass(r, "button"), P.addClass(r, "save");
1471
1472
  var i = document.createElement("span");
1472
- i.innerHTML = "New", N.addClass(i, "button"), N.addClass(i, "save-as");
1473
+ i.innerHTML = "New", P.addClass(i, "button"), P.addClass(i, "save-as");
1473
1474
  var a = document.createElement("span");
1474
- a.innerHTML = "Revert", N.addClass(a, "button"), N.addClass(a, "revert");
1475
+ a.innerHTML = "Revert", P.addClass(a, "button"), P.addClass(a, "revert");
1475
1476
  var o = e.__preset_select = document.createElement("select");
1476
- if (e.load && e.load.remembered ? x.each(e.load.remembered, function(t, n) {
1477
- nt(e, n, n === e.preset);
1478
- }) : nt(e, I, !1), N.bind(o, "change", function() {
1477
+ if (e.load && e.load.remembered ? S.each(e.load.remembered, function(t, n) {
1478
+ rt(e, n, n === e.preset);
1479
+ }) : rt(e, I, !1), P.bind(o, "change", function() {
1479
1480
  for (var t = 0; t < e.__preset_select.length; t++) e.__preset_select[t].innerHTML = e.__preset_select[t].value;
1480
1481
  e.preset = this.value;
1481
1482
  }), t.appendChild(o), t.appendChild(n), t.appendChild(r), t.appendChild(i), t.appendChild(a), L) {
1482
1483
  var s = document.getElementById("dg-local-explain"), c = document.getElementById("dg-local-storage"), l = document.getElementById("dg-save-locally");
1483
- l.style.display = "block", localStorage.getItem(H(e, "isLocal")) === "true" && c.setAttribute("checked", "checked"), rt(e, s), N.bind(c, "change", function() {
1484
- e.useLocalStorage = !e.useLocalStorage, rt(e, s);
1484
+ l.style.display = "block", localStorage.getItem(H(e, "isLocal")) === "true" && c.setAttribute("checked", "checked"), it(e, s), P.bind(c, "change", function() {
1485
+ e.useLocalStorage = !e.useLocalStorage, it(e, s);
1485
1486
  });
1486
1487
  }
1487
1488
  var u = document.getElementById("dg-new-constructor");
1488
- N.bind(u, "keydown", function(e) {
1489
+ P.bind(u, "keydown", function(e) {
1489
1490
  e.metaKey && (e.which === 67 || e.keyCode === 67) && R.hide();
1490
- }), N.bind(n, "click", function() {
1491
+ }), P.bind(n, "click", function() {
1491
1492
  u.innerHTML = JSON.stringify(e.getSaveObject(), void 0, 2), R.show(), u.focus(), u.select();
1492
- }), N.bind(r, "click", function() {
1493
+ }), P.bind(r, "click", function() {
1493
1494
  e.save();
1494
- }), N.bind(i, "click", function() {
1495
+ }), P.bind(i, "click", function() {
1495
1496
  var t = prompt("Enter a new preset name.");
1496
1497
  t && e.saveAs(t);
1497
- }), N.bind(a, "click", function() {
1498
+ }), P.bind(a, "click", function() {
1498
1499
  e.revert();
1499
1500
  });
1500
1501
  }
1501
- function at(e) {
1502
+ function ot(e) {
1502
1503
  var t = void 0;
1503
- e.__resize_handle = document.createElement("div"), x.extend(e.__resize_handle.style, {
1504
+ e.__resize_handle = document.createElement("div"), S.extend(e.__resize_handle.style, {
1504
1505
  width: "6px",
1505
1506
  marginLeft: "-3px",
1506
1507
  height: "200px",
@@ -1511,41 +1512,41 @@ function at(e) {
1511
1512
  return n.preventDefault(), e.width += t - n.clientX, e.onResize(), t = n.clientX, !1;
1512
1513
  }
1513
1514
  function r() {
1514
- N.removeClass(e.__closeButton, B.CLASS_DRAG), N.unbind(window, "mousemove", n), N.unbind(window, "mouseup", r);
1515
+ P.removeClass(e.__closeButton, B.CLASS_DRAG), P.unbind(window, "mousemove", n), P.unbind(window, "mouseup", r);
1515
1516
  }
1516
1517
  function i(i) {
1517
- return i.preventDefault(), t = i.clientX, N.addClass(e.__closeButton, B.CLASS_DRAG), N.bind(window, "mousemove", n), N.bind(window, "mouseup", r), !1;
1518
+ return i.preventDefault(), t = i.clientX, P.addClass(e.__closeButton, B.CLASS_DRAG), P.bind(window, "mousemove", n), P.bind(window, "mouseup", r), !1;
1518
1519
  }
1519
- N.bind(e.__resize_handle, "mousedown", i), N.bind(e.__closeButton, "mousedown", i), e.domElement.insertBefore(e.__resize_handle, e.domElement.firstElementChild);
1520
+ P.bind(e.__resize_handle, "mousedown", i), P.bind(e.__closeButton, "mousedown", i), e.domElement.insertBefore(e.__resize_handle, e.domElement.firstElementChild);
1520
1521
  }
1521
- function ot(e, t) {
1522
+ function st(e, t) {
1522
1523
  e.domElement.style.width = t + "px", e.__save_row && e.autoPlace && (e.__save_row.style.width = t + "px"), e.__closeButton && (e.__closeButton.style.width = t + "px");
1523
1524
  }
1524
1525
  function U(e, t) {
1525
1526
  var n = {};
1526
- return x.each(e.__rememberedObjects, function(r, i) {
1527
+ return S.each(e.__rememberedObjects, function(r, i) {
1527
1528
  var a = {}, o = e.__rememberedObjectIndecesToControllers[i];
1528
- x.each(o, function(e, n) {
1529
+ S.each(o, function(e, n) {
1529
1530
  a[n] = t ? e.initialValue : e.getValue();
1530
1531
  }), n[i] = a;
1531
1532
  }), n;
1532
1533
  }
1533
- function st(e) {
1534
+ function ct(e) {
1534
1535
  for (var t = 0; t < e.__preset_select.length; t++) e.__preset_select[t].value === e.preset && (e.__preset_select.selectedIndex = t);
1535
1536
  }
1536
- function ct(e) {
1537
- e.length !== 0 && He.call(window, function() {
1538
- ct(e);
1539
- }), x.each(e, function(e) {
1537
+ function lt(e) {
1538
+ e.length !== 0 && Ue.call(window, function() {
1539
+ lt(e);
1540
+ }), S.each(e, function(e) {
1540
1541
  e.updateDisplay();
1541
1542
  });
1542
1543
  }
1543
- var lt = B, ut = class {
1544
+ var ut = B, dt = class {
1544
1545
  static createMeshPhysicalMaterial(e) {
1545
- return new r(e);
1546
+ return new c(e);
1546
1547
  }
1547
1548
  static createMeshStandardMaterial(e) {
1548
- return new c(e);
1549
+ return new s(e);
1549
1550
  }
1550
1551
  }, W = Object.freeze({
1551
1552
  Linear: Object.freeze({
@@ -1690,7 +1691,7 @@ var lt = B, ut = class {
1690
1691
  }
1691
1692
  }), G = function() {
1692
1693
  return performance.now();
1693
- }, dt = function() {
1694
+ }, ft = function() {
1694
1695
  function e() {
1695
1696
  var e = [...arguments];
1696
1697
  this._tweens = {}, this._tweensAddedDuringUpdate = {}, this.add.apply(this, e);
@@ -1764,14 +1765,14 @@ var lt = B, ut = class {
1764
1765
  return (2 * t - 2 * n + a + o) * c + (-3 * t + 3 * n - 2 * a - o) * s + a * i + t;
1765
1766
  }
1766
1767
  }
1767
- }, ft = function() {
1768
+ }, pt = function() {
1768
1769
  function e() {}
1769
1770
  return e.nextId = function() {
1770
1771
  return e._nextId++;
1771
1772
  }, e._nextId = 0, e;
1772
- }(), pt = new dt(), q = function() {
1773
+ }(), mt = new ft(), q = function() {
1773
1774
  function e(e, t) {
1774
- this._isPaused = !1, this._pauseStart = 0, this._valuesStart = {}, this._valuesEnd = {}, this._valuesStartRepeat = {}, this._duration = 1e3, this._isDynamic = !1, this._initialRepeat = 0, this._repeat = 0, this._yoyo = !1, this._isPlaying = !1, this._reversed = !1, this._delayTime = 0, this._startTime = 0, this._easingFunction = W.Linear.None, this._interpolationFunction = K.Linear, this._chainedTweens = [], this._onStartCallbackFired = !1, this._onEveryStartCallbackFired = !1, this._id = ft.nextId(), this._isChainStopped = !1, this._propertiesAreSetUp = !1, this._goToEnd = !1, this._object = e, typeof t == "object" ? (this._group = t, t.add(this)) : t === !0 && (this._group = pt, pt.add(this));
1775
+ this._isPaused = !1, this._pauseStart = 0, this._valuesStart = {}, this._valuesEnd = {}, this._valuesStartRepeat = {}, this._duration = 1e3, this._isDynamic = !1, this._initialRepeat = 0, this._repeat = 0, this._yoyo = !1, this._isPlaying = !1, this._reversed = !1, this._delayTime = 0, this._startTime = 0, this._easingFunction = W.Linear.None, this._interpolationFunction = K.Linear, this._chainedTweens = [], this._onStartCallbackFired = !1, this._onEveryStartCallbackFired = !1, this._id = pt.nextId(), this._isChainStopped = !1, this._propertiesAreSetUp = !1, this._goToEnd = !1, this._object = e, typeof t == "object" ? (this._group = t, t.add(this)) : t === !0 && (this._group = mt, mt.add(this));
1775
1776
  }
1776
1777
  return e.prototype.getId = function() {
1777
1778
  return this._id;
@@ -1911,49 +1912,47 @@ var lt = B, ut = class {
1911
1912
  typeof n == "string" ? this._valuesStartRepeat[e] = this._valuesStartRepeat[e] + parseFloat(n) : this._valuesStartRepeat[e] = this._valuesEnd[e], this._valuesEnd[e] = t;
1912
1913
  }, e.autoStartOnUpdate = !1, e;
1913
1914
  }();
1914
- ft.nextId;
1915
- var J = pt;
1915
+ pt.nextId;
1916
+ var J = mt;
1916
1917
  J.getAll.bind(J), J.removeAll.bind(J), J.add.bind(J), J.remove.bind(J), J.update.bind(J);
1917
- //#endregion
1918
- //#region packages/common-core/src/utils/threejs-utils.ts
1919
- var mt = .4, ht = "#DDDDDD", gt = .4, _t = "#7B7B7B", vt = "#B1B1B1", yt = .8, bt = .9, xt = (e) => e ? !e?.isWebGPURenderer : !1, St = (e, t, n, r) => {
1920
- if (!e || !t || n === 0 || r === 0) return new s();
1918
+ var ht = .4, gt = "#DDDDDD", _t = .4, vt = "#7B7B7B", yt = "#B1B1B1", bt = .8, xt = .9, St = (e) => e instanceof g ? e.capabilities.maxSamples : 16, Ct = (e) => e instanceof g ? e.capabilities.maxTextures : 16, wt = (e) => e instanceof g ? e.capabilities.getMaxAnisotropy() : 16, Tt = (e, t, n, r) => {
1919
+ if (!e || !t || n === 0 || r === 0) return new m();
1921
1920
  let i = e.clone(), a = n / 2, o = r / 2;
1922
1921
  return i.project(t), i.x = Math.floor(i.x * a + a), i.y = Math.floor(-(i.y * o) + o), i.z = e.distanceTo(t.position), i;
1923
- }, Ct = (e, t) => {
1924
- t ||= new s(0, 0, 0);
1925
- let n = new s(e.size.x / 1e3, e.size.z / 1e3, e.size.y / 1e3), r = new s(e.origin.x / 1e3, e.origin.z / 1e3, e.origin.y / -1e3);
1926
- return new d(new s(0, 0, -n.z).add(r).sub(t), new s(n.x, n.y, 0).add(r).add(t));
1927
- }, wt = (e) => (e.from /= 1e3, e.to /= 1e3, e), Tt = (e, t) => {
1928
- let n = v(e.x), r = v(e.y), i = v(e.z), a = v(t.x), o = v(t.y), s = v(t.z);
1929
- return n === a && r === o && i === s;
1930
1922
  }, Et = (e, t) => {
1931
- let n = v(e.w), r = v(e.x), i = v(e.y), a = v(e.z), o = v(t.w), s = v(t.x), c = v(t.y), l = v(t.z);
1923
+ t ||= new m(0, 0, 0);
1924
+ let n = new m(e.size.x / 1e3, e.size.z / 1e3, e.size.y / 1e3), r = new m(e.origin.x / 1e3, e.origin.z / 1e3, e.origin.y / -1e3);
1925
+ return new o(new m(0, 0, -n.z).add(r).sub(t), new m(n.x, n.y, 0).add(r).add(t));
1926
+ }, Dt = (e) => (e.from /= 1e3, e.to /= 1e3, e), Ot = (e, t) => {
1927
+ let n = y(e.x), r = y(e.y), i = y(e.z), a = y(t.x), o = y(t.y), s = y(t.z);
1928
+ return n === a && r === o && i === s;
1929
+ }, kt = (e, t) => {
1930
+ let n = y(e.w), r = y(e.x), i = y(e.y), a = y(e.z), o = y(t.w), s = y(t.x), c = y(t.y), l = y(t.z);
1932
1931
  return n === o && r === s && i === c && a === l;
1933
- }, Dt = (e, t) => {
1934
- let n = v(e.x), r = v(e.y), i = v(t.x), a = v(t.y);
1932
+ }, At = (e, t) => {
1933
+ let n = y(e.x), r = y(e.y), i = y(t.x), a = y(t.y);
1935
1934
  return n === i && r === a;
1936
- }, Y = null, Ot = () => {
1935
+ }, Y = null, jt = () => {
1937
1936
  if (Y) return Y;
1938
- let e = new Uint8Array(4);
1939
- for (let t = 0; t < 1; t++) {
1940
- let n = t * 4;
1941
- e[n] = 255, e[n + 1] = 255, e[n + 2] = 255, e[n + 3] = 255;
1937
+ let t = new Uint8Array(4);
1938
+ for (let e = 0; e < 1; e++) {
1939
+ let n = e * 4;
1940
+ t[n] = 255, t[n + 1] = 255, t[n + 2] = 255, t[n + 3] = 255;
1942
1941
  }
1943
- let n = new t(e, 1, 1, p);
1942
+ let n = new e(t, 1, 1, i);
1944
1943
  return n.needsUpdate = !0, n;
1945
- }, kt = (e) => At(null, e), At = (e, t) => {
1946
- e ||= Nt(), e.name = t.id ? t.id.toString() : "";
1944
+ }, Mt = (e) => Nt(null, e), Nt = (e, t) => {
1945
+ e ||= It(), e.name = t.id ? t.id.toString() : "";
1947
1946
  let n = t.shading.version === "2" || t.shading.version?.startsWith("2.");
1948
- return e = n ? Mt(e, t) : jt(e, t), e.userData.materialVersion = n ? 2 : 1, e.map || (Y ||= Ot(), e.map = Y), e;
1949
- }, jt = (e, t) => {
1950
- t.shading.metallic !== void 0 && (e.metalness = t.shading.metallic === 1 ? 1 : .5, e.reflectivity = _(t.shading.metallic, .5));
1947
+ return e = n ? Ft(e, t) : Pt(e, t), e.userData.materialVersion = n ? 2 : 1, e.map || (Y ||= jt(), e.map = Y), e;
1948
+ }, Pt = (e, t) => {
1949
+ t.shading.metallic !== void 0 && (e.metalness = t.shading.metallic === 1 ? 1 : .5, e.reflectivity = v(t.shading.metallic, .5));
1951
1950
  let n = !1;
1952
- return t.shading.transmission && t.shading.transmission > 0 ? (e.opacity = 1 - t.shading.transmission, e.transparent = !0, e.depthWrite = !1, e.metalness = 0, n = !0) : t.shading.alpha !== void 0 && t.shading.alpha < 1 && (e.transparent = t.shading.alpha < 1, e.opacity = t.shading.alpha, e.depthWrite = t.shading.alpha >= 1, e.metalness = .5 * Math.max(0, t.shading.alpha), n = !0), e.aoMapIntensity = _(t.shading.occlusion, 1), e.roughness = _(t.shading.roughness, .5), e.alphaTest = _(t.shading.alphaCutoff, 0), X(e.color, t.shading.basecolor), n || t.shading.doubleSided ? e.side = 2 : e.side = 0, e;
1953
- }, Mt = (e, t) => {
1951
+ return t.shading.transmission && t.shading.transmission > 0 ? (e.opacity = 1 - t.shading.transmission, e.transparent = !0, e.depthWrite = !1, e.metalness = 0, n = !0) : t.shading.alpha !== void 0 && t.shading.alpha < 1 && (e.transparent = t.shading.alpha < 1, e.opacity = t.shading.alpha, e.depthWrite = t.shading.alpha >= 1, e.metalness = .5 * Math.max(0, t.shading.alpha), n = !0), e.aoMapIntensity = v(t.shading.occlusion, 1), e.roughness = v(t.shading.roughness, .5), e.alphaTest = v(t.shading.alphaCutoff, 0), X(e.color, t.shading.basecolor), n || t.shading.doubleSided ? e.side = 2 : e.side = 0, e;
1952
+ }, Ft = (e, t) => {
1954
1953
  let n = !1;
1955
1954
  return t.shading.alpha !== void 0 && t.shading.alpha < 1 ? (e.transparent = !0, e.opacity = t.shading.alpha, e.depthWrite = !1, n = !0) : (e.transparent = !1, e.opacity = 1, e.depthWrite = !0), e.alphaTest = t.shading.alphaCutoff ?? 0, X(e.color, t.shading.basecolor), e.transmission = t.shading.transmission ?? 0, e.ior = Math.max(1, Math.min(2.33, t.shading.transmissionIOR ?? 1.5)), e.metalness = t.shading.metallic ?? 0, X(e.specularColor, t.shading.specularColor), e.specularIntensity = t.shading.specularity ?? 1, e.roughness = t.shading.roughness ?? 0, e.aoMapIntensity = t.shading.occlusion ?? 1, X(e.emissive, t.shading.emissiveColor), e.emissiveIntensity = t.shading.emissiveIntensity ?? 1, e.clearcoat = t.shading.clearcoatIntensity ?? 0, e.clearcoatRoughness = t.shading.clearcoatRoughness ?? 0, e.clearcoatNormalScale.setScalar(t.shading.clearcoatNormalScale ?? 1), X(e.sheenColor, t.shading.sheenColor), e.sheen = t.shading.sheenIntensity ?? 1, e.sheenRoughness = t.shading.sheenRoughness ?? 1, e.thickness = t.shading.thicknessFactor ?? 0, X(e.attenuationColor, t.shading.attenuationColor), t.shading.attenuationDistance && (e.attenuationDistance = t.shading.attenuationDistance), e.side = n || t.shading.doubleSided ? 2 : 0, e;
1956
- }, Nt = () => ut.createMeshPhysicalMaterial({}), Pt = (e, t = 1) => t === 2 ? It(e) : Ft(e), Ft = (e) => {
1955
+ }, It = () => dt.createMeshPhysicalMaterial({}), Lt = (e, t = 1) => t === 2 ? zt(e) : Rt(e), Rt = (e) => {
1957
1956
  let t = {
1958
1957
  alpha: e.opacity,
1959
1958
  metallic: e.reflectivity,
@@ -1964,7 +1963,7 @@ var mt = .4, ht = "#DDDDDD", gt = .4, _t = "#7B7B7B", vt = "#B1B1B1", yt = .8, b
1964
1963
  transmission: e.transmission
1965
1964
  };
1966
1965
  return e.metalness === 1 ? t.metallic = 1 : t.metallic = e.reflectivity, t;
1967
- }, It = (e) => ({
1966
+ }, zt = (e) => ({
1968
1967
  version: "2.0.0",
1969
1968
  alpha: e.opacity,
1970
1969
  alphaCutoff: e.alphaTest,
@@ -1988,10 +1987,10 @@ var mt = .4, ht = "#DDDDDD", gt = .4, _t = "#7B7B7B", vt = "#B1B1B1", yt = .8, b
1988
1987
  thicknessFactor: e.thickness,
1989
1988
  attenuationColor: Z(e.attenuationColor),
1990
1989
  attenuationDistance: e.attenuationDistance
1991
- }), X = (e, t) => {
1992
- if (t !== void 0) {
1993
- let n = new l(t.r, t.g, t.b);
1994
- e.copy(n.convertSRGBToLinear());
1990
+ }), X = (e, n) => {
1991
+ if (n !== void 0) {
1992
+ let r = new t(n.r, n.g, n.b);
1993
+ e.copy(r.convertSRGBToLinear());
1995
1994
  }
1996
1995
  }, Z = (e) => {
1997
1996
  let t = e.clone().convertLinearToSRGB();
@@ -2000,8 +1999,8 @@ var mt = .4, ht = "#DDDDDD", gt = .4, _t = "#7B7B7B", vt = "#B1B1B1", yt = .8, b
2000
1999
  g: t.g,
2001
2000
  b: t.b
2002
2001
  };
2003
- }, Q = null, Lt = (e, t, n, r, i, a, o = 16) => {
2004
- Q || (Q = new h(), Q.crossOrigin = "");
2002
+ }, Q = null, Bt = (e, t, n, r, i, a, o = 16) => {
2003
+ Q || (Q = new u(), Q.crossOrigin = "");
2005
2004
  let s = Q;
2006
2005
  return new Promise((c, l) => {
2007
2006
  if (!e) {
@@ -2009,26 +2008,26 @@ var mt = .4, ht = "#DDDDDD", gt = .4, _t = "#7B7B7B", vt = "#B1B1B1", yt = .8, b
2009
2008
  return;
2010
2009
  }
2011
2010
  s.load(e, (e) => {
2012
- Rt(e, t, n, r, i, a, o), c();
2011
+ Vt(e, t, n, r, i, a, o), c();
2013
2012
  }, l);
2014
2013
  });
2015
- }, Rt = (t, n, r, i, a, o, s = 16) => {
2016
- if (t.anisotropy = i, t.wrapS = e, t.wrapT = e, s <= 8 && [
2017
- g.ORM,
2018
- g.EMRGB,
2019
- g.CCRG,
2020
- g.CCXYZ,
2021
- g.SHRGBA,
2022
- g.SPRGBA,
2023
- g.TTRG
2014
+ }, Vt = (e, n, r, i, a, o, s = 16) => {
2015
+ if (e.anisotropy = i, e.wrapS = l, e.wrapT = l, s <= 8 && [
2016
+ _.ORM,
2017
+ _.EMRGB,
2018
+ _.CCRG,
2019
+ _.CCXYZ,
2020
+ _.SHRGBA,
2021
+ _.SPRGBA,
2022
+ _.TTRG
2024
2023
  ].includes(n.mapping)) {
2025
2024
  console.warn("ORM maps are not supported on devices with only " + s + " texture units");
2026
2025
  return;
2027
2026
  }
2028
- t.repeat.set(a, o), zt(t, n, r), n.mapping === g.RGBA && (r.transparent = !0, r.userData.materialVersion === 1 && r.name.includes("glow") && (r.emissiveIntensity = .5, r.emissive = new l(16777215), r.emissiveMap = r.map)), r.needsUpdate = !0;
2029
- }, zt = (e, t, n) => {
2030
- t.mapping === g.XYZ ? (n.normalMap = e, n.map === Ot() && (n.map = null)) : t.mapping === g.ORM ? (n.aoMap = e, n.roughnessMap = e, n.metalnessMap = e) : t.mapping === g.EMRGB ? n.emissiveMap = e : t.mapping === g.CCRG ? (n.clearcoatMap = e, n.clearcoatRoughnessMap = e) : t.mapping === g.CCXYZ ? n.clearcoatNormalMap = e : t.mapping === g.SHRGBA ? (n.sheenColorMap = e, n.sheenRoughnessMap = e) : t.mapping === g.SPRGBA ? (n.specularColorMap = e, n.specularIntensityMap = e) : t.mapping === g.TTRG ? (n.transmissionMap = e, n.thicknessMap = e) : (e.colorSpace = m, n.map = e);
2031
- }, Bt = (e = !0) => (window.__RML_GUI__ || (window.__RML_GUI__ = new lt({ autoPlace: e })), window.__RML_GUI__), Vt = (e, t) => {
2027
+ e.repeat.set(a, o), Ht(e, n, r), n.mapping === _.RGBA && (r.transparent = !0, r.userData.materialVersion === 1 && r.name.includes("glow") && (r.emissiveIntensity = .5, r.emissive = new t(16777215), r.emissiveMap = r.map)), r.needsUpdate = !0;
2028
+ }, Ht = (e, t, n) => {
2029
+ t.mapping === _.XYZ ? (n.normalMap = e, n.map === jt() && (n.map = null)) : t.mapping === _.ORM ? (n.aoMap = e, n.roughnessMap = e, n.metalnessMap = e) : t.mapping === _.EMRGB ? n.emissiveMap = e : t.mapping === _.CCRG ? (n.clearcoatMap = e, n.clearcoatRoughnessMap = e) : t.mapping === _.CCXYZ ? n.clearcoatNormalMap = e : t.mapping === _.SHRGBA ? (n.sheenColorMap = e, n.sheenRoughnessMap = e) : t.mapping === _.SPRGBA ? (n.specularColorMap = e, n.specularIntensityMap = e) : t.mapping === _.TTRG ? (n.transmissionMap = e, n.thicknessMap = e) : (e.colorSpace = h, n.map = e);
2030
+ }, Ut = (e = !0) => (window.__RML_GUI__ || (window.__RML_GUI__ = new ut({ autoPlace: e })), window.__RML_GUI__), Wt = (e, t) => {
2032
2031
  let n = !1;
2033
2032
  for (let r of t) {
2034
2033
  let t = r.getKernelObject(), i;
@@ -2041,7 +2040,7 @@ var mt = .4, ht = "#DDDDDD", gt = .4, _t = "#7B7B7B", vt = "#B1B1B1", yt = .8, b
2041
2040
  a !== r.getContainer().visible && (n = !0), a ? r.setContainerVisibility(!0) : r.isSelected || r.setContainerVisibility(!1);
2042
2041
  }
2043
2042
  return n;
2044
- }, Ht = (e, t, n = !0) => {
2043
+ }, Gt = (e, t, n = !0) => {
2045
2044
  if (!e.userData.tween) if (t) if (e.transparent = !0, !n) e.opacity = .2;
2046
2045
  else {
2047
2046
  let t = { opacity: 1 };
@@ -2064,56 +2063,56 @@ var mt = .4, ht = "#DDDDDD", gt = .4, _t = "#7B7B7B", vt = "#B1B1B1", yt = .8, b
2064
2063
  }).start();
2065
2064
  window.TWEEN?.add(n);
2066
2065
  }
2067
- }, Ut = (e, t, n, r, i, a) => {
2068
- let o = Wt(n, r), s = i.clone().multiply(r).multiply(t), c = o.clone().invert(), l = c.clone().multiply(n), u = c.clone().multiply(r), d = { t: 0 }, f = new q(d).to({ t: 1 }, 400).easing(W.Quadratic.InOut).onUpdate(() => {
2069
- let n = qt(l, u, d.t);
2070
- Kt(e, i.clone().multiply(o).multiply(n).multiply(t)), a && a();
2066
+ }, Kt = (e, t, n, r, i, a) => {
2067
+ let o = qt(n, r), s = i.clone().multiply(r).multiply(t), c = o.clone().invert(), l = c.clone().multiply(n), u = c.clone().multiply(r), d = { t: 0 }, f = new q(d).to({ t: 1 }, 400).easing(W.Quadratic.InOut).onUpdate(() => {
2068
+ let n = Xt(l, u, d.t);
2069
+ Yt(e, i.clone().multiply(o).multiply(n).multiply(t)), a && a();
2071
2070
  }).onComplete(() => {
2072
- Kt(e, s), a && a(), window.TWEEN?.remove(f);
2071
+ Yt(e, s), a && a(), window.TWEEN?.remove(f);
2073
2072
  }).onStop(() => {
2074
2073
  window.TWEEN?.remove(f);
2075
2074
  }).start();
2076
2075
  return window.TWEEN?.add(f), f;
2077
- }, Wt = (e, t) => {
2078
- let n = e.clone().invert().clone().multiply(t), r = new s(), i = new f();
2079
- n.decompose(r, i, new s());
2080
- let o = Gt(i), c = o.axis;
2081
- if (r.length() < .001 || Math.abs(o.angleRad) < .001 || c.length() < .001) return new a().identity();
2082
- let l = new s().setFromMatrixPosition(e), u = new s().setFromMatrixPosition(t), d = l.clone().sub(u), p = d.length(), m = new s().crossVectors(c, d).normalize();
2083
- d = new s().crossVectors(m, c).normalize();
2084
- let h = l.clone().add(u).multiplyScalar(.5);
2085
- return h = h.sub(m.clone().multiplyScalar(p * .5 / Math.tan(o.angleRad * .5))), new a().makeBasis(m, c, d).setPosition(h);
2086
- }, Gt = (e) => {
2076
+ }, qt = (e, t) => {
2077
+ let r = e.clone().invert().clone().multiply(t), i = new m(), a = new n();
2078
+ r.decompose(i, a, new m());
2079
+ let o = Jt(a), s = o.axis;
2080
+ if (i.length() < .001 || Math.abs(o.angleRad) < .001 || s.length() < .001) return new d().identity();
2081
+ let c = new m().setFromMatrixPosition(e), l = new m().setFromMatrixPosition(t), u = c.clone().sub(l), f = u.length(), p = new m().crossVectors(s, u).normalize();
2082
+ u = new m().crossVectors(p, s).normalize();
2083
+ let h = c.clone().add(l).multiplyScalar(.5);
2084
+ return h = h.sub(p.clone().multiplyScalar(f * .5 / Math.tan(o.angleRad * .5))), new d().makeBasis(p, s, u).setPosition(h);
2085
+ }, Jt = (e) => {
2087
2086
  let t = Math.sqrt(1 - e.w * e.w);
2088
2087
  return {
2089
- axis: new s(e.x, e.y, e.z).multiplyScalar(t === 0 ? 1 : 1 / t),
2088
+ axis: new m(e.x, e.y, e.z).multiplyScalar(t === 0 ? 1 : 1 / t),
2090
2089
  angleRad: 2 * Math.acos(e.w)
2091
2090
  };
2092
- }, Kt = (e, t) => {
2091
+ }, Yt = (e, t) => {
2093
2092
  e.updateMatrix(), t.multiply(e.matrix.clone().invert()), e.applyMatrix4(t), e.updateMatrix();
2094
- }, qt = (e, t, n) => {
2095
- let r = new s(), i = new f(), o = new s();
2096
- e.decompose(r, i, o);
2097
- let c = new s(), l = new f(), u = new s();
2098
- t.decompose(c, l, u);
2099
- let d = new s().lerpVectors(r, c, n), p = new f().slerpQuaternions(i, l, n), m = Gt(i.clone().conjugate().multiply(l));
2100
- if (m.angleRad > Math.PI && (m.angleRad -= 2 * Math.PI), Math.abs(m.angleRad) > te(1) && r.length() > .001 && c.length() > .001) {
2101
- let e = r.clone().normalize().dot(c.clone().normalize());
2093
+ }, Xt = (e, t, r) => {
2094
+ let i = new m(), a = new n(), o = new m();
2095
+ e.decompose(i, a, o);
2096
+ let s = new m(), c = new n(), l = new m();
2097
+ t.decompose(s, c, l);
2098
+ let u = new m().lerpVectors(i, s, r), f = new n().slerpQuaternions(a, c, r), p = Jt(a.clone().conjugate().multiply(c));
2099
+ if (p.angleRad > Math.PI && (p.angleRad -= 2 * Math.PI), Math.abs(p.angleRad) > te(1) && i.length() > .001 && s.length() > .001) {
2100
+ let e = i.clone().normalize().dot(s.clone().normalize());
2102
2101
  if (Math.abs(e) < .999) {
2103
- let t = new s().crossVectors(r, c), i = new f().setFromAxisAngle(t.normalize(), Math.acos(e) * n), a = r.length() * n + c.length() * (1 - n);
2104
- d = r.applyQuaternion(i).normalize().multiplyScalar(a);
2102
+ let t = new m().crossVectors(i, s), a = new n().setFromAxisAngle(t.normalize(), Math.acos(e) * r), o = i.length() * r + s.length() * (1 - r);
2103
+ u = i.applyQuaternion(a).normalize().multiplyScalar(o);
2105
2104
  }
2106
2105
  }
2107
- let h = new s().lerpVectors(o, u, n), g = new a();
2108
- return g.compose(d, p, h), g;
2109
- }, Jt = (e) => {
2110
- let t = new l();
2111
- return t.setRGB((e >> 16) / 255, (e >> 8 & 255) / 255, (e >> 0 & 255) / 255), t;
2112
- }, Yt = (e, t) => {
2106
+ let h = new m().lerpVectors(o, l, r), g = new d();
2107
+ return g.compose(u, f, h), g;
2108
+ }, Zt = (e) => {
2109
+ let n = new t();
2110
+ return n.setRGB((e >> 16) / 255, (e >> 8 & 255) / 255, (e >> 0 & 255) / 255), n;
2111
+ }, Qt = (e, t) => {
2113
2112
  t.transparent || (e.transparent = t.transparent, delete e.userData.postProcessingMaterialPlugin), e.opacity = t.opacity, e.needsUpdate = !0;
2114
- }, Xt = (e, t) => new Promise((n) => {
2113
+ }, $t = (e, t) => new Promise((n) => {
2115
2114
  e.traverse((e) => {
2116
- if (e instanceof o) {
2115
+ if (e instanceof f) {
2117
2116
  let r = e.material;
2118
2117
  e.userData.tween && e.userData.tween.stop();
2119
2118
  let i = { opacity: r.opacity };
@@ -2122,15 +2121,15 @@ var mt = .4, ht = "#DDDDDD", gt = .4, _t = "#7B7B7B", vt = "#B1B1B1", yt = .8, b
2122
2121
  a.toJSON = () => void 0, e.userData.tween = a, window.TWEEN?.add(a.to(t, 250).easing(W.Linear.None).onUpdate(() => {
2123
2122
  r.opacity = i.opacity;
2124
2123
  }).onStop(() => {
2125
- Yt(r, t), e.userData.tween = void 0;
2124
+ Qt(r, t), e.userData.tween = void 0;
2126
2125
  }).onComplete(() => {
2127
- Yt(r, t), e.userData.tween = void 0, window.TWEEN?.remove(a), n();
2126
+ Qt(r, t), e.userData.tween = void 0, window.TWEEN?.remove(a), n();
2128
2127
  }).start());
2129
2128
  }
2130
2129
  });
2131
- }), Zt = (e) => {
2130
+ }), en = (e) => {
2132
2131
  e.traverse((e) => {
2133
- if (e instanceof o) {
2132
+ if (e instanceof f) {
2134
2133
  let t = e.material;
2135
2134
  if (t.opacity === 0) return;
2136
2135
  let n = {
@@ -2149,85 +2148,85 @@ var mt = .4, ht = "#DDDDDD", gt = .4, _t = "#7B7B7B", vt = "#B1B1B1", yt = .8, b
2149
2148
  window.TWEEN?.add(i);
2150
2149
  }
2151
2150
  });
2152
- }, Qt = (e, t) => {
2153
- let n = new d().setFromObject(e), r = n.getSize(new s()), i = Math.min(r.x, r.y, r.z), a = !0;
2151
+ }, tn = (e, t) => {
2152
+ let n = new o().setFromObject(e), r = n.getSize(new m()), i = Math.min(r.x, r.y, r.z), a = !0;
2154
2153
  return i > 5 && (console.warn("GLB seems to be too big (" + i + ")", t), a = !1), n.min.y < -.01 && (console.warn("GLB seems to be under the floor (" + n.min.y + "): ", t), a = !1), a;
2155
- }, $t = (e) => {
2156
- e.type === "Mesh" ? tn(e) : en(e);
2157
- }, en = (e) => {
2154
+ }, nn = (e) => {
2155
+ e.type === "Mesh" ? an(e) : rn(e);
2156
+ }, rn = (e) => {
2158
2157
  !e || !e.children || e.children.length === 0 || e.children.forEach((e) => {
2159
- tn(e);
2158
+ an(e);
2160
2159
  });
2161
- }, tn = (e) => {
2162
- e && (e.material && rn(e.material), e.geometry && nn(e.geometry), e.children && e.children.length > 0 && en(e));
2163
- }, nn = (e) => {
2160
+ }, an = (e) => {
2161
+ e && (e.material && sn(e.material), e.geometry && on(e.geometry), e.children && e.children.length > 0 && rn(e));
2162
+ }, on = (e) => {
2164
2163
  e && e.dispose();
2165
- }, rn = (e) => {
2164
+ }, sn = (e) => {
2166
2165
  e && (e.map && e.map.dispose(), e.normalMap && e.normalMap.dispose(), e.dispose());
2167
- }, $, an = () => ($ || ($ = new n(), $.visible = !1), $), on, sn = (e) => (on ||= ut.createMeshStandardMaterial({
2166
+ }, $, cn = () => ($ || ($ = new a(), $.visible = !1), $), ln, un = (e) => (ln ||= dt.createMeshStandardMaterial({
2168
2167
  color: e || "#FF0000",
2169
2168
  transparent: !0,
2170
2169
  opacity: .5,
2171
2170
  visible: !0,
2172
2171
  polygonOffset: !0,
2173
2172
  polygonOffsetFactor: -1
2174
- }), on), cn = (e) => e.x === 0 && e.y === 0 && e.z === 0, ln = (e, t) => {
2173
+ }), ln), dn = (e) => e.x === 0 && e.y === 0 && e.z === 0, fn = (e, t) => {
2175
2174
  let n = "";
2176
2175
  return !e && e !== "" ? null : (e.materialId && e.materialId !== "" ? n = e.materialId : e.catalogItemId && e.catalogItemId !== "" ? n = e.catalogItemId : e.rgbValue > 0 ? n = "rgb" + JSON.stringify(e.rgbValue) : e.length > 0 ? n = e : t && t.value === ce.WALL ? n = "default_wall_material_" + e.getSourceType().value : t && t.value === ce.CEILING && (n = "default_ceiling_material_" + e.getSourceType().value), n);
2177
- }, un = (e) => {
2178
- let t = e.getWorldDirection(new s()).clone();
2179
- t.y = 0, t.lengthSq() < .01 && (t = new s(0, 1, 0), t.applyQuaternion(e.quaternion), t.y = 0), t.normalize();
2176
+ }, pn = (e) => {
2177
+ let t = e.getWorldDirection(new m()).clone();
2178
+ t.y = 0, t.lengthSq() < .01 && (t = new m(0, 1, 0), t.applyQuaternion(e.quaternion), t.y = 0), t.normalize();
2180
2179
  let n = Math.asin(t.x);
2181
2180
  return t.z < 0 && (n = Math.PI - n), n < 0 && (n += Math.PI * 2), n;
2182
- }, dn = (e, t) => {
2181
+ }, mn = (e, t) => {
2183
2182
  if (!e || !t) return 0;
2184
2183
  let n = e.clone().expandByScalar(.001).containsBox(t), r = t.clone().expandByScalar(.001).containsBox(e);
2185
2184
  return r && n || !r && !n ? 0 : n === !0 ? 1 : -1;
2186
- }, fn = (e, t) => {
2185
+ }, hn = (e, t) => {
2187
2186
  if (!e || !t) return 0;
2188
2187
  let n = e.clone().expandByScalar(.001).containsBox(t), r = t.clone().expandByScalar(.001).containsBox(e);
2189
2188
  if (r && n) return 0;
2190
2189
  if (!r && !n) {
2191
- let n = pn(e, t);
2190
+ let n = gn(e, t);
2192
2191
  return n === .5 ? 0 : n > .5 ? -1 : 1;
2193
2192
  }
2194
2193
  return n === !0 ? 1 : -1;
2195
- }, pn = (e, t) => {
2196
- let n = new d();
2194
+ }, gn = (e, t) => {
2195
+ let n = new o();
2197
2196
  if (n.copy(e).intersect(t), n.isEmpty()) return 0;
2198
2197
  let r = (e) => {
2199
- let t = new s();
2198
+ let t = new m();
2200
2199
  return e.getSize(t), t.x * t.y * t.z;
2201
2200
  }, i = r(e), a = r(n);
2202
2201
  return i === 0 ? 0 : a / i;
2203
- }, mn = (e) => e[0] === 1 && e[1] === 0 && e[2] === 0 && e[3] === 1 && e[4] === 0 && e[5] === 0, hn = (e, t, n, r = 1) => {
2204
- let i = t > n, a = i ? 15 : 0, o = i ? 0 : 10, c = e.getSize(new s()), l = e.getCenter(new s()), u = c.x > 2 * a ? c.x / 2 : a, f = c.z > 2 * o ? c.z / 2 : o;
2205
- return u *= r, f *= r, new d(new s(l.x - u, l.y, l.z - f), new s(l.x + u, l.y, l.z + f));
2206
- }, gn = (e) => {
2202
+ }, _n = (e) => e[0] === 1 && e[1] === 0 && e[2] === 0 && e[3] === 1 && e[4] === 0 && e[5] === 0, vn = (e, t, n, r = 1) => {
2203
+ let i = t > n, a = i ? 15 : 0, s = i ? 0 : 10, c = e.getSize(new m()), l = e.getCenter(new m()), u = c.x > 2 * a ? c.x / 2 : a, d = c.z > 2 * s ? c.z / 2 : s;
2204
+ return u *= r, d *= r, new o(new m(l.x - u, l.y, l.z - d), new m(l.x + u, l.y, l.z + d));
2205
+ }, yn = (e) => {
2207
2206
  let { x: t, y: n } = e;
2208
2207
  return {
2209
2208
  x: t,
2210
2209
  y: n
2211
2210
  };
2212
- }, _n = (e) => {
2211
+ }, bn = (e) => {
2213
2212
  let { x: t, y: n, z: r } = e;
2214
2213
  return {
2215
2214
  x: t,
2216
2215
  y: n,
2217
2216
  z: r
2218
2217
  };
2219
- }, vn = (e, t, n) => new s().setFromSphericalCoords(e, Math.PI * (1 - n), Math.PI * 2 * (1 - t)), yn = (e) => {
2220
- let t = new u();
2218
+ }, xn = (e, t, n) => new m().setFromSphericalCoords(e, Math.PI * (1 - n), Math.PI * 2 * (1 - t)), Sn = (e) => {
2219
+ let t = new r();
2221
2220
  return e.environment && (t.environment = e.environment.clone()), e.userData.environmentDefinition && (t.userData.environmentDefinition = e.userData.environmentDefinition.clone()), t.userData.shadowFromEnvironment = e.userData.shadowFromEnvironment, t;
2222
- }, bn = (e, t) => {
2223
- let n = new i(), r = new a().multiplyMatrices(e.projectionMatrix, e.matrixWorldInverse);
2221
+ }, Cn = (e, t) => {
2222
+ let n = new p(), r = new d().multiplyMatrices(e.projectionMatrix, e.matrixWorldInverse);
2224
2223
  n.setFromProjectionMatrix(r);
2225
- let o = t.getCenter(new s());
2226
- return n.containsPoint(o);
2227
- }, xn = (e) => {
2224
+ let i = t.getCenter(new m());
2225
+ return n.containsPoint(i);
2226
+ }, wn = (e) => {
2228
2227
  e.lights_fragment_begin = "\n vec3 geometryPosition = - vViewPosition;\n vec3 geometryNormal = normal;\n vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n vec3 geometryClearcoatNormal = vec3( 0.0 );\n #ifdef USE_CLEARCOAT\n geometryClearcoatNormal = clearcoatNormal;\n #endif\n\n // OPTIMIZATION: Early exit for transparent/invisible materials\n #ifdef USE_ALPHATEST\n if ( diffuseColor.a < alphaTest ) discard;\n #endif\n\n // OPTIMIZATION: Cache expensive calculations\n float NdotV = saturate( dot( geometryNormal, geometryViewDir ) );\n\n #ifdef USE_IRIDESCENCE\n float dotNVi = NdotV; // Reuse calculated value\n if ( material.iridescenceThickness == 0.0 ) {\n material.iridescence = 0.0;\n } else {\n material.iridescence = saturate( material.iridescence );\n }\n // OPTIMIZATION: Skip iridescence calculations if effect is minimal\n if ( material.iridescence > 0.01 ) {\n material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n }\n #endif\n\n IncidentLight directLight;\n\n // OPTIMIZATION: Early exit if material has no metalness or roughness variation\n #ifdef USE_ROUGHNESSMAP\n bool hasRoughnessVariation = true;\n #else\n bool hasRoughnessVariation = false;\n #endif\n\n #ifdef USE_METALNESSMAP\n bool hasMetalnessVariation = true;\n #else\n bool hasMetalnessVariation = false;\n #endif\n\n #if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n PointLight pointLight;\n #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n PointLightShadow pointLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n pointLight = pointLights[ i ];\n getPointLightInfo( pointLight, geometryPosition, directLight );\n\n // OPTIMIZATION: Enhanced visibility and distance checks\n #if defined( RE_Direct )\n if ( directLight.visible ) {\n // OPTIMIZATION: Skip lights with negligible contribution based on color intensity\n float lightIntensity = dot( directLight.color, vec3( 0.299, 0.587, 0.114 ) );\n if ( lightIntensity > 0.001 ) {\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n pointLightShadow = pointLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n }\n #endif\n }\n #pragma unroll_loop_end\n #endif\n\n #if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n SpotLight spotLight;\n vec4 spotColor;\n vec3 spotLightCoord;\n bool inSpotLightMap;\n #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n SpotLightShadow spotLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n spotLight = spotLights[ i ];\n getSpotLightInfo( spotLight, geometryPosition, directLight );\n\n // OPTIMIZATION: Enhanced visibility checks for spot lights\n #if defined( RE_Direct )\n if ( directLight.visible ) {\n // OPTIMIZATION: Skip spot light map calculation if light contribution is minimal\n float lightIntensity = dot( directLight.color, vec3( 0.299, 0.587, 0.114 ) );\n if ( lightIntensity > 0.001 ) {\n #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n #else\n #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n #endif\n #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n if ( inSpotLightMap ) {\n spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n directLight.color = directLight.color * spotColor.rgb;\n }\n #endif\n #undef SPOT_LIGHT_MAP_INDEX\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n spotLightShadow = spotLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n }\n #endif\n }\n #pragma unroll_loop_end\n #endif\n\n #if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n DirectionalLight directionalLight;\n #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n DirectionalLightShadow directionalLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n directionalLight = directionalLights[ i ];\n getDirectionalLightInfo( directionalLight, directLight );\n\n // OPTIMIZATION: Skip very dim directional lights\n #if defined( RE_Direct )\n float lightIntensity = dot( directLight.color, vec3( 0.299, 0.587, 0.114 ) );\n if ( directLight.visible && lightIntensity > 0.001 ) {\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n directionalLightShadow = directionalLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #endif\n }\n #pragma unroll_loop_end\n #endif\n\n #if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n RectAreaLight rectAreaLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n rectAreaLight = rectAreaLights[ i ];\n // OPTIMIZATION: Simple rect area light processing - Three.js handles distance internally\n RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n #endif\n\n // OPTIMIZATION: Streamlined indirect lighting with early exits\n #if defined( RE_IndirectDiffuse )\n vec3 iblIrradiance = vec3( 0.0 );\n vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\n // OPTIMIZATION: Skip light probe calculation if ambient is sufficient\n float ambientIntensity = dot( irradiance, vec3( 0.299, 0.587, 0.114 ) );\n\n #if defined( USE_LIGHT_PROBES )\n if ( ambientIntensity < 0.9 ) {\n irradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n }\n #endif\n\n #if ( NUM_HEMI_LIGHTS > 0 )\n if ( ambientIntensity < 0.9 ) {\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n vec3 hemiContribution = getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n // OPTIMIZATION: Skip negligible hemisphere light contributions\n if ( dot( hemiContribution, vec3( 0.299, 0.587, 0.114 ) ) > 0.001 ) {\n irradiance += hemiContribution;\n }\n }\n #pragma unroll_loop_end\n }\n #endif\n #endif\n\n #if defined( RE_IndirectSpecular )\n vec3 radiance = vec3( 0.0 );\n vec3 clearcoatRadiance = vec3( 0.0 );\n #endif", e.lights_pars_begin = e.lights_pars_begin.replace("light.color = pointLight.color;", "\n light.color = pointLight.color * step( lightDistance, pointLight.distance );\n ");
2229
2228
  };
2230
2229
  //#endregion
2231
- export { pe as $, un as A, Et as B, Jt as C, ln as D, Bt as E, Ct as F, _n as G, Kt as H, wt as I, vn as J, Xt as K, xn as L, bn as M, mn as N, Pt as O, xt as P, ut as Q, Dt as R, fn as S, hn as T, Ht as U, At as V, gn as W, dt as X, W as Y, q as Z, rn as _, vt as a, oe as at, Zt as b, Rt as c, re as ct, Qt as d, te as dt, fe as et, dn as f, nn as g, $t as h, _t as i, le as it, Vt as j, St as k, Lt as l, se as lt, kt as m, bt as n, ue as nt, mt as o, ae as ot, yn as p, cn as q, gt as r, ce as rt, ht as s, ie as st, yt as t, de as tt, Ut as u, ne as ut, tn as v, sn as w, an as x, en as y, Tt as z };
2230
+ export { q as $, St as A, At as B, Zt as C, fn as D, Ut as E, Cn as F, Gt as G, kt as H, _n as I, $t as J, yn as K, Et as L, Tt as M, pn as N, Lt as O, Wt as P, ft as Q, Dt as R, hn as S, vn as T, Nt as U, Ot as V, Yt as W, xn as X, dn as Y, W as Z, sn as _, yt as a, ce as at, en as b, Vt as c, ae as ct, tn as d, se as dt, dt as et, mn as f, ne as ft, on as g, nn as h, vt as i, ue as it, Ct as j, wt as k, Bt as l, ie as lt, Mt as m, xt as n, fe as nt, ht as o, le as ot, Sn as p, te as pt, bn as q, _t as r, de as rt, gt as s, oe as st, bt as t, pe as tt, Kt as u, re as ut, an as v, un as w, cn as x, rn as y, wn as z };
2232
2231
 
2233
- //# sourceMappingURL=threejs-utils-jEzvlJF1.mjs.map
2232
+ //# sourceMappingURL=threejs-utils-8zlxt158.mjs.map