@arcgis/core 5.2.0-next.156 → 5.2.0-next.158
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/analysis/LineOfSightAnalysis.d.ts +49 -32
- package/analysis/LineOfSightAnalysisObserver.d.ts +19 -3
- package/analysis/LineOfSightAnalysisTarget.d.ts +19 -3
- package/analysis/Viewshed.d.ts +23 -3
- package/analysis/ViewshedAnalysis.d.ts +33 -13
- package/arcade/geometry/operatorsWorkerConnection.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{820c8aaf3632edb0150c.js → 0a5a9885ee6f5b5f99f0.js} +1 -1
- package/assets/esri/core/workers/chunks/{7bcedf479b07a4b4a234.js → 1419bf346978b81b08cc.js} +1 -1
- package/assets/esri/core/workers/chunks/2cb209bc51a19487692d.js +2 -0
- package/assets/esri/core/workers/chunks/2e66c969bf4209c957b5.js +2 -0
- package/assets/esri/core/workers/chunks/{925271bb763607a326ae.js → 2f04b8679c9f15390517.js} +1 -1
- package/assets/esri/core/workers/chunks/31640b41e0ecdff892fa.js +2 -0
- package/assets/esri/core/workers/chunks/{2ef5237e4c876d6a4ee0.js → 340256866f524cb069f6.js} +1 -1
- package/assets/esri/core/workers/chunks/{6079d27f4ab319fb8f0c.js → 377595b23379b0c8fe95.js} +1 -1
- package/assets/esri/core/workers/chunks/{be5f92e98d09d6e6e38e.js → 4bb1bb3ffb1b71bc43c8.js} +1 -1
- package/assets/esri/core/workers/chunks/{c5ed67fdf261cbb1624b.js → 4be559c53fe5ac0d0d2e.js} +1 -1
- package/assets/esri/core/workers/chunks/4e6656a5f29e31902fca.js +2 -0
- package/assets/esri/core/workers/chunks/{1aa4f5394a596e544aeb.js → 4eae066673484986d4c1.js} +1 -1
- package/assets/esri/core/workers/chunks/{5f4feca26102088ea565.js → 60737732ce495bbdd0fc.js} +1 -1
- package/assets/esri/core/workers/chunks/{67ebc5a3d46b254b725c.js → 612345f17f5eeb99ea8f.js} +1 -1
- package/assets/esri/core/workers/chunks/{544070198d2ca556103a.js → 6a0ec102962d2c7b4368.js} +1 -1
- package/assets/esri/core/workers/chunks/6a2562cc00727155fc01.js +1 -0
- package/assets/esri/core/workers/chunks/784d6c6949284ed6e10b.js +1 -0
- package/assets/esri/core/workers/chunks/{916b363c342b61ba5461.js → 787c1a8bda7d745633f2.js} +1 -1
- package/assets/esri/core/workers/chunks/{590e6c70206122e4cc3c.js → 844eedda8f749972f707.js} +2 -2
- package/assets/esri/core/workers/chunks/{acfa03c65ba3ca6c5685.js → 8715661a838361d4211a.js} +1 -1
- package/assets/esri/core/workers/chunks/{d2347d6aa1c57fd57029.js → 8ff23ac0abeea0073b47.js} +1 -1
- package/assets/esri/core/workers/chunks/9215b59c5ccecf9add58.js +1 -0
- package/assets/esri/core/workers/chunks/{fafb92ca2c5e4b0b2c23.js → a09d2e1e2540921e4717.js} +1 -1
- package/assets/esri/core/workers/chunks/{ec8b7476eac4718eb0ac.js → a504a5e06cb89a620799.js} +1 -1
- package/assets/esri/core/workers/chunks/a53823cf03dbdce1aecd.js +1 -0
- package/assets/esri/core/workers/chunks/{a556dd4e9e6d35e33a2c.js → a546ec82ba149e12f7bf.js} +1 -1
- package/assets/esri/core/workers/chunks/{4a640548032355e57acd.js → ab6506a3c16f8717fc00.js} +1 -1
- package/assets/esri/core/workers/chunks/{de6081df29183bf80787.js → ade5fdcd08dcbac74740.js} +1 -1
- package/assets/esri/core/workers/chunks/ba38231193919e093917.js +1 -0
- package/assets/esri/core/workers/chunks/{3f776d9fd2ab68b21fca.js → bbd44ac63d2a317d8ed9.js} +1 -1
- package/assets/esri/core/workers/chunks/be308db5b61a7246edfe.js +1 -0
- package/assets/esri/core/workers/chunks/cb4be68cc5085d421615.js +1 -0
- package/assets/esri/core/workers/chunks/{10445313d0d57b34511b.js → d53cc574a21031436c45.js} +1 -1
- package/assets/esri/core/workers/chunks/d6cd0039d6e9c40961e3.js +1 -0
- package/assets/esri/core/workers/chunks/dc51dcaa4e2f9a90f5bd.js +2 -0
- package/assets/esri/core/workers/chunks/f63686735e4e52f5b54e.js +1 -0
- package/assets/esri/core/workers/chunks/{b573df59391ca41ee5a7.js → fc73737b41e086f0ce0b.js} +1 -1
- package/assets/esri/core/workers/chunks/{3914d96147642a9d4b01.js → ffbcb816b611049a6276.js} +1 -1
- package/assets/esri/themes/base/widgets/_Weather.scss +1 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.ar.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.bg.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.bs.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.ca.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.cs.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.da.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.de.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.el.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.es.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.et.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.fi.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.fr.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.he.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.hr.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.hu.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.id.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.it.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.ja.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.ko.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.lt.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.lv.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.nl.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.no.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.pl.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.pt-BR.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.pt-PT.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.ro.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.ru.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.sk.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.sl.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.sr.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.sv.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.th.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.tr.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.uk.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.vi.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.zh-CN.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.zh-HK.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.zh-TW.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ar.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.bg.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.bs.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ca.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.cs.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.da.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.de.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.el.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.es.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.et.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.fi.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.fr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.he.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.hr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.hu.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.id.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.it.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ja.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ko.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.lt.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.lv.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.nl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.no.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.pl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.pt-BR.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.pt-PT.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ro.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ru.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.sk.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.sl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.sr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.sv.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.th.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.tr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.uk.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.vi.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.zh-CN.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.zh-HK.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.zh-TW.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.ar.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.bg.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.bs.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.ca.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.cs.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.da.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.de.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.el.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.es.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.et.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.fi.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.fr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.he.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.hr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.hu.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.id.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.it.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.ja.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.ko.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.lt.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.lv.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.nl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.no.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.pl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.pt-BR.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.pt-PT.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.ro.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.ru.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.sk.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.sl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.sr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.sv.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.th.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.tr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.uk.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.vi.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.zh-CN.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.zh-HK.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.zh-TW.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.ar.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.bg.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.bs.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.ca.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.cs.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.da.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.de.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.el.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.es.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.et.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.fi.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.fr.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.he.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.hr.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.hu.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.id.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.it.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.ja.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.ko.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.lt.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.lv.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.nl.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.no.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.pl.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.pt-BR.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.pt-PT.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.ro.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.ru.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.sk.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.sl.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.sr.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.sv.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.th.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.tr.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.uk.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.vi.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.zh-CN.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.zh-HK.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/messages.zh-TW.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.ar.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.bg.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.bs.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.ca.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.cs.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.da.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.de.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.el.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.es.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.et.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.fi.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.fr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.he.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.hr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.hu.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.id.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.it.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.ja.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.ko.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.lt.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.lv.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.nl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.no.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.pl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.pt-BR.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.pt-PT.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.ro.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.ru.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.sk.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.sl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.sr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.sv.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.th.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.tr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.uk.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.vi.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.zh-CN.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.zh-HK.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.zh-TW.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.ar.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.bg.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.bs.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.ca.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.cs.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.da.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.de.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.el.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.es.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.et.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.fi.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.fr.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.he.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.hr.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.hu.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.id.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.it.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.ja.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.ko.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.lt.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.lv.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.nl.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.no.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.pl.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.pt-BR.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.pt-PT.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.ro.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.ru.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.sk.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.sl.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.sr.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.sv.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.th.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.tr.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.uk.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.vi.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.zh-CN.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.zh-HK.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/messages.zh-TW.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.ar.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.bg.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.bs.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.ca.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.cs.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.da.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.de.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.el.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.es.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.et.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.fi.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.fr.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.he.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.hr.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.hu.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.id.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.it.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.ja.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.ko.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.lt.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.lv.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.nl.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.no.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.pl.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.pt-BR.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.pt-PT.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.ro.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.ru.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.sk.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.sl.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.sr.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.sv.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.th.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.tr.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.uk.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.vi.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.zh-CN.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.zh-HK.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.zh-TW.json +1 -1
- package/config.js +1 -1
- package/core/workers/WorkerOwner.js +1 -1
- package/core/workers/workerFactory.js +1 -1
- package/core/workers/workers.js +2 -2
- package/core/workers.d.ts +9 -0
- package/form/elements.d.ts +46 -8
- package/form/elements.js +1 -1
- package/geometry/Mesh.js +1 -1
- package/geometry/support/curves/bezierCurveUtils.js +1 -1
- package/geometry/support/curves/ellipticArc7Utils.js +1 -1
- package/geometry/support/meshUtils/rotate.js +1 -1
- package/kernel.js +1 -1
- package/layers/GeoJSONLayer.d.ts +1 -1
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/LineOfSightLayer.d.ts +10 -8
- package/layers/ViewshedLayer.d.ts +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/raster/datasets/BaseRaster.js +1 -1
- package/layers/raster/datasets/ImageAuxRaster.js +2 -2
- package/layers/raster/datasets/InMemoryRaster.js +1 -1
- package/layers/support/kmlUtils.js +1 -1
- package/layers/support/layerOriginUtils.js +1 -1
- package/package.json +3 -3
- package/popup/FeaturesModel.js +1 -1
- package/smartMapping/statistics/support/statsWorker.js +1 -1
- package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/OGCFeatureLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/SceneLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/support/utils.js +1 -1
- package/symbols/support/ElevationInfo.d.ts +4 -3
- package/time/TimeExtent.d.ts +1 -1
- package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueBackground.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueFill.js +1 -1
- package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/analysis/LineOfSight/types.d.ts +14 -3
- package/views/3d/analysis/LineOfSightAnalysisView3D.d.ts +39 -13
- package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
- package/views/3d/analysis/Viewshed/types.d.ts +7 -0
- package/views/3d/analysis/ViewshedAnalysisView3D.d.ts +43 -15
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
- package/views/3d/layers/support/MediaLayerInteraction.js +1 -1
- package/views/View.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
- package/views/interactive/options/TooltipOptions.d.ts +2 -0
- package/views/interactive/sketch/SketchTooltipOptions.d.ts +2 -0
- package/views/interactive/snapping/SnappingManagerPool.js +1 -1
- package/views/interactive/snapping/allLayerSnapping.js +1 -1
- package/views/layers/LineOfSightLayerView.d.ts +35 -13
- package/views/layers/SketchLayerView.d.ts +1 -0
- package/views/layers/ViewshedLayerView.d.ts +36 -12
- package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.d.ts +2 -1
- package/widgets/BasemapToggle/BasemapToggleViewModel.d.ts +2 -0
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.d.ts +2 -1
- package/widgets/Expand/ExpandViewModel.d.ts +2 -0
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/Fullscreen/FullscreenViewModel.d.ts +3 -1
- package/widgets/Home/HomeViewModel.d.ts +2 -0
- package/widgets/ScaleRangeSlider/ScaleRanges.d.ts +3 -0
- package/widgets/ScaleRangeSlider/types.d.ts +3 -3
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Swipe/SwipeViewModel.d.ts +2 -0
- package/widgets/Swipe/types.d.ts +9 -2
- package/widgets/TimeSlider/TimeSliderViewModel.d.ts +9 -5
- package/widgets/TimeSlider/types.d.ts +7 -0
- package/widgets/TimeSlider.d.ts +2 -3
- package/widgets/TimeSlider.js +1 -1
- package/widgets/Track/TrackViewModel.d.ts +4 -0
- package/widgets/Track/types.d.ts +1 -0
- package/widgets/support/Selector3D/selectorUtils.js +1 -1
- package/assets/esri/core/workers/chunks/1b946714ca4a1a7359d4.js +0 -2
- package/assets/esri/core/workers/chunks/22b01fe31bbf0bdc48db.js +0 -1
- package/assets/esri/core/workers/chunks/27c2da2e779def2ee08b.js +0 -1
- package/assets/esri/core/workers/chunks/2a1ec30f9ad305763f81.js +0 -2
- package/assets/esri/core/workers/chunks/34570e6bbf559f18c1a5.js +0 -1
- package/assets/esri/core/workers/chunks/5566f14afb63065e438f.js +0 -1
- package/assets/esri/core/workers/chunks/68d8ae42ab71d01a70a5.js +0 -2
- package/assets/esri/core/workers/chunks/8cb716f110d164030309.js +0 -1
- package/assets/esri/core/workers/chunks/8dc1c3042267618fd710.js +0 -2
- package/assets/esri/core/workers/chunks/96c50a0dda0f1503ef92.js +0 -2
- package/assets/esri/core/workers/chunks/bac8c32665e982896ecc.js +0 -1
- package/assets/esri/core/workers/chunks/d9b1aed88b205689cec6.js +0 -1
- package/assets/esri/core/workers/chunks/de02a6a1f4810f99e9bb.js +0 -1
- package/assets/esri/core/workers/chunks/f4f9d08b2df856e3b694.js +0 -1
- /package/assets/esri/core/workers/chunks/{1b946714ca4a1a7359d4.js.LICENSE.txt → 2cb209bc51a19487692d.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{8dc1c3042267618fd710.js.LICENSE.txt → 2e66c969bf4209c957b5.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{96c50a0dda0f1503ef92.js.LICENSE.txt → 31640b41e0ecdff892fa.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{2a1ec30f9ad305763f81.js.LICENSE.txt → 4e6656a5f29e31902fca.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{590e6c70206122e4cc3c.js.LICENSE.txt → 844eedda8f749972f707.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{68d8ae42ab71d01a70a5.js.LICENSE.txt → dc51dcaa4e2f9a90f5bd.js.LICENSE.txt} +0 -0
package/form/elements.d.ts
CHANGED
|
@@ -50,39 +50,68 @@ import type RelationshipElementClass from "./elements/RelationshipElement.js";
|
|
|
50
50
|
import type TextElementClass from "./elements/TextElement.js";
|
|
51
51
|
import type UtilityNetworkAssociationsElementClass from "./elements/UtilityNetworkAssociationsElement.js";
|
|
52
52
|
|
|
53
|
-
/**
|
|
53
|
+
/**
|
|
54
|
+
* `FieldElement` defines how a feature layer's field participates in the form.
|
|
55
|
+
*
|
|
56
|
+
* @deprecated since 5.2. Import [FieldElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/) directly instead.
|
|
57
|
+
*/
|
|
54
58
|
export const FieldElement: typeof FieldElementClass;
|
|
55
59
|
|
|
56
|
-
/**
|
|
60
|
+
/**
|
|
61
|
+
* `FieldElement` defines how a feature layer's field participates in the form.
|
|
62
|
+
*
|
|
63
|
+
* @deprecated since 5.2. Import [FieldElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/) directly instead.
|
|
64
|
+
*/
|
|
57
65
|
export type FieldElement = FieldElementClass;
|
|
58
66
|
|
|
59
67
|
/**
|
|
60
68
|
* `GroupElement` defines a container that holds a set of form elements
|
|
61
69
|
* that can be expanded, collapsed, or displayed together.
|
|
70
|
+
*
|
|
71
|
+
* @deprecated since 5.2. Import [GroupElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/GroupElement/) directly instead.
|
|
62
72
|
*/
|
|
63
73
|
export const GroupElement: typeof GroupElementClass;
|
|
64
74
|
|
|
65
75
|
/**
|
|
66
76
|
* `GroupElement` defines a container that holds a set of form elements
|
|
67
77
|
* that can be expanded, collapsed, or displayed together.
|
|
78
|
+
*
|
|
79
|
+
* @deprecated since 5.2. Import [GroupElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/GroupElement/) directly instead.
|
|
68
80
|
*/
|
|
69
81
|
export type GroupElement = GroupElementClass;
|
|
70
82
|
|
|
71
|
-
/**
|
|
83
|
+
/**
|
|
84
|
+
* `RelationshipElement` defines how a relationship between [feature layers](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/) and [Map.tables](https://developers.arcgis.com/javascript/latest/references/core/Map/#tables) participates in the [FeatureForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/).
|
|
85
|
+
*
|
|
86
|
+
* @deprecated since 5.2. Import [RelationshipElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/RelationshipElement/) directly instead.
|
|
87
|
+
*/
|
|
72
88
|
export const RelationshipElement: typeof RelationshipElementClass;
|
|
73
89
|
|
|
74
|
-
/**
|
|
90
|
+
/**
|
|
91
|
+
* `RelationshipElement` defines how a relationship between [feature layers](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/) and [Map.tables](https://developers.arcgis.com/javascript/latest/references/core/Map/#tables) participates in the [FeatureForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/).
|
|
92
|
+
*
|
|
93
|
+
* @deprecated since 5.2. Import [RelationshipElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/RelationshipElement/) directly instead.
|
|
94
|
+
*/
|
|
75
95
|
export type RelationshipElement = RelationshipElementClass;
|
|
76
96
|
|
|
77
|
-
/**
|
|
97
|
+
/**
|
|
98
|
+
* `TextElement` form element is used to define descriptive text as an element within a layer or [FeatureForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/) [FormTemplate](https://developers.arcgis.com/javascript/latest/references/core/form/FormTemplate/) and can be used to aid those entering or updating information.
|
|
99
|
+
*
|
|
100
|
+
* @deprecated since 5.2. Import [TextElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/TextElement/) directly instead.
|
|
101
|
+
*/
|
|
78
102
|
export const TextElement: typeof TextElementClass;
|
|
79
103
|
|
|
80
|
-
/**
|
|
104
|
+
/**
|
|
105
|
+
* `TextElement` form element is used to define descriptive text as an element within a layer or [FeatureForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/) [FormTemplate](https://developers.arcgis.com/javascript/latest/references/core/form/FormTemplate/) and can be used to aid those entering or updating information.
|
|
106
|
+
*
|
|
107
|
+
* @deprecated since 5.2. Import [TextElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/TextElement/) directly instead.
|
|
108
|
+
*/
|
|
81
109
|
export type TextElement = TextElementClass;
|
|
82
110
|
|
|
83
111
|
/**
|
|
84
112
|
* `AttachmentElement` defines how one or more attachments can participate in the form. When present in the form, the user has the ability to upload an attachment specific to the form element.
|
|
85
113
|
*
|
|
114
|
+
* @deprecated since 5.2. Import [AttachmentElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/) directly instead.
|
|
86
115
|
* @since 5.1
|
|
87
116
|
*/
|
|
88
117
|
export const AttachmentElement: typeof AttachmentElementClass;
|
|
@@ -90,12 +119,21 @@ export const AttachmentElement: typeof AttachmentElementClass;
|
|
|
90
119
|
/**
|
|
91
120
|
* `AttachmentElement` defines how one or more attachments can participate in the form. When present in the form, the user has the ability to upload an attachment specific to the form element.
|
|
92
121
|
*
|
|
122
|
+
* @deprecated since 5.2. Import [AttachmentElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/) directly instead.
|
|
93
123
|
* @since 5.1
|
|
94
124
|
*/
|
|
95
125
|
export type AttachmentElement = AttachmentElementClass;
|
|
96
126
|
|
|
97
|
-
/**
|
|
127
|
+
/**
|
|
128
|
+
* `UtilityNetworkAssociationsElement` defines how utility network associations can participate in the form.
|
|
129
|
+
*
|
|
130
|
+
* @deprecated since 5.2. Import [UtilityNetworkAssociationsElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/UtilityNetworkAssociationsElement/) directly instead.
|
|
131
|
+
*/
|
|
98
132
|
export const UtilityNetworkAssociationsElement: typeof UtilityNetworkAssociationsElementClass;
|
|
99
133
|
|
|
100
|
-
/**
|
|
134
|
+
/**
|
|
135
|
+
* `UtilityNetworkAssociationsElement` defines how utility network associations can participate in the form.
|
|
136
|
+
*
|
|
137
|
+
* @deprecated since 5.2. Import [UtilityNetworkAssociationsElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/UtilityNetworkAssociationsElement/) directly instead.
|
|
138
|
+
*/
|
|
101
139
|
export type UtilityNetworkAssociationsElement = UtilityNetworkAssociationsElementClass;
|
package/form/elements.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import e from"./elements/AttachmentElement.js";import
|
|
2
|
+
import{deprecatedModule as e}from"../core/deprecate.js";import t from"../core/Logger.js";import n from"./elements/AttachmentElement.js";import r from"./elements/FieldElement.js";import i from"./elements/GroupElement.js";import a from"./elements/RelationshipElement.js";import o from"./elements/TextElement.js";import s from"./elements/UtilityNetworkAssociationsElement.js";e(t.getLogger(`esri.form.elements`),`esri.form.elements`,{replacement:`Individual element module imports`,version:`5.2`,warnOnce:!0});const c=r,l=i,u=a,d=o,f=n,p=s;export{f as AttachmentElement,c as FieldElement,l as GroupElement,u as RelationshipElement,d as TextElement,p as UtilityNetworkAssociationsElement};
|
package/geometry/Mesh.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{ClonableMixin as t}from"../core/Clonable.js";import{LoadableMixin as n}from"../core/Loadable.js";import r from"../core/Logger.js";import{EsriPromiseMixin as i}from"../core/Promise.js";import{throwIfAborted as a,isPromiseLike as o,whenOrAbort as s}from"../core/promiseUtils.js";import{watch as c}from"../core/reactiveUtils.js";import{property as l,subclass as u}from"../core/accessorSupport/decorators.js";import{fromValues as d}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import f from"./Geometry.js";import p from"./Point.js";import m from"./Polygon.js";import{create as h,
|
|
2
|
+
import{__decorate as e}from"tslib";import{ClonableMixin as t}from"../core/Clonable.js";import{LoadableMixin as n}from"../core/Loadable.js";import r from"../core/Logger.js";import{EsriPromiseMixin as i}from"../core/Promise.js";import{throwIfAborted as a,isPromiseLike as o,whenOrAbort as s}from"../core/promiseUtils.js";import{watch as c}from"../core/reactiveUtils.js";import{property as l,subclass as u}from"../core/accessorSupport/decorators.js";import{fromValues as d}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import f from"./Geometry.js";import p from"./Point.js";import m from"./Polygon.js";import{create as h,zero as g,fromBuffer as _}from"./support/aaBoundingBox.js";import{composeAxes as v,create as y}from"./support/axisAngleDegrees.js";import b from"./support/MeshComponent.js";import{componentNotFoundMessage as x,meshNotLoadedMessage as S,invalidLocationMessage as C,invalidPolygonMessage as w,InvalidLocationError as T}from"./support/meshErrors.js";import E from"./support/MeshGeoreferencedVertexSpace.js";import D from"./support/MeshLocalVertexSpace.js";import O from"./support/MeshTransform.js";import k from"./support/MeshVertexAttributes.js";import{vertexSpaceOriginToPoint as A,isRelativeVertexSpace as j}from"./support/meshVertexSpaceUtils.js";import{centerAt as M}from"./support/meshUtils/centerAt.js";import{computeMeshExtent as N}from"./support/meshUtils/extent.js";import{loadExternal as P}from"./support/meshUtils/loadExternal.js";import{addMeshMaterialCloneContext as F,addMeshTextureCloneContext as I,getMeshCloneContext as L}from"./support/meshUtils/meshCloneUtils.js";import{Metadata as R}from"./support/meshUtils/Metadata.js";import{convertUnitGeometry as z,createUnitSizeBox as B,extractSingleFaceOfBox as V,createUnitSizeSphere as H,createUnitSizeCylinder as U,convertPlaneSizeParameter as W,createUnitSizePlane as G}from"./support/meshUtils/primitives.js";import{rotate as K}from"./support/meshUtils/rotate.js";import{scale as q}from"./support/meshUtils/scale.js";import{polygonToRenderInfoNotElevationAligned as J}from"../views/3d/support/renderInfoUtils/polygon.js";var Y;const X={base:null,key:`type`,defaultKeyValue:`georeferenced`,typeMap:{georeferenced:E,local:D}};let Z=Y=class extends t(n(i(f))){constructor(e){super(e),this.components=null,this.vertexSpace=new E,this.transform=null,this.metadata=new R,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new k,this.type=`mesh`}initialize(){(this.metadata.externalSources.length===0||this.vertexAttributes.position.length)&&(this.loadStatus=`loaded`),this.when(()=>{this.addHandles(c(()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map(e=>e.clone())}),()=>this._clearSources(),{once:!0,sync:!0}))}).catch(()=>{})}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):this.metadata.displaySource?.extent!=null}get _transformedExtent(){let{spatialReference:e,vertexSpace:t}=this,n=this;return N({get transform(){return n.transform},vertexSpace:t,spatialReference:e,untransformedBounds:this._untransformedBounds})}get _untransformedBounds(){let{vertexAttributes:{position:e},components:t}=this;return e.length===0||t?.length===0?h(g):_(e)}get origin(){let e=A(this.vertexSpace,this.spatialReference);if(e!=null)return e;let{center:t,zmin:n}=this._transformedExtent;return new p({x:t.x,y:t.y,z:n,spatialReference:this.spatialReference})}get extent(){return!this.loaded&&this.metadata?.displaySource?.extent!=null?this.metadata.displaySource.extent.clone():this._transformedExtent}addComponent(e){this._checkIfLoaded(`addComponent()`)&&(this.components||=[],this.components.push(b.from(e)),this.notifyChange(`components`))}removeComponent(e){if(this._checkIfLoaded(`removeComponent()`)){if(this.components){let t=this.components.indexOf(e);if(t!==-1){this.components.splice(t,1),this.notifyChange(`components`);return}}r.getLogger(this).error(`removeComponent()`,x)}}rotate(e,t,n,r){return v(e,t,n,Q),K(this,Q,r),this}offset(e,t,n){if(!this._checkIfLoaded(`offset()`))return this;let{vertexSpace:r,vertexAttributes:i}=this,a=i?.position;if(!a)return this;if(j(r)){let[i,a,o]=r.origin;r.origin=d(i+e,a+t,o+n)}else{for(let r=0;r<a.length;r+=3)a[r]+=e,a[r+1]+=t,a[r+2]+=n;this.vertexAttributesChanged()}return this}scale(e,t){return this._checkIfLoaded(`scale()`)&&q(this,e,t),this}centerAt(e,t){return this._checkIfLoaded(`centerAt()`)&&M(this,e,t),this}load(e){let{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(P(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(e){return super.clone(F(I(e)))}cloneShallow(){return new Y({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange(`vertexAttributes`)}async toBinaryGLTF(e){let[{toBinaryGLTF:t}]=await Promise.all([import(`./support/meshUtils/exporters/gltf/gltfexport.js`),this.load(e)]);return a(e),await t(this,e)}get usedMemory(){return this.components?this.components.reduce((e,t)=>e+t.memoryUsage,this.vertexAttributes.usedMemory):this.vertexAttributes.usedMemory}_clearSources(){this.metadata.clearSources()}_checkIfLoaded(e){return this.loaded?!0:(r.getLogger(this).error(e,S),!1)}static createBox(e,t){if(!(e instanceof p))return r.getLogger(this.prototype).error(`.createBox()`,C),null;let n=new Y(z(B(),e,t));return t?.imageFace&&t.imageFace!==`all`?V(n,t.imageFace):n}static createSphere(e,t){return e instanceof p?new Y(z(H(t?.densificationFactor||0),e,t)):(r.getLogger(this.prototype).error(`.createSphere()`,C),null)}static createCylinder(e,t){return e instanceof p?new Y(z(U(t?.densificationFactor||0),e,t)):(r.getLogger(this.prototype).error(`.createCylinder()`,C),null)}static createPlane(e,t){if(!(e instanceof p))return r.getLogger(this.prototype).error(`.createPlane()`,C),null;let n=t?.facing??`up`,i=W(n,t?.size);return new Y(z(G(n),e,{...t,size:i}))}static createFromPolygon(e,t){if(!(e instanceof m))return r.getLogger(this.prototype).error(`.createFromPolygon()`,w),null;let n=J(e,{method:`earcut`}),i=o(n)?null:n,a=i?.positions??[],s=i?.polygonIndices??[];return new Y({vertexAttributes:new k({position:a}),components:[new b({faces:s,shading:`flat`,material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new E})}static async createFromGLTF(e,t,n){if(!(e instanceof p)){let e=new T;throw r.getLogger(this.prototype).error(`.createfromGLTF()`,e.message),e}let{loadGLTFMesh:i}=await s(import(`./support/meshUtils/loadGLTFMesh.js`),n);return new Y((await i(e,t,n)).mesh)}};e([l({type:[b],json:{write:!0}})],Z.prototype,`components`,void 0),e([l({nonNullable:!0,types:X,constructOnly:!0,json:{write:!0},clonable:(e,t)=>L(t)?.vertexSpace??e.clone(t)})],Z.prototype,`vertexSpace`,void 0),e([l({type:O,clonable:(e,t)=>{let n=L(t);return n&&`transform`in n?n.transform:e?.clone()??e},json:{write:!0}})],Z.prototype,`transform`,void 0),e([l({constructOnly:!0,type:R,clonable:(e,t)=>L(t)?.metadata??e.clone()})],Z.prototype,`metadata`,void 0),e([l()],Z.prototype,`hasExtent`,null),e([l()],Z.prototype,`_transformedExtent`,null),e([l()],Z.prototype,`_untransformedBounds`,null),e([l()],Z.prototype,`origin`,null),e([l({readOnly:!0,json:{read:!1}})],Z.prototype,`extent`,null),e([l({readOnly:!0,json:{read:!1,write:!0,default:!0}})],Z.prototype,`hasZ`,void 0),e([l({readOnly:!0,json:{read:!1,write:!0,default:!1}})],Z.prototype,`hasM`,void 0),e([l({type:k,nonNullable:!0,json:{write:!0},clonable:(e,t)=>L(t)?.vertexAttributes??e.clone(t)})],Z.prototype,`vertexAttributes`,void 0),Z=Y=e([u(`esri.geometry.Mesh`)],Z);const Q=y();export{Z as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{floatEqualRelative as e,floatEqualAbsolute as t}from"../../../core/mathUtils.js";import{exactEquals as n}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{expandPointInPlace as r,containsXY as i,expandXInPlace as a,expandYInPlace as o}from"../aaBoundingRect.js";import{
|
|
2
|
+
import{floatEqualRelative as e,floatEqualAbsolute as t}from"../../../core/mathUtils.js";import{exactEquals as n}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{expandPointInPlace as r,containsXY as i,expandXInPlace as a,expandYInPlace as o}from"../aaBoundingRect.js";import{findClosestAndFurthestCurveParametersToPoint as s,distance2 as c,interpolateSegment as l}from"./mathUtils.js";const u=[0,0];function d(e){let t=1-e,n=t*t,r=e*e;return[n*t,3*e*n,3*r*t,r*e]}function f(e,t,n,r,i){let[a,o,s,c]=d(i);return[e[0]*a+t[0]*o+n[0]*s+r[0]*c,e[1]*a+t[1]*o+n[1]*s+r[1]*c]}function p(e,t,n,r,i){let[a,o,s,c]=d(i);return e*a+t*o+n*s+r*c}function m(e,t,n){let r=e,[i,a,o]=t.b;return f(r,a,o,i,n)}function h(e,t){let[[r,i],a,o]=t.b,s=[r,i];return n(s,o)?n(s,a)?n(s,e)?null:[r-e[0],i-e[1]]:[r-a[0],i-a[1]]:[r-o[0],i-o[1]]}function g(e,t,n){let r=e,[i,a,o]=t.b,s=l([0,0],r,a,n),c=l(u,a,o,n),d=l([0,0],o,i,n),f=l([0,0],s,c,n),p=l([0,0],c,d,n);return[{b:[l([],f,p,n),s,f]},{b:[[...i],p,d]}]}function _(n,r,i){let a=n,[o,c,l]=r.b,u=s(i,[.1,.5,.9],e=>{let t=1-e,[n,r]=f(a,c,l,o,e);return[n,r,3*t*t*(c[0]-a[0])+6*t*e*(l[0]-c[0])+3*e*e*(o[0]-l[0]),3*t*t*(c[1]-a[1])+6*t*e*(l[1]-c[1])+3*e*e*(o[1]-l[1]),6*t*(l[0]-2*c[0]+a[0])+6*e*(o[0]-2*l[0]+c[0]),6*t*(l[1]-2*c[1]+a[1])+6*e*(o[1]-2*l[1]+c[1])]}).map(e=>Math.min(1,Math.max(0,e)));u.push(0,1);let d=1/0,p=u.map(e=>{let t=f(a,c,l,o,e),[n,r]=t,s=i[0]-n,u=i[1]-r,p=Math.sqrt(s*s+u*u);return d=Math.min(p,d),{t:e,curvePoint:t,distance:p}}),m=[];for(let n of p){let{t:r,distance:i}=n;e(i,d)&&!m.some(({t:e})=>t(e,r))&&m.push(n)}return m}function v(e,t,n){let s=t,[c,l,u]=n.b;if(r(e,s),r(e,c),i(e,l[0],l[1])&&i(e,u[0],u[1]))return e;for(let t of y(s[0],l[0],u[0],c[0]))t>0&&t<1&&a(e,p(s[0],l[0],u[0],c[0],t));for(let t of y(s[1],l[1],u[1],c[1]))t>0&&t<1&&o(e,p(s[1],l[1],u[1],c[1],t));return e}function y(e,t,n,r){let i=3*(-e+3*(t-n)+r),a=6*(e-2*t+n),o=3*(t-e);if(i===0)return a===0?[]:[-o/a];let s=Math.sqrt(a*a-4*i*o);return[(-a+s)/(2*i),(-a-s)/(2*i)]}function b(e,t,n){let r=0,i=[t];for(let t=0;t<16;t++){let t=e,a=[];for(let e of i)a.push(...g(t,e,.5)),t=e.b[0];i=a,t=e,r=0;let o=0;for(let e of i){let[n,i,a]=e.b,s=Math.sqrt(c(t,n)),l=Math.sqrt(c(t,i)),u=Math.sqrt(c(i,a)),d=Math.sqrt(c(a,n)),f=l+u+d;r+=(s+f)/2,o+=s,t=n}if(r-o<n)return r}return r}export{v as bezierCurveExtent,b as bezierCurveLength,h as calculateBezierCurveTangent,_ as closestPointsOnBezierCurve,m as interpolateBezierCurve,f as interpolateCubicBezier,p as interpolateCubicBezier1D,g as splitBezierCurve};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{set as e,invert as t,transpose as n,multiply as r}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{transformMat3 as a,exactEquals as o,normalize as s,add as c}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{expandPointInPlace as l}from"../aaBoundingRect.js";import{cloneCurve as u}from"./curveUtils.js";import{angularRangeWrap as d,angularRangeOriented as f,angularRange as p,wrapAtan2 as m,
|
|
2
|
+
import{set as e,invert as t,transpose as n,multiply as r}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{transformMat3 as a,exactEquals as o,normalize as s,add as c}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{expandPointInPlace as l}from"../aaBoundingRect.js";import{cloneCurve as u}from"./curveUtils.js";import{angularRangeWrap as d,angularRangeOriented as f,angularRange as p,wrapAtan2 as m,findClosestAndFurthestCurveParametersToPoint as h,distance2 as g,intersectLineLine as _,angularDistanceAlongOrientedArc as v}from"./mathUtils.js";class y{constructor(e,t,n,r,i,a,o,s,c){this.cx=e,this.cy=t,this.a=n,this.b=r,this.cosR=i,this.sinR=a,this.u1=o,this.u2=s,this.isInvalid=c}}function b(e,t){let[n,r,i,a,o,s,c]=t.a,[l,u]=e,[d,p]=n,[h,g]=r,_=s*c,v=Math.cos(o),b=Math.sin(o),[x,S]=f(m(1/_*(u-g)*v-1/_*(l-h)*b,1/s*(u-g)*b+1/s*(l-h)*v),Math.atan2(1/_*(p-g)*v-1/_*(d-h)*b,1/s*(p-g)*b+1/s*(d-h)*v),i,a);return new y(h,g,s,_,v,b,x,S,s===0||_===0)}function x(e,t){let{a:n,b:r,cosR:i,sinR:a,cx:o,cy:s}=e,c=Math.cos(t),l=Math.sin(t);return[n*c*i-r*l*a+o,n*c*a+r*l*i+s]}function S(e,t){let{u1:n,u2:r}=e;return x(e,n*(1-t)+r*t)}function C(e,t){let[n,r]=t.a[0],{a:i,b:a,cx:l,cy:u,cosR:d,sinR:f,isInvalid:p,u1:m,u2:h}=b(e,t);if(p){let[t,i]=e;return o([t,i],[n,r])?null:[n-t,r-i]}let g=Math.sqrt(i*i-a*a),_=[l+g*d,u+g*f],v=[l-g*d,u-g*f],y=[n-_[0],r-_[1]],x=[n-v[0],r-v[1]];s(y,y),s(x,x);let[S,C]=c(y,y,x);return h>m?[-C,S]:[C,S]}function w(e,t,n){if(n<0||n>1)return[];if(n===0||n===1)return[u(t)];let[r,[i,a],o,s,c,l,d]=t.a,{u1:f,u2:p}=e,m=S(e,n),h=f*(1-n)+p*n,g=+(Math.abs(h-f)<Math.PI),_=+(Math.abs(p-h)<Math.PI);return[{a:[[...m],[i,a],g,s,c,l,d]},{a:[[...r],[i,a],_,s,c,l,d]}]}function T(e,t){let{a:n,b:r,cosR:i,sinR:a,u1:o,u2:s}=e,c=Math.PI/6,l=[1*c,2*c,4*c,5*c,7*c,8*c,10*c,11*c],u=h(t,l,t=>{let o=Math.cos(t),s=Math.sin(t),[c,l]=x(e,t);return[c,l,-n*i*s-r*a*o,-n*a*s+r*i*o,-n*i*o+r*a*s,-n*a*o-r*i*s]}),f=p(o,s),m=new Set(u.map(e=>d(f,e)).filter(e=>e>f.min&&e<f.max));m.add(o),m.add(s);let g=1/0,_,v;for(let n of m){let r=x(e,n),[i,a]=r,c=t[0]-i,l=t[1]-a,u=c*c+l*l;u<g&&(_=(n-o)/(s-o),v=r,g=u)}return{t:_,curvePoint:v,distance:Math.sqrt(g)}}function E(e,t,n){let r=b(t,n),{a:i,b:a,u1:o,u2:s,cosR:c,sinR:u,isInvalid:f}=r,m=n.a[0];if(l(e,t),l(e,m),f)return e;let h=Math.atan2(-a*u,i*c),g=h+Math.PI,_=Math.atan2(a*c,i*u),v=_+Math.PI,y=p(o,s);for(let t of[h,g,_,v].map(e=>d(y,e)))t>y.min&&t<y.max&&l(e,x(r,t));return e}function D(e,t,n){let[r,i,a,o,s,c,l]=t.a,u=b(e,t),{u1:d,u2:f,isInvalid:p}=u,m=f-d;if(p)return Math.sqrt(g(e,r));let h=[0,0],v=0,y=[S(u,0),S(u,.25),S(u,.5),S(u,.75),S(u,1)];for(let e=0;e<14;e++){let e=y.length-1,t=m/(e*2),r=[];for(let n=0;n<e;n++)r.push(y[n]),r.push(x(u,d+(n*2+1)*t));r.push(y[y.length-1]),y=r,v=0;let a=0;for(let e=1;e<y.length;e++){let t=y[e-1],n=y[e];if(v+=Math.sqrt(g(t,n)),e>1){let r=y[e-2],o=_(h,r,t,i,n);a+=o?Math.sqrt(g(t,o)):Math.abs(n[0]-t[0])+Math.abs(n[1]-t[1])}else a+=v}if(a-v<n)return v}return v}const O=i(),k=i(),A=i(),j=i();function M(i,o,s){let[c,l,u,d,f,p,h]=o.a,{cosR:_,sinR:v,a:y,b:x,cx:S,cy:C}=b(i,o),w=a([0,0],c,s),T=a([0,0],l,s),E=s[0]*s[4]<0?1-d:d;{let t=y*y*v*v+x*x*_*_,n=2*(x*x-y*y)*v*_,r=y*y*_*_+x*x*v*v,i=-2*t*S-n*C,a=-n*S-2*r*C,o=t*S*S+n*S*C+r*C*C-y*y*x*x;e(O,t,n/2,i/2,n/2,r,a/2,i/2,a/2,o)}if(t(k,s),k==null){let e=a([0,0],i,s);return{a:[w,T,u,d,m(w[1],w[0]),Math.sqrt(g(w,e))/2,0]}}n(A,k),r(j,r(j,A,O),k);{let e=j[0],t=2*j[1],n=j[4],r=2*j[2],i=2*j[5],a=j[8],o=t*t-4*e*n,s=2*(e*i*i+n*r*r-t*r*i+o*a),c=Math.sqrt((e-n)**2+t*t),l=-Math.sqrt(s*(e+n+c))/o,d=-Math.sqrt(s*(e+n-c))/o;return{a:[w,T,u,E,.5*m(-t,n-e),l,d/l]}}}function N(e,t){let[n,r]=e,[i,[a,o],s,c,l,u,d]=t.a,[f,p]=i;if(d<1e-8||u===0){t.a=[i,[0,0],0,0,0,0,0];return}let m=u*d,h=Math.cos(l),g=Math.sin(l);function _(e,t){let n=(e*h+t*g)/u,r=(t*h-e*g)/m;return n*n+r*r}let y=_(n-a,r-o),b=_(f-a,p-o);if(y===1&&b===1)return;if(Math.hypot(f-n,p-r)<1e-8){s?t.a=[i,[0,0],0,0,0,0,0]:t.a[5]=u*Math.sqrt(y);return}let x=(h*(n-f)+g*(r-p))/2,S=(-g*(n-f)+h*(r-p))/2,C=x*x,w=S*S,T=C/(u*u)+w/(m*m);if(T>1){let e=Math.sqrt(T);u*=e,m*=e}let E=u*u,D=m*m,O=E*w+D*C,k=Math.sqrt((E*D-O)/O);isFinite(k)||(k=0),!s==!c&&(k=-k);let A=k*S*u/m,j=-(k*x*m)/u;a=h*A-g*j+(n+f)/2,o=g*A+h*j+(r+p)/2;let M=Math.atan2(r-o,n-a),N=Math.atan2(p-o,f-a);s=+(v(M,N,c)<=Math.PI),t.a[1].splice(0,2,a,o),t.a[2]=s,t.a.splice(5,2,u,m/u)}export{y as DerivedEllipse,C as calculateEllipticArc7Tangent,T as closestPointOnEllipse,b as deriveEllipse,E as ellipticArcExtent,D as ellipticArcLength,S as interpolateEllipse,N as normalizeEllipticArcAfterEndpointChange,w as splitEllipticArc7,M as transformEllipticArc};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import e from"../../../core/Logger.js";import{fromMat4 as t}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as n}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{fromRotationTranslationScaleOrigin as r,multiply as i,getScale as a,scale as o,getTranslation as s,fromRotation as c}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as l}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{setAxisAngle as u}from"../../../core/libs/gl-matrix-2/math/quat.js";import{create as d}from"../../../core/libs/gl-matrix-2/factories/quatf64.js";import{set as f,inverse as p,transformMat3 as m,transformMat4 as h}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as g,
|
|
2
|
+
import e from"../../../core/Logger.js";import{fromMat4 as t}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as n}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{fromRotationTranslationScaleOrigin as r,multiply as i,getScale as a,scale as o,getTranslation as s,fromRotation as c}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as l}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{setAxisAngle as u}from"../../../core/libs/gl-matrix-2/math/quat.js";import{create as d}from"../../../core/libs/gl-matrix-2/factories/quatf64.js";import{set as f,inverse as p,transformMat3 as m,transformMat4 as h}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as g,create as _,ONES as v}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import y from"../../Point.js";import{getSphericalPCPF as b}from"../../spatialReferenceEllipsoidUtils.js";import{computeTranslationToOriginAndRotation as x}from"../../projection/computeTranslationToOriginAndRotation.js";import{projectPointToVector as S}from"../../projection/projectPointToVector.js";import{angleRad as C,axis as w,fromMatrix as T,create as E}from"../axisAngleDegrees.js";import D from"../MeshTransform.js";import{isMeshWithRelativeVertexSpace as O}from"../meshVertexSpaceUtils.js";import{performGlobalOperation as k}from"./geographicUtils.js";import{logProjectionError as A,loadProjectErrorMessage as j,projectToPCPF as M,projectNormalToPCPF as N,projectTangentToPCPF as P,projectFromPCPF as F,projectNormalFromPCPF as I,projectTangentFromPCPF as L}from"./projection.js";import{projectPointToVertexSpace as R}from"./vertexSpaceConversion.js";const z=()=>e.getLogger(`esri.geometry.support.meshUtils.rotate`);function B(e,t,n){if(!e.vertexAttributes?.position||t[3]===0)return;let{spatialReference:r,vertexSpace:i}=e,a=n?.origin??e.origin;O(e)?V(e,t,a):k(i,r)?H(e,t,a):U(e,t,a)}function V(e,t,n){e.transform??=new D;let{vertexSpace:c,transform:l,spatialReference:d}=e,[m,h,b]=c.origin,x=new y({x:m,y:h,z:b,spatialReference:d}),S=G;if(x.equals(n))f(S,0,0,0);else if(!R(S,n,e)){A(z(),n.spatialReference,d,j);return}u(Z,w(t),C(t));let E=r(K,Z,g,v,S),{localMatrix:O}=l,k=i(K,E,O);l.scale=a(_(),k),o(k,k,p(G,l.scale));let M=l.rotationAxis;l.rotation=T(k),l.rotationAngle===0&&(l.rotationAxis=M),l.translation=s(_(),k)}function H(e,n,r){let i=e.spatialReference,a=b(i),o=X;if(!S(r,o,a)&&(A(z(),r.spatialReference,a,`Falling back to mesh origin`),!S(e.origin,o,a))){A(z(),e.origin.spatialReference,a);return}let s=e.vertexAttributes.position,c=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,u=new Float64Array(s.length),d=c==null?null:new Float32Array(c.length),f=l==null?null:new Float32Array(l.length);x(a,o,J,a),t(Y,J);let p=q;if(m(w(q),w(n),Y),p[3]=n[3],!M(s,i,u,a)){A(z(),i,a);return}if(c!=null&&d!=null&&!N(c,s,i,u,a,d)){A(z(),i,a);return}if(l!=null&&f!=null&&!P(l,s,i,u,a,f)){A(z(),i,a);return}if(W(u,p,3,o),!F(u,a,s,i)){A(z(),a,i);return}if(c!=null&&d!=null&&(W(d,p,3),!I(d,s,i,u,a,c))){A(z(),a,i);return}if(l!=null&&f!=null&&(W(f,p,4),!L(f,s,i,u,a,l))){A(z(),a,i);return}e.vertexAttributesChanged()}function U(e,t,n){let r=X;if(!S(n,r,e.spatialReference)){let t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,A(z(),n.spatialReference,e.spatialReference,j);return}W(e.vertexAttributes.position,t,3,r),W(e.vertexAttributes.normal,t,3),W(e.vertexAttributes.tangent,t,4),e.vertexAttributesChanged()}function W(e,t,n,r=g){if(e!=null){c(J,C(t),w(t));for(let t=0;t<e.length;t+=n){for(let n=0;n<3;n++)G[n]=e[t+n]-r[n];h(G,G,J);for(let n=0;n<3;n++)e[t+n]=G[n]+r[n]}}}const G=_(),K=l(),q=E(),J=l(),Y=n(),X=_(),Z=d();export{B as rotate};
|
package/kernel.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"./core/has.js";import{addQueryParameter as e}from"./core/urlUtils.js";Symbol.dispose??=Symbol(`Symbol.dispose`),Symbol.asyncDispose??=Symbol(`Symbol.asyncDispose`);const t=`5.2`;let n=`5.2`;n=`5.2.0-next.
|
|
2
|
+
import"./core/has.js";import{addQueryParameter as e}from"./core/urlUtils.js";Symbol.dispose??=Symbol(`Symbol.dispose`),Symbol.asyncDispose??=Symbol(`Symbol.asyncDispose`);const t=`5.2`;let n=`5.2`;n=`5.2.0-next.158`;let r;function i(e){r=e}function a(t){let n=r?.findCredential(t);return n?.token?e(t,`token`,n.token):t}globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}});export{a as addTokenParameter,n as fullVersion,r as id,i as setId,t as version};
|
package/layers/GeoJSONLayer.d.ts
CHANGED
|
@@ -648,7 +648,7 @@ export interface GeoJSONLayerEvents extends EditBusLayerEvents, RefreshableLayer
|
|
|
648
648
|
*
|
|
649
649
|
* @since 4.11
|
|
650
650
|
* @see [Sample - Add GeoJSONLayer to your Map](https://developers.arcgis.com/javascript/latest/sample-code/layers-geojson/)
|
|
651
|
-
* @see [Sample - Filter features with
|
|
651
|
+
* @see [Sample - Filter features with Time Bar component](https://developers.arcgis.com/javascript/latest/sample-code/time-bar-filter/)
|
|
652
652
|
* @see [Sample - GeoJSONLayer with dynamic URL](https://developers.arcgis.com/javascript/latest/sample-code/layers-geojson-refresh/)
|
|
653
653
|
* @see [Query and filter guide](https://developers.arcgis.com/javascript/latest/query-filter/)
|
|
654
654
|
* @see [GeoJSONLayerView](https://developers.arcgis.com/javascript/latest/references/core/views/layers/GeoJSONLayerView/)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../PopupTemplate.js";import{ClonableMixin as n}from"../core/Clonable.js";import r from"../core/Error.js";import i from"../core/Logger.js";import{removeMaybe as a}from"../core/maybe.js";import{MultiOriginJSONSupportMixin as o}from"../core/MultiOriginJSONSupport.js";import{debounce as s,throwIfAbortError as ee}from"../core/promiseUtils.js";import{watch as c}from"../core/reactiveUtils.js";import{property as l,subclass as u}from"../core/accessorSupport/decorators.js";import{ensureClass as d}from"../core/accessorSupport/ensureType.js";import f from"../graphic/ImageryTileGraphicOrigin.js";import p from"./Layer.js";import{ArcGISService as m}from"./mixins/ArcGISService.js";import{BlendLayer as h}from"./mixins/BlendLayer.js";import{CustomParametersMixin as te}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as g}from"./mixins/OperationalLayer.js";import{PortalLayer as _}from"./mixins/PortalLayer.js";import{RasterJobHandlerMixin as v}from"./mixins/RasterJobHandlerMixin.js";import{RasterPresetRendererMixin as y}from"./mixins/RasterPresetRendererMixin.js";import{RefreshableLayer as b}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as x}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as S}from"./mixins/TemporalLayer.js";import{TiledImagery as C}from"./mixins/TiledImagery.js";import{isFunctionRaster as w,getPrimaryRasters as T}from"./raster/datasets/datasetUtils.js";import E from"./raster/datasets/FunctionRaster.js";import D from"./raster/datasets/RasterFactory.js";import{getPrimaryRasterUrls as O,create as k}from"./raster/functions/rasterFunctionHelper.js";import{legendEnabled as A,screenSizePerspectiveEnabled as j}from"./support/commonProperties.js";import M from"./support/Field.js";import{getServicePixelValueField as N,getRawServicePixelValueField as P,getRasterAttributeTableFields as F,getMagnitudeField as I,getDirectionField as L,getMultidimensionalFields as R,commonRasterFieldNames as z,setDefaultRasterFieldFormats as B}from"./support/rasterFieldUtils.js";import V from"./support/RasterFunction.js";import{getRasterJobHandler as H,releaseRasterJobHandler as U}from"./support/rasterJobHelper.js";import W from"./support/TileInfo.js";import{logInvalidElevationInfoWarning as G,elevationModeUnsupportedMessage as K,featureExpressionUnsupportedMessage as q}from"../support/elevationInfoUtils.js";import{createPopupTemplate as J}from"../support/popupUtils.js";import Y from"../symbols/support/ElevationInfo.js";import{addLayerUnsupportedError as X}from"../webdoc/support/unsupportedErrors.js";let Z=class extends h(x(g(_(y(te(C(v(S(m(b(o(n(p))))))))))))){constructor(...e){super(...e),this._primaryRasters=[],this.charts=null,this.graphicOrigin=new f(this),this.legendEnabled=!0,this.isReference=null,this.listMode=`show`,this.sourceJSON=null,this.version=null,this.type=`imagery-tile`,this.operationalLayerType=`ArcGISTiledImageServiceLayer`,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.fields=null,this.source=void 0,this._debouncedSaveOperations=s(async(e,t,n)=>{let{save:r,saveAs:i}=await import(`./save/imageryUtils.js`);switch(e){case 0:return r(this,t);case 1:return i(this,n,t)}})}normalizeCtorArgs(e,t){return typeof e==`string`?{url:e,...t}:e}load(e){let t=e==null?null:e.signal;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:[`Image Service`]},e).catch(ee).then(()=>this._openRaster(t))),Promise.resolve(this)}destroy(){super.destroy(),this._releaseWorkerHandle=a(this._releaseWorkerHandle)}set elevationInfo(e){e?.mode!==`relative-to-scene`&&this._set(`elevationInfo`,e),this._validateElevationInfo(e)}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){let e=[N(`Pixel Value`),P(`Raw Pixel Value`)],t=this.raster?.rasterInfo??this.serviceRasterInfo,n=t?.attributeTable;if(n){let t=F(n);e.push(...t)}let r=t?.dataType,i=t?.multidimensionalInfo;if((r===`vector-magdir`||r===`vector-uv`)&&i!=null){let t=i.variables[0].unit?.trim(),n=I(t),r=L();e.push(n,r)}if(i){let t=R(i);e.push(...t)}return e}get renderer(){return super.renderer}set renderer(e){super.renderer=e}createPopupTemplate(e){let{rasterFields:t}=this,n=e?.visibleFieldNames??new Set(t.map(({name:e})=>e).filter(e=>e!==z.rawServicePixelValue)),r=J({fields:t,title:this.title},{...e,visibleFieldNames:n}),{rasterInfo:i}=this.raster;return r?.fieldInfos&&i&&B(r.fieldInfos,i),r}async generateRasterInfo(e,t){let n=d(V,e);if(await this.load(),!n||n.functionName?.toLowerCase()===`none`)return this.serviceRasterInfo;try{let{rasterInfo:e}=await this._openFunctionRaster(n,t);return e}catch(e){throw e instanceof r?e:new r(`imagery-tile-layer`,`the given raster function is not supported`)}}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}supportsExportMapTiles(){let e=this._primaryRasters[0]??this.raster,t=e?.datasetFormat===`RasterTileServer`,n=!!this.sourceJSON?.exportTilesAllowed,r=this.sourceJSON?.datasetFormat?.toLowerCase(),i=!/\/tiledimageservices[^.]*\.arcgis\.com/i.test(this.url)&&e?.tileType===`Raster`&&(r===`cache/jpegplus`||r===`cache/jpegpng`),a=e?.tileType===`Map`||i;return t&&n&&a}supportsWrite(){let e=this._primaryRasters[0]??this.raster;return!!(this.loaded?e.datasetFormat===`RasterTileServer`&&(e.tileType===`Raster`||e.tileType===`Map`):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))}write(e,t){return this.supportsWrite()?super.write(e,t):(X(t,this),null)}async hasDataChanged(){try{let e=this._primaryRasters[0]??this.raster,{dataChanged:t,updates:n}=await e.refresh();return t&&(this.serviceRasterInfo!==e.rasterInfo&&this._set(`serviceRasterInfo`,e.rasterInfo),e.sourceJSON&&this.sourceJSON!==e.sourceJSON&&(this.sourceJSON=e.sourceJSON),n&&this.read(n,{origin:`service`,url:this.parsedUrl,ignoreDefaults:!0})),t}catch{return!1}}async _openRaster(e){let t=!1;if(this.raster)await this._openFromRaster(this.raster,e),t=w(this.raster),!t&&this.rasterFunction&&(this._primaryRasters=[this.raster],await this._initializeWithFunctionRaster(this.rasterFunction));else{let{url:t,rasterFunction:n,source:i}=this;if(!(t||i))throw new r(`imagery-tile-layer:open`,`missing url or source parameter`);i?await this._openFromSource(i,e):n?await this._openFromUrlWithRasterFunction(t,n,e):await this._openFromUrl(t,e)}let n=this.raster.rasterInfo;if(!n)throw new r(`imagery-tile-layer:load`,`cannot load resources on `+this.url);if(this._set(`serviceRasterInfo`,t?n:this._primaryRasters[0].rasterInfo),this._set(`spatialReference`,n.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,this.sourceJSON!=null){let e=this.raster.tileType===`Map`&&this.sourceJSON.minLOD!=null&&this.sourceJSON.maxLOD!=null?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:`service`})}else this.read({tileInfo:this.serviceRasterInfo?.storageInfo.tileInfo.toJSON()},{origin:`service`});this.title||=this.raster.datasetName,this.raster.tileType===`Map`&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles(c(()=>this.customParameters,e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)}))}async _openFromRaster(e,t){e.rasterInfo||await e.open({signal:t}),this._primaryRasters=T(e),this.url||=this._primaryRasters[0].url}async _openFromUrlWithRasterFunction(e,t,n){let i=[e];t&&O(t.toJSON(),i);let a;i.some(e=>$(e))&&(a=await H(),this._releaseWorkerHandle={remove:()=>U()});let o=await Promise.all(i.map(e=>D.open({url:e,rasterInfo:i.length===1?this.serviceRasterInfo:void 0,sourceJSON:i.length===1?this.sourceJSON:void 0,ioConfig:{sampling:`closest`,...this.ioConfig,customFetchParameters:this.customParameters},rasterJobHandler:a,signal:n}))),s=o.findIndex(e=>e==null);if(s>-1)throw new r(`imagery-tile-layer:open`,`cannot open raster: ${i[s]}`);return this._primaryRasters=o,this._initializeWithFunctionRaster(t)}async _openFromUrl(e,t){let n;$(e)&&(n=await H(),this._releaseWorkerHandle={remove:()=>U()});let i=await D.open({url:e,rasterInfo:this.serviceRasterInfo,sourceJSON:this.sourceJSON,ioConfig:{sampling:`closest`,...this.ioConfig,customFetchParameters:this.customParameters},rasterJobHandler:n,signal:t});if(i==null)throw new r(`imagery-tile-layer:open`,`cannot open raster: ${e}`);this._primaryRasters=[i],this.raster=i}async _openFromSource(e,t){let n=`the tiled imagery data source is not supported`,i=e.type?.toLowerCase()===`coverage`?`CovJSON`:e.extent&&e.pixelBlock?`MEMORY`:null;if(!i)throw new r(`imagery-tile-layer:open`,n);i===`MEMORY`&&(e={...e,pixelBlock:void 0,pixelBlocks:[e.pixelBlock]});let a=await D.open({url:``,source:e,datasetFormat:i,ioConfig:{sampling:`closest`,...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(a==null)throw new r(`imagery-tile-layer:open`,n);this._primaryRasters=[a],this.rasterFunction?await this._initializeWithFunctionRaster(this.rasterFunction):this.raster=a}async _openFunctionRaster(e,t){let n={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach(e=>n[e.url]=e);let r=k(e.functionDefinition?.toJSON()??e.toJSON(),n),i=new E({rasterFunction:r});return await i.open(t),i}async _initializeWithFunctionRaster(e,t){try{this.raster=await this._openFunctionRaster(e,t)}catch(e){e instanceof r&&i.getLogger(this).error(`imagery-tile-layer:open`,e.message),i.getLogger(this).warn(`imagery-tile-layer:open`,`the raster function cannot be applied and is removed`),this._set(`rasterFunction`,null),this.raster=this._primaryRasters[0]}}_validateElevationInfo(e){G(i.getLogger(this),K(`ImageryTile layers`,`relative-to-scene`,e)),G(i.getLogger(this),q(`ImageryTile layers`,e))}};e([l({clonable:!1})],Z.prototype,`_primaryRasters`,void 0),e([l({clonable:!1})],Z.prototype,`_releaseWorkerHandle`,void 0),e([l({json:{origins:{"web-scene":{write:!1}},write:!0}})],Z.prototype,`charts`,void 0),e([l({type:Y,value:null,json:{name:`layerDefinition.elevationInfo`,write:!0,origins:{"portal-item":{read:!1,write:!1},"web-map":{read:!1,write:!1}}}})],Z.prototype,`elevationInfo`,null),e([l({type:W})],Z.prototype,`tileInfo`,void 0),e([l({readOnly:!0,clonable:!1})],Z.prototype,`graphicOrigin`,void 0),e([l(A)],Z.prototype,`legendEnabled`,void 0),e([l({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Z.prototype,`isReference`,void 0),e([l({type:[`show`,`hide`]})],Z.prototype,`listMode`,void 0),e([l({json:{read:!0,write:!0}})],Z.prototype,`blendMode`,void 0),e([l({type:V,json:{name:`renderingRule`,write:!0}})],Z.prototype,`rasterFunction`,void 0),e([l()],Z.prototype,`sourceJSON`,void 0),e([l({readOnly:!0,json:{origins:{service:{read:{source:`currentVersion`}}}}})],Z.prototype,`version`,void 0),e([l({readOnly:!0,json:{read:!1}})],Z.prototype,`type`,void 0),e([l({type:[`ArcGISTiledImageServiceLayer`]})],Z.prototype,`operationalLayerType`,void 0),e([l({type:Boolean,value:!0,json:{read:{source:`disablePopup`,reader(e,t){return!t.disablePopup}},write:{target:`disablePopup`,overridePolicy(){return{enabled:!this.loaded||this.raster.tileType===`Raster`}},writer(e,t,n){t[n]=!e}}}})],Z.prototype,`popupEnabled`,void 0),e([l({type:t,json:{read:{source:`popupInfo`},write:{target:`popupInfo`,overridePolicy(){return{enabled:!this.loaded||this.raster.tileType===`Raster`}}}}})],Z.prototype,`popupTemplate`,void 0),e([l({readOnly:!0})],Z.prototype,`defaultPopupTemplate`,null),e([l(j)],Z.prototype,`screenSizePerspectiveEnabled`,void 0),e([l({readOnly:!0,type:[M]})],Z.prototype,`fields`,void 0),e([l({readOnly:!0,type:[M]})],Z.prototype,`rasterFields`,null),e([l({constructOnly:!0})],Z.prototype,`source`,void 0),Z=e([u(`esri.layers.ImageryTileLayer`)],Z);const Q=Z;function $(e){return/\.(png|gif|bmp)$/i.test(e)}export{Q as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../PopupTemplate.js";import{ClonableMixin as n}from"../core/Clonable.js";import r from"../core/Error.js";import i from"../core/Logger.js";import{removeMaybe as a}from"../core/maybe.js";import{MultiOriginJSONSupportMixin as o}from"../core/MultiOriginJSONSupport.js";import{debounce as s,throwIfAbortError as ee}from"../core/promiseUtils.js";import{watch as c}from"../core/reactiveUtils.js";import{property as l,subclass as u}from"../core/accessorSupport/decorators.js";import{ensureClass as d}from"../core/accessorSupport/ensureType.js";import f from"../graphic/ImageryTileGraphicOrigin.js";import p from"./Layer.js";import{ArcGISService as m}from"./mixins/ArcGISService.js";import{BlendLayer as h}from"./mixins/BlendLayer.js";import{CustomParametersMixin as te}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as g}from"./mixins/OperationalLayer.js";import{PortalLayer as _}from"./mixins/PortalLayer.js";import{RasterJobHandlerMixin as v}from"./mixins/RasterJobHandlerMixin.js";import{RasterPresetRendererMixin as y}from"./mixins/RasterPresetRendererMixin.js";import{RefreshableLayer as b}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as x}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as S}from"./mixins/TemporalLayer.js";import{TiledImagery as C}from"./mixins/TiledImagery.js";import{isFunctionRaster as w,getPrimaryRasters as T}from"./raster/datasets/datasetUtils.js";import E from"./raster/datasets/FunctionRaster.js";import D from"./raster/datasets/RasterFactory.js";import{getPrimaryRasterUrls as O,create as k}from"./raster/functions/rasterFunctionHelper.js";import{legendEnabled as A,screenSizePerspectiveEnabled as j}from"./support/commonProperties.js";import M from"./support/Field.js";import{getServicePixelValueField as N,getRawServicePixelValueField as P,getRasterAttributeTableFields as F,getMagnitudeField as I,getDirectionField as L,getMultidimensionalFields as R,commonRasterFieldNames as z,setDefaultRasterFieldFormats as B}from"./support/rasterFieldUtils.js";import V from"./support/RasterFunction.js";import{getRasterJobHandler as H,releaseRasterJobHandler as U}from"./support/rasterJobHelper.js";import W from"./support/TileInfo.js";import{logInvalidElevationInfoWarning as G,elevationModeUnsupportedMessage as K,featureExpressionUnsupportedMessage as q}from"../support/elevationInfoUtils.js";import{createPopupTemplate as J}from"../support/popupUtils.js";import Y from"../symbols/support/ElevationInfo.js";import{addLayerUnsupportedError as X}from"../webdoc/support/unsupportedErrors.js";let Z=class extends h(x(g(_(y(te(C(v(S(m(b(o(n(p))))))))))))){constructor(...e){super(...e),this._primaryRasters=[],this.charts=null,this.graphicOrigin=new f(this),this.legendEnabled=!0,this.isReference=null,this.listMode=`show`,this.sourceJSON=null,this.version=null,this.type=`imagery-tile`,this.operationalLayerType=`ArcGISTiledImageServiceLayer`,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.fields=null,this.source=void 0,this._debouncedSaveOperations=s(async(e,t,n)=>{let{save:r,saveAs:i}=await import(`./save/imageryUtils.js`);switch(e){case 0:return r(this,t);case 1:return i(this,n,t)}})}normalizeCtorArgs(e,t){return typeof e==`string`?{url:e,...t}:e}load(e){let t=e==null?null:e.signal;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:[`Image Service`]},e).catch(ee).then(()=>this._openRaster(t))),Promise.resolve(this)}destroy(){super.destroy(),this._releaseWorkerHandle=a(this._releaseWorkerHandle)}set elevationInfo(e){e?.mode!==`relative-to-scene`&&this._set(`elevationInfo`,e),this._validateElevationInfo(e)}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){let e=[N(`Pixel Value`),P(`Raw Pixel Value`)],t=this.raster?.rasterInfo??this.serviceRasterInfo,n=t?.attributeTable;if(n){let t=F(n);e.push(...t)}let r=t?.dataType,i=t?.multidimensionalInfo;if((r===`vector-magdir`||r===`vector-uv`)&&i!=null){let t=i.variables[0].unit?.trim(),n=I(t),r=L();e.push(n,r)}if(i){let t=R(i);e.push(...t)}return e}get renderer(){return super.renderer}set renderer(e){super.renderer=e}createPopupTemplate(e){let{rasterFields:t}=this,n=e?.visibleFieldNames??new Set(t.map(({name:e})=>e).filter(e=>e!==z.rawServicePixelValue)),r=J({fields:t,title:this.title},{...e,visibleFieldNames:n}),{rasterInfo:i}=this.raster;return r?.fieldInfos&&i&&B(r.fieldInfos,i),r}async generateRasterInfo(e,t){let n=d(V,e);if(await this.load(),!n||n.functionName?.toLowerCase()===`none`)return this.serviceRasterInfo;try{let{rasterInfo:e}=await this._openFunctionRaster(n,t);return e}catch(e){throw e instanceof r?e:new r(`imagery-tile-layer`,`the given raster function is not supported`)}}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}supportsExportMapTiles(){let e=this._primaryRasters[0]??this.raster,t=e?.datasetFormat===`RasterTileServer`,n=!!this.sourceJSON?.exportTilesAllowed,r=this.sourceJSON?.datasetFormat?.toLowerCase(),i=!/\/tiledimageservices[^.]*\.arcgis\.com/i.test(this.url)&&e?.tileType===`Raster`&&(r===`cache/jpegplus`||r===`cache/jpegpng`),a=e?.tileType===`Map`||i;return t&&n&&a}supportsWrite(){let e=this._primaryRasters[0]??this.raster;return!!(this.loaded?e.datasetFormat===`RasterTileServer`&&(e.tileType===`Raster`||e.tileType===`Map`):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))}write(e,t){return this.supportsWrite()?super.write(e,t):(X(t,this),null)}async hasDataChanged(){try{let e=this._primaryRasters[0]??this.raster,{dataChanged:t,updates:n}=await e.refresh();return t&&(this.serviceRasterInfo!==e.rasterInfo&&this._set(`serviceRasterInfo`,e.rasterInfo),e.sourceJSON&&this.sourceJSON!==e.sourceJSON&&(this.sourceJSON=e.sourceJSON),n&&this.read(n,{origin:`service`,url:this.parsedUrl,ignoreDefaults:!0})),t}catch{return!1}}async _openRaster(e){let t=!1;if(this.raster)await this._openFromRaster(this.raster,e),t=w(this.raster),!t&&this.rasterFunction&&(this._primaryRasters=[this.raster],await this._initializeWithFunctionRaster(this.rasterFunction));else{let{url:t,rasterFunction:n,source:i}=this;if(!(t||i))throw new r(`imagery-tile-layer:open`,`missing url or source parameter`);i?await this._openFromSource(i,e):n?await this._openFromUrlWithRasterFunction(t,n,e):await this._openFromUrl(t,e)}let n=this.raster.rasterInfo;if(!n)throw new r(`imagery-tile-layer:load`,`cannot load resources on `+this.url);if(this._set(`serviceRasterInfo`,t?n:this._primaryRasters[0].rasterInfo),this._set(`spatialReference`,n.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,this.sourceJSON!=null){let e=this.raster.tileType===`Map`&&this.sourceJSON.minLOD!=null&&this.sourceJSON.maxLOD!=null?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:`service`})}else this.read({tileInfo:this.serviceRasterInfo?.storageInfo.tileInfo.toJSON()},{origin:`service`});this.title||=this.raster.datasetName,this.raster.tileType===`Map`&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles(c(()=>this.customParameters,e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)}))}async _openFromRaster(e,t){e.rasterInfo||await e.open({signal:t}),this._primaryRasters=T(e),this.url||=this._primaryRasters[0].url}async _openFromUrlWithRasterFunction(e,t,n){let i=[e];t&&O(t.toJSON(),i);let a;i.some(e=>$(e,this.ioConfig))&&(a=await H(),this._releaseWorkerHandle={remove:()=>U()});let o=await Promise.all(i.map(e=>D.open({url:e,rasterInfo:i.length===1?this.serviceRasterInfo:void 0,sourceJSON:i.length===1?this.sourceJSON:void 0,ioConfig:{sampling:`closest`,...this.ioConfig,customFetchParameters:this.customParameters},rasterJobHandler:a,signal:n}))),s=o.findIndex(e=>e==null);if(s>-1)throw new r(`imagery-tile-layer:open`,`cannot open raster: ${i[s]}`);return this._primaryRasters=o,this._initializeWithFunctionRaster(t)}async _openFromUrl(e,t){let n;$(e,this.ioConfig)&&(n=await H(),this._releaseWorkerHandle={remove:()=>U()});let i=await D.open({url:e,rasterInfo:this.serviceRasterInfo,sourceJSON:this.sourceJSON,ioConfig:{sampling:`closest`,...this.ioConfig,customFetchParameters:this.customParameters},rasterJobHandler:n,signal:t});if(i==null)throw new r(`imagery-tile-layer:open`,`cannot open raster: ${e}`);this._primaryRasters=[i],this.raster=i}async _openFromSource(e,t){let n=`the tiled imagery data source is not supported`,i=e.type?.toLowerCase()===`coverage`?`CovJSON`:e.extent&&e.pixelBlock?`MEMORY`:null;if(!i)throw new r(`imagery-tile-layer:open`,n);i===`MEMORY`&&(e={...e,pixelBlock:void 0,pixelBlocks:[e.pixelBlock]});let a=await D.open({url:``,source:e,datasetFormat:i,ioConfig:{sampling:`closest`,...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(a==null)throw new r(`imagery-tile-layer:open`,n);this._primaryRasters=[a],this.rasterFunction?await this._initializeWithFunctionRaster(this.rasterFunction):this.raster=a}async _openFunctionRaster(e,t){let n={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach(e=>n[e.url]=e);let r=k(e.functionDefinition?.toJSON()??e.toJSON(),n),i=new E({rasterFunction:r});return await i.open(t),i}async _initializeWithFunctionRaster(e,t){try{this.raster=await this._openFunctionRaster(e,t)}catch(e){e instanceof r&&i.getLogger(this).error(`imagery-tile-layer:open`,e.message),i.getLogger(this).warn(`imagery-tile-layer:open`,`the raster function cannot be applied and is removed`),this._set(`rasterFunction`,null),this.raster=this._primaryRasters[0]}}_validateElevationInfo(e){G(i.getLogger(this),K(`ImageryTile layers`,`relative-to-scene`,e)),G(i.getLogger(this),q(`ImageryTile layers`,e))}};e([l({clonable:!1})],Z.prototype,`_primaryRasters`,void 0),e([l({clonable:!1})],Z.prototype,`_releaseWorkerHandle`,void 0),e([l({json:{origins:{"web-scene":{write:!1}},write:!0}})],Z.prototype,`charts`,void 0),e([l({type:Y,value:null,json:{name:`layerDefinition.elevationInfo`,write:!0,origins:{"portal-item":{read:!1,write:!1},"web-map":{read:!1,write:!1}}}})],Z.prototype,`elevationInfo`,null),e([l({type:W})],Z.prototype,`tileInfo`,void 0),e([l({readOnly:!0,clonable:!1})],Z.prototype,`graphicOrigin`,void 0),e([l(A)],Z.prototype,`legendEnabled`,void 0),e([l({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Z.prototype,`isReference`,void 0),e([l({type:[`show`,`hide`]})],Z.prototype,`listMode`,void 0),e([l({json:{read:!0,write:!0}})],Z.prototype,`blendMode`,void 0),e([l({type:V,json:{name:`renderingRule`,write:!0}})],Z.prototype,`rasterFunction`,void 0),e([l()],Z.prototype,`sourceJSON`,void 0),e([l({readOnly:!0,json:{origins:{service:{read:{source:`currentVersion`}}}}})],Z.prototype,`version`,void 0),e([l({readOnly:!0,json:{read:!1}})],Z.prototype,`type`,void 0),e([l({type:[`ArcGISTiledImageServiceLayer`]})],Z.prototype,`operationalLayerType`,void 0),e([l({type:Boolean,value:!0,json:{read:{source:`disablePopup`,reader(e,t){return!t.disablePopup}},write:{target:`disablePopup`,overridePolicy(){return{enabled:!this.loaded||this.raster.tileType===`Raster`}},writer(e,t,n){t[n]=!e}}}})],Z.prototype,`popupEnabled`,void 0),e([l({type:t,json:{read:{source:`popupInfo`},write:{target:`popupInfo`,overridePolicy(){return{enabled:!this.loaded||this.raster.tileType===`Raster`}}}}})],Z.prototype,`popupTemplate`,void 0),e([l({readOnly:!0})],Z.prototype,`defaultPopupTemplate`,null),e([l(j)],Z.prototype,`screenSizePerspectiveEnabled`,void 0),e([l({readOnly:!0,type:[M]})],Z.prototype,`fields`,void 0),e([l({readOnly:!0,type:[M]})],Z.prototype,`rasterFields`,null),e([l({constructOnly:!0})],Z.prototype,`source`,void 0),Z=e([u(`esri.layers.ImageryTileLayer`)],Z);const Q=Z;function $(e,t){let{tileGeneration:n}=t??{};return n===`immediate`||/\.(png|gif|bmp)$/i.test(e)}export{Q as default};
|
|
@@ -101,16 +101,17 @@ export interface LineOfSightLayerProperties extends LayerProperties, Operational
|
|
|
101
101
|
* abortController.abort();
|
|
102
102
|
* ```
|
|
103
103
|
*
|
|
104
|
-
* If the [observer position](https://developers.arcgis.com/javascript/latest/references/core/analysis/LineOfSightAnalysisObserver/#position) or
|
|
105
|
-
* [target position](https://developers.arcgis.com/javascript/latest/references/core/analysis/LineOfSightAnalysisTarget/#position) have [z-values](https://developers.arcgis.com/javascript/latest/references/core/geometry/Point/#hasZ)
|
|
106
|
-
* then these will be treated as absolute values, otherwise the points will be aligned to the ground.
|
|
107
|
-
*
|
|
108
104
|
* > [!WARNING]
|
|
109
105
|
* >
|
|
110
|
-
* > **
|
|
111
|
-
* >
|
|
112
|
-
* >
|
|
113
|
-
* >
|
|
106
|
+
* > **Things to consider:**
|
|
107
|
+
* > * This layer is only supported in a 3D [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
|
|
108
|
+
* > * The results of the tool vary depending on the zoom level, as changes in zoom level affect the level of detail (LOD) of the scene geometry.
|
|
109
|
+
* > * Snapping, tooltips, display units, and input units used during interactive placement and editing are inherited from
|
|
110
|
+
* [ViewOptions](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/ViewOptions/).
|
|
111
|
+
* > * Snapping is enabled by default. This can be temporarily disabled by holding the `CTRL` key.
|
|
112
|
+
* > * Layer types currently supported for snapping are: [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/), [GraphicsLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GraphicsLayer/) (except Mesh geometries),
|
|
113
|
+
* > [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/), [WFSLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/WFSLayer/), [CSVLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/CSVLayer/),
|
|
114
|
+
* > [3D Object SceneLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/), and [BuildingSceneLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/BuildingSceneLayer/).
|
|
114
115
|
*
|
|
115
116
|
* @since 4.24
|
|
116
117
|
* @see [LineOfSightLayerView](https://developers.arcgis.com/javascript/latest/references/core/views/layers/LineOfSightLayerView/)
|
|
@@ -118,6 +119,7 @@ export interface LineOfSightLayerProperties extends LayerProperties, Operational
|
|
|
118
119
|
* @see [LineOfSightAnalysisTarget](https://developers.arcgis.com/javascript/latest/references/core/analysis/LineOfSightAnalysisTarget/)
|
|
119
120
|
* @see [LineOfSightAnalysisObserver](https://developers.arcgis.com/javascript/latest/references/core/analysis/LineOfSightAnalysisObserver/)
|
|
120
121
|
* @see [LineOfSightAnalysisView3D](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/LineOfSightAnalysisView3D/)
|
|
122
|
+
* @see [ViewOptions](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/ViewOptions/)
|
|
121
123
|
* @see [Line Of Sight component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-line-of-sight/)
|
|
122
124
|
*/
|
|
123
125
|
export default class LineOfSightLayer extends LineOfSightLayerSuperclass {
|
|
@@ -64,7 +64,7 @@ export interface ViewshedLayerProperties extends LayerProperties, OperationalLay
|
|
|
64
64
|
* const layerView = await view.whenLayerView(viewshedLayer);
|
|
65
65
|
*
|
|
66
66
|
* // allow existing viewsheds in the layer to be selected and edited
|
|
67
|
-
* // select a viewshed by hovering and clicking on their
|
|
67
|
+
* // select a viewshed by hovering and clicking on their observer
|
|
68
68
|
* layerView.interactive = true;
|
|
69
69
|
*
|
|
70
70
|
* // start placing new viewsheds interactively
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{insertSortedStableTopN as e}from"../../../core/arrayUtils.js";import{importLazily as t}from"../../../core/importUtils.js";import{clone as n}from"../../../core/lang.js";import r from"../../../geometry/SpatialReference.js";import{polygonCentroid as i,extentCentroid as a}from"../../../geometry/support/centroid.js";import{getPolygonExtent as o,getGeometryExtent as s,expandExtent as c}from"../../../geometry/support/extentUtils.js";import{toQuantizationTransform as l}from"../../../geometry/support/quantizationUtils.js";import{isValid as u,equals as d}from"../../../geometry/support/spatialReferenceUtils.js";import{closestPointOnCurve as f}from"../../../geometry/support/curves/closestPointOnCurve.js";import{getEndpoint as p,isCoordinate as m,cloneCurve as h}from"../../../geometry/support/curves/curveUtils.js";import g from"./AttributesBuilder.js";import{cleanFromGeometryEngine as _,getGeometry as v,transformCentroid as y}from"./geometryUtils.js";import{project as b}from"./projectionSupport.js";import{getDateInNumber as x}from"./queryUtils.js";import{SnappingCandidateEdge as S,SnappingCandidateVertex as C}from"./SnappingCandidate.js";import{isDateField as w,isDateOnlyField as T,isTimestampOffsetField as E,isStringField as D,isTimeOnlyField as O}from"../../support/fieldUtils.js";import k from"../../../rest/support/AutoIntervalBinParameters.js";import A from"../../../rest/support/DateBinParameters.js";import{unitsDict as j}from"../../../rest/support/DateBinUtils.js";import M from"../../../rest/support/FixedBoundariesBinParameters.js";import N from"../../../rest/support/FixedIntervalBinParameters.js";import{calculateStringStatistics as P,calculateStatistics as F,processSummaryStatisticsResult as I,calculateUniqueValuesCount as L,createUVResult as R,calculateClassBreaks as z,resolveCBResult as B,calculateHistogram as V,calculatePercentile as H,binIndex as U,getBinParams as W,isNullCountSupported as G,getAttributeComparator as K}from"../../../statistics/utils.js";import{utc as q}from"../../../time/constants.js";import{DateTime as J}from"luxon";const Y=t(()=>import(`../../../geometry/operators/json/convexHullOperator.js`));class X{constructor(e,t,n){this.items=e,this.query=t,this.geometryType=n.geometryType,this.hasZ=!!t.returnZ&&n.hasZ,this.hasM=!!t.returnM&&n.hasM,this.fieldsIndex=n.fieldsIndex,this.spatialReference=n.spatialReference,this.featureAdapter=n.featureAdapter,this.featureIdInfo=n.featureIdInfo}get size(){return this.items.length}createQueryResponseForCount(){let e=new g(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);let{groupByFieldsForStatistics:t,having:n,outStatistics:r}=this.query;if(!t?.length)return 1;let i=new Map,a=new Map,o=new Set;for(let s of r){let{statisticType:r}=s,c=r===`exceedslimit`?void 0:s.onStatisticField;if(!a.has(c)){let n=[];for(let r of t){let t=this._getAttributeValues(e,r,this.items,i);n.push(t)}a.set(c,this._calculateUniqueValues(n,this.items,e.returnDistinctValues))}let l=a.get(c);for(let t in l){let{data:r,items:i}=l[t],a=r.join(`,`);(!n||e.validateItems(i,n))&&o.add(a)}}return o.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some(e=>e.statisticType===`exceedslimit`)?this._createExceedsLimitQueryResponse():await this._createStatisticsQueryResponse(this.query,this.items):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){let t=this.query.geometry;u(this.query.outSR)&&!d(t.spatialReference,this.query.outSR)?e.queryGeometry=_({spatialReference:this.query.outSR,...b(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=_({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t,n){let r=this.featureAdapter,{point:i}=e,a=typeof e.distance==`number`?e.distance:e.distance.x,o=typeof e.distance==`number`?e.distance:e.distance.y;function s(e,t){let n=(e-i.x)/a,r=(t-i.y)/o;return n*n+r*r}let c={candidates:[]},l=this.geometryType===`esriGeometryPolygon`,u=this.geometryType===`esriGeometryPolyline`||this.geometryType===`esriGeometryPoint`,d=this._getPointCreator(t,this.spatialReference,n),g=new Q(null,0),_=new Q(null,0),v={x:0,y:0,z:0};for(let e of this.items){let t=r.getObjectId(e),n=r.getGeometryWithCurves?.(e);if(n!=null){b(n,t);continue}let i=r.getGeometry(e);if(i!=null){y(i,t);continue}}return c.candidates.sort((e,t)=>e.distance-t.distance),c;function y(t,n){let{coords:r,stride:a}=t,o=t.isPoint?te:t.lengths;if(g.coords=r,_.coords=r,e.returnEdge){let e=0;for(let t=0;t<o.length;t++){let r=o[t],u=e;for(let t=0;t<r;t++,e+=a){if(!l&&t===r-1||(g.coordsIndex=e,_.coordsIndex=t===r-1?u:e+a,!ee(v,i,g,_)))continue;let o=s(v.x,v.y);o<=1&&c.candidates.push(new S(n,d(v),Math.sqrt(o),d(g),d(_)))}}}if(e.vertexMode===`all`){let e=0;for(let t=0;t<o.length;t++){let r=o[t],i=e,u=_;u.coordsIndex=i;for(let t=0;t<r;t++,e+=a){if(g.coordsIndex=e,l&&t===r-1&&g.x===u.x&&g.y===u.y)continue;let i=s(g.x,g.y);i<=1&&c.candidates.push(new C(n,d(g),Math.sqrt(i)))}}}else if(u&&e.vertexMode===`ends`){let e=0,t=[];for(let n=0;n<o.length;n++){t.push(e);let r=o[n];e+=r*a,r>1&&t.push(e-a)}for(let e of t){g.coordsIndex=e;let t=s(g.x,g.y);t<=1&&c.candidates.push(new C(n,d(g),Math.sqrt(t)))}}}function b(t,n){let{candidates:r}=c,a={x:0,y:0,z:0};if(e.returnEdge){let e=[i.x,i.y],o=new Q(e,0),c=new Q(e,0);for(let{segments:i}of t.parts)for(let{start:t,curve:l}of i){let{curvePoint:i}=f(t,l,e),u=s(...i);if(u>1)continue;[a.x,a.y]=i,o.coords=t,c.coords=p(l);let g=m(l)?null:h(l);r.push(new S(n,d(a),Math.sqrt(u),d(o),d(c),!1,g))}}function o(e){a.x=t.vertexXY[e*2],a.y=t.vertexXY[e*2+1];let i=s(a.x,a.y);i>1||(a.z=t.vertexZ?.[e]??0,r.push(new C(n,d(a),Math.sqrt(i))))}if(e.vertexMode===`all`){let{vertexCount:e}=t;for(let t=0;t<e;++t)o(t);return}if(e.vertexMode===`ends`)switch(t.type){case`point`:o(0);break;case`polyline`:for(let e=0;e<t.partCount;++e){let n=t.partOffsets[e],r=t.partOffsets[e+1]-1;o(n),r!==n&&o(r)}}}}_getPointCreator(e,t,n){let r=n!=null&&!d(t,n)?e=>b(e,t,n):e=>e,{hasZ:i}=this;return i&&e?({x:e,y:t,z:n})=>r({x:e,y:t,z:n}):({x:e,y:t})=>r({x:e,y:t,z:0})}async createSummaryStatisticsResponse(e){let{field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,minValue:o,maxValue:s,scale:c,timeZone:l,outStatisticTypes:u}=e,d=this.fieldsIndex.get(t),f=w(d)||T(d)||E(d),p=await this._getDataValues({field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,scale:c,timeZone:l},this.items),m=G({normalizationType:i,normalizationField:r,minValue:o,maxValue:s}),h={value:.5,fieldType:d?.type},g=D(d)?P({values:p,supportsNullCount:m,percentileParams:h,outStatisticTypes:u}):F({values:p,minValue:o,maxValue:s,useSampleStdDev:!i,supportsNullCount:m,percentileParams:h,outStatisticTypes:u});return I(g,u,f)}async createUniqueValuesResponse(e){let{field:t,valueExpression:n,domains:r,returnAllCodedValues:i,scale:a,timeZone:o}=e,s=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:n,scale:a,timeZone:o},this.items,!1),c=L(s);return R(c,r,i,e.fieldDelimiter)}async createClassBreaksResponse(e){let{field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:s,minValue:c,maxValue:l,numClasses:u,scale:d,timeZone:f}=e,p=await this._getDataValues({field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,scale:d,timeZone:f},this.items),m=z(p,{field:t,normalizationField:r,normalizationType:i,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:s,minValue:c,maxValue:l,numClasses:u});return B(m,o)}async createHistogramResponse(e){let{field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:s,minValue:c,maxValue:l,numBins:u,scale:d,timeZone:f}=e,p=await this._getDataValues({field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,scale:d,timeZone:f},this.items);return V(p,{field:t,normalizationField:r,normalizationType:i,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:s,minValue:c,maxValue:l,numBins:u})}_sortFeatures(e,t,n){if(e.length>1&&t?.length)for(let r of t.slice().reverse()){let{compare:t,fieldOrExpression:i,fieldInfo:a}=$(r,this.fieldsIndex);e.sort((e,r)=>t(n(e,i,a),n(r,i,a)))}}_topNFeatures(t,n,r,i){if(t.length>1&&n?.length){let a=n.map(e=>{let{compare:t,fieldOrExpression:n,fieldInfo:r}=$(e,this.fieldsIndex);return(e,a)=>t(i(e,n,r),i(a,n,r))}).reduceRight((e,t)=>(n,r)=>{let i=t(n,r);return i!==0&&!Number.isNaN(i)?i:e(n,r)}),o=[];for(let n of t)e(o,n,r,a);return o}return t.slice(0,r)}_createFeatureQueryResponse(e){let{items:t,geometryType:n,hasM:r,hasZ:i,featureIdInfo:a,spatialReference:o}=this,{outFields:s,outSR:c,quantizationParameters:u,resultRecordCount:d,resultOffset:f,returnZ:p,returnM:m}=e,h=d!=null&&t.length>(f||0)+d,g=s&&(s.includes(`*`)?[...this.fieldsIndex.fields]:s.map(e=>this.fieldsIndex.get(e)));return{exceededTransferLimit:h,features:this._createFeatures(e,t),fields:g,geometryType:n,hasM:r&&m,hasZ:i&&p,objectIdFieldName:a.type===`object-id`?a.fieldName:null,spatialReference:_(c||o),transform:u&&l(u)||null}}_createFeatures(e,t){let n=new g(e,this.featureAdapter,this.fieldsIndex),{hasM:r,hasZ:i}=this,{orderByFields:a,quantizationParameters:o,returnGeometry:s,returnCentroid:c,maxAllowableOffset:u,resultOffset:d,resultRecordCount:f,returnZ:p=!1,returnM:m=!1}=e,h=i&&p,_=r&&m,b,x=d||0,S=f==null?null:x+f;S!=null&&S<=5e3&&S<t.length?b=this._topNFeatures(t,a,S,(e,t,r)=>n.getFieldValue(e,t,r)):(b=[...t],this._sortFeatures(b,a,(e,t,r)=>n.getFieldValue(e,t,r))),(x>0||S!=null)&&(b=b.slice(x,S??void 0));let C=[],w=0;if(!this.geometryType||!s&&!c)for(let e of b){let t=n.getAttributes(e);t&&(C[w++]=this._addFeatureJSONMetadata(e,{attributes:t}))}else{let e=l(o)??void 0,t=this.geometryType===`esriGeometryPolygon`||this.geometryType===`esriGeometryPolyline`;if(s&&!c)for(let r of b){let i=this.featureAdapter.getGeometry(r),a=this._addFeatureJSONMetadata(r,{attributes:n.getAttributes(r),geometry:v(this.geometryType,i,u,e,h,_)});t&&i&&!a.geometry&&(a.centroid=y(this,this.featureAdapter.getCentroid(r,this),e)),C[w++]=a}else if(!s&&c)for(let t of b)C[w++]=this._addFeatureJSONMetadata(t,{attributes:n.getAttributes(t),centroid:y(this,this.featureAdapter.getCentroid(t,this),e)});else for(let t of b)C[w++]=this._addFeatureJSONMetadata(t,{attributes:n.getAttributes(t),centroid:y(this,this.featureAdapter.getCentroid(t,this),e),geometry:v(this.geometryType,this.featureAdapter.getGeometry(t),u,e,h,_)})}return C}_addFeatureJSONMetadata(e,t){let n=this.featureAdapter.getMetadata?.(e);return n!==void 0&&(t.metadata=n),t}_createExceedsLimitQueryResponse(){let e=!1,t=1/0,n=1/0,r=1/0;for(let e of this.query.outStatistics??[])if(e.statisticType===`exceedslimit`){t=e.maxPointCount==null?1/0:e.maxPointCount,n=e.maxRecordCount==null?1/0:e.maxRecordCount,r=e.maxVertexCount==null?1/0:e.maxVertexCount;break}return e=this.geometryType===`esriGeometryPoint`?this.items.length>t:this.items.length>n||this.items.reduce((e,t)=>e+(this.featureAdapter.getGeometry(t)?.size??0),0)>r,{fields:[{name:`exceedslimit`,type:`esriFieldTypeInteger`,alias:`exceedslimit`,sqlType:`sqlTypeInteger`,domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,n={attributes:{}}){let r=[],i=new Map,a=new Map,o=new Map,s=new Map,c=new g(e,this.featureAdapter,this.fieldsIndex),l=e.outStatistics,{groupByFieldsForStatistics:u,having:d,orderByFields:f,resultRecordCount:p}=e,m=u?.length,h=!!m,_=h?u[0]:null,v=h&&!this.fieldsIndex.get(_);for(let f of l??[]){let{outStatisticFieldName:l,statisticType:p}=f,g=f,y=p===`exceedslimit`?void 0:f.onStatisticField,b=p===`percentile_disc`||p===`percentile_cont`,x=p===`EnvelopeAggregate`||p===`CentroidAggregate`||p===`ConvexHullAggregate`,S=h&&m===1&&(y===_||v)&&p===`count`;if(h){if(!o.has(y)){let e=[];for(let n of u){let r=this._getAttributeValues(c,n,t,i);e.push(r)}o.set(y,this._calculateUniqueValues(e,t,!x&&c.returnDistinctValues))}let n=o.get(y);if(!n)continue;let r=Object.keys(n);for(let a of r){let{count:r,data:o,items:f,itemPositions:p}=n[a],m=o.join(`,`);if(!d||c.validateItems(f,d)){let n=s.get(m)||{attributes:{}};if(e.returnAggIds&&(n.aggregateIds=f.map(e=>this.featureAdapter.getObjectId(e)).filter(e=>e!=null)),x){n.aggregateGeometries||={};let{aggregateGeometries:e,outStatisticFieldName:t}=await this._getAggregateGeometry(g,f);n.aggregateGeometries[t]=e}else{let e=null;if(S)e=r;else{let n=this._getAttributeValues(c,y,t,i),r=p.map(e=>n[e]);e=b&&`statisticParameters`in g?this._getPercentileValue(g,r):this._getStatisticValue(g,r,null,c.returnDistinctValues)}n.attributes[l]=e}let a=0;u.forEach((e,t)=>n.attributes[this.fieldsIndex.get(e)?e:`EXPR_${++a}`]=o[t]),s.set(m,n)}}}else if(x){n.aggregateGeometries||={};let{aggregateGeometries:e,outStatisticFieldName:r}=await this._getAggregateGeometry(g,t);n.aggregateGeometries[r]=e}else{let e=this._getAttributeValues(c,y,t,i);n.attributes[l]=b&&`statisticParameters`in g?this._getPercentileValue(g,e):this._getStatisticValue(g,e,a,c.returnDistinctValues)}let C=(p===`min`||p===`max`)&&(D(this.fieldsIndex.get(y))||this._isAnyDateField(y))?this.fieldsIndex.get(y)?.type:null;r.push({name:l,alias:l,type:C||`esriFieldTypeDouble`})}let y=h?Array.from(s.values()):[n];return this._sortFeatures(y,f,(e,t)=>e.attributes[t]),p&&(y.length=Math.min(p,y.length)),{fields:r,features:y}}_isAnyDateField(e){let t=this.fieldsIndex.get(e);return w(t)||T(t)||E(t)||O(t)}async _getAggregateGeometry(e,t){let{statisticType:n,outStatisticFieldName:r}=e,{featureAdapter:s,spatialReference:c,geometryType:l}=this,u=t.map(e=>v(l,s.getGeometry(e))),d={aggregateGeometries:null,outStatisticFieldName:null},{convexHullExecuteMany:f}=await Y.getImportPromise(),[p]=f(u,{merge:!0});if(p&&p.rings[0].length<=3&&(p=null),n===`EnvelopeAggregate`)d.aggregateGeometries={...p?o(p):Z(u),spatialReference:c},d.outStatisticFieldName=r||`extent`;else if(n===`CentroidAggregate`){let[e,t]=p?i(p):a(Z(u));d.aggregateGeometries={x:e,y:t,spatialReference:c},d.outStatisticFieldName=r||`centroid`}else n===`ConvexHullAggregate`&&(d.aggregateGeometries=p&&{...p,spatialReference:c},d.outStatisticFieldName=r||`convexHull`);return d}_getStatisticValue(e,t,n,r){let{onStatisticField:i,statisticType:a}=e,o=null;return o=n?.has(i)?n.get(i):D(this.fieldsIndex.get(i))||this._isAnyDateField(i)?P({values:t,returnDistinct:r}):F({values:r?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),n&&n.set(i,o),o[a===`var`?`variance`:a]}_getPercentileValue(e,t){let{onStatisticField:n,statisticParameters:r,statisticType:i}=e,{value:a,orderBy:o}=r,s={value:a,orderBy:o,fieldType:this.fieldsIndex.get(n)?.type,isDiscrete:i===`percentile_disc`};return H(t,s)}_getAttributeValues(e,t,n,r){if(r.has(t))return r.get(t);let i=this.fieldsIndex.get(t),a=n.map(n=>e.getFieldValue(n,t,i));return r.set(t,a),a}_calculateUniqueValues(e,t,n){let r={},i=t.length;for(let a=0;a<i;a++){let i=t[a],o=[];for(let t of e)o.push(t[a]);let s=o.join(`,`);r[s]==null?r[s]={count:1,data:o,items:[i],itemPositions:[a]}:(n||r[s].count++,r[s].items.push(i),r[s].itemPositions.push(a))}return r}async _getDataValues(e,t,i=!0){let a=new g(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:o,scale:s,timeZone:c}=e,l=r.fromJSON(this.query.outSR||this.spatialReference);return o?a.getExpressionValues(t,o,{viewingMode:`map`,scale:s,spatialReference:l},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},c):a.getDataValues(t,n(e),i)}_calculateHistogramBins(e,t,n){if(t.min==null&&t.max==null)return[];let r=t.intervals,i=t.min??0,a=t.max??0,o=r.map(([e,t])=>({minValue:e,maxValue:t,count:0,items:[]}));for(let t=0;t<e.length;t++){let s=e[t],c=n[t];if(s!=null&&s>=i&&s<=a){let e=U(r,s);e>-1&&(o[e].count++,o[e].items.push(c))}}return o}async createQueryBinsResponse(e){let t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);let{value:n,outAlias:r,valueType:i}=t,a=[],o=[{name:r??n,alias:r??n,type:i??`esriFieldTypeString`},{name:`bin`,alias:`bin`,type:`esriFieldTypeInteger`}],s=new g(e,this.featureAdapter,this.fieldsIndex),c=new Map,l=[...this.items];this._sortFeatures(l,[n],(e,t,n)=>s.getFieldValue(e,t,n));let u=this._getAttributeValues(s,n,l,c),d=this._calculateUniqueValues([u],l,s.returnDistinctValues);for(let t in d){let{items:i}=d[t],s=await this._createBinsResponse(e,i);if(a.push(...s.features.map(e=>({...e,attributes:{...e.attributes,[r??n]:t}}))),s.fields)for(let e of s.fields)o.some(t=>t.name===e.name)||o.push(e)}return{fields:o,features:a}}async _createBinsResponse(e,t){let n=e.bin;switch(t??=this.items,n.type){case`autoIntervalBin`:return this._createAutoIntervalBinsResponse(k.fromJSON(n),e,t);case`dateBin`:return this._createDateBinsResponse(A.fromJSON(n),e,t);case`fixedBoundariesBin`:return this._createFixedBoundariesBinsResponse(M.fromJSON(n),e,t);case`fixedIntervalBin`:return this._createFixedIntervalBinsResponse(N.fromJSON(n),e,t)}}async _createAutoIntervalBinsResponse(e,t,n){let{field:r,normalizationField:i,numBins:a,normalizationType:o,normalizationTotal:s,start:c,end:l}=e,u=await this._getDataValues({field:e.field||e.expression,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},n),d=W(u,{field:r,normalizationField:i,normalizationType:o,normalizationTotal:s,numBins:a,minValue:x(o?e.normalizationMinValue:c,!1),maxValue:x(o?e.normalizationMaxValue:l,!1)}),f=this._calculateHistogramBins(u,d,n);return this._createFeaturesFromHistogramBins(f,t)}async _createDateBinsResponse(e,t,n){let{field:r,interval:i,start:a,end:o,snapToData:s,returnFullIntervalBin:c,offset:l,firstDayOfWeek:u}=e,d=i.unit,f=await this._getDataValues({field:r||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},n),p=O(this.fieldsIndex.get(r)),m=j.toJSON(d),h=f.filter(Boolean).sort((e,t)=>e-t),g=a==null?h[0]:x(a,p),_=o==null?h[h.length-1]:x(o,p),v=[];if(g!=null&&_!=null){let e={zone:t.outTimeReference?.ianaTimeZone??q},n={[l?.unit?j.toJSON(l.unit):`milliseconds`]:l?.value||0},r=J.fromMillis(g,e).minus(n),a=J.fromMillis(_,e).minus(n),o=typeof u==`number`&&u>=1&&u<=7?u:7,d=(e,t)=>{let n=(e.weekday-t+7)%7;return e.minus({days:n}).startOf(`day`)},f=(e,t)=>d(e,t).plus({days:7});if(s===`last`){let e=m===`week`?f(a,o):a;for(;e>r;){let t=e.minus({[m]:i.value});if(t<r){v.unshift([c?t.plus(n).toMillis():r.plus(n).toMillis(),e.plus(n).toMillis()]);break}v.unshift([t.plus(n).toMillis(),e.plus(n).toMillis()]),e=t}}else{let e=s===`first`?r:m===`week`?d(r,o):r.startOf(m);for(;e<=a;){let t=e.plus({[m]:i.value});if(t>a){v.push([e.plus(n).toMillis(),c?t.plus(n).toMillis():a.plus(n).toMillis()]);break}v.push([e.plus(n).toMillis(),t.plus(n).toMillis()]),e=t}}}let y=this._calculateHistogramBins(f,{intervals:v,min:g,max:_},n);return this._createFeaturesFromHistogramBins(y,t)}async _createFixedBoundariesBinsResponse(e,t,n){let{field:r}=e,i=await this._getDataValues({field:r||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},n),a=O(this.fieldsIndex.get(r)),o=e.boundaries.map(e=>x(e,a)).sort((e,t)=>e-t),s=[];for(let e=0;e<o.length-1;e++)s.push([o[e],o[e+1]]);let c={intervals:s,min:o.at(0),max:o.at(-1)},l=this._calculateHistogramBins(i,c,n);return this._createFeaturesFromHistogramBins(l,t)}async _createFixedIntervalBinsResponse(e,t,n){let{field:r,interval:i,normalizationType:a,start:o,end:s}=e,c=await this._getDataValues({field:r||e.expression,normalizationField:e.normalizationField,normalizationType:a,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},n),l=O(this.fieldsIndex.get(r)),u=W(c,{field:r,classificationMethod:`defined-interval`,definedInterval:i,minValue:x(a?e.normalizationMinValue:o,l),maxValue:x(a?e.normalizationMaxValue:s,l)},!0),d=this._calculateHistogramBins(c,u,n);return this._createFeaturesFromHistogramBins(d,t)}async _createFeaturesFromHistogramBins(e,t){let{upperBoundaryAlias:n,lowerBoundaryAlias:r}=t,i=r||`lowerBoundary`,a=n||`upperBoundary`,o=[],s=[{name:i,alias:i,type:`esriFieldTypeDouble`},{name:a,alias:a,type:`esriFieldTypeDouble`}],c=t.bin?.stackBy?.value,l=t.bin?.stackBy?.outAlias;c&&s.push({name:`bin`,alias:`bin`,type:`esriFieldTypeInteger`},{name:l??c,alias:l??c,type:`esriFieldTypeString`});let u=0,d=t.bin.type===`dateBin`,f=t.outTimeReference?.ianaTimeZone;for(let n of e){let{minValue:e,maxValue:r,items:p}=n,m={attributes:{}};m.attributes[i]=d&&f&&e!=null?J.fromMillis(e,{zone:f}).toISO():e,t.bin.hideUpperBound||(m.attributes[a]=d&&f&&r!=null?J.fromMillis(r,{zone:f}).toISO():r),t.returnAggIds&&(m.aggregateIds=p.map(e=>this.featureAdapter.getObjectId(e)).filter(e=>e!=null));let h;if(c?(h=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[c],orderByFields:[c]},p),m.attributes.bin=++u,t.bin.jsonStyle===`flat`?o.push(...h.features.map(({attributes:{EXPR_1:e,...t},...n})=>({...n,attributes:l??e?{...t,[l??e]:e,...m.attributes}:{...t,...m.attributes}}))):(m.stackedAttributes=h.features.map(({attributes:{EXPR_1:e,...t}})=>l??e?{...t,[l??e]:e}:t),o.push(m))):(t.bin?.splitBy&&(m.attributes.bin=++u),h=await this._createStatisticsQueryResponse(t,p,m),o.push(m)),h.fields)for(let e of h.fields)s.some(t=>t.name===e.name)||s.push(e)}return t.binOrder===`desc`&&o.reverse(),{fields:s,features:o}}}function Z(e){let t=s(e[0]);for(let n of e.slice(1))c(t,s(n));return t}function ee(e,t,n,r){let i=r.x-n.x,a=r.y-n.y,o=t.x-n.x,s=t.y-n.y,c=i*i+a*a;if(c===0)return!1;let l=o*i+s*a,u=Math.min(1,Math.max(0,l/c));return e.x=n.x+i*u,e.y=n.y+a*u,!0}class Q{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}const te=[1];function $(e,t){let n=e.split(` `),r=n[0],i=t.get(r),a=n[1]?n[1].toLowerCase()===`desc`:!1;return{compare:K(i?.type,a,`case-insensitive`),fieldOrExpression:r,fieldInfo:i}}export{X as QueryEngineResult};
|
|
2
|
+
import{insertSortedStableTopN as e}from"../../../core/arrayUtils.js";import{importLazily as t}from"../../../core/importUtils.js";import{clone as n}from"../../../core/lang.js";import r from"../../../geometry/SpatialReference.js";import{polygonCentroid as i,extentCentroid as a}from"../../../geometry/support/centroid.js";import{getPolygonExtent as o,getGeometryExtent as s,expandExtent as c}from"../../../geometry/support/extentUtils.js";import{toQuantizationTransform as l}from"../../../geometry/support/quantizationUtils.js";import{isValid as u,equals as d}from"../../../geometry/support/spatialReferenceUtils.js";import{closestPointOnCurve as f}from"../../../geometry/support/curves/closestPointOnCurve.js";import{getEndpoint as p,isCoordinate as m,cloneCurve as h}from"../../../geometry/support/curves/curveUtils.js";import g from"./AttributesBuilder.js";import{cleanFromGeometryEngine as _,getGeometry as v,transformCentroid as y}from"./geometryUtils.js";import{project as b}from"./projectionSupport.js";import{getDateInNumber as x}from"./queryUtils.js";import{SnappingCandidateEdge as S,SnappingCandidateVertex as C}from"./SnappingCandidate.js";import{isDateField as w,isDateOnlyField as T,isTimestampOffsetField as E,isStringField as D,isTimeOnlyField as O}from"../../support/fieldUtils.js";import k from"../../../rest/support/AutoIntervalBinParameters.js";import A from"../../../rest/support/DateBinParameters.js";import{unitsDict as j}from"../../../rest/support/DateBinUtils.js";import M from"../../../rest/support/FixedBoundariesBinParameters.js";import N from"../../../rest/support/FixedIntervalBinParameters.js";import{isNullCountSupported as P,calculateStringStatistics as F,calculateStatistics as I,processSummaryStatisticsResult as L,calculateUniqueValuesCount as R,createUVResult as z,calculateClassBreaks as B,resolveCBResult as V,calculateHistogram as H,calculatePercentile as U,binIndex as W,getBinParams as G,getAttributeComparator as K}from"../../../statistics/utils.js";import{utc as q}from"../../../time/constants.js";import{DateTime as J}from"luxon";const Y=t(()=>import(`../../../geometry/operators/json/convexHullOperator.js`));class X{constructor(e,t,n){this.items=e,this.query=t,this.geometryType=n.geometryType,this.hasZ=!!t.returnZ&&n.hasZ,this.hasM=!!t.returnM&&n.hasM,this.fieldsIndex=n.fieldsIndex,this.spatialReference=n.spatialReference,this.featureAdapter=n.featureAdapter,this.featureIdInfo=n.featureIdInfo}get size(){return this.items.length}createQueryResponseForCount(){let e=new g(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);let{groupByFieldsForStatistics:t,having:n,outStatistics:r}=this.query;if(!t?.length)return 1;let i=new Map,a=new Map,o=new Set;for(let s of r){let{statisticType:r}=s,c=r===`exceedslimit`?void 0:s.onStatisticField;if(!a.has(c)){let n=[];for(let r of t){let t=this._getAttributeValues(e,r,this.items,i);n.push(t)}a.set(c,this._calculateUniqueValues(n,this.items,e.returnDistinctValues))}let l=a.get(c);for(let t in l){let{data:r,items:i}=l[t],a=r.join(`,`);(!n||e.validateItems(i,n))&&o.add(a)}}return o.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some(e=>e.statisticType===`exceedslimit`)?this._createExceedsLimitQueryResponse():await this._createStatisticsQueryResponse(this.query,this.items):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){let t=this.query.geometry;u(this.query.outSR)&&!d(t.spatialReference,this.query.outSR)?e.queryGeometry=_({spatialReference:this.query.outSR,...b(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=_({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t,n){let r=this.featureAdapter,{point:i}=e,a=typeof e.distance==`number`?e.distance:e.distance.x,o=typeof e.distance==`number`?e.distance:e.distance.y;function s(e,t){let n=(e-i.x)/a,r=(t-i.y)/o;return n*n+r*r}let c={candidates:[]},l=this.geometryType===`esriGeometryPolygon`,u=this.geometryType===`esriGeometryPolyline`||this.geometryType===`esriGeometryPoint`,d=this._getPointCreator(t,this.spatialReference,n),g=new Q(null,0),_=new Q(null,0),v={x:0,y:0,z:0};for(let e of this.items){let t=r.getObjectId(e),n=r.getGeometryWithCurves?.(e);if(n!=null){b(n,t);continue}let i=r.getGeometry(e);if(i!=null){y(i,t);continue}}return c.candidates.sort((e,t)=>e.distance-t.distance),c;function y(t,n){let{coords:r,stride:a}=t,o=t.isPoint?te:t.lengths;if(g.coords=r,_.coords=r,e.returnEdge){let e=0;for(let t=0;t<o.length;t++){let r=o[t],u=e;for(let t=0;t<r;t++,e+=a){if(!l&&t===r-1||(g.coordsIndex=e,_.coordsIndex=t===r-1?u:e+a,!ee(v,i,g,_)))continue;let o=s(v.x,v.y);o<=1&&c.candidates.push(new S(n,d(v),Math.sqrt(o),d(g),d(_)))}}}if(e.vertexMode===`all`){let e=0;for(let t=0;t<o.length;t++){let r=o[t],i=e,u=_;u.coordsIndex=i;for(let t=0;t<r;t++,e+=a){if(g.coordsIndex=e,l&&t===r-1&&g.x===u.x&&g.y===u.y)continue;let i=s(g.x,g.y);i<=1&&c.candidates.push(new C(n,d(g),Math.sqrt(i)))}}}else if(u&&e.vertexMode===`ends`){let e=0,t=[];for(let n=0;n<o.length;n++){t.push(e);let r=o[n];e+=r*a,r>1&&t.push(e-a)}for(let e of t){g.coordsIndex=e;let t=s(g.x,g.y);t<=1&&c.candidates.push(new C(n,d(g),Math.sqrt(t)))}}}function b(t,n){let{candidates:r}=c,a={x:0,y:0,z:0};if(e.returnEdge){let e=[i.x,i.y],o=new Q(e,0),c=new Q(e,0);for(let{segments:i}of t.parts)for(let{start:t,curve:l}of i){let{curvePoint:i}=f(t,l,e),u=s(...i);if(u>1)continue;[a.x,a.y]=i,o.coords=t,c.coords=p(l);let g=m(l)?null:h(l);r.push(new S(n,d(a),Math.sqrt(u),d(o),d(c),!1,g))}}function o(e){a.x=t.vertexXY[e*2],a.y=t.vertexXY[e*2+1];let i=s(a.x,a.y);i>1||(a.z=t.vertexZ?.[e]??0,r.push(new C(n,d(a),Math.sqrt(i))))}if(e.vertexMode===`all`){let{vertexCount:e}=t;for(let t=0;t<e;++t)o(t);return}if(e.vertexMode===`ends`)switch(t.type){case`point`:o(0);break;case`polyline`:for(let e=0;e<t.partCount;++e){let n=t.partOffsets[e],r=t.partOffsets[e+1]-1;o(n),r!==n&&o(r)}}}}_getPointCreator(e,t,n){let r=n!=null&&!d(t,n)?e=>b(e,t,n):e=>e,{hasZ:i}=this;return i&&e?({x:e,y:t,z:n})=>r({x:e,y:t,z:n}):({x:e,y:t})=>r({x:e,y:t,z:0})}async createSummaryStatisticsResponse(e){let{field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,minValue:o,maxValue:s,scale:c,timeZone:l,outStatisticTypes:u}=e,d=this.fieldsIndex.get(t),f=w(d)||T(d)||E(d),p=await this._getDataValues({field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,scale:c,timeZone:l},this.items),m=P({normalizationType:i,normalizationField:r,minValue:o,maxValue:s}),h={value:.5,fieldType:d?.type},g=D(d)?F({values:p,supportsNullCount:m,percentileParams:h,outStatisticTypes:u}):I({values:p,minValue:o,maxValue:s,useSampleStdDev:!i,supportsNullCount:m,percentileParams:h,outStatisticTypes:u});return L(g,u,f)}async createUniqueValuesResponse(e){let{field:t,valueExpression:n,domains:r,returnAllCodedValues:i,scale:a,timeZone:o}=e,s=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:n,scale:a,timeZone:o},this.items,!1),c=R(s);return z(c,r,i,e.fieldDelimiter)}async createClassBreaksResponse(e){let{field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:s,minValue:c,maxValue:l,numClasses:u,scale:d,timeZone:f}=e,p=await this._getDataValues({field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,scale:d,timeZone:f},this.items),m=B(p,{field:t,normalizationField:r,normalizationType:i,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:s,minValue:c,maxValue:l,numClasses:u});return V(m,o)}async createHistogramResponse(e){let{field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:s,minValue:c,maxValue:l,numBins:u,scale:d,timeZone:f}=e,p=await this._getDataValues({field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,scale:d,timeZone:f},this.items);return H(p,{field:t,normalizationField:r,normalizationType:i,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:s,minValue:c,maxValue:l,numBins:u})}_sortFeatures(e,t,n){if(e.length>1&&t?.length)for(let r of t.slice().reverse()){let{compare:t,fieldOrExpression:i,fieldInfo:a}=$(r,this.fieldsIndex);e.sort((e,r)=>t(n(e,i,a),n(r,i,a)))}}_topNFeatures(t,n,r,i){if(t.length>1&&n?.length){let a=n.map(e=>{let{compare:t,fieldOrExpression:n,fieldInfo:r}=$(e,this.fieldsIndex);return(e,a)=>t(i(e,n,r),i(a,n,r))}).reduceRight((e,t)=>(n,r)=>{let i=t(n,r);return i!==0&&!Number.isNaN(i)?i:e(n,r)}),o=[];for(let n of t)e(o,n,r,a);return o}return t.slice(0,r)}_createFeatureQueryResponse(e){let{items:t,geometryType:n,hasM:r,hasZ:i,featureIdInfo:a,spatialReference:o}=this,{outFields:s,outSR:c,quantizationParameters:u,resultRecordCount:d,resultOffset:f,returnZ:p,returnM:m}=e,h=d!=null&&t.length>(f||0)+d,g=s&&(s.includes(`*`)?[...this.fieldsIndex.fields]:s.map(e=>this.fieldsIndex.get(e)));return{exceededTransferLimit:h,features:this._createFeatures(e,t),fields:g,geometryType:n,hasM:r&&m,hasZ:i&&p,objectIdFieldName:a.type===`object-id`?a.fieldName:null,spatialReference:_(c||o),transform:u&&l(u)||null}}_createFeatures(e,t){let n=new g(e,this.featureAdapter,this.fieldsIndex),{hasM:r,hasZ:i}=this,{orderByFields:a,quantizationParameters:o,returnGeometry:s,returnCentroid:c,maxAllowableOffset:u,resultOffset:d,resultRecordCount:f,returnZ:p=!1,returnM:m=!1}=e,h=i&&p,_=r&&m,b,x=d||0,S=f==null?null:x+f;S!=null&&S<=5e3&&S<t.length?b=this._topNFeatures(t,a,S,(e,t,r)=>n.getFieldValue(e,t,r)):(b=[...t],this._sortFeatures(b,a,(e,t,r)=>n.getFieldValue(e,t,r))),(x>0||S!=null)&&(b=b.slice(x,S??void 0));let C=[],w=0;if(!this.geometryType||!s&&!c)for(let e of b){let t=n.getAttributes(e);t&&(C[w++]=this._addFeatureJSONMetadata(e,{attributes:t}))}else{let e=l(o)??void 0,t=this.geometryType===`esriGeometryPolygon`||this.geometryType===`esriGeometryPolyline`;if(s&&!c)for(let r of b){let i=this.featureAdapter.getGeometry(r),a=this._addFeatureJSONMetadata(r,{attributes:n.getAttributes(r),geometry:v(this.geometryType,i,u,e,h,_)});t&&i&&!a.geometry&&(a.centroid=y(this,this.featureAdapter.getCentroid(r,this),e)),C[w++]=a}else if(!s&&c)for(let t of b)C[w++]=this._addFeatureJSONMetadata(t,{attributes:n.getAttributes(t),centroid:y(this,this.featureAdapter.getCentroid(t,this),e)});else for(let t of b)C[w++]=this._addFeatureJSONMetadata(t,{attributes:n.getAttributes(t),centroid:y(this,this.featureAdapter.getCentroid(t,this),e),geometry:v(this.geometryType,this.featureAdapter.getGeometry(t),u,e,h,_)})}return C}_addFeatureJSONMetadata(e,t){let n=this.featureAdapter.getMetadata?.(e);return n!==void 0&&(t.metadata=n),t}_createExceedsLimitQueryResponse(){let e=!1,t=1/0,n=1/0,r=1/0;for(let e of this.query.outStatistics??[])if(e.statisticType===`exceedslimit`){t=e.maxPointCount==null?1/0:e.maxPointCount,n=e.maxRecordCount==null?1/0:e.maxRecordCount,r=e.maxVertexCount==null?1/0:e.maxVertexCount;break}return e=this.geometryType===`esriGeometryPoint`?this.items.length>t:this.items.length>n||this.items.reduce((e,t)=>e+(this.featureAdapter.getGeometry(t)?.size??0),0)>r,{fields:[{name:`exceedslimit`,type:`esriFieldTypeInteger`,alias:`exceedslimit`,sqlType:`sqlTypeInteger`,domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,n={attributes:{}}){let r=[],i=new Map,a=new Map,o=new Map,s=new Map,c=new g(e,this.featureAdapter,this.fieldsIndex),l=e.outStatistics,{groupByFieldsForStatistics:u,having:d,orderByFields:f,resultRecordCount:p}=e,m=u?.length,h=!!m,_=h?u[0]:null,v=h&&!this.fieldsIndex.get(_);for(let f of l??[]){let{outStatisticFieldName:l,statisticType:p}=f,g=f,y=p===`exceedslimit`?void 0:f.onStatisticField,b=p===`percentile_disc`||p===`percentile_cont`,x=p===`EnvelopeAggregate`||p===`CentroidAggregate`||p===`ConvexHullAggregate`,S=h&&m===1&&(y===_||v)&&p===`count`;if(h){if(!o.has(y)){let e=[];for(let n of u){let r=this._getAttributeValues(c,n,t,i);e.push(r)}o.set(y,this._calculateUniqueValues(e,t,!x&&c.returnDistinctValues))}let n=o.get(y);if(!n)continue;let r=Object.keys(n);for(let a of r){let{count:r,data:o,items:f,itemPositions:p}=n[a],m=o.join(`,`);if(!d||c.validateItems(f,d)){let n=s.get(m)||{attributes:{}};if(e.returnAggIds&&(n.aggregateIds=f.map(e=>this.featureAdapter.getObjectId(e)).filter(e=>e!=null)),x){n.aggregateGeometries||={};let{aggregateGeometries:e,outStatisticFieldName:t}=await this._getAggregateGeometry(g,f);n.aggregateGeometries[t]=e}else{let e=null;if(S)e=r;else{let n=this._getAttributeValues(c,y,t,i),r=p.map(e=>n[e]);e=b&&`statisticParameters`in g?this._getPercentileValue(g,r):this._getStatisticValue(g,r,null,c.returnDistinctValues)}n.attributes[l]=e}let a=0;u.forEach((e,t)=>n.attributes[this.fieldsIndex.get(e)?e:`EXPR_${++a}`]=o[t]),s.set(m,n)}}}else if(x){n.aggregateGeometries||={};let{aggregateGeometries:e,outStatisticFieldName:r}=await this._getAggregateGeometry(g,t);n.aggregateGeometries[r]=e}else{let e=this._getAttributeValues(c,y,t,i);n.attributes[l]=b&&`statisticParameters`in g?this._getPercentileValue(g,e):this._getStatisticValue(g,e,a,c.returnDistinctValues)}let C=(p===`min`||p===`max`)&&(D(this.fieldsIndex.get(y))||this._isAnyDateField(y))?this.fieldsIndex.get(y)?.type:null;r.push({name:l,alias:l,type:C||`esriFieldTypeDouble`})}let y=h?Array.from(s.values()):[n];return this._sortFeatures(y,f,(e,t)=>e.attributes[t]),p&&(y.length=Math.min(p,y.length)),{fields:r,features:y}}_isAnyDateField(e){let t=this.fieldsIndex.get(e);return w(t)||T(t)||E(t)||O(t)}async _getAggregateGeometry(e,t){let{statisticType:n,outStatisticFieldName:r}=e,{featureAdapter:s,spatialReference:c,geometryType:l}=this,u=t.map(e=>v(l,s.getGeometry(e))),d={aggregateGeometries:null,outStatisticFieldName:null},{convexHullExecuteMany:f}=await Y.getImportPromise(),[p]=f(u,{merge:!0});if(p&&p.rings[0].length<=3&&(p=null),n===`EnvelopeAggregate`)d.aggregateGeometries={...p?o(p):Z(u),spatialReference:c},d.outStatisticFieldName=r||`extent`;else if(n===`CentroidAggregate`){let[e,t]=p?i(p):a(Z(u));d.aggregateGeometries={x:e,y:t,spatialReference:c},d.outStatisticFieldName=r||`centroid`}else n===`ConvexHullAggregate`&&(d.aggregateGeometries=p&&{...p,spatialReference:c},d.outStatisticFieldName=r||`convexHull`);return d}_getStatisticValue(e,t,n,r){let{onStatisticField:i,statisticType:a}=e,o=null;return o=n?.has(i)?n.get(i):D(this.fieldsIndex.get(i))||this._isAnyDateField(i)?F({values:t,returnDistinct:r}):I({values:r?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),n&&n.set(i,o),o[a===`var`?`variance`:a]}_getPercentileValue(e,t){let{onStatisticField:n,statisticParameters:r,statisticType:i}=e,{value:a,orderBy:o}=r,s={value:a,orderBy:o,fieldType:this.fieldsIndex.get(n)?.type,isDiscrete:i===`percentile_disc`};return U(t,s)}_getAttributeValues(e,t,n,r){if(r.has(t))return r.get(t);let i=this.fieldsIndex.get(t),a=n.map(n=>e.getFieldValue(n,t,i));return r.set(t,a),a}_calculateUniqueValues(e,t,n){let r={},i=t.length;for(let a=0;a<i;a++){let i=t[a],o=[];for(let t of e)o.push(t[a]);let s=o.join(`,`);r[s]==null?r[s]={count:1,data:o,items:[i],itemPositions:[a]}:(n||r[s].count++,r[s].items.push(i),r[s].itemPositions.push(a))}return r}async _getDataValues(e,t,i=!0){let a=new g(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:o,scale:s,timeZone:c}=e,l=r.fromJSON(this.query.outSR||this.spatialReference);return o?a.getExpressionValues(t,o,{viewingMode:`map`,scale:s,spatialReference:l},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},c):a.getDataValues(t,n(e),i)}_calculateHistogramBins(e,t,n){if(t.min==null&&t.max==null)return[];let r=t.intervals,i=t.min??0,a=t.max??0,o=r.map(([e,t])=>({minValue:e,maxValue:t,count:0,items:[]}));for(let t=0;t<e.length;t++){let s=e[t],c=n[t];if(s!=null&&s>=i&&s<=a){let e=W(r,s);e>-1&&(o[e].count++,o[e].items.push(c))}}return o}async createQueryBinsResponse(e){let t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);let{value:n,outAlias:r,valueType:i}=t,a=[],o=[{name:r??n,alias:r??n,type:i??`esriFieldTypeString`},{name:`bin`,alias:`bin`,type:`esriFieldTypeInteger`}],s=new g(e,this.featureAdapter,this.fieldsIndex),c=new Map,l=[...this.items];this._sortFeatures(l,[n],(e,t,n)=>s.getFieldValue(e,t,n));let u=this._getAttributeValues(s,n,l,c),d=this._calculateUniqueValues([u],l,s.returnDistinctValues);for(let t in d){let{items:i}=d[t],s=await this._createBinsResponse(e,i);if(a.push(...s.features.map(e=>({...e,attributes:{...e.attributes,[r??n]:t}}))),s.fields)for(let e of s.fields)o.some(t=>t.name===e.name)||o.push(e)}return{fields:o,features:a}}async _createBinsResponse(e,t){let n=e.bin;switch(t??=this.items,n.type){case`autoIntervalBin`:return this._createAutoIntervalBinsResponse(k.fromJSON(n),e,t);case`dateBin`:return this._createDateBinsResponse(A.fromJSON(n),e,t);case`fixedBoundariesBin`:return this._createFixedBoundariesBinsResponse(M.fromJSON(n),e,t);case`fixedIntervalBin`:return this._createFixedIntervalBinsResponse(N.fromJSON(n),e,t)}}async _createAutoIntervalBinsResponse(e,t,n){let{field:r,normalizationField:i,numBins:a,normalizationType:o,normalizationTotal:s,start:c,end:l}=e,u=await this._getDataValues({field:e.field||e.expression,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},n),d=G(u,{field:r,normalizationField:i,normalizationType:o,normalizationTotal:s,numBins:a,minValue:x(o?e.normalizationMinValue:c,!1),maxValue:x(o?e.normalizationMaxValue:l,!1)}),f=this._calculateHistogramBins(u,d,n);return this._createFeaturesFromHistogramBins(f,t)}async _createDateBinsResponse(e,t,n){let{field:r,interval:i,start:a,end:o,snapToData:s,returnFullIntervalBin:c,offset:l,firstDayOfWeek:u}=e,d=i.unit,f=await this._getDataValues({field:r||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},n),p=O(this.fieldsIndex.get(r)),m=j.toJSON(d),h=f.filter(Boolean).sort((e,t)=>e-t),g=a==null?h[0]:x(a,p),_=o==null?h[h.length-1]:x(o,p),v=[];if(g!=null&&_!=null){let e={zone:t.outTimeReference?.ianaTimeZone??q},n={[l?.unit?j.toJSON(l.unit):`milliseconds`]:l?.value||0},r=J.fromMillis(g,e).minus(n),a=J.fromMillis(_,e).minus(n),o=typeof u==`number`&&u>=1&&u<=7?u:7,d=(e,t)=>{let n=(e.weekday-t+7)%7;return e.minus({days:n}).startOf(`day`)},f=(e,t)=>d(e,t).plus({days:7});if(s===`last`){let e=m===`week`?f(a,o):a;for(;e>r;){let t=e.minus({[m]:i.value});if(t<r){v.unshift([c?t.plus(n).toMillis():r.plus(n).toMillis(),e.plus(n).toMillis()]);break}v.unshift([t.plus(n).toMillis(),e.plus(n).toMillis()]),e=t}}else{let e=s===`first`?r:m===`week`?d(r,o):r.startOf(m);for(;e<=a;){let t=e.plus({[m]:i.value});if(t>a){v.push([e.plus(n).toMillis(),c?t.plus(n).toMillis():a.plus(n).toMillis()]);break}v.push([e.plus(n).toMillis(),t.plus(n).toMillis()]),e=t}}}let y=this._calculateHistogramBins(f,{intervals:v,min:g,max:_},n);return this._createFeaturesFromHistogramBins(y,t)}async _createFixedBoundariesBinsResponse(e,t,n){let{field:r}=e,i=await this._getDataValues({field:r||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},n),a=O(this.fieldsIndex.get(r)),o=e.boundaries.map(e=>x(e,a)).sort((e,t)=>e-t),s=[];for(let e=0;e<o.length-1;e++)s.push([o[e],o[e+1]]);let c={intervals:s,min:o.at(0),max:o.at(-1)},l=this._calculateHistogramBins(i,c,n);return this._createFeaturesFromHistogramBins(l,t)}async _createFixedIntervalBinsResponse(e,t,n){let{field:r,interval:i,normalizationType:a,start:o,end:s}=e,c=await this._getDataValues({field:r||e.expression,normalizationField:e.normalizationField,normalizationType:a,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},n),l=O(this.fieldsIndex.get(r)),u=G(c,{field:r,classificationMethod:`defined-interval`,definedInterval:i,minValue:x(a?e.normalizationMinValue:o,l),maxValue:x(a?e.normalizationMaxValue:s,l)},!0),d=this._calculateHistogramBins(c,u,n);return this._createFeaturesFromHistogramBins(d,t)}async _createFeaturesFromHistogramBins(e,t){let{upperBoundaryAlias:n,lowerBoundaryAlias:r}=t,i=r||`lowerBoundary`,a=n||`upperBoundary`,o=[],s=[{name:i,alias:i,type:`esriFieldTypeDouble`},{name:a,alias:a,type:`esriFieldTypeDouble`}],c=t.bin?.stackBy?.value,l=t.bin?.stackBy?.outAlias;c&&s.push({name:`bin`,alias:`bin`,type:`esriFieldTypeInteger`},{name:l??c,alias:l??c,type:`esriFieldTypeString`});let u=0,d=t.bin.type===`dateBin`,f=t.outTimeReference?.ianaTimeZone;for(let n of e){let{minValue:e,maxValue:r,items:p}=n,m={attributes:{}};m.attributes[i]=d&&f&&e!=null?J.fromMillis(e,{zone:f}).toISO():e,t.bin.hideUpperBound||(m.attributes[a]=d&&f&&r!=null?J.fromMillis(r,{zone:f}).toISO():r),t.returnAggIds&&(m.aggregateIds=p.map(e=>this.featureAdapter.getObjectId(e)).filter(e=>e!=null));let h;if(c?(h=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[c],orderByFields:[c]},p),m.attributes.bin=++u,t.bin.jsonStyle===`flat`?o.push(...h.features.map(({attributes:{EXPR_1:e,...t},...n})=>({...n,attributes:l??e?{...t,[l??e]:e,...m.attributes}:{...t,...m.attributes}}))):(m.stackedAttributes=h.features.map(({attributes:{EXPR_1:e,...t}})=>l??e?{...t,[l??e]:e}:t),o.push(m))):(t.bin?.splitBy&&(m.attributes.bin=++u),h=await this._createStatisticsQueryResponse(t,p,m),o.push(m)),h.fields)for(let e of h.fields)s.some(t=>t.name===e.name)||s.push(e)}return t.binOrder===`desc`&&o.reverse(),{fields:s,features:o}}}function Z(e){let t=s(e[0]);for(let n of e.slice(1))c(t,s(n));return t}function ee(e,t,n,r){let i=r.x-n.x,a=r.y-n.y,o=t.x-n.x,s=t.y-n.y,c=i*i+a*a;if(c===0)return!1;let l=o*i+s*a,u=Math.min(1,Math.max(0,l/c));return e.x=n.x+i*u,e.y=n.y+a*u,!0}class Q{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}const te=[1];function $(e,t){let n=e.split(` `),r=n[0],i=t.get(r),a=n[1]?n[1].toLowerCase()===`desc`:!1;return{compare:K(i?.type,a,`case-insensitive`),fieldOrExpression:r,fieldInfo:i}}export{X as QueryEngineResult};
|