vdrag-topo-utils 1.5.0 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,3 +10,6 @@ export * from "./src/dom";
10
10
  export * from "./src/number";
11
11
  export * from "./src/image";
12
12
  export * from "./src/app";
13
+ export * from "./src/file";
14
+ export * from "./src/coord";
15
+ export * from "./src/mouse";
package/dist/es/index.js CHANGED
@@ -1,78 +1,124 @@
1
1
  import { default as r } from "./src/withinstall.js";
2
2
  import { default as a } from "./src/bus.js";
3
- import { UA as l, _global as m, _support as s, customizeSetInterval as n, debounce as p, getClientHeight as g, getGlobal as d, getGlobalSupport as f, getLocationHref as c, getScrollHeight as x, getScrollTop as S, getUrlParam as h, htmlElementAsString as u, inBrowser as v, is360zhushou as D, isAndroid as E, isChrome as y, isEdge as b, isIE as I, isIE9 as T, isIOS as B, isMobile as C, isWeiXin as F, matchUrlFileName as P, nativeTryCatch as U, parseUrlToObj as w, supportsHistory as H, throttle as _, throttle_02 as A } from "./src/browser.js";
4
- import { addBigBraceToStr as L, addMiddleBraceToStr as M, extractStrFromCurlyBrace as k, extractStrFromMiddleBrace as z, interceptStr as N, unknownToString as O, validateEmail as j, validateFixedPhone as W, validatePhone as X, validateSpecialString_01 as q } from "./src/string.js";
5
- import { formatDate as K, formatDate_02 as Q, generateUUID as R, getDaysDiffBetweenDates as V, getDaysDiffFromNow as Y, getTimestamp as Z } from "./src/time.js";
6
- import { isExistProperty as ee, variableTypeDetection as te } from "./src/type.js";
7
- import { replaceAop as oe } from "./src/object.js";
8
- import { fromHttpStatus as ie } from "./src/http.js";
9
- import { addEventListener as me, removeEventListener as se, triggerDragEvent as ne } from "./src/dom.js";
10
- import { formatDecimal as ge, random as de } from "./src/number.js";
11
- import { imgError as ce, preloadImage as xe } from "./src/image.js";
12
- import { galleryImg as he, getContacts as ue, savePicture as ve, scanCode as De, scanFromGallery as Ee, takePhoto as ye } from "./src/app.js";
3
+ import { UA as s, _global as l, _support as m, concatParams as c, customizeSetInterval as n, debounce as p, getClientHeight as g, getGlobal as d, getGlobalSupport as f, getLocationHref as h, getScrollHeight as S, getScrollTop as u, getURLParameters as x, getUrlParam as y, htmlElementAsString as T, inBrowser as b, is360zhushou as D, isAndroid as P, isChrome as v, isEdge as E, isEqual as C, isIE as F, isIE9 as w, isIOS as B, isMobile as I, isWeiXin as U, loadJS as k, loadStyle as N, matchUrlFileName as A, nativeTryCatch as L, parse as M, parseUrlToObj as H, setDocumentTitle as O, stringify as _, supportsHistory as j, throttle as z, throttle_02 as G } from "./src/browser.js";
4
+ import { addBigBraceToStr as R, addMiddleBraceToStr as q, capitalize as J, checkAccount as W, checkCertNo as X, checkCreditCode as Y, checkPassword as K, checkPhone as Q, extractStrFromCurlyBrace as V, extractStrFromMiddleBrace as $, interceptStr as ee, unknownToString as te, validateEmail as re, validateFixedPhone as oe, validatePhone as ae, validateSpecialString_01 as ie } from "./src/string.js";
5
+ import { calcTotalFlightTime as le, countDown as me, formatDate as ce, formatDate_02 as ne, formatShortTime as pe, formatTime as ge, generateUUID as de, getDaysDiffBetweenDates as fe, getDaysDiffFromNow as he, getTimestamp as Se, isExceedOneYear as ue } from "./src/time.js";
6
+ import { isArray as ye, isDate as Te, isExistProperty as be, isFunction as De, isMap as Pe, isObject as ve, isPlainObject as Ee, isPromise as Ce, isRegExp as Fe, isSet as we, isString as Be, isSymbol as Ie, objectToString as Ue, toTypeString as ke, variableTypeDetection as Ne } from "./src/type.js";
7
+ import { replaceAop as Le } from "./src/object.js";
8
+ import { fromHttpStatus as He } from "./src/http.js";
9
+ import { addEventListener as _e, removeEventListener as je, triggerDragEvent as ze } from "./src/dom.js";
10
+ import { formatDecimal as Ze, looseToNumber as Re, random as qe, toNumber as Je } from "./src/number.js";
11
+ import { imgError as Xe, preloadImage as Ye } from "./src/image.js";
12
+ import { galleryImg as Qe, getContacts as Ve, savePicture as $e, scanCode as et, scanFromGallery as tt, takePhoto as rt } from "./src/app.js";
13
+ import { getFileNameByPath as at, getFileTypeByPath as it, getImgUrl as st } from "./src/file.js";
14
+ import { LatLngConverter as mt, padZero as ct, padZeroNew as nt, switchDMS as pt } from "./src/coord.js";
15
+ import { disableUserZoom as dt, isMetaPressed as ft } from "./src/mouse.js";
13
16
  export {
14
- l as UA,
15
- m as _global,
16
- s as _support,
17
- L as addBigBraceToStr,
18
- me as addEventListener,
19
- M as addMiddleBraceToStr,
17
+ mt as LatLngConverter,
18
+ s as UA,
19
+ l as _global,
20
+ m as _support,
21
+ R as addBigBraceToStr,
22
+ _e as addEventListener,
23
+ q as addMiddleBraceToStr,
20
24
  a as bus,
25
+ le as calcTotalFlightTime,
26
+ J as capitalize,
27
+ W as checkAccount,
28
+ X as checkCertNo,
29
+ Y as checkCreditCode,
30
+ K as checkPassword,
31
+ Q as checkPhone,
32
+ c as concatParams,
33
+ me as countDown,
21
34
  n as customizeSetInterval,
22
35
  p as debounce,
23
- k as extractStrFromCurlyBrace,
24
- z as extractStrFromMiddleBrace,
25
- K as formatDate,
26
- Q as formatDate_02,
27
- ge as formatDecimal,
28
- ie as fromHttpStatus,
29
- he as galleryImg,
30
- R as generateUUID,
36
+ dt as disableUserZoom,
37
+ V as extractStrFromCurlyBrace,
38
+ $ as extractStrFromMiddleBrace,
39
+ ce as formatDate,
40
+ ne as formatDate_02,
41
+ Ze as formatDecimal,
42
+ pe as formatShortTime,
43
+ ge as formatTime,
44
+ He as fromHttpStatus,
45
+ Qe as galleryImg,
46
+ de as generateUUID,
31
47
  g as getClientHeight,
32
- ue as getContacts,
33
- V as getDaysDiffBetweenDates,
34
- Y as getDaysDiffFromNow,
48
+ Ve as getContacts,
49
+ fe as getDaysDiffBetweenDates,
50
+ he as getDaysDiffFromNow,
51
+ at as getFileNameByPath,
52
+ it as getFileTypeByPath,
35
53
  d as getGlobal,
36
54
  f as getGlobalSupport,
37
- c as getLocationHref,
38
- x as getScrollHeight,
39
- S as getScrollTop,
40
- Z as getTimestamp,
41
- h as getUrlParam,
42
- u as htmlElementAsString,
43
- ce as imgError,
44
- v as inBrowser,
45
- N as interceptStr,
55
+ st as getImgUrl,
56
+ h as getLocationHref,
57
+ S as getScrollHeight,
58
+ u as getScrollTop,
59
+ Se as getTimestamp,
60
+ x as getURLParameters,
61
+ y as getUrlParam,
62
+ T as htmlElementAsString,
63
+ Xe as imgError,
64
+ b as inBrowser,
65
+ ee as interceptStr,
46
66
  D as is360zhushou,
47
- E as isAndroid,
48
- y as isChrome,
49
- b as isEdge,
50
- ee as isExistProperty,
51
- I as isIE,
52
- T as isIE9,
67
+ P as isAndroid,
68
+ ye as isArray,
69
+ v as isChrome,
70
+ Te as isDate,
71
+ E as isEdge,
72
+ C as isEqual,
73
+ ue as isExceedOneYear,
74
+ be as isExistProperty,
75
+ De as isFunction,
76
+ F as isIE,
77
+ w as isIE9,
53
78
  B as isIOS,
54
- C as isMobile,
55
- F as isWeiXin,
56
- P as matchUrlFileName,
57
- U as nativeTryCatch,
58
- w as parseUrlToObj,
59
- xe as preloadImage,
60
- de as random,
61
- se as removeEventListener,
62
- oe as replaceAop,
63
- ve as savePicture,
64
- De as scanCode,
65
- Ee as scanFromGallery,
66
- H as supportsHistory,
67
- ye as takePhoto,
68
- _ as throttle,
69
- A as throttle_02,
70
- ne as triggerDragEvent,
71
- O as unknownToString,
72
- j as validateEmail,
73
- W as validateFixedPhone,
74
- X as validatePhone,
75
- q as validateSpecialString_01,
76
- te as variableTypeDetection,
79
+ Pe as isMap,
80
+ ft as isMetaPressed,
81
+ I as isMobile,
82
+ ve as isObject,
83
+ Ee as isPlainObject,
84
+ Ce as isPromise,
85
+ Fe as isRegExp,
86
+ we as isSet,
87
+ Be as isString,
88
+ Ie as isSymbol,
89
+ U as isWeiXin,
90
+ k as loadJS,
91
+ N as loadStyle,
92
+ Re as looseToNumber,
93
+ A as matchUrlFileName,
94
+ L as nativeTryCatch,
95
+ Ue as objectToString,
96
+ ct as padZero,
97
+ nt as padZeroNew,
98
+ M as parse,
99
+ H as parseUrlToObj,
100
+ Ye as preloadImage,
101
+ qe as random,
102
+ je as removeEventListener,
103
+ Le as replaceAop,
104
+ $e as savePicture,
105
+ et as scanCode,
106
+ tt as scanFromGallery,
107
+ O as setDocumentTitle,
108
+ _ as stringify,
109
+ j as supportsHistory,
110
+ pt as switchDMS,
111
+ rt as takePhoto,
112
+ z as throttle,
113
+ G as throttle_02,
114
+ Je as toNumber,
115
+ ke as toTypeString,
116
+ ze as triggerDragEvent,
117
+ te as unknownToString,
118
+ re as validateEmail,
119
+ oe as validateFixedPhone,
120
+ ae as validatePhone,
121
+ ie as validateSpecialString_01,
122
+ Ne as variableTypeDetection,
77
123
  r as withInstall
78
124
  };
@@ -13,7 +13,7 @@ export declare const is360zhushou: any;
13
13
  * 判断是否是移动端
14
14
  * @returns
15
15
  */
16
- export declare const isMobile: () => any;
16
+ export declare const isMobile: () => boolean;
17
17
  /**
18
18
  * 获取全局事件
19
19
  * @returns window
@@ -22,7 +22,7 @@ export declare function getGlobal(): Window;
22
22
  export declare function getGlobalSupport(): {
23
23
  [key: string]: any;
24
24
  };
25
- export declare const _global: Window;
25
+ export declare const _global: () => Window;
26
26
  export declare const _support: {
27
27
  [key: string]: any;
28
28
  };
@@ -47,12 +47,39 @@ export declare function getLocationHref(): string;
47
47
  * @returns
48
48
  */
49
49
  export declare function matchUrlFileName(str: string, ext?: string): string | undefined;
50
+ /**
51
+ * 把对象格式化为url上的参数表形式
52
+ * @param obj
53
+ * @param sep
54
+ * @param eq
55
+ * @returns
56
+ */
57
+ export declare function stringify(obj: any, sep?: string, eq?: string): string;
58
+ /**
59
+ * 将url上的参数,解析为对象
60
+ * @param str
61
+ * @returns
62
+ */
63
+ export declare function parse(str: string): any;
64
+ /**
65
+ * 解析url参数
66
+ * @example http://test.58.com:8084/#/?id=15&a=2
67
+ * @return {object} {id:15, a:2}
68
+ */
69
+ export declare const getURLParameters: (url?: any) => any;
50
70
  /**
51
71
  * 从URL上获取指定key的值
52
72
  * @param keyValue
53
73
  * @returns value
54
74
  */
55
75
  export declare function getUrlParam(keyValue: string, parseUrl?: string): string | null;
76
+ /**
77
+ * 粘合参数
78
+ * @example
79
+ * concatParams({a:1,b:2},'http://www.58.com?c=4')
80
+ *
81
+ */
82
+ export declare const concatParams: (obj: any, url: string) => string;
56
83
  /**
57
84
  * 解析URL为Obj
58
85
  * @param url
@@ -125,3 +152,23 @@ export declare const getScrollHeight: () => number;
125
152
  * @returns
126
153
  */
127
154
  export declare function customizeSetInterval(callback: () => void, interval: number): number;
155
+ /**
156
+ * 动态加载js文件
157
+ */
158
+ export declare function loadJS(url: string, callback?: any): void;
159
+ /**
160
+ *
161
+ * 动态加载css
162
+ */
163
+ export declare function loadStyle(url: string, callback: any): void;
164
+ /**
165
+ * 对比两个值是否相等
166
+ * @param value
167
+ * @param oldValue
168
+ * @returns
169
+ */
170
+ export declare const isEqual: (value: any, oldValue: any) => boolean;
171
+ /**
172
+ * 动态设置设置网页的title
173
+ */
174
+ export declare const setDocumentTitle: (title: string) => void;
@@ -1,147 +1,200 @@
1
- const f = typeof window < "u", r = f && window.navigator.userAgent.toLowerCase(), y = r && /msie|trident/.test(r), w = r && r.indexOf("msie 9.0") > 0, p = r && r.indexOf("edge/") > 0, T = r && r.indexOf("android") > 0, b = r && /iphone|ipad|ipod|ios/.test(r), H = r && /chrome\/\d+/.test(r) && !p, E = r && /micromessenger/.test(r), _ = r && /360appstore/.test(r), x = () => r.match(
2
- /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
3
- );
4
- function h() {
1
+ const p = typeof window < "u", s = p && window.navigator.userAgent.toLowerCase(), T = s && /msie|trident/.test(s), E = s && s.indexOf("msie 9.0") > 0, h = s && s.indexOf("edge/") > 0, x = s && s.indexOf("android") > 0, S = s && /iphone|ipad|ipod|ios/.test(s), b = s && /chrome\/\d+/.test(s) && !h, H = s && /micromessenger/.test(s), O = s && /360appstore/.test(s), _ = () => {
2
+ const e = typeof window < "u" ? window.navigator.userAgent.toLowerCase() : "";
3
+ return /iphone|ipad|ipod|android|mobile/.test(e);
4
+ };
5
+ function g() {
5
6
  return window;
6
7
  }
7
- function g() {
8
- return m.__vdrag_topo_error__ || {};
8
+ function y() {
9
+ return d().__vdrag_topo_error__ || {};
9
10
  }
10
- const m = h(), S = g();
11
- function A(t, e) {
11
+ const d = () => g(), A = y();
12
+ function C(e, n) {
12
13
  try {
13
- t();
14
- } catch (n) {
15
- e && e(n);
14
+ e();
15
+ } catch (t) {
16
+ n && n(t);
16
17
  }
17
18
  }
18
- function v() {
19
+ function D() {
19
20
  return typeof document > "u" || document.location == null ? "" : document.location.href;
20
21
  }
21
- function O(t, e = ".js") {
22
- if (t.endsWith(e))
23
- return t.substring(t.lastIndexOf("/") + 1);
22
+ function U(e, n = ".js") {
23
+ if (e.endsWith(n))
24
+ return e.substring(e.lastIndexOf("/") + 1);
25
+ }
26
+ function w(e, n, t) {
27
+ n = n || "&", t = t || "=";
28
+ let o = "";
29
+ for (const i in e)
30
+ o += i + t + unescape(e[i]) + n;
31
+ return o.slice(0, -1);
32
+ }
33
+ function $(e) {
34
+ const n = new Object(), t = e.split("&");
35
+ for (let o = 0; o < t.length; o++) {
36
+ const i = t[o].indexOf("=");
37
+ n[t[o].slice(0, i)] = unescape(t[o].slice(i + 1));
38
+ }
39
+ return n;
24
40
  }
25
- function $(t, e = window.location.href) {
26
- const n = decodeURI(e), o = {}, i = n.split("?").length > 1 ? n.split("?")[1] : null;
27
- return i ? (i.split("&").forEach(function(c) {
28
- const [l, a] = c.split("=");
29
- o[l] = a;
30
- }), o[t]) : null;
41
+ const f = (e = window.location.href) => (e.match(/([^?=&]+)(=([^&]*))/g) || []).reduce(
42
+ (n, t) => (n[t.slice(0, t.indexOf("="))] = decodeURIComponent(
43
+ t.slice(t.indexOf("=") + 1)
44
+ ), n),
45
+ {}
46
+ );
47
+ function I(e, n = window.location.href) {
48
+ const t = decodeURI(n), o = {}, i = t.split("?").length > 1 ? t.split("?")[1] : null;
49
+ return i ? (i.split("&").forEach(function(r) {
50
+ const [l, u] = r.split("=");
51
+ o[l] = u;
52
+ }), o[e]) : null;
31
53
  }
32
- function C(t) {
33
- if (!t)
54
+ const N = (e, n) => {
55
+ const t = n ? f(n) : f();
56
+ return Object.assign(t, e), w(t);
57
+ };
58
+ function v(e) {
59
+ if (!e)
34
60
  return {};
35
- const e = t.match(
61
+ const n = e.match(
36
62
  // eslint-disable-next-line no-useless-escape
37
63
  /^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/
38
64
  );
39
- if (!e)
65
+ if (!n)
40
66
  return {};
41
- const n = e[6] || "", o = e[8] || "";
67
+ const t = n[6] || "", o = n[8] || "";
42
68
  return {
43
- host: e[4],
44
- path: e[5],
45
- protocol: e[2],
46
- relative: e[5] + n + o
69
+ host: n[4],
70
+ path: n[5],
71
+ protocol: n[2],
72
+ relative: n[5] + t + o
47
73
  };
48
74
  }
49
- function D(t) {
50
- const e = t.tagName.toLowerCase();
51
- if (e === "body")
75
+ function L(e) {
76
+ const n = e.tagName.toLowerCase();
77
+ if (n === "body")
52
78
  return "";
53
- let n = t.classList.value;
54
- n = n !== "" ? ` class='${n}'` : "";
55
- const o = t.id ? ` id="${t.id}"` : "", i = t.innerText;
56
- return `<${e}${o}${n !== "" ? n : ""}>${i}</${e}>`;
79
+ let t = e.classList.value;
80
+ t = t !== "" ? ` class='${t}'` : "";
81
+ const o = e.id ? ` id="${e.id}"` : "", i = e.innerText;
82
+ return `<${n}${o}${t !== "" ? t : ""}>${i}</${n}>`;
57
83
  }
58
- const I = (t, e) => {
59
- let n = !0;
84
+ const j = (e, n) => {
85
+ let t = !0;
60
86
  return function(...o) {
61
- n && (t.apply(this, o), n = !1, setTimeout(() => {
62
- n = !0;
63
- }, e));
87
+ t && (e.apply(this, o), t = !1, setTimeout(() => {
88
+ t = !0;
89
+ }, n));
64
90
  };
65
- }, M = function(t, e, n) {
66
- let o, i, s, c, l;
67
- const a = function() {
68
- const u = (/* @__PURE__ */ new Date()).getTime() - c;
69
- u < e && u >= 0 ? o = setTimeout(a, e - u) : (o = null, n || (l = t.apply(s, i), o || (s = i = null)));
91
+ }, M = function(e, n, t) {
92
+ let o, i, c, r, l;
93
+ const u = function() {
94
+ const a = (/* @__PURE__ */ new Date()).getTime() - r;
95
+ a < n && a >= 0 ? o = setTimeout(u, n - a) : (o = null, t || (l = e.apply(c, i), o || (c = i = null)));
70
96
  };
71
97
  return function() {
72
- s = this, i = arguments, c = (/* @__PURE__ */ new Date()).getTime();
73
- const u = n && !o;
74
- return o || (o = setTimeout(a, e)), u && (l = t.apply(s, i), s = i = null), l;
98
+ c = this, i = arguments, r = (/* @__PURE__ */ new Date()).getTime();
99
+ const a = t && !o;
100
+ return o || (o = setTimeout(u, n)), a && (l = e.apply(c, i), c = i = null), l;
75
101
  };
76
- }, B = function(t, e, n) {
77
- let o, i, s, c = null, l = 0;
78
- n || (n = {});
79
- const a = function() {
80
- l = n.leading === !1 ? 0 : (/* @__PURE__ */ new Date()).getTime(), c = null, s = t.apply(o, i), c || (o = i = null);
102
+ }, P = function(e, n, t) {
103
+ let o, i, c, r = null, l = 0;
104
+ t || (t = {});
105
+ const u = function() {
106
+ l = t.leading === !1 ? 0 : (/* @__PURE__ */ new Date()).getTime(), r = null, c = e.apply(o, i), r || (o = i = null);
81
107
  };
82
108
  return function() {
83
- const u = (/* @__PURE__ */ new Date()).getTime();
84
- !l && n.leading === !1 && (l = u);
85
- const d = e - (u - l);
86
- return o = this, i = arguments, d <= 0 || d > e ? (c && (clearTimeout(c), c = null), l = u, s = t.apply(o, i), c || (o = i = null)) : !c && n.trailing !== !1 && (c = setTimeout(a, d)), s;
109
+ const a = (/* @__PURE__ */ new Date()).getTime();
110
+ !l && t.leading === !1 && (l = a);
111
+ const m = n - (a - l);
112
+ return o = this, i = arguments, m <= 0 || m > n ? (r && (clearTimeout(r), r = null), l = a, c = e.apply(o, i), r || (o = i = null)) : !r && t.trailing !== !1 && (r = setTimeout(u, m)), c;
87
113
  };
88
114
  };
89
- function N() {
90
- const t = m.chrome, e = t && t.app && t.app.runtime, n = "history" in m && !!m.history.pushState && !!m.history.replaceState;
91
- return !e && n;
115
+ function R() {
116
+ const e = d.chrome, n = e && e.app && e.app.runtime, t = "history" in d && !!d.history.pushState && !!d.history.replaceState;
117
+ return !n && t;
92
118
  }
93
- const P = () => {
94
- let t = 0;
95
- return document.documentElement && document.documentElement.scrollTop ? t = document.documentElement.scrollTop : document.body && (t = document.body.scrollTop), t;
96
- }, U = () => {
97
- let t = 0;
98
- return document.body.clientHeight && document.documentElement.clientHeight ? t = Math.min(
119
+ const B = () => {
120
+ let e = 0;
121
+ return document.documentElement && document.documentElement.scrollTop ? e = document.documentElement.scrollTop : document.body && (e = document.body.scrollTop), e;
122
+ }, z = () => {
123
+ let e = 0;
124
+ return document.body.clientHeight && document.documentElement.clientHeight ? e = Math.min(
99
125
  document.body.clientHeight,
100
126
  document.documentElement.clientHeight
101
- ) : t = Math.max(
127
+ ) : e = Math.max(
102
128
  document.body.clientHeight,
103
129
  document.documentElement.clientHeight
104
- ), t;
105
- }, L = () => Math.max(
130
+ ), e;
131
+ }, F = () => Math.max(
106
132
  document.body.scrollHeight,
107
133
  document.documentElement.scrollHeight
108
134
  );
109
- function W(t, e) {
110
- let n = Date.now(), o = 0;
135
+ function G(e, n) {
136
+ let t = Date.now(), o = 0;
111
137
  const i = () => {
112
- let s = Date.now();
113
- s - n >= e && (n = s = Date.now(), t()), cancelAnimationFrame(o), o = window.requestAnimationFrame(i);
138
+ let c = Date.now();
139
+ c - t >= n && (t = c = Date.now(), e()), cancelAnimationFrame(o), o = window.requestAnimationFrame(i);
114
140
  };
115
141
  return i(), o;
116
142
  }
143
+ function W(e, n) {
144
+ const t = document.createElement("script");
145
+ t.readyState ? t.onreadystatechange = function() {
146
+ (t.readyState === "loaded" || t.readyState === "complete") && (t.onreadystatechange = null, typeof n == "function" && n());
147
+ } : t.onload = function() {
148
+ typeof n == "function" && n();
149
+ }, t.src = e, document.getElementsByTagName("head")[0].appendChild(t);
150
+ }
151
+ function k(e, n) {
152
+ const t = document.createElement("link");
153
+ t.type = "text/css", t.rel = "stylesheet", t.readyState ? t.onreadystatechange = function() {
154
+ (t.readyState === "loaded" || t.readyState === "complete") && (t.onreadystatechange = null, n());
155
+ } : t.onload = function() {
156
+ n();
157
+ }, t.href = e, document.getElementsByTagName("head")[0].appendChild(t);
158
+ }
159
+ const q = (e, n) => !Object.is(e, n), J = (e) => {
160
+ document.title = e;
161
+ };
117
162
  export {
118
- r as UA,
119
- m as _global,
120
- S as _support,
121
- W as customizeSetInterval,
163
+ s as UA,
164
+ d as _global,
165
+ A as _support,
166
+ N as concatParams,
167
+ G as customizeSetInterval,
122
168
  M as debounce,
123
- U as getClientHeight,
124
- h as getGlobal,
125
- g as getGlobalSupport,
126
- v as getLocationHref,
127
- L as getScrollHeight,
128
- P as getScrollTop,
129
- $ as getUrlParam,
130
- D as htmlElementAsString,
131
- f as inBrowser,
132
- _ as is360zhushou,
133
- T as isAndroid,
134
- H as isChrome,
135
- p as isEdge,
136
- y as isIE,
137
- w as isIE9,
138
- b as isIOS,
139
- x as isMobile,
140
- E as isWeiXin,
141
- O as matchUrlFileName,
142
- A as nativeTryCatch,
143
- C as parseUrlToObj,
144
- N as supportsHistory,
145
- I as throttle,
146
- B as throttle_02
169
+ z as getClientHeight,
170
+ g as getGlobal,
171
+ y as getGlobalSupport,
172
+ D as getLocationHref,
173
+ F as getScrollHeight,
174
+ B as getScrollTop,
175
+ f as getURLParameters,
176
+ I as getUrlParam,
177
+ L as htmlElementAsString,
178
+ p as inBrowser,
179
+ O as is360zhushou,
180
+ x as isAndroid,
181
+ b as isChrome,
182
+ h as isEdge,
183
+ q as isEqual,
184
+ T as isIE,
185
+ E as isIE9,
186
+ S as isIOS,
187
+ _ as isMobile,
188
+ H as isWeiXin,
189
+ W as loadJS,
190
+ k as loadStyle,
191
+ U as matchUrlFileName,
192
+ C as nativeTryCatch,
193
+ $ as parse,
194
+ v as parseUrlToObj,
195
+ J as setDocumentTitle,
196
+ w as stringify,
197
+ R as supportsHistory,
198
+ j as throttle,
199
+ P as throttle_02
147
200
  };
@@ -0,0 +1,30 @@
1
+ /**
2
+ * 经纬度转换工具
3
+ */
4
+ export declare const LatLngConverter: {
5
+ /**
6
+ * 将小数形式的经纬度转换为度分秒格式
7
+ * @param {number} decimal - 小数形式的经纬度(如 116.404)
8
+ * @param {number} [precision=6] - 秒的精度(小数位数)
9
+ * @returns {Object} 包含度、分、秒的对象 { degree: number, minute: number, second: number }
10
+ */
11
+ decimalToDMS(decimal: number, precision?: number): {
12
+ degree: number;
13
+ minute: number;
14
+ second: number;
15
+ };
16
+ /**
17
+ * 将度分秒格式转换为小数形式的经纬度
18
+ * @param {number} degree - 度
19
+ * @param {number} minute - 分
20
+ * @param {number} second - 秒
21
+ * @param {number} [precision=8] - 结果的精度(小数位数)
22
+ * @returns {number} 小数形式的经纬度
23
+ */
24
+ dmsToDecimal(dmsStr: string, precision?: number): number | {
25
+ isMatch: boolean;
26
+ };
27
+ };
28
+ export declare function padZeroNew(n: number): string;
29
+ export declare const padZero: (num: number) => string;
30
+ export declare function switchDMS(data: number, type: string): string;