@arcgis/core 4.31.0-next.20240921 → 4.31.0-next.20240923
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/1810cb638ca1d52de7b2.js +1 -0
- package/assets/esri/core/workers/chunks/{69f6f35b04c722aba8cf.js → 238897e72fedd6754af7.js} +1 -1
- package/assets/esri/core/workers/chunks/2807eb7bfe4868fe840f.js +1 -0
- package/assets/esri/core/workers/chunks/{6c07116c8f7361780803.js → 2b04d2f8466d16a24a80.js} +1 -1
- package/assets/esri/core/workers/chunks/{83649583139b818d4dfa.js → 356f6cc122287412b888.js} +1 -1
- package/assets/esri/core/workers/chunks/36a1de3752ff13d77b4d.js +1 -0
- package/assets/esri/core/workers/chunks/{bf406a46515d5dfebe06.js → 3d207d1c6effda13b448.js} +1 -1
- package/assets/esri/core/workers/chunks/460ae228640fd5e545ad.js +1 -0
- package/assets/esri/core/workers/chunks/{f14cefc311a21116d21b.js → 4c0d37b799edae391ab2.js} +1 -1
- package/assets/esri/core/workers/chunks/{16eda85f728423c4ed02.js → 4ea08495271f6d291b05.js} +1 -1
- package/assets/esri/core/workers/chunks/{cf147f34032a8d07f322.js → 53becb5fe10f7f38311f.js} +1 -1
- package/assets/esri/core/workers/chunks/{24d45530fe47b3114daf.js → 5652ff08dcc5afd3d739.js} +1 -1
- package/assets/esri/core/workers/chunks/5fe1f8881959df0e61ce.js +1 -0
- package/assets/esri/core/workers/chunks/62f4eda8a9f4de481dcb.js +1 -0
- package/assets/esri/core/workers/chunks/{3fa3e1e6595668ca0e18.js → 686613864dd54d1cae3c.js} +1 -1
- package/assets/esri/core/workers/chunks/{5d0d36230a5b8309c9e4.js → 75bf6dff29056a5a1242.js} +1 -1
- package/assets/esri/core/workers/chunks/{a7bd5bb21a7f3030ee13.js → 783d66397f16899dd0e9.js} +1 -1
- package/assets/esri/core/workers/chunks/7bc57e2a3836ddc8f121.js +1 -0
- package/assets/esri/core/workers/chunks/{2658205b1ab2502c0bc7.js → 856c82a20027435fd306.js} +1 -1
- package/assets/esri/core/workers/chunks/{99944b05d3142903511c.js → 93fb720bbfb3628f9c71.js} +1 -1
- package/assets/esri/core/workers/chunks/{14f77efbfba0ca9efb6c.js → 9dce33a9bcfb852a74d3.js} +1 -1
- package/assets/esri/core/workers/chunks/{de7e197223471c7b66a7.js → afb35deb035c9c9225c9.js} +1 -1
- package/assets/esri/core/workers/chunks/{5f9beed2a9599b9ce649.js → bc37c0dc14ea54f1b9e8.js} +1 -1
- package/assets/esri/core/workers/chunks/{35f92652df2561845d47.js → c9aa8df2f62e6d40b771.js} +1 -1
- package/assets/esri/core/workers/chunks/d8435cc010bd2260feec.js +1 -0
- package/assets/esri/core/workers/chunks/e5a8ab8d02a616469f1d.js +1 -0
- package/assets/esri/core/workers/chunks/f1446e56c35e59b904e1.js +1 -0
- package/assets/esri/core/workers/chunks/{6508ff21b0a5725629eb.js → fa3f9691a9bd1bbb25d3.js} +1 -1
- package/assets/esri/core/workers/chunks/{008f290833724454160d.js → fab59ee41f96b2378768.js} +1 -1
- package/assets/esri/core/workers/chunks/{67ea066a903f5ad31155.js → fe709db8238127f91e59.js} +1 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/SubtypeGroupLayer.js +1 -1
- package/layers/orientedImagery/core/coverageUtils.js +1 -1
- package/layers/orientedImagery/core/utils.js +1 -1
- package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
- package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/support/featureLayerUtils.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/interactive/sketch/constraintUtils.js +1 -1
- package/views/interactive/sketch/constraints.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/0eb789af3c26fecdf3be.js +0 -1
- package/assets/esri/core/workers/chunks/41a3c7d286a050002d20.js +0 -1
- package/assets/esri/core/workers/chunks/59e4731d246203e94a96.js +0 -1
- package/assets/esri/core/workers/chunks/69c09478c899cd5e5013.js +0 -1
- package/assets/esri/core/workers/chunks/7088f771163fda53d196.js +0 -1
- package/assets/esri/core/workers/chunks/79ed119c70ce6ea02f71.js +0 -1
- package/assets/esri/core/workers/chunks/b5c02dbf540ededb863c.js +0 -1
- package/assets/esri/core/workers/chunks/eeacd5fa9fb9b1dee5f7.js +0 -1
- package/assets/esri/core/workers/chunks/f7c96d34c70ed36da7c2.js +0 -1
- package/assets/esri/core/workers/chunks/f9e90a2fda559ca68848.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3920,7136],{4902:(e,t,r)=>{r.d(t,{PH:()=>a,sA:()=>n});var i=r(90237),o=r(40608);let s=0;const n=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return t=(0,i._)([(0,o.$)("esri.core.Identifiable")],t),t},a=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:s++})}};return t=(0,i._)([(0,o.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};let l=class extends(n(class{})){};l=(0,i._)([(0,o.$)("esri.core.Identifiable")],l)},92071:(e,t,r)=>{r.d(t,{P:()=>b,L:()=>T});var i=r(90237),o=r(69622),s=r(76953),n=r(4718),a=r(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,r=this._originStores[a.Gr.DEFAULTS];r&&r.forEach(((e,r)=>{t.set(r,(0,n.o8)(e),a.Gr.DEFAULTS)}));for(let r=a.Gr.SERVICE;r<a.AU;r++){const i=this._originStores[r];i&&i.forEach(((i,o)=>{e&&e.has(o)||t.set(o,(0,n.o8)(i),r)}))}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=a.Gr.USER){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=r){const i=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),i!==t}return!1}delete(e,t=a.Gr.USER){const r=this._originStores[t];if(!r)return;const i=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return i}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],i=r?.get(e),o=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,t),o!==i}originOf(e){return this._propertyOriginMap.get(e)||a.Gr.DEFAULTS}forEach(e){this._values.forEach(e)}}var u=r(45917),p=r(88620),c=r(40608);const d=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,p.oY)(this),r=t.store,i=new l;t.store=i,(0,s.k)(t,r,i)}read(e,t){(0,u.L)(this,e,t)}getAtOrigin(e,t){const r=y(this),i=(0,a.aB)(t);if("string"==typeof e)return r.get(e,i);const o={};return e.forEach((e=>{o[e]=r.get(e,i)})),o}originOf(e){return(0,a.OL)(this.originIdOf(e))}originIdOf(e){return y(this).originOf(e)}revert(e,t){const r=y(this),i=(0,a.aB)(t),o=(0,p.oY)(this);let s;s="string"==typeof e?"*"===e?r.keys(i):[e]:e,s.forEach((e=>{o.invalidate(e),r.revert(e,i),o.commit(e)}))}};return t=(0,i._)([(0,c.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function y(e){return(0,p.oY)(e).store}let m=class extends(d(o.A)){};m=(0,i._)([(0,c.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],m);var h=r(16649),f=r(49422);const v=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return g(this).delete(e,(0,a.aB)(t))}write(e,t){return(0,f.M)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,p.oY)(this).setAtOrigin(e,t,(0,a.aB)(r))}removeOrigin(e){const t=g(this),r=(0,a.aB)(e),i=t.keys(r);for(const e of i)t.originOf(e)===r&&t.set(e,t.get(e,r),a.Gr.USER)}updateOrigin(e,t){const r=g(this),i=(0,a.aB)(t),o=(0,h.Jt)(this,e);for(let t=i+1;t<a.AU;++t)r.delete(e,t);r.set(e,o,i)}toJSON(e){return this.write({},e)}};return t=(0,i._)([(0,c.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function g(e){return(0,p.oY)(e).store}const b=e=>{let t=class extends(v(d(e))){constructor(...e){super(...e)}};return t=(0,i._)([(0,c.$)("esri.core.MultiOriginJSONSupport")],t),t};let T=class extends(b(o.A)){};T=(0,i._)([(0,c.$)("esri.core.MultiOriginJSONSupport")],T)},46130:(e,t,r)=>{r.d(t,{v:()=>o});var i=r(76553);function o(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,i.H)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},76553:(e,t,r)=>{function i(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{H:()=>i})},3330:(e,t,r)=>{r.d(t,{GB:()=>o,Qo:()=>n,Y4:()=>s});var i=r(96285);class o{}function s(e){return e instanceof i.bo?e===o.instance:"unknown"===e?.toString().toLowerCase()}function n(e){return s(e)?o.instance:e}o.instance=new i.oh("Etc/UTC")},70328:(e,t,r)=>{r.d(t,{BI:()=>w,Ej:()=>h,Hq:()=>u,Ie:()=>b,Jt:()=>T,Ne:()=>f,RF:()=>a,_F:()=>y,aI:()=>_,fA:()=>s,gX:()=>m,hZ:()=>g,iT:()=>l,is:()=>S,qv:()=>M,vI:()=>v,v_:()=>A,vt:()=>o,w1:()=>n});var i=r(5443);function o(e=A){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,r,i,s,n,a=o()){return a[0]=e,a[1]=t,a[2]=r,a[3]=i,a[4]=s,a[5]=n,a}function n(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t,r=0,i=t.length/3){let o=e[0],s=e[1],n=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<i;e++)o=Math.min(o,t[r+3*e]),s=Math.min(s,t[r+3*e+1]),n=Math.min(n,t[r+3*e+2]),a=Math.max(a,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=o,e[1]=s,e[2]=n,e[3]=a,e[4]=l,e[5]=u}function p(e){return e[0]>=e[3]?0:e[3]-e[0]}function c(e){return e[1]>=e[4]?0:e[4]-e[1]}function d(e){return e[2]>=e[5]?0:e[5]-e[2]}function y(e){const t=p(e),r=d(e),i=c(e);return Math.sqrt(t*t+r*r+i*i)}function m(e,t=[0,0,0]){return t[0]=e[0]+p(e)/2,t[1]=e[1]+c(e)/2,t[2]=e[2]+d(e)/2,t}function h(e,t=[0,0,0]){return t[0]=p(e),t[1]=c(e),t[2]=d(e),t}function f(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function v(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function g(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function b(e){return e?g(e,M):o(M)}function T(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function w(e,t,r,i,o){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=o,e[5]=Number.POSITIVE_INFINITY,e}function S(e){return 6===e.length}function _(e,t,r){if(null==e||null==t)return e===t;if(!S(e)||!S(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(19419);const M=[1/0,1/0,1/0,-1/0,-1/0,-1/0],A=[0,0,0,0,0,0];o()},17136:(e,t,r)=>{r.d(t,{el:()=>S});var i=r(92602),o=r(49186),s=r(53966),n=r(39829),a=r(82799),l=r(80754),u=r(21325),p=r(28735),c=(r(59456),r(78888)),d=r(65864),y=r(2272),m=r(84952),h=r(92300);const f=()=>s.A.getLogger("esri.geometry.support.normalizeUtils");function v(e){return"polygon"===e[0].type}function g(e){return"polyline"===e[0].type}function b(e,t,r){if(t){const t=function(e,t){if(!(e instanceof a.A||e instanceof n.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw f().error(e),new o.A(e)}const r=(0,l.r8)(e),i=[];for(const e of r){const r=[];i.push(r),r.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const o=e[i][0],s=e[i][1],n=e[i+1][0],a=e[i+1][1],l=Math.sqrt((n-o)*(n-o)+(a-s)*(a-s)),u=(a-s)/l,p=(n-o)/l,c=l/t;if(c>1){for(let e=1;e<=c-1;e++){const i=e*t,n=p*i+o,a=u*i+s;r.push([n,a])}const e=(l+Math.floor(c-1)*t)/2,i=p*e+o,n=u*e+s;r.push([i,n])}r.push([n,a])}}return function(e){return"polygon"===e.type}(e)?new n.A({rings:i,spatialReference:e.spatialReference}):new a.A({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.ci)(t,!0)}return r&&(e=(0,l.kS)(e,r)),e}function T(e,t,r){if(Array.isArray(e)){const i=e[0];if(i>t){const r=(0,l.kd)(i,t);e[0]=i+r*(-2*t)}else if(i<r){const t=(0,l.kd)(i,r);e[0]=i+t*(-2*r)}}else{const i=e.x;if(i>t){const r=(0,l.kd)(i,t);e=e.clone().offset(r*(-2*t),0)}else if(i<r){const t=(0,l.kd)(i,r);e=e.clone().offset(t*(-2*r),0)}}return e}function w(e,t){let r=-1;for(let i=0;i<t.cutIndexes.length;i++){const o=t.cutIndexes[i],s=t.geometries[i],n=(0,l.r8)(s);for(let e=0;e<n.length;e++){const t=n[e];t.some((r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const i=t[e][0];r=i>r?i:r}r=Number(r.toFixed(9));const i=-360*(0,l.kd)(r,180);for(let r=0;r<t.length;r++){const t=s.getPoint(e,r);s.setPoint(e,r,t.clone().offset(i,0))}return!0}}))}if(o===r){if(v(e))for(const t of(0,l.r8)(s))e[o]=e[o].addRing(t);else if(g(e))for(const t of(0,l.r8)(s))e[o]=e[o].addPath(t)}else r=o,e[o]=s}return e}async function S(e,t,r){if(!Array.isArray(e))return S([e],t);t&&"string"!=typeof t&&f().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const o="string"==typeof t?t:t?.url??i.A.geometryServiceUrl;let s,v,g,_,M,A,N,O,I=0;const D=[],C=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,v=(0,u.Vp)(s),g=s.isWebMercator,A=g?102100:4326,_=l.j7[A].maxX,M=l.j7[A].minX,N=l.j7[A].plus180Line,O=l.j7[A].minus180Line),v)if("mesh"===t.type)C.push(t);else if("point"===t.type)C.push(T(t.clone(),_,M));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>T(e,_,M))),C.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,v);C.push(e.rings?new n.A(e):e)}else if(t.extent){const e=t.extent,r=(0,l.kd)(e.xmin,M)*(2*_);let i=0===r?t.clone():(0,l.kS)(t.clone(),r);e.offset(r,0);let{xmin:o,xmax:s}=e;o=Number(o.toFixed(9)),s=Number(s.toFixed(9)),e.intersects(N)&&s!==_?(I=s>I?s:I,i=b(i,g),D.push(i),C.push("cut")):e.intersects(O)&&o!==M?(I=s*(2*_)>I?s*(2*_):I,i=b(i,g,360),D.push(i),C.push("cut")):C.push(i)}else C.push(t.clone());else C.push(t);else C.push(t);let L=(0,l.kd)(I,_),j=-90;const F=L,B=new a.A;for(;L>0;){const e=360*L-180;B.addPath([[e,j],[e,-1*j]]),j*=-1,L--}if(D.length>0&&F>0){const t=w(D,await async function(e,t,r,i){const o=(0,y.Dl)(e),s=t[0].spatialReference,n={...i,responseType:"json",query:{...o.query,f:"json",sr:(0,u.YX)(s),target:JSON.stringify({geometryType:(0,d.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},a=await(0,c.A)(o.path+"/cut",n),{cutIndexes:l,geometries:p=[]}=a.data;return{cutIndexes:l,geometries:p.map((e=>{const t=(0,d.rS)(e);return t.spatialReference=s,t}))}}(o,D,B,r)),i=[],s=[];for(let r=0;r<C.length;r++){const o=C[r];if("cut"!==o)s.push(o);else{const o=t.shift(),n=e[r];null!=n&&"polygon"===n.type&&n.rings&&n.rings.length>1&&o.rings.length>=n.rings.length?(i.push(o),s.push("simplify")):s.push(g?(0,p.Gh)(o):o)}}if(!i.length)return s;const n=await async function(e,t,r){const i="string"==typeof e?(0,m.An)(e):e,o=t[0].spatialReference,s=(0,d.$B)(t[0]),n={...r,query:{...i.query,f:"json",sr:(0,u.YX)(o),geometries:JSON.stringify((0,h.X)(t))}},{data:a}=await(0,c.A)(i.path+"/simplify",n);return(0,h.V)(a.geometries,s,o)}(o,i,r),a=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?a.push(t):a.push(g?(0,p.Gh)(n.shift()):n.shift())}return a}const P=[];for(let e=0;e<C.length;e++){const t=C[e];if("cut"!==t)P.push(t);else{const e=D.shift();P.push(!0===g?(0,p.Gh)(e):e)}}return P}},80754:(e,t,r)=>{r.d(t,{j7:()=>n,kS:()=>l,kd:()=>a,r8:()=>u});var i=r(82799),o=r(16930),s=r(65864);const n={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:o.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:o.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const r=u(e);for(const e of r)for(const r of e)r[0]+=t;return e}function u(e){return(0,s.Bi)(e)?e.rings:e.paths}},4146:(e,t,r)=>{r.d(t,{A:()=>T});var i=r(90237),o=(r(59456),r(78888)),s=r(49186),n=r(65529),a=r(4902),l=r(92474),u=r(53966),p=r(74887),c=r(84952),d=r(10107),y=(r(44208),r(87811),r(40608)),m=r(92602),h=r(79677),f=r(5443),v=r(16930);let g=0,b=class extends(n.A.EventedMixin((0,a.sA)(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.A(-180,-90,180,90,v.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+g++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=v.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(7982).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(5613).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",o=r?.portal?.url||m.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+o+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,p.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,c.An)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,o.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,d.M)({type:String})],b.prototype,"attributionDataUrl",void 0),(0,i._)([(0,d.M)({readOnly:!0})],b.prototype,"effectiveVisible",null),(0,i._)([(0,d.M)({type:f.A})],b.prototype,"fullExtent",void 0),(0,i._)([(0,d.M)({readOnly:!0})],b.prototype,"hasAttributionData",null),(0,i._)([(0,d.M)({type:String,clonable:!1})],b.prototype,"id",void 0),(0,i._)([(0,d.M)({type:Boolean,nonNullable:!0})],b.prototype,"legendEnabled",void 0),(0,i._)([(0,d.M)({type:["show","hide","hide-children"]})],b.prototype,"listMode",void 0),(0,i._)([(0,d.M)({type:Number,range:{min:0,max:1},nonNullable:!0})],b.prototype,"opacity",void 0),(0,i._)([(0,d.M)({clonable:!1})],b.prototype,"parent",void 0),(0,i._)([(0,d.M)({readOnly:!0})],b.prototype,"parsedUrl",null),(0,i._)([(0,d.M)({type:Boolean,readOnly:!0})],b.prototype,"persistenceEnabled",void 0),(0,i._)([(0,d.M)({type:Boolean})],b.prototype,"popupEnabled",void 0),(0,i._)([(0,d.M)({type:Boolean})],b.prototype,"attributionVisible",void 0),(0,i._)([(0,d.M)({type:v.A})],b.prototype,"spatialReference",void 0),(0,i._)([(0,d.M)({type:String})],b.prototype,"title",void 0),(0,i._)([(0,d.M)({readOnly:!0,json:{read:!1}})],b.prototype,"type",void 0),(0,i._)([(0,d.M)()],b.prototype,"url",void 0),(0,i._)([(0,d.M)({type:h.A})],b.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,d.M)({type:Boolean,nonNullable:!0})],b.prototype,"visible",void 0),b=(0,i._)([(0,y.$)("esri.layers.Layer")],b);const T=b},97550:(e,t,r)=>{r.r(t),r.d(t,{default:()=>pr});var i=r(90237),o=r(92602),s=r(59456),n=r(52106),a=r(13874),l=(r(86162),r(94409),r(65345),r(42980),r(20917),r(92438),r(96576),r(93618),r(65494)),u=r(53966),p=r(5503),c=r(49186),d=r(92071),y=r(93637),m=r(74887),h=r(36708),f=r(83047),v=r(84952),g=r(10107),b=(r(44208),r(87811),r(36005)),T=r(40608),w=r(43937),S=r(46130),_=r(5443),M=r(57251),A=r(21325),N=r(4146),O=r(63074),I=r(16131),D=r(8303),C=r(25036),L=r(60694),j=r(61147),F=r(25482),B=r(53930);let P=class extends F.oY{constructor(e){super(e),this.break=new B.A({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}}),this.first=new B.A({color:[0,255,0],size:20,outline:{color:[255,255,255],width:4}}),this.unlocated=new B.A({color:[255,0,0],size:12,outline:{color:[255,255,255],width:3}}),this.last=new B.A({color:[255,0,0],size:20,outline:{color:[255,255,255],width:4}}),this.middle=new B.A({color:[51,51,51],size:12,outline:{color:[0,122,194],width:3}}),this.waypoint=new B.A({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}})}};(0,i._)([(0,g.M)({types:j.wC})],P.prototype,"break",void 0),(0,i._)([(0,g.M)({types:j.wC})],P.prototype,"first",void 0),(0,i._)([(0,g.M)({types:j.wC})],P.prototype,"unlocated",void 0),(0,i._)([(0,g.M)({types:j.wC})],P.prototype,"last",void 0),(0,i._)([(0,g.M)({types:j.wC})],P.prototype,"middle",void 0),(0,i._)([(0,g.M)({types:j.wC})],P.prototype,"waypoint",void 0),P=(0,i._)([(0,T.$)("esri.layers.support.RouteStopSymbols")],P);const R=P;var E=r(31593),x=r(94985);let U=class extends F.oY{constructor(e){super(e),this.directionLines=new E.A({color:[0,122,194],width:6}),this.directionPoints=new B.A({color:[255,255,255],size:6,outline:{color:[0,122,194],width:2}}),this.pointBarriers=new B.A({style:"x",size:10,outline:{color:[255,0,0],width:3}}),this.polygonBarriers=new x.A({color:[255,170,0,.6],outline:{width:7.5,color:[255,0,0,.6]}}),this.polylineBarriers=new E.A({width:7.5,color:[255,85,0,.7]}),this.routeInfo=new E.A({width:8,color:[20,89,127]}),this.stops=new R}};(0,i._)([(0,g.M)({types:j.Y7})],U.prototype,"directionLines",void 0),(0,i._)([(0,g.M)({types:j.wC})],U.prototype,"directionPoints",void 0),(0,i._)([(0,g.M)({types:j.wC})],U.prototype,"pointBarriers",void 0),(0,i._)([(0,g.M)({types:j.Ac})],U.prototype,"polygonBarriers",void 0),(0,i._)([(0,g.M)({types:j.Y7})],U.prototype,"polylineBarriers",void 0),(0,i._)([(0,g.M)({types:j.Y7})],U.prototype,"routeInfo",void 0),(0,i._)([(0,g.M)({type:R})],U.prototype,"stops",void 0),U=(0,i._)([(0,T.$)("esri.layers.support.RouteSymbols")],U);const J=U;var k=r(20655),G=r(80812),V=r(10407),W=r(78888),q=r(2272),$=r(93223),z=r(66552);const K={esriCentimeters:"centimeters",esriDecimalDegrees:"decimal-degrees",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriPoints:"points",esriUnknownUnits:"unknown",esriYards:"yards"},Y=(0,z.O)()(K),Z=((0,z.O)()({...K,esriIntFeet:"international-feet",esriIntInches:"international-inches",esriIntMiles:"international-miles",esriIntNauticalMiles:"international-nautical-miles",esriIntYards:"international-yards"}),(0,z.O)()({esriAcres:"international-acres",esriAcresUS:"us-acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-international-feet",esriSquareFeetUS:"square-us-feet",esriSquareInches:"square-international-inches",esriSquareInchesUS:"square-us-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-international-miles",esriSquareMilesUS:"square-us-miles",esriSquareMillimeters:"square-millimeters",esriSquareYards:"square-international-yards",esriSquareYardsUS:"square-us-yards",esriUnknownAreaUnits:"unknown"}),(0,z.O)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards"})),H=((0,z.O)()({esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds"}),(0,z.O)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards",esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds",esriNAUKilometersPerHour:"kilometers-per-hour",esriNAUMilesPerHour:"miles-per-hour",esriNAUUnknown:"unknown"})),X=(0,z.O)()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),Q=(0,z.O)()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),ee=((0,z.O)()({esriNAOutputPolygonNone:"none",esriNAOutputPolygonSimplified:"simplified",esriNAOutputPolygonDetailed:"detailed"}),(0,z.O)()({esriNFSBAllowBacktrack:"allow-backtrack",esriNFSBAtDeadEndsOnly:"at-dead-ends-only",esriNFSBNoBacktrack:"no-backtrack",esriNFSBAtDeadEndsAndIntersections:"at-dead-ends-and-intersections"})),te=((0,z.O)()({esriNATravelDirectionFromFacility:"from-facility",esriNATravelDirectionToFacility:"to-facility"}),(0,z.O)()({esriNATimeOfDayNotUsed:"not-used",esriNATimeOfDayUseAsStartTime:"start",esriNATimeOfDayUseAsEndTime:"end"}),(0,z.O)()({AUTOMOBILE:"automobile",TRUCK:"truck",WALK:"walk",OTHER:"other"})),re=(0,z.O)()({0:"either-side-of-vehicle",1:"right-side-of-vehicle",2:"left-side-of-vehicle",3:"no-u-turn"},{useNumericKeys:!0}),ie=(0,z.O)()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),oe=(0,z.O)()({0:"ok",1:"not-located",2:"network-element-not-located",3:"element-not-traversable",4:"invalid-field-values",5:"not-reached",6:"time-window-violation",7:"not-located-on-closest"},{useNumericKeys:!0}),se=(0,z.O)()({1:"right",2:"left"},{useNumericKeys:!0}),ne=(0,z.O)()({0:"restriction",1:"scaled-cost",2:"added-cost"},{useNumericKeys:!0}),ae=(0,z.O)()({0:"permit",1:"restrict"},{useNumericKeys:!0}),le=(0,z.O)()({1:"header",50:"arrive",51:"depart",52:"straight",100:"on-ferry",101:"off-ferry",102:"central-fork",103:"roundabout",104:"u-turn",150:"door",151:"stairs",152:"elevator",153:"escalator",154:"pedestrian-ramp",200:"left-fork",201:"left-ramp",202:"clockwise-roundabout",203:"left-handed-u-turn",204:"bear-left",205:"left-turn",206:"sharp-left",207:"left-turn-and-immediate-left-turn",208:"left-turn-and-immediate-right-turn",300:"right-fork",301:"right-ramp",302:"counter-clockwise-roundabout",303:"right-handed-u-turn",304:"bear-right",305:"right-turn",306:"sharp-right",307:"right-turn-and-immediate-left-turn",308:"right-turn-and-immediate-right-turn",400:"up-elevator",401:"up-escalator",402:"up-stairs",500:"down-elevator",501:"down-escalator",502:"down-stairs",1e3:"general-event",1001:"landmark",1002:"time-zone-change",1003:"traffic-event",1004:"scaled-cost-barrier-event",1005:"boundary-crossing",1006:"restriction-violation",1007:"lane"},{useNumericKeys:!0}),ue=(0,z.O)()({0:"unknown",1:"segment",2:"maneuver-segment",3:"restriction-violation",4:"scaled-cost-barrier",5:"heavy-traffic",6:"slow-traffic",7:"moderate-traffic"},{useNumericKeys:!0}),pe=(0,z.O)()({"NA Campus":"campus","NA Desktop":"desktop","NA Navigation":"navigation"}),ce=(0,z.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters"},{ignoreUnknown:!1}),de=(0,z.O)()({Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),ye=(0,z.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters",Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),me=(0,z.O)()({"Any Hazmat Prohibited":"any-hazmat-prohibited","Avoid Carpool Roads":"avoid-carpool-roads","Avoid Express Lanes":"avoid-express-lanes","Avoid Ferries":"avoid-ferries","Avoid Gates":"avoid-gates","Avoid Limited Access Roads":"avoid-limited-access-roads","Avoid Private Roads":"avoid-private-roads","Avoid Roads Unsuitable for Pedestrians":"avoid-roads-unsuitable-for-pedestrians","Avoid Stairways":"avoid-stairways","Avoid Toll Roads":"avoid-toll-roads","Avoid Toll Roads for Trucks":"avoid-toll-roads-for-trucks","Avoid Truck Restricted Roads":"avoid-truck-restricted-roads","Avoid Unpaved Roads":"avoid-unpaved-roads","Axle Count Restriction":"axle-count-restriction","Driving a Bus":"driving-a-bus","Driving a Taxi":"driving-a-taxi","Driving a Truck":"driving-a-truck","Driving an Automobile":"driving-an-automobile","Driving an Emergency Vehicle":"driving-an-emergency-vehicle","Height Restriction":"height-restriction","Kingpin to Rear Axle Length Restriction":"kingpin-to-rear-axle-length-restriction","Length Restriction":"length-restriction","Preferred for Pedestrians":"preferred-for-pedestrians","Riding a Motorcycle":"riding-a-motorcycle","Roads Under Construction Prohibited":"roads-under-construction-prohibited","Semi or Tractor with One or More Trailers Prohibited":"semi-or-tractor-with-one-or-more-trailers-prohibited","Single Axle Vehicles Prohibited":"single-axle-vehicles-prohibited","Tandem Axle Vehicles Prohibited":"tandem-axle-vehicles-prohibited","Through Traffic Prohibited":"through-traffic-prohibited","Truck with Trailers Restriction":"truck-with-trailers-restriction","Use Preferred Hazmat Routes":"use-preferred-hazmat-routes","Use Preferred Truck Routes":"use-preferred-truck-routes",Walking:"walking","Weight Restriction":"weight-restriction"},{ignoreUnknown:!1}),he=(0,z.O)()({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),fe=(0,z.O)()({esriGeometryPoint:"point",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"envelope",esriGeometryMultipoint:"multipoint"}),ve=(0,z.O)()({esriNAUTCost:"cost",esriNAUTDescriptor:"descriptor",esriNAUTRestriction:"restriction",esriNAUTHierarchy:"hierarchy"}),ge=(0,z.O)()({esriDSTAltName:"alt-name",esriDSTArrive:"arrive",esriDSTBranch:"branch",esriDSTCrossStreet:"cross-street",esriDSTCumulativeLength:"cumulative-length",esriDSTDepart:"depart",esriDSTEstimatedArrivalTime:"estimated-arrival-time",esriDSTExit:"exit",esriDSTGeneral:"general",esriDSTLength:"length",esriDSTServiceTime:"service-time",esriDSTStreetName:"street-name",esriDSTSummary:"summary",esriDSTTime:"time",esriDSTTimeWindow:"time-window",esriDSTToward:"toward",esriDSTViolationTime:"violation-time",esriDSTWaitTime:"wait-time"});let be=class extends F.oY{constructor(e){super(e),this.dataType=null,this.name=null,this.parameterNames=null,this.restrictionUsageParameterName=null,this.timeNeutralAttributeName=null,this.trafficSupport=null,this.units=null,this.usageType=null}};(0,i._)([(0,g.M)({type:String})],be.prototype,"dataType",void 0),(0,i._)([(0,$.e)(ye,{ignoreUnknown:!1})],be.prototype,"name",void 0),(0,i._)([(0,g.M)({type:[String]})],be.prototype,"parameterNames",void 0),(0,i._)([(0,g.M)({type:String})],be.prototype,"restrictionUsageParameterName",void 0),(0,i._)([(0,$.e)(de,{ignoreUnknown:!1})],be.prototype,"timeNeutralAttributeName",void 0),(0,i._)([(0,g.M)({type:String})],be.prototype,"trafficSupport",void 0),(0,i._)([(0,$.e)(H)],be.prototype,"units",void 0),(0,i._)([(0,$.e)(ve)],be.prototype,"usageType",void 0),be=(0,i._)([(0,T.$)("esri.rest.support.NetworkAttribute")],be);const Te=be;let we=class extends F.oY{constructor(e){super(e),this.buildTime=null,this.name=null,this.networkAttributes=null,this.networkSources=null,this.state=null}};(0,i._)([(0,g.M)({type:Number})],we.prototype,"buildTime",void 0),(0,i._)([(0,g.M)({type:String})],we.prototype,"name",void 0),(0,i._)([(0,g.M)({type:[Te]})],we.prototype,"networkAttributes",void 0),(0,i._)([(0,g.M)()],we.prototype,"networkSources",void 0),(0,i._)([(0,g.M)({type:String})],we.prototype,"state",void 0),we=(0,i._)([(0,T.$)("esri.rest.support.NetworkDataset")],we);const Se=we;var _e=r(69540);let Me=class extends((0,_e.O)(F.oY)){constructor(e){super(e),this.attributeParameterValues=null,this.description=null,this.distanceAttributeName=null,this.id=null,this.impedanceAttributeName=null,this.name=null,this.restrictionAttributeNames=null,this.simplificationTolerance=null,this.simplificationToleranceUnits=null,this.timeAttributeName=null,this.type=null,this.useHierarchy=null,this.uturnAtJunctions=null}readId(e,t){return t.id??t.itemId??null}readRestrictionAttributes(e,t){const{restrictionAttributeNames:r}=t;return null==r?null:r.map((e=>me.fromJSON(e)))}writeRestrictionAttributes(e,t,r){null!=e&&(t[r]=e.map((e=>me.toJSON(e))))}};(0,i._)([(0,g.M)({type:[Object],json:{write:!0}})],Me.prototype,"attributeParameterValues",void 0),(0,i._)([(0,g.M)({type:String,json:{write:!0}})],Me.prototype,"description",void 0),(0,i._)([(0,$.e)(ce,{ignoreUnknown:!1})],Me.prototype,"distanceAttributeName",void 0),(0,i._)([(0,g.M)({type:String,json:{write:!0}})],Me.prototype,"id",void 0),(0,i._)([(0,b.w)("id",["id","itemId"])],Me.prototype,"readId",null),(0,i._)([(0,$.e)(ye,{ignoreUnknown:!1})],Me.prototype,"impedanceAttributeName",void 0),(0,i._)([(0,g.M)({type:String,json:{write:!0}})],Me.prototype,"name",void 0),(0,i._)([(0,g.M)({type:[String],json:{write:!0}})],Me.prototype,"restrictionAttributeNames",void 0),(0,i._)([(0,b.w)("restrictionAttributeNames")],Me.prototype,"readRestrictionAttributes",null),(0,i._)([(0,w.K)("restrictionAttributeNames")],Me.prototype,"writeRestrictionAttributes",null),(0,i._)([(0,g.M)({type:Number,json:{write:{allowNull:!0}}})],Me.prototype,"simplificationTolerance",void 0),(0,i._)([(0,$.e)(Y)],Me.prototype,"simplificationToleranceUnits",void 0),(0,i._)([(0,$.e)(de,{ignoreUnknown:!1})],Me.prototype,"timeAttributeName",void 0),(0,i._)([(0,$.e)(te)],Me.prototype,"type",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Me.prototype,"useHierarchy",void 0),(0,i._)([(0,$.e)(ee)],Me.prototype,"uturnAtJunctions",void 0),Me=(0,i._)([(0,T.$)("esri.rest.support.TravelMode")],Me);const Ae=Me;let Ne=class extends F.oY{constructor(e){super(e),this.accumulateAttributeNames=null,this.attributeParameterValues=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}readAccumulateAttributes(e){return null==e?null:e.map((e=>ye.fromJSON(e)))}writeAccumulateAttributes(e,t,r){e?.length&&(t[r]=e.map((e=>ye.toJSON(e))))}get capabilities(){return{supportsNow:(this.currentVersion??10)>=10.81}}readDefaultTravelMode(e,t){const r=t.supportedTravelModes?.find((({id:e})=>e===t.defaultTravelMode))??t.supportedTravelModes?.find((({itemId:e})=>e===t.defaultTravelMode));return r?Ae.fromJSON(r):null}};(0,i._)([(0,g.M)()],Ne.prototype,"accumulateAttributeNames",void 0),(0,i._)([(0,b.w)("accumulateAttributeNames")],Ne.prototype,"readAccumulateAttributes",null),(0,i._)([(0,w.K)("accumulateAttributeNames")],Ne.prototype,"writeAccumulateAttributes",null),(0,i._)([(0,g.M)()],Ne.prototype,"attributeParameterValues",void 0),(0,i._)([(0,g.M)()],Ne.prototype,"capabilities",null),(0,i._)([(0,g.M)()],Ne.prototype,"currentVersion",void 0),(0,i._)([(0,g.M)()],Ne.prototype,"defaultTravelMode",void 0),(0,i._)([(0,b.w)("defaultTravelMode",["defaultTravelMode","supportedTravelModes"])],Ne.prototype,"readDefaultTravelMode",null),(0,i._)([(0,g.M)()],Ne.prototype,"directionsLanguage",void 0),(0,i._)([(0,$.e)(Z)],Ne.prototype,"directionsLengthUnits",void 0),(0,i._)([(0,g.M)()],Ne.prototype,"directionsSupportedLanguages",void 0),(0,i._)([(0,$.e)(de,{ignoreUnknown:!1})],Ne.prototype,"directionsTimeAttribute",void 0),(0,i._)([(0,g.M)()],Ne.prototype,"hasZ",void 0),(0,i._)([(0,$.e)(ye,{ignoreUnknown:!1})],Ne.prototype,"impedance",void 0),(0,i._)([(0,g.M)({type:Se})],Ne.prototype,"networkDataset",void 0),(0,i._)([(0,g.M)({type:[Ae]})],Ne.prototype,"supportedTravelModes",void 0),Ne=(0,i._)([(0,T.$)("esri.rest.support.NetworkServiceDescription")],Ne);const Oe=Ne;function Ie(e,t,r,i){i[r]=[t.length,t.length+e.length],e.forEach((e=>{t.push(e.geometry)}))}async function De(e,t,r){if(!e)throw new c.A("network-service:missing-url","Url to Network service is missing");const i=(0,q.jV)({f:"json",token:t},r),{data:o}=await(0,W.A)(e,i),s=o.currentVersion>=10.4?async function(e,t,r){try{const i=(0,q.jV)({f:"json",token:t},r),o=(0,v.UC)(e)+"/retrieveTravelModes",{data:{supportedTravelModes:s,defaultTravelMode:n}}=await(0,W.A)(o,i);return{supportedTravelModes:s,defaultTravelMode:n}}catch(e){throw new c.A("network-service:retrieveTravelModes","Could not get to the NAServer's retrieveTravelModes.",{error:e})}}(e,t,r):async function(e,t){const r=(0,q.jV)({f:"json"},t),{data:i}=await(0,W.A)(e.replace(/\/rest\/.*$/i,"/info"),r);if(!i?.owningSystemUrl)return{supportedTravelModes:[],defaultTravelMode:null};const{owningSystemUrl:o}=i,s=(0,v.UC)(o)+"/sharing/rest/portals/self",{data:n}=await(0,W.A)(s,r),a=(0,y.wc)("helperServices.routingUtilities.url",n);if(!a)return{supportedTravelModes:[],defaultTravelMode:null};const l=(0,q.Dl)(o),u=/\/solve$/i.test(l.path)?"Route":/\/solveclosestfacility$/i.test(l.path)?"ClosestFacility":"ServiceAreas",p=(0,q.jV)({f:"json",serviceName:u},t),c=(0,v.UC)(a)+"/GetTravelModes/execute",d=await(0,W.A)(c,p),m=[];let h=null;if(d?.data?.results?.length){const e=d.data.results;for(const t of e)if("supportedTravelModes"===t.paramName){if(t.value?.features)for(const{attributes:e}of t.value.features)if(e){const t=JSON.parse(e.TravelMode);m.push(t)}}else"defaultTravelMode"===t.paramName&&(h=t.value)}return{supportedTravelModes:m,defaultTravelMode:h}}(e,r),{defaultTravelMode:n,supportedTravelModes:a}=await s;return o.defaultTravelMode=n,o.supportedTravelModes=a,Oe.fromJSON(o)}var Ce=r(16649),Le=r(17136);function je(e,t){if(null==e)return null;const r={},i=new RegExp(`^${t}`,"i");for(const o of Object.keys(e))if(i.test(o)){const i=o.slice(t.length);r[ye.fromJSON(i)]=e[o]}return r}function Fe(e,t,r){if(null!=e){t.attributes||(t.attributes={});for(const i in e){const o=ye.toJSON(i);t.attributes[`${r}${o}`]=e[i]}}}function Be(e){const t={};for(const r of Object.keys(e)){const i=r;t[ye.fromJSON(i)]=e[r]}return t}function Pe(e){const t={};for(const r of Object.keys(e)){const i=r;t[ye.toJSON(i)]=e[r]}return t}function Re(e,t){return null==e||null==t?null:Math.round((e-t)/6e4)}function Ee(e){const t=e.toJSON(),r=t;return r.accumulateAttributeNames&&=t.accumulateAttributeNames?.join(),r.attributeParameterValues&&=JSON.stringify(t.attributeParameterValues),r.barriers&&=JSON.stringify(t.barriers),r.outSR&&=t.outSR?.wkid,r.overrides&&=JSON.stringify(t.overrides),r.polygonBarriers&&=JSON.stringify(t.polygonBarriers),r.polylineBarriers&&=JSON.stringify(t.polylineBarriers),r.restrictionAttributeNames&&=t.restrictionAttributeNames?.join(),r.stops&&=JSON.stringify(t.stops),r.travelMode&&=JSON.stringify(t.travelMode),r}var xe=r(22671),Ue=r(4576);const Je=new z.J({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let ke=class extends F.oY{constructor(e){super(e),this.description=null,this.type=null}};(0,i._)([(0,g.M)({type:String,json:{write:!0}})],ke.prototype,"description",void 0),(0,i._)([(0,g.M)({type:String,json:{read:Je.read,write:Je.write}})],ke.prototype,"type",void 0),ke=(0,i._)([(0,T.$)("esri.rest.support.GPMessage")],ke);const Ge=ke,Ve=new z.J({0:"informative",1:"process-definition",2:"process-start",3:"process-stop",50:"warning",100:"error",101:"empty",200:"abort"});let We=class extends Ge{constructor(e){super(e),this.type=null}};(0,i._)([(0,g.M)({type:String,json:{read:Ve.read,write:Ve.write}})],We.prototype,"type",void 0),We=(0,i._)([(0,T.$)("esri.rest.support.NAMessage")],We);const qe=We;let $e=class extends F.oY{constructor(e){super(e)}};(0,i._)([(0,g.M)({json:{read:{source:"string"}}})],$e.prototype,"text",void 0),(0,i._)([(0,$.e)(ge,{name:"stringType"})],$e.prototype,"type",void 0),$e=(0,i._)([(0,T.$)("esri.rest.support.DirectionsString")],$e);const ze=$e;var Ke=r(86738);let Ye=class extends F.oY{constructor(e){super(e),this.arriveTime=null,this.arriveTimeOffset=null,this.geometry=null,this.strings=null}readArriveTimeOffset(e,t){return Re(t.ETA,t.arriveTimeUTC)}readGeometry(e,t){return Ke.A.fromJSON(t.point)}};(0,i._)([(0,g.M)({type:Date,json:{read:{source:"arriveTimeUTC"}}})],Ye.prototype,"arriveTime",void 0),(0,i._)([(0,g.M)()],Ye.prototype,"arriveTimeOffset",void 0),(0,i._)([(0,b.w)("arriveTimeOffset",["arriveTimeUTC","ETA"])],Ye.prototype,"readArriveTimeOffset",null),(0,i._)([(0,g.M)({type:Ke.A})],Ye.prototype,"geometry",void 0),(0,i._)([(0,b.w)("geometry",["point"])],Ye.prototype,"readGeometry",null),(0,i._)([(0,g.M)({type:[ze]})],Ye.prototype,"strings",void 0),Ye=(0,i._)([(0,T.$)("esri.rest.support.DirectionsEvent")],Ye);const Ze=Ye;var He=r(82799);let Xe=class extends n.A{constructor(e){super(e),this.events=null,this.geometry=null,this.strings=null}readGeometry(e,t){const r=function(e){if(null==e||""===e)return null;let t=0,r=0,i=0,o=0;const s=[];let n,a,l,u,p,c,d,y,m=0,h=0,f=0;if(p=e.match(/((\+|-)[^+\-|]+|\|)/g),p||(p=[]),0===parseInt(p[m],32)){m=2;const e=parseInt(p[m],32);m++,c=parseInt(p[m],32),m++,1&e&&(h=p.indexOf("|")+1,d=parseInt(p[h],32),h++),2&e&&(f=p.indexOf("|",h)+1,y=parseInt(p[f],32),f++)}else c=parseInt(p[m],32),m++;for(;m<p.length&&"|"!==p[m];){n=parseInt(p[m],32)+t,m++,t=n,a=parseInt(p[m],32)+r,m++,r=a;const e=[n/c,a/c];h&&(u=parseInt(p[h],32)+i,h++,i=u,e.push(u/d)),f&&(l=parseInt(p[f],32)+o,f++,o=l,e.push(l/y)),s.push(e)}return{paths:[s],hasZ:h>0,hasM:f>0}}(t.compressedGeometry);return null!=r?He.A.fromJSON(r):null}};(0,i._)([(0,g.M)({type:[Ze]})],Xe.prototype,"events",void 0),(0,i._)([(0,g.M)({type:He.A})],Xe.prototype,"geometry",void 0),(0,i._)([(0,b.w)("geometry",["compressedGeometry"])],Xe.prototype,"readGeometry",null),(0,i._)([(0,g.M)({type:[ze]})],Xe.prototype,"strings",void 0),Xe=(0,i._)([(0,T.$)("esri.rest.support.DirectionsFeature")],Xe);const Qe=Xe;var et=r(16930);let tt=class extends xe.A{constructor(e){super(e),this.extent=null,this.features=[],this.geometryType="polyline",this.routeId=null,this.routeName=null,this.totalDriveTime=null,this.totalLength=null,this.totalTime=null}readFeatures(e,t){if(!e)return[];const r=t.summary.envelope.spatialReference??t.spatialReference,i=r&&et.A.fromJSON(r);return e.map((e=>{const t=Qe.fromJSON(e);if(null!=t.geometry&&(t.geometry.spatialReference=i),null!=t.events)for(const e of t.events)null!=e.geometry&&(e.geometry.spatialReference=i);return t}))}get mergedGeometry(){return this.features?function(e,t){if(0===e.length)return new He.A({spatialReference:t});const r=[];for(const t of e)for(const e of t.paths)r.push(...e);const i=[];r.forEach(((e,t)=>{0!==t&&e[0]===r[t-1][0]&&e[1]===r[t-1][1]||i.push(e)}));const{hasM:o,hasZ:s}=e[0];return new He.A({hasM:o,hasZ:s,paths:[i],spatialReference:t})}(this.features.map((({geometry:e})=>e)),this.extent.spatialReference):null}get strings(){return this.features.flatMap((({strings:e})=>e)).filter(Ue.Ru)}};(0,i._)([(0,g.M)({type:_.A,json:{read:{source:"summary.envelope"}}})],tt.prototype,"extent",void 0),(0,i._)([(0,g.M)({nonNullable:!0})],tt.prototype,"features",void 0),(0,i._)([(0,b.w)("features")],tt.prototype,"readFeatures",null),(0,i._)([(0,g.M)()],tt.prototype,"geometryType",void 0),(0,i._)([(0,g.M)({readOnly:!0})],tt.prototype,"mergedGeometry",null),(0,i._)([(0,g.M)()],tt.prototype,"routeId",void 0),(0,i._)([(0,g.M)()],tt.prototype,"routeName",void 0),(0,i._)([(0,g.M)({value:null,readOnly:!0})],tt.prototype,"strings",null),(0,i._)([(0,g.M)({json:{read:{source:"summary.totalDriveTime"}}})],tt.prototype,"totalDriveTime",void 0),(0,i._)([(0,g.M)({json:{read:{source:"summary.totalLength"}}})],tt.prototype,"totalLength",void 0),(0,i._)([(0,g.M)({json:{read:{source:"summary.totalTime"}}})],tt.prototype,"totalTime",void 0),tt=(0,i._)([(0,T.$)("esri.rest.support.DirectionsFeatureSet")],tt);const rt=tt;let it=class extends F.oY{constructor(e){super(e),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}};(0,i._)([(0,g.M)({type:xe.A,json:{write:!0}})],it.prototype,"directionLines",void 0),(0,i._)([(0,g.M)({type:xe.A,json:{write:!0}})],it.prototype,"directionPoints",void 0),(0,i._)([(0,g.M)({type:rt,json:{write:!0}})],it.prototype,"directions",void 0),(0,i._)([(0,g.M)({type:n.A,json:{write:!0}})],it.prototype,"route",void 0),(0,i._)([(0,g.M)({type:String,json:{write:!0}})],it.prototype,"routeName",void 0),(0,i._)([(0,g.M)({type:[n.A],json:{write:!0}})],it.prototype,"stops",void 0),(0,i._)([(0,g.M)({type:xe.A,json:{write:!0}})],it.prototype,"traversedEdges",void 0),(0,i._)([(0,g.M)({type:xe.A,json:{write:!0}})],it.prototype,"traversedJunctions",void 0),(0,i._)([(0,g.M)({type:xe.A,json:{write:!0}})],it.prototype,"traversedTurns",void 0),it=(0,i._)([(0,T.$)("esri.rest.support.RouteResult")],it);const ot=it;function st(e){return e?xe.A.fromJSON(e).features.filter(Ue.Ru):[]}let nt=class extends F.oY{constructor(e){super(e),this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.routeResults=null}readPointBarriers(e,t){return st(t.barriers)}readPolylineBarriers(e){return st(e)}readPolygonBarriers(e){return st(e)}};(0,i._)([(0,g.M)({type:[qe]})],nt.prototype,"messages",void 0),(0,i._)([(0,g.M)({type:[n.A]})],nt.prototype,"pointBarriers",void 0),(0,i._)([(0,b.w)("pointBarriers",["barriers"])],nt.prototype,"readPointBarriers",null),(0,i._)([(0,g.M)({type:[n.A]})],nt.prototype,"polylineBarriers",void 0),(0,i._)([(0,b.w)("polylineBarriers")],nt.prototype,"readPolylineBarriers",null),(0,i._)([(0,g.M)({type:[n.A]})],nt.prototype,"polygonBarriers",void 0),(0,i._)([(0,b.w)("polygonBarriers")],nt.prototype,"readPolygonBarriers",null),(0,i._)([(0,g.M)({type:[ot]})],nt.prototype,"routeResults",void 0),nt=(0,i._)([(0,T.$)("esri.rest.support.RouteSolveResult")],nt);const at=nt;function lt(e){return e instanceof xe.A}async function ut(e,t,r){const i=[],o=[],s={},n={},a=(0,q.Dl)(e),{path:l}=a;lt(t.stops)&&Ie(t.stops.features,o,"stops.features",s),lt(t.pointBarriers)&&Ie(t.pointBarriers.features,o,"pointBarriers.features",s),lt(t.polylineBarriers)&&Ie(t.polylineBarriers.features,o,"polylineBarriers.features",s),lt(t.polygonBarriers)&&Ie(t.polygonBarriers.features,o,"polygonBarriers.features",s);const p=await(0,Le.el)(o);for(const e in s){const t=s[e];i.push(e),n[e]=p.slice(t[0],t[1])}if(function(e,t){for(let r=0;r<t.length;r++){const i=e[t[r]];if(i&&i.length)for(const e of i)if(null!=e&&e.hasZ)return!0}return!1}(n,i)){let e=null;try{e=await De(l,t.apiKey,r)}catch{}e&&!e.hasZ&&function(e,t){for(let r=0;r<t.length;r++){const i=e[t[r]];if(i&&i.length)for(const e of i)e.z=void 0}u.A.getLogger("esri.rest.networkService").warnOnce("The remote Network Analysis service is powered by a network dataset which is not Z-aware.\nZ-coordinates of the input geometry are ignored.")}(n,i)}for(const e in n)n[e].forEach(((r,i)=>{(0,Ce.Jt)(t,e)[i].geometry=r}));const c={...r,query:{...a.query,...Ee(t),f:"json"}},d=l.endsWith("/solve")?l:`${l}/solve`,{data:y}=await(0,W.A)(d,c);return function(e){const{barriers:t,directionLines:r,directionPoints:i,directions:o,messages:s,polygonBarriers:n,polylineBarriers:a,routes:l,stops:u,traversedEdges:p,traversedJunctions:c,traversedTurns:d}=e,y=e=>{const t=h.find((t=>t.routeName===e));if(null!=t)return t;const r={routeId:h.length+1,routeName:e};return h.push(r),r},m=e=>{const t=h.find((t=>t.routeId===e));if(null!=t)return t;const r={routeId:e,routeName:null};return h.push(r),r},h=[];l?.features.forEach(((e,t)=>{e.geometry.spatialReference=l.spatialReference??void 0;const r=e.attributes.Name,i=t+1;h.push({routeId:i,routeName:r,route:e})})),o?.forEach((e=>{const{routeName:t}=e;y(t).directions=e}));const f=u?.features.every((e=>null==e.attributes.RouteName))&&h.length>0?h[0].routeName:null;return u?.features.forEach((e=>{e.geometry&&(e.geometry.spatialReference??=u.spatialReference??void 0);const t=f??e.attributes.RouteName,r=y(t);r.stops??=[],r.stops.push(e)})),r?.features.forEach((e=>{const t=e.attributes.RouteID,i=m(t),{geometryType:o,spatialReference:s}=r;i.directionLines??={features:[],geometryType:o,spatialReference:s},i.directionLines.features.push(e)})),i?.features.forEach((e=>{const t=e.attributes.RouteID,r=m(t),{geometryType:o,spatialReference:s}=i;r.directionPoints??={features:[],geometryType:o,spatialReference:s},r.directionPoints.features.push(e)})),p?.features.forEach((e=>{const t=e.attributes.RouteID,r=m(t),{geometryType:i,spatialReference:o}=p;r.traversedEdges??={features:[],geometryType:i,spatialReference:o},r.traversedEdges.features.push(e)})),c?.features.forEach((e=>{const t=e.attributes.RouteID,r=m(t),{geometryType:i,spatialReference:o}=c;r.traversedJunctions??={features:[],geometryType:i,spatialReference:o},r.traversedJunctions.features.push(e)})),d?.features.forEach((e=>{const t=e.attributes.RouteID,r=m(t);r.traversedTurns??={features:[]},r.traversedTurns.features.push(e)})),at.fromJSON({routeResults:h,barriers:t,polygonBarriers:n,polylineBarriers:a,messages:s})}(y)}var pt;let ct=pt=class extends((0,_e.O)(F.oY)){constructor(e){super(e),this.directionLineType=null,this.directionPointId=null,this.distance=null,this.duration=null,this.fromLevel=null,this.geometry=null,this.objectId=null,this.popupTemplate=null,this.symbol=null,this.toLevel=null,this.type="direction-line"}static fromGraphic(e){return new pt({directionLineType:ue.fromJSON(e.attributes.DirectionLineType),directionPointId:e.attributes.DirectionPointID,distance:e.attributes.Meters,duration:e.attributes.Minutes,fromLevel:e.attributes.FromLevel??null,geometry:e.geometry,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,symbol:e.symbol,toLevel:e.attributes.ToLevel??null})}toGraphic(){const e={ObjectID:this.objectId,DirectionLineType:null!=this.directionLineType?ue.toJSON(this.directionLineType):null,DirectionPointID:this.directionPointId,Meters:this.distance,Minutes:this.duration};return null!=this.fromLevel&&(e.FromLevel=this.fromLevel),null!=this.toLevel&&(e.ToLevel=this.toLevel),new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};ct.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"DirectionLineType",alias:"Line Type",type:"esriFieldTypeInteger"},{name:"DirectionPointID",alias:"Direction Point ID",type:"esriFieldTypeInteger"},{name:"FromLevel",alias:"From Level",type:"esriFieldTypeInteger"},{name:"Meters",alias:"Meters",type:"esriFieldTypeDouble"},{name:"Minutes",alias:"Minutes",type:"esriFieldTypeDouble"},{name:"ToLevel",alias:"To Level",type:"esriFieldTypeInteger"}],(0,i._)([(0,g.M)({type:ue.apiValues,json:{read:{source:"attributes.DirectionLineType",reader:ue.read}}})],ct.prototype,"directionLineType",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.DirectionPointID"}}})],ct.prototype,"directionPointId",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.Meters"}}})],ct.prototype,"distance",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.Minutes"}}})],ct.prototype,"duration",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.FromLevel"}}})],ct.prototype,"fromLevel",void 0),(0,i._)([(0,g.M)({type:He.A})],ct.prototype,"geometry",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.ObjectID"}}})],ct.prototype,"objectId",void 0),(0,i._)([(0,g.M)({type:a.A})],ct.prototype,"popupTemplate",void 0),(0,i._)([(0,g.M)({types:j.Es})],ct.prototype,"symbol",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.ToLevel"}}})],ct.prototype,"toLevel",void 0),(0,i._)([(0,g.M)({readOnly:!0,json:{read:!1}})],ct.prototype,"type",void 0),ct=pt=(0,i._)([(0,T.$)("esri.rest.support.DirectionLine")],ct);const dt=ct;var yt;let mt=yt=class extends((0,_e.O)(F.oY)){constructor(e){super(e),this.alternateName=null,this.arrivalTime=null,this.arrivalTimeOffset=null,this.azimuth=null,this.branchName=null,this.directionPointType=null,this.displayText=null,this.exitName=null,this.geometry=null,this.intersectingName=null,this.level=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.sequence=null,this.shortVoiceInstruction=null,this.stopId=null,this.symbol=null,this.towardName=null,this.type="direction-point",this.voiceInstruction=null}readArrivalTime(e,t){return null!=t.attributes.ArrivalTime?new Date(t.attributes.ArrivalTime):null}static fromGraphic(e){return new yt({alternateName:e.attributes.AlternateName??null,arrivalTime:null!=e.attributes.ArrivalTime?new Date(e.attributes.ArrivalTime):null,arrivalTimeOffset:e.attributes.ArrivalUTCOffset??null,azimuth:e.attributes.Azimuth??null,branchName:e.attributes.BranchName??null,directionPointType:le.fromJSON(e.attributes.DirectionPointType),displayText:e.attributes.DisplayText??null,exitName:e.attributes.ExitName??null,geometry:e.geometry,intersectingName:e.attributes.IntersectingName??null,level:e.attributes.Level??null,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,sequence:e.attributes.Sequence,shortVoiceInstruction:e.attributes.ShortVoiceInstruction??null,stopId:e.attributes.StopID??null,symbol:e.symbol,towardName:e.attributes.TowardName??null,voiceInstruction:e.attributes.VoiceInstruction??null})}toGraphic(){const e={ObjectID:this.objectId,DirectionPointType:null!=this.directionPointType?le.toJSON(this.directionPointType):null,Sequence:this.sequence,StopID:this.stopId};return null!=this.alternateName&&(e.AlternateName=this.alternateName),null!=this.arrivalTime&&(e.ArrivalTime=this.arrivalTime.getTime()),null!=this.arrivalTimeOffset&&(e.ArrivalUTCOffset=this.arrivalTimeOffset),null!=this.azimuth&&(e.Azimuth=this.azimuth),null!=this.branchName&&(e.BranchName=this.branchName),null!=this.displayText&&(e.DisplayText=this.displayText),null!=this.exitName&&(e.ExitName=this.exitName),null!=this.intersectingName&&(e.IntersectingName=this.intersectingName),null!=this.level&&(e.Level=this.level),null!=this.name&&(e.Name=this.name),null!=this.shortVoiceInstruction&&(e.ShortVoiceInstruction=this.shortVoiceInstruction),null!=this.towardName&&(e.TowardName=this.towardName),null!=this.voiceInstruction&&(e.VoiceInstruction=this.voiceInstruction),new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};mt.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"AlternateName",alias:"Alternative Name",type:"esriFieldTypeString"},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate"},{name:"ArrivalUTCOffset",alias:"Arrival Time Offset",type:"esriFieldTypeInteger"},{name:"Azimuth",alias:"Azimuth",type:"esriFieldTypeDouble"},{name:"BranchName",alias:"Branch Name",type:"esriFieldTypeString"},{name:"DirectionPointType",alias:"Directions Point Type",type:"esriFieldTypeInteger"},{name:"DisplayText",alias:"Display Text",type:"esriFieldTypeString"},{name:"ExitName",alias:"Exit Name",type:"esriFieldTypeString"},{name:"IntersectingName",alias:"Intersecting Name",type:"esriFieldTypeString"},{name:"Level",alias:"Level",type:"esriFieldTypeInteger"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger"},{name:"ShortVoiceInstruction",alias:"Short Voice Instruction",type:"esriFieldTypeString"},{name:"StopID",alias:"Stop ID",type:"esriFieldTypeInteger"},{name:"TowardName",alias:"Toward Name",type:"esriFieldTypeString"},{name:"VoiceInstruction",alias:"Voice Instruction",type:"esriFieldTypeString"}],(0,i._)([(0,g.M)({json:{read:{source:"attributes.AlternateName"}}})],mt.prototype,"alternateName",void 0),(0,i._)([(0,g.M)()],mt.prototype,"arrivalTime",void 0),(0,i._)([(0,b.w)("arrivalTime",["attributes.ArrivalTime"])],mt.prototype,"readArrivalTime",null),(0,i._)([(0,g.M)({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],mt.prototype,"arrivalTimeOffset",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.Azimuth"}}})],mt.prototype,"azimuth",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.BranchName"}}})],mt.prototype,"branchName",void 0),(0,i._)([(0,g.M)({type:le.apiValues,json:{read:{source:"attributes.DirectionPointType",reader:le.read}}})],mt.prototype,"directionPointType",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.DisplayText"}}})],mt.prototype,"displayText",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.ExitName"}}})],mt.prototype,"exitName",void 0),(0,i._)([(0,g.M)({type:Ke.A})],mt.prototype,"geometry",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.IntersectingName"}}})],mt.prototype,"intersectingName",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.Level"}}})],mt.prototype,"level",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.Name"}}})],mt.prototype,"name",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.ObjectID"}}})],mt.prototype,"objectId",void 0),(0,i._)([(0,g.M)({type:a.A})],mt.prototype,"popupTemplate",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.Sequence"}}})],mt.prototype,"sequence",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.ShortVoiceInstruction"}}})],mt.prototype,"shortVoiceInstruction",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.StopID"}}})],mt.prototype,"stopId",void 0),(0,i._)([(0,g.M)({types:j.Es})],mt.prototype,"symbol",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.TowardName"}}})],mt.prototype,"towardName",void 0),(0,i._)([(0,g.M)({readOnly:!0,json:{read:!1}})],mt.prototype,"type",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.VoiceInstruction"}}})],mt.prototype,"voiceInstruction",void 0),mt=yt=(0,i._)([(0,T.$)("esri.rest.support.DirectionPoint")],mt);const ht=mt;var ft;let vt=ft=class extends((0,_e.O)(F.oY)){constructor(e){super(e),this.addedCost=null,this.barrierType=null,this.costs=null,this.curbApproach=null,this.fullEdge=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.sideOfEdge=null,this.sourceId=null,this.sourceOid=null,this.status=null,this.symbol=null,this.type="point-barrier"}readCosts(e,t){return je(t.attributes,"Attr_")}writeCosts(e,t){Fe(e,t,"Attr_")}static fromGraphic(e){return new ft({addedCost:e.attributes.AddedCost??null,barrierType:null!=e.attributes.BarrierType?ne.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Be(JSON.parse(e.attributes.Costs)):null,curbApproach:null!=e.attributes.CurbApproach?re.fromJSON(e.attributes.CurbApproach):null,fullEdge:null!=e.attributes.FullEdge?ae.fromJSON(e.attributes.FullEdge):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,status:null!=e.attributes.Status?oe.fromJSON(e.attributes.Status):null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,AddedCost:this.addedCost,BarrierType:null!=this.barrierType?ne.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(Pe(this.costs)):null,CurbApproach:null!=this.curbApproach?re.toJSON(this.curbApproach):null,FullEdge:null!=this.fullEdge?ae.toJSON(this.fullEdge):null,Name:this.name,Status:null!=this.status?oe.toJSON(this.status):null};return new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};vt.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"AddedCost",alias:"Added Cost",type:"esriFieldTypeDouble"},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger"},{name:"Costs",alias:"Costs",type:"esriFieldTypeString"},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger"},{name:"FullEdge",alias:"Full Edge",type:"esriFieldTypeInteger"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"Status",alias:"Status",type:"esriFieldTypeInteger"}],(0,i._)([(0,g.M)()],vt.prototype,"addedCost",void 0),(0,i._)([(0,g.M)({type:ne.apiValues,json:{name:"attributes.BarrierType",read:{reader:ne.read},write:{writer:ne.write}}})],vt.prototype,"barrierType",void 0),(0,i._)([(0,g.M)()],vt.prototype,"costs",void 0),(0,i._)([(0,b.w)("costs",["attributes"])],vt.prototype,"readCosts",null),(0,i._)([(0,w.K)("costs")],vt.prototype,"writeCosts",null),(0,i._)([(0,g.M)({constructOnly:!0,type:re.apiValues,json:{read:{source:"attributes.CurbApproach",reader:re.read}}})],vt.prototype,"curbApproach",void 0),(0,i._)([(0,g.M)({type:ae.apiValues,json:{name:"attributes.FullEdge",read:{reader:ae.read},write:{writer:ae.write}}})],vt.prototype,"fullEdge",void 0),(0,i._)([(0,g.M)({type:Ke.A,json:{write:!0}})],vt.prototype,"geometry",void 0),(0,i._)([(0,g.M)({json:{name:"attributes.Name"}})],vt.prototype,"name",void 0),(0,i._)([(0,g.M)({json:{name:"attributes.ObjectID"}})],vt.prototype,"objectId",void 0),(0,i._)([(0,g.M)({type:a.A})],vt.prototype,"popupTemplate",void 0),(0,i._)([(0,g.M)({type:se.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:se.read}}})],vt.prototype,"sideOfEdge",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.SourceID"}}})],vt.prototype,"sourceId",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.SourceOID"}}})],vt.prototype,"sourceOid",void 0),(0,i._)([(0,g.M)({type:oe.apiValues,json:{read:{source:"attributes.Status",reader:oe.read}}})],vt.prototype,"status",void 0),(0,i._)([(0,g.M)({types:j.Es})],vt.prototype,"symbol",void 0),(0,i._)([(0,g.M)({readOnly:!0,json:{read:!1}})],vt.prototype,"type",void 0),vt=ft=(0,i._)([(0,T.$)("esri.rest.support.PointBarrier")],vt);const gt=vt;var bt,Tt=r(39829);let wt=bt=class extends((0,_e.O)(F.oY)){constructor(e){super(e),this.barrierType=null,this.costs=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.scaleFactor=null,this.symbol=null,this.type="polygon-barrier"}readCosts(e,t){return je(t.attributes,"Attr_")}writeCosts(e,t){Fe(e,t,"Attr_")}static fromGraphic(e){return new bt({barrierType:null!=e.attributes.BarrierType?ne.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Be(JSON.parse(e.attributes.Costs)):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:e.attributes.ScaleFactor??null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,BarrierType:null!=this.barrierType?ne.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(Pe(this.costs)):null,Name:this.name??null,ScaleFactor:this.scaleFactor??null};return new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};wt.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger"},{name:"Costs",alias:"Costs",type:"esriFieldTypeString"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble"}],(0,i._)([(0,g.M)({type:ne.apiValues,json:{name:"attributes.BarrierType",read:{reader:ne.read},write:{writer:ne.write}}})],wt.prototype,"barrierType",void 0),(0,i._)([(0,g.M)()],wt.prototype,"costs",void 0),(0,i._)([(0,b.w)("costs",["attributes"])],wt.prototype,"readCosts",null),(0,i._)([(0,w.K)("costs")],wt.prototype,"writeCosts",null),(0,i._)([(0,g.M)({type:Tt.A,json:{write:!0}})],wt.prototype,"geometry",void 0),(0,i._)([(0,g.M)({json:{name:"attributes.Name"}})],wt.prototype,"name",void 0),(0,i._)([(0,g.M)({json:{name:"attributes.ObjectID"}})],wt.prototype,"objectId",void 0),(0,i._)([(0,g.M)({type:a.A})],wt.prototype,"popupTemplate",void 0),(0,i._)([(0,g.M)()],wt.prototype,"scaleFactor",void 0),(0,i._)([(0,g.M)({types:j.Es})],wt.prototype,"symbol",void 0),(0,i._)([(0,g.M)({readOnly:!0,json:{read:!1}})],wt.prototype,"type",void 0),wt=bt=(0,i._)([(0,T.$)("esri.rest.support.PolygonBarrier")],wt);const St=wt;var _t;let Mt=_t=class extends((0,_e.O)(F.oY)){constructor(e){super(e),this.barrierType=null,this.costs=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.scaleFactor=null,this.symbol=null,this.type="polyline-barrier"}readCosts(e,t){return je(t.attributes,"Attr_")}static fromGraphic(e){return new _t({barrierType:null!=e.attributes.BarrierType?ne.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Be(JSON.parse(e.attributes.Costs)):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:e.attributes.ScaleFactor??null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,BarrierType:null!=this.barrierType?ne.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(Pe(this.costs)):null,Name:this.name,ScaleFactor:this.scaleFactor};return new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};Mt.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger"},{name:"Costs",alias:"Costs",type:"esriFieldTypeString"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble"}],(0,i._)([(0,g.M)({type:ne.apiValues,json:{read:{source:"attributes.BarrierType",reader:ne.read}}})],Mt.prototype,"barrierType",void 0),(0,i._)([(0,g.M)()],Mt.prototype,"costs",void 0),(0,i._)([(0,b.w)("costs",["attributes"])],Mt.prototype,"readCosts",null),(0,i._)([(0,g.M)({type:He.A,json:{write:!0}})],Mt.prototype,"geometry",void 0),(0,i._)([(0,g.M)({json:{name:"attributes.Name"}})],Mt.prototype,"name",void 0),(0,i._)([(0,g.M)({json:{name:"attributes.ObjectID"}})],Mt.prototype,"objectId",void 0),(0,i._)([(0,g.M)({type:a.A})],Mt.prototype,"popupTemplate",void 0),(0,i._)([(0,g.M)()],Mt.prototype,"scaleFactor",void 0),(0,i._)([(0,g.M)({types:j.Es})],Mt.prototype,"symbol",void 0),(0,i._)([(0,g.M)({readOnly:!0,json:{read:!1}})],Mt.prototype,"type",void 0),Mt=_t=(0,i._)([(0,T.$)("esri.rest.support.PolylineBarrier")],Mt);const At=Mt;let Nt=class extends F.oY{constructor(e){super(e),this.accumulateAttributes=null,this.directionsLanguage=null,this.findBestSequence=null,this.preserveFirstStop=null,this.preserveLastStop=null,this.startTimeIsUTC=null,this.timeWindowsAreUTC=null,this.travelMode=null}readAccumulateAttributes(e){return null==e?null:e.map((e=>ye.fromJSON(e)))}writeAccumulateAttributes(e,t,r){e?.length&&(t[r]=e.map((e=>ye.toJSON(e))))}};(0,i._)([(0,g.M)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],Nt.prototype,"accumulateAttributes",void 0),(0,i._)([(0,b.w)("accumulateAttributes")],Nt.prototype,"readAccumulateAttributes",null),(0,i._)([(0,w.K)("accumulateAttributes")],Nt.prototype,"writeAccumulateAttributes",null),(0,i._)([(0,g.M)({type:String,json:{write:!0}})],Nt.prototype,"directionsLanguage",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Nt.prototype,"findBestSequence",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Nt.prototype,"preserveFirstStop",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Nt.prototype,"preserveLastStop",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Nt.prototype,"startTimeIsUTC",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Nt.prototype,"timeWindowsAreUTC",void 0),(0,i._)([(0,g.M)({type:Ae,json:{write:!0}})],Nt.prototype,"travelMode",void 0),Nt=(0,i._)([(0,T.$)("esri.rest.support.RouteSettings")],Nt);const Ot=Nt;var It;let Dt=It=class extends((0,_e.O)(F.oY)){constructor(e){super(e),this.analysisSettings=null,this.endTime=null,this.endTimeOffset=null,this.firstStopId=null,this.geometry=null,this.lastStopId=null,this.messages=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.startTime=null,this.startTimeOffset=null,this.stopCount=null,this.symbol=null,this.totalCosts=null,this.totalDistance=null,this.totalDuration=null,this.totalLateDuration=null,this.totalViolations=null,this.totalWait=null,this.totalWaitDuration=null,this.type="route-info",this.version="1.0.0"}readEndTime(e,t){return null!=t.attributes.EndTimeUTC?new Date(t.attributes.EndTimeUTC):null}readEndTimeOffset(e,t){return Re(t.attributes.EndTime,t.attributes.EndTimeUTC)}readStartTime(e,t){return null!=t.attributes.StartTimeUTC?new Date(t.attributes.StartTimeUTC):null}readStartTimeOffset(e,t){return Re(t.attributes.StartTime,t.attributes.StartTimeUTC)}readTotalCosts(e,t){return je(t.attributes,"Total_")}readTotalViolations(e,t){return je(t.attributes,"TotalViolation_")}readTotalWait(e,t){return je(t.attributes,"TotalWait_")}static fromGraphic(e){return new It({analysisSettings:null!=e.attributes.AnalysisSettings?Ot.fromJSON(JSON.parse(e.attributes.AnalysisSettings)):null,endTime:null!=e.attributes.EndTime?new Date(e.attributes.EndTime):null,endTimeOffset:e.attributes.EndUTCOffset??null,geometry:e.geometry,messages:null!=e.attributes.Messages?JSON.parse(e.attributes.Messages):null,name:e.attributes.RouteName,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,startTime:null!=e.attributes.StartTime?new Date(e.attributes.StartTime):null,startTimeOffset:e.attributes.StartUTCOffset??null,symbol:e.symbol,totalCosts:null!=e.attributes.TotalCosts?Be(JSON.parse(e.attributes.TotalCosts)):null,totalDistance:e.attributes.TotalMeters??null,totalDuration:e.attributes.TotalMinutes??null,totalLateDuration:e.attributes.TotalLateMinutes??null,totalWaitDuration:e.attributes.TotalWaitMinutes??null,version:e.attributes.Version})}toGraphic(){const e={ObjectID:this.objectId,AnalysisSettings:null!=this.analysisSettings?JSON.stringify(this.analysisSettings.toJSON()):null,EndTime:null!=this.endTime?this.endTime.getTime():null,EndUTCOffset:this.endTimeOffset,Messages:null!=this.messages?JSON.stringify(this.messages):null,RouteName:this.name,StartTime:null!=this.startTime?this.startTime.getTime():null,StartUTCOffset:this.startTimeOffset,TotalCosts:null!=this.totalCosts?JSON.stringify(Pe(this.totalCosts)):null,TotalLateMinutes:this.totalLateDuration,TotalMeters:this.totalDistance,TotalMinutes:this.totalDuration,TotalWaitMinutes:this.totalWaitDuration,Version:this.version};return new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};Dt.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"AnalysisSettings",alias:"Analysis Settings",type:"esriFieldTypeString"},{name:"EndTime",alias:"End Time",type:"esriFieldTypeDate"},{name:"EndUTCOffset",alias:"End Time Offset",type:"esriFieldTypeInteger"},{name:"Messages",alias:"Messages",type:"esriFieldTypeString"},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString"},{name:"StartTime",alias:"Start Time",type:"esriFieldTypeDate"},{name:"StartUTCOffset",alias:"Start Time Offset",type:"esriFieldTypeInteger"},{name:"TotalCosts",alias:"Total Costs",type:"esriFieldTypeString"},{name:"TotalLateMinutes",alias:"Total Late Minutes",type:"esriFieldTypeDouble"},{name:"TotalMeters",alias:"Total Meters",type:"esriFieldTypeDouble"},{name:"TotalMinutes",alias:"Total Minutes",type:"esriFieldTypeDouble"},{name:"TotalWaitMinutes",alias:"Total Wait Minutes",type:"esriFieldTypeDouble"},{name:"Version",alias:"Version",type:"esriFieldTypeString"}],(0,i._)([(0,g.M)()],Dt.prototype,"analysisSettings",void 0),(0,i._)([(0,g.M)()],Dt.prototype,"endTime",void 0),(0,i._)([(0,b.w)("endTime",["attributes.EndTimeUTC"])],Dt.prototype,"readEndTime",null),(0,i._)([(0,g.M)()],Dt.prototype,"endTimeOffset",void 0),(0,i._)([(0,b.w)("endTimeOffset",["attributes.EndTime","attributes.EndTimeUTC"])],Dt.prototype,"readEndTimeOffset",null),(0,i._)([(0,g.M)({json:{read:{source:"attributes.FirstStopID"}}})],Dt.prototype,"firstStopId",void 0),(0,i._)([(0,g.M)({type:He.A})],Dt.prototype,"geometry",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.LastStopID"}}})],Dt.prototype,"lastStopId",void 0),(0,i._)([(0,g.M)()],Dt.prototype,"messages",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.Name"}}})],Dt.prototype,"name",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.ObjectID"}}})],Dt.prototype,"objectId",void 0),(0,i._)([(0,g.M)({type:a.A})],Dt.prototype,"popupTemplate",void 0),(0,i._)([(0,g.M)()],Dt.prototype,"startTime",void 0),(0,i._)([(0,b.w)("startTime",["attributes.StartTimeUTC"])],Dt.prototype,"readStartTime",null),(0,i._)([(0,g.M)()],Dt.prototype,"startTimeOffset",void 0),(0,i._)([(0,b.w)("startTimeOffset",["attributes.StartTime","attributes.StartTimeUTC"])],Dt.prototype,"readStartTimeOffset",null),(0,i._)([(0,g.M)({json:{read:{source:"attributes.StopCount"}}})],Dt.prototype,"stopCount",void 0),(0,i._)([(0,g.M)({types:j.Es})],Dt.prototype,"symbol",void 0),(0,i._)([(0,g.M)()],Dt.prototype,"totalCosts",void 0),(0,i._)([(0,b.w)("totalCosts",["attributes"])],Dt.prototype,"readTotalCosts",null),(0,i._)([(0,g.M)()],Dt.prototype,"totalDistance",void 0),(0,i._)([(0,g.M)()],Dt.prototype,"totalDuration",void 0),(0,i._)([(0,g.M)()],Dt.prototype,"totalLateDuration",void 0),(0,i._)([(0,g.M)()],Dt.prototype,"totalViolations",void 0),(0,i._)([(0,b.w)("totalViolations",["attributes"])],Dt.prototype,"readTotalViolations",null),(0,i._)([(0,g.M)()],Dt.prototype,"totalWait",void 0),(0,i._)([(0,b.w)("totalWait",["attributes"])],Dt.prototype,"readTotalWait",null),(0,i._)([(0,g.M)()],Dt.prototype,"totalWaitDuration",void 0),(0,i._)([(0,g.M)({readOnly:!0,json:{read:!1}})],Dt.prototype,"type",void 0),(0,i._)([(0,g.M)()],Dt.prototype,"version",void 0),Dt=It=(0,i._)([(0,T.$)("esri.rest.support.RouteInfo")],Dt);const Ct=Dt;var Lt=r(56507);const jt={type:String,json:{read:{source:"token"},write:{target:"token"}}};var Ft=r(65864);let Bt=class extends((0,_e.O)(F.oY)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.geometry=null,this.geometryType=null,this.name=null,this.spatialRelationship=null,this.type="layer",this.where=null}};(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Bt.prototype,"doNotLocateOnRestrictedElements",void 0),(0,i._)([(0,g.M)({types:s.yR,json:{read:Ft.rS,write:!0}})],Bt.prototype,"geometry",void 0),(0,i._)([(0,$.e)(fe)],Bt.prototype,"geometryType",void 0),(0,i._)([(0,g.M)({type:String,json:{name:"layerName",write:!0}})],Bt.prototype,"name",void 0),(0,i._)([(0,$.e)(he,{name:"spatialRel"})],Bt.prototype,"spatialRelationship",void 0),(0,i._)([(0,g.M)({type:String,json:{write:!0}})],Bt.prototype,"type",void 0),(0,i._)([(0,g.M)({type:String,json:{write:!0}})],Bt.prototype,"where",void 0),Bt=(0,i._)([(0,T.$)("esri.rest.support.DataLayer")],Bt);const Pt=Bt;var Rt;let Et=Rt=class extends xe.A{constructor(e){super(e),this.doNotLocateOnRestrictedElements=null}clone(){return new Rt({doNotLocateOnRestrictedElements:this.doNotLocateOnRestrictedElements,...this.cloneProperties()})}};(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Et.prototype,"doNotLocateOnRestrictedElements",void 0),Et=Rt=(0,i._)([(0,T.$)("esri.rest.support.NetworkFeatureSet")],Et);const xt=Et;let Ut=class extends((0,_e.O)(F.oY)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.url=null}};(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Ut.prototype,"doNotLocateOnRestrictedElements",void 0),(0,i._)([(0,g.M)({type:String,json:{write:!0}})],Ut.prototype,"url",void 0),Ut=(0,i._)([(0,T.$)("esri.rest.support.NetworkUrl")],Ut);const Jt=Ut;var kt;let Gt=kt=class extends((0,_e.O)(F.oY)){constructor(e){super(e),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=!1,this.returnDirections=!1,this.returnPolygonBarriers=!1,this.returnPolylineBarriers=!1,this.returnRoutes=!0,this.returnStops=!1,this.returnTraversedEdges=null,this.returnTraversedJunctions=null,this.returnTraversedTurns=null,this.returnZ=!0,this.startTime=null,this.startTimeIsUTC=!0,this.stops=null,this.timeWindowsAreUTC=null,this.travelMode=null,this.useHierarchy=null,this.useTimeWindows=null}static from(e){return(0,Lt.PZ)(kt,e)}readAccumulateAttributes(e){return null==e?null:e.map((e=>ye.fromJSON(e)))}writeAccumulateAttributes(e,t,r){e?.length&&(t[r]=e.map((e=>ye.toJSON(e))))}writePointBarriers(e,t,r){Wt(e,t,r)}writePolygonBarrier(e,t,r){Wt(e,t,r)}writePolylineBarrier(e,t,r){Wt(e,t,r)}readRestrictionAttributes(e){return null==e?null:e.map((e=>me.fromJSON(e)))}writeRestrictionAttributes(e,t,r){e?.length&&(t[r]=e.map((e=>me.toJSON(e))))}readStartTime(e,t){const{startTime:r}=t;return null==r?null:"now"===r?"now":new Date(r)}writeStartTime(e,t){null!=e&&(t.startTime="now"===e?"now":e.getTime())}readStops(e,t){return function(e){return function(e){return e&&"type"in e}(e)?Pt.fromJSON(e):function(e){return e&&"url"in e}(e)?Jt.fromJSON(e):function(e){return e&&"features"in e&&"doNotLocateOnRestrictedElements"in e}(e)?xt.fromJSON(e):function(e){return e&&"features"in e}(e)?xe.A.fromJSON(e):null}(t.stops)}writeStops(e,t,r){Wt(e,t,r)}};(0,i._)([(0,g.M)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],Gt.prototype,"accumulateAttributes",void 0),(0,i._)([(0,b.w)("accumulateAttributes")],Gt.prototype,"readAccumulateAttributes",null),(0,i._)([(0,w.K)("accumulateAttributes")],Gt.prototype,"writeAccumulateAttributes",null),(0,i._)([(0,g.M)(jt)],Gt.prototype,"apiKey",void 0),(0,i._)([(0,g.M)({json:{write:!0}})],Gt.prototype,"attributeParameterValues",void 0),(0,i._)([(0,g.M)({type:String,json:{write:!0}})],Gt.prototype,"directionsLanguage",void 0),(0,i._)([(0,$.e)(Z)],Gt.prototype,"directionsLengthUnits",void 0),(0,i._)([(0,$.e)(X)],Gt.prototype,"directionsOutputType",void 0),(0,i._)([(0,$.e)(pe)],Gt.prototype,"directionsStyleName",void 0),(0,i._)([(0,$.e)(de,{name:"directionsTimeAttributeName",ignoreUnknown:!1})],Gt.prototype,"directionsTimeAttribute",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"findBestSequence",void 0),(0,i._)([(0,g.M)({type:Number,json:{write:!0}})],Gt.prototype,"geometryPrecision",void 0),(0,i._)([(0,g.M)({type:Number,json:{write:!0}})],Gt.prototype,"geometryPrecisionM",void 0),(0,i._)([(0,g.M)({type:Number,json:{write:!0}})],Gt.prototype,"geometryPrecisionZ",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"ignoreInvalidLocations",void 0),(0,i._)([(0,$.e)(ye,{name:"impedanceAttributeName",ignoreUnknown:!1})],Gt.prototype,"impedanceAttribute",void 0),(0,i._)([(0,g.M)({type:Number,json:{write:!0}})],Gt.prototype,"outputGeometryPrecision",void 0),(0,i._)([(0,$.e)(Y)],Gt.prototype,"outputGeometryPrecisionUnits",void 0),(0,i._)([(0,$.e)(Q)],Gt.prototype,"outputLines",void 0),(0,i._)([(0,g.M)({type:et.A,json:{name:"outSR",write:!0}})],Gt.prototype,"outSpatialReference",void 0),(0,i._)([(0,g.M)({json:{write:!0}})],Gt.prototype,"overrides",void 0),(0,i._)([(0,g.M)({json:{name:"barriers",write:!0}})],Gt.prototype,"pointBarriers",void 0),(0,i._)([(0,w.K)("pointBarriers")],Gt.prototype,"writePointBarriers",null),(0,i._)([(0,g.M)({json:{write:!0}})],Gt.prototype,"polygonBarriers",void 0),(0,i._)([(0,w.K)("polygonBarriers")],Gt.prototype,"writePolygonBarrier",null),(0,i._)([(0,g.M)({json:{write:!0}})],Gt.prototype,"polylineBarriers",void 0),(0,i._)([(0,w.K)("polylineBarriers")],Gt.prototype,"writePolylineBarrier",null),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"preserveFirstStop",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"preserveLastStop",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"preserveObjectID",void 0),(0,i._)([(0,g.M)({type:[String],json:{name:"restrictionAttributeNames",write:!0}})],Gt.prototype,"restrictionAttributes",void 0),(0,i._)([(0,b.w)("restrictionAttributes")],Gt.prototype,"readRestrictionAttributes",null),(0,i._)([(0,w.K)("restrictionAttributes")],Gt.prototype,"writeRestrictionAttributes",null),(0,i._)([(0,$.e)(ee)],Gt.prototype,"restrictUTurns",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"returnBarriers",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"returnDirections",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"returnPolygonBarriers",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"returnPolylineBarriers",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"returnRoutes",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"returnStops",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"returnTraversedEdges",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"returnTraversedJunctions",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"returnTraversedTurns",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"returnZ",void 0),(0,i._)([(0,g.M)({json:{write:!0}})],Gt.prototype,"startTime",void 0),(0,i._)([(0,b.w)("startTime")],Gt.prototype,"readStartTime",null),(0,i._)([(0,w.K)("startTime")],Gt.prototype,"writeStartTime",null),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"startTimeIsUTC",void 0),(0,i._)([(0,g.M)({json:{write:!0}})],Gt.prototype,"stops",void 0),(0,i._)([(0,b.w)("stops")],Gt.prototype,"readStops",null),(0,i._)([(0,w.K)("stops")],Gt.prototype,"writeStops",null),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"timeWindowsAreUTC",void 0),(0,i._)([(0,g.M)({type:Ae,json:{write:!0}})],Gt.prototype,"travelMode",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"useHierarchy",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"useTimeWindows",void 0),Gt=kt=(0,i._)([(0,T.$)("esri.rest.support.RouteParameters")],Gt);const Vt=Gt;function Wt(e,t,r){null!=e&&(t[r]=p.A.isCollection(e)?{features:e.toArray().map((e=>e.toJSON()))}:e.toJSON())}var qt;let $t=qt=class extends((0,_e.O)(F.oY)){constructor(e){super(e),this.arriveCurbApproach=null,this.arriveTime=null,this.arriveTimeOffset=null,this.bearing=null,this.bearingTol=null,this.cumulativeCosts=null,this.cumulativeDistance=null,this.cumulativeDuration=null,this.curbApproach=null,this.departCurbApproach=null,this.departTime=null,this.departTimeOffset=null,this.distanceToNetworkInMeters=null,this.geometry=null,this.lateDuration=null,this.locationType=null,this.name=null,this.navLatency=null,this.objectId=null,this.popupTemplate=null,this.posAlong=null,this.routeName=null,this.serviceCosts=null,this.serviceDistance=null,this.serviceDuration=null,this.sequence=null,this.sideOfEdge=null,this.snapX=null,this.snapY=null,this.snapZ=null,this.sourceId=null,this.sourceOid=null,this.status=null,this.symbol=null,this.timeWindowEnd=null,this.timeWindowEndOffset=null,this.timeWindowStart=null,this.timeWindowStartOffset=null,this.type="stop",this.violations=null,this.waitDuration=null,this.wait=null}readArriveTimeOffset(e,t){return Re(t.attributes.ArriveTime,t.attributes.ArriveTimeUTC)}readCumulativeCosts(e,t){return je(t.attributes,"Cumul_")}readDepartTimeOffset(e,t){return Re(t.attributes.DepartTime,t.attributes.DepartTimeUTC)}readServiceCosts(e,t){return je(t.attributes,"Attr_")}writeServiceCosts(e,t){Fe(e,t,"Attr_")}writeTimeWindowEnd(e,t){null!=e&&(t.attributes||(t.attributes={}),t.attributes.TimeWindowEnd=e.getTime())}writeTimeWindowStart(e,t){null!=e&&(t.attributes||(t.attributes={}),t.attributes.TimeWindowStart=e.getTime())}readViolations(e,t){return je(t.attributes,"Violation_")}readWait(e,t){return je(t.attributes,"Wait_")}static fromGraphic(e){return new qt({arriveCurbApproach:null!=e.attributes.ArrivalCurbApproach?re.fromJSON(e.attributes.ArrivalCurbApproach):null,arriveTime:null!=e.attributes.ArrivalTime?new Date(e.attributes.ArrivalTime):null,arriveTimeOffset:e.attributes.ArrivalUTCOffset,cumulativeCosts:null!=e.attributes.CumulativeCosts?Be(JSON.parse(e.attributes.CumulativeCosts)):null,cumulativeDistance:e.attributes.CumulativeMeters??null,cumulativeDuration:e.attributes.CumulativeMinutes??null,curbApproach:null!=e.attributes.CurbApproach?re.fromJSON(e.attributes.CurbApproach):null,departCurbApproach:null!=e.attributes.DepartureCurbApproach?re.fromJSON(e.attributes.DepartureCurbApproach):null,departTime:null!=e.attributes.DepartureTime?new Date(e.attributes.DepartureTime):null,departTimeOffset:e.attributes.DepartureUTCOffset??null,geometry:e.geometry,lateDuration:e.attributes.LateMinutes??null,locationType:null!=e.attributes.LocationType?ie.fromJSON(e.attributes.LocationType):null,name:e.attributes.Name,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,routeName:e.attributes.RouteName,sequence:e.attributes.Sequence??null,serviceCosts:null!=e.attributes.ServiceCosts?Be(JSON.parse(e.attributes.ServiceCosts)):null,serviceDistance:e.attributes.ServiceMeters??null,serviceDuration:e.attributes.ServiceMinutes??null,status:null!=e.attributes.Status?oe.fromJSON(e.attributes.Status):null,symbol:e.symbol,timeWindowEnd:null!=e.attributes.TimeWindowEnd?new Date(e.attributes.TimeWindowEnd):null,timeWindowEndOffset:e.attributes.TimeWindowEndUTCOffset??null,timeWindowStart:null!=e.attributes.TimeWindowStart?new Date(e.attributes.TimeWindowStart):null,timeWindowStartOffset:e.attributes.TimeWindowStartUTCOffset??null,waitDuration:e.attributes.WaitMinutes??null})}toGraphic(){const e={ObjectID:this.objectId,ArrivalCurbApproach:null!=this.arriveCurbApproach?re.toJSON(this.arriveCurbApproach):null,ArrivalTime:null!=this.arriveTime?this.arriveTime.getTime():null,ArrivalUTCOffset:this.arriveTimeOffset,CumulativeCosts:null!=this.cumulativeCosts?JSON.stringify(Pe(this.cumulativeCosts)):null,CumulativeMeters:this.cumulativeDistance,CumulativeMinutes:this.cumulativeDuration,CurbApproach:null!=this.curbApproach?re.toJSON(this.curbApproach):null,DepartureCurbApproach:null!=this.departCurbApproach?re.toJSON(this.departCurbApproach):null,DepartureTime:null!=this.departTime?this.departTime.getTime():null,DepartureUTCOffset:this.departTimeOffset,LateMinutes:this.lateDuration,LocationType:null!=this.locationType?ie.toJSON(this.locationType):null,Name:this.name,RouteName:this.routeName,Sequence:this.sequence,ServiceCosts:null!=this.serviceCosts?JSON.stringify(Pe(this.serviceCosts)):null,ServiceMeters:this.serviceDistance,ServiceMinutes:this.serviceDuration,Status:null!=this.status?oe.toJSON(this.status):null,TimeWindowEnd:null!=this.timeWindowEnd?this.timeWindowEnd.getTime():null,TimeWindowEndUTCOffset:this.timeWindowEndOffset??this.arriveTimeOffset,TimeWindowStart:null!=this.timeWindowStart?this.timeWindowStart.getTime():null,TimeWindowStartUTCOffset:this.timeWindowStartOffset??this.arriveTimeOffset,WaitMinutes:this.waitDuration};return new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};$t.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"ArrivalCurbApproach",alias:"Arrival Curb Approach",type:"esriFieldTypeInteger"},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate"},{name:"ArrivalUTCOffset",alias:"Arrival Time",type:"esriFieldTypeInteger"},{name:"CumulativeCosts",alias:"Cumulative Costs",type:"esriFieldTypeString"},{name:"CumulativeMeters",alias:"Cumulative Meters",type:"esriFieldTypeDouble"},{name:"CumulativeMinutes",alias:"Cumulative Minutes",type:"esriFieldTypeDouble"},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger"},{name:"DepartureCurbApproach",alias:"Departure Curb Approach",type:"esriFieldTypeInteger"},{name:"DepartureTime",alias:"Departure Time",type:"esriFieldTypeDate"},{name:"DepartureUTCOffset",alias:"Departure Time",type:"esriFieldTypeInteger"},{name:"LateMinutes",alias:"Minutes Late",type:"esriFieldTypeDouble"},{name:"LocationType",alias:"Location Type",type:"esriFieldTypeInteger"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString"},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger"},{name:"ServiceCosts",alias:"Service Costs",type:"esriFieldTypeString"},{name:"ServiceMeters",alias:"Service Meters",type:"esriFieldTypeDouble"},{name:"ServiceMinutes",alias:"Service Minutes",type:"esriFieldTypeDouble"},{name:"Status",alias:"Status",type:"esriFieldTypeInteger"},{name:"TimeWindowEnd",alias:"Time Window End",type:"esriFieldTypeDate"},{name:"TimeWindowEndUTCOffset",alias:"Time Window End Offset",type:"esriFieldTypeInteger"},{name:"TimeWindowStart",alias:"Time Window Start",type:"esriFieldTypeDate"},{name:"TimeWindowStartUTCOffset",alias:"Time Window Start Offset",type:"esriFieldTypeInteger"},{name:"WaitMinutes",alias:"Minutes Wait",type:"esriFieldTypeDouble"}],(0,i._)([(0,g.M)({type:re.apiValues,json:{read:{source:"attributes.ArrivalCurbApproach",reader:re.read}}})],$t.prototype,"arriveCurbApproach",void 0),(0,i._)([(0,g.M)({type:Date,json:{read:{source:"attributes.ArriveTimeUTC"}}})],$t.prototype,"arriveTime",void 0),(0,i._)([(0,g.M)()],$t.prototype,"arriveTimeOffset",void 0),(0,i._)([(0,b.w)("arriveTimeOffset",["attributes.ArriveTime","attributes.ArriveTimeUTC"])],$t.prototype,"readArriveTimeOffset",null),(0,i._)([(0,g.M)({json:{name:"attributes.Bearing",read:!1,write:!0}})],$t.prototype,"bearing",void 0),(0,i._)([(0,g.M)({json:{name:"attributes.BearingTol",read:!1,write:!0}})],$t.prototype,"bearingTol",void 0),(0,i._)([(0,g.M)()],$t.prototype,"cumulativeCosts",void 0),(0,i._)([(0,b.w)("cumulativeCosts",["attributes"])],$t.prototype,"readCumulativeCosts",null),(0,i._)([(0,g.M)()],$t.prototype,"cumulativeDistance",void 0),(0,i._)([(0,g.M)()],$t.prototype,"cumulativeDuration",void 0),(0,i._)([(0,g.M)({type:re.apiValues,json:{name:"attributes.CurbApproach",read:{reader:re.read},write:{writer:re.write}}})],$t.prototype,"curbApproach",void 0),(0,i._)([(0,g.M)({type:re.apiValues,json:{read:{source:"attributes.DepartCurbApproach",reader:re.read}}})],$t.prototype,"departCurbApproach",void 0),(0,i._)([(0,g.M)({type:Date,json:{read:{source:"attributes.DepartTimeUTC"}}})],$t.prototype,"departTime",void 0),(0,i._)([(0,g.M)()],$t.prototype,"departTimeOffset",void 0),(0,i._)([(0,b.w)("departTimeOffset",["attributes.DepartTime","attributes.DepartTimeUTC"])],$t.prototype,"readDepartTimeOffset",null),(0,i._)([(0,g.M)({json:{read:{source:"attributes.DistanceToNetworkInMeters"}}})],$t.prototype,"distanceToNetworkInMeters",void 0),(0,i._)([(0,g.M)({type:Ke.A,json:{write:!0}})],$t.prototype,"geometry",void 0),(0,i._)([(0,g.M)()],$t.prototype,"lateDuration",void 0),(0,i._)([(0,g.M)({type:ie.apiValues,json:{name:"attributes.LocationType",read:{reader:ie.read},write:{writer:ie.write}}})],$t.prototype,"locationType",void 0),(0,i._)([(0,g.M)({json:{name:"attributes.Name"}})],$t.prototype,"name",void 0),(0,i._)([(0,g.M)({json:{name:"attributes.NavLatency",read:!1,write:!0}})],$t.prototype,"navLatency",void 0),(0,i._)([(0,g.M)({json:{name:"attributes.ObjectID"}})],$t.prototype,"objectId",void 0),(0,i._)([(0,g.M)({type:a.A})],$t.prototype,"popupTemplate",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.PosAlong"}}})],$t.prototype,"posAlong",void 0),(0,i._)([(0,g.M)({json:{name:"attributes.RouteName"}})],$t.prototype,"routeName",void 0),(0,i._)([(0,g.M)()],$t.prototype,"serviceCosts",void 0),(0,i._)([(0,b.w)("serviceCosts",["attributes"])],$t.prototype,"readServiceCosts",null),(0,i._)([(0,w.K)("serviceCosts")],$t.prototype,"writeServiceCosts",null),(0,i._)([(0,g.M)()],$t.prototype,"serviceDistance",void 0),(0,i._)([(0,g.M)()],$t.prototype,"serviceDuration",void 0),(0,i._)([(0,g.M)({json:{name:"attributes.Sequence"}})],$t.prototype,"sequence",void 0),(0,i._)([(0,g.M)({type:se.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:se.read}}})],$t.prototype,"sideOfEdge",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.SnapX"}}})],$t.prototype,"snapX",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.SnapY"}}})],$t.prototype,"snapY",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.SnapZ"}}})],$t.prototype,"snapZ",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.SourceID"}}})],$t.prototype,"sourceId",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.SourceOID"}}})],$t.prototype,"sourceOid",void 0),(0,i._)([(0,g.M)({type:oe.apiValues,json:{read:{source:"attributes.Status",reader:oe.read}}})],$t.prototype,"status",void 0),(0,i._)([(0,g.M)({types:j.Es})],$t.prototype,"symbol",void 0),(0,i._)([(0,g.M)({type:Date,json:{name:"attributes.TimeWindowEnd"}})],$t.prototype,"timeWindowEnd",void 0),(0,i._)([(0,w.K)("timeWindowEnd")],$t.prototype,"writeTimeWindowEnd",null),(0,i._)([(0,g.M)()],$t.prototype,"timeWindowEndOffset",void 0),(0,i._)([(0,g.M)({type:Date,json:{name:"attributes.TimeWindowStart"}})],$t.prototype,"timeWindowStart",void 0),(0,i._)([(0,w.K)("timeWindowStart")],$t.prototype,"writeTimeWindowStart",null),(0,i._)([(0,g.M)()],$t.prototype,"timeWindowStartOffset",void 0),(0,i._)([(0,g.M)({readOnly:!0,json:{read:!1}})],$t.prototype,"type",void 0),(0,i._)([(0,g.M)()],$t.prototype,"violations",void 0),(0,i._)([(0,b.w)("violations",["attributes"])],$t.prototype,"readViolations",null),(0,i._)([(0,g.M)()],$t.prototype,"waitDuration",void 0),(0,i._)([(0,g.M)()],$t.prototype,"wait",void 0),(0,i._)([(0,b.w)("wait",["attributes"])],$t.prototype,"readWait",null),$t=qt=(0,i._)([(0,T.$)("esri.rest.support.Stop")],$t);const zt=$t;var Kt=r(48526);function Yt(e){return e.length?e:null}function Zt(e){switch(e){case"esriGeometryPoint":return{type:"esriSMS",style:"esriSMSCircle",size:12,color:[0,0,0,0],outline:Zt("esriGeometryPolyline")};case"esriGeometryPolyline":return{type:"esriSLS",style:"esriSLSSolid",width:1,color:[0,0,0,0]};case"esriGeometryPolygon":return{type:"esriSFS",style:"esriSFSNull",outline:Zt("esriGeometryPolyline")}}}function Ht(e){return"layers"in e}async function Xt(e){const t=et.A.WGS84;return await(0,M.initializeProjection)(e.spatialReference,t),(0,M.project)(e,t)}function Qt(e,t){switch(t){case"seconds":return e/60;case"hours":return 60*e;case"days":return 60*e*24;default:return e}}function er(e,t){return"decimal-degrees"===t||"points"===t||"unknown"===t?e:(0,f.oU)(e,t,"meters")}const tr=p.A.ofType(dt),rr=p.A.ofType(ht),ir=p.A.ofType(gt),or=p.A.ofType(St),sr=p.A.ofType(At),nr=p.A.ofType(zt),ar="esri.layers.RouteLayer",lr=()=>u.A.getLogger(ar);let ur=class extends((0,O.dM)((0,C.j)((0,I.q)((0,D.A)((0,d.P)(N.A)))))){constructor(e){super(e),this._cachedServiceDescription=null,this._featureCollection=null,this._type="Feature Collection",this.defaultSymbols=new J,this.directionLines=null,this.directionPoints=null,this.featureCollectionType="route",this.legendEnabled=!1,this.maxScale=0,this.minScale=0,this.pointBarriers=new ir,this.polygonBarriers=new or,this.polylineBarriers=new sr,this.routeInfo=null,this.spatialReference=et.A.WGS84,this.stops=new nr,this.type="route";const t=()=>{this._setStopSymbol(this.stops)};this.addHandles((0,h.on)((()=>this.stops),"change",t,{sync:!0,onListenerAdd:t}))}writeFeatureCollectionWebmap(e,t,r,i){const o=[this._writePolygonBarriers(),this._writePolylineBarriers(),this._writePointBarriers(),this._writeRouteInfo(),this._writeDirectionLines(),this._writeDirectionPoints(),this._writeStops()].filter((e=>!!e)),s=o.map(((e,t)=>t)),n="web-map"===i.origin?"featureCollection.layers":"layers";(0,y.sM)(n,o,t),t.opacity=this.opacity,t.visibility=this.visible,t.visibleLayers=s}readDirectionLines(e,t){return this._getNetworkFeatures(t,"DirectionLines",(e=>dt.fromGraphic(e)))}readDirectionPoints(e,t){return this._getNetworkFeatures(t,"DirectionPoints",(e=>ht.fromGraphic(e)))}get fullExtent(){const e=new _.A({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:et.A.WGS84});if(null!=this.routeInfo?.geometry)return this.routeInfo.geometry.extent??e;if(null==this.stops)return e;const t=this.stops.filter((e=>null!=e.geometry));if(t.length<2)return e;const{spatialReference:r}=t.at(0).geometry;if(null==r)return e;const i=t.toArray().map((e=>{const t=e.geometry;return[t.x,t.y]}));return new Kt.A({points:i,spatialReference:r}).extent}readMaxScale(e,t){const r=Ht(t)?t.layers:t.featureCollection?.layers,i=r?.find((e=>null!=e.layerDefinition.maxScale));return i?.layerDefinition.maxScale??0}readMinScale(e,t){const r=Ht(t)?t.layers:t.featureCollection?.layers,i=r?.find((e=>null!=e.layerDefinition.minScale));return i?.layerDefinition.minScale??0}readPointBarriers(e,t){return this._getNetworkFeatures(t,"Barriers",(e=>gt.fromGraphic(e)))}readPolygonBarriers(e,t){return this._getNetworkFeatures(t,"PolygonBarriers",(e=>St.fromGraphic(e)))}readPolylineBarriers(e,t){return this._getNetworkFeatures(t,"PolylineBarriers",(e=>At.fromGraphic(e)))}readRouteInfo(e,t){return this._getNetworkFeatures(t,"RouteInfo",(e=>Ct.fromGraphic(e))).at(0)??null}readSpatialReference(e,t){const r=Ht(t)?t.layers:t.featureCollection?.layers;if(!r?.length)return et.A.WGS84;const{layerDefinition:i,featureSet:o}=r[0],s=o.features[0],n=s?.geometry?.spatialReference??o.spatialReference??i.spatialReference??i.extent.spatialReference??A.KK;return et.A.fromJSON(n)}readStops(e,t){return this._getNetworkFeatures(t,"Stops",(e=>zt.fromGraphic(e)),(e=>this._setStopSymbol(e)))}get title(){return this.routeInfo?.name??"Route"}set title(e){this._overrideIfSome("title",e)}get url(){return o.A.routeServiceUrl}set url(e){null!=e?this._set("url",(0,L.Jf)(e,lr())):this._set("url",o.A.routeServiceUrl)}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}removeAll(){this.removeResult(),this.pointBarriers.removeAll(),this.polygonBarriers.removeAll(),this.polylineBarriers.removeAll(),this.stops.removeAll()}removeResult(){null!=this.directionLines&&(this.directionLines.removeAll(),this._set("directionLines",null)),null!=this.directionPoints&&(this.directionPoints.removeAll(),this._set("directionPoints",null)),null!=this.routeInfo&&this._set("routeInfo",null)}async save(){await this.load();const{fullExtent:e,portalItem:t}=this;if(!t)throw new c.A("routelayer:portal-item-not-set","save() requires to the layer to have a portal item");if(!t.id)throw new c.A("routelayer:portal-item-not-saved","Please use saveAs() first to save the routelayer");if("Feature Collection"!==t.type)throw new c.A("routelayer:portal-item-wrong-type",'Portal item needs to have type "Feature Collection"');if(null==this.routeInfo)throw new c.A("routelayer:route-unsolved","save() requires a solved route");const{portal:r}=t;await r.signIn(),r.user||await t.reload();const{itemUrl:i,itemControl:o}=t;if("admin"!==o&&"update"!==o)throw new c.A("routelayer:insufficient-permissions","To save this layer, you need to be the owner or an administrator of your organization");const s={messages:[],origin:"portal-item",portal:r,url:i?(0,v.An)(i):void 0,writtenProperties:[]},n=this.write(void 0,s);return t.extent=await Xt(e),t.title=this.title,await t.update({data:n}),t}async saveAs(e,t={}){if(await this.load(),null==this.routeInfo)throw new c.A("routelayer:route-unsolved","saveAs() requires a solved route");const r=G.default.from(e).clone();r.extent??=await Xt(this.fullExtent),r.id=null,r.portal??=k.A.getDefault(),r.title??=this.title,r.type="Feature Collection",r.typeKeywords=["Data","Feature Collection",V.mm.MULTI_LAYER,"Route Layer"];const{portal:i}=r,o={messages:[],origin:"portal-item",portal:i,url:null,writtenProperties:[]};await i.signIn();const s=t?.folder,n=this.write(void 0,o);return await(i.user?.addItem({item:r,folder:s,data:n})),this.portalItem=r,(0,S.v)(o),o.portalItem=r,r}async solve(e,t){const r=e?.stops??this.stops,i=e?.pointBarriers??Yt(this.pointBarriers),o=e?.polylineBarriers??Yt(this.polylineBarriers),s=e?.polygonBarriers??Yt(this.polygonBarriers);if(null==r)throw new c.A("routelayer:undefined-stops","the route layer must have stops defined in the route parameters.");if((function(e){return"esri.rest.support.FeatureSet"===e.declaredClass}(r)||function(e){return"esri.rest.support.NetworkFeatureSet"===e.declaredClass}(r))&&r.features.length<2||p.A.isCollection(r)&&r.length<2)throw new c.A("routelayer:insufficent-stops","the route layer must have two or more stops to solve a route.");if(p.A.isCollection(r))for(const e of r)e.routeName=null;const n=e?.apiKey,a=this.url,l=await this._getServiceDescription(a,n,t),u=e?.travelMode??l.defaultTravelMode,d=e?.accumulateAttributes??[];null!=u&&(d.push(u.distanceAttributeName),u.timeAttributeName&&d.push(u.timeAttributeName));const y={accumulateAttributes:d,directionsOutputType:"featuresets",ignoreInvalidLocations:!0,pointBarriers:i,polylineBarriers:o,polygonBarriers:s,preserveFirstStop:!0,preserveLastStop:!0,returnBarriers:!!i,returnDirections:!0,returnPolygonBarriers:!!s,returnPolylineBarriers:!!o,returnRoutes:!0,returnStops:!0,stops:r},h=Vt.from(e??{});let f;h.set(y);try{f=await ut(a,h,t)}catch(e){throw(0,m.zf)(e)?e:new c.A("routelayer:failed-route-request","the routing request failed",{error:e})}const v=this._toRouteLayerSolution(f);return this._isOverridden("title")||(this.title=v.routeInfo.name??"Route"),function(e,t,r){const i=t.networkDataset?.networkAttributes,o=i?.filter((({usageType:e})=>"cost"===e))??[],s=r.travelMode??t.defaultTravelMode;if(null==s)return void lr().warn("route-layer:missing-travel-mode","The routing service must have a default travel mode or one must be specified in the route parameter.");const{timeAttributeName:n,distanceAttributeName:a}=s,l=o.find((({name:e})=>e===n)),u=o.find((({name:e})=>e===a)),p=r.travelMode?.impedanceAttributeName??r.impedanceAttribute??t.impedance,d=l?.units,y=u?.units;if(!d||!y)throw new c.A("routelayer:unknown-impedance-units","the units of either the distance or time impedance are unknown");const m=r.directionsLanguage??t.directionsLanguage,h=r.accumulateAttributes??t.accumulateAttributeNames??[],f=new Set(o.filter((({name:e})=>e===n||e===a||e===p||null!=e&&h.includes(e))).map((({name:e})=>e))),v=e=>{for(const t in e)f.has(t)||delete e[t]};for(const t of e.pointBarriers)null!=t.costs&&(t.addedCost=t.costs[p]??0,v(t.costs));for(const t of e.polygonBarriers)null!=t.costs&&(t.scaleFactor=t.costs[p]??1,v(t.costs));for(const t of e.polylineBarriers)null!=t.costs&&(t.scaleFactor=t.costs[p]??1,v(t.costs));const{routeInfo:g}=e,{findBestSequence:b,preserveFirstStop:T,preserveLastStop:w,startTimeIsUTC:S,timeWindowsAreUTC:_}=r;g.analysisSettings=new Ot({accumulateAttributes:h,directionsLanguage:m,findBestSequence:b,preserveFirstStop:T,preserveLastStop:w,startTimeIsUTC:S,timeWindowsAreUTC:_,travelMode:s}),g.totalDuration=Qt(g.totalCosts?.[n]??0,d),g.totalDistance=er(g.totalCosts?.[a]??0,y),g.totalLateDuration=Qt(g.totalViolations?.[n]??0,d),g.totalWaitDuration=Qt(g.totalWait?.[n]??0,d),null!=g.totalCosts&&v(g.totalCosts),null!=g.totalViolations&&v(g.totalViolations),null!=g.totalWait&&v(g.totalWait);for(const t of e.stops)null!=t.serviceCosts&&(t.serviceDuration=Qt(t.serviceCosts[n]??0,d),t.serviceDistance=er(t.serviceCosts[a]??0,y),v(t.serviceCosts)),null!=t.cumulativeCosts&&(t.cumulativeDuration=Qt(t.cumulativeCosts[n]??0,d),t.cumulativeDistance=er(t.cumulativeCosts[a]??0,y),v(t.cumulativeCosts)),null!=t.violations&&(t.lateDuration=Qt(t.violations[n]??0,d),v(t.violations)),null!=t.wait&&(t.waitDuration=Qt(t.wait[n]??0,d),v(t.wait))}(v,l,h),v}update(e){const{stops:t,directionLines:r,directionPoints:i,pointBarriers:o,polylineBarriers:s,polygonBarriers:n,routeInfo:a}=e;this.set({stops:t,pointBarriers:o,polylineBarriers:s,polygonBarriers:n}),this._set("directionLines",r),this._set("directionPoints",i),this._set("routeInfo",a),null!=a.geometry&&(this.spatialReference=a.geometry.spatialReference)}_getNetworkFeatures(e,t,r,i){const o=Ht(e)?e.layers:e.featureCollection?.layers,s=o?.find((e=>e.layerDefinition.name===t));if(null==s)return new p.A;const{layerDefinition:u,popupInfo:c,featureSet:d}=s,y=u.drawingInfo.renderer,{features:m}=d,h=d.spatialReference??u.spatialReference??u.extent.spatialReference??A.KK,f=y&&(0,l.L)(y),v=et.A.fromJSON(h),g=m.map((e=>{const i=n.A.fromJSON(e);null!=i.geometry&&null!=e.geometry&&null==e.geometry.spatialReference&&(i.geometry.spatialReference=v);const o=r(i);return o.symbol??=f?.getSymbol(i)??this._getNetworkSymbol(t),o.popupTemplate??=c&&a.A.fromJSON(c),o}));return i&&g.some((({symbol:e})=>!e))&&i(g),new p.A(g)}_getNetworkSymbol(e){switch(e){case"Barriers":return this.defaultSymbols.pointBarriers;case"DirectionPoints":return this.defaultSymbols.directionPoints;case"DirectionLines":return this.defaultSymbols.directionLines;case"PolylineBarriers":return this.defaultSymbols.polylineBarriers;case"PolygonBarriers":return this.defaultSymbols.polygonBarriers;case"RouteInfo":return this.defaultSymbols.routeInfo;case"Stops":return null}}async _getServiceDescription(e,t,r){if(null!=this._cachedServiceDescription&&this._cachedServiceDescription.url===e)return this._cachedServiceDescription.serviceDescription;const i=await De(e,t,r);return this._cachedServiceDescription={serviceDescription:i,url:e},i}_setStopSymbol(e){if(!e||0===e.length)return;if(null==this.defaultSymbols.stops)return;if(e.every((({symbol:e})=>null!=e)))return;const{first:t,last:r,middle:i,unlocated:o,waypoint:s,break:n}=this.defaultSymbols.stops;if(null==this.routeInfo||1===e.length)return void e.forEach(((o,s)=>{switch(s){case 0:o.symbol=t;break;case e.length-1:o.symbol=r;break;default:o.symbol=i}}));const a=e.map((({sequence:e})=>e)).filter((e=>null!=e)),l=Math.min(...a),u=Math.max(...a);for(const a of e)a.sequence!==l?a.sequence!==u?"ok"===a.status||"not-located-on-closest"===a.status?"waypoint"!==a.locationType?"break"!==a.locationType?a.symbol=i:a.symbol=n:a.symbol=s:a.symbol=o:a.symbol=r:a.symbol=t}_toRouteLayerSolution(e){const t=e.routeResults[0].stops?.map((e=>zt.fromJSON(e.toJSON())));this._setStopSymbol(t);const r=new nr(t),i=new or(e.polygonBarriers?.map((e=>{const t=St.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polygonBarriers,t}))),o=new sr(e.polylineBarriers?.map((e=>{const t=At.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polylineBarriers,t}))),s=new ir(e.pointBarriers?.map((e=>{const t=gt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.pointBarriers,t}))),n=e.routeResults[0].route?.toJSON(),a=Ct.fromJSON(n);a.symbol=this.defaultSymbols.routeInfo;const l=new rr(e.routeResults[0].directionPoints?.features.map((e=>{const t=ht.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionPoints,t})));return{directionLines:new tr(e.routeResults[0].directionLines?.features.map((e=>{const t=dt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionLines,t}))),directionPoints:l,pointBarriers:s,polygonBarriers:i,polylineBarriers:o,routeInfo:a,stops:r}}_writeDirectionLines(){return this._writeNetworkFeatures(this.directionLines,this.defaultSymbols.directionLines,"esriGeometryPolyline",dt.fields,"DirectionLines","Direction Lines")}_writeDirectionPoints(){return this._writeNetworkFeatures(this.directionPoints,this.defaultSymbols.directionPoints,"esriGeometryPoint",ht.fields,"DirectionPoints","Direction Points")}_writeNetworkFeatures(e,t,r,i,o,s){if(!e?.length)return null;const n=this.spatialReference.toJSON(),{fullExtent:a,maxScale:l,minScale:u}=this;return{featureSet:{features:e.toArray().map((e=>function(e){const{attributes:t,geometry:r,popupTemplate:i,symbol:o}=e.toGraphic().toJSON();return{attributes:t,geometry:r,popupInfo:i,symbol:o}}(e))),geometryType:r,spatialReference:n},layerDefinition:{capabilities:"Query,Update,Editing",drawingInfo:{renderer:{type:"simple",symbol:null!=t?t.toJSON():Zt(r)}},extent:a.toJSON(),fields:i,geometryType:r,hasM:!1,hasZ:!1,maxScale:l,minScale:u,name:o,objectIdField:"ObjectID",spatialReference:n,title:s,type:"Feature Layer",typeIdField:""}}}_writePointBarriers(){return this._writeNetworkFeatures(this.pointBarriers,this.defaultSymbols.pointBarriers,"esriGeometryPoint",gt.fields,"Barriers","Point Barriers")}_writePolygonBarriers(){return this._writeNetworkFeatures(this.polygonBarriers,this.defaultSymbols.polygonBarriers,"esriGeometryPolygon",St.fields,"PolygonBarriers","Polygon Barriers")}_writePolylineBarriers(){return this._writeNetworkFeatures(this.polylineBarriers,this.defaultSymbols.polylineBarriers,"esriGeometryPolyline",At.fields,"PolylineBarriers","Line Barriers")}_writeRouteInfo(){return this._writeNetworkFeatures(null!=this.routeInfo?new p.A([this.routeInfo]):null,this.defaultSymbols.routeInfo,"esriGeometryPolyline",Ct.fields,"RouteInfo","Route Details")}_writeStops(){const e=this._writeNetworkFeatures(this.stops,null,"esriGeometryPoint",zt.fields,"Stops","Stops");if(null==e)return null;const{stops:t}=this.defaultSymbols,r=t?.first?.toJSON(),i=t?.middle?.toJSON(),o=t?.last?.toJSON();return e.layerDefinition.drawingInfo.renderer={type:"uniqueValue",field1:"Sequence",defaultSymbol:i,uniqueValueInfos:[{value:"1",symbol:r,label:"First Stop"},{value:`${this.stops.length}`,symbol:o,label:"Last Stop"}]},e}};(0,i._)([(0,g.M)({readOnly:!0,json:{read:!1,origins:{"portal-item":{write:{allowNull:!0,ignoreOrigin:!0}},"web-map":{write:{overridePolicy(){return{allowNull:!0,ignoreOrigin:null==this.portalItem}}}}}}})],ur.prototype,"_featureCollection",void 0),(0,i._)([(0,w.K)(["web-map","portal-item"],"_featureCollection")],ur.prototype,"writeFeatureCollectionWebmap",null),(0,i._)([(0,g.M)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{target:"type",overridePolicy(){return{ignoreOrigin:null!=this.portalItem}}}}}}})],ur.prototype,"_type",void 0),(0,i._)([(0,g.M)({nonNullable:!0,type:J})],ur.prototype,"defaultSymbols",void 0),(0,i._)([(0,g.M)({readOnly:!0})],ur.prototype,"directionLines",void 0),(0,i._)([(0,b.w)(["web-map","portal-item"],"directionLines",["layers","featureCollection.layers"])],ur.prototype,"readDirectionLines",null),(0,i._)([(0,g.M)({readOnly:!0})],ur.prototype,"directionPoints",void 0),(0,i._)([(0,b.w)(["web-map","portal-item"],"directionPoints",["layers","featureCollection.layers"])],ur.prototype,"readDirectionPoints",null),(0,i._)([(0,g.M)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],ur.prototype,"featureCollectionType",void 0),(0,i._)([(0,g.M)({readOnly:!0})],ur.prototype,"fullExtent",null),(0,i._)([(0,g.M)({json:{origins:{"web-map":{name:"featureCollection.showLegend"}},write:!0}})],ur.prototype,"legendEnabled",void 0),(0,i._)([(0,g.M)({type:["show","hide"]})],ur.prototype,"listMode",void 0),(0,i._)([(0,g.M)({type:Number,nonNullable:!0,json:{write:!1}})],ur.prototype,"maxScale",void 0),(0,i._)([(0,b.w)(["web-map","portal-item"],"maxScale",["layers","featureCollection.layers"])],ur.prototype,"readMaxScale",null),(0,i._)([(0,g.M)({type:Number,nonNullable:!0,json:{write:!1}})],ur.prototype,"minScale",void 0),(0,i._)([(0,b.w)(["web-map","portal-item"],"minScale",["layers","featureCollection.layers"])],ur.prototype,"readMinScale",null),(0,i._)([(0,g.M)({type:["ArcGISFeatureLayer"],value:"ArcGISFeatureLayer"})],ur.prototype,"operationalLayerType",void 0),(0,i._)([(0,g.M)({nonNullable:!0,type:p.A.ofType(gt)})],ur.prototype,"pointBarriers",void 0),(0,i._)([(0,b.w)(["web-map","portal-item"],"pointBarriers",["layers","featureCollection.layers"])],ur.prototype,"readPointBarriers",null),(0,i._)([(0,g.M)({nonNullable:!0,type:p.A.ofType(St)})],ur.prototype,"polygonBarriers",void 0),(0,i._)([(0,b.w)(["web-map","portal-item"],"polygonBarriers",["layers","featureCollection.layers"])],ur.prototype,"readPolygonBarriers",null),(0,i._)([(0,g.M)({nonNullable:!0,type:p.A.ofType(At)})],ur.prototype,"polylineBarriers",void 0),(0,i._)([(0,b.w)(["web-map","portal-item"],"polylineBarriers",["layers","featureCollection.layers"])],ur.prototype,"readPolylineBarriers",null),(0,i._)([(0,g.M)({readOnly:!0})],ur.prototype,"routeInfo",void 0),(0,i._)([(0,b.w)(["web-map","portal-item"],"routeInfo",["layers","featureCollection.layers"])],ur.prototype,"readRouteInfo",null),(0,i._)([(0,g.M)({type:et.A})],ur.prototype,"spatialReference",void 0),(0,i._)([(0,b.w)(["web-map","portal-item"],"spatialReference",["layers","featureCollection.layers"])],ur.prototype,"readSpatialReference",null),(0,i._)([(0,g.M)({nonNullable:!0,type:p.A.ofType(zt)})],ur.prototype,"stops",void 0),(0,i._)([(0,b.w)(["web-map","portal-item"],"stops",["layers","featureCollection.layers"])],ur.prototype,"readStops",null),(0,i._)([(0,g.M)()],ur.prototype,"title",null),(0,i._)([(0,g.M)({readOnly:!0,json:{read:!1}})],ur.prototype,"type",void 0),(0,i._)([(0,g.M)()],ur.prototype,"url",null),ur=(0,i._)([(0,T.$)(ar)],ur);const pr=ur},16131:(e,t,r)=>{r.d(t,{q:()=>T});var i=r(90237),o=r(49186),s=r(84952),n=r(10107),a=r(56507),l=(r(87811),r(44208),r(36005)),u=r(40608),p=r(43937),c=r(89317),d=r(45917),y=r(49422);const m={ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GeoRSS:!0,GroupLayer:!0,KML:!0,KnowledgeGraphLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},h={ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},f={ArcGISFeatureLayer:!0,SubtypeGroupTable:!0},v={"web-scene/operational-layers":{ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GroupLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,KML:!0,LineOfSightLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,RasterDataLayer:!0,VectorTileLayer:!0,ViewshedLayer:!0,Voxel:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/basemap":{ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-scene/tables":{ArcGISFeatureLayer:!0},"web-map/operational-layers":m,"web-map/basemap":h,"web-map/tables":f,"link-chart/operational-layers":{...m,LinkChartLayer:!0},"link-chart/basemap":h,"link-chart/tables":f,"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,BuildingSceneLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,MediaLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,SubtypeGroupLayer:!0}};var g=r(10873),b=r(79677);const T=e=>{let t=class extends e{constructor(){super(...arguments),this.persistenceEnabled=!0,this.title=null}readId(e,t,r){return"Group Layer"===r?.portalItem?.type?void 0:e}writeListMode(e,t,r,i){(i&&"ground"===i.layerContainerType||e&&(0,y.R)(this,r,{},i))&&(t[r]=e)}writeOperationalLayerType(e,t,r,i){e&&"tables"!==i?.layerContainerType&&(t.layerType=e)}writeTitle(e,t){t.title=e??"Layer"}readTimeExtent(e){return e?b.A.fromArray(e):null}writeTimeExtent(e,t,r,i){e&&"tables"!==i.layerContainerType&&(e.isEmpty?i?.messages&&i.messages.push(new o.A("layer:invalid-visibilityTimeExtent","visibilityTimeExtent cannot be empty")):t[r]=e.toArray())}read(e,t){t&&(t.layer=this),(0,d.t)(this,e,(t=>super.read(e,t)),t)}write(e,t){if(!this.persistenceEnabled&&!t?.ignorePersistenceEnabled)return null;if(t?.origin){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`,r=v[e];let i=!!r?.[this.operationalLayerType];if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(i=!1),"ArcGISDimensionLayer"===this.operationalLayerType&&"web-map/operational-layers"===e&&(i=!1),!i)return t.messages?.push(new o.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const r=super.write(e,{...t,layer:this}),i=!!t&&!!t.messages&&!!t.messages.filter((e=>e instanceof o.A&&"web-document-write:property-required"===e.name)).length;return(0,s.w8)(r?.url)?(t?.messages?.push(new o.A("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&i?null:r}beforeSave(){}};return(0,i._)([(0,n.M)({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],t.prototype,"id",void 0),(0,i._)([(0,l.w)("id",["id"])],t.prototype,"readId",null),(0,i._)([(0,n.M)(g.C1)],t.prototype,"listMode",void 0),(0,i._)([(0,p.K)("listMode")],t.prototype,"writeListMode",null),(0,i._)([(0,n.M)({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1},"web-scene":{name:"layerType",read:!1,write:{enabled:!0,ignoreOrigin:!0,layerContainerTypes:c.K}}}}})],t.prototype,"operationalLayerType",void 0),(0,i._)([(0,p.K)("operationalLayerType")],t.prototype,"writeOperationalLayerType",null),(0,i._)([(0,n.M)(g.ke)],t.prototype,"opacity",void 0),(0,i._)([(0,n.M)({type:Boolean,readOnly:!1})],t.prototype,"persistenceEnabled",void 0),(0,i._)([(0,n.M)({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],t.prototype,"title",void 0),(0,i._)([(0,p.K)("title"),(0,p.K)(["web-scene"],"title")],t.prototype,"writeTitle",null),(0,i._)([(0,n.M)({type:b.A,json:{origins:{"web-scene":{write:{layerContainerTypes:c.K}}}}})],t.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,l.w)("visibilityTimeExtent")],t.prototype,"readTimeExtent",null),(0,i._)([(0,p.K)(["portal-item","web-map","web-scene"],"visibilityTimeExtent",{visibilityTimeExtent:{type:[[a.jz,a.Uv]]}})],t.prototype,"writeTimeExtent",null),(0,i._)([(0,n.M)({type:Boolean,json:{origins:{"web-scene":{name:"visibility",write:{enabled:!0,layerContainerTypes:c.K}}},name:"visibility",write:!0}})],t.prototype,"visible",void 0),t=(0,i._)([(0,u.$)("esri.layers.mixins.OperationalLayer")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>S});var i=r(90237),o=r(92602),s=r(70333),n=r(78888),a=r(60999),l=r(49186),u=r(53966),p=r(97768),c=r(74887),d=r(84952),y=r(10107),m=(r(44208),r(87811),r(36005)),h=r(40608),f=r(43937),v=r(83531),g=r(20655),b=r(80812),T=r(41318),w=r(10407);const S=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new b.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await Promise.all([r.e(5356),r.e(1204)]).then(r.bind(r,41204));return(0,c.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.QP)(e),!0))))}async setUserPrivileges(e,t){if(!o.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:o}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",o)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,w.It)(r);let o,n;if(i)o=r.portal.url;else try{o=await(0,v.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!o||!(0,d.b8)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;n=await(s.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const a=!0,l=!1,u=!1;if(!n)return{features:{edit:a,fullEdit:l},content:{updateItem:u}};try{if(i?await r.reload():(r=new b.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return(0,w.It)(r)}catch(e){(0,c.QP)(e)}return{features:{edit:a,fullEdit:l},content:{updateItem:u}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=_.credential===t?_.user:await this._fetchEditingUser(e);return _.credential=t,_.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,o=g.A.getDefault();if(o&&o.loaded&&(0,d.S8)(o.restUrl)===(0,d.S8)(i))return o.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,p=await(0,a.Ke)((0,n.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?T.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||g.A.getDefault());return r&&i&&!(0,d.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,y.M)({type:b.default})],t.prototype,"portalItem",null),(0,i._)([(0,m.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,y.M)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,y.M)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,y.M)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,y.M)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,h.$)("esri.layers.mixins.PortalLayer")],t),t},_={credential:null,user:null}},20437:(e,t,r)=>{r.d(t,{A:()=>f});var i,o=r(90237),s=r(66552),n=r(25482),a=r(10107),l=r(56507),u=(r(87811),r(44208),r(93223)),p=r(36005),c=r(40608),d=r(72088),y=r(98453);const m=new s.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let h=i=class extends n.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?m.fromJSON(r.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,o._)([(0,a.M)({type:String,json:{write:!0}})],h.prototype,"alias",void 0),(0,o._)([(0,a.M)({type:[String,Number],json:{write:{allowNull:!0}}})],h.prototype,"defaultValue",void 0),(0,o._)([(0,a.M)()],h.prototype,"description",void 0),(0,o._)([(0,p.w)("description")],h.prototype,"readDescription",null),(0,o._)([(0,a.M)({types:d.gK,json:{read:{reader:d.rS},write:!0}})],h.prototype,"domain",void 0),(0,o._)([(0,a.M)({type:Boolean,json:{write:!0}})],h.prototype,"editable",void 0),(0,o._)([(0,a.M)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],h.prototype,"length",void 0),(0,o._)([(0,a.M)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,o._)([(0,a.M)({type:Boolean,json:{write:!0}})],h.prototype,"nullable",void 0),(0,o._)([(0,u.e)(y.m)],h.prototype,"type",void 0),(0,o._)([(0,a.M)()],h.prototype,"valueType",void 0),(0,o._)([(0,p.w)("valueType",["description"])],h.prototype,"readValueType",null),(0,o._)([(0,a.M)({type:Boolean,json:{read:!1}})],h.prototype,"visible",void 0),h=i=(0,o._)([(0,c.$)("esri.layers.support.Field")],h);const f=h},95466:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(49186),o=r(25482),s=r(53966),n=r(91869),a=r(3330),l=r(30524),u=r(56400),p=r(96285);const c=new Map;class d{static fromJSON(e){return new d(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new d(e.fields??[],f(e))}static fromLayerJSON(e){return new d(e.fields??[],f(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=m(t);if(t&&i){const o=y(t);this._fieldsMap.set(t,e),this._fieldsMap.set(o,e),this._normalizedFieldsMap.set(i,e),r.push(`${o}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(y(e))??this._normalizedFieldsMap.get(m(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(s.A.getLogger("esri.layers.support.FieldsIndex").error(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):h.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?a.GB.instance:t===u.n$?p.mQ.utcInstance:(0,n.tE)(c,t,(()=>p.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,o.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function y(e){return e.trim().toLowerCase()}function m(e){return(0,l.rS)(e)?.toLowerCase()??""}const h=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function f(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:o}=e,s=(i?"startField"in i?i.startField:i.startTimeField:"")??"",n=(i?"endField"in i?i.endField:i.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.ZS)(e.dateFieldsTimeReference):null,l=o?function(e){return"timeZone"in e}(o)?o.timeZone??a:o.dateFieldsTimeReference?(0,u.ZS)(o.dateFieldsTimeReference):a??u.n$:null,p=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.timeReference?(0,u.ZS)(i.timeReference):a:null,c=new Map([[y(o?.creationDateField??""),l],[y(o?.editDateField??""),l],[y(s),p],[y(n),p]]);for(const{name:i,type:o}of e.fields)if(h.has(o))t.set(i,u.L5);else if("date"!==o&&"esriFieldTypeDate"!==o)t.set(i,null);else if(r)t.set(i,u.L5);else{const e=c.get(y(i??""))??a;t.set(i,e)}return t}},72088:(e,t,r)=>{r.d(t,{rS:()=>M,gK:()=>_}),r(44208);var i,o=r(90237),s=r(4718),n=r(10107),a=(r(53966),r(93223)),l=r(40608),u=r(25482);r(87811);let p=i=class extends u.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,o._)([(0,n.M)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,o._)([(0,n.M)({type:[String,Number],json:{write:!0}})],p.prototype,"code",void 0),p=i=(0,o._)([(0,l.$)("esri.layers.support.CodedValue")],p);const c=new(r(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends u.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,o._)([(0,n.M)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,o._)([(0,a.e)(c)],d.prototype,"type",void 0),d=(0,o._)([(0,l.$)("esri.layers.support.Domain")],d);const y=d;var m;let h=m=class extends y{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new m({codedValues:(0,s.o8)(this.codedValues),name:this.name})}};(0,o._)([(0,n.M)({type:[p],json:{write:!0}})],h.prototype,"codedValues",void 0),(0,o._)([(0,a.e)({codedValue:"coded-value"})],h.prototype,"type",void 0),h=m=(0,o._)([(0,l.$)("esri.layers.support.CodedValueDomain")],h);const f=h;var v;r(49186);let g=v=class extends y{constructor(e){super(e),this.type="inherited"}clone(){return new v}};(0,o._)([(0,a.e)({inherited:"inherited"})],g.prototype,"type",void 0),g=v=(0,o._)([(0,l.$)("esri.layers.support.InheritedDomain")],g);const b=g;var T;let w=T=class extends y{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new T({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o._)([(0,n.M)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],w.prototype,"maxValue",void 0),(0,o._)([(0,n.M)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],w.prototype,"minValue",void 0),(0,o._)([(0,a.e)({range:"range"})],w.prototype,"type",void 0),w=T=(0,o._)([(0,l.$)("esri.layers.support.RangeDomain")],w);const S=w,_={key:"type",base:y,typeMap:{range:w,"coded-value":f,inherited:b}};function M(e){if(!e?.type)return null;switch(e.type){case"range":return S.fromJSON(e);case"codedValue":return f.fromJSON(e);case"inherited":return b.fromJSON(e)}return null}},98453:(e,t,r)=>{r.d(t,{m:()=>i});const i=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},92300:(e,t,r)=>{r.d(t,{V:()=>s,X:()=>o});var i=r(65864);function o(e){return{geometryType:(0,i.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function s(e,t,r){const o=(0,i.xD)(t);return e.map((e=>{const t=o.fromJSON(e);return t.spatialReference=r,t}))}},22671:(e,t,r)=>{r.d(t,{A:()=>b});var i,o=r(90237),s=r(59456),n=r(52106),a=r(66552),l=r(25482),u=r(4718),p=r(10107),c=(r(44208),r(53966),r(36005)),d=r(40608),y=r(43937),m=r(16930),h=r(65864),f=r(20437);const v=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let g=i=class extends l.oY{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=m.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const o=e[t],s=n.A.fromJSON(o),a=o.geometry?.spatialReference;null==s.geometry||a||(s.geometry.spatialReference=r);const l=o.aggregateGeometries,u=s.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],i=l[e],o=i?.spatialReference;null==t||o||(t.spatialReference=r)}i.push(s)}return i}writeGeometryType(e,t,r,i){if(e)return void v.write(e,t,r,i);const{features:o}=this;if(o)for(const e of o)if(null!=e?.geometry)return void v.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,h.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=m.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,u.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,o]}=e,s=this.features,n=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((o-e)/r)));for(let e=0,t=s.length;e<t;e++)n?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,o],scale:[s,n]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*s+i),(e=>o-e*n),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,o;const s=[];for(let n=0,a=e.length;n<a;n++){const a=e[n];if(n>0){const e=t(a[0]),n=r(a[1]);e===i&&n===o||(s.push([e-i,n-o]),i=e,o=n)}else i=t(a[0]),o=r(a[1]),s.push([i,o])}return s.length>0?s:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,h.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,s=i.length;e<s;e++){const s=i[e],n=this._quantizePoints(s,t,r);n&&o.push(n)}return o.length>0?((0,h.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,o){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,h.Bi)(e)?e.rings:e.paths;let n,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];for(let e=0,o=i.length;e<o;e++){const o=i[e];e>0?(n+=o[0],a+=o[1]):(n=o[0],a=o[1]),o[0]=t(n),o[1]=r(a)}}if(i&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=o(r[3])}}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=o(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let n,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(n+=i[0],a+=i[1]):(n=i[0],a=i[1]),i[0]=t(n),i[1]=r(a)}if(i&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2]),t[3]=o(t[3])}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2])}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=o(t[2])}}:null}};(0,o._)([(0,p.M)({type:String,json:{write:!0}})],g.prototype,"displayFieldName",void 0),(0,o._)([(0,p.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,p.M)({type:[n.A],json:{write:!0}})],g.prototype,"features",void 0),(0,o._)([(0,c.w)("features")],g.prototype,"readFeatures",null),(0,o._)([(0,p.M)({type:[f.A],json:{write:!0}})],g.prototype,"fields",void 0),(0,o._)([(0,p.M)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:v.read}}})],g.prototype,"geometryType",void 0),(0,o._)([(0,y.K)("geometryType")],g.prototype,"writeGeometryType",null),(0,o._)([(0,p.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasM",void 0),(0,o._)([(0,p.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasZ",void 0),(0,o._)([(0,p.M)({types:s.yR,json:{write:!0}})],g.prototype,"queryGeometry",void 0),(0,o._)([(0,c.w)("queryGeometry")],g.prototype,"readQueryGeometry",null),(0,o._)([(0,p.M)({type:m.A,json:{write:!0}})],g.prototype,"spatialReference",void 0),(0,o._)([(0,y.K)("spatialReference")],g.prototype,"writeSpatialReference",null),(0,o._)([(0,p.M)({json:{write:!0}})],g.prototype,"transform",void 0),g=i=(0,o._)([(0,d.$)("esri.rest.support.FeatureSet")],g),g.prototype.toJSON.isDefaultToJSON=!0;const b=g},2272:(e,t,r)=>{r.d(t,{Dl:()=>n,jV:()=>s,lF:()=>a}),r(92602),r(70333);var i=r(4718),o=r(84952);function s(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function n(e){return"string"==typeof e?(0,o.An)(e):(0,i.o8)(e)}function a(e,t,r){const i={};for(const o in e){if("declaredClass"===o)continue;const s=e[o];if(null!=s&&"function"!=typeof s)if(Array.isArray(s))i[o]=s.map((e=>a(e)));else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(r?.[o]);i[o]=t?e:JSON.stringify(e)}else i[o]=t?s:JSON.stringify(s);else i[o]=s}return i}r(926)}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3920,7136],{4902:(e,t,r)=>{r.d(t,{PH:()=>a,sA:()=>n});var i=r(90237),o=r(40608);let s=0;const n=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return t=(0,i._)([(0,o.$)("esri.core.Identifiable")],t),t},a=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:s++})}};return t=(0,i._)([(0,o.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};let l=class extends(n(class{})){};l=(0,i._)([(0,o.$)("esri.core.Identifiable")],l)},92071:(e,t,r)=>{r.d(t,{P:()=>b,L:()=>T});var i=r(90237),o=r(69622),s=r(76953),n=r(4718),a=r(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,r=this._originStores[a.Gr.DEFAULTS];r&&r.forEach(((e,r)=>{t.set(r,(0,n.o8)(e),a.Gr.DEFAULTS)}));for(let r=a.Gr.SERVICE;r<a.AU;r++){const i=this._originStores[r];i&&i.forEach(((i,o)=>{e&&e.has(o)||t.set(o,(0,n.o8)(i),r)}))}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=a.Gr.USER){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=r){const i=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),i!==t}return!1}delete(e,t=a.Gr.USER){const r=this._originStores[t];if(!r)return;const i=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return i}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],i=r?.get(e),o=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,t),o!==i}originOf(e){return this._propertyOriginMap.get(e)||a.Gr.DEFAULTS}forEach(e){this._values.forEach(e)}}var u=r(45917),p=r(88620),c=r(40608);const d=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,p.oY)(this),r=t.store,i=new l;t.store=i,(0,s.k)(t,r,i)}read(e,t){(0,u.L)(this,e,t)}getAtOrigin(e,t){const r=y(this),i=(0,a.aB)(t);if("string"==typeof e)return r.get(e,i);const o={};return e.forEach((e=>{o[e]=r.get(e,i)})),o}originOf(e){return(0,a.OL)(this.originIdOf(e))}originIdOf(e){return y(this).originOf(e)}revert(e,t){const r=y(this),i=(0,a.aB)(t),o=(0,p.oY)(this);let s;s="string"==typeof e?"*"===e?r.keys(i):[e]:e,s.forEach((e=>{o.invalidate(e),r.revert(e,i),o.commit(e)}))}};return t=(0,i._)([(0,c.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function y(e){return(0,p.oY)(e).store}let m=class extends(d(o.A)){};m=(0,i._)([(0,c.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],m);var h=r(16649),f=r(49422);const v=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return g(this).delete(e,(0,a.aB)(t))}write(e,t){return(0,f.M)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,p.oY)(this).setAtOrigin(e,t,(0,a.aB)(r))}removeOrigin(e){const t=g(this),r=(0,a.aB)(e),i=t.keys(r);for(const e of i)t.originOf(e)===r&&t.set(e,t.get(e,r),a.Gr.USER)}updateOrigin(e,t){const r=g(this),i=(0,a.aB)(t),o=(0,h.Jt)(this,e);for(let t=i+1;t<a.AU;++t)r.delete(e,t);r.set(e,o,i)}toJSON(e){return this.write({},e)}};return t=(0,i._)([(0,c.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function g(e){return(0,p.oY)(e).store}const b=e=>{let t=class extends(v(d(e))){constructor(...e){super(...e)}};return t=(0,i._)([(0,c.$)("esri.core.MultiOriginJSONSupport")],t),t};let T=class extends(b(o.A)){};T=(0,i._)([(0,c.$)("esri.core.MultiOriginJSONSupport")],T)},46130:(e,t,r)=>{r.d(t,{v:()=>o});var i=r(76553);function o(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,i.H)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},76553:(e,t,r)=>{function i(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{H:()=>i})},3330:(e,t,r)=>{r.d(t,{GB:()=>o,Qo:()=>n,Y4:()=>s});var i=r(96285);class o{}function s(e){return e instanceof i.bo?e===o.instance:"unknown"===e?.toString().toLowerCase()}function n(e){return s(e)?o.instance:e}o.instance=new i.oh("Etc/UTC")},70328:(e,t,r)=>{r.d(t,{BI:()=>w,Ej:()=>h,Hq:()=>u,Ie:()=>b,Jt:()=>T,Ne:()=>f,RF:()=>a,_F:()=>y,aI:()=>_,fA:()=>s,gX:()=>m,hZ:()=>g,iT:()=>l,is:()=>S,qv:()=>M,vI:()=>v,v_:()=>A,vt:()=>o,w1:()=>n});var i=r(5443);function o(e=A){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,r,i,s,n,a=o()){return a[0]=e,a[1]=t,a[2]=r,a[3]=i,a[4]=s,a[5]=n,a}function n(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t,r=0,i=t.length/3){let o=e[0],s=e[1],n=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<i;e++)o=Math.min(o,t[r+3*e]),s=Math.min(s,t[r+3*e+1]),n=Math.min(n,t[r+3*e+2]),a=Math.max(a,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=o,e[1]=s,e[2]=n,e[3]=a,e[4]=l,e[5]=u}function p(e){return e[0]>=e[3]?0:e[3]-e[0]}function c(e){return e[1]>=e[4]?0:e[4]-e[1]}function d(e){return e[2]>=e[5]?0:e[5]-e[2]}function y(e){const t=p(e),r=d(e),i=c(e);return Math.sqrt(t*t+r*r+i*i)}function m(e,t=[0,0,0]){return t[0]=e[0]+p(e)/2,t[1]=e[1]+c(e)/2,t[2]=e[2]+d(e)/2,t}function h(e,t=[0,0,0]){return t[0]=p(e),t[1]=c(e),t[2]=d(e),t}function f(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function v(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function g(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function b(e){return e?g(e,M):o(M)}function T(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function w(e,t,r,i,o){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=o,e[5]=Number.POSITIVE_INFINITY,e}function S(e){return 6===e.length}function _(e,t,r){if(null==e||null==t)return e===t;if(!S(e)||!S(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(19419);const M=[1/0,1/0,1/0,-1/0,-1/0,-1/0],A=[0,0,0,0,0,0];o()},17136:(e,t,r)=>{r.d(t,{el:()=>S});var i=r(92602),o=r(49186),s=r(53966),n=r(39829),a=r(82799),l=r(80754),u=r(21325),p=r(28735),c=(r(59456),r(78888)),d=r(65864),y=r(2272),m=r(84952),h=r(92300);const f=()=>s.A.getLogger("esri.geometry.support.normalizeUtils");function v(e){return"polygon"===e[0].type}function g(e){return"polyline"===e[0].type}function b(e,t,r){if(t){const t=function(e,t){if(!(e instanceof a.A||e instanceof n.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw f().error(e),new o.A(e)}const r=(0,l.r8)(e),i=[];for(const e of r){const r=[];i.push(r),r.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const o=e[i][0],s=e[i][1],n=e[i+1][0],a=e[i+1][1],l=Math.sqrt((n-o)*(n-o)+(a-s)*(a-s)),u=(a-s)/l,p=(n-o)/l,c=l/t;if(c>1){for(let e=1;e<=c-1;e++){const i=e*t,n=p*i+o,a=u*i+s;r.push([n,a])}const e=(l+Math.floor(c-1)*t)/2,i=p*e+o,n=u*e+s;r.push([i,n])}r.push([n,a])}}return function(e){return"polygon"===e.type}(e)?new n.A({rings:i,spatialReference:e.spatialReference}):new a.A({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.ci)(t,!0)}return r&&(e=(0,l.kS)(e,r)),e}function T(e,t,r){if(Array.isArray(e)){const i=e[0];if(i>t){const r=(0,l.kd)(i,t);e[0]=i+r*(-2*t)}else if(i<r){const t=(0,l.kd)(i,r);e[0]=i+t*(-2*r)}}else{const i=e.x;if(i>t){const r=(0,l.kd)(i,t);e=e.clone().offset(r*(-2*t),0)}else if(i<r){const t=(0,l.kd)(i,r);e=e.clone().offset(t*(-2*r),0)}}return e}function w(e,t){let r=-1;for(let i=0;i<t.cutIndexes.length;i++){const o=t.cutIndexes[i],s=t.geometries[i],n=(0,l.r8)(s);for(let e=0;e<n.length;e++){const t=n[e];t.some((r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const i=t[e][0];r=i>r?i:r}r=Number(r.toFixed(9));const i=-360*(0,l.kd)(r,180);for(let r=0;r<t.length;r++){const t=s.getPoint(e,r);s.setPoint(e,r,t.clone().offset(i,0))}return!0}}))}if(o===r){if(v(e))for(const t of(0,l.r8)(s))e[o]=e[o].addRing(t);else if(g(e))for(const t of(0,l.r8)(s))e[o]=e[o].addPath(t)}else r=o,e[o]=s}return e}async function S(e,t,r){if(!Array.isArray(e))return S([e],t);t&&"string"!=typeof t&&f().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const o="string"==typeof t?t:t?.url??i.A.geometryServiceUrl;let s,v,g,_,M,A,N,O,I=0;const D=[],C=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,v=(0,u.Vp)(s),g=s.isWebMercator,A=g?102100:4326,_=l.j7[A].maxX,M=l.j7[A].minX,N=l.j7[A].plus180Line,O=l.j7[A].minus180Line),v)if("mesh"===t.type)C.push(t);else if("point"===t.type)C.push(T(t.clone(),_,M));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>T(e,_,M))),C.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,v);C.push(e.rings?new n.A(e):e)}else if(t.extent){const e=t.extent,r=(0,l.kd)(e.xmin,M)*(2*_);let i=0===r?t.clone():(0,l.kS)(t.clone(),r);e.offset(r,0);let{xmin:o,xmax:s}=e;o=Number(o.toFixed(9)),s=Number(s.toFixed(9)),e.intersects(N)&&s!==_?(I=s>I?s:I,i=b(i,g),D.push(i),C.push("cut")):e.intersects(O)&&o!==M?(I=s*(2*_)>I?s*(2*_):I,i=b(i,g,360),D.push(i),C.push("cut")):C.push(i)}else C.push(t.clone());else C.push(t);else C.push(t);let L=(0,l.kd)(I,_),j=-90;const F=L,B=new a.A;for(;L>0;){const e=360*L-180;B.addPath([[e,j],[e,-1*j]]),j*=-1,L--}if(D.length>0&&F>0){const t=w(D,await async function(e,t,r,i){const o=(0,y.Dl)(e),s=t[0].spatialReference,n={...i,responseType:"json",query:{...o.query,f:"json",sr:(0,u.YX)(s),target:JSON.stringify({geometryType:(0,d.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},a=await(0,c.A)(o.path+"/cut",n),{cutIndexes:l,geometries:p=[]}=a.data;return{cutIndexes:l,geometries:p.map((e=>{const t=(0,d.rS)(e);return t.spatialReference=s,t}))}}(o,D,B,r)),i=[],s=[];for(let r=0;r<C.length;r++){const o=C[r];if("cut"!==o)s.push(o);else{const o=t.shift(),n=e[r];null!=n&&"polygon"===n.type&&n.rings&&n.rings.length>1&&o.rings.length>=n.rings.length?(i.push(o),s.push("simplify")):s.push(g?(0,p.Gh)(o):o)}}if(!i.length)return s;const n=await async function(e,t,r){const i="string"==typeof e?(0,m.An)(e):e,o=t[0].spatialReference,s=(0,d.$B)(t[0]),n={...r,query:{...i.query,f:"json",sr:(0,u.YX)(o),geometries:JSON.stringify((0,h.X)(t))}},{data:a}=await(0,c.A)(i.path+"/simplify",n);return(0,h.V)(a.geometries,s,o)}(o,i,r),a=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?a.push(t):a.push(g?(0,p.Gh)(n.shift()):n.shift())}return a}const P=[];for(let e=0;e<C.length;e++){const t=C[e];if("cut"!==t)P.push(t);else{const e=D.shift();P.push(!0===g?(0,p.Gh)(e):e)}}return P}},80754:(e,t,r)=>{r.d(t,{j7:()=>n,kS:()=>l,kd:()=>a,r8:()=>u});var i=r(82799),o=r(16930),s=r(65864);const n={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:o.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:o.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const r=u(e);for(const e of r)for(const r of e)r[0]+=t;return e}function u(e){return(0,s.Bi)(e)?e.rings:e.paths}},4146:(e,t,r)=>{r.d(t,{A:()=>T});var i=r(90237),o=(r(59456),r(78888)),s=r(49186),n=r(65529),a=r(4902),l=r(92474),u=r(53966),p=r(74887),c=r(84952),d=r(10107),y=(r(44208),r(87811),r(40608)),m=r(92602),h=r(79677),f=r(5443),v=r(16930);let g=0,b=class extends(n.A.EventedMixin((0,a.sA)(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.A(-180,-90,180,90,v.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+g++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=v.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(7982).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(5613).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",o=r?.portal?.url||m.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+o+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,p.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,c.An)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,o.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,d.M)({type:String})],b.prototype,"attributionDataUrl",void 0),(0,i._)([(0,d.M)({readOnly:!0})],b.prototype,"effectiveVisible",null),(0,i._)([(0,d.M)({type:f.A})],b.prototype,"fullExtent",void 0),(0,i._)([(0,d.M)({readOnly:!0})],b.prototype,"hasAttributionData",null),(0,i._)([(0,d.M)({type:String,clonable:!1})],b.prototype,"id",void 0),(0,i._)([(0,d.M)({type:Boolean,nonNullable:!0})],b.prototype,"legendEnabled",void 0),(0,i._)([(0,d.M)({type:["show","hide","hide-children"]})],b.prototype,"listMode",void 0),(0,i._)([(0,d.M)({type:Number,range:{min:0,max:1},nonNullable:!0})],b.prototype,"opacity",void 0),(0,i._)([(0,d.M)({clonable:!1})],b.prototype,"parent",void 0),(0,i._)([(0,d.M)({readOnly:!0})],b.prototype,"parsedUrl",null),(0,i._)([(0,d.M)({type:Boolean,readOnly:!0})],b.prototype,"persistenceEnabled",void 0),(0,i._)([(0,d.M)({type:Boolean})],b.prototype,"popupEnabled",void 0),(0,i._)([(0,d.M)({type:Boolean})],b.prototype,"attributionVisible",void 0),(0,i._)([(0,d.M)({type:v.A})],b.prototype,"spatialReference",void 0),(0,i._)([(0,d.M)({type:String})],b.prototype,"title",void 0),(0,i._)([(0,d.M)({readOnly:!0,json:{read:!1}})],b.prototype,"type",void 0),(0,i._)([(0,d.M)()],b.prototype,"url",void 0),(0,i._)([(0,d.M)({type:h.A})],b.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,d.M)({type:Boolean,nonNullable:!0})],b.prototype,"visible",void 0),b=(0,i._)([(0,y.$)("esri.layers.Layer")],b);const T=b},97550:(e,t,r)=>{r.r(t),r.d(t,{default:()=>pr});var i=r(90237),o=r(92602),s=r(59456),n=r(52106),a=r(13874),l=(r(86162),r(94409),r(65345),r(42980),r(20917),r(92438),r(96576),r(93618),r(65494)),u=r(53966),p=r(5503),c=r(49186),d=r(92071),y=r(93637),m=r(74887),h=r(36708),f=r(83047),v=r(84952),g=r(10107),b=(r(44208),r(87811),r(36005)),T=r(40608),w=r(43937),S=r(46130),_=r(5443),M=r(57251),A=r(21325),N=r(4146),O=r(63074),I=r(16131),D=r(8303),C=r(25036),L=r(60694),j=r(61147),F=r(25482),B=r(53930);let P=class extends F.oY{constructor(e){super(e),this.break=new B.A({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}}),this.first=new B.A({color:[0,255,0],size:20,outline:{color:[255,255,255],width:4}}),this.unlocated=new B.A({color:[255,0,0],size:12,outline:{color:[255,255,255],width:3}}),this.last=new B.A({color:[255,0,0],size:20,outline:{color:[255,255,255],width:4}}),this.middle=new B.A({color:[51,51,51],size:12,outline:{color:[0,122,194],width:3}}),this.waypoint=new B.A({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}})}};(0,i._)([(0,g.M)({types:j.wC})],P.prototype,"break",void 0),(0,i._)([(0,g.M)({types:j.wC})],P.prototype,"first",void 0),(0,i._)([(0,g.M)({types:j.wC})],P.prototype,"unlocated",void 0),(0,i._)([(0,g.M)({types:j.wC})],P.prototype,"last",void 0),(0,i._)([(0,g.M)({types:j.wC})],P.prototype,"middle",void 0),(0,i._)([(0,g.M)({types:j.wC})],P.prototype,"waypoint",void 0),P=(0,i._)([(0,T.$)("esri.layers.support.RouteStopSymbols")],P);const R=P;var E=r(31593),x=r(94985);let U=class extends F.oY{constructor(e){super(e),this.directionLines=new E.A({color:[0,122,194],width:6}),this.directionPoints=new B.A({color:[255,255,255],size:6,outline:{color:[0,122,194],width:2}}),this.pointBarriers=new B.A({style:"x",size:10,outline:{color:[255,0,0],width:3}}),this.polygonBarriers=new x.A({color:[255,170,0,.6],outline:{width:7.5,color:[255,0,0,.6]}}),this.polylineBarriers=new E.A({width:7.5,color:[255,85,0,.7]}),this.routeInfo=new E.A({width:8,color:[20,89,127]}),this.stops=new R}};(0,i._)([(0,g.M)({types:j.Y7})],U.prototype,"directionLines",void 0),(0,i._)([(0,g.M)({types:j.wC})],U.prototype,"directionPoints",void 0),(0,i._)([(0,g.M)({types:j.wC})],U.prototype,"pointBarriers",void 0),(0,i._)([(0,g.M)({types:j.Ac})],U.prototype,"polygonBarriers",void 0),(0,i._)([(0,g.M)({types:j.Y7})],U.prototype,"polylineBarriers",void 0),(0,i._)([(0,g.M)({types:j.Y7})],U.prototype,"routeInfo",void 0),(0,i._)([(0,g.M)({type:R})],U.prototype,"stops",void 0),U=(0,i._)([(0,T.$)("esri.layers.support.RouteSymbols")],U);const J=U;var k=r(20655),G=r(80812),V=r(10407),W=r(78888),q=r(2272),$=r(93223),z=r(66552);const K={esriCentimeters:"centimeters",esriDecimalDegrees:"decimal-degrees",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriPoints:"points",esriUnknownUnits:"unknown",esriYards:"yards"},Y=(0,z.O)()(K),Z=((0,z.O)()({...K,esriIntFeet:"international-feet",esriIntInches:"international-inches",esriIntMiles:"international-miles",esriIntNauticalMiles:"international-nautical-miles",esriIntYards:"international-yards"}),(0,z.O)()({esriAcres:"international-acres",esriAcresUS:"us-acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-international-feet",esriSquareFeetUS:"square-us-feet",esriSquareInches:"square-international-inches",esriSquareInchesUS:"square-us-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-international-miles",esriSquareMilesUS:"square-us-miles",esriSquareMillimeters:"square-millimeters",esriSquareYards:"square-international-yards",esriSquareYardsUS:"square-us-yards",esriUnknownAreaUnits:"unknown"}),(0,z.O)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards"})),H=((0,z.O)()({esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds"}),(0,z.O)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards",esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds",esriNAUKilometersPerHour:"kilometers-per-hour",esriNAUMilesPerHour:"miles-per-hour",esriNAUUnknown:"unknown"})),X=(0,z.O)()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),Q=(0,z.O)()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),ee=((0,z.O)()({esriNAOutputPolygonNone:"none",esriNAOutputPolygonSimplified:"simplified",esriNAOutputPolygonDetailed:"detailed"}),(0,z.O)()({esriNFSBAllowBacktrack:"allow-backtrack",esriNFSBAtDeadEndsOnly:"at-dead-ends-only",esriNFSBNoBacktrack:"no-backtrack",esriNFSBAtDeadEndsAndIntersections:"at-dead-ends-and-intersections"})),te=((0,z.O)()({esriNATravelDirectionFromFacility:"from-facility",esriNATravelDirectionToFacility:"to-facility"}),(0,z.O)()({esriNATimeOfDayNotUsed:"not-used",esriNATimeOfDayUseAsStartTime:"start",esriNATimeOfDayUseAsEndTime:"end"}),(0,z.O)()({AUTOMOBILE:"automobile",TRUCK:"truck",WALK:"walk",OTHER:"other"})),re=(0,z.O)()({0:"either-side-of-vehicle",1:"right-side-of-vehicle",2:"left-side-of-vehicle",3:"no-u-turn"},{useNumericKeys:!0}),ie=(0,z.O)()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),oe=(0,z.O)()({0:"ok",1:"not-located",2:"network-element-not-located",3:"element-not-traversable",4:"invalid-field-values",5:"not-reached",6:"time-window-violation",7:"not-located-on-closest"},{useNumericKeys:!0}),se=(0,z.O)()({1:"right",2:"left"},{useNumericKeys:!0}),ne=(0,z.O)()({0:"restriction",1:"scaled-cost",2:"added-cost"},{useNumericKeys:!0}),ae=(0,z.O)()({0:"permit",1:"restrict"},{useNumericKeys:!0}),le=(0,z.O)()({1:"header",50:"arrive",51:"depart",52:"straight",100:"on-ferry",101:"off-ferry",102:"central-fork",103:"roundabout",104:"u-turn",150:"door",151:"stairs",152:"elevator",153:"escalator",154:"pedestrian-ramp",200:"left-fork",201:"left-ramp",202:"clockwise-roundabout",203:"left-handed-u-turn",204:"bear-left",205:"left-turn",206:"sharp-left",207:"left-turn-and-immediate-left-turn",208:"left-turn-and-immediate-right-turn",300:"right-fork",301:"right-ramp",302:"counter-clockwise-roundabout",303:"right-handed-u-turn",304:"bear-right",305:"right-turn",306:"sharp-right",307:"right-turn-and-immediate-left-turn",308:"right-turn-and-immediate-right-turn",400:"up-elevator",401:"up-escalator",402:"up-stairs",500:"down-elevator",501:"down-escalator",502:"down-stairs",1e3:"general-event",1001:"landmark",1002:"time-zone-change",1003:"traffic-event",1004:"scaled-cost-barrier-event",1005:"boundary-crossing",1006:"restriction-violation",1007:"lane"},{useNumericKeys:!0}),ue=(0,z.O)()({0:"unknown",1:"segment",2:"maneuver-segment",3:"restriction-violation",4:"scaled-cost-barrier",5:"heavy-traffic",6:"slow-traffic",7:"moderate-traffic"},{useNumericKeys:!0}),pe=(0,z.O)()({"NA Campus":"campus","NA Desktop":"desktop","NA Navigation":"navigation"}),ce=(0,z.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters"},{ignoreUnknown:!1}),de=(0,z.O)()({Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),ye=(0,z.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters",Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),me=(0,z.O)()({"Any Hazmat Prohibited":"any-hazmat-prohibited","Avoid Carpool Roads":"avoid-carpool-roads","Avoid Express Lanes":"avoid-express-lanes","Avoid Ferries":"avoid-ferries","Avoid Gates":"avoid-gates","Avoid Limited Access Roads":"avoid-limited-access-roads","Avoid Private Roads":"avoid-private-roads","Avoid Roads Unsuitable for Pedestrians":"avoid-roads-unsuitable-for-pedestrians","Avoid Stairways":"avoid-stairways","Avoid Toll Roads":"avoid-toll-roads","Avoid Toll Roads for Trucks":"avoid-toll-roads-for-trucks","Avoid Truck Restricted Roads":"avoid-truck-restricted-roads","Avoid Unpaved Roads":"avoid-unpaved-roads","Axle Count Restriction":"axle-count-restriction","Driving a Bus":"driving-a-bus","Driving a Taxi":"driving-a-taxi","Driving a Truck":"driving-a-truck","Driving an Automobile":"driving-an-automobile","Driving an Emergency Vehicle":"driving-an-emergency-vehicle","Height Restriction":"height-restriction","Kingpin to Rear Axle Length Restriction":"kingpin-to-rear-axle-length-restriction","Length Restriction":"length-restriction","Preferred for Pedestrians":"preferred-for-pedestrians","Riding a Motorcycle":"riding-a-motorcycle","Roads Under Construction Prohibited":"roads-under-construction-prohibited","Semi or Tractor with One or More Trailers Prohibited":"semi-or-tractor-with-one-or-more-trailers-prohibited","Single Axle Vehicles Prohibited":"single-axle-vehicles-prohibited","Tandem Axle Vehicles Prohibited":"tandem-axle-vehicles-prohibited","Through Traffic Prohibited":"through-traffic-prohibited","Truck with Trailers Restriction":"truck-with-trailers-restriction","Use Preferred Hazmat Routes":"use-preferred-hazmat-routes","Use Preferred Truck Routes":"use-preferred-truck-routes",Walking:"walking","Weight Restriction":"weight-restriction"},{ignoreUnknown:!1}),he=(0,z.O)()({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),fe=(0,z.O)()({esriGeometryPoint:"point",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"envelope",esriGeometryMultipoint:"multipoint"}),ve=(0,z.O)()({esriNAUTCost:"cost",esriNAUTDescriptor:"descriptor",esriNAUTRestriction:"restriction",esriNAUTHierarchy:"hierarchy"}),ge=(0,z.O)()({esriDSTAltName:"alt-name",esriDSTArrive:"arrive",esriDSTBranch:"branch",esriDSTCrossStreet:"cross-street",esriDSTCumulativeLength:"cumulative-length",esriDSTDepart:"depart",esriDSTEstimatedArrivalTime:"estimated-arrival-time",esriDSTExit:"exit",esriDSTGeneral:"general",esriDSTLength:"length",esriDSTServiceTime:"service-time",esriDSTStreetName:"street-name",esriDSTSummary:"summary",esriDSTTime:"time",esriDSTTimeWindow:"time-window",esriDSTToward:"toward",esriDSTViolationTime:"violation-time",esriDSTWaitTime:"wait-time"});let be=class extends F.oY{constructor(e){super(e),this.dataType=null,this.name=null,this.parameterNames=null,this.restrictionUsageParameterName=null,this.timeNeutralAttributeName=null,this.trafficSupport=null,this.units=null,this.usageType=null}};(0,i._)([(0,g.M)({type:String})],be.prototype,"dataType",void 0),(0,i._)([(0,$.e)(ye,{ignoreUnknown:!1})],be.prototype,"name",void 0),(0,i._)([(0,g.M)({type:[String]})],be.prototype,"parameterNames",void 0),(0,i._)([(0,g.M)({type:String})],be.prototype,"restrictionUsageParameterName",void 0),(0,i._)([(0,$.e)(de,{ignoreUnknown:!1})],be.prototype,"timeNeutralAttributeName",void 0),(0,i._)([(0,g.M)({type:String})],be.prototype,"trafficSupport",void 0),(0,i._)([(0,$.e)(H)],be.prototype,"units",void 0),(0,i._)([(0,$.e)(ve)],be.prototype,"usageType",void 0),be=(0,i._)([(0,T.$)("esri.rest.support.NetworkAttribute")],be);const Te=be;let we=class extends F.oY{constructor(e){super(e),this.buildTime=null,this.name=null,this.networkAttributes=null,this.networkSources=null,this.state=null}};(0,i._)([(0,g.M)({type:Number})],we.prototype,"buildTime",void 0),(0,i._)([(0,g.M)({type:String})],we.prototype,"name",void 0),(0,i._)([(0,g.M)({type:[Te]})],we.prototype,"networkAttributes",void 0),(0,i._)([(0,g.M)()],we.prototype,"networkSources",void 0),(0,i._)([(0,g.M)({type:String})],we.prototype,"state",void 0),we=(0,i._)([(0,T.$)("esri.rest.support.NetworkDataset")],we);const Se=we;var _e=r(69540);let Me=class extends((0,_e.O)(F.oY)){constructor(e){super(e),this.attributeParameterValues=null,this.description=null,this.distanceAttributeName=null,this.id=null,this.impedanceAttributeName=null,this.name=null,this.restrictionAttributeNames=null,this.simplificationTolerance=null,this.simplificationToleranceUnits=null,this.timeAttributeName=null,this.type=null,this.useHierarchy=null,this.uturnAtJunctions=null}readId(e,t){return t.id??t.itemId??null}readRestrictionAttributes(e,t){const{restrictionAttributeNames:r}=t;return null==r?null:r.map((e=>me.fromJSON(e)))}writeRestrictionAttributes(e,t,r){null!=e&&(t[r]=e.map((e=>me.toJSON(e))))}};(0,i._)([(0,g.M)({type:[Object],json:{write:!0}})],Me.prototype,"attributeParameterValues",void 0),(0,i._)([(0,g.M)({type:String,json:{write:!0}})],Me.prototype,"description",void 0),(0,i._)([(0,$.e)(ce,{ignoreUnknown:!1})],Me.prototype,"distanceAttributeName",void 0),(0,i._)([(0,g.M)({type:String,json:{write:!0}})],Me.prototype,"id",void 0),(0,i._)([(0,b.w)("id",["id","itemId"])],Me.prototype,"readId",null),(0,i._)([(0,$.e)(ye,{ignoreUnknown:!1})],Me.prototype,"impedanceAttributeName",void 0),(0,i._)([(0,g.M)({type:String,json:{write:!0}})],Me.prototype,"name",void 0),(0,i._)([(0,g.M)({type:[String],json:{write:!0}})],Me.prototype,"restrictionAttributeNames",void 0),(0,i._)([(0,b.w)("restrictionAttributeNames")],Me.prototype,"readRestrictionAttributes",null),(0,i._)([(0,w.K)("restrictionAttributeNames")],Me.prototype,"writeRestrictionAttributes",null),(0,i._)([(0,g.M)({type:Number,json:{write:{allowNull:!0}}})],Me.prototype,"simplificationTolerance",void 0),(0,i._)([(0,$.e)(Y)],Me.prototype,"simplificationToleranceUnits",void 0),(0,i._)([(0,$.e)(de,{ignoreUnknown:!1})],Me.prototype,"timeAttributeName",void 0),(0,i._)([(0,$.e)(te)],Me.prototype,"type",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Me.prototype,"useHierarchy",void 0),(0,i._)([(0,$.e)(ee)],Me.prototype,"uturnAtJunctions",void 0),Me=(0,i._)([(0,T.$)("esri.rest.support.TravelMode")],Me);const Ae=Me;let Ne=class extends F.oY{constructor(e){super(e),this.accumulateAttributeNames=null,this.attributeParameterValues=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}readAccumulateAttributes(e){return null==e?null:e.map((e=>ye.fromJSON(e)))}writeAccumulateAttributes(e,t,r){e?.length&&(t[r]=e.map((e=>ye.toJSON(e))))}get capabilities(){return{supportsNow:(this.currentVersion??10)>=10.81}}readDefaultTravelMode(e,t){const r=t.supportedTravelModes?.find((({id:e})=>e===t.defaultTravelMode))??t.supportedTravelModes?.find((({itemId:e})=>e===t.defaultTravelMode));return r?Ae.fromJSON(r):null}};(0,i._)([(0,g.M)()],Ne.prototype,"accumulateAttributeNames",void 0),(0,i._)([(0,b.w)("accumulateAttributeNames")],Ne.prototype,"readAccumulateAttributes",null),(0,i._)([(0,w.K)("accumulateAttributeNames")],Ne.prototype,"writeAccumulateAttributes",null),(0,i._)([(0,g.M)()],Ne.prototype,"attributeParameterValues",void 0),(0,i._)([(0,g.M)()],Ne.prototype,"capabilities",null),(0,i._)([(0,g.M)()],Ne.prototype,"currentVersion",void 0),(0,i._)([(0,g.M)()],Ne.prototype,"defaultTravelMode",void 0),(0,i._)([(0,b.w)("defaultTravelMode",["defaultTravelMode","supportedTravelModes"])],Ne.prototype,"readDefaultTravelMode",null),(0,i._)([(0,g.M)()],Ne.prototype,"directionsLanguage",void 0),(0,i._)([(0,$.e)(Z)],Ne.prototype,"directionsLengthUnits",void 0),(0,i._)([(0,g.M)()],Ne.prototype,"directionsSupportedLanguages",void 0),(0,i._)([(0,$.e)(de,{ignoreUnknown:!1})],Ne.prototype,"directionsTimeAttribute",void 0),(0,i._)([(0,g.M)()],Ne.prototype,"hasZ",void 0),(0,i._)([(0,$.e)(ye,{ignoreUnknown:!1})],Ne.prototype,"impedance",void 0),(0,i._)([(0,g.M)({type:Se})],Ne.prototype,"networkDataset",void 0),(0,i._)([(0,g.M)({type:[Ae]})],Ne.prototype,"supportedTravelModes",void 0),Ne=(0,i._)([(0,T.$)("esri.rest.support.NetworkServiceDescription")],Ne);const Oe=Ne;function Ie(e,t,r,i){i[r]=[t.length,t.length+e.length],e.forEach((e=>{t.push(e.geometry)}))}async function De(e,t,r){if(!e)throw new c.A("network-service:missing-url","Url to Network service is missing");const i=(0,q.jV)({f:"json",token:t},r),{data:o}=await(0,W.A)(e,i),s=o.currentVersion>=10.4?async function(e,t,r){try{const i=(0,q.jV)({f:"json",token:t},r),o=(0,v.UC)(e)+"/retrieveTravelModes",{data:{supportedTravelModes:s,defaultTravelMode:n}}=await(0,W.A)(o,i);return{supportedTravelModes:s,defaultTravelMode:n}}catch(e){throw new c.A("network-service:retrieveTravelModes","Could not get to the NAServer's retrieveTravelModes.",{error:e})}}(e,t,r):async function(e,t){const r=(0,q.jV)({f:"json"},t),{data:i}=await(0,W.A)(e.replace(/\/rest\/.*$/i,"/info"),r);if(!i?.owningSystemUrl)return{supportedTravelModes:[],defaultTravelMode:null};const{owningSystemUrl:o}=i,s=(0,v.UC)(o)+"/sharing/rest/portals/self",{data:n}=await(0,W.A)(s,r),a=(0,y.wc)("helperServices.routingUtilities.url",n);if(!a)return{supportedTravelModes:[],defaultTravelMode:null};const l=(0,q.Dl)(o),u=/\/solve$/i.test(l.path)?"Route":/\/solveclosestfacility$/i.test(l.path)?"ClosestFacility":"ServiceAreas",p=(0,q.jV)({f:"json",serviceName:u},t),c=(0,v.UC)(a)+"/GetTravelModes/execute",d=await(0,W.A)(c,p),m=[];let h=null;if(d?.data?.results?.length){const e=d.data.results;for(const t of e)if("supportedTravelModes"===t.paramName){if(t.value?.features)for(const{attributes:e}of t.value.features)if(e){const t=JSON.parse(e.TravelMode);m.push(t)}}else"defaultTravelMode"===t.paramName&&(h=t.value)}return{supportedTravelModes:m,defaultTravelMode:h}}(e,r),{defaultTravelMode:n,supportedTravelModes:a}=await s;return o.defaultTravelMode=n,o.supportedTravelModes=a,Oe.fromJSON(o)}var Ce=r(16649),Le=r(17136);function je(e,t){if(null==e)return null;const r={},i=new RegExp(`^${t}`,"i");for(const o of Object.keys(e))if(i.test(o)){const i=o.slice(t.length);r[ye.fromJSON(i)]=e[o]}return r}function Fe(e,t,r){if(null!=e){t.attributes||(t.attributes={});for(const i in e){const o=ye.toJSON(i);t.attributes[`${r}${o}`]=e[i]}}}function Be(e){const t={};for(const r of Object.keys(e)){const i=r;t[ye.fromJSON(i)]=e[r]}return t}function Pe(e){const t={};for(const r of Object.keys(e)){const i=r;t[ye.toJSON(i)]=e[r]}return t}function Re(e,t){return null==e||null==t?null:Math.round((e-t)/6e4)}function Ee(e){const t=e.toJSON(),r=t;return r.accumulateAttributeNames&&=t.accumulateAttributeNames?.join(),r.attributeParameterValues&&=JSON.stringify(t.attributeParameterValues),r.barriers&&=JSON.stringify(t.barriers),r.outSR&&=t.outSR?.wkid,r.overrides&&=JSON.stringify(t.overrides),r.polygonBarriers&&=JSON.stringify(t.polygonBarriers),r.polylineBarriers&&=JSON.stringify(t.polylineBarriers),r.restrictionAttributeNames&&=t.restrictionAttributeNames?.join(),r.stops&&=JSON.stringify(t.stops),r.travelMode&&=JSON.stringify(t.travelMode),r}var xe=r(22671),Ue=r(4576);const Je=new z.J({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let ke=class extends F.oY{constructor(e){super(e),this.description=null,this.type=null}};(0,i._)([(0,g.M)({type:String,json:{write:!0}})],ke.prototype,"description",void 0),(0,i._)([(0,g.M)({type:String,json:{read:Je.read,write:Je.write}})],ke.prototype,"type",void 0),ke=(0,i._)([(0,T.$)("esri.rest.support.GPMessage")],ke);const Ge=ke,Ve=new z.J({0:"informative",1:"process-definition",2:"process-start",3:"process-stop",50:"warning",100:"error",101:"empty",200:"abort"});let We=class extends Ge{constructor(e){super(e),this.type=null}};(0,i._)([(0,g.M)({type:String,json:{read:Ve.read,write:Ve.write}})],We.prototype,"type",void 0),We=(0,i._)([(0,T.$)("esri.rest.support.NAMessage")],We);const qe=We;let $e=class extends F.oY{constructor(e){super(e)}};(0,i._)([(0,g.M)({json:{read:{source:"string"}}})],$e.prototype,"text",void 0),(0,i._)([(0,$.e)(ge,{name:"stringType"})],$e.prototype,"type",void 0),$e=(0,i._)([(0,T.$)("esri.rest.support.DirectionsString")],$e);const ze=$e;var Ke=r(86738);let Ye=class extends F.oY{constructor(e){super(e),this.arriveTime=null,this.arriveTimeOffset=null,this.geometry=null,this.strings=null}readArriveTimeOffset(e,t){return Re(t.ETA,t.arriveTimeUTC)}readGeometry(e,t){return Ke.A.fromJSON(t.point)}};(0,i._)([(0,g.M)({type:Date,json:{read:{source:"arriveTimeUTC"}}})],Ye.prototype,"arriveTime",void 0),(0,i._)([(0,g.M)()],Ye.prototype,"arriveTimeOffset",void 0),(0,i._)([(0,b.w)("arriveTimeOffset",["arriveTimeUTC","ETA"])],Ye.prototype,"readArriveTimeOffset",null),(0,i._)([(0,g.M)({type:Ke.A})],Ye.prototype,"geometry",void 0),(0,i._)([(0,b.w)("geometry",["point"])],Ye.prototype,"readGeometry",null),(0,i._)([(0,g.M)({type:[ze]})],Ye.prototype,"strings",void 0),Ye=(0,i._)([(0,T.$)("esri.rest.support.DirectionsEvent")],Ye);const Ze=Ye;var He=r(82799);let Xe=class extends n.A{constructor(e){super(e),this.events=null,this.geometry=null,this.strings=null}readGeometry(e,t){const r=function(e){if(null==e||""===e)return null;let t=0,r=0,i=0,o=0;const s=[];let n,a,l,u,p,c,d,y,m=0,h=0,f=0;if(p=e.match(/((\+|-)[^+\-|]+|\|)/g),p||(p=[]),0===parseInt(p[m],32)){m=2;const e=parseInt(p[m],32);m++,c=parseInt(p[m],32),m++,1&e&&(h=p.indexOf("|")+1,d=parseInt(p[h],32),h++),2&e&&(f=p.indexOf("|",h)+1,y=parseInt(p[f],32),f++)}else c=parseInt(p[m],32),m++;for(;m<p.length&&"|"!==p[m];){n=parseInt(p[m],32)+t,m++,t=n,a=parseInt(p[m],32)+r,m++,r=a;const e=[n/c,a/c];h&&(u=parseInt(p[h],32)+i,h++,i=u,e.push(u/d)),f&&(l=parseInt(p[f],32)+o,f++,o=l,e.push(l/y)),s.push(e)}return{paths:[s],hasZ:h>0,hasM:f>0}}(t.compressedGeometry);return null!=r?He.A.fromJSON(r):null}};(0,i._)([(0,g.M)({type:[Ze]})],Xe.prototype,"events",void 0),(0,i._)([(0,g.M)({type:He.A})],Xe.prototype,"geometry",void 0),(0,i._)([(0,b.w)("geometry",["compressedGeometry"])],Xe.prototype,"readGeometry",null),(0,i._)([(0,g.M)({type:[ze]})],Xe.prototype,"strings",void 0),Xe=(0,i._)([(0,T.$)("esri.rest.support.DirectionsFeature")],Xe);const Qe=Xe;var et=r(16930);let tt=class extends xe.A{constructor(e){super(e),this.extent=null,this.features=[],this.geometryType="polyline",this.routeId=null,this.routeName=null,this.totalDriveTime=null,this.totalLength=null,this.totalTime=null}readFeatures(e,t){if(!e)return[];const r=t.summary.envelope.spatialReference??t.spatialReference,i=r&&et.A.fromJSON(r);return e.map((e=>{const t=Qe.fromJSON(e);if(null!=t.geometry&&(t.geometry.spatialReference=i),null!=t.events)for(const e of t.events)null!=e.geometry&&(e.geometry.spatialReference=i);return t}))}get mergedGeometry(){return this.features?function(e,t){if(0===e.length)return new He.A({spatialReference:t});const r=[];for(const t of e)for(const e of t.paths)r.push(...e);const i=[];r.forEach(((e,t)=>{0!==t&&e[0]===r[t-1][0]&&e[1]===r[t-1][1]||i.push(e)}));const{hasM:o,hasZ:s}=e[0];return new He.A({hasM:o,hasZ:s,paths:[i],spatialReference:t})}(this.features.map((({geometry:e})=>e)),this.extent.spatialReference):null}get strings(){return this.features.flatMap((({strings:e})=>e)).filter(Ue.Ru)}};(0,i._)([(0,g.M)({type:_.A,json:{read:{source:"summary.envelope"}}})],tt.prototype,"extent",void 0),(0,i._)([(0,g.M)({nonNullable:!0})],tt.prototype,"features",void 0),(0,i._)([(0,b.w)("features")],tt.prototype,"readFeatures",null),(0,i._)([(0,g.M)()],tt.prototype,"geometryType",void 0),(0,i._)([(0,g.M)({readOnly:!0})],tt.prototype,"mergedGeometry",null),(0,i._)([(0,g.M)()],tt.prototype,"routeId",void 0),(0,i._)([(0,g.M)()],tt.prototype,"routeName",void 0),(0,i._)([(0,g.M)({value:null,readOnly:!0})],tt.prototype,"strings",null),(0,i._)([(0,g.M)({json:{read:{source:"summary.totalDriveTime"}}})],tt.prototype,"totalDriveTime",void 0),(0,i._)([(0,g.M)({json:{read:{source:"summary.totalLength"}}})],tt.prototype,"totalLength",void 0),(0,i._)([(0,g.M)({json:{read:{source:"summary.totalTime"}}})],tt.prototype,"totalTime",void 0),tt=(0,i._)([(0,T.$)("esri.rest.support.DirectionsFeatureSet")],tt);const rt=tt;let it=class extends F.oY{constructor(e){super(e),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}};(0,i._)([(0,g.M)({type:xe.A,json:{write:!0}})],it.prototype,"directionLines",void 0),(0,i._)([(0,g.M)({type:xe.A,json:{write:!0}})],it.prototype,"directionPoints",void 0),(0,i._)([(0,g.M)({type:rt,json:{write:!0}})],it.prototype,"directions",void 0),(0,i._)([(0,g.M)({type:n.A,json:{write:!0}})],it.prototype,"route",void 0),(0,i._)([(0,g.M)({type:String,json:{write:!0}})],it.prototype,"routeName",void 0),(0,i._)([(0,g.M)({type:[n.A],json:{write:!0}})],it.prototype,"stops",void 0),(0,i._)([(0,g.M)({type:xe.A,json:{write:!0}})],it.prototype,"traversedEdges",void 0),(0,i._)([(0,g.M)({type:xe.A,json:{write:!0}})],it.prototype,"traversedJunctions",void 0),(0,i._)([(0,g.M)({type:xe.A,json:{write:!0}})],it.prototype,"traversedTurns",void 0),it=(0,i._)([(0,T.$)("esri.rest.support.RouteResult")],it);const ot=it;function st(e){return e?xe.A.fromJSON(e).features.filter(Ue.Ru):[]}let nt=class extends F.oY{constructor(e){super(e),this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.routeResults=null}readPointBarriers(e,t){return st(t.barriers)}readPolylineBarriers(e){return st(e)}readPolygonBarriers(e){return st(e)}};(0,i._)([(0,g.M)({type:[qe]})],nt.prototype,"messages",void 0),(0,i._)([(0,g.M)({type:[n.A]})],nt.prototype,"pointBarriers",void 0),(0,i._)([(0,b.w)("pointBarriers",["barriers"])],nt.prototype,"readPointBarriers",null),(0,i._)([(0,g.M)({type:[n.A]})],nt.prototype,"polylineBarriers",void 0),(0,i._)([(0,b.w)("polylineBarriers")],nt.prototype,"readPolylineBarriers",null),(0,i._)([(0,g.M)({type:[n.A]})],nt.prototype,"polygonBarriers",void 0),(0,i._)([(0,b.w)("polygonBarriers")],nt.prototype,"readPolygonBarriers",null),(0,i._)([(0,g.M)({type:[ot]})],nt.prototype,"routeResults",void 0),nt=(0,i._)([(0,T.$)("esri.rest.support.RouteSolveResult")],nt);const at=nt;function lt(e){return e instanceof xe.A}async function ut(e,t,r){const i=[],o=[],s={},n={},a=(0,q.Dl)(e),{path:l}=a;lt(t.stops)&&Ie(t.stops.features,o,"stops.features",s),lt(t.pointBarriers)&&Ie(t.pointBarriers.features,o,"pointBarriers.features",s),lt(t.polylineBarriers)&&Ie(t.polylineBarriers.features,o,"polylineBarriers.features",s),lt(t.polygonBarriers)&&Ie(t.polygonBarriers.features,o,"polygonBarriers.features",s);const p=await(0,Le.el)(o);for(const e in s){const t=s[e];i.push(e),n[e]=p.slice(t[0],t[1])}if(function(e,t){for(let r=0;r<t.length;r++){const i=e[t[r]];if(i&&i.length)for(const e of i)if(null!=e&&e.hasZ)return!0}return!1}(n,i)){let e=null;try{e=await De(l,t.apiKey,r)}catch{}e&&!e.hasZ&&function(e,t){for(let r=0;r<t.length;r++){const i=e[t[r]];if(i&&i.length)for(const e of i)e.z=void 0}u.A.getLogger("esri.rest.networkService").warnOnce("The remote Network Analysis service is powered by a network dataset which is not Z-aware.\nZ-coordinates of the input geometry are ignored.")}(n,i)}for(const e in n)n[e].forEach(((r,i)=>{(0,Ce.Jt)(t,e)[i].geometry=r}));const c={...r,query:{...a.query,...Ee(t),f:"json"}},d=l.endsWith("/solve")?l:`${l}/solve`,{data:y}=await(0,W.A)(d,c);return function(e){const{barriers:t,directionLines:r,directionPoints:i,directions:o,messages:s,polygonBarriers:n,polylineBarriers:a,routes:l,stops:u,traversedEdges:p,traversedJunctions:c,traversedTurns:d}=e,y=e=>{const t=h.find((t=>t.routeName===e));if(null!=t)return t;const r={routeId:h.length+1,routeName:e};return h.push(r),r},m=e=>{const t=h.find((t=>t.routeId===e));if(null!=t)return t;const r={routeId:e,routeName:null};return h.push(r),r},h=[];l?.features.forEach(((e,t)=>{e.geometry.spatialReference=l.spatialReference??void 0;const r=e.attributes.Name,i=t+1;h.push({routeId:i,routeName:r,route:e})})),o?.forEach((e=>{const{routeName:t}=e;y(t).directions=e}));const f=u?.features.every((e=>null==e.attributes.RouteName))&&h.length>0?h[0].routeName:null;return u?.features.forEach((e=>{e.geometry&&(e.geometry.spatialReference??=u.spatialReference??void 0);const t=f??e.attributes.RouteName,r=y(t);r.stops??=[],r.stops.push(e)})),r?.features.forEach((e=>{const t=e.attributes.RouteID,i=m(t),{geometryType:o,spatialReference:s}=r;i.directionLines??={features:[],geometryType:o,spatialReference:s},i.directionLines.features.push(e)})),i?.features.forEach((e=>{const t=e.attributes.RouteID,r=m(t),{geometryType:o,spatialReference:s}=i;r.directionPoints??={features:[],geometryType:o,spatialReference:s},r.directionPoints.features.push(e)})),p?.features.forEach((e=>{const t=e.attributes.RouteID,r=m(t),{geometryType:i,spatialReference:o}=p;r.traversedEdges??={features:[],geometryType:i,spatialReference:o},r.traversedEdges.features.push(e)})),c?.features.forEach((e=>{const t=e.attributes.RouteID,r=m(t),{geometryType:i,spatialReference:o}=c;r.traversedJunctions??={features:[],geometryType:i,spatialReference:o},r.traversedJunctions.features.push(e)})),d?.features.forEach((e=>{const t=e.attributes.RouteID,r=m(t);r.traversedTurns??={features:[]},r.traversedTurns.features.push(e)})),at.fromJSON({routeResults:h,barriers:t,polygonBarriers:n,polylineBarriers:a,messages:s})}(y)}var pt;let ct=pt=class extends((0,_e.O)(F.oY)){constructor(e){super(e),this.directionLineType=null,this.directionPointId=null,this.distance=null,this.duration=null,this.fromLevel=null,this.geometry=null,this.objectId=null,this.popupTemplate=null,this.symbol=null,this.toLevel=null,this.type="direction-line"}static fromGraphic(e){return new pt({directionLineType:ue.fromJSON(e.attributes.DirectionLineType),directionPointId:e.attributes.DirectionPointID,distance:e.attributes.Meters,duration:e.attributes.Minutes,fromLevel:e.attributes.FromLevel??null,geometry:e.geometry,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,symbol:e.symbol,toLevel:e.attributes.ToLevel??null})}toGraphic(){const e={ObjectID:this.objectId,DirectionLineType:null!=this.directionLineType?ue.toJSON(this.directionLineType):null,DirectionPointID:this.directionPointId,Meters:this.distance,Minutes:this.duration};return null!=this.fromLevel&&(e.FromLevel=this.fromLevel),null!=this.toLevel&&(e.ToLevel=this.toLevel),new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};ct.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"DirectionLineType",alias:"Line Type",type:"esriFieldTypeInteger"},{name:"DirectionPointID",alias:"Direction Point ID",type:"esriFieldTypeInteger"},{name:"FromLevel",alias:"From Level",type:"esriFieldTypeInteger"},{name:"Meters",alias:"Meters",type:"esriFieldTypeDouble"},{name:"Minutes",alias:"Minutes",type:"esriFieldTypeDouble"},{name:"ToLevel",alias:"To Level",type:"esriFieldTypeInteger"}],(0,i._)([(0,g.M)({type:ue.apiValues,json:{read:{source:"attributes.DirectionLineType",reader:ue.read}}})],ct.prototype,"directionLineType",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.DirectionPointID"}}})],ct.prototype,"directionPointId",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.Meters"}}})],ct.prototype,"distance",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.Minutes"}}})],ct.prototype,"duration",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.FromLevel"}}})],ct.prototype,"fromLevel",void 0),(0,i._)([(0,g.M)({type:He.A})],ct.prototype,"geometry",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.ObjectID"}}})],ct.prototype,"objectId",void 0),(0,i._)([(0,g.M)({type:a.A})],ct.prototype,"popupTemplate",void 0),(0,i._)([(0,g.M)({types:j.Es})],ct.prototype,"symbol",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.ToLevel"}}})],ct.prototype,"toLevel",void 0),(0,i._)([(0,g.M)({readOnly:!0,json:{read:!1}})],ct.prototype,"type",void 0),ct=pt=(0,i._)([(0,T.$)("esri.rest.support.DirectionLine")],ct);const dt=ct;var yt;let mt=yt=class extends((0,_e.O)(F.oY)){constructor(e){super(e),this.alternateName=null,this.arrivalTime=null,this.arrivalTimeOffset=null,this.azimuth=null,this.branchName=null,this.directionPointType=null,this.displayText=null,this.exitName=null,this.geometry=null,this.intersectingName=null,this.level=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.sequence=null,this.shortVoiceInstruction=null,this.stopId=null,this.symbol=null,this.towardName=null,this.type="direction-point",this.voiceInstruction=null}readArrivalTime(e,t){return null!=t.attributes.ArrivalTime?new Date(t.attributes.ArrivalTime):null}static fromGraphic(e){return new yt({alternateName:e.attributes.AlternateName??null,arrivalTime:null!=e.attributes.ArrivalTime?new Date(e.attributes.ArrivalTime):null,arrivalTimeOffset:e.attributes.ArrivalUTCOffset??null,azimuth:e.attributes.Azimuth??null,branchName:e.attributes.BranchName??null,directionPointType:le.fromJSON(e.attributes.DirectionPointType),displayText:e.attributes.DisplayText??null,exitName:e.attributes.ExitName??null,geometry:e.geometry,intersectingName:e.attributes.IntersectingName??null,level:e.attributes.Level??null,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,sequence:e.attributes.Sequence,shortVoiceInstruction:e.attributes.ShortVoiceInstruction??null,stopId:e.attributes.StopID??null,symbol:e.symbol,towardName:e.attributes.TowardName??null,voiceInstruction:e.attributes.VoiceInstruction??null})}toGraphic(){const e={ObjectID:this.objectId,DirectionPointType:null!=this.directionPointType?le.toJSON(this.directionPointType):null,Sequence:this.sequence,StopID:this.stopId};return null!=this.alternateName&&(e.AlternateName=this.alternateName),null!=this.arrivalTime&&(e.ArrivalTime=this.arrivalTime.getTime()),null!=this.arrivalTimeOffset&&(e.ArrivalUTCOffset=this.arrivalTimeOffset),null!=this.azimuth&&(e.Azimuth=this.azimuth),null!=this.branchName&&(e.BranchName=this.branchName),null!=this.displayText&&(e.DisplayText=this.displayText),null!=this.exitName&&(e.ExitName=this.exitName),null!=this.intersectingName&&(e.IntersectingName=this.intersectingName),null!=this.level&&(e.Level=this.level),null!=this.name&&(e.Name=this.name),null!=this.shortVoiceInstruction&&(e.ShortVoiceInstruction=this.shortVoiceInstruction),null!=this.towardName&&(e.TowardName=this.towardName),null!=this.voiceInstruction&&(e.VoiceInstruction=this.voiceInstruction),new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};mt.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"AlternateName",alias:"Alternative Name",type:"esriFieldTypeString"},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate"},{name:"ArrivalUTCOffset",alias:"Arrival Time Offset",type:"esriFieldTypeInteger"},{name:"Azimuth",alias:"Azimuth",type:"esriFieldTypeDouble"},{name:"BranchName",alias:"Branch Name",type:"esriFieldTypeString"},{name:"DirectionPointType",alias:"Directions Point Type",type:"esriFieldTypeInteger"},{name:"DisplayText",alias:"Display Text",type:"esriFieldTypeString"},{name:"ExitName",alias:"Exit Name",type:"esriFieldTypeString"},{name:"IntersectingName",alias:"Intersecting Name",type:"esriFieldTypeString"},{name:"Level",alias:"Level",type:"esriFieldTypeInteger"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger"},{name:"ShortVoiceInstruction",alias:"Short Voice Instruction",type:"esriFieldTypeString"},{name:"StopID",alias:"Stop ID",type:"esriFieldTypeInteger"},{name:"TowardName",alias:"Toward Name",type:"esriFieldTypeString"},{name:"VoiceInstruction",alias:"Voice Instruction",type:"esriFieldTypeString"}],(0,i._)([(0,g.M)({json:{read:{source:"attributes.AlternateName"}}})],mt.prototype,"alternateName",void 0),(0,i._)([(0,g.M)()],mt.prototype,"arrivalTime",void 0),(0,i._)([(0,b.w)("arrivalTime",["attributes.ArrivalTime"])],mt.prototype,"readArrivalTime",null),(0,i._)([(0,g.M)({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],mt.prototype,"arrivalTimeOffset",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.Azimuth"}}})],mt.prototype,"azimuth",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.BranchName"}}})],mt.prototype,"branchName",void 0),(0,i._)([(0,g.M)({type:le.apiValues,json:{read:{source:"attributes.DirectionPointType",reader:le.read}}})],mt.prototype,"directionPointType",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.DisplayText"}}})],mt.prototype,"displayText",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.ExitName"}}})],mt.prototype,"exitName",void 0),(0,i._)([(0,g.M)({type:Ke.A})],mt.prototype,"geometry",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.IntersectingName"}}})],mt.prototype,"intersectingName",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.Level"}}})],mt.prototype,"level",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.Name"}}})],mt.prototype,"name",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.ObjectID"}}})],mt.prototype,"objectId",void 0),(0,i._)([(0,g.M)({type:a.A})],mt.prototype,"popupTemplate",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.Sequence"}}})],mt.prototype,"sequence",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.ShortVoiceInstruction"}}})],mt.prototype,"shortVoiceInstruction",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.StopID"}}})],mt.prototype,"stopId",void 0),(0,i._)([(0,g.M)({types:j.Es})],mt.prototype,"symbol",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.TowardName"}}})],mt.prototype,"towardName",void 0),(0,i._)([(0,g.M)({readOnly:!0,json:{read:!1}})],mt.prototype,"type",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.VoiceInstruction"}}})],mt.prototype,"voiceInstruction",void 0),mt=yt=(0,i._)([(0,T.$)("esri.rest.support.DirectionPoint")],mt);const ht=mt;var ft;let vt=ft=class extends((0,_e.O)(F.oY)){constructor(e){super(e),this.addedCost=null,this.barrierType=null,this.costs=null,this.curbApproach=null,this.fullEdge=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.sideOfEdge=null,this.sourceId=null,this.sourceOid=null,this.status=null,this.symbol=null,this.type="point-barrier"}readCosts(e,t){return je(t.attributes,"Attr_")}writeCosts(e,t){Fe(e,t,"Attr_")}static fromGraphic(e){return new ft({addedCost:e.attributes.AddedCost??null,barrierType:null!=e.attributes.BarrierType?ne.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Be(JSON.parse(e.attributes.Costs)):null,curbApproach:null!=e.attributes.CurbApproach?re.fromJSON(e.attributes.CurbApproach):null,fullEdge:null!=e.attributes.FullEdge?ae.fromJSON(e.attributes.FullEdge):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,status:null!=e.attributes.Status?oe.fromJSON(e.attributes.Status):null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,AddedCost:this.addedCost,BarrierType:null!=this.barrierType?ne.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(Pe(this.costs)):null,CurbApproach:null!=this.curbApproach?re.toJSON(this.curbApproach):null,FullEdge:null!=this.fullEdge?ae.toJSON(this.fullEdge):null,Name:this.name,Status:null!=this.status?oe.toJSON(this.status):null};return new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};vt.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"AddedCost",alias:"Added Cost",type:"esriFieldTypeDouble"},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger"},{name:"Costs",alias:"Costs",type:"esriFieldTypeString"},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger"},{name:"FullEdge",alias:"Full Edge",type:"esriFieldTypeInteger"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"Status",alias:"Status",type:"esriFieldTypeInteger"}],(0,i._)([(0,g.M)()],vt.prototype,"addedCost",void 0),(0,i._)([(0,g.M)({type:ne.apiValues,json:{name:"attributes.BarrierType",read:{reader:ne.read},write:{writer:ne.write}}})],vt.prototype,"barrierType",void 0),(0,i._)([(0,g.M)()],vt.prototype,"costs",void 0),(0,i._)([(0,b.w)("costs",["attributes"])],vt.prototype,"readCosts",null),(0,i._)([(0,w.K)("costs")],vt.prototype,"writeCosts",null),(0,i._)([(0,g.M)({constructOnly:!0,type:re.apiValues,json:{read:{source:"attributes.CurbApproach",reader:re.read}}})],vt.prototype,"curbApproach",void 0),(0,i._)([(0,g.M)({type:ae.apiValues,json:{name:"attributes.FullEdge",read:{reader:ae.read},write:{writer:ae.write}}})],vt.prototype,"fullEdge",void 0),(0,i._)([(0,g.M)({type:Ke.A,json:{write:!0}})],vt.prototype,"geometry",void 0),(0,i._)([(0,g.M)({json:{name:"attributes.Name"}})],vt.prototype,"name",void 0),(0,i._)([(0,g.M)({json:{name:"attributes.ObjectID"}})],vt.prototype,"objectId",void 0),(0,i._)([(0,g.M)({type:a.A})],vt.prototype,"popupTemplate",void 0),(0,i._)([(0,g.M)({type:se.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:se.read}}})],vt.prototype,"sideOfEdge",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.SourceID"}}})],vt.prototype,"sourceId",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.SourceOID"}}})],vt.prototype,"sourceOid",void 0),(0,i._)([(0,g.M)({type:oe.apiValues,json:{read:{source:"attributes.Status",reader:oe.read}}})],vt.prototype,"status",void 0),(0,i._)([(0,g.M)({types:j.Es})],vt.prototype,"symbol",void 0),(0,i._)([(0,g.M)({readOnly:!0,json:{read:!1}})],vt.prototype,"type",void 0),vt=ft=(0,i._)([(0,T.$)("esri.rest.support.PointBarrier")],vt);const gt=vt;var bt,Tt=r(39829);let wt=bt=class extends((0,_e.O)(F.oY)){constructor(e){super(e),this.barrierType=null,this.costs=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.scaleFactor=null,this.symbol=null,this.type="polygon-barrier"}readCosts(e,t){return je(t.attributes,"Attr_")}writeCosts(e,t){Fe(e,t,"Attr_")}static fromGraphic(e){return new bt({barrierType:null!=e.attributes.BarrierType?ne.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Be(JSON.parse(e.attributes.Costs)):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:e.attributes.ScaleFactor??null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,BarrierType:null!=this.barrierType?ne.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(Pe(this.costs)):null,Name:this.name??null,ScaleFactor:this.scaleFactor??null};return new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};wt.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger"},{name:"Costs",alias:"Costs",type:"esriFieldTypeString"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble"}],(0,i._)([(0,g.M)({type:ne.apiValues,json:{name:"attributes.BarrierType",read:{reader:ne.read},write:{writer:ne.write}}})],wt.prototype,"barrierType",void 0),(0,i._)([(0,g.M)()],wt.prototype,"costs",void 0),(0,i._)([(0,b.w)("costs",["attributes"])],wt.prototype,"readCosts",null),(0,i._)([(0,w.K)("costs")],wt.prototype,"writeCosts",null),(0,i._)([(0,g.M)({type:Tt.A,json:{write:!0}})],wt.prototype,"geometry",void 0),(0,i._)([(0,g.M)({json:{name:"attributes.Name"}})],wt.prototype,"name",void 0),(0,i._)([(0,g.M)({json:{name:"attributes.ObjectID"}})],wt.prototype,"objectId",void 0),(0,i._)([(0,g.M)({type:a.A})],wt.prototype,"popupTemplate",void 0),(0,i._)([(0,g.M)()],wt.prototype,"scaleFactor",void 0),(0,i._)([(0,g.M)({types:j.Es})],wt.prototype,"symbol",void 0),(0,i._)([(0,g.M)({readOnly:!0,json:{read:!1}})],wt.prototype,"type",void 0),wt=bt=(0,i._)([(0,T.$)("esri.rest.support.PolygonBarrier")],wt);const St=wt;var _t;let Mt=_t=class extends((0,_e.O)(F.oY)){constructor(e){super(e),this.barrierType=null,this.costs=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.scaleFactor=null,this.symbol=null,this.type="polyline-barrier"}readCosts(e,t){return je(t.attributes,"Attr_")}static fromGraphic(e){return new _t({barrierType:null!=e.attributes.BarrierType?ne.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Be(JSON.parse(e.attributes.Costs)):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:e.attributes.ScaleFactor??null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,BarrierType:null!=this.barrierType?ne.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(Pe(this.costs)):null,Name:this.name,ScaleFactor:this.scaleFactor};return new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};Mt.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger"},{name:"Costs",alias:"Costs",type:"esriFieldTypeString"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble"}],(0,i._)([(0,g.M)({type:ne.apiValues,json:{read:{source:"attributes.BarrierType",reader:ne.read}}})],Mt.prototype,"barrierType",void 0),(0,i._)([(0,g.M)()],Mt.prototype,"costs",void 0),(0,i._)([(0,b.w)("costs",["attributes"])],Mt.prototype,"readCosts",null),(0,i._)([(0,g.M)({type:He.A,json:{write:!0}})],Mt.prototype,"geometry",void 0),(0,i._)([(0,g.M)({json:{name:"attributes.Name"}})],Mt.prototype,"name",void 0),(0,i._)([(0,g.M)({json:{name:"attributes.ObjectID"}})],Mt.prototype,"objectId",void 0),(0,i._)([(0,g.M)({type:a.A})],Mt.prototype,"popupTemplate",void 0),(0,i._)([(0,g.M)()],Mt.prototype,"scaleFactor",void 0),(0,i._)([(0,g.M)({types:j.Es})],Mt.prototype,"symbol",void 0),(0,i._)([(0,g.M)({readOnly:!0,json:{read:!1}})],Mt.prototype,"type",void 0),Mt=_t=(0,i._)([(0,T.$)("esri.rest.support.PolylineBarrier")],Mt);const At=Mt;let Nt=class extends F.oY{constructor(e){super(e),this.accumulateAttributes=null,this.directionsLanguage=null,this.findBestSequence=null,this.preserveFirstStop=null,this.preserveLastStop=null,this.startTimeIsUTC=null,this.timeWindowsAreUTC=null,this.travelMode=null}readAccumulateAttributes(e){return null==e?null:e.map((e=>ye.fromJSON(e)))}writeAccumulateAttributes(e,t,r){e?.length&&(t[r]=e.map((e=>ye.toJSON(e))))}};(0,i._)([(0,g.M)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],Nt.prototype,"accumulateAttributes",void 0),(0,i._)([(0,b.w)("accumulateAttributes")],Nt.prototype,"readAccumulateAttributes",null),(0,i._)([(0,w.K)("accumulateAttributes")],Nt.prototype,"writeAccumulateAttributes",null),(0,i._)([(0,g.M)({type:String,json:{write:!0}})],Nt.prototype,"directionsLanguage",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Nt.prototype,"findBestSequence",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Nt.prototype,"preserveFirstStop",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Nt.prototype,"preserveLastStop",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Nt.prototype,"startTimeIsUTC",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Nt.prototype,"timeWindowsAreUTC",void 0),(0,i._)([(0,g.M)({type:Ae,json:{write:!0}})],Nt.prototype,"travelMode",void 0),Nt=(0,i._)([(0,T.$)("esri.rest.support.RouteSettings")],Nt);const Ot=Nt;var It;let Dt=It=class extends((0,_e.O)(F.oY)){constructor(e){super(e),this.analysisSettings=null,this.endTime=null,this.endTimeOffset=null,this.firstStopId=null,this.geometry=null,this.lastStopId=null,this.messages=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.startTime=null,this.startTimeOffset=null,this.stopCount=null,this.symbol=null,this.totalCosts=null,this.totalDistance=null,this.totalDuration=null,this.totalLateDuration=null,this.totalViolations=null,this.totalWait=null,this.totalWaitDuration=null,this.type="route-info",this.version="1.0.0"}readEndTime(e,t){return null!=t.attributes.EndTimeUTC?new Date(t.attributes.EndTimeUTC):null}readEndTimeOffset(e,t){return Re(t.attributes.EndTime,t.attributes.EndTimeUTC)}readStartTime(e,t){return null!=t.attributes.StartTimeUTC?new Date(t.attributes.StartTimeUTC):null}readStartTimeOffset(e,t){return Re(t.attributes.StartTime,t.attributes.StartTimeUTC)}readTotalCosts(e,t){return je(t.attributes,"Total_")}readTotalViolations(e,t){return je(t.attributes,"TotalViolation_")}readTotalWait(e,t){return je(t.attributes,"TotalWait_")}static fromGraphic(e){return new It({analysisSettings:null!=e.attributes.AnalysisSettings?Ot.fromJSON(JSON.parse(e.attributes.AnalysisSettings)):null,endTime:null!=e.attributes.EndTime?new Date(e.attributes.EndTime):null,endTimeOffset:e.attributes.EndUTCOffset??null,geometry:e.geometry,messages:null!=e.attributes.Messages?JSON.parse(e.attributes.Messages):null,name:e.attributes.RouteName,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,startTime:null!=e.attributes.StartTime?new Date(e.attributes.StartTime):null,startTimeOffset:e.attributes.StartUTCOffset??null,symbol:e.symbol,totalCosts:null!=e.attributes.TotalCosts?Be(JSON.parse(e.attributes.TotalCosts)):null,totalDistance:e.attributes.TotalMeters??null,totalDuration:e.attributes.TotalMinutes??null,totalLateDuration:e.attributes.TotalLateMinutes??null,totalWaitDuration:e.attributes.TotalWaitMinutes??null,version:e.attributes.Version})}toGraphic(){const e={ObjectID:this.objectId,AnalysisSettings:null!=this.analysisSettings?JSON.stringify(this.analysisSettings.toJSON()):null,EndTime:null!=this.endTime?this.endTime.getTime():null,EndUTCOffset:this.endTimeOffset,Messages:null!=this.messages?JSON.stringify(this.messages):null,RouteName:this.name,StartTime:null!=this.startTime?this.startTime.getTime():null,StartUTCOffset:this.startTimeOffset,TotalCosts:null!=this.totalCosts?JSON.stringify(Pe(this.totalCosts)):null,TotalLateMinutes:this.totalLateDuration,TotalMeters:this.totalDistance,TotalMinutes:this.totalDuration,TotalWaitMinutes:this.totalWaitDuration,Version:this.version};return new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};Dt.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"AnalysisSettings",alias:"Analysis Settings",type:"esriFieldTypeString"},{name:"EndTime",alias:"End Time",type:"esriFieldTypeDate"},{name:"EndUTCOffset",alias:"End Time Offset",type:"esriFieldTypeInteger"},{name:"Messages",alias:"Messages",type:"esriFieldTypeString"},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString"},{name:"StartTime",alias:"Start Time",type:"esriFieldTypeDate"},{name:"StartUTCOffset",alias:"Start Time Offset",type:"esriFieldTypeInteger"},{name:"TotalCosts",alias:"Total Costs",type:"esriFieldTypeString"},{name:"TotalLateMinutes",alias:"Total Late Minutes",type:"esriFieldTypeDouble"},{name:"TotalMeters",alias:"Total Meters",type:"esriFieldTypeDouble"},{name:"TotalMinutes",alias:"Total Minutes",type:"esriFieldTypeDouble"},{name:"TotalWaitMinutes",alias:"Total Wait Minutes",type:"esriFieldTypeDouble"},{name:"Version",alias:"Version",type:"esriFieldTypeString"}],(0,i._)([(0,g.M)()],Dt.prototype,"analysisSettings",void 0),(0,i._)([(0,g.M)()],Dt.prototype,"endTime",void 0),(0,i._)([(0,b.w)("endTime",["attributes.EndTimeUTC"])],Dt.prototype,"readEndTime",null),(0,i._)([(0,g.M)()],Dt.prototype,"endTimeOffset",void 0),(0,i._)([(0,b.w)("endTimeOffset",["attributes.EndTime","attributes.EndTimeUTC"])],Dt.prototype,"readEndTimeOffset",null),(0,i._)([(0,g.M)({json:{read:{source:"attributes.FirstStopID"}}})],Dt.prototype,"firstStopId",void 0),(0,i._)([(0,g.M)({type:He.A})],Dt.prototype,"geometry",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.LastStopID"}}})],Dt.prototype,"lastStopId",void 0),(0,i._)([(0,g.M)()],Dt.prototype,"messages",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.Name"}}})],Dt.prototype,"name",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.ObjectID"}}})],Dt.prototype,"objectId",void 0),(0,i._)([(0,g.M)({type:a.A})],Dt.prototype,"popupTemplate",void 0),(0,i._)([(0,g.M)()],Dt.prototype,"startTime",void 0),(0,i._)([(0,b.w)("startTime",["attributes.StartTimeUTC"])],Dt.prototype,"readStartTime",null),(0,i._)([(0,g.M)()],Dt.prototype,"startTimeOffset",void 0),(0,i._)([(0,b.w)("startTimeOffset",["attributes.StartTime","attributes.StartTimeUTC"])],Dt.prototype,"readStartTimeOffset",null),(0,i._)([(0,g.M)({json:{read:{source:"attributes.StopCount"}}})],Dt.prototype,"stopCount",void 0),(0,i._)([(0,g.M)({types:j.Es})],Dt.prototype,"symbol",void 0),(0,i._)([(0,g.M)()],Dt.prototype,"totalCosts",void 0),(0,i._)([(0,b.w)("totalCosts",["attributes"])],Dt.prototype,"readTotalCosts",null),(0,i._)([(0,g.M)()],Dt.prototype,"totalDistance",void 0),(0,i._)([(0,g.M)()],Dt.prototype,"totalDuration",void 0),(0,i._)([(0,g.M)()],Dt.prototype,"totalLateDuration",void 0),(0,i._)([(0,g.M)()],Dt.prototype,"totalViolations",void 0),(0,i._)([(0,b.w)("totalViolations",["attributes"])],Dt.prototype,"readTotalViolations",null),(0,i._)([(0,g.M)()],Dt.prototype,"totalWait",void 0),(0,i._)([(0,b.w)("totalWait",["attributes"])],Dt.prototype,"readTotalWait",null),(0,i._)([(0,g.M)()],Dt.prototype,"totalWaitDuration",void 0),(0,i._)([(0,g.M)({readOnly:!0,json:{read:!1}})],Dt.prototype,"type",void 0),(0,i._)([(0,g.M)()],Dt.prototype,"version",void 0),Dt=It=(0,i._)([(0,T.$)("esri.rest.support.RouteInfo")],Dt);const Ct=Dt;var Lt=r(56507);const jt={type:String,json:{read:{source:"token"},write:{target:"token"}}};var Ft=r(65864);let Bt=class extends((0,_e.O)(F.oY)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.geometry=null,this.geometryType=null,this.name=null,this.spatialRelationship=null,this.type="layer",this.where=null}};(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Bt.prototype,"doNotLocateOnRestrictedElements",void 0),(0,i._)([(0,g.M)({types:s.yR,json:{read:Ft.rS,write:!0}})],Bt.prototype,"geometry",void 0),(0,i._)([(0,$.e)(fe)],Bt.prototype,"geometryType",void 0),(0,i._)([(0,g.M)({type:String,json:{name:"layerName",write:!0}})],Bt.prototype,"name",void 0),(0,i._)([(0,$.e)(he,{name:"spatialRel"})],Bt.prototype,"spatialRelationship",void 0),(0,i._)([(0,g.M)({type:String,json:{write:!0}})],Bt.prototype,"type",void 0),(0,i._)([(0,g.M)({type:String,json:{write:!0}})],Bt.prototype,"where",void 0),Bt=(0,i._)([(0,T.$)("esri.rest.support.DataLayer")],Bt);const Pt=Bt;var Rt;let Et=Rt=class extends xe.A{constructor(e){super(e),this.doNotLocateOnRestrictedElements=null}clone(){return new Rt({doNotLocateOnRestrictedElements:this.doNotLocateOnRestrictedElements,...this.cloneProperties()})}};(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Et.prototype,"doNotLocateOnRestrictedElements",void 0),Et=Rt=(0,i._)([(0,T.$)("esri.rest.support.NetworkFeatureSet")],Et);const xt=Et;let Ut=class extends((0,_e.O)(F.oY)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.url=null}};(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Ut.prototype,"doNotLocateOnRestrictedElements",void 0),(0,i._)([(0,g.M)({type:String,json:{write:!0}})],Ut.prototype,"url",void 0),Ut=(0,i._)([(0,T.$)("esri.rest.support.NetworkUrl")],Ut);const Jt=Ut;var kt;let Gt=kt=class extends((0,_e.O)(F.oY)){constructor(e){super(e),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=!1,this.returnDirections=!1,this.returnPolygonBarriers=!1,this.returnPolylineBarriers=!1,this.returnRoutes=!0,this.returnStops=!1,this.returnTraversedEdges=null,this.returnTraversedJunctions=null,this.returnTraversedTurns=null,this.returnZ=!0,this.startTime=null,this.startTimeIsUTC=!0,this.stops=null,this.timeWindowsAreUTC=null,this.travelMode=null,this.useHierarchy=null,this.useTimeWindows=null}static from(e){return(0,Lt.PZ)(kt,e)}readAccumulateAttributes(e){return null==e?null:e.map((e=>ye.fromJSON(e)))}writeAccumulateAttributes(e,t,r){e?.length&&(t[r]=e.map((e=>ye.toJSON(e))))}writePointBarriers(e,t,r){Wt(e,t,r)}writePolygonBarrier(e,t,r){Wt(e,t,r)}writePolylineBarrier(e,t,r){Wt(e,t,r)}readRestrictionAttributes(e){return null==e?null:e.map((e=>me.fromJSON(e)))}writeRestrictionAttributes(e,t,r){e?.length&&(t[r]=e.map((e=>me.toJSON(e))))}readStartTime(e,t){const{startTime:r}=t;return null==r?null:"now"===r?"now":new Date(r)}writeStartTime(e,t){null!=e&&(t.startTime="now"===e?"now":e.getTime())}readStops(e,t){return function(e){return function(e){return e&&"type"in e}(e)?Pt.fromJSON(e):function(e){return e&&"url"in e}(e)?Jt.fromJSON(e):function(e){return e&&"features"in e&&"doNotLocateOnRestrictedElements"in e}(e)?xt.fromJSON(e):function(e){return e&&"features"in e}(e)?xe.A.fromJSON(e):null}(t.stops)}writeStops(e,t,r){Wt(e,t,r)}};(0,i._)([(0,g.M)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],Gt.prototype,"accumulateAttributes",void 0),(0,i._)([(0,b.w)("accumulateAttributes")],Gt.prototype,"readAccumulateAttributes",null),(0,i._)([(0,w.K)("accumulateAttributes")],Gt.prototype,"writeAccumulateAttributes",null),(0,i._)([(0,g.M)(jt)],Gt.prototype,"apiKey",void 0),(0,i._)([(0,g.M)({json:{write:!0}})],Gt.prototype,"attributeParameterValues",void 0),(0,i._)([(0,g.M)({type:String,json:{write:!0}})],Gt.prototype,"directionsLanguage",void 0),(0,i._)([(0,$.e)(Z)],Gt.prototype,"directionsLengthUnits",void 0),(0,i._)([(0,$.e)(X)],Gt.prototype,"directionsOutputType",void 0),(0,i._)([(0,$.e)(pe)],Gt.prototype,"directionsStyleName",void 0),(0,i._)([(0,$.e)(de,{name:"directionsTimeAttributeName",ignoreUnknown:!1})],Gt.prototype,"directionsTimeAttribute",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"findBestSequence",void 0),(0,i._)([(0,g.M)({type:Number,json:{write:!0}})],Gt.prototype,"geometryPrecision",void 0),(0,i._)([(0,g.M)({type:Number,json:{write:!0}})],Gt.prototype,"geometryPrecisionM",void 0),(0,i._)([(0,g.M)({type:Number,json:{write:!0}})],Gt.prototype,"geometryPrecisionZ",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"ignoreInvalidLocations",void 0),(0,i._)([(0,$.e)(ye,{name:"impedanceAttributeName",ignoreUnknown:!1})],Gt.prototype,"impedanceAttribute",void 0),(0,i._)([(0,g.M)({type:Number,json:{write:!0}})],Gt.prototype,"outputGeometryPrecision",void 0),(0,i._)([(0,$.e)(Y)],Gt.prototype,"outputGeometryPrecisionUnits",void 0),(0,i._)([(0,$.e)(Q)],Gt.prototype,"outputLines",void 0),(0,i._)([(0,g.M)({type:et.A,json:{name:"outSR",write:!0}})],Gt.prototype,"outSpatialReference",void 0),(0,i._)([(0,g.M)({json:{write:!0}})],Gt.prototype,"overrides",void 0),(0,i._)([(0,g.M)({json:{name:"barriers",write:!0}})],Gt.prototype,"pointBarriers",void 0),(0,i._)([(0,w.K)("pointBarriers")],Gt.prototype,"writePointBarriers",null),(0,i._)([(0,g.M)({json:{write:!0}})],Gt.prototype,"polygonBarriers",void 0),(0,i._)([(0,w.K)("polygonBarriers")],Gt.prototype,"writePolygonBarrier",null),(0,i._)([(0,g.M)({json:{write:!0}})],Gt.prototype,"polylineBarriers",void 0),(0,i._)([(0,w.K)("polylineBarriers")],Gt.prototype,"writePolylineBarrier",null),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"preserveFirstStop",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"preserveLastStop",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"preserveObjectID",void 0),(0,i._)([(0,g.M)({type:[String],json:{name:"restrictionAttributeNames",write:!0}})],Gt.prototype,"restrictionAttributes",void 0),(0,i._)([(0,b.w)("restrictionAttributes")],Gt.prototype,"readRestrictionAttributes",null),(0,i._)([(0,w.K)("restrictionAttributes")],Gt.prototype,"writeRestrictionAttributes",null),(0,i._)([(0,$.e)(ee)],Gt.prototype,"restrictUTurns",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"returnBarriers",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"returnDirections",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"returnPolygonBarriers",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"returnPolylineBarriers",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"returnRoutes",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"returnStops",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"returnTraversedEdges",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"returnTraversedJunctions",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"returnTraversedTurns",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"returnZ",void 0),(0,i._)([(0,g.M)({json:{write:!0}})],Gt.prototype,"startTime",void 0),(0,i._)([(0,b.w)("startTime")],Gt.prototype,"readStartTime",null),(0,i._)([(0,w.K)("startTime")],Gt.prototype,"writeStartTime",null),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"startTimeIsUTC",void 0),(0,i._)([(0,g.M)({json:{write:!0}})],Gt.prototype,"stops",void 0),(0,i._)([(0,b.w)("stops")],Gt.prototype,"readStops",null),(0,i._)([(0,w.K)("stops")],Gt.prototype,"writeStops",null),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"timeWindowsAreUTC",void 0),(0,i._)([(0,g.M)({type:Ae,json:{write:!0}})],Gt.prototype,"travelMode",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"useHierarchy",void 0),(0,i._)([(0,g.M)({type:Boolean,json:{write:!0}})],Gt.prototype,"useTimeWindows",void 0),Gt=kt=(0,i._)([(0,T.$)("esri.rest.support.RouteParameters")],Gt);const Vt=Gt;function Wt(e,t,r){null!=e&&(t[r]=p.A.isCollection(e)?{features:e.toArray().map((e=>e.toJSON()))}:e.toJSON())}var qt;let $t=qt=class extends((0,_e.O)(F.oY)){constructor(e){super(e),this.arriveCurbApproach=null,this.arriveTime=null,this.arriveTimeOffset=null,this.bearing=null,this.bearingTol=null,this.cumulativeCosts=null,this.cumulativeDistance=null,this.cumulativeDuration=null,this.curbApproach=null,this.departCurbApproach=null,this.departTime=null,this.departTimeOffset=null,this.distanceToNetworkInMeters=null,this.geometry=null,this.lateDuration=null,this.locationType=null,this.name=null,this.navLatency=null,this.objectId=null,this.popupTemplate=null,this.posAlong=null,this.routeName=null,this.serviceCosts=null,this.serviceDistance=null,this.serviceDuration=null,this.sequence=null,this.sideOfEdge=null,this.snapX=null,this.snapY=null,this.snapZ=null,this.sourceId=null,this.sourceOid=null,this.status=null,this.symbol=null,this.timeWindowEnd=null,this.timeWindowEndOffset=null,this.timeWindowStart=null,this.timeWindowStartOffset=null,this.type="stop",this.violations=null,this.waitDuration=null,this.wait=null}readArriveTimeOffset(e,t){return Re(t.attributes.ArriveTime,t.attributes.ArriveTimeUTC)}readCumulativeCosts(e,t){return je(t.attributes,"Cumul_")}readDepartTimeOffset(e,t){return Re(t.attributes.DepartTime,t.attributes.DepartTimeUTC)}readServiceCosts(e,t){return je(t.attributes,"Attr_")}writeServiceCosts(e,t){Fe(e,t,"Attr_")}writeTimeWindowEnd(e,t){null!=e&&(t.attributes||(t.attributes={}),t.attributes.TimeWindowEnd=e.getTime())}writeTimeWindowStart(e,t){null!=e&&(t.attributes||(t.attributes={}),t.attributes.TimeWindowStart=e.getTime())}readViolations(e,t){return je(t.attributes,"Violation_")}readWait(e,t){return je(t.attributes,"Wait_")}static fromGraphic(e){return new qt({arriveCurbApproach:null!=e.attributes.ArrivalCurbApproach?re.fromJSON(e.attributes.ArrivalCurbApproach):null,arriveTime:null!=e.attributes.ArrivalTime?new Date(e.attributes.ArrivalTime):null,arriveTimeOffset:e.attributes.ArrivalUTCOffset,cumulativeCosts:null!=e.attributes.CumulativeCosts?Be(JSON.parse(e.attributes.CumulativeCosts)):null,cumulativeDistance:e.attributes.CumulativeMeters??null,cumulativeDuration:e.attributes.CumulativeMinutes??null,curbApproach:null!=e.attributes.CurbApproach?re.fromJSON(e.attributes.CurbApproach):null,departCurbApproach:null!=e.attributes.DepartureCurbApproach?re.fromJSON(e.attributes.DepartureCurbApproach):null,departTime:null!=e.attributes.DepartureTime?new Date(e.attributes.DepartureTime):null,departTimeOffset:e.attributes.DepartureUTCOffset??null,geometry:e.geometry,lateDuration:e.attributes.LateMinutes??null,locationType:null!=e.attributes.LocationType?ie.fromJSON(e.attributes.LocationType):null,name:e.attributes.Name,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,routeName:e.attributes.RouteName,sequence:e.attributes.Sequence??null,serviceCosts:null!=e.attributes.ServiceCosts?Be(JSON.parse(e.attributes.ServiceCosts)):null,serviceDistance:e.attributes.ServiceMeters??null,serviceDuration:e.attributes.ServiceMinutes??null,status:null!=e.attributes.Status?oe.fromJSON(e.attributes.Status):null,symbol:e.symbol,timeWindowEnd:null!=e.attributes.TimeWindowEnd?new Date(e.attributes.TimeWindowEnd):null,timeWindowEndOffset:e.attributes.TimeWindowEndUTCOffset??null,timeWindowStart:null!=e.attributes.TimeWindowStart?new Date(e.attributes.TimeWindowStart):null,timeWindowStartOffset:e.attributes.TimeWindowStartUTCOffset??null,waitDuration:e.attributes.WaitMinutes??null})}toGraphic(){const e={ObjectID:this.objectId,ArrivalCurbApproach:null!=this.arriveCurbApproach?re.toJSON(this.arriveCurbApproach):null,ArrivalTime:null!=this.arriveTime?this.arriveTime.getTime():null,ArrivalUTCOffset:this.arriveTimeOffset,CumulativeCosts:null!=this.cumulativeCosts?JSON.stringify(Pe(this.cumulativeCosts)):null,CumulativeMeters:this.cumulativeDistance,CumulativeMinutes:this.cumulativeDuration,CurbApproach:null!=this.curbApproach?re.toJSON(this.curbApproach):null,DepartureCurbApproach:null!=this.departCurbApproach?re.toJSON(this.departCurbApproach):null,DepartureTime:null!=this.departTime?this.departTime.getTime():null,DepartureUTCOffset:this.departTimeOffset,LateMinutes:this.lateDuration,LocationType:null!=this.locationType?ie.toJSON(this.locationType):null,Name:this.name,RouteName:this.routeName,Sequence:this.sequence,ServiceCosts:null!=this.serviceCosts?JSON.stringify(Pe(this.serviceCosts)):null,ServiceMeters:this.serviceDistance,ServiceMinutes:this.serviceDuration,Status:null!=this.status?oe.toJSON(this.status):null,TimeWindowEnd:null!=this.timeWindowEnd?this.timeWindowEnd.getTime():null,TimeWindowEndUTCOffset:this.timeWindowEndOffset??this.arriveTimeOffset,TimeWindowStart:null!=this.timeWindowStart?this.timeWindowStart.getTime():null,TimeWindowStartUTCOffset:this.timeWindowStartOffset??this.arriveTimeOffset,WaitMinutes:this.waitDuration};return new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};$t.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"ArrivalCurbApproach",alias:"Arrival Curb Approach",type:"esriFieldTypeInteger"},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate"},{name:"ArrivalUTCOffset",alias:"Arrival Time",type:"esriFieldTypeInteger"},{name:"CumulativeCosts",alias:"Cumulative Costs",type:"esriFieldTypeString"},{name:"CumulativeMeters",alias:"Cumulative Meters",type:"esriFieldTypeDouble"},{name:"CumulativeMinutes",alias:"Cumulative Minutes",type:"esriFieldTypeDouble"},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger"},{name:"DepartureCurbApproach",alias:"Departure Curb Approach",type:"esriFieldTypeInteger"},{name:"DepartureTime",alias:"Departure Time",type:"esriFieldTypeDate"},{name:"DepartureUTCOffset",alias:"Departure Time",type:"esriFieldTypeInteger"},{name:"LateMinutes",alias:"Minutes Late",type:"esriFieldTypeDouble"},{name:"LocationType",alias:"Location Type",type:"esriFieldTypeInteger"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString"},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger"},{name:"ServiceCosts",alias:"Service Costs",type:"esriFieldTypeString"},{name:"ServiceMeters",alias:"Service Meters",type:"esriFieldTypeDouble"},{name:"ServiceMinutes",alias:"Service Minutes",type:"esriFieldTypeDouble"},{name:"Status",alias:"Status",type:"esriFieldTypeInteger"},{name:"TimeWindowEnd",alias:"Time Window End",type:"esriFieldTypeDate"},{name:"TimeWindowEndUTCOffset",alias:"Time Window End Offset",type:"esriFieldTypeInteger"},{name:"TimeWindowStart",alias:"Time Window Start",type:"esriFieldTypeDate"},{name:"TimeWindowStartUTCOffset",alias:"Time Window Start Offset",type:"esriFieldTypeInteger"},{name:"WaitMinutes",alias:"Minutes Wait",type:"esriFieldTypeDouble"}],(0,i._)([(0,g.M)({type:re.apiValues,json:{read:{source:"attributes.ArrivalCurbApproach",reader:re.read}}})],$t.prototype,"arriveCurbApproach",void 0),(0,i._)([(0,g.M)({type:Date,json:{read:{source:"attributes.ArriveTimeUTC"}}})],$t.prototype,"arriveTime",void 0),(0,i._)([(0,g.M)()],$t.prototype,"arriveTimeOffset",void 0),(0,i._)([(0,b.w)("arriveTimeOffset",["attributes.ArriveTime","attributes.ArriveTimeUTC"])],$t.prototype,"readArriveTimeOffset",null),(0,i._)([(0,g.M)({json:{name:"attributes.Bearing",read:!1,write:!0}})],$t.prototype,"bearing",void 0),(0,i._)([(0,g.M)({json:{name:"attributes.BearingTol",read:!1,write:!0}})],$t.prototype,"bearingTol",void 0),(0,i._)([(0,g.M)()],$t.prototype,"cumulativeCosts",void 0),(0,i._)([(0,b.w)("cumulativeCosts",["attributes"])],$t.prototype,"readCumulativeCosts",null),(0,i._)([(0,g.M)()],$t.prototype,"cumulativeDistance",void 0),(0,i._)([(0,g.M)()],$t.prototype,"cumulativeDuration",void 0),(0,i._)([(0,g.M)({type:re.apiValues,json:{name:"attributes.CurbApproach",read:{reader:re.read},write:{writer:re.write}}})],$t.prototype,"curbApproach",void 0),(0,i._)([(0,g.M)({type:re.apiValues,json:{read:{source:"attributes.DepartCurbApproach",reader:re.read}}})],$t.prototype,"departCurbApproach",void 0),(0,i._)([(0,g.M)({type:Date,json:{read:{source:"attributes.DepartTimeUTC"}}})],$t.prototype,"departTime",void 0),(0,i._)([(0,g.M)()],$t.prototype,"departTimeOffset",void 0),(0,i._)([(0,b.w)("departTimeOffset",["attributes.DepartTime","attributes.DepartTimeUTC"])],$t.prototype,"readDepartTimeOffset",null),(0,i._)([(0,g.M)({json:{read:{source:"attributes.DistanceToNetworkInMeters"}}})],$t.prototype,"distanceToNetworkInMeters",void 0),(0,i._)([(0,g.M)({type:Ke.A,json:{write:!0}})],$t.prototype,"geometry",void 0),(0,i._)([(0,g.M)()],$t.prototype,"lateDuration",void 0),(0,i._)([(0,g.M)({type:ie.apiValues,json:{name:"attributes.LocationType",read:{reader:ie.read},write:{writer:ie.write}}})],$t.prototype,"locationType",void 0),(0,i._)([(0,g.M)({json:{name:"attributes.Name"}})],$t.prototype,"name",void 0),(0,i._)([(0,g.M)({json:{name:"attributes.NavLatency",read:!1,write:!0}})],$t.prototype,"navLatency",void 0),(0,i._)([(0,g.M)({json:{name:"attributes.ObjectID"}})],$t.prototype,"objectId",void 0),(0,i._)([(0,g.M)({type:a.A})],$t.prototype,"popupTemplate",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.PosAlong"}}})],$t.prototype,"posAlong",void 0),(0,i._)([(0,g.M)({json:{name:"attributes.RouteName"}})],$t.prototype,"routeName",void 0),(0,i._)([(0,g.M)()],$t.prototype,"serviceCosts",void 0),(0,i._)([(0,b.w)("serviceCosts",["attributes"])],$t.prototype,"readServiceCosts",null),(0,i._)([(0,w.K)("serviceCosts")],$t.prototype,"writeServiceCosts",null),(0,i._)([(0,g.M)()],$t.prototype,"serviceDistance",void 0),(0,i._)([(0,g.M)()],$t.prototype,"serviceDuration",void 0),(0,i._)([(0,g.M)({json:{name:"attributes.Sequence"}})],$t.prototype,"sequence",void 0),(0,i._)([(0,g.M)({type:se.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:se.read}}})],$t.prototype,"sideOfEdge",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.SnapX"}}})],$t.prototype,"snapX",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.SnapY"}}})],$t.prototype,"snapY",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.SnapZ"}}})],$t.prototype,"snapZ",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.SourceID"}}})],$t.prototype,"sourceId",void 0),(0,i._)([(0,g.M)({json:{read:{source:"attributes.SourceOID"}}})],$t.prototype,"sourceOid",void 0),(0,i._)([(0,g.M)({type:oe.apiValues,json:{read:{source:"attributes.Status",reader:oe.read}}})],$t.prototype,"status",void 0),(0,i._)([(0,g.M)({types:j.Es})],$t.prototype,"symbol",void 0),(0,i._)([(0,g.M)({type:Date,json:{name:"attributes.TimeWindowEnd"}})],$t.prototype,"timeWindowEnd",void 0),(0,i._)([(0,w.K)("timeWindowEnd")],$t.prototype,"writeTimeWindowEnd",null),(0,i._)([(0,g.M)()],$t.prototype,"timeWindowEndOffset",void 0),(0,i._)([(0,g.M)({type:Date,json:{name:"attributes.TimeWindowStart"}})],$t.prototype,"timeWindowStart",void 0),(0,i._)([(0,w.K)("timeWindowStart")],$t.prototype,"writeTimeWindowStart",null),(0,i._)([(0,g.M)()],$t.prototype,"timeWindowStartOffset",void 0),(0,i._)([(0,g.M)({readOnly:!0,json:{read:!1}})],$t.prototype,"type",void 0),(0,i._)([(0,g.M)()],$t.prototype,"violations",void 0),(0,i._)([(0,b.w)("violations",["attributes"])],$t.prototype,"readViolations",null),(0,i._)([(0,g.M)()],$t.prototype,"waitDuration",void 0),(0,i._)([(0,g.M)()],$t.prototype,"wait",void 0),(0,i._)([(0,b.w)("wait",["attributes"])],$t.prototype,"readWait",null),$t=qt=(0,i._)([(0,T.$)("esri.rest.support.Stop")],$t);const zt=$t;var Kt=r(48526);function Yt(e){return e.length?e:null}function Zt(e){switch(e){case"esriGeometryPoint":return{type:"esriSMS",style:"esriSMSCircle",size:12,color:[0,0,0,0],outline:Zt("esriGeometryPolyline")};case"esriGeometryPolyline":return{type:"esriSLS",style:"esriSLSSolid",width:1,color:[0,0,0,0]};case"esriGeometryPolygon":return{type:"esriSFS",style:"esriSFSNull",outline:Zt("esriGeometryPolyline")}}}function Ht(e){return"layers"in e}async function Xt(e){const t=et.A.WGS84;return await(0,M.initializeProjection)(e.spatialReference,t),(0,M.project)(e,t)}function Qt(e,t){switch(t){case"seconds":return e/60;case"hours":return 60*e;case"days":return 60*e*24;default:return e}}function er(e,t){return"decimal-degrees"===t||"points"===t||"unknown"===t?e:(0,f.oU)(e,t,"meters")}const tr=p.A.ofType(dt),rr=p.A.ofType(ht),ir=p.A.ofType(gt),or=p.A.ofType(St),sr=p.A.ofType(At),nr=p.A.ofType(zt),ar="esri.layers.RouteLayer",lr=()=>u.A.getLogger(ar);let ur=class extends((0,O.dM)((0,C.j)((0,I.q)((0,D.A)((0,d.P)(N.A)))))){constructor(e){super(e),this._cachedServiceDescription=null,this._featureCollection=null,this._type="Feature Collection",this.defaultSymbols=new J,this.directionLines=null,this.directionPoints=null,this.featureCollectionType="route",this.legendEnabled=!1,this.maxScale=0,this.minScale=0,this.pointBarriers=new ir,this.polygonBarriers=new or,this.polylineBarriers=new sr,this.routeInfo=null,this.spatialReference=et.A.WGS84,this.stops=new nr,this.type="route";const t=()=>{this._setStopSymbol(this.stops)};this.addHandles((0,h.on)((()=>this.stops),"change",t,{sync:!0,onListenerAdd:t}))}writeFeatureCollectionWebmap(e,t,r,i){const o=[this._writePolygonBarriers(),this._writePolylineBarriers(),this._writePointBarriers(),this._writeRouteInfo(),this._writeDirectionLines(),this._writeDirectionPoints(),this._writeStops()].filter((e=>!!e)),s=o.map(((e,t)=>t)),n="web-map"===i.origin?"featureCollection.layers":"layers";(0,y.sM)(n,o,t),t.opacity=this.opacity,t.visibility=this.visible,t.visibleLayers=s}readDirectionLines(e,t){return this._getNetworkFeatures(t,"DirectionLines",(e=>dt.fromGraphic(e)))}readDirectionPoints(e,t){return this._getNetworkFeatures(t,"DirectionPoints",(e=>ht.fromGraphic(e)))}get fullExtent(){const e=new _.A({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:et.A.WGS84});if(null!=this.routeInfo?.geometry)return this.routeInfo.geometry.extent??e;if(null==this.stops)return e;const t=this.stops.filter((e=>null!=e.geometry));if(t.length<2)return e;const{spatialReference:r}=t.at(0).geometry;if(null==r)return e;const i=t.toArray().map((e=>{const t=e.geometry;return[t.x,t.y]}));return new Kt.A({points:i,spatialReference:r}).extent}readMaxScale(e,t){const r=Ht(t)?t.layers:t.featureCollection?.layers,i=r?.find((e=>null!=e.layerDefinition.maxScale));return i?.layerDefinition.maxScale??0}readMinScale(e,t){const r=Ht(t)?t.layers:t.featureCollection?.layers,i=r?.find((e=>null!=e.layerDefinition.minScale));return i?.layerDefinition.minScale??0}readPointBarriers(e,t){return this._getNetworkFeatures(t,"Barriers",(e=>gt.fromGraphic(e)))}readPolygonBarriers(e,t){return this._getNetworkFeatures(t,"PolygonBarriers",(e=>St.fromGraphic(e)))}readPolylineBarriers(e,t){return this._getNetworkFeatures(t,"PolylineBarriers",(e=>At.fromGraphic(e)))}readRouteInfo(e,t){return this._getNetworkFeatures(t,"RouteInfo",(e=>Ct.fromGraphic(e))).at(0)??null}readSpatialReference(e,t){const r=Ht(t)?t.layers:t.featureCollection?.layers;if(!r?.length)return et.A.WGS84;const{layerDefinition:i,featureSet:o}=r[0],s=o.features[0],n=s?.geometry?.spatialReference??o.spatialReference??i.spatialReference??i.extent.spatialReference??A.KK;return et.A.fromJSON(n)}readStops(e,t){return this._getNetworkFeatures(t,"Stops",(e=>zt.fromGraphic(e)),(e=>this._setStopSymbol(e)))}get title(){return this.routeInfo?.name??"Route"}set title(e){this._overrideIfSome("title",e)}get url(){return o.A.routeServiceUrl}set url(e){null!=e?this._set("url",(0,L.Jf)(e,lr())):this._set("url",o.A.routeServiceUrl)}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}removeAll(){this.removeResult(),this.pointBarriers.removeAll(),this.polygonBarriers.removeAll(),this.polylineBarriers.removeAll(),this.stops.removeAll()}removeResult(){null!=this.directionLines&&(this.directionLines.removeAll(),this._set("directionLines",null)),null!=this.directionPoints&&(this.directionPoints.removeAll(),this._set("directionPoints",null)),null!=this.routeInfo&&this._set("routeInfo",null)}async save(){await this.load();const{fullExtent:e,portalItem:t}=this;if(!t)throw new c.A("routelayer:portal-item-not-set","save() requires to the layer to have a portal item");if(!t.id)throw new c.A("routelayer:portal-item-not-saved","Please use saveAs() first to save the routelayer");if("Feature Collection"!==t.type)throw new c.A("routelayer:portal-item-wrong-type",'Portal item needs to have type "Feature Collection"');if(null==this.routeInfo)throw new c.A("routelayer:route-unsolved","save() requires a solved route");const{portal:r}=t;await r.signIn(),r.user||await t.reload();const{itemUrl:i,itemControl:o}=t;if("admin"!==o&&"update"!==o)throw new c.A("routelayer:insufficient-permissions","To save this layer, you need to be the owner or an administrator of your organization");const s={messages:[],origin:"portal-item",portal:r,url:i?(0,v.An)(i):void 0,writtenProperties:[]},n=this.write(void 0,s);return t.extent=await Xt(e),t.title=this.title,await t.update({data:n}),t}async saveAs(e,t={}){if(await this.load(),null==this.routeInfo)throw new c.A("routelayer:route-unsolved","saveAs() requires a solved route");const r=G.default.from(e).clone();r.extent??=await Xt(this.fullExtent),r.id=null,r.portal??=k.A.getDefault(),r.title??=this.title,r.type="Feature Collection",r.typeKeywords=["Data","Feature Collection",V.mm.MULTI_LAYER,"Route Layer"];const{portal:i}=r,o={messages:[],origin:"portal-item",portal:i,url:null,writtenProperties:[]};await i.signIn();const s=t?.folder,n=this.write(void 0,o);return await(i.user?.addItem({item:r,folder:s,data:n})),this.portalItem=r,(0,S.v)(o),o.portalItem=r,r}async solve(e,t){const r=e?.stops??this.stops,i=e?.pointBarriers??Yt(this.pointBarriers),o=e?.polylineBarriers??Yt(this.polylineBarriers),s=e?.polygonBarriers??Yt(this.polygonBarriers);if(null==r)throw new c.A("routelayer:undefined-stops","the route layer must have stops defined in the route parameters.");if((function(e){return"esri.rest.support.FeatureSet"===e.declaredClass}(r)||function(e){return"esri.rest.support.NetworkFeatureSet"===e.declaredClass}(r))&&r.features.length<2||p.A.isCollection(r)&&r.length<2)throw new c.A("routelayer:insufficent-stops","the route layer must have two or more stops to solve a route.");if(p.A.isCollection(r))for(const e of r)e.routeName=null;const n=e?.apiKey,a=this.url,l=await this._getServiceDescription(a,n,t),u=e?.travelMode??l.defaultTravelMode,d=e?.accumulateAttributes??[];null!=u&&(d.push(u.distanceAttributeName),u.timeAttributeName&&d.push(u.timeAttributeName));const y={accumulateAttributes:d,directionsOutputType:"featuresets",ignoreInvalidLocations:!0,pointBarriers:i,polylineBarriers:o,polygonBarriers:s,preserveFirstStop:!0,preserveLastStop:!0,returnBarriers:!!i,returnDirections:!0,returnPolygonBarriers:!!s,returnPolylineBarriers:!!o,returnRoutes:!0,returnStops:!0,stops:r},h=Vt.from(e??{});let f;h.set(y);try{f=await ut(a,h,t)}catch(e){throw(0,m.zf)(e)?e:new c.A("routelayer:failed-route-request","the routing request failed",{error:e})}const v=this._toRouteLayerSolution(f);return this._isOverridden("title")||(this.title=v.routeInfo.name??"Route"),function(e,t,r){const i=t.networkDataset?.networkAttributes,o=i?.filter((({usageType:e})=>"cost"===e))??[],s=r.travelMode??t.defaultTravelMode;if(null==s)return void lr().warn("route-layer:missing-travel-mode","The routing service must have a default travel mode or one must be specified in the route parameter.");const{timeAttributeName:n,distanceAttributeName:a}=s,l=o.find((({name:e})=>e===n)),u=o.find((({name:e})=>e===a)),p=r.travelMode?.impedanceAttributeName??r.impedanceAttribute??t.impedance,d=l?.units,y=u?.units;if(!d||!y)throw new c.A("routelayer:unknown-impedance-units","the units of either the distance or time impedance are unknown");const m=r.directionsLanguage??t.directionsLanguage,h=r.accumulateAttributes??t.accumulateAttributeNames??[],f=new Set(o.filter((({name:e})=>e===n||e===a||e===p||null!=e&&h.includes(e))).map((({name:e})=>e))),v=e=>{for(const t in e)f.has(t)||delete e[t]};for(const t of e.pointBarriers)null!=t.costs&&(t.addedCost=t.costs[p]??0,v(t.costs));for(const t of e.polygonBarriers)null!=t.costs&&(t.scaleFactor=t.costs[p]??1,v(t.costs));for(const t of e.polylineBarriers)null!=t.costs&&(t.scaleFactor=t.costs[p]??1,v(t.costs));const{routeInfo:g}=e,{findBestSequence:b,preserveFirstStop:T,preserveLastStop:w,startTimeIsUTC:S,timeWindowsAreUTC:_}=r;g.analysisSettings=new Ot({accumulateAttributes:h,directionsLanguage:m,findBestSequence:b,preserveFirstStop:T,preserveLastStop:w,startTimeIsUTC:S,timeWindowsAreUTC:_,travelMode:s}),g.totalDuration=Qt(g.totalCosts?.[n]??0,d),g.totalDistance=er(g.totalCosts?.[a]??0,y),g.totalLateDuration=Qt(g.totalViolations?.[n]??0,d),g.totalWaitDuration=Qt(g.totalWait?.[n]??0,d),null!=g.totalCosts&&v(g.totalCosts),null!=g.totalViolations&&v(g.totalViolations),null!=g.totalWait&&v(g.totalWait);for(const t of e.stops)null!=t.serviceCosts&&(t.serviceDuration=Qt(t.serviceCosts[n]??0,d),t.serviceDistance=er(t.serviceCosts[a]??0,y),v(t.serviceCosts)),null!=t.cumulativeCosts&&(t.cumulativeDuration=Qt(t.cumulativeCosts[n]??0,d),t.cumulativeDistance=er(t.cumulativeCosts[a]??0,y),v(t.cumulativeCosts)),null!=t.violations&&(t.lateDuration=Qt(t.violations[n]??0,d),v(t.violations)),null!=t.wait&&(t.waitDuration=Qt(t.wait[n]??0,d),v(t.wait))}(v,l,h),v}update(e){const{stops:t,directionLines:r,directionPoints:i,pointBarriers:o,polylineBarriers:s,polygonBarriers:n,routeInfo:a}=e;this.set({stops:t,pointBarriers:o,polylineBarriers:s,polygonBarriers:n}),this._set("directionLines",r),this._set("directionPoints",i),this._set("routeInfo",a),null!=a.geometry&&(this.spatialReference=a.geometry.spatialReference)}_getNetworkFeatures(e,t,r,i){const o=Ht(e)?e.layers:e.featureCollection?.layers,s=o?.find((e=>e.layerDefinition.name===t));if(null==s)return new p.A;const{layerDefinition:u,popupInfo:c,featureSet:d}=s,y=u.drawingInfo.renderer,{features:m}=d,h=d.spatialReference??u.spatialReference??u.extent.spatialReference??A.KK,f=y&&(0,l.L)(y),v=et.A.fromJSON(h),g=m.map((e=>{const i=n.A.fromJSON(e);null!=i.geometry&&null!=e.geometry&&null==e.geometry.spatialReference&&(i.geometry.spatialReference=v);const o=r(i);return o.symbol??=f?.getSymbol(i)??this._getNetworkSymbol(t),o.popupTemplate??=c&&a.A.fromJSON(c),o}));return i&&g.some((({symbol:e})=>!e))&&i(g),new p.A(g)}_getNetworkSymbol(e){switch(e){case"Barriers":return this.defaultSymbols.pointBarriers;case"DirectionPoints":return this.defaultSymbols.directionPoints;case"DirectionLines":return this.defaultSymbols.directionLines;case"PolylineBarriers":return this.defaultSymbols.polylineBarriers;case"PolygonBarriers":return this.defaultSymbols.polygonBarriers;case"RouteInfo":return this.defaultSymbols.routeInfo;case"Stops":return null}}async _getServiceDescription(e,t,r){if(null!=this._cachedServiceDescription&&this._cachedServiceDescription.url===e)return this._cachedServiceDescription.serviceDescription;const i=await De(e,t,r);return this._cachedServiceDescription={serviceDescription:i,url:e},i}_setStopSymbol(e){if(!e||0===e.length)return;if(null==this.defaultSymbols.stops)return;if(e.every((({symbol:e})=>null!=e)))return;const{first:t,last:r,middle:i,unlocated:o,waypoint:s,break:n}=this.defaultSymbols.stops;if(null==this.routeInfo||1===e.length)return void e.forEach(((o,s)=>{switch(s){case 0:o.symbol=t;break;case e.length-1:o.symbol=r;break;default:o.symbol=i}}));const a=e.map((({sequence:e})=>e)).filter((e=>null!=e)),l=Math.min(...a),u=Math.max(...a);for(const a of e)a.sequence!==l?a.sequence!==u?"ok"===a.status||"not-located-on-closest"===a.status?"waypoint"!==a.locationType?"break"!==a.locationType?a.symbol=i:a.symbol=n:a.symbol=s:a.symbol=o:a.symbol=r:a.symbol=t}_toRouteLayerSolution(e){const t=e.routeResults[0].stops?.map((e=>zt.fromJSON(e.toJSON())));this._setStopSymbol(t);const r=new nr(t),i=new or(e.polygonBarriers?.map((e=>{const t=St.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polygonBarriers,t}))),o=new sr(e.polylineBarriers?.map((e=>{const t=At.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polylineBarriers,t}))),s=new ir(e.pointBarriers?.map((e=>{const t=gt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.pointBarriers,t}))),n=e.routeResults[0].route?.toJSON(),a=Ct.fromJSON(n);a.symbol=this.defaultSymbols.routeInfo;const l=new rr(e.routeResults[0].directionPoints?.features.map((e=>{const t=ht.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionPoints,t})));return{directionLines:new tr(e.routeResults[0].directionLines?.features.map((e=>{const t=dt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionLines,t}))),directionPoints:l,pointBarriers:s,polygonBarriers:i,polylineBarriers:o,routeInfo:a,stops:r}}_writeDirectionLines(){return this._writeNetworkFeatures(this.directionLines,this.defaultSymbols.directionLines,"esriGeometryPolyline",dt.fields,"DirectionLines","Direction Lines")}_writeDirectionPoints(){return this._writeNetworkFeatures(this.directionPoints,this.defaultSymbols.directionPoints,"esriGeometryPoint",ht.fields,"DirectionPoints","Direction Points")}_writeNetworkFeatures(e,t,r,i,o,s){if(!e?.length)return null;const n=this.spatialReference.toJSON(),{fullExtent:a,maxScale:l,minScale:u}=this;return{featureSet:{features:e.toArray().map((e=>function(e){const{attributes:t,geometry:r,popupTemplate:i,symbol:o}=e.toGraphic().toJSON();return{attributes:t,geometry:r,popupInfo:i,symbol:o}}(e))),geometryType:r,spatialReference:n},layerDefinition:{capabilities:"Query,Update,Editing",drawingInfo:{renderer:{type:"simple",symbol:null!=t?t.toJSON():Zt(r)}},extent:a.toJSON(),fields:i,geometryType:r,hasM:!1,hasZ:!1,maxScale:l,minScale:u,name:o,objectIdField:"ObjectID",spatialReference:n,title:s,type:"Feature Layer",typeIdField:""}}}_writePointBarriers(){return this._writeNetworkFeatures(this.pointBarriers,this.defaultSymbols.pointBarriers,"esriGeometryPoint",gt.fields,"Barriers","Point Barriers")}_writePolygonBarriers(){return this._writeNetworkFeatures(this.polygonBarriers,this.defaultSymbols.polygonBarriers,"esriGeometryPolygon",St.fields,"PolygonBarriers","Polygon Barriers")}_writePolylineBarriers(){return this._writeNetworkFeatures(this.polylineBarriers,this.defaultSymbols.polylineBarriers,"esriGeometryPolyline",At.fields,"PolylineBarriers","Line Barriers")}_writeRouteInfo(){return this._writeNetworkFeatures(null!=this.routeInfo?new p.A([this.routeInfo]):null,this.defaultSymbols.routeInfo,"esriGeometryPolyline",Ct.fields,"RouteInfo","Route Details")}_writeStops(){const e=this._writeNetworkFeatures(this.stops,null,"esriGeometryPoint",zt.fields,"Stops","Stops");if(null==e)return null;const{stops:t}=this.defaultSymbols,r=t?.first?.toJSON(),i=t?.middle?.toJSON(),o=t?.last?.toJSON();return e.layerDefinition.drawingInfo.renderer={type:"uniqueValue",field1:"Sequence",defaultSymbol:i,uniqueValueInfos:[{value:"1",symbol:r,label:"First Stop"},{value:`${this.stops.length}`,symbol:o,label:"Last Stop"}]},e}};(0,i._)([(0,g.M)({readOnly:!0,json:{read:!1,origins:{"portal-item":{write:{allowNull:!0,ignoreOrigin:!0}},"web-map":{write:{overridePolicy(){return{allowNull:!0,ignoreOrigin:null==this.portalItem}}}}}}})],ur.prototype,"_featureCollection",void 0),(0,i._)([(0,w.K)(["web-map","portal-item"],"_featureCollection")],ur.prototype,"writeFeatureCollectionWebmap",null),(0,i._)([(0,g.M)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{target:"type",overridePolicy(){return{ignoreOrigin:null!=this.portalItem}}}}}}})],ur.prototype,"_type",void 0),(0,i._)([(0,g.M)({nonNullable:!0,type:J})],ur.prototype,"defaultSymbols",void 0),(0,i._)([(0,g.M)({readOnly:!0})],ur.prototype,"directionLines",void 0),(0,i._)([(0,b.w)(["web-map","portal-item"],"directionLines",["layers","featureCollection.layers"])],ur.prototype,"readDirectionLines",null),(0,i._)([(0,g.M)({readOnly:!0})],ur.prototype,"directionPoints",void 0),(0,i._)([(0,b.w)(["web-map","portal-item"],"directionPoints",["layers","featureCollection.layers"])],ur.prototype,"readDirectionPoints",null),(0,i._)([(0,g.M)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],ur.prototype,"featureCollectionType",void 0),(0,i._)([(0,g.M)({readOnly:!0})],ur.prototype,"fullExtent",null),(0,i._)([(0,g.M)({json:{origins:{"web-map":{name:"featureCollection.showLegend"}},write:!0}})],ur.prototype,"legendEnabled",void 0),(0,i._)([(0,g.M)({type:["show","hide"]})],ur.prototype,"listMode",void 0),(0,i._)([(0,g.M)({type:Number,nonNullable:!0,json:{write:!1}})],ur.prototype,"maxScale",void 0),(0,i._)([(0,b.w)(["web-map","portal-item"],"maxScale",["layers","featureCollection.layers"])],ur.prototype,"readMaxScale",null),(0,i._)([(0,g.M)({type:Number,nonNullable:!0,json:{write:!1}})],ur.prototype,"minScale",void 0),(0,i._)([(0,b.w)(["web-map","portal-item"],"minScale",["layers","featureCollection.layers"])],ur.prototype,"readMinScale",null),(0,i._)([(0,g.M)({type:["ArcGISFeatureLayer"],value:"ArcGISFeatureLayer"})],ur.prototype,"operationalLayerType",void 0),(0,i._)([(0,g.M)({nonNullable:!0,type:p.A.ofType(gt)})],ur.prototype,"pointBarriers",void 0),(0,i._)([(0,b.w)(["web-map","portal-item"],"pointBarriers",["layers","featureCollection.layers"])],ur.prototype,"readPointBarriers",null),(0,i._)([(0,g.M)({nonNullable:!0,type:p.A.ofType(St)})],ur.prototype,"polygonBarriers",void 0),(0,i._)([(0,b.w)(["web-map","portal-item"],"polygonBarriers",["layers","featureCollection.layers"])],ur.prototype,"readPolygonBarriers",null),(0,i._)([(0,g.M)({nonNullable:!0,type:p.A.ofType(At)})],ur.prototype,"polylineBarriers",void 0),(0,i._)([(0,b.w)(["web-map","portal-item"],"polylineBarriers",["layers","featureCollection.layers"])],ur.prototype,"readPolylineBarriers",null),(0,i._)([(0,g.M)({readOnly:!0})],ur.prototype,"routeInfo",void 0),(0,i._)([(0,b.w)(["web-map","portal-item"],"routeInfo",["layers","featureCollection.layers"])],ur.prototype,"readRouteInfo",null),(0,i._)([(0,g.M)({type:et.A})],ur.prototype,"spatialReference",void 0),(0,i._)([(0,b.w)(["web-map","portal-item"],"spatialReference",["layers","featureCollection.layers"])],ur.prototype,"readSpatialReference",null),(0,i._)([(0,g.M)({nonNullable:!0,type:p.A.ofType(zt)})],ur.prototype,"stops",void 0),(0,i._)([(0,b.w)(["web-map","portal-item"],"stops",["layers","featureCollection.layers"])],ur.prototype,"readStops",null),(0,i._)([(0,g.M)()],ur.prototype,"title",null),(0,i._)([(0,g.M)({readOnly:!0,json:{read:!1}})],ur.prototype,"type",void 0),(0,i._)([(0,g.M)()],ur.prototype,"url",null),ur=(0,i._)([(0,T.$)(ar)],ur);const pr=ur},16131:(e,t,r)=>{r.d(t,{q:()=>T});var i=r(90237),o=r(49186),s=r(84952),n=r(10107),a=r(56507),l=(r(87811),r(44208),r(36005)),u=r(40608),p=r(43937),c=r(89317),d=r(45917),y=r(49422);const m={ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GeoRSS:!0,GroupLayer:!0,KML:!0,KnowledgeGraphLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},h={ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},f={ArcGISFeatureLayer:!0,SubtypeGroupTable:!0},v={"web-scene/operational-layers":{ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GroupLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,KML:!0,LineOfSightLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,RasterDataLayer:!0,VectorTileLayer:!0,ViewshedLayer:!0,Voxel:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/basemap":{ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-scene/tables":{ArcGISFeatureLayer:!0},"web-map/operational-layers":m,"web-map/basemap":h,"web-map/tables":f,"link-chart/operational-layers":{...m,LinkChartLayer:!0},"link-chart/basemap":h,"link-chart/tables":f,"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,BuildingSceneLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,MediaLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,SubtypeGroupLayer:!0}};var g=r(10873),b=r(79677);const T=e=>{let t=class extends e{constructor(){super(...arguments),this.persistenceEnabled=!0,this.title=null}readId(e,t,r){return"Group Layer"===r?.portalItem?.type?void 0:e}writeListMode(e,t,r,i){(i&&"ground"===i.layerContainerType||e&&(0,y.R)(this,r,{},i))&&(t[r]=e)}writeOperationalLayerType(e,t,r,i){e&&"tables"!==i?.layerContainerType&&(t.layerType=e)}writeTitle(e,t){t.title=e??"Layer"}readTimeExtent(e){return e?b.A.fromArray(e):null}writeTimeExtent(e,t,r,i){e&&"tables"!==i.layerContainerType&&(e.isEmpty?i?.messages&&i.messages.push(new o.A("layer:invalid-visibilityTimeExtent","visibilityTimeExtent cannot be empty")):t[r]=e.toArray())}read(e,t){t&&(t.layer=this),(0,d.t)(this,e,(t=>super.read(e,t)),t)}write(e,t){if(!this.persistenceEnabled&&!t?.ignorePersistenceEnabled)return null;if(t?.origin){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`,r=v[e];let i=!!r?.[this.operationalLayerType];if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(i=!1),"ArcGISDimensionLayer"===this.operationalLayerType&&"web-map/operational-layers"===e&&(i=!1),!i)return t.messages?.push(new o.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const r=super.write(e,{...t,layer:this}),i=!!t&&!!t.messages&&!!t.messages.filter((e=>e instanceof o.A&&"web-document-write:property-required"===e.name)).length;return(0,s.w8)(r?.url)?(t?.messages?.push(new o.A("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&i?null:r}beforeSave(){}};return(0,i._)([(0,n.M)({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],t.prototype,"id",void 0),(0,i._)([(0,l.w)("id",["id"])],t.prototype,"readId",null),(0,i._)([(0,n.M)(g.C1)],t.prototype,"listMode",void 0),(0,i._)([(0,p.K)("listMode")],t.prototype,"writeListMode",null),(0,i._)([(0,n.M)({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1},"web-scene":{name:"layerType",read:!1,write:{enabled:!0,ignoreOrigin:!0,layerContainerTypes:c.K}}}}})],t.prototype,"operationalLayerType",void 0),(0,i._)([(0,p.K)("operationalLayerType")],t.prototype,"writeOperationalLayerType",null),(0,i._)([(0,n.M)(g.ke)],t.prototype,"opacity",void 0),(0,i._)([(0,n.M)({type:Boolean,readOnly:!1})],t.prototype,"persistenceEnabled",void 0),(0,i._)([(0,n.M)({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],t.prototype,"title",void 0),(0,i._)([(0,p.K)("title"),(0,p.K)(["web-scene"],"title")],t.prototype,"writeTitle",null),(0,i._)([(0,n.M)({type:b.A,json:{origins:{"web-scene":{write:{layerContainerTypes:c.K}}}}})],t.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,l.w)("visibilityTimeExtent")],t.prototype,"readTimeExtent",null),(0,i._)([(0,p.K)(["portal-item","web-map","web-scene"],"visibilityTimeExtent",{visibilityTimeExtent:{type:[[a.jz,a.Uv]]}})],t.prototype,"writeTimeExtent",null),(0,i._)([(0,n.M)({type:Boolean,json:{origins:{"web-scene":{name:"visibility",write:{enabled:!0,layerContainerTypes:c.K}}},name:"visibility",write:!0}})],t.prototype,"visible",void 0),t=(0,i._)([(0,u.$)("esri.layers.mixins.OperationalLayer")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>S});var i=r(90237),o=r(92602),s=r(70333),n=r(78888),a=r(60999),l=r(49186),u=r(53966),p=r(97768),c=r(74887),d=r(84952),y=r(10107),m=(r(44208),r(87811),r(36005)),h=r(40608),f=r(43937),v=r(83531),g=r(20655),b=r(80812),T=r(41318),w=r(10407);const S=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new b.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await Promise.all([r.e(5356),r.e(1204)]).then(r.bind(r,41204));return(0,c.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.QP)(e),!0))))}async setUserPrivileges(e,t){if(!o.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:o}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",o)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,w.It)(r);let o,n;if(i)o=r.portal.url;else try{o=await(0,v.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!o||!(0,d.b8)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;n=await(s.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const a=!0,l=!1,u=!1;if(!n)return{features:{edit:a,fullEdit:l},content:{updateItem:u}};try{if(i?await r.reload():(r=new b.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return(0,w.It)(r)}catch(e){(0,c.QP)(e)}return{features:{edit:a,fullEdit:l},content:{updateItem:u}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=_.credential===t?_.user:await this._fetchEditingUser(e);return _.credential=t,_.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,o=g.A.getDefault();if(o&&o.loaded&&(0,d.S8)(o.restUrl)===(0,d.S8)(i))return o.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,p=await(0,a.Ke)((0,n.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?T.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||g.A.getDefault());return r&&i&&!(0,d.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,y.M)({type:b.default})],t.prototype,"portalItem",null),(0,i._)([(0,m.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,y.M)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,y.M)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,y.M)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,y.M)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,h.$)("esri.layers.mixins.PortalLayer")],t),t},_={credential:null,user:null}},39357:(e,t,r)=>{r.d(t,{H:()=>l});var i,o=r(90237),s=r(25482),n=r(10107),a=(r(44208),r(53966),r(87811),r(40608));let l=i=class extends s.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,o._)([(0,n.M)({type:String,json:{write:!0}})],l.prototype,"name",void 0),(0,o._)([(0,n.M)({type:[String,Number],json:{write:!0}})],l.prototype,"code",void 0),l=i=(0,o._)([(0,a.$)("esri.layers.support.CodedValue")],l)},53177:(e,t,r)=>{r.d(t,{A:()=>d});var i,o=r(90237),s=r(4718),n=r(10107),a=(r(44208),r(53966),r(93223)),l=r(40608),u=r(39357),p=r(76357);let c=i=class extends p.A{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new i({codedValues:(0,s.o8)(this.codedValues),name:this.name})}};(0,o._)([(0,n.M)({type:[u.H],json:{write:!0}})],c.prototype,"codedValues",void 0),(0,o._)([(0,a.e)({codedValue:"coded-value"})],c.prototype,"type",void 0),c=i=(0,o._)([(0,l.$)("esri.layers.support.CodedValueDomain")],c);const d=c},76357:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(90237),o=r(66552),s=r(25482),n=r(10107),a=(r(44208),r(53966),r(87811),r(93223)),l=r(40608);const u=new o.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let p=class extends s.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,i._)([(0,n.M)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,i._)([(0,a.e)(u)],p.prototype,"type",void 0),p=(0,i._)([(0,l.$)("esri.layers.support.Domain")],p);const c=p},20437:(e,t,r)=>{r.d(t,{A:()=>f});var i,o=r(90237),s=r(66552),n=r(25482),a=r(10107),l=r(56507),u=(r(87811),r(44208),r(93223)),p=r(36005),c=r(40608),d=r(80451),y=r(98453);const m=new s.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let h=i=class extends n.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?m.fromJSON(r.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,o._)([(0,a.M)({type:String,json:{write:!0}})],h.prototype,"alias",void 0),(0,o._)([(0,a.M)({type:[String,Number],json:{write:{allowNull:!0}}})],h.prototype,"defaultValue",void 0),(0,o._)([(0,a.M)()],h.prototype,"description",void 0),(0,o._)([(0,p.w)("description")],h.prototype,"readDescription",null),(0,o._)([(0,a.M)({types:d.gK,json:{read:{reader:d.rS},write:!0}})],h.prototype,"domain",void 0),(0,o._)([(0,a.M)({type:Boolean,json:{write:!0}})],h.prototype,"editable",void 0),(0,o._)([(0,a.M)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],h.prototype,"length",void 0),(0,o._)([(0,a.M)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,o._)([(0,a.M)({type:Boolean,json:{write:!0}})],h.prototype,"nullable",void 0),(0,o._)([(0,u.e)(y.m)],h.prototype,"type",void 0),(0,o._)([(0,a.M)()],h.prototype,"valueType",void 0),(0,o._)([(0,p.w)("valueType",["description"])],h.prototype,"readValueType",null),(0,o._)([(0,a.M)({type:Boolean,json:{read:!1}})],h.prototype,"visible",void 0),h=i=(0,o._)([(0,c.$)("esri.layers.support.Field")],h);const f=h},95466:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(49186),o=r(25482),s=r(53966),n=r(91869),a=r(3330),l=r(30524),u=r(56400),p=r(96285);const c=new Map;class d{static fromJSON(e){return new d(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new d(e.fields??[],f(e))}static fromLayerJSON(e){return new d(e.fields??[],f(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=m(t);if(t&&i){const o=y(t);this._fieldsMap.set(t,e),this._fieldsMap.set(o,e),this._normalizedFieldsMap.set(i,e),r.push(`${o}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(y(e))??this._normalizedFieldsMap.get(m(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(s.A.getLogger("esri.layers.support.FieldsIndex").error(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):h.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?a.GB.instance:t===u.n$?p.mQ.utcInstance:(0,n.tE)(c,t,(()=>p.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,o.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function y(e){return e.trim().toLowerCase()}function m(e){return(0,l.rS)(e)?.toLowerCase()??""}const h=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function f(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:o}=e,s=(i?"startField"in i?i.startField:i.startTimeField:"")??"",n=(i?"endField"in i?i.endField:i.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.ZS)(e.dateFieldsTimeReference):null,l=o?function(e){return"timeZone"in e}(o)?o.timeZone??a:o.dateFieldsTimeReference?(0,u.ZS)(o.dateFieldsTimeReference):a??u.n$:null,p=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.timeReference?(0,u.ZS)(i.timeReference):a:null,c=new Map([[y(o?.creationDateField??""),l],[y(o?.editDateField??""),l],[y(s),p],[y(n),p]]);for(const{name:i,type:o}of e.fields)if(h.has(o))t.set(i,u.L5);else if("date"!==o&&"esriFieldTypeDate"!==o)t.set(i,null);else if(r)t.set(i,u.L5);else{const e=c.get(y(i??""))??a;t.set(i,e)}return t}},80451:(e,t,r)=>{r.d(t,{rS:()=>f,gK:()=>h}),r(44208);var i,o=r(53177),s=r(76357),n=r(90237),a=(r(53966),r(87811),r(49186),r(93223)),l=r(40608);let u=i=class extends s.A{constructor(e){super(e),this.type="inherited"}clone(){return new i}};(0,n._)([(0,a.e)({inherited:"inherited"})],u.prototype,"type",void 0),u=i=(0,n._)([(0,l.$)("esri.layers.support.InheritedDomain")],u);const p=u;var c,d=r(10107);let y=c=class extends s.A{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new c({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,n._)([(0,d.M)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],y.prototype,"maxValue",void 0),(0,n._)([(0,d.M)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],y.prototype,"minValue",void 0),(0,n._)([(0,a.e)({range:"range"})],y.prototype,"type",void 0),y=c=(0,n._)([(0,l.$)("esri.layers.support.RangeDomain")],y);const m=y,h={key:"type",base:s.A,typeMap:{range:m,"coded-value":o.A,inherited:p}};function f(e){if(!e?.type)return null;switch(e.type){case"range":return m.fromJSON(e);case"codedValue":return o.A.fromJSON(e);case"inherited":return p.fromJSON(e)}return null}},98453:(e,t,r)=>{r.d(t,{m:()=>i});const i=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},92300:(e,t,r)=>{r.d(t,{V:()=>s,X:()=>o});var i=r(65864);function o(e){return{geometryType:(0,i.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function s(e,t,r){const o=(0,i.xD)(t);return e.map((e=>{const t=o.fromJSON(e);return t.spatialReference=r,t}))}},22671:(e,t,r)=>{r.d(t,{A:()=>b});var i,o=r(90237),s=r(59456),n=r(52106),a=r(66552),l=r(25482),u=r(4718),p=r(10107),c=(r(44208),r(53966),r(36005)),d=r(40608),y=r(43937),m=r(16930),h=r(65864),f=r(20437);const v=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let g=i=class extends l.oY{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=m.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const o=e[t],s=n.A.fromJSON(o),a=o.geometry?.spatialReference;null==s.geometry||a||(s.geometry.spatialReference=r);const l=o.aggregateGeometries,u=s.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],i=l[e],o=i?.spatialReference;null==t||o||(t.spatialReference=r)}i.push(s)}return i}writeGeometryType(e,t,r,i){if(e)return void v.write(e,t,r,i);const{features:o}=this;if(o)for(const e of o)if(null!=e?.geometry)return void v.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,h.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=m.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,u.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,o]}=e,s=this.features,n=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((o-e)/r)));for(let e=0,t=s.length;e<t;e++)n?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,o],scale:[s,n]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*s+i),(e=>o-e*n),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,o;const s=[];for(let n=0,a=e.length;n<a;n++){const a=e[n];if(n>0){const e=t(a[0]),n=r(a[1]);e===i&&n===o||(s.push([e-i,n-o]),i=e,o=n)}else i=t(a[0]),o=r(a[1]),s.push([i,o])}return s.length>0?s:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,h.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,s=i.length;e<s;e++){const s=i[e],n=this._quantizePoints(s,t,r);n&&o.push(n)}return o.length>0?((0,h.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,o){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,h.Bi)(e)?e.rings:e.paths;let n,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];for(let e=0,o=i.length;e<o;e++){const o=i[e];e>0?(n+=o[0],a+=o[1]):(n=o[0],a=o[1]),o[0]=t(n),o[1]=r(a)}}if(i&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=o(r[3])}}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=o(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let n,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(n+=i[0],a+=i[1]):(n=i[0],a=i[1]),i[0]=t(n),i[1]=r(a)}if(i&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2]),t[3]=o(t[3])}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2])}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=o(t[2])}}:null}};(0,o._)([(0,p.M)({type:String,json:{write:!0}})],g.prototype,"displayFieldName",void 0),(0,o._)([(0,p.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,p.M)({type:[n.A],json:{write:!0}})],g.prototype,"features",void 0),(0,o._)([(0,c.w)("features")],g.prototype,"readFeatures",null),(0,o._)([(0,p.M)({type:[f.A],json:{write:!0}})],g.prototype,"fields",void 0),(0,o._)([(0,p.M)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:v.read}}})],g.prototype,"geometryType",void 0),(0,o._)([(0,y.K)("geometryType")],g.prototype,"writeGeometryType",null),(0,o._)([(0,p.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasM",void 0),(0,o._)([(0,p.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasZ",void 0),(0,o._)([(0,p.M)({types:s.yR,json:{write:!0}})],g.prototype,"queryGeometry",void 0),(0,o._)([(0,c.w)("queryGeometry")],g.prototype,"readQueryGeometry",null),(0,o._)([(0,p.M)({type:m.A,json:{write:!0}})],g.prototype,"spatialReference",void 0),(0,o._)([(0,y.K)("spatialReference")],g.prototype,"writeSpatialReference",null),(0,o._)([(0,p.M)({json:{write:!0}})],g.prototype,"transform",void 0),g=i=(0,o._)([(0,d.$)("esri.rest.support.FeatureSet")],g),g.prototype.toJSON.isDefaultToJSON=!0;const b=g},2272:(e,t,r)=>{r.d(t,{Dl:()=>n,jV:()=>s,lF:()=>a}),r(92602),r(70333);var i=r(4718),o=r(84952);function s(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function n(e){return"string"==typeof e?(0,o.An)(e):(0,i.o8)(e)}function a(e,t,r){const i={};for(const o in e){if("declaredClass"===o)continue;const s=e[o];if(null!=s&&"function"!=typeof s)if(Array.isArray(s))i[o]=s.map((e=>a(e)));else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(r?.[o]);i[o]=t?e:JSON.stringify(e)}else i[o]=t?s:JSON.stringify(s);else i[o]=s}return i}r(926)}}]);
|