@arcgis/core 4.33.0-next.20250516 → 4.33.0-next.20250518
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/applications/Components/QuantityFormatter.d.ts +4 -0
- package/applications/Components/QuantityFormatter.js +5 -0
- package/arcade/ArcadeDate.js +1 -1
- package/arcade/enum.js +5 -0
- package/arcade/featureset/actions/GroupBy.js +1 -1
- package/arcade/functions/convertdirection.js +1 -1
- package/arcade/functions/date.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/arcade/functions/geomasync.js +1 -1
- package/arcade/functions/geomsync.js +1 -1
- package/arcade/functions/string.js +1 -1
- package/arcade/geometry/functions.js +1 -1
- package/arcade/geometry/unitConversion.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{0fd6d80393722132e044.js → 0229c573fa8a2fff2d8b.js} +2 -2
- package/assets/esri/core/workers/chunks/{612f6739c9399fbae4d0.js → 094e8aae6dada24c8115.js} +1 -1
- package/assets/esri/core/workers/chunks/{ffaa977cd97a2b7190c5.js → 0c2dccec20c0994366fe.js} +1 -1
- package/assets/esri/core/workers/chunks/151d6354e7bc105b25c0.js +346 -0
- package/assets/esri/core/workers/chunks/1cf0fae3f2e848a2a738.js +1 -0
- package/assets/esri/core/workers/chunks/24327d01cb2c5c55a4b7.js +1 -0
- package/assets/esri/core/workers/chunks/{1a010d877b8428e755fb.js → 2841888fdbc2770e90c8.js} +1 -1
- package/assets/esri/core/workers/chunks/{7e1dc8e5e18f18dd21e2.js → 29fb64826bb1351aca8d.js} +2 -2
- package/assets/esri/core/workers/chunks/{4e0d2458f4d7a35bb97c.js → 2ce5cc797ae0d66c8678.js} +1 -1
- package/assets/esri/core/workers/chunks/{9d564f79b82d427fc1da.js → 2fd30428309f4c517d4c.js} +1 -1
- package/assets/esri/core/workers/chunks/3ca6f893fd58f5b17af5.js +1 -0
- package/assets/esri/core/workers/chunks/{52d160cb7921ae7a4f57.js → 3fc44d8cef392b4b9c7a.js} +1 -1
- package/assets/esri/core/workers/chunks/417293f00b2c21cc3175.js +1 -0
- package/assets/esri/core/workers/chunks/{4cb199b547e5b97e65fb.js → 48cedef1c926d11164b7.js} +1 -1
- package/assets/esri/core/workers/chunks/{563594357f3648652a5c.js → 4b21c4815533a43835c3.js} +1 -1
- package/assets/esri/core/workers/chunks/{921c040d0497031fd8ff.js → 54da9c7fd1088a8076ce.js} +1 -1
- package/assets/esri/core/workers/chunks/{ab9614555a15f04396f6.js → 54f981fe0f8851767be9.js} +2 -2
- package/assets/esri/core/workers/chunks/{28d9e2ffc3059a55311e.js → 59f701c30bcd9088b291.js} +1 -1
- package/assets/esri/core/workers/chunks/5d50a8d0427eab0a2514.js +1 -0
- package/assets/esri/core/workers/chunks/5f4ca51b82daf0e51010.js +1 -0
- package/assets/esri/core/workers/chunks/{05c80002c37002ac99e8.js → 5f6719286a6c9a3ac74b.js} +1 -1
- package/assets/esri/core/workers/chunks/{a09b5700c92bb76c3234.js → 638ecabe3e22978af5a3.js} +1 -1
- package/assets/esri/core/workers/chunks/{9fff43ffcd5602ccc50f.js → 649caffe8f5dbaad0d7b.js} +1 -1
- package/assets/esri/core/workers/chunks/{4480e4b61affb3b2e9d6.js → 6648e68f00d28e12bcf9.js} +1 -1
- package/assets/esri/core/workers/chunks/66a1b92358344dd28ee1.js +1 -0
- package/assets/esri/core/workers/chunks/{b92a34f88569c481ed10.js → 67338948e470c1251d8a.js} +3 -3
- package/assets/esri/core/workers/chunks/{a8d043b73e087bee7c40.js → 67c5f1112a7c65e9eeff.js} +1 -1
- package/assets/esri/core/workers/chunks/6a225393b63e1e8c7933.js +1 -0
- package/assets/esri/core/workers/chunks/6c29a768f02dc7ce0ed6.js +1 -0
- package/assets/esri/core/workers/chunks/{fbd2f45d5adce4ca323f.js → 73ddb356121add556994.js} +2 -2
- package/assets/esri/core/workers/chunks/{a6ca68ef6311ffc365b2.js → 73e179b04bb931ca9b86.js} +1 -1
- package/assets/esri/core/workers/chunks/7678177555570682154e.js +1 -0
- package/assets/esri/core/workers/chunks/7b9d14cc4a466ef18d71.js +1 -0
- package/assets/esri/core/workers/chunks/7e6141b5baae47682f97.js +1 -0
- package/assets/esri/core/workers/chunks/{257db39a1ba1a11ebfb4.js → 8365707e408d19988356.js} +1 -1
- package/assets/esri/core/workers/chunks/8a2cee726b7843c7408a.js +1 -0
- package/assets/esri/core/workers/chunks/{b1e275607d9754079f60.js → 8eadf90d938753691044.js} +1 -1
- package/assets/esri/core/workers/chunks/{ff4e7da880b206fd98ec.js → 9049c81445cc044286f1.js} +1 -1
- package/assets/esri/core/workers/chunks/9588328d4ed6b0f04166.js +2 -0
- package/assets/esri/core/workers/chunks/{dcf5719f38ad40b92941.js → 9826a1c66885dbbdc130.js} +1 -1
- package/assets/esri/core/workers/chunks/{4954e0cf4a40e45d237f.js → 9c8e66da6cf32ace0914.js} +1 -1
- package/assets/esri/core/workers/chunks/9cac00d4bfac14aaae12.js +1 -0
- package/assets/esri/core/workers/chunks/{d60da671aba70485050e.js → 9f18392933c06f1d63b6.js} +1 -1
- package/assets/esri/core/workers/chunks/{c3b2b05996e2008adbe3.js → a9f16323666042a9d47f.js} +1 -1
- package/assets/esri/core/workers/chunks/aad9a693813b47a51530.js +2 -0
- package/assets/esri/core/workers/chunks/{654fe135d41af81daa13.js → be1f3cac908c28c64401.js} +1 -1
- package/assets/esri/core/workers/chunks/bf4d9cdcbe6bb8bc9d39.js +1 -0
- package/assets/esri/core/workers/chunks/{d49518eb4b351afc5f00.js → ca3851ca2621879eb887.js} +1 -1
- package/assets/esri/core/workers/chunks/{56db71ea7eb8a5652d98.js → ca62e7ec102a1bb879dc.js} +1 -1
- package/assets/esri/core/workers/chunks/cb16ba9512ae0a09c55d.js +1 -0
- package/assets/esri/core/workers/chunks/{8c1242ffd48b3ef800fa.js → d103e184ddf9beec779d.js} +1 -1
- package/assets/esri/core/workers/chunks/d3d98ea5b5e56fc60a31.js +1 -0
- package/assets/esri/core/workers/chunks/{5719471414810b6a9aec.js → d9d9180689bcf71af00f.js} +1 -1
- package/assets/esri/core/workers/chunks/{dcaeb57c69d432118604.js → db13c93b4d708a2481db.js} +1 -1
- package/assets/esri/core/workers/chunks/{2c3bfa75286376388806.js → db192728fa0ee08a776a.js} +1 -1
- package/assets/esri/core/workers/chunks/{40b8e53c8b1c447eff7e.js → e2d012078d51dc2b2802.js} +1 -1
- package/assets/esri/core/workers/chunks/e385a27fd1ac2123a05f.js +1 -0
- package/assets/esri/core/workers/chunks/{e85f892ea44d67d53ff0.js → f3b51aa0a1a8fc3b231c.js} +2 -2
- package/assets/esri/core/workers/chunks/f74f8ed3f17713a208c3.js +1 -0
- package/assets/esri/core/workers/chunks/f9567108862629f25c8b.js +1 -0
- package/assets/esri/core/workers/chunks/fa99abc572b382e7e0c7.js +1 -0
- package/assets/esri/themes/base/widgets/_Directions.scss +74 -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/widgets/Directions/t9n/Directions.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ar.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_bg.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_bs.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ca.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_cs.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_da.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_de.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_el.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_en.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_es.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_et.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_fi.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_fr.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_he.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_hr.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_hu.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_id.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_it.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ja.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ko.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_lt.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_lv.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_nl.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_no.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_pl.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_pt-BR.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_pt-PT.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ro.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ru.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_sk.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_sl.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_sr.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_sv.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_th.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_tr.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_uk.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_vi.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_zh-CN.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_zh-HK.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_zh-TW.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_ar.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_bg.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_bs.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_ca.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_cs.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_da.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_de.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_el.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_es.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_et.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_fi.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_fr.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_he.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_hr.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_hu.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_id.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_it.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_ja.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_ko.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_lt.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_lv.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_nl.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_no.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_pl.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_pt-BR.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_pt-PT.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_ro.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_ru.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_sk.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_sl.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_sr.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_sv.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_th.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_tr.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_uk.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_vi.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_zh-CN.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_zh-HK.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_zh-TW.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_ar.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_bg.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_bs.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_ca.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_cs.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_da.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_de.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_el.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_es.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_et.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_fi.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_fr.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_he.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_hr.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_hu.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_id.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_it.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_ja.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_ko.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_lt.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_lv.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_nl.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_no.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_pl.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_pt-BR.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_pt-PT.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_ro.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_ru.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_sk.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_sl.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_sr.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_sv.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_th.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_tr.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_uk.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_vi.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_zh-CN.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_zh-HK.json +1 -0
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_zh-TW.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_ar.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_bg.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_bs.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_ca.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_cs.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_da.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_de.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_el.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_es.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_et.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_fi.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_fr.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_he.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_hr.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_hu.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_id.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_it.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_ja.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_ko.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_lt.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_lv.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_nl.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_no.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_pl.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_pt-BR.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_pt-PT.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_ro.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_ru.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_sk.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_sl.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_sr.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_sv.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_th.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_tr.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_uk.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_vi.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_zh-CN.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_zh-HK.json +1 -0
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_zh-TW.json +1 -0
- package/chunks/Bufferer-Dw9Qi4T1.js +5 -0
- package/chunks/Distance2DCalculator-CXhBP-8I.js +5 -0
- package/chunks/Envelope.js +1 -1
- package/chunks/GeodeticDistanceCalculator-Ce-woMPw.js +5 -0
- package/chunks/Geometry.js +1 -1
- package/chunks/MultiPathImpl.js +5 -0
- package/chunks/OperatorClip.js +1 -1
- package/chunks/OperatorCut.js +1 -1
- package/chunks/OperatorDensify.js +1 -1
- package/chunks/OperatorGeneralize.js +1 -1
- package/chunks/OperatorGeodesicBuffer.js +1 -1
- package/chunks/OperatorGeodeticArea.js +1 -1
- package/chunks/OperatorGeodeticDistance.js +1 -1
- package/chunks/OperatorGeodeticLength.js +1 -1
- package/chunks/OperatorMultiPartToSinglePart.js +1 -1
- package/chunks/OperatorProximityGeodesic.js +1 -1
- package/chunks/OperatorShapePreservingLength.js +1 -1
- package/chunks/OperatorShapePreservingProject.js +1 -1
- package/chunks/Point2D.js +1 -1
- package/chunks/ProjectionTransformation.js +1 -1
- package/chunks/distanceOperator.js +1 -1
- package/geometry/operators/extendOperator.js +1 -1
- package/geometry/operators/gx/operatorAlphaShape.js +1 -1
- package/geometry/operators/gx/operatorAutoComplete.js +1 -1
- package/geometry/operators/gx/operatorBoundary.js +1 -1
- package/geometry/operators/gx/operatorBuffer.js +1 -1
- package/geometry/operators/gx/operatorConvexHull.js +1 -1
- package/geometry/operators/gx/operatorDifference.js +1 -1
- package/geometry/operators/gx/operatorGraphicBuffer.js +1 -1
- package/geometry/operators/gx/operatorIntegrate.js +1 -1
- package/geometry/operators/gx/operatorIntersection.js +1 -1
- package/geometry/operators/gx/operatorLabelPoint.js +1 -1
- package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
- package/geometry/operators/gx/operatorLocateBetween.js +1 -1
- package/geometry/operators/gx/operatorMinimumBoundingCircle.js +1 -1
- package/geometry/operators/gx/operatorOffset.js +1 -1
- package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
- package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
- package/geometry/operators/gx/operatorSimplify.js +1 -1
- package/geometry/operators/gx/operatorSinglePartToMultiPart.js +1 -1
- package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
- package/geometry/operators/gx/operatorUnion.js +1 -1
- package/geometry/operators/isNearOperator.js +1 -1
- package/geometry/operators/reshapeOperator.js +1 -1
- package/geometry/operators/support/apiConverter.js +1 -1
- package/geometry/operators/support/initNoPeFactory.js +1 -1
- package/geometry/operators/support/jsonConverter.js +1 -1
- package/geometry.js +1 -1
- package/interfaces.d.ts +68 -11
- package/layers/KnowledgeGraphLayer.js +1 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/graphics/sources/support/QueryTask.js +1 -1
- package/package.json +1 -1
- package/pointCloudRenderers.js +1 -1
- package/rasterRenderers.js +1 -1
- package/renderers.js +1 -1
- package/rest/query/executeForCount.js +1 -1
- package/support/revision.js +1 -1
- package/symbols.js +1 -1
- package/views/2d/interactive/editingTools/draw/DrawGraphicTool2D.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementController.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
- package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
- package/views/3d/analysis/Dimension/DimensionController.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
- package/views/3d/analysis/DimensionAnalysisView3D.js +1 -1
- package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementController.js +1 -1
- package/views/3d/analysis/DirectLineMeasurementAnalysisView3D.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
- package/views/3d/analysis/support/measurementUtils.js +1 -1
- package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
- package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
- package/views/3d/interactive/editingTools/reshape/reshapeTooltipUtils3D.js +1 -1
- package/views/3d/interactive/editingTools/transform/ExtentTransformTool.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/ExtentMove.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/ExtentScale.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/extentUtils.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
- package/views/3d/layers/DimensionLayerView3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshViewLabeler.js +1 -1
- package/views/3d/layers/LineOfSightLayerView3D.js +1 -1
- package/views/3d/layers/RouteLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/ViewshedLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/graphics/Graphics3DScaleVisibility.js +1 -1
- package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
- package/views/3d/layers/graphics/Labeler.js +1 -1
- package/views/3d/layers/support/LayerViewAnalysisViewManager.js +1 -1
- package/views/3d/layers/support/MediaLayerInteraction.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/LinkChartView.js +1 -1
- package/views/draw/DrawAction.js +1 -1
- package/views/draw/DrawGraphicTool.js +1 -1
- package/views/draw/DrawOperation.js +1 -1
- package/views/draw/DrawScreenTool.js +1 -1
- package/views/draw/DrawTool.js +1 -1
- package/views/draw/PointDrawAction.js +1 -1
- package/views/draw/PolygonDrawAction.js +1 -1
- package/views/draw/PolylineDrawAction.js +1 -1
- package/views/draw/SegmentDrawAction.js +1 -1
- package/views/draw/support/Box.js +1 -1
- package/views/draw/support/Reshape.js +1 -1
- package/views/draw/support/reshapeTooltipUtils.js +1 -1
- package/views/draw/support/tooltipUtils.js +1 -1
- package/views/interactive/SegmentLabels.js +1 -1
- package/views/interactive/coordinateHelper.js +1 -1
- package/views/interactive/snapping/LineSnapper.js +1 -1
- package/views/interactive/snapping/RightAngleSnapper.js +1 -1
- package/views/interactive/snapping/SelfSnappingEngine.js +1 -1
- package/views/interactive/snapping/SnappingManager.js +1 -1
- package/views/support/automaticAreaMeasurementUtils.js +1 -1
- package/views/support/automaticLengthMeasurementUtils.js +1 -1
- package/views/support/extentUtils.js +1 -1
- package/views/support/geodesicAreaMeasurementUtils.js +1 -1
- package/views/support/geodesicLengthMeasurementUtils.js +1 -1
- package/views/support/geodesicMeasurementUtils.js +1 -1
- package/views/support/layerViewUtils.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/CatalogLayerList.js +1 -1
- package/widgets/Directions/css.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflow.d.ts +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflowData.d.ts +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflowData.js +1 -1
- package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/TableList.js +1 -1
- package/widgets/support/GridControls/GridControlsViewModel.js +1 -1
- package/widgets/support/Selector2D/SelectionOperation.js +1 -1
- package/assets/esri/core/workers/chunks/009730713ed9bc7c7388.js +0 -1
- package/assets/esri/core/workers/chunks/0817ddd885ce8b2459cb.js +0 -1
- package/assets/esri/core/workers/chunks/0cce3770591b0730cf22.js +0 -1
- package/assets/esri/core/workers/chunks/1991f0d0f0a12175f849.js +0 -1
- package/assets/esri/core/workers/chunks/19c50f052eba0553bf4d.js +0 -1
- package/assets/esri/core/workers/chunks/1f194ffea16cc6595ecc.js +0 -1
- package/assets/esri/core/workers/chunks/320e821af81138fe12ac.js +0 -1
- package/assets/esri/core/workers/chunks/394b9723d108cff7136e.js +0 -1
- package/assets/esri/core/workers/chunks/4a362a35bcdb8405a53a.js +0 -1
- package/assets/esri/core/workers/chunks/52a3d0e041717da7697e.js +0 -1
- package/assets/esri/core/workers/chunks/5f766bcb751d66fbf1c8.js +0 -1
- package/assets/esri/core/workers/chunks/a70a86ba4e487f62f683.js +0 -346
- package/assets/esri/core/workers/chunks/aeb5bbe861f65544d504.js +0 -1
- package/assets/esri/core/workers/chunks/b52b28a6f422b10ff166.js +0 -1
- package/assets/esri/core/workers/chunks/c07c1bb7ae09136dc1f6.js +0 -1
- package/assets/esri/core/workers/chunks/cbbca011f8b176d4b5db.js +0 -1
- package/assets/esri/core/workers/chunks/cd5c380196db7fb55242.js +0 -1
- package/assets/esri/core/workers/chunks/ce321fd8fc5551e190ec.js +0 -1
- package/assets/esri/core/workers/chunks/ce53ddda04e09ba2f860.js +0 -1
- package/assets/esri/core/workers/chunks/d6ab65ad864782c50705.js +0 -1
- package/assets/esri/core/workers/chunks/da3c62a851a4332f6dda.js +0 -1
- package/assets/esri/core/workers/chunks/db3f710d770adf631b28.js +0 -2
- package/assets/esri/core/workers/chunks/f4c6ea630cecf0f260d7.js +0 -2
- package/chunks/Bufferer-CicaNej1.js +0 -5
- package/chunks/Distance2DCalculator-C1KHhZwD.js +0 -5
- package/chunks/GeodeticDistanceCalculator-CcF1gMZX.js +0 -5
- package/chunks/QuadraticBezier.js +0 -5
- /package/assets/esri/core/workers/chunks/{0fd6d80393722132e044.js.LICENSE.txt → 0229c573fa8a2fff2d8b.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{7e1dc8e5e18f18dd21e2.js.LICENSE.txt → 29fb64826bb1351aca8d.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{ab9614555a15f04396f6.js.LICENSE.txt → 54f981fe0f8851767be9.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{fbd2f45d5adce4ca323f.js.LICENSE.txt → 73ddb356121add556994.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{db3f710d770adf631b28.js.LICENSE.txt → 9588328d4ed6b0f04166.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{f4c6ea630cecf0f260d7.js.LICENSE.txt → aad9a693813b47a51530.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{e85f892ea44d67d53ff0.js.LICENSE.txt → f3b51aa0a1a8fc3b231c.js.LICENSE.txt} +0 -0
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../../chunks/tslib.es6.js";import t from"../../../../../core/Accessor.js";import{removeUnordered as i}from"../../../../../core/arrayUtils.js";import{unitRGBAFromColor as n}from"../../../../../core/colorUtils.js";import"../../../../../core/has.js";import a from"../../../../../core/Evented.js";import o from"../../../../../core/Handles.js";import{handlesGroup as s,makeHandle as r,destroyHandle as l}from"../../../../../core/handleUtils.js";import{destroyMaybe as p,removeMaybe as d}from"../../../../../core/maybe.js";import{watch as h,on as u,initial as c,syncAndInitial as f,when as m,sync as g}from"../../../../../core/reactiveUtils.js";import{property as _}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/Logger.js";import{subclass as v}from"../../../../../core/accessorSupport/decorators/subclass.js";import{IDENTITY as M}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{l as b,d as x,m as E,i as O,f as y,g as j}from"../../../../../chunks/vec32.js";import{fromValues as I,create as S}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as H}from"../../../../../core/support/UpdatingHandles.js";import w from"../../../../../geometry/Point.js";import V from"../../../../../geometry/Polyline.js";import T from"../../../../../geometry/SpatialReference.js";import{makeDehydratedPoint as A}from"../../../../../layers/graphics/dehydratedPoint.js";import{isVolumetricSymbol as G}from"../../../../../symbols/support/utils.js";import{Manipulator3D as D}from"../../Manipulator3D.js";import{createManipulatorMaterial as P,createManipulatorOutlineMaterial as L,placeAtObject as C}from"../../manipulatorUtils.js";import{RenderObject as N}from"../../RenderObject.js";import{SegmentLabels3D as U}from"../../SegmentLabels3D.js";import{SnappingVisualizer3D as k}from"../../SnappingVisualizer3D.js";import{screenToMapXYAtLocation as R,screenToRenderPlaneFromEvent as z,convertToMapCoordinates as F}from"../dragEventPipeline3D.js";import{orientation as Z}from"../geometryUtils.js";import{ManipulatorType as X}from"../ManipulatorType.js";import{canMoveZOperations as Y}from"../manipulatorUtils.js";import{Settings as q}from"../settings.js";import{createVisualElements as B}from"../visualElementUtils.js";import{discRadiusSmall as W}from"../manipulations/config.js";import{ManipulationType as K,MoveManipulation as J}from"../manipulations/MoveManipulation.js";import{MoveXYObjectManipulation as Q}from"../manipulations/MoveXYObjectManipulation.js";import{getMapPointAtEdgeOffsetManipulatorElevation as $,createEdgeOffsetIntersectionPlane as ee,createEdgeOffsetOperation as te,edgeOffsetRotationMatrix as ie,screenEdgeLengthSquared as ne,getDistanceInGeometrySR as ae}from"./edgeOffsetUtils.js";import{createTooltipInfos as oe,connectTooltipToManipulatedObject as se,getUpdatedTranslateObjectTooltipInfo as re,getUpdatedEdgeOffsetTooltipInfo as le}from"./reshapeTooltipUtils3D.js";import{OutlineVisualElement as pe}from"../../visualElements/OutlineVisualElement.js";import{createExtrudedTriangle as de,createSphereGeometry as he}from"../../../webgl-engine/lib/GeometryUtil.js";import{MouseButton as ue}from"../../../../input/IViewEvents.js";import{sceneSnappingAtLocation as ce,addMapDelta as fe,createManipulatorDragEventPipeline as me,dragAtLocation as ge,addScreenDelta as _e}from"../../../../interactive/dragEventPipeline.js";import{ManipulatorStateFlags as ve,ManipulatorStateCustomFlags as Me}from"../../../../interactive/interfaces.js";import{tooltipKeys as be}from"../../../../interactive/keybindings.js";import{AccumulationBehavior as xe}from"../../../../interactive/editGeometry/interfaces.js";import{SnappingContext as Ee}from"../../../../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as Oe}from"../../../../interactive/snapping/SnappingDragPipelineStep.js";import{makeTooltip as ye,enterInputModeIfAvailable as je}from"../../../../interactive/tooltip/tooltipCommonUtils.js";const Ie=Symbol();let Se=class extends t{get _operations(){return this.object.operations}constructor(e){super(e),this._selectedIndex=0,this._manipulatorHandles=new o,this._manipulatorInfos=[],this._numGrabbing=0,this._numDragging=0,this._reshapeEventState=Ce.NONE,this._pendingEdgeOffsetInfo=null,this._updatingHandles=new H,this._recreatingManipulators=!1,this._settings=new q({getTheme:()=>this.view.effectiveTheme}),this.events=new a,this.activeTooltipInfo=null,this._vertexLaserLineVisualElement=null,this._tooltipCallbacks={onBeforeReshape:()=>this.tool.endDrag(),onReshapeStart:()=>this._updateEventState(Ce.RESHAPING),onReshape:()=>this.events.emit("reshape",{type:"reshape",object:this.object}),onReshapeStop:()=>this._updateEventState(Ce.NONE,{forceEnd:!0}),onMoveStart:()=>this._updateEventState(Ce.MOVING),onMove:()=>this.events.emit("move",{type:"move",object:this.object,dx:0,dy:0}),onMoveStop:()=>this._updateEventState(Ce.NONE,{forceEnd:!0})}}initialize(){const{view:e}=this,t=this._settings.manipulators,i=t.vertex;this.tooltipInfos=oe(this._sketchOptions,e),this._vertexManipulatorMaterial=P(n(i.color),i.renderOccluded),this._vertexManipulatorOutlineMaterial=L(n(i.outlineColor),i.renderOccluded),this._vertexManipulatorHoverOutlineMaterial=L(n(i.hoverOutlineColor),i.renderOccluded);const a=t.edge;this._edgeManipulatorMaterial=P(n(a.color),a.renderOccluded),this._edgeManipulatorOutlineMaterial=L(n(a.outlineColor),a.renderOccluded);const o=t.edgeOffset;this._edgeOffsetManipulatorMaterial=P(n(o.color),o.renderOccluded,!1),this._edgeOffsetManipulatorHoverMaterial=P(n(o.hoverColor),o.renderOccluded,!1);const s=t.selected;this._selectedManipulatorMaterial=P(n(s.color),s.renderOccluded),this._selectedManipulatorOutlineMaterial=L(n(s.outlineColor),s.renderOccluded),this._selectedManipulatorHoverOutlineMaterial=L(n(s.hoverOutlineColor),s.renderOccluded),this.tooltip=ye((()=>({view:e,options:this._sketchOptions.tooltips}))),this.addHandles([h((()=>{const e=this._settings.manipulators;return{vertexSettings:e.vertex,edgeSettings:e.edge,edgeOffsetSettings:e.edgeOffset,selectedSettings:e.selected}}),(({vertexSettings:e,edgeSettings:t,edgeOffsetSettings:i,selectedSettings:n})=>{e.applyColor(this._vertexManipulatorMaterial),e.applyOutline(this._vertexManipulatorOutlineMaterial),e.applyHoverOutline(this._vertexManipulatorHoverOutlineMaterial),t.applyColor(this._edgeManipulatorMaterial),t.applyOutline(this._edgeManipulatorOutlineMaterial),i.applyColor(this._edgeOffsetManipulatorMaterial),i.applyHover(this._edgeOffsetManipulatorHoverMaterial),n.applyColor(this._selectedManipulatorMaterial),n.applyOutline(this._selectedManipulatorOutlineMaterial),n.applyHoverOutline(this._selectedManipulatorHoverOutlineMaterial)})),h((()=>this.object.visible),(e=>{for(const t of this._manipulatorInfos)t.manipulator.available=e,Ae(t)&&(t.edgeManipulator.available=e)})),h((()=>this._numGrabbing+this._numDragging===0),(e=>this._toggleAutoHideManipulators(e))),h((()=>({labels:this._segmentLabels,enabled:this._sketchOptions.labels.enabled,edgeOffsetEnabled:this.enableEdgeOffset})),(({labels:e,enabled:t,edgeOffsetEnabled:i})=>{null!=e&&(e.visible=t,e.edgeDistance=i?"far":"default")}),c),se(this.tooltip,this.object,(()=>this._tooltipsContext)),h((()=>this.tooltip.mode),((e,t)=>{"input"===t&&"input"!==e&&this._resetTooltip()})),u((()=>this._operations),"vertex-update",(e=>this._updateManipulatorPositions(e.vertices)),{onListenerAdd:()=>this._recreateManipulators()}),u((()=>this._operations?.data),"change",(e=>{"undo"!==e.operation&&"redo"!==e.operation||this._recreateManipulators()}))])}destroy(){this._removeManipulators(),this._updatingHandles.destroy(),this._segmentLabels=p(this._segmentLabels),this.tooltip=p(this.tooltip)}get updating(){return this._updatingHandles.updating}get manipulators(){return this.tool.manipulators}get view(){return this.tool.view}get object(){return this.tool.object}get enableZShape(){return this.tool.enableZShape}get enableDeleteVertices(){return this.tool.enableDeleteVertices}get enableZVertex(){return this.tool.enableZVertex}get autoHideManipulators(){return this.tool.autoHideManipulators}get enableMoveObject(){return this.tool.enableMoveObject}get enableMidpoints(){return this.tool.enableMidpoints}get enableEdgeOffset(){return this.tool.enableEdgeOffset}get _sketchOptions(){return this.tool.sketchOptions}get _accentColor(){return this.view.effectiveTheme.accentColor}enterInputModeIfAvailable(e){return"key-down"===e.type&&e.key===be.enterInputMode&&("reshape-edge-offset"===this.activeTooltipInfo?.type?this._enterInputModeDuringEdgeOffset(e):!!je(e,this.tooltip)&&(this.tool.endDrag(),!0))}removeSelectedVertices(){const e=this._manipulatorInfos.filter((e=>e.manipulator.selected&&"vertex"===e.type));return this._removeVertices(e),e.length}onManipulatorSelectionChanged(){this.events.emit("manipulators-changed")}_removeManipulators(){this._manipulatorHandles.removeAll(),this._moveManipulation=p(this._moveManipulation),this._objectMoveManipulation=p(this._objectMoveManipulation),this.manipulators.removeAll(),this._manipulatorInfos=[],this._numGrabbing=0,this._numDragging=0}_createManipulators(e){if(null==this._operations)return;const t=this.object.elevationInfo;for(const i of this._operations.data.components){const n=e?.byComponentIndex.get(i.index);for(const e of i.vertices){const i=n?.has(e.index);this._createVertexOrEdgeManipulator(e,t,i)}for(const e of i.edges)this._createVertexOrEdgeManipulator(e,t)}this._createObjectMoveManipulation(),this._createMoveManipulation(t),this._createVisualElements()}get canRedo(){return null!=this._operations&&this._operations.canRedo}get canUndo(){return null!=this._operations&&this._operations.canUndo}redo(){return this._operations?.redo()}undo(){return this.events.emit("undo"),this._operations?.undo()}_recreateManipulators(){if(!this._recreatingManipulators){if(this._recreatingManipulators=!0,this._removeManipulators(),this._resetTooltip(),this._operations&&this._segmentLabels?.context?.editGeometryOperations===this._operations||(this._segmentLabels=p(this._segmentLabels)),this._createManipulators(),!this._segmentLabels&&this._operations){const e=this._sketchOptions.labels;this._segmentLabels=new U({context:{view:this.view,editGeometryOperations:this._operations,elevationInfo:this.object.elevationInfo,labelOptions:e},visible:e.enabled})}this._recreatingManipulators=!1}}_perObjectManipulatorDragAction(e,t){if("end"===t.action)return t;let i=0;const n=[],a=this._manipulatorInfos.some((e=>"vertex"===e.type&&e.manipulator.selected)),o=e===Ne.SELECTED_OR_ALL&&a;for(const s of this._manipulatorInfos)"vertex"===s.type&&(s.manipulator.grabbing||o&&!s.manipulator.selected||n.push(s),i++);this._moveVertices(n,t);if(n.length===i){if(this._updateEventState(Ce.MOVING),this.destroyed)return t;this.events.emit("move",{type:"move",dx:t.screenDeltaX,dy:t.screenDeltaY,object:this.object})}else{if(this._updateEventState(Ce.RESHAPING),this.destroyed)return t;this.events.emit("reshape",{type:"reshape",object:this.object})}return t}_toggleAutoHideManipulators(e){this.autoHideManipulators&&(e?this.removeHandles(Ie):this.tool.manipulators.forEach((({manipulator:e})=>{const t=e.disableDisplay?.();t&&this.addHandles(t,Ie)})))}_isMultiVertexSelection(){return this._manipulatorInfos.reduce(((e,t)=>"vertex"===t.type&&t.manipulator.selected?e+1:e),0)>1}_perVertexManipulatorDragAction(e){if(this._updateEventState(Ce.RESHAPING),this.destroyed)return;const{mapDeltaX:t,mapDeltaY:i,mapDeltaZ:n}=e;if(!t&&!i&&!n)return;const a=[];for(const o of this._manipulatorInfos)"vertex"===o.type&&(o.manipulator.selected&&!o.manipulator.grabbing||o===e.info)&&a.push(o);this._moveVertices(a,e,xe.ACCUMULATE_STEPS),this.events.emit("reshape",{type:"reshape",object:this.object})}_updateEventState(e,t={}){if(e===this._reshapeEventState)return!1;switch(e){case Ce.NONE:if(!t.forceEnd&&(0!==this._numGrabbing||0!==this._numDragging))return!1;switch(this._reshapeEventState){case Ce.MOVING:this.events.emit("move",{type:"move-stop",dx:0,dy:0,object:this.object});break;case Ce.RESHAPING:this.events.emit("reshape",{type:"reshape-stop",object:this.object})}break;case Ce.MOVING:switch(this._reshapeEventState){case Ce.NONE:this.events.emit("move",{type:"move-start",dx:0,dy:0,object:this.object});break;case Ce.RESHAPING:this.events.emit("reshape",{type:"reshape-stop",object:this.object}),this.destroyed||this.events.emit("move",{type:"move-start",dx:0,dy:0,object:this.object})}break;case Ce.RESHAPING:switch(this._reshapeEventState){case Ce.NONE:this.events.emit("reshape",{type:"reshape-start",object:this.object});break;case Ce.MOVING:this.events.emit("move",{type:"move-stop",dx:0,dy:0,object:this.object}),this.destroyed||this.events.emit("reshape",{type:"reshape-start",object:this.object})}}if(this.destroyed)return!1;const i=this._reshapeEventState!==e;return this._reshapeEventState=e,i}_createObjectMoveManipulation(){const{tool:e,view:t,object:i,_operations:n}=this;if(n){if(this._objectMoveManipulation=new Q({tool:e,view:t,object:i}),this.enableMoveObject){let e=null;this._manipulatorHandles.add(this._objectMoveManipulation.createDragPipeline(((t,i,a)=>{i.next((e=>this._trackNumDragging(e))).next((t=>("start"===t.action&&(e=n.createUndoGroup()),t))).next((e=>this._perObjectManipulatorDragAction(Ne.ALL,e))).next((e=>(this._updateTranslateObjectTooltip(K.XY,e),e))).next((t=>{"end"===t.action&&(this._resetTooltip(),e=d(e))})),a.next((()=>this._onDragCancel(!0,(()=>e=d(e)))))}))),this._objectMoveManipulation.forEachManipulator((e=>this._manipulatorHandles.add(this._watchAndUpdateGrabState(e,!1))))}else this._objectMoveManipulation.forEachManipulator((e=>{e.grabbable=!1,e.cursor=null}));this._objectMoveManipulation.forEachManipulator((e=>this._manipulatorHandles.add(e.events.on("immediate-click",(e=>{this._manipulatorInfos.some((e=>e.manipulator.selected))?this._clearSelection():this.events.emit("immediate-click",{...e,object:this.object}),e.stopPropagation()})))))}}_createMoveManipulation(e){const{object:t,tool:i,view:n,_operations:a}=this;if(!a)return;this._moveManipulation=new J({tool:i,view:n,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:this.enableZShape&&Y(t.operations,t.elevationInfo),snapToScene:!1,radius:J.radiusForSymbol(t.graphic?.symbol)}),this._moveManipulation.forEachManipulator((e=>this.addHandles([e.events.on("immediate-click",(t=>{this._moveManipulation.zManipulation.hasManipulator(e)||this._manipulatorInfos.some((e=>e.manipulator.selected))||this.events.emit("immediate-click",{...t,object:this.object}),t.stopPropagation()})),this._watchAndUpdateGrabState(e,!1)])));const o=e=>t=>{this.addHandles([t.events.on("focus-changed",(({action:t})=>{"focus"===t?this._updateTranslateTooltip(e):this._resetTooltip()}))])};this._moveManipulation.xyManipulation.forEachManipulator(o(K.XY)),this._moveManipulation.xyAxisManipulation.forEachManipulator(o(K.XY_AXIS)),this._moveManipulation.zManipulation.forEachManipulator(o(K.Z)),this._moveManipulation.elevationInfo={mode:"absolute-height",offset:0};const s=a.data.spatialReference;this.addHandles([this._moveManipulation.createDragPipeline(((n,o,s,r,l)=>{const{snappingStep:p,cancelSnapping:d}=Oe({predicate:e=>!!e.info,snappingManager:i.snappingManager,snappingContext:new Ee({editGeometryOperations:a,elevationInfo:e,pointer:l,excludeFeature:t.graphic,visualizer:new k}),updatingHandles:this._updatingHandles,useZ:!1});return r=r.next((e=>(this._onDragCancel(),e))).next(d),{steps:s=s.next((e=>this._trackNumDragging(e))).next((e=>{const t=this._manipulatorInfos.filter((e=>"vertex"===e.type&&e.manipulator.selected));return e.manipulatorType===X.TRANSLATE_XY&&1===t.length?{...e,info:t[0],snapOrigin:t[0].handle.pos}:e})).next(ce(this.view,e,t.graphic??void 0)).next(...p).next(fe()).next((e=>this._perObjectManipulatorDragAction(Ne.SELECTED_OR_ALL,e))).next((e=>(this._updateTranslateTooltip(n,e),e))),cancel:r}}),e,s,t.graphic),h((()=>t.visible),(()=>this._updateMoveManipulationPosition()),c),t.on("committed",(()=>{this._recreatingManipulators||this._updateMoveManipulationPosition()})),h((()=>t.isDraped),(e=>{this._updateMoveManipulationPosition();const t="align-move-manipulation";e?this.addHandles(this.view.elevationProvider.on("elevation-change",(()=>this._updateMoveManipulationPosition())),t):this.removeHandles(t)}),c)])}_createVisualElements(){const{object:e,view:t}=this,i=B({view:t,object:e,forEachManipulator:e=>{if(!this.destroyed&&!this._recreatingManipulators){this._objectMoveManipulation.forEachManipulator(e),this._moveManipulation.forEachManipulator(e);for(const t of this._manipulatorInfos)e(t.manipulator,X.TRANSLATE_XY)}},onManipulatorsChanged:e=>this.events.on("manipulators-changed",e)});null!=i&&(this._outlineVisualElement=i.visualElement instanceof pe?i.visualElement:null);const n=this._outlineVisualElement;if(null!=n){const t=()=>{e.isDraped||this._updateMoveManipulationPosition()};this._manipulatorHandles.add(u((()=>n.events),"attachment-origin-changed",t,{onListenerAdd:t}))}this._manipulatorHandles.add(i)}_createEdgeOffsetManipulator(e,t=this.object.elevationInfo){const i=this.view,n=this._operations;if(e.component.vertices.length<=2||!n)return null;const a=n.data.spatialReference,o=this._settings.manipulators.edgeOffset,r=o.size/2,l=r+o.collisionPadding,p=r/l,d=p/2,h=p*Math.sqrt(3)/2,{height:u,offset:c}=o,f=this._edgeOffsetManipulatorMaterial;if(!this._edgeOffsetManipulatorGeometryInside){const e=de(f,h,d,d,u,c);this._edgeOffsetManipulatorGeometryInside=e}if(!this._edgeOffsetManipulatorGeometryOutside){const e=de(f,-h,d,d,u,-c);this._edgeOffsetManipulatorGeometryOutside=e}const m=[new N(this._edgeOffsetManipulatorGeometryInside.instantiate(),ve.Unfocused),new N(this._edgeOffsetManipulatorGeometryInside.instantiate({material:this._edgeOffsetManipulatorHoverMaterial}),ve.Focused),new N(this._edgeOffsetManipulatorGeometryOutside.instantiate(),ve.Unfocused),new N(this._edgeOffsetManipulatorGeometryOutside.instantiate({material:this._edgeOffsetManipulatorHoverMaterial}),ve.Focused)],g=new D({view:i,renderObjects:m,elevationInfo:"on-the-ground"!==t.mode||G(this.object.graphic?.symbol)?{mode:"absolute-height",offset:0}:t,worldOriented:!1,focusMultiplier:1,radius:l,available:this.object.visible,collisionType:{type:"disc",direction:I(0,0,1)},collisionPriority:1,metadata:{deleting:!1},location:Te(a)}),_=new D({view:i,worldSized:!0,worldOriented:!1,available:this.object.visible,collisionPriority:-10,cursor:this.enableMoveObject?"move":"default",metadata:{deleting:!1},location:Te(a)}),v={manipulator:g,handle:e,locationUpdateHandle:null,type:"edge",selectedIndex:0,edgeManipulator:_,visibilityHandle:null};this._autoHideEdgeOffsetManipulator(v,o.minSquaredEdgeLength);const M=()=>this._updateEdgeOffsetManipulator(v);M(),v.locationUpdateHandle=s([e.leftVertex,e.rightVertex].map((e=>{const t=this._getManipulatorInfoFromHandle(e);return t?.manipulator.events.on("location-update",M)})));const b=e=>{this._manipulatorInfos.some((e=>e.manipulator.selected))?this._clearSelection():this.events.emit("immediate-click",{...e,object:this.object}),e.stopPropagation()};return this._manipulatorHandles.add([v.locationUpdateHandle,this._watchAndUpdateGrabState(g,!0),this._watchAndUpdateGrabState(_,!0),me(g,this._createEdgeOffsetPipeline(v,t,n)),me(_,this._createEdgePipeline(v,t,n)),_.events.on("immediate-click",b),g.events.on("immediate-click",b),g.events.on("focus-changed",(()=>this._resetTooltip())),g.events.on("grab-changed",(({screenPoint:e,action:t})=>{v.grabMapPoint="start"===t?$(e,this.view,this.object,v):null}))],g),this._manipulatorInfos.push(v),this.manipulators.addMany([g,_]),this.events.emit("manipulators-changed"),v}_autoHideEdgeOffsetManipulator(e,t){const i=e.manipulator,n=e.edgeManipulator,a=()=>{e.visibilityHandle=d(e.visibilityHandle);const a=this._getManipulatorInfoFromHandle(e.handle.leftVertex),o=this._getManipulatorInfoFromHandle(e.handle.rightVertex),l=null!=a&&null!=o&&ne(a.manipulator.renderLocation,o.manipulator.renderLocation,this.view.state.camera)<t;(!i.focused&&!n.focused||l)&&(i.grabbable=!l,n.grabbable=!l,e.visibilityHandle=s([i.disableDisplay(),r((()=>{i.grabbable=!0,n.grabbable=this.enableMoveObject}))]))};this._manipulatorHandles.add([i.events.on("focus-changed",a),n.events.on("focus-changed",a),r((()=>{d(e.visibilityHandle),n.metadata.deleting=!0,this.manipulators.remove(n)}))],i),a()}_updateEdgeOffsetManipulator(e){if(!this._operations)return;this._updateManipulatorPosition(e);const{coordinateHelper:t}=this._operations.data,i=ee(this.view,e.manipulator.elevationAlignedLocation,te(t,e.handle,e.manipulator.elevationInfo)),n=this._getManipulatorInfoFromHandle(e.handle.leftVertex),a=this._getManipulatorInfoFromHandle(e.handle.rightVertex);if(null==n||null==a)return;const o=n.manipulator.renderLocation,s=a.manipulator.renderLocation,r=null!=i?ie(i,o,s):M;e.manipulator.modelTransform=r,e.edgeManipulator.elevationAlignedLocation=e.manipulator.elevationAlignedLocation,e.edgeManipulator.modelTransform=r;const l=b(x(De,o,s))/2;e.edgeManipulator.collisionType={type:"line",paths:[[[-l,0,0],[l,0,0]]]}}_createEdgePipeline(e,t,i){return(n,a,o,s)=>{if("touch"===s){this._createEdgeOffsetPipeline(e,t,i)(n,a,o)}else if(this.enableMoveObject){const e=this.object.graphic,s=i.data.spatialReference,{elevationAlignedLocation:r}=n;a.next((e=>this._trackNumDragging(e))).next(ge(this.view,r)).next(R(this.view,r,t,s,e)).next(_e()).next(fe()).next((e=>this._perObjectManipulatorDragAction(Ne.ALL,e))).next((e=>(this._updateTranslateObjectTooltip(K.XY,e),e))).next((e=>{"end"===e.action&&this._resetTooltip()})),o.next((()=>this._onDragCancel(!n.metadata.deleting)))}}}_createEdgeOffsetPipeline(e,t,i){return(n,a,o)=>{const s=this._pendingEdgeOffsetInfo;if(s?.manipulatorInfo===e&&"drag"!==s.mode)return void o.execute({action:"cancel"});this._clearSelection();const{initializeStep:r,cleanup:l}=this._initializeEdgeOffset(e,t,i,o),p=this._applyEdgeOffsetStep(e);a.next((e=>this._trackNumDragging(e))).next(ge(this.view,n.elevationAlignedLocation)).next(r).next(z(this.view)).next(F(this.view,i.data.spatialReference)).next(fe()).next(He()).next((e=>this._pendingEdgeOffsetInfo?e:p(e))).next((e=>{"end"!==e.action||this._pendingEdgeOffsetInfo||l()})),o.next((()=>{this._exitEdgeOffsetInputMode(),n.metadata.deleting||(l(),this._onDragCancel())}))}}_initializeEdgeOffset(e,t,i,n){const{view:a,object:o}=this,r=te(i.data.coordinateHelper,e.handle,t),l=i.createUndoGroup(),p=ee(a,e.manipulator.elevationAlignedLocation,r);let h;this._splitEdgesBeforeEdgeOffset(e,r),this._selectEdgeOffsetArrow(e,r);const u=()=>{this._cleanEdgeOffsetCollapsedEdges(e,i),h=d(h)},c=this.events.on("undo",u);return h=s([this._initializeEdgeOffsetVisualElement(e,o,t,i),l,c,this._connectEdgeOffsetTooltip(e,r,i,(()=>{n.execute({action:"cancel"})}))]),{initializeStep:e=>null==r||null==p?(u(),null):{...e,operation:r,plane:p},cleanup:u}}_initializeEdgeOffsetVisualElement(e,t,i,a){const o=()=>new V({paths:[[e.handle.leftVertex.pos,e.handle.rightVertex.pos]],spatialReference:a.data.spatialReference}),r=new pe({view:this.view,isDraped:t.isDraped,geometry:o(),elevationInfo:i,width:this._settings.visualElements.lineObjects.outline.width,attached:!1,isDecoration:!0}),p=s([h((()=>({color:this._accentColor,draped:t.isDraped})),(({color:e,draped:t})=>{r.color=n(e),r.isDraped=t}),f),t.on("committed",(()=>{r.geometry=o()})),l(r)]);return r.attached=!0,p}_applyEdgeOffsetStep(e){return t=>(this.destroyed||null==t.operation||!this._operations||(this._updateEventState(Ce.RESHAPING),null==t.signedDistance?this._resetTooltip():((t.mapDeltaX||t.mapDeltaY||t.mapDeltaZ)&&(this._offsetEdge(e,t.operation,t.signedDistance),this.events.emit("reshape",{type:"reshape",object:this.object})),this._updateEdgeOffsetTooltip(t))),t)}_cleanEdgeOffsetCollapsedEdges(e,t){const i=e.handle.leftVertex.leftEdge?.leftVertex,n=e.handle.leftVertex,a=e.handle.rightVertex.rightEdge?.rightVertex,o=e.handle.rightVertex,s=t.data.coordinateHelper,r=this.view.pixelSizeAt(s.vectorToDehydratedPoint(n.pos),s.spatialReference),l=[];if(i&&s.distance(i.pos,n.pos)<Pe){const e=this._getManipulatorInfoFromHandle(n);null!=e&&l.push(e)}if(s.distance(n.pos,o.pos)<r||a&&s.distance(a.pos,o.pos)<Pe){const e=this._getManipulatorInfoFromHandle(o);null!=e&&l.push(e)}l.length&&this._removeVertices(l)}_enterInputModeDuringEdgeOffset(e){const t=this._findActiveEdgeOffsetManipulatorInfo();return!!t&&(!!je(e,this.tooltip)&&(t.manipulator.dragging?(this._pendingEdgeOffsetInfo={manipulatorInfo:t,mode:"drag"},!0):(this._clearSelection(),this._pendingEdgeOffsetInfo={manipulatorInfo:t,mode:"hover"},this._connectEdgeOffsetTooltipOnHover(t),!0)))}_exitEdgeOffsetInputMode(){this.tooltip&&(this._pendingEdgeOffsetInfo=null,this._resetTooltip(),this.tooltip.exitInputMode())}_findActiveEdgeOffsetManipulatorInfo(){return this._manipulatorInfos.filter(Ae).find((({manipulator:e})=>e.hovering||e.grabbing||e.dragging))}_connectEdgeOffsetTooltipOnHover(e){const{_operations:t,object:i}=this;if(!t)return;const{elevationInfo:n}=i,a=te(t.data.coordinateHelper,e.handle,n);this._selectEdgeOffsetArrow(e,a),this.addHandles([this._initializeEdgeOffsetVisualElement(e,i,n,t),this._connectEdgeOffsetTooltip(e,a,t,(()=>{this.removeHandles(a),this._exitEdgeOffsetInputMode()}))],a)}_splitEdgesBeforeEdgeOffset(e,t){if(t.requiresSplitEdgeLeft){const t=this._getManipulatorInfoFromHandle(e.handle.leftVertex.leftEdge);null!=t&&this._splitEdgeManipulator(t,1)}if(t.requiresSplitEdgeRight){const t=this._getManipulatorInfoFromHandle(e.handle.rightVertex.rightEdge);null!=t&&this._splitEdgeManipulator(t,0)}}_selectEdgeOffsetArrow(e,t){const i=e.grabMapPoint??$(this.view.inputManager?.latestPointerLocation,this.view,this.object,e);i&&t.selectArrowFromStartPoint(i)}_connectEdgeOffsetTooltip(e,t,i,n){const a=()=>this.tooltipInfos.edgeOffset.distance.actual,o=a=>{n(),queueMicrotask((()=>{this.view.focus();const n=i.createUndoGroup();this._tooltipCallbacks.onReshapeStart?.(),this._splitEdgesBeforeEdgeOffset(e,t),this._offsetEdge(e,t,ae(a,e.manipulator.location,t,i)),this._tooltipCallbacks.onReshape?.(),this._tooltipCallbacks.onReshapeStop?.(),this._cleanEdgeOffsetCollapsedEdges(e,i),n.remove()}))},r=()=>{const e=a();null!=e?o(e):n()};return s([m((()=>this.tooltip&&!this.tooltip.focused),(()=>r()),g),this.tooltip.on("discard",n),this.tooltip.on("commit",(e=>{"commit-and-exit"===e.type&&r()}))])}_createVertexOrEdgeManipulator(e,t=this.object.elevationInfo,i=!1){const n=this.view,a=this._operations,o=this._settings;if(!a)return null;const r=a.data.type,l=a.data.spatialReference;if("edge"===e.type){if(this.enableEdgeOffset)return this._createEdgeOffsetManipulator(e,t);if(!this.enableMidpoints)return null}if(null==this._vertexManipulatorGeometry||null==this._vertexManipulatorOutlineGeometry){const{size:e,outlineSize:t}=we(o.manipulators.vertex);this._vertexManipulatorGeometry=he(this._vertexManipulatorMaterial,e,16,16),this._vertexManipulatorOutlineGeometry=he(this._vertexManipulatorOutlineMaterial,t,16,16)}if(null==this._edgeManipulatorGeometry||null==this._edgeManipulatorOutlineGeometry){const{size:e,outlineSize:t}=we(o.manipulators.edge);this._edgeManipulatorGeometry=he(this._edgeManipulatorMaterial,e,16,16),this._edgeManipulatorOutlineGeometry=he(this._edgeManipulatorOutlineMaterial,t,16,16)}const p="point"===r||"mesh"===r?[]:[new N(this._vertexManipulatorGeometry.instantiate(),Le.Vertex|ve.Unselected),new N(this._vertexManipulatorOutlineGeometry.instantiate(),Le.Vertex|ve.Unfocused|ve.Unselected),new N(this._vertexManipulatorOutlineGeometry.instantiate({material:this._vertexManipulatorHoverOutlineMaterial}),Le.Vertex|ve.Focused|ve.Unselected),new N(this._vertexManipulatorGeometry.instantiate({material:this._selectedManipulatorMaterial}),ve.Selected),new N(this._vertexManipulatorOutlineGeometry.instantiate({material:this._selectedManipulatorOutlineMaterial}),ve.Selected|ve.Unfocused),new N(this._vertexManipulatorOutlineGeometry.instantiate({material:this._selectedManipulatorHoverOutlineMaterial}),ve.Selected|ve.Focused)];this.enableMidpoints&&p.push(new N(this._edgeManipulatorGeometry.instantiate({material:this._vertexManipulatorMaterial}),Le.Edge|ve.Focused|ve.Unselected),new N(this._edgeManipulatorOutlineGeometry.instantiate({material:this._vertexManipulatorHoverOutlineMaterial}),Le.Edge|ve.Focused|ve.Unselected),new N(this._edgeManipulatorGeometry.instantiate(),Le.Edge|ve.Unfocused|ve.Unselected),new N(this._edgeManipulatorOutlineGeometry.instantiate(),Le.Edge|ve.Unfocused|ve.Unselected));const h=new D({view:n,renderObjects:p,elevationInfo:t,focusMultiplier:1,touchMultiplier:1,available:this.object.visible,metadata:{deleting:!1},location:Te(l)});h.selected=i,this._setTypeSpecificManipulatorSettings(h,e,t);const u="edge"===e.type?{manipulator:h,handle:e,locationUpdateHandle:null,type:"edge",selectedIndex:0}:{manipulator:h,handle:e,type:"vertex",selectedIndex:0};if(this._manipulatorInfos.push(u),this.manipulators.add(h),this._updateManipulatorPosition(u),"edge"===u.type){const e=[];for(const t of[u.handle.leftVertex,u.handle.rightVertex]){const i=this._getManipulatorInfoFromHandle(t);null!=i&&e.push(i.manipulator.events.on("location-update",(()=>this._updateManipulatorPosition(u))))}u.locationUpdateHandle=s(e),this._manipulatorHandles.add(u.locationUpdateHandle,h)}this._manipulatorHandles.add(this._watchAndUpdateGrabState(h,!0),h);const c=me(h,((e,i,o,s)=>{let r=null;const{snappingStep:p,cancelSnapping:h}=Oe({predicate:()=>!this._isMultiVertexSelection(),snappingManager:this.tool.snappingManager,snappingContext:new Ee({editGeometryOperations:a,elevationInfo:t,pointer:s,excludeFeature:this.object.graphic,visualizer:new k}),updatingHandles:this._updatingHandles,useZ:!1});o=o.next((t=>(this._onDragCancel(!e.metadata.deleting,(()=>r=d(r))),t))).next(h);const{elevationAlignedLocation:c}=e,f=this.object.graphic??void 0;i.next((e=>this._trackNumDragging(e))).next((e=>{if("start"===e.action&&a&&(r=a.createUndoGroup()),"edge"===u.type){const t=this._splitEdgeManipulator(u);return{...e,info:t,snapOrigin:t.handle.pos}}return{...e,info:u,snapOrigin:u.handle.pos}})).next(ge(n,c)).next(R(n,c,t,l,f)).next(ce(n,t,f)).next(...p).next(fe()).next((e=>{this._perVertexManipulatorDragAction(e),"end"===e.action&&(r=d(r)),this._resetTooltip()}))}));return this._manipulatorHandles.add([c,h.events.on("immediate-click",(e=>this._manipulatorClickCallback(e,u))),h.events.on("select-changed",(()=>{u.selectedIndex=++this._selectedIndex,this._updateMoveManipulationPosition(),this._resetTooltip()})),h.events.on("focus-changed",(()=>{this._resetTooltip()}))],h),this.events.emit("manipulators-changed"),u}_trackNumDragging(e){switch(e.action){case"start":this._numDragging++;break;case"end":this._numDragging--}return e}_onDragCancel(e=!0,t){switch(this._numDragging--,e&&this.undo(),this.tool.snappingManager?.doneSnapping(),this._resetTooltip(),this._reshapeEventState){case Ce.NONE:break;case Ce.MOVING:this.events.emit("move",{type:"move",dx:0,dy:0,object:this.object});break;case Ce.RESHAPING:this.events.emit("reshape",{type:"reshape",object:this.object})}t?.(),this.destroyed||this._updateEventState(Ce.NONE)}_setTypeSpecificManipulatorSettings(e,t,i){const n=this._settings;switch(t.type){case"vertex":{e.state=Le.Vertex,e.selectable=!0,e.cursor="move",e.collisionPriority=2;const{size:t,collisionPadding:a}=n.manipulators.vertex;e.radius=t/2+a,e.elevationInfo=i;const o=this._operations?.data.type;e.interactive=null!=o&&"point"!==o&&"mesh"!==o;break}case"edge":{e.state=Le.Edge,e.selectable=!1,e.cursor="copy",e.collisionPriority=-1;const{size:t,collisionPadding:a}=n.manipulators.edge;e.radius=t/2+a,e.elevationInfo="on-the-ground"!==i.mode||G(this.object.graphic?.symbol)?{mode:"absolute-height",offset:0}:i;break}}}_watchAndUpdateGrabState(e,t){return e.events.on("grab-changed",(i=>{this._onGrabStateChanged(e,t,i.action,i.pointerType)}))}_onGrabStateChanged(e,t,i,n="mouse"){if(!this._recreatingManipulators){if("start"===i)t&&this._updateSelection(e),this._numGrabbing++;else if(this._numGrabbing--,this._updateEventState(Ce.NONE),this.destroyed)return;this._moveManipulation.interactive=!this._numGrabbing,("touch"!==n||this.enableEdgeOffset)&&(this._manipulatorInfos.forEach((e=>{const{manipulator:t}=e,i=this._operations?.data.type;t.interactive=t.grabbing||!this._numGrabbing&&null!=i&&"point"!==i&&"mesh"!==i,Ae(e)&&(e.edgeManipulator.interactive=e.edgeManipulator.grabbing||!this._numGrabbing)})),this._objectMoveManipulation.forEachManipulator((e=>{e.interactive=e.grabbing||!this._numGrabbing})))}}_clearSelection(){for(const e of this._manipulatorInfos)e.manipulator.grabbing||(e.manipulator.selected=!1);this._pendingEdgeOffsetInfo=null}_updateSelection(e){e.grabbing&&!e.selected&&e.selectable&&(this._clearSelection(),e.selected=!0,this.events.emit("manipulators-changed"))}_removeManipulator(e){null!=e&&(e.manipulator.metadata.deleting=!0,this.manipulators.remove(e.manipulator),this._manipulatorHandles.remove(e.manipulator),i(this._manipulatorInfos,e),this.events.emit("manipulators-changed"),this._resetTooltip())}_getManipulatorInfoFromHandle(e){if(e)for(const t of this._manipulatorInfos)if(e===t.handle)return t;return null}_updateManipulatorPositions(e){for(const t of e)this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(t))}_updateManipulatorPosition(e){const t=this._operations;if(null!=e&&t)if("vertex"===e.type)e.manipulator.location=t.data.coordinateHelper.vectorToDehydratedPoint(e.handle.pos,Ge),e.manipulator.grabbing&&null!=this._vertexLaserLineVisualElement&&(this._vertexLaserLineVisualElement.visualElement.intersectsWorldUpAtLocation=e.manipulator.renderLocation);else if("edge"===e.type){const i=this._getManipulatorInfoFromHandle(e.handle.leftVertex),n=this._getManipulatorInfoFromHandle(e.handle.rightVertex);if(null==i||null==n)return;const a=i.manipulator,o=n.manipulator;if("on-the-ground"===e.manipulator.elevationInfo?.mode){const i=a.location,n=o.location,s=.5,r=i.x+s*(n.x-i.x),l=i.y+s*(n.y-i.y),p=i.hasZ&&n.hasZ?0:void 0;e.manipulator.location=A(r,l,p,t.data.spatialReference)}else E(De,a.renderLocation,o.renderLocation,.5),e.manipulator.renderLocation=De}}_splitEdgeManipulator(e,t=.5){const i=this._operations,n=i.splitEdge(e.handle,t).createdVertex;e.locationUpdateHandle=d(e.locationUpdateHandle);const a=this.object.elevationInfo;let o;this.enableEdgeOffset?(this._removeManipulator(e),o=this._createVertexOrEdgeManipulator(n)):(o=e,o.handle=n,o.type="vertex",this._setTypeSpecificManipulatorSettings(e.manipulator,e.handle,a)),n.leftEdge&&this._createVertexOrEdgeManipulator(n.leftEdge),n.rightEdge&&this._createVertexOrEdgeManipulator(n.rightEdge),this._updateManipulatorPosition(o),this.enableEdgeOffset||this._resetTooltip(),this._updateSelection(e.manipulator);const s=this._updateEventState(Ce.RESHAPING),r=i.data.coordinateHelper.vectorToArray(o.handle.pos),l=i.data.components.indexOf(n.component);return this.events.emit("vertex-add",{type:"vertex-add",object:this.object,vertices:[{coordinates:r,componentIndex:l,vertexIndex:n.index}],added:r}),s&&this._updateEventState(Ce.NONE),o}_updateMoveManipulationPosition(){const e=O(De,0,0,0);let t=0,i=!1,n=null,a=null;for(const r of this._manipulatorInfos)"vertex"===r.type&&(r.manipulator.selected?(t++,y(e,e,r.manipulator.renderLocation),null==n||r.selectedIndex>n.selectedIndex?(a=n,n=r):(null==a||r.selectedIndex>a.selectedIndex)&&(a=r)):i=!0);const o=this.object,s=this._operations?.data.geometry;if(0===t){const e=o.visible&&this.enableMoveObject;this._moveManipulation.xyManipulation.available=e,this._moveManipulation.xyAxisManipulation.available=e,this._moveManipulation.xyAxisManipulation.orthogonalAvailable=e,this._moveManipulation.zManipulation.available=e&&this.enableZShape&&Y(this._operations,o.elevationInfo),this._moveManipulation.angle=Z(s),this._moveManipulation.radius=J.radiusForSymbol(o.graphic?.symbol)}else{const e=o.visible;this._moveManipulation.xyManipulation.available=e,this._moveManipulation.xyAxisManipulation.available=e,this._moveManipulation.zManipulation.available=e&&this.enableZVertex&&Y(this._operations,this.object.elevationInfo),this._moveManipulation.xyAxisManipulation.orthogonalAvailable=e&&1!==t;let i=0;if(null!=n){const e=n.handle.pos,t=null!=a?a.handle.pos:n.handle.leftEdge?.leftVertex?n.handle.leftEdge.leftVertex.pos:null,o=null==a&&n.handle.rightEdge?.rightVertex?n.handle.rightEdge.rightVertex.pos:null;t&&o?this._moveManipulation.xyAxisManipulation.available=!1:t?i=Ve(t,e):o&&(i=Ve(e,o))}this._moveManipulation.angle=i,this._moveManipulation.radius=W}0!==t&&i?(j(e,e,1/t),Ge.spatialReference=this._operations.data.spatialReference,Ge.hasZ=!0,this.view.renderCoordsHelper.fromRenderCoords(e,Ge),this._moveManipulation.elevationAlignedLocation=Ge):null==this._outlineVisualElement||this.object.isDraped||null==this._outlineVisualElement.attachmentOrigin?C(this._moveManipulation,this.object):this._moveManipulation.elevationAlignedLocation=this._outlineVisualElement.attachmentOrigin}_removeVertices(e){const t=new Array,i=this._operations;if(i){for(const n of e){const e=n.handle.component;if("vertex"===n.type&&i.canRemoveVertex(e)){t.push(n.handle),this._removeManipulator(n),this._removeManipulator(this._getManipulatorInfoFromHandle(n.handle.leftEdge)),this._removeManipulator(this._getManipulatorInfoFromHandle(n.handle.rightEdge));const a=i.removeVertices([n.handle]),o=a.removedVertices?.[0].createdEdge;o?this._createVertexOrEdgeManipulator(o):this.enableEdgeOffset&&e.vertices.length<=2&&this._removeManipulator(this._getManipulatorInfoFromHandle(e.edges[0]))}}if(t.length>0){const e=t.map((e=>{const t=i.data.components.indexOf(e.component);return{coordinates:i.data.coordinateHelper.vectorToArray(e.pos),componentIndex:t,vertexIndex:e.index}})),n=this._updateEventState(Ce.RESHAPING);if(this.destroyed)return;if(this.events.emit("vertex-remove",{type:"vertex-remove",object:this.object,removed:e.map((e=>e.coordinates)),vertices:e}),this.destroyed)return;if(n&&(this._updateEventState(Ce.NONE),this.destroyed))return;this._updateMoveManipulationPosition()}}}_moveVertices(e,t,i=("start"===t.action?xe.NEW_STEP:xe.ACCUMULATE_STEPS)){const n=this._operations;if(n){e.length>0&&n.moveVertices(e.map((e=>e.handle)),t.mapDeltaX,t.mapDeltaY,t.mapDeltaZ,i);for(const t of e)this._updateManipulatorPosition(t)}}_offsetEdge(e,t,i){if(!this._operations)return;const n=t.clone();n.distance=i,this._operations.updateVertices([e.handle.leftVertex,e.handle.rightVertex],n),this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(e.handle.leftVertex)),this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(e.handle.rightVertex))}_manipulatorClickCallback(e,t){e.shiftKey||this._clearSelection(),"vertex"===t.type&&(t.manipulator.selected=!t.manipulator.selected,this.enableDeleteVertices&&e.button===ue.Right&&this._removeVertices([t])),"edge"===t.type&&e.button===ue.Left&&this._splitEdgeManipulator(t),e.stopPropagation()}_updateTranslateTooltip(e,t){null!=this._defaultTooltipInfo?this._resetTooltip():this._updateTranslateObjectTooltip(e,t)}_updateTranslateObjectTooltip(e,t){this._pendingEdgeOffsetInfo||(this.activeTooltipInfo=re(e,t,this._tooltipsContext))}_updateEdgeOffsetTooltip(e){this._pendingEdgeOffsetInfo||(this.activeTooltipInfo=le(this.object,e,this._tooltipsContext))}_resetTooltip(){const e=this.activeTooltipInfo;if(this._pendingEdgeOffsetInfo&&"reshape-edge-offset"===e?.type)return;let t=null;t=this._pendingEdgeOffsetInfo||null!=this._findActiveEdgeOffsetManipulatorInfo()?le(this.object,null,this._tooltipsContext):this._defaultTooltipInfo,t!==e&&(null!=e&&null!=t&&"input"===this.tooltip.mode||(this.activeTooltipInfo=t))}get _defaultTooltipInfo(){const e=this._operations?.data.type;switch(e){case"polyline":case"polygon":return this._selectedVertexManipulatorInfo?this.tooltipInfos.selectedVertex:null;case"point":case"mesh":return this.tooltipInfos.movePoint;default:return null}}get _selectedVertexManipulatorInfo(){const e=this._manipulatorInfos.filter((e=>"vertex"===e.type&&e.manipulator.selected));return 1===e.length?e[0]:null}get _tooltipsContext(){return{sketchOptions:this._sketchOptions,tooltipInfos:this.tooltipInfos,activeTooltipInfo:this.activeTooltipInfo,selectedVertexManipulatorInfo:this._selectedVertexManipulatorInfo,callbacks:this._tooltipCallbacks}}get test(){}};function He(){return e=>{const{operation:t,mapEnd:i}=e;return null==t||null==i?e:{...e,signedDistance:t.signedDistanceToPoint(i)}}}function we(e){const t=e.size/2,i=t+e.collisionPadding;return{size:t/i,outlineSize:(t+e.outlineSize)/i}}function Ve(e,t){return Math.atan2(t[1]-e[1],t[0]-e[0])+Math.PI/2}function Te(e){return new w({x:0,y:0,z:0,spatialReference:e})}function Ae(e){return"edge"===e.type&&"edgeManipulator"in e}e([_()],Se.prototype,"_numGrabbing",void 0),e([_()],Se.prototype,"_numDragging",void 0),e([_()],Se.prototype,"_pendingEdgeOffsetInfo",void 0),e([_()],Se.prototype,"_operations",null),e([_()],Se.prototype,"_segmentLabels",void 0),e([_({constructOnly:!0})],Se.prototype,"tool",void 0),e([_()],Se.prototype,"tooltip",void 0),e([_()],Se.prototype,"activeTooltipInfo",void 0),e([_({readOnly:!0})],Se.prototype,"updating",null),e([_()],Se.prototype,"manipulators",null),e([_()],Se.prototype,"view",null),e([_()],Se.prototype,"object",null),e([_()],Se.prototype,"enableZShape",null),e([_()],Se.prototype,"enableDeleteVertices",null),e([_()],Se.prototype,"enableZVertex",null),e([_()],Se.prototype,"autoHideManipulators",null),e([_()],Se.prototype,"enableMoveObject",null),e([_()],Se.prototype,"enableMidpoints",null),e([_()],Se.prototype,"enableEdgeOffset",null),e([_()],Se.prototype,"_sketchOptions",null),e([_()],Se.prototype,"_accentColor",null),e([_()],Se.prototype,"_tooltipsContext",null),Se=e([v("esri.views.3d.interactive.editingTools.reshape.ReshapeOperation")],Se);const Ge=A(0,0,void 0,T.WGS84),De=S(),Pe=1e-6;var Le,Ce,Ne;!function(e){e.Vertex=Me.Custom1,e.Edge=Me.Custom2}(Le||(Le={})),function(e){e[e.NONE=0]="NONE",e[e.MOVING=1]="MOVING",e[e.RESHAPING=2]="RESHAPING"}(Ce||(Ce={})),function(e){e[e.ALL=0]="ALL",e[e.SELECTED_OR_ALL=1]="SELECTED_OR_ALL"}(Ne||(Ne={}));export{Se as ReshapeOperation};
|
|
5
|
+
import{_ as e}from"../../../../../chunks/tslib.es6.js";import t from"../../../../../core/Accessor.js";import{removeUnordered as i}from"../../../../../core/arrayUtils.js";import{unitRGBAFromColor as n}from"../../../../../core/colorUtils.js";import"../../../../../core/has.js";import a from"../../../../../core/Evented.js";import o from"../../../../../core/Handles.js";import{handlesGroup as s,makeHandle as r,destroyHandle as l}from"../../../../../core/handleUtils.js";import{destroyMaybe as p,removeMaybe as d}from"../../../../../core/maybe.js";import{watch as u,on as h,initial as c,syncAndInitial as m,when as g,sync as f}from"../../../../../core/reactiveUtils.js";import{property as _}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/Logger.js";import{subclass as v}from"../../../../../core/accessorSupport/decorators/subclass.js";import{IDENTITY as M}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{l as b,d as x,m as E,i as O,f as y,g as j}from"../../../../../chunks/vec32.js";import{fromValues as I,create as S}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as H}from"../../../../../core/support/UpdatingHandles.js";import w from"../../../../../geometry/Point.js";import V from"../../../../../geometry/Polyline.js";import A from"../../../../../geometry/SpatialReference.js";import{makeDehydratedPoint as T}from"../../../../../layers/graphics/dehydratedPoint.js";import{isVolumetricSymbol as G}from"../../../../../symbols/support/utils.js";import{Manipulator3D as D}from"../../Manipulator3D.js";import{createManipulatorMaterial as L,createManipulatorOutlineMaterial as P,placeAtObject as U}from"../../manipulatorUtils.js";import{RenderObject as C}from"../../RenderObject.js";import{SegmentLabels3D as N}from"../../SegmentLabels3D.js";import{SnappingVisualizer3D as k}from"../../SnappingVisualizer3D.js";import{screenToMapXYAtLocation as R,screenToRenderPlaneFromEvent as z,convertToMapCoordinates as F}from"../dragEventPipeline3D.js";import{orientation as Z}from"../geometryUtils.js";import{ManipulatorType as X}from"../ManipulatorType.js";import{canMoveZOperations as Y}from"../manipulatorUtils.js";import{Settings as q}from"../settings.js";import{createVisualElements as B}from"../visualElementUtils.js";import{discRadiusSmall as W}from"../manipulations/config.js";import{ManipulationType as K,MoveManipulation as J}from"../manipulations/MoveManipulation.js";import{MoveXYObjectManipulation as Q}from"../manipulations/MoveXYObjectManipulation.js";import{getMapPointAtEdgeOffsetManipulatorElevation as $,createEdgeOffsetIntersectionPlane as ee,createEdgeOffsetOperation as te,edgeOffsetRotationMatrix as ie,screenEdgeLengthSquared as ne,getDistanceInGeometrySR as ae}from"./edgeOffsetUtils.js";import{createTooltipInfos as oe,connectTooltipToManipulatedObject as se,getUpdatedTranslateObjectTooltipInfo as re,getUpdatedEdgeOffsetTooltipInfo as le}from"./reshapeTooltipUtils3D.js";import{OutlineVisualElement as pe}from"../../visualElements/OutlineVisualElement.js";import{createExtrudedTriangle as de,createSphereGeometry as ue}from"../../../webgl-engine/lib/GeometryUtil.js";import{MouseButton as he}from"../../../../input/IViewEvents.js";import{sceneSnappingAtLocation as ce,addMapDelta as me,createManipulatorDragEventPipeline as ge,dragAtLocation as fe,addScreenDelta as _e}from"../../../../interactive/dragEventPipeline.js";import{ManipulatorStateFlags as ve,ManipulatorStateCustomFlags as Me}from"../../../../interactive/interfaces.js";import{tooltipKeys as be}from"../../../../interactive/keybindings.js";import{AccumulationBehavior as xe}from"../../../../interactive/editGeometry/interfaces.js";import{SnappingContext as Ee}from"../../../../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as Oe}from"../../../../interactive/snapping/SnappingDragPipelineStep.js";import{makeTooltip as ye,enterInputModeIfAvailable as je}from"../../../../interactive/tooltip/tooltipCommonUtils.js";const Ie=Symbol();let Se=class extends t{get _operations(){return this.object.operations}constructor(e){super(e),this._selectedIndex=0,this._manipulatorHandles=new o,this._manipulatorInfos=[],this._numGrabbing=0,this._numDragging=0,this._reshapeEventState=Ue.NONE,this._pendingEdgeOffsetInfo=null,this._updatingHandles=new H,this._recreatingManipulators=!1,this._settings=new q({getTheme:()=>this.view.effectiveTheme}),this.events=new a,this.activeTooltipInfo=null,this._vertexLaserLineVisualElement=null,this._tooltipCallbacks={onBeforeReshape:()=>this.tool.endDrag(),onReshapeStart:()=>this._updateEventState(Ue.RESHAPING),onReshape:()=>this.events.emit("reshape",{type:"reshape",object:this.object}),onReshapeStop:()=>this._updateEventState(Ue.NONE,{forceEnd:!0}),onMoveStart:()=>this._updateEventState(Ue.MOVING),onMove:()=>this.events.emit("move",{type:"move",object:this.object,dx:0,dy:0}),onMoveStop:()=>this._updateEventState(Ue.NONE,{forceEnd:!0})}}initialize(){const{view:e}=this,t=this._settings.manipulators,i=t.vertex;this.tooltipInfos=oe(this._sketchOptions,e),this._vertexManipulatorMaterial=L(n(i.color),i.renderOccluded),this._vertexManipulatorOutlineMaterial=P(n(i.outlineColor),i.renderOccluded),this._vertexManipulatorHoverOutlineMaterial=P(n(i.hoverOutlineColor),i.renderOccluded);const a=t.edge;this._edgeManipulatorMaterial=L(n(a.color),a.renderOccluded),this._edgeManipulatorOutlineMaterial=P(n(a.outlineColor),a.renderOccluded);const o=t.edgeOffset;this._edgeOffsetManipulatorMaterial=L(n(o.color),o.renderOccluded,!1),this._edgeOffsetManipulatorHoverMaterial=L(n(o.hoverColor),o.renderOccluded,!1);const s=t.selected;this._selectedManipulatorMaterial=L(n(s.color),s.renderOccluded),this._selectedManipulatorOutlineMaterial=P(n(s.outlineColor),s.renderOccluded),this._selectedManipulatorHoverOutlineMaterial=P(n(s.hoverOutlineColor),s.renderOccluded),this.tooltip=ye((()=>({view:e,options:this._sketchOptions.tooltips}))),this.addHandles([u((()=>{const e=this._settings.manipulators;return{vertexSettings:e.vertex,edgeSettings:e.edge,edgeOffsetSettings:e.edgeOffset,selectedSettings:e.selected}}),(({vertexSettings:e,edgeSettings:t,edgeOffsetSettings:i,selectedSettings:n})=>{e.applyColor(this._vertexManipulatorMaterial),e.applyOutline(this._vertexManipulatorOutlineMaterial),e.applyHoverOutline(this._vertexManipulatorHoverOutlineMaterial),t.applyColor(this._edgeManipulatorMaterial),t.applyOutline(this._edgeManipulatorOutlineMaterial),i.applyColor(this._edgeOffsetManipulatorMaterial),i.applyHover(this._edgeOffsetManipulatorHoverMaterial),n.applyColor(this._selectedManipulatorMaterial),n.applyOutline(this._selectedManipulatorOutlineMaterial),n.applyHoverOutline(this._selectedManipulatorHoverOutlineMaterial)})),u((()=>this.object.visible),(e=>{for(const t of this._manipulatorInfos)t.manipulator.available=e,Te(t)&&(t.edgeManipulator.available=e)})),u((()=>this._numGrabbing+this._numDragging===0),(e=>this._toggleAutoHideManipulators(e))),u((()=>({labels:this._segmentLabels,enabled:this._sketchOptions.labels.enabled,edgeOffsetEnabled:this.enableEdgeOffset})),(({labels:e,enabled:t,edgeOffsetEnabled:i})=>{null!=e&&(e.visible=t,e.edgeDistance=i?"far":"default")}),c),se(this.tooltip,this.object,(()=>this._tooltipsContext)),u((()=>this.tooltip.mode),((e,t)=>{"input"===t&&"input"!==e&&this._resetTooltip()})),h((()=>this._operations),"vertex-update",(e=>this._updateManipulatorPositions(e.vertices)),{onListenerAdd:()=>this._recreateManipulators()}),h((()=>this._operations?.data),"change",(e=>{"undo"!==e.operation&&"redo"!==e.operation||this._recreateManipulators()}))])}destroy(){this._removeManipulators(),this._updatingHandles.destroy(),this._segmentLabels=p(this._segmentLabels),this.tooltip=p(this.tooltip)}get updating(){return this._updatingHandles.updating}get manipulators(){return this.tool.manipulators}get view(){return this.tool.view}get automaticAreaMeasurementUtils(){return this.tool.automaticAreaMeasurementUtils}get automaticLengthMeasurementUtils(){return this.tool.automaticLengthMeasurementUtils}get object(){return this.tool.object}get enableZShape(){return this.tool.enableZShape}get enableDeleteVertices(){return this.tool.enableDeleteVertices}get enableZVertex(){return this.tool.enableZVertex}get autoHideManipulators(){return this.tool.autoHideManipulators}get enableMoveObject(){return this.tool.enableMoveObject}get enableMidpoints(){return this.tool.enableMidpoints}get enableEdgeOffset(){return this.tool.enableEdgeOffset}get _sketchOptions(){return this.tool.sketchOptions}get _accentColor(){return this.view.effectiveTheme.accentColor}enterInputModeIfAvailable(e){return"key-down"===e.type&&e.key===be.enterInputMode&&("reshape-edge-offset"===this.activeTooltipInfo?.type?this._enterInputModeDuringEdgeOffset(e):!!je(e,this.tooltip)&&(this.tool.endDrag(),!0))}removeSelectedVertices(){const e=this._manipulatorInfos.filter((e=>e.manipulator.selected&&"vertex"===e.type));return this._removeVertices(e),e.length}onManipulatorSelectionChanged(){this.events.emit("manipulators-changed")}_removeManipulators(){this._manipulatorHandles.removeAll(),this._moveManipulation=p(this._moveManipulation),this._objectMoveManipulation=p(this._objectMoveManipulation),this.manipulators.removeAll(),this._manipulatorInfos=[],this._numGrabbing=0,this._numDragging=0}_createManipulators(e){if(null==this._operations)return;const t=this.object.elevationInfo;for(const i of this._operations.data.components){const n=e?.byComponentIndex.get(i.index);for(const e of i.vertices){const i=n?.has(e.index);this._createVertexOrEdgeManipulator(e,t,i)}for(const e of i.edges)this._createVertexOrEdgeManipulator(e,t)}this._createObjectMoveManipulation(),this._createMoveManipulation(t),this._createVisualElements()}get canRedo(){return null!=this._operations&&this._operations.canRedo}get canUndo(){return null!=this._operations&&this._operations.canUndo}redo(){return this._operations?.redo()}undo(){return this.events.emit("undo"),this._operations?.undo()}_recreateManipulators(){if(!this._recreatingManipulators){if(this._recreatingManipulators=!0,this._removeManipulators(),this._resetTooltip(),this._operations&&this._segmentLabels?.context?.editGeometryOperations===this._operations||(this._segmentLabels=p(this._segmentLabels)),this._createManipulators(),!this._segmentLabels&&this._operations){const e=this._sketchOptions.labels;this._segmentLabels=new N({context:{view:this.view,editGeometryOperations:this._operations,elevationInfo:this.object.elevationInfo,labelOptions:e,automaticLengthMeasurementUtils:this.automaticLengthMeasurementUtils},visible:e.enabled})}this._recreatingManipulators=!1}}_perObjectManipulatorDragAction(e,t){if("end"===t.action)return t;let i=0;const n=[],a=this._manipulatorInfos.some((e=>"vertex"===e.type&&e.manipulator.selected)),o=e===Ce.SELECTED_OR_ALL&&a;for(const s of this._manipulatorInfos)"vertex"===s.type&&(s.manipulator.grabbing||o&&!s.manipulator.selected||n.push(s),i++);this._moveVertices(n,t);if(n.length===i){if(this._updateEventState(Ue.MOVING),this.destroyed)return t;this.events.emit("move",{type:"move",dx:t.screenDeltaX,dy:t.screenDeltaY,object:this.object})}else{if(this._updateEventState(Ue.RESHAPING),this.destroyed)return t;this.events.emit("reshape",{type:"reshape",object:this.object})}return t}_toggleAutoHideManipulators(e){this.autoHideManipulators&&(e?this.removeHandles(Ie):this.tool.manipulators.forEach((({manipulator:e})=>{const t=e.disableDisplay?.();t&&this.addHandles(t,Ie)})))}_isMultiVertexSelection(){return this._manipulatorInfos.reduce(((e,t)=>"vertex"===t.type&&t.manipulator.selected?e+1:e),0)>1}_perVertexManipulatorDragAction(e){if(this._updateEventState(Ue.RESHAPING),this.destroyed)return;const{mapDeltaX:t,mapDeltaY:i,mapDeltaZ:n}=e;if(!t&&!i&&!n)return;const a=[];for(const o of this._manipulatorInfos)"vertex"===o.type&&(o.manipulator.selected&&!o.manipulator.grabbing||o===e.info)&&a.push(o);this._moveVertices(a,e,xe.ACCUMULATE_STEPS),this.events.emit("reshape",{type:"reshape",object:this.object})}_updateEventState(e,t={}){if(e===this._reshapeEventState)return!1;switch(e){case Ue.NONE:if(!t.forceEnd&&(0!==this._numGrabbing||0!==this._numDragging))return!1;switch(this._reshapeEventState){case Ue.MOVING:this.events.emit("move",{type:"move-stop",dx:0,dy:0,object:this.object});break;case Ue.RESHAPING:this.events.emit("reshape",{type:"reshape-stop",object:this.object})}break;case Ue.MOVING:switch(this._reshapeEventState){case Ue.NONE:this.events.emit("move",{type:"move-start",dx:0,dy:0,object:this.object});break;case Ue.RESHAPING:this.events.emit("reshape",{type:"reshape-stop",object:this.object}),this.destroyed||this.events.emit("move",{type:"move-start",dx:0,dy:0,object:this.object})}break;case Ue.RESHAPING:switch(this._reshapeEventState){case Ue.NONE:this.events.emit("reshape",{type:"reshape-start",object:this.object});break;case Ue.MOVING:this.events.emit("move",{type:"move-stop",dx:0,dy:0,object:this.object}),this.destroyed||this.events.emit("reshape",{type:"reshape-start",object:this.object})}}if(this.destroyed)return!1;const i=this._reshapeEventState!==e;return this._reshapeEventState=e,i}_createObjectMoveManipulation(){const{tool:e,view:t,object:i,_operations:n}=this;if(n){if(this._objectMoveManipulation=new Q({tool:e,view:t,object:i}),this.enableMoveObject){let e=null;this._manipulatorHandles.add(this._objectMoveManipulation.createDragPipeline(((t,i,a)=>{i.next((e=>this._trackNumDragging(e))).next((t=>("start"===t.action&&(e=n.createUndoGroup()),t))).next((e=>this._perObjectManipulatorDragAction(Ce.ALL,e))).next((e=>(this._updateTranslateObjectTooltip(K.XY,e),e))).next((t=>{"end"===t.action&&(this._resetTooltip(),e=d(e))})),a.next((()=>this._onDragCancel(!0,(()=>e=d(e)))))}))),this._objectMoveManipulation.forEachManipulator((e=>this._manipulatorHandles.add(this._watchAndUpdateGrabState(e,!1))))}else this._objectMoveManipulation.forEachManipulator((e=>{e.grabbable=!1,e.cursor=null}));this._objectMoveManipulation.forEachManipulator((e=>this._manipulatorHandles.add(e.events.on("immediate-click",(e=>{this._manipulatorInfos.some((e=>e.manipulator.selected))?this._clearSelection():this.events.emit("immediate-click",{...e,object:this.object}),e.stopPropagation()})))))}}_createMoveManipulation(e){const{object:t,tool:i,view:n,_operations:a}=this;if(!a)return;this._moveManipulation=new J({tool:i,view:n,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:this.enableZShape&&Y(t.operations,t.elevationInfo),snapToScene:!1,radius:J.radiusForSymbol(t.graphic?.symbol)}),this._moveManipulation.forEachManipulator((e=>this.addHandles([e.events.on("immediate-click",(t=>{this._moveManipulation.zManipulation.hasManipulator(e)||this._manipulatorInfos.some((e=>e.manipulator.selected))||this.events.emit("immediate-click",{...t,object:this.object}),t.stopPropagation()})),this._watchAndUpdateGrabState(e,!1)])));const o=e=>t=>{this.addHandles([t.events.on("focus-changed",(({action:t})=>{"focus"===t?this._updateTranslateTooltip(e):this._resetTooltip()}))])};this._moveManipulation.xyManipulation.forEachManipulator(o(K.XY)),this._moveManipulation.xyAxisManipulation.forEachManipulator(o(K.XY_AXIS)),this._moveManipulation.zManipulation.forEachManipulator(o(K.Z)),this._moveManipulation.elevationInfo={mode:"absolute-height",offset:0};const s=a.data.spatialReference;this.addHandles([this._moveManipulation.createDragPipeline(((n,o,s,r,l)=>{const{snappingStep:p,cancelSnapping:d}=Oe({predicate:e=>!!e.info,snappingManager:i.snappingManager,snappingContext:new Ee({editGeometryOperations:a,elevationInfo:e,pointer:l,excludeFeature:t.graphic,visualizer:new k}),updatingHandles:this._updatingHandles,useZ:!1});return r=r.next((e=>(this._onDragCancel(),e))).next(d),{steps:s=s.next((e=>this._trackNumDragging(e))).next((e=>{const t=this._manipulatorInfos.filter((e=>"vertex"===e.type&&e.manipulator.selected));return e.manipulatorType===X.TRANSLATE_XY&&1===t.length?{...e,info:t[0],snapOrigin:t[0].handle.pos}:e})).next(ce(this.view,e,t.graphic??void 0)).next(...p).next(me()).next((e=>this._perObjectManipulatorDragAction(Ce.SELECTED_OR_ALL,e))).next((e=>(this._updateTranslateTooltip(n,e),e))),cancel:r}}),e,s,t.graphic),u((()=>t.visible),(()=>this._updateMoveManipulationPosition()),c),t.on("committed",(()=>{this._recreatingManipulators||this._updateMoveManipulationPosition()})),u((()=>t.isDraped),(e=>{this._updateMoveManipulationPosition();const t="align-move-manipulation";e?this.addHandles(this.view.elevationProvider.on("elevation-change",(()=>this._updateMoveManipulationPosition())),t):this.removeHandles(t)}),c)])}_createVisualElements(){const{object:e,view:t}=this,i=B({view:t,object:e,forEachManipulator:e=>{if(!this.destroyed&&!this._recreatingManipulators){this._objectMoveManipulation.forEachManipulator(e),this._moveManipulation.forEachManipulator(e);for(const t of this._manipulatorInfos)e(t.manipulator,X.TRANSLATE_XY)}},onManipulatorsChanged:e=>this.events.on("manipulators-changed",e)});null!=i&&(this._outlineVisualElement=i.visualElement instanceof pe?i.visualElement:null);const n=this._outlineVisualElement;if(null!=n){const t=()=>{e.isDraped||this._updateMoveManipulationPosition()};this._manipulatorHandles.add(h((()=>n.events),"attachment-origin-changed",t,{onListenerAdd:t}))}this._manipulatorHandles.add(i)}_createEdgeOffsetManipulator(e,t=this.object.elevationInfo){const i=this.view,n=this._operations;if(e.component.vertices.length<=2||!n)return null;const a=n.data.spatialReference,o=this._settings.manipulators.edgeOffset,r=o.size/2,l=r+o.collisionPadding,p=r/l,d=p/2,u=p*Math.sqrt(3)/2,{height:h,offset:c}=o,m=this._edgeOffsetManipulatorMaterial;if(!this._edgeOffsetManipulatorGeometryInside){const e=de(m,u,d,d,h,c);this._edgeOffsetManipulatorGeometryInside=e}if(!this._edgeOffsetManipulatorGeometryOutside){const e=de(m,-u,d,d,h,-c);this._edgeOffsetManipulatorGeometryOutside=e}const g=[new C(this._edgeOffsetManipulatorGeometryInside.instantiate(),ve.Unfocused),new C(this._edgeOffsetManipulatorGeometryInside.instantiate({material:this._edgeOffsetManipulatorHoverMaterial}),ve.Focused),new C(this._edgeOffsetManipulatorGeometryOutside.instantiate(),ve.Unfocused),new C(this._edgeOffsetManipulatorGeometryOutside.instantiate({material:this._edgeOffsetManipulatorHoverMaterial}),ve.Focused)],f=new D({view:i,renderObjects:g,elevationInfo:"on-the-ground"!==t.mode||G(this.object.graphic?.symbol)?{mode:"absolute-height",offset:0}:t,worldOriented:!1,focusMultiplier:1,radius:l,available:this.object.visible,collisionType:{type:"disc",direction:I(0,0,1)},collisionPriority:1,metadata:{deleting:!1},location:Ae(a)}),_=new D({view:i,worldSized:!0,worldOriented:!1,available:this.object.visible,collisionPriority:-10,cursor:this.enableMoveObject?"move":"default",metadata:{deleting:!1},location:Ae(a)}),v={manipulator:f,handle:e,locationUpdateHandle:null,type:"edge",selectedIndex:0,edgeManipulator:_,visibilityHandle:null};this._autoHideEdgeOffsetManipulator(v,o.minSquaredEdgeLength);const M=()=>this._updateEdgeOffsetManipulator(v);M(),v.locationUpdateHandle=s([e.leftVertex,e.rightVertex].map((e=>{const t=this._getManipulatorInfoFromHandle(e);return t?.manipulator.events.on("location-update",M)})));const b=e=>{this._manipulatorInfos.some((e=>e.manipulator.selected))?this._clearSelection():this.events.emit("immediate-click",{...e,object:this.object}),e.stopPropagation()};return this._manipulatorHandles.add([v.locationUpdateHandle,this._watchAndUpdateGrabState(f,!0),this._watchAndUpdateGrabState(_,!0),ge(f,this._createEdgeOffsetPipeline(v,t,n)),ge(_,this._createEdgePipeline(v,t,n)),_.events.on("immediate-click",b),f.events.on("immediate-click",b),f.events.on("focus-changed",(()=>this._resetTooltip())),f.events.on("grab-changed",(({screenPoint:e,action:t})=>{v.grabMapPoint="start"===t?$(e,this.view,this.object,v):null}))],f),this._manipulatorInfos.push(v),this.manipulators.addMany([f,_]),this.events.emit("manipulators-changed"),v}_autoHideEdgeOffsetManipulator(e,t){const i=e.manipulator,n=e.edgeManipulator,a=()=>{e.visibilityHandle=d(e.visibilityHandle);const a=this._getManipulatorInfoFromHandle(e.handle.leftVertex),o=this._getManipulatorInfoFromHandle(e.handle.rightVertex),l=null!=a&&null!=o&&ne(a.manipulator.renderLocation,o.manipulator.renderLocation,this.view.state.camera)<t;(!i.focused&&!n.focused||l)&&(i.grabbable=!l,n.grabbable=!l,e.visibilityHandle=s([i.disableDisplay(),r((()=>{i.grabbable=!0,n.grabbable=this.enableMoveObject}))]))};this._manipulatorHandles.add([i.events.on("focus-changed",a),n.events.on("focus-changed",a),r((()=>{d(e.visibilityHandle),n.metadata.deleting=!0,this.manipulators.remove(n)}))],i),a()}_updateEdgeOffsetManipulator(e){if(!this._operations)return;this._updateManipulatorPosition(e);const{coordinateHelper:t}=this._operations.data,i=ee(this.view,e.manipulator.elevationAlignedLocation,te(t,e.handle,e.manipulator.elevationInfo)),n=this._getManipulatorInfoFromHandle(e.handle.leftVertex),a=this._getManipulatorInfoFromHandle(e.handle.rightVertex);if(null==n||null==a)return;const o=n.manipulator.renderLocation,s=a.manipulator.renderLocation,r=null!=i?ie(i,o,s):M;e.manipulator.modelTransform=r,e.edgeManipulator.elevationAlignedLocation=e.manipulator.elevationAlignedLocation,e.edgeManipulator.modelTransform=r;const l=b(x(De,o,s))/2;e.edgeManipulator.collisionType={type:"line",paths:[[[-l,0,0],[l,0,0]]]}}_createEdgePipeline(e,t,i){return(n,a,o,s)=>{if("touch"===s){this._createEdgeOffsetPipeline(e,t,i)(n,a,o)}else if(this.enableMoveObject){const e=this.object.graphic,s=i.data.spatialReference,{elevationAlignedLocation:r}=n;a.next((e=>this._trackNumDragging(e))).next(fe(this.view,r)).next(R(this.view,r,t,s,e)).next(_e()).next(me()).next((e=>this._perObjectManipulatorDragAction(Ce.ALL,e))).next((e=>(this._updateTranslateObjectTooltip(K.XY,e),e))).next((e=>{"end"===e.action&&this._resetTooltip()})),o.next((()=>this._onDragCancel(!n.metadata.deleting)))}}}_createEdgeOffsetPipeline(e,t,i){return(n,a,o)=>{const s=this._pendingEdgeOffsetInfo;if(s?.manipulatorInfo===e&&"drag"!==s.mode)return void o.execute({action:"cancel"});this._clearSelection();const{initializeStep:r,cleanup:l}=this._initializeEdgeOffset(e,t,i,o),p=this._applyEdgeOffsetStep(e);a.next((e=>this._trackNumDragging(e))).next(fe(this.view,n.elevationAlignedLocation)).next(r).next(z(this.view)).next(F(this.view,i.data.spatialReference)).next(me()).next(He()).next((e=>this._pendingEdgeOffsetInfo?e:p(e))).next((e=>{"end"!==e.action||this._pendingEdgeOffsetInfo||l()})),o.next((()=>{this._exitEdgeOffsetInputMode(),n.metadata.deleting||(l(),this._onDragCancel())}))}}_initializeEdgeOffset(e,t,i,n){const{view:a,object:o}=this,r=te(i.data.coordinateHelper,e.handle,t),l=i.createUndoGroup(),p=ee(a,e.manipulator.elevationAlignedLocation,r);let u;this._splitEdgesBeforeEdgeOffset(e,r),this._selectEdgeOffsetArrow(e,r);const h=()=>{this._cleanEdgeOffsetCollapsedEdges(e,i),u=d(u)},c=this.events.on("undo",h);return u=s([this._initializeEdgeOffsetVisualElement(e,o,t,i),l,c,this._connectEdgeOffsetTooltip(e,r,i,(()=>{n.execute({action:"cancel"})}))]),{initializeStep:e=>null==r||null==p?(h(),null):{...e,operation:r,plane:p},cleanup:h}}_initializeEdgeOffsetVisualElement(e,t,i,a){const o=()=>new V({paths:[[e.handle.leftVertex.pos,e.handle.rightVertex.pos]],spatialReference:a.data.spatialReference}),r=new pe({view:this.view,isDraped:t.isDraped,geometry:o(),elevationInfo:i,width:this._settings.visualElements.lineObjects.outline.width,attached:!1,isDecoration:!0}),p=s([u((()=>({color:this._accentColor,draped:t.isDraped})),(({color:e,draped:t})=>{r.color=n(e),r.isDraped=t}),m),t.on("committed",(()=>{r.geometry=o()})),l(r)]);return r.attached=!0,p}_applyEdgeOffsetStep(e){return t=>(this.destroyed||null==t.operation||!this._operations||(this._updateEventState(Ue.RESHAPING),null==t.signedDistance?this._resetTooltip():((t.mapDeltaX||t.mapDeltaY||t.mapDeltaZ)&&(this._offsetEdge(e,t.operation,t.signedDistance),this.events.emit("reshape",{type:"reshape",object:this.object})),this._updateEdgeOffsetTooltip(t))),t)}_cleanEdgeOffsetCollapsedEdges(e,t){const i=e.handle.leftVertex.leftEdge?.leftVertex,n=e.handle.leftVertex,a=e.handle.rightVertex.rightEdge?.rightVertex,o=e.handle.rightVertex,s=t.data.coordinateHelper,r=this.view.pixelSizeAt(s.vectorToDehydratedPoint(n.pos),s.spatialReference),l=[];if(i&&s.distance(i.pos,n.pos)<Le){const e=this._getManipulatorInfoFromHandle(n);null!=e&&l.push(e)}if(s.distance(n.pos,o.pos)<r||a&&s.distance(a.pos,o.pos)<Le){const e=this._getManipulatorInfoFromHandle(o);null!=e&&l.push(e)}l.length&&this._removeVertices(l)}_enterInputModeDuringEdgeOffset(e){const t=this._findActiveEdgeOffsetManipulatorInfo();return!!t&&(!!je(e,this.tooltip)&&(t.manipulator.dragging?(this._pendingEdgeOffsetInfo={manipulatorInfo:t,mode:"drag"},!0):(this._clearSelection(),this._pendingEdgeOffsetInfo={manipulatorInfo:t,mode:"hover"},this._connectEdgeOffsetTooltipOnHover(t),!0)))}_exitEdgeOffsetInputMode(){this.tooltip&&(this._pendingEdgeOffsetInfo=null,this._resetTooltip(),this.tooltip.exitInputMode())}_findActiveEdgeOffsetManipulatorInfo(){return this._manipulatorInfos.filter(Te).find((({manipulator:e})=>e.hovering||e.grabbing||e.dragging))}_connectEdgeOffsetTooltipOnHover(e){const{_operations:t,object:i}=this;if(!t)return;const{elevationInfo:n}=i,a=te(t.data.coordinateHelper,e.handle,n);this._selectEdgeOffsetArrow(e,a),this.addHandles([this._initializeEdgeOffsetVisualElement(e,i,n,t),this._connectEdgeOffsetTooltip(e,a,t,(()=>{this.removeHandles(a),this._exitEdgeOffsetInputMode()}))],a)}_splitEdgesBeforeEdgeOffset(e,t){if(t.requiresSplitEdgeLeft){const t=this._getManipulatorInfoFromHandle(e.handle.leftVertex.leftEdge);null!=t&&this._splitEdgeManipulator(t,1)}if(t.requiresSplitEdgeRight){const t=this._getManipulatorInfoFromHandle(e.handle.rightVertex.rightEdge);null!=t&&this._splitEdgeManipulator(t,0)}}_selectEdgeOffsetArrow(e,t){const i=e.grabMapPoint??$(this.view.inputManager?.latestPointerLocation,this.view,this.object,e);i&&t.selectArrowFromStartPoint(i)}_connectEdgeOffsetTooltip(e,t,i,n){const a=()=>this.tooltipInfos.edgeOffset.distance.actual,o=a=>{n(),queueMicrotask((()=>{this.view.focus();const n=i.createUndoGroup();this._tooltipCallbacks.onReshapeStart?.(),this._splitEdgesBeforeEdgeOffset(e,t),this._offsetEdge(e,t,ae(a,e.manipulator.location,t,i)),this._tooltipCallbacks.onReshape?.(),this._tooltipCallbacks.onReshapeStop?.(),this._cleanEdgeOffsetCollapsedEdges(e,i),n.remove()}))},r=()=>{const e=a();null!=e?o(e):n()};return s([g((()=>this.tooltip&&!this.tooltip.focused),(()=>r()),f),this.tooltip.on("discard",n),this.tooltip.on("commit",(e=>{"commit-and-exit"===e.type&&r()}))])}_createVertexOrEdgeManipulator(e,t=this.object.elevationInfo,i=!1){const n=this.view,a=this._operations,o=this._settings;if(!a)return null;const r=a.data.type,l=a.data.spatialReference;if("edge"===e.type){if(this.enableEdgeOffset)return this._createEdgeOffsetManipulator(e,t);if(!this.enableMidpoints)return null}if(null==this._vertexManipulatorGeometry||null==this._vertexManipulatorOutlineGeometry){const{size:e,outlineSize:t}=we(o.manipulators.vertex);this._vertexManipulatorGeometry=ue(this._vertexManipulatorMaterial,e,16,16),this._vertexManipulatorOutlineGeometry=ue(this._vertexManipulatorOutlineMaterial,t,16,16)}if(null==this._edgeManipulatorGeometry||null==this._edgeManipulatorOutlineGeometry){const{size:e,outlineSize:t}=we(o.manipulators.edge);this._edgeManipulatorGeometry=ue(this._edgeManipulatorMaterial,e,16,16),this._edgeManipulatorOutlineGeometry=ue(this._edgeManipulatorOutlineMaterial,t,16,16)}const p="point"===r||"mesh"===r?[]:[new C(this._vertexManipulatorGeometry.instantiate(),Pe.Vertex|ve.Unselected),new C(this._vertexManipulatorOutlineGeometry.instantiate(),Pe.Vertex|ve.Unfocused|ve.Unselected),new C(this._vertexManipulatorOutlineGeometry.instantiate({material:this._vertexManipulatorHoverOutlineMaterial}),Pe.Vertex|ve.Focused|ve.Unselected),new C(this._vertexManipulatorGeometry.instantiate({material:this._selectedManipulatorMaterial}),ve.Selected),new C(this._vertexManipulatorOutlineGeometry.instantiate({material:this._selectedManipulatorOutlineMaterial}),ve.Selected|ve.Unfocused),new C(this._vertexManipulatorOutlineGeometry.instantiate({material:this._selectedManipulatorHoverOutlineMaterial}),ve.Selected|ve.Focused)];this.enableMidpoints&&p.push(new C(this._edgeManipulatorGeometry.instantiate({material:this._vertexManipulatorMaterial}),Pe.Edge|ve.Focused|ve.Unselected),new C(this._edgeManipulatorOutlineGeometry.instantiate({material:this._vertexManipulatorHoverOutlineMaterial}),Pe.Edge|ve.Focused|ve.Unselected),new C(this._edgeManipulatorGeometry.instantiate(),Pe.Edge|ve.Unfocused|ve.Unselected),new C(this._edgeManipulatorOutlineGeometry.instantiate(),Pe.Edge|ve.Unfocused|ve.Unselected));const u=new D({view:n,renderObjects:p,elevationInfo:t,focusMultiplier:1,touchMultiplier:1,available:this.object.visible,metadata:{deleting:!1},location:Ae(l)});u.selected=i,this._setTypeSpecificManipulatorSettings(u,e,t);const h="edge"===e.type?{manipulator:u,handle:e,locationUpdateHandle:null,type:"edge",selectedIndex:0}:{manipulator:u,handle:e,type:"vertex",selectedIndex:0};if(this._manipulatorInfos.push(h),this.manipulators.add(u),this._updateManipulatorPosition(h),"edge"===h.type){const e=[];for(const t of[h.handle.leftVertex,h.handle.rightVertex]){const i=this._getManipulatorInfoFromHandle(t);null!=i&&e.push(i.manipulator.events.on("location-update",(()=>this._updateManipulatorPosition(h))))}h.locationUpdateHandle=s(e),this._manipulatorHandles.add(h.locationUpdateHandle,u)}this._manipulatorHandles.add(this._watchAndUpdateGrabState(u,!0),u);const c=ge(u,((e,i,o,s)=>{let r=null;const{snappingStep:p,cancelSnapping:u}=Oe({predicate:()=>!this._isMultiVertexSelection(),snappingManager:this.tool.snappingManager,snappingContext:new Ee({editGeometryOperations:a,elevationInfo:t,pointer:s,excludeFeature:this.object.graphic,visualizer:new k}),updatingHandles:this._updatingHandles,useZ:!1});o=o.next((t=>(this._onDragCancel(!e.metadata.deleting,(()=>r=d(r))),t))).next(u);const{elevationAlignedLocation:c}=e,m=this.object.graphic??void 0;i.next((e=>this._trackNumDragging(e))).next((e=>{if("start"===e.action&&a&&(r=a.createUndoGroup()),"edge"===h.type){const t=this._splitEdgeManipulator(h);return{...e,info:t,snapOrigin:t.handle.pos}}return{...e,info:h,snapOrigin:h.handle.pos}})).next(fe(n,c)).next(R(n,c,t,l,m)).next(ce(n,t,m)).next(...p).next(me()).next((e=>{this._perVertexManipulatorDragAction(e),"end"===e.action&&(r=d(r)),this._resetTooltip()}))}));return this._manipulatorHandles.add([c,u.events.on("immediate-click",(e=>this._manipulatorClickCallback(e,h))),u.events.on("select-changed",(()=>{h.selectedIndex=++this._selectedIndex,this._updateMoveManipulationPosition(),this._resetTooltip()})),u.events.on("focus-changed",(()=>{this._resetTooltip()}))],u),this.events.emit("manipulators-changed"),h}_trackNumDragging(e){switch(e.action){case"start":this._numDragging++;break;case"end":this._numDragging--}return e}_onDragCancel(e=!0,t){switch(this._numDragging--,e&&this.undo(),this.tool.snappingManager?.doneSnapping(),this._resetTooltip(),this._reshapeEventState){case Ue.NONE:break;case Ue.MOVING:this.events.emit("move",{type:"move",dx:0,dy:0,object:this.object});break;case Ue.RESHAPING:this.events.emit("reshape",{type:"reshape",object:this.object})}t?.(),this.destroyed||this._updateEventState(Ue.NONE)}_setTypeSpecificManipulatorSettings(e,t,i){const n=this._settings;switch(t.type){case"vertex":{e.state=Pe.Vertex,e.selectable=!0,e.cursor="move",e.collisionPriority=2;const{size:t,collisionPadding:a}=n.manipulators.vertex;e.radius=t/2+a,e.elevationInfo=i;const o=this._operations?.data.type;e.interactive=null!=o&&"point"!==o&&"mesh"!==o;break}case"edge":{e.state=Pe.Edge,e.selectable=!1,e.cursor="copy",e.collisionPriority=-1;const{size:t,collisionPadding:a}=n.manipulators.edge;e.radius=t/2+a,e.elevationInfo="on-the-ground"!==i.mode||G(this.object.graphic?.symbol)?{mode:"absolute-height",offset:0}:i;break}}}_watchAndUpdateGrabState(e,t){return e.events.on("grab-changed",(i=>{this._onGrabStateChanged(e,t,i.action,i.pointerType)}))}_onGrabStateChanged(e,t,i,n="mouse"){if(!this._recreatingManipulators){if("start"===i)t&&this._updateSelection(e),this._numGrabbing++;else if(this._numGrabbing--,this._updateEventState(Ue.NONE),this.destroyed)return;this._moveManipulation.interactive=!this._numGrabbing,("touch"!==n||this.enableEdgeOffset)&&(this._manipulatorInfos.forEach((e=>{const{manipulator:t}=e,i=this._operations?.data.type;t.interactive=t.grabbing||!this._numGrabbing&&null!=i&&"point"!==i&&"mesh"!==i,Te(e)&&(e.edgeManipulator.interactive=e.edgeManipulator.grabbing||!this._numGrabbing)})),this._objectMoveManipulation.forEachManipulator((e=>{e.interactive=e.grabbing||!this._numGrabbing})))}}_clearSelection(){for(const e of this._manipulatorInfos)e.manipulator.grabbing||(e.manipulator.selected=!1);this._pendingEdgeOffsetInfo=null}_updateSelection(e){e.grabbing&&!e.selected&&e.selectable&&(this._clearSelection(),e.selected=!0,this.events.emit("manipulators-changed"))}_removeManipulator(e){null!=e&&(e.manipulator.metadata.deleting=!0,this.manipulators.remove(e.manipulator),this._manipulatorHandles.remove(e.manipulator),i(this._manipulatorInfos,e),this.events.emit("manipulators-changed"),this._resetTooltip())}_getManipulatorInfoFromHandle(e){if(e)for(const t of this._manipulatorInfos)if(e===t.handle)return t;return null}_updateManipulatorPositions(e){for(const t of e)this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(t))}_updateManipulatorPosition(e){const t=this._operations;if(null!=e&&t)if("vertex"===e.type)e.manipulator.location=t.data.coordinateHelper.vectorToDehydratedPoint(e.handle.pos,Ge),e.manipulator.grabbing&&null!=this._vertexLaserLineVisualElement&&(this._vertexLaserLineVisualElement.visualElement.intersectsWorldUpAtLocation=e.manipulator.renderLocation);else if("edge"===e.type){const i=this._getManipulatorInfoFromHandle(e.handle.leftVertex),n=this._getManipulatorInfoFromHandle(e.handle.rightVertex);if(null==i||null==n)return;const a=i.manipulator,o=n.manipulator;if("on-the-ground"===e.manipulator.elevationInfo?.mode){const i=a.location,n=o.location,s=.5,r=i.x+s*(n.x-i.x),l=i.y+s*(n.y-i.y),p=i.hasZ&&n.hasZ?0:void 0;e.manipulator.location=T(r,l,p,t.data.spatialReference)}else E(De,a.renderLocation,o.renderLocation,.5),e.manipulator.renderLocation=De}}_splitEdgeManipulator(e,t=.5){const i=this._operations,n=i.splitEdge(e.handle,t).createdVertex;e.locationUpdateHandle=d(e.locationUpdateHandle);const a=this.object.elevationInfo;let o;this.enableEdgeOffset?(this._removeManipulator(e),o=this._createVertexOrEdgeManipulator(n)):(o=e,o.handle=n,o.type="vertex",this._setTypeSpecificManipulatorSettings(e.manipulator,e.handle,a)),n.leftEdge&&this._createVertexOrEdgeManipulator(n.leftEdge),n.rightEdge&&this._createVertexOrEdgeManipulator(n.rightEdge),this._updateManipulatorPosition(o),this.enableEdgeOffset||this._resetTooltip(),this._updateSelection(e.manipulator);const s=this._updateEventState(Ue.RESHAPING),r=i.data.coordinateHelper.vectorToArray(o.handle.pos),l=i.data.components.indexOf(n.component);return this.events.emit("vertex-add",{type:"vertex-add",object:this.object,vertices:[{coordinates:r,componentIndex:l,vertexIndex:n.index}],added:r}),s&&this._updateEventState(Ue.NONE),o}_updateMoveManipulationPosition(){const e=O(De,0,0,0);let t=0,i=!1,n=null,a=null;for(const r of this._manipulatorInfos)"vertex"===r.type&&(r.manipulator.selected?(t++,y(e,e,r.manipulator.renderLocation),null==n||r.selectedIndex>n.selectedIndex?(a=n,n=r):(null==a||r.selectedIndex>a.selectedIndex)&&(a=r)):i=!0);const o=this.object,s=this._operations?.data.geometry;if(0===t){const e=o.visible&&this.enableMoveObject;this._moveManipulation.xyManipulation.available=e,this._moveManipulation.xyAxisManipulation.available=e,this._moveManipulation.xyAxisManipulation.orthogonalAvailable=e,this._moveManipulation.zManipulation.available=e&&this.enableZShape&&Y(this._operations,o.elevationInfo),this._moveManipulation.angle=Z(s),this._moveManipulation.radius=J.radiusForSymbol(o.graphic?.symbol)}else{const e=o.visible;this._moveManipulation.xyManipulation.available=e,this._moveManipulation.xyAxisManipulation.available=e,this._moveManipulation.zManipulation.available=e&&this.enableZVertex&&Y(this._operations,this.object.elevationInfo),this._moveManipulation.xyAxisManipulation.orthogonalAvailable=e&&1!==t;let i=0;if(null!=n){const e=n.handle.pos,t=null!=a?a.handle.pos:n.handle.leftEdge?.leftVertex?n.handle.leftEdge.leftVertex.pos:null,o=null==a&&n.handle.rightEdge?.rightVertex?n.handle.rightEdge.rightVertex.pos:null;t&&o?this._moveManipulation.xyAxisManipulation.available=!1:t?i=Ve(t,e):o&&(i=Ve(e,o))}this._moveManipulation.angle=i,this._moveManipulation.radius=W}0!==t&&i?(j(e,e,1/t),Ge.spatialReference=this._operations.data.spatialReference,Ge.hasZ=!0,this.view.renderCoordsHelper.fromRenderCoords(e,Ge),this._moveManipulation.elevationAlignedLocation=Ge):null==this._outlineVisualElement||this.object.isDraped||null==this._outlineVisualElement.attachmentOrigin?U(this._moveManipulation,this.object):this._moveManipulation.elevationAlignedLocation=this._outlineVisualElement.attachmentOrigin}_removeVertices(e){const t=new Array,i=this._operations;if(i){for(const n of e){const e=n.handle.component;if("vertex"===n.type&&i.canRemoveVertex(e)){t.push(n.handle),this._removeManipulator(n),this._removeManipulator(this._getManipulatorInfoFromHandle(n.handle.leftEdge)),this._removeManipulator(this._getManipulatorInfoFromHandle(n.handle.rightEdge));const a=i.removeVertices([n.handle]),o=a.removedVertices?.[0].createdEdge;o?this._createVertexOrEdgeManipulator(o):this.enableEdgeOffset&&e.vertices.length<=2&&this._removeManipulator(this._getManipulatorInfoFromHandle(e.edges[0]))}}if(t.length>0){const e=t.map((e=>{const t=i.data.components.indexOf(e.component);return{coordinates:i.data.coordinateHelper.vectorToArray(e.pos),componentIndex:t,vertexIndex:e.index}})),n=this._updateEventState(Ue.RESHAPING);if(this.destroyed)return;if(this.events.emit("vertex-remove",{type:"vertex-remove",object:this.object,removed:e.map((e=>e.coordinates)),vertices:e}),this.destroyed)return;if(n&&(this._updateEventState(Ue.NONE),this.destroyed))return;this._updateMoveManipulationPosition()}}}_moveVertices(e,t,i=("start"===t.action?xe.NEW_STEP:xe.ACCUMULATE_STEPS)){const n=this._operations;if(n){e.length>0&&n.moveVertices(e.map((e=>e.handle)),t.mapDeltaX,t.mapDeltaY,t.mapDeltaZ,i);for(const t of e)this._updateManipulatorPosition(t)}}_offsetEdge(e,t,i){if(!this._operations)return;const n=t.clone();n.distance=i,this._operations.updateVertices([e.handle.leftVertex,e.handle.rightVertex],n),this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(e.handle.leftVertex)),this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(e.handle.rightVertex))}_manipulatorClickCallback(e,t){e.shiftKey||this._clearSelection(),"vertex"===t.type&&(t.manipulator.selected=!t.manipulator.selected,this.enableDeleteVertices&&e.button===he.Right&&this._removeVertices([t])),"edge"===t.type&&e.button===he.Left&&this._splitEdgeManipulator(t),e.stopPropagation()}_updateTranslateTooltip(e,t){null!=this._defaultTooltipInfo?this._resetTooltip():this._updateTranslateObjectTooltip(e,t)}_updateTranslateObjectTooltip(e,t){this._pendingEdgeOffsetInfo||(this.activeTooltipInfo=re(e,t,this._tooltipsContext))}_updateEdgeOffsetTooltip(e){this._pendingEdgeOffsetInfo||(this.activeTooltipInfo=le(this.object,e,this._tooltipsContext))}_resetTooltip(){const e=this.activeTooltipInfo;if(this._pendingEdgeOffsetInfo&&"reshape-edge-offset"===e?.type)return;let t=null;t=this._pendingEdgeOffsetInfo||null!=this._findActiveEdgeOffsetManipulatorInfo()?le(this.object,null,this._tooltipsContext):this._defaultTooltipInfo,t!==e&&(null!=e&&null!=t&&"input"===this.tooltip.mode||(this.activeTooltipInfo=t))}get _defaultTooltipInfo(){const e=this._operations?.data.type;switch(e){case"polyline":case"polygon":return this._selectedVertexManipulatorInfo?this.tooltipInfos.selectedVertex:null;case"point":case"mesh":return this.tooltipInfos.movePoint;default:return null}}get _selectedVertexManipulatorInfo(){const e=this._manipulatorInfos.filter((e=>"vertex"===e.type&&e.manipulator.selected));return 1===e.length?e[0]:null}get _tooltipsContext(){const{tooltipInfos:e,activeTooltipInfo:t,automaticAreaMeasurementUtils:i,automaticLengthMeasurementUtils:n}=this;return{sketchOptions:this._sketchOptions,tooltipInfos:e,activeTooltipInfo:t,selectedVertexManipulatorInfo:this._selectedVertexManipulatorInfo,callbacks:this._tooltipCallbacks,automaticAreaMeasurementUtils:i,automaticLengthMeasurementUtils:n}}get test(){}};function He(){return e=>{const{operation:t,mapEnd:i}=e;return null==t||null==i?e:{...e,signedDistance:t.signedDistanceToPoint(i)}}}function we(e){const t=e.size/2,i=t+e.collisionPadding;return{size:t/i,outlineSize:(t+e.outlineSize)/i}}function Ve(e,t){return Math.atan2(t[1]-e[1],t[0]-e[0])+Math.PI/2}function Ae(e){return new w({x:0,y:0,z:0,spatialReference:e})}function Te(e){return"edge"===e.type&&"edgeManipulator"in e}e([_()],Se.prototype,"_numGrabbing",void 0),e([_()],Se.prototype,"_numDragging",void 0),e([_()],Se.prototype,"_pendingEdgeOffsetInfo",void 0),e([_()],Se.prototype,"_operations",null),e([_()],Se.prototype,"_segmentLabels",void 0),e([_({constructOnly:!0})],Se.prototype,"tool",void 0),e([_()],Se.prototype,"tooltip",void 0),e([_()],Se.prototype,"activeTooltipInfo",void 0),e([_({readOnly:!0})],Se.prototype,"updating",null),e([_()],Se.prototype,"manipulators",null),e([_()],Se.prototype,"view",null),e([_()],Se.prototype,"automaticAreaMeasurementUtils",null),e([_()],Se.prototype,"automaticLengthMeasurementUtils",null),e([_()],Se.prototype,"object",null),e([_()],Se.prototype,"enableZShape",null),e([_()],Se.prototype,"enableDeleteVertices",null),e([_()],Se.prototype,"enableZVertex",null),e([_()],Se.prototype,"autoHideManipulators",null),e([_()],Se.prototype,"enableMoveObject",null),e([_()],Se.prototype,"enableMidpoints",null),e([_()],Se.prototype,"enableEdgeOffset",null),e([_()],Se.prototype,"_sketchOptions",null),e([_()],Se.prototype,"_accentColor",null),e([_()],Se.prototype,"_tooltipsContext",null),Se=e([v("esri.views.3d.interactive.editingTools.reshape.ReshapeOperation")],Se);const Ge=T(0,0,void 0,A.WGS84),De=S(),Le=1e-6;var Pe,Ue,Ce;!function(e){e.Vertex=Me.Custom1,e.Edge=Me.Custom2}(Pe||(Pe={})),function(e){e[e.NONE=0]="NONE",e[e.MOVING=1]="MOVING",e[e.RESHAPING=2]="RESHAPING"}(Ue||(Ue={})),function(e){e[e.ALL=0]="ALL",e[e.SELECTED_OR_ALL=1]="SELECTED_OR_ALL"}(Ce||(Ce={}));export{Se as ReshapeOperation};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../../chunks/tslib.es6.js";import t from"../../../../../core/Evented.js";import{destroyMaybe as o}from"../../../../../core/maybe.js";import{property as i}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as n}from"../../../../../core/accessorSupport/decorators/subclass.js";import{ReshapeOperation as r}from"./ReshapeOperation.js";import{InteractiveToolBase as s}from"../../../../interactive/InteractiveToolBase.js";import{sketchKeys as p}from"../../../../interactive/keybindings.js";import a from"../../../../interactive/sketch/SketchOptions.js";let h=class extends s{constructor(e){super(e),this._reshapeOperation=null,this.events=new t,this.enableZShape=!0,this.enableZVertex=!0,this.enableMoveObject=!0,this.enableDeleteVertices=!0,this.autoHideManipulators=!1,this.enableMidpoints=!0,this.enableEdgeOffset=!1,this.type="reshape-3d",this.sketchOptions=new a,this.snappingManager=null,this.automaticManipulatorSelection=!1}initialize(){const e=this._reshapeOperation=new r({tool:this});this.addHandles([e.events.on("reshape",(e=>this.events.emit("reshape",e))),e.events.on("move",(e=>this.events.emit("move",e))),e.events.on("vertex-add",(e=>this.events.emit("vertex-add",e))),e.events.on("vertex-remove",(e=>this.events.emit("vertex-remove",e))),e.events.on("immediate-click",(e=>this.events.emit("immediate-click",{...e,object:this.object}))),this.view.on("pointer-down",["Shift"],(e=>e.stopPropagation()))]),this.finishToolCreation()}destroy(){this._reshapeOperation=o(this._reshapeOperation)}get updating(){return((this.object.updating??!1)||this._reshapeOperation?.updating)??!1}get activeTooltipInfo(){return this._reshapeOperation?.activeTooltipInfo??null}get tooltip(){return this._reshapeOperation?.tooltip??null}onManipulatorSelectionChanged(){this._reshapeOperation?.onManipulatorSelectionChanged()}get canUndo(){return this._reshapeOperation?.canUndo??!1}undo(){this.snappingManager?.doneSnapping(),this._reshapeOperation?.undo()}get canRedo(){return this._reshapeOperation?.canRedo??!1}redo(){this.snappingManager?.doneSnapping(),this._reshapeOperation?.redo()}onInputEvent(e){const t=this._reshapeOperation;if(t&&!t.enterInputModeIfAvailable(e)&&this.enableDeleteVertices&&"key-down"===e.type&&p.delete.includes(e.key)){t.removeSelectedVertices()>0&&e.stopPropagation()}}reset(){}};e([i()],h.prototype,"_reshapeOperation",void 0),e([i()],h.prototype,"view",void 0),e([i({constructOnly:!0})],h.prototype,"object",void 0),e([i()],h.prototype,"enableZShape",void 0),e([i()],h.prototype,"enableZVertex",void 0),e([i()],h.prototype,"enableMoveObject",void 0),e([i()],h.prototype,"enableDeleteVertices",void 0),e([i()],h.prototype,"autoHideManipulators",void 0),e([i()],h.prototype,"enableMidpoints",void 0),e([i()],h.prototype,"enableEdgeOffset",void 0),e([i()],h.prototype,"type",void 0),e([i({type:a})],h.prototype,"sketchOptions",void 0),e([i()],h.prototype,"snappingManager",void 0),e([i()],h.prototype,"updating",null),e([i()],h.prototype,"activeTooltipInfo",null),e([i()],h.prototype,"tooltip",null),e([i()],h.prototype,"automaticManipulatorSelection",void 0),h=e([n("esri.views.3d.interactive.editingTools.reshape.ReshapeTool3D")],h);export{h as ReshapeTool3D};
|
|
5
|
+
import{_ as e}from"../../../../../chunks/tslib.es6.js";import t from"../../../../../core/Evented.js";import{destroyMaybe as o}from"../../../../../core/maybe.js";import{property as i}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as n}from"../../../../../core/accessorSupport/decorators/subclass.js";import{ReshapeOperation as r}from"./ReshapeOperation.js";import{InteractiveToolBase as s}from"../../../../interactive/InteractiveToolBase.js";import{sketchKeys as p}from"../../../../interactive/keybindings.js";import a from"../../../../interactive/sketch/SketchOptions.js";let h=class extends s{constructor(e){super(e),this._reshapeOperation=null,this.events=new t,this.enableZShape=!0,this.enableZVertex=!0,this.enableMoveObject=!0,this.enableDeleteVertices=!0,this.autoHideManipulators=!1,this.enableMidpoints=!0,this.enableEdgeOffset=!1,this.type="reshape-3d",this.sketchOptions=new a,this.snappingManager=null,this.automaticManipulatorSelection=!1}initialize(){const e=this._reshapeOperation=new r({tool:this});this.addHandles([e.events.on("reshape",(e=>this.events.emit("reshape",e))),e.events.on("move",(e=>this.events.emit("move",e))),e.events.on("vertex-add",(e=>this.events.emit("vertex-add",e))),e.events.on("vertex-remove",(e=>this.events.emit("vertex-remove",e))),e.events.on("immediate-click",(e=>this.events.emit("immediate-click",{...e,object:this.object}))),this.view.on("pointer-down",["Shift"],(e=>e.stopPropagation()))]),this.finishToolCreation()}destroy(){this._reshapeOperation=o(this._reshapeOperation)}get updating(){return((this.object.updating??!1)||this._reshapeOperation?.updating)??!1}get activeTooltipInfo(){return this._reshapeOperation?.activeTooltipInfo??null}get tooltip(){return this._reshapeOperation?.tooltip??null}onManipulatorSelectionChanged(){this._reshapeOperation?.onManipulatorSelectionChanged()}get canUndo(){return this._reshapeOperation?.canUndo??!1}undo(){this.snappingManager?.doneSnapping(),this._reshapeOperation?.undo()}get canRedo(){return this._reshapeOperation?.canRedo??!1}redo(){this.snappingManager?.doneSnapping(),this._reshapeOperation?.redo()}onInputEvent(e){const t=this._reshapeOperation;if(t&&!t.enterInputModeIfAvailable(e)&&this.enableDeleteVertices&&"key-down"===e.type&&p.delete.includes(e.key)){t.removeSelectedVertices()>0&&e.stopPropagation()}}reset(){}};e([i()],h.prototype,"_reshapeOperation",void 0),e([i({constructOnly:!0})],h.prototype,"view",void 0),e([i({constructOnly:!0})],h.prototype,"automaticAreaMeasurementUtils",void 0),e([i({constructOnly:!0})],h.prototype,"automaticLengthMeasurementUtils",void 0),e([i({constructOnly:!0})],h.prototype,"object",void 0),e([i()],h.prototype,"enableZShape",void 0),e([i()],h.prototype,"enableZVertex",void 0),e([i()],h.prototype,"enableMoveObject",void 0),e([i()],h.prototype,"enableDeleteVertices",void 0),e([i()],h.prototype,"autoHideManipulators",void 0),e([i()],h.prototype,"enableMidpoints",void 0),e([i()],h.prototype,"enableEdgeOffset",void 0),e([i()],h.prototype,"type",void 0),e([i({type:a})],h.prototype,"sketchOptions",void 0),e([i()],h.prototype,"snappingManager",void 0),e([i()],h.prototype,"updating",null),e([i()],h.prototype,"activeTooltipInfo",null),e([i()],h.prototype,"tooltip",null),e([i()],h.prototype,"automaticManipulatorSelection",void 0),h=e([n("esri.views.3d.interactive.editingTools.reshape.ReshapeTool3D")],h);export{h as ReshapeTool3D};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{handlesGroup as t}from"../../../../../core/handleUtils.js";import{scale as e,zeroMeters as o}from"../../../../../core/quantityUtils.js";import{watch as n,syncAndInitial as i,sync as a}from"../../../../../core/reactiveUtils.js";import{
|
|
5
|
+
import{handlesGroup as t}from"../../../../../core/handleUtils.js";import{scale as e,zeroMeters as o}from"../../../../../core/quantityUtils.js";import{watch as n,syncAndInitial as i,sync as a}from"../../../../../core/reactiveUtils.js";import{ensureType as s}from"../../../../../core/accessorSupport/ensureType.js";import r from"../../../../../geometry/Point.js";import{manipulatedObjectGeometry as l}from"../manipulatedObjectUtils.js";import{updateXYZFromTooltipInfo as c,updateTooltipInfoFromManipulatedObject as p,updateElevationFromPoint as m}from"../tooltipUtils3D.js";import{ManipulationType as f}from"../manipulations/MoveManipulation.js";import{axisConstrainedDragSign as u}from"../manipulations/moveUtils.js";import{AccumulationBehavior as d}from"../../../../interactive/editGeometry/interfaces.js";import{connectPasteEvent as v,getXYZDeltasFromTooltipInfo as y}from"../../../../interactive/tooltip/tooltipCommonUtils.js";import{MovePointTooltipInfo as h}from"../../../../interactive/tooltip/infos/MovePointTooltipInfo.js";import{ReshapeEdgeOffsetTooltipInfo as g}from"../../../../interactive/tooltip/infos/ReshapeEdgeOffsetTooltipInfo.js";import{SelectedVertexTooltipInfo as T}from"../../../../interactive/tooltip/infos/SelectedVertexTooltipInfo.js";import{TranslateTooltipInfo as k}from"../../../../interactive/tooltip/infos/TranslateTooltipInfo.js";import{TranslateXYTooltipInfo as j}from"../../../../interactive/tooltip/infos/TranslateXYTooltipInfo.js";import{TranslateZTooltipInfo as w}from"../../../../interactive/tooltip/infos/TranslateZTooltipInfo.js";import{verticalSignedDistanceBetweenPoints as I}from"../../../../support/euclideanLengthMeasurementUtils.js";function O(t,e){const o=e?.type;return{edgeOffset:new g({sketchOptions:t,viewType:o}),movePoint:new h({sketchOptions:t,viewType:o}),selectedVertex:new T({sketchOptions:t,viewType:o}),translate:new k({sketchOptions:t,viewType:o}),translateXY:new j({sketchOptions:t,viewType:o}),translateZ:new w({sketchOptions:t,viewType:o})}}function b(e,o,s){function r(){const t=s(),e=t.sketchOptions.tooltips.effectiveEnabled?t.activeTooltipInfo:null;return{...t,activeTooltipInfo:e}}let c=!1;function p(t){c||(c=!0,t(),c=!1)}function m(t){p((()=>{M(o,t),e.info=t.activeTooltipInfo}))}return t([n(r,m,i),n((()=>{const t=r(),{activeTooltipInfo:e}=t;if(e&&"key"in e)return{context:t,activeTooltipInfo:e,key:e.key,geometry:l(o)}}),((t,e)=>{t&&e&&e.key!==t.key&&p((()=>D(o,t.context)))}),a),o.on("committed",(()=>m(r()))),v(e,{onBeforePaste:()=>{c=!0},onAfterPaste:()=>{D(o,r()),c=!1}})])}function D(t,{activeTooltipInfo:e,selectedVertexManipulatorInfo:o,callbacks:n}){if(!e)return;n.onBeforeReshape();const i=l(t);switch(i?.type){case"mesh":"move-point"===e.type&&c(e,i.origin,t,n);break;case"point":"move-point"===e.type&&c(e,i,t,n);break;case"polyline":case"polygon":"selected-vertex"===e.type&&L(e,o,t,n)}}function L(t,e,o,n){if(!e)return;const{dx:i,dy:a,dz:s}=y(t,e.manipulator.location);0===i&&0===a&&0===s||(n.onReshapeStart(),o.operations?.moveVertices([e.handle],i,a,s,d.NEW_STEP),n.onReshape(),n.onReshapeStop())}function M(t,e){const{activeTooltipInfo:o,selectedVertexManipulatorInfo:n,sketchOptions:i}=e;if(o)switch(o.sketchOptions=i,o?.type){case"move-point":p(o,t);break;case"selected-vertex":U(o,n,t,e)}}function U(t,e,o,{automaticAreaMeasurementUtils:n,automaticLengthMeasurementUtils:i}){if(!t||"selected-vertex"!==t.type)return;const a=e?.manipulator.location;t.setLocationFromPoint(a),m(t,a,o);const s=o.operations?.data.geometry;switch(s?.type){case"polygon":t.geometryType="polygon",t.totalLength.visible=!1,t.area.actual=n.autoArea2D(s);break;case"polyline":t.geometryType="polyline",t.totalLength.actual=i.autoLength2D(s),t.area.visible=!1}}const x=s(r);function P(t,o,{sketchOptions:n,tooltipInfos:i,automaticLengthMeasurementUtils:a}){let s=null;switch(t){case f.XY:s=i.translate,A(s,o,((t,e)=>a.autoDistanceBetweenPoints2D(x(t),x(e))));break;case f.XY_AXIS:s=i.translateXY,A(s,o,((t,n)=>e(a.autoDistanceBetweenPoints2D(x(t),x(n)),u(o))));break;case f.Z:s=i.translateZ,A(s,o,I)}return s.sketchOptions=n,s}function A(t,e,n){if(null!=e&&"end"!==e.action){const{mapStart:i,mapEnd:a}=e,s=n(i,a);t.distance=null!=s?s:o}else t.distance=o}function S({operations:t},n,{sketchOptions:i,tooltipInfos:a,automaticAreaMeasurementUtils:s,automaticLengthMeasurementUtils:r}){const l=a.edgeOffset;if(l.distance.committed=null,null!=n&&null!=n.signedDistance&&"end"!==n.action&&null!=t){const o=t.data.coordinateHelper,{start:i,end:a}=n.operation.clampedStartAndEnd(n.mapEnd),s=r.autoDistance2D(i,a,o.spatialReference),c=Math.sign(n.signedDistance*n.operation.selectedArrow);l.distance.actual=null!=s?e(s,c):null}else l.distance.actual=o;const c=t?.data.geometry;switch(l.area.actual=null,l.area.visible=!1,l.totalLength.actual=null,l.totalLength.visible=!1,c?.type){case"polygon":l.area.actual=s.autoArea2D(c),l.area.visible=!0;break;case"polyline":l.totalLength.actual=r.autoLength2D(c),l.totalLength.visible=!0}return l.sketchOptions=i,l}export{b as connectTooltipToManipulatedObject,O as createTooltipInfos,S as getUpdatedEdgeOffsetTooltipInfo,P as getUpdatedTranslateObjectTooltipInfo};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../../chunks/tslib.es6.js";import e from"../../../../../core/Evented.js";import{makeHandle as i}from"../../../../../core/handleUtils.js";import"../../../../../core/has.js";import{watch as o,initial as a}from"../../../../../core/reactiveUtils.js";import{property as s}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as n}from"../../../../../core/accessorSupport/decorators/subclass.js";import{containsXY as r}from"../../../../../geometry/support/aaBoundingRect.js";import{sm4d as l}from"../../../../../geometry/support/vectorStacks.js";import{calculateBoundedPlaneTranslateRotate as p,resizeNormal as h,resizeOutlineOnly as c}from"../../../analysis/Slice/sliceToolUtils.js";import{Manipulator3D as d}from"../../Manipulator3D.js";import{manipulatedObjectGeometry as u}from"../manipulatedObjectUtils.js";import{ManipulatorType as m}from"../ManipulatorType.js";import{canMoveZOperations as b}from"../manipulatorUtils.js";import{createVisualElements as v}from"../visualElementUtils.js";import{ExtentMove as _}from"./extentTransform/ExtentMove.js";import{ExtentRotate as g}from"./extentTransform/ExtentRotate.js";import{ExtentScale as f}from"./extentTransform/ExtentScale.js";import{TransformBounds as
|
|
5
|
+
import{_ as t}from"../../../../../chunks/tslib.es6.js";import e from"../../../../../core/Evented.js";import{makeHandle as i}from"../../../../../core/handleUtils.js";import"../../../../../core/has.js";import{watch as o,initial as a}from"../../../../../core/reactiveUtils.js";import{property as s}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as n}from"../../../../../core/accessorSupport/decorators/subclass.js";import{containsXY as r}from"../../../../../geometry/support/aaBoundingRect.js";import{sm4d as l}from"../../../../../geometry/support/vectorStacks.js";import{calculateBoundedPlaneTranslateRotate as p,resizeNormal as h,resizeOutlineOnly as c}from"../../../analysis/Slice/sliceToolUtils.js";import{Manipulator3D as d}from"../../Manipulator3D.js";import{manipulatedObjectGeometry as u}from"../manipulatedObjectUtils.js";import{ManipulatorType as m}from"../ManipulatorType.js";import{canMoveZOperations as b}from"../manipulatorUtils.js";import{createVisualElements as v}from"../visualElementUtils.js";import{ExtentMove as _}from"./extentTransform/ExtentMove.js";import{ExtentRotate as g}from"./extentTransform/ExtentRotate.js";import{ExtentScale as f}from"./extentTransform/ExtentScale.js";import{TransformBounds as y}from"./extentTransform/extentUtils.js";import{PreserveAspectRatio as j}from"./extentTransform/PreserveAspectRatio.js";import{SnapRotation as M}from"./extentTransform/SnapRotation.js";import{OutlineVisualElement as R}from"../../visualElements/OutlineVisualElement.js";import{InteractiveToolBase as x}from"../../../../interactive/InteractiveToolBase.js";import E from"../../../../interactive/sketch/SketchOptions.js";import{makeTooltip as A}from"../../../../interactive/tooltip/tooltipCommonUtils.js";let S=class extends x{get updating(){return!!this.object.updating}constructor(t){super(t),this.events=new e,this.enableZ=!0,this.enableScaling=!0,this.enableRotation=!0,this.sketchOptions=new E,this._preserveAspectRatio=new j,this._snapRotation=new M,this.grabbing=!1,this.inputState=null,this._attachmentOrigin=null,this.type="transform-3d",this._outlineVisualElement=null}initialize(){const{view:t,object:e}=this,s=this._bounds=new y(this,(()=>this._updateManipulators()));this._extentMove=new _(this,s,this.automaticLengthMeasurementUtils),this._extentScale=new f(this,s,(()=>this._preserveAspectRatio.createDragEventPipelineStep())),this._extentRotate=new g(this,s,(()=>this._snapRotation.createDragEventPipelineStep())),this.addHandles([o((()=>this.enableZ),(()=>this._updateManipulatorAvailability(this._extentMove.moveZManipulator,m.TRANSLATE_Z))),o((()=>this.enableScaling),(()=>this._extentScale.forEachManipulator((t=>this._updateManipulatorAvailability(t,m.SCALE))))),o((()=>this.enableRotation),(()=>this._updateManipulatorAvailability(this._extentRotate.rotateManipulator,m.ROTATE)))]),this._updateManipulators(),this._updateAllManipulatorAvailability();const n=v({view:t,object:e,forEachManipulator:t=>this._forEachManipulator(t),onManipulatorsChanged:()=>i()});if(null!=n){const{visualElement:t}=n;t instanceof R&&(this._outlineVisualElement=t,this.addHandles(t.events.on("attachment-origin-changed",(()=>this._bounds.updateDisplayBounds())))),this.addHandles(n)}this.addHandles([e.on("committed",(()=>this._onGeometryChanged())),o((()=>this.object.visible),(()=>this._updateAllManipulatorAvailability())),o((()=>this.object.isDraped),(()=>this._graphicDrapedChanged()),a),o((()=>t.pointsOfInterest?.centerOnSurfaceFrequent.location),(()=>s.updateDisplayBounds()))]);const r=t=>{this.addHandles(t.events.on("grab-changed",(()=>{this.grabbing=t.grabbing,this._updateAllManipulatorAvailability()})))};this._forEachManipulator(r);const l=(t,i)=>{this.addHandles(t.events.on("immediate-click",(t=>{i===m.TRANSLATE_XY&&this.events.emit("immediate-click",{...t,object:e}),t.stopPropagation()})))};this._forEachManipulator(l),this._initializeTooltip(),this.finishToolCreation()}destroy(){this._extentMove.destroy(),this._extentScale.destroy(),this._extentRotate.destroy(),this.tooltip.destroy(),this._set("view",null),this._set("object",null)}_initializeTooltip(){const{view:t}=this;this.tooltip=A((()=>({view:t,options:this.sketchOptions.tooltips})));const e=()=>{this.tooltip.info=this._getUpdatedTooltipInfo()};this.addHandles([o((()=>this.sketchOptions.tooltips.effectiveEnabled),e),o((()=>this.preserveAspectRatio),e)]),this._forEachManipulator((t=>{this.addHandles([t.events.on(["focus-changed","grab-changed"],e),t.events.on("drag",(t=>{"cancel"===t.action?this.tooltip.clear():e()}))])}))}_getUpdatedTooltipInfo(){return this.sketchOptions.tooltips.effectiveEnabled?this._extentMove.getUpdatedTooltipInfo()??this._extentScale.getUpdatedTooltipInfo()??this._extentRotate.getUpdatedTooltipInfo():null}_onGeometryChanged(){this._bounds.updateDisplayBounds()}_graphicDrapedChanged(){this.removeHandles(T),this._bounds.updateDisplayBounds(),this.object.isDraped&&this.addHandles(this.view.elevationProvider.on("elevation-change",(t=>{null!=this._attachmentOrigin&&r(t.extent,this._attachmentOrigin.x,this._attachmentOrigin.y)&&this._bounds.updateDisplayBounds()})),T)}_updateManipulators(){if(!this.visible)return;const t=this._bounds.displayBounds,e=p(t,l.get());this._extentMove.updateManipulators(e,t),this._extentScale.updateManipulators(e,t),this._extentRotate.updateManipulators(e,t)}_updateAllManipulatorAvailability(){this._forEachManipulator(((t,e)=>this._updateManipulatorAvailability(t,e)))}_updateManipulatorAvailability(t,e){const i=this.grabbing&&!t.grabbing;if(t.interactive=!i,t instanceof d){const o=this.object.visible,a=this.enableZ&&b(this.object.operations,this.object.elevationInfo);switch(e){case m.ROTATE:t.available=o&&this.enableRotation;break;case m.SCALE:t.available=o&&(this.enableScaling||this.enableRotation||a),t.interactive=!i&&this.enableScaling,t.state=this.enableScaling?h:c;break;case m.TRANSLATE_Z:t.available=o&&a;break;default:t.available=o}}}_forEachManipulator(t){this._extentMove.forEachManipulator(t),this._extentScale.forEachManipulator(t),this._extentRotate.forEachManipulator(t)}get preserveAspectRatio(){return this._preserveAspectRatio.enabled}set preserveAspectRatio(t){this._preserveAspectRatio.enabled=t,this._set("preserveAspectRatio",t)}get snapRotation(){return this._snapRotation.enabled}set snapRotation(t){this._snapRotation.enabled=t,this._set("snapRotation",t)}get attachmentOrigin(){const t=this.object.isDraped?null:this._outlineVisualElement?.attachmentOrigin;return this._attachmentOrigin=t??this.object.origin??u(this.object)?.extent?.center,this._attachmentOrigin}reset(){}cancelDrag(){if(this.canUndo){const t=this.object.operations?.undo();t&&this._bounds.updateMapBoundsFromOperationInverse(t)}this.inputState=null}get canUndo(){return!!this.object.operations?.canUndo}undo(){if(null!=this.inputState)this.view.activeTool=null;else if(this.canUndo){const t=this.object.operations?.undo();t&&this._bounds.updateMapBoundsFromOperationInverse(t)}}get canRedo(){return!!this.object.operations?.canRedo}redo(){if(this.canRedo){const t=this.object.operations?.redo();t&&this._bounds.updateMapBoundsFromOperation(t)}}get test(){}};t([s()],S.prototype,"updating",null),t([s({constructOnly:!0,nonNullable:!0})],S.prototype,"view",void 0),t([s({constructOnly:!0})],S.prototype,"automaticLengthMeasurementUtils",void 0),t([s({constructOnly:!0,nonNullable:!0})],S.prototype,"object",void 0),t([s()],S.prototype,"enableZ",void 0),t([s()],S.prototype,"enableScaling",void 0),t([s()],S.prototype,"enableRotation",void 0),t([s({constructOnly:!0,type:E})],S.prototype,"sketchOptions",void 0),t([s()],S.prototype,"preserveAspectRatio",null),t([s()],S.prototype,"snapRotation",null),t([s()],S.prototype,"grabbing",void 0),t([s()],S.prototype,"inputState",void 0),t([s({readOnly:!0})],S.prototype,"type",void 0),t([s()],S.prototype,"tooltip",void 0),S=t([n("esri.views.3d.interactive.editingTools.transform.ExtentTransformTool")],S);const T="draped-elevation-changes";export{S as ExtentTransformTool};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{makeHandle as t}from"../../../../../../core/handleUtils.js";import{zeroMeters as e}from"../../../../../../core/quantityUtils.js";import{rotateZ as o}from"../../../../../../core/libs/gl-matrix-2/math/mat4.js";import{d as i}from"../../../../../../chunks/vec32.js";import{clone as n}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{sm4d as a,sv3d as
|
|
5
|
+
import{makeHandle as t}from"../../../../../../core/handleUtils.js";import{zeroMeters as e}from"../../../../../../core/quantityUtils.js";import{rotateZ as o}from"../../../../../../core/libs/gl-matrix-2/math/mat4.js";import{d as i}from"../../../../../../chunks/vec32.js";import{clone as n}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{sm4d as a,sv3d as s}from"../../../../../../geometry/support/vectorStacks.js";import{ShiftManipulator as r,OffsetMode as l}from"../../../../analysis/Slice/ShiftManipulator.js";import{IsShiftEdgeOnScreenFlag as p}from"../../../../analysis/Slice/sliceToolUtils.js";import{screenToZConstrained as c}from"../../dragEventPipeline3D.js";import{ManipulatorType as m}from"../../ManipulatorType.js";import{MoveXYObjectManipulation as u}from"../../manipulations/MoveXYObjectManipulation.js";import{createManipulatorDragEventPipeline as h,addMapDelta as d,addScreenDelta as v}from"../../../../../interactive/dragEventPipeline.js";import{AccumulationBehavior as f}from"../../../../../interactive/editGeometry/interfaces.js";import{TranslateTooltipInfo as _}from"../../../../../interactive/tooltip/infos/TranslateTooltipInfo.js";import{TranslateZTooltipInfo as M}from"../../../../../interactive/tooltip/infos/TranslateZTooltipInfo.js";import{verticalSignedDistance as g}from"../../../../../support/euclideanLengthMeasurementUtils.js";class j{get _object(){return this._tool.object}get _operations(){return this._object.operations}constructor(t,e,o){this._tool=t,this._bounds=e,this._automaticLengthMeasurementUtils=o,this._moveXYTooltipInfo=null,this._moveZTooltipInfo=null;const i=this._tool,n=i.view;this.moveXYObjectManipulation=new u({view:n,tool:i,object:this._object}),i.addHandles(this._createMoveXYObjectDragPipeline()),this.moveZManipulator=new r(n,l.CENTER_ON_CALLOUT),this.moveZManipulator.state|=p,i.manipulators.add(this.moveZManipulator),i.addHandles(this._createMoveZDragPipeline()),i.addHandles(i.events.on("translate-stop",(()=>{this._moveXYTooltipInfo=null,this._moveZTooltipInfo=null})))}destroy(){this.moveXYObjectManipulation.destroy(),this._tool.manipulators.remove(this.moveZManipulator),this.moveZManipulator.destroy()}forEachManipulator(t){this.moveXYObjectManipulation.forEachManipulator(t),t(this.moveZManipulator,m.TRANSLATE_Z)}updateManipulators(t,e){const n=this.moveZManipulator,r=o(a.get(),t,Math.PI);r[12]=0,r[13]=0,r[14]=0,n.modelTransform=r,n.renderLocation=i(s.get(),e.origin,e.basis1)}getUpdatedTooltipInfo(){return this.moveXYObjectManipulation.grabbing||this.moveXYObjectManipulation.dragging?this._computeMoveXYTooltipInfo():this.moveZManipulator.focused?this._computeMoveZTooltipInfo():null}_computeMoveXYTooltipInfo(){const t=this._tool,o=this._moveXYTooltipInfo??=new _({sketchOptions:t.sketchOptions});if(this.moveXYObjectManipulation.dragging){const e=this._bounds,i=e.mapBoundsStart.origin,n=e.mapBounds.origin,{renderSpatialReference:a}=t.view;if(!a)return null;const s=this._automaticLengthMeasurementUtils.autoDistance2D(i,n,a);if(null==s)return null;o.distance=s}else o.distance=e;return o}_computeMoveZTooltipInfo(){const t=this._tool,o=this._moveZTooltipInfo??=new M({sketchOptions:t.sketchOptions});if(this.moveZManipulator.dragging){const e=this._bounds,i=e.mapBoundsStart.origin,n=e.mapBounds.origin,{renderSpatialReference:a}=t.view;if(!a)return null;const s=g(i,n,a);if(null==s)return null;o.distance=s}else o.distance=e;return o}_createMoveXYObjectDragPipeline(){return this.moveXYObjectManipulation.createDragPipeline(((t,e,o)=>this._buildMoveDragPipeline(e,o)))}_createMoveZDragPipeline(){if(!this._operations)return t();const e=this._operations.data.spatialReference;return h(this.moveZManipulator,((t,o,i)=>{const a=n(t.renderLocation),s=o.next(c(this._tool.view,a,e)).next(v());this._buildMoveDragPipeline(s,i)}))}_buildMoveDragPipeline(t,e){const{_tool:o,_object:i}=this;t.next((t=>("start"===t.action&&(o.inputState={type:"move"},this._bounds.backupMapBounds(),o.events.emit("translate-start",{object:i,dxScreen:t.screenDeltaX,dyScreen:t.screenDeltaY})),t))).next(d()).next(this._updateGeometry()).next((t=>{const e={object:i,dxScreen:t.screenDeltaX,dyScreen:t.screenDeltaY};switch(t.action){case"start":case"update":(t.mapEnd.x-t.mapStart.x||t.mapEnd.y-t.mapStart.y||(t.mapEnd.z??0)-(t.mapStart.z??0))&&o.events.emit("translate",e);break;case"end":o.inputState=null,o.events.emit("translate-stop",e)}return t})),e.next((()=>{null!=o.inputState&&o.events.emit("translate-stop",{object:i,dxScreen:0,dyScreen:0}),o.cancelDrag()}))}_updateGeometry(){const t=this._tool;return e=>{if(null==t.inputState||"move"!==t.inputState.type)return e;const o="start"===e.action?f.NEW_STEP:f.ACCUMULATE_STEPS;if(this._operations){const t=this._operations.move(e.mapDeltaX,e.mapDeltaY,e.mapDeltaZ,o);this._bounds.updateMapBoundsFromOperation(t)}return e}}}export{j as ExtentMove};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{set as t,normalize as e}from"../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as s}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{c as i,b as a,d as o,l as r,e as n}from"../../../../../../chunks/vec32.js";import{create as c}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{d as p,a as l}from"../../../../../../chunks/boundedPlane.js";import{intersectRay as d}from"../../../../../../geometry/support/plane.js";import{sv3d as u}from"../../../../../../geometry/support/vectorStacks.js";import{ResizeManipulator as h}from"../../../../analysis/Slice/ResizeManipulator.js";import{updateResizeHandle as m,isDiagonalResizeHandle as _,calculateDiagonalResizeHandleScale as f}from"../../../../analysis/Slice/sliceToolUtils.js";import{screenToRenderPlane as S}from"../../dragEventPipeline3D.js";import{ManipulatorType as y}from"../../ManipulatorType.js";import{mapPlaneAutoSize2D as g}from"./extentUtils.js";import{fromScreenNormalized as
|
|
5
|
+
import{set as t,normalize as e}from"../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as s}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{c as i,b as a,d as o,l as r,e as n}from"../../../../../../chunks/vec32.js";import{create as c}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{d as p,a as l}from"../../../../../../chunks/boundedPlane.js";import{intersectRay as d}from"../../../../../../geometry/support/plane.js";import{sv3d as u}from"../../../../../../geometry/support/vectorStacks.js";import{ResizeManipulator as h}from"../../../../analysis/Slice/ResizeManipulator.js";import{updateResizeHandle as m,isDiagonalResizeHandle as _,calculateDiagonalResizeHandleScale as f}from"../../../../analysis/Slice/sliceToolUtils.js";import{screenToRenderPlane as S}from"../../dragEventPipeline3D.js";import{ManipulatorType as y}from"../../ManipulatorType.js";import{mapPlaneAutoSize2D as g}from"./extentUtils.js";import{fromScreenNormalized as M}from"../../../../support/geometryUtils/ray.js";import{createManipulatorDragEventPipeline as x}from"../../../../../interactive/dragEventPipeline.js";import{AccumulationBehavior as b}from"../../../../../interactive/editGeometry/interfaces.js";import{AccumulationType as z}from"../../../../../interactive/editGeometry/operations/UpdateVertices.js";import{ExtentScaleTooltipInfo as j}from"../../../../../interactive/tooltip/infos/ExtentScaleTooltipInfo.js";class v{get _object(){return this._tool.object}get _operations(){return this._object.operations}get zMax(){if(!this._zMaxDirty||!this._operations)return this._zMax;const t=this._operations.data;if(t.geometry.hasZ){const e=t.coordinateHelper;this._zMax=Number.NEGATIVE_INFINITY;for(const s of t.components)for(const t of s.vertices){const s=e.getZ(t.pos)??0;this._zMax=Math.max(s,this._zMax)}}else this._zMax=0;return this._zMaxDirty=!1,this._zMax}constructor(t,e,s){this._tool=t,this._bounds=e,this._preserveAspectRatioStep=s,this._resizeHandles=[{direction:[1,0]},{direction:[1,1]},{direction:[0,1]},{direction:[-1,1]},{direction:[-1,0]},{direction:[-1,-1]},{direction:[0,-1]},{direction:[1,-1]}],this._displayBoundsStart=p(),this._displayBoundsMarginStart=0,this._zMax=0,this._zMaxDirty=!0;const i=this._tool,a=i.view;this.resizeManipulators=this._resizeHandles.map((t=>{const e=new h(a,t);return i.addHandles([e.events.on("grab-changed",(t=>this._onGrabChanged(t))),this._createResizeDragPipeline(e,t)]),e})),i.manipulators.addMany(this.resizeManipulators),this._operations&&i.addHandles(this._operations.data.on("change",(()=>{"resize"!==i.inputState?.type&&(this._zMaxDirty=!0)})))}destroy(){this.forEachManipulator((t=>{this._tool.manipulators.remove(t),t.destroy()}))}forEachManipulator(t){this.resizeManipulators.forEach((e=>t(e,y.SCALE)))}updateManipulators(t,e){this.resizeManipulators.forEach(((s,i)=>{m(s,this._resizeHandles[i],t,e)}))}getUpdatedTooltipInfo(){if(!this.resizeManipulators.some((t=>t.focused)))return null;const t=this._tooltipInfo??=new j({sketchOptions:this._tool.sketchOptions}),e=g(this._bounds.mapBounds,this.zMax,this._bounds.spatialReference,this._tool.automaticLengthMeasurementUtils);return e&&(t.xSize=e.xSize,t.ySize=e.ySize),this.resizeManipulators.some((t=>t.dragging))||(t.xScale=1,t.yScale=1),t}_onGrabChanged({action:t,screenPoint:e}){const s=this._tool,i=this._bounds;if("start"!==t||!e)return;const a=M(s.view.state.camera,e);d(i.displayBounds.plane,a,u.get())&&(i.backupMapBounds(),l(i.displayBounds,this._displayBoundsStart),this._displayBoundsMarginStart=i.displayBoundsMargin,s.inputState={type:"resize"})}_createResizeDragPipeline(t,e){const{_tool:s,_object:i}=this;return x(t,((t,a,o)=>{null!=s.inputState&&(a.next((t=>("start"===t.action&&s.events.emit("scale-start",{object:i,xScale:1,yScale:1}),{...t,handle:e}))).next(S(s.view,this._displayBoundsStart.plane)).next(this._renderPlaneToFactors()).next(...this._preserveAspectRatioStep()).next(this._updateGeometry()).next((t=>{const e=this._tooltipInfo;e&&(e.xScale=t.factor1,e.yScale=t.factor2);const a={object:i,xScale:t.factor1,yScale:t.factor2};switch(t.action){case"start":case"update":s.events.emit("scale",a);break;case"end":s.inputState=null,s.events.emit("scale-stop",a)}return t})),o.next((()=>{null!=s.inputState&&s.events.emit("scale-stop",{object:i,xScale:1,yScale:1}),s.cancelDrag()})))}))}_renderPlaneToFactors(){const t=this._bounds;return e=>{const s=this._displayBoundsStart,c=e.handle.direction,p=t.displayBoundsMargin,l=this._displayBoundsMarginStart,d=i(u.get(),s.origin);a(d,d,s.basis1,-c[0]),a(d,d,s.basis2,-c[1]);const h=o(u.get(),e.renderEnd,d),m=o(u.get(),e.renderStart,d),S=_(e.handle),y=f(s),g=f(t.displayBounds)/y,M=(t,e)=>{if(0===t)return 1;let s=r(e),i=.5*t*n(e,h)/s;const a=i<0?-1:1;if(S){i+=(s-.5*t*n(e,m)/s)*a*g}const o=s<1.5*l?1:B;return s=Math.max(s-l,B),a>0&&(i-=p),a*Math.max(a*(i/s),o)};return{...e,factor1:M(c[0],s.basis1),factor2:M(c[1],s.basis2)}}}_updateGeometry(){const o=this._bounds;return r=>{const n=i(c(),o.mapBoundsStart.origin);a(n,n,o.mapBoundsStart.basis1,-r.handle.direction[0]),a(n,n,o.mapBoundsStart.basis2,-r.handle.direction[1]);const p=t(s(),o.mapBoundsStart.basis1[0],o.mapBoundsStart.basis1[1]);e(p,p);const d="start"===r.action?b.NEW_STEP:b.ACCUMULATE_STEPS;if(this._operations){const t=this._operations.scale(n,p,r.factor1,r.factor2,d,z.REPLACE);l(o.mapBoundsStart,o.mapBounds),o.updateMapBoundsFromOperation(t)}return r}}}const B=1e-6;export{v as ExtentScale,B as scaleEpsilon};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{on as s}from"../../../../../../core/reactiveUtils.js";import{scale as t}from"../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{f as i,d as o,g as a,m as e,h as n,n as r,e as p,c as d,b as c}from"../../../../../../chunks/vec32.js";import{create as l}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{d as u,a as m,u as b}from"../../../../../../chunks/boundedPlane.js";import{fromPositionAndNormal as h,projectPoint as g}from"../../../../../../geometry/support/plane.js";import{sv3d as f}from"../../../../../../geometry/support/vectorStacks.js";import{mainAxis as B}from"../../geometryUtils.js";import{manipulatedObjectGeometry as
|
|
5
|
+
import{on as s}from"../../../../../../core/reactiveUtils.js";import{scale as t}from"../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{f as i,d as o,g as a,m as e,h as n,n as r,e as p,c as d,b as c}from"../../../../../../chunks/vec32.js";import{create as l}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{d as u,a as m,u as b}from"../../../../../../chunks/boundedPlane.js";import{fromPositionAndNormal as h,projectPoint as g}from"../../../../../../geometry/support/plane.js";import{sv3d as f}from"../../../../../../geometry/support/vectorStacks.js";import{mainAxis as B}from"../../geometryUtils.js";import{manipulatedObjectGeometry as M}from"../../manipulatedObjectUtils.js";import{evaluateElevationAlignmentAtPoint as y}from"../../../../layers/graphics/elevationAlignmentUtils.js";import{ElevationContext as j}from"../../../../layers/graphics/ElevationContext.js";import{apply as v,applyInverse as _,calculateOrientedBounds as R}from"../../../../../interactive/editGeometry/support/editPlaneUtils.js";import{autoSize2D as x}from"../../../../../support/extentUtils.js";class C{constructor(t,i){this._tool=t,this.mapBounds=u(),this.mapBoundsStart=u(),this.displayBounds=u(),t.addHandles(s((()=>t.object),"modified-externally",(()=>this._resetMapBounds()),{onListenerAdd:()=>this._resetMapBounds()})),this._onDisplayBoundsChanged=i}get displayBoundsMargin(){const{view:s,object:t}=this._tool,i=M(t),o=s.pointsOfInterest?.centerOnSurfaceFrequent.location??i?.extent?.center;return o?D*s.pixelSizeAt(o):0}backupMapBounds(){m(this.mapBounds,this.mapBoundsStart)}updateDisplayBounds(){this._calculateDisplayBounds(),this._onDisplayBoundsChanged?.()}updateMapBoundsFromOperation(s){v(s,this.mapBounds),this.updateDisplayBounds()}updateMapBoundsFromOperationInverse(s){_(s,this.mapBounds),this.updateDisplayBounds()}_resetMapBounds(){this._calculateMapBounds(),this.updateDisplayBounds()}_calculateMapBounds(){const{view:s,attachmentOrigin:i,object:o}=this._tool,a=o.operations?.data;if(!a)return;const e=a.geometry;this.spatialReference=e.spatialReference;const n=B(e);t(n,n,-1);const r=i?s.pixelSizeAt(i,e.spatialReference):0,p=O*r,d=a.coordinateHelper.hasZ()&&"on-the-ground"!==o.elevationInfo.mode;R(n,a,p,this.mapBounds,d)}_calculateDisplayBounds(){const{view:s,attachmentOrigin:t}=this._tool,i=t?.z??y(this.mapBounds.origin,s.elevationProvider,j.fromElevationInfo(this._tool.object.elevationInfo),s.renderCoordsHelper);U(this.mapBounds,i??0,s.renderCoordsHelper,this.spatialReference,this.displayBoundsMargin,this.displayBounds)}}const D=10,O=80;function U(s,t,c,l,m=0,B){B||(B=u());const M=f.get();i(M,s.origin,s.basis1),i(M,M,s.basis2),c.toRenderCoords(M,l,M);const y=f.get();i(y,s.origin,s.basis1),o(y,y,s.basis2),c.toRenderCoords(y,l,y);const j=f.get();o(j,s.origin,s.basis1),o(j,j,s.basis2),c.toRenderCoords(j,l,j);const v=f.get();o(v,s.origin,s.basis1),i(v,v,s.basis2),c.toRenderCoords(v,l,v),i(B.origin,M,y),i(B.origin,B.origin,j),i(B.origin,B.origin,v),a(B.origin,B.origin,.25),o(M,M,B.origin),o(y,y,B.origin),o(j,j,B.origin),o(v,v,B.origin);const _=e(f.get(),M,y,.5),R=e(f.get(),j,v,.5);a(R,R,-1),e(B.basis1,_,R,.5);const x=e(f.get(),M,v,.5),C=e(f.get(),y,j,.5);a(C,C,-1),e(B.basis2,x,C,.5);const D=n(f.get(),B.basis1,B.basis2);n(B.basis2,D,B.basis1),r(B.basis1,B.basis1);const O=Math.max(Math.abs(p(B.basis1,M)),Math.abs(p(B.basis1,y)),Math.abs(p(B.basis1,j)),Math.abs(p(B.basis1,v)));r(B.basis2,B.basis2);const U=Math.max(Math.abs(p(B.basis2,M)),Math.abs(p(B.basis2,y)),Math.abs(p(B.basis2,j)),Math.abs(p(B.basis2,v)));a(B.basis1,B.basis1,O+m),a(B.basis2,B.basis2,U+m);const S=d(f.get(),s.origin);return S[2]=t,c.toRenderCoords(S,l,S),h(S,D,B.plane),g(B.plane,B.origin,B.origin),b(B),B}function S(s,t,i,a){return o(H,o(H,s.origin,s.basis1),s.basis2),c(A,H,s.basis1,2),c(k,A,s.basis2,2),c(I,H,s.basis2,2),H[2]=A[2]=k[2]=I[2]=t,x({topLeft:I,topRight:k,bottomRight:A,bottomLeft:H,spatialReference:i,automaticLengthMeasurementUtils:a})}const I=l(),k=l(),A=l(),H=l();export{C as TransformBounds,S as mapPlaneAutoSize2D};
|
package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../../chunks/tslib.es6.js";import"../../../../../core/has.js";import{destroyMaybe as e}from"../../../../../core/maybe.js";import{memoize as i}from"../../../../../core/memoize.js";import{when as n,watch as a,syncAndInitial as s}from"../../../../../core/reactiveUtils.js";import{property as r}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as o}from"../../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as l}from"../../../../../core/support/UpdatingHandles.js";import u from"../../../../../geometry/Point.js";import{clonePoint as p}from"../../../../../layers/graphics/hydratedFeatures.js";import{isPrimaryPointerAction as c}from"../../../analysis/support/measurementUtils.js";import{SnappingVisualizer3D as d}from"../../SnappingVisualizer3D.js";import{SurfaceType as
|
|
5
|
+
import{_ as t}from"../../../../../chunks/tslib.es6.js";import"../../../../../core/has.js";import{destroyMaybe as e}from"../../../../../core/maybe.js";import{memoize as i}from"../../../../../core/memoize.js";import{when as n,watch as a,syncAndInitial as s}from"../../../../../core/reactiveUtils.js";import{property as r}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as o}from"../../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as l}from"../../../../../core/support/UpdatingHandles.js";import u from"../../../../../geometry/Point.js";import{clonePoint as p}from"../../../../../layers/graphics/hydratedFeatures.js";import{isPrimaryPointerAction as c}from"../../../analysis/support/measurementUtils.js";import{SnappingVisualizer3D as d}from"../../SnappingVisualizer3D.js";import{SurfaceType as h,hideManipulatorWhileDragging as m,screenToMap3D as g}from"../../editingTools/dragEventPipeline3D.js";import{DirectLineMeasurement3DView as v}from"./DirectLineMeasurement3DView.js";import{getElevationAtPoint as P}from"../../../support/ElevationProvider.js";import{AnalysisToolBase as f}from"../../../../interactive/AnalysisToolBase.js";import{createCoordinateHelper as y}from"../../../../interactive/coordinateHelper.js";import{createManipulatorDragEventPipeline as w,resetProperties as S}from"../../../../interactive/dragEventPipeline.js";import{EditGeometry as _}from"../../../../interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as M}from"../../../../interactive/editGeometry/EditGeometryOperations.js";import{SnappingContext as D}from"../../../../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as j}from"../../../../interactive/snapping/SnappingDragPipelineStep.js";import{acquire as b}from"../../../../interactive/snapping/SnappingManagerPool.js";import{setupSnappingToggleHandles as L}from"../../../../interactive/snapping/snappingUtils.js";import{createScreenPointFromEvent as x}from"../../../../support/screenUtils.js";let V=class extends f{constructor(t){super(t),this._updatingHandles=new l,this._emulatedDrag=null,this.lineState="initial",this.removeIncompleteOnCancel=!1,this.startPointSurfaceLocation=null,this.endPointSurfaceLocation=null,this.cursorPointSurfaceLocation=null,this.startManipulator=null,this.endManipulator=null,this.cursorManipulator=null,this._getSnappingContext=i((t=>new D({elevationInfo:{mode:"absolute-height",offset:0},pointer:t,editGeometryOperations:new M(new _("point",y(!0,!1,this.view.spatialReference)),this.view.state.viewingMode),visualizer:new d})))}initialize(){const{view:t,analysis:e,analysisViewData:i,visible:r}=this;this.measurementView=new v({toolState:this,view:t,analysis:e,analysisViewData:i,visible:r});const o=b(t);this._snappingManagerResult=o,this.addHandles(o);const{start:l,end:c,cursor:d}=this.measurementView.createManipulators(),h=(t,e,i)=>w(t,((t,n,a,s)=>{const r=m(t),o=this._snappingManager,l=this._getSnappingContext(s),c=this._updatingHandles,{lineState:d}=this;a=a.next(r).next(S(this,[i,e])).next((i=>{if("cursorPoint"!==e){const i=this.analysis[e];null!=i&&(t.location=i)}return i}));const h=g(this.view),v=t=>{const n=h(t);return n||"drawing"!==this.lineState&&"initial"!==this.lineState||(this[e]=null,this[i]=null),n};let P=n.next(r).next(v);if("touch"!==s||"editing"===d){const{snappingStep:t,cancelSnapping:e}=j({snappingManager:o,snappingContext:l,updatingHandles:c});a=a.next(e),P=P.next(...t)}P.next((t=>"start"!==t.action?t:null)).next((n=>{const a=p(n.mapEnd,new u);this[e]=a,t.location=a,this[i]=this._surfaceLocation(a,n.surfaceType)}))})),P=t=>t.events.on("grab-changed",(()=>{const t=l.grabbing||c.grabbing;this.lineState=t?"editing":"measured"}));this.addHandles([h(l,"startPoint","startPointSurfaceLocation"),h(c,"endPoint","endPointSurfaceLocation"),h(d,"cursorPoint","cursorPointSurfaceLocation"),P(l),P(c)]),this.manipulators.add(l),this.manipulators.add(c),this.manipulators.add(d),this.startManipulator=l,this.endManipulator=c,this.cursorManipulator=d,this.addHandles([n((()=>"measured"===this.state),(()=>{this.finishToolCreation(),this.active&&(this.view.activeTool=null)}),s),a((()=>({startPointAvailable:null!=this.startPoint,endPointAvailable:null!=this.endPoint})),(({startPointAvailable:t,endPointAvailable:e})=>{this.startManipulator.available=t,this.endManipulator.available=e}),s)]),L(this)}destroy(){this._updatingHandles=e(this._updatingHandles),this.measurementView=e(this.measurementView)}get _snappingManager(){return this._snappingManagerResult.snappingManager}get state(){const{analysis:t}=this;if(null==t.startPoint&&null==t.endPoint)return"ready";const{lineState:e}=this;return this.validMeasurement&&"editing"!==e&&"drawing"!==e?"measured":"measuring"}get cursor(){return!this.active||"ready"!==this.state&&"measured"===this.lineState?null:"crosshair"}get startPoint(){return this.analysis.startPoint}set startPoint(t){this.analysis.startPoint=t}get endPoint(){return this.analysis.endPoint}set endPoint(t){this.analysis.endPoint=t}get cursorPoint(){return this.measurementView.cursorPoint}set cursorPoint(t){this.measurementView.cursorPoint=t}get snappingOptions(){return this._snappingManager.options}get validMeasurement(){return null!=this.analysis.startPoint&&null!=this.analysis.endPoint}get updating(){return this._updatingHandles.updating||this._snappingManager.updating}resetCreated(){super.resetCreated(),this.lineState="initial",this.cursorPoint=null}onShow(){this.measurementView.show()}onHide(){this.measurementView.hide()}onActivate(){"measured"===this.state&&this.finishToolCreation()}onDeactivate(){this._emulatedDrag?.cancel(),this._emulatedDrag=null}onInputEvent(t){switch(t.type){case"immediate-click":this._handleImmediateClick(t);break;case"pointer-move":this._handlePointerMove(t)}}_handlePointerMove(t){if(!this.active||this.view.navigating)return;if("measured"===this.state&&"initial"===this.lineState)return;const{pointerType:e}=t;if("mouse"!==e)return;const i=x(t),{lineState:n,cursorManipulator:a,endManipulator:s}=this;let r=!1;null==this.cursorPoint&&(this._emulatedDrag?.cancel(),this._emulatedDrag=C(a,e,i),r=!0),"initial"===n&&(this._emulatedDrag?.update(i),r=!0),"drawing"===n&&(s.events.emit("drag",{action:"update",start:i,screenPoint:i}),r=!0),r&&t.stopPropagation()}_handleImmediateClick(t){if(!this.active||!c(t))return;const e=x(t),{pointerType:i}=t,{cursorManipulator:n,startManipulator:a,endManipulator:s,lineState:r}=this;let o=!1;switch(null==this.cursorPoint&&(this._emulatedDrag?.cancel(),this._emulatedDrag=C(n,i,e)),r){case"initial":if(this._emulatedDrag?.update(e),null!=this.cursorPoint){this._emulatedDrag?.end(e),this._emulatedDrag=null,this.endPoint=null;const{cursorPoint:t}=this;this.startPoint=t,this.startPointSurfaceLocation=this.cursorPointSurfaceLocation,a.location=t,a.interactive=!1,s.interactive=!1,this.lineState="drawing",this._emulatedDrag=C(s,i,e),o=!0}break;case"drawing":this._emulatedDrag?.update(e),null!=this.endPoint&&(this._emulatedDrag?.end(e),this._emulatedDrag=null,a.interactive=!0,s.interactive=!0,this.lineState="measured",o=!0)}o&&t.stopPropagation()}_surfaceLocation(t,e){return e===h.GROUND?"on-the-surface":(t.z??0)>=this._getElevation(t)?"above-the-surface":"below-the-surface"}_getElevation(t){return this.view.basemapTerrain.ready?P(this.view.elevationProvider,t)??0:0}get test(){}};function C(t,e,i){return t.events.emit("drag",{action:"start",pointerType:e,start:i,screenPoint:i}),{update:e=>t.events.emit("drag",{action:"update",start:e,screenPoint:e}),end:e=>t.events.emit("drag",{action:"end",start:e,screenPoint:e}),cancel:()=>t.events.emit("drag",{action:"cancel"})}}t([r({readOnly:!0})],V.prototype,"state",null),t([r()],V.prototype,"lineState",void 0),t([r({readOnly:!0})],V.prototype,"cursor",null),t([r()],V.prototype,"startPoint",null),t([r()],V.prototype,"endPoint",null),t([r()],V.prototype,"cursorPoint",null),t([r({constructOnly:!0})],V.prototype,"analysis",void 0),t([r({constructOnly:!0})],V.prototype,"analysisViewData",void 0),t([r()],V.prototype,"measurementView",void 0),t([r()],V.prototype,"removeIncompleteOnCancel",void 0),t([r({constructOnly:!0})],V.prototype,"view",void 0),t([r({readOnly:!0})],V.prototype,"validMeasurement",null),t([r({value:null})],V.prototype,"startPointSurfaceLocation",void 0),t([r({value:null})],V.prototype,"endPointSurfaceLocation",void 0),t([r({value:null})],V.prototype,"cursorPointSurfaceLocation",void 0),t([r()],V.prototype,"updating",null),V=t([o("esri.views.3d.interactive.measurementTools.directLineMeasurement3D.DirectLineMeasurement3DTool")],V);export{V as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as s}from"../../../chunks/tslib.es6.js";import{property as
|
|
5
|
+
import{_ as s}from"../../../chunks/tslib.es6.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import{subclass as e}from"../../../core/accessorSupport/decorators/subclass.js";import{LayerView3D as a}from"./LayerView3D.js";import{LayerViewAnalysisViewManager as r}from"./support/LayerViewAnalysisViewManager.js";import n from"../../layers/DimensionLayerView.js";import t from"../../layers/LayerView.js";var o;let l=class extends(a(n(t))){static{o=this}constructor(s){super(s),this.type="dimension-3d",this._analysisViewManager=null}initialize(){this._analysisViewManager=new r({getAnalysis:()=>this.layer.analysis,loadAnalysisViewModule:o.loadAnalysisViewModule,parent:this}),this.addResolvingPromise(this._analysisViewManager.whenAnalysisView())}destroy(){this._analysisViewManager.destroy()}get analysisView(){return this._analysisViewManager.analysisView}whenAnalysisView(){return this._analysisViewManager.whenAnalysisView()}isUpdating(){return this._analysisViewManager.updating}static{this.loadAnalysisViewModule=()=>import("../analysis/DimensionAnalysisView3D.js")}};s([i()],l.prototype,"type",void 0),s([i()],l.prototype,"_analysisViewManager",void 0),s([i({readOnly:!0})],l.prototype,"analysisView",null),l=o=s([e("esri.views.3d.layers.DimensionLayerView3D")],l);const y=l;export{y as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Graphic.js";import r from"../../../core/Error.js";import has from"../../../core/has.js";import{destroyMaybe as i}from"../../../core/maybe.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as n}from"../../../core/accessorSupport/decorators/subclass.js";import{hydrateGraphic as a}from"../../../layers/graphics/hydratedFeatures.js";import{combineTimeExtent as p}from"../../../layers/support/timeSupport.js";import o from"../../../rest/support/Query.js";import{UpdatePolicy as l}from"../webgl-engine/lib/UpdatePolicy.js";import{defaultHighlightName as u}from"../../support/HighlightDefaults.js";import{isInEffectiveScaleRange as h,
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Graphic.js";import r from"../../../core/Error.js";import has from"../../../core/has.js";import{destroyMaybe as i}from"../../../core/maybe.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as n}from"../../../core/accessorSupport/decorators/subclass.js";import{hydrateGraphic as a}from"../../../layers/graphics/hydratedFeatures.js";import{combineTimeExtent as p}from"../../../layers/support/timeSupport.js";import o from"../../../rest/support/Query.js";import{UpdatePolicy as l}from"../webgl-engine/lib/UpdatePolicy.js";import{defaultHighlightName as u}from"../../support/HighlightDefaults.js";import{isInEffectiveScaleRange as h,hasLayerBasedScaleVisibility as y}from"../../support/layerViewUtils.js";import{projectWithZConversionSilent as c}from"../../support/projectionUtils.js";const g=g=>{let d=class extends g{constructor(){super(...arguments),this.highlightOptions=null,this.updatePolicy=l.SYNC,this.slicePlaneEnabled=!1,this.fullExtentInLocalViewSpatialReference=null,this.supportsHeightUnitConversion=!0}initialize(){const e=this.layer;"isTable"in e&&e.isTable?this.addResolvingPromise(Promise.reject(new r("featurelayerview:table-not-supported","table feature layer can't be displayed",{layer:e}))):(this.addResolvingPromise(this._validateGeometryType()),this.addResolvingPromise((async()=>{if(this.destroyed)return;this.fullExtentInLocalViewSpatialReference="local"===this.view.viewingMode?await c(this.layer.fullExtent,this.view.spatialReference):null;const e=await this.createGraphicsPipeline();this.destroyed?e.destroy():(this.graphicsPipeline=e,await e.when())})()),this.notifyChange("updating"))}destroy(){this.graphicsPipeline=i(this.graphicsPipeline)}get dataUpdating(){return!!this.graphicsPipeline?.dataUpdating}get legendEnabled(){return this.canResume()&&this.graphicsPipeline?.legendEnabled}get visibleAtCurrentScale(){return y?h(this.layer.effectiveScaleRange,this.view.scale):!this.graphicsPipeline?.scaleVisibilitySuspended}get symbologySnappingSupported(){return this.graphicsPipeline.symbologySnappingSupported}get hasAllFeatures(){return this.graphicsPipeline.hasAllFeatures}get hasAllFeaturesInView(){return this.graphicsPipeline.hasAllFeaturesInView}get hasFullGeometries(){return this.graphicsPipeline.hasFullGeometries}get timeExtent(){return p(this.layer,this.view?.timeExtent,this._get("timeExtent"))}getHit(e){if(has("feature-pipeline-3d-test"))return this._getHitMock(e);const t=this.graphicsPipeline.findGraphic((t=>t.uid===e));if(null==t)return null;const r=a(t,this.layer);return{type:"graphic",graphic:r,layer:r.layer}}_getHitMock(e){const r=this.layer,i={};i[this.layer.objectIdField]=e;const s=new t({layer:r,sourceLayer:r,visible:!0,symbol:null,attributes:i,geometry:null});return{type:"graphic",graphic:s,layer:s.layer}}whenGraphicBounds(e,t){return this.graphicsPipeline?.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.graphicsPipeline?.computeAttachmentOrigin(e,t)}async elevationAlignPointsInFeatures(e,t){return this.graphicsPipeline.elevationAlignPointsInFeatures(e,t)}async queryForSymbologySnapping(e,t){return this.graphicsPipeline.graphicsQuery.queryForSymbologySnapping(e,t)}queryFeatures(e,t){return this.graphicsPipeline.graphicsQuery.executeQuery(this._ensureQuery(e),t?.signal)}queryObjectIds(e,t){return this.graphicsPipeline.graphicsQuery.executeQueryForIds(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this.graphicsPipeline.graphicsQuery.executeQueryForCount(this._ensureQuery(e),t?.signal)}queryExtent(e,t){return this.graphicsPipeline.graphicsQuery.executeQueryForExtent(this._ensureQuery(e),t?.signal)}_ensureQuery(e){return null==e?this.createQuery():o.from(e)}highlight(e,t){return this.graphicsPipeline.highlight(e,t?.name??u)}maskOccludee(e){return this.graphicsPipeline.maskOccludee(e)}getSuspendInfo(){return{...super.getSuspendInfo(),...this.graphicsPipeline.suspendInfo}}isUpdating(){return!(!this.graphicsPipeline||this.graphicsPipeline.destroyed)&&!(!this.graphicsPipeline?.updating&&this.view?.basemapTerrain?.ready)}async _validateGeometryType(){switch(this.layer.geometryType){case"multipatch":case"multipoint":throw new r("featurelayerview3d:unsupported-geometry-type","Unsupported geometry type ${geometryType}",{geometryType:this.layer.geometryType})}}get performanceInfo(){return this.graphicsPipeline.performanceInfo}queryAttributeBins(){throw new Error("Not implemented")}queryAggregates(){throw new Error("Not implemented")}};return e([s()],d.prototype,"graphicsPipeline",void 0),e([s({readOnly:!0})],d.prototype,"dataUpdating",null),e([s()],d.prototype,"highlightOptions",void 0),e([s()],d.prototype,"suspended",void 0),e([s({readOnly:!0})],d.prototype,"legendEnabled",null),e([s({readOnly:!0})],d.prototype,"visibleAtCurrentScale",null),e([s()],d.prototype,"updating",void 0),e([s({readOnly:!0})],d.prototype,"updatePolicy",void 0),e([s({type:Boolean})],d.prototype,"slicePlaneEnabled",void 0),e([s({readOnly:!0})],d.prototype,"suspendInfo",void 0),e([s()],d.prototype,"symbologySnappingSupported",null),e([s({readOnly:!0})],d.prototype,"hasAllFeatures",null),e([s({readOnly:!0})],d.prototype,"hasAllFeaturesInView",null),e([s({readOnly:!0})],d.prototype,"hasFullGeometries",null),e([s({readOnly:!0})],d.prototype,"timeExtent",null),d=e([n("esri.views.3d.layers.FeatureLikeLayerView3D")],d),d};export{g as FeatureLikeLayerView3D};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Error.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{when as i}from"../../../core/reactiveUtils.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{LayerView3D as a}from"./LayerView3D.js";import{elevationAlignPointsInFeatures as n}from"./graphics/elevationAlignPointsInFeatures.js";import{GraphicsProcessor as p}from"./graphics/GraphicsProcessor.js";import{queryForSymbologySnapping as l}from"./graphics/queryForSymbologySnapping.js";import{LayerViewPerformanceInfo as c}from"./support/LayerViewPerformanceInfo.js";import{UpdatePolicy as h}from"../webgl-engine/lib/UpdatePolicy.js";import d from"../../layers/LayerView.js";import{defaultHighlightName as u}from"../../support/HighlightDefaults.js";import{isInEffectiveScaleRange as g,
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Error.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{when as i}from"../../../core/reactiveUtils.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{LayerView3D as a}from"./LayerView3D.js";import{elevationAlignPointsInFeatures as n}from"./graphics/elevationAlignPointsInFeatures.js";import{GraphicsProcessor as p}from"./graphics/GraphicsProcessor.js";import{queryForSymbologySnapping as l}from"./graphics/queryForSymbologySnapping.js";import{LayerViewPerformanceInfo as c}from"./support/LayerViewPerformanceInfo.js";import{UpdatePolicy as h}from"../webgl-engine/lib/UpdatePolicy.js";import d from"../../layers/LayerView.js";import{defaultHighlightName as u}from"../../support/HighlightDefaults.js";import{isInEffectiveScaleRange as g,hasLayerBasedScaleVisibility as m}from"../../support/layerViewUtils.js";import{projectWithZConversionSilent as y}from"../../support/projectionUtils.js";let f=class extends(a(d)){constructor(){super(...arguments),this.type="graphics-3d",this.symbologySnappingSupported=!0,this._slicePlaneEnabled=!1,this.fullExtentInLocalViewSpatialReference=null,this.ignoresMemoryFactor=!0}get highlightOptions(){return null}initialize(){this._set("processor",new p({owner:this,scaleVisibilityEnabled:!0,frustumVisibilityEnabled:!0})),this.addResolvingPromise(this.processor.initializePromise),this.addHandles(this.layer.on("graphic-update",(e=>this.processor.graphicsCore.graphicUpdateHandler(e)))),this.layer.internal?this.notifyChange("updating"):("local"===this.view.viewingMode&&this.addResolvingPromise((async()=>this.fullExtentInLocalViewSpatialReference=await y(this.layer.fullExtent,this.view.spatialReference))()),this.addHandles(i((()=>this.view?.basemapTerrain?.ready),(()=>()=>this.notifyChange("updating")),{once:!0})))}destroy(){this._updatingHandles.removeAll(),this._set("processor",s(this.processor))}get loadedGraphics(){return this.layer.graphics}get legendEnabled(){return this.canResume()&&!this.processor?.frustumVisibilitySuspended}get visibleAtCurrentScale(){return m?g(this.layer.effectiveScaleRange,this.view.scale):!this.processor?.scaleVisibilitySuspended}get slicePlaneEnabled(){const e=this.layer.internal;return this._slicePlaneEnabled&&!e}set slicePlaneEnabled(e){this._slicePlaneEnabled=e}getSuspendInfo(){const e=super.getSuspendInfo();return e.outsideOfView=this.processor?.frustumVisibilitySuspended??!1,e}getHit(e){return this.processor.getHit(e)}whenGraphicBounds(e,r){return this.processor.whenGraphicBounds(e,r)}computeAttachmentOrigin(e,r){return this.processor?.computeAttachmentOrigin(e,r)}getSymbolLayerSize(e,r){return this.processor.getSymbolLayerSize(e,r)}queryGraphics(){return Promise.resolve(this.loadedGraphics)}maskOccludee(e){return this.processor.maskOccludee(e)}highlight(e,r){return this.processor.highlight(e,r?.name??u)}notifyContentGeometryUpdate(){this.emit("visible-geometry-changed")}async elevationAlignPointsInFeatures(e,s){const{processor:i}=this;if(null==i?.graphics3DGraphics)throw new r("graphicslayerview3d:missing-processor","A Graphics3D processor is needed to resolve graphics elevation.");const{graphics3DGraphics:t}=i,o=e=>"number"==typeof e?t.get(e):void 0;return n(this.view,this.layer,o,e,s)}async queryForSymbologySnapping(e,r){return l(this.processor,e,r)}get updatePolicy(){return this.processor?.graphicsCore.effectiveUpdatePolicy||h.SYNC}isUpdating(){return this.view&&this.layer&&!(!this.processor?.updating&&(this.layer.internal||this.view.basemapTerrain?.ready))}get performanceInfo(){return new c(this.usedMemory,this.loadedGraphics.length,-1,-1)}get usedMemory(){return this.processor?.graphicsCore?.usedMemory??0}get unloadedMemory(){return this.processor?.graphicsCore?.unprocessedMemoryEstimate}get test(){return{graphics3DProcessor:this.processor,loadedGraphics:this.loadedGraphics}}};e([t()],f.prototype,"highlightOptions",null),e([t()],f.prototype,"loadedGraphics",null),e([t({readOnly:!0})],f.prototype,"legendEnabled",null),e([t()],f.prototype,"layer",void 0),e([t({readOnly:!0})],f.prototype,"processor",void 0),e([t({readOnly:!0})],f.prototype,"visibleAtCurrentScale",null),e([t()],f.prototype,"_slicePlaneEnabled",void 0),e([t({type:Boolean})],f.prototype,"slicePlaneEnabled",null),f=e([o("esri.views.3d.layers.GraphicsLayerView3D")],f);const b=f;export{b as default};
|