@pantograph/vue 0.23.35 → 0.25.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 (120) hide show
  1. package/dist/ActionButton/index.js +1 -1
  2. package/dist/{ActionButton.vue_vue_type_script_setup_true_lang-jhaE9j9X.js → ActionButton.vue_vue_type_script_setup_true_lang-CZTRz3hl.js} +2 -2
  3. package/dist/Alert/index.js +1 -1
  4. package/dist/{Alert.vue_vue_type_style_index_0_lang-89bXo9jG.js → Alert.vue_vue_type_style_index_0_lang-BNoDGnDR.js} +3 -3
  5. package/dist/Avatar/index.js +1 -1
  6. package/dist/{Avatar.vue_vue_type_style_index_0_lang-kaq1iN2X.js → Avatar.vue_vue_type_style_index_0_lang--OU5sgDR.js} +3 -3
  7. package/dist/AvatarGroup/index.js +1 -1
  8. package/dist/Badge/index.js +1 -1
  9. package/dist/{Badge.vue_vue_type_script_setup_true_lang-C6x4r-P7.js → Badge.vue_vue_type_script_setup_true_lang-ov_fhvSB.js} +2 -2
  10. package/dist/{BaseBadge.vue_vue_type_style_index_0_lang-CAdrPXmH.js → BaseBadge.vue_vue_type_style_index_0_lang-Cwko3Hlm.js} +1 -1
  11. package/dist/{BaseButton.vue_vue_type_style_index_0_lang-favf_C7t.js → BaseButton.vue_vue_type_style_index_0_lang-DV59KCrZ.js} +4 -4
  12. package/dist/Button/index.js +1 -1
  13. package/dist/{Button.vue_vue_type_script_setup_true_lang-DTZUw0pf.js → Button.vue_vue_type_script_setup_true_lang-CYE9whgK.js} +2 -2
  14. package/dist/Checkbox/index.js +1 -1
  15. package/dist/{Checkbox.vue_vue_type_style_index_0_lang-Dzren1pf.js → Checkbox.vue_vue_type_style_index_0_lang-B37LXBOT.js} +2 -2
  16. package/dist/CheckboxGroup/index.js +1 -1
  17. package/dist/Chip/index.js +2 -2
  18. package/dist/{Chip.vue_vue_type_style_index_0_lang-BPdU3Pgk.js → Chip.vue_vue_type_style_index_0_lang-B8XnEjIk.js} +2 -2
  19. package/dist/ChipGroup/index.js +1 -1
  20. package/dist/{ChipGroup.vue_vue_type_style_index_0_lang-D4A14AxB.js → ChipGroup.vue_vue_type_style_index_0_lang-CYarh7Jx.js} +2 -2
  21. package/dist/ColorPicker/index.js +1 -1
  22. package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-CAzVW3da.js → ColorPicker.vue_vue_type_style_index_0_lang-BhznZQOS.js} +3 -3
  23. package/dist/ColorSwatch/index.js +1 -1
  24. package/dist/{ColorSwatch-LVdDBugO.js → ColorSwatch-GhXGfFR9.js} +1 -1
  25. package/dist/{ColorSwatch.vue_vue_type_style_index_0_lang-htOyCGxU.js → ColorSwatch.vue_vue_type_style_index_0_lang-CXh-dgyg.js} +3 -3
  26. package/dist/ColorSwatchGroup/index.js +1 -1
  27. package/dist/{ColorSwatchGroup.vue_vue_type_style_index_0_lang-Cv2D2XJ5.js → ColorSwatchGroup.vue_vue_type_style_index_0_lang-DMWiKVRG.js} +4 -4
  28. package/dist/ColorTrigger/index.js +1 -1
  29. package/dist/{ColorTrigger.vue_vue_type_style_index_0_lang-CNeFfFIE.js → ColorTrigger.vue_vue_type_style_index_0_lang-Cu8MO8RU.js} +3 -3
  30. package/dist/Combobox/index.js +1 -1
  31. package/dist/{Combobox.vue_vue_type_style_index_0_lang-Cj3maBpd.js → Combobox.vue_vue_type_style_index_0_lang-BsO5vzLB.js} +15 -15
  32. package/dist/Comment/CommentEditor.d.ts +9 -9
  33. package/dist/Comment/index.js +340 -1751
  34. package/dist/Comment/index.umd.cjs +1 -1
  35. package/dist/DataTable/index.js +1 -1
  36. package/dist/{DataTable.vue_vue_type_style_index_0_lang-CW2i09wf.js → DataTable.vue_vue_type_style_index_0_lang-DE97OF7f.js} +13 -13
  37. package/dist/DropZone/index.js +1 -1
  38. package/dist/{DropZone.vue_vue_type_style_index_0_lang-CF9qXlg0.js → DropZone.vue_vue_type_style_index_0_lang-gguAkRve.js} +2 -2
  39. package/dist/Empty/index.js +1 -1
  40. package/dist/{Empty.vue_vue_type_style_index_0_lang-BAbEBeZo.js → Empty.vue_vue_type_style_index_0_lang-YvYjr_zz.js} +1 -1
  41. package/dist/FloatButton/index.js +1 -1
  42. package/dist/{FloatButton.vue_vue_type_script_setup_true_lang-PYw1Yz9o.js → FloatButton.vue_vue_type_script_setup_true_lang-Ck9ilRKa.js} +2 -2
  43. package/dist/Form/index.js +1 -1
  44. package/dist/GOPicker/index.js +1 -1
  45. package/dist/{GOPicker.vue_vue_type_style_index_0_lang-DVZ2wSgV.js → GOPicker.vue_vue_type_style_index_0_lang-D9A9w-Pa.js} +11 -11
  46. package/dist/GraphicalObject/index.js +1 -1
  47. package/dist/{GraphicalObject.vue_vue_type_script_setup_true_lang-C949W-Ro.js → GraphicalObject.vue_vue_type_script_setup_true_lang-CEul2ZDZ.js} +3 -3
  48. package/dist/GraphicalObjectGroup/index.js +1 -1
  49. package/dist/{GraphicalObjectGroup.vue_vue_type_style_index_0_lang-CYUJM_Vv.js → GraphicalObjectGroup.vue_vue_type_style_index_0_lang-lN6Gzj19.js} +2 -2
  50. package/dist/Icon/index.js +1 -1
  51. package/dist/{Icon.vue_vue_type_style_index_0_lang-BUvEzzua.js → Icon.vue_vue_type_style_index_0_lang-BxthrfMq.js} +13 -13
  52. package/dist/IconButton/index.js +1 -1
  53. package/dist/{IconButton.vue_vue_type_script_setup_true_lang-BBnCpnF1.js → IconButton.vue_vue_type_script_setup_true_lang-BG-vYXAP.js} +2 -2
  54. package/dist/Image/index.js +1 -1
  55. package/dist/{Image.vue_vue_type_style_index_0_lang-UVOAmZXt.js → Image.vue_vue_type_style_index_0_lang-Bzg_B3NK.js} +2 -2
  56. package/dist/IndentLevel/index.js +1 -1
  57. package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-59akXJBr.js → IndentLevel.vue_vue_type_style_index_0_lang-C7d2_3hI.js} +3 -3
  58. package/dist/Indicator/index.js +1 -1
  59. package/dist/{Indicator.vue_vue_type_script_setup_true_lang-AJV4EFOO.js → Indicator.vue_vue_type_script_setup_true_lang-DMYJ5Fn6.js} +2 -2
  60. package/dist/Input/index.js +1 -1
  61. package/dist/{Input.vue_vue_type_style_index_0_lang-D4aCRGW6.js → Input.vue_vue_type_style_index_0_lang-DkuxhdXR.js} +2 -2
  62. package/dist/Kbd/index.js +1 -1
  63. package/dist/{Kbd.vue_vue_type_style_index_0_lang-DpjuML9o.js → Kbd.vue_vue_type_style_index_0_lang-iUfSP9TC.js} +1 -1
  64. package/dist/Label/index.js +1 -1
  65. package/dist/Link/index.js +1 -1
  66. package/dist/{Link.vue_vue_type_style_index_0_lang-CsBkek74.js → Link.vue_vue_type_style_index_0_lang-TePg8XgW.js} +1 -1
  67. package/dist/Menu/index.js +1 -1
  68. package/dist/MenuItem/index.js +1 -1
  69. package/dist/{MenuItem.vue_vue_type_style_index_0_lang-DNlGDoyp.js → MenuItem.vue_vue_type_style_index_0_lang-D_lWThP0.js} +3 -3
  70. package/dist/Pagination/Pagination.d.ts +60 -0
  71. package/dist/Pagination/index.d.ts +2 -1
  72. package/dist/Pagination/index.js +6 -1
  73. package/dist/Pagination/index.umd.cjs +1 -1
  74. package/dist/Pagination.vue_vue_type_style_index_0_lang-CDaeQOJb.js +1 -0
  75. package/dist/Pagination.vue_vue_type_style_index_0_lang-D8oCaF6X.js +224 -0
  76. package/dist/Popover/index.js +1 -1
  77. package/dist/{Popover.vue_vue_type_style_index_0_lang-Bdu86hho.js → Popover.vue_vue_type_style_index_0_lang-DLboppFN.js} +1 -1
  78. package/dist/Progress/index.d.ts +3 -0
  79. package/dist/Progress/index.js +15 -0
  80. package/dist/Progress/index.umd.cjs +1 -0
  81. package/dist/Progress.vue_vue_type_style_index_0_lang-BEHOwYFc.js +447 -0
  82. package/dist/Progress.vue_vue_type_style_index_0_lang-WHi3Gv1W.js +1 -0
  83. package/dist/RadioGroup/index.js +1 -1
  84. package/dist/{RadioGroup.vue_vue_type_script_setup_true_lang-BVfQx8wD.js → RadioGroup.vue_vue_type_script_setup_true_lang-BEPTbeyN.js} +2 -2
  85. package/dist/ScrollContainer/index.js +1 -1
  86. package/dist/{ScrollContainer.vue_vue_type_style_index_0_lang-DGUSuq_n.js → ScrollContainer.vue_vue_type_style_index_0_lang-DqLbpFbD.js} +1 -1
  87. package/dist/Segmented/Segmented.d.ts +57 -0
  88. package/dist/Segmented/index.d.ts +2 -1
  89. package/dist/Segmented/index.js +6 -1
  90. package/dist/Segmented/index.umd.cjs +1 -1
  91. package/dist/Segmented.vue_vue_type_style_index_0_lang-B52Fuc2U.js +161 -0
  92. package/dist/Segmented.vue_vue_type_style_index_0_lang-BvBq13y7.js +1 -0
  93. package/dist/Select/index.js +1 -1
  94. package/dist/{Select.vue_vue_type_style_index_0_lang-D-dLDaBy.js → Select.vue_vue_type_style_index_0_lang-NsFWEuv3.js} +7 -7
  95. package/dist/Shortcut/index.js +1 -1
  96. package/dist/{Shortcut.vue_vue_type_style_index_0_lang-BXy0S1__.js → Shortcut.vue_vue_type_style_index_0_lang-D0pRaguA.js} +2 -2
  97. package/dist/Spinner/index.js +1 -1
  98. package/dist/{Spinner.vue_vue_type_style_index_0_lang-BacaASPe.js → Spinner.vue_vue_type_style_index_0_lang-Bx_MQ7lE.js} +1 -1
  99. package/dist/SubMenu/index.js +1 -1
  100. package/dist/Switch/index.js +1 -1
  101. package/dist/{Switch.vue_vue_type_style_index_0_lang--RYeL-jW.js → Switch.vue_vue_type_style_index_0_lang-CnwcbtZs.js} +2 -2
  102. package/dist/{THead.vue_vue_type_style_index_0_lang-DfOi9-Nh.js → THead.vue_vue_type_style_index_0_lang-BEFUWFjk.js} +1 -1
  103. package/dist/Table/index.js +1 -1
  104. package/dist/Textarea/index.js +1 -1
  105. package/dist/{Textarea.vue_vue_type_style_index_0_lang-CPto-5VY.js → Textarea.vue_vue_type_style_index_0_lang-DPWaIFuD.js} +3 -3
  106. package/dist/Tree/index.js +1 -1
  107. package/dist/{Tree.vue_vue_type_style_index_0_lang-D-mTy1Es.js → Tree.vue_vue_type_style_index_0_lang-Dh0qoB5W.js} +5 -5
  108. package/dist/Upload/index.d.ts +4 -1
  109. package/dist/Upload/index.js +14 -1
  110. package/dist/Upload/index.umd.cjs +1 -1
  111. package/dist/Upload.vue_vue_type_style_index_0_lang-6dbdVoDr.js +1 -0
  112. package/dist/Upload.vue_vue_type_style_index_0_lang-DXBaIH16.js +1008 -0
  113. package/dist/index.js +192 -162
  114. package/dist/index.umd.cjs +1 -1
  115. package/dist/{sortBy-BoHPhPoZ.js → sortBy-CUiSA46K.js} +16 -16
  116. package/dist/style/index.css +1 -1
  117. package/dist/{uniq-iuU6YkEW.js → uniq-Bk9D4jYg.js} +1 -1
  118. package/dist/{useInputDataStates-CJoP9BXy.js → useInputDataStates-RRZVY4Vg.js} +1 -1
  119. package/dist/utils/index.js +2 -2
  120. package/package.json +1 -1
@@ -1,44 +1,40 @@
1
- import { defineComponent as L, ref as D, createElementBlock as U, createCommentVNode as G, unref as s, openBlock as g, normalizeClass as T, createBlock as B, createVNode as w, Fragment as se, renderList as he, withCtx as q, createTextVNode as qe, toDisplayString as Ue, useSlots as ve, createElementVNode as ne, h as k, mergeProps as le, isRef as We, createSlots as Te, renderSlot as ce, normalizeProps as ue, guardReactiveProps as de, watch as Pe, computed as S, normalizeStyle as Se, useAttrs as mt, nextTick as ft, watchEffect as gt, readonly as ht, onMounted as vt, onBeforeUnmount as yt, withModifiers as Ge } from "vue";
2
- import { u as Oe, j as F, k as Re, U as Ke, s as _t, q as Ct, l as kt, t as H, o as bt } from "../Icon.vue_vue_type_style_index_0_lang-BUvEzzua.js";
1
+ import { defineComponent as A, ref as B, createElementBlock as j, createCommentVNode as H, unref as n, openBlock as b, normalizeClass as O, createBlock as E, createVNode as g, Fragment as pe, renderList as K, withCtx as T, createTextVNode as ne, toDisplayString as Q, useSlots as W, createElementVNode as U, h as _, mergeProps as V, isRef as se, createSlots as X, renderSlot as F, normalizeProps as G, guardReactiveProps as N, computed as L, normalizeStyle as ce, onMounted as de, onBeforeUnmount as ue, withModifiers as oe } from "vue";
2
+ import { u as Y, j as $, k as J, o as me } from "../Icon.vue_vue_type_style_index_0_lang-BxthrfMq.js";
3
3
  import { g as z } from "../options-Bh1s18jm.js";
4
- import { _ as Je } from "../Avatar.vue_vue_type_style_index_0_lang-kaq1iN2X.js";
5
- import { _ as xt } from "../Badge.vue_vue_type_script_setup_true_lang-C6x4r-P7.js";
6
- import { cva as me } from "class-variance-authority";
7
- import { _ as Qe } from "../GraphicalObject.vue_vue_type_script_setup_true_lang-C949W-Ro.js";
4
+ import { _ as ae } from "../Avatar.vue_vue_type_style_index_0_lang--OU5sgDR.js";
5
+ import { _ as fe } from "../Badge.vue_vue_type_script_setup_true_lang-ov_fhvSB.js";
6
+ import { cva as he } from "class-variance-authority";
7
+ import { _ as ye } from "../GraphicalObject.vue_vue_type_script_setup_true_lang-CEul2ZDZ.js";
8
8
  import "@iconify/vue";
9
- import { normCls as A, getBemElement as y, getBemBlock as Ae, generateVariantClassList as K, usePCId as Ie } from "@pantograph/utils";
10
- import { _ as J } from "../IconButton.vue_vue_type_script_setup_true_lang-BBnCpnF1.js";
11
- import { _ as wt } from "../ActionButton.vue_vue_type_script_setup_true_lang-jhaE9j9X.js";
12
- import { createContext as Le, Primitive as Bt } from "reka-ui";
13
- import { _ as Pt } from "../Popover.vue_vue_type_style_index_0_lang-Bdu86hho.js";
14
- import { _ as St, a as Ne } from "../MenuItem.vue_vue_type_style_index_0_lang-DNlGDoyp.js";
15
- import { _ as Rt } from "../GOPicker.vue_vue_type_style_index_0_lang-DVZ2wSgV.js";
16
- import { _ as It } from "../Combobox.vue_vue_type_style_index_0_lang-Cj3maBpd.js";
17
- import { _ as Xe } from "../Divider.vue_vue_type_style_index_0_lang-CfBklijs.js";
18
- import { U as $t } from "../useInputDataStates-CJoP9BXy.js";
19
- import { _ as Tt } from "../ScrollContainer.vue_vue_type_style_index_0_lang-DGUSuq_n.js";
20
- import { a as $e, u as Lt, c as Ce, f as zt } from "../index-BTuMaS--.js";
21
- import { a as Ft, g as Ut } from "../BaseBadge.model-CahZXsyM.js";
22
- import { s as Mt } from "../sortBy-BoHPhPoZ.js";
23
- import { _ as Et } from "../FloatButton.vue_vue_type_script_setup_true_lang-PYw1Yz9o.js";
24
- import { _ as Ot } from "../Image.vue_vue_type_style_index_0_lang-UVOAmZXt.js";
25
- import { _ as At } from "../Shortcut.vue_vue_type_style_index_0_lang-BXy0S1__.js";
26
- const Dt = /* @__PURE__ */ L({
9
+ import { normCls as C, getBemElement as h, getBemBlock as Ce, generateVariantClassList as ge } from "@pantograph/utils";
10
+ import { _ as w } from "../IconButton.vue_vue_type_script_setup_true_lang-BG-vYXAP.js";
11
+ import { _ as ve } from "../ActionButton.vue_vue_type_script_setup_true_lang-CZTRz3hl.js";
12
+ import { createContext as _e } from "reka-ui";
13
+ import { _ as Be } from "../Popover.vue_vue_type_style_index_0_lang-DLboppFN.js";
14
+ import { _ as be, a as te } from "../MenuItem.vue_vue_type_style_index_0_lang-D_lWThP0.js";
15
+ import { _ as Re } from "../GOPicker.vue_vue_type_style_index_0_lang-D9A9w-Pa.js";
16
+ import { _ as Se } from "../Combobox.vue_vue_type_style_index_0_lang-BsO5vzLB.js";
17
+ import { _ as ke } from "../Divider.vue_vue_type_style_index_0_lang-CfBklijs.js";
18
+ import { U as Pe } from "../useInputDataStates-RRZVY4Vg.js";
19
+ import { _ as xe } from "../ScrollContainer.vue_vue_type_style_index_0_lang-DqLbpFbD.js";
20
+ import { _ as Te, a as $e } from "../Upload.vue_vue_type_style_index_0_lang-DXBaIH16.js";
21
+ import { _ as Oe } from "../Shortcut.vue_vue_type_style_index_0_lang-D0pRaguA.js";
22
+ const Ee = /* @__PURE__ */ A({
27
23
  ...z("CommentActions"),
28
24
  __name: "CommentActions",
29
- setup(i) {
30
- const e = Ye(), t = D(), o = D(), n = () => {
31
- e.emit("openActions", o.value);
32
- }, r = () => {
33
- e.emit("openReaction", t.value);
34
- }, c = () => {
35
- e.emit("reply");
25
+ setup(m) {
26
+ const s = ie(), t = B(), e = B(), c = () => {
27
+ s.emit("openActions", e.value);
28
+ }, a = () => {
29
+ s.emit("openReaction", t.value);
30
+ }, l = () => {
31
+ s.emit("reply");
36
32
  };
37
- return (d, l) => s(e).props.hasReaction || s(e).props.hasEdit || s(e).props.hasDelete ? (g(), U("div", {
33
+ return (p, o) => n(s).props.hasReaction || n(s).props.hasEdit || n(s).props.hasDelete ? (b(), j("div", {
38
34
  key: 0,
39
- class: T(s(A)(s(y)(s(Z), "actions"), s(e).props.actionsCls))
35
+ class: O(n(C)(n(h)(n(R), "actions"), n(s).props.actionsCls))
40
36
  }, [
41
- s(e).props.hasReply ? (g(), B(J, {
37
+ n(s).props.hasReply ? (b(), E(w, {
42
38
  key: 0,
43
39
  icon: "tabler:corner-up-left",
44
40
  color: "neutral",
@@ -46,65 +42,65 @@ const Dt = /* @__PURE__ */ L({
46
42
  ref_key: "reactionRef",
47
43
  ref: t,
48
44
  flipOnDir: "rtl",
49
- onClick: c
50
- }, null, 512)) : G("", !0),
51
- s(e).props.hasReaction ? (g(), B(J, {
45
+ onClick: l
46
+ }, null, 512)) : H("", !0),
47
+ n(s).props.hasReaction ? (b(), E(w, {
52
48
  key: 1,
53
49
  icon: "tabler:mood-plus",
54
50
  color: "neutral",
55
51
  type: "ghost",
56
52
  ref_key: "reactionRef",
57
53
  ref: t,
58
- onClick: r
59
- }, null, 512)) : G("", !0),
60
- s(e).props.hasEdit || s(e).props.hasDelete ? (g(), B(J, {
54
+ onClick: a
55
+ }, null, 512)) : H("", !0),
56
+ n(s).props.hasEdit || n(s).props.hasDelete ? (b(), E(w, {
61
57
  key: 2,
62
58
  icon: "tabler:dots-vertical",
63
59
  color: "neutral",
64
60
  type: "ghost",
65
61
  ref_key: "actionRef",
66
- ref: o,
67
- onClick: n
68
- }, null, 512)) : G("", !0)
69
- ], 2)) : G("", !0);
62
+ ref: e,
63
+ onClick: c
64
+ }, null, 512)) : H("", !0)
65
+ ], 2)) : H("", !0);
70
66
  }
71
- }), jt = /* @__PURE__ */ L({
67
+ }), De = /* @__PURE__ */ A({
72
68
  ...z("CommentReactions"),
73
69
  __name: "CommentReactions",
74
- setup(i) {
75
- const e = Ye(), t = D(), o = () => {
76
- e.emit("openReaction", t.value);
77
- }, n = (r) => {
78
- r && !r.active && e.emit("reaction", r.emoji);
70
+ setup(m) {
71
+ const s = ie(), t = B(), e = () => {
72
+ s.emit("openReaction", t.value);
73
+ }, c = (a) => {
74
+ a && !a.active && s.emit("reaction", a.emoji);
79
75
  };
80
- return (r, c) => {
81
- var d;
82
- return s(e).props.hasReaction && ((d = s(e).props.reactions) != null && d.some((l) => l.count && l.emoji)) ? (g(), U("div", {
76
+ return (a, l) => {
77
+ var p;
78
+ return n(s).props.hasReaction && ((p = n(s).props.reactions) != null && p.some((o) => o.count && o.emoji)) ? (b(), j("div", {
83
79
  key: 0,
84
- class: T(s(A)(s(y)(s(Z), "reactions"), s(e).props.reactionsCls))
80
+ class: O(n(C)(n(h)(n(R), "reactions"), n(s).props.reactionsCls))
85
81
  }, [
86
- (g(!0), U(se, null, he(s(e).props.reactions, (l) => (g(), B(wt, {
87
- key: l == null ? void 0 : l.emoji,
88
- active: l == null ? void 0 : l.active,
89
- onClick: (a) => n(l)
82
+ (b(!0), j(pe, null, K(n(s).props.reactions, (o) => (b(), E(ve, {
83
+ key: o == null ? void 0 : o.emoji,
84
+ active: o == null ? void 0 : o.active,
85
+ onClick: (v) => c(o)
90
86
  }, {
91
- default: q(() => [
92
- qe(Ue(l == null ? void 0 : l.emoji) + " " + Ue(l == null ? void 0 : l.count), 1)
87
+ default: T(() => [
88
+ ne(Q(o == null ? void 0 : o.emoji) + " " + Q(o == null ? void 0 : o.count), 1)
93
89
  ]),
94
90
  _: 2
95
91
  }, 1032, ["active", "onClick"]))), 128)),
96
- w(J, {
92
+ g(w, {
97
93
  icon: "tabler:mood-plus",
98
94
  color: "neutral",
99
95
  type: "outline",
100
96
  ref_key: "reactionRef",
101
97
  ref: t,
102
- onClick: o
98
+ onClick: e
103
99
  }, null, 512)
104
- ], 2)) : G("", !0);
100
+ ], 2)) : H("", !0);
105
101
  };
106
102
  }
107
- }), Z = Ae("comment"), [Ye, Ht] = Le("Comment"), qo = /* @__PURE__ */ L({
103
+ }), R = Ce("comment"), [ie, Me] = _e("Comment"), to = /* @__PURE__ */ A({
108
104
  ...z("Comment"),
109
105
  __name: "Comment",
110
106
  props: {
@@ -136,177 +132,177 @@ const Dt = /* @__PURE__ */ L({
136
132
  reactions: {}
137
133
  },
138
134
  emits: ["update:open", "openActions", "reaction", "reply", "openReaction"],
139
- setup(i, { emit: e }) {
140
- const t = i, o = ve(), n = e, r = Oe(t, "open", n, {
135
+ setup(m, { emit: s }) {
136
+ const t = m, e = W(), c = s, a = Y(t, "open", c, {
141
137
  passive: t.open === void 0
142
- }), c = () => {
143
- var P;
144
- let v;
145
- const _ = (P = o.author) == null ? void 0 : P.call(o, {});
146
- return !F(_) ? v = _ : v = t.author, v ? k(
138
+ }), l = () => {
139
+ var d;
140
+ let r;
141
+ const f = (d = e.author) == null ? void 0 : d.call(e, {});
142
+ return !$(f) ? r = f : r = t.author, r ? _(
147
143
  "div",
148
144
  {
149
- class: A(y(Z, "author"), t.authorCls)
145
+ class: C(h(R, "author"), t.authorCls)
150
146
  },
151
- v
147
+ r
152
148
  ) : null;
153
- }, d = () => {
154
- var P;
155
- let v;
156
- const _ = (P = o.datetime) == null ? void 0 : P.call(o, {});
157
- return !F(_) ? v = _ : v = t.datetime, v ? k(
149
+ }, p = () => {
150
+ var d;
151
+ let r;
152
+ const f = (d = e.datetime) == null ? void 0 : d.call(e, {});
153
+ return !$(f) ? r = f : r = t.datetime, r ? _(
158
154
  "div",
159
155
  {
160
- class: A(y(Z, "datetime"), t.datetimeCls)
156
+ class: C(h(R, "datetime"), t.datetimeCls)
161
157
  },
162
- v
158
+ r
163
159
  ) : null;
164
- }, l = () => {
165
- var P, M;
166
- const v = (P = o.header) == null ? void 0 : P.call(o, {}), _ = !F(v);
167
- let R;
168
- if (_) R = v;
160
+ }, o = () => {
161
+ var d, S;
162
+ const r = (d = e.header) == null ? void 0 : d.call(e, {}), f = !$(r);
163
+ let u;
164
+ if (f) u = r;
169
165
  else {
170
- R = [];
171
- const E = (M = o.avatar) == null ? void 0 : M.call(o, {});
172
- !F(E) ? R.push(E) : t.avatar && R.push(k(Je, { ...t.avatarProps ?? {}, src: t.avatar }));
173
- const N = c(), I = d();
174
- (N || I) && R.push(
175
- k(
166
+ u = [];
167
+ const P = (S = e.avatar) == null ? void 0 : S.call(e, {});
168
+ !$(P) ? u.push(P) : t.avatar && u.push(_(ae, { ...t.avatarProps ?? {}, src: t.avatar }));
169
+ const x = l(), M = p();
170
+ (x || M) && u.push(
171
+ _(
176
172
  "div",
177
173
  {
178
- class: A(y(Z, "header__content"), t.headerContentCls)
174
+ class: C(h(R, "header__content"), t.headerContentCls)
179
175
  },
180
- [N, I]
176
+ [x, M]
181
177
  )
182
- ), R.length || (R = void 0);
178
+ ), u.length || (u = void 0);
183
179
  }
184
- return R ? (R.push(k(Dt)), k(
180
+ return u ? (u.push(_(Ee)), _(
185
181
  "div",
186
- { class: A(y(Z, "header"), t.headerCls) },
187
- R
182
+ { class: C(h(R, "header"), t.headerCls) },
183
+ u
188
184
  )) : null;
189
- }, a = () => {
190
- var R;
191
- const v = (R = o.content) == null ? void 0 : R.call(o, {}), _ = !F(v);
192
- if (_ || t.content)
193
- return k(
185
+ }, v = () => {
186
+ var u;
187
+ const r = (u = e.content) == null ? void 0 : u.call(e, {}), f = !$(r);
188
+ if (f || t.content)
189
+ return _(
194
190
  "div",
195
191
  {
196
- class: A(y(Z, "content"), t.contentCls, "paragraph"),
197
- innerHTML: _ ? void 0 : t.content
192
+ class: C(h(R, "content"), t.contentCls, "paragraph"),
193
+ innerHTML: f ? void 0 : t.content
198
194
  },
199
- _ ? v : void 0
195
+ f ? r : void 0
200
196
  );
201
- }, p = y(Z, "replies"), u = me(p, {
197
+ }, y = h(R, "replies"), k = he(y, {
202
198
  variants: {
203
- open: K("open", p)
199
+ open: ge("open", y)
204
200
  }
205
- }), h = () => {
206
- var M;
207
- const v = (M = o.replies) == null ? void 0 : M.call(o, {}), _ = !F(v), R = () => {
208
- var N, I, V;
209
- const E = (N = o.repliesHeader) == null ? void 0 : N.call(o, { open: !!r.value }), C = [];
210
- if (!F(E))
211
- C.push(E);
201
+ }), D = () => {
202
+ var S;
203
+ const r = (S = e.replies) == null ? void 0 : S.call(e, {}), f = !$(r), u = () => {
204
+ var x, M, I;
205
+ const P = (x = e.repliesHeader) == null ? void 0 : x.call(e, { open: !!a.value }), i = [];
206
+ if (!$(P))
207
+ i.push(P);
212
208
  else {
213
- C.push(
214
- k(
215
- Qe,
209
+ i.push(
210
+ _(
211
+ ye,
216
212
  {
217
213
  size: "xsm",
218
214
  bg: "transparent",
219
215
  br: "transparent"
220
216
  },
221
217
  {
222
- default: () => k(Re, {
218
+ default: () => _(J, {
223
219
  icon: "tabler:chevron-down",
224
- class: y(p, "icon"),
220
+ class: h(y, "icon"),
225
221
  size: "2xsm"
226
222
  })
227
223
  }
228
224
  )
229
225
  );
230
- const te = (I = o.repliesCount) == null ? void 0 : I.call(o, {}), re = !F(te), W = (V = o.repliesTitle) == null ? void 0 : V.call(o, {}), m = !F(W);
231
- let b;
232
- m ? b = W : b = t.repliesTitle, C.push(
233
- k(
226
+ const Z = (M = e.repliesCount) == null ? void 0 : M.call(e, {}), le = !$(Z), ee = (I = e.repliesTitle) == null ? void 0 : I.call(e, {}), re = !$(ee);
227
+ let q;
228
+ re ? q = ee : q = t.repliesTitle, i.push(
229
+ _(
234
230
  "div",
235
231
  {
236
- class: A(y(p, "title"), t.repliesTitleCls)
232
+ class: C(h(y, "title"), t.repliesTitleCls)
237
233
  },
238
- b
234
+ q
239
235
  )
240
- ), (re || t.repliesCount) && C.push(
241
- k(
242
- xt,
236
+ ), (le || t.repliesCount) && i.push(
237
+ _(
238
+ fe,
243
239
  {
244
240
  color: "primary-subtle",
245
241
  text: t.repliesCount,
246
242
  size: "xsm"
247
243
  },
248
244
  {
249
- text: () => te
245
+ text: () => Z
250
246
  }
251
247
  )
252
248
  );
253
249
  }
254
- return k(
250
+ return _(
255
251
  "div",
256
252
  {
257
- class: A(y(p, "header"), t.repliesHeaderCls),
253
+ class: C(h(y, "header"), t.repliesHeaderCls),
258
254
  onClick: () => {
259
- r.value = !r.value;
255
+ a.value = !a.value;
260
256
  }
261
257
  },
262
- C
258
+ i
263
259
  );
264
- }, P = () => {
265
- if (r.value)
260
+ }, d = () => {
261
+ if (a.value)
266
262
  return [
267
- k(
263
+ _(
268
264
  "div",
269
265
  {
270
- class: A(y(p, "content"), t.repliesContentCls)
266
+ class: C(h(y, "content"), t.repliesContentCls)
271
267
  },
272
- v
268
+ r
273
269
  ),
274
- k("div", {
275
- class: y(p, "line")
270
+ _("div", {
271
+ class: h(y, "line")
276
272
  })
277
273
  ];
278
274
  };
279
- return _ ? k(
275
+ return f ? _(
280
276
  "div",
281
277
  {
282
- class: A(
283
- u({
284
- open: !!r.value
278
+ class: C(
279
+ k({
280
+ open: !!a.value
285
281
  }),
286
282
  t.repliesCls
287
283
  )
288
284
  },
289
- [R(), P()]
285
+ [u(), d()]
290
286
  ) : null;
291
287
  };
292
- return Ht({
293
- emit: n,
288
+ return Me({
289
+ emit: c,
294
290
  props: t,
295
- slots: o
296
- }), (v, _) => (g(), U("div", {
297
- class: T(s(A)(s(Z), t.class))
291
+ slots: e
292
+ }), (r, f) => (b(), j("div", {
293
+ class: O(n(C)(n(R), t.class))
298
294
  }, [
299
- w(l),
300
- ne("div", {
301
- class: T(s(A)(s(y)(s(Z), "body"), t.bodyCls))
295
+ g(o),
296
+ U("div", {
297
+ class: O(n(C)(n(h)(n(R), "body"), t.bodyCls))
302
298
  }, [
303
- w(a),
304
- w(jt),
305
- w(h)
299
+ g(v),
300
+ g(De),
301
+ g(D)
306
302
  ], 2)
307
303
  ], 2));
308
304
  }
309
- }), Wo = /* @__PURE__ */ L({
305
+ }), no = /* @__PURE__ */ A({
310
306
  ...z("CommentAction"),
311
307
  __name: "CommentAction",
312
308
  props: {
@@ -350,52 +346,52 @@ const Dt = /* @__PURE__ */ L({
350
346
  disableOutsidePointerEvents: { type: Boolean }
351
347
  },
352
348
  emits: ["edit", "delete", "update:open"],
353
- setup(i, { emit: e }) {
354
- const t = i, o = e, n = () => {
355
- o("edit"), c.value = !1;
356
- }, r = () => {
357
- o("delete"), c.value = !1;
358
- }, c = Oe(t, "open", o, {
349
+ setup(m, { emit: s }) {
350
+ const t = m, e = s, c = () => {
351
+ e("edit"), l.value = !1;
352
+ }, a = () => {
353
+ e("delete"), l.value = !1;
354
+ }, l = Y(t, "open", e, {
359
355
  passive: t.open === void 0
360
356
  });
361
- return (d, l) => (g(), B(s(Pt), le(t, {
362
- open: s(c),
363
- "onUpdate:open": l[0] || (l[0] = (a) => We(c) ? c.value = a : null),
357
+ return (p, o) => (b(), E(n(Be), V(t, {
358
+ open: n(l),
359
+ "onUpdate:open": o[0] || (o[0] = (v) => se(l) ? l.value = v : null),
364
360
  placement: "bottom-end",
365
361
  sideOffset: 3,
366
362
  trigger: "click",
367
363
  openDelay: 0
368
364
  }), {
369
- content: q(() => [
370
- w(St, { style: { width: "116px" } }, {
371
- default: q(() => [
372
- d.hasEdit ? (g(), B(Ne, {
365
+ content: T(() => [
366
+ g(be, { style: { width: "116px" } }, {
367
+ default: T(() => [
368
+ p.hasEdit ? (b(), E(te, {
373
369
  key: "edit",
374
- title: d.editText,
375
- onClick: n
370
+ title: p.editText,
371
+ onClick: c
376
372
  }, {
377
- leading: q(({ iconSize: a }) => [
378
- w(Re, {
373
+ leading: T(({ iconSize: v }) => [
374
+ g(J, {
379
375
  icon: "tabler:edit",
380
- size: a
376
+ size: v
381
377
  }, null, 8, ["size"])
382
378
  ]),
383
379
  _: 1
384
- }, 8, ["title"])) : G("", !0),
385
- d.hasDelete ? (g(), B(Ne, {
380
+ }, 8, ["title"])) : H("", !0),
381
+ p.hasDelete ? (b(), E(te, {
386
382
  key: "delete",
387
- title: d.deleteText,
383
+ title: p.deleteText,
388
384
  danger: "",
389
- onClick: r
385
+ onClick: a
390
386
  }, {
391
- leading: q(({ iconSize: a }) => [
392
- w(Re, {
387
+ leading: T(({ iconSize: v }) => [
388
+ g(J, {
393
389
  icon: "tabler:trash",
394
- size: a
390
+ size: v
395
391
  }, null, 8, ["size"])
396
392
  ]),
397
393
  _: 1
398
- }, 8, ["title"])) : G("", !0)
394
+ }, 8, ["title"])) : H("", !0)
399
395
  ]),
400
396
  _: 1
401
397
  })
@@ -403,7 +399,7 @@ const Dt = /* @__PURE__ */ L({
403
399
  _: 1
404
400
  }, 16, ["open"]));
405
401
  }
406
- }), Ko = /* @__PURE__ */ L({
402
+ }), so = /* @__PURE__ */ A({
407
403
  ...z("CommentReaction"),
408
404
  __name: "CommentReaction",
409
405
  props: {
@@ -445,13 +441,13 @@ const Dt = /* @__PURE__ */ L({
445
441
  resetColorsOnChangeType: {}
446
442
  },
447
443
  emits: ["reaction", "update:open"],
448
- setup(i, { emit: e }) {
449
- const t = i, o = e, n = (c) => {
450
- o("reaction", c.value), r.value = !1;
451
- }, r = Oe(t, "open", o, {
444
+ setup(m, { emit: s }) {
445
+ const t = m, e = s, c = (l) => {
446
+ e("reaction", l.value), a.value = !1;
447
+ }, a = Y(t, "open", e, {
452
448
  passive: t.open === void 0
453
449
  });
454
- return (c, d) => (g(), B(Rt, le(t, {
450
+ return (l, p) => (b(), E(Re, V(t, {
455
451
  noTrigger: "",
456
452
  hideClear: "",
457
453
  hideGroup: "",
@@ -459,18 +455,18 @@ const Dt = /* @__PURE__ */ L({
459
455
  hideRandom: "",
460
456
  group: "emoji",
461
457
  popoverProps: {
462
- ...c.popoverProps ?? {},
463
- reference: c.reference
458
+ ...l.popoverProps ?? {},
459
+ reference: l.reference
464
460
  },
465
461
  placement: "bottom-end",
466
462
  visibleColorPickers: [],
467
463
  noModel: "",
468
- onSelect: n,
469
- open: s(r),
470
- "onUpdate:open": d[0] || (d[0] = (l) => We(r) ? r.value = l : null)
464
+ onSelect: c,
465
+ open: n(a),
466
+ "onUpdate:open": p[0] || (p[0] = (o) => se(a) ? a.value = o : null)
471
467
  }), null, 16, ["popoverProps", "open"]));
472
468
  }
473
- }), Jo = /* @__PURE__ */ L({
469
+ }), ao = /* @__PURE__ */ A({
474
470
  ...z("CommentMention"),
475
471
  __name: "CommentMention",
476
472
  props: {
@@ -575,1431 +571,24 @@ const Dt = /* @__PURE__ */ L({
575
571
  defer: { type: Boolean }
576
572
  },
577
573
  emits: ["mention"],
578
- setup(i, { emit: e }) {
579
- const t = i, o = e, n = ve(), r = (c, d, l) => {
580
- o("mention", c, l);
574
+ setup(m, { emit: s }) {
575
+ const t = m, e = s, c = W(), a = (l, p, o) => {
576
+ e("mention", l, o);
581
577
  };
582
- return (c, d) => (g(), B(It, le(t, {
578
+ return (l, p) => (b(), E(Se, V(t, {
583
579
  modelValue: "",
584
- onSelect: r,
580
+ onSelect: a,
585
581
  noTrigger: ""
586
- }), Te({ _: 2 }, [
587
- he(Object.keys(n), (l) => ({
588
- name: l,
589
- fn: q((a) => [
590
- ce(c.$slots, l, ue(de(a)))
582
+ }), X({ _: 2 }, [
583
+ K(Object.keys(c), (o) => ({
584
+ name: o,
585
+ fn: T((v) => [
586
+ F(l.$slots, o, G(N(v)))
591
587
  ])
592
588
  }))
593
589
  ]), 1040));
594
590
  }
595
- }), Ze = Ae("upload"), we = y(Ze, "list"), X = y(we, "item"), [ke, Vt] = Le("Upload"), et = (i, e) => {
596
- if (i && e) {
597
- const t = Array.isArray(e) ? e : e.split(","), o = i.name || "", n = i.type || "", r = n.replace(/\/.*$/, "");
598
- return t.some((c) => {
599
- const d = c.trim();
600
- if (/^\*(?<temp1>\/\*)?$/.test(c))
601
- return !0;
602
- if (d.charAt(0) === ".") {
603
- const l = o.toLowerCase(), a = d.toLowerCase();
604
- let p = [a];
605
- return (a === ".jpg" || a === ".jpeg") && (p = [".jpg", ".jpeg"]), p.some((u) => l.endsWith(u));
606
- }
607
- return /\/\*$/.test(d) ? r === d.replace(/\/.*$/, "") : !!(n === d || /^\w+$/.test(d));
608
- });
609
- }
610
- return !0;
611
- }, Gt = (i, e, t = 1 * 1024 * 1024) => {
612
- const o = [];
613
- let n = 0, r = 0;
614
- for (; n < i.size; ) {
615
- const c = Math.min(n + t, i.size), d = i.slice(n, c);
616
- o.push({
617
- chunk: d,
618
- chunkSize: c - n,
619
- index: r,
620
- uid: e(),
621
- status: "waiting"
622
- }), n = c, r++;
623
- }
624
- return o;
625
- }, tt = (i, { getUid: e, chunkFile: t, chunkSize: o }) => {
626
- if ($e(i)) {
627
- let n;
628
- if (i instanceof File)
629
- n = i;
630
- else
631
- try {
632
- n = new File(
633
- [i],
634
- i.name ?? "",
635
- {
636
- type: i.type ?? ""
637
- }
638
- );
639
- } catch {
640
- n = new Blob([i], {
641
- type: i.type ?? ""
642
- }), n.lastModified = (/* @__PURE__ */ new Date()).getTime(), n.name = i.name ?? "", n.webkitRelativePath = "";
643
- }
644
- if ($e(n) && n instanceof Blob) {
645
- let r = [];
646
- return t && (r = Gt(
647
- n,
648
- () => (e == null ? void 0 : e(!0)) ?? Ie(void 0, !0),
649
- o
650
- )), {
651
- uid: i.uid ?? (e == null ? void 0 : e()) ?? Ie(void 0, !0),
652
- originFileObj: n,
653
- status: "waiting",
654
- chunks: r != null && r.length && (r == null ? void 0 : r.length) > 1 ? r : void 0,
655
- chunksCount: r != null && r.length && (r == null ? void 0 : r.length) > 1 ? r.length : void 0,
656
- name: n == null ? void 0 : n.name,
657
- type: n == null ? void 0 : n.type,
658
- size: n == null ? void 0 : n.size,
659
- lastModified: n == null ? void 0 : n.lastModified,
660
- thumbUrl: void 0
661
- };
662
- }
663
- }
664
- }, Nt = (i, e) => {
665
- if ($e(i))
666
- return i instanceof Blob || i instanceof File ? tt(i, e) : (!i.uid && !Object.isFrozen(i) && (i.uid = e.getUid()), i);
667
- }, qt = ["error", "paused", "done", "uploading", "waiting"], ot = ["md", "lg", "xlg"], nt = ["image", "card"], Wt = ["outline", "transparent"], Fe = {
668
- other: {
669
- icon: "tabler:file-text",
670
- fg: "primary",
671
- bg: "primary-subtle"
672
- },
673
- text: {
674
- icon: "tabler:file-typography",
675
- fg: "primary",
676
- bg: "primary-subtle"
677
- },
678
- image: {
679
- icon: "tabler:photo",
680
- fg: "primary",
681
- bg: "primary-subtle"
682
- },
683
- video: {
684
- icon: "tabler:video",
685
- fg: "primary",
686
- bg: "primary-subtle"
687
- },
688
- zip: {
689
- icon: "tabler:file-zip",
690
- fg: "primary",
691
- bg: "primary-subtle"
692
- },
693
- pdf: {
694
- icon: "tabler:file-type-pdf",
695
- fg: "red",
696
- bg: "red-subtle"
697
- },
698
- document: {
699
- icon: "tabler:file-type-docx",
700
- fg: "primary",
701
- bg: "primary-subtle"
702
- },
703
- excel: {
704
- icon: "tabler:file-type-csv",
705
- fg: "green",
706
- bg: "green-subtle"
707
- }
708
- }, Kt = {
709
- image: [
710
- "3fr",
711
- "arw",
712
- "bmp",
713
- "dib",
714
- "cr2",
715
- "crw",
716
- "dng",
717
- "gif",
718
- "heic",
719
- "heif",
720
- "ico",
721
- "jfif",
722
- "jpe",
723
- "jpeg",
724
- "jpg",
725
- "jp2",
726
- "nef",
727
- "png",
728
- "raf",
729
- "raw",
730
- "rw2",
731
- "sr2",
732
- "svg",
733
- "svg",
734
- "tga",
735
- "tif",
736
- "tiff",
737
- "wdp",
738
- "webp"
739
- ],
740
- video: [
741
- "3g2",
742
- "3gp2",
743
- "3gp",
744
- "3gpp",
745
- "asf",
746
- "asx",
747
- "avi",
748
- "flv",
749
- "m1v",
750
- "m2v",
751
- "mod",
752
- "mp2v",
753
- "mpa",
754
- "mpe",
755
- "mpv2",
756
- "mpeg",
757
- "mpegvideo",
758
- "m2t",
759
- "m2ts",
760
- "tts",
761
- "ts",
762
- "mkv",
763
- "mp4v",
764
- "mp4",
765
- "mov",
766
- "m4v",
767
- "mjpeg",
768
- "mts",
769
- "ogv",
770
- "webm",
771
- "wm",
772
- "wmv",
773
- "wmx",
774
- "wvx"
775
- ],
776
- text: [
777
- "addin",
778
- "dtsconfig",
779
- "vssettings",
780
- "vstemplate",
781
- "xml",
782
- "xrm-ms",
783
- "xsd",
784
- "xsl",
785
- "cd",
786
- "cs",
787
- "csproj",
788
- "iss",
789
- "py",
790
- "pyw",
791
- "rc",
792
- "rc2",
793
- "rct",
794
- "sln",
795
- "srt",
796
- "txt",
797
- "user",
798
- "vb",
799
- "vbproj",
800
- "vdp",
801
- "vdproj",
802
- "vspscc",
803
- "vsscc",
804
- "vssscc",
805
- "contact",
806
- "css",
807
- "group",
808
- "html",
809
- "htm",
810
- "shtml",
811
- "htc",
812
- "ics",
813
- "iqy",
814
- "odc",
815
- "sct",
816
- "wsc",
817
- "vcf",
818
- "vtt"
819
- ],
820
- zip: ["zip", "7z", "rar", "tar.gz"],
821
- document: ["doc", "docx", "odt", "rtf"],
822
- excel: ["xls", "xlsx", "csv", "ods"],
823
- pdf: ["pdf"]
824
- }, st = (i) => {
825
- if (i) {
826
- for (const [e, t] of Object.entries(Kt))
827
- if (t.includes(i.toLowerCase()))
828
- return e;
829
- }
830
- return "other";
831
- }, rt = (i = "") => {
832
- const e = i.split("/"), o = e[e.length - 1].split(/#|\?/)[0];
833
- return (/\.[^./\\]*$/.exec(o) || [""])[0];
834
- }, De = (i) => {
835
- var e, t, o;
836
- return (o = (t = (e = i == null ? void 0 : i.split) == null ? void 0 : e.call(i, "/")) == null ? void 0 : t.pop) == null ? void 0 : o.call(t);
837
- }, Jt = (i) => {
838
- var t;
839
- let e = De((i == null ? void 0 : i.type) || ((t = i == null ? void 0 : i.originFileObj) == null ? void 0 : t.type));
840
- if (i != null && i.url && !e)
841
- try {
842
- e = rt(i == null ? void 0 : i.url);
843
- } catch {
844
- }
845
- return e;
846
- }, Me = (i) => st(i) === "image", it = (i) => {
847
- if (i.type && !i.thumbUrl)
848
- return Me(De(i.type));
849
- const e = i.thumbUrl || i.url || "", t = rt(e);
850
- return /^data:image\//.test(e) || Me(t) ? !0 : !(/^data:/.test(e) || t);
851
- }, pe = [
852
- "red",
853
- "orange",
854
- "yellow",
855
- "lime",
856
- "green",
857
- "sky",
858
- "blue",
859
- "pink",
860
- "violet",
861
- "gray",
862
- "amber",
863
- "teal",
864
- "cyan",
865
- "ocean",
866
- "amethyst",
867
- "fuchsia",
868
- "mallard"
869
- ];
870
- [...pe, ...Ft];
871
- const ee = Ae("progress"), Be = y(ee, "circle"), be = y(ee, "line"), Qt = ["2xsm", "xsm", "sm", "md", "lg"], Xt = ["progress", "warning", "error", "success"], Yt = ["circle", "line"], [fe, Zt] = Le("progress"), eo = ["d", "stroke-linecap", "stroke"], to = ["from", "to", "dur"], xe = /* @__PURE__ */ L({
872
- ...z("ProgressCirclePath"),
873
- __name: "ProgressCirclePath",
874
- props: {
875
- strokeLinecap: { default: "round" },
876
- trail: { type: Boolean },
877
- indeterminate: { type: Boolean },
878
- percent: {},
879
- delay: { default: 0 },
880
- strokeWidth: { default: 2.4 },
881
- circleRadius: { default: 16 },
882
- color: {}
883
- },
884
- setup(i) {
885
- const e = i, t = y(Be, "path"), o = me(t, {
886
- variants: {
887
- trail: K("trail", t),
888
- indeterminate: K("indeterminate", t)
889
- }
890
- }), n = fe(), r = D(0);
891
- Pe(
892
- () => [e.trail, e.percent],
893
- () => {
894
- const a = n.getPercent(e.percent);
895
- if (!e.trail && a !== void 0) {
896
- const p = setTimeout(() => {
897
- r.value = a, clearTimeout(p);
898
- }, e.delay);
899
- }
900
- },
901
- {
902
- immediate: !0
903
- }
904
- );
905
- const c = S(() => e.circleRadius - e.strokeWidth / 2), d = S(() => {
906
- const a = e.circleRadius * 2 - e.strokeWidth;
907
- return `M ${e.circleRadius},${e.circleRadius} m 0,-${c.value} a ${c.value},${c.value} 0 1 1 0,${a} a ${c.value},${c.value} 0 1 1 0,-${a}`;
908
- }), l = S(() => {
909
- const a = 2 * Math.PI * c.value;
910
- return {
911
- "stroke-dasharray": e.trail ? void 0 : a,
912
- "stroke-dashoffset": e.trail ? void 0 : a * (1 - r.value / 100),
913
- "--ptc-progress-animation-duration": n.duration.value
914
- };
915
- });
916
- return (a, p) => (g(), B(s(Bt), {
917
- as: "g",
918
- "as-child": !a.indeterminate,
919
- key: String(a.indeterminate)
920
- }, {
921
- default: q(() => [
922
- ne("path", {
923
- d: d.value,
924
- "stroke-width": "2.4",
925
- fill: "none",
926
- style: Se(l.value),
927
- "stroke-linecap": a.strokeLinecap,
928
- class: T(s(o)({ trail: a.trail, indeterminate: a.indeterminate })),
929
- stroke: a.color ?? "currentColor"
930
- }, null, 14, eo),
931
- a.indeterminate ? (g(), U("animateTransform", {
932
- key: 0,
933
- attributeName: "transform",
934
- type: "rotate",
935
- from: `0 ${e.circleRadius} ${e.circleRadius}`,
936
- to: `360 ${e.circleRadius} ${e.circleRadius}`,
937
- dur: `${s(n).duration.value || 700}s`,
938
- repeatCount: "indefinite"
939
- }, null, 8, to)) : G("", !0)
940
- ]),
941
- _: 1
942
- }, 8, ["as-child"]));
943
- }
944
- }), at = /* @__PURE__ */ L({
945
- ...z("ProgressLabel"),
946
- __name: "ProgressLabel",
947
- setup(i) {
948
- const e = fe(), t = () => {
949
- var r, c;
950
- const o = (c = (r = e.slots).label) == null ? void 0 : c.call(r, {}), n = !F(o);
951
- return n || e.props.label ? k(
952
- "div",
953
- { class: y(ee, "label") },
954
- n ? o : e.props.label
955
- ) : null;
956
- };
957
- return (o, n) => (g(), B(t));
958
- }
959
- }), Ee = /* @__PURE__ */ L({
960
- ...z("ProgressHelperText"),
961
- __name: "ProgressHelperText",
962
- setup(i) {
963
- const e = fe(), t = () => {
964
- var r, c;
965
- const o = (c = (r = e.slots).helperText) == null ? void 0 : c.call(r, {}), n = !F(o);
966
- return n || e.props.helperText ? k(
967
- "div",
968
- { class: y(ee, "helper_text") },
969
- n ? o : e.props.helperText
970
- ) : null;
971
- };
972
- return (o, n) => (g(), B(t));
973
- }
974
- }), lt = /* @__PURE__ */ L({
975
- ...z("ProgressLegend"),
976
- __name: "ProgressLegend",
977
- setup(i) {
978
- const e = fe(), t = y(ee, "legend"), o = y(t, "item"), n = (p) => k("div", {
979
- class: y(o, "indicator"),
980
- style: { background: e.getColor(p.color) }
981
- }), r = (p) => k("div", { class: y(o, "title") }, p.title), c = (p) => k("div", { class: A(y(o, "percent"), "en") }, `(${p._percent}%)`), d = (p) => k("div", { class: o }, [
982
- n(p),
983
- r(p),
984
- c(p)
985
- ]), l = () => {
986
- var p;
987
- return (p = e.getSteps.value) == null ? void 0 : p.map((u) => {
988
- var v, _;
989
- const h = (_ = (v = e.slots).legendItem) == null ? void 0 : _.call(v, u);
990
- return F(h) ? d(u) : h;
991
- });
992
- }, a = () => {
993
- var h, v, _;
994
- const p = (v = (h = e.slots).legend) == null ? void 0 : v.call(h, {}), u = !F(p);
995
- return u || e.props.legend && ((_ = e.getSteps.value) != null && _.length) ? k("div", { class: t }, u ? p : l()) : null;
996
- };
997
- return (p, u) => (g(), B(a));
998
- }
999
- }), oo = { viewBox: "0 0 32 32" }, no = /* @__PURE__ */ L({
1000
- ...z("ProgressCircle"),
1001
- __name: "ProgressCircle",
1002
- setup(i) {
1003
- const e = fe(), t = S(() => {
1004
- switch (e.props.size) {
1005
- case "2xsm":
1006
- case "xsm":
1007
- return "3xsm";
1008
- case "sm":
1009
- return "2xsm";
1010
- case "md":
1011
- return "xsm";
1012
- case "lg":
1013
- return "sm";
1014
- }
1015
- }), o = me(Be, {
1016
- variants: {
1017
- size: K(Qt, Be)
1018
- }
1019
- }), n = () => {
1020
- var l, a;
1021
- const c = (a = (l = e.slots).icon) == null ? void 0 : a.call(l, {}), d = !F(c);
1022
- if (e.statusIcon.value || d) {
1023
- let p = c;
1024
- return d || (p = k(Re, {
1025
- icon: e.statusIcon.value,
1026
- size: t.value
1027
- })), k("div", { class: y(Be, "content") }, p);
1028
- }
1029
- return null;
1030
- }, r = S(() => Mt(e.getSteps.value ?? [], "percent").reverse());
1031
- return (c, d) => {
1032
- var l;
1033
- return g(), U(se, null, [
1034
- ne("div", {
1035
- class: T(s(o)(s(e).props))
1036
- }, [
1037
- (g(), U("svg", oo, [
1038
- s(e).props.indeterminate ? (g(), B(xe, {
1039
- key: 1,
1040
- indeterminate: "",
1041
- "stroke-linecap": "round",
1042
- percent: 75
1043
- })) : (g(), U(se, { key: 0 }, [
1044
- w(xe, {
1045
- "stroke-linecap": s(e).props.strokeLinecap,
1046
- trail: ""
1047
- }, null, 8, ["stroke-linecap"]),
1048
- (l = s(e).getSteps.value) != null && l.length ? (g(!0), U(se, { key: 0 }, he(r.value, (a) => (g(), B(xe, {
1049
- key: a.step_id,
1050
- "stroke-linecap": s(e).props.strokeLinecap,
1051
- color: s(e).getColor(a.color),
1052
- percent: a.percent
1053
- }, null, 8, ["stroke-linecap", "color", "percent"]))), 128)) : (g(), B(xe, {
1054
- key: 1,
1055
- "stroke-linecap": s(e).props.strokeLinecap,
1056
- color: s(e).props.status ? void 0 : s(e).getColor(s(e).props.color),
1057
- percent: s(e).percentProp.value
1058
- }, null, 8, ["stroke-linecap", "color", "percent"]))
1059
- ], 64))
1060
- ])),
1061
- w(n)
1062
- ], 2),
1063
- w(at),
1064
- w(Ee),
1065
- w(lt)
1066
- ], 64);
1067
- };
1068
- }
1069
- }), so = /* @__PURE__ */ L({
1070
- ...z("ProgressValidationMessage"),
1071
- __name: "ProgressValidationMessage",
1072
- setup(i) {
1073
- const e = fe(), t = () => {
1074
- var o, n;
1075
- if (e.props.status) {
1076
- const r = (n = (o = e.slots).validationMessage) == null ? void 0 : n.call(o, {});
1077
- if (!F(r) || e.props.validationMessage)
1078
- return k(
1079
- Ke,
1080
- { status: e.props.status, message: e.props.validationMessage },
1081
- {
1082
- message: r
1083
- }
1084
- );
1085
- }
1086
- return null;
1087
- };
1088
- return (o, n) => (g(), B(t));
1089
- }
1090
- }), ro = /* @__PURE__ */ L({
1091
- ...z("ProgressLine"),
1092
- __name: "ProgressLine",
1093
- setup(i) {
1094
- const e = fe(), t = y(be, "value"), o = me(be, {
1095
- variants: {
1096
- notRounded: K("not-rounded", be),
1097
- indeterminate: K("indeterminate", be)
1098
- }
1099
- }), n = D(0);
1100
- Pe(
1101
- () => [e.percentProp.value, e.props.indeterminate],
1102
- () => {
1103
- const a = setTimeout(() => {
1104
- var p;
1105
- e.props.indeterminate ? n.value = void 0 : !e.percentProp.value && ((p = e.getSteps.value) != null && p.length) ? n.value = 100 : n.value = e.percentProp.value ?? 0, clearTimeout(a);
1106
- }, e.props.delay ?? 0);
1107
- },
1108
- {
1109
- immediate: !0
1110
- }
1111
- );
1112
- const r = () => {
1113
- var a;
1114
- if (!e.props.indeterminate) {
1115
- if (e.props.status) return "currentColor";
1116
- if (!((a = e.getSteps.value) != null && a.length))
1117
- return e.getColor(e.props.color);
1118
- }
1119
- }, c = S(() => ({
1120
- width: n.value ? `${n.value}%` : void 0,
1121
- background: r(),
1122
- "--ptc-progress-animation-duration": e.duration.value
1123
- })), d = () => {
1124
- if (e.slots.label || e.props.label) {
1125
- const a = k(at), p = k(Ee, { renderIfHasLabel: !0 });
1126
- return k(
1127
- "div",
1128
- {
1129
- class: y(ee, "line_content")
1130
- },
1131
- [a, p]
1132
- );
1133
- }
1134
- return null;
1135
- }, l = () => {
1136
- if (e.props.status || e.props.indeterminate) {
1137
- const a = k(Ee), p = k(so), u = [], h = _t(e.slots.label || e.props.label) && (e.slots.helperText || e.props.helperText);
1138
- if (h && u.push(a), (e.slots.validationMessage || e.props.validationMessage) && !e.props.indeterminate && e.statusIcon.value && (h && u.push(
1139
- k(Xe, { type: "vertical", class: y(ee, "divider") })
1140
- ), u.push(p)), u.length)
1141
- return k("div", { class: y(ee, "line_validation_box") }, u);
1142
- } else
1143
- return k(lt);
1144
- return null;
1145
- };
1146
- return (a, p) => {
1147
- var u;
1148
- return g(), U(se, null, [
1149
- w(d),
1150
- ne("div", {
1151
- class: T(
1152
- s(o)({
1153
- notRounded: s(e).props.notRounded,
1154
- indeterminate: s(e).props.indeterminate
1155
- })
1156
- )
1157
- }, [
1158
- ne("div", {
1159
- class: T(s(t)),
1160
- style: Se(c.value)
1161
- }, [
1162
- (u = s(e).getSteps.value) != null && u.length && !s(e).props.indeterminate ? (g(!0), U(se, { key: 0 }, he(s(e).getSteps.value, (h) => (g(), U("div", {
1163
- class: T(s(y)(s(t), "step")),
1164
- key: h.step_id,
1165
- style: Se({ background: s(e).getColor(h.color), width: `${h.percent ?? 0}%` })
1166
- }, null, 6))), 128)) : G("", !0)
1167
- ], 6)
1168
- ], 2),
1169
- w(l)
1170
- ], 64);
1171
- };
1172
- }
1173
- }), io = ["dir"], ct = /* @__PURE__ */ L({
1174
- ...z("Progress"),
1175
- __name: "Progress",
1176
- props: {
1177
- steps: {},
1178
- type: { default: "line" },
1179
- legend: { type: Boolean },
1180
- indeterminate: { type: Boolean },
1181
- noAnimate: { type: Boolean },
1182
- size: { default: "md" },
1183
- status: {},
1184
- label: {},
1185
- validationMessage: {},
1186
- helperText: {},
1187
- notRounded: { type: Boolean },
1188
- duration: { default: 700 },
1189
- dir: {},
1190
- strokeLinecap: { default: "round" },
1191
- trail: { type: Boolean },
1192
- percent: {},
1193
- delay: {},
1194
- strokeWidth: {},
1195
- circleRadius: {},
1196
- color: { default: "primary" }
1197
- },
1198
- setup(i) {
1199
- const e = i, t = ve(), o = Ut, n = (h, v = !0) => {
1200
- const _ = Number(h);
1201
- if (!(isNaN(_) || v && (_ > 100 || _ < 0)))
1202
- return _;
1203
- }, r = S(() => n(e.percent) ?? 0), c = S(() => {
1204
- var h;
1205
- if ((h = e.steps) != null && h.length && !e.status) {
1206
- const v = e.steps.map((I) => ({
1207
- ...I,
1208
- step_id: Ie(ee)
1209
- }));
1210
- let _ = 0;
1211
- const R = v.reduce((I, V) => {
1212
- const te = n(V.percent);
1213
- te === void 0 && _++;
1214
- const re = v.findIndex((W) => W.step_id === V.step_id);
1215
- return re !== -1 && (v[re].percent = te), I + (te || 0);
1216
- }, 0);
1217
- if (r.value > 100 || r.value < 0 || R > 100 || R < 0)
1218
- throw "Invalid percentage";
1219
- let P = 0;
1220
- const M = v.map((I) => pe.findIndex((V) => V === I.color)).sort(), C = Array.from({ length: pe.length }, (I, V) => V).filter(
1221
- (I) => !M.includes(I)
1222
- );
1223
- let N = -1;
1224
- return v.map((I) => {
1225
- const V = (100 - R) / _, te = (W = !0) => I.percent === void 0 ? e.type === "circle" && W ? (P += V, P * ((r.value || 100) / 100)) : V : e.type === "circle" && W ? (P += I.percent, P) : I.percent, re = () => {
1226
- const W = o(I.color);
1227
- if (!W) {
1228
- if (pe.length !== M.length) {
1229
- const m = C.shift();
1230
- if (Ct(m))
1231
- return M.push(m), pe[m];
1232
- }
1233
- return N++, pe[N % pe.length];
1234
- }
1235
- return W;
1236
- };
1237
- return {
1238
- ...I,
1239
- percent: te(),
1240
- _percent: te(!1),
1241
- color: re()
1242
- };
1243
- });
1244
- }
1245
- }), d = me(ee, {
1246
- variants: {
1247
- status: K(Xt, ee),
1248
- type: K(Yt, ee)
1249
- }
1250
- }), l = S(() => e.noAnimate ? 0 : (n(e.duration, !1) || 0) / 1e3), { getDir: a } = Lt(), p = a(), u = S(() => {
1251
- switch (e.status) {
1252
- case "success":
1253
- return e.type === "circle" ? "tabler:check" : "tabler:circle-check";
1254
- case "warning":
1255
- return e.type === "circle" ? "tabler:exclamation-mark" : "tabler:exclamation-circle";
1256
- case "error":
1257
- return e.type === "circle" ? "tabler:x" : "tabler:circle-x";
1258
- }
1259
- });
1260
- return Zt({
1261
- props: e,
1262
- getColor: o,
1263
- getSteps: c,
1264
- percentProp: r,
1265
- getPercent: n,
1266
- duration: l,
1267
- slots: t,
1268
- statusIcon: u
1269
- }), (h, v) => (g(), U("div", {
1270
- class: T(s(d)(e)),
1271
- dir: s(p)
1272
- }, [
1273
- h.type === "circle" ? (g(), B(no, { key: 0 })) : (g(), B(ro, { key: 1 }))
1274
- ], 10, io));
1275
- }
1276
- }), ao = /* @__PURE__ */ L({
1277
- ...z("UploadListItemImage"),
1278
- __name: "UploadListItemImage",
1279
- setup(i) {
1280
- const e = ke(), t = je(), o = () => {
1281
- var n, r, c;
1282
- Ce((n = t.props.uploadFile) == null ? void 0 : n.cancel) && ((c = (r = t.props.uploadFile).cancel) == null || c.call(r)), e.remove(t.props.uploadFile);
1283
- };
1284
- return (n, r) => {
1285
- var c;
1286
- return g(), U(se, null, [
1287
- s(t).props.uploadFile.status !== "waiting" ? (g(), B(Ot, {
1288
- key: 0,
1289
- src: s(it)(s(t).props.uploadFile) ? s(t).props.uploadFile.thumbUrl ?? s(t).props.uploadFile.url : void 0,
1290
- aspectRatio: "1:1",
1291
- class: T(s(y)(s(X), "image")),
1292
- sizeRange: "xsm",
1293
- alt: s(t).label.value,
1294
- hovered: s(t).props.uploadFile.status === "uploading",
1295
- width: "100%"
1296
- }, Te({ _: 2 }, [
1297
- ["error", "done"].includes(s(t).props.uploadFile.status) ? {
1298
- name: "actions",
1299
- fn: q(() => [
1300
- s(t).props.uploadFile.status === "done" ? (g(), B(J, {
1301
- key: 0,
1302
- color: "neutral",
1303
- type: "ghost",
1304
- icon: "tabler:eye",
1305
- size: "sm",
1306
- onClick: r[0] || (r[0] = (d) => s(e).emit("preview", s(t).props.uploadFile))
1307
- })) : s(t).props.uploadFile.status === "error" ? (g(), B(J, {
1308
- key: 1,
1309
- color: "neutral",
1310
- type: "ghost",
1311
- icon: "tabler:reload",
1312
- size: "sm",
1313
- onClick: r[1] || (r[1] = (d) => s(e).resetRequest(s(t).props.uploadFile))
1314
- })) : G("", !0)
1315
- ]),
1316
- key: "0"
1317
- } : void 0
1318
- ]), 1032, ["src", "class", "alt", "hovered"])) : G("", !0),
1319
- ["uploading", "waiting"].includes(s(t).props.uploadFile.status) ? (g(), B(ct, {
1320
- key: 1,
1321
- type: "circle",
1322
- size: s(e).progressSize.value,
1323
- class: T(s(y)(s(X), "progress")),
1324
- indeterminate: s(t).props.uploadFile.status === "waiting",
1325
- percent: ((c = s(t).props.uploadFile) == null ? void 0 : c.percent) ?? 0
1326
- }, null, 8, ["size", "class", "indeterminate", "percent"])) : G("", !0),
1327
- w(Et, {
1328
- class: T(
1329
- s(A)(s(y)(s(X), "cancel"), "pantograph-tokens pantograph-dark")
1330
- ),
1331
- color: "neutral",
1332
- icon: "tabler:x",
1333
- size: "sm",
1334
- onClick: o
1335
- }, null, 8, ["class"])
1336
- ], 64);
1337
- };
1338
- }
1339
- }), lo = /* @__PURE__ */ L({
1340
- ...z("UploadFileGO"),
1341
- __name: "UploadFileGO",
1342
- setup(i) {
1343
- const e = je(), t = ke(), o = S(() => st(Jt(e.props.uploadFile))), n = S(() => Ce(t.props.getFileIcon) ? t.props.getFileIcon(e.props.uploadFile) : Fe[o.value].icon), r = S(() => Fe[o.value].fg), c = S(() => Fe[o.value].bg), d = () => {
1344
- var u, h, v, _;
1345
- const p = (h = (u = t.slots).go) == null ? void 0 : h.call(u, { uploadFile: e.props.uploadFile });
1346
- return F(p) ? it(e.props.uploadFile) ? k("img", {
1347
- class: y(X, "thumb"),
1348
- alt: e.props.uploadFile.name ?? "",
1349
- src: ((v = e.props.uploadFile) == null ? void 0 : v.thumbUrl) ?? ((_ = e.props.uploadFile) == null ? void 0 : _.url)
1350
- }) : null : p;
1351
- }, l = () => {
1352
- var u, h;
1353
- const p = (h = (u = t.slots).goIcon) == null ? void 0 : h.call(u, { uploadFile: e.props.uploadFile });
1354
- return F(p) ? null : p;
1355
- }, a = () => k(
1356
- Qe,
1357
- {
1358
- size: t.goSize.value,
1359
- icon: n.value,
1360
- fg: r.value,
1361
- bg: c.value
1362
- },
1363
- {
1364
- default: d,
1365
- icon: l
1366
- }
1367
- );
1368
- return (p, u) => (g(), B(a));
1369
- }
1370
- }), co = /* @__PURE__ */ L({
1371
- ...z("UploadListItemCard"),
1372
- __name: "UploadListItemCard",
1373
- setup(i) {
1374
- const e = ke(), t = je(), o = () => {
1375
- var p, u;
1376
- const l = (u = (p = e.slots).description) == null ? void 0 : u.call(p, { uploadFile: t.props.uploadFile });
1377
- let a;
1378
- if (F(l) || (a = l), t.props.uploadFile.description && (a = t.props.uploadFile.description), a)
1379
- return k("div", { class: y(X, "description") }, a);
1380
- }, n = () => {
1381
- var a, p;
1382
- const l = (p = (a = e.slots).title) == null ? void 0 : p.call(a, { uploadFile: t.props.uploadFile });
1383
- return F(l) ? t.label.value : l;
1384
- }, r = () => {
1385
- var l;
1386
- if (Ce(e.props.onDownload))
1387
- return e.props.onDownload(t.props.uploadFile);
1388
- if ((l = t.props.uploadFile) != null && l.url && typeof window < "u")
1389
- return window.open(t.props.uploadFile.url);
1390
- }, c = S(() => {
1391
- var l, a;
1392
- return (l = t.props.uploadFile) != null && l.percent && ((a = t.props.uploadFile) == null ? void 0 : a.status) !== "waiting" ? `${(t.props.uploadFile.percent ?? 0).toFixed(0)}%` : "waiting...";
1393
- }), d = (l, a) => {
1394
- var u, h, v, _;
1395
- const p = (h = (u = e.slots) == null ? void 0 : u.actions) == null ? void 0 : h.call(u, {
1396
- ...e,
1397
- uploadFile: t.props.uploadFile,
1398
- downloadFile: r
1399
- });
1400
- return F(p) ? (_ = (v = a.slots) == null ? void 0 : v.default) == null ? void 0 : _.call(v, {}) : p;
1401
- };
1402
- return (l, a) => {
1403
- var p;
1404
- return g(), U(se, null, [
1405
- s(e).props.go ? (g(), B(lo, { key: 0 })) : G("", !0),
1406
- ["error", "done"].includes(s(t).props.uploadFile.status) ? (g(), U("div", {
1407
- key: 2,
1408
- class: T(s(y)(s(X), "content"))
1409
- }, [
1410
- ne("div", {
1411
- class: T(s(y)(s(X), "title"))
1412
- }, [
1413
- w(n)
1414
- ], 2),
1415
- s(t).props.uploadFile.status === "error" ? (g(), B(Ke, {
1416
- key: 0,
1417
- message: "Failed",
1418
- status: "error"
1419
- })) : s(e).props.size !== "md" ? (g(), B(o, { key: 1 })) : G("", !0)
1420
- ], 2)) : (g(), B(ct, {
1421
- key: 1,
1422
- class: T(s(y)(s(X), "progress")),
1423
- percent: ((p = s(t).props.uploadFile) == null ? void 0 : p.percent) ?? 0,
1424
- label: s(t).label.value,
1425
- helperText: c.value
1426
- }, {
1427
- label: q(() => [
1428
- w(n)
1429
- ]),
1430
- _: 1
1431
- }, 8, ["class", "percent", "label", "helperText"])),
1432
- w(d, null, {
1433
- default: q(() => {
1434
- var u;
1435
- return [
1436
- s(t).props.uploadFile.status === "done" ? (g(), B(J, {
1437
- key: 0,
1438
- icon: "tabler:download",
1439
- size: "sm",
1440
- type: "ghost",
1441
- color: "neutral",
1442
- onClick: r
1443
- })) : G("", !0),
1444
- s(e).props.pausableChunked && s(t).props.uploadFile.status === "uploading" && ((u = s(t).props.uploadFile.chunks) != null && u.length) && s(Ce)(s(t).props.uploadFile.cancel) ? (g(), B(J, {
1445
- key: 1,
1446
- icon: "tabler:pause",
1447
- size: "sm",
1448
- type: "ghost",
1449
- color: "neutral",
1450
- onClick: s(t).props.uploadFile.cancel
1451
- }, null, 8, ["onClick"])) : s(e).canRunUpload(s(t).props.uploadFile) ? (g(), B(J, {
1452
- key: 2,
1453
- icon: ["paused", "waiting"].includes(s(t).props.uploadFile.status) ? "tabler:player-play" : "tabler:reload",
1454
- size: "sm",
1455
- type: "ghost",
1456
- color: "neutral",
1457
- onClick: a[0] || (a[0] = (h) => s(e).resetRequest(s(t).props.uploadFile))
1458
- }, null, 8, ["icon"])) : G("", !0),
1459
- w(J, {
1460
- icon: ["done", "error"].includes(s(t).props.uploadFile.status) ? "tabler:trash" : "tabler:x",
1461
- size: "sm",
1462
- type: "ghost",
1463
- color: "neutral",
1464
- onClick: a[1] || (a[1] = (h) => s(e).remove(s(t).props.uploadFile))
1465
- }, null, 8, ["icon"])
1466
- ];
1467
- }),
1468
- _: 1
1469
- })
1470
- ], 64);
1471
- };
1472
- }
1473
- }), [je, po] = Le("UploadItem"), uo = /* @__PURE__ */ L({
1474
- ...z("UploadListItem"),
1475
- __name: "UploadListItem",
1476
- props: {
1477
- uploadFile: {}
1478
- },
1479
- setup(i) {
1480
- const e = i, t = me(X, {
1481
- variants: {
1482
- size: K(ot, X),
1483
- listType: K(
1484
- nt,
1485
- X
1486
- ),
1487
- type: K(Wt, X),
1488
- status: K(qt, X)
1489
- }
1490
- }), o = S(() => {
1491
- var c, d, l;
1492
- return ((c = e.uploadFile) == null ? void 0 : c.name) ?? ((l = (d = e.uploadFile) == null ? void 0 : d.originFileObj) == null ? void 0 : l.name);
1493
- }), n = ke();
1494
- po({
1495
- props: e,
1496
- label: o
1497
- });
1498
- const r = () => {
1499
- var d, l;
1500
- const c = (l = (d = n.slots).listItem) == null ? void 0 : l.call(d, { ...n, uploadFile: e.uploadFile });
1501
- return F(c) ? n.props.listType === "card" ? k(co) : k(ao) : c;
1502
- };
1503
- return (c, d) => {
1504
- var l;
1505
- return g(), U("div", {
1506
- class: T(
1507
- s(t)({
1508
- size: s(n).props.size,
1509
- listType: s(n).props.listType,
1510
- type: s(n).props.type,
1511
- status: (l = c.uploadFile) == null ? void 0 : l.status
1512
- })
1513
- )
1514
- }, [
1515
- w(r)
1516
- ], 2);
1517
- };
1518
- }
1519
- }), mo = /* @__PURE__ */ L({
1520
- ...z("UploadList"),
1521
- __name: "UploadList",
1522
- setup(i) {
1523
- const e = ke(), t = me(we, {
1524
- variants: {
1525
- size: K(ot, we),
1526
- listType: K(nt, we)
1527
- }
1528
- }), o = () => {
1529
- var r, c;
1530
- const n = (c = (r = e.slots).list) == null ? void 0 : c.call(r, e);
1531
- return F(n) ? e.fileList.value.map(
1532
- (d) => k(uo, { uploadFile: d, key: d.uid })
1533
- ) : n;
1534
- };
1535
- return (n, r) => {
1536
- var c;
1537
- return (c = s(e).fileList.value) != null && c.length ? (g(), U("div", {
1538
- key: 0,
1539
- class: T(
1540
- s(t)({
1541
- size: s(e).props.size,
1542
- listType: s(e).props.listType
1543
- })
1544
- )
1545
- }, [
1546
- w(o)
1547
- ], 2)) : G("", !0);
1548
- };
1549
- }
1550
- }), fo = (i) => new Promise((e) => {
1551
- i.file((t) => {
1552
- i.fullPath && !t.webkitRelativePath && Object.defineProperty(t, "webkitRelativePath", {
1553
- value: i.fullPath.replace(/^\//, ""),
1554
- writable: !1
1555
- }), e(t);
1556
- });
1557
- }), go = (i) => {
1558
- const e = i.createReader(), t = [];
1559
- return new Promise((o) => {
1560
- const n = () => {
1561
- e.readEntries((r) => {
1562
- r.length === 0 ? o(t) : (t.push(...r), n());
1563
- });
1564
- };
1565
- n();
1566
- });
1567
- }, ho = async (i) => {
1568
- const e = [], t = async (o) => {
1569
- if (o.isFile) {
1570
- const n = await fo(o);
1571
- e.push(n);
1572
- } else if (o.isDirectory) {
1573
- const n = await go(o);
1574
- await Promise.all(n.map(t));
1575
- }
1576
- };
1577
- return await Promise.all(
1578
- i.map((o) => {
1579
- var r;
1580
- const n = (r = o.webkitGetAsEntry) == null ? void 0 : r.call(o);
1581
- if (n)
1582
- return t(n);
1583
- })
1584
- ), e;
1585
- }, vo = ["accept", "webkitdirectory", "multiple", "value"], pt = /* @__PURE__ */ L({
1586
- ...z("UploadTrigger"),
1587
- __name: "UploadTrigger",
1588
- props: {
1589
- directory: { type: Boolean },
1590
- multiple: { type: Boolean },
1591
- disabled: { type: Boolean },
1592
- accept: {}
1593
- },
1594
- emits: ["addFiles"],
1595
- setup(i, { emit: e }) {
1596
- const t = e, o = i, n = D(), r = (u) => {
1597
- const { files: h } = u.target;
1598
- t("addFiles", Array.prototype.slice.call(h)), c.value && (c.value.value = "");
1599
- }, c = D(), d = () => {
1600
- var u;
1601
- (u = c.value) == null || u.click();
1602
- }, l = (u) => {
1603
- u.key === "Enter" && d();
1604
- }, a = async (u) => {
1605
- if (u.preventDefault(), u.type === "dragover")
1606
- return;
1607
- let h = [];
1608
- u.dataTransfer && (o.directory ? h = await ho(Array.prototype.slice.call(u.dataTransfer.items)) : h = Array.prototype.slice.call(u.dataTransfer.files)), o.multiple || (h = h.slice(0, 1)), t(
1609
- "addFiles",
1610
- h.filter((v) => et(v, o.accept))
1611
- );
1612
- }, p = S(() => o.disabled ? {} : {
1613
- onClick: d,
1614
- onKeydown: l,
1615
- onDrop: a,
1616
- onDragover: a,
1617
- tabindex: "0"
1618
- });
1619
- return (u, h) => (g(), U("div", le({ class: "uploadTrigger w-fit inline" }, p.value), [
1620
- ce(u.$slots, "default", ue(de({ ...p.value, disabled: u.disabled }))),
1621
- ne("input", {
1622
- type: "file",
1623
- accept: u.accept,
1624
- webkitdirectory: u.directory,
1625
- multiple: u.multiple,
1626
- value: n.value,
1627
- onChange: r,
1628
- ref_key: "inputRef",
1629
- ref: c,
1630
- style: { display: "none" }
1631
- }, null, 40, vo)
1632
- ], 16));
1633
- }
1634
- }), ae = 200;
1635
- function yo(i) {
1636
- return new Promise((e) => {
1637
- if (!i.type || !Me(De(i.type))) {
1638
- e("");
1639
- return;
1640
- }
1641
- const t = document.createElement("canvas");
1642
- t.width = ae, t.height = ae, t.style.cssText = `position: fixed; left: 0; top: 0; width: ${ae}px; height: ${ae}px; z-index: 9999; display: none;`, document.body.appendChild(t);
1643
- const o = t.getContext("2d"), n = new Image();
1644
- if (n.onload = () => {
1645
- const { width: r, height: c } = n;
1646
- let d = ae, l = ae, a = 0, p = 0;
1647
- r > c ? (l = c * (ae / r), p = -(l - d) / 2) : (d = r * (ae / c), a = -(d - l) / 2), o.drawImage(n, a, p, d, l);
1648
- const u = t.toDataURL();
1649
- document.body.removeChild(t), e(u);
1650
- }, n.crossOrigin = "anonymous", i.type.startsWith("image/svg+xml")) {
1651
- const r = new FileReader();
1652
- r.addEventListener("load", () => {
1653
- r.result && (n.src = r.result);
1654
- }), r.readAsDataURL(i);
1655
- } else
1656
- n.src = window.URL.createObjectURL(i);
1657
- });
1658
- }
1659
- const _o = /* @__PURE__ */ L({
1660
- ...z("Upload", !1),
1661
- __name: "Upload",
1662
- props: {
1663
- onDownload: {},
1664
- parallelUpload: { type: Boolean },
1665
- uploadOnSelect: { type: Boolean, default: !0 },
1666
- pausableChunked: { type: Boolean },
1667
- noTrigger: { type: Boolean },
1668
- fileList: {},
1669
- size: { default: "md" },
1670
- chunkSize: {},
1671
- listType: { default: "card" },
1672
- type: { default: "outline" },
1673
- go: { type: Boolean, default: !0 },
1674
- maxCount: {},
1675
- action: {},
1676
- getFileIcon: {},
1677
- directory: { type: Boolean },
1678
- multiple: { type: Boolean, default: !0 },
1679
- disabled: { type: Boolean },
1680
- accept: {}
1681
- },
1682
- emits: ["update:fileList", "change", "preview", "createRequest", "resetRequest", "remove"],
1683
- setup(i, { expose: e, emit: t }) {
1684
- const o = i, n = t, r = ve(), c = mt(), d = y(Ze, "file"), l = (m) => Ie(m ? y(d, "chunk") : d, !0), a = D([]), p = S(() => o.listType !== "image" && o.pausableChunked);
1685
- let u = !1;
1686
- Pe(
1687
- () => o.fileList,
1688
- (m) => {
1689
- var b, O;
1690
- u = !0, a.value = (O = (b = m ?? []) == null ? void 0 : b.map) == null ? void 0 : O.call(b, (Q) => {
1691
- if (Q && $e(Q))
1692
- return Nt(Q, {
1693
- getUid: l,
1694
- chunkFile: p.value,
1695
- chunkSize: o.chunkSize
1696
- });
1697
- }).filter(Boolean), ft(() => u = !1);
1698
- },
1699
- { immediate: !0, deep: !0 }
1700
- ), Pe(
1701
- a,
1702
- (m) => {
1703
- u || n("update:fileList", m ?? []);
1704
- },
1705
- { immediate: !0, deep: !0 }
1706
- );
1707
- const h = S(() => o.maxCount ? Number(o.maxCount) : 0), v = (m) => {
1708
- if (m) {
1709
- const b = a.value.findIndex(
1710
- (O) => O.uid && m.uid && O.uid === m.uid
1711
- );
1712
- b === -1 && (!h.value || h.value > a.value.length) ? a.value.push(m) : b > -1 && a.value.splice(b, 0, m), n("change", {
1713
- file: H(m),
1714
- fileList: H(a.value),
1715
- event: "add"
1716
- });
1717
- }
1718
- }, _ = S(
1719
- () => o.accept ?? o.listType === "image" ? "image/*" : void 0
1720
- ), R = (m) => {
1721
- zt(m) && m.filter((b) => !o.directory || et(b, _.value)).forEach((b) => {
1722
- v(
1723
- tt(b, {
1724
- getUid: l,
1725
- chunkFile: p.value,
1726
- chunkSize: o.chunkSize
1727
- })
1728
- );
1729
- });
1730
- }, P = S(
1731
- () => {
1732
- var m;
1733
- return o.uploadOnSelect || o.listType === "image" ? ((m = a.value) == null ? void 0 : m.filter(
1734
- (b) => b.status === "waiting" && b.originFileObj
1735
- )) ?? [] : [];
1736
- }
1737
- ), M = S(
1738
- () => {
1739
- var m;
1740
- return ((m = a.value) == null ? void 0 : m.filter(
1741
- (b) => b.status === "uploading" && (b == null ? void 0 : b.cancel)
1742
- )) ?? [];
1743
- }
1744
- ), E = (m, b) => {
1745
- if (m && b) {
1746
- const O = a.value.findIndex((Q) => Q.uid === m);
1747
- O > -1 && (a.value[O] = {
1748
- ...a.value[O],
1749
- ...b
1750
- });
1751
- }
1752
- }, C = async (m) => {
1753
- var b, O, Q, He;
1754
- if (m.uid && a.value) {
1755
- const oe = a.value.find((ge) => ge.uid === m.uid);
1756
- if (oe && Ce(o.action) && (!M.value.length || o.parallelUpload || p.value && ((b = oe.chunks) != null && b.length) && oe.chunks.length > 1 && oe.status === "uploading" && oe.chunks.some((ge) => ge.status === "waiting"))) {
1757
- const ge = new AbortController(), ut = () => {
1758
- const $ = () => ge.abort(), f = H(oe);
1759
- if (p.value && f.chunks && f.chunks.length > 1) {
1760
- const x = f.chunks.findIndex((Y) => Y.status === "waiting");
1761
- x > -1 && (f.chunks[x] = {
1762
- ...f.chunks[x],
1763
- status: "uploading",
1764
- cancel: $
1765
- });
1766
- }
1767
- E(f.uid, {
1768
- ...f,
1769
- status: "uploading",
1770
- cancel: $
1771
- });
1772
- };
1773
- let j = {
1774
- signal: ge.signal,
1775
- onUploadProgress($) {
1776
- },
1777
- uid: m.uid
1778
- };
1779
- if (p.value && oe.chunks && oe.chunks.length > 1 && oe.chunks.some(($) => $.status === "waiting")) {
1780
- const $ = oe.chunks.find((f) => f.status === "waiting");
1781
- $ != null && $.uid && (j = {
1782
- ...j,
1783
- ...kt($, "chunk", "chunkSiz", "index"),
1784
- chunk_uid: $.uid,
1785
- onUploadProgress(f) {
1786
- var Y, ye, ie, Ve;
1787
- const x = H(
1788
- a.value.find((_e) => _e.uid === m.uid)
1789
- );
1790
- if (x) {
1791
- const _e = (Y = x.chunks) == null ? void 0 : Y.findIndex(
1792
- (ze) => ze.uid === $.uid
1793
- );
1794
- _e !== void 0 && ((ye = x.chunks) != null && ye[_e]) && (x.chunks[_e].percent = Math.round(
1795
- f.loaded * 100 / f.total
1796
- )), (ie = x.chunks) != null && ie.length && ((Ve = x.chunks) == null ? void 0 : Ve.length) > 1 ? x.percent = Math.min(
1797
- Math.max(
1798
- x.chunks.reduce((ze, dt) => ze + (dt.percent ?? 0), 0) / (100 * x.chunks.length),
1799
- 0
1800
- ),
1801
- 100
1802
- ) : x.percent = Math.round(f.loaded * 100 / f.total), E(x.uid, x);
1803
- }
1804
- }
1805
- });
1806
- } else
1807
- j = {
1808
- ...j,
1809
- file: oe.originFileObj,
1810
- onUploadProgress($) {
1811
- const f = H(
1812
- a.value.find((x) => x.uid === m.uid)
1813
- );
1814
- f && E(f.uid, {
1815
- percent: Math.round($.loaded * 100 / $.total)
1816
- });
1817
- }
1818
- };
1819
- if (ut(), j.file || j.chunk) {
1820
- n("createRequest", m), n("change", {
1821
- file: H(m),
1822
- fileList: H(a.value),
1823
- event: "upload"
1824
- });
1825
- try {
1826
- let $ = await o.action(j);
1827
- try {
1828
- typeof $ == "string" && ($ = JSON.parse($));
1829
- } catch {
1830
- }
1831
- let f = H(
1832
- a.value.find((x) => x.uid === j.uid)
1833
- );
1834
- if (f) {
1835
- let x = !1;
1836
- if (j.chunk_uid && ((O = f.chunks) != null && O.length) && f.chunks.length > 1) {
1837
- const Y = f.chunks.findIndex(
1838
- (ie) => ie.uid === j.chunk_uid
1839
- );
1840
- f.chunks[Y] && (f.chunks[Y] = {
1841
- ...f.chunks[Y],
1842
- cancel: void 0,
1843
- status: "done",
1844
- response: $ ?? void 0
1845
- });
1846
- const ye = f.chunks.every((ie) => ie.status === "done") ? "done" : "uploading";
1847
- ye === "done" ? f = {
1848
- ...f,
1849
- cancel: void 0,
1850
- status: ye
1851
- } : f.chunks.some((ie) => ie.status === "waiting") && (x = !0);
1852
- } else
1853
- f = {
1854
- ...f,
1855
- cancel: void 0,
1856
- status: "done",
1857
- response: $ ?? void 0
1858
- };
1859
- E(j.uid, f), x && await C(f);
1860
- }
1861
- } catch ($) {
1862
- if ($.name === "CanceledError") {
1863
- let f = H(
1864
- a.value.find((x) => x.uid === j.uid)
1865
- );
1866
- if (f) {
1867
- if (j.chunk_uid && ((Q = f.chunks) != null && Q.length) && f.chunks.length > 1) {
1868
- const x = f.chunks.findIndex(
1869
- (Y) => Y.uid === j.chunk_uid
1870
- );
1871
- f.chunks[x] && (f.chunks[x] = {
1872
- ...f.chunks[x],
1873
- cancel: void 0,
1874
- status: "waiting"
1875
- }), f = {
1876
- ...f,
1877
- cancel: void 0,
1878
- status: "paused"
1879
- }, n("change", {
1880
- file: H(f),
1881
- fileList: H(a.value),
1882
- event: "paused"
1883
- });
1884
- } else
1885
- f = {
1886
- ...f,
1887
- cancel: void 0,
1888
- status: "error"
1889
- }, n("change", {
1890
- file: H(f),
1891
- fileList: H(a.value),
1892
- event: "cancel"
1893
- });
1894
- E(j.uid, f);
1895
- }
1896
- } else {
1897
- let f = H(
1898
- a.value.find((x) => x.uid === j.uid)
1899
- );
1900
- if (f) {
1901
- if (j.chunk_uid && ((He = f.chunks) != null && He.length) && f.chunks.length > 1) {
1902
- const x = f.chunks.findIndex(
1903
- (Y) => Y.uid === j.chunk_uid
1904
- );
1905
- f.chunks[x] && (f.chunks[x] = {
1906
- ...f.chunks[x],
1907
- cancel: void 0,
1908
- status: "waiting"
1909
- });
1910
- }
1911
- f = {
1912
- ...f,
1913
- cancel: void 0,
1914
- status: "error",
1915
- error: $,
1916
- percent: 0
1917
- }, n("change", {
1918
- file: H(f),
1919
- fileList: H(a.value),
1920
- event: "failed"
1921
- }), E(j.uid, f);
1922
- }
1923
- }
1924
- }
1925
- }
1926
- }
1927
- }
1928
- }, N = async (m) => {
1929
- if (m.uid && a.value)
1930
- return E(m.uid, { status: "waiting" }), n("resetRequest", m), C(m);
1931
- }, I = async (m) => {
1932
- if (m.uid && a.value) {
1933
- const b = H(a.value ?? []), O = b.findIndex((Q) => Q.uid === m.uid);
1934
- O > -1 && b[O] && (b.splice(O, 1), a.value = b, n("remove", m), n("change", {
1935
- file: H(m),
1936
- fileList: H(a.value),
1937
- event: "remove"
1938
- }));
1939
- }
1940
- }, V = (m) => !!((o.parallelUpload || !M.value.length) && (m.status === "paused" || m.status === "error" || (!o.uploadOnSelect || o.listType === "image") && m.status === "waiting")), te = S(() => {
1941
- switch (o.size) {
1942
- case "xlg":
1943
- return "md";
1944
- default:
1945
- return "sm";
1946
- }
1947
- });
1948
- gt(() => {
1949
- (o.parallelUpload && P.value.length || !M.value.length) && P.value.forEach(C), (a.value || []).forEach((m, b) => {
1950
- typeof document > "u" || typeof window > "u" || !window.FileReader || !window.File || !(m.originFileObj instanceof File || m.originFileObj instanceof Blob) || m.thumbUrl !== void 0 || (m.thumbUrl = "", yo(m.originFileObj).then((O) => {
1951
- const Q = O || "";
1952
- Q !== m.thumbUrl && E(m == null ? void 0 : m.uid, {
1953
- thumbUrl: Q
1954
- });
1955
- }));
1956
- });
1957
- });
1958
- const re = S(() => {
1959
- switch (o.size) {
1960
- case "xlg":
1961
- return "sm";
1962
- case "lg":
1963
- return "xsm";
1964
- default:
1965
- return "x2sm";
1966
- }
1967
- }), W = {
1968
- props: o,
1969
- attrs: c,
1970
- slots: r,
1971
- emit: n,
1972
- fileList: ht(a),
1973
- progressSize: re,
1974
- uploadableFiles: P,
1975
- uploadingFiles: M,
1976
- createRequest: C,
1977
- resetRequest: N,
1978
- canRunUpload: V,
1979
- remove: I,
1980
- goSize: te,
1981
- addFiles: R
1982
- };
1983
- return Vt(W), e(W), (m, b) => (g(), U(se, null, [
1984
- m.noTrigger ? G("", !0) : (g(), B(pt, {
1985
- key: 0,
1986
- multiple: m.multiple,
1987
- directory: m.directory,
1988
- disabled: m.disabled,
1989
- accept: _.value,
1990
- onAddFiles: R
1991
- }, {
1992
- default: q((O) => [
1993
- ce(m.$slots, "default", ue(de(O)))
1994
- ]),
1995
- _: 3
1996
- }, 8, ["multiple", "directory", "disabled", "accept"])),
1997
- ce(m.$slots, "list", ue(de(W)), () => [
1998
- w(mo)
1999
- ])
2000
- ], 64));
2001
- }
2002
- }), Qo = /* @__PURE__ */ L({
591
+ }), io = /* @__PURE__ */ A({
2003
592
  ...z("CommentEditor"),
2004
593
  __name: "CommentEditor",
2005
594
  props: {
@@ -2014,71 +603,71 @@ const _o = /* @__PURE__ */ L({
2014
603
  maxHeight: { default: 100 }
2015
604
  },
2016
605
  emits: ["openReaction", "openMention", "blur", "focus", "mention", "submit"],
2017
- setup(i, { emit: e }) {
2018
- const t = ve(), o = i, n = e, r = y(Z, "editor"), c = D(), d = () => {
2019
- n("openReaction", c.value);
2020
- }, l = D(), a = () => {
2021
- n("openMention", l.value);
2022
- }, { rootBindings: p, inputBindings: u } = $t({
2023
- getDisabled: () => o.disabled,
2024
- emit: n
2025
- }), h = () => n("submit"), v = S(() => {
2026
- if (Number(o.maxHeight) > 0)
2027
- return `${o.maxHeight}px`;
2028
- if (typeof o.maxHeight == "string")
2029
- return o.maxHeight;
2030
- }), _ = D(), R = (P) => {
2031
- var M;
2032
- (M = _.value) != null && M.addFiles && P.length && _.value.addFiles(P);
606
+ setup(m, { emit: s }) {
607
+ const t = W(), e = m, c = s, a = h(R, "editor"), l = B(), p = () => {
608
+ c("openReaction", l.value);
609
+ }, o = B(), v = () => {
610
+ c("openMention", o.value);
611
+ }, { rootBindings: y, inputBindings: k } = Pe({
612
+ getDisabled: () => e.disabled,
613
+ emit: c
614
+ }), D = () => c("submit"), r = L(() => {
615
+ if (Number(e.maxHeight) > 0)
616
+ return `${e.maxHeight}px`;
617
+ if (typeof e.maxHeight == "string")
618
+ return e.maxHeight;
619
+ }), f = B(), u = (d) => {
620
+ var S;
621
+ (S = f.value) != null && S.addFiles && d.length && f.value.addFiles(d);
2033
622
  };
2034
- return (P, M) => (g(), U("div", le({
2035
- class: s(A)(s(r), o.class)
2036
- }, s(p)), [
2037
- w(Tt, {
623
+ return (d, S) => (b(), j("div", V({
624
+ class: n(C)(n(a), e.class)
625
+ }, n(y)), [
626
+ g(xe, {
2038
627
  overlay: !1,
2039
628
  hasMask: !1,
2040
- class: T(s(A)(s(y)(s(r), "editor"), "paragraph", o.editorCls)),
2041
- style: Se({ maxHeight: v.value })
629
+ class: O(n(C)(n(h)(n(a), "editor"), "paragraph", e.editorCls)),
630
+ style: ce({ maxHeight: r.value })
2042
631
  }, {
2043
- default: q(() => [
2044
- ce(P.$slots, "default", ue(de(s(u))))
632
+ default: T(() => [
633
+ F(d.$slots, "default", G(N(n(k))))
2045
634
  ]),
2046
635
  _: 3
2047
636
  }, 8, ["class", "style"]),
2048
- w(_o, le({ noTrigger: "" }, P.uploadProps, {
637
+ g(Te, V({ noTrigger: "" }, d.uploadProps, {
2049
638
  ref_key: "uploadRef",
2050
- ref: _
2051
- }), Te({ _: 2 }, [
2052
- he(Object.keys(s(bt)(t, "default")), (E) => ({
2053
- name: E,
2054
- fn: q((C) => [
2055
- ce(P.$slots, E, ue(de(C)))
639
+ ref: f
640
+ }), X({ _: 2 }, [
641
+ K(Object.keys(n(me)(t, "default")), (P) => ({
642
+ name: P,
643
+ fn: T((i) => [
644
+ F(d.$slots, P, G(N(i)))
2056
645
  ])
2057
646
  }))
2058
647
  ]), 1040),
2059
- ne("div", {
2060
- class: T(s(A)(s(y)(s(r), "footer"), o.footerCls))
648
+ U("div", {
649
+ class: O(n(C)(n(h)(n(a), "footer"), e.footerCls))
2061
650
  }, [
2062
- w(Xe),
2063
- ne("div", {
2064
- class: T(s(A)(s(y)(s(r), "actions"), o.actionsCls))
651
+ g(ke),
652
+ U("div", {
653
+ class: O(n(C)(n(h)(n(a), "actions"), e.actionsCls))
2065
654
  }, [
2066
- ne("div", null, [
2067
- w(J, {
655
+ U("div", null, [
656
+ g(w, {
2068
657
  icon: "tabler:at",
2069
658
  color: "neutral",
2070
659
  type: "ghost",
2071
660
  ref_key: "mentionRef",
2072
- ref: l,
2073
- onClick: a
661
+ ref: o,
662
+ onClick: v
2074
663
  }, null, 512),
2075
- w(pt, {
664
+ g($e, {
2076
665
  accept: "image/*",
2077
666
  multiple: "",
2078
- onAddFiles: R
667
+ onAddFiles: u
2079
668
  }, {
2080
- default: q(() => [
2081
- w(J, {
669
+ default: T(() => [
670
+ g(w, {
2082
671
  icon: "tabler:photo",
2083
672
  color: "neutral",
2084
673
  type: "ghost"
@@ -2086,25 +675,25 @@ const _o = /* @__PURE__ */ L({
2086
675
  ]),
2087
676
  _: 1
2088
677
  }),
2089
- w(J, {
678
+ g(w, {
2090
679
  icon: "tabler:mood-plus",
2091
680
  color: "neutral",
2092
681
  type: "ghost",
2093
682
  ref_key: "reactionRef",
2094
- ref: c,
2095
- onClick: d
683
+ ref: l,
684
+ onClick: p
2096
685
  }, null, 512)
2097
686
  ]),
2098
- w(J, {
2099
- disabled: P.isEmpty,
687
+ g(w, {
688
+ disabled: d.isEmpty,
2100
689
  icon: "tabler:arrow-up",
2101
- onClick: h
690
+ onClick: D
2102
691
  }, null, 8, ["disabled"])
2103
692
  ], 2)
2104
693
  ], 2)
2105
694
  ], 16));
2106
695
  }
2107
- }), Co = ["tabindex", "disabled"], Xo = /* @__PURE__ */ L({
696
+ }), we = ["tabindex", "disabled"], lo = /* @__PURE__ */ A({
2108
697
  ...z("CommentTrigger"),
2109
698
  __name: "CommentTrigger",
2110
699
  props: {
@@ -2118,42 +707,42 @@ const _o = /* @__PURE__ */ L({
2118
707
  shortcutProps: {}
2119
708
  },
2120
709
  emits: ["add"],
2121
- setup(i, { emit: e }) {
2122
- const t = ve(), o = i, n = e, r = y(Z, "trigger"), c = (l) => {
2123
- !o.ignoeShortcut && l.code === "KeyC" && l.altKey && d(l);
710
+ setup(m, { emit: s }) {
711
+ const t = W(), e = m, c = s, a = h(R, "trigger"), l = (o) => {
712
+ !e.ignoeShortcut && o.code === "KeyC" && o.altKey && p(o);
2124
713
  };
2125
- vt(() => {
2126
- o.withShortcut && addEventListener("keyup", c);
2127
- }), yt(() => {
2128
- o.withShortcut && removeEventListener("keyup", c);
2129
- }), o.withShortcut;
2130
- const d = (l) => n("add", l);
2131
- return (l, a) => (g(), U("div", {
2132
- class: T(s(A)(s(r), o.class)),
2133
- tabindex: l.disabled ? -1 : 0,
2134
- disabled: l.disabled ? "" : void 0,
2135
- onPointerdown: Ge(d, ["stop"]),
2136
- onKeyup: Ge(d, ["stop"])
714
+ de(() => {
715
+ e.withShortcut && addEventListener("keyup", l);
716
+ }), ue(() => {
717
+ e.withShortcut && removeEventListener("keyup", l);
718
+ }), e.withShortcut;
719
+ const p = (o) => c("add", o);
720
+ return (o, v) => (b(), j("div", {
721
+ class: O(n(C)(n(a), e.class)),
722
+ tabindex: o.disabled ? -1 : 0,
723
+ disabled: o.disabled ? "" : void 0,
724
+ onPointerdown: oe(p, ["stop"]),
725
+ onKeyup: oe(p, ["stop"])
2137
726
  }, [
2138
- w(Je, le(l.avatarProps ?? {}, {
727
+ g(ae, V(o.avatarProps ?? {}, {
2139
728
  size: "sm",
2140
- src: l.src
2141
- }), Te({ _: 2 }, [
2142
- he(Object.keys(t), (p) => ({
2143
- name: p,
2144
- fn: q((u) => [
2145
- ce(l.$slots, p, ue(de(u)))
729
+ src: o.src
730
+ }), X({ _: 2 }, [
731
+ K(Object.keys(t), (y) => ({
732
+ name: y,
733
+ fn: T((k) => [
734
+ F(o.$slots, y, G(N(k)))
2146
735
  ])
2147
736
  }))
2148
737
  ]), 1040, ["src"]),
2149
- ne("div", {
2150
- class: T(s(y)(s(r), "text"))
738
+ U("div", {
739
+ class: O(n(h)(n(a), "text"))
2151
740
  }, [
2152
- ce(l.$slots, "text", {}, () => [
2153
- qe(Ue(l.text), 1)
741
+ F(o.$slots, "text", {}, () => [
742
+ ne(Q(o.text), 1)
2154
743
  ])
2155
744
  ], 2),
2156
- w(At, le(l.shortcutProps ?? {}, { items: [
745
+ g(Oe, V(o.shortcutProps ?? {}, { items: [
2157
746
  {
2158
747
  text: "Alt"
2159
748
  },
@@ -2161,77 +750,77 @@ const _o = /* @__PURE__ */ L({
2161
750
  text: "C"
2162
751
  }
2163
752
  ] }), null, 16)
2164
- ], 42, Co));
753
+ ], 42, we));
2165
754
  }
2166
- }), Yo = (i) => {
2167
- const e = D(!1), t = D(), o = D(!1), n = (C, N = !1) => {
2168
- e.value = !0, o.value = N, t.value = C;
2169
- }, r = D(!1), c = D(), d = (C) => {
2170
- r.value = !0, c.value = C;
2171
- }, l = S(() => ({
2172
- open: e.value,
755
+ }), ro = (m) => {
756
+ const s = B(!1), t = B(), e = B(!1), c = (i, x = !1) => {
757
+ s.value = !0, e.value = x, t.value = i;
758
+ }, a = B(!1), l = B(), p = (i) => {
759
+ a.value = !0, l.value = i;
760
+ }, o = L(() => ({
761
+ open: s.value,
2173
762
  reference: t.value,
2174
- "onUpdate:open": (C) => e.value = C,
2175
- onReaction: (C) => {
2176
- var N, I;
2177
- if (o.value)
763
+ "onUpdate:open": (i) => s.value = i,
764
+ onReaction: (i) => {
765
+ var x, M;
766
+ if (e.value)
2178
767
  try {
2179
- (N = i.addEmoji) == null || N.call(i, C);
2180
- } catch (V) {
2181
- console.log("error on reaction ===>", V);
768
+ (x = m.addEmoji) == null || x.call(m, i);
769
+ } catch (I) {
770
+ console.log("error on reaction ===>", I);
2182
771
  }
2183
772
  try {
2184
- (I = i.onReaction) == null || I.call(i, C);
2185
- } catch (V) {
2186
- console.log("error on reaction ===>", V);
773
+ (M = m.onReaction) == null || M.call(m, i);
774
+ } catch (I) {
775
+ console.log("error on reaction ===>", I);
2187
776
  }
2188
777
  }
2189
- })), a = S(() => ({
2190
- open: r.value,
2191
- reference: c.value,
2192
- "onUpdate:open": (C) => r.value = C
2193
- })), p = D(!1), u = D(), h = D(), v = D(!1), _ = S(() => ({
2194
- open: p.value,
2195
- "onUpdate:open": (C) => p.value = C,
2196
- search: u.value,
2197
- "onUpdate:search": (C) => u.value = C,
2198
- reference: h.value,
2199
- headerSearch: v.value,
2200
- onPointerDownOutside: P,
2201
- onEscapeKeyDown: P
2202
- })), R = (C) => {
2203
- C && (h.value = { getBoundingClientRect: C }, p.value = !0, v.value = !1);
2204
- }, P = () => {
2205
- h.value = void 0, p.value = !1, u.value = void 0;
2206
- }, M = (C) => {
2207
- u.value = C;
2208
- }, E = S(() => ({
2209
- onOpenReaction: (C) => n(C, !0),
2210
- onOpenMention: (C) => {
2211
- C && (h.value = C, p.value = !0, v.value = !0);
778
+ })), v = L(() => ({
779
+ open: a.value,
780
+ reference: l.value,
781
+ "onUpdate:open": (i) => a.value = i
782
+ })), y = B(!1), k = B(), D = B(), r = B(!1), f = L(() => ({
783
+ open: y.value,
784
+ "onUpdate:open": (i) => y.value = i,
785
+ search: k.value,
786
+ "onUpdate:search": (i) => k.value = i,
787
+ reference: D.value,
788
+ headerSearch: r.value,
789
+ onPointerDownOutside: d,
790
+ onEscapeKeyDown: d
791
+ })), u = (i) => {
792
+ i && (D.value = { getBoundingClientRect: i }, y.value = !0, r.value = !1);
793
+ }, d = () => {
794
+ D.value = void 0, y.value = !1, k.value = void 0;
795
+ }, S = (i) => {
796
+ k.value = i;
797
+ }, P = L(() => ({
798
+ onOpenReaction: (i) => c(i, !0),
799
+ onOpenMention: (i) => {
800
+ i && (D.value = i, y.value = !0, r.value = !0);
2212
801
  }
2213
802
  }));
2214
803
  return {
2215
- reactionBinding: l,
2216
- actionBinding: a,
2217
- editorBinding: E,
2218
- mentionBinding: _,
2219
- openActions: d,
2220
- openReaction: n,
2221
- openMentionInEditor: R,
2222
- closeMentionInEditor: P,
2223
- updateMentionQuery: M
804
+ reactionBinding: o,
805
+ actionBinding: v,
806
+ editorBinding: P,
807
+ mentionBinding: f,
808
+ openActions: p,
809
+ openReaction: c,
810
+ openMentionInEditor: u,
811
+ closeMentionInEditor: d,
812
+ updateMentionQuery: S
2224
813
  };
2225
814
  };
2226
815
  export {
2227
- qo as Comment,
2228
- Wo as CommentAction,
2229
- Qo as CommentEditor,
2230
- Jo as CommentMention,
2231
- Ko as CommentReaction,
2232
- Xo as CommentTrigger,
2233
- Z as commentPrefix,
2234
- Ye as injectCommentContext,
2235
- Ht as provideCommentContext,
2236
- Yo as useComment
816
+ to as Comment,
817
+ no as CommentAction,
818
+ io as CommentEditor,
819
+ ao as CommentMention,
820
+ so as CommentReaction,
821
+ lo as CommentTrigger,
822
+ R as commentPrefix,
823
+ ie as injectCommentContext,
824
+ Me as provideCommentContext,
825
+ ro as useComment
2237
826
  };