@fluid-app/fluid-cli-theme-dev 0.1.58 → 0.1.60
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/README.md +109 -0
- package/dist/dist-cli-preview/.vite/manifest.json +1831 -0
- package/dist/dist-cli-preview/account-screens.js +1 -0
- package/dist/dist-cli-preview/capabilities.json +1 -0
- package/dist/dist-cli-preview/chunks/Breadcrumb-CZ-skiUy.js +91 -0
- package/dist/dist-cli-preview/chunks/Combobox-BGiCYa56.js +1455 -0
- package/dist/dist-cli-preview/chunks/ContactsScreen-vsNgy_gn.js +6930 -0
- package/dist/dist-cli-preview/chunks/MemberManagementProviders-DMwkh3JW.js +1509 -0
- package/dist/dist-cli-preview/chunks/MessagingScreen-DzJOwPGH.js +38475 -0
- package/dist/dist-cli-preview/chunks/MobileActionSheet-DqVPgFKI.js +2895 -0
- package/dist/dist-cli-preview/chunks/MySiteScreen-BSmWlCKA.js +4950 -0
- package/dist/dist-cli-preview/chunks/OrdersScreen-CVEl9FnN.js +1349 -0
- package/dist/dist-cli-preview/chunks/OrdersScreen-d4fJE_dm.js +9 -0
- package/dist/dist-cli-preview/chunks/ProfileScreen-BC5gyJDY.js +2581 -0
- package/dist/dist-cli-preview/chunks/SubscriptionsScreen-CFM4Pufg.js +38 -0
- package/dist/dist-cli-preview/chunks/account-screen-runtime-DxhJm6Qd.js +12407 -0
- package/dist/dist-cli-preview/chunks/ar-4OhalXtk.js +628 -0
- package/dist/dist-cli-preview/chunks/ar-8iaFSgop.js +189 -0
- package/dist/dist-cli-preview/chunks/ar-B7NQmkZ1.js +341 -0
- package/dist/dist-cli-preview/chunks/ar-DEUMqcX3.js +563 -0
- package/dist/dist-cli-preview/chunks/ar-DT9j-dOi.js +720 -0
- package/dist/dist-cli-preview/chunks/ar-D_B30x0o.js +176 -0
- package/dist/dist-cli-preview/chunks/arrow-left-UFKI-PQf.js +14 -0
- package/dist/dist-cli-preview/chunks/bg-CIgMfa9k.js +176 -0
- package/dist/dist-cli-preview/chunks/bg-CS2zt-UV.js +720 -0
- package/dist/dist-cli-preview/chunks/bg-CxfL8rZN.js +341 -0
- package/dist/dist-cli-preview/chunks/bg-DOdbUYGw.js +563 -0
- package/dist/dist-cli-preview/chunks/bg-D_C_HmWn.js +189 -0
- package/dist/dist-cli-preview/chunks/bg-DeBjzn9B.js +628 -0
- package/dist/dist-cli-preview/chunks/bn-BAGJspTJ.js +563 -0
- package/dist/dist-cli-preview/chunks/bn-BgnBXWHo.js +176 -0
- package/dist/dist-cli-preview/chunks/bn-CRBwi_3N.js +628 -0
- package/dist/dist-cli-preview/chunks/bn-CdhHCK--.js +341 -0
- package/dist/dist-cli-preview/chunks/bn-DiqHsF7K.js +720 -0
- package/dist/dist-cli-preview/chunks/bn-UEAt87N9.js +189 -0
- package/dist/dist-cli-preview/chunks/cli-preview-DunPfnjU.js +151 -0
- package/dist/dist-cli-preview/chunks/client.gen-CSTBgfxj.js +672 -0
- package/dist/dist-cli-preview/chunks/contacts-CpYlEgAq.js +4 -0
- package/dist/dist-cli-preview/chunks/countries-api-adapter-B3usO25w.js +108 -0
- package/dist/dist-cli-preview/chunks/create-card-entry-container-DHgsbSyr.js +23942 -0
- package/dist/dist-cli-preview/chunks/cs-B8rJsMOS.js +189 -0
- package/dist/dist-cli-preview/chunks/cs-ChKaPMtV.js +563 -0
- package/dist/dist-cli-preview/chunks/cs-CkdXQxaf.js +720 -0
- package/dist/dist-cli-preview/chunks/cs-DTe-xGeI.js +341 -0
- package/dist/dist-cli-preview/chunks/cs-DmLSumGB.js +176 -0
- package/dist/dist-cli-preview/chunks/cs-jXPm6Nhj.js +628 -0
- package/dist/dist-cli-preview/chunks/da-7uI_CROE.js +628 -0
- package/dist/dist-cli-preview/chunks/da-B8Cl_vkl.js +341 -0
- package/dist/dist-cli-preview/chunks/da-Bee-xQNq.js +563 -0
- package/dist/dist-cli-preview/chunks/da-DYlEkykt.js +720 -0
- package/dist/dist-cli-preview/chunks/da-EfkyseOR.js +176 -0
- package/dist/dist-cli-preview/chunks/da-J--1RxZp.js +189 -0
- package/dist/dist-cli-preview/chunks/de-BTNiErdB.js +189 -0
- package/dist/dist-cli-preview/chunks/de-CIhZnrdS.js +720 -0
- package/dist/dist-cli-preview/chunks/de-CKtChtTF.js +628 -0
- package/dist/dist-cli-preview/chunks/de-D8cYy8G-.js +341 -0
- package/dist/dist-cli-preview/chunks/de-EARi-xk5.js +176 -0
- package/dist/dist-cli-preview/chunks/de-zeOnL7Nl.js +563 -0
- package/dist/dist-cli-preview/chunks/el-0NNTwBnJ.js +563 -0
- package/dist/dist-cli-preview/chunks/el-BPz4rb5a.js +176 -0
- package/dist/dist-cli-preview/chunks/el-Bg6zRbVK.js +720 -0
- package/dist/dist-cli-preview/chunks/el-CUjODD23.js +628 -0
- package/dist/dist-cli-preview/chunks/el-Chjin2JW.js +341 -0
- package/dist/dist-cli-preview/chunks/el-DYay96x-.js +189 -0
- package/dist/dist-cli-preview/chunks/es-CFZtv6aF.js +176 -0
- package/dist/dist-cli-preview/chunks/es-CGgD1AV1.js +720 -0
- package/dist/dist-cli-preview/chunks/es-CXXB8ubn.js +628 -0
- package/dist/dist-cli-preview/chunks/es-Cf56ydFZ.js +189 -0
- package/dist/dist-cli-preview/chunks/es-DirUtV7k.js +563 -0
- package/dist/dist-cli-preview/chunks/es-mp8RwFN4.js +341 -0
- package/dist/dist-cli-preview/chunks/fi-91gcpxoy.js +341 -0
- package/dist/dist-cli-preview/chunks/fi-BfDoQ1rt.js +628 -0
- package/dist/dist-cli-preview/chunks/fi-Bn9_l4IH.js +176 -0
- package/dist/dist-cli-preview/chunks/fi-Bo5QdhP_.js +563 -0
- package/dist/dist-cli-preview/chunks/fi-CC2YqekN.js +189 -0
- package/dist/dist-cli-preview/chunks/fi-DUhIWph7.js +720 -0
- package/dist/dist-cli-preview/chunks/fr-BSouGEGN.js +176 -0
- package/dist/dist-cli-preview/chunks/fr-BnYsse99.js +563 -0
- package/dist/dist-cli-preview/chunks/fr-C32S8PvA.js +720 -0
- package/dist/dist-cli-preview/chunks/fr-DIQcYUq-.js +628 -0
- package/dist/dist-cli-preview/chunks/fr-Do6AIa1z.js +189 -0
- package/dist/dist-cli-preview/chunks/fr-ekvUCKTH.js +341 -0
- package/dist/dist-cli-preview/chunks/he-B7QiuquT.js +341 -0
- package/dist/dist-cli-preview/chunks/he-BYEZTUry.js +176 -0
- package/dist/dist-cli-preview/chunks/he-CO8gUz9X.js +628 -0
- package/dist/dist-cli-preview/chunks/he-DaWGyHjM.js +189 -0
- package/dist/dist-cli-preview/chunks/he-pFefco4W.js +563 -0
- package/dist/dist-cli-preview/chunks/he-xSGbvsti.js +720 -0
- package/dist/dist-cli-preview/chunks/hey-api-client-DSvKWGPq.js +153 -0
- package/dist/dist-cli-preview/chunks/hi-BLnEaAml.js +176 -0
- package/dist/dist-cli-preview/chunks/hi-BMFNssNU.js +720 -0
- package/dist/dist-cli-preview/chunks/hi-BXBdXuFm.js +189 -0
- package/dist/dist-cli-preview/chunks/hi-DNNhi7ud.js +341 -0
- package/dist/dist-cli-preview/chunks/hi-DVSXxEzh.js +628 -0
- package/dist/dist-cli-preview/chunks/hi-Uqd1FKtv.js +563 -0
- package/dist/dist-cli-preview/chunks/hr-B1T2UY_p.js +176 -0
- package/dist/dist-cli-preview/chunks/hr-B432GvmU.js +720 -0
- package/dist/dist-cli-preview/chunks/hr-BJR58Xci.js +563 -0
- package/dist/dist-cli-preview/chunks/hr-CAwxMKX_.js +341 -0
- package/dist/dist-cli-preview/chunks/hr-DBrPFNLx.js +189 -0
- package/dist/dist-cli-preview/chunks/hr-yH6ab4ea.js +628 -0
- package/dist/dist-cli-preview/chunks/hu-BcC628Ln.js +189 -0
- package/dist/dist-cli-preview/chunks/hu-Bv0_YQEn.js +628 -0
- package/dist/dist-cli-preview/chunks/hu-D_oQwH4Q.js +341 -0
- package/dist/dist-cli-preview/chunks/hu-Q0aE9GvJ.js +720 -0
- package/dist/dist-cli-preview/chunks/hu-TNzzMEzp.js +563 -0
- package/dist/dist-cli-preview/chunks/hu-cQw9hgLe.js +176 -0
- package/dist/dist-cli-preview/chunks/id-Becf5X73.js +720 -0
- package/dist/dist-cli-preview/chunks/id-CLvNjXjm.js +189 -0
- package/dist/dist-cli-preview/chunks/id-CzSVbo5E.js +628 -0
- package/dist/dist-cli-preview/chunks/id-Vudf_d_f.js +563 -0
- package/dist/dist-cli-preview/chunks/id-Zd_5csjz.js +176 -0
- package/dist/dist-cli-preview/chunks/id-oeAszBoo.js +341 -0
- package/dist/dist-cli-preview/chunks/isAfter-BUGgByEf.js +1414 -0
- package/dist/dist-cli-preview/chunks/it-BlwQOBaX.js +720 -0
- package/dist/dist-cli-preview/chunks/it-C0jghILa.js +563 -0
- package/dist/dist-cli-preview/chunks/it-CmxC_FIJ.js +176 -0
- package/dist/dist-cli-preview/chunks/it-D5BXSiSl.js +189 -0
- package/dist/dist-cli-preview/chunks/it-Dme6GXSG.js +341 -0
- package/dist/dist-cli-preview/chunks/it-xT70eFoJ.js +628 -0
- package/dist/dist-cli-preview/chunks/ja-BJ7phJBG.js +720 -0
- package/dist/dist-cli-preview/chunks/ja-Bc8dA1LN.js +189 -0
- package/dist/dist-cli-preview/chunks/ja-BcOunH2q.js +176 -0
- package/dist/dist-cli-preview/chunks/ja-CRnvQNCa.js +341 -0
- package/dist/dist-cli-preview/chunks/ja-CfYfDP_F.js +563 -0
- package/dist/dist-cli-preview/chunks/ja-Dh3z4uJk.js +628 -0
- package/dist/dist-cli-preview/chunks/ko-8mk8A3_I.js +341 -0
- package/dist/dist-cli-preview/chunks/ko-Bnp-5GAn.js +720 -0
- package/dist/dist-cli-preview/chunks/ko-CG_0ufw6.js +176 -0
- package/dist/dist-cli-preview/chunks/ko-CJ-8gCc9.js +189 -0
- package/dist/dist-cli-preview/chunks/ko-CnpxBQ2W.js +628 -0
- package/dist/dist-cli-preview/chunks/ko-CtkKNEZB.js +563 -0
- package/dist/dist-cli-preview/chunks/log-out-CBUq5Hd-.js +15 -0
- package/dist/dist-cli-preview/chunks/map-pin-DHfjSyoR.js +20 -0
- package/dist/dist-cli-preview/chunks/messaging-DkyH4CPP.js +4 -0
- package/dist/dist-cli-preview/chunks/mount-account-screen-pc1VISwF.js +11041 -0
- package/dist/dist-cli-preview/chunks/ms-BF5gF9D5.js +189 -0
- package/dist/dist-cli-preview/chunks/ms-Bs0GvdOw.js +341 -0
- package/dist/dist-cli-preview/chunks/ms-CyhqvfOb.js +563 -0
- package/dist/dist-cli-preview/chunks/ms-D6Cf3VUm.js +628 -0
- package/dist/dist-cli-preview/chunks/ms-DR0U3aeO.js +720 -0
- package/dist/dist-cli-preview/chunks/ms-DTN7PIDq.js +176 -0
- package/dist/dist-cli-preview/chunks/mysite-wvfITV7T.js +4 -0
- package/dist/dist-cli-preview/chunks/nl-C1v8tc97.js +720 -0
- package/dist/dist-cli-preview/chunks/nl-C5fWLZkK.js +189 -0
- package/dist/dist-cli-preview/chunks/nl-Cgt3zlZ8.js +628 -0
- package/dist/dist-cli-preview/chunks/nl-DWtWnOvH.js +563 -0
- package/dist/dist-cli-preview/chunks/nl-tsI6lLxl.js +341 -0
- package/dist/dist-cli-preview/chunks/nl-x2lc8Ct5.js +176 -0
- package/dist/dist-cli-preview/chunks/no-BeVycdYu.js +563 -0
- package/dist/dist-cli-preview/chunks/no-DMot6qX0.js +341 -0
- package/dist/dist-cli-preview/chunks/no-Dk9D1gjY.js +189 -0
- package/dist/dist-cli-preview/chunks/no-R8FScfrK.js +176 -0
- package/dist/dist-cli-preview/chunks/no-dhNRqvE4.js +720 -0
- package/dist/dist-cli-preview/chunks/no-xVFexdWN.js +628 -0
- package/dist/dist-cli-preview/chunks/orders-c13r499A.js +4 -0
- package/dist/dist-cli-preview/chunks/pl-BH1bEHfg.js +720 -0
- package/dist/dist-cli-preview/chunks/pl-Bl9G1yOR.js +176 -0
- package/dist/dist-cli-preview/chunks/pl-Cu0JzUUV.js +563 -0
- package/dist/dist-cli-preview/chunks/pl-D7AZQwtK.js +189 -0
- package/dist/dist-cli-preview/chunks/pl-Dl0M9JDp.js +628 -0
- package/dist/dist-cli-preview/chunks/pl-DmTxONNg.js +341 -0
- package/dist/dist-cli-preview/chunks/plus-C-lo0pFM.js +14 -0
- package/dist/dist-cli-preview/chunks/profile-CoWo9Sxe.js +4 -0
- package/dist/dist-cli-preview/chunks/pt-62Kd-NN1.js +189 -0
- package/dist/dist-cli-preview/chunks/pt-BAq7bseT.js +628 -0
- package/dist/dist-cli-preview/chunks/pt-DgmwnAV-.js +341 -0
- package/dist/dist-cli-preview/chunks/pt-K0EDcWuR.js +720 -0
- package/dist/dist-cli-preview/chunks/pt-nD60RpwN.js +176 -0
- package/dist/dist-cli-preview/chunks/pt-voHVxH2b.js +563 -0
- package/dist/dist-cli-preview/chunks/ro-B4M17oRc.js +341 -0
- package/dist/dist-cli-preview/chunks/ro-CFfjUJ1T.js +563 -0
- package/dist/dist-cli-preview/chunks/ro-CtL0oK2c.js +628 -0
- package/dist/dist-cli-preview/chunks/ro-D6ybG7vp.js +176 -0
- package/dist/dist-cli-preview/chunks/ro-DTauvv2V.js +189 -0
- package/dist/dist-cli-preview/chunks/ro-DUxhal7c.js +720 -0
- package/dist/dist-cli-preview/chunks/ru-45VizwWQ.js +628 -0
- package/dist/dist-cli-preview/chunks/ru-BS2gZnbs.js +341 -0
- package/dist/dist-cli-preview/chunks/ru-C0oMeuhb.js +176 -0
- package/dist/dist-cli-preview/chunks/ru-COxlz18L.js +563 -0
- package/dist/dist-cli-preview/chunks/ru-CjEXCUxb.js +720 -0
- package/dist/dist-cli-preview/chunks/ru-g5Cz5HSk.js +189 -0
- package/dist/dist-cli-preview/chunks/schemas-9_ZwC5nC.js +3977 -0
- package/dist/dist-cli-preview/chunks/screen-route-slug-utils-B254xI_J.js +14954 -0
- package/dist/dist-cli-preview/chunks/sheet-haptics-context-D2WUiXJm.js +116 -0
- package/dist/dist-cli-preview/chunks/sidebar-CMSWZCPS.js +848 -0
- package/dist/dist-cli-preview/chunks/sk-BGDxj2sS.js +563 -0
- package/dist/dist-cli-preview/chunks/sk-BdDjjHfn.js +341 -0
- package/dist/dist-cli-preview/chunks/sk-Bpdt_mn0.js +176 -0
- package/dist/dist-cli-preview/chunks/sk-DX2wOf1g.js +628 -0
- package/dist/dist-cli-preview/chunks/sk-QbdQWjZy.js +714 -0
- package/dist/dist-cli-preview/chunks/sk-YuAeAaeZ.js +189 -0
- package/dist/dist-cli-preview/chunks/store-api-context-BIdILNWL.js +16 -0
- package/dist/dist-cli-preview/chunks/subscriptions-BHALQrcU.js +4 -0
- package/dist/dist-cli-preview/chunks/sv-BlNLvbmj.js +628 -0
- package/dist/dist-cli-preview/chunks/sv-CEmTDhJy.js +176 -0
- package/dist/dist-cli-preview/chunks/sv-CW7FL5HA.js +341 -0
- package/dist/dist-cli-preview/chunks/sv-CiCeNX1x.js +720 -0
- package/dist/dist-cli-preview/chunks/sv-DefBhX0c.js +563 -0
- package/dist/dist-cli-preview/chunks/sv-iaAh80e4.js +189 -0
- package/dist/dist-cli-preview/chunks/th-BNEA6ESz.js +720 -0
- package/dist/dist-cli-preview/chunks/th-BYBMKmSh.js +341 -0
- package/dist/dist-cli-preview/chunks/th-DMPCj1Fg.js +189 -0
- package/dist/dist-cli-preview/chunks/th-DV3lk4-6.js +563 -0
- package/dist/dist-cli-preview/chunks/th-F8oLBw5n.js +176 -0
- package/dist/dist-cli-preview/chunks/th-fPXxGW_m.js +628 -0
- package/dist/dist-cli-preview/chunks/tl-BMLmbhme.js +628 -0
- package/dist/dist-cli-preview/chunks/tl-BXIS85ly.js +176 -0
- package/dist/dist-cli-preview/chunks/tl-CDigaLsK.js +341 -0
- package/dist/dist-cli-preview/chunks/tl-DVdSJCnc.js +563 -0
- package/dist/dist-cli-preview/chunks/tl-fdtlfqan.js +720 -0
- package/dist/dist-cli-preview/chunks/tl-w5CgYWXn.js +189 -0
- package/dist/dist-cli-preview/chunks/tr-BA1MDk8A.js +563 -0
- package/dist/dist-cli-preview/chunks/tr-CHri_kqV.js +189 -0
- package/dist/dist-cli-preview/chunks/tr-DD75kuPl.js +720 -0
- package/dist/dist-cli-preview/chunks/tr-Mq5Hfqt2.js +628 -0
- package/dist/dist-cli-preview/chunks/tr-PxiurNCr.js +341 -0
- package/dist/dist-cli-preview/chunks/tr-YXIIDIEV.js +176 -0
- package/dist/dist-cli-preview/chunks/trash-2-Bq4IqH0j.js +137 -0
- package/dist/dist-cli-preview/chunks/uk-B4aYnJ8t.js +341 -0
- package/dist/dist-cli-preview/chunks/uk-ByJtQJHi.js +189 -0
- package/dist/dist-cli-preview/chunks/uk-CCVTTskN.js +720 -0
- package/dist/dist-cli-preview/chunks/uk-CS0tJc6H.js +628 -0
- package/dist/dist-cli-preview/chunks/uk-CYYjeT-V.js +176 -0
- package/dist/dist-cli-preview/chunks/uk-DGb0m_JV.js +563 -0
- package/dist/dist-cli-preview/chunks/use-optional-store-Csor1Z3z.js +22 -0
- package/dist/dist-cli-preview/chunks/useInfiniteQuery-BpFtQ7DH.js +67 -0
- package/dist/dist-cli-preview/chunks/user-BGrQJ1GJ.js +31 -0
- package/dist/dist-cli-preview/chunks/users-DBL0isYy.js +27 -0
- package/dist/dist-cli-preview/chunks/vi-BoKSdzH3.js +341 -0
- package/dist/dist-cli-preview/chunks/vi-CHKjehVL.js +628 -0
- package/dist/dist-cli-preview/chunks/vi-DFicISRE.js +189 -0
- package/dist/dist-cli-preview/chunks/vi-DT4XS4HU.js +176 -0
- package/dist/dist-cli-preview/chunks/vi-RFwPNQ96.js +720 -0
- package/dist/dist-cli-preview/chunks/vi-SG6trKny.js +563 -0
- package/dist/dist-cli-preview/chunks/zh_CN-BJVGrpVl.js +714 -0
- package/dist/dist-cli-preview/chunks/zh_CN-BeGANQIJ.js +176 -0
- package/dist/dist-cli-preview/chunks/zh_CN-BwpNGMQN.js +189 -0
- package/dist/dist-cli-preview/chunks/zh_CN-CFu3GI2I.js +563 -0
- package/dist/dist-cli-preview/chunks/zh_CN-DrCrXsZC.js +341 -0
- package/dist/dist-cli-preview/chunks/zh_CN-x6mJyUQH.js +628 -0
- package/dist/dist-cli-preview/chunks/zh_TW-CorN6cwY.js +720 -0
- package/dist/dist-cli-preview/chunks/zh_TW-D9gGVyEb.js +176 -0
- package/dist/dist-cli-preview/chunks/zh_TW-DdD6Hf_A.js +628 -0
- package/dist/dist-cli-preview/chunks/zh_TW-JmyC1W5K.js +341 -0
- package/dist/dist-cli-preview/chunks/zh_TW-Oq4Chn8F.js +189 -0
- package/dist/dist-cli-preview/chunks/zh_TW-kUnD3TL4.js +563 -0
- package/dist/index.mjs +1220 -513
- package/dist/index.mjs.map +1 -1
- package/dist/skills/themes-review/SKILL.md +2 -2
- package/dist/skills/themes-review/references/navigation.md +3 -1
- package/package.json +60 -10
|
@@ -0,0 +1,672 @@
|
|
|
1
|
+
var X = Object.defineProperty;
|
|
2
|
+
var Y = (t, e, r) => e in t ? X(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
+
var D = (t, e, r) => Y(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
+
import { aA as A, az as Z, ad as C } from "./account-screen-runtime-DxhJm6Qd.js";
|
|
5
|
+
function j(t) {
|
|
6
|
+
if (typeof t != "string")
|
|
7
|
+
return;
|
|
8
|
+
const e = t.trim();
|
|
9
|
+
return e.length > 0 ? e : void 0;
|
|
10
|
+
}
|
|
11
|
+
function P(t, e) {
|
|
12
|
+
const r = C(e?.meta);
|
|
13
|
+
return j(t.headers.get("x-request-id")) ?? j(t.headers.get("request-id")) ?? j(e?.request_id) ?? j(e?.requestId) ?? j(r?.request_id) ?? j(r?.requestId);
|
|
14
|
+
}
|
|
15
|
+
function ee(t, e) {
|
|
16
|
+
const r = C(t.error);
|
|
17
|
+
return j(t.message) ?? j(t.error_message) ?? j(r?.message) ?? e;
|
|
18
|
+
}
|
|
19
|
+
function Se(t = {}) {
|
|
20
|
+
return (e, r, n, o) => {
|
|
21
|
+
if (!r)
|
|
22
|
+
return e instanceof A || t.shouldPassThroughTransportError?.(e) || !n ? e : new A(
|
|
23
|
+
`Network error: ${e instanceof Error ? e.message : "Unknown network error"}`,
|
|
24
|
+
0,
|
|
25
|
+
null
|
|
26
|
+
);
|
|
27
|
+
if (r.ok && e instanceof SyntaxError)
|
|
28
|
+
return new A(
|
|
29
|
+
"Failed to parse response as JSON",
|
|
30
|
+
r.status,
|
|
31
|
+
null,
|
|
32
|
+
P(r, null)
|
|
33
|
+
);
|
|
34
|
+
t.onResponseError?.(r);
|
|
35
|
+
const c = n?.method ?? o.method ?? "GET", s = C(e), a = P(r, s);
|
|
36
|
+
if (s)
|
|
37
|
+
return new A(
|
|
38
|
+
ee(s, `${c} request failed`),
|
|
39
|
+
r.status,
|
|
40
|
+
Z(s),
|
|
41
|
+
a,
|
|
42
|
+
s
|
|
43
|
+
);
|
|
44
|
+
const i = r.headers.get("content-type")?.includes("application/json"), p = j(e);
|
|
45
|
+
return new A(
|
|
46
|
+
i && p ? p.slice(0, 200) : `${c} request failed with status ${r.status}`,
|
|
47
|
+
r.status,
|
|
48
|
+
// A parsed JSON string is a legal `ApiErrorData` member, so it is kept
|
|
49
|
+
// rather than dropped — the shared fetch client already preserves it, and
|
|
50
|
+
// discarding it here made the two producers disagree.
|
|
51
|
+
i ? e : null,
|
|
52
|
+
a,
|
|
53
|
+
// Unreachable as an envelope: this branch runs only when the payload is
|
|
54
|
+
// not a plain object, which is exactly what `toApiErrorBody` rejects.
|
|
55
|
+
null
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
const te = {
|
|
60
|
+
bodySerializer: (t) => JSON.stringify(
|
|
61
|
+
t,
|
|
62
|
+
(e, r) => typeof r == "bigint" ? r.toString() : r
|
|
63
|
+
)
|
|
64
|
+
};
|
|
65
|
+
function re({
|
|
66
|
+
onRequest: t,
|
|
67
|
+
onSseError: e,
|
|
68
|
+
onSseEvent: r,
|
|
69
|
+
responseTransformer: n,
|
|
70
|
+
responseValidator: o,
|
|
71
|
+
sseDefaultRetryDelay: c,
|
|
72
|
+
sseMaxRetryAttempts: s,
|
|
73
|
+
sseMaxRetryDelay: a,
|
|
74
|
+
sseSleepFn: i,
|
|
75
|
+
url: p,
|
|
76
|
+
...u
|
|
77
|
+
}) {
|
|
78
|
+
let l;
|
|
79
|
+
const g = i ?? ((d) => new Promise((h) => setTimeout(h, d)));
|
|
80
|
+
return { stream: async function* () {
|
|
81
|
+
let d = c ?? 3e3, h = 0;
|
|
82
|
+
const w = u.signal ?? new AbortController().signal;
|
|
83
|
+
for (; !w.aborted; ) {
|
|
84
|
+
h++;
|
|
85
|
+
const O = u.headers instanceof Headers ? u.headers : new Headers(u.headers);
|
|
86
|
+
l !== void 0 && O.set("Last-Event-ID", l);
|
|
87
|
+
try {
|
|
88
|
+
const x = {
|
|
89
|
+
redirect: "follow",
|
|
90
|
+
...u,
|
|
91
|
+
body: u.serializedBody,
|
|
92
|
+
headers: O,
|
|
93
|
+
signal: w
|
|
94
|
+
};
|
|
95
|
+
let q = new Request(p, x);
|
|
96
|
+
t && (q = await t(p, x));
|
|
97
|
+
const y = await (u.fetch ?? globalThis.fetch)(q);
|
|
98
|
+
if (!y.ok)
|
|
99
|
+
throw new Error(
|
|
100
|
+
`SSE failed: ${y.status} ${y.statusText}`
|
|
101
|
+
);
|
|
102
|
+
if (!y.body) throw new Error("No body in SSE response");
|
|
103
|
+
const S = y.body.pipeThrough(new TextDecoderStream()).getReader();
|
|
104
|
+
let b = "";
|
|
105
|
+
const v = () => {
|
|
106
|
+
try {
|
|
107
|
+
S.cancel();
|
|
108
|
+
} catch {
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
w.addEventListener("abort", v);
|
|
112
|
+
try {
|
|
113
|
+
for (; ; ) {
|
|
114
|
+
const { done: G, value: M } = await S.read();
|
|
115
|
+
if (G) break;
|
|
116
|
+
b += M, b = b.replace(/\r\n?/g, `
|
|
117
|
+
`);
|
|
118
|
+
const B = b.split(`
|
|
119
|
+
|
|
120
|
+
`);
|
|
121
|
+
b = B.pop() ?? "";
|
|
122
|
+
for (const Q of B) {
|
|
123
|
+
const K = Q.split(`
|
|
124
|
+
`), k = [];
|
|
125
|
+
let N;
|
|
126
|
+
for (const E of K)
|
|
127
|
+
if (E.startsWith("data:"))
|
|
128
|
+
k.push(E.replace(/^data:\s*/, ""));
|
|
129
|
+
else if (E.startsWith("event:"))
|
|
130
|
+
N = E.replace(/^event:\s*/, "");
|
|
131
|
+
else if (E.startsWith("id:"))
|
|
132
|
+
l = E.replace(/^id:\s*/, "");
|
|
133
|
+
else if (E.startsWith("retry:")) {
|
|
134
|
+
const U = Number.parseInt(
|
|
135
|
+
E.replace(/^retry:\s*/, ""),
|
|
136
|
+
10
|
|
137
|
+
);
|
|
138
|
+
Number.isNaN(U) || (d = U);
|
|
139
|
+
}
|
|
140
|
+
let z, R = !1;
|
|
141
|
+
if (k.length) {
|
|
142
|
+
const E = k.join(`
|
|
143
|
+
`);
|
|
144
|
+
try {
|
|
145
|
+
z = JSON.parse(E), R = !0;
|
|
146
|
+
} catch {
|
|
147
|
+
z = E;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
R && (o && await o(z), n && (z = await n(z))), r?.({
|
|
151
|
+
data: z,
|
|
152
|
+
event: N,
|
|
153
|
+
id: l,
|
|
154
|
+
retry: d
|
|
155
|
+
}), k.length && (yield z);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
} finally {
|
|
159
|
+
w.removeEventListener("abort", v), S.releaseLock();
|
|
160
|
+
}
|
|
161
|
+
break;
|
|
162
|
+
} catch (x) {
|
|
163
|
+
if (e?.(x), s !== void 0 && h >= s)
|
|
164
|
+
break;
|
|
165
|
+
const q = Math.min(
|
|
166
|
+
d * 2 ** (h - 1),
|
|
167
|
+
a ?? 3e4
|
|
168
|
+
);
|
|
169
|
+
await g(q);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}() };
|
|
173
|
+
}
|
|
174
|
+
const se = (t) => {
|
|
175
|
+
switch (t) {
|
|
176
|
+
case "label":
|
|
177
|
+
return ".";
|
|
178
|
+
case "matrix":
|
|
179
|
+
return ";";
|
|
180
|
+
case "simple":
|
|
181
|
+
return ",";
|
|
182
|
+
default:
|
|
183
|
+
return "&";
|
|
184
|
+
}
|
|
185
|
+
}, ae = (t) => {
|
|
186
|
+
switch (t) {
|
|
187
|
+
case "form":
|
|
188
|
+
return ",";
|
|
189
|
+
case "pipeDelimited":
|
|
190
|
+
return "|";
|
|
191
|
+
case "spaceDelimited":
|
|
192
|
+
return "%20";
|
|
193
|
+
default:
|
|
194
|
+
return ",";
|
|
195
|
+
}
|
|
196
|
+
}, ne = (t) => {
|
|
197
|
+
switch (t) {
|
|
198
|
+
case "label":
|
|
199
|
+
return ".";
|
|
200
|
+
case "matrix":
|
|
201
|
+
return ";";
|
|
202
|
+
case "simple":
|
|
203
|
+
return ",";
|
|
204
|
+
default:
|
|
205
|
+
return "&";
|
|
206
|
+
}
|
|
207
|
+
}, _ = ({
|
|
208
|
+
allowReserved: t,
|
|
209
|
+
explode: e,
|
|
210
|
+
name: r,
|
|
211
|
+
style: n,
|
|
212
|
+
value: o
|
|
213
|
+
}) => {
|
|
214
|
+
if (!e) {
|
|
215
|
+
const a = (t ? o : o.map((i) => encodeURIComponent(i))).join(ae(n));
|
|
216
|
+
switch (n) {
|
|
217
|
+
case "label":
|
|
218
|
+
return `.${a}`;
|
|
219
|
+
case "matrix":
|
|
220
|
+
return `;${r}=${a}`;
|
|
221
|
+
case "simple":
|
|
222
|
+
return a;
|
|
223
|
+
default:
|
|
224
|
+
return `${r}=${a}`;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
const c = se(n), s = o.map((a) => n === "label" || n === "simple" ? t ? a : encodeURIComponent(a) : $({
|
|
228
|
+
allowReserved: t,
|
|
229
|
+
name: r,
|
|
230
|
+
value: a
|
|
231
|
+
})).join(c);
|
|
232
|
+
return n === "label" || n === "matrix" ? c + s : s;
|
|
233
|
+
}, $ = ({
|
|
234
|
+
allowReserved: t,
|
|
235
|
+
name: e,
|
|
236
|
+
value: r
|
|
237
|
+
}) => {
|
|
238
|
+
if (r == null)
|
|
239
|
+
return "";
|
|
240
|
+
if (typeof r == "object")
|
|
241
|
+
throw new Error(
|
|
242
|
+
"Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these."
|
|
243
|
+
);
|
|
244
|
+
return `${e}=${t ? r : encodeURIComponent(r)}`;
|
|
245
|
+
}, J = ({
|
|
246
|
+
allowReserved: t,
|
|
247
|
+
explode: e,
|
|
248
|
+
name: r,
|
|
249
|
+
style: n,
|
|
250
|
+
value: o,
|
|
251
|
+
valueOnly: c
|
|
252
|
+
}) => {
|
|
253
|
+
if (o instanceof Date)
|
|
254
|
+
return c ? o.toISOString() : `${r}=${o.toISOString()}`;
|
|
255
|
+
if (n !== "deepObject" && !e) {
|
|
256
|
+
let i = [];
|
|
257
|
+
Object.entries(o).forEach(([u, l]) => {
|
|
258
|
+
i = [
|
|
259
|
+
...i,
|
|
260
|
+
u,
|
|
261
|
+
t ? l : encodeURIComponent(l)
|
|
262
|
+
];
|
|
263
|
+
});
|
|
264
|
+
const p = i.join(",");
|
|
265
|
+
switch (n) {
|
|
266
|
+
case "form":
|
|
267
|
+
return `${r}=${p}`;
|
|
268
|
+
case "label":
|
|
269
|
+
return `.${p}`;
|
|
270
|
+
case "matrix":
|
|
271
|
+
return `;${r}=${p}`;
|
|
272
|
+
default:
|
|
273
|
+
return p;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
const s = ne(n), a = Object.entries(o).map(
|
|
277
|
+
([i, p]) => $({
|
|
278
|
+
allowReserved: t,
|
|
279
|
+
name: n === "deepObject" ? `${r}[${i}]` : i,
|
|
280
|
+
value: p
|
|
281
|
+
})
|
|
282
|
+
).join(s);
|
|
283
|
+
return n === "label" || n === "matrix" ? s + a : a;
|
|
284
|
+
}, ie = /\{[^{}]+\}/g, oe = ({
|
|
285
|
+
path: t,
|
|
286
|
+
url: e
|
|
287
|
+
}) => {
|
|
288
|
+
let r = e;
|
|
289
|
+
const n = e.match(ie);
|
|
290
|
+
if (n)
|
|
291
|
+
for (const o of n) {
|
|
292
|
+
let c = !1, s = o.substring(1, o.length - 1), a = "simple";
|
|
293
|
+
s.endsWith("*") && (c = !0, s = s.substring(0, s.length - 1)), s.startsWith(".") ? (s = s.substring(1), a = "label") : s.startsWith(";") && (s = s.substring(1), a = "matrix");
|
|
294
|
+
const i = t[s];
|
|
295
|
+
if (i == null)
|
|
296
|
+
continue;
|
|
297
|
+
if (Array.isArray(i)) {
|
|
298
|
+
r = r.replace(
|
|
299
|
+
o,
|
|
300
|
+
_({ explode: c, name: s, style: a, value: i })
|
|
301
|
+
);
|
|
302
|
+
continue;
|
|
303
|
+
}
|
|
304
|
+
if (typeof i == "object") {
|
|
305
|
+
r = r.replace(
|
|
306
|
+
o,
|
|
307
|
+
J({
|
|
308
|
+
explode: c,
|
|
309
|
+
name: s,
|
|
310
|
+
style: a,
|
|
311
|
+
value: i,
|
|
312
|
+
valueOnly: !0
|
|
313
|
+
})
|
|
314
|
+
);
|
|
315
|
+
continue;
|
|
316
|
+
}
|
|
317
|
+
if (a === "matrix") {
|
|
318
|
+
r = r.replace(
|
|
319
|
+
o,
|
|
320
|
+
`;${$({
|
|
321
|
+
name: s,
|
|
322
|
+
value: i
|
|
323
|
+
})}`
|
|
324
|
+
);
|
|
325
|
+
continue;
|
|
326
|
+
}
|
|
327
|
+
const p = encodeURIComponent(
|
|
328
|
+
a === "label" ? `.${i}` : i
|
|
329
|
+
);
|
|
330
|
+
r = r.replace(o, p);
|
|
331
|
+
}
|
|
332
|
+
return r;
|
|
333
|
+
}, ce = ({
|
|
334
|
+
baseUrl: t,
|
|
335
|
+
path: e,
|
|
336
|
+
query: r,
|
|
337
|
+
querySerializer: n,
|
|
338
|
+
url: o
|
|
339
|
+
}) => {
|
|
340
|
+
const c = o.startsWith("/") ? o : `/${o}`;
|
|
341
|
+
let s = (t ?? "") + c;
|
|
342
|
+
e && (s = oe({ path: e, url: s }));
|
|
343
|
+
let a = r ? n(r) : "";
|
|
344
|
+
return a.startsWith("?") && (a = a.substring(1)), a && (s += `?${a}`), s;
|
|
345
|
+
};
|
|
346
|
+
function H(t) {
|
|
347
|
+
const e = t.body !== void 0;
|
|
348
|
+
if (e && t.bodySerializer)
|
|
349
|
+
return "serializedBody" in t ? t.serializedBody !== void 0 && t.serializedBody !== "" ? t.serializedBody : null : t.body !== "" ? t.body : null;
|
|
350
|
+
if (e)
|
|
351
|
+
return t.body;
|
|
352
|
+
}
|
|
353
|
+
const le = async (t, e) => {
|
|
354
|
+
const r = typeof e == "function" ? await e(t) : e;
|
|
355
|
+
if (r)
|
|
356
|
+
return t.scheme === "bearer" ? `Bearer ${r}` : t.scheme === "basic" ? `Basic ${btoa(r)}` : r;
|
|
357
|
+
}, L = ({
|
|
358
|
+
parameters: t = {},
|
|
359
|
+
...e
|
|
360
|
+
} = {}) => (n) => {
|
|
361
|
+
const o = [];
|
|
362
|
+
if (n && typeof n == "object")
|
|
363
|
+
for (const c in n) {
|
|
364
|
+
const s = n[c];
|
|
365
|
+
if (s == null)
|
|
366
|
+
continue;
|
|
367
|
+
const a = t[c] || e;
|
|
368
|
+
if (Array.isArray(s)) {
|
|
369
|
+
const i = _({
|
|
370
|
+
allowReserved: a.allowReserved,
|
|
371
|
+
explode: !0,
|
|
372
|
+
name: c,
|
|
373
|
+
style: "form",
|
|
374
|
+
value: s,
|
|
375
|
+
...a.array
|
|
376
|
+
});
|
|
377
|
+
i && o.push(i);
|
|
378
|
+
} else if (typeof s == "object") {
|
|
379
|
+
const i = J({
|
|
380
|
+
allowReserved: a.allowReserved,
|
|
381
|
+
explode: !0,
|
|
382
|
+
name: c,
|
|
383
|
+
style: "deepObject",
|
|
384
|
+
value: s,
|
|
385
|
+
...a.object
|
|
386
|
+
});
|
|
387
|
+
i && o.push(i);
|
|
388
|
+
} else {
|
|
389
|
+
const i = $({
|
|
390
|
+
allowReserved: a.allowReserved,
|
|
391
|
+
name: c,
|
|
392
|
+
value: s
|
|
393
|
+
});
|
|
394
|
+
i && o.push(i);
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
return o.join("&");
|
|
398
|
+
}, ue = (t) => {
|
|
399
|
+
if (!t)
|
|
400
|
+
return "stream";
|
|
401
|
+
const e = t.split(";")[0]?.trim();
|
|
402
|
+
if (e) {
|
|
403
|
+
if (e.startsWith("application/json") || e.endsWith("+json"))
|
|
404
|
+
return "json";
|
|
405
|
+
if (e === "multipart/form-data")
|
|
406
|
+
return "formData";
|
|
407
|
+
if (["application/", "audio/", "image/", "video/"].some(
|
|
408
|
+
(r) => e.startsWith(r)
|
|
409
|
+
))
|
|
410
|
+
return "blob";
|
|
411
|
+
if (e.startsWith("text/"))
|
|
412
|
+
return "text";
|
|
413
|
+
}
|
|
414
|
+
}, de = (t, e) => e ? !!(t.headers.has(e) || t.query?.[e] || t.headers.get("Cookie")?.includes(`${e}=`)) : !1;
|
|
415
|
+
async function fe(t) {
|
|
416
|
+
for (const e of t.security ?? []) {
|
|
417
|
+
if (de(t, e.name))
|
|
418
|
+
continue;
|
|
419
|
+
const r = await le(e, t.auth);
|
|
420
|
+
if (!r)
|
|
421
|
+
continue;
|
|
422
|
+
const n = e.name ?? "Authorization";
|
|
423
|
+
switch (e.in) {
|
|
424
|
+
case "query":
|
|
425
|
+
t.query || (t.query = {}), t.query[n] = r;
|
|
426
|
+
break;
|
|
427
|
+
case "cookie":
|
|
428
|
+
t.headers.append("Cookie", `${n}=${r}`);
|
|
429
|
+
break;
|
|
430
|
+
case "header":
|
|
431
|
+
default:
|
|
432
|
+
t.headers.set(n, r);
|
|
433
|
+
break;
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
const W = (t) => ce({
|
|
438
|
+
baseUrl: t.baseUrl,
|
|
439
|
+
path: t.path,
|
|
440
|
+
query: t.query,
|
|
441
|
+
querySerializer: typeof t.querySerializer == "function" ? t.querySerializer : L(t.querySerializer),
|
|
442
|
+
url: t.url
|
|
443
|
+
}), V = (t, e) => {
|
|
444
|
+
const r = { ...t, ...e };
|
|
445
|
+
return r.baseUrl?.endsWith("/") && (r.baseUrl = r.baseUrl.substring(0, r.baseUrl.length - 1)), r.headers = F(t.headers, e.headers), r;
|
|
446
|
+
}, he = (t) => {
|
|
447
|
+
const e = [];
|
|
448
|
+
return t.forEach((r, n) => {
|
|
449
|
+
e.push([n, r]);
|
|
450
|
+
}), e;
|
|
451
|
+
}, F = (...t) => {
|
|
452
|
+
const e = new Headers();
|
|
453
|
+
for (const r of t) {
|
|
454
|
+
if (!r)
|
|
455
|
+
continue;
|
|
456
|
+
const n = r instanceof Headers ? he(r) : Object.entries(r);
|
|
457
|
+
for (const [o, c] of n)
|
|
458
|
+
if (c === null)
|
|
459
|
+
e.delete(o);
|
|
460
|
+
else if (Array.isArray(c))
|
|
461
|
+
for (const s of c)
|
|
462
|
+
e.append(o, s);
|
|
463
|
+
else c !== void 0 && e.set(
|
|
464
|
+
o,
|
|
465
|
+
typeof c == "object" ? JSON.stringify(c) : c
|
|
466
|
+
);
|
|
467
|
+
}
|
|
468
|
+
return e;
|
|
469
|
+
};
|
|
470
|
+
class I {
|
|
471
|
+
constructor() {
|
|
472
|
+
D(this, "fns", []);
|
|
473
|
+
}
|
|
474
|
+
clear() {
|
|
475
|
+
this.fns = [];
|
|
476
|
+
}
|
|
477
|
+
eject(e) {
|
|
478
|
+
const r = this.getInterceptorIndex(e);
|
|
479
|
+
this.fns[r] && (this.fns[r] = null);
|
|
480
|
+
}
|
|
481
|
+
exists(e) {
|
|
482
|
+
const r = this.getInterceptorIndex(e);
|
|
483
|
+
return !!this.fns[r];
|
|
484
|
+
}
|
|
485
|
+
getInterceptorIndex(e) {
|
|
486
|
+
return typeof e == "number" ? this.fns[e] ? e : -1 : this.fns.indexOf(e);
|
|
487
|
+
}
|
|
488
|
+
update(e, r) {
|
|
489
|
+
const n = this.getInterceptorIndex(e);
|
|
490
|
+
return this.fns[n] ? (this.fns[n] = r, e) : !1;
|
|
491
|
+
}
|
|
492
|
+
use(e) {
|
|
493
|
+
return this.fns.push(e), this.fns.length - 1;
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
const ye = () => ({
|
|
497
|
+
error: new I(),
|
|
498
|
+
request: new I(),
|
|
499
|
+
response: new I()
|
|
500
|
+
}), pe = L({
|
|
501
|
+
allowReserved: !1,
|
|
502
|
+
array: {
|
|
503
|
+
explode: !0,
|
|
504
|
+
style: "form"
|
|
505
|
+
},
|
|
506
|
+
object: {
|
|
507
|
+
explode: !0,
|
|
508
|
+
style: "deepObject"
|
|
509
|
+
}
|
|
510
|
+
}), be = {
|
|
511
|
+
"Content-Type": "application/json"
|
|
512
|
+
}, me = (t = {}) => ({
|
|
513
|
+
...te,
|
|
514
|
+
headers: be,
|
|
515
|
+
parseAs: "auto",
|
|
516
|
+
querySerializer: pe,
|
|
517
|
+
...t
|
|
518
|
+
}), Ee = (t = {}) => {
|
|
519
|
+
let e = V(me(), t);
|
|
520
|
+
const r = () => ({ ...e }), n = (u) => (e = V(e, u), r()), o = ye(), c = async (u) => {
|
|
521
|
+
const l = {
|
|
522
|
+
...e,
|
|
523
|
+
...u,
|
|
524
|
+
fetch: u.fetch ?? e.fetch ?? globalThis.fetch,
|
|
525
|
+
headers: F(e.headers, u.headers),
|
|
526
|
+
serializedBody: void 0
|
|
527
|
+
};
|
|
528
|
+
l.security && await fe(l), l.requestValidator && await l.requestValidator(l), l.body !== void 0 && l.bodySerializer && (l.serializedBody = l.bodySerializer(l.body)), (l.body === void 0 || l.serializedBody === "") && l.headers.delete("Content-Type");
|
|
529
|
+
const g = l, m = W(g);
|
|
530
|
+
return { opts: g, url: m };
|
|
531
|
+
}, s = async (u) => {
|
|
532
|
+
const l = u.throwOnError ?? e.throwOnError, g = u.responseStyle ?? e.responseStyle;
|
|
533
|
+
let m, f;
|
|
534
|
+
try {
|
|
535
|
+
const { opts: d, url: h } = await c(u), w = {
|
|
536
|
+
redirect: "follow",
|
|
537
|
+
...d,
|
|
538
|
+
body: H(d)
|
|
539
|
+
};
|
|
540
|
+
m = new Request(h, w);
|
|
541
|
+
for (const y of o.request.fns)
|
|
542
|
+
y && (m = await y(m, d));
|
|
543
|
+
const O = d.fetch;
|
|
544
|
+
f = await O(m);
|
|
545
|
+
for (const y of o.response.fns)
|
|
546
|
+
y && (f = await y(f, m, d));
|
|
547
|
+
const x = {
|
|
548
|
+
request: m,
|
|
549
|
+
response: f
|
|
550
|
+
};
|
|
551
|
+
if (f.ok) {
|
|
552
|
+
const y = (d.parseAs === "auto" ? ue(f.headers.get("Content-Type")) : d.parseAs) ?? "json";
|
|
553
|
+
if (f.status === 204 || f.headers.get("Content-Length") === "0") {
|
|
554
|
+
let b;
|
|
555
|
+
switch (y) {
|
|
556
|
+
case "arrayBuffer":
|
|
557
|
+
case "blob":
|
|
558
|
+
case "text":
|
|
559
|
+
b = await f[y]();
|
|
560
|
+
break;
|
|
561
|
+
case "formData":
|
|
562
|
+
b = new FormData();
|
|
563
|
+
break;
|
|
564
|
+
case "stream":
|
|
565
|
+
b = f.body;
|
|
566
|
+
break;
|
|
567
|
+
case "json":
|
|
568
|
+
default:
|
|
569
|
+
b = {};
|
|
570
|
+
break;
|
|
571
|
+
}
|
|
572
|
+
return d.responseStyle === "data" ? b : {
|
|
573
|
+
data: b,
|
|
574
|
+
...x
|
|
575
|
+
};
|
|
576
|
+
}
|
|
577
|
+
let S;
|
|
578
|
+
switch (y) {
|
|
579
|
+
case "arrayBuffer":
|
|
580
|
+
case "blob":
|
|
581
|
+
case "formData":
|
|
582
|
+
case "text":
|
|
583
|
+
S = await f[y]();
|
|
584
|
+
break;
|
|
585
|
+
case "json": {
|
|
586
|
+
const b = await f.text();
|
|
587
|
+
S = b ? JSON.parse(b) : {};
|
|
588
|
+
break;
|
|
589
|
+
}
|
|
590
|
+
case "stream":
|
|
591
|
+
return d.responseStyle === "data" ? f.body : {
|
|
592
|
+
data: f.body,
|
|
593
|
+
...x
|
|
594
|
+
};
|
|
595
|
+
}
|
|
596
|
+
return y === "json" && (d.responseValidator && await d.responseValidator(S), d.responseTransformer && (S = await d.responseTransformer(S))), d.responseStyle === "data" ? S : {
|
|
597
|
+
data: S,
|
|
598
|
+
...x
|
|
599
|
+
};
|
|
600
|
+
}
|
|
601
|
+
const q = await f.text();
|
|
602
|
+
let T;
|
|
603
|
+
try {
|
|
604
|
+
T = JSON.parse(q);
|
|
605
|
+
} catch {
|
|
606
|
+
}
|
|
607
|
+
throw T ?? q;
|
|
608
|
+
} catch (d) {
|
|
609
|
+
let h = d;
|
|
610
|
+
for (const w of o.error.fns)
|
|
611
|
+
w && (h = await w(
|
|
612
|
+
h,
|
|
613
|
+
f,
|
|
614
|
+
m,
|
|
615
|
+
u
|
|
616
|
+
));
|
|
617
|
+
if (h = h || {}, l)
|
|
618
|
+
throw h;
|
|
619
|
+
return g === "data" ? void 0 : {
|
|
620
|
+
error: h,
|
|
621
|
+
request: m,
|
|
622
|
+
response: f
|
|
623
|
+
};
|
|
624
|
+
}
|
|
625
|
+
}, a = (u) => (l) => s({ ...l, method: u }), i = (u) => async (l) => {
|
|
626
|
+
const { opts: g, url: m } = await c(l);
|
|
627
|
+
return re({
|
|
628
|
+
...g,
|
|
629
|
+
body: g.body,
|
|
630
|
+
method: u,
|
|
631
|
+
onRequest: async (f, d) => {
|
|
632
|
+
let h = new Request(f, d);
|
|
633
|
+
for (const w of o.request.fns)
|
|
634
|
+
w && (h = await w(h, g));
|
|
635
|
+
return h;
|
|
636
|
+
},
|
|
637
|
+
serializedBody: H(g),
|
|
638
|
+
url: m
|
|
639
|
+
});
|
|
640
|
+
};
|
|
641
|
+
return {
|
|
642
|
+
buildUrl: (u) => W({ ...e, ...u }),
|
|
643
|
+
connect: a("CONNECT"),
|
|
644
|
+
delete: a("DELETE"),
|
|
645
|
+
get: a("GET"),
|
|
646
|
+
getConfig: r,
|
|
647
|
+
head: a("HEAD"),
|
|
648
|
+
interceptors: o,
|
|
649
|
+
options: a("OPTIONS"),
|
|
650
|
+
patch: a("PATCH"),
|
|
651
|
+
post: a("POST"),
|
|
652
|
+
put: a("PUT"),
|
|
653
|
+
request: s,
|
|
654
|
+
setConfig: n,
|
|
655
|
+
sse: {
|
|
656
|
+
connect: i("CONNECT"),
|
|
657
|
+
delete: i("DELETE"),
|
|
658
|
+
get: i("GET"),
|
|
659
|
+
head: i("HEAD"),
|
|
660
|
+
options: i("OPTIONS"),
|
|
661
|
+
patch: i("PATCH"),
|
|
662
|
+
post: i("POST"),
|
|
663
|
+
put: i("PUT"),
|
|
664
|
+
trace: i("TRACE")
|
|
665
|
+
},
|
|
666
|
+
trace: a("TRACE")
|
|
667
|
+
};
|
|
668
|
+
};
|
|
669
|
+
export {
|
|
670
|
+
Se as a,
|
|
671
|
+
Ee as c
|
|
672
|
+
};
|