@design.estate/dees-wcctools 1.2.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist_bundle/bundle.js +1764 -218
  2. package/dist_bundle/bundle.js.map +4 -4
  3. package/dist_ts_demotools/demotools.d.ts +1 -1
  4. package/dist_ts_demotools/demotools.js +86 -38
  5. package/dist_ts_web/00_commitinfo_data.js +1 -1
  6. package/dist_ts_web/elements/wcc-dashboard.d.ts +11 -10
  7. package/dist_ts_web/elements/wcc-dashboard.js +370 -246
  8. package/dist_ts_web/elements/wcc-frame.d.ts +3 -3
  9. package/dist_ts_web/elements/wcc-frame.js +108 -57
  10. package/dist_ts_web/elements/wcc-properties.d.ts +14 -8
  11. package/dist_ts_web/elements/wcc-properties.js +442 -323
  12. package/dist_ts_web/elements/wcc-record-button.d.ts +12 -0
  13. package/dist_ts_web/elements/wcc-record-button.js +165 -0
  14. package/dist_ts_web/elements/wcc-recording-panel.d.ts +42 -0
  15. package/dist_ts_web/elements/wcc-recording-panel.js +1067 -0
  16. package/dist_ts_web/elements/wcc-sidebar.d.ts +7 -5
  17. package/dist_ts_web/elements/wcc-sidebar.js +250 -81
  18. package/dist_ts_web/elements/wcctools.helpers.d.ts +13 -0
  19. package/dist_ts_web/elements/wcctools.helpers.js +26 -1
  20. package/dist_ts_web/index.d.ts +3 -0
  21. package/dist_ts_web/index.js +5 -1
  22. package/dist_ts_web/services/ffmpeg.service.d.ts +42 -0
  23. package/dist_ts_web/services/ffmpeg.service.js +276 -0
  24. package/dist_ts_web/services/mp4.service.d.ts +32 -0
  25. package/dist_ts_web/services/mp4.service.js +139 -0
  26. package/dist_ts_web/services/recorder.service.d.ts +44 -0
  27. package/dist_ts_web/services/recorder.service.js +307 -0
  28. package/dist_watch/bundle.js +2126 -541
  29. package/dist_watch/bundle.js.map +4 -4
  30. package/package.json +8 -8
  31. package/readme.md +133 -141
  32. package/ts_web/00_commitinfo_data.ts +1 -1
  33. package/ts_web/elements/wcc-dashboard.ts +86 -26
  34. package/ts_web/elements/wcc-frame.ts +3 -3
  35. package/ts_web/elements/wcc-properties.ts +53 -9
  36. package/ts_web/elements/wcc-record-button.ts +108 -0
  37. package/ts_web/elements/wcc-recording-panel.ts +978 -0
  38. package/ts_web/elements/wcc-sidebar.ts +133 -22
  39. package/ts_web/elements/wcctools.helpers.ts +31 -0
  40. package/ts_web/index.ts +5 -0
  41. package/ts_web/readme.md +123 -0
  42. package/ts_web/services/recorder.service.ts +393 -0
@@ -4,6 +4,12 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : /* @__PURE__ */ Symbol.for("Symbol." + name);
8
+ var __typeError = (msg) => {
9
+ throw TypeError(msg);
10
+ };
11
+ var __defNormalProp = (obj, key2, value2) => key2 in obj ? __defProp(obj, key2, { enumerable: true, configurable: true, writable: true, value: value2 }) : obj[key2] = value2;
12
+ var __name = (target, value2) => __defProp(target, "name", { value: value2, configurable: true });
7
13
  var __require = /* @__PURE__ */ ((x2) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x2, {
8
14
  get: (a4, b4) => (typeof require !== "undefined" ? require : a4)[b4]
9
15
  }) : x2)(function(x2) {
@@ -33,14 +39,46 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
33
39
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
34
40
  mod
35
41
  ));
36
- var __decorateClass = (decorators, target, key2, kind) => {
37
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key2) : target;
38
- for (var i9 = decorators.length - 1, decorator; i9 >= 0; i9--)
39
- if (decorator = decorators[i9])
40
- result = (kind ? decorator(target, key2, result) : decorator(result)) || result;
41
- if (kind && result) __defProp(target, key2, result);
42
- return result;
42
+ var __decoratorStart = (base) => [, , , __create(base?.[__knownSymbol("metadata")] ?? null)];
43
+ var __decoratorStrings = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"];
44
+ var __expectFn = (fn) => fn !== void 0 && typeof fn !== "function" ? __typeError("Function expected") : fn;
45
+ var __decoratorContext = (kind, name, done, metadata, fns) => ({ kind: __decoratorStrings[kind], name, metadata, addInitializer: (fn) => done._ ? __typeError("Already initialized") : fns.push(__expectFn(fn || null)) });
46
+ var __decoratorMetadata = (array, target) => __defNormalProp(target, __knownSymbol("metadata"), array[3]);
47
+ var __runInitializers = (array, flags, self2, value2) => {
48
+ for (var i9 = 0, fns = array[flags >> 1], n12 = fns && fns.length; i9 < n12; i9++) flags & 1 ? fns[i9].call(self2) : value2 = fns[i9].call(self2, value2);
49
+ return value2;
43
50
  };
51
+ var __decorateElement = (array, flags, name, decorators, target, extra) => {
52
+ var fn, it, done, ctx, access, k3 = flags & 7, s8 = !!(flags & 8), p6 = !!(flags & 16);
53
+ var j2 = k3 > 3 ? array.length + 1 : k3 ? s8 ? 1 : 2 : 0, key2 = __decoratorStrings[k3 + 5];
54
+ var initializers = k3 > 3 && (array[j2 - 1] = []), extraInitializers = array[j2] || (array[j2] = []);
55
+ var desc = k3 && (!p6 && !s8 && (target = target.prototype), k3 < 5 && (k3 > 3 || !p6) && __getOwnPropDesc(k3 < 4 ? target : { get [name]() {
56
+ return __privateGet(this, extra);
57
+ }, set [name](x2) {
58
+ return __privateSet(this, extra, x2);
59
+ } }, name));
60
+ k3 ? p6 && k3 < 4 && __name(extra, (k3 > 2 ? "set " : k3 > 1 ? "get " : "") + name) : __name(target, name);
61
+ for (var i9 = decorators.length - 1; i9 >= 0; i9--) {
62
+ ctx = __decoratorContext(k3, name, done = {}, array[3], extraInitializers);
63
+ if (k3) {
64
+ ctx.static = s8, ctx.private = p6, access = ctx.access = { has: p6 ? (x2) => __privateIn(target, x2) : (x2) => name in x2 };
65
+ if (k3 ^ 3) access.get = p6 ? (x2) => (k3 ^ 1 ? __privateGet : __privateMethod)(x2, target, k3 ^ 4 ? extra : desc.get) : (x2) => x2[name];
66
+ if (k3 > 2) access.set = p6 ? (x2, y4) => __privateSet(x2, target, y4, k3 ^ 4 ? extra : desc.set) : (x2, y4) => x2[name] = y4;
67
+ }
68
+ it = (0, decorators[i9])(k3 ? k3 < 4 ? p6 ? extra : desc[key2] : k3 > 4 ? void 0 : { get: desc.get, set: desc.set } : target, ctx), done._ = 1;
69
+ if (k3 ^ 4 || it === void 0) __expectFn(it) && (k3 > 4 ? initializers.unshift(it) : k3 ? p6 ? extra = it : desc[key2] = it : target = it);
70
+ else if (typeof it !== "object" || it === null) __typeError("Object expected");
71
+ else __expectFn(fn = it.get) && (desc.get = fn), __expectFn(fn = it.set) && (desc.set = fn), __expectFn(fn = it.init) && initializers.unshift(fn);
72
+ }
73
+ return k3 || __decoratorMetadata(array, target), desc && __defProp(target, name, desc), p6 ? k3 ^ 4 ? extra : desc : target;
74
+ };
75
+ var __publicField = (obj, key2, value2) => __defNormalProp(obj, typeof key2 !== "symbol" ? key2 + "" : key2, value2);
76
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
77
+ var __privateIn = (member, obj) => Object(obj) !== obj ? __typeError('Cannot use the "in" operator on this value') : member.has(obj);
78
+ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
79
+ var __privateAdd = (obj, member, value2) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value2);
80
+ var __privateSet = (obj, member, value2, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value2) : member.set(obj, value2), value2);
81
+ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
44
82
 
45
83
  // node_modules/.pnpm/@push.rocks+isounique@1.0.5/node_modules/@push.rocks/isounique/dist_ts/index.js
46
84
  var require_dist_ts = __commonJS({
@@ -416,10 +454,10 @@ var require_TreePosition = __commonJS({
416
454
  var require_TreeIterator = __commonJS({
417
455
  "node_modules/.pnpm/symbol-tree@3.2.4/node_modules/symbol-tree/lib/TreeIterator.js"(exports, module) {
418
456
  "use strict";
419
- var TREE = Symbol();
420
- var ROOT = Symbol();
421
- var NEXT = Symbol();
422
- var ITERATE_FUNC = Symbol();
457
+ var TREE = /* @__PURE__ */ Symbol();
458
+ var ROOT = /* @__PURE__ */ Symbol();
459
+ var NEXT = /* @__PURE__ */ Symbol();
460
+ var ITERATE_FUNC = /* @__PURE__ */ Symbol();
423
461
  var TreeIterator = class {
424
462
  constructor(tree, root6, firstResult, iterateFunction) {
425
463
  this[TREE] = tree;
@@ -5557,7 +5595,7 @@ var require_sweet_scroll = __commonJS({
5557
5595
  hash: null
5558
5596
  };
5559
5597
  this.loop = function(time) {
5560
- var _a = _this, $el = _a.$el, ctx = _a.ctx;
5598
+ var _a14 = _this, $el = _a14.$el, ctx = _a14.ctx;
5561
5599
  if (!ctx.start) {
5562
5600
  ctx.start = time;
5563
5601
  }
@@ -5652,7 +5690,7 @@ var require_sweet_scroll = __commonJS({
5652
5690
  if (!canUseDOM) {
5653
5691
  return;
5654
5692
  }
5655
- var _a = this, $el = _a.$el, ctx = _a.ctx, currentOptions = _a.opts;
5693
+ var _a14 = this, $el = _a14.$el, ctx = _a14.ctx, currentOptions = _a14.opts;
5656
5694
  var $trigger = ctx.$trigger;
5657
5695
  var opts = __assign2({}, currentOptions, options || {});
5658
5696
  var optOffset = opts.offset, vertical = opts.vertical, horizontal = opts.horizontal;
@@ -5691,7 +5729,7 @@ var require_sweet_scroll = __commonJS({
5691
5729
  if ($header) {
5692
5730
  scroll.top = Math.max(0, scroll.top - getSize($header).height);
5693
5731
  }
5694
- var _b = getViewportAndElementSizes($el), viewport = _b.viewport, size = _b.size;
5732
+ var _b2 = getViewportAndElementSizes($el), viewport = _b2.viewport, size = _b2.size;
5695
5733
  scroll.top = vertical ? Math.max(0, Math.min(size.height - viewport.height, scroll.top)) : getScroll($el, "y");
5696
5734
  scroll.left = horizontal ? Math.max(0, Math.min(size.width - viewport.width, scroll.left)) : getScroll($el, "x");
5697
5735
  if (this.hook(opts, "before", scroll, $trigger) === false) {
@@ -5719,7 +5757,7 @@ var require_sweet_scroll = __commonJS({
5719
5757
  if (gotoEnd === void 0) {
5720
5758
  gotoEnd = false;
5721
5759
  }
5722
- var _a = this, $el = _a.$el, ctx = _a.ctx;
5760
+ var _a14 = this, $el = _a14.$el, ctx = _a14.ctx;
5723
5761
  var pos = ctx.pos;
5724
5762
  if (!$el || !ctx.progress) {
5725
5763
  return;
@@ -5775,7 +5813,7 @@ var require_sweet_scroll = __commonJS({
5775
5813
  ctx.id = SweetScroll4.raf(this.loop);
5776
5814
  };
5777
5815
  SweetScroll4.prototype.complete = function() {
5778
- var _a = this, $el = _a.$el, ctx = _a.ctx;
5816
+ var _a14 = this, $el = _a14.$el, ctx = _a14.ctx;
5779
5817
  var hash = ctx.hash, cancel = ctx.cancel, opts = ctx.opts, pos = ctx.pos, $trigger = ctx.$trigger;
5780
5818
  if (!$el || !opts) {
5781
5819
  return;
@@ -5801,18 +5839,18 @@ var require_sweet_scroll = __commonJS({
5801
5839
  for (var _i = 2; _i < arguments.length; _i++) {
5802
5840
  args[_i - 2] = arguments[_i];
5803
5841
  }
5804
- var _a;
5842
+ var _a14;
5805
5843
  var callback = options[type5];
5806
5844
  var callbackResult;
5807
5845
  var methodResult;
5808
5846
  if (isFunction2(callback)) {
5809
5847
  callbackResult = callback.apply(this, args.concat([this]));
5810
5848
  }
5811
- methodResult = (_a = this)["on" + (type5[0].toUpperCase() + type5.slice(1))].apply(_a, args);
5849
+ methodResult = (_a14 = this)["on" + (type5[0].toUpperCase() + type5.slice(1))].apply(_a14, args);
5812
5850
  return callbackResult !== void 0 ? callbackResult : methodResult;
5813
5851
  };
5814
5852
  SweetScroll4.prototype.bind = function(click, stop) {
5815
- var _a = this, $el = _a.$el, opts = _a.ctx.opts;
5853
+ var _a14 = this, $el = _a14.$el, opts = _a14.ctx.opts;
5816
5854
  if ($el) {
5817
5855
  if (click) {
5818
5856
  addEvent($el, CONTAINER_CLICK_EVENT, this.handleClick, false);
@@ -5823,7 +5861,7 @@ var require_sweet_scroll = __commonJS({
5823
5861
  }
5824
5862
  };
5825
5863
  SweetScroll4.prototype.unbind = function(click, stop) {
5826
- var _a = this, $el = _a.$el, opts = _a.ctx.opts;
5864
+ var _a14 = this, $el = _a14.$el, opts = _a14.ctx.opts;
5827
5865
  if ($el) {
5828
5866
  if (click) {
5829
5867
  removeEvent($el, CONTAINER_CLICK_EVENT, this.handleClick, false);
@@ -5844,7 +5882,7 @@ var require_sweet_scroll = __commonJS({
5844
5882
  });
5845
5883
 
5846
5884
  // node_modules/.pnpm/@lit+reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js
5847
- var t = globalThis, e = t.ShadowRoot && (void 0 === t.ShadyCSS || t.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, s = Symbol(), o = /* @__PURE__ */ new WeakMap();
5885
+ var t = globalThis, e = t.ShadowRoot && (void 0 === t.ShadyCSS || t.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, s = /* @__PURE__ */ Symbol(), o = /* @__PURE__ */ new WeakMap();
5848
5886
  var n = class {
5849
5887
  constructor(t8, e10, o12) {
5850
5888
  if (this._$cssResult$ = true, o12 !== s) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
@@ -5912,7 +5950,7 @@ var { is: i2, defineProperty: e2, getOwnPropertyDescriptor: h, getOwnPropertyNam
5912
5950
  }
5913
5951
  return i9;
5914
5952
  } }, f = (t8, s8) => !i2(t8, s8), b = { attribute: true, type: String, converter: u, reflect: false, useDefault: false, hasChanged: f };
5915
- Symbol.metadata ??= Symbol("metadata"), a.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
5953
+ Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), a.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
5916
5954
  var y = class extends HTMLElement {
5917
5955
  static addInitializer(t8) {
5918
5956
  this._$Ei(), (this.l ??= []).push(t8);
@@ -5922,7 +5960,7 @@ var y = class extends HTMLElement {
5922
5960
  }
5923
5961
  static createProperty(t8, s8 = b) {
5924
5962
  if (s8.state && (s8.attribute = false), this._$Ei(), this.prototype.hasOwnProperty(t8) && ((s8 = Object.create(s8)).wrapped = true), this.elementProperties.set(t8, s8), !s8.noAccessor) {
5925
- const i9 = Symbol(), h8 = this.getPropertyDescriptor(t8, i9, s8);
5963
+ const i9 = /* @__PURE__ */ Symbol(), h8 = this.getPropertyDescriptor(t8, i9, s8);
5926
5964
  void 0 !== h8 && e2(this.prototype, t8, h8);
5927
5965
  }
5928
5966
  }
@@ -6098,7 +6136,7 @@ y.elementStyles = [], y.shadowRootOptions = { mode: "open" }, y[d("elementProper
6098
6136
 
6099
6137
  // node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js
6100
6138
  var t2 = globalThis, i3 = t2.trustedTypes, s2 = i3 ? i3.createPolicy("lit-html", { createHTML: (t8) => t8 }) : void 0, e3 = "$lit$", h2 = `lit$${Math.random().toFixed(9).slice(2)}$`, o3 = "?" + h2, n3 = `<${o3}>`, r3 = document, l2 = () => r3.createComment(""), c3 = (t8) => null === t8 || "object" != typeof t8 && "function" != typeof t8, a2 = Array.isArray, u2 = (t8) => a2(t8) || "function" == typeof t8?.[Symbol.iterator], d2 = "[ \n\f\r]", f2 = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, v = /-->/g, _ = />/g, m = RegExp(`>|${d2}(?:([^\\s"'>=/]+)(${d2}*=${d2}*(?:[^
6101
- \f\r"'\`<>=]|("|')|))|$)`, "g"), p2 = /'/g, g = /"/g, $ = /^(?:script|style|textarea|title)$/i, y2 = (t8) => (i9, ...s8) => ({ _$litType$: t8, strings: i9, values: s8 }), x = y2(1), b2 = y2(2), w = y2(3), T = Symbol.for("lit-noChange"), E = Symbol.for("lit-nothing"), A = /* @__PURE__ */ new WeakMap(), C = r3.createTreeWalker(r3, 129);
6139
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), p2 = /'/g, g = /"/g, $ = /^(?:script|style|textarea|title)$/i, y2 = (t8) => (i9, ...s8) => ({ _$litType$: t8, strings: i9, values: s8 }), x = y2(1), b2 = y2(2), w = y2(3), T = /* @__PURE__ */ Symbol.for("lit-noChange"), E = /* @__PURE__ */ Symbol.for("lit-nothing"), A = /* @__PURE__ */ new WeakMap(), C = r3.createTreeWalker(r3, 129);
6102
6140
  function P(t8, i9) {
6103
6141
  if (!a2(t8) || !t8.hasOwnProperty("raw")) throw Error("invalid template strings array");
6104
6142
  return void 0 !== s2 ? s2.createHTML(i9) : i9;
@@ -6603,7 +6641,7 @@ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, e
6603
6641
  done = true;
6604
6642
  }
6605
6643
  ;
6606
- function __runInitializers(thisArg, initializers, value2) {
6644
+ function __runInitializers2(thisArg, initializers, value2) {
6607
6645
  var useValue = arguments.length > 2;
6608
6646
  for (var i9 = 0; i9 < initializers.length; i9++) {
6609
6647
  value2 = useValue ? initializers[i9].call(thisArg, value2) : initializers[i9].call(thisArg);
@@ -6981,7 +7019,7 @@ var tslib_es6_default = {
6981
7019
  __decorate,
6982
7020
  __param,
6983
7021
  __esDecorate,
6984
- __runInitializers,
7022
+ __runInitializers: __runInitializers2,
6985
7023
  __propKey,
6986
7024
  __setFunctionName,
6987
7025
  __metadata,
@@ -7055,7 +7093,7 @@ var Subscription = (function() {
7055
7093
  this._finalizers = null;
7056
7094
  }
7057
7095
  Subscription2.prototype.unsubscribe = function() {
7058
- var e_1, _a, e_2, _b;
7096
+ var e_1, _a14, e_2, _b2;
7059
7097
  var errors;
7060
7098
  if (!this.closed) {
7061
7099
  this.closed = true;
@@ -7072,7 +7110,7 @@ var Subscription = (function() {
7072
7110
  e_1 = { error: e_1_1 };
7073
7111
  } finally {
7074
7112
  try {
7075
- if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1);
7113
+ if (_parentage_1_1 && !_parentage_1_1.done && (_a14 = _parentage_1.return)) _a14.call(_parentage_1);
7076
7114
  } finally {
7077
7115
  if (e_1) throw e_1.error;
7078
7116
  }
@@ -7110,7 +7148,7 @@ var Subscription = (function() {
7110
7148
  e_2 = { error: e_2_1 };
7111
7149
  } finally {
7112
7150
  try {
7113
- if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return)) _b.call(_finalizers_1);
7151
+ if (_finalizers_1_1 && !_finalizers_1_1.done && (_b2 = _finalizers_1.return)) _b2.call(_finalizers_1);
7114
7152
  } finally {
7115
7153
  if (e_2) throw e_2.error;
7116
7154
  }
@@ -7122,7 +7160,7 @@ var Subscription = (function() {
7122
7160
  }
7123
7161
  };
7124
7162
  Subscription2.prototype.add = function(teardown) {
7125
- var _a;
7163
+ var _a14;
7126
7164
  if (teardown && teardown !== this) {
7127
7165
  if (this.closed) {
7128
7166
  execFinalizer(teardown);
@@ -7133,7 +7171,7 @@ var Subscription = (function() {
7133
7171
  }
7134
7172
  teardown._addParent(this);
7135
7173
  }
7136
- (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown);
7174
+ (this._finalizers = (_a14 = this._finalizers) !== null && _a14 !== void 0 ? _a14 : []).push(teardown);
7137
7175
  }
7138
7176
  }
7139
7177
  };
@@ -7252,7 +7290,7 @@ function errorContext(cb) {
7252
7290
  }
7253
7291
  cb();
7254
7292
  if (isRoot) {
7255
- var _a = context, errorThrown = _a.errorThrown, error = _a.error;
7293
+ var _a14 = context, errorThrown = _a14.errorThrown, error = _a14.error;
7256
7294
  context = null;
7257
7295
  if (errorThrown) {
7258
7296
  throw error;
@@ -7483,7 +7521,7 @@ var Observable = (function() {
7483
7521
  var _this = this;
7484
7522
  var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);
7485
7523
  errorContext(function() {
7486
- var _a = _this, operator = _a.operator, source = _a.source;
7524
+ var _a14 = _this, operator = _a14.operator, source = _a14.source;
7487
7525
  subscriber.add(operator ? operator.call(subscriber, source) : source ? _this._subscribe(subscriber) : _this._trySubscribe(subscriber));
7488
7526
  });
7489
7527
  return subscriber;
@@ -7515,8 +7553,8 @@ var Observable = (function() {
7515
7553
  });
7516
7554
  };
7517
7555
  Observable2.prototype._subscribe = function(subscriber) {
7518
- var _a;
7519
- return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);
7556
+ var _a14;
7557
+ return (_a14 = this.source) === null || _a14 === void 0 ? void 0 : _a14.subscribe(subscriber);
7520
7558
  };
7521
7559
  Observable2.prototype[observable] = function() {
7522
7560
  return this;
@@ -7548,8 +7586,8 @@ var Observable = (function() {
7548
7586
  return Observable2;
7549
7587
  })();
7550
7588
  function getPromiseCtor(promiseCtor) {
7551
- var _a;
7552
- return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;
7589
+ var _a14;
7590
+ return (_a14 = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a14 !== void 0 ? _a14 : Promise;
7553
7591
  }
7554
7592
  function isObserver(value2) {
7555
7593
  return value2 && isFunction(value2.next) && isFunction(value2.error) && isFunction(value2.complete);
@@ -7615,11 +7653,11 @@ var OperatorSubscriber = (function(_super) {
7615
7653
  return _this;
7616
7654
  }
7617
7655
  OperatorSubscriber2.prototype.unsubscribe = function() {
7618
- var _a;
7656
+ var _a14;
7619
7657
  if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
7620
7658
  var closed_1 = this.closed;
7621
7659
  _super.prototype.unsubscribe.call(this);
7622
- !closed_1 && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this));
7660
+ !closed_1 && ((_a14 = this.onFinalize) === null || _a14 === void 0 ? void 0 : _a14.call(this));
7623
7661
  }
7624
7662
  };
7625
7663
  return OperatorSubscriber2;
@@ -7660,22 +7698,22 @@ var Subject = (function(_super) {
7660
7698
  Subject2.prototype.next = function(value2) {
7661
7699
  var _this = this;
7662
7700
  errorContext(function() {
7663
- var e_1, _a;
7701
+ var e_1, _a14;
7664
7702
  _this._throwIfClosed();
7665
7703
  if (!_this.isStopped) {
7666
7704
  if (!_this.currentObservers) {
7667
7705
  _this.currentObservers = Array.from(_this.observers);
7668
7706
  }
7669
7707
  try {
7670
- for (var _b = __values(_this.currentObservers), _c = _b.next(); !_c.done; _c = _b.next()) {
7671
- var observer = _c.value;
7708
+ for (var _b2 = __values(_this.currentObservers), _c2 = _b2.next(); !_c2.done; _c2 = _b2.next()) {
7709
+ var observer = _c2.value;
7672
7710
  observer.next(value2);
7673
7711
  }
7674
7712
  } catch (e_1_1) {
7675
7713
  e_1 = { error: e_1_1 };
7676
7714
  } finally {
7677
7715
  try {
7678
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
7716
+ if (_c2 && !_c2.done && (_a14 = _b2.return)) _a14.call(_b2);
7679
7717
  } finally {
7680
7718
  if (e_1) throw e_1.error;
7681
7719
  }
@@ -7716,8 +7754,8 @@ var Subject = (function(_super) {
7716
7754
  };
7717
7755
  Object.defineProperty(Subject2.prototype, "observed", {
7718
7756
  get: function() {
7719
- var _a;
7720
- return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;
7757
+ var _a14;
7758
+ return ((_a14 = this.observers) === null || _a14 === void 0 ? void 0 : _a14.length) > 0;
7721
7759
  },
7722
7760
  enumerable: false,
7723
7761
  configurable: true
@@ -7733,7 +7771,7 @@ var Subject = (function(_super) {
7733
7771
  };
7734
7772
  Subject2.prototype._innerSubscribe = function(subscriber) {
7735
7773
  var _this = this;
7736
- var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers;
7774
+ var _a14 = this, hasError = _a14.hasError, isStopped = _a14.isStopped, observers = _a14.observers;
7737
7775
  if (hasError || isStopped) {
7738
7776
  return EMPTY_SUBSCRIPTION;
7739
7777
  }
@@ -7745,7 +7783,7 @@ var Subject = (function(_super) {
7745
7783
  });
7746
7784
  };
7747
7785
  Subject2.prototype._checkFinalizedStatuses = function(subscriber) {
7748
- var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped;
7786
+ var _a14 = this, hasError = _a14.hasError, thrownError = _a14.thrownError, isStopped = _a14.isStopped;
7749
7787
  if (hasError) {
7750
7788
  subscriber.error(thrownError);
7751
7789
  } else if (isStopped) {
@@ -7771,20 +7809,20 @@ var AnonymousSubject = (function(_super) {
7771
7809
  return _this;
7772
7810
  }
7773
7811
  AnonymousSubject2.prototype.next = function(value2) {
7774
- var _a, _b;
7775
- (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value2);
7812
+ var _a14, _b2;
7813
+ (_b2 = (_a14 = this.destination) === null || _a14 === void 0 ? void 0 : _a14.next) === null || _b2 === void 0 ? void 0 : _b2.call(_a14, value2);
7776
7814
  };
7777
7815
  AnonymousSubject2.prototype.error = function(err) {
7778
- var _a, _b;
7779
- (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);
7816
+ var _a14, _b2;
7817
+ (_b2 = (_a14 = this.destination) === null || _a14 === void 0 ? void 0 : _a14.error) === null || _b2 === void 0 ? void 0 : _b2.call(_a14, err);
7780
7818
  };
7781
7819
  AnonymousSubject2.prototype.complete = function() {
7782
- var _a, _b;
7783
- (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);
7820
+ var _a14, _b2;
7821
+ (_b2 = (_a14 = this.destination) === null || _a14 === void 0 ? void 0 : _a14.complete) === null || _b2 === void 0 ? void 0 : _b2.call(_a14);
7784
7822
  };
7785
7823
  AnonymousSubject2.prototype._subscribe = function(subscriber) {
7786
- var _a, _b;
7787
- return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;
7824
+ var _a14, _b2;
7825
+ return (_b2 = (_a14 = this.source) === null || _a14 === void 0 ? void 0 : _a14.subscribe(subscriber)) !== null && _b2 !== void 0 ? _b2 : EMPTY_SUBSCRIPTION;
7788
7826
  };
7789
7827
  return AnonymousSubject2;
7790
7828
  })(Subject);
@@ -7822,7 +7860,7 @@ var ReplaySubject = (function(_super) {
7822
7860
  return _this;
7823
7861
  }
7824
7862
  ReplaySubject2.prototype.next = function(value2) {
7825
- var _a = this, isStopped = _a.isStopped, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow, _timestampProvider = _a._timestampProvider, _windowTime = _a._windowTime;
7863
+ var _a14 = this, isStopped = _a14.isStopped, _buffer = _a14._buffer, _infiniteTimeWindow = _a14._infiniteTimeWindow, _timestampProvider = _a14._timestampProvider, _windowTime = _a14._windowTime;
7826
7864
  if (!isStopped) {
7827
7865
  _buffer.push(value2);
7828
7866
  !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);
@@ -7834,7 +7872,7 @@ var ReplaySubject = (function(_super) {
7834
7872
  this._throwIfClosed();
7835
7873
  this._trimBuffer();
7836
7874
  var subscription = this._innerSubscribe(subscriber);
7837
- var _a = this, _infiniteTimeWindow = _a._infiniteTimeWindow, _buffer = _a._buffer;
7875
+ var _a14 = this, _infiniteTimeWindow = _a14._infiniteTimeWindow, _buffer = _a14._buffer;
7838
7876
  var copy = _buffer.slice();
7839
7877
  for (var i9 = 0; i9 < copy.length && !subscriber.closed; i9 += _infiniteTimeWindow ? 1 : 2) {
7840
7878
  subscriber.next(copy[i9]);
@@ -7843,7 +7881,7 @@ var ReplaySubject = (function(_super) {
7843
7881
  return subscription;
7844
7882
  };
7845
7883
  ReplaySubject2.prototype._trimBuffer = function() {
7846
- var _a = this, _bufferSize = _a._bufferSize, _timestampProvider = _a._timestampProvider, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow;
7884
+ var _a14 = this, _bufferSize = _a14._bufferSize, _timestampProvider = _a14._timestampProvider, _buffer = _a14._buffer, _infiniteTimeWindow = _a14._infiniteTimeWindow;
7847
7885
  var adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize;
7848
7886
  _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize);
7849
7887
  if (!_infiniteTimeWindow) {
@@ -7904,7 +7942,7 @@ var AsyncAction = (function(_super) {
7904
7942
  return _this;
7905
7943
  }
7906
7944
  AsyncAction2.prototype.schedule = function(state, delay2) {
7907
- var _a;
7945
+ var _a14;
7908
7946
  if (delay2 === void 0) {
7909
7947
  delay2 = 0;
7910
7948
  }
@@ -7919,7 +7957,7 @@ var AsyncAction = (function(_super) {
7919
7957
  }
7920
7958
  this.pending = true;
7921
7959
  this.delay = delay2;
7922
- this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay2);
7960
+ this.id = (_a14 = this.id) !== null && _a14 !== void 0 ? _a14 : this.requestAsyncId(scheduler, this.id, delay2);
7923
7961
  return this;
7924
7962
  };
7925
7963
  AsyncAction2.prototype.requestAsyncId = function(scheduler, _id, delay2) {
@@ -7968,7 +8006,7 @@ var AsyncAction = (function(_super) {
7968
8006
  };
7969
8007
  AsyncAction2.prototype.unsubscribe = function() {
7970
8008
  if (!this.closed) {
7971
- var _a = this, id = _a.id, scheduler = _a.scheduler;
8009
+ var _a14 = this, id = _a14.id, scheduler = _a14.scheduler;
7972
8010
  var actions = scheduler.actions;
7973
8011
  this.work = this.state = this.scheduler = null;
7974
8012
  this.pending = false;
@@ -8103,30 +8141,30 @@ function isIterable(input) {
8103
8141
  // node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js
8104
8142
  function readableStreamLikeToAsyncGenerator(readableStream) {
8105
8143
  return __asyncGenerator(this, arguments, function readableStreamLikeToAsyncGenerator_1() {
8106
- var reader, _a, value2, done;
8107
- return __generator(this, function(_b) {
8108
- switch (_b.label) {
8144
+ var reader, _a14, value2, done;
8145
+ return __generator(this, function(_b2) {
8146
+ switch (_b2.label) {
8109
8147
  case 0:
8110
8148
  reader = readableStream.getReader();
8111
- _b.label = 1;
8149
+ _b2.label = 1;
8112
8150
  case 1:
8113
- _b.trys.push([1, , 9, 10]);
8114
- _b.label = 2;
8151
+ _b2.trys.push([1, , 9, 10]);
8152
+ _b2.label = 2;
8115
8153
  case 2:
8116
8154
  if (false) return [3, 8];
8117
8155
  return [4, __await(reader.read())];
8118
8156
  case 3:
8119
- _a = _b.sent(), value2 = _a.value, done = _a.done;
8157
+ _a14 = _b2.sent(), value2 = _a14.value, done = _a14.done;
8120
8158
  if (!done) return [3, 5];
8121
8159
  return [4, __await(void 0)];
8122
8160
  case 4:
8123
- return [2, _b.sent()];
8161
+ return [2, _b2.sent()];
8124
8162
  case 5:
8125
8163
  return [4, __await(value2)];
8126
8164
  case 6:
8127
- return [4, _b.sent()];
8165
+ return [4, _b2.sent()];
8128
8166
  case 7:
8129
- _b.sent();
8167
+ _b2.sent();
8130
8168
  return [3, 2];
8131
8169
  case 8:
8132
8170
  return [3, 10];
@@ -8201,7 +8239,7 @@ function fromPromise(promise) {
8201
8239
  }
8202
8240
  function fromIterable(iterable) {
8203
8241
  return new Observable(function(subscriber) {
8204
- var e_1, _a;
8242
+ var e_1, _a14;
8205
8243
  try {
8206
8244
  for (var iterable_1 = __values(iterable), iterable_1_1 = iterable_1.next(); !iterable_1_1.done; iterable_1_1 = iterable_1.next()) {
8207
8245
  var value2 = iterable_1_1.value;
@@ -8214,7 +8252,7 @@ function fromIterable(iterable) {
8214
8252
  e_1 = { error: e_1_1 };
8215
8253
  } finally {
8216
8254
  try {
8217
- if (iterable_1_1 && !iterable_1_1.done && (_a = iterable_1.return)) _a.call(iterable_1);
8255
+ if (iterable_1_1 && !iterable_1_1.done && (_a14 = iterable_1.return)) _a14.call(iterable_1);
8218
8256
  } finally {
8219
8257
  if (e_1) throw e_1.error;
8220
8258
  }
@@ -8234,40 +8272,40 @@ function fromReadableStreamLike(readableStream) {
8234
8272
  }
8235
8273
  function process2(asyncIterable, subscriber) {
8236
8274
  var asyncIterable_1, asyncIterable_1_1;
8237
- var e_2, _a;
8275
+ var e_2, _a14;
8238
8276
  return __awaiter(this, void 0, void 0, function() {
8239
8277
  var value2, e_2_1;
8240
- return __generator(this, function(_b) {
8241
- switch (_b.label) {
8278
+ return __generator(this, function(_b2) {
8279
+ switch (_b2.label) {
8242
8280
  case 0:
8243
- _b.trys.push([0, 5, 6, 11]);
8281
+ _b2.trys.push([0, 5, 6, 11]);
8244
8282
  asyncIterable_1 = __asyncValues(asyncIterable);
8245
- _b.label = 1;
8283
+ _b2.label = 1;
8246
8284
  case 1:
8247
8285
  return [4, asyncIterable_1.next()];
8248
8286
  case 2:
8249
- if (!(asyncIterable_1_1 = _b.sent(), !asyncIterable_1_1.done)) return [3, 4];
8287
+ if (!(asyncIterable_1_1 = _b2.sent(), !asyncIterable_1_1.done)) return [3, 4];
8250
8288
  value2 = asyncIterable_1_1.value;
8251
8289
  subscriber.next(value2);
8252
8290
  if (subscriber.closed) {
8253
8291
  return [2];
8254
8292
  }
8255
- _b.label = 3;
8293
+ _b2.label = 3;
8256
8294
  case 3:
8257
8295
  return [3, 1];
8258
8296
  case 4:
8259
8297
  return [3, 11];
8260
8298
  case 5:
8261
- e_2_1 = _b.sent();
8299
+ e_2_1 = _b2.sent();
8262
8300
  e_2 = { error: e_2_1 };
8263
8301
  return [3, 11];
8264
8302
  case 6:
8265
- _b.trys.push([6, , 9, 10]);
8266
- if (!(asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return))) return [3, 8];
8267
- return [4, _a.call(asyncIterable_1)];
8303
+ _b2.trys.push([6, , 9, 10]);
8304
+ if (!(asyncIterable_1_1 && !asyncIterable_1_1.done && (_a14 = asyncIterable_1.return))) return [3, 8];
8305
+ return [4, _a14.call(asyncIterable_1)];
8268
8306
  case 7:
8269
- _b.sent();
8270
- _b.label = 8;
8307
+ _b2.sent();
8308
+ _b2.label = 8;
8271
8309
  case 8:
8272
8310
  return [3, 10];
8273
8311
  case 9:
@@ -8373,11 +8411,11 @@ function scheduleIterable(input, scheduler) {
8373
8411
  executeSchedule(subscriber, scheduler, function() {
8374
8412
  iterator2 = input[iterator]();
8375
8413
  executeSchedule(subscriber, scheduler, function() {
8376
- var _a;
8414
+ var _a14;
8377
8415
  var value2;
8378
8416
  var done;
8379
8417
  try {
8380
- _a = iterator2.next(), value2 = _a.value, done = _a.done;
8418
+ _a14 = iterator2.next(), value2 = _a14.value, done = _a14.done;
8381
8419
  } catch (err) {
8382
8420
  subscriber.error(err);
8383
8421
  return;
@@ -8600,11 +8638,11 @@ function fromEvent(target, eventName, options, resultSelector) {
8600
8638
  if (resultSelector) {
8601
8639
  return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs(resultSelector));
8602
8640
  }
8603
- var _a = __read(isEventTarget(target) ? eventTargetMethods.map(function(methodName) {
8641
+ var _a14 = __read(isEventTarget(target) ? eventTargetMethods.map(function(methodName) {
8604
8642
  return function(handler2) {
8605
8643
  return target[methodName](eventName, handler2, options);
8606
8644
  };
8607
- }) : isNodeStyleEventEmitter(target) ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName)) : isJQueryStyleEventEmitter(target) ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName)) : [], 2), add2 = _a[0], remove2 = _a[1];
8645
+ }) : isNodeStyleEventEmitter(target) ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName)) : isJQueryStyleEventEmitter(target) ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName)) : [], 2), add2 = _a14[0], remove2 = _a14[1];
8608
8646
  if (!add2) {
8609
8647
  if (isArrayLike(target)) {
8610
8648
  return mergeMap(function(subTarget) {
@@ -8722,7 +8760,7 @@ function bufferCount(bufferSize, startBufferEvery) {
8722
8760
  var buffers = [];
8723
8761
  var count2 = 0;
8724
8762
  source.subscribe(createOperatorSubscriber(subscriber, function(value2) {
8725
- var e_1, _a, e_2, _b;
8763
+ var e_1, _a14, e_2, _b2;
8726
8764
  var toEmit = null;
8727
8765
  if (count2++ % startBufferEvery === 0) {
8728
8766
  buffers.push([]);
@@ -8740,7 +8778,7 @@ function bufferCount(bufferSize, startBufferEvery) {
8740
8778
  e_1 = { error: e_1_1 };
8741
8779
  } finally {
8742
8780
  try {
8743
- if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) _a.call(buffers_1);
8781
+ if (buffers_1_1 && !buffers_1_1.done && (_a14 = buffers_1.return)) _a14.call(buffers_1);
8744
8782
  } finally {
8745
8783
  if (e_1) throw e_1.error;
8746
8784
  }
@@ -8756,14 +8794,14 @@ function bufferCount(bufferSize, startBufferEvery) {
8756
8794
  e_2 = { error: e_2_1 };
8757
8795
  } finally {
8758
8796
  try {
8759
- if (toEmit_1_1 && !toEmit_1_1.done && (_b = toEmit_1.return)) _b.call(toEmit_1);
8797
+ if (toEmit_1_1 && !toEmit_1_1.done && (_b2 = toEmit_1.return)) _b2.call(toEmit_1);
8760
8798
  } finally {
8761
8799
  if (e_2) throw e_2.error;
8762
8800
  }
8763
8801
  }
8764
8802
  }
8765
8803
  }, function() {
8766
- var e_3, _a;
8804
+ var e_3, _a14;
8767
8805
  try {
8768
8806
  for (var buffers_2 = __values(buffers), buffers_2_1 = buffers_2.next(); !buffers_2_1.done; buffers_2_1 = buffers_2.next()) {
8769
8807
  var buffer2 = buffers_2_1.value;
@@ -8773,7 +8811,7 @@ function bufferCount(bufferSize, startBufferEvery) {
8773
8811
  e_3 = { error: e_3_1 };
8774
8812
  } finally {
8775
8813
  try {
8776
- if (buffers_2_1 && !buffers_2_1.done && (_a = buffers_2.return)) _a.call(buffers_2);
8814
+ if (buffers_2_1 && !buffers_2_1.done && (_a14 = buffers_2.return)) _a14.call(buffers_2);
8777
8815
  } finally {
8778
8816
  if (e_3) throw e_3.error;
8779
8817
  }
@@ -8787,13 +8825,13 @@ function bufferCount(bufferSize, startBufferEvery) {
8787
8825
 
8788
8826
  // node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/operators/bufferTime.js
8789
8827
  function bufferTime(bufferTimeSpan) {
8790
- var _a, _b;
8828
+ var _a14, _b2;
8791
8829
  var otherArgs = [];
8792
8830
  for (var _i = 1; _i < arguments.length; _i++) {
8793
8831
  otherArgs[_i - 1] = arguments[_i];
8794
8832
  }
8795
- var scheduler = (_a = popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : asyncScheduler;
8796
- var bufferCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null;
8833
+ var scheduler = (_a14 = popScheduler(otherArgs)) !== null && _a14 !== void 0 ? _a14 : asyncScheduler;
8834
+ var bufferCreationInterval = (_b2 = otherArgs[0]) !== null && _b2 !== void 0 ? _b2 : null;
8797
8835
  var maxBufferSize = otherArgs[1] || Infinity;
8798
8836
  return operate(function(source, subscriber) {
8799
8837
  var bufferRecords = [];
@@ -8827,7 +8865,7 @@ function bufferTime(bufferTimeSpan) {
8827
8865
  }
8828
8866
  startBuffer();
8829
8867
  var bufferTimeSubscriber = createOperatorSubscriber(subscriber, function(value2) {
8830
- var e_1, _a2;
8868
+ var e_1, _a15;
8831
8869
  var recordsCopy = bufferRecords.slice();
8832
8870
  try {
8833
8871
  for (var recordsCopy_1 = __values(recordsCopy), recordsCopy_1_1 = recordsCopy_1.next(); !recordsCopy_1_1.done; recordsCopy_1_1 = recordsCopy_1.next()) {
@@ -8840,7 +8878,7 @@ function bufferTime(bufferTimeSpan) {
8840
8878
  e_1 = { error: e_1_1 };
8841
8879
  } finally {
8842
8880
  try {
8843
- if (recordsCopy_1_1 && !recordsCopy_1_1.done && (_a2 = recordsCopy_1.return)) _a2.call(recordsCopy_1);
8881
+ if (recordsCopy_1_1 && !recordsCopy_1_1.done && (_a15 = recordsCopy_1.return)) _a15.call(recordsCopy_1);
8844
8882
  } finally {
8845
8883
  if (e_1) throw e_1.error;
8846
8884
  }
@@ -8959,7 +8997,7 @@ function takeUntil(notifier) {
8959
8997
  // node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/operators/throttle.js
8960
8998
  function throttle(durationSelector, config2) {
8961
8999
  return operate(function(source, subscriber) {
8962
- var _a = config2 !== null && config2 !== void 0 ? config2 : {}, _b = _a.leading, leading = _b === void 0 ? true : _b, _c = _a.trailing, trailing = _c === void 0 ? false : _c;
9000
+ var _a14 = config2 !== null && config2 !== void 0 ? config2 : {}, _b2 = _a14.leading, leading = _b2 === void 0 ? true : _b2, _c2 = _a14.trailing, trailing = _c2 === void 0 ? false : _c2;
8963
9001
  var hasValue = false;
8964
9002
  var sendValue = null;
8965
9003
  var throttled = null;
@@ -9209,7 +9247,7 @@ function n5(t8) {
9209
9247
  })(t8, e10, o12);
9210
9248
  }
9211
9249
 
9212
- // node_modules/.pnpm/@design.estate+dees-domtools@2.3.3/node_modules/@design.estate/dees-domtools/dist_ts/index.js
9250
+ // node_modules/.pnpm/@design.estate+dees-domtools@2.3.6/node_modules/@design.estate/dees-domtools/dist_ts/index.js
9213
9251
  var dist_ts_exports25 = {};
9214
9252
  __export(dist_ts_exports25, {
9215
9253
  DomTools: () => DomTools,
@@ -9220,7 +9258,7 @@ __export(dist_ts_exports25, {
9220
9258
  plugins: () => domtools_pluginexports_exports
9221
9259
  });
9222
9260
 
9223
- // node_modules/.pnpm/@design.estate+dees-domtools@2.3.3/node_modules/@design.estate/dees-domtools/dist_ts/domtools.elementbasic.js
9261
+ // node_modules/.pnpm/@design.estate+dees-domtools@2.3.6/node_modules/@design.estate/dees-domtools/dist_ts/domtools.elementbasic.js
9224
9262
  var domtools_elementbasic_exports = {};
9225
9263
  __export(domtools_elementbasic_exports, {
9226
9264
  setup: () => setup,
@@ -10093,7 +10131,7 @@ var secondsInWeek = secondsInDay * 7;
10093
10131
  var secondsInYear = secondsInDay * daysInYear;
10094
10132
  var secondsInMonth = secondsInYear / 12;
10095
10133
  var secondsInQuarter = secondsInMonth * 3;
10096
- var constructFromSymbol = Symbol.for("constructDateFrom");
10134
+ var constructFromSymbol = /* @__PURE__ */ Symbol.for("constructDateFrom");
10097
10135
 
10098
10136
  // node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constructFrom.js
10099
10137
  function constructFrom(date, value2) {
@@ -12509,9 +12547,9 @@ function isProtectedWeekYearToken(token) {
12509
12547
  return weekYearTokenRE.test(token);
12510
12548
  }
12511
12549
  function warnOrThrowProtectedError(token, format2, input) {
12512
- const _message = message(token, format2, input);
12513
- console.warn(_message);
12514
- if (throwTokens.includes(token)) throw new RangeError(_message);
12550
+ const _message2 = message(token, format2, input);
12551
+ console.warn(_message2);
12552
+ if (throwTokens.includes(token)) throw new RangeError(_message2);
12515
12553
  }
12516
12554
  function message(token, format2, input) {
12517
12555
  const subject = token[0] === "Y" ? "years" : "days of the month";
@@ -22742,11 +22780,13 @@ function regexCheck(regex) {
22742
22780
  }
22743
22781
  }
22744
22782
 
22745
- // node_modules/.pnpm/unist-util-is@6.0.0/node_modules/unist-util-is/lib/index.js
22783
+ // node_modules/.pnpm/unist-util-is@6.0.1/node_modules/unist-util-is/lib/index.js
22746
22784
  var is = (
22747
22785
  // Note: overloads in JSDoc can’t yet use different `@template`s.
22748
22786
  /**
22749
22787
  * @type {(
22788
+ * (<Condition extends ReadonlyArray<string>>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition[number]}) &
22789
+ * (<Condition extends Array<string>>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition[number]}) &
22750
22790
  * (<Condition extends string>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &
22751
22791
  * (<Condition extends Props>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &
22752
22792
  * (<Condition extends TestFunction>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate<Condition, Node>) &
@@ -22801,7 +22841,14 @@ var convert = (
22801
22841
  return castFactory(test);
22802
22842
  }
22803
22843
  if (typeof test === "object") {
22804
- return Array.isArray(test) ? anyFactory(test) : propsFactory(test);
22844
+ return Array.isArray(test) ? anyFactory(test) : (
22845
+ // Cast because `ReadonlyArray` goes into the above but `isArray`
22846
+ // narrows to `Array`.
22847
+ propertiesFactory(
22848
+ /** @type {Props} */
22849
+ test
22850
+ )
22851
+ );
22805
22852
  }
22806
22853
  if (typeof test === "string") {
22807
22854
  return typeFactory(test);
@@ -22824,7 +22871,7 @@ function anyFactory(tests) {
22824
22871
  return false;
22825
22872
  }
22826
22873
  }
22827
- function propsFactory(check) {
22874
+ function propertiesFactory(check) {
22828
22875
  const checkAsRecord = (
22829
22876
  /** @type {Record<string, unknown>} */
22830
22877
  check
@@ -22869,12 +22916,12 @@ function looksLikeANode(value2) {
22869
22916
  return value2 !== null && typeof value2 === "object" && "type" in value2;
22870
22917
  }
22871
22918
 
22872
- // node_modules/.pnpm/unist-util-visit-parents@6.0.1/node_modules/unist-util-visit-parents/lib/color.js
22919
+ // node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/lib/color.js
22873
22920
  function color(d5) {
22874
22921
  return d5;
22875
22922
  }
22876
22923
 
22877
- // node_modules/.pnpm/unist-util-visit-parents@6.0.1/node_modules/unist-util-visit-parents/lib/index.js
22924
+ // node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/lib/index.js
22878
22925
  var empty2 = [];
22879
22926
  var CONTINUE = true;
22880
22927
  var EXIT = false;
@@ -36369,7 +36416,7 @@ function remarkStringify(options) {
36369
36416
  }
36370
36417
  }
36371
36418
 
36372
- // node_modules/.pnpm/turndown@7.2.1/node_modules/turndown/lib/turndown.browser.es.js
36419
+ // node_modules/.pnpm/turndown@7.2.2/node_modules/turndown/lib/turndown.browser.es.js
36373
36420
  function extend2(destination) {
36374
36421
  for (var i9 = 1; i9 < arguments.length; i9++) {
36375
36422
  var source = arguments[i9];
@@ -36390,6 +36437,9 @@ function trimTrailingNewlines(string3) {
36390
36437
  while (indexEnd > 0 && string3[indexEnd - 1] === "\n") indexEnd--;
36391
36438
  return string3.substring(0, indexEnd);
36392
36439
  }
36440
+ function trimNewlines(string3) {
36441
+ return trimTrailingNewlines(trimLeadingNewlines(string3));
36442
+ }
36393
36443
  var blockElements = [
36394
36444
  "ADDRESS",
36395
36445
  "ARTICLE",
@@ -36523,8 +36573,7 @@ rules.heading = {
36523
36573
  rules.blockquote = {
36524
36574
  filter: "blockquote",
36525
36575
  replacement: function(content3) {
36526
- content3 = content3.replace(/^\n+|\n+$/g, "");
36527
- content3 = content3.replace(/^/gm, "> ");
36576
+ content3 = trimNewlines(content3).replace(/^/gm, "> ");
36528
36577
  return "\n\n" + content3 + "\n\n";
36529
36578
  }
36530
36579
  };
@@ -36549,8 +36598,10 @@ rules.listItem = {
36549
36598
  var index2 = Array.prototype.indexOf.call(parent.children, node2);
36550
36599
  prefix = (start ? Number(start) + index2 : index2 + 1) + ". ";
36551
36600
  }
36552
- content3 = content3.replace(/^\n+/, "").replace(/\n+$/, "\n").replace(/\n/gm, "\n" + " ".repeat(prefix.length));
36553
- return prefix + content3 + (node2.nextSibling && !/\n$/.test(content3) ? "\n" : "");
36601
+ var isParagraph = /\n$/.test(content3);
36602
+ content3 = trimNewlines(content3) + (isParagraph ? "\n" : "");
36603
+ content3 = content3.replace(/\n/gm, "\n" + " ".repeat(prefix.length));
36604
+ return prefix + content3 + (node2.nextSibling ? "\n" : "");
36554
36605
  }
36555
36606
  };
36556
36607
  rules.indentedCodeBlock = {
@@ -38896,8 +38947,8 @@ var Stringmap2 = class {
38896
38947
  }
38897
38948
  };
38898
38949
 
38899
- // node_modules/.pnpm/lenis@1.3.11/node_modules/lenis/dist/lenis.mjs
38900
- var version = "1.3.11";
38950
+ // node_modules/.pnpm/lenis@1.3.15/node_modules/lenis/dist/lenis.mjs
38951
+ var version = "1.3.15";
38901
38952
  function clamp2(min3, input, max3) {
38902
38953
  return Math.max(min3, Math.min(input, max3));
38903
38954
  }
@@ -39447,16 +39498,13 @@ var Lenis = class {
39447
39498
  onClick = (event) => {
39448
39499
  const path2 = event.composedPath();
39449
39500
  const anchor = path2.find(
39450
- (node2) => node2 instanceof HTMLAnchorElement && (node2.getAttribute("href")?.startsWith("#") || node2.getAttribute("href")?.startsWith("/#") || node2.getAttribute("href")?.startsWith("./#"))
39501
+ (node2) => node2 instanceof HTMLAnchorElement && node2.getAttribute("href")?.includes("#")
39451
39502
  );
39452
39503
  if (anchor) {
39453
- const id = anchor.getAttribute("href");
39454
- if (id) {
39504
+ const href = anchor.getAttribute("href");
39505
+ if (href) {
39455
39506
  const options = typeof this.options.anchors === "object" && this.options.anchors ? this.options.anchors : void 0;
39456
- let target = `#${id.split("#")[1]}`;
39457
- if (["#", "/#", "./#", "#top", "/#top", "./#top"].includes(id)) {
39458
- target = 0;
39459
- }
39507
+ const target = `#${href.split("#")[1]}`;
39460
39508
  this.scrollTo(target, options);
39461
39509
  }
39462
39510
  }
@@ -39668,7 +39716,7 @@ var Lenis = class {
39668
39716
  userData
39669
39717
  } = {}) {
39670
39718
  if ((this.isStopped || this.isLocked) && !force) return;
39671
- if (typeof target === "string" && ["top", "left", "start"].includes(target)) {
39719
+ if (typeof target === "string" && ["top", "left", "start", "#"].includes(target)) {
39672
39720
  target = 0;
39673
39721
  } else if (typeof target === "string" && ["bottom", "right", "end"].includes(target)) {
39674
39722
  target = this.limit;
@@ -39676,6 +39724,13 @@ var Lenis = class {
39676
39724
  let node2;
39677
39725
  if (typeof target === "string") {
39678
39726
  node2 = document.querySelector(target);
39727
+ if (!node2) {
39728
+ if (target === "#top") {
39729
+ target = 0;
39730
+ } else {
39731
+ console.warn("Lenis: Target not found", target);
39732
+ }
39733
+ }
39679
39734
  } else if (target instanceof HTMLElement && target?.nodeType) {
39680
39735
  node2 = target;
39681
39736
  }
@@ -39960,7 +40015,7 @@ var Lenis = class {
39960
40015
  }
39961
40016
  };
39962
40017
 
39963
- // node_modules/.pnpm/@design.estate+dees-domtools@2.3.3/node_modules/@design.estate/dees-domtools/dist_ts/domtools.plugins.js
40018
+ // node_modules/.pnpm/@design.estate+dees-domtools@2.3.6/node_modules/@design.estate/dees-domtools/dist_ts/domtools.plugins.js
39964
40019
  var import_sweet_scroll = __toESM(require_sweet_scroll(), 1);
39965
40020
  var lik = {
39966
40021
  ObjectMap: ObjectMap2,
@@ -39968,7 +40023,7 @@ var lik = {
39968
40023
  FastMap: FastMap2
39969
40024
  };
39970
40025
 
39971
- // node_modules/.pnpm/@design.estate+dees-domtools@2.3.3/node_modules/@design.estate/dees-domtools/dist_ts/domtools.css.breakpoints.js
40026
+ // node_modules/.pnpm/@design.estate+dees-domtools@2.3.6/node_modules/@design.estate/dees-domtools/dist_ts/domtools.css.breakpoints.js
39972
40027
  var domtools_css_breakpoints_exports = {};
39973
40028
  __export(domtools_css_breakpoints_exports, {
39974
40029
  cssForDesktop: () => cssForDesktop,
@@ -40038,7 +40093,7 @@ var cssForPhone = (cssArg) => {
40038
40093
  `);
40039
40094
  };
40040
40095
 
40041
- // node_modules/.pnpm/@design.estate+dees-domtools@2.3.3/node_modules/@design.estate/dees-domtools/dist_ts/domtools.classes.scroller.js
40096
+ // node_modules/.pnpm/@design.estate+dees-domtools@2.3.6/node_modules/@design.estate/dees-domtools/dist_ts/domtools.classes.scroller.js
40042
40097
  var Scroller = class {
40043
40098
  constructor(domtoolsInstanceArg) {
40044
40099
  this.scrollCallbacks = [];
@@ -40172,7 +40227,7 @@ var Scroller = class {
40172
40227
  }
40173
40228
  };
40174
40229
 
40175
- // node_modules/.pnpm/@design.estate+dees-domtools@2.3.3/node_modules/@design.estate/dees-domtools/dist_ts/domtools.classes.thememanager.js
40230
+ // node_modules/.pnpm/@design.estate+dees-domtools@2.3.6/node_modules/@design.estate/dees-domtools/dist_ts/domtools.classes.thememanager.js
40176
40231
  var ThemeManager = class {
40177
40232
  constructor(domtoolsRefArg) {
40178
40233
  this.goBrightBoolean = false;
@@ -40221,7 +40276,7 @@ var ThemeManager = class {
40221
40276
  }
40222
40277
  };
40223
40278
 
40224
- // node_modules/.pnpm/@design.estate+dees-domtools@2.3.3/node_modules/@design.estate/dees-domtools/dist_ts/domtools.classes.keyboard.js
40279
+ // node_modules/.pnpm/@design.estate+dees-domtools@2.3.6/node_modules/@design.estate/dees-domtools/dist_ts/domtools.classes.keyboard.js
40225
40280
  var Key;
40226
40281
  (function(Key2) {
40227
40282
  Key2[Key2["Backspace"] = 8] = "Backspace";
@@ -40407,35 +40462,49 @@ var Keyboard = class {
40407
40462
  }
40408
40463
  };
40409
40464
 
40410
- // node_modules/.pnpm/@design.estate+dees-domtools@2.3.3/node_modules/@design.estate/dees-domtools/dist_ts/domtools.classes.domtools.js
40465
+ // node_modules/.pnpm/@design.estate+dees-domtools@2.3.6/node_modules/@design.estate/dees-domtools/dist_ts/domtools.classes.domtools.js
40411
40466
  var DomTools = class _DomTools {
40412
- // ======
40413
- // STATIC
40414
- // ======
40467
+ static {
40468
+ this.initializationPromise = null;
40469
+ }
40415
40470
  /**
40416
40471
  * setups domtools
40417
40472
  */
40418
40473
  static async setupDomTools(optionsArg = {}) {
40419
- let domToolsInstance;
40420
- if (!globalThis.deesDomTools && !optionsArg.ignoreGlobal) {
40421
- globalThis.deesDomTools = new _DomTools(optionsArg);
40422
- domToolsInstance = globalThis.deesDomTools;
40423
- const readyStateChangedFunc = () => {
40424
- if (document.readyState === "interactive" || document.readyState === "complete") {
40425
- domToolsInstance.elements.headElement = document.querySelector("head");
40426
- domToolsInstance.elements.bodyElement = document.querySelector("body");
40427
- domToolsInstance.domReady.resolve();
40474
+ if (!optionsArg.ignoreGlobal && _DomTools.initializationPromise) {
40475
+ return await _DomTools.initializationPromise;
40476
+ }
40477
+ if (!optionsArg.ignoreGlobal) {
40478
+ _DomTools.initializationPromise = (async () => {
40479
+ let domToolsInstance;
40480
+ if (!globalThis.deesDomTools) {
40481
+ globalThis.deesDomTools = new _DomTools(optionsArg);
40482
+ domToolsInstance = globalThis.deesDomTools;
40483
+ const readyStateChangedFunc = () => {
40484
+ if (document.readyState === "interactive" || document.readyState === "complete") {
40485
+ domToolsInstance.elements.headElement = document.querySelector("head");
40486
+ domToolsInstance.elements.bodyElement = document.querySelector("body");
40487
+ domToolsInstance.keyboard = new Keyboard(document.body);
40488
+ domToolsInstance.domReady.resolve();
40489
+ }
40490
+ };
40491
+ if (document.readyState === "interactive" || document.readyState === "complete") {
40492
+ readyStateChangedFunc();
40493
+ } else {
40494
+ document.addEventListener("readystatechange", readyStateChangedFunc);
40495
+ }
40496
+ domToolsInstance.domToolsReady.resolve();
40497
+ } else {
40498
+ domToolsInstance = globalThis.deesDomTools;
40428
40499
  }
40429
- };
40430
- document.addEventListener("readystatechange", readyStateChangedFunc);
40431
- domToolsInstance.domToolsReady.resolve();
40432
- } else if (optionsArg.ignoreGlobal) {
40433
- domToolsInstance = new _DomTools(optionsArg);
40500
+ await domToolsInstance.domToolsReady.promise;
40501
+ return domToolsInstance;
40502
+ })();
40503
+ return await _DomTools.initializationPromise;
40434
40504
  } else {
40435
- domToolsInstance = globalThis.deesDomTools;
40505
+ const domToolsInstance = new _DomTools(optionsArg);
40506
+ return domToolsInstance;
40436
40507
  }
40437
- await domToolsInstance.domToolsReady.promise;
40438
- return domToolsInstance;
40439
40508
  }
40440
40509
  /**
40441
40510
  * if you can, use the static asysnc .setupDomTools() function instead since it is safer to use.
@@ -40474,12 +40543,13 @@ var DomTools = class _DomTools {
40474
40543
  this.deesComms = new dist_ts_exports16.DeesComms();
40475
40544
  this.scroller = new Scroller(this);
40476
40545
  this.themeManager = new ThemeManager(this);
40477
- this.keyboard = new Keyboard(document.body);
40546
+ this.keyboard = null;
40478
40547
  this.domToolsReady = dist_ts_exports.defer();
40479
40548
  this.domReady = dist_ts_exports.defer();
40480
40549
  this.globalStylesReady = dist_ts_exports.defer();
40481
40550
  this.runOnceTrackerStringMap = new lik.Stringmap();
40482
40551
  this.runOnceResultMap = new lik.FastMap();
40552
+ this.runOnceErrorMap = new lik.FastMap();
40483
40553
  }
40484
40554
  /**
40485
40555
  * run a function once and always get the Promise of the first execution
@@ -40491,13 +40561,22 @@ var DomTools = class _DomTools {
40491
40561
  if (!this.runOnceTrackerStringMap.checkString(identifierArg)) {
40492
40562
  this.runOnceTrackerStringMap.addString(identifierArg);
40493
40563
  this.runOnceTrackerStringMap.addString(runningId);
40494
- const result = await funcArg();
40495
- this.runOnceResultMap.addToMap(identifierArg, result);
40496
- this.runOnceTrackerStringMap.removeString(runningId);
40564
+ try {
40565
+ const result = await funcArg();
40566
+ this.runOnceResultMap.addToMap(identifierArg, result);
40567
+ } catch (error) {
40568
+ this.runOnceErrorMap.addToMap(identifierArg, error);
40569
+ } finally {
40570
+ this.runOnceTrackerStringMap.removeString(runningId);
40571
+ }
40497
40572
  }
40498
40573
  return await this.runOnceTrackerStringMap.registerUntilTrue((stringMap) => {
40499
40574
  return !stringMap.includes(runningId);
40500
40575
  }, () => {
40576
+ const error = this.runOnceErrorMap.getByKey(identifierArg);
40577
+ if (error) {
40578
+ throw error;
40579
+ }
40501
40580
  return this.runOnceResultMap.getByKey(identifierArg);
40502
40581
  });
40503
40582
  }
@@ -40550,7 +40629,7 @@ var DomTools = class _DomTools {
40550
40629
  }
40551
40630
  };
40552
40631
 
40553
- // node_modules/.pnpm/@design.estate+dees-domtools@2.3.3/node_modules/@design.estate/dees-domtools/dist_ts/domtools.css.basestyles.js
40632
+ // node_modules/.pnpm/@design.estate+dees-domtools@2.3.6/node_modules/@design.estate/dees-domtools/dist_ts/domtools.css.basestyles.js
40554
40633
  var scrollBarStyles = (() => {
40555
40634
  const returnStylesOld = navigator.userAgent.indexOf("Mac OS X") === -1 ? i``.cssText : ``;
40556
40635
  const returnStyles = i`
@@ -40585,7 +40664,7 @@ var globalBaseStyles = i`
40585
40664
  ${r(scrollBarStyles)}
40586
40665
  `.cssText;
40587
40666
 
40588
- // node_modules/.pnpm/@design.estate+dees-domtools@2.3.3/node_modules/@design.estate/dees-domtools/dist_ts/domtools.elementbasic.js
40667
+ // node_modules/.pnpm/@design.estate+dees-domtools@2.3.6/node_modules/@design.estate/dees-domtools/dist_ts/domtools.elementbasic.js
40589
40668
  var staticStyles = i`
40590
40669
  * {
40591
40670
  transition: background 0.1s, color 0.1s;
@@ -40623,7 +40702,7 @@ var setup = async (elementArg, optionsArg = {}) => {
40623
40702
  return domTools;
40624
40703
  };
40625
40704
 
40626
- // node_modules/.pnpm/@design.estate+dees-domtools@2.3.3/node_modules/@design.estate/dees-domtools/dist_ts/domtools.css.js
40705
+ // node_modules/.pnpm/@design.estate+dees-domtools@2.3.6/node_modules/@design.estate/dees-domtools/dist_ts/domtools.css.js
40627
40706
  var domtools_css_exports = {};
40628
40707
  __export(domtools_css_exports, {
40629
40708
  cssGridColumns: () => cssGridColumns
@@ -40636,7 +40715,7 @@ var cssGridColumns = (amountOfColumnsArg, gapSizeArg) => {
40636
40715
  return returnString;
40637
40716
  };
40638
40717
 
40639
- // node_modules/.pnpm/@design.estate+dees-domtools@2.3.3/node_modules/@design.estate/dees-domtools/dist_ts/domtools.pluginexports.js
40718
+ // node_modules/.pnpm/@design.estate+dees-domtools@2.3.6/node_modules/@design.estate/dees-domtools/dist_ts/domtools.pluginexports.js
40640
40719
  var domtools_pluginexports_exports = {};
40641
40720
  __export(domtools_pluginexports_exports, {
40642
40721
  SweetScroll: () => import_sweet_scroll2.default,
@@ -40652,7 +40731,7 @@ __export(domtools_pluginexports_exports, {
40652
40731
  });
40653
40732
  var import_sweet_scroll2 = __toESM(require_sweet_scroll(), 1);
40654
40733
 
40655
- // node_modules/.pnpm/@design.estate+dees-element@2.1.2/node_modules/@design.estate/dees-element/dist_ts/plugins.js
40734
+ // node_modules/.pnpm/@design.estate+dees-element@2.1.3/node_modules/@design.estate/dees-element/dist_ts/plugins.js
40656
40735
  var isounique3 = __toESM(require_dist_ts(), 1);
40657
40736
  var lit = {
40658
40737
  css: i,
@@ -40661,8 +40740,20 @@ var lit = {
40661
40740
  property: n5
40662
40741
  };
40663
40742
 
40664
- // node_modules/.pnpm/@design.estate+dees-element@2.1.2/node_modules/@design.estate/dees-element/dist_ts/classes.cssmanager.js
40665
- var CssManager = class {
40743
+ // node_modules/.pnpm/@design.estate+dees-element@2.1.3/node_modules/@design.estate/dees-element/dist_ts/classes.cssmanager.js
40744
+ var CssManager = class _CssManager {
40745
+ static {
40746
+ this.instance = null;
40747
+ }
40748
+ /**
40749
+ * Returns the singleton instance of CssManager
40750
+ */
40751
+ static getSingleton() {
40752
+ if (!_CssManager.instance) {
40753
+ _CssManager.instance = new _CssManager();
40754
+ }
40755
+ return _CssManager.instance;
40756
+ }
40666
40757
  constructor() {
40667
40758
  this.domtoolsPromise = DomTools.setupDomTools();
40668
40759
  this.goBright = false;
@@ -40731,7 +40822,7 @@ var CssManager = class {
40731
40822
  };
40732
40823
 
40733
40824
  // node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/static.js
40734
- var a3 = Symbol.for(""), o7 = (t8) => {
40825
+ var a3 = /* @__PURE__ */ Symbol.for(""), o7 = (t8) => {
40735
40826
  if (t8?.r === a3) return t8?._$litStatic$;
40736
40827
  }, s4 = (t8) => ({ _$litStatic$: t8, r: a3 }), i5 = (t8, ...r10) => ({ _$litStatic$: r10.reduce(((r11, e10, a4) => r11 + ((t9) => {
40737
40828
  if (void 0 !== t9._$litStatic$) return t9._$litStatic$;
@@ -40818,8 +40909,8 @@ function e7(e10, r10) {
40818
40909
  return (n12, s8, i9) => {
40819
40910
  const o12 = (t8) => t8.renderRoot?.querySelector(e10) ?? null;
40820
40911
  if (r10) {
40821
- const { get: e11, set: r11 } = "object" == typeof s8 ? n12 : i9 ?? (() => {
40822
- const t8 = Symbol();
40912
+ const { get: e11, set: r11 } = "object" == typeof s8 ? n12 : i9 ?? /* @__PURE__ */ (() => {
40913
+ const t8 = /* @__PURE__ */ Symbol();
40823
40914
  return { get() {
40824
40915
  return this[t8];
40825
40916
  }, set(e12) {
@@ -40874,7 +40965,7 @@ function n8(n12) {
40874
40965
  };
40875
40966
  }
40876
40967
 
40877
- // node_modules/.pnpm/@design.estate+dees-element@2.1.2/node_modules/@design.estate/dees-element/dist_ts/classes.dees-element.js
40968
+ // node_modules/.pnpm/@design.estate+dees-element@2.1.3/node_modules/@design.estate/dees-element/dist_ts/classes.dees-element.js
40878
40969
  var __decorate2 = function(decorators, target, key2, desc) {
40879
40970
  var c9 = arguments.length, r10 = c9 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key2) : desc, d5;
40880
40971
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r10 = Reflect.decorate(decorators, target, key2, desc);
@@ -40944,7 +41035,7 @@ __decorate2([
40944
41035
  __metadata2("design:type", dist_ts_exports25.DomTools)
40945
41036
  ], DeesElement.prototype, "domtools", void 0);
40946
41037
 
40947
- // node_modules/.pnpm/@design.estate+dees-element@2.1.2/node_modules/@design.estate/dees-element/dist_ts/directives/index.js
41038
+ // node_modules/.pnpm/@design.estate+dees-element@2.1.3/node_modules/@design.estate/dees-element/dist_ts/directives/index.js
40948
41039
  var directives_exports = {};
40949
41040
  __export(directives_exports, {
40950
41041
  asyncAppend: () => c8,
@@ -41037,7 +41128,7 @@ var f5 = class extends i6 {
41037
41128
  }
41038
41129
  };
41039
41130
 
41040
- // node_modules/.pnpm/@design.estate+dees-element@2.1.2/node_modules/@design.estate/dees-element/dist_ts/directives/classes.resolvedirective.js
41131
+ // node_modules/.pnpm/@design.estate+dees-element@2.1.3/node_modules/@design.estate/dees-element/dist_ts/directives/classes.resolvedirective.js
41041
41132
  var ResolveDirective = class extends f5 {
41042
41133
  constructor() {
41043
41134
  super(...arguments);
@@ -41080,7 +41171,7 @@ var resolveExec = (funcArg) => {
41080
41171
  return resolve(funcArg());
41081
41172
  };
41082
41173
 
41083
- // node_modules/.pnpm/@design.estate+dees-element@2.1.2/node_modules/@design.estate/dees-element/dist_ts/directives/classes.subscribedirective.js
41174
+ // node_modules/.pnpm/@design.estate+dees-element@2.1.3/node_modules/@design.estate/dees-element/dist_ts/directives/classes.subscribedirective.js
41084
41175
  var SubscribeDirective = class extends f5 {
41085
41176
  constructor() {
41086
41177
  super(...arguments);
@@ -41110,7 +41201,7 @@ var SubscribeDirective = class extends f5 {
41110
41201
  };
41111
41202
  var subscribe = e4(SubscribeDirective);
41112
41203
 
41113
- // node_modules/.pnpm/@design.estate+dees-element@2.1.2/node_modules/@design.estate/dees-element/dist_ts/directives/classes.subscribewithtemplate.js
41204
+ // node_modules/.pnpm/@design.estate+dees-element@2.1.3/node_modules/@design.estate/dees-element/dist_ts/directives/classes.subscribewithtemplate.js
41114
41205
  var SubscribeWithTemplateDirective = class extends f5 {
41115
41206
  constructor() {
41116
41207
  super(...arguments);
@@ -41264,20 +41355,38 @@ var c8 = e4(class extends o11 {
41264
41355
  }
41265
41356
  });
41266
41357
 
41267
- // node_modules/.pnpm/@design.estate+dees-element@2.1.2/node_modules/@design.estate/dees-element/dist_ts/index.js
41268
- var cssManager = new CssManager();
41358
+ // node_modules/.pnpm/@design.estate+dees-element@2.1.3/node_modules/@design.estate/dees-element/dist_ts/index.js
41359
+ var cssManager = CssManager.getSingleton();
41269
41360
 
41270
41361
  // ts_web/elements/wcctools.helpers.ts
41271
41362
  var resolveTemplateFactory = async (factoryArg) => {
41272
41363
  return await Promise.resolve(factoryArg());
41273
41364
  };
41365
+ var getDemoCount = (demo) => {
41366
+ if (Array.isArray(demo)) {
41367
+ return demo.length;
41368
+ }
41369
+ return 1;
41370
+ };
41371
+ var getDemoAtIndex = (demo, index2) => {
41372
+ if (Array.isArray(demo)) {
41373
+ return demo[index2] ?? null;
41374
+ }
41375
+ return index2 === 0 ? demo : null;
41376
+ };
41377
+ var hasMultipleDemos = (demo) => {
41378
+ return Array.isArray(demo) && demo.length > 1;
41379
+ };
41274
41380
 
41275
41381
  // ts_web/elements/wcc-frame.ts
41276
- var WccFrame = class extends DeesElement {
41382
+ var _isFullscreen_dec, _advancedEditorOpen_dec, _viewport_dec, _a, _WccFrame_decorators, _init, _viewport, _advancedEditorOpen, _isFullscreen;
41383
+ _WccFrame_decorators = [t4("wcc-frame")];
41384
+ var WccFrame = class extends (_a = DeesElement, _viewport_dec = [n5()], _advancedEditorOpen_dec = [n5({ type: Boolean })], _isFullscreen_dec = [n5({ type: Boolean })], _a) {
41277
41385
  constructor() {
41278
41386
  super(...arguments);
41279
- this.advancedEditorOpen = false;
41280
- this.isFullscreen = false;
41387
+ __privateAdd(this, _viewport, __runInitializers(_init, 8, this)), __runInitializers(_init, 11, this);
41388
+ __privateAdd(this, _advancedEditorOpen, __runInitializers(_init, 12, this, false)), __runInitializers(_init, 15, this);
41389
+ __privateAdd(this, _isFullscreen, __runInitializers(_init, 16, this, false)), __runInitializers(_init, 19, this);
41281
41390
  }
41282
41391
  render() {
41283
41392
  return x`
@@ -41355,7 +41464,15 @@ var WccFrame = class extends DeesElement {
41355
41464
  return this.shadowRoot.querySelector(".viewport");
41356
41465
  }
41357
41466
  };
41358
- WccFrame.styles = [
41467
+ _init = __decoratorStart(_a);
41468
+ _viewport = new WeakMap();
41469
+ _advancedEditorOpen = new WeakMap();
41470
+ _isFullscreen = new WeakMap();
41471
+ __decorateElement(_init, 4, "viewport", _viewport_dec, WccFrame, _viewport);
41472
+ __decorateElement(_init, 4, "advancedEditorOpen", _advancedEditorOpen_dec, WccFrame, _advancedEditorOpen);
41473
+ __decorateElement(_init, 4, "isFullscreen", _isFullscreen_dec, WccFrame, _isFullscreen);
41474
+ WccFrame = __decorateElement(_init, 0, "WccFrame", _WccFrame_decorators, WccFrame);
41475
+ __publicField(WccFrame, "styles", [
41359
41476
  i`
41360
41477
  :host {
41361
41478
  border: 10px solid #ffaeaf;
@@ -41376,25 +41493,20 @@ WccFrame.styles = [
41376
41493
  min-height: 100%;
41377
41494
  }
41378
41495
  `
41379
- ];
41380
- __decorateClass([
41381
- n5()
41382
- ], WccFrame.prototype, "viewport", 2);
41383
- __decorateClass([
41384
- n5({ type: Boolean })
41385
- ], WccFrame.prototype, "advancedEditorOpen", 2);
41386
- __decorateClass([
41387
- n5({ type: Boolean })
41388
- ], WccFrame.prototype, "isFullscreen", 2);
41389
- WccFrame = __decorateClass([
41390
- t4("wcc-frame")
41391
- ], WccFrame);
41496
+ ]);
41497
+ __runInitializers(_init, 1, WccFrame);
41392
41498
 
41393
41499
  // ts_web/elements/wcc-sidebar.ts
41394
- var WccSidebar = class extends DeesElement {
41500
+ var _expandedElements_dec, _isFullscreen_dec2, _dashboardRef_dec, _selectedType_dec, _selectedItem_dec, _a2, _WccSidebar_decorators, _init2, _selectedItem, _selectedType, _dashboardRef, _isFullscreen2, _expandedElements;
41501
+ _WccSidebar_decorators = [t4("wcc-sidebar")];
41502
+ var WccSidebar = class extends (_a2 = DeesElement, _selectedItem_dec = [n5({ attribute: false })], _selectedType_dec = [n5({ attribute: false })], _dashboardRef_dec = [n5()], _isFullscreen_dec2 = [n5()], _expandedElements_dec = [r5()], _a2) {
41395
41503
  constructor() {
41396
41504
  super(...arguments);
41397
- this.isFullscreen = false;
41505
+ __privateAdd(this, _selectedItem, __runInitializers(_init2, 8, this)), __runInitializers(_init2, 11, this);
41506
+ __privateAdd(this, _selectedType, __runInitializers(_init2, 12, this)), __runInitializers(_init2, 15, this);
41507
+ __privateAdd(this, _dashboardRef, __runInitializers(_init2, 16, this)), __runInitializers(_init2, 19, this);
41508
+ __privateAdd(this, _isFullscreen2, __runInitializers(_init2, 20, this, false)), __runInitializers(_init2, 23, this);
41509
+ __privateAdd(this, _expandedElements, __runInitializers(_init2, 24, this, /* @__PURE__ */ new Set())), __runInitializers(_init2, 27, this);
41398
41510
  }
41399
41511
  render() {
41400
41512
  return x`
@@ -41487,7 +41599,21 @@ var WccSidebar = class extends DeesElement {
41487
41599
  color: #999;
41488
41600
  background: transparent;
41489
41601
  }
41490
-
41602
+
41603
+ .selectOption.folder {
41604
+ grid-template-columns: 16px 20px 1fr;
41605
+ }
41606
+
41607
+ .selectOption .expand-icon {
41608
+ font-size: 14px;
41609
+ opacity: 0.5;
41610
+ transition: transform 0.2s ease;
41611
+ }
41612
+
41613
+ .selectOption.expanded .expand-icon {
41614
+ transform: rotate(90deg);
41615
+ }
41616
+
41491
41617
  .selectOption:hover {
41492
41618
  background: rgba(59, 130, 246, 0.05);
41493
41619
  color: #bbb;
@@ -41520,6 +41646,42 @@ var WccSidebar = class extends DeesElement {
41520
41646
  font-weight: 400;
41521
41647
  }
41522
41648
 
41649
+ .demo-children {
41650
+ margin-left: 1rem;
41651
+ overflow: hidden;
41652
+ }
41653
+
41654
+ .demo-child {
41655
+ user-select: none;
41656
+ position: relative;
41657
+ margin: 0.125rem 0.5rem;
41658
+ padding: 0.35rem 0.75rem;
41659
+ transition: all 0.15s ease;
41660
+ display: grid;
41661
+ grid-template-columns: 16px 1fr;
41662
+ align-items: center;
41663
+ gap: 0.5rem;
41664
+ border-radius: var(--radius);
41665
+ cursor: pointer;
41666
+ font-size: 0.7rem;
41667
+ color: #777;
41668
+ background: transparent;
41669
+ }
41670
+
41671
+ .demo-child:hover {
41672
+ background: rgba(59, 130, 246, 0.05);
41673
+ color: #bbb;
41674
+ }
41675
+
41676
+ .demo-child.selected {
41677
+ background: rgba(59, 130, 246, 0.15);
41678
+ color: var(--primary);
41679
+ }
41680
+
41681
+ .demo-child .material-symbols-outlined {
41682
+ font-size: 14px;
41683
+ }
41684
+
41523
41685
  ::-webkit-scrollbar {
41524
41686
  width: 8px;
41525
41687
  }
@@ -41548,7 +41710,7 @@ var WccSidebar = class extends DeesElement {
41548
41710
  class="selectOption ${this.selectedItem === item ? "selected" : null}"
41549
41711
  @click=${async () => {
41550
41712
  const domtools2 = await dist_ts_exports25.DomTools.setupDomTools();
41551
- this.selectItem("page", pageName, item);
41713
+ this.selectItem("page", pageName, item, 0);
41552
41714
  }}
41553
41715
  >
41554
41716
  <i class="material-symbols-outlined">insert_drive_file</i>
@@ -41562,29 +41724,77 @@ var WccSidebar = class extends DeesElement {
41562
41724
  const elements = Object.keys(this.dashboardRef.elements);
41563
41725
  return elements.map((elementName) => {
41564
41726
  const item = this.dashboardRef.elements[elementName];
41565
- return x`
41566
- <div
41567
- class="selectOption ${this.selectedItem === item ? "selected" : null}"
41568
- @click=${async () => {
41569
- const domtools2 = await dist_ts_exports25.DomTools.setupDomTools();
41570
- this.selectItem("element", elementName, item);
41571
- }}
41572
- >
41573
- <i class="material-symbols-outlined">featured_video</i>
41574
- <div class="text">${elementName}</div>
41575
- </div>
41576
- `;
41727
+ const demoCount = item.demo ? getDemoCount(item.demo) : 0;
41728
+ const isMultiDemo = item.demo && hasMultipleDemos(item.demo);
41729
+ const isExpanded = this.expandedElements.has(elementName);
41730
+ const isSelected = this.selectedItem === item;
41731
+ if (isMultiDemo) {
41732
+ return x`
41733
+ <div
41734
+ class="selectOption folder ${isExpanded ? "expanded" : ""} ${isSelected ? "selected" : ""}"
41735
+ @click=${() => this.toggleExpanded(elementName)}
41736
+ >
41737
+ <i class="material-symbols-outlined expand-icon">chevron_right</i>
41738
+ <i class="material-symbols-outlined">folder</i>
41739
+ <div class="text">${elementName}</div>
41740
+ </div>
41741
+ ${isExpanded ? x`
41742
+ <div class="demo-children">
41743
+ ${Array.from({ length: demoCount }, (_3, i9) => {
41744
+ const demoIndex = i9;
41745
+ const isThisDemoSelected = isSelected && this.dashboardRef.selectedDemoIndex === demoIndex;
41746
+ return x`
41747
+ <div
41748
+ class="demo-child ${isThisDemoSelected ? "selected" : ""}"
41749
+ @click=${async () => {
41750
+ await dist_ts_exports25.DomTools.setupDomTools();
41751
+ this.selectItem("element", elementName, item, demoIndex);
41752
+ }}
41753
+ >
41754
+ <i class="material-symbols-outlined">play_circle</i>
41755
+ <div class="text">demo${demoIndex + 1}</div>
41756
+ </div>
41757
+ `;
41758
+ })}
41759
+ </div>
41760
+ ` : null}
41761
+ `;
41762
+ } else {
41763
+ return x`
41764
+ <div
41765
+ class="selectOption ${isSelected ? "selected" : null}"
41766
+ @click=${async () => {
41767
+ await dist_ts_exports25.DomTools.setupDomTools();
41768
+ this.selectItem("element", elementName, item, 0);
41769
+ }}
41770
+ >
41771
+ <i class="material-symbols-outlined">featured_video</i>
41772
+ <div class="text">${elementName}</div>
41773
+ </div>
41774
+ `;
41775
+ }
41577
41776
  });
41578
41777
  })()}
41579
41778
  </div>
41580
41779
  `;
41581
41780
  }
41582
- selectItem(typeArg, itemNameArg, itemArg) {
41781
+ toggleExpanded(elementName) {
41782
+ const newSet = new Set(this.expandedElements);
41783
+ if (newSet.has(elementName)) {
41784
+ newSet.delete(elementName);
41785
+ } else {
41786
+ newSet.add(elementName);
41787
+ }
41788
+ this.expandedElements = newSet;
41789
+ }
41790
+ selectItem(typeArg, itemNameArg, itemArg, demoIndex = 0) {
41583
41791
  console.log("selected item");
41584
41792
  console.log(itemNameArg);
41585
41793
  console.log(itemArg);
41794
+ console.log("demo index:", demoIndex);
41586
41795
  this.selectedItem = itemArg;
41587
41796
  this.selectedType = typeArg;
41797
+ this.dashboardRef.selectedDemoIndex = demoIndex;
41588
41798
  this.dispatchEvent(
41589
41799
  new CustomEvent("selectedType", {
41590
41800
  detail: typeArg
@@ -41601,39 +41811,1351 @@ var WccSidebar = class extends DeesElement {
41601
41811
  })
41602
41812
  );
41603
41813
  this.dashboardRef.buildUrl();
41814
+ this.requestUpdate();
41815
+ }
41816
+ };
41817
+ _init2 = __decoratorStart(_a2);
41818
+ _selectedItem = new WeakMap();
41819
+ _selectedType = new WeakMap();
41820
+ _dashboardRef = new WeakMap();
41821
+ _isFullscreen2 = new WeakMap();
41822
+ _expandedElements = new WeakMap();
41823
+ __decorateElement(_init2, 4, "selectedItem", _selectedItem_dec, WccSidebar, _selectedItem);
41824
+ __decorateElement(_init2, 4, "selectedType", _selectedType_dec, WccSidebar, _selectedType);
41825
+ __decorateElement(_init2, 4, "dashboardRef", _dashboardRef_dec, WccSidebar, _dashboardRef);
41826
+ __decorateElement(_init2, 4, "isFullscreen", _isFullscreen_dec2, WccSidebar, _isFullscreen2);
41827
+ __decorateElement(_init2, 4, "expandedElements", _expandedElements_dec, WccSidebar, _expandedElements);
41828
+ WccSidebar = __decorateElement(_init2, 0, "WccSidebar", _WccSidebar_decorators, WccSidebar);
41829
+ __runInitializers(_init2, 1, WccSidebar);
41830
+
41831
+ // ts_web/elements/wcc-record-button.ts
41832
+ var _duration_dec, _state_dec, _a3, _WccRecordButton_decorators, _init3, _state, _duration;
41833
+ _WccRecordButton_decorators = [t4("wcc-record-button")];
41834
+ var WccRecordButton = class extends (_a3 = DeesElement, _state_dec = [n5({ type: String })], _duration_dec = [n5({ type: Number })], _a3) {
41835
+ constructor() {
41836
+ super(...arguments);
41837
+ __privateAdd(this, _state, __runInitializers(_init3, 8, this, "idle")), __runInitializers(_init3, 11, this);
41838
+ __privateAdd(this, _duration, __runInitializers(_init3, 12, this, 0)), __runInitializers(_init3, 15, this);
41839
+ __publicField(this, "handleClick", () => {
41840
+ this.dispatchEvent(new CustomEvent("record-click", {
41841
+ bubbles: true,
41842
+ composed: true
41843
+ }));
41844
+ });
41845
+ }
41846
+ formatDuration(seconds) {
41847
+ const mins = Math.floor(seconds / 60);
41848
+ const secs = seconds % 60;
41849
+ return `${mins.toString().padStart(2, "0")}:${secs.toString().padStart(2, "0")}`;
41850
+ }
41851
+ render() {
41852
+ return x`
41853
+ <div class="content">
41854
+ <div class="rec-icon"></div>
41855
+ ${this.state === "recording" ? x`
41856
+ <span class="recording-timer">${this.formatDuration(this.duration)}</span>
41857
+ ` : null}
41858
+ </div>
41859
+ `;
41860
+ }
41861
+ async connectedCallback() {
41862
+ await super.connectedCallback();
41863
+ this.addEventListener("click", this.handleClick);
41864
+ }
41865
+ async disconnectedCallback() {
41866
+ await super.disconnectedCallback();
41867
+ this.removeEventListener("click", this.handleClick);
41868
+ }
41869
+ updated(changedProperties) {
41870
+ super.updated(changedProperties);
41871
+ if (changedProperties.has("state")) {
41872
+ if (this.state === "recording") {
41873
+ this.classList.add("recording");
41874
+ } else {
41875
+ this.classList.remove("recording");
41876
+ }
41877
+ }
41878
+ }
41879
+ };
41880
+ _init3 = __decoratorStart(_a3);
41881
+ _state = new WeakMap();
41882
+ _duration = new WeakMap();
41883
+ __decorateElement(_init3, 4, "state", _state_dec, WccRecordButton, _state);
41884
+ __decorateElement(_init3, 4, "duration", _duration_dec, WccRecordButton, _duration);
41885
+ WccRecordButton = __decorateElement(_init3, 0, "WccRecordButton", _WccRecordButton_decorators, WccRecordButton);
41886
+ __publicField(WccRecordButton, "styles", [
41887
+ i`
41888
+ :host {
41889
+ display: flex;
41890
+ align-items: center;
41891
+ justify-content: center;
41892
+ background: transparent;
41893
+ cursor: pointer;
41894
+ transition: all 0.15s ease;
41895
+ color: #666;
41896
+ user-select: none;
41897
+ }
41898
+
41899
+ :host(:hover) {
41900
+ background: rgba(239, 68, 68, 0.05);
41901
+ color: #f87171;
41902
+ }
41903
+
41904
+ :host(.recording) {
41905
+ background: rgba(239, 68, 68, 0.15);
41906
+ color: #f87171;
41907
+ }
41908
+
41909
+ .content {
41910
+ display: flex;
41911
+ align-items: center;
41912
+ justify-content: center;
41913
+ gap: 0.25rem;
41914
+ }
41915
+
41916
+ .rec-icon {
41917
+ width: 12px;
41918
+ height: 12px;
41919
+ border-radius: 50%;
41920
+ background: currentColor;
41921
+ }
41922
+
41923
+ :host(.recording) .rec-icon {
41924
+ animation: pulse-recording 1s ease-in-out infinite;
41925
+ }
41926
+
41927
+ @keyframes pulse-recording {
41928
+ 0%, 100% { opacity: 1; transform: scale(1); }
41929
+ 50% { opacity: 0.5; transform: scale(0.9); }
41930
+ }
41931
+
41932
+ .recording-timer {
41933
+ font-family: 'Consolas', 'Monaco', monospace;
41934
+ font-size: 0.7rem;
41935
+ }
41936
+ `
41937
+ ]);
41938
+ __runInitializers(_init3, 1, WccRecordButton);
41939
+
41940
+ // ts_web/services/recorder.service.ts
41941
+ var RecorderService = class {
41942
+ // Recording state
41943
+ mediaRecorder = null;
41944
+ recordedChunks = [];
41945
+ durationInterval = null;
41946
+ _duration = 0;
41947
+ _recordedBlob = null;
41948
+ _isRecording = false;
41949
+ // Audio monitoring state
41950
+ audioContext = null;
41951
+ audioAnalyser = null;
41952
+ audioMonitoringInterval = null;
41953
+ monitoringStream = null;
41954
+ // Current recording stream
41955
+ currentStream = null;
41956
+ // Event callbacks
41957
+ events = {};
41958
+ constructor(events) {
41959
+ if (events) {
41960
+ this.events = events;
41961
+ }
41962
+ }
41963
+ // Public getters
41964
+ get isRecording() {
41965
+ return this._isRecording;
41966
+ }
41967
+ get duration() {
41968
+ return this._duration;
41969
+ }
41970
+ get recordedBlob() {
41971
+ return this._recordedBlob;
41972
+ }
41973
+ // Update event callbacks
41974
+ setEvents(events) {
41975
+ this.events = { ...this.events, ...events };
41976
+ }
41977
+ // ==================== Microphone Management ====================
41978
+ async loadMicrophones(requestPermission = false) {
41979
+ try {
41980
+ if (requestPermission) {
41981
+ const stream = await navigator.mediaDevices.getUserMedia({ audio: true });
41982
+ stream.getTracks().forEach((track2) => track2.stop());
41983
+ }
41984
+ const devices = await navigator.mediaDevices.enumerateDevices();
41985
+ return devices.filter((d5) => d5.kind === "audioinput");
41986
+ } catch (error) {
41987
+ console.error("Error loading microphones:", error);
41988
+ return [];
41989
+ }
41990
+ }
41991
+ async startAudioMonitoring(deviceId) {
41992
+ this.stopAudioMonitoring();
41993
+ if (!deviceId) return;
41994
+ try {
41995
+ const stream = await navigator.mediaDevices.getUserMedia({
41996
+ audio: { deviceId: { exact: deviceId } }
41997
+ });
41998
+ this.monitoringStream = stream;
41999
+ this.audioContext = new AudioContext();
42000
+ const source = this.audioContext.createMediaStreamSource(stream);
42001
+ this.audioAnalyser = this.audioContext.createAnalyser();
42002
+ this.audioAnalyser.fftSize = 256;
42003
+ source.connect(this.audioAnalyser);
42004
+ const dataArray = new Uint8Array(this.audioAnalyser.frequencyBinCount);
42005
+ this.audioMonitoringInterval = window.setInterval(() => {
42006
+ if (this.audioAnalyser) {
42007
+ this.audioAnalyser.getByteFrequencyData(dataArray);
42008
+ const average = dataArray.reduce((a4, b4) => a4 + b4) / dataArray.length;
42009
+ const level = Math.min(100, average / 128 * 100);
42010
+ this.events.onAudioLevelUpdate?.(level);
42011
+ }
42012
+ }, 50);
42013
+ } catch (error) {
42014
+ console.error("Error starting audio monitoring:", error);
42015
+ this.events.onAudioLevelUpdate?.(0);
42016
+ }
42017
+ }
42018
+ stopAudioMonitoring() {
42019
+ if (this.audioMonitoringInterval) {
42020
+ clearInterval(this.audioMonitoringInterval);
42021
+ this.audioMonitoringInterval = null;
42022
+ }
42023
+ if (this.audioContext) {
42024
+ this.audioContext.close();
42025
+ this.audioContext = null;
42026
+ }
42027
+ if (this.monitoringStream) {
42028
+ this.monitoringStream.getTracks().forEach((track2) => track2.stop());
42029
+ this.monitoringStream = null;
42030
+ }
42031
+ this.audioAnalyser = null;
42032
+ }
42033
+ // ==================== Recording Control ====================
42034
+ async startRecording(options) {
42035
+ try {
42036
+ this.stopAudioMonitoring();
42037
+ const displayMediaOptions = {
42038
+ video: {
42039
+ displaySurface: options.mode === "viewport" ? "browser" : "monitor"
42040
+ },
42041
+ audio: false
42042
+ };
42043
+ if (options.mode === "viewport") {
42044
+ displayMediaOptions.preferCurrentTab = true;
42045
+ }
42046
+ const videoStream = await navigator.mediaDevices.getDisplayMedia(displayMediaOptions);
42047
+ if (options.mode === "viewport" && options.viewportElement) {
42048
+ try {
42049
+ if ("CropTarget" in window) {
42050
+ const cropTarget = await window.CropTarget.fromElement(options.viewportElement);
42051
+ const [videoTrack] = videoStream.getVideoTracks();
42052
+ await videoTrack.cropTo(cropTarget);
42053
+ }
42054
+ } catch (e10) {
42055
+ console.warn("Element Capture not supported, recording full tab:", e10);
42056
+ }
42057
+ }
42058
+ let combinedStream = videoStream;
42059
+ if (options.audioDeviceId) {
42060
+ try {
42061
+ const audioStream = await navigator.mediaDevices.getUserMedia({
42062
+ audio: { deviceId: { exact: options.audioDeviceId } }
42063
+ });
42064
+ combinedStream = new MediaStream([
42065
+ ...videoStream.getVideoTracks(),
42066
+ ...audioStream.getAudioTracks()
42067
+ ]);
42068
+ } catch (audioError) {
42069
+ console.warn("Could not add audio:", audioError);
42070
+ }
42071
+ }
42072
+ this.currentStream = combinedStream;
42073
+ const mimeType = MediaRecorder.isTypeSupported("video/webm;codecs=vp9") ? "video/webm;codecs=vp9" : "video/webm";
42074
+ this.mediaRecorder = new MediaRecorder(combinedStream, { mimeType });
42075
+ this.recordedChunks = [];
42076
+ this.mediaRecorder.ondataavailable = (e10) => {
42077
+ if (e10.data.size > 0) {
42078
+ this.recordedChunks.push(e10.data);
42079
+ }
42080
+ };
42081
+ this.mediaRecorder.onstop = () => this.handleRecordingComplete();
42082
+ videoStream.getVideoTracks()[0].onended = () => {
42083
+ if (this._isRecording) {
42084
+ this.stopRecording();
42085
+ this.events.onStreamEnded?.();
42086
+ }
42087
+ };
42088
+ this.mediaRecorder.start(1e3);
42089
+ this._duration = 0;
42090
+ this.durationInterval = window.setInterval(() => {
42091
+ this._duration++;
42092
+ this.events.onDurationUpdate?.(this._duration);
42093
+ }, 1e3);
42094
+ this._isRecording = true;
42095
+ } catch (error) {
42096
+ console.error("Error starting recording:", error);
42097
+ this._isRecording = false;
42098
+ this.events.onError?.(error);
42099
+ throw error;
42100
+ }
42101
+ }
42102
+ stopRecording() {
42103
+ if (this.mediaRecorder && this.mediaRecorder.state !== "inactive") {
42104
+ this.mediaRecorder.stop();
42105
+ }
42106
+ if (this.durationInterval) {
42107
+ clearInterval(this.durationInterval);
42108
+ this.durationInterval = null;
42109
+ }
42110
+ }
42111
+ async handleRecordingComplete() {
42112
+ const blob = new Blob(this.recordedChunks, { type: "video/webm" });
42113
+ this._recordedBlob = blob;
42114
+ if (this.currentStream) {
42115
+ this.currentStream.getTracks().forEach((track2) => track2.stop());
42116
+ this.currentStream = null;
42117
+ }
42118
+ this._isRecording = false;
42119
+ this.events.onRecordingComplete?.(this._recordedBlob);
42120
+ }
42121
+ // ==================== Trim & Export ====================
42122
+ async exportTrimmedVideo(videoElement, trimStart, trimEnd) {
42123
+ return new Promise((resolve2, reject) => {
42124
+ const canvas = document.createElement("canvas");
42125
+ canvas.width = videoElement.videoWidth || 1280;
42126
+ canvas.height = videoElement.videoHeight || 720;
42127
+ const ctx = canvas.getContext("2d");
42128
+ if (!ctx) {
42129
+ reject(new Error("Could not get canvas context"));
42130
+ return;
42131
+ }
42132
+ const canvasStream = canvas.captureStream(30);
42133
+ let combinedStream;
42134
+ try {
42135
+ const audioCtx = new AudioContext();
42136
+ const source = audioCtx.createMediaElementSource(videoElement);
42137
+ const destination = audioCtx.createMediaStreamDestination();
42138
+ source.connect(destination);
42139
+ source.connect(audioCtx.destination);
42140
+ combinedStream = new MediaStream([
42141
+ ...canvasStream.getVideoTracks(),
42142
+ ...destination.stream.getAudioTracks()
42143
+ ]);
42144
+ const cleanup = () => {
42145
+ audioCtx.close();
42146
+ };
42147
+ this.recordTrimmedStream(videoElement, canvas, ctx, combinedStream, trimStart, trimEnd, cleanup, resolve2, reject);
42148
+ } catch (audioError) {
42149
+ console.warn("Could not capture audio, recording video only:", audioError);
42150
+ combinedStream = canvasStream;
42151
+ this.recordTrimmedStream(videoElement, canvas, ctx, combinedStream, trimStart, trimEnd, () => {
42152
+ }, resolve2, reject);
42153
+ }
42154
+ });
42155
+ }
42156
+ recordTrimmedStream(video, canvas, ctx, stream, trimStart, trimEnd, cleanup, resolve2, reject) {
42157
+ const mimeType = MediaRecorder.isTypeSupported("video/webm;codecs=vp9") ? "video/webm;codecs=vp9" : "video/webm";
42158
+ const recorder = new MediaRecorder(stream, { mimeType });
42159
+ const chunks = [];
42160
+ recorder.ondataavailable = (e10) => {
42161
+ if (e10.data.size > 0) {
42162
+ chunks.push(e10.data);
42163
+ }
42164
+ };
42165
+ recorder.onstop = () => {
42166
+ cleanup();
42167
+ resolve2(new Blob(chunks, { type: "video/webm" }));
42168
+ };
42169
+ recorder.onerror = (e10) => {
42170
+ cleanup();
42171
+ reject(new Error("Recording error: " + e10));
42172
+ };
42173
+ video.currentTime = trimStart;
42174
+ video.onseeked = () => {
42175
+ recorder.start(100);
42176
+ video.play();
42177
+ const drawFrame = () => {
42178
+ if (video.currentTime >= trimEnd || video.paused || video.ended) {
42179
+ video.pause();
42180
+ video.onseeked = null;
42181
+ setTimeout(() => {
42182
+ if (recorder.state === "recording") {
42183
+ recorder.stop();
42184
+ }
42185
+ }, 100);
42186
+ return;
42187
+ }
42188
+ ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
42189
+ requestAnimationFrame(drawFrame);
42190
+ };
42191
+ drawFrame();
42192
+ };
42193
+ }
42194
+ // ==================== Cleanup ====================
42195
+ reset() {
42196
+ this._recordedBlob = null;
42197
+ this.recordedChunks = [];
42198
+ this._duration = 0;
42199
+ this._isRecording = false;
42200
+ }
42201
+ dispose() {
42202
+ this.stopRecording();
42203
+ this.stopAudioMonitoring();
42204
+ this.reset();
42205
+ if (this.currentStream) {
42206
+ this.currentStream.getTracks().forEach((track2) => track2.stop());
42207
+ this.currentStream = null;
42208
+ }
41604
42209
  }
41605
42210
  };
41606
- __decorateClass([
41607
- n5({ attribute: false })
41608
- ], WccSidebar.prototype, "selectedItem", 2);
41609
- __decorateClass([
41610
- n5({ attribute: false })
41611
- ], WccSidebar.prototype, "selectedType", 2);
41612
- __decorateClass([
41613
- n5()
41614
- ], WccSidebar.prototype, "dashboardRef", 2);
41615
- __decorateClass([
41616
- n5()
41617
- ], WccSidebar.prototype, "isFullscreen", 2);
41618
- WccSidebar = __decorateClass([
41619
- t4("wcc-sidebar")
41620
- ], WccSidebar);
42211
+
42212
+ // ts_web/elements/wcc-recording-panel.ts
42213
+ var _isExporting_dec, _isDraggingTrim_dec, _videoDuration_dec, _trimEnd_dec, _trimStart_dec, _previewVideoUrl_dec, _recordingDuration_dec, _audioLevel_dec, _availableMicrophones_dec, _selectedMicrophoneId_dec, _audioEnabled_dec, _recordingMode_dec, _panelState_dec, _dashboardRef_dec2, _a4, _WccRecordingPanel_decorators, _init4, _dashboardRef2, _panelState, _recordingMode, _audioEnabled, _selectedMicrophoneId, _availableMicrophones, _audioLevel, _recordingDuration, _previewVideoUrl, _trimStart, _trimEnd, _videoDuration, _isDraggingTrim, _isExporting;
42214
+ _WccRecordingPanel_decorators = [t4("wcc-recording-panel")];
42215
+ var WccRecordingPanel = class extends (_a4 = DeesElement, _dashboardRef_dec2 = [n5({ attribute: false })], _panelState_dec = [r5()], _recordingMode_dec = [r5()], _audioEnabled_dec = [r5()], _selectedMicrophoneId_dec = [r5()], _availableMicrophones_dec = [r5()], _audioLevel_dec = [r5()], _recordingDuration_dec = [r5()], _previewVideoUrl_dec = [r5()], _trimStart_dec = [r5()], _trimEnd_dec = [r5()], _videoDuration_dec = [r5()], _isDraggingTrim_dec = [r5()], _isExporting_dec = [r5()], _a4) {
42216
+ constructor() {
42217
+ super();
42218
+ __privateAdd(this, _dashboardRef2, __runInitializers(_init4, 8, this)), __runInitializers(_init4, 11, this);
42219
+ __privateAdd(this, _panelState, __runInitializers(_init4, 12, this, "options")), __runInitializers(_init4, 15, this);
42220
+ __privateAdd(this, _recordingMode, __runInitializers(_init4, 16, this, "viewport")), __runInitializers(_init4, 19, this);
42221
+ __privateAdd(this, _audioEnabled, __runInitializers(_init4, 20, this, false)), __runInitializers(_init4, 23, this);
42222
+ __privateAdd(this, _selectedMicrophoneId, __runInitializers(_init4, 24, this, "")), __runInitializers(_init4, 27, this);
42223
+ __privateAdd(this, _availableMicrophones, __runInitializers(_init4, 28, this, [])), __runInitializers(_init4, 31, this);
42224
+ __privateAdd(this, _audioLevel, __runInitializers(_init4, 32, this, 0)), __runInitializers(_init4, 35, this);
42225
+ __privateAdd(this, _recordingDuration, __runInitializers(_init4, 36, this, 0)), __runInitializers(_init4, 39, this);
42226
+ __privateAdd(this, _previewVideoUrl, __runInitializers(_init4, 40, this, "")), __runInitializers(_init4, 43, this);
42227
+ __privateAdd(this, _trimStart, __runInitializers(_init4, 44, this, 0)), __runInitializers(_init4, 47, this);
42228
+ __privateAdd(this, _trimEnd, __runInitializers(_init4, 48, this, 0)), __runInitializers(_init4, 51, this);
42229
+ __privateAdd(this, _videoDuration, __runInitializers(_init4, 52, this, 0)), __runInitializers(_init4, 55, this);
42230
+ __privateAdd(this, _isDraggingTrim, __runInitializers(_init4, 56, this, null)), __runInitializers(_init4, 59, this);
42231
+ __privateAdd(this, _isExporting, __runInitializers(_init4, 60, this, false)), __runInitializers(_init4, 63, this);
42232
+ // Service instance
42233
+ __publicField(this, "recorderService");
42234
+ this.recorderService = new RecorderService({
42235
+ onDurationUpdate: (duration) => {
42236
+ this.recordingDuration = duration;
42237
+ this.dispatchEvent(new CustomEvent("duration-update", {
42238
+ detail: { duration },
42239
+ bubbles: true,
42240
+ composed: true
42241
+ }));
42242
+ },
42243
+ onRecordingComplete: (blob) => {
42244
+ this.handleRecordingComplete(blob);
42245
+ },
42246
+ onAudioLevelUpdate: (level) => {
42247
+ this.audioLevel = level;
42248
+ },
42249
+ onStreamEnded: () => {
42250
+ this.stopRecording();
42251
+ }
42252
+ });
42253
+ }
42254
+ render() {
42255
+ if (this.panelState === "options") {
42256
+ return this.renderOptionsPanel();
42257
+ } else if (this.panelState === "preview") {
42258
+ return this.renderPreviewModal();
42259
+ }
42260
+ return x``;
42261
+ }
42262
+ renderOptionsPanel() {
42263
+ return x`
42264
+ <div class="recording-options-panel">
42265
+ <div class="recording-options-header">
42266
+ <span class="recording-options-title">Recording Settings</span>
42267
+ <button class="recording-options-close" @click=${() => this.close()}>✕</button>
42268
+ </div>
42269
+ <div class="recording-options-content">
42270
+ <div class="recording-option-group">
42271
+ <div class="recording-option-label">Record Area</div>
42272
+ <div class="recording-mode-buttons">
42273
+ <button
42274
+ class="recording-mode-btn ${this.recordingMode === "viewport" ? "selected" : ""}"
42275
+ @click=${() => this.recordingMode = "viewport"}
42276
+ >
42277
+ Viewport Only
42278
+ </button>
42279
+ <button
42280
+ class="recording-mode-btn ${this.recordingMode === "screen" ? "selected" : ""}"
42281
+ @click=${() => this.recordingMode = "screen"}
42282
+ >
42283
+ Entire Screen
42284
+ </button>
42285
+ </div>
42286
+ </div>
42287
+
42288
+ <div class="recording-option-group">
42289
+ <div class="recording-option-label">Audio</div>
42290
+ <div class="audio-toggle">
42291
+ <input
42292
+ type="checkbox"
42293
+ id="audioToggle"
42294
+ ?checked=${this.audioEnabled}
42295
+ @change=${(e10) => this.handleAudioToggle(e10.target.checked)}
42296
+ />
42297
+ <label for="audioToggle">Enable Microphone</label>
42298
+ </div>
42299
+
42300
+ ${this.audioEnabled ? x`
42301
+ <select
42302
+ class="microphone-select"
42303
+ .value=${this.selectedMicrophoneId}
42304
+ @change=${(e10) => this.handleMicrophoneChange(e10.target.value)}
42305
+ >
42306
+ <option value="">Select Microphone...</option>
42307
+ ${this.availableMicrophones.map((mic) => x`
42308
+ <option value=${mic.deviceId}>${mic.label || `Microphone ${mic.deviceId.slice(0, 8)}`}</option>
42309
+ `)}
42310
+ </select>
42311
+
42312
+ ${this.selectedMicrophoneId ? x`
42313
+ <div class="audio-level-container">
42314
+ <div class="audio-level-label">Input Level</div>
42315
+ <div class="audio-level-bar">
42316
+ <div class="audio-level-fill" style="width: ${this.audioLevel}%"></div>
42317
+ </div>
42318
+ </div>
42319
+ ` : null}
42320
+ ` : null}
42321
+ </div>
42322
+
42323
+ <button class="start-recording-btn" @click=${() => this.startRecording()}>
42324
+ <div class="rec-dot"></div>
42325
+ Start Recording
42326
+ </button>
42327
+ </div>
42328
+ </div>
42329
+ `;
42330
+ }
42331
+ renderPreviewModal() {
42332
+ return x`
42333
+ <div class="preview-modal-overlay" @click=${(e10) => {
42334
+ if (e10.target.classList.contains("preview-modal-overlay")) {
42335
+ this.discardRecording();
42336
+ }
42337
+ }}>
42338
+ <div class="preview-modal">
42339
+ <div class="preview-modal-header">
42340
+ <span class="preview-modal-title">Recording Preview</span>
42341
+ <button class="preview-modal-close" @click=${() => this.discardRecording()}>✕</button>
42342
+ </div>
42343
+ <div class="preview-modal-content">
42344
+ <div class="preview-video-container">
42345
+ <video
42346
+ class="preview-video"
42347
+ src=${this.previewVideoUrl}
42348
+ controls
42349
+ @loadedmetadata=${(e10) => this.handleVideoLoaded(e10.target)}
42350
+ ></video>
42351
+ </div>
42352
+
42353
+ <!-- Trim Section -->
42354
+ <div class="trim-section">
42355
+ <div class="trim-section-header">
42356
+ <span class="trim-section-title">Trim Video</span>
42357
+ <span class="trim-duration-info">
42358
+ ${this.formatDuration(Math.floor(this.trimEnd - this.trimStart))}
42359
+ ${this.trimStart > 0 || this.trimEnd < this.videoDuration ? `(trimmed from ${this.formatDuration(Math.floor(this.videoDuration))})` : ""}
42360
+ </span>
42361
+ </div>
42362
+
42363
+ <div
42364
+ class="trim-timeline"
42365
+ @mousedown=${(e10) => this.handleTimelineClick(e10)}
42366
+ @mousemove=${(e10) => this.handleTimelineDrag(e10)}
42367
+ @mouseup=${() => this.handleTimelineDragEnd()}
42368
+ @mouseleave=${() => this.handleTimelineDragEnd()}
42369
+ >
42370
+ <div class="trim-track"></div>
42371
+ <div
42372
+ class="trim-selected"
42373
+ style="left: ${this.getHandlePositionStyle(this.trimStart)}; right: ${this.getHandlePositionFromEndStyle(this.trimEnd)};"
42374
+ ></div>
42375
+ <div
42376
+ class="trim-handle start-handle"
42377
+ style="left: ${this.getHandlePositionStyle(this.trimStart)};"
42378
+ @mousedown=${(e10) => {
42379
+ e10.stopPropagation();
42380
+ this.isDraggingTrim = "start";
42381
+ }}
42382
+ ></div>
42383
+ <div
42384
+ class="trim-handle end-handle"
42385
+ style="left: ${this.getHandlePositionStyle(this.trimEnd)};"
42386
+ @mousedown=${(e10) => {
42387
+ e10.stopPropagation();
42388
+ this.isDraggingTrim = "end";
42389
+ }}
42390
+ ></div>
42391
+ </div>
42392
+
42393
+ <div class="trim-time-labels">
42394
+ <span>${this.formatDuration(Math.floor(this.trimStart))}</span>
42395
+ <span>${this.formatDuration(Math.floor(this.trimEnd))}</span>
42396
+ </div>
42397
+
42398
+ <div class="trim-actions">
42399
+ <button class="trim-action-btn" @click=${() => this.resetTrim()}>
42400
+ Reset Trim
42401
+ </button>
42402
+ <button class="trim-action-btn" @click=${() => this.previewTrimmedSection()}>
42403
+ Preview Selection
42404
+ </button>
42405
+ </div>
42406
+ </div>
42407
+
42408
+ </div>
42409
+ <div class="preview-modal-actions">
42410
+ <button class="preview-btn secondary" @click=${() => this.discardRecording()}>Discard</button>
42411
+ <button
42412
+ class="preview-btn primary"
42413
+ ?disabled=${this.isExporting}
42414
+ @click=${() => this.downloadRecording()}
42415
+ >
42416
+ ${this.isExporting ? x`<span class="export-spinner"></span>Exporting...` : "Download WebM"}
42417
+ </button>
42418
+ </div>
42419
+ </div>
42420
+ </div>
42421
+ `;
42422
+ }
42423
+ // ==================== Audio Methods ====================
42424
+ async handleAudioToggle(enabled) {
42425
+ this.audioEnabled = enabled;
42426
+ if (enabled) {
42427
+ this.availableMicrophones = await this.recorderService.loadMicrophones(true);
42428
+ if (this.availableMicrophones.length > 0 && !this.selectedMicrophoneId) {
42429
+ this.selectedMicrophoneId = this.availableMicrophones[0].deviceId;
42430
+ await this.recorderService.startAudioMonitoring(this.selectedMicrophoneId);
42431
+ }
42432
+ } else {
42433
+ this.recorderService.stopAudioMonitoring();
42434
+ this.selectedMicrophoneId = "";
42435
+ this.audioLevel = 0;
42436
+ }
42437
+ }
42438
+ async handleMicrophoneChange(deviceId) {
42439
+ this.selectedMicrophoneId = deviceId;
42440
+ if (deviceId) {
42441
+ await this.recorderService.startAudioMonitoring(deviceId);
42442
+ } else {
42443
+ this.recorderService.stopAudioMonitoring();
42444
+ this.audioLevel = 0;
42445
+ }
42446
+ }
42447
+ // ==================== Recording Methods ====================
42448
+ async startRecording() {
42449
+ try {
42450
+ let viewportElement;
42451
+ if (this.recordingMode === "viewport" && this.dashboardRef) {
42452
+ const wccFrame = await this.dashboardRef.wccFrame;
42453
+ viewportElement = await wccFrame.getViewportElement();
42454
+ }
42455
+ await this.recorderService.startRecording({
42456
+ mode: this.recordingMode,
42457
+ audioDeviceId: this.audioEnabled ? this.selectedMicrophoneId : void 0,
42458
+ viewportElement
42459
+ });
42460
+ this.panelState = "recording";
42461
+ this.dispatchEvent(new CustomEvent("recording-start", {
42462
+ bubbles: true,
42463
+ composed: true
42464
+ }));
42465
+ } catch (error) {
42466
+ console.error("Failed to start recording:", error);
42467
+ this.panelState = "options";
42468
+ }
42469
+ }
42470
+ stopRecording() {
42471
+ this.recorderService.stopRecording();
42472
+ }
42473
+ handleRecordingComplete(blob) {
42474
+ if (this.previewVideoUrl) {
42475
+ URL.revokeObjectURL(this.previewVideoUrl);
42476
+ }
42477
+ this.previewVideoUrl = URL.createObjectURL(blob);
42478
+ this.panelState = "preview";
42479
+ this.dispatchEvent(new CustomEvent("recording-stop", {
42480
+ bubbles: true,
42481
+ composed: true
42482
+ }));
42483
+ }
42484
+ discardRecording() {
42485
+ if (this.previewVideoUrl) {
42486
+ URL.revokeObjectURL(this.previewVideoUrl);
42487
+ this.previewVideoUrl = "";
42488
+ }
42489
+ this.recorderService.reset();
42490
+ this.trimStart = 0;
42491
+ this.trimEnd = 0;
42492
+ this.videoDuration = 0;
42493
+ this.isExporting = false;
42494
+ this.recordingDuration = 0;
42495
+ this.close();
42496
+ }
42497
+ async downloadRecording() {
42498
+ const recordedBlob = this.recorderService.recordedBlob;
42499
+ if (!recordedBlob) return;
42500
+ this.isExporting = true;
42501
+ try {
42502
+ let blobToDownload;
42503
+ const needsTrim = this.trimStart > 0.1 || this.trimEnd < this.videoDuration - 0.1;
42504
+ if (needsTrim) {
42505
+ const video = this.shadowRoot?.querySelector(".preview-video");
42506
+ if (video) {
42507
+ blobToDownload = await this.recorderService.exportTrimmedVideo(video, this.trimStart, this.trimEnd);
42508
+ } else {
42509
+ blobToDownload = recordedBlob;
42510
+ }
42511
+ } else {
42512
+ blobToDownload = recordedBlob;
42513
+ }
42514
+ const timestamp2 = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
42515
+ const filename = `wcctools-recording-${timestamp2}.webm`;
42516
+ const url = URL.createObjectURL(blobToDownload);
42517
+ const a4 = document.createElement("a");
42518
+ a4.href = url;
42519
+ a4.download = filename;
42520
+ document.body.appendChild(a4);
42521
+ a4.click();
42522
+ document.body.removeChild(a4);
42523
+ URL.revokeObjectURL(url);
42524
+ this.discardRecording();
42525
+ } catch (error) {
42526
+ console.error("Error exporting video:", error);
42527
+ this.isExporting = false;
42528
+ }
42529
+ }
42530
+ // ==================== Trim Methods ====================
42531
+ handleVideoLoaded(video) {
42532
+ const duration = Number.isFinite(video.duration) ? video.duration : this.recordingDuration;
42533
+ this.videoDuration = duration;
42534
+ this.trimStart = 0;
42535
+ this.trimEnd = duration;
42536
+ }
42537
+ formatDuration(seconds) {
42538
+ const mins = Math.floor(seconds / 60);
42539
+ const secs = seconds % 60;
42540
+ return `${mins.toString().padStart(2, "0")}:${secs.toString().padStart(2, "0")}`;
42541
+ }
42542
+ getHandlePositionStyle(time) {
42543
+ if (this.videoDuration === 0) return "12px";
42544
+ const percentage = time / this.videoDuration;
42545
+ return `calc(12px + ${(percentage * 100).toFixed(2)}% - ${(percentage * 24).toFixed(2)}px)`;
42546
+ }
42547
+ getHandlePositionFromEndStyle(time) {
42548
+ if (this.videoDuration === 0) return "12px";
42549
+ const percentage = time / this.videoDuration;
42550
+ const remainingPercentage = 1 - percentage;
42551
+ return `calc(12px + ${(remainingPercentage * 100).toFixed(2)}% - ${(remainingPercentage * 24).toFixed(2)}px)`;
42552
+ }
42553
+ handleTimelineClick(e10) {
42554
+ if (this.isDraggingTrim) return;
42555
+ const timeline = e10.currentTarget;
42556
+ const rect = timeline.getBoundingClientRect();
42557
+ const x2 = e10.clientX - rect.left;
42558
+ const percentage = Math.max(0, Math.min(1, (x2 - 12) / (rect.width - 24)));
42559
+ const time = percentage * this.videoDuration;
42560
+ const video = this.shadowRoot?.querySelector(".preview-video");
42561
+ if (video) {
42562
+ video.currentTime = time;
42563
+ }
42564
+ }
42565
+ handleTimelineDrag(e10) {
42566
+ if (!this.isDraggingTrim) return;
42567
+ const timeline = e10.currentTarget;
42568
+ const rect = timeline.getBoundingClientRect();
42569
+ const x2 = e10.clientX - rect.left;
42570
+ const percentage = Math.max(0, Math.min(1, (x2 - 12) / (rect.width - 24)));
42571
+ const time = percentage * this.videoDuration;
42572
+ const minDuration = 1;
42573
+ if (this.isDraggingTrim === "start") {
42574
+ this.trimStart = Math.min(time, this.trimEnd - minDuration);
42575
+ this.trimStart = Math.max(0, this.trimStart);
42576
+ } else if (this.isDraggingTrim === "end") {
42577
+ this.trimEnd = Math.max(time, this.trimStart + minDuration);
42578
+ this.trimEnd = Math.min(this.videoDuration, this.trimEnd);
42579
+ }
42580
+ const video = this.shadowRoot?.querySelector(".preview-video");
42581
+ if (video) {
42582
+ video.currentTime = this.isDraggingTrim === "start" ? this.trimStart : this.trimEnd;
42583
+ }
42584
+ }
42585
+ handleTimelineDragEnd() {
42586
+ this.isDraggingTrim = null;
42587
+ }
42588
+ resetTrim() {
42589
+ this.trimStart = 0;
42590
+ this.trimEnd = this.videoDuration;
42591
+ const video = this.shadowRoot?.querySelector(".preview-video");
42592
+ if (video) {
42593
+ video.currentTime = 0;
42594
+ }
42595
+ }
42596
+ previewTrimmedSection() {
42597
+ const video = this.shadowRoot?.querySelector(".preview-video");
42598
+ if (!video) return;
42599
+ video.currentTime = this.trimStart;
42600
+ video.play();
42601
+ const checkTime = () => {
42602
+ if (video.currentTime >= this.trimEnd) {
42603
+ video.pause();
42604
+ video.removeEventListener("timeupdate", checkTime);
42605
+ }
42606
+ };
42607
+ video.addEventListener("timeupdate", checkTime);
42608
+ }
42609
+ // ==================== Lifecycle ====================
42610
+ close() {
42611
+ this.recorderService.stopAudioMonitoring();
42612
+ this.dispatchEvent(new CustomEvent("close", {
42613
+ bubbles: true,
42614
+ composed: true
42615
+ }));
42616
+ }
42617
+ async disconnectedCallback() {
42618
+ await super.disconnectedCallback();
42619
+ this.recorderService.dispose();
42620
+ if (this.previewVideoUrl) {
42621
+ URL.revokeObjectURL(this.previewVideoUrl);
42622
+ }
42623
+ }
42624
+ };
42625
+ _init4 = __decoratorStart(_a4);
42626
+ _dashboardRef2 = new WeakMap();
42627
+ _panelState = new WeakMap();
42628
+ _recordingMode = new WeakMap();
42629
+ _audioEnabled = new WeakMap();
42630
+ _selectedMicrophoneId = new WeakMap();
42631
+ _availableMicrophones = new WeakMap();
42632
+ _audioLevel = new WeakMap();
42633
+ _recordingDuration = new WeakMap();
42634
+ _previewVideoUrl = new WeakMap();
42635
+ _trimStart = new WeakMap();
42636
+ _trimEnd = new WeakMap();
42637
+ _videoDuration = new WeakMap();
42638
+ _isDraggingTrim = new WeakMap();
42639
+ _isExporting = new WeakMap();
42640
+ __decorateElement(_init4, 4, "dashboardRef", _dashboardRef_dec2, WccRecordingPanel, _dashboardRef2);
42641
+ __decorateElement(_init4, 4, "panelState", _panelState_dec, WccRecordingPanel, _panelState);
42642
+ __decorateElement(_init4, 4, "recordingMode", _recordingMode_dec, WccRecordingPanel, _recordingMode);
42643
+ __decorateElement(_init4, 4, "audioEnabled", _audioEnabled_dec, WccRecordingPanel, _audioEnabled);
42644
+ __decorateElement(_init4, 4, "selectedMicrophoneId", _selectedMicrophoneId_dec, WccRecordingPanel, _selectedMicrophoneId);
42645
+ __decorateElement(_init4, 4, "availableMicrophones", _availableMicrophones_dec, WccRecordingPanel, _availableMicrophones);
42646
+ __decorateElement(_init4, 4, "audioLevel", _audioLevel_dec, WccRecordingPanel, _audioLevel);
42647
+ __decorateElement(_init4, 4, "recordingDuration", _recordingDuration_dec, WccRecordingPanel, _recordingDuration);
42648
+ __decorateElement(_init4, 4, "previewVideoUrl", _previewVideoUrl_dec, WccRecordingPanel, _previewVideoUrl);
42649
+ __decorateElement(_init4, 4, "trimStart", _trimStart_dec, WccRecordingPanel, _trimStart);
42650
+ __decorateElement(_init4, 4, "trimEnd", _trimEnd_dec, WccRecordingPanel, _trimEnd);
42651
+ __decorateElement(_init4, 4, "videoDuration", _videoDuration_dec, WccRecordingPanel, _videoDuration);
42652
+ __decorateElement(_init4, 4, "isDraggingTrim", _isDraggingTrim_dec, WccRecordingPanel, _isDraggingTrim);
42653
+ __decorateElement(_init4, 4, "isExporting", _isExporting_dec, WccRecordingPanel, _isExporting);
42654
+ WccRecordingPanel = __decorateElement(_init4, 0, "WccRecordingPanel", _WccRecordingPanel_decorators, WccRecordingPanel);
42655
+ __publicField(WccRecordingPanel, "styles", [
42656
+ i`
42657
+ :host {
42658
+ /* CSS Variables */
42659
+ --background: #0a0a0a;
42660
+ --foreground: #e5e5e5;
42661
+ --input: #141414;
42662
+ --primary: #3b82f6;
42663
+ --border: rgba(255, 255, 255, 0.06);
42664
+ --radius-sm: 2px;
42665
+ --radius-md: 4px;
42666
+ --radius-lg: 6px;
42667
+ }
42668
+
42669
+ /* Recording Options Panel */
42670
+ .recording-options-panel {
42671
+ position: fixed;
42672
+ right: 16px;
42673
+ bottom: 116px;
42674
+ width: 360px;
42675
+ background: #0c0c0c;
42676
+ border: 1px solid rgba(255, 255, 255, 0.1);
42677
+ border-radius: var(--radius-md);
42678
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
42679
+ z-index: 1000;
42680
+ overflow: hidden;
42681
+ font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
42682
+ }
42683
+
42684
+ .recording-options-header {
42685
+ padding: 0.75rem 1rem;
42686
+ background: rgba(255, 255, 255, 0.02);
42687
+ border-bottom: 1px solid rgba(255, 255, 255, 0.05);
42688
+ display: flex;
42689
+ justify-content: space-between;
42690
+ align-items: center;
42691
+ }
42692
+
42693
+ .recording-options-title {
42694
+ font-size: 0.8rem;
42695
+ font-weight: 500;
42696
+ color: #ccc;
42697
+ }
42698
+
42699
+ .recording-options-close {
42700
+ width: 24px;
42701
+ height: 24px;
42702
+ background: transparent;
42703
+ border: none;
42704
+ color: #666;
42705
+ cursor: pointer;
42706
+ display: flex;
42707
+ align-items: center;
42708
+ justify-content: center;
42709
+ border-radius: var(--radius-sm);
42710
+ transition: all 0.15s ease;
42711
+ }
42712
+
42713
+ .recording-options-close:hover {
42714
+ background: rgba(255, 255, 255, 0.05);
42715
+ color: #999;
42716
+ }
42717
+
42718
+ .recording-options-content {
42719
+ padding: 1rem;
42720
+ }
42721
+
42722
+ .recording-option-group {
42723
+ margin-bottom: 1rem;
42724
+ }
42725
+
42726
+ .recording-option-group:last-child {
42727
+ margin-bottom: 0;
42728
+ }
42729
+
42730
+ .recording-option-label {
42731
+ font-size: 0.7rem;
42732
+ font-weight: 500;
42733
+ color: #888;
42734
+ text-transform: uppercase;
42735
+ letter-spacing: 0.05em;
42736
+ margin-bottom: 0.5rem;
42737
+ }
42738
+
42739
+ .recording-mode-buttons {
42740
+ display: flex;
42741
+ gap: 0.5rem;
42742
+ }
42743
+
42744
+ .recording-mode-btn {
42745
+ flex: 1;
42746
+ padding: 0.6rem 0.75rem;
42747
+ background: var(--input);
42748
+ border: 1px solid transparent;
42749
+ border-radius: var(--radius-sm);
42750
+ color: #999;
42751
+ font-size: 0.75rem;
42752
+ cursor: pointer;
42753
+ transition: all 0.15s ease;
42754
+ text-align: center;
42755
+ }
42756
+
42757
+ .recording-mode-btn:hover {
42758
+ border-color: var(--primary);
42759
+ color: #ccc;
42760
+ }
42761
+
42762
+ .recording-mode-btn.selected {
42763
+ background: rgba(59, 130, 246, 0.15);
42764
+ border-color: var(--primary);
42765
+ color: var(--primary);
42766
+ }
42767
+
42768
+ .audio-toggle {
42769
+ display: flex;
42770
+ align-items: center;
42771
+ gap: 0.5rem;
42772
+ margin-bottom: 0.75rem;
42773
+ }
42774
+
42775
+ .audio-toggle input[type="checkbox"] {
42776
+ width: 1rem;
42777
+ height: 1rem;
42778
+ accent-color: var(--primary);
42779
+ }
42780
+
42781
+ .audio-toggle label {
42782
+ font-size: 0.75rem;
42783
+ color: #999;
42784
+ cursor: pointer;
42785
+ }
42786
+
42787
+ .microphone-select {
42788
+ width: 100%;
42789
+ padding: 0.5rem 0.75rem;
42790
+ background: var(--input);
42791
+ border: 1px solid transparent;
42792
+ border-radius: var(--radius-sm);
42793
+ color: var(--foreground);
42794
+ font-size: 0.75rem;
42795
+ outline: none;
42796
+ cursor: pointer;
42797
+ transition: all 0.15s ease;
42798
+ }
42799
+
42800
+ .microphone-select:focus {
42801
+ border-color: var(--primary);
42802
+ }
42803
+
42804
+ .microphone-select:disabled {
42805
+ opacity: 0.5;
42806
+ cursor: not-allowed;
42807
+ }
42808
+
42809
+ .audio-level-container {
42810
+ margin-top: 0.75rem;
42811
+ padding: 0.5rem;
42812
+ background: rgba(255, 255, 255, 0.02);
42813
+ border-radius: var(--radius-sm);
42814
+ }
42815
+
42816
+ .audio-level-label {
42817
+ font-size: 0.65rem;
42818
+ color: #666;
42819
+ margin-bottom: 0.25rem;
42820
+ }
42821
+
42822
+ .audio-level-bar {
42823
+ height: 8px;
42824
+ background: var(--input);
42825
+ border-radius: 4px;
42826
+ overflow: hidden;
42827
+ }
42828
+
42829
+ .audio-level-fill {
42830
+ height: 100%;
42831
+ background: linear-gradient(90deg, #22c55e, #84cc16, #eab308);
42832
+ border-radius: 4px;
42833
+ transition: width 0.1s ease;
42834
+ }
42835
+
42836
+ .start-recording-btn {
42837
+ width: 100%;
42838
+ padding: 0.75rem;
42839
+ background: #dc2626;
42840
+ border: none;
42841
+ border-radius: var(--radius-sm);
42842
+ color: white;
42843
+ font-size: 0.8rem;
42844
+ font-weight: 500;
42845
+ cursor: pointer;
42846
+ transition: all 0.15s ease;
42847
+ margin-top: 1rem;
42848
+ display: flex;
42849
+ align-items: center;
42850
+ justify-content: center;
42851
+ gap: 0.5rem;
42852
+ }
42853
+
42854
+ .start-recording-btn:hover {
42855
+ background: #b91c1c;
42856
+ }
42857
+
42858
+ .start-recording-btn .rec-dot {
42859
+ width: 10px;
42860
+ height: 10px;
42861
+ background: white;
42862
+ border-radius: 50%;
42863
+ }
42864
+
42865
+ /* Preview Modal */
42866
+ .preview-modal-overlay {
42867
+ position: fixed;
42868
+ top: 0;
42869
+ left: 0;
42870
+ right: 0;
42871
+ bottom: 0;
42872
+ background: rgba(0, 0, 0, 0.8);
42873
+ display: flex;
42874
+ align-items: center;
42875
+ justify-content: center;
42876
+ z-index: 1000;
42877
+ backdrop-filter: blur(4px);
42878
+ font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
42879
+ }
42880
+
42881
+ .preview-modal {
42882
+ width: 90%;
42883
+ max-width: 800px;
42884
+ background: #0c0c0c;
42885
+ border: 1px solid rgba(255, 255, 255, 0.1);
42886
+ border-radius: var(--radius-lg);
42887
+ overflow: hidden;
42888
+ box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
42889
+ }
42890
+
42891
+ .preview-modal-header {
42892
+ padding: 1rem 1.25rem;
42893
+ background: rgba(255, 255, 255, 0.02);
42894
+ border-bottom: 1px solid rgba(255, 255, 255, 0.05);
42895
+ display: flex;
42896
+ justify-content: space-between;
42897
+ align-items: center;
42898
+ }
42899
+
42900
+ .preview-modal-title {
42901
+ font-size: 0.9rem;
42902
+ font-weight: 500;
42903
+ color: #ccc;
42904
+ }
42905
+
42906
+ .preview-modal-close {
42907
+ width: 28px;
42908
+ height: 28px;
42909
+ background: transparent;
42910
+ border: none;
42911
+ color: #666;
42912
+ cursor: pointer;
42913
+ display: flex;
42914
+ align-items: center;
42915
+ justify-content: center;
42916
+ border-radius: var(--radius-sm);
42917
+ font-size: 1.2rem;
42918
+ transition: all 0.15s ease;
42919
+ }
42920
+
42921
+ .preview-modal-close:hover {
42922
+ background: rgba(255, 255, 255, 0.05);
42923
+ color: #999;
42924
+ }
42925
+
42926
+ .preview-modal-content {
42927
+ padding: 1.25rem;
42928
+ }
42929
+
42930
+ .preview-video-container {
42931
+ background: #000;
42932
+ border-radius: var(--radius-sm);
42933
+ overflow: hidden;
42934
+ aspect-ratio: 16 / 9;
42935
+ }
42936
+
42937
+ .preview-video {
42938
+ width: 100%;
42939
+ height: 100%;
42940
+ object-fit: contain;
42941
+ }
42942
+
42943
+ .preview-modal-actions {
42944
+ padding: 1rem 1.25rem;
42945
+ border-top: 1px solid rgba(255, 255, 255, 0.05);
42946
+ display: flex;
42947
+ justify-content: flex-end;
42948
+ gap: 0.75rem;
42949
+ }
42950
+
42951
+ .preview-btn {
42952
+ padding: 0.6rem 1.25rem;
42953
+ border-radius: var(--radius-sm);
42954
+ font-size: 0.8rem;
42955
+ font-weight: 500;
42956
+ cursor: pointer;
42957
+ transition: all 0.15s ease;
42958
+ }
42959
+
42960
+ .preview-btn.secondary {
42961
+ background: transparent;
42962
+ border: 1px solid rgba(255, 255, 255, 0.1);
42963
+ color: #999;
42964
+ }
42965
+
42966
+ .preview-btn.secondary:hover {
42967
+ border-color: rgba(255, 255, 255, 0.2);
42968
+ color: #ccc;
42969
+ }
42970
+
42971
+ .preview-btn.primary {
42972
+ background: var(--primary);
42973
+ border: none;
42974
+ color: white;
42975
+ }
42976
+
42977
+ .preview-btn.primary:hover {
42978
+ background: #2563eb;
42979
+ }
42980
+
42981
+ .preview-btn.primary:disabled {
42982
+ background: #1e3a5f;
42983
+ cursor: not-allowed;
42984
+ opacity: 0.7;
42985
+ }
42986
+
42987
+ /* Trim Timeline Styles */
42988
+ .trim-section {
42989
+ margin-top: 1.25rem;
42990
+ padding-top: 1.25rem;
42991
+ border-top: 1px solid rgba(255, 255, 255, 0.05);
42992
+ }
42993
+
42994
+ .trim-section-header {
42995
+ display: flex;
42996
+ justify-content: space-between;
42997
+ align-items: center;
42998
+ margin-bottom: 0.75rem;
42999
+ }
43000
+
43001
+ .trim-section-title {
43002
+ font-size: 0.75rem;
43003
+ font-weight: 500;
43004
+ color: #888;
43005
+ text-transform: uppercase;
43006
+ letter-spacing: 0.05em;
43007
+ }
43008
+
43009
+ .trim-duration-info {
43010
+ font-size: 0.7rem;
43011
+ color: #666;
43012
+ font-family: 'Consolas', 'Monaco', monospace;
43013
+ }
43014
+
43015
+ .trim-timeline {
43016
+ position: relative;
43017
+ height: 48px;
43018
+ background: var(--input);
43019
+ border-radius: var(--radius-sm);
43020
+ margin-bottom: 0.75rem;
43021
+ user-select: none;
43022
+ }
43023
+
43024
+ .trim-track {
43025
+ position: absolute;
43026
+ top: 50%;
43027
+ left: 12px;
43028
+ right: 12px;
43029
+ height: 6px;
43030
+ background: #333;
43031
+ transform: translateY(-50%);
43032
+ border-radius: 3px;
43033
+ }
43034
+
43035
+ .trim-selected {
43036
+ position: absolute;
43037
+ top: 50%;
43038
+ height: 6px;
43039
+ background: var(--primary);
43040
+ transform: translateY(-50%);
43041
+ border-radius: 3px;
43042
+ pointer-events: none;
43043
+ }
43044
+
43045
+ .trim-handle {
43046
+ position: absolute;
43047
+ top: 50%;
43048
+ width: 16px;
43049
+ height: 36px;
43050
+ background: white;
43051
+ border: 2px solid var(--primary);
43052
+ border-radius: 4px;
43053
+ transform: translate(-50%, -50%);
43054
+ cursor: ew-resize;
43055
+ z-index: 2;
43056
+ display: flex;
43057
+ align-items: center;
43058
+ justify-content: center;
43059
+ transition: background 0.15s ease, transform 0.1s ease;
43060
+ }
43061
+
43062
+ .trim-handle:hover {
43063
+ background: #e0e0e0;
43064
+ }
43065
+
43066
+ .trim-handle:active {
43067
+ background: var(--primary);
43068
+ transform: translate(-50%, -50%) scale(1.05);
43069
+ }
43070
+
43071
+ .trim-handle::before {
43072
+ content: '';
43073
+ width: 2px;
43074
+ height: 16px;
43075
+ background: #666;
43076
+ border-radius: 1px;
43077
+ }
43078
+
43079
+ .trim-handle:active::before {
43080
+ background: white;
43081
+ }
43082
+
43083
+ .trim-time-labels {
43084
+ display: flex;
43085
+ justify-content: space-between;
43086
+ font-size: 0.65rem;
43087
+ color: #666;
43088
+ font-family: 'Consolas', 'Monaco', monospace;
43089
+ padding: 0 12px;
43090
+ }
43091
+
43092
+ .trim-actions {
43093
+ display: flex;
43094
+ gap: 0.5rem;
43095
+ margin-top: 0.75rem;
43096
+ }
43097
+
43098
+ .trim-action-btn {
43099
+ flex: 1;
43100
+ padding: 0.5rem 0.75rem;
43101
+ background: var(--input);
43102
+ border: 1px solid transparent;
43103
+ border-radius: var(--radius-sm);
43104
+ color: #999;
43105
+ font-size: 0.75rem;
43106
+ cursor: pointer;
43107
+ transition: all 0.15s ease;
43108
+ text-align: center;
43109
+ }
43110
+
43111
+ .trim-action-btn:hover {
43112
+ border-color: var(--primary);
43113
+ color: #ccc;
43114
+ }
43115
+
43116
+ .export-spinner {
43117
+ display: inline-block;
43118
+ width: 14px;
43119
+ height: 14px;
43120
+ border: 2px solid rgba(255, 255, 255, 0.3);
43121
+ border-radius: 50%;
43122
+ border-top-color: white;
43123
+ animation: spin 0.8s linear infinite;
43124
+ margin-right: 0.5rem;
43125
+ }
43126
+
43127
+ @keyframes spin {
43128
+ to { transform: rotate(360deg); }
43129
+ }
43130
+
43131
+ `
43132
+ ]);
43133
+ __runInitializers(_init4, 1, WccRecordingPanel);
41621
43134
 
41622
43135
  // ts_web/elements/wcc-properties.ts
43136
+ var _recordingDuration_dec2, _isRecording_dec, _showRecordingPanel_dec, _editingProperties_dec, _propertyContent_dec, _isFullscreen_dec3, _warning_dec, _selectedTheme_dec, _selectedViewport_dec, _selectedItem_dec2, _dashboardRef_dec3, _a5, _WccProperties_decorators, _init5, _dashboardRef3, _selectedItem2, _selectedViewport, _selectedTheme, _warning, _isFullscreen3, _propertyContent, _editingProperties, _showRecordingPanel, _isRecording, _recordingDuration2;
41623
43137
  var environment = "native";
41624
43138
  var setEnvironment = (envArg) => {
41625
43139
  environment = envArg;
41626
43140
  };
41627
- var WccProperties = class extends DeesElement {
43141
+ _WccProperties_decorators = [t4("wcc-properties")];
43142
+ var WccProperties = class extends (_a5 = DeesElement, _dashboardRef_dec3 = [n5({
43143
+ type: WccDashboard2
43144
+ })], _selectedItem_dec2 = [n5()], _selectedViewport_dec = [n5()], _selectedTheme_dec = [n5()], _warning_dec = [n5()], _isFullscreen_dec3 = [n5()], _propertyContent_dec = [r5()], _editingProperties_dec = [r5()], _showRecordingPanel_dec = [r5()], _isRecording_dec = [r5()], _recordingDuration_dec2 = [r5()], _a5) {
41628
43145
  constructor() {
41629
43146
  super(...arguments);
41630
- this.selectedViewport = "native";
41631
- this.selectedTheme = "dark";
41632
- this.warning = null;
41633
- this.isFullscreen = false;
41634
- this.propertyContent = [];
41635
- this.editingProperties = [];
41636
- this.editorHeight = 300;
43147
+ __privateAdd(this, _dashboardRef3, __runInitializers(_init5, 8, this)), __runInitializers(_init5, 11, this);
43148
+ __privateAdd(this, _selectedItem2, __runInitializers(_init5, 12, this)), __runInitializers(_init5, 15, this);
43149
+ __privateAdd(this, _selectedViewport, __runInitializers(_init5, 16, this, "native")), __runInitializers(_init5, 19, this);
43150
+ __privateAdd(this, _selectedTheme, __runInitializers(_init5, 20, this, "dark")), __runInitializers(_init5, 23, this);
43151
+ __privateAdd(this, _warning, __runInitializers(_init5, 24, this, null)), __runInitializers(_init5, 27, this);
43152
+ __privateAdd(this, _isFullscreen3, __runInitializers(_init5, 28, this, false)), __runInitializers(_init5, 31, this);
43153
+ __privateAdd(this, _propertyContent, __runInitializers(_init5, 32, this, [])), __runInitializers(_init5, 35, this);
43154
+ __privateAdd(this, _editingProperties, __runInitializers(_init5, 36, this, [])), __runInitializers(_init5, 39, this);
43155
+ __privateAdd(this, _showRecordingPanel, __runInitializers(_init5, 40, this, false)), __runInitializers(_init5, 43, this);
43156
+ __privateAdd(this, _isRecording, __runInitializers(_init5, 44, this, false)), __runInitializers(_init5, 47, this);
43157
+ __privateAdd(this, _recordingDuration2, __runInitializers(_init5, 48, this, 0)), __runInitializers(_init5, 51, this);
43158
+ __publicField(this, "editorHeight", 300);
41637
43159
  }
41638
43160
  render() {
41639
43161
  return x`
@@ -41673,7 +43195,7 @@ var WccProperties = class extends DeesElement {
41673
43195
  }
41674
43196
  .grid {
41675
43197
  display: grid;
41676
- grid-template-columns: 1fr 150px 300px 70px;
43198
+ grid-template-columns: 1fr 150px 300px 70px 70px;
41677
43199
  height: 100%;
41678
43200
  }
41679
43201
  .properties {
@@ -42236,9 +43758,36 @@ var WccProperties = class extends DeesElement {
42236
43758
  ${this.isFullscreen ? "fullscreen_exit" : "fullscreen"}
42237
43759
  </i>
42238
43760
  </div>
43761
+ <!-- Recording Button -->
43762
+ <wcc-record-button
43763
+ .state=${this.isRecording ? "recording" : "idle"}
43764
+ .duration=${this.recordingDuration}
43765
+ @record-click=${() => this.handleRecordButtonClick()}
43766
+ ></wcc-record-button>
42239
43767
  </div>
42240
43768
  ${this.warning ? x`<div class="warning">${this.warning}</div>` : null}
42241
43769
  </div>
43770
+
43771
+ <!-- Recording Panel (options + preview) -->
43772
+ ${this.showRecordingPanel ? x`
43773
+ <wcc-recording-panel
43774
+ .dashboardRef=${this.dashboardRef}
43775
+ @recording-start=${() => {
43776
+ this.isRecording = true;
43777
+ }}
43778
+ @recording-stop=${() => {
43779
+ this.isRecording = false;
43780
+ }}
43781
+ @duration-update=${(e10) => {
43782
+ this.recordingDuration = e10.detail.duration;
43783
+ }}
43784
+ @close=${() => {
43785
+ this.showRecordingPanel = false;
43786
+ this.isRecording = false;
43787
+ this.recordingDuration = 0;
43788
+ }}
43789
+ ></wcc-recording-panel>
43790
+ ` : null}
42242
43791
  `;
42243
43792
  }
42244
43793
  async findElementRecursively(container, elementClass, maxDepth = 5) {
@@ -42524,51 +44073,66 @@ var WccProperties = class extends DeesElement {
42524
44073
  })
42525
44074
  );
42526
44075
  }
42527
- };
42528
- __decorateClass([
42529
- n5({
42530
- type: WccDashboard2
42531
- })
42532
- ], WccProperties.prototype, "dashboardRef", 2);
42533
- __decorateClass([
42534
- n5()
42535
- ], WccProperties.prototype, "selectedItem", 2);
42536
- __decorateClass([
42537
- n5()
42538
- ], WccProperties.prototype, "selectedViewport", 2);
42539
- __decorateClass([
42540
- n5()
42541
- ], WccProperties.prototype, "selectedTheme", 2);
42542
- __decorateClass([
42543
- n5()
42544
- ], WccProperties.prototype, "warning", 2);
42545
- __decorateClass([
42546
- n5()
42547
- ], WccProperties.prototype, "isFullscreen", 2);
42548
- __decorateClass([
42549
- r5()
42550
- ], WccProperties.prototype, "propertyContent", 2);
42551
- __decorateClass([
42552
- r5()
42553
- ], WccProperties.prototype, "editingProperties", 2);
42554
- WccProperties = __decorateClass([
42555
- t4("wcc-properties")
42556
- ], WccProperties);
44076
+ // ==================== Recording Methods ====================
44077
+ handleRecordButtonClick() {
44078
+ if (this.isRecording) {
44079
+ const panel = this.shadowRoot?.querySelector("wcc-recording-panel");
44080
+ if (panel && panel.stopRecording) {
44081
+ panel.stopRecording();
44082
+ }
44083
+ } else {
44084
+ this.showRecordingPanel = !this.showRecordingPanel;
44085
+ }
44086
+ }
44087
+ };
44088
+ _init5 = __decoratorStart(_a5);
44089
+ _dashboardRef3 = new WeakMap();
44090
+ _selectedItem2 = new WeakMap();
44091
+ _selectedViewport = new WeakMap();
44092
+ _selectedTheme = new WeakMap();
44093
+ _warning = new WeakMap();
44094
+ _isFullscreen3 = new WeakMap();
44095
+ _propertyContent = new WeakMap();
44096
+ _editingProperties = new WeakMap();
44097
+ _showRecordingPanel = new WeakMap();
44098
+ _isRecording = new WeakMap();
44099
+ _recordingDuration2 = new WeakMap();
44100
+ __decorateElement(_init5, 4, "dashboardRef", _dashboardRef_dec3, WccProperties, _dashboardRef3);
44101
+ __decorateElement(_init5, 4, "selectedItem", _selectedItem_dec2, WccProperties, _selectedItem2);
44102
+ __decorateElement(_init5, 4, "selectedViewport", _selectedViewport_dec, WccProperties, _selectedViewport);
44103
+ __decorateElement(_init5, 4, "selectedTheme", _selectedTheme_dec, WccProperties, _selectedTheme);
44104
+ __decorateElement(_init5, 4, "warning", _warning_dec, WccProperties, _warning);
44105
+ __decorateElement(_init5, 4, "isFullscreen", _isFullscreen_dec3, WccProperties, _isFullscreen3);
44106
+ __decorateElement(_init5, 4, "propertyContent", _propertyContent_dec, WccProperties, _propertyContent);
44107
+ __decorateElement(_init5, 4, "editingProperties", _editingProperties_dec, WccProperties, _editingProperties);
44108
+ __decorateElement(_init5, 4, "showRecordingPanel", _showRecordingPanel_dec, WccProperties, _showRecordingPanel);
44109
+ __decorateElement(_init5, 4, "isRecording", _isRecording_dec, WccProperties, _isRecording);
44110
+ __decorateElement(_init5, 4, "recordingDuration", _recordingDuration_dec2, WccProperties, _recordingDuration2);
44111
+ WccProperties = __decorateElement(_init5, 0, "WccProperties", _WccProperties_decorators, WccProperties);
44112
+ __runInitializers(_init5, 1, WccProperties);
42557
44113
 
42558
44114
  // ts_web/elements/wcc-dashboard.ts
42559
- var WccDashboard2 = class extends DeesElement {
44115
+ var _wccFrame_dec, _warning_dec2, _elements_dec, _pages_dec, _isFullscreen_dec4, _selectedTheme_dec2, _selectedViewport_dec2, _selectedDemoIndex_dec, _selectedItem_dec3, _selectedItemName_dec, _selectedType_dec2, _a6, _WccDashboard_decorators, _init6, _selectedType2, _selectedItemName, _selectedItem3, _selectedDemoIndex, _selectedViewport2, _selectedTheme2, _isFullscreen4, _pages, _elements, _warning2, _wccFrame;
44116
+ _WccDashboard_decorators = [t4("wcc-dashboard")];
44117
+ var WccDashboard2 = class extends (_a6 = DeesElement, _selectedType_dec2 = [n5()], _selectedItemName_dec = [n5()], _selectedItem_dec3 = [n5()], _selectedDemoIndex_dec = [n5({ type: Number })], _selectedViewport_dec2 = [n5()], _selectedTheme_dec2 = [n5()], _isFullscreen_dec4 = [n5()], _pages_dec = [n5()], _elements_dec = [n5()], _warning_dec2 = [n5()], _wccFrame_dec = [r7("wcc-frame")], _a6) {
42560
44118
  constructor(elementsArg, pagesArg) {
42561
44119
  super();
42562
- this.selectedViewport = "desktop";
42563
- this.selectedTheme = "dark";
42564
- this.isFullscreen = false;
42565
- this.pages = {};
42566
- this.elements = {};
42567
- this.warning = null;
42568
- this.frameScrollY = 0;
42569
- this.sidebarScrollY = 0;
42570
- this.scrollPositionsApplied = false;
42571
- this.scrollListenersAttached = false;
44120
+ __privateAdd(this, _selectedType2, __runInitializers(_init6, 8, this)), __runInitializers(_init6, 11, this);
44121
+ __privateAdd(this, _selectedItemName, __runInitializers(_init6, 12, this)), __runInitializers(_init6, 15, this);
44122
+ __privateAdd(this, _selectedItem3, __runInitializers(_init6, 16, this)), __runInitializers(_init6, 19, this);
44123
+ __privateAdd(this, _selectedDemoIndex, __runInitializers(_init6, 20, this, 0)), __runInitializers(_init6, 23, this);
44124
+ __privateAdd(this, _selectedViewport2, __runInitializers(_init6, 24, this, "desktop")), __runInitializers(_init6, 27, this);
44125
+ __privateAdd(this, _selectedTheme2, __runInitializers(_init6, 28, this, "dark")), __runInitializers(_init6, 31, this);
44126
+ __privateAdd(this, _isFullscreen4, __runInitializers(_init6, 32, this, false)), __runInitializers(_init6, 35, this);
44127
+ __privateAdd(this, _pages, __runInitializers(_init6, 36, this, {})), __runInitializers(_init6, 39, this);
44128
+ __privateAdd(this, _elements, __runInitializers(_init6, 40, this, {})), __runInitializers(_init6, 43, this);
44129
+ __privateAdd(this, _warning2, __runInitializers(_init6, 44, this, null)), __runInitializers(_init6, 47, this);
44130
+ __publicField(this, "frameScrollY", 0);
44131
+ __publicField(this, "sidebarScrollY", 0);
44132
+ __publicField(this, "scrollPositionsApplied", false);
44133
+ __privateAdd(this, _wccFrame, __runInitializers(_init6, 48, this)), __runInitializers(_init6, 51, this);
44134
+ __publicField(this, "scrollUpdateTimeout");
44135
+ __publicField(this, "scrollListenersAttached", false);
42572
44136
  if (elementsArg) {
42573
44137
  this.elements = elementsArg;
42574
44138
  console.log("got elements:");
@@ -42655,11 +44219,42 @@ var WccDashboard2 = class extends DeesElement {
42655
44219
  setTimeout(() => {
42656
44220
  this.setupScrollListeners();
42657
44221
  }, 500);
44222
+ this.domtools.router.on(
44223
+ "/wcctools-route/:itemType/:itemName/:demoIndex/:viewport/:theme",
44224
+ async (routeInfo) => {
44225
+ this.selectedType = routeInfo.params.itemType;
44226
+ this.selectedItemName = routeInfo.params.itemName;
44227
+ this.selectedDemoIndex = parseInt(routeInfo.params.demoIndex) || 0;
44228
+ this.selectedViewport = routeInfo.params.viewport;
44229
+ this.selectedTheme = routeInfo.params.theme;
44230
+ if (routeInfo.params.itemType === "element") {
44231
+ this.selectedItem = this.elements[routeInfo.params.itemName];
44232
+ } else if (routeInfo.params.itemType === "page") {
44233
+ this.selectedItem = this.pages[routeInfo.params.itemName];
44234
+ }
44235
+ if (routeInfo.queryParams) {
44236
+ const frameScrollY = routeInfo.queryParams.frameScrollY;
44237
+ const sidebarScrollY = routeInfo.queryParams.sidebarScrollY;
44238
+ if (frameScrollY) {
44239
+ this.frameScrollY = parseInt(frameScrollY);
44240
+ }
44241
+ if (sidebarScrollY) {
44242
+ this.sidebarScrollY = parseInt(sidebarScrollY);
44243
+ }
44244
+ setTimeout(() => {
44245
+ this.applyScrollPositions();
44246
+ }, 100);
44247
+ }
44248
+ const domtoolsInstance = await dist_ts_exports25.elementBasic.setup();
44249
+ this.selectedTheme === "bright" ? domtoolsInstance.themeManager.goBright() : domtoolsInstance.themeManager.goDark();
44250
+ }
44251
+ );
42658
44252
  this.domtools.router.on(
42659
44253
  "/wcctools-route/:itemType/:itemName/:viewport/:theme",
42660
44254
  async (routeInfo) => {
42661
44255
  this.selectedType = routeInfo.params.itemType;
42662
44256
  this.selectedItemName = routeInfo.params.itemName;
44257
+ this.selectedDemoIndex = 0;
42663
44258
  this.selectedViewport = routeInfo.params.viewport;
42664
44259
  this.selectedTheme = routeInfo.params.theme;
42665
44260
  if (routeInfo.params.itemType === "element") {
@@ -42712,20 +44307,29 @@ var WccDashboard2 = class extends DeesElement {
42712
44307
  this.setWarning(`component ${anonItem.name} does not expose a demo property.`);
42713
44308
  return;
42714
44309
  }
42715
- if (!(typeof anonItem.demo === "function")) {
44310
+ const isArray3 = Array.isArray(anonItem.demo);
44311
+ const isFunction2 = typeof anonItem.demo === "function";
44312
+ if (!isArray3 && !isFunction2) {
44313
+ this.setWarning(
44314
+ `component ${anonItem.name} has demo property, but it is not a function or array of functions`
44315
+ );
44316
+ return;
44317
+ }
44318
+ const demoFactory = getDemoAtIndex(anonItem.demo, this.selectedDemoIndex);
44319
+ if (!demoFactory) {
42716
44320
  this.setWarning(
42717
- `component ${anonItem.name} has demo property, but it is not of type function`
44321
+ `component ${anonItem.name} does not have a demo at index ${this.selectedDemoIndex + 1}`
42718
44322
  );
42719
44323
  return;
42720
44324
  }
42721
44325
  this.setWarning(null);
42722
44326
  const viewport = await wccFrame.getViewportElement();
42723
- const demoTemplate = await resolveTemplateFactory(() => anonItem.demo());
44327
+ const demoTemplate = await resolveTemplateFactory(demoFactory);
42724
44328
  B(demoTemplate, viewport);
42725
44329
  }
42726
44330
  }
42727
44331
  buildUrl() {
42728
- const baseUrl = `/wcctools-route/${this.selectedType}/${this.selectedItemName}/${this.selectedViewport}/${this.selectedTheme}`;
44332
+ const baseUrl = `/wcctools-route/${this.selectedType}/${this.selectedItemName}/${this.selectedDemoIndex}/${this.selectedViewport}/${this.selectedTheme}`;
42729
44333
  const queryParams = new URLSearchParams();
42730
44334
  if (this.frameScrollY > 0) {
42731
44335
  queryParams.set("frameScrollY", this.frameScrollY.toString());
@@ -42764,7 +44368,7 @@ var WccDashboard2 = class extends DeesElement {
42764
44368
  }, 300);
42765
44369
  }
42766
44370
  updateUrlWithScrollState() {
42767
- const baseUrl = `/wcctools-route/${this.selectedType}/${this.selectedItemName}/${this.selectedViewport}/${this.selectedTheme}`;
44371
+ const baseUrl = `/wcctools-route/${this.selectedType}/${this.selectedItemName}/${this.selectedDemoIndex}/${this.selectedViewport}/${this.selectedTheme}`;
42768
44372
  const queryParams = new URLSearchParams();
42769
44373
  if (this.frameScrollY > 0) {
42770
44374
  queryParams.set("frameScrollY", this.frameScrollY.toString());
@@ -42791,39 +44395,31 @@ var WccDashboard2 = class extends DeesElement {
42791
44395
  this.scrollPositionsApplied = true;
42792
44396
  }
42793
44397
  };
42794
- __decorateClass([
42795
- n5()
42796
- ], WccDashboard2.prototype, "selectedType", 2);
42797
- __decorateClass([
42798
- n5()
42799
- ], WccDashboard2.prototype, "selectedItemName", 2);
42800
- __decorateClass([
42801
- n5()
42802
- ], WccDashboard2.prototype, "selectedItem", 2);
42803
- __decorateClass([
42804
- n5()
42805
- ], WccDashboard2.prototype, "selectedViewport", 2);
42806
- __decorateClass([
42807
- n5()
42808
- ], WccDashboard2.prototype, "selectedTheme", 2);
42809
- __decorateClass([
42810
- n5()
42811
- ], WccDashboard2.prototype, "isFullscreen", 2);
42812
- __decorateClass([
42813
- n5()
42814
- ], WccDashboard2.prototype, "pages", 2);
42815
- __decorateClass([
42816
- n5()
42817
- ], WccDashboard2.prototype, "elements", 2);
42818
- __decorateClass([
42819
- n5()
42820
- ], WccDashboard2.prototype, "warning", 2);
42821
- __decorateClass([
42822
- r7("wcc-frame")
42823
- ], WccDashboard2.prototype, "wccFrame", 2);
42824
- WccDashboard2 = __decorateClass([
42825
- t4("wcc-dashboard")
42826
- ], WccDashboard2);
44398
+ _init6 = __decoratorStart(_a6);
44399
+ _selectedType2 = new WeakMap();
44400
+ _selectedItemName = new WeakMap();
44401
+ _selectedItem3 = new WeakMap();
44402
+ _selectedDemoIndex = new WeakMap();
44403
+ _selectedViewport2 = new WeakMap();
44404
+ _selectedTheme2 = new WeakMap();
44405
+ _isFullscreen4 = new WeakMap();
44406
+ _pages = new WeakMap();
44407
+ _elements = new WeakMap();
44408
+ _warning2 = new WeakMap();
44409
+ _wccFrame = new WeakMap();
44410
+ __decorateElement(_init6, 4, "selectedType", _selectedType_dec2, WccDashboard2, _selectedType2);
44411
+ __decorateElement(_init6, 4, "selectedItemName", _selectedItemName_dec, WccDashboard2, _selectedItemName);
44412
+ __decorateElement(_init6, 4, "selectedItem", _selectedItem_dec3, WccDashboard2, _selectedItem3);
44413
+ __decorateElement(_init6, 4, "selectedDemoIndex", _selectedDemoIndex_dec, WccDashboard2, _selectedDemoIndex);
44414
+ __decorateElement(_init6, 4, "selectedViewport", _selectedViewport_dec2, WccDashboard2, _selectedViewport2);
44415
+ __decorateElement(_init6, 4, "selectedTheme", _selectedTheme_dec2, WccDashboard2, _selectedTheme2);
44416
+ __decorateElement(_init6, 4, "isFullscreen", _isFullscreen_dec4, WccDashboard2, _isFullscreen4);
44417
+ __decorateElement(_init6, 4, "pages", _pages_dec, WccDashboard2, _pages);
44418
+ __decorateElement(_init6, 4, "elements", _elements_dec, WccDashboard2, _elements);
44419
+ __decorateElement(_init6, 4, "warning", _warning_dec2, WccDashboard2, _warning2);
44420
+ __decorateElement(_init6, 4, "wccFrame", _wccFrame_dec, WccDashboard2, _wccFrame);
44421
+ WccDashboard2 = __decorateElement(_init6, 0, "WccDashboard", _WccDashboard_decorators, WccDashboard2);
44422
+ __runInitializers(_init6, 1, WccDashboard2);
42827
44423
 
42828
44424
  // ts_web/index.ts
42829
44425
  var setupWccTools = (elementsArg, pagesArg) => {
@@ -42851,20 +44447,34 @@ __export(elements_exports, {
42851
44447
  });
42852
44448
 
42853
44449
  // test/elements/test-demoelement.ts
44450
+ var _demoENum_dec, _demoNumber_dec, _demoString_dec, _demoBoolean_dec, _notTypedAndNotInitizalized_dec, _typedAndNotInitizalized_dec, _notTyped_dec, _a7, _TestDemoelement_decorators, _init7, _notTyped, _typedAndNotInitizalized, _notTypedAndNotInitizalized, _demoBoolean, _demoString, _demoNumber, _demoENum;
42854
44451
  var ETestEnum = /* @__PURE__ */ ((ETestEnum2) => {
42855
44452
  ETestEnum2["first"] = "first";
42856
44453
  ETestEnum2["second"] = "second";
42857
44454
  ETestEnum2["awesome"] = "awesome";
42858
44455
  return ETestEnum2;
42859
44456
  })(ETestEnum || {});
42860
- var TestDemoelement = class extends DeesElement {
44457
+ _TestDemoelement_decorators = [t4("test-demoelement")];
44458
+ var TestDemoelement = class extends (_a7 = DeesElement, _notTyped_dec = [n5()], _typedAndNotInitizalized_dec = [n5({
44459
+ type: String
44460
+ })], _notTypedAndNotInitizalized_dec = [n5()], _demoBoolean_dec = [n5({
44461
+ type: Boolean
44462
+ })], _demoString_dec = [n5({
44463
+ type: String
44464
+ })], _demoNumber_dec = [n5({
44465
+ type: Number
44466
+ })], _demoENum_dec = [n5({
44467
+ type: ETestEnum
44468
+ })], _a7) {
42861
44469
  constructor() {
42862
44470
  super();
42863
- this.notTyped = "hello";
42864
- this.demoBoolean = false;
42865
- this.demoString = "default demo string";
42866
- this.demoNumber = 2;
42867
- this.demoENum = "first" /* first */;
44471
+ __privateAdd(this, _notTyped, __runInitializers(_init7, 8, this, "hello")), __runInitializers(_init7, 11, this);
44472
+ __privateAdd(this, _typedAndNotInitizalized, __runInitializers(_init7, 12, this)), __runInitializers(_init7, 15, this);
44473
+ __privateAdd(this, _notTypedAndNotInitizalized, __runInitializers(_init7, 16, this)), __runInitializers(_init7, 19, this);
44474
+ __privateAdd(this, _demoBoolean, __runInitializers(_init7, 20, this, false)), __runInitializers(_init7, 23, this);
44475
+ __privateAdd(this, _demoString, __runInitializers(_init7, 24, this, "default demo string")), __runInitializers(_init7, 27, this);
44476
+ __privateAdd(this, _demoNumber, __runInitializers(_init7, 28, this, 2)), __runInitializers(_init7, 31, this);
44477
+ __privateAdd(this, _demoENum, __runInitializers(_init7, 32, this, "first" /* first */)), __runInitializers(_init7, 35, this);
42868
44478
  }
42869
44479
  render() {
42870
44480
  return x`
@@ -42883,8 +44493,28 @@ var TestDemoelement = class extends DeesElement {
42883
44493
  `;
42884
44494
  }
42885
44495
  };
42886
- TestDemoelement.demo = () => x`<test-demoelement>This is a slot text</test-demoelement>`;
42887
- TestDemoelement.styles = [
44496
+ _init7 = __decoratorStart(_a7);
44497
+ _notTyped = new WeakMap();
44498
+ _typedAndNotInitizalized = new WeakMap();
44499
+ _notTypedAndNotInitizalized = new WeakMap();
44500
+ _demoBoolean = new WeakMap();
44501
+ _demoString = new WeakMap();
44502
+ _demoNumber = new WeakMap();
44503
+ _demoENum = new WeakMap();
44504
+ __decorateElement(_init7, 4, "notTyped", _notTyped_dec, TestDemoelement, _notTyped);
44505
+ __decorateElement(_init7, 4, "typedAndNotInitizalized", _typedAndNotInitizalized_dec, TestDemoelement, _typedAndNotInitizalized);
44506
+ __decorateElement(_init7, 4, "notTypedAndNotInitizalized", _notTypedAndNotInitizalized_dec, TestDemoelement, _notTypedAndNotInitizalized);
44507
+ __decorateElement(_init7, 4, "demoBoolean", _demoBoolean_dec, TestDemoelement, _demoBoolean);
44508
+ __decorateElement(_init7, 4, "demoString", _demoString_dec, TestDemoelement, _demoString);
44509
+ __decorateElement(_init7, 4, "demoNumber", _demoNumber_dec, TestDemoelement, _demoNumber);
44510
+ __decorateElement(_init7, 4, "demoENum", _demoENum_dec, TestDemoelement, _demoENum);
44511
+ TestDemoelement = __decorateElement(_init7, 0, "TestDemoelement", _TestDemoelement_decorators, TestDemoelement);
44512
+ __publicField(TestDemoelement, "demo", [
44513
+ () => x`<test-demoelement>This is demo 1</test-demoelement>`,
44514
+ () => x`<test-demoelement>This is demo 2</test-demoelement>`,
44515
+ () => x`<test-demoelement>This is demo 2</test-demoelement>`
44516
+ ]);
44517
+ __publicField(TestDemoelement, "styles", [
42888
44518
  i`
42889
44519
  .maincontainer,
42890
44520
  .themeindicator {
@@ -42920,56 +44550,16 @@ TestDemoelement.styles = [
42920
44550
  color: green;
42921
44551
  }
42922
44552
  `
42923
- ];
42924
- __decorateClass([
42925
- n5()
42926
- ], TestDemoelement.prototype, "notTyped", 2);
42927
- __decorateClass([
42928
- n5({
42929
- type: String
42930
- })
42931
- ], TestDemoelement.prototype, "typedAndNotInitizalized", 2);
42932
- __decorateClass([
42933
- n5()
42934
- ], TestDemoelement.prototype, "notTypedAndNotInitizalized", 2);
42935
- __decorateClass([
42936
- n5({
42937
- type: Boolean
42938
- })
42939
- ], TestDemoelement.prototype, "demoBoolean", 2);
42940
- __decorateClass([
42941
- n5({
42942
- type: String
42943
- })
42944
- ], TestDemoelement.prototype, "demoString", 2);
42945
- __decorateClass([
42946
- n5({
42947
- type: Number
42948
- })
42949
- ], TestDemoelement.prototype, "demoNumber", 2);
42950
- __decorateClass([
42951
- n5({
42952
- type: ETestEnum
42953
- })
42954
- ], TestDemoelement.prototype, "demoENum", 2);
42955
- TestDemoelement = __decorateClass([
42956
- t4("test-demoelement")
42957
- ], TestDemoelement);
44553
+ ]);
44554
+ __runInitializers(_init7, 1, TestDemoelement);
42958
44555
 
42959
44556
  // test/elements/test-noprops.ts
42960
- var TestNoProps = class extends DeesElement {
42961
- render() {
42962
- return x`
42963
- <div class="message">
42964
- This element has no @property decorators.
42965
- Properties panel should handle this gracefully.
42966
- </div>
42967
- `;
42968
- }
42969
- };
42970
- TestNoProps.demo = () => x`<test-noprops></test-noprops>`;
42971
- TestNoProps.styles = [
42972
- i`
44557
+ var _TestNoProps_decorators, _init8, _a8;
44558
+ _TestNoProps_decorators = [t4("test-noprops")];
44559
+ var TestNoProps = class extends (_a8 = DeesElement) {
44560
+ static demo = () => x`<test-noprops></test-noprops>`;
44561
+ static styles = [
44562
+ i`
42973
44563
  :host {
42974
44564
  display: block;
42975
44565
  padding: 20px;
@@ -42982,18 +44572,29 @@ TestNoProps.styles = [
42982
44572
  color: #666;
42983
44573
  }
42984
44574
  `
42985
- ];
42986
- TestNoProps = __decorateClass([
42987
- t4("test-noprops")
42988
- ], TestNoProps);
44575
+ ];
44576
+ render() {
44577
+ return x`
44578
+ <div class="message">
44579
+ This element has no @property decorators.
44580
+ Properties panel should handle this gracefully.
44581
+ </div>
44582
+ `;
44583
+ }
44584
+ };
44585
+ _init8 = __decoratorStart(_a8);
44586
+ TestNoProps = __decorateElement(_init8, 0, "TestNoProps", _TestNoProps_decorators, TestNoProps);
44587
+ __runInitializers(_init8, 1, TestNoProps);
42989
44588
 
42990
44589
  // test/elements/test-complextypes.ts
42991
- var TestComplexTypes = class extends DeesElement {
44590
+ var _dateProperty_dec, _functionProperty_dec, _simpleObject_dec, _complexData_dec, _numberArray_dec, _stringArray_dec, _a9, _TestComplexTypes_decorators, _init9, _stringArray, _numberArray, _complexData, _simpleObject, _functionProperty, _dateProperty;
44591
+ _TestComplexTypes_decorators = [t4("test-complextypes")];
44592
+ var TestComplexTypes = class extends (_a9 = DeesElement, _stringArray_dec = [n5({ type: Array })], _numberArray_dec = [n5({ type: Array })], _complexData_dec = [n5({ attribute: false })], _simpleObject_dec = [n5({ type: Object })], _functionProperty_dec = [n5({ attribute: false })], _dateProperty_dec = [n5({ type: Date })], _a9) {
42992
44593
  constructor() {
42993
44594
  super(...arguments);
42994
- this.stringArray = ["apple", "banana", "cherry"];
42995
- this.numberArray = [1, 2, 3, 4, 5];
42996
- this.complexData = {
44595
+ __privateAdd(this, _stringArray, __runInitializers(_init9, 8, this, ["apple", "banana", "cherry"])), __runInitializers(_init9, 11, this);
44596
+ __privateAdd(this, _numberArray, __runInitializers(_init9, 12, this, [1, 2, 3, 4, 5])), __runInitializers(_init9, 15, this);
44597
+ __privateAdd(this, _complexData, __runInitializers(_init9, 16, this, {
42997
44598
  name: "Default Name",
42998
44599
  age: 0,
42999
44600
  tags: [],
@@ -43002,16 +44603,16 @@ var TestComplexTypes = class extends DeesElement {
43002
44603
  modified: /* @__PURE__ */ new Date(),
43003
44604
  author: "Unknown"
43004
44605
  }
43005
- };
43006
- this.simpleObject = {
44606
+ })), __runInitializers(_init9, 19, this);
44607
+ __privateAdd(this, _simpleObject, __runInitializers(_init9, 20, this, {
43007
44608
  key1: "value1",
43008
44609
  key2: "value2",
43009
44610
  key3: 123
43010
- };
43011
- this.functionProperty = () => {
44611
+ })), __runInitializers(_init9, 23, this);
44612
+ __privateAdd(this, _functionProperty, __runInitializers(_init9, 24, this, () => {
43012
44613
  console.log("This is a function property");
43013
- };
43014
- this.dateProperty = /* @__PURE__ */ new Date();
44614
+ })), __runInitializers(_init9, 27, this);
44615
+ __privateAdd(this, _dateProperty, __runInitializers(_init9, 28, this, /* @__PURE__ */ new Date())), __runInitializers(_init9, 31, this);
43015
44616
  }
43016
44617
  render() {
43017
44618
  return x`
@@ -43047,7 +44648,21 @@ var TestComplexTypes = class extends DeesElement {
43047
44648
  `;
43048
44649
  }
43049
44650
  };
43050
- TestComplexTypes.demo = () => x`
44651
+ _init9 = __decoratorStart(_a9);
44652
+ _stringArray = new WeakMap();
44653
+ _numberArray = new WeakMap();
44654
+ _complexData = new WeakMap();
44655
+ _simpleObject = new WeakMap();
44656
+ _functionProperty = new WeakMap();
44657
+ _dateProperty = new WeakMap();
44658
+ __decorateElement(_init9, 4, "stringArray", _stringArray_dec, TestComplexTypes, _stringArray);
44659
+ __decorateElement(_init9, 4, "numberArray", _numberArray_dec, TestComplexTypes, _numberArray);
44660
+ __decorateElement(_init9, 4, "complexData", _complexData_dec, TestComplexTypes, _complexData);
44661
+ __decorateElement(_init9, 4, "simpleObject", _simpleObject_dec, TestComplexTypes, _simpleObject);
44662
+ __decorateElement(_init9, 4, "functionProperty", _functionProperty_dec, TestComplexTypes, _functionProperty);
44663
+ __decorateElement(_init9, 4, "dateProperty", _dateProperty_dec, TestComplexTypes, _dateProperty);
44664
+ TestComplexTypes = __decorateElement(_init9, 0, "TestComplexTypes", _TestComplexTypes_decorators, TestComplexTypes);
44665
+ __publicField(TestComplexTypes, "demo", () => x`
43051
44666
  <test-complextypes
43052
44667
  .complexData=${{
43053
44668
  name: "Test User",
@@ -43060,8 +44675,8 @@ TestComplexTypes.demo = () => x`
43060
44675
  }
43061
44676
  }}
43062
44677
  ></test-complextypes>
43063
- `;
43064
- TestComplexTypes.styles = [
44678
+ `);
44679
+ __publicField(TestComplexTypes, "styles", [
43065
44680
  i`
43066
44681
  :host {
43067
44682
  display: block;
@@ -43092,31 +44707,17 @@ TestComplexTypes.styles = [
43092
44707
  overflow-x: auto;
43093
44708
  }
43094
44709
  `
43095
- ];
43096
- __decorateClass([
43097
- n5({ type: Array })
43098
- ], TestComplexTypes.prototype, "stringArray", 2);
43099
- __decorateClass([
43100
- n5({ type: Array })
43101
- ], TestComplexTypes.prototype, "numberArray", 2);
43102
- __decorateClass([
43103
- n5({ attribute: false })
43104
- ], TestComplexTypes.prototype, "complexData", 2);
43105
- __decorateClass([
43106
- n5({ type: Object })
43107
- ], TestComplexTypes.prototype, "simpleObject", 2);
43108
- __decorateClass([
43109
- n5({ attribute: false })
43110
- ], TestComplexTypes.prototype, "functionProperty", 2);
43111
- __decorateClass([
43112
- n5({ type: Date })
43113
- ], TestComplexTypes.prototype, "dateProperty", 2);
43114
- TestComplexTypes = __decorateClass([
43115
- t4("test-complextypes")
43116
- ], TestComplexTypes);
44710
+ ]);
44711
+ __runInitializers(_init9, 1, TestComplexTypes);
43117
44712
 
43118
44713
  // ts_demotools/demotools.ts
43119
- var DeesDemoWrapper = class extends DeesElement {
44714
+ var _runAfterRender_dec, _a10, _DeesDemoWrapper_decorators, _init10, _runAfterRender;
44715
+ _DeesDemoWrapper_decorators = [t4("dees-demowrapper")];
44716
+ var DeesDemoWrapper = class extends (_a10 = DeesElement, _runAfterRender_dec = [n5({ attribute: false })], _a10) {
44717
+ constructor() {
44718
+ super(...arguments);
44719
+ __privateAdd(this, _runAfterRender, __runInitializers(_init10, 8, this)), __runInitializers(_init10, 11, this);
44720
+ }
43120
44721
  render() {
43121
44722
  return x`
43122
44723
  <slot></slot>
@@ -43134,27 +44735,28 @@ var DeesDemoWrapper = class extends DeesElement {
43134
44735
  }
43135
44736
  }
43136
44737
  };
43137
- DeesDemoWrapper.styles = [
44738
+ _init10 = __decoratorStart(_a10);
44739
+ _runAfterRender = new WeakMap();
44740
+ __decorateElement(_init10, 4, "runAfterRender", _runAfterRender_dec, DeesDemoWrapper, _runAfterRender);
44741
+ DeesDemoWrapper = __decorateElement(_init10, 0, "DeesDemoWrapper", _DeesDemoWrapper_decorators, DeesDemoWrapper);
44742
+ __publicField(DeesDemoWrapper, "styles", [
43138
44743
  i`
43139
44744
  :host {
43140
44745
  display: contents;
43141
44746
  }
43142
44747
  `
43143
- ];
43144
- __decorateClass([
43145
- n5({ attribute: false })
43146
- ], DeesDemoWrapper.prototype, "runAfterRender", 2);
43147
- DeesDemoWrapper = __decorateClass([
43148
- t4("dees-demowrapper")
43149
- ], DeesDemoWrapper);
44748
+ ]);
44749
+ __runInitializers(_init10, 1, DeesDemoWrapper);
43150
44750
 
43151
44751
  // test/elements/test-withwrapper.ts
43152
- var TestWithWrapper = class extends DeesElement {
44752
+ var _isActive_dec, _counter_dec, _dynamicValue_dec, _a11, _TestWithWrapper_decorators, _init11, _dynamicValue, _counter, _isActive;
44753
+ _TestWithWrapper_decorators = [t4("test-withwrapper")];
44754
+ var TestWithWrapper = class extends (_a11 = DeesElement, _dynamicValue_dec = [n5({ type: String })], _counter_dec = [n5({ type: Number })], _isActive_dec = [n5({ type: Boolean })], _a11) {
43153
44755
  constructor() {
43154
44756
  super(...arguments);
43155
- this.dynamicValue = "Initial value";
43156
- this.counter = 0;
43157
- this.isActive = false;
44757
+ __privateAdd(this, _dynamicValue, __runInitializers(_init11, 8, this, "Initial value")), __runInitializers(_init11, 11, this);
44758
+ __privateAdd(this, _counter, __runInitializers(_init11, 12, this, 0)), __runInitializers(_init11, 15, this);
44759
+ __privateAdd(this, _isActive, __runInitializers(_init11, 16, this, false)), __runInitializers(_init11, 19, this);
43158
44760
  }
43159
44761
  render() {
43160
44762
  return x`
@@ -43178,7 +44780,15 @@ var TestWithWrapper = class extends DeesElement {
43178
44780
  `;
43179
44781
  }
43180
44782
  };
43181
- TestWithWrapper.demo = () => x`
44783
+ _init11 = __decoratorStart(_a11);
44784
+ _dynamicValue = new WeakMap();
44785
+ _counter = new WeakMap();
44786
+ _isActive = new WeakMap();
44787
+ __decorateElement(_init11, 4, "dynamicValue", _dynamicValue_dec, TestWithWrapper, _dynamicValue);
44788
+ __decorateElement(_init11, 4, "counter", _counter_dec, TestWithWrapper, _counter);
44789
+ __decorateElement(_init11, 4, "isActive", _isActive_dec, TestWithWrapper, _isActive);
44790
+ TestWithWrapper = __decorateElement(_init11, 0, "TestWithWrapper", _TestWithWrapper_decorators, TestWithWrapper);
44791
+ __publicField(TestWithWrapper, "demo", () => x`
43182
44792
  <dees-demowrapper .runAfterRender=${async (wrapper) => {
43183
44793
  console.log("DemoWrapper: Found wrapper element", wrapper);
43184
44794
  const testElement = wrapper.querySelector("test-withwrapper");
@@ -43197,8 +44807,8 @@ TestWithWrapper.demo = () => x`
43197
44807
  This div is also inside the wrapper
43198
44808
  </div>
43199
44809
  </dees-demowrapper>
43200
- `;
43201
- TestWithWrapper.styles = [
44810
+ `);
44811
+ __publicField(TestWithWrapper, "styles", [
43202
44812
  i`
43203
44813
  :host {
43204
44814
  display: block;
@@ -43236,44 +44846,35 @@ TestWithWrapper.styles = [
43236
44846
  font-family: monospace;
43237
44847
  }
43238
44848
  `
43239
- ];
43240
- __decorateClass([
43241
- n5({ type: String })
43242
- ], TestWithWrapper.prototype, "dynamicValue", 2);
43243
- __decorateClass([
43244
- n5({ type: Number })
43245
- ], TestWithWrapper.prototype, "counter", 2);
43246
- __decorateClass([
43247
- n5({ type: Boolean })
43248
- ], TestWithWrapper.prototype, "isActive", 2);
43249
- TestWithWrapper = __decorateClass([
43250
- t4("test-withwrapper")
43251
- ], TestWithWrapper);
44849
+ ]);
44850
+ __runInitializers(_init11, 1, TestWithWrapper);
43252
44851
 
43253
44852
  // test/elements/test-edgecases.ts
43254
- var TestEdgeCases = class extends DeesElement {
44853
+ var _circularRef_dec, _emptyObject_dec, _emptyArray_dec, _emptyString_dec, _booleanNumber_dec, _booleanString_dec, _floatNumber_dec, _verySmallNumber_dec, _veryLargeNumber_dec, _nanNumber_dec, _infinityNumber_dec, _htmlString_dec, _specialChars_dec, _longString_dec, _undefinedNumber_dec, _nullableString_dec, _a12, _TestEdgeCases_decorators, _init12, _nullableString, _undefinedNumber, _longString, _specialChars, _htmlString, _infinityNumber, _nanNumber, _veryLargeNumber, _verySmallNumber, _floatNumber, _booleanString, _booleanNumber, _emptyString, _emptyArray, _emptyObject, _circularRef;
44854
+ _TestEdgeCases_decorators = [t4("test-edgecases")];
44855
+ var TestEdgeCases = class extends (_a12 = DeesElement, _nullableString_dec = [n5({ type: String })], _undefinedNumber_dec = [n5({ type: Number })], _longString_dec = [n5({ type: String })], _specialChars_dec = [n5({ type: String })], _htmlString_dec = [n5({ type: String })], _infinityNumber_dec = [n5({ type: Number })], _nanNumber_dec = [n5({ type: Number })], _veryLargeNumber_dec = [n5({ type: Number })], _verySmallNumber_dec = [n5({ type: Number })], _floatNumber_dec = [n5({ type: Number })], _booleanString_dec = [n5({ type: String })], _booleanNumber_dec = [n5({ type: Number })], _emptyString_dec = [n5({ type: String })], _emptyArray_dec = [n5({ type: Array })], _emptyObject_dec = [n5({ type: Object })], _circularRef_dec = [n5({ attribute: false })], _a12) {
43255
44856
  constructor() {
43256
44857
  super(...arguments);
43257
- this.nullableString = null;
43258
- this.undefinedNumber = void 0;
43259
- this.longString = "Lorem ipsum ".repeat(50);
43260
- this.specialChars = "!@#$%^&*()_+-=[]{}|;':\",./<>?`~";
43261
- this.htmlString = '<script>alert("test")<\/script><b>Bold text</b>';
43262
- this.infinityNumber = Infinity;
43263
- this.nanNumber = NaN;
43264
- this.veryLargeNumber = Number.MAX_SAFE_INTEGER;
43265
- this.verySmallNumber = Number.MIN_SAFE_INTEGER;
43266
- this.floatNumber = 3.14159265359;
43267
- this.booleanString = "false";
43268
- this.booleanNumber = 0;
43269
- this.emptyString = "";
43270
- this.emptyArray = [];
43271
- this.emptyObject = {};
43272
- this.circularRef = (() => {
44858
+ __privateAdd(this, _nullableString, __runInitializers(_init12, 8, this, null)), __runInitializers(_init12, 11, this);
44859
+ __privateAdd(this, _undefinedNumber, __runInitializers(_init12, 12, this)), __runInitializers(_init12, 15, this);
44860
+ __privateAdd(this, _longString, __runInitializers(_init12, 16, this, "Lorem ipsum ".repeat(50))), __runInitializers(_init12, 19, this);
44861
+ __privateAdd(this, _specialChars, __runInitializers(_init12, 20, this, "!@#$%^&*()_+-=[]{}|;':\",./<>?`~")), __runInitializers(_init12, 23, this);
44862
+ __privateAdd(this, _htmlString, __runInitializers(_init12, 24, this, '<script>alert("test")<\/script><b>Bold text</b>')), __runInitializers(_init12, 27, this);
44863
+ __privateAdd(this, _infinityNumber, __runInitializers(_init12, 28, this, Infinity)), __runInitializers(_init12, 31, this);
44864
+ __privateAdd(this, _nanNumber, __runInitializers(_init12, 32, this, NaN)), __runInitializers(_init12, 35, this);
44865
+ __privateAdd(this, _veryLargeNumber, __runInitializers(_init12, 36, this, Number.MAX_SAFE_INTEGER)), __runInitializers(_init12, 39, this);
44866
+ __privateAdd(this, _verySmallNumber, __runInitializers(_init12, 40, this, Number.MIN_SAFE_INTEGER)), __runInitializers(_init12, 43, this);
44867
+ __privateAdd(this, _floatNumber, __runInitializers(_init12, 44, this, 3.14159265359)), __runInitializers(_init12, 47, this);
44868
+ __privateAdd(this, _booleanString, __runInitializers(_init12, 48, this, "false")), __runInitializers(_init12, 51, this);
44869
+ __privateAdd(this, _booleanNumber, __runInitializers(_init12, 52, this, 0)), __runInitializers(_init12, 55, this);
44870
+ __privateAdd(this, _emptyString, __runInitializers(_init12, 56, this, "")), __runInitializers(_init12, 59, this);
44871
+ __privateAdd(this, _emptyArray, __runInitializers(_init12, 60, this, [])), __runInitializers(_init12, 63, this);
44872
+ __privateAdd(this, _emptyObject, __runInitializers(_init12, 64, this, {})), __runInitializers(_init12, 67, this);
44873
+ __privateAdd(this, _circularRef, __runInitializers(_init12, 68, this, (() => {
43273
44874
  const obj = { name: "circular" };
43274
44875
  obj.self = obj;
43275
44876
  return obj;
43276
- })();
44877
+ })())), __runInitializers(_init12, 71, this);
43277
44878
  }
43278
44879
  formatValue(value2) {
43279
44880
  if (value2 === null) return "null";
@@ -43355,8 +44956,42 @@ var TestEdgeCases = class extends DeesElement {
43355
44956
  `;
43356
44957
  }
43357
44958
  };
43358
- TestEdgeCases.demo = () => x`<test-edgecases></test-edgecases>`;
43359
- TestEdgeCases.styles = [
44959
+ _init12 = __decoratorStart(_a12);
44960
+ _nullableString = new WeakMap();
44961
+ _undefinedNumber = new WeakMap();
44962
+ _longString = new WeakMap();
44963
+ _specialChars = new WeakMap();
44964
+ _htmlString = new WeakMap();
44965
+ _infinityNumber = new WeakMap();
44966
+ _nanNumber = new WeakMap();
44967
+ _veryLargeNumber = new WeakMap();
44968
+ _verySmallNumber = new WeakMap();
44969
+ _floatNumber = new WeakMap();
44970
+ _booleanString = new WeakMap();
44971
+ _booleanNumber = new WeakMap();
44972
+ _emptyString = new WeakMap();
44973
+ _emptyArray = new WeakMap();
44974
+ _emptyObject = new WeakMap();
44975
+ _circularRef = new WeakMap();
44976
+ __decorateElement(_init12, 4, "nullableString", _nullableString_dec, TestEdgeCases, _nullableString);
44977
+ __decorateElement(_init12, 4, "undefinedNumber", _undefinedNumber_dec, TestEdgeCases, _undefinedNumber);
44978
+ __decorateElement(_init12, 4, "longString", _longString_dec, TestEdgeCases, _longString);
44979
+ __decorateElement(_init12, 4, "specialChars", _specialChars_dec, TestEdgeCases, _specialChars);
44980
+ __decorateElement(_init12, 4, "htmlString", _htmlString_dec, TestEdgeCases, _htmlString);
44981
+ __decorateElement(_init12, 4, "infinityNumber", _infinityNumber_dec, TestEdgeCases, _infinityNumber);
44982
+ __decorateElement(_init12, 4, "nanNumber", _nanNumber_dec, TestEdgeCases, _nanNumber);
44983
+ __decorateElement(_init12, 4, "veryLargeNumber", _veryLargeNumber_dec, TestEdgeCases, _veryLargeNumber);
44984
+ __decorateElement(_init12, 4, "verySmallNumber", _verySmallNumber_dec, TestEdgeCases, _verySmallNumber);
44985
+ __decorateElement(_init12, 4, "floatNumber", _floatNumber_dec, TestEdgeCases, _floatNumber);
44986
+ __decorateElement(_init12, 4, "booleanString", _booleanString_dec, TestEdgeCases, _booleanString);
44987
+ __decorateElement(_init12, 4, "booleanNumber", _booleanNumber_dec, TestEdgeCases, _booleanNumber);
44988
+ __decorateElement(_init12, 4, "emptyString", _emptyString_dec, TestEdgeCases, _emptyString);
44989
+ __decorateElement(_init12, 4, "emptyArray", _emptyArray_dec, TestEdgeCases, _emptyArray);
44990
+ __decorateElement(_init12, 4, "emptyObject", _emptyObject_dec, TestEdgeCases, _emptyObject);
44991
+ __decorateElement(_init12, 4, "circularRef", _circularRef_dec, TestEdgeCases, _circularRef);
44992
+ TestEdgeCases = __decorateElement(_init12, 0, "TestEdgeCases", _TestEdgeCases_decorators, TestEdgeCases);
44993
+ __publicField(TestEdgeCases, "demo", () => x`<test-edgecases></test-edgecases>`);
44994
+ __publicField(TestEdgeCases, "styles", [
43360
44995
  i`
43361
44996
  :host {
43362
44997
  display: block;
@@ -43394,61 +45029,13 @@ TestEdgeCases.styles = [
43394
45029
  border-radius: 2px;
43395
45030
  }
43396
45031
  `
43397
- ];
43398
- __decorateClass([
43399
- n5({ type: String })
43400
- ], TestEdgeCases.prototype, "nullableString", 2);
43401
- __decorateClass([
43402
- n5({ type: Number })
43403
- ], TestEdgeCases.prototype, "undefinedNumber", 2);
43404
- __decorateClass([
43405
- n5({ type: String })
43406
- ], TestEdgeCases.prototype, "longString", 2);
43407
- __decorateClass([
43408
- n5({ type: String })
43409
- ], TestEdgeCases.prototype, "specialChars", 2);
43410
- __decorateClass([
43411
- n5({ type: String })
43412
- ], TestEdgeCases.prototype, "htmlString", 2);
43413
- __decorateClass([
43414
- n5({ type: Number })
43415
- ], TestEdgeCases.prototype, "infinityNumber", 2);
43416
- __decorateClass([
43417
- n5({ type: Number })
43418
- ], TestEdgeCases.prototype, "nanNumber", 2);
43419
- __decorateClass([
43420
- n5({ type: Number })
43421
- ], TestEdgeCases.prototype, "veryLargeNumber", 2);
43422
- __decorateClass([
43423
- n5({ type: Number })
43424
- ], TestEdgeCases.prototype, "verySmallNumber", 2);
43425
- __decorateClass([
43426
- n5({ type: Number })
43427
- ], TestEdgeCases.prototype, "floatNumber", 2);
43428
- __decorateClass([
43429
- n5({ type: String })
43430
- ], TestEdgeCases.prototype, "booleanString", 2);
43431
- __decorateClass([
43432
- n5({ type: Number })
43433
- ], TestEdgeCases.prototype, "booleanNumber", 2);
43434
- __decorateClass([
43435
- n5({ type: String })
43436
- ], TestEdgeCases.prototype, "emptyString", 2);
43437
- __decorateClass([
43438
- n5({ type: Array })
43439
- ], TestEdgeCases.prototype, "emptyArray", 2);
43440
- __decorateClass([
43441
- n5({ type: Object })
43442
- ], TestEdgeCases.prototype, "emptyObject", 2);
43443
- __decorateClass([
43444
- n5({ attribute: false })
43445
- ], TestEdgeCases.prototype, "circularRef", 2);
43446
- TestEdgeCases = __decorateClass([
43447
- t4("test-edgecases")
43448
- ], TestEdgeCases);
45032
+ ]);
45033
+ __runInitializers(_init12, 1, TestEdgeCases);
43449
45034
 
43450
45035
  // test/elements/test-nested.ts
43451
- var TestNestedWrapper = class extends DeesElement {
45036
+ var _TestNestedWrapper_decorators, _init13, _a13, _found_dec, _depth_dec, _message_dec, _b, _TestNestedTarget_decorators, _init14, _message, _depth, _found, _testId_dec, _c, _TestNested_decorators, _init15, _testId;
45037
+ _TestNestedWrapper_decorators = [t4("test-nested-wrapper")];
45038
+ var TestNestedWrapper = class extends (_a13 = DeesElement) {
43452
45039
  render() {
43453
45040
  return x`
43454
45041
  <div style="border: 1px dashed #ccc; padding: 10px; margin: 5px;">
@@ -43457,15 +45044,16 @@ var TestNestedWrapper = class extends DeesElement {
43457
45044
  `;
43458
45045
  }
43459
45046
  };
43460
- TestNestedWrapper = __decorateClass([
43461
- t4("test-nested-wrapper")
43462
- ], TestNestedWrapper);
43463
- var TestNestedTarget = class extends DeesElement {
45047
+ _init13 = __decoratorStart(_a13);
45048
+ TestNestedWrapper = __decorateElement(_init13, 0, "TestNestedWrapper", _TestNestedWrapper_decorators, TestNestedWrapper);
45049
+ __runInitializers(_init13, 1, TestNestedWrapper);
45050
+ _TestNestedTarget_decorators = [t4("test-nested-target")];
45051
+ var TestNestedTarget = class extends (_b = DeesElement, _message_dec = [n5({ type: String })], _depth_dec = [n5({ type: Number })], _found_dec = [n5({ type: Boolean })], _b) {
43464
45052
  constructor() {
43465
45053
  super(...arguments);
43466
- this.message = "I am deeply nested!";
43467
- this.depth = 0;
43468
- this.found = false;
45054
+ __privateAdd(this, _message, __runInitializers(_init14, 8, this, "I am deeply nested!")), __runInitializers(_init14, 11, this);
45055
+ __privateAdd(this, _depth, __runInitializers(_init14, 12, this, 0)), __runInitializers(_init14, 15, this);
45056
+ __privateAdd(this, _found, __runInitializers(_init14, 16, this, false)), __runInitializers(_init14, 19, this);
43469
45057
  }
43470
45058
  render() {
43471
45059
  return x`
@@ -43478,7 +45066,15 @@ var TestNestedTarget = class extends DeesElement {
43478
45066
  `;
43479
45067
  }
43480
45068
  };
43481
- TestNestedTarget.styles = [
45069
+ _init14 = __decoratorStart(_b);
45070
+ _message = new WeakMap();
45071
+ _depth = new WeakMap();
45072
+ _found = new WeakMap();
45073
+ __decorateElement(_init14, 4, "message", _message_dec, TestNestedTarget, _message);
45074
+ __decorateElement(_init14, 4, "depth", _depth_dec, TestNestedTarget, _depth);
45075
+ __decorateElement(_init14, 4, "found", _found_dec, TestNestedTarget, _found);
45076
+ TestNestedTarget = __decorateElement(_init14, 0, "TestNestedTarget", _TestNestedTarget_decorators, TestNestedTarget);
45077
+ __publicField(TestNestedTarget, "styles", [
43482
45078
  i`
43483
45079
  :host {
43484
45080
  display: block;
@@ -43493,23 +45089,13 @@ TestNestedTarget.styles = [
43493
45089
  color: #01579b;
43494
45090
  }
43495
45091
  `
43496
- ];
43497
- __decorateClass([
43498
- n5({ type: String })
43499
- ], TestNestedTarget.prototype, "message", 2);
43500
- __decorateClass([
43501
- n5({ type: Number })
43502
- ], TestNestedTarget.prototype, "depth", 2);
43503
- __decorateClass([
43504
- n5({ type: Boolean })
43505
- ], TestNestedTarget.prototype, "found", 2);
43506
- TestNestedTarget = __decorateClass([
43507
- t4("test-nested-target")
43508
- ], TestNestedTarget);
43509
- var TestNested = class extends DeesElement {
45092
+ ]);
45093
+ __runInitializers(_init14, 1, TestNestedTarget);
45094
+ _TestNested_decorators = [t4("test-nested")];
45095
+ var TestNested = class extends (_c = DeesElement, _testId_dec = [n5({ type: String })], _c) {
43510
45096
  constructor() {
43511
45097
  super(...arguments);
43512
- this.testId = "nested-test";
45098
+ __privateAdd(this, _testId, __runInitializers(_init15, 8, this, "nested-test")), __runInitializers(_init15, 11, this);
43513
45099
  }
43514
45100
  render() {
43515
45101
  return x`
@@ -43544,10 +45130,14 @@ var TestNested = class extends DeesElement {
43544
45130
  `;
43545
45131
  }
43546
45132
  };
43547
- TestNested.demo = () => x`
45133
+ _init15 = __decoratorStart(_c);
45134
+ _testId = new WeakMap();
45135
+ __decorateElement(_init15, 4, "testId", _testId_dec, TestNested, _testId);
45136
+ TestNested = __decorateElement(_init15, 0, "TestNested", _TestNested_decorators, TestNested);
45137
+ __publicField(TestNested, "demo", () => x`
43548
45138
  <test-nested></test-nested>
43549
- `;
43550
- TestNested.styles = [
45139
+ `);
45140
+ __publicField(TestNested, "styles", [
43551
45141
  i`
43552
45142
  :host {
43553
45143
  display: block;
@@ -43568,13 +45158,8 @@ TestNested.styles = [
43568
45158
  border-radius: 4px;
43569
45159
  }
43570
45160
  `
43571
- ];
43572
- __decorateClass([
43573
- n5({ type: String })
43574
- ], TestNested.prototype, "testId", 2);
43575
- TestNested = __decorateClass([
43576
- t4("test-nested")
43577
- ], TestNested);
45161
+ ]);
45162
+ __runInitializers(_init15, 1, TestNested);
43578
45163
 
43579
45164
  // test/pages/index.ts
43580
45165
  var pages_exports = {};