@abyss-project/commons-front-core 3.3.2 → 4.0.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.
- package/dist/{CookieConsentSettings.component-tRVw_4zH.js → CookieConsentSettings.component-B06_BnQP.js} +2703 -2118
- package/dist/auth/client/auth-bridge.d.ts +51 -0
- package/dist/auth/client/auth-client.d.ts +125 -0
- package/dist/auth/client/auth-client.spec.d.ts +1 -0
- package/dist/auth/client/capacitor-bridge.d.ts +16 -0
- package/dist/auth/client/index.d.ts +6 -0
- package/dist/auth/client/native-bridge.d.ts +53 -0
- package/dist/auth/client/native-bridge.spec.d.ts +1 -0
- package/dist/auth/client/token-storage.d.ts +31 -0
- package/dist/auth/client/web-bridge.d.ts +13 -0
- package/dist/auth/client/web-bridge.spec.d.ts +1 -0
- package/dist/auth/components/AuthFlow/AuthFlow.component.d.ts +30 -0
- package/dist/auth/components/AuthFlow/AuthFlow.component.spec.d.ts +1 -0
- package/dist/auth/components/AuthFlow/auth-flow.types.d.ts +62 -0
- package/dist/auth/components/AuthFlow/steps/CodeStep.component.d.ts +17 -0
- package/dist/auth/components/AuthFlow/steps/EmailStep.component.d.ts +22 -0
- package/dist/auth/components/AuthFlow/steps/MfaEnrollmentStep.component.d.ts +13 -0
- package/dist/auth/components/AuthFlow/steps/MfaStep.component.d.ts +20 -0
- package/dist/auth/components/AuthFlow/steps/PasskeyNudgeStep.component.d.ts +11 -0
- package/dist/auth/components/AuthFlow/steps/PasswordStep.component.d.ts +17 -0
- package/dist/auth/components/AuthFlow/steps/SignupStep.component.d.ts +24 -0
- package/dist/auth/components/AuthFlow/steps/steps.autocomplete.spec.d.ts +1 -0
- package/dist/auth/components/AuthProviderButtons/AuthProviderButtons.component.d.ts +30 -0
- package/dist/auth/components/MfaRequirementBanner/MfaRequirementBanner.component.d.ts +12 -0
- package/dist/auth/components/MfaRequirementBanner/MfaRequirementBanner.component.spec.d.ts +1 -0
- package/dist/auth/components/ReauthDialog/AuthReauthHost.component.d.ts +8 -0
- package/dist/auth/components/ReauthDialog/ReauthDialog.component.d.ts +22 -0
- package/dist/auth/components/ReauthDialog/ReauthDialog.component.spec.d.ts +1 -0
- package/dist/auth/components/SecuritySettings/SecuritySettings.component.d.ts +7 -0
- package/dist/auth/components/SecuritySettings/SecuritySettings.component.spec.d.ts +1 -0
- package/dist/auth/components/SecuritySettings/sections/EmailSection.component.d.ts +6 -0
- package/dist/auth/components/SecuritySettings/sections/PasskeysSection.component.d.ts +10 -0
- package/dist/auth/components/SecuritySettings/sections/PasswordSection.component.d.ts +9 -0
- package/dist/auth/components/SecuritySettings/sections/RecoveryCodesSection.component.d.ts +10 -0
- package/dist/auth/components/SecuritySettings/sections/SecuritySection.component.d.ts +26 -0
- package/dist/auth/components/SecuritySettings/sections/SessionsSection.component.d.ts +8 -0
- package/dist/auth/components/SecuritySettings/sections/TotpSection.component.d.ts +11 -0
- package/dist/auth/components/SecuritySettings/sections/use-section-action.hook.d.ts +9 -0
- package/dist/auth/components/index.d.ts +11 -0
- package/dist/auth/components/shared/AuthStepFrame.component.d.ts +19 -0
- package/dist/auth/components/shared/OneTimeCodeField.component.d.ts +17 -0
- package/dist/auth/components/shared/RecoveryCodesPanel.component.d.ts +12 -0
- package/dist/auth/components/shared/TotpSetupPanel.component.d.ts +14 -0
- package/dist/auth/components/shared/auth-errors.d.ts +42 -0
- package/dist/auth/components/shared/mfa-status-events.d.ts +2 -0
- package/dist/auth/components/shared/passkey-ceremonies.d.ts +17 -0
- package/dist/auth/components/shared/use-async-resource.hook.d.ts +18 -0
- package/dist/auth/components/shared/use-offline.hook.d.ts +2 -0
- package/dist/auth/components/shared/use-passkey-name.hook.d.ts +5 -0
- package/dist/auth/components/test-support/auth-sdk.mock.d.ts +57 -0
- package/dist/auth/components/test-support/auth-test-harness.d.ts +48 -0
- package/dist/auth/index.d.ts +2 -0
- package/dist/auth/react/AuthProvider.component.d.ts +15 -0
- package/dist/auth/react/AuthProvider.component.spec.d.ts +1 -0
- package/dist/auth/react/use-auth.hook.d.ts +3 -0
- package/dist/auth-client.d.ts +2 -0
- package/dist/auth-client.js +26 -0
- package/dist/auth-native.d.ts +2 -0
- package/dist/auth-native.js +84 -0
- package/dist/components/Layouts/AbyssLayoutProvider/AbyssLayoutProvider.component.d.ts +2 -3
- package/dist/components/Layouts/AbyssLayoutProvider/abyss-layout.store.d.ts +1 -1
- package/dist/components/Support/SupportTicketDetail.mobile-layout.spec.d.ts +1 -0
- package/dist/cookie-consent.js +1 -1
- package/dist/hooks/use-rich-intl.hook.d.ts +654 -4
- package/dist/{index-g_LMIl_j.js → index-B99FVtM1.js} +2 -2
- package/dist/{index-Cy5aV6-7.js → index-BAiia-Dl.js} +4 -4
- package/dist/{index-CSOs_Ccx.js → index-BI56obfe.js} +1 -1
- package/dist/{index-sAQE8yH0.js → index-BLjfAtDQ.js} +2 -2
- package/dist/{index-BHSTpRDB.js → index-BQMgvLh9.js} +4 -4
- package/dist/{index-Bb8UEu0K.js → index-BU5c0hG9.js} +3 -3
- package/dist/{index-CJghyDOF.js → index-B_rGVaUU.js} +2 -2
- package/dist/{index-nT4uFN7k.js → index-BokeagcV.js} +3 -3
- package/dist/{index-N73aWpoj.js → index-C36LEiRs.js} +2 -2
- package/dist/{index-Dn4CNQkV.js → index-C4fkwJmM.js} +2 -2
- package/dist/{index-TbU1rvxC.js → index-COBKSaJ6.js} +2 -2
- package/dist/{index-DUuSQC1S.js → index-CQcl-JnX.js} +2 -2
- package/dist/{index-BDwKynBn.js → index-Cp_oEtd_.js} +33265 -30088
- package/dist/{index-DUxqfZmd.js → index-D1vKJSB3.js} +3 -3
- package/dist/index-D7cgykJH.js +324 -0
- package/dist/{index-C2SpycHF.js → index-DA5MOwJ6.js} +2 -2
- package/dist/{index-DDBCCwMT.js → index-DAEl7d3x.js} +2 -2
- package/dist/{index-D84kdr5l.js → index-DPDhWaXC.js} +2 -2
- package/dist/{index-Hf4VgoUQ.js → index-Dy57KM7a.js} +2 -2
- package/dist/{index-BDI9bSnM.js → index-QsS__hk5.js} +3 -3
- package/dist/{index-D8hjJcQ2.js → index-cHPTPlez.js} +2 -2
- package/dist/{index-DlNShbQC.js → index-pmj-p-Pq.js} +2 -2
- package/dist/{index-DcZU8Tc4.js → index-rgzxHuXo.js} +4 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +273 -242
- package/dist/token-storage-D3e11ePD.js +38 -0
- package/dist/translations/en.d.ts +289 -0
- package/dist/translations/fr.d.ts +289 -0
- package/dist/translations/translations-parity.spec.d.ts +1 -0
- package/dist/use-auth.hook-B_TU5W3g.js +391 -0
- package/dist/utils/billing.utils.d.ts +2 -2
- package/dist/utils/cookie.utils.d.ts +1 -1
- package/dist/utils/space-display-name.utils.d.ts +2 -2
- package/package.json +32 -10
- package/scripts/check-auth-entry-isolation.cjs +140 -0
- package/vite.config.ts +24 -1
- package/vitest.config.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E as d, L as y, h as b, a as _, p as g, e as u, s as S, i as T, f as k, j as W, t } from "./index-
|
|
2
|
-
import { html as j } from "./index-
|
|
3
|
-
import { L as X, E as p } from "./index-
|
|
1
|
+
import { E as d, L as y, h as b, a as _, p as g, e as u, s as S, i as T, f as k, j as W, t } from "./index-Cp_oEtd_.js";
|
|
2
|
+
import { html as j } from "./index-BQMgvLh9.js";
|
|
3
|
+
import { L as X, E as p } from "./index-BI56obfe.js";
|
|
4
4
|
const Y = 1, U = 2, G = 3, R = 179, z = 4, v = 180, x = 5, Z = 181, V = 6;
|
|
5
5
|
function E(O) {
|
|
6
6
|
return O >= 65 && O <= 90 || O >= 97 && O <= 122;
|
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
/*! Capacitor: https://capacitorjs.com/ - MIT License */
|
|
2
|
+
var P;
|
|
3
|
+
(function(r) {
|
|
4
|
+
r.Unimplemented = "UNIMPLEMENTED", r.Unavailable = "UNAVAILABLE";
|
|
5
|
+
})(P || (P = {}));
|
|
6
|
+
class x extends Error {
|
|
7
|
+
constructor(e, t, i) {
|
|
8
|
+
super(e), this.message = e, this.code = t, this.data = i;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
const _ = (r) => {
|
|
12
|
+
var e, t;
|
|
13
|
+
return r != null && r.androidBridge ? "android" : !((t = (e = r == null ? void 0 : r.webkit) === null || e === void 0 ? void 0 : e.messageHandlers) === null || t === void 0) && t.bridge ? "ios" : "web";
|
|
14
|
+
}, q = (r) => {
|
|
15
|
+
const e = r.CapacitorCustomPlatform || null, t = r.Capacitor || {}, i = t.Plugins = t.Plugins || {}, s = () => e !== null ? e.name : _(r), n = () => s() !== "web", a = (o) => {
|
|
16
|
+
const c = w.get(o);
|
|
17
|
+
return !!(c != null && c.platforms.has(s()) || d(o));
|
|
18
|
+
}, d = (o) => {
|
|
19
|
+
var c;
|
|
20
|
+
return (c = t.PluginHeaders) === null || c === void 0 ? void 0 : c.find((E) => E.name === o);
|
|
21
|
+
}, u = (o) => r.console.error(o), w = /* @__PURE__ */ new Map(), L = (o, c = {}) => {
|
|
22
|
+
const E = w.get(o);
|
|
23
|
+
if (E)
|
|
24
|
+
return console.warn(`Capacitor plugin "${o}" already registered. Cannot register plugins twice.`), E.proxy;
|
|
25
|
+
const p = s(), v = d(o);
|
|
26
|
+
let b;
|
|
27
|
+
const W = async () => (!b && p in c ? b = typeof c[p] == "function" ? b = await c[p]() : b = c[p] : e !== null && !b && "web" in c && (b = typeof c.web == "function" ? b = await c.web() : b = c.web), b), D = (l, f) => {
|
|
28
|
+
var g, y;
|
|
29
|
+
if (v) {
|
|
30
|
+
const m = v == null ? void 0 : v.methods.find((h) => f === h.name);
|
|
31
|
+
if (m)
|
|
32
|
+
return m.rtype === "promise" ? (h) => t.nativePromise(o, f.toString(), h) : (h, C) => t.nativeCallback(o, f.toString(), h, C);
|
|
33
|
+
if (l)
|
|
34
|
+
return (g = l[f]) === null || g === void 0 ? void 0 : g.bind(l);
|
|
35
|
+
} else {
|
|
36
|
+
if (l)
|
|
37
|
+
return (y = l[f]) === null || y === void 0 ? void 0 : y.bind(l);
|
|
38
|
+
throw new x(`"${o}" plugin is not implemented on ${p}`, P.Unimplemented);
|
|
39
|
+
}
|
|
40
|
+
}, O = (l) => {
|
|
41
|
+
let f;
|
|
42
|
+
const g = (...y) => {
|
|
43
|
+
const m = W().then((h) => {
|
|
44
|
+
const C = D(h, l);
|
|
45
|
+
if (C) {
|
|
46
|
+
const k = C(...y);
|
|
47
|
+
return f = k == null ? void 0 : k.remove, k;
|
|
48
|
+
} else
|
|
49
|
+
throw new x(`"${o}.${l}()" is not implemented on ${p}`, P.Unimplemented);
|
|
50
|
+
});
|
|
51
|
+
return l === "addListener" && (m.remove = async () => f()), m;
|
|
52
|
+
};
|
|
53
|
+
return g.toString = () => `${l.toString()}() { [capacitor code] }`, Object.defineProperty(g, "name", {
|
|
54
|
+
value: l,
|
|
55
|
+
writable: !1,
|
|
56
|
+
configurable: !1
|
|
57
|
+
}), g;
|
|
58
|
+
}, U = O("addListener"), j = O("removeListener"), F = (l, f) => {
|
|
59
|
+
const g = U({ eventName: l }, f), y = async () => {
|
|
60
|
+
const h = await g;
|
|
61
|
+
j({
|
|
62
|
+
eventName: l,
|
|
63
|
+
callbackId: h
|
|
64
|
+
}, f);
|
|
65
|
+
}, m = new Promise((h) => g.then(() => h({ remove: y })));
|
|
66
|
+
return m.remove = async () => {
|
|
67
|
+
console.warn("Using addListener() without 'await' is deprecated."), await y();
|
|
68
|
+
}, m;
|
|
69
|
+
}, $ = new Proxy({}, {
|
|
70
|
+
get(l, f) {
|
|
71
|
+
switch (f) {
|
|
72
|
+
// https://github.com/facebook/react/issues/20030
|
|
73
|
+
case "$$typeof":
|
|
74
|
+
return;
|
|
75
|
+
case "toJSON":
|
|
76
|
+
return () => ({});
|
|
77
|
+
case "addListener":
|
|
78
|
+
return v ? F : U;
|
|
79
|
+
case "removeListener":
|
|
80
|
+
return j;
|
|
81
|
+
default:
|
|
82
|
+
return O(f);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
return i[o] = $, w.set(o, {
|
|
87
|
+
name: o,
|
|
88
|
+
proxy: $,
|
|
89
|
+
platforms: /* @__PURE__ */ new Set([...Object.keys(c), ...v ? [p] : []])
|
|
90
|
+
}), $;
|
|
91
|
+
};
|
|
92
|
+
return t.convertFileSrc || (t.convertFileSrc = (o) => o), t.getPlatform = s, t.handleError = u, t.isNativePlatform = n, t.isPluginAvailable = a, t.registerPlugin = L, t.Exception = x, t.DEBUG = !!t.DEBUG, t.isLoggingEnabled = !!t.isLoggingEnabled, t;
|
|
93
|
+
}, B = (r) => r.Capacitor = q(r), A = /* @__PURE__ */ B(typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {}), H = A.registerPlugin;
|
|
94
|
+
class R {
|
|
95
|
+
constructor() {
|
|
96
|
+
this.listeners = {}, this.retainedEventArguments = {}, this.windowListeners = {};
|
|
97
|
+
}
|
|
98
|
+
addListener(e, t) {
|
|
99
|
+
let i = !1;
|
|
100
|
+
this.listeners[e] || (this.listeners[e] = [], i = !0), this.listeners[e].push(t);
|
|
101
|
+
const n = this.windowListeners[e];
|
|
102
|
+
n && !n.registered && this.addWindowListener(n), i && this.sendRetainedArgumentsForEvent(e);
|
|
103
|
+
const a = async () => this.removeListener(e, t);
|
|
104
|
+
return Promise.resolve({ remove: a });
|
|
105
|
+
}
|
|
106
|
+
async removeAllListeners() {
|
|
107
|
+
this.listeners = {};
|
|
108
|
+
for (const e in this.windowListeners)
|
|
109
|
+
this.removeWindowListener(this.windowListeners[e]);
|
|
110
|
+
this.windowListeners = {};
|
|
111
|
+
}
|
|
112
|
+
notifyListeners(e, t, i) {
|
|
113
|
+
const s = this.listeners[e];
|
|
114
|
+
if (!s) {
|
|
115
|
+
if (i) {
|
|
116
|
+
let n = this.retainedEventArguments[e];
|
|
117
|
+
n || (n = []), n.push(t), this.retainedEventArguments[e] = n;
|
|
118
|
+
}
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
s.forEach((n) => n(t));
|
|
122
|
+
}
|
|
123
|
+
hasListeners(e) {
|
|
124
|
+
var t;
|
|
125
|
+
return !!(!((t = this.listeners[e]) === null || t === void 0) && t.length);
|
|
126
|
+
}
|
|
127
|
+
registerWindowListener(e, t) {
|
|
128
|
+
this.windowListeners[t] = {
|
|
129
|
+
registered: !1,
|
|
130
|
+
windowEventName: e,
|
|
131
|
+
pluginEventName: t,
|
|
132
|
+
handler: (i) => {
|
|
133
|
+
this.notifyListeners(t, i);
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
unimplemented(e = "not implemented") {
|
|
138
|
+
return new A.Exception(e, P.Unimplemented);
|
|
139
|
+
}
|
|
140
|
+
unavailable(e = "not available") {
|
|
141
|
+
return new A.Exception(e, P.Unavailable);
|
|
142
|
+
}
|
|
143
|
+
async removeListener(e, t) {
|
|
144
|
+
const i = this.listeners[e];
|
|
145
|
+
if (!i)
|
|
146
|
+
return;
|
|
147
|
+
const s = i.indexOf(t);
|
|
148
|
+
this.listeners[e].splice(s, 1), this.listeners[e].length || this.removeWindowListener(this.windowListeners[e]);
|
|
149
|
+
}
|
|
150
|
+
addWindowListener(e) {
|
|
151
|
+
window.addEventListener(e.windowEventName, e.handler), e.registered = !0;
|
|
152
|
+
}
|
|
153
|
+
removeWindowListener(e) {
|
|
154
|
+
e && (window.removeEventListener(e.windowEventName, e.handler), e.registered = !1);
|
|
155
|
+
}
|
|
156
|
+
sendRetainedArgumentsForEvent(e) {
|
|
157
|
+
const t = this.retainedEventArguments[e];
|
|
158
|
+
t && (delete this.retainedEventArguments[e], t.forEach((i) => {
|
|
159
|
+
this.notifyListeners(e, i);
|
|
160
|
+
}));
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
const S = (r) => encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape), T = (r) => r.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
164
|
+
class I extends R {
|
|
165
|
+
async getCookies() {
|
|
166
|
+
const e = document.cookie, t = {};
|
|
167
|
+
return e.split(";").forEach((i) => {
|
|
168
|
+
if (i.length <= 0)
|
|
169
|
+
return;
|
|
170
|
+
let [s, n] = i.replace(/=/, "CAP_COOKIE").split("CAP_COOKIE");
|
|
171
|
+
s = T(s).trim(), n = T(n).trim(), t[s] = n;
|
|
172
|
+
}), t;
|
|
173
|
+
}
|
|
174
|
+
async setCookie(e) {
|
|
175
|
+
try {
|
|
176
|
+
const t = S(e.key), i = S(e.value), s = `; expires=${(e.expires || "").replace("expires=", "")}`, n = (e.path || "/").replace("path=", ""), a = e.url != null && e.url.length > 0 ? `domain=${e.url}` : "";
|
|
177
|
+
document.cookie = `${t}=${i || ""}${s}; path=${n}; ${a};`;
|
|
178
|
+
} catch (t) {
|
|
179
|
+
return Promise.reject(t);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
async deleteCookie(e) {
|
|
183
|
+
try {
|
|
184
|
+
document.cookie = `${e.key}=; Max-Age=0`;
|
|
185
|
+
} catch (t) {
|
|
186
|
+
return Promise.reject(t);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
async clearCookies() {
|
|
190
|
+
try {
|
|
191
|
+
const e = document.cookie.split(";") || [];
|
|
192
|
+
for (const t of e)
|
|
193
|
+
document.cookie = t.replace(/^ +/, "").replace(/=.*/, `=;expires=${(/* @__PURE__ */ new Date()).toUTCString()};path=/`);
|
|
194
|
+
} catch (e) {
|
|
195
|
+
return Promise.reject(e);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
async clearAllCookies() {
|
|
199
|
+
try {
|
|
200
|
+
await this.clearCookies();
|
|
201
|
+
} catch (e) {
|
|
202
|
+
return Promise.reject(e);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
H("CapacitorCookies", {
|
|
207
|
+
web: () => new I()
|
|
208
|
+
});
|
|
209
|
+
const M = async (r) => new Promise((e, t) => {
|
|
210
|
+
const i = new FileReader();
|
|
211
|
+
i.onload = () => {
|
|
212
|
+
const s = i.result;
|
|
213
|
+
e(s.indexOf(",") >= 0 ? s.split(",")[1] : s);
|
|
214
|
+
}, i.onerror = (s) => t(s), i.readAsDataURL(r);
|
|
215
|
+
}), K = (r = {}) => {
|
|
216
|
+
const e = Object.keys(r);
|
|
217
|
+
return Object.keys(r).map((s) => s.toLocaleLowerCase()).reduce((s, n, a) => (s[n] = r[e[a]], s), {});
|
|
218
|
+
}, G = (r, e = !0) => r ? Object.entries(r).reduce((i, s) => {
|
|
219
|
+
const [n, a] = s;
|
|
220
|
+
let d, u;
|
|
221
|
+
return Array.isArray(a) ? (u = "", a.forEach((w) => {
|
|
222
|
+
d = e ? encodeURIComponent(w) : w, u += `${n}=${d}&`;
|
|
223
|
+
}), u.slice(0, -1)) : (d = e ? encodeURIComponent(a) : a, u = `${n}=${d}`), `${i}&${u}`;
|
|
224
|
+
}, "").substr(1) : null, z = (r, e = {}) => {
|
|
225
|
+
const t = Object.assign({ method: r.method || "GET", headers: r.headers }, e), s = K(r.headers)["content-type"] || "";
|
|
226
|
+
if (typeof r.data == "string")
|
|
227
|
+
t.body = r.data;
|
|
228
|
+
else if (s.includes("application/x-www-form-urlencoded")) {
|
|
229
|
+
const n = new URLSearchParams();
|
|
230
|
+
for (const [a, d] of Object.entries(r.data || {}))
|
|
231
|
+
n.set(a, d);
|
|
232
|
+
t.body = n.toString();
|
|
233
|
+
} else if (s.includes("multipart/form-data") || r.data instanceof FormData) {
|
|
234
|
+
const n = new FormData();
|
|
235
|
+
if (r.data instanceof FormData)
|
|
236
|
+
r.data.forEach((d, u) => {
|
|
237
|
+
n.append(u, d);
|
|
238
|
+
});
|
|
239
|
+
else
|
|
240
|
+
for (const d of Object.keys(r.data))
|
|
241
|
+
n.append(d, r.data[d]);
|
|
242
|
+
t.body = n;
|
|
243
|
+
const a = new Headers(t.headers);
|
|
244
|
+
a.delete("content-type"), t.headers = a;
|
|
245
|
+
} else (s.includes("application/json") || typeof r.data == "object") && (t.body = JSON.stringify(r.data));
|
|
246
|
+
return t;
|
|
247
|
+
};
|
|
248
|
+
class V extends R {
|
|
249
|
+
/**
|
|
250
|
+
* Perform an Http request given a set of options
|
|
251
|
+
* @param options Options to build the HTTP request
|
|
252
|
+
*/
|
|
253
|
+
async request(e) {
|
|
254
|
+
const t = z(e, e.webFetchExtra), i = G(e.params, e.shouldEncodeUrlParams), s = i ? `${e.url}?${i}` : e.url, n = await fetch(s, t), a = n.headers.get("content-type") || "";
|
|
255
|
+
let { responseType: d = "text" } = n.ok ? e : {};
|
|
256
|
+
a.includes("application/json") && (d = "json");
|
|
257
|
+
let u, w;
|
|
258
|
+
switch (d) {
|
|
259
|
+
case "arraybuffer":
|
|
260
|
+
case "blob":
|
|
261
|
+
w = await n.blob(), u = await M(w);
|
|
262
|
+
break;
|
|
263
|
+
case "json":
|
|
264
|
+
u = await n.json();
|
|
265
|
+
break;
|
|
266
|
+
case "document":
|
|
267
|
+
case "text":
|
|
268
|
+
default:
|
|
269
|
+
u = await n.text();
|
|
270
|
+
}
|
|
271
|
+
const L = {};
|
|
272
|
+
return n.headers.forEach((o, c) => {
|
|
273
|
+
L[c] = o;
|
|
274
|
+
}), {
|
|
275
|
+
data: u,
|
|
276
|
+
headers: L,
|
|
277
|
+
status: n.status,
|
|
278
|
+
url: n.url
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Perform an Http GET request given a set of options
|
|
283
|
+
* @param options Options to build the HTTP request
|
|
284
|
+
*/
|
|
285
|
+
async get(e) {
|
|
286
|
+
return this.request(Object.assign(Object.assign({}, e), { method: "GET" }));
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Perform an Http POST request given a set of options
|
|
290
|
+
* @param options Options to build the HTTP request
|
|
291
|
+
*/
|
|
292
|
+
async post(e) {
|
|
293
|
+
return this.request(Object.assign(Object.assign({}, e), { method: "POST" }));
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Perform an Http PUT request given a set of options
|
|
297
|
+
* @param options Options to build the HTTP request
|
|
298
|
+
*/
|
|
299
|
+
async put(e) {
|
|
300
|
+
return this.request(Object.assign(Object.assign({}, e), { method: "PUT" }));
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Perform an Http PATCH request given a set of options
|
|
304
|
+
* @param options Options to build the HTTP request
|
|
305
|
+
*/
|
|
306
|
+
async patch(e) {
|
|
307
|
+
return this.request(Object.assign(Object.assign({}, e), { method: "PATCH" }));
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Perform an Http DELETE request given a set of options
|
|
311
|
+
* @param options Options to build the HTTP request
|
|
312
|
+
*/
|
|
313
|
+
async delete(e) {
|
|
314
|
+
return this.request(Object.assign(Object.assign({}, e), { method: "DELETE" }));
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
H("CapacitorHttp", {
|
|
318
|
+
web: () => new V()
|
|
319
|
+
});
|
|
320
|
+
export {
|
|
321
|
+
A as C,
|
|
322
|
+
R as W,
|
|
323
|
+
H as r
|
|
324
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as G, E as A, C as N } from "./index-
|
|
2
|
-
import { s as I, t as p, E as Y, a as j, L as U, e as k, h as Z, i as B, f as D, H as M } from "./index-
|
|
1
|
+
import { L as G, E as A, C as N } from "./index-BI56obfe.js";
|
|
2
|
+
import { s as I, t as p, E as Y, a as j, L as U, e as k, h as Z, i as B, f as D, H as M } from "./index-Cp_oEtd_.js";
|
|
3
3
|
const h = 1, F = 2, L = 3, H = 4, K = 5, J = 36, ee = 37, te = 38, Oe = 11, oe = 13;
|
|
4
4
|
function re(e) {
|
|
5
5
|
return e == 45 || e == 46 || e == 58 || e >= 65 && e <= 90 || e == 95 || e >= 97 && e <= 122 || e >= 161;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as r } from "./index-
|
|
2
|
-
import { s as e, t as O, a as s, L as X, i as l, f as Y, c as $, j as S, m as o, g as t } from "./index-
|
|
1
|
+
import { L as r } from "./index-BI56obfe.js";
|
|
2
|
+
import { s as e, t as O, a as s, L as X, i as l, f as Y, c as $, j as S, m as o, g as t } from "./index-Cp_oEtd_.js";
|
|
3
3
|
const Z = e({
|
|
4
4
|
null: O.null,
|
|
5
5
|
instanceof: O.operatorKeyword,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as D, E as h, C as L } from "./index-
|
|
2
|
-
import { s as H, t as n, b as B, a as K, L as M, e as OO, i as eO, f as iO, j as f, g as aO, o as nO, I as rO, d as QO, n as d } from "./index-
|
|
1
|
+
import { L as D, E as h, C as L } from "./index-BI56obfe.js";
|
|
2
|
+
import { s as H, t as n, b as B, a as K, L as M, e as OO, i as eO, f as iO, j as f, g as aO, o as nO, I as rO, d as QO, n as d } from "./index-Cp_oEtd_.js";
|
|
3
3
|
const tO = 1, Z = 194, j = 195, oO = 196, x = 197, dO = 198, sO = 199, lO = 200, TO = 2, E = 3, u = 201, SO = 24, pO = 25, qO = 49, gO = 50, PO = 55, mO = 56, $O = 57, hO = 59, cO = 60, fO = 61, XO = 62, yO = 63, zO = 65, WO = 238, vO = 71, RO = 241, kO = 242, _O = 243, xO = 244, uO = 245, UO = 246, bO = 247, VO = 248, Y = 72, GO = 249, wO = 250, ZO = 251, jO = 252, EO = 253, YO = 254, FO = 255, CO = 256, JO = 73, AO = 77, IO = 263, NO = 112, DO = 130, LO = 151, HO = 152, BO = 155, p = 10, q = 13, k = 32, c = 9, _ = 35, KO = 40, MO = 46, R = 123, U = 125, F = 39, C = 34, b = 92, Oe = 111, ee = 120, ie = 78, ae = 117, ne = 85, re = /* @__PURE__ */ new Set([
|
|
4
4
|
pO,
|
|
5
5
|
qO,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as W, E as i, C as B } from "./index-
|
|
2
|
-
import { s as U, t as n, a as C, L as b, p as E, i as u, f as M, j as v, g as N } from "./index-
|
|
1
|
+
import { L as W, E as i, C as B } from "./index-BI56obfe.js";
|
|
2
|
+
import { s as U, t as n, a as C, L as b, p as E, i as u, f as M, j as v, g as N } from "./index-Cp_oEtd_.js";
|
|
3
3
|
const c = 63, D = 64, j = 1, A = 2, y = 3, H = 4, Z = 5, F = 6, I = 7, z = 65, K = 66, J = 8, OO = 9, eO = 10, aO = 11, rO = 12, V = 13, tO = 19, nO = 20, oO = 29, PO = 33, QO = 34, sO = 47, lO = 0, T = 1, g = 2, d = 3, m = 4;
|
|
4
4
|
class s {
|
|
5
5
|
constructor(e, a, r) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as t, L as i, i as n, f as $, c as y, g as P, s as X, t as O } from "./index-
|
|
2
|
-
import { defineCSSCompletionSource as m } from "./index-
|
|
3
|
-
import { L as c, E as S } from "./index-
|
|
1
|
+
import { a as t, L as i, i as n, f as $, c as y, g as P, s as X, t as O } from "./index-Cp_oEtd_.js";
|
|
2
|
+
import { defineCSSCompletionSource as m } from "./index-cHPTPlez.js";
|
|
3
|
+
import { L as c, E as S } from "./index-BI56obfe.js";
|
|
4
4
|
const f = 110, l = 1, s = 2, r = [
|
|
5
5
|
9,
|
|
6
6
|
10,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as w, E as p, a as Y } from "./index-
|
|
2
|
-
import { s as x, t as r, a as q, L as j, e as G, i as R, f as T, c as E, g as _, o as C, I as U } from "./index-
|
|
1
|
+
import { L as w, E as p, a as Y } from "./index-BI56obfe.js";
|
|
2
|
+
import { s as x, t as r, a as q, L as j, e as G, i as R, f as T, c as E, g as _, o as C, I as U } from "./index-Cp_oEtd_.js";
|
|
3
3
|
const V = 122, g = 1, Z = 123, W = 124, b = 2, N = 125, I = 3, F = 4, X = [
|
|
4
4
|
9,
|
|
5
5
|
10,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as te, a as re, i as ae, f as ne, s as ie, c as se, t as i, b as oe, d as le, e as ce } from "./index-
|
|
2
|
-
import { L as de, E as me } from "./index-
|
|
1
|
+
import { L as te, a as re, i as ae, f as ne, s as ie, c as se, t as i, b as oe, d as le, e as ce } from "./index-Cp_oEtd_.js";
|
|
2
|
+
import { L as de, E as me } from "./index-BI56obfe.js";
|
|
3
3
|
const ue = 36, B = 1, pe = 2, y = 3, C = 4, fe = 5, _e = 6, ge = 7, he = 8, ye = 9, be = 10, ve = 11, ke = 12, xe = 13, Oe = 14, we = 15, Qe = 16, Ce = 17, X = 18, Se = 19, A = 20, E = 21, I = 22, qe = 23, Pe = 24;
|
|
4
4
|
function q(t) {
|
|
5
5
|
return t >= 65 && t <= 90 || t >= 97 && t <= 122 || t >= 48 && t <= 57;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as p, L as u, p as n, s as l, t as e } from "./index-
|
|
2
|
-
import { html as m } from "./index-
|
|
3
|
-
import { javascriptLanguage as b } from "./index-
|
|
4
|
-
import { L as S, a as r } from "./index-
|
|
1
|
+
import { a as p, L as u, p as n, s as l, t as e } from "./index-Cp_oEtd_.js";
|
|
2
|
+
import { html as m } from "./index-BQMgvLh9.js";
|
|
3
|
+
import { javascriptLanguage as b } from "./index-C4fkwJmM.js";
|
|
4
|
+
import { L as S, a as r } from "./index-BI56obfe.js";
|
|
5
5
|
const c = /* @__PURE__ */ S.deserialize({
|
|
6
6
|
version: 14,
|
|
7
7
|
states: "%pOVOWOOObQPOOOpOSO'#C_OOOO'#Cp'#CpQVOWOOQxQPOOO!TQQOOQ!YQPOOOOOO,58y,58yO!_OSO,58yOOOO-E6n-E6nO!dQQO'#CqQ{QPOOO!iQPOOQ{QPOOO!qQPOOOOOO1G.e1G.eOOQO,59],59]OOQO-E6o-E6oO!yOpO'#CiO#RO`O'#CiQOQPOOO#ZO#tO'#CmO#fO!bO'#CmOOQO,59T,59TO#qOpO,59TO#vO`O,59TOOOO'#Cr'#CrO#{O#tO,59XOOQO,59X,59XOOOO'#Cs'#CsO$WO!bO,59XOOQO1G.o1G.oOOOO-E6p-E6pOOQO1G.s1G.sOOOO-E6q-E6q",
|
package/dist/index.d.ts
CHANGED