chunk-67RFR4NT.js 234 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731
  1. import {
  2. o as o5
  3. } from "./chunk-WPDBODJM.js";
  4. import {
  5. a as a3
  6. } from "./chunk-5IVP3KUS.js";
  7. import {
  8. C as C2
  9. } from "./chunk-UCPKJYXN.js";
  10. import {
  11. t as t5
  12. } from "./chunk-KFLNKWNF.js";
  13. import {
  14. n as n4
  15. } from "./chunk-YQBYWPBD.js";
  16. import {
  17. w as w2
  18. } from "./chunk-UO3LS2M5.js";
  19. import {
  20. A,
  21. B as B2,
  22. C as C3,
  23. K,
  24. O,
  25. P,
  26. R,
  27. U,
  28. X,
  29. Y,
  30. Z,
  31. a,
  32. e as e4,
  33. i as i2,
  34. ie,
  35. k,
  36. l as l3,
  37. m as m2,
  38. n,
  39. ne,
  40. o as o3,
  41. oe,
  42. u as u5,
  43. w,
  44. y as y3
  45. } from "./chunk-QISOH77W.js";
  46. import {
  47. dt,
  48. f as f2,
  49. j
  50. } from "./chunk-XO5VJRK4.js";
  51. import {
  52. e as e5,
  53. t as t3
  54. } from "./chunk-27YO3FKC.js";
  55. import {
  56. B,
  57. C,
  58. q,
  59. v
  60. } from "./chunk-UMUHMVL4.js";
  61. import {
  62. a as a2,
  63. n as n2
  64. } from "./chunk-JEA4MMTV.js";
  65. import {
  66. e as e6,
  67. h,
  68. i as i3,
  69. o as o4
  70. } from "./chunk-RG3AHHRL.js";
  71. import {
  72. A as A2,
  73. F,
  74. I,
  75. L,
  76. P as P2,
  77. S,
  78. b,
  79. c as c3,
  80. d,
  81. g as g2,
  82. h as h2,
  83. i as i4,
  84. k as k2,
  85. l as l4,
  86. m as m3,
  87. p,
  88. s as s6,
  89. t as t6,
  90. u as u6,
  91. w as w3,
  92. x
  93. } from "./chunk-XHRNCFJT.js";
  94. import {
  95. n as n3,
  96. t as t4
  97. } from "./chunk-UDYHZLTE.js";
  98. import {
  99. r as r3,
  100. z
  101. } from "./chunk-E3G7BRZB.js";
  102. import {
  103. o as o6,
  104. p as p2
  105. } from "./chunk-4T5ZGMEN.js";
  106. import {
  107. m,
  108. o as o2,
  109. u as u3
  110. } from "./chunk-2H5MD622.js";
  111. import {
  112. e as e3,
  113. u as u4
  114. } from "./chunk-UVVU4UUO.js";
  115. import {
  116. l as l2
  117. } from "./chunk-X4SA4ELJ.js";
  118. import {
  119. f,
  120. l,
  121. s as s5,
  122. u as u2,
  123. y as y2
  124. } from "./chunk-RMDDCMKS.js";
  125. import {
  126. M,
  127. c as c2,
  128. g2 as g,
  129. i,
  130. o,
  131. r as r2,
  132. s as s3,
  133. s2 as s4,
  134. u2 as u
  135. } from "./chunk-VCH45Q2I.js";
  136. import {
  137. G
  138. } from "./chunk-6T6G6LCQ.js";
  139. import {
  140. e
  141. } from "./chunk-U2XHEJM7.js";
  142. import {
  143. s2 as s,
  144. s3 as s2
  145. } from "./chunk-E5O6P5I2.js";
  146. import {
  147. c,
  148. has,
  149. y
  150. } from "./chunk-SPWQ3AWG.js";
  151. import {
  152. t as t2
  153. } from "./chunk-2TIUKVZN.js";
  154. import {
  155. e as e2,
  156. r,
  157. t
  158. } from "./chunk-YXWMMD76.js";
  159. // node_modules/@arcgis/core/core/BidiText.js
  160. var i5 = new C2();
  161. function n5(r19) {
  162. if (!i5.hasBidiChar(r19))
  163. return [r19, false];
  164. let n17;
  165. return n17 = "rtl" === i5.checkContextual(r19) ? "IDNNN" : "ICNNN", [i5.bidiTransform(r19, n17, "VLYSN"), true];
  166. }
  167. // node_modules/@arcgis/core/symbols/cim/CIMPlacements.js
  168. var t7 = class {
  169. constructor() {
  170. this.setIdentity();
  171. }
  172. getAngle() {
  173. return (null == this.rz || 0 === this.rz && 1 !== this.rzCos && 0 !== this.rzSin) && (this.rz = Math.atan2(this.rzSin, this.rzCos)), this.rz;
  174. }
  175. setIdentity() {
  176. this.tx = 0, this.ty = 0, this.tz = 0, this.s = 1, this.rx = 0, this.ry = 0, this.rz = 0, this.rzCos = 1, this.rzSin = 0;
  177. }
  178. setTranslate(t12, s13) {
  179. this.tx = t12, this.ty = s13;
  180. }
  181. setTranslateZ(t12) {
  182. this.tz = t12;
  183. }
  184. setRotateCS(t12, s13) {
  185. this.rz = void 0, this.rzCos = t12, this.rzSin = s13;
  186. }
  187. setRotate(t12) {
  188. this.rz = t12, this.rzCos = void 0, this.rzSin = void 0;
  189. }
  190. setRotateY(t12) {
  191. this.ry = t12;
  192. }
  193. setScale(t12) {
  194. this.s = t12;
  195. }
  196. setMeasure(t12) {
  197. this.m = t12;
  198. }
  199. };
  200. // node_modules/@arcgis/core/symbols/cim/CIMEffects.js
  201. var r4 = class {
  202. constructor(t12) {
  203. this._geometry = t12;
  204. }
  205. next() {
  206. const t12 = this._geometry;
  207. return this._geometry = null, t12;
  208. }
  209. };
  210. // node_modules/@arcgis/core/symbols/cim/CIMImageColorSubstitutionHelper.js
  211. var a4 = class {
  212. applyColorSubstituition(t12, a15) {
  213. if (!a15)
  214. return t12;
  215. this._rasterizationCanvas || (this._rasterizationCanvas = document.createElement("canvas"));
  216. const { width: e15, height: n17 } = t12, o12 = this._rasterizationCanvas, r19 = o12.getContext("2d");
  217. t12 !== o12 && (o12.width = e15, o12.height = n17, r19.drawImage(t12, 0, 0, e15, n17));
  218. const i11 = r19.getImageData(0, 0, e15, n17).data;
  219. if (a15) {
  220. for (const l12 of a15)
  221. if (l12 && l12.oldColor && 4 === l12.oldColor.length && l12.newColor && 4 === l12.newColor.length) {
  222. const [t13, a16, e16, n18] = l12.oldColor, [o13, r20, s14, g8] = l12.newColor;
  223. if (t13 === o13 && a16 === r20 && e16 === s14 && n18 === g8)
  224. continue;
  225. for (let l13 = 0; l13 < i11.length; l13 += 4)
  226. t13 === i11[l13] && a16 === i11[l13 + 1] && e16 === i11[l13 + 2] && n18 === i11[l13 + 3] && (i11[l13] = o13, i11[l13 + 1] = r20, i11[l13 + 2] = s14, i11[l13 + 3] = g8);
  227. }
  228. }
  229. const s13 = new ImageData(i11, e15, n17);
  230. return r19.putImageData(s13, 0, 0), o12;
  231. }
  232. tintImageData(a15, e15) {
  233. if (!e15)
  234. return a15;
  235. this._rasterizationCanvas || (this._rasterizationCanvas = document.createElement("canvas"));
  236. const { width: n17, height: o12 } = a15, r19 = this._rasterizationCanvas, i11 = r19.getContext("2d");
  237. a15 !== r19 && (r19.width = n17, r19.height = o12, i11.drawImage(a15, 0, 0, n17, o12));
  238. const s13 = i11.getImageData(0, 0, n17, o12), l12 = new Uint8Array(s13.data), g8 = new l2(e15), h8 = [g8.r / 255, g8.g / 255, g8.b / 255, g8.a];
  239. for (let t12 = 0; t12 < l12.length; t12 += 4)
  240. l12[t12 + 0] *= h8[0], l12[t12 + 1] *= h8[1], l12[t12 + 2] *= h8[2], l12[t12 + 3] *= h8[3];
  241. const d4 = new ImageData(new Uint8ClampedArray(l12.buffer), n17, o12);
  242. return i11.putImageData(d4, 0, 0), r19;
  243. }
  244. };
  245. // node_modules/@arcgis/core/symbols/cim/CIMCursor.js
  246. function a5(i11) {
  247. const n17 = y(i11);
  248. return P3(n17), n17;
  249. }
  250. function l5(t12) {
  251. t12 && (s5(t12) ? t12.y = -t12.y : y2(t12) ? u7(t12.rings) : f(t12) ? u7(t12.paths) : l(t12) && r5(t12.points));
  252. }
  253. function r5(t12) {
  254. if (t12) {
  255. const i11 = t12.length;
  256. for (let n17 = 0; n17 < i11; n17++)
  257. t12[n17][1] = -t12[n17][1];
  258. }
  259. }
  260. function u7(t12) {
  261. if (t12)
  262. for (const i11 of t12)
  263. r5(i11);
  264. }
  265. function c4(t12) {
  266. if (t12) {
  267. for (let i11 = t12.length - 1; i11 > 0; --i11)
  268. t12[i11][0] -= t12[i11 - 1][0], t12[i11][1] -= t12[i11 - 1][1];
  269. }
  270. }
  271. function f3(t12) {
  272. if (t12)
  273. for (const i11 of t12)
  274. c4(i11);
  275. }
  276. function p3(t12) {
  277. if (t12) {
  278. const i11 = t12.length;
  279. for (let n17 = 1; n17 < i11; ++n17)
  280. t12[n17][0] += t12[n17 - 1][0], t12[n17][1] += t12[n17 - 1][1];
  281. }
  282. }
  283. function m4(t12) {
  284. if (t12)
  285. for (const i11 of t12)
  286. p3(i11);
  287. }
  288. function P3(t12) {
  289. t12 && (y2(t12) ? m4(t12.rings) : f(t12) ? m4(t12.paths) : l(t12) && p3(t12.points), l5(t12));
  290. }
  291. function x2(t12) {
  292. t12 && (l5(t12), y2(t12) ? f3(t12.rings) : f(t12) ? f3(t12.paths) : l(t12) && c4(t12.points));
  293. }
  294. function g3(t12) {
  295. if (t12)
  296. for (const i11 of t12)
  297. d2(i11);
  298. }
  299. function d2(t12) {
  300. t12 && t12.reverse();
  301. }
  302. function C4(t12, i11, n17) {
  303. return [t12[0] + (i11[0] - t12[0]) * n17, t12[1] + (i11[1] - t12[1]) * n17];
  304. }
  305. function y4(t12) {
  306. return !(!t12 || 0 === t12.length) && (t12[0][0] === t12[t12.length - 1][0] && t12[0][1] === t12[t12.length - 1][1]);
  307. }
  308. function I2(t12) {
  309. return t12[4];
  310. }
  311. function j2(t12, i11) {
  312. t12[4] = i11;
  313. }
  314. var G2 = class {
  315. constructor(t12, s13, e15, a15 = 0) {
  316. this.isClosed = false, this.multiPath = null, this.acceptPolygon = s13, this.acceptPolyline = e15, this.geomUnitsPerPoint = a15, this.pathCount = -1, this.pathIndex = -1, this.iteratePath = false, t12 && (y2(t12) ? s13 && (this.multiPath = t12.rings, this.isClosed = true) : f(t12) ? e15 && (this.multiPath = t12.paths, this.isClosed = false) : u2(t12) && s13 && (this.multiPath = b2(t12).rings, this.isClosed = true), this.multiPath && (this.pathCount = this.multiPath.length)), this.internalPlacement = new t7();
  317. }
  318. next() {
  319. if (!this.multiPath)
  320. return null;
  321. for (; this.iteratePath || this.pathIndex < this.pathCount - 1; ) {
  322. this.iteratePath || this.pathIndex++;
  323. const t12 = this.processPath(this.multiPath[this.pathIndex]);
  324. if (t12)
  325. return t12;
  326. }
  327. return this.pathCount = -1, this.pathIndex = -1, this.multiPath = null, null;
  328. }
  329. };
  330. var U2 = class {
  331. constructor(t12, i11, n17, s13 = 0) {
  332. this.isClosed = false, this.multiPath = null, this.inputGeometries = t12, this.acceptPolygon = i11, this.acceptPolyline = n17, this.geomUnitsPerPoint = s13, this.pathCount = -1, this.pathIndex = -1, this.iteratePath = false;
  333. }
  334. next() {
  335. for (; ; ) {
  336. if (!this.multiPath) {
  337. let t12 = this.inputGeometries.next();
  338. for (; t12; ) {
  339. if (y2(t12) ? this.acceptPolygon && (this.multiPath = t12.rings, this.isClosed = true) : f(t12) ? this.acceptPolyline && (this.multiPath = t12.paths, this.isClosed = false) : u2(t12) && this.acceptPolygon && (this.multiPath = b2(t12).rings, this.isClosed = true), this.multiPath) {
  340. this.pathCount = this.multiPath.length, this.pathIndex = -1;
  341. break;
  342. }
  343. t12 = this.inputGeometries.next();
  344. }
  345. if (!this.multiPath)
  346. return null;
  347. }
  348. for (; this.iteratePath || this.pathIndex < this.pathCount - 1; ) {
  349. this.iteratePath || this.pathIndex++;
  350. const t12 = this.processPath(this.multiPath[this.pathIndex]);
  351. if (t12)
  352. return t12;
  353. }
  354. this.pathCount = -1, this.pathIndex = -1, this.multiPath = null;
  355. }
  356. }
  357. };
  358. function b2(t12) {
  359. return { rings: [[[t12.xmin, t12.ymin], [t12.xmin, t12.ymax], [t12.xmax, t12.ymax], [t12.xmax, t12.ymin], [t12.xmin, t12.ymin]]] };
  360. }
  361. // node_modules/@arcgis/core/symbols/cim/effects/EffectAddControlPoints.js
  362. var o7 = class {
  363. static local() {
  364. return null === o7.instance && (o7.instance = new o7()), o7.instance;
  365. }
  366. execute(s13, t12, e15, i11) {
  367. return new r6(s13, t12, e15);
  368. }
  369. };
  370. o7.instance = null;
  371. var r6 = class {
  372. constructor(s13, t12, e15) {
  373. this._inputGeometries = s13, this._angleTolerance = void 0 !== t12.angleTolerance ? t12.angleTolerance : 120, this._maxCosAngle = Math.cos((1 - Math.abs(this._angleTolerance) / 180) * Math.PI);
  374. }
  375. next() {
  376. let n17 = this._inputGeometries.next();
  377. for (; n17; ) {
  378. if (y2(n17)) {
  379. this._isClosed = true;
  380. const t12 = y(n17);
  381. return this._processMultipath(t12.rings), t12;
  382. }
  383. if (f(n17)) {
  384. this._isClosed = false;
  385. const t12 = y(n17);
  386. return this._processMultipath(t12.paths), t12;
  387. }
  388. if (u2(n17)) {
  389. if (this._maxCosAngle)
  390. return n17;
  391. this._isClosed = true;
  392. const s13 = [[n17.xmin, n17.ymin], [n17.xmin, n17.ymax], [n17.xmax, n17.ymax], [n17.xmax, n17.ymin], [n17.xmin, n17.ymin]];
  393. return this._processPath(s13), { rings: [s13] };
  394. }
  395. n17 = this._inputGeometries.next();
  396. }
  397. return null;
  398. }
  399. _processMultipath(s13) {
  400. if (s13)
  401. for (const t12 of s13)
  402. this._processPath(t12);
  403. }
  404. _processPath(s13) {
  405. if (s13) {
  406. let t12, e15, i11, o12, r19, l12, a15 = s13.length, h8 = s13[0];
  407. this._isClosed && ++a15;
  408. for (let c12 = 1; c12 < a15; ++c12) {
  409. let m9;
  410. m9 = this._isClosed && c12 === a15 - 1 ? s13[0] : s13[c12];
  411. const _4 = m9[0] - h8[0], u15 = m9[1] - h8[1], p6 = Math.sqrt(_4 * _4 + u15 * u15);
  412. if (c12 > 1 && p6 > 0 && i11 > 0) {
  413. (t12 * _4 + e15 * u15) / p6 / i11 <= this._maxCosAngle && j2(h8, 1);
  414. }
  415. 1 === c12 && (o12 = _4, r19 = u15, l12 = p6), p6 > 0 && (h8 = m9, t12 = _4, e15 = u15, i11 = p6);
  416. }
  417. if (this._isClosed && i11 > 0 && l12 > 0) {
  418. (t12 * o12 + e15 * r19) / l12 / i11 <= this._maxCosAngle && j2(s13[0], 1);
  419. }
  420. }
  421. }
  422. };
  423. // node_modules/@arcgis/core/symbols/cim/CurveHelper.js
  424. var e7 = 0.03;
  425. var s7 = class {
  426. constructor() {
  427. this._path = [];
  428. }
  429. path() {
  430. return this._path;
  431. }
  432. addPath(t12, e15) {
  433. e15 || t12.reverse(), Array.prototype.push.apply(this._path, t12), e15 || t12.reverse();
  434. }
  435. static mergePath(t12, e15) {
  436. e15 && Array.prototype.push.apply(t12, e15);
  437. }
  438. startPath(t12) {
  439. this._path.push(t12);
  440. }
  441. lineTo(t12) {
  442. this._path.push(t12);
  443. }
  444. close() {
  445. const t12 = this._path;
  446. t12.length > 1 && (t12[0][0] === t12[t12.length - 1][0] && t12[0][1] === t12[t12.length - 1][1] || t12.push([t12[0][0], t12[0][1]]));
  447. }
  448. };
  449. var n6 = class {
  450. constructor(t12 = 0, e15 = false) {
  451. }
  452. normalize(t12) {
  453. const e15 = Math.sqrt(t12[0] * t12[0] + t12[1] * t12[1]);
  454. 0 !== e15 && (t12[0] /= e15, t12[1] /= e15);
  455. }
  456. calculateLength(t12, e15) {
  457. const s13 = e15[0] - t12[0], n17 = e15[1] - t12[1];
  458. return Math.sqrt(s13 * s13 + n17 * n17);
  459. }
  460. calculateSegLength(t12, e15) {
  461. return this.calculateLength(t12[e15], t12[e15 + 1]);
  462. }
  463. calculatePathLength(t12) {
  464. let e15 = 0;
  465. const s13 = t12 ? t12.length : 0;
  466. for (let n17 = 0; n17 < s13 - 1; ++n17)
  467. e15 += this.calculateSegLength(t12, n17);
  468. return e15;
  469. }
  470. calculatePathArea(t12) {
  471. let e15 = 0;
  472. const s13 = t12 ? t12.length : 0;
  473. for (let n17 = 0; n17 < s13 - 1; ++n17)
  474. e15 += (t12[n17 + 1][0] - t12[n17][0]) * (t12[n17 + 1][1] + t12[n17][1]);
  475. return e15 / 2;
  476. }
  477. getCoord2D(t12, e15, s13) {
  478. return [t12[0] + (e15[0] - t12[0]) * s13, t12[1] + (e15[1] - t12[1]) * s13];
  479. }
  480. getSegCoord2D(t12, e15, s13) {
  481. return this.getCoord2D(t12[e15], t12[e15 + 1], s13);
  482. }
  483. getAngle(t12, e15, s13) {
  484. const n17 = e15[0] - t12[0], r19 = e15[1] - t12[1];
  485. return Math.atan2(r19, n17);
  486. }
  487. getSegAngle(t12, e15, s13) {
  488. return this.getAngle(t12[e15], t12[e15 + 1], s13);
  489. }
  490. getAngleCS(t12, e15, s13) {
  491. const n17 = e15[0] - t12[0], r19 = e15[1] - t12[1], h8 = Math.sqrt(n17 * n17 + r19 * r19);
  492. return h8 > 0 ? [n17 / h8, r19 / h8] : [1, 0];
  493. }
  494. getSegAngleCS(t12, e15, s13) {
  495. return this.getAngleCS(t12[e15], t12[e15 + 1], s13);
  496. }
  497. cut(t12, e15, s13, n17) {
  498. return [s13 <= 0 ? t12[e15] : this.getSegCoord2D(t12, e15, s13), n17 >= 1 ? t12[e15 + 1] : this.getSegCoord2D(t12, e15, n17)];
  499. }
  500. addSegment(t12, e15, s13) {
  501. s13 && t12.push(e15[0]), t12.push(e15[1]);
  502. }
  503. getSubCurve(t12, e15, s13) {
  504. const n17 = [];
  505. return this.appendSubCurve(n17, t12, e15, s13) ? n17 : null;
  506. }
  507. appendSubCurve(t12, e15, s13, n17) {
  508. const r19 = e15 ? e15.length - 1 : 0;
  509. let h8 = 0, l12 = true, o12 = 0;
  510. for (; o12 < r19; ) {
  511. const r20 = this.calculateSegLength(e15, o12);
  512. if (0 !== r20) {
  513. if (l12) {
  514. if (h8 + r20 > s13) {
  515. const a15 = (s13 - h8) / r20;
  516. let u15 = 1, c12 = false;
  517. h8 + r20 >= n17 && (u15 = (n17 - h8) / r20, c12 = true);
  518. const i11 = this.cut(e15, o12, a15, u15);
  519. if (i11 && this.addSegment(t12, i11, l12), c12)
  520. break;
  521. l12 = false;
  522. }
  523. } else {
  524. if (h8 + r20 > n17) {
  525. const s14 = this.cut(e15, o12, 0, (n17 - h8) / r20);
  526. s14 && this.addSegment(t12, s14, l12);
  527. break;
  528. }
  529. this.addSegment(t12, [e15[o12], e15[o12 + 1]], l12);
  530. }
  531. h8 += r20, ++o12;
  532. } else
  533. ++o12;
  534. }
  535. return true;
  536. }
  537. getCIMPointAlong(t12, e15) {
  538. const s13 = t12 ? t12.length - 1 : 0;
  539. let n17 = 0, r19 = -1;
  540. for (; r19 < s13; ) {
  541. ++r19;
  542. const s14 = this.calculateSegLength(t12, r19);
  543. if (0 !== s14) {
  544. if (n17 + s14 > e15) {
  545. const h8 = (e15 - n17) / s14;
  546. return this.getCoord2D(t12[r19], t12[r19 + 1], h8);
  547. }
  548. n17 += s14;
  549. }
  550. }
  551. return null;
  552. }
  553. isEmpty(t12, e15) {
  554. if (!t12 || t12.length <= 1)
  555. return true;
  556. const s13 = t12 ? t12.length - 1 : 0;
  557. let n17 = -1;
  558. for (; n17 < s13; ) {
  559. if (++n17, t12[n17 + 1][0] !== t12[n17][0] || t12[n17 + 1][1] !== t12[n17][1])
  560. return false;
  561. if (e15 && t12[n17 + 1][2] !== t12[n17][2])
  562. return false;
  563. }
  564. return true;
  565. }
  566. offset(e15, s13, n17, r19, h8) {
  567. if (!e15 || e15.length < 2)
  568. return null;
  569. let l12 = 0, o12 = e15[l12++], a15 = l12;
  570. for (; l12 < e15.length; ) {
  571. const t12 = e15[l12];
  572. t12[0] === o12[0] && t12[1] === o12[1] || (l12 !== a15 && (e15[a15] = e15[l12]), o12 = e15[a15++]), l12++;
  573. }
  574. const u15 = e15[0][0] === e15[a15 - 1][0] && e15[0][1] === e15[a15 - 1][1];
  575. if (u15 && --a15, a15 < (u15 ? 3 : 2))
  576. return null;
  577. const c12 = [];
  578. o12 = u15 ? e15[a15 - 1] : null;
  579. let i11 = e15[0];
  580. for (let g8 = 0; g8 < a15; g8++) {
  581. const h9 = g8 === a15 - 1 ? u15 ? e15[0] : null : e15[g8 + 1];
  582. if (o12)
  583. if (h9) {
  584. const e16 = [h9[0] - i11[0], h9[1] - i11[1]];
  585. this.normalize(e16);
  586. const l13 = [i11[0] - o12[0], i11[1] - o12[1]];
  587. this.normalize(l13);
  588. const a16 = l13[0] * e16[1] - l13[1] * e16[0], u16 = l13[0] * e16[0] + l13[1] * e16[1];
  589. if (0 === a16 && 1 === u16) {
  590. i11 = h9;
  591. continue;
  592. }
  593. if (a16 >= 0 == s13 <= 0) {
  594. if (u16 < 1) {
  595. const t12 = [e16[0] - l13[0], e16[1] - l13[1]];
  596. this.normalize(t12);
  597. const n18 = Math.sqrt((1 + u16) / 2);
  598. if (n18 > 1 / r19) {
  599. const e17 = -Math.abs(s13) / n18;
  600. c12.push([i11[0] - t12[0] * e17, i11[1] - t12[1] * e17]);
  601. }
  602. }
  603. } else
  604. switch (n17) {
  605. case O.Mitered: {
  606. const t12 = Math.sqrt((1 + u16) / 2);
  607. if (t12 > 0 && 1 / t12 < r19) {
  608. const n18 = [e16[0] - l13[0], e16[1] - l13[1]];
  609. this.normalize(n18);
  610. const r20 = Math.abs(s13) / t12;
  611. c12.push([i11[0] - n18[0] * r20, i11[1] - n18[1] * r20]);
  612. break;
  613. }
  614. }
  615. case O.Bevelled:
  616. c12.push([i11[0] + l13[1] * s13, i11[1] - l13[0] * s13]), c12.push([i11[0] + e16[1] * s13, i11[1] - e16[0] * s13]);
  617. break;
  618. case O.Rounded:
  619. if (u16 < 1) {
  620. c12.push([i11[0] + l13[1] * s13, i11[1] - l13[0] * s13]);
  621. const t12 = Math.floor(2.5 * (1 - u16));
  622. if (t12 > 0) {
  623. const n18 = 1 / t12;
  624. let r20 = n18;
  625. for (let h10 = 1; h10 < t12; h10++, r20 += n18) {
  626. const t13 = [l13[1] * (1 - r20) + e16[1] * r20, -l13[0] * (1 - r20) - e16[0] * r20];
  627. this.normalize(t13), c12.push([i11[0] + t13[0] * s13, i11[1] + t13[1] * s13]);
  628. }
  629. }
  630. c12.push([i11[0] + e16[1] * s13, i11[1] - e16[0] * s13]);
  631. }
  632. break;
  633. case O.Square:
  634. default:
  635. if (a16 < 0)
  636. c12.push([i11[0] + (l13[1] + l13[0]) * s13, i11[1] + (l13[1] - l13[0]) * s13]), c12.push([i11[0] + (e16[1] - e16[0]) * s13, i11[1] - (e16[0] + e16[1]) * s13]);
  637. else {
  638. const t12 = Math.sqrt((1 + Math.abs(u16)) / 2), n18 = [e16[0] - l13[0], e16[1] - l13[1]];
  639. this.normalize(n18);
  640. const r20 = s13 / t12;
  641. c12.push([i11[0] - n18[0] * r20, i11[1] - n18[1] * r20]);
  642. }
  643. }
  644. } else {
  645. const t12 = [i11[0] - o12[0], i11[1] - o12[1]];
  646. this.normalize(t12), c12.push([i11[0] + t12[1] * s13, i11[1] - t12[0] * s13]);
  647. }
  648. else {
  649. const t12 = [h9[0] - i11[0], h9[1] - i11[1]];
  650. this.normalize(t12), c12.push([i11[0] + t12[1] * s13, i11[1] - t12[0] * s13]);
  651. }
  652. o12 = i11, i11 = h9;
  653. }
  654. return c12.length < (u15 ? 3 : 2) ? null : (u15 && c12.push([c12[0][0], c12[0][1]]), c12);
  655. }
  656. };
  657. // node_modules/@arcgis/core/symbols/cim/effects/EffectArrow.js
  658. var l6 = 1.7320508075688772;
  659. var c5 = 5;
  660. var u8 = P.OpenEnded;
  661. var h3 = class {
  662. static local() {
  663. return null === h3.instance && (h3.instance = new h3()), h3.instance;
  664. }
  665. execute(t12, e15, r19, n17) {
  666. return new a6(t12, e15, r19);
  667. }
  668. };
  669. h3.instance = null;
  670. var a6 = class extends U2 {
  671. constructor(t12, e15, o12) {
  672. super(t12, false, true), this._curveHelper = new n6(), this._width = (void 0 !== e15.width ? e15.width : c5) * o12, this._arrowType = void 0 !== e15.geometricEffectArrowType ? e15.geometricEffectArrowType : void 0 !== e15.arrowType ? e15.arrowType : u8, this._offsetFlattenError = e7 * o12;
  673. }
  674. processPath(t12) {
  675. switch (this._arrowType) {
  676. case P.OpenEnded:
  677. default:
  678. return this._constructSimpleArrow(t12, true);
  679. case P.Block:
  680. return this._constructSimpleArrow(t12, false);
  681. case P.Crossed:
  682. return this._constructCrossedArrow(t12);
  683. }
  684. }
  685. _constructSimpleArrow(t12, e15) {
  686. const r19 = this._curveHelper.calculatePathLength(t12);
  687. let n17 = this._width;
  688. r19 < 2 * n17 && (n17 = r19 / 2);
  689. const s13 = this._curveHelper.getSubCurve(t12, 0, r19 - n17);
  690. if (!s13)
  691. return null;
  692. const i11 = n17 / 2;
  693. if (this._curveHelper.isEmpty(s13, false))
  694. return null;
  695. const l12 = this._constructOffset(s13, -i11);
  696. if (!l12)
  697. return null;
  698. const c12 = this._constructOffset(s13, i11);
  699. if (!c12)
  700. return null;
  701. const u15 = this._constructArrowBasePoint(l12, -i11 / 2);
  702. if (!u15)
  703. return null;
  704. const h8 = this._constructArrowBasePoint(c12, i11 / 2);
  705. if (!h8)
  706. return null;
  707. const a15 = t12[t12.length - 1];
  708. e15 || (this._makeControlPoint(c12, true), this._makeControlPoint(l12, true));
  709. const _4 = new s7();
  710. return _4.addPath(c12, true), _4.lineTo(h8), this._makeControlPoint(_4.path()), _4.lineTo(a15), this._makeControlPoint(_4.path()), _4.lineTo(u15), this._makeControlPoint(_4.path()), _4.addPath(l12, false), e15 ? { paths: [_4.path()] } : (_4.close(), { rings: [_4.path()] });
  711. }
  712. _constructCrossedArrow(t12) {
  713. const e15 = this._curveHelper.calculatePathLength(t12);
  714. let r19 = this._width;
  715. e15 < r19 * (1 + l6 + 1) && (r19 = e15 / (1 + l6 + 1));
  716. const n17 = this._curveHelper.getSubCurve(t12, 0, e15 - r19 * (1 + l6));
  717. if (!n17)
  718. return null;
  719. const s13 = r19 / 2;
  720. if (this._curveHelper.isEmpty(n17, false))
  721. return null;
  722. const i11 = this._constructOffset(n17, s13);
  723. if (!i11)
  724. return null;
  725. const c12 = this._constructOffset(n17, -s13);
  726. if (!c12)
  727. return null;
  728. const u15 = this._curveHelper.getSubCurve(t12, 0, e15 - r19);
  729. if (!u15)
  730. return null;
  731. if (this._curveHelper.isEmpty(u15, false))
  732. return null;
  733. const h8 = this._constructOffset(u15, s13);
  734. if (!h8)
  735. return null;
  736. const a15 = this._constructOffset(u15, -s13);
  737. if (!a15)
  738. return null;
  739. const _4 = h8[h8.length - 1], f9 = this._constructArrowBasePoint(h8, s13 / 2);
  740. if (!f9)
  741. return null;
  742. const p6 = a15[a15.length - 1], m9 = this._constructArrowBasePoint(a15, -s13 / 2);
  743. if (!m9)
  744. return null;
  745. const d4 = t12[t12.length - 1];
  746. this._makeControlPoint(i11, false), this._makeControlPoint(c12, false);
  747. const w6 = new s7();
  748. return w6.addPath(i11, true), this._makeControlPoint(w6.path()), w6.lineTo(p6), w6.lineTo(m9), this._makeControlPoint(w6.path()), w6.lineTo(d4), this._makeControlPoint(w6.path()), w6.lineTo(f9), this._makeControlPoint(w6.path()), w6.lineTo(_4), this._makeControlPoint(w6.path()), w6.addPath(c12, false), { paths: [w6.path()] };
  749. }
  750. _constructOffset(t12, e15) {
  751. return this._curveHelper.offset(t12, e15, O.Rounded, 4, this._offsetFlattenError);
  752. }
  753. _constructArrowBasePoint(t12, e15) {
  754. if (!t12 || t12.length < 2)
  755. return null;
  756. const r19 = t12[t12.length - 2], n17 = t12[t12.length - 1], o12 = [n17[0] - r19[0], n17[1] - r19[1]];
  757. return this._curveHelper.normalize(o12), [n17[0] + o12[1] * e15, n17[1] - o12[0] * e15];
  758. }
  759. _makeControlPoint(t12, r19 = false) {
  760. j2(r19 ? t12[0] : t12[t12.length - 1], 1);
  761. }
  762. };
  763. // node_modules/@arcgis/core/symbols/cim/effects/EffectBuffer.js
  764. var f4 = class {
  765. static local() {
  766. return null === f4.instance && (f4.instance = new f4()), f4.instance;
  767. }
  768. execute(e15, t12, s13, i11) {
  769. return new h4(e15, t12, s13, i11);
  770. }
  771. };
  772. f4.instance = null;
  773. var h4 = class {
  774. constructor(e15, t12, s13, i11) {
  775. this._inputGeometries = e15, this._curveHelper = new n6(), this._size = (void 0 !== t12.size ? t12.size : 1) * s13, this._offsetFlattenError = e7 * s13;
  776. }
  777. next() {
  778. let n17 = this._inputGeometries.next();
  779. for (; n17; ) {
  780. if (u2(n17))
  781. if (this._size > 0) {
  782. const e15 = [[n17.xmin, n17.ymin], [n17.xmin, n17.ymax], [n17.xmax, n17.ymax], [n17.xmax, n17.ymin], [n17.xmin, n17.ymin]], t12 = this._curveHelper.offset(e15, this._size, O.Rounded, 4, this._offsetFlattenError);
  783. if (t12)
  784. return { rings: [t12] };
  785. } else {
  786. if (!(this._size < 0))
  787. return n17;
  788. if (Math.min(n17.xmax - n17.xmin, n17.ymax - n17.ymin) + 2 * this._size > 0)
  789. return { xmin: n17.xmin - this._size, xmax: n17.xmax + this._size, ymin: n17.ymin - this._size, ymax: n17.ymax + this._size };
  790. }
  791. if (y2(n17)) {
  792. if (0 === this._size)
  793. return n17;
  794. const e15 = [];
  795. for (const t12 of n17.rings) {
  796. const s13 = this._curveHelper.offset(t12, this._size, O.Rounded, 4, this._offsetFlattenError);
  797. s13 && e15.push(s13);
  798. }
  799. if (e15.length)
  800. return { rings: e15 };
  801. }
  802. if (f(n17) && this._size > 0) {
  803. const e15 = [];
  804. for (const t12 of n17.paths)
  805. if (t12 && t12.length > 1) {
  806. const s13 = this._curveHelper.offset(t12, this._size, O.Rounded, 4, this._offsetFlattenError), i11 = this._curveHelper.offset(t12, -this._size, O.Rounded, 4, this._offsetFlattenError);
  807. if (s13 && i11) {
  808. for (let e16 = i11.length - 1; e16 >= 0; e16--)
  809. s13.push(i11[e16]);
  810. s13.push([s13[0][0], s13[0][1]]), e15.push(s13);
  811. }
  812. }
  813. if (e15.length)
  814. return { rings: e15 };
  815. }
  816. s5(n17) && this._size, n17 = this._inputGeometries.next();
  817. }
  818. return null;
  819. }
  820. };
  821. // node_modules/@arcgis/core/symbols/cim/effects/EffectControlMeasureLine.js
  822. var _ = class {
  823. static local() {
  824. return null === _.instance && (_.instance = new _()), _.instance;
  825. }
  826. execute(s13, t12, i11, h8) {
  827. return new c6(s13, t12, i11);
  828. }
  829. };
  830. _.instance = null;
  831. var c6 = class {
  832. constructor(s13, t12, i11) {
  833. var _a;
  834. this._defaultPointSize = 20, this._inputGeometries = s13, this._geomUnitsPerPoint = i11, this._rule = (_a = t12.rule) != null ? _a : R.FullGeometry, this._defaultSize = this._defaultPointSize * i11;
  835. }
  836. next() {
  837. let e15;
  838. for (; e15 = this._inputGeometries.next(); ) {
  839. let r19;
  840. if (s5(e15) ? r19 = this._processGeom([[[e15.x, e15.y]]]) : l(e15) ? r19 = this._processGeom([e15.points]) : f(e15) ? r19 = this._processGeom(e15.paths) : y2(e15) && (r19 = this._processGeom(e15.rings)), r19 && r19.length)
  841. return { paths: r19 };
  842. }
  843. return null;
  844. }
  845. _clone(s13) {
  846. return [s13[0], s13[1]];
  847. }
  848. _mid(s13, t12) {
  849. return [(s13[0] + t12[0]) / 2, (s13[1] + t12[1]) / 2];
  850. }
  851. _mix(s13, t12, i11, h8) {
  852. return [s13[0] * t12 + i11[0] * h8, s13[1] * t12 + i11[1] * h8];
  853. }
  854. _add(s13, t12) {
  855. return [s13[0] + t12[0], s13[1] + t12[1]];
  856. }
  857. _add2(s13, t12, i11) {
  858. return [s13[0] + t12, s13[1] + i11];
  859. }
  860. _sub(s13, t12) {
  861. return [s13[0] - t12[0], s13[1] - t12[1]];
  862. }
  863. _dist(s13, t12) {
  864. return Math.sqrt((s13[0] - t12[0]) * (s13[0] - t12[0]) + (s13[1] - t12[1]) * (s13[1] - t12[1]));
  865. }
  866. _norm(s13) {
  867. return Math.sqrt(s13[0] * s13[0] + s13[1] * s13[1]);
  868. }
  869. _normalize(s13, t12 = 1) {
  870. const i11 = t12 / this._norm(s13);
  871. s13[0] *= i11, s13[1] *= i11;
  872. }
  873. _leftPerpendicular(s13) {
  874. const t12 = -s13[1], i11 = s13[0];
  875. s13[0] = t12, s13[1] = i11;
  876. }
  877. _leftPerp(s13) {
  878. return [-s13[1], s13[0]];
  879. }
  880. _rightPerpendicular(s13) {
  881. const t12 = s13[1], i11 = -s13[0];
  882. s13[0] = t12, s13[1] = i11;
  883. }
  884. _rightPerp(s13) {
  885. return [s13[1], -s13[0]];
  886. }
  887. _dotProduct(s13, t12) {
  888. return s13[0] * t12[0] + s13[1] * t12[1];
  889. }
  890. _crossProduct(s13, t12) {
  891. return s13[0] * t12[1] - s13[1] * t12[0];
  892. }
  893. _rotateDirect(s13, t12, i11) {
  894. const h8 = s13[0] * t12 - s13[1] * i11, e15 = s13[0] * i11 + s13[1] * t12;
  895. s13[0] = h8, s13[1] = e15;
  896. }
  897. _makeCtrlPt(s13) {
  898. const t12 = [s13[0], s13[1]];
  899. return j2(t12, 1), t12;
  900. }
  901. _addAngledTicks(s13, t12, i11, h8) {
  902. const e15 = this._sub(i11, t12);
  903. this._normalize(e15);
  904. const r19 = this._crossProduct(e15, this._sub(h8, t12));
  905. let _4;
  906. _4 = r19 > 0 ? this._rightPerp(e15) : this._leftPerp(e15);
  907. const c12 = Math.abs(r19) / 2, u15 = [];
  908. u15.push([t12[0] + (_4[0] - e15[0]) * c12, t12[1] + (_4[1] - e15[1]) * c12]), u15.push(t12), u15.push(i11), u15.push([i11[0] + (_4[0] + e15[0]) * c12, i11[1] + (_4[1] + e15[1]) * c12]), s13.push(u15);
  909. }
  910. _addBezier2(s13, t12, i11, h8, e15) {
  911. if (0 == e15--)
  912. return void s13.push(h8);
  913. const r19 = this._mid(t12, i11), _4 = this._mid(i11, h8), c12 = this._mid(r19, _4);
  914. this._addBezier2(s13, t12, r19, c12, e15), this._addBezier2(s13, c12, _4, h8, e15);
  915. }
  916. _addBezier3(s13, t12, i11, h8, e15, r19) {
  917. if (0 == r19--)
  918. return void s13.push(e15);
  919. const _4 = this._mid(t12, i11), c12 = this._mid(i11, h8), u15 = this._mid(h8, e15), o12 = this._mid(_4, c12), n17 = this._mid(c12, u15), a15 = this._mid(o12, n17);
  920. this._addBezier3(s13, t12, _4, o12, a15, r19), this._addBezier3(s13, a15, n17, u15, e15, r19);
  921. }
  922. _add90DegArc(s13, t12, i11, h8, e15) {
  923. const r19 = e15 != null ? e15 : this._crossProduct(this._sub(i11, t12), this._sub(h8, t12)) > 0, _4 = this._mid(t12, i11), c12 = this._sub(_4, t12);
  924. r19 ? this._leftPerpendicular(c12) : this._rightPerpendicular(c12), _4[0] += c12[0], _4[1] += c12[1], this._addBezier3(s13, t12, this._mix(t12, 0.33333, _4, 0.66667), this._mix(i11, 0.33333, _4, 0.66667), i11, 4);
  925. }
  926. _addArrow(s13, t12, i11) {
  927. const h8 = t12[0], e15 = t12[1], r19 = t12[t12.length - 1], _4 = this._sub(h8, e15);
  928. this._normalize(_4);
  929. const c12 = this._crossProduct(_4, this._sub(r19, e15)), u15 = 0.5 * c12, o12 = this._leftPerp(_4), n17 = [r19[0] - o12[0] * c12, r19[1] - o12[1] * c12], a15 = t12.length - 1, p6 = [];
  930. p6.push(i11 ? [-o12[0], -o12[1]] : o12);
  931. let l12 = [-_4[0], -_4[1]];
  932. for (let d4 = 1; d4 < a15 - 1; d4++) {
  933. const s14 = this._sub(t12[d4 + 1], t12[d4]);
  934. this._normalize(s14);
  935. const i12 = this._dotProduct(s14, l12), h9 = this._crossProduct(s14, l12), e16 = Math.sqrt((1 + i12) / 2), r20 = this._sub(s14, l12);
  936. this._normalize(r20), r20[0] /= e16, r20[1] /= e16, p6.push(h9 < 0 ? [-r20[0], -r20[1]] : r20), l12 = s14;
  937. }
  938. p6.push(this._rightPerp(l12));
  939. for (let d4 = p6.length - 1; d4 > 0; d4--)
  940. s13.push([t12[d4][0] + p6[d4][0] * u15, t12[d4][1] + p6[d4][1] * u15]);
  941. s13.push([n17[0] + p6[0][0] * u15, n17[1] + p6[0][1] * u15]), s13.push([n17[0] + p6[0][0] * c12, n17[1] + p6[0][1] * c12]), s13.push(h8), s13.push([n17[0] - p6[0][0] * c12, n17[1] - p6[0][1] * c12]), s13.push([n17[0] - p6[0][0] * u15, n17[1] - p6[0][1] * u15]);
  942. for (let d4 = 1; d4 < p6.length; d4++)
  943. s13.push([t12[d4][0] - p6[d4][0] * u15, t12[d4][1] - p6[d4][1] * u15]);
  944. }
  945. _cp2(s13, t12, i11) {
  946. return s13.length >= 2 ? s13[1] : this._add2(s13[0], t12 * this._defaultSize, i11 * this._defaultSize);
  947. }
  948. _cp3(s13, t12, i11, h8) {
  949. if (s13.length >= 3)
  950. return s13[2];
  951. const e15 = this._mix(s13[0], 1 - i11, t12, i11), r19 = this._sub(t12, s13[0]);
  952. return this._normalize(r19), this._rightPerpendicular(r19), [e15[0] + r19[0] * h8 * this._defaultSize, e15[1] + r19[1] * h8 * this._defaultSize];
  953. }
  954. _arrowPath(s13) {
  955. if (s13.length > 2)
  956. return s13;
  957. const t12 = s13[0], i11 = this._cp2(s13, -4, 0), h8 = this._sub(t12, i11);
  958. this._normalize(h8);
  959. const e15 = this._rightPerp(h8);
  960. return [t12, i11, [t12[0] + (e15[0] - h8[0]) * this._defaultSize, t12[1] + (e15[1] - h8[1]) * this._defaultSize]];
  961. }
  962. _arrowLastSeg(s13) {
  963. const t12 = s13[0], i11 = this._cp2(s13, -4, 0);
  964. let h8;
  965. if (s13.length >= 3)
  966. h8 = s13[s13.length - 1];
  967. else {
  968. const s14 = this._sub(t12, i11);
  969. this._normalize(s14);
  970. const e15 = this._rightPerp(s14);
  971. h8 = [t12[0] + (e15[0] - s14[0]) * this._defaultSize, t12[1] + (e15[1] - s14[1]) * this._defaultSize];
  972. }
  973. return [i11, h8];
  974. }
  975. _processGeom(s13) {
  976. if (!s13)
  977. return null;
  978. const t12 = [];
  979. for (const i11 of s13) {
  980. if (!i11 || 0 === i11.length)
  981. continue;
  982. const s14 = i11.length;
  983. let h8 = i11[0];
  984. switch (this._rule) {
  985. case R.PerpendicularFromFirstSegment: {
  986. const s15 = this._cp2(i11, 0, -1), e15 = this._cp3(i11, s15, 0.5, 4), r19 = [];
  987. r19.push(e15), r19.push(this._mid(h8, s15)), t12.push(r19);
  988. break;
  989. }
  990. case R.ReversedFirstSegment: {
  991. const s15 = this._cp2(i11, 0, -1);
  992. t12.push([s15, h8]);
  993. break;
  994. }
  995. case R.PerpendicularToSecondSegment: {
  996. const s15 = this._cp2(i11, -4, 1), e15 = this._cp3(i11, s15, 0.882353, -1.94), r19 = [];
  997. r19.push(this._mid(s15, e15)), r19.push(h8), t12.push(r19);
  998. break;
  999. }
  1000. case R.SecondSegmentWithTicks: {
  1001. const s15 = this._cp2(i11, -4, 1), e15 = this._cp3(i11, s15, 0.882353, -1.94), r19 = this._sub(e15, s15);
  1002. let _4;
  1003. _4 = this._crossProduct(r19, this._sub(h8, s15)) > 0 ? this._rightPerp(_4) : this._leftPerp(r19);
  1004. const c12 = [];
  1005. c12.push([s15[0] + (_4[0] - r19[0]) / 3, s15[1] + (_4[1] - r19[1]) / 3]), c12.push(s15), c12.push(e15), c12.push([e15[0] + (_4[0] + r19[0]) / 3, e15[1] + (_4[1] + r19[1]) / 3]), t12.push(c12);
  1006. break;
  1007. }
  1008. case R.DoublePerpendicular: {
  1009. const s15 = this._cp2(i11, 0, -1), e15 = this._cp3(i11, s15, 0.5, 3), r19 = this._mid(h8, s15), _4 = this._sub(r19, e15);
  1010. this._normalize(_4);
  1011. const c12 = this._crossProduct(_4, this._sub(h8, e15));
  1012. this._leftPerpendicular(_4);
  1013. const u15 = [];
  1014. u15.push(h8), u15.push([e15[0] + _4[0] * c12, e15[1] + _4[1] * c12]), t12.push(u15);
  1015. const o12 = [];
  1016. o12.push([e15[0] - _4[0] * c12, e15[1] - _4[1] * c12]), o12.push(s15), t12.push(o12);
  1017. break;
  1018. }
  1019. case R.OppositeToFirstSegment: {
  1020. const s15 = this._cp2(i11, 0, -1), e15 = this._cp3(i11, s15, 0.5, 3), r19 = this._mid(h8, s15), _4 = this._sub(r19, e15);
  1021. this._normalize(_4);
  1022. const c12 = this._crossProduct(_4, this._sub(h8, e15));
  1023. this._leftPerpendicular(_4);
  1024. const u15 = [];
  1025. u15.push([e15[0] + _4[0] * c12, e15[1] + _4[1] * c12]), u15.push([e15[0] - _4[0] * c12, e15[1] - _4[1] * c12]), t12.push(u15);
  1026. break;
  1027. }
  1028. case R.TriplePerpendicular: {
  1029. const s15 = this._cp2(i11, 0, -1), e15 = this._cp3(i11, s15, 0.5, 4), r19 = this._mid(h8, s15), _4 = this._sub(r19, e15);
  1030. this._normalize(_4);
  1031. const c12 = this._crossProduct(_4, this._sub(h8, e15));
  1032. this._leftPerpendicular(_4);
  1033. const u15 = [];
  1034. u15.push([e15[0] + _4[0] * c12 * 0.8, e15[1] + _4[1] * c12 * 0.8]), u15.push([r19[0] + 0.8 * (h8[0] - r19[0]), r19[1] + 0.8 * (h8[1] - r19[1])]), t12.push(u15), t12.push([e15, r19]);
  1035. const o12 = [];
  1036. o12.push([e15[0] - _4[0] * c12 * 0.8, e15[1] - _4[1] * c12 * 0.8]), o12.push([r19[0] + 0.8 * (s15[0] - r19[0]), r19[1] + 0.8 * (s15[1] - r19[1])]), t12.push(o12);
  1037. break;
  1038. }
  1039. case R.HalfCircleFirstSegment: {
  1040. const s15 = this._cp2(i11, 0, -1), e15 = this._cp3(i11, s15, 0.5, 4), r19 = this._mid(h8, s15);
  1041. let _4 = this._sub(s15, h8);
  1042. const c12 = Math.cos(Math.PI / 18), u15 = Math.sin(Math.PI / 18), o12 = Math.sqrt((1 + c12) / 2), n17 = Math.sqrt((1 - c12) / 2), a15 = [];
  1043. let p6;
  1044. this._crossProduct(_4, this._sub(e15, h8)) > 0 ? (a15.push(h8), _4 = this._sub(h8, r19), p6 = s15) : (a15.push(s15), _4 = this._sub(s15, r19), p6 = h8), this._rotateDirect(_4, o12, n17), _4[0] /= o12, _4[1] /= o12;
  1045. for (let t13 = 1; t13 <= 18; t13++)
  1046. a15.push(this._add(r19, _4)), this._rotateDirect(_4, c12, u15);
  1047. a15.push(p6), t12.push(a15);
  1048. break;
  1049. }
  1050. case R.HalfCircleSecondSegment: {
  1051. const s15 = this._cp2(i11, 0, -1), e15 = this._cp3(i11, s15, 1, -1);
  1052. let r19 = this._sub(h8, s15);
  1053. this._normalize(r19);
  1054. const _4 = this._crossProduct(r19, this._sub(e15, s15)) / 2;
  1055. this._leftPerpendicular(r19);
  1056. const c12 = [s15[0] + r19[0] * _4, s15[1] + r19[1] * _4];
  1057. r19 = this._sub(s15, c12);
  1058. const u15 = Math.cos(Math.PI / 18);
  1059. let o12 = Math.sin(Math.PI / 18);
  1060. _4 > 0 && (o12 = -o12);
  1061. const n17 = [s15];
  1062. for (let t13 = 1; t13 <= 18; t13++)
  1063. this._rotateDirect(r19, u15, o12), n17.push(this._add(c12, r19));
  1064. t12.push(n17);
  1065. break;
  1066. }
  1067. case R.HalfCircleExtended: {
  1068. const e15 = this._cp2(i11, 0, -2), r19 = this._cp3(i11, e15, 1, -1);
  1069. let _4;
  1070. if (s14 >= 4)
  1071. _4 = i11[3];
  1072. else {
  1073. const s15 = this._sub(h8, e15);
  1074. _4 = this._add(r19, s15);
  1075. }
  1076. const c12 = this._dist(e15, r19) / 2 / 0.75, u15 = this._sub(e15, h8);
  1077. this._normalize(u15, c12);
  1078. const o12 = this._sub(r19, _4);
  1079. this._normalize(o12, c12);
  1080. const n17 = [_4, r19];
  1081. t12.push(n17);
  1082. const a15 = [this._clone(r19)];
  1083. this._addBezier3(a15, r19, this._add(r19, o12), this._add(e15, u15), e15, 4), a15.push(h8), t12.push(a15);
  1084. break;
  1085. }
  1086. case R.OpenCircle: {
  1087. const s15 = this._cp2(i11, -2, 0), e15 = this._sub(s15, h8), r19 = Math.cos(Math.PI / 18), _4 = -Math.sin(Math.PI / 18), c12 = [s15];
  1088. for (let t13 = 1; t13 <= 33; t13++)
  1089. this._rotateDirect(e15, r19, _4), c12.push(this._add(h8, e15));
  1090. t12.push(c12);
  1091. break;
  1092. }
  1093. case R.CoverageEdgesWithTicks: {
  1094. const e15 = this._cp2(i11, 0, -1);
  1095. let r19, _4;
  1096. if (s14 >= 3)
  1097. r19 = i11[2];
  1098. else {
  1099. const s15 = this._sub(e15, h8), t13 = this._leftPerp(s15);
  1100. r19 = [h8[0] + t13[0] - 0.25 * s15[0], h8[1] + t13[1] - 0.25 * s15[1]];
  1101. }
  1102. if (s14 >= 4)
  1103. _4 = i11[3];
  1104. else {
  1105. const s15 = this._mid(h8, e15), t13 = this._sub(h8, e15);
  1106. this._normalize(t13), this._leftPerpendicular(t13);
  1107. const i12 = this._crossProduct(t13, this._sub(r19, s15));
  1108. this._rightPerpendicular(t13), _4 = [r19[0] + t13[0] * i12 * 2, r19[1] + t13[1] * i12 * 2];
  1109. }
  1110. const c12 = this._sub(e15, h8);
  1111. let u15, o12;
  1112. u15 = this._crossProduct(c12, this._sub(r19, h8)) > 0 ? this._rightPerp(c12) : this._leftPerp(c12), o12 = [], o12.push(r19), o12.push(h8), o12.push([h8[0] + (u15[0] - c12[0]) / 3, h8[1] + (u15[1] - c12[1]) / 3]), t12.push(o12), u15 = this._crossProduct(c12, this._sub(_4, e15)) > 0 ? this._rightPerp(u15) : this._leftPerp(c12), o12 = [], o12.push([e15[0] + (u15[0] + c12[0]) / 3, e15[1] + (u15[1] + c12[1]) / 3]), o12.push(e15), o12.push(_4), t12.push(o12);
  1113. break;
  1114. }
  1115. case R.GapExtentWithDoubleTicks: {
  1116. const e15 = this._cp2(i11, 0, 2), r19 = this._cp3(i11, e15, 0, 1);
  1117. let _4;
  1118. if (s14 >= 4)
  1119. _4 = i11[3];
  1120. else {
  1121. const s15 = this._sub(e15, h8);
  1122. _4 = this._add(r19, s15);
  1123. }
  1124. this._addAngledTicks(t12, h8, e15, this._mid(r19, _4)), this._addAngledTicks(t12, r19, _4, this._mid(h8, e15));
  1125. break;
  1126. }
  1127. case R.GapExtentMidline: {
  1128. const e15 = this._cp2(i11, 2, 0), r19 = this._cp3(i11, e15, 0, 1);
  1129. let _4;
  1130. if (s14 >= 4)
  1131. _4 = i11[3];
  1132. else {
  1133. const s15 = this._sub(e15, h8);
  1134. _4 = this._add(r19, s15);
  1135. }
  1136. const c12 = [];
  1137. c12.push(this._mid(h8, r19)), c12.push(this._mid(e15, _4)), t12.push(c12);
  1138. break;
  1139. }
  1140. case R.Chevron: {
  1141. const e15 = this._cp2(i11, -1, -1);
  1142. let r19;
  1143. if (s14 >= 3)
  1144. r19 = i11[2];
  1145. else {
  1146. const s15 = this._sub(e15, h8);
  1147. this._leftPerpendicular(s15), r19 = this._add(h8, s15);
  1148. }
  1149. t12.push([e15, this._makeCtrlPt(h8), r19]);
  1150. break;
  1151. }
  1152. case R.PerpendicularWithArc: {
  1153. const s15 = this._cp2(i11, 0, -2), e15 = this._cp3(i11, s15, 0.5, -1);
  1154. let r19 = this._sub(s15, h8);
  1155. const _4 = this._norm(r19);
  1156. r19[0] /= _4, r19[1] /= _4;
  1157. const c12 = this._crossProduct(r19, this._sub(e15, h8));
  1158. let u15 = this._dotProduct(r19, this._sub(e15, h8));
  1159. u15 < 0.05 * _4 ? u15 = 0.05 * _4 : u15 > 0.95 * _4 && (u15 = 0.95 * _4);
  1160. const o12 = [h8[0] + r19[0] * u15, h8[1] + r19[1] * u15];
  1161. this._leftPerpendicular(r19);
  1162. let n17 = [];
  1163. n17.push([o12[0] - r19[0] * c12, o12[1] - r19[1] * c12]), n17.push([o12[0] + r19[0] * c12, o12[1] + r19[1] * c12]), t12.push(n17);
  1164. const a15 = [s15[0] + r19[0] * c12, s15[1] + r19[1] * c12];
  1165. r19 = this._sub(s15, a15);
  1166. const p6 = Math.cos(Math.PI / 18);
  1167. let l12 = Math.sin(Math.PI / 18);
  1168. c12 < 0 && (l12 = -l12), n17 = [h8, s15];
  1169. for (let t13 = 1; t13 <= 9; t13++)
  1170. this._rotateDirect(r19, p6, l12), n17.push(this._add(a15, r19));
  1171. t12.push(n17);
  1172. break;
  1173. }
  1174. case R.ClosedHalfCircle: {
  1175. const s15 = this._cp2(i11, 2, 0), e15 = this._mid(h8, s15), r19 = this._sub(s15, e15), _4 = Math.cos(Math.PI / 18), c12 = Math.sin(Math.PI / 18), u15 = [h8, s15];
  1176. for (let t13 = 1; t13 <= 18; t13++)
  1177. this._rotateDirect(r19, _4, c12), u15.push(this._add(e15, r19));
  1178. t12.push(u15);
  1179. break;
  1180. }
  1181. case R.TripleParallelExtended: {
  1182. const s15 = this._cp2(i11, 0, -2), r19 = this._cp3(i11, s15, 1, -2), _4 = this._mid(h8, s15), c12 = this._sub(r19, s15);
  1183. this._normalize(c12);
  1184. const u15 = Math.abs(this._crossProduct(c12, this._sub(_4, s15))) / 2, o12 = this._dist(s15, r19), n17 = [s15, h8];
  1185. n17.push([h8[0] + c12[0] * o12 * 0.5, h8[1] + c12[1] * o12 * 0.5]), t12.push(n17);
  1186. const a15 = [];
  1187. a15.push([_4[0] - c12[0] * u15, _4[1] - c12[1] * u15]), a15.push([_4[0] + c12[0] * o12 * 0.375, _4[1] + c12[1] * o12 * 0.375]), j2(a15[a15.length - 1], 1), a15.push([_4[0] + c12[0] * o12 * 0.75, _4[1] + c12[1] * o12 * 0.75]), t12.push(a15);
  1188. const p6 = [s15, r19];
  1189. t12.push(p6);
  1190. break;
  1191. }
  1192. case R.ParallelWithTicks: {
  1193. const s15 = this._cp2(i11, 3, 0), e15 = this._cp3(i11, s15, 0.5, -1), r19 = this._sub(e15, s15);
  1194. this._normalize(r19);
  1195. const _4 = this._crossProduct(r19, this._sub(e15, h8));
  1196. this._leftPerpendicular(r19), this._addAngledTicks(t12, h8, s15, e15), this._addAngledTicks(t12, this._mix(h8, 1, r19, _4), this._mix(s15, 1, r19, _4), this._mid(h8, s15));
  1197. break;
  1198. }
  1199. case R.Parallel: {
  1200. const s15 = this._cp2(i11, 3, 0), e15 = this._cp3(i11, s15, 0.5, -1), r19 = this._sub(s15, h8);
  1201. this._normalize(r19);
  1202. const _4 = this._leftPerp(r19), c12 = this._crossProduct(r19, this._sub(e15, h8));
  1203. let u15 = [h8, s15];
  1204. t12.push(u15), u15 = [], u15.push([h8[0] + _4[0] * c12, h8[1] + _4[1] * c12]), u15.push([s15[0] + _4[0] * c12, s15[1] + _4[1] * c12]), t12.push(u15);
  1205. break;
  1206. }
  1207. case R.PerpendicularToFirstSegment: {
  1208. const s15 = this._cp2(i11, 3, 0), e15 = this._cp3(i11, s15, 0.5, -1), r19 = this._mid(h8, s15), _4 = this._sub(s15, h8);
  1209. this._normalize(_4);
  1210. const c12 = this._crossProduct(_4, this._sub(e15, h8));
  1211. this._leftPerpendicular(_4);
  1212. const u15 = [];
  1213. u15.push([r19[0] - _4[0] * c12 * 0.25, r19[1] - _4[1] * c12 * 0.25]), u15.push([r19[0] + _4[0] * c12 * 1.25, r19[1] + _4[1] * c12 * 1.25]), t12.push(u15);
  1214. break;
  1215. }
  1216. case R.ParallelOffset: {
  1217. const s15 = this._cp2(i11, 3, 0), e15 = this._cp3(i11, s15, 0.5, -1), r19 = this._sub(s15, h8);
  1218. this._normalize(r19);
  1219. const _4 = this._crossProduct(r19, this._sub(e15, h8));
  1220. this._leftPerpendicular(r19);
  1221. const c12 = [];
  1222. c12.push([h8[0] - r19[0] * _4, h8[1] - r19[1] * _4]), c12.push([s15[0] - r19[0] * _4, s15[1] - r19[1] * _4]), t12.push(c12);
  1223. const u15 = [];
  1224. u15.push([h8[0] + r19[0] * _4, h8[1] + r19[1] * _4]), u15.push([s15[0] + r19[0] * _4, s15[1] + r19[1] * _4]), t12.push(u15);
  1225. break;
  1226. }
  1227. case R.OffsetOpposite: {
  1228. const s15 = this._cp2(i11, 3, 0), e15 = this._cp3(i11, s15, 0.5, -1), r19 = this._sub(s15, h8);
  1229. this._normalize(r19);
  1230. const _4 = this._crossProduct(r19, this._sub(e15, h8));
  1231. this._leftPerpendicular(r19);
  1232. const c12 = [];
  1233. c12.push([h8[0] - r19[0] * _4, h8[1] - r19[1] * _4]), c12.push([s15[0] - r19[0] * _4, s15[1] - r19[1] * _4]), t12.push(c12);
  1234. break;
  1235. }
  1236. case R.OffsetSame: {
  1237. const s15 = this._cp2(i11, 3, 0), e15 = this._cp3(i11, s15, 0.5, -1), r19 = this._sub(s15, h8);
  1238. this._normalize(r19);
  1239. const _4 = this._crossProduct(r19, this._sub(e15, h8));
  1240. this._leftPerpendicular(r19);
  1241. const c12 = [];
  1242. c12.push([h8[0] + r19[0] * _4, h8[1] + r19[1] * _4]), c12.push([s15[0] + r19[0] * _4, s15[1] + r19[1] * _4]), t12.push(c12);
  1243. break;
  1244. }
  1245. case R.CircleWithArc: {
  1246. let r19 = this._cp2(i11, 3, 0);
  1247. const _4 = this._cp3(i11, r19, 0.5, -1);
  1248. let c12, u15;
  1249. if (s14 >= 4)
  1250. c12 = i11[3], u15 = this._crossProduct(this._sub(c12, r19), this._sub(_4, r19)) > 0;
  1251. else {
  1252. c12 = r19, u15 = this._crossProduct(this._sub(c12, h8), this._sub(_4, h8)) > 0;
  1253. const s15 = 24 * this._geomUnitsPerPoint, t13 = this._sub(c12, h8);
  1254. this._normalize(t13, s15);
  1255. const i12 = Math.sqrt(2) / 2;
  1256. this._rotateDirect(t13, i12, u15 ? i12 : -i12), r19 = this._add(h8, t13);
  1257. }
  1258. const o12 = this._sub(r19, h8), n17 = Math.cos(Math.PI / 18), a15 = Math.sin(Math.PI / 18), p6 = [r19];
  1259. for (let s15 = 1; s15 <= 36; s15++)
  1260. this._rotateDirect(o12, n17, a15), p6.push(this._add(h8, o12));
  1261. this._add90DegArc(p6, r19, c12, _4, u15), j2(p6[p6.length - 8], 1), t12.push(p6);
  1262. break;
  1263. }
  1264. case R.DoubleJog: {
  1265. let e15, r19, _4 = this._cp2(i11, -3, 1);
  1266. if (e15 = s14 >= 3 ? i11[2] : this._add(h8, this._sub(h8, _4)), s14 >= 4)
  1267. r19 = i11[3];
  1268. else {
  1269. const s15 = h8;
  1270. h8 = _4, r19 = e15;
  1271. const t13 = this._dist(h8, s15), i12 = this._dist(r19, s15);
  1272. let c13 = 30 * this._geomUnitsPerPoint;
  1273. 0.5 * t13 < c13 && (c13 = 0.5 * t13), 0.5 * i12 < c13 && (c13 = 0.5 * i12), _4 = this._mix(h8, c13 / t13, s15, (t13 - c13) / t13), e15 = this._mix(r19, c13 / i12, s15, (i12 - c13) / i12);
  1274. }
  1275. const c12 = this._mid(h8, _4), u15 = this._mid(r19, e15), o12 = this._dist(h8, _4), n17 = this._dist(e15, r19);
  1276. let a15 = Math.min(o12, n17) / 8;
  1277. a15 = Math.min(a15, 24 * this._geomUnitsPerPoint);
  1278. const p6 = Math.cos(Math.PI / 4);
  1279. let l12 = this._sub(h8, _4);
  1280. this._normalize(l12, a15), this._crossProduct(l12, this._sub(r19, _4)) > 0 ? this._rotateDirect(l12, p6, -p6) : this._rotateDirect(l12, p6, p6);
  1281. let d4 = [];
  1282. d4.push(_4), d4.push(this._add(c12, l12)), d4.push(this._sub(c12, l12)), d4.push(h8), t12.push(d4), l12 = this._sub(r19, e15), this._normalize(l12, a15), this._crossProduct(l12, this._sub(h8, e15)) < 0 ? this._rotateDirect(l12, p6, p6) : this._rotateDirect(l12, p6, -p6), d4 = [], d4.push(e15), d4.push(this._add(u15, l12)), d4.push(this._sub(u15, l12)), d4.push(r19), t12.push(d4);
  1283. break;
  1284. }
  1285. case R.PerpendicularOffset: {
  1286. const s15 = this._cp2(i11, -4, 1), e15 = this._cp3(i11, s15, 0.882353, -1.94), r19 = this._sub(e15, s15);
  1287. this._crossProduct(r19, this._sub(h8, s15)) > 0 ? this._rightPerpendicular(r19) : this._leftPerpendicular(r19);
  1288. const _4 = [r19[0] / 8, r19[1] / 8], c12 = this._sub(this._mid(s15, e15), _4);
  1289. t12.push([c12, h8]);
  1290. break;
  1291. }
  1292. case R.LineExcludingLastSegment: {
  1293. const s15 = this._arrowPath(i11), h9 = [];
  1294. let e15 = s15.length - 2;
  1295. for (; e15--; )
  1296. h9.push(s15[e15]);
  1297. t12.push(h9);
  1298. break;
  1299. }
  1300. case R.MultivertexArrow: {
  1301. const s15 = this._arrowPath(i11), h9 = [];
  1302. this._addArrow(h9, s15, false), t12.push(h9);
  1303. break;
  1304. }
  1305. case R.CrossedArrow: {
  1306. const s15 = this._arrowPath(i11), h9 = [];
  1307. this._addArrow(h9, s15, true), t12.push(h9);
  1308. break;
  1309. }
  1310. case R.ChevronArrow: {
  1311. const [s15, e15] = this._arrowLastSeg(i11), r19 = 10 * this._geomUnitsPerPoint, _4 = this._sub(h8, s15);
  1312. this._normalize(_4);
  1313. const c12 = this._crossProduct(_4, this._sub(e15, s15)), u15 = this._leftPerp(_4), o12 = [e15[0] - u15[0] * c12 * 2, e15[1] - u15[1] * c12 * 2], n17 = [];
  1314. n17.push([e15[0] + _4[0] * r19, e15[1] + _4[1] * r19]), n17.push(h8), n17.push([o12[0] + _4[0] * r19, o12[1] + _4[1] * r19]), t12.push(n17);
  1315. break;
  1316. }
  1317. case R.ChevronArrowOffset: {
  1318. const [s15, e15] = this._arrowLastSeg(i11), r19 = this._sub(h8, s15);
  1319. this._normalize(r19);
  1320. const _4 = this._crossProduct(r19, this._sub(e15, s15));
  1321. this._leftPerpendicular(r19);
  1322. const c12 = [e15[0] - r19[0] * _4, e15[1] - r19[1] * _4], u15 = [];
  1323. u15.push([c12[0] + r19[0] * _4 * 0.5, c12[1] + r19[1] * _4 * 0.5]), u15.push(this._mid(c12, h8)), u15.push([c12[0] - r19[0] * _4 * 0.5, c12[1] - r19[1] * _4 * 0.5]), t12.push(u15);
  1324. break;
  1325. }
  1326. case R.PartialFirstSegment: {
  1327. const [s15, e15] = this._arrowLastSeg(i11), r19 = this._sub(h8, s15);
  1328. this._normalize(r19);
  1329. const _4 = this._crossProduct(r19, this._sub(e15, s15));
  1330. this._leftPerpendicular(r19);
  1331. const c12 = [e15[0] - r19[0] * _4, e15[1] - r19[1] * _4];
  1332. t12.push([s15, c12]);
  1333. break;
  1334. }
  1335. case R.Arch: {
  1336. const s15 = this._cp2(i11, 0, -1), e15 = this._cp3(i11, s15, 0.5, 1), r19 = this._sub(h8, s15), _4 = this._mix(e15, 1, r19, 0.55), c12 = this._mix(e15, 1, r19, -0.55), u15 = [h8];
  1337. this._addBezier2(u15, h8, _4, e15, 4), this._addBezier2(u15, e15, c12, s15, 4), t12.push(u15);
  1338. break;
  1339. }
  1340. case R.CurvedParallelTicks: {
  1341. const s15 = this._cp2(i11, -4, 1), e15 = this._cp3(i11, s15, 0.882353, -1.94), r19 = this._sub(e15, s15);
  1342. this._crossProduct(r19, this._sub(h8, s15)) > 0 ? this._rightPerpendicular(r19) : this._leftPerpendicular(r19);
  1343. const _4 = [r19[0] / 8, r19[1] / 8], c12 = this._sub(this._mid(s15, e15), _4), u15 = this._sub(this._mix(s15, 0.75, e15, 0.25), _4), o12 = this._sub(this._mix(s15, 0.25, e15, 0.75), _4), n17 = [s15];
  1344. this._addBezier2(n17, s15, u15, c12, 3), this._addBezier2(n17, c12, o12, e15, 3), t12.push(n17);
  1345. for (let i12 = 0; i12 < 8; i12++) {
  1346. const s16 = n17[2 * i12 + 1], h9 = [this._clone(s16)];
  1347. h9.push(this._add(s16, [r19[0] / 4, r19[1] / 4])), t12.push(h9);
  1348. }
  1349. break;
  1350. }
  1351. case R.Arc90Degrees: {
  1352. const s15 = this._cp2(i11, 0, -1), e15 = this._cp3(i11, s15, 0.5, 1), r19 = [s15];
  1353. this._add90DegArc(r19, s15, h8, e15), t12.push(r19);
  1354. break;
  1355. }
  1356. case R.FullGeometry:
  1357. default:
  1358. t12.push(i11);
  1359. }
  1360. }
  1361. return t12;
  1362. }
  1363. };
  1364. // node_modules/@arcgis/core/symbols/cim/effects/EffectCut.js
  1365. var u9 = class {
  1366. static local() {
  1367. return null === u9.instance && (u9.instance = new u9()), u9.instance;
  1368. }
  1369. execute(e15, t12, u15, i11) {
  1370. return new s8(e15, t12, u15);
  1371. }
  1372. };
  1373. u9.instance = null;
  1374. var s8 = class extends U2 {
  1375. constructor(e15, u15, s13) {
  1376. super(e15, true, true), this._curveHelper = new n6(), this._beginCut = (void 0 !== u15.beginCut ? u15.beginCut : 1) * s13, this._endCut = (void 0 !== u15.endCut ? u15.endCut : 1) * s13, this._middleCut = (void 0 !== u15.middleCut ? u15.middleCut : 0) * s13, this._invert = void 0 !== u15.invert && u15.invert, this._beginCut < 0 && (this._beginCut = 0), this._endCut < 0 && (this._endCut = 0), this._middleCut < 0 && (this._middleCut = 0);
  1377. }
  1378. processPath(e15) {
  1379. const t12 = this._beginCut, u15 = this._endCut, s13 = this._middleCut, i11 = this._curveHelper.calculatePathLength(e15), r19 = [];
  1380. if (this._invert)
  1381. if (0 === t12 && 0 === u15 && 0 === s13)
  1382. ;
  1383. else if (t12 + u15 + s13 >= i11)
  1384. r19.push(e15);
  1385. else {
  1386. let n17 = this._curveHelper.getSubCurve(e15, 0, t12);
  1387. n17 && r19.push(n17), n17 = this._curveHelper.getSubCurve(e15, 0.5 * (i11 - s13), 0.5 * (i11 + s13)), n17 && r19.push(n17), n17 = this._curveHelper.getSubCurve(e15, i11 - u15, u15), n17 && r19.push(n17);
  1388. }
  1389. else if (0 === t12 && 0 === u15 && 0 === s13)
  1390. r19.push(e15);
  1391. else if (t12 + u15 + s13 >= i11)
  1392. ;
  1393. else if (0 === s13) {
  1394. const s14 = this._curveHelper.getSubCurve(e15, t12, i11 - u15);
  1395. s14 && r19.push(s14);
  1396. } else {
  1397. let n17 = this._curveHelper.getSubCurve(e15, t12, 0.5 * (i11 - s13));
  1398. n17 && r19.push(n17), n17 = this._curveHelper.getSubCurve(e15, 0.5 * (i11 + s13), i11 - u15), n17 && r19.push(n17);
  1399. }
  1400. return 0 === r19.length ? null : { paths: r19 };
  1401. }
  1402. };
  1403. // node_modules/@arcgis/core/symbols/cim/GeometryWalker.js
  1404. var i6 = 1e-7;
  1405. var n7 = class {
  1406. constructor() {
  1407. this._values = [], this.extPtGap = 0, this.ctrlPtGap = 0, this._length = 0, this._currentValue = 0;
  1408. }
  1409. isEmpty() {
  1410. return 0 === this._values.length;
  1411. }
  1412. size() {
  1413. return this._values.length;
  1414. }
  1415. init(t12, s13, e15 = true) {
  1416. if (this._setEmpty(), !t12 || 0 === t12.length)
  1417. return false;
  1418. for (let n17 = 0; n17 < t12.length; n17++) {
  1419. let s14 = Math.abs(t12[n17]);
  1420. e15 && s14 < i6 && (s14 = i6), this._values.push(s14), this._length += s14;
  1421. }
  1422. return s13 && 1 & t12.length && (this._length *= 2), 0 !== this._length && (this.ctrlPtGap = this.extPtGap = 0, this._currentValue = -1, true);
  1423. }
  1424. scale(t12) {
  1425. const s13 = this._values ? this._values.length : 0;
  1426. for (let e15 = 0; e15 < s13; ++e15)
  1427. this._values[e15] *= t12;
  1428. this._length *= t12, this.extPtGap *= t12, this.ctrlPtGap *= t12;
  1429. }
  1430. addValue(t12) {
  1431. this._length += t12, this._values.push(t12);
  1432. }
  1433. firstValue() {
  1434. return this._values[0];
  1435. }
  1436. lastValue() {
  1437. return this._values[this._values.length - 1];
  1438. }
  1439. nextValue() {
  1440. return this._currentValue++, this._currentValue === this._values.length && (this._currentValue = 0), this._values[this._currentValue];
  1441. }
  1442. reset() {
  1443. this._currentValue = -1;
  1444. }
  1445. length() {
  1446. return this._length;
  1447. }
  1448. _setEmpty() {
  1449. this.extPtGap = this.ctrlPtGap = this._length = 0, this._currentValue = -1, this._values.length = 0;
  1450. }
  1451. };
  1452. var h5 = class {
  1453. constructor() {
  1454. this.pt = null, this.ca = 0, this.sa = 0;
  1455. }
  1456. };
  1457. var r7;
  1458. !function(t12) {
  1459. t12[t12.FAIL = 0] = "FAIL", t12[t12.END = 1] = "END", t12[t12.CONTINUE = 2] = "CONTINUE";
  1460. }(r7 || (r7 = {}));
  1461. var a7 = class {
  1462. constructor() {
  1463. this.reset();
  1464. }
  1465. reset() {
  1466. this.segment = -1, this.segmentLength = 0, this.abscissa = 0, this.isPathEnd = false, this.isPartEnd = false;
  1467. }
  1468. isValid() {
  1469. return -1 !== this.segment;
  1470. }
  1471. copyTo(t12) {
  1472. t12.segment = this.segment, t12.segmentLength = this.segmentLength, t12.abscissa = this.abscissa, t12.isPathEnd = this.isPathEnd, t12.isPartEnd = this.isPartEnd;
  1473. }
  1474. };
  1475. var g4 = class extends n6 {
  1476. constructor(t12 = 0, s13 = false) {
  1477. super(t12, s13), this._tolerance = e7, this._currentPosition = new a7();
  1478. }
  1479. updateTolerance(t12) {
  1480. this._tolerance = e7 * t12;
  1481. }
  1482. init(t12, s13, e15 = true) {
  1483. return e15 ? (this._patternLength = s13.length(), this._partExtPtGap = s13.extPtGap, this._partCtrlPtGap = s13.ctrlPtGap) : (this._patternLength = 0, this._partExtPtGap = 0, this._partCtrlPtGap = 0), this._currentPosition.reset(), this._partSegCount = 0, this._path = t12, this._seg = -1, this._setPosAtNextPart();
  1484. }
  1485. curPositionIsValid() {
  1486. return this._currentPosition.isValid();
  1487. }
  1488. nextPosition(t12, s13 = r7.FAIL) {
  1489. const e15 = new a7();
  1490. return !!this._nextPosition(t12, e15, null, s13) && (e15.copyTo(this._currentPosition), true);
  1491. }
  1492. curPointAndAngle(t12) {
  1493. t12.pt = this._getPoint(this._currentPosition);
  1494. const [s13, e15] = this._getAngle(this._currentPosition);
  1495. t12.ca = s13, t12.sa = e15;
  1496. }
  1497. nextPointAndAngle(t12, s13, e15 = r7.FAIL) {
  1498. const i11 = new a7();
  1499. if (!this._nextPosition(t12, i11, null, e15))
  1500. return false;
  1501. i11.copyTo(this._currentPosition), s13.pt = this._getPoint(i11);
  1502. const [n17, h8] = this._getAngle(i11);
  1503. return s13.ca = n17, s13.sa = h8, true;
  1504. }
  1505. nextCurve(t12) {
  1506. if (0 === t12)
  1507. return null;
  1508. const s13 = [], e15 = new a7();
  1509. return this._nextPosition(t12, e15, s13, r7.END) ? (e15.copyTo(this._currentPosition), s13) : null;
  1510. }
  1511. isPathEnd() {
  1512. return this._currentPosition.isPathEnd;
  1513. }
  1514. getPathEnd() {
  1515. if (-1 === this._currentPosition.segment)
  1516. throw new Error("missing segment");
  1517. return this._path[this._currentPosition.segment + 1];
  1518. }
  1519. _nextPosition(t12, s13, e15, i11) {
  1520. if (this._currentPosition.isPathEnd)
  1521. return false;
  1522. let n17 = this._currentPosition.abscissa;
  1523. for (this._currentPosition.segmentLength > 0 && (n17 /= this._currentPosition.segmentLength), this._currentPosition.copyTo(s13); s13.abscissa + t12 * this._partLengthRatio > s13.segmentLength + this._tolerance; ) {
  1524. if (e15) {
  1525. if (0 === e15.length)
  1526. if (0 === n17) {
  1527. const t14 = this._path[s13.segment];
  1528. e15.push([t14[0], t14[1]]);
  1529. } else
  1530. e15.push(this.getSegCoord2D(this._path, s13.segment, n17));
  1531. const t13 = this._path[s13.segment + 1];
  1532. e15.push([t13[0], t13[1]]);
  1533. }
  1534. if (n17 = 0, t12 -= (s13.segmentLength - s13.abscissa) / this._partLengthRatio, this._partSegCount)
  1535. s13.segment = this._nextSegment(), s13.segmentLength = this.calculateSegLength(this._path, s13.segment), s13.abscissa = 0, this._partSegCount--;
  1536. else {
  1537. if (!this._setPosAtNextPart())
  1538. return i11 !== r7.FAIL && (s13.segmentLength = this.calculateSegLength(this._path, s13.segment), s13.isPartEnd = true, i11 === r7.END ? (s13.abscissa = s13.segmentLength, s13.isPathEnd = true) : s13.abscissa = s13.segmentLength + t12, true);
  1539. this._currentPosition.copyTo(s13);
  1540. }
  1541. }
  1542. if (s13.abscissa += t12 * this._partLengthRatio, e15) {
  1543. if (0 === e15.length)
  1544. if (0 === n17) {
  1545. const t14 = this._path[s13.segment];
  1546. e15.push([t14[0], t14[1]]);
  1547. } else
  1548. e15.push(this.getSegCoord2D(this._path, s13.segment, n17));
  1549. const t13 = s13.abscissa / s13.segmentLength;
  1550. if (1 === t13) {
  1551. const t14 = this._path[s13.segment + 1];
  1552. e15.push([t14[0], t14[1]]);
  1553. } else
  1554. e15.push(this.getSegCoord2D(this._path, s13.segment, t13));
  1555. }
  1556. return this._partSegCount || Math.abs(s13.abscissa - s13.segmentLength) < this._tolerance && (s13.isPathEnd = this._partIsLast, s13.isPartEnd = true), true;
  1557. }
  1558. _getPoint(t12) {
  1559. if (-1 === t12.segment)
  1560. throw new Error("missing segment");
  1561. const s13 = t12.segmentLength <= 0 ? 0 : t12.abscissa / t12.segmentLength;
  1562. return this.getSegCoord2D(this._path, t12.segment, s13);
  1563. }
  1564. _getAngle(t12) {
  1565. if (-1 === t12.segment)
  1566. throw new Error("missing segment");
  1567. const s13 = t12.segmentLength <= 0 ? 0 : t12.abscissa / t12.segmentLength;
  1568. return this.getSegAngleCS(this._path, t12.segment, s13);
  1569. }
  1570. _setPosAtNextPart() {
  1571. for (; this._partSegCount; )
  1572. this._hasNextSegment() && this._nextSegment(), this._partSegCount--;
  1573. if (!this._hasNextSegment())
  1574. return false;
  1575. for (this._partLength = 0, this._partIsLast = true, this._partSegCount = 0; this._hasNextSegment(); )
  1576. if (this._partLength += this.calculateSegLength(this._path, this._nextSegment()), this._partSegCount++, 1 === I2(this._path[this._getEndPointIndex()])) {
  1577. this._partIsLast = !this._hasNextSegment();
  1578. break;
  1579. }
  1580. let s13 = this._partSegCount;
  1581. for (; s13; )
  1582. this._previousSegment(), --s13;
  1583. this._currentPosition.segment = this._nextSegment(), this._currentPosition.segmentLength = this.calculateSegLength(this._path, this._currentPosition.segment), this._currentPosition.abscissa = 0, this._currentPosition.isPathEnd = this._currentPosition.isPartEnd = false, --this._partSegCount;
  1584. const e15 = this._getStartPointIndex();
  1585. this._ctrlPtBegin = 1 === I2(this._path[e15]);
  1586. let i11 = e15 + this._partSegCount + 1;
  1587. if (i11 >= this._path.length && (i11 = 0), this._ctrlPtEnd = 1 === I2(this._path[i11]), this._patternLength > 0) {
  1588. const t12 = this._ctrlPtBegin ? this._partCtrlPtGap : this._partExtPtGap, s14 = this._ctrlPtEnd ? this._partCtrlPtGap : this._partExtPtGap;
  1589. let e16 = Math.round((this._partLength - (t12 + s14)) / this._patternLength);
  1590. e16 <= 0 && (e16 = t12 + s14 > 0 ? 0 : 1), this._partLengthRatio = this._partLength / (t12 + s14 + e16 * this._patternLength), this._partLengthRatio < 0.01 && (this._partLengthRatio = 1);
  1591. } else
  1592. this._partLengthRatio = 1;
  1593. return true;
  1594. }
  1595. _hasNextSegment() {
  1596. return this._seg < this._path.length - 2;
  1597. }
  1598. _previousSegment() {
  1599. return --this._seg;
  1600. }
  1601. _nextSegment() {
  1602. return ++this._seg;
  1603. }
  1604. _getStartPointIndex() {
  1605. return this._seg;
  1606. }
  1607. _getEndPointIndex() {
  1608. return this._seg + 1;
  1609. }
  1610. };
  1611. // node_modules/@arcgis/core/symbols/cim/effects/EffectDashes.js
  1612. var r8 = class {
  1613. static local() {
  1614. return null === r8.instance && (r8.instance = new r8()), r8.instance;
  1615. }
  1616. execute(t12, e15, s13, a15) {
  1617. return new n8(t12, e15, s13);
  1618. }
  1619. };
  1620. r8.instance = null;
  1621. var n8 = class extends U2 {
  1622. constructor(t12, e15, s13) {
  1623. var _a, _b;
  1624. super(t12, true, true), this._firstCurve = null, this._walker = new g4(), this._walker.updateTolerance(s13), this._endings = e15.lineDashEnding, this._customDashPos = -((_a = e15.offsetAlongLine) != null ? _a : 0) * s13, this._offsetAtEnd = ((_b = e15.customEndingOffset) != null ? _b : 0) * s13, this._pattern = new n7(), this._pattern.init(e15.dashTemplate, true), this._pattern.scale(s13);
  1625. }
  1626. processPath(t12) {
  1627. if (0 === this._pattern.length())
  1628. return this.iteratePath = false, { paths: [t12] };
  1629. if (!this.iteratePath) {
  1630. let e15 = true;
  1631. switch (this._endings) {
  1632. case k.HalfPattern:
  1633. case k.HalfGap:
  1634. default:
  1635. this._pattern.extPtGap = 0;
  1636. break;
  1637. case k.FullPattern:
  1638. this.isClosed || (this._pattern.extPtGap = 0.5 * this._pattern.firstValue());
  1639. break;
  1640. case k.FullGap:
  1641. this.isClosed || (this._pattern.extPtGap = 0.5 * this._pattern.lastValue());
  1642. break;
  1643. case k.NoConstraint:
  1644. this.isClosed || (e15 = false);
  1645. break;
  1646. case k.Custom:
  1647. this.isClosed || (this._pattern.extPtGap = 0.5 * this._offsetAtEnd);
  1648. }
  1649. const a16 = this._walker.calculatePathLength(t12);
  1650. if (this._pattern.isEmpty() || a16 < 0.1 * this._pattern.length())
  1651. return { paths: [t12] };
  1652. if (!this._walker.init(t12, this._pattern, e15))
  1653. return { paths: [t12] };
  1654. }
  1655. let a15;
  1656. if (this.iteratePath)
  1657. a15 = this._pattern.nextValue();
  1658. else {
  1659. let t13;
  1660. switch (this._endings) {
  1661. case k.HalfPattern:
  1662. default:
  1663. t13 = 0.5 * this._pattern.firstValue();
  1664. break;
  1665. case k.HalfGap:
  1666. t13 = 0.5 * -this._pattern.lastValue();
  1667. break;
  1668. case k.FullGap:
  1669. t13 = -this._pattern.lastValue();
  1670. break;
  1671. case k.FullPattern:
  1672. t13 = 0;
  1673. break;
  1674. case k.NoConstraint:
  1675. case k.Custom:
  1676. t13 = -this._customDashPos;
  1677. }
  1678. let e15 = t13 / this._pattern.length();
  1679. e15 -= Math.floor(e15), t13 = e15 * this._pattern.length(), this._pattern.reset(), a15 = this._pattern.nextValue();
  1680. let i12 = false;
  1681. for (; t13 >= a15; )
  1682. t13 -= a15, a15 = this._pattern.nextValue(), i12 = !i12;
  1683. a15 -= t13, i12 ? (this._walker.nextPosition(a15), a15 = this._pattern.nextValue()) : this.isClosed && (this._firstCurve = this._walker.nextCurve(a15), a15 = this._pattern.nextValue(), this._walker.nextPosition(a15), a15 = this._pattern.nextValue());
  1684. }
  1685. let i11 = this._walker.nextCurve(a15);
  1686. return i11 ? this._walker.isPathEnd() ? (this.iteratePath = false, this._firstCurve && (this._firstCurve.splice(0, 1), s7.mergePath(i11, this._firstCurve), this._firstCurve = null)) : (a15 = this._pattern.nextValue(), !this._walker.nextPosition(a15) || this._walker.isPathEnd() ? (this.iteratePath = false, this._firstCurve && (i11 = this._firstCurve, this._firstCurve = null)) : this.iteratePath = true) : (this.iteratePath = false, i11 = this._firstCurve, this._firstCurve = null), { paths: [i11] };
  1687. }
  1688. };
  1689. // node_modules/@arcgis/core/symbols/cim/effects/EffectDonut.js
  1690. var r9 = class {
  1691. static local() {
  1692. return null === r9.instance && (r9.instance = new r9()), r9.instance;
  1693. }
  1694. execute(t12, i11, e15, s13) {
  1695. return new m5(t12, i11, e15);
  1696. }
  1697. };
  1698. r9.instance = null;
  1699. var m5 = class {
  1700. constructor(t12, i11, r19) {
  1701. switch (this._inputGeometries = t12, this._curveHelper = new n6(), this._width = (void 0 !== i11.width ? i11.width : 2) * r19, i11.method) {
  1702. case B2.Mitered:
  1703. default:
  1704. this._method = O.Mitered;
  1705. break;
  1706. case B2.Bevelled:
  1707. this._method = O.Bevelled;
  1708. break;
  1709. case B2.Rounded:
  1710. case B2.TrueBuffer:
  1711. this._method = O.Rounded;
  1712. break;
  1713. case B2.Square:
  1714. this._method = O.Square;
  1715. }
  1716. this._option = i11.option, this._offsetFlattenError = e7 * r19;
  1717. }
  1718. next() {
  1719. let e15 = this._inputGeometries.next();
  1720. for (; e15; ) {
  1721. if (u2(e15) && this._width > 0) {
  1722. if (Math.min(e15.xmax - e15.xmin, e15.ymax - e15.ymin) - 2 * this._width < 0)
  1723. return e15;
  1724. const t12 = [];
  1725. return t12.push([[e15.xmin, e15.ymin], [e15.xmin, e15.ymax], [e15.xmax, e15.ymax], [e15.xmax, e15.ymin], [e15.xmin, e15.ymin]]), t12.push([[e15.xmin + this._width, e15.ymin + this._width], [e15.xmax - this._width, e15.ymin + this._width], [e15.xmax - this._width, e15.ymax - this._width], [e15.xmin + this._width, e15.ymax - this._width], [e15.xmin + this._width, e15.ymin + this._width]]), { rings: t12 };
  1726. }
  1727. if (y2(e15) && this._width > 0) {
  1728. const t12 = [];
  1729. for (const i11 of e15.rings) {
  1730. const e16 = this._curveHelper.calculatePathLength(i11), s13 = this._curveHelper.offset(i11, this._width, this._method, 4, this._offsetFlattenError);
  1731. s13 && (e16 < 0 && s13.reverse(), t12.push(s13));
  1732. }
  1733. if (t12.length)
  1734. return { rings: t12 };
  1735. }
  1736. e15 = this._inputGeometries.next();
  1737. }
  1738. return null;
  1739. }
  1740. };
  1741. // node_modules/@arcgis/core/symbols/cim/effects/EffectJog.js
  1742. var s9 = class {
  1743. static local() {
  1744. return null === s9.instance && (s9.instance = new s9()), s9.instance;
  1745. }
  1746. execute(t12, i11, s13, n17) {
  1747. return new e8(t12, i11, s13);
  1748. }
  1749. };
  1750. s9.instance = null;
  1751. var e8 = class extends U2 {
  1752. constructor(t12, s13, e15) {
  1753. super(t12, false, true), this._curveHelper = new n6(), this._length = (void 0 !== s13.length ? s13.length : 20) * e15, this._angle = void 0 !== s13.angle ? s13.angle : 225, this._position = void 0 !== s13.position ? s13.position : 50, this._length < 0 && (this._length = -this._length), this._position < 20 && (this._position = 20), this._position > 80 && (this._position = 80), this._mirror = false;
  1754. }
  1755. processPath(t12) {
  1756. if (this._curveHelper.isEmpty(t12, false))
  1757. return null;
  1758. const i11 = t12[0], s13 = t12[t12.length - 1], e15 = [s13[0] - i11[0], s13[1] - i11[1]];
  1759. this._curveHelper.normalize(e15);
  1760. const n17 = [i11[0] + (s13[0] - i11[0]) * this._position / 100, i11[1] + (s13[1] - i11[1]) * this._position / 100], h8 = Math.cos((90 - this._angle) / 180 * Math.PI);
  1761. let r19 = Math.sin((90 - this._angle) / 180 * Math.PI);
  1762. this._mirror && (r19 = -r19), this._mirror = !this._mirror;
  1763. return { paths: [[i11, [n17[0] - this._length / 2 * h8, n17[1] - this._length / 2 * r19], [n17[0] + this._length / 2 * h8, n17[1] + this._length / 2 * r19], s13]] };
  1764. }
  1765. };
  1766. // node_modules/@arcgis/core/symbols/cim/effects/EffectMove.js
  1767. var n9 = class {
  1768. static local() {
  1769. return null === n9.instance && (n9.instance = new n9()), n9.instance;
  1770. }
  1771. execute(t12, s13, e15, i11) {
  1772. return new r10(t12, s13, e15);
  1773. }
  1774. };
  1775. n9.instance = null;
  1776. var r10 = class {
  1777. constructor(t12, s13, e15) {
  1778. this._inputGeometries = t12, this._offsetX = void 0 !== s13.offsetX ? s13.offsetX * e15 : 0, this._offsetY = void 0 !== s13.offsetY ? -s13.offsetY * e15 : 0;
  1779. }
  1780. next() {
  1781. let n17 = this._inputGeometries.next();
  1782. for (; n17; ) {
  1783. if (u2(n17))
  1784. return { xmin: n17.xmin + this._offsetX, xmax: n17.xmax + this._offsetX, ymin: n17.ymin + this._offsetY, ymax: n17.ymax + this._offsetY };
  1785. if (y2(n17)) {
  1786. const s13 = y(n17);
  1787. return this._moveMultipath(s13.rings, this._offsetX, this._offsetY), s13;
  1788. }
  1789. if (f(n17)) {
  1790. const s13 = y(n17);
  1791. return this._moveMultipath(s13.paths, this._offsetX, this._offsetY), s13;
  1792. }
  1793. if (l(n17)) {
  1794. const s13 = y(n17);
  1795. return this._movePath(s13.points, this._offsetX, this._offsetY), s13;
  1796. }
  1797. if (s5(n17))
  1798. return { x: n17.x + this._offsetX, y: n17.y + this._offsetY };
  1799. n17 = this._inputGeometries.next();
  1800. }
  1801. return null;
  1802. }
  1803. _moveMultipath(t12, s13, e15) {
  1804. if (t12)
  1805. for (const i11 of t12)
  1806. this._movePath(i11, s13, e15);
  1807. }
  1808. _movePath(t12, s13, e15) {
  1809. if (t12)
  1810. for (const i11 of t12)
  1811. i11[0] += s13, i11[1] += e15;
  1812. }
  1813. };
  1814. // node_modules/@arcgis/core/symbols/cim/effects/EffectOffset.js
  1815. var r11 = class {
  1816. static local() {
  1817. return null === r11.instance && (r11.instance = new r11()), r11.instance;
  1818. }
  1819. execute(t12, e15, s13, i11) {
  1820. return new f5(t12, e15, s13);
  1821. }
  1822. };
  1823. r11.instance = null;
  1824. var f5 = class {
  1825. constructor(t12, e15, s13) {
  1826. var _a;
  1827. this._inputGeometries = t12, this._curveHelper = new n6(), this._offset = ((_a = e15.offset) != null ? _a : 1) * s13, this._method = e15.method, this._option = e15.option, this._offsetFlattenError = e7 * s13;
  1828. }
  1829. next() {
  1830. let i11 = this._inputGeometries.next();
  1831. for (; i11; ) {
  1832. if (0 === this._offset)
  1833. return i11;
  1834. if (u2(i11)) {
  1835. if (this._method === O.Rounded && this._offset > 0) {
  1836. const t12 = [[i11.xmin, i11.ymin], [i11.xmin, i11.ymax], [i11.xmax, i11.ymax], [i11.xmax, i11.ymin], [i11.xmin, i11.ymin]], e15 = this._curveHelper.offset(t12, -this._offset, this._method, 4, this._offsetFlattenError);
  1837. return e15 ? { rings: [e15] } : null;
  1838. }
  1839. if (Math.min(i11.xmax - i11.xmin, i11.ymax - i11.ymin) + 2 * this._offset > 0)
  1840. return { xmin: i11.xmin - this._offset, xmax: i11.xmax + this._offset, ymin: i11.ymin - this._offset, ymax: i11.ymax + this._offset };
  1841. }
  1842. if (y2(i11)) {
  1843. const t12 = [];
  1844. for (const e15 of i11.rings) {
  1845. const s13 = this._curveHelper.offset(e15, -this._offset, this._method, 4, this._offsetFlattenError);
  1846. s13 && t12.push(s13);
  1847. }
  1848. if (t12.length)
  1849. return { rings: t12 };
  1850. }
  1851. if (f(i11)) {
  1852. const t12 = [];
  1853. for (const e15 of i11.paths) {
  1854. const s13 = this._curveHelper.offset(e15, -this._offset, this._method, 4, this._offsetFlattenError);
  1855. s13 && t12.push(s13);
  1856. }
  1857. if (t12.length)
  1858. return { paths: t12 };
  1859. }
  1860. i11 = this._inputGeometries.next();
  1861. }
  1862. return null;
  1863. }
  1864. };
  1865. // node_modules/@arcgis/core/symbols/cim/effects/EffectReverse.js
  1866. var s10 = class {
  1867. static local() {
  1868. return null === s10.instance && (s10.instance = new s10()), s10.instance;
  1869. }
  1870. execute(e15, t12, r19, s13) {
  1871. return new n10(e15, t12, r19);
  1872. }
  1873. };
  1874. s10.instance = null;
  1875. var n10 = class {
  1876. constructor(e15, t12, r19) {
  1877. this._inputGeometries = e15, this._reverse = void 0 === t12.reverse || t12.reverse;
  1878. }
  1879. next() {
  1880. let s13 = this._inputGeometries.next();
  1881. for (; s13; ) {
  1882. if (!this._reverse)
  1883. return s13;
  1884. if (f(s13)) {
  1885. const t12 = y(s13);
  1886. return g3(t12.paths), t12;
  1887. }
  1888. s13 = this._inputGeometries.next();
  1889. }
  1890. return null;
  1891. }
  1892. };
  1893. // node_modules/@arcgis/core/symbols/cim/effects/EffectRotate.js
  1894. var u10 = class {
  1895. static local() {
  1896. return null === u10.instance && (u10.instance = new u10()), u10.instance;
  1897. }
  1898. execute(t12, n17, e15, r19) {
  1899. return new c7(t12, n17, e15);
  1900. }
  1901. };
  1902. u10.instance = null;
  1903. var c7 = class {
  1904. constructor(t12, n17, e15) {
  1905. this._inputGeometries = t12, this._rotateAngle = void 0 !== n17.angle ? n17.angle * Math.PI / 180 : 0;
  1906. }
  1907. next() {
  1908. let u15 = this._inputGeometries.next();
  1909. for (; u15; ) {
  1910. if (0 === this._rotateAngle)
  1911. return u15;
  1912. const c12 = u3();
  1913. c2(c12, u15);
  1914. const l12 = (c12[2] + c12[0]) / 2, m9 = (c12[3] + c12[1]) / 2;
  1915. if (u2(u15)) {
  1916. const t12 = { rings: [[[u15.xmin, u15.ymin], [u15.xmin, u15.ymax], [u15.xmax, u15.ymax], [u15.xmax, u15.ymin], [u15.xmin, u15.ymin]]] };
  1917. return this._rotateMultipath(t12.rings, l12, m9), t12;
  1918. }
  1919. if (y2(u15)) {
  1920. const n17 = y(u15);
  1921. return this._rotateMultipath(n17.rings, l12, m9), n17;
  1922. }
  1923. if (f(u15)) {
  1924. const n17 = y(u15);
  1925. return this._rotateMultipath(n17.paths, l12, m9), n17;
  1926. }
  1927. if (l(u15)) {
  1928. const n17 = y(u15);
  1929. return this._rotatePath(n17.points, l12, m9), n17;
  1930. }
  1931. if (s5(u15))
  1932. return u15;
  1933. u15 = this._inputGeometries.next();
  1934. }
  1935. return null;
  1936. }
  1937. _rotateMultipath(t12, n17, e15) {
  1938. if (t12)
  1939. for (const r19 of t12)
  1940. this._rotatePath(r19, n17, e15);
  1941. }
  1942. _rotatePath(t12, n17, e15) {
  1943. if (t12) {
  1944. const r19 = Math.cos(this._rotateAngle), i11 = Math.sin(this._rotateAngle);
  1945. for (const o12 of t12) {
  1946. const t13 = o12[0] - n17, s13 = o12[1] - e15;
  1947. o12[0] = n17 + t13 * r19 - s13 * i11, o12[1] = e15 + t13 * i11 + s13 * r19;
  1948. }
  1949. }
  1950. }
  1951. };
  1952. // node_modules/@arcgis/core/symbols/cim/effects/EffectScale.js
  1953. var c8 = class {
  1954. static local() {
  1955. return null === c8.instance && (c8.instance = new c8()), c8.instance;
  1956. }
  1957. execute(t12, s13, i11, r19) {
  1958. return new l7(t12, s13, i11);
  1959. }
  1960. };
  1961. c8.instance = null;
  1962. var l7 = class {
  1963. constructor(t12, s13, i11) {
  1964. this._inputGeometries = t12, this._xFactor = void 0 !== s13.xScaleFactor ? s13.xScaleFactor : 1.15, this._yFactor = void 0 !== s13.yScaleFactor ? s13.yScaleFactor : 1.15;
  1965. }
  1966. next() {
  1967. let c12 = this._inputGeometries.next();
  1968. for (; c12; ) {
  1969. if (1 === this._xFactor && 1 === this._yFactor)
  1970. return c12;
  1971. const l12 = u3();
  1972. c2(l12, c12);
  1973. const u15 = (l12[2] + l12[0]) / 2, m9 = (l12[3] + l12[1]) / 2;
  1974. if (u2(c12)) {
  1975. const t12 = { rings: [[[c12.xmin, c12.ymin], [c12.xmin, c12.ymax], [c12.xmax, c12.ymax], [c12.xmax, c12.ymin], [c12.xmin, c12.ymin]]] };
  1976. return this._scaleMultipath(t12.rings, u15, m9), t12;
  1977. }
  1978. if (y2(c12)) {
  1979. const s13 = y(c12);
  1980. return this._scaleMultipath(s13.rings, u15, m9), s13;
  1981. }
  1982. if (f(c12)) {
  1983. const s13 = y(c12);
  1984. return this._scaleMultipath(s13.paths, u15, m9), s13;
  1985. }
  1986. if (l(c12)) {
  1987. const s13 = y(c12);
  1988. return this._scalePath(s13.points, u15, m9), s13;
  1989. }
  1990. if (s5(c12))
  1991. return c12;
  1992. c12 = this._inputGeometries.next();
  1993. }
  1994. return null;
  1995. }
  1996. _scaleMultipath(t12, s13, i11) {
  1997. if (t12)
  1998. for (const r19 of t12)
  1999. this._scalePath(r19, s13, i11);
  2000. }
  2001. _scalePath(t12, s13, i11) {
  2002. if (t12)
  2003. for (const r19 of t12) {
  2004. const t13 = (r19[0] - s13) * this._xFactor, n17 = (r19[1] - i11) * this._yFactor;
  2005. r19[0] = s13 + t13, r19[1] = i11 + n17;
  2006. }
  2007. }
  2008. };
  2009. // node_modules/@arcgis/core/symbols/cim/effects/EffectWave.js
  2010. var a8 = class {
  2011. static local() {
  2012. return null === a8.instance && (a8.instance = new a8()), a8.instance;
  2013. }
  2014. execute(t12, e15, i11, s13) {
  2015. return new o8(t12, e15, i11);
  2016. }
  2017. };
  2018. a8.instance = null;
  2019. var o8 = class {
  2020. constructor(t12, e15, i11) {
  2021. this._inputGeometries = t12, this._height = (void 0 !== e15.amplitude ? e15.amplitude : 2) * i11, this._period = (void 0 !== e15.period ? e15.period : 3) * i11, this._style = e15.waveform, this._height <= 0 && (this._height = Math.abs(this._height)), this._period <= 0 && (this._period = Math.abs(this._period)), this._pattern = new n7(), this._pattern.addValue(this._period), this._pattern.addValue(this._period), this._walker = new g4(), this._walker.updateTolerance(i11);
  2022. }
  2023. next() {
  2024. let i11 = this._inputGeometries.next();
  2025. for (; i11; ) {
  2026. if (0 === this._height || 0 === this._period)
  2027. return i11;
  2028. if (f(i11)) {
  2029. const t12 = this._processGeom(i11.paths);
  2030. if (t12.length)
  2031. return { paths: t12 };
  2032. }
  2033. if (y2(i11)) {
  2034. const t12 = this._processGeom(i11.rings);
  2035. if (t12.length)
  2036. return { rings: t12 };
  2037. }
  2038. i11 = this._inputGeometries.next();
  2039. }
  2040. return null;
  2041. }
  2042. _processGeom(t12) {
  2043. const e15 = [];
  2044. for (const i11 of t12)
  2045. if (this._walker.init(i11, this._pattern))
  2046. switch (this._style) {
  2047. case A.Sinus:
  2048. default:
  2049. e15.push(this._constructCurve(i11, false));
  2050. break;
  2051. case A.Square:
  2052. e15.push(this._constructSquare(i11));
  2053. break;
  2054. case A.Triangle:
  2055. e15.push(this._constructTriangle(i11));
  2056. break;
  2057. case A.Random:
  2058. e15.push(this._constructCurve(i11, true));
  2059. }
  2060. else
  2061. e15.push(i11);
  2062. return e15;
  2063. }
  2064. _constructCurve(t12, e15) {
  2065. const s13 = new s7(), h8 = this._walker.calculatePathLength(t12);
  2066. let n17 = Math.round(h8 / this._period);
  2067. 0 === n17 && (n17 = 1);
  2068. const a15 = n17 * 16 + 1, o12 = h8 / n17, l12 = this._period / 16, _4 = 1 / a15, c12 = 2 * Math.PI * h8 / o12, p6 = 2 * Math.PI * Math.random(), u15 = 2 * Math.PI * Math.random(), d4 = 2 * Math.PI * Math.random(), g8 = 0.75 - Math.random() / 2, w6 = 0.75 - Math.random() / 2, f9 = new h5();
  2069. this._walker.curPointAndAngle(f9), s13.startPath(f9.pt);
  2070. let k4 = 0;
  2071. for (; ; ) {
  2072. if (!this._walker.nextPointAndAngle(l12, f9)) {
  2073. s13.lineTo(t12[t12.length - 1]);
  2074. break;
  2075. }
  2076. {
  2077. const t13 = k4;
  2078. let i11;
  2079. if (k4 += _4, e15) {
  2080. const e16 = this._height / 2 * (1 + 0.3 * Math.sin(g8 * c12 * t13 + p6));
  2081. i11 = e16 * Math.sin(c12 * t13 + u15), i11 += e16 * Math.sin(w6 * c12 * t13 + d4), i11 /= 2;
  2082. } else
  2083. i11 = 0.5 * this._height * Math.sin(0.5 * c12 * t13);
  2084. s13.lineTo([f9.pt[0] - i11 * f9.sa, f9.pt[1] + i11 * f9.ca]);
  2085. }
  2086. }
  2087. return s13.path();
  2088. }
  2089. _constructSquare(t12) {
  2090. const e15 = new s7(), s13 = this._walker.calculatePathLength(t12);
  2091. Math.round(s13 / this._period);
  2092. let h8 = true;
  2093. for (; ; ) {
  2094. let t13 = false;
  2095. if (this._walker.curPositionIsValid()) {
  2096. const i11 = new h5();
  2097. this._walker.curPointAndAngle(i11);
  2098. const s14 = new h5();
  2099. if (this._walker.nextPointAndAngle(this._period, s14)) {
  2100. const n17 = new h5();
  2101. this._walker.nextPointAndAngle(this._period, n17) && (h8 ? (e15.startPath(i11.pt), h8 = false) : e15.lineTo(i11.pt), e15.lineTo([i11.pt[0] - this._height / 2 * i11.sa, i11.pt[1] + this._height / 2 * i11.ca]), e15.lineTo([s14.pt[0] - this._height / 2 * s14.sa, s14.pt[1] + this._height / 2 * s14.ca]), e15.lineTo([s14.pt[0] + this._height / 2 * s14.sa, s14.pt[1] - this._height / 2 * s14.ca]), e15.lineTo([n17.pt[0] + this._height / 2 * n17.sa, n17.pt[1] - this._height / 2 * n17.ca]), t13 = true);
  2102. }
  2103. }
  2104. if (!t13) {
  2105. e15.lineTo(this._walker.getPathEnd());
  2106. break;
  2107. }
  2108. }
  2109. return e15.path();
  2110. }
  2111. _constructTriangle(t12) {
  2112. const e15 = new s7(), s13 = this._walker.calculatePathLength(t12);
  2113. Math.round(s13 / this._period);
  2114. let h8 = true;
  2115. for (; ; ) {
  2116. let t13 = false;
  2117. if (this._walker.curPositionIsValid()) {
  2118. const i11 = new h5();
  2119. this._walker.curPointAndAngle(i11);
  2120. const s14 = new h5();
  2121. if (this._walker.nextPointAndAngle(this._period / 2, s14)) {
  2122. const n17 = new h5();
  2123. this._walker.nextPointAndAngle(this._period, n17) && (this._walker.nextPosition(this._period / 2) && (h8 ? (e15.startPath(i11.pt), h8 = false) : e15.lineTo(i11.pt), e15.lineTo([s14.pt[0] - this._height / 2 * s14.sa, s14.pt[1] + this._height / 2 * s14.ca]), e15.lineTo([n17.pt[0] + this._height / 2 * n17.sa, n17.pt[1] - this._height / 2 * n17.ca])), t13 = true);
  2124. }
  2125. }
  2126. if (!t13) {
  2127. e15.lineTo(this._walker.getPathEnd());
  2128. break;
  2129. }
  2130. }
  2131. return e15.path();
  2132. }
  2133. };
  2134. // node_modules/@arcgis/core/symbols/cim/placements/PlacementAlongLineSameSize.js
  2135. var a9 = class {
  2136. static local() {
  2137. return null === a9.instance && (a9.instance = new a9()), a9.instance;
  2138. }
  2139. execute(t12, e15, s13, i11) {
  2140. return new r12(t12, e15, s13);
  2141. }
  2142. };
  2143. a9.instance = null;
  2144. var r12 = class extends G2 {
  2145. constructor(t12, e15, n17) {
  2146. var _a;
  2147. super(t12, true, true), this._geometryWalker = new g4(), this._geometryWalker.updateTolerance(n17), this._angleToLine = (_a = e15.angleToLine) != null ? _a : true, this._offset = (e15.offset ? e15.offset : 0) * n17, this._originalEndings = e15.endings, this._offsetAtEnd = (e15.customEndingOffset ? e15.customEndingOffset : 0) * n17, this._position = -(e15.offsetAlongLine ? e15.offsetAlongLine : 0) * n17, this._pattern = new n7(), this._pattern.init(e15.placementTemplate, false), this._pattern.scale(n17), this._endings = this._originalEndings;
  2148. }
  2149. processPath(t12) {
  2150. if (this._pattern.isEmpty())
  2151. return null;
  2152. let s13;
  2153. if (this.iteratePath)
  2154. s13 = this._pattern.nextValue();
  2155. else {
  2156. this._originalEndings === X.WithFullGap && this.isClosed ? this._endings = X.WithMarkers : this._endings = this._originalEndings, this._pattern.extPtGap = 0;
  2157. let i12, n17 = true;
  2158. switch (this._endings) {
  2159. case X.NoConstraint:
  2160. i12 = -this._position, i12 = this._adjustPosition(i12), n17 = false;
  2161. break;
  2162. case X.WithHalfGap:
  2163. default:
  2164. i12 = -this._pattern.lastValue() / 2;
  2165. break;
  2166. case X.WithFullGap:
  2167. i12 = -this._pattern.lastValue(), this._pattern.extPtGap = this._pattern.lastValue();
  2168. break;
  2169. case X.WithMarkers:
  2170. i12 = 0;
  2171. break;
  2172. case X.Custom:
  2173. i12 = -this._position, i12 = this._adjustPosition(i12), this._pattern.extPtGap = 0.5 * this._offsetAtEnd;
  2174. }
  2175. if (!this._geometryWalker.init(t12, this._pattern, n17))
  2176. return null;
  2177. this._pattern.reset();
  2178. let a15 = 0;
  2179. for (; i12 > a15; )
  2180. i12 -= a15, a15 = this._pattern.nextValue();
  2181. a15 -= i12, s13 = a15, this.iteratePath = true;
  2182. }
  2183. const i11 = new h5();
  2184. return this._geometryWalker.nextPointAndAngle(s13, i11) ? this._endings === X.WithFullGap && this._geometryWalker.isPathEnd() ? (this.iteratePath = false, null) : this._endings === X.WithMarkers && this._geometryWalker.isPathEnd() && (this.iteratePath = false, this.isClosed) ? null : (this.internalPlacement.setTranslate(i11.pt[0] - this._offset * i11.sa, i11.pt[1] + this._offset * i11.ca), this._angleToLine && this.internalPlacement.setRotateCS(i11.ca, i11.sa), this.internalPlacement) : (this.iteratePath = false, null);
  2185. }
  2186. _adjustPosition(t12) {
  2187. let e15 = t12 / this._pattern.length();
  2188. return e15 -= Math.floor(e15), e15 * this._pattern.length();
  2189. }
  2190. };
  2191. // node_modules/@arcgis/core/symbols/cim/placements/PlacementAtExtremities.js
  2192. var n11 = class {
  2193. static local() {
  2194. return null === n11.instance && (n11.instance = new n11()), n11.instance;
  2195. }
  2196. execute(t12, e15, s13, i11) {
  2197. return new r13(t12, e15, s13);
  2198. }
  2199. };
  2200. n11.instance = null;
  2201. var r13 = class extends G2 {
  2202. constructor(t12, e15, i11) {
  2203. super(t12, false, true), this._curveHelper = new n6(), this._angleToLine = void 0 === e15.angleToLine || e15.angleToLine, this._offset = void 0 !== e15.offset ? e15.offset * i11 : 0, this._type = e15.extremityPlacement, this._position = void 0 !== e15.offsetAlongLine ? e15.offsetAlongLine * i11 : 0, this._beginProcessed = false;
  2204. }
  2205. processPath(t12) {
  2206. let e15;
  2207. switch (this._type) {
  2208. case o3.Both:
  2209. default:
  2210. this._beginProcessed ? (e15 = this._atExtremities(t12, this._position, false), this._beginProcessed = false, this.iteratePath = false) : (e15 = this._atExtremities(t12, this._position, true), this._beginProcessed = true, this.iteratePath = true);
  2211. break;
  2212. case o3.JustBegin:
  2213. e15 = this._atExtremities(t12, this._position, true);
  2214. break;
  2215. case o3.JustEnd:
  2216. e15 = this._atExtremities(t12, this._position, false);
  2217. case o3.None:
  2218. }
  2219. return e15;
  2220. }
  2221. _atExtremities(t12, s13, i11) {
  2222. const n17 = t12.length;
  2223. if (n17 < 2)
  2224. return null;
  2225. const r19 = i11 ? 1 : n17 - 2, o12 = i11 ? n17 : -1, a15 = i11 ? 1 : -1;
  2226. let l12, h8 = 0, c12 = i11 ? t12[0] : t12[n17 - 1];
  2227. for (let _4 = r19; _4 !== o12; _4 += a15) {
  2228. l12 = c12, c12 = t12[_4];
  2229. const i12 = this._curveHelper.calculateLength(l12, c12);
  2230. if (h8 + i12 > s13) {
  2231. const t13 = (s13 - h8) / i12, [n18, r20] = this._curveHelper.getAngleCS(l12, c12, t13), o13 = C4(l12, c12, t13);
  2232. return this.internalPlacement.setTranslate(o13[0] - this._offset * r20, o13[1] + this._offset * n18), this._angleToLine && this.internalPlacement.setRotateCS(-n18, -r20), this.internalPlacement;
  2233. }
  2234. h8 += i12;
  2235. }
  2236. return null;
  2237. }
  2238. };
  2239. // node_modules/@arcgis/core/symbols/cim/placements/PlacementAtRatioPositions.js
  2240. var a10 = class {
  2241. static local() {
  2242. return null === a10.instance && (a10.instance = new a10()), a10.instance;
  2243. }
  2244. execute(t12, i11, s13, e15) {
  2245. return new r14(t12, i11, s13);
  2246. }
  2247. };
  2248. a10.instance = null;
  2249. var r14 = class extends G2 {
  2250. constructor(t12, e15, n17) {
  2251. super(t12, true, true), this._walker = new g4(), this._walker.updateTolerance(n17), this._angleToLine = void 0 === e15.angleToLine || e15.angleToLine, this._offset = void 0 !== e15.offset ? e15.offset * n17 : 0, this._beginGap = void 0 !== e15.beginPosition ? e15.beginPosition * n17 : 0, this._endGap = void 0 !== e15.endPosition ? e15.endPosition * n17 : 0, this._flipFirst = void 0 === e15.flipFirst || e15.flipFirst, this._pattern = new n7(), this._pattern.init(e15.positionArray, false, false), this._subPathLen = 0, this._posCount = this._pattern.size(), this._isFirst = true, this._prevPos = 0;
  2252. }
  2253. processPath(t12) {
  2254. if (this._pattern.isEmpty())
  2255. return null;
  2256. let i11;
  2257. if (this.iteratePath) {
  2258. const t13 = this._pattern.nextValue() * this._subPathLen, s14 = this._beginGap + t13;
  2259. i11 = s14 - this._prevPos, this._prevPos = s14;
  2260. } else {
  2261. if (this._posCount = this._pattern.size(), this._isFirst = true, this._prevPos = 0, this._subPathLen = this._walker.calculatePathLength(t12) - this._beginGap - this._endGap, this._subPathLen < 0)
  2262. return this.iteratePath = false, null;
  2263. if (!this._walker.init(t12, this._pattern, false))
  2264. return null;
  2265. this._pattern.reset();
  2266. const s14 = this._pattern.nextValue() * this._subPathLen, e15 = this._beginGap + s14;
  2267. i11 = e15 - this._prevPos, this._prevPos = e15, this.iteratePath = true;
  2268. }
  2269. const s13 = new h5();
  2270. if (!this._walker.nextPointAndAngle(i11, s13, r7.END))
  2271. return this.iteratePath = false, null;
  2272. this.internalPlacement.setTranslate(s13.pt[0] - this._offset * s13.sa, s13.pt[1] + this._offset * s13.ca);
  2273. const a15 = this._isFirst && this._flipFirst;
  2274. let r19, h8;
  2275. return this._angleToLine ? (r19 = s13.ca, h8 = s13.sa) : (r19 = 1, h8 = 0), a15 && (r19 = -r19, h8 = -h8), this.internalPlacement.setRotateCS(r19, h8), this._isFirst = false, this._posCount--, 0 === this._posCount && (this.iteratePath = false), this.internalPlacement;
  2276. }
  2277. };
  2278. // node_modules/@arcgis/core/symbols/cim/placements/PlacementInsidePolygon.js
  2279. function h6(t12) {
  2280. return void 0 !== t12.rings;
  2281. }
  2282. var e9 = class {
  2283. static local() {
  2284. return null === e9.instance && (e9.instance = new e9()), e9.instance;
  2285. }
  2286. execute(t12, s13, i11, h8) {
  2287. return new n12(t12, s13, i11, h8);
  2288. }
  2289. };
  2290. e9.instance = null;
  2291. var n12 = class {
  2292. constructor(e15, n17, _4, r19) {
  2293. var _a, _b, _c, _d, _e, _f, _g, _h, _i;
  2294. if (this._xMin = 0, this._xMax = 0, this._yMin = 0, this._yMax = 0, this._currentX = 0, this._currentY = 0, this._stepX = Math.abs((_a = n17.stepX) != null ? _a : 16) * _4, this._stepY = Math.abs((_b = n17.stepY) != null ? _b : 16) * _4, 0 !== this._stepX && 0 !== this._stepY && e15 && h6(e15) && e15.rings) {
  2295. if (this._gridType = (_c = n17.gridType) != null ? _c : Y.Fixed, this._gridType === Y.Random) {
  2296. const s13 = (_d = n17.seed) != null ? _d : 13, i11 = 1;
  2297. this._randomLCG = new t2(s13 * i11), this._randomness = ((_e = n17.randomness) != null ? _e : 100) / 100, this._gridAngle = 0, this._shiftOddRows = false, this._cosAngle = 1, this._sinAngle = 0, this._offsetX = 0, this._offsetY = 0;
  2298. } else {
  2299. if (this._randomness = 0, this._gridAngle = (_f = n17.gridAngle) != null ? _f : 0, this._shiftOddRows = (_g = n17.shiftOddRows) != null ? _g : false, this._offsetX = ((_h = n17.offsetX) != null ? _h : 0) * _4, this._offsetY = ((_i = n17.offsetY) != null ? _i : 0) * _4, this._cosAngle = Math.cos(this._gridAngle / 180 * Math.PI), this._sinAngle = -Math.sin(this._gridAngle / 180 * Math.PI), this._stepX)
  2300. if (this._offsetX < 0)
  2301. for (; this._offsetX < -0.5 * this._stepX; )
  2302. this._offsetX += this._stepX;
  2303. else
  2304. for (; this._offsetX >= 0.5 * this._stepX; )
  2305. this._offsetX -= this._stepX;
  2306. if (this._stepY)
  2307. if (this._offsetY < 0)
  2308. for (; this._offsetY < -0.5 * this._stepY; )
  2309. this._offsetY += this._stepY;
  2310. else
  2311. for (; this._offsetY >= 0.5 * this._stepY; )
  2312. this._offsetY -= this._stepY;
  2313. }
  2314. this._graphicOriginX = 0, this._graphicOriginY = 0, this._internalPlacement = new t7(), this._calculateMinMax(e15), this._geometry = e15;
  2315. }
  2316. }
  2317. next() {
  2318. return this._geometry ? this._nextInside() : null;
  2319. }
  2320. _calculateMinMax(t12) {
  2321. let s13, i11, h8, e15, n17, _4, r19, o12;
  2322. this._xMin = 0, this._xMax = 0, this._yMin = 0, this._yMax = 0, n17 = _4 = Number.MAX_VALUE, r19 = o12 = -Number.MAX_VALUE;
  2323. for (const a15 of t12.rings) {
  2324. const t13 = a15 ? a15.length : 0;
  2325. for (let f9 = 0; f9 < t13; ++f9)
  2326. s13 = a15[f9][0] - this._graphicOriginX - this._offsetX, i11 = a15[f9][1] - this._graphicOriginY - this._offsetY, h8 = this._cosAngle * s13 - this._sinAngle * i11, e15 = this._sinAngle * s13 + this._cosAngle * i11, n17 = Math.min(n17, h8), r19 = Math.max(r19, h8), _4 = Math.min(_4, e15), o12 = Math.max(o12, e15);
  2327. }
  2328. n17 += this._graphicOriginX, r19 += this._graphicOriginX, _4 += this._graphicOriginY, o12 += this._graphicOriginY, this._xMin = Math.round(n17 / this._stepX), this._xMax = Math.round(r19 / this._stepX), this._yMin = Math.round(_4 / this._stepY), this._yMax = Math.round(o12 / this._stepY), this._currentX = this._xMax + 1, this._currentY = this._yMin - 1;
  2329. }
  2330. _nextInside() {
  2331. for (; ; ) {
  2332. if (this._currentX > this._xMax) {
  2333. if (this._currentY++, this._currentY > this._yMax)
  2334. return null;
  2335. this._currentX = this._xMin, this._shiftOddRows && this._currentY % 2 && this._currentX--;
  2336. }
  2337. let t12 = this._currentX * this._stepX + this._offsetX;
  2338. this._shiftOddRows && this._currentY % 2 && (t12 += 0.5 * this._stepX);
  2339. const s13 = this._currentY * this._stepY + this._offsetY;
  2340. let h8, e15;
  2341. return this._currentX++, this._gridType === Y.Random ? (h8 = this._graphicOriginX + t12 + this._stepX * this._randomness * (0.5 - this._randomLCG.getFloat()) * 2 / 3, e15 = this._graphicOriginY + s13 + this._stepY * this._randomness * (0.5 - this._randomLCG.getFloat()) * 2 / 3) : (h8 = this._graphicOriginX + this._cosAngle * t12 + this._sinAngle * s13, e15 = this._graphicOriginY - this._sinAngle * t12 + this._cosAngle * s13), this._internalPlacement.setTranslate(h8, e15), this._internalPlacement;
  2342. }
  2343. }
  2344. };
  2345. // node_modules/@arcgis/core/symbols/cim/placements/PlacementOnLine.js
  2346. var r15 = 1e-3;
  2347. var l8 = class {
  2348. static local() {
  2349. return null === l8.instance && (l8.instance = new l8()), l8.instance;
  2350. }
  2351. execute(e15, t12, n17, i11) {
  2352. return new o9(e15, t12, n17);
  2353. }
  2354. };
  2355. l8.instance = null;
  2356. var o9 = class extends G2 {
  2357. constructor(e15, t12, n17) {
  2358. super(e15, true, true), this._curveHelper = new n6(), this._angleToLine = void 0 === t12.angleToLine || t12.angleToLine, this._offset = void 0 !== t12.offset ? t12.offset * n17 : 0, this._relativeTo = t12.relativeTo, this._position = void 0 !== t12.startPointOffset ? t12.startPointOffset * n17 : 0, this._epsilon = r15 * n17;
  2359. }
  2360. processPath(e15) {
  2361. const i11 = this._position;
  2362. if (this._relativeTo === Z.SegmentMidpoint) {
  2363. for (this.iteratePath || (this._segmentCount = e15.length, this._curSegment = 1, this.iteratePath = true); this._curSegment < this._segmentCount; ) {
  2364. const n17 = this._curSegment;
  2365. this._curSegment++;
  2366. const i12 = e15[n17 - 1], s13 = e15[n17], r20 = this._curveHelper.calculateLength(i12, s13);
  2367. if (r20 < this._epsilon)
  2368. continue;
  2369. const l12 = 0.5 + this._position / r20, [o12, a15] = this._curveHelper.getAngleCS(i12, s13, l12), h8 = C4(i12, s13, l12);
  2370. return this.internalPlacement.setTranslate(h8[0] - this._offset * a15, h8[1] + this._offset * o12), this._angleToLine && this.internalPlacement.setRotateCS(o12, a15), this.internalPlacement;
  2371. }
  2372. return this.iteratePath = false, null;
  2373. }
  2374. this._relativeTo === Z.LineEnd && d2(e15);
  2375. const r19 = this.onLine(e15, i11);
  2376. return this._relativeTo === Z.LineEnd && d2(e15), r19;
  2377. }
  2378. onLine(e15, n17) {
  2379. let i11, r19 = false;
  2380. switch (this._relativeTo) {
  2381. case Z.LineMiddle:
  2382. default:
  2383. i11 = this._curveHelper.calculatePathLength(e15) / 2 + n17;
  2384. break;
  2385. case Z.LineBeginning:
  2386. i11 = n17;
  2387. break;
  2388. case Z.LineEnd:
  2389. i11 = n17, r19 = true;
  2390. }
  2391. const l12 = e15.length;
  2392. let o12, a15 = 0, h8 = e15[0];
  2393. for (let s13 = 1; s13 < l12; ++s13) {
  2394. o12 = h8, h8 = e15[s13];
  2395. const n18 = this._curveHelper.calculateLength(o12, h8);
  2396. if (a15 + n18 > i11) {
  2397. const e16 = (i11 - a15) / n18, [s14, l13] = this._curveHelper.getAngleCS(o12, h8, e16), c12 = C4(o12, h8, e16), u15 = r19 ? -this._offset : this._offset;
  2398. return this.internalPlacement.setTranslate(c12[0] - u15 * l13, c12[1] + u15 * s14), this._angleToLine && (r19 ? this.internalPlacement.setRotateCS(-s14, -l13) : this.internalPlacement.setRotateCS(s14, l13)), this.internalPlacement;
  2399. }
  2400. a15 += n18;
  2401. }
  2402. return null;
  2403. }
  2404. };
  2405. // node_modules/@arcgis/core/symbols/cim/placements/PlacementOnVertices.js
  2406. var n13 = class {
  2407. static local() {
  2408. return null === n13.instance && (n13.instance = new n13()), n13.instance;
  2409. }
  2410. execute(t12, s13, e15, i11) {
  2411. return new a11(t12, s13, e15);
  2412. }
  2413. };
  2414. n13.instance = null;
  2415. var r16 = 1e-15;
  2416. var a11 = class extends G2 {
  2417. constructor(t12, s13, e15) {
  2418. super(t12, true, true), this._curveHelper = new n6(), this._angleToLine = void 0 === s13.angleToLine || s13.angleToLine, this._offset = void 0 !== s13.offset ? s13.offset * e15 : 0, this._endPoints = void 0 === s13.placeOnEndPoints || s13.placeOnEndPoints, this._controlPoints = void 0 === s13.placeOnControlPoints || s13.placeOnControlPoints, this._regularVertices = void 0 === s13.placeOnRegularVertices || s13.placeOnRegularVertices, this._tags = [], this._tagIterator = 0;
  2419. }
  2420. processPath(t12) {
  2421. if (this.iteratePath || (this._preparePath(t12), this.iteratePath = true), this._tagIterator >= this._tags.length)
  2422. return this._tags.length = 0, this._tagIterator = 0, this.iteratePath = false, null;
  2423. const s13 = this._tags[this._tagIterator];
  2424. this._angleToLine && this.internalPlacement.setRotate(s13[2]);
  2425. let e15 = s13[0], i11 = s13[1];
  2426. if (0 !== this._offset) {
  2427. const t13 = Math.cos(s13[2]), n17 = Math.sin(s13[2]);
  2428. e15 -= this._offset * n17, i11 += this._offset * t13;
  2429. }
  2430. return this.internalPlacement.setTranslate(e15, i11), this._tagIterator++, this.internalPlacement;
  2431. }
  2432. _preparePath(t12) {
  2433. this._tags.length = 0, this._tagIterator = 0;
  2434. const i11 = y4(t12), n17 = t12.length - 1;
  2435. let r19, a15, h8 = 0, l12 = 0, _4 = 0, c12 = 0, g8 = 0;
  2436. for (; h8 < n17; ) {
  2437. h8++, r19 = t12[h8 - 1], a15 = t12[h8];
  2438. const s13 = I2(r19), u15 = I2(a15);
  2439. (this._angleToLine || 0 !== this._offset) && (c12 = this._curveHelper.getAngle(r19, a15, 0)), 1 === h8 ? i11 ? (l12 = c12, _4 = s13) : (this._endPoints || this._controlPoints && 1 === s13) && this._tags.push([r19[0], r19[1], c12]) : 1 === s13 ? this._controlPoints && this._tags.push([r19[0], r19[1], o10(g8, c12)]) : this._regularVertices && this._tags.push([r19[0], r19[1], o10(g8, c12)]), (this._angleToLine || 0 !== this._offset) && (g8 = this._curveHelper.getAngle(r19, a15, 1)), h8 === n17 && (i11 ? 1 === u15 || 1 === _4 ? this._controlPoints && this._tags.push([a15[0], a15[1], o10(g8, l12)]) : this._regularVertices && this._tags.push([a15[0], a15[1], o10(g8, l12)]) : (this._endPoints || this._controlPoints && 1 === u15) && this._tags.push([a15[0], a15[1], g8]));
  2440. }
  2441. this._tagIterator = 0;
  2442. }
  2443. };
  2444. function o10(t12, s13) {
  2445. const e15 = Math.PI;
  2446. for (; Math.abs(s13 - t12) > e15 + 2 * r16; )
  2447. s13 - t12 > e15 ? s13 -= 2 * e15 : s13 += 2 * e15;
  2448. return (t12 + s13) / 2;
  2449. }
  2450. // node_modules/@arcgis/core/core/PriorityQueue.js
  2451. var t8 = class {
  2452. constructor(t12 = e10) {
  2453. this._data = [], this._compare = t12;
  2454. }
  2455. get size() {
  2456. return this._data.length;
  2457. }
  2458. enqueue(t12) {
  2459. if (null == t12)
  2460. return;
  2461. const { _data: e15, _compare: n17 } = this;
  2462. e15.push(t12);
  2463. let l12 = e15.length - 1 >>> 0;
  2464. const r19 = e15[l12];
  2465. for (; l12 > 0; ) {
  2466. const t13 = l12 - 1 >> 1, s13 = e15[t13];
  2467. if (!(n17(s13, r19) <= 0))
  2468. break;
  2469. e15[t13] = r19, e15[l12] = s13, l12 = t13;
  2470. }
  2471. }
  2472. dequeue() {
  2473. const { _data: t12, _compare: e15 } = this, n17 = t12[0], l12 = t12.pop();
  2474. if (0 === t12.length)
  2475. return n17;
  2476. t12[0] = l12;
  2477. let r19 = 0;
  2478. const s13 = t12.length, u15 = t12[0];
  2479. let a15, o12, c12 = null;
  2480. for (; ; ) {
  2481. const n18 = 2 * r19 + 1, l13 = 2 * r19 + 2;
  2482. if (c12 = null, n18 < s13 && (a15 = t12[n18], e15(a15, u15) > 0 && (c12 = n18)), l13 < s13 && (o12 = t12[l13], (null === c12 && e15(o12, u15) <= 0 || null !== c12 && e15(o12, a15) <= 0) && (c12 = l13)), null === c12)
  2483. break;
  2484. t12[r19] = t12[c12], t12[c12] = u15, r19 = c12;
  2485. }
  2486. return n17;
  2487. }
  2488. };
  2489. var e10 = (t12, e15) => t12 < e15 ? -1 : t12 > e15 ? 1 : 0;
  2490. // node_modules/@arcgis/core/geometry/support/labelPoint.js
  2491. var N = 100 * 222045e-21;
  2492. function u11(t12) {
  2493. const { rings: n17 } = t12;
  2494. if (!n17 || 0 === n17.length)
  2495. return null;
  2496. const s13 = c2(u3(), t12);
  2497. if (!s13)
  2498. return null;
  2499. const c12 = 4 * (Math.abs(s13[0]) + Math.abs(s13[2]) + Math.abs(s13[1]) + Math.abs(s13[3]) + 1) * N;
  2500. let l12 = 0, f9 = 0;
  2501. for (let e15 = 0; e15 < n17.length; e15++) {
  2502. const t13 = M(n17[e15]);
  2503. t13 > f9 && (f9 = t13, l12 = e15);
  2504. }
  2505. if (Math.abs(f9) <= 2 * c12 * c12) {
  2506. const t13 = s4(u3(), n17[l12]);
  2507. return [(t13[0] + t13[2]) / 2, (t13[1] + t13[3]) / 2];
  2508. }
  2509. const u15 = u(n17[l12], false, u3());
  2510. if (null === u15)
  2511. return null;
  2512. if (1 === n17.length && n17[0].length < 4)
  2513. return u15;
  2514. const d4 = [[NaN, NaN], [NaN, NaN], [NaN, NaN], [NaN, NaN]], x5 = [NaN, NaN, NaN, NaN], M4 = [NaN, NaN, NaN, NaN];
  2515. let b5 = false, w6 = m6(u15, t12, true);
  2516. 0 === w6.distance && (b5 = true, d4[0][0] = u15[0], d4[0][1] = u15[1], w6 = m6(u15, t12, false)), x5[0] = w6.distance, M4[0] = 0;
  2517. const y7 = [NaN, NaN];
  2518. let C6 = false, k4 = 0.25, P5 = -1;
  2519. const T4 = s4(u3(), n17[l12]);
  2520. let z3 = NaN;
  2521. do {
  2522. if (z3 = NaN, d4[1] = g5(t12, p4(T4[0], T4[2], k4), c12, s13), isNaN(d4[1][0]) || isNaN(d4[1][1]) || (w6 = m6(d4[1], t12, false), z3 = w6.distance), !isNaN(z3) && z3 > c12 && h7(d4[1], t12))
  2523. C6 = true, x5[1] = z3, M4[1] = j3(d4[1], u15);
  2524. else if (!isNaN(z3) && z3 > P5 && (P5 = z3, y7[0] = d4[1][0], y7[1] = d4[1][1]), k4 -= 0.01, k4 < 0.1) {
  2525. if (!(P5 >= 0))
  2526. break;
  2527. C6 = true, x5[1] = P5, d4[1][0] = y7[0], d4[1][1] = y7[1], M4[1] = j3(d4[1], u15);
  2528. }
  2529. } while (!C6);
  2530. C6 = false, k4 = 0.5, P5 = -1;
  2531. let D2 = 0.01, S2 = 1;
  2532. do {
  2533. if (z3 = NaN, d4[2] = g5(t12, p4(T4[0], T4[2], k4), c12, s13), isNaN(d4[2][0]) || isNaN(d4[2][1]) || (w6 = m6(d4[2], t12, false), z3 = w6.distance), !isNaN(z3) && z3 > c12 && h7(d4[2], t12))
  2534. C6 = true, x5[2] = z3, M4[2] = j3(d4[2], u15);
  2535. else if (!isNaN(z3) && z3 > P5)
  2536. P5 = z3, y7[0] = d4[2][0], y7[1] = d4[2][1];
  2537. else if (z3 > P5 && (P5 = z3, y7[0] = d4[2][0], y7[1] = d4[2][1]), k4 = 0.5 + D2 * S2, D2 += 0.01, S2 *= -1, k4 < 0.3 || k4 > 0.7) {
  2538. if (!(P5 >= 0))
  2539. break;
  2540. C6 = true, x5[2] = P5, d4[2][0] = y7[0], d4[2][1] = y7[1], M4[2] = j3(d4[2], u15);
  2541. }
  2542. } while (!C6);
  2543. C6 = false, k4 = 0.75, P5 = -1;
  2544. do {
  2545. if (z3 = NaN, d4[3] = g5(t12, p4(T4[0], T4[2], k4), c12, s13), isNaN(d4[3][0]) || isNaN(d4[3][1]) || (w6 = m6(d4[3], t12, false), z3 = w6.distance), !isNaN(z3) && z3 > c12 && h7(d4[3], t12))
  2546. C6 = true, x5[3] = z3, M4[3] = j3(d4[3], u15);
  2547. else if (z3 > P5 && (P5 = z3, y7[0] = d4[3][0], y7[1] = d4[3][1]), k4 += 0.01, k4 > 0.9) {
  2548. if (!(P5 >= 0))
  2549. break;
  2550. C6 = true, x5[3] = P5, d4[3][0] = y7[0], d4[3][1] = y7[1], M4[3] = j3(d4[3], u15);
  2551. }
  2552. } while (!C6);
  2553. const B5 = [0, 1, 2, 3], Q4 = b5 ? 0 : 1;
  2554. let R3;
  2555. for (let e15 = Q4; e15 < 4; e15++)
  2556. for (let t13 = Q4; t13 < 3; t13++) {
  2557. const n18 = M4[t13], e16 = M4[t13 + 1];
  2558. q2(n18, e16) > 0 && (R3 = B5[t13], B5[t13] = B5[t13 + 1], B5[t13 + 1] = R3, M4[t13] = e16, M4[t13 + 1] = n18);
  2559. }
  2560. let U5 = Q4, v3 = 0, A4 = 0;
  2561. for (let e15 = Q4; e15 < 4; e15++) {
  2562. switch (e15) {
  2563. case 0:
  2564. A4 = 2 * x5[B5[e15]];
  2565. break;
  2566. case 1:
  2567. A4 = 1.66666666 * x5[B5[e15]];
  2568. break;
  2569. case 2:
  2570. A4 = 1.33333333 * x5[B5[e15]];
  2571. break;
  2572. case 3:
  2573. A4 = x5[B5[e15]];
  2574. }
  2575. A4 > v3 && (v3 = A4, U5 = B5[e15]);
  2576. }
  2577. return d4[U5];
  2578. }
  2579. function h7(t12, n17) {
  2580. const { rings: e15 } = n17;
  2581. let i11 = 0;
  2582. for (const r19 of e15) {
  2583. const n18 = r19.length;
  2584. for (let e16 = 1; e16 < n18; ++e16) {
  2585. const n19 = r19[e16 - 1], o12 = r19[e16];
  2586. if (n19[1] > t12[1] == o12[1] > t12[1])
  2587. continue;
  2588. (o12[0] - n19[0]) * (t12[1] - n19[1]) - (o12[1] - n19[1]) * (t12[0] - n19[0]) > 0 ? i11++ : i11--;
  2589. }
  2590. }
  2591. return 0 !== i11;
  2592. }
  2593. function m6(t12, n17, e15) {
  2594. if (e15 && h7(t12, n17))
  2595. return { coord: t12, distance: 0 };
  2596. let i11 = 1 / 0, r19 = 0, o12 = 0;
  2597. const s13 = [0, 0], { rings: a15 } = n17;
  2598. for (const l12 of a15)
  2599. if (!(l12.length < 2))
  2600. for (let n18 = 0; n18 < l12.length - 1; n18++) {
  2601. i(s13, t12, l12, n18);
  2602. const e16 = j3(t12, s13);
  2603. e16 < i11 && (i11 = e16, r19 = s13[0], o12 = s13[1]);
  2604. }
  2605. return { coord: [r19, o12], distance: Math.sqrt(i11) };
  2606. }
  2607. function g5(t12, n17, i11, r19) {
  2608. const o12 = [n17, 0];
  2609. let s13 = 1 / 0, a15 = 1 / 0, c12 = false, l12 = false;
  2610. const N3 = [[n17, r19[1] - 1], [n17, r19[3] + 1]], u15 = [0, 0], h8 = [0, 0], m9 = [0, 0], g8 = [[0, 0], [0, 0]], x5 = u3(), { rings: M4 } = t12;
  2611. for (const e15 of M4)
  2612. if (!(e15.length < 2))
  2613. for (let t13 = 1; t13 < e15.length; t13++) {
  2614. if (g8[0][0] = e15[t13 - 1][0], g8[0][1] = e15[t13 - 1][1], g8[1][0] = e15[t13][0], g8[1][1] = e15[t13][1], null === d3(x5, g8))
  2615. continue;
  2616. if (h8[0] = N3[0][0], h8[1] = N3[0][1], m9[0] = N3[1][0], m9[1] = N3[1][1], 0 === y5(x5, h8, m9))
  2617. continue;
  2618. if (!G(N3[0], N3[1], g8[0], g8[1], u15))
  2619. continue;
  2620. const n18 = u15[1];
  2621. s13 > a15 ? n18 < s13 && (s13 = n18, c12 = true) : n18 < a15 && (a15 = n18, l12 = true);
  2622. }
  2623. return c12 && l12 ? o12[1] = (s13 + a15) / 2 : o12[0] = o12[1] = NaN, o12;
  2624. }
  2625. function d3(t12, n17) {
  2626. if (n17.length < 2)
  2627. return null;
  2628. t12 || (t12 = u3());
  2629. const [i11, r19] = n17[0], [o12, s13] = n17[1];
  2630. return t12[0] = Math.min(i11, o12), t12[1] = Math.min(r19, s13), t12[2] = Math.max(i11, o12), t12[3] = Math.max(r19, s13), t12;
  2631. }
  2632. var x3 = 1;
  2633. var M2 = 4;
  2634. var b3 = 3;
  2635. var w4 = 12;
  2636. function y5(t12, n17, e15) {
  2637. let i11 = C5(n17, t12), r19 = C5(e15, t12);
  2638. const o12 = t12[0], s13 = t12[1], a15 = t12[2], c12 = t12[3];
  2639. if (i11 & r19)
  2640. return 0;
  2641. if (!(i11 | r19))
  2642. return 4;
  2643. const l12 = (i11 ? 1 : 0) | (r19 ? 2 : 0);
  2644. do {
  2645. const l13 = e15[0] - n17[0], f9 = e15[1] - n17[1];
  2646. if (l13 > f9)
  2647. i11 & b3 ? (i11 & x3 ? (n17[1] += f9 * (o12 - n17[0]) / l13, n17[0] = o12) : (n17[1] += f9 * (a15 - n17[0]) / l13, n17[0] = a15), i11 = C5(n17, t12)) : r19 & b3 ? (r19 & x3 ? (e15[1] += f9 * (o12 - e15[0]) / l13, e15[0] = o12) : (e15[1] += f9 * (a15 - e15[0]) / l13, e15[0] = a15), r19 = C5(e15, t12)) : i11 ? (i11 & M2 ? (n17[0] += l13 * (s13 - n17[1]) / f9, n17[1] = s13) : (n17[0] += l13 * (c12 - n17[1]) / f9, n17[1] = c12), i11 = C5(n17, t12)) : (r19 & M2 ? (e15[0] += l13 * (s13 - e15[1]) / f9, e15[1] = s13) : (e15[0] += l13 * (c12 - e15[1]) / f9, e15[1] = c12), r19 = C5(e15, t12));
  2648. else if (i11 & w4 ? (i11 & M2 ? (n17[0] += l13 * (s13 - n17[1]) / f9, n17[1] = s13) : (n17[0] += l13 * (c12 - n17[1]) / f9, n17[1] = c12), i11 = C5(n17, t12)) : r19 & w4 ? (r19 & M2 ? (e15[0] += l13 * (s13 - e15[1]) / f9, e15[1] = s13) : (e15[0] += l13 * (c12 - e15[1]) / f9, e15[1] = c12), r19 = C5(e15, t12)) : i11 ? (i11 & x3 ? (n17[1] += f9 * (o12 - n17[0]) / l13, n17[0] = o12) : (n17[1] += f9 * (a15 - n17[0]) / l13, n17[0] = a15), i11 = C5(n17, t12)) : (r19 & x3 ? (e15[1] += f9 * (o12 - e15[0]) / l13, e15[0] = o12) : (e15[1] += f9 * (a15 - e15[0]) / l13, e15[0] = a15), r19 = C5(e15, t12)), i11 & r19)
  2649. return 0;
  2650. } while (i11 | r19);
  2651. return l12;
  2652. }
  2653. function C5(t12, n17) {
  2654. return (t12[0] < n17[0] ? 1 : 0) | (t12[0] > n17[2] ? 1 : 0) << 1 | (t12[1] < n17[1] ? 1 : 0) << 2 | (t12[1] > n17[3] ? 1 : 0) << 3;
  2655. }
  2656. function p4(t12, n17, e15) {
  2657. return t12 + (n17 - t12) * e15;
  2658. }
  2659. function j3(t12, n17) {
  2660. return (t12[0] - n17[0]) * (t12[0] - n17[0]) + (t12[1] - n17[1]) * (t12[1] - n17[1]);
  2661. }
  2662. function q2(t12, n17) {
  2663. if (t12 < n17)
  2664. return -1;
  2665. if (t12 > n17)
  2666. return 1;
  2667. if (t12 === n17)
  2668. return 0;
  2669. const e15 = isNaN(t12), i11 = isNaN(n17);
  2670. return e15 < i11 ? -1 : e15 > i11 ? 1 : 0;
  2671. }
  2672. var k3 = class {
  2673. constructor(t12, n17, e15, i11) {
  2674. this.x = t12, this.y = n17, this.cellSize = e15, this.distancefromCellCenter = s3(t12, n17, i11), this.maxDistanceToPolygon = this.distancefromCellCenter + this.cellSize * Math.SQRT2;
  2675. }
  2676. };
  2677. var P4 = 1;
  2678. var T = 100;
  2679. function z2(i11) {
  2680. if (!i11 || !i11.rings || 0 === i11.rings.length)
  2681. return null;
  2682. const o12 = s4(u3(), i11.rings[0]);
  2683. if (!o12)
  2684. return null;
  2685. const a15 = o12[2] - o12[0], c12 = o12[3] - o12[1];
  2686. if (0 === a15 || 0 === c12)
  2687. return [o12[0] + a15 / 2, o12[1] + c12 / 2];
  2688. const l12 = Math.max(Math.min(a15, c12) / T, P4), f9 = new t8((t12, n17) => n17.maxDistanceToPolygon - t12.maxDistanceToPolygon), N3 = Math.min(a15, c12);
  2689. let u15 = N3 / 2, h8 = 0, m9 = 0;
  2690. for (h8 = o12[0]; h8 < o12[2]; h8 += N3)
  2691. for (m9 = o12[1]; m9 < o12[3]; m9 += N3)
  2692. f9.enqueue(new k3(h8 + u15, m9 + u15, u15, i11));
  2693. const g8 = o(i11.rings, false);
  2694. if (null === g8)
  2695. return null;
  2696. let d4, x5 = new k3(g8[0], g8[1], 0, i11);
  2697. for (; f9.size > 0; )
  2698. d4 = e2(f9.dequeue()), d4.distancefromCellCenter > x5.distancefromCellCenter && (x5 = d4), d4.maxDistanceToPolygon - x5.distancefromCellCenter <= l12 || (u15 = d4.cellSize / 2, f9.enqueue(new k3(d4.x - u15, d4.y - u15, u15, i11)), f9.enqueue(new k3(d4.x + u15, d4.y - u15, u15, i11)), f9.enqueue(new k3(d4.x - u15, d4.y + u15, u15, i11)), f9.enqueue(new k3(d4.x + u15, d4.y + u15, u15, i11)));
  2699. return [x5.x, x5.y];
  2700. }
  2701. // node_modules/@arcgis/core/symbols/cim/placements/PlacementPolygonCenter.js
  2702. function l9(t12) {
  2703. return void 0 !== t12.rings;
  2704. }
  2705. var a12 = class {
  2706. static local() {
  2707. return null === a12.instance && (a12.instance = new a12()), a12.instance;
  2708. }
  2709. execute(t12, e15, s13, n17) {
  2710. return new f6(t12, e15, s13);
  2711. }
  2712. };
  2713. a12.instance = null;
  2714. var f6 = class {
  2715. constructor(t12, e15, s13) {
  2716. this._geometry = t12, this._offsetX = void 0 !== e15.offsetX ? e15.offsetX * s13 : 0, this._offsetY = void 0 !== e15.offsetY ? e15.offsetY * s13 : 0, this._method = void 0 !== e15.method ? e15.method : K.OnPolygon, this._internalPlacement = new t7();
  2717. }
  2718. next() {
  2719. const t12 = this._geometry;
  2720. return this._geometry = null, t12 && l9(t12) ? this._polygonCenter(t12) : null;
  2721. }
  2722. _polygonCenter(r19) {
  2723. let l12 = false;
  2724. switch (this._method) {
  2725. case K.CenterOfMass:
  2726. {
  2727. const t12 = g(r19);
  2728. t12 && (this._internalPlacement.setTranslate(t12[0] + this._offsetX, t12[1] + this._offsetY), l12 = true);
  2729. }
  2730. break;
  2731. case K.BoundingBoxCenter:
  2732. {
  2733. const s13 = u3();
  2734. c2(s13, r19), s13 && (this._internalPlacement.setTranslate((s13[2] + s13[0]) / 2 + this._offsetX, (s13[3] + s13[1]) / 2 + this._offsetY), l12 = true);
  2735. }
  2736. break;
  2737. case K.OnPolygon:
  2738. default: {
  2739. let t12;
  2740. t12 = has("polylabel-placement-enabled") ? z2(r19) : u11(r19), null !== t12 && (this._internalPlacement.setTranslate(t12[0] + this._offsetX, t12[1] + this._offsetY), l12 = true);
  2741. }
  2742. }
  2743. return l12 ? this._internalPlacement : null;
  2744. }
  2745. };
  2746. // node_modules/@arcgis/core/symbols/cim/CIMOperators.js
  2747. function A3(p6) {
  2748. if (!p6)
  2749. return null;
  2750. switch (p6.type) {
  2751. case "CIMGeometricEffectAddControlPoints":
  2752. return o7.local();
  2753. case "CIMGeometricEffectArrow":
  2754. return h3.local();
  2755. case "CIMGeometricEffectBuffer":
  2756. return f4.local();
  2757. case "CIMGeometricEffectControlMeasureLine":
  2758. return _.local();
  2759. case "CIMGeometricEffectCut":
  2760. return u9.local();
  2761. case "CIMGeometricEffectDashes":
  2762. return r8.local();
  2763. case "CIMGeometricEffectDonut":
  2764. return r9.local();
  2765. case "CIMGeometricEffectJog":
  2766. return s9.local();
  2767. case "CIMGeometricEffectMove":
  2768. return n9.local();
  2769. case "CIMGeometricEffectOffset":
  2770. return r11.local();
  2771. case "CIMGeometricEffectReverse":
  2772. return s10.local();
  2773. case "CIMGeometricEffectRotate":
  2774. return u10.local();
  2775. case "CIMGeometricEffectScale":
  2776. return c8.local();
  2777. case "CIMGeometricEffectWave":
  2778. return a8.local();
  2779. }
  2780. return null;
  2781. }
  2782. function g6(e15) {
  2783. if (!e15)
  2784. return null;
  2785. switch (e15.type) {
  2786. case "CIMMarkerPlacementAlongLineSameSize":
  2787. return a9.local();
  2788. case "CIMMarkerPlacementAtExtremities":
  2789. return n11.local();
  2790. case "CIMMarkerPlacementAtRatioPositions":
  2791. return a10.local();
  2792. case "CIMMarkerPlacementInsidePolygon":
  2793. return e9.local();
  2794. case "CIMMarkerPlacementOnLine":
  2795. return l8.local();
  2796. case "CIMMarkerPlacementOnVertices":
  2797. return n13.local();
  2798. case "CIMMarkerPlacementPolygonCenter":
  2799. return a12.local();
  2800. }
  2801. return null;
  2802. }
  2803. // node_modules/@arcgis/core/symbols/cim/imageUtils.js
  2804. function t9(t12) {
  2805. const e15 = t12.getFrame(0);
  2806. if (e15 instanceof HTMLImageElement || e15 instanceof HTMLCanvasElement)
  2807. return e15;
  2808. const n17 = document.createElement("canvas");
  2809. n17.width = t12.width, n17.height = t12.height;
  2810. const a15 = n17.getContext("2d");
  2811. return e15 instanceof ImageData ? a15.putImageData(e15, 0, 0) : a15.drawImage(e15, 0, 0), n17;
  2812. }
  2813. // node_modules/@arcgis/core/symbols/cim/Rect.js
  2814. var t10 = class {
  2815. constructor(t12 = 0, h8 = 0, i11 = 0, s13 = 0) {
  2816. this.x = t12, this.y = h8, this.width = i11, this.height = s13;
  2817. }
  2818. get isEmpty() {
  2819. return this.width <= 0 || this.height <= 0;
  2820. }
  2821. union(t12) {
  2822. this.x = Math.min(this.x, t12.x), this.y = Math.min(this.y, t12.y), this.width = Math.max(this.width, t12.width), this.height = Math.max(this.height, t12.height);
  2823. }
  2824. };
  2825. // node_modules/@arcgis/core/symbols/cim/TextRasterizer.js
  2826. function e11(t12) {
  2827. return `rgb(${t12.slice(0, 3).toString()})`;
  2828. }
  2829. function i7(t12) {
  2830. return `rgba(${t12.slice(0, 3).toString()},${t12[3]})`;
  2831. }
  2832. var s11 = class {
  2833. constructor(t12) {
  2834. t12 && (this._textRasterizationCanvas = t12);
  2835. }
  2836. rasterizeText(t12, s13) {
  2837. var _a;
  2838. this._textRasterizationCanvas || (this._textRasterizationCanvas = document.createElement("canvas"));
  2839. const r19 = this._textRasterizationCanvas, o12 = r19.getContext("2d");
  2840. this._setFontProperties(o12, s13), this._parameters = s13, this._textLines = t12.split(/\r?\n/), this._lineHeight = this._computeLineHeight();
  2841. const h8 = this._computeTextWidth(o12, s13), { decoration: a15, weight: l12 } = s13.font;
  2842. this._lineThroughWidthOffset = a15 && "line-through" === a15 ? 0.1 * this._lineHeight : 0;
  2843. const d4 = this._lineHeight * this._textLines.length;
  2844. r19.width = h8 + 2 * this._lineThroughWidthOffset, r19.height = d4, this._renderedLineHeight = Math.round(this._lineHeight * s13.pixelRatio), this._renderedHaloSize = s13.halo.size * s13.pixelRatio, this._renderedWidth = h8 * s13.pixelRatio, this._renderedHeight = d4 * s13.pixelRatio, this._lineThroughWidthOffset *= s13.pixelRatio;
  2845. const c12 = (_a = s13.color) != null ? _a : [0, 0, 0, 0], _4 = s13.halo && s13.halo.color ? s13.halo.color : [0, 0, 0, 0];
  2846. this._fillStyle = i7(c12), this._haloStyle = e11(_4);
  2847. const g8 = this._renderedLineHeight, f9 = this._renderedHaloSize;
  2848. o12.save(), o12.clearRect(0, 0, r19.width, r19.height), this._setFontProperties(o12, s13);
  2849. const u15 = n14(o12.textAlign, this._renderedWidth) + f9, p6 = f9, x5 = f9 > 0;
  2850. let m9 = this._lineThroughWidthOffset, b5 = 0;
  2851. x5 && this._renderHalo(o12, u15, p6, m9, b5, s13), b5 += p6, m9 += u15;
  2852. for (const e15 of this._textLines)
  2853. x5 ? (o12.globalCompositeOperation = "destination-out", o12.fillStyle = "rgb(0, 0, 0)", o12.fillText(e15, m9, b5), o12.globalCompositeOperation = "source-over", o12.fillStyle = this._fillStyle, o12.fillText(e15, m9, b5)) : (o12.fillStyle = this._fillStyle, o12.fillText(e15, m9, b5)), a15 && "none" !== a15 && this._renderDecoration(o12, m9, b5, a15, l12), b5 += g8;
  2854. o12.restore();
  2855. const z3 = this._renderedWidth + 2 * this._lineThroughWidthOffset, w6 = this._renderedHeight, v3 = o12.getImageData(0, 0, z3, w6), H2 = new Uint8Array(v3.data);
  2856. if (s13.premultiplyColors) {
  2857. let t13;
  2858. for (let e15 = 0; e15 < H2.length; e15 += 4)
  2859. t13 = H2[e15 + 3] / 255, H2[e15] = H2[e15] * t13, H2[e15 + 1] = H2[e15 + 1] * t13, H2[e15 + 2] = H2[e15 + 2] * t13;
  2860. }
  2861. let y7, R3;
  2862. switch (s13.horizontalAlignment) {
  2863. case "left":
  2864. y7 = -0.5;
  2865. break;
  2866. case "right":
  2867. y7 = 0.5;
  2868. break;
  2869. default:
  2870. y7 = 0;
  2871. }
  2872. switch (s13.verticalAlignment) {
  2873. case "bottom":
  2874. R3 = -0.5;
  2875. break;
  2876. case "top":
  2877. R3 = 0.5;
  2878. break;
  2879. default:
  2880. R3 = 0;
  2881. }
  2882. return { size: [z3, w6], image: new Uint32Array(H2.buffer), sdf: false, simplePattern: false, anchorX: y7, anchorY: R3, canvas: r19 };
  2883. }
  2884. _renderHalo(t12, e15, i11, s13, n17, r19) {
  2885. const o12 = this._renderedWidth, h8 = this._renderedHeight;
  2886. this._haloRasterizationCanvas || (this._haloRasterizationCanvas = document.createElement("canvas")), this._haloRasterizationCanvas.width = o12, this._haloRasterizationCanvas.height = h8;
  2887. const a15 = this._haloRasterizationCanvas, l12 = a15.getContext("2d");
  2888. l12.clearRect(0, 0, o12, h8), this._setFontProperties(l12, r19);
  2889. const { decoration: d4, weight: c12 } = r19.font;
  2890. l12.fillStyle = this._haloStyle, l12.strokeStyle = this._haloStyle, l12.lineJoin = "round", this._renderHaloNative(l12, e15, i11, d4, c12), t12.globalAlpha = this._parameters.halo.color[3], t12.drawImage(a15, 0, 0, o12, h8, s13, n17, o12, h8), t12.globalAlpha = 1;
  2891. }
  2892. _renderHaloNative(t12, e15, i11, s13, n17) {
  2893. const r19 = this._renderedLineHeight, o12 = this._renderedHaloSize;
  2894. for (const h8 of this._textLines) {
  2895. const a15 = 2 * o12, l12 = 5, d4 = 0.1;
  2896. for (let r20 = 0; r20 < l12; r20++) {
  2897. const o13 = (1 - (l12 - 1) * d4 + r20 * d4) * a15;
  2898. t12.lineWidth = o13, t12.strokeText(h8, e15, i11), s13 && "none" !== s13 && this._renderDecoration(t12, e15, i11, s13, n17, o13);
  2899. }
  2900. i11 += r19;
  2901. }
  2902. }
  2903. _setFontProperties(e15, i11) {
  2904. const s13 = Math.max(i11.size, 0.5), n17 = i11.font, r19 = `${n17.style} ${n17.weight} ${u4(s13 * i11.pixelRatio).toFixed(1)}px ${n17.family}, sans-serif`;
  2905. let o12;
  2906. switch (e15.font = r19, e15.textBaseline = "top", i11.horizontalAlignment) {
  2907. case "left":
  2908. default:
  2909. o12 = "left";
  2910. break;
  2911. case "right":
  2912. o12 = "right";
  2913. break;
  2914. case "center":
  2915. o12 = "center";
  2916. }
  2917. e15.textAlign = o12;
  2918. }
  2919. computeTextSize(t12, e15) {
  2920. this._textRasterizationCanvas || (this._textRasterizationCanvas = document.createElement("canvas"));
  2921. const i11 = this._textRasterizationCanvas, s13 = i11.getContext("2d");
  2922. this._setFontProperties(s13, e15), this._parameters = e15, this._textLines = t12.split(/\r?\n/), this._lineHeight = this._computeLineHeight();
  2923. const n17 = this._computeTextWidth(s13, e15), r19 = this._lineHeight * this._textLines.length;
  2924. return i11.width = n17, i11.height = r19, [n17 * e15.pixelRatio, r19 * e15.pixelRatio];
  2925. }
  2926. _computeTextWidth(t12, e15) {
  2927. let i11 = 0;
  2928. for (const n17 of this._textLines)
  2929. i11 = Math.max(i11, t12.measureText(n17).width);
  2930. const s13 = e15.font;
  2931. return ("italic" === s13.style || "oblique" === s13.style || "string" == typeof s13.weight && ("bold" === s13.weight || "bolder" === s13.weight) || "number" == typeof s13.weight && s13.weight > 600) && (i11 += 0.3 * t12.measureText("w").width), i11 += 2 * this._parameters.halo.size, Math.round(i11);
  2932. }
  2933. _computeLineHeight() {
  2934. let t12 = 1.275 * this._parameters.size;
  2935. const e15 = this._parameters.font.decoration;
  2936. return e15 && "underline" === e15 && (t12 *= 1.3), Math.round(t12 + 2 * this._parameters.halo.size);
  2937. }
  2938. _renderDecoration(t12, e15, i11, s13, n17, r19) {
  2939. const o12 = 0.9 * this._lineHeight, h8 = "bold" === n17 ? 0.06 : "bolder" === n17 ? 0.09 : 0.04;
  2940. switch (t12.textAlign) {
  2941. case "center":
  2942. e15 -= this._renderedWidth / 2;
  2943. break;
  2944. case "right":
  2945. e15 -= this._renderedWidth;
  2946. }
  2947. const a15 = t12.textBaseline;
  2948. if ("underline" === s13)
  2949. switch (a15) {
  2950. case "top":
  2951. i11 += o12;
  2952. break;
  2953. case "middle":
  2954. i11 += o12 / 2;
  2955. }
  2956. else if ("line-through" === s13)
  2957. switch (a15) {
  2958. case "top":
  2959. i11 += o12 / 1.5;
  2960. break;
  2961. case "middle":
  2962. i11 += o12 / 3;
  2963. }
  2964. const l12 = r19 ? 1.5 * r19 : Math.ceil(o12 * h8);
  2965. t12.save(), t12.beginPath(), t12.strokeStyle = t12.fillStyle, t12.lineWidth = l12, t12.moveTo(e15 - this._lineThroughWidthOffset, i11), t12.lineTo(e15 + this._renderedWidth + 2 * this._lineThroughWidthOffset, i11), t12.stroke(), t12.restore();
  2966. }
  2967. };
  2968. function n14(t12, e15) {
  2969. return "center" === t12 ? 0.5 * e15 : "right" === t12 ? e15 : 0;
  2970. }
  2971. // node_modules/@arcgis/core/views/2d/engine/webgl/collisions/BoundingBox.js
  2972. var i8 = class {
  2973. constructor(i11, e15, s13, r19) {
  2974. this.center = t4(i11, e15), this.centerT = n3(), this.halfWidth = s13 / 2, this.halfHeight = r19 / 2, this.width = s13, this.height = r19;
  2975. }
  2976. get x() {
  2977. return this.center[0];
  2978. }
  2979. get y() {
  2980. return this.center[1];
  2981. }
  2982. get blX() {
  2983. return this.center[0] + this.halfWidth;
  2984. }
  2985. get blY() {
  2986. return this.center[1] + this.halfHeight;
  2987. }
  2988. get trX() {
  2989. return this.center[0] - this.halfWidth;
  2990. }
  2991. get trY() {
  2992. return this.center[1] - this.halfHeight;
  2993. }
  2994. get xmin() {
  2995. return this.x - this.halfWidth;
  2996. }
  2997. get xmax() {
  2998. return this.x + this.halfWidth;
  2999. }
  3000. get ymin() {
  3001. return this.y - this.halfHeight;
  3002. }
  3003. get ymax() {
  3004. return this.y + this.halfHeight;
  3005. }
  3006. set x(t12) {
  3007. this.center[0] = t12;
  3008. }
  3009. set y(t12) {
  3010. this.center[1] = t12;
  3011. }
  3012. clone() {
  3013. return new i8(this.x, this.y, this.width, this.height);
  3014. }
  3015. serialize(t12) {
  3016. return t12.writeF32(this.center[0]), t12.writeF32(this.center[1]), t12.push(this.width), t12.push(this.height), t12;
  3017. }
  3018. findCollisionDelta(t12, h8 = 4) {
  3019. const i11 = Math.abs(t12.centerT[0] - this.centerT[0]), e15 = Math.abs(t12.centerT[1] - this.centerT[1]), s13 = (t12.halfWidth + this.halfWidth + h8) / i11, r19 = (t12.halfHeight + this.halfHeight + h8) / e15, n17 = Math.min(s13, r19);
  3020. return Math.log2(n17);
  3021. }
  3022. extend(t12) {
  3023. const h8 = Math.min(this.xmin, t12.xmin), i11 = Math.min(this.ymin, t12.ymin), e15 = Math.max(this.xmax, t12.xmax) - h8, s13 = Math.max(this.ymax, t12.ymax) - i11, r19 = h8 + e15 / 2, n17 = i11 + s13 / 2;
  3024. this.width = e15, this.height = s13, this.halfWidth = e15 / 2, this.halfHeight = s13 / 2, this.x = r19, this.y = n17;
  3025. }
  3026. static deserialize(t12) {
  3027. const h8 = t12.readF32(), e15 = t12.readF32(), s13 = t12.readInt32(), r19 = t12.readInt32();
  3028. return new i8(h8, e15, s13, r19);
  3029. }
  3030. };
  3031. // node_modules/@arcgis/core/views/2d/engine/webgl/mesh/templates/shapingUtils.js
  3032. var l10 = 26;
  3033. var u12 = 4;
  3034. var g7 = l10 + u12;
  3035. var _2 = l10 - 6;
  3036. var p5 = 3;
  3037. var x4 = 8;
  3038. var w5 = Math.PI / 180;
  3039. var y6 = class {
  3040. constructor(t12, s13, e15, i11) {
  3041. this._rotationT = n2(), this._xBounds = 0, this._yBounds = 0, this.minZoom = 0, this.maxZoom = 255, this._bounds = null;
  3042. const o12 = e15.rect, h8 = new Float32Array(8);
  3043. t12 *= i11, s13 *= i11;
  3044. const r19 = e15.code ? o12.width * i11 : e15.metrics.width, a15 = e15.code ? o12.height * i11 : e15.metrics.height;
  3045. h8[0] = t12, h8[1] = s13, h8[2] = t12 + r19, h8[3] = s13, h8[4] = t12, h8[5] = s13 + a15, h8[6] = t12 + r19, h8[7] = s13 + a15, this._data = h8, this._setTextureCoords(o12), this._scale = i11, this._mosaic = e15, this.x = t12, this.y = s13, this.maxOffset = Math.max(t12 + r19, s13 + a15);
  3046. }
  3047. get width() {
  3048. return this._mosaic.metrics.width * this._scale;
  3049. }
  3050. get mosaic() {
  3051. return this._mosaic;
  3052. }
  3053. set angle(s13) {
  3054. this._angle = s13, h(this._rotationT, -s13), this._setOffsets(this._data);
  3055. }
  3056. get angle() {
  3057. return this._angle;
  3058. }
  3059. get xTopLeft() {
  3060. return this._data[0];
  3061. }
  3062. get yTopLeft() {
  3063. return this._data[1];
  3064. }
  3065. get xBottomRight() {
  3066. return this._data[6];
  3067. }
  3068. get yBottomRight() {
  3069. return this._data[7];
  3070. }
  3071. get texcoords() {
  3072. return this._texcoords;
  3073. }
  3074. get textureBinding() {
  3075. return this._mosaic.textureBinding;
  3076. }
  3077. get offsets() {
  3078. return this._offsets || this._setOffsets(this._data), this._offsets;
  3079. }
  3080. get char() {
  3081. return String.fromCharCode(this._mosaic.code);
  3082. }
  3083. get code() {
  3084. return this._mosaic.code;
  3085. }
  3086. get bounds() {
  3087. if (!this._bounds) {
  3088. const { height: t12, width: e15 } = this._mosaic.metrics, i11 = e15 * this._scale, h8 = Math.abs(t12) * this._scale, r19 = new Float32Array(8);
  3089. r19[0] = this.x, r19[1] = this.y, r19[2] = this.x + i11, r19[3] = this.y, r19[4] = this.x, r19[5] = this.y + h8, r19[6] = this.x + i11, r19[7] = this.y + h8;
  3090. const a15 = o4(n2(), this._rotationT, this._transform);
  3091. a2(r19, r19, a15);
  3092. let c12 = 1 / 0, f9 = 1 / 0, d4 = 0, l12 = 0;
  3093. for (let s13 = 0; s13 < 4; s13++) {
  3094. const t13 = r19[2 * s13], e16 = r19[2 * s13 + 1];
  3095. c12 = Math.min(c12, t13), f9 = Math.min(f9, e16), d4 = Math.max(d4, t13), l12 = Math.max(l12, e16);
  3096. }
  3097. const u15 = d4 - c12, g8 = l12 - f9, _4 = c12 + u15 / 2, p6 = f9 + g8 / 2;
  3098. this._bounds = new i8(_4, p6, u15, g8);
  3099. }
  3100. return this._bounds;
  3101. }
  3102. setTransform(t12) {
  3103. this._transform = t12, this._offsets = null;
  3104. }
  3105. _setOffsets(t12) {
  3106. this._offsets || (this._offsets = { upperLeft: 0, upperRight: 0, lowerLeft: 0, lowerRight: 0 });
  3107. const e15 = this._offsets, i11 = new Float32Array(8), h8 = o4(n2(), this._rotationT, this._transform);
  3108. a2(i11, t12, h8), e15.upperLeft = w2(i11[0] * x4, i11[1] * x4), e15.upperRight = w2(i11[2] * x4, i11[3] * x4), e15.lowerLeft = w2(i11[4] * x4, i11[5] * x4), e15.lowerRight = w2(i11[6] * x4, i11[7] * x4);
  3109. }
  3110. _setTextureCoords({ x: t12, y: s13, width: e15, height: i11 }) {
  3111. this._texcoords = { upperLeft: w2(t12, s13), upperRight: w2(t12 + e15, s13), lowerLeft: w2(t12, s13 + i11), lowerRight: w2(t12 + e15, s13 + i11) };
  3112. }
  3113. };
  3114. var M3 = (t12, s13) => ({ code: 0, page: 0, sdf: true, rect: new t5(0, 0, 11, 8), textureBinding: s13, metrics: { advance: 0, height: 4, width: t12, left: 0, top: 0 } });
  3115. var T2 = class {
  3116. constructor(t12, s13, e15) {
  3117. this._rotation = 0, this._decorate(t12, s13, e15), this.glyphs = t12, this.bounds = this._createBounds(t12), this.isMultiline = s13.length > 1, this._hasRotation = 0 !== e15.angle, this._transform = this._createGlyphTransform(this.bounds, e15);
  3118. for (const i11 of t12)
  3119. i11.setTransform(this._transform);
  3120. }
  3121. setRotation(e15) {
  3122. if (0 === e15 && 0 === this._rotation)
  3123. return;
  3124. this._rotation = e15;
  3125. const i11 = this._transform, o12 = h(n2(), e15);
  3126. o4(i11, o12, i11);
  3127. for (const t12 of this.glyphs)
  3128. t12.setTransform(this._transform);
  3129. }
  3130. _decorate(t12, s13, e15) {
  3131. if (!e15.decoration || "none" === e15.decoration || !t12.length)
  3132. return;
  3133. const i11 = e15.scale, n17 = "underline" === e15.decoration ? g7 : _2, o12 = t12[0].textureBinding;
  3134. for (const h8 of s13) {
  3135. const s14 = h8.startX * i11, e16 = h8.startY * i11, r19 = (h8.width + h8.glyphWidthEnd) * i11;
  3136. t12.push(new y6(s14, e16 + n17 * i11, M3(r19, o12), 1));
  3137. }
  3138. }
  3139. get boundsT() {
  3140. const t12 = this.bounds, s13 = r3(n3(), t12.x, t12.y);
  3141. if (z(s13, s13, this._transform), this._hasRotation) {
  3142. const e15 = Math.max(t12.width, t12.height);
  3143. return new i8(s13[0], s13[1], e15, e15);
  3144. }
  3145. return new i8(s13[0], s13[1], t12.width, t12.height);
  3146. }
  3147. _createBounds(t12) {
  3148. let s13 = 1 / 0, e15 = 1 / 0, i11 = 0, n17 = 0;
  3149. for (const r19 of t12)
  3150. s13 = Math.min(s13, r19.xTopLeft), e15 = Math.min(e15, r19.yTopLeft), i11 = Math.max(i11, r19.xTopLeft + r19.width), n17 = Math.max(n17, r19.yBottomRight);
  3151. const o12 = i11 - s13, h8 = n17 - e15;
  3152. return new i8(s13 + o12 / 2, e15 + h8 / 2, o12, h8);
  3153. }
  3154. _createGlyphTransform(t12, s13) {
  3155. const o12 = w5 * s13.angle, r19 = n2(), c12 = n3();
  3156. return i3(r19, r19, r3(c12, s13.xOffset, -s13.yOffset)), s13.isCIM ? e6(r19, r19, o12) : (i3(r19, r19, r3(c12, t12.x, t12.y)), e6(r19, r19, o12), i3(r19, r19, r3(c12, -t12.x, -t12.y))), r19;
  3157. }
  3158. };
  3159. var B3 = class {
  3160. constructor(t12, s13, e15, i11, n17, o12) {
  3161. this.glyphWidthEnd = 0, this.startX = 0, this.startY = 0, this.start = Math.max(0, Math.min(s13, e15)), this.end = Math.max(0, Math.max(s13, e15)), this.end < t12.length && (this.glyphWidthEnd = t12[this.end].metrics.width), this.width = i11, this.yMin = n17, this.yMax = o12;
  3162. }
  3163. };
  3164. var b4 = (t12) => 10 === t12;
  3165. var R2 = (t12) => 32 === t12;
  3166. function L2(t12, s13, e15) {
  3167. const i11 = new Array(), n17 = 1 / e15.scale, o12 = e15.maxLineWidth * n17, h8 = s13 ? t12.length - 1 : 0, r19 = s13 ? -1 : t12.length, a15 = s13 ? -1 : 1;
  3168. let c12 = h8, f9 = 0, d4 = 0, m9 = c12, l12 = m9, u15 = 0, g8 = 1 / 0, _4 = 0;
  3169. for (; c12 !== r19; ) {
  3170. const { code: s14, metrics: e16 } = t12[c12], n18 = Math.abs(e16.top);
  3171. if (b4(s14) || R2(s14) || (g8 = Math.min(g8, n18), _4 = Math.max(_4, n18 + e16.height)), b4(s14))
  3172. c12 !== h8 && (i11.push(new B3(t12, m9, c12 - a15, f9, g8, _4)), g8 = 1 / 0, _4 = 0), f9 = 0, m9 = c12 + a15, l12 = c12 + a15, d4 = 0;
  3173. else if (R2(s14))
  3174. l12 = c12 + a15, d4 = 0, u15 = e16.advance, f9 += e16.advance;
  3175. else if (f9 > o12) {
  3176. if (l12 !== m9) {
  3177. const s15 = l12 - 2 * a15;
  3178. f9 -= u15, i11.push(new B3(t12, m9, s15, f9 - d4, g8, _4)), g8 = 1 / 0, _4 = 0, m9 = l12, f9 = d4;
  3179. } else
  3180. i11.push(new B3(t12, m9, c12 - a15, f9, g8, _4)), g8 = 1 / 0, _4 = 0, m9 = c12, l12 = c12, f9 = 0;
  3181. f9 += e16.advance, d4 += e16.advance;
  3182. } else
  3183. f9 += e16.advance, d4 += e16.advance;
  3184. c12 += a15;
  3185. }
  3186. const p6 = new B3(t12, m9, c12 - a15, f9, g8, _4);
  3187. return p6.start >= 0 && p6.end < t12.length && i11.push(p6), i11;
  3188. }
  3189. function v2(t12, s13) {
  3190. let e15 = 0;
  3191. for (let o12 = 0; o12 < t12.length; o12++) {
  3192. const { width: s14 } = t12[o12];
  3193. e15 = Math.max(s14, e15);
  3194. }
  3195. const i11 = "underline" === s13.decoration ? u12 : 0, n17 = t12[0].yMin;
  3196. return { x: 0, y: n17, height: t12[t12.length - 1].yMax + s13.lineHeight * (t12.length - 1) + i11 - n17, width: e15 };
  3197. }
  3198. function j4(t12, s13, e15) {
  3199. const i11 = e15.scale, n17 = new Array(), o12 = L2(t12, s13, e15), h8 = v2(o12, e15), { vAlign: r19, hAlign: a15 } = e15, f9 = r19 === t3.Baseline ? 1 : 0, d4 = f9 ? 0 : r19 - 1, m9 = (1 - f9) * -h8.y + d4 * (h8.height / 2) + (f9 ? 1 : 0) * -l10;
  3200. for (let c12 = 0; c12 < o12.length; c12++) {
  3201. const { start: s14, end: h9, width: r20 } = o12[c12];
  3202. let f10 = -1 * (a15 + 1) * (r20 / 2) - p5;
  3203. const d5 = c12 * e15.lineHeight + m9 - p5;
  3204. o12[c12].startX = f10, o12[c12].startY = d5;
  3205. for (let e16 = s14; e16 <= h9; e16++) {
  3206. const s15 = t12[e16];
  3207. if (b4(s15.code))
  3208. continue;
  3209. const o13 = new y6(f10 + s15.metrics.left, d5 - s15.metrics.top, s15, i11);
  3210. f10 += s15.metrics.advance, n17.push(o13);
  3211. }
  3212. }
  3213. return new T2(n17, o12, e15);
  3214. }
  3215. // node_modules/@arcgis/core/symbols/cim/CIMSymbolDrawHelper.js
  3216. var E = Math.PI / 180;
  3217. var J = 10;
  3218. var N2 = s.getLogger("esri.symbols.cim.CIMSymbolDrawHelper");
  3219. var O2 = class {
  3220. constructor(t12) {
  3221. this._t = t12;
  3222. }
  3223. static createIdentity() {
  3224. return new O2([1, 0, 0, 0, 1, 0]);
  3225. }
  3226. clone() {
  3227. const t12 = this._t;
  3228. return new O2(t12.slice());
  3229. }
  3230. transform(t12) {
  3231. const e15 = this._t;
  3232. return [e15[0] * t12[0] + e15[1] * t12[1] + e15[2], e15[3] * t12[0] + e15[4] * t12[1] + e15[5]];
  3233. }
  3234. static createScale(t12, e15) {
  3235. return new O2([t12, 0, 0, 0, e15, 0]);
  3236. }
  3237. scale(t12, e15) {
  3238. const r19 = this._t;
  3239. return r19[0] *= t12, r19[1] *= t12, r19[2] *= t12, r19[3] *= e15, r19[4] *= e15, r19[5] *= e15, this;
  3240. }
  3241. scaleRatio() {
  3242. return Math.sqrt(this._t[0] * this._t[0] + this._t[1] * this._t[1]);
  3243. }
  3244. static createTranslate(t12, e15) {
  3245. return new O2([0, 0, t12, 0, 0, e15]);
  3246. }
  3247. translate(t12, e15) {
  3248. const r19 = this._t;
  3249. return r19[2] += t12, r19[5] += e15, this;
  3250. }
  3251. static createRotate(t12) {
  3252. const e15 = Math.cos(t12), r19 = Math.sin(t12);
  3253. return new O2([e15, -r19, 0, r19, e15, 0]);
  3254. }
  3255. rotate(t12) {
  3256. return O2.multiply(this, O2.createRotate(t12), this);
  3257. }
  3258. angle() {
  3259. const t12 = this._t[0], e15 = this._t[3], r19 = Math.sqrt(t12 * t12 + e15 * e15);
  3260. return [t12 / r19, e15 / r19];
  3261. }
  3262. static multiply(t12, e15, r19) {
  3263. const i11 = t12._t, s13 = e15._t, o12 = i11[0] * s13[0] + i11[3] * s13[1], n17 = i11[1] * s13[0] + i11[4] * s13[1], a15 = i11[2] * s13[0] + i11[5] * s13[1] + s13[2], l12 = i11[0] * s13[3] + i11[3] * s13[4], h8 = i11[1] * s13[3] + i11[4] * s13[4], c12 = i11[2] * s13[3] + i11[5] * s13[4] + s13[5], m9 = r19._t;
  3264. return m9[0] = o12, m9[1] = n17, m9[2] = a15, m9[3] = l12, m9[4] = h8, m9[5] = c12, r19;
  3265. }
  3266. invert() {
  3267. const t12 = this._t;
  3268. let e15 = t12[0] * t12[4] - t12[1] * t12[3];
  3269. if (0 === e15)
  3270. return new O2([0, 0, 0, 0, 0, 0]);
  3271. e15 = 1 / e15;
  3272. const r19 = (t12[1] * t12[5] - t12[2] * t12[4]) * e15, i11 = (t12[2] * t12[3] - t12[0] * t12[5]) * e15, s13 = t12[4] * e15, o12 = -t12[1] * e15, n17 = -t12[3] * e15, a15 = t12[0] * e15;
  3273. return new O2([s13, o12, r19, n17, a15, i11]);
  3274. }
  3275. };
  3276. var Y2 = class {
  3277. constructor(t12, e15) {
  3278. this._resourceManager = t12, this._transfos = [], this._sizeTransfos = [], this._geomUnitsPerPoint = 1, this._placementPool = new e(t7, void 0, void 0, 100), this._earlyReturn = false, this._mapRotation = 0, this._transfos.push(e15 || O2.createIdentity()), this._sizeTransfos.push(e15 ? e15.scaleRatio() : 1);
  3279. }
  3280. setTransform(t12, e15) {
  3281. this._transfos = [t12 || O2.createIdentity()], this._sizeTransfos = [e15 || (t12 ? t12.scaleRatio() : 1)];
  3282. }
  3283. setGeomUnitsPerPoint(t12) {
  3284. this._geomUnitsPerPoint = t12;
  3285. }
  3286. transformPt(t12) {
  3287. return this._transfos[this._transfos.length - 1].transform(t12);
  3288. }
  3289. transformSize(t12) {
  3290. return t12 * this._sizeTransfos[this._sizeTransfos.length - 1];
  3291. }
  3292. reverseTransformPt(t12) {
  3293. return this._transfos[this._transfos.length - 1].invert().transform(t12);
  3294. }
  3295. reverseTransformSize(t12) {
  3296. return t12 / this._sizeTransfos[this._sizeTransfos.length - 1];
  3297. }
  3298. getTransformAngle() {
  3299. return this._transfos[this._transfos.length - 1].angle();
  3300. }
  3301. geomUnitsPerPoint() {
  3302. return this.isEmbedded() ? 1 : this._geomUnitsPerPoint;
  3303. }
  3304. isEmbedded() {
  3305. return this._transfos.length > 1;
  3306. }
  3307. back() {
  3308. return this._transfos[this._transfos.length - 1];
  3309. }
  3310. push(t12, e15) {
  3311. const r19 = e15 ? t12.scaleRatio() : 1;
  3312. O2.multiply(t12, this.back(), t12), this._transfos.push(t12), this._sizeTransfos.push(this._sizeTransfos[this._sizeTransfos.length - 1] * r19);
  3313. }
  3314. pop() {
  3315. this._transfos.splice(-1, 1), this._sizeTransfos.splice(-1, 1);
  3316. }
  3317. drawSymbol(t12, e15, r19) {
  3318. if (t12)
  3319. switch (t12.type) {
  3320. case "CIMPointSymbol":
  3321. case "CIMLineSymbol":
  3322. case "CIMPolygonSymbol":
  3323. this.drawMultiLayerSymbol(t12, e15);
  3324. break;
  3325. case "CIMTextSymbol":
  3326. this.drawTextSymbol(t12, e15, r19);
  3327. }
  3328. }
  3329. drawMultiLayerSymbol(t12, e15) {
  3330. if (!t12)
  3331. return;
  3332. const r19 = t12.symbolLayers;
  3333. if (!r19)
  3334. return;
  3335. const i11 = t12.effects;
  3336. if (i11 && i11.length > 0) {
  3337. const t13 = this.executeEffects(i11, e15);
  3338. if (t13) {
  3339. let e16 = t13.next();
  3340. for (; e16; )
  3341. this.drawSymbolLayers(r19, e16), e16 = t13.next();
  3342. }
  3343. } else
  3344. this.drawSymbolLayers(r19, e15);
  3345. }
  3346. executeEffects(t12, e15) {
  3347. const r19 = this._resourceManager.geometryEngine;
  3348. let i11 = new r4(e15);
  3349. for (const s13 of t12) {
  3350. const t13 = A3(s13);
  3351. t13 && (i11 = t13.execute(i11, s13, this.geomUnitsPerPoint(), r19));
  3352. }
  3353. return i11;
  3354. }
  3355. drawSymbolLayers(t12, e15) {
  3356. let r19 = t12.length;
  3357. for (; r19--; ) {
  3358. const i11 = t12[r19];
  3359. if (!i11 || false === i11.enable)
  3360. continue;
  3361. const s13 = i11.effects;
  3362. if (s13 && s13.length > 0) {
  3363. const t13 = this.executeEffects(s13, e15);
  3364. if (t13) {
  3365. let e16 = null;
  3366. for (; (e16 = t13.next()) && (this.drawSymbolLayer(i11, e16), !this._earlyReturn); )
  3367. ;
  3368. }
  3369. } else
  3370. this.drawSymbolLayer(i11, e15);
  3371. if (this._earlyReturn)
  3372. return;
  3373. }
  3374. }
  3375. drawSymbolLayer(t12, e15) {
  3376. switch (t12.type) {
  3377. case "CIMSolidFill":
  3378. this.drawSolidFill(e15, t12.color);
  3379. break;
  3380. case "CIMHatchFill":
  3381. this.drawHatchFill(e15, t12);
  3382. break;
  3383. case "CIMPictureFill":
  3384. this.drawPictureFill(e15, t12);
  3385. break;
  3386. case "CIMGradientFill":
  3387. this.drawGradientFill(e15, t12);
  3388. break;
  3389. case "CIMSolidStroke":
  3390. this.drawSolidStroke(e15, t12.color, t12.width, t12.capStyle, t12.joinStyle, t12.miterLimit);
  3391. break;
  3392. case "CIMPictureStroke":
  3393. this.drawPictureStroke(e15, t12);
  3394. break;
  3395. case "CIMGradientStroke":
  3396. this.drawGradientStroke(e15, t12);
  3397. break;
  3398. case "CIMCharacterMarker":
  3399. case "CIMPictureMarker":
  3400. case "CIMVectorMarker":
  3401. this.drawMarkerLayer(t12, e15);
  3402. }
  3403. }
  3404. drawHatchFill(t12, e15) {
  3405. const r19 = this._buildHatchPolyline(e15, t12, this.geomUnitsPerPoint());
  3406. r19 && (this.pushClipPath(t12), this.drawMultiLayerSymbol(e15.lineSymbol, r19), this.popClipPath());
  3407. }
  3408. drawPictureFill(t12, e15) {
  3409. }
  3410. drawGradientFill(t12, e15) {
  3411. }
  3412. drawPictureStroke(t12, e15) {
  3413. }
  3414. drawGradientStroke(t12, e15) {
  3415. }
  3416. drawMarkerLayer(t12, e15) {
  3417. const r19 = t12.markerPlacement;
  3418. if (r19) {
  3419. const i11 = g6(r19);
  3420. if (i11) {
  3421. const s13 = "CIMMarkerPlacementInsidePolygon" === r19.type || "CIMMarkerPlacementPolygonCenter" === r19.type && r19.clipAtBoundary;
  3422. s13 && this.pushClipPath(e15);
  3423. const o12 = i11.execute(e15, r19, this.geomUnitsPerPoint(), this._resourceManager.geometryEngine);
  3424. if (o12) {
  3425. let e16 = null;
  3426. for (; (e16 = o12.next()) && (this.drawMarker(t12, e16), !this._earlyReturn); )
  3427. ;
  3428. }
  3429. s13 && this.popClipPath();
  3430. }
  3431. } else {
  3432. const r20 = this._placementPool.acquire();
  3433. if (s5(e15))
  3434. r20.tx = e15.x, r20.ty = e15.y, this.drawMarker(t12, r20);
  3435. else if (y2(e15))
  3436. [r20.tx, r20.ty] = r2(e15), this.drawMarker(t12, r20);
  3437. else
  3438. for (const i11 of e15.points)
  3439. if (r20.tx = i11[0], r20.ty = i11[1], this.drawMarker(t12, r20), this._earlyReturn)
  3440. break;
  3441. this._placementPool.release(r20);
  3442. }
  3443. }
  3444. drawMarker(t12, e15) {
  3445. switch (t12.type) {
  3446. case "CIMCharacterMarker":
  3447. case "CIMPictureMarker":
  3448. this.drawPictureMarker(t12, e15);
  3449. break;
  3450. case "CIMVectorMarker":
  3451. this.drawVectorMarker(t12, e15);
  3452. }
  3453. }
  3454. drawPictureMarker(t12, e15) {
  3455. var _a, _b, _c, _d, _e;
  3456. if (!t12)
  3457. return;
  3458. const r19 = this._resourceManager.getResource(t12.url), i11 = (_a = t12.size) != null ? _a : 10;
  3459. if (t(r19) || i11 <= 0)
  3460. return;
  3461. const o12 = r19.width, n17 = r19.height;
  3462. if (!o12 || !n17)
  3463. return;
  3464. const a15 = o12 / n17, l12 = (_b = t12.scaleX) != null ? _b : 1, h8 = O2.createIdentity(), c12 = t12.anchorPoint;
  3465. if (c12) {
  3466. let e16 = c12.x, r20 = c12.y;
  3467. "Absolute" !== t12.anchorPointUnits && (e16 *= i11 * a15 * l12, r20 *= i11), h8.translate(-e16, -r20);
  3468. }
  3469. let m9 = (_c = t12.rotation) != null ? _c : 0;
  3470. t12.rotateClockwise && (m9 = -m9), this._mapRotation && (m9 += this._mapRotation), m9 && h8.rotate(m9 * E);
  3471. let f9 = (_d = t12.offsetX) != null ? _d : 0, u15 = (_e = t12.offsetY) != null ? _e : 0;
  3472. if (f9 || u15) {
  3473. if (this._mapRotation) {
  3474. const t13 = E * this._mapRotation, e16 = Math.cos(t13), r20 = Math.sin(t13), i12 = f9 * r20 + u15 * e16;
  3475. f9 = f9 * e16 - u15 * r20, u15 = i12;
  3476. }
  3477. h8.translate(f9, u15);
  3478. }
  3479. const p6 = this.geomUnitsPerPoint();
  3480. 1 !== p6 && h8.scale(p6, p6);
  3481. const d4 = e15.getAngle();
  3482. d4 && h8.rotate(d4), h8.translate(e15.tx, e15.ty), this.push(h8, false), this.drawImage(t12, i11), this.pop();
  3483. }
  3484. drawVectorMarker(t12, e15) {
  3485. var _a, _b, _c, _d;
  3486. if (!t12)
  3487. return;
  3488. const r19 = t12.markerGraphics;
  3489. if (!r19)
  3490. return;
  3491. const i11 = (_a = t12.size) != null ? _a : 10, s13 = t12.frame, o12 = s13 ? s13.ymax - s13.ymin : 0, n17 = i11 && o12 ? i11 / o12 : 1, a15 = O2.createIdentity();
  3492. s13 && a15.translate(0.5 * -(s13.xmax + s13.xmin), 0.5 * -(s13.ymax + s13.ymin));
  3493. const l12 = t12.anchorPoint;
  3494. if (l12) {
  3495. let e16 = l12.x, r20 = l12.y;
  3496. "Absolute" !== t12.anchorPointUnits ? s13 && (e16 *= s13.xmax - s13.xmin, r20 *= s13.ymax - s13.ymin) : (e16 /= n17, r20 /= n17), a15.translate(-e16, -r20);
  3497. }
  3498. 1 !== n17 && a15.scale(n17, n17);
  3499. let h8 = (_b = t12.rotation) != null ? _b : 0;
  3500. t12.rotateClockwise && (h8 = -h8), this._mapRotation && (h8 += this._mapRotation), h8 && a15.rotate(h8 * E);
  3501. let c12 = (_c = t12.offsetX) != null ? _c : 0, m9 = (_d = t12.offsetY) != null ? _d : 0;
  3502. if (c12 || m9) {
  3503. if (this._mapRotation) {
  3504. const t13 = E * this._mapRotation, e16 = Math.cos(t13), r20 = Math.sin(t13), i12 = c12 * r20 + m9 * e16;
  3505. c12 = c12 * e16 - m9 * r20, m9 = i12;
  3506. }
  3507. a15.translate(c12, m9);
  3508. }
  3509. const f9 = this.geomUnitsPerPoint();
  3510. 1 !== f9 && a15.scale(f9, f9);
  3511. const u15 = e15.getAngle();
  3512. u15 && a15.rotate(u15), a15.translate(e15.tx, e15.ty), this.push(a15, t12.scaleSymbolsProportionally);
  3513. for (const p6 of r19)
  3514. if (p6 && p6.symbol && p6.geometry || N2.error("Invalid marker graphic", p6), this.drawSymbol(p6.symbol, p6.geometry, p6.textString), this._earlyReturn)
  3515. break;
  3516. this.pop();
  3517. }
  3518. drawTextSymbol(t12, e15, r19) {
  3519. var _a, _b, _c, _d;
  3520. if (!t12)
  3521. return;
  3522. if (!s5(e15))
  3523. return;
  3524. if (((_a = t12.height) != null ? _a : 10) <= 0)
  3525. return;
  3526. const i11 = O2.createIdentity();
  3527. let s13 = (_b = t12.angle) != null ? _b : 0;
  3528. s13 = -s13, s13 && i11.rotate(s13 * E);
  3529. const o12 = (_c = t12.offsetX) != null ? _c : 0, n17 = (_d = t12.offsetY) != null ? _d : 0;
  3530. (o12 || n17) && i11.translate(o12, n17);
  3531. const a15 = this.geomUnitsPerPoint();
  3532. 1 !== a15 && i11.scale(a15, a15), i11.translate(e15.x, e15.y), this.push(i11, false), this.drawText(t12, r19), this.pop();
  3533. }
  3534. _buildHatchPolyline(t12, e15, r19) {
  3535. let i11 = (void 0 !== t12.separation ? t12.separation : 4) * r19, s13 = void 0 !== t12.rotation ? t12.rotation : 0;
  3536. if (0 === i11)
  3537. return null;
  3538. i11 < 0 && (i11 = -i11);
  3539. let o12 = 0;
  3540. const n17 = 0.5 * i11;
  3541. for (; o12 > n17; )
  3542. o12 -= i11;
  3543. for (; o12 < -n17; )
  3544. o12 += i11;
  3545. const a15 = u3();
  3546. c2(a15, e15), a15[0] -= n17, a15[1] -= n17, a15[2] += n17, a15[3] += n17;
  3547. const l12 = [[a15[0], a15[1]], [a15[0], a15[3]], [a15[2], a15[3]], [a15[2], a15[1]]];
  3548. for (; s13 > 180; )
  3549. s13 -= 180;
  3550. for (; s13 < 0; )
  3551. s13 += 180;
  3552. const c12 = Math.cos(s13 * E), f9 = Math.sin(s13 * E), u15 = -i11 * f9, p6 = i11 * c12;
  3553. let d4, _4, g8, y7;
  3554. o12 = (void 0 !== t12.offsetX ? t12.offsetX * r19 : 0) * f9 - (void 0 !== t12.offsetY ? t12.offsetY * r19 : 0) * c12, d4 = g8 = Number.MAX_VALUE, _4 = y7 = -Number.MAX_VALUE;
  3555. for (const h8 of l12) {
  3556. const t13 = h8[0], e16 = h8[1], r20 = c12 * t13 + f9 * e16, i12 = -f9 * t13 + c12 * e16;
  3557. d4 = Math.min(d4, r20), g8 = Math.min(g8, i12), _4 = Math.max(_4, r20), y7 = Math.max(y7, i12);
  3558. }
  3559. g8 = Math.floor(g8 / i11) * i11;
  3560. let P5 = c12 * d4 - f9 * g8 - u15 * o12 / i11, w6 = f9 * d4 + c12 * g8 - p6 * o12 / i11, x5 = c12 * _4 - f9 * g8 - u15 * o12 / i11, S2 = f9 * _4 + c12 * g8 - p6 * o12 / i11;
  3561. const M4 = 1 + Math.round((y7 - g8) / i11), b5 = [];
  3562. for (let h8 = 0; h8 < M4; h8++)
  3563. P5 += u15, w6 += p6, x5 += u15, S2 += p6, b5.push([[P5, w6], [x5, S2]]);
  3564. return { paths: b5 };
  3565. }
  3566. };
  3567. var q3 = class extends Y2 {
  3568. constructor(t12, e15) {
  3569. super(t12, e15), this.reset();
  3570. }
  3571. reset() {
  3572. this._xmin = this._ymin = 1 / 0, this._xmax = this._ymax = -1 / 0, this._clipCount = 0;
  3573. }
  3574. envelope() {
  3575. return new t10(this._xmin, this._ymin, this._xmax - this._xmin, this._ymax - this._ymin);
  3576. }
  3577. bounds() {
  3578. return o2(this._xmin, this._ymin, this._xmax, this._ymax);
  3579. }
  3580. drawSolidFill(t12) {
  3581. if (t12 && !(this._clipCount > 0))
  3582. if (y2(t12))
  3583. this._processPath(t12.rings, 0);
  3584. else if (f(t12))
  3585. this._processPath(t12.paths, 0);
  3586. else if (u2(t12)) {
  3587. const e15 = Q(t12);
  3588. e15 && this._processPath(e15.rings, 0);
  3589. } else
  3590. console.error("drawSolidFill Unexpected geometry type!");
  3591. }
  3592. drawSolidStroke(t12, e15, r19) {
  3593. if (!t12 || this._clipCount > 0)
  3594. return;
  3595. const i11 = 0.5 * this.transformSize(r19);
  3596. if (y2(t12))
  3597. this._processPath(t12.rings, i11);
  3598. else if (f(t12))
  3599. this._processPath(t12.paths, i11);
  3600. else if (u2(t12)) {
  3601. const e16 = Q(t12);
  3602. e16 && this._processPath(e16.rings, i11);
  3603. } else
  3604. console.error("drawSolidStroke unexpected geometry type!");
  3605. }
  3606. drawMarkerLayer(t12, e15) {
  3607. y2(e15) && t12.markerPlacement && ("CIMMarkerPlacementInsidePolygon" === t12.markerPlacement.type || "CIMMarkerPlacementPolygonCenter" === t12.markerPlacement.type && t12.markerPlacement.clipAtBoundary) ? this._processPath(e15.rings, 0) : super.drawMarkerLayer(t12, e15);
  3608. }
  3609. drawHatchFill(t12, e15) {
  3610. this.drawSolidFill(t12);
  3611. }
  3612. drawPictureFill(t12, e15) {
  3613. this.drawSolidFill(t12);
  3614. }
  3615. drawGradientFill(t12, e15) {
  3616. this.drawSolidFill(t12);
  3617. }
  3618. drawPictureStroke(t12, e15) {
  3619. this.drawSolidStroke(t12, null, e15.width);
  3620. }
  3621. drawGradientStroke(t12, e15) {
  3622. this.drawSolidStroke(t12, null, e15.width);
  3623. }
  3624. pushClipPath(t12) {
  3625. this.drawSolidFill(t12), this._clipCount++;
  3626. }
  3627. popClipPath() {
  3628. this._clipCount--;
  3629. }
  3630. drawImage(t12, e15) {
  3631. var _a;
  3632. const { url: r19 } = t12, i11 = (_a = t12.scaleX) != null ? _a : 1;
  3633. let s13 = i11 * e15, n17 = e15;
  3634. const a15 = this._resourceManager.getResource(r19);
  3635. !e15 && r(a15) && (s13 = i11 * a15.width, n17 = a15.height), this._merge(this.transformPt([-s13 / 2, -n17 / 2]), 0), this._merge(this.transformPt([-s13 / 2, n17 / 2]), 0), this._merge(this.transformPt([s13 / 2, -n17 / 2]), 0), this._merge(this.transformPt([s13 / 2, n17 / 2]), 0);
  3636. }
  3637. drawText(t12, e15) {
  3638. if (!e15 || 0 === e15.length)
  3639. return;
  3640. this._textRasterizer || (this._textRasterizer = new s11());
  3641. const r19 = et(t12), [i11, s13] = this._textRasterizer.computeTextSize(e15, r19);
  3642. let o12 = 0;
  3643. switch (t12.horizontalAlignment) {
  3644. case "Left":
  3645. o12 = i11 / 2;
  3646. break;
  3647. case "Right":
  3648. o12 = -i11 / 2;
  3649. }
  3650. let n17 = 0;
  3651. switch (t12.verticalAlignment) {
  3652. case "Bottom":
  3653. n17 = s13 / 2;
  3654. break;
  3655. case "Top":
  3656. n17 = -s13 / 2;
  3657. break;
  3658. case "Baseline":
  3659. n17 = s13 / 6;
  3660. }
  3661. this._merge(this.transformPt([-i11 / 2 + o12, -s13 / 2 + n17]), 0), this._merge(this.transformPt([-i11 / 2 + o12, s13 / 2 + n17]), 0), this._merge(this.transformPt([i11 / 2 + o12, -s13 / 2 + n17]), 0), this._merge(this.transformPt([i11 / 2 + o12, s13 / 2 + n17]), 0);
  3662. }
  3663. _processPath(t12, e15) {
  3664. if (t12)
  3665. for (const r19 of t12) {
  3666. const t13 = r19 ? r19.length : 0;
  3667. if (t13 > 1) {
  3668. this._merge(this.transformPt(r19[0]), e15);
  3669. for (let i11 = 1; i11 < t13; i11++)
  3670. this._merge(this.transformPt(r19[i11]), e15);
  3671. }
  3672. }
  3673. }
  3674. _merge(t12, e15) {
  3675. t12[0] - e15 < this._xmin && (this._xmin = t12[0] - e15), t12[0] + e15 > this._xmax && (this._xmax = t12[0] + e15), t12[1] - e15 < this._ymin && (this._ymin = t12[1] - e15), t12[1] + e15 > this._ymax && (this._ymax = t12[1] + e15);
  3676. }
  3677. };
  3678. var V = class extends Y2 {
  3679. constructor() {
  3680. super(...arguments), this._searchPoint = [0, 0], this._searchDistPoint = 0;
  3681. }
  3682. hitTest(t12, e15, r19, i11, s13, o12) {
  3683. const n17 = o12 * u4(1);
  3684. this.setTransform(), this.setGeomUnitsPerPoint(n17), this._searchPoint = [(t12[0] + t12[2]) / 2, (t12[1] + t12[3]) / 2], this._searchDistPoint = (t12[2] - t12[0]) / 2 / n17, this._textInfo = i11;
  3685. const a15 = e15 && ("CIMPointSymbol" === e15.type && "Map" !== e15.angleAlignment || "CIMTextSymbol" === e15.type);
  3686. return this._mapRotation = a15 ? s13 : 0, this._earlyReturn = false, this.drawSymbol(e15, r19), this._earlyReturn;
  3687. }
  3688. drawSolidFill(t12, e15) {
  3689. this._hitTestFill(t12);
  3690. }
  3691. drawHatchFill(t12, e15) {
  3692. this._hitTestFill(t12);
  3693. }
  3694. drawPictureFill(t12, e15) {
  3695. this._hitTestFill(t12);
  3696. }
  3697. drawGradientFill(t12, e15) {
  3698. this._hitTestFill(t12);
  3699. }
  3700. drawSolidStroke(t12, e15, r19, i11, s13, o12) {
  3701. this._hitTestStroke(t12, r19);
  3702. }
  3703. drawPictureStroke(t12, e15) {
  3704. this._hitTestStroke(t12, e15.width);
  3705. }
  3706. drawGradientStroke(t12, e15) {
  3707. this._hitTestStroke(t12, e15.width);
  3708. }
  3709. drawMarkerLayer(t12, e15) {
  3710. t12.markerPlacement && ("CIMMarkerPlacementInsidePolygon" === t12.markerPlacement.type || "CIMMarkerPlacementPolygonCenter" === t12.markerPlacement.type && t12.markerPlacement.clipAtBoundary) ? this._hitTestFill(e15) : super.drawMarkerLayer(t12, e15);
  3711. }
  3712. pushClipPath(t12) {
  3713. }
  3714. popClipPath() {
  3715. }
  3716. drawImage(t12, e15) {
  3717. var _a;
  3718. const { url: r19 } = t12, i11 = (_a = t12.scaleX) != null ? _a : 1, o12 = this._resourceManager.getResource(r19);
  3719. if (t(o12) || 0 === o12.height || 0 === e15)
  3720. return;
  3721. const n17 = e15 * this.geomUnitsPerPoint(), a15 = n17 * i11 * (o12.width / o12.height), l12 = this.reverseTransformPt(this._searchPoint), h8 = this._searchDistPoint;
  3722. Math.abs(l12[0]) < a15 / 2 + h8 && Math.abs(l12[1]) < n17 / 2 + h8 && (this._earlyReturn = true);
  3723. }
  3724. drawText(e15, r19) {
  3725. var _a, _b;
  3726. const i11 = this._textInfo;
  3727. if (!i11)
  3728. return;
  3729. const s13 = i11.get(e15);
  3730. if (!s13)
  3731. return;
  3732. const { text: o12, mosaicItem: n17 } = s13;
  3733. if (!n17 || 0 === n17.glyphMosaicItems.length)
  3734. return;
  3735. const a15 = (_a = e15.height) != null ? _a : J, l12 = tt(e15.lineGapType, (_b = e15.lineGap) != null ? _b : 0, a15), h8 = n5(o12)[1], c12 = n17.glyphMosaicItems, m9 = j4(c12, h8, { scale: a15 / j, angle: 0, xOffset: 0, yOffset: 0, hAlign: Z2(e15.horizontalAlignment), vAlign: $(e15.verticalAlignment), maxLineWidth: 512, lineHeight: f2 * Math.max(0.25, Math.min(l12 || 1, 4)), decoration: e15.font.decoration || "none", isCIM: true }), f9 = this.reverseTransformPt(this._searchPoint), u15 = f9[0], p6 = f9[1];
  3736. for (const t12 of m9.glyphs)
  3737. if (u15 > t12.xTopLeft && u15 < t12.xBottomRight && p6 > -t12.yBottomRight && p6 < -t12.yTopLeft) {
  3738. this._earlyReturn = true;
  3739. break;
  3740. }
  3741. }
  3742. _hitTestFill(t12) {
  3743. let e15 = null;
  3744. if (u2(t12)) {
  3745. const r20 = t12;
  3746. e15 = [[[r20.xmin, r20.ymin], [r20.xmin, r20.ymax], [r20.xmax, r20.ymax], [r20.xmax, r20.ymin], [r20.xmin, r20.ymin]]];
  3747. } else if (y2(t12))
  3748. e15 = t12.rings;
  3749. else {
  3750. if (!f(t12))
  3751. return;
  3752. e15 = t12.paths;
  3753. }
  3754. const r19 = this.reverseTransformPt(this._searchPoint);
  3755. if (this._pointInPolygon(r19, e15) && (this._earlyReturn = true), !this._earlyReturn) {
  3756. const t13 = this.reverseTransformSize(this._searchDistPoint) * this.geomUnitsPerPoint();
  3757. this._nearLine(r19, e15, t13) && (this._earlyReturn = true);
  3758. }
  3759. }
  3760. _hitTestStroke(t12, e15) {
  3761. let r19 = null;
  3762. if (u2(t12)) {
  3763. const e16 = t12;
  3764. r19 = [[[e16.xmin, e16.ymin], [e16.xmin, e16.ymax], [e16.xmax, e16.ymax], [e16.xmax, e16.ymin], [e16.xmin, e16.ymin]]];
  3765. } else if (y2(t12))
  3766. r19 = t12.rings;
  3767. else {
  3768. if (!f(t12))
  3769. return;
  3770. r19 = t12.paths;
  3771. }
  3772. const i11 = this.reverseTransformPt(this._searchPoint), s13 = e15 * this.geomUnitsPerPoint(), o12 = this.reverseTransformSize(this._searchDistPoint) * this.geomUnitsPerPoint();
  3773. this._nearLine(i11, r19, s13 / 2 + o12) && (this._earlyReturn = true);
  3774. }
  3775. _pointInPolygon(t12, e15) {
  3776. let r19 = 0;
  3777. for (const i11 of e15) {
  3778. const e16 = i11.length;
  3779. for (let s13 = 1; s13 < e16; s13++) {
  3780. const e17 = i11[s13 - 1], o12 = i11[s13];
  3781. if (e17[1] > t12[1] == o12[1] > t12[1])
  3782. continue;
  3783. (o12[0] - e17[0]) * (t12[1] - e17[1]) - (o12[1] - e17[1]) * (t12[0] - e17[0]) > 0 ? r19++ : r19--;
  3784. }
  3785. }
  3786. return 0 !== r19;
  3787. }
  3788. _nearLine(t12, e15, r19) {
  3789. for (const i11 of e15) {
  3790. const e16 = i11.length;
  3791. for (let s13 = 1; s13 < e16; s13++) {
  3792. const e17 = i11[s13 - 1], o12 = i11[s13];
  3793. let n17 = (o12[0] - e17[0]) * (o12[0] - e17[0]) + (o12[1] - e17[1]) * (o12[1] - e17[1]);
  3794. if (0 === n17)
  3795. continue;
  3796. n17 = Math.sqrt(n17);
  3797. const a15 = ((o12[0] - e17[0]) * (t12[1] - e17[1]) - (o12[1] - e17[1]) * (t12[0] - e17[0])) / n17;
  3798. if (Math.abs(a15) < r19) {
  3799. const i12 = ((o12[0] - e17[0]) * (t12[0] - e17[0]) + (o12[1] - e17[1]) * (t12[1] - e17[1])) / n17;
  3800. if (i12 > -r19 && i12 < n17 + r19)
  3801. return true;
  3802. }
  3803. }
  3804. }
  3805. return false;
  3806. }
  3807. };
  3808. var W = class extends Y2 {
  3809. constructor(t12, e15, r19, i11) {
  3810. super(e15, r19), this._applyAdditionalRenderProps = i11, this._colorSubstitutionHelper = new a4(), this._ctx = t12;
  3811. }
  3812. drawSolidFill(t12, e15) {
  3813. if (!t12)
  3814. return;
  3815. if (y2(t12))
  3816. this._buildPath(t12.rings, true);
  3817. else if (f(t12))
  3818. this._buildPath(t12.paths, true);
  3819. else if (u2(t12))
  3820. this._buildPath(Q(t12).rings, true);
  3821. else {
  3822. if (!l(t12))
  3823. return;
  3824. console.log("CanvasDrawHelper.drawSolidFill - No implementation!");
  3825. }
  3826. const r19 = this._ctx;
  3827. r19.fillStyle = "string" == typeof e15 ? e15 : "rgba(" + Math.round(e15[0]) + "," + Math.round(e15[1]) + "," + Math.round(e15[2]) + "," + e15[3] / 255 + ")", r19.fill("evenodd");
  3828. }
  3829. drawSolidStroke(t12, e15, r19, i11, s13, o12) {
  3830. if (!t12 || !e15 || 0 === r19)
  3831. return;
  3832. if (y2(t12))
  3833. this._buildPath(t12.rings, true);
  3834. else if (f(t12))
  3835. this._buildPath(t12.paths, false);
  3836. else {
  3837. if (!u2(t12))
  3838. return void console.log("CanvasDrawHelper.drawSolidStroke isn't implemented!");
  3839. this._buildPath(Q(t12).rings, true);
  3840. }
  3841. const n17 = this._ctx;
  3842. n17.strokeStyle = "string" == typeof e15 ? e15 : "rgba(" + Math.round(e15[0]) + "," + Math.round(e15[1]) + "," + Math.round(e15[2]) + "," + e15[3] / 255 + ")", n17.lineWidth = Math.max(this.transformSize(r19), 0.5), this._setCapStyle(i11), this._setJoinStyle(s13), n17.miterLimit = o12, n17.stroke();
  3843. }
  3844. pushClipPath(t12) {
  3845. if (this._ctx.save(), y2(t12))
  3846. this._buildPath(t12.rings, true);
  3847. else if (f(t12))
  3848. this._buildPath(t12.paths, true);
  3849. else {
  3850. if (!u2(t12))
  3851. return;
  3852. this._buildPath(Q(t12).rings, true);
  3853. }
  3854. this._ctx.clip("evenodd");
  3855. }
  3856. popClipPath() {
  3857. this._ctx.restore();
  3858. }
  3859. drawImage(t12, e15) {
  3860. var _a;
  3861. const { colorSubstitutions: r19, url: i11, tintColor: o12 } = t12, n17 = (_a = t12.scaleX) != null ? _a : 1, a15 = this._resourceManager.getResource(i11);
  3862. if (t(a15))
  3863. return;
  3864. let l12 = e15 * (a15.width / a15.height), h8 = e15;
  3865. e15 || (l12 = a15.width, h8 = a15.height);
  3866. const c12 = A2(i11) || "src" in a15 && A2(a15.src);
  3867. let m9 = "getFrame" in a15 ? t9(a15) : a15;
  3868. r19 && (m9 = this._colorSubstitutionHelper.applyColorSubstituition(m9, r19)), this._applyAdditionalRenderProps && !c12 && o12 && (m9 = this._colorSubstitutionHelper.tintImageData(m9, o12));
  3869. const f9 = this.transformPt([0, 0]), [u15, p6] = this.getTransformAngle(), d4 = this.transformSize(1), _4 = this._ctx;
  3870. _4.save(), _4.setTransform({ m11: n17 * d4 * u15, m12: n17 * d4 * p6, m21: -d4 * p6, m22: d4 * u15, m41: f9[0], m42: f9[1] }), _4.drawImage(m9, -l12 / 2, -h8 / 2, l12, h8), _4.restore();
  3871. }
  3872. drawText(t12, e15) {
  3873. if (!e15 || 0 === e15.length)
  3874. return;
  3875. this._textRasterizer || (this._textRasterizer = new s11());
  3876. const r19 = et(t12);
  3877. r19.size *= this.transformSize(e3(1));
  3878. const i11 = this._textRasterizer.rasterizeText(e15, r19);
  3879. if (!i11)
  3880. return;
  3881. const { size: s13, anchorX: o12, anchorY: n17, canvas: l12 } = i11, h8 = s13[0] * (o12 + 0.5), c12 = s13[1] * (n17 - 0.5), m9 = this._ctx, f9 = this.transformPt([0, 0]), [u15, p6] = this.getTransformAngle(), d4 = 1;
  3882. m9.save(), m9.setTransform({ m11: d4 * u15, m12: d4 * p6, m21: -d4 * p6, m22: d4 * u15, m41: f9[0] - d4 * h8, m42: f9[1] + d4 * c12 }), m9.drawImage(l12, 0, 0), m9.restore();
  3883. }
  3884. drawPictureFill(t12, e15) {
  3885. if (!t12)
  3886. return;
  3887. let { colorSubstitutions: r19, height: i11, offsetX: o12, offsetY: n17, rotation: a15, scaleX: l12, tintColor: h8, url: c12 } = e15;
  3888. const m9 = this._resourceManager.getResource(c12);
  3889. if (t(m9))
  3890. return;
  3891. if (y2(t12))
  3892. this._buildPath(t12.rings, true);
  3893. else if (f(t12))
  3894. this._buildPath(t12.paths, true);
  3895. else if (u2(t12))
  3896. this._buildPath(Q(t12).rings, true);
  3897. else {
  3898. if (!l(t12))
  3899. return;
  3900. console.log("CanvasDrawHelper.drawPictureFill - No implementation!");
  3901. }
  3902. const f9 = this._ctx, u15 = A2(c12) || "src" in m9 && A2(m9.src);
  3903. let y7, P5 = "getFrame" in m9 ? t9(m9) : m9;
  3904. if (r19 && (P5 = this._colorSubstitutionHelper.applyColorSubstituition(P5, r19)), this._applyAdditionalRenderProps) {
  3905. u15 || h8 && (P5 = this._colorSubstitutionHelper.tintImageData(P5, h8)), y7 = f9.createPattern(P5, "repeat");
  3906. const t13 = this.transformSize(1);
  3907. a15 || (a15 = 0), o12 ? o12 *= t13 : o12 = 0, n17 ? n17 *= t13 : n17 = 0, i11 && (i11 *= t13);
  3908. const e16 = i11 ? i11 / m9.height : 1, r20 = l12 && i11 ? l12 * i11 / m9.width : 1;
  3909. if (0 !== a15 || 1 !== e16 || 1 !== r20 || 0 !== o12 || 0 !== n17) {
  3910. const t14 = new DOMMatrix();
  3911. t14.rotateSelf(0, 0, -a15).translateSelf(o12, n17).scaleSelf(r20, e16, 1), y7.setTransform(t14);
  3912. }
  3913. } else
  3914. y7 = f9.createPattern(P5, "repeat");
  3915. f9.save(), f9.fillStyle = y7, f9.fill("evenodd"), f9.restore();
  3916. }
  3917. drawPictureStroke(t12, e15) {
  3918. if (!t12)
  3919. return;
  3920. let { colorSubstitutions: i11, capStyle: o12, joinStyle: n17, miterLimit: a15, tintColor: h8, url: c12, width: m9 } = e15;
  3921. const f9 = this._resourceManager.getResource(c12);
  3922. if (t(f9))
  3923. return;
  3924. let u15;
  3925. if (y2(t12))
  3926. u15 = t12.rings;
  3927. else if (f(t12))
  3928. u15 = t12.paths;
  3929. else if (u2(t12))
  3930. u15 = Q(t12).rings;
  3931. else {
  3932. if (!l(t12))
  3933. return;
  3934. console.log("CanvasDrawHelper.drawPictureStroke - No implementation!");
  3935. }
  3936. m9 || (m9 = f9.width);
  3937. const y7 = A2(c12) || "src" in f9 && A2(f9.src);
  3938. let P5 = "getFrame" in f9 ? t9(f9) : f9;
  3939. i11 && (P5 = this._colorSubstitutionHelper.applyColorSubstituition(P5, i11)), this._applyAdditionalRenderProps && (y7 || h8 && (P5 = this._colorSubstitutionHelper.tintImageData(P5, h8)));
  3940. const w6 = Math.max(this.transformSize(u4(m9)), 0.5), x5 = w6 / P5.width, S2 = this._ctx, M4 = S2.createPattern(P5, "repeat-y");
  3941. let b5, C6;
  3942. S2.save(), this._setCapStyle(o12), this._setJoinStyle(n17), S2.miterLimit = a15, S2.lineWidth = w6;
  3943. for (let s13 of u15)
  3944. if (s13 = y(s13), it(s13), s13 && !(s13.length <= 1)) {
  3945. b5 = this.transformPt(s13[0]);
  3946. for (let t13 = 1; t13 < s13.length; t13++) {
  3947. C6 = this.transformPt(s13[t13]);
  3948. const e16 = K2(b5, C6), r19 = new DOMMatrix();
  3949. r19.translateSelf(0, b5[1] - w6 / 2).scaleSelf(x5, x5, 1).rotateSelf(0, 0, 90 - e16), M4.setTransform(r19), S2.strokeStyle = M4, S2.beginPath(), S2.moveTo(b5[0], b5[1]), S2.lineTo(C6[0], C6[1]), S2.stroke(), b5 = C6;
  3950. }
  3951. }
  3952. S2.restore();
  3953. }
  3954. _buildPath(t12, e15) {
  3955. const r19 = this._ctx;
  3956. if (r19.beginPath(), t12)
  3957. for (const i11 of t12) {
  3958. const t13 = i11 ? i11.length : 0;
  3959. if (t13 > 1) {
  3960. let s13 = this.transformPt(i11[0]);
  3961. r19.moveTo(s13[0], s13[1]);
  3962. for (let e16 = 1; e16 < t13; e16++)
  3963. s13 = this.transformPt(i11[e16]), r19.lineTo(s13[0], s13[1]);
  3964. e15 && r19.closePath();
  3965. }
  3966. }
  3967. }
  3968. _setCapStyle(t12) {
  3969. switch (t12) {
  3970. case U.Butt:
  3971. this._ctx.lineCap = "butt";
  3972. break;
  3973. case U.Round:
  3974. this._ctx.lineCap = "round";
  3975. break;
  3976. case U.Square:
  3977. this._ctx.lineCap = "square";
  3978. }
  3979. }
  3980. _setJoinStyle(t12) {
  3981. switch (t12) {
  3982. case w.Bevel:
  3983. this._ctx.lineJoin = "bevel";
  3984. break;
  3985. case w.Round:
  3986. this._ctx.lineJoin = "round";
  3987. break;
  3988. case w.Miter:
  3989. this._ctx.lineJoin = "miter";
  3990. }
  3991. }
  3992. };
  3993. function K2(t12, e15) {
  3994. const r19 = e15[0] - t12[0], i11 = e15[1] - t12[1];
  3995. return 180 / Math.PI * Math.atan2(i11, r19);
  3996. }
  3997. var Q = (t12) => t12 ? { spatialReference: t12.spatialReference, rings: [[[t12.xmin, t12.ymin], [t12.xmin, t12.ymax], [t12.xmax, t12.ymax], [t12.xmax, t12.ymin], [t12.xmin, t12.ymin]]] } : null;
  3998. var Z2 = (t12) => {
  3999. switch (t12) {
  4000. case "Left":
  4001. return e5.Left;
  4002. case "Right":
  4003. return e5.Right;
  4004. case "Center":
  4005. return e5.Center;
  4006. case "Justify":
  4007. return N2.warnOnce("Horizontal alignment 'justify' is not implemented. Falling back to 'center'."), e5.Center;
  4008. }
  4009. };
  4010. var $ = (t12) => {
  4011. switch (t12) {
  4012. case "Top":
  4013. return t3.Top;
  4014. case "Center":
  4015. return t3.Center;
  4016. case "Bottom":
  4017. return t3.Bottom;
  4018. case "Baseline":
  4019. return t3.Baseline;
  4020. }
  4021. };
  4022. var tt = (t12, e15, r19) => {
  4023. switch (t12) {
  4024. case "ExtraLeading":
  4025. return 1 + e15 / r19;
  4026. case "Multiple":
  4027. return e15;
  4028. case "Exact":
  4029. return e15 / r19;
  4030. }
  4031. };
  4032. function et(t12, r19 = 1) {
  4033. const i11 = g2(t12), s13 = S(t12.fontStyleName), o12 = a3(t12.fontFamilyName), { weight: n17, style: a15 } = s13, l12 = r19 * (t12.height || 5), h8 = w3(t12.horizontalAlignment), c12 = x(t12.verticalAlignment), m9 = k2(t12), f9 = P2(t12.haloSymbol), u15 = f9 ? r19 * (0 | t12.haloSize) : 0;
  4034. return { color: m9, size: l12, horizontalAlignment: h8, verticalAlignment: c12, font: { family: o12, style: I(a15), weight: h2(n17), decoration: i11 }, halo: { size: u15 || 0, color: f9, style: a15 }, pixelRatio: 1, premultiplyColors: true };
  4035. }
  4036. var rt = 1e-4;
  4037. function it(t12) {
  4038. let e15, r19, i11, s13, o12, n17 = t12[0], a15 = 1;
  4039. for (; a15 < t12.length; )
  4040. e15 = t12[a15][0] - n17[0], r19 = t12[a15][1] - n17[1], s13 = 0 !== e15 ? r19 / e15 : Math.PI / 2, void 0 !== i11 && s13 - i11 <= rt ? (t12.splice(a15 - 1, 1), n17 = o12) : (o12 = n17, n17 = t12[a15], a15++), i11 = s13;
  4041. }
  4042. // node_modules/@arcgis/core/views/2d/arcade/callExpressionWithFeature.js
  4043. function i9(e15, o12, n17, a15, s13) {
  4044. if (t(e15))
  4045. return null;
  4046. const i11 = e15.referencesGeometry() && s13 ? c9(o12, a15, s13) : o12, u15 = e15.repurposeFeature(i11);
  4047. try {
  4048. return e15.evaluate({ ...n17, $feature: u15 });
  4049. } catch (m9) {
  4050. return s.getLogger("esri.views.2d.support.arcadeOnDemand").warn("Feature arcade evaluation failed:", m9), null;
  4051. }
  4052. }
  4053. var u13 = /* @__PURE__ */ new Map();
  4054. function c9(e15, r19, t12) {
  4055. const { transform: o12, hasZ: n17, hasM: a15 } = t12;
  4056. u13.has(r19) || u13.set(r19, m7(r19));
  4057. const s13 = u13.get(r19)(e15.geometry, o12, n17, a15);
  4058. return { ...e15, geometry: s13 };
  4059. }
  4060. function m7(t12) {
  4061. const i11 = {};
  4062. switch (t12) {
  4063. case "esriGeometryPoint":
  4064. return (e15, r19, t13, o12) => v(r19, i11, e15, t13, o12);
  4065. case "esriGeometryPolygon":
  4066. return (e15, r19, t13, o12) => B(r19, i11, e15, t13, o12);
  4067. case "esriGeometryPolyline":
  4068. return (e15, r19, t13, o12) => C(r19, i11, e15, t13, o12);
  4069. case "esriGeometryMultipoint":
  4070. return (e15, r19, t13, n17) => q(r19, i11, e15, t13, n17);
  4071. default:
  4072. return s.getLogger("esri.views.2d.support.arcadeOnDemand").error(new s2("mapview-arcade", `Unable to handle geometryType: ${t12}`)), (e15) => e15;
  4073. }
  4074. }
  4075. // node_modules/@arcgis/core/symbols/cim/CIMSymbolHelper.js
  4076. var Y3 = Math.PI;
  4077. var $2 = Y3 / 2;
  4078. var U3 = 4;
  4079. var q4 = 10;
  4080. var W2 = 96 / 72;
  4081. var J2 = Math.PI / 180;
  4082. var K3 = s.getLogger("esri.symbols.cim.CIMSymbolHelper");
  4083. function Q2(e15) {
  4084. if (!e15 || !e15.type)
  4085. return null;
  4086. let t12;
  4087. switch (e15.type) {
  4088. case "cim":
  4089. return e15.data;
  4090. case "web-style":
  4091. return e15;
  4092. case "simple-marker":
  4093. t12 = oe2.fromSimpleMarker(e15);
  4094. break;
  4095. case "picture-marker":
  4096. t12 = oe2.fromPictureMarker(e15);
  4097. break;
  4098. case "simple-line":
  4099. t12 = oe2.fromSimpleLineSymbol(e15);
  4100. break;
  4101. case "simple-fill":
  4102. t12 = oe2.fromSimpleFillSymbol(e15);
  4103. break;
  4104. case "picture-fill":
  4105. t12 = oe2.fromPictureFillSymbol(e15);
  4106. break;
  4107. case "text":
  4108. t12 = oe2.fromTextSymbol(e15);
  4109. }
  4110. return { type: "CIMSymbolReference", symbol: t12 };
  4111. }
  4112. function Z3(e15, t12, r19) {
  4113. switch (t12.type) {
  4114. case "CIMSymbolReference":
  4115. return Z3(e15, t12.symbol, r19);
  4116. case "CIMPointSymbol":
  4117. null == r19 && (r19 = { x: 0, y: 0 }), e15.drawSymbol(t12, r19);
  4118. break;
  4119. case "CIMLineSymbol":
  4120. null == r19 && (r19 = { paths: [[[0, 0], [10, 0]]] }), e15.drawSymbol(t12, r19);
  4121. break;
  4122. case "CIMPolygonSymbol":
  4123. null == r19 && (r19 = { rings: [[[0, 0], [0, 10], [10, 10], [10, 0], [0, 0]]] }), e15.drawSymbol(t12, r19);
  4124. break;
  4125. case "CIMTextSymbol": {
  4126. const r20 = { x: 0, y: 0 };
  4127. e15.drawSymbol(t12, r20);
  4128. break;
  4129. }
  4130. case "CIMVectorMarker": {
  4131. const r20 = new t7();
  4132. e15.drawMarker(t12, r20);
  4133. break;
  4134. }
  4135. }
  4136. return e15.envelope();
  4137. }
  4138. function ee(e15) {
  4139. if (!e15)
  4140. return 0;
  4141. switch (e15.type) {
  4142. case "CIMMarkerPlacementAlongLineSameSize":
  4143. case "CIMMarkerPlacementAlongLineRandomSize":
  4144. case "CIMMarkerPlacementAtExtremities":
  4145. case "CIMMarkerPlacementAtMeasuredUnits":
  4146. case "CIMMarkerPlacementAtRatioPositions":
  4147. case "CIMMarkerPlacementOnLine":
  4148. case "CIMMarkerPlacementOnVertices":
  4149. return Math.abs(e15.offset);
  4150. default:
  4151. return 0;
  4152. }
  4153. }
  4154. function te(e15) {
  4155. if (!e15)
  4156. return 0;
  4157. switch (e15.type) {
  4158. case "CIMGeometricEffectArrow":
  4159. return Math.abs(0.5 * e15.width);
  4160. case "CIMGeometricEffectBuffer":
  4161. return Math.abs(e15.size);
  4162. case "CIMGeometricEffectExtension":
  4163. case "CIMGeometricEffectRadial":
  4164. return Math.abs(e15.length);
  4165. case "CIMGeometricEffectJog":
  4166. return Math.abs(0.5 * e15.length);
  4167. case "CIMGeometricEffectMove":
  4168. return Math.max(Math.abs(b(e15.offsetX)), Math.abs(b(e15.offsetY)));
  4169. case "CIMGeometricEffectOffset":
  4170. case "CIMGeometricEffectOffsetTangent":
  4171. return Math.abs(e15.offset);
  4172. case "CIMGeometricEffectRegularPolygon":
  4173. return Math.abs(e15.radius);
  4174. case "CIMGeometricEffectRotate":
  4175. case "CIMGeometricEffectScale":
  4176. default:
  4177. return 0;
  4178. case "CIMGeometricEffectTaperedPolygon":
  4179. return 0.5 * Math.max(Math.abs(e15.fromWidth), Math.abs(e15.toWidth));
  4180. case "CIMGeometricEffectWave":
  4181. return Math.abs(e15.amplitude);
  4182. }
  4183. }
  4184. function re(e15) {
  4185. if (!e15)
  4186. return 0;
  4187. let t12 = 0;
  4188. for (const r19 of e15)
  4189. t12 += te(r19);
  4190. return t12;
  4191. }
  4192. var ae = class {
  4193. getSymbolInflateSize(e15, t12, r19, a15, o12) {
  4194. return e15 || (e15 = [0, 0, 0, 0]), t12 ? this._getInflateSize(e15, t12, r19, a15, o12) : e15;
  4195. }
  4196. static safeSize(e15) {
  4197. const t12 = Math.max(Math.abs(e15[0]), Math.abs(e15[2])), r19 = Math.max(Math.abs(e15[1]), Math.abs(e15[3]));
  4198. return Math.sqrt(t12 * t12 + r19 * r19);
  4199. }
  4200. _vectorMarkerBounds(e15, t12, r19, a15) {
  4201. let o12 = true;
  4202. const i11 = u3();
  4203. if (t12 && t12.markerGraphics)
  4204. for (const s13 of t12.markerGraphics) {
  4205. const t13 = [0, 0, 0, 0];
  4206. s13.geometry && (c2(i11, s13.geometry), t13[0] = 0, t13[1] = 0, t13[2] = 0, t13[3] = 0, this.getSymbolInflateSize(t13, s13.symbol, r19, 0, a15), i11[0] += t13[0], i11[1] += t13[1], i11[2] += t13[2], i11[3] += t13[3], o12 ? (e15[0] = i11[0], e15[1] = i11[1], e15[2] = i11[2], e15[3] = i11[3], o12 = false) : (e15[0] = Math.min(e15[0], i11[0]), e15[1] = Math.min(e15[1], i11[1]), e15[2] = Math.max(e15[2], i11[2]), e15[3] = Math.max(e15[3], i11[3])));
  4207. }
  4208. return e15;
  4209. }
  4210. _getInflateSize(e15, t12, r19, a15, o12) {
  4211. if (ue(t12)) {
  4212. const i11 = this._getLayersInflateSize(e15, t12.symbolLayers, r19, a15, o12), s13 = re(t12.effects);
  4213. return s13 > 0 && (i11[0] -= s13, i11[1] -= s13, i11[2] += s13, i11[3] += s13), i11;
  4214. }
  4215. return this._getTextInflatedSize(e15, t12, o12);
  4216. }
  4217. _getLayersInflateSize(e15, t12, r19, a15, i11) {
  4218. let s13 = true;
  4219. if (!t12)
  4220. return e15;
  4221. for (const n17 of t12) {
  4222. if (!n17)
  4223. continue;
  4224. let t13 = [0, 0, 0, 0];
  4225. switch (n17.type) {
  4226. case "CIMSolidFill":
  4227. case "CIMPictureFill":
  4228. case "CIMHatchFill":
  4229. case "CIMGradientFill":
  4230. break;
  4231. case "CIMSolidStroke":
  4232. case "CIMPictureStroke":
  4233. case "CIMGradientStroke": {
  4234. const e16 = n17;
  4235. let r20 = e16.width;
  4236. e16.capStyle === U.Square || e16.joinStyle === w.Miter ? r20 /= 1.4142135623730951 : r20 /= 2, t13[0] = -r20, t13[1] = -r20, t13[2] = r20, t13[3] = r20;
  4237. break;
  4238. }
  4239. case "CIMCharacterMarker":
  4240. case "CIMVectorMarker":
  4241. case "CIMPictureMarker": {
  4242. const e16 = n17;
  4243. if ("CIMVectorMarker" === n17.type) {
  4244. const e17 = n17;
  4245. if (t13 = this._vectorMarkerBounds(t13, e17, r19, i11), e17.frame) {
  4246. const r20 = (e17.frame.xmin + e17.frame.xmax) / 2, a16 = (e17.frame.ymin + e17.frame.ymax) / 2;
  4247. t13[0] -= r20, t13[1] -= a16, t13[2] -= r20, t13[3] -= a16;
  4248. const o12 = e17.size / (e17.frame.ymax - e17.frame.ymin);
  4249. t13[0] *= o12, t13[1] *= o12, t13[2] *= o12, t13[3] *= o12;
  4250. }
  4251. } else if ("CIMPictureMarker" === n17.type) {
  4252. const a16 = n17, i12 = r19.getResource(a16.url);
  4253. let s15 = 1;
  4254. r(i12) && i12.height && (s15 = i12.width / i12.height);
  4255. const l14 = e16.size / 2, c12 = e16.size * s15 * a16.scaleX / 2;
  4256. t13 = [-c12, -l14, c12, l14];
  4257. } else {
  4258. const r20 = e16.size / 2;
  4259. t13 = [-r20, -r20, r20, r20];
  4260. }
  4261. if (e16.anchorPoint) {
  4262. let r20, a16;
  4263. "Absolute" === e16.anchorPointUnits ? (r20 = e16.anchorPoint.x, a16 = e16.anchorPoint.y) : (r20 = e16.anchorPoint.x * (t13[2] - t13[0]), a16 = e16.anchorPoint.y * (t13[3] - t13[1])), t13[0] -= r20, t13[1] -= a16, t13[2] -= r20, t13[3] -= a16;
  4264. }
  4265. let s14 = b(e16.rotation);
  4266. if (e16.rotateClockwise && (s14 = -s14), a15 && (s14 -= a15), s14) {
  4267. const e17 = J2 * s14, r20 = Math.cos(e17), a16 = Math.sin(e17), o12 = u3([n4, n4, -n4, -n4]);
  4268. m(o12, [t13[0] * r20 - t13[1] * a16, t13[0] * a16 + t13[1] * r20]), m(o12, [t13[0] * r20 - t13[3] * a16, t13[0] * a16 + t13[3] * r20]), m(o12, [t13[2] * r20 - t13[1] * a16, t13[2] * a16 + t13[1] * r20]), m(o12, [t13[2] * r20 - t13[3] * a16, t13[2] * a16 + t13[3] * r20]), t13 = o12;
  4269. }
  4270. let l13 = b(e16.offsetX), m9 = b(e16.offsetY);
  4271. if (a15) {
  4272. const e17 = J2 * a15, t14 = Math.cos(e17), r20 = Math.sin(e17), o12 = l13 * r20 + m9 * t14;
  4273. l13 = l13 * t14 - m9 * r20, m9 = o12;
  4274. }
  4275. t13[0] += l13, t13[1] += m9, t13[2] += l13, t13[3] += m9;
  4276. const y7 = ee(e16.markerPlacement);
  4277. y7 > 0 && (t13[0] -= y7, t13[1] -= y7, t13[2] += y7, t13[3] += y7);
  4278. break;
  4279. }
  4280. }
  4281. const l12 = re(n17.effects);
  4282. l12 > 0 && (t13[0] -= l12, t13[1] -= l12, t13[2] += l12, t13[3] += l12), s13 ? (e15[0] = t13[0], e15[1] = t13[1], e15[2] = t13[2], e15[3] = t13[3], s13 = false) : (e15[0] = Math.min(e15[0], t13[0]), e15[1] = Math.min(e15[1], t13[1]), e15[2] = Math.max(e15[2], t13[2]), e15[3] = Math.max(e15[3], t13[3]));
  4283. }
  4284. return e15;
  4285. }
  4286. _getTextInflatedSize(e15, r19, a15) {
  4287. var _a, _b;
  4288. const o12 = (_a = r19.height) != null ? _a : q4;
  4289. if (e15[0] = -o12 / 2, e15[1] = -o12 / 2, e15[2] = o12 / 2, e15[3] = o12 / 2, !a15)
  4290. return e15;
  4291. const i11 = a15.get(r19);
  4292. if (!i11)
  4293. return e15;
  4294. const { text: s13, mosaicItem: n17 } = i11;
  4295. if (!n17 || 0 === n17.glyphMosaicItems.length)
  4296. return e15;
  4297. const l12 = tt(r19.lineGapType, (_b = r19.lineGap) != null ? _b : 0, o12), c12 = n5(s13)[1], f9 = n17.glyphMosaicItems, m9 = j4(f9, c12, { scale: o12 / j, angle: b(r19.angle), xOffset: b(r19.offsetX), yOffset: b(r19.offsetY), hAlign: Z2(r19.horizontalAlignment), vAlign: $(r19.verticalAlignment), maxLineWidth: 512, lineHeight: f2 * Math.max(0.25, Math.min(l12 || 1, 4)), decoration: r19.font.decoration || "none", isCIM: true }).boundsT;
  4298. return e15[0] = m9.x - m9.halfWidth, e15[1] = -m9.y - m9.halfHeight, e15[2] = m9.x + m9.halfWidth, e15[3] = -m9.y + m9.halfHeight, e15;
  4299. }
  4300. };
  4301. var oe2 = class {
  4302. static getEnvelope(e15, t12, r19) {
  4303. const a15 = new q3(r19);
  4304. if (Array.isArray(e15)) {
  4305. let r20;
  4306. for (const o12 of e15)
  4307. r20 ? r20.union(Z3(a15, o12, t12)) : r20 = Z3(a15, o12, t12);
  4308. return r20;
  4309. }
  4310. return Z3(a15, e15, t12);
  4311. }
  4312. static getTextureAnchor(e15, t12) {
  4313. const r19 = this.getEnvelope(e15, null, t12);
  4314. if (!r19)
  4315. return [0, 0, 0];
  4316. const a15 = (r19.x + 0.5 * r19.width) * W2, o12 = (r19.y + 0.5 * r19.height) * W2, i11 = r19.width * W2 + 2, s13 = r19.height * W2 + 2;
  4317. return [-a15 / i11, -o12 / s13, s13];
  4318. }
  4319. static rasterize(e15, t12, r19, a15, o12 = true) {
  4320. const i11 = r19 || this.getEnvelope(t12, null, a15);
  4321. if (!i11)
  4322. return [null, 0, 0, 0, 0];
  4323. const s13 = (i11.x + 0.5 * i11.width) * W2, n17 = (i11.y + 0.5 * i11.height) * W2;
  4324. e15.width = i11.width * W2, e15.height = i11.height * W2, r19 || (e15.width += 2, e15.height += 2);
  4325. const l12 = e15.getContext("2d"), c12 = O2.createScale(W2, -W2);
  4326. c12.translate(0.5 * e15.width - s13, 0.5 * e15.height + n17);
  4327. const f9 = new W(l12, a15, c12);
  4328. switch (t12.type) {
  4329. case "CIMPointSymbol": {
  4330. const e16 = { type: "point", x: 0, y: 0 };
  4331. f9.drawSymbol(t12, e16);
  4332. break;
  4333. }
  4334. case "CIMVectorMarker": {
  4335. const e16 = new t7();
  4336. f9.drawMarker(t12, e16);
  4337. break;
  4338. }
  4339. }
  4340. const m9 = l12.getImageData(0, 0, e15.width, e15.height), y7 = new Uint8Array(m9.data);
  4341. if (o12) {
  4342. let e16;
  4343. for (let t13 = 0; t13 < y7.length; t13 += 4)
  4344. e16 = y7[t13 + 3] / 255, y7[t13] = y7[t13] * e16, y7[t13 + 1] = y7[t13 + 1] * e16, y7[t13 + 2] = y7[t13 + 2] * e16;
  4345. }
  4346. return [y7, e15.width, e15.height, -s13 / e15.width, -n17 / e15.height];
  4347. }
  4348. static fromTextSymbol(e15) {
  4349. const { angle: r19, color: a15, font: o12, haloColor: i11, haloSize: s13, horizontalAlignment: n17, kerning: l12, text: c12, verticalAlignment: f9, xoffset: m9, yoffset: y7 } = e15;
  4350. let h8, p6, u15, M4, d4;
  4351. o12 && (h8 = o12.family, p6 = o12.style, u15 = o12.weight, M4 = o12.size, d4 = o12.decoration);
  4352. let S2 = false;
  4353. if (c12) {
  4354. S2 = n5(c12)[1];
  4355. }
  4356. return { type: "CIMPointSymbol", symbolLayers: [{ type: "CIMVectorMarker", enable: true, anchorPointUnits: "Relative", dominantSizeAxis3D: "Y", size: 10, billboardMode3D: "FaceNearPlane", frame: { xmin: -5, ymin: -5, xmax: 5, ymax: 5 }, markerGraphics: [{ type: "CIMMarkerGraphic", geometry: { x: 0, y: 0 }, symbol: { type: "CIMTextSymbol", angle: r19, blockProgression: C3.BTT, depth3D: 1, extrapolateBaselines: true, fontEffects: l3.Normal, fontEncoding: a.Unicode, fontFamilyName: h8 || "Arial", fontStyleName: me(p6, u15), fontType: u5.Unspecified, haloSize: s13, height: M4, hinting: y3.Default, horizontalAlignment: le(n17 != null ? n17 : "center"), kerning: l12, letterWidth: 100, ligatures: true, lineGapType: "Multiple", offsetX: b(m9), offsetY: b(y7), strikethrough: "line-through" === d4, underline: "underline" === d4, symbol: { type: "CIMPolygonSymbol", symbolLayers: [{ type: "CIMSolidFill", enable: true, color: fe(a15) }] }, haloSymbol: { type: "CIMPolygonSymbol", symbolLayers: [{ type: "CIMSolidFill", enable: true, color: fe(i11) }] }, shadowColor: [0, 0, 0, 255], shadowOffsetX: 1, shadowOffsetY: 1, textCase: "Normal", textDirection: S2 ? ne.RTL : ne.LTR, verticalAlignment: ce(f9 != null ? f9 : "baseline"), verticalGlyphOrientation: oe.Right, wordSpacing: 100, billboardMode3D: m2.FaceNearPlane }, textString: c12 }], scaleSymbolsProportionally: true, respectFrame: true }], scaleX: 1, angleAlignment: "Display" };
  4357. }
  4358. static fromPictureFillSymbol(e15) {
  4359. const { height: t12, outline: r19, width: a15, xoffset: o12, xscale: i11, yoffset: s13, yscale: n17 } = e15, l12 = [], c12 = { type: "CIMPolygonSymbol", symbolLayers: l12 };
  4360. if (r19) {
  4361. const { cap: e16, join: t13, miterLimit: a16, width: o13 } = r19;
  4362. l12.push({ type: "CIMSolidStroke", color: fe(r19.color), capStyle: se(e16), joinStyle: ne2(t13), miterLimit: a16, width: o13 });
  4363. }
  4364. let f9 = e15.url;
  4365. "esriPFS" === e15.type && e15.imageData && (f9 = e15.imageData);
  4366. const m9 = "angle" in e15 ? e15.angle : 0, y7 = a15 * (i11 || 1), h8 = t12 * (n17 || 1);
  4367. return l12.push({ type: "CIMPictureFill", invertBackfaceTexture: false, scaleX: 1, textureFilter: ie.Picture, tintColor: null, url: f9, height: h8, width: y7, offsetX: b(o12), offsetY: b(s13), rotation: b(-m9), colorSubstitutions: null }), c12;
  4368. }
  4369. static fromSimpleFillSymbol(e15) {
  4370. const { color: t12, style: a15, outline: o12 } = e15, i11 = [], s13 = { type: "CIMPolygonSymbol", symbolLayers: i11 };
  4371. let n17 = null;
  4372. if (o12) {
  4373. const { cap: e16, join: t13, style: r19 } = o12;
  4374. "solid" !== r19 && "none" !== r19 && "esriSLSSolid" !== r19 && "esriSLSNull" !== r19 && (n17 = [{ type: "CIMGeometricEffectDashes", dashTemplate: pe(r19, e16), lineDashEnding: "NoConstraint", scaleDash: true, offsetAlongLine: null }]), i11.push({ type: "CIMSolidStroke", color: fe(o12.color), capStyle: se(e16), joinStyle: ne2(t13), miterLimit: o12.miterLimit, width: o12.width, effects: n17 });
  4375. }
  4376. if (a15 && "solid" !== a15 && "none" !== a15 && "esriSFSSolid" !== a15 && "esriSFSNull" !== a15) {
  4377. const e16 = { type: "CIMLineSymbol", symbolLayers: [{ type: "CIMSolidStroke", color: fe(t12), capStyle: U.Butt, joinStyle: w.Miter, width: 0.75 }] };
  4378. let o13 = 0;
  4379. const s14 = e3(de(a15) ? 8 : 10);
  4380. switch (a15) {
  4381. case "vertical":
  4382. case "esriSFSVertical":
  4383. o13 = 90;
  4384. break;
  4385. case "forward-diagonal":
  4386. case "esriSFSForwardDiagonal":
  4387. case "diagonal-cross":
  4388. case "esriSFSDiagonalCross":
  4389. o13 = -45;
  4390. break;
  4391. case "backward-diagonal":
  4392. case "esriSFSBackwardDiagonal":
  4393. o13 = 45;
  4394. break;
  4395. case "cross":
  4396. case "esriSFSCross":
  4397. o13 = 0;
  4398. }
  4399. i11.push({ type: "CIMHatchFill", lineSymbol: e16, offsetX: 0, offsetY: 0, rotation: o13, separation: s14 }), "cross" === a15 || "esriSFSCross" === a15 ? i11.push({ type: "CIMHatchFill", lineSymbol: y(e16), offsetX: 0, offsetY: 0, rotation: 90, separation: s14 }) : "diagonal-cross" !== a15 && "esriSFSDiagonalCross" !== a15 || i11.push({ type: "CIMHatchFill", lineSymbol: y(e16), offsetX: 0, offsetY: 0, rotation: 45, separation: s14 });
  4400. } else
  4401. !a15 || "solid" !== a15 && "esriSFSSolid" !== a15 || i11.push({ type: "CIMSolidFill", enable: true, color: fe(t12) });
  4402. return s13;
  4403. }
  4404. static fromSimpleLineSymbol(e15) {
  4405. const { cap: t12, color: r19, join: a15, marker: o12, miterLimit: i11, style: s13, width: n17 } = e15;
  4406. let l12 = null;
  4407. "solid" !== s13 && "none" !== s13 && "esriSLSSolid" !== s13 && "esriSLSNull" !== s13 && (l12 = [{ type: "CIMGeometricEffectDashes", dashTemplate: pe(s13, t12), lineDashEnding: "NoConstraint", scaleDash: true, offsetAlongLine: null }]);
  4408. const c12 = [];
  4409. if (o12) {
  4410. let e16;
  4411. switch (o12.placement) {
  4412. case "begin-end":
  4413. e16 = o3.Both;
  4414. break;
  4415. case "begin":
  4416. e16 = o3.JustBegin;
  4417. break;
  4418. case "end":
  4419. e16 = o3.JustEnd;
  4420. break;
  4421. default:
  4422. e16 = o3.None;
  4423. }
  4424. const t13 = oe2.fromSimpleMarker(o12, n17, r19).symbolLayers[0];
  4425. t13.markerPlacement = { type: "CIMMarkerPlacementAtExtremities", angleToLine: true, offset: 0, extremityPlacement: e16, offsetAlongLine: 0 }, c12.push(t13);
  4426. }
  4427. return "none" !== s13 && "esriSLSNull" !== s13 && c12.push({ type: "CIMSolidStroke", color: fe(r19), capStyle: se(t12), joinStyle: ne2(a15), miterLimit: i11, width: n17, effects: l12 }), { type: "CIMLineSymbol", symbolLayers: c12 };
  4428. }
  4429. static fromPictureMarker(e15) {
  4430. const { angle: t12, height: r19, width: a15, xoffset: o12, yoffset: i11 } = e15;
  4431. let s13 = e15.url;
  4432. return "esriPMS" === e15.type && e15.imageData && (s13 = e15.imageData), { type: "CIMPointSymbol", symbolLayers: [{ type: "CIMPictureMarker", invertBackfaceTexture: false, scaleX: 1, textureFilter: ie.Picture, tintColor: null, url: s13, size: r19, width: a15, offsetX: b(o12), offsetY: b(i11), rotation: b(-t12) }] };
  4433. }
  4434. static fromSimpleMarker(e15, t12, r19) {
  4435. var _a;
  4436. const { style: a15 } = e15, o12 = (_a = e15.color) != null ? _a : r19;
  4437. if ("path" === a15) {
  4438. const t13 = [];
  4439. if ("outline" in e15 && e15.outline) {
  4440. const r21 = e15.outline;
  4441. t13.push({ type: "CIMSolidStroke", enable: true, width: u4(Math.round(e3(r21.width))), color: fe(r21.color) });
  4442. }
  4443. t13.push({ type: "CIMSolidFill", enable: true, color: fe(o12), path: e15.path });
  4444. const [r20, a16] = Me("square");
  4445. return { type: "CIMPointSymbol", symbolLayers: [{ type: "CIMVectorMarker", enable: true, rotation: b(-e15.angle), size: b(e15.size || 6), offsetX: b(e15.xoffset), offsetY: b(e15.yoffset), frame: r20, markerGraphics: [{ type: "CIMMarkerGraphic", geometry: a16, symbol: { type: "CIMPolygonSymbol", symbolLayers: t13 } }] }] };
  4446. }
  4447. const [i11, s13] = Me(a15);
  4448. let c12;
  4449. if (s13 && i11) {
  4450. const r20 = [];
  4451. if ("outline" in e15 && e15.outline) {
  4452. const t13 = e15.outline;
  4453. r20.push({ type: "CIMSolidStroke", enable: true, width: t13.width > 0.667 ? u4(Math.round(e3(t13.width))) : t13.width, color: fe(t13.color) });
  4454. } else
  4455. !t12 || "line-marker" !== e15.type || "cross" !== e15.style && "x" !== e15.style || r20.push({ type: "CIMSolidStroke", enable: true, width: t12, color: fe(o12) });
  4456. r20.push({ type: "CIMSolidFill", enable: true, color: fe(o12) });
  4457. const a16 = { type: "CIMPolygonSymbol", symbolLayers: r20 };
  4458. c12 = { type: "CIMPointSymbol", symbolLayers: [{ type: "CIMVectorMarker", enable: true, rotation: b(-e15.angle), size: b(e15.size || 6 * t12), offsetX: b(e15.xoffset), offsetY: b(e15.yoffset), frame: i11, markerGraphics: [{ type: "CIMMarkerGraphic", geometry: s13, symbol: a16 }] }] };
  4459. }
  4460. return c12;
  4461. }
  4462. static fromCIMHatchFill(e15, t12) {
  4463. var _a;
  4464. const a15 = t12 * ((_a = e15.separation) != null ? _a : U3), o12 = a15 / 2, i11 = 4, s13 = y(e15.lineSymbol);
  4465. let n17 = this._getLineSymbolPeriod(s13) || i11;
  4466. for (; n17 < i11; )
  4467. n17 *= 2;
  4468. const l12 = n17 / 2, c12 = { xmin: -l12, xmax: l12, ymin: -o12, ymax: o12 }, f9 = s13.symbolLayers.find((e16) => "CIMSolidStroke" === e16.type);
  4469. f9 && (f9.width *= t12);
  4470. return { type: "CIMVectorMarker", frame: c12, markerGraphics: [{ type: "CIMMarkerGraphic", geometry: { paths: [[[-l12, 0], [l12, 0]]] }, symbol: s13 }], size: a15 };
  4471. }
  4472. static fetchResources(e15, t12, r19) {
  4473. if (e15 && t12)
  4474. switch (e15.type) {
  4475. case "CIMPointSymbol":
  4476. case "CIMLineSymbol":
  4477. case "CIMPolygonSymbol": {
  4478. const a15 = e15.symbolLayers;
  4479. if (!a15)
  4480. return;
  4481. for (const e16 of a15)
  4482. switch (Ce(e16, t12, r19), e16.type) {
  4483. case "CIMPictureFill":
  4484. case "CIMHatchFill":
  4485. case "CIMGradientFill":
  4486. case "CIMPictureStroke":
  4487. case "CIMGradientStroke":
  4488. case "CIMCharacterMarker":
  4489. case "CIMPictureMarker":
  4490. "url" in e16 && e16.url && r19.push(t12.fetchResource(e16.url, null));
  4491. break;
  4492. case "CIMVectorMarker": {
  4493. const a16 = e16.markerGraphics;
  4494. if (!a16)
  4495. continue;
  4496. for (const e17 of a16)
  4497. if (e17) {
  4498. const a17 = e17.symbol;
  4499. a17 && oe2.fetchResources(a17, t12, r19);
  4500. }
  4501. }
  4502. }
  4503. }
  4504. }
  4505. }
  4506. static _getLineSymbolPeriod(e15) {
  4507. if (e15) {
  4508. const t12 = this._getEffectsRepeat(e15.effects);
  4509. if (t12)
  4510. return t12;
  4511. if (e15.symbolLayers) {
  4512. for (const r19 of e15.symbolLayers)
  4513. if (r19) {
  4514. const e16 = this._getEffectsRepeat(r19.effects);
  4515. if (e16)
  4516. return e16;
  4517. switch (r19.type) {
  4518. case "CIMCharacterMarker":
  4519. case "CIMPictureMarker":
  4520. case "CIMVectorMarker":
  4521. case "CIMObjectMarker3D":
  4522. case "CIMglTFMarker3D": {
  4523. const e17 = this._getPlacementRepeat(r19.markerPlacement);
  4524. if (e17)
  4525. return e17;
  4526. }
  4527. }
  4528. }
  4529. }
  4530. }
  4531. return 0;
  4532. }
  4533. static _getEffectsRepeat(e15) {
  4534. if (e15) {
  4535. for (const t12 of e15)
  4536. if (t12)
  4537. switch (t12.type) {
  4538. case "CIMGeometricEffectDashes": {
  4539. const e16 = t12.dashTemplate;
  4540. if (e16 && e16.length) {
  4541. let t13 = 0;
  4542. for (const r19 of e16)
  4543. t13 += r19;
  4544. return 1 & e16.length && (t13 *= 2), t13;
  4545. }
  4546. break;
  4547. }
  4548. case "CIMGeometricEffectWave":
  4549. return t12.period;
  4550. default:
  4551. K3.error(`unsupported geometric effect type ${t12.type}`);
  4552. }
  4553. }
  4554. return 0;
  4555. }
  4556. static _getPlacementRepeat(e15) {
  4557. if (e15)
  4558. switch (e15.type) {
  4559. case "CIMMarkerPlacementAlongLineSameSize":
  4560. case "CIMMarkerPlacementAlongLineRandomSize":
  4561. case "CIMMarkerPlacementAlongLineVariableSize": {
  4562. const t12 = e15.placementTemplate;
  4563. if (t12 && t12.length) {
  4564. let e16 = 0;
  4565. for (const r19 of t12)
  4566. e16 += r19;
  4567. return 1 & t12.length && (e16 *= 2), e16;
  4568. }
  4569. break;
  4570. }
  4571. }
  4572. return 0;
  4573. }
  4574. static fromCIMInsidePolygon(e15) {
  4575. var _a;
  4576. const t12 = e15.markerPlacement, r19 = { type: e15.type, ...e15 };
  4577. r19.markerPlacement = null, r19.anchorPoint = null;
  4578. const a15 = Math.abs(t12.stepX), o12 = Math.abs(t12.stepY), i11 = ((_a = t12.randomness) != null ? _a : 100) / 100;
  4579. let n17, c12, f9, m9;
  4580. if ("Random" === t12.gridType) {
  4581. const e16 = e3(dt), r20 = Math.max(Math.floor(e16 / a15), 1), y7 = Math.max(Math.floor(e16 / o12), 1);
  4582. n17 = r20 * a15 / 2, c12 = y7 * o12 / 2, f9 = 2 * c12;
  4583. const h8 = new t2(t12.seed), p6 = i11 * a15 / 1.5, u15 = i11 * o12 / 1.5;
  4584. m9 = [];
  4585. for (let t13 = 0; t13 < r20; t13++)
  4586. for (let e17 = 0; e17 < y7; e17++) {
  4587. const r21 = t13 * a15 - n17 + p6 * (0.5 - h8.getFloat()), i12 = e17 * o12 - c12 + u15 * (0.5 - h8.getFloat());
  4588. m9.push({ x: r21, y: i12 }), 0 === t13 && m9.push({ x: r21 + 2 * n17, y: i12 }), 0 === e17 && m9.push({ x: r21, y: i12 + 2 * c12 });
  4589. }
  4590. } else
  4591. true === t12.shiftOddRows ? (n17 = a15 / 2, c12 = o12, f9 = 2 * o12, m9 = [{ x: -n17, y: 0 }, { x: n17, y: 0 }, { x: 0, y: c12 }, { x: 0, y: -c12 }]) : (n17 = a15 / 2, c12 = o12 / 2, f9 = o12, m9 = [{ x: -a15, y: 0 }, { x: 0, y: -o12 }, { x: -a15, y: -o12 }, { x: 0, y: 0 }, { x: a15, y: 0 }, { x: 0, y: o12 }, { x: a15, y: o12 }, { x: -a15, y: o12 }, { x: a15, y: -o12 }]);
  4592. return { type: "CIMVectorMarker", frame: { xmin: -n17, xmax: n17, ymin: -c12, ymax: c12 }, markerGraphics: m9.map((e16) => ({ type: "CIMMarkerGraphic", geometry: e16, symbol: { type: "CIMPointSymbol", symbolLayers: [r19] } })), size: f9 };
  4593. }
  4594. static getSize(e15) {
  4595. if (e15)
  4596. switch (e15.type) {
  4597. case "CIMTextSymbol":
  4598. return e15.height;
  4599. case "CIMPointSymbol": {
  4600. let t12 = 0;
  4601. if (e15.symbolLayers) {
  4602. for (const r19 of e15.symbolLayers)
  4603. if (r19)
  4604. switch (r19.type) {
  4605. case "CIMCharacterMarker":
  4606. case "CIMPictureMarker":
  4607. case "CIMVectorMarker":
  4608. case "CIMObjectMarker3D":
  4609. case "CIMglTFMarker3D": {
  4610. const e16 = r19.size;
  4611. e16 > t12 && (t12 = e16);
  4612. break;
  4613. }
  4614. }
  4615. }
  4616. return t12;
  4617. }
  4618. case "CIMLineSymbol":
  4619. case "CIMPolygonSymbol": {
  4620. let t12 = 0;
  4621. if (e15.symbolLayers) {
  4622. for (const r19 of e15.symbolLayers)
  4623. if (r19)
  4624. switch (r19.type) {
  4625. case "CIMSolidStroke":
  4626. case "CIMPictureStroke":
  4627. case "CIMGradientStroke": {
  4628. const e16 = r19.width;
  4629. e16 > t12 && (t12 = e16);
  4630. break;
  4631. }
  4632. case "CIMCharacterMarker":
  4633. case "CIMPictureMarker":
  4634. case "CIMVectorMarker":
  4635. case "CIMObjectMarker3D":
  4636. case "CIMglTFMarker3D":
  4637. if (m3(r19.markerPlacement)) {
  4638. const e16 = r19.size;
  4639. e16 > t12 && (t12 = e16);
  4640. }
  4641. }
  4642. }
  4643. return t12;
  4644. }
  4645. }
  4646. }
  4647. static getMarkerScaleRatio(e15) {
  4648. if (e15 && "CIMVectorMarker" === e15.type) {
  4649. if (false !== e15.scaleSymbolsProportionally && e15.frame) {
  4650. const t12 = e15.frame.ymax - e15.frame.ymin;
  4651. return e15.size / t12;
  4652. }
  4653. }
  4654. return 1;
  4655. }
  4656. };
  4657. var ie2 = class {
  4658. static findApplicableOverrides(e15, t12, r19) {
  4659. if (e15 && t12) {
  4660. if (e15.primitiveName) {
  4661. let a15 = false;
  4662. for (const t13 of r19)
  4663. if (t13.primitiveName === e15.primitiveName) {
  4664. a15 = true;
  4665. break;
  4666. }
  4667. if (!a15)
  4668. for (const o12 of t12)
  4669. o12.primitiveName === e15.primitiveName && r19.push(o12);
  4670. }
  4671. switch (e15.type) {
  4672. case "CIMPointSymbol":
  4673. case "CIMLineSymbol":
  4674. case "CIMPolygonSymbol":
  4675. if (e15.effects)
  4676. for (const a15 of e15.effects)
  4677. ie2.findApplicableOverrides(a15, t12, r19);
  4678. if (e15.symbolLayers)
  4679. for (const a15 of e15.symbolLayers)
  4680. ie2.findApplicableOverrides(a15, t12, r19);
  4681. break;
  4682. case "CIMTextSymbol":
  4683. break;
  4684. case "CIMSolidStroke":
  4685. case "CIMPictureStroke":
  4686. case "CIMGradientStroke":
  4687. case "CIMSolidFill":
  4688. case "CIMPictureFill":
  4689. case "CIMHatchFill":
  4690. case "CIMGradientFill":
  4691. case "CIMVectorMarker":
  4692. case "CIMCharacterMarker":
  4693. case "CIMPictureMarker":
  4694. if (e15.effects)
  4695. for (const a15 of e15.effects)
  4696. ie2.findApplicableOverrides(a15, t12, r19);
  4697. if (e15.markerPlacement && ie2.findApplicableOverrides(e15.markerPlacement, t12, r19), "CIMVectorMarker" === e15.type) {
  4698. if (e15.markerGraphics)
  4699. for (const a15 of e15.markerGraphics)
  4700. ie2.findApplicableOverrides(a15, t12, r19), ie2.findApplicableOverrides(a15.symbol, t12, r19);
  4701. } else
  4702. "CIMCharacterMarker" === e15.type ? ie2.findApplicableOverrides(e15.symbol, t12, r19) : "CIMHatchFill" === e15.type ? ie2.findApplicableOverrides(e15.lineSymbol, t12, r19) : "CIMPictureMarker" === e15.type && ie2.findApplicableOverrides(e15.animatedSymbolProperties, t12, r19);
  4703. }
  4704. }
  4705. }
  4706. static findEffectOverrides(e15, t12, r19) {
  4707. var _a;
  4708. if (!t12 || !e15)
  4709. return;
  4710. const a15 = e15.length;
  4711. for (let o12 = 0; o12 < a15; o12++) {
  4712. const a16 = (_a = e15[o12]) == null ? void 0 : _a.primitiveName;
  4713. if (a16) {
  4714. let e16 = false;
  4715. for (const t13 of r19)
  4716. if (t13.primitiveName === a16) {
  4717. e16 = true;
  4718. break;
  4719. }
  4720. if (!e16)
  4721. for (const o13 of t12)
  4722. o13.primitiveName === a16 && r19.push(o13);
  4723. }
  4724. }
  4725. }
  4726. static async resolveSymbolOverrides(e15, t12, a15, o12, i11, s13, n17) {
  4727. if (!e15 || !e15.symbol)
  4728. return null;
  4729. let { symbol: l12, primitiveOverrides: c12 } = e15;
  4730. const f9 = !!c12;
  4731. if (!f9 && !o12)
  4732. return l12;
  4733. l12 = y(l12);
  4734. let m9 = true;
  4735. if (t12 || (t12 = { attributes: {} }, m9 = false), f9) {
  4736. if (m9 || (c12 = c12.filter((e16) => {
  4737. var _a;
  4738. return !((_a = e16.valueExpressionInfo) == null ? void 0 : _a.expression.includes("$feature"));
  4739. })), n17 || (c12 = c12.filter((e16) => {
  4740. var _a;
  4741. return !((_a = e16.valueExpressionInfo) == null ? void 0 : _a.expression.includes("$view"));
  4742. })), c12.length > 0) {
  4743. const e16 = F(t12.attributes);
  4744. await ie2.evaluateOverrides(c12, t12, { spatialReference: a15, fields: e16, geometryType: i11 }, s13, n17);
  4745. }
  4746. ie2.applyOverrides(l12, c12);
  4747. }
  4748. return o12 && ie2.applyDictionaryTextOverrides(l12, t12, o12), l12;
  4749. }
  4750. static async evaluateOverrides(e15, t12, r19, a15, o12) {
  4751. if (!t12)
  4752. return;
  4753. let i11;
  4754. for (const s13 of e15) {
  4755. const e16 = s13.valueExpressionInfo;
  4756. if (e16 && r19) {
  4757. i11 || (i11 = []), s13.value = void 0;
  4758. const n17 = o6(e16.expression, r19.spatialReference, r19.fields).then((e17) => {
  4759. s13.value = i9(e17, t12, { $view: o12 }, r19.geometryType, a15);
  4760. });
  4761. i11.push(n17);
  4762. }
  4763. }
  4764. void 0 !== i11 && i11.length > 0 && await Promise.all(i11);
  4765. }
  4766. static applyDictionaryTextOverrides(e15, t12, r19, a15 = "Normal") {
  4767. if (e15 && e15.type)
  4768. switch (e15.type) {
  4769. case "CIMPointSymbol":
  4770. case "CIMLineSymbol":
  4771. case "CIMPolygonSymbol":
  4772. case "CIMTextSymbol":
  4773. {
  4774. const o12 = e15.symbolLayers;
  4775. if (!o12)
  4776. return;
  4777. for (const i11 of o12)
  4778. i11 && "CIMVectorMarker" === i11.type && ie2.applyDictionaryTextOverrides(i11, t12, r19, "CIMTextSymbol" === e15.type ? e15.textCase : a15);
  4779. }
  4780. break;
  4781. case "CIMVectorMarker":
  4782. {
  4783. const a16 = e15.markerGraphics;
  4784. if (!a16)
  4785. return;
  4786. for (const e16 of a16)
  4787. e16 && ie2.applyDictionaryTextOverrides(e16, t12, r19);
  4788. }
  4789. break;
  4790. case "CIMMarkerGraphic": {
  4791. const o12 = e15.textString;
  4792. if (o12 && o12.includes("[")) {
  4793. const i11 = i4(o12, r19);
  4794. e15.textString = l4(t12, i11, a15);
  4795. }
  4796. }
  4797. }
  4798. }
  4799. static applyOverrides(e15, t12, r19, a15) {
  4800. if (e15.primitiveName) {
  4801. for (const i11 of t12)
  4802. if (i11.primitiveName === e15.primitiveName) {
  4803. const t13 = Se(i11.propertyName);
  4804. if (a15 && a15.push({ cim: e15, nocapPropertyName: t13, value: e15[t13] }), i11.expression && (i11.value = ie2.toValue(i11.propertyName, i11.expression)), r19) {
  4805. let t14 = false;
  4806. for (const a16 of r19)
  4807. a16.primitiveName === e15.primitiveName && (t14 = true);
  4808. t14 || r19.push(i11);
  4809. }
  4810. r(i11.value) && (e15[t13] = i11.value);
  4811. }
  4812. }
  4813. switch (e15.type) {
  4814. case "CIMPointSymbol":
  4815. case "CIMLineSymbol":
  4816. case "CIMPolygonSymbol":
  4817. if (e15.effects)
  4818. for (const o12 of e15.effects)
  4819. ie2.applyOverrides(o12, t12, r19, a15);
  4820. if (e15.symbolLayers)
  4821. for (const o12 of e15.symbolLayers)
  4822. ie2.applyOverrides(o12, t12, r19, a15);
  4823. break;
  4824. case "CIMTextSymbol":
  4825. break;
  4826. case "CIMSolidStroke":
  4827. case "CIMSolidFill":
  4828. case "CIMVectorMarker":
  4829. if (e15.effects)
  4830. for (const o12 of e15.effects)
  4831. ie2.applyOverrides(o12, t12, r19, a15);
  4832. if ("CIMVectorMarker" === e15.type && e15.markerGraphics)
  4833. for (const o12 of e15.markerGraphics)
  4834. ie2.applyOverrides(o12, t12, r19, a15), ie2.applyOverrides(o12.symbol, t12, r19, a15);
  4835. }
  4836. }
  4837. static restoreOverrides(e15) {
  4838. for (const t12 of e15)
  4839. t12.cim[t12.nocapPropertyName] = t12.value;
  4840. }
  4841. static buildOverrideKey(e15) {
  4842. let t12 = "";
  4843. for (const r19 of e15)
  4844. void 0 !== r19.value && (t12 += `${r19.primitiveName}${r19.propertyName}${JSON.stringify(r19.value)}`);
  4845. return t12;
  4846. }
  4847. static toValue(t12, r19) {
  4848. if ("DashTemplate" === t12)
  4849. return r19.split(" ").map((e15) => Number(e15));
  4850. if ("Color" === t12) {
  4851. const t13 = new l2(r19).toRgba();
  4852. return t13[3] *= 255, t13;
  4853. }
  4854. return r19;
  4855. }
  4856. };
  4857. var se = (e15) => {
  4858. if (!e15)
  4859. return U.Butt;
  4860. switch (e15) {
  4861. case "butt":
  4862. return U.Butt;
  4863. case "square":
  4864. return U.Square;
  4865. case "round":
  4866. return U.Round;
  4867. }
  4868. };
  4869. var ne2 = (e15) => {
  4870. if (!e15)
  4871. return w.Miter;
  4872. switch (e15) {
  4873. case "miter":
  4874. return w.Miter;
  4875. case "round":
  4876. return w.Round;
  4877. case "bevel":
  4878. return w.Bevel;
  4879. }
  4880. };
  4881. var le = (e15) => {
  4882. if (t(e15))
  4883. return "Center";
  4884. switch (e15) {
  4885. case "left":
  4886. return "Left";
  4887. case "right":
  4888. return "Right";
  4889. case "center":
  4890. return "Center";
  4891. }
  4892. };
  4893. var ce = (e15) => {
  4894. if (t(e15))
  4895. return "Center";
  4896. switch (e15) {
  4897. case "baseline":
  4898. return "Baseline";
  4899. case "top":
  4900. return "Top";
  4901. case "middle":
  4902. return "Center";
  4903. case "bottom":
  4904. return "Bottom";
  4905. }
  4906. };
  4907. var fe = (e15) => {
  4908. if (!e15)
  4909. return [0, 0, 0, 0];
  4910. const { r: t12, g: r19, b: a15, a: o12 } = e15;
  4911. return [t12, r19, a15, 255 * o12];
  4912. };
  4913. var me = (e15, t12) => {
  4914. const r19 = ye(t12), a15 = he(e15);
  4915. return r19 && a15 ? `${r19}-${a15}` : `${r19}${a15}`;
  4916. };
  4917. var ye = (e15) => {
  4918. if (!e15)
  4919. return "";
  4920. switch (e15.toLowerCase()) {
  4921. case "bold":
  4922. case "bolder":
  4923. return "bold";
  4924. }
  4925. return "";
  4926. };
  4927. var he = (e15) => {
  4928. if (!e15)
  4929. return "";
  4930. switch (e15.toLowerCase()) {
  4931. case "italic":
  4932. case "oblique":
  4933. return "italic";
  4934. }
  4935. return "";
  4936. };
  4937. var pe = (e15, t12) => {
  4938. const r19 = "butt" === t12;
  4939. switch (e15) {
  4940. case "dash":
  4941. case "esriSLSDash":
  4942. return r19 ? [4, 3] : [3, 4];
  4943. case "dash-dot":
  4944. case "esriSLSDashDot":
  4945. return r19 ? [4, 3, 1, 3] : [3, 4, 0, 4];
  4946. case "dot":
  4947. case "esriSLSDot":
  4948. return r19 ? [1, 3] : [0, 4];
  4949. case "long-dash":
  4950. case "esriSLSLongDash":
  4951. return r19 ? [8, 3] : [7, 4];
  4952. case "long-dash-dot":
  4953. case "esriSLSLongDashDot":
  4954. return r19 ? [8, 3, 1, 3] : [7, 4, 0, 4];
  4955. case "long-dash-dot-dot":
  4956. case "esriSLSDashDotDot":
  4957. return r19 ? [8, 3, 1, 3, 1, 3] : [7, 4, 0, 4, 0, 4];
  4958. case "short-dash":
  4959. case "esriSLSShortDash":
  4960. return r19 ? [4, 1] : [3, 2];
  4961. case "short-dash-dot":
  4962. case "esriSLSShortDashDot":
  4963. return r19 ? [4, 1, 1, 1] : [3, 2, 0, 2];
  4964. case "short-dash-dot-dot":
  4965. case "esriSLSShortDashDotDot":
  4966. return r19 ? [4, 1, 1, 1, 1, 1] : [3, 2, 0, 2, 0, 2];
  4967. case "short-dot":
  4968. case "esriSLSShortDot":
  4969. return r19 ? [1, 1] : [0, 2];
  4970. case "solid":
  4971. case "esriSLSSolid":
  4972. case "none":
  4973. return K3.error("Unexpected: style does not require rasterization"), [0, 0];
  4974. default:
  4975. return K3.error(`Tried to rasterize SLS, but found an unexpected style: ${e15}!`), [0, 0];
  4976. }
  4977. };
  4978. function ue(e15) {
  4979. return void 0 !== e15.symbolLayers;
  4980. }
  4981. var Me = (e15) => {
  4982. const t12 = 100, r19 = 50;
  4983. let a15, o12;
  4984. const i11 = e15;
  4985. if ("circle" === i11 || "esriSMSCircle" === i11) {
  4986. const e16 = 0.25;
  4987. let t13 = Math.acos(1 - e16 / r19), i12 = Math.ceil(Y3 / t13 / 4);
  4988. 0 === i12 && (i12 = 1), t13 = $2 / i12, i12 *= 4;
  4989. const s13 = [];
  4990. s13.push([r19, 0]);
  4991. for (let a16 = 1; a16 < i12; a16++)
  4992. s13.push([r19 * Math.cos(a16 * t13), -r19 * Math.sin(a16 * t13)]);
  4993. s13.push([r19, 0]), a15 = { rings: [s13] }, o12 = { xmin: -r19, ymin: -r19, xmax: r19, ymax: r19 };
  4994. } else if ("cross" === i11 || "esriSMSCross" === i11) {
  4995. const e16 = 0;
  4996. a15 = { rings: [[[e16, r19], [e16, e16], [r19, e16], [r19, -e16], [e16, -e16], [e16, -r19], [-e16, -r19], [-e16, -e16], [-r19, -e16], [-r19, e16], [-e16, e16], [-e16, r19], [e16, r19]]] }, o12 = { xmin: -r19, ymin: -r19, xmax: r19, ymax: r19 };
  4997. } else if ("diamond" === i11 || "esriSMSDiamond" === i11)
  4998. a15 = { rings: [[[-r19, 0], [0, r19], [r19, 0], [0, -r19], [-r19, 0]]] }, o12 = { xmin: -r19, ymin: -r19, xmax: r19, ymax: r19 };
  4999. else if ("square" === i11 || "esriSMSSquare" === i11)
  5000. a15 = { rings: [[[-r19, -r19], [-r19, r19], [r19, r19], [r19, -r19], [-r19, -r19]]] }, o12 = { xmin: -r19, ymin: -r19, xmax: r19, ymax: r19 };
  5001. else if ("x" === i11 || "esriSMSX" === i11) {
  5002. const e16 = 0;
  5003. a15 = { rings: [[[0, e16], [r19 - e16, r19], [r19, r19 - e16], [e16, 0], [r19, e16 - r19], [r19 - e16, -r19], [0, -e16], [e16 - r19, -r19], [-r19, e16 - r19], [-e16, 0], [-r19, r19 - e16], [e16 - r19, r19], [0, e16]]] }, o12 = { xmin: -r19, ymin: -r19, xmax: r19, ymax: r19 };
  5004. } else if ("triangle" === i11 || "esriSMSTriangle" === i11) {
  5005. const e16 = t12 * 0.5773502691896257, r20 = -e16, i12 = 2 / 3 * t12, s13 = i12 - t12;
  5006. a15 = { rings: [[[r20, s13], [0, i12], [e16, s13], [r20, s13]]] }, o12 = { xmin: r20, ymin: s13, xmax: e16, ymax: i12 };
  5007. } else
  5008. "arrow" === i11 && (a15 = { rings: [[[-50, 50], [50, 0], [-50, -50], [-33, -20], [-33, 20], [-50, 50]]] }, o12 = { xmin: -r19, ymin: -r19, xmax: r19, ymax: r19 });
  5009. return [o12, a15];
  5010. };
  5011. var de = (e15) => "vertical" === e15 || "horizontal" === e15 || "cross" === e15 || "esriSFSCross" === e15 || "esriSFSVertical" === e15 || "esriSFSHorizontal" === e15;
  5012. var Se = (e15) => e15 ? e15.charAt(0).toLowerCase() + e15.substr(1) : e15;
  5013. var be;
  5014. function Ce(e15, t12, r19) {
  5015. if (!e15.effects || r(t12.geometryEngine))
  5016. return;
  5017. if (be)
  5018. return void r19.push(be);
  5019. d(e15.effects) && (be = p(), r19.push(be), be.then((e16) => t12.geometryEngine = e16));
  5020. }
  5021. // node_modules/@arcgis/core/symbols/cim/quantizeTime.js
  5022. var t11 = 0.05;
  5023. function n15(n17) {
  5024. return Math.max(Math.round(n17 / t11), 1) * t11;
  5025. }
  5026. var e12 = /* @__PURE__ */ new Set(["StartTimeOffset", "Duration", "RepeatDelay"]);
  5027. function a13(t12, a15) {
  5028. return e12.has(a15) ? n15(t12) : t12;
  5029. }
  5030. // node_modules/@arcgis/core/symbols/cim/SDFHelper.js
  5031. function r17(t12) {
  5032. var _a;
  5033. if (!t12)
  5034. return null;
  5035. switch (t12.type) {
  5036. case "CIMPointSymbol": {
  5037. const o12 = t12.symbolLayers;
  5038. return o12 && 1 === o12.length ? r17(o12[0]) : null;
  5039. }
  5040. case "CIMVectorMarker": {
  5041. const o12 = t12.markerGraphics;
  5042. if (!o12 || 1 !== o12.length)
  5043. return null;
  5044. const n17 = o12[0];
  5045. if (!n17)
  5046. return null;
  5047. const r19 = n17.geometry;
  5048. if (!r19)
  5049. return null;
  5050. const l12 = n17.symbol;
  5051. return !l12 || "CIMPolygonSymbol" !== l12.type && "CIMLineSymbol" !== l12.type || ((_a = l12.symbolLayers) == null ? void 0 : _a.some((t13) => !!t13.effects)) ? null : { geom: r19, asFill: "CIMPolygonSymbol" === l12.type };
  5052. }
  5053. case "sdf":
  5054. return { geom: t12.geom, asFill: t12.asFill };
  5055. }
  5056. return null;
  5057. }
  5058. function l11(t12) {
  5059. return t12 ? t12.rings ? t12.rings : t12.paths ? t12.paths : void 0 !== t12.xmin && void 0 !== t12.ymin && void 0 !== t12.xmax && void 0 !== t12.ymax ? [[[t12.xmin, t12.ymin], [t12.xmin, t12.ymax], [t12.xmax, t12.ymax], [t12.xmax, t12.ymin], [t12.xmin, t12.ymin]]] : null : null;
  5060. }
  5061. function e13(t12) {
  5062. let o12 = 1 / 0, r19 = -1 / 0, l12 = 1 / 0, e15 = -1 / 0;
  5063. for (const n17 of t12)
  5064. for (const t13 of n17)
  5065. t13[0] < o12 && (o12 = t13[0]), t13[0] > r19 && (r19 = t13[0]), t13[1] < l12 && (l12 = t13[1]), t13[1] > e15 && (e15 = t13[1]);
  5066. return new t10(o12, l12, r19 - o12, e15 - l12);
  5067. }
  5068. function s12(t12) {
  5069. let o12 = 1 / 0, n17 = -1 / 0, r19 = 1 / 0, l12 = -1 / 0;
  5070. for (const e15 of t12)
  5071. for (const t13 of e15)
  5072. t13[0] < o12 && (o12 = t13[0]), t13[0] > n17 && (n17 = t13[0]), t13[1] < r19 && (r19 = t13[1]), t13[1] > l12 && (l12 = t13[1]);
  5073. return [o12, r19, n17, l12];
  5074. }
  5075. function i10(t12) {
  5076. return t12 ? t12.rings ? s12(t12.rings) : t12.paths ? s12(t12.paths) : u2(t12) ? [t12.xmin, t12.ymin, t12.xmax, t12.ymax] : null : null;
  5077. }
  5078. function f7(t12, o12, n17, r19, l12) {
  5079. const [e15, s13, i11, f9] = t12;
  5080. if (i11 < e15 || f9 < s13)
  5081. return [0, 0, 0];
  5082. const a15 = i11 - e15, m9 = f9 - s13, u15 = 128, c12 = 1, h8 = Math.floor(0.5 * (0.5 * u15 - c12)), y7 = (u15 - 2 * (h8 + c12)) / Math.max(a15, m9), x5 = Math.round(a15 * y7) + 2 * h8, M4 = Math.round(m9 * y7) + 2 * h8;
  5083. let g8 = 1;
  5084. if (o12) {
  5085. g8 = M4 / y7 / (o12.ymax - o12.ymin);
  5086. }
  5087. let p6 = 0, d4 = 0, b5 = 1;
  5088. r19 && (l12 ? o12 && n17 && o12.ymax - o12.ymin > 0 && (b5 = (o12.xmax - o12.xmin) / (o12.ymax - o12.ymin), p6 = r19.x / (n17 * b5), d4 = r19.y / n17) : (p6 = r19.x, d4 = r19.y)), p6 = 0.5 * (o12.xmax + o12.xmin) + p6 * (o12.xmax - o12.xmin), d4 = 0.5 * (o12.ymax + o12.ymin) + d4 * (o12.ymax - o12.ymin), p6 -= e15, d4 -= s13, p6 *= y7, d4 *= y7, p6 += h8, d4 += h8;
  5089. let w6 = p6 / x5 - 0.5, F3 = d4 / M4 - 0.5;
  5090. return l12 && (w6 *= n17 * b5, F3 *= n17), [g8, w6, F3];
  5091. }
  5092. function a14(t12) {
  5093. const o12 = l11(t12.geom), n17 = e13(o12), r19 = 128, s13 = 1, i11 = Math.floor(0.5 * (0.5 * r19 - s13)), f9 = (r19 - 2 * (i11 + s13)) / Math.max(n17.width, n17.height), a15 = Math.round(n17.width * f9) + 2 * i11, h8 = Math.round(n17.height * f9) + 2 * i11, y7 = [];
  5094. for (const l12 of o12)
  5095. if (l12 && l12.length > 1) {
  5096. const o13 = [];
  5097. for (const r20 of l12) {
  5098. let [l13, e15] = r20;
  5099. l13 -= n17.x, e15 -= n17.y, l13 *= f9, e15 *= f9, l13 += i11 - 0.5, e15 += i11 - 0.5, t12.asFill ? o13.push([l13, e15]) : o13.push([Math.round(l13), Math.round(e15)]);
  5100. }
  5101. if (t12.asFill) {
  5102. const t13 = o13.length - 1;
  5103. o13[0][0] === o13[t13][0] && o13[0][1] === o13[t13][1] || o13.push(o13[0]);
  5104. }
  5105. y7.push(o13);
  5106. }
  5107. const x5 = m8(y7, a15, h8, i11);
  5108. return t12.asFill && u14(y7, a15, h8, i11, x5), [c10(x5, i11), a15, h8];
  5109. }
  5110. function m8(t12, o12, n17, r19) {
  5111. const l12 = o12 * n17, e15 = new Array(l12), s13 = r19 * r19 + 1;
  5112. for (let i11 = 0; i11 < l12; ++i11)
  5113. e15[i11] = s13;
  5114. for (const i11 of t12) {
  5115. const t13 = i11.length;
  5116. for (let l13 = 1; l13 < t13; ++l13) {
  5117. const t14 = i11[l13 - 1], s14 = i11[l13];
  5118. let f9, a15, m9, u15;
  5119. t14[0] < s14[0] ? (f9 = t14[0], a15 = s14[0]) : (f9 = s14[0], a15 = t14[0]), t14[1] < s14[1] ? (m9 = t14[1], u15 = s14[1]) : (m9 = s14[1], u15 = t14[1]);
  5120. let c12 = Math.floor(f9) - r19, h8 = Math.floor(a15) + r19, y7 = Math.floor(m9) - r19, x5 = Math.floor(u15) + r19;
  5121. c12 < 0 && (c12 = 0), h8 > o12 && (h8 = o12), y7 < 0 && (y7 = 0), x5 > n17 && (x5 = n17);
  5122. const M4 = s14[0] - t14[0], g8 = s14[1] - t14[1], p6 = M4 * M4 + g8 * g8;
  5123. for (let r20 = c12; r20 < h8; r20++)
  5124. for (let l14 = y7; l14 < x5; l14++) {
  5125. let i12, f10, a16 = (r20 - t14[0]) * M4 + (l14 - t14[1]) * g8;
  5126. a16 < 0 ? (i12 = t14[0], f10 = t14[1]) : a16 > p6 ? (i12 = s14[0], f10 = s14[1]) : (a16 /= p6, i12 = t14[0] + a16 * M4, f10 = t14[1] + a16 * g8);
  5127. const m10 = (r20 - i12) * (r20 - i12) + (l14 - f10) * (l14 - f10), u16 = (n17 - l14 - 1) * o12 + r20;
  5128. m10 < e15[u16] && (e15[u16] = m10);
  5129. }
  5130. }
  5131. }
  5132. for (let i11 = 0; i11 < l12; ++i11)
  5133. e15[i11] = Math.sqrt(e15[i11]);
  5134. return e15;
  5135. }
  5136. function u14(t12, o12, n17, r19, l12) {
  5137. for (const e15 of t12) {
  5138. const t13 = e15.length;
  5139. for (let s13 = 1; s13 < t13; ++s13) {
  5140. const t14 = e15[s13 - 1], i11 = e15[s13];
  5141. let f9, a15, m9, u15;
  5142. t14[0] < i11[0] ? (f9 = t14[0], a15 = i11[0]) : (f9 = i11[0], a15 = t14[0]), t14[1] < i11[1] ? (m9 = t14[1], u15 = i11[1]) : (m9 = i11[1], u15 = t14[1]);
  5143. let c12 = Math.floor(f9), h8 = Math.floor(a15) + 1, y7 = Math.floor(m9), x5 = Math.floor(u15) + 1;
  5144. c12 < r19 && (c12 = r19), h8 > o12 - r19 && (h8 = o12 - r19), y7 < r19 && (y7 = r19), x5 > n17 - r19 && (x5 = n17 - r19);
  5145. for (let e16 = y7; e16 < x5; ++e16) {
  5146. if (t14[1] > e16 == i11[1] > e16)
  5147. continue;
  5148. const s14 = (n17 - e16 - 1) * o12;
  5149. for (let o13 = c12; o13 < h8; ++o13)
  5150. o13 < (i11[0] - t14[0]) * (e16 - t14[1]) / (i11[1] - t14[1]) + t14[0] && (l12[s14 + o13] = -l12[s14 + o13]);
  5151. for (let t15 = r19; t15 < c12; ++t15)
  5152. l12[s14 + t15] = -l12[s14 + t15];
  5153. }
  5154. }
  5155. }
  5156. }
  5157. function c10(o12, n17) {
  5158. const r19 = 2 * n17, l12 = o12.length, e15 = new Uint8Array(4 * l12);
  5159. for (let s13 = 0; s13 < l12; ++s13) {
  5160. const n18 = 0.5 - o12[s13] / r19;
  5161. o5(n18, e15, 4 * s13);
  5162. }
  5163. return e15;
  5164. }
  5165. // node_modules/@arcgis/core/symbols/cim/effects/CIMEffectHelper.js
  5166. var c11 = 96 / 72;
  5167. var f8 = class {
  5168. static executeEffects(t12, s13, r19) {
  5169. const f9 = a5(s13), p6 = c11;
  5170. let u15 = new r4(f9);
  5171. for (const e15 of t12) {
  5172. const t13 = A3(e15);
  5173. t13 && (u15 = t13.execute(u15, e15, p6, r19));
  5174. }
  5175. return u15;
  5176. }
  5177. static next(t12) {
  5178. const s13 = t12.next();
  5179. return x2(s13), s13;
  5180. }
  5181. static applyEffects(e15, r19, c12) {
  5182. if (!e15)
  5183. return r19;
  5184. let f9 = new r4(r19);
  5185. for (const t12 of e15) {
  5186. const s13 = A3(t12);
  5187. s13 && (f9 = s13.execute(f9, t12, 1, c12));
  5188. }
  5189. let p6, u15 = null;
  5190. for (; p6 = f9.next(); )
  5191. u15 ? f(u15) ? f(p6) && u15.paths.push(...p6.paths) : y2(u15) && y2(p6) && u15.rings.push(...p6.rings) : u15 = p6;
  5192. return u15;
  5193. }
  5194. };
  5195. // node_modules/@arcgis/core/views/2d/engine/webgl/grouping.js
  5196. function e14(e15, o12) {
  5197. let r19;
  5198. if ("string" == typeof e15)
  5199. r19 = c(e15 + `-seed(${o12})`);
  5200. else {
  5201. let t12 = 12;
  5202. r19 = e15 ^ o12;
  5203. do {
  5204. r19 = 107 * (r19 >> 8 ^ r19) + t12 | 0;
  5205. } while (0 != --t12);
  5206. }
  5207. return (1 + r19 / (1 << 31)) / 2;
  5208. }
  5209. function o11(t12) {
  5210. return Math.floor(e14(t12, r18) * n16);
  5211. }
  5212. var r18 = 53290320;
  5213. var n16 = 10;
  5214. // node_modules/@arcgis/core/symbols/cim/cimAnalyzer.js
  5215. var J3 = s.getLogger("esri.symbols.cim.cimAnalyzer");
  5216. function H(e15) {
  5217. switch (e15) {
  5218. case "Butt":
  5219. return e4.BUTT;
  5220. case "Square":
  5221. return e4.SQUARE;
  5222. default:
  5223. return e4.ROUND;
  5224. }
  5225. }
  5226. function Y4(e15) {
  5227. switch (e15) {
  5228. case "Bevel":
  5229. return n.BEVEL;
  5230. case "Miter":
  5231. return n.MITER;
  5232. default:
  5233. return n.ROUND;
  5234. }
  5235. }
  5236. function $3(e15, t12, i11, o12) {
  5237. let r19;
  5238. e15[t12] ? r19 = e15[t12] : (r19 = {}, e15[t12] = r19), r19[i11] = o12;
  5239. }
  5240. function E2(e15) {
  5241. const t12 = e15.markerPlacement;
  5242. return t12 && t12.angleToLine ? i2.MAP : i2.SCREEN;
  5243. }
  5244. async function T3(e15, t12, i11, o12, n17) {
  5245. const l12 = o12 != null ? o12 : [];
  5246. if (!e15)
  5247. return l12;
  5248. let a15, s13;
  5249. const c12 = {};
  5250. if ("CIMSymbolReference" !== e15.type)
  5251. return J3.error("Expect cim type to be 'CIMSymbolReference'"), l12;
  5252. if (a15 = e15.symbol, s13 = e15.primitiveOverrides, s13) {
  5253. const e16 = [];
  5254. for (const i12 of s13) {
  5255. const o13 = i12.valueExpressionInfo;
  5256. if (o13 && t12) {
  5257. const n18 = o13.expression, l13 = o6(n18, t12.spatialReference, t12.fields).then((e17) => {
  5258. t(e17) || $3(c12, i12.primitiveName, i12.propertyName, e17);
  5259. });
  5260. e16.push(l13);
  5261. } else
  5262. null != i12.value && $3(c12, i12.primitiveName, i12.propertyName, i12.value);
  5263. }
  5264. e16.length > 0 && await Promise.all(e16);
  5265. }
  5266. const p6 = [];
  5267. switch (oe2.fetchResources(a15, i11, p6), p6.length > 0 && await Promise.all(p6), a15.type) {
  5268. case "CIMPointSymbol":
  5269. case "CIMLineSymbol":
  5270. case "CIMPolygonSymbol":
  5271. j5(a15, s13, c12, t12, l12, i11, n17);
  5272. }
  5273. return l12;
  5274. }
  5275. function j5(e15, t12, i11, o12, r19, n17, l12) {
  5276. if (!e15)
  5277. return;
  5278. const a15 = e15.symbolLayers;
  5279. if (!a15)
  5280. return;
  5281. const s13 = e15.effects;
  5282. let f9;
  5283. const c12 = oe2.getSize(e15);
  5284. "CIMPointSymbol" === e15.type && "Map" === e15.angleAlignment && (f9 = i2.MAP);
  5285. let y7 = a15.length;
  5286. for (; y7--; ) {
  5287. const m9 = a15[y7];
  5288. if (!m9 || false === m9.enable)
  5289. continue;
  5290. let u15;
  5291. s13 && s13.length && (u15 = [...s13]);
  5292. const h8 = m9.effects;
  5293. h8 && h8.length && (s13 ? u15.push(...h8) : u15 = [...h8]);
  5294. const g8 = [];
  5295. let d4;
  5296. ie2.findEffectOverrides(u15, t12, g8), d4 = g8.length > 0 ? ae2(u15, g8, i11, o12) : u15;
  5297. const S2 = [];
  5298. switch (ie2.findApplicableOverrides(m9, t12, S2), m9.type) {
  5299. case "CIMSolidFill":
  5300. D(m9, d4, i11, S2, o12, r19);
  5301. break;
  5302. case "CIMPictureFill":
  5303. F2(m9, d4, i11, S2, o12, n17, r19);
  5304. break;
  5305. case "CIMHatchFill":
  5306. U4(m9, d4, i11, S2, o12, r19);
  5307. break;
  5308. case "CIMGradientFill":
  5309. W3(m9, d4, i11, S2, o12, r19);
  5310. break;
  5311. case "CIMSolidStroke":
  5312. G3(m9, d4, i11, S2, o12, r19, "CIMPolygonSymbol" === e15.type, c12);
  5313. break;
  5314. case "CIMPictureStroke":
  5315. B4(m9, d4, i11, S2, o12, r19, "CIMPolygonSymbol" === e15.type, c12);
  5316. break;
  5317. case "CIMGradientStroke":
  5318. q5(m9, d4, i11, S2, o12, r19, "CIMPolygonSymbol" === e15.type, c12);
  5319. break;
  5320. case "CIMCharacterMarker":
  5321. if (V2(m9, d4, i11, S2, o12, r19))
  5322. break;
  5323. break;
  5324. case "CIMPictureMarker":
  5325. if (V2(m9, d4, i11, S2, o12, r19))
  5326. break;
  5327. "CIMLineSymbol" === e15.type && (f9 = E2(m9)), K4(m9, d4, i11, S2, o12, n17, r19, f9, c12);
  5328. break;
  5329. case "CIMVectorMarker":
  5330. if (V2(m9, d4, i11, S2, o12, r19))
  5331. break;
  5332. "CIMLineSymbol" === e15.type && (f9 = E2(m9)), Q3(m9, d4, i11, S2, o12, r19, n17, f9, c12, l12);
  5333. break;
  5334. default:
  5335. J3.error("Cannot analyze CIM layer", m9.type);
  5336. }
  5337. }
  5338. }
  5339. function D(e15, t12, i11, o12, r19, n17) {
  5340. const l12 = e15.primitiveName, a15 = u6(e15.color), [f9, c12] = pe2(o12, l12, t12, null, null), m9 = c(JSON.stringify(e15) + c12).toString();
  5341. n17.push({ type: "fill", templateHash: m9, materialHash: f9 ? () => m9 : m9, cim: e15, materialOverrides: null, colorLocked: e15.colorLocked, color: ne3(l12, i11, "Color", r19, a15, re2), height: 0, angle: 0, offsetX: 0, offsetY: 0, scaleX: 1, effects: t12, applyRandomOffset: false, sampleAlphaOnly: true });
  5342. }
  5343. function F2(e15, t12, i11, o12, r19, l12, a15) {
  5344. const f9 = e15.primitiveName, c12 = e15.tintColor ? u6(e15.tintColor) : { r: 255, g: 255, b: 255, a: 1 }, [m9, p6] = pe2(o12, f9, t12, null, null), u15 = c(JSON.stringify(e15) + p6).toString(), y7 = c(`${e15.url}${JSON.stringify(e15.colorSubstitutions)}`).toString();
  5345. let h8 = b(e15.scaleX);
  5346. if ("width" in e15) {
  5347. const t13 = e15.width;
  5348. let i12 = 1;
  5349. const o13 = l12.getResource(e15.url);
  5350. r(o13) && (i12 = o13.width / o13.height), h8 /= i12 * (e15.height / t13);
  5351. }
  5352. a15.push({ type: "fill", templateHash: u15, materialHash: m9 ? () => y7 : y7, cim: e15, materialOverrides: null, colorLocked: e15.colorLocked, effects: t12, color: ne3(f9, i11, "TintColor", r19, c12, re2), height: ne3(f9, i11, "Height", r19, e15.height), scaleX: ne3(f9, i11, "ScaleX", r19, h8), angle: ne3(f9, i11, "Rotation", r19, b(e15.rotation)), offsetX: ne3(f9, i11, "OffsetX", r19, b(e15.offsetX)), offsetY: ne3(f9, i11, "OffsetY", r19, b(e15.offsetY)), url: e15.url, applyRandomOffset: false, sampleAlphaOnly: false });
  5353. }
  5354. function U4(e15, t12, i11, o12, r19, n17) {
  5355. var _a;
  5356. const l12 = ["Rotation", "OffsetX", "OffsetY"], a15 = o12.filter((t13) => t13.primitiveName !== e15.primitiveName || !l12.includes(t13.propertyName)), f9 = e15.primitiveName, [c12, m9] = pe2(o12, f9, t12, null, null), p6 = c(JSON.stringify(e15) + m9).toString(), u15 = c(`${e15.separation}${JSON.stringify(e15.lineSymbol)}`).toString();
  5357. let y7 = { r: 255, g: 255, b: 255, a: 1 };
  5358. if (e15.lineSymbol) {
  5359. const t13 = (_a = e15.lineSymbol) == null ? void 0 : _a.symbolLayers.find((e16) => "CIMSolidStroke" === e16.type);
  5360. t13 && (y7 = u6(t13.color));
  5361. }
  5362. n17.push({ type: "fill", templateHash: p6, materialHash: c12 ? ce2(u15, i11, a15, r19) : u15, cim: e15, materialOverrides: a15, colorLocked: e15.colorLocked, effects: t12, color: y7, height: ne3(f9, i11, "Separation", r19, e15.separation), scaleX: 1, angle: ne3(f9, i11, "Rotation", r19, b(e15.rotation)), offsetX: ne3(f9, i11, "OffsetX", r19, b(e15.offsetX)), offsetY: ne3(f9, i11, "OffsetY", r19, b(e15.offsetY)), applyRandomOffset: false, sampleAlphaOnly: true });
  5363. }
  5364. function W3(e15, t12, i11, o12, r19, n17) {
  5365. const l12 = e15.primitiveName, [a15, f9] = pe2(o12, l12, t12, null, null), c12 = c(JSON.stringify(e15) + f9).toString();
  5366. n17.push({ type: "fill", templateHash: c12, materialHash: a15 ? ce2(c12, i11, o12, r19) : c12, cim: e15, materialOverrides: null, colorLocked: e15.colorLocked, effects: t12, color: { r: 128, g: 128, b: 128, a: 1 }, height: 0, angle: 0, offsetX: 0, offsetY: 0, scaleX: 1, applyRandomOffset: false, sampleAlphaOnly: false });
  5367. }
  5368. function G3(e15, t12, i11, o12, r19, n17, l12, a15) {
  5369. const f9 = e15.primitiveName, c12 = u6(e15.color), m9 = void 0 !== e15.width ? e15.width : 4, p6 = H(e15.capStyle), u15 = Y4(e15.joinStyle), y7 = e15.miterLimit, [h8, g8] = pe2(o12, f9, t12, null, null), d4 = c(JSON.stringify(e15) + g8).toString();
  5370. let S2, N3;
  5371. if (t12 && t12 instanceof Array && t12.length > 0) {
  5372. const e16 = t12[t12.length - 1];
  5373. if ("CIMGeometricEffectDashes" === e16.type && "NoConstraint" === e16.lineDashEnding && null === e16.offsetAlongLine) {
  5374. const e17 = (t12 = [...t12]).pop();
  5375. S2 = e17.dashTemplate, N3 = e17.scaleDash;
  5376. }
  5377. }
  5378. n17.push({ type: "line", templateHash: d4, materialHash: h8 ? () => d4 : d4, cim: e15, materialOverrides: null, isOutline: l12, colorLocked: e15.colorLocked, effects: t12, color: ne3(f9, i11, "Color", r19, c12, re2), width: ne3(f9, i11, "Width", r19, m9), cap: ne3(f9, i11, "CapStyle", r19, p6), join: ne3(f9, i11, "JoinStyle", r19, u15), miterLimit: ne3(f9, i11, "MiterLimit", r19, y7), referenceWidth: a15, zOrder: oe3(e15.name), dashTemplate: S2, scaleDash: N3, sampleAlphaOnly: true });
  5379. }
  5380. function B4(e15, t12, i11, o12, r19, n17, l12, a15) {
  5381. const f9 = c(`${e15.url}${JSON.stringify(e15.colorSubstitutions)}`).toString(), c12 = e15.primitiveName, m9 = u6(e15.tintColor), p6 = void 0 !== e15.width ? e15.width : 4, u15 = H(e15.capStyle), y7 = Y4(e15.joinStyle), h8 = e15.miterLimit, [g8, d4] = pe2(o12, c12, t12, null, null), S2 = c(JSON.stringify(e15) + d4).toString();
  5382. n17.push({ type: "line", templateHash: S2, materialHash: g8 ? () => f9 : f9, cim: e15, materialOverrides: null, isOutline: l12, colorLocked: e15.colorLocked, effects: t12, color: ne3(c12, i11, "TintColor", r19, m9, re2), width: ne3(c12, i11, "Width", r19, p6), cap: ne3(c12, i11, "CapStyle", r19, u15), join: ne3(c12, i11, "JoinStyle", r19, y7), miterLimit: ne3(c12, i11, "MiterLimit", r19, h8), referenceWidth: a15, zOrder: oe3(e15.name), dashTemplate: null, scaleDash: false, url: e15.url, sampleAlphaOnly: false });
  5383. }
  5384. function q5(e15, t12, i11, o12, r19, n17, l12, a15) {
  5385. const f9 = e15.primitiveName, c12 = void 0 !== e15.width ? e15.width : 4, m9 = H(e15.capStyle), p6 = Y4(e15.joinStyle), u15 = e15.miterLimit, [y7, h8] = pe2(o12, f9, t12, null, null), g8 = c(JSON.stringify(e15) + h8).toString();
  5386. n17.push({ type: "line", templateHash: g8, materialHash: y7 ? ce2(g8, i11, o12, r19) : g8, cim: e15, materialOverrides: null, isOutline: l12, colorLocked: e15.colorLocked, effects: t12, color: { r: 128, g: 128, b: 128, a: 1 }, width: ne3(f9, i11, "Width", r19, c12), cap: ne3(f9, i11, "CapStyle", r19, m9), join: ne3(f9, i11, "JoinStyle", r19, p6), miterLimit: ne3(f9, i11, "MiterLimit", r19, u15), referenceWidth: a15, zOrder: oe3(e15.name), dashTemplate: null, scaleDash: false, sampleAlphaOnly: false });
  5387. }
  5388. function V2(e15, t12, i11, o12, r19, n17) {
  5389. const l12 = e15.markerPlacement;
  5390. if (!l12 || "CIMMarkerPlacementInsidePolygon" !== l12.type)
  5391. return false;
  5392. const f9 = l12, c12 = Math.abs(f9.stepX), m9 = Math.abs(f9.stepY);
  5393. if (0 === c12 || 0 === m9)
  5394. return true;
  5395. const p6 = ["Rotation", "OffsetX", "OffsetY"], u15 = o12.filter((t13) => t13.primitiveName !== e15.primitiveName || !p6.includes(t13.propertyName)), y7 = "url" in e15 ? e15.url : null, [h8, g8] = pe2(o12, f9.primitiveName, t12, null, null), d4 = c(JSON.stringify(e15) + g8).toString();
  5396. let S2, b5, O3 = null;
  5397. if ("Random" === l12.gridType) {
  5398. const e16 = e3(dt), t13 = Math.max(Math.floor(e16 / c12), 1), i12 = Math.max(Math.floor(e16 / m9), 1);
  5399. S2 = m9 * i12, O3 = (e17) => e17 ? e17 * i12 : 0;
  5400. b5 = t13 * c12 / S2;
  5401. } else
  5402. l12.shiftOddRows ? (S2 = 2 * m9, O3 = (e16) => e16 ? 2 * e16 : 0, b5 = c12 / m9 * 0.5) : (S2 = m9, O3 = null, b5 = c12 / m9);
  5403. let k4 = { r: 255, g: 255, b: 255, a: 1 };
  5404. return "tintColor" in e15 && (k4 = u6(e15.tintColor)), n17.push({ type: "fill", templateHash: d4, materialHash: h8 ? ce2(d4, i11, u15, r19) : d4, cim: e15, materialOverrides: u15, colorLocked: e15.colorLocked, effects: t12, color: ne3(f9.primitiveName, i11, "TintColor", r19, k4, re2), height: ne3(f9.primitiveName, i11, "StepY", r19, S2, O3), scaleX: b5, angle: ne3(f9.primitiveName, i11, "GridAngle", r19, f9.gridAngle), offsetX: ne3(f9.primitiveName, i11, "OffsetX", r19, b(f9.offsetX)), offsetY: ne3(f9.primitiveName, i11, "OffsetY", r19, b(f9.offsetY)), url: y7, applyRandomOffset: "Random" === l12.gridType, sampleAlphaOnly: !y7 }), true;
  5405. }
  5406. function K4(e15, t12, i11, o12, r19, l12, a15, f9, c12) {
  5407. var _a;
  5408. const m9 = e15.primitiveName, p6 = b(e15.size);
  5409. let u15 = b(e15.scaleX, 1);
  5410. const y7 = b(e15.rotation), h8 = b(e15.offsetX), g8 = b(e15.offsetY), d4 = e15.tintColor ? u6(e15.tintColor) : { r: 255, g: 255, b: 255, a: 1 }, S2 = c(`${e15.url}${JSON.stringify(e15.colorSubstitutions)}${JSON.stringify(e15.animatedSymbolProperties)}`).toString(), b5 = se2(e15.markerPlacement, o12, i11, r19), O3 = fe2(e15.animatedSymbolProperties, o12, i11, r19), [k4, C6] = pe2(o12, m9, t12, b5, O3), P5 = c(JSON.stringify(e15) + C6).toString(), M4 = (_a = e15.anchorPoint) != null ? _a : { x: 0, y: 0 };
  5411. if ("width" in e15) {
  5412. const t13 = e15.width;
  5413. let i12 = 1;
  5414. const o13 = l12.getResource(e15.url);
  5415. r(o13) && (i12 = o13.width / o13.height), u15 /= i12 * (p6 / t13);
  5416. }
  5417. function L3(e16, t13) {
  5418. return t6(O3, e16, t13);
  5419. }
  5420. const I3 = e15.animatedSymbolProperties && true === e15.animatedSymbolProperties.randomizeStartTime ? (e16, t13, i12, o13) => {
  5421. const r20 = o11(o13), n17 = L3(e16, t13);
  5422. return S2 + `-MATERIALGROUP(${r20})-ASP(${JSON.stringify(n17)})`;
  5423. } : k4 ? (e16, t13) => {
  5424. const i12 = L3(e16, t13);
  5425. return S2 + `-ASP(${JSON.stringify(i12)})`;
  5426. } : S2;
  5427. a15.push({ type: "marker", templateHash: P5, materialHash: I3, cim: e15, materialOverrides: null, colorLocked: e15.colorLocked, effects: t12, scaleSymbolsProportionally: false, alignment: f9, size: ne3(m9, i11, "Size", r19, p6), scaleX: ne3(m9, i11, "ScaleX", r19, u15), rotation: ne3(m9, i11, "Rotation", r19, y7), offsetX: ne3(m9, i11, "OffsetX", r19, h8), offsetY: ne3(m9, i11, "OffsetY", r19, g8), color: ne3(m9, i11, "TintColor", r19, d4, re2), anchorPoint: { x: M4.x, y: -M4.y }, isAbsoluteAnchorPoint: "Relative" !== e15.anchorPointUnits, outlineColor: { r: 0, g: 0, b: 0, a: 0 }, outlineWidth: 0, frameHeight: 0, rotateClockwise: e15.rotateClockwise, referenceSize: c12, sizeRatio: 1, markerPlacement: b5, url: e15.url, animatedSymbolProperties: O3 });
  5428. }
  5429. function Q3(e15, t12, i11, o12, r19, n17, l12, a15, s13, f9) {
  5430. const c12 = e15.markerGraphics;
  5431. if (!c12)
  5432. return;
  5433. let m9 = 0;
  5434. if (e15.scaleSymbolsProportionally) {
  5435. const t13 = e15.frame;
  5436. t13 && (m9 = t13.ymax - t13.ymin);
  5437. }
  5438. const p6 = se2(e15.markerPlacement, o12, i11, r19);
  5439. for (const u15 of c12)
  5440. if (u15) {
  5441. const c13 = u15.symbol;
  5442. if (!c13)
  5443. continue;
  5444. switch (c13.type) {
  5445. case "CIMPointSymbol":
  5446. case "CIMLineSymbol":
  5447. case "CIMPolygonSymbol":
  5448. Z4(e15, t12, p6, null, u15, o12, i11, r19, n17, l12, a15, s13, m9, f9);
  5449. break;
  5450. case "CIMTextSymbol":
  5451. _3(e15, t12, p6, u15, i11, o12, r19, n17, a15, s13, m9);
  5452. }
  5453. }
  5454. }
  5455. function _3(e15, i11, o12, r19, n17, l12, a15, f9, c12, m9, u15) {
  5456. const y7 = [];
  5457. ie2.findApplicableOverrides(r19, l12, y7);
  5458. const h8 = r19.geometry;
  5459. if (!("x" in h8) || !("y" in h8))
  5460. return;
  5461. const g8 = r19.symbol, d4 = g2(g8), S2 = S(g8.fontStyleName), z3 = a3(g8.fontFamilyName);
  5462. g8.font = { family: z3, decoration: d4, ...S2 };
  5463. const A4 = e15.frame, R3 = h8.x - 0.5 * (A4.xmin + A4.xmax), x5 = h8.y - 0.5 * (A4.ymin + A4.ymax), J4 = e15.size / u15, H2 = e15.primitiveName, Y5 = b(g8.height) * J4, $4 = b(g8.angle), E3 = b(e15.offsetX) + (b(g8.offsetX) + R3) * J4, T4 = b(e15.offsetY) + (b(g8.offsetY) + x5) * J4, j6 = u6(k2(g8));
  5464. let D2 = u6(P2(g8)), F3 = L(g8);
  5465. F3 || (D2 = u6(k2(g8.haloSymbol)), F3 = g8.haloSize * J4);
  5466. const [U5, W4] = pe2(l12, H2, i11, o12, null), G4 = JSON.stringify(e15.effects) + Number(e15.colorLocked).toString() + JSON.stringify(e15.anchorPoint) + e15.anchorPointUnits + JSON.stringify(e15.markerPlacement) + e15.size.toString(), B5 = c(JSON.stringify(r19) + G4 + W4).toString();
  5467. let q6 = ne3(r19.primitiveName, n17, "TextString", a15, r19.textString, s6, g8.textCase);
  5468. if (null == q6)
  5469. return;
  5470. const { fontStyleName: V3 } = g8, K5 = z3 + (V3 ? "-" + V3.toLowerCase() : "-regular"), Q4 = K5;
  5471. "string" == typeof q6 && q6.includes("[") && g8.fieldMap && (q6 = c3(g8.fieldMap, q6, g8.textCase)), f9.push({ type: "text", templateHash: B5, materialHash: U5 || "function" == typeof q6 || q6.match(/\[(.*?)\]/) ? (e16, t12, i12) => Q4 + "-" + t6(q6, e16, t12, i12) : Q4 + "-" + c(q6), cim: g8, materialOverrides: null, colorLocked: e15.colorLocked, effects: i11, alignment: c12, anchorPoint: { x: e15.anchorPoint ? e15.anchorPoint.x : 0, y: e15.anchorPoint ? e15.anchorPoint.y : 0 }, isAbsoluteAnchorPoint: "Relative" !== e15.anchorPointUnits, fontName: K5, decoration: d4, weight: ne3(H2, n17, "Weight", a15, S2.weight), style: ne3(H2, n17, "Size", a15, S2.style), size: ne3(H2, n17, "Size", a15, Y5), angle: ne3(H2, n17, "Rotation", a15, $4), offsetX: ne3(H2, n17, "OffsetX", a15, E3), offsetY: ne3(H2, n17, "OffsetY", a15, T4), horizontalAlignment: w3(g8.horizontalAlignment), verticalAlignment: x(g8.verticalAlignment), text: q6, color: j6, outlineColor: D2, outlineSize: F3, referenceSize: m9, sizeRatio: 1, markerPlacement: o12 });
  5472. }
  5473. function Z4(e15, t12, i11, o12, r19, l12, a15, f9, c12, m9, p6, u15, y7, h8) {
  5474. var _a;
  5475. const g8 = r19.symbol, b5 = g8.symbolLayers;
  5476. if (!b5)
  5477. return;
  5478. if (h8)
  5479. return void te2(e15, t12, i11, o12, r19, a15, l12, f9, c12, m9, p6, u15, y7);
  5480. let O3 = b5.length;
  5481. if (ue2(b5))
  5482. return void ee2(e15, t12, i11, o12, r19, b5, l12, a15, f9, c12, p6, u15, y7);
  5483. const M4 = f8.applyEffects(g8.effects, r19.geometry, m9.geometryEngine);
  5484. if (M4)
  5485. for (; O3--; ) {
  5486. const h9 = b5[O3];
  5487. if (h9 && false !== h9.enable)
  5488. switch (h9.type) {
  5489. case "CIMSolidFill":
  5490. case "CIMSolidStroke": {
  5491. const g9 = f8.applyEffects(h9.effects, M4, m9.geometryEngine), b6 = i10(g9);
  5492. if (!b6)
  5493. continue;
  5494. const O4 = "Relative" !== e15.anchorPointUnits, [L3, w6, I3] = f7(b6, e15.frame, e15.size, e15.anchorPoint, O4), X2 = "CIMSolidFill" === h9.type, A4 = { type: "sdf", geom: g9, asFill: X2 }, R3 = e15.primitiveName, x5 = (_a = b(e15.size)) != null ? _a : 10, J4 = b(e15.rotation), H2 = b(e15.offsetX), Y5 = b(e15.offsetY), $4 = h9.path, E3 = h9.primitiveName, T4 = u6(X2 ? k2(h9) : P2(h9)), j6 = X2 ? { r: 0, g: 0, b: 0, a: 0 } : u6(P2(h9)), D2 = L(h9);
  5495. if (!X2 && !D2)
  5496. break;
  5497. let F3 = false, U5 = "";
  5498. for (const e16 of l12)
  5499. e16.primitiveName !== E3 && e16.primitiveName !== R3 || (void 0 !== e16.value ? U5 += `-${e16.primitiveName}-${e16.propertyName}-${JSON.stringify(e16.value)}` : e16.valueExpressionInfo && (F3 = true));
  5500. r(t12) && "function" == typeof t12 && (F3 = true);
  5501. const W4 = JSON.stringify({ ...e15, markerGraphics: null }), G4 = c(JSON.stringify(A4) + $4).toString(), B5 = { type: "marker", templateHash: c(JSON.stringify(r19) + JSON.stringify(h9) + W4 + U5).toString(), materialHash: F3 ? () => G4 : G4, cim: A4, materialOverrides: null, colorLocked: e15.colorLocked, effects: t12, scaleSymbolsProportionally: e15.scaleSymbolsProportionally, alignment: p6, anchorPoint: { x: w6, y: I3 }, isAbsoluteAnchorPoint: O4, size: ne3(e15.primitiveName, a15, "Size", f9, x5), rotation: ne3(e15.primitiveName, a15, "Rotation", f9, J4), offsetX: ne3(e15.primitiveName, a15, "OffsetX", f9, H2), offsetY: ne3(e15.primitiveName, a15, "OffsetY", f9, Y5), scaleX: 1, frameHeight: y7, rotateClockwise: e15.rotateClockwise, referenceSize: u15, sizeRatio: L3, color: ne3(E3, a15, "Color", f9, T4, re2), outlineColor: ne3(E3, a15, "Color", f9, j6, re2), outlineWidth: ne3(E3, a15, "Width", f9, D2), markerPlacement: i11, animatedSymbolProperties: o12, path: $4 };
  5502. c12.push(B5);
  5503. break;
  5504. }
  5505. default:
  5506. te2(e15, t12, i11, o12, r19, a15, l12, f9, c12, m9, p6, u15, y7);
  5507. }
  5508. }
  5509. }
  5510. function ee2(e15, t12, i11, o12, r19, n17, l12, a15, f9, c12, m9, p6, u15) {
  5511. const y7 = r19.geometry, h8 = n17[0], g8 = n17[1], b5 = i10(y7);
  5512. if (!b5)
  5513. return;
  5514. const O3 = "Relative" !== e15.anchorPointUnits, [M4, L3, w6] = f7(b5, e15.frame, e15.size, e15.anchorPoint, O3), I3 = { type: "sdf", geom: y7, asFill: true }, X2 = e15.primitiveName, z3 = b(e15.size), A4 = b(e15.rotation), R3 = b(e15.offsetX), x5 = b(e15.offsetY), J4 = g8.path, H2 = g8.primitiveName, Y5 = h8.primitiveName, $4 = u6(k2(g8)), E3 = u6(P2(h8)), T4 = L(h8);
  5515. let j6 = false, D2 = "";
  5516. for (const s13 of l12)
  5517. s13.primitiveName !== H2 && s13.primitiveName !== Y5 && s13.primitiveName !== X2 || (void 0 !== s13.value ? D2 += `-${s13.primitiveName}-${s13.propertyName}-${JSON.stringify(s13.value)}` : s13.valueExpressionInfo && (j6 = true));
  5518. const F3 = JSON.stringify({ ...e15, markerGraphics: null }), U5 = c(JSON.stringify(I3) + J4).toString(), W4 = { type: "marker", templateHash: c(JSON.stringify(r19) + JSON.stringify(g8) + JSON.stringify(h8) + F3 + D2).toString(), materialHash: j6 ? () => U5 : U5, cim: I3, materialOverrides: null, colorLocked: e15.colorLocked, effects: t12, scaleSymbolsProportionally: e15.scaleSymbolsProportionally, alignment: m9, anchorPoint: { x: L3, y: w6 }, isAbsoluteAnchorPoint: O3, size: ne3(e15.primitiveName, a15, "Size", f9, z3), rotation: ne3(e15.primitiveName, a15, "Rotation", f9, A4), offsetX: ne3(e15.primitiveName, a15, "OffsetX", f9, R3), offsetY: ne3(e15.primitiveName, a15, "OffsetY", f9, x5), scaleX: 1, frameHeight: u15, rotateClockwise: e15.rotateClockwise, referenceSize: p6, sizeRatio: M4, color: ne3(H2, a15, "Color", f9, $4, re2), outlineColor: ne3(Y5, a15, "Color", f9, E3, re2), outlineWidth: ne3(Y5, a15, "Width", f9, T4), markerPlacement: i11, path: J4, animatedSymbolProperties: o12 };
  5519. c12.push(W4);
  5520. }
  5521. function te2(e15, t12, i11, o12, r19, a15, f9, c12, p6, u15, y7, h8, g8) {
  5522. const d4 = ie3(e15, r19), S2 = ["Rotation", "OffsetX", "OffsetY"], v3 = f9.filter((t13) => t13.primitiveName !== e15.primitiveName || !S2.includes(t13.propertyName));
  5523. let b5 = "";
  5524. for (const n17 of f9)
  5525. void 0 !== n17.value && (b5 += `-${n17.primitiveName}-${n17.propertyName}-${JSON.stringify(n17.value)}`);
  5526. const [O3, k4, C6] = oe2.getTextureAnchor(d4, u15), P5 = e15.primitiveName, M4 = b(e15.rotation), L3 = b(e15.offsetX), w6 = b(e15.offsetY), I3 = c(JSON.stringify(d4) + b5).toString(), X2 = { type: "marker", templateHash: I3, materialHash: v3.length > 0 || r(t12) && "function" == typeof t12 ? ce2(I3, a15, v3, c12) : I3, cim: d4, materialOverrides: v3, colorLocked: e15.colorLocked, effects: t12, scaleSymbolsProportionally: e15.scaleSymbolsProportionally, alignment: y7, anchorPoint: { x: O3, y: k4 }, isAbsoluteAnchorPoint: false, size: e15.size, rotation: ne3(P5, a15, "Rotation", c12, M4), offsetX: ne3(P5, a15, "OffsetX", c12, L3), offsetY: ne3(P5, a15, "OffsetY", c12, w6), color: { r: 255, g: 255, b: 255, a: 1 }, outlineColor: { r: 0, g: 0, b: 0, a: 0 }, outlineWidth: 0, scaleX: 1, frameHeight: g8, rotateClockwise: e15.rotateClockwise, referenceSize: h8, sizeRatio: C6 / u4(e15.size), markerPlacement: i11, animatedSymbolProperties: o12 };
  5527. p6.push(X2);
  5528. }
  5529. function ie3(e15, t12) {
  5530. return { type: e15.type, enable: true, name: e15.name, colorLocked: e15.colorLocked, primitiveName: e15.primitiveName, anchorPoint: e15.anchorPoint, anchorPointUnits: e15.anchorPointUnits, offsetX: 0, offsetY: 0, rotateClockwise: e15.rotateClockwise, rotation: 0, size: e15.size, billboardMode3D: e15.billboardMode3D, depth3D: e15.depth3D, frame: e15.frame, markerGraphics: [t12], scaleSymbolsProportionally: e15.scaleSymbolsProportionally, respectFrame: e15.respectFrame, clippingPath: e15.clippingPath };
  5531. }
  5532. function oe3(e15) {
  5533. if (e15 && 0 === e15.indexOf("Level_")) {
  5534. const t12 = parseInt(e15.substr(6), 10);
  5535. if (!isNaN(t12))
  5536. return t12;
  5537. }
  5538. return 0;
  5539. }
  5540. function re2(t12) {
  5541. if (!t12 || 0 === t12.length)
  5542. return null;
  5543. const i11 = new l2(t12).toRgba();
  5544. return { r: i11[0], g: i11[1], b: i11[2], a: i11[3] };
  5545. }
  5546. function ne3(e15, t12, i11, o12, r19, n17, l12) {
  5547. const a15 = t12[e15];
  5548. if (a15) {
  5549. const e16 = a15[i11];
  5550. if ("string" == typeof e16 || "number" == typeof e16 || e16 instanceof Array)
  5551. return n17 ? n17.call(null, e16, l12) : e16;
  5552. if (null != e16 && e16 instanceof p2)
  5553. return (t13, i12, a16) => {
  5554. let s13 = i9(e16, t13, { $view: a16 }, o12.geometryType, i12);
  5555. return null !== s13 && n17 && (s13 = n17.call(null, s13, l12)), null !== s13 ? s13 : r19;
  5556. };
  5557. }
  5558. return r19;
  5559. }
  5560. function le2(e15) {
  5561. return e15 ? e15.charAt(0).toLowerCase() + e15.substr(1) : e15;
  5562. }
  5563. function ae2(e15, t12, o12, r19) {
  5564. for (const i11 of t12) {
  5565. if (i11.valueExpressionInfo) {
  5566. const e16 = o12[i11.primitiveName] && o12[i11.primitiveName][i11.propertyName];
  5567. e16 instanceof p2 && (i11.fn = (t13, i12, o13) => i9(e16, t13, { $view: o13 }, r19.geometryType, i12));
  5568. }
  5569. }
  5570. return (o13, r20, n17) => {
  5571. for (const e16 of t12)
  5572. e16.fn && (e16.value = e16.fn(o13, r20, n17));
  5573. const l12 = [];
  5574. for (let a15 of e15) {
  5575. const e16 = a15 == null ? void 0 : a15.primitiveName;
  5576. if (e16) {
  5577. let o14 = false;
  5578. for (const r21 of t12)
  5579. if (r21.primitiveName === e16) {
  5580. const e17 = le2(r21.propertyName);
  5581. null != r21.value && r21.value !== a15[e17] && (o14 || (a15 = y(a15), o14 = true), a15[e17] = r21.value);
  5582. }
  5583. }
  5584. l12.push(a15);
  5585. }
  5586. return l12;
  5587. };
  5588. }
  5589. function se2(e15, t12, o12, r19) {
  5590. const n17 = [];
  5591. if (ie2.findApplicableOverrides(e15, t12, n17), 0 === n17.length)
  5592. return e15;
  5593. for (const i11 of n17) {
  5594. if (i11.valueExpressionInfo) {
  5595. const e16 = o12[i11.primitiveName] && o12[i11.primitiveName][i11.propertyName];
  5596. e16 instanceof p2 && (i11.fn = (t13, i12, o13) => i9(e16, t13, { $view: o13 }, r19.geometryType, i12));
  5597. }
  5598. }
  5599. return (t13, o13, r20) => {
  5600. for (const e16 of n17)
  5601. e16.fn && (e16.value = e16.fn(t13, o13, r20));
  5602. const l12 = y(e15), a15 = e15.primitiveName;
  5603. for (const e16 of n17)
  5604. if (e16.primitiveName === a15) {
  5605. const t14 = le2(e16.propertyName);
  5606. null != e16.value && e16.value !== l12[t14] && (l12[t14] = e16.value);
  5607. }
  5608. return l12;
  5609. };
  5610. }
  5611. function fe2(e15, t12, o12, r19) {
  5612. const n17 = [];
  5613. if (ie2.findApplicableOverrides(e15, t12, n17), 0 === n17.length)
  5614. return e15;
  5615. for (const i11 of n17) {
  5616. if (i11.valueExpressionInfo) {
  5617. const e16 = o12[i11.primitiveName] && o12[i11.primitiveName][i11.propertyName];
  5618. e16 instanceof p2 && (i11.fn = (t13, i12, o13) => i9(e16, t13, { $view: o13 }, r19.geometryType, i12));
  5619. }
  5620. }
  5621. return (t13, o13, r20) => {
  5622. for (const e16 of n17)
  5623. e16.fn && (e16.value = e16.fn(t13, o13, r20));
  5624. const l12 = y(e15), a15 = e15.primitiveName;
  5625. for (const e16 of n17)
  5626. if (e16.primitiveName === a15) {
  5627. const t14 = le2(e16.propertyName);
  5628. if (null != e16.value) {
  5629. const i11 = a13(e16.value, e16.propertyName);
  5630. i11 !== l12[t14] && (l12[t14] = i11);
  5631. }
  5632. }
  5633. return l12;
  5634. };
  5635. }
  5636. function ce2(e15, t12, i11, o12) {
  5637. for (const r19 of i11) {
  5638. if (r19.valueExpressionInfo) {
  5639. const e16 = t12[r19.primitiveName] && t12[r19.primitiveName][r19.propertyName];
  5640. e16 instanceof p2 && (r19.fn = (t13, i12, r20) => i9(e16, t13, { $view: r20 }, o12.geometryType, i12));
  5641. }
  5642. }
  5643. return (t13, o13, r19) => {
  5644. for (const e16 of i11)
  5645. e16.fn && (e16.value = e16.fn(t13, o13, r19));
  5646. return c(e15 + ie2.buildOverrideKey(i11)).toString();
  5647. };
  5648. }
  5649. function me2(e15, t12) {
  5650. if (!t12 || 0 === t12.length)
  5651. return e15;
  5652. const o12 = y(e15);
  5653. return ie2.applyOverrides(o12, t12), o12;
  5654. }
  5655. function pe2(e15, t12, i11, o12, r19) {
  5656. let l12 = false, a15 = "";
  5657. for (const n17 of e15)
  5658. n17.primitiveName === t12 && (void 0 !== n17.value ? a15 += `-${n17.primitiveName}-${n17.propertyName}-${JSON.stringify(n17.value)}` : n17.valueExpressionInfo && (l12 = true));
  5659. return r(i11) && "function" == typeof i11 && (l12 = true), r(o12) && "function" == typeof o12 && (l12 = true), r(r19) && "function" == typeof r19 && (l12 = true), [l12, a15];
  5660. }
  5661. var ue2 = (e15) => e15 && 2 === e15.length && e15[0].enable && e15[1].enable && "CIMSolidStroke" === e15[0].type && "CIMSolidFill" === e15[1].type && !e15[0].effects && !e15[1].effects;
  5662. export {
  5663. n5 as n,
  5664. a5 as a,
  5665. g6 as g,
  5666. j4 as j,
  5667. f8 as f,
  5668. t10 as t,
  5669. s11 as s,
  5670. O2 as O,
  5671. V,
  5672. W,
  5673. i9 as i,
  5674. Q2 as Q,
  5675. ae,
  5676. oe2 as oe,
  5677. ie2 as ie,
  5678. pe,
  5679. r17 as r,
  5680. a14 as a2,
  5681. e14 as e,
  5682. o11 as o,
  5683. T3 as T,
  5684. me2 as me
  5685. };
  5686. //# sourceMappingURL=chunk-67RFR4NT.js.map