@bereasoftware/time-guard 2.7.2 → 2.9.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 (52) hide show
  1. package/README.en.md +5 -1
  2. package/README.md +5 -1
  3. package/dist/adapters/temporal.adapter.d.ts +6 -2
  4. package/dist/angular/index.cjs +1 -148
  5. package/dist/angular/index.es.js +63 -112
  6. package/dist/calendars/index.cjs +1 -357
  7. package/dist/calendars/index.es.js +66 -99
  8. package/dist/chunk-C6qsp3rV.cjs +1 -0
  9. package/dist/core-BDQnStek.cjs +1 -0
  10. package/dist/core-GHK7isoa.js +1200 -0
  11. package/dist/core.d.ts +27 -1
  12. package/dist/index.d.ts +4 -2
  13. package/dist/locales/index.cjs +1 -7
  14. package/dist/locales/index.d.ts +11 -0
  15. package/dist/locales/index.es.js +3 -3
  16. package/dist/{locales-CGdn0DJN.cjs → locales-Dwe5oGoy.js} +201 -82
  17. package/dist/locales-bc-5kDuZ.cjs +1 -0
  18. package/dist/native/index.cjs +1 -48
  19. package/dist/native/index.es.js +8 -18
  20. package/dist/plugins/advanced-format/index.d.ts +8 -0
  21. package/dist/plugins/advanced-format.cjs +1 -105
  22. package/dist/plugins/advanced-format.es.js +48 -63
  23. package/dist/plugins/duration/index.d.ts +6 -0
  24. package/dist/plugins/duration.cjs +1 -258
  25. package/dist/plugins/duration.es.js +63 -165
  26. package/dist/plugins/manager.d.ts +6 -2
  27. package/dist/plugins/relative-time/index.d.ts +6 -0
  28. package/dist/plugins/relative-time.cjs +1 -166
  29. package/dist/plugins/relative-time.es.js +39 -74
  30. package/dist/qwik/index.cjs +1 -104
  31. package/dist/qwik/index.es.js +36 -94
  32. package/dist/qwik.d.ts +5 -1
  33. package/dist/react/index.cjs +1 -112
  34. package/dist/react/index.es.js +57 -91
  35. package/dist/solid/index.cjs +1 -127
  36. package/dist/solid/index.es.js +36 -116
  37. package/dist/solid.d.ts +5 -2
  38. package/dist/svelte/index.cjs +1 -398
  39. package/dist/svelte/index.es.js +85 -344
  40. package/dist/time-guard.cjs +3 -7359
  41. package/dist/time-guard.es.js +3412 -3625
  42. package/dist/time-guard.iife.js +3 -13549
  43. package/dist/time-guard.umd.js +3 -13550
  44. package/dist/types/index.d.ts +10 -0
  45. package/dist/vue/index.cjs +1 -143
  46. package/dist/vue/index.es.js +62 -116
  47. package/dist/vue.d.ts +5 -3
  48. package/package.json +3 -4
  49. package/dist/chunk-S8Y6Ng9i.cjs +0 -36
  50. package/dist/core-BIDjudpO.cjs +0 -1892
  51. package/dist/core-DWPXk3rz.js +0 -1809
  52. package/dist/locales-BUE_aq8K.js +0 -3514
@@ -577,6 +577,16 @@ export interface ITimeGuardPlugin {
577
577
  name: string;
578
578
  version: string;
579
579
  install(timeGuard: typeof TimeGuard, config?: unknown): void;
580
+ /**
581
+ * Reverses whatever install() did to `timeGuard`'s prototype/static
582
+ * surface (deleting added members, restoring wrapped ones). Optional
583
+ * for backward compatibility with plugins written before this hook
584
+ * existed — PluginManager.unuse()/clear() only call it if present, so
585
+ * omitting it just means re-registering the same plugin after a clear()
586
+ * stacks a new patch instead of starting clean (the pre-existing
587
+ * behavior, unchanged for plugins that don't implement this).
588
+ */
589
+ uninstall?(timeGuard: typeof TimeGuard): void;
580
590
  }
581
591
  /**
582
592
  * Factory interface
@@ -1,143 +1 @@
1
- /*! time-guard v2.7.2 | (c) 2026 Berea-Soft | MIT License | https://github.com/Berea-Soft/time-guard */
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const require_core = require("../core-BIDjudpO.cjs");
4
- let vue = require("vue");
5
- //#region src/vue.ts
6
- /**
7
- * Unique symbol key for injecting TimeGuard global configuration.
8
- */
9
- var TimeGuardConfigKey = Symbol("TimeGuardConfig");
10
- /**
11
- * Vue Directive for dynamically and reactively formatting dates.
12
- * Usage:
13
- * - `<span v-time-guard:format="date" data-pattern="YYYY-MM-DD"></span>`
14
- * - `<span v-time-guard:relative="date" data-locale="es"></span>`
15
- */
16
- /** Internal WeakMap to track interval timers per element (avoids `any` casts). */
17
- var directiveTimerMap = /* @__PURE__ */ new WeakMap();
18
- var vTimeGuard = {
19
- mounted(el, binding) {
20
- updateDirective(el, binding);
21
- },
22
- updated(el, binding) {
23
- updateDirective(el, binding);
24
- },
25
- unmounted(el) {
26
- const timer = directiveTimerMap.get(el);
27
- if (timer) {
28
- clearInterval(timer);
29
- directiveTimerMap.delete(el);
30
- }
31
- }
32
- };
33
- function updateDirective(el, binding) {
34
- const existingTimer = directiveTimerMap.get(el);
35
- if (existingTimer) {
36
- clearInterval(existingTimer);
37
- directiveTimerMap.delete(el);
38
- }
39
- const value = binding.value;
40
- if (value === void 0 || value === null) {
41
- el.textContent = "";
42
- return;
43
- }
44
- const mode = binding.arg || "format";
45
- const pattern = el.getAttribute("data-pattern") || "YYYY-MM-DD HH:mm:ss";
46
- const locale = el.getAttribute("data-locale") || void 0;
47
- const intervalMs = parseInt(el.getAttribute("data-interval") || "60000", 10);
48
- const numeric = el.getAttribute("data-numeric") || void 0;
49
- const render = () => {
50
- try {
51
- const tg = require_core.TimeGuard.from(value);
52
- if (mode === "relative") {
53
- const now = require_core.TimeGuard.now();
54
- el.textContent = tg.since(now).humanize({
55
- locale,
56
- numeric
57
- });
58
- } else el.textContent = locale ? tg.locale(locale).format(pattern) : tg.format(pattern);
59
- } catch {
60
- el.textContent = String(value);
61
- }
62
- };
63
- render();
64
- if (mode === "relative" || el.getAttribute("data-live") === "true") directiveTimerMap.set(el, setInterval(render, intervalMs));
65
- }
66
- /**
67
- * Vue Plugin to register a global TimeGuard configuration and register v-time-guard directive.
68
- */
69
- var TimeGuardVuePlugin = { install(app, options) {
70
- app.provide(TimeGuardConfigKey, options);
71
- app.directive("time-guard", vTimeGuard);
72
- } };
73
- /**
74
- * Vue Composable to create a reactive Ref of a TimeGuard instance.
75
- * Automatically updates when input or configuration changes.
76
- * Inherits global injected configuration as fallback.
77
- */
78
- function useTimeGuard(input, config) {
79
- const globalConfig = (0, vue.inject)(TimeGuardConfigKey, void 0);
80
- const activeConfig = config ?? globalConfig;
81
- const tg = (0, vue.ref)(require_core.TimeGuard.from(input, activeConfig));
82
- (0, vue.watch)([() => input, () => activeConfig ? JSON.stringify(activeConfig) : void 0], () => {
83
- tg.value = require_core.TimeGuard.from(input, activeConfig);
84
- }, { deep: true });
85
- return tg;
86
- }
87
- /**
88
- * Vue Composable to get a reactive TimeGuard Ref representing the current time.
89
- * Automatically updates on a specified interval (default: 1000ms).
90
- * Inherits global injected configuration as fallback.
91
- */
92
- function useCurrentTime(options) {
93
- const globalConfig = (0, vue.inject)(TimeGuardConfigKey, void 0);
94
- const activeConfig = options?.config ?? globalConfig;
95
- const interval = options?.interval ?? 1e3;
96
- const time = (0, vue.ref)(require_core.TimeGuard.now(activeConfig));
97
- const timer = setInterval(() => {
98
- time.value = require_core.TimeGuard.now(activeConfig);
99
- }, interval);
100
- (0, vue.onUnmounted)(() => {
101
- clearInterval(timer);
102
- });
103
- return time;
104
- }
105
- /**
106
- * Vue Composable that returns a reactive relative time Ref updating periodically.
107
- * Inherits global injected configuration as fallback.
108
- */
109
- function useRelativeTime(date, options) {
110
- const globalConfig = (0, vue.inject)(TimeGuardConfigKey, void 0);
111
- const interval = options?.interval ?? 6e4;
112
- const locale = options?.locale ?? globalConfig?.locale;
113
- const numeric = options?.numeric;
114
- const relative = (0, vue.ref)("");
115
- const update = () => {
116
- const tgDate = require_core.TimeGuard.from(date);
117
- const now = require_core.TimeGuard.now();
118
- relative.value = tgDate.since(now).humanize({
119
- locale,
120
- numeric
121
- });
122
- };
123
- update();
124
- const timer = setInterval(update, interval);
125
- (0, vue.watch)([
126
- () => date,
127
- () => locale,
128
- () => numeric
129
- ], () => {
130
- update();
131
- }, { deep: true });
132
- (0, vue.onUnmounted)(() => {
133
- clearInterval(timer);
134
- });
135
- return relative;
136
- }
137
- //#endregion
138
- exports.TimeGuardConfigKey = TimeGuardConfigKey;
139
- exports.TimeGuardVuePlugin = TimeGuardVuePlugin;
140
- exports.useCurrentTime = useCurrentTime;
141
- exports.useRelativeTime = useRelativeTime;
142
- exports.useTimeGuard = useTimeGuard;
143
- exports.vTimeGuard = vTimeGuard;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../core-BDQnStek.cjs");let t=require("vue");var n=Symbol(`TimeGuardConfig`),r=new WeakMap,i={mounted(e,t){a(e,t)},updated(e,t){a(e,t)},unmounted(e){let t=r.get(e);t&&(clearInterval(t),r.delete(e))}};function a(t,n){let i=r.get(t);i&&(clearInterval(i),r.delete(t));let a=n.value;if(a==null){t.textContent=``;return}let o=n.arg||`format`,s=t.getAttribute(`data-pattern`)||`YYYY-MM-DD HH:mm:ss`,c=t.getAttribute(`data-locale`)||void 0,l=parseInt(t.getAttribute(`data-interval`)||`60000`,10),u=t.getAttribute(`data-numeric`)||void 0,d=()=>{try{let n=e.i.from(a);if(o===`relative`){let r=e.i.now();t.textContent=n.since(r).humanize({locale:c,numeric:u})}else t.textContent=c?n.locale(c).format(s):n.format(s)}catch{t.textContent=String(a)}};d(),(o===`relative`||t.getAttribute(`data-live`)===`true`)&&r.set(t,setInterval(d,l))}var o={install(e,t){e.provide(n,t),e.directive(`time-guard`,i)}};function s(r,i){let a=(0,t.inject)(n,void 0),o=i??a,s=(0,t.ref)(e.i.from((0,t.toValue)(r),o));return(0,t.watch)([()=>(0,t.toValue)(r),()=>o?.locale,()=>o?.timezone,()=>o?.strict],()=>{s.value=e.i.from((0,t.toValue)(r),o)}),s}function c(r){let i=(0,t.inject)(n,void 0),a=r?.config??i,o=r?.interval??1e3,s=(0,t.ref)(e.i.now(a)),c=setInterval(()=>{s.value=e.i.now(a)},o);return(0,t.onUnmounted)(()=>{clearInterval(c)}),s}function l(r,i){let a=(0,t.inject)(n,void 0),o=i?.interval??6e4,s=i?.locale??a?.locale,c=i?.numeric,l=(0,t.ref)(``),u=()=>{l.value=e.o(r,{locale:s,numeric:c})};u();let d=setInterval(u,o);return(0,t.watch)([()=>r,()=>s,()=>c],()=>{u()},{deep:!0}),(0,t.onUnmounted)(()=>{clearInterval(d)}),l}exports.TimeGuardConfigKey=n,exports.TimeGuardVuePlugin=o,exports.useCurrentTime=c,exports.useRelativeTime=l,exports.useTimeGuard=s,exports.vTimeGuard=i;
@@ -1,137 +1,83 @@
1
- /*! time-guard v2.7.2 | (c) 2026 Berea-Soft | MIT License | https://github.com/Berea-Soft/time-guard */
2
- import { n as TimeGuard } from "../core-DWPXk3rz.js";
3
- import { inject, onUnmounted, ref, watch } from "vue";
1
+ /*! time-guard v2.9.0 | (c) 2026 Berea-Soft | MIT License | https://github.com/Berea-Soft/time-guard */
2
+ import { i as e, o as t } from "../core-GHK7isoa.js";
3
+ import { inject as n, onUnmounted as r, ref as i, toValue as a, watch as o } from "vue";
4
4
  //#region src/vue.ts
5
- /**
6
- * Unique symbol key for injecting TimeGuard global configuration.
7
- */
8
- var TimeGuardConfigKey = Symbol("TimeGuardConfig");
9
- /**
10
- * Vue Directive for dynamically and reactively formatting dates.
11
- * Usage:
12
- * - `<span v-time-guard:format="date" data-pattern="YYYY-MM-DD"></span>`
13
- * - `<span v-time-guard:relative="date" data-locale="es"></span>`
14
- */
15
- /** Internal WeakMap to track interval timers per element (avoids `any` casts). */
16
- var directiveTimerMap = /* @__PURE__ */ new WeakMap();
17
- var vTimeGuard = {
18
- mounted(el, binding) {
19
- updateDirective(el, binding);
5
+ var s = Symbol("TimeGuardConfig"), c = /* @__PURE__ */ new WeakMap(), l = {
6
+ mounted(e, t) {
7
+ u(e, t);
20
8
  },
21
- updated(el, binding) {
22
- updateDirective(el, binding);
9
+ updated(e, t) {
10
+ u(e, t);
23
11
  },
24
- unmounted(el) {
25
- const timer = directiveTimerMap.get(el);
26
- if (timer) {
27
- clearInterval(timer);
28
- directiveTimerMap.delete(el);
29
- }
12
+ unmounted(e) {
13
+ let t = c.get(e);
14
+ t && (clearInterval(t), c.delete(e));
30
15
  }
31
16
  };
32
- function updateDirective(el, binding) {
33
- const existingTimer = directiveTimerMap.get(el);
34
- if (existingTimer) {
35
- clearInterval(existingTimer);
36
- directiveTimerMap.delete(el);
37
- }
38
- const value = binding.value;
39
- if (value === void 0 || value === null) {
40
- el.textContent = "";
17
+ function u(t, n) {
18
+ let r = c.get(t);
19
+ r && (clearInterval(r), c.delete(t));
20
+ let i = n.value;
21
+ if (i == null) {
22
+ t.textContent = "";
41
23
  return;
42
24
  }
43
- const mode = binding.arg || "format";
44
- const pattern = el.getAttribute("data-pattern") || "YYYY-MM-DD HH:mm:ss";
45
- const locale = el.getAttribute("data-locale") || void 0;
46
- const intervalMs = parseInt(el.getAttribute("data-interval") || "60000", 10);
47
- const numeric = el.getAttribute("data-numeric") || void 0;
48
- const render = () => {
25
+ let a = n.arg || "format", o = t.getAttribute("data-pattern") || "YYYY-MM-DD HH:mm:ss", s = t.getAttribute("data-locale") || void 0, l = parseInt(t.getAttribute("data-interval") || "60000", 10), u = t.getAttribute("data-numeric") || void 0, d = () => {
49
26
  try {
50
- const tg = TimeGuard.from(value);
51
- if (mode === "relative") {
52
- const now = TimeGuard.now();
53
- el.textContent = tg.since(now).humanize({
54
- locale,
55
- numeric
27
+ let n = e.from(i);
28
+ if (a === "relative") {
29
+ let r = e.now();
30
+ t.textContent = n.since(r).humanize({
31
+ locale: s,
32
+ numeric: u
56
33
  });
57
- } else el.textContent = locale ? tg.locale(locale).format(pattern) : tg.format(pattern);
34
+ } else t.textContent = s ? n.locale(s).format(o) : n.format(o);
58
35
  } catch {
59
- el.textContent = String(value);
36
+ t.textContent = String(i);
60
37
  }
61
38
  };
62
- render();
63
- if (mode === "relative" || el.getAttribute("data-live") === "true") directiveTimerMap.set(el, setInterval(render, intervalMs));
39
+ d(), (a === "relative" || t.getAttribute("data-live") === "true") && c.set(t, setInterval(d, l));
64
40
  }
65
- /**
66
- * Vue Plugin to register a global TimeGuard configuration and register v-time-guard directive.
67
- */
68
- var TimeGuardVuePlugin = { install(app, options) {
69
- app.provide(TimeGuardConfigKey, options);
70
- app.directive("time-guard", vTimeGuard);
41
+ var d = { install(e, t) {
42
+ e.provide(s, t), e.directive("time-guard", l);
71
43
  } };
72
- /**
73
- * Vue Composable to create a reactive Ref of a TimeGuard instance.
74
- * Automatically updates when input or configuration changes.
75
- * Inherits global injected configuration as fallback.
76
- */
77
- function useTimeGuard(input, config) {
78
- const globalConfig = inject(TimeGuardConfigKey, void 0);
79
- const activeConfig = config ?? globalConfig;
80
- const tg = ref(TimeGuard.from(input, activeConfig));
81
- watch([() => input, () => activeConfig ? JSON.stringify(activeConfig) : void 0], () => {
82
- tg.value = TimeGuard.from(input, activeConfig);
83
- }, { deep: true });
84
- return tg;
44
+ function f(t, r) {
45
+ let c = n(s, void 0), l = r ?? c, u = i(e.from(a(t), l));
46
+ return o([
47
+ () => a(t),
48
+ () => l?.locale,
49
+ () => l?.timezone,
50
+ () => l?.strict
51
+ ], () => {
52
+ u.value = e.from(a(t), l);
53
+ }), u;
85
54
  }
86
- /**
87
- * Vue Composable to get a reactive TimeGuard Ref representing the current time.
88
- * Automatically updates on a specified interval (default: 1000ms).
89
- * Inherits global injected configuration as fallback.
90
- */
91
- function useCurrentTime(options) {
92
- const globalConfig = inject(TimeGuardConfigKey, void 0);
93
- const activeConfig = options?.config ?? globalConfig;
94
- const interval = options?.interval ?? 1e3;
95
- const time = ref(TimeGuard.now(activeConfig));
96
- const timer = setInterval(() => {
97
- time.value = TimeGuard.now(activeConfig);
98
- }, interval);
99
- onUnmounted(() => {
100
- clearInterval(timer);
101
- });
102
- return time;
55
+ function p(t) {
56
+ let a = n(s, void 0), o = t?.config ?? a, c = t?.interval ?? 1e3, l = i(e.now(o)), u = setInterval(() => {
57
+ l.value = e.now(o);
58
+ }, c);
59
+ return r(() => {
60
+ clearInterval(u);
61
+ }), l;
103
62
  }
104
- /**
105
- * Vue Composable that returns a reactive relative time Ref updating periodically.
106
- * Inherits global injected configuration as fallback.
107
- */
108
- function useRelativeTime(date, options) {
109
- const globalConfig = inject(TimeGuardConfigKey, void 0);
110
- const interval = options?.interval ?? 6e4;
111
- const locale = options?.locale ?? globalConfig?.locale;
112
- const numeric = options?.numeric;
113
- const relative = ref("");
114
- const update = () => {
115
- const tgDate = TimeGuard.from(date);
116
- const now = TimeGuard.now();
117
- relative.value = tgDate.since(now).humanize({
118
- locale,
119
- numeric
63
+ function m(e, a) {
64
+ let c = n(s, void 0), l = a?.interval ?? 6e4, u = a?.locale ?? c?.locale, d = a?.numeric, f = i(""), p = () => {
65
+ f.value = t(e, {
66
+ locale: u,
67
+ numeric: d
120
68
  });
121
69
  };
122
- update();
123
- const timer = setInterval(update, interval);
124
- watch([
125
- () => date,
126
- () => locale,
127
- () => numeric
70
+ p();
71
+ let m = setInterval(p, l);
72
+ return o([
73
+ () => e,
74
+ () => u,
75
+ () => d
128
76
  ], () => {
129
- update();
130
- }, { deep: true });
131
- onUnmounted(() => {
132
- clearInterval(timer);
133
- });
134
- return relative;
77
+ p();
78
+ }, { deep: !0 }), r(() => {
79
+ clearInterval(m);
80
+ }), f;
135
81
  }
136
82
  //#endregion
137
- export { TimeGuardConfigKey, TimeGuardVuePlugin, useCurrentTime, useRelativeTime, useTimeGuard, vTimeGuard };
83
+ export { s as TimeGuardConfigKey, d as TimeGuardVuePlugin, p as useCurrentTime, m as useRelativeTime, f as useTimeGuard, l as vTimeGuard };
package/dist/vue.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Ref, Plugin, Directive } from 'vue';
1
+ import { MaybeRefOrGetter, Ref, Plugin, Directive } from 'vue';
2
2
  import { TimeGuard, ITimeGuardConfig } from './core';
3
3
  /**
4
4
  * Unique symbol key for injecting TimeGuard global configuration.
@@ -11,10 +11,12 @@ export declare const vTimeGuard: Directive<HTMLElement, unknown>;
11
11
  export declare const TimeGuardVuePlugin: Plugin;
12
12
  /**
13
13
  * Vue Composable to create a reactive Ref of a TimeGuard instance.
14
- * Automatically updates when input or configuration changes.
14
+ * Automatically updates when input or configuration changes — input may be
15
+ * a plain value, a Ref, or a getter (anything toValue() accepts); passing a
16
+ * Ref/getter is what makes this actually reactive to that source changing.
15
17
  * Inherits global injected configuration as fallback.
16
18
  */
17
- export declare function useTimeGuard(input?: unknown, config?: ITimeGuardConfig): Ref<TimeGuard>;
19
+ export declare function useTimeGuard(input?: MaybeRefOrGetter<unknown>, config?: ITimeGuardConfig): Ref<TimeGuard>;
18
20
  /**
19
21
  * Vue Composable to get a reactive TimeGuard Ref representing the current time.
20
22
  * Automatically updates on a specified interval (default: 1000ms).
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bereasoftware/time-guard",
3
3
  "private": false,
4
- "version": "2.7.2",
4
+ "version": "2.9.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "main": "./dist/time-guard.cjs",
@@ -144,7 +144,7 @@
144
144
  "not IE 11",
145
145
  "> 1%"
146
146
  ],
147
- "homepage": "https://github.com/Berea-Soft/time-guard#readme",
147
+ "homepage": "https://time-guard.bereasoft.com/",
148
148
  "scripts": {
149
149
  "dev:docs": "pnpm --prefix docs-app install && pnpm --prefix docs-app dev",
150
150
  "build:docs": "pnpm --prefix docs-app build",
@@ -168,8 +168,7 @@
168
168
  "prepare": "husky"
169
169
  },
170
170
  "dependencies": {
171
- "@js-temporal/polyfill": "^0.5.1",
172
- "vue-icons-plus": "^0.1.9"
171
+ "@js-temporal/polyfill": "^0.5.1"
173
172
  },
174
173
  "peerDependencies": {
175
174
  "@angular/core": ">=21.2.14",
@@ -1,36 +0,0 @@
1
- /*! time-guard v2.7.2 | (c) 2026 Berea-Soft | MIT License | https://github.com/Berea-Soft/time-guard */
2
- //#region \0rolldown/runtime.js
3
- var __create = Object.create;
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
12
- key = keys[i];
13
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
- get: ((k) => from[k]).bind(null, key),
15
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
- });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
21
- value: mod,
22
- enumerable: true
23
- }) : target, mod));
24
- //#endregion
25
- Object.defineProperty(exports, "__commonJSMin", {
26
- enumerable: true,
27
- get: function() {
28
- return __commonJSMin;
29
- }
30
- });
31
- Object.defineProperty(exports, "__toESM", {
32
- enumerable: true,
33
- get: function() {
34
- return __toESM;
35
- }
36
- });