@esri/solutions-components 5.1.0-next.94 → 5.1.0-next.96

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (192) hide show
  1. package/dist/cdn/{XAW6KPKL.js → 2BUUN32T.js} +1 -1
  2. package/dist/cdn/{ZGEMIOB5.js → 2NVL4Z5G.js} +1 -1
  3. package/dist/cdn/{D4GI6KPZ.js → 3CDDDNHX.js} +1 -1
  4. package/dist/cdn/{VOF34LDF.js → 3EVMNCX6.js} +1 -1
  5. package/dist/cdn/{2VXTMCRJ.js → 3JQP6RGM.js} +1 -1
  6. package/dist/cdn/5K6B2WSQ.js +2 -0
  7. package/dist/cdn/{QYDGCI2P.js → 63RUMXWC.js} +1 -1
  8. package/dist/cdn/{5Z45KDQY.js → 6HZIF7DC.js} +1 -1
  9. package/dist/cdn/{C7ASL3A4.js → 6ZRRFBIZ.js} +1 -1
  10. package/dist/cdn/{NPOHA56R.js → 7RK7YWYV.js} +1 -1
  11. package/dist/cdn/{4QZ7WHXA.js → AG22WAP3.js} +1 -1
  12. package/dist/cdn/{JQXKQHAG.js → AMEUOI76.js} +1 -1
  13. package/dist/cdn/{ZP6VPBP4.js → BGXRCU7G.js} +1 -1
  14. package/dist/cdn/{5OF3YOO7.js → BIVYOKLF.js} +1 -1
  15. package/dist/cdn/{WRSVJIPA.js → BSXTZCNH.js} +1 -1
  16. package/dist/cdn/DRXERUDE.js +2 -0
  17. package/dist/cdn/{3ZZ726LQ.js → DSLOJFRD.js} +1 -1
  18. package/dist/cdn/{YVDSW2OQ.js → EN6E35NY.js} +1 -1
  19. package/dist/cdn/ESBPGZRY.js +2 -0
  20. package/dist/cdn/{NXL2QN3P.js → EVEXF6IH.js} +2 -2
  21. package/dist/cdn/{55NRVFJ5.js → FZBIZBOO.js} +1 -1
  22. package/dist/cdn/{LUZYJVG5.js → G7N3V3YJ.js} +1 -1
  23. package/dist/cdn/{ELPH6EFW.js → I2GXCEQM.js} +1 -1
  24. package/dist/cdn/{4HPFDUTJ.js → IC2D4LPZ.js} +1 -1
  25. package/dist/cdn/IRRMUFW7.js +2 -0
  26. package/dist/cdn/{FGWGYIBZ.js → KLLT6LQO.js} +1 -1
  27. package/dist/cdn/{3XGF3ZJO.js → MWMNRIUD.js} +1 -1
  28. package/dist/cdn/{CWXOH2PC.js → NBX7J6DU.js} +1 -1
  29. package/dist/cdn/{JC5EXPFH.js → NEM3F44J.js} +1 -1
  30. package/dist/cdn/{2HUG6L4M.js → OF33IXBV.js} +1 -1
  31. package/dist/cdn/{2O3HAXKG.js → OZE4W3UQ.js} +1 -1
  32. package/dist/cdn/PVM4ETZ7.js +2 -0
  33. package/dist/cdn/QADMFYXT.js +2 -0
  34. package/dist/cdn/QKJ4PGBO.js +2 -0
  35. package/dist/cdn/RTA6KNSK.js +2 -0
  36. package/dist/cdn/{SJCXI4TB.js → RX3VLQGY.js} +1 -1
  37. package/dist/cdn/{CHZWEULM.js → SAI5O6SI.js} +1 -1
  38. package/dist/cdn/{C4UB6MNN.js → TRBSV6ZY.js} +110 -110
  39. package/dist/cdn/{5BU6XZAD.js → TTV5UYNT.js} +1 -1
  40. package/dist/cdn/{2B2ANB2N.js → U6CZXWSF.js} +1 -1
  41. package/dist/cdn/{GJTXLQOS.js → URVOLZIY.js} +1 -1
  42. package/dist/cdn/{XXT542UR.js → UYY6JODL.js} +1 -1
  43. package/dist/cdn/VESARS2D.js +7 -0
  44. package/dist/cdn/VFZ2J4EW.js +2 -0
  45. package/dist/cdn/VRM54VB2.js +2 -0
  46. package/dist/cdn/{IGSOHYV3.js → XGZCGPHU.js} +1 -1
  47. package/dist/cdn/{JJ7JB2ZP.js → Y5N6ESUO.js} +1 -1
  48. package/dist/cdn/YDNNXKDK.js +2 -0
  49. package/dist/cdn/{O3SWSZQE.js → ZKGLAGUM.js} +1 -1
  50. package/dist/cdn/ZPWKF5SM.js +2 -0
  51. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.en.json +1 -1
  52. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.json +1 -1
  53. package/dist/cdn/assets/solution-details-card/t9n/messages.ar.json +1 -1
  54. package/dist/cdn/assets/solution-details-card/t9n/messages.bg.json +1 -1
  55. package/dist/cdn/assets/solution-details-card/t9n/messages.bs.json +1 -1
  56. package/dist/cdn/assets/solution-details-card/t9n/messages.ca.json +1 -1
  57. package/dist/cdn/assets/solution-details-card/t9n/messages.cs.json +1 -1
  58. package/dist/cdn/assets/solution-details-card/t9n/messages.da.json +1 -1
  59. package/dist/cdn/assets/solution-details-card/t9n/messages.de.json +1 -1
  60. package/dist/cdn/assets/solution-details-card/t9n/messages.el.json +1 -1
  61. package/dist/cdn/assets/solution-details-card/t9n/messages.en.json +1 -1
  62. package/dist/cdn/assets/solution-details-card/t9n/messages.es.json +1 -1
  63. package/dist/cdn/assets/solution-details-card/t9n/messages.et.json +1 -1
  64. package/dist/cdn/assets/solution-details-card/t9n/messages.fi.json +1 -1
  65. package/dist/cdn/assets/solution-details-card/t9n/messages.fr.json +1 -1
  66. package/dist/cdn/assets/solution-details-card/t9n/messages.he.json +1 -1
  67. package/dist/cdn/assets/solution-details-card/t9n/messages.hr.json +1 -1
  68. package/dist/cdn/assets/solution-details-card/t9n/messages.hu.json +1 -1
  69. package/dist/cdn/assets/solution-details-card/t9n/messages.id.json +1 -1
  70. package/dist/cdn/assets/solution-details-card/t9n/messages.it.json +1 -1
  71. package/dist/cdn/assets/solution-details-card/t9n/messages.ja.json +1 -1
  72. package/dist/cdn/assets/solution-details-card/t9n/messages.json +1 -1
  73. package/dist/cdn/assets/solution-details-card/t9n/messages.ko.json +1 -1
  74. package/dist/cdn/assets/solution-details-card/t9n/messages.lt.json +1 -1
  75. package/dist/cdn/assets/solution-details-card/t9n/messages.lv.json +1 -1
  76. package/dist/cdn/assets/solution-details-card/t9n/messages.nl.json +1 -1
  77. package/dist/cdn/assets/solution-details-card/t9n/messages.no.json +1 -1
  78. package/dist/cdn/assets/solution-details-card/t9n/messages.pl.json +1 -1
  79. package/dist/cdn/assets/solution-details-card/t9n/messages.pt-BR.json +1 -1
  80. package/dist/cdn/assets/solution-details-card/t9n/messages.pt-PT.json +1 -1
  81. package/dist/cdn/assets/solution-details-card/t9n/messages.ro.json +1 -1
  82. package/dist/cdn/assets/solution-details-card/t9n/messages.ru.json +1 -1
  83. package/dist/cdn/assets/solution-details-card/t9n/messages.sk.json +1 -1
  84. package/dist/cdn/assets/solution-details-card/t9n/messages.sl.json +1 -1
  85. package/dist/cdn/assets/solution-details-card/t9n/messages.sr.json +1 -1
  86. package/dist/cdn/assets/solution-details-card/t9n/messages.sv.json +1 -1
  87. package/dist/cdn/assets/solution-details-card/t9n/messages.th.json +1 -1
  88. package/dist/cdn/assets/solution-details-card/t9n/messages.tr.json +1 -1
  89. package/dist/cdn/assets/solution-details-card/t9n/messages.uk.json +1 -1
  90. package/dist/cdn/assets/solution-details-card/t9n/messages.vi.json +1 -1
  91. package/dist/cdn/assets/solution-details-card/t9n/messages.zh-CN.json +1 -1
  92. package/dist/cdn/assets/solution-details-card/t9n/messages.zh-HK.json +1 -1
  93. package/dist/cdn/assets/solution-details-card/t9n/messages.zh-TW.json +1 -1
  94. package/dist/cdn/assets/solution-item-accordion/t9n/messages.ar.json +1 -1
  95. package/dist/cdn/assets/solution-item-accordion/t9n/messages.bg.json +1 -1
  96. package/dist/cdn/assets/solution-item-accordion/t9n/messages.bs.json +1 -1
  97. package/dist/cdn/assets/solution-item-accordion/t9n/messages.ca.json +1 -1
  98. package/dist/cdn/assets/solution-item-accordion/t9n/messages.cs.json +1 -1
  99. package/dist/cdn/assets/solution-item-accordion/t9n/messages.da.json +1 -1
  100. package/dist/cdn/assets/solution-item-accordion/t9n/messages.de.json +1 -1
  101. package/dist/cdn/assets/solution-item-accordion/t9n/messages.el.json +1 -1
  102. package/dist/cdn/assets/solution-item-accordion/t9n/messages.en.json +1 -1
  103. package/dist/cdn/assets/solution-item-accordion/t9n/messages.es.json +1 -1
  104. package/dist/cdn/assets/solution-item-accordion/t9n/messages.et.json +1 -1
  105. package/dist/cdn/assets/solution-item-accordion/t9n/messages.fi.json +1 -1
  106. package/dist/cdn/assets/solution-item-accordion/t9n/messages.fr.json +1 -1
  107. package/dist/cdn/assets/solution-item-accordion/t9n/messages.he.json +1 -1
  108. package/dist/cdn/assets/solution-item-accordion/t9n/messages.hr.json +1 -1
  109. package/dist/cdn/assets/solution-item-accordion/t9n/messages.hu.json +1 -1
  110. package/dist/cdn/assets/solution-item-accordion/t9n/messages.id.json +1 -1
  111. package/dist/cdn/assets/solution-item-accordion/t9n/messages.it.json +1 -1
  112. package/dist/cdn/assets/solution-item-accordion/t9n/messages.ja.json +1 -1
  113. package/dist/cdn/assets/solution-item-accordion/t9n/messages.json +1 -1
  114. package/dist/cdn/assets/solution-item-accordion/t9n/messages.ko.json +1 -1
  115. package/dist/cdn/assets/solution-item-accordion/t9n/messages.lt.json +1 -1
  116. package/dist/cdn/assets/solution-item-accordion/t9n/messages.lv.json +1 -1
  117. package/dist/cdn/assets/solution-item-accordion/t9n/messages.nl.json +1 -1
  118. package/dist/cdn/assets/solution-item-accordion/t9n/messages.no.json +1 -1
  119. package/dist/cdn/assets/solution-item-accordion/t9n/messages.pl.json +1 -1
  120. package/dist/cdn/assets/solution-item-accordion/t9n/messages.pt-BR.json +1 -1
  121. package/dist/cdn/assets/solution-item-accordion/t9n/messages.pt-PT.json +1 -1
  122. package/dist/cdn/assets/solution-item-accordion/t9n/messages.ro.json +1 -1
  123. package/dist/cdn/assets/solution-item-accordion/t9n/messages.ru.json +1 -1
  124. package/dist/cdn/assets/solution-item-accordion/t9n/messages.sk.json +1 -1
  125. package/dist/cdn/assets/solution-item-accordion/t9n/messages.sl.json +1 -1
  126. package/dist/cdn/assets/solution-item-accordion/t9n/messages.sr.json +1 -1
  127. package/dist/cdn/assets/solution-item-accordion/t9n/messages.sv.json +1 -1
  128. package/dist/cdn/assets/solution-item-accordion/t9n/messages.th.json +1 -1
  129. package/dist/cdn/assets/solution-item-accordion/t9n/messages.tr.json +1 -1
  130. package/dist/cdn/assets/solution-item-accordion/t9n/messages.uk.json +1 -1
  131. package/dist/cdn/assets/solution-item-accordion/t9n/messages.vi.json +1 -1
  132. package/dist/cdn/assets/solution-item-accordion/t9n/messages.zh-CN.json +1 -1
  133. package/dist/cdn/assets/solution-item-accordion/t9n/messages.zh-HK.json +1 -1
  134. package/dist/cdn/assets/solution-item-accordion/t9n/messages.zh-TW.json +1 -1
  135. package/dist/cdn/assets/solutions-deployed-list/t9n/messages.en.json +1 -0
  136. package/dist/cdn/assets/solutions-deployed-list/t9n/messages.json +1 -0
  137. package/dist/cdn/index.js +1 -1
  138. package/dist/cdn/main.css +1 -1
  139. package/dist/chunks/cardFetchingUtils.js +1 -1
  140. package/dist/chunks/converter.js +86 -89
  141. package/dist/chunks/get.js +387 -0
  142. package/dist/chunks/helpers.js +61 -39
  143. package/dist/chunks/solution-deploy-dialog.js +1 -1
  144. package/dist/chunks/solutions-deploy-app-nav.js +1 -1
  145. package/dist/components/arcgis-solutions-assistant/customElement.js +7713 -7308
  146. package/dist/components/consent-manager/customElement.js +609 -638
  147. package/dist/components/solution-configure-titles/customElement.js +13 -12
  148. package/dist/components/solution-delete-dialog/customElement.js +28 -27
  149. package/dist/components/solution-deployed-card-panel/customElement.js +12 -12
  150. package/dist/components/solution-details-card/customElement.d.ts +4 -0
  151. package/dist/components/solution-details-card/customElement.js +29 -21
  152. package/dist/components/solution-details-card/index.js +1 -0
  153. package/dist/components/solution-details-panel/customElement.js +1 -1
  154. package/dist/components/solution-item-accordion/customElement.d.ts +5 -2
  155. package/dist/components/solution-item-accordion/customElement.js +42 -32
  156. package/dist/components/solution-item-accordion/index.js +1 -0
  157. package/dist/components/solutions-all-panel/customElement.d.ts +2 -0
  158. package/dist/components/solutions-all-panel/customElement.js +57 -42
  159. package/dist/components/solutions-all-shell/customElement.js +94 -40
  160. package/dist/components/solutions-deployed-list/customElement.d.ts +33 -0
  161. package/dist/components/solutions-deployed-list/customElement.js +38 -0
  162. package/dist/components/solutions-deployed-list/index.d.ts +1 -0
  163. package/dist/components/solutions-deployed-list/index.js +1 -0
  164. package/dist/components/solutions-deployed-panel/customElement.js +1 -1
  165. package/dist/components/solutions-deployed-shell/customElement.js +1 -1
  166. package/dist/docs/api.json +1 -1
  167. package/dist/docs/docs.json +1 -1
  168. package/dist/docs/vscode.html-custom-data.json +1 -1
  169. package/dist/docs/web-types.json +1 -1
  170. package/dist/index.d.ts +10 -0
  171. package/dist/loader.js +4 -3
  172. package/dist/solutions-components_commit.txt +6 -6
  173. package/dist/types/lumina.d.ts +6 -0
  174. package/dist/types/preact.d.ts +7 -0
  175. package/dist/types/react.d.ts +8 -0
  176. package/dist/types/stencil.d.ts +6 -0
  177. package/dist/utils/getRelatedInfos.d.ts +4 -0
  178. package/dist/utils/interfaces.d.ts +10 -2
  179. package/package.json +1 -1
  180. package/dist/cdn/2L3RREZ4.js +0 -2
  181. package/dist/cdn/2WHAF4H7.js +0 -2
  182. package/dist/cdn/AKKTG2RD.js +0 -2
  183. package/dist/cdn/DLH53PYM.js +0 -7
  184. package/dist/cdn/FDE2V7FU.js +0 -2
  185. package/dist/cdn/K6WLYYPH.js +0 -2
  186. package/dist/cdn/P24CZ4HM.js +0 -2
  187. package/dist/cdn/R2G4DDRZ.js +0 -2
  188. package/dist/cdn/SO3S3WP4.js +0 -2
  189. package/dist/cdn/UBLDT5XD.js +0 -2
  190. package/dist/cdn/X5EABWHE.js +0 -2
  191. package/dist/cdn/ZONXYZVU.js +0 -2
  192. package/dist/chunks/get-portal-url.js +0 -345
@@ -0,0 +1,387 @@
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
+ X as a,
378
+ q as b,
379
+ V as c,
380
+ Y as d,
381
+ ee as e,
382
+ te as f,
383
+ P as g,
384
+ Z as i,
385
+ _ as r,
386
+ M as w
387
+ };
@@ -1,14 +1,14 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import * as o from "@esri/solution-common";
2
+ import * as c from "@esri/solution-common";
3
3
  import "@arcgis/core/intl.js";
4
- function u(e) {
4
+ function d(e) {
5
5
  let t = "", r = "?";
6
6
  return e.forEach((n) => {
7
7
  n.k && n.v && (t += r + n.k + "=" + n.v, r = "&");
8
8
  }), t;
9
9
  }
10
10
  function l(e) {
11
- return e ? o.getVelocityUrlBase(e, {}).then((t) => Promise.resolve(!!t)) : Promise.resolve(!1);
11
+ return e ? c.getVelocityUrlBase(e, {}).then((t) => Promise.resolve(!!t)) : Promise.resolve(!1);
12
12
  }
13
13
  function f(e) {
14
14
  if (e) {
@@ -23,7 +23,7 @@ function a(e) {
23
23
  n.k && n.v && (t += r + n.k + "=" + n.v, r = "&");
24
24
  }), t;
25
25
  }
26
- function d(e, t, r) {
26
+ function m(e, t, r) {
27
27
  try {
28
28
  const n = new URL(e);
29
29
  if (n.searchParams.get(t) === r)
@@ -32,21 +32,21 @@ function d(e, t, r) {
32
32
  }
33
33
  return e;
34
34
  }
35
- function g(e, t, r, n) {
36
- let s = "";
37
- return t ? s = n + "/sharing/rest/content/items/" + e + "/info/" + t + a([{ k: "w", v: "400" }]) : s = r, s;
35
+ function p(e, t, r, n) {
36
+ let o = "";
37
+ return t ? o = n + "/sharing/rest/content/items/" + e + "/info/" + t + a([{ k: "w", v: "400" }]) : o = r, o;
38
38
  }
39
- function m(e) {
39
+ function g(e) {
40
40
  const t = e ? e.replace("https://", "").replace("www.", "") : "";
41
41
  return t.endsWith("devext.arcgis.com") || t.endsWith("mapsqa.arcgis.com") || t.endsWith("qaext.arcgis.com") ? e ?? "https://www.arcgis.com" : "https://www.arcgis.com";
42
42
  }
43
- function p(e, t, r) {
43
+ function y(e, t, r) {
44
44
  return t.some((n) => n.wkid === e ? (r = n.defaultExtent, !0) : !1), r;
45
45
  }
46
- function h(e, t) {
47
- return i(t || e);
46
+ function w(e, t) {
47
+ return s(t || e);
48
48
  }
49
- function w(e, t = "en") {
49
+ function h(e, t = "en") {
50
50
  return new Intl.DateTimeFormat(t, {
51
51
  year: "numeric",
52
52
  month: "long",
@@ -57,18 +57,18 @@ function v(e, t) {
57
57
  let r = "";
58
58
  return e.some((n) => n.startsWith(t) ? (r = n.substring(t.length), !0) : !1), r;
59
59
  }
60
- function i(e) {
60
+ function s(e) {
61
61
  const t = e.replace("www.", "");
62
62
  return t.endsWith("devext.arcgis.com") ? "dev" : t.endsWith("mapsqa.arcgis.com") || t.endsWith("qaext.arcgis.com") ? "qa" : t === "arcgis.com" || t.endsWith(".arcgis.com") ? "prod" : "dev";
63
63
  }
64
- function y(e, t) {
65
- let r = e?.reduce((n, s) => (n.indexOf(s.id) < 0 && n.push(s.id), n), []) || [];
66
- return t ? r.sort((n, s) => t.indexOf(n) - t.indexOf(s)) : r;
64
+ function k(e, t) {
65
+ let r = e?.reduce((n, o) => (n.indexOf(o.id) < 0 && n.push(o.id), n), []) || [];
66
+ return t ? r.sort((n, o) => t.indexOf(n) - t.indexOf(o)) : r;
67
67
  }
68
- function S(e) {
68
+ function D(e) {
69
69
  return e.charAt(0).toUpperCase() + e.slice(1);
70
70
  }
71
- function E(e) {
71
+ function I(e) {
72
72
  return {
73
73
  relevance: "Relevance",
74
74
  title: "Title",
@@ -78,7 +78,7 @@ function E(e) {
78
78
  suggested: "Suggested for you"
79
79
  }[e] || e;
80
80
  }
81
- function k(e) {
81
+ function S(e) {
82
82
  if (!e)
83
83
  return "Unknown error";
84
84
  if (e.message)
@@ -90,34 +90,56 @@ function k(e) {
90
90
  return e.toString();
91
91
  }
92
92
  }
93
- function x(e) {
93
+ function E(e) {
94
94
  return e ? parseFloat(((Date.now() - e) / 1e3).toFixed(2)) : 0;
95
95
  }
96
- function b(e, t) {
96
+ function V(e, t) {
97
97
  (e.key === "Enter" || e.code === "NumpadEnter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), t());
98
98
  }
99
- function D(e) {
99
+ function x(e) {
100
100
  window.dispatchEvent(new CustomEvent("showGlobalAlert", {
101
101
  detail: e
102
102
  }));
103
103
  }
104
+ function W(e, t) {
105
+ const r = new Set(
106
+ e.filter((n) => n.dependencyItemId !== t).map((n) => `${n.controlItemId}|${n.dependencyItemId}`)
107
+ );
108
+ return Array.from(r).map((n) => {
109
+ const [o, i] = n.split("|");
110
+ return { controlItemId: o, dependencyItemId: i };
111
+ });
112
+ }
113
+ function b(e) {
114
+ return e.map((t) => {
115
+ const r = t.typeKeywords?.find((o) => o.startsWith("solutionversion-")), n = r ? r.split("-")[1] : "unknown";
116
+ return {
117
+ id: t.id,
118
+ title: t.title,
119
+ deployVersion: n,
120
+ created: t.created
121
+ };
122
+ }).sort((t, r) => t.deployVersion === "unknown" || r.deployVersion === "unknown" ? t.deployVersion === "unknown" ? 1 : -1 : t.deployVersion.localeCompare(r.deployVersion, void 0, { numeric: !0 }));
123
+ }
104
124
  export {
105
- u as a,
125
+ d as a,
106
126
  v as b,
107
- y as c,
108
- D as d,
109
- E as e,
110
- f,
111
- m as g,
112
- b as h,
113
- w as i,
114
- g as j,
115
- a as k,
116
- l,
117
- x as m,
118
- k as n,
119
- h as o,
120
- p,
121
- d as r,
122
- S as t
127
+ k as c,
128
+ W as d,
129
+ x as e,
130
+ I as f,
131
+ g,
132
+ V as h,
133
+ f as i,
134
+ h as j,
135
+ p as k,
136
+ a as l,
137
+ l as m,
138
+ E as n,
139
+ S as o,
140
+ w as p,
141
+ y as q,
142
+ m as r,
143
+ b as s,
144
+ D as t
123
145
  };