chunk-VEGAOVMY.js 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  1. import {
  2. s,
  3. s2,
  4. s3
  5. } from "./chunk-E5O6P5I2.js";
  6. import {
  7. r,
  8. t,
  9. x
  10. } from "./chunk-YXWMMD76.js";
  11. // node_modules/@arcgis/core/core/urlUtils.js
  12. var s4 = s2.getLogger("esri.core.urlUtils");
  13. var u = s.request;
  14. var l = "esri/config: esriConfig.request.proxyUrl is not set.";
  15. var c = /^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i;
  16. var f = /^\s*http:/i;
  17. var a = /^\s*https:/i;
  18. var h = /^\s*file:/i;
  19. var p = /:\d+$/;
  20. var d = /^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i;
  21. var g = new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$");
  22. var m = new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");
  23. var y = class {
  24. constructor(t2 = "") {
  25. this.uri = t2, this.scheme = null, this.authority = null, this.path = null, this.query = null, this.fragment = null, this.user = null, this.password = null, this.host = null, this.port = null;
  26. let n = x(this.uri.match(g));
  27. this.scheme = n[2] || (n[1] ? "" : null), this.authority = n[4] || (n[3] ? "" : null), this.path = n[5], this.query = n[7] || (n[6] ? "" : null), this.fragment = n[9] || (n[8] ? "" : null), null != this.authority && (n = x(this.authority.match(m)), this.user = n[3] || null, this.password = n[4] || null, this.host = n[6] || n[7], this.port = n[9] || null);
  28. }
  29. toString() {
  30. return this.uri;
  31. }
  32. };
  33. var $ = {};
  34. var x2 = new y(s.applicationUrl);
  35. var w = x2;
  36. var O = q();
  37. var U = O;
  38. var b = () => w;
  39. var C = () => U;
  40. function q() {
  41. const t2 = x(w.path), n = t2.substring(0, t2.lastIndexOf(t2.split("/")[t2.split("/").length - 1]));
  42. return `${`${w.scheme}://${w.host}${null != w.port ? `:${w.port}` : ""}`}${n}`;
  43. }
  44. function j(t2) {
  45. if (!t2)
  46. return null;
  47. const n = { path: null, query: null }, e = new y(t2), r2 = t2.indexOf("?");
  48. return null === e.query ? n.path = t2 : (n.path = t2.substring(0, r2), n.query = L(e.query)), e.fragment && (n.hash = e.fragment, null === e.query && (n.path = n.path.substring(0, n.path.length - (e.fragment.length + 1)))), n;
  49. }
  50. function L(t2) {
  51. const n = t2.split("&"), e = {};
  52. for (const r2 of n) {
  53. if (!r2)
  54. continue;
  55. const t3 = r2.indexOf("=");
  56. let n2, o;
  57. t3 < 0 ? (n2 = decodeURIComponent(r2), o = "") : (n2 = decodeURIComponent(r2.slice(0, t3)), o = decodeURIComponent(r2.slice(t3 + 1)));
  58. let i = e[n2];
  59. "string" == typeof i && (i = e[n2] = [i]), Array.isArray(i) ? i.push(o) : e[n2] = o;
  60. }
  61. return e;
  62. }
  63. function v(t2) {
  64. return t2 && "object" == typeof t2 && "toJSON" in t2 && "function" == typeof t2.toJSON;
  65. }
  66. function I(t2, n) {
  67. return t2 ? n && "function" == typeof n ? Object.keys(t2).map((e) => encodeURIComponent(e) + "=" + encodeURIComponent(n(e, t2[e]))).join("&") : Object.keys(t2).map((e) => {
  68. const r2 = t2[e];
  69. if (null == r2)
  70. return "";
  71. const o = encodeURIComponent(e) + "=", i = n && n[e];
  72. return i ? o + encodeURIComponent(i(r2)) : Array.isArray(r2) ? r2.map((t3) => v(t3) ? o + encodeURIComponent(JSON.stringify(t3)) : o + encodeURIComponent(t3)).join("&") : v(r2) ? o + encodeURIComponent(JSON.stringify(r2)) : o + encodeURIComponent(r2);
  73. }).filter((t3) => t3).join("&") : "";
  74. }
  75. function A(t2 = false) {
  76. let e, r2 = u.proxyUrl;
  77. if ("string" == typeof t2) {
  78. e = ht(t2);
  79. const n = J(t2);
  80. n && (r2 = n.proxyUrl);
  81. } else
  82. e = !!t2;
  83. if (!r2)
  84. throw s4.warn(l), new s3("urlutils:proxy-not-set", l);
  85. e && $t() && (r2 = mt(r2));
  86. return j(r2);
  87. }
  88. function S(t2) {
  89. const n = J(t2);
  90. let e, r2;
  91. if (n) {
  92. const t3 = P(n.proxyUrl);
  93. e = t3.path, r2 = t3.query ? L(t3.query) : null;
  94. }
  95. if (e) {
  96. const n2 = j(t2);
  97. t2 = e + "?" + n2.path;
  98. const o = I({ ...r2, ...n2.query });
  99. o && (t2 = `${t2}?${o}`);
  100. }
  101. return t2;
  102. }
  103. var B = { path: "", query: "" };
  104. function P(t2) {
  105. const n = t2.indexOf("?");
  106. return -1 !== n ? (B.path = t2.slice(0, n), B.query = t2.slice(n + 1)) : (B.path = t2, B.query = null), B;
  107. }
  108. function k(t2) {
  109. return t2 = (t2 = xt(t2 = bt(t2 = P(t2).path), true)).toLowerCase();
  110. }
  111. function E(t2) {
  112. const n = { proxyUrl: t2.proxyUrl, urlPrefix: k(t2.urlPrefix) }, e = u.proxyRules, r2 = n.urlPrefix;
  113. let o = e.length;
  114. for (let i = 0; i < e.length; i++) {
  115. const t3 = e[i].urlPrefix;
  116. if (0 === r2.indexOf(t3)) {
  117. if (r2.length === t3.length)
  118. return -1;
  119. o = i;
  120. break;
  121. }
  122. 0 === t3.indexOf(r2) && (o = i + 1);
  123. }
  124. return e.splice(o, 0, n), o;
  125. }
  126. function J(t2) {
  127. const n = u.proxyRules, e = k(t2);
  128. for (let r2 = 0; r2 < n.length; r2++)
  129. if (0 === e.indexOf(n[r2].urlPrefix))
  130. return n[r2];
  131. }
  132. function N(t2, n) {
  133. return t2 = T(t2), n = T(n), xt(t2) === xt(n);
  134. }
  135. function T(t2) {
  136. const n = (t2 = F(t2)).indexOf("/sharing");
  137. return n > 0 ? t2.substring(0, n) : t2.replace(/\/+$/, "");
  138. }
  139. function W(t2) {
  140. const n = (n2) => null == n2 || n2 instanceof RegExp && n2.test(t2) || "string" == typeof n2 && t2.startsWith(n2), e = u.interceptors;
  141. if (e) {
  142. for (const r2 of e)
  143. if (Array.isArray(r2.urls)) {
  144. if (r2.urls.some(n))
  145. return r2;
  146. } else if (n(r2.urls))
  147. return r2;
  148. }
  149. return null;
  150. }
  151. function z(t2, n, e = false) {
  152. if (!t2 || !n)
  153. return false;
  154. const r2 = vt(t2), o = vt(n);
  155. return !(!e && r2.scheme !== o.scheme) && (null != r2.host && null != o.host && (r2.host.toLowerCase() === o.host.toLowerCase() && r2.port === o.port));
  156. }
  157. function D(t2) {
  158. if ("string" == typeof t2) {
  159. if (!K(t2))
  160. return true;
  161. t2 = vt(t2);
  162. }
  163. if (z(t2, w))
  164. return true;
  165. const n = u.trustedServers || [];
  166. for (let e = 0; e < n.length; e++) {
  167. const r2 = M(n[e]);
  168. for (let n2 = 0; n2 < r2.length; n2++)
  169. if (z(t2, r2[n2]))
  170. return true;
  171. }
  172. return false;
  173. }
  174. function M(t2) {
  175. return $[t2] || (at(t2) || ft(t2) ? $[t2] = [new y(Q(t2))] : $[t2] = [new y(`http://${t2}`), new y(`https://${t2}`)]), $[t2];
  176. }
  177. function Q(t2, n = U, e) {
  178. return ft(t2) ? e && e.preserveProtocolRelative ? t2 : "http" === w.scheme && w.authority === H(t2).slice(2) ? `http:${t2}` : `https:${t2}` : at(t2) ? t2 : x(G("/" === t2[0] ? wt(n) : n, t2));
  179. }
  180. function _(t2, n = U, e) {
  181. if (null == t2 || !K(t2))
  182. return t2;
  183. const r2 = F(t2), o = r2.toLowerCase(), i = F(n).toLowerCase().replace(/\/+$/, ""), s5 = e ? F(e).toLowerCase().replace(/\/+$/, "") : null;
  184. if (s5 && 0 !== i.indexOf(s5))
  185. return t2;
  186. const u2 = (t3, n2, e2) => -1 === (e2 = t3.indexOf(n2, e2)) ? t3.length : e2;
  187. let l2 = u2(o, "/", o.indexOf("//") + 2), c2 = -1;
  188. for (; o.slice(0, l2 + 1) === i.slice(0, l2) + "/" && (c2 = l2 + 1, l2 !== o.length); )
  189. l2 = u2(o, "/", l2 + 1);
  190. if (-1 === c2)
  191. return t2;
  192. if (s5 && c2 < s5.length)
  193. return t2;
  194. t2 = r2.slice(c2);
  195. const f2 = i.slice(c2 - 1).replace(/[^/]+/g, "").length;
  196. if (f2 > 0)
  197. for (let a2 = 0; a2 < f2; a2++)
  198. t2 = `../${t2}`;
  199. else
  200. t2 = `./${t2}`;
  201. return t2;
  202. }
  203. function F(t2) {
  204. return t2 = jt(t2 = Rt(t2 = qt(t2 = Q(t2 = t2.trim()))));
  205. }
  206. function G(...t2) {
  207. const n = t2.filter(r);
  208. if (!n || !n.length)
  209. return;
  210. const e = [];
  211. if (K(n[0])) {
  212. const t3 = n[0], r3 = t3.indexOf("//");
  213. -1 !== r3 && (e.push(t3.slice(0, r3 + 1)), dt(n[0]) && (e[0] += "/"), n[0] = t3.slice(r3 + 2));
  214. } else
  215. "/" === n[0][0] && e.push("");
  216. const r2 = n.reduce((t3, n2) => n2 ? t3.concat(n2.split("/")) : t3, []);
  217. for (let o = 0; o < r2.length; o++) {
  218. const t3 = r2[o];
  219. ".." === t3 && e.length > 0 && ".." !== e[e.length - 1] ? e.pop() : (!t3 && o === r2.length - 1 || t3 && ("." !== t3 || 0 === e.length)) && e.push(t3);
  220. }
  221. return e.join("/");
  222. }
  223. function H(t2, n = false) {
  224. if (null == t2 || V(t2) || X(t2))
  225. return null;
  226. let e = t2.indexOf("://");
  227. if (-1 === e && ft(t2))
  228. e = 2;
  229. else {
  230. if (-1 === e)
  231. return null;
  232. e += 3;
  233. }
  234. const r2 = t2.indexOf("/", e);
  235. return -1 !== r2 && (t2 = t2.slice(0, r2)), n && (t2 = xt(t2, true)), t2;
  236. }
  237. function K(t2) {
  238. return ft(t2) || at(t2);
  239. }
  240. function V(t2) {
  241. return null != t2 && "blob:" === t2.slice(0, 5);
  242. }
  243. function X(t2) {
  244. return null != t2 && "data:" === t2.slice(0, 5);
  245. }
  246. function Y(t2) {
  247. const n = nt(t2);
  248. if (!n || !n.isBase64)
  249. return null;
  250. const e = atob(n.data), r2 = new Uint8Array(e.length);
  251. for (let o = 0; o < e.length; o++)
  252. r2[o] = e.charCodeAt(o);
  253. return r2.buffer;
  254. }
  255. function Z(t2) {
  256. return btoa(String.fromCharCode.apply(null, t2)).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
  257. }
  258. var tt = /^data:(.*?)(;base64)?,(.*)$/;
  259. function nt(t2) {
  260. const n = t2.match(tt);
  261. if (!n)
  262. return null;
  263. const [, e, r2, o] = n;
  264. return { mediaType: e, isBase64: !!r2, data: o };
  265. }
  266. function et(t2) {
  267. return t2.isBase64 ? `data:${t2.mediaType};base64,${t2.data}` : `data:${t2.mediaType},${t2.data}`;
  268. }
  269. function it(t2, n) {
  270. ut(t2, n) || ct(t2, n);
  271. }
  272. function ut(t2, n) {
  273. if (!t2)
  274. return false;
  275. const e = document.createElement("a");
  276. if (!("download" in e))
  277. return false;
  278. const r2 = URL.createObjectURL(t2);
  279. return e.download = n, e.href = r2, e.style.display = "none", document.body.appendChild(e), e.click(), document.body.removeChild(e), URL.revokeObjectURL(r2), true;
  280. }
  281. function ct(t2, n) {
  282. return !!window.navigator.msSaveOrOpenBlob && window.navigator.msSaveOrOpenBlob(t2, n);
  283. }
  284. function ft(t2) {
  285. return null != t2 && "/" === t2[0] && "/" === t2[1];
  286. }
  287. function at(t2) {
  288. return null != t2 && c.test(t2);
  289. }
  290. function ht(t2) {
  291. return null != t2 && a.test(t2) || "https" === w.scheme && ft(t2);
  292. }
  293. function pt(t2) {
  294. return null != t2 && f.test(t2) || "http" === w.scheme && ft(t2);
  295. }
  296. function dt(t2) {
  297. return null != t2 && h.test(t2);
  298. }
  299. function mt(t2) {
  300. return ft(t2) ? `https:${t2}` : t2.replace(f, "https:");
  301. }
  302. function yt() {
  303. return "http" === w.scheme;
  304. }
  305. function $t() {
  306. return "https" === w.scheme;
  307. }
  308. function xt(t2, n = false) {
  309. return ft(t2) ? t2.slice(2) : (t2 = t2.replace(c, ""), n && t2.length > 1 && "/" === t2[0] && "/" === t2[1] && (t2 = t2.slice(2)), t2);
  310. }
  311. function wt(t2) {
  312. const n = t2.indexOf("//"), e = t2.indexOf("/", n + 2);
  313. return -1 === e ? t2 : t2.slice(0, e);
  314. }
  315. function Ot(t2) {
  316. let n = 0;
  317. if (K(t2)) {
  318. const e2 = t2.indexOf("//");
  319. -1 !== e2 && (n = e2 + 2);
  320. }
  321. const e = t2.lastIndexOf("/");
  322. return e < n ? t2 : t2.slice(0, e + 1);
  323. }
  324. function Ut(t2, n) {
  325. if (!t2)
  326. return "";
  327. const e = j(t2).path.replace(/\/+$/, ""), r2 = e.substring(e.lastIndexOf("/") + 1);
  328. if (!(n == null ? void 0 : n.length))
  329. return r2;
  330. const o = new RegExp(`.(${n.join("|")})$`, "ig");
  331. return r2.replace(o, "");
  332. }
  333. function bt(t2) {
  334. return t2 && "/" === t2[t2.length - 1] ? t2 : `${t2}/`;
  335. }
  336. function Ct(t2) {
  337. return t2.replace(/\/+$/, "");
  338. }
  339. function qt(t2) {
  340. if (/^https?:\/\//i.test(t2)) {
  341. const n = P(t2);
  342. t2 = (t2 = n.path.replace(/\/{2,}/g, "/")).replace("/", "//"), n.query && (t2 += `?${n.query}`);
  343. }
  344. return t2;
  345. }
  346. function Rt(t2) {
  347. return t2.replace(/^(https?:\/\/)(arcgis\.com)/i, "$1www.$2");
  348. }
  349. function jt(t2) {
  350. const n = u.httpsDomains;
  351. if (!pt(t2))
  352. return t2;
  353. const e = t2.indexOf("/", 7);
  354. let r2;
  355. if (r2 = -1 === e ? t2 : t2.slice(0, e), r2 = r2.toLowerCase().slice(7), p.test(r2)) {
  356. if (!r2.endsWith(":80"))
  357. return t2;
  358. r2 = r2.slice(0, -3), t2 = t2.replace(":80", "");
  359. }
  360. return yt() && r2 === w.authority && !d.test(t2) || ($t() && r2 === w.authority || n && n.some((t3) => r2 === t3 || r2.endsWith(`.${t3}`)) || $t() && !J(t2)) && (t2 = mt(t2)), t2;
  361. }
  362. function Lt(t2, n, e) {
  363. if (!(n && e && t2 && K(t2)))
  364. return t2;
  365. const r2 = t2.indexOf("//"), o = t2.indexOf("/", r2 + 2), i = t2.indexOf(":", r2 + 2), s5 = Math.min(o < 0 ? t2.length : o, i < 0 ? t2.length : i);
  366. if (t2.slice(r2 + 2, s5).toLowerCase() !== n.toLowerCase())
  367. return t2;
  368. return `${t2.slice(0, r2 + 2)}${e}${t2.slice(s5)}`;
  369. }
  370. function vt(t2) {
  371. return "string" == typeof t2 ? new y(Q(t2)) : (t2.scheme || (t2.scheme = w.scheme), t2);
  372. }
  373. function It(t2) {
  374. return Nt.test(t2);
  375. }
  376. function At(t2, n) {
  377. const e = j(t2), r2 = Object.keys(e.query || {});
  378. return r2.length > 0 && n && n.warn("removeQueryParameters()", `Url query parameters are not supported, the following parameters have been removed: ${r2.join(", ")}.`), e.path;
  379. }
  380. function St(t2, n, e) {
  381. const r2 = j(t2), o = r2.query || {};
  382. return o[n] = String(e), `${r2.path}?${I(o)}`;
  383. }
  384. function Bt(t2, n) {
  385. const e = j(t2), r2 = e.query || {};
  386. for (const i in n)
  387. r2[i] = n[i];
  388. const o = I(r2);
  389. return o ? `${e.path}?${o}` : e.path;
  390. }
  391. function kt(t2) {
  392. if (t(t2))
  393. return null;
  394. const n = t2.match(Jt);
  395. return n ? n[2] : null;
  396. }
  397. function Et(t2) {
  398. if (t(t2))
  399. return null;
  400. const n = t2.match(Jt);
  401. return n ? { path: n[1], extension: n[2] } : { path: t2, extension: null };
  402. }
  403. var Jt = /([^.]*)\.([^\/]*)$/;
  404. var Nt = /(^data:image\/svg|\.svg$)/i;
  405. export {
  406. y,
  407. b,
  408. C,
  409. j,
  410. L,
  411. I,
  412. A,
  413. S,
  414. E,
  415. J,
  416. N,
  417. W,
  418. z,
  419. D,
  420. Q,
  421. _,
  422. F,
  423. G,
  424. H,
  425. K,
  426. V,
  427. X,
  428. Y,
  429. Z,
  430. nt,
  431. et,
  432. it,
  433. ft,
  434. ht,
  435. mt,
  436. Ot,
  437. Ut,
  438. Ct,
  439. Lt,
  440. It,
  441. At,
  442. St,
  443. Bt,
  444. kt,
  445. Et
  446. };
  447. //# sourceMappingURL=chunk-VEGAOVMY.js.map