chunk-PS4B3D6M.js 115 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628
  1. import {
  2. i as i4,
  3. n as n6
  4. } from "./chunk-DO6JJUZG.js";
  5. import {
  6. f as f6,
  7. s as s7,
  8. se
  9. } from "./chunk-54X4RLMR.js";
  10. import {
  11. a as a3,
  12. g as g2,
  13. j as j2,
  14. n
  15. } from "./chunk-MWIFVNKP.js";
  16. import {
  17. a,
  18. d,
  19. n as n5,
  20. o as o6
  21. } from "./chunk-MIWGTTJJ.js";
  22. import {
  23. M,
  24. h
  25. } from "./chunk-LL6JU3GU.js";
  26. import {
  27. C,
  28. N,
  29. O,
  30. P,
  31. U,
  32. Z,
  33. b,
  34. f as f4,
  35. w as w2
  36. } from "./chunk-ZIWBDWEW.js";
  37. import {
  38. a as a2,
  39. c as c2,
  40. i as i3,
  41. n as n2,
  42. o as o7,
  43. r as r4,
  44. s as s5
  45. } from "./chunk-IQNZZCQJ.js";
  46. import {
  47. f as f2,
  48. p as p2
  49. } from "./chunk-HWIURR7X.js";
  50. import {
  51. G,
  52. ee,
  53. f as f3,
  54. s as s4,
  55. te as te2
  56. } from "./chunk-Q4LKAPDF.js";
  57. import {
  58. w,
  59. x
  60. } from "./chunk-TODU7HVH.js";
  61. import {
  62. E,
  63. S
  64. } from "./chunk-23ONSYIH.js";
  65. import {
  66. s as s6
  67. } from "./chunk-SRMDO2KR.js";
  68. import {
  69. e as e3,
  70. i as i2,
  71. o as o5
  72. } from "./chunk-YLVXZ2PS.js";
  73. import {
  74. l
  75. } from "./chunk-5NM43FFO.js";
  76. import {
  77. X,
  78. at,
  79. ct,
  80. et,
  81. f,
  82. ft,
  83. gt,
  84. ht,
  85. i,
  86. j,
  87. k,
  88. lt,
  89. mt,
  90. nt,
  91. o as o4,
  92. pt,
  93. rt,
  94. st,
  95. vt
  96. } from "./chunk-WFSV2B2I.js";
  97. import {
  98. n as n4,
  99. t as t3
  100. } from "./chunk-MFFE4I2S.js";
  101. import {
  102. n as n3
  103. } from "./chunk-XBH7TGC2.js";
  104. import {
  105. e as e4,
  106. f as f5
  107. } from "./chunk-K3NA3LQS.js";
  108. import {
  109. e as e5
  110. } from "./chunk-TRK7CKWP.js";
  111. import {
  112. e as e2
  113. } from "./chunk-FIYKFRB2.js";
  114. import {
  115. te,
  116. we
  117. } from "./chunk-FYNVVMWY.js";
  118. import {
  119. t as t2
  120. } from "./chunk-HBMVUVZX.js";
  121. import {
  122. r as r3,
  123. z
  124. } from "./chunk-6P6NA7JB.js";
  125. import {
  126. e as e6
  127. } from "./chunk-FTI5VP6T.js";
  128. import {
  129. r as r2,
  130. s as s3,
  131. y
  132. } from "./chunk-KUXNUNAI.js";
  133. import {
  134. i as i5
  135. } from "./chunk-LRDX4TO7.js";
  136. import {
  137. o as o2,
  138. u
  139. } from "./chunk-WEMIK25H.js";
  140. import {
  141. o2 as o3
  142. } from "./chunk-XNLG7T2T.js";
  143. import {
  144. D,
  145. g,
  146. p
  147. } from "./chunk-ULGDPLM2.js";
  148. import {
  149. s,
  150. s3 as s2
  151. } from "./chunk-EMJ4ZSM2.js";
  152. import {
  153. c,
  154. e,
  155. o,
  156. r,
  157. t
  158. } from "./chunk-GZT4BVFP.js";
  159. // node_modules/@arcgis/core/views/2d/engine/webgl/mesh/heuristics.js
  160. var i6 = new Map();
  161. function c3(r12, t8, c10) {
  162. const { indicesPerRecord: s10, multiplier: o12, verticesPerRecord: d8 } = i6.get(r12);
  163. return { recordBytes: c10 * ct * Uint32Array.BYTES_PER_ELEMENT, indexBytes: o12 * s10 * c10 * Uint32Array.BYTES_PER_ELEMENT, vertexBytes: o12 * d8 * c10 * t8 };
  164. }
  165. i6.set(E.MARKER, { multiplier: 1, indicesPerRecord: 6, verticesPerRecord: 4 }), i6.set(E.LINE, { multiplier: 1, indicesPerRecord: 24, verticesPerRecord: 8 }), i6.set(E.FILL, { multiplier: 1, indicesPerRecord: 10, verticesPerRecord: 10 }), i6.set(E.TEXT, { multiplier: 8, indicesPerRecord: 6, verticesPerRecord: 4 }), i6.set(E.LABEL, { multiplier: 8, indicesPerRecord: 6, verticesPerRecord: 4 });
  166. // node_modules/@arcgis/core/views/2d/engine/webgl/util/Writer.js
  167. var t4 = 1.25;
  168. var e7 = class {
  169. constructor(t8, e12) {
  170. this._pos = 0;
  171. const r12 = e12 ? this._roundToNearest(e12, t8.BYTES_PER_ELEMENT) : 40;
  172. this._array = new ArrayBuffer(r12), this._buffer = new t8(this._array), this._ctor = t8, this._i16View = new Int16Array(this._array);
  173. }
  174. get length() {
  175. return this._pos;
  176. }
  177. _roundToNearest(t8, e12) {
  178. const r12 = Math.round(t8);
  179. return r12 + (e12 - r12 % e12);
  180. }
  181. _ensureSize(e12) {
  182. if (this._pos + e12 >= this._buffer.length) {
  183. const r12 = this._roundToNearest((this._array.byteLength + e12 * this._buffer.BYTES_PER_ELEMENT) * t4, this._buffer.BYTES_PER_ELEMENT), s10 = new ArrayBuffer(r12), i10 = new this._ctor(s10);
  184. i10.set(this._buffer, 0), this._array = s10, this._buffer = i10, this._i16View = new Int16Array(this._array);
  185. }
  186. }
  187. ensureSize(t8) {
  188. this._ensureSize(t8);
  189. }
  190. writeF32(t8) {
  191. this._ensureSize(1);
  192. const e12 = this._pos;
  193. return new Float32Array(this._array, 4 * this._pos, 1)[0] = t8, this._pos++, e12;
  194. }
  195. push(t8) {
  196. this._ensureSize(1);
  197. const e12 = this._pos;
  198. return this._buffer[this._pos++] = t8, e12;
  199. }
  200. writeFixed(t8) {
  201. this._buffer[this._pos++] = t8;
  202. }
  203. setValue(t8, e12) {
  204. this._buffer[t8] = e12;
  205. }
  206. i1616Add(t8, e12, r12) {
  207. this._i16View[2 * t8] += e12, this._i16View[2 * t8 + 1] += r12;
  208. }
  209. getValue(t8) {
  210. return this._buffer[t8];
  211. }
  212. incr(t8) {
  213. if (this._buffer.length < t8)
  214. throw new Error("Increment index overflows the target buffer");
  215. this._buffer[t8]++;
  216. }
  217. decr(t8) {
  218. this._buffer[t8]--;
  219. }
  220. writeRegion(t8) {
  221. this._ensureSize(t8.length);
  222. const e12 = this._pos;
  223. return this._buffer.set(t8, this._pos), this._pos += t8.length, e12;
  224. }
  225. writeManyFrom(t8, e12, r12) {
  226. this._ensureSize(r12 - e12);
  227. for (let s10 = e12; s10 !== r12; s10++)
  228. this.writeFixed(t8._buffer[s10]);
  229. }
  230. buffer() {
  231. const t8 = this._array.slice(0, 4 * this._pos);
  232. return this.destroy(), t8;
  233. }
  234. toArray() {
  235. const t8 = this._array, e12 = [];
  236. for (let r12 = 0; r12 < t8.byteLength / 4; r12++)
  237. e12.push(t8[r12]);
  238. return e12;
  239. }
  240. seek(t8) {
  241. this._pos = t8;
  242. }
  243. destroy() {
  244. this._array = null, this._buffer = null;
  245. }
  246. };
  247. // node_modules/@arcgis/core/views/2d/engine/webgl/mesh/VertexDataWriter.js
  248. var r5 = class {
  249. constructor(e12, r12, i10) {
  250. this._start = { index: 0, vertex: 0 };
  251. const h6 = c3(e12, r12, i10), c10 = r12 / 4;
  252. this.geometryType = e12, this._records = new e7(Int32Array, h6.recordBytes), this._indices = new e7(Uint32Array, h6.indexBytes), this._vertices = new e7(Uint32Array, h6.vertexBytes), this._metrics = new e7(Float32Array, 0), this._strideInt = c10;
  253. }
  254. serialize(e12) {
  255. const t8 = this._records.buffer(), s10 = this._indices.buffer(), r12 = this._vertices.buffer(), i10 = this._metrics.length ? this._metrics.buffer() : null, h6 = 4 * this._strideInt;
  256. return e12.push(t8, s10, r12), { stride: h6, records: t8, indices: s10, vertices: r12, metrics: i10 };
  257. }
  258. get strideInt() {
  259. return this._strideInt;
  260. }
  261. get recordCount() {
  262. return this._records.length / ct;
  263. }
  264. get vertexCount() {
  265. return this._vertices.length / this._strideInt;
  266. }
  267. get indexCount() {
  268. return this._indices.length;
  269. }
  270. get indexWriter() {
  271. return this._indices;
  272. }
  273. get vertexWriter() {
  274. return this._vertices;
  275. }
  276. get metricWriter() {
  277. return this._metrics;
  278. }
  279. vertexEnsureSize(e12) {
  280. this._vertices.ensureSize(e12);
  281. }
  282. indexEnsureSize(e12) {
  283. this._indices.ensureSize(e12);
  284. }
  285. recordStart() {
  286. this._start.index = this._indices.length, this._start.vertex = this._vertices.length;
  287. }
  288. recordEnd(e12, t8, s10, r12, i10, h6, c10, n10) {
  289. this._records.push(e12), this._records.push(t8), this._records.push(s10), this._records.push(r12), this._records.push(i10), this._records.push(h6), this._records.push(c10), this._records.writeF32(n10);
  290. }
  291. writeIndex(e12) {
  292. this._indices.push(e12);
  293. }
  294. writeVertex(e12) {
  295. this._vertices.push(e12);
  296. }
  297. writeVertexF32(e12) {
  298. this._vertices.writeF32(e12);
  299. }
  300. copyLastFrom(t8, s10, r12) {
  301. const i10 = t8._records.length - ct, h6 = t8._records.getValue(i10), c10 = t8._records.getValue(i10 + 1), n10 = t8._records.getValue(i10 + 2), _5 = t8._records.getValue(i10 + 4), d8 = t8._records.getValue(i10 + 6), o12 = t8._records.getValue(i10 + 7), u12 = this._vertices.length, l7 = (t8._start.vertex - this._vertices.length) / this._strideInt, g9 = this._indices.length, p8 = this.vertexCount;
  302. for (let e12 = t8._start.index; e12 !== t8._indices.length; e12++) {
  303. const s11 = t8._indices.getValue(e12);
  304. this._indices.push(s11 - l7);
  305. }
  306. for (let e12 = t8._start.vertex; e12 !== t8._vertices.length; e12++) {
  307. const s11 = t8._vertices.getValue(e12);
  308. this._vertices.push(s11);
  309. }
  310. for (let e12 = u12; e12 <= this._vertices.length; e12 += this._strideInt)
  311. this._vertices.i1616Add(e12, s10, r12);
  312. this._records.push(h6), this._records.push(c10), this._records.push(n10), this._records.push(g9), this._records.push(_5), this._records.push(p8), this._records.push(d8), this._records.push(o12);
  313. }
  314. };
  315. // node_modules/@arcgis/core/views/2d/engine/webgl/mesh/MeshData.js
  316. var u2 = 1;
  317. var c4 = 2;
  318. var o8 = 4;
  319. var _ = 8;
  320. var l2 = 16;
  321. var d2 = 32;
  322. var g3 = 64;
  323. var p3 = 128;
  324. function x2(e12) {
  325. switch (e12) {
  326. case u2:
  327. case _:
  328. case d2:
  329. return -1;
  330. case c4:
  331. case g3:
  332. return 0;
  333. case o8:
  334. case l2:
  335. case p3:
  336. return 1;
  337. }
  338. }
  339. function m(e12) {
  340. switch (e12) {
  341. case u2:
  342. case c4:
  343. case o8:
  344. return -1;
  345. case _:
  346. case l2:
  347. return 0;
  348. case d2:
  349. case g3:
  350. case p3:
  351. return 1;
  352. }
  353. }
  354. var f7 = u2 | _ | d2;
  355. var y2 = o8 | l2 | p3;
  356. var w3 = u2 | c4 | o8;
  357. var v = d2 | g3 | p3;
  358. var E2 = class {
  359. constructor(e12, t8, r12, i10, s10, n10 = 0) {
  360. this._hasAggregate = false, this.hasRecords = false, this._data = { self: new Map(), neighbors: new Array() }, this._version = 0, this._current = { geometryType: 0, writer: null, overlaps: 0, start: 0, insertAfter: 0, sortKey: 0, id: 0, materialKey: 0, indexStart: 0, vertStart: 0, isDotDensity: false, bufferingEnabled: false, metricBoxLenPointer: 0 }, this.hint = t8, this.tileKey = e12, this._hasAggregate = i10, this._pixelBufferEnabled = s10, this._version = n10, this._symbologyType = r12;
  361. }
  362. get hasAggregates() {
  363. return this._hasAggregate;
  364. }
  365. get hasPixelBufferEnabled() {
  366. return this._pixelBufferEnabled;
  367. }
  368. serialize(t8) {
  369. const r12 = [];
  370. return r12.push(this._serializeTileVertexData(this.tileKey, this.tileKey, this._data.self)), this._data.neighbors.forEach((i10, s10) => {
  371. const n10 = 1 << s10, a7 = x2(n10), u12 = m(n10), c10 = l(new e2(this.tileKey), a7, u12, t8), o12 = this._serializeTileVertexData(this.tileKey, c10.id, i10.vertexData);
  372. o12.message.bufferIds = i10.displayIds, r12.push(o12);
  373. }), r12;
  374. }
  375. _serializeTileVertexData(e12, t8, r12) {
  376. const i10 = new Array();
  377. return { message: { tileKeyOrigin: e12, tileKey: t8, data: { [E.MARKER]: r12.get(E.MARKER)?.serialize(i10), [E.FILL]: r12.get(E.FILL)?.serialize(i10), [E.LINE]: r12.get(E.LINE)?.serialize(i10), [E.TEXT]: r12.get(E.TEXT)?.serialize(i10), [E.LABEL]: r12.get(E.LABEL)?.serialize(i10) }, version: this._version }, transferList: i10 };
  378. }
  379. featureStart(e12, t8) {
  380. this._current.insertAfter = e12, this._current.sortKey = t8;
  381. }
  382. featureEnd() {
  383. }
  384. recordStart(e12, t8, r12, i10) {
  385. this._current.writer = this._getVertexWriter(r12), this._current.overlaps = 0, this._current.indexStart = this._current.writer.indexCount, this._current.vertStart = this._current.writer.vertexCount, this._current.bufferingEnabled = i10, this._current.id = e12, this._current.materialKey = t8, this._current.geometryType = r12, this._current.isDotDensity = false, this._current.writer.recordStart();
  386. }
  387. recordCount() {
  388. return this._current.writer.recordCount;
  389. }
  390. vertexCount() {
  391. return this._current.writer.vertexCount;
  392. }
  393. indexCount() {
  394. return this._current.writer.indexCount;
  395. }
  396. vertexEnsureSize(e12) {
  397. this._current.writer.vertexEnsureSize(e12);
  398. }
  399. indexEnsureSize(e12) {
  400. this._current.writer.indexEnsureSize(e12);
  401. }
  402. vertexBounds(e12, t8, r12, i10) {
  403. this._current.bufferingEnabled && this._addOverlap(e12, t8, r12, i10);
  404. }
  405. vertexWrite(e12) {
  406. this._current.writer.writeVertex(e12);
  407. }
  408. vertexWriteF32(e12) {
  409. this._current.writer.writeVertexF32(e12);
  410. }
  411. vertexEnd() {
  412. }
  413. vertexWriter() {
  414. return this._current.writer.vertexWriter;
  415. }
  416. indexWrite(e12) {
  417. this._current.writer.writeIndex(e12);
  418. }
  419. indexWriter() {
  420. return this._current.writer.indexWriter;
  421. }
  422. metricWriter() {
  423. return this._current.writer.metricWriter;
  424. }
  425. metricStart(e12, t8, r12, n10, a7, h6, u12, c10) {
  426. this._current.writer = this._getVertexWriter(E.LABEL);
  427. const o12 = this._current.writer.metricWriter;
  428. o12.push(f2(e12)), o12.push(t8), o12.push(r12), o12.push(n10), o12.push(a7), o12.push(h6), o12.push(u12), o12.push(c10), o12.push(255), this._current.metricBoxLenPointer = o12.push(0);
  429. }
  430. metricEnd() {
  431. const e12 = this._current.writer.metricWriter;
  432. e12.getValue(this._current.metricBoxLenPointer) === 0 && e12.seek(e12.length - 10);
  433. }
  434. metricBoxWrite(e12, t8, r12, i10) {
  435. const s10 = this._current.writer.metricWriter;
  436. s10.incr(this._current.metricBoxLenPointer), s10.push(0), s10.push(0), s10.push(e12), s10.push(t8), s10.push(r12), s10.push(i10);
  437. }
  438. recordEnd() {
  439. const e12 = this._current.vertStart, r12 = this._current.writer.vertexCount - e12;
  440. if (!r12)
  441. return false;
  442. this.hasRecords = true;
  443. const i10 = this._current.indexStart, h6 = this._current.writer.indexCount - i10;
  444. if (this._current.writer.recordEnd(this._current.id, this._current.materialKey, this._current.insertAfter, i10, h6, e12, r12, this._current.sortKey), !this._pixelBufferEnabled || this._hasAggregate || this._current.overlaps === 0 || this._current.geometryType === E.LABEL)
  445. return true;
  446. const u12 = this._current.writer;
  447. for (let s10 = 0; s10 < 8; s10++) {
  448. const e13 = 1 << s10;
  449. if (!!(this._current.overlaps & e13)) {
  450. this._data.neighbors[s10] || (this._data.neighbors[s10] = { vertexData: new Map(), displayIds: new Set() });
  451. const r13 = this._data.neighbors[s10], i11 = this._current.geometryType;
  452. if (!r13.vertexData.has(i11)) {
  453. const e14 = G(i11, this._symbologyType).geometry, s11 = new r5(i11, e14, ht);
  454. r13.vertexData.set(i11, s11);
  455. }
  456. const h7 = r13.vertexData.get(this._current.geometryType), c10 = 8, o12 = 512 * -x2(e13) * c10, _5 = 512 * -m(e13) * c10;
  457. h7.copyLastFrom(u12, o12, _5), r13.displayIds.add(this._current.id);
  458. }
  459. }
  460. return true;
  461. }
  462. _addOverlap(e12, t8, i10, s10) {
  463. const n10 = 255 ^ ((e12 < 0 + i10 ? y2 : e12 >= o4 - i10 ? f7 : y2 | f7) | (t8 < 0 + s10 ? v : t8 >= o4 - s10 ? w3 : v | w3));
  464. this._current.overlaps |= n10;
  465. }
  466. _getVertexWriter(e12) {
  467. if (!this._data.self.has(e12)) {
  468. const t8 = this._data.self, r12 = G(e12, this._symbologyType).geometry;
  469. t8.set(e12, new r5(e12, r12, this.hint.records));
  470. }
  471. return this._data.self.get(e12);
  472. }
  473. };
  474. // node_modules/@arcgis/core/views/2d/layers/features/textUtils.js
  475. function t5(t8) {
  476. const e12 = new Array(t8.length);
  477. for (let n10 = 0; n10 < t8.length; n10++)
  478. e12[n10] = t8.charCodeAt(n10);
  479. return e12;
  480. }
  481. // node_modules/@arcgis/core/views/2d/engine/webgl/mesh/templates/util.js
  482. var n7 = 0;
  483. var o9 = 100;
  484. function t6(n10, o12, t8) {
  485. return n10[0] = o12[0] - t8[0], n10[1] = o12[1] - t8[1], n10;
  486. }
  487. function i7(n10, o12) {
  488. return Math.sqrt(n10 * n10 + o12 * o12);
  489. }
  490. function r6(n10) {
  491. const o12 = i7(n10[0], n10[1]);
  492. n10[0] /= o12, n10[1] /= o12;
  493. }
  494. function u3(n10, o12) {
  495. return i7(n10[0] - o12[0], n10[1] - o12[1]);
  496. }
  497. function c5(n10) {
  498. return typeof n10 == "function";
  499. }
  500. function e8(n10 = 2) {
  501. return 1 / Math.max(n10, 1);
  502. }
  503. function x3(t8, i10) {
  504. return [!!t8.minScale && i10.scaleToZoom(t8.minScale) || n7, !!t8.maxScale && i10.scaleToZoom(t8.maxScale) || o9];
  505. }
  506. // node_modules/@arcgis/core/views/2d/engine/webgl/mesh/bufcut.js
  507. function e9(e12, t8, r12, i10, u12, l7, o12) {
  508. D2 = 0;
  509. const f14 = (i10 - r12) * l7, p8 = u12 && u12.length, c10 = p8 ? (u12[0] - r12) * l7 : f14;
  510. let v5, s10, h6, d8, Z4, a7 = n8(t8, r12, i10, 0, c10, l7, true);
  511. if (a7 && a7.next !== a7.prev) {
  512. if (p8 && (a7 = y3(t8, r12, i10, u12, a7, l7)), f14 > 80 * l7) {
  513. v5 = h6 = t8[0 + r12 * l7], s10 = d8 = t8[1 + r12 * l7];
  514. for (let e13 = l7; e13 < c10; e13 += l7) {
  515. const n10 = t8[e13 + r12 * l7], x10 = t8[e13 + 1 + r12 * l7];
  516. v5 = Math.min(v5, n10), s10 = Math.min(s10, x10), h6 = Math.max(h6, n10), d8 = Math.max(d8, x10);
  517. }
  518. Z4 = Math.max(h6 - v5, d8 - s10), Z4 = Z4 !== 0 ? 1 / Z4 : 0;
  519. }
  520. x4(a7, e12, l7, v5, s10, Z4, o12, 0);
  521. }
  522. }
  523. function n8(e12, n10, t8, x10, r12, i10, o12) {
  524. let y8;
  525. if (o12 === Z2(e12, n10, t8, x10, r12, i10) > 0)
  526. for (let l7 = x10; l7 < r12; l7 += i10)
  527. y8 = u4(l7 + n10 * i10, e12[l7 + n10 * i10], e12[l7 + 1 + n10 * i10], y8);
  528. else
  529. for (let l7 = r12 - i10; l7 >= x10; l7 -= i10)
  530. y8 = u4(l7 + n10 * i10, e12[l7 + n10 * i10], e12[l7 + 1 + n10 * i10], y8);
  531. return y8 && M2(y8, y8.next) && (l3(y8), y8 = y8.next), y8;
  532. }
  533. function t7(e12, n10 = e12) {
  534. if (!e12)
  535. return e12;
  536. let t8, x10 = e12;
  537. do {
  538. if (t8 = false, x10.steiner || !M2(x10, x10.next) && s8(x10.prev, x10, x10.next) !== 0)
  539. x10 = x10.next;
  540. else {
  541. if (l3(x10), x10 = n10 = x10.prev, x10 === x10.next)
  542. break;
  543. t8 = true;
  544. }
  545. } while (t8 || x10 !== n10);
  546. return n10;
  547. }
  548. function x4(e12, n10, u12, o12, y8, f14, p8, v5) {
  549. if (!e12)
  550. return;
  551. !v5 && f14 && (e12 = c6(e12, o12, y8, f14));
  552. let s10 = e12;
  553. for (; e12.prev !== e12.next; ) {
  554. const c10 = e12.prev, h6 = e12.next;
  555. if (f14 ? i8(e12, o12, y8, f14) : r7(e12))
  556. n10.push(c10.index / u12 + p8), n10.push(e12.index / u12 + p8), n10.push(h6.index / u12 + p8), l3(e12), e12 = h6.next, s10 = h6.next;
  557. else if ((e12 = h6) === s10) {
  558. v5 ? v5 === 1 ? x4(e12 = b2(e12, n10, u12, p8), n10, u12, o12, y8, f14, p8, 2) : v5 === 2 && g4(e12, n10, u12, o12, y8, f14, p8) : x4(t7(e12), n10, u12, o12, y8, f14, p8, 1);
  559. break;
  560. }
  561. }
  562. }
  563. function r7(e12) {
  564. const n10 = e12.prev, t8 = e12, x10 = e12.next;
  565. if (s8(n10, t8, x10) >= 0)
  566. return false;
  567. let r12 = e12.next.next;
  568. const i10 = r12;
  569. let u12 = 0;
  570. for (; r12 !== e12.prev && (u12 === 0 || r12 !== i10); ) {
  571. if (u12++, a4(n10.x, n10.y, t8.x, t8.y, x10.x, x10.y, r12.x, r12.y) && s8(r12.prev, r12, r12.next) >= 0)
  572. return false;
  573. r12 = r12.next;
  574. }
  575. return true;
  576. }
  577. function i8(e12, n10, t8, x10) {
  578. const r12 = e12.prev, i10 = e12, u12 = e12.next;
  579. if (s8(r12, i10, u12) >= 0)
  580. return false;
  581. const l7 = r12.x < i10.x ? r12.x < u12.x ? r12.x : u12.x : i10.x < u12.x ? i10.x : u12.x, o12 = r12.y < i10.y ? r12.y < u12.y ? r12.y : u12.y : i10.y < u12.y ? i10.y : u12.y, y8 = r12.x > i10.x ? r12.x > u12.x ? r12.x : u12.x : i10.x > u12.x ? i10.x : u12.x, f14 = r12.y > i10.y ? r12.y > u12.y ? r12.y : u12.y : i10.y > u12.y ? i10.y : u12.y, p8 = z2(l7, o12, n10, t8, x10), c10 = z2(y8, f14, n10, t8, x10);
  582. let v5 = e12.prevZ, h6 = e12.nextZ;
  583. for (; v5 && v5.z >= p8 && h6 && h6.z <= c10; ) {
  584. if (v5 !== e12.prev && v5 !== e12.next && a4(r12.x, r12.y, i10.x, i10.y, u12.x, u12.y, v5.x, v5.y) && s8(v5.prev, v5, v5.next) >= 0)
  585. return false;
  586. if (v5 = v5.prevZ, h6 !== e12.prev && h6 !== e12.next && a4(r12.x, r12.y, i10.x, i10.y, u12.x, u12.y, h6.x, h6.y) && s8(h6.prev, h6, h6.next) >= 0)
  587. return false;
  588. h6 = h6.nextZ;
  589. }
  590. for (; v5 && v5.z >= p8; ) {
  591. if (v5 !== e12.prev && v5 !== e12.next && a4(r12.x, r12.y, i10.x, i10.y, u12.x, u12.y, v5.x, v5.y) && s8(v5.prev, v5, v5.next) >= 0)
  592. return false;
  593. v5 = v5.prevZ;
  594. }
  595. for (; h6 && h6.z <= c10; ) {
  596. if (h6 !== e12.prev && h6 !== e12.next && a4(r12.x, r12.y, i10.x, i10.y, u12.x, u12.y, h6.x, h6.y) && s8(h6.prev, h6, h6.next) >= 0)
  597. return false;
  598. h6 = h6.nextZ;
  599. }
  600. return true;
  601. }
  602. function u4(e12, n10, t8, x10) {
  603. const r12 = q.create(e12, n10, t8);
  604. return x10 ? (r12.next = x10.next, r12.prev = x10, x10.next.prev = r12, x10.next = r12) : (r12.prev = r12, r12.next = r12), r12;
  605. }
  606. function l3(e12) {
  607. e12.next.prev = e12.prev, e12.prev.next = e12.next, e12.prevZ && (e12.prevZ.nextZ = e12.nextZ), e12.nextZ && (e12.nextZ.prevZ = e12.prevZ);
  608. }
  609. function o10(e12) {
  610. let n10 = e12, t8 = e12;
  611. do {
  612. (n10.x < t8.x || n10.x === t8.x && n10.y < t8.y) && (t8 = n10), n10 = n10.next;
  613. } while (n10 !== e12);
  614. return t8;
  615. }
  616. function y3(e12, x10, r12, i10, u12, l7) {
  617. const y8 = new Array();
  618. for (let t8 = 0, f14 = i10.length; t8 < f14; t8++) {
  619. const u13 = n8(e12, x10, r12, i10[t8] * l7, t8 < f14 - 1 ? i10[t8 + 1] * l7 : r12 * l7, l7, false);
  620. u13 === u13.next && (u13.steiner = true), y8.push(o10(u13));
  621. }
  622. y8.sort(m2);
  623. for (const n10 of y8)
  624. f8(n10, u12), u12 = t7(u12, u12.next);
  625. return u12;
  626. }
  627. function f8(e12, n10) {
  628. if (n10 = p4(e12, n10)) {
  629. const x10 = j3(n10, e12);
  630. t7(x10, x10.next);
  631. }
  632. }
  633. function p4(e12, n10) {
  634. let t8 = n10;
  635. const x10 = e12.x, r12 = e12.y;
  636. let i10, u12 = -1 / 0;
  637. do {
  638. if (r12 <= t8.y && r12 >= t8.next.y && t8.next.y !== t8.y) {
  639. const e13 = t8.x + (r12 - t8.y) * (t8.next.x - t8.x) / (t8.next.y - t8.y);
  640. if (e13 <= x10 && e13 > u12) {
  641. if (u12 = e13, e13 === x10) {
  642. if (r12 === t8.y)
  643. return t8;
  644. if (r12 === t8.next.y)
  645. return t8.next;
  646. }
  647. i10 = t8.x < t8.next.x ? t8 : t8.next;
  648. }
  649. }
  650. t8 = t8.next;
  651. } while (t8 !== n10);
  652. if (!i10)
  653. return null;
  654. if (x10 === u12)
  655. return i10.prev;
  656. const l7 = i10, o12 = i10.x, y8 = i10.y;
  657. let f14, p8 = 1 / 0;
  658. for (t8 = i10.next; t8 !== l7; )
  659. x10 >= t8.x && t8.x >= o12 && x10 !== t8.x && a4(r12 < y8 ? x10 : u12, r12, o12, y8, r12 < y8 ? u12 : x10, r12, t8.x, t8.y) && (f14 = Math.abs(r12 - t8.y) / (x10 - t8.x), (f14 < p8 || f14 === p8 && t8.x > i10.x) && w4(t8, e12) && (i10 = t8, p8 = f14)), t8 = t8.next;
  660. return i10;
  661. }
  662. function c6(e12, n10, t8, x10) {
  663. for (let r12; r12 !== e12; r12 = r12.next) {
  664. if (r12 = r12 || e12, r12.z === null && (r12.z = z2(r12.x, r12.y, n10, t8, x10)), r12.prev.next !== r12 || r12.next.prev !== r12)
  665. return r12.prev.next = r12, r12.next.prev = r12, c6(e12, n10, t8, x10);
  666. r12.prevZ = r12.prev, r12.nextZ = r12.next;
  667. }
  668. return e12.prevZ.nextZ = null, e12.prevZ = null, v2(e12);
  669. }
  670. function v2(e12) {
  671. let n10, t8 = 1;
  672. for (; ; ) {
  673. let x10, r12 = e12;
  674. e12 = null, n10 = null;
  675. let i10 = 0;
  676. for (; r12; ) {
  677. i10++, x10 = r12;
  678. let u12 = 0;
  679. for (; u12 < t8 && x10; u12++)
  680. x10 = x10.nextZ;
  681. let l7 = t8;
  682. for (; u12 > 0 || l7 > 0 && x10; ) {
  683. let t9;
  684. u12 === 0 ? (t9 = x10, x10 = x10.nextZ, l7--) : l7 !== 0 && x10 ? r12.z <= x10.z ? (t9 = r12, r12 = r12.nextZ, u12--) : (t9 = x10, x10 = x10.nextZ, l7--) : (t9 = r12, r12 = r12.nextZ, u12--), n10 ? n10.nextZ = t9 : e12 = t9, t9.prevZ = n10, n10 = t9;
  685. }
  686. r12 = x10;
  687. }
  688. if (n10.nextZ = null, t8 *= 2, i10 < 2)
  689. return e12;
  690. }
  691. }
  692. function s8(e12, n10, t8) {
  693. return (n10.y - e12.y) * (t8.x - n10.x) - (n10.x - e12.x) * (t8.y - n10.y);
  694. }
  695. function h2(e12, n10, t8, x10) {
  696. return !!(M2(e12, n10) && M2(t8, x10) || M2(e12, x10) && M2(t8, n10)) || s8(e12, n10, t8) > 0 != s8(e12, n10, x10) > 0 && s8(t8, x10, e12) > 0 != s8(t8, x10, n10) > 0;
  697. }
  698. function d3(e12, n10) {
  699. let t8 = e12;
  700. do {
  701. if (t8.index !== e12.index && t8.next.index !== e12.index && t8.index !== n10.index && t8.next.index !== n10.index && h2(t8, t8.next, e12, n10))
  702. return true;
  703. t8 = t8.next;
  704. } while (t8 !== e12);
  705. return false;
  706. }
  707. function Z2(e12, n10, t8, x10, r12, i10) {
  708. let u12 = 0;
  709. for (let l7 = x10, o12 = r12 - i10; l7 < r12; l7 += i10)
  710. u12 += (e12[o12 + n10 * i10] - e12[l7 + n10 * i10]) * (e12[l7 + 1 + n10 * i10] + e12[o12 + 1 + n10 * i10]), o12 = l7;
  711. return u12;
  712. }
  713. function a4(e12, n10, t8, x10, r12, i10, u12, l7) {
  714. return (r12 - u12) * (n10 - l7) - (e12 - u12) * (i10 - l7) >= 0 && (e12 - u12) * (x10 - l7) - (t8 - u12) * (n10 - l7) >= 0 && (t8 - u12) * (i10 - l7) - (r12 - u12) * (x10 - l7) >= 0;
  715. }
  716. function w4(e12, n10) {
  717. return s8(e12.prev, e12, e12.next) < 0 ? s8(e12, n10, e12.next) >= 0 && s8(e12, e12.prev, n10) >= 0 : s8(e12, n10, e12.prev) < 0 || s8(e12, e12.next, n10) < 0;
  718. }
  719. function z2(e12, n10, t8, x10, r12) {
  720. return (e12 = 1431655765 & ((e12 = 858993459 & ((e12 = 252645135 & ((e12 = 16711935 & ((e12 = 32767 * (e12 - t8) * r12) | e12 << 8)) | e12 << 4)) | e12 << 2)) | e12 << 1)) | (n10 = 1431655765 & ((n10 = 858993459 & ((n10 = 252645135 & ((n10 = 16711935 & ((n10 = 32767 * (n10 - x10) * r12) | n10 << 8)) | n10 << 4)) | n10 << 2)) | n10 << 1)) << 1;
  721. }
  722. function M2(e12, n10) {
  723. return e12.x === n10.x && e12.y === n10.y;
  724. }
  725. function m2(e12, n10) {
  726. return e12.x - n10.x;
  727. }
  728. function b2(e12, n10, t8, x10) {
  729. let r12 = e12;
  730. do {
  731. const i10 = r12.prev, u12 = r12.next.next;
  732. !M2(i10, u12) && h2(i10, r12, r12.next, u12) && w4(i10, u12) && w4(u12, i10) && (n10.push(i10.index / t8 + x10), n10.push(r12.index / t8 + x10), n10.push(u12.index / t8 + x10), l3(r12), l3(r12.next), r12 = e12 = u12), r12 = r12.next;
  733. } while (r12 !== e12);
  734. return r12;
  735. }
  736. function g4(e12, n10, r12, i10, u12, l7, o12) {
  737. let y8 = e12;
  738. do {
  739. let e13 = y8.next.next;
  740. for (; e13 !== y8.prev; ) {
  741. if (y8.index !== e13.index && k2(y8, e13)) {
  742. let f14 = j3(y8, e13);
  743. return y8 = t7(y8, y8.next), f14 = t7(f14, f14.next), x4(y8, n10, r12, i10, u12, l7, o12, 0), void x4(f14, n10, r12, i10, u12, l7, o12, 0);
  744. }
  745. e13 = e13.next;
  746. }
  747. y8 = y8.next;
  748. } while (y8 !== e12);
  749. }
  750. function k2(e12, n10) {
  751. return e12.next.index !== n10.index && e12.prev.index !== n10.index && !d3(e12, n10) && w4(e12, n10) && w4(n10, e12) && A(e12, n10);
  752. }
  753. function A(e12, n10) {
  754. let t8 = e12, x10 = false;
  755. const r12 = (e12.x + n10.x) / 2, i10 = (e12.y + n10.y) / 2;
  756. do {
  757. t8.y > i10 != t8.next.y > i10 && t8.next.y !== t8.y && r12 < (t8.next.x - t8.x) * (i10 - t8.y) / (t8.next.y - t8.y) + t8.x && (x10 = !x10), t8 = t8.next;
  758. } while (t8 !== e12);
  759. return x10;
  760. }
  761. function j3(e12, n10) {
  762. const t8 = q.create(e12.index, e12.x, e12.y), x10 = q.create(n10.index, n10.x, n10.y), r12 = e12.next, i10 = n10.prev;
  763. return e12.next = n10, n10.prev = e12, t8.next = r12, r12.prev = t8, x10.next = t8, t8.prev = x10, i10.next = x10, x10.prev = i10, x10;
  764. }
  765. var q = class {
  766. constructor() {
  767. this.index = 0, this.x = 0, this.y = 0, this.prev = null, this.next = null, this.z = null, this.prevZ = null, this.nextZ = null, this.steiner = false;
  768. }
  769. static create(e12, n10, t8) {
  770. const x10 = D2 < B.length ? B[D2++] : new q();
  771. return x10.index = e12, x10.x = n10, x10.y = t8, x10.prev = null, x10.next = null, x10.z = null, x10.prevZ = null, x10.nextZ = null, x10.steiner = false, x10;
  772. }
  773. };
  774. var B = new Array();
  775. var C2 = 8096;
  776. var D2 = 0;
  777. for (let E4 = 0; E4 < C2; E4++)
  778. B.push(new q());
  779. // node_modules/@arcgis/core/views/2d/engine/webgl/mesh/templates/templateUtils.js
  780. var f9 = 1e-5;
  781. var c7 = new n5(0, 0, 0, 1, 0);
  782. var u5 = new n5(0, 0, 0, 1, 0);
  783. function h3(t8, e12, n10) {
  784. let o12 = 0;
  785. for (let r12 = 1; r12 < n10; r12++) {
  786. const n11 = t8[2 * (e12 + r12 - 1)], s10 = t8[2 * (e12 + r12 - 1) + 1];
  787. o12 += (t8[2 * (e12 + r12)] - n11) * (t8[2 * (e12 + r12) + 1] + s10);
  788. }
  789. return o12;
  790. }
  791. function a5(t8, e12, n10, o12, r12) {
  792. let s10 = 0;
  793. const l7 = 2;
  794. for (let i10 = n10; i10 < o12; i10 += 3) {
  795. const n11 = (t8[i10] - r12) * l7, o13 = (t8[i10 + 1] - r12) * l7, f14 = (t8[i10 + 2] - r12) * l7;
  796. s10 += Math.abs((e12[n11] - e12[f14]) * (e12[o13 + 1] - e12[n11 + 1]) - (e12[n11] - e12[o13]) * (e12[f14 + 1] - e12[n11 + 1]));
  797. }
  798. return s10;
  799. }
  800. function m3(t8, e12) {
  801. const { coords: n10, lengths: o12, hasIndeterminateRingOrder: r12 } = e12, s10 = 0, l7 = t8;
  802. if (r12)
  803. return false;
  804. let c10 = 0;
  805. for (let u12 = 0; u12 < o12.length; ) {
  806. let t9 = u12, e13 = o12[u12], r13 = h3(n10, c10, e13);
  807. const g9 = [];
  808. for (; ++t9 < o12.length; ) {
  809. const s11 = o12[t9], l8 = h3(n10, c10 + e13, s11);
  810. if (!(l8 > 0))
  811. break;
  812. r13 += l8, g9.push(c10 + e13), e13 += s11;
  813. }
  814. const m6 = l7.length;
  815. e9(l7, n10, c10, c10 + e13, g9, 2, s10);
  816. const p8 = a5(l7, n10, m6, l7.length, s10), d8 = Math.abs(r13);
  817. if (Math.abs((p8 - d8) / Math.max(1e-7, d8)) > f9)
  818. return l7.length = 0, false;
  819. u12 = t9, c10 += e13;
  820. }
  821. return true;
  822. }
  823. function d4(t8) {
  824. const { coords: e12, lengths: o12 } = t8, { buffer: r12 } = a(e12, o12);
  825. return r12;
  826. }
  827. function b3(t8, e12, n10) {
  828. let o12 = 0;
  829. for (let r12 = 0; r12 < t8.lengths.length; r12++) {
  830. const s10 = t8.lengths[r12];
  831. for (let r13 = 0; r13 < s10; r13++) {
  832. const s11 = t8.coords[2 * (r13 + o12)], l7 = t8.coords[2 * (r13 + o12) + 1];
  833. if (s11 < e12 || s11 > n10 || l7 < e12 || l7 > n10)
  834. return true;
  835. }
  836. o12 += s10;
  837. }
  838. return false;
  839. }
  840. function x6(e12, n10) {
  841. if (t(e12))
  842. return null;
  843. if (!b3(e12, -128, o4 + 128))
  844. return e12;
  845. c7.setPixelMargin(n10), c7.reset(s6.Polygon);
  846. let l7 = 0;
  847. for (let t8 = 0; t8 < e12.lengths.length; t8++) {
  848. const n11 = e12.lengths[t8];
  849. let o12 = e12.coords[2 * (0 + l7)], r12 = e12.coords[2 * (0 + l7) + 1];
  850. c7.moveTo(o12, r12);
  851. for (let t9 = 1; t9 < n11; t9++)
  852. o12 = e12.coords[2 * (t9 + l7)], r12 = e12.coords[2 * (t9 + l7) + 1], c7.lineTo(o12, r12);
  853. c7.close(), l7 += n11;
  854. }
  855. const i10 = c7.result(false);
  856. if (!i10)
  857. return null;
  858. const f14 = [], u12 = [];
  859. for (const t8 of i10) {
  860. let e13 = 0;
  861. for (const n11 of t8)
  862. u12.push(n11.x), u12.push(n11.y), e13++;
  863. f14.push(e13);
  864. }
  865. return new t2(f14, u12);
  866. }
  867. function y4(t8, e12) {
  868. u5.setPixelMargin(e12);
  869. const n10 = u5, o12 = -e12, l7 = o4 + e12;
  870. let i10 = [], f14 = false, c10 = 0;
  871. for (; c10 < t8.length; ) {
  872. const e13 = [], r12 = t8[c10];
  873. if (!r12)
  874. return null;
  875. n10.reset(s6.LineString);
  876. let [u12, h6] = r12[0];
  877. if (f14)
  878. n10.moveTo(u12, h6);
  879. else {
  880. if (u12 < o12 || u12 > l7 || h6 < o12 || h6 > l7) {
  881. f14 = true;
  882. continue;
  883. }
  884. e13.push({ x: u12, y: h6 });
  885. }
  886. let a7 = false;
  887. const g9 = r12.length;
  888. for (let t9 = 1; t9 < g9; ++t9)
  889. if (u12 += r12[t9][0], h6 += r12[t9][1], f14)
  890. n10.lineTo(u12, h6);
  891. else {
  892. if (u12 < o12 || u12 > l7 || h6 < o12 || h6 > l7) {
  893. a7 = true;
  894. break;
  895. }
  896. e13.push({ x: u12, y: h6 });
  897. }
  898. if (a7)
  899. f14 = true;
  900. else {
  901. if (f14) {
  902. const t9 = n10.resultWithStarts();
  903. if (t9)
  904. for (const e14 of t9)
  905. i10.push(e14);
  906. } else
  907. i10.push({ line: e13, start: 0 });
  908. c10++, f14 = false;
  909. }
  910. }
  911. return i10 = i10.filter((t9) => t9.line.length > 1), i10.length === 0 ? null : i10;
  912. }
  913. c7.setExtent(o4), u5.setExtent(o4);
  914. // node_modules/@arcgis/core/views/2d/engine/webgl/mesh/templates/WGLBaseLineTemplate.js
  915. var m4 = 8;
  916. var x7 = 16;
  917. var p5 = 65535;
  918. var f10 = (r12) => class extends r12 {
  919. constructor(...e12) {
  920. super(...e12), this.tessellationProperties = {}, this._tessellationOptions = { halfWidth: 0, pixelCoordRatio: 1, offset: 0 }, this.geometryType = E.LINE;
  921. }
  922. writeGeometry(e12, t8, i10, r13) {
  923. this._writeGeometry(e12, t8, i10, r13);
  924. }
  925. _initializeTessellator(e12) {
  926. const i10 = C.load(this._materialKey), r13 = w2.load(this._materialKey), s10 = this._tessellationOptions, h6 = i10.vvSizeFieldStops || i10.vvSizeMinMaxValue || i10.vvSizeScaleStops || i10.vvSizeUnitValue, d8 = this.tessellationProperties._halfWidth < X && !e12 && !h6;
  927. this.tessellationProperties.minMaxZoom = this._minMaxZoom, s10.wrapDistance = p5, s10.textured = this._isDashed || this._hasPattern, s10.offset = this.tessellationProperties.offset, s10.halfWidth = this.tessellationProperties._halfWidth;
  928. const m6 = d8 ? 0 : 1, x10 = O(r13) ? v3 : _2;
  929. this._lineTessellator = new d(x10(this.tessellationProperties, m6, m6), u6(this.tessellationProperties), d8);
  930. }
  931. _write(e12, t8, i10, r13) {
  932. const s10 = t8.geometryType === "esriGeometryPoint";
  933. e12.recordStart(t8.getDisplayId(), this._materialKey, this.geometryType, s10), this._writeGeometry(e12, t8, r13, s10), e12.recordEnd();
  934. }
  935. _writeGeometry(t8, i10, r13, s10) {
  936. const o12 = r13 ?? i10.readLegacyGeometryForDisplay(), n10 = this._getLines(o12, s10);
  937. t(n10) || this._writeVertices(t8, i10, n10);
  938. }
  939. _getLines(t8, i10) {
  940. if (t(t8))
  941. return null;
  942. const r13 = t8.paths || t8.rings;
  943. if (t(r13))
  944. return null;
  945. return y4(r13, i10 ? 256 : 16);
  946. }
  947. _writeVertices(e12, t8, i10) {
  948. const r13 = t8.getDisplayId(), s10 = e12.vertexCount(), o12 = this.tessellationProperties, h6 = this._tessellationOptions;
  949. o12.out = e12, o12.id = r13, o12.indexCount = 0, o12.vertexCount = 0, o12.offset = s10, h6.capType = this._capType, h6.joinType = this._joinType;
  950. const d8 = w2.load(this._materialKey);
  951. this.tessellationProperties.key = O(d8) ? d8 : C.load(this._materialKey);
  952. for (const { line: n10, start: l7 } of i10)
  953. h6.initialDistance = l7 % p5, this._lineTessellator.tessellate(n10, h6);
  954. }
  955. };
  956. var _2 = (e12, t8, i10) => (o12, n10, l7, a7, h6, d8, p8, f14, _5, v5, u12) => {
  957. const c10 = w(u12, Math.ceil(x7 * e12._halfWidth)), y8 = x(Math.round(x7 * p8), Math.round(x7 * f14), Math.round(x7 * _5), Math.round(x7 * v5)), W = x(x7 * h6, x7 * d8, 0, e12._bitset), M7 = e12.out;
  958. return M7.vertexBounds(o12, n10, t8, i10), M7.vertexWrite(w(m4 * o12, m4 * n10)), M7.vertexWrite(e12.id), M7.vertexWrite(e12._fillColor), M7.vertexWrite(y8), M7.vertexWrite(c10), M7.vertexWrite(e12._tl), M7.vertexWrite(e12._br), M7.vertexWrite(W), M7.vertexWrite(w(Math.ceil(x7 * e12._halfReferenceWidth), 0)), M7.vertexWrite(e12.minMaxZoom), M7.vertexEnd(), e12.offset + e12.vertexCount++;
  959. };
  960. var v3 = (e12, t8, i10) => (o12, n10, l7, a7, d8, p8, f14, _5, v5, u12, c10) => {
  961. const y8 = w(x7 * e12._halfWidth, x7 * e12._halfReferenceWidth), W = x(x7 * f14 + 128, x7 * _5 + 128, x7 * v5 + 128, x7 * u12 + 128), M7 = e12.out, P5 = e12._bitset << 24 | e12.id;
  962. M7.vertexBounds(o12, n10, t8, i10), M7.vertexWrite(w(m4 * o12, m4 * n10)), M7.vertexWrite(P5), M7.vertexWrite(e12._fillColor);
  963. const T = b(e12.key);
  964. return T || (M7.vertexWrite(0), M7.vertexWrite(0)), M7.vertexWrite(0), M7.vertexWrite(y8), M7.vertexWrite(W), T || M7.vertexWrite(e12.minMaxZoom), M7.vertexEnd(), e12.offset + e12.vertexCount++;
  965. };
  966. var u6 = (e12) => (t8, i10, r12) => {
  967. const s10 = e12.out;
  968. s10.indexWrite(t8), s10.indexWrite(i10), s10.indexWrite(r12), e12.indexCount += 3;
  969. };
  970. // node_modules/@arcgis/core/views/2d/engine/webgl/mesh/templates/WGLMeshTemplate.js
  971. var r8 = class {
  972. bindFeature(e12, t8, r12) {
  973. }
  974. write(r12, s10, f14, i10) {
  975. if (t(this._effects) || this._effects?.length === 0)
  976. return this._write(r12, s10, i10);
  977. const c10 = f6.executeEffects(this._effects, s10.readLegacyGeometryForDisplay(), i10.geometryEngine);
  978. let o12 = f6.next(c10);
  979. for (; o12; )
  980. this._write(r12, s10, i10, o12), o12 = f6.next(c10);
  981. }
  982. _write(e12, t8, r12, s10) {
  983. }
  984. };
  985. // node_modules/@arcgis/core/views/2d/engine/webgl/mesh/templates/WGLLineTemplate.js
  986. var K = s.getLogger("esri.views.2d.engine.webgl.WGLLineTemplate");
  987. var P2 = class extends f10(r8) {
  988. constructor(e12, t8, i10, r12, s10, l7, p8, f14, d8, y8, S4, _5, j6, g9, w7, K2, P5, x10, b6, O3) {
  989. super();
  990. const T = C.load(e12);
  991. t8 && (T.sdf = t8.sdf, T.pattern = true, T.textureBinding = t8.textureBinding), this._capType = r12, this._joinType = s10, this._miterLimitCosine = e8(l7), this.tessellationProperties._fillColor = p8, this.tessellationProperties._tl = f14, this.tessellationProperties._br = d8, this._hasPattern = y8, this._isDashed = S4, this._zOrder = P5, this._effects = x10, this._minMaxZoom = w(Math.round(b6 * at), Math.round(O3 * at)), this._materialKey = T.data;
  992. const M7 = (j6 ? nt : 0) | (g9 ? mt : 0) | (_5 ? lt : 0) | (w7 ? gt : 0);
  993. this.tessellationProperties._bitset = M7, this.tessellationProperties._halfWidth = 0.5 * i10, this.tessellationProperties._halfReferenceWidth = 0.5 * K2, this.tessellationProperties.offset = 0, this._initializeTessellator(false);
  994. }
  995. static fromCIMLine(e12, r12, o12) {
  996. const n10 = e12.color, a7 = e12.scaleFactor || 1, m6 = !!e12.dashTemplate;
  997. let c10 = e12.cap;
  998. m6 && c10 === e3.ROUND && (c10 = e3.SQUARE);
  999. const p8 = e12.join, f14 = u(e12.width) * a7, u12 = u(e12.referenceWidth), d8 = u(e12.miterLimit), y8 = n10 && f3(n10) || 0, [L4, _5] = x3(e12.scaleInfo, o12), j6 = false;
  1000. if (!r12)
  1001. return new P2(e12.materialKey, r12, f14, c10, p8, d8, y8, 0, 0, false, m6, e12.scaleDash, e12.colorLocked, j6, e12.sampleAlphaOnly, u12, e12.zOrder, e12.effects, L4, _5);
  1002. const { rect: g9, width: w7, height: K2 } = r12, x10 = g9.x + et, b6 = g9.y + et, O3 = x10 + w7, T = b6 + K2, M7 = w(x10, b6), W = w(O3, T), z4 = false;
  1003. return new P2(e12.materialKey, r12, f14, c10, p8, d8, y8, M7, W, true, m6, e12.scaleDash, e12.colorLocked, z4, e12.sampleAlphaOnly, u12, e12.zOrder, e12.effects, L4, _5);
  1004. }
  1005. static fromFillOutline(e12) {
  1006. const t8 = w2.load(e12.materialKey);
  1007. return O(t8) && e12.outline && e12.outline?.style === "esriSLSSolid" ? P2.fromSimpleLine({ hash: "", materialKey: e12.materialKey, ...e12.outline }, null, true) : null;
  1008. }
  1009. static fromSimpleLine(e12, i10, s10 = false) {
  1010. const { color: o12 } = e12, n10 = e12.style !== "esriSLSSolid" && e12.style !== "esriSLSNull", a7 = ee(e12.cap || "round"), m6 = te2(e12.join || "round");
  1011. let c10 = o12 && e12.style !== "esriSLSNull" && s4(o12) || 0;
  1012. e12.style === "esriSLSNull" && (c10 = 0);
  1013. const u12 = u(e12.width), d8 = e12.miterLimit;
  1014. if (!i10)
  1015. return new P2(e12.materialKey, i10, u12, a7, m6, d8, c10, 0, 0, false, n10, true, false, s10, false, u12, 0, null, n7, o9);
  1016. const { rect: y8, width: L4, height: S4 } = i10, g9 = y8.x + et, w7 = y8.y + et, K2 = g9 + L4, x10 = w7 + S4, b6 = w(g9, w7), O3 = w(K2, x10);
  1017. return new P2(e12.materialKey, i10, u12, a7, m6, d8, c10, b6, O3, true, n10, true, false, s10, false, u12, 0, null, n7, o9);
  1018. }
  1019. static fromPictureLineSymbol(e12, t8, i10, r12) {
  1020. return K.error("PictureLineSymbol support does not exist!"), null;
  1021. }
  1022. };
  1023. // node_modules/@arcgis/core/views/2d/engine/webgl/mesh/templates/WGLBaseFillTemplate.js
  1024. var _3 = 100;
  1025. var f11 = 1;
  1026. var u7 = (u12) => class extends u12 {
  1027. constructor(...e12) {
  1028. super(...e12), this.forceLibtess = false, this._bitset = 0, this._lineTemplate = null, this.geometryType = E.FILL;
  1029. }
  1030. _maybeAddLineTemplate(e12) {
  1031. this._lineTemplate = P2.fromFillOutline(e12);
  1032. }
  1033. _write(t8, r12, i10, s10) {
  1034. const o12 = r12.geometryType === "esriGeometryPoint", m6 = w2.load(this._materialKey);
  1035. t8.recordStart(r12.getDisplayId(), this._materialKey, this.geometryType, o12), this._writeGeometry(t8, r12, m6, s10, o12), O(m6) && r(this._lineTemplate) && this._lineTemplate.writeGeometry(t8, r12, s10, o12), t8.recordEnd();
  1036. }
  1037. _writeGeometry(e12, r12, i10, s10, o12) {
  1038. const m6 = this._getGeometry(r12, s10, o12);
  1039. if (t(m6))
  1040. return;
  1041. const l7 = [];
  1042. if (!(m6.maxLength > _3) && !this.forceLibtess && m3(l7, m6))
  1043. return void (l7.length && this._writeVertices(e12, r12, m6.coords, m6.lengths, i10, l7));
  1044. const n10 = d4(m6);
  1045. this._writeVertices(e12, r12, n10, [n10.length / 2], i10);
  1046. }
  1047. _writeVertex(e12, t8, r12, i10, s10, l7) {
  1048. const n10 = w(f11 * i10, f11 * s10);
  1049. if (e12.vertexBounds(i10, s10, 0, 0), e12.vertexWrite(n10), e12.vertexWrite(t8), r12.symbologyType === S.DOT_DENSITY)
  1050. e12.vertexWriteF32(1 / Math.abs(l7.readGeometryArea()));
  1051. else {
  1052. e12.vertexWrite(this.fillColor);
  1053. const t9 = b(r12);
  1054. t9 || (e12.vertexWrite(this.tl), e12.vertexWrite(this.br)), e12.vertexWrite(this.aux2_1), e12.vertexWrite(this.aux2_2), e12.vertexWrite(this.aux3), t9 || e12.vertexWrite(this._minMaxZoom);
  1055. }
  1056. }
  1057. _writeVertices(e12, t8, r12, i10, s10, o12) {
  1058. const m6 = t8.getDisplayId(), n10 = this._bitset << 24 | m6, a7 = i10.reduce((e13, t9) => e13 + t9), h6 = G(s10.geometryType, s10.symbologyType).geometry / 4, y8 = e12.vertexCount();
  1059. e12.vertexEnsureSize(h6 * a7);
  1060. let p8 = 0;
  1061. if (o12)
  1062. for (const l7 of o12) {
  1063. const i11 = r12[2 * l7], o13 = r12[2 * l7 + 1];
  1064. this._writeVertex(e12, n10, s10, i11, o13, t8), p8++;
  1065. }
  1066. else
  1067. for (let l7 = 0; l7 < r12.length; l7 += 2) {
  1068. const i11 = Math.round(r12[l7]), o13 = Math.round(r12[l7 + 1]);
  1069. this._writeVertex(e12, n10, s10, i11, o13, t8), p8++;
  1070. }
  1071. e12.indexEnsureSize(p8);
  1072. for (let l7 = 0; l7 < p8; l7++)
  1073. e12.indexWrite(l7 + y8);
  1074. }
  1075. _getGeometry(e12, t8, s10) {
  1076. const o12 = t8 ? we(te(t8), 2) : e12.readGeometryForDisplay();
  1077. if (!o12)
  1078. return null;
  1079. return x6(o12, s10 ? 256 : 8);
  1080. }
  1081. };
  1082. // node_modules/@arcgis/core/views/2d/engine/webgl/mesh/templates/WGLDynamicMeshTemplate.js
  1083. var i9 = s.getLogger("esri.views.2d.engine.webgl.WGLDynamicMeshTemplate");
  1084. var r9 = class extends r8 {
  1085. constructor(e12) {
  1086. super(), this._ongoingMaterialRequestMap = new Map(), this._materialCache = new Map(), this._dynamicPropertyMap = new Map(), this._cimLayer = e12;
  1087. }
  1088. analyze(e12, s10, r12, n10, o12) {
  1089. if (o12 && o12.length === 0)
  1090. return null;
  1091. const l7 = o12 && o12.length > 0, m6 = s10.readLegacyFeature(), c10 = s10.getObjectId(), h6 = this._materialCache, u12 = this._cimLayer.materialHash;
  1092. if (!u12)
  1093. return i9.error("A Dynamic mesh template must have a material hash value or function!"), Promise.reject(null);
  1094. const p8 = typeof u12 == "function" ? u12(m6, r12, n10, c10) : u12;
  1095. if (h6.has(p8)) {
  1096. const e13 = h6.get(p8);
  1097. return Promise.resolve(e13);
  1098. }
  1099. const g9 = this._ongoingMaterialRequestMap.get(p8);
  1100. if (g9)
  1101. return g9;
  1102. const y8 = this._cimLayer, M7 = se(y8.cim, this._cimLayer.materialOverrides);
  1103. M7.mosaicHash = p8;
  1104. const { type: d8, url: f14 } = y8, _5 = { cim: M7, type: d8, mosaicHash: p8, url: f14, size: null, dashTemplate: null, text: null, fontName: null, objectId: c10, animatedSymbolProperties: null };
  1105. switch (d8) {
  1106. case "marker":
  1107. _5.size = e5(y8.size, m6, r12, n10), _5.animatedSymbolProperties = e5(y8.animatedSymbolProperties, m6, r12, n10);
  1108. break;
  1109. case "line":
  1110. _5.dashTemplate = y8.dashTemplate;
  1111. break;
  1112. case "text":
  1113. _5.text = e5(y8.text, m6, r12, n10), _5.fontName = e5(y8.fontName, m6, r12, n10);
  1114. }
  1115. const b6 = e12.getMosaicItem(_5, o12).then((e13) => (l7 || (this._ongoingMaterialRequestMap.delete(p8), h6.set(p8, e13)), e13)).catch((e13) => (this._ongoingMaterialRequestMap.delete(p8), i9.error(".analyze()", e13.message), null));
  1116. return l7 || this._ongoingMaterialRequestMap.set(p8, b6), b6;
  1117. }
  1118. };
  1119. // node_modules/@arcgis/core/views/2d/engine/webgl/util/Result.js
  1120. function e10(e12, n10) {
  1121. if (e12 && "name" in e12) {
  1122. const o12 = e12;
  1123. return n10 && n10.error(new s2(o12.name, o12.message, o12.details)), false;
  1124. }
  1125. return true;
  1126. }
  1127. // node_modules/@arcgis/core/views/2d/engine/webgl/mesh/templates/WGLDynamicFillTemplate.js
  1128. var u8 = class extends u7(r9) {
  1129. constructor(l7, c10, p8) {
  1130. if (super(l7), this._minMaxZoom = w(Math.round(c10 * at), Math.round(p8 * at)), c5(l7.color)) {
  1131. const t8 = (t9, e12, i10) => {
  1132. const o12 = l7.color(t9, e12, i10);
  1133. return o12 && f3(o12) || 0;
  1134. };
  1135. this._dynamicPropertyMap.set("fillColor", t8);
  1136. } else {
  1137. const t8 = l7.color;
  1138. this.fillColor = t8 && f3(t8) || 0;
  1139. }
  1140. const _5 = l7.cim.placement?.type === "CIMMarkerPlacementInsidePolygon" && l7.cim.placement.shiftOddRows ? 2 : 1, y8 = l7.height;
  1141. if (c5(y8)) {
  1142. const t8 = (t9, e12, s10) => y8(t9, e12, s10) * _5;
  1143. this._dynamicPropertyMap.set("_height", t8);
  1144. } else
  1145. this._height = (y8 || 0) * _5;
  1146. const d8 = l7.offsetX;
  1147. if (c5(d8)) {
  1148. const t8 = (t9, s10, i10) => u(d8(t9, s10, i10));
  1149. this._dynamicPropertyMap.set("_offsetX", t8);
  1150. } else
  1151. this._offsetX = u(d8 || 0);
  1152. const u12 = l7.offsetY;
  1153. if (c5(u12)) {
  1154. const t8 = (t9, s10, i10) => u(-u12(t9, s10, i10));
  1155. this._dynamicPropertyMap.set("_offsetY", t8);
  1156. } else
  1157. this._offsetY = u(-u12 || 0);
  1158. const M7 = l7.scaleX;
  1159. c5(M7) ? this._dynamicPropertyMap.set("_scaleX", M7) : this._scaleX = M7 || 1;
  1160. const g9 = l7.angle;
  1161. if (c5(g9)) {
  1162. const t8 = (t9, e12, s10) => h(g9(t9, e12, s10));
  1163. this._dynamicPropertyMap.set("_angle", t8);
  1164. } else
  1165. this._angle = h(g9) || 0;
  1166. if (r(l7.effects)) {
  1167. const t8 = l7.effects;
  1168. c5(t8) ? this._dynamicPropertyMap.set("_effects", t8) : this._effects = t8;
  1169. }
  1170. this._cimFillLayer = l7, this._bitset = (l7.colorLocked ? nt : 0) | (l7.applyRandomOffset ? vt : 0) | (l7.sampleAlphaOnly ? gt : 0), this._fillMaterialKey = w2.load(l7.materialKey);
  1171. }
  1172. static fromCIMFill(t8, e12) {
  1173. const [s10, i10] = x3(t8.scaleInfo, e12);
  1174. return new u8(t8, s10, i10);
  1175. }
  1176. bindFeature(t8, s10, i10) {
  1177. const o12 = t8.readLegacyFeature();
  1178. this._dynamicPropertyMap.forEach((t9, e12) => {
  1179. this[e12] = t9(o12, s10, i10);
  1180. });
  1181. const r12 = this._fillMaterialKey, a7 = this._materialCache, h6 = (0, this._cimFillLayer.materialHash)(o12, s10, i10), f14 = a7.get(h6);
  1182. let m6 = null;
  1183. if (f14 && e10(f14.spriteMosaicItem) && (m6 = f14.spriteMosaicItem), m6) {
  1184. const { rect: t9, width: s11, height: i11 } = m6, o13 = t9.x + et, a8 = t9.y + et, h7 = o13 + s11, f15 = a8 + i11;
  1185. let p8 = Math.round(u(this._height));
  1186. p8 <= 0 && (p8 = f15 - a8);
  1187. let _5 = Math.round(u(this._height / i11 * s11 || 0));
  1188. _5 <= 0 && (_5 = h7 - o13);
  1189. const y8 = this._scaleX, d8 = 1;
  1190. this.tl = w(o13, a8), this.br = w(h7, f15), this.aux2_1 = w(_5, p8), this.aux2_2 = w(this._offsetX, this._offsetY), this.aux3 = x(y8, d8, this._angle, 0), r12.sdf = m6.sdf, r12.pattern = true, r12.textureBinding = m6.textureBinding;
  1191. } else
  1192. this.tl = 0, this.br = 0, this.aux2_1 = 0, this.aux2_2 = 0, this.aux3 = 0, r12.sdf = false, r12.pattern = false, r12.textureBinding = 0;
  1193. this._materialKey = r12.data;
  1194. }
  1195. };
  1196. // node_modules/@arcgis/core/views/2d/engine/webgl/mesh/templates/WGLDynamicLineTemplate.js
  1197. var y5 = class extends f10(r9) {
  1198. constructor(l7, n10, p8) {
  1199. super(l7), this._minMaxZoom = w(Math.round(n10 * at), Math.round(p8 * at)), this._cimLineLayer = l7;
  1200. let _5 = 0;
  1201. c5(l7.width) || (_5 = 0.5 * u(l7.width));
  1202. const f14 = (t8, i10, s10) => c5(l7.width) ? 0.5 * u(l7.width(t8, i10, s10)) : _5;
  1203. this._dynamicPropertyMap.set("_halfWidth", f14), c5(l7.cap) ? this._dynamicPropertyMap.set("_capType", l7.cap) : this._capType = l7.cap, c5(l7.join) ? this._dynamicPropertyMap.set("_joinType", l7.join) : this._joinType = l7.join;
  1204. const d8 = l7.color;
  1205. if (c5(d8)) {
  1206. const t8 = (t9, e12, s10) => f3(d8(t9, e12, s10));
  1207. this._dynamicPropertyMap.set("_fillColor", t8);
  1208. } else
  1209. this._fillColor = d8 && f3(d8) || 0;
  1210. const y8 = l7.miterLimit;
  1211. if (c5(y8)) {
  1212. const t8 = (t9, e12, i10) => e8(y8(t9, e12, i10));
  1213. this._dynamicPropertyMap.set("_miterLimitCosine", t8);
  1214. } else
  1215. this._miterLimitCosine = e8(y8);
  1216. if (r(l7.effects)) {
  1217. const t8 = l7.effects;
  1218. c5(t8) ? this._dynamicPropertyMap.set("_effects", t8) : this._effects = t8;
  1219. }
  1220. this._scaleFactor = l7.scaleFactor || 1, this._isDashed = l7.dashTemplate != null;
  1221. const P5 = l7.colorLocked ? nt : 0, u12 = l7.scaleDash ? lt : 0, j6 = l7.sampleAlphaOnly ? gt : 0;
  1222. this.tessellationProperties._bitset = P5 | u12 | j6, this._materialKey = l7.materialKey, this._initializeTessellator(true);
  1223. }
  1224. static fromCIMLine(t8, e12) {
  1225. const [i10, s10] = x3(t8.scaleInfo, e12);
  1226. return new y5(t8, i10, s10);
  1227. }
  1228. bindFeature(t8, e12, i10) {
  1229. const s10 = t8.readLegacyFeature();
  1230. this._dynamicPropertyMap.forEach((t9, r13) => {
  1231. this[r13] = t9(s10, e12, i10);
  1232. }), this._halfWidth *= this._scaleFactor;
  1233. const r12 = this._materialCache, o12 = (0, this._cimLineLayer.materialHash)(s10, e12, i10), a7 = r12.get(o12);
  1234. let c10 = null;
  1235. if (a7 && e10(a7.spriteMosaicItem) && (c10 = a7.spriteMosaicItem), c10) {
  1236. this._hasPattern = true;
  1237. const { rect: t9, width: e13, height: i11 } = c10, s11 = t9.x + et, r13 = t9.y + et, o13 = s11 + e13, a8 = r13 + i11;
  1238. this.tessellationProperties._tl = w(s11, r13), this.tessellationProperties._br = w(o13, a8);
  1239. } else
  1240. this._hasPattern = false, this.tessellationProperties._tl = 0, this.tessellationProperties._br = 0;
  1241. this.tessellationProperties._fillColor = this._fillColor, this.tessellationProperties._halfWidth = this._halfWidth, this.tessellationProperties.offset = 0, this.tessellationProperties._halfReferenceWidth = this.tessellationProperties._halfWidth;
  1242. const m6 = C.load(this._materialKey);
  1243. c10 && (m6.sdf = c10.sdf, m6.pattern = true, m6.textureBinding = c10.textureBinding), this._materialKey = m6.data;
  1244. }
  1245. };
  1246. // node_modules/@arcgis/core/symbols/cim/placements/CIMMarkerPlacementHelper.js
  1247. var e11 = class {
  1248. static getPlacement(e12, o12, s10, c10) {
  1249. const n10 = g2(o12);
  1250. if (!n10)
  1251. return null;
  1252. const m6 = a3(e12);
  1253. return n10.execute(m6, o12, s10, c10);
  1254. }
  1255. };
  1256. // node_modules/@arcgis/core/views/2d/engine/webgl/mesh/templates/WGLBaseMarkerTemplate.js
  1257. var g5 = 3.14159265359 / 180;
  1258. var y6 = 8;
  1259. var u9 = (u12) => class extends u12 {
  1260. constructor(...t8) {
  1261. super(...t8), this.angle = 0, this.xOffset = 0, this.yOffset = 0, this.width = 0, this.height = 0, this.boundsType = "square", this._anchorX = 0, this._anchorY = 0, this._computedWidth = 0, this._computedHeight = 0, this._vertexBoundsScaleX = 1, this._vertexBoundsScaleY = 1, this._offsets = { xUpperLeft: 0, yUpperLeft: 0, xUpperRight: 0, yUpperRight: 0, xBottomLeft: 0, yBottomLeft: 0, xBottomRight: 0, yBottomRight: 0 }, this.geometryType = E.MARKER;
  1262. }
  1263. _write(t8, e12, i10, r12) {
  1264. const s10 = e12.getDisplayId();
  1265. t8.recordStart(s10, this._materialKey, this.geometryType, true), this._writeGeometry(t8, e12, s10, i10, r12), t8.recordEnd();
  1266. }
  1267. _writeGeometry(i10, r12, s10, o12, h6) {
  1268. if (r(this._markerPlacement))
  1269. return this._writePlacedMarkers(i10, r12, o12, h6);
  1270. if (!h6 && r12.geometryType === "esriGeometryPoint") {
  1271. const t8 = r12.getX(), e12 = r12.getY();
  1272. if (!i10.hasAggregates && i10.hasPixelBufferEnabled && (t8 < 0 || t8 >= 513 || e12 < 0 || e12 >= 513))
  1273. return;
  1274. return this._writeVertices(i10, s10, this._getPos(t8, e12), t8, e12);
  1275. }
  1276. const f14 = h6 ? we(te(h6), 2) : r12.geometryType === "esriGeometryPolygon" ? r12.readCentroid() : r12.readGeometryForDisplay();
  1277. if (!t(f14)) {
  1278. if (f14.isPoint) {
  1279. const [t8, e12] = f14.coords;
  1280. if (!i10.hasAggregates && i10.hasPixelBufferEnabled && (t8 < 0 || t8 >= 512 || e12 < 0 || e12 >= 512))
  1281. return;
  1282. return this._writeVertices(i10, s10, this._getPos(t8, e12), t8, e12);
  1283. }
  1284. f14.forEachVertex((t8, e12) => {
  1285. const r13 = 2 * o4;
  1286. t8 < -r13 || t8 >= r13 || e12 < -r13 || e12 >= r13 || this._writeVertices(i10, s10, this._getPos(t8, e12), t8, e12);
  1287. });
  1288. }
  1289. }
  1290. _writePlacedMarkers(t8, e12, s10, o12) {
  1291. const f14 = o12 ?? e12.readLegacyGeometryForDisplay(), n10 = e11.getPlacement(f14, e(this._markerPlacement), u(1), s10.geometryEngine);
  1292. if (!n10)
  1293. return;
  1294. const x10 = e12.getDisplayId(), m6 = n4(), _5 = n3(), c10 = -128, v5 = 640;
  1295. let l7 = n10.next();
  1296. for (; l7 != null; ) {
  1297. const e13 = l7.tx, i10 = -l7.ty;
  1298. e13 >= c10 && e13 <= v5 && i10 >= c10 && i10 <= v5 && (this._applyTransformation(_5, m6, -l7.getAngle() / g5), this._writeVertices(t8, x10, this._getPos(e13, i10), e13, i10)), l7 = n10.next();
  1299. }
  1300. }
  1301. _writeVertices(t8, e12, i10, r12, s10) {
  1302. const o12 = N.load(this._materialKey);
  1303. return o12.symbologyType === S.HEATMAP ? this._writeHeatmapVertices(t8, e12, i10, r12, s10) : this._writeMarkerVertices(t8, e12, o12, i10, r12, s10);
  1304. }
  1305. _writeMarkerVertices(t8, e12, i10, r12, s10, o12) {
  1306. const h6 = i10.vvRotation, f14 = t8.vertexCount();
  1307. let n10 = this._computedWidth * this._vertexBoundsScaleX, x10 = this._computedHeight * this._vertexBoundsScaleY;
  1308. if (this.angle) {
  1309. const t9 = Math.max(n10, x10);
  1310. n10 = t9, x10 = t9;
  1311. }
  1312. if (h6) {
  1313. const t9 = Math.max(this.xOffset, this.yOffset);
  1314. n10 += t9, x10 += t9;
  1315. }
  1316. t8.vertexBounds(s10 + this.xOffset, o12 - this.yOffset, n10, x10), t8.vertexWrite(r12), t8.vertexWrite(this._offsetUpperLeft), t8.vertexWrite(this._texUpperLeft), t8.vertexWrite(this._bitestAndDistRatio), t8.vertexWrite(e12), t8.vertexWrite(this._fillColor), t8.vertexWrite(this._outlineColor), t8.vertexWrite(this._sizeOutlineWidth), t8.vertexWrite(this._minMaxZoom), t8.vertexEnd(), t8.vertexWrite(r12), t8.vertexWrite(this._offsetUpperRight), t8.vertexWrite(this._texUpperRight), t8.vertexWrite(this._bitestAndDistRatio), t8.vertexWrite(e12), t8.vertexWrite(this._fillColor), t8.vertexWrite(this._outlineColor), t8.vertexWrite(this._sizeOutlineWidth), t8.vertexWrite(this._minMaxZoom), t8.vertexEnd(), t8.vertexWrite(r12), t8.vertexWrite(this._offsetBottomLeft), t8.vertexWrite(this._texBottomLeft), t8.vertexWrite(this._bitestAndDistRatio), t8.vertexWrite(e12), t8.vertexWrite(this._fillColor), t8.vertexWrite(this._outlineColor), t8.vertexWrite(this._sizeOutlineWidth), t8.vertexWrite(this._minMaxZoom), t8.vertexEnd(), t8.vertexWrite(r12), t8.vertexWrite(this._offsetBottomRight), t8.vertexWrite(this._texBottomRight), t8.vertexWrite(this._bitestAndDistRatio), t8.vertexWrite(e12), t8.vertexWrite(this._fillColor), t8.vertexWrite(this._outlineColor), t8.vertexWrite(this._sizeOutlineWidth), t8.vertexWrite(this._minMaxZoom), t8.vertexEnd(), this._writeIndices(t8, f14);
  1317. }
  1318. _writeHeatmapVertices(t8, e12, i10, r12, s10) {
  1319. const o12 = t8.vertexCount();
  1320. t8.vertexBounds(r12 + this.xOffset, s10 - this.yOffset, this.width, this.height), t8.vertexWrite(i10), t8.vertexWrite(this._offsetUpperLeft), t8.vertexWrite(e12), t8.vertexEnd(), t8.vertexWrite(i10), t8.vertexWrite(this._offsetUpperRight), t8.vertexWrite(e12), t8.vertexEnd(), t8.vertexWrite(i10), t8.vertexWrite(this._offsetBottomLeft), t8.vertexWrite(e12), t8.vertexEnd(), t8.vertexWrite(i10), t8.vertexWrite(this._offsetBottomRight), t8.vertexWrite(e12), t8.vertexEnd(), this._writeIndices(t8, o12);
  1321. }
  1322. _writeIndices(t8, e12) {
  1323. t8.indexWrite(e12 + 0), t8.indexWrite(e12 + 1), t8.indexWrite(e12 + 2), t8.indexWrite(e12 + 1), t8.indexWrite(e12 + 3), t8.indexWrite(e12 + 2);
  1324. }
  1325. _applyTransformation(t8, e12, i10 = 0) {
  1326. f5(t8, t3(this.xOffset, -this.yOffset)), this.angle + i10 !== 0 && e4(t8, t8, g5 * (this.angle + i10));
  1327. const r12 = this._computedWidth, h6 = this._computedHeight, a7 = (this._anchorX - 0.5) * r12, m6 = (this._anchorY - 0.5) * h6;
  1328. r3(e12, a7, m6), z(e12, e12, t8), this._offsetUpperLeft = w(16 * e12[0], 16 * e12[1]), this._offsets.xUpperLeft = e12[0], this._offsets.yUpperLeft = e12[1], r3(e12, a7 + r12, m6), z(e12, e12, t8), this._offsetUpperRight = w(16 * e12[0], 16 * e12[1]), this._offsets.xUpperRight = e12[0], this._offsets.yUpperRight = e12[1], r3(e12, a7, m6 + h6), z(e12, e12, t8), this._offsetBottomLeft = w(16 * e12[0], 16 * e12[1]), this._offsets.xBottomLeft = e12[0], this._offsets.yBottomLeft = e12[1], r3(e12, a7 + r12, m6 + h6), z(e12, e12, t8), this._offsetBottomRight = w(16 * e12[0], 16 * e12[1]), this._offsets.xBottomRight = e12[0], this._offsets.yBottomRight = e12[1];
  1329. }
  1330. _getPos(t8, e12) {
  1331. return w(Math.round(y6 * t8), Math.round(y6 * e12));
  1332. }
  1333. };
  1334. // node_modules/@arcgis/core/views/2d/engine/webgl/mesh/templates/WGLDynamicMarkerTemplate.js
  1335. var g6 = n4();
  1336. var k3 = n3();
  1337. var P3 = s.getLogger("esri.views.2d.engine.webgl.WGLDynamicMarkerTemplate");
  1338. var L = class extends u9(r9) {
  1339. constructor(t8, e12, o12) {
  1340. super(t8), this._cimMarkerLayer = t8, this._minMaxZoom = w(Math.round(e12 * at), Math.round(o12 * at));
  1341. const a7 = t8.color;
  1342. if (c5(a7)) {
  1343. const t9 = (t10, e13, i10) => f3(a7(t10, e13, i10));
  1344. this._dynamicPropertyMap.set("_fillColor", t9);
  1345. } else
  1346. this._fillColor = f3(a7);
  1347. const m6 = t8.outlineColor;
  1348. if (c5(m6)) {
  1349. const t9 = (t10, e13, i10) => f3(m6(t10, e13, i10));
  1350. this._dynamicPropertyMap.set("_outlineColor", t9);
  1351. } else
  1352. this._outlineColor = f3(m6);
  1353. const f14 = t8.size;
  1354. if (c5(f14)) {
  1355. const t9 = (t10, e13, i10) => u(f14(t10, e13, i10));
  1356. this._dynamicPropertyMap.set("_size", t9);
  1357. } else
  1358. this._size = u(f14) || 0;
  1359. const _5 = t8.scaleX;
  1360. c5(_5) ? this._dynamicPropertyMap.set("_scaleX", _5) : this._scaleX = _5 || 1;
  1361. const y8 = t8.offsetX;
  1362. if (c5(y8)) {
  1363. const t9 = (t10, e13, i10) => u(y8(t10, e13, i10));
  1364. this._dynamicPropertyMap.set("xOffset", t9);
  1365. } else
  1366. this.xOffset = u(y8) || 0;
  1367. const d8 = t8.offsetY;
  1368. if (c5(d8)) {
  1369. const t9 = (t10, e13, i10) => u(d8(t10, e13, i10));
  1370. this._dynamicPropertyMap.set("yOffset", t9);
  1371. } else
  1372. this.yOffset = u(d8) || 0;
  1373. const M7 = t8.outlineWidth;
  1374. if (c5(M7)) {
  1375. const t9 = (t10, e13, i10) => u(M7(t10, e13, i10));
  1376. this._dynamicPropertyMap.set("_outlineWidth", t9);
  1377. } else
  1378. this._outlineWidth = u(M7) || 0;
  1379. const u12 = t8.rotation;
  1380. if (c5(u12) ? this._dynamicPropertyMap.set("_angle", u12) : this._angle = u12 || 0, r(t8.effects)) {
  1381. const e13 = t8.effects;
  1382. c5(e13) ? this._dynamicPropertyMap.set("_effects", e13) : this._effects = e13;
  1383. }
  1384. if (r(t8.markerPlacement)) {
  1385. const e13 = t8.markerPlacement;
  1386. c5(e13) ? this._dynamicPropertyMap.set("_markerPlacement", e13) : this._markerPlacement = e13;
  1387. }
  1388. this._scaleFactor = c(t8.scaleFactor, 1), this._bitSet = (t8.alignment === i2.MAP ? 1 : 0) | (t8.colorLocked ? 1 : 0) << 1 | (t8.scaleSymbolsProportionally ? 1 : 0) << 3, this._materialKey = t8.materialKey;
  1389. }
  1390. static fromCIMMarker(t8, e12) {
  1391. const [i10, s10] = x3(t8.scaleInfo, e12);
  1392. return new L(t8, i10, s10);
  1393. }
  1394. bindFeature(e12, i10, s10) {
  1395. const o12 = e12.readLegacyFeature(), a7 = e12.getObjectId();
  1396. this._dynamicPropertyMap.forEach((t8, e13) => {
  1397. this[e13] = t8(o12, i10, s10);
  1398. });
  1399. const h6 = this._cimMarkerLayer.materialHash, c10 = typeof h6 == "function" ? h6(o12, i10, s10, a7) : h6, n10 = this._materialCache.get(c10);
  1400. if (!n10 || !e10(n10.spriteMosaicItem) || !n10.spriteMosaicItem)
  1401. return void P3.error(new s2("mapview-cim", "Encountered an error when binding feature"));
  1402. const p8 = n10.spriteMosaicItem, y8 = this._cimMarkerLayer.sizeRatio, d8 = p8.width / p8.height * this._scaleX, M7 = this._cimMarkerLayer.rotateClockwise ? this._angle : -this._angle;
  1403. let L4 = this._size, x10 = L4 * d8;
  1404. const j6 = this.xOffset, b6 = this.yOffset;
  1405. this.xOffset *= this._scaleFactor, this.yOffset *= this._scaleFactor;
  1406. const w7 = this._cimMarkerLayer.scaleSymbolsProportionally && this._cimMarkerLayer.frameHeight ? this._size / u(this._cimMarkerLayer.frameHeight) : 1, O3 = this._outlineWidth * w7, z4 = u(this._cimMarkerLayer.referenceSize);
  1407. let W = 0, C4 = 0;
  1408. const F2 = this._cimMarkerLayer.anchorPoint;
  1409. F2 && (this._cimMarkerLayer.isAbsoluteAnchorPoint ? this._size && (W = -F2.x / (this._size * d8), C4 = F2.y / this._size) : (W = F2.x, C4 = F2.y)), this._sizeOutlineWidth = x(Math.round(Math.min(Math.sqrt(128 * x10), 255)), Math.round(Math.min(Math.sqrt(128 * L4), 255)), Math.round(Math.min(Math.sqrt(128 * O3), 255)), Math.round(Math.min(Math.sqrt(128 * z4), 255))), this.angle = M7;
  1410. const I2 = Math.round(64 * y8);
  1411. this._bitestAndDistRatio = w(this._bitSet, I2);
  1412. const K2 = p8.rect.x + et, X2 = p8.rect.y + et, B2 = K2 + p8.width, R = X2 + p8.height;
  1413. this._texUpperLeft = w(K2, X2), this._texUpperRight = w(B2, X2), this._texBottomLeft = w(K2, R), this._texBottomRight = w(B2, R);
  1414. const S4 = N.load(this._materialKey);
  1415. S4.sdf = p8.sdf, S4.pattern = true, S4.textureBinding = p8.textureBinding, this._materialKey = S4.data, this._anchorX = 0.5 - (0.5 + W) * p8.width / p8.width, this._anchorY = 0.5 - (0.5 + C4) * p8.height / p8.height, x10 *= y8, L4 *= y8, x10 *= this._scaleFactor, L4 *= this._scaleFactor, x10 *= p8.rect.width / p8.width, L4 *= p8.rect.height / p8.height, this._computedWidth = x10, this._computedHeight = L4, this._applyTransformation(k3, g6), this.xOffset = j6, this.yOffset = b6;
  1416. }
  1417. };
  1418. // node_modules/@arcgis/core/views/2d/engine/webgl/mesh/templates/WGLBaseTextTemplate.js
  1419. var f12 = 8;
  1420. var _4 = (_5) => class extends _5 {
  1421. constructor(...e12) {
  1422. super(...e12), this._isCIM = false, this._vertexBoundsScale = 1, this.geometryType = E.TEXT, this._aux = x(0, 0, this._referenceSize, this._bitset);
  1423. }
  1424. bindTextInfo(t8, i10) {
  1425. t8 && t8.length ? this._shapingInfo = o(t8, (e12) => j2(e12, i10, { scale: this._scale, angle: this._angle, xOffset: this._xOffset, yOffset: this._yOffset, hAlign: this._xAlignD, vAlign: this._yAlignD, maxLineWidth: Math.max(32, Math.min(this._lineWidth, 512)), lineHeight: f * Math.max(0.25, Math.min(this._lineHeight, 4)), decoration: this._decoration, isCIM: this._isCIM })) : this._shapingInfo = null;
  1426. }
  1427. _write(e12, t8, i10, r12) {
  1428. const s10 = t8.getDisplayId();
  1429. this._writeGeometry(e12, t8, s10, i10, r12);
  1430. }
  1431. _writeGeometry(e12, r12, s10, h6, a7) {
  1432. const x10 = this._shapingInfo;
  1433. if (t(x10))
  1434. return;
  1435. if (r(this._textPlacement)) {
  1436. const t8 = a7 ?? r12.readLegacyGeometryForDisplay();
  1437. return this._writePlacedText(e12, s10, t8, x10, h6);
  1438. }
  1439. const l7 = a7 ? we(te(a7), 2) : r12.geometryType === "esriGeometryPolygon" ? r12.readCentroid() : r12.readGeometryForDisplay();
  1440. if (!t(l7)) {
  1441. if (l7.isPoint) {
  1442. const [t8, i10] = l7.coords;
  1443. if (!e12.hasAggregates && e12.hasPixelBufferEnabled && (t8 < 0 || t8 >= 512 || i10 < 0 || i10 >= 512))
  1444. return;
  1445. return this._writeGlyphs(e12, s10, { x: t8, y: i10 }, x10);
  1446. }
  1447. l7.forEachVertex((t8, i10) => this._writeGlyphs(e12, s10, { x: t8, y: i10 }, x10));
  1448. }
  1449. }
  1450. _writePlacedText(e12, t8, i10, o12, n10) {
  1451. const a7 = e(this._textPlacement), x10 = e11.getPlacement(i10, a7, u(1), n10.geometryEngine);
  1452. if (!x10)
  1453. return;
  1454. let l7 = x10.next();
  1455. for (; l7 != null; ) {
  1456. const i11 = -l7.getAngle();
  1457. o12.setRotation(i11);
  1458. const r12 = l7.tx, s10 = -l7.ty;
  1459. r12 < 0 || r12 >= 512 || s10 < 0 || s10 >= 512 ? l7 = x10.next() : (this._writeGlyphs(e12, t8, { x: r12, y: s10 }, o12), o12.setRotation(-i11), l7 = x10.next());
  1460. }
  1461. }
  1462. _writeGlyphs(e12, t8, i10, r12) {
  1463. const s10 = U.load(this._materialKey), o12 = w(Math.round(f12 * i10.x), Math.round(f12 * i10.y)), n10 = this._vertexBoundsScale, h6 = r12.bounds, a7 = 2 * Math.max(h6.width, h6.height);
  1464. for (const x10 of r12.glyphs)
  1465. s10.textureBinding = x10.textureBinding, e12.recordStart(t8, s10.data, this.geometryType, true), e12.vertexBounds(i10.x + h6.x + this._xOffset, i10.y + h6.y - this._yOffset, a7 * n10, a7 * n10), this._writeVertices(e12, t8, o12, x10), e12.recordEnd();
  1466. }
  1467. _writeGlyph(e12, t8, i10, r12, s10) {
  1468. const o12 = U.load(this._materialKey), n10 = w(Math.round(f12 * i10), Math.round(f12 * r12));
  1469. o12.textureBinding = s10.textureBinding, e12.recordStart(t8, o12.data, this.geometryType, true);
  1470. const h6 = s10.bounds, a7 = this._vertexBoundsScale;
  1471. e12.vertexBounds(i10 + h6.x * a7, r12 + h6.y * a7, h6.width * a7, h6.height * a7), this._writeVertices(e12, t8, n10, s10), e12.recordEnd();
  1472. }
  1473. _writeVertices(e12, t8, i10, r12) {
  1474. const s10 = e12.vertexCount();
  1475. this._writeVertexCommon(e12, t8, i10, r12), e12.vertexWrite(r12.offsets.upperLeft), e12.vertexWrite(r12.texcoords.upperLeft), e12.vertexEnd(), this._writeVertexCommon(e12, t8, i10, r12), e12.vertexWrite(r12.offsets.upperRight), e12.vertexWrite(r12.texcoords.upperRight), e12.vertexEnd(), this._writeVertexCommon(e12, t8, i10, r12), e12.vertexWrite(r12.offsets.lowerLeft), e12.vertexWrite(r12.texcoords.lowerLeft), e12.vertexEnd(), this._writeVertexCommon(e12, t8, i10, r12), e12.vertexWrite(r12.offsets.lowerRight), e12.vertexWrite(r12.texcoords.lowerRight), e12.vertexEnd(), e12.indexWrite(s10 + 0), e12.indexWrite(s10 + 1), e12.indexWrite(s10 + 2), e12.indexWrite(s10 + 1), e12.indexWrite(s10 + 3), e12.indexWrite(s10 + 2);
  1476. }
  1477. _writeVertexCommon(e12, t8, i10, r12) {
  1478. const s10 = this._color, o12 = this._haloColor, n10 = x(0, 0, this._referenceSize, this._bitset), h6 = x(0, 0, this._size, this._haloSize);
  1479. e12.vertexWrite(i10), e12.vertexWrite(t8), e12.vertexWrite(s10), e12.vertexWrite(o12), e12.vertexWrite(h6), e12.vertexWrite(n10), e12.vertexWrite(this._minMaxZoom);
  1480. }
  1481. };
  1482. // node_modules/@arcgis/core/views/2d/engine/webgl/mesh/templates/WGLDynamicTextTemplate.js
  1483. var M3 = 5;
  1484. function d5(t8, e12, i10, s10) {
  1485. return typeof t8.text == "string" ? t8.text : typeof t8.text == "function" ? t8.text(e12, i10, s10) : "";
  1486. }
  1487. var g7 = class extends _4(r9) {
  1488. constructor(e12, o12, a7) {
  1489. super(e12), this._horizontalAlignment = "center", this._verticalAlignment = "middle", this._textToGlyphs = new Map(), this._minMaxZoom = w(Math.round(o12 * at), Math.round(a7 * at));
  1490. const l7 = e12.scaleFactor || 1;
  1491. this._cimTextLayer = e12;
  1492. const _5 = e12.color;
  1493. if (c5(_5)) {
  1494. const t8 = (t9, e13, i10) => f3(_5(t9, e13, i10));
  1495. this._dynamicPropertyMap.set("_color", t8);
  1496. } else
  1497. this._color = f3(_5);
  1498. const f14 = e12.outlineColor;
  1499. if (c5(f14)) {
  1500. const t8 = (t9, e13, i10) => f3(f14(t9, e13, i10));
  1501. this._dynamicPropertyMap.set("_haloColor", t8);
  1502. } else
  1503. this._haloColor = f3(f14);
  1504. let y8;
  1505. c5(e12.size) || (y8 = Math.min(Math.round(u(e12.size * e12.sizeRatio)), 127));
  1506. const p8 = (t8, s10, o13) => c5(e12.size) ? Math.min(Math.round(u(e12.size(t8, s10, o13) * e12.sizeRatio)), 127) : y8;
  1507. if (this._dynamicPropertyMap.set("_size", p8), c5(e12.outlineSize)) {
  1508. const t8 = (t9, s10, o13) => Math.min(Math.floor(M3 * u(e12.outlineSize(t9, s10, o13) * e12.sizeRatio)), 127);
  1509. this._dynamicPropertyMap.set("_haloSize", t8);
  1510. } else
  1511. this._haloSize = Math.min(Math.floor(M3 * u(e12.outlineSize * e12.sizeRatio)), 127);
  1512. let d8;
  1513. c5(e12.offsetX) || (d8 = Math.round(u(e12.offsetX * e12.sizeRatio)));
  1514. const g9 = (t8, s10, o13) => c5(e12.offsetX) ? Math.round(u(e12.offsetX(t8, s10, o13) * e12.sizeRatio)) : d8;
  1515. let u12;
  1516. this._dynamicPropertyMap.set("_xOffset", g9), c5(e12.offsetY) || (u12 = Math.round(u(e12.offsetY * e12.sizeRatio)));
  1517. const z4 = (t8, s10, o13) => c5(e12.offsetY) ? Math.round(u(e12.offsetY(t8, s10, o13) * e12.sizeRatio)) : u12;
  1518. if (this._dynamicPropertyMap.set("_yOffset", z4), c5(e12.angle) ? this._dynamicPropertyMap.set("_angle", e12.angle) : this._angle = e12.angle, c5(e12.horizontalAlignment) ? this._dynamicPropertyMap.set("_horizontalAlignment", e12.horizontalAlignment) : this._horizontalAlignment = e12.horizontalAlignment, c5(e12.verticalAlignment) ? this._dynamicPropertyMap.set("_verticalAlignment", e12.verticalAlignment) : this._verticalAlignment = e12.verticalAlignment, r(e12.effects)) {
  1519. const t8 = e12.effects;
  1520. c5(t8) ? this._dynamicPropertyMap.set("_effects", t8) : this._effects = t8;
  1521. }
  1522. if (r(e12.markerPlacement)) {
  1523. const t8 = e12.markerPlacement;
  1524. c5(t8) ? this._dynamicPropertyMap.set("_markerPlacement", t8) : this._textPlacement = t8;
  1525. }
  1526. c5(e12.text) ? this._dynamicPropertyMap.set("_text", e12.text) : this._text = e12.text, this._scaleFactor = l7;
  1527. const x10 = Math.min(Math.round(u(e12.referenceSize * e12.sizeRatio)), 127);
  1528. this._referenceSize = Math.round(Math.sqrt(256 * x10)), this._materialKey = e12.materialKey;
  1529. const P5 = P.load(this._materialKey);
  1530. P5.sdf = true, this._bitset = (e12.alignment === i2.MAP ? 1 : 0) | (e12.colorLocked ? 1 : 0) << 1, this._materialKey = P5.data, this._decoration = "none", this._lineHeight = 1, this._lineWidth = 512, this._isCIM = true;
  1531. }
  1532. static fromCIMText(t8, e12) {
  1533. const [i10, s10] = x3(t8.scaleInfo, e12);
  1534. return new g7(t8, i10, s10);
  1535. }
  1536. async analyze(t8, e12, i10, s10) {
  1537. const o12 = e12.readLegacyFeature(), a7 = d5(this._cimTextLayer, o12, i10, s10), n10 = await super.analyze(t8, e12, i10, s10, t5(a7));
  1538. return n10 && n10.glyphMosaicItems && this._textToGlyphs.set(a7, n10.glyphMosaicItems), n10;
  1539. }
  1540. bindFeature(t8, i10, s10) {
  1541. const n10 = t8.readLegacyFeature();
  1542. if (this._dynamicPropertyMap.forEach((t9, e12) => {
  1543. this[e12] = t9(n10, i10, s10);
  1544. }), !this._text || this._text.length === 0)
  1545. return void (this._shapingInfo = null);
  1546. this._size *= this._scaleFactor, this._scale = this._size / j, this._xOffset *= this._scaleFactor, this._yOffset *= this._scaleFactor, this._xAlignD = r4(c(this._horizontalAlignment, "center")), this._yAlignD = n2(c(this._verticalAlignment, "baseline"));
  1547. const r12 = this._textToGlyphs.get(this._text);
  1548. this.bindTextInfo(r12, false);
  1549. }
  1550. };
  1551. // node_modules/@arcgis/core/views/2d/engine/webgl/mesh/templates/WGLFillTemplate.js
  1552. var M4 = 128;
  1553. var j4 = class extends u7(r8) {
  1554. constructor(t8, e12, r12, o12, s10, l7, a7, n10, m6, u12, d8, p8, y8, x10, M7, j6) {
  1555. super(), this._effects = x10;
  1556. const w7 = w2.load(t8);
  1557. e12 && (w7.sdf = e12.sdf, w7.pattern = true, w7.textureBinding = e12.textureBinding), this.fillColor = r12, this.tl = o12, this.br = s10, this.aux2_1 = w(l7, a7), this.aux2_2 = w(n10, m6), this.aux3 = x(u12, d8, p8, 0), this._bitset = y8, this._minMaxZoom = w(Math.round(M7 * at), Math.round(j6 * at)), this._materialKey = w7.data;
  1558. }
  1559. static fromCIMFill(e12, i10, n10) {
  1560. const c10 = e12.color, h6 = c10 && f3(c10) || 0, d8 = e12.materialKey, [p8, y8] = x3(e12.scaleInfo, n10), x10 = (e12.colorLocked ? nt : 0) | (e12.applyRandomOffset ? vt : 0) | (e12.sampleAlphaOnly ? gt : 0);
  1561. if (!i10)
  1562. return new j4(d8, null, h6, 0, 0, 0, 0, 0, 0, 0, 0, 0, x10, e12.effects, p8, y8);
  1563. const { rect: w7, width: g9, height: _5 } = i10, K2 = e12.scaleX || 1, b6 = w7.x + et, F2 = w7.y + et, L4 = b6 + g9, T = F2 + _5, A3 = e12.height, B2 = K2 * A3;
  1564. let G4 = Math.round(A3);
  1565. G4 <= 0 && (G4 = T - F2);
  1566. let S4 = Math.round(B2);
  1567. S4 <= 0 && (S4 = L4 - b6);
  1568. const C4 = u(e12.offsetX || 0), I2 = u(-e12.offsetY || 0), O3 = w(b6, F2), U2 = w(L4, T);
  1569. return new j4(d8, i10, h6, O3, U2, S4, G4, C4, I2, M4, M4, M(e12.angle), x10, e12.effects, p8, y8);
  1570. }
  1571. static fromSimpleFill(t8, r12, i10 = false) {
  1572. const { color: s10 } = t8, l7 = s10 && t8.style !== "esriSFSNull" && s4(s10) || 0, n10 = i10 ? nt : 0, m6 = t8.materialKey;
  1573. let c10;
  1574. if (r12) {
  1575. const { rect: t9, width: e12, height: i11 } = r12, o12 = t9.x + et, s11 = t9.y + et, h6 = o12 + e12, u12 = s11 + i11, y8 = w(o12, s11), x10 = w(h6, u12);
  1576. c10 = new j4(m6, r12, l7, y8, x10, e12, i11, 0, 0, M4, M4, 0, n10, null, n7, o9);
  1577. } else
  1578. c10 = new j4(m6, null, l7, 0, 0, 0, 0, 0, 0, 0, 0, 0, n10, null, n7, o9);
  1579. return c10._maybeAddLineTemplate(t8), c10;
  1580. }
  1581. static fromPictureFill(e12, r12, i10 = false) {
  1582. const s10 = i, { rect: l7, width: m6, height: c10 } = r12, h6 = l7.x + et, u12 = l7.y + et, y8 = h6 + m6, x10 = u12 + c10, w7 = w(h6, u12), g9 = w(y8, x10), _5 = Math.round(u(e12.width)), K2 = Math.round(u(e12.height)), b6 = u(e12.xoffset), F2 = u(-e12.yoffset), L4 = e12.materialKey, T = i10 ? nt : 0, A3 = new j4(L4, r12, s10, w7, g9, _5, K2, b6, F2, M4 * e12.xscale, M4 * e12.yscale, 0, T, null, n7, o9);
  1583. return A3._maybeAddLineTemplate(e12), A3;
  1584. }
  1585. };
  1586. // node_modules/@arcgis/core/views/2d/engine/webgl/mesh/templates/WGLMarkerTemplate.js
  1587. var b4 = class extends u9(r8) {
  1588. constructor(t8, e12, r12, a7, n10, p8, S4, g9, V, z4, B2, b6, k5, w7, L4, R, j6, C4, P5, E4, U2, A3, T) {
  1589. super(), this.angle = a7, this.height = S4, this.width = p8, this.xOffset = e12 * P5, this.yOffset = r12 * P5, this._markerPlacement = E4, this._effects = U2, this._anchorX = 0.5 - (0.5 + R) * L4.width / L4.width, this._anchorY = 0.5 - (0.5 + j6) * L4.height / L4.height, this._minMaxZoom = w(Math.round(A3 * at), Math.round(T * at));
  1590. const v5 = (w7 === i2.MAP ? rt : pt) | (B2 ? nt : 0) | (k5 ? st : 0) | (b6 ? ft : 0), K2 = L4 && L4.sdf, W = N.load(t8);
  1591. W.sdf = K2, W.pattern = true, W.textureBinding = L4.textureBinding, this._materialKey = W.data, this._fillColor = n10, this._outlineColor = V, this._sizeOutlineWidth = x(Math.round(Math.min(Math.sqrt(128 * p8), 255)), Math.round(Math.min(Math.sqrt(128 * S4), 255)), Math.round(Math.min(Math.sqrt(128 * z4), 255)), Math.round(Math.min(Math.sqrt(128 * g9), 255)));
  1592. const X2 = L4.rect.x + et, q2 = L4.rect.y + et, Y = X2 + L4.width, H = q2 + L4.height;
  1593. this._offsets.xUpperLeft = X2, this._offsets.yUpperLeft = q2, this._offsets.xUpperRight = Y, this._offsets.yUpperRight = q2, this._offsets.xBottomLeft = X2, this._offsets.yBottomLeft = H, this._offsets.xBottomRight = Y, this._offsets.yBottomRight = H, W.symbologyType === S.PIE_CHART ? (this._texUpperLeft = w(0, 1), this._texUpperRight = w(1, 1), this._texBottomLeft = w(0, 0), this._texBottomRight = w(1, 0)) : (this._texUpperLeft = w(X2, q2), this._texUpperRight = w(Y, q2), this._texBottomLeft = w(X2, H), this._texBottomRight = w(Y, H)), p8 *= C4, S4 *= C4, p8 *= P5, S4 *= P5;
  1594. const I2 = Math.round(64 * C4);
  1595. this._bitestAndDistRatio = w(v5, I2), this._computedWidth = p8, this._computedHeight = S4;
  1596. const N2 = n4(), O3 = n3();
  1597. this._applyTransformation(O3, N2);
  1598. }
  1599. static fromCIMMarker(o12, s10, r12) {
  1600. const n10 = s10 && s10.width || 1, h6 = s10 && s10.height || 1, l7 = o12.size, m6 = n10 / h6 * o12.scaleX, f14 = o12.scaleSymbolsProportionally && o12.frameHeight ? l7 / o12.frameHeight : 1;
  1601. let c10 = f3(o12.color);
  1602. const u12 = f3(o12.outlineColor), d8 = u(l7), p8 = d8 * m6, x10 = u(o12.offsetX || 0), M7 = u(o12.offsetY || 0), y8 = u(o12.outlineWidth || 0) * f14, _5 = o12.alignment || i2.SCREEN, g9 = u(o12.referenceSize), [V, z4] = x3(o12.scaleInfo, r12);
  1603. s10.sdf || c10 !== 0 || (c10 = -1);
  1604. let B2 = o12.rotation || 0;
  1605. o12.rotateClockwise || (B2 = -B2);
  1606. let k5 = 0, w7 = 0;
  1607. const L4 = o12.anchorPoint;
  1608. L4 && (o12.isAbsoluteAnchorPoint ? l7 && (k5 = -L4.x / (l7 * m6), w7 = L4.y / l7) : (k5 = L4.x, w7 = L4.y));
  1609. const R = new b4(o12.materialKey, x10, M7, B2, c10, p8, d8, g9, u12, y8, o12.colorLocked, o12.scaleSymbolsProportionally, false, _5, s10, k5, w7, o12.sizeRatio, c(o12.scaleFactor, 1), o12.markerPlacement, o12.effects, V, z4);
  1610. return R._vertexBoundsScaleX = o12.maxVVSize ? o12.maxVVSize / p8 : 1, R._vertexBoundsScaleY = o12.maxVVSize ? o12.maxVVSize / d8 : 1, R;
  1611. }
  1612. static fromPictureMarker(t8, o12) {
  1613. const s10 = Math.round(u(t8.width)), r12 = Math.round(u(t8.height)), a7 = i, n10 = Math.round(u(t8.xoffset || 0)), h6 = Math.round(u(t8.yoffset || 0)), l7 = new b4(t8.materialKey, n10, h6, t8.angle, a7, s10, r12, r12, 0, 0, false, false, false, i2.SCREEN, o12, 0, 0, 1, 1, null, null, n7, o9);
  1614. return l7._vertexBoundsScaleX = t8.maxVVSize ? t8.maxVVSize / t8.width : 1, l7._vertexBoundsScaleY = t8.maxVVSize ? t8.maxVVSize / t8.height : 1, l7;
  1615. }
  1616. static fromSimpleMarker(t8, o12) {
  1617. const s10 = s4(t8.color), r12 = Math.round(u(t8.size)), a7 = r12, h6 = Math.round(u(t8.xoffset || 0)), l7 = Math.round(u(t8.yoffset || 0)), m6 = t8.style, f14 = t8.outline, c10 = 0 | (f14 && f14.color && s4(f14.color)), u12 = 0 | (f14 && f14.width && Math.round(u(f14.width))), d8 = new b4(t8.materialKey, h6, l7, t8.angle, s10, r12, a7, a7, c10, u12, false, false, m6 === "esriSMSCross" || m6 === "esriSMSX", i2.SCREEN, o12, 0, 0, 126 / 64, 1, null, null, n7, o9);
  1618. return d8.boundsType = m6 === "esriSMSCircle" ? "circle" : "square", d8._vertexBoundsScaleX = t8.maxVVSize ? t8.maxVVSize / t8.size : 1, d8._vertexBoundsScaleY = t8.maxVVSize ? t8.maxVVSize / t8.size : 1, d8;
  1619. }
  1620. static fromLineSymbolMarker(t8, o12) {
  1621. const s10 = s4(t8.color), a7 = 6, h6 = Math.round(u(a7 * t8.lineWidth)), l7 = h6, m6 = t8.style === "cross" || t8.style === "x";
  1622. let f14;
  1623. switch (t8.placement) {
  1624. case "begin-end":
  1625. f14 = o5.Both;
  1626. break;
  1627. case "begin":
  1628. f14 = o5.JustBegin;
  1629. break;
  1630. case "end":
  1631. f14 = o5.JustEnd;
  1632. break;
  1633. default:
  1634. f14 = o5.None;
  1635. }
  1636. const c10 = { type: "CIMMarkerPlacementAtExtremities", angleToLine: true, offset: 0, extremityPlacement: f14, offsetAlongLine: 0 }, u12 = new b4(t8.materialKey, 0, 0, 0, s10, h6, l7, l7 / a7, s10, m6 ? Math.round(u(t8.lineWidth)) : 0, false, false, m6, i2.MAP, o12, 0, 0, 126 / 64, 1, c10, null, n7, o9);
  1637. return u12.boundsType = t8.style === "circle" ? "circle" : "square", u12;
  1638. }
  1639. };
  1640. // node_modules/@arcgis/core/views/2d/engine/webgl/mesh/templates/WGLTextTemplate.js
  1641. var M5 = 5;
  1642. var p6 = class extends _4(r8) {
  1643. constructor(t8, a7, l7, _5, d8, x10, z4, u12, p8, g9, j6, S4, y8, b6, T, V, A3, C4, I2 = false, K2, R) {
  1644. super(), this._xOffset = u(y8), this._yOffset = u(b6), this._decoration = g9 || "none", this._color = d8, this._haloColor = x10, this._haloSize = Math.min(Math.floor(M5 * u(o2(l7))), 127), this._size = Math.min(Math.round(u(a7)), 127);
  1645. const v5 = Math.min(Math.round(u(_5 || a7)), 127);
  1646. this._referenceSize = Math.round(Math.sqrt(256 * v5)), this._scale = this._size / j, this._angle = S4, this._justify = s5(z4 || "center"), this._xAlignD = r4(z4 || "center"), this._yAlignD = n2(u12 || "baseline"), this._baseline = (u12 || "baseline") === "baseline", this._bitset = (p8 === i2.MAP ? 1 : 0) | (j6 ? 1 : 0) << 1;
  1647. const B2 = U.load(t8);
  1648. B2.sdf = true, this._materialKey = B2.data, this._lineWidth = u(T) || 512, this._lineHeight = V || 1, this._textPlacement = A3, this._effects = C4, this._isCIM = I2, this._minMaxZoom = w(Math.round(K2 * at), Math.round(R * at));
  1649. }
  1650. static fromText(e12, i10) {
  1651. const s10 = new p6(e12.materialKey, e12.font.size, e12.haloSize || 0, e12.font.size, e12.color && s4(e12.color) || 0, e12.haloColor && s4(e12.haloColor) || 0, e12.horizontalAlignment, e12.verticalAlignment, i2.SCREEN, e12.font.decoration, false, e12.angle || 0, e12.xoffset, e12.yoffset, e12.lineWidth, e12.lineHeight, null, null, false, n7, o9), [, n10] = n(e12.text);
  1652. return s10.bindTextInfo(i10, n10), s10._vertexBoundsScale = e12.maxVVSize ? e12.maxVVSize / e12.font.size : 1, s10;
  1653. }
  1654. static fromCIMText(e12, i10, o12) {
  1655. const s10 = e12.scaleFactor || 1, n10 = e12.size * e12.sizeRatio * s10, [r12, a7] = x3(e12.scaleInfo, o12), m6 = new p6(e12.materialKey, n10, e12.outlineSize * e12.sizeRatio, e12.referenceSize, f3(e12.color), f3(e12.outlineColor), e12.horizontalAlignment, e12.verticalAlignment, e12.alignment, e12.decoration, e12.colorLocked, e12.angle, e12.offsetX * e12.sizeRatio * s10, e12.offsetY * e12.sizeRatio * s10, 512, 1, e12.markerPlacement, e12.effects, true, r12, a7), [, h6] = n(e12.text);
  1656. return m6.bindTextInfo(i10, h6), m6._vertexBoundsScale = e12.maxVVSize ? e12.maxVVSize / n10 : 1, m6;
  1657. }
  1658. };
  1659. // node_modules/@arcgis/core/views/2d/engine/webgl/util/Lock.js
  1660. var r10 = class {
  1661. constructor() {
  1662. this._resolver = null;
  1663. }
  1664. isHeld() {
  1665. return !!this._resolver;
  1666. }
  1667. async acquire() {
  1668. this._resolver ? (await this._resolver.promise, await this.acquire()) : this._resolver = D();
  1669. }
  1670. release() {
  1671. const e12 = this._resolver;
  1672. this._resolver = null, e12.resolve();
  1673. }
  1674. };
  1675. async function s9(e12, r12, s10) {
  1676. try {
  1677. await e12.acquire(), await r12(s10), e12.release();
  1678. } catch (t8) {
  1679. throw e12.release(), t8;
  1680. }
  1681. }
  1682. // node_modules/@arcgis/core/views/2d/engine/webgl/mesh/templates/WGLTemplateStore.js
  1683. var S2 = s.getLogger("esri.views.2d.engine.webgl.mesh.templates.WGLTemplateStore");
  1684. var w5 = new Array();
  1685. var k4 = { isOutline: false, placement: null, symbologyType: S.DEFAULT, vvFlags: 0 };
  1686. var C3 = { ...r2, hash: JSON.stringify(r2), materialKey: f4(E.MARKER, k4) };
  1687. var L2 = { ...s3, hash: JSON.stringify(s3), materialKey: f4(E.LINE, k4) };
  1688. var b5 = { ...y, hash: JSON.stringify(y), materialKey: f4(E.FILL, k4) };
  1689. function E3(e12, t8) {
  1690. const r12 = e12.length;
  1691. return e12.push(null), t8.then((t9) => e12[r12] = t9), e12;
  1692. }
  1693. function G2(e12) {
  1694. return !!(1 & e12);
  1695. }
  1696. function j5(e12) {
  1697. return e12.name === "worker:port-closed";
  1698. }
  1699. var x8 = class {
  1700. constructor(e12, t8) {
  1701. this._idCounter = 1, this._templateIdCounter = 1, this._idToTemplateGroup = new Map(), this._symbolToTemplate = new Map(), this._fetchQueue = [], this._idToResolver = new Map(), this._cimTemplateCache = new Map(), this._cimAnalyses = [], this._lock = new r10(), this._fetchResource = e12, this._tileInfo = t8;
  1702. }
  1703. get _markerError() {
  1704. return this._errorTemplates.marker[0];
  1705. }
  1706. get _fillError() {
  1707. return this._errorTemplates.fill[0];
  1708. }
  1709. get _lineError() {
  1710. return this._errorTemplates.line[0];
  1711. }
  1712. get _textError() {
  1713. return this._errorTemplates.line[0];
  1714. }
  1715. createTemplateGroup(e12, t8) {
  1716. this._initErrorTemplates();
  1717. const r12 = e12.hash;
  1718. if (this._symbolToTemplate.has(r12))
  1719. return this._symbolToTemplate.get(r12);
  1720. const s10 = new Array();
  1721. t8 && this._createMeshTemplates(s10, t8, true), this._createMeshTemplates(s10, e12, false);
  1722. const i10 = this._createGroupId(e12.type === "expanded-cim" && F(e12));
  1723. return this._idToTemplateGroup.set(i10, s10), this._symbolToTemplate.set(r12, i10), i10;
  1724. }
  1725. getTemplateGroup(e12) {
  1726. return this._idToTemplateGroup.has(e12) ? this._idToTemplateGroup.get(e12) : w5;
  1727. }
  1728. getDynamicTemplateGroup(e12) {
  1729. return this._idToTemplateGroup.has(e12) ? (G2(e12) || S2.error("mapview-template-store", `Id ${e12} does not refer to a dynamic template`), this._idToTemplateGroup.get(e12)) : w5;
  1730. }
  1731. getMosaicItem(e12, t8) {
  1732. const r12 = this._createTemplateId(), s10 = new Promise((e13) => this._idToResolver.set(r12, e13));
  1733. return this._fetchQueue.push({ symbol: e12, id: r12, glyphIds: t8 }), s10;
  1734. }
  1735. finalize(e12) {
  1736. return this._fetchQueue.length || this._lock.isHeld() ? s9(this._lock, this._fetchAllQueuedResources.bind(this), e12) : Promise.resolve();
  1737. }
  1738. _initErrorTemplates() {
  1739. this._errorTemplates || (this._errorTemplates = { fill: this._createMeshTemplates([], b5, false), marker: this._createMeshTemplates([], C3, false), line: this._createMeshTemplates([], L2, false) });
  1740. }
  1741. _fetchAllQueuedResources(t8) {
  1742. if (!this._fetchQueue.length)
  1743. return Promise.resolve();
  1744. const s10 = this._fetchQueue, i10 = this._cimAnalyses;
  1745. return this._fetchQueue = [], this._cimAnalyses = [], Promise.all(i10).then(() => this._fetchResource(s10, t8).then((e12) => {
  1746. for (const { id: t9, mosaicItem: r12 } of e12) {
  1747. this._idToResolver.get(t9)(r12), this._idToResolver.delete(t9);
  1748. }
  1749. })).catch((t9) => {
  1750. g(t9) ? this._fetchQueue = this._fetchQueue.concat(s10) : j5(t9) || S2.error(new s2("mapview-template-store", "Unable to fetch requested texture resources", t9));
  1751. });
  1752. }
  1753. _createGroupId(e12) {
  1754. return this._idCounter++ << 1 | (e12 ? 1 : 0);
  1755. }
  1756. _createTemplateId() {
  1757. return this._templateIdCounter++;
  1758. }
  1759. async _createSMS(e12) {
  1760. const { spriteMosaicItem: t8 } = await this.getMosaicItem(e12);
  1761. return e10(t8, S2) ? b4.fromSimpleMarker(e12, t8) : this._markerError;
  1762. }
  1763. async _createPMS(e12) {
  1764. const { spriteMosaicItem: t8 } = await this.getMosaicItem(e12);
  1765. return e10(t8, S2) ? b4.fromPictureMarker(e12, t8) : this._markerError;
  1766. }
  1767. async _createSFS(e12, t8) {
  1768. const { spriteMosaicItem: r12 } = await this.getMosaicItem(e12);
  1769. return e10(r12, S2) ? j4.fromSimpleFill(e12, r12, t8) : this._fillError;
  1770. }
  1771. async _createPFS(e12, t8) {
  1772. const { spriteMosaicItem: r12 } = await this.getMosaicItem(e12);
  1773. return e10(r12, S2) ? j4.fromPictureFill(e12, r12, t8) : this._fillError;
  1774. }
  1775. async _createSLS(e12, t8) {
  1776. const { spriteMosaicItem: r12 } = await this.getMosaicItem(e12);
  1777. return e10(r12, S2) ? P2.fromSimpleLine(e12, r12) : this._lineError;
  1778. }
  1779. async _createLMS(e12) {
  1780. const { spriteMosaicItem: t8 } = await this.getMosaicItem(e12);
  1781. return e10(t8, S2) ? b4.fromLineSymbolMarker(e12, t8) : this._markerError;
  1782. }
  1783. async _createTS(e12) {
  1784. const { glyphMosaicItems: t8 } = await this.getMosaicItem(e12);
  1785. return p6.fromText(e12, t8);
  1786. }
  1787. async _createCIMText(e12) {
  1788. const { glyphMosaicItems: t8 } = await this.getMosaicItem(i4(e12), t5(e12.text));
  1789. return e10(t8, S2) ? p6.fromCIMText(e12, t8, this._tileInfo) : this._textError;
  1790. }
  1791. async _createCIMFill(e12) {
  1792. const { spriteMosaicItem: t8 } = await this.getMosaicItem(i4(e12));
  1793. return e10(t8, S2) ? j4.fromCIMFill(e12, t8, this._tileInfo) : this._fillError;
  1794. }
  1795. async _createCIMLine(e12) {
  1796. const { spriteMosaicItem: t8 } = await this.getMosaicItem(i4(e12));
  1797. return e10(t8, S2) ? P2.fromCIMLine(e12, t8, this._tileInfo) : this._lineError;
  1798. }
  1799. async _createCIMMarker(e12) {
  1800. const { spriteMosaicItem: t8 } = await this.getMosaicItem(i4(e12));
  1801. return e10(t8, S2) ? b4.fromCIMMarker(e12, t8, this._tileInfo) : this._markerError;
  1802. }
  1803. async _createCIM(e12) {
  1804. const t8 = e12.templateHash;
  1805. if (this._cimTemplateCache.has(t8))
  1806. return this._cimTemplateCache.get(t8);
  1807. let r12;
  1808. switch (e12.type) {
  1809. case "marker":
  1810. r12 = await this._createCIMMarker(e12);
  1811. break;
  1812. case "line":
  1813. r12 = await this._createCIMLine(e12);
  1814. break;
  1815. case "fill":
  1816. r12 = await this._createCIMFill(e12);
  1817. break;
  1818. case "text":
  1819. r12 = await this._createCIMText(e12);
  1820. }
  1821. return this._cimTemplateCache.set(t8, r12), r12;
  1822. }
  1823. async _createDynamicCIM(e12) {
  1824. const t8 = e12.templateHash;
  1825. if (this._cimTemplateCache.has(t8))
  1826. return this._cimTemplateCache.get(t8);
  1827. let r12;
  1828. switch (e12.type) {
  1829. case "marker":
  1830. r12 = L.fromCIMMarker(e12, this._tileInfo);
  1831. break;
  1832. case "line":
  1833. r12 = y5.fromCIMLine(e12, this._tileInfo);
  1834. break;
  1835. case "fill":
  1836. r12 = u8.fromCIMFill(e12, this._tileInfo);
  1837. break;
  1838. case "text":
  1839. r12 = g7.fromCIMText(e12, this._tileInfo);
  1840. }
  1841. return this._cimTemplateCache.set(t8, r12), r12;
  1842. }
  1843. _createPrimitiveMeshTemplates(e12, t8, r12) {
  1844. switch (t8.type) {
  1845. case "esriSMS":
  1846. return E3(e12, this._createSMS(t8));
  1847. case "esriPMS":
  1848. return E3(e12, this._createPMS(t8));
  1849. case "esriSFS":
  1850. return E3(e12, this._createSFS(t8, r12));
  1851. case "line-marker":
  1852. return E3(e12, this._createLMS(t8));
  1853. case "esriPFS":
  1854. return E3(e12, this._createPFS(t8, r12));
  1855. case "esriSLS":
  1856. return E3(e12, this._createSLS(t8, false));
  1857. case "esriTS":
  1858. return E3(e12, this._createTS(t8));
  1859. default:
  1860. return S2.error("Unable to create mesh template for unknown symbol type {: $ }{symbol.type}"), e12;
  1861. }
  1862. }
  1863. _createMeshTemplates(e12, t8, r12) {
  1864. if (t8.type.includes("3d"))
  1865. return S2.error("3D symbols are not supported with MapView"), e12;
  1866. if (t8.type === "expanded-cim") {
  1867. for (const r13 of t8.layers)
  1868. typeof r13.materialHash == "function" ? E3(e12, this._createDynamicCIM(r13)) : E3(e12, this._createCIM(r13));
  1869. return e12;
  1870. }
  1871. if (t8.type === "composite-symbol") {
  1872. for (const s10 of t8.layers)
  1873. this._createPrimitiveMeshTemplates(e12, s10, r12);
  1874. return e12;
  1875. }
  1876. return t8.type === "cim" || t8.type === "label" || t8.type === "web-style" ? e12 : this._createPrimitiveMeshTemplates(e12, t8, r12);
  1877. }
  1878. };
  1879. var F = (e12) => {
  1880. if (!e12.layers)
  1881. return false;
  1882. for (const t8 of e12.layers)
  1883. if (typeof t8.materialHash == "function")
  1884. return true;
  1885. return false;
  1886. };
  1887. // node_modules/@arcgis/core/views/2d/engine/webgl/mesh/templates/segmentUtils.js
  1888. function r11(t8, e12) {
  1889. return t8[e12 + 1];
  1890. }
  1891. function h4(t8) {
  1892. return t8.length - 1;
  1893. }
  1894. function a6(t8) {
  1895. let e12 = 0;
  1896. for (let s10 = 0; s10 < h4(t8); s10++)
  1897. e12 += d6(t8, s10);
  1898. return e12;
  1899. }
  1900. function d6(t8, e12, s10 = 1) {
  1901. const [n10, i10] = r11(t8, e12);
  1902. return Math.sqrt(n10 * n10 + i10 * i10) * s10;
  1903. }
  1904. var c8 = class {
  1905. constructor(t8, e12, s10, n10, i10) {
  1906. this._segments = t8, this._index = e12, this._distance = s10, this._xStart = n10, this._yStart = i10, this._done = false;
  1907. }
  1908. static create(t8) {
  1909. return new c8(t8, 0, 0, t8[0][0], t8[0][1]);
  1910. }
  1911. clone() {
  1912. return new c8(this._segments, this._index, this._distance, this.xStart, this.yStart);
  1913. }
  1914. equals(t8) {
  1915. return this._index === t8._index || t8._index === this._index - 1 && (this._distance === 0 || t8._distance === 1) || t8._index === this._index + 1 && (this._distance === 1 || t8._distance === 0);
  1916. }
  1917. leq(t8) {
  1918. return this._index < t8._index || this._index === t8._index && this._distance <= t8._distance;
  1919. }
  1920. geq(t8) {
  1921. return this._index > t8._index || this._index === t8._index && this._distance >= t8._distance;
  1922. }
  1923. get _segment() {
  1924. return this._segments[this._index + 1];
  1925. }
  1926. get angle() {
  1927. const t8 = this.dy, e12 = (0 * t8 + -1 * -this.dx) / (1 * this.length);
  1928. let s10 = Math.acos(e12);
  1929. return t8 > 0 && (s10 = 2 * Math.PI - s10), s10;
  1930. }
  1931. get xStart() {
  1932. return this._xStart;
  1933. }
  1934. get yStart() {
  1935. return this._yStart;
  1936. }
  1937. get x() {
  1938. return this.xStart + this.distance * this.dx;
  1939. }
  1940. get y() {
  1941. return this.yStart + this.distance * this.dy;
  1942. }
  1943. get dx() {
  1944. return this._segment[0];
  1945. }
  1946. get dy() {
  1947. return this._segment[1];
  1948. }
  1949. get xMidpoint() {
  1950. return this.xStart + 0.5 * this.dx;
  1951. }
  1952. get yMidpoint() {
  1953. return this.yStart + 0.5 * this.dy;
  1954. }
  1955. get xEnd() {
  1956. return this.xStart + this.dx;
  1957. }
  1958. get yEnd() {
  1959. return this.yStart + this.dy;
  1960. }
  1961. get length() {
  1962. const { dx: t8, dy: e12 } = this;
  1963. return Math.sqrt(t8 * t8 + e12 * e12);
  1964. }
  1965. get remainingLength() {
  1966. return this.length * (1 - this._distance);
  1967. }
  1968. get backwardLength() {
  1969. return this.length * this._distance;
  1970. }
  1971. get distance() {
  1972. return this._distance;
  1973. }
  1974. get done() {
  1975. return this._done;
  1976. }
  1977. hasPrev() {
  1978. return this._index - 1 >= 0;
  1979. }
  1980. hasNext() {
  1981. return this._index + 1 < h4(this._segments);
  1982. }
  1983. next() {
  1984. return this.hasNext() ? (this._xStart += this.dx, this._yStart += this.dy, this._distance = 0, this._index += 1, this) : null;
  1985. }
  1986. prev() {
  1987. return this.hasPrev() ? (this._index -= 1, this._xStart -= this.dx, this._yStart -= this.dy, this._distance = 1, this) : (this._done = true, null);
  1988. }
  1989. _seekBackwards(t8, e12) {
  1990. const s10 = this.backwardLength;
  1991. if (t8 <= s10)
  1992. return this._distance = (s10 - t8) / this.length, this;
  1993. let n10 = this.backwardLength;
  1994. for (; this.prev(); ) {
  1995. if (n10 + this.length > t8)
  1996. return this._seekBackwards(t8 - n10);
  1997. n10 += this.length;
  1998. }
  1999. return this._distance = 0, e12 ? this : null;
  2000. }
  2001. seek(t8, e12 = false) {
  2002. if (t8 < 0)
  2003. return this._seekBackwards(Math.abs(t8), e12);
  2004. if (t8 <= this.remainingLength)
  2005. return this._distance = (this.backwardLength + t8) / this.length, this;
  2006. let s10 = this.remainingLength;
  2007. for (; this.next(); ) {
  2008. if (s10 + this.length > t8)
  2009. return this.seek(t8 - s10, e12);
  2010. s10 += this.length;
  2011. }
  2012. return this._distance = 1, e12 ? this : null;
  2013. }
  2014. };
  2015. function u10(t8, e12, s10, n10 = true) {
  2016. const i10 = a6(t8), r12 = c8.create(t8), h6 = i10 / 2;
  2017. if (!n10)
  2018. return r12.seek(h6), void s10(r12.clone(), 0, h6 + 0 * e12, i10);
  2019. const d8 = Math.max((i10 - e12) / 2, 0), u12 = Math.floor(d8 / e12), o12 = h6 - u12 * e12;
  2020. r12.seek(o12);
  2021. for (let a7 = -u12; a7 <= u12; a7++)
  2022. r12.x < 512 && r12.x >= 0 && r12.y < 512 && r12.y >= 0 && s10(r12.clone(), a7, h6 + a7 * e12, i10), r12.seek(e12);
  2023. }
  2024. function l4(t8, e12) {
  2025. const s10 = e12;
  2026. for (let n10 = 0; n10 < t8.length; n10++) {
  2027. let e13 = t8[n10];
  2028. const i10 = [];
  2029. i10.push(e13[0]);
  2030. for (let t9 = 1; t9 < e13.length; t9++) {
  2031. let [s11, n11] = i10[t9 - 1];
  2032. s11 += e13[t9][0], n11 += e13[t9][1], i10.push([s11, n11]);
  2033. }
  2034. g8(i10, s10);
  2035. const r12 = [];
  2036. r12.push(i10[0]);
  2037. for (let t9 = 1; t9 < i10.length; t9++) {
  2038. const [e14, s11] = i10[t9 - 1], [n11, h6] = i10[t9], a7 = Math.round(n11 - e14), d8 = Math.round(h6 - s11);
  2039. r12.push([a7, d8]);
  2040. }
  2041. t8[n10] = r12, e13 = r12;
  2042. }
  2043. return t8;
  2044. }
  2045. function g8(t8, e12) {
  2046. const r12 = 1e-6;
  2047. if (e12 <= 0)
  2048. return;
  2049. const h6 = t8.length;
  2050. if (h6 < 3)
  2051. return;
  2052. const a7 = [];
  2053. let d8 = 0;
  2054. a7.push(0);
  2055. for (let n10 = 1; n10 < h6; n10++)
  2056. d8 += u3(t8[n10], t8[n10 - 1]), a7.push(d8);
  2057. e12 = Math.min(e12, 0.2 * d8);
  2058. const c10 = [];
  2059. c10.push(t8[0][0]), c10.push(t8[0][1]);
  2060. const u12 = t8[h6 - 1][0], o12 = t8[h6 - 1][1], _5 = t6([0, 0], t8[0], t8[1]);
  2061. r6(_5), t8[0][0] += e12 * _5[0], t8[0][1] += e12 * _5[1], t6(_5, t8[h6 - 1], t8[h6 - 2]), r6(_5), t8[h6 - 1][0] += e12 * _5[0], t8[h6 - 1][1] += e12 * _5[1];
  2062. for (let s10 = 1; s10 < h6; s10++)
  2063. a7[s10] += e12;
  2064. a7[h6 - 1] += e12;
  2065. const l7 = 0.5 * e12;
  2066. for (let s10 = 1; s10 < h6 - 1; s10++) {
  2067. let n10 = 0, i10 = 0, d9 = 0;
  2068. for (let h7 = s10 - 1; h7 >= 0 && !(a7[h7 + 1] < a7[s10] - l7); h7--) {
  2069. const c11 = l7 + a7[h7 + 1] - a7[s10], u13 = a7[h7 + 1] - a7[h7], o13 = a7[s10] - a7[h7] < l7 ? 1 : c11 / u13;
  2070. if (Math.abs(o13) < r12)
  2071. break;
  2072. const _6 = o13 * o13, g9 = o13 * c11 - 0.5 * _6 * u13, x10 = o13 * u13 / e12, f14 = t8[h7 + 1], y8 = t8[h7][0] - f14[0], k5 = t8[h7][1] - f14[1];
  2073. n10 += x10 / g9 * (f14[0] * o13 * c11 + 0.5 * _6 * (c11 * y8 - u13 * f14[0]) - _6 * o13 * u13 * y8 / 3), i10 += x10 / g9 * (f14[1] * o13 * c11 + 0.5 * _6 * (c11 * k5 - u13 * f14[1]) - _6 * o13 * u13 * k5 / 3), d9 += x10;
  2074. }
  2075. for (let c11 = s10 + 1; c11 < h6 && !(a7[c11 - 1] > a7[s10] + l7); c11++) {
  2076. const h7 = l7 - a7[c11 - 1] + a7[s10], u13 = a7[c11] - a7[c11 - 1], o13 = a7[c11] - a7[s10] < l7 ? 1 : h7 / u13;
  2077. if (Math.abs(o13) < r12)
  2078. break;
  2079. const _6 = o13 * o13, g9 = o13 * h7 - 0.5 * _6 * u13, x10 = o13 * u13 / e12, f14 = t8[c11 - 1], y8 = t8[c11][0] - f14[0], k5 = t8[c11][1] - f14[1];
  2080. n10 += x10 / g9 * (f14[0] * o13 * h7 + 0.5 * _6 * (h7 * y8 - u13 * f14[0]) - _6 * o13 * u13 * y8 / 3), i10 += x10 / g9 * (f14[1] * o13 * h7 + 0.5 * _6 * (h7 * k5 - u13 * f14[1]) - _6 * o13 * u13 * k5 / 3), d9 += x10;
  2081. }
  2082. c10.push(n10 / d9), c10.push(i10 / d9);
  2083. }
  2084. c10.push(u12), c10.push(o12);
  2085. for (let s10 = 0, n10 = 0; s10 < h6; s10++)
  2086. t8[s10][0] = c10[n10++], t8[s10][1] = c10[n10++];
  2087. }
  2088. // node_modules/@arcgis/core/views/2d/engine/webgl/mesh/templates/WGLLabelTemplate.js
  2089. var y7 = s.getLogger("esri.views.2d.engine.webgl.WGLLabelTemplate");
  2090. var x9 = (t8, i10 = "mapview-labeling") => y7.error(new s2(i10, t8));
  2091. var L3 = 1;
  2092. var P4 = 0;
  2093. var M6 = 4;
  2094. var S3 = 25;
  2095. function w6(e12, t8) {
  2096. const n10 = !!e12.minScale && t8.scaleToZoom(e12.minScale) || 0;
  2097. return o3(n10, 0, 25.5);
  2098. }
  2099. function v4(e12, t8) {
  2100. const n10 = !!e12.maxScale && t8.scaleToZoom(e12.maxScale) || 255;
  2101. return o3(n10, 0, 25.5);
  2102. }
  2103. function A2(e12) {
  2104. const t8 = new Map();
  2105. return (i10) => (t8.has(i10) || t8.set(i10, e12(i10)), t8.get(i10));
  2106. }
  2107. var Z3 = A2((e12) => {
  2108. let t8 = 0;
  2109. if (e12 === 0)
  2110. return 1 / 0;
  2111. for (; !(e12 % 2); )
  2112. t8++, e12 /= 2;
  2113. return t8;
  2114. });
  2115. var I = (e12) => Math.floor(127 * e12 + 127);
  2116. var O2 = (e12) => Math.floor(10 * e12);
  2117. var z3 = (e12) => Math.round(e12 * (254 / 360));
  2118. var G3 = class extends p6 {
  2119. constructor(e12, t8, i10, n10) {
  2120. super(e12, i10.font.size, i10.haloSize || 0, i10.font.size, i10.color && s4(i10.color) || 0, i10.haloColor && s4(i10.haloColor) || 0, i10.horizontalAlignment, i10.verticalAlignment, i3(t8.labelPlacement) ? i2.MAP : i2.SCREEN, i10.font.decoration, false, i10.angle || 0, i10.xoffset, i10.yoffset, i10.lineWidth, i10.lineHeight, null, null, null, null, null), this._outLineLabelAngle = 0, this._refPlacementPadding = 0, this._refPlacementDirX = 0, this._refPlacementDirY = 0, this._refOffsetX = 0, this._refOffsetY = 0, this._zoomLevel = 0, this.geometryType = E.LABEL, this._allowOverrun = t8.allowOverrun ?? false, this._repeatLabel = t8.repeatLabel ?? true, this._labelPosition = t8.labelPosition ?? "curved";
  2121. const o12 = w6(t8, n10), h6 = v4(t8, n10), c10 = t8.labelPlacement, [g9, u12] = a2(c10);
  2122. this._xAlignD = g9, this._yAlignD = u12, this._minZoom = o12, this._maxZoom = h6, this._refPlacementPadding = u(i10.haloSize) + k, this._repeatLabelDistance = t8.repeatLabelDistance ? u(t8.repeatLabelDistance) : 128;
  2123. const d8 = Z.load(e12);
  2124. d8.sdf = true, this._materialKey = d8.data;
  2125. }
  2126. static fromLabelClass(e12, t8) {
  2127. if (e12.labelPlacement === "esriServerLinePlacementCenterAlong") {
  2128. const t9 = e12.symbol;
  2129. t9.xoffset = 0, t9.yoffset = 0, t9.angle = 0, t9.font.decoration = "none";
  2130. }
  2131. return new G3(e12.materialKey, e12, e12.symbol, t8);
  2132. }
  2133. get _shapedBox() {
  2134. return e(this._shapingInfo).bounds;
  2135. }
  2136. setZoomLevel(e12) {
  2137. this._zoomLevel = e12;
  2138. }
  2139. bindReferenceTemplate(e12) {
  2140. let t8 = c2(this._xAlignD), i10 = o7(this._yAlignD);
  2141. if (this._refOffsetX = 0, this._refOffsetY = 0, t(e12))
  2142. return void (this._refSymbolAndPlacementOffset = x(0, 0, I(t8), I(i10)));
  2143. if (e12.boundsType === "circle" && (t8 || i10)) {
  2144. const e13 = Math.sqrt(t8 * t8 + i10 * i10);
  2145. t8 /= e13, i10 /= e13;
  2146. }
  2147. const n10 = Math.max(e12.height, e12.width), s10 = this._refPlacementPadding * M6;
  2148. this._refSymbolAndPlacementOffset = x(s10, n10, I(t8), I(i10)), this._referenceSize = n10, this._refPlacementDirX = t8, this._refPlacementDirY = i10, this._refOffsetX = e12.xOffset, this._refOffsetY = e12.yOffset;
  2149. }
  2150. _write(e12, t8) {
  2151. if (t(this._shapingInfo))
  2152. return;
  2153. const i10 = this._shapingInfo, n10 = t8.getDisplayId(), s10 = t8.geometryType === "esriGeometryPolygon" ? t8.readLegacyCentroid() : t8.readLegacyGeometry();
  2154. if (s10)
  2155. switch (this.current = { out: e12, inId: n10, inShaping: i10, zoomLevel: this._zoomLevel }, t8.geometryType) {
  2156. case "esriGeometryPolyline":
  2157. this._placeLineLabels(s10);
  2158. break;
  2159. case "esriGeometryPoint":
  2160. case "esriGeometryPolygon":
  2161. this._placePointLabels(s10);
  2162. break;
  2163. default:
  2164. x9("mapview-labeling", `Geometry of type ${t8.geometryType} is not supported`);
  2165. }
  2166. }
  2167. _isVisible(e12, t8) {
  2168. const i10 = O2(this.current.zoomLevel);
  2169. return O2(e12) <= i10 && i10 <= O2(t8);
  2170. }
  2171. _placePointLabels(e12) {
  2172. const { out: t8, inId: i10, inShaping: n10 } = this.current;
  2173. this._writeGlyphs(t8, i10, e12, n10);
  2174. }
  2175. _placeLineLabels(e12) {
  2176. const t8 = l4(e12.paths, this.current.inShaping.bounds.width), i10 = this._placeSubdivGlyphs.bind(this), n10 = (this._shapedBox.width + this._repeatLabelDistance) / (1 << L3);
  2177. for (const o12 of t8)
  2178. u10(o12, n10, i10, this._repeatLabel);
  2179. }
  2180. _placeSubdivGlyphs(e12, t8, i10, n10) {
  2181. const o12 = Z3(t8), s10 = this._shapedBox.width / (1 << L3), r12 = Math.sqrt(this._repeatLabelDistance) / (1 << L3), a7 = Math.min(i10, n10 - i10), l7 = this.current.inShaping.isMultiline ? S3 : Math.log2(a7 / (r12 + s10 / 2)), h6 = t8 === 0 ? l7 : Math.min(o12, l7), c10 = Math.max(this._minZoom, this.current.zoomLevel + L3 - h6), m6 = this.current.zoomLevel - c10, f14 = this._shapedBox.width / 2 * 2 ** m6;
  2182. this.current.inShaping.isMultiline ? t8 === 0 && this._placeStraight(e12, c10) : this._allowOverrun && m6 < 0 ? this._placeStraightAlong(e12, this._minZoom) : this._labelPosition === "parallel" ? this._placeStraightAlong(e12, c10) : this._labelPosition === "curved" && this._placeCurved(e12, c10, f14);
  2183. }
  2184. _placeStraight(e12, t8) {
  2185. const { out: i10, inId: n10, inShaping: o12 } = this.current, s10 = Math.ceil(e12.angle * (180 / Math.PI) % 360), r12 = Math.ceil((e12.angle * (180 / Math.PI) + 180) % 360);
  2186. this._outLineLabelAngle = z3(s10), this._writeGlyphs(i10, n10, e12, o12, t8), this._outLineLabelAngle = z3(r12), this._writeGlyphs(i10, n10, e12, o12, t8);
  2187. }
  2188. _placeCurved(e12, t8, i10) {
  2189. const { out: n10, inId: o12 } = this.current;
  2190. n10.metricStart(o12, t8, e12.x, e12.y, 0, 0, 0, 0);
  2191. const s10 = e12.clone(), r12 = e12.angle * (180 / Math.PI) % 360, a7 = (e12.angle * (180 / Math.PI) + 180) % 360;
  2192. this._outLineLabelAngle = z3(r12), this._placeFirst(s10, t8, 1), this._placeBack(e12, s10, t8, i10, 1), this._placeForward(e12, s10, t8, i10, 1), this._outLineLabelAngle = z3(a7), this._placeFirst(s10, t8, 0), this._placeBack(e12, s10, t8, i10, 0), this._placeForward(e12, s10, t8, i10, 0), n10.metricEnd();
  2193. }
  2194. _placeStraightAlong(e12, t8) {
  2195. const { out: i10, inId: n10 } = this.current;
  2196. i10.metricStart(n10, t8, e12.x, e12.y, 0, 0, 0, 0);
  2197. const o12 = e12.clone(), s10 = e12.angle * (180 / Math.PI) % 360, r12 = (e12.angle * (180 / Math.PI) + 180) % 360;
  2198. this._outLineLabelAngle = z3(s10), this._placeFirst(o12, t8, 1, true), this._outLineLabelAngle = z3(r12), this._placeFirst(o12, t8, 0, true), i10.metricEnd();
  2199. }
  2200. _placeBack(e12, t8, i10, n10, o12) {
  2201. const s10 = e12.clone();
  2202. let r12 = e12.backwardLength + P4;
  2203. for (; s10.prev() && !(r12 >= n10); )
  2204. this._placeOnSegment(s10, t8, r12, i10, -1, o12), r12 += s10.length + P4;
  2205. }
  2206. _placeForward(e12, t8, i10, n10, o12) {
  2207. const s10 = e12.clone();
  2208. let r12 = e12.remainingLength + P4;
  2209. for (; s10.next() && !(r12 >= n10); )
  2210. this._placeOnSegment(s10, t8, r12, i10, 1, o12), r12 += s10.length + P4;
  2211. }
  2212. _placeFirst(e12, t8, i10, n10 = false) {
  2213. const o12 = e12, s10 = this.current.inShaping, r12 = s10.glyphs, a7 = this.current.zoomLevel, { out: l7, inId: h6 } = this.current;
  2214. for (const c10 of r12) {
  2215. const r13 = c10.x > s10.bounds.x ? i10 : 1 - i10, m6 = r13 * e12.remainingLength + (1 - r13) * e12.backwardLength, f14 = Math.abs(c10.x + c10.width / 2 - s10.bounds.x), _5 = Math.max(0, a7 + Math.log2(f14 / (m6 + P4))), g9 = Math.max(t8, n10 ? 0 : _5);
  2216. if (c10.maxZoom = S3, c10.angle = e12.angle + (1 - i10) * Math.PI, c10.minZoom = g9, this._writeGlyph(l7, h6, o12.x, o12.y, c10), i10 && this._isVisible(c10.minZoom, c10.maxZoom)) {
  2217. const e13 = c10.bounds;
  2218. l7.metricBoxWrite(e13.center[0], e13.center[1], e13.width, e13.height);
  2219. }
  2220. }
  2221. }
  2222. _placeOnSegment(e12, t8, i10, n10, o12, s10) {
  2223. const r12 = this.current.inShaping.glyphs, { out: a7, inId: l7 } = this.current, h6 = this.current.inShaping, c10 = this.current.zoomLevel, m6 = e12.dx / e12.length, f14 = e12.dy / e12.length, _5 = { x: e12.x + i10 * -o12 * m6, y: e12.y + i10 * -o12 * f14 };
  2224. for (const g9 of r12) {
  2225. const r13 = g9.x > h6.bounds.x ? s10 : 1 - s10;
  2226. if (!(r13 && o12 === 1 || !r13 && o12 === -1))
  2227. continue;
  2228. const m7 = Math.abs(g9.x + g9.width / 2 - h6.bounds.x), f15 = Math.max(0, c10 + Math.log2(m7 / i10) - 0.1), p8 = Math.max(n10, c10 + Math.log2(m7 / (i10 + e12.length + P4)));
  2229. if (f15 !== 0 && (g9.angle = e12.angle + (1 - s10) * Math.PI, g9.minZoom = p8, g9.maxZoom = f15, this._writeGlyph(a7, l7, _5.x, _5.y, g9), s10 && this._isVisible(g9.minZoom, g9.maxZoom))) {
  2230. const i11 = g9.bounds, n11 = e12.x - t8.x, o13 = e12.y - t8.y;
  2231. a7.metricBoxWrite(i11.center[0] + n11, i11.center[1] + o13, i11.width, i11.height);
  2232. }
  2233. }
  2234. }
  2235. _writeGlyphs(e12, t8, i10, n10, o12 = this._minZoom) {
  2236. if (i10.x < 0 || i10.x >= 512 || i10.y < 0 || i10.y >= 512)
  2237. return;
  2238. const s10 = i10.x + this._refOffsetX, r12 = i10.y - this._refOffsetY;
  2239. for (const c10 of n10.glyphs)
  2240. c10.minZoom = o12, c10.maxZoom = this._maxZoom, this._writeGlyph(e12, t8, s10, r12, c10);
  2241. const a7 = this._refPlacementDirX, l7 = this._refPlacementDirY, h6 = n10.boundsT;
  2242. e12.metricStart(t8, o12, s10, r12, a7, l7, this._referenceSize, this._materialKey), e12.metricBoxWrite(h6.center[0], h6.center[1], h6.width, h6.height), e12.metricEnd();
  2243. }
  2244. _writeVertexCommon(e12, t8, i10, n10) {
  2245. const o12 = this._color, s10 = this._haloColor, r12 = x(0, 0, this._size, this._haloSize), a7 = Math.max(n10.minZoom, this._minZoom), l7 = Math.min(n10.maxZoom, this._maxZoom), h6 = x(O2(a7), O2(l7), this._outLineLabelAngle, 0);
  2246. e12.vertexWrite(i10), e12.vertexWrite(t8), e12.vertexWrite(o12), e12.vertexWrite(s10), e12.vertexWrite(r12), e12.vertexWrite(this._refSymbolAndPlacementOffset), e12.vertexWrite(h6);
  2247. }
  2248. };
  2249. // node_modules/@arcgis/core/views/2d/engine/webgl/mesh/factories/WGLMeshFactory.js
  2250. var l5 = class {
  2251. constructor(e12, t8, s10) {
  2252. this._loadPromise = o6(), this._geometryType = e12, this._idField = t8, this._templateStore = s10;
  2253. }
  2254. update(t8, r12) {
  2255. r(t8.mesh.labels) && (this._labelTemplates = this._createLabelTemplates(t8.mesh.labels, r12)), this._schema = t8;
  2256. }
  2257. _createLabelTemplates(e12, t8) {
  2258. const r12 = new Map();
  2259. if (e12.type === "simple") {
  2260. for (const s10 of e12.classes) {
  2261. const e13 = G3.fromLabelClass(s10, t8);
  2262. r12.set(s10.index, e13);
  2263. }
  2264. return r12;
  2265. }
  2266. for (const s10 in e12.classes) {
  2267. const o12 = e12.classes[s10];
  2268. for (const e13 of o12) {
  2269. const s11 = G3.fromLabelClass(e13, t8);
  2270. r12.set(e13.index, s11);
  2271. }
  2272. }
  2273. return r12;
  2274. }
  2275. get templates() {
  2276. return this._templateStore;
  2277. }
  2278. async analyze(r12, i10, o12, l7, n10, m6, p8) {
  2279. if (p(p8))
  2280. return;
  2281. let f14;
  2282. o12.type === "dictionary" && (f14 = await o12.analyze(this._idField, r12.copy(), i10, n10, m6, p8));
  2283. let c10 = 0;
  2284. for (; r12.next(); ) {
  2285. let t8;
  2286. if (t8 = f14 ? f14[c10++] : r(l7) && p2(r12.getDisplayId()) && r12.readAttribute("cluster_count") !== 1 ? l7.match(this._idField, r12, this._geometryType, n10, m6) : o12.match(this._idField, r12, this._geometryType, n10, m6), r12.setGroupId(t8), G2(t8)) {
  2287. const e12 = this._templateStore.getDynamicTemplateGroup(t8);
  2288. for (const t9 of e12)
  2289. t9 && t9.analyze && t9.analyze(this._templateStore, r12, n10, m6);
  2290. }
  2291. }
  2292. return await this._loadPromise, this._templateStore.finalize(p8);
  2293. }
  2294. async analyzeGraphics(e12, r12, s10, i10, o12, l7) {
  2295. if (p(l7))
  2296. return;
  2297. const n10 = e12.getCursor();
  2298. for (s10 && await s10.analyze(this._idField, n10.copy(), r12, i10, o12, l7); n10.next(); ) {
  2299. let e13 = n10.getGroupId();
  2300. if (e13 != null && e13 !== -1 || (e13 = s10.match(this._idField, n10, n10.geometryType, i10, o12), n10.setGroupId(e13)), G2(e13)) {
  2301. const t8 = this._templateStore.getDynamicTemplateGroup(e13);
  2302. for (const e14 of t8)
  2303. e14 && e14.analyze && e14.analyze(this._templateStore, n10, i10, o12);
  2304. }
  2305. n10.setGroupId(e13);
  2306. }
  2307. return await this._loadPromise, this._templateStore.finalize(l7);
  2308. }
  2309. writeGraphic(e12, t8, r12, s10) {
  2310. const i10 = t8.getGroupId(), o12 = t8.getDisplayId(), l7 = this._templateStore.getTemplateGroup(i10);
  2311. if (e12.featureStart(t8.insertAfter, 0), o12 != null) {
  2312. if (G2(i10))
  2313. for (const e13 of l7)
  2314. e13 && e13.bindFeature(t8, null, null);
  2315. if (l7) {
  2316. for (const i11 of l7)
  2317. i11 && i11.write(e12, t8, r12, s10);
  2318. e12.featureEnd();
  2319. }
  2320. }
  2321. }
  2322. writeCursor(t8, r12, s10, i10, o12, l7, n10) {
  2323. const m6 = r12.getGroupId(), p8 = r12.getDisplayId(), f14 = this._templateStore.getTemplateGroup(m6), c10 = this._schema.mesh.sortKey;
  2324. let d8 = 0;
  2325. if (r(c10) && (d8 = c10.fieldIndex != null ? r12.getComputedNumericAtIndex(c10.fieldIndex) : c10.field != null ? r12.readAttribute(c10.field) : r12.readAttribute(this._idField), d8 *= c10.order === "asc" ? 1 : -1), t8.featureStart(0, d8 == null || isNaN(d8) ? 0 : d8), p8 != null && f14) {
  2326. if (G2(m6))
  2327. for (const e12 of f14)
  2328. e12.bindFeature(r12, s10, i10);
  2329. for (const e12 of f14)
  2330. e12.write(t8, r12, o12, n10);
  2331. if (r(l7) && t8.hasRecords) {
  2332. const e12 = l7 && this._findLabelRef(f14);
  2333. this._writeLabels(t8, r12, l7, e12, o12, n10);
  2334. }
  2335. t8.featureEnd();
  2336. }
  2337. }
  2338. _findLabelRef(e12) {
  2339. for (const t8 of e12)
  2340. if (t8 instanceof b4)
  2341. return t8;
  2342. return null;
  2343. }
  2344. _writeLabels(t8, r12, s10, i10, o12, a7) {
  2345. for (const l7 of s10)
  2346. if (r(l7) && l7) {
  2347. const { glyphs: e12, rtl: s11, index: n10 } = l7, m6 = this._labelTemplates.get(n10);
  2348. m6.setZoomLevel(o12), m6.bindReferenceTemplate(i10), m6.bindTextInfo(e12, s11), m6.write(t8, r12, null, a7);
  2349. }
  2350. }
  2351. };
  2352. // node_modules/@arcgis/core/views/2d/engine/webgl/util/Matcher.js
  2353. var n9 = s.getLogger("esri/views/2d/engine/webgl/util/Matcher");
  2354. async function l6(e12, t8, s10, r12) {
  2355. switch (e12.type) {
  2356. case "simple":
  2357. case "heatmap":
  2358. return o11.fromBasicRenderer(e12, t8, s10, r12);
  2359. case "map":
  2360. return m5.fromUVRenderer(e12, t8, s10, r12);
  2361. case "interval":
  2362. return c9.fromCBRenderer(e12, t8, s10, r12);
  2363. case "dictionary":
  2364. return p7.fromDictionaryRenderer(e12, t8, s10, r12);
  2365. case "pie-chart":
  2366. return u11.fromPieChartRenderer(e12, t8, s10, r12);
  2367. case "subtype":
  2368. return u11.fromSubtypes(e12, t8, s10, r12);
  2369. }
  2370. }
  2371. var o11 = class {
  2372. constructor() {
  2373. this.type = "feature", this._defaultResult = null;
  2374. }
  2375. static async fromBasicRenderer(e12, t8, s10, r12) {
  2376. const i10 = new o11();
  2377. if (e12.symbol) {
  2378. const n10 = await n6(e12.symbol, s10, r12), l7 = t8.createTemplateGroup(n10, null);
  2379. i10.setDefault(l7);
  2380. }
  2381. return i10;
  2382. }
  2383. static async fromPieChartRenderer(e12, t8, s10, r12) {
  2384. const i10 = new o11();
  2385. if (e12.markerSymbol) {
  2386. const n10 = await n6(e12.markerSymbol, s10, r12);
  2387. let l7;
  2388. e12.fillSymbol && (l7 = await n6(e12.fillSymbol, s10, r12));
  2389. const o12 = t8.createTemplateGroup(n10, l7);
  2390. i10.setDefault(o12);
  2391. }
  2392. return i10;
  2393. }
  2394. size() {
  2395. return 1;
  2396. }
  2397. getDefault() {
  2398. return this._defaultResult;
  2399. }
  2400. setDefault(e12) {
  2401. this._defaultResult = e12;
  2402. }
  2403. match(e12, t8, s10, r12, i10) {
  2404. return this.getDefault();
  2405. }
  2406. async analyze(e12, t8, s10, r12, i10, a7) {
  2407. return null;
  2408. }
  2409. };
  2410. var u11 = class extends o11 {
  2411. constructor(e12, t8) {
  2412. super(), this._subMatchers = e12, this._subtypeField = t8;
  2413. }
  2414. static async fromSubtypes(e12, t8, s10, r12) {
  2415. const i10 = new Map(), a7 = [];
  2416. for (const n10 in e12.renderers) {
  2417. const o12 = parseInt(n10, 10), u12 = l6(e12.renderers[n10], t8, s10, r12).then((e13) => i10.set(o12, e13));
  2418. a7.push(u12);
  2419. }
  2420. return await Promise.all(a7), new u11(i10, e12.subtypeField);
  2421. }
  2422. match(e12, t8, s10, r12, i10) {
  2423. const a7 = t8.readAttribute(this._subtypeField), n10 = this._subMatchers.get(a7);
  2424. return n10 ? n10.match(e12, t8, s10, r12, i10) : null;
  2425. }
  2426. };
  2427. var c9 = class extends o11 {
  2428. constructor(e12, t8, s10, r12) {
  2429. super(), this.type = "interval", this._intervals = [], this._isMaxInclusive = t8, this._fieldIndex = r12, this._field = e12, this._normalizationInfo = s10;
  2430. }
  2431. static async fromCBRenderer(e12, t8, s10, r12) {
  2432. const { isMaxInclusive: i10, normalizationField: n10, normalizationTotal: l7, normalizationType: o12 } = e12, u12 = e12.field, m6 = new c9(u12, i10, { normalizationField: n10, normalizationTotal: l7, normalizationType: o12 }, e12.fieldIndex), d8 = await n6(e12.backgroundFillSymbol, s10, r12);
  2433. await Promise.all(e12.intervals.map(async (e13) => {
  2434. const i11 = await n6(e13.symbol, s10, r12), n11 = await t8.createTemplateGroup(i11, d8), l8 = { min: e13.min, max: e13.max };
  2435. m6.add(l8, n11);
  2436. }));
  2437. const h6 = await n6(e12.defaultSymbol, s10, r12);
  2438. if (h6) {
  2439. const e13 = await t8.createTemplateGroup(h6, d8);
  2440. m6.setDefault(e13);
  2441. }
  2442. return m6;
  2443. }
  2444. add(e12, t8) {
  2445. this._intervals.push({ interval: e12, result: t8 }), this._intervals.sort((e13, t9) => e13.interval.min - t9.interval.min);
  2446. }
  2447. size() {
  2448. return super.size() + this._intervals.length;
  2449. }
  2450. match(e12, t8, s10, r12, i10) {
  2451. if (this._fieldIndex == null && !this._field)
  2452. return this.getDefault();
  2453. const a7 = this._fieldIndex != null ? t8.getComputedNumericAtIndex(this._fieldIndex) : this._getValueFromField(t8);
  2454. if (!a7 && (a7 == null || isNaN(a7)))
  2455. return this.getDefault();
  2456. for (let n10 = 0; n10 < this._intervals.length; n10++) {
  2457. const { interval: e13, result: t9 } = this._intervals[n10], s11 = a7 >= e13.min, r13 = this._isMaxInclusive ? a7 <= e13.max : a7 < e13.max;
  2458. if (s11 && r13)
  2459. return t9;
  2460. }
  2461. return this.getDefault();
  2462. }
  2463. _needsNormalization() {
  2464. const e12 = this._normalizationInfo;
  2465. return e12 && (e12.normalizationField || e12.normalizationTotal || e12.normalizationType);
  2466. }
  2467. _getValueFromField(e12) {
  2468. const t8 = e12.readAttribute(this._field);
  2469. if (!this._needsNormalization() || t8 == null)
  2470. return t8;
  2471. const { normalizationField: s10, normalizationTotal: r12, normalizationType: i10 } = this._normalizationInfo, a7 = !!s10 && e12.readAttribute(s10);
  2472. if (i10)
  2473. switch (i10) {
  2474. case "esriNormalizeByField":
  2475. return a7 ? t8 / a7 : void 0;
  2476. case "esriNormalizeByLog":
  2477. return Math.log(t8) * Math.LOG10E;
  2478. case "esriNormalizeByPercentOfTotal":
  2479. return t8 / r12 * 100;
  2480. default:
  2481. return void n9.error(`Found unknown normalization type: ${i10}`);
  2482. }
  2483. else
  2484. n9.error("Normalization is required, but no type was set!");
  2485. }
  2486. };
  2487. var m5 = class extends o11 {
  2488. constructor(e12, t8, s10) {
  2489. super(), this.type = "map", this._nullResult = null, this._resultsMap = new Map(), this._fieldsIndex = s10, this._fields = e12, this._seperator = t8 || "";
  2490. }
  2491. static async fromUVRenderer(e12, t8, s10, r12) {
  2492. const i10 = e12.fieldDelimiter, n10 = [e12.field];
  2493. e12.field2 && n10.push(e12.field2), e12.field3 && n10.push(e12.field3);
  2494. const l7 = await n6(e12.backgroundFillSymbol, s10, r12), o12 = new m5(n10, i10, e12.fieldIndex);
  2495. await Promise.all(e12.map.map(async (e13) => {
  2496. const i11 = await n6(e13.symbol, s10, r12), n11 = await t8.createTemplateGroup(i11, l7);
  2497. e13.value === "<Null>" ? o12.setNullResult(n11) : o12.add(e13.value, n11);
  2498. }));
  2499. const u12 = await n6(e12.defaultSymbol, s10, r12);
  2500. if (u12) {
  2501. const e13 = await t8.createTemplateGroup(u12, l7);
  2502. o12.setDefault(e13);
  2503. }
  2504. return o12;
  2505. }
  2506. setNullResult(e12) {
  2507. this._nullResult = e12;
  2508. }
  2509. add(e12, t8) {
  2510. this._resultsMap.set(e12.toString(), t8);
  2511. }
  2512. size() {
  2513. return super.size() + this._resultsMap.size;
  2514. }
  2515. match(e12, t8, s10, r12, i10) {
  2516. if (this._fieldsIndex == null && !this._fields)
  2517. return this.getDefault();
  2518. const a7 = this._fieldsIndex != null ? t8.getComputedStringAtIndex(this._fieldsIndex) : this._getValueFromFields(t8);
  2519. if (this._nullResult !== null && (a7 == null || a7 === "" || a7 === "<Null>"))
  2520. return this._nullResult;
  2521. if (!a7 && a7 == null)
  2522. return this.getDefault();
  2523. const n10 = a7.toString();
  2524. return this._resultsMap.has(n10) ? this._resultsMap.get(n10) : this.getDefault();
  2525. }
  2526. _getValueFromFields(e12) {
  2527. const t8 = [];
  2528. for (const s10 of this._fields) {
  2529. const r12 = e12.readAttribute(s10);
  2530. r12 == null || r12 === "" ? t8.push("<Null>") : t8.push(r12);
  2531. }
  2532. return t8.join(this._seperator);
  2533. }
  2534. };
  2535. async function d7(e12, t8) {
  2536. const s10 = e12 || 1;
  2537. if (typeof s10 == "number")
  2538. return (e13, t9, r12) => s10;
  2539. const a7 = await i5(s10, t8.spatialReference, t8.fields);
  2540. return (e13, s11, r12) => s7(a7, e13, { $view: r12 }, t8.geometryType, s11) || 1;
  2541. }
  2542. var h5;
  2543. async function f13() {
  2544. return h5 || (h5 = import("./createSymbolSchema-YZAV6Y5T.js")), h5;
  2545. }
  2546. var p7 = class extends o11 {
  2547. constructor(e12, t8, r12, i10, a7, n10) {
  2548. super(), this.type = "dictionary", this._groupIdCache = new e6(100), this._loader = e12, this._fieldMap = e12.fieldMap, this._symbolFields = e12.getSymbolFields(), this._templates = t8, this._info = r12, this._scaleFn = i10, this._schemaUtilsModule = a7, this._symbolOptions = n10;
  2549. }
  2550. static async fromDictionaryRenderer(e12, t8, s10, r12) {
  2551. const [{ DictionaryLoader: i10 }, a7] = await Promise.all([import("./DictionaryLoader-Y45KZHCI.js"), f13()]), n10 = new i10(e12.url, e12.config, e12.fieldMap);
  2552. await n10.fetchResources({ spatialReference: s10.spatialReference, fields: s10.fields });
  2553. const l7 = await d7(e12.scaleExpression, s10);
  2554. return new p7(n10, t8, s10, l7, a7, e12.symbolOptions);
  2555. }
  2556. async _analyzeFeature(t8, s10, r12, i10, l7) {
  2557. const o12 = t8.readLegacyFeature(), u12 = this._scaleFn(o12, r12, i10), c10 = this._attributeHash(o12) + "-" + u12, m6 = this._groupIdCache.get(c10);
  2558. if (m6)
  2559. return m6;
  2560. const d8 = { ...i10, spatialReference: this._info.spatialReference, abortOptions: l7, fields: this._info.fields }, h6 = await this._loader.getSymbolAsync(o12, d8), f14 = this._schemaUtilsModule.createSymbolSchema(h6, this._symbolOptions), p8 = n6(f14, this._info, s10, l7).then((t9) => {
  2561. if (t9.type !== "expanded-cim")
  2562. return n9.error(new s2("mapview-bad-type", `Found unexpected type ${t9.type} in dictionary response`)), null;
  2563. t9.hash += "-" + u12;
  2564. for (const e12 of t9.layers)
  2565. e12.scaleFactor = u12, e12.templateHash += "-" + u12;
  2566. return this._templates.createTemplateGroup(t9, null);
  2567. });
  2568. return this._groupIdCache.put(c10, p8, 1), p8;
  2569. }
  2570. async analyze(e12, t8, s10, r12, i10, a7) {
  2571. const n10 = t8.getCursor(), l7 = [];
  2572. for (; n10.next(); )
  2573. l7.push(this._analyzeFeature(n10, s10, r12, i10, a7));
  2574. return Promise.all(l7);
  2575. }
  2576. match(e12, t8, s10, r12, i10) {
  2577. return null;
  2578. }
  2579. _attributeHash(e12) {
  2580. let t8 = "";
  2581. for (const s10 of this._symbolFields) {
  2582. const r12 = this._fieldMap[s10];
  2583. r12 && (t8 += e12.attributes[r12] + "-");
  2584. }
  2585. return t8;
  2586. }
  2587. };
  2588. export {
  2589. e7 as e,
  2590. E2 as E,
  2591. e10 as e2,
  2592. t5 as t,
  2593. x8 as x,
  2594. l5 as l,
  2595. l6 as l2
  2596. };
  2597. //# sourceMappingURL=chunk-PS4B3D6M.js.map