@figurosity/consumer-three-sixty-tool 0.3.4 → 0.3.7

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.
@@ -1,16 +1,13 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("html,body{-webkit-text-size-adjust:none;touch-action:manipulation}.detector{cursor:default;position:fixed;top:0;left:0;right:0;bottom:0;z-index:8}.detector.moving{cursor:move}.three-sixty-viewer .row .col,.three-sixty-viewer .row div{text-align:center}.loading-bar{position:absolute;bottom:0;z-index:100}.three-sixty-viewer{z-index:2!important}.image-background{position:fixed;bottom:0;top:0;left:0;right:0;z-index:1;overflow:hidden;background-color:#fff;-webkit-transition:background-color .1s linear;-ms-transition:background-color .1s linear;transition:background-color .1s linear}.image-background.negative{background-color:#000}.image-holder{position:absolute;background-color:#fff;filter:none;z-index:3}.image-holder-overlay{position:absolute;z-index:4;top:0;left:0;right:0;bottom:0;background:#fff0;background:linear-gradient(82deg,#fff,#fff 1%,#fff0 8%,#fff0),linear-gradient(287deg,#fff,#fff 1%,#fff0 8%,#fff0)}.image-holder-overlay.negative{position:absolute;z-index:4;top:0;left:0;right:0;bottom:0;background:#0000;background:linear-gradient(82deg,#000,#000 1%,#0000 8%,#0000),linear-gradient(287deg,#000,#000 1%,#0000 8%,#0000)}.pose-image{display:block;width:100%;height:auto}.grid-overlay{position:absolute;top:0;left:0;z-index:5;width:100%;height:100%}.grid-overlay .vertical-center{position:absolute;z-index:20;left:50%;top:0;width:1px;background-color:#9c0000;height:100%}.grid-overlay .horizontal-center{position:absolute;z-index:20;top:50%;left:0;height:1px;background-color:#9c0000;width:100%}.grid-overlay-cell{position:absolute;background-color:#0087ff80}.ts-position-move-holder{overflow:hidden;width:100%;padding-top:150px;height:0;opacity:1;position:relative}.slide-fade-enter-active,.slide-fade-leave-active{transition:all .3s ease}.slide-fade-enter,.slide-fade-leave-to{padding-top:0!important;opacity:0}.locked-overlay{position:absolute;z-index:2;top:0;left:0;bottom:0;right:0}")),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- import { ref as E, computed as m, watch as X, onBeforeMount as Kt, defineComponent as v, h as u, withDirectives as tt, vShow as ht, inject as ee, openBlock as _e, createElementBlock as Rt, normalizeStyle as qt, createVNode as L, unref as ae, resolveComponent as ye, resolveDirective as Zt, createBlock as Ye, withCtx as H, createElementVNode as Ee, createTextVNode as lt, onMounted as Me, nextTick as Gt, onBeforeUnmount as st, useModel as Wt, createCommentVNode as Ht, mergeModels as Xt } from "vue";
3
- import { defineStore as he, getActivePinia as Yt, storeToRefs as b } from "pinia";
4
- import { useQuasar as gt, QBtn as Qt, QSeparator as pe, QLinearProgress as Jt } from "quasar";
5
- import { DEFAULT_SATURATE as es, DEFAULT_CONTRAST as ts, DEFAULT_BRIGHTNESS as ss, getConfig as os, useDynamicImages as ns, LOADED as Fe, LOADING as be, FAILED as ie, UNLOADED as ut, QUEUED as rs, DEFAULT_VISIBLE as as, DEFAULT_VERTICAL as is, DEFAULT_SPACING as cs, DEFAULT_HORIZONTAL as ls, Point as Z, Size as fe, Rect as Qe, DEFAULT as vt, NOTHING as St, BRIGHTNESS as Je, CONTRAST as yt, SATURATE as kt, CAMERA_ANGLE as Y, EFFECTS as Q, GRID as J, RELATED as ce, VIEWS as Ve, TOOLBAR as dt, MOVE as us, ZOOM as ds, SPIN as ms, ADJUSTMENTS as Ie, SKINS as Te, POSITION as Ae, SETTINGS as He, useFilterStyle as ot, useEventBus as ps, useWakeLock as fs } from "@figurosity/toolbox";
6
- import we from "@tweenjs/tween.js";
7
- import "tiny-emitter/instance";
8
- import { useRoute as hs } from "vue-router";
9
- import { CBasicTool as De, CExpansion as ge, CBaseButton as te, CBaseButtons as nt, CNewGridTool as gs, CDraggableDrawer as se, CIconButton as bt, CDraggableDrawers as vs, CGridOverlay as Ss, CToolPage as ys } from "@figurosity/consumer-controls";
10
- import "@figurosity/icons";
11
- import { EventManager as mt } from "mjolnir.js";
12
- import { supportsPassiveEvents as ks } from "detect-it";
13
- const Pe = {
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("html,body{-webkit-text-size-adjust:none;touch-action:manipulation}.detector{cursor:default;position:fixed;top:0;left:0;right:0;bottom:0;z-index:8}.detector.moving{cursor:move}.three-sixty-viewer .row .col,.three-sixty-viewer .row div{text-align:center}.loading-bar{position:absolute;bottom:0;z-index:100}.three-sixty-viewer{z-index:2!important}.image-background{position:fixed;bottom:0;top:0;left:0;right:0;z-index:1;overflow:hidden;background-color:#fff;-webkit-transition:background-color .1s linear;-ms-transition:background-color .1s linear;transition:background-color .1s linear}.image-background.negative{background-color:#000}.image-holder{position:absolute;background-color:#fff;filter:none;z-index:3}.image-holder-overlay{position:absolute;z-index:4;top:0;left:0;right:0;bottom:0;background:#fff0;background:linear-gradient(82deg,#fff,#fff 1%,#fff0 8%,#fff0),linear-gradient(287deg,#fff,#fff 1%,#fff0 8%,#fff0)}.image-holder-overlay.negative{position:absolute;z-index:4;top:0;left:0;right:0;bottom:0;background:#0000;background:linear-gradient(82deg,#000,#000 1%,#0000 8%,#0000),linear-gradient(287deg,#000,#000 1%,#0000 8%,#0000)}.pose-image{display:block;width:100%;height:auto}.grid-overlay{position:absolute;top:0;left:0;z-index:5;width:100%;height:100%}.grid-overlay .vertical-center{position:absolute;z-index:20;left:50%;top:0;width:1px;background-color:#9c0000;height:100%}.grid-overlay .horizontal-center{position:absolute;z-index:20;top:50%;left:0;height:1px;background-color:#9c0000;width:100%}.grid-overlay-cell{position:absolute;background-color:#0087ff80}.ts-position-move-holder{overflow:hidden;width:100%;padding-top:150px;height:0;opacity:1;position:relative}.slide-fade-enter-active,.slide-fade-leave-active{transition:all .3s ease}.slide-fade-enter,.slide-fade-leave-to{padding-top:0!important;opacity:0}.frozen-overlay{position:absolute;z-index:2;top:0;left:0;bottom:0;right:0}")),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
+ import { ref as A, computed as d, watch as Z, onBeforeMount as $t, defineComponent as g, h as u, withDirectives as ut, vShow as dt, inject as te, openBlock as Ge, createElementBlock as Ot, normalizeStyle as Rt, createVNode as Ce, unref as re, onMounted as ze, nextTick as Kt, onBeforeUnmount as Xe, useModel as Nt, createBlock as ot, withCtx as Le, createCommentVNode as Lt, mergeModels as Zt } from "vue";
3
+ import { useQuasar as mt, QBtn as Gt, QSeparator as ne, QLinearProgress as qt } from "quasar";
4
+ import { defineStore as he, getActivePinia as Wt, storeToRefs as y } from "pinia";
5
+ import { DEFAULT_SATURATE as Ht, DEFAULT_CONTRAST as Xt, DEFAULT_BRIGHTNESS as Yt, getConfig as Qt, useDynamicImages as Jt, LOADED as Ee, LOADING as ye, FAILED as ae, UNLOADED as rt, QUEUED as es, DEFAULT_VISIBLE as ts, DEFAULT_VERTICAL as ss, DEFAULT_SPACING as ns, DEFAULT_HORIZONTAL as os, Point as G, Size as fe, Rect as qe, DEFAULT as pt, NOTHING as ft, BRIGHTNESS as We, CONTRAST as ht, SATURATE as gt, CAMERA_ANGLE as Y, EFFECTS as Q, GRID as J, RELATED as ee, VIEWS as xe, TOOLBAR as at, MOVE as rs, ZOOM as as, SPIN as is, ADJUSTMENTS as be, SKINS as ke, POSITION as cs, useFilterStyle as Ye, useEventBus as ls, useWakeLock as us } from "@figurosity/toolbox";
6
+ import Ie from "@tweenjs/tween.js";
7
+ import { CBasicTool as we, CExpansion as de, CBaseButton as q, CBaseButtons as Qe, CNewGridTool as ds, CDraggableDrawer as W, CDraggableDrawers as ms, CGridOverlay as ps, CToolPage as fs } from "@figurosity/consumer-controls";
8
+ import { EventManager as it } from "mjolnir.js";
9
+ import { supportsPassiveEvents as hs } from "detect-it";
10
+ const ie = 26, De = {
14
11
  model(e) {
15
12
  const t = f();
16
13
  return e.models[t.id];
@@ -20,31 +17,31 @@ const Pe = {
20
17
  return typeof e.models[t.id] < "u";
21
18
  },
22
19
  propertyById(e) {
23
- return (t, o, s = null) => e.models[t] && o in e.models[t] ? e.models[t][o] : s;
20
+ return (t, s, n = null) => e.models[t] && s in e.models[t] ? e.models[t][s] : n;
24
21
  },
25
22
  property() {
26
23
  const e = f();
27
- return (t, o = null) => this.propertyById(e.id, t, o);
24
+ return (t, s = null) => this.propertyById(e.id, t, s);
28
25
  }
29
- }, je = {
30
- setPropertyById(e, t, o) {
26
+ }, Ae = {
27
+ setPropertyById(e, t, s) {
31
28
  this.models[e] || this.initModel(e), this.$patch({
32
29
  models: {
33
30
  [e]: {
34
31
  ...this.models[e],
35
32
  // Spread existing properties
36
- [t]: o
33
+ [t]: s
37
34
  // Update the specific property
38
35
  }
39
36
  }
40
37
  });
41
38
  },
42
39
  setProperty(e, t) {
43
- const o = f(), s = o.id;
44
- o.id && this.$patch({
40
+ const s = f(), n = s.id;
41
+ s.id && this.$patch({
45
42
  models: {
46
- [s]: {
47
- ...this.models[s],
43
+ [n]: {
44
+ ...this.models[n],
48
45
  // Spread existing properties
49
46
  [e]: t
50
47
  // Update the specific property
@@ -52,98 +49,98 @@ const Pe = {
52
49
  }
53
50
  });
54
51
  }
55
- }, Ue = ({
52
+ }, Fe = ({
56
53
  storeId: e,
57
54
  defaultValues: t = [],
58
- state: o = {},
59
- getters: s = {},
60
- actions: n = {},
55
+ state: s = {},
56
+ getters: n = {},
57
+ actions: o = {},
61
58
  keyBy: r = "id"
62
59
  }) => he(e, {
63
60
  state: () => ({
64
61
  loading: !1,
65
62
  models: {},
66
- ...o
63
+ ...s
67
64
  }),
68
65
  getters: {
69
- ...Pe,
66
+ ...De,
70
67
  // Override base getters that read s.id directly so they honor keyBy.
71
- model(i) {
72
- const a = f();
73
- return i.models[a[r]];
68
+ model(a) {
69
+ const i = f();
70
+ return a.models[i[r]];
74
71
  },
75
- exists(i) {
76
- const a = f();
77
- return typeof i.models[a[r]] < "u";
72
+ exists(a) {
73
+ const i = f();
74
+ return typeof a.models[i[r]] < "u";
78
75
  },
79
76
  propertyChangedById() {
80
- return (i, a) => this.propertyById(i, a) !== t[a];
77
+ return (a, i) => this.propertyById(a, i) !== t[i];
81
78
  },
82
- propertyChanged(i) {
83
- const a = f();
84
- return (c) => i.models[a[r]] ? this.propertyById(a[r], c) !== t[c] : !1;
79
+ propertyChanged(a) {
80
+ const i = f();
81
+ return (c) => a.models[i[r]] ? this.propertyById(i[r], c) !== t[c] : !1;
85
82
  },
86
83
  property() {
87
- const i = f();
88
- return (a) => this.propertyById(i[r], a, t[a]);
84
+ const a = f();
85
+ return (i) => this.propertyById(a[r], i, t[i]);
89
86
  },
90
- ...s
87
+ ...n
91
88
  },
92
89
  actions: {
93
- ...je,
90
+ ...Ae,
94
91
  // Override base setProperty (which reads s.id) so writes from
95
92
  // useViewerUrlSync land on the keyBy-selected bucket.
96
- setProperty(i, a) {
93
+ setProperty(a, i) {
97
94
  const l = f()[r];
98
95
  l && (this.models[l] || this.initModel(l), this.$patch({
99
96
  models: {
100
97
  [l]: {
101
98
  ...this.models[l],
102
- [i]: a
99
+ [a]: i
103
100
  }
104
101
  }
105
102
  }));
106
103
  },
107
104
  reset() {
108
- const a = f()[r], c = { ...t };
105
+ const i = f()[r], c = { ...t };
109
106
  this.$patch((l) => {
110
- if (!l.models[a]) return console.log("Early return no models " + this.$id);
111
- l.models[a] = {
112
- ...l.models[a],
107
+ if (!l.models[i]) return console.log("Early return no models " + this.$id);
108
+ l.models[i] = {
109
+ ...l.models[i],
113
110
  // Preserve other properties in the model
114
111
  ...c
115
112
  // Apply the default values
116
113
  };
117
114
  });
118
115
  },
119
- resetProperty(i) {
116
+ resetProperty(a) {
120
117
  const c = f()[r];
121
118
  this.$patch({
122
119
  models: {
123
120
  [c]: {
124
121
  ...this.models[c],
125
122
  // Spread existing properties
126
- [i]: t[i]
123
+ [a]: t[a]
127
124
  // Update the specific property
128
125
  }
129
126
  }
130
127
  });
131
128
  },
132
- initModel(i) {
133
- typeof this.models[i] < "u" || this.$patch((a) => {
134
- a.models[i] = {
129
+ initModel(a) {
130
+ typeof this.models[a] < "u" || this.$patch((i) => {
131
+ i.models[a] = {
135
132
  ...t
136
133
  // Spread default values into the new model
137
134
  };
138
135
  });
139
136
  },
140
- ...n
137
+ ...o
141
138
  }
142
- }), It = {
143
- brightness: ss,
144
- contrast: ts,
145
- saturate: es
146
- }, bs = {
139
+ }), vt = {
140
+ brightness: Yt,
141
+ contrast: Xt,
142
+ saturate: Ht
143
+ }, gs = {
147
144
  changed(e) {
148
145
  return this.propertyChanged("brightness") || this.propertyChanged("contrast") || this.propertyChanged("saturate");
149
146
  },
@@ -156,21 +153,21 @@ const Pe = {
156
153
  saturate() {
157
154
  return this.property("saturate");
158
155
  }
159
- }, $ = Ue({
156
+ }, U = Fe({
160
157
  storeId: "360-adjustments",
161
- defaultValues: Object.assign({}, It),
162
- getters: bs,
158
+ defaultValues: Object.assign({}, vt),
159
+ getters: gs,
163
160
  keyBy: "basePoseId"
164
161
  });
165
- function Is(e, t) {
166
- let o = Ts(t, e);
167
- return o < 0 && (o = e + o), isNaN(Math.floor(o)) ? 0 : Math.floor(o);
162
+ function vs(e, t) {
163
+ let s = Ss(t, e);
164
+ return s < 0 && (s = e + s), isNaN(Math.floor(s)) ? 0 : Math.floor(s);
168
165
  }
169
- function Ts(e, t) {
166
+ function Ss(e, t) {
170
167
  return Math[e > 0 ? "floor" : "ceil"](e % t);
171
168
  }
172
- let re = null, q = null;
173
- const ws = {
169
+ let oe = null, L = null;
170
+ const ys = {
174
171
  animating: !1,
175
172
  condisabledtrast: !1,
176
173
  disabledTimeout: null,
@@ -179,7 +176,7 @@ const ws = {
179
176
  renderCount: 36,
180
177
  index: 1,
181
178
  frame: 1
182
- }, Cs = {}, Ds = {
179
+ }, bs = {}, ks = {
183
180
  changed() {
184
181
  const e = this.model;
185
182
  return e && e.frame !== e.index;
@@ -191,25 +188,25 @@ const ws = {
191
188
  const e = this.model;
192
189
  return e ? e.frame : 0;
193
190
  }
194
- }, Ps = {
195
- initModel({ id: e, index: t = 0, renderCount: o = 36 }) {
191
+ }, Is = {
192
+ initModel({ id: e, index: t = 0, renderCount: s = 36 }) {
196
193
  typeof this.models[e] < "u" || (this.models[e] = {
197
194
  index: t,
198
- renderCount: o,
195
+ renderCount: s,
199
196
  animating: !1,
200
197
  condisabledtrast: !1,
201
198
  disabledTimeout: null,
202
199
  start: t,
203
- max: o - 1,
200
+ max: s - 1,
204
201
  frame: t
205
202
  });
206
203
  },
207
204
  reset() {
208
205
  const e = this.model;
209
206
  if (!e) return;
210
- const t = e.index, o = e.frame;
211
- if (!(t === void 0 || o === void 0 || t === o)) {
212
- if (Math.abs(t - o) > 1) {
207
+ const t = e.index, s = e.frame;
208
+ if (!(t === void 0 || s === void 0 || t === s)) {
209
+ if (Math.abs(t - s) > 1) {
213
210
  this.spinToFrame({ value: t });
214
211
  return;
215
212
  }
@@ -220,57 +217,57 @@ const ws = {
220
217
  * Stop the spin
221
218
  */
222
219
  stopSpin() {
223
- q && q.stop();
220
+ L && L.stop();
224
221
  },
225
222
  setFrame(e, t) {
226
- const o = f();
227
- t = t || o.id;
228
- const n = { ...t ? this.models[t] : this.model };
229
- re && window.cancelAnimationFrame(re), q && (q.stop(), q = null);
230
- const r = n.max;
231
- e > r && (e = 0), e < 0 && (e = r), n.animating = !1, n.frame = e, o.pulseKinetic(), this.$patch({
223
+ const s = f();
224
+ t = t || s.id;
225
+ const o = { ...t ? this.models[t] : this.model };
226
+ oe && window.cancelAnimationFrame(oe), L && (L.stop(), L = null);
227
+ const r = o.max;
228
+ e > r && (e = 0), e < 0 && (e = r), o.animating = !1, o.frame = e, s.pulseKinetic(), this.$patch({
232
229
  models: {
233
230
  [t]: {
234
231
  ...this.models[t],
235
232
  // Spread existing properties
236
- ...n
233
+ ...o
237
234
  // Update the specific property
238
235
  }
239
236
  }
240
237
  });
241
238
  },
242
239
  spinToFrame({ value: e, duration: t = 450 }) {
243
- const s = f().id, n = this.property("renderCount"), r = this.property("frame");
240
+ const n = f().id, o = this.property("renderCount"), r = this.property("frame");
244
241
  e = parseInt(e);
245
- const i = this;
242
+ const a = this;
246
243
  if (e === r)
247
244
  return;
248
- this.setProperty("start", r), re && window.cancelAnimationFrame(re), q && (q.stop(), q = null);
249
- function a(c) {
250
- re = window.requestAnimationFrame(a), we.update(c);
245
+ this.setProperty("start", r), oe && window.cancelAnimationFrame(oe), L && (L.stop(), L = null);
246
+ function i(c) {
247
+ oe = window.requestAnimationFrame(i), Ie.update(c);
251
248
  }
252
- this.setPropertyById(s, "animating", !0), q = new we.Tween({ value: r }).easing(we.Easing.Quartic.Out).to({ value: e }, t).onUpdate(function(c) {
249
+ this.setPropertyById(n, "animating", !0), L = new Ie.Tween({ value: r }).easing(Ie.Easing.Quartic.Out).to({ value: e }, t).onUpdate(function(c) {
253
250
  let l = parseInt(c.value.toFixed(0));
254
- const d = Is(n, l);
255
- d !== r && (i.setPropertyById(s, "frame", d), f().pulseKinetic());
251
+ const m = vs(o, l);
252
+ m !== r && (a.setPropertyById(n, "frame", m), f().pulseKinetic());
256
253
  }).onComplete(function() {
257
- window.cancelAnimationFrame(re), re = null, i.setPropertyById(s, "animationFrame", null), i.setPropertyById(s, "animating", !1);
258
- }).start(), a();
254
+ window.cancelAnimationFrame(oe), oe = null, a.setPropertyById(n, "animationFrame", null), a.setPropertyById(n, "animating", !1);
255
+ }).start(), i();
259
256
  }
260
- }, ve = Ue({
257
+ }, ge = Fe({
261
258
  storeId: "360-spin",
262
- defaultValues: Object.assign({}, ws),
263
- state: Cs,
264
- getters: Ds,
265
- actions: Ps
259
+ defaultValues: Object.assign({}, ys),
260
+ state: bs,
261
+ getters: ks,
262
+ actions: Is
266
263
  });
267
- function Be() {
268
- const { freeServer: e, paidServer: t } = os();
269
- return ns({ freeServer: e, paidServer: t });
264
+ function Pe() {
265
+ const { freeServer: e, paidServer: t } = Qt();
266
+ return Jt({ freeServer: e, paidServer: t });
270
267
  }
271
- function Tt(e, t) {
272
- for (const o in t)
273
- t[o] && typeof t[o] == "object" && !Array.isArray(t[o]) ? (e[o] || (e[o] = {}), Tt(e[o], t[o])) : e[o] = t[o];
268
+ function St(e, t) {
269
+ for (const s in t)
270
+ t[s] && typeof t[s] == "object" && !Array.isArray(t[s]) ? (e[s] || (e[s] = {}), St(e[s], t[s])) : e[s] = t[s];
274
271
  }
275
272
  const M = he("360-skins", {
276
273
  state: () => ({
@@ -280,14 +277,14 @@ const M = he("360-skins", {
280
277
  censoredSkinIds: []
281
278
  }),
282
279
  getters: {
283
- ...Pe,
280
+ ...De,
284
281
  accessKeyById(e) {
285
282
  return (t) => e.accessKeys[t];
286
283
  },
287
284
  accessibleSkinIdsById(e) {
288
285
  return (t) => {
289
- const o = this.propertyById(t, "skinIds", []), s = this.blockedSkinIds || [];
290
- return o.filter((n) => s.indexOf(parseInt(n)) === -1);
286
+ const s = this.propertyById(t, "skinIds", []), n = this.blockedSkinIds || [];
287
+ return s.filter((o) => n.indexOf(parseInt(o)) === -1);
291
288
  };
292
289
  },
293
290
  inaccessibleSkinIds(e) {
@@ -298,11 +295,11 @@ const M = he("360-skins", {
298
295
  return [.../* @__PURE__ */ new Set([...e.censoredSkinIds, ...this.inaccessibleSkinIds])];
299
296
  },
300
297
  accessibleSkinsById(e) {
301
- return (t) => this.accessibleSkinIdsById(t).map((o) => e.models[t][o]);
298
+ return (t) => this.accessibleSkinIdsById(t).map((s) => e.models[t][s]);
302
299
  },
303
300
  accessibleSkins(e) {
304
- const o = f().id;
305
- return this.accessibleSkinIdsById(o).map((s) => e.models[o][s]);
301
+ const s = f().id;
302
+ return this.accessibleSkinIdsById(s).map((n) => e.models[s][n]);
306
303
  },
307
304
  changed(e) {
308
305
  return this.skinId !== 1;
@@ -312,24 +309,24 @@ const M = he("360-skins", {
312
309
  return ((t = this.appSkinsStore) == null ? void 0 : t.slugs) || {};
313
310
  },
314
311
  currentSkin(e) {
315
- const t = f(), o = e.models[t.id];
316
- if (this.skinId && o && o[this.skinId])
317
- return o[this.skinId];
312
+ const t = f(), s = e.models[t.id];
313
+ if (this.skinId && s && s[this.skinId])
314
+ return s[this.skinId];
318
315
  },
319
316
  currentSkinById(e) {
320
317
  return (t) => {
321
- const o = e.models[t], s = this.accessibleSkinIdsById(t), n = s && s.length > 0 ? s[0] : void 0;
322
- if (n && o && o[n])
323
- return o[n];
318
+ const s = e.models[t], n = this.accessibleSkinIdsById(t), o = n && n.length > 0 ? n[0] : void 0;
319
+ if (o && s && s[o])
320
+ return s[o];
324
321
  };
325
322
  },
326
323
  skins(e) {
327
- const o = f().id;
328
- return e.models[o] ? e.models[o].skinIds.map((s) => Object.assign({}, e.models[o][s])).sort((s, n) => s.order > n.order ? 1 : -1) : [];
324
+ const s = f().id;
325
+ return e.models[s] ? e.models[s].skinIds.map((n) => Object.assign({}, e.models[s][n])).sort((n, o) => n.order > o.order ? 1 : -1) : [];
329
326
  },
330
327
  skin(e) {
331
- const o = f().id, s = e.models[o];
332
- return s ? s[s.skinId] : null;
328
+ const s = f().id, n = e.models[s];
329
+ return n ? n[n.skinId] : null;
333
330
  },
334
331
  /**
335
332
  * @deprecated
@@ -346,8 +343,8 @@ const M = he("360-skins", {
346
343
  return this.skinId;
347
344
  },
348
345
  skinId(e) {
349
- const o = f().id, s = e.models[o];
350
- return s ? s.skinId : 1;
346
+ const s = f().id, n = e.models[s];
347
+ return n ? n.skinId : 1;
351
348
  },
352
349
  selected(e) {
353
350
  return this.skinId !== 1;
@@ -358,13 +355,13 @@ const M = he("360-skins", {
358
355
  // TODO rewire for new data structure
359
356
  percentage(e) {
360
357
  const t = this.getCurrentImageSet();
361
- let o = (t == null ? void 0 : t.percent) || 0;
362
- return Math.floor(o);
358
+ let s = (t == null ? void 0 : t.percent) || 0;
359
+ return Math.floor(s);
363
360
  },
364
361
  propertyByIdAndSkinId(e) {
365
- return (t, o, s) => {
366
- const n = e.models[t];
367
- return n && n[o] && n[o][s] ? n[o][s] : null;
362
+ return (t, s, n) => {
363
+ const o = e.models[t];
364
+ return o && o[s] && o[s][n] ? o[s][n] : null;
368
365
  };
369
366
  },
370
367
  slugsById(e) {
@@ -372,57 +369,57 @@ const M = he("360-skins", {
372
369
  }
373
370
  },
374
371
  actions: {
375
- ...je,
376
- initModel({ id: e, skinId: t, accessKeys: o, censoredSkinIds: s = [], renderCount: n, skins: r, skinIds: i, uuid: a }) {
377
- const c = ue(), { getPoseLarge: l, getPoseSmall: d } = Be();
378
- this.censoredSkinIds = s, this.accessKeys = o;
372
+ ...Ae,
373
+ initModel({ id: e, skinId: t, accessKeys: s, censoredSkinIds: n = [], renderCount: o, skins: r, skinIds: a, uuid: i }) {
374
+ const c = le(), { getPoseLarge: l, getPoseSmall: m } = Pe();
375
+ this.censoredSkinIds = n, this.accessKeys = s;
379
376
  const h = this.appColorsStore;
380
377
  j();
381
- const g = (h == null ? void 0 : h.backgroundColor) || "ffffff", k = (h == null ? void 0 : h.color) || "000000", I = {
378
+ const k = (h == null ? void 0 : h.backgroundColor) || "ffffff", I = (h == null ? void 0 : h.color) || "000000", D = {
382
379
  [e]: {
383
380
  id: e,
384
381
  skinId: t,
385
- skinIds: i
382
+ skinIds: a
386
383
  }
387
384
  }, w = {};
388
- Object.keys(r).forEach((S) => {
389
- S = parseInt(S);
390
- const T = r[S], _ = {
385
+ Object.keys(r).forEach((v) => {
386
+ v = parseInt(v);
387
+ const b = r[v], F = {
391
388
  poseId: e,
392
- id: S,
393
- skinId: S,
394
- uuid: a,
395
- name: T.name,
396
- slug: T.slug,
397
- order: T.order,
389
+ id: v,
390
+ skinId: v,
391
+ uuid: i,
392
+ name: b.name,
393
+ slug: b.slug,
394
+ order: b.order,
398
395
  effects: {}
399
396
  };
400
- Object.keys(Ce).forEach((z) => {
401
- z = parseInt(z);
402
- const O = Ce[z], A = [], G = [], N = z === 3 ? k : g;
403
- for (let x = 0; x < n; x++) {
404
- const D = {
405
- uuid: a,
406
- skin: T.slug,
407
- effect: O.slug,
408
- color: N,
409
- index: x
410
- }, W = d(D), V = l(D);
411
- A.push(W), G.push(V);
397
+ Object.keys(Te).forEach((E) => {
398
+ E = parseInt(E);
399
+ const $ = Te[E], x = [], H = [], R = E === 3 ? I : k;
400
+ for (let z = 0; z < o; z++) {
401
+ const B = {
402
+ uuid: i,
403
+ skin: b.slug,
404
+ effect: $.slug,
405
+ color: R,
406
+ index: z
407
+ }, X = m(B), V = l(B);
408
+ x.push(X), H.push(V);
412
409
  const K = {
413
- skinId: S,
410
+ skinId: v,
414
411
  failCount: 0,
415
- effectId: parseInt(O.id),
416
- backgroundColor: N,
412
+ effectId: parseInt($.id),
413
+ backgroundColor: R,
417
414
  poseId: e,
418
- skin: T.slug,
419
- status: ut
415
+ skin: b.slug,
416
+ status: rt
420
417
  };
421
- w[W] = { ...K, url: W }, w[V] = { ...K, url: V };
418
+ w[X] = { ...K, url: X }, w[V] = { ...K, url: V };
422
419
  }
423
- _.effects[z] = {
424
- [N]: {
425
- status: ut,
420
+ F.effects[E] = {
421
+ [R]: {
422
+ status: rt,
426
423
  active: !1,
427
424
  percent: 0,
428
425
  loadedCount: 0,
@@ -430,61 +427,61 @@ const M = he("360-skins", {
430
427
  started: !1,
431
428
  complete: !1,
432
429
  images: {
433
- large: G,
434
- small: A
430
+ large: H,
431
+ small: x
435
432
  },
436
433
  previewLoaded: !1
437
434
  }
438
435
  };
439
- }), I[e][S] = _;
440
- }), this.$patch((S) => {
441
- Tt(S.models, I);
436
+ }), D[e][v] = F;
437
+ }), this.$patch((v) => {
438
+ St(v.models, D);
442
439
  }), c.initModels(w);
443
440
  },
444
441
  /**
445
442
  * Retrieves a set of large and small images for each skin, effect & color combination
446
443
  * @param {*} param0
447
444
  */
448
- getImageSet({ id: e, skinId: t, effectId: o, color: s }) {
449
- var n, r, i, a, c;
450
- return (c = (a = (i = (r = (n = this.models) == null ? void 0 : n[e]) == null ? void 0 : r[t]) == null ? void 0 : i.effects) == null ? void 0 : a[o]) == null ? void 0 : c[s];
445
+ getImageSet({ id: e, skinId: t, effectId: s, color: n }) {
446
+ var o, r, a, i, c;
447
+ return (c = (i = (a = (r = (o = this.models) == null ? void 0 : o[e]) == null ? void 0 : r[t]) == null ? void 0 : a.effects) == null ? void 0 : i[s]) == null ? void 0 : c[n];
451
448
  },
452
449
  getCurrentImageSet() {
453
- const t = f().id, o = this.skinId, s = j(), n = s.id, r = s.id === 3 ? this.appColorsStore.color : this.appColorsStore.backgroundColor;
454
- return this.getImageSet({ id: t, skinId: o, effectId: n, color: r });
450
+ const t = f().id, s = this.skinId, n = j(), o = n.id, r = n.id === 3 ? this.appColorsStore.color : this.appColorsStore.backgroundColor;
451
+ return this.getImageSet({ id: t, skinId: s, effectId: o, color: r });
455
452
  },
456
453
  reset() {
457
454
  this.setProperty("skinId", 1);
458
455
  },
459
456
  // TODO Replace setPropertyByIdAndSkinId with setPropertyByImageSet
460
- setStatus({ id: e, skinId: t, effectId: o, color: s }, n) {
461
- this.setPropertyByImageSet({ id: e, skinId: t, effectId: o, color: s }, "status", n);
457
+ setStatus({ id: e, skinId: t, effectId: s, color: n }, o) {
458
+ this.setPropertyByImageSet({ id: e, skinId: t, effectId: s, color: n }, "status", o);
462
459
  },
463
- setPropertyByIdAndSkinId(e, t, o, s) {
464
- this.$patch((n) => {
465
- !n.models[e] || !n.models[e][t] || (n.models[e] = {
466
- ...n.models[e],
460
+ setPropertyByIdAndSkinId(e, t, s, n) {
461
+ this.$patch((o) => {
462
+ !o.models[e] || !o.models[e][t] || (o.models[e] = {
463
+ ...o.models[e],
467
464
  [t]: {
468
- ...n.models[e][t],
469
- [o]: s
465
+ ...o.models[e][t],
466
+ [s]: n
470
467
  }
471
468
  });
472
469
  });
473
470
  },
474
- setPropertyByImageSet({ id: e, skinId: t, effectId: o, color: s }, n, r) {
475
- const i = this.getImageSet({ id: e, skinId: t, effectId: o, color: s });
476
- this.$patch((a) => {
477
- i && (a.models[e] = {
478
- ...a.models[e],
471
+ setPropertyByImageSet({ id: e, skinId: t, effectId: s, color: n }, o, r) {
472
+ const a = this.getImageSet({ id: e, skinId: t, effectId: s, color: n });
473
+ this.$patch((i) => {
474
+ a && (i.models[e] = {
475
+ ...i.models[e],
479
476
  [t]: {
480
- ...a.models[e][t],
477
+ ...i.models[e][t],
481
478
  effects: {
482
- ...a.models[e][t].effects,
483
- [o]: {
484
- ...a.models[e][t].effects[o],
485
- [s]: {
486
- ...a.models[e][t].effects[o][s],
487
- [n]: r
479
+ ...i.models[e][t].effects,
480
+ [s]: {
481
+ ...i.models[e][t].effects[s],
482
+ [n]: {
483
+ ...i.models[e][t].effects[s][n],
484
+ [o]: r
488
485
  }
489
486
  }
490
487
  }
@@ -492,78 +489,78 @@ const M = he("360-skins", {
492
489
  });
493
490
  });
494
491
  },
495
- getPropertyByImageSet({ id: e, skinId: t, effectId: o, color: s }, n) {
496
- const r = this.getImageSet({ id: e, skinId: t, effectId: o, color: s });
492
+ getPropertyByImageSet({ id: e, skinId: t, effectId: s, color: n }, o) {
493
+ const r = this.getImageSet({ id: e, skinId: t, effectId: s, color: n });
497
494
  if (r)
498
- return r[n];
495
+ return r[o];
499
496
  },
500
- setPropertyBySkinId(e, t, o) {
501
- const s = this.model;
502
- this.$patch((n) => {
503
- !n.models[s.id] || !n.models[s.id][e] || (n.models[s.id] = {
504
- ...n.models[s.id],
497
+ setPropertyBySkinId(e, t, s) {
498
+ const n = this.model;
499
+ this.$patch((o) => {
500
+ !o.models[n.id] || !o.models[n.id][e] || (o.models[n.id] = {
501
+ ...o.models[n.id],
505
502
  [e]: {
506
- ...n.models[s.id][e],
507
- [t]: o
503
+ ...o.models[n.id][e],
504
+ [t]: s
508
505
  }
509
506
  });
510
507
  });
511
508
  },
512
- updatePercentComplete({ id: e, skinId: t, effectId: o, color: s }) {
513
- const n = ue(), r = this.getImageSet({ id: e, skinId: t, effectId: o, color: s });
509
+ updatePercentComplete({ id: e, skinId: t, effectId: s, color: n }) {
510
+ const o = le(), r = this.getImageSet({ id: e, skinId: t, effectId: s, color: n });
514
511
  if (!r) return;
515
- const i = r.images.small;
516
- let a = 0, c = 0, l = 0;
517
- const d = i.length;
518
- i.forEach((I) => {
519
- switch (n.models[I].status) {
520
- case ie:
521
- a++;
512
+ const a = r.images.small;
513
+ let i = 0, c = 0, l = 0;
514
+ const m = a.length;
515
+ a.forEach((D) => {
516
+ switch (o.models[D].status) {
517
+ case ae:
518
+ i++;
522
519
  break;
523
- case Fe:
520
+ case Ee:
524
521
  c++;
525
522
  break;
526
- case be:
523
+ case ye:
527
524
  l++;
528
525
  break;
529
526
  }
530
527
  });
531
- const h = { id: e, skinId: t, effectId: o, color: s };
532
- if (d === 0)
528
+ const h = { id: e, skinId: t, effectId: s, color: n };
529
+ if (m === 0)
533
530
  return this.setPropertyByImageSet(h, "percent", 0), 0;
534
- const g = l * 0.25 + (c + a), k = Math.floor(g / d * 100);
535
- return this.setPropertyByImageSet(h, "percent", k), this.setPropertyByImageSet(h, "status", Fe), this.setPropertyByImageSet(h, "failedCount", a), this.setPropertyByImageSet(h, "loadedCount", c), k;
531
+ const k = l * 0.25 + (c + i), I = Math.floor(k / m * 100);
532
+ return this.setPropertyByImageSet(h, "percent", I), this.setPropertyByImageSet(h, "status", Ee), this.setPropertyByImageSet(h, "failedCount", i), this.setPropertyByImageSet(h, "loadedCount", c), I;
536
533
  },
537
534
  setSelectedBySlug(e, t) {
538
- var i, a;
539
- const o = f();
540
- if (t = t || o.id, !this.models[t]) return;
541
- const s = this.models[t].skinIds;
542
- (!((i = this.appSkinsStore) == null ? void 0 : i.hasAccess(e)) || !((a = this.slugs) != null && a[e])) && (e = "normal");
535
+ var a, i;
536
+ const s = f();
537
+ if (t = t || s.id, !this.models[t]) return;
538
+ const n = this.models[t].skinIds;
539
+ (!((a = this.appSkinsStore) == null ? void 0 : a.hasAccess(e)) || !((i = this.slugs) != null && i[e])) && (e = "normal");
543
540
  let r = this.slugs[e] ?? 1;
544
- r = parseInt(r), r = s.includes(r) ? r : 1, this.models[t].skinId = parseInt(r);
541
+ r = parseInt(r), r = n.includes(r) ? r : 1, this.models[t].skinId = parseInt(r);
545
542
  }
546
543
  }
547
- }), pt = (e, t = "sm") => {
548
- var i, a;
549
- const o = ve(), n = M().getCurrentImageSet(), r = o.property("frame");
550
- if (((a = (i = n == null ? void 0 : n.images) == null ? void 0 : i.small) == null ? void 0 : a.length) > 0) {
551
- const c = t === "sm" ? n.images.small[r] : n.images.large[r];
544
+ }), ct = (e, t = "sm") => {
545
+ var a, i;
546
+ const s = ge(), o = M().getCurrentImageSet(), r = s.property("frame");
547
+ if (((i = (a = o == null ? void 0 : o.images) == null ? void 0 : a.small) == null ? void 0 : i.length) > 0) {
548
+ const c = t === "sm" ? o.images.small[r] : o.images.large[r];
552
549
  return e.models[c];
553
550
  }
554
551
  return null;
555
- }, ue = he("360-images", {
552
+ }, le = he("360-images", {
556
553
  state: () => ({
557
554
  models: {}
558
555
  }),
559
556
  getters: {
560
557
  image(e) {
561
- return pt(e);
558
+ return ct(e);
562
559
  },
563
560
  largeImage(e) {
564
- return pt(e, "lg");
561
+ return ct(e, "lg");
565
562
  },
566
- ...Pe
563
+ ...De
567
564
  },
568
565
  actions: {
569
566
  initModels(e) {
@@ -575,17 +572,17 @@ const M = he("360-skins", {
575
572
  * @param { Function } success On load callback
576
573
  */
577
574
  loadImage(e, t = void 0) {
578
- if (this.models[e].status === be) return;
579
- if (typeof Image > "u") return this.setStatus(e, ie);
580
- this.setStatus(e, rs);
581
- const n = new Image(), r = this;
582
- n.onabort = function(i) {
583
- r.setStatus(this.src, ie), this.onerror = this.onabort = this.onload = null;
584
- }, n.onerror = function(i) {
585
- r.setStatus(this.src, ie), this.onerror = this.onabort = this.onload = null;
586
- }, n.onload = function(i) {
587
- r.setStatus(this.src, Fe), t && typeof t == "function" && t(this.src);
588
- }, n.src = e, this.setStatus(e, be);
575
+ if (this.models[e].status === ye) return;
576
+ if (typeof Image > "u") return this.setStatus(e, ae);
577
+ this.setStatus(e, es);
578
+ const o = new Image(), r = this;
579
+ o.onabort = function(a) {
580
+ r.setStatus(this.src, ae), this.onerror = this.onabort = this.onload = null;
581
+ }, o.onerror = function(a) {
582
+ r.setStatus(this.src, ae), this.onerror = this.onabort = this.onload = null;
583
+ }, o.onload = function(a) {
584
+ r.setStatus(this.src, Ee), t && typeof t == "function" && t(this.src);
585
+ }, o.src = e, this.setStatus(e, ye);
589
586
  },
590
587
  /**
591
588
  * Loads the images for the pose
@@ -598,12 +595,12 @@ const M = he("360-skins", {
598
595
  * Load all of the images for all of the skins/views
599
596
  */
600
597
  loadPreview() {
601
- var c, l, d;
602
- const e = ve(), t = M(), o = j();
598
+ var c, l, m;
599
+ const e = ge(), t = M(), s = j();
603
600
  this.appColorsStore;
604
- const s = f(), n = t.currentSkin, r = e.indexById(s.id), i = o.id === 3 ? "000000" : "ffffff", a = (d = (l = (c = n == null ? void 0 : n.effects) == null ? void 0 : c[o.id]) == null ? void 0 : l[i]) == null ? void 0 : d.images.small;
605
- if ((a == null ? void 0 : a.length) > 0 && r >= 0) {
606
- const h = a[r];
601
+ const n = f(), o = t.currentSkin, r = e.indexById(n.id), a = s.id === 3 ? "000000" : "ffffff", i = (m = (l = (c = o == null ? void 0 : o.effects) == null ? void 0 : c[s.id]) == null ? void 0 : l[a]) == null ? void 0 : m.images.small;
602
+ if ((i == null ? void 0 : i.length) > 0 && r >= 0) {
603
+ const h = i[r];
607
604
  this.loadImage(h, this.loadSkin);
608
605
  return;
609
606
  }
@@ -618,12 +615,12 @@ const M = he("360-skins", {
618
615
  * @param url
619
616
  */
620
617
  loadViewCallback(e) {
621
- const t = M(), o = this.models[e], s = o.skinId, n = o.poseId, r = o.effectId, i = o.backgroundColor;
618
+ const t = M(), s = this.models[e], n = s.skinId, o = s.poseId, r = s.effectId, a = s.backgroundColor;
622
619
  t.updatePercentComplete({
623
- id: n,
624
- skinId: s,
620
+ id: o,
621
+ skinId: n,
625
622
  effectId: r,
626
- color: i
623
+ color: a
627
624
  });
628
625
  },
629
626
  /**
@@ -632,28 +629,28 @@ const M = he("360-skins", {
632
629
  * @returns
633
630
  */
634
631
  loadSkin() {
635
- var s;
632
+ var n;
636
633
  const t = M().getCurrentImageSet();
637
634
  if (!t || t.percent === 100) return;
638
- const o = (s = t == null ? void 0 : t.images) == null ? void 0 : s.small;
639
- o && o.forEach((n) => {
640
- this.models[n], t.status = be, setTimeout(() => {
641
- this.loadImage(n, this.loadViewCallback);
635
+ const s = (n = t == null ? void 0 : t.images) == null ? void 0 : n.small;
636
+ s && s.forEach((o) => {
637
+ this.models[o], t.status = ye, setTimeout(() => {
638
+ this.loadImage(o, this.loadViewCallback);
642
639
  }, 15);
643
640
  });
644
641
  },
645
642
  setStatus(e, t) {
646
- const o = this.models[e];
647
- if (!o) return;
648
- if (t === ie) {
649
- this.updateFailCount(e), o.status = t;
643
+ const s = this.models[e];
644
+ if (!s) return;
645
+ if (t === ae) {
646
+ this.updateFailCount(e), s.status = t;
650
647
  return;
651
648
  }
652
- o.status = t, M().updatePercentComplete({
653
- skinId: o.skinId,
654
- effectId: o.effectId,
655
- color: o.backgroundColor,
656
- id: o.poseId
649
+ s.status = t, M().updatePercentComplete({
650
+ skinId: s.skinId,
651
+ effectId: s.effectId,
652
+ color: s.backgroundColor,
653
+ id: s.poseId
657
654
  });
658
655
  },
659
656
  /**
@@ -666,8 +663,8 @@ const M = he("360-skins", {
666
663
  * @param id
667
664
  */
668
665
  updateFailCount(e) {
669
- this.$patch((n) => {
670
- const r = n.models[e];
666
+ this.$patch((o) => {
667
+ const r = o.models[e];
671
668
  r && (r.failCount = (r.failCount ?? 0) + 1);
672
669
  });
673
670
  const t = this.models[e];
@@ -678,16 +675,16 @@ const M = he("360-skins", {
678
675
  }, 250);
679
676
  return;
680
677
  }
681
- const o = M(), s = {
678
+ const s = M(), n = {
682
679
  skinId: t.skinId,
683
680
  effectId: t.effectId,
684
681
  color: t.backgroundColor,
685
682
  id: t.poseId
686
683
  };
687
- t.status = ie, o.setStatus(s, ie);
684
+ t.status = ae, s.setStatus(n, ae);
688
685
  }
689
686
  }
690
- }), Ce = {
687
+ }), Te = {
691
688
  1: {
692
689
  id: 1,
693
690
  name: "None",
@@ -709,14 +706,14 @@ const M = he("360-skins", {
709
706
  models: {}
710
707
  }),
711
708
  getters: {
712
- ...Pe,
709
+ ...De,
713
710
  effects(e) {
714
- return Object.keys(Ce).map((t) => Ce[t]);
711
+ return Object.keys(Te).map((t) => Te[t]);
715
712
  },
716
713
  current(e) {
717
714
  const t = f();
718
715
  if (t.id !== 0)
719
- return Ce[e.models[t.id].effectId];
716
+ return Te[e.models[t.id].effectId];
720
717
  },
721
718
  name(e) {
722
719
  var t;
@@ -727,9 +724,9 @@ const M = he("360-skins", {
727
724
  return ((t = this.current) == null ? void 0 : t.slug) || "none";
728
725
  },
729
726
  id(e) {
730
- var o, s;
727
+ var s, n;
731
728
  const t = f();
732
- return ((s = (o = this.models) == null ? void 0 : o[t.id]) == null ? void 0 : s.effectId) || 1;
729
+ return ((n = (s = this.models) == null ? void 0 : s[t.id]) == null ? void 0 : n.effectId) || 1;
733
730
  },
734
731
  selected() {
735
732
  return this.id !== 1;
@@ -739,18 +736,18 @@ const M = he("360-skins", {
739
736
  }
740
737
  },
741
738
  actions: {
742
- ...je,
739
+ ...Ae,
743
740
  initModel(e) {
744
741
  this.models[e] = {
745
742
  effectId: 1
746
743
  };
747
744
  },
748
745
  setEffectId(e, t) {
749
- const o = f();
750
- t = t || o.id, this.$patch((s) => {
751
- if (!s.models[t]) return console.log("No effect");
752
- s.models[t] = {
753
- ...s.models[t],
746
+ const s = f();
747
+ t = t || s.id, this.$patch((n) => {
748
+ if (!n.models[t]) return console.log("No effect");
749
+ n.models[t] = {
750
+ ...n.models[t],
754
751
  effectId: e
755
752
  };
756
753
  });
@@ -759,23 +756,23 @@ const M = he("360-skins", {
759
756
  this.setEffectId(1);
760
757
  },
761
758
  setSelectedBySlug(e, t) {
762
- const o = f();
763
- t = t || o.id;
764
- const s = this.effects.find((r) => r.slug === e), n = s ? s.id : 1;
759
+ const s = f();
760
+ t = t || s.id;
761
+ const n = this.effects.find((r) => r.slug === e), o = n ? n.id : 1;
765
762
  this.$patch((r) => {
766
763
  r.models[t] && (r.models[t] = {
767
764
  ...r.models[t],
768
- effectId: n
765
+ effectId: o
769
766
  });
770
767
  });
771
768
  }
772
769
  }
773
- }), wt = {
774
- horizontal: ls,
775
- spacing: cs,
776
- vertical: is,
777
- visible: as
778
- }, Bs = {
770
+ }), yt = {
771
+ horizontal: os,
772
+ spacing: ns,
773
+ vertical: ss,
774
+ visible: ts
775
+ }, Ts = {
779
776
  changed() {
780
777
  return this.propertyChanged("visible") || !1;
781
778
  },
@@ -791,18 +788,18 @@ const M = he("360-skins", {
791
788
  visible() {
792
789
  return this.property("visible");
793
790
  }
794
- }, de = Ue({
791
+ }, ue = Fe({
795
792
  storeId: "360-grid",
796
- defaultValues: wt,
797
- getters: Bs,
793
+ defaultValues: yt,
794
+ getters: Ts,
798
795
  keyBy: "basePoseId"
799
- }), oe = he("360-pose", {
796
+ }), se = he("360-pose", {
800
797
  state: () => ({
801
798
  loading: !1,
802
799
  models: {}
803
800
  }),
804
801
  getters: {
805
- ...Pe,
802
+ ...De,
806
803
  skinId() {
807
804
  const e = f();
808
805
  return this.propertyById(e.id, "skinId");
@@ -830,89 +827,89 @@ const M = he("360-skins", {
830
827
  const t = f();
831
828
  console.log("setting flipped from 360", e), this.appFlippedStore && this.appFlippedStore.toggle(t.id, e);
832
829
  },
833
- initModel({ id: e, cameraIds: t, uuid: o, setIds: s, setUuid: n }) {
830
+ initModel({ id: e, cameraIds: t, uuid: s, setIds: n, setUuid: o }) {
834
831
  typeof this.models[e] < "u" || (this.models[e] = {
835
832
  cameraIds: t,
836
833
  previewsLoaded: !1,
837
834
  ready: !1,
838
- setIds: s,
839
- setUuid: n,
840
- uuid: o
835
+ setIds: n,
836
+ setUuid: o,
837
+ uuid: s
841
838
  });
842
839
  },
843
- ...je
840
+ ...Ae
844
841
  }
845
- }), Xe = ({
842
+ }), Ze = ({
846
843
  imageSize: e,
847
844
  imagePoint: t,
848
- maxDimension: o,
849
- origin: s,
850
- scaleByRatio: n,
845
+ maxDimension: s,
846
+ origin: n,
847
+ scaleByRatio: o,
851
848
  size: r,
852
- zoom: i
849
+ zoom: a
853
850
  }) => {
854
- const a = {}, c = o / r.shortDimension(), l = (c - 1) * (i / 100) + 1;
851
+ const i = {}, c = s / r.shortDimension(), l = (c - 1) * (a / 100) + 1;
855
852
  if (l < 1 || l > c) return {};
856
- const d = xs({
853
+ const m = ws({
857
854
  factor: l,
858
855
  size: r,
859
- maxDimension: o
860
- }), h = Ms({
861
- scaleByRatio: n,
856
+ maxDimension: s
857
+ }), h = zs({
858
+ scaleByRatio: o,
862
859
  imageSize: e,
863
- newSize: d,
860
+ newSize: m,
864
861
  imagePoint: t,
865
862
  size: r,
866
- origin: s
863
+ origin: n
867
864
  });
868
- return a.imagePoint = h, a.imageSize = d, a.size = r, a.zoom = i, Object.assign(a, _s({ maxDimension: o, newSize: d, size: r }));
869
- }, xs = ({ factor: e, size: t, maxDimension: o }) => {
870
- let s = t.shortDimension() * e;
871
- return s = s > o ? o : s, new fe(s, s);
872
- }, Es = ({ imagePoint: e, imageSize: t, newSize: o, size: s, origin: n }) => {
873
- const r = (o.width - t.width) / t.width;
874
- let i = new Z(
875
- -(r * n.left) - Math.abs(e.left),
876
- -(r * n.top) - Math.abs(e.top)
865
+ return i.imagePoint = h, i.imageSize = m, i.size = r, i.zoom = a, Object.assign(i, Cs({ maxDimension: s, newSize: m, size: r }));
866
+ }, ws = ({ factor: e, size: t, maxDimension: s }) => {
867
+ let n = t.shortDimension() * e;
868
+ return n = n > s ? s : n, new fe(n, n);
869
+ }, Ds = ({ imagePoint: e, imageSize: t, newSize: s, size: n, origin: o }) => {
870
+ const r = (s.width - t.width) / t.width;
871
+ let a = new G(
872
+ -(r * o.left) - Math.abs(e.left),
873
+ -(r * o.top) - Math.abs(e.top)
877
874
  );
878
- return o.width < s.width && (i.left = -(r * n.left) + Math.abs(e.left)), o.height < s.height && (i.top = -(r * n.top) + Math.abs(e.top)), i;
879
- }, zs = ({ event: e, element: t }) => (e = e.srcEvent ? e.srcEvent : e, Z.getPointFromInteractionEvent(e, t)), As = ({ origin: e, imageSize: t }) => !(e.left > 0 && e.top > 0 && e.left < t.width && e.top < t.height), _s = ({ maxDimension: e, newSize: t, size: o }) => {
880
- const s = t.width <= o.width, n = t.height <= o.height, r = {};
881
- return r.immobileHeight = n, r.immobileWidth = s, r.maximized = Math.round(t.width) >= e, r.minimized = s && n, r.movable = !s || !n, r;
882
- }, et = ({ point: e, size: t, newSize: o }) => {
883
- let s = new Z(t.width - o.width, t.height - o.height);
884
- return o.width >= t.width && (e.left >= 0 && (e.left = 0), e.left < s.left && (e.left = s.left)), o.height >= t.height && (e.top >= 0 && (e.top = 0), e.top < s.top && (e.top = s.top)), o.width < t.width && (e.left = s.left / 2), o.height < t.height && (e.top = s.top / 2), e;
885
- }, Ms = ({
875
+ return s.width < n.width && (a.left = -(r * o.left) + Math.abs(e.left)), s.height < n.height && (a.top = -(r * o.top) + Math.abs(e.top)), a;
876
+ }, Ps = ({ event: e, element: t }) => (e = e.srcEvent ? e.srcEvent : e, G.getPointFromInteractionEvent(e, t)), Bs = ({ origin: e, imageSize: t }) => !(e.left > 0 && e.top > 0 && e.left < t.width && e.top < t.height), Cs = ({ maxDimension: e, newSize: t, size: s }) => {
877
+ const n = t.width <= s.width, o = t.height <= s.height, r = {};
878
+ return r.immobileHeight = o, r.immobileWidth = n, r.maximized = Math.round(t.width) >= e, r.minimized = n && o, r.movable = !n || !o, r;
879
+ }, He = ({ point: e, size: t, newSize: s }) => {
880
+ let n = new G(t.width - s.width, t.height - s.height);
881
+ return s.width >= t.width && (e.left >= 0 && (e.left = 0), e.left < n.left && (e.left = n.left)), s.height >= t.height && (e.top >= 0 && (e.top = 0), e.top < n.top && (e.top = n.top)), s.width < t.width && (e.left = n.left / 2), s.height < t.height && (e.top = n.top / 2), e;
882
+ }, zs = ({
886
883
  scaleByRatio: e = !0,
887
884
  imagePoint: t,
888
- imageSize: o,
889
- newSize: s,
890
- origin: n,
885
+ imageSize: s,
886
+ newSize: n,
887
+ origin: o,
891
888
  size: r
892
889
  }) => {
893
890
  if (e) {
894
- const a = Fs({ imageSize: o, newSize: s, imagePoint: t });
895
- return et({ point: a, newSize: s, size: r });
891
+ const i = Es({ imageSize: s, newSize: n, imagePoint: t });
892
+ return He({ point: i, newSize: n, size: r });
896
893
  }
897
- const i = Es({
894
+ const a = Ds({
898
895
  imagePoint: t,
899
- imageSize: o,
900
- newSize: s,
896
+ imageSize: s,
897
+ newSize: n,
901
898
  size: r,
902
- origin: n
899
+ origin: o
903
900
  });
904
- return et({ point: i, newSize: s, size: r });
905
- }, Fs = ({ imageSize: e, newSize: t, imagePoint: o }) => {
906
- let s = new Z(
901
+ return He({ point: a, newSize: n, size: r });
902
+ }, Es = ({ imageSize: e, newSize: t, imagePoint: s }) => {
903
+ let n = new G(
907
904
  (e.width - t.width) / 2,
908
905
  (e.height - t.height) / 2
909
906
  );
910
- return new Z(o.left + s.left, o.top + s.top);
911
- }, le = {
907
+ return new G(s.left + n.left, s.top + n.top);
908
+ }, ce = {
912
909
  maxDimension: 2048,
913
910
  zoom: 0,
914
- imagePoint: new Z(0, 0),
915
- viewportPoint: new Z(0, 0),
911
+ imagePoint: new G(0, 0),
912
+ viewportPoint: new G(0, 0),
916
913
  size: new fe(0, 0),
917
914
  imageSize: new fe(0, 0),
918
915
  immobileWidth: !1,
@@ -920,7 +917,7 @@ const M = he("360-skins", {
920
917
  maximized: !1,
921
918
  minimized: !1,
922
919
  animating: !1
923
- }, Vs = {}, js = {
920
+ }, xs = {}, As = {
924
921
  changed() {
925
922
  return this.propertyChanged("zoom");
926
923
  },
@@ -945,20 +942,20 @@ const M = he("360-skins", {
945
942
  return this.propertyById(t.id, "zoom") > 0;
946
943
  },
947
944
  imagePoint(e) {
948
- const t = f(), o = e.models[t.id];
949
- return o ? o.imagePoint : le.imagePoint;
945
+ const t = f(), s = e.models[t.id];
946
+ return s ? s.imagePoint : ce.imagePoint;
950
947
  },
951
948
  imageSize(e) {
952
- const t = f(), o = e.models[t.id];
953
- return o ? o.imageSize : le.imageSize;
949
+ const t = f(), s = e.models[t.id];
950
+ return s ? s.imageSize : ce.imageSize;
954
951
  },
955
952
  viewportSize(e) {
956
- const t = f(), o = e.models[t.id];
957
- return o ? o.size : le.size;
953
+ const t = f(), s = e.models[t.id];
954
+ return s ? s.size : ce.size;
958
955
  }
959
956
  };
960
- let ze = null, ke = null;
961
- const Us = {
957
+ let Be = null, Se = null;
958
+ const Fs = {
962
959
  reset() {
963
960
  this.setZoom(0);
964
961
  },
@@ -970,35 +967,35 @@ const Us = {
970
967
  * @param speed
971
968
  */
972
969
  animateToZoom(e, t = 500) {
973
- const o = this.model;
974
- let s = { zoom: o.zoom }, n = { zoom: e };
975
- const r = this, i = (a) => {
976
- if (ze = window.requestAnimationFrame(i), !o.animating) {
977
- window.cancelAnimationFrame(ze);
970
+ const s = this.model;
971
+ let n = { zoom: s.zoom }, o = { zoom: e };
972
+ const r = this, a = (i) => {
973
+ if (Be = window.requestAnimationFrame(a), !s.animating) {
974
+ window.cancelAnimationFrame(Be);
978
975
  return;
979
976
  }
980
- we.update(a);
977
+ Ie.update(i);
981
978
  };
982
- ke && ke.stop && (ke.stop(), ke = null), r.setProperty("animating", !0), ke = new we.Tween(s).to(n, t).delay(0).onUpdate(function(a) {
983
- let c = parseInt(a.zoom);
984
- c !== o.zoom && r.setZoom(c);
985
- }).onComplete(function(a) {
986
- let c = parseInt(a.zoom);
987
- window.cancelAnimationFrame(ze), ze = null, r.setZoom(c), r.setProperty("animating", !1);
988
- }).start(), i();
979
+ Se && Se.stop && (Se.stop(), Se = null), r.setProperty("animating", !0), Se = new Ie.Tween(n).to(o, t).delay(0).onUpdate(function(i) {
980
+ let c = parseInt(i.zoom);
981
+ c !== s.zoom && r.setZoom(c);
982
+ }).onComplete(function(i) {
983
+ let c = parseInt(i.zoom);
984
+ window.cancelAnimationFrame(Be), Be = null, r.setZoom(c), r.setProperty("animating", !1);
985
+ }).start(), a();
989
986
  },
990
987
  /**
991
988
  * Initializes the zoom when a new image is loaded
992
989
  * @param {HTMLElement} data.el The viewport
993
990
  */
994
991
  initZoomFromElement(e) {
995
- const o = f().id, s = {};
996
- Object.keys(le).forEach((c) => {
997
- s[c] = le[c];
992
+ const s = f().id, n = {};
993
+ Object.keys(ce).forEach((c) => {
994
+ n[c] = ce[c];
998
995
  });
999
- const n = Qe.newRectFromElement(e), r = new fe(n.width, n.height), i = (r.width - r.shortDimension()) / 2, a = (r.height - r.shortDimension()) / 2;
1000
- s.id = o, s.imagePoint = new Z(i, a), s.imageSize = new fe(r.shortDimension(), r.shortDimension()), s.size = r, s.zoom = 0, this.$patch((c) => {
1001
- c.models[o] = { ...s };
996
+ const o = qe.newRectFromElement(e), r = new fe(o.width, o.height), a = (r.width - r.shortDimension()) / 2, i = (r.height - r.shortDimension()) / 2;
997
+ n.id = s, n.imagePoint = new G(a, i), n.imageSize = new fe(r.shortDimension(), r.shortDimension()), n.size = r, n.zoom = 0, this.$patch((c) => {
998
+ c.models[s] = { ...n };
1002
999
  });
1003
1000
  },
1004
1001
  /**
@@ -1010,12 +1007,12 @@ const Us = {
1010
1007
  const t = this.model;
1011
1008
  if (!t) return;
1012
1009
  t.id;
1013
- const o = this.property("size"), s = this.property("imageSize"), n = et({
1010
+ const s = this.property("size"), n = this.property("imageSize"), o = He({
1014
1011
  point: e,
1015
- size: o,
1016
- newSize: s
1012
+ size: s,
1013
+ newSize: n
1017
1014
  });
1018
- this.setProperty("imagePoint", n);
1015
+ this.setProperty("imagePoint", o);
1019
1016
  },
1020
1017
  /**
1021
1018
  * Sets the zoom on a percentage scale from minimum zoom = 1
@@ -1023,7 +1020,7 @@ const Us = {
1023
1020
  */
1024
1021
  setZoom(e) {
1025
1022
  if (e < 0 || e > 100 || !this.model) return;
1026
- const t = { ...this.model }, o = Xe({
1023
+ const t = { ...this.model }, s = Ze({
1027
1024
  imagePoint: t.imagePoint,
1028
1025
  imageSize: t.imageSize,
1029
1026
  maxDimension: t.maxDimension,
@@ -1032,32 +1029,32 @@ const Us = {
1032
1029
  size: t.size,
1033
1030
  zoom: e
1034
1031
  });
1035
- this.$patch((s) => {
1036
- s.models[t.id] = { ...t, ...o };
1032
+ this.$patch((n) => {
1033
+ n.models[t.id] = { ...t, ...s };
1037
1034
  });
1038
1035
  },
1039
1036
  /**
1040
1037
  * set the zoom from the wheel event or pinch
1041
1038
  */
1042
- setZoomFromPointer({ event: e, element: t, increment: o }) {
1043
- const s = this.model;
1044
- if (!s) return;
1045
- const n = s.zoom + o;
1046
- if (n < 0 || n > 100) return;
1047
- const r = s.imageSize, i = zs({ event: e, element: t }), a = As({
1048
- origin: i,
1039
+ setZoomFromPointer({ event: e, element: t, increment: s }) {
1040
+ const n = this.model;
1041
+ if (!n) return;
1042
+ const o = n.zoom + s;
1043
+ if (o < 0 || o > 100) return;
1044
+ const r = n.imageSize, a = Ps({ event: e, element: t }), i = Bs({
1045
+ origin: a,
1049
1046
  imageSize: r
1050
- }), c = Xe({
1051
- imagePoint: s.imagePoint,
1047
+ }), c = Ze({
1048
+ imagePoint: n.imagePoint,
1052
1049
  imageSize: r,
1053
- maxDimension: s.maxDimension,
1054
- origin: i,
1055
- scaleByRatio: a,
1056
- size: s.size,
1057
- zoom: n
1050
+ maxDimension: n.maxDimension,
1051
+ origin: a,
1052
+ scaleByRatio: i,
1053
+ size: n.size,
1054
+ zoom: o
1058
1055
  });
1059
1056
  this.$patch((l) => {
1060
- l.models[s.id] = { ...s, ...c };
1057
+ l.models[n.id] = { ...n, ...c };
1061
1058
  });
1062
1059
  },
1063
1060
  /**
@@ -1069,28 +1066,28 @@ const Us = {
1069
1066
  //
1070
1067
  setZoomFromResize(e) {
1071
1068
  if (!this.model) return;
1072
- const t = { ...this.model }, o = new fe(e.width, e.height), s = Xe({
1069
+ const t = { ...this.model }, s = new fe(e.width, e.height), n = Ze({
1073
1070
  imagePoint: t.imagePoint,
1074
1071
  imageSize: t.imageSize,
1075
1072
  maxDimension: t.maxDimension,
1076
1073
  scaleByRatio: !0,
1077
- size: o,
1074
+ size: s,
1078
1075
  zoom: t.zoom
1079
1076
  });
1080
- this.$patch((n) => {
1081
- n.models[t.id] = { ...t, ...s };
1077
+ this.$patch((o) => {
1078
+ o.models[t.id] = { ...t, ...n };
1082
1079
  });
1083
1080
  }
1084
- }, ne = Ue({
1081
+ }, me = Fe({
1085
1082
  storeId: "360-zoom",
1086
- defaultValues: le,
1087
- state: Vs,
1088
- getters: js,
1089
- actions: Us
1090
- }), Ls = {
1091
- ...It,
1092
- ...wt,
1093
- ...le
1083
+ defaultValues: ce,
1084
+ state: xs,
1085
+ getters: As,
1086
+ actions: Fs
1087
+ }), Ms = {
1088
+ ...vt,
1089
+ ...yt,
1090
+ ...ce
1094
1091
  }, f = he("360", {
1095
1092
  state: () => ({
1096
1093
  id: 0,
@@ -1099,12 +1096,10 @@ const Us = {
1099
1096
  // fire on camera change. Set by init360Viewer from the loaded
1100
1097
  // pose entity.
1101
1098
  basePoseId: 0,
1102
- active: vt,
1099
+ active: pt,
1103
1100
  animate: !1,
1104
1101
  width: 0,
1105
1102
  models: {},
1106
- _lockedTimer: null,
1107
- lockedModal: !1,
1108
1103
  isKinetic: !1,
1109
1104
  _kineticTimer: null
1110
1105
  }),
@@ -1112,26 +1107,24 @@ const Us = {
1112
1107
  hydrating() {
1113
1108
  return this.appPosesStore.loading;
1114
1109
  },
1115
- changed(e) {
1116
- const t = $(), o = de();
1117
- return t.changed || o.changed;
1110
+ changed() {
1111
+ const e = U(), t = ue();
1112
+ return e.changed || t.changed;
1118
1113
  },
1119
1114
  isLoaded() {
1120
1115
  return !1;
1121
1116
  },
1122
- isLocked(e) {
1123
- return this.appLockedStore.isLocked(e.id);
1124
- },
1125
- lockedModel(e) {
1126
- return this.appLockedStore.getModel(e.id) || {};
1117
+ isFrozen(e) {
1118
+ var t;
1119
+ return ((t = this.appFreezeStore) == null ? void 0 : t.isFrozen(e.basePoseId)) || !1;
1127
1120
  },
1128
1121
  propertyChangedById() {
1129
- return (e, t) => this.propertyById(e, t) !== Ls[t];
1122
+ return (e, t) => this.propertyById(e, t) !== Ms[t];
1130
1123
  },
1131
1124
  propertyById(e) {
1132
- return (t, o, s = null) => {
1133
- const n = e.models[t];
1134
- return n && o in n ? n[o] : s;
1125
+ return (t, s, n = null) => {
1126
+ const o = e.models[t];
1127
+ return o && s in o ? o[s] : n;
1135
1128
  };
1136
1129
  },
1137
1130
  color() {
@@ -1142,19 +1135,15 @@ const Us = {
1142
1135
  }
1143
1136
  },
1144
1137
  actions: {
1145
- setLockedModal(e = !0, t = 2e3) {
1146
- this.lockedModal = e, this._clearLockedTimer(), e && (this._lockedTimer = setTimeout(() => {
1147
- this.lockedModal = !1, this._clearLockedTimer();
1148
- }, t));
1149
- },
1150
- unlock(e) {
1151
- e = e || this.id, this.appLockedStore.unlock({ poseId: e });
1138
+ pokeFreeze() {
1139
+ var e;
1140
+ (e = this.appFreezeStore) == null || e.poke(this.basePoseId);
1152
1141
  },
1153
1142
  subscribe(e) {
1154
1143
  console.log("[360-store] subscribe called, bus:", e == null ? void 0 : e.__bus_id);
1155
1144
  const t = this;
1156
- e.$on("pose:loaded", (o) => {
1157
- console.log("[360-store] pose:loaded fired"), t.init360Viewer({ response: o });
1145
+ e.$on("pose:loaded", (s) => {
1146
+ console.log("[360-store] pose:loaded fired"), t.init360Viewer({ response: s });
1158
1147
  });
1159
1148
  },
1160
1149
  setActive(e) {
@@ -1172,34 +1161,34 @@ const Us = {
1172
1161
  return e = Array.isArray(e) ? e : [e], e.includes(this.active);
1173
1162
  },
1174
1163
  init360Viewer({ response: e }) {
1175
- const t = e.entities, o = e.result, s = parseInt(o.poses[0]), n = t.poses[s], r = this.appSkinsStore.inaccessibleSkinIds, i = [], a = this.appSkinsStore.accessKeys, c = this.appSkinsStore.models, l = $(), d = j(), h = de(), g = ue(), k = oe(), I = M(), w = ve(), S = ne(), T = (n == null ? void 0 : n.basePoseId) ?? s;
1176
- if (this.basePoseId = T, l.initModel(T), d.initModel(s), h.initModel(T), k.initModel({
1177
- id: s,
1178
- cameraIds: n.cameraIds,
1179
- uuid: n.uuid,
1180
- setIds: n.setIds,
1181
- setUuid: t.sets[t.poses[o.poses[0]].setIds[0]].uuid
1182
- }), I.initModel({
1183
- id: s,
1184
- skinId: parseInt(o.skins[0]),
1185
- censoredSkinIds: i,
1164
+ const t = e.entities, s = e.result, n = parseInt(s.poses[0]), o = t.poses[n], r = this.appSkinsStore.inaccessibleSkinIds, a = [], i = this.appSkinsStore.accessKeys, c = this.appSkinsStore.models, l = U(), m = j(), h = ue(), k = le(), I = se(), D = M(), w = ge(), v = me(), b = (o == null ? void 0 : o.basePoseId) ?? n;
1165
+ if (this.basePoseId = b, l.initModel(b), m.initModel(n), h.initModel(b), I.initModel({
1166
+ id: n,
1167
+ cameraIds: o.cameraIds,
1168
+ uuid: o.uuid,
1169
+ setIds: o.setIds,
1170
+ setUuid: t.sets[t.poses[s.poses[0]].setIds[0]].uuid
1171
+ }), D.initModel({
1172
+ id: n,
1173
+ skinId: parseInt(s.skins[0]),
1174
+ censoredSkinIds: a,
1186
1175
  inaccessibleSkinIds: r,
1187
- renderCount: n.renderCount,
1176
+ renderCount: o.renderCount,
1188
1177
  skins: c,
1189
- skinIds: n.skinIds,
1190
- uuid: n.uuid,
1191
- accessKeys: a
1178
+ skinIds: o.skinIds,
1179
+ uuid: o.uuid,
1180
+ accessKeys: i
1192
1181
  }), w.initModel({
1193
- id: s,
1194
- censoredSkinIds: i,
1182
+ id: n,
1183
+ censoredSkinIds: a,
1195
1184
  inaccessibleSkinIds: r,
1196
- index: n.index,
1197
- renderCount: n.renderCount
1198
- }), S.initModel(s), this.id = s, e.canonical) {
1199
- const _ = e.canonical;
1200
- w.setFrame(_.index, s), d.setSelectedBySlug(_.effect, s), I.setSelectedBySlug(_.skin, s);
1185
+ index: o.index,
1186
+ renderCount: o.renderCount
1187
+ }), v.initModel(n), this.id = n, e.canonical) {
1188
+ const F = e.canonical;
1189
+ w.setFrame(F.index, n), m.setSelectedBySlug(F.effect, n), D.setSelectedBySlug(F.skin, n);
1201
1190
  }
1202
- k.setPropertyById(s, "ready", !0), g.loadPreview();
1191
+ I.setPropertyById(n, "ready", !0), k.loadPreview();
1203
1192
  },
1204
1193
  set360FromResponse(e) {
1205
1194
  this.models = { ...this.models, ...e };
@@ -1207,17 +1196,14 @@ const Us = {
1207
1196
  isSelectedById(e, t) {
1208
1197
  switch (t) {
1209
1198
  case "adjustments":
1210
- return propertyChangedById(e, "brightness") || propertyChangedById(e, "contrast") || propertyChangedById(e, "saturate");
1199
+ return this.propertyChangedById(e, "brightness") || this.propertyChangedById(e, "contrast") || this.propertyChangedById(e, "saturate");
1211
1200
  default:
1212
- return propertyChangedById(e, t);
1201
+ return this.propertyChangedById(e, t);
1213
1202
  }
1214
1203
  },
1215
1204
  _clearKineticTimer() {
1216
1205
  this._kineticTimer && (clearTimeout(this._kineticTimer), this._kineticTimer = null);
1217
1206
  },
1218
- _clearLockedTimer() {
1219
- this._lockedTimer && (clearTimeout(this._lockedTimer), this._lockedTimer = null);
1220
- },
1221
1207
  // Main API: call whenever there’s user-driven motion.
1222
1208
  pulseKinetic(e = 100) {
1223
1209
  this.isKinetic = !0, this._clearKineticTimer(), this._kineticTimer = setTimeout(() => {
@@ -1229,193 +1215,189 @@ const Us = {
1229
1215
  e ? this.pulseKinetic(t) : (this._clearKineticTimer(), this.isKinetic = !1);
1230
1216
  },
1231
1217
  $reset() {
1232
- this._clearKineticTimer(), this._clearLockedTimer(), this.isKinetic = !1;
1218
+ this._clearKineticTimer(), this.isKinetic = !1;
1233
1219
  }
1234
1220
  }
1235
- }), $s = "tool:switched", Os = "pose:viewed", Ns = "skin:changed", ft = /* @__PURE__ */ Object.assign({ "../i18n/en-US/index.js": () => import("./index-KyHJpw0b.js"), "../i18n/es/index.js": () => import("./index-M-P_KhqK.js") }), B = (e = "../i18n") => {
1236
- const t = gt(), o = E({}), s = m(() => t.lang.isoName || "en-US"), n = async () => {
1237
- const r = `${e}/${s.value}/index.js`;
1238
- if (ft[r])
1221
+ }), _s = "tool:switched", Vs = "pose:viewed", js = "skin:changed", lt = /* @__PURE__ */ Object.assign({ "../i18n/en-US/index.js": () => import("./index-C3l3cs_R.js"), "../i18n/es/index.js": () => import("./index-M-P_KhqK.js") }), P = (e = "../i18n") => {
1222
+ const t = mt(), s = A({}), n = d(() => t.lang.isoName || "en-US"), o = async () => {
1223
+ const r = `${e}/${n.value}/index.js`;
1224
+ if (lt[r])
1239
1225
  try {
1240
- const i = await ft[r]();
1241
- i.default && Object.assign(o.value, i.default);
1242
- } catch (i) {
1243
- console.error(`Error loading i18n for ${s.value}`, i);
1226
+ const a = await lt[r]();
1227
+ a.default && Object.assign(s.value, a.default);
1228
+ } catch (a) {
1229
+ console.error(`Error loading i18n for ${n.value}`, a);
1244
1230
  }
1245
1231
  else
1246
1232
  console.error(`Module not found: ${r}`);
1247
1233
  };
1248
- return X(
1249
- () => s.value,
1234
+ return Z(
1235
+ () => n.value,
1250
1236
  () => {
1251
- n();
1237
+ o();
1252
1238
  },
1253
1239
  { immediate: !0 }
1254
- ), Kt(() => {
1255
- n();
1256
- }), { lang: o };
1257
- }, F = ({ tab: e = St, store: t, options: o = [] }) => {
1258
- const s = Yt(), n = f(s), r = m({
1259
- get: () => n.isExpanded(o),
1240
+ ), $t(() => {
1241
+ o();
1242
+ }), { lang: s };
1243
+ }, _ = ({ tab: e = ft, store: t, options: s = [] }) => {
1244
+ const n = Wt(), o = f(n), r = d({
1245
+ get: () => o.isExpanded(s),
1260
1246
  set: (c) => {
1261
- c && n.setActive(e);
1247
+ c && o.setActive(e);
1262
1248
  }
1263
- }), i = m(() => t && t.changed);
1264
- return { click: () => n.setActive(e), expanded: r, selected: i };
1265
- }, Ks = v({
1249
+ }), a = d(() => t && t.changed);
1250
+ return { click: () => o.setActive(e), expanded: r, selected: a };
1251
+ }, Us = g({
1266
1252
  name: "TsBrightnessTool",
1267
1253
  props: {
1268
1254
  noIcons: Boolean
1269
1255
  },
1270
- setup(e, { slots: t, emit: o }) {
1271
- const s = f(), n = m(() => s.hasAccess("bct")), r = (l) => s.block(l), i = $(), a = m({
1272
- get: () => i.property("brightness"),
1273
- set: (l) => i.setProperty("brightness", l)
1256
+ setup(e, { slots: t, emit: s }) {
1257
+ const n = f(), o = d(() => n.hasAccess("bct")), r = (l) => n.block(l), a = U(), i = d({
1258
+ get: () => a.property("brightness"),
1259
+ set: (l) => a.setProperty("brightness", l)
1274
1260
  });
1275
1261
  function c() {
1276
1262
  const l = {
1277
1263
  class: "ts-brightness-tool",
1278
- modelValue: a.value,
1279
- "onUpdate:modelValue": (d) => a.value = d,
1264
+ modelValue: i.value,
1265
+ "onUpdate:modelValue": (m) => i.value = m,
1280
1266
  noicons: e.noIcons,
1281
- hasAccess: n.value,
1267
+ hasAccess: o.value,
1282
1268
  onBlockAccess: r
1283
1269
  };
1284
- return u(De, l);
1270
+ return u(we, l);
1285
1271
  }
1286
1272
  return () => c();
1287
1273
  }
1288
- }), Rs = v({
1274
+ }), $s = g({
1289
1275
  name: "TsContrastTool",
1290
1276
  props: {
1291
1277
  noIcons: Boolean
1292
1278
  },
1293
- setup(e, { slots: t, emit: o }) {
1294
- const s = f(), n = m(() => s.hasAccess("cct")), r = (l) => s.block(l), i = $(), a = m({
1295
- get: () => i.property("contrast"),
1296
- set: (l) => i.setProperty("contrast", l)
1279
+ setup(e, { slots: t, emit: s }) {
1280
+ const n = f(), o = d(() => n.hasAccess("cct")), r = (l) => n.block(l), a = U(), i = d({
1281
+ get: () => a.property("contrast"),
1282
+ set: (l) => a.setProperty("contrast", l)
1297
1283
  });
1298
1284
  function c() {
1299
1285
  const l = {
1300
1286
  class: "ts-contrast-tool",
1301
- modelValue: a.value,
1302
- "onUpdate:modelValue": (d) => a.value = d,
1287
+ modelValue: i.value,
1288
+ "onUpdate:modelValue": (m) => i.value = m,
1303
1289
  noicons: e.noIcons,
1304
- hasAccess: n.value,
1290
+ hasAccess: o.value,
1305
1291
  onBlockAccess: r,
1306
1292
  type: "contrast"
1307
1293
  };
1308
- return u(De, l);
1294
+ return u(we, l);
1309
1295
  }
1310
1296
  return () => c();
1311
1297
  }
1312
- }), qs = v({
1298
+ }), Os = g({
1313
1299
  name: "TsSaturateTool",
1314
1300
  props: {
1315
1301
  noIcons: Boolean
1316
1302
  },
1317
- setup(e, { slots: t, emit: o }) {
1318
- const s = f(), n = m(() => s.hasAccess("sct")), r = (l) => s.block(l), i = $(), a = m({
1319
- get: () => i.property("saturate"),
1320
- set: (l) => i.setProperty("saturate", l)
1303
+ setup(e, { slots: t, emit: s }) {
1304
+ const n = f(), o = d(() => n.hasAccess("sct")), r = (l) => n.block(l), a = U(), i = d({
1305
+ get: () => a.property("saturate"),
1306
+ set: (l) => a.setProperty("saturate", l)
1321
1307
  });
1322
1308
  function c() {
1323
1309
  const l = {
1324
1310
  class: "ts-saturate-tool",
1325
- modelValue: a.value,
1326
- "onUpdate:modelValue": (d) => a.value = d,
1311
+ modelValue: i.value,
1312
+ "onUpdate:modelValue": (m) => i.value = m,
1327
1313
  noicons: e.noIcons,
1328
- hasAccess: n.value,
1314
+ hasAccess: o.value,
1329
1315
  onBlockAccess: r,
1330
1316
  type: "saturate"
1331
1317
  };
1332
- return u(De, l);
1318
+ return u(we, l);
1333
1319
  }
1334
1320
  return () => c();
1335
1321
  }
1336
- }), Ct = v({
1322
+ }), bt = g({
1337
1323
  name: "TsAdjustmentSection",
1338
- setup(e, { slots: t, emit: o }) {
1339
- function s() {
1340
- return [u(Ks), u(Rs), u(qs)];
1324
+ setup(e, { slots: t, emit: s }) {
1325
+ function n() {
1326
+ return [u(Us), u($s), u(Os)];
1341
1327
  }
1342
- return () => s();
1328
+ return () => n();
1343
1329
  }
1344
- }), Zs = v({
1330
+ }), Rs = g({
1345
1331
  name: "TsAdjustmentExpansion",
1346
- setup(e, { slots: t, emit: o }) {
1347
- const s = $(), { expanded: n, selected: r } = F({
1348
- store: s,
1349
- tab: Je,
1350
- options: [Je, yt, kt]
1351
- }), { lang: i } = B(), a = m(() => {
1332
+ setup(e, { slots: t, emit: s }) {
1333
+ const n = U(), { expanded: o, selected: r } = _({
1334
+ store: n,
1335
+ tab: We,
1336
+ options: [We, ht, gt]
1337
+ }), { lang: a } = P(), i = d(() => {
1352
1338
  var l;
1353
- return (l = i.value.ts) == null ? void 0 : l.controls.adjustments.title;
1339
+ return (l = a.value.ts) == null ? void 0 : l.controls.adjustments.title;
1354
1340
  });
1355
1341
  function c() {
1356
1342
  const l = {
1357
1343
  class: "ts-adjustment-expansion",
1358
- modelValue: n.value,
1359
- "onUpdate:modelValue": (d) => n.value = d,
1360
- label: a.value,
1344
+ modelValue: o.value,
1345
+ "onUpdate:modelValue": (m) => o.value = m,
1346
+ label: i.value,
1361
1347
  selected: r.value,
1362
1348
  icon: "f_brightness"
1363
1349
  };
1364
- return u(ge, l, () => u(Ct));
1350
+ return u(de, l, () => u(bt));
1365
1351
  }
1366
1352
  return () => c();
1367
1353
  }
1368
- }), Le = v({
1369
- name: "LockedOverlay",
1370
- props: {
1371
- label: { type: String, required: !1 }
1372
- },
1373
- emits: ["click", "update:modelValue"],
1374
- setup(e, { slots: t, emit: o }) {
1375
- const s = f(), { isLocked: n, lockedModal: r } = b(s);
1376
- function i() {
1377
- return tt(u("div", {
1378
- class: "locked-overlay",
1379
- onClick: () => r.value = !0
1380
- }, []), [[ht, n.value]]);
1354
+ }), Je = g({
1355
+ name: "FrozenOverlay",
1356
+ setup() {
1357
+ const e = f(), { isFrozen: t } = y(e);
1358
+ function s() {
1359
+ return ut(u("div", {
1360
+ class: "frozen-overlay",
1361
+ onClick: () => e.pokeFreeze()
1362
+ }, []), [[dt, t.value]]);
1381
1363
  }
1382
- return () => i();
1364
+ return () => s();
1383
1365
  }
1384
- }), Dt = v({
1366
+ }), kt = g({
1385
1367
  name: "TsCameraSection",
1386
- setup(e, { slots: t, emit: o }) {
1387
- const s = f(), n = Symbol.for("CameraSection"), r = ee(n);
1388
- function i() {
1389
- const a = {
1368
+ setup() {
1369
+ const e = f(), t = Symbol.for("CameraSection"), s = te(t);
1370
+ function n() {
1371
+ const o = {
1390
1372
  class: "ts-camera-section"
1391
- }, c = [];
1392
- return c.push(u(Le)), r && c.push(u(r, { id: s.id })), u("div", a, c);
1373
+ }, r = [];
1374
+ return r.push(u(Je)), s && r.push(u(s, { id: e.id })), u("div", o, r);
1393
1375
  }
1394
- return () => i();
1376
+ return () => n();
1395
1377
  }
1396
- }), Gs = v({
1378
+ }), Ks = g({
1397
1379
  name: "TsRelatedExpansion",
1398
- setup(e, { slots: t, emit: o }) {
1399
- const { lang: s } = B(), { expanded: n } = F({
1380
+ setup(e, { slots: t, emit: s }) {
1381
+ const { lang: n } = P(), { expanded: o } = _({
1400
1382
  options: Y,
1401
1383
  tab: Y
1402
- }), r = m(() => {
1403
- var a;
1404
- return (a = s.value.ts) == null ? void 0 : a.controls.camera.title;
1384
+ }), r = d(() => {
1385
+ var i;
1386
+ return (i = n.value.ts) == null ? void 0 : i.controls.camera.title;
1405
1387
  });
1406
- function i() {
1407
- const a = {
1388
+ function a() {
1389
+ const i = {
1408
1390
  class: "ts-camera-expansion",
1409
- modelValue: n.value,
1410
- "onUpdate:modelValue": (c) => n.value = c,
1391
+ modelValue: o.value,
1392
+ "onUpdate:modelValue": (c) => o.value = c,
1411
1393
  label: r.value,
1412
1394
  icon: "f_camera_angle"
1413
1395
  };
1414
- return u(ge, a, () => u(Dt));
1396
+ return u(de, i, () => u(kt));
1415
1397
  }
1416
- return () => i();
1398
+ return () => a();
1417
1399
  }
1418
- }), Ws = v({
1400
+ }), Ns = g({
1419
1401
  name: "TsEffectsButton",
1420
1402
  props: {
1421
1403
  id: Number,
@@ -1424,50 +1406,50 @@ const Us = {
1424
1406
  size: { type: String, default: "sm" }
1425
1407
  },
1426
1408
  emits: ["click", "update:modelValue"],
1427
- setup(e, { slots: t, emit: o }) {
1428
- const s = f(), n = oe(), r = M(), i = ue(), a = j(), { getThumbnail: c } = Be(), { id: l } = b(a), { color: d } = b(s), { skinId: h, slug: g } = b(r), k = m(() => n.property("setUuid"));
1429
- m(() => r.getPropertyByImageSet(
1409
+ setup(e, { slots: t, emit: s }) {
1410
+ const n = f(), o = se(), r = M(), a = le(), i = j(), { getThumbnail: c } = Pe(), { id: l } = y(i), { color: m } = y(n), { skinId: h, slug: k } = y(r), I = d(() => o.property("setUuid"));
1411
+ d(() => r.getPropertyByImageSet(
1430
1412
  {
1431
- id: s.id,
1413
+ id: n.id,
1432
1414
  skinId: h.value,
1433
1415
  effectId: e.id,
1434
- color: d.value
1416
+ color: m.value
1435
1417
  },
1436
1418
  "percent"
1437
- )), m(() => e.size === "sm" ? "64px" : "94px"), m(() => ({
1419
+ )), d(() => e.size === "sm" ? "64px" : "94px"), d(() => ({
1438
1420
  margin: "3px",
1439
1421
  marginBottom: e.size === "sm" ? "40px" : "30px"
1440
1422
  }));
1441
- const I = m(() => ({
1423
+ const D = d(() => ({
1442
1424
  margin: "3px",
1443
1425
  marginBottom: e.size === "sm" ? "40px" : "30px"
1444
- })), w = (T) => {
1445
- a.setEffectId(T), i.loadSkin();
1426
+ })), w = (b) => {
1427
+ i.setEffectId(b), a.loadSkin();
1446
1428
  };
1447
- function S() {
1448
- const T = {
1429
+ function v() {
1430
+ const b = {
1449
1431
  class: "ts-effects-button",
1450
1432
  label: e.label,
1451
1433
  key: e.id,
1452
1434
  size: e.size,
1453
1435
  image: c({
1454
- uuid: k.value,
1455
- image: g.value,
1436
+ uuid: I.value,
1437
+ image: k.value,
1456
1438
  effect: e.slug,
1457
- color: d.value
1439
+ color: m.value
1458
1440
  }),
1459
1441
  onClick: () => w(e.id),
1460
1442
  selected: l.value === e.id,
1461
1443
  dark: !0,
1462
1444
  noWrap: !0,
1463
1445
  type: "radio",
1464
- style: I.value
1446
+ style: D.value
1465
1447
  };
1466
- return u(te, T);
1448
+ return u(q, b);
1467
1449
  }
1468
- return () => S();
1450
+ return () => v();
1469
1451
  }
1470
- }), Pt = v({
1452
+ }), It = g({
1471
1453
  name: "TsEffectsSection",
1472
1454
  props: {
1473
1455
  noWrap: Boolean,
@@ -1475,152 +1457,184 @@ const Us = {
1475
1457
  size: { type: String, default: "sm" }
1476
1458
  },
1477
1459
  emits: ["click", "update:modelValue"],
1478
- setup(e, { slots: t, emit: o }) {
1479
- const s = j(), { effects: n } = b(s);
1480
- function r() {
1481
- const i = [];
1482
- return i.push(u(Le)), n.value.forEach((c) => {
1483
- i.push(
1484
- u(Ws, {
1485
- id: c.id,
1486
- label: c.name,
1487
- slug: c.slug,
1460
+ setup(e) {
1461
+ const t = j(), { effects: s } = y(t);
1462
+ function n() {
1463
+ const o = [];
1464
+ return o.push(u(Je)), s.value.forEach((a) => {
1465
+ o.push(
1466
+ u(Ns, {
1467
+ id: a.id,
1468
+ label: a.name,
1469
+ slug: a.slug,
1488
1470
  noWrap: !0,
1489
1471
  size: e.size,
1490
- type: "radio",
1491
- label: c.name
1472
+ type: "radio"
1492
1473
  })
1493
1474
  );
1494
- }), u(nt, {}, () => i);
1475
+ }), u(Qe, {}, () => o);
1495
1476
  }
1496
- return () => r();
1477
+ return () => n();
1497
1478
  }
1498
- }), Hs = v({
1479
+ }), Ls = g({
1499
1480
  name: "TsEffectsExpansion",
1500
- setup(e, { slots: t, emit: o }) {
1501
- const { lang: s } = B(), n = j(), { selected: r } = b(n), { expanded: i } = F({
1502
- store: n,
1481
+ setup(e, { slots: t, emit: s }) {
1482
+ const { lang: n } = P(), o = j(), { selected: r } = y(o), { expanded: a } = _({
1483
+ store: o,
1503
1484
  options: Q,
1504
1485
  tab: Q
1505
- }), a = m(() => {
1486
+ }), i = d(() => {
1506
1487
  var l;
1507
- return (l = s.value.ts) == null ? void 0 : l.controls.effects.title;
1488
+ return (l = n.value.ts) == null ? void 0 : l.controls.effects.title;
1508
1489
  });
1509
1490
  function c() {
1510
1491
  const l = {
1511
1492
  class: "ts-effects-expansion",
1512
- modelValue: i.value,
1513
- "onUpdate:modelValue": (d) => i.value = d,
1514
- label: a.value,
1493
+ modelValue: a.value,
1494
+ "onUpdate:modelValue": (m) => a.value = m,
1495
+ label: i.value,
1515
1496
  selected: r.value,
1516
1497
  icon: "f_contrast"
1517
1498
  };
1518
1499
  return u(
1519
- ge,
1500
+ de,
1520
1501
  l,
1521
- () => u(Pt, { noWrap: !1, size: "sm", class: "q-py-sm" })
1502
+ () => u(It, { noWrap: !1, size: "sm", class: "q-py-sm" })
1522
1503
  );
1523
1504
  }
1524
1505
  return () => c();
1525
1506
  }
1526
- }), Bt = v({
1507
+ }), Tt = g({
1527
1508
  name: "TsGridTool",
1528
1509
  props: {
1529
1510
  noIcons: Boolean
1530
1511
  },
1531
1512
  emits: ["input"],
1532
- setup(e, { slots: t, emit: o }) {
1533
- const s = de(), n = f(), r = m(() => n.hasAccess("grd")), i = (g) => n.block(g), a = m({
1534
- get: () => s.property("spacing"),
1535
- set: (g) => s.setProperty("spacing", g)
1536
- }), c = m({
1537
- get: () => s.property("vertical"),
1538
- set: (g) => s.setProperty("vertical", g)
1539
- }), l = m({
1540
- get: () => s.property("horizontal"),
1541
- set: (g) => s.setProperty("horizontal", g)
1542
- }), d = m({
1543
- get: () => s.property("visible"),
1544
- set: (g) => s.setProperty("visible", g)
1513
+ setup(e) {
1514
+ const t = ue(), s = f(), n = d(() => s.hasAccess("grd")), o = (m) => s.block(m), r = d({
1515
+ get: () => t.property("spacing"),
1516
+ set: (m) => t.setProperty("spacing", m)
1517
+ }), a = d({
1518
+ get: () => t.property("vertical"),
1519
+ set: (m) => t.setProperty("vertical", m)
1520
+ }), i = d({
1521
+ get: () => t.property("horizontal"),
1522
+ set: (m) => t.setProperty("horizontal", m)
1523
+ }), c = d({
1524
+ get: () => t.property("visible"),
1525
+ set: (m) => t.setProperty("visible", m)
1545
1526
  });
1546
- function h() {
1547
- const g = {
1527
+ function l() {
1528
+ const m = {
1548
1529
  class: "ts-grid-tool",
1549
- visible: d.value,
1550
- "onUpdate:visible": (k) => d.value = k,
1551
- lines: a.value,
1552
- "onUpdate:lines": (k) => a.value = k,
1553
- vertical: c.value,
1554
- "onUpdate:vertical": (k) => c.value = k,
1555
- horizontal: l.value,
1556
- "onUpdate:horizontal": (k) => l.value = k,
1530
+ visible: c.value,
1531
+ "onUpdate:visible": (h) => c.value = h,
1532
+ lines: r.value,
1533
+ "onUpdate:lines": (h) => r.value = h,
1534
+ vertical: a.value,
1535
+ "onUpdate:vertical": (h) => a.value = h,
1536
+ horizontal: i.value,
1537
+ "onUpdate:horizontal": (h) => i.value = h,
1557
1538
  noIcons: e.noIcons,
1558
- hasAccess: r.value,
1559
- onBlockAccess: i
1539
+ hasAccess: n.value,
1540
+ onBlockAccess: o
1560
1541
  };
1561
- return u(gs, g, () => []);
1542
+ return u(ds, m, () => []);
1562
1543
  }
1563
- return () => h();
1544
+ return () => l();
1564
1545
  }
1565
- }), Xs = v({
1546
+ }), Zs = g({
1566
1547
  name: "TsGridExpansion",
1567
- setup(e, { slots: t, emit: o }) {
1568
- const { lang: s } = B(), n = de(), { expanded: r, selected: i } = F({
1569
- store: n,
1548
+ setup(e, { slots: t, emit: s }) {
1549
+ const { lang: n } = P(), o = ue(), { expanded: r, selected: a } = _({
1550
+ store: o,
1570
1551
  options: J,
1571
1552
  tab: J
1572
- }), a = m(() => {
1553
+ }), i = d(() => {
1573
1554
  var l;
1574
- return (l = s.value.ts) == null ? void 0 : l.controls.grid.title;
1555
+ return (l = n.value.ts) == null ? void 0 : l.controls.grid.title;
1575
1556
  });
1576
1557
  function c() {
1577
1558
  const l = {
1578
1559
  class: "ts-grid-expansion",
1579
1560
  modelValue: r.value,
1580
- "onUpdate:modelValue": (d) => r.value = d,
1581
- label: a.value,
1582
- selected: i.value,
1561
+ "onUpdate:modelValue": (m) => r.value = m,
1562
+ label: i.value,
1563
+ selected: a.value,
1583
1564
  icon: "f_grid"
1584
1565
  };
1585
- return u(ge, l, () => u(Bt));
1566
+ return u(de, l, () => u(Tt));
1586
1567
  }
1587
1568
  return () => c();
1588
1569
  }
1589
- }), xt = v({
1570
+ }), wt = g({
1590
1571
  name: "TsRelatedSection",
1591
1572
  setup() {
1592
- const e = Symbol.for("RelatedSection"), t = ee(e);
1593
- function o() {
1594
- const s = {
1573
+ const e = Symbol.for("RelatedSection"), t = te(e);
1574
+ function s() {
1575
+ const n = {
1595
1576
  class: "ts-related-section q-mx-lg q-my-sm"
1596
- }, n = [];
1597
- return t && n.push(u(t)), u("div", s, n);
1577
+ }, o = [];
1578
+ return t && o.push(u(t)), u("div", n, o);
1598
1579
  }
1599
- return () => o();
1580
+ return () => s();
1600
1581
  }
1601
- }), Ys = v({
1582
+ }), Gs = g({
1602
1583
  name: "TsRelatedExpansion",
1603
- setup(e, { slots: t, emit: o }) {
1604
- const { lang: s } = B(), { expanded: n } = F({
1605
- options: ce,
1606
- tab: ce
1607
- }), r = m(() => {
1608
- var a;
1609
- return (a = s.value.ts) == null ? void 0 : a.controls.related.title;
1584
+ setup(e, { slots: t, emit: s }) {
1585
+ const { lang: n } = P(), { expanded: o } = _({
1586
+ options: ee,
1587
+ tab: ee
1588
+ }), r = d(() => {
1589
+ var i;
1590
+ return (i = n.value.ts) == null ? void 0 : i.controls.related.title;
1610
1591
  });
1611
- function i() {
1612
- const a = {
1592
+ function a() {
1593
+ const i = {
1613
1594
  class: "ts-related-expansion",
1614
- modelValue: n.value,
1615
- "onUpdate:modelValue": (c) => n.value = c,
1595
+ modelValue: o.value,
1596
+ "onUpdate:modelValue": (c) => o.value = c,
1616
1597
  label: r.value,
1617
1598
  icon: "f_related"
1618
1599
  };
1619
- return u(ge, a, () => u(xt));
1600
+ return u(de, i, () => u(wt));
1620
1601
  }
1621
- return () => i();
1602
+ return () => a();
1622
1603
  }
1623
- }), Qs = Symbol.for("activity-tracking"), Js = v({
1604
+ }), Dt = g({
1605
+ name: "TsSavedSection",
1606
+ setup() {
1607
+ const e = Symbol.for("SavedSection"), t = te(e);
1608
+ function s() {
1609
+ return t ? u("div", {
1610
+ class: "ts-saved-section q-mx-lg q-my-sm"
1611
+ }, [u(t)]) : null;
1612
+ }
1613
+ return () => s();
1614
+ }
1615
+ }), qs = g({
1616
+ name: "TsSavedExpansion",
1617
+ setup() {
1618
+ const { lang: e } = P(), { expanded: t } = _({
1619
+ options: ie,
1620
+ tab: ie
1621
+ }), s = d(() => {
1622
+ var o, r;
1623
+ return ((r = (o = e.value.ts) == null ? void 0 : o.controls.saved) == null ? void 0 : r.title) || "Saved";
1624
+ });
1625
+ function n() {
1626
+ const o = {
1627
+ class: "ts-saved-expansion",
1628
+ modelValue: t.value,
1629
+ "onUpdate:modelValue": (r) => t.value = r,
1630
+ label: s.value,
1631
+ icon: "f_save"
1632
+ };
1633
+ return u(de, o, () => u(Dt));
1634
+ }
1635
+ return () => n();
1636
+ }
1637
+ }), Ws = Symbol.for("activity-tracking"), Hs = g({
1624
1638
  name: "TsSkinLoadingButton",
1625
1639
  props: {
1626
1640
  dark: { type: Boolean, default: !0 },
@@ -1630,11 +1644,11 @@ const Us = {
1630
1644
  slug: String
1631
1645
  },
1632
1646
  emits: [],
1633
- setup(e, { slots: t, emit: o }) {
1634
- const s = f(), n = oe(), r = M(), i = ue(), a = j(), c = ee(Qs, null), { getThumbnail: l } = Be(), { slug: d, id: h } = b(a), { color: g } = b(s), { skinId: k } = b(r), I = m(() => n.property("setUuid")), w = (A) => s.block(A), S = (A) => s.hasAccess(r.accessKeys[A]), T = (A) => {
1635
- r.setProperty("skinId", A), i.loadSkin(), c == null || c.trackEvent(Ns, { value: e.slug });
1636
- }, _ = (A) => {
1637
- switch (A) {
1647
+ setup(e, { slots: t, emit: s }) {
1648
+ const n = f(), o = se(), r = M(), a = le(), i = j(), c = te(Ws, null), { getThumbnail: l } = Pe(), { slug: m, id: h } = y(i), { color: k } = y(n), { skinId: I } = y(r), D = d(() => o.property("setUuid")), w = (x) => n.block(x), v = (x) => n.hasAccess(r.accessKeys[x]), b = (x) => {
1649
+ r.setProperty("skinId", x), a.loadSkin(), c == null || c.trackEvent(js, { value: e.slug });
1650
+ }, F = (x) => {
1651
+ switch (x) {
1638
1652
  case "nude":
1639
1653
  return "snd";
1640
1654
  case "muscle":
@@ -1647,107 +1661,107 @@ const Us = {
1647
1661
  return "snl";
1648
1662
  }
1649
1663
  };
1650
- m(() => e.size === "sm" ? "64px" : "94px"), m(() => ({
1664
+ d(() => e.size === "sm" ? "64px" : "94px"), d(() => ({
1651
1665
  margin: "3px",
1652
1666
  marginBottom: e.size === "sm" ? "40px" : "30px"
1653
1667
  }));
1654
- const z = m(() => ({
1668
+ const E = d(() => ({
1655
1669
  margin: "3px",
1656
1670
  marginBottom: e.size === "sm" ? "40px" : "30px"
1657
1671
  }));
1658
- m(() => r.getPropertyByImageSet(
1672
+ d(() => r.getPropertyByImageSet(
1659
1673
  {
1660
- id: s.id,
1674
+ id: n.id,
1661
1675
  skinId: e.id,
1662
1676
  effectId: h.value,
1663
- color: g.value
1677
+ color: k.value
1664
1678
  },
1665
1679
  "percent"
1666
1680
  ));
1667
- function O() {
1668
- const A = {
1681
+ function $() {
1682
+ const x = {
1669
1683
  class: `ts-${e.slug}-button ts-skin-button`,
1670
1684
  label: e.name,
1671
1685
  key: e.id,
1672
- access: _(e.slug),
1673
- style: z.value,
1686
+ access: F(e.slug),
1687
+ style: E.value,
1674
1688
  size: e.size,
1675
1689
  image: l({
1676
- uuid: I.value,
1690
+ uuid: D.value,
1677
1691
  image: e.slug,
1678
- effect: d.value,
1679
- color: g.value
1692
+ effect: m.value,
1693
+ color: k.value
1680
1694
  }),
1681
- onClick: () => T(e.id),
1682
- selected: k.value === e.id,
1695
+ onClick: () => b(e.id),
1696
+ selected: I.value === e.id,
1683
1697
  dark: !0,
1684
- hasAccess: S(e.id),
1698
+ hasAccess: v(e.id),
1685
1699
  onBlockAccess: w,
1686
1700
  type: "radio"
1687
1701
  };
1688
- return u(te, A);
1702
+ return u(q, x);
1689
1703
  }
1690
- return () => O();
1704
+ return () => $();
1691
1705
  }
1692
- }), Et = v({
1706
+ }), Pt = g({
1693
1707
  name: "TsSkinSection",
1694
1708
  props: { noWrap: Boolean, size: { type: String, default: "sm" } },
1695
1709
  setup(e, {}) {
1696
- const t = M(), { skins: o } = b(t);
1697
- function s() {
1698
- const n = [];
1699
- return n.push(u(Le)), o.value.forEach((r) => {
1700
- const i = {
1710
+ const t = M(), { skins: s } = y(t);
1711
+ function n() {
1712
+ const o = [];
1713
+ return o.push(u(Je)), s.value.forEach((r) => {
1714
+ const a = {
1701
1715
  id: r.id,
1702
1716
  name: r.name,
1703
1717
  slug: r.slug,
1704
1718
  type: "radio",
1705
1719
  label: r.name
1706
1720
  };
1707
- n.push(u(Js, i));
1708
- }), u(nt, {}, () => n);
1721
+ o.push(u(Hs, a));
1722
+ }), u(Qe, {}, () => o);
1709
1723
  }
1710
- return () => s();
1724
+ return () => n();
1711
1725
  }
1712
- }), eo = v({
1726
+ }), Xs = g({
1713
1727
  name: "TsSkinsExpansion",
1714
- setup(e, { slots: t, emit: o }) {
1715
- const { lang: s } = B(), n = M(), { selected: r } = b(n), { expanded: i } = F({
1716
- store: n,
1717
- options: Ve,
1718
- tab: Ve
1719
- }), a = m(() => {
1728
+ setup(e, { slots: t, emit: s }) {
1729
+ const { lang: n } = P(), o = M(), { selected: r } = y(o), { expanded: a } = _({
1730
+ store: o,
1731
+ options: xe,
1732
+ tab: xe
1733
+ }), i = d(() => {
1720
1734
  var l;
1721
- return (l = s.value.ts) == null ? void 0 : l.controls.views.title;
1735
+ return (l = n.value.ts) == null ? void 0 : l.controls.views.title;
1722
1736
  });
1723
1737
  function c() {
1724
1738
  const l = {
1725
1739
  class: "ts-skins-expansion",
1726
- modelValue: i.value,
1727
- "onUpdate:modelValue": (d) => i.value = d,
1728
- label: a.value,
1740
+ modelValue: a.value,
1741
+ "onUpdate:modelValue": (m) => a.value = m,
1742
+ label: i.value,
1729
1743
  selected: r.value,
1730
1744
  icon: "f_shirt"
1731
1745
  };
1732
1746
  return u(
1733
- ge,
1747
+ de,
1734
1748
  l,
1735
- () => u(Et, { noWrap: !1, size: "lg", class: "q-py-sm" })
1749
+ () => u(Pt, { noWrap: !1, size: "lg", class: "q-py-sm" })
1736
1750
  );
1737
1751
  }
1738
1752
  return () => c();
1739
1753
  }
1740
- }), zt = v({
1754
+ }), Bt = g({
1741
1755
  name: "TsPoseButtonsSection",
1742
- setup(e, { slots: t, emit: o }) {
1743
- const s = Symbol.for("PoseButtonsSection"), n = ee(s), r = f();
1744
- function i() {
1745
- const a = [];
1746
- return n && a.push(u(n, { id: r.id })), a;
1756
+ setup() {
1757
+ const e = Symbol.for("PoseButtonsSection"), t = te(e), s = f();
1758
+ function n() {
1759
+ const o = [];
1760
+ return t && o.push(u(t, { id: s.id, class: "ts-pose-buttons-section" })), o;
1747
1761
  }
1748
- return () => i();
1762
+ return () => n();
1749
1763
  }
1750
- }), to = v({
1764
+ }), Ys = g({
1751
1765
  name: "TsButtons",
1752
1766
  props: {
1753
1767
  bottom: {
@@ -1756,183 +1770,185 @@ const Us = {
1756
1770
  }
1757
1771
  },
1758
1772
  emits: ["click", "update:modelValue"],
1759
- setup(e, { slots: t, emit: o }) {
1760
- const { lang: s } = B(), n = f(), r = $(), i = j(), a = de(), c = M(), l = ve(), d = ne(), { active: h } = b(n), { changed: g } = b(r), { changed: k } = b(a), { changed: I } = b(c), { changed: w } = b(l), { changed: S } = b(d), { changed: T } = b(i);
1761
- m(() => {
1762
- var x;
1763
- return (x = s.value.ts) == null ? void 0 : x.buttons.done;
1773
+ setup(e, { slots: t, emit: s }) {
1774
+ const { lang: n } = P(), o = f(), r = U(), a = j(), i = ue(), c = M(), l = ge(), m = me(), { active: h } = y(o), { changed: k } = y(r), { changed: I } = y(i), { changed: D } = y(c), { changed: w } = y(l), { changed: v } = y(m), { changed: b } = y(a);
1775
+ d(() => {
1776
+ var z;
1777
+ return (z = n.value.ts) == null ? void 0 : z.buttons.done;
1764
1778
  });
1765
- const _ = m(
1779
+ const F = d(
1766
1780
  () => {
1767
- var x, D;
1768
- return !e.bottom || h.value === dt ? (x = s.value.ts) == null ? void 0 : x.buttons.resetAll : (D = s.value.ts) == null ? void 0 : D.buttons.reset;
1781
+ var z, B;
1782
+ return !e.bottom || h.value === at ? (z = n.value.ts) == null ? void 0 : z.buttons.resetAll : (B = n.value.ts) == null ? void 0 : B.buttons.reset;
1769
1783
  }
1770
1784
  );
1771
- m(
1772
- () => h.value === us || h.value === ce || !z.value
1785
+ d(
1786
+ () => h.value === rs || h.value === ee || !E.value
1773
1787
  );
1774
- const z = m(
1775
- () => g.value || k.value || I.value || T.value || w.value || S.value
1776
- ), O = () => {
1777
- if (!e.bottom || h.value === dt)
1778
- return A();
1788
+ const E = d(
1789
+ () => k.value || I.value || D.value || b.value || w.value || v.value
1790
+ ), $ = () => {
1791
+ if (!e.bottom || h.value === at)
1792
+ return x();
1779
1793
  switch (h.value) {
1780
- case Je:
1794
+ case We:
1781
1795
  r.resetProperty("brightness");
1782
1796
  break;
1783
- case yt:
1797
+ case ht:
1784
1798
  r.resetProperty("contrast");
1785
1799
  break;
1786
1800
  case J:
1787
- a.reset();
1801
+ i.reset();
1788
1802
  break;
1789
- case kt:
1803
+ case gt:
1790
1804
  r.resetProperty("saturate");
1791
1805
  break;
1792
- case ms:
1806
+ case is:
1793
1807
  l.reset();
1794
1808
  break;
1795
- case Ve:
1809
+ case xe:
1796
1810
  c.reset();
1797
1811
  break;
1798
1812
  case Q:
1799
- i.reset();
1813
+ a.reset();
1800
1814
  break;
1801
- case ds:
1802
- d.reset();
1815
+ case as:
1816
+ m.reset();
1803
1817
  break;
1804
1818
  }
1805
- }, A = () => {
1806
- r.reset(), a.reset(), c.reset(), l.reset(), d.reset(), i.reset();
1807
- }, G = (x) => x.preventDefault();
1808
- function N() {
1809
- const x = {
1819
+ }, x = () => {
1820
+ r.reset(), i.reset(), c.reset(), l.reset(), m.reset(), a.reset();
1821
+ }, H = (z) => z.preventDefault();
1822
+ function R() {
1823
+ const z = {
1810
1824
  style: "position: fixed;bottom: 0; left: 0; right: 0;border-top: 1px solid var(--grey-300)",
1811
1825
  class: "row justify-center items-center q-pa-md glass-background"
1812
- }, D = {
1826
+ }, B = {
1813
1827
  class: "ts-reset-button",
1814
- label: _.value,
1815
- onClick: O,
1816
- onKeyup: G,
1828
+ label: F.value,
1829
+ onClick: $,
1830
+ onKeyup: H,
1817
1831
  rounded: !0,
1818
1832
  unelevated: !0,
1819
1833
  outline: !0
1820
1834
  };
1821
- return u("div", x, [u(Qt, D)]);
1835
+ return u("div", z, [u(Gt, B)]);
1822
1836
  }
1823
- return () => N();
1837
+ return () => R();
1824
1838
  }
1825
- }), so = v({
1839
+ }), Qs = g({
1826
1840
  name: "TsExpansions",
1827
- setup(e, { slots: t, emit: o }) {
1828
- function s() {
1841
+ setup(e, { slots: t, emit: s }) {
1842
+ function n() {
1829
1843
  return u("div", {
1830
1844
  class: "ts-expansions q-pt-lg",
1831
1845
  onClick: (r) => r.stopPropagation(),
1832
1846
  style: "padding-bottom: 60px; position: relative "
1833
1847
  }, [
1834
- u(zt),
1835
- u(pe),
1836
- u(eo),
1837
- u(pe),
1838
- u(Hs),
1839
- u(pe),
1840
- u(Gs),
1841
- u(pe),
1848
+ u(Bt),
1849
+ u(ne),
1842
1850
  u(Xs),
1843
- u(pe),
1851
+ u(ne),
1852
+ u(Ls),
1853
+ u(ne),
1854
+ u(Ks),
1855
+ u(ne),
1844
1856
  u(Zs),
1845
- u(pe),
1846
- u(Ys),
1847
- u(to)
1857
+ u(ne),
1858
+ u(Rs),
1859
+ u(ne),
1860
+ u(Gs),
1861
+ u(ne),
1862
+ u(qs),
1863
+ u(Ys)
1848
1864
  ]);
1849
1865
  }
1850
- return () => s();
1866
+ return () => n();
1851
1867
  }
1852
- }), oo = v({
1868
+ }), Js = g({
1853
1869
  name: "TsAdjustmentDrawer",
1854
- setup(e, { slots: t, emit: o }) {
1855
- const { lang: s } = B(), n = m(() => {
1856
- var i;
1857
- return (i = s.value.ts) == null ? void 0 : i.controls.adjustments.title;
1870
+ setup(e, { slots: t, emit: s }) {
1871
+ const { lang: n } = P(), o = d(() => {
1872
+ var a;
1873
+ return (a = n.value.ts) == null ? void 0 : a.controls.adjustments.title;
1858
1874
  });
1859
1875
  function r() {
1860
- const i = {
1876
+ const a = {
1861
1877
  class: "ts-adjustment-drawer",
1862
- name: Ie,
1863
- label: n.value
1878
+ name: be,
1879
+ label: o.value
1864
1880
  };
1865
- return u(se, i, () => u(Ct));
1881
+ return u(W, a, () => u(bt));
1866
1882
  }
1867
1883
  return () => r();
1868
1884
  }
1869
- }), no = v({
1885
+ }), en = g({
1870
1886
  name: "TsCameraDrawer",
1871
- setup(e, { slots: t, emit: o }) {
1872
- const { lang: s } = B(), n = m(() => {
1873
- var i;
1874
- return (i = s.value.ts) == null ? void 0 : i.controls.camera.title;
1887
+ setup(e, { slots: t, emit: s }) {
1888
+ const { lang: n } = P(), o = d(() => {
1889
+ var a;
1890
+ return (a = n.value.ts) == null ? void 0 : a.controls.camera.title;
1875
1891
  });
1876
1892
  function r() {
1877
- const i = {
1893
+ const a = {
1878
1894
  class: "ts-camera-drawer",
1879
1895
  name: Y,
1880
- label: n.value
1896
+ label: o.value
1881
1897
  };
1882
- return u(se, i, () => u(Dt));
1898
+ return u(W, a, () => u(kt));
1883
1899
  }
1884
1900
  return () => r();
1885
1901
  }
1886
- }), ro = v({
1902
+ }), tn = g({
1887
1903
  name: "TsSkinButton",
1888
1904
  emits: ["click"],
1889
- setup(e, { slots: t, emit: o }) {
1890
- const s = M(), n = oe(), { lang: r } = B(), { getPoseThumbnail: i } = Be(), { click: a, selected: c } = F({
1891
- store: s,
1892
- options: Te,
1893
- tab: Te
1894
- }), l = m(() => n.property("uuid")), d = m(() => s.property("currentSlug")), h = m(() => {
1895
- if (l.value)
1896
- return i({ uuid: l.value, image: d.value });
1897
- }), g = m(() => {
1898
- var I;
1899
- return (I = r.value.ts) == null ? void 0 : I.controls.skins.iconTitle;
1905
+ setup() {
1906
+ const e = M(), t = se(), { lang: s } = P(), { getPoseThumbnail: n } = Pe(), { click: o, selected: r } = _({
1907
+ store: e,
1908
+ options: ke,
1909
+ tab: ke
1910
+ }), a = d(() => t.property("uuid")), i = d(() => e.property("currentSlug")), c = d(() => {
1911
+ if (a.value)
1912
+ return n({ uuid: a.value, image: i.value });
1913
+ }), l = d(() => {
1914
+ var h;
1915
+ return (h = s.value.ts) == null ? void 0 : h.controls.skins.iconTitle;
1900
1916
  });
1901
- function k() {
1902
- const I = {
1917
+ function m() {
1918
+ const h = {
1903
1919
  class: "ts-skin-button",
1904
- image: h.value,
1905
- key: g.value,
1906
- label: g.value,
1907
- selected: c.value,
1908
- "data-id": Te,
1909
- onClick: a,
1920
+ image: c.value,
1921
+ key: l.value,
1922
+ label: l.value,
1923
+ selected: r.value,
1924
+ "data-id": ke,
1925
+ onClick: o,
1910
1926
  type: "none"
1911
1927
  };
1912
- return u(te, I, () => []);
1928
+ return u(q, h, () => []);
1913
1929
  }
1914
- return () => k();
1930
+ return () => m();
1915
1931
  }
1916
- }), ao = v({
1932
+ }), sn = g({
1917
1933
  name: "TsGridButton",
1918
1934
  props: { size: String },
1919
1935
  setup(e, {}) {
1920
- const t = de(), o = f(), s = m(() => (o == null ? void 0 : o.hasAccess("grd")) || !1), { lang: n } = B(), r = m(() => {
1921
- var d;
1922
- return (d = n.value.ts) == null ? void 0 : d.controls.grid.iconTitle;
1923
- }), { click: i, selected: a } = F({
1936
+ const t = ue(), s = f(), n = d(() => (s == null ? void 0 : s.hasAccess("grd")) || !1), { lang: o } = P(), r = d(() => {
1937
+ var m;
1938
+ return (m = o.value.ts) == null ? void 0 : m.controls.grid.iconTitle;
1939
+ }), { click: a, selected: i } = _({
1924
1940
  store: t,
1925
1941
  options: J,
1926
1942
  tab: J
1927
1943
  });
1928
- function c(d) {
1929
- return o.block(d);
1944
+ function c(m) {
1945
+ return s.block(m);
1930
1946
  }
1931
1947
  function l() {
1932
- const d = {
1933
- hasAccess: s.value,
1934
- selected: a.value,
1935
- onClick: i,
1948
+ const m = {
1949
+ hasAccess: n.value,
1950
+ selected: i.value,
1951
+ onClick: a,
1936
1952
  onBlockAccess: c,
1937
1953
  size: e.size,
1938
1954
  "data-id": J,
@@ -1941,219 +1957,199 @@ const Us = {
1941
1957
  icon: "f_grid",
1942
1958
  label: r.value
1943
1959
  };
1944
- return u(te, d, () => []);
1960
+ return u(q, m, () => []);
1945
1961
  }
1946
1962
  return () => l();
1947
1963
  }
1948
- });
1949
- v({
1950
- name: "TsPositionButton",
1951
- props: {
1952
- size: String
1953
- },
1954
- setup(e, { slots: t, emit: o }) {
1955
- const s = ne(), { click: n, selected: r } = F({
1956
- store: s,
1957
- options: Ae,
1958
- tab: Ae
1959
- }), i = m(() => s.property("movable"));
1960
- function a() {
1961
- const c = {
1962
- name: "position",
1963
- icon: "f_spin",
1964
- selected: r.value,
1965
- show: i.value,
1966
- size: e.size,
1967
- "data-id": Ae,
1968
- onClick: n
1969
- };
1970
- return u(bt, c, () => []);
1971
- }
1972
- return () => a();
1973
- }
1974
- });
1975
- const io = v({
1964
+ }), nn = g({
1976
1965
  name: "TsAdjustmentsButton",
1977
1966
  props: { size: String },
1978
1967
  setup(e, {}) {
1979
- const t = $(), o = f(), { lang: s } = B(), n = m(() => {
1980
- var d;
1981
- return (d = s.value.ts) == null ? void 0 : d.controls.adjustments.iconTitle;
1982
- }), r = m(() => (o == null ? void 0 : o.hasAccess("bct")) || !1), { click: i, selected: a } = F({
1968
+ const t = U(), s = f(), { lang: n } = P(), o = d(() => {
1969
+ var m;
1970
+ return (m = n.value.ts) == null ? void 0 : m.controls.adjustments.iconTitle;
1971
+ }), r = d(() => (s == null ? void 0 : s.hasAccess("bct")) || !1), { click: a, selected: i } = _({
1983
1972
  store: t,
1984
- options: Ie,
1985
- tab: Ie
1973
+ options: be,
1974
+ tab: be
1986
1975
  });
1987
- function c(d) {
1988
- return o.block(d);
1976
+ function c(m) {
1977
+ return s.block(m);
1989
1978
  }
1990
1979
  function l() {
1991
- const d = {
1980
+ const m = {
1992
1981
  hasAccess: r.value,
1993
- selected: a.value,
1994
- onClick: i,
1982
+ selected: i.value,
1983
+ onClick: a,
1995
1984
  onBlockAccess: c,
1996
1985
  size: e.size,
1997
- "data-id": Ie,
1986
+ "data-id": be,
1998
1987
  name: "imageAdjustment",
1999
1988
  icon: "f_brightness",
2000
- label: n.value,
1989
+ label: o.value,
2001
1990
  type: "none"
2002
1991
  };
2003
- return u(te, d, () => []);
1992
+ return u(q, m, () => []);
2004
1993
  }
2005
1994
  return () => l();
2006
1995
  }
2007
- }), co = v({
1996
+ }), on = g({
2008
1997
  name: "TsAdjustmentsButton",
2009
1998
  props: { size: String },
2010
1999
  setup(e, {}) {
2011
2000
  const t = f();
2012
- m(() => (t == null ? void 0 : t.hasAccess("cau")) || !1);
2013
- const { lang: o } = B(), s = m(() => {
2014
- var a;
2015
- return (a = o.value.ts) == null ? void 0 : a.controls.camera.iconTitle;
2016
- }), { click: n, selected: r } = F({
2001
+ d(() => (t == null ? void 0 : t.hasAccess("cau")) || !1);
2002
+ const { lang: s } = P(), n = d(() => {
2003
+ var i;
2004
+ return (i = s.value.ts) == null ? void 0 : i.controls.camera.iconTitle;
2005
+ }), { click: o, selected: r } = _({
2017
2006
  options: Y,
2018
2007
  tab: Y
2019
2008
  });
2020
- function i() {
2021
- const a = {
2009
+ function a() {
2010
+ const i = {
2022
2011
  // hasAccess: hasAccess.value,
2023
2012
  selected: r.value,
2024
- onClick: n,
2013
+ onClick: o,
2025
2014
  // onBlockAccess: block,
2026
2015
  size: e.size,
2027
2016
  name: "cameraAngle",
2028
2017
  "data-id": Y,
2029
2018
  icon: "f_camera_angle",
2030
2019
  type: "none",
2031
- label: s.value
2020
+ label: n.value
2032
2021
  };
2033
- return u(te, a, () => []);
2022
+ return u(q, i, () => []);
2034
2023
  }
2035
- return () => i();
2024
+ return () => a();
2036
2025
  }
2037
- });
2038
- v({
2039
- name: "TsAdjustmentsButton",
2026
+ }), rn = g({
2027
+ name: "TsRelatedButton",
2040
2028
  props: { size: String },
2041
- setup(e, {}) {
2042
- const t = f(), { lang: o } = B(), s = m(() => {
2043
- var l;
2044
- return (l = o.value.ts) == null ? void 0 : l.controls.related.title;
2045
- }), n = !0, { click: r, selected: i } = F({
2046
- options: ce,
2047
- tab: ce
2029
+ setup(e) {
2030
+ const t = f(), { lang: s } = P(), n = d(
2031
+ () => {
2032
+ var c, l;
2033
+ return ((l = (c = s.value.ts) == null ? void 0 : c.controls.related) == null ? void 0 : l.iconTitle) || "Related";
2034
+ }
2035
+ ), { click: o, selected: r } = _({
2036
+ options: ee,
2037
+ tab: ee
2048
2038
  });
2049
- function a(l) {
2050
- return t.block(l);
2039
+ function a(c) {
2040
+ return t.block(c);
2051
2041
  }
2052
- function c() {
2053
- const l = {
2054
- hasAccess: n.value,
2055
- selected: i.value,
2056
- onClick: r,
2042
+ function i() {
2043
+ const c = {
2044
+ hasAccess: !0,
2045
+ selected: r.value,
2046
+ onClick: o,
2057
2047
  onBlockAccess: a,
2058
- "data-id": ce,
2048
+ "data-id": ee,
2059
2049
  size: e.size,
2060
2050
  name: "related",
2061
- type: "borderless",
2062
- lalbel: s.value
2051
+ icon: "f_related",
2052
+ type: "none",
2053
+ label: n.value
2063
2054
  };
2064
- return u(te, l, () => []);
2055
+ return u(q, c, () => []);
2065
2056
  }
2066
- return () => c();
2057
+ return () => i();
2067
2058
  }
2068
- });
2069
- v({
2070
- name: "TsSettingsButton",
2059
+ }), an = g({
2060
+ name: "TsSavedButton",
2071
2061
  props: { size: String },
2072
- setup(e, {}) {
2073
- const t = f(), o = !0, { click: s, selected: n } = F({
2074
- options: He,
2075
- tab: He
2062
+ setup(e) {
2063
+ const t = f(), { lang: s } = P(), n = d(
2064
+ () => {
2065
+ var c, l;
2066
+ return ((l = (c = s.value.ts) == null ? void 0 : c.controls.saved) == null ? void 0 : l.iconTitle) || "Saved";
2067
+ }
2068
+ ), { click: o, selected: r } = _({
2069
+ options: ie,
2070
+ tab: ie
2076
2071
  });
2077
- function r(a) {
2078
- return t.block(a);
2072
+ function a(c) {
2073
+ return t.block(c);
2079
2074
  }
2080
2075
  function i() {
2081
- const a = {
2082
- hasAccess: o.value,
2083
- selected: n.value,
2084
- onClick: s,
2085
- onBlockAccess: r,
2076
+ const c = {
2077
+ hasAccess: !0,
2078
+ selected: r.value,
2079
+ onClick: o,
2080
+ onBlockAccess: a,
2081
+ "data-id": ie,
2086
2082
  size: e.size,
2087
- "data-id": He,
2088
- name: "settings",
2089
- icon: "f_settings"
2083
+ name: "saved",
2084
+ icon: "f_save",
2085
+ type: "none",
2086
+ label: n.value
2090
2087
  };
2091
- return u(bt, a, () => []);
2088
+ return u(q, c, () => []);
2092
2089
  }
2093
2090
  return () => i();
2094
2091
  }
2095
- });
2096
- const lo = v({
2092
+ }), cn = g({
2097
2093
  name: "TsSpinTool",
2098
2094
  props: {
2099
2095
  noIcons: Boolean
2100
2096
  },
2101
2097
  emits: ["click", "update:modelValue"],
2102
- setup(e, { slots: t, emit: o }) {
2103
- const s = ve(), n = E(-1), r = m(() => s.property("animating", !1)), i = m(() => s.property("index"));
2104
- m(() => s.property("max"));
2105
- const a = m({
2106
- get: () => r.value ? n.value : s.property("frame"),
2098
+ setup(e, { slots: t, emit: s }) {
2099
+ const n = ge(), o = A(-1), r = d(() => n.property("animating", !1)), a = d(() => n.property("index"));
2100
+ d(() => n.property("max"));
2101
+ const i = d({
2102
+ get: () => r.value ? o.value : n.property("frame"),
2107
2103
  set: (l) => {
2108
- const d = Math.abs(n.value - l);
2109
- if (d !== 0) {
2110
- if (d > 1) {
2111
- s.spinToFrame({
2104
+ const m = Math.abs(o.value - l);
2105
+ if (m !== 0) {
2106
+ if (m > 1) {
2107
+ n.spinToFrame({
2112
2108
  value: l,
2113
2109
  duration: 250
2114
- }), n.value = l;
2110
+ }), o.value = l;
2115
2111
  return;
2116
2112
  }
2117
- s.setFrame(l), n.value = l;
2113
+ n.setFrame(l), o.value = l;
2118
2114
  }
2119
2115
  }
2120
2116
  });
2121
2117
  function c() {
2122
2118
  const l = {
2123
2119
  class: "ts-spin-tool",
2124
- modelValue: a.value,
2125
- "onUpdate:modelValue": (d) => a.value = d,
2126
- initial: i.value,
2120
+ modelValue: i.value,
2121
+ "onUpdate:modelValue": (m) => i.value = m,
2122
+ initial: a.value,
2127
2123
  type: "spin",
2128
2124
  noIcons: e.noIcons
2129
2125
  };
2130
- return u(De, l);
2126
+ return u(we, l);
2131
2127
  }
2132
2128
  return () => c();
2133
2129
  }
2134
- }), uo = v({
2130
+ }), ln = g({
2135
2131
  name: "TsZoomTool",
2136
2132
  props: {
2137
2133
  noIcons: Boolean
2138
2134
  },
2139
2135
  emits: ["click", "onUpdate:modelValue"],
2140
- setup(e, { slots: t, emit: o }) {
2141
- const s = ne(), n = E(-1), r = m({
2142
- get: () => s.property("zoom") || 1,
2143
- set: (a) => {
2144
- const c = Math.abs(n.value - a);
2136
+ setup(e, { slots: t, emit: s }) {
2137
+ const n = me(), o = A(-1), r = d({
2138
+ get: () => n.property("zoom") || 1,
2139
+ set: (i) => {
2140
+ const c = Math.abs(o.value - i);
2145
2141
  if (c !== 0) {
2146
2142
  if (c > 1) {
2147
2143
  const l = c * 4;
2148
- s.setZoom(a, l), n.value = a;
2144
+ n.setZoom(i, l), o.value = i;
2149
2145
  return;
2150
2146
  }
2151
- s.setZoom(a), n.value = a;
2147
+ n.setZoom(i), o.value = i;
2152
2148
  }
2153
2149
  }
2154
2150
  });
2155
- function i() {
2156
- const a = {
2151
+ function a() {
2152
+ const i = {
2157
2153
  class: "ts-zoom-tool",
2158
2154
  modelValue: r.value,
2159
2155
  "onUpdate:modelValue": (c) => r.value = c,
@@ -2161,18 +2157,17 @@ const lo = v({
2161
2157
  type: "zoom",
2162
2158
  noIcons: e.noIcons
2163
2159
  };
2164
- return u(De, a);
2160
+ return u(we, i);
2165
2161
  }
2166
- return () => i();
2162
+ return () => a();
2167
2163
  }
2168
- }), mo = v({
2164
+ }), un = g({
2169
2165
  name: "TsPositionTool",
2170
- setup(e, { slots: t, emit: o }) {
2171
- function s() {
2166
+ setup(e, { slots: t, emit: s }) {
2167
+ function n() {
2172
2168
  return [
2173
- u(Le),
2174
- u(uo),
2175
- u(lo)
2169
+ u(ln),
2170
+ u(cn)
2176
2171
  // h(Transition, { name: 'slide-fade' }, () => [
2177
2172
  // withDirectives(
2178
2173
  // h('div', { class: 'ts-position-move-holder' }, h(TsMoveTool)),
@@ -2181,550 +2176,477 @@ const lo = v({
2181
2176
  // ]),
2182
2177
  ];
2183
2178
  }
2184
- return () => s();
2179
+ return () => n();
2185
2180
  }
2186
2181
  });
2187
- v({
2182
+ g({
2188
2183
  name: "TsPositionDrawer",
2189
- setup(e, { slots: t, emit: o }) {
2190
- const { lang: s } = B(), n = m(() => {
2191
- var i;
2192
- return (i = s.value.ts) == null ? void 0 : i.controls.positionPose.title;
2184
+ setup(e, { slots: t, emit: s }) {
2185
+ const { lang: n } = P(), o = d(() => {
2186
+ var a;
2187
+ return (a = n.value.ts) == null ? void 0 : a.controls.positionPose.title;
2193
2188
  });
2194
2189
  function r() {
2195
- const i = {
2190
+ const a = {
2196
2191
  class: "ts-position-drawer",
2197
- name: Ae,
2198
- label: n.value
2192
+ name: cs,
2193
+ label: o.value
2199
2194
  };
2200
- return u(se, i, () => u(mo));
2195
+ return u(W, a, () => u(un));
2201
2196
  }
2202
2197
  return () => r();
2203
2198
  }
2204
2199
  });
2205
- const po = v({
2200
+ const dn = g({
2206
2201
  name: "TsSkinButton",
2207
2202
  emits: ["click"],
2208
- setup(e, { slots: t, emit: o }) {
2209
- const s = f(), n = M(), r = j(), i = oe(), { lang: a } = B(), { getPoseThumbnail: c } = Be(), { click: l, selected: d } = F({
2203
+ setup(e, { slots: t, emit: s }) {
2204
+ const n = f(), o = M(), r = j(), a = se(), { lang: i } = P(), { getPoseThumbnail: c } = Pe(), { click: l, selected: m } = _({
2210
2205
  store: r,
2211
2206
  options: Q,
2212
2207
  tab: Q
2213
- }), h = m(() => {
2214
- var S;
2215
- return (S = a.value.ts) == null ? void 0 : S.controls.effects.iconTitle;
2216
- }), g = m(() => i.property("uuid")), k = m(() => n.property("currentSlug"));
2217
- m(() => r.id === 3 ? "negative" : "silhouette"), m(() => r.id === 3 ? s.color : s.backgroundColor);
2218
- const I = m(() => {
2219
- if (g.value)
2208
+ }), h = d(() => {
2209
+ var v;
2210
+ return (v = i.value.ts) == null ? void 0 : v.controls.effects.iconTitle;
2211
+ }), k = d(() => a.property("uuid")), I = d(() => o.property("currentSlug"));
2212
+ d(() => r.id === 3 ? "negative" : "silhouette"), d(() => r.id === 3 ? n.color : n.backgroundColor);
2213
+ const D = d(() => {
2214
+ if (k.value)
2220
2215
  return c({
2221
- uuid: g.value,
2222
- image: k.value,
2216
+ uuid: k.value,
2217
+ image: I.value,
2223
2218
  effect: "negative",
2224
2219
  color: "000000"
2225
2220
  });
2226
2221
  });
2227
2222
  function w() {
2228
- const S = {
2223
+ const v = {
2229
2224
  class: "ts-effects-button",
2230
- image: I.value,
2225
+ image: D.value,
2231
2226
  key: h.value,
2232
2227
  label: h.value,
2233
2228
  type: "none",
2234
- selected: d.value,
2229
+ selected: m.value,
2235
2230
  "data-id": Q,
2236
2231
  onClick: l
2237
2232
  };
2238
- return u(te, S, () => []);
2233
+ return u(q, v, () => []);
2239
2234
  }
2240
2235
  return () => w();
2241
2236
  }
2242
- }), fo = v({
2237
+ }), mn = g({
2243
2238
  name: "TsDefaultDrawer",
2244
2239
  props: {},
2245
2240
  emits: ["click"],
2246
- setup(e, { slots: t, emit: o }) {
2247
- const s = f(), n = "q-ma-xs";
2248
- function r(i) {
2241
+ setup() {
2242
+ const e = f(), t = "q-ma-xs";
2243
+ function s(n) {
2249
2244
  return {
2250
- class: n,
2245
+ class: t,
2251
2246
  size: "sm",
2252
- onClick: () => s.setActive(i)
2247
+ onClick: () => e.setActive(n)
2253
2248
  };
2254
2249
  }
2255
2250
  return () => u(
2256
- se,
2257
- { name: vt },
2251
+ W,
2252
+ { name: pt },
2258
2253
  {
2259
- default: () => u(nt, {}, () => [
2260
- u(ro, r(Te)),
2261
- u(po, r(Q)),
2262
- u(co, r(Y)),
2263
- u(ao, r(J)),
2254
+ default: () => u(Qe, {}, () => [
2255
+ u(tn, s(ke)),
2256
+ u(dn, s(Q)),
2257
+ u(on, s(Y)),
2258
+ u(sn, s(J)),
2264
2259
  // h(TsPositionButton, getButtonData(POSITION)),
2265
- u(io, r(Ie))
2266
- // h(TsRelatedButton, getButtonData(RELATED)),
2260
+ u(nn, s(be)),
2261
+ u(rn, s(ee)),
2262
+ u(an, s(ie))
2267
2263
  // h(TsSettingsButton, getButtonData(SETTINGS)),
2268
2264
  ]),
2269
- secondary: () => u(zt, {})
2265
+ secondary: () => u(Bt, {})
2270
2266
  }
2271
2267
  );
2272
2268
  }
2273
- }), ho = v({
2269
+ }), pn = g({
2274
2270
  name: "TsGridDrawer",
2275
- setup(e, { slots: t, emit: o }) {
2276
- const { lang: s } = B(), n = m(() => {
2277
- var i;
2278
- return (i = s.value.ts) == null ? void 0 : i.controls.grid.title;
2271
+ setup(e, { slots: t, emit: s }) {
2272
+ const { lang: n } = P(), o = d(() => {
2273
+ var a;
2274
+ return (a = n.value.ts) == null ? void 0 : a.controls.grid.title;
2279
2275
  });
2280
2276
  function r() {
2281
- const i = {
2277
+ const a = {
2282
2278
  class: "ts-grid-drawer",
2283
2279
  name: J,
2284
- label: n.value
2280
+ label: o.value
2285
2281
  };
2286
- return u(se, i, () => u(Bt));
2282
+ return u(W, a, () => u(Tt));
2287
2283
  }
2288
2284
  return () => r();
2289
2285
  }
2290
- }), go = v({
2286
+ }), fn = g({
2291
2287
  name: "TsRelatedDrawer",
2292
- setup(e, { slots: t, emit: o }) {
2293
- const { lang: s } = B(), n = m(() => {
2294
- var i;
2295
- return (i = s.value.ts) == null ? void 0 : i.controls.related.title;
2288
+ setup(e, { slots: t, emit: s }) {
2289
+ const { lang: n } = P(), o = d(() => {
2290
+ var a;
2291
+ return (a = n.value.ts) == null ? void 0 : a.controls.related.title;
2296
2292
  });
2297
2293
  function r() {
2298
- const i = {
2294
+ const a = {
2299
2295
  class: "ts-related-drawer",
2300
- name: ce,
2301
- label: n.value
2296
+ name: ee,
2297
+ label: o.value
2302
2298
  };
2303
- return u(se, i, () => u(xt));
2299
+ return u(W, a, () => u(wt));
2304
2300
  }
2305
2301
  return () => r();
2306
2302
  }
2307
- }), vo = v({
2303
+ }), hn = g({
2304
+ name: "TsSavedDrawer",
2305
+ setup() {
2306
+ const { lang: e } = P(), t = d(() => {
2307
+ var n, o;
2308
+ return ((o = (n = e.value.ts) == null ? void 0 : n.controls.saved) == null ? void 0 : o.title) || "Saved";
2309
+ });
2310
+ function s() {
2311
+ const n = {
2312
+ class: "ts-saved-drawer",
2313
+ name: ie,
2314
+ label: t.value
2315
+ };
2316
+ return u(W, n, () => u(Dt));
2317
+ }
2318
+ return () => s();
2319
+ }
2320
+ }), gn = g({
2308
2321
  name: "TsSkinDrawer",
2309
- setup(e, { slots: t, emit: o }) {
2310
- const { lang: s } = B(), n = m(() => {
2311
- var i;
2312
- return (i = s.value.ts) == null ? void 0 : i.controls.skins.title;
2322
+ setup(e, { slots: t, emit: s }) {
2323
+ const { lang: n } = P(), o = d(() => {
2324
+ var a;
2325
+ return (a = n.value.ts) == null ? void 0 : a.controls.skins.title;
2313
2326
  });
2314
2327
  function r() {
2315
- const i = {
2328
+ const a = {
2316
2329
  class: "ts-skin-drawer",
2317
- name: Te,
2318
- label: n.value
2330
+ name: ke,
2331
+ label: o.value
2319
2332
  };
2320
- return u(se, i, () => u(Et));
2333
+ return u(W, a, () => u(Pt));
2321
2334
  }
2322
2335
  return () => r();
2323
2336
  }
2324
- }), So = v({
2337
+ }), vn = g({
2325
2338
  name: "TsEffectsDrawer",
2326
- setup(e, { slots: t, emit: o }) {
2327
- const { lang: s } = B(), n = m(() => {
2328
- var i;
2329
- return (i = s.value.ts) == null ? void 0 : i.controls.effects.title;
2339
+ setup(e, { slots: t, emit: s }) {
2340
+ const { lang: n } = P(), o = d(() => {
2341
+ var a;
2342
+ return (a = n.value.ts) == null ? void 0 : a.controls.effects.title;
2330
2343
  });
2331
2344
  function r() {
2332
- const i = {
2345
+ const a = {
2333
2346
  class: "ts-effects-drawer",
2334
2347
  name: Q,
2335
- label: n.value
2348
+ label: o.value
2336
2349
  };
2337
- return u(se, i, () => u(Pt, { size: "sm" }));
2350
+ return u(W, a, () => u(It, { size: "sm" }));
2338
2351
  }
2339
2352
  return () => r();
2340
2353
  }
2341
- }), yo = v({
2354
+ }), Sn = g({
2342
2355
  name: "TsDrawers",
2343
- setup(e, { slots: t, emit: o }) {
2344
- const s = f(), { active: n } = b(s);
2345
- function r() {
2346
- const i = {
2347
- modelValue: n.value,
2348
- "onUpdate:modelValue": (a) => n.value = a
2356
+ setup() {
2357
+ const e = f(), { active: t } = y(e);
2358
+ function s() {
2359
+ const n = {
2360
+ modelValue: t.value,
2361
+ "onUpdate:modelValue": (o) => t.value = o
2349
2362
  };
2350
- return u(vs, i, () => [
2351
- u(fo),
2352
- u(vo),
2353
- u(So),
2354
- u(no),
2355
- u(oo),
2356
- u(ho),
2357
- u(go)
2363
+ return u(ms, n, () => [
2364
+ u(mn),
2365
+ u(gn),
2366
+ u(vn),
2367
+ u(en),
2368
+ u(Js),
2369
+ u(pn),
2370
+ u(fn),
2371
+ u(hn)
2358
2372
  ]);
2359
2373
  }
2360
- return () => r();
2374
+ return () => s();
2361
2375
  }
2362
- }), ko = v({
2376
+ }), yn = g({
2363
2377
  name: "PoseImage",
2364
2378
  setup() {
2365
- const e = $(), t = ue(), o = oe(), s = ne(), { brightness: n, contrast: r, saturate: i } = b(e), { filterStyle: a } = ot({ brightness: n, contrast: r, saturate: i }), c = m(() => t.image), l = m(() => t.largeImage), d = m(() => o.flipped), h = m(() => s.property("imageSize")), g = E(null), k = m(() => {
2366
- const S = c.value, T = l.value, _ = f(), { isKinetic: z } = b(_);
2367
- return !S || !S.url ? process.env.CLEAR_IMAGE : h.value.width <= 900 || z.value ? S.url : T.status === Fe ? T.url : (T.status !== be && T.failCount < 4 && t.loadImage(T.url), S.url);
2379
+ const e = U(), t = le(), s = se(), n = me(), { brightness: o, contrast: r, saturate: a } = y(e), { filterStyle: i } = Ye({ brightness: o, contrast: r, saturate: a }), c = d(() => t.image), l = d(() => t.largeImage), m = d(() => s.flipped), h = d(() => n.property("imageSize")), k = A(null), I = d(() => {
2380
+ const v = c.value, b = l.value, F = f(), { isKinetic: E } = y(F);
2381
+ return !v || !v.url ? process.env.CLEAR_IMAGE : h.value.width <= 900 || E.value ? v.url : b.status === Ee ? b.url : (b.status !== ye && b.failCount < 4 && t.loadImage(b.url), v.url);
2368
2382
  });
2369
- X(
2370
- () => a.value,
2371
- (S) => {
2372
- g.value && (g.value.style = S);
2383
+ Z(
2384
+ () => i.value,
2385
+ (v) => {
2386
+ k.value && (k.value.style = v);
2373
2387
  }
2374
2388
  );
2375
- const I = m(() => ({
2389
+ const D = d(() => ({
2376
2390
  unselectable: !0,
2377
2391
  "pose-image": !0,
2378
- "flip-horizontal": d.value
2392
+ "flip-horizontal": m.value
2379
2393
  }));
2380
2394
  function w() {
2381
- const S = {
2382
- class: I.value,
2383
- src: k.value,
2384
- ref: g
2395
+ const v = {
2396
+ class: D.value,
2397
+ src: I.value,
2398
+ ref: k
2385
2399
  };
2386
- return u("img", S, []);
2400
+ return u("img", v, []);
2387
2401
  }
2388
2402
  return () => w();
2389
2403
  }
2390
- }), bo = {
2404
+ }), bn = {
2391
2405
  __name: "ImageHolder",
2392
2406
  setup(e) {
2393
- const t = $(), o = ne(), s = j(), { brightness: n, contrast: r, saturate: i } = b(t), { filterStyle: a } = ot({ brightness: n, contrast: r, saturate: i }), { slug: c } = b(s), l = m(() => o.property("animate")), d = m(() => o.property("imagePoint")), h = m(() => o.property("imageSize")), g = m(() => o.property("size")), k = m(() => Object.assign({}, a.value, {
2394
- left: d.value.left + "px",
2395
- top: d.value.top + "px",
2407
+ const t = U(), s = me(), n = j(), { brightness: o, contrast: r, saturate: a } = y(t), { filterStyle: i } = Ye({ brightness: o, contrast: r, saturate: a }), { slug: c } = y(n), l = d(() => s.property("animate")), m = d(() => s.property("imagePoint")), h = d(() => s.property("imageSize")), k = d(() => s.property("size")), I = d(() => Object.assign({}, i.value, {
2408
+ left: m.value.left + "px",
2409
+ top: m.value.top + "px",
2396
2410
  width: h.value.width + "px",
2397
2411
  height: h.value.height + "px"
2398
2412
  }));
2399
- E(null);
2400
- const I = E(null);
2401
- X([() => d.value, () => h.value, () => g.value], () => {
2413
+ A(null);
2414
+ const D = A(null);
2415
+ Z([() => m.value, () => h.value, () => k.value], () => {
2402
2416
  w();
2403
2417
  });
2404
2418
  const w = () => {
2405
- l.value && o.setProperty("animate", !1);
2419
+ l.value && s.setProperty("animate", !1);
2406
2420
  };
2407
- return (S, T) => (_e(), Rt("div", {
2421
+ return (v, b) => (Ge(), Ot("div", {
2408
2422
  class: "image-holder unselectable",
2409
- style: qt(k.value),
2423
+ style: Rt(I.value),
2410
2424
  id: "image-holder",
2411
2425
  ref_key: "imageholder",
2412
- ref: I
2426
+ ref: D
2413
2427
  }, [
2414
- L(ae(ko))
2428
+ Ce(re(yn))
2415
2429
  ], 4));
2416
2430
  }
2417
- }, Io = {
2418
- __name: "UnlockModal",
2419
- setup(e) {
2420
- const t = f(), { lockedModal: o } = b(t), s = m({
2421
- get: () => o.value,
2422
- set: (a) => t.setLockedModal(a)
2423
- }), n = E(!0), r = m(() => n.value ? "f_lock" : "f_unlock"), i = () => {
2424
- n.value = !1, setTimeout(() => {
2425
- s.value = !1, n.value = !0, t.unlock();
2426
- }, 400);
2427
- };
2428
- return (a, c) => {
2429
- const l = ye("q-card-section"), d = ye("q-btn"), h = ye("q-card-actions"), g = ye("q-card"), k = ye("q-dialog"), I = Zt("close-popup");
2430
- return _e(), Ye(k, {
2431
- modelValue: s.value,
2432
- "onUpdate:modelValue": c[0] || (c[0] = (w) => s.value = w),
2433
- class: "unlock-modal"
2434
- }, {
2435
- default: H(() => [
2436
- L(g, {
2437
- style: { width: "290px" },
2438
- class: "text-center"
2439
- }, {
2440
- default: H(() => [
2441
- L(l, null, {
2442
- default: H(() => [...c[1] || (c[1] = [
2443
- Ee("div", { class: "text-h6 text-uppercase text-primary" }, "Locked Pose", -1),
2444
- Ee("div", null, [
2445
- lt(" You have locked your pose."),
2446
- Ee("br"),
2447
- lt(" Interaction is disabled ")
2448
- ], -1)
2449
- ])]),
2450
- _: 1
2451
- }),
2452
- L(l, {
2453
- class: "q-pt-none",
2454
- color: "primary"
2455
- }, {
2456
- default: H(() => [
2457
- L(d, {
2458
- size: "50px",
2459
- round: "",
2460
- outline: "",
2461
- unelevated: "",
2462
- color: "primary",
2463
- icon: r.value,
2464
- onClick: i
2465
- }, null, 8, ["icon"])
2466
- ]),
2467
- _: 1
2468
- }),
2469
- c[2] || (c[2] = Ee("div", { style: { height: "25px" } }, null, -1)),
2470
- L(h, {
2471
- align: "center",
2472
- class: "bg-white text-primary"
2473
- }, {
2474
- default: H(() => [
2475
- tt(L(d, {
2476
- unelevated: "",
2477
- outline: "",
2478
- label: "Cancel",
2479
- "data-cy": "ts-button-unlock-cancel"
2480
- }, null, 512), [
2481
- [I]
2482
- ]),
2483
- L(d, {
2484
- unelevated: "",
2485
- color: "primary",
2486
- label: "Unlock",
2487
- onClick: i,
2488
- "data-cy": "ts-button-unlock"
2489
- })
2490
- ]),
2491
- _: 1
2492
- })
2493
- ]),
2494
- _: 1
2495
- })
2496
- ]),
2497
- _: 1
2498
- }, 8, ["modelValue"]);
2499
- };
2500
- }
2501
- }, To = v({
2431
+ }, kn = g({
2502
2432
  name: "TsViewer",
2503
2433
  setup() {
2504
- const e = $(), t = f(), o = j(), s = de(), n = ue(), r = oe(), i = M(), a = ne(), c = ps(), { brightness: l, contrast: d, saturate: h } = b(e), { id: g } = b(t), { ready: k } = b(r), { accessibleSkins: I, percentage: w } = b(i), { slug: S } = b(o), { filterStyle: T } = ot({ brightness: l, contrast: d, saturate: h }), _ = ee("authenticated"), { imagePoint: z, imageSize: O, viewportSize: A } = b(a), { spacing: G, horizontal: N, vertical: x, visible: D } = b(s), W = E(null), V = E(null), K = (U) => {
2505
- a.setZoomFromResize(U), console.log("resizeViewport", U);
2506
- }, me = () => {
2507
- k.value && g.value !== 0 && a.initZoomFromElement(W.value);
2434
+ const e = U(), t = f(), s = j(), n = ue(), o = le(), r = se(), a = M(), i = me(), c = ls(), { brightness: l, contrast: m, saturate: h } = y(e), { id: k } = y(t), { ready: I } = y(r), { accessibleSkins: D, percentage: w } = y(a), { slug: v } = y(s), { filterStyle: b } = Ye({ brightness: l, contrast: m, saturate: h }), F = te("authenticated"), { imagePoint: E, imageSize: $, viewportSize: x } = y(i), { spacing: H, horizontal: R, vertical: z, visible: B } = y(n), X = A(null), V = A(null), K = (O) => {
2435
+ i.setZoomFromResize(O), console.log("resizeViewport", O);
2436
+ }, pe = () => {
2437
+ I.value && k.value !== 0 && i.initZoomFromElement(X.value);
2508
2438
  };
2509
- X(
2510
- () => _.value,
2511
- (U) => {
2512
- if (U) {
2513
- n.loadSkin();
2439
+ Z(
2440
+ () => F.value,
2441
+ (O) => {
2442
+ if (O) {
2443
+ o.loadSkin();
2514
2444
  return;
2515
2445
  }
2516
- i.setProperty("id", 1);
2446
+ a.setProperty("id", 1);
2517
2447
  }
2518
- ), X(
2519
- () => I.value,
2520
- (U, xe) => {
2521
- U.length > xe.length && n.loadSkin();
2448
+ ), Z(
2449
+ () => D.value,
2450
+ (O, Oe) => {
2451
+ O.length > Oe.length && o.loadSkin();
2522
2452
  }
2523
- ), X(
2524
- () => [g.value, k.value],
2525
- ([U, xe]) => {
2526
- me();
2453
+ ), Z(
2454
+ () => [k.value, I.value],
2455
+ () => {
2456
+ pe();
2527
2457
  }
2528
- ), fs(), Me(() => {
2529
- Gt(() => c.$on("resize", K)), me(), n.loadSkin();
2530
- }), st(() => {
2458
+ ), us(), ze(() => {
2459
+ Kt(() => c.$on("resize", K)), pe(), o.loadSkin();
2460
+ }), Xe(() => {
2531
2461
  c.$off("resize", K);
2532
2462
  });
2533
- const $e = m(
2534
- () => "three-sixty-viewer flex-center unselectable image-background " + S.value
2535
- ), Oe = m(() => "image-background " + S.value), Ne = {
2536
- class: $e.value,
2537
- ref: W
2538
- }, Ke = m(() => ({
2463
+ const Me = d(
2464
+ () => "three-sixty-viewer flex-center unselectable image-background " + v.value
2465
+ ), _e = d(() => "image-background " + v.value), Ve = {
2466
+ class: Me.value,
2467
+ ref: X
2468
+ }, je = d(() => ({
2539
2469
  value: w / 100,
2540
2470
  color: "primary",
2541
2471
  class: "loading-bar q-mt-sm"
2542
- })), Re = m(() => ({
2543
- style: T.value,
2472
+ })), Ue = d(() => ({
2473
+ style: b.value,
2544
2474
  ref: V,
2545
- class: Oe.value
2475
+ class: _e.value
2546
2476
  }));
2547
- function qe() {
2548
- const U = {
2549
- imagePoint: z.value,
2550
- imageSize: O.value,
2551
- viewportSize: A.value,
2552
- lines: G.value,
2553
- offsetX: N.value / 100,
2554
- offsetY: x.value / 100,
2555
- visible: D.value,
2477
+ function $e() {
2478
+ const O = {
2479
+ imagePoint: E.value,
2480
+ imageSize: $.value,
2481
+ viewportSize: x.value,
2482
+ lines: H.value,
2483
+ offsetX: R.value / 100,
2484
+ offsetY: z.value / 100,
2485
+ visible: B.value,
2556
2486
  style: "z-index: 4"
2557
2487
  };
2558
- return u("div", Ne, [
2559
- tt(u(Jt, Ke.value), [[ht, w.value !== 100]]),
2560
- u(Io),
2561
- u(Ss, U),
2562
- u(bo),
2563
- u("div", Re.value)
2488
+ return u("div", Ve, [
2489
+ ut(u(qt, je.value), [[dt, w.value !== 100]]),
2490
+ u(ps, O),
2491
+ u(bn),
2492
+ u("div", Ue.value)
2564
2493
  ]);
2565
2494
  }
2566
- return () => qe();
2495
+ return () => $e();
2567
2496
  }
2568
- }), wo = v({
2497
+ }), In = g({
2569
2498
  name: "TsInteractionDetector",
2570
2499
  setup() {
2571
- const e = Symbol.for("user-auth"), t = ee(e), o = f(), s = oe(), n = ve(), r = ne(), { authenticating: i } = b(t), { isLocked: a } = b(o), c = m(() => i.value || a.value), l = E(!1), d = E(null), h = E(void 0), g = E(0), k = E(0), I = E(0), w = E(0), S = E(void 0), T = E(void 0), _ = E(1), z = m(() => r.property("imagePoint")), O = m(() => r.property("immobileHeight")), A = m(() => r.property("immobileWidth"));
2572
- m(() => r.property("maximized"));
2573
- const G = m(() => r.property("minimized")), { flipped: N } = b(s), x = m(() => N.value ? -1 : 1);
2574
- function D() {
2575
- o.setLockedModal();
2576
- }
2577
- X(
2578
- () => x.value,
2500
+ const e = Symbol.for("user-auth"), t = te(e), s = f(), n = se(), o = ge(), r = me(), { authenticating: a } = y(t), { isFrozen: i } = y(s), c = d(() => a.value || i.value), l = A(!1), m = A(null), h = A(void 0), k = A(0), I = A(0), D = A(0), w = A(0), v = A(void 0), b = A(void 0), F = A(1), E = d(() => r.property("imagePoint")), $ = d(() => r.property("immobileHeight")), x = d(() => r.property("immobileWidth")), H = d(() => r.property("minimized")), { flipped: R } = y(n), z = d(() => R.value ? -1 : 1);
2501
+ function B() {
2502
+ i.value && s.pokeFreeze();
2503
+ }
2504
+ Z(i, (p) => {
2505
+ p && o.stopSpin();
2506
+ }), Z(
2507
+ () => z.value,
2579
2508
  (p) => console.log("reverseSpin", p)
2580
2509
  );
2581
- const W = m(() => r.property("size")), V = m({
2582
- get: () => n.property("frame"),
2510
+ const X = d(() => r.property("size")), V = d({
2511
+ get: () => o.property("frame"),
2583
2512
  set: (p) => {
2584
- c.value || n.setFrame(p);
2513
+ c.value || o.setFrame(p);
2585
2514
  }
2586
- }), K = m(() => Math.ceil(W.value.width / (me.value / 1.7))), me = m(() => n.property("renderCount")), $e = m(() => r.property("zoom")), Oe = (p) => {
2587
- if (a.value && D(), !c.value) {
2588
- if ($e.value > 1) {
2515
+ }), K = d(() => Math.ceil(X.value.width / (pe.value / 1.7))), pe = d(() => o.property("renderCount")), Me = d(() => r.property("zoom")), _e = () => {
2516
+ if (B(), !c.value) {
2517
+ if (Me.value > 1) {
2589
2518
  r.animateToZoom(0);
2590
2519
  return;
2591
2520
  }
2592
2521
  r.animateToZoom(100);
2593
2522
  }
2594
- }, Ne = (p) => {
2595
- const y = p.srcEvent.keyCode;
2596
- if (a.value && D(), c.value || (y === 16 && (l.value = !0), y !== 37 && // left
2597
- y !== 38 && // up
2598
- y !== 39 && // right
2599
- y !== 40))
2523
+ }, Ve = (p) => {
2524
+ const S = p.srcEvent.keyCode;
2525
+ if (B(), c.value || (S === 16 && (l.value = !0), S !== 37 && // left
2526
+ S !== 38 && // up
2527
+ S !== 39 && // right
2528
+ S !== 40))
2600
2529
  return;
2601
- let C = 0, P = 0;
2602
- const R = p.srcEvent.shiftKey ? 10 : 1;
2603
- C += y === 37 ? -3 : 0, C += y === 39 ? 3 : 0, P += y === 38 ? -3 : 0, P += y === 40 ? 3 : 0, C = C * R, P = P * R, at({ x: C, y: P });
2604
- }, Ke = (p) => {
2530
+ let T = 0, C = 0;
2531
+ const N = p.srcEvent.shiftKey ? 10 : 1;
2532
+ T += S === 37 ? -3 : 0, T += S === 39 ? 3 : 0, C += S === 38 ? -3 : 0, C += S === 40 ? 3 : 0, T = T * N, C = C * N, tt({ x: T, y: C });
2533
+ }, je = (p) => {
2605
2534
  if (p.key === "Shift") {
2606
2535
  l.value = !1;
2607
2536
  return;
2608
2537
  }
2609
- }, Re = (p) => {
2610
- h.value = void 0, S.value = void 0, g.value = 0, k.value = 0;
2611
- }, qe = (p) => {
2612
- if (a.value && D(), c.value) return;
2613
- const y = p.pointers.length;
2614
- (y === 2 || y === 1 && l.value) && it(p), y === 1 && Ut(p);
2615
- }, U = (p) => {
2616
- T.value = Date.now(), h.value = p.center, S.value = V.value;
2617
- }, xe = (p) => {
2618
- if (a.value && D(), c.value || (it(p), Math.abs(p.scale - _.value) < 0.02)) return;
2619
- const y = p.scale < w.value ? -1 : 1;
2538
+ }, Ue = () => {
2539
+ h.value = void 0, v.value = void 0, k.value = 0, I.value = 0;
2540
+ }, $e = (p) => {
2541
+ if (B(), c.value) return;
2542
+ const S = p.pointers.length;
2543
+ (S === 2 || S === 1 && l.value) && st(p), S === 1 && Mt(p);
2544
+ }, O = (p) => {
2545
+ b.value = Date.now(), h.value = p.center, v.value = V.value;
2546
+ }, Oe = (p) => {
2547
+ if (B(), c.value || (st(p), Math.abs(p.scale - F.value) < 0.02)) return;
2548
+ const S = p.scale < w.value ? -1 : 1;
2620
2549
  w.value = p.scale, r.setZoomFromPointer({
2621
2550
  event: p,
2622
- element: Ze,
2623
- increment: y
2624
- }), _.value = p.scale;
2625
- }, At = (p) => {
2551
+ element: Re,
2552
+ increment: S
2553
+ }), F.value = p.scale;
2554
+ }, Ct = (p) => {
2626
2555
  h.value = p.center;
2627
- }, _t = (p) => {
2628
- if (Date.now() - T.value > 1e3 || (a.value && D(), c.value) || Math.abs(p.velocityX) <= 0.02) return;
2629
- const C = p.velocityX, P = p.deltaX;
2630
- n.spinToFrame({
2631
- value: jt({ distance: P, velocity: C }),
2632
- duration: Vt({ distance: P, velocity: C })
2556
+ }, zt = (p) => {
2557
+ if (Date.now() - b.value > 1e3 || (B(), c.value) || Math.abs(p.velocityX) <= 0.02) return;
2558
+ const T = p.velocityX, C = p.deltaX;
2559
+ o.spinToFrame({
2560
+ value: Ft({ distance: C, velocity: T }),
2561
+ duration: At({ distance: C, velocity: T })
2633
2562
  });
2634
- }, Mt = (p) => {
2635
- a.value && D(), !c.value && n.stopSpin();
2636
- }, Ft = (p) => {
2637
- if (a.value && D(), c.value) return;
2563
+ }, Et = () => {
2564
+ B(), !c.value && o.stopSpin();
2565
+ }, xt = (p) => {
2566
+ if (B(), c.value) return;
2638
2567
  p = p.srcEvent || p, p.preventDefault(), p.stopPropagation();
2639
- const y = p.deltaX, C = p.deltaY, P = 2, R = Math.abs(C) > Math.abs(y) ? 1 : -1;
2640
- (R === 1 && (C > P || C < -P) || p.ctrlKey) && $t(p), R === -1 && (y > P || y < -P) && Lt(p);
2641
- }, Vt = ({ velocity: p, distance: y }) => {
2642
- const C = Qe.newRectFromElement(d.value), P = 1 + Math.abs(y) / C.width;
2643
- return Math.floor(Math.abs(p) * P * 500);
2644
- }, jt = ({ velocity: p, distance: y }) => {
2645
- const C = Qe.newRectFromElement(d.value), P = me.value, R = Math.abs(y) / p / 1e3, Nt = Math.abs(y) / C.width * R, Se = Math.floor(Nt * P), ct = (y < 0 ? -1 : 1) * x.value;
2646
- return ct > 0 && Se < V.value ? Se + P : ct < 0 && Se > V.value ? Se - P : Se;
2647
- }, rt = (p, y) => {
2648
- const C = Math.floor(p / K.value) * y * x.value;
2649
- return (S.value + C) % me.value;
2650
- }, at = ({ x: p, y }) => {
2651
- if (a.value && D(), c.value) return;
2652
- const C = A.value || p === 0 ? z.value.left : z.value.left + p, P = O.value || y === 0 ? z.value.top : z.value.top + y, R = new Z(C, P);
2653
- r.setImagePoint(R);
2654
- }, it = (p) => {
2655
- if (a.value && D(), c.value || G.value)
2568
+ const S = p.deltaX, T = p.deltaY, C = 2, N = Math.abs(T) > Math.abs(S) ? 1 : -1;
2569
+ (N === 1 && (T > C || T < -C) || p.ctrlKey) && Vt(p), N === -1 && (S > C || S < -C) && _t(p);
2570
+ }, At = ({ velocity: p, distance: S }) => {
2571
+ const T = qe.newRectFromElement(m.value), C = 1 + Math.abs(S) / T.width;
2572
+ return Math.floor(Math.abs(p) * C * 500);
2573
+ }, Ft = ({ velocity: p, distance: S }) => {
2574
+ const T = qe.newRectFromElement(m.value), C = pe.value, N = Math.abs(S) / p / 1e3, Ut = Math.abs(S) / T.width * N, ve = Math.floor(Ut * C), nt = (S < 0 ? -1 : 1) * z.value;
2575
+ return nt > 0 && ve < V.value ? ve + C : nt < 0 && ve > V.value ? ve - C : ve;
2576
+ }, et = (p, S) => {
2577
+ const T = Math.floor(p / K.value) * S * z.value;
2578
+ return (v.value + T) % pe.value;
2579
+ }, tt = ({ x: p, y: S }) => {
2580
+ if (B(), c.value) return;
2581
+ const T = x.value || p === 0 ? E.value.left : E.value.left + p, C = $.value || S === 0 ? E.value.top : E.value.top + S, N = new G(T, C);
2582
+ r.setImagePoint(N);
2583
+ }, st = (p) => {
2584
+ if (B(), c.value || H.value)
2656
2585
  return;
2657
- const y = p.deltaX - g.value;
2658
- g.value = p.deltaX;
2659
- const C = p.deltaY - k.value;
2660
- k.value = p.deltaY, at({ x: y, y: C });
2661
- }, Ut = (p) => {
2662
- const y = p.center.x - h.value.x;
2663
- if (Math.abs(y) < K.value || l.value) return;
2664
- const C = p.center.x < h.value.x ? -1 : 1;
2665
- h.value = p.center, V.value = rt(Math.abs(y), C), S.value = V.value;
2666
- }, Lt = (p) => {
2667
- if (a.value && D(), c.value) return;
2668
- const y = p.deltaX - I.value, C = p.deltaX < 0 ? -1 : 1;
2669
- Math.abs(y) < K.value || (I.value = p.deltaX, V.value = rt(Math.abs(y), C), S.value = V.value);
2670
- }, $t = (p) => {
2671
- if (a.value && D(), c.value) return;
2672
- const y = p.deltaY < 0 ? 2 : -2;
2586
+ const S = p.deltaX - k.value;
2587
+ k.value = p.deltaX;
2588
+ const T = p.deltaY - I.value;
2589
+ I.value = p.deltaY, tt({ x: S, y: T });
2590
+ }, Mt = (p) => {
2591
+ const S = p.center.x - h.value.x;
2592
+ if (Math.abs(S) < K.value || l.value) return;
2593
+ const T = p.center.x < h.value.x ? -1 : 1;
2594
+ h.value = p.center, V.value = et(Math.abs(S), T), v.value = V.value;
2595
+ }, _t = (p) => {
2596
+ if (B(), c.value) return;
2597
+ const S = p.deltaX - D.value, T = p.deltaX < 0 ? -1 : 1;
2598
+ Math.abs(S) < K.value || (D.value = p.deltaX, V.value = et(Math.abs(S), T), v.value = V.value);
2599
+ }, Vt = (p) => {
2600
+ if (B(), c.value) return;
2601
+ const S = p.deltaY < 0 ? 2 : -2;
2673
2602
  r.setZoomFromPointer({
2674
2603
  event: p,
2675
- element: Ze,
2676
- increment: y
2604
+ element: Re,
2605
+ increment: S
2677
2606
  });
2678
2607
  };
2679
- let Ze;
2680
- const Ge = new mt(), We = new mt();
2681
- Ge.on({
2682
- swipe: _t,
2683
- wheel: Ft,
2684
- keyup: Ke,
2685
- keydown: Ne,
2686
- pointerdown: Mt
2687
- }), We.on({
2688
- panstart: U,
2689
- panend: Re,
2690
- panmove: qe,
2691
- pinch: xe,
2692
- pinchstart: At,
2693
- doubletap: Oe
2694
- }), Me(() => {
2695
- Ze = document.getElementById("image-holder"), Ge.setElement(d.value), We.setElement(d.value), document.addEventListener(
2608
+ let Re;
2609
+ const Ke = new it(), Ne = new it();
2610
+ Ke.on({
2611
+ swipe: zt,
2612
+ wheel: xt,
2613
+ keyup: je,
2614
+ keydown: Ve,
2615
+ pointerdown: Et
2616
+ }), Ne.on({
2617
+ panstart: O,
2618
+ panend: Ue,
2619
+ panmove: $e,
2620
+ pinch: Oe,
2621
+ pinchstart: Ct,
2622
+ doubletap: _e
2623
+ }), ze(() => {
2624
+ Re = document.getElementById("image-holder"), Ke.setElement(m.value), Ne.setElement(m.value), document.addEventListener(
2696
2625
  "touchmove",
2697
2626
  function(p) {
2698
2627
  p.scale;
2699
2628
  },
2700
- ks ? { passive: !1 } : !1
2629
+ hs ? { passive: !1 } : !1
2701
2630
  );
2702
- }), st(() => {
2703
- Ge.destroy(), We.destroy();
2631
+ }), Xe(() => {
2632
+ Ke.destroy(), Ne.destroy();
2704
2633
  });
2705
- function Ot() {
2634
+ function jt() {
2706
2635
  return u("div", {
2707
2636
  class: "detector",
2708
2637
  id: "detector",
2709
- ref: d
2638
+ ref: m
2710
2639
  }, []);
2711
2640
  }
2712
- return () => Ot();
2641
+ return () => jt();
2713
2642
  }
2714
- }), jo = /* @__PURE__ */ Object.assign({
2643
+ }), An = /* @__PURE__ */ Object.assign({
2715
2644
  name: "TsPage",
2716
2645
  slug: "ts-page",
2717
2646
  inheritAttrs: !1
2718
2647
  }, {
2719
2648
  __name: "TsPage",
2720
- props: /* @__PURE__ */ Xt({
2721
- routeKey: {
2722
- type: String,
2723
- required: !0
2724
- },
2725
- // Forwarded to CToolPage's `drawerPadding` (130px when true, 60px when
2726
- // false). Hosts pass `false` when no top toolbar is present so the right
2727
- // tool drawer's chrome doesn't sit under empty space.
2649
+ props: /* @__PURE__ */ Zt({
2728
2650
  drawerPadding: {
2729
2651
  type: Boolean,
2730
2652
  default: !0
@@ -2735,47 +2657,46 @@ const po = v({
2735
2657
  }),
2736
2658
  emits: ["update:miniState"],
2737
2659
  setup(e) {
2738
- hs();
2739
- const t = gt(), o = Wt(e, "miniState"), s = Symbol.for("ux"), n = Symbol.for("activity-tracking"), r = f(), i = ee(s), a = ee(n, null), { toolDrawer: c } = b(i);
2740
- Me(() => {
2741
- r.active !== Y && (r.active = t.platform.is.mobile ? St : Ve);
2660
+ const t = mt(), s = Nt(e, "miniState"), n = Symbol.for("activity-tracking"), o = f(), r = te(n, null);
2661
+ ze(() => {
2662
+ o.active !== Y && (o.active = t.platform.is.mobile ? ft : xe);
2742
2663
  });
2743
- const l = (d) => {
2744
- d && (a == null || a.trackEvent(Os, {
2745
- pose_id: r.id || null,
2746
- base_pose_id: d
2664
+ const a = (i) => {
2665
+ i && (r == null || r.trackEvent(Vs, {
2666
+ pose_id: o.id || null,
2667
+ base_pose_id: i
2747
2668
  }));
2748
2669
  };
2749
- return Me(async () => {
2750
- a && (await a.beginExplore(), a.trackEvent($s, { from: null, to: "360" }), r.basePoseId && (a.beginSegment(String(r.basePoseId)), l(r.basePoseId)));
2751
- }), X(
2752
- () => r.basePoseId,
2753
- (d, h) => {
2754
- !d || d === h || (a == null || a.beginSegment(String(d)), l(d));
2670
+ return ze(async () => {
2671
+ r && (await r.beginExplore(), r.trackEvent(_s, { from: null, to: "360" }), o.basePoseId && (r.beginSegment(String(o.basePoseId)), a(o.basePoseId)));
2672
+ }), Z(
2673
+ () => o.basePoseId,
2674
+ (i, c) => {
2675
+ !i || i === c || (r == null || r.beginSegment(String(i)), a(i));
2755
2676
  }
2756
- ), st(() => {
2757
- a == null || a.end();
2758
- }), (d, h) => (_e(), Ye(ae(ys), {
2759
- miniState: o.value,
2760
- "onUpdate:miniState": h[0] || (h[0] = (g) => o.value = g),
2677
+ ), Xe(() => {
2678
+ r == null || r.end();
2679
+ }), (i, c) => (Ge(), ot(re(fs), {
2680
+ miniState: s.value,
2681
+ "onUpdate:miniState": c[0] || (c[0] = (l) => s.value = l),
2761
2682
  "drawer-padding": e.drawerPadding,
2762
2683
  title: "360° Viewer"
2763
2684
  }, {
2764
- toolDrawer: H(() => [
2765
- L(ae(so))
2685
+ toolDrawer: Le(() => [
2686
+ Ce(re(Qs))
2766
2687
  ]),
2767
- bottomDrawer: H(() => [
2768
- ae(t).platform.is.mobile ? (_e(), Ye(ae(yo), { key: 0 })) : Ht("", !0)
2688
+ bottomDrawer: Le(() => [
2689
+ re(t).platform.is.mobile ? (Ge(), ot(re(Sn), { key: 0 })) : Lt("", !0)
2769
2690
  ]),
2770
- default: H(() => [
2771
- L(ae(wo)),
2772
- L(ae(To))
2691
+ default: Le(() => [
2692
+ Ce(re(In)),
2693
+ Ce(re(kn))
2773
2694
  ]),
2774
2695
  _: 1
2775
2696
  }, 8, ["miniState", "drawer-padding"]));
2776
2697
  }
2777
2698
  });
2778
2699
  export {
2779
- jo as TsPage,
2700
+ An as TsPage,
2780
2701
  f as use360Store
2781
2702
  };