RouteLayer-PBS3GG7W.js 55 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977
  1. import {
  2. D,
  3. O as O2,
  4. R,
  5. T,
  6. U as U2,
  7. b as b3,
  8. b2 as b4,
  9. g as g2,
  10. h,
  11. h2,
  12. h3,
  13. h4,
  14. i as i4,
  15. k as k2,
  16. l as l3,
  17. n as n3,
  18. o as o4,
  19. r as r5,
  20. s as s4,
  21. t as t4,
  22. u,
  23. w,
  24. y as y2
  25. } from "./chunk-HDAG7QRR.js";
  26. import {
  27. i as i3
  28. } from "./chunk-5ZZSM3DU.js";
  29. import "./chunk-BQ7UE3XL.js";
  30. import {
  31. f
  32. } from "./chunk-UYC6KGJA.js";
  33. import {
  34. e as e3,
  35. n as n2
  36. } from "./chunk-YASLQAXE.js";
  37. import {
  38. x
  39. } from "./chunk-2VFJVI2I.js";
  40. import {
  41. L
  42. } from "./chunk-P4UZNLD5.js";
  43. import {
  44. fn,
  45. rn
  46. } from "./chunk-DH2OBAUC.js";
  47. import "./chunk-TNLRDNTC.js";
  48. import {
  49. o as o3
  50. } from "./chunk-CIG5OHC7.js";
  51. import "./chunk-FUD7XO3N.js";
  52. import "./chunk-6EU7GFUT.js";
  53. import "./chunk-MFUAILAT.js";
  54. import "./chunk-HZJYXMI6.js";
  55. import "./chunk-27P5ZSC7.js";
  56. import "./chunk-UPD4MTCL.js";
  57. import "./chunk-GRBROWI6.js";
  58. import "./chunk-5NKYXKIA.js";
  59. import "./chunk-MPWGHCZG.js";
  60. import "./chunk-FTI5VP6T.js";
  61. import {
  62. g as g3
  63. } from "./chunk-RZFGRBD7.js";
  64. import {
  65. B as B2
  66. } from "./chunk-PUSPZYFZ.js";
  67. import {
  68. S2,
  69. j2 as j4,
  70. m as m3,
  71. y
  72. } from "./chunk-EN7YGJWG.js";
  73. import "./chunk-VBNMTM7L.js";
  74. import {
  75. l as l2
  76. } from "./chunk-3D3QEPRE.js";
  77. import "./chunk-JFNNSBWL.js";
  78. import {
  79. S
  80. } from "./chunk-X7DBH4KK.js";
  81. import "./chunk-LY74KTXV.js";
  82. import "./chunk-522WBHUO.js";
  83. import "./chunk-WNCU6BFU.js";
  84. import "./chunk-PIGRDDRG.js";
  85. import "./chunk-BJHM4JNS.js";
  86. import "./chunk-F6A2QQ26.js";
  87. import "./chunk-XLV7RUSE.js";
  88. import "./chunk-NTUXR253.js";
  89. import "./chunk-EOSZHC5H.js";
  90. import "./chunk-C43UE3Z5.js";
  91. import "./chunk-H2KDMZTR.js";
  92. import {
  93. a as a2
  94. } from "./chunk-RMX2AZ4P.js";
  95. import "./chunk-NE3ESGA6.js";
  96. import {
  97. a
  98. } from "./chunk-YIS6BAC3.js";
  99. import "./chunk-7XXXCK2A.js";
  100. import {
  101. r as r4
  102. } from "./chunk-7ZIDBK7B.js";
  103. import {
  104. v as v2
  105. } from "./chunk-KHA63LLS.js";
  106. import {
  107. c as c2
  108. } from "./chunk-FGKNEJKJ.js";
  109. import "./chunk-PSV473TI.js";
  110. import {
  111. O
  112. } from "./chunk-I3OBGWNS.js";
  113. import "./chunk-FONIFA5N.js";
  114. import "./chunk-EG5OI4V4.js";
  115. import "./chunk-65BYCSII.js";
  116. import "./chunk-WZQZRKNH.js";
  117. import "./chunk-LRDX4TO7.js";
  118. import "./chunk-6A4U74YA.js";
  119. import {
  120. a as a3
  121. } from "./chunk-5LXROFTA.js";
  122. import "./chunk-GJXW4HL5.js";
  123. import "./chunk-WJW5DUN6.js";
  124. import {
  125. t as t3
  126. } from "./chunk-W72F6AS3.js";
  127. import "./chunk-PJ7ZQ4VD.js";
  128. import "./chunk-WDLTDV2L.js";
  129. import "./chunk-TERAW6FT.js";
  130. import "./chunk-N2663GRX.js";
  131. import {
  132. N
  133. } from "./chunk-O4FY3ITT.js";
  134. import "./chunk-WEMIK25H.js";
  135. import {
  136. b as b2
  137. } from "./chunk-4DDBH2K5.js";
  138. import "./chunk-7N4X6GF3.js";
  139. import "./chunk-JXW4QTJA.js";
  140. import {
  141. i as i2
  142. } from "./chunk-UXF37FQ4.js";
  143. import "./chunk-ZOEK6QHJ.js";
  144. import "./chunk-XNLG7T2T.js";
  145. import "./chunk-IR4PV7VK.js";
  146. import {
  147. d as d2
  148. } from "./chunk-2Z6LERTI.js";
  149. import {
  150. m,
  151. m2
  152. } from "./chunk-OWVBLVP3.js";
  153. import "./chunk-AFZ7XSEW.js";
  154. import {
  155. b
  156. } from "./chunk-EGZW6HC3.js";
  157. import {
  158. B
  159. } from "./chunk-4NKD334K.js";
  160. import "./chunk-65K7LC56.js";
  161. import "./chunk-ATPLLI5W.js";
  162. import "./chunk-WJ3OEUD3.js";
  163. import "./chunk-MXB2XLKV.js";
  164. import "./chunk-XH7RUGVZ.js";
  165. import "./chunk-TBBTRX4O.js";
  166. import "./chunk-YBSUITLL.js";
  167. import {
  168. j as j2
  169. } from "./chunk-ALDCDSPV.js";
  170. import "./chunk-DT6EAZQ5.js";
  171. import "./chunk-HNOZUNJ4.js";
  172. import {
  173. U
  174. } from "./chunk-VNFRAYHO.js";
  175. import "./chunk-R5IG2D6H.js";
  176. import {
  177. Ct,
  178. j as j3
  179. } from "./chunk-VBRY5KJM.js";
  180. import {
  181. s as s3
  182. } from "./chunk-PDKDCAAD.js";
  183. import {
  184. M2 as M,
  185. j2 as j,
  186. o as o2
  187. } from "./chunk-ECW2QABR.js";
  188. import "./chunk-GCDJLKH4.js";
  189. import {
  190. c,
  191. k2 as k,
  192. r as r3
  193. } from "./chunk-MRJEICT6.js";
  194. import {
  195. d,
  196. e,
  197. l3 as l,
  198. n2 as n
  199. } from "./chunk-Y3WMVFTW.js";
  200. import "./chunk-SAS7RONY.js";
  201. import "./chunk-WSRBH7BF.js";
  202. import {
  203. v
  204. } from "./chunk-IHXECKQQ.js";
  205. import {
  206. g
  207. } from "./chunk-ULGDPLM2.js";
  208. import {
  209. r as r2,
  210. s,
  211. s3 as s2
  212. } from "./chunk-EMJ4ZSM2.js";
  213. import {
  214. o,
  215. t as t2
  216. } from "./chunk-IKP3YN53.js";
  217. import {
  218. e as e2,
  219. i,
  220. r,
  221. t
  222. } from "./chunk-GZT4BVFP.js";
  223. import "./chunk-A5ICIBVI.js";
  224. // node_modules/@arcgis/core/layers/support/RouteStopSymbols.js
  225. var p = class extends l {
  226. constructor(o5) {
  227. super(o5), this.break = new y({ color: [255, 255, 255], size: 12, outline: { color: [0, 122, 194], width: 3 } }), this.first = new y({ color: [0, 255, 0], size: 20, outline: { color: [255, 255, 255], width: 4 } }), this.unlocated = new y({ color: [255, 0, 0], size: 12, outline: { color: [255, 255, 255], width: 3 } }), this.last = new y({ color: [255, 0, 0], size: 20, outline: { color: [255, 255, 255], width: 4 } }), this.middle = new y({ color: [51, 51, 51], size: 12, outline: { color: [0, 122, 194], width: 3 } }), this.waypoint = new y({ color: [255, 255, 255], size: 12, outline: { color: [0, 122, 194], width: 3 } });
  228. }
  229. };
  230. e([d({ types: j4 })], p.prototype, "break", void 0), e([d({ types: j4 })], p.prototype, "first", void 0), e([d({ types: j4 })], p.prototype, "unlocated", void 0), e([d({ types: j4 })], p.prototype, "last", void 0), e([d({ types: j4 })], p.prototype, "middle", void 0), e([d({ types: j4 })], p.prototype, "waypoint", void 0), p = e([n("esri.layers.support.RouteStopSymbols")], p);
  231. var l4 = p;
  232. // node_modules/@arcgis/core/layers/support/RouteSymbols.js
  233. var c3 = class extends l {
  234. constructor(o5) {
  235. super(o5), this.directionLines = new m3({ color: [0, 122, 194], width: 6 }), this.directionPoints = new y({ color: [255, 255, 255], size: 6, outline: { color: [0, 122, 194], width: 2 } }), this.pointBarriers = new y({ style: "x", size: 10, outline: { color: [255, 0, 0], width: 3 } }), this.polygonBarriers = new S2({ color: [255, 170, 0, 0.6], outline: { width: 7.5, color: [255, 0, 0, 0.6] } }), this.polylineBarriers = new m3({ width: 7.5, color: [255, 85, 0, 0.7] }), this.routeInfo = new m3({ width: 8, color: [20, 89, 127] }), this.stops = new l4();
  236. }
  237. };
  238. e([d({ types: j4 })], c3.prototype, "directionLines", void 0), e([d({ types: j4 })], c3.prototype, "directionPoints", void 0), e([d({ types: j4 })], c3.prototype, "pointBarriers", void 0), e([d({ types: j4 })], c3.prototype, "polygonBarriers", void 0), e([d({ types: j4 })], c3.prototype, "polylineBarriers", void 0), e([d({ types: j4 })], c3.prototype, "routeInfo", void 0), e([d({ type: l4 })], c3.prototype, "stops", void 0), c3 = e([n("esri.layers.support.RouteSymbols")], c3);
  239. var n4 = c3;
  240. // node_modules/@arcgis/core/rest/support/NetworkAttribute.js
  241. var n5 = class extends l {
  242. constructor(t6) {
  243. super(t6), this.dataType = null, this.name = null, this.parameterNames = null, this.restrictionUsageParameterName = null, this.timeNeutralAttributeName = null, this.trafficSupport = null, this.units = null, this.usageType = null;
  244. }
  245. };
  246. e([d({ type: String })], n5.prototype, "dataType", void 0), e([r4(T, { ignoreUnknown: false })], n5.prototype, "name", void 0), e([d({ type: [String] })], n5.prototype, "parameterNames", void 0), e([d({ type: String })], n5.prototype, "restrictionUsageParameterName", void 0), e([r4(y2, { ignoreUnknown: false })], n5.prototype, "timeNeutralAttributeName", void 0), e([d({ type: String })], n5.prototype, "trafficSupport", void 0), e([d({ type: String })], n5.prototype, "units", void 0), e([r4(b3)], n5.prototype, "usageType", void 0), n5 = e([n("esri.rest.support.NetworkAttribute")], n5);
  247. var u2 = n5;
  248. // node_modules/@arcgis/core/rest/support/NetworkDataset.js
  249. var p2 = class extends l {
  250. constructor(t6) {
  251. super(t6), this.buildTime = null, this.name = null, this.networkAttributes = null, this.networkSources = null, this.state = null;
  252. }
  253. };
  254. e([d({ type: Number })], p2.prototype, "buildTime", void 0), e([d({ type: String })], p2.prototype, "name", void 0), e([d({ type: [u2] })], p2.prototype, "networkAttributes", void 0), e([d()], p2.prototype, "networkSources", void 0), e([d({ type: String })], p2.prototype, "state", void 0), p2 = e([n("esri.rest.support.NetworkDataset")], p2);
  255. var i5 = p2;
  256. // node_modules/@arcgis/core/rest/support/NetworkServiceDescription.js
  257. var d3 = class extends l {
  258. constructor(t6) {
  259. super(t6), this.accumulateAttributeNames = null, this.currentVersion = null, this.defaultTravelMode = null, this.directionsLanguage = null, this.directionsLengthUnits = null, this.directionsSupportedLanguages = null, this.directionsTimeAttribute = null, this.hasZ = null, this.impedance = null, this.networkDataset = null, this.supportedTravelModes = null;
  260. }
  261. readAccumulateAttributes(t6) {
  262. return t(t6) ? null : t6.map((t7) => T.fromJSON(t7));
  263. }
  264. writeAccumulateAttributes(t6, r6, o5) {
  265. !t(t6) && t6.length && (r6[o5] = t6.map((t7) => T.toJSON(t7)));
  266. }
  267. };
  268. e([d()], d3.prototype, "accumulateAttributeNames", void 0), e([o2("accumulateAttributeNames")], d3.prototype, "readAccumulateAttributes", null), e([r3("accumulateAttributeNames")], d3.prototype, "writeAccumulateAttributes", null), e([d()], d3.prototype, "currentVersion", void 0), e([d()], d3.prototype, "defaultTravelMode", void 0), e([d()], d3.prototype, "directionsLanguage", void 0), e([r4(r5)], d3.prototype, "directionsLengthUnits", void 0), e([d()], d3.prototype, "directionsSupportedLanguages", void 0), e([r4(y2, { ignoreUnknown: false })], d3.prototype, "directionsTimeAttribute", void 0), e([d()], d3.prototype, "hasZ", void 0), e([r4(T, { ignoreUnknown: false })], d3.prototype, "impedance", void 0), e([d({ type: i5 })], d3.prototype, "networkDataset", void 0), e([d({ type: [h] })], d3.prototype, "supportedTravelModes", void 0), d3 = e([n("esri.rest.support.NetworkServiceDescription")], d3);
  269. var y3 = d3;
  270. // node_modules/@arcgis/core/rest/networkService.js
  271. function i6(e5, r6, t6, o5) {
  272. o5[t6] = [r6.length, r6.length + e5.length], e5.forEach((e6) => {
  273. r6.push(e6.geometry);
  274. });
  275. }
  276. function d4(e5, r6) {
  277. for (let t6 = 0; t6 < r6.length; t6++) {
  278. const o5 = e5[r6[t6]];
  279. if (o5 && o5.length)
  280. for (const e6 of o5)
  281. e6.z = void 0;
  282. }
  283. console.log("The remote Network Analysis service is powered by a network dataset which is not Z-aware.\nZ-coordinates of the input geometry are ignored.");
  284. }
  285. function u3(e5, r6) {
  286. for (let o5 = 0; o5 < r6.length; o5++) {
  287. const s6 = e5[r6[o5]];
  288. if (s6 && s6.length) {
  289. for (const e6 of s6)
  290. if (r(e6) && e6.hasZ)
  291. return true;
  292. }
  293. }
  294. return false;
  295. }
  296. async function f2(t6, o5, s6) {
  297. if (!t6)
  298. throw new s2("network-service:missing-url", "Url to Network service is missing");
  299. const l7 = e3({ f: "json", token: o5 }, s6), { data: i8 } = await U(t6, l7);
  300. i8.supportedTravelModes || (i8.supportedTravelModes = []);
  301. for (let e5 = 0; e5 < i8.supportedTravelModes.length; e5++)
  302. i8.supportedTravelModes[e5].id || (i8.supportedTravelModes[e5].id = i8.supportedTravelModes[e5].itemId);
  303. const d5 = i8.currentVersion >= 10.4 ? c4(t6, o5, s6) : p3(t6, s6), { defaultTravelMode: u7, supportedTravelModes: f3 } = await d5;
  304. return i8.defaultTravelMode = u7, i8.supportedTravelModes = f3, y3.fromJSON(i8);
  305. }
  306. async function p3(r6, t6) {
  307. const n8 = e3({ f: "json" }, t6), { data: i8 } = await U(r6.replace(/\/rest\/.*$/i, "/info"), n8);
  308. if (!i8 || !i8.owningSystemUrl)
  309. return { supportedTravelModes: [], defaultTravelMode: null };
  310. const { owningSystemUrl: d5 } = i8, u7 = Ct(d5) + "/sharing/rest/portals/self", { data: f3 } = await U(u7, n8), p9 = t2("helperServices.routingUtilities.url", f3);
  311. if (!p9)
  312. return { supportedTravelModes: [], defaultTravelMode: null };
  313. const c12 = n2(d5), v3 = /\/solve$/i.test(c12.path) ? "Route" : /\/solveclosestfacility$/i.test(c12.path) ? "ClosestFacility" : "ServiceAreas", m5 = e3({ f: "json", serviceName: v3 }, t6), T2 = Ct(p9) + "/GetTravelModes/execute", M2 = await U(T2, m5), h5 = [];
  314. let w2 = null;
  315. if (M2?.data?.results?.length) {
  316. const e5 = M2.data.results;
  317. for (const r7 of e5)
  318. if (r7.paramName === "supportedTravelModes") {
  319. if (r7.value?.features) {
  320. for (const { attributes: e6 } of r7.value.features)
  321. if (e6) {
  322. const r8 = JSON.parse(e6.TravelMode);
  323. h5.push(r8);
  324. }
  325. }
  326. } else
  327. r7.paramName === "defaultTravelMode" && (w2 = r7.value);
  328. }
  329. return { supportedTravelModes: h5, defaultTravelMode: w2 };
  330. }
  331. async function c4(t6, o5, l7) {
  332. try {
  333. const r6 = e3({ f: "json", token: o5 }, l7), n8 = Ct(t6) + "/retrieveTravelModes", { data: { supportedTravelModes: i8, defaultTravelMode: d5 } } = await U(n8, r6);
  334. return { supportedTravelModes: i8, defaultTravelMode: d5 };
  335. } catch (n8) {
  336. throw new s2("network-service:retrieveTravelModes", "Could not get to the NAServer's retrieveTravelModes.", { error: n8 });
  337. }
  338. }
  339. // node_modules/@arcgis/core/rest/support/GPMessage.js
  340. var p4 = new s3({ esriJobMessageTypeInformative: "informative", esriJobMessageTypeProcessDefinition: "process-definition", esriJobMessageTypeProcessStart: "process-start", esriJobMessageTypeProcessStop: "process-stop", esriJobMessageTypeWarning: "warning", esriJobMessageTypeError: "error", esriJobMessageTypeEmpty: "empty", esriJobMessageTypeAbort: "abort" });
  341. var i7 = class extends l {
  342. constructor(e5) {
  343. super(e5), this.description = null, this.type = null;
  344. }
  345. };
  346. e([d({ type: String, json: { write: true } })], i7.prototype, "description", void 0), e([d({ type: String, json: { read: p4.read, write: p4.write } })], i7.prototype, "type", void 0), i7 = e([n("esri.rest.support.GPMessage")], i7);
  347. var a4 = i7;
  348. // node_modules/@arcgis/core/rest/support/NAMessage.js
  349. var p5 = new s3({ 0: "informative", 1: "process-definition", 2: "process-start", 3: "process-stop", 50: "warning", 100: "error", 101: "empty", 200: "abort" });
  350. var c5 = class extends a4 {
  351. constructor(r6) {
  352. super(r6), this.type = null;
  353. }
  354. };
  355. e([d({ type: String, json: { read: p5.read, write: p5.write } })], c5.prototype, "type", void 0), c5 = e([n("esri.rest.support.NAMessage")], c5);
  356. var a5 = c5;
  357. // node_modules/@arcgis/core/rest/support/DirectionsFeature.js
  358. var e4 = class extends g3 {
  359. };
  360. e([d()], e4.prototype, "events", void 0), e([d()], e4.prototype, "strings", void 0), e4 = e([n("esri.rest.support.DirectionsFeature")], e4);
  361. var p6 = e4;
  362. // node_modules/@arcgis/core/rest/support/DirectionsFeatureSet.js
  363. var u4 = class extends x {
  364. constructor(e5) {
  365. super(e5), this.extent = null, this.features = null, this.geometryType = "polyline", this.routeId = null, this.routeName = null, this.totalDriveTime = null, this.totalLength = null, this.totalTime = null;
  366. }
  367. readFeatures(e5, t6) {
  368. if (!e5)
  369. return [];
  370. const r6 = t6.summary.envelope.spatialReference ?? t6.spatialReference, s6 = r6 && k.fromJSON(r6);
  371. return e5.map((e6) => {
  372. const t7 = this._decompressGeometry(e6.compressedGeometry), r7 = new m2({ ...t7, spatialReference: s6 }), o5 = e6.events?.map((e7) => {
  373. const { arriveTimeUTC: t8, ETA: r8, point: { x: o6, y: n8, z: p9 }, strings: i8 } = e7;
  374. return new p6({ geometry: new j({ x: o6, y: n8, z: p9, hasZ: p9 !== void 0, spatialReference: s6 }), attributes: { ETA: r8, arriveTimeUTC: t8 }, strings: i8 });
  375. }) ?? [];
  376. return new p6({ attributes: e6.attributes, events: o5, geometry: r7, strings: e6.strings });
  377. });
  378. }
  379. get mergedGeometry() {
  380. if (!this.features)
  381. return null;
  382. const e5 = this.features.map(({ geometry: e6 }) => e2(e6)), r6 = this.get("extent.spatialReference");
  383. return this._mergePolylinesToSinglePath(e5, r6);
  384. }
  385. get strings() {
  386. return this.features.map(({ strings: e5 }) => e5);
  387. }
  388. _decompressGeometry(e5) {
  389. let t6 = 0, r6 = 0, s6 = 0, o5 = 0;
  390. const a6 = [];
  391. let n8, p9, i8, m5, l7, u7, c12, y4, h5 = 0, f3 = 0, d5 = 0;
  392. if (l7 = e5.match(/((\+|\-)[^\+\-\|]+|\|)/g), l7 || (l7 = []), parseInt(l7[h5], 32) === 0) {
  393. h5 = 2;
  394. const e6 = parseInt(l7[h5], 32);
  395. h5++, u7 = parseInt(l7[h5], 32), h5++, 1 & e6 && (f3 = l7.indexOf("|") + 1, c12 = parseInt(l7[f3], 32), f3++), 2 & e6 && (d5 = l7.indexOf("|", f3) + 1, y4 = parseInt(l7[d5], 32), d5++);
  396. } else
  397. u7 = parseInt(l7[h5], 32), h5++;
  398. for (; h5 < l7.length && l7[h5] !== "|"; ) {
  399. n8 = parseInt(l7[h5], 32) + t6, h5++, t6 = n8, p9 = parseInt(l7[h5], 32) + r6, h5++, r6 = p9;
  400. const e6 = [n8 / u7, p9 / u7];
  401. f3 && (m5 = parseInt(l7[f3], 32) + s6, f3++, s6 = m5, e6.push(m5 / c12)), d5 && (i8 = parseInt(l7[d5], 32) + o5, d5++, o5 = i8, e6.push(i8 / y4)), a6.push(e6);
  402. }
  403. return { paths: [a6], hasZ: f3 > 0, hasM: d5 > 0 };
  404. }
  405. _mergePolylinesToSinglePath(e5, t6) {
  406. if (e5.length === 0)
  407. return new m2({ spatialReference: t6 });
  408. const r6 = [];
  409. for (const n8 of e5)
  410. for (const e6 of n8.paths)
  411. r6.push(...e6);
  412. const s6 = [];
  413. r6.forEach((e6, t7) => {
  414. t7 !== 0 && e6[0] === r6[t7 - 1][0] && e6[1] === r6[t7 - 1][1] || s6.push(e6);
  415. });
  416. const { hasM: o5, hasZ: a6 } = e5[0];
  417. return new m2({ hasM: o5, hasZ: a6, paths: [s6], spatialReference: t6 });
  418. }
  419. };
  420. e([d({ type: M, json: { read: { source: "summary.envelope" } } })], u4.prototype, "extent", void 0), e([d()], u4.prototype, "features", void 0), e([o2("features")], u4.prototype, "readFeatures", null), e([d()], u4.prototype, "geometryType", void 0), e([d({ readOnly: true })], u4.prototype, "mergedGeometry", null), e([d()], u4.prototype, "routeId", void 0), e([d()], u4.prototype, "routeName", void 0), e([d({ value: null, readOnly: true })], u4.prototype, "strings", null), e([d({ json: { read: { source: "summary.totalDriveTime" } } })], u4.prototype, "totalDriveTime", void 0), e([d({ json: { read: { source: "summary.totalLength" } } })], u4.prototype, "totalLength", void 0), e([d({ json: { read: { source: "summary.totalTime" } } })], u4.prototype, "totalTime", void 0), u4 = e([n("esri.rest.support.DirectionsFeatureSet")], u4);
  421. var c6 = u4;
  422. // node_modules/@arcgis/core/rest/support/RouteResult.js
  423. var n6 = class extends l {
  424. constructor(t6) {
  425. super(t6), this.directionLines = null, this.directionPoints = null, this.directions = null, this.route = null, this.routeName = null, this.stops = null, this.traversedEdges = null, this.traversedJunctions = null, this.traversedTurns = null;
  426. }
  427. };
  428. e([d({ type: x, json: { write: true } })], n6.prototype, "directionLines", void 0), e([d({ type: x, json: { write: true } })], n6.prototype, "directionPoints", void 0), e([d({ type: c6, json: { write: true } })], n6.prototype, "directions", void 0), e([d({ type: g3, json: { write: true } })], n6.prototype, "route", void 0), e([d({ type: String, json: { write: true } })], n6.prototype, "routeName", void 0), e([d({ type: [g3], json: { write: true } })], n6.prototype, "stops", void 0), e([d({ type: x, json: { write: true } })], n6.prototype, "traversedEdges", void 0), e([d({ type: x, json: { write: true } })], n6.prototype, "traversedJunctions", void 0), e([d({ type: x, json: { write: true } })], n6.prototype, "traversedTurns", void 0), n6 = e([n("esri.rest.support.RouteResult")], n6);
  429. var u5 = n6;
  430. // node_modules/@arcgis/core/rest/support/RouteSolveResult.js
  431. function u6(r6) {
  432. return r6 && x.fromJSON(r6).features.map((r7) => r7);
  433. }
  434. var n7 = class extends l {
  435. constructor(r6) {
  436. super(r6), this.messages = null, this.pointBarriers = null, this.polylineBarriers = null, this.polygonBarriers = null, this.routeResults = null;
  437. }
  438. readPointBarriers(r6, o5) {
  439. return u6(o5.barriers);
  440. }
  441. readPolylineBarriers(r6) {
  442. return u6(r6);
  443. }
  444. readPolygonBarriers(r6) {
  445. return u6(r6);
  446. }
  447. };
  448. e([d({ type: [a5] })], n7.prototype, "messages", void 0), e([d({ type: [g3] })], n7.prototype, "pointBarriers", void 0), e([o2("pointBarriers", ["barriers"])], n7.prototype, "readPointBarriers", null), e([d({ type: [g3] })], n7.prototype, "polylineBarriers", void 0), e([o2("polylineBarriers")], n7.prototype, "readPolylineBarriers", null), e([d({ type: [g3] })], n7.prototype, "polygonBarriers", void 0), e([o2("polygonBarriers")], n7.prototype, "readPolygonBarriers", null), e([d({ type: [u5] })], n7.prototype, "routeResults", void 0), n7 = e([n("esri.rest.support.RouteSolveResult")], n7);
  449. var c7 = n7;
  450. // node_modules/@arcgis/core/rest/route.js
  451. function c8(e5) {
  452. return e5?.declaredClass === "esri.rest.support.FeatureSet";
  453. }
  454. async function l5(r6, t6, p9) {
  455. const l7 = [], y4 = [], d5 = {}, g4 = {}, h5 = n2(r6), { path: R3 } = h5;
  456. c8(t6.stops) && i6(t6.stops.features, y4, "stops.features", d5), c8(t6.pointBarriers) && i6(t6.pointBarriers.features, y4, "pointBarriers.features", d5), c8(t6.polylineBarriers) && i6(t6.polylineBarriers.features, y4, "polylineBarriers.features", d5), c8(t6.polygonBarriers) && i6(t6.polygonBarriers.features, y4, "polygonBarriers.features", d5);
  457. const v3 = await L(y4);
  458. for (const e5 in d5) {
  459. const r7 = d5[e5];
  460. l7.push(e5), g4[e5] = v3.slice(r7[0], r7[1]);
  461. }
  462. if (u3(g4, l7)) {
  463. let e5 = null;
  464. try {
  465. e5 = await f2(R3, t6.apiKey, p9);
  466. } catch {
  467. }
  468. e5 && !e5.hasZ && d4(g4, l7);
  469. }
  470. for (const e5 in g4)
  471. g4[e5].forEach((r7, s6) => {
  472. t6.get(e5)[s6].geometry = r7;
  473. });
  474. const B3 = { ...p9, query: { ...h5.query, ...u(t6), f: "json" } }, E = R3.endsWith("/solve") ? R3 : `${R3}/solve`, { data: T2 } = await U(E, B3);
  475. return m4(T2);
  476. }
  477. function m4(e5) {
  478. const { barriers: s6, directionLines: o5, directionPoints: a6, directions: i8, messages: n8, polygonBarriers: u7, polylineBarriers: f3, routes: c12, stops: l7, traversedEdges: m5, traversedJunctions: y4, traversedTurns: d5 } = e5, g4 = (e6) => {
  479. const r6 = R3.find((r7) => r7.routeName === e6);
  480. if (r(r6))
  481. return r6;
  482. const s7 = { routeId: R3.length + 1, routeName: e6 };
  483. return R3.push(s7), s7;
  484. }, h5 = (e6) => {
  485. const r6 = R3.find((r7) => r7.routeId === e6);
  486. if (r(r6))
  487. return r6;
  488. const s7 = { routeId: e6, routeName: null };
  489. return R3.push(s7), s7;
  490. }, R3 = [];
  491. c12?.features.forEach((e6, r6) => {
  492. e6.geometry.spatialReference = c12.spatialReference;
  493. const t6 = e6.attributes.Name, s7 = r6 + 1;
  494. R3.push({ routeId: s7, routeName: t6, route: e6 });
  495. }), i8?.forEach((e6) => {
  496. const { routeName: r6 } = e6;
  497. g4(r6).directions = e6;
  498. });
  499. const v3 = (l7?.features.every((e6) => t(e6.attributes.RouteName)) ?? false) && R3.length > 0 ? R3[0].routeName : null;
  500. return l7?.features.forEach((e6) => {
  501. var r6;
  502. e6.geometry && ((r6 = e6.geometry).spatialReference ?? (r6.spatialReference = l7.spatialReference));
  503. const t6 = v3 ?? e6.attributes.RouteName, s7 = g4(t6);
  504. s7.stops ?? (s7.stops = []), s7.stops.push(e6);
  505. }), o5?.features.forEach((e6) => {
  506. const r6 = e6.attributes.RouteID, t6 = h5(r6), { geometryType: s7, spatialReference: a7 } = o5;
  507. t6.directionLines ?? (t6.directionLines = { features: [], geometryType: s7, spatialReference: a7 }), t6.directionLines.features.push(e6);
  508. }), a6?.features.forEach((e6) => {
  509. const r6 = e6.attributes.RouteID, t6 = h5(r6), { geometryType: s7, spatialReference: o6 } = a6;
  510. t6.directionPoints ?? (t6.directionPoints = { features: [], geometryType: s7, spatialReference: o6 }), t6.directionPoints.features.push(e6);
  511. }), m5?.features.forEach((e6) => {
  512. const r6 = e6.attributes.RouteID, t6 = h5(r6), { geometryType: s7, spatialReference: o6 } = m5;
  513. t6.traversedEdges ?? (t6.traversedEdges = { features: [], geometryType: s7, spatialReference: o6 }), t6.traversedEdges.features.push(e6);
  514. }), y4?.features.forEach((e6) => {
  515. const r6 = e6.attributes.RouteID, t6 = h5(r6), { geometryType: s7, spatialReference: o6 } = y4;
  516. t6.traversedJunctions ?? (t6.traversedJunctions = { features: [], geometryType: s7, spatialReference: o6 }), t6.traversedJunctions.features.push(e6);
  517. }), d5?.features.forEach((e6) => {
  518. const r6 = e6.attributes.RouteID, t6 = h5(r6);
  519. t6.traversedTurns ?? (t6.traversedTurns = { features: [] }), t6.traversedTurns.features.push(e6);
  520. }), c7.fromJSON({ routeResults: R3, barriers: s6, polygonBarriers: u7, polylineBarriers: f3, messages: n8 });
  521. }
  522. // node_modules/@arcgis/core/rest/support/commonProperties.js
  523. var t5 = { type: String, json: { read: { source: "token" }, write: { target: "token" } } };
  524. // node_modules/@arcgis/core/rest/support/DataLayer.js
  525. var l6 = class extends l2(l) {
  526. constructor(o5) {
  527. super(o5), this.doNotLocateOnRestrictedElements = null, this.geometry = null, this.geometryType = null, this.name = null, this.spatialRelationship = null, this.type = "layer", this.where = null;
  528. }
  529. };
  530. e([d({ type: Boolean, json: { write: true } })], l6.prototype, "doNotLocateOnRestrictedElements", void 0), e([d({ types: i2, json: { read: d2, write: true } })], l6.prototype, "geometry", void 0), e([r4(w)], l6.prototype, "geometryType", void 0), e([d({ type: String, json: { name: "layerName", write: true } })], l6.prototype, "name", void 0), e([r4(R, { name: "spatialRel" })], l6.prototype, "spatialRelationship", void 0), e([d({ type: String, json: { write: true } })], l6.prototype, "type", void 0), e([d({ type: String, json: { write: true } })], l6.prototype, "where", void 0), l6 = e([n("esri.rest.support.DataLayer")], l6);
  531. var c9 = l6;
  532. // node_modules/@arcgis/core/rest/support/NetworkFeatureSet.js
  533. var s5;
  534. var c10 = s5 = class extends x {
  535. constructor(e5) {
  536. super(e5), this.doNotLocateOnRestrictedElements = null;
  537. }
  538. clone() {
  539. return new s5({ doNotLocateOnRestrictedElements: this.doNotLocateOnRestrictedElements, ...this.cloneProperties() });
  540. }
  541. };
  542. e([d({ type: Boolean, json: { write: true } })], c10.prototype, "doNotLocateOnRestrictedElements", void 0), c10 = s5 = e([n("esri.rest.support.NetworkFeatureSet")], c10);
  543. var p7 = c10;
  544. // node_modules/@arcgis/core/rest/support/NetworkUrl.js
  545. var p8 = class extends l2(l) {
  546. constructor(o5) {
  547. super(o5), this.doNotLocateOnRestrictedElements = null, this.url = null;
  548. }
  549. };
  550. e([d({ type: Boolean, json: { write: true } })], p8.prototype, "doNotLocateOnRestrictedElements", void 0), e([d({ type: String, json: { write: true } })], p8.prototype, "url", void 0), p8 = e([n("esri.rest.support.NetworkUrl")], p8);
  551. var c11 = p8;
  552. // node_modules/@arcgis/core/rest/support/RouteParameters.js
  553. var O3;
  554. function U3(t6) {
  555. return t6 && "type" in t6;
  556. }
  557. function J(t6) {
  558. return t6 && "features" in t6 && "doNotLocateOnRestrictedElements" in t6;
  559. }
  560. function L2(t6) {
  561. return t6 && "url" in t6;
  562. }
  563. function R2(t6) {
  564. return t6 && "features" in t6;
  565. }
  566. function C(t6) {
  567. return U3(t6) ? c9.fromJSON(t6) : L2(t6) ? c11.fromJSON(t6) : J(t6) ? p7.fromJSON(t6) : R2(t6) ? x.fromJSON(t6) : null;
  568. }
  569. function D2(t6, e5, o5) {
  570. r(t6) && (e5[o5] = j2.isCollection(t6) ? { features: t6.toArray().map((t7) => t7.toJSON()) } : t6.toJSON());
  571. }
  572. var k3 = O3 = class extends l2(l) {
  573. constructor(t6) {
  574. super(t6), this.accumulateAttributes = null, this.apiKey = null, this.attributeParameterValues = null, this.directionsLanguage = null, this.directionsLengthUnits = null, this.directionsOutputType = null, this.directionsStyleName = null, this.directionsTimeAttribute = null, this.findBestSequence = null, this.geometryPrecision = null, this.geometryPrecisionM = null, this.geometryPrecisionZ = null, this.ignoreInvalidLocations = null, this.impedanceAttribute = null, this.outputGeometryPrecision = null, this.outputGeometryPrecisionUnits = null, this.outputLines = "true-shape", this.outSpatialReference = null, this.overrides = null, this.pointBarriers = null, this.polygonBarriers = null, this.polylineBarriers = null, this.preserveFirstStop = null, this.preserveLastStop = null, this.preserveObjectID = null, this.restrictionAttributes = null, this.restrictUTurns = null, this.returnBarriers = false, this.returnDirections = false, this.returnPolygonBarriers = false, this.returnPolylineBarriers = false, this.returnRoutes = true, this.returnStops = false, this.returnTraversedEdges = null, this.returnTraversedJunctions = null, this.returnTraversedTurns = null, this.returnZ = true, this.startTime = null, this.startTimeIsUTC = true, this.stops = null, this.timeWindowsAreUTC = null, this.travelMode = null, this.useHierarchy = null, this.useTimeWindows = null;
  575. }
  576. static from(t6) {
  577. return v(O3, t6);
  578. }
  579. readAccumulateAttributes(t6) {
  580. return t(t6) ? null : t6.map((t7) => T.fromJSON(t7));
  581. }
  582. writeAccumulateAttributes(t6, e5, r6) {
  583. !t(t6) && t6.length && (e5[r6] = t6.map((t7) => T.toJSON(t7)));
  584. }
  585. writePointBarriers(t6, e5, r6) {
  586. D2(t6, e5, r6);
  587. }
  588. writePolygonBarrier(t6, e5, r6) {
  589. D2(t6, e5, r6);
  590. }
  591. writePolylineBarrier(t6, e5, r6) {
  592. D2(t6, e5, r6);
  593. }
  594. readRestrictionAttributes(t6) {
  595. return t(t6) ? null : t6.map((t7) => U2.fromJSON(t7));
  596. }
  597. writeRestrictionAttributes(t6, e5, r6) {
  598. !t(t6) && t6.length && (e5[r6] = t6.map((t7) => U2.toJSON(t7)));
  599. }
  600. readStartTime(t6, e5) {
  601. const { startTime: r6 } = e5;
  602. return t(r6) ? null : r6 === "now" ? "now" : new Date(r6);
  603. }
  604. writeStartTime(t6, e5) {
  605. t(t6) || (e5.startTime = t6 === "now" ? "now" : t6.getTime());
  606. }
  607. readStops(t6, e5) {
  608. return C(e5.stops);
  609. }
  610. writeStops(t6, e5, r6) {
  611. D2(t6, e5, r6);
  612. }
  613. };
  614. e([d({ type: [String], json: { name: "accumulateAttributeNames", write: true } })], k3.prototype, "accumulateAttributes", void 0), e([o2("accumulateAttributes")], k3.prototype, "readAccumulateAttributes", null), e([r3("accumulateAttributes")], k3.prototype, "writeAccumulateAttributes", null), e([d(t5)], k3.prototype, "apiKey", void 0), e([d({ json: { write: true } })], k3.prototype, "attributeParameterValues", void 0), e([d({ type: String, json: { write: true } })], k3.prototype, "directionsLanguage", void 0), e([r4(r5)], k3.prototype, "directionsLengthUnits", void 0), e([r4(s4)], k3.prototype, "directionsOutputType", void 0), e([r4(k2)], k3.prototype, "directionsStyleName", void 0), e([r4(y2, { name: "directionsTimeAttributeName", ignoreUnknown: false })], k3.prototype, "directionsTimeAttribute", void 0), e([d({ type: Boolean, json: { write: true } })], k3.prototype, "findBestSequence", void 0), e([d({ type: Number, json: { write: true } })], k3.prototype, "geometryPrecision", void 0), e([d({ type: Number, json: { write: true } })], k3.prototype, "geometryPrecisionM", void 0), e([d({ type: Number, json: { write: true } })], k3.prototype, "geometryPrecisionZ", void 0), e([d({ type: Boolean, json: { write: true } })], k3.prototype, "ignoreInvalidLocations", void 0), e([r4(T, { name: "impedanceAttributeName", ignoreUnknown: false })], k3.prototype, "impedanceAttribute", void 0), e([d({ type: Number, json: { write: true } })], k3.prototype, "outputGeometryPrecision", void 0), e([r4(i4)], k3.prototype, "outputGeometryPrecisionUnits", void 0), e([r4(o4)], k3.prototype, "outputLines", void 0), e([d({ type: k, json: { name: "outSR", write: true } })], k3.prototype, "outSpatialReference", void 0), e([d({ json: { write: true } })], k3.prototype, "overrides", void 0), e([d({ json: { name: "barriers", write: true } })], k3.prototype, "pointBarriers", void 0), e([r3("pointBarriers")], k3.prototype, "writePointBarriers", null), e([d({ json: { write: true } })], k3.prototype, "polygonBarriers", void 0), e([r3("polygonBarriers")], k3.prototype, "writePolygonBarrier", null), e([d({ json: { write: true } })], k3.prototype, "polylineBarriers", void 0), e([r3("polylineBarriers")], k3.prototype, "writePolylineBarrier", null), e([d({ type: Boolean, json: { write: true } })], k3.prototype, "preserveFirstStop", void 0), e([d({ type: Boolean, json: { write: true } })], k3.prototype, "preserveLastStop", void 0), e([d({ type: Boolean, json: { write: true } })], k3.prototype, "preserveObjectID", void 0), e([d({ type: [String], json: { name: "restrictionAttributeNames", write: true } })], k3.prototype, "restrictionAttributes", void 0), e([o2("restrictionAttributes")], k3.prototype, "readRestrictionAttributes", null), e([r3("restrictionAttributes")], k3.prototype, "writeRestrictionAttributes", null), e([r4(n3)], k3.prototype, "restrictUTurns", void 0), e([d({ type: Boolean, json: { write: true } })], k3.prototype, "returnBarriers", void 0), e([d({ type: Boolean, json: { write: true } })], k3.prototype, "returnDirections", void 0), e([d({ type: Boolean, json: { write: true } })], k3.prototype, "returnPolygonBarriers", void 0), e([d({ type: Boolean, json: { write: true } })], k3.prototype, "returnPolylineBarriers", void 0), e([d({ type: Boolean, json: { write: true } })], k3.prototype, "returnRoutes", void 0), e([d({ type: Boolean, json: { write: true } })], k3.prototype, "returnStops", void 0), e([d({ type: Boolean, json: { write: true } })], k3.prototype, "returnTraversedEdges", void 0), e([d({ type: Boolean, json: { write: true } })], k3.prototype, "returnTraversedJunctions", void 0), e([d({ type: Boolean, json: { write: true } })], k3.prototype, "returnTraversedTurns", void 0), e([d({ type: Boolean, json: { write: true } })], k3.prototype, "returnZ", void 0), e([d({ type: Date, json: { type: Number, write: true } })], k3.prototype, "startTime", void 0), e([o2("startTime")], k3.prototype, "readStartTime", null), e([r3("startTime")], k3.prototype, "writeStartTime", null), e([d({ type: Boolean, json: { write: true } })], k3.prototype, "startTimeIsUTC", void 0), e([d({ json: { write: true } })], k3.prototype, "stops", void 0), e([o2("stops")], k3.prototype, "readStops", null), e([r3("stops")], k3.prototype, "writeStops", null), e([d({ type: Boolean, json: { write: true } })], k3.prototype, "timeWindowsAreUTC", void 0), e([d({ type: h, json: { write: true } })], k3.prototype, "travelMode", void 0), e([d({ type: Boolean, json: { write: true } })], k3.prototype, "useHierarchy", void 0), e([d({ type: Boolean, json: { write: true } })], k3.prototype, "useTimeWindows", void 0), k3 = O3 = e([n("esri.rest.support.RouteParameters")], k3);
  615. var I = k3;
  616. // node_modules/@arcgis/core/layers/RouteLayer.js
  617. function X(e5) {
  618. return e5.length ? e5 : null;
  619. }
  620. function ee(e5) {
  621. const { defaultTravelMode: t6, supportedTravelModes: r6 } = e5;
  622. return r6.find((e6) => e6.id === t6);
  623. }
  624. function te(e5) {
  625. switch (e5) {
  626. case "esriGeometryPoint":
  627. return { type: "esriSMS", style: "esriSMSCircle", size: 12, color: [0, 0, 0, 0], outline: te("esriGeometryPolyline") };
  628. case "esriGeometryPolyline":
  629. return { type: "esriSLS", style: "esriSLSSolid", width: 1, color: [0, 0, 0, 0] };
  630. case "esriGeometryPolygon":
  631. return { type: "esriSFS", style: "esriSFSNull", outline: te("esriGeometryPolyline") };
  632. }
  633. }
  634. function re(e5) {
  635. return "layers" in e5;
  636. }
  637. function oe(e5) {
  638. return e5.declaredClass === "esri.rest.support.FeatureSet";
  639. }
  640. function ie(e5) {
  641. return e5.declaredClass === "esri.rest.support.NetworkFeatureSet";
  642. }
  643. function se(e5, t6, r6) {
  644. const o5 = t6.networkDataset.networkAttributes.filter((e6) => e6.usageType === "cost"), i8 = ee(t6), s6 = r6.travelMode ?? i8;
  645. if (t(s6))
  646. return void he.warn("route-layer:missing-travel-mode", "The routing service must have a default travel mode or one must be specified in the route parameter.");
  647. const { timeAttributeName: a6, distanceAttributeName: l7 } = s6, m5 = o5.find((e6) => e6.name === a6), y4 = o5.find((e6) => e6.name === l7), f3 = e2(r6.travelMode)?.impedanceAttributeName ?? e2(r6.impedanceAttribute) ?? t6.impedance, d5 = t4.fromJSON(m5?.units), h5 = r5.fromJSON(y4?.units);
  648. if (!d5 || !h5)
  649. throw new s2("routelayer:unknown-impedance-units", "the units of either the distance or time impedance are unknown");
  650. const w2 = r6.directionsLanguage ?? t6.directionsLanguage, S3 = e2(r6.accumulateAttributes) ?? t6.accumulateAttributeNames ?? [], g4 = new Set(o5.filter(({ name: e6 }) => e6 === a6 || e6 === l7 || e6 === f3 || S3.includes(e6)).map(({ name: e6 }) => e6)), b5 = (e6) => {
  651. for (const t7 in e6)
  652. g4.has(t7) || delete e6[t7];
  653. };
  654. for (const n8 of e5.pointBarriers)
  655. r(n8.costs) && (n8.addedCost = n8.costs[f3] ?? 0, b5(n8.costs));
  656. for (const n8 of e5.polygonBarriers)
  657. r(n8.costs) && (n8.scaleFactor = n8.costs[f3] ?? 1, b5(n8.costs));
  658. for (const n8 of e5.polylineBarriers)
  659. r(n8.costs) && (n8.scaleFactor = n8.costs[f3] ?? 1, b5(n8.costs));
  660. const { routeInfo: v3 } = e5, { findBestSequence: B3, preserveFirstStop: P, preserveLastStop: j5, startTimeIsUTC: I2, timeWindowsAreUTC: _ } = r6;
  661. v3.analysisSettings = new l3({ accumulateAttributes: S3, directionsLanguage: w2, findBestSequence: B3, preserveFirstStop: P, preserveLastStop: j5, startTimeIsUTC: I2, timeWindowsAreUTC: _, travelMode: s6 }), v3.totalDuration = ae(v3.totalCosts[a6] ?? 0, d5), v3.totalDistance = le(v3.totalCosts[l7] ?? 0, h5), v3.totalLateDuration = ae(v3.totalViolations[a6] ?? 0, d5), v3.totalWaitDuration = ae(v3.totalWait[a6] ?? 0, d5), r(v3.totalCosts) && b5(v3.totalCosts), r(v3.totalViolations) && b5(v3.totalViolations), r(v3.totalWait) && b5(v3.totalWait);
  662. for (const n8 of e5.stops)
  663. r(n8.serviceCosts) && (n8.serviceDuration = ae(n8.serviceCosts[a6] ?? 0, d5), n8.serviceDistance = le(n8.serviceCosts[l7] ?? 0, h5), b5(n8.serviceCosts)), r(n8.cumulativeCosts) && (n8.cumulativeDuration = ae(n8.cumulativeCosts[a6] ?? 0, d5), n8.cumulativeDistance = le(n8.cumulativeCosts[l7] ?? 0, h5), b5(n8.cumulativeCosts)), r(n8.violations) && (n8.lateDuration = ae(n8.violations[a6] ?? 0, d5), b5(n8.violations)), r(n8.wait) && (n8.waitDuration = ae(n8.wait[a6] ?? 0, d5), b5(n8.wait));
  664. }
  665. async function ne(e5) {
  666. const t6 = k.WGS84;
  667. return await fn(e5.spatialReference, t6), rn(e5, t6);
  668. }
  669. function ae(e5, t6) {
  670. switch (t6) {
  671. case "seconds":
  672. return e5 / 60;
  673. case "hours":
  674. return 60 * e5;
  675. case "days":
  676. return 60 * e5 * 24;
  677. default:
  678. return e5;
  679. }
  680. }
  681. function le(e5, t6) {
  682. return t6 === "decimal-degrees" || t6 === "points" || t6 === "unknown" ? e5 : N(e5, t6, "meters");
  683. }
  684. function pe(e5) {
  685. const { attributes: t6, geometry: r6, popupTemplate: o5, symbol: i8 } = e5.toGraphic().toJSON();
  686. return { attributes: t6, geometry: r6, popupInfo: o5, symbol: i8 };
  687. }
  688. var ue = j2.ofType(b4);
  689. var me = j2.ofType(h2);
  690. var ce = j2.ofType(O2);
  691. var ye = j2.ofType(g2);
  692. var fe = j2.ofType(h3);
  693. var de = j2.ofType(D);
  694. var he = s.getLogger("esri.layers.RouteLayer");
  695. var we = class extends a3(t3(c2(v2(O(a2(b2)))))) {
  696. constructor(e5) {
  697. super(e5), this._cachedServiceDescription = null, this._featureCollection = null, this._type = "Feature Collection", this.defaultSymbols = new n4(), this.directionLines = null, this.directionPoints = null, this.featureCollectionType = "route", this.legendEnabled = false, this.maxScale = 0, this.minScale = 0, this.pointBarriers = new ce(), this.polygonBarriers = new ye(), this.polylineBarriers = new fe(), this.routeInfo = null, this.spatialReference = k.WGS84, this.stops = new de(), this.type = "route";
  698. const t6 = () => {
  699. this._setStopSymbol(this.stops);
  700. };
  701. this.own([a(() => this.stops, "change", t6, { sync: true, onListenerAdd: t6 })]);
  702. }
  703. writeFeatureCollectionWebmap(e5, t6, r6, o5) {
  704. const i8 = [this._writePolygonBarriers(), this._writePolylineBarriers(), this._writePointBarriers(), this._writeRouteInfo(), this._writeDirectionLines(), this._writeDirectionPoints(), this._writeStops()].filter((e6) => !!e6), s6 = i8.map((e6, t7) => t7), n8 = o5.origin === "web-map" ? "featureCollection.layers" : "layers";
  705. o(n8, i8, t6), t6.opacity = this.opacity, t6.visibility = this.visible, t6.visibleLayers = s6;
  706. }
  707. readDirectionLines(e5, t6) {
  708. return this._getNetworkFeatures(t6, "DirectionLines", (e6) => b4.fromGraphic(e6));
  709. }
  710. readDirectionPoints(e5, t6) {
  711. return this._getNetworkFeatures(t6, "DirectionPoints", (e6) => h2.fromGraphic(e6));
  712. }
  713. get fullExtent() {
  714. const e5 = new M({ xmin: -180, ymin: -90, xmax: 180, ymax: 90, spatialReference: k.WGS84 });
  715. if (r(this.routeInfo) && r(this.routeInfo.geometry))
  716. return this.routeInfo.geometry.extent ?? e5;
  717. if (t(this.stops))
  718. return e5;
  719. const t6 = this.stops.filter((e6) => r(e6.geometry));
  720. if (t6.length < 2)
  721. return e5;
  722. const { spatialReference: r6 } = t6.getItemAt(0).geometry;
  723. if (t(r6))
  724. return e5;
  725. const o5 = t6.toArray().map((e6) => {
  726. const t7 = e6.geometry;
  727. return [t7.x, t7.y];
  728. });
  729. return new m({ points: o5, spatialReference: r6 }).extent;
  730. }
  731. readMaxScale(e5, t6) {
  732. return (re(t6) ? t6.layers : t6.featureCollection.layers).find((e6) => r(e6.layerDefinition.maxScale))?.layerDefinition.maxScale ?? 0;
  733. }
  734. readMinScale(e5, t6) {
  735. return (re(t6) ? t6.layers : t6.featureCollection.layers).find((e6) => r(e6.layerDefinition.minScale))?.layerDefinition.minScale ?? 0;
  736. }
  737. readPointBarriers(e5, t6) {
  738. return this._getNetworkFeatures(t6, "Barriers", (e6) => O2.fromGraphic(e6));
  739. }
  740. readPolygonBarriers(e5, t6) {
  741. return this._getNetworkFeatures(t6, "PolygonBarriers", (e6) => g2.fromGraphic(e6));
  742. }
  743. readPolylineBarriers(e5, t6) {
  744. return this._getNetworkFeatures(t6, "PolylineBarriers", (e6) => h3.fromGraphic(e6));
  745. }
  746. readRouteInfo(e5, t6) {
  747. const r6 = this._getNetworkFeatures(t6, "RouteInfo", (e6) => h4.fromGraphic(e6));
  748. return r6.length > 0 ? r6.getItemAt(0) : null;
  749. }
  750. readSpatialReference(e5, t6) {
  751. const r6 = re(t6) ? t6.layers : t6.featureCollection.layers;
  752. if (!r6.length)
  753. return k.WGS84;
  754. const { layerDefinition: o5 } = r6[0], i8 = o5.spatialReference ?? o5.extent.spatialReference ?? c;
  755. return k.fromJSON(i8);
  756. }
  757. readStops(e5, t6) {
  758. return this._getNetworkFeatures(t6, "Stops", (e6) => D.fromGraphic(e6), (e6) => this._setStopSymbol(e6));
  759. }
  760. get title() {
  761. return r(this.routeInfo) && r(this.routeInfo.name) ? this.routeInfo.name : "Route";
  762. }
  763. set title(e5) {
  764. e5 ? this._override("title", e5) : this._clearOverride("title");
  765. }
  766. get url() {
  767. return r2.routeServiceUrl;
  768. }
  769. set url(e5) {
  770. e5 != null ? this._set("url", S(e5, he)) : this._set("url", r2.routeServiceUrl);
  771. }
  772. load(e5) {
  773. return this.addResolvingPromise(this.loadFromPortal({ supportedTypes: ["Feature Collection"] }, e5)), Promise.resolve(this);
  774. }
  775. removeAll() {
  776. this.removeResult(), this.pointBarriers.removeAll(), this.polygonBarriers.removeAll(), this.polylineBarriers.removeAll(), this.stops.removeAll();
  777. }
  778. removeResult() {
  779. r(this.directionLines) && (this.directionLines.removeAll(), this._set("directionLines", null)), r(this.directionPoints) && (this.directionPoints.removeAll(), this._set("directionPoints", null)), r(this.routeInfo) && this._set("routeInfo", null);
  780. }
  781. async save() {
  782. await this.load();
  783. const { fullExtent: e5, portalItem: t6 } = this;
  784. if (!t6)
  785. throw new s2("routelayer:portal-item-not-set", "save() requires to the layer to have a portal item");
  786. if (!t6.id)
  787. throw new s2("routelayer:portal-item-not-saved", "Please use saveAs() first to save the routelayer");
  788. if (t6.type !== "Feature Collection")
  789. throw new s2("routelayer:portal-item-wrong-type", 'Portal item needs to have type "Feature Collection"');
  790. if (t(this.routeInfo))
  791. throw new s2("routelayer:route-unsolved", "save() requires a solved route");
  792. const { portal: r6 } = t6;
  793. await r6._signIn(), r6.user || await t6.reload();
  794. const { itemUrl: o5, itemControl: i8 } = t6;
  795. if (i8 !== "admin" && i8 !== "update")
  796. throw new s2("routelayer:insufficient-permissions", "To save this layer, you need to be the owner or an administrator of your organization");
  797. const s6 = { messages: [], origin: "portal-item", portal: r6, url: o5 && j3(o5), writtenProperties: [] }, a6 = this.write(null, s6);
  798. return t6.extent = await ne(e5), t6.title = this.title, await t6.update({ data: a6 }), t6;
  799. }
  800. async saveAs(e5, t6 = {}) {
  801. if (await this.load(), t(this.routeInfo))
  802. throw new s2("routelayer:route-unsolved", "saveAs() requires a solved route");
  803. const r6 = b.from(e5).clone();
  804. r6.extent ?? (r6.extent = await ne(this.fullExtent)), r6.id = null, r6.portal ?? (r6.portal = B.getDefault()), r6.title ?? (r6.title = this.title), r6.type = "Feature Collection", r6.typeKeywords = ["Data", "Feature Collection", f.MULTI_LAYER, "Route Layer"];
  805. const { portal: o5 } = r6, i8 = { messages: [], origin: "portal-item", portal: o5, url: null, writtenProperties: [] };
  806. await o5._signIn();
  807. const s6 = t6?.folder, a6 = this.write(null, i8);
  808. return await o5.user.addItem({ item: r6, folder: s6, data: a6 }), this.portalItem = r6, i3(i8), i8.portalItem = r6, r6;
  809. }
  810. async solve(e5, t6) {
  811. const r6 = e5?.stops ?? this.stops, o5 = e5?.pointBarriers ?? X(this.pointBarriers), i8 = e5?.polylineBarriers ?? X(this.polylineBarriers), a6 = e5?.polygonBarriers ?? X(this.polygonBarriers);
  812. if (t(r6))
  813. throw new s2("routelayer:undefined-stops", "the route layer must have stops defined in the route parameters.");
  814. if ((oe(r6) || ie(r6)) && r6.features.length < 2 || j2.isCollection(r6) && r6.length < 2)
  815. throw new s2("routelayer:insufficent-stops", "the route layer must have two or more stops to solve a route.");
  816. if (j2.isCollection(r6))
  817. for (const s6 of r6)
  818. s6.routeName = null;
  819. const l7 = e5?.apiKey, c12 = this.url, y4 = await this._getServiceDescription(c12, l7, t6), f3 = ee(y4), h5 = e5?.travelMode ?? f3, w2 = i(e5?.accumulateAttributes, []);
  820. r(h5) && (w2.push(h5.distanceAttributeName), h5.timeAttributeName && w2.push(h5.timeAttributeName));
  821. const S3 = { startTime: new Date() }, g4 = { accumulateAttributes: w2, directionsOutputType: "featuresets", ignoreInvalidLocations: true, pointBarriers: o5, polylineBarriers: i8, polygonBarriers: a6, preserveFirstStop: true, preserveLastStop: true, returnBarriers: !!o5, returnDirections: true, returnPolygonBarriers: !!a6, returnPolylineBarriers: !!i8, returnRoutes: true, returnStops: true, stops: r6 }, b5 = e5 ? I.from(e5) : new I();
  822. for (const s6 in S3)
  823. b5[s6] == null && (b5[s6] = S3[s6]);
  824. let v3;
  825. b5.set(g4);
  826. try {
  827. v3 = await l5(c12, b5, t6);
  828. } catch (P) {
  829. throw g(P) ? P : new s2("routelayer:failed-route-request", "the routing request failed", { error: P });
  830. }
  831. const B3 = this._toRouteLayerSolution(v3);
  832. return this._isOverridden("title") || (this.title = i(B3.routeInfo.name, "Route")), se(B3, y4, b5), B3;
  833. }
  834. update(e5) {
  835. const { stops: t6, directionLines: r6, directionPoints: o5, pointBarriers: i8, polylineBarriers: s6, polygonBarriers: n8, routeInfo: a6 } = e5;
  836. this.set({ stops: t6, pointBarriers: i8, polylineBarriers: s6, polygonBarriers: n8 }), this._set("directionLines", r6), this._set("directionPoints", o5), this._set("routeInfo", a6);
  837. }
  838. _getNetworkFeatures(e5, t6, n8, a6) {
  839. const l7 = (re(e5) ? e5.layers : e5.featureCollection.layers).find((e6) => e6.layerDefinition.name === t6);
  840. if (t(l7))
  841. return new j2();
  842. const { layerDefinition: p9, popupInfo: m5, featureSet: c12 } = l7, y4 = p9.drawingInfo.renderer, { features: f3 } = c12, d5 = y4 && o3(y4), h5 = f3.map((e6) => {
  843. const i8 = g3.fromJSON(e6), s6 = n8(i8);
  844. return s6.symbol ?? (s6.symbol = d5?.getSymbol(i8) ?? this._getNetworkSymbol(t6)), s6.popupTemplate ?? (s6.popupTemplate = m5 && B2.fromJSON(m5)), s6;
  845. });
  846. return a6 && h5.some((e6) => !e6.symbol) && a6(h5), new j2(h5);
  847. }
  848. _getNetworkSymbol(e5) {
  849. switch (e5) {
  850. case "Barriers":
  851. return this.defaultSymbols.pointBarriers;
  852. case "DirectionPoints":
  853. return this.defaultSymbols.directionPoints;
  854. case "DirectionLines":
  855. return this.defaultSymbols.directionLines;
  856. case "PolylineBarriers":
  857. return this.defaultSymbols.polylineBarriers;
  858. case "PolygonBarriers":
  859. return this.defaultSymbols.polygonBarriers;
  860. case "RouteInfo":
  861. return this.defaultSymbols.routeInfo;
  862. case "Stops":
  863. return null;
  864. }
  865. }
  866. async _getServiceDescription(e5, t6, r6) {
  867. if (r(this._cachedServiceDescription) && this._cachedServiceDescription.url === e5)
  868. return this._cachedServiceDescription.serviceDescription;
  869. const o5 = await f2(e5, t6, r6);
  870. return this._cachedServiceDescription = { serviceDescription: o5, url: e5 }, o5;
  871. }
  872. _setStopSymbol(e5) {
  873. if (!e5 || e5.length === 0)
  874. return;
  875. if (t(this.defaultSymbols.stops))
  876. return;
  877. if (e5.every((e6) => r(e6.symbol)))
  878. return;
  879. const { first: t6, last: r6, middle: o5, unlocated: i8, waypoint: s6, break: n8 } = this.defaultSymbols.stops;
  880. if (t(this.routeInfo) || e5.length === 1)
  881. return void e5.forEach((i9, s7) => {
  882. switch (s7) {
  883. case 0:
  884. i9.symbol = t6;
  885. break;
  886. case e5.length - 1:
  887. i9.symbol = r6;
  888. break;
  889. default:
  890. i9.symbol = o5;
  891. }
  892. });
  893. const a6 = e5.map((e6) => e6.sequence).filter((e6) => r(e6)), l7 = Math.min(...a6), m5 = Math.max(...a6);
  894. for (const p9 of e5)
  895. p9.sequence !== l7 ? p9.sequence !== m5 ? p9.status === "ok" || p9.status === "not-located-on-closest" ? p9.locationType !== "waypoint" ? p9.locationType !== "break" ? p9.symbol = o5 : p9.symbol = n8 : p9.symbol = s6 : p9.symbol = i8 : p9.symbol = r6 : p9.symbol = t6;
  896. }
  897. _toRouteLayerSolution(e5) {
  898. const t6 = e5.routeResults[0].stops.map((e6) => D.fromJSON(e6.toJSON()));
  899. this._setStopSymbol(t6);
  900. const r6 = new de(t6), o5 = new ye(e5.polygonBarriers?.map((e6) => {
  901. const t7 = g2.fromJSON(e6.toJSON());
  902. return t7.symbol = this.defaultSymbols.polygonBarriers, t7;
  903. })), i8 = new fe(e5.polylineBarriers?.map((e6) => {
  904. const t7 = h3.fromJSON(e6.toJSON());
  905. return t7.symbol = this.defaultSymbols.polylineBarriers, t7;
  906. })), s6 = new ce(e5.pointBarriers?.map((e6) => {
  907. const t7 = O2.fromJSON(e6.toJSON());
  908. return t7.symbol = this.defaultSymbols.pointBarriers, t7;
  909. })), n8 = h4.fromJSON(e5.routeResults[0].route.toJSON());
  910. n8.symbol = this.defaultSymbols.routeInfo;
  911. const a6 = new me(e5.routeResults[0].directionPoints?.features.map((e6) => {
  912. const t7 = h2.fromJSON(e6.toJSON());
  913. return t7.symbol = this.defaultSymbols.directionPoints, t7;
  914. }));
  915. return { directionLines: new ue(e5.routeResults[0].directionLines?.features.map((e6) => {
  916. const t7 = b4.fromJSON(e6.toJSON());
  917. return t7.symbol = this.defaultSymbols.directionLines, t7;
  918. })), directionPoints: a6, pointBarriers: s6, polygonBarriers: o5, polylineBarriers: i8, routeInfo: n8, stops: r6 };
  919. }
  920. _writeDirectionLines() {
  921. return this._writeNetworkFeatures(this.directionLines, this.defaultSymbols.directionLines, "esriGeometryPolyline", b4.fields, b4.popupInfo, "DirectionLines", "Direction Lines");
  922. }
  923. _writeDirectionPoints() {
  924. return this._writeNetworkFeatures(this.directionPoints, this.defaultSymbols.directionPoints, "esriGeometryPoint", h2.fields, h2.popupInfo, "DirectionPoints", "Direction Points");
  925. }
  926. _writeNetworkFeatures(e5, t6, r6, o5, i8, s6, n8) {
  927. return t(e5) || !e5.length ? null : { featureSet: { features: e5.toArray().map((e6) => pe(e6)), geometryType: r6 }, layerDefinition: { capabilities: "Query,Update,Editing", drawingInfo: { renderer: { type: "simple", symbol: r(t6) ? t6.toJSON() : te(r6) } }, extent: this.fullExtent.toJSON(), fields: o5, geometryType: r6, hasM: false, hasZ: false, maxScale: this.maxScale, minScale: this.minScale, name: s6, objectIdField: "__OBJECTID", spatialReference: this.spatialReference.toJSON(), title: n8, type: "Feature Layer", typeIdField: "" }, popupInfo: i8 };
  928. }
  929. _writePointBarriers() {
  930. return this._writeNetworkFeatures(this.pointBarriers, this.defaultSymbols.pointBarriers, "esriGeometryPoint", O2.fields, O2.popupInfo, "Barriers", "Point Barriers");
  931. }
  932. _writePolygonBarriers() {
  933. return this._writeNetworkFeatures(this.polygonBarriers, this.defaultSymbols.polygonBarriers, "esriGeometryPolygon", g2.fields, g2.popupInfo, "PolygonBarriers", "Polygon Barriers");
  934. }
  935. _writePolylineBarriers() {
  936. return this._writeNetworkFeatures(this.polylineBarriers, this.defaultSymbols.polylineBarriers, "esriGeometryPolyline", h3.fields, h3.popupInfo, "PolylineBarriers", "Line Barriers");
  937. }
  938. _writeRouteInfo() {
  939. return this._writeNetworkFeatures(r(this.routeInfo) ? new j2([this.routeInfo]) : null, this.defaultSymbols.routeInfo, "esriGeometryPolyline", h4.fields, h4.popupInfo, "RouteInfo", "Route Details");
  940. }
  941. _writeStops() {
  942. const e5 = this._writeNetworkFeatures(this.stops, null, "esriGeometryPoint", D.fields, D.popupInfo, "Stops", "Stops");
  943. if (t(e5))
  944. return null;
  945. const { stops: t6 } = this.defaultSymbols, r6 = r(t6) && r(t6.first) && t6.first.toJSON(), o5 = r(t6) && r(t6.middle) && t6.middle.toJSON(), i8 = r(t6) && r(t6.last) && t6.last.toJSON();
  946. return e5.layerDefinition.drawingInfo.renderer = { type: "uniqueValue", field1: "Sequence", defaultSymbol: o5, uniqueValueInfos: [{ value: "1", symbol: r6, label: "First Stop" }, { value: `${this.stops.length}`, symbol: i8, label: "Last Stop" }] }, e5;
  947. }
  948. };
  949. e([d({ readOnly: true, json: { read: false, origins: { "portal-item": { write: { allowNull: true, ignoreOrigin: true } }, "web-map": { write: { overridePolicy() {
  950. return { allowNull: true, ignoreOrigin: this.portalItem == null };
  951. } } } } } })], we.prototype, "_featureCollection", void 0), e([r3(["web-map", "portal-item"], "_featureCollection")], we.prototype, "writeFeatureCollectionWebmap", null), e([d({ readOnly: true, json: { read: false, origins: { "web-map": { write: { target: "type", overridePolicy() {
  952. return { ignoreOrigin: this.portalItem != null };
  953. } } } } } })], we.prototype, "_type", void 0), e([d({ nonNullable: true, type: n4 })], we.prototype, "defaultSymbols", void 0), e([d({ readOnly: true })], we.prototype, "directionLines", void 0), e([o2(["web-map", "portal-item"], "directionLines", ["layers", "featureCollection.layers"])], we.prototype, "readDirectionLines", null), e([d({ readOnly: true })], we.prototype, "directionPoints", void 0), e([o2(["web-map", "portal-item"], "directionPoints", ["layers", "featureCollection.layers"])], we.prototype, "readDirectionPoints", null), e([d({ readOnly: true, json: { read: false, origins: { "web-map": { write: { ignoreOrigin: true } } } } })], we.prototype, "featureCollectionType", void 0), e([d({ readOnly: true })], we.prototype, "fullExtent", null), e([d({ json: { origins: { "web-map": { name: "featureCollection.showLegend" } }, write: true } })], we.prototype, "legendEnabled", void 0), e([d({ type: ["show", "hide"] })], we.prototype, "listMode", void 0), e([d({ type: Number, nonNullable: true, json: { write: false } })], we.prototype, "maxScale", void 0), e([o2(["web-map", "portal-item"], "maxScale", ["layers", "featureCollection.layers"])], we.prototype, "readMaxScale", null), e([d({ type: Number, nonNullable: true, json: { write: false } })], we.prototype, "minScale", void 0), e([o2(["web-map", "portal-item"], "minScale", ["layers", "featureCollection.layers"])], we.prototype, "readMinScale", null), e([d({ type: ["ArcGISFeatureLayer"], value: "ArcGISFeatureLayer" })], we.prototype, "operationalLayerType", void 0), e([d({ nonNullable: true, type: j2.ofType(O2) })], we.prototype, "pointBarriers", void 0), e([o2(["web-map", "portal-item"], "pointBarriers", ["layers", "featureCollection.layers"])], we.prototype, "readPointBarriers", null), e([d({ nonNullable: true, type: j2.ofType(g2) })], we.prototype, "polygonBarriers", void 0), e([o2(["web-map", "portal-item"], "polygonBarriers", ["layers", "featureCollection.layers"])], we.prototype, "readPolygonBarriers", null), e([d({ nonNullable: true, type: j2.ofType(h3) })], we.prototype, "polylineBarriers", void 0), e([o2(["web-map", "portal-item"], "polylineBarriers", ["layers", "featureCollection.layers"])], we.prototype, "readPolylineBarriers", null), e([d({ readOnly: true })], we.prototype, "routeInfo", void 0), e([o2(["web-map", "portal-item"], "routeInfo", ["layers", "featureCollection.layers"])], we.prototype, "readRouteInfo", null), e([d({ type: k })], we.prototype, "spatialReference", void 0), e([o2(["web-map", "portal-item"], "spatialReference", ["layers", "featureCollection.layers"])], we.prototype, "readSpatialReference", null), e([d({ nonNullable: true, type: j2.ofType(D) })], we.prototype, "stops", void 0), e([o2(["web-map", "portal-item"], "stops", ["layers", "featureCollection.layers"])], we.prototype, "readStops", null), e([d()], we.prototype, "title", null), e([d({ readOnly: true, json: { read: false } })], we.prototype, "type", void 0), e([d()], we.prototype, "url", null), we = e([n("esri.layers.RouteLayer")], we);
  954. var Se = we;
  955. export {
  956. Se as default
  957. };
  958. //# sourceMappingURL=RouteLayer-PBS3GG7W.js.map