@esri/solutions-components 5.1.0-next.124 → 5.1.0-next.127
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/cdn/{EWUZF57U.js → 232XXYVJ.js} +1 -1
- package/dist/cdn/{Y6ZWXE53.js → 23LRX7AS.js} +1 -1
- package/dist/cdn/{Z25OUDBP.js → 23SGJQLW.js} +1 -1
- package/dist/cdn/2KSXH2TC.js +2 -0
- package/dist/cdn/3JZVI5AM.js +7 -0
- package/dist/cdn/{C7SMCM7E.js → 3UJAJDSF.js} +1 -1
- package/dist/cdn/{A4RZESK7.js → 3UKDJZ2D.js} +2 -2
- package/dist/cdn/{JR5GBFT2.js → 4V4CR63B.js} +1 -1
- package/dist/cdn/{ZV6TCDGB.js → 4Z6UJJJR.js} +1 -1
- package/dist/cdn/4ZUE6R22.js +2 -0
- package/dist/cdn/5AAG5ERI.js +2 -0
- package/dist/cdn/{6GSCRFFW.js → 5GHZQ66V.js} +1 -1
- package/dist/cdn/5U2GHXOV.js +2 -0
- package/dist/cdn/5UIJ4Z3C.js +2 -0
- package/dist/cdn/{6RTR35JT.js → 5XDPNTYE.js} +1 -1
- package/dist/cdn/6ID6N5BF.js +2 -0
- package/dist/cdn/6IMLSV3Z.js +2 -0
- package/dist/cdn/{K5MMGZY2.js → 6Q52JBZW.js} +1 -1
- package/dist/cdn/{4MAZNAHZ.js → 6SSQ6MIC.js} +1 -1
- package/dist/cdn/{KZBWKZOC.js → 74XF7DBP.js} +1 -1
- package/dist/cdn/75WQ7UGJ.js +2 -0
- package/dist/cdn/7CGCLEYB.js +2 -0
- package/dist/cdn/{SH72A5PB.js → 7V57GR4X.js} +1 -1
- package/dist/cdn/{D66IBZZA.js → 7ZKKR7QO.js} +1 -1
- package/dist/cdn/AL7O7ZB2.js +3 -0
- package/dist/cdn/{MYPJ63EE.js → ANVT6ANQ.js} +1 -1
- package/dist/cdn/{GWSB6X4X.js → AOJP5RQ6.js} +1 -1
- package/dist/cdn/{XQQ52NKX.js → AYSQIO6L.js} +1 -1
- package/dist/cdn/{WGEHABGS.js → B33EUN4X.js} +1 -1
- package/dist/cdn/BLCW2CZO.js +2 -0
- package/dist/cdn/{3WKKIXVT.js → BOSEAFVW.js} +1 -1
- package/dist/cdn/{CGFMGQ3A.js → BROZWKD5.js} +1 -1
- package/dist/cdn/CB7QDBRG.js +2 -0
- package/dist/cdn/CEWRVOKP.js +2 -0
- package/dist/cdn/{MOK7GNOH.js → CWXZSWUA.js} +1 -1
- package/dist/cdn/D4FRUAT3.js +2 -0
- package/dist/cdn/DQ7NBBUU.js +2 -0
- package/dist/cdn/{D5Y4JMF7.js → E4ZB3BPD.js} +1 -1
- package/dist/cdn/E5X2RW5Y.js +109 -0
- package/dist/cdn/{KGECA3WE.js → EDZIFJZR.js} +1 -1
- package/dist/cdn/{NYWKJJKK.js → EIF4KZBD.js} +1 -1
- package/dist/cdn/{B6Y3RA4F.js → ENG5BCAV.js} +1 -1
- package/dist/cdn/EOSKMSMP.js +2 -0
- package/dist/cdn/{RH47YGDG.js → EVZXWT6K.js} +1 -1
- package/dist/cdn/EXC566PM.js +2 -0
- package/dist/cdn/FOTFZKKU.js +2 -0
- package/dist/cdn/FTY7YPLA.js +88 -0
- package/dist/cdn/FW2HWQC7.js +2 -0
- package/dist/cdn/{MGAKD4WY.js → GDDMG3Q4.js} +1 -1
- package/dist/cdn/{BRBOVJ3Q.js → GPL6FNKN.js} +1 -1
- package/dist/cdn/{DUDZ4BGI.js → GSD6O5J7.js} +1 -1
- package/dist/cdn/{SSF6ST7U.js → H4YPSJ5G.js} +1 -1
- package/dist/cdn/{TTOCCH2K.js → H7J2FXMS.js} +1 -1
- package/dist/cdn/{C5QZMZX7.js → HEI6GMZN.js} +1 -1
- package/dist/cdn/{AZ4JB3M3.js → HJW2JW4G.js} +1 -1
- package/dist/cdn/HO4GBQJG.js +2 -0
- package/dist/cdn/HT2HC33W.js +2 -0
- package/dist/cdn/{IHKF4AMV.js → HYLQNC4V.js} +3 -3
- package/dist/cdn/HZOBBQYW.js +431 -0
- package/dist/cdn/ICSHJV2N.js +2 -0
- package/dist/cdn/IFI66PVI.js +2 -0
- package/dist/cdn/{YFXSWGXE.js → IHG7KTNC.js} +1 -1
- package/dist/cdn/IP3VJ34C.js +4 -0
- package/dist/cdn/IV7RVOFY.js +56 -0
- package/dist/cdn/{3UIIZPJJ.js → IYQGIBWM.js} +1 -1
- package/dist/cdn/{JFJRHOAG.js → KCTWFRCW.js} +1 -1
- package/dist/cdn/{F64NVBUS.js → KEOBSFBN.js} +1 -1
- package/dist/cdn/{N2KSPEVT.js → LP2JYX4X.js} +1 -1
- package/dist/cdn/{C4IFGE7P.js → MDNGEZ2V.js} +1 -1
- package/dist/cdn/{XVMCFCUH.js → MEDCFXMB.js} +1 -1
- package/dist/cdn/{X6JL6SAH.js → MOH6GREK.js} +1 -1
- package/dist/cdn/MURYADCX.js +2 -0
- package/dist/cdn/{JBNWEBAG.js → N22MFQSQ.js} +1 -1
- package/dist/cdn/N5D5ABJ6.js +2 -0
- package/dist/cdn/{5HZMUGQD.js → N7BXCDA3.js} +1 -1
- package/dist/cdn/{SGJY2CP3.js → ODB4CELR.js} +1 -1
- package/dist/cdn/PZW6JMSM.js +2 -0
- package/dist/cdn/{5MVIKBSS.js → QF2IXVAT.js} +1 -1
- package/dist/cdn/{CQRK2NYK.js → QJICQ4W3.js} +1 -1
- package/dist/cdn/QNRKGTZT.js +121 -0
- package/dist/cdn/{GIANH6D4.js → R3C2X4CM.js} +1 -1
- package/dist/cdn/{DKB6JTUF.js → RKZXRHZK.js} +1 -1
- package/dist/cdn/RPEQD2MH.js +2 -0
- package/dist/cdn/{SMNWKCWR.js → RXM4BHPK.js} +1 -1
- package/dist/cdn/S5F6KJQM.js +18 -0
- package/dist/cdn/SFFLZSAY.js +2 -0
- package/dist/cdn/SSH4MSHE.js +2 -0
- package/dist/cdn/{BQVD2BBH.js → SSZBIVTK.js} +1 -1
- package/dist/cdn/{EZ4DX2MW.js → TFTW5B3R.js} +1 -1
- package/dist/cdn/{I74AIIHN.js → TIF36KTA.js} +1 -1
- package/dist/cdn/TV3ZHJ7B.js +2 -0
- package/dist/cdn/{U6JZYJ4D.js → UM3P3Q52.js} +1 -1
- package/dist/cdn/{WH2NFOMH.js → UUHDVB24.js} +5 -5
- package/dist/cdn/UY5JVVRO.js +2 -0
- package/dist/cdn/VEDAG7UO.js +2 -0
- package/dist/cdn/VFBFI3KQ.js +2 -0
- package/dist/cdn/{BXOH6SN4.js → VTI5LEQY.js} +1 -1
- package/dist/cdn/W5FWW67G.js +2 -0
- package/dist/cdn/{RB3YU5TX.js → WA3BLQHA.js} +1 -1
- package/dist/cdn/{JEEUSHAF.js → X73XP424.js} +1 -1
- package/dist/cdn/XC3IZAIH.js +2 -0
- package/dist/cdn/{3FOUGCWY.js → XDZPQACK.js} +1 -1
- package/dist/cdn/XGODSNWZ.js +2 -0
- package/dist/cdn/{UNKHKP5I.js → YJCH2NIS.js} +1 -1
- package/dist/cdn/{A4NILC27.js → YKM2YRZP.js} +1 -1
- package/dist/cdn/{FBRYBN7J.js → YMLQXXAS.js} +1 -1
- package/dist/cdn/{JUUVYK2H.js → YQHYMLC7.js} +1 -1
- package/dist/cdn/{Y3CYPNEY.js → YWXDNRE2.js} +1 -1
- package/dist/cdn/{E4GB5Z4R.js → ZNWZWFMH.js} +1 -1
- package/dist/cdn/{DGUS2OKW.js → ZS3UOY5Q.js} +1 -1
- package/dist/cdn/{5VDDAINK.js → ZX3UHK6P.js} +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/solution-details-panel/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/solution-details-panel/t9n/messages.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/Auth.js +163 -71
- package/dist/chunks/CardsFetcher.js +3 -2
- package/dist/chunks/getRelatedInfos.js +1 -1
- package/dist/chunks/helpers.js +24 -20
- package/dist/chunks/interfaces.js +152 -141
- package/dist/chunks/solution-deploy-dialog.js +24 -18
- package/dist/chunks/solutions-deploy-app-nav.js +4 -5
- package/dist/components/arcgis-solutions-assistant/customElement.js +681 -57987
- package/dist/components/consent-manager/customElement.js +23 -3598
- package/dist/components/solution-builder-assistant/customElement.d.ts +8 -2
- package/dist/components/solution-builder-assistant/customElement.js +30 -23
- package/dist/components/solution-builder-assistant/index.js +1 -1
- package/dist/components/solution-configure-titles/customElement.js +63 -61
- package/dist/components/solution-delete-dialog/customElement.js +17 -14
- package/dist/components/solution-deployed-card/customElement.js +2 -3
- package/dist/components/solution-deployed-card-panel/customElement.d.ts +7 -0
- package/dist/components/solution-deployed-card-panel/customElement.js +34 -32
- package/dist/components/solution-deployed-card-panel/index.js +1 -0
- package/dist/components/solution-details-panel/customElement.d.ts +7 -4
- package/dist/components/solution-details-panel/customElement.js +115 -180
- package/dist/components/solution-snapshot-gallery/customElement.js +2 -1
- package/dist/components/solution-social-share/customElement.js +2 -2
- package/dist/components/solution-user-avatar/customElement.js +1 -1
- package/dist/components/solutions-deploy-app/customElement.d.ts +4 -0
- package/dist/components/solutions-deploy-app/customElement.js +14 -11
- package/dist/components/solutions-deploy-app-nav/customElement.js +2 -3
- package/dist/components/solutions-deployed-list/customElement.js +7 -6
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +3 -3
- package/dist/solutions-components_commit.txt +5 -8
- package/dist/types/lumina.d.ts +3 -3
- package/dist/types/preact.d.ts +3 -3
- package/dist/types/react.d.ts +3 -3
- package/dist/types/stencil.d.ts +3 -3
- package/dist/utils/Auth.d.ts +11 -0
- package/package.json +11 -6
- package/dist/cdn/2V4C3U3A.js +0 -2
- package/dist/cdn/3RUVSQ7E.js +0 -2
- package/dist/cdn/4FZ44STD.js +0 -2
- package/dist/cdn/52KL2BJB.js +0 -2
- package/dist/cdn/5DS6TJ6G.js +0 -2
- package/dist/cdn/5ZIXJCIR.js +0 -18
- package/dist/cdn/62PVXXRD.js +0 -2
- package/dist/cdn/7JUP4GFU.js +0 -2
- package/dist/cdn/7UERL2R2.js +0 -2
- package/dist/cdn/7WKV6M26.js +0 -2
- package/dist/cdn/BKZZ625R.js +0 -2
- package/dist/cdn/BWYFMFIB.js +0 -423
- package/dist/cdn/CQKON2YR.js +0 -2
- package/dist/cdn/F2J3FYTD.js +0 -2
- package/dist/cdn/GVEIFIEZ.js +0 -2
- package/dist/cdn/H5WTVMPJ.js +0 -2
- package/dist/cdn/HNZAE56I.js +0 -2
- package/dist/cdn/HQJ25PBT.js +0 -2
- package/dist/cdn/IF52R2FM.js +0 -2
- package/dist/cdn/IOKTYFKK.js +0 -7
- package/dist/cdn/IRRMUFW7.js +0 -2
- package/dist/cdn/JFKCARWJ.js +0 -2
- package/dist/cdn/K7QUGRWR.js +0 -4
- package/dist/cdn/MN3KMBU6.js +0 -2
- package/dist/cdn/MNZJP3PW.js +0 -2
- package/dist/cdn/MPZE3IV4.js +0 -2
- package/dist/cdn/QKKYYRVF.js +0 -2
- package/dist/cdn/QTV6GN3W.js +0 -2
- package/dist/cdn/QVJAIVT4.js +0 -2
- package/dist/cdn/RPEBBYE4.js +0 -2
- package/dist/cdn/RXFNNWEJ.js +0 -2
- package/dist/cdn/SBLN3F4Y.js +0 -2
- package/dist/cdn/STWIOVJR.js +0 -2
- package/dist/cdn/TUQVCY7T.js +0 -2
- package/dist/cdn/UM4ITZ4R.js +0 -2
- package/dist/cdn/VFEROJ77.js +0 -2
- package/dist/cdn/VL4OP3CF.js +0 -2
- package/dist/cdn/YNOD3Q5G.js +0 -2
- package/dist/cdn/ZPT5ISDK.js +0 -2
- package/dist/chunks/common.js +0 -26
- package/dist/chunks/get.js +0 -387
package/dist/chunks/get.js
DELETED
|
@@ -1,387 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
function V(e) {
|
|
3
|
-
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
|
-
}
|
|
5
|
-
function x(e, t) {
|
|
6
|
-
var r = {};
|
|
7
|
-
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
|
|
8
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
9
|
-
for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
|
|
10
|
-
t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (r[n[i]] = e[n[i]]);
|
|
11
|
-
return r;
|
|
12
|
-
}
|
|
13
|
-
function A(e) {
|
|
14
|
-
return Object.keys(e).some((t) => {
|
|
15
|
-
let r = e[t];
|
|
16
|
-
if (!r)
|
|
17
|
-
return !1;
|
|
18
|
-
switch (r && r.toParam && (r = r.toParam()), r.constructor.name) {
|
|
19
|
-
case "Array":
|
|
20
|
-
return !1;
|
|
21
|
-
case "Object":
|
|
22
|
-
return !1;
|
|
23
|
-
case "Date":
|
|
24
|
-
return !1;
|
|
25
|
-
case "Function":
|
|
26
|
-
return !1;
|
|
27
|
-
case "Boolean":
|
|
28
|
-
return !1;
|
|
29
|
-
case "String":
|
|
30
|
-
return !1;
|
|
31
|
-
case "Number":
|
|
32
|
-
return !1;
|
|
33
|
-
default:
|
|
34
|
-
return !0;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
function C(e) {
|
|
39
|
-
const t = {};
|
|
40
|
-
return Object.keys(e).forEach((r) => {
|
|
41
|
-
var n, i;
|
|
42
|
-
let o = e[r];
|
|
43
|
-
if (o && o.toParam && (o = o.toParam()), !o && o !== 0 && typeof o != "boolean" && typeof o != "string")
|
|
44
|
-
return;
|
|
45
|
-
const s = o.constructor.name;
|
|
46
|
-
let a;
|
|
47
|
-
switch (s) {
|
|
48
|
-
case "Array":
|
|
49
|
-
const f = (i = (n = o[0]) === null || n === void 0 ? void 0 : n.constructor) === null || i === void 0 ? void 0 : i.name;
|
|
50
|
-
a = f === "Array" ? o : f === "Object" ? JSON.stringify(o) : o.join(",");
|
|
51
|
-
break;
|
|
52
|
-
case "Object":
|
|
53
|
-
a = JSON.stringify(o);
|
|
54
|
-
break;
|
|
55
|
-
case "Date":
|
|
56
|
-
a = o.valueOf();
|
|
57
|
-
break;
|
|
58
|
-
case "Function":
|
|
59
|
-
a = null;
|
|
60
|
-
break;
|
|
61
|
-
case "Boolean":
|
|
62
|
-
a = o + "";
|
|
63
|
-
break;
|
|
64
|
-
default:
|
|
65
|
-
a = o;
|
|
66
|
-
break;
|
|
67
|
-
}
|
|
68
|
-
(a || a === 0 || typeof a == "string" || Array.isArray(a)) && (t[r] = a);
|
|
69
|
-
}), t;
|
|
70
|
-
}
|
|
71
|
-
function O(e, t) {
|
|
72
|
-
return Array.isArray(t) && t[0] && Array.isArray(t[0]) ? t.map((r) => O(e, r)).join("&") : encodeURIComponent(e) + "=" + encodeURIComponent(t);
|
|
73
|
-
}
|
|
74
|
-
function T(e) {
|
|
75
|
-
const t = C(e);
|
|
76
|
-
return Object.keys(t).map((r) => O(r, t[r])).join("&");
|
|
77
|
-
}
|
|
78
|
-
const G = globalThis.FormData;
|
|
79
|
-
function $(e, t) {
|
|
80
|
-
const r = A(e) || t, n = C(e);
|
|
81
|
-
if (r) {
|
|
82
|
-
const i = new G();
|
|
83
|
-
return Object.keys(n).forEach((o) => {
|
|
84
|
-
if (typeof Blob < "u" && n[o] instanceof Blob) {
|
|
85
|
-
const s = n.fileName || n[o].name || o;
|
|
86
|
-
i.append(o, n[o], s);
|
|
87
|
-
} else
|
|
88
|
-
i.append(o, n[o]);
|
|
89
|
-
}), i;
|
|
90
|
-
} else
|
|
91
|
-
return T(e);
|
|
92
|
-
}
|
|
93
|
-
class m extends Error {
|
|
94
|
-
/**
|
|
95
|
-
* Create a new `ArcGISRequestError` object.
|
|
96
|
-
*
|
|
97
|
-
* @param message - The error message from the API
|
|
98
|
-
* @param code - The error code from the API
|
|
99
|
-
* @param response - The original response from the API that caused the error
|
|
100
|
-
* @param url - The original url of the request
|
|
101
|
-
* @param options - The original options and parameters of the request
|
|
102
|
-
*/
|
|
103
|
-
constructor(t, r, n, i, o) {
|
|
104
|
-
super(t);
|
|
105
|
-
const s = new.target.prototype;
|
|
106
|
-
Object.setPrototypeOf(this, s), t = t || "UNKNOWN_ERROR", r = r || "UNKNOWN_ERROR_CODE", this.name = "ArcGISRequestError", this.message = r === "UNKNOWN_ERROR_CODE" ? t : `${r}: ${t}`, this.originalMessage = t, this.code = r, this.response = n, this.url = i, this.options = o;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
const k = {
|
|
110
|
-
noCorsDomains: [],
|
|
111
|
-
crossOriginNoCorsDomains: {},
|
|
112
|
-
pendingNoCorsRequests: {}
|
|
113
|
-
}, R = "ARCGIS_REST_JS_NO_CORS";
|
|
114
|
-
globalThis[R] || (globalThis[R] = Object.assign({}, k));
|
|
115
|
-
const u = globalThis[R];
|
|
116
|
-
function L(e) {
|
|
117
|
-
const t = new URL(e);
|
|
118
|
-
e = t.origin + t.pathname, t.search.includes("f=json") && (e += "?f=json");
|
|
119
|
-
const r = t.origin;
|
|
120
|
-
return u.pendingNoCorsRequests[r] || (u.pendingNoCorsRequests[r] = fetch(e, {
|
|
121
|
-
mode: "no-cors",
|
|
122
|
-
credentials: "include",
|
|
123
|
-
cache: "no-store"
|
|
124
|
-
}).then((n) => {
|
|
125
|
-
u.noCorsDomains.indexOf(r) === -1 && u.noCorsDomains.push(r), u.crossOriginNoCorsDomains[r.toLowerCase()] = Date.now(), delete u.pendingNoCorsRequests[r];
|
|
126
|
-
}).catch((n) => (delete u.pendingNoCorsRequests[r], Promise.reject(new Error(`no-cors request to ${r} failed`))))), u.pendingNoCorsRequests[r];
|
|
127
|
-
}
|
|
128
|
-
function F(e) {
|
|
129
|
-
e.forEach((t) => {
|
|
130
|
-
t = t.toLowerCase(), /^https?:\/\//.test(t) ? p(t) : (p("http://" + t), p("https://" + t));
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
function p(e) {
|
|
134
|
-
const r = new URL(e).origin;
|
|
135
|
-
u.noCorsDomains.indexOf(r) === -1 && u.noCorsDomains.push(r);
|
|
136
|
-
}
|
|
137
|
-
function N(e) {
|
|
138
|
-
let t = !1;
|
|
139
|
-
if (u.noCorsDomains.length) {
|
|
140
|
-
const r = new URL(e).origin.toLowerCase();
|
|
141
|
-
t = u.noCorsDomains.some((n) => r.includes(n));
|
|
142
|
-
}
|
|
143
|
-
return t;
|
|
144
|
-
}
|
|
145
|
-
function W(e) {
|
|
146
|
-
let t = !1;
|
|
147
|
-
if (N(e)) {
|
|
148
|
-
const r = new URL(e).origin.toLowerCase(), n = u.crossOriginNoCorsDomains[r] || 0;
|
|
149
|
-
Date.now() - 60 * 6e4 > n && (t = !0);
|
|
150
|
-
}
|
|
151
|
-
return t;
|
|
152
|
-
}
|
|
153
|
-
function M(e) {
|
|
154
|
-
console && console.warn && console.warn.apply(console, [e]);
|
|
155
|
-
}
|
|
156
|
-
function B() {
|
|
157
|
-
return Promise.resolve({
|
|
158
|
-
fetch: globalThis.fetch,
|
|
159
|
-
Headers: globalThis.Headers,
|
|
160
|
-
Response: globalThis.Response,
|
|
161
|
-
Request: globalThis.Request
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
function J(e, t) {
|
|
165
|
-
var r;
|
|
166
|
-
if (!t && !window || !e)
|
|
167
|
-
return !1;
|
|
168
|
-
{
|
|
169
|
-
t = t || window;
|
|
170
|
-
const n = (r = t.location) === null || r === void 0 ? void 0 : r.origin;
|
|
171
|
-
return e.startsWith(n);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
const H = "@esri/arcgis-rest-js";
|
|
175
|
-
function K() {
|
|
176
|
-
return globalThis.DEFAULT_ARCGIS_REQUEST_OPTIONS || {
|
|
177
|
-
httpMethod: "POST",
|
|
178
|
-
params: {
|
|
179
|
-
f: "json"
|
|
180
|
-
}
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
class S extends m {
|
|
184
|
-
/**
|
|
185
|
-
* Create a new `ArcGISAuthError` object.
|
|
186
|
-
*
|
|
187
|
-
* @param message - The error message from the API
|
|
188
|
-
* @param code - The error code from the API
|
|
189
|
-
* @param response - The original response from the API that caused the error
|
|
190
|
-
* @param url - The original url of the request
|
|
191
|
-
* @param options - The original options of the request
|
|
192
|
-
*/
|
|
193
|
-
constructor(t = "AUTHENTICATION_ERROR", r = "AUTHENTICATION_ERROR_CODE", n, i, o) {
|
|
194
|
-
super(t, r, n, i, o), this.name = "ArcGISAuthError", this.message = r === "AUTHENTICATION_ERROR_CODE" ? t : `${r}: ${t}`;
|
|
195
|
-
const s = new.target.prototype;
|
|
196
|
-
Object.setPrototypeOf(this, s);
|
|
197
|
-
}
|
|
198
|
-
retry(t, r = 1) {
|
|
199
|
-
let n = 0;
|
|
200
|
-
const i = (o, s) => {
|
|
201
|
-
n = n + 1, t(this.url, this.options).then((a) => {
|
|
202
|
-
const f = Object.assign(Object.assign({}, this.options), { authentication: a });
|
|
203
|
-
return j(this.url, f);
|
|
204
|
-
}).then((a) => {
|
|
205
|
-
o(a);
|
|
206
|
-
}).catch((a) => {
|
|
207
|
-
a.name === "ArcGISAuthError" && n < r ? i(o, s) : a.name === this.name && a.message === this.message && n >= r ? s(this) : s(a);
|
|
208
|
-
});
|
|
209
|
-
};
|
|
210
|
-
return new Promise((o, s) => {
|
|
211
|
-
i(o, s);
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
function z(e, t, r, n, i) {
|
|
216
|
-
if (e.code >= 400) {
|
|
217
|
-
const { message: o, code: s } = e;
|
|
218
|
-
throw new m(o, s, e, t, n);
|
|
219
|
-
}
|
|
220
|
-
if (e.error) {
|
|
221
|
-
const { message: o, code: s, messageCode: a } = e.error, f = a || s || "UNKNOWN_ERROR_CODE";
|
|
222
|
-
throw s === 498 || s === 499 ? i || new S(o, f, e, t, n) : new m(o, f, e, t, n);
|
|
223
|
-
}
|
|
224
|
-
if (e.status === "failed" || e.status === "failure") {
|
|
225
|
-
let o, s = "UNKNOWN_ERROR_CODE";
|
|
226
|
-
try {
|
|
227
|
-
o = JSON.parse(e.statusMessage).message, s = JSON.parse(e.statusMessage).code;
|
|
228
|
-
} catch {
|
|
229
|
-
o = e.statusMessage || e.message;
|
|
230
|
-
}
|
|
231
|
-
throw new m(o, s, e, t, n);
|
|
232
|
-
}
|
|
233
|
-
return e;
|
|
234
|
-
}
|
|
235
|
-
function j(e, t) {
|
|
236
|
-
const r = K(), n = Object.assign(Object.assign(Object.assign({ httpMethod: "POST" }, r), t), {
|
|
237
|
-
params: Object.assign(Object.assign({}, r.params), t.params),
|
|
238
|
-
headers: Object.assign(Object.assign({}, r.headers), t.headers)
|
|
239
|
-
}), { httpMethod: i, rawResponse: o } = n, s = Object.assign({ f: "json" }, n.params);
|
|
240
|
-
let a = null;
|
|
241
|
-
const f = {
|
|
242
|
-
method: i,
|
|
243
|
-
signal: n.signal,
|
|
244
|
-
/* ensures behavior mimics XMLHttpRequest.
|
|
245
|
-
needed to support sending IWA cookies */
|
|
246
|
-
credentials: n.credentials || "same-origin"
|
|
247
|
-
};
|
|
248
|
-
N(e) && (f.credentials = "include"), n.headers && n.headers["X-Esri-Auth-Client-Id"] && e.indexOf("/oauth2/platformSelf") > -1 && (f.credentials = "include");
|
|
249
|
-
let g;
|
|
250
|
-
if (typeof n.authentication == "string") {
|
|
251
|
-
const c = n.authentication;
|
|
252
|
-
g = {
|
|
253
|
-
portal: "https://www.arcgis.com/sharing/rest",
|
|
254
|
-
getToken: () => Promise.resolve(c)
|
|
255
|
-
};
|
|
256
|
-
!n.authentication.startsWith("AAPK") && !n.authentication.startsWith("AAPT") && !n.authentication.startsWith("AATK") && // doesn't look like an API Key
|
|
257
|
-
!n.authentication.startsWith("AAST") && // doesn't look like a session token
|
|
258
|
-
!n.suppressWarnings && // user doesn't want to suppress warnings for this request
|
|
259
|
-
!globalThis.ARCGIS_REST_JS_SUPPRESS_TOKEN_WARNING && (M("Using an oAuth 2.0 access token directly in the token option is discouraged. Consider using ArcGISIdentityManager or Application session. See https://esriurl.com/arcgis-rest-js-direct-token-warning for more information."), globalThis.ARCGIS_REST_JS_SUPPRESS_TOKEN_WARNING = !0);
|
|
260
|
-
} else
|
|
261
|
-
g = n.authentication;
|
|
262
|
-
const U = e;
|
|
263
|
-
let b = !1;
|
|
264
|
-
typeof window < "u" && (b = J(e));
|
|
265
|
-
const I = !b && W(e);
|
|
266
|
-
n.headers && n.headers["X-Esri-Auth-Client-Id"] && e.indexOf("/oauth2/platformSelf") > -1 && (f.credentials = "include");
|
|
267
|
-
let E = Promise.resolve();
|
|
268
|
-
return I && (f.credentials = "include", E = L(e)), E.then(() => g ? g.getToken(e).catch((c) => (c.url = e, c.options = n, a = c, Promise.resolve(""))) : Promise.resolve("")).then((c) => {
|
|
269
|
-
c.length && (s.token = c), g && g.getDomainCredentials && (f.credentials = g.getDomainCredentials(e));
|
|
270
|
-
const l = {};
|
|
271
|
-
if (f.method === "GET") {
|
|
272
|
-
s.token && n.hideToken && // Sharing API does not support preflight check required by modern browsers https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request
|
|
273
|
-
typeof window > "u" && (l["X-Esri-Authorization"] = `Bearer ${s.token}`, delete s.token);
|
|
274
|
-
const d = T(s), w = d === "" ? (
|
|
275
|
-
/* istanbul ignore next -- @preserve */
|
|
276
|
-
e
|
|
277
|
-
) : `${e}?${d}`;
|
|
278
|
-
// This would exceed the maximum length for URLs by 2000 as default or as specified by the consumer and requires POST
|
|
279
|
-
n.maxUrlLength && w.length > n.maxUrlLength || !n.maxUrlLength && w.length > 2e3 || // Or if the customer requires the token to be hidden and it has not already been hidden in the header (for browsers)
|
|
280
|
-
s.token && n.hideToken ? (f.method = "POST", c.length && n.hideToken && (s.token = c, delete l["X-Esri-Authorization"])) : e = w;
|
|
281
|
-
}
|
|
282
|
-
const h = new RegExp("/items/.+/updateResources").test(e);
|
|
283
|
-
f.method === "POST" && (f.body = $(s, h)), f.headers = Object.assign(Object.assign({}, l), n.headers);
|
|
284
|
-
(typeof window > "u" || window && typeof window.document > "u") && !f.headers.referer && (f.headers.referer = H);
|
|
285
|
-
!A(s) && !h && (f.headers["Content-Type"] = "application/x-www-form-urlencoded");
|
|
286
|
-
return globalThis.fetch ? globalThis.fetch(e, f) : B().then(({ fetch: d }) => d(e, f));
|
|
287
|
-
}).then((c) => {
|
|
288
|
-
if (!c.ok)
|
|
289
|
-
return c.json().then((l) => {
|
|
290
|
-
const { status: h, statusText: d } = c, { message: w, details: y } = l.error, v = `${w}. ${y ? y.join(" ") : ""}`.trim();
|
|
291
|
-
throw new m(v, `HTTP ${h} ${d}`, l, e, n);
|
|
292
|
-
}).catch((l) => {
|
|
293
|
-
if (l.name === "ArcGISRequestError")
|
|
294
|
-
throw l;
|
|
295
|
-
const { status: h, statusText: d } = c;
|
|
296
|
-
throw new m(d, `HTTP ${h}`, c, e, n);
|
|
297
|
-
});
|
|
298
|
-
if (o)
|
|
299
|
-
return console.warn("rawResponse option is deprecated and will be removed in ArcGIS REST JS v5.0."), c;
|
|
300
|
-
switch (s.f) {
|
|
301
|
-
case "json":
|
|
302
|
-
return c.json();
|
|
303
|
-
case "geojson":
|
|
304
|
-
return c.json();
|
|
305
|
-
case "html":
|
|
306
|
-
return c.text();
|
|
307
|
-
case "text":
|
|
308
|
-
return c.text();
|
|
309
|
-
/* istanbul ignore next blob responses are difficult to make cross platform we will just have to trust that isomorphic fetch will do its job */
|
|
310
|
-
default:
|
|
311
|
-
return c.blob();
|
|
312
|
-
}
|
|
313
|
-
}).then((c) => {
|
|
314
|
-
if ((s.f === "json" || s.f === "geojson") && !o) {
|
|
315
|
-
const l = z(c, U, s, n, a);
|
|
316
|
-
if (c && /\/sharing\/rest\/(accounts|portals)\/self/i.test(e) && Array.isArray(c.authorizedCrossOriginNoCorsDomains) && F(c.authorizedCrossOriginNoCorsDomains), a) {
|
|
317
|
-
const h = e.toLowerCase().split(/\/rest(\/admin)?\/services\//)[0];
|
|
318
|
-
n.authentication.federatedServers[h] = {
|
|
319
|
-
token: [],
|
|
320
|
-
// default to 24 hours
|
|
321
|
-
expires: new Date(Date.now() + 86400 * 1e3)
|
|
322
|
-
}, a = null;
|
|
323
|
-
}
|
|
324
|
-
return l;
|
|
325
|
-
} else
|
|
326
|
-
return c;
|
|
327
|
-
});
|
|
328
|
-
}
|
|
329
|
-
function _(e, t = { params: { f: "json" } }) {
|
|
330
|
-
const { request: r } = t, n = x(t, ["request"]);
|
|
331
|
-
return r ? r(e, n) : j(e, n).catch((i) => i instanceof S && t.authentication && typeof t.authentication != "string" && t.authentication.canRefresh && t.authentication.refreshCredentials ? i.retry(() => t.authentication.refreshCredentials(), 1) : Promise.reject(i));
|
|
332
|
-
}
|
|
333
|
-
function Q(e) {
|
|
334
|
-
return typeof e != "string" || (e = e.trim(), e[e.length - 1] === "/" && (e = e.slice(0, -1))), e;
|
|
335
|
-
}
|
|
336
|
-
function P(e = {}) {
|
|
337
|
-
return e.portal ? Q(e.portal) : e.authentication && typeof e.authentication != "string" ? e.authentication.portal : "https://www.arcgis.com/sharing/rest";
|
|
338
|
-
}
|
|
339
|
-
function Y(e) {
|
|
340
|
-
return e.owner ? Promise.resolve(e.owner) : e.item && e.item.owner ? Promise.resolve(e.item.owner) : e.authentication && e.authentication.getUsername ? e.authentication.getUsername() : Promise.reject(new Error("Could not determine the owner of this item. Pass the `owner`, `item.owner`, or `authentication` option."));
|
|
341
|
-
}
|
|
342
|
-
function Z(e) {
|
|
343
|
-
return Array.isArray(e) && Array.isArray(e[0]) && Array.isArray(e[1]);
|
|
344
|
-
}
|
|
345
|
-
function q(e) {
|
|
346
|
-
return e.join(",");
|
|
347
|
-
}
|
|
348
|
-
function X(e, t, r) {
|
|
349
|
-
if (!e)
|
|
350
|
-
return e;
|
|
351
|
-
let n = null;
|
|
352
|
-
return typeof e.thumbnail == "string" && (n = `${t}/content/items/${e.id}/info/${e.thumbnail}`, n && e.access !== "public" && r && (n += `?${r}`)), Object.assign(Object.assign({}, e), n ? { thumbnailUrl: n } : {});
|
|
353
|
-
}
|
|
354
|
-
function ee(e, t) {
|
|
355
|
-
const r = D(e, t), n = Object.assign({ httpMethod: "GET" }, t);
|
|
356
|
-
return _(r, n).then(async (i) => {
|
|
357
|
-
const o = t?.portal || P(t);
|
|
358
|
-
let s;
|
|
359
|
-
if (t?.authentication && typeof t.authentication != "string" && i.access !== "public")
|
|
360
|
-
try {
|
|
361
|
-
s = await t.authentication.getToken(r);
|
|
362
|
-
} catch {
|
|
363
|
-
}
|
|
364
|
-
return X(i, o, s);
|
|
365
|
-
});
|
|
366
|
-
}
|
|
367
|
-
const D = (e, t) => `${typeof t == "string" ? t : P(t)}/content/items/${e}`;
|
|
368
|
-
function te(e, t) {
|
|
369
|
-
const r = `${D(e, t)}/data`, n = Object.assign({ httpMethod: "GET", params: {} }, t);
|
|
370
|
-
return n.file && (n.params.f = null), _(r, n).catch((i) => {
|
|
371
|
-
if (!RegExp(/The string did not match the expected pattern|(Unexpected end of (JSON input|data at line 1 column 1))/i).test(i.message))
|
|
372
|
-
throw i;
|
|
373
|
-
});
|
|
374
|
-
}
|
|
375
|
-
export {
|
|
376
|
-
x as _,
|
|
377
|
-
Y as a,
|
|
378
|
-
q as b,
|
|
379
|
-
ee as c,
|
|
380
|
-
X as d,
|
|
381
|
-
te as e,
|
|
382
|
-
P as f,
|
|
383
|
-
V as g,
|
|
384
|
-
Z as i,
|
|
385
|
-
_ as r,
|
|
386
|
-
M as w
|
|
387
|
-
};
|