zan-layer 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/zan-layer.js CHANGED
@@ -1,5 +1,5 @@
1
- import { defineComponent as A, computed as $, openBlock as d, createElementBlock as v, normalizeStyle as N, createCommentVNode as h, h as Me, renderSlot as ee, createVNode as te, unref as z, withModifiers as de, normalizeClass as P, createElementVNode as B, toDisplayString as T, ref as g, watch as J, onMounted as he, nextTick as D, Fragment as W, renderList as De, shallowRef as rt, withDirectives as Se, vModelText as ut, vModelDynamic as ct, useSlots as dt, onUnmounted as ft, createBlock as M, Teleport as mt, Transition as vt, withCtx as fe, render as Z, isVNode as Ie } from "vue";
2
- const yt = /* @__PURE__ */ A({
1
+ import { defineComponent as H, computed as I, openBlock as d, createElementBlock as f, normalizeStyle as P, createCommentVNode as h, h as De, renderSlot as ee, createVNode as te, unref as C, withModifiers as fe, normalizeClass as D, createElementVNode as O, toDisplayString as T, ref as g, watch as J, onMounted as he, nextTick as N, Fragment as _, renderList as Pe, shallowRef as yt, onUnmounted as Te, withDirectives as Be, vModelText as pt, vModelDynamic as ht, useSlots as gt, createBlock as M, Teleport as xt, Transition as bt, withCtx as me, render as Q, isVNode as Ie } from "vue";
2
+ const zt = /* @__PURE__ */ H({
3
3
  name: "Shade",
4
4
  __name: "Shade",
5
5
  props: {
@@ -12,40 +12,40 @@ const yt = /* @__PURE__ */ A({
12
12
  },
13
13
  emits: ["shadeClick"],
14
14
  setup(e, { emit: n }) {
15
- const l = e, t = n, o = $(() => [
15
+ const l = e, t = n, o = I(() => [
16
16
  {
17
17
  opacity: l.opacity,
18
18
  position: l.teleportDisabled || l.teleport != "body" ? "absolute" : "fixed",
19
19
  zIndex: l.index
20
20
  },
21
21
  l.shadeStyle
22
- ]), i = () => {
22
+ ]), s = () => {
23
23
  t("shadeClick");
24
24
  };
25
- return (u, a) => e.visible ? (d(), v("div", {
25
+ return (r, a) => e.visible ? (d(), f("div", {
26
26
  key: 0,
27
27
  class: "zan-layer-shade",
28
- style: N(o.value),
29
- onClick: i
28
+ style: P(o.value),
29
+ onClick: s
30
30
  }, null, 4)) : h("", !0);
31
31
  }
32
- }), pt = ["src"], ht = /* @__PURE__ */ A({
32
+ }), Ct = ["src"], kt = /* @__PURE__ */ H({
33
33
  name: "Iframe",
34
34
  __name: "Iframe",
35
35
  props: {
36
36
  src: {}
37
37
  },
38
38
  setup(e) {
39
- const n = e, l = $(() => n.src);
40
- return (t, o) => (d(), v("iframe", {
39
+ const n = e, l = I(() => n.src);
40
+ return (t, o) => (d(), f("iframe", {
41
41
  scrolling: "auto",
42
42
  class: "zan-layer-iframe",
43
43
  allowtransparency: "true",
44
44
  frameborder: "0",
45
45
  src: l.value
46
- }, null, 8, pt));
46
+ }, null, 8, Ct));
47
47
  }
48
- }), ie = A({
48
+ }), ie = H({
49
49
  name: "ZanRender",
50
50
  props: {
51
51
  render: {
@@ -57,29 +57,29 @@ const yt = /* @__PURE__ */ A({
57
57
  return () => e.render();
58
58
  }
59
59
  }), ne = function(e) {
60
- return typeof e == "function" ? e() : typeof e == "string" ? Me("span", e) : e;
60
+ return typeof e == "function" ? e() : typeof e == "string" ? De("span", e) : e;
61
61
  };
62
- function Pe() {
62
+ function Ve() {
63
63
  const e = [], n = "0123456789abcdef";
64
64
  for (let t = 0; t < 36; t++)
65
65
  e[t] = n.substr(Math.floor(Math.random() * 16), 1);
66
66
  return e[14] = "4", e[19] = n.substr(e[19] & 3 | 8, 1), e[8] = e[13] = e[18] = e[23] = "-", e.join("").replaceAll("-", "");
67
67
  }
68
- function gt(e, n, l) {
69
- return e != "drawer" && e != 4 ? xt(n) : Ne(l, n);
68
+ function wt(e, n, l) {
69
+ return e != "drawer" && e != 4 ? St(n) : Re(l, n);
70
70
  }
71
- function xt(e) {
71
+ function St(e) {
72
72
  return e == null || e === "auto" ? [] : typeof e == "string" ? [e] : e[1] && e[1] === "auto" ? e[0] && e[0] === "auto" ? [] : [e[0]] : e[0] && e[0] === "auto" ? e[1] && e[1] != "auto" ? [void 0, e[1]] : [] : [...e];
73
73
  }
74
- function Ne(e, n = "30%") {
74
+ function Re(e, n = "30%") {
75
75
  return n == null && (n = "30%"), n instanceof Array ? n : (n === "auto" && (n = "30%"), e === "l" || e === "r" || e === "lt" || e === "lb" || e === "rt" || e === "rb" ? [n, "100%"] : e === "t" || e === "b" || e === "tr" || e === "tl" || e === "br" || e === "bl" ? ["100%", n] : [n, "100%"]);
76
76
  }
77
- function $e(e) {
77
+ function Oe(e) {
78
78
  return e == null || e === "" ? "0px" : e;
79
79
  }
80
- function me(e = "auto", n, l) {
80
+ function ve(e = "auto", n, l) {
81
81
  e == null && (e = "auto");
82
- const t = Array.isArray(n) ? n : [], o = $e(t[0]), i = $e(t[1]), u = [
82
+ const t = Array.isArray(n) ? n : [], o = Oe(t[0]), s = Oe(t[1]), r = [
83
83
  "t",
84
84
  "r",
85
85
  "b",
@@ -93,24 +93,24 @@ function me(e = "auto", n, l) {
93
93
  "rb",
94
94
  "br"
95
95
  ], a = [];
96
- return e === "auto" && l == 4 && (e = "r"), typeof e == "string" ? u.indexOf(e) > -1 ? (e === "t" && (a[0] = "0px", a[1] = "calc(50% - " + o + "/2)"), e === "l" && (a[0] = "calc(50% - " + i + "/2)", a[1] = "0px"), e === "b" && (a[0] = "calc(100% - " + i + ")", a[1] = "calc(50% - " + o + "/2)"), e === "r" && (a[0] = "calc(50% - " + i + "/2)", a[1] = "calc(100% - " + o + ")"), (e === "lt" || e === "tl") && (a[0] = "0px", a[1] = "0px"), (e === "lb" || e === "bl") && (a[0] = "calc(100% - " + i + ")", a[1] = "0px"), (e === "rt" || e === "tr") && (a[0] = "0px", a[1] = "calc(100% - " + o + ")"), (e === "rb" || e === "br") && (a[0] = "calc(100% - " + i + ")", a[1] = "calc(100% - " + o + ")")) : e == "auto" ? (a[0] = "calc(50% - " + i + "/2)", a[1] = "calc(50% - " + o + "/2)") : (a[0] = e, a[1] = "calc(50% - " + o + "/2)") : e && e[0] !== void 0 && e[1] !== void 0 ? (a[0] = e[0], a[1] = e[1]) : (a[0] = "calc(50% - " + i + "/2)", a[1] = "calc(50% - " + o + "/2)"), a;
96
+ return e === "auto" && l == 4 && (e = "r"), typeof e == "string" ? r.indexOf(e) > -1 ? (e === "t" && (a[0] = "0px", a[1] = "calc(50% - " + o + "/2)"), e === "l" && (a[0] = "calc(50% - " + s + "/2)", a[1] = "0px"), e === "b" && (a[0] = "calc(100% - " + s + ")", a[1] = "calc(50% - " + o + "/2)"), e === "r" && (a[0] = "calc(50% - " + s + "/2)", a[1] = "calc(100% - " + o + ")"), (e === "lt" || e === "tl") && (a[0] = "0px", a[1] = "0px"), (e === "lb" || e === "bl") && (a[0] = "calc(100% - " + s + ")", a[1] = "0px"), (e === "rt" || e === "tr") && (a[0] = "0px", a[1] = "calc(100% - " + o + ")"), (e === "rb" || e === "br") && (a[0] = "calc(100% - " + s + ")", a[1] = "calc(100% - " + o + ")")) : e == "auto" ? (a[0] = "calc(50% - " + s + "/2)", a[1] = "calc(50% - " + o + "/2)") : (a[0] = e, a[1] = "calc(50% - " + o + "/2)") : e && e[0] !== void 0 && e[1] !== void 0 ? (a[0] = e[0], a[1] = e[1]) : (a[0] = "calc(50% - " + s + "/2)", a[1] = "calc(50% - " + o + "/2)"), a;
97
97
  }
98
- function bt(e) {
98
+ function $t(e) {
99
99
  return e === "dialog" || e == 0 ? 0 : e === "page" || e == 1 ? 1 : e === "iframe" || e == 2 ? 2 : e === "loading" || e == 3 ? 3 : e === "drawer" || e == 4 ? 4 : e === "photos" || e == 5 ? 5 : e === "notify" || e == 6 ? 6 : e === "prompt" || e == 7 ? 7 : 0;
100
100
  }
101
- function Be() {
101
+ function Fe() {
102
102
  return { w: "100%", h: "100%" };
103
103
  }
104
- function Oe() {
104
+ function Ee() {
105
105
  return { t: "0px", l: "0px" };
106
106
  }
107
- function Fe(e) {
107
+ function Ae(e) {
108
108
  var t, o;
109
109
  const n = (t = getComputedStyle(e, null)) == null ? void 0 : t.width, l = (o = getComputedStyle(e, null)) == null ? void 0 : o.height;
110
110
  return [n, l];
111
111
  }
112
112
  const Y = [];
113
- function q(e, n) {
113
+ function Z(e, n) {
114
114
  let l = 0;
115
115
  if (n) {
116
116
  const t = Y.findIndex((o) => o === void 0);
@@ -119,34 +119,34 @@ function q(e, n) {
119
119
  delete Y[Y.findIndex((t) => t == e)], l = -1;
120
120
  return l;
121
121
  }
122
- function Ee(e, n = !1) {
122
+ function He(e, n = !1) {
123
123
  const l = ["rl"], t = "zan-layer-drawer-anim zan-layer-anim";
124
124
  return e === "l" || e === "lt" || e === "lb" ? l[0] = "lr" : e === "r" || e === "rt" || e === "rb" ? l[0] = "rl" : e === "t" || e === "tr" || e === "tl" ? l[0] = "tb" : (e === "b" || e === "br" || e === "bl") && (l[0] = "bt"), n ? `${t}-${l[0]}-close` : `${t}-${l[0]}`;
125
125
  }
126
- async function He(e, n) {
126
+ async function Me(e, n) {
127
127
  const l = new Image();
128
- return l.src = e, new Promise((o, i) => {
128
+ return l.src = e, new Promise((o, s) => {
129
129
  if (l.complete) {
130
130
  o(t(l));
131
131
  return;
132
132
  }
133
- const u = I.load(2, { shadeOpacity: "0" });
133
+ const r = L.load(2, { shadeOpacity: "0" });
134
134
  l.onload = () => {
135
- I.close(u), o(t(l));
135
+ L.close(r), o(t(l));
136
136
  }, l.onerror = () => {
137
- I.close(u), I.msg("图片加载失败"), i(!1);
137
+ L.close(r), L.msg("图片加载失败"), s(!1);
138
138
  };
139
139
  });
140
140
  function t(o) {
141
- const i = [o.width, o.height], u = [window.innerWidth - 250, window.innerHeight - 250];
142
- if (i[0] > u[0] || i[1] > u[1]) {
143
- const a = [i[0] / u[0], i[1] / u[1]];
144
- a[0] > a[1] ? (i[0] = i[0] / a[0], i[1] = i[1] / a[0]) : a[0] < a[1] && (i[0] = i[0] / a[1], i[1] = i[1] / a[1]);
141
+ const s = [o.width, o.height], r = [window.innerWidth - 250, window.innerHeight - 250];
142
+ if (s[0] > r[0] || s[1] > r[1]) {
143
+ const a = [s[0] / r[0], s[1] / r[1]];
144
+ a[0] > a[1] ? (s[0] = s[0] / a[0], s[1] = s[1] / a[0]) : a[0] < a[1] && (s[0] = s[0] / a[1], s[1] = s[1] / a[1]);
145
145
  }
146
- return [i[0] + "px", i[1] + "px"];
146
+ return [s[0] + "px", s[1] + "px"];
147
147
  }
148
148
  }
149
- function ye(e, n) {
149
+ function je(e, n) {
150
150
  const l = document.getElementsByClassName(e);
151
151
  for (let t = 0; t < l.length; t++) {
152
152
  const o = l[t];
@@ -154,56 +154,82 @@ function ye(e, n) {
154
154
  return o;
155
155
  }
156
156
  }
157
- function zt(e, n, l) {
158
- const t = ["lt", "lb", "rt", "rb"];
159
- let o = "0", i = "0", a = 15;
160
- window.NotifiyQueen = window.NotifiyQueen || [];
161
- const r = window.NotifiyQueen;
162
- (typeof e != "string" || t.indexOf(e) === -1) && (e = "rt");
163
- const m = r.filter((s) => {
164
- if (s.offset === e)
165
- return s;
157
+ function ge() {
158
+ return window.NotifiyQueen = window.NotifiyQueen || [], window.NotifiyQueen;
159
+ }
160
+ function We(e) {
161
+ return typeof e != "string" || ["lt", "lb", "rt", "rb"].indexOf(e) === -1 ? "rt" : e;
162
+ }
163
+ function re() {
164
+ return 15;
165
+ }
166
+ function _e(e, n) {
167
+ const l = re(), t = parseFloat(n == null ? void 0 : n[0]) || 0;
168
+ return e === "rt" ? {
169
+ left: `calc(100% - ${t + l}px)`
170
+ } : e === "rb" ? {
171
+ left: `calc(100% - ${t + l}px)`
172
+ } : e === "lt" ? {
173
+ left: `${l}px`
174
+ } : {
175
+ left: `${l}px`
176
+ };
177
+ }
178
+ function Xe(e, n, l) {
179
+ const t = re();
180
+ return e === "rb" || e === "lb" ? `calc(100% - ${Math.max(t + n + l, l)}px)` : `${Math.max(t + n, t)}px`;
181
+ }
182
+ function xe(e) {
183
+ const n = We(e), l = ge().filter(
184
+ (o) => o.offset === n
185
+ );
186
+ if (l.length === 0)
187
+ return;
188
+ let t = 0;
189
+ l.forEach((o) => {
190
+ const s = je("zan-layer", o.id);
191
+ if (!s)
192
+ return;
193
+ const r = [`${s.offsetWidth}px`, `${s.offsetHeight}px`], a = _e(n, r);
194
+ s.style.top = Xe(
195
+ n,
196
+ t,
197
+ s.offsetHeight
198
+ ), s.style.left = a.left, t += s.offsetHeight + re();
166
199
  });
167
- let f = m.length > 0 ? m[m.length - 1] : null;
168
- if (f)
169
- if (f = ye("zan-layer", f.id), e === "rt" || e === "lt")
170
- a += f.offsetHeight + parseFloat(f.style.top);
171
- else {
172
- const s = parseFloat(f.style.top.split(" - ")[1]);
173
- a += f.offsetHeight + s;
174
- }
175
- else
176
- (e === "rb" || e === "lb") && (a += parseFloat(n[1]));
177
- return e === "rt" ? (o = a + "px", i = "calc(100% - " + (parseFloat(n[0]) + 15) + "px)") : e === "rb" ? (o = "calc(100% - " + a + "px)", i = "calc(100% - " + (parseFloat(n[0]) + 15) + "px)") : e === "lt" ? (o = a + "px", i = "15px") : e === "lb" && (o = "calc(100% - " + a + "px)", i = "15px"), r.push({
200
+ }
201
+ function Lt(e, n, l) {
202
+ const t = We(e), o = ge();
203
+ o.some((u) => u.id === l) || o.push({
178
204
  id: l,
179
- offset: e
180
- }), [o, i];
205
+ offset: t
206
+ });
207
+ const s = o.filter((u) => u.offset === t), r = _e(t, n);
208
+ let a = 0;
209
+ return s.slice(0, -1).forEach((u) => {
210
+ const m = je("zan-layer", u.id);
211
+ m && (a += m.offsetHeight + re());
212
+ }), [
213
+ Xe(
214
+ t,
215
+ a,
216
+ parseFloat(n == null ? void 0 : n[1]) || 0
217
+ ),
218
+ r.left
219
+ ];
181
220
  }
182
- function Ct(e) {
183
- const n = ye("zan-layer", e);
184
- if (!n) return;
185
- const l = 15, t = n.offsetHeight;
186
- window.NotifiyQueen = window.NotifiyQueen || [];
187
- const o = window.NotifiyQueen, i = o.findIndex((f) => f.id === e), u = o[i].offset, a = o.filter((f) => {
188
- if (f.offset === u)
189
- return f;
190
- }), r = a.findIndex((f) => f.id === e);
191
- a.slice(r + 1).forEach((f) => {
192
- const s = ye("zan-layer", f.id);
193
- if (u === "rt" || u === "lt")
194
- s.style.top = parseFloat(s.style.top) - l - t + "px";
195
- else {
196
- const p = parseFloat(s.style.top.split(" - ")[1]) - l - t;
197
- s.style.top = "calc(100% - " + p + "px)";
198
- }
199
- }), o.splice(i, 1);
221
+ function Bt(e) {
222
+ const n = ge(), l = n.findIndex((o) => o.id === e);
223
+ if (l === -1) return;
224
+ const t = n[l].offset;
225
+ n.splice(l, 1), xe(t);
200
226
  }
201
- function wt(e) {
227
+ function It(e) {
202
228
  const n = "zan-layer-drawer-anim zan-layer-anim";
203
229
  let l = "";
204
230
  return e === "lt" || e === "lb" ? l = "lr" : l = "rl", `${n}-${l}`;
205
231
  }
206
- const kt = /* @__PURE__ */ A({
232
+ const Ot = /* @__PURE__ */ H({
207
233
  name: "Header",
208
234
  __name: "Header",
209
235
  props: {
@@ -212,19 +238,19 @@ const kt = /* @__PURE__ */ A({
212
238
  move: { type: Boolean }
213
239
  },
214
240
  setup(e) {
215
- const n = e, l = $(() => [n.move ? "cursor: move" : "", n.titleStyle]);
216
- return (t, o) => (d(), v("div", {
241
+ const n = e, l = I(() => [n.move ? "cursor: move" : "", n.titleStyle]);
242
+ return (t, o) => (d(), f("div", {
217
243
  class: "zan-layer-title",
218
- style: N(l.value)
244
+ style: P(l.value)
219
245
  }, [
220
246
  ee(t.$slots, "default", {}, () => [
221
247
  te(ie, {
222
- render: () => z(ne)(e.title)
248
+ render: () => C(ne)(e.title)
223
249
  }, null, 8, ["render"])
224
250
  ])
225
251
  ], 4));
226
252
  }
227
- }), Lt = /* @__PURE__ */ A({
253
+ }), Ft = /* @__PURE__ */ H({
228
254
  name: "Footer",
229
255
  __name: "Footer",
230
256
  props: {
@@ -232,18 +258,18 @@ const kt = /* @__PURE__ */ A({
232
258
  footerStyle: { type: [String, Boolean, null, Object, Array] }
233
259
  },
234
260
  setup(e) {
235
- return (n, l) => (d(), v("div", {
261
+ return (n, l) => (d(), f("div", {
236
262
  class: "zan-layer-footer",
237
- style: N(e.footerStyle)
263
+ style: P(e.footerStyle)
238
264
  }, [
239
265
  ee(n.$slots, "default", {}, () => [
240
266
  te(ie, {
241
- render: () => z(ne)(e.footer)
267
+ render: () => C(ne)(e.footer)
242
268
  }, null, 8, ["render"])
243
269
  ])
244
270
  ], 4));
245
271
  }
246
- }), St = { class: "zan-layer-setwin" }, It = { class: "zan-tooltip" }, $t = { class: "zan-tooltip" }, Bt = /* @__PURE__ */ A({
272
+ }), Et = { class: "zan-layer-setwin" }, At = { class: "zan-tooltip" }, Ht = { class: "zan-tooltip" }, Mt = /* @__PURE__ */ H({
247
273
  name: "HeaderBtn",
248
274
  __name: "HeaderBtn",
249
275
  props: {
@@ -256,53 +282,53 @@ const kt = /* @__PURE__ */ A({
256
282
  setup(e, { emit: n }) {
257
283
  const l = e, t = n, o = () => {
258
284
  t("onMin");
259
- }, i = () => {
285
+ }, s = () => {
260
286
  t("onMax");
261
- }, u = () => {
287
+ }, r = () => {
262
288
  t("onClose");
263
289
  };
264
- return (a, r) => (d(), v("span", St, [
265
- l.maxmin && !l.max ? (d(), v("i", {
290
+ return (a, u) => (d(), f("span", Et, [
291
+ l.maxmin && !l.max ? (d(), f("i", {
266
292
  key: 0,
267
- class: P(["zan-icon-btn", l.min ? "zan-icon-full" : "zan-icon-min"]),
268
- onClick: de(o, ["stop"])
293
+ class: D(["zan-icon-btn", l.min ? "zan-icon-full" : "zan-icon-min"]),
294
+ onClick: fe(o, ["stop"])
269
295
  }, [
270
- B("span", It, T(l.min ? "还原" : "最小化"), 1)
296
+ O("span", At, T(l.min ? "还原" : "最小化"), 1)
271
297
  ], 2)) : h("", !0),
272
- l.maxmin && !l.min ? (d(), v("i", {
298
+ l.maxmin && !l.min ? (d(), f("i", {
273
299
  key: 1,
274
- class: P(["zan-icon-btn", l.max ? "zan-icon-restore" : "zan-icon-max"]),
275
- onClick: de(i, ["stop"])
300
+ class: D(["zan-icon-btn", l.max ? "zan-icon-restore" : "zan-icon-max"]),
301
+ onClick: fe(s, ["stop"])
276
302
  }, [
277
- B("span", $t, T(l.max ? "还原" : "最大化"), 1)
303
+ O("span", Ht, T(l.max ? "还原" : "最大化"), 1)
278
304
  ], 2)) : h("", !0),
279
- l.closeBtn ? (d(), v("i", {
305
+ l.closeBtn ? (d(), f("i", {
280
306
  key: 2,
281
- class: P(["zan-icon-btn zan-icon-close-btn", `zan-layer-close${e.closeBtn}`]),
282
- onClick: de(u, ["stop"])
283
- }, [...r[0] || (r[0] = [
284
- B("span", { class: "zan-tooltip" }, "关闭", -1)
307
+ class: D(["zan-icon-btn zan-icon-close-btn", `zan-layer-close${e.closeBtn}`]),
308
+ onClick: fe(r, ["stop"])
309
+ }, [...u[0] || (u[0] = [
310
+ O("span", { class: "zan-tooltip" }, "关闭", -1)
285
311
  ])], 2)) : h("", !0)
286
312
  ]));
287
313
  }
288
- }), Ot = (e, n) => {
314
+ }), Nt = (e, n) => {
289
315
  const l = e.__vccOpts || e;
290
316
  for (const [t, o] of n)
291
317
  l[t] = o;
292
318
  return l;
293
- }, Ft = /* @__PURE__ */ Ot(Bt, [["__scopeId", "data-v-a2b66c03"]]), Et = { class: "zan-layer-phimg" }, Ht = ["src"], At = {
319
+ }, Dt = /* @__PURE__ */ Nt(Mt, [["__scopeId", "data-v-a2b66c03"]]), Pt = { class: "zan-layer-phimg" }, Tt = ["src"], Vt = {
294
320
  key: 0,
295
321
  class: "zan-layer-imgsee"
296
- }, Mt = {
322
+ }, Rt = {
297
323
  key: 0,
298
324
  class: "zan-layer-imguide"
299
- }, Dt = {
325
+ }, jt = {
300
326
  key: 0,
301
327
  class: "thumb-row"
302
- }, Pt = ["onClick"], Nt = ["src"], Tt = {
328
+ }, Wt = ["onClick"], _t = ["src"], Xt = {
303
329
  key: 1,
304
330
  class: "zan-layer-imgtit"
305
- }, Vt = { key: 0 }, jt = { key: 1 }, Rt = /* @__PURE__ */ A({
331
+ }, Yt = { key: 0 }, qt = { key: 1 }, Gt = /* @__PURE__ */ H({
306
332
  name: "Photos",
307
333
  __name: "Photos",
308
334
  props: {
@@ -315,73 +341,73 @@ const kt = /* @__PURE__ */ A({
315
341
  J(o, () => {
316
342
  l("resetCalculationPohtosArea", o.value);
317
343
  });
318
- const i = (r) => {
319
- let f = o.value + r;
320
- f < 0 && (f = t.imgList.length - 1), f >= t.imgList.length && (f = 0), o.value = f;
321
- }, u = g(!1);
344
+ const s = (u) => {
345
+ let p = o.value + u;
346
+ p < 0 && (p = t.imgList.length - 1), p >= t.imgList.length && (p = 0), o.value = p;
347
+ }, r = g(!1);
322
348
  he(() => {
323
- D(() => {
349
+ N(() => {
324
350
  setTimeout(() => {
325
- u.value = !0;
351
+ r.value = !0;
326
352
  }, 400);
327
353
  });
328
354
  });
329
- const a = $(() => {
330
- let r = !1;
355
+ const a = I(() => {
356
+ let u = !1;
331
357
  return t.imgList.forEach((m) => {
332
- m.thumb && (r = !0);
333
- }), r;
358
+ m.thumb && (u = !0);
359
+ }), u;
334
360
  });
335
- return (r, m) => (d(), v("div", Et, [
336
- B("img", {
361
+ return (u, m) => (d(), f("div", Pt, [
362
+ O("img", {
337
363
  src: e.imgList[o.value].src
338
- }, null, 8, Ht),
339
- e.imgList.length > 0 ? (d(), v("div", At, [
340
- e.imgList.length > 1 ? (d(), v("span", Mt, [
341
- B("a", {
364
+ }, null, 8, Tt),
365
+ e.imgList.length > 0 ? (d(), f("div", Vt, [
366
+ e.imgList.length > 1 ? (d(), f("span", Rt, [
367
+ O("a", {
342
368
  href: "javascript:;",
343
369
  class: "zan-layer-iconext zan-layer-imgprev",
344
- onClick: m[0] || (m[0] = (f) => i(-1))
370
+ onClick: m[0] || (m[0] = (p) => s(-1))
345
371
  }, "‹"),
346
- B("a", {
372
+ O("a", {
347
373
  href: "javascript:;",
348
374
  class: "zan-layer-iconext zan-layer-imgnext",
349
- onClick: m[1] || (m[1] = (f) => i(1))
375
+ onClick: m[1] || (m[1] = (p) => s(1))
350
376
  }, "›")
351
377
  ])) : h("", !0),
352
- e.imgList.length > 1 || e.imgList[o.value].alt ? (d(), v("div", {
378
+ e.imgList.length > 1 || e.imgList[o.value].alt ? (d(), f("div", {
353
379
  key: 1,
354
380
  class: "zan-layer-imgbar",
355
- style: N({ opacity: u.value ? 1 : 0 })
381
+ style: P({ opacity: r.value ? 1 : 0 })
356
382
  }, [
357
- a.value ? (d(), v("div", Dt, [
358
- (d(!0), v(W, null, De(e.imgList, (f, s) => (d(), v("div", {
383
+ a.value ? (d(), f("div", jt, [
384
+ (d(!0), f(_, null, Pe(e.imgList, (p, i) => (d(), f("div", {
359
385
  class: "thumb-box",
360
- key: "thumb-box" + s,
361
- onClick: (p) => o.value = s
386
+ key: "thumb-box" + i,
387
+ onClick: (y) => o.value = i
362
388
  }, [
363
- B("img", {
364
- src: f.thumb
365
- }, null, 8, Nt)
366
- ], 8, Pt))), 128)),
367
- B("div", {
389
+ O("img", {
390
+ src: p.thumb
391
+ }, null, 8, _t)
392
+ ], 8, Wt))), 128)),
393
+ O("div", {
368
394
  class: "thumb-box-border",
369
- style: N({
395
+ style: P({
370
396
  left: `calc(calc( calc(100% - ${100 * e.imgList.length}px) / 2) + ${o.value * 100}px)`
371
397
  })
372
398
  }, null, 4)
373
- ])) : (d(), v("span", Tt, [
374
- e.imgList[o.value].alt ? (d(), v("span", Vt, T(e.imgList[o.value].alt), 1)) : h("", !0),
375
- e.imgList.length > 1 ? (d(), v("em", jt, T(o.value + 1) + " / " + T(e.imgList.length), 1)) : h("", !0)
399
+ ])) : (d(), f("span", Xt, [
400
+ e.imgList[o.value].alt ? (d(), f("span", Yt, T(e.imgList[o.value].alt), 1)) : h("", !0),
401
+ e.imgList.length > 1 ? (d(), f("em", qt, T(o.value + 1) + " / " + T(e.imgList.length), 1)) : h("", !0)
376
402
  ]))
377
403
  ], 4)) : h("", !0)
378
404
  ])) : h("", !0)
379
405
  ]));
380
406
  }
381
- }), _t = { class: "title" }, Wt = {
407
+ }), Qt = { class: "title" }, Zt = {
382
408
  key: 0,
383
409
  class: "content"
384
- }, Xt = ["innerHTML"], Yt = /* @__PURE__ */ A({
410
+ }, Ut = ["innerHTML"], Kt = /* @__PURE__ */ H({
385
411
  name: "Notifiy",
386
412
  __name: "Notifiy",
387
413
  props: {
@@ -389,58 +415,70 @@ const kt = /* @__PURE__ */ A({
389
415
  content: {},
390
416
  isHtmlFragment: { type: Boolean, default: !1 },
391
417
  icon: {},
392
- iconClass: {}
418
+ iconClass: {},
419
+ offset: {}
393
420
  },
394
421
  emits: ["close"],
395
422
  setup(e, { emit: n }) {
396
- const l = e, t = n, o = rt(null), i = () => {
423
+ const l = e, t = n, o = yt(null);
424
+ let s, r = 0;
425
+ const a = () => {
397
426
  t("close");
398
427
  };
399
- function u(a, r) {
400
- let m = a.className, f = m != "" ? " " : "", s = m + f + r;
401
- a.className = s;
428
+ function u(p, i) {
429
+ let y = p.className, x = y != "" ? " " : "", B = y + x + i;
430
+ p.className = B;
402
431
  }
432
+ const m = () => {
433
+ r && cancelAnimationFrame(r), r = requestAnimationFrame(() => {
434
+ r = 0, xe(l.offset);
435
+ });
436
+ };
403
437
  return he(() => {
404
- D(() => {
438
+ N(() => {
405
439
  setTimeout(() => {
406
- var a, r, m, f;
407
- (r = (a = o.value) == null ? void 0 : a.parentElement) != null && r.parentElement && u(
408
- (f = (m = o.value) == null ? void 0 : m.parentElement) == null ? void 0 : f.parentElement,
440
+ var p, i, y, x;
441
+ (i = (p = o.value) == null ? void 0 : p.parentElement) != null && i.parentElement && (u(
442
+ (x = (y = o.value) == null ? void 0 : y.parentElement) == null ? void 0 : x.parentElement,
409
443
  "zan-layer-notifiy-transition"
410
- );
444
+ ), m(), o.value && !s && (s = new ResizeObserver(() => {
445
+ m();
446
+ }), s.observe(o.value)));
411
447
  }, 300);
412
448
  });
413
- }), (a, r) => (d(), v("div", {
449
+ }), Te(() => {
450
+ r && (cancelAnimationFrame(r), r = 0), s && (s.disconnect(), s = void 0);
451
+ }), (p, i) => (d(), f("div", {
414
452
  class: "zan-layer-notifiy-wrapper",
415
453
  ref_key: "notifyRef",
416
454
  ref: o
417
455
  }, [
418
- B("h2", _t, [
419
- e.icon ? (d(), v("i", {
456
+ O("h2", Qt, [
457
+ e.icon ? (d(), f("i", {
420
458
  key: 0,
421
- class: P(e.iconClass)
459
+ class: D(e.iconClass)
422
460
  }, null, 2)) : h("", !0),
423
- B("span", null, T(e.title), 1)
461
+ O("span", null, T(e.title), 1)
424
462
  ]),
425
- !e.isHtmlFragment && e.content ? (d(), v("div", Wt, [
463
+ !e.isHtmlFragment && e.content ? (d(), f("div", Zt, [
426
464
  te(ie, {
427
- render: () => z(ne)(l.content)
465
+ render: () => C(ne)(l.content)
428
466
  }, null, 8, ["render"])
429
- ])) : e.isHtmlFragment && e.content ? (d(), v("div", {
467
+ ])) : e.isHtmlFragment && e.content ? (d(), f("div", {
430
468
  key: 1,
431
469
  class: "content",
432
470
  innerHTML: e.content
433
- }, null, 8, Xt)) : h("", !0),
434
- B("i", {
471
+ }, null, 8, Ut)) : h("", !0),
472
+ O("i", {
435
473
  class: "zan-icon-close",
436
- onClick: i
437
- }, [...r[0] || (r[0] = [
438
- B("svg", {
474
+ onClick: a
475
+ }, [...i[0] || (i[0] = [
476
+ O("svg", {
439
477
  viewBox: "0 0 1024 1024",
440
478
  width: "16",
441
479
  height: "16"
442
480
  }, [
443
- B("path", {
481
+ O("path", {
444
482
  d: "M810.666667 273.493333L750.506667 213.333333 512 451.84 273.493333 213.333333 213.333333 273.493333 451.84 512 213.333333 750.506667 273.493333 810.666667 512 572.16 750.506667 810.666667 810.666667 750.506667 572.16 512z",
445
483
  fill: "currentColor"
446
484
  })
@@ -448,7 +486,7 @@ const kt = /* @__PURE__ */ A({
448
486
  ])])
449
487
  ], 512));
450
488
  }
451
- }), Qt = ["maxlength", "placeholder"], Gt = ["type", "placeholder"], Zt = /* @__PURE__ */ A({
489
+ }), Jt = ["maxlength", "placeholder"], en = ["type", "placeholder"], tn = /* @__PURE__ */ H({
452
490
  name: "Prompt",
453
491
  __name: "Prompt",
454
492
  props: {
@@ -459,7 +497,7 @@ const kt = /* @__PURE__ */ A({
459
497
  },
460
498
  emits: ["update:promptValue"],
461
499
  setup(e, { emit: n }) {
462
- const l = e, t = g(l.promptValue), o = $(() => {
500
+ const l = e, t = g(l.promptValue), o = I(() => {
463
501
  switch (typeof l.formType) {
464
502
  case "string":
465
503
  return l.formType === "textarea";
@@ -468,31 +506,31 @@ const kt = /* @__PURE__ */ A({
468
506
  default:
469
507
  return !1;
470
508
  }
471
- }), i = $(
509
+ }), s = I(
472
510
  () => l.formType == 1 || l.formType == "password"
473
511
  );
474
- return (u, a) => o.value ? Se((d(), v("textarea", {
512
+ return (r, a) => o.value ? Be((d(), f("textarea", {
475
513
  key: 0,
476
- onInput: a[0] || (a[0] = (r) => u.$emit("update:promptValue", t.value)),
477
- "onUpdate:modelValue": a[1] || (a[1] = (r) => t.value = r),
514
+ onInput: a[0] || (a[0] = (u) => r.$emit("update:promptValue", t.value)),
515
+ "onUpdate:modelValue": a[1] || (a[1] = (u) => t.value = u),
478
516
  maxlength: l.maxLength,
479
517
  placeholder: l.placeholder,
480
518
  class: "zan-textarea"
481
- }, null, 40, Qt)), [
482
- [ut, t.value]
483
- ]) : Se((d(), v("input", {
519
+ }, null, 40, Jt)), [
520
+ [pt, t.value]
521
+ ]) : Be((d(), f("input", {
484
522
  key: 1,
485
- onInput: a[2] || (a[2] = (r) => u.$emit("update:promptValue", t.value)),
486
- "onUpdate:modelValue": a[3] || (a[3] = (r) => t.value = r),
487
- type: i.value ? "password" : "text",
523
+ onInput: a[2] || (a[2] = (u) => r.$emit("update:promptValue", t.value)),
524
+ "onUpdate:modelValue": a[3] || (a[3] = (u) => t.value = u),
525
+ type: s.value ? "password" : "text",
488
526
  placeholder: l.placeholder,
489
527
  class: "zan-input"
490
- }, null, 40, Gt)), [
491
- [ct, t.value]
528
+ }, null, 40, en)), [
529
+ [ht, t.value]
492
530
  ]);
493
531
  }
494
532
  });
495
- function qt(e) {
533
+ function nn(e) {
496
534
  for (; e && e.parentNode; )
497
535
  if (e = e.parentNode, e && getComputedStyle(e).position === "relative")
498
536
  return e;
@@ -502,77 +540,77 @@ const se = (e) => {
502
540
  document.querySelectorAll(".zan-layer iframe").forEach((l) => {
503
541
  l.style.pointerEvents = e;
504
542
  });
505
- }, Ut = function(e, n, l, t, o) {
506
- let i, u, a = 0, r = 0, m = !0;
507
- const f = (s) => {
508
- const p = s.target;
509
- return !p || p.closest("button, input, textarea, select, a") ? !1 : (s.composedPath && s.composedPath() || s.path || []).some((O) => O instanceof HTMLElement && O.classList.contains("zan-layer-title"));
543
+ }, ln = function(e, n, l, t, o) {
544
+ let s, r, a = 0, u = 0, m = !0;
545
+ const p = (i) => {
546
+ const y = i.target;
547
+ return !y || y.closest("button, input, textarea, select, a") ? !1 : (i.composedPath && i.composedPath() || i.path || []).some((B) => B instanceof HTMLElement && B.classList.contains("zan-layer-title"));
510
548
  };
511
- e != null && e.addEventListener("mousedown", function(s) {
512
- if (f(s) && s.button == 0 && e != null) {
549
+ e != null && e.addEventListener("mousedown", function(i) {
550
+ if (p(i) && i.button == 0 && e != null) {
513
551
  se("none");
514
- const p = getComputedStyle(e);
515
- i = s.pageX - e.offsetLeft + parseInt(p["margin-left"]), u = s.pageY - e.offsetTop + parseInt(p["margin-right"]), a = s.clientX, r = s.clientY, document.body.style.userSelect = "none", document.body.style.cursor = "move";
516
- const L = function(S) {
552
+ const y = getComputedStyle(e);
553
+ s = i.pageX - e.offsetLeft + parseInt(y["margin-left"]), r = i.pageY - e.offsetTop + parseInt(y["margin-right"]), a = i.clientX, u = i.clientY, document.body.style.userSelect = "none", document.body.style.cursor = "move";
554
+ const x = function($) {
517
555
  if (e != null) {
518
- (S.clientX - a != 0 || S.clientY - r != 0) && m && (m = !1, o());
519
- let x = S.pageX - i, b = S.pageY - u;
520
- const w = document.documentElement.clientWidth, k = document.documentElement.clientHeight;
556
+ ($.clientX - a != 0 || $.clientY - u != 0) && m && (m = !1, o());
557
+ let b = $.pageX - s, z = $.pageY - r;
558
+ const w = document.documentElement.clientWidth, S = document.documentElement.clientHeight;
521
559
  if (!n) {
522
- let F = w - e.offsetWidth, E = k - e.offsetHeight;
560
+ let F = w - e.offsetWidth, E = S - e.offsetHeight;
523
561
  if (e.style.position === "absolute") {
524
- const H = qt(e);
525
- H != null && (F = H.clientWidth - e.offsetWidth, E = H.clientHeight - e.offsetHeight);
562
+ const A = nn(e);
563
+ A != null && (F = A.clientWidth - e.offsetWidth, E = A.clientHeight - e.offsetHeight);
526
564
  }
527
- x < 0 ? x = 0 : x > F && (x = F), b < 0 ? b = 0 : b > E && (b = E);
565
+ b < 0 ? b = 0 : b > F && (b = F), z < 0 ? z = 0 : z > E && (z = E);
528
566
  }
529
- e.style.top = b + "px", e.style.left = x + "px", l(e.style.left, e.style.top);
567
+ e.style.top = z + "px", e.style.left = b + "px", l(e.style.left, e.style.top);
530
568
  }
531
569
  return !1;
532
- }, O = function() {
533
- m = !0, document.body.style.userSelect = "", document.body.style.cursor = "", t(), se("auto"), document.removeEventListener("mousemove", L), document.removeEventListener("mouseup", O);
570
+ }, B = function() {
571
+ m = !0, document.body.style.userSelect = "", document.body.style.cursor = "", t(), se("auto"), document.removeEventListener("mousemove", x), document.removeEventListener("mouseup", B);
534
572
  };
535
- document.addEventListener("mousemove", L, { passive: !1 }), document.addEventListener("mouseup", O);
573
+ document.addEventListener("mousemove", x, { passive: !1 }), document.addEventListener("mouseup", B);
536
574
  }
537
575
  return !1;
538
576
  });
539
- }, Kt = function(e, n, l, t) {
540
- let o = 0, i = 0, u = !0;
577
+ }, an = function(e, n, l, t) {
578
+ let o = 0, s = 0, r = !0;
541
579
  e != null && e.addEventListener("mousedown", function(a) {
542
580
  if ((a.composedPath && a.composedPath() || a.path)[0].className === "zan-layer-resize" && a.button == 0 && e != null) {
543
581
  se("none");
544
- const m = e.getBoundingClientRect(), f = m.left, s = m.top;
545
- o = a.clientX, i = a.clientY, document.body.style.userSelect = "none", document.body.style.cursor = "se-resize";
546
- const p = function(O) {
547
- var S;
548
- if (window.getSelection != null && ((S = window.getSelection()) == null || S.removeAllRanges()), e != null) {
549
- const x = O.clientX, b = O.clientY;
550
- (x - o != 0 || b - i != 0) && u && (u = !1, t());
551
- let w = x - f, k = b - s;
552
- w < 260 && (w = 260), k < 115 && (k = 115), e.style.width = w + "px", e.style.height = k + "px", n(e.style.width, e.style.height);
582
+ const m = e.getBoundingClientRect(), p = m.left, i = m.top;
583
+ o = a.clientX, s = a.clientY, document.body.style.userSelect = "none", document.body.style.cursor = "se-resize";
584
+ const y = function(B) {
585
+ var $;
586
+ if (window.getSelection != null && (($ = window.getSelection()) == null || $.removeAllRanges()), e != null) {
587
+ const b = B.clientX, z = B.clientY;
588
+ (b - o != 0 || z - s != 0) && r && (r = !1, t());
589
+ let w = b - p, S = z - i;
590
+ w < 260 && (w = 260), S < 115 && (S = 115), e.style.width = w + "px", e.style.height = S + "px", n(e.style.width, e.style.height);
553
591
  }
554
592
  return !1;
555
593
  };
556
- document.addEventListener("mousemove", p, { passive: !1 });
557
- const L = function() {
558
- u = !0, document.body.style.userSelect = "", document.body.style.cursor = "", l(), se("auto"), document.removeEventListener("mousemove", p), document.removeEventListener("mouseup", L);
594
+ document.addEventListener("mousemove", y, { passive: !1 });
595
+ const x = function() {
596
+ r = !0, document.body.style.userSelect = "", document.body.style.cursor = "", l(), se("auto"), document.removeEventListener("mousemove", y), document.removeEventListener("mouseup", x);
559
597
  };
560
- document.addEventListener("mouseup", L);
598
+ document.addEventListener("mouseup", x);
561
599
  }
562
600
  return !1;
563
601
  });
564
- }, Jt = Symbol("zIndex");
565
- let en = 99999;
566
- function Ae() {
567
- return ++en;
602
+ }, on = Symbol("zIndex");
603
+ let sn = 99999;
604
+ function Ne() {
605
+ return ++sn;
568
606
  }
569
- const tn = ["id"], nn = {
607
+ const rn = ["id"], un = {
570
608
  key: 1,
571
609
  class: "slot-fragment"
572
- }, ln = ["innerHTML"], an = ["onClick"], on = {
610
+ }, cn = ["innerHTML"], dn = ["onClick"], fn = {
573
611
  key: 2,
574
612
  class: "zan-layer-resize"
575
- }, pe = /* @__PURE__ */ A({
613
+ }, pe = /* @__PURE__ */ H({
576
614
  name: "ZanLayer",
577
615
  __name: "ZanLayer",
578
616
  props: {
@@ -650,344 +688,345 @@ const tn = ["id"], nn = {
650
688
  },
651
689
  emits: ["close", "update:modelValue", "opened"],
652
690
  setup(e, { expose: n, emit: l }) {
653
- const t = e, o = l, i = dt(), u = g(!1), a = g(!1), r = g(t.id || Pe()), m = g(null), f = g(), s = bt(t.type), p = g(
654
- gt(t.type, t.area, t.offset)
655
- ), L = g(
656
- me(t.offset, p.value, s)
657
- ), O = g(99999), S = g(!1), x = g(p.value[0]), b = g(p.value[1]), w = g(L.value[0]), k = g(L.value[1]), F = g(""), E = g(""), H = g(""), j = g(""), le = g(!1), Q = g(t.value);
691
+ const t = e, o = l, s = gt(), r = g(!1), a = g(!1), u = g(t.id || Ve()), m = g(null), p = g(), i = $t(t.type), y = g(
692
+ wt(t.type, t.area, t.offset)
693
+ ), x = g(
694
+ ve(t.offset, y.value, i)
695
+ ), B = g(99999), $ = g(!1), b = g(y.value[0]), z = g(y.value[1]), w = g(x.value[0]), S = g(x.value[1]), F = g(""), E = g(""), A = g(""), R = g(""), le = g(!1), q = g(t.value);
658
696
  J(
659
697
  () => t.value,
660
698
  () => {
661
- Q.value = t.value;
699
+ q.value = t.value;
662
700
  }
663
701
  );
664
- const ge = () => {
665
- O.value = t.zIndex ?? Ae();
702
+ const be = () => {
703
+ B.value = t.zIndex ?? Ne();
666
704
  };
667
705
  J(
668
706
  () => t.zIndex,
669
707
  () => {
670
- ge();
708
+ be();
671
709
  },
672
710
  { immediate: !0 }
673
711
  );
674
- const xe = function() {
675
- D(async () => {
676
- s == 4 && (p.value = Ne(t.offset, t.area)), s == 5 && (p.value = await He(
712
+ const ze = function() {
713
+ N(async () => {
714
+ i == 4 && (y.value = Re(t.offset, t.area)), i == 5 && (y.value = await Me(
677
715
  t.imgList[t.startIndex].src
678
716
  ));
679
- let c = p.value;
680
- (c[0] == null || c[1] == null) && (c = Fe(m.value)), s == 6 && (L.value = zt(t.offset, c, r.value)), oe(), Le(), je();
717
+ let c = y.value;
718
+ (c[0] == null || c[1] == null) && (c = Ae(m.value)), i == 6 && (x.value = Lt(t.offset, c, u.value)), oe(), Le(), Ge();
681
719
  });
682
- }, Te = function() {
683
- a.value && we(), u.value && ze(), F.value = "", E.value = "", H.value = "", j.value = "";
684
- }, be = () => {
685
- H.value = w.value, j.value = k.value, F.value = x.value, E.value = b.value, x.value = Be().w, b.value = Be().h, w.value = Oe().t, k.value = Oe().l;
686
- }, ze = () => {
687
- u.value ? (G(), x.value = F.value, b.value = E.value, t.revert(r.value)) : (X(), be(), t.full(r.value)), u.value = !u.value;
720
+ }, Ye = function() {
721
+ a.value && Se(), r.value && ke(), F.value = "", E.value = "", A.value = "", R.value = "";
688
722
  }, Ce = () => {
689
- let ce = 10 + 190 * q(r.value, !0);
690
- const it = document.documentElement.clientWidth;
691
- ce + 180 > it && (ce = 10), F.value = x.value, E.value = b.value, H.value = w.value, j.value = k.value, b.value = "51px", x.value = "180px", w.value = "calc(100% - 51px)", k.value = ce + "px";
692
- }, we = async () => {
693
- a.value ? (G(), q(r.value, !1), x.value = F.value, b.value = E.value, t.revert(r.value)) : (X(), Ce(), t.min(r.value)), a.value = !a.value;
723
+ A.value = w.value, R.value = S.value, F.value = b.value, E.value = z.value, b.value = Fe().w, z.value = Fe().h, w.value = Ee().t, S.value = Ee().l;
724
+ }, ke = () => {
725
+ r.value ? (G(), b.value = F.value, z.value = E.value, t.revert(u.value)) : (X(), Ce(), t.full(u.value)), r.value = !r.value;
726
+ }, we = () => {
727
+ let de = 10 + 190 * Z(u.value, !0);
728
+ const vt = document.documentElement.clientWidth;
729
+ de + 180 > vt && (de = 10), F.value = b.value, E.value = z.value, A.value = w.value, R.value = S.value, z.value = "51px", b.value = "180px", w.value = "calc(100% - 51px)", S.value = de + "px";
730
+ }, Se = async () => {
731
+ a.value ? (G(), Z(u.value, !1), b.value = F.value, z.value = E.value, t.revert(u.value)) : (X(), we(), t.min(u.value)), a.value = !a.value;
694
732
  };
695
733
  J(
696
734
  () => t.modelValue,
697
735
  (c) => {
698
- S.value !== c && (S.value = c);
736
+ $.value !== c && ($.value = c);
699
737
  },
700
738
  { immediate: !0 }
701
739
  ), J(
702
- () => S.value,
703
- (c, y) => {
704
- if (c !== y && !(!c && y === void 0)) {
740
+ () => $.value,
741
+ (c, v) => {
742
+ if (c !== v && !(!c && v === void 0)) {
705
743
  if (c) {
706
- le.value = !1, xe(), ge(), G(), t.isFunction && xe(), D(() => {
707
- t.success(r.value);
744
+ le.value = !1, ze(), be(), G(), t.isFunction && ze(), N(() => {
745
+ t.success(u.value);
708
746
  });
709
747
  return;
710
748
  }
711
- X(), Te(), y !== void 0 && t.end(r.value);
749
+ X(), Ye(), v !== void 0 && t.end(u.value);
712
750
  }
713
751
  },
714
752
  { immediate: !0, flush: "post" }
715
753
  );
716
- const Ve = $(() => [
754
+ const qe = I(() => [
717
755
  {
718
- "zan-layer-dialog": s === 0 || s === 7,
719
- "zan-layer-page": s === 1,
720
- "zan-layer-iframe": s === 2,
721
- "zan-layer-loading": s === 3,
722
- "zan-layer-drawer": s === 4,
723
- "zan-layer-photos": s === 5,
724
- "zan-layer-notifiy": s === 6,
756
+ "zan-layer-dialog": i === 0 || i === 7,
757
+ "zan-layer-page": i === 1,
758
+ "zan-layer-iframe": i === 2,
759
+ "zan-layer-loading": i === 3,
760
+ "zan-layer-drawer": i === 4,
761
+ "zan-layer-photos": i === 5,
762
+ "zan-layer-notifiy": i === 6,
725
763
  "zan-layer-msg": t.isMessage,
726
764
  "zan-layer-hui": t.isMessage && !t.icon
727
765
  },
728
766
  t.layerClasses
729
- ]), je = function() {
730
- t.move && s != 4 && D(() => {
731
- m.value && (Ut(
767
+ ]), Ge = function() {
768
+ t.move && i != 4 && N(() => {
769
+ m.value && (ln(
732
770
  m.value,
733
771
  t.moveOut,
734
- (c, y) => {
735
- k.value = c, w.value = y, le.value = !0, a.value || (j.value = c, H.value = y), t.moving(r.value, { top: y, left: c });
772
+ (c, v) => {
773
+ S.value = c, w.value = v, le.value = !0, a.value || (R.value = c, A.value = v), t.moving(u.value, { top: v, left: c });
736
774
  },
737
775
  () => {
738
776
  const c = {
739
- left: k.value,
777
+ left: S.value,
740
778
  top: w.value,
741
779
  isMin: a.value,
742
- isMax: u.value
743
- }, [y, C] = t.moveEnd(r.value, c) || [];
744
- C && y && (k.value = y, w.value = C);
780
+ isMax: r.value
781
+ }, [v, k] = t.moveEnd(u.value, c) || [];
782
+ k && v && (S.value = v, w.value = k);
745
783
  },
746
784
  () => {
747
- t.moveStart(r.value);
785
+ t.moveStart(u.value);
748
786
  }
749
- ), Kt(
787
+ ), an(
750
788
  m.value,
751
- (c, y) => {
752
- b.value = y, x.value = c, E.value = y, F.value = c, t.resizing(r.value, { width: c, height: y });
789
+ (c, v) => {
790
+ z.value = v, b.value = c, E.value = v, F.value = c, t.resizing(u.value, { width: c, height: v });
753
791
  },
754
792
  () => {
755
793
  const c = {
756
- width: x.value,
757
- height: b.value
758
- }, [y, C] = t.resizeEnd(r.value, c) || [];
759
- y && C && (x.value = y, b.value = C);
794
+ width: b.value,
795
+ height: z.value
796
+ }, [v, k] = t.resizeEnd(u.value, c) || [];
797
+ v && k && (b.value = v, z.value = k);
760
798
  },
761
799
  () => {
762
- t.resizeStart(r.value);
800
+ t.resizeStart(u.value);
763
801
  }
764
802
  ));
765
803
  });
766
- }, Re = $(() => ({
804
+ }, Qe = I(() => ({
767
805
  position: t.teleportDisabled || t.teleport != "body" ? "absolute" : "fixed",
768
806
  top: w.value,
769
- left: k.value,
770
- height: b.value,
771
- width: x.value,
807
+ left: S.value,
808
+ height: z.value,
809
+ width: b.value,
772
810
  animationDuration: t.animDuration,
773
- zIndex: O.value
774
- })), _e = $(() => [
775
- s === 3 ? `zan-layer-loading${t.load}` : "",
811
+ zIndex: B.value
812
+ })), Ze = I(() => [
813
+ i === 3 ? `zan-layer-loading${t.load}` : "",
776
814
  t.icon ? "zan-layer-padding" : "",
777
815
  t.contentClass
778
816
  ]), ae = () => {
779
817
  if (typeof t.beforeClose == "function") {
780
- const c = t.beforeClose(r.value);
781
- (c === void 0 || c != null && c === !0) && (t.close(r.value), o("close"), o("update:modelValue", !1), t.internalDestroy && t.internalDestroy(), a.value && q(r.value, !a.value));
818
+ const c = t.beforeClose(u.value);
819
+ (c === void 0 || c != null && c === !0) && (t.close(u.value), o("close"), o("update:modelValue", !1), t.internalDestroy && t.internalDestroy(), a.value && Z(u.value, !a.value));
782
820
  }
783
- }, We = (...c) => {
821
+ }, Ue = (...c) => {
784
822
  typeof t.yes == "function" ? t.yes(...c) : ae();
785
- }, Xe = () => {
823
+ }, Ke = () => {
786
824
  t.shadeClose && ae();
787
- }, ke = $(() => ["zan-icon", `zan-icon-ico${t.icon}`]), Ye = $(() => s === 4 ? Ee(t.offset) : s === 6 ? wt(t.offset) : `zan-layer-anim-0${t.anim}`), Qe = $(() => s === 4 ? Ee(t.offset, !0) : t.isOutAnim ? "zan-layer-anim-close" : ""), Ge = () => {
788
- S.value = !0;
789
- }, Ze = () => {
790
- S.value = !1, s === 6 && Ct(r.value);
791
- }, qe = $(() => S.value && t.shade && !a.value), Ue = $(() => t.resize && !u.value && !a.value), Ke = $(() => t.title && s != 3 && s != 5 && s != 6), Je = function(c) {
792
- D(async () => {
793
- p.value = await He(t.imgList[c].src), L.value = me(t.offset, p.value, s), x.value = p.value[0], b.value = p.value[1], w.value = L.value[0], k.value = L.value[1], F.value = p.value[0], E.value = p.value[1];
825
+ }, $e = I(() => ["zan-icon", `zan-icon-ico${t.icon}`]), Je = I(() => i === 4 ? He(t.offset) : i === 6 ? It(t.offset) : `zan-layer-anim-0${t.anim}`), et = I(() => i === 4 ? He(t.offset, !0) : t.isOutAnim ? "zan-layer-anim-close" : ""), tt = () => {
826
+ $.value = !0;
827
+ }, nt = () => {
828
+ $.value = !1, i === 6 && Bt(u.value);
829
+ }, lt = I(() => $.value && t.shade && !a.value), at = I(() => t.resize && !r.value && !a.value), ot = I(() => t.title && i != 3 && i != 5 && i != 6), st = function(c) {
830
+ N(async () => {
831
+ y.value = await Me(t.imgList[c].src), x.value = ve(t.offset, y.value, i), b.value = y.value[0], z.value = y.value[1], w.value = x.value[0], S.value = x.value[1], F.value = y.value[0], E.value = y.value[1];
794
832
  });
795
- }, et = function() {
796
- t.zIndex || (O.value = Ae());
797
- }, tt = (c, y) => ((c == null ? void 0 : c[0]) || "") === ((y == null ? void 0 : y[0]) || "") && ((c == null ? void 0 : c[1]) || "") === ((y == null ? void 0 : y[1]) || ""), nt = () => {
798
- o("opened");
833
+ }, it = function() {
834
+ t.zIndex || (B.value = Ne());
835
+ }, rt = (c, v) => ((c == null ? void 0 : c[0]) || "") === ((v == null ? void 0 : v[0]) || "") && ((c == null ? void 0 : c[1]) || "") === ((v == null ? void 0 : v[1]) || ""), ut = () => {
836
+ i === 6 && xe(t.offset), o("opened");
799
837
  };
800
838
  he(() => {
801
- }), ft(() => {
839
+ }), Te(() => {
802
840
  X();
803
841
  });
804
- let R, _ = 0;
842
+ let j, W = 0;
805
843
  const G = function() {
806
- D(() => {
807
- !S.value || !f.value || R || s == 6 || f.value && !R && s != 6 && (R = new ResizeObserver(() => {
808
- m.value && (_ && cancelAnimationFrame(_), _ = requestAnimationFrame(() => {
809
- if (_ = 0, !m.value)
844
+ N(() => {
845
+ !$.value || !p.value || j || i == 6 || p.value && !j && i != 6 && (j = new ResizeObserver(() => {
846
+ m.value && (W && cancelAnimationFrame(W), W = requestAnimationFrame(() => {
847
+ if (W = 0, !m.value)
810
848
  return;
811
- const c = me(
849
+ const c = ve(
812
850
  t.offset,
813
- Fe(m.value),
814
- s
851
+ Ae(m.value),
852
+ i
815
853
  );
816
- if (tt(L.value, c) || (L.value = c), le.value && t.lastPosition)
854
+ if (rt(x.value, c) || (x.value = c), le.value && t.lastPosition)
817
855
  return;
818
- const y = t.lastPosition && H.value || c[0], C = t.lastPosition && j.value || c[1];
819
- w.value !== y && (w.value = y), k.value !== C && (k.value = C);
856
+ const v = t.lastPosition && A.value || c[0], k = t.lastPosition && R.value || c[1];
857
+ w.value !== v && (w.value = v), S.value !== k && (S.value = k);
820
858
  }));
821
- }), R.observe(f.value));
859
+ }), j.observe(p.value));
822
860
  });
823
861
  }, X = function() {
824
- _ && (cancelAnimationFrame(_), _ = 0), R && (R.disconnect(), R = void 0);
862
+ W && (cancelAnimationFrame(W), W = 0), j && (j.disconnect(), j = void 0);
825
863
  }, oe = function(c = !1) {
826
- w.value = c && t.lastPosition && H.value || L.value[0], k.value = c && t.lastPosition && j.value || L.value[1];
864
+ w.value = c && t.lastPosition && A.value || x.value[0], S.value = c && t.lastPosition && R.value || x.value[1];
827
865
  }, Le = function() {
828
- x.value = p.value[0], b.value = p.value[1], F.value = p.value[0], E.value = p.value[1];
829
- }, lt = function() {
830
- G(), q(r.value, !1), a.value = !1, u.value = !1, le.value = !1, H.value = "", j.value = "", oe(), Le(), t.modelValue || o("update:modelValue", !0);
831
- }, at = async function() {
832
- a.value && (re(), oe(!0)), u.value || (await D(), X(), be(), u.value = !0);
833
- }, ot = async function() {
834
- u.value && (re(), oe(!0)), a.value || (await D(), X(), Ce(), a.value = !0);
835
- }, re = () => {
836
- G(), q(r.value, !1), a.value = !1, u.value = !1, x.value = F.value, b.value = E.value;
866
+ b.value = y.value[0], z.value = y.value[1], F.value = y.value[0], E.value = y.value[1];
867
+ }, ct = function() {
868
+ G(), Z(u.value, !1), a.value = !1, r.value = !1, le.value = !1, A.value = "", R.value = "", oe(), Le(), t.modelValue || o("update:modelValue", !0);
869
+ }, dt = async function() {
870
+ a.value && (ue(), oe(!0)), r.value || (await N(), X(), Ce(), r.value = !0);
871
+ }, ft = async function() {
872
+ r.value && (ue(), oe(!0)), a.value || (await N(), X(), we(), a.value = !0);
873
+ }, ue = () => {
874
+ G(), Z(u.value, !1), a.value = !1, r.value = !1, b.value = F.value, z.value = E.value;
837
875
  };
838
- return n({ reset: lt, open: Ge, close: Ze, full: at, min: ot, revert: re }), (c, y) => (d(), M(mt, {
876
+ return n({ reset: ct, open: tt, close: nt, full: dt, min: ft, revert: ue }), (c, v) => (d(), M(xt, {
839
877
  to: e.teleport,
840
878
  disabled: e.teleportDisabled
841
879
  }, [
842
- te(yt, {
843
- index: O.value,
880
+ te(zt, {
881
+ index: B.value,
844
882
  "shade-style": e.shadeStyle,
845
- visible: qe.value,
883
+ visible: lt.value,
846
884
  opacity: e.shadeOpacity,
847
885
  teleport: e.teleport,
848
886
  teleportDisabled: e.teleportDisabled,
849
- onShadeClick: Xe
887
+ onShadeClick: Ke
850
888
  }, null, 8, ["index", "shade-style", "visible", "opacity", "teleport", "teleportDisabled"]),
851
- te(vt, {
852
- "enter-active-class": Ye.value,
853
- "leave-active-class": Qe.value,
854
- onAfterEnter: nt
889
+ te(bt, {
890
+ "enter-active-class": Je.value,
891
+ "leave-active-class": et.value,
892
+ onAfterEnter: ut
855
893
  }, {
856
- default: fe(() => [
857
- S.value ? (d(), v("div", {
894
+ default: me(() => [
895
+ $.value ? (d(), f("div", {
858
896
  key: 0,
859
897
  ref_key: "layerRef",
860
898
  ref: m,
861
- class: P(["zan-layer zan-layer-border", [Ve.value, { "zan-layer-min": a.value }]]),
862
- id: r.value,
863
- style: N(Re.value)
899
+ class: D(["zan-layer zan-layer-border", [qe.value, { "zan-layer-min": a.value }]]),
900
+ id: u.value,
901
+ style: P(Qe.value)
864
902
  }, [
865
- Ke.value ? (d(), M(kt, {
903
+ ot.value ? (d(), M(Ot, {
866
904
  key: 0,
867
905
  title: e.title,
868
906
  titleStyle: e.titleStyle,
869
907
  move: e.move,
870
- onMousedown: et
908
+ onMousedown: it
871
909
  }, {
872
- default: fe(() => [
910
+ default: me(() => [
873
911
  ee(c.$slots, "title")
874
912
  ]),
875
913
  _: 3
876
914
  }, 8, ["title", "titleStyle", "move"])) : h("", !0),
877
- B("div", {
915
+ O("div", {
878
916
  ref_key: "contentRef",
879
- ref: f,
880
- class: P(["zan-layer-content", _e.value]),
881
- style: N(a.value === !0 ? "display:none" : "")
917
+ ref: p,
918
+ class: D(["zan-layer-content", Ze.value]),
919
+ style: P(a.value === !0 ? "display:none" : "")
882
920
  }, [
883
- z(s) === 0 || z(s) === 1 || z(s) === 4 ? (d(), v(W, { key: 0 }, [
884
- e.icon ? (d(), v("i", {
921
+ C(i) === 0 || C(i) === 1 || C(i) === 4 ? (d(), f(_, { key: 0 }, [
922
+ e.icon ? (d(), f("i", {
885
923
  key: 0,
886
- class: P(ke.value)
924
+ class: D($e.value)
887
925
  }, null, 2)) : h("", !0),
888
- z(i).default ? (d(), v("div", nn, [
926
+ C(s).default ? (d(), f("div", un, [
889
927
  ee(c.$slots, "default")
890
- ])) : (d(), v(W, { key: 2 }, [
891
- e.isHtmlFragment ? (d(), v("div", {
928
+ ])) : (d(), f(_, { key: 2 }, [
929
+ e.isHtmlFragment ? (d(), f("div", {
892
930
  key: 0,
893
931
  class: "html-fragment",
894
- innerHTML: z(ne)(t.content)
895
- }, null, 8, ln)) : (d(), v(W, { key: 1 }, [
932
+ innerHTML: C(ne)(t.content)
933
+ }, null, 8, cn)) : (d(), f(_, { key: 1 }, [
896
934
  t.content ? (d(), M(ie, {
897
935
  key: 0,
898
- render: () => z(ne)(t.content)
936
+ render: () => C(ne)(t.content)
899
937
  }, null, 8, ["render"])) : h("", !0)
900
938
  ], 64))
901
939
  ], 64))
902
940
  ], 64)) : h("", !0),
903
- z(s) === 7 ? (d(), M(Zt, {
941
+ C(i) === 7 ? (d(), M(tn, {
904
942
  key: 1,
905
- "prompt-value": Q.value,
906
- "onUpdate:promptValue": y[0] || (y[0] = (C) => Q.value = C),
943
+ "prompt-value": q.value,
944
+ "onUpdate:promptValue": v[0] || (v[0] = (k) => q.value = k),
907
945
  formType: t.formType,
908
946
  maxLength: t.maxLength,
909
947
  placeholder: t.placeholder
910
948
  }, null, 8, ["prompt-value", "formType", "maxLength", "placeholder"])) : h("", !0),
911
- z(s) === 2 ? (d(), M(ht, {
949
+ C(i) === 2 ? (d(), M(kt, {
912
950
  key: 2,
913
951
  src: t.content
914
952
  }, null, 8, ["src"])) : h("", !0),
915
- z(s) === 5 ? (d(), M(Rt, {
953
+ C(i) === 5 ? (d(), M(Gt, {
916
954
  key: 3,
917
955
  imgList: t.imgList,
918
956
  startIndex: t.startIndex,
919
- onResetCalculationPohtosArea: Je
957
+ onResetCalculationPohtosArea: st
920
958
  }, null, 8, ["imgList", "startIndex"])) : h("", !0),
921
- z(s) === 6 ? (d(), M(Yt, {
959
+ C(i) === 6 ? (d(), M(Kt, {
922
960
  key: 4,
923
961
  onClose: ae,
924
962
  title: t.title,
925
963
  content: t.content,
926
964
  isHtmlFragment: t.isHtmlFragment,
927
965
  icon: t.icon,
928
- iconClass: ke.value
929
- }, null, 8, ["title", "content", "isHtmlFragment", "icon", "iconClass"])) : h("", !0)
966
+ iconClass: $e.value,
967
+ offset: t.offset
968
+ }, null, 8, ["title", "content", "isHtmlFragment", "icon", "iconClass", "offset"])) : h("", !0)
930
969
  ], 6),
931
- z(s) != 3 && z(s) != 5 && z(s) != 6 ? (d(), M(Ft, {
970
+ C(i) != 3 && C(i) != 5 && C(i) != 6 ? (d(), M(Dt, {
932
971
  key: 1,
933
972
  maxmin: e.maxmin,
934
- max: u.value,
973
+ max: r.value,
935
974
  min: a.value,
936
975
  closeBtn: e.closeBtn,
937
- onOnMin: we,
938
- onOnMax: ze,
976
+ onOnMin: Se,
977
+ onOnMax: ke,
939
978
  onOnClose: ae
940
979
  }, null, 8, ["maxmin", "max", "min", "closeBtn"])) : h("", !0),
941
- B("div", {
942
- style: N(a.value === !0 ? "display:none" : "")
980
+ O("div", {
981
+ style: P(a.value === !0 ? "display:none" : "")
943
982
  }, [
944
- z(i).footer || t.footer ? (d(), M(Lt, {
983
+ C(s).footer || t.footer ? (d(), M(Ft, {
945
984
  key: 0,
946
985
  footer: t.footer,
947
986
  footerStyle: t.footerStyle
948
987
  }, {
949
- default: fe(() => [
988
+ default: me(() => [
950
989
  ee(c.$slots, "footer")
951
990
  ]),
952
991
  _: 3
953
- }, 8, ["footer", "footerStyle"])) : (d(), v(W, { key: 1 }, [
954
- (e.btn && e.btn.length > 0 || z(s) === 0 || z(s) === 7) && !e.isMessage ? (d(), v("div", {
992
+ }, 8, ["footer", "footerStyle"])) : (d(), f(_, { key: 1 }, [
993
+ (e.btn && e.btn.length > 0 || C(i) === 0 || C(i) === 7) && !e.isMessage ? (d(), f("div", {
955
994
  key: 0,
956
- class: P(["zan-layer-btn", [`zan-layer-btn-${e.btnAlign}`]])
995
+ class: D(["zan-layer-btn", [`zan-layer-btn-${e.btnAlign}`]])
957
996
  }, [
958
- e.btn && e.btn.length > 0 ? (d(!0), v(W, { key: 0 }, De(e.btn, (C, ue) => (d(), v("a", {
959
- key: ue,
960
- style: N(C.style),
961
- class: P([
962
- C.class,
963
- `zan-layer-btn${ue}`,
964
- { "zan-layer-btn-disabled": C.disabled }
997
+ e.btn && e.btn.length > 0 ? (d(!0), f(_, { key: 0 }, Pe(e.btn, (k, ce) => (d(), f("a", {
998
+ key: ce,
999
+ style: P(k.style),
1000
+ class: D([
1001
+ k.class,
1002
+ `zan-layer-btn${ce}`,
1003
+ { "zan-layer-btn-disabled": k.disabled }
965
1004
  ]),
966
- onClick: (st) => !C.disabled && (z(s) === 7 ? C.callback(r.value, Q.value) : C.callback(r.value))
967
- }, T(C.text), 15, an))), 128)) : (d(), v(W, { key: 1 }, [
968
- z(s) === 0 || z(s) === 7 ? (d(), v("a", {
1005
+ onClick: (mt) => !k.disabled && (C(i) === 7 ? k.callback(u.value, q.value) : k.callback(u.value))
1006
+ }, T(k.text), 15, dn))), 128)) : (d(), f(_, { key: 1 }, [
1007
+ C(i) === 0 || C(i) === 7 ? (d(), f("a", {
969
1008
  key: 0,
970
1009
  class: "zan-layer-btn0",
971
- onClick: y[1] || (y[1] = (C) => We(r.value, Q.value))
1010
+ onClick: v[1] || (v[1] = (k) => Ue(u.value, q.value))
972
1011
  }, T(e.yesText), 1)) : h("", !0)
973
1012
  ], 64))
974
1013
  ], 2)) : h("", !0)
975
1014
  ], 64))
976
1015
  ], 4),
977
- Ue.value ? (d(), v("span", on)) : h("", !0)
978
- ], 14, tn)) : h("", !0)
1016
+ at.value ? (d(), f("span", fn)) : h("", !0)
1017
+ ], 14, rn)) : h("", !0)
979
1018
  ]),
980
1019
  _: 3
981
1020
  }, 8, ["enter-active-class", "leave-active-class"])
982
1021
  ], 8, ["to", "disabled"]));
983
1022
  }
984
- }), V = [], sn = (e) => {
1023
+ }), V = [], mn = (e) => {
985
1024
  V.push(e);
986
- }, ve = (e) => {
1025
+ }, ye = (e) => {
987
1026
  V.forEach((n, l) => {
988
1027
  n.modalContainer.id === e && V.splice(l, 1);
989
1028
  });
990
- }, rn = () => {
1029
+ }, vn = () => {
991
1030
  V.splice(0, V.length);
992
1031
  }, U = (e) => {
993
1032
  let n = !1;
@@ -999,22 +1038,22 @@ const tn = ["id"], nn = {
999
1038
  return V.forEach((l, t) => {
1000
1039
  l.modalContainer.id === e && (n = l);
1001
1040
  }), n;
1002
- }, un = (e, n) => (e && (n = Object.assign(n, e)), n), cn = (e) => {
1041
+ }, yn = (e, n) => (e && (n = Object.assign(n, e)), n), pn = (e) => {
1003
1042
  const n = document.createElement("div");
1004
1043
  return n.id = e.id, document.body.appendChild(n), n;
1005
- }, dn = (e) => typeof e == "function" ? Ie(e()) ? { default: () => e() } : void 0 : Ie(e) ? { default: () => e } : void 0, I = {
1044
+ }, hn = (e) => typeof e == "function" ? Ie(e()) ? { default: () => e() } : void 0 : Ie(e) ? { default: () => e } : void 0, L = {
1006
1045
  _context: null,
1007
1046
  // 打开弹窗
1008
1047
  open: (e) => {
1009
1048
  const n = {};
1010
- return I.create(e, n);
1049
+ return L.create(e, n);
1011
1050
  },
1012
1051
  // 抽屉
1013
1052
  drawer: (e) => {
1014
1053
  const n = {
1015
1054
  type: "drawer"
1016
1055
  };
1017
- return I.create(e, n);
1056
+ return L.create(e, n);
1018
1057
  },
1019
1058
  // 消息
1020
1059
  msg: (e, n = {}, l) => {
@@ -1029,7 +1068,7 @@ const tn = ["id"], nn = {
1029
1068
  btn: void 0,
1030
1069
  time: 2e3
1031
1070
  };
1032
- return I.create(n, t, l);
1071
+ return L.create(n, t, l);
1033
1072
  },
1034
1073
  // 加载
1035
1074
  load: (e = 0, n = {}) => {
@@ -1042,7 +1081,7 @@ const tn = ["id"], nn = {
1042
1081
  shade: !0,
1043
1082
  shadeOpacity: "0.3"
1044
1083
  };
1045
- return I.create(n, l);
1084
+ return L.create(n, l);
1046
1085
  },
1047
1086
  // 确认
1048
1087
  confirm: (e, n = {}) => {
@@ -1051,7 +1090,7 @@ const tn = ["id"], nn = {
1051
1090
  content: e,
1052
1091
  shadeClose: !1
1053
1092
  };
1054
- return I.create(n, l);
1093
+ return L.create(n, l);
1055
1094
  },
1056
1095
  // 通知
1057
1096
  notify: (e, n) => {
@@ -1062,7 +1101,7 @@ const tn = ["id"], nn = {
1062
1101
  area: "auto",
1063
1102
  shade: !1
1064
1103
  };
1065
- return I.create(e, l, n);
1104
+ return L.create(e, l, n);
1066
1105
  },
1067
1106
  // 图片预览
1068
1107
  photos: (e) => {
@@ -1077,7 +1116,7 @@ const tn = ["id"], nn = {
1077
1116
  shadeClose: !0,
1078
1117
  shadeOpacity: "0.2"
1079
1118
  };
1080
- return I.create(e, n);
1119
+ return L.create(e, n);
1081
1120
  },
1082
1121
  // 输入层
1083
1122
  prompt: (e) => {
@@ -1087,34 +1126,34 @@ const tn = ["id"], nn = {
1087
1126
  shadeClose: !1,
1088
1127
  shadeOpacity: "0.2"
1089
1128
  };
1090
- return I.create(e, n);
1129
+ return L.create(e, n);
1091
1130
  },
1092
1131
  // 创建弹窗
1093
1132
  create: (e, n, l) => {
1094
- var a, r;
1133
+ var a, u;
1095
1134
  let t;
1096
- const o = un(e, n);
1097
- o.hasOwnProperty("id") ? I.close(o.id) : o.id = Pe();
1098
- const i = cn(o), u = Me(
1135
+ const o = yn(e, n);
1136
+ o.hasOwnProperty("id") ? L.close(o.id) : o.id = Ve();
1137
+ const s = pn(o), r = De(
1099
1138
  pe,
1100
1139
  {
1101
1140
  ...o,
1102
1141
  isFunction: !0,
1103
1142
  internalDestroy() {
1104
- var m, f;
1105
- t && clearTimeout(t), (f = (m = u.component) == null ? void 0 : m.exposed) == null || f.close(), setTimeout(() => {
1106
- Z(null, i), document.body.contains(i) && document.body.removeChild(i);
1107
- }, 500), ve(i.id);
1143
+ var m, p;
1144
+ t && clearTimeout(t), (p = (m = r.component) == null ? void 0 : m.exposed) == null || p.close(), setTimeout(() => {
1145
+ Q(null, s), document.body.contains(s) && document.body.removeChild(s);
1146
+ }, 500), ye(s.id);
1108
1147
  }
1109
1148
  },
1110
- dn(o.content)
1149
+ hn(o.content)
1111
1150
  );
1112
- return u.appContext = o.appContext || I._context, Z(u, i), (r = (a = u.component) == null ? void 0 : a.exposed) == null || r.open(), n && n.time != null && n.time != 0 && (t = setTimeout(() => {
1113
- var m, f;
1114
- (f = (m = u.component) == null ? void 0 : m.exposed) == null || f.close(), l && l(i.id), setTimeout(() => {
1115
- Z(null, i), document.body.contains(i) && document.body.removeChild(i);
1116
- }, 500), ve(i.id);
1117
- }, n.time)), sn({ modalContainer: i, modalInstance: u }), i.id;
1151
+ return r.appContext = o.appContext || L._context, Q(r, s), (u = (a = r.component) == null ? void 0 : a.exposed) == null || u.open(), n && n.time != null && n.time != 0 && (t = setTimeout(() => {
1152
+ var m, p;
1153
+ (p = (m = r.component) == null ? void 0 : m.exposed) == null || p.close(), l && l(s.id), setTimeout(() => {
1154
+ Q(null, s), document.body.contains(s) && document.body.removeChild(s);
1155
+ }, 500), ye(s.id);
1156
+ }, n.time)), mn({ modalContainer: s, modalInstance: r }), s.id;
1118
1157
  },
1119
1158
  // 关闭弹窗
1120
1159
  close: (e) => {
@@ -1122,19 +1161,19 @@ const tn = ["id"], nn = {
1122
1161
  if (e != null && U(e)) {
1123
1162
  const t = K(e);
1124
1163
  (l = (n = t.modalInstance.component) == null ? void 0 : n.exposed) == null || l.close(), setTimeout(() => {
1125
- Z(null, t.modalContainer), document.body.contains(t.modalContainer) && document.body.removeChild(t.modalContainer);
1164
+ Q(null, t.modalContainer), document.body.contains(t.modalContainer) && document.body.removeChild(t.modalContainer);
1126
1165
  }, 500);
1127
1166
  }
1128
- ve(e);
1167
+ ye(e);
1129
1168
  },
1130
1169
  // 关闭所有弹窗
1131
1170
  closeAll: () => {
1132
1171
  V.forEach((e) => {
1133
1172
  var n, l;
1134
1173
  (l = (n = e.modalInstance.component) == null ? void 0 : n.exposed) == null || l.close(), setTimeout(() => {
1135
- Z(null, e.modalContainer), document.body.contains(e.modalContainer) && document.body.removeChild(e.modalContainer);
1174
+ Q(null, e.modalContainer), document.body.contains(e.modalContainer) && document.body.removeChild(e.modalContainer);
1136
1175
  }, 500);
1137
- }), rn();
1176
+ }), vn();
1138
1177
  },
1139
1178
  // 重置位置
1140
1179
  reset: (e) => {
@@ -1156,16 +1195,16 @@ const tn = ["id"], nn = {
1156
1195
  var n, l;
1157
1196
  e != null && U(e) && ((l = (n = K(e).modalInstance.component) == null ? void 0 : n.exposed) == null || l.revert());
1158
1197
  }
1159
- }, fn = (e, n) => {
1160
- I._context = e._context, e.component(pe.name, pe), e.config.globalProperties.$layer = I, n && typeof n.zIndex == "number" && e.provide(Jt, g(n.zIndex));
1161
- }, vn = {
1198
+ }, gn = (e, n) => {
1199
+ L._context = e._context, e.component(pe.name, pe), e.config.globalProperties.$layer = L, n && typeof n.zIndex == "number" && e.provide(on, g(n.zIndex));
1200
+ }, bn = {
1162
1201
  install(e, n) {
1163
- fn(e, n);
1202
+ gn(e, n);
1164
1203
  }
1165
1204
  };
1166
1205
  export {
1167
1206
  pe as ZanLayer,
1168
- vn as default,
1169
- I as layer,
1170
- I as zanLayer
1207
+ bn as default,
1208
+ L as layer,
1209
+ L as zanLayer
1171
1210
  };