@orchidui/dashboard 1.21.1-4 → 1.21.1-40

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 (2) hide show
  1. package/dist/index.js +432 -427
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  var pt = Object.defineProperty;
2
- var gt = (n, V, r) => V in n ? pt(n, V, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[V] = r;
3
- var We = (n, V, r) => gt(n, typeof V != "symbol" ? V + "" : V, r);
4
- import { ref as v, computed as $e, createBlock as P, openBlock as m, unref as w, normalizeClass as Q, withCtx as W, createVNode as L, createElementBlock as E, createSlots as vt, renderSlot as je, normalizeStyle as te, createCommentVNode as H, onMounted as Je, watch as fe, createElementVNode as h, Teleport as mt, Fragment as ge, createTextVNode as ve, toDisplayString as Ne, renderList as Ke, withKeys as ot, inject as Re, reactive as _e, provide as Be, nextTick as ft, withDirectives as ht, vShow as yt, defineAsyncComponent as it } from "vue";
2
+ var gt = (o, V, r) => V in o ? pt(o, V, { enumerable: !0, configurable: !0, writable: !0, value: r }) : o[V] = r;
3
+ var We = (o, V, r) => gt(o, typeof V != "symbol" ? V + "" : V, r);
4
+ import { ref as v, computed as $e, createBlock as N, openBlock as m, unref as w, normalizeClass as Q, withCtx as W, createVNode as L, createElementBlock as E, createSlots as vt, renderSlot as je, normalizeStyle as te, createCommentVNode as H, onMounted as Je, watch as fe, createElementVNode as y, Teleport as mt, Fragment as ge, createTextVNode as ve, toDisplayString as Pe, renderList as Ke, withKeys as ot, inject as Re, reactive as _e, provide as Be, nextTick as ft, withDirectives as yt, vShow as ht, defineAsyncComponent as it } from "vue";
5
5
  import { Q as Y, a as bt } from "./QuillEditor-DwCbpq2d.js";
6
6
  import { BaseInput as st, Dropdown as rt, Input as we, Icon as A, Modal as xt, Select as Ze, Slider as Ae } from "@orchidui/core";
7
7
  import { rgbToHsl as et, rgb2Hex as tt, rgbaToHex8 as kt, hsl2Hex as lt, hexToRgb as ze, rgbToHue as Qe, hslToRgb as at, hex8ToRgba as $t, parseRgba as wt, parseRgb as St } from "./Dashboard/ColorPicker/components/converters.js";
8
8
  import { PieChart as Ct } from "./Dashboard/Charts/PieChart/OcPieChart.js";
9
9
  import { LineChart as Ml } from "./Dashboard/Charts/LineChart/OcLineChart.js";
10
10
  import { BarChart as Al } from "./Dashboard/Charts/BarChart/OcBarChart.js";
11
- import { BarRaceChart as Pl } from "./Dashboard/Charts/BarRaceChart/OcBarRaceChart.js";
11
+ import { BarRaceChart as Xl } from "./Dashboard/Charts/BarRaceChart/OcBarRaceChart.js";
12
12
  import { _ as ql } from "./OcCard-D3be6IMj.js";
13
13
  const It = { key: 1 }, Vt = {
14
14
  __name: "OcColorPicker",
@@ -32,9 +32,9 @@ const It = { key: 1 }, Vt = {
32
32
  }
33
33
  },
34
34
  emits: ["update:model-value"],
35
- setup(n, { emit: V }) {
36
- const r = n, y = V, u = v(!1), f = v(r.modelValue), C = (U) => {
37
- U && (f.value = U, y("update:model-value", U));
35
+ setup(o, { emit: V }) {
36
+ const r = o, h = V, d = v(!1), f = v(r.modelValue), C = (U) => {
37
+ U && (f.value = U, h("update:model-value", U));
38
38
  }, p = $e(() => r.variant === "gradient" ? {
39
39
  class: "w-[20px] h-[20px] hide-svg-icon",
40
40
  style: {
@@ -45,7 +45,7 @@ const It = { key: 1 }, Vt = {
45
45
  color: f.value
46
46
  }
47
47
  }), a = v(), O = v([]), Z = () => {
48
- O.value.length > 8 && (O.value = O.value.filter((U, N) => N < 8)), localStorage.setItem("ck-cp-local-color-list", JSON.stringify(O.value));
48
+ O.value.length > 8 && (O.value = O.value.filter((U, X) => X < 8)), localStorage.setItem("ck-cp-local-color-list", JSON.stringify(O.value));
49
49
  };
50
50
  let M = localStorage.getItem("ck-cp-local-color-list");
51
51
  M && (O.value = [...new Set(JSON.parse(M))], Z());
@@ -62,11 +62,11 @@ const It = { key: 1 }, Vt = {
62
62
  O.value.unshift(D), Z();
63
63
  }
64
64
  }, B = v(!1), z = (U) => {
65
- f.value = U, y("update:model-value", U), u.value = !1;
65
+ f.value = U, h("update:model-value", U), d.value = !1;
66
66
  };
67
- return (U, N) => (m(), P(w(st), {
68
- class: Q(n.hideInputColor ? "w-[40px]" : ""),
69
- onClick: N[1] || (N[1] = () => {
67
+ return (U, X) => (m(), N(w(st), {
68
+ class: Q(o.hideInputColor ? "w-[40px]" : ""),
69
+ onClick: X[1] || (X[1] = () => {
70
70
  var D;
71
71
  return (D = a.value) == null ? void 0 : D.toggleDropdown();
72
72
  })
@@ -75,32 +75,32 @@ const It = { key: 1 }, Vt = {
75
75
  L(w(rt), {
76
76
  ref_key: "dropdownRef",
77
77
  ref: a,
78
- modelValue: u.value,
78
+ modelValue: d.value,
79
79
  "onUpdate:modelValue": [
80
- N[0] || (N[0] = (D) => u.value = D),
80
+ X[0] || (X[0] = (D) => d.value = D),
81
81
  T
82
82
  ],
83
83
  "max-menu-height": 800,
84
- placement: n.placement,
84
+ placement: o.placement,
85
85
  "popper-options": {
86
86
  strategy: "fixed"
87
87
  }
88
88
  }, {
89
89
  menu: W(() => [
90
- B.value ? H("", !0) : (m(), P(w(xl), {
90
+ B.value ? H("", !0) : (m(), N(w(xl), {
91
91
  key: 0,
92
- variant: n.variant,
93
- "show-alpha": !n.hideOpacity,
94
- type: n.hideOpacity ? "HEX" : "HEX8",
95
- "model-value": n.modelValue,
92
+ variant: o.variant,
93
+ "show-alpha": !o.hideOpacity,
94
+ type: o.hideOpacity ? "HEX" : "HEX8",
95
+ "model-value": o.modelValue,
96
96
  "last-used-colors": O.value,
97
- "preset-colors": n.presetColors,
97
+ "preset-colors": o.presetColors,
98
98
  "onUpdate:modelValue": C,
99
99
  onLastUsedPick: z
100
100
  }, null, 8, ["variant", "show-alpha", "type", "model-value", "last-used-colors", "preset-colors"]))
101
101
  ]),
102
102
  default: W(() => [
103
- n.hideInputColor ? (m(), E("div", It, [
103
+ o.hideInputColor ? (m(), E("div", It, [
104
104
  je(U.$slots, "picker-icon", {}, () => [
105
105
  L(w(A), {
106
106
  class: "cursor-pointer",
@@ -108,7 +108,7 @@ const It = { key: 1 }, Vt = {
108
108
  name: "drop"
109
109
  }, null, 8, ["style"])
110
110
  ])
111
- ])) : (m(), P(w(we), {
111
+ ])) : (m(), N(w(we), {
112
112
  key: 0,
113
113
  "model-value": f.value,
114
114
  icon: "drop",
@@ -134,7 +134,7 @@ const It = { key: 1 }, Vt = {
134
134
  }, Tt = ["id"], Lt = { class: "flex items-center gap-x-3 px-5" }, Bt = { class: "flex items-center gap-x-5 cursor-pointer" }, Rt = { class: "flex flex-col py-2 overflow-hidden" }, Et = ["onClick"], Ut = { class: "flex gap-x-3 items-center px-5" }, Dt = { class: "flex items-center gap-x-3 px-5" }, Ht = { class: "flex gap-x-3 items-center px-5" }, Ot = { class: "flex gap-x-3 items-center px-5" }, Mt = { class: "flex items-center" }, Qt = { class: "grid cursor-pointer px-5" }, At = {
135
135
  key: 5,
136
136
  class: "flex gap-x-3 items-center px-5"
137
- }, Nt = { class: "flex" }, Pt = { class: "mt-1 mx-2 cursor-pointer" }, Rl = {
137
+ }, Pt = { class: "flex" }, Xt = { class: "mt-1 mx-2 cursor-pointer" }, Rl = {
138
138
  __name: "OcTextEditor",
139
139
  props: {
140
140
  /**
@@ -177,17 +177,18 @@ const It = { key: 1 }, Vt = {
177
177
  },
178
178
  variant: {
179
179
  type: String,
180
- validator: (n) => ["default", "text-only"].includes(n),
180
+ validator: (o) => ["default", "text-only"].includes(o),
181
181
  default: "default"
182
182
  },
183
183
  placeholder: {
184
184
  type: String,
185
185
  default: ""
186
- }
186
+ },
187
+ isCustomImageUpload: Boolean
187
188
  },
188
- emits: ["update:modelValue", "update:image"],
189
- setup(n, { emit: V }) {
190
- const r = n, y = V, u = {
189
+ emits: ["update:modelValue", "update:image", "uploadImage"],
190
+ setup(o, { emit: V }) {
191
+ const r = o, h = V, d = {
191
192
  default: [
192
193
  "changes",
193
194
  "font-size",
@@ -200,8 +201,8 @@ const It = { key: 1 }, Vt = {
200
201
  "alignment"
201
202
  ],
202
203
  "text-only": ["changes", "font-size", "font-style", "link", "quote", "list", "alignment"]
203
- }, f = $e(() => u[r.variant]), C = Y.import("attributors/style/size");
204
- C.whitelist = r.fontSizes.map((c) => c.value), Y.register(C, !0);
204
+ }, f = $e(() => d[r.variant]), C = Y.import("attributors/style/size");
205
+ C.whitelist = r.fontSizes.map((u) => u.value), Y.register(C, !0);
205
206
  const p = Y.import("attributors/style/align");
206
207
  Y.register(p, !0);
207
208
  const a = Y.import("attributors/style/background");
@@ -218,133 +219,137 @@ const It = { key: 1 }, Vt = {
218
219
  We(B, "blotName", "divider"), We(B, "tagName", "hr"), Y.register(B);
219
220
  const z = v(
220
221
  Math.random().toString(36).replace(/[^a-zA-Z]+/g, "")
221
- ), U = v(!1), N = v(!1), D = v(!1), le = v(!1), J = v(!1), j = v(!1), R = v(!1), X = v(""), ae = v(""), ee = v(""), b = v(), Se = v(!1), ue = v(r.image), ie = (c) => {
222
- U.value = b.value.getQuill().history.stack.undo.length > 0, N.value = b.value.getQuill().history.stack.redo.length > 0, D.value = b.value.getQuill().getFormat().bold, le.value = b.value.getQuill().getFormat().italic, J.value = b.value.getQuill().getFormat().underline, R.value = b.value.getQuill().getFormat().blockquote, ae.value = b.value.getQuill().getFormat().list, ee.value = b.value.getQuill().getFormat().align;
223
- let o = document.createElement("div");
224
- o.innerHTML = c, Se.value && (o.innerText ? y("update:modelValue", c || "") : y("update:modelValue", ""), o.remove());
225
- }, Pe = () => {
226
- if (b.value.getQuill().getSelection(!0)) {
227
- const o = b.value.getQuill().getSelection(!0);
228
- b.value.getQuill().insertText(o.index, `
229
- `, Y.sources.USER), b.value.getQuill().insertEmbed(o.index + 1, "divider", !0, Y.sources.USER), b.value.getQuill().setSelection(o.index + 2, Y.sources.SILENT);
222
+ ), U = v(!1), X = v(!1), D = v(!1), le = v(!1), J = v(!1), j = v(!1), R = v(!1), q = v(""), ae = v(""), ee = v(""), x = v(), Se = v(!1), ue = v(r.image), ie = (u) => {
223
+ U.value = x.value.getQuill().history.stack.undo.length > 0, X.value = x.value.getQuill().history.stack.redo.length > 0, D.value = x.value.getQuill().getFormat().bold, le.value = x.value.getQuill().getFormat().italic, J.value = x.value.getQuill().getFormat().underline, R.value = x.value.getQuill().getFormat().blockquote, ae.value = x.value.getQuill().getFormat().list, ee.value = x.value.getQuill().getFormat().align;
224
+ let n = document.createElement("div");
225
+ n.innerHTML = u, Se.value && (n.innerText ? h("update:modelValue", u || "") : h("update:modelValue", ""), n.remove());
226
+ }, Xe = () => {
227
+ if (x.value.getQuill().getSelection(!0)) {
228
+ const n = x.value.getQuill().getSelection(!0);
229
+ x.value.getQuill().insertText(n.index, `
230
+ `, Y.sources.USER), x.value.getQuill().insertEmbed(n.index + 1, "divider", !0, Y.sources.USER), x.value.getQuill().setSelection(n.index + 2, Y.sources.SILENT);
230
231
  }
231
232
  }, Ee = () => {
232
- b.value.getQuill().history.undo(), ie(r.modelValue);
233
+ x.value.getQuill().history.undo(), ie(r.modelValue);
233
234
  }, Ue = () => {
234
- b.value.getQuill().history.redo(), ie(r.modelValue);
235
+ x.value.getQuill().history.redo(), ie(r.modelValue);
235
236
  }, Ce = () => {
236
- var c;
237
- b.value.getQuill().format("bold", !D.value), (c = b.value.getQuill().getSelection()) != null && c.length || (D.value = !D.value);
237
+ var u;
238
+ x.value.getQuill().format("bold", !D.value), (u = x.value.getQuill().getSelection()) != null && u.length || (D.value = !D.value);
238
239
  }, ne = () => {
239
- var c;
240
- b.value.getQuill().format("italic", !le.value), (c = b.value.getQuill().getSelection()) != null && c.length || (le.value = !le.value);
240
+ var u;
241
+ x.value.getQuill().format("italic", !le.value), (u = x.value.getQuill().getSelection()) != null && u.length || (le.value = !le.value);
241
242
  }, Ie = () => {
242
- var c;
243
- b.value.getQuill().format("underline", !J.value), (c = b.value.getQuill().getSelection()) != null && c.length || (J.value = !J.value);
244
- }, De = (c) => {
245
- b.value.getQuill().format("size", c), X.value = c, j.value = !1;
243
+ var u;
244
+ x.value.getQuill().format("underline", !J.value), (u = x.value.getQuill().getSelection()) != null && u.length || (J.value = !J.value);
245
+ }, De = (u) => {
246
+ x.value.getQuill().format("size", u), q.value = u, j.value = !1;
246
247
  }, me = () => {
247
- const c = b.value.getQuill().getSelection();
248
- c && c.length > 0 && b.value.getQuill().theme.tooltip.edit();
249
- }, Xe = () => {
250
- b.value.getQuill().format("blockquote", !R.value);
251
- }, oe = (c) => {
252
- const o = b.value.getQuill().getSelection();
253
- o && (b.value.getQuill().clipboard.dangerouslyPasteHTML(o.index, `<img src="${c}" />`), ue.value = c, y("update:image", ue.value));
248
+ const u = x.value.getQuill().getSelection();
249
+ u && u.length > 0 && x.value.getQuill().theme.tooltip.edit();
250
+ }, Ne = () => {
251
+ x.value.getQuill().format("blockquote", !R.value);
252
+ }, oe = (u) => {
253
+ const n = x.value.getQuill().getSelection();
254
+ n && (x.value.getQuill().clipboard.dangerouslyPasteHTML(n.index, `<img src="${u}" />`), ue.value = u, h("update:image", ue.value));
254
255
  }, He = () => {
255
- b.value.getQuill().getSelection() || b.value.getQuill().setSelection(b.value.getQuill().getLength() - 1);
256
- const c = document.createElement("input");
257
- c.type = "file", c.accept = "jpg,.jpeg,.png,.webp,.gif", c.onchange = () => {
258
- const o = c.files[0], x = new FileReader();
259
- x.onload = () => oe(x.result), x.readAsDataURL(o);
260
- }, c.click();
261
- }, Oe = (c) => /^data:image\/(png|jpg|jpeg|gif);base64,/.test(c), q = (c) => {
256
+ if (x.value.getQuill().getSelection() || x.value.getQuill().setSelection(x.value.getQuill().getLength() - 1), r.isCustomImageUpload) {
257
+ if (!x.value.getQuill().getSelection()) return;
258
+ h("upload-image", x.value);
259
+ return;
260
+ }
261
+ const u = document.createElement("input");
262
+ u.type = "file", u.accept = "jpg,.jpeg,.png,.webp,.gif", u.onchange = () => {
263
+ const n = u.files[0], b = new FileReader();
264
+ b.onload = () => oe(b.result), b.readAsDataURL(n);
265
+ }, u.click();
266
+ }, Oe = (u) => /^data:image\/(png|jpg|jpeg|gif);base64,/.test(u), F = (u) => {
262
267
  setTimeout(() => {
263
- var x;
264
- if (c) {
265
- const G = b.value.getHTML(), se = document.createElement("div");
266
- se.innerHTML = G;
268
+ var b;
269
+ if (u) {
270
+ const P = x.value.getHTML(), se = document.createElement("div");
271
+ se.innerHTML = P;
267
272
  let xe = se.getElementsByTagName("img");
268
273
  if (xe && xe.length > 0)
269
274
  for (let pe = 0; pe < xe.length; pe++) {
270
- const ke = (x = xe[pe]) == null ? void 0 : x.getAttribute("src");
271
- Oe(ke) && y("update:image", ke);
275
+ const ke = (b = xe[pe]) == null ? void 0 : b.getAttribute("src");
276
+ Oe(ke) && h("update:image", ke);
272
277
  }
273
278
  }
274
279
  }, 100);
275
- const { items: o } = c.clipboardData;
276
- o.length && o[0].getAsString((x) => {
277
- Oe(x) && (b.value.getQuill().getSelection() || b.value.getQuill().setSelection(b.value.getQuill().getLength() - 1));
280
+ const { items: n } = u.clipboardData;
281
+ n.length && n[0].getAsString((b) => {
282
+ Oe(b) && (x.value.getQuill().getSelection() || x.value.getQuill().setSelection(x.value.getQuill().getLength() - 1));
278
283
  });
279
284
  }, _ = () => {
280
- b.value.getQuill().theme.tooltip.edit("video");
281
- }, Ve = (c) => {
282
- b.value.getQuill().format("list", c), ae.value = c;
283
- }, he = (c = void 0) => {
284
- b.value.getQuill().format("align", c), ee.value = c;
285
+ x.value.getQuill().theme.tooltip.edit("video");
286
+ }, Ve = (u) => {
287
+ x.value.getQuill().format("list", u), ae.value = u;
288
+ }, ye = (u = void 0) => {
289
+ x.value.getQuill().format("align", u), ee.value = u;
285
290
  }, de = v(""), qe = () => {
286
- b.value.getQuill().format("color", de.value);
291
+ x.value.getQuill().format("color", de.value);
287
292
  };
288
293
  Je(() => {
289
294
  De(r.initialFontSize || r.fontSizes[0].value), Se.value = !0;
290
295
  });
291
- const ye = v(100), ce = v(!1), Te = (c) => {
292
- var x, G;
293
- ye.value = c;
294
- const o = (x = window.getSelection()) == null ? void 0 : x.focusNode;
295
- o && o.nodeName !== "#text" && (b.value.getQuill().format("width", `${ye.value}%`), (G = o == null ? void 0 : o.querySelector("img")) == null || G.setAttribute("style", "margin:auto;display:block;"));
296
- }, be = (c = "left") => {
297
- var x, G;
298
- const o = (x = window.getSelection()) == null ? void 0 : x.focusNode;
299
- if (o && o.nodeName !== "#text") {
296
+ const he = v(100), ce = v(!1), Te = (u) => {
297
+ var b, P;
298
+ he.value = u;
299
+ const n = (b = window.getSelection()) == null ? void 0 : b.focusNode;
300
+ n && n.nodeName !== "#text" && (x.value.getQuill().format("width", `${he.value}%`), (P = n == null ? void 0 : n.querySelector("img")) == null || P.setAttribute("style", "margin:auto;display:block;"));
301
+ }, be = (u = "left") => {
302
+ var b, P;
303
+ const n = (b = window.getSelection()) == null ? void 0 : b.focusNode;
304
+ if (n && n.nodeName !== "#text") {
300
305
  let se = "float:left";
301
- c == "center" ? se = "" : c == "right" && (se = "float:right"), (G = o == null ? void 0 : o.querySelector("img")) == null || G.setAttribute("style", `margin:auto;display:block;${se}`);
306
+ u == "center" ? se = "" : u == "right" && (se = "float:right"), (P = n == null ? void 0 : n.querySelector("img")) == null || P.setAttribute("style", `margin:auto;display:block;${se}`);
302
307
  }
303
308
  }, Me = () => {
304
- var o;
305
- const c = (o = window.getSelection()) == null ? void 0 : o.focusNode;
306
- ce.value = c.innerHTML && c.innerHTML.includes("<img");
307
- }, K = v(!1), F = v(3), Le = v(3), Fe = $e(() => {
308
- let c = [];
309
- for (let o = 1; o < 30; o++)
310
- c.push({
311
- label: o.toString(),
312
- value: o.toString()
309
+ var b, P;
310
+ const u = (b = window.getSelection()) == null ? void 0 : b.focusNode, n = (u == null ? void 0 : u.nodeType) === Node.ELEMENT_NODE ? u == null ? void 0 : u.innerHTML : (P = u == null ? void 0 : u.parentElement) == null ? void 0 : P.innerHTML;
311
+ ce.value = typeof n == "string" && (n == null ? void 0 : n.includes("<img"));
312
+ }, K = v(!1), G = v(3), Le = v(3), Fe = $e(() => {
313
+ let u = [];
314
+ for (let n = 1; n < 30; n++)
315
+ u.push({
316
+ label: n.toString(),
317
+ value: n.toString()
313
318
  });
314
- return c;
319
+ return u;
315
320
  }), Ge = $e(() => {
316
- let c = [];
317
- for (let o = 1; o < 12; o++)
318
- c.push({
319
- label: o.toString(),
320
- value: o.toString()
321
+ let u = [];
322
+ for (let n = 1; n < 12; n++)
323
+ u.push({
324
+ label: n.toString(),
325
+ value: n.toString()
321
326
  });
322
- return c;
327
+ return u;
323
328
  }), Ye = () => {
324
- let c = b.value.getQuill().getModule("better-table");
325
- c == null || c.insertTable(parseInt(F.value), parseInt(Le.value)), K.value = !1;
329
+ let u = x.value.getQuill().getModule("better-table");
330
+ u == null || u.insertTable(parseInt(G.value), parseInt(Le.value)), K.value = !1;
326
331
  };
327
332
  return fe(
328
333
  () => r.modelValue,
329
- (c) => {
330
- c || b.value.getQuill().setContents([], "silent");
334
+ (u) => {
335
+ u || x.value.getQuill().setContents([], "silent");
331
336
  }
332
- ), (c, o) => (m(), P(w(st), {
333
- label: n.label,
334
- hint: n.hint,
335
- "error-message": n.errorMessage,
336
- "is-required": n.isRequired,
337
- "label-icon": n.labelIcon,
338
- "tooltip-text": n.tooltipText,
339
- "tooltip-options": n.tooltipOptions
337
+ ), (u, n) => (m(), N(w(st), {
338
+ label: o.label,
339
+ hint: o.hint,
340
+ "error-message": o.errorMessage,
341
+ "is-required": o.isRequired,
342
+ "label-icon": o.labelIcon,
343
+ "tooltip-text": o.tooltipText,
344
+ "tooltip-options": o.tooltipOptions
340
345
  }, {
341
346
  default: W(() => [
342
- (m(), P(mt, { to: "body" }, [
347
+ (m(), N(mt, { to: "body" }, [
343
348
  L(w(xt), {
344
349
  size: "small",
345
350
  title: "Insert table",
346
351
  modelValue: K.value,
347
- "onUpdate:modelValue": o[2] || (o[2] = (x) => K.value = x),
352
+ "onUpdate:modelValue": n[2] || (n[2] = (b) => K.value = b),
348
353
  class: "!w-full !h-full",
349
354
  confirmButtonProps: {
350
355
  label: "Save",
@@ -354,14 +359,14 @@ const It = { key: 1 }, Vt = {
354
359
  default: W(() => [
355
360
  L(w(Ze), {
356
361
  modelValue: Le.value,
357
- "onUpdate:modelValue": o[0] || (o[0] = (x) => Le.value = x),
362
+ "onUpdate:modelValue": n[0] || (n[0] = (b) => Le.value = b),
358
363
  options: Ge.value,
359
364
  label: "Table cell",
360
365
  class: "mb-3"
361
366
  }, null, 8, ["modelValue", "options"]),
362
367
  L(w(Ze), {
363
- modelValue: F.value,
364
- "onUpdate:modelValue": o[1] || (o[1] = (x) => F.value = x),
368
+ modelValue: G.value,
369
+ "onUpdate:modelValue": n[1] || (n[1] = (b) => G.value = b),
365
370
  options: Fe.value,
366
371
  label: "Table rows"
367
372
  }, null, 8, ["modelValue", "options"])
@@ -369,16 +374,16 @@ const It = { key: 1 }, Vt = {
369
374
  _: 1
370
375
  }, 8, ["modelValue", "confirmButtonProps"])
371
376
  ])),
372
- h("div", {
373
- class: Q(["grid", { "has-error": n.errorMessage }]),
377
+ y("div", {
378
+ class: Q(["grid", { "has-error": o.errorMessage }]),
374
379
  onClick: Me
375
380
  }, [
376
- z.value ? (m(), P(w(bt), {
381
+ z.value ? (m(), N(w(bt), {
377
382
  key: 0,
378
383
  id: `#${z.value}`,
379
384
  ref_key: "quill",
380
- ref: b,
381
- content: n.modelValue,
385
+ ref: x,
386
+ content: o.modelValue,
382
387
  options: {
383
388
  bounds: `#${z.value}`
384
389
  },
@@ -386,17 +391,17 @@ const It = { key: 1 }, Vt = {
386
391
  theme: "snow",
387
392
  "content-type": "html",
388
393
  class: "min-h-[200px]",
389
- placeholder: n.placeholder,
394
+ placeholder: o.placeholder,
390
395
  "onUpdate:content": ie,
391
- onPaste: q
396
+ onPaste: F
392
397
  }, {
393
398
  toolbar: W(() => [
394
- h("div", {
399
+ y("div", {
395
400
  id: z.value,
396
401
  class: "flex min-h-[36px] flex-wrap !py-2 !px-3 gap-y-2 rounded-t"
397
402
  }, [
398
403
  f.value.includes("changes") ? (m(), E(ge, { key: 0 }, [
399
- h("div", Lt, [
404
+ y("div", Lt, [
400
405
  L(w(A), {
401
406
  class: Q(U.value ? "text-oc-text cursor-pointer" : "text-oc-text-300"),
402
407
  width: "20",
@@ -405,35 +410,35 @@ const It = { key: 1 }, Vt = {
405
410
  onClick: Ee
406
411
  }, null, 8, ["class"]),
407
412
  L(w(A), {
408
- class: Q(N.value ? "text-oc-text cursor-pointer" : "text-oc-text-300"),
413
+ class: Q(X.value ? "text-oc-text cursor-pointer" : "text-oc-text-300"),
409
414
  width: "20",
410
415
  height: "20",
411
416
  name: "text-editor/redo",
412
417
  onClick: Ue
413
418
  }, null, 8, ["class"])
414
419
  ]),
415
- o[16] || (o[16] = h("div", { class: "border-l border-oc-gray-200" }, null, -1))
420
+ n[16] || (n[16] = y("div", { class: "border-l border-oc-gray-200" }, null, -1))
416
421
  ], 64)) : H("", !0),
417
422
  f.value.includes("font-size") ? (m(), E(ge, { key: 1 }, [
418
423
  L(w(rt), {
419
424
  modelValue: j.value,
420
- "onUpdate:modelValue": o[3] || (o[3] = (x) => j.value = x),
425
+ "onUpdate:modelValue": n[3] || (n[3] = (b) => j.value = b),
421
426
  class: "px-5"
422
427
  }, {
423
428
  menu: W(() => [
424
- h("div", Rt, [
425
- (m(!0), E(ge, null, Ke(n.fontSizes, (x) => (m(), E("div", {
426
- key: x.value,
427
- class: Q(["min-w-[120px] cursor-pointer py-2 px-3 hover:bg-oc-gray-50", X.value === x.value ? "font-medium" : ""]),
428
- onClick: (G) => De(x.value)
429
- }, Ne(x.label), 11, Et))), 128))
429
+ y("div", Rt, [
430
+ (m(!0), E(ge, null, Ke(o.fontSizes, (b) => (m(), E("div", {
431
+ key: b.value,
432
+ class: Q(["min-w-[120px] cursor-pointer py-2 px-3 hover:bg-oc-gray-50", q.value === b.value ? "font-medium" : ""]),
433
+ onClick: (P) => De(b.value)
434
+ }, Pe(b.label), 11, Et))), 128))
430
435
  ])
431
436
  ]),
432
437
  default: W(() => {
433
- var x;
438
+ var b;
434
439
  return [
435
- h("div", Bt, [
436
- ve(Ne((x = n.fontSizes.find((G) => G.value === X.value)) == null ? void 0 : x.label) + " ", 1),
440
+ y("div", Bt, [
441
+ ve(Pe((b = o.fontSizes.find((P) => P.value === q.value)) == null ? void 0 : b.label) + " ", 1),
437
442
  L(w(A), {
438
443
  width: "20",
439
444
  height: "20",
@@ -445,10 +450,10 @@ const It = { key: 1 }, Vt = {
445
450
  }),
446
451
  _: 1
447
452
  }, 8, ["modelValue"]),
448
- o[17] || (o[17] = h("div", { class: "border-l border-oc-gray-200" }, null, -1))
453
+ n[17] || (n[17] = y("div", { class: "border-l border-oc-gray-200" }, null, -1))
449
454
  ], 64)) : H("", !0),
450
455
  f.value.includes("font-style") ? (m(), E(ge, { key: 2 }, [
451
- h("div", Ut, [
456
+ y("div", Ut, [
452
457
  L(w(A), {
453
458
  class: Q(["cursor-pointer", D.value ? "text-oc-text" : "text-oc-text-300"]),
454
459
  width: "20",
@@ -471,10 +476,10 @@ const It = { key: 1 }, Vt = {
471
476
  onClick: Ie
472
477
  }, null, 8, ["class"])
473
478
  ]),
474
- o[18] || (o[18] = h("div", { class: "border-l border-oc-gray-200" }, null, -1))
479
+ n[18] || (n[18] = y("div", { class: "border-l border-oc-gray-200" }, null, -1))
475
480
  ], 64)) : H("", !0),
476
- h("div", Dt, [
477
- f.value.includes("link") ? (m(), P(w(A), {
481
+ y("div", Dt, [
482
+ f.value.includes("link") ? (m(), N(w(A), {
478
483
  key: 0,
479
484
  class: "cursor-pointer",
480
485
  width: "20",
@@ -482,7 +487,7 @@ const It = { key: 1 }, Vt = {
482
487
  name: "text-editor/link",
483
488
  onClick: me
484
489
  })) : H("", !0),
485
- f.value.includes("image") ? (m(), P(w(A), {
490
+ f.value.includes("image") ? (m(), N(w(A), {
486
491
  key: 1,
487
492
  class: "cursor-pointer",
488
493
  width: "20",
@@ -490,15 +495,15 @@ const It = { key: 1 }, Vt = {
490
495
  name: "text-editor/image",
491
496
  onClick: He
492
497
  })) : H("", !0),
493
- f.value.includes("quote") ? (m(), P(w(A), {
498
+ f.value.includes("quote") ? (m(), N(w(A), {
494
499
  key: 2,
495
500
  class: Q(["cursor-pointer", R.value ? "text-oc-text" : "text-oc-text-300"]),
496
501
  width: "20",
497
502
  height: "20",
498
503
  name: "text-editor/quote",
499
- onClick: Xe
504
+ onClick: Ne
500
505
  }, null, 8, ["class"])) : H("", !0),
501
- f.value.includes("media") ? (m(), P(w(A), {
506
+ f.value.includes("media") ? (m(), N(w(A), {
502
507
  key: 3,
503
508
  class: "cursor-pointer",
504
509
  width: "20",
@@ -511,77 +516,77 @@ const It = { key: 1 }, Vt = {
511
516
  width: "20",
512
517
  height: "20",
513
518
  name: "table",
514
- onClick: o[4] || (o[4] = (x) => K.value = !K.value)
519
+ onClick: n[4] || (n[4] = (b) => K.value = !K.value)
515
520
  })
516
521
  ]),
517
522
  f.value.includes("list") ? (m(), E(ge, { key: 3 }, [
518
- o[19] || (o[19] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
519
- h("div", Ht, [
523
+ n[19] || (n[19] = y("div", { class: "border-l border-oc-gray-200" }, null, -1)),
524
+ y("div", Ht, [
520
525
  L(w(A), {
521
526
  class: Q(["cursor-pointer", ae.value === "bullet" ? "text-oc-text" : "text-oc-text-300"]),
522
527
  width: "20",
523
528
  height: "20",
524
529
  name: "text-editor/bullet",
525
- onClick: o[5] || (o[5] = (x) => Ve("bullet"))
530
+ onClick: n[5] || (n[5] = (b) => Ve("bullet"))
526
531
  }, null, 8, ["class"]),
527
532
  L(w(A), {
528
533
  class: Q(["cursor-pointer", ae.value === "ordered" ? "text-oc-text" : "text-oc-text-300"]),
529
534
  width: "20",
530
535
  height: "20",
531
536
  name: "text-editor/number",
532
- onClick: o[6] || (o[6] = (x) => Ve("ordered"))
537
+ onClick: n[6] || (n[6] = (b) => Ve("ordered"))
533
538
  }, null, 8, ["class"])
534
539
  ])
535
540
  ], 64)) : H("", !0),
536
541
  f.value.includes("alignment") ? (m(), E(ge, { key: 4 }, [
537
- o[20] || (o[20] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
538
- h("div", Ot, [
542
+ n[20] || (n[20] = y("div", { class: "border-l border-oc-gray-200" }, null, -1)),
543
+ y("div", Ot, [
539
544
  L(w(A), {
540
545
  class: Q(["cursor-pointer", ee.value ? "text-oc-text-300" : "text-oc-text"]),
541
546
  width: "20",
542
547
  height: "20",
543
548
  name: "text-editor/left",
544
- onClick: o[7] || (o[7] = (x) => he())
549
+ onClick: n[7] || (n[7] = (b) => ye())
545
550
  }, null, 8, ["class"]),
546
551
  L(w(A), {
547
552
  class: Q(["cursor-pointer", ee.value === "center" ? "text-oc-text" : "text-oc-text-300"]),
548
553
  width: "20",
549
554
  height: "20",
550
555
  name: "text-editor/center",
551
- onClick: o[8] || (o[8] = (x) => he("center"))
556
+ onClick: n[8] || (n[8] = (b) => ye("center"))
552
557
  }, null, 8, ["class"]),
553
558
  L(w(A), {
554
559
  class: Q(["cursor-pointer", ee.value === "right" ? "text-oc-text" : "text-oc-text-300"]),
555
560
  width: "20",
556
561
  height: "20",
557
562
  name: "text-editor/right",
558
- onClick: o[9] || (o[9] = (x) => he("right"))
563
+ onClick: n[9] || (n[9] = (b) => ye("right"))
559
564
  }, null, 8, ["class"]),
560
565
  L(w(A), {
561
566
  class: Q(["cursor-pointer", ee.value === "justify" ? "text-oc-text" : "text-oc-text-300"]),
562
567
  width: "20",
563
568
  height: "20",
564
569
  name: "text-editor/justify",
565
- onClick: o[10] || (o[10] = (x) => he("justify"))
570
+ onClick: n[10] || (n[10] = (b) => ye("justify"))
566
571
  }, null, 8, ["class"])
567
572
  ])
568
573
  ], 64)) : H("", !0),
569
- o[22] || (o[22] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
570
- h("div", Mt, [
574
+ n[22] || (n[22] = y("div", { class: "border-l border-oc-gray-200" }, null, -1)),
575
+ y("div", Mt, [
571
576
  L(w(Vt), {
572
577
  modelValue: de.value,
573
578
  "onUpdate:modelValue": [
574
- o[11] || (o[11] = (x) => de.value = x),
579
+ n[11] || (n[11] = (b) => de.value = b),
575
580
  qe
576
581
  ],
577
582
  "hide-input-color": ""
578
583
  }, {
579
584
  "picker-icon": W(() => [
580
- h("div", Qt, [
581
- h("div", {
585
+ y("div", Qt, [
586
+ y("div", {
582
587
  style: te(`color:${de.value}`)
583
588
  }, "A", 4),
584
- h("div", {
589
+ y("div", {
585
590
  class: "h-[5px] w-full rounded border",
586
591
  style: te(`background:${de.value}`)
587
592
  }, null, 4)
@@ -590,50 +595,50 @@ const It = { key: 1 }, Vt = {
590
595
  _: 1
591
596
  }, 8, ["modelValue"])
592
597
  ]),
593
- o[23] || (o[23] = h("div", { class: "border-l border-oc-gray-200" }, null, -1)),
598
+ n[23] || (n[23] = y("div", { class: "border-l border-oc-gray-200" }, null, -1)),
594
599
  ce.value ? (m(), E("div", At, [
595
600
  L(w(Ae), {
596
601
  label: "Image width",
597
602
  class: "w-[120px]",
598
- "model-value": ye.value,
603
+ "model-value": he.value,
599
604
  "min-limit": 0,
600
605
  "max-limit": 100,
601
606
  "onUpdate:modelValue": Te
602
607
  }, null, 8, ["model-value"]),
603
- h("div", Nt, [
608
+ y("div", Pt, [
604
609
  L(w(A), {
605
610
  class: "cursor-pointer",
606
611
  width: "20",
607
612
  height: "20",
608
613
  name: "text-editor/left",
609
- onClick: o[12] || (o[12] = (x) => be())
614
+ onClick: n[12] || (n[12] = (b) => be())
610
615
  }),
611
616
  L(w(A), {
612
617
  class: "cursor-pointer",
613
618
  width: "20",
614
619
  height: "20",
615
620
  name: "text-editor/center",
616
- onClick: o[13] || (o[13] = (x) => be("center"))
621
+ onClick: n[13] || (n[13] = (b) => be("center"))
617
622
  }),
618
623
  L(w(A), {
619
624
  class: "cursor-pointer",
620
625
  width: "20",
621
626
  height: "20",
622
627
  name: "text-editor/right",
623
- onClick: o[14] || (o[14] = (x) => be("right"))
628
+ onClick: n[14] || (n[14] = (b) => be("right"))
624
629
  })
625
630
  ])
626
631
  ])) : H("", !0),
627
- h("div", Pt, [
632
+ y("div", Xt, [
628
633
  (m(), E("svg", {
629
634
  width: "20",
630
635
  height: "20",
631
636
  viewBox: "0 0 15 15",
632
637
  fill: "none",
633
638
  xmlns: "http://www.w3.org/2000/svg",
634
- onClick: o[15] || (o[15] = (x) => Pe())
635
- }, o[21] || (o[21] = [
636
- h("path", {
639
+ onClick: n[15] || (n[15] = (b) => Xe())
640
+ }, n[21] || (n[21] = [
641
+ y("path", {
637
642
  "fill-rule": "evenodd",
638
643
  "clip-rule": "evenodd",
639
644
  d: "M2 7.5C2 7.22386 2.22386 7 2.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H2.5C2.22386 8 2 7.77614 2 7.5Z",
@@ -650,7 +655,7 @@ const It = { key: 1 }, Vt = {
650
655
  _: 1
651
656
  }, 8, ["label", "hint", "error-message", "is-required", "label-icon", "tooltip-text", "tooltip-options"]));
652
657
  }
653
- }, Xt = {
658
+ }, Nt = {
654
659
  __name: "InputHex",
655
660
  props: {
656
661
  modelValue: {
@@ -660,14 +665,14 @@ const It = { key: 1 }, Vt = {
660
665
  emits: {
661
666
  "update:modelValue": []
662
667
  },
663
- setup(n, { emit: V }) {
664
- const r = n, y = V, u = v(""), f = (p) => {
665
- u.value = p, u.value = `#${p.replace(/#/g, "")}`;
668
+ setup(o, { emit: V }) {
669
+ const r = o, h = V, d = v(""), f = (p) => {
670
+ d.value = p, d.value = `#${p.replace(/#/g, "")}`;
666
671
  }, C = () => {
667
- let p = u.value;
672
+ let p = d.value;
668
673
  if (p === r.modelValue) return;
669
674
  if (!/^#[0-9a-fA-F]+$/.test(p)) {
670
- u.value = r.modelValue;
675
+ d.value = r.modelValue;
671
676
  return;
672
677
  }
673
678
  let a = p.replace(/#/g, "");
@@ -689,18 +694,18 @@ const It = { key: 1 }, Vt = {
689
694
  default:
690
695
  a = a.slice(0, 6);
691
696
  }
692
- u.value = `#${a.toUpperCase()}`, y("update:modelValue", u.value);
697
+ d.value = `#${a.toUpperCase()}`, h("update:modelValue", d.value);
693
698
  };
694
699
  return fe(
695
700
  () => r.modelValue,
696
701
  (p, a) => {
697
- p !== a && (u.value = p);
702
+ p !== a && (d.value = p);
698
703
  },
699
704
  { immediate: !0 }
700
- ), (p, a) => (m(), P(w(we), {
705
+ ), (p, a) => (m(), N(w(we), {
701
706
  class: "w-[158px]",
702
707
  placeholder: "#FFFFFF",
703
- "model-value": u.value,
708
+ "model-value": d.value,
704
709
  "onUpdate:modelValue": f,
705
710
  onBlur: C,
706
711
  onKeyup: ot(C, ["enter"])
@@ -724,52 +729,52 @@ const It = { key: 1 }, Vt = {
724
729
  "update-rgb-value": [],
725
730
  "update-hsl-value": []
726
731
  },
727
- setup(n, { emit: V }) {
728
- const r = n, y = V, u = v({
732
+ setup(o, { emit: V }) {
733
+ const r = o, h = V, d = v({
729
734
  r: 0,
730
735
  g: 0,
731
736
  b: 0
732
737
  }), f = v(), C = v(), p = v(), a = (M, T) => {
733
- var z, U, N;
738
+ var z, U, X;
734
739
  let B = 255;
735
740
  if (r.inputType == "HSL" && (B = 100, M == "r" && (B = 360)), !isNaN(parseInt(T))) {
736
741
  if (M == "r") {
737
742
  let D = parseInt(T);
738
- D <= B && (u.value.r = D, r.inputType == "RGB" ? O("r") : Z()), (z = f.value) == null || z.focus();
743
+ D <= B && (d.value.r = D, r.inputType == "RGB" ? O("r") : Z()), (z = f.value) == null || z.focus();
739
744
  } else if (M == "g") {
740
745
  let D = parseInt(T);
741
- D <= B && (u.value.g = D, r.inputType == "RGB" ? O("g") : Z()), (U = C.value) == null || U.focus();
746
+ D <= B && (d.value.g = D, r.inputType == "RGB" ? O("g") : Z()), (U = C.value) == null || U.focus();
742
747
  } else if (M == "b") {
743
748
  let D = parseInt(T);
744
- D <= B && (u.value.b = D, r.inputType == "RGB" ? O("b") : Z()), (N = p.value) == null || N.focus();
749
+ D <= B && (d.value.b = D, r.inputType == "RGB" ? O("b") : Z()), (X = p.value) == null || X.focus();
745
750
  }
746
751
  }
747
752
  }, O = (M) => {
748
- y("update-rgb-value", {
753
+ h("update-rgb-value", {
749
754
  type: M,
750
755
  value: {
751
- r: parseInt(u.value.r),
752
- g: parseInt(u.value.g),
753
- b: parseInt(u.value.b)
756
+ r: parseInt(d.value.r),
757
+ g: parseInt(d.value.g),
758
+ b: parseInt(d.value.b)
754
759
  }
755
760
  });
756
761
  }, Z = () => {
757
- y("update-hsl-value", {
758
- h: parseInt(u.value.r),
759
- s: parseInt(u.value.g),
760
- l: parseInt(u.value.b)
762
+ h("update-hsl-value", {
763
+ h: parseInt(d.value.r),
764
+ s: parseInt(d.value.g),
765
+ l: parseInt(d.value.b)
761
766
  });
762
767
  };
763
768
  return r.inputType === "RGB" ? fe(
764
769
  () => r.rgbValue,
765
770
  (M, T) => {
766
- M !== T && (u.value = M);
771
+ M !== T && (d.value = M);
767
772
  },
768
773
  { immediate: !0, deep: !0 }
769
774
  ) : fe(
770
775
  () => r.hslValue,
771
776
  (M) => {
772
- u.value = {
777
+ d.value = {
773
778
  r: M.h,
774
779
  g: M.s,
775
780
  b: M.l
@@ -780,21 +785,21 @@ const It = { key: 1 }, Vt = {
780
785
  L(w(we), {
781
786
  ref_key: "rInputEl",
782
787
  ref: f,
783
- "model-value": u.value.r,
788
+ "model-value": d.value.r,
784
789
  placeholder: "100",
785
790
  "onUpdate:modelValue": T[0] || (T[0] = (B) => a("r", B))
786
791
  }, null, 8, ["model-value"]),
787
792
  L(w(we), {
788
793
  ref_key: "gInputEl",
789
794
  ref: C,
790
- "model-value": u.value.g,
795
+ "model-value": d.value.g,
791
796
  placeholder: "100",
792
797
  "onUpdate:modelValue": T[1] || (T[1] = (B) => a("g", B))
793
798
  }, null, 8, ["model-value"]),
794
799
  L(w(we), {
795
800
  ref_key: "bInputEl",
796
801
  ref: p,
797
- "model-value": u.value.b,
802
+ "model-value": d.value.b,
798
803
  placeholder: "100",
799
804
  "onUpdate:modelValue": T[2] || (T[2] = (B) => a("b", B))
800
805
  }, null, 8, ["model-value"])
@@ -810,23 +815,23 @@ const It = { key: 1 }, Vt = {
810
815
  emits: {
811
816
  "update:modelValue": []
812
817
  },
813
- setup(n, { emit: V }) {
814
- const r = n, y = V, u = v(""), f = (p) => {
815
- u.value = p;
818
+ setup(o, { emit: V }) {
819
+ const r = o, h = V, d = v(""), f = (p) => {
820
+ d.value = p;
816
821
  }, C = () => {
817
- let p = parseInt(u.value);
818
- p && p <= 100 ? y("update:modelValue", p) : u.value = r.modelValue;
822
+ let p = parseInt(d.value);
823
+ p && p <= 100 ? h("update:modelValue", p) : d.value = r.modelValue;
819
824
  };
820
825
  return fe(
821
826
  () => r.modelValue,
822
827
  (p, a) => {
823
- p !== a && (u.value = p);
828
+ p !== a && (d.value = p);
824
829
  },
825
830
  { immediate: !0 }
826
- ), (p, a) => (m(), P(w(we), {
831
+ ), (p, a) => (m(), N(w(we), {
827
832
  class: "w-[75px]",
828
833
  placeholder: "100",
829
- "model-value": u.value,
834
+ "model-value": d.value,
830
835
  "onUpdate:modelValue": f,
831
836
  onBlur: C,
832
837
  onKeyup: ot(C, ["enter"])
@@ -843,13 +848,13 @@ const It = { key: 1 }, Vt = {
843
848
  modelValue: { default: "RGB", type: String }
844
849
  },
845
850
  emits: ["update:model-value"],
846
- setup(n, { emit: V }) {
847
- const y = v(n.modelValue), u = V, f = (C) => {
848
- y.value = C, u("update:model-value", C);
851
+ setup(o, { emit: V }) {
852
+ const h = v(o.modelValue), d = V, f = (C) => {
853
+ h.value = C, d("update:model-value", C);
849
854
  };
850
- return (C, p) => (m(), P(w(Ze), {
855
+ return (C, p) => (m(), N(w(Ze), {
851
856
  class: "!w-[80px]",
852
- "model-value": y.value,
857
+ "model-value": h.value,
853
858
  options: [
854
859
  {
855
860
  label: "HEX",
@@ -873,21 +878,21 @@ const It = { key: 1 }, Vt = {
873
878
  modelValue: { default: 0, type: Number }
874
879
  },
875
880
  emits: ["update:modelValue", "onInput"],
876
- setup(n, { emit: V }) {
877
- const r = Re("opacitySlider"), y = V, u = (f) => {
878
- y("update:modelValue", parseInt(f.target.value)), y("onInput", f);
881
+ setup(o, { emit: V }) {
882
+ const r = Re("opacitySlider"), h = V, d = (f) => {
883
+ h("update:modelValue", parseInt(f.target.value)), h("onInput", f);
879
884
  };
880
885
  return (f, C) => (m(), E("div", Yt, [
881
- h("div", Wt, [
882
- h("input", {
886
+ y("div", Wt, [
887
+ y("input", {
883
888
  ref_key: "opacitySlider",
884
889
  ref: r,
885
- value: n.modelValue,
890
+ value: o.modelValue,
886
891
  class: "opacity__slider",
887
892
  type: "range",
888
893
  min: "0",
889
894
  max: "100",
890
- onInput: u
895
+ onInput: d
891
896
  }, null, 40, zt)
892
897
  ])
893
898
  ]));
@@ -898,27 +903,27 @@ const It = { key: 1 }, Vt = {
898
903
  gradientType: String
899
904
  },
900
905
  emits: ["onAddColor", "onMouseDown", "onDeleteColor"],
901
- setup(n, { emit: V }) {
902
- const r = Re("gradientBar"), y = v(), u = V, f = (T) => {
906
+ setup(o, { emit: V }) {
907
+ const r = Re("gradientBar"), h = v(), d = V, f = (T) => {
903
908
  T.preventDefault();
904
909
  }, C = v("left:0"), p = v(!1), a = (T) => {
905
- u("onMouseDown", T);
910
+ d("onMouseDown", T);
906
911
  }, O = () => {
907
- let T = y.value.querySelector(".select");
912
+ let T = h.value.querySelector(".select");
908
913
  C.value = T == null ? void 0 : T.getAttribute("style");
909
914
  }, Z = () => {
910
915
  var B;
911
- O(), (((B = y.value.querySelectorAll(".gradient-handle")) == null ? void 0 : B.length) ?? 2) > 2 ? p.value = !0 : p.value = !1;
916
+ O(), (((B = h.value.querySelectorAll(".gradient-handle")) == null ? void 0 : B.length) ?? 2) > 2 ? p.value = !0 : p.value = !1;
912
917
  }, M = (T) => {
913
- p.value = !1, u("onAddColor", T);
918
+ p.value = !1, d("onAddColor", T);
914
919
  };
915
920
  return (T, B) => (m(), E("div", {
916
921
  ref_key: "gradientSlider",
917
- ref: y,
922
+ ref: h,
918
923
  class: "relative h-[40px]",
919
924
  onClick: Z
920
925
  }, [
921
- h("button", {
926
+ y("button", {
922
927
  type: "button",
923
928
  class: Q(["absolute top-[-18px] text-oc-accent-3 rounded-[4px] border-2 border-oc-gray-200 p-2 bg-oc-bg-light", p.value ? "" : "!hidden"]),
924
929
  style: te(C.value),
@@ -930,15 +935,15 @@ const It = { key: 1 }, Vt = {
930
935
  height: "14"
931
936
  })
932
937
  ], 6),
933
- h("div", {
938
+ y("div", {
934
939
  class: Q(["gradient-bar", {
935
- "mt-[20px]": n.gradientType === "linear",
936
- "mt-[12px]": n.gradientType === "radial"
940
+ "mt-[20px]": o.gradientType === "linear",
941
+ "mt-[12px]": o.gradientType === "radial"
937
942
  }]),
938
943
  onMousedown: a,
939
944
  onDragstart: f
940
945
  }, [
941
- h("div", {
946
+ y("div", {
942
947
  ref_key: "gradientBar",
943
948
  ref: r,
944
949
  class: "gradient-container",
@@ -953,20 +958,20 @@ const It = { key: 1 }, Vt = {
953
958
  modelValue: { default: 0, type: Number }
954
959
  },
955
960
  emits: ["update:modelValue", "onInput", "onChange"],
956
- setup(n, { emit: V }) {
957
- const r = V, y = (u) => {
958
- r("update:modelValue", parseFloat(u.target.value)), r("onInput", u);
961
+ setup(o, { emit: V }) {
962
+ const r = V, h = (d) => {
963
+ r("update:modelValue", parseFloat(d.target.value)), r("onInput", d);
959
964
  };
960
- return (u, f) => (m(), E("div", Zt, [
961
- h("input", {
962
- value: n.modelValue,
965
+ return (d, f) => (m(), E("div", Zt, [
966
+ y("input", {
967
+ value: o.modelValue,
963
968
  class: "picker-hue-range-slider",
964
969
  type: "range",
965
970
  min: "0",
966
971
  max: "360",
967
972
  step: "0.1",
968
- onInput: y,
969
- onChange: f[0] || (f[0] = (C) => u.$emit("onChange", C))
973
+ onInput: h,
974
+ onChange: f[0] || (f[0] = (C) => d.$emit("onChange", C))
970
975
  }, null, 40, Jt)
971
976
  ]));
972
977
  }
@@ -986,30 +991,30 @@ const It = { key: 1 }, Vt = {
986
991
  percentageY: { default: 50, type: Number }
987
992
  },
988
993
  emits: ["update:angle", "update:percentageX", "update:percentageY", "onInput"],
989
- setup(n, { emit: V }) {
990
- const r = v(!1), y = v(!1);
994
+ setup(o, { emit: V }) {
995
+ const r = v(!1), h = v(!1);
991
996
  Je(() => {
992
- r.value = !0, y.value = !0;
997
+ r.value = !0, h.value = !0;
993
998
  });
994
- const u = V, f = (C, p) => {
999
+ const d = V, f = (C, p) => {
995
1000
  let a = parseInt(C);
996
1001
  switch (p) {
997
1002
  case "angle":
998
- C > 360 ? a = 360 : C < 0 && (a = 0), u("update:angle", a), u("onInput");
1003
+ C > 360 ? a = 360 : C < 0 && (a = 0), d("update:angle", a), d("onInput");
999
1004
  break;
1000
1005
  case "percentageX":
1001
- C > 100 ? a = 100 : C < 0 && (a = 0), u("update:percentageX", a), u("onInput");
1006
+ C > 100 ? a = 100 : C < 0 && (a = 0), d("update:percentageX", a), d("onInput");
1002
1007
  break;
1003
1008
  case "percentageY":
1004
- C > 100 ? a = 100 : C < 0 && (a = 0), u("update:percentageY", a), u("onInput");
1009
+ C > 100 ? a = 100 : C < 0 && (a = 0), d("update:percentageY", a), d("onInput");
1005
1010
  break;
1006
1011
  }
1007
1012
  };
1008
1013
  return (C, p) => (m(), E("div", el, [
1009
- n.gradientType == "linear" && r.value ? (m(), P(w(Ae), {
1014
+ o.gradientType == "linear" && r.value ? (m(), N(w(Ae), {
1010
1015
  key: 0,
1011
1016
  label: "Angle",
1012
- "model-value": n.angle,
1017
+ "model-value": o.angle,
1013
1018
  "min-limit": 0,
1014
1019
  "max-limit": 360,
1015
1020
  "onUpdate:modelValue": p[0] || (p[0] = (a) => f(a, "angle"))
@@ -1019,14 +1024,14 @@ const It = { key: 1 }, Vt = {
1019
1024
  ])),
1020
1025
  "max-limit-label": W(() => p[4] || (p[4] = [
1021
1026
  ve("360"),
1022
- h("span", null, "°", -1)
1027
+ y("span", null, "°", -1)
1023
1028
  ])),
1024
1029
  _: 1
1025
1030
  }, 8, ["model-value"])) : H("", !0),
1026
- n.gradientType == "radial" && y.value ? (m(), E("div", tl, [
1031
+ o.gradientType == "radial" && h.value ? (m(), E("div", tl, [
1027
1032
  L(w(Ae), {
1028
1033
  label: "Position X",
1029
- "model-value": n.percentageX,
1034
+ "model-value": o.percentageX,
1030
1035
  "min-limit": 0,
1031
1036
  "max-limit": 100,
1032
1037
  "onUpdate:modelValue": p[1] || (p[1] = (a) => f(a, "percentageX"))
@@ -1041,7 +1046,7 @@ const It = { key: 1 }, Vt = {
1041
1046
  }, 8, ["model-value"]),
1042
1047
  L(w(Ae), {
1043
1048
  label: "Position Y",
1044
- "model-value": n.percentageY,
1049
+ "model-value": o.percentageY,
1045
1050
  "min-limit": 0,
1046
1051
  "max-limit": 100,
1047
1052
  "onUpdate:modelValue": p[2] || (p[2] = (a) => f(a, "percentageY"))
@@ -1060,8 +1065,8 @@ const It = { key: 1 }, Vt = {
1060
1065
  }, al = {
1061
1066
  __name: "PickerWrap",
1062
1067
  emits: ["onMouseDown"],
1063
- setup(n) {
1064
- const V = Re("canvas"), r = Re("pickerWrap"), y = Re("pickerPointer"), u = (f) => {
1068
+ setup(o) {
1069
+ const V = Re("canvas"), r = Re("pickerWrap"), h = Re("pickerPointer"), d = (f) => {
1065
1070
  f.preventDefault();
1066
1071
  };
1067
1072
  return (f, C) => (m(), E("div", {
@@ -1069,17 +1074,17 @@ const It = { key: 1 }, Vt = {
1069
1074
  ref: r,
1070
1075
  class: "cp-picker-wrap",
1071
1076
  onMousedown: C[0] || (C[0] = (p) => f.$emit("onMouseDown", p)),
1072
- onDragstart: u
1077
+ onDragstart: d
1073
1078
  }, [
1074
- h("canvas", {
1079
+ y("canvas", {
1075
1080
  ref_key: "canvas",
1076
1081
  ref: V,
1077
1082
  class: "colour-area"
1078
1083
  }, null, 512),
1079
- C[1] || (C[1] = h("div", { class: "colour-area-mask" }, null, -1)),
1080
- h("div", {
1084
+ C[1] || (C[1] = y("div", { class: "colour-area-mask" }, null, -1)),
1085
+ y("div", {
1081
1086
  ref_key: "pickerPointer",
1082
- ref: y,
1087
+ ref: h,
1083
1088
  class: "colour-area-point-circle"
1084
1089
  }, null, 512)
1085
1090
  ], 544));
@@ -1110,37 +1115,37 @@ const It = { key: 1 }, Vt = {
1110
1115
  modelValue: String
1111
1116
  },
1112
1117
  emits: ["onChangeMode"],
1113
- setup(n) {
1118
+ setup(o) {
1114
1119
  return (V, r) => (m(), E("div", nl, [
1115
- h("button", {
1120
+ y("button", {
1116
1121
  type: "button",
1117
- class: Q(n.mode == "solid" ? "active" : ""),
1122
+ class: Q(o.mode == "solid" ? "active" : ""),
1118
1123
  style: { padding: "7px" },
1119
- onClick: r[0] || (r[0] = (y) => V.$emit("onChangeMode", "solid"))
1124
+ onClick: r[0] || (r[0] = (h) => V.$emit("onChangeMode", "solid"))
1120
1125
  }, [
1121
- n.modelValue && n.mode == "solid" ? (m(), E("div", {
1126
+ o.modelValue && o.mode == "solid" ? (m(), E("div", {
1122
1127
  key: 0,
1123
1128
  class: "w-[28px] h-[28px] rounded-full border",
1124
- style: te(`background:${n.modelValue}`)
1129
+ style: te(`background:${o.modelValue}`)
1125
1130
  }, null, 4)) : (m(), E("svg", ol, r[3] || (r[3] = [
1126
- h("g", { opacity: "0.5" }, [
1127
- h("path", {
1131
+ y("g", { opacity: "0.5" }, [
1132
+ y("path", {
1128
1133
  d: "M0 14C0 6.26801 6.26801 0 14 0C21.732 0 28 6.26801 28 14C28 21.732 21.732 28 14 28C6.26801 28 0 21.732 0 14Z",
1129
1134
  fill: "#03102F"
1130
1135
  })
1131
1136
  ], -1)
1132
1137
  ])))
1133
1138
  ], 2),
1134
- h("button", {
1139
+ y("button", {
1135
1140
  type: "button",
1136
- class: Q(n.gradientType == "linear" && n.mode != "solid" ? "active" : ""),
1137
- style: te(`${n.iconClasses.linear ? "" : "padding: 7px;"}`),
1138
- onClick: r[1] || (r[1] = (y) => V.$emit("onChangeMode", "linear"))
1141
+ class: Q(o.gradientType == "linear" && o.mode != "solid" ? "active" : ""),
1142
+ style: te(`${o.iconClasses.linear ? "" : "padding: 7px;"}`),
1143
+ onClick: r[1] || (r[1] = (h) => V.$emit("onChangeMode", "linear"))
1139
1144
  }, [
1140
- h("div", {
1145
+ y("div", {
1141
1146
  class: "w-[28px] h-[28px] rounded-full border",
1142
1147
  style: te(
1143
- n.modelValue && n.gradientType == "linear" && n.mode != "solid" ? `background:${n.modelValue}` : `
1148
+ o.modelValue && o.gradientType == "linear" && o.mode != "solid" ? `background:${o.modelValue}` : `
1144
1149
  background: linear-gradient(
1145
1150
  180deg,
1146
1151
  #03102f 0%,
@@ -1150,16 +1155,16 @@ const It = { key: 1 }, Vt = {
1150
1155
  )
1151
1156
  }, null, 4)
1152
1157
  ], 6),
1153
- h("button", {
1158
+ y("button", {
1154
1159
  type: "button",
1155
- class: Q(n.gradientType == "radial" && n.mode != "solid" ? "active" : ""),
1156
- style: te(`${n.iconClasses.radial ? "" : "padding: 6px;"}`),
1157
- onClick: r[2] || (r[2] = (y) => V.$emit("onChangeMode", "radial"))
1160
+ class: Q(o.gradientType == "radial" && o.mode != "solid" ? "active" : ""),
1161
+ style: te(`${o.iconClasses.radial ? "" : "padding: 6px;"}`),
1162
+ onClick: r[2] || (r[2] = (h) => V.$emit("onChangeMode", "radial"))
1158
1163
  }, [
1159
- h("div", {
1164
+ y("div", {
1160
1165
  class: "w-[28px] h-[28px] rounded-full border",
1161
1166
  style: te(
1162
- n.modelValue && n.gradientType == "radial" && n.mode != "solid" ? `background:${n.modelValue}` : "background: radial-gradient(circle at 50% 50%, rgb(255, 255, 255) 0%, rgb(3, 16, 47) 100%);"
1167
+ o.modelValue && o.gradientType == "radial" && o.mode != "solid" ? `background:${o.modelValue}` : "background: radial-gradient(circle at 50% 50%, rgb(255, 255, 255) 0%, rgb(3, 16, 47) 100%);"
1163
1168
  )
1164
1169
  }, null, 4)
1165
1170
  ], 6)
@@ -1171,10 +1176,10 @@ const It = { key: 1 }, Vt = {
1171
1176
  }, ul = {
1172
1177
  key: 1,
1173
1178
  class: "grid items-center mb-5"
1174
- }, dl = { key: 2 }, cl = { key: 0 }, pl = { class: "ck-cp-local-color-conatiner" }, gl = ["onClick"], vl = { class: "flex items-center gap-2" }, ml = { id: "ck-cp-target-background" }, fl = { class: "flex gap-3" }, hl = {
1179
+ }, dl = { key: 2 }, cl = { key: 0 }, pl = { class: "ck-cp-local-color-conatiner" }, gl = ["onClick"], vl = { class: "flex items-center gap-2" }, ml = { id: "ck-cp-target-background" }, fl = { class: "flex gap-3" }, yl = {
1175
1180
  key: 0,
1176
1181
  class: "w-full flex gap-3"
1177
- }, yl = {
1182
+ }, hl = {
1178
1183
  key: 4,
1179
1184
  class: "ck-cp-local-color-conatiner"
1180
1185
  }, bl = ["onClick"], xl = {
@@ -1213,9 +1218,9 @@ const It = { key: 1 }, Vt = {
1213
1218
  lastUsedColors: Array
1214
1219
  },
1215
1220
  emits: ["update:modelValue", "last-used-pick"],
1216
- setup(n, { emit: V }) {
1217
- const r = n, y = v(r.variant == "gradient" ? "gradient" : "solid"), u = v(null), f = V, C = v(r.modelValue), p = (t) => {
1218
- C.value = t, N.value && f("update:modelValue", t);
1221
+ setup(o, { emit: V }) {
1222
+ const r = o, h = v(r.variant == "gradient" ? "gradient" : "solid"), d = v(null), f = V, C = v(r.modelValue), p = (t) => {
1223
+ C.value = t, X.value && f("update:modelValue", t);
1219
1224
  }, a = v([
1220
1225
  { id: 1, r: 68, g: 71, b: 119, a: 100, percent: 0, hue: 0, select: !0 },
1221
1226
  { id: 2, r: 0, g: 0, b: 255, a: 100, percent: 100, hue: 0, select: !1 }
@@ -1233,19 +1238,19 @@ const It = { key: 1 }, Vt = {
1233
1238
  angle: 90,
1234
1239
  percentageX: 50,
1235
1240
  percentageY: 50
1236
- }), z = v(""), U = v(r.inputType), N = v(!1), D = v(), le = v(), J = v(), j = v(), R = v(), X = _e({
1241
+ }), z = v(""), U = v(r.inputType), X = v(!1), D = v(), le = v(), J = v(), j = v(), R = v(), q = _e({
1237
1242
  h: 0,
1238
1243
  s: 0,
1239
1244
  l: 0
1240
1245
  });
1241
1246
  Be("gradientBar", le), Be("canvas", J), Be("pickerWrap", j), Be("pickerPointer", R), Be("opacitySlider", D);
1242
- let ae = 0, ee = 0, b = 0, Se = 0, ue = 0, ie = 0;
1243
- const Pe = (t) => {
1244
- !j.value || !R.value || (ue = j.value.offsetHeight - R.value.offsetHeight, ie = j.value.offsetWidth - R.value.offsetWidth, b = t.clientX - t.target.getBoundingClientRect().left, Se = t.clientY - t.target.getBoundingClientRect().top, ae = b - R.value.offsetWidth / 2, ee = Se - R.value.offsetHeight / 2, R.value.style.left = `${ae}px`, R.value.style.top = `${ee}px`, Ce(!1), G(), window.addEventListener("mousemove", Ee), window.addEventListener("mouseup", Ue));
1247
+ let ae = 0, ee = 0, x = 0, Se = 0, ue = 0, ie = 0;
1248
+ const Xe = (t) => {
1249
+ !j.value || !R.value || (ue = j.value.offsetHeight - R.value.offsetHeight, ie = j.value.offsetWidth - R.value.offsetWidth, x = t.clientX - t.target.getBoundingClientRect().left, Se = t.clientY - t.target.getBoundingClientRect().top, ae = x - R.value.offsetWidth / 2, ee = Se - R.value.offsetHeight / 2, R.value.style.left = `${ae}px`, R.value.style.top = `${ee}px`, Ce(!1), P(), window.addEventListener("mousemove", Ee), window.addEventListener("mouseup", Ue));
1245
1250
  }, Ee = (t) => {
1246
1251
  t.preventDefault();
1247
1252
  const e = j.value.getBoundingClientRect(), l = t.clientX - e.left - R.value.offsetWidth / 2, i = t.clientY - e.top - R.value.offsetHeight / 2;
1248
- l >= 0 && l <= ie ? (ae = l, R.value.style.left = `${l}px`) : 0 > l ? (ae = 0, R.value.style.left = "0px") : l > ie && (ae = ie, R.value.style.left = `${ie}px`), i >= 0 && i <= ue ? (ee = i, R.value.style.top = `${i}px`) : 0 > i ? (ee = 0, R.value.style.top = "0px") : i > ue && (ee = ue, R.value.style.top = `${ue}px`), Ce(!1), G();
1253
+ l >= 0 && l <= ie ? (ae = l, R.value.style.left = `${l}px`) : 0 > l ? (ae = 0, R.value.style.left = "0px") : l > ie && (ae = ie, R.value.style.left = `${ie}px`), i >= 0 && i <= ue ? (ee = i, R.value.style.top = `${i}px`) : 0 > i ? (ee = 0, R.value.style.top = "0px") : i > ue && (ee = ue, R.value.style.top = `${ue}px`), Ce(!1), P();
1249
1254
  }, Ue = () => {
1250
1255
  window.removeEventListener("mousemove", Ee), window.removeEventListener("mouseup", Ue);
1251
1256
  }, Ce = (t) => {
@@ -1253,28 +1258,28 @@ const It = { key: 1 }, Vt = {
1253
1258
  let e = De();
1254
1259
  const l = at(ne.value, e.s, e.l);
1255
1260
  if (l) {
1256
- if (N.value) {
1261
+ if (X.value) {
1257
1262
  let i = a.value.find((s) => s.select == !0);
1258
1263
  i && (i.r = l.r, i.g = l.g, i.b = l.b);
1259
1264
  }
1260
- K(), F();
1265
+ K(), G();
1261
1266
  }
1262
1267
  }
1263
1268
  }, ne = v(0), Ie = async (t) => {
1264
1269
  const { rgb: e } = lt(ne.value, 100, 50);
1265
1270
  Me(e), setTimeout(() => {
1266
- Ce(t), G();
1271
+ Ce(t), P();
1267
1272
  }, 0);
1268
1273
  }, De = () => {
1269
- let t = { s: 0, l: 0 }, e = j.value.offsetWidth - R.value.offsetWidth, l = j.value.offsetHeight - R.value.offsetHeight, i = parseInt(R.value.style.left), d = 1 - parseInt(R.value.style.top) / l, k = i / e;
1270
- return t.l = d / 2 * (2 - k), t.s = d * k / (1 - Math.abs(2 * t.l - 1)), Number.isNaN(t.s) && (t.s = t.l), t.l = t.l > 1 ? 1 : t.l, t.s = t.s > 1 ? 1 : t.s, t;
1274
+ let t = { s: 0, l: 0 }, e = j.value.offsetWidth - R.value.offsetWidth, l = j.value.offsetHeight - R.value.offsetHeight, i = parseInt(R.value.style.left), c = 1 - parseInt(R.value.style.top) / l, k = i / e;
1275
+ return t.l = c / 2 * (2 - k), t.s = c * k / (1 - Math.abs(2 * t.l - 1)), Number.isNaN(t.s) && (t.s = t.l), t.l = t.l > 1 ? 1 : t.l, t.s = t.s > 1 ? 1 : t.s, t;
1271
1276
  }, me = () => {
1272
1277
  const t = a.value.find((e) => e.select == !0);
1273
1278
  if (t) {
1274
1279
  const { l: e, s: l } = et(t.r, t.g, t.b);
1275
1280
  let i = e, s = l;
1276
1281
  Number.isNaN(s) && (s = i);
1277
- let d = { x: 0, y: 0 }, k = j.value.offsetWidth - R.value.offsetWidth, I = j.value.offsetHeight - R.value.offsetHeight;
1282
+ let c = { x: 0, y: 0 }, k = j.value.offsetWidth - R.value.offsetWidth, I = j.value.offsetHeight - R.value.offsetHeight;
1278
1283
  const [$, g] = 2 * i - 1 < 0 ? [
1279
1284
  k * 2 * s / (1 + s),
1280
1285
  I * (1 - i * (1 + s))
@@ -1282,61 +1287,61 @@ const It = { key: 1 }, Vt = {
1282
1287
  -k * 2 * (i - 1) * s / (i + s - i * s),
1283
1288
  I * (i - 1) * (s - 1)
1284
1289
  ];
1285
- return d.x = $, d.y = g, d;
1290
+ return c.x = $, c.y = g, c;
1286
1291
  } else
1287
1292
  return null;
1288
- }, Xe = () => {
1293
+ }, Ne = () => {
1289
1294
  const t = a.value.find((e) => e.select == !0);
1290
1295
  t && (t.hue = ne.value);
1291
1296
  }, oe = v(100), He = (t) => {
1292
1297
  if (r.showAlpha) {
1293
1298
  const e = a.value.find((l) => l.select == !0);
1294
- e && (e.a = parseInt(t), F());
1299
+ e && (e.a = parseInt(t), G());
1295
1300
  }
1296
1301
  }, Oe = (t) => {
1297
- var l, i, s, d;
1298
- const e = (i = (l = u.value) == null ? void 0 : l.querySelector(".gradient-handle-content")) == null ? void 0 : i.getBoundingClientRect();
1299
- return t === 0 ? "0px" : t === 100 && e ? `${(((s = le.value) == null ? void 0 : s.offsetWidth) || 0) - (e.width || 0)}px` : `${(((d = le.value) == null ? void 0 : d.offsetWidth) || 0) * (t / 100) - ((e == null ? void 0 : e.width) || 0) / 2}px`;
1302
+ var l, i, s, c;
1303
+ const e = (i = (l = d.value) == null ? void 0 : l.querySelector(".gradient-handle-content")) == null ? void 0 : i.getBoundingClientRect();
1304
+ return t === 0 ? "0px" : t === 100 && e ? `${(((s = le.value) == null ? void 0 : s.offsetWidth) || 0) - (e.width || 0)}px` : `${(((c = le.value) == null ? void 0 : c.offsetWidth) || 0) * (t / 100) - ((e == null ? void 0 : e.width) || 0) / 2}px`;
1300
1305
  };
1301
- let q = null, _ = null;
1306
+ let F = null, _ = null;
1302
1307
  const Ve = (t) => {
1303
1308
  var i, s;
1304
1309
  const l = t.target.offsetParent;
1305
1310
  if ((i = l == null ? void 0 : l.id) != null && i.includes("clr-gb-")) {
1306
- const d = l.id.replace("clr-gb-", "");
1311
+ const c = l.id.replace("clr-gb-", "");
1307
1312
  _ = l;
1308
1313
  const k = a.value.find((I) => I.select == !0);
1309
- if (k && k.id != d) {
1310
- const I = (s = u.value) == null ? void 0 : s.querySelector(".gradient-handle.select");
1314
+ if (k && k.id != c) {
1315
+ const I = (s = d.value) == null ? void 0 : s.querySelector(".gradient-handle.select");
1311
1316
  I == null || I.classList.remove("select"), l.classList.add("select");
1312
1317
  const $ = a.value.findIndex((g) => g.select == !0);
1313
1318
  for (let g = 0; g < a.value.length; g++) {
1314
1319
  const S = a.value[g];
1315
- if (S.id == d) {
1316
- $ != -1 && (a.value[$].select = !1), a.value[g].select = !0, oe.value = S.a, ce(S.r, S.g, S.b, S.hue, !0), K(), G();
1320
+ if (S.id == c) {
1321
+ $ != -1 && (a.value[$].select = !1), a.value[g].select = !0, oe.value = S.a, ce(S.r, S.g, S.b, S.hue, !0), K(), P();
1317
1322
  break;
1318
1323
  }
1319
1324
  }
1320
1325
  }
1321
- window.addEventListener("mousemove", de), window.addEventListener("mouseup", he);
1326
+ window.addEventListener("mousemove", de), window.addEventListener("mouseup", ye);
1322
1327
  }
1323
- }, he = () => {
1328
+ }, ye = () => {
1324
1329
  window.removeEventListener("mousemove", de), window.removeEventListener("mouseup", Ve);
1325
1330
  }, de = (t) => {
1326
- var d, k;
1331
+ var c, k;
1327
1332
  t.preventDefault();
1328
- const e = (k = (d = u.value) == null ? void 0 : d.querySelector(".gradient-handle-content")) == null ? void 0 : k.getBoundingClientRect(), l = q == null ? void 0 : q.getBoundingClientRect(), i = l.width - (e == null ? void 0 : e.width);
1333
+ const e = (k = (c = d.value) == null ? void 0 : c.querySelector(".gradient-handle-content")) == null ? void 0 : k.getBoundingClientRect(), l = F == null ? void 0 : F.getBoundingClientRect(), i = l.width - (e == null ? void 0 : e.width);
1329
1334
  let s = t.clientX - (l.left || 0) - ((e == null ? void 0 : e.width) || 0) / 2;
1330
1335
  if (s < 0 ? s = 0 : s > i && (s = i), _) {
1331
1336
  _.style.left = `${s}px`;
1332
1337
  const I = parseFloat((s / ((l == null ? void 0 : l.width) - (e == null ? void 0 : e.width)) * 100).toFixed(0)), $ = a.value.find(
1333
1338
  (g) => g.id == (_ == null ? void 0 : _.id.replace("clr-gb-", ""))
1334
1339
  );
1335
- $ && ($.percent = I), F();
1340
+ $ && ($.percent = I), G();
1336
1341
  }
1337
1342
  }, qe = (t) => {
1338
1343
  var I, $;
1339
- const e = q == null ? void 0 : q.getBoundingClientRect(), l = Math.round((t.clientX - ((e == null ? void 0 : e.left) || 0)) / ((e == null ? void 0 : e.width) || 1) * 100), i = a.value.findIndex((g) => g.select == !0), s = a.value[i], d = {
1344
+ const e = F == null ? void 0 : F.getBoundingClientRect(), l = Math.round((t.clientX - ((e == null ? void 0 : e.left) || 0)) / ((e == null ? void 0 : e.width) || 1) * 100), i = a.value.findIndex((g) => g.select == !0), s = a.value[i], c = {
1340
1345
  id: Date.now(),
1341
1346
  r: s.r,
1342
1347
  g: s.g,
@@ -1347,31 +1352,31 @@ const It = { key: 1 }, Vt = {
1347
1352
  select: !0
1348
1353
  };
1349
1354
  a.value[i].select = !1;
1350
- const k = (I = u.value) == null ? void 0 : I.querySelector(".gradient-handle.select");
1351
- k == null || k.classList.remove("select"), a.value = [...a.value, d], be(d), _ = ($ = u.value) == null ? void 0 : $.querySelector(`#clr-gb-${d.id}`), F();
1352
- }, ye = (t) => {
1355
+ const k = (I = d.value) == null ? void 0 : I.querySelector(".gradient-handle.select");
1356
+ k == null || k.classList.remove("select"), a.value = [...a.value, c], be(c), _ = ($ = d.value) == null ? void 0 : $.querySelector(`#clr-gb-${c.id}`), G();
1357
+ }, he = (t) => {
1353
1358
  if (t.r == 0 && t.g == 0 && t.b == 0)
1354
1359
  return !0;
1355
1360
  if (t.r == 255 && t.g == 255 && t.b == 255)
1356
1361
  return !0;
1357
1362
  {
1358
- const e = J.value.getContext("2d", { willReadFrequently: !0 }), l = J.value.width, i = J.value.height, s = e.getImageData(0, 0, l, i).data, d = t.r, k = t.g, I = t.b;
1363
+ const e = J.value.getContext("2d", { willReadFrequently: !0 }), l = J.value.width, i = J.value.height, s = e.getImageData(0, 0, l, i).data, c = t.r, k = t.g, I = t.b;
1359
1364
  for (let $ = 0; $ < i; $++)
1360
1365
  for (let g = 0; g < l; g++) {
1361
1366
  const S = ($ * l + g) * 4, re = s[S], dt = s[S + 1], ct = s[S + 2];
1362
- if (re === d && dt === k && ct === I)
1367
+ if (re === c && dt === k && ct === I)
1363
1368
  return !0;
1364
1369
  }
1365
1370
  return !1;
1366
1371
  }
1367
1372
  }, ce = (t, e, l, i, s) => {
1368
1373
  setTimeout(() => {
1369
- if (ye({ r: t, g: e, b: l })) {
1370
- let d = me();
1371
- d && (R.value.style.left = `${d.x}px`, R.value.style.top = `${d.y}px`);
1374
+ if (he({ r: t, g: e, b: l })) {
1375
+ let c = me();
1376
+ c && (R.value.style.left = `${c.x}px`, R.value.style.top = `${c.y}px`);
1372
1377
  } else {
1373
- let d = me();
1374
- d && (R.value.style.left = `${d.x}px`, R.value.style.top = `${d.y}px`), ne.value = i, Ie(s);
1378
+ let c = me();
1379
+ c && (R.value.style.left = `${c.x}px`, R.value.style.top = `${c.y}px`), ne.value = i, Ie(s);
1375
1380
  }
1376
1381
  }, 0);
1377
1382
  }, Te = () => {
@@ -1379,72 +1384,72 @@ const It = { key: 1 }, Vt = {
1379
1384
  const t = a.value[0];
1380
1385
  ne.value = t.hue, Ie(!0);
1381
1386
  let e = me();
1382
- e && (R.value.style.left = `${e.x}px`, R.value.style.top = `${e.y}px`), K(), F();
1387
+ e && (R.value.style.left = `${e.x}px`, R.value.style.top = `${e.y}px`), K(), G();
1383
1388
  }, be = (t) => {
1384
- if (y.value == "gradient") {
1389
+ if (h.value == "gradient") {
1385
1390
  let e = document.createElement("div");
1386
1391
  e.id = `clr-gb-${t.id}`, e.classList.add("gradient-handle"), e.style.left = Oe(t.percent);
1387
1392
  let l = document.createElement("div");
1388
- l.classList.add("gradient-handle-content"), t.select == !0 && e.classList.add("select"), e.appendChild(l), q && q.appendChild(e);
1393
+ l.classList.add("gradient-handle-content"), t.select == !0 && e.classList.add("select"), e.appendChild(l), F && F.appendChild(e);
1389
1394
  }
1390
1395
  }, Me = (t) => {
1391
1396
  const e = J.value.getContext("2d", { willReadFrequently: !0 }), l = J.value.width, i = J.value.height;
1392
1397
  e.fillStyle = `rgb(${t[0]},${t[1]},${t[2]})`, e.fillRect(0, 0, l, i);
1393
1398
  let s = e.createLinearGradient(0, 0, l - 12, 0);
1394
1399
  s.addColorStop(0, "rgb(255,255,255)"), s.addColorStop(1, "rgba(255,255,255,0)"), e.fillStyle = s, e.fillRect(0, 0, l, i);
1395
- let d = e.createLinearGradient(0, 0, 0, i);
1396
- d.addColorStop(0, "rgba(0,0,0,0)"), d.addColorStop(1, "rgb(0,0,0)"), e.fillStyle = d, e.fillRect(0, 0, l, i);
1400
+ let c = e.createLinearGradient(0, 0, 0, i);
1401
+ c.addColorStop(0, "rgba(0,0,0,0)"), c.addColorStop(1, "rgb(0,0,0)"), e.fillStyle = c, e.fillRect(0, 0, l, i);
1397
1402
  }, K = () => {
1398
1403
  if (r.showAlpha) {
1399
1404
  let t = a.value.find((e) => e.select == !0);
1400
1405
  t && (D.value.style.background = ` linear-gradient(90deg,rgba(255, 255, 255, 0) 0%, rgba(${t.r}, ${t.g}, ${t.b}, 100) 97%)`);
1401
1406
  }
1402
- }, F = () => {
1407
+ }, G = () => {
1403
1408
  var t;
1404
- if (y.value == "gradient") {
1405
- a.value.sort((s, d) => s.percent - d.percent);
1409
+ if (h.value == "gradient") {
1410
+ a.value.sort((s, c) => s.percent - c.percent);
1406
1411
  let e = "linear-gradient(90deg, ", l;
1407
1412
  if (T.value == "linear") {
1408
1413
  l = `linear-gradient(${B.angle}deg, `;
1409
1414
  for (let s = 0; s < a.value.length; s++) {
1410
- const { r: d, g: k, b: I, a: $, percent: g } = a.value[s];
1411
- a.value.length - 1 == s ? (e = e + `rgba(${d},${k},${I},${$ / 100}) ${g}%)`, l = l + `rgba(${d},${k},${I},${$ / 100}) ${g}%)`) : (e = e + `rgba(${d},${k},${I},${$ / 100}) ${g}%, `, l = l + `rgba(${d},${k},${I},${$ / 100}) ${g}%, `);
1415
+ const { r: c, g: k, b: I, a: $, percent: g } = a.value[s];
1416
+ a.value.length - 1 == s ? (e = e + `rgba(${c},${k},${I},${$ / 100}) ${g}%)`, l = l + `rgba(${c},${k},${I},${$ / 100}) ${g}%)`) : (e = e + `rgba(${c},${k},${I},${$ / 100}) ${g}%, `, l = l + `rgba(${c},${k},${I},${$ / 100}) ${g}%, `);
1412
1417
  }
1413
1418
  } else {
1414
1419
  l = `radial-gradient(circle at ${B.percentageX}% ${B.percentageY}%, `;
1415
1420
  for (let s = 0; s < a.value.length; s++) {
1416
- const { r: d, g: k, b: I, a: $, percent: g } = a.value[s];
1417
- a.value.length - 1 == s ? (e = e + `rgba(${d},${k},${I},${$ / 100}) ${g}%)`, l = l + `rgba(${d},${k},${I},${$ / 100}) ${g}%)`) : (e = e + `rgba(${d},${k},${I},${$ / 100}) ${g}%, `, l = l + `rgba(${d},${k},${I},${$ / 100}) ${g}%, `);
1421
+ const { r: c, g: k, b: I, a: $, percent: g } = a.value[s];
1422
+ a.value.length - 1 == s ? (e = e + `rgba(${c},${k},${I},${$ / 100}) ${g}%)`, l = l + `rgba(${c},${k},${I},${$ / 100}) ${g}%)`) : (e = e + `rgba(${c},${k},${I},${$ / 100}) ${g}%, `, l = l + `rgba(${c},${k},${I},${$ / 100}) ${g}%, `);
1418
1423
  }
1419
1424
  }
1420
1425
  le.value.style.backgroundImage = e;
1421
- let i = (t = u.value) == null ? void 0 : t.querySelector("#ck-cp-target-background");
1422
- i && (i.style.backgroundImage = l, N.value && p(i.style.backgroundImage));
1426
+ let i = (t = d.value) == null ? void 0 : t.querySelector("#ck-cp-target-background");
1427
+ i && (i.style.backgroundImage = l, X.value && p(i.style.backgroundImage));
1423
1428
  } else {
1424
1429
  const { r: e, g: l, b: i, a: s } = a.value[0];
1425
- let d = "";
1430
+ let c = "";
1426
1431
  switch (r.type) {
1427
1432
  case "HEX8":
1428
- d = kt(e, l, i, s / 100);
1433
+ c = kt(e, l, i, s / 100);
1429
1434
  break;
1430
1435
  case "RGBA":
1431
- d = `rgba(${e},${l},${i},${s / 100})`;
1436
+ c = `rgba(${e},${l},${i},${s / 100})`;
1432
1437
  break;
1433
1438
  case "RGB":
1434
- d = `rgb(${e},${l},${i})`;
1439
+ c = `rgb(${e},${l},${i})`;
1435
1440
  break;
1436
1441
  case "HEX":
1437
- d = tt(e, l, i);
1442
+ c = tt(e, l, i);
1438
1443
  break;
1439
1444
  }
1440
- p(d);
1445
+ p(c);
1441
1446
  }
1442
1447
  }, Le = () => {
1443
1448
  a.value.forEach((t) => {
1444
1449
  t.hue = Qe(t.r, t.g, t.b);
1445
1450
  });
1446
1451
  }, Fe = (t) => {
1447
- T.value = t, F();
1452
+ T.value = t, G();
1448
1453
  }, Ge = () => {
1449
1454
  var t, e;
1450
1455
  if (a.value.length > 2) {
@@ -1452,20 +1457,20 @@ const It = { key: 1 }, Vt = {
1452
1457
  if (l !== -1) {
1453
1458
  const i = a.value[l].id;
1454
1459
  a.value.splice(l, 1);
1455
- const s = (t = u.value) == null ? void 0 : t.querySelector(`#clr-gb-${i}`);
1460
+ const s = (t = d.value) == null ? void 0 : t.querySelector(`#clr-gb-${i}`);
1456
1461
  s == null || s.remove();
1457
- const d = a.value[0];
1458
- d && (d.select = !0, _ = (e = u.value) == null ? void 0 : e.querySelector(`#clr-gb-${d.id}`), _ == null || _.classList.add("select"), ce(d.r, d.g, d.b, d.hue, !1), G(), F());
1462
+ const c = a.value[0];
1463
+ c && (c.select = !0, _ = (e = d.value) == null ? void 0 : e.querySelector(`#clr-gb-${c.id}`), _ == null || _.classList.add("select"), ce(c.r, c.g, c.b, c.hue, !1), P(), G());
1459
1464
  }
1460
1465
  }
1461
1466
  }, Ye = () => {
1462
1467
  var l;
1463
- const t = (l = u.value) == null ? void 0 : l.querySelector("#cp-btn-eyedropper");
1468
+ const t = (l = d.value) == null ? void 0 : l.querySelector("#cp-btn-eyedropper");
1464
1469
  t == null || t.classList.add("active"), new EyeDropper().open().then((i) => {
1465
- const { sRGBHex: s } = i, d = a.value.find((I) => I.select == !0), k = ze(s);
1470
+ const { sRGBHex: s } = i, c = a.value.find((I) => I.select == !0), k = ze(s);
1466
1471
  if (k) {
1467
1472
  const I = Qe(k.r, k.g, k.b);
1468
- if (d && (d.hue = I, d.r = k.r, d.g = k.g, d.b = k.b), ye(k)) {
1473
+ if (c && (c.hue = I, c.r = k.r, c.g = k.g, c.b = k.b), he(k)) {
1469
1474
  const $ = me();
1470
1475
  $ && (R.value.style.left = `${$.x}px`, R.value.style.top = `${$.y}px`);
1471
1476
  } else {
@@ -1475,38 +1480,38 @@ const It = { key: 1 }, Vt = {
1475
1480
  const g = me();
1476
1481
  g && (R.value.style.left = `${g.x}px`, R.value.style.top = `${g.y}px`);
1477
1482
  }
1478
- G(), K(), F(), t == null || t.classList.remove("active");
1483
+ P(), K(), G(), t == null || t.classList.remove("active");
1479
1484
  }
1480
1485
  }).catch(() => {
1481
1486
  t == null || t.classList.remove("active");
1482
1487
  });
1483
- }, c = (t) => {
1488
+ }, u = (t) => {
1484
1489
  const { value: e, type: l } = t;
1485
1490
  if (l != "a") {
1486
1491
  const i = a.value.find((s) => s.select == !0);
1487
1492
  if (i) {
1488
1493
  i.r = parseInt(e.r), i.g = parseInt(e.g), i.b = parseInt(e.b);
1489
1494
  const s = Qe(i.r, i.g, i.b);
1490
- i.hue = s, ce(i.r, i.g, i.b, i.hue, !0), F(), K();
1495
+ i.hue = s, ce(i.r, i.g, i.b, i.hue, !0), G(), K();
1491
1496
  }
1492
1497
  } else
1493
- oe.value = e, F(), K();
1494
- }, o = (t) => {
1495
- X.h = t.h, X.s = t.s, X.l = t.l;
1498
+ oe.value = e, G(), K();
1499
+ }, n = (t) => {
1500
+ q.h = t.h, q.s = t.s, q.l = t.l;
1496
1501
  const e = a.value.find((l) => l.select == !0);
1497
- if (e && !Number.isNaN(X.h) && !Number.isNaN(X.s) && !Number.isNaN(X.l)) {
1498
- const { r: l, g: i, b: s } = at(X.h, X.s / 100, X.l / 100);
1499
- e.hue = X.h, e.r = l, e.g = i, e.b = s, ce(e.r, e.g, e.b, e.hue, !0), F(), K();
1502
+ if (e && !Number.isNaN(q.h) && !Number.isNaN(q.s) && !Number.isNaN(q.l)) {
1503
+ const { r: l, g: i, b: s } = at(q.h, q.s / 100, q.l / 100);
1504
+ e.hue = q.h, e.r = l, e.g = i, e.b = s, ce(e.r, e.g, e.b, e.hue, !0), G(), K();
1500
1505
  }
1501
- }, x = () => {
1506
+ }, b = () => {
1502
1507
  if (z.value) {
1503
1508
  const t = ze(z.value);
1504
1509
  if (t) {
1505
1510
  const e = Qe(t.r, t.g, t.b), l = a.value.find((i) => i.select == !0);
1506
- l && (l.r = t.r, l.g = t.g, l.b = t.b, l.hue = e, ce(t.r, t.g, t.b, l.hue, !0), F(), K(), pe(U.value));
1511
+ l && (l.r = t.r, l.g = t.g, l.b = t.b, l.hue = e, ce(t.r, t.g, t.b, l.hue, !0), G(), K(), pe(U.value));
1507
1512
  }
1508
1513
  }
1509
- }, G = () => {
1514
+ }, P = () => {
1510
1515
  const t = a.value.find((e) => e.select == !0);
1511
1516
  t && (z.value = tt(t.r, t.g, t.b).toUpperCase()), pe(U.value);
1512
1517
  }, se = (t) => {
@@ -1514,12 +1519,12 @@ const It = { key: 1 }, Vt = {
1514
1519
  };
1515
1520
  window.EyeDropper && (M.value = !0);
1516
1521
  const xe = (t = "") => {
1517
- if (y.value == "gradient") {
1522
+ if (h.value == "gradient") {
1518
1523
  let e = t.includes("linear") ? "linear" : "radial", l = [];
1519
1524
  if (T.value = e, e == "linear") {
1520
- let i = /^linear-gradient\((.*)\)$/, s = t.replace(";", "").trim().match(i), d = /,\s*(?![^()]*\))/;
1525
+ let i = /^linear-gradient\((.*)\)$/, s = t.replace(";", "").trim().match(i), c = /,\s*(?![^()]*\))/;
1521
1526
  if (s) {
1522
- let k = s[1].split(d);
1527
+ let k = s[1].split(c);
1523
1528
  for (let I = 0; I < k.length; I++) {
1524
1529
  const $ = k[I];
1525
1530
  let g = {
@@ -1544,9 +1549,9 @@ const It = { key: 1 }, Vt = {
1544
1549
  }
1545
1550
  }
1546
1551
  } else {
1547
- let i = /^radial-gradient\((.*)\)$/, s = t.replace(";", "").trim().match(i), d = /,\s*(?![^()]*\))/;
1552
+ let i = /^radial-gradient\((.*)\)$/, s = t.replace(";", "").trim().match(i), c = /,\s*(?![^()]*\))/;
1548
1553
  if (s) {
1549
- let k = s[1].split(d);
1554
+ let k = s[1].split(c);
1550
1555
  for (let I = 0; I < k.length; I++) {
1551
1556
  const $ = k[I];
1552
1557
  let g = {
@@ -1604,7 +1609,7 @@ const It = { key: 1 }, Vt = {
1604
1609
  break;
1605
1610
  case "HSL": {
1606
1611
  const { h: l, s: i, l: s } = et(e.r, e.g, e.b);
1607
- X.h = Math.round(l), X.s = Math.round(i * 100), X.l = Math.round(s * 100);
1612
+ q.h = Math.round(l), q.s = Math.round(i * 100), q.l = Math.round(s * 100);
1608
1613
  break;
1609
1614
  }
1610
1615
  }
@@ -1617,45 +1622,45 @@ const It = { key: 1 }, Vt = {
1617
1622
  () => r.modelValue,
1618
1623
  (t, e) => {
1619
1624
  t !== e && t !== C.value && (a.value.forEach((l) => {
1620
- const i = q == null ? void 0 : q.querySelector(`#clr-gb-${l.id}`);
1625
+ const i = F == null ? void 0 : F.querySelector(`#clr-gb-${l.id}`);
1621
1626
  i == null || i.remove();
1622
1627
  }), ke(t));
1623
1628
  }
1624
1629
  );
1625
1630
  const ut = (t) => {
1626
1631
  a.value.forEach((e) => {
1627
- const l = q == null ? void 0 : q.querySelector(`#clr-gb-${e.id}`);
1632
+ const l = F == null ? void 0 : F.querySelector(`#clr-gb-${e.id}`);
1628
1633
  l == null || l.remove();
1629
- }), t !== "solid" ? (y.value = "gradient", setTimeout(() => {
1634
+ }), t !== "solid" ? (h.value = "gradient", setTimeout(() => {
1630
1635
  var e;
1631
- q = (e = u.value) == null ? void 0 : e.querySelector(".gradient-bar"), Fe(t), Te();
1632
- }, 200)) : t === "solid" && (y.value = "solid", a.value = a.value.map((e) => (e.select = !1, e)), a.value[0].select = !0, setTimeout(() => {
1636
+ F = (e = d.value) == null ? void 0 : e.querySelector(".gradient-bar"), Fe(t), Te();
1637
+ }, 200)) : t === "solid" && (h.value = "solid", a.value = a.value.map((e) => (e.select = !1, e)), a.value[0].select = !0, setTimeout(() => {
1633
1638
  ke(r.modelValue);
1634
1639
  }, 200));
1635
1640
  };
1636
1641
  return Je(() => {
1637
1642
  var t;
1638
- y.value = r.modelValue.includes("linear") || r.modelValue.includes("radial") ? "gradient" : "solid", y.value == "gradient" && (q = (t = u.value) == null ? void 0 : t.querySelector(".gradient-bar")), ke(r.modelValue), pe(U.value), ft(() => {
1639
- N.value = !0;
1643
+ h.value = r.modelValue.includes("linear") || r.modelValue.includes("radial") ? "gradient" : "solid", h.value == "gradient" && (F = (t = d.value) == null ? void 0 : t.querySelector(".gradient-bar")), ke(r.modelValue), pe(U.value), ft(() => {
1644
+ X.value = !0;
1640
1645
  });
1641
1646
  }), (t, e) => (m(), E("div", {
1642
1647
  ref_key: "pickerTemplateRef",
1643
- ref: u,
1644
- class: Q(["ck-cp-container", n.disabled ? "ck-cp-disabled " : ""]),
1645
- "cp-theme": n.theme
1648
+ ref: d,
1649
+ class: Q(["ck-cp-container", o.disabled ? "ck-cp-disabled " : ""]),
1650
+ "cp-theme": o.theme
1646
1651
  }, [
1647
- n.variant == "gradient" ? (m(), E("div", rl, [
1652
+ o.variant == "gradient" ? (m(), E("div", rl, [
1648
1653
  L(il, {
1649
1654
  class: "mr-auto",
1650
- variant: n.variant,
1651
- mode: y.value,
1652
- "model-value": n.modelValue,
1653
- iconClasses: n.iconClasses,
1655
+ variant: o.variant,
1656
+ mode: h.value,
1657
+ "model-value": o.modelValue,
1658
+ iconClasses: o.iconClasses,
1654
1659
  gradientType: T.value,
1655
1660
  onOnChangeMode: ut
1656
1661
  }, null, 8, ["variant", "mode", "model-value", "iconClasses", "gradientType"])
1657
1662
  ])) : H("", !0),
1658
- y.value == "gradient" && n.variant == "gradient" ? (m(), E("div", ul, [
1663
+ h.value == "gradient" && o.variant == "gradient" ? (m(), E("div", ul, [
1659
1664
  L(Kt, {
1660
1665
  gradientType: T.value,
1661
1666
  onOnAddColor: qe,
@@ -1670,15 +1675,15 @@ const It = { key: 1 }, Vt = {
1670
1675
  percentageX: B.percentageX,
1671
1676
  "onUpdate:percentageX": e[2] || (e[2] = (l) => B.percentageX = l),
1672
1677
  inputType: U.value,
1673
- mode: y.value,
1678
+ mode: h.value,
1674
1679
  gradientType: T.value,
1675
- onOnInput: F
1680
+ onOnInput: G
1676
1681
  }, null, 8, ["percentageY", "angle", "percentageX", "inputType", "mode", "gradientType"])
1677
1682
  ])) : (m(), E("div", dl, [
1678
- n.presetColors ? (m(), E("div", cl, [
1679
- e[10] || (e[10] = h("div", { class: "text-oc-text-400 text-sm my-3 font-medium" }, "Choose color", -1)),
1680
- h("div", pl, [
1681
- (m(!0), E(ge, null, Ke(n.presetColors, (l) => (m(), E("div", {
1683
+ o.presetColors ? (m(), E("div", cl, [
1684
+ e[10] || (e[10] = y("div", { class: "text-oc-text-400 text-sm my-3 font-medium" }, "Choose color", -1)),
1685
+ y("div", pl, [
1686
+ (m(!0), E(ge, null, Ke(o.presetColors, (l) => (m(), E("div", {
1682
1687
  key: `color-${l}`,
1683
1688
  class: "ck-cp-color-item !w-[32px] !h-[32px]",
1684
1689
  style: te(`background:${l}`),
@@ -1687,14 +1692,14 @@ const It = { key: 1 }, Vt = {
1687
1692
  ])
1688
1693
  ])) : H("", !0)
1689
1694
  ])),
1690
- L(al, { onOnMouseDown: Pe }),
1691
- h("div", vl, [
1695
+ L(al, { onOnMouseDown: Xe }),
1696
+ y("div", vl, [
1692
1697
  L(_t, {
1693
1698
  class: Q(M.value ? "max-w-[90%]" : ""),
1694
1699
  modelValue: ne.value,
1695
1700
  "onUpdate:modelValue": e[3] || (e[3] = (l) => ne.value = l),
1696
1701
  onOnInput: e[4] || (e[4] = (l) => Ie(!1)),
1697
- onOnChange: Xe
1702
+ onOnChange: Ne
1698
1703
  }, null, 8, ["class", "modelValue"]),
1699
1704
  M.value ? (m(), E("button", {
1700
1705
  key: 0,
@@ -1704,52 +1709,52 @@ const It = { key: 1 }, Vt = {
1704
1709
  style: { padding: "7px" },
1705
1710
  onClick: Ye
1706
1711
  }, e[11] || (e[11] = [
1707
- h("svg", {
1712
+ y("svg", {
1708
1713
  version: "1.1",
1709
1714
  xmlns: "http://www.w3.org/2000/svg",
1710
1715
  width: "32",
1711
1716
  height: "32",
1712
1717
  viewBox: "0 0 32 32"
1713
1718
  }, [
1714
- h("path", { d: "M21.35 1.825l-6.344 6.35-0.588-0.588c-0.781-0.781-2.050-0.781-2.831 0s-0.781 2.050 0 2.831l10 10c0.781 0.781 2.050 0.781 2.831 0s0.781-2.050 0-2.831l-0.587-0.587 6.344-6.35c2.438-2.438 2.438-6.388 0-8.819s-6.387-2.438-8.819 0zM3.462 20.206c-0.938 0.938-1.462 2.212-1.462 3.538v2.65l-1.663 2.494c-0.531 0.794-0.425 1.85 0.25 2.525s1.731 0.781 2.525 0.25l2.494-1.663h2.65c1.325 0 2.6-0.525 3.537-1.462l7.544-7.544-2.831-2.831-7.544 7.544c-0.188 0.188-0.444 0.294-0.706 0.294h-2.256v-2.256c0-0.262 0.106-0.519 0.294-0.706l7.544-7.544-2.831-2.831-7.544 7.544z" })
1719
+ y("path", { d: "M21.35 1.825l-6.344 6.35-0.588-0.588c-0.781-0.781-2.050-0.781-2.831 0s-0.781 2.050 0 2.831l10 10c0.781 0.781 2.050 0.781 2.831 0s0.781-2.050 0-2.831l-0.587-0.587 6.344-6.35c2.438-2.438 2.438-6.388 0-8.819s-6.387-2.438-8.819 0zM3.462 20.206c-0.938 0.938-1.462 2.212-1.462 3.538v2.65l-1.663 2.494c-0.531 0.794-0.425 1.85 0.25 2.525s1.731 0.781 2.525 0.25l2.494-1.663h2.65c1.325 0 2.6-0.525 3.537-1.462l7.544-7.544-2.831-2.831-7.544 7.544c-0.188 0.188-0.444 0.294-0.706 0.294h-2.256v-2.256c0-0.262 0.106-0.519 0.294-0.706l7.544-7.544-2.831-2.831-7.544 7.544z" })
1715
1720
  ], -1)
1716
1721
  ]))) : H("", !0)
1717
1722
  ]),
1718
- n.showAlpha ? (m(), P(jt, {
1723
+ o.showAlpha ? (m(), N(jt, {
1719
1724
  key: 3,
1720
1725
  modelValue: oe.value,
1721
1726
  "onUpdate:modelValue": e[5] || (e[5] = (l) => oe.value = l),
1722
1727
  onOnInput: e[6] || (e[6] = (l) => He(l.target.value))
1723
1728
  }, null, 8, ["modelValue"])) : H("", !0),
1724
- ht(h("div", ml, null, 512), [
1725
- [yt, !1]
1729
+ yt(y("div", ml, null, 512), [
1730
+ [ht, !1]
1726
1731
  ]),
1727
- h("div", fl, [
1732
+ y("div", fl, [
1728
1733
  L(Gt, {
1729
1734
  "model-value": U.value,
1730
1735
  "onUpdate:modelValue": pe
1731
1736
  }, null, 8, ["model-value"]),
1732
- N.value && n.showInputSet ? (m(), E("div", hl, [
1733
- U.value == "HEX" ? (m(), P(Xt, {
1737
+ X.value && o.showInputSet ? (m(), E("div", yl, [
1738
+ U.value == "HEX" ? (m(), N(Nt, {
1734
1739
  key: 0,
1735
1740
  modelValue: z.value,
1736
1741
  "onUpdate:modelValue": [
1737
1742
  e[7] || (e[7] = (l) => z.value = l),
1738
- x
1743
+ b
1739
1744
  ]
1740
1745
  }, null, 8, ["modelValue"])) : H("", !0),
1741
- U.value == "RGB" ? (m(), P(nt, {
1746
+ U.value == "RGB" ? (m(), N(nt, {
1742
1747
  key: 1,
1743
1748
  "rgb-value": a.value.find((l) => l.select == !0),
1744
- onUpdateRgbValue: c
1749
+ onUpdateRgbValue: u
1745
1750
  }, null, 8, ["rgb-value"])) : H("", !0),
1746
- U.value == "HSL" ? (m(), P(nt, {
1751
+ U.value == "HSL" ? (m(), N(nt, {
1747
1752
  key: 2,
1748
1753
  "input-type": "HSL",
1749
- "hsl-value": X,
1750
- onUpdateHslValue: o
1754
+ "hsl-value": q,
1755
+ onUpdateHslValue: n
1751
1756
  }, null, 8, ["hsl-value"])) : H("", !0),
1752
- n.showAlpha ? (m(), P(Ft, {
1757
+ o.showAlpha ? (m(), N(Ft, {
1753
1758
  key: 3,
1754
1759
  modelValue: oe.value,
1755
1760
  "onUpdate:modelValue": [
@@ -1759,8 +1764,8 @@ const It = { key: 1 }, Vt = {
1759
1764
  }, null, 8, ["modelValue"])) : H("", !0)
1760
1765
  ])) : H("", !0)
1761
1766
  ]),
1762
- e[12] || (e[12] = h("div", { class: "text-oc-text-400 text-sm my-3 font-medium font-inter" }, "Last used", -1)),
1763
- O.value.length > 0 && n.showColorList ? (m(), E("div", yl, [
1767
+ e[12] || (e[12] = y("div", { class: "text-oc-text-400 text-sm my-3 font-medium font-inter" }, "Last used", -1)),
1768
+ O.value.length > 0 && o.showColorList ? (m(), E("div", hl, [
1764
1769
  (m(!0), E(ge, null, Ke(Z.value, (l) => (m(), E("div", {
1765
1770
  key: `color-${l}`,
1766
1771
  class: "ck-cp-color-item !w-[32px] !h-[32px]",
@@ -1796,8 +1801,8 @@ const It = { key: 1 }, Vt = {
1796
1801
  default: () => []
1797
1802
  }
1798
1803
  },
1799
- setup(n) {
1800
- const V = n, r = $e(() => ({
1804
+ setup(o) {
1805
+ const V = o, r = $e(() => ({
1801
1806
  grid: {
1802
1807
  containLabel: !1
1803
1808
  },
@@ -1825,17 +1830,17 @@ const It = { key: 1 }, Vt = {
1825
1830
  }
1826
1831
  ]
1827
1832
  }));
1828
- return (y, u) => (m(), E("div", kl, [
1833
+ return (h, d) => (m(), E("div", kl, [
1829
1834
  L(w(Ct), {
1830
1835
  class: "w-[140px] bg-white rounded-full h-[140px]",
1831
1836
  "additional-options": r.value,
1832
1837
  "tooltip-formatter": () => null,
1833
1838
  "tooltip-value-formatter": () => null
1834
1839
  }, null, 8, ["additional-options"]),
1835
- h("div", $l, [
1836
- n.title ? (m(), E("span", wl, Ne(n.title), 1)) : H("", !0),
1837
- je(y.$slots, "description", {}, () => [
1838
- n.description ? (m(), E("span", Sl, Ne(n.description), 1)) : H("", !0)
1840
+ y("div", $l, [
1841
+ o.title ? (m(), E("span", wl, Pe(o.title), 1)) : H("", !0),
1842
+ je(h.$slots, "description", {}, () => [
1843
+ o.description ? (m(), E("span", Sl, Pe(o.description), 1)) : H("", !0)
1839
1844
  ])
1840
1845
  ])
1841
1846
  ]));
@@ -1847,7 +1852,7 @@ const It = { key: 1 }, Vt = {
1847
1852
  );
1848
1853
  export {
1849
1854
  Al as BarChart,
1850
- Pl as BarRaceChart,
1855
+ Xl as BarRaceChart,
1851
1856
  ql as Card,
1852
1857
  Ul as CodeBlock,
1853
1858
  Vt as ColorPicker,