sand-components-vben-international 1.0.2 → 1.0.4

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.
@@ -0,0 +1,136 @@
1
+ import { g as m } from "./index-D3o6cStZ.js";
2
+ var M = { exports: {} }, L = M.exports, w;
3
+ function y() {
4
+ return w || (w = 1, function(I, _) {
5
+ (function(f, v) {
6
+ I.exports = v();
7
+ })(L, function() {
8
+ function f(n) {
9
+ var s = [];
10
+ return n.AMapUI && s.push(v(n.AMapUI)), n.Loca && s.push(U(n.Loca)), Promise.all(s);
11
+ }
12
+ function v(n) {
13
+ return new Promise(function(s, o) {
14
+ var a = [];
15
+ if (n.plugins) for (var i = 0; i < n.plugins.length; i += 1) u.AMapUI.plugins.indexOf(n.plugins[i]) == -1 && a.push(n.plugins[i]);
16
+ if (p.AMapUI === e.failed) o("前次请求 AMapUI 失败");
17
+ else if (p.AMapUI === e.notload) {
18
+ p.AMapUI = e.loading, u.AMapUI.version = n.version || u.AMapUI.version, i = u.AMapUI.version;
19
+ var d = document.body || document.head, r = document.createElement("script");
20
+ r.type = "text/javascript", r.src = "https://webapi.amap.com/ui/" + i + "/main.js", r.onerror = function(t) {
21
+ p.AMapUI = e.failed, o("请求 AMapUI 失败");
22
+ }, r.onload = function() {
23
+ if (p.AMapUI = e.loaded, a.length) window.AMapUI.loadUI(a, function() {
24
+ for (var t = 0, c = a.length; t < c; t++) {
25
+ var A = a[t].split("/").slice(-1)[0];
26
+ window.AMapUI[A] = arguments[t];
27
+ }
28
+ for (s(); l.AMapUI.length; ) l.AMapUI.splice(0, 1)[0]();
29
+ });
30
+ else for (s(); l.AMapUI.length; ) l.AMapUI.splice(0, 1)[0]();
31
+ }, d.appendChild(r);
32
+ } else p.AMapUI === e.loaded ? n.version && n.version !== u.AMapUI.version ? o("不允许多个版本 AMapUI 混用") : a.length ? window.AMapUI.loadUI(a, function() {
33
+ for (var t = 0, c = a.length; t < c; t++) {
34
+ var A = a[t].split("/").slice(-1)[0];
35
+ window.AMapUI[A] = arguments[t];
36
+ }
37
+ s();
38
+ }) : s() : n.version && n.version !== u.AMapUI.version ? o("不允许多个版本 AMapUI 混用") : l.AMapUI.push(function(t) {
39
+ t ? o(t) : a.length ? window.AMapUI.loadUI(a, function() {
40
+ for (var c = 0, A = a.length; c < A; c++) {
41
+ var h = a[c].split("/").slice(-1)[0];
42
+ window.AMapUI[h] = arguments[c];
43
+ }
44
+ s();
45
+ }) : s();
46
+ });
47
+ });
48
+ }
49
+ function U(n) {
50
+ return new Promise(function(s, o) {
51
+ if (p.Loca === e.failed) o("前次请求 Loca 失败");
52
+ else if (p.Loca === e.notload) {
53
+ p.Loca = e.loading, u.Loca.version = n.version || u.Loca.version;
54
+ var a = u.Loca.version, i = u.AMap.version.startsWith("2"), d = a.startsWith("2");
55
+ if (i && !d || !i && d) o("JSAPI 与 Loca 版本不对应!!");
56
+ else {
57
+ i = u.key, d = document.body || document.head;
58
+ var r = document.createElement("script");
59
+ r.type = "text/javascript", r.src = "https://webapi.amap.com/loca?v=" + a + "&key=" + i, r.onerror = function(t) {
60
+ p.Loca = e.failed, o("请求 AMapUI 失败");
61
+ }, r.onload = function() {
62
+ for (p.Loca = e.loaded, s(); l.Loca.length; ) l.Loca.splice(0, 1)[0]();
63
+ }, d.appendChild(r);
64
+ }
65
+ } else p.Loca === e.loaded ? n.version && n.version !== u.Loca.version ? o("不允许多个版本 Loca 混用") : s() : n.version && n.version !== u.Loca.version ? o("不允许多个版本 Loca 混用") : l.Loca.push(function(t) {
66
+ t ? o(t) : o();
67
+ });
68
+ });
69
+ }
70
+ if (!window) throw Error("AMap JSAPI can only be used in Browser.");
71
+ var e;
72
+ (function(n) {
73
+ n.notload = "notload", n.loading = "loading", n.loaded = "loaded", n.failed = "failed";
74
+ })(e || (e = {}));
75
+ var u = { key: "", AMap: { version: "1.4.15", plugins: [] }, AMapUI: { version: "1.1", plugins: [] }, Loca: { version: "1.3.2" } }, p = { AMap: e.notload, AMapUI: e.notload, Loca: e.notload }, l = { AMap: [], AMapUI: [], Loca: [] }, g = [], b = function(n) {
76
+ typeof n == "function" && (p.AMap === e.loaded ? n(window.AMap) : g.push(n));
77
+ };
78
+ return { load: function(n) {
79
+ return new Promise(function(s, o) {
80
+ if (p.AMap == e.failed) o("");
81
+ else if (p.AMap == e.notload) {
82
+ var a = n.key, i = n.version, d = n.plugins;
83
+ a ? (window.AMap && location.host !== "lbs.amap.com" && o("禁止多种API加载方式混用"), u.key = a, u.AMap.version = i || u.AMap.version, u.AMap.plugins = d || u.AMap.plugins, p.AMap = e.loading, i = document.body || document.head, window.___onAPILoaded = function(t) {
84
+ if (delete window.___onAPILoaded, t) p.AMap = e.failed, o(t);
85
+ else for (p.AMap = e.loaded, f(n).then(function() {
86
+ s(window.AMap);
87
+ }).catch(o); g.length; ) g.splice(0, 1)[0]();
88
+ }, d = document.createElement("script"), d.type = "text/javascript", d.src = "https://webapi.amap.com/maps?callback=___onAPILoaded&v=" + u.AMap.version + "&key=" + a + "&plugin=" + u.AMap.plugins.join(","), d.onerror = function(t) {
89
+ p.AMap = e.failed, o(t);
90
+ }, i.appendChild(d)) : o("请填写key");
91
+ } else if (p.AMap == e.loaded) if (n.key && n.key !== u.key) o("多个不一致的 key");
92
+ else if (n.version && n.version !== u.AMap.version) o("不允许多个版本 JSAPI 混用");
93
+ else {
94
+ if (a = [], n.plugins) for (i = 0; i < n.plugins.length; i += 1) u.AMap.plugins.indexOf(n.plugins[i]) == -1 && a.push(n.plugins[i]);
95
+ a.length ? window.AMap.plugin(a, function() {
96
+ f(n).then(function() {
97
+ s(window.AMap);
98
+ }).catch(o);
99
+ }) : f(n).then(function() {
100
+ s(window.AMap);
101
+ }).catch(o);
102
+ }
103
+ else if (n.key && n.key !== u.key) o("多个不一致的 key");
104
+ else if (n.version && n.version !== u.AMap.version) o("不允许多个版本 JSAPI 混用");
105
+ else {
106
+ var r = [];
107
+ if (n.plugins) for (i = 0; i < n.plugins.length; i += 1) u.AMap.plugins.indexOf(n.plugins[i]) == -1 && r.push(n.plugins[i]);
108
+ b(function() {
109
+ r.length ? window.AMap.plugin(r, function() {
110
+ f(n).then(function() {
111
+ s(window.AMap);
112
+ }).catch(o);
113
+ }) : f(n).then(function() {
114
+ s(window.AMap);
115
+ }).catch(o);
116
+ });
117
+ }
118
+ });
119
+ }, reset: function() {
120
+ delete window.AMap, delete window.AMapUI, delete window.Loca, u = { key: "", AMap: { version: "1.4.15", plugins: [] }, AMapUI: { version: "1.1", plugins: [] }, Loca: { version: "1.3.2" } }, p = {
121
+ AMap: e.notload,
122
+ AMapUI: e.notload,
123
+ Loca: e.notload
124
+ }, l = { AMap: [], AMapUI: [], Loca: [] };
125
+ } };
126
+ });
127
+ }(M)), M.exports;
128
+ }
129
+ var x = y();
130
+ const P = /* @__PURE__ */ m(x), k = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
131
+ __proto__: null,
132
+ default: P
133
+ }, Symbol.toStringTag, { value: "Module" }));
134
+ export {
135
+ k as i
136
+ };