@unicom-cloud/utils 0.1.27 → 0.1.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (300) hide show
  1. package/case-name/index.js +1 -1
  2. package/caseName.js +1 -1
  3. package/class-name/index.js +1 -1
  4. package/className.js +1 -1
  5. package/clipboard-copy/index.js +1 -1
  6. package/clipboardCopy.js +1 -1
  7. package/constant/address.js +1 -1
  8. package/constant/chineseCharacters.js +1 -1
  9. package/constant/constellations.js +1 -1
  10. package/constant/domain.js +1 -1
  11. package/constant/emoji.js +1 -1
  12. package/constant/identity.js +1 -1
  13. package/constant/index.js +1 -1
  14. package/constant/keyboardCode.js +1 -1
  15. package/constant/licensePlate.js +1 -1
  16. package/constant/name.js +1 -1
  17. package/constant/platform.js +1 -1
  18. package/constant/protocol.js +1 -1
  19. package/constant/ui.js +1 -1
  20. package/constant.js +1 -1
  21. package/content-disposition/index.js +1 -1
  22. package/contentDisposition.js +1 -1
  23. package/cookie/LICENSE +21 -0
  24. package/cookie/index.js +3 -32
  25. package/{js-cookie → cookie}/src/api.js +1 -1
  26. package/{js-cookie → cookie}/src/assign.js +1 -1
  27. package/{js-cookie → cookie}/src/converter.js +1 -1
  28. package/cookie.js +3 -6
  29. package/date/convertTime.js +1 -1
  30. package/date/convertToDuration.js +1 -1
  31. package/date/index.js +1 -1
  32. package/date.js +1 -1
  33. package/decimal/decimal.js +1 -1
  34. package/decimal/index.js +1 -1
  35. package/decimal.js +1 -1
  36. package/dom-helpers/LICENSE +20 -0
  37. package/dom-helpers/activeElement.js +1 -1
  38. package/dom-helpers/addClass.js +1 -1
  39. package/dom-helpers/addEventListener.js +1 -1
  40. package/dom-helpers/animate.js +1 -1
  41. package/dom-helpers/animationFrame.js +1 -1
  42. package/dom-helpers/attribute.js +1 -1
  43. package/dom-helpers/camelize.js +1 -1
  44. package/dom-helpers/camelizeStyle.js +1 -1
  45. package/dom-helpers/canUseDOM.js +1 -1
  46. package/dom-helpers/childElements.js +1 -1
  47. package/dom-helpers/childNodes.js +1 -1
  48. package/dom-helpers/clear.js +1 -1
  49. package/dom-helpers/closest.js +1 -1
  50. package/dom-helpers/collectElements.js +1 -1
  51. package/dom-helpers/collectSiblings.js +1 -1
  52. package/dom-helpers/contains.js +1 -1
  53. package/dom-helpers/css.js +1 -1
  54. package/dom-helpers/filterEventHandler.js +1 -1
  55. package/dom-helpers/getComputedStyle.js +1 -1
  56. package/dom-helpers/getScrollAccessor.js +1 -1
  57. package/dom-helpers/hasClass.js +1 -1
  58. package/dom-helpers/height.js +1 -1
  59. package/dom-helpers/hyphenate.js +1 -1
  60. package/dom-helpers/hyphenateStyle.js +1 -1
  61. package/dom-helpers/index.js +1 -1
  62. package/dom-helpers/insertAfter.js +1 -1
  63. package/dom-helpers/isDocument.js +1 -1
  64. package/dom-helpers/isInput.js +1 -1
  65. package/dom-helpers/isTransform.js +1 -1
  66. package/dom-helpers/isVisible.js +1 -1
  67. package/dom-helpers/isWindow.js +1 -1
  68. package/dom-helpers/listen.js +1 -1
  69. package/dom-helpers/matches.js +1 -1
  70. package/dom-helpers/nextUntil.js +1 -1
  71. package/dom-helpers/offset.js +1 -1
  72. package/dom-helpers/offsetParent.js +1 -1
  73. package/dom-helpers/ownerDocument.js +1 -1
  74. package/dom-helpers/ownerWindow.js +1 -1
  75. package/dom-helpers/parents.js +1 -1
  76. package/dom-helpers/position.js +1 -1
  77. package/dom-helpers/prepend.js +1 -1
  78. package/dom-helpers/querySelectorAll.js +1 -1
  79. package/dom-helpers/reflow.js +1 -1
  80. package/dom-helpers/remove.js +1 -1
  81. package/dom-helpers/removeClass.js +1 -1
  82. package/dom-helpers/removeEventListener.js +1 -1
  83. package/dom-helpers/scrollLeft.js +1 -1
  84. package/dom-helpers/scrollParent.js +1 -1
  85. package/dom-helpers/scrollTo.js +1 -1
  86. package/dom-helpers/scrollTop.js +1 -1
  87. package/dom-helpers/scrollbarSize.js +1 -1
  88. package/dom-helpers/siblings.js +1 -1
  89. package/dom-helpers/text.js +1 -1
  90. package/dom-helpers/toggleClass.js +1 -1
  91. package/dom-helpers/transitionEnd.js +1 -1
  92. package/dom-helpers/triggerEvent.js +1 -1
  93. package/dom-helpers/types.js +1 -1
  94. package/dom-helpers/width.js +1 -1
  95. package/domHelpers.js +1 -1
  96. package/emitter/index.js +1 -1
  97. package/emitter/src/index.js +1 -1
  98. package/emitter.js +1 -1
  99. package/file/fileToURL.js +1 -1
  100. package/file/index.js +1 -1
  101. package/file/saveAs.js +1 -1
  102. package/file.js +1 -1
  103. package/filesize/LICENSE +26 -0
  104. package/idb/index.js +1 -1
  105. package/idb.js +1 -1
  106. package/index.js +1 -1
  107. package/invariant/index.js +1 -1
  108. package/invariant.js +1 -1
  109. package/is/index.js +1 -1
  110. package/is.js +1 -1
  111. package/lodash/LICENSE +47 -0
  112. package/lunar/LICENSE +20 -0
  113. package/lunar/index.js +1 -1
  114. package/lunar/lib/Holiday.js +1 -1
  115. package/lunar/lib/HolidayUtil.js +1 -1
  116. package/lunar/lib/I18n.js +1 -1
  117. package/lunar/lib/JieQi.js +1 -1
  118. package/lunar/lib/Lunar.js +1 -1
  119. package/lunar/lib/LunarMonth.js +1 -1
  120. package/lunar/lib/LunarTime.js +1 -1
  121. package/lunar/lib/LunarUtil.js +1 -1
  122. package/lunar/lib/LunarYear.js +1 -1
  123. package/lunar/lib/ShouXingUtil.js +1 -1
  124. package/lunar/lib/Solar.js +1 -1
  125. package/lunar/lib/SolarHalfYear.js +1 -1
  126. package/lunar/lib/SolarMonth.js +1 -1
  127. package/lunar/lib/SolarSeason.js +1 -1
  128. package/lunar/lib/SolarUtil.js +1 -1
  129. package/lunar/lib/SolarWeek.js +1 -1
  130. package/lunar/lib/SolarYear.js +1 -1
  131. package/lunar/lib/index.js +1 -1
  132. package/lunar.js +1 -1
  133. package/math/index.js +1 -1
  134. package/math.js +1 -1
  135. package/md5/index.js +1 -1
  136. package/md5.js +1 -1
  137. package/mock/MockWebSocket.js +1 -1
  138. package/mock/MockXMLHttpRequest.js +1 -1
  139. package/mock/index.js +1 -1
  140. package/mock.js +1 -1
  141. package/normalize-wheel/ExecutionEnvironment.js +1 -1
  142. package/normalize-wheel/UserAgent_DEPRECATED.js +1 -1
  143. package/normalize-wheel/index.js +1 -1
  144. package/normalize-wheel/isEventSupported.js +1 -1
  145. package/normalizeWheel.js +1 -1
  146. package/number-to-chinese/index.js +1 -1
  147. package/numberToChinese.js +1 -1
  148. package/nzh/cn.js +1 -1
  149. package/nzh/hk.js +1 -1
  150. package/nzh/index.js +1 -1
  151. package/nzh/nzh.js +1 -1
  152. package/nzh/src/autoGet.js +1 -1
  153. package/nzh/src/index.js +1 -1
  154. package/nzh/src/langs/cn_b.js +1 -1
  155. package/nzh/src/langs/cn_s.js +1 -1
  156. package/nzh/src/langs/hk_b.js +1 -1
  157. package/nzh/src/langs/hk_s.js +1 -1
  158. package/nzh/src/utils.js +1 -1
  159. package/nzh.js +1 -1
  160. package/object-keys-sort/index.js +1 -1
  161. package/object-prototype-to-string-call/index.js +1 -1
  162. package/objectKeysSort.js +1 -1
  163. package/objectPrototypeToStringCall.js +1 -1
  164. package/package.json +1 -1
  165. package/pinyin/LICENSE +20 -0
  166. package/pinyin/index.d.ts +6 -0
  167. package/pinyin/index.js +1 -1
  168. package/pinyin/simplified.js +1 -1
  169. package/pinyin/src/core.js +62 -62
  170. package/pinyin/src/simplified.js +1 -1
  171. package/pinyin/src/simplified_dict.js +2 -2
  172. package/pinyin/src/traditional.js +1 -1
  173. package/pinyin/src/traditional_dict.js +1 -1
  174. package/pinyin/traditional.js +1 -1
  175. package/pinyin.js +1 -1
  176. package/query-string/LICENSE +20 -0
  177. package/query-string/base.js +1 -1
  178. package/query-string/index.js +1 -1
  179. package/query-string/splitOnFirst.js +1 -1
  180. package/queryString.js +1 -1
  181. package/random/address.js +1 -1
  182. package/random/constellation.js +1 -1
  183. package/random/image.js +1 -1
  184. package/random/index.js +1 -1
  185. package/random/licensePlate.js +1 -1
  186. package/random/name.js +1 -1
  187. package/random/number.js +1 -1
  188. package/random/text.js +1 -1
  189. package/random/time.js +1 -1
  190. package/random/web.js +1 -1
  191. package/random.js +1 -1
  192. package/screenfull/index.js +1 -1
  193. package/screenfull.js +1 -1
  194. package/sleep/index.js +1 -1
  195. package/sleep.js +1 -1
  196. package/snapdom/LICENSE +20 -0
  197. package/snapdom/index.js +1 -1
  198. package/snapdom/src/api/preCache.js +1 -1
  199. package/snapdom/src/api/snapdom.js +1 -1
  200. package/snapdom/src/core/cache.js +1 -1
  201. package/snapdom/src/core/capture.js +1 -1
  202. package/snapdom/src/core/clone.js +1 -1
  203. package/snapdom/src/core/context.js +1 -1
  204. package/snapdom/src/core/plugins.js +1 -1
  205. package/snapdom/src/core/prepare.js +1 -1
  206. package/snapdom/src/exporters/download.js +1 -1
  207. package/snapdom/src/exporters/toBlob.js +1 -1
  208. package/snapdom/src/exporters/toCanvas.js +1 -1
  209. package/snapdom/src/exporters/toImg.js +1 -1
  210. package/snapdom/src/modules/CSSVar.js +1 -1
  211. package/snapdom/src/modules/background.js +1 -1
  212. package/snapdom/src/modules/changeCSS.js +1 -1
  213. package/snapdom/src/modules/counter.js +1 -1
  214. package/snapdom/src/modules/fonts.js +1 -1
  215. package/snapdom/src/modules/iconFonts.js +1 -1
  216. package/snapdom/src/modules/images.js +1 -1
  217. package/snapdom/src/modules/lineClamp.js +1 -1
  218. package/snapdom/src/modules/pseudo.js +1 -1
  219. package/snapdom/src/modules/rasterize.js +1 -1
  220. package/snapdom/src/modules/snapFetch.js +1 -1
  221. package/snapdom/src/modules/styles.js +1 -1
  222. package/snapdom/src/modules/svgDefs.js +1 -1
  223. package/snapdom/src/utils/browser.js +1 -1
  224. package/snapdom/src/utils/css.js +1 -1
  225. package/snapdom/src/utils/helpers.js +1 -1
  226. package/snapdom/src/utils/image.js +1 -1
  227. package/snapdom.js +1 -1
  228. package/string/index.js +7 -0
  229. package/string.js +5 -0
  230. package/tinycolor/LICENSE +18 -0
  231. package/tinycolor/index.js +1 -1
  232. package/tinycolor/src/conversion.js +1 -1
  233. package/tinycolor/src/css-color-names.js +1 -1
  234. package/tinycolor/src/format-input.js +1 -1
  235. package/tinycolor/src/from-ratio.js +1 -1
  236. package/tinycolor/src/index.js +1 -1
  237. package/tinycolor/src/random.js +1 -1
  238. package/tinycolor/src/readability.js +1 -1
  239. package/tinycolor/src/to-ms-filter.js +1 -1
  240. package/tinycolor/src/utils.js +1 -1
  241. package/tinycolor.js +1 -1
  242. package/tree/index.js +1 -1
  243. package/tree/search/index.js +1 -1
  244. package/tree.js +1 -1
  245. package/tween/index.js +1 -1
  246. package/tween/src/easing.js +1 -1
  247. package/tween/src/tween.js +1 -1
  248. package/tween.js +1 -1
  249. package/types/cookie/index.d.ts +1 -4
  250. package/types/string/index.d.ts +8 -0
  251. package/types/xlsx/index.d.ts +2 -0
  252. package/types/xlsx/xlsx.d.ts +224 -0
  253. package/ui-color/compareColorByRange.js +1 -1
  254. package/ui-color/index.js +1 -1
  255. package/uiColor.js +1 -1
  256. package/url-toolkit/LICENSE +190 -0
  257. package/url-toolkit/index.js +1 -1
  258. package/url-toolkit/src/url-toolkit.js +2 -2
  259. package/urlToolkit.js +1 -1
  260. package/validate/index.js +1 -1
  261. package/validate/src/index.js +1 -1
  262. package/validate/src/locale/en-US.js +1 -1
  263. package/validate/src/locale/zh-CN.js +1 -1
  264. package/validate/src/message.js +1 -1
  265. package/validate/src/rules/array.js +1 -1
  266. package/validate/src/rules/base.js +1 -1
  267. package/validate/src/rules/boolean.js +1 -1
  268. package/validate/src/rules/custom.js +1 -1
  269. package/validate/src/rules/number.js +1 -1
  270. package/validate/src/rules/object.js +1 -1
  271. package/validate/src/rules/string.js +1 -1
  272. package/validate/src/rules/type.js +1 -1
  273. package/validate/src/utils.js +1 -1
  274. package/validate.js +1 -1
  275. package/version/index.js +1 -1
  276. package/version.js +1 -1
  277. package/xlsx/LICENSE +189 -0
  278. package/xlsx/index.d.ts +1139 -0
  279. package/xlsx/index.js +23 -0
  280. package/xlsx/xlsx.js +28329 -0
  281. package/xlsx.js +23 -0
  282. package/axios/chunk/BJvTEV6n.js +0 -253
  283. package/axios/chunk/CB3wlosT.js +0 -64
  284. package/axios/index.d.ts +0 -796
  285. package/axios/index.js +0 -43
  286. package/axios/lib/axios.js +0 -1635
  287. package/axios/lib/utils.js +0 -5
  288. package/axios/mock-adapter/index.d.ts +0 -59
  289. package/axios/mock-adapter/index.js +0 -205
  290. package/axios/mock-adapter/request.js +0 -50
  291. package/axios/mock-adapter/utils.js +0 -130
  292. package/cookie/src/index.js +0 -117
  293. package/js-cookie/index.js +0 -5
  294. package/jsCookie.js +0 -5
  295. package/types/cookie/src/index.d.ts +0 -114
  296. package/types/js-cookie/index.d.ts +0 -1
  297. /package/{js-cookie → cookie}/index.d.ts +0 -0
  298. /package/types/{js-cookie → cookie}/src/api.d.mts +0 -0
  299. /package/types/{js-cookie → cookie}/src/assign.d.mts +0 -0
  300. /package/types/{js-cookie → cookie}/src/converter.d.mts +0 -0
@@ -1,5 +0,0 @@
1
- /* 2025-11-07 13:23:48 */
2
- import { A as f } from "../chunk/BJvTEV6n.js";
3
- export {
4
- f as default
5
- };
@@ -1,59 +0,0 @@
1
- import type {
2
- AxiosAdapter,
3
- AxiosInstance,
4
- AxiosRequestConfig,
5
- } from '../index.js';
6
-
7
- type CallbackResponseSpecFunc = (
8
- config: AxiosRequestConfig,
9
- ) => any[] | Promise<any[]>;
10
-
11
- type ResponseSpecFunc = (
12
- statusOrCallback: number | CallbackResponseSpecFunc,
13
- data?: any,
14
- headers?: any,
15
- ) => MockAdapter;
16
-
17
- interface RequestHandler {
18
- reply: ResponseSpecFunc;
19
- replyOnce: ResponseSpecFunc;
20
-
21
- passThrough(): void;
22
- networkError(): void;
23
- timeout(): void;
24
- }
25
-
26
- interface MockAdapterOptions {
27
- delayResponse?: number;
28
- onNoMatch?: 'passthrough' | 'throwException';
29
- }
30
-
31
- interface RequestDataMatcher {
32
- [index: string]: any;
33
- params?: {
34
- [index: string]: any;
35
- };
36
- }
37
-
38
- type RequestMatcherFunc = (
39
- matcher?: string | RegExp,
40
- body?: string | RequestDataMatcher,
41
- ) => RequestHandler;
42
-
43
- declare class MockAdapter {
44
- constructor(axiosInstance: AxiosInstance, options?: MockAdapterOptions);
45
-
46
- adapter(): AxiosAdapter;
47
- reset(): void;
48
- restore(): void;
49
-
50
- onGet: RequestMatcherFunc;
51
- onPost: RequestMatcherFunc;
52
- onPut: RequestMatcherFunc;
53
- onHead: RequestMatcherFunc;
54
- onDelete: RequestMatcherFunc;
55
- onPatch: RequestMatcherFunc;
56
- onAny: RequestMatcherFunc;
57
- }
58
-
59
- export default MockAdapter;
@@ -1,205 +0,0 @@
1
- /* 2025-11-07 13:23:48 */
2
- import { A as E } from "../chunk/BJvTEV6n.js";
3
- import { request as w } from "./request.js";
4
- import i from "./utils.js";
5
- const A = [
6
- "get",
7
- "post",
8
- "head",
9
- "delete",
10
- "patch",
11
- "put",
12
- "options",
13
- "list",
14
- "link",
15
- "unlink"
16
- ];
17
- function m() {
18
- const r = [];
19
- return A.forEach(function(e) {
20
- Object.defineProperty(r, e, {
21
- get() {
22
- return r.filter(function(n) {
23
- return !n.method || n.method === e;
24
- });
25
- }
26
- });
27
- }), r;
28
- }
29
- class N {
30
- constructor(e, n = {
31
- delayResponse: 27,
32
- onNoMatch: "passthrough"
33
- }) {
34
- if (this.reset(), e)
35
- this.axiosInstance = e, this.axiosInstanceWithoutInterceptors = e.create ? e.create() : void 0, this.originalAdapter = e.defaults.adapter, this.delayResponse = n.delayResponse > 0 ? n.delayResponse : null, this.onNoMatch = n.onNoMatch || null, e.defaults.adapter = this.adapter();
36
- else
37
- throw new Error("Please provide an instance of axios to mock");
38
- }
39
- adapter() {
40
- return (e) => w(this, e);
41
- }
42
- restore() {
43
- this.axiosInstance && (this.axiosInstance.defaults.adapter = this.originalAdapter, this.axiosInstance = void 0);
44
- }
45
- reset() {
46
- this.resetHandlers(), this.resetHistory();
47
- }
48
- resetHandlers() {
49
- this.handlers ? this.handlers.length = 0 : this.handlers = m();
50
- }
51
- resetHistory() {
52
- this.history ? this.history.length = 0 : this.history = m();
53
- }
54
- }
55
- const R = [
56
- "any",
57
- "get",
58
- "delete",
59
- "head",
60
- "options"
61
- ];
62
- function T(r, e, n) {
63
- return R.includes(r) ? O(r, e || {}) : O(r, Object.assign({}, n, { data: e }));
64
- }
65
- const C = ["headers", "params", "data"];
66
- function O(r, e) {
67
- for (const n in e)
68
- if (!C.includes(n))
69
- throw new Error(
70
- `Invalid config property ${JSON.stringify(
71
- n
72
- )} provided to ${g(r)}. Config: ${JSON.stringify(
73
- e
74
- )}`
75
- );
76
- return e;
77
- }
78
- function g(r) {
79
- return `on${r.charAt(0).toUpperCase()}${r.slice(1)}`;
80
- }
81
- A.concat("any").forEach(function(r) {
82
- N.prototype[g(r)] = function(e, n, a) {
83
- const s = this;
84
- let d;
85
- e = e === void 0 ? /.*/ : e;
86
- const o = T(r, n, a);
87
- function c(t, u, p) {
88
- const h = {
89
- url: e,
90
- method: r === "any" ? void 0 : r,
91
- params: o.params,
92
- data: o.data,
93
- headers: o.headers,
94
- replyOnce: !1,
95
- delay: d,
96
- response: E.isFunction(t) ? t : [t, u, p]
97
- };
98
- return y(r, s.handlers, h), s;
99
- }
100
- function x(t) {
101
- d = t;
102
- const u = f.reply.bind(f);
103
- return Object.assign(u, f), u;
104
- }
105
- function l(t, u, p) {
106
- const h = {
107
- url: e,
108
- method: r === "any" ? void 0 : r,
109
- params: o.params,
110
- data: o.data,
111
- headers: o.headers,
112
- replyOnce: !0,
113
- delay: d,
114
- response: E.isFunction(t) ? t : [t, u, p]
115
- };
116
- return y(r, s.handlers, h), s;
117
- }
118
- const f = {
119
- reply: c,
120
- replyOnce: l,
121
- withDelayInMs: x,
122
- passThrough() {
123
- const t = {
124
- passThrough: !0,
125
- method: r === "any" ? void 0 : r,
126
- url: e,
127
- params: o.params,
128
- data: o.data,
129
- headers: o.headers
130
- };
131
- return y(r, s.handlers, t), s;
132
- },
133
- abortRequest() {
134
- return c(async function(t) {
135
- throw i.createAxiosError(
136
- "Request aborted",
137
- t,
138
- void 0,
139
- "ECONNABORTED"
140
- );
141
- });
142
- },
143
- abortRequestOnce() {
144
- return l(async function(t) {
145
- throw i.createAxiosError(
146
- "Request aborted",
147
- t,
148
- void 0,
149
- "ECONNABORTED"
150
- );
151
- });
152
- },
153
- networkError() {
154
- return c(async function(t) {
155
- throw i.createAxiosError("Network Error", t);
156
- });
157
- },
158
- networkErrorOnce() {
159
- return l(async function(t) {
160
- throw i.createAxiosError("Network Error", t);
161
- });
162
- },
163
- timeout() {
164
- return c(async function(t) {
165
- throw i.createAxiosError(
166
- t.timeoutErrorMessage || `timeout of ${t.timeout}ms exceeded`,
167
- t,
168
- void 0,
169
- t.transitional && t.transitional.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED"
170
- );
171
- });
172
- },
173
- timeoutOnce() {
174
- return l(async function(t) {
175
- throw i.createAxiosError(
176
- t.timeoutErrorMessage || `timeout of ${t.timeout}ms exceeded`,
177
- t,
178
- void 0,
179
- t.transitional && t.transitional.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED"
180
- );
181
- });
182
- }
183
- };
184
- return f;
185
- };
186
- });
187
- function M(r, e) {
188
- let n = -1;
189
- for (let a = 0; a < r.length; a += 1) {
190
- const s = r[a], d = s.url instanceof RegExp && e.url instanceof RegExp ? String(s.url) === String(e.url) : s.url === e.url;
191
- (!s.method || s.method === e.method) && d && i.isEqual(s.params, e.params) && i.isEqual(s.data, e.data) && i.isEqual(s.headers, e.headers) && !s.replyOnce && (n = a);
192
- }
193
- return n;
194
- }
195
- function y(r, e, n) {
196
- if (r === "any")
197
- e.push(n);
198
- else {
199
- const a = M(e, n);
200
- a > -1 && !n.replyOnce ? e.splice(a, 1, n) : e.push(n);
201
- }
202
- }
203
- export {
204
- N as default
205
- };
@@ -1,50 +0,0 @@
1
- /* 2025-11-07 13:23:48 */
2
- import { A as l } from "../chunk/BJvTEV6n.js";
3
- import a from "./utils.js";
4
- function u(s, e) {
5
- let t = e.baseURL;
6
- return t && !/^https?:/.test(t) && (t = void 0), l.isFunction(s.originalAdapter) ? s.originalAdapter(e) : s.axiosInstanceWithoutInterceptors(
7
- Object.assign({}, e, {
8
- baseURL: t,
9
- // Use the original adapter, not the mock adapter
10
- adapter: s.originalAdapter,
11
- // The request transformation runs on the original axios handler already
12
- transformRequest: [],
13
- transformResponse: []
14
- })
15
- );
16
- }
17
- function n(s, e) {
18
- return l.isNumber(e.delay) ? e.delay : s.delayResponse;
19
- }
20
- async function i(s, e) {
21
- let t = e.url || "";
22
- e.baseURL && t.substr(0, e.baseURL.length) === e.baseURL && (t = t.slice(e.baseURL.length)), delete e.adapter, s.history.push(e);
23
- const r = a.findHandler(
24
- s.handlers,
25
- e.method,
26
- t,
27
- e.data,
28
- e.params,
29
- e.headers && e.headers.constructor.name === "AxiosHeaders" ? Object.assign({}, e.headers.toJSON()) : e.headers,
30
- e.baseURL
31
- );
32
- if (r)
33
- return r.replyOnce && a.purgeIfReplyOnce(s, r), r.passThrough ? u(s, e) : a.settle(
34
- e,
35
- r.response,
36
- n(s, r)
37
- );
38
- switch (s.onNoMatch) {
39
- case "passthrough":
40
- return u(s, e);
41
- case "throwException":
42
- throw a.createCouldNotFindMockError(e);
43
- default:
44
- return a.settle(e, { status: 404 }, s.delayResponse);
45
- }
46
- }
47
- export {
48
- i as default,
49
- i as request
50
- };
@@ -1,130 +0,0 @@
1
- /* 2025-11-07 13:23:48 */
2
- import O from "lodash/isArrayBuffer.js";
3
- import b from "lodash/isBuffer.js";
4
- import d from "lodash/isEqual.js";
5
- import { A as m } from "../chunk/CB3wlosT.js";
6
- import { A as o } from "../chunk/BJvTEV6n.js";
7
- function p(t, r) {
8
- const n = t.length;
9
- for (let i = 0; i < n; i++) {
10
- const e = t[i];
11
- if (r(e)) return e;
12
- }
13
- }
14
- function w(t) {
15
- return o.isStream(t);
16
- }
17
- function N(t) {
18
- return o.isBlob(t);
19
- }
20
- function l(t, r) {
21
- return t ? `${t.replace(/\/+$/, "")}/${r.replace(/^\/+/, "")}` : r;
22
- }
23
- function E(t, r, n, i, e, c, a) {
24
- return p(t[r.toLowerCase()], function(s) {
25
- let u = !1;
26
- return o.isString(s.url) ? u = h(n, s.url) || h(l(a, n), s.url) : s.url instanceof RegExp && (u = s.url.test(n) || s.url.test(l(a, n))), u && S(i, e, s) && f(c, s.headers);
27
- });
28
- }
29
- function h(t, r) {
30
- const n = t[0] === "/" ? t.substr(1) : t, i = r[0] === "/" ? r.substr(1) : r;
31
- return n === i;
32
- }
33
- function S(t, r, n) {
34
- return f(r, n.params) && y(t, n.data);
35
- }
36
- function f(t, r) {
37
- return r === void 0 ? !0 : o.isFunction(r.asymmetricMatch) ? r.asymmetricMatch(t) : d(t, r);
38
- }
39
- function y(t, r) {
40
- if (r === void 0)
41
- return !0;
42
- let n;
43
- try {
44
- n = JSON.parse(t);
45
- } catch (i) {
46
- console.error(i);
47
- }
48
- return f(n || t, r);
49
- }
50
- function M(t, r) {
51
- const n = t.handlers.indexOf(r);
52
- n > -1 && t.handlers.splice(n, 1);
53
- }
54
- function A(t) {
55
- return O(t) || o.isBuffer(t) || w(t) || N(t) ? t : o.isObject(t) ? JSON.parse(JSON.stringify(t)) : t;
56
- }
57
- async function B(t, r) {
58
- o.isFunction(t) && (t = await t(r));
59
- const n = t.status || t[0], i = A(t.data || t[1]), e = t.headers || t[2];
60
- return t.config && (r = t.config), {
61
- status: n,
62
- data: i,
63
- headers: e,
64
- config: r,
65
- request: { responseURL: r.url }
66
- };
67
- }
68
- async function J(t, r, n) {
69
- n > 0 && await new Promise((e) => setTimeout(e, n));
70
- const i = await B(r, t);
71
- if (!i.config.validateStatus || i.config.validateStatus(i.status))
72
- return i;
73
- throw g(
74
- `Request failed with status code ${i.status}`,
75
- i.config,
76
- i
77
- );
78
- }
79
- function g(t, r, n, i) {
80
- if (o.isFunction(m))
81
- return m.from(new Error(t), i, r, null, n);
82
- const e = new Error(t);
83
- return e.isAxiosError = !0, e.config = r, n !== void 0 && (e.response = n), i !== void 0 && (e.code = i), e.toJSON = function() {
84
- return {
85
- // Standard
86
- message: this.message,
87
- name: this.name,
88
- // Microsoft
89
- description: this.description,
90
- number: this.number,
91
- // Mozilla
92
- fileName: this.fileName,
93
- lineNumber: this.lineNumber,
94
- columnNumber: this.columnNumber,
95
- stack: this.stack,
96
- // Axios
97
- config: this.config,
98
- code: this.code
99
- };
100
- }, e;
101
- }
102
- function k(t) {
103
- const r = `Could not find mock for:
104
- ${JSON.stringify(
105
- {
106
- method: t.method,
107
- url: t.url,
108
- params: t.params,
109
- headers: t.headers
110
- },
111
- null,
112
- 2
113
- )}`, n = new Error(r);
114
- return n.isCouldNotFindMockError = !0, n.url = t.url, n.method = t.method, n;
115
- }
116
- const U = {
117
- createAxiosError: g,
118
- createCouldNotFindMockError: k,
119
- find: p,
120
- findHandler: E,
121
- isBlob: N,
122
- isBodyOrParametersMatching: S,
123
- isBuffer: b,
124
- isEqual: d,
125
- purgeIfReplyOnce: M,
126
- settle: J
127
- };
128
- export {
129
- U as default
130
- };
@@ -1,117 +0,0 @@
1
- /* 2025-11-07 15:27:13 */
2
- const w = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/, g = /^[\u0021-\u003A\u003C-\u007E]*$/, p = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i, S = /^[\u0020-\u003A\u003D-\u007E]*$/, E = Object.prototype.toString, v = /* @__PURE__ */ (() => {
3
- const t = function() {
4
- };
5
- return t.prototype = /* @__PURE__ */ Object.create(null), t;
6
- })();
7
- function k(t, i) {
8
- const e = new v(), a = t.length;
9
- if (a < 2) return e;
10
- const c = i?.decode || b;
11
- let r = 0;
12
- do {
13
- const n = t.indexOf("=", r);
14
- if (n === -1) break;
15
- const u = t.indexOf(";", r), o = u === -1 ? a : u;
16
- if (n > o) {
17
- r = t.lastIndexOf(";", n - 1) + 1;
18
- continue;
19
- }
20
- const d = s(t, r, n), x = m(t, n, d), l = t.slice(d, x);
21
- if (e[l] === void 0) {
22
- const f = s(t, n + 1, o), h = m(t, o, f), y = c(t.slice(f, h));
23
- e[l] = y;
24
- }
25
- r = o + 1;
26
- } while (r < a);
27
- return e;
28
- }
29
- function s(t, i, e) {
30
- do {
31
- const a = t.charCodeAt(i);
32
- if (a !== 32 && a !== 9) return i;
33
- } while (++i < e);
34
- return e;
35
- }
36
- function m(t, i, e) {
37
- for (; i > e; ) {
38
- const a = t.charCodeAt(--i);
39
- if (a !== 32 && a !== 9) return i + 1;
40
- }
41
- return e;
42
- }
43
- function $(t, i, e) {
44
- const a = e?.encode || encodeURIComponent;
45
- if (!w.test(t))
46
- throw new TypeError(`argument name is invalid: ${t}`);
47
- const c = a(i);
48
- if (!g.test(c))
49
- throw new TypeError(`argument val is invalid: ${i}`);
50
- let r = t + "=" + c;
51
- if (!e) return r;
52
- if (e.maxAge !== void 0) {
53
- if (!Number.isInteger(e.maxAge))
54
- throw new TypeError(`option maxAge is invalid: ${e.maxAge}`);
55
- r += "; Max-Age=" + e.maxAge;
56
- }
57
- if (e.domain) {
58
- if (!p.test(e.domain))
59
- throw new TypeError(`option domain is invalid: ${e.domain}`);
60
- r += "; Domain=" + e.domain;
61
- }
62
- if (e.path) {
63
- if (!S.test(e.path))
64
- throw new TypeError(`option path is invalid: ${e.path}`);
65
- r += "; Path=" + e.path;
66
- }
67
- if (e.expires) {
68
- if (!I(e.expires) || !Number.isFinite(e.expires.valueOf()))
69
- throw new TypeError(`option expires is invalid: ${e.expires}`);
70
- r += "; Expires=" + e.expires.toUTCString();
71
- }
72
- if (e.httpOnly && (r += "; HttpOnly"), e.secure && (r += "; Secure"), e.partitioned && (r += "; Partitioned"), e.priority)
73
- switch (typeof e.priority == "string" ? e.priority.toLowerCase() : void 0) {
74
- case "low":
75
- r += "; Priority=Low";
76
- break;
77
- case "medium":
78
- r += "; Priority=Medium";
79
- break;
80
- case "high":
81
- r += "; Priority=High";
82
- break;
83
- default:
84
- throw new TypeError(`option priority is invalid: ${e.priority}`);
85
- }
86
- if (e.sameSite)
87
- switch (typeof e.sameSite == "string" ? e.sameSite.toLowerCase() : e.sameSite) {
88
- case !0:
89
- case "strict":
90
- r += "; SameSite=Strict";
91
- break;
92
- case "lax":
93
- r += "; SameSite=Lax";
94
- break;
95
- case "none":
96
- r += "; SameSite=None";
97
- break;
98
- default:
99
- throw new TypeError(`option sameSite is invalid: ${e.sameSite}`);
100
- }
101
- return r;
102
- }
103
- function b(t) {
104
- if (t.indexOf("%") === -1) return t;
105
- try {
106
- return decodeURIComponent(t);
107
- } catch {
108
- return t;
109
- }
110
- }
111
- function I(t) {
112
- return E.call(t) === "[object Date]";
113
- }
114
- export {
115
- k as parse,
116
- $ as serialize
117
- };
@@ -1,5 +0,0 @@
1
- /* 2025-11-07 15:27:13 */
2
- import { default as o } from "./src/api.js";
3
- export {
4
- o as default
5
- };
package/jsCookie.js DELETED
@@ -1,5 +0,0 @@
1
- /* 2025-11-07 15:27:13 */
2
- import { default as o } from "./js-cookie/src/api.js";
3
- export {
4
- o as default
5
- };
@@ -1,114 +0,0 @@
1
- /**
2
- * Parse options.
3
- */
4
- export interface ParseOptions {
5
- /**
6
- * Specifies a function that will be used to decode a [cookie-value](https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1).
7
- * Since the value of a cookie has a limited character set (and must be a simple string), this function can be used to decode
8
- * a previously-encoded cookie value into a JavaScript string.
9
- *
10
- * The default function is the global `decodeURIComponent`, wrapped in a `try..catch`. If an error
11
- * is thrown it will return the cookie's original value. If you provide your own encode/decode
12
- * scheme you must ensure errors are appropriately handled.
13
- *
14
- * @default decode
15
- */
16
- decode?: (str: string) => string | undefined;
17
- }
18
- /**
19
- * Parse a cookie header.
20
- *
21
- * Parse the given cookie header string into an object
22
- * The object has the various cookies as keys(names) => values
23
- */
24
- export declare function parse(str: string, options?: ParseOptions): Record<string, string | undefined>;
25
- /**
26
- * Serialize options.
27
- */
28
- export interface SerializeOptions {
29
- /**
30
- * Specifies a function that will be used to encode a [cookie-value](https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1).
31
- * Since value of a cookie has a limited character set (and must be a simple string), this function can be used to encode
32
- * a value into a string suited for a cookie's value, and should mirror `decode` when parsing.
33
- *
34
- * @default encodeURIComponent
35
- */
36
- encode?: (str: string) => string;
37
- /**
38
- * Specifies the `number` (in seconds) to be the value for the [`Max-Age` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.2).
39
- *
40
- * The [cookie storage model specification](https://tools.ietf.org/html/rfc6265#section-5.3) states that if both `expires` and
41
- * `maxAge` are set, then `maxAge` takes precedence, but it is possible not all clients by obey this,
42
- * so if both are set, they should point to the same date and time.
43
- */
44
- maxAge?: number;
45
- /**
46
- * Specifies the `Date` object to be the value for the [`Expires` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.1).
47
- * When no expiration is set clients consider this a "non-persistent cookie" and delete it the current session is over.
48
- *
49
- * The [cookie storage model specification](https://tools.ietf.org/html/rfc6265#section-5.3) states that if both `expires` and
50
- * `maxAge` are set, then `maxAge` takes precedence, but it is possible not all clients by obey this,
51
- * so if both are set, they should point to the same date and time.
52
- */
53
- expires?: Date;
54
- /**
55
- * Specifies the value for the [`Domain` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.3).
56
- * When no domain is set clients consider the cookie to apply to the current domain only.
57
- */
58
- domain?: string;
59
- /**
60
- * Specifies the value for the [`Path` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.4).
61
- * When no path is set, the path is considered the ["default path"](https://tools.ietf.org/html/rfc6265#section-5.1.4).
62
- */
63
- path?: string;
64
- /**
65
- * Enables the [`HttpOnly` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.6).
66
- * When enabled, clients will not allow client-side JavaScript to see the cookie in `document.cookie`.
67
- */
68
- httpOnly?: boolean;
69
- /**
70
- * Enables the [`Secure` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.5).
71
- * When enabled, clients will only send the cookie back if the browser has a HTTPS connection.
72
- */
73
- secure?: boolean;
74
- /**
75
- * Enables the [`Partitioned` `Set-Cookie` attribute](https://tools.ietf.org/html/draft-cutler-httpbis-partitioned-cookies/).
76
- * When enabled, clients will only send the cookie back when the current domain _and_ top-level domain matches.
77
- *
78
- * This is an attribute that has not yet been fully standardized, and may change in the future.
79
- * This also means clients may ignore this attribute until they understand it. More information
80
- * about can be found in [the proposal](https://github.com/privacycg/CHIPS).
81
- */
82
- partitioned?: boolean;
83
- /**
84
- * Specifies the value for the [`Priority` `Set-Cookie` attribute](https://tools.ietf.org/html/draft-west-cookie-priority-00#section-4.1).
85
- *
86
- * - `'low'` will set the `Priority` attribute to `Low`.
87
- * - `'medium'` will set the `Priority` attribute to `Medium`, the default priority when not set.
88
- * - `'high'` will set the `Priority` attribute to `High`.
89
- *
90
- * More information about priority levels can be found in [the specification](https://tools.ietf.org/html/draft-west-cookie-priority-00#section-4.1).
91
- */
92
- priority?: 'low' | 'medium' | 'high';
93
- /**
94
- * Specifies the value for the [`SameSite` `Set-Cookie` attribute](https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-09#section-5.4.7).
95
- *
96
- * - `true` will set the `SameSite` attribute to `Strict` for strict same site enforcement.
97
- * - `'lax'` will set the `SameSite` attribute to `Lax` for lax same site enforcement.
98
- * - `'none'` will set the `SameSite` attribute to `None` for an explicit cross-site cookie.
99
- * - `'strict'` will set the `SameSite` attribute to `Strict` for strict same site enforcement.
100
- *
101
- * More information about enforcement levels can be found in [the specification](https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-09#section-5.4.7).
102
- */
103
- sameSite?: boolean | 'lax' | 'strict' | 'none';
104
- }
105
- /**
106
- * Serialize data into a cookie header.
107
- *
108
- * Serialize a name value pair into a cookie string suitable for
109
- * http headers. An optional options object specifies cookie parameters.
110
- *
111
- * serialize('foo', 'bar', { httpOnly: true })
112
- * => "foo=bar; httpOnly"
113
- */
114
- export declare function serialize(name: string, val: string, options?: SerializeOptions): string;
@@ -1 +0,0 @@
1
- export { default } from "./src/api.mjs";
File without changes