@arcgis/core 5.2.0-next.3 → 5.2.0-next.5
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/Graphic.d.ts +2 -1
- package/Map.js +1 -1
- package/analysis/ShadowCast/MinDurationOptions.d.ts +3 -5
- package/analysis/ShadowCast/TotalDurationOptions.d.ts +7 -9
- package/analysis/ShadowCastAnalysis.d.ts +7 -6
- package/arcgisGlobal.d.ts +5 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{29bbc0d6d847b065d10e.js → 062aadf426fe97a76bbb.js} +1 -1
- package/assets/esri/core/workers/chunks/0aaee272520c6e5bb617.js +1 -0
- package/assets/esri/core/workers/chunks/{12053c1213465d07d2f6.js → 0b445c1cf281f158c1f1.js} +1 -1
- package/assets/esri/core/workers/chunks/0fbf9bf52ecb4cd8293b.js +1 -0
- package/assets/esri/core/workers/chunks/{701125f6cdd91ff3655f.js → 1252da05832e576d4def.js} +2 -2
- package/assets/esri/core/workers/chunks/163ce1be8bfe20e77f97.js +1 -0
- package/assets/esri/core/workers/chunks/{e87d02af6d6b05e19d93.js → 16713986893adfbc9331.js} +1 -1
- package/assets/esri/core/workers/chunks/{9bd713d96502ddc2ce25.js → 1765042635084f75d2b3.js} +1 -1
- package/assets/esri/core/workers/chunks/18ebf1d3ed05c8057f7d.js +1 -0
- package/assets/esri/core/workers/chunks/1a527c0740d9f4fa0791.js +1 -0
- package/assets/esri/core/workers/chunks/1a95370ddc22729ab3c6.js +1 -0
- package/assets/esri/core/workers/chunks/{c88fd4f69cb2b53b48ec.js → 1b0765403b06294b3e1d.js} +1 -1
- package/assets/esri/core/workers/chunks/1bd8a7f92a428eedb22e.js +1 -0
- package/assets/esri/core/workers/chunks/233ff588798c8a5eedf4.js +1 -0
- package/assets/esri/core/workers/chunks/24acf3dd541347c2b297.js +1 -0
- package/assets/esri/core/workers/chunks/24d9e4f1c7b8ff0d2cce.js +1 -0
- package/assets/esri/core/workers/chunks/2562d8905bd05ef6fd07.js +1 -0
- package/assets/esri/core/workers/chunks/{e5d969214d9eda5c0b4c.js → 2a5dbed88bbd96cfac9f.js} +1 -1
- package/assets/esri/core/workers/chunks/2bcd4d395bfe6a19ccc8.js +1 -0
- package/assets/esri/core/workers/chunks/2e11b4e9d66474a60064.js +1 -0
- package/assets/esri/core/workers/chunks/{fbcf09526dc1bbe94b91.js → 2e8db0f05df2e38a14e1.js} +2 -2
- package/assets/esri/core/workers/chunks/3192586ec7fc73ed1165.js +1 -0
- package/assets/esri/core/workers/chunks/{9a11ff75009fef45b8c1.js → 325bfac7cfa28a6d568f.js} +1 -1
- package/assets/esri/core/workers/chunks/32f24a66f684de3c243d.js +1 -0
- package/assets/esri/core/workers/chunks/38ca59db0e8f45bd7811.js +1 -0
- package/assets/esri/core/workers/chunks/3bf6d55511cd7722eb93.js +1 -0
- package/assets/esri/core/workers/chunks/40df6ffeb61fea80aae3.js +1 -0
- package/assets/esri/core/workers/chunks/423a9882abd4a6dadf86.js +1 -0
- package/assets/esri/core/workers/chunks/425c04b26a6ec6d04b08.js +1 -0
- package/assets/esri/core/workers/chunks/4364a3e706294bb6ae41.js +1 -0
- package/assets/esri/core/workers/chunks/438f35d41c6851736818.js +30 -0
- package/assets/esri/core/workers/chunks/44e52fe98ffafe6a2807.js +1 -0
- package/assets/esri/core/workers/chunks/47d49777a3b3cd8e18bd.js +1 -0
- package/assets/esri/core/workers/chunks/4bfffdfbe6d467f143a4.js +1 -0
- package/assets/esri/core/workers/chunks/4d09ef7c57ab7f9782fe.js +1 -0
- package/assets/esri/core/workers/chunks/4e97c01698ef36cc5e0e.js +1 -0
- package/assets/esri/core/workers/chunks/5022413f5a41b5d435ea.js +1 -0
- package/assets/esri/core/workers/chunks/{8ade869fa9bae446266a.js → 51816d79c6be15e4bfcf.js} +1 -1
- package/assets/esri/core/workers/chunks/544174c33628846284a1.js +1 -0
- package/assets/esri/core/workers/chunks/{cf9b0ba30a75c030ca92.js → 5524a71d1abc9568ce26.js} +1 -1
- package/assets/esri/core/workers/chunks/552945a73a95cd2a9f54.js +1 -0
- package/assets/esri/core/workers/chunks/{ba31616de9d73d83d867.js → 557e39e5156b313597f9.js} +1 -1
- package/assets/esri/core/workers/chunks/55d168c13491fcdfb284.js +1 -0
- package/assets/esri/core/workers/chunks/{5ef37f37e405b3bb5450.js → 59dafa1e1340ea4043e6.js} +1 -1
- package/assets/esri/core/workers/chunks/{0a530fbbb4486c670ea2.js → 5c7aff9604b4576a0e1d.js} +1 -1
- package/assets/esri/core/workers/chunks/603177137eb680afe371.js +1 -0
- package/assets/esri/core/workers/chunks/624b1bb269744142b835.js +1 -0
- package/assets/esri/core/workers/chunks/643c7506f8fe8e06acd2.js +1 -0
- package/assets/esri/core/workers/chunks/65621650a53f69f7b05a.js +1 -0
- package/assets/esri/core/workers/chunks/65f02eca694cc1c9f5a7.js +1 -0
- package/assets/esri/core/workers/chunks/{271e42b7cd3c3441839e.js → 6a53c8db554be55c5885.js} +46 -36
- package/assets/esri/core/workers/chunks/6af88bb722bbb37db198.js +2 -0
- package/assets/esri/core/workers/chunks/6d696beddcc5fbed5875.js +1 -0
- package/assets/esri/core/workers/chunks/{a70fa35b2d19460637e9.js → 70d8f5bdb452cee41536.js} +2 -2
- package/assets/esri/core/workers/chunks/728151d24334027af635.js +1 -0
- package/assets/esri/core/workers/chunks/728ad5bbbcbf88d6249f.js +1 -0
- package/assets/esri/core/workers/chunks/{0d2bc1be5802681666a4.js → 77859a61d059738d057f.js} +1 -1
- package/assets/esri/core/workers/chunks/{03a4543b94f9adeb1852.js → 7a3b05e25de2ff150f38.js} +1 -1
- package/assets/esri/core/workers/chunks/{340f2c996f62f7f5ceae.js → 7a823bb1b72764897dd5.js} +1 -1
- package/assets/esri/core/workers/chunks/7bbffe07e62897928773.js +1 -0
- package/assets/esri/core/workers/chunks/7c292f7b181f3b93352b.js +1 -0
- package/assets/esri/core/workers/chunks/{f69c44479ee3fd8c831d.js → 7d220f574ebf2740c208.js} +1 -1
- package/assets/esri/core/workers/chunks/7eb94fc75926bc739233.js +1 -0
- package/assets/esri/core/workers/chunks/{24b43fb12fc3009fdc30.js → 7f1fcddc8dd42a1b67d9.js} +1 -1
- package/assets/esri/core/workers/chunks/{e95ce76b5b816256a519.js → 7f54d3835c0ce573a942.js} +1 -1
- package/assets/esri/core/workers/chunks/804ab5f614efa12a131b.js +1 -0
- package/assets/esri/core/workers/chunks/823789261ca3338f0fa8.js +1 -0
- package/assets/esri/core/workers/chunks/{71e12db99589c98a4357.js → 8477b5fdd99c6ac5c27b.js} +1 -1
- package/assets/esri/core/workers/chunks/{5cdf87e7a59ace38df87.js → 84b0b6e099d949e0fea5.js} +1 -1
- package/assets/esri/core/workers/chunks/{be1e4c3ec53fc92a26f1.js → 8598997340682113a2a5.js} +1 -1
- package/assets/esri/core/workers/chunks/86443e47ad99e555753a.js +1 -0
- package/assets/esri/core/workers/chunks/86a767c2b0b1e37ff493.js +1 -0
- package/assets/esri/core/workers/chunks/{702a3ef9e1b3442cbee7.js → 8b8b63be961eb73250a0.js} +1 -1
- package/assets/esri/core/workers/chunks/{27d6ad4ca5ab8c9d62cd.js → 8c443c52c846a096a250.js} +1 -1
- package/assets/esri/core/workers/chunks/{86161025b53b916328ff.js → 8ca88cfc0b9f84dc5832.js} +1 -1
- package/assets/esri/core/workers/chunks/9133c1b7cc1c9da27deb.js +1 -0
- package/assets/esri/core/workers/chunks/{d4749eb8a47869477037.js → 9250615c78f8570a9cda.js} +1 -1
- package/assets/esri/core/workers/chunks/986d8c3907aeeb18c4f6.js +1 -0
- package/assets/esri/core/workers/chunks/98e489c2b85feded7776.js +1 -0
- package/assets/esri/core/workers/chunks/9d27cc631bab8aa7479e.js +1 -0
- package/assets/esri/core/workers/chunks/9f23a61c60949459c14f.js +30 -0
- package/assets/esri/core/workers/chunks/a03c4c0bf138734a002e.js +1 -0
- package/assets/esri/core/workers/chunks/{40df608337d562553ce1.js → a0fce639319d59becd01.js} +2 -2
- package/assets/esri/core/workers/chunks/{e4b2120d7ee1c998b1fc.js → aa03f770178693167aa0.js} +1 -1
- package/assets/esri/core/workers/chunks/{762e23466308f22d7076.js → aea384f4d88121da8f54.js} +1 -1
- package/assets/esri/core/workers/chunks/aea439d4c2308f88b295.js +1 -0
- package/assets/esri/core/workers/chunks/{7995e6983456c779adf9.js → b002304a45856b024b46.js} +1 -1
- package/assets/esri/core/workers/chunks/b44f1d08784f2e50c853.js +1 -0
- package/assets/esri/core/workers/chunks/ba693317ed3939587f30.js +1 -0
- package/assets/esri/core/workers/chunks/be0eab592db0e651b023.js +30 -0
- package/assets/esri/core/workers/chunks/c1b6de0d728d25d7905a.js +1 -0
- package/assets/esri/core/workers/chunks/{f8b884b529064df4a30a.js → caf80facb0322be054ab.js} +1 -1
- package/assets/esri/core/workers/chunks/{25d795a1697803d77e56.js → ce0e627a5e1cb78adce8.js} +1 -1
- package/assets/esri/core/workers/chunks/{18c4207b1cb0777560ba.js → cf3036711bbe6095eaed.js} +1 -1
- package/assets/esri/core/workers/chunks/d21bf107698fef03125e.js +1 -0
- package/assets/esri/core/workers/chunks/d6d87bfa9e6d233385a9.js +262 -0
- package/assets/esri/core/workers/chunks/{63378b0b4265a547656b.js → d8ec0afb2b91ccf32e55.js} +1 -1
- package/assets/esri/core/workers/chunks/d97c0c18202b8c578f8c.js +1 -0
- package/assets/esri/core/workers/chunks/{2f99a95facddc44319a9.js → da3c54e27a808f4fcc18.js} +1 -1
- package/assets/esri/core/workers/chunks/dc259eed58fde3f5cb5c.js +1 -0
- package/assets/esri/core/workers/chunks/dc6d50e1097a920ff820.js +1 -0
- package/assets/esri/core/workers/chunks/e6e15e9e890b864fb395.js +1 -0
- package/assets/esri/core/workers/chunks/e755477dc78e9d6038d4.js +1 -0
- package/assets/esri/core/workers/chunks/ea8f642b1db933d2c26f.js +1 -0
- package/assets/esri/core/workers/chunks/eabd4a78221b7e733793.js +1 -0
- package/assets/esri/core/workers/chunks/{39987c06636e757d1f00.js → eda083e9d12e45da0a7b.js} +1 -1
- package/assets/esri/core/workers/chunks/edb55329305becdb204f.js +1 -0
- package/assets/esri/core/workers/chunks/f58ddf37dee066a5c0d8.js +1 -0
- package/assets/esri/core/workers/chunks/fb0afb41a3d87d59f574.js +1 -0
- package/assets/esri/core/workers/chunks/{5c6742728fa705d2e16e.js → fc9fbc8e4e459edf4e37.js} +1 -1
- package/assets/esri/core/workers/chunks/fe2325efd0d8ad8369ed.js +1 -0
- package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +53 -7
- package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +4 -13
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ar.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_bg.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_bs.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ca.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_cs.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_da.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_de.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_el.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_es.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_et.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_fi.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_fr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_he.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_hr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_hu.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_id.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_it.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ja.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ko.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_lt.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_lv.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_nl.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_no.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_pl.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_pt-BR.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_pt-PT.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ro.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ru.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sk.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sl.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sv.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_th.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_tr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_uk.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_vi.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_zh-CN.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_zh-HK.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_zh-TW.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ar.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_bg.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_bs.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ca.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_cs.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_da.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_de.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_el.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_es.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_et.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_fi.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_fr.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_he.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_hr.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_hu.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_id.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_it.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ja.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ko.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_lt.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_lv.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_nl.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_no.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pl.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pt-BR.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pt-PT.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ro.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ru.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sk.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sl.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sr.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sv.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_th.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_tr.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_uk.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_vi.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-CN.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-HK.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-TW.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ar.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bg.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bs.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ca.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_cs.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_da.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_de.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_el.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_en.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_es.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_et.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fi.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_he.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hu.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_id.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_it.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ja.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ko.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lt.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lv.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_nl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_no.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-BR.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-PT.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ro.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ru.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sk.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sv.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_th.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_tr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_uk.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_vi.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-CN.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-HK.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-TW.json +1 -1
- package/chunks/GlobalIllumination.glsl.js +40 -30
- package/chunks/GlobalIlluminationBlur.glsl.js +1 -1
- package/chunks/ShadowCastVisualize.glsl.js +20 -23
- package/config.js +1 -1
- package/core/screenUtils.js +1 -1
- package/editing/templates/TemplateListItem.d.ts +61 -0
- package/editing/templates/TemplateListItem.js +2 -0
- package/geometry/support/heightModelInfoUtils.js +1 -1
- package/interfaces.d.ts +21 -0
- package/kernel.js +1 -1
- package/layers/AnnotationLayer.d.ts +42 -0
- package/layers/AnnotationLayer.js +2 -0
- package/layers/DimensionFeatureLayer.d.ts +36 -1
- package/layers/DimensionFeatureLayer.js +1 -1
- package/layers/FeatureLayer.d.ts +43 -14
- package/layers/FeatureLayer.js +1 -1
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
- package/layers/mixins/PortalLayer.js +1 -1
- package/layers/mixins/TiledImagery.js +1 -1
- package/layers/raster/datasets/ImageAuxRaster.js +1 -1
- package/layers/raster/datasets/RasterFactory.js +1 -1
- package/layers/support/SymbolLayerDrawing.d.ts +10 -0
- package/layers/support/rasterJobHelper.js +2 -0
- package/layers/types.d.ts +3 -4
- package/networks/support/networkFieldUtils.js +1 -1
- package/package.json +1 -1
- package/rest/support/AttributeBinsQuery.d.ts +5 -5
- package/rest/support/OutDistance.d.ts +50 -0
- package/rest/support/OutDistance.js +1 -1
- package/rest/support/Query.d.ts +46 -5
- package/rest/support/Query.js +1 -1
- package/rest/support/TopFeaturesQuery.d.ts +5 -5
- package/support/basemapEnsureType.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMOperators.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/symbols/cim/utils.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
- package/views/2d/engine/webgl/mesh/factories/FeatureMeshFactory.js +1 -1
- package/views/2d/engine/webgl/mesh/factories/ResourceProxy.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/createTestMeshData.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ViewInfo.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderCircle.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/util/AnnotationMatcher.js +2 -0
- package/views/2d/engine/webgl/util/DimensionMatcher.js +2 -0
- package/views/2d/engine/webgl/util/Matcher.js +1 -1
- package/views/2d/engine/webgl/util/createMatcher.js +1 -1
- package/views/2d/layerViewModuleImportUtils.js +1 -1
- package/views/2d/layers/AnnotationLayerView2D.js +2 -0
- package/views/2d/layers/{DimensionLayerView2D.js → DimensionFeatureLayerView2D.js} +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/MapImageLayerView2D.js +1 -1
- package/views/2d/layers/RouteLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/VectorTileLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +2 -0
- package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
- package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
- package/views/2d/layers/features/support/FeatureMetadata.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderAnnotationJSON.js +2 -0
- package/views/2d/layers/features/support/FeatureSetReaderDimensionJSON.js +2 -0
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/2d/layers/support/annodime/DimensionInfo.js +2 -0
- package/views/2d/layers/support/annodime/DimensionMatcherSchema.js +2 -0
- package/views/2d/layers/support/annodime/PrivateDimensionEffect.js +2 -0
- package/views/2d/layers/support/annodime/PrivatePlacementMultipoint.js +2 -0
- package/views/2d/layers/support/annodime/annotationGraphic.js +2 -0
- package/views/2d/layers/support/annodime/annotationSchema.js +2 -0
- package/views/2d/layers/support/annodime/annotationUtils.js +2 -0
- package/views/2d/layers/support/annodime/cimAnnotations.js +2 -0
- package/views/2d/layers/support/annodime/dimensionSchema.js +2 -0
- package/views/2d/layers/support/annodime/dimensionSymbols.js +2 -0
- package/views/2d/layers/support/annodime/dimensionUtils.js +2 -0
- package/views/2d/layers/support/annodime/fields.js +2 -0
- package/views/2d/layers/support/annodime/unsupported.js +2 -0
- package/views/2d/layers/support/annodime/utils.js +2 -0
- package/views/2d/layers/support/annodime/virtualFields.js +2 -0
- package/views/2d/support/clippingUtils.js +1 -1
- package/views/2d/support/hitTestUtils.js +1 -1
- package/views/2d/types.d.ts +5 -1
- package/views/3d/analysis/ShadowCast/ShadowCastTooltip.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/interactive/editingTools/transform/ExtentTransformTool.js +1 -1
- package/views/3d/layerViewModuleImportUtils.js +1 -1
- package/views/3d/layers/MapImageLayerView3D.js +1 -1
- package/views/3d/layers/TileLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
- package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
- package/views/3d/terrain/isTerrainSurfaceLayer.js +1 -1
- package/views/3d/types.d.ts +2 -0
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/shaders/ditherNoise.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/oitResolution.glsl.js +1 -1
- package/views/PopupView.d.ts +3 -3
- package/views/PopupView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/View2D.js +1 -1
- package/views/draw/DrawTool.d.ts +34 -1
- package/views/layers/AnnotationLayerView.d.ts +18 -0
- package/views/layers/AnnotationLayerView.js +2 -0
- package/views/layers/DimensionFeatureLayerView.d.ts +18 -0
- package/views/layers/DimensionFeatureLayerView.js +2 -0
- package/views/layers/FeatureLikeLayerView.d.ts +2 -1
- package/views/layers/FeatureLikeLayerView.js +1 -1
- package/views/layers/ImageryLayerView.d.ts +1 -1
- package/views/layers/ImageryLayerView.js +1 -1
- package/views/layers/ImageryTileLayerView.js +1 -1
- package/views/layers/WMSLayerView.js +1 -1
- package/views/layers/support/MapServiceLayerViewHelper.js +1 -1
- package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
- package/widgets/BatchAttributeForm/attachmentUtils.js +1 -1
- package/widgets/BatchAttributeForm/css.js +1 -1
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/UtilityNetworkAssociationsElementInput.js +1 -1
- package/widgets/BatchAttributeForm/rendered-content/RelationshipDetails.js +2 -0
- package/widgets/BatchAttributeForm.d.ts +26 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/css.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Print/PrintViewModel.js +1 -1
- package/widgets/Sketch/support/PluginManager.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/support/iconUtils.js +1 -1
- package/assets/esri/core/workers/chunks/0175098da590a7109539.js +0 -1
- package/assets/esri/core/workers/chunks/019a4fe7e085b2fc6ae9.js +0 -1
- package/assets/esri/core/workers/chunks/023837e5d9d2b6af66d8.js +0 -1
- package/assets/esri/core/workers/chunks/03c46880b69ce75a010f.js +0 -1
- package/assets/esri/core/workers/chunks/040884cec4b84dd1bb17.js +0 -1
- package/assets/esri/core/workers/chunks/04ea806b933d4dd41609.js +0 -1
- package/assets/esri/core/workers/chunks/074f5e6aaeafca13bf72.js +0 -1
- package/assets/esri/core/workers/chunks/0e549d942d6cba1608cf.js +0 -1
- package/assets/esri/core/workers/chunks/13a8346abe5509167578.js +0 -1
- package/assets/esri/core/workers/chunks/13d43a0683c42b94feb6.js +0 -1
- package/assets/esri/core/workers/chunks/1ebb613bbe09fcf274d8.js +0 -1
- package/assets/esri/core/workers/chunks/27d7c701306efeea6b82.js +0 -1
- package/assets/esri/core/workers/chunks/2b9661700743d1f9717e.js +0 -1
- package/assets/esri/core/workers/chunks/2bdfae998371e3aa9f2d.js +0 -1
- package/assets/esri/core/workers/chunks/2f0a3b22fc46d832e240.js +0 -1
- package/assets/esri/core/workers/chunks/2ffffc1931b2e27c6617.js +0 -1
- package/assets/esri/core/workers/chunks/32f128a1615d71bbe899.js +0 -2
- package/assets/esri/core/workers/chunks/375bdaf44e1ed6141601.js +0 -1
- package/assets/esri/core/workers/chunks/3835097520296b0517af.js +0 -1
- package/assets/esri/core/workers/chunks/41074d383af3662673ca.js +0 -1
- package/assets/esri/core/workers/chunks/4605a68e40c5c3ac6e3e.js +0 -1
- package/assets/esri/core/workers/chunks/4b01858e05a4b90331a4.js +0 -30
- package/assets/esri/core/workers/chunks/4b130db9b7b4e2e32ea4.js +0 -1
- package/assets/esri/core/workers/chunks/4bfeac7338df9e0b7ce1.js +0 -1
- package/assets/esri/core/workers/chunks/4c5cdd2712c938fafc5d.js +0 -1
- package/assets/esri/core/workers/chunks/4fa3840672c33adb9171.js +0 -1
- package/assets/esri/core/workers/chunks/4ffcca40e7aa24c8cc35.js +0 -1
- package/assets/esri/core/workers/chunks/534dd93c72ea448ee908.js +0 -1
- package/assets/esri/core/workers/chunks/548c34ea88f113d03c93.js +0 -30
- package/assets/esri/core/workers/chunks/5ea0096a282e87a269bd.js +0 -1
- package/assets/esri/core/workers/chunks/66fe1634c6e8f72fc653.js +0 -1
- package/assets/esri/core/workers/chunks/6920e7f700a9ba280dba.js +0 -1
- package/assets/esri/core/workers/chunks/6b1f2b36bdc6b2ff2ea5.js +0 -1
- package/assets/esri/core/workers/chunks/6b66a6f69aa03338c346.js +0 -1
- package/assets/esri/core/workers/chunks/6d59a9cf533ebc590f70.js +0 -1
- package/assets/esri/core/workers/chunks/708bd77e6d723e3f0aa8.js +0 -1
- package/assets/esri/core/workers/chunks/75a7de23c05435ec7649.js +0 -1
- package/assets/esri/core/workers/chunks/75dfdd85abbac26ac899.js +0 -1
- package/assets/esri/core/workers/chunks/798c4d3201fcc9f2a42b.js +0 -1
- package/assets/esri/core/workers/chunks/817fd88fe9a48caf69fb.js +0 -1
- package/assets/esri/core/workers/chunks/82f7d83a2073d1b0111c.js +0 -1
- package/assets/esri/core/workers/chunks/860465c4f44c373d0a1c.js +0 -1
- package/assets/esri/core/workers/chunks/89250d268dc2554a9ece.js +0 -1
- package/assets/esri/core/workers/chunks/89916fe83f48b2df4b0d.js +0 -1
- package/assets/esri/core/workers/chunks/8a68884d40f6f6de1d12.js +0 -1
- package/assets/esri/core/workers/chunks/8c8fed53c12fb80ef2ed.js +0 -1
- package/assets/esri/core/workers/chunks/8ff83c59462dea6e3427.js +0 -1
- package/assets/esri/core/workers/chunks/961995d8da45a9203255.js +0 -1
- package/assets/esri/core/workers/chunks/978b7d10054e17161145.js +0 -1
- package/assets/esri/core/workers/chunks/a9c9c00432ee41ec91ba.js +0 -1
- package/assets/esri/core/workers/chunks/af762422a65c551dcd54.js +0 -1
- package/assets/esri/core/workers/chunks/b041c22885193bdd3004.js +0 -1
- package/assets/esri/core/workers/chunks/b684ff4bc93bd60d6a19.js +0 -1
- package/assets/esri/core/workers/chunks/bb2f6b0fcdfb8b158e26.js +0 -1
- package/assets/esri/core/workers/chunks/cd2b2babcdc130b4c368.js +0 -1
- package/assets/esri/core/workers/chunks/cedf3e316d6f89cf7005.js +0 -1
- package/assets/esri/core/workers/chunks/d39f5590022d910ee951.js +0 -1
- package/assets/esri/core/workers/chunks/d412a43060441d347fb4.js +0 -1
- package/assets/esri/core/workers/chunks/d41b847d08c42e5329d6.js +0 -262
- package/assets/esri/core/workers/chunks/d52172439db02a349542.js +0 -1
- package/assets/esri/core/workers/chunks/d8c2bed12f937228c763.js +0 -1
- package/assets/esri/core/workers/chunks/de916dd0c11aefb6832e.js +0 -1
- package/assets/esri/core/workers/chunks/ea2bf7c543cc536400b7.js +0 -30
- package/assets/esri/core/workers/chunks/ecf4d07917efc97eb991.js +0 -1
- package/assets/esri/core/workers/chunks/eda51e512eff551ad858.js +0 -1
- package/assets/esri/core/workers/chunks/f14e3693cd644265f909.js +0 -1
- package/assets/esri/core/workers/chunks/f52c6efc5a2abf5ac845.js +0 -1
- package/assets/esri/core/workers/chunks/f635a8e3b0bfeda99ed5.js +0 -1
- package/assets/esri/core/workers/chunks/f9f331c76c96743d8522.js +0 -1
- package/assets/esri/core/workers/chunks/fcbacca99c5a3ee5b69a.js +0 -1
- package/symbols/dimensions/effects/LinearDimensionArrowEffect.js +0 -2
- package/symbols/dimensions/effects/LinearDimensionExtensionLineEffect.js +0 -2
- package/symbols/dimensions/effects/LinearDimensionLeaderLineEffect.js +0 -2
- package/symbols/dimensions/effects/LinearDimensionLineEffect.js +0 -2
- package/symbols/dimensions/effects/LinearDimensionPointEffect.js +0 -2
- package/symbols/dimensions/effects/LinearDimensionTextEffect.js +0 -2
- package/views/2d/layers/features/support/FeatureSetReaderDimension.js +0 -2
- package/views/3d/webgl-engine/effects/globalIllumination/BlueNoise.js +0 -2
- package/views/layers/support/dimensionUtils.js +0 -2
- /package/assets/esri/core/workers/chunks/{701125f6cdd91ff3655f.js.LICENSE.txt → 1252da05832e576d4def.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{fbcf09526dc1bbe94b91.js.LICENSE.txt → 2e8db0f05df2e38a14e1.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{32f128a1615d71bbe899.js.LICENSE.txt → 6af88bb722bbb37db198.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{40df608337d562553ce1.js.LICENSE.txt → 70d8f5bdb452cee41536.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{a70fa35b2d19460637e9.js.LICENSE.txt → a0fce639319d59becd01.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { ClonableMixin } from "../../core/Clonable.js";
|
|
2
|
+
import type { JSONSupport } from "../../core/JSONSupport.js";
|
|
3
|
+
|
|
4
|
+
/** @since 5.1 */
|
|
5
|
+
export interface OutDistanceProperties extends Partial<Pick<OutDistance, "ascendingOrder" | "outDistanceUnit" | "returnDistance">> {}
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Defines the [outDistance](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#outDistance) parameter on a [Query](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/) and specifies whether to return the distance
|
|
9
|
+
* of each feature from the input geometry's buffer in a query result. It also optionally controls the sort order of results based on distances of features
|
|
10
|
+
* from the input geometry's buffer.
|
|
11
|
+
* Distance values are returned only when the following conditions are met:
|
|
12
|
+
* - The [Query.distance](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#distance) is greater than 0
|
|
13
|
+
* - [Query.units](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#units) is specified
|
|
14
|
+
* - [Query.outDistance](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#outDistance) is specified and its [OutDistance.returnDistance](https://developers.arcgis.com/javascript/latest/references/core/rest/support/OutDistance/#returnDistance) property is `true`
|
|
15
|
+
*
|
|
16
|
+
* > [!WARNING]
|
|
17
|
+
* >
|
|
18
|
+
* > **Known Limitations**
|
|
19
|
+
* >
|
|
20
|
+
* > Supported only on a service-backed [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/) where the [supportsOutDistance](https://developers.arcgis.com/javascript/latest/references/core/layers/types/#QueryCapabilities) capability
|
|
21
|
+
* > is `true`.
|
|
22
|
+
*
|
|
23
|
+
* @since 5.1
|
|
24
|
+
*/
|
|
25
|
+
export default class OutDistance extends OutDistanceSuperclass {
|
|
26
|
+
constructor(properties?: OutDistanceProperties);
|
|
27
|
+
/**
|
|
28
|
+
* Indicates whether to return the distance values in ascending order. This property is only applicable when [returnDistance](https://developers.arcgis.com/javascript/latest/references/core/rest/support/OutDistance/#returnDistance) is `true`.
|
|
29
|
+
*
|
|
30
|
+
* @default true
|
|
31
|
+
* @since 5.1
|
|
32
|
+
*/
|
|
33
|
+
accessor ascendingOrder: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* The distance unit of the returned distance values. This property is only applicable when
|
|
36
|
+
* [returnDistance](https://developers.arcgis.com/javascript/latest/references/core/rest/support/OutDistance/#returnDistance) is `true`.
|
|
37
|
+
*
|
|
38
|
+
* @since 5.1
|
|
39
|
+
*/
|
|
40
|
+
accessor outDistanceUnit: "feet" | "miles" | "nautical-miles" | "us-nautical-miles" | "meters" | "kilometers" | null | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Indicates whether to return the calculated distance value for each feature in a distance query result.
|
|
43
|
+
* Distance values returned in each feature's [distance](https://developers.arcgis.com/javascript/latest/references/core/Graphic/#distance) property.
|
|
44
|
+
*
|
|
45
|
+
* @default true
|
|
46
|
+
* @since 5.1
|
|
47
|
+
*/
|
|
48
|
+
accessor returnDistance: boolean;
|
|
49
|
+
}
|
|
50
|
+
declare const OutDistanceSuperclass: typeof JSONSupport & typeof ClonableMixin
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as
|
|
2
|
+
import{__decorate as t}from"tslib";import{ClonableMixin as e}from"../../core/Clonable.js";import{JSONMap as r}from"../../core/jsonMap.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{property as i,subclass as s}from"../../core/accessorSupport/decorators.js";import{enumeration as n}from"../../core/accessorSupport/decorators/enumeration.js";const c=new r({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let a=class extends(e(o)){constructor(t){super(t),this.returnDistance=!0,this.ascendingOrder=!0,this.outDistanceUnit=null}};t([i({json:{write:!0}})],a.prototype,"returnDistance",void 0),t([i({json:{write:!0}})],a.prototype,"ascendingOrder",void 0),t([n(c,{ignoreUnknown:!1}),i({})],a.prototype,"outDistanceUnit",void 0),a=t([s("esri.rest.support.OutDistance")],a);const p=a;export{p as default};
|
package/rest/support/Query.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type Point from "../../geometry/Point.js";
|
|
2
2
|
import type SpatialReference from "../../geometry/SpatialReference.js";
|
|
3
3
|
import type GeographicTransformation from "../../geometry/operators/support/GeographicTransformation.js";
|
|
4
|
+
import type OutDistance from "./OutDistance.js";
|
|
4
5
|
import type QuantizationParameters from "./QuantizationParameters.js";
|
|
5
6
|
import type StatisticDefinition from "./StatisticDefinition.js";
|
|
6
7
|
import type TimeExtent from "../../time/TimeExtent.js";
|
|
@@ -18,6 +19,7 @@ import type { SpatialReferenceProperties } from "../../geometry/SpatialReference
|
|
|
18
19
|
import type { StatisticDefinitionProperties } from "./StatisticDefinition.js";
|
|
19
20
|
import type { QuantizationParametersProperties } from "./QuantizationParameters.js";
|
|
20
21
|
import type { TimeExtentProperties } from "../../time/TimeExtent.js";
|
|
22
|
+
import type { OutDistanceProperties } from "./OutDistance.js";
|
|
21
23
|
|
|
22
24
|
export interface QueryProperties extends Partial<Pick<Query, "aggregateIds" | "cacheHint" | "datumTransformation" | "distance" | "gdbVersion" | "geometryPrecision" | "groupByFieldsForStatistics" | "having" | "maxAllowableOffset" | "maxRecordCountFactor" | "multipatchOption" | "num" | "objectIds" | "orderByFields" | "outFields" | "parameterValues" | "rangeValues" | "relationParameter" | "returnCentroid" | "returnDistinctValues" | "returnExceededLimitFeatures" | "returnGeometry" | "returnM" | "returnQueryGeometry" | "returnStatisticsAggregatedIds" | "returnTrueCurves" | "returnZ" | "spatialRelationship" | "sqlFormat" | "start" | "text" | "units" | "where">> {
|
|
23
25
|
/**
|
|
@@ -36,6 +38,24 @@ export interface QueryProperties extends Partial<Pick<Query, "aggregateIds" | "c
|
|
|
36
38
|
* capability of the service being queried is `true`. This setting is provided in the layer resource.
|
|
37
39
|
*/
|
|
38
40
|
historicMoment?: (Date | number | string) | null;
|
|
41
|
+
/**
|
|
42
|
+
* Specifies whether to return the distance of each feature from the input geometry's buffer in a query result. It also optionally controls the sort
|
|
43
|
+
* order of results based on distances of features from the input geometry's buffer.
|
|
44
|
+
* Distance values are returned only when the following conditions are met:
|
|
45
|
+
* - The [Query.distance](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#distance) is greater than 0
|
|
46
|
+
* - [Query.units](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#units) is specified
|
|
47
|
+
* - The `outDistance` is specified and its [OutDistance.returnDistance](https://developers.arcgis.com/javascript/latest/references/core/rest/support/OutDistance/#returnDistance) property is `true`
|
|
48
|
+
*
|
|
49
|
+
* > [!WARNING]
|
|
50
|
+
* >
|
|
51
|
+
* > **Known Limitations**
|
|
52
|
+
* >
|
|
53
|
+
* > Supported only on a service-backed [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/) where the [supportsOutDistance](https://developers.arcgis.com/javascript/latest/references/core/layers/types/#QueryCapabilities) capability
|
|
54
|
+
* > is `true`.
|
|
55
|
+
*
|
|
56
|
+
* @since 5.1
|
|
57
|
+
*/
|
|
58
|
+
outDistance?: OutDistanceProperties | null;
|
|
39
59
|
/**
|
|
40
60
|
* The spatial reference for the returned geometry. If not specified, the geometry is returned in the spatial
|
|
41
61
|
* reference of the queried layer.
|
|
@@ -411,12 +431,14 @@ export default class Query extends JSONSupport {
|
|
|
411
431
|
accessor datumTransformation: DatumTransformation | GeographicTransformation | null | undefined;
|
|
412
432
|
/**
|
|
413
433
|
* Specifies a search distance from a given [geometry](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#geometry) in a spatial query.
|
|
414
|
-
*
|
|
415
|
-
*
|
|
416
|
-
*
|
|
434
|
+
* The [units property](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#units) indicates the unit of measurement. In essence, setting this property
|
|
435
|
+
* creates a buffer at the specified size around the input [geometry](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#geometry). The query will use that
|
|
436
|
+
* buffer to return features in the layer or layer view that adhere to the to the indicated [spatial relationship](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#spatialRelationship).
|
|
437
|
+
*
|
|
438
|
+
* If querying a feature service, the [supportsQueryWithDistance](https://developers.arcgis.com/rest/services-reference/enterprise/query-feature-service-layer/)
|
|
439
|
+
* capability must be `true`.
|
|
417
440
|
*
|
|
418
|
-
*
|
|
419
|
-
* capability must be `true`.
|
|
441
|
+
* @see [Query.outDistance](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#outDistance)
|
|
420
442
|
*/
|
|
421
443
|
accessor distance: number | null | undefined;
|
|
422
444
|
/** Specifies the geodatabase version to display for feature service queries. */
|
|
@@ -584,6 +606,25 @@ export default class Query extends JSONSupport {
|
|
|
584
606
|
* @example query.orderByFields = ["STATE_NAME DESC"];
|
|
585
607
|
*/
|
|
586
608
|
accessor orderByFields: string[] | null | undefined;
|
|
609
|
+
/**
|
|
610
|
+
* Specifies whether to return the distance of each feature from the input geometry's buffer in a query result. It also optionally controls the sort
|
|
611
|
+
* order of results based on distances of features from the input geometry's buffer.
|
|
612
|
+
* Distance values are returned only when the following conditions are met:
|
|
613
|
+
* - The [Query.distance](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#distance) is greater than 0
|
|
614
|
+
* - [Query.units](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#units) is specified
|
|
615
|
+
* - The `outDistance` is specified and its [OutDistance.returnDistance](https://developers.arcgis.com/javascript/latest/references/core/rest/support/OutDistance/#returnDistance) property is `true`
|
|
616
|
+
*
|
|
617
|
+
* > [!WARNING]
|
|
618
|
+
* >
|
|
619
|
+
* > **Known Limitations**
|
|
620
|
+
* >
|
|
621
|
+
* > Supported only on a service-backed [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/) where the [supportsOutDistance](https://developers.arcgis.com/javascript/latest/references/core/layers/types/#QueryCapabilities) capability
|
|
622
|
+
* > is `true`.
|
|
623
|
+
*
|
|
624
|
+
* @since 5.1
|
|
625
|
+
*/
|
|
626
|
+
get outDistance(): OutDistance | null | undefined;
|
|
627
|
+
set outDistance(value: OutDistanceProperties | null | undefined);
|
|
587
628
|
/**
|
|
588
629
|
* Attribute fields to include in the [FeatureSet](https://developers.arcgis.com/javascript/latest/references/core/rest/support/FeatureSet/). Fields must exist in the service layer. You must list actual
|
|
589
630
|
* field names rather than field aliases. You may, however, use field aliases when you display
|
package/rest/support/Query.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import{JSONMap as e}from"../../core/jsonMap.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import{clone as i}from"../../core/lang.js";import{property as o,cast as s,subclass as n}from"../../core/accessorSupport/decorators.js";import{ensureClass as a}from"../../core/accessorSupport/ensureType.js";import l from"../../geometry/Point.js";import p from"../../geometry/SpatialReference.js";import{fromJSON as u}from"../../geometry/support/jsonUtils.js";import{geometryTypes as d}from"../../geometry/support/typeUtils.js";import m from"../layerSources/DynamicDataLayer.js";import c from"./FullTextSearch.js";import y from"./QuantizationParameters.js";import{spatialRelKebabDict as
|
|
2
|
+
import{__decorate as t}from"tslib";import{JSONMap as e}from"../../core/jsonMap.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import{clone as i}from"../../core/lang.js";import{property as o,cast as s,subclass as n}from"../../core/accessorSupport/decorators.js";import{ensureClass as a}from"../../core/accessorSupport/ensureType.js";import l from"../../geometry/Point.js";import p from"../../geometry/SpatialReference.js";import{fromJSON as u}from"../../geometry/support/jsonUtils.js";import{geometryTypes as d}from"../../geometry/support/typeUtils.js";import m from"../layerSources/DynamicDataLayer.js";import c from"./FullTextSearch.js";import y from"./OutDistance.js";import h from"./QuantizationParameters.js";import{spatialRelKebabDict as f}from"./spatialRelationships.js";import j from"./StatisticDefinition.js";import g from"../../time/TimeExtent.js";import{writer as v}from"../../core/accessorSupport/decorators/writer.js";import{enumeration as w}from"../../core/accessorSupport/decorators/enumeration.js";var S;const R=new e({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let b=class extends r{static{S=this}static from(t){return a(S,t)}constructor(t){super(t),this.aggregateIds=null,this.cacheHint=void 0,this.compactGeometryEnabled=!1,this.datumTransformation=null,this.defaultSpatialReferenceEnabled=!1,this.distance=void 0,this.dynamicDataSource=void 0,this.formatOf3DObjects=null,this.fullText=null,this.gdbVersion=null,this.geometry=null,this.geometryPrecision=void 0,this.groupByFieldsForStatistics=null,this.having=null,this.historicMoment=null,this.maxAllowableOffset=void 0,this.maxRecordCountFactor=1,this.multipatchOption=null,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.outStatistics=null,this.parameterValues=null,this.pixelSize=null,this.quantizationParameters=null,this.rangeValues=null,this.relationParameter=null,this.resultType=null,this.returnStatisticsAggregatedIds=!1,this.returnCentroid=!1,this.returnDistinctValues=!1,this.returnExceededLimitFeatures=!0,this.returnExceededLimitGeometries=!0,this.returnGeometry=!1,this.returnQueryGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.returnTrueCurves=void 0,this.sourceSpatialReference=null,this.spatialRelationship="intersects",this.start=void 0,this.sqlFormat=null,this.text=null,this.timeExtent=null,this.timeReferenceUnknownClient=!1,this.units=null,this.outDistance=null,this.where=null}castDatumTransformation(t){return"number"==typeof t||"object"==typeof t?t:null}writeHistoricMoment(t,e){e.historicMoment=t&&t.getTime()}writeParameterValues(t,e){if(t){const r={};for(const e in t){const i=t[e];Array.isArray(i)?r[e]=i.map(t=>t instanceof Date?t.getTime():t):i instanceof Date?r[e]=i.getTime():r[e]=i}e.parameterValues=r}}writeStart(t,e){e.resultOffset=this.start,e.resultRecordCount=this.num||10,e.where="1=1"}writeWhere(t,e){e.where=t||"1=1"}clone(){return new S(i({aggregateIds:this.aggregateIds,cacheHint:this.cacheHint,compactGeometryEnabled:this.compactGeometryEnabled,datumTransformation:this.datumTransformation,defaultSpatialReferenceEnabled:this.defaultSpatialReferenceEnabled,distance:this.distance,fullText:this.fullText,formatOf3DObjects:this.formatOf3DObjects,gdbVersion:this.gdbVersion,geometry:this.geometry,geometryPrecision:this.geometryPrecision,groupByFieldsForStatistics:this.groupByFieldsForStatistics,having:this.having,historicMoment:null!=this.historicMoment?new Date(this.historicMoment):null,maxAllowableOffset:this.maxAllowableOffset,maxRecordCountFactor:this.maxRecordCountFactor,multipatchOption:this.multipatchOption,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,outStatistics:this.outStatistics,parameterValues:this.parameterValues,pixelSize:this.pixelSize,quantizationParameters:this.quantizationParameters,rangeValues:this.rangeValues,relationParameter:this.relationParameter,resultType:this.resultType,returnStatisticsAggregatedIds:this.returnStatisticsAggregatedIds,returnDistinctValues:this.returnDistinctValues,returnGeometry:this.returnGeometry,returnCentroid:this.returnCentroid,returnExceededLimitFeatures:this.returnExceededLimitFeatures,returnExceededLimitGeometries:this.returnExceededLimitGeometries,returnQueryGeometry:this.returnQueryGeometry,returnM:this.returnM,returnZ:this.returnZ,returnTrueCurves:this.returnTrueCurves,dynamicDataSource:this.dynamicDataSource,sourceSpatialReference:this.sourceSpatialReference,spatialRelationship:this.spatialRelationship,start:this.start,sqlFormat:this.sqlFormat,text:this.text,timeExtent:this.timeExtent,timeReferenceUnknownClient:this.timeReferenceUnknownClient,units:this.units,outDistance:this.outDistance,where:this.where}))}static{this.MAX_MAX_RECORD_COUNT_FACTOR=5}};t([o({json:{write:!0}})],b.prototype,"aggregateIds",void 0),t([o({type:Boolean,json:{write:!0}})],b.prototype,"cacheHint",void 0),t([o({type:Boolean,json:{default:!1,write:!0}})],b.prototype,"compactGeometryEnabled",void 0),t([o({json:{write:!0}})],b.prototype,"datumTransformation",void 0),t([s("datumTransformation")],b.prototype,"castDatumTransformation",null),t([o({type:Boolean,json:{default:!1,write:!0}})],b.prototype,"defaultSpatialReferenceEnabled",void 0),t([o({type:Number,json:{write:!0}})],b.prototype,"distance",void 0),t([o({type:m,json:{write:!0}})],b.prototype,"dynamicDataSource",void 0),t([o({type:String,json:{write:!0}})],b.prototype,"formatOf3DObjects",void 0),t([o({type:[c],json:{write:{enabled:!0,overridePolicy(){return{enabled:null!=this.fullText&&this.fullText.length>0}}}}})],b.prototype,"fullText",void 0),t([o({type:String,json:{write:!0}})],b.prototype,"gdbVersion",void 0),t([o({types:d,json:{read:u,write:!0}})],b.prototype,"geometry",void 0),t([o({type:Number,json:{write:!0}})],b.prototype,"geometryPrecision",void 0),t([o({type:[String],json:{write:!0}})],b.prototype,"groupByFieldsForStatistics",void 0),t([o({type:String,json:{write:!0}})],b.prototype,"having",void 0),t([o({type:Date})],b.prototype,"historicMoment",void 0),t([v("historicMoment")],b.prototype,"writeHistoricMoment",null),t([o({type:Number,json:{write:!0}})],b.prototype,"maxAllowableOffset",void 0),t([o({type:Number,cast:t=>t<1?1:t>b.MAX_MAX_RECORD_COUNT_FACTOR?b.MAX_MAX_RECORD_COUNT_FACTOR:t,json:{write:{overridePolicy:t=>({enabled:t>1})}}})],b.prototype,"maxRecordCountFactor",void 0),t([o({type:["xyFootprint"],json:{write:!0}})],b.prototype,"multipatchOption",void 0),t([o({type:Number,json:{read:{source:"resultRecordCount"}}})],b.prototype,"num",void 0),t([o({json:{write:!0}})],b.prototype,"objectIds",void 0),t([o({type:[String],json:{write:!0}})],b.prototype,"orderByFields",void 0),t([o({type:[String],json:{write:!0}})],b.prototype,"outFields",void 0),t([o({type:p,json:{name:"outSR",write:!0}})],b.prototype,"outSpatialReference",void 0),t([o({type:[j],json:{write:{enabled:!0,overridePolicy(){return{enabled:null!=this.outStatistics&&this.outStatistics.length>0}}}}})],b.prototype,"outStatistics",void 0),t([o({json:{write:!0}})],b.prototype,"parameterValues",void 0),t([v("parameterValues")],b.prototype,"writeParameterValues",null),t([o({type:l,json:{write:!0}})],b.prototype,"pixelSize",void 0),t([o({type:h,json:{write:!0}})],b.prototype,"quantizationParameters",void 0),t([o({type:[Object],json:{write:!0}})],b.prototype,"rangeValues",void 0),t([o({type:String,json:{read:{source:"relationParam"},write:{target:"relationParam",overridePolicy(){return{enabled:"relation"===this.spatialRelationship}}}}})],b.prototype,"relationParameter",void 0),t([o({type:String,json:{write:!0}})],b.prototype,"resultType",void 0),t([o({type:Boolean,json:{name:"returnAggIds",write:{overridePolicy(t){return{enabled:t&&!!this.groupByFieldsForStatistics?.length&&!!this.outStatistics?.length}}}}})],b.prototype,"returnStatisticsAggregatedIds",void 0),t([o({type:Boolean,json:{default:!1,write:!0}})],b.prototype,"returnCentroid",void 0),t([o({type:Boolean,json:{default:!1,write:!0}})],b.prototype,"returnDistinctValues",void 0),t([o({type:Boolean,json:{default:!0,write:!0}})],b.prototype,"returnExceededLimitFeatures",void 0),t([o({type:Boolean,json:{default:!0,write:!0}})],b.prototype,"returnExceededLimitGeometries",void 0),t([o({type:Boolean,json:{write:!0}})],b.prototype,"returnGeometry",void 0),t([o({type:Boolean,json:{default:!1,write:!0}})],b.prototype,"returnQueryGeometry",void 0),t([o({type:Boolean,json:{default:!1,write:!0}})],b.prototype,"returnM",void 0),t([o({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],b.prototype,"returnZ",void 0),t([o({type:Boolean,json:{write:!0}})],b.prototype,"returnTrueCurves",void 0),t([o({type:p,json:{write:!0}})],b.prototype,"sourceSpatialReference",void 0),t([w(f,{ignoreUnknown:!1,name:"spatialRel"})],b.prototype,"spatialRelationship",void 0),t([o({type:Number,json:{read:{source:"resultOffset"}}})],b.prototype,"start",void 0),t([v("start"),v("num")],b.prototype,"writeStart",null),t([o({type:String,json:{write:!0}})],b.prototype,"sqlFormat",void 0),t([o({type:String,json:{write:!0}})],b.prototype,"text",void 0),t([o({type:g,json:{write:!0}})],b.prototype,"timeExtent",void 0),t([o({type:Boolean,json:{default:!1,write:!0}})],b.prototype,"timeReferenceUnknownClient",void 0),t([w(R,{ignoreUnknown:!1}),o({json:{write:{overridePolicy(t){return{enabled:!!t&&null!=this.distance}}}}})],b.prototype,"units",void 0),t([o({type:y,json:{write:!0}})],b.prototype,"outDistance",void 0),t([o({type:String,json:{write:{overridePolicy(t){return{enabled:null!=t||null!=this.start&&this.start>0}}}}})],b.prototype,"where",void 0),t([v("where")],b.prototype,"writeWhere",null),b=S=t([n("esri.rest.support.Query")],b);export{b as default};
|
|
@@ -227,12 +227,12 @@ export default class TopFeaturesQuery extends JSONSupport {
|
|
|
227
227
|
accessor cacheHint: boolean | null | undefined;
|
|
228
228
|
/**
|
|
229
229
|
* Specifies a search distance from a given [Query.geometry](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#geometry) in a spatial query.
|
|
230
|
-
*
|
|
231
|
-
*
|
|
232
|
-
*
|
|
230
|
+
* The [units property](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#units) indicates the unit of measurement. In essence, setting this property
|
|
231
|
+
* creates a buffer at the specified size around the input [Query.geometry](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#geometry). The query will use that
|
|
232
|
+
* buffer to return features in the layer or layer view that adhere to the to the indicated [spatial relationship](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#spatialRelationship).
|
|
233
233
|
*
|
|
234
|
-
*
|
|
235
|
-
*
|
|
234
|
+
* If querying a feature service, the [supportsQueryWithDistance](https://developers.arcgis.com/rest/services-reference/enterprise/query-feature-service-layer/)
|
|
235
|
+
* capability must be `true`.
|
|
236
236
|
*/
|
|
237
237
|
accessor distance: number | null | undefined;
|
|
238
238
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import e from"../Basemap.js";import
|
|
2
|
+
import e from"../Basemap.js";import s from"../core/Collection.js";import r from"../core/Logger.js";import{ensureType as o}from"../core/accessorSupport/ensureType.js";import{hasBasemapStylesApiKey as t}from"./apiKeyUtils.js";import{esriBasemapDefinitions as n}from"./basemapDefinitions.js";import{layerDefinitionEquals as i,layerToDefinition as a}from"./basemapUtils.js";const p=()=>r.getLogger("esri.support.basemapUtils");function f(s){let r;if("string"==typeof s){const o=s in n,i=!o&&s.includes("/");if(!o&&!i){if(t())p().warn(`Unable to find basemap definition for: ${s}. See available styles at https://developers.arcgis.com/rest/basemap-styles/`);else{const e=Object.entries(n).filter(([e,s])=>s.classic||s.is3d).map(([e])=>`"${e}"`).sort().join(", ");p().warn(`Unable to find basemap definition for: ${s}. Try one of these: ${e}`)}return null}r=o?e.fromId(s):new e({style:{id:s}})}else r=o(e,s);return r?.destroyed&&(p().warn("The provided basemap is already destroyed",{basemap:r}),r=null),r}function l(e,s=null){const r=f(e);if(!r)return null;const o=r.clone();return s&&(o.baseLayers=c(o.baseLayers,s.baseLayers),o.referenceLayers=c(o.referenceLayers,s.referenceLayers)),o}function c(e,r){const o=new s;return e.forEach(e=>{const s=r.find(s=>"scene"!==s.type&&i(a(e),a(s)))||e;o.includes(s)?o.push(e):o.push(s)}),o}export{f as basemapEnsureType,l as clonePreservingTiledLayers};
|
package/support/revision.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
const
|
|
2
|
+
const c="20260602",e="d086a4603725c86ac66ed9eef179162238cb5d85";export{c as buildDate,e as commitHash};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{EffectAddControlPoints as e}from"./effects/EffectAddControlPoints.js";import{EffectArrow as t}from"./effects/EffectArrow.js";import{EffectBuffer as r}from"./effects/EffectBuffer.js";import{EffectControlMeasureLine as c}from"./effects/EffectControlMeasureLine.js";import{EffectCut as
|
|
2
|
+
import{EffectAddControlPoints as e}from"./effects/EffectAddControlPoints.js";import{EffectArrow as t}from"./effects/EffectArrow.js";import{EffectBuffer as r}from"./effects/EffectBuffer.js";import{EffectControlMeasureLine as c}from"./effects/EffectControlMeasureLine.js";import{EffectCut as o}from"./effects/EffectCut.js";import{EffectDashes as f}from"./effects/EffectDashes.js";import{EffectDonut as s}from"./effects/EffectDonut.js";import{EffectEnclosingPolygon as a}from"./effects/EffectEnclosingPolygon.js";import{EffectJog as n}from"./effects/EffectJog.js";import{EffectMove as l}from"./effects/EffectMove.js";import{EffectOffset as m}from"./effects/EffectOffset.js";import{EffectRadial as i}from"./effects/EffectRadial.js";import{EffectReverse as u}from"./effects/EffectReverse.js";import{EffectRotate as p}from"./effects/EffectRotate.js";import{EffectScale as E}from"./effects/EffectScale.js";import{EffectSuppress as M}from"./effects/EffectSuppress.js";import{EffectTaperedPolygon as C}from"./effects/EffectTaperedPolygon.js";import{EffectWave as P}from"./effects/EffectWave.js";import{PlacementAlongLineSameSize as j}from"./placements/PlacementAlongLineSameSize.js";import{PlacementAtExtremities as I}from"./placements/PlacementAtExtremities.js";import{PlacementAtMeasuredUnits as G}from"./placements/PlacementAtMeasuredUnits.js";import{PlacementAtRatioPositions as d}from"./placements/PlacementAtRatioPositions.js";import{PlacementInsidePolygon as g}from"./placements/PlacementInsidePolygon.js";import{PlacementOnLine as v}from"./placements/PlacementOnLine.js";import{PlacementOnVertices as y}from"./placements/PlacementOnVertices.js";import{PlacementPolygonCenter as A}from"./placements/PlacementPolygonCenter.js";import{PrivateDimensionEffect as k}from"../../views/2d/layers/support/annodime/PrivateDimensionEffect.js";import{PrivatePlacementMultipoint as R}from"../../views/2d/layers/support/annodime/PrivatePlacementMultipoint.js";function S(j){if(!j)return null;switch(j.type){case"CIMGeometricEffectAddControlPoints":return e.local();case"CIMGeometricEffectArrow":return t.local();case"CIMGeometricEffectBuffer":return r.local();case"CIMGeometricEffectControlMeasureLine":return c.local();case"CIMGeometricEffectCut":return o.local();case"CIMGeometricEffectDashes":return f.local();case"CIMGeometricEffectDonut":return s.local();case"CIMGeometricEffectJog":return n.local();case"CIMGeometricEffectMove":return l.local();case"CIMGeometricEffectOffset":return m.local();case"CIMGeometricEffectRadial":return i.local();case"CIMGeometricEffectReverse":return u.local();case"CIMGeometricEffectRotate":return p.local();case"CIMGeometricEffectScale":return E.local();case"CIMGeometricEffectSuppress":return M.local();case"CIMGeometricEffectTaperedPolygon":return C.local();case"CIMGeometricEffectWave":return P.local();case"CIMGeometricEffectEnclosingPolygon":return a.local();case"PrivateDimensionEffect":return k.local()}return null}function w(e){if(!e)return null;switch(e.type){case"CIMMarkerPlacementAlongLineSameSize":return j.local();case"CIMMarkerPlacementAtExtremities":return I.local();case"CIMMarkerPlacementAtMeasuredUnits":return G.local();case"CIMMarkerPlacementAtRatioPositions":return d.local();case"CIMMarkerPlacementInsidePolygon":return g.local();case"CIMMarkerPlacementOnLine":return v.local();case"PrivatePlacementMultipoint":return R.local();case"CIMMarkerPlacementOnVertices":return y.local();case"CIMMarkerPlacementPolygonCenter":return A.local()}return null}export{S as getEffectOperator,w as getPlacementOperator};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{bidiText as e}from"../../core/BidiText.js";import{clone as t}from"../../core/lang.js";import r from"../../core/Logger.js";import o from"../../core/RandomLCG.js";import{px2pt as a}from"../../core/screenUtils.js";import{create as s,expandPointInPlace as i}from"../../geometry/support/aaBoundingRect.js";import{getBoundsXY as n}from"../../geometry/support/boundsUtils.js";import{isCurvedGeometry as l}from"../../geometry/support/curves/curveUtils.js";import{densifyCurvedGeometry as c}from"../../geometry/support/curves/densifyCurvedGeometry.js";import m from"../Font.js";import{loadGeometryOperatorsForEffect as f,loadGeometryOperatorsForPlacement as y}from"./CIMEffects.js";import{Placement as h}from"./CIMPlacements.js";import{EnvDrawHelper as u,CanvasDrawHelper as p,lineGapType2LineHeight as S,Transformation as M}from"./CIMSymbolDrawHelper.js";import{defaultCIMValues as d}from"./defaultCIMValues.js";import{getEffectsInflateSize as g,getNumericValue as b,fromCIMFontStyle as x,fromCIMFontDecoration as C}from"./utils.js";import{defaultPolylineSymbol2D as I}from"../support/defaults.js";import{cInfinity as k}from"../../views/2d/engine/vectorTiles/GeometryUtils.js";import{magicLabelLineHeight as w,glyphSize as P,randomInsidePolygonTextureSize as L}from"../../views/2d/engine/webgl/definitions.js";import{shapeGlyphs as z}from"../../views/2d/engine/webgl/mesh/templates/shapingUtils.js";import{roundPtToWholePixel as F,getLineWidth as D}from"../../views/2d/layers/graphics/graphicsUtils.js";const T=Math.PI,v=T/2,A=Math.PI/180,G=96/72,j=1.4142135623730951,E=2,R=4,B=()=>r.getLogger("esri.symbols.cim.CIMSymbolHelper");function X(e){let t;switch(e.type){case"cim":return e.data;case"web-style":return e;case"simple-marker":{const r=_.fromSimpleMarker(e);if(!r)throw new Error("InternalError: Cannot convert symbol to CIM");t=r;break}case"picture-marker":t=_.fromPictureMarker(e);break;case"simple-line":t=_.fromSimpleLineSymbol(e);break;case"simple-fill":t=_.fromSimpleFillSymbol(e);break;case"picture-fill":t=_.fromPictureFillSymbol(e);break;case"text":t=_.fromTextSymbol(e)}return{type:"CIMSymbolReference",symbol:t}}function V(e,t,r){switch(t.type){case"CIMSymbolReference":return V(e,t.symbol,r);case"CIMPointSymbol":null==r&&(r={x:0,y:0}),e.drawSymbol(t,r);break;case"CIMLineSymbol":null==r&&(r={paths:[[[0,0],[10,0]]]}),e.drawSymbol(t,r);break;case"CIMPolygonSymbol":null==r&&(r={rings:[[[0,0],[0,10],[10,10],[10,0],[0,0]]]}),e.drawSymbol(t,r);break;case"CIMTextSymbol":{const r={x:0,y:0};e.drawSymbol(t,r);break}case"CIMVectorMarker":{const r=new h;e.drawMarker(t,r);break}}return e.envelope()}function N(e){if(!e)return 0;switch(e.type){case"CIMMarkerPlacementAlongLineSameSize":case"CIMMarkerPlacementAlongLineRandomSize":case"CIMMarkerPlacementAtExtremities":case"CIMMarkerPlacementAtMeasuredUnits":case"CIMMarkerPlacementAtRatioPositions":case"CIMMarkerPlacementOnLine":case"CIMMarkerPlacementOnVertices":return Math.abs(e.offset??0);default:return 0}}class Y{static getSymbolInflateSize(e,t,r,o,a){return e||(e=[0,0,0,0]),t?this._getInflateSize(e,t,r,o,a):e}static safeSize(e){const t=Math.max(Math.abs(e[0]),Math.abs(e[2])),r=Math.max(Math.abs(e[1]),Math.abs(e[3]));return Math.sqrt(t*t+r*r)}static _vectorMarkerBounds(e,t,r,o){let a=!0;const i=s();if(t?.markerGraphics)for(const s of t.markerGraphics){const t=[0,0,0,0];s.geometry&&(n(i,s.geometry),t[0]=0,t[1]=0,t[2]=0,t[3]=0,this.getSymbolInflateSize(t,s.symbol,r,0,o),i[0]+=t[0],i[1]+=t[1],i[2]+=t[2],i[3]+=t[3],a?(e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],a=!1):(e[0]=Math.min(e[0],i[0]),e[1]=Math.min(e[1],i[1]),e[2]=Math.max(e[2],i[2]),e[3]=Math.max(e[3],i[3])))}return e}static _getInflateSize(e,t,r,o,a){if(ee(t)){const s=this._getLayersInflateSize(e,t.symbolLayers,r,o,a),i=g(t.effects);return i>0&&(s[0]-=i,s[1]-=i,s[2]+=i,s[3]+=i),s}return this._getTextInflatedSize(e,t,a)}static _getLayersInflateSize(e,t,r,o,a){let n=!0;if(!t)return e;for(const l of t){if(!l)continue;let t=[0,0,0,0];switch(l.type){case"CIMSolidFill":case"CIMPictureFill":case"CIMHatchFill":case"CIMGradientFill":break;case"CIMSolidStroke":case"CIMPictureStroke":case"CIMGradientStroke":{const e=l;let r=e.width;null!=r&&("Square"===e.capStyle||"Miter"===e.joinStyle?r/=j:r/=2,t[0]=-r,t[1]=-r,t[2]=r,t[3]=r);break}case"CIMCharacterMarker":case"CIMVectorMarker":case"CIMPictureMarker":{const e=l;if("CIMVectorMarker"===l.type){const e=l;if(t=this._vectorMarkerBounds(t,e,r,a),e.frame){const r=(e.frame.xmin+e.frame.xmax)/2,o=(e.frame.ymin+e.frame.ymax)/2;if(t[0]-=r,t[1]-=o,t[2]-=r,t[3]-=o,null!=e.size){const r=e.size/(e.frame.ymax-e.frame.ymin);t[0]*=r,t[1]*=r,t[2]*=r,t[3]*=r}}}else if("CIMPictureMarker"===l.type){const o=l,a=r.getResource(o.url);let s=1;if(null!=a&&a.height&&(s=a.width/a.height),null!=e.size){const r=e.size/2,a=e.size*s*(o.scaleX??1)/2;t=[-a,-r,a,r]}}else if(null!=e.size){const r=e.size/2;t=[-r,-r,r,r]}if(e.anchorPoint){let r,o;"Absolute"===e.anchorPointUnits?(r=e.anchorPoint.x,o=e.anchorPoint.y):(r=e.anchorPoint.x*(t[2]-t[0]),o=e.anchorPoint.y*(t[3]-t[1]));const a=1.25*Math.sqrt(r*r+o*o);t[0]-=a,t[1]-=a,t[2]+=a,t[3]+=a}let n=b(e.rotation);if(e.rotateClockwise&&(n=-n),o&&(n-=o),n){const e=A*n,r=Math.cos(e),o=Math.sin(e),a=s([k,k,-k,-k]);i(a,[t[0]*r-t[1]*o,t[0]*o+t[1]*r]),i(a,[t[0]*r-t[3]*o,t[0]*o+t[3]*r]),i(a,[t[2]*r-t[1]*o,t[2]*o+t[1]*r]),i(a,[t[2]*r-t[3]*o,t[2]*o+t[3]*r]),t=a}let c=b(e.offsetX),m=b(e.offsetY);if(o){const e=A*o,t=Math.cos(e),r=Math.sin(e),a=c*r+m*t;c=c*t-m*r,m=a}t[0]+=c,t[1]+=m,t[2]+=c,t[3]+=m;const f=N(e.markerPlacement);f>0&&(t[0]-=f,t[1]-=f,t[2]+=f,t[3]+=f);break}}const c=g(l.effects);c>0&&(t[0]-=c,t[1]-=c,t[2]+=c,t[3]+=c),n?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],n=!1):(e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.max(e[2],t[2]),e[3]=Math.max(e[3],t[3]))}return e}static _getTextInflatedSize(e,t,r){const o=F(t.height??d.CIMTextSymbol.height);if(e[0]=-o/2,e[1]=-o/2,e[2]=o/2,e[3]=o/2,!r)return e;const a=r.get(t);if(!a)return e;if(!a.glyphMosaicItems.glyphs.length)return e;const{lineGapType:s,lineGap:i}=t,n=s?S(s,i??0,o):0,l=t.horizontalAlignment??d.CIMTextSymbol.horizontalalignment,c=t.verticalAlignment??d.CIMTextSymbol.verticalalignment,m="CIMBackgroundCallout"===t.callout?.type,f=z(a.glyphMosaicItems,{scale:o/P,angle:b(t.angle),xOffset:b(t.offsetX),yOffset:b(t.offsetY),horizontalAlignment:l,verticalAlignment:c,maxLineWidth:D(t.lineWidth),lineHeight:w*Math.max(.25,Math.min(n||1,4)),decoration:t.font.decoration||"none",useCIMAngleBehavior:!0,hasBackground:m}).boundsT,y=Math.sqrt(f.width*f.width+f.height*f.height);return e[0]-=f.x+y,e[1]-=f.y-y,e[2]+=f.x+y,e[3]+=-f.y+y,e}}class _{static getEnvelope(e,t,r){if(!e)return null;const o=new u(r);if(Array.isArray(e)){let r;for(const a of e)r?r.union(V(o,a,t)):r=V(o,a,t);return r}return V(o,e,t)}static getTextureInfo(e,t,r,o,a){const s=o??this.getEnvelope(e,null,t);if(!s)return[0,0,0,0,1];const i=Math.max(s.width,s.height)*G;let n=null!=a?Math.max(a/i,1):1;n*=G,s.x*=n,s.y*=n,s.width*=n,s.height*=n,s.width=Math.max(Math.ceil(s.x+s.width)-Math.floor(s.x),1)-1,s.height=Math.max(Math.ceil(s.y+s.height)-Math.floor(s.y),1)-1;let l=s.x+.5*s.width,c=s.y+.5*s.height;return l+=s.x-Math.floor(s.x),c+=s.y-Math.floor(s.y),o||(s.width+=r,s.height+=r,l+=r/2,c+=r/2),[s.width,s.height,l,c,n]}static getTextureAnchor(e,t,r){const[o,a,s,i,n]=this.getTextureInfo(e,t,E,null,r);return[-s/o,-i/a,a/n*G]}static rasterize(e,t,r,o,a=!0,s){const[i,n,l,c,m]=this.getTextureInfo(t,o,E,r,s);e.width=i,e.height=n;const f=e.getContext("2d",{willReadFrequently:!0}),y=M.createScale(m,-m);y.translate(.5*i-l,.5*n+c);const u=new p(f,o,y);switch(t.type){case"CIMPointSymbol":{const e={type:"point",x:0,y:0};u.drawSymbol(t,e);break}case"CIMVectorMarker":{const e=new h;u.drawMarker(t,e);break}}const S=f.getImageData(0,0,e.width,e.height),d=new Uint8Array(S.data);if(a){let e;for(let t=0;t<d.length;t+=4)e=d[t+3]/255,d[t]=d[t]*e,d[t+1]=d[t+1]*e,d[t+2]=d[t+2]*e}return[d,e.width,e.height,-l/i,-c/n]}static fromTextSymbol(e){const{text:t}=e;return{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,anchorPointUnits:"Relative",dominantSizeAxis3D:"Y",size:10,billboardMode3D:"FaceNearPlane",frame:{xmin:-5,ymin:-5,xmax:5,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{x:0,y:0},symbol:_.createCIMTextSymbolfromTextSymbol(e),textString:t}],scaleSymbolsProportionally:!0,respectFrame:!0}],scaleX:1,angleAlignment:"Display"}}static fromPictureFillSymbol(e){const{height:t,outline:r,width:o,xoffset:a,xscale:s,yoffset:i,yscale:n}=e,l=[],c={type:"CIMPolygonSymbol",symbolLayers:l};if(r){const e=oe(r);e&&l.push(e)}let m=e.url;"esriPFS"===e.type&&e.imageData&&(m=e.imageData);const f="angle"in e?e.angle??0:0,y=(o??0)*(s||1),h=(t??0)*(n||1);return l.push({type:"CIMPictureFill",enable:!0,invertBackfaceTexture:!1,scaleX:1,textureFilter:"Picture",tintColor:null,url:m,height:h,width:y,offsetX:b(a),offsetY:b(i),rotation:b(-f),colorSubstitutions:null}),c}static fromSimpleFillSymbol(e){const{color:r,style:o,outline:s}=e,i=[],n={type:"CIMPolygonSymbol",symbolLayers:i};if(s){const e=oe(s);e&&i.push(e)}if(o&&"solid"!==o&&"none"!==o&&"esriSFSSolid"!==o&&"esriSFSNull"!==o){const e={type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",color:W(r),capStyle:"Butt",joinStyle:"Miter",width:.75}]};let s=0;const n=a(re(o)?8:10);switch(o){case"vertical":case"esriSFSVertical":s=90;break;case"forward-diagonal":case"esriSFSForwardDiagonal":case"diagonal-cross":case"esriSFSDiagonalCross":s=-45;break;case"backward-diagonal":case"esriSFSBackwardDiagonal":s=45;break;case"cross":case"esriSFSCross":s=0}i.push({type:"CIMHatchFill",lineSymbol:e,offsetX:0,offsetY:0,rotation:s,separation:n}),"cross"===o||"esriSFSCross"===o?i.push({type:"CIMHatchFill",lineSymbol:t(e),offsetX:0,offsetY:0,rotation:90,separation:n}):"diagonal-cross"!==o&&"esriSFSDiagonalCross"!==o||i.push({type:"CIMHatchFill",lineSymbol:t(e),offsetX:0,offsetY:0,rotation:45,separation:n})}else!o||"solid"!==o&&"esriSFSSolid"!==o||i.push({type:"CIMSolidFill",enable:!0,color:W(r)});return n}static fromSimpleLineSymbol(e){const{cap:t,color:r,join:o,marker:a,miterLimit:s,style:i,width:n}=e;let l=null;"solid"!==i&&"none"!==i&&"esriSLSSolid"!==i&&"esriSLSNull"!==i&&(l=[{type:"CIMGeometricEffectDashes",dashTemplate:Z(i,t),lineDashEnding:"NoConstraint",scaleDash:!0,offsetAlongLine:null}]);const c=[];if(a){let e;switch(a.placement){case"begin-end":e="Both";break;case"begin":e="JustBegin";break;case"end":e="JustEnd";break;default:e="None"}const t=_.fromSimpleMarker(a,n,r).symbolLayers[0];t.markerPlacement={type:"CIMMarkerPlacementAtExtremities",placePerPart:!1,angleToLine:!0,keepUpright:!1,offset:0,extremityPlacement:e,offsetAlongLine:0},c.push(t)}return c.push({type:"CIMSolidStroke",color:"none"!==i&&"esriSLSNull"!==i?W(r):[0,0,0,0],capStyle:q(t),joinStyle:H(o),miterLimit:s,width:n,effects:l}),{type:"CIMLineSymbol",symbolLayers:c}}static fromPictureMarker(e){const{angle:t,height:r,width:o,xoffset:a,yoffset:s}=e;let i=e.url;return"esriPMS"===e.type&&e.imageData&&(i=e.imageData),{type:"CIMPointSymbol",symbolLayers:[{type:"CIMPictureMarker",invertBackfaceTexture:!1,scaleX:1,textureFilter:"Picture",tintColor:null,url:i,size:r,width:o,offsetX:b(a),offsetY:b(s),rotation:b(-t)}]}}static createCIMTextSymbolfromTextSymbol(t){const{angle:r,color:o,font:a,haloColor:s,haloSize:i,horizontalAlignment:n,kerning:l,lineWidth:c,text:m,verticalAlignment:f,xoffset:y,yoffset:h,backgroundColor:u,borderLineColor:p,borderLineSize:S}=t;let M,d,g,x,C,I;a&&(M=a.family,d=a.style,g=a.weight,x=a.size,C=a.decoration);let k=!1;if(m){k=e(m)[1]}return(u||S)&&(I={type:"CIMBackgroundCallout",margin:null,backgroundSymbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:W(u)},{type:"CIMSolidStroke",enable:!0,color:W(p),width:S??0}]},accentBarSymbol:null,gap:null,leaderLineSymbol:null,lineStyle:null}),{type:"CIMTextSymbol",angle:r,blockProgression:2,depth3D:1,extrapolateBaselines:!0,fontEffects:0,fontEncoding:1,fontFamilyName:M||"Arial",fontStyleName:J(d,g),fontType:0,haloSize:i,height:x,hinting:1,horizontalAlignment:O(n??"center"),kerning:l,letterWidth:100,ligatures:!0,lineGapType:"Multiple",lineWidth:c,offsetX:b(y),offsetY:b(h),strikethrough:"line-through"===C,underline:"underline"===C,symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:W(o)}]},haloSymbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:W(s)}]},shadowColor:[0,0,0,255],shadowOffsetX:1,shadowOffsetY:1,textCase:"Normal",textDirection:k?1:0,verticalAlignment:$(f??"baseline"),verticalGlyphOrientation:0,wordSpacing:100,billboardMode3D:2,callout:I}}static createPictureMarkerRasterizationParam(e){const{angle:t,height:r,width:o,xoffset:a,yoffset:s}=e,i=e.url??e.source?.url??e.source?.imageData;return i?{type:"sprite-rasterization-param",overrides:[],resource:{type:"CIMPictureMarker",enable:!0,invertBackfaceTexture:!1,scaleX:1,textureFilter:"Picture",tintColor:null,url:i,size:r,width:o,offsetX:b(a),offsetY:b(s),rotation:b(-t)}}:null}static createPictureFillRasterizationParam(e){const{width:t,height:r,xoffset:o,yoffset:a,url:s}=e;return s?{type:"sprite-rasterization-param",overrides:[],resource:{type:"CIMPictureFill",enable:!0,scaleX:1,textureFilter:"Picture",tintColor:null,url:s,width:t,height:r,offsetX:b(o),offsetY:b(a),rotation:0}}:null}static fromSimpleMarker(e,t,r){const{style:o}=e,a=e.color??r;if("path"===o||"esriSMSPath"===o){const t=[];if("outline"in e&&e.outline){const r=e.outline;t.push({type:"CIMSolidStroke",enable:!0,width:r.width,color:W(r.color),path:e.path})}t.push({type:"CIMSolidFill",enable:!0,color:W(a),path:e.path});const[r,o]=te("square");return{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,rotation:-b(e.angle),size:b(e.size||6),offsetX:b(e.xoffset),offsetY:b(e.yoffset),scaleSymbolsProportionally:!1,frame:r,markerGraphics:[{type:"CIMMarkerGraphic",geometry:o,symbol:{type:"CIMPolygonSymbol",symbolLayers:t}}]}]}}const s=[];let i,n,l=e.size;if("outline"in e&&e.outline&&"none"!==e.outline.style&&"esriSLSNull"!==e.outline.style){const t=e.outline,r="solid"!==t.style&&"esriSLSSolid"!==t.style;[i,n]=r?te(o,e.size):te(o);const a=t.width??I.width;if(r){const t=a/e.size,r=(i.xmax-i.xmin)*t/2,o=(i.ymax-i.ymin)*t/2;i.xmin-=r,i.xmax+=r,i.ymin-=o,i.ymax+=o,l&&(l+=a)}const c="cross"!==e.style&&"x"!==e.style||"dot"===e?.outline.style||"short-dot"===e?.outline.style?"HalfGap":"FullPattern",m=r?[{type:"CIMGeometricEffectAddControlPoints"},{type:"CIMGeometricEffectDashes",dashTemplate:Z(t.style,null).map(e=>t.width&&t.width>0?e*t.width:e),lineDashEnding:c,controlPointEnding:"FullPattern"}]:void 0;s.push({type:"CIMSolidStroke",capStyle:r?"Round":"Butt",enable:!0,width:a,color:W(t.color),effects:m})}else!t||"line-marker"!==e.type||"cross"!==e.style&&"x"!==e.style?[i,n]=te(o):([i,n]=te(o),s.push({type:"CIMSolidStroke",enable:!0,width:t,color:W(a)}));s.push({type:"CIMSolidFill",enable:!0,color:W(a)});const c={type:"CIMPolygonSymbol",symbolLayers:s};return{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,rotation:b(-e.angle),size:b(l||6*t),offsetX:b(e.xoffset),offsetY:b(e.yoffset),scaleSymbolsProportionally:!1,frame:i,markerGraphics:[{type:"CIMMarkerGraphic",geometry:n,symbol:c}]}]}}static fromCIMHatchFill(e,r){const o=r*(e.separation??d.CIMHatchFill.separation),a=o/2,s=t(e.lineSymbol);s.symbolLayers?.forEach(e=>{switch(e.type){case"CIMSolidStroke":null!=e.width&&(e.width*=r),e.effects?.forEach(e=>{if("CIMGeometricEffectDashes"===e.type){const t=e.dashTemplate;e.dashTemplate=t?.map(e=>e*r)}});break;case"CIMVectorMarker":{null!=e.size&&(e.size*=r);const t=e.markerPlacement;null!=t&&"placementTemplate"in t&&(t.placementTemplate=t.placementTemplate.map(e=>e*r));break}}});let i=this._getLineSymbolPeriod(s)||R;for(;i<R;)i*=2;const n=i/2;return{type:"CIMVectorMarker",enable:!0,frame:{xmin:-n,xmax:n,ymin:-a,ymax:a},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{paths:[[[-n,0],[n,0]]]},symbol:s}],size:o}}static async normalizeSymbolAndFetchResources(e,t,r=null){if(!e)return;const o=[];if("effects"in e&&e.effects)for(const s of e.effects)o.push(f(s));async function a(e){if("CIMTextSymbol"!==e.type)return;const{fontFamilyName:r,fontStyleName:o}=e;if("calcitewebcoreicons"===r?.toLowerCase())return;const{style:a,weight:s}=x(o),i=C(e),n=new m({family:r,style:a,weight:s,decoration:i});try{await t.loadFont(n)}catch{B().error(`Unsupported font ${r} in CIM symbol`)}}o.push(a(e)),U(e,e=>{if(e.effects)for(const t of e.effects)o.push(f(t));if("CIMVectorMarker"===e.type){for(const t of e.markerGraphics)l(t.geometry)&&(t.geometry=c(t.geometry,{maxDeviation:.01}));e.markerPlacement&&o.push(y(e.markerPlacement))}"url"in e&&e.url&&o.push(t.fetchResource(e.url,{signal:r})),"symbol"in e&&o.push(a(e.symbol))}),await Promise.all(o)}static _getLineSymbolPeriod(e){if(e){const t=this._getEffectsRepeat(e.effects);if(t)return t;if(e.symbolLayers)for(const r of e.symbolLayers)if(r){const e=this._getEffectsRepeat(r.effects);if(e)return e;switch(r.type){case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":{const e=this._getPlacementRepeat(r.markerPlacement);if(e)return e}}}}return 0}static _getEffectsRepeat(e){if(e)for(const t of e)if(t)switch(t.type){case"CIMGeometricEffectDashes":{const e=t.dashTemplate;if(e&&e.length){let t=0;for(const r of e)t+=r;return 1&e.length&&(t*=2),t}break}case"CIMGeometricEffectWave":return t.period;default:B().error(`unsupported geometric effect type ${t.type}`)}return 0}static _getPlacementRepeat(e){if(e)switch(e.type){case"CIMMarkerPlacementAlongLineSameSize":case"CIMMarkerPlacementAlongLineRandomSize":case"CIMMarkerPlacementAlongLineVariableSize":{const t=e.placementTemplate;if(t&&t.length){let e=0;for(const r of t)e+=+r;return 1&t.length&&(e*=2),e}break}}return 0}static fromCIMInsidePolygon(e){const t=e.markerPlacement,r={...e};r.markerPlacement=null,r.anchorPoint=null;const s=Math.abs(t.stepX),i=Math.abs(t.stepY),n=(t.randomness??100)/100;let l,c,m,f;if("Random"===t.gridType){const e=a(L),r=Math.max(Math.floor(e/s),1),y=Math.max(Math.floor(e/i),1);l=r*s/2,c=y*i/2,m=2*c;const h=new o(t.seed),u=n*s/1.5,p=n*i/1.5;f=[];for(let t=0;t<r;t++)for(let e=0;e<y;e++){const r=t*s-l+u*(.5-h.getFloat()),o=e*i-c+p*(.5-h.getFloat());f.push({x:r,y:o}),0===t&&f.push({x:r+2*l,y:o}),0===e&&f.push({x:r,y:o+2*c})}}else!0===t.shiftOddRows?(l=s/2,c=i,m=2*i,f=[{x:-l,y:0},{x:l,y:0},{x:0,y:c},{x:0,y:-c}]):(l=s/2,c=i/2,m=i,f=[{x:-s,y:0},{x:0,y:-i},{x:-s,y:-i},{x:0,y:0},{x:s,y:0},{x:0,y:i},{x:s,y:i},{x:-s,y:i},{x:s,y:-i}]);return{type:"CIMVectorMarker",enable:!0,frame:{xmin:-l,xmax:l,ymin:-c,ymax:c},markerGraphics:f.map(e=>({type:"CIMMarkerGraphic",geometry:e,symbol:{type:"CIMPointSymbol",symbolLayers:[r]}})),size:m}}}function U(e,t){if(e)switch(e.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":{const r=e.symbolLayers;if(!r)return;for(const e of r)if(t(e),"CIMVectorMarker"===e.type){const r=e.markerGraphics;if(!r)continue;for(const e of r)if(e){const r=e.symbol;r&&U(r,t)}}break}}}const q=e=>{if(!e)return"Butt";switch(e){case"butt":return"Butt";case"square":return"Square";case"round":return"Round"}},H=e=>{if(!e)return"Miter";switch(e){case"miter":return"Miter";case"round":return"Round";case"bevel":return"Bevel"}},O=e=>{if(null==e)return"Center";switch(e){case"left":return"Left";case"right":return"Right";case"center":return"Center";case"justify":return"Justify"}},$=e=>{if(null==e)return"Center";switch(e){case"baseline":return"Baseline";case"top":return"Top";case"middle":return"Center";case"bottom":return"Bottom"}},W=e=>{if(!e)return[0,0,0,0];const{r:t,g:r,b:o,a}=e;return[t,r,o,255*a]},J=(e,t)=>{const r=K(t),o=Q(e);return r&&o?`${r}-${o}`:`${r}${o}`},K=e=>{if(!e)return"";switch(e.toLowerCase()){case"bold":case"bolder":return"bold"}return""},Q=e=>{if(!e)return"";switch(e.toLowerCase()){case"italic":case"oblique":return"italic"}return""},Z=(e,t)=>{const r=.001,o="butt"===t;switch(e){case"dash":case"esriSLSDash":return o?[4,3]:[3,4];case"dash-dot":case"esriSLSDashDot":return o?[4,3,1,3]:[3,4,r,4];case"dot":case"esriSLSDot":return o?[1,3]:[r,4];case"long-dash":case"esriSLSLongDash":return o?[8,3]:[7,4];case"long-dash-dot":case"esriSLSLongDashDot":return o?[8,3,1,3]:[7,4,r,4];case"long-dash-dot-dot":case"esriSLSDashDotDot":return o?[8,3,1,3,1,3]:[7,4,r,4,r,4];case"short-dash":case"esriSLSShortDash":return o?[4,1]:[3,2];case"short-dash-dot":case"esriSLSShortDashDot":return o?[4,1,1,1]:[3,2,r,2];case"short-dash-dot-dot":case"esriSLSShortDashDotDot":return o?[4,1,1,1,1,1]:[3,2,r,2,r,2];case"short-dot":case"esriSLSShortDot":return o?[1,1]:[r,2];case"solid":case"esriSLSSolid":case"none":return B().error("Unexpected: style does not require rasterization"),[0,0];default:return B().error(`Tried to rasterize SLS, but found an unexpected style: ${e}!`),[0,0]}};function ee(e){return void 0!==e.symbolLayers}const te=(e,t=100)=>{const r=t/2;let o,a;const s=e;if("circle"===s||"esriSMSCircle"===s){const e=.25;let t=Math.acos(1-e/r),s=Math.ceil(T/t/4);0===s&&(s=1),t=v/s,s*=4;const i=[];i.push([r,0]);for(let o=1;o<s;o++)i.push([r*Math.cos(o*t),-r*Math.sin(o*t)]);i.push([r,0]),o={rings:[i]},a={xmin:-r,ymin:-r,xmax:r,ymax:r}}else if("cross"===s||"esriSMSCross"===s){const e=0;o={paths:[[[e,r],[e,-r]],[[r,e],[-r,e]]]},a={xmin:-r,ymin:-r,xmax:r,ymax:r}}else if("diamond"===s||"esriSMSDiamond"===s)o={rings:[[[-r,0],[0,r],[r,0],[0,-r],[-r,0]]]},a={xmin:-r,ymin:-r,xmax:r,ymax:r};else if("square"===s||"esriSMSSquare"===s)o={rings:[[[-r,-r],[-r,r],[r,r],[r,-r],[-r,-r]]]},a={xmin:-r,ymin:-r,xmax:r,ymax:r};else if("x"===s||"esriSMSX"===s)o={paths:[[[r,r],[-r,-r]],[[r,-r],[-r,r]]]},a={xmin:-r,ymin:-r,xmax:r,ymax:r};else if("triangle"===s||"esriSMSTriangle"===s){const e=t*.5773502691896257,r=-e,s=2/3*t,i=s-t;o={rings:[[[r,i],[0,s],[e,i],[r,i]]]},a={xmin:r,ymin:i,xmax:e,ymax:s}}else"arrow"===s&&(o={rings:[[[-50,50],[50,0],[-50,-50],[-33,-20],[-33,20],[-50,50]]]},a={xmin:-r,ymin:-r,xmax:r,ymax:r});return[a,o]},re=e=>"vertical"===e||"horizontal"===e||"cross"===e||"esriSFSCross"===e||"esriSFSVertical"===e||"esriSFSHorizontal"===e;function oe(e){if(!e)return null;let t=null;const{cap:r,color:o,join:a,miterLimit:s,style:i,width:n}=e;return"solid"!==i&&"none"!==i&&"esriSLSSolid"!==i&&"esriSLSNull"!==i&&(t=[{type:"CIMGeometricEffectDashes",dashTemplate:Z(i,r),lineDashEnding:"NoConstraint",scaleDash:!0,offsetAlongLine:null}]),{type:"CIMSolidStroke",color:"esriSLSNull"!==i&&"none"!==i?W(o):[0,0,0,0],capStyle:q(r),joinStyle:H(a),miterLimit:s,width:n,effects:t}}export{_ as CIMSymbolHelper,Y as CIMSymbolInflatedSizeHelper,q as capTypeToEnum,U as forEachSymbolLayer,Z as slsDashToTemplateArray,X as symbolToCIM};
|
|
2
|
+
import{bidiText as e}from"../../core/BidiText.js";import{clone as t}from"../../core/lang.js";import r from"../../core/Logger.js";import o from"../../core/RandomLCG.js";import{px2pt as a}from"../../core/screenUtils.js";import{create as s,expandPointInPlace as i}from"../../geometry/support/aaBoundingRect.js";import{getBoundsXY as n}from"../../geometry/support/boundsUtils.js";import{isCurvedGeometry as l}from"../../geometry/support/curves/curveUtils.js";import{densifyCurvedGeometry as c}from"../../geometry/support/curves/densifyCurvedGeometry.js";import m from"../Font.js";import{loadGeometryOperatorsForEffect as f,loadGeometryOperatorsForPlacement as y}from"./CIMEffects.js";import{Placement as h}from"./CIMPlacements.js";import{EnvDrawHelper as u,CanvasDrawHelper as p,lineGapType2LineHeight as S,Transformation as M}from"./CIMSymbolDrawHelper.js";import{defaultCIMValues as d}from"./defaultCIMValues.js";import{getEffectsInflateSize as g,getNumericValue as b,fromCIMFontStyle as x,fromCIMFontDecoration as C}from"./utils.js";import{defaultPolylineSymbol2D as I}from"../support/defaults.js";import{cInfinity as k}from"../../views/2d/engine/vectorTiles/GeometryUtils.js";import{magicLabelLineHeight as w,glyphSize as P,randomInsidePolygonTextureSize as L}from"../../views/2d/engine/webgl/definitions.js";import{shapeGlyphs as z}from"../../views/2d/engine/webgl/mesh/templates/shapingUtils.js";import{roundPtToWholePixel as F,getLineWidth as D}from"../../views/2d/layers/graphics/graphicsUtils.js";const T=Math.PI,v=T/2,A=Math.PI/180,G=96/72,j=1.4142135623730951,E=2,R=4,B=()=>r.getLogger("esri.symbols.cim.CIMSymbolHelper");function X(e){let t;switch(e.type){case"cim":return e.data;case"web-style":return e;case"simple-marker":{const r=_.fromSimpleMarker(e);if(!r)throw new Error("InternalError: Cannot convert symbol to CIM");t=r;break}case"picture-marker":t=_.fromPictureMarker(e);break;case"simple-line":t=_.fromSimpleLineSymbol(e);break;case"simple-fill":t=_.fromSimpleFillSymbol(e);break;case"picture-fill":t=_.fromPictureFillSymbol(e);break;case"text":t=_.fromTextSymbol(e)}return{type:"CIMSymbolReference",symbol:t}}function V(e,t,r){switch(t.type){case"CIMSymbolReference":return V(e,t.symbol,r);case"CIMPointSymbol":null==r&&(r={x:0,y:0}),e.drawSymbol(t,r);break;case"CIMLineSymbol":null==r&&(r={paths:[[[0,0],[10,0]]]}),e.drawSymbol(t,r);break;case"CIMPolygonSymbol":null==r&&(r={rings:[[[0,0],[0,10],[10,10],[10,0],[0,0]]]}),e.drawSymbol(t,r);break;case"CIMTextSymbol":{const r={x:0,y:0};e.drawSymbol(t,r);break}case"CIMVectorMarker":{const r=new h;e.drawMarker(t,r);break}}return e.envelope()}function N(e){if(!e)return 0;switch(e.type){case"CIMMarkerPlacementAlongLineSameSize":case"CIMMarkerPlacementAlongLineRandomSize":case"CIMMarkerPlacementAtExtremities":case"CIMMarkerPlacementAtMeasuredUnits":case"CIMMarkerPlacementAtRatioPositions":case"CIMMarkerPlacementOnLine":case"CIMMarkerPlacementOnVertices":return Math.abs(e.offset??0);default:return 0}}class Y{static getSymbolInflateSize(e,t,r,o,a){return e||(e=[0,0,0,0]),t?this._getInflateSize(e,t,r,o,a):e}static safeSize(e){const t=Math.max(Math.abs(e[0]),Math.abs(e[2])),r=Math.max(Math.abs(e[1]),Math.abs(e[3]));return Math.sqrt(t*t+r*r)}static _vectorMarkerBounds(e,t,r,o){let a=!0;const i=s();if(t?.markerGraphics)for(const s of t.markerGraphics){const t=[0,0,0,0];s.geometry&&(n(i,s.geometry),t[0]=0,t[1]=0,t[2]=0,t[3]=0,this.getSymbolInflateSize(t,s.symbol,r,0,o),i[0]+=t[0],i[1]+=t[1],i[2]+=t[2],i[3]+=t[3],a?(e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],a=!1):(e[0]=Math.min(e[0],i[0]),e[1]=Math.min(e[1],i[1]),e[2]=Math.max(e[2],i[2]),e[3]=Math.max(e[3],i[3])))}return e}static _getInflateSize(e,t,r,o,a){if(ee(t)){const s=this._getLayersInflateSize(e,t.symbolLayers,r,o,a),i=g(t.effects);return i>0&&(s[0]-=i,s[1]-=i,s[2]+=i,s[3]+=i),s}return this._getTextInflatedSize(e,t,a)}static _getLayersInflateSize(e,t,r,o,a){let n=!0;if(!t)return e;for(const l of t){if(!l)continue;let t=[0,0,0,0];switch(l.type){case"CIMSolidFill":case"CIMPictureFill":case"CIMHatchFill":case"CIMGradientFill":break;case"CIMSolidStroke":case"CIMPictureStroke":case"CIMGradientStroke":{const e=l;let r=e.width;null!=r&&("Square"===e.capStyle||"Miter"===e.joinStyle?r/=j:r/=2,t[0]=-r,t[1]=-r,t[2]=r,t[3]=r);break}case"CIMCharacterMarker":case"CIMVectorMarker":case"CIMPictureMarker":{const e=l;if("CIMVectorMarker"===l.type){const e=l;if(t=this._vectorMarkerBounds(t,e,r,a),e.frame){const r=(e.frame.xmin+e.frame.xmax)/2,o=(e.frame.ymin+e.frame.ymax)/2;if(t[0]-=r,t[1]-=o,t[2]-=r,t[3]-=o,null!=e.size){const r=e.size/(e.frame.ymax-e.frame.ymin);t[0]*=r,t[1]*=r,t[2]*=r,t[3]*=r}}}else if("CIMPictureMarker"===l.type){const o=l,a=r.getResource(o.url);let s=1;if(null!=a&&a.height&&(s=a.width/a.height),null!=e.size){const r=e.size/2,a=e.size*s*(o.scaleX??1)/2;t=[-a,-r,a,r]}}else if(null!=e.size){const r=e.size/2;t=[-r,-r,r,r]}if(e.anchorPoint){let r,o;"Absolute"===e.anchorPointUnits?(r=e.anchorPoint.x,o=e.anchorPoint.y):(r=e.anchorPoint.x*(t[2]-t[0]),o=e.anchorPoint.y*(t[3]-t[1]));const a=1.25*Math.sqrt(r*r+o*o);t[0]-=a,t[1]-=a,t[2]+=a,t[3]+=a}let n=b(e.rotation);if(e.rotateClockwise&&(n=-n),o&&(n-=o),n){const e=A*n,r=Math.cos(e),o=Math.sin(e),a=s([k,k,-k,-k]);i(a,[t[0]*r-t[1]*o,t[0]*o+t[1]*r]),i(a,[t[0]*r-t[3]*o,t[0]*o+t[3]*r]),i(a,[t[2]*r-t[1]*o,t[2]*o+t[1]*r]),i(a,[t[2]*r-t[3]*o,t[2]*o+t[3]*r]),t=a}let c=b(e.offsetX),m=b(e.offsetY);if(o){const e=A*o,t=Math.cos(e),r=Math.sin(e),a=c*r+m*t;c=c*t-m*r,m=a}t[0]+=c,t[1]+=m,t[2]+=c,t[3]+=m;const f=N(e.markerPlacement);f>0&&(t[0]-=f,t[1]-=f,t[2]+=f,t[3]+=f);break}}const c=g(l.effects);c>0&&(t[0]-=c,t[1]-=c,t[2]+=c,t[3]+=c),n?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],n=!1):(e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.max(e[2],t[2]),e[3]=Math.max(e[3],t[3]))}return e}static _getTextInflatedSize(e,t,r){const o=F(t.height??d.CIMTextSymbol.height);if(e[0]=-o/2,e[1]=-o/2,e[2]=o/2,e[3]=o/2,!r)return e;const a=r.get(t);if(!a)return e;if(!a.glyphMosaicItems.glyphs.length)return e;const{lineGapType:s,lineGap:i}=t,n=s?S(s,i??0,o):0,l=t.horizontalAlignment??d.CIMTextSymbol.horizontalalignment,c=t.verticalAlignment??d.CIMTextSymbol.verticalalignment,m="CIMBackgroundCallout"===t.callout?.type,f=z(a.glyphMosaicItems,{scale:o/P,angle:b(t.angle),xOffset:b(t.offsetX),yOffset:b(t.offsetY),horizontalAlignment:l,verticalAlignment:c,maxLineWidth:D(t.lineWidth),lineHeight:w*Math.max(.25,Math.min(n||1,4)),decoration:t.font.decoration||"none",useCIMAngleBehavior:!0,hasBackground:m}).boundsT,y=Math.sqrt(f.width*f.width+f.height*f.height);return e[0]-=f.x+y,e[1]-=f.y-y,e[2]+=f.x+y,e[3]+=-f.y+y,e}}class _{static getEnvelope(e,t,r,o){if(!e)return null;const a=new u(r,o);if(Array.isArray(e)){let r;for(const o of e)r?r.union(V(a,o,t)):r=V(a,o,t);return r}return V(a,e,t)}static getTextureInfo(e,t,r,o,a){const s=o??this.getEnvelope(e,null,t);if(!s)return[0,0,0,0,1];const i=Math.max(s.width,s.height)*G;let n=null!=a?Math.max(a/i,1):1;n*=G,s.x*=n,s.y*=n,s.width*=n,s.height*=n,s.width=Math.max(Math.ceil(s.x+s.width)-Math.floor(s.x),1)-1,s.height=Math.max(Math.ceil(s.y+s.height)-Math.floor(s.y),1)-1;let l=s.x+.5*s.width,c=s.y+.5*s.height;return l+=s.x-Math.floor(s.x),c+=s.y-Math.floor(s.y),o||(s.width+=r,s.height+=r,l+=r/2,c+=r/2),[s.width,s.height,l,c,n]}static getTextureAnchor(e,t,r){const[o,a,s,i,n]=this.getTextureInfo(e,t,E,null,r);return[-s/o,-i/a,a/n*G]}static rasterize(e,t,r,o,a=!0,s){const[i,n,l,c,m]=this.getTextureInfo(t,o,E,r,s);e.width=i,e.height=n;const f=e.getContext("2d",{willReadFrequently:!0}),y=M.createScale(m,-m);y.translate(.5*i-l,.5*n+c);const u=new p(f,o,y);switch(t.type){case"CIMPointSymbol":{const e={type:"point",x:0,y:0};u.drawSymbol(t,e);break}case"CIMVectorMarker":{const e=new h;u.drawMarker(t,e);break}}const S=f.getImageData(0,0,e.width,e.height),d=new Uint8Array(S.data);if(a){let e;for(let t=0;t<d.length;t+=4)e=d[t+3]/255,d[t]=d[t]*e,d[t+1]=d[t+1]*e,d[t+2]=d[t+2]*e}return[d,e.width,e.height,-l/i,-c/n]}static fromTextSymbol(e){const{text:t}=e;return{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,anchorPointUnits:"Relative",dominantSizeAxis3D:"Y",size:10,billboardMode3D:"FaceNearPlane",frame:{xmin:-5,ymin:-5,xmax:5,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{x:0,y:0},symbol:_.createCIMTextSymbolfromTextSymbol(e),textString:t}],scaleSymbolsProportionally:!0,respectFrame:!0}],scaleX:1,angleAlignment:"Display"}}static fromPictureFillSymbol(e){const{height:t,outline:r,width:o,xoffset:a,xscale:s,yoffset:i,yscale:n}=e,l=[],c={type:"CIMPolygonSymbol",symbolLayers:l};if(r){const e=oe(r);e&&l.push(e)}let m=e.url;"esriPFS"===e.type&&e.imageData&&(m=e.imageData);const f="angle"in e?e.angle??0:0,y=(o??0)*(s||1),h=(t??0)*(n||1);return l.push({type:"CIMPictureFill",enable:!0,invertBackfaceTexture:!1,scaleX:1,textureFilter:"Picture",tintColor:null,url:m,height:h,width:y,offsetX:b(a),offsetY:b(i),rotation:b(-f),colorSubstitutions:null}),c}static fromSimpleFillSymbol(e){const{color:r,style:o,outline:s}=e,i=[],n={type:"CIMPolygonSymbol",symbolLayers:i};if(s){const e=oe(s);e&&i.push(e)}if(o&&"solid"!==o&&"none"!==o&&"esriSFSSolid"!==o&&"esriSFSNull"!==o){const e={type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",color:W(r),capStyle:"Butt",joinStyle:"Miter",width:.75}]};let s=0;const n=a(re(o)?8:10);switch(o){case"vertical":case"esriSFSVertical":s=90;break;case"forward-diagonal":case"esriSFSForwardDiagonal":case"diagonal-cross":case"esriSFSDiagonalCross":s=-45;break;case"backward-diagonal":case"esriSFSBackwardDiagonal":s=45;break;case"cross":case"esriSFSCross":s=0}i.push({type:"CIMHatchFill",lineSymbol:e,offsetX:0,offsetY:0,rotation:s,separation:n}),"cross"===o||"esriSFSCross"===o?i.push({type:"CIMHatchFill",lineSymbol:t(e),offsetX:0,offsetY:0,rotation:90,separation:n}):"diagonal-cross"!==o&&"esriSFSDiagonalCross"!==o||i.push({type:"CIMHatchFill",lineSymbol:t(e),offsetX:0,offsetY:0,rotation:45,separation:n})}else!o||"solid"!==o&&"esriSFSSolid"!==o||i.push({type:"CIMSolidFill",enable:!0,color:W(r)});return n}static fromSimpleLineSymbol(e){const{cap:t,color:r,join:o,marker:a,miterLimit:s,style:i,width:n}=e;let l=null;"solid"!==i&&"none"!==i&&"esriSLSSolid"!==i&&"esriSLSNull"!==i&&(l=[{type:"CIMGeometricEffectDashes",dashTemplate:Z(i,t),lineDashEnding:"NoConstraint",scaleDash:!0,offsetAlongLine:null}]);const c=[];if(a){let e;switch(a.placement){case"begin-end":e="Both";break;case"begin":e="JustBegin";break;case"end":e="JustEnd";break;default:e="None"}const t=_.fromSimpleMarker(a,n,r).symbolLayers[0];t.markerPlacement={type:"CIMMarkerPlacementAtExtremities",placePerPart:!1,angleToLine:!0,keepUpright:!1,offset:0,extremityPlacement:e,offsetAlongLine:0},c.push(t)}return c.push({type:"CIMSolidStroke",color:"none"!==i&&"esriSLSNull"!==i?W(r):[0,0,0,0],capStyle:q(t),joinStyle:H(o),miterLimit:s,width:n,effects:l}),{type:"CIMLineSymbol",symbolLayers:c}}static fromPictureMarker(e){const{angle:t,height:r,width:o,xoffset:a,yoffset:s}=e;let i=e.url;return"esriPMS"===e.type&&e.imageData&&(i=e.imageData),{type:"CIMPointSymbol",symbolLayers:[{type:"CIMPictureMarker",invertBackfaceTexture:!1,scaleX:1,textureFilter:"Picture",tintColor:null,url:i,size:r,width:o,offsetX:b(a),offsetY:b(s),rotation:b(-t)}]}}static createCIMTextSymbolfromTextSymbol(t){const{angle:r,color:o,font:a,haloColor:s,haloSize:i,horizontalAlignment:n,kerning:l,lineWidth:c,text:m,verticalAlignment:f,xoffset:y,yoffset:h,backgroundColor:u,borderLineColor:p,borderLineSize:S}=t;let M,d,g,x,C,I;a&&(M=a.family,d=a.style,g=a.weight,x=a.size,C=a.decoration);let k=!1;if(m){k=e(m)[1]}return(u||S)&&(I={type:"CIMBackgroundCallout",margin:null,backgroundSymbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:W(u)},{type:"CIMSolidStroke",enable:!0,color:W(p),width:S??0}]},accentBarSymbol:null,gap:null,leaderLineSymbol:null,lineStyle:null}),{type:"CIMTextSymbol",angle:r,blockProgression:2,depth3D:1,extrapolateBaselines:!0,fontEffects:0,fontEncoding:1,fontFamilyName:M||"Arial",fontStyleName:J(d,g),fontType:0,haloSize:i,height:x,hinting:1,horizontalAlignment:O(n??"center"),kerning:l,letterWidth:100,ligatures:!0,lineGapType:"Multiple",lineWidth:c,offsetX:b(y),offsetY:b(h),strikethrough:"line-through"===C,underline:"underline"===C,symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:W(o)}]},haloSymbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:W(s)}]},shadowColor:[0,0,0,255],shadowOffsetX:1,shadowOffsetY:1,textCase:"Normal",textDirection:k?1:0,verticalAlignment:$(f??"baseline"),verticalGlyphOrientation:0,wordSpacing:100,billboardMode3D:2,callout:I}}static createPictureMarkerRasterizationParam(e){const{angle:t,height:r,width:o,xoffset:a,yoffset:s}=e,i=e.url??e.source?.url??e.source?.imageData;return i?{type:"sprite-rasterization-param",overrides:[],resource:{type:"CIMPictureMarker",enable:!0,invertBackfaceTexture:!1,scaleX:1,textureFilter:"Picture",tintColor:null,url:i,size:r,width:o,offsetX:b(a),offsetY:b(s),rotation:b(-t)}}:null}static createPictureFillRasterizationParam(e){const{width:t,height:r,xoffset:o,yoffset:a,url:s}=e;return s?{type:"sprite-rasterization-param",overrides:[],resource:{type:"CIMPictureFill",enable:!0,scaleX:1,textureFilter:"Picture",tintColor:null,url:s,width:t,height:r,offsetX:b(o),offsetY:b(a),rotation:0}}:null}static fromSimpleMarker(e,t,r){const{style:o}=e,a=e.color??r;if("path"===o||"esriSMSPath"===o){const t=[];if("outline"in e&&e.outline){const r=e.outline;t.push({type:"CIMSolidStroke",enable:!0,width:r.width,color:W(r.color),path:e.path})}t.push({type:"CIMSolidFill",enable:!0,color:W(a),path:e.path});const[r,o]=te("square");return{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,rotation:-b(e.angle),size:b(e.size||6),offsetX:b(e.xoffset),offsetY:b(e.yoffset),scaleSymbolsProportionally:!1,frame:r,markerGraphics:[{type:"CIMMarkerGraphic",geometry:o,symbol:{type:"CIMPolygonSymbol",symbolLayers:t}}]}]}}const s=[];let i,n,l=e.size;if("outline"in e&&e.outline&&"none"!==e.outline.style&&"esriSLSNull"!==e.outline.style){const t=e.outline,r="solid"!==t.style&&"esriSLSSolid"!==t.style;[i,n]=r?te(o,e.size):te(o);const a=t.width??I.width;if(r){const t=a/e.size,r=(i.xmax-i.xmin)*t/2,o=(i.ymax-i.ymin)*t/2;i.xmin-=r,i.xmax+=r,i.ymin-=o,i.ymax+=o,l&&(l+=a)}const c="cross"!==e.style&&"x"!==e.style||"dot"===e?.outline.style||"short-dot"===e?.outline.style?"HalfGap":"FullPattern",m=r?[{type:"CIMGeometricEffectAddControlPoints"},{type:"CIMGeometricEffectDashes",dashTemplate:Z(t.style,null).map(e=>t.width&&t.width>0?e*t.width:e),lineDashEnding:c,controlPointEnding:"FullPattern"}]:void 0;s.push({type:"CIMSolidStroke",capStyle:r?"Round":"Butt",enable:!0,width:a,color:W(t.color),effects:m})}else!t||"line-marker"!==e.type||"cross"!==e.style&&"x"!==e.style?[i,n]=te(o):([i,n]=te(o),s.push({type:"CIMSolidStroke",enable:!0,width:t,color:W(a)}));s.push({type:"CIMSolidFill",enable:!0,color:W(a)});const c={type:"CIMPolygonSymbol",symbolLayers:s};return{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,rotation:b(-e.angle),size:b(l||6*t),offsetX:b(e.xoffset),offsetY:b(e.yoffset),scaleSymbolsProportionally:!1,frame:i,markerGraphics:[{type:"CIMMarkerGraphic",geometry:n,symbol:c}]}]}}static fromCIMHatchFill(e,r){const o=r*(e.separation??d.CIMHatchFill.separation),a=o/2,s=t(e.lineSymbol);s.symbolLayers?.forEach(e=>{switch(e.type){case"CIMSolidStroke":null!=e.width&&(e.width*=r),e.effects?.forEach(e=>{if("CIMGeometricEffectDashes"===e.type){const t=e.dashTemplate;e.dashTemplate=t?.map(e=>e*r)}});break;case"CIMVectorMarker":{null!=e.size&&(e.size*=r);const t=e.markerPlacement;null!=t&&"placementTemplate"in t&&(t.placementTemplate=t.placementTemplate.map(e=>e*r));break}}});let i=this._getLineSymbolPeriod(s)||R;for(;i<R;)i*=2;const n=i/2;return{type:"CIMVectorMarker",enable:!0,frame:{xmin:-n,xmax:n,ymin:-a,ymax:a},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{paths:[[[-n,0],[n,0]]]},symbol:s}],size:o}}static async normalizeSymbolAndFetchResources(e,t,r=null){if(!e)return;const o=[];if("effects"in e&&e.effects)for(const s of e.effects)o.push(f(s));async function a(e){if("CIMTextSymbol"!==e.type)return;const{fontFamilyName:r,fontStyleName:o}=e;if("calcitewebcoreicons"===r?.toLowerCase())return;const{style:a,weight:s}=x(o),i=C(e),n=new m({family:r,style:a,weight:s,decoration:i});try{await t.loadFont(n)}catch{B().error(`Unsupported font ${r} in CIM symbol`)}}o.push(a(e)),U(e,e=>{if(e.effects)for(const t of e.effects)o.push(f(t));if("CIMVectorMarker"===e.type){for(const t of e.markerGraphics)l(t.geometry)&&(t.geometry=c(t.geometry,{maxDeviation:.01}));e.markerPlacement&&o.push(y(e.markerPlacement))}"url"in e&&e.url&&o.push(t.fetchResource(e.url,{signal:r})),"symbol"in e&&o.push(a(e.symbol))}),await Promise.all(o)}static _getLineSymbolPeriod(e){if(e){const t=this._getEffectsRepeat(e.effects);if(t)return t;if(e.symbolLayers)for(const r of e.symbolLayers)if(r){const e=this._getEffectsRepeat(r.effects);if(e)return e;switch(r.type){case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":{const e=this._getPlacementRepeat(r.markerPlacement);if(e)return e}}}}return 0}static _getEffectsRepeat(e){if(e)for(const t of e)if(t)switch(t.type){case"CIMGeometricEffectDashes":{const e=t.dashTemplate;if(e&&e.length){let t=0;for(const r of e)t+=r;return 1&e.length&&(t*=2),t}break}case"CIMGeometricEffectWave":return t.period;default:B().error(`unsupported geometric effect type ${t.type}`)}return 0}static _getPlacementRepeat(e){if(e)switch(e.type){case"CIMMarkerPlacementAlongLineSameSize":case"CIMMarkerPlacementAlongLineRandomSize":case"CIMMarkerPlacementAlongLineVariableSize":{const t=e.placementTemplate;if(t&&t.length){let e=0;for(const r of t)e+=+r;return 1&t.length&&(e*=2),e}break}}return 0}static fromCIMInsidePolygon(e){const t=e.markerPlacement,r={...e};r.markerPlacement=null,r.anchorPoint=null;const s=Math.abs(t.stepX),i=Math.abs(t.stepY),n=(t.randomness??100)/100;let l,c,m,f;if("Random"===t.gridType){const e=a(L),r=Math.max(Math.floor(e/s),1),y=Math.max(Math.floor(e/i),1);l=r*s/2,c=y*i/2,m=2*c;const h=new o(t.seed),u=n*s/1.5,p=n*i/1.5;f=[];for(let t=0;t<r;t++)for(let e=0;e<y;e++){const r=t*s-l+u*(.5-h.getFloat()),o=e*i-c+p*(.5-h.getFloat());f.push({x:r,y:o}),0===t&&f.push({x:r+2*l,y:o}),0===e&&f.push({x:r,y:o+2*c})}}else!0===t.shiftOddRows?(l=s/2,c=i,m=2*i,f=[{x:-l,y:0},{x:l,y:0},{x:0,y:c},{x:0,y:-c}]):(l=s/2,c=i/2,m=i,f=[{x:-s,y:0},{x:0,y:-i},{x:-s,y:-i},{x:0,y:0},{x:s,y:0},{x:0,y:i},{x:s,y:i},{x:-s,y:i},{x:s,y:-i}]);return{type:"CIMVectorMarker",enable:!0,frame:{xmin:-l,xmax:l,ymin:-c,ymax:c},markerGraphics:f.map(e=>({type:"CIMMarkerGraphic",geometry:e,symbol:{type:"CIMPointSymbol",symbolLayers:[r]}})),size:m}}}function U(e,t){if(e)switch(e.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":{const r=e.symbolLayers;if(!r)return;for(const e of r)if(t(e),"CIMVectorMarker"===e.type){const r=e.markerGraphics;if(!r)continue;for(const e of r)if(e){const r=e.symbol;r&&U(r,t)}}break}}}const q=e=>{if(!e)return"Butt";switch(e){case"butt":return"Butt";case"square":return"Square";case"round":return"Round"}},H=e=>{if(!e)return"Miter";switch(e){case"miter":return"Miter";case"round":return"Round";case"bevel":return"Bevel"}},O=e=>{if(null==e)return"Center";switch(e){case"left":return"Left";case"right":return"Right";case"center":return"Center";case"justify":return"Justify"}},$=e=>{if(null==e)return"Center";switch(e){case"baseline":return"Baseline";case"top":return"Top";case"middle":return"Center";case"bottom":return"Bottom"}},W=e=>{if(!e)return[0,0,0,0];const{r:t,g:r,b:o,a}=e;return[t,r,o,255*a]},J=(e,t)=>{const r=K(t),o=Q(e);return r&&o?`${r}-${o}`:`${r}${o}`},K=e=>{if(!e)return"";switch(e.toLowerCase()){case"bold":case"bolder":return"bold"}return""},Q=e=>{if(!e)return"";switch(e.toLowerCase()){case"italic":case"oblique":return"italic"}return""},Z=(e,t)=>{const r=.001,o="butt"===t;switch(e){case"dash":case"esriSLSDash":return o?[4,3]:[3,4];case"dash-dot":case"esriSLSDashDot":return o?[4,3,1,3]:[3,4,r,4];case"dot":case"esriSLSDot":return o?[1,3]:[r,4];case"long-dash":case"esriSLSLongDash":return o?[8,3]:[7,4];case"long-dash-dot":case"esriSLSLongDashDot":return o?[8,3,1,3]:[7,4,r,4];case"long-dash-dot-dot":case"esriSLSDashDotDot":return o?[8,3,1,3,1,3]:[7,4,r,4,r,4];case"short-dash":case"esriSLSShortDash":return o?[4,1]:[3,2];case"short-dash-dot":case"esriSLSShortDashDot":return o?[4,1,1,1]:[3,2,r,2];case"short-dash-dot-dot":case"esriSLSShortDashDotDot":return o?[4,1,1,1,1,1]:[3,2,r,2,r,2];case"short-dot":case"esriSLSShortDot":return o?[1,1]:[r,2];case"solid":case"esriSLSSolid":case"none":return B().error("Unexpected: style does not require rasterization"),[0,0];default:return B().error(`Tried to rasterize SLS, but found an unexpected style: ${e}!`),[0,0]}};function ee(e){return void 0!==e.symbolLayers}const te=(e,t=100)=>{const r=t/2;let o,a;const s=e;if("circle"===s||"esriSMSCircle"===s){const e=.25;let t=Math.acos(1-e/r),s=Math.ceil(T/t/4);0===s&&(s=1),t=v/s,s*=4;const i=[];i.push([r,0]);for(let o=1;o<s;o++)i.push([r*Math.cos(o*t),-r*Math.sin(o*t)]);i.push([r,0]),o={rings:[i]},a={xmin:-r,ymin:-r,xmax:r,ymax:r}}else if("cross"===s||"esriSMSCross"===s){const e=0;o={paths:[[[e,r],[e,-r]],[[r,e],[-r,e]]]},a={xmin:-r,ymin:-r,xmax:r,ymax:r}}else if("diamond"===s||"esriSMSDiamond"===s)o={rings:[[[-r,0],[0,r],[r,0],[0,-r],[-r,0]]]},a={xmin:-r,ymin:-r,xmax:r,ymax:r};else if("square"===s||"esriSMSSquare"===s)o={rings:[[[-r,-r],[-r,r],[r,r],[r,-r],[-r,-r]]]},a={xmin:-r,ymin:-r,xmax:r,ymax:r};else if("x"===s||"esriSMSX"===s)o={paths:[[[r,r],[-r,-r]],[[r,-r],[-r,r]]]},a={xmin:-r,ymin:-r,xmax:r,ymax:r};else if("triangle"===s||"esriSMSTriangle"===s){const e=t*.5773502691896257,r=-e,s=2/3*t,i=s-t;o={rings:[[[r,i],[0,s],[e,i],[r,i]]]},a={xmin:r,ymin:i,xmax:e,ymax:s}}else"arrow"===s&&(o={rings:[[[-50,50],[50,0],[-50,-50],[-33,-20],[-33,20],[-50,50]]]},a={xmin:-r,ymin:-r,xmax:r,ymax:r});return[a,o]},re=e=>"vertical"===e||"horizontal"===e||"cross"===e||"esriSFSCross"===e||"esriSFSVertical"===e||"esriSFSHorizontal"===e;function oe(e){if(!e)return null;let t=null;const{cap:r,color:o,join:a,miterLimit:s,style:i,width:n}=e;return"solid"!==i&&"none"!==i&&"esriSLSSolid"!==i&&"esriSLSNull"!==i&&(t=[{type:"CIMGeometricEffectDashes",dashTemplate:Z(i,r),lineDashEnding:"NoConstraint",scaleDash:!0,offsetAlongLine:null}]),{type:"CIMSolidStroke",color:"esriSLSNull"!==i&&"none"!==i?W(o):[0,0,0,0],capStyle:q(r),joinStyle:H(a),miterLimit:s,width:n,effects:t}}export{_ as CIMSymbolHelper,Y as CIMSymbolInflatedSizeHelper,q as capTypeToEnum,U as forEachSymbolLayer,Z as slsDashToTemplateArray,X as symbolToCIM};
|
package/symbols/cim/utils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{defaultCIMValues as e,defaultCIMColor as t}from"./defaultCIMValues.js";function r(e){return"function"==typeof e}function n(e,t,n,o){return r(e)?e(t,n,o):e}function o(e){return[e.r,e.g,e.b,e.a]}const i=" /-,\n";function a(e){let t=e.length;for(;t--;)if(!i.includes(e.charAt(t)))return!1;return!0}function l(e,t){const r=[];let n=0,o=-1;do{if(o=e.indexOf("[",n),o>=n){if(o>n){const t=e.slice(n,o);r.push([t,null,a(t)])}if(n=o+1,o=e.indexOf("]",n),o>=n){if(o>n){const i=t[e.slice(n,o)];i&&r.push([null,i,!1])}n=o+1}}}while(-1!==o);if(n<e.length){const t=e.slice(n);r.push([t,null,a(t)])}return r}function c(e,t,r){let n="",o=null;for(const i of t){const[t,r,a]=i;if(null!=t&&""!==t)a?o=t:(null!=o&&(n+=o,o=null),n+=t);else{const t=e.readAttribute(r);null!=t&&""!==t&&(null!==o&&(n+=o,o=null),n+=t)}}return u(n,r)}function s(e,t,r,n){let o="",i=null;for(const a of t){const[t,n,l]=a;if(null!=t&&""!==t)l?i=t:(null!=i&&(o+=i,i=null),o+=t);else{let t=n;null!=r&&(t=Y(n,r));const a=e.attributes[t];null!=a&&""!==a&&(null!=i&&(o+=i,i=null),o+=a)}}return u(o,n)}function u(e,t){switch("string"!=typeof e&&(e=String(e)),t){case"LowerCase":return e.toLowerCase();case"Allcaps":return e.toUpperCase();default:return e}}function f(e,t,r,n,o,i,a=!0){const l=t/o,c=r/i,s=Math.ceil(l/2),u=Math.ceil(c/2);for(let f=0;f<i;f++)for(let r=0;r<o;r++){const M=4*(r+(a?i-f-1:f)*o);let m=0,y=0,C=0,h=0,I=0,p=0,b=0;const d=(f+.5)*c;for(let n=Math.floor(f*c);n<(f+1)*c;n++){const o=Math.abs(d-(n+.5))/u,i=(r+.5)*l,a=o*o;for(let c=Math.floor(r*l);c<(r+1)*l;c++){let r=Math.abs(i-(c+.5))/s;const o=Math.sqrt(a+r*r);o>=-1&&o<=1&&(m=2*o*o*o-3*o*o+1,m>0&&(r=4*(c+n*t),b+=m*e[r+3],C+=m,e[r+3]<255&&(m=m*e[r+3]/250),h+=m*e[r],I+=m*e[r+1],p+=m*e[r+2],y+=m))}}n[M]=h/y,n[M+1]=I/y,n[M+2]=p/y,n[M+3]=b/C}}function M(e){return e?[e[0],e[1],e[2],e[3]/255]:[0,0,0,0]}function m(e){return e.data?.symbol??null}function y(e){return"CIMVectorMarker"===e.type||"CIMPictureMarker"===e.type||"CIMBarChartMarker"===e.type||"CIMCharacterMarker"===e.type||"CIMPieChartMarker"===e.type||"CIMStackedBarChartMarker"===e.type}function C(e){return"CIMGradientStroke"===e.type||"CIMPictureStroke"===e.type||"CIMSolidStroke"===e.type}function h(e){return null!=e&&("CIMGradientFill"===e.type||"CIMHatchFill"===e.type||"CIMPictureFill"===e.type||"CIMSolidFill"===e.type||"CIMWaterFill"===e.type)}function I(e){return null!=e&&("CIMMarkerPlacementAlongLineRandomSize"===e.type||"CIMMarkerPlacementAlongLineSameSize"===e.type||"CIMMarkerPlacementAlongLineVariableSize"===e.type||"CIMMarkerPlacementAtExtremities"===e.type||"CIMMarkerPlacementAtMeasuredUnits"===e.type||"CIMMarkerPlacementAtRatioPositions"===e.type||"CIMMarkerPlacementOnLine"===e.type||"CIMMarkerPlacementOnVertices"===e.type)}const p=(e,t=0)=>null==e||isNaN(e)?t:e,b=(e,t)=>null!=e?e:t,d=(e,t)=>e??t,k=e=>e.tintColor?M(e.tintColor):[255,255,255,1];class g{constructor(e){this._import=e}getImportPromise(){return null==this._promise&&(this._promise=this._import().then(e=>this.module=e)),this._promise}}function S(e){return new g(e)}function P(e){if(!e)return"normal";switch(e.toLowerCase()){case"italic":return"italic";case"oblique":return"oblique";default:return"normal"}}function w(e){if(!e)return"normal";switch(e.toLowerCase()){case"bold":return"bold";case"bolder":return"bolder";case"lighter":return"lighter";default:return"normal"}}function L(e){let t="normal",r="normal";if(e){const n=e.toLowerCase();n.includes("italic")?t="italic":n.includes("oblique")&&(t="oblique"),n.includes("bold")?r="bold":n.includes("light")&&(r="lighter")}return{style:t,weight:r}}function E(e){return e.underline?"underline":e.strikethrough?"line-through":"none"}function G(e){if(!e)return null;switch(e.type){case"CIMPolygonSymbol":if(e.symbolLayers)for(const t of e.symbolLayers){const e=G(t);if(null!=e)return e}break;case"CIMTextSymbol":return G(e.symbol);case"CIMSolidFill":return e.color}return null}function x(e){if(e)switch(e.type){case"CIMPolygonSymbol":case"CIMLineSymbol":{const t=e.symbolLayers;if(t)for(const e of t){const t=x(e);if(null!=t)return t}break}case"CIMTextSymbol":return x(e.symbol);case"CIMSolidStroke":return e.color}}function T(e){for(const t of e)if(t.enable)switch(t.type){case"CIMSolidStroke":case"CIMGradientStroke":case"CIMPictureStroke":return!0}return!1}function A(e){if(e)switch(e.type){case"CIMPolygonSymbol":case"CIMLineSymbol":if(e.symbolLayers)for(const t of e.symbolLayers){const e=A(t);if(void 0!==e)return e}break;case"CIMTextSymbol":return A(e.symbol);case"CIMSolidStroke":case"CIMGradientStroke":case"CIMPictureStroke":return e.width}}function v(e){switch(e){case"Left":default:return"left";case"Right":return"right";case"Center":return"center";case"Justify":return"justify"}}function N(e){switch(e){default:case"Bottom":return"bottom";case"Top":return"top";case"Center":return"middle";case"Baseline":return"baseline"}}function z(e){return(e?Object.keys(e):[]).map(t=>({name:t,alias:t,type:"string"==typeof e[t]?"esriFieldTypeString":"esriFieldTypeDouble"}))}const F=e=>e.includes("data:image/svg+xml");function V(e){if(!e)return null;switch(e.type){case"CIMPointSymbol":case"CIMTextSymbol":return"esriGeometryPoint";case"CIMLineSymbol":return"esriGeometryPolyline";case"CIMPolygonSymbol":return"esriGeometryPolygon";default:return null}}function O(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}function B(e,t,r,n,o,i,a=!0){const{infos:l}=i;let c=1,s=0,u=0,f=0,M=1;for(const{absoluteAnchorPoint:C,offsetX:h,offsetY:I,rotation:p,size:b,frameHeight:d,rotateClockWise:k,scaleSymbolsProportionally:g}of l){M=C?1:c;u=Q(h,I,s,M,u),f=K(h,I,s,M,f),d&&(g||a)&&(c*=b/d),s=Z(p,k,s)}const m=Q(n,o,s,M,u),y=K(n,o,s,M,f);return{size:e*c,rotation:Z(t,r,s),offsetX:m,offsetY:y}}function R(e){if(null==e)return!1;if(Array.isArray(e))return e.every(e=>R(e));switch(typeof e){case"string":return!!e;case"number":return!isNaN(e)}}function D(r,n){if("color"===n||"outlinecolor"===n||"backgroundcolor"===n||"borderlinecolor"===n||"tintcolor"===n)return[...t[n]];const o=e[r];if(!o)throw new Error(`InternalError: default value for type ${r}.`);return o[n]}function j(e){return e.split(" ").map(e=>Number(e))}function q(e){return"string"==typeof e?j(e):e}function W(e){return e?.dashTemplate&&(e.dashTemplate=q(e.dashTemplate)),e}function _(e){if(null==e)return"Normal";switch(e.type){case"CIMTextSymbol":return e.textCase??"Normal";case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":{const t=e.symbolLayers;if(!t)return"Normal";for(const e of t)if("CIMVectorMarker"===e.type)return _(e)}break;case"CIMVectorMarker":{const t=e.markerGraphics;if(!t)return"Normal";for(const e of t)if(e.symbol)return _(e.symbol)}}return"Normal"}function X(t){if(t)switch(t.type){case"CIMTextSymbol":return t.height;case"CIMPointSymbol":{let r=0;if(t.symbolLayers)for(const n of t.symbolLayers)if(n)switch(n.type){case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":{const t=n.size??e.CIMVectorMarker.size;t>r&&(r=t);break}}return r}case"CIMLineSymbol":case"CIMPolygonSymbol":{let r=0;if(t.symbolLayers)for(const n of t.symbolLayers)if(n)switch(n.type){case"CIMSolidStroke":case"CIMPictureStroke":case"CIMGradientStroke":{const e=n.width;null!=e&&e>r&&(r=e);break}case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":if(n.markerPlacement&&I(n.markerPlacement)){const t=n.size??e.CIMVectorMarker.size;t>r&&(r=t)}break;case"CIMPictureFill":{const e=n.height;null!=e&&e>r&&(r=e)}}return r}}}function Y(e,t){if(null!==t){const r=t.get(e);return r?r.name:e}return e}function H(e){return e.map(e=>({...e,propertyName:O(e.propertyName)}))}function J(e){const t={};for(const r in e){const n=e[r];t[O(r)]=n}return t}function U(e){if(!e)return 0;let t=0;for(const r of e)t+=$(r);return t}function $(e){if(!e)return 0;if(le(e))return e.inflateSize??256;switch(e.type){case"CIMGeometricEffectArrow":return Math.abs(.5*e.width);case"CIMGeometricEffectBuffer":return Math.abs(e.size);case"CIMGeometricEffectControlMeasureLine":return 500;case"CIMGeometricEffectExtension":return Math.abs(e.length);case"CIMGeometricEffectJog":return Math.abs(.5*e.length);case"CIMGeometricEffectMove":return Math.max(Math.abs(p(e.offsetX)),Math.abs(p(e.offsetY)));case"CIMGeometricEffectOffset":case"CIMGeometricEffectOffsetTangent":return Math.abs(e.offset);case"CIMGeometricEffectRadial":return Math.abs(e.length??5);case"CIMGeometricEffectRegularPolygon":return Math.abs(e.radius);case"CIMGeometricEffectRotate":case"CIMGeometricEffectScale":default:return 0;case"CIMGeometricEffectTaperedPolygon":return.5*Math.max(Math.abs(e.fromWidth),Math.abs(e.toWidth));case"CIMGeometricEffectWave":return Math.abs(e.amplitude);case"CIMGeometricEffectDonut":return Math.abs(e.width)}}function K(e,t,r,n,o){const i=r*Math.PI/180;if(i){const r=Math.cos(i);return(Math.sin(i)*e+r*t)*n+o}return t*n+o}function Q(e,t,r,n,o){const i=r*Math.PI/180;if(i){return(Math.cos(i)*e-Math.sin(i)*t)*n+o}return e*n+o}function Z(e,t,r){return t?r-e:r+e}function ee(e,t,r){const n="Color"===r||"TintColor"===r||"ToColor"===r,o="Rotation"===r||"Angle"===r||"ToRotation"===r;let i=t[O(r)];if(null!=i&&(n?i=[i[0]/255,i[1]/255,i[2]/255,i[3]/255]:o&&(i*=Math.PI/180)),null==i&&(i=D(t.type,r.toLowerCase()),null!=i&&(n?i=[i[0]/255,i[1]/255,i[2]/255,i[3]]:o&&(i*=Math.PI/180))),null!=t.primitiveName){const a=e[t.primitiveName];if(null!=a){const e=a[r];null==e||("string"==typeof e||"number"==typeof e||Array.isArray(e)?(i=e,null!=i&&(n?i=[i[0]/255,i[1]/255,i[2]/255,i[3]/255]:o&&(i*=Math.PI/180))):(i={valueExpressionInfo:e,defaultValue:i},null!=i&&(n?i={type:"Process",op:"ArcadeColor",value:i}:o&&(i={type:"Process",op:"Divide",left:i,right:180/Math.PI}))))}}if(null==i)throw new Error(`Failed to derive a value or an expression for "${r}".`);return i}function te(e,t,r){if(null!=t[O(r)])return!0;if(null!=t.primitiveName){const n=e[t.primitiveName];if(null!=n){if(null!=n[r])return!0}}return!1}function re(e,t){return Math.max(Math.min((e??t)/100,1),0)}function ne(e){if(!e)return 3;switch(e){case"Begin":return 0;case"End":return 2;case"Both":return 1;default:return 3}}function oe(e){if(!e)return 2;switch(e){case"Tolerance":return 0;case"Text":return 1;default:return 2}}function ie(e){if(!e)return 2;switch(e){case"MoveBegin":return 0;case"MoveEnd":return 1;default:return 2}}function ae(e){if(!e)return 3;switch(e){case"Only":return 0;case"Suffix":return 1;case"Expression":return 2;default:return 3}}function le(e){return null!=e&&"inflateSize"in e&&null!=e.inflateSize}function ce(e){return null!=e&&se(e)?e:void 0}function se(e){return"setControlPoint"in e&&"getControlPoint"in e&&"setControlPointAt"in e&&"getControlPointAt"in e}export{u as adjustTextCase,l as analyzeTextParts,B as applyParentTransform,ce as asCIMGeometryCursor,s as assignTextValuesFromFeature,z as attributesToFields,o as colorToArray,n as evaluateValueOrFunction,E as fromCIMFontDecoration,L as fromCIMFontStyle,v as fromCIMHorizontalAlignment,N as fromCIMVerticalAlignment,D as getDefaultCIMValue,U as getEffectsInflateSize,d as getEnum,Y as getFieldName,G as getFillColor,P as getFontStyle,w as getFontWeight,p as getNumericValue,ee as getProcessParam,re as getRelativeGradientSize,X as getSize,x as getStrokeColor,A as getStrokeWidth,_ as getTextCasing,c as getTextValuesFromFeatureHandle,k as getTintColor,b as getValue,te as hasProcessParam,T as hasStrokeLayer,S as importLazily,h as isCIMFill,y as isCIMMarker,I as isCIMMarkerStrokePlacement,C as isCIMStroke,r as isFeatureValueFn,le as isGeometricLinearEffect,F as isSVGImage,R as isValidCIMValue,V as mapCIMSymbolToGeometryType,M as normalizeAlpha,W as normalizeDashEffectTemplate,q as normalizeDashTemplate,H as normalizePrimitiveOverrideProps,j as parseDashTemplate,f as resampleHermite,oe as stringToDimensionMarkerFit,ne as stringToDimensionPartOptions,ie as stringToDimensionTextFit,ae as stringToDimensionTextOptions,m as toCIMSymbolJSON,J as toLowerCaseProps,O as uncapitalize};
|
|
2
|
+
import{defaultCIMValues as e,defaultCIMColor as t}from"./defaultCIMValues.js";function r(e){return"function"==typeof e}function n(e,t,n,o){return r(e)?e(t,n,o):e}function o(e){return[e.r,e.g,e.b,e.a]}const i=" /-,\n";function a(e){let t=e.length;for(;t--;)if(!i.includes(e.charAt(t)))return!1;return!0}function l(e,t){const r=[];let n=0,o=-1;do{if(o=e.indexOf("[",n),o>=n){if(o>n){const t=e.slice(n,o);r.push([t,null,a(t)])}if(n=o+1,o=e.indexOf("]",n),o>=n){if(o>n){const i=t[e.slice(n,o)];i&&r.push([null,i,!1])}n=o+1}}}while(-1!==o);if(n<e.length){const t=e.slice(n);r.push([t,null,a(t)])}return r}function c(e,t,r){let n="",o=null;for(const i of t){const[t,r,a]=i;if(null!=t&&""!==t)a?o=t:(null!=o&&(n+=o,o=null),n+=t);else{const t=e.readAttribute(r);null!=t&&""!==t&&(null!==o&&(n+=o,o=null),n+=t)}}return u(n,r)}function s(e,t,r,n){let o="",i=null;for(const a of t){const[t,n,l]=a;if(null!=t&&""!==t)l?i=t:(null!=i&&(o+=i,i=null),o+=t);else{let t=n;null!=r&&(t=Y(n,r));const a=e.attributes[t];null!=a&&""!==a&&(null!=i&&(o+=i,i=null),o+=a)}}return u(o,n)}function u(e,t){switch("string"!=typeof e&&(e=String(e)),t){case"LowerCase":return e.toLowerCase();case"Allcaps":return e.toUpperCase();default:return e}}function f(e,t,r,n,o,i,a=!0){const l=t/o,c=r/i,s=Math.ceil(l/2),u=Math.ceil(c/2);for(let f=0;f<i;f++)for(let r=0;r<o;r++){const M=4*(r+(a?i-f-1:f)*o);let m=0,y=0,C=0,h=0,I=0,p=0,b=0;const d=(f+.5)*c;for(let n=Math.floor(f*c);n<(f+1)*c;n++){const o=Math.abs(d-(n+.5))/u,i=(r+.5)*l,a=o*o;for(let c=Math.floor(r*l);c<(r+1)*l;c++){let r=Math.abs(i-(c+.5))/s;const o=Math.sqrt(a+r*r);o>=-1&&o<=1&&(m=2*o*o*o-3*o*o+1,m>0&&(r=4*(c+n*t),b+=m*e[r+3],C+=m,e[r+3]<255&&(m=m*e[r+3]/250),h+=m*e[r],I+=m*e[r+1],p+=m*e[r+2],y+=m))}}n[M]=h/y,n[M+1]=I/y,n[M+2]=p/y,n[M+3]=b/C}}function M(e){return e?[e[0],e[1],e[2],e[3]/255]:[0,0,0,0]}function m(e){return e.data?.symbol??null}function y(e){return"CIMVectorMarker"===e.type||"CIMPictureMarker"===e.type||"CIMBarChartMarker"===e.type||"CIMCharacterMarker"===e.type||"CIMPieChartMarker"===e.type||"CIMStackedBarChartMarker"===e.type}function C(e){return"CIMGradientStroke"===e.type||"CIMPictureStroke"===e.type||"CIMSolidStroke"===e.type}function h(e){return null!=e&&("CIMGradientFill"===e.type||"CIMHatchFill"===e.type||"CIMPictureFill"===e.type||"CIMSolidFill"===e.type||"CIMWaterFill"===e.type)}function I(e){return null!=e&&("CIMMarkerPlacementAlongLineRandomSize"===e.type||"CIMMarkerPlacementAlongLineSameSize"===e.type||"CIMMarkerPlacementAlongLineVariableSize"===e.type||"CIMMarkerPlacementAtExtremities"===e.type||"CIMMarkerPlacementAtMeasuredUnits"===e.type||"CIMMarkerPlacementAtRatioPositions"===e.type||"CIMMarkerPlacementOnLine"===e.type||"CIMMarkerPlacementOnVertices"===e.type)}const p=(e,t=0)=>null==e||isNaN(e)?t:e,b=(e,t)=>null!=e?e:t,d=(e,t)=>e??t,k=e=>e.tintColor?M(e.tintColor):[255,255,255,1];class g{constructor(e){this._import=e}getImportPromise(){return null==this._promise&&(this._promise=this._import().then(e=>this.module=e)),this._promise}}function S(e){return new g(e)}function P(e){if(!e)return"normal";switch(e.toLowerCase()){case"italic":return"italic";case"oblique":return"oblique";default:return"normal"}}function w(e){if(!e)return"normal";switch(e.toLowerCase()){case"bold":return"bold";case"bolder":return"bolder";case"lighter":return"lighter";default:return"normal"}}function L(e){let t="normal",r="normal";if(e){const n=e.toLowerCase();n.includes("italic")?t="italic":n.includes("oblique")&&(t="oblique"),n.includes("bold")?r="bold":n.includes("light")&&(r="lighter")}return{style:t,weight:r}}function E(e){return e.underline?"underline":e.strikethrough?"line-through":"none"}function x(e){if(!e)return null;switch(e.type){case"CIMPolygonSymbol":if(e.symbolLayers)for(const t of e.symbolLayers){const e=x(t);if(null!=e)return e}break;case"CIMTextSymbol":return x(e.symbol);case"CIMSolidFill":return e.color}return null}function G(e){if(e)switch(e.type){case"CIMPolygonSymbol":case"CIMLineSymbol":{const t=e.symbolLayers;if(t)for(const e of t){const t=G(e);if(null!=t)return t}break}case"CIMTextSymbol":return G(e.symbol);case"CIMSolidStroke":return e.color}}function N(e){for(const t of e)if(t.enable)switch(t.type){case"CIMSolidStroke":case"CIMGradientStroke":case"CIMPictureStroke":return!0}return!1}function T(e){if(e)switch(e.type){case"CIMPolygonSymbol":case"CIMLineSymbol":if(e.symbolLayers)for(const t of e.symbolLayers){const e=T(t);if(void 0!==e)return e}break;case"CIMTextSymbol":return T(e.symbol);case"CIMSolidStroke":case"CIMGradientStroke":case"CIMPictureStroke":return e.width}}function v(e){switch(e){case"Left":default:return"left";case"Right":return"right";case"Center":return"center";case"Justify":return"justify"}}function A(e){switch(e){default:case"Bottom":return"bottom";case"Top":return"top";case"Center":return"middle";case"Baseline":return"baseline"}}function F(e){return(e?Object.keys(e):[]).map(t=>({name:t,alias:t,type:"string"==typeof e[t]?"esriFieldTypeString":"esriFieldTypeDouble"}))}const z=e=>e.includes("data:image/svg+xml");function B(e){if(!e)return null;switch(e.type){case"CIMPointSymbol":case"CIMTextSymbol":return"esriGeometryPoint";case"CIMLineSymbol":return"esriGeometryPolyline";case"CIMPolygonSymbol":return"esriGeometryPolygon";default:return null}}function O(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}function V(e,t,r,n,o,i,a=!0){const{infos:l}=i;let c=1,s=0,u=0,f=0,M=1;for(const{absoluteAnchorPoint:C,offsetX:h,offsetY:I,rotation:p,size:b,frameHeight:d,rotateClockWise:k,scaleSymbolsProportionally:g}of l){M=C?1:c;u=Q(h,I,s,M,u),f=K(h,I,s,M,f),d&&(g||a)&&(c*=b/d),s=Z(p,k,s)}const m=Q(n,o,s,M,u),y=K(n,o,s,M,f);return{size:e*c,rotation:Z(t,r,s),offsetX:m,offsetY:y}}function R(e){if(null==e)return!1;if(Array.isArray(e))return e.every(e=>R(e));switch(typeof e){case"string":return!!e;case"number":return!isNaN(e)}}function D(r,n){if("color"===n||"outlinecolor"===n||"backgroundcolor"===n||"borderlinecolor"===n||"tintcolor"===n)return[...t[n]];const o=e[r];if(!o)throw new Error(`InternalError: default value for type ${r}.`);return o[n]}function W(e){return e.split(" ").map(e=>Number(e))}function j(e){return"string"==typeof e?W(e):e}function q(e){return e?.dashTemplate&&(e.dashTemplate=j(e.dashTemplate)),e}function _(e){if(null==e)return"Normal";switch(e.type){case"CIMTextSymbol":return e.textCase??"Normal";case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":{const t=e.symbolLayers;if(!t)return"Normal";for(const e of t)if("CIMVectorMarker"===e.type)return _(e)}break;case"CIMVectorMarker":{const t=e.markerGraphics;if(!t)return"Normal";for(const e of t)if(e.symbol)return _(e.symbol)}}return"Normal"}function X(t){if(t)switch(t.type){case"CIMTextSymbol":return t.height;case"CIMPointSymbol":{let r=0;if(t.symbolLayers)for(const n of t.symbolLayers)if(n)switch(n.type){case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":{const t=n.size??e.CIMVectorMarker.size;t>r&&(r=t);break}}return r}case"CIMLineSymbol":case"CIMPolygonSymbol":{let r=0;if(t.symbolLayers)for(const n of t.symbolLayers)if(n)switch(n.type){case"CIMSolidStroke":case"CIMPictureStroke":case"CIMGradientStroke":{const e=n.width;null!=e&&e>r&&(r=e);break}case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":if(n.markerPlacement&&I(n.markerPlacement)){const t=n.size??e.CIMVectorMarker.size;t>r&&(r=t)}break;case"CIMPictureFill":{const e=n.height;null!=e&&e>r&&(r=e)}}return r}}}function Y(e,t){if(null!==t){const r=t.get(e);return r?r.name:e}return e}function H(e){return e.map(e=>({...e,propertyName:O(e.propertyName)}))}function J(e){const t={};for(const r in e){const n=e[r];t[O(r)]=n}return t}function U(e){if(!e)return 0;let t=0;for(const r of e)t+=$(r);return t}function $(e){if(!e)return 0;if(le(e))return e.inflateSize??256;switch(e.type){case"CIMGeometricEffectArrow":return Math.abs(.5*e.width);case"CIMGeometricEffectBuffer":return Math.abs(e.size);case"CIMGeometricEffectControlMeasureLine":return 500;case"CIMGeometricEffectExtension":return Math.abs(e.length);case"CIMGeometricEffectJog":return Math.abs(.5*e.length);case"CIMGeometricEffectMove":return Math.max(Math.abs(p(e.offsetX)),Math.abs(p(e.offsetY)));case"CIMGeometricEffectOffset":case"CIMGeometricEffectOffsetTangent":return Math.abs(e.offset);case"CIMGeometricEffectRadial":return Math.abs(e.length??5);case"CIMGeometricEffectRegularPolygon":return Math.abs(e.radius);case"CIMGeometricEffectRotate":case"CIMGeometricEffectScale":default:return 0;case"CIMGeometricEffectTaperedPolygon":return.5*Math.max(Math.abs(e.fromWidth),Math.abs(e.toWidth));case"CIMGeometricEffectWave":return Math.abs(e.amplitude);case"CIMGeometricEffectDonut":return Math.abs(e.width)}}function K(e,t,r,n,o){const i=r*Math.PI/180;if(i){const r=Math.cos(i);return(Math.sin(i)*e+r*t)*n+o}return t*n+o}function Q(e,t,r,n,o){const i=r*Math.PI/180;if(i){return(Math.cos(i)*e-Math.sin(i)*t)*n+o}return e*n+o}function Z(e,t,r){return t?r-e:r+e}function ee(e,t,r){const n="Color"===r||"TintColor"===r||"ToColor"===r,o="Rotation"===r||"Angle"===r||"ToRotation"===r;let i=t[O(r)];if(null!=i&&(n?i=[i[0]/255,i[1]/255,i[2]/255,i[3]/255]:o&&(i*=Math.PI/180)),null==i&&(i=D(t.type,r.toLowerCase()),null!=i&&(n?i=[i[0]/255,i[1]/255,i[2]/255,i[3]]:o&&(i*=Math.PI/180))),null!=t.primitiveName){const a=e[t.primitiveName];if(null!=a){const e=a[r];null==e||("string"==typeof e||"number"==typeof e||Array.isArray(e)?(i=e,null!=i&&(n?i=[i[0]/255,i[1]/255,i[2]/255,i[3]/255]:o&&(i*=Math.PI/180))):(i={valueExpressionInfo:e,defaultValue:i},null!=i&&(n?i={type:"Process",op:"ArcadeColor",value:i}:o&&(i={type:"Process",op:"Divide",left:i,right:180/Math.PI}))))}}if(null==i)throw new Error(`Failed to derive a value or an expression for "${r}".`);return i}function te(e,t,r){if(null!=t[O(r)])return!0;if(null!=t.primitiveName){const n=e[t.primitiveName];if(null!=n){if(null!=n[r])return!0}}return!1}function re(e,t){return Math.max(Math.min((e??t)/100,1),0)}function ne(e){if(!e)return"None";switch(e){case"Begin":return"Begin";case"End":return"End";case"Both":return"Both";default:return"None"}}function oe(e){if(!e)return"None";switch(e){case"Tolerance":return"Tolerance";case"Text":return"Text";default:return"None"}}function ie(e){if(!e)return"None";switch(e){case"MoveBegin":return"MoveBegin";case"MoveEnd":return"MoveEnd";default:return"None"}}function ae(e){if(!e)return"None";switch(e){case"Only":return"Only";case"Suffix":return"Suffix";case"Expression":return"Expression";default:return"None"}}function le(e){return e.type.startsWith("PRI")}function ce(e){return null!=e&&se(e)?e:void 0}function se(e){return"setControlPoint"in e&&"getControlPoint"in e&&"setControlPointAt"in e&&"getControlPointAt"in e}export{u as adjustTextCase,l as analyzeTextParts,V as applyParentTransform,ce as asCIMGeometryCursor,s as assignTextValuesFromFeature,F as attributesToFields,o as colorToArray,n as evaluateValueOrFunction,E as fromCIMFontDecoration,L as fromCIMFontStyle,v as fromCIMHorizontalAlignment,A as fromCIMVerticalAlignment,D as getDefaultCIMValue,U as getEffectsInflateSize,d as getEnum,Y as getFieldName,x as getFillColor,P as getFontStyle,w as getFontWeight,p as getNumericValue,ee as getProcessParam,re as getRelativeGradientSize,X as getSize,G as getStrokeColor,T as getStrokeWidth,_ as getTextCasing,c as getTextValuesFromFeatureHandle,k as getTintColor,b as getValue,te as hasProcessParam,N as hasStrokeLayer,S as importLazily,h as isCIMFill,y as isCIMMarker,I as isCIMMarkerStrokePlacement,C as isCIMStroke,r as isFeatureValueFn,le as isPrivateEffect,z as isSVGImage,R as isValidCIMValue,B as mapCIMSymbolToGeometryType,M as normalizeAlpha,q as normalizeDashEffectTemplate,j as normalizeDashTemplate,H as normalizePrimitiveOverrideProps,W as parseDashTemplate,f as resampleHermite,oe as stringToDimensionMarkerFit,ne as stringToDimensionPartOptions,ie as stringToDimensionTextFit,ae as stringToDimensionTextOptions,m as toCIMSymbolJSON,J as toLowerCaseProps,O as uncapitalize};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{create as e}from"../../../../geometry/support/aaBoundingRect.js";import t from"../../../../layers/support/TileInfo.js";import{tileSizeInTileUnits as s,tileSizeInPixels as r}from"./constants.js";import{SymbolFader as i}from"./decluttering/SymbolFader.js";import{writeOpacityToBuffers as o}from"./decluttering/util.js";import{RenderableTile as l}from"../webgl/RenderableTile.js";import n from"../webgl/TileContainer.js";import{simplePipelineState as a}from"../webgl/shaderGraph/utils.js";import{VTLTechniquesRepo as d}from"../webgl/shaderGraph/techniques/vectorTiles/VTLTechniques.js";import h from"../../tiling/TileCoverage.js";import c from"../../tiling/TileKey.js";const u=1e-6;function y(e,t){if(e){const s=e.getLayoutProperty("visibility");if(!s||1!==s.getValue()&&(void 0===e.minzoom||e.minzoom<t+u)&&(void 0===e.maxzoom||e.maxzoom>=t-u))return!0}return!1}class m extends n{constructor(e){super(e),this._backgroundTiles=[],this._techniques=new d,this._computeDisplayInfoView(e),this._techniques.startup()}destroy(){super.destroy(),this.removeAllChildren(),this._spriteMosaic?.dispose(),this._spriteMosaic=null,this._glyphMosaic?.dispose(),this._glyphMosaic=null,null!=this._symbolFader&&(this._symbolFader.clear(),this._symbolFader=null);const e=this.stage?.context;e&&this._techniques.shutdown(e),this._styleRepository=null,this._backgroundTiles=[]}get fading(){return this._symbolFader?.fading??!1}get symbolFader(){return this._symbolFader}get symbolRepository(){return this._symbolFader?.symbolRepository}setStyleResources(e,t,r,l){if(this._spriteMosaic=e,this._glyphMosaic=t,this._styleRepository=r,this.tilingScheme=l,this._computeDisplayInfoView(l),null==this._symbolFader){const e=(e,t)=>{e.allSymbolsFadingOut=!0,e.lastOpacityUpdate=t,o(e,t,!0),e.decluttered=!0,e.requestRender()};this._symbolFader=new i("vector-tile",this._styleRepository,e,this.children,s)}this._symbolFader.styleRepository=r}setSpriteMosaic(e){this._spriteMosaic?.dispose(),this._spriteMosaic=e}deleteStyleLayers(e){null!=this._symbolFader&&this._symbolFader.deleteStyleLayers(e)}createRenderParams(e){return{...super.createRenderParams(e),renderPass:null,styleLayer:null,styleLayerUID:-1,glyphMosaic:this._glyphMosaic,spriteMosaic:this._spriteMosaic}}doRender(e){const{drawPhase:t}=e,s=1===t||64===t;this.visible&&s&&void 0!==this._spriteMosaic&&super.doRender(e)}addChild(e){return super.addChild(e),null!=this._symbolFader?this._symbolFader.addTile(e):e.decluttered=!0,this.requestRender(),e}removeChild(e){return null!=this._symbolFader&&this._symbolFader.removeTile(e),this.requestRender(),super.removeChild(e)}renderChildren(e){const{drawPhase:t}=e;64!==t?this._doRender(e):super.renderChildren(e)}removeAllChildren(){for(let e=0;e<this.children.length;e++){const t=this.children[e];null!=this._symbolFader&&this._symbolFader.removeTile(t),t.dispose()}super.removeAllChildren()}getStencilTarget(){return this.children.filter(e=>e.neededForCoverage&&e.hasData())}restartDeclutter(){null!=this._symbolFader&&this._symbolFader.restartDeclutter()}_doRender(e){const{context:t,painter:s,state:r}=e,i=this._styleRepository;if(!i)return;const o=i.layers,l=this._displayInfo.scaleToZoom(r.scale);this.children.forEach(e=>e.disposeLayerData()),super.renderChildren(e),i.backgroundBucketIds.length>0&&(e.renderPass="background",this._renderBackgroundLayers(e,i.backgroundBucketIds,l)),1===e.drawPhase&&this._fade(l,r);const n=this.children.filter(
|
|
2
|
+
import{create as e}from"../../../../geometry/support/aaBoundingRect.js";import t from"../../../../layers/support/TileInfo.js";import{tileSizeInTileUnits as s,tileSizeInPixels as r}from"./constants.js";import{SymbolFader as i}from"./decluttering/SymbolFader.js";import{writeOpacityToBuffers as o}from"./decluttering/util.js";import{RenderableTile as l}from"../webgl/RenderableTile.js";import n from"../webgl/TileContainer.js";import{simplePipelineState as a}from"../webgl/shaderGraph/utils.js";import{VTLTechniquesRepo as d}from"../webgl/shaderGraph/techniques/vectorTiles/VTLTechniques.js";import h from"../../tiling/TileCoverage.js";import c from"../../tiling/TileKey.js";const u=1e-6;function y(e,t){if(e){const s=e.getLayoutProperty("visibility");if(!s||1!==s.getValue()&&(void 0===e.minzoom||e.minzoom<t+u)&&(void 0===e.maxzoom||e.maxzoom>=t-u))return!0}return!1}class m extends n{constructor(e){super(e),this._backgroundTiles=[],this._techniques=new d,this._computeDisplayInfoView(e),this._techniques.startup()}destroy(){super.destroy(),this.removeAllChildren(),this._spriteMosaic?.dispose(),this._spriteMosaic=null,this._glyphMosaic?.dispose(),this._glyphMosaic=null,null!=this._symbolFader&&(this._symbolFader.clear(),this._symbolFader=null);const e=this.stage?.context;e&&this._techniques.shutdown(e),this._styleRepository=null,this._backgroundTiles=[]}get fading(){return this._symbolFader?.fading??!1}get symbolFader(){return this._symbolFader}get symbolRepository(){return this._symbolFader?.symbolRepository}setStyleResources(e,t,r,l){if(this._spriteMosaic=e,this._glyphMosaic=t,this._styleRepository=r,this.tilingScheme=l,this._computeDisplayInfoView(l),null==this._symbolFader){const e=(e,t)=>{e.allSymbolsFadingOut=!0,e.lastOpacityUpdate=t,o(e,t,!0),e.decluttered=!0,e.requestRender()};this._symbolFader=new i("vector-tile",this._styleRepository,e,this.children,s)}this._symbolFader.styleRepository=r}setSpriteMosaic(e){this._spriteMosaic?.dispose(),this._spriteMosaic=e}deleteStyleLayers(e){null!=this._symbolFader&&this._symbolFader.deleteStyleLayers(e)}createRenderParams(e){return{...super.createRenderParams(e),renderPass:null,styleLayer:null,styleLayerUID:-1,glyphMosaic:this._glyphMosaic,spriteMosaic:this._spriteMosaic}}doRender(e){const{drawPhase:t}=e,s=1===t||64===t;this.visible&&s&&void 0!==this._spriteMosaic&&super.doRender(e)}addChild(e){return super.addChild(e),null!=this._symbolFader?this._symbolFader.addTile(e):e.decluttered=!0,this.requestRender(),e}removeChild(e){return null!=this._symbolFader&&this._symbolFader.removeTile(e),this.requestRender(),super.removeChild(e)}renderChildren(e){const{drawPhase:t}=e;64!==t?this._doRender(e):super.renderChildren(e)}removeAllChildren(){for(let e=0;e<this.children.length;e++){const t=this.children[e];null!=this._symbolFader&&this._symbolFader.removeTile(t),t.dispose()}super.removeAllChildren()}getStencilTarget(){return this.children.filter(e=>e.neededForCoverage&&e.hasData())}restartDeclutter(){null!=this._symbolFader&&this._symbolFader.restartDeclutter()}_doRender(e){const{context:t,painter:s,state:r}=e,i=this._styleRepository;if(!i)return;const o=i.layers,l=this._displayInfo.scaleToZoom(r.scale);this.children.forEach(e=>e.disposeLayerData()),super.renderChildren(e),i.backgroundBucketIds.length>0&&(e.renderPass="background",this._renderBackgroundLayers(e,i.backgroundBucketIds,l)),1===e.drawPhase&&this._fade(l,r);const n=this.children.filter(t=>(1===e.drawPhase&&t.fader.fade()<1&&this.requestRender(),t.visible&&t.hasData()));if(n&&0!==n.length){for(const e of n)e.triangleCount=0;t.setClearDepth(1),t.clear(256),s.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:{write:!1,test:{compare:514,op:{fail:7680,zFail:7680,zPass:7681},mask:255}},depth:{write:!1,test:515}}),e.renderPass="translucent";for(let t=0;t<o.length;t++)this._renderStyleLayer(o[t],e,n);t.bindVAO(null),s.setPipelineState(a);for(const e of n)e.debugInfo.display.triangleCount=e.triangleCount}else t.bindVAO(null)}_fade(e,t){null!=this._symbolFader&&(this._symbolFader.update(e,t)||this.requestRender())}_renderStyleLayer(e,t,s){const{displayLevel:r,renderPass:i}=t;if(void 0===e)return;const o=e.getLayoutProperty("visibility");if(o&&1===o.getValue())return;switch(e.type){case 0:return;case 1:case 2:case 4:case 3:if("translucent"!==i)return}if(s=3===e.type?s.filter(e=>e.decluttered):s.filter(e=>e.neededForCoverage),3!==e.type&&(0===s.length||void 0!==e.minzoom&&e.minzoom>=r+u||void 0!==e.maxzoom&&e.maxzoom<r-u))return;const l=e.uid;t.styleLayerUID=l,t.styleLayer=e;const n=this._techniques.getTechnique(e.type);null!=n&&n.render(t,{tiles:s})}_renderBackgroundLayers(t,i,o){const{state:n}=t,a=this._styleRepository;let d=!1;for(const e of i){const t=a.getLayerById(e);if(t&&0===t.type&&y(a.getLayerById(e),o)){d=!0;break}}if(!d)return;const u=this.tilingScheme,m=u.getTileCoverage(t.state,0,!0,"smallest"),{spans:p,lodInfo:g}=m,{level:f}=g,_=e(),b=[],F=this._backgroundTiles;let R,v=0;for(const{row:h,colFrom:y,colTo:C}of p)for(let t=y;t<=C;t++){if(v<F.length)R=F[v],R.key.set(f,h,g.normalizeCol(t),g.getWorldForColumn(t)),u.getTileBounds(_,R.key,!1),R.x=_[0],R.y=_[3],R.resolution=u.getTileResolution(f);else{const i=new c(f,h,g.normalizeCol(t),g.getWorldForColumn(t)),o=u.getTileBounds(e(),i),n=u.getTileResolution(f);R=new l(i,n,o[0],o[3],r,r,s,s),F.push(R)}R.setTransform(n),b.push(R),v++}const T=this._techniques.getTechnique(0);for(const e of i){const s=a.getLayerById(e);0===s.type&&y(s,o)&&(t.styleLayerUID=s.uid,t.styleLayer=s,T.render(t,{tiles:b}))}h.pool.release(m)}_computeDisplayInfoView(e){let s=e.tileInfo.lods[0].scale;const i=Math.max(25,e.tileInfo.lods.length),o=[];for(let t=0;t<=i;t++)o.push(s),s/=2;this._displayInfo=t.create({scales:o,size:r,spatialReference:e.spatialReference,numLODs:i})}}export{m as VectorTileContainer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{AMeshFactory as e}from"./MeshFactory.js";import{createMatcher as
|
|
2
|
+
import{AMeshFactory as e}from"./MeshFactory.js";import{createMatcher as s}from"../../util/createMatcher.js";class t extends e{static async create(e,o){const r=await s(e,o.symbology),c=o.labels?await s(e,o.labels):null;return new t(r,c)}constructor(e,s){super(),this._symbology=e,this._labels=s}destroy(){}async enqueueMatcherRequests(e,s,t,o){await Promise.all([this._symbology.fetchResources(e,s,t,o),this._labels?.fetchResources(e,s,t,o)])}enqueueWriterRequests(e,s,t,o){const r=this._symbology.match(s,t,o);if(r){for(const o of r)o.enqueueRequest(e,s,t);if(this._labels){const r=this._labels.match(s,t,o);if(!r)return;for(const o of r)o.enqueueRequest(e,s,t)}}}write(e,s,t,o,r,c,a,i){const l=null!=i?i/o.$view.scale:void 0,n=this._symbology.match(t,o,r);if(!n)return;for(const y of n)y.write(e,s,t,o,c,a,l,this._symbology);this._symbology.cleanup(s,t,e.id,o,r);if(e.entityRecordCount()>=1&&this._labels){const i=this._labels.match(t,o,r);if(!i)return;for(const r of i)r.setReferences(n),r.write(e,s,t,o,c,a,l)}}getSortKey(e,s){return this._symbology.getSortKey(e,s)}hasArcadeDependency(e){return!(!this._symbology.hasArcadeDependency(e)&&!this._labels?.hasArcadeDependency(e))}}export{t as FeatureMeshFactory};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{cyrb53 as e}from"../../../../../../core/string.js";import{discardUrlIfHasUrlHash as t}from"../../urlUtils.js";import{AResourceProxy as r}from"../../shaderGraph/techniques/mesh/AResourceProxy.js";class s extends r{constructor(e){super(),this._fetcher=e,this._controller=new AbortController,this._pendingRequests=new Map,this._resourceIdToResource=new Map}destroy(){this._controller.abort()}get _abortOptions(){return{signal:this._controller.signal}}enqueueRequest(r){const s=t(r.resource),o=e(JSON.stringify(s));return this._pendingRequests.has(o)||this._pendingRequests.set(o,r),o}async fetchEnqueuedResources(){const e=Array.from(this._pendingRequests.entries()),t=e.map(e=>e[1]);if(0===t.length)return;const r=await this._fetcher.fetch(t,this._abortOptions);for(let s=0;s<r.length;s++){const t=e[s][0];this._resourceIdToResource.set(t,r[s])}this._pendingRequests.clear()}async fetchResourceImmediate(e){const t=await this._fetcher.fetch([e]);if(1!==t.length)throw new Error("FeaturePipelineResourceProxy: failed to fetch resources");return t[0]}async fetchDictionaryResourceImmediate(e){const t=await this._fetcher.fetchDictionary([e]);if(1!==t.length)throw new Error("FeaturePipelineResourceProxy: failed to fetch dictionary resources");return t[0]}getResource(e){return this._resourceIdToResource.get(e)}}export{s as ResourceProxy};
|
|
2
|
+
import{cyrb53 as e}from"../../../../../../core/string.js";import{discardUrlIfHasUrlHash as t}from"../../urlUtils.js";import{AResourceProxy as r}from"../../shaderGraph/techniques/mesh/AResourceProxy.js";class s extends r{constructor(e){super(),this._fetcher=e,this._controller=new AbortController,this._pendingRequests=new Map,this._resourceIdToResource=new Map}destroy(){this._controller.abort()}get _abortOptions(){return{signal:this._controller.signal}}enqueueRequest(r){const s=t(r.resource),o=e(JSON.stringify(s));return this._pendingRequests.has(o)||this._pendingRequests.set(o,r),o}async fetchEnqueuedResources(){const e=Array.from(this._pendingRequests.entries()),t=e.map(e=>e[1]);if(0===t.length)return;const r=await this._fetcher.fetch(t,this._abortOptions);for(let s=0;s<r.length;s++){const t=e[s][0];this._resourceIdToResource.set(t,r[s])}this._pendingRequests.clear()}async fetchResourceImmediate(e){const t=await this._fetcher.fetch([e]);if(1!==t.length)throw new Error("FeaturePipelineResourceProxy: failed to fetch resources");return t[0]}async fetchDictionaryResourceImmediate(e){const t=await this._fetcher.fetchDictionary([e]);if(1!==t.length)throw new Error("FeaturePipelineResourceProxy: failed to fetch dictionary resources");return t[0]}async fetchMeshResourceImmediate(e){const t=await this._fetcher.fetchMesh([e]),[r]=t;if(!r)throw new Error("FeaturePipelineResourceProxy: failed to fetch mesh resources");return r}getResource(e){return this._resourceIdToResource.get(e)}}export{s as ResourceProxy};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{fromRotation as t,multiply as e,translate as
|
|
2
|
+
import{fromRotation as t,multiply as e,translate as s,rotate as i}from"../../../../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as n}from"../../../../../../core/libs/gl-matrix-2/factories/mat2df32.js";import{transformMat2d as o,set as h}from"../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as r}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f32.js";import{getXAnchorDirection as a,getYAnchorDirection as f}from"../../alignmentUtils.js";import c from"../../Rect.js";import l from"../../collisions/BoundingBox.js";const d=22,g=4,m=d+g,u=d-6,x=Math.PI/180,p=8,_=1.5;class w{constructor(t,e,s,i){this._rotationT=n(),this._transform=n(),this._angle=0,this._bounds=null;const{mosaicItem:o,rect:h,shaping:r,code:a}=s,f=o.rect;this.width=0===a?h.width:f.width*i,this.height=0===a?h.height:f.height*i,this.x=i*(t+r.xOffset+h.left),this.y=i*(e+r.yOffset-h.top),this.textureBinding=o.textureBinding,this.texcoords={topLeft:[f.x,f.y],topRight:[f.x+f.width,f.y],bottomLeft:[f.x,f.y+f.height],bottomRight:[f.x+f.width,f.y+f.height]}}set angle(e){this._angle=e,t(this._rotationT,-e),this._offsets=this._bounds=null}get angle(){return this._angle}get offsets(){if(!this._offsets){const{x:s,y:i,width:h,height:r}=this,a=t(n(),-this.angle),f=e(n(),a,this._transform);this._offsets={topLeft:o([0,0],[s,i],f),topRight:o([0,0],[s+h,i],f),bottomLeft:o([0,0],[s,i+r],f),bottomRight:o([0,0],[s+h,i+r],f)}}return this._offsets}get bounds(){if(this.width<=0)return null;if(!this._bounds){const t=this.offsets;let e=1/0,s=1/0,i=-1/0,n=-1/0;for(const[f,c]of[t.topLeft,t.topRight,t.bottomLeft,t.bottomRight])e=Math.min(e,f),s=Math.min(s,c),i=Math.max(i,f),n=Math.max(n,c);const o=i-e,h=n-s,r=e+o/2,a=s+h/2;this._bounds=new l(r,a,o,h)}return this._bounds}setTransform(t){this._transform=t,this._offsets=null}}const y=(t,e)=>({code:0,mosaicItem:{rect:new c(0,0,11,8),sdf:!0,page:0,textureBinding:e},rect:{height:4,width:t,left:0,top:0},shaping:{xOffset:0,yOffset:0,xAdvance:0,yAdvance:0}});function b(t,e){return t.forEach(t=>o(t,t,e)),{topLeft:t[0],topRight:t[1],bottomLeft:t[2],bottomRight:t[3]}}class M{constructor(t,e,s,i){this._rotation=0,this._decorate(t,e,s,i),this.glyphs=t,this.bounds=this._createBounds(t),this.isMultiline=e.length>1,this._hasRotation=0!==s.angle,this._transform=this._createGlyphTransform(this.bounds,s),this._borderLineSizePx=s.borderLineSizePx,(s.borderLineSizePx||s.hasBackground)&&([this.bounds,this.textBox]=this.shapeBackground(this._transform));for(const n of t)n.setTransform(this._transform)}setRotation(s){if(0===s&&0===this._rotation)return;this._rotation=s;const i=this._transform,o=t(n(),s);e(i,o,i);for(const t of this.glyphs)t.setTransform(this._transform)}_decorate(t,e,s,i){if(!s.decoration||"none"===s.decoration||!t.length)return;const n=s.scale,o="underline"===s.decoration?i?.baseline??m:i?.midline??u,h=t[0].textureBinding;for(const r of e){const e=r.startX*n,s=r.startY*n,i=(r.width+r.glyphWidthEnd)*n;t.push(new w(e,s+o*n,y(i,h),1))}}shapeBackground(t){const e=this._borderLineSizePx||0,s=(_+e)/2,i=this._borderLineSizePx?s:0,{xmin:n,ymin:o,xmax:h,ymax:r,x:a,y:f,width:c,height:d}=this.bounds,g=[n-p,o-p],m=[h+p,o-p],u=[n-p,r+p],x=[h+p,r+p],w=b([[g[0]-s,g[1]-s],[m[0]+s,m[1]-s],[g[0]+i,g[1]+i],[m[0]-i,m[1]+i]],t),y=b([[u[0]+i,u[1]-i],[x[0]-i,x[1]-i],[u[0]-s,u[1]+s],[x[0]+s,x[1]+s]],t),M=b([[g[0]-s,g[1]-s],[g[0]+i,g[1]+i],[u[0]-s,u[1]+s],[u[0]+i,u[1]-i]],t),L=b([[m[0]-i,m[1]+i],[m[0]+s,m[1]-s],[x[0]-i,x[1]-i],[x[0]+s,x[1]+s]],t),A={main:b([g,m,u,x],t),top:w,bot:y,left:M,right:L};return[new l(a,f,c+2*s,d+2*s),A]}get boundsT(){const t=this.bounds,e=h(r(),t.x,t.y);if(o(e,e,this._transform),this._hasRotation){const s=Math.max(t.width,t.height);return new l(e[0],e[1],s,s)}return new l(e[0],e[1],t.width,t.height)}_createBounds(t){let e=1/0,s=1/0,i=0,n=0;for(const r of t)e=Math.min(e,r.offsets.topLeft[0]),s=Math.min(s,r.offsets.topLeft[1]),i=Math.max(i,r.offsets.bottomRight[0]),n=Math.max(n,r.offsets.bottomRight[1]);const o=i-e,h=n-s;return new l(e+o/2,s+h/2,o,h)}_createGlyphTransform(t,e){const o=x*e.angle,a=n(),f=r();return s(a,a,h(f,e.xOffset,-e.yOffset)),e.useCIMAngleBehavior?i(a,a,o):(s(a,a,h(f,t.x,t.y)),i(a,a,o),s(a,a,h(f,-t.x,-t.y))),a}}class L{constructor(t,e,s,i,n,o){this.glyphWidthEnd=0,this.startX=0,this.startY=0,this.start=Math.max(0,Math.min(e,s)),this.end=Math.max(0,Math.max(e,s)),this.end<t.length&&(this.glyphWidthEnd=t[this.end].rect.width),this.width=i,this.yMin=n,this.yMax=o}}const A=t=>10===t,R=t=>32===t;function v(t,e,s){const i=new Array,n=1/s.scale,o=s.maxLineWidth*n,h=e?t.length-1:0,r=e?-1:t.length,a=e?-1:1;let f=h,c=0,l=0,d=f,g=d,m=0,u=1/0,x=0;for(;f!==r;){const{code:e,rect:s,shaping:n}=t[f],r=Math.abs(s.top);if(A(e)||R(e)||(u=Math.min(u,r),x=Math.max(x,r+s.height)),A(e))f!==h&&(i.push(new L(t,d,f-a,c,u===1/0?0:u,x)),u=1/0,x=0),c=0,d=f+a,g=f+a,l=0;else if(R(e))g=f+a,l=0,m=n.xAdvance,c+=n.xAdvance;else if(c>o){if(g!==d){const e=g-2*a;c-=m,i.push(new L(t,d,e,c-l,u,x)),u=1/0,x=0,d=g,c=l}else i.push(new L(t,d,f-a,c,u,x)),u=1/0,x=0,d=f,g=f,c=0;c+=n.xAdvance,l+=n.xAdvance}else c+=n.xAdvance,l+=n.xAdvance;f+=a}const p=new L(t,d,f-a,c,u,x);return p.start>=0&&p.end<t.length&&i.push(p),i}function B(t,e){let s=0;for(let o=0;o<t.length;o++){const{width:e}=t[o];s=Math.max(e,s)}const i="underline"===e.decoration?g:0,n=t[0].yMin;return{x:0,y:n,height:t[t.length-1].yMax+e.lineHeight*(t.length-1)+i-n,width:s}}function T(t,e,s){let i=0;for(let n=e;n<s;n++)R(t[n].code)&&!A(t[n+1].code)&&i++;return i}function j(t,e){const s=e.scale,i=new Array,n=t.sdfPadding,{faceInfo:o,glyphs:h,isRightToLeft:r}=t,c="justify"===e.horizontalAlignment||"Justify"===e.horizontalAlignment,l=v(h,r,e),g=l.length?B(l,e):{y:0,height:0,width:0},m=c?r?1:-1:a(e.horizontalAlignment),u=f(e.verticalAlignment),x=2===u?1:0,p=x?0:u-1,_=o?.baseline??d,y=l.length>1,b=x?y?-g.y-g.height:-_:-g.y+p*(g.height/2);for(let a=0;a<l.length;a++){const{start:o,end:r,width:f}=l[a],d=c&&a<l.length-1?T(h,o,r):0,u=d>0?(g.width-f)/d:0;let x=-1*(m+1)*((u>0?g.width:f)/2)-n;const p=(t.isRightToLeft?l.length-1-a:a)*e.lineHeight+b-n;l[a].startX=x,l[a].startY=p;for(let t=o;t<=r;t++){const e=h[t];if(A(e.code))continue;const n=new w(x,p,e,s);x+=e.shaping.xAdvance,u>0&&R(e.code)&&(x+=u),i.push(n)}}return new M(i,l,e,o)}function z(t,e){const s=e.scale,{faceInfo:i,glyphs:n}=t,o=n.map(t=>new w(0,0,t,s));return new M(o,[],e,i)}export{w as ShapedGlyph,M as ShapingInfo,j as shapeGlyphs,z as shapeGlyphsForMultipoint};
|