iclient-mapboxgl-react.js 1.6 MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428324293243032431324323243332434324353243632437324383243932440324413244232443324443244532446324473244832449324503245132452324533245432455324563245732458324593246032461324623246332464324653246632467324683246932470324713247232473324743247532476324773247832479324803248132482324833248432485324863248732488324893249032491324923249332494324953249632497324983249932500325013250232503325043250532506325073250832509325103251132512325133251432515325163251732518325193252032521325223252332524325253252632527325283252932530325313253232533325343253532536325373253832539325403254132542325433254432545325463254732548325493255032551325523255332554325553255632557325583255932560325613256232563325643256532566325673256832569325703257132572325733257432575325763257732578325793258032581325823258332584325853258632587325883258932590325913259232593325943259532596325973259832599326003260132602326033260432605326063260732608326093261032611326123261332614326153261632617326183261932620326213262232623326243262532626326273262832629326303263132632326333263432635326363263732638326393264032641326423264332644326453264632647326483264932650326513265232653326543265532656326573265832659326603266132662326633266432665326663266732668326693267032671326723267332674326753267632677326783267932680326813268232683326843268532686326873268832689326903269132692326933269432695326963269732698326993270032701327023270332704327053270632707327083270932710327113271232713327143271532716327173271832719327203272132722327233272432725327263272732728327293273032731327323273332734327353273632737327383273932740327413274232743327443274532746327473274832749327503275132752327533275432755327563275732758327593276032761327623276332764327653276632767327683276932770327713277232773327743277532776327773277832779327803278132782327833278432785327863278732788327893279032791327923279332794327953279632797327983279932800328013280232803328043280532806328073280832809328103281132812328133281432815328163281732818328193282032821328223282332824328253282632827328283282932830328313283232833328343283532836328373283832839328403284132842328433284432845328463284732848328493285032851328523285332854328553285632857328583285932860328613286232863328643286532866328673286832869328703287132872328733287432875328763287732878328793288032881328823288332884328853288632887328883288932890328913289232893328943289532896328973289832899329003290132902329033290432905329063290732908329093291032911329123291332914329153291632917329183291932920329213292232923329243292532926329273292832929329303293132932329333293432935329363293732938329393294032941329423294332944329453294632947329483294932950329513295232953329543295532956329573295832959329603296132962329633296432965329663296732968329693297032971329723297332974329753297632977329783297932980329813298232983329843298532986329873298832989329903299132992329933299432995329963299732998329993300033001330023300333004330053300633007330083300933010330113301233013330143301533016330173301833019330203302133022330233302433025330263302733028330293303033031330323303333034330353303633037330383303933040330413304233043330443304533046330473304833049330503305133052330533305433055330563305733058330593306033061330623306333064330653306633067330683306933070330713307233073330743307533076330773307833079330803308133082330833308433085330863308733088330893309033091330923309333094330953309633097330983309933100331013310233103331043310533106331073310833109331103311133112331133311433115331163311733118331193312033121331223312333124331253312633127331283312933130331313313233133331343313533136331373313833139331403314133142331433314433145331463314733148331493315033151331523315333154331553315633157331583315933160331613316233163331643316533166331673316833169331703317133172331733317433175331763317733178331793318033181331823318333184331853318633187331883318933190331913319233193331943319533196331973319833199332003320133202332033320433205332063320733208332093321033211332123321333214332153321633217332183321933220332213322233223332243322533226332273322833229332303323133232332333323433235332363323733238332393324033241332423324333244332453324633247332483324933250332513325233253332543325533256332573325833259332603326133262332633326433265332663326733268332693327033271332723327333274332753327633277332783327933280332813328233283332843328533286332873328833289332903329133292332933329433295332963329733298332993330033301333023330333304333053330633307333083330933310333113331233313333143331533316333173331833319333203332133322333233332433325333263332733328333293333033331333323333333334333353333633337333383333933340333413334233343333443334533346333473334833349333503335133352333533335433355333563335733358333593336033361333623336333364333653336633367333683336933370333713337233373333743337533376333773337833379333803338133382333833338433385333863338733388333893339033391333923339333394333953339633397333983339933400334013340233403334043340533406334073340833409334103341133412334133341433415334163341733418334193342033421334223342333424334253342633427334283342933430334313343233433334343343533436334373343833439334403344133442334433344433445334463344733448334493345033451334523345333454334553345633457334583345933460334613346233463334643346533466334673346833469334703347133472334733347433475334763347733478334793348033481334823348333484334853348633487334883348933490334913349233493334943349533496334973349833499335003350133502335033350433505335063350733508335093351033511335123351333514335153351633517335183351933520335213352233523335243352533526335273352833529335303353133532335333353433535335363353733538335393354033541335423354333544335453354633547335483354933550335513355233553335543355533556335573355833559335603356133562335633356433565335663356733568335693357033571335723357333574335753357633577335783357933580335813358233583335843358533586335873358833589335903359133592335933359433595335963359733598335993360033601336023360333604336053360633607336083360933610336113361233613336143361533616336173361833619336203362133622336233362433625336263362733628336293363033631336323363333634336353363633637336383363933640336413364233643336443364533646336473364833649336503365133652336533365433655336563365733658336593366033661336623366333664336653366633667336683366933670336713367233673336743367533676336773367833679336803368133682336833368433685336863368733688336893369033691336923369333694336953369633697336983369933700337013370233703337043370533706337073370833709337103371133712337133371433715337163371733718337193372033721337223372333724337253372633727337283372933730337313373233733337343373533736337373373833739337403374133742337433374433745337463374733748337493375033751337523375333754337553375633757337583375933760337613376233763337643376533766337673376833769337703377133772337733377433775337763377733778337793378033781337823378333784337853378633787337883378933790337913379233793337943379533796337973379833799338003380133802338033380433805338063380733808338093381033811338123381333814338153381633817338183381933820338213382233823338243382533826338273382833829338303383133832338333383433835338363383733838338393384033841338423384333844338453384633847338483384933850338513385233853338543385533856338573385833859338603386133862338633386433865338663386733868338693387033871338723387333874338753387633877338783387933880338813388233883338843388533886338873388833889338903389133892338933389433895338963389733898338993390033901339023390333904339053390633907339083390933910339113391233913339143391533916339173391833919339203392133922339233392433925339263392733928339293393033931339323393333934339353393633937339383393933940339413394233943339443394533946339473394833949339503395133952339533395433955339563395733958339593396033961339623396333964339653396633967339683396933970339713397233973339743397533976339773397833979339803398133982339833398433985339863398733988339893399033991339923399333994339953399633997339983399934000340013400234003340043400534006340073400834009340103401134012340133401434015340163401734018340193402034021340223402334024340253402634027340283402934030340313403234033340343403534036340373403834039340403404134042340433404434045340463404734048340493405034051340523405334054340553405634057340583405934060340613406234063340643406534066340673406834069340703407134072340733407434075340763407734078340793408034081340823408334084340853408634087340883408934090340913409234093340943409534096340973409834099341003410134102341033410434105341063410734108341093411034111341123411334114341153411634117341183411934120341213412234123341243412534126341273412834129341303413134132341333413434135341363413734138341393414034141341423414334144341453414634147341483414934150341513415234153341543415534156341573415834159341603416134162341633416434165341663416734168341693417034171341723417334174341753417634177341783417934180341813418234183341843418534186341873418834189341903419134192341933419434195341963419734198341993420034201342023420334204342053420634207342083420934210342113421234213342143421534216342173421834219342203422134222342233422434225342263422734228342293423034231342323423334234342353423634237342383423934240342413424234243342443424534246342473424834249342503425134252342533425434255342563425734258342593426034261342623426334264342653426634267342683426934270342713427234273342743427534276342773427834279342803428134282342833428434285342863428734288342893429034291342923429334294342953429634297342983429934300343013430234303343043430534306343073430834309343103431134312343133431434315343163431734318343193432034321343223432334324343253432634327343283432934330343313433234333343343433534336343373433834339343403434134342343433434434345343463434734348343493435034351343523435334354343553435634357343583435934360343613436234363343643436534366343673436834369343703437134372343733437434375343763437734378343793438034381343823438334384343853438634387343883438934390343913439234393343943439534396343973439834399344003440134402344033440434405344063440734408344093441034411344123441334414344153441634417344183441934420344213442234423344243442534426344273442834429344303443134432344333443434435344363443734438344393444034441344423444334444344453444634447344483444934450344513445234453344543445534456344573445834459344603446134462344633446434465344663446734468344693447034471344723447334474344753447634477344783447934480344813448234483344843448534486344873448834489344903449134492344933449434495344963449734498344993450034501345023450334504345053450634507345083450934510345113451234513345143451534516345173451834519345203452134522345233452434525345263452734528345293453034531345323453334534345353453634537345383453934540345413454234543345443454534546345473454834549345503455134552345533455434555345563455734558345593456034561345623456334564345653456634567345683456934570345713457234573345743457534576345773457834579345803458134582345833458434585345863458734588345893459034591345923459334594345953459634597345983459934600346013460234603346043460534606346073460834609346103461134612346133461434615346163461734618346193462034621346223462334624346253462634627346283462934630346313463234633346343463534636346373463834639346403464134642346433464434645346463464734648346493465034651346523465334654346553465634657346583465934660346613466234663346643466534666346673466834669346703467134672346733467434675346763467734678346793468034681346823468334684346853468634687346883468934690346913469234693346943469534696346973469834699347003470134702347033470434705347063470734708347093471034711347123471334714347153471634717347183471934720347213472234723347243472534726347273472834729347303473134732347333473434735347363473734738347393474034741347423474334744347453474634747347483474934750347513475234753347543475534756347573475834759347603476134762347633476434765347663476734768347693477034771347723477334774347753477634777347783477934780347813478234783347843478534786347873478834789347903479134792347933479434795347963479734798347993480034801348023480334804348053480634807348083480934810348113481234813348143481534816348173481834819348203482134822348233482434825348263482734828348293483034831348323483334834348353483634837348383483934840348413484234843348443484534846348473484834849348503485134852348533485434855348563485734858348593486034861348623486334864348653486634867348683486934870348713487234873348743487534876348773487834879348803488134882348833488434885348863488734888348893489034891348923489334894348953489634897348983489934900349013490234903349043490534906349073490834909349103491134912349133491434915349163491734918349193492034921349223492334924349253492634927349283492934930349313493234933349343493534936349373493834939349403494134942349433494434945349463494734948349493495034951349523495334954349553495634957349583495934960349613496234963349643496534966349673496834969349703497134972349733497434975349763497734978349793498034981349823498334984349853498634987349883498934990349913499234993349943499534996349973499834999350003500135002350033500435005350063500735008350093501035011350123501335014350153501635017350183501935020350213502235023350243502535026350273502835029350303503135032350333503435035350363503735038350393504035041350423504335044350453504635047350483504935050350513505235053350543505535056350573505835059350603506135062350633506435065350663506735068350693507035071350723507335074350753507635077350783507935080350813508235083350843508535086350873508835089350903509135092350933509435095350963509735098350993510035101351023510335104351053510635107351083510935110351113511235113351143511535116351173511835119351203512135122351233512435125351263512735128351293513035131351323513335134351353513635137351383513935140351413514235143351443514535146351473514835149351503515135152351533515435155351563515735158351593516035161351623516335164351653516635167351683516935170351713517235173351743517535176351773517835179351803518135182351833518435185351863518735188351893519035191351923519335194351953519635197351983519935200352013520235203352043520535206352073520835209352103521135212352133521435215352163521735218352193522035221352223522335224352253522635227352283522935230352313523235233352343523535236352373523835239352403524135242352433524435245352463524735248352493525035251352523525335254352553525635257352583525935260352613526235263352643526535266352673526835269352703527135272352733527435275352763527735278352793528035281352823528335284352853528635287352883528935290352913529235293352943529535296352973529835299353003530135302353033530435305353063530735308353093531035311353123531335314353153531635317353183531935320353213532235323353243532535326353273532835329353303533135332353333533435335353363533735338353393534035341353423534335344353453534635347353483534935350353513535235353353543535535356353573535835359353603536135362353633536435365353663536735368353693537035371353723537335374353753537635377353783537935380353813538235383353843538535386353873538835389353903539135392353933539435395353963539735398353993540035401354023540335404354053540635407354083540935410354113541235413354143541535416354173541835419354203542135422354233542435425354263542735428354293543035431354323543335434354353543635437354383543935440354413544235443354443544535446354473544835449354503545135452354533545435455354563545735458354593546035461354623546335464354653546635467354683546935470354713547235473354743547535476354773547835479354803548135482354833548435485354863548735488354893549035491354923549335494354953549635497354983549935500355013550235503355043550535506355073550835509355103551135512355133551435515355163551735518355193552035521355223552335524355253552635527355283552935530355313553235533355343553535536355373553835539355403554135542355433554435545355463554735548355493555035551355523555335554355553555635557355583555935560355613556235563355643556535566355673556835569355703557135572355733557435575355763557735578355793558035581355823558335584355853558635587355883558935590355913559235593355943559535596355973559835599356003560135602356033560435605356063560735608356093561035611356123561335614356153561635617356183561935620356213562235623356243562535626356273562835629356303563135632356333563435635356363563735638356393564035641356423564335644356453564635647356483564935650356513565235653356543565535656356573565835659356603566135662356633566435665356663566735668356693567035671356723567335674356753567635677356783567935680356813568235683356843568535686356873568835689356903569135692356933569435695356963569735698356993570035701357023570335704357053570635707357083570935710357113571235713357143571535716357173571835719357203572135722357233572435725357263572735728357293573035731357323573335734357353573635737357383573935740357413574235743357443574535746357473574835749357503575135752357533575435755357563575735758357593576035761357623576335764357653576635767357683576935770357713577235773357743577535776357773577835779357803578135782357833578435785357863578735788357893579035791357923579335794357953579635797357983579935800358013580235803358043580535806358073580835809358103581135812358133581435815358163581735818358193582035821358223582335824358253582635827358283582935830358313583235833358343583535836358373583835839358403584135842358433584435845358463584735848358493585035851358523585335854358553585635857358583585935860358613586235863358643586535866358673586835869358703587135872358733587435875358763587735878358793588035881358823588335884358853588635887358883588935890358913589235893358943589535896358973589835899359003590135902359033590435905359063590735908359093591035911359123591335914359153591635917359183591935920359213592235923359243592535926359273592835929359303593135932359333593435935359363593735938359393594035941359423594335944359453594635947359483594935950359513595235953359543595535956359573595835959359603596135962359633596435965359663596735968359693597035971359723597335974359753597635977359783597935980359813598235983359843598535986359873598835989359903599135992359933599435995359963599735998359993600036001360023600336004360053600636007360083600936010360113601236013360143601536016360173601836019360203602136022360233602436025360263602736028360293603036031360323603336034360353603636037360383603936040360413604236043360443604536046360473604836049360503605136052360533605436055360563605736058360593606036061360623606336064360653606636067360683606936070360713607236073360743607536076360773607836079360803608136082360833608436085360863608736088360893609036091360923609336094360953609636097360983609936100
  1. /*!
  2. *
  3. * @supermap/react-iclient.(https://iclient.supermap.io)
  4. * Copyright© 2000 - 2020 SuperMap Software Co.Ltd
  5. * license: Apache-2.0
  6. * version: v10.1.0
  7. *
  8. */
  9. (function webpackUniversalModuleDefinition(root, factory) {
  10. if(typeof exports === 'object' && typeof module === 'object')
  11. module.exports = factory(require("../public/libs/mapboxgl/mapbox-gl-enhance.js"), require("react"), require("three"), require("../public/libs/iclient-mapboxgl/iclient-mapboxgl.min.js"), require("antd"), require("echarts"), require("../public/libs/echarts-layer/EchartsLayer.js"), require("../public/libs/deckgl/deck.gl.min.js"));
  12. else if(typeof define === 'function' && define.amd)
  13. define(["../public/libs/mapboxgl/mapbox-gl-enhance.js", "react", "three", "../public/libs/iclient-mapboxgl/iclient-mapboxgl.min.js", "antd", "echarts", "../public/libs/echarts-layer/EchartsLayer.js", "../public/libs/deckgl/deck.gl.min.js"], factory);
  14. else if(typeof exports === 'object')
  15. exports["Components"] = factory(require("../public/libs/mapboxgl/mapbox-gl-enhance.js"), require("react"), require("three"), require("../public/libs/iclient-mapboxgl/iclient-mapboxgl.min.js"), require("antd"), require("echarts"), require("../public/libs/echarts-layer/EchartsLayer.js"), require("../public/libs/deckgl/deck.gl.min.js"));
  16. else
  17. root["SuperMap"] = root["SuperMap"] || {}, root["SuperMap"]["Components"] = factory(root["mapboxgl"], root["React"], root["THREE"], root["SuperMap"], root["antd"], root["echarts"], root["EchartsLayer"], root["DeckGL"]);
  18. })(window, function(__WEBPACK_EXTERNAL_MODULE__0__, __WEBPACK_EXTERNAL_MODULE__1__, __WEBPACK_EXTERNAL_MODULE__3__, __WEBPACK_EXTERNAL_MODULE__6__, __WEBPACK_EXTERNAL_MODULE__9__, __WEBPACK_EXTERNAL_MODULE__20__, __WEBPACK_EXTERNAL_MODULE__21__, __WEBPACK_EXTERNAL_MODULE__81__) {
  19. return /******/ (function(modules) { // webpackBootstrap
  20. /******/ // The module cache
  21. /******/ var installedModules = {};
  22. /******/
  23. /******/ // The require function
  24. /******/ function __webpack_require__(moduleId) {
  25. /******/
  26. /******/ // Check if module is in cache
  27. /******/ if(installedModules[moduleId]) {
  28. /******/ return installedModules[moduleId].exports;
  29. /******/ }
  30. /******/ // Create a new module (and put it into the cache)
  31. /******/ var module = installedModules[moduleId] = {
  32. /******/ i: moduleId,
  33. /******/ l: false,
  34. /******/ exports: {}
  35. /******/ };
  36. /******/
  37. /******/ // Execute the module function
  38. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  39. /******/
  40. /******/ // Flag the module as loaded
  41. /******/ module.l = true;
  42. /******/
  43. /******/ // Return the exports of the module
  44. /******/ return module.exports;
  45. /******/ }
  46. /******/
  47. /******/
  48. /******/ // expose the modules object (__webpack_modules__)
  49. /******/ __webpack_require__.m = modules;
  50. /******/
  51. /******/ // expose the module cache
  52. /******/ __webpack_require__.c = installedModules;
  53. /******/
  54. /******/ // define getter function for harmony exports
  55. /******/ __webpack_require__.d = function(exports, name, getter) {
  56. /******/ if(!__webpack_require__.o(exports, name)) {
  57. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  58. /******/ }
  59. /******/ };
  60. /******/
  61. /******/ // define __esModule on exports
  62. /******/ __webpack_require__.r = function(exports) {
  63. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  64. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  65. /******/ }
  66. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  67. /******/ };
  68. /******/
  69. /******/ // create a fake namespace object
  70. /******/ // mode & 1: value is a module id, require it
  71. /******/ // mode & 2: merge all properties of value into the ns
  72. /******/ // mode & 4: return value when already ns object
  73. /******/ // mode & 8|1: behave like require
  74. /******/ __webpack_require__.t = function(value, mode) {
  75. /******/ if(mode & 1) value = __webpack_require__(value);
  76. /******/ if(mode & 8) return value;
  77. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  78. /******/ var ns = Object.create(null);
  79. /******/ __webpack_require__.r(ns);
  80. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  81. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  82. /******/ return ns;
  83. /******/ };
  84. /******/
  85. /******/ // getDefaultExport function for compatibility with non-harmony modules
  86. /******/ __webpack_require__.n = function(module) {
  87. /******/ var getter = module && module.__esModule ?
  88. /******/ function getDefault() { return module['default']; } :
  89. /******/ function getModuleExports() { return module; };
  90. /******/ __webpack_require__.d(getter, 'a', getter);
  91. /******/ return getter;
  92. /******/ };
  93. /******/
  94. /******/ // Object.prototype.hasOwnProperty.call
  95. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  96. /******/
  97. /******/ // __webpack_public_path__
  98. /******/ __webpack_require__.p = "";
  99. /******/
  100. /******/
  101. /******/ // Load entry module and return exports
  102. /******/ return __webpack_require__(__webpack_require__.s = 47);
  103. /******/ })
  104. /************************************************************************/
  105. /******/ ([
  106. /* 0 */
  107. /***/ (function(module, exports) {
  108. module.exports = __WEBPACK_EXTERNAL_MODULE__0__;
  109. /***/ }),
  110. /* 1 */
  111. /***/ (function(module, exports) {
  112. module.exports = __WEBPACK_EXTERNAL_MODULE__1__;
  113. /***/ }),
  114. /* 2 */
  115. /***/ (function(module, exports, __webpack_require__) {
  116. "use strict";
  117. exports.__esModule = true;
  118. exports.default = void 0;
  119. var compose = function compose() {
  120. for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
  121. funcs[_key] = arguments[_key];
  122. }
  123. return funcs.reduce(function (a, b) {
  124. return function () {
  125. return a(b.apply(void 0, arguments));
  126. };
  127. }, function (arg) {
  128. return arg;
  129. });
  130. };
  131. var _default = compose;
  132. exports.default = _default;
  133. /***/ }),
  134. /* 3 */
  135. /***/ (function(module, exports) {
  136. module.exports = __WEBPACK_EXTERNAL_MODULE__3__;
  137. /***/ }),
  138. /* 4 */
  139. /***/ (function(module, exports, __webpack_require__) {
  140. /* WEBPACK VAR INJECTION */(function(global, module) {/**
  141. * Lodash (Custom Build) <https://lodash.com/>
  142. * Build: `lodash modularize exports="npm" -o ./`
  143. * Copyright JS Foundation and other contributors <https://js.foundation/>
  144. * Released under MIT license <https://lodash.com/license>
  145. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  146. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  147. */
  148. /** Used as the size to enable large array optimizations. */
  149. var LARGE_ARRAY_SIZE = 200;
  150. /** Used to stand-in for `undefined` hash values. */
  151. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  152. /** Used to compose bitmasks for value comparisons. */
  153. var COMPARE_PARTIAL_FLAG = 1,
  154. COMPARE_UNORDERED_FLAG = 2;
  155. /** Used as references for various `Number` constants. */
  156. var MAX_SAFE_INTEGER = 9007199254740991;
  157. /** `Object#toString` result references. */
  158. var argsTag = '[object Arguments]',
  159. arrayTag = '[object Array]',
  160. asyncTag = '[object AsyncFunction]',
  161. boolTag = '[object Boolean]',
  162. dateTag = '[object Date]',
  163. errorTag = '[object Error]',
  164. funcTag = '[object Function]',
  165. genTag = '[object GeneratorFunction]',
  166. mapTag = '[object Map]',
  167. numberTag = '[object Number]',
  168. nullTag = '[object Null]',
  169. objectTag = '[object Object]',
  170. promiseTag = '[object Promise]',
  171. proxyTag = '[object Proxy]',
  172. regexpTag = '[object RegExp]',
  173. setTag = '[object Set]',
  174. stringTag = '[object String]',
  175. symbolTag = '[object Symbol]',
  176. undefinedTag = '[object Undefined]',
  177. weakMapTag = '[object WeakMap]';
  178. var arrayBufferTag = '[object ArrayBuffer]',
  179. dataViewTag = '[object DataView]',
  180. float32Tag = '[object Float32Array]',
  181. float64Tag = '[object Float64Array]',
  182. int8Tag = '[object Int8Array]',
  183. int16Tag = '[object Int16Array]',
  184. int32Tag = '[object Int32Array]',
  185. uint8Tag = '[object Uint8Array]',
  186. uint8ClampedTag = '[object Uint8ClampedArray]',
  187. uint16Tag = '[object Uint16Array]',
  188. uint32Tag = '[object Uint32Array]';
  189. /**
  190. * Used to match `RegExp`
  191. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  192. */
  193. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
  194. /** Used to detect host constructors (Safari). */
  195. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  196. /** Used to detect unsigned integer values. */
  197. var reIsUint = /^(?:0|[1-9]\d*)$/;
  198. /** Used to identify `toStringTag` values of typed arrays. */
  199. var typedArrayTags = {};
  200. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
  201. typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
  202. /** Detect free variable `global` from Node.js. */
  203. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  204. /** Detect free variable `self`. */
  205. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  206. /** Used as a reference to the global object. */
  207. var root = freeGlobal || freeSelf || Function('return this')();
  208. /** Detect free variable `exports`. */
  209. var freeExports = true && exports && !exports.nodeType && exports;
  210. /** Detect free variable `module`. */
  211. var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
  212. /** Detect the popular CommonJS extension `module.exports`. */
  213. var moduleExports = freeModule && freeModule.exports === freeExports;
  214. /** Detect free variable `process` from Node.js. */
  215. var freeProcess = moduleExports && freeGlobal.process;
  216. /** Used to access faster Node.js helpers. */
  217. var nodeUtil = function () {
  218. try {
  219. return freeProcess && freeProcess.binding && freeProcess.binding('util');
  220. } catch (e) {}
  221. }();
  222. /* Node.js helper references. */
  223. var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
  224. /**
  225. * A specialized version of `_.filter` for arrays without support for
  226. * iteratee shorthands.
  227. *
  228. * @private
  229. * @param {Array} [array] The array to iterate over.
  230. * @param {Function} predicate The function invoked per iteration.
  231. * @returns {Array} Returns the new filtered array.
  232. */
  233. function arrayFilter(array, predicate) {
  234. var index = -1,
  235. length = array == null ? 0 : array.length,
  236. resIndex = 0,
  237. result = [];
  238. while (++index < length) {
  239. var value = array[index];
  240. if (predicate(value, index, array)) {
  241. result[resIndex++] = value;
  242. }
  243. }
  244. return result;
  245. }
  246. /**
  247. * Appends the elements of `values` to `array`.
  248. *
  249. * @private
  250. * @param {Array} array The array to modify.
  251. * @param {Array} values The values to append.
  252. * @returns {Array} Returns `array`.
  253. */
  254. function arrayPush(array, values) {
  255. var index = -1,
  256. length = values.length,
  257. offset = array.length;
  258. while (++index < length) {
  259. array[offset + index] = values[index];
  260. }
  261. return array;
  262. }
  263. /**
  264. * A specialized version of `_.some` for arrays without support for iteratee
  265. * shorthands.
  266. *
  267. * @private
  268. * @param {Array} [array] The array to iterate over.
  269. * @param {Function} predicate The function invoked per iteration.
  270. * @returns {boolean} Returns `true` if any element passes the predicate check,
  271. * else `false`.
  272. */
  273. function arraySome(array, predicate) {
  274. var index = -1,
  275. length = array == null ? 0 : array.length;
  276. while (++index < length) {
  277. if (predicate(array[index], index, array)) {
  278. return true;
  279. }
  280. }
  281. return false;
  282. }
  283. /**
  284. * The base implementation of `_.times` without support for iteratee shorthands
  285. * or max array length checks.
  286. *
  287. * @private
  288. * @param {number} n The number of times to invoke `iteratee`.
  289. * @param {Function} iteratee The function invoked per iteration.
  290. * @returns {Array} Returns the array of results.
  291. */
  292. function baseTimes(n, iteratee) {
  293. var index = -1,
  294. result = Array(n);
  295. while (++index < n) {
  296. result[index] = iteratee(index);
  297. }
  298. return result;
  299. }
  300. /**
  301. * The base implementation of `_.unary` without support for storing metadata.
  302. *
  303. * @private
  304. * @param {Function} func The function to cap arguments for.
  305. * @returns {Function} Returns the new capped function.
  306. */
  307. function baseUnary(func) {
  308. return function (value) {
  309. return func(value);
  310. };
  311. }
  312. /**
  313. * Checks if a `cache` value for `key` exists.
  314. *
  315. * @private
  316. * @param {Object} cache The cache to query.
  317. * @param {string} key The key of the entry to check.
  318. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  319. */
  320. function cacheHas(cache, key) {
  321. return cache.has(key);
  322. }
  323. /**
  324. * Gets the value at `key` of `object`.
  325. *
  326. * @private
  327. * @param {Object} [object] The object to query.
  328. * @param {string} key The key of the property to get.
  329. * @returns {*} Returns the property value.
  330. */
  331. function getValue(object, key) {
  332. return object == null ? undefined : object[key];
  333. }
  334. /**
  335. * Converts `map` to its key-value pairs.
  336. *
  337. * @private
  338. * @param {Object} map The map to convert.
  339. * @returns {Array} Returns the key-value pairs.
  340. */
  341. function mapToArray(map) {
  342. var index = -1,
  343. result = Array(map.size);
  344. map.forEach(function (value, key) {
  345. result[++index] = [key, value];
  346. });
  347. return result;
  348. }
  349. /**
  350. * Creates a unary function that invokes `func` with its argument transformed.
  351. *
  352. * @private
  353. * @param {Function} func The function to wrap.
  354. * @param {Function} transform The argument transform.
  355. * @returns {Function} Returns the new function.
  356. */
  357. function overArg(func, transform) {
  358. return function (arg) {
  359. return func(transform(arg));
  360. };
  361. }
  362. /**
  363. * Converts `set` to an array of its values.
  364. *
  365. * @private
  366. * @param {Object} set The set to convert.
  367. * @returns {Array} Returns the values.
  368. */
  369. function setToArray(set) {
  370. var index = -1,
  371. result = Array(set.size);
  372. set.forEach(function (value) {
  373. result[++index] = value;
  374. });
  375. return result;
  376. }
  377. /** Used for built-in method references. */
  378. var arrayProto = Array.prototype,
  379. funcProto = Function.prototype,
  380. objectProto = Object.prototype;
  381. /** Used to detect overreaching core-js shims. */
  382. var coreJsData = root['__core-js_shared__'];
  383. /** Used to resolve the decompiled source of functions. */
  384. var funcToString = funcProto.toString;
  385. /** Used to check objects for own properties. */
  386. var hasOwnProperty = objectProto.hasOwnProperty;
  387. /** Used to detect methods masquerading as native. */
  388. var maskSrcKey = function () {
  389. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  390. return uid ? 'Symbol(src)_1.' + uid : '';
  391. }();
  392. /**
  393. * Used to resolve the
  394. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  395. * of values.
  396. */
  397. var nativeObjectToString = objectProto.toString;
  398. /** Used to detect if a method is native. */
  399. var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
  400. /** Built-in value references. */
  401. var Buffer = moduleExports ? root.Buffer : undefined,
  402. Symbol = root.Symbol,
  403. Uint8Array = root.Uint8Array,
  404. propertyIsEnumerable = objectProto.propertyIsEnumerable,
  405. splice = arrayProto.splice,
  406. symToStringTag = Symbol ? Symbol.toStringTag : undefined;
  407. /* Built-in method references for those with the same name as other `lodash` methods. */
  408. var nativeGetSymbols = Object.getOwnPropertySymbols,
  409. nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
  410. nativeKeys = overArg(Object.keys, Object);
  411. /* Built-in method references that are verified to be native. */
  412. var DataView = getNative(root, 'DataView'),
  413. Map = getNative(root, 'Map'),
  414. Promise = getNative(root, 'Promise'),
  415. Set = getNative(root, 'Set'),
  416. WeakMap = getNative(root, 'WeakMap'),
  417. nativeCreate = getNative(Object, 'create');
  418. /** Used to detect maps, sets, and weakmaps. */
  419. var dataViewCtorString = toSource(DataView),
  420. mapCtorString = toSource(Map),
  421. promiseCtorString = toSource(Promise),
  422. setCtorString = toSource(Set),
  423. weakMapCtorString = toSource(WeakMap);
  424. /** Used to convert symbols to primitives and strings. */
  425. var symbolProto = Symbol ? Symbol.prototype : undefined,
  426. symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
  427. /**
  428. * Creates a hash object.
  429. *
  430. * @private
  431. * @constructor
  432. * @param {Array} [entries] The key-value pairs to cache.
  433. */
  434. function Hash(entries) {
  435. var index = -1,
  436. length = entries == null ? 0 : entries.length;
  437. this.clear();
  438. while (++index < length) {
  439. var entry = entries[index];
  440. this.set(entry[0], entry[1]);
  441. }
  442. }
  443. /**
  444. * Removes all key-value entries from the hash.
  445. *
  446. * @private
  447. * @name clear
  448. * @memberOf Hash
  449. */
  450. function hashClear() {
  451. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  452. this.size = 0;
  453. }
  454. /**
  455. * Removes `key` and its value from the hash.
  456. *
  457. * @private
  458. * @name delete
  459. * @memberOf Hash
  460. * @param {Object} hash The hash to modify.
  461. * @param {string} key The key of the value to remove.
  462. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  463. */
  464. function hashDelete(key) {
  465. var result = this.has(key) && delete this.__data__[key];
  466. this.size -= result ? 1 : 0;
  467. return result;
  468. }
  469. /**
  470. * Gets the hash value for `key`.
  471. *
  472. * @private
  473. * @name get
  474. * @memberOf Hash
  475. * @param {string} key The key of the value to get.
  476. * @returns {*} Returns the entry value.
  477. */
  478. function hashGet(key) {
  479. var data = this.__data__;
  480. if (nativeCreate) {
  481. var result = data[key];
  482. return result === HASH_UNDEFINED ? undefined : result;
  483. }
  484. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  485. }
  486. /**
  487. * Checks if a hash value for `key` exists.
  488. *
  489. * @private
  490. * @name has
  491. * @memberOf Hash
  492. * @param {string} key The key of the entry to check.
  493. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  494. */
  495. function hashHas(key) {
  496. var data = this.__data__;
  497. return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
  498. }
  499. /**
  500. * Sets the hash `key` to `value`.
  501. *
  502. * @private
  503. * @name set
  504. * @memberOf Hash
  505. * @param {string} key The key of the value to set.
  506. * @param {*} value The value to set.
  507. * @returns {Object} Returns the hash instance.
  508. */
  509. function hashSet(key, value) {
  510. var data = this.__data__;
  511. this.size += this.has(key) ? 0 : 1;
  512. data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value;
  513. return this;
  514. } // Add methods to `Hash`.
  515. Hash.prototype.clear = hashClear;
  516. Hash.prototype['delete'] = hashDelete;
  517. Hash.prototype.get = hashGet;
  518. Hash.prototype.has = hashHas;
  519. Hash.prototype.set = hashSet;
  520. /**
  521. * Creates an list cache object.
  522. *
  523. * @private
  524. * @constructor
  525. * @param {Array} [entries] The key-value pairs to cache.
  526. */
  527. function ListCache(entries) {
  528. var index = -1,
  529. length = entries == null ? 0 : entries.length;
  530. this.clear();
  531. while (++index < length) {
  532. var entry = entries[index];
  533. this.set(entry[0], entry[1]);
  534. }
  535. }
  536. /**
  537. * Removes all key-value entries from the list cache.
  538. *
  539. * @private
  540. * @name clear
  541. * @memberOf ListCache
  542. */
  543. function listCacheClear() {
  544. this.__data__ = [];
  545. this.size = 0;
  546. }
  547. /**
  548. * Removes `key` and its value from the list cache.
  549. *
  550. * @private
  551. * @name delete
  552. * @memberOf ListCache
  553. * @param {string} key The key of the value to remove.
  554. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  555. */
  556. function listCacheDelete(key) {
  557. var data = this.__data__,
  558. index = assocIndexOf(data, key);
  559. if (index < 0) {
  560. return false;
  561. }
  562. var lastIndex = data.length - 1;
  563. if (index == lastIndex) {
  564. data.pop();
  565. } else {
  566. splice.call(data, index, 1);
  567. }
  568. --this.size;
  569. return true;
  570. }
  571. /**
  572. * Gets the list cache value for `key`.
  573. *
  574. * @private
  575. * @name get
  576. * @memberOf ListCache
  577. * @param {string} key The key of the value to get.
  578. * @returns {*} Returns the entry value.
  579. */
  580. function listCacheGet(key) {
  581. var data = this.__data__,
  582. index = assocIndexOf(data, key);
  583. return index < 0 ? undefined : data[index][1];
  584. }
  585. /**
  586. * Checks if a list cache value for `key` exists.
  587. *
  588. * @private
  589. * @name has
  590. * @memberOf ListCache
  591. * @param {string} key The key of the entry to check.
  592. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  593. */
  594. function listCacheHas(key) {
  595. return assocIndexOf(this.__data__, key) > -1;
  596. }
  597. /**
  598. * Sets the list cache `key` to `value`.
  599. *
  600. * @private
  601. * @name set
  602. * @memberOf ListCache
  603. * @param {string} key The key of the value to set.
  604. * @param {*} value The value to set.
  605. * @returns {Object} Returns the list cache instance.
  606. */
  607. function listCacheSet(key, value) {
  608. var data = this.__data__,
  609. index = assocIndexOf(data, key);
  610. if (index < 0) {
  611. ++this.size;
  612. data.push([key, value]);
  613. } else {
  614. data[index][1] = value;
  615. }
  616. return this;
  617. } // Add methods to `ListCache`.
  618. ListCache.prototype.clear = listCacheClear;
  619. ListCache.prototype['delete'] = listCacheDelete;
  620. ListCache.prototype.get = listCacheGet;
  621. ListCache.prototype.has = listCacheHas;
  622. ListCache.prototype.set = listCacheSet;
  623. /**
  624. * Creates a map cache object to store key-value pairs.
  625. *
  626. * @private
  627. * @constructor
  628. * @param {Array} [entries] The key-value pairs to cache.
  629. */
  630. function MapCache(entries) {
  631. var index = -1,
  632. length = entries == null ? 0 : entries.length;
  633. this.clear();
  634. while (++index < length) {
  635. var entry = entries[index];
  636. this.set(entry[0], entry[1]);
  637. }
  638. }
  639. /**
  640. * Removes all key-value entries from the map.
  641. *
  642. * @private
  643. * @name clear
  644. * @memberOf MapCache
  645. */
  646. function mapCacheClear() {
  647. this.size = 0;
  648. this.__data__ = {
  649. 'hash': new Hash(),
  650. 'map': new (Map || ListCache)(),
  651. 'string': new Hash()
  652. };
  653. }
  654. /**
  655. * Removes `key` and its value from the map.
  656. *
  657. * @private
  658. * @name delete
  659. * @memberOf MapCache
  660. * @param {string} key The key of the value to remove.
  661. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  662. */
  663. function mapCacheDelete(key) {
  664. var result = getMapData(this, key)['delete'](key);
  665. this.size -= result ? 1 : 0;
  666. return result;
  667. }
  668. /**
  669. * Gets the map value for `key`.
  670. *
  671. * @private
  672. * @name get
  673. * @memberOf MapCache
  674. * @param {string} key The key of the value to get.
  675. * @returns {*} Returns the entry value.
  676. */
  677. function mapCacheGet(key) {
  678. return getMapData(this, key).get(key);
  679. }
  680. /**
  681. * Checks if a map value for `key` exists.
  682. *
  683. * @private
  684. * @name has
  685. * @memberOf MapCache
  686. * @param {string} key The key of the entry to check.
  687. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  688. */
  689. function mapCacheHas(key) {
  690. return getMapData(this, key).has(key);
  691. }
  692. /**
  693. * Sets the map `key` to `value`.
  694. *
  695. * @private
  696. * @name set
  697. * @memberOf MapCache
  698. * @param {string} key The key of the value to set.
  699. * @param {*} value The value to set.
  700. * @returns {Object} Returns the map cache instance.
  701. */
  702. function mapCacheSet(key, value) {
  703. var data = getMapData(this, key),
  704. size = data.size;
  705. data.set(key, value);
  706. this.size += data.size == size ? 0 : 1;
  707. return this;
  708. } // Add methods to `MapCache`.
  709. MapCache.prototype.clear = mapCacheClear;
  710. MapCache.prototype['delete'] = mapCacheDelete;
  711. MapCache.prototype.get = mapCacheGet;
  712. MapCache.prototype.has = mapCacheHas;
  713. MapCache.prototype.set = mapCacheSet;
  714. /**
  715. *
  716. * Creates an array cache object to store unique values.
  717. *
  718. * @private
  719. * @constructor
  720. * @param {Array} [values] The values to cache.
  721. */
  722. function SetCache(values) {
  723. var index = -1,
  724. length = values == null ? 0 : values.length;
  725. this.__data__ = new MapCache();
  726. while (++index < length) {
  727. this.add(values[index]);
  728. }
  729. }
  730. /**
  731. * Adds `value` to the array cache.
  732. *
  733. * @private
  734. * @name add
  735. * @memberOf SetCache
  736. * @alias push
  737. * @param {*} value The value to cache.
  738. * @returns {Object} Returns the cache instance.
  739. */
  740. function setCacheAdd(value) {
  741. this.__data__.set(value, HASH_UNDEFINED);
  742. return this;
  743. }
  744. /**
  745. * Checks if `value` is in the array cache.
  746. *
  747. * @private
  748. * @name has
  749. * @memberOf SetCache
  750. * @param {*} value The value to search for.
  751. * @returns {number} Returns `true` if `value` is found, else `false`.
  752. */
  753. function setCacheHas(value) {
  754. return this.__data__.has(value);
  755. } // Add methods to `SetCache`.
  756. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
  757. SetCache.prototype.has = setCacheHas;
  758. /**
  759. * Creates a stack cache object to store key-value pairs.
  760. *
  761. * @private
  762. * @constructor
  763. * @param {Array} [entries] The key-value pairs to cache.
  764. */
  765. function Stack(entries) {
  766. var data = this.__data__ = new ListCache(entries);
  767. this.size = data.size;
  768. }
  769. /**
  770. * Removes all key-value entries from the stack.
  771. *
  772. * @private
  773. * @name clear
  774. * @memberOf Stack
  775. */
  776. function stackClear() {
  777. this.__data__ = new ListCache();
  778. this.size = 0;
  779. }
  780. /**
  781. * Removes `key` and its value from the stack.
  782. *
  783. * @private
  784. * @name delete
  785. * @memberOf Stack
  786. * @param {string} key The key of the value to remove.
  787. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  788. */
  789. function stackDelete(key) {
  790. var data = this.__data__,
  791. result = data['delete'](key);
  792. this.size = data.size;
  793. return result;
  794. }
  795. /**
  796. * Gets the stack value for `key`.
  797. *
  798. * @private
  799. * @name get
  800. * @memberOf Stack
  801. * @param {string} key The key of the value to get.
  802. * @returns {*} Returns the entry value.
  803. */
  804. function stackGet(key) {
  805. return this.__data__.get(key);
  806. }
  807. /**
  808. * Checks if a stack value for `key` exists.
  809. *
  810. * @private
  811. * @name has
  812. * @memberOf Stack
  813. * @param {string} key The key of the entry to check.
  814. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  815. */
  816. function stackHas(key) {
  817. return this.__data__.has(key);
  818. }
  819. /**
  820. * Sets the stack `key` to `value`.
  821. *
  822. * @private
  823. * @name set
  824. * @memberOf Stack
  825. * @param {string} key The key of the value to set.
  826. * @param {*} value The value to set.
  827. * @returns {Object} Returns the stack cache instance.
  828. */
  829. function stackSet(key, value) {
  830. var data = this.__data__;
  831. if (data instanceof ListCache) {
  832. var pairs = data.__data__;
  833. if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) {
  834. pairs.push([key, value]);
  835. this.size = ++data.size;
  836. return this;
  837. }
  838. data = this.__data__ = new MapCache(pairs);
  839. }
  840. data.set(key, value);
  841. this.size = data.size;
  842. return this;
  843. } // Add methods to `Stack`.
  844. Stack.prototype.clear = stackClear;
  845. Stack.prototype['delete'] = stackDelete;
  846. Stack.prototype.get = stackGet;
  847. Stack.prototype.has = stackHas;
  848. Stack.prototype.set = stackSet;
  849. /**
  850. * Creates an array of the enumerable property names of the array-like `value`.
  851. *
  852. * @private
  853. * @param {*} value The value to query.
  854. * @param {boolean} inherited Specify returning inherited property names.
  855. * @returns {Array} Returns the array of property names.
  856. */
  857. function arrayLikeKeys(value, inherited) {
  858. var isArr = isArray(value),
  859. isArg = !isArr && isArguments(value),
  860. isBuff = !isArr && !isArg && isBuffer(value),
  861. isType = !isArr && !isArg && !isBuff && isTypedArray(value),
  862. skipIndexes = isArr || isArg || isBuff || isType,
  863. result = skipIndexes ? baseTimes(value.length, String) : [],
  864. length = result.length;
  865. for (var key in value) {
  866. if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode.
  867. key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers.
  868. isBuff && (key == 'offset' || key == 'parent') || // PhantomJS 2 has enumerable non-index properties on typed arrays.
  869. isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') || // Skip index properties.
  870. isIndex(key, length)))) {
  871. result.push(key);
  872. }
  873. }
  874. return result;
  875. }
  876. /**
  877. * Gets the index at which the `key` is found in `array` of key-value pairs.
  878. *
  879. * @private
  880. * @param {Array} array The array to inspect.
  881. * @param {*} key The key to search for.
  882. * @returns {number} Returns the index of the matched value, else `-1`.
  883. */
  884. function assocIndexOf(array, key) {
  885. var length = array.length;
  886. while (length--) {
  887. if (eq(array[length][0], key)) {
  888. return length;
  889. }
  890. }
  891. return -1;
  892. }
  893. /**
  894. * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
  895. * `keysFunc` and `symbolsFunc` to get the enumerable property names and
  896. * symbols of `object`.
  897. *
  898. * @private
  899. * @param {Object} object The object to query.
  900. * @param {Function} keysFunc The function to get the keys of `object`.
  901. * @param {Function} symbolsFunc The function to get the symbols of `object`.
  902. * @returns {Array} Returns the array of property names and symbols.
  903. */
  904. function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  905. var result = keysFunc(object);
  906. return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
  907. }
  908. /**
  909. * The base implementation of `getTag` without fallbacks for buggy environments.
  910. *
  911. * @private
  912. * @param {*} value The value to query.
  913. * @returns {string} Returns the `toStringTag`.
  914. */
  915. function baseGetTag(value) {
  916. if (value == null) {
  917. return value === undefined ? undefinedTag : nullTag;
  918. }
  919. return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
  920. }
  921. /**
  922. * The base implementation of `_.isArguments`.
  923. *
  924. * @private
  925. * @param {*} value The value to check.
  926. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  927. */
  928. function baseIsArguments(value) {
  929. return isObjectLike(value) && baseGetTag(value) == argsTag;
  930. }
  931. /**
  932. * The base implementation of `_.isEqual` which supports partial comparisons
  933. * and tracks traversed objects.
  934. *
  935. * @private
  936. * @param {*} value The value to compare.
  937. * @param {*} other The other value to compare.
  938. * @param {boolean} bitmask The bitmask flags.
  939. * 1 - Unordered comparison
  940. * 2 - Partial comparison
  941. * @param {Function} [customizer] The function to customize comparisons.
  942. * @param {Object} [stack] Tracks traversed `value` and `other` objects.
  943. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  944. */
  945. function baseIsEqual(value, other, bitmask, customizer, stack) {
  946. if (value === other) {
  947. return true;
  948. }
  949. if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
  950. return value !== value && other !== other;
  951. }
  952. return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
  953. }
  954. /**
  955. * A specialized version of `baseIsEqual` for arrays and objects which performs
  956. * deep comparisons and tracks traversed objects enabling objects with circular
  957. * references to be compared.
  958. *
  959. * @private
  960. * @param {Object} object The object to compare.
  961. * @param {Object} other The other object to compare.
  962. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  963. * @param {Function} customizer The function to customize comparisons.
  964. * @param {Function} equalFunc The function to determine equivalents of values.
  965. * @param {Object} [stack] Tracks traversed `object` and `other` objects.
  966. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  967. */
  968. function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
  969. var objIsArr = isArray(object),
  970. othIsArr = isArray(other),
  971. objTag = objIsArr ? arrayTag : getTag(object),
  972. othTag = othIsArr ? arrayTag : getTag(other);
  973. objTag = objTag == argsTag ? objectTag : objTag;
  974. othTag = othTag == argsTag ? objectTag : othTag;
  975. var objIsObj = objTag == objectTag,
  976. othIsObj = othTag == objectTag,
  977. isSameTag = objTag == othTag;
  978. if (isSameTag && isBuffer(object)) {
  979. if (!isBuffer(other)) {
  980. return false;
  981. }
  982. objIsArr = true;
  983. objIsObj = false;
  984. }
  985. if (isSameTag && !objIsObj) {
  986. stack || (stack = new Stack());
  987. return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
  988. }
  989. if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
  990. var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
  991. othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
  992. if (objIsWrapped || othIsWrapped) {
  993. var objUnwrapped = objIsWrapped ? object.value() : object,
  994. othUnwrapped = othIsWrapped ? other.value() : other;
  995. stack || (stack = new Stack());
  996. return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
  997. }
  998. }
  999. if (!isSameTag) {
  1000. return false;
  1001. }
  1002. stack || (stack = new Stack());
  1003. return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
  1004. }
  1005. /**
  1006. * The base implementation of `_.isNative` without bad shim checks.
  1007. *
  1008. * @private
  1009. * @param {*} value The value to check.
  1010. * @returns {boolean} Returns `true` if `value` is a native function,
  1011. * else `false`.
  1012. */
  1013. function baseIsNative(value) {
  1014. if (!isObject(value) || isMasked(value)) {
  1015. return false;
  1016. }
  1017. var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
  1018. return pattern.test(toSource(value));
  1019. }
  1020. /**
  1021. * The base implementation of `_.isTypedArray` without Node.js optimizations.
  1022. *
  1023. * @private
  1024. * @param {*} value The value to check.
  1025. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  1026. */
  1027. function baseIsTypedArray(value) {
  1028. return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
  1029. }
  1030. /**
  1031. * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
  1032. *
  1033. * @private
  1034. * @param {Object} object The object to query.
  1035. * @returns {Array} Returns the array of property names.
  1036. */
  1037. function baseKeys(object) {
  1038. if (!isPrototype(object)) {
  1039. return nativeKeys(object);
  1040. }
  1041. var result = [];
  1042. for (var key in Object(object)) {
  1043. if (hasOwnProperty.call(object, key) && key != 'constructor') {
  1044. result.push(key);
  1045. }
  1046. }
  1047. return result;
  1048. }
  1049. /**
  1050. * A specialized version of `baseIsEqualDeep` for arrays with support for
  1051. * partial deep comparisons.
  1052. *
  1053. * @private
  1054. * @param {Array} array The array to compare.
  1055. * @param {Array} other The other array to compare.
  1056. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  1057. * @param {Function} customizer The function to customize comparisons.
  1058. * @param {Function} equalFunc The function to determine equivalents of values.
  1059. * @param {Object} stack Tracks traversed `array` and `other` objects.
  1060. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
  1061. */
  1062. function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
  1063. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  1064. arrLength = array.length,
  1065. othLength = other.length;
  1066. if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
  1067. return false;
  1068. } // Assume cyclic values are equal.
  1069. var stacked = stack.get(array);
  1070. if (stacked && stack.get(other)) {
  1071. return stacked == other;
  1072. }
  1073. var index = -1,
  1074. result = true,
  1075. seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined;
  1076. stack.set(array, other);
  1077. stack.set(other, array); // Ignore non-index properties.
  1078. while (++index < arrLength) {
  1079. var arrValue = array[index],
  1080. othValue = other[index];
  1081. if (customizer) {
  1082. var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
  1083. }
  1084. if (compared !== undefined) {
  1085. if (compared) {
  1086. continue;
  1087. }
  1088. result = false;
  1089. break;
  1090. } // Recursively compare arrays (susceptible to call stack limits).
  1091. if (seen) {
  1092. if (!arraySome(other, function (othValue, othIndex) {
  1093. if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
  1094. return seen.push(othIndex);
  1095. }
  1096. })) {
  1097. result = false;
  1098. break;
  1099. }
  1100. } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
  1101. result = false;
  1102. break;
  1103. }
  1104. }
  1105. stack['delete'](array);
  1106. stack['delete'](other);
  1107. return result;
  1108. }
  1109. /**
  1110. * A specialized version of `baseIsEqualDeep` for comparing objects of
  1111. * the same `toStringTag`.
  1112. *
  1113. * **Note:** This function only supports comparing values with tags of
  1114. * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
  1115. *
  1116. * @private
  1117. * @param {Object} object The object to compare.
  1118. * @param {Object} other The other object to compare.
  1119. * @param {string} tag The `toStringTag` of the objects to compare.
  1120. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  1121. * @param {Function} customizer The function to customize comparisons.
  1122. * @param {Function} equalFunc The function to determine equivalents of values.
  1123. * @param {Object} stack Tracks traversed `object` and `other` objects.
  1124. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  1125. */
  1126. function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
  1127. switch (tag) {
  1128. case dataViewTag:
  1129. if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
  1130. return false;
  1131. }
  1132. object = object.buffer;
  1133. other = other.buffer;
  1134. case arrayBufferTag:
  1135. if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
  1136. return false;
  1137. }
  1138. return true;
  1139. case boolTag:
  1140. case dateTag:
  1141. case numberTag:
  1142. // Coerce booleans to `1` or `0` and dates to milliseconds.
  1143. // Invalid dates are coerced to `NaN`.
  1144. return eq(+object, +other);
  1145. case errorTag:
  1146. return object.name == other.name && object.message == other.message;
  1147. case regexpTag:
  1148. case stringTag:
  1149. // Coerce regexes to strings and treat strings, primitives and objects,
  1150. // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
  1151. // for more details.
  1152. return object == other + '';
  1153. case mapTag:
  1154. var convert = mapToArray;
  1155. case setTag:
  1156. var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
  1157. convert || (convert = setToArray);
  1158. if (object.size != other.size && !isPartial) {
  1159. return false;
  1160. } // Assume cyclic values are equal.
  1161. var stacked = stack.get(object);
  1162. if (stacked) {
  1163. return stacked == other;
  1164. }
  1165. bitmask |= COMPARE_UNORDERED_FLAG; // Recursively compare objects (susceptible to call stack limits).
  1166. stack.set(object, other);
  1167. var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
  1168. stack['delete'](object);
  1169. return result;
  1170. case symbolTag:
  1171. if (symbolValueOf) {
  1172. return symbolValueOf.call(object) == symbolValueOf.call(other);
  1173. }
  1174. }
  1175. return false;
  1176. }
  1177. /**
  1178. * A specialized version of `baseIsEqualDeep` for objects with support for
  1179. * partial deep comparisons.
  1180. *
  1181. * @private
  1182. * @param {Object} object The object to compare.
  1183. * @param {Object} other The other object to compare.
  1184. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  1185. * @param {Function} customizer The function to customize comparisons.
  1186. * @param {Function} equalFunc The function to determine equivalents of values.
  1187. * @param {Object} stack Tracks traversed `object` and `other` objects.
  1188. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  1189. */
  1190. function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
  1191. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  1192. objProps = getAllKeys(object),
  1193. objLength = objProps.length,
  1194. othProps = getAllKeys(other),
  1195. othLength = othProps.length;
  1196. if (objLength != othLength && !isPartial) {
  1197. return false;
  1198. }
  1199. var index = objLength;
  1200. while (index--) {
  1201. var key = objProps[index];
  1202. if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
  1203. return false;
  1204. }
  1205. } // Assume cyclic values are equal.
  1206. var stacked = stack.get(object);
  1207. if (stacked && stack.get(other)) {
  1208. return stacked == other;
  1209. }
  1210. var result = true;
  1211. stack.set(object, other);
  1212. stack.set(other, object);
  1213. var skipCtor = isPartial;
  1214. while (++index < objLength) {
  1215. key = objProps[index];
  1216. var objValue = object[key],
  1217. othValue = other[key];
  1218. if (customizer) {
  1219. var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
  1220. } // Recursively compare objects (susceptible to call stack limits).
  1221. if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
  1222. result = false;
  1223. break;
  1224. }
  1225. skipCtor || (skipCtor = key == 'constructor');
  1226. }
  1227. if (result && !skipCtor) {
  1228. var objCtor = object.constructor,
  1229. othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal.
  1230. if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) {
  1231. result = false;
  1232. }
  1233. }
  1234. stack['delete'](object);
  1235. stack['delete'](other);
  1236. return result;
  1237. }
  1238. /**
  1239. * Creates an array of own enumerable property names and symbols of `object`.
  1240. *
  1241. * @private
  1242. * @param {Object} object The object to query.
  1243. * @returns {Array} Returns the array of property names and symbols.
  1244. */
  1245. function getAllKeys(object) {
  1246. return baseGetAllKeys(object, keys, getSymbols);
  1247. }
  1248. /**
  1249. * Gets the data for `map`.
  1250. *
  1251. * @private
  1252. * @param {Object} map The map to query.
  1253. * @param {string} key The reference key.
  1254. * @returns {*} Returns the map data.
  1255. */
  1256. function getMapData(map, key) {
  1257. var data = map.__data__;
  1258. return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map;
  1259. }
  1260. /**
  1261. * Gets the native function at `key` of `object`.
  1262. *
  1263. * @private
  1264. * @param {Object} object The object to query.
  1265. * @param {string} key The key of the method to get.
  1266. * @returns {*} Returns the function if it's native, else `undefined`.
  1267. */
  1268. function getNative(object, key) {
  1269. var value = getValue(object, key);
  1270. return baseIsNative(value) ? value : undefined;
  1271. }
  1272. /**
  1273. * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
  1274. *
  1275. * @private
  1276. * @param {*} value The value to query.
  1277. * @returns {string} Returns the raw `toStringTag`.
  1278. */
  1279. function getRawTag(value) {
  1280. var isOwn = hasOwnProperty.call(value, symToStringTag),
  1281. tag = value[symToStringTag];
  1282. try {
  1283. value[symToStringTag] = undefined;
  1284. var unmasked = true;
  1285. } catch (e) {}
  1286. var result = nativeObjectToString.call(value);
  1287. if (unmasked) {
  1288. if (isOwn) {
  1289. value[symToStringTag] = tag;
  1290. } else {
  1291. delete value[symToStringTag];
  1292. }
  1293. }
  1294. return result;
  1295. }
  1296. /**
  1297. * Creates an array of the own enumerable symbols of `object`.
  1298. *
  1299. * @private
  1300. * @param {Object} object The object to query.
  1301. * @returns {Array} Returns the array of symbols.
  1302. */
  1303. var getSymbols = !nativeGetSymbols ? stubArray : function (object) {
  1304. if (object == null) {
  1305. return [];
  1306. }
  1307. object = Object(object);
  1308. return arrayFilter(nativeGetSymbols(object), function (symbol) {
  1309. return propertyIsEnumerable.call(object, symbol);
  1310. });
  1311. };
  1312. /**
  1313. * Gets the `toStringTag` of `value`.
  1314. *
  1315. * @private
  1316. * @param {*} value The value to query.
  1317. * @returns {string} Returns the `toStringTag`.
  1318. */
  1319. var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
  1320. if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
  1321. getTag = function getTag(value) {
  1322. var result = baseGetTag(value),
  1323. Ctor = result == objectTag ? value.constructor : undefined,
  1324. ctorString = Ctor ? toSource(Ctor) : '';
  1325. if (ctorString) {
  1326. switch (ctorString) {
  1327. case dataViewCtorString:
  1328. return dataViewTag;
  1329. case mapCtorString:
  1330. return mapTag;
  1331. case promiseCtorString:
  1332. return promiseTag;
  1333. case setCtorString:
  1334. return setTag;
  1335. case weakMapCtorString:
  1336. return weakMapTag;
  1337. }
  1338. }
  1339. return result;
  1340. };
  1341. }
  1342. /**
  1343. * Checks if `value` is a valid array-like index.
  1344. *
  1345. * @private
  1346. * @param {*} value The value to check.
  1347. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  1348. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  1349. */
  1350. function isIndex(value, length) {
  1351. length = length == null ? MAX_SAFE_INTEGER : length;
  1352. return !!length && (typeof value == 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
  1353. }
  1354. /**
  1355. * Checks if `value` is suitable for use as unique object key.
  1356. *
  1357. * @private
  1358. * @param {*} value The value to check.
  1359. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  1360. */
  1361. function isKeyable(value) {
  1362. var type = typeof value;
  1363. return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null;
  1364. }
  1365. /**
  1366. * Checks if `func` has its source masked.
  1367. *
  1368. * @private
  1369. * @param {Function} func The function to check.
  1370. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  1371. */
  1372. function isMasked(func) {
  1373. return !!maskSrcKey && maskSrcKey in func;
  1374. }
  1375. /**
  1376. * Checks if `value` is likely a prototype object.
  1377. *
  1378. * @private
  1379. * @param {*} value The value to check.
  1380. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
  1381. */
  1382. function isPrototype(value) {
  1383. var Ctor = value && value.constructor,
  1384. proto = typeof Ctor == 'function' && Ctor.prototype || objectProto;
  1385. return value === proto;
  1386. }
  1387. /**
  1388. * Converts `value` to a string using `Object.prototype.toString`.
  1389. *
  1390. * @private
  1391. * @param {*} value The value to convert.
  1392. * @returns {string} Returns the converted string.
  1393. */
  1394. function objectToString(value) {
  1395. return nativeObjectToString.call(value);
  1396. }
  1397. /**
  1398. * Converts `func` to its source code.
  1399. *
  1400. * @private
  1401. * @param {Function} func The function to convert.
  1402. * @returns {string} Returns the source code.
  1403. */
  1404. function toSource(func) {
  1405. if (func != null) {
  1406. try {
  1407. return funcToString.call(func);
  1408. } catch (e) {}
  1409. try {
  1410. return func + '';
  1411. } catch (e) {}
  1412. }
  1413. return '';
  1414. }
  1415. /**
  1416. * Performs a
  1417. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  1418. * comparison between two values to determine if they are equivalent.
  1419. *
  1420. * @static
  1421. * @memberOf _
  1422. * @since 4.0.0
  1423. * @category Lang
  1424. * @param {*} value The value to compare.
  1425. * @param {*} other The other value to compare.
  1426. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  1427. * @example
  1428. *
  1429. * var object = { 'a': 1 };
  1430. * var other = { 'a': 1 };
  1431. *
  1432. * _.eq(object, object);
  1433. * // => true
  1434. *
  1435. * _.eq(object, other);
  1436. * // => false
  1437. *
  1438. * _.eq('a', 'a');
  1439. * // => true
  1440. *
  1441. * _.eq('a', Object('a'));
  1442. * // => false
  1443. *
  1444. * _.eq(NaN, NaN);
  1445. * // => true
  1446. */
  1447. function eq(value, other) {
  1448. return value === other || value !== value && other !== other;
  1449. }
  1450. /**
  1451. * Checks if `value` is likely an `arguments` object.
  1452. *
  1453. * @static
  1454. * @memberOf _
  1455. * @since 0.1.0
  1456. * @category Lang
  1457. * @param {*} value The value to check.
  1458. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  1459. * else `false`.
  1460. * @example
  1461. *
  1462. * _.isArguments(function() { return arguments; }());
  1463. * // => true
  1464. *
  1465. * _.isArguments([1, 2, 3]);
  1466. * // => false
  1467. */
  1468. var isArguments = baseIsArguments(function () {
  1469. return arguments;
  1470. }()) ? baseIsArguments : function (value) {
  1471. return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
  1472. };
  1473. /**
  1474. * Checks if `value` is classified as an `Array` object.
  1475. *
  1476. * @static
  1477. * @memberOf _
  1478. * @since 0.1.0
  1479. * @category Lang
  1480. * @param {*} value The value to check.
  1481. * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  1482. * @example
  1483. *
  1484. * _.isArray([1, 2, 3]);
  1485. * // => true
  1486. *
  1487. * _.isArray(document.body.children);
  1488. * // => false
  1489. *
  1490. * _.isArray('abc');
  1491. * // => false
  1492. *
  1493. * _.isArray(_.noop);
  1494. * // => false
  1495. */
  1496. var isArray = Array.isArray;
  1497. /**
  1498. * Checks if `value` is array-like. A value is considered array-like if it's
  1499. * not a function and has a `value.length` that's an integer greater than or
  1500. * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
  1501. *
  1502. * @static
  1503. * @memberOf _
  1504. * @since 4.0.0
  1505. * @category Lang
  1506. * @param {*} value The value to check.
  1507. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  1508. * @example
  1509. *
  1510. * _.isArrayLike([1, 2, 3]);
  1511. * // => true
  1512. *
  1513. * _.isArrayLike(document.body.children);
  1514. * // => true
  1515. *
  1516. * _.isArrayLike('abc');
  1517. * // => true
  1518. *
  1519. * _.isArrayLike(_.noop);
  1520. * // => false
  1521. */
  1522. function isArrayLike(value) {
  1523. return value != null && isLength(value.length) && !isFunction(value);
  1524. }
  1525. /**
  1526. * Checks if `value` is a buffer.
  1527. *
  1528. * @static
  1529. * @memberOf _
  1530. * @since 4.3.0
  1531. * @category Lang
  1532. * @param {*} value The value to check.
  1533. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
  1534. * @example
  1535. *
  1536. * _.isBuffer(new Buffer(2));
  1537. * // => true
  1538. *
  1539. * _.isBuffer(new Uint8Array(2));
  1540. * // => false
  1541. */
  1542. var isBuffer = nativeIsBuffer || stubFalse;
  1543. /**
  1544. * Performs a deep comparison between two values to determine if they are
  1545. * equivalent.
  1546. *
  1547. * **Note:** This method supports comparing arrays, array buffers, booleans,
  1548. * date objects, error objects, maps, numbers, `Object` objects, regexes,
  1549. * sets, strings, symbols, and typed arrays. `Object` objects are compared
  1550. * by their own, not inherited, enumerable properties. Functions and DOM
  1551. * nodes are compared by strict equality, i.e. `===`.
  1552. *
  1553. * @static
  1554. * @memberOf _
  1555. * @since 0.1.0
  1556. * @category Lang
  1557. * @param {*} value The value to compare.
  1558. * @param {*} other The other value to compare.
  1559. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  1560. * @example
  1561. *
  1562. * var object = { 'a': 1 };
  1563. * var other = { 'a': 1 };
  1564. *
  1565. * _.isEqual(object, other);
  1566. * // => true
  1567. *
  1568. * object === other;
  1569. * // => false
  1570. */
  1571. function isEqual(value, other) {
  1572. return baseIsEqual(value, other);
  1573. }
  1574. /**
  1575. * Checks if `value` is classified as a `Function` object.
  1576. *
  1577. * @static
  1578. * @memberOf _
  1579. * @since 0.1.0
  1580. * @category Lang
  1581. * @param {*} value The value to check.
  1582. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  1583. * @example
  1584. *
  1585. * _.isFunction(_);
  1586. * // => true
  1587. *
  1588. * _.isFunction(/abc/);
  1589. * // => false
  1590. */
  1591. function isFunction(value) {
  1592. if (!isObject(value)) {
  1593. return false;
  1594. } // The use of `Object#toString` avoids issues with the `typeof` operator
  1595. // in Safari 9 which returns 'object' for typed arrays and other constructors.
  1596. var tag = baseGetTag(value);
  1597. return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
  1598. }
  1599. /**
  1600. * Checks if `value` is a valid array-like length.
  1601. *
  1602. * **Note:** This method is loosely based on
  1603. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  1604. *
  1605. * @static
  1606. * @memberOf _
  1607. * @since 4.0.0
  1608. * @category Lang
  1609. * @param {*} value The value to check.
  1610. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  1611. * @example
  1612. *
  1613. * _.isLength(3);
  1614. * // => true
  1615. *
  1616. * _.isLength(Number.MIN_VALUE);
  1617. * // => false
  1618. *
  1619. * _.isLength(Infinity);
  1620. * // => false
  1621. *
  1622. * _.isLength('3');
  1623. * // => false
  1624. */
  1625. function isLength(value) {
  1626. return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  1627. }
  1628. /**
  1629. * Checks if `value` is the
  1630. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  1631. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  1632. *
  1633. * @static
  1634. * @memberOf _
  1635. * @since 0.1.0
  1636. * @category Lang
  1637. * @param {*} value The value to check.
  1638. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  1639. * @example
  1640. *
  1641. * _.isObject({});
  1642. * // => true
  1643. *
  1644. * _.isObject([1, 2, 3]);
  1645. * // => true
  1646. *
  1647. * _.isObject(_.noop);
  1648. * // => true
  1649. *
  1650. * _.isObject(null);
  1651. * // => false
  1652. */
  1653. function isObject(value) {
  1654. var type = typeof value;
  1655. return value != null && (type == 'object' || type == 'function');
  1656. }
  1657. /**
  1658. * Checks if `value` is object-like. A value is object-like if it's not `null`
  1659. * and has a `typeof` result of "object".
  1660. *
  1661. * @static
  1662. * @memberOf _
  1663. * @since 4.0.0
  1664. * @category Lang
  1665. * @param {*} value The value to check.
  1666. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  1667. * @example
  1668. *
  1669. * _.isObjectLike({});
  1670. * // => true
  1671. *
  1672. * _.isObjectLike([1, 2, 3]);
  1673. * // => true
  1674. *
  1675. * _.isObjectLike(_.noop);
  1676. * // => false
  1677. *
  1678. * _.isObjectLike(null);
  1679. * // => false
  1680. */
  1681. function isObjectLike(value) {
  1682. return value != null && typeof value == 'object';
  1683. }
  1684. /**
  1685. * Checks if `value` is classified as a typed array.
  1686. *
  1687. * @static
  1688. * @memberOf _
  1689. * @since 3.0.0
  1690. * @category Lang
  1691. * @param {*} value The value to check.
  1692. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  1693. * @example
  1694. *
  1695. * _.isTypedArray(new Uint8Array);
  1696. * // => true
  1697. *
  1698. * _.isTypedArray([]);
  1699. * // => false
  1700. */
  1701. var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
  1702. /**
  1703. * Creates an array of the own enumerable property names of `object`.
  1704. *
  1705. * **Note:** Non-object values are coerced to objects. See the
  1706. * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  1707. * for more details.
  1708. *
  1709. * @static
  1710. * @since 0.1.0
  1711. * @memberOf _
  1712. * @category Object
  1713. * @param {Object} object The object to query.
  1714. * @returns {Array} Returns the array of property names.
  1715. * @example
  1716. *
  1717. * function Foo() {
  1718. * this.a = 1;
  1719. * this.b = 2;
  1720. * }
  1721. *
  1722. * Foo.prototype.c = 3;
  1723. *
  1724. * _.keys(new Foo);
  1725. * // => ['a', 'b'] (iteration order is not guaranteed)
  1726. *
  1727. * _.keys('hi');
  1728. * // => ['0', '1']
  1729. */
  1730. function keys(object) {
  1731. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  1732. }
  1733. /**
  1734. * This method returns a new empty array.
  1735. *
  1736. * @static
  1737. * @memberOf _
  1738. * @since 4.13.0
  1739. * @category Util
  1740. * @returns {Array} Returns the new empty array.
  1741. * @example
  1742. *
  1743. * var arrays = _.times(2, _.stubArray);
  1744. *
  1745. * console.log(arrays);
  1746. * // => [[], []]
  1747. *
  1748. * console.log(arrays[0] === arrays[1]);
  1749. * // => false
  1750. */
  1751. function stubArray() {
  1752. return [];
  1753. }
  1754. /**
  1755. * This method returns `false`.
  1756. *
  1757. * @static
  1758. * @memberOf _
  1759. * @since 4.13.0
  1760. * @category Util
  1761. * @returns {boolean} Returns `false`.
  1762. * @example
  1763. *
  1764. * _.times(2, _.stubFalse);
  1765. * // => [false, false]
  1766. */
  1767. function stubFalse() {
  1768. return false;
  1769. }
  1770. module.exports = isEqual;
  1771. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(5), __webpack_require__(32)(module)))
  1772. /***/ }),
  1773. /* 5 */
  1774. /***/ (function(module, exports) {
  1775. var g; // This works in non-strict mode
  1776. g = function () {
  1777. return this;
  1778. }();
  1779. try {
  1780. // This works if eval is allowed (see CSP)
  1781. g = g || new Function("return this")();
  1782. } catch (e) {
  1783. // This works if the window reference is available
  1784. if (typeof window === "object") g = window;
  1785. } // g can still be undefined, but nothing to do about it...
  1786. // We return undefined, instead of nothing here, so it's
  1787. // easier to handle this case. if(!global) { ...}
  1788. module.exports = g;
  1789. /***/ }),
  1790. /* 6 */
  1791. /***/ (function(module, exports) {
  1792. module.exports = __WEBPACK_EXTERNAL_MODULE__6__;
  1793. /***/ }),
  1794. /* 7 */
  1795. /***/ (function(module, exports, __webpack_require__) {
  1796. "use strict";
  1797. // Copyright Joyent, Inc. and other Node contributors.
  1798. //
  1799. // Permission is hereby granted, free of charge, to any person obtaining a
  1800. // copy of this software and associated documentation files (the
  1801. // "Software"), to deal in the Software without restriction, including
  1802. // without limitation the rights to use, copy, modify, merge, publish,
  1803. // distribute, sublicense, and/or sell copies of the Software, and to permit
  1804. // persons to whom the Software is furnished to do so, subject to the
  1805. // following conditions:
  1806. //
  1807. // The above copyright notice and this permission notice shall be included
  1808. // in all copies or substantial portions of the Software.
  1809. //
  1810. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  1811. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  1812. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  1813. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  1814. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  1815. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  1816. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  1817. // a duplex stream is just a stream that is both readable and writable.
  1818. // Since JS doesn't have multiple prototypal inheritance, this class
  1819. // prototypally inherits from Readable, and then parasitically from
  1820. // Writable.
  1821. /*<replacement>*/
  1822. var pna = __webpack_require__(17);
  1823. /*</replacement>*/
  1824. /*<replacement>*/
  1825. var objectKeys = Object.keys || function (obj) {
  1826. var keys = [];
  1827. for (var key in obj) {
  1828. keys.push(key);
  1829. }
  1830. return keys;
  1831. };
  1832. /*</replacement>*/
  1833. module.exports = Duplex;
  1834. /*<replacement>*/
  1835. var util = __webpack_require__(15);
  1836. util.inherits = __webpack_require__(11);
  1837. /*</replacement>*/
  1838. var Readable = __webpack_require__(35);
  1839. var Writable = __webpack_require__(28);
  1840. util.inherits(Duplex, Readable);
  1841. {
  1842. // avoid scope creep, the keys array can then be collected
  1843. var keys = objectKeys(Writable.prototype);
  1844. for (var v = 0; v < keys.length; v++) {
  1845. var method = keys[v];
  1846. if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
  1847. }
  1848. }
  1849. function Duplex(options) {
  1850. if (!(this instanceof Duplex)) return new Duplex(options);
  1851. Readable.call(this, options);
  1852. Writable.call(this, options);
  1853. if (options && options.readable === false) this.readable = false;
  1854. if (options && options.writable === false) this.writable = false;
  1855. this.allowHalfOpen = true;
  1856. if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
  1857. this.once('end', onend);
  1858. }
  1859. Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
  1860. // making it explicit this property is not enumerable
  1861. // because otherwise some prototype manipulation in
  1862. // userland will fail
  1863. enumerable: false,
  1864. get: function get() {
  1865. return this._writableState.highWaterMark;
  1866. }
  1867. }); // the no-half-open enforcer
  1868. function onend() {
  1869. // if we allow half-open state, or if the writable side ended,
  1870. // then we're ok.
  1871. if (this.allowHalfOpen || this._writableState.ended) return; // no more data can be written.
  1872. // But allow more writes to happen in this tick.
  1873. pna.nextTick(onEndNT, this);
  1874. }
  1875. function onEndNT(self) {
  1876. self.end();
  1877. }
  1878. Object.defineProperty(Duplex.prototype, 'destroyed', {
  1879. get: function get() {
  1880. if (this._readableState === undefined || this._writableState === undefined) {
  1881. return false;
  1882. }
  1883. return this._readableState.destroyed && this._writableState.destroyed;
  1884. },
  1885. set: function set(value) {
  1886. // we ignore the value if the stream
  1887. // has not been initialized yet
  1888. if (this._readableState === undefined || this._writableState === undefined) {
  1889. return;
  1890. } // backward compatibility, the user is explicitly
  1891. // managing destroyed
  1892. this._readableState.destroyed = value;
  1893. this._writableState.destroyed = value;
  1894. }
  1895. });
  1896. Duplex.prototype._destroy = function (err, cb) {
  1897. this.push(null);
  1898. this.end();
  1899. pna.nextTick(cb, err);
  1900. };
  1901. /***/ }),
  1902. /* 8 */
  1903. /***/ (function(module, exports, __webpack_require__) {
  1904. "use strict";
  1905. // Copyright Joyent, Inc. and other Node contributors.
  1906. //
  1907. // Permission is hereby granted, free of charge, to any person obtaining a
  1908. // copy of this software and associated documentation files (the
  1909. // "Software"), to deal in the Software without restriction, including
  1910. // without limitation the rights to use, copy, modify, merge, publish,
  1911. // distribute, sublicense, and/or sell copies of the Software, and to permit
  1912. // persons to whom the Software is furnished to do so, subject to the
  1913. // following conditions:
  1914. //
  1915. // The above copyright notice and this permission notice shall be included
  1916. // in all copies or substantial portions of the Software.
  1917. //
  1918. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  1919. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  1920. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  1921. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  1922. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  1923. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  1924. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  1925. var R = typeof Reflect === 'object' ? Reflect : null;
  1926. var ReflectApply = R && typeof R.apply === 'function' ? R.apply : function ReflectApply(target, receiver, args) {
  1927. return Function.prototype.apply.call(target, receiver, args);
  1928. };
  1929. var ReflectOwnKeys;
  1930. if (R && typeof R.ownKeys === 'function') {
  1931. ReflectOwnKeys = R.ownKeys;
  1932. } else if (Object.getOwnPropertySymbols) {
  1933. ReflectOwnKeys = function ReflectOwnKeys(target) {
  1934. return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target));
  1935. };
  1936. } else {
  1937. ReflectOwnKeys = function ReflectOwnKeys(target) {
  1938. return Object.getOwnPropertyNames(target);
  1939. };
  1940. }
  1941. function ProcessEmitWarning(warning) {
  1942. if (console && console.warn) console.warn(warning);
  1943. }
  1944. var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {
  1945. return value !== value;
  1946. };
  1947. function EventEmitter() {
  1948. EventEmitter.init.call(this);
  1949. }
  1950. module.exports = EventEmitter; // Backwards-compat with node 0.10.x
  1951. EventEmitter.EventEmitter = EventEmitter;
  1952. EventEmitter.prototype._events = undefined;
  1953. EventEmitter.prototype._eventsCount = 0;
  1954. EventEmitter.prototype._maxListeners = undefined; // By default EventEmitters will print a warning if more than 10 listeners are
  1955. // added to it. This is a useful default which helps finding memory leaks.
  1956. var defaultMaxListeners = 10;
  1957. Object.defineProperty(EventEmitter, 'defaultMaxListeners', {
  1958. enumerable: true,
  1959. get: function get() {
  1960. return defaultMaxListeners;
  1961. },
  1962. set: function set(arg) {
  1963. if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {
  1964. throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.');
  1965. }
  1966. defaultMaxListeners = arg;
  1967. }
  1968. });
  1969. EventEmitter.init = function () {
  1970. if (this._events === undefined || this._events === Object.getPrototypeOf(this)._events) {
  1971. this._events = Object.create(null);
  1972. this._eventsCount = 0;
  1973. }
  1974. this._maxListeners = this._maxListeners || undefined;
  1975. }; // Obviously not all Emitters should be limited to 10. This function allows
  1976. // that to be increased. Set to zero for unlimited.
  1977. EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
  1978. if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {
  1979. throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.');
  1980. }
  1981. this._maxListeners = n;
  1982. return this;
  1983. };
  1984. function $getMaxListeners(that) {
  1985. if (that._maxListeners === undefined) return EventEmitter.defaultMaxListeners;
  1986. return that._maxListeners;
  1987. }
  1988. EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
  1989. return $getMaxListeners(this);
  1990. };
  1991. EventEmitter.prototype.emit = function emit(type) {
  1992. var args = [];
  1993. for (var i = 1; i < arguments.length; i++) {
  1994. args.push(arguments[i]);
  1995. }
  1996. var doError = type === 'error';
  1997. var events = this._events;
  1998. if (events !== undefined) doError = doError && events.error === undefined;else if (!doError) return false; // If there is no 'error' event listener then throw.
  1999. if (doError) {
  2000. var er;
  2001. if (args.length > 0) er = args[0];
  2002. if (er instanceof Error) {
  2003. // Note: The comments on the `throw` lines are intentional, they show
  2004. // up in Node's output if this results in an unhandled exception.
  2005. throw er; // Unhandled 'error' event
  2006. } // At least give some kind of context to the user
  2007. var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));
  2008. err.context = er;
  2009. throw err; // Unhandled 'error' event
  2010. }
  2011. var handler = events[type];
  2012. if (handler === undefined) return false;
  2013. if (typeof handler === 'function') {
  2014. ReflectApply(handler, this, args);
  2015. } else {
  2016. var len = handler.length;
  2017. var listeners = arrayClone(handler, len);
  2018. for (var i = 0; i < len; ++i) {
  2019. ReflectApply(listeners[i], this, args);
  2020. }
  2021. }
  2022. return true;
  2023. };
  2024. function _addListener(target, type, listener, prepend) {
  2025. var m;
  2026. var events;
  2027. var existing;
  2028. if (typeof listener !== 'function') {
  2029. throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
  2030. }
  2031. events = target._events;
  2032. if (events === undefined) {
  2033. events = target._events = Object.create(null);
  2034. target._eventsCount = 0;
  2035. } else {
  2036. // To avoid recursion in the case that type === "newListener"! Before
  2037. // adding it to the listeners, first emit "newListener".
  2038. if (events.newListener !== undefined) {
  2039. target.emit('newListener', type, listener.listener ? listener.listener : listener); // Re-assign `events` because a newListener handler could have caused the
  2040. // this._events to be assigned to a new object
  2041. events = target._events;
  2042. }
  2043. existing = events[type];
  2044. }
  2045. if (existing === undefined) {
  2046. // Optimize the case of one listener. Don't need the extra array object.
  2047. existing = events[type] = listener;
  2048. ++target._eventsCount;
  2049. } else {
  2050. if (typeof existing === 'function') {
  2051. // Adding the second element, need to change to array.
  2052. existing = events[type] = prepend ? [listener, existing] : [existing, listener]; // If we've already got an array, just append.
  2053. } else if (prepend) {
  2054. existing.unshift(listener);
  2055. } else {
  2056. existing.push(listener);
  2057. } // Check for listener leak
  2058. m = $getMaxListeners(target);
  2059. if (m > 0 && existing.length > m && !existing.warned) {
  2060. existing.warned = true; // No error code for this since it is a Warning
  2061. // eslint-disable-next-line no-restricted-syntax
  2062. var w = new Error('Possible EventEmitter memory leak detected. ' + existing.length + ' ' + String(type) + ' listeners ' + 'added. Use emitter.setMaxListeners() to ' + 'increase limit');
  2063. w.name = 'MaxListenersExceededWarning';
  2064. w.emitter = target;
  2065. w.type = type;
  2066. w.count = existing.length;
  2067. ProcessEmitWarning(w);
  2068. }
  2069. }
  2070. return target;
  2071. }
  2072. EventEmitter.prototype.addListener = function addListener(type, listener) {
  2073. return _addListener(this, type, listener, false);
  2074. };
  2075. EventEmitter.prototype.on = EventEmitter.prototype.addListener;
  2076. EventEmitter.prototype.prependListener = function prependListener(type, listener) {
  2077. return _addListener(this, type, listener, true);
  2078. };
  2079. function onceWrapper() {
  2080. var args = [];
  2081. for (var i = 0; i < arguments.length; i++) {
  2082. args.push(arguments[i]);
  2083. }
  2084. if (!this.fired) {
  2085. this.target.removeListener(this.type, this.wrapFn);
  2086. this.fired = true;
  2087. ReflectApply(this.listener, this.target, args);
  2088. }
  2089. }
  2090. function _onceWrap(target, type, listener) {
  2091. var state = {
  2092. fired: false,
  2093. wrapFn: undefined,
  2094. target: target,
  2095. type: type,
  2096. listener: listener
  2097. };
  2098. var wrapped = onceWrapper.bind(state);
  2099. wrapped.listener = listener;
  2100. state.wrapFn = wrapped;
  2101. return wrapped;
  2102. }
  2103. EventEmitter.prototype.once = function once(type, listener) {
  2104. if (typeof listener !== 'function') {
  2105. throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
  2106. }
  2107. this.on(type, _onceWrap(this, type, listener));
  2108. return this;
  2109. };
  2110. EventEmitter.prototype.prependOnceListener = function prependOnceListener(type, listener) {
  2111. if (typeof listener !== 'function') {
  2112. throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
  2113. }
  2114. this.prependListener(type, _onceWrap(this, type, listener));
  2115. return this;
  2116. }; // Emits a 'removeListener' event if and only if the listener was removed.
  2117. EventEmitter.prototype.removeListener = function removeListener(type, listener) {
  2118. var list, events, position, i, originalListener;
  2119. if (typeof listener !== 'function') {
  2120. throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
  2121. }
  2122. events = this._events;
  2123. if (events === undefined) return this;
  2124. list = events[type];
  2125. if (list === undefined) return this;
  2126. if (list === listener || list.listener === listener) {
  2127. if (--this._eventsCount === 0) this._events = Object.create(null);else {
  2128. delete events[type];
  2129. if (events.removeListener) this.emit('removeListener', type, list.listener || listener);
  2130. }
  2131. } else if (typeof list !== 'function') {
  2132. position = -1;
  2133. for (i = list.length - 1; i >= 0; i--) {
  2134. if (list[i] === listener || list[i].listener === listener) {
  2135. originalListener = list[i].listener;
  2136. position = i;
  2137. break;
  2138. }
  2139. }
  2140. if (position < 0) return this;
  2141. if (position === 0) list.shift();else {
  2142. spliceOne(list, position);
  2143. }
  2144. if (list.length === 1) events[type] = list[0];
  2145. if (events.removeListener !== undefined) this.emit('removeListener', type, originalListener || listener);
  2146. }
  2147. return this;
  2148. };
  2149. EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
  2150. EventEmitter.prototype.removeAllListeners = function removeAllListeners(type) {
  2151. var listeners, events, i;
  2152. events = this._events;
  2153. if (events === undefined) return this; // not listening for removeListener, no need to emit
  2154. if (events.removeListener === undefined) {
  2155. if (arguments.length === 0) {
  2156. this._events = Object.create(null);
  2157. this._eventsCount = 0;
  2158. } else if (events[type] !== undefined) {
  2159. if (--this._eventsCount === 0) this._events = Object.create(null);else delete events[type];
  2160. }
  2161. return this;
  2162. } // emit removeListener for all listeners on all events
  2163. if (arguments.length === 0) {
  2164. var keys = Object.keys(events);
  2165. var key;
  2166. for (i = 0; i < keys.length; ++i) {
  2167. key = keys[i];
  2168. if (key === 'removeListener') continue;
  2169. this.removeAllListeners(key);
  2170. }
  2171. this.removeAllListeners('removeListener');
  2172. this._events = Object.create(null);
  2173. this._eventsCount = 0;
  2174. return this;
  2175. }
  2176. listeners = events[type];
  2177. if (typeof listeners === 'function') {
  2178. this.removeListener(type, listeners);
  2179. } else if (listeners !== undefined) {
  2180. // LIFO order
  2181. for (i = listeners.length - 1; i >= 0; i--) {
  2182. this.removeListener(type, listeners[i]);
  2183. }
  2184. }
  2185. return this;
  2186. };
  2187. function _listeners(target, type, unwrap) {
  2188. var events = target._events;
  2189. if (events === undefined) return [];
  2190. var evlistener = events[type];
  2191. if (evlistener === undefined) return [];
  2192. if (typeof evlistener === 'function') return unwrap ? [evlistener.listener || evlistener] : [evlistener];
  2193. return unwrap ? unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
  2194. }
  2195. EventEmitter.prototype.listeners = function listeners(type) {
  2196. return _listeners(this, type, true);
  2197. };
  2198. EventEmitter.prototype.rawListeners = function rawListeners(type) {
  2199. return _listeners(this, type, false);
  2200. };
  2201. EventEmitter.listenerCount = function (emitter, type) {
  2202. if (typeof emitter.listenerCount === 'function') {
  2203. return emitter.listenerCount(type);
  2204. } else {
  2205. return listenerCount.call(emitter, type);
  2206. }
  2207. };
  2208. EventEmitter.prototype.listenerCount = listenerCount;
  2209. function listenerCount(type) {
  2210. var events = this._events;
  2211. if (events !== undefined) {
  2212. var evlistener = events[type];
  2213. if (typeof evlistener === 'function') {
  2214. return 1;
  2215. } else if (evlistener !== undefined) {
  2216. return evlistener.length;
  2217. }
  2218. }
  2219. return 0;
  2220. }
  2221. EventEmitter.prototype.eventNames = function eventNames() {
  2222. return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
  2223. };
  2224. function arrayClone(arr, n) {
  2225. var copy = new Array(n);
  2226. for (var i = 0; i < n; ++i) {
  2227. copy[i] = arr[i];
  2228. }
  2229. return copy;
  2230. }
  2231. function spliceOne(list, index) {
  2232. for (; index + 1 < list.length; index++) {
  2233. list[index] = list[index + 1];
  2234. }
  2235. list.pop();
  2236. }
  2237. function unwrapListeners(arr) {
  2238. var ret = new Array(arr.length);
  2239. for (var i = 0; i < ret.length; ++i) {
  2240. ret[i] = arr[i].listener || arr[i];
  2241. }
  2242. return ret;
  2243. }
  2244. /***/ }),
  2245. /* 9 */
  2246. /***/ (function(module, exports) {
  2247. module.exports = __WEBPACK_EXTERNAL_MODULE__9__;
  2248. /***/ }),
  2249. /* 10 */
  2250. /***/ (function(module, exports, __webpack_require__) {
  2251. /* WEBPACK VAR INJECTION */(function(global) {var _slicedToArray = __webpack_require__(50);
  2252. /*jshint esversion: 6 */
  2253. function colorcolor(color) {
  2254. var newColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "rgba";
  2255. var calculateOpacity = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  2256. color = color.toLowerCase();
  2257. newColor = newColor.toLowerCase();
  2258. var returnedColor = color;
  2259. var namedColor = __webpack_require__(54);
  2260. var r, g, b, a;
  2261. var roundTo = 4;
  2262. var colorDefinitions = {
  2263. rgb: {
  2264. re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,
  2265. example: ["rgb(123, 234, 45)", "rgb(255,234,245)"],
  2266. toRGBA: function toRGBA(bits) {
  2267. return [parseInt(bits[1], 10), parseInt(bits[2], 10), parseInt(bits[3], 10), 1];
  2268. }
  2269. },
  2270. rgba: {
  2271. re: /^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d+(?:\.\d+)?|\.\d+)\s*\)/,
  2272. example: ["rgba(123, 234, 45, 1)", "rgba(255,234,245, 0.5)"],
  2273. toRGBA: function toRGBA(bits) {
  2274. return [parseInt(bits[1], 10), parseInt(bits[2], 10), parseInt(bits[3], 10), parseFloat(bits[4])];
  2275. }
  2276. },
  2277. hex: {
  2278. re: /^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
  2279. example: ["00ff00", "336699"],
  2280. toRGBA: function toRGBA(bits) {
  2281. return [parseInt(bits[1], 16), parseInt(bits[2], 16), parseInt(bits[3], 16), 1];
  2282. }
  2283. },
  2284. hex3: {
  2285. re: /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  2286. example: ["fb0", "f0f"],
  2287. toRGBA: function toRGBA(bits) {
  2288. return [parseInt(bits[1] + bits[1], 16), parseInt(bits[2] + bits[2], 16), parseInt(bits[3] + bits[3], 16), 1];
  2289. }
  2290. },
  2291. hexa: {
  2292. re: /^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
  2293. example: ["00ff00ff", "336699a0"],
  2294. toRGBA: function toRGBA(bits) {
  2295. return [parseInt(bits[1], 16), parseInt(bits[2], 16), parseInt(bits[3], 16), parseInt(bits[4], 16) / 255];
  2296. }
  2297. },
  2298. hex4a: {
  2299. re: /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  2300. example: ["fb0f", "f0f8"],
  2301. toRGBA: function toRGBA(bits) {
  2302. return [parseInt(bits[1] + bits[1], 16), parseInt(bits[2] + bits[2], 16), parseInt(bits[3] + bits[3], 16), parseInt(bits[4] + bits[4], 16) / 255];
  2303. }
  2304. },
  2305. hsl: {
  2306. re: /^hsl\((\d{1,3}),\s*(\d{1,3})%,\s*(\d{1,3})%\)$/,
  2307. example: ["hsl(120, 100%, 25%)", "hsl(0, 100%, 50%)"],
  2308. toRGBA: function toRGBA(bits) {
  2309. bits[4] = 1;
  2310. var rgba = hslToRgb(bits);
  2311. return [rgba.r, rgba.g, rgba.b, rgba.a];
  2312. }
  2313. },
  2314. hsla: {
  2315. re: /^hsla\((\d{1,3}),\s*(\d{1,3})%,\s*(\d{1,3})%,\s*(\d+(?:\.\d+)?|\.\d+)\s*\)/,
  2316. example: ["hsla(120, 100%, 25%, 1)", "hsla(0, 100%, 50%, 0.5)"],
  2317. toRGBA: function toRGBA(bits) {
  2318. var rgba = hslToRgb(bits);
  2319. return [rgba.r, rgba.g, rgba.b, rgba.a];
  2320. }
  2321. },
  2322. hsv: {
  2323. re: /^hsv\((\d{1,3}),\s*(\d{1,3})%,\s*(\d{1,3})%\)$/,
  2324. example: ["hsv(120, 100%, 25%)", "hsv(0, 100%, 50%)"],
  2325. toRGBA: function toRGBA(bits) {
  2326. var rgb = hsvToRgb(bits);
  2327. return [rgb.r, rgb.g, rgb.b, 1];
  2328. }
  2329. },
  2330. hsb: {
  2331. re: /^hsb\((\d{1,3}),\s*(\d{1,3})%,\s*(\d{1,3})%\)$/,
  2332. example: ["hsb(120, 100%, 25%)", "hsb(0, 100%, 50%)"],
  2333. toRGBA: function toRGBA(bits) {
  2334. var rgb = hsvToRgb(bits);
  2335. return [rgb.r, rgb.g, rgb.b, 1];
  2336. }
  2337. }
  2338. }; // If this is a named color, convert it to hex
  2339. if (namedColor.hasOwnProperty(color)) {
  2340. color = namedColor[color];
  2341. color.forEach(function (piece, index) {
  2342. "use strict";
  2343. color[index] = ("0" + piece.toString(16)).slice(-2);
  2344. });
  2345. color = "#" + color.join('');
  2346. } // Search the color definitions for a match
  2347. for (var colorDefinition in colorDefinitions) {
  2348. var re = colorDefinitions[colorDefinition].re;
  2349. var processor = colorDefinitions[colorDefinition].toRGBA;
  2350. var bits = re.exec(color);
  2351. if (bits) {
  2352. var channels = processor(bits);
  2353. r = channels[0];
  2354. g = channels[1];
  2355. b = channels[2];
  2356. a = +(Math.round(channels[3] + ("e+" + roundTo)) + ("e-" + roundTo));
  2357. }
  2358. }
  2359. r = Math.round(r < 0 || isNaN(r) ? 0 : r > 255 ? 255 : r);
  2360. g = Math.round(g < 0 || isNaN(g) ? 0 : g > 255 ? 255 : g);
  2361. b = Math.round(b < 0 || isNaN(b) ? 0 : b > 255 ? 255 : b);
  2362. a = a < 0 || isNaN(a) ? 0 : a > 1 ? 1 : a;
  2363. switch (newColor) {
  2364. case "hex":
  2365. returnedColor = "#" + ("0" + r.toString(16)).slice(-2) + ("0" + g.toString(16)).slice(-2) + ("0" + b.toString(16)).slice(-2);
  2366. break;
  2367. case "hexa":
  2368. if (calculateOpacity) {
  2369. var _calculateOpacityFrom = calculateOpacityFromWhite(r, g, b, a);
  2370. var _calculateOpacityFrom2 = _slicedToArray(_calculateOpacityFrom, 4);
  2371. r = _calculateOpacityFrom2[0];
  2372. g = _calculateOpacityFrom2[1];
  2373. b = _calculateOpacityFrom2[2];
  2374. a = _calculateOpacityFrom2[3];
  2375. }
  2376. returnedColor = "#" + ("0" + r.toString(16)).slice(-2) + ("0" + g.toString(16)).slice(-2) + ("0" + b.toString(16)).slice(-2) + ("0" + Math.round(255 * a).toString(16)).slice(-2);
  2377. break;
  2378. case "hsl":
  2379. var hsl = rgbToHsl({
  2380. "r": r,
  2381. "g": g,
  2382. "b": b
  2383. });
  2384. returnedColor = "hsl(".concat(hsl.h, ",").concat(hsl.s, "%,").concat(hsl.l, "%)");
  2385. break;
  2386. case "hsla":
  2387. if (calculateOpacity) {
  2388. var _calculateOpacityFrom3 = calculateOpacityFromWhite(r, g, b, a);
  2389. var _calculateOpacityFrom4 = _slicedToArray(_calculateOpacityFrom3, 4);
  2390. r = _calculateOpacityFrom4[0];
  2391. g = _calculateOpacityFrom4[1];
  2392. b = _calculateOpacityFrom4[2];
  2393. a = _calculateOpacityFrom4[3];
  2394. }
  2395. var hsla = rgbToHsl({
  2396. "r": r,
  2397. "g": g,
  2398. "b": b,
  2399. "a": a
  2400. });
  2401. returnedColor = "hsla(".concat(hsla.h, ",").concat(hsla.s, "%,").concat(hsla.l, "%,").concat(hsla.a, ")");
  2402. break;
  2403. case "hsb":
  2404. /* Same as `hsv` */
  2405. var hsb = rgbToHsv({
  2406. "r": r,
  2407. "g": g,
  2408. "b": b
  2409. });
  2410. returnedColor = "hsb(".concat(hsb.h, ",").concat(hsb.s, "%,").concat(hsb.v, "%)");
  2411. break;
  2412. case "hsv":
  2413. var hsv = rgbToHsv({
  2414. "r": r,
  2415. "g": g,
  2416. "b": b
  2417. });
  2418. returnedColor = "hsv(".concat(hsv.h, ",").concat(hsv.s, "%,").concat(hsv.v, "%)");
  2419. break;
  2420. case "rgb":
  2421. returnedColor = "rgb(".concat(r, ",").concat(g, ",").concat(b, ")");
  2422. break;
  2423. case "rgba":
  2424. /* falls through */
  2425. default:
  2426. if (calculateOpacity) {
  2427. var _calculateOpacityFrom5 = calculateOpacityFromWhite(r, g, b, a);
  2428. var _calculateOpacityFrom6 = _slicedToArray(_calculateOpacityFrom5, 4);
  2429. r = _calculateOpacityFrom6[0];
  2430. g = _calculateOpacityFrom6[1];
  2431. b = _calculateOpacityFrom6[2];
  2432. a = _calculateOpacityFrom6[3];
  2433. }
  2434. returnedColor = "rgba(".concat(r, ",").concat(g, ",").concat(b, ",").concat(a, ")");
  2435. break;
  2436. }
  2437. return returnedColor;
  2438. }
  2439. function calculateOpacityFromWhite(r, g, b, a) {
  2440. "use strict";
  2441. var min = 0;
  2442. a = (255 - (min = Math.min(r, g, b))) / 255;
  2443. r = ( false || (r - min) / a).toFixed(0);
  2444. g = ( false || (g - min) / a).toFixed(0);
  2445. b = ( false || (b - min) / a).toFixed(0);
  2446. a = parseFloat(a.toFixed(4));
  2447. return [r, g, b, a];
  2448. }
  2449. function hslToRgb(bits) {
  2450. var rgba = {},
  2451. hsl = {
  2452. h: bits[1] / 360,
  2453. s: bits[2] / 100,
  2454. l: bits[3] / 100,
  2455. a: parseFloat(bits[4])
  2456. };
  2457. if (hsl.s === 0) {
  2458. var v = 255 * hsl.l;
  2459. rgba = {
  2460. r: v,
  2461. g: v,
  2462. b: v,
  2463. a: hsl.a
  2464. };
  2465. } else {
  2466. var q = hsl.l < 0.5 ? hsl.l * (1 + hsl.s) : hsl.l + hsl.s - hsl.l * hsl.s;
  2467. var p = 2 * hsl.l - q;
  2468. rgba.r = hueToRgb(p, q, hsl.h + 1 / 3) * 255;
  2469. rgba.g = hueToRgb(p, q, hsl.h) * 255;
  2470. rgba.b = hueToRgb(p, q, hsl.h - 1 / 3) * 255;
  2471. rgba.a = hsl.a;
  2472. }
  2473. return rgba;
  2474. }
  2475. function rgbToHsl(rgba) {
  2476. rgba.r = rgba.r / 255;
  2477. rgba.g = rgba.g / 255;
  2478. rgba.b = rgba.b / 255;
  2479. var max = Math.max(rgba.r, rgba.g, rgba.b),
  2480. min = Math.min(rgba.r, rgba.g, rgba.b),
  2481. hsl = [],
  2482. d;
  2483. hsl.a = rgba.a;
  2484. hsl.l = (max + min) / 2;
  2485. if (max === min) {
  2486. hsl.h = 0;
  2487. hsl.s = 0;
  2488. } else {
  2489. d = max - min;
  2490. hsl.s = hsl.l >= 0.5 ? d / (2 - max - min) : d / (max + min);
  2491. switch (max) {
  2492. case rgba.r:
  2493. hsl.h = (rgba.g - rgba.b) / d + (rgba.g < rgba.b ? 6 : 0);
  2494. break;
  2495. case rgba.g:
  2496. hsl.h = (rgba.b - rgba.r) / d + 2;
  2497. break;
  2498. case rgba.b:
  2499. hsl.h = (rgba.r - rgba.g) / d + 4;
  2500. break;
  2501. }
  2502. hsl.h /= 6;
  2503. }
  2504. hsl.h = parseInt((hsl.h * 360).toFixed(0), 10);
  2505. hsl.s = parseInt((hsl.s * 100).toFixed(0), 10);
  2506. hsl.l = parseInt((hsl.l * 100).toFixed(0), 10);
  2507. return hsl;
  2508. }
  2509. function hsvToRgb(bits) {
  2510. var rgb = {},
  2511. hsv = {
  2512. h: bits[1] / 360,
  2513. s: bits[2] / 100,
  2514. v: bits[3] / 100
  2515. },
  2516. i = Math.floor(hsv.h * 6),
  2517. f = hsv.h * 6 - i,
  2518. p = hsv.v * (1 - hsv.s),
  2519. q = hsv.v * (1 - f * hsv.s),
  2520. t = hsv.v * (1 - (1 - f) * hsv.s);
  2521. switch (i % 6) {
  2522. case 0:
  2523. rgb.r = hsv.v;
  2524. rgb.g = t;
  2525. rgb.b = p;
  2526. break;
  2527. case 1:
  2528. rgb.r = q;
  2529. rgb.g = hsv.v;
  2530. rgb.b = p;
  2531. break;
  2532. case 2:
  2533. rgb.r = p;
  2534. rgb.g = hsv.v;
  2535. rgb.b = t;
  2536. break;
  2537. case 3:
  2538. rgb.r = p;
  2539. rgb.g = q;
  2540. rgb.b = hsv.v;
  2541. break;
  2542. case 4:
  2543. rgb.r = t;
  2544. rgb.g = p;
  2545. rgb.b = hsv.v;
  2546. break;
  2547. case 5:
  2548. rgb.r = hsv.v;
  2549. rgb.g = p;
  2550. rgb.b = q;
  2551. break;
  2552. }
  2553. rgb.r = rgb.r * 255;
  2554. rgb.g = rgb.g * 255;
  2555. rgb.b = rgb.b * 255;
  2556. return rgb;
  2557. }
  2558. function rgbToHsv(rgba) {
  2559. rgba.r = toPercent(parseInt(rgba.r, 10) % 256, 256);
  2560. rgba.g = toPercent(parseInt(rgba.g, 10) % 256, 256);
  2561. rgba.b = toPercent(parseInt(rgba.b, 10) % 256, 256);
  2562. var max = Math.max(rgba.r, rgba.g, rgba.b),
  2563. min = Math.min(rgba.r, rgba.g, rgba.b),
  2564. d = max - min,
  2565. hsv = {
  2566. "h": 0,
  2567. "s": max === 0 ? 0 : d / max,
  2568. "v": max
  2569. };
  2570. if (max !== min) {
  2571. switch (max) {
  2572. case rgba.r:
  2573. hsv.h = (rgba.g - rgba.b) / d + (rgba.g < rgba.b ? 6 : 0);
  2574. break;
  2575. case rgba.g:
  2576. hsv.h = (rgba.b - rgba.r) / d + 2;
  2577. break;
  2578. case rgba.b:
  2579. hsv.h = (rgba.r - rgba.g) / d + 4;
  2580. break;
  2581. }
  2582. hsv.h /= 6;
  2583. }
  2584. hsv.h = parseInt((hsv.h * 360).toFixed(0), 10);
  2585. hsv.s = parseInt((hsv.s * 100).toFixed(0), 10);
  2586. hsv.v = parseInt((hsv.v * 100).toFixed(0), 10);
  2587. return hsv;
  2588. }
  2589. function hueToRgb(p, q, t) {
  2590. if (t < 0) {
  2591. t += 1;
  2592. }
  2593. if (t > 1) {
  2594. t -= 1;
  2595. }
  2596. if (t < 1 / 6) {
  2597. return p + (q - p) * 6 * t;
  2598. }
  2599. if (t < 1 / 2) {
  2600. return q;
  2601. }
  2602. if (t < 2 / 3) {
  2603. return p + (q - p) * ((2 / 3 - t) * 6);
  2604. }
  2605. return p;
  2606. }
  2607. function toPercent(amount, limit) {
  2608. return amount / limit;
  2609. }
  2610. module.exports = colorcolor;
  2611. global.colorcolor = module.exports;
  2612. /* ew */
  2613. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(5)))
  2614. /***/ }),
  2615. /* 11 */
  2616. /***/ (function(module, exports) {
  2617. if (typeof Object.create === 'function') {
  2618. // implementation from standard node.js 'util' module
  2619. module.exports = function inherits(ctor, superCtor) {
  2620. if (superCtor) {
  2621. ctor.super_ = superCtor;
  2622. ctor.prototype = Object.create(superCtor.prototype, {
  2623. constructor: {
  2624. value: ctor,
  2625. enumerable: false,
  2626. writable: true,
  2627. configurable: true
  2628. }
  2629. });
  2630. }
  2631. };
  2632. } else {
  2633. // old school shim for old browsers
  2634. module.exports = function inherits(ctor, superCtor) {
  2635. if (superCtor) {
  2636. ctor.super_ = superCtor;
  2637. var TempCtor = function TempCtor() {};
  2638. TempCtor.prototype = superCtor.prototype;
  2639. ctor.prototype = new TempCtor();
  2640. ctor.prototype.constructor = ctor;
  2641. }
  2642. };
  2643. }
  2644. /***/ }),
  2645. /* 12 */
  2646. /***/ (function(module, exports, __webpack_require__) {
  2647. /* WEBPACK VAR INJECTION */(function(global) {/**
  2648. * lodash (Custom Build) <https://lodash.com/>
  2649. * Build: `lodash modularize exports="npm" -o ./`
  2650. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  2651. * Released under MIT license <https://lodash.com/license>
  2652. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  2653. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  2654. */
  2655. /** Used as references for various `Number` constants. */
  2656. var INFINITY = 1 / 0;
  2657. /** `Object#toString` result references. */
  2658. var symbolTag = '[object Symbol]';
  2659. /** Used to compose unicode character classes. */
  2660. var rsAstralRange = "\\ud800-\\udfff",
  2661. rsComboMarksRange = "\\u0300-\\u036f\\ufe20-\\ufe23",
  2662. rsComboSymbolsRange = "\\u20d0-\\u20f0",
  2663. rsVarRange = "\\ufe0e\\ufe0f";
  2664. /** Used to compose unicode capture groups. */
  2665. var rsAstral = '[' + rsAstralRange + ']',
  2666. rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']',
  2667. rsFitz = "\\ud83c[\\udffb-\\udfff]",
  2668. rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
  2669. rsNonAstral = '[^' + rsAstralRange + ']',
  2670. rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}",
  2671. rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]",
  2672. rsZWJ = "\\u200d";
  2673. /** Used to compose unicode regexes. */
  2674. var reOptMod = rsModifier + '?',
  2675. rsOptVar = '[' + rsVarRange + ']?',
  2676. rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
  2677. rsSeq = rsOptVar + reOptMod + rsOptJoin,
  2678. rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
  2679. /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
  2680. var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
  2681. /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
  2682. var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']');
  2683. /** Detect free variable `global` from Node.js. */
  2684. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  2685. /** Detect free variable `self`. */
  2686. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  2687. /** Used as a reference to the global object. */
  2688. var root = freeGlobal || freeSelf || Function('return this')();
  2689. /**
  2690. * Converts an ASCII `string` to an array.
  2691. *
  2692. * @private
  2693. * @param {string} string The string to convert.
  2694. * @returns {Array} Returns the converted array.
  2695. */
  2696. function asciiToArray(string) {
  2697. return string.split('');
  2698. }
  2699. /**
  2700. * Checks if `string` contains Unicode symbols.
  2701. *
  2702. * @private
  2703. * @param {string} string The string to inspect.
  2704. * @returns {boolean} Returns `true` if a symbol is found, else `false`.
  2705. */
  2706. function hasUnicode(string) {
  2707. return reHasUnicode.test(string);
  2708. }
  2709. /**
  2710. * Converts `string` to an array.
  2711. *
  2712. * @private
  2713. * @param {string} string The string to convert.
  2714. * @returns {Array} Returns the converted array.
  2715. */
  2716. function stringToArray(string) {
  2717. return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string);
  2718. }
  2719. /**
  2720. * Converts a Unicode `string` to an array.
  2721. *
  2722. * @private
  2723. * @param {string} string The string to convert.
  2724. * @returns {Array} Returns the converted array.
  2725. */
  2726. function unicodeToArray(string) {
  2727. return string.match(reUnicode) || [];
  2728. }
  2729. /** Used for built-in method references. */
  2730. var objectProto = Object.prototype;
  2731. /**
  2732. * Used to resolve the
  2733. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  2734. * of values.
  2735. */
  2736. var objectToString = objectProto.toString;
  2737. /** Built-in value references. */
  2738. var Symbol = root.Symbol;
  2739. /** Used to convert symbols to primitives and strings. */
  2740. var symbolProto = Symbol ? Symbol.prototype : undefined,
  2741. symbolToString = symbolProto ? symbolProto.toString : undefined;
  2742. /**
  2743. * The base implementation of `_.slice` without an iteratee call guard.
  2744. *
  2745. * @private
  2746. * @param {Array} array The array to slice.
  2747. * @param {number} [start=0] The start position.
  2748. * @param {number} [end=array.length] The end position.
  2749. * @returns {Array} Returns the slice of `array`.
  2750. */
  2751. function baseSlice(array, start, end) {
  2752. var index = -1,
  2753. length = array.length;
  2754. if (start < 0) {
  2755. start = -start > length ? 0 : length + start;
  2756. }
  2757. end = end > length ? length : end;
  2758. if (end < 0) {
  2759. end += length;
  2760. }
  2761. length = start > end ? 0 : end - start >>> 0;
  2762. start >>>= 0;
  2763. var result = Array(length);
  2764. while (++index < length) {
  2765. result[index] = array[index + start];
  2766. }
  2767. return result;
  2768. }
  2769. /**
  2770. * The base implementation of `_.toString` which doesn't convert nullish
  2771. * values to empty strings.
  2772. *
  2773. * @private
  2774. * @param {*} value The value to process.
  2775. * @returns {string} Returns the string.
  2776. */
  2777. function baseToString(value) {
  2778. // Exit early for strings to avoid a performance hit in some environments.
  2779. if (typeof value == 'string') {
  2780. return value;
  2781. }
  2782. if (isSymbol(value)) {
  2783. return symbolToString ? symbolToString.call(value) : '';
  2784. }
  2785. var result = value + '';
  2786. return result == '0' && 1 / value == -INFINITY ? '-0' : result;
  2787. }
  2788. /**
  2789. * Casts `array` to a slice if it's needed.
  2790. *
  2791. * @private
  2792. * @param {Array} array The array to inspect.
  2793. * @param {number} start The start position.
  2794. * @param {number} [end=array.length] The end position.
  2795. * @returns {Array} Returns the cast slice.
  2796. */
  2797. function castSlice(array, start, end) {
  2798. var length = array.length;
  2799. end = end === undefined ? length : end;
  2800. return !start && end >= length ? array : baseSlice(array, start, end);
  2801. }
  2802. /**
  2803. * Creates a function like `_.lowerFirst`.
  2804. *
  2805. * @private
  2806. * @param {string} methodName The name of the `String` case method to use.
  2807. * @returns {Function} Returns the new case function.
  2808. */
  2809. function createCaseFirst(methodName) {
  2810. return function (string) {
  2811. string = toString(string);
  2812. var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined;
  2813. var chr = strSymbols ? strSymbols[0] : string.charAt(0);
  2814. var trailing = strSymbols ? castSlice(strSymbols, 1).join('') : string.slice(1);
  2815. return chr[methodName]() + trailing;
  2816. };
  2817. }
  2818. /**
  2819. * Checks if `value` is object-like. A value is object-like if it's not `null`
  2820. * and has a `typeof` result of "object".
  2821. *
  2822. * @static
  2823. * @memberOf _
  2824. * @since 4.0.0
  2825. * @category Lang
  2826. * @param {*} value The value to check.
  2827. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  2828. * @example
  2829. *
  2830. * _.isObjectLike({});
  2831. * // => true
  2832. *
  2833. * _.isObjectLike([1, 2, 3]);
  2834. * // => true
  2835. *
  2836. * _.isObjectLike(_.noop);
  2837. * // => false
  2838. *
  2839. * _.isObjectLike(null);
  2840. * // => false
  2841. */
  2842. function isObjectLike(value) {
  2843. return !!value && typeof value == 'object';
  2844. }
  2845. /**
  2846. * Checks if `value` is classified as a `Symbol` primitive or object.
  2847. *
  2848. * @static
  2849. * @memberOf _
  2850. * @since 4.0.0
  2851. * @category Lang
  2852. * @param {*} value The value to check.
  2853. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  2854. * @example
  2855. *
  2856. * _.isSymbol(Symbol.iterator);
  2857. * // => true
  2858. *
  2859. * _.isSymbol('abc');
  2860. * // => false
  2861. */
  2862. function isSymbol(value) {
  2863. return typeof value == 'symbol' || isObjectLike(value) && objectToString.call(value) == symbolTag;
  2864. }
  2865. /**
  2866. * Converts `value` to a string. An empty string is returned for `null`
  2867. * and `undefined` values. The sign of `-0` is preserved.
  2868. *
  2869. * @static
  2870. * @memberOf _
  2871. * @since 4.0.0
  2872. * @category Lang
  2873. * @param {*} value The value to process.
  2874. * @returns {string} Returns the string.
  2875. * @example
  2876. *
  2877. * _.toString(null);
  2878. * // => ''
  2879. *
  2880. * _.toString(-0);
  2881. * // => '-0'
  2882. *
  2883. * _.toString([1, 2, 3]);
  2884. * // => '1,2,3'
  2885. */
  2886. function toString(value) {
  2887. return value == null ? '' : baseToString(value);
  2888. }
  2889. /**
  2890. * Converts the first character of `string` to upper case and the remaining
  2891. * to lower case.
  2892. *
  2893. * @static
  2894. * @memberOf _
  2895. * @since 3.0.0
  2896. * @category String
  2897. * @param {string} [string=''] The string to capitalize.
  2898. * @returns {string} Returns the capitalized string.
  2899. * @example
  2900. *
  2901. * _.capitalize('FRED');
  2902. * // => 'Fred'
  2903. */
  2904. function capitalize(string) {
  2905. return upperFirst(toString(string).toLowerCase());
  2906. }
  2907. /**
  2908. * Converts the first character of `string` to upper case.
  2909. *
  2910. * @static
  2911. * @memberOf _
  2912. * @since 4.0.0
  2913. * @category String
  2914. * @param {string} [string=''] The string to convert.
  2915. * @returns {string} Returns the converted string.
  2916. * @example
  2917. *
  2918. * _.upperFirst('fred');
  2919. * // => 'Fred'
  2920. *
  2921. * _.upperFirst('FRED');
  2922. * // => 'FRED'
  2923. */
  2924. var upperFirst = createCaseFirst('toUpperCase');
  2925. module.exports = capitalize;
  2926. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(5)))
  2927. /***/ }),
  2928. /* 13 */
  2929. /***/ (function(module, exports, __webpack_require__) {
  2930. /* WEBPACK VAR INJECTION */(function(global) {/**
  2931. * lodash (Custom Build) <https://lodash.com/>
  2932. * Build: `lodash modularize exports="npm" -o ./`
  2933. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  2934. * Released under MIT license <https://lodash.com/license>
  2935. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  2936. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  2937. */
  2938. /** Used as the `TypeError` message for "Functions" methods. */
  2939. var FUNC_ERROR_TEXT = 'Expected a function';
  2940. /** Used to stand-in for `undefined` hash values. */
  2941. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  2942. /** Used as references for various `Number` constants. */
  2943. var INFINITY = 1 / 0;
  2944. /** `Object#toString` result references. */
  2945. var funcTag = '[object Function]',
  2946. genTag = '[object GeneratorFunction]',
  2947. symbolTag = '[object Symbol]';
  2948. /** Used to match property names within property paths. */
  2949. var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
  2950. reIsPlainProp = /^\w*$/,
  2951. reLeadingDot = /^\./,
  2952. rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
  2953. /**
  2954. * Used to match `RegExp`
  2955. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  2956. */
  2957. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
  2958. /** Used to match backslashes in property paths. */
  2959. var reEscapeChar = /\\(\\)?/g;
  2960. /** Used to detect host constructors (Safari). */
  2961. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  2962. /** Detect free variable `global` from Node.js. */
  2963. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  2964. /** Detect free variable `self`. */
  2965. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  2966. /** Used as a reference to the global object. */
  2967. var root = freeGlobal || freeSelf || Function('return this')();
  2968. /**
  2969. * Gets the value at `key` of `object`.
  2970. *
  2971. * @private
  2972. * @param {Object} [object] The object to query.
  2973. * @param {string} key The key of the property to get.
  2974. * @returns {*} Returns the property value.
  2975. */
  2976. function getValue(object, key) {
  2977. return object == null ? undefined : object[key];
  2978. }
  2979. /**
  2980. * Checks if `value` is a host object in IE < 9.
  2981. *
  2982. * @private
  2983. * @param {*} value The value to check.
  2984. * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
  2985. */
  2986. function isHostObject(value) {
  2987. // Many host objects are `Object` objects that can coerce to strings
  2988. // despite having improperly defined `toString` methods.
  2989. var result = false;
  2990. if (value != null && typeof value.toString != 'function') {
  2991. try {
  2992. result = !!(value + '');
  2993. } catch (e) {}
  2994. }
  2995. return result;
  2996. }
  2997. /** Used for built-in method references. */
  2998. var arrayProto = Array.prototype,
  2999. funcProto = Function.prototype,
  3000. objectProto = Object.prototype;
  3001. /** Used to detect overreaching core-js shims. */
  3002. var coreJsData = root['__core-js_shared__'];
  3003. /** Used to detect methods masquerading as native. */
  3004. var maskSrcKey = function () {
  3005. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  3006. return uid ? 'Symbol(src)_1.' + uid : '';
  3007. }();
  3008. /** Used to resolve the decompiled source of functions. */
  3009. var funcToString = funcProto.toString;
  3010. /** Used to check objects for own properties. */
  3011. var hasOwnProperty = objectProto.hasOwnProperty;
  3012. /**
  3013. * Used to resolve the
  3014. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  3015. * of values.
  3016. */
  3017. var objectToString = objectProto.toString;
  3018. /** Used to detect if a method is native. */
  3019. var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
  3020. /** Built-in value references. */
  3021. var Symbol = root.Symbol,
  3022. splice = arrayProto.splice;
  3023. /* Built-in method references that are verified to be native. */
  3024. var Map = getNative(root, 'Map'),
  3025. nativeCreate = getNative(Object, 'create');
  3026. /** Used to convert symbols to primitives and strings. */
  3027. var symbolProto = Symbol ? Symbol.prototype : undefined,
  3028. symbolToString = symbolProto ? symbolProto.toString : undefined;
  3029. /**
  3030. * Creates a hash object.
  3031. *
  3032. * @private
  3033. * @constructor
  3034. * @param {Array} [entries] The key-value pairs to cache.
  3035. */
  3036. function Hash(entries) {
  3037. var index = -1,
  3038. length = entries ? entries.length : 0;
  3039. this.clear();
  3040. while (++index < length) {
  3041. var entry = entries[index];
  3042. this.set(entry[0], entry[1]);
  3043. }
  3044. }
  3045. /**
  3046. * Removes all key-value entries from the hash.
  3047. *
  3048. * @private
  3049. * @name clear
  3050. * @memberOf Hash
  3051. */
  3052. function hashClear() {
  3053. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  3054. }
  3055. /**
  3056. * Removes `key` and its value from the hash.
  3057. *
  3058. * @private
  3059. * @name delete
  3060. * @memberOf Hash
  3061. * @param {Object} hash The hash to modify.
  3062. * @param {string} key The key of the value to remove.
  3063. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  3064. */
  3065. function hashDelete(key) {
  3066. return this.has(key) && delete this.__data__[key];
  3067. }
  3068. /**
  3069. * Gets the hash value for `key`.
  3070. *
  3071. * @private
  3072. * @name get
  3073. * @memberOf Hash
  3074. * @param {string} key The key of the value to get.
  3075. * @returns {*} Returns the entry value.
  3076. */
  3077. function hashGet(key) {
  3078. var data = this.__data__;
  3079. if (nativeCreate) {
  3080. var result = data[key];
  3081. return result === HASH_UNDEFINED ? undefined : result;
  3082. }
  3083. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  3084. }
  3085. /**
  3086. * Checks if a hash value for `key` exists.
  3087. *
  3088. * @private
  3089. * @name has
  3090. * @memberOf Hash
  3091. * @param {string} key The key of the entry to check.
  3092. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  3093. */
  3094. function hashHas(key) {
  3095. var data = this.__data__;
  3096. return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
  3097. }
  3098. /**
  3099. * Sets the hash `key` to `value`.
  3100. *
  3101. * @private
  3102. * @name set
  3103. * @memberOf Hash
  3104. * @param {string} key The key of the value to set.
  3105. * @param {*} value The value to set.
  3106. * @returns {Object} Returns the hash instance.
  3107. */
  3108. function hashSet(key, value) {
  3109. var data = this.__data__;
  3110. data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value;
  3111. return this;
  3112. } // Add methods to `Hash`.
  3113. Hash.prototype.clear = hashClear;
  3114. Hash.prototype['delete'] = hashDelete;
  3115. Hash.prototype.get = hashGet;
  3116. Hash.prototype.has = hashHas;
  3117. Hash.prototype.set = hashSet;
  3118. /**
  3119. * Creates an list cache object.
  3120. *
  3121. * @private
  3122. * @constructor
  3123. * @param {Array} [entries] The key-value pairs to cache.
  3124. */
  3125. function ListCache(entries) {
  3126. var index = -1,
  3127. length = entries ? entries.length : 0;
  3128. this.clear();
  3129. while (++index < length) {
  3130. var entry = entries[index];
  3131. this.set(entry[0], entry[1]);
  3132. }
  3133. }
  3134. /**
  3135. * Removes all key-value entries from the list cache.
  3136. *
  3137. * @private
  3138. * @name clear
  3139. * @memberOf ListCache
  3140. */
  3141. function listCacheClear() {
  3142. this.__data__ = [];
  3143. }
  3144. /**
  3145. * Removes `key` and its value from the list cache.
  3146. *
  3147. * @private
  3148. * @name delete
  3149. * @memberOf ListCache
  3150. * @param {string} key The key of the value to remove.
  3151. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  3152. */
  3153. function listCacheDelete(key) {
  3154. var data = this.__data__,
  3155. index = assocIndexOf(data, key);
  3156. if (index < 0) {
  3157. return false;
  3158. }
  3159. var lastIndex = data.length - 1;
  3160. if (index == lastIndex) {
  3161. data.pop();
  3162. } else {
  3163. splice.call(data, index, 1);
  3164. }
  3165. return true;
  3166. }
  3167. /**
  3168. * Gets the list cache value for `key`.
  3169. *
  3170. * @private
  3171. * @name get
  3172. * @memberOf ListCache
  3173. * @param {string} key The key of the value to get.
  3174. * @returns {*} Returns the entry value.
  3175. */
  3176. function listCacheGet(key) {
  3177. var data = this.__data__,
  3178. index = assocIndexOf(data, key);
  3179. return index < 0 ? undefined : data[index][1];
  3180. }
  3181. /**
  3182. * Checks if a list cache value for `key` exists.
  3183. *
  3184. * @private
  3185. * @name has
  3186. * @memberOf ListCache
  3187. * @param {string} key The key of the entry to check.
  3188. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  3189. */
  3190. function listCacheHas(key) {
  3191. return assocIndexOf(this.__data__, key) > -1;
  3192. }
  3193. /**
  3194. * Sets the list cache `key` to `value`.
  3195. *
  3196. * @private
  3197. * @name set
  3198. * @memberOf ListCache
  3199. * @param {string} key The key of the value to set.
  3200. * @param {*} value The value to set.
  3201. * @returns {Object} Returns the list cache instance.
  3202. */
  3203. function listCacheSet(key, value) {
  3204. var data = this.__data__,
  3205. index = assocIndexOf(data, key);
  3206. if (index < 0) {
  3207. data.push([key, value]);
  3208. } else {
  3209. data[index][1] = value;
  3210. }
  3211. return this;
  3212. } // Add methods to `ListCache`.
  3213. ListCache.prototype.clear = listCacheClear;
  3214. ListCache.prototype['delete'] = listCacheDelete;
  3215. ListCache.prototype.get = listCacheGet;
  3216. ListCache.prototype.has = listCacheHas;
  3217. ListCache.prototype.set = listCacheSet;
  3218. /**
  3219. * Creates a map cache object to store key-value pairs.
  3220. *
  3221. * @private
  3222. * @constructor
  3223. * @param {Array} [entries] The key-value pairs to cache.
  3224. */
  3225. function MapCache(entries) {
  3226. var index = -1,
  3227. length = entries ? entries.length : 0;
  3228. this.clear();
  3229. while (++index < length) {
  3230. var entry = entries[index];
  3231. this.set(entry[0], entry[1]);
  3232. }
  3233. }
  3234. /**
  3235. * Removes all key-value entries from the map.
  3236. *
  3237. * @private
  3238. * @name clear
  3239. * @memberOf MapCache
  3240. */
  3241. function mapCacheClear() {
  3242. this.__data__ = {
  3243. 'hash': new Hash(),
  3244. 'map': new (Map || ListCache)(),
  3245. 'string': new Hash()
  3246. };
  3247. }
  3248. /**
  3249. * Removes `key` and its value from the map.
  3250. *
  3251. * @private
  3252. * @name delete
  3253. * @memberOf MapCache
  3254. * @param {string} key The key of the value to remove.
  3255. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  3256. */
  3257. function mapCacheDelete(key) {
  3258. return getMapData(this, key)['delete'](key);
  3259. }
  3260. /**
  3261. * Gets the map value for `key`.
  3262. *
  3263. * @private
  3264. * @name get
  3265. * @memberOf MapCache
  3266. * @param {string} key The key of the value to get.
  3267. * @returns {*} Returns the entry value.
  3268. */
  3269. function mapCacheGet(key) {
  3270. return getMapData(this, key).get(key);
  3271. }
  3272. /**
  3273. * Checks if a map value for `key` exists.
  3274. *
  3275. * @private
  3276. * @name has
  3277. * @memberOf MapCache
  3278. * @param {string} key The key of the entry to check.
  3279. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  3280. */
  3281. function mapCacheHas(key) {
  3282. return getMapData(this, key).has(key);
  3283. }
  3284. /**
  3285. * Sets the map `key` to `value`.
  3286. *
  3287. * @private
  3288. * @name set
  3289. * @memberOf MapCache
  3290. * @param {string} key The key of the value to set.
  3291. * @param {*} value The value to set.
  3292. * @returns {Object} Returns the map cache instance.
  3293. */
  3294. function mapCacheSet(key, value) {
  3295. getMapData(this, key).set(key, value);
  3296. return this;
  3297. } // Add methods to `MapCache`.
  3298. MapCache.prototype.clear = mapCacheClear;
  3299. MapCache.prototype['delete'] = mapCacheDelete;
  3300. MapCache.prototype.get = mapCacheGet;
  3301. MapCache.prototype.has = mapCacheHas;
  3302. MapCache.prototype.set = mapCacheSet;
  3303. /**
  3304. * Gets the index at which the `key` is found in `array` of key-value pairs.
  3305. *
  3306. * @private
  3307. * @param {Array} array The array to inspect.
  3308. * @param {*} key The key to search for.
  3309. * @returns {number} Returns the index of the matched value, else `-1`.
  3310. */
  3311. function assocIndexOf(array, key) {
  3312. var length = array.length;
  3313. while (length--) {
  3314. if (eq(array[length][0], key)) {
  3315. return length;
  3316. }
  3317. }
  3318. return -1;
  3319. }
  3320. /**
  3321. * The base implementation of `_.get` without support for default values.
  3322. *
  3323. * @private
  3324. * @param {Object} object The object to query.
  3325. * @param {Array|string} path The path of the property to get.
  3326. * @returns {*} Returns the resolved value.
  3327. */
  3328. function baseGet(object, path) {
  3329. path = isKey(path, object) ? [path] : castPath(path);
  3330. var index = 0,
  3331. length = path.length;
  3332. while (object != null && index < length) {
  3333. object = object[toKey(path[index++])];
  3334. }
  3335. return index && index == length ? object : undefined;
  3336. }
  3337. /**
  3338. * The base implementation of `_.isNative` without bad shim checks.
  3339. *
  3340. * @private
  3341. * @param {*} value The value to check.
  3342. * @returns {boolean} Returns `true` if `value` is a native function,
  3343. * else `false`.
  3344. */
  3345. function baseIsNative(value) {
  3346. if (!isObject(value) || isMasked(value)) {
  3347. return false;
  3348. }
  3349. var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
  3350. return pattern.test(toSource(value));
  3351. }
  3352. /**
  3353. * The base implementation of `_.toString` which doesn't convert nullish
  3354. * values to empty strings.
  3355. *
  3356. * @private
  3357. * @param {*} value The value to process.
  3358. * @returns {string} Returns the string.
  3359. */
  3360. function baseToString(value) {
  3361. // Exit early for strings to avoid a performance hit in some environments.
  3362. if (typeof value == 'string') {
  3363. return value;
  3364. }
  3365. if (isSymbol(value)) {
  3366. return symbolToString ? symbolToString.call(value) : '';
  3367. }
  3368. var result = value + '';
  3369. return result == '0' && 1 / value == -INFINITY ? '-0' : result;
  3370. }
  3371. /**
  3372. * Casts `value` to a path array if it's not one.
  3373. *
  3374. * @private
  3375. * @param {*} value The value to inspect.
  3376. * @returns {Array} Returns the cast property path array.
  3377. */
  3378. function castPath(value) {
  3379. return isArray(value) ? value : stringToPath(value);
  3380. }
  3381. /**
  3382. * Gets the data for `map`.
  3383. *
  3384. * @private
  3385. * @param {Object} map The map to query.
  3386. * @param {string} key The reference key.
  3387. * @returns {*} Returns the map data.
  3388. */
  3389. function getMapData(map, key) {
  3390. var data = map.__data__;
  3391. return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map;
  3392. }
  3393. /**
  3394. * Gets the native function at `key` of `object`.
  3395. *
  3396. * @private
  3397. * @param {Object} object The object to query.
  3398. * @param {string} key The key of the method to get.
  3399. * @returns {*} Returns the function if it's native, else `undefined`.
  3400. */
  3401. function getNative(object, key) {
  3402. var value = getValue(object, key);
  3403. return baseIsNative(value) ? value : undefined;
  3404. }
  3405. /**
  3406. * Checks if `value` is a property name and not a property path.
  3407. *
  3408. * @private
  3409. * @param {*} value The value to check.
  3410. * @param {Object} [object] The object to query keys on.
  3411. * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
  3412. */
  3413. function isKey(value, object) {
  3414. if (isArray(value)) {
  3415. return false;
  3416. }
  3417. var type = typeof value;
  3418. if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) {
  3419. return true;
  3420. }
  3421. return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
  3422. }
  3423. /**
  3424. * Checks if `value` is suitable for use as unique object key.
  3425. *
  3426. * @private
  3427. * @param {*} value The value to check.
  3428. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  3429. */
  3430. function isKeyable(value) {
  3431. var type = typeof value;
  3432. return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null;
  3433. }
  3434. /**
  3435. * Checks if `func` has its source masked.
  3436. *
  3437. * @private
  3438. * @param {Function} func The function to check.
  3439. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  3440. */
  3441. function isMasked(func) {
  3442. return !!maskSrcKey && maskSrcKey in func;
  3443. }
  3444. /**
  3445. * Converts `string` to a property path array.
  3446. *
  3447. * @private
  3448. * @param {string} string The string to convert.
  3449. * @returns {Array} Returns the property path array.
  3450. */
  3451. var stringToPath = memoize(function (string) {
  3452. string = toString(string);
  3453. var result = [];
  3454. if (reLeadingDot.test(string)) {
  3455. result.push('');
  3456. }
  3457. string.replace(rePropName, function (match, number, quote, string) {
  3458. result.push(quote ? string.replace(reEscapeChar, '$1') : number || match);
  3459. });
  3460. return result;
  3461. });
  3462. /**
  3463. * Converts `value` to a string key if it's not a string or symbol.
  3464. *
  3465. * @private
  3466. * @param {*} value The value to inspect.
  3467. * @returns {string|symbol} Returns the key.
  3468. */
  3469. function toKey(value) {
  3470. if (typeof value == 'string' || isSymbol(value)) {
  3471. return value;
  3472. }
  3473. var result = value + '';
  3474. return result == '0' && 1 / value == -INFINITY ? '-0' : result;
  3475. }
  3476. /**
  3477. * Converts `func` to its source code.
  3478. *
  3479. * @private
  3480. * @param {Function} func The function to process.
  3481. * @returns {string} Returns the source code.
  3482. */
  3483. function toSource(func) {
  3484. if (func != null) {
  3485. try {
  3486. return funcToString.call(func);
  3487. } catch (e) {}
  3488. try {
  3489. return func + '';
  3490. } catch (e) {}
  3491. }
  3492. return '';
  3493. }
  3494. /**
  3495. * Creates a function that memoizes the result of `func`. If `resolver` is
  3496. * provided, it determines the cache key for storing the result based on the
  3497. * arguments provided to the memoized function. By default, the first argument
  3498. * provided to the memoized function is used as the map cache key. The `func`
  3499. * is invoked with the `this` binding of the memoized function.
  3500. *
  3501. * **Note:** The cache is exposed as the `cache` property on the memoized
  3502. * function. Its creation may be customized by replacing the `_.memoize.Cache`
  3503. * constructor with one whose instances implement the
  3504. * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
  3505. * method interface of `delete`, `get`, `has`, and `set`.
  3506. *
  3507. * @static
  3508. * @memberOf _
  3509. * @since 0.1.0
  3510. * @category Function
  3511. * @param {Function} func The function to have its output memoized.
  3512. * @param {Function} [resolver] The function to resolve the cache key.
  3513. * @returns {Function} Returns the new memoized function.
  3514. * @example
  3515. *
  3516. * var object = { 'a': 1, 'b': 2 };
  3517. * var other = { 'c': 3, 'd': 4 };
  3518. *
  3519. * var values = _.memoize(_.values);
  3520. * values(object);
  3521. * // => [1, 2]
  3522. *
  3523. * values(other);
  3524. * // => [3, 4]
  3525. *
  3526. * object.a = 2;
  3527. * values(object);
  3528. * // => [1, 2]
  3529. *
  3530. * // Modify the result cache.
  3531. * values.cache.set(object, ['a', 'b']);
  3532. * values(object);
  3533. * // => ['a', 'b']
  3534. *
  3535. * // Replace `_.memoize.Cache`.
  3536. * _.memoize.Cache = WeakMap;
  3537. */
  3538. function memoize(func, resolver) {
  3539. if (typeof func != 'function' || resolver && typeof resolver != 'function') {
  3540. throw new TypeError(FUNC_ERROR_TEXT);
  3541. }
  3542. var memoized = function memoized() {
  3543. var args = arguments,
  3544. key = resolver ? resolver.apply(this, args) : args[0],
  3545. cache = memoized.cache;
  3546. if (cache.has(key)) {
  3547. return cache.get(key);
  3548. }
  3549. var result = func.apply(this, args);
  3550. memoized.cache = cache.set(key, result);
  3551. return result;
  3552. };
  3553. memoized.cache = new (memoize.Cache || MapCache)();
  3554. return memoized;
  3555. } // Assign cache to `_.memoize`.
  3556. memoize.Cache = MapCache;
  3557. /**
  3558. * Performs a
  3559. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  3560. * comparison between two values to determine if they are equivalent.
  3561. *
  3562. * @static
  3563. * @memberOf _
  3564. * @since 4.0.0
  3565. * @category Lang
  3566. * @param {*} value The value to compare.
  3567. * @param {*} other The other value to compare.
  3568. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  3569. * @example
  3570. *
  3571. * var object = { 'a': 1 };
  3572. * var other = { 'a': 1 };
  3573. *
  3574. * _.eq(object, object);
  3575. * // => true
  3576. *
  3577. * _.eq(object, other);
  3578. * // => false
  3579. *
  3580. * _.eq('a', 'a');
  3581. * // => true
  3582. *
  3583. * _.eq('a', Object('a'));
  3584. * // => false
  3585. *
  3586. * _.eq(NaN, NaN);
  3587. * // => true
  3588. */
  3589. function eq(value, other) {
  3590. return value === other || value !== value && other !== other;
  3591. }
  3592. /**
  3593. * Checks if `value` is classified as an `Array` object.
  3594. *
  3595. * @static
  3596. * @memberOf _
  3597. * @since 0.1.0
  3598. * @category Lang
  3599. * @param {*} value The value to check.
  3600. * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  3601. * @example
  3602. *
  3603. * _.isArray([1, 2, 3]);
  3604. * // => true
  3605. *
  3606. * _.isArray(document.body.children);
  3607. * // => false
  3608. *
  3609. * _.isArray('abc');
  3610. * // => false
  3611. *
  3612. * _.isArray(_.noop);
  3613. * // => false
  3614. */
  3615. var isArray = Array.isArray;
  3616. /**
  3617. * Checks if `value` is classified as a `Function` object.
  3618. *
  3619. * @static
  3620. * @memberOf _
  3621. * @since 0.1.0
  3622. * @category Lang
  3623. * @param {*} value The value to check.
  3624. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  3625. * @example
  3626. *
  3627. * _.isFunction(_);
  3628. * // => true
  3629. *
  3630. * _.isFunction(/abc/);
  3631. * // => false
  3632. */
  3633. function isFunction(value) {
  3634. // The use of `Object#toString` avoids issues with the `typeof` operator
  3635. // in Safari 8-9 which returns 'object' for typed array and other constructors.
  3636. var tag = isObject(value) ? objectToString.call(value) : '';
  3637. return tag == funcTag || tag == genTag;
  3638. }
  3639. /**
  3640. * Checks if `value` is the
  3641. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  3642. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  3643. *
  3644. * @static
  3645. * @memberOf _
  3646. * @since 0.1.0
  3647. * @category Lang
  3648. * @param {*} value The value to check.
  3649. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  3650. * @example
  3651. *
  3652. * _.isObject({});
  3653. * // => true
  3654. *
  3655. * _.isObject([1, 2, 3]);
  3656. * // => true
  3657. *
  3658. * _.isObject(_.noop);
  3659. * // => true
  3660. *
  3661. * _.isObject(null);
  3662. * // => false
  3663. */
  3664. function isObject(value) {
  3665. var type = typeof value;
  3666. return !!value && (type == 'object' || type == 'function');
  3667. }
  3668. /**
  3669. * Checks if `value` is object-like. A value is object-like if it's not `null`
  3670. * and has a `typeof` result of "object".
  3671. *
  3672. * @static
  3673. * @memberOf _
  3674. * @since 4.0.0
  3675. * @category Lang
  3676. * @param {*} value The value to check.
  3677. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  3678. * @example
  3679. *
  3680. * _.isObjectLike({});
  3681. * // => true
  3682. *
  3683. * _.isObjectLike([1, 2, 3]);
  3684. * // => true
  3685. *
  3686. * _.isObjectLike(_.noop);
  3687. * // => false
  3688. *
  3689. * _.isObjectLike(null);
  3690. * // => false
  3691. */
  3692. function isObjectLike(value) {
  3693. return !!value && typeof value == 'object';
  3694. }
  3695. /**
  3696. * Checks if `value` is classified as a `Symbol` primitive or object.
  3697. *
  3698. * @static
  3699. * @memberOf _
  3700. * @since 4.0.0
  3701. * @category Lang
  3702. * @param {*} value The value to check.
  3703. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  3704. * @example
  3705. *
  3706. * _.isSymbol(Symbol.iterator);
  3707. * // => true
  3708. *
  3709. * _.isSymbol('abc');
  3710. * // => false
  3711. */
  3712. function isSymbol(value) {
  3713. return typeof value == 'symbol' || isObjectLike(value) && objectToString.call(value) == symbolTag;
  3714. }
  3715. /**
  3716. * Converts `value` to a string. An empty string is returned for `null`
  3717. * and `undefined` values. The sign of `-0` is preserved.
  3718. *
  3719. * @static
  3720. * @memberOf _
  3721. * @since 4.0.0
  3722. * @category Lang
  3723. * @param {*} value The value to process.
  3724. * @returns {string} Returns the string.
  3725. * @example
  3726. *
  3727. * _.toString(null);
  3728. * // => ''
  3729. *
  3730. * _.toString(-0);
  3731. * // => '-0'
  3732. *
  3733. * _.toString([1, 2, 3]);
  3734. * // => '1,2,3'
  3735. */
  3736. function toString(value) {
  3737. return value == null ? '' : baseToString(value);
  3738. }
  3739. /**
  3740. * Gets the value at `path` of `object`. If the resolved value is
  3741. * `undefined`, the `defaultValue` is returned in its place.
  3742. *
  3743. * @static
  3744. * @memberOf _
  3745. * @since 3.7.0
  3746. * @category Object
  3747. * @param {Object} object The object to query.
  3748. * @param {Array|string} path The path of the property to get.
  3749. * @param {*} [defaultValue] The value returned for `undefined` resolved values.
  3750. * @returns {*} Returns the resolved value.
  3751. * @example
  3752. *
  3753. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  3754. *
  3755. * _.get(object, 'a[0].b.c');
  3756. * // => 3
  3757. *
  3758. * _.get(object, ['a', '0', 'b', 'c']);
  3759. * // => 3
  3760. *
  3761. * _.get(object, 'a.b.c', 'default');
  3762. * // => 'default'
  3763. */
  3764. function get(object, path, defaultValue) {
  3765. var result = object == null ? undefined : baseGet(object, path);
  3766. return result === undefined ? defaultValue : result;
  3767. }
  3768. module.exports = get;
  3769. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(5)))
  3770. /***/ }),
  3771. /* 14 */
  3772. /***/ (function(module, exports, __webpack_require__) {
  3773. "use strict";
  3774. /* WEBPACK VAR INJECTION */(function(global) {/*!
  3775. * The buffer module from node.js, for the browser.
  3776. *
  3777. * @author Feross Aboukhadijeh <http://feross.org>
  3778. * @license MIT
  3779. */
  3780. /* eslint-disable no-proto */
  3781. var base64 = __webpack_require__(58);
  3782. var ieee754 = __webpack_require__(59);
  3783. var isArray = __webpack_require__(34);
  3784. exports.Buffer = Buffer;
  3785. exports.SlowBuffer = SlowBuffer;
  3786. exports.INSPECT_MAX_BYTES = 50;
  3787. /**
  3788. * If `Buffer.TYPED_ARRAY_SUPPORT`:
  3789. * === true Use Uint8Array implementation (fastest)
  3790. * === false Use Object implementation (most compatible, even IE6)
  3791. *
  3792. * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
  3793. * Opera 11.6+, iOS 4.2+.
  3794. *
  3795. * Due to various browser bugs, sometimes the Object implementation will be used even
  3796. * when the browser supports typed arrays.
  3797. *
  3798. * Note:
  3799. *
  3800. * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
  3801. * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
  3802. *
  3803. * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
  3804. *
  3805. * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
  3806. * incorrect length in some situations.
  3807. * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
  3808. * get the Object implementation, which is slower but behaves correctly.
  3809. */
  3810. Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined ? global.TYPED_ARRAY_SUPPORT : typedArraySupport();
  3811. /*
  3812. * Export kMaxLength after typed array support is determined.
  3813. */
  3814. exports.kMaxLength = kMaxLength();
  3815. function typedArraySupport() {
  3816. try {
  3817. var arr = new Uint8Array(1);
  3818. arr.__proto__ = {
  3819. __proto__: Uint8Array.prototype,
  3820. foo: function foo() {
  3821. return 42;
  3822. }
  3823. };
  3824. return arr.foo() === 42 && // typed array instances can be augmented
  3825. typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
  3826. arr.subarray(1, 1).byteLength === 0; // ie10 has broken `subarray`
  3827. } catch (e) {
  3828. return false;
  3829. }
  3830. }
  3831. function kMaxLength() {
  3832. return Buffer.TYPED_ARRAY_SUPPORT ? 0x7fffffff : 0x3fffffff;
  3833. }
  3834. function createBuffer(that, length) {
  3835. if (kMaxLength() < length) {
  3836. throw new RangeError('Invalid typed array length');
  3837. }
  3838. if (Buffer.TYPED_ARRAY_SUPPORT) {
  3839. // Return an augmented `Uint8Array` instance, for best performance
  3840. that = new Uint8Array(length);
  3841. that.__proto__ = Buffer.prototype;
  3842. } else {
  3843. // Fallback: Return an object instance of the Buffer class
  3844. if (that === null) {
  3845. that = new Buffer(length);
  3846. }
  3847. that.length = length;
  3848. }
  3849. return that;
  3850. }
  3851. /**
  3852. * The Buffer constructor returns instances of `Uint8Array` that have their
  3853. * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
  3854. * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
  3855. * and the `Uint8Array` methods. Square bracket notation works as expected -- it
  3856. * returns a single octet.
  3857. *
  3858. * The `Uint8Array` prototype remains unmodified.
  3859. */
  3860. function Buffer(arg, encodingOrOffset, length) {
  3861. if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
  3862. return new Buffer(arg, encodingOrOffset, length);
  3863. } // Common case.
  3864. if (typeof arg === 'number') {
  3865. if (typeof encodingOrOffset === 'string') {
  3866. throw new Error('If encoding is specified then the first argument must be a string');
  3867. }
  3868. return allocUnsafe(this, arg);
  3869. }
  3870. return from(this, arg, encodingOrOffset, length);
  3871. }
  3872. Buffer.poolSize = 8192; // not used by this implementation
  3873. // TODO: Legacy, not needed anymore. Remove in next major version.
  3874. Buffer._augment = function (arr) {
  3875. arr.__proto__ = Buffer.prototype;
  3876. return arr;
  3877. };
  3878. function from(that, value, encodingOrOffset, length) {
  3879. if (typeof value === 'number') {
  3880. throw new TypeError('"value" argument must not be a number');
  3881. }
  3882. if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
  3883. return fromArrayBuffer(that, value, encodingOrOffset, length);
  3884. }
  3885. if (typeof value === 'string') {
  3886. return fromString(that, value, encodingOrOffset);
  3887. }
  3888. return fromObject(that, value);
  3889. }
  3890. /**
  3891. * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
  3892. * if value is a number.
  3893. * Buffer.from(str[, encoding])
  3894. * Buffer.from(array)
  3895. * Buffer.from(buffer)
  3896. * Buffer.from(arrayBuffer[, byteOffset[, length]])
  3897. **/
  3898. Buffer.from = function (value, encodingOrOffset, length) {
  3899. return from(null, value, encodingOrOffset, length);
  3900. };
  3901. if (Buffer.TYPED_ARRAY_SUPPORT) {
  3902. Buffer.prototype.__proto__ = Uint8Array.prototype;
  3903. Buffer.__proto__ = Uint8Array;
  3904. if (typeof Symbol !== 'undefined' && Symbol.species && Buffer[Symbol.species] === Buffer) {
  3905. // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
  3906. Object.defineProperty(Buffer, Symbol.species, {
  3907. value: null,
  3908. configurable: true
  3909. });
  3910. }
  3911. }
  3912. function assertSize(size) {
  3913. if (typeof size !== 'number') {
  3914. throw new TypeError('"size" argument must be a number');
  3915. } else if (size < 0) {
  3916. throw new RangeError('"size" argument must not be negative');
  3917. }
  3918. }
  3919. function alloc(that, size, fill, encoding) {
  3920. assertSize(size);
  3921. if (size <= 0) {
  3922. return createBuffer(that, size);
  3923. }
  3924. if (fill !== undefined) {
  3925. // Only pay attention to encoding if it's a string. This
  3926. // prevents accidentally sending in a number that would
  3927. // be interpretted as a start offset.
  3928. return typeof encoding === 'string' ? createBuffer(that, size).fill(fill, encoding) : createBuffer(that, size).fill(fill);
  3929. }
  3930. return createBuffer(that, size);
  3931. }
  3932. /**
  3933. * Creates a new filled Buffer instance.
  3934. * alloc(size[, fill[, encoding]])
  3935. **/
  3936. Buffer.alloc = function (size, fill, encoding) {
  3937. return alloc(null, size, fill, encoding);
  3938. };
  3939. function allocUnsafe(that, size) {
  3940. assertSize(size);
  3941. that = createBuffer(that, size < 0 ? 0 : checked(size) | 0);
  3942. if (!Buffer.TYPED_ARRAY_SUPPORT) {
  3943. for (var i = 0; i < size; ++i) {
  3944. that[i] = 0;
  3945. }
  3946. }
  3947. return that;
  3948. }
  3949. /**
  3950. * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
  3951. * */
  3952. Buffer.allocUnsafe = function (size) {
  3953. return allocUnsafe(null, size);
  3954. };
  3955. /**
  3956. * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
  3957. */
  3958. Buffer.allocUnsafeSlow = function (size) {
  3959. return allocUnsafe(null, size);
  3960. };
  3961. function fromString(that, string, encoding) {
  3962. if (typeof encoding !== 'string' || encoding === '') {
  3963. encoding = 'utf8';
  3964. }
  3965. if (!Buffer.isEncoding(encoding)) {
  3966. throw new TypeError('"encoding" must be a valid string encoding');
  3967. }
  3968. var length = byteLength(string, encoding) | 0;
  3969. that = createBuffer(that, length);
  3970. var actual = that.write(string, encoding);
  3971. if (actual !== length) {
  3972. // Writing a hex string, for example, that contains invalid characters will
  3973. // cause everything after the first invalid character to be ignored. (e.g.
  3974. // 'abxxcd' will be treated as 'ab')
  3975. that = that.slice(0, actual);
  3976. }
  3977. return that;
  3978. }
  3979. function fromArrayLike(that, array) {
  3980. var length = array.length < 0 ? 0 : checked(array.length) | 0;
  3981. that = createBuffer(that, length);
  3982. for (var i = 0; i < length; i += 1) {
  3983. that[i] = array[i] & 255;
  3984. }
  3985. return that;
  3986. }
  3987. function fromArrayBuffer(that, array, byteOffset, length) {
  3988. array.byteLength; // this throws if `array` is not a valid ArrayBuffer
  3989. if (byteOffset < 0 || array.byteLength < byteOffset) {
  3990. throw new RangeError('\'offset\' is out of bounds');
  3991. }
  3992. if (array.byteLength < byteOffset + (length || 0)) {
  3993. throw new RangeError('\'length\' is out of bounds');
  3994. }
  3995. if (byteOffset === undefined && length === undefined) {
  3996. array = new Uint8Array(array);
  3997. } else if (length === undefined) {
  3998. array = new Uint8Array(array, byteOffset);
  3999. } else {
  4000. array = new Uint8Array(array, byteOffset, length);
  4001. }
  4002. if (Buffer.TYPED_ARRAY_SUPPORT) {
  4003. // Return an augmented `Uint8Array` instance, for best performance
  4004. that = array;
  4005. that.__proto__ = Buffer.prototype;
  4006. } else {
  4007. // Fallback: Return an object instance of the Buffer class
  4008. that = fromArrayLike(that, array);
  4009. }
  4010. return that;
  4011. }
  4012. function fromObject(that, obj) {
  4013. if (Buffer.isBuffer(obj)) {
  4014. var len = checked(obj.length) | 0;
  4015. that = createBuffer(that, len);
  4016. if (that.length === 0) {
  4017. return that;
  4018. }
  4019. obj.copy(that, 0, 0, len);
  4020. return that;
  4021. }
  4022. if (obj) {
  4023. if (typeof ArrayBuffer !== 'undefined' && obj.buffer instanceof ArrayBuffer || 'length' in obj) {
  4024. if (typeof obj.length !== 'number' || isnan(obj.length)) {
  4025. return createBuffer(that, 0);
  4026. }
  4027. return fromArrayLike(that, obj);
  4028. }
  4029. if (obj.type === 'Buffer' && isArray(obj.data)) {
  4030. return fromArrayLike(that, obj.data);
  4031. }
  4032. }
  4033. throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.');
  4034. }
  4035. function checked(length) {
  4036. // Note: cannot use `length < kMaxLength()` here because that fails when
  4037. // length is NaN (which is otherwise coerced to zero.)
  4038. if (length >= kMaxLength()) {
  4039. throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + kMaxLength().toString(16) + ' bytes');
  4040. }
  4041. return length | 0;
  4042. }
  4043. function SlowBuffer(length) {
  4044. if (+length != length) {
  4045. // eslint-disable-line eqeqeq
  4046. length = 0;
  4047. }
  4048. return Buffer.alloc(+length);
  4049. }
  4050. Buffer.isBuffer = function isBuffer(b) {
  4051. return !!(b != null && b._isBuffer);
  4052. };
  4053. Buffer.compare = function compare(a, b) {
  4054. if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
  4055. throw new TypeError('Arguments must be Buffers');
  4056. }
  4057. if (a === b) return 0;
  4058. var x = a.length;
  4059. var y = b.length;
  4060. for (var i = 0, len = Math.min(x, y); i < len; ++i) {
  4061. if (a[i] !== b[i]) {
  4062. x = a[i];
  4063. y = b[i];
  4064. break;
  4065. }
  4066. }
  4067. if (x < y) return -1;
  4068. if (y < x) return 1;
  4069. return 0;
  4070. };
  4071. Buffer.isEncoding = function isEncoding(encoding) {
  4072. switch (String(encoding).toLowerCase()) {
  4073. case 'hex':
  4074. case 'utf8':
  4075. case 'utf-8':
  4076. case 'ascii':
  4077. case 'latin1':
  4078. case 'binary':
  4079. case 'base64':
  4080. case 'ucs2':
  4081. case 'ucs-2':
  4082. case 'utf16le':
  4083. case 'utf-16le':
  4084. return true;
  4085. default:
  4086. return false;
  4087. }
  4088. };
  4089. Buffer.concat = function concat(list, length) {
  4090. if (!isArray(list)) {
  4091. throw new TypeError('"list" argument must be an Array of Buffers');
  4092. }
  4093. if (list.length === 0) {
  4094. return Buffer.alloc(0);
  4095. }
  4096. var i;
  4097. if (length === undefined) {
  4098. length = 0;
  4099. for (i = 0; i < list.length; ++i) {
  4100. length += list[i].length;
  4101. }
  4102. }
  4103. var buffer = Buffer.allocUnsafe(length);
  4104. var pos = 0;
  4105. for (i = 0; i < list.length; ++i) {
  4106. var buf = list[i];
  4107. if (!Buffer.isBuffer(buf)) {
  4108. throw new TypeError('"list" argument must be an Array of Buffers');
  4109. }
  4110. buf.copy(buffer, pos);
  4111. pos += buf.length;
  4112. }
  4113. return buffer;
  4114. };
  4115. function byteLength(string, encoding) {
  4116. if (Buffer.isBuffer(string)) {
  4117. return string.length;
  4118. }
  4119. if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
  4120. return string.byteLength;
  4121. }
  4122. if (typeof string !== 'string') {
  4123. string = '' + string;
  4124. }
  4125. var len = string.length;
  4126. if (len === 0) return 0; // Use a for loop to avoid recursion
  4127. var loweredCase = false;
  4128. for (;;) {
  4129. switch (encoding) {
  4130. case 'ascii':
  4131. case 'latin1':
  4132. case 'binary':
  4133. return len;
  4134. case 'utf8':
  4135. case 'utf-8':
  4136. case undefined:
  4137. return utf8ToBytes(string).length;
  4138. case 'ucs2':
  4139. case 'ucs-2':
  4140. case 'utf16le':
  4141. case 'utf-16le':
  4142. return len * 2;
  4143. case 'hex':
  4144. return len >>> 1;
  4145. case 'base64':
  4146. return base64ToBytes(string).length;
  4147. default:
  4148. if (loweredCase) return utf8ToBytes(string).length; // assume utf8
  4149. encoding = ('' + encoding).toLowerCase();
  4150. loweredCase = true;
  4151. }
  4152. }
  4153. }
  4154. Buffer.byteLength = byteLength;
  4155. function slowToString(encoding, start, end) {
  4156. var loweredCase = false; // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
  4157. // property of a typed array.
  4158. // This behaves neither like String nor Uint8Array in that we set start/end
  4159. // to their upper/lower bounds if the value passed is out of range.
  4160. // undefined is handled specially as per ECMA-262 6th Edition,
  4161. // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
  4162. if (start === undefined || start < 0) {
  4163. start = 0;
  4164. } // Return early if start > this.length. Done here to prevent potential uint32
  4165. // coercion fail below.
  4166. if (start > this.length) {
  4167. return '';
  4168. }
  4169. if (end === undefined || end > this.length) {
  4170. end = this.length;
  4171. }
  4172. if (end <= 0) {
  4173. return '';
  4174. } // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
  4175. end >>>= 0;
  4176. start >>>= 0;
  4177. if (end <= start) {
  4178. return '';
  4179. }
  4180. if (!encoding) encoding = 'utf8';
  4181. while (true) {
  4182. switch (encoding) {
  4183. case 'hex':
  4184. return hexSlice(this, start, end);
  4185. case 'utf8':
  4186. case 'utf-8':
  4187. return utf8Slice(this, start, end);
  4188. case 'ascii':
  4189. return asciiSlice(this, start, end);
  4190. case 'latin1':
  4191. case 'binary':
  4192. return latin1Slice(this, start, end);
  4193. case 'base64':
  4194. return base64Slice(this, start, end);
  4195. case 'ucs2':
  4196. case 'ucs-2':
  4197. case 'utf16le':
  4198. case 'utf-16le':
  4199. return utf16leSlice(this, start, end);
  4200. default:
  4201. if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
  4202. encoding = (encoding + '').toLowerCase();
  4203. loweredCase = true;
  4204. }
  4205. }
  4206. } // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
  4207. // Buffer instances.
  4208. Buffer.prototype._isBuffer = true;
  4209. function swap(b, n, m) {
  4210. var i = b[n];
  4211. b[n] = b[m];
  4212. b[m] = i;
  4213. }
  4214. Buffer.prototype.swap16 = function swap16() {
  4215. var len = this.length;
  4216. if (len % 2 !== 0) {
  4217. throw new RangeError('Buffer size must be a multiple of 16-bits');
  4218. }
  4219. for (var i = 0; i < len; i += 2) {
  4220. swap(this, i, i + 1);
  4221. }
  4222. return this;
  4223. };
  4224. Buffer.prototype.swap32 = function swap32() {
  4225. var len = this.length;
  4226. if (len % 4 !== 0) {
  4227. throw new RangeError('Buffer size must be a multiple of 32-bits');
  4228. }
  4229. for (var i = 0; i < len; i += 4) {
  4230. swap(this, i, i + 3);
  4231. swap(this, i + 1, i + 2);
  4232. }
  4233. return this;
  4234. };
  4235. Buffer.prototype.swap64 = function swap64() {
  4236. var len = this.length;
  4237. if (len % 8 !== 0) {
  4238. throw new RangeError('Buffer size must be a multiple of 64-bits');
  4239. }
  4240. for (var i = 0; i < len; i += 8) {
  4241. swap(this, i, i + 7);
  4242. swap(this, i + 1, i + 6);
  4243. swap(this, i + 2, i + 5);
  4244. swap(this, i + 3, i + 4);
  4245. }
  4246. return this;
  4247. };
  4248. Buffer.prototype.toString = function toString() {
  4249. var length = this.length | 0;
  4250. if (length === 0) return '';
  4251. if (arguments.length === 0) return utf8Slice(this, 0, length);
  4252. return slowToString.apply(this, arguments);
  4253. };
  4254. Buffer.prototype.equals = function equals(b) {
  4255. if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer');
  4256. if (this === b) return true;
  4257. return Buffer.compare(this, b) === 0;
  4258. };
  4259. Buffer.prototype.inspect = function inspect() {
  4260. var str = '';
  4261. var max = exports.INSPECT_MAX_BYTES;
  4262. if (this.length > 0) {
  4263. str = this.toString('hex', 0, max).match(/.{2}/g).join(' ');
  4264. if (this.length > max) str += ' ... ';
  4265. }
  4266. return '<Buffer ' + str + '>';
  4267. };
  4268. Buffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {
  4269. if (!Buffer.isBuffer(target)) {
  4270. throw new TypeError('Argument must be a Buffer');
  4271. }
  4272. if (start === undefined) {
  4273. start = 0;
  4274. }
  4275. if (end === undefined) {
  4276. end = target ? target.length : 0;
  4277. }
  4278. if (thisStart === undefined) {
  4279. thisStart = 0;
  4280. }
  4281. if (thisEnd === undefined) {
  4282. thisEnd = this.length;
  4283. }
  4284. if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
  4285. throw new RangeError('out of range index');
  4286. }
  4287. if (thisStart >= thisEnd && start >= end) {
  4288. return 0;
  4289. }
  4290. if (thisStart >= thisEnd) {
  4291. return -1;
  4292. }
  4293. if (start >= end) {
  4294. return 1;
  4295. }
  4296. start >>>= 0;
  4297. end >>>= 0;
  4298. thisStart >>>= 0;
  4299. thisEnd >>>= 0;
  4300. if (this === target) return 0;
  4301. var x = thisEnd - thisStart;
  4302. var y = end - start;
  4303. var len = Math.min(x, y);
  4304. var thisCopy = this.slice(thisStart, thisEnd);
  4305. var targetCopy = target.slice(start, end);
  4306. for (var i = 0; i < len; ++i) {
  4307. if (thisCopy[i] !== targetCopy[i]) {
  4308. x = thisCopy[i];
  4309. y = targetCopy[i];
  4310. break;
  4311. }
  4312. }
  4313. if (x < y) return -1;
  4314. if (y < x) return 1;
  4315. return 0;
  4316. }; // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
  4317. // OR the last index of `val` in `buffer` at offset <= `byteOffset`.
  4318. //
  4319. // Arguments:
  4320. // - buffer - a Buffer to search
  4321. // - val - a string, Buffer, or number
  4322. // - byteOffset - an index into `buffer`; will be clamped to an int32
  4323. // - encoding - an optional encoding, relevant is val is a string
  4324. // - dir - true for indexOf, false for lastIndexOf
  4325. function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {
  4326. // Empty buffer means no match
  4327. if (buffer.length === 0) return -1; // Normalize byteOffset
  4328. if (typeof byteOffset === 'string') {
  4329. encoding = byteOffset;
  4330. byteOffset = 0;
  4331. } else if (byteOffset > 0x7fffffff) {
  4332. byteOffset = 0x7fffffff;
  4333. } else if (byteOffset < -0x80000000) {
  4334. byteOffset = -0x80000000;
  4335. }
  4336. byteOffset = +byteOffset; // Coerce to Number.
  4337. if (isNaN(byteOffset)) {
  4338. // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
  4339. byteOffset = dir ? 0 : buffer.length - 1;
  4340. } // Normalize byteOffset: negative offsets start from the end of the buffer
  4341. if (byteOffset < 0) byteOffset = buffer.length + byteOffset;
  4342. if (byteOffset >= buffer.length) {
  4343. if (dir) return -1;else byteOffset = buffer.length - 1;
  4344. } else if (byteOffset < 0) {
  4345. if (dir) byteOffset = 0;else return -1;
  4346. } // Normalize val
  4347. if (typeof val === 'string') {
  4348. val = Buffer.from(val, encoding);
  4349. } // Finally, search either indexOf (if dir is true) or lastIndexOf
  4350. if (Buffer.isBuffer(val)) {
  4351. // Special case: looking for empty string/buffer always fails
  4352. if (val.length === 0) {
  4353. return -1;
  4354. }
  4355. return arrayIndexOf(buffer, val, byteOffset, encoding, dir);
  4356. } else if (typeof val === 'number') {
  4357. val = val & 0xFF; // Search for a byte value [0-255]
  4358. if (Buffer.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') {
  4359. if (dir) {
  4360. return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);
  4361. } else {
  4362. return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);
  4363. }
  4364. }
  4365. return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);
  4366. }
  4367. throw new TypeError('val must be string, number or Buffer');
  4368. }
  4369. function arrayIndexOf(arr, val, byteOffset, encoding, dir) {
  4370. var indexSize = 1;
  4371. var arrLength = arr.length;
  4372. var valLength = val.length;
  4373. if (encoding !== undefined) {
  4374. encoding = String(encoding).toLowerCase();
  4375. if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') {
  4376. if (arr.length < 2 || val.length < 2) {
  4377. return -1;
  4378. }
  4379. indexSize = 2;
  4380. arrLength /= 2;
  4381. valLength /= 2;
  4382. byteOffset /= 2;
  4383. }
  4384. }
  4385. function read(buf, i) {
  4386. if (indexSize === 1) {
  4387. return buf[i];
  4388. } else {
  4389. return buf.readUInt16BE(i * indexSize);
  4390. }
  4391. }
  4392. var i;
  4393. if (dir) {
  4394. var foundIndex = -1;
  4395. for (i = byteOffset; i < arrLength; i++) {
  4396. if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
  4397. if (foundIndex === -1) foundIndex = i;
  4398. if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;
  4399. } else {
  4400. if (foundIndex !== -1) i -= i - foundIndex;
  4401. foundIndex = -1;
  4402. }
  4403. }
  4404. } else {
  4405. if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;
  4406. for (i = byteOffset; i >= 0; i--) {
  4407. var found = true;
  4408. for (var j = 0; j < valLength; j++) {
  4409. if (read(arr, i + j) !== read(val, j)) {
  4410. found = false;
  4411. break;
  4412. }
  4413. }
  4414. if (found) return i;
  4415. }
  4416. }
  4417. return -1;
  4418. }
  4419. Buffer.prototype.includes = function includes(val, byteOffset, encoding) {
  4420. return this.indexOf(val, byteOffset, encoding) !== -1;
  4421. };
  4422. Buffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) {
  4423. return bidirectionalIndexOf(this, val, byteOffset, encoding, true);
  4424. };
  4425. Buffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {
  4426. return bidirectionalIndexOf(this, val, byteOffset, encoding, false);
  4427. };
  4428. function hexWrite(buf, string, offset, length) {
  4429. offset = Number(offset) || 0;
  4430. var remaining = buf.length - offset;
  4431. if (!length) {
  4432. length = remaining;
  4433. } else {
  4434. length = Number(length);
  4435. if (length > remaining) {
  4436. length = remaining;
  4437. }
  4438. } // must be an even number of digits
  4439. var strLen = string.length;
  4440. if (strLen % 2 !== 0) throw new TypeError('Invalid hex string');
  4441. if (length > strLen / 2) {
  4442. length = strLen / 2;
  4443. }
  4444. for (var i = 0; i < length; ++i) {
  4445. var parsed = parseInt(string.substr(i * 2, 2), 16);
  4446. if (isNaN(parsed)) return i;
  4447. buf[offset + i] = parsed;
  4448. }
  4449. return i;
  4450. }
  4451. function utf8Write(buf, string, offset, length) {
  4452. return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);
  4453. }
  4454. function asciiWrite(buf, string, offset, length) {
  4455. return blitBuffer(asciiToBytes(string), buf, offset, length);
  4456. }
  4457. function latin1Write(buf, string, offset, length) {
  4458. return asciiWrite(buf, string, offset, length);
  4459. }
  4460. function base64Write(buf, string, offset, length) {
  4461. return blitBuffer(base64ToBytes(string), buf, offset, length);
  4462. }
  4463. function ucs2Write(buf, string, offset, length) {
  4464. return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);
  4465. }
  4466. Buffer.prototype.write = function write(string, offset, length, encoding) {
  4467. // Buffer#write(string)
  4468. if (offset === undefined) {
  4469. encoding = 'utf8';
  4470. length = this.length;
  4471. offset = 0; // Buffer#write(string, encoding)
  4472. } else if (length === undefined && typeof offset === 'string') {
  4473. encoding = offset;
  4474. length = this.length;
  4475. offset = 0; // Buffer#write(string, offset[, length][, encoding])
  4476. } else if (isFinite(offset)) {
  4477. offset = offset | 0;
  4478. if (isFinite(length)) {
  4479. length = length | 0;
  4480. if (encoding === undefined) encoding = 'utf8';
  4481. } else {
  4482. encoding = length;
  4483. length = undefined;
  4484. } // legacy write(string, encoding, offset, length) - remove in v0.13
  4485. } else {
  4486. throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');
  4487. }
  4488. var remaining = this.length - offset;
  4489. if (length === undefined || length > remaining) length = remaining;
  4490. if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {
  4491. throw new RangeError('Attempt to write outside buffer bounds');
  4492. }
  4493. if (!encoding) encoding = 'utf8';
  4494. var loweredCase = false;
  4495. for (;;) {
  4496. switch (encoding) {
  4497. case 'hex':
  4498. return hexWrite(this, string, offset, length);
  4499. case 'utf8':
  4500. case 'utf-8':
  4501. return utf8Write(this, string, offset, length);
  4502. case 'ascii':
  4503. return asciiWrite(this, string, offset, length);
  4504. case 'latin1':
  4505. case 'binary':
  4506. return latin1Write(this, string, offset, length);
  4507. case 'base64':
  4508. // Warning: maxLength not taken into account in base64Write
  4509. return base64Write(this, string, offset, length);
  4510. case 'ucs2':
  4511. case 'ucs-2':
  4512. case 'utf16le':
  4513. case 'utf-16le':
  4514. return ucs2Write(this, string, offset, length);
  4515. default:
  4516. if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
  4517. encoding = ('' + encoding).toLowerCase();
  4518. loweredCase = true;
  4519. }
  4520. }
  4521. };
  4522. Buffer.prototype.toJSON = function toJSON() {
  4523. return {
  4524. type: 'Buffer',
  4525. data: Array.prototype.slice.call(this._arr || this, 0)
  4526. };
  4527. };
  4528. function base64Slice(buf, start, end) {
  4529. if (start === 0 && end === buf.length) {
  4530. return base64.fromByteArray(buf);
  4531. } else {
  4532. return base64.fromByteArray(buf.slice(start, end));
  4533. }
  4534. }
  4535. function utf8Slice(buf, start, end) {
  4536. end = Math.min(buf.length, end);
  4537. var res = [];
  4538. var i = start;
  4539. while (i < end) {
  4540. var firstByte = buf[i];
  4541. var codePoint = null;
  4542. var bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1;
  4543. if (i + bytesPerSequence <= end) {
  4544. var secondByte, thirdByte, fourthByte, tempCodePoint;
  4545. switch (bytesPerSequence) {
  4546. case 1:
  4547. if (firstByte < 0x80) {
  4548. codePoint = firstByte;
  4549. }
  4550. break;
  4551. case 2:
  4552. secondByte = buf[i + 1];
  4553. if ((secondByte & 0xC0) === 0x80) {
  4554. tempCodePoint = (firstByte & 0x1F) << 0x6 | secondByte & 0x3F;
  4555. if (tempCodePoint > 0x7F) {
  4556. codePoint = tempCodePoint;
  4557. }
  4558. }
  4559. break;
  4560. case 3:
  4561. secondByte = buf[i + 1];
  4562. thirdByte = buf[i + 2];
  4563. if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
  4564. tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | thirdByte & 0x3F;
  4565. if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
  4566. codePoint = tempCodePoint;
  4567. }
  4568. }
  4569. break;
  4570. case 4:
  4571. secondByte = buf[i + 1];
  4572. thirdByte = buf[i + 2];
  4573. fourthByte = buf[i + 3];
  4574. if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
  4575. tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | fourthByte & 0x3F;
  4576. if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
  4577. codePoint = tempCodePoint;
  4578. }
  4579. }
  4580. }
  4581. }
  4582. if (codePoint === null) {
  4583. // we did not generate a valid codePoint so insert a
  4584. // replacement char (U+FFFD) and advance only 1 byte
  4585. codePoint = 0xFFFD;
  4586. bytesPerSequence = 1;
  4587. } else if (codePoint > 0xFFFF) {
  4588. // encode to utf16 (surrogate pair dance)
  4589. codePoint -= 0x10000;
  4590. res.push(codePoint >>> 10 & 0x3FF | 0xD800);
  4591. codePoint = 0xDC00 | codePoint & 0x3FF;
  4592. }
  4593. res.push(codePoint);
  4594. i += bytesPerSequence;
  4595. }
  4596. return decodeCodePointsArray(res);
  4597. } // Based on http://stackoverflow.com/a/22747272/680742, the browser with
  4598. // the lowest limit is Chrome, with 0x10000 args.
  4599. // We go 1 magnitude less, for safety
  4600. var MAX_ARGUMENTS_LENGTH = 0x1000;
  4601. function decodeCodePointsArray(codePoints) {
  4602. var len = codePoints.length;
  4603. if (len <= MAX_ARGUMENTS_LENGTH) {
  4604. return String.fromCharCode.apply(String, codePoints); // avoid extra slice()
  4605. } // Decode in chunks to avoid "call stack size exceeded".
  4606. var res = '';
  4607. var i = 0;
  4608. while (i < len) {
  4609. res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));
  4610. }
  4611. return res;
  4612. }
  4613. function asciiSlice(buf, start, end) {
  4614. var ret = '';
  4615. end = Math.min(buf.length, end);
  4616. for (var i = start; i < end; ++i) {
  4617. ret += String.fromCharCode(buf[i] & 0x7F);
  4618. }
  4619. return ret;
  4620. }
  4621. function latin1Slice(buf, start, end) {
  4622. var ret = '';
  4623. end = Math.min(buf.length, end);
  4624. for (var i = start; i < end; ++i) {
  4625. ret += String.fromCharCode(buf[i]);
  4626. }
  4627. return ret;
  4628. }
  4629. function hexSlice(buf, start, end) {
  4630. var len = buf.length;
  4631. if (!start || start < 0) start = 0;
  4632. if (!end || end < 0 || end > len) end = len;
  4633. var out = '';
  4634. for (var i = start; i < end; ++i) {
  4635. out += toHex(buf[i]);
  4636. }
  4637. return out;
  4638. }
  4639. function utf16leSlice(buf, start, end) {
  4640. var bytes = buf.slice(start, end);
  4641. var res = '';
  4642. for (var i = 0; i < bytes.length; i += 2) {
  4643. res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);
  4644. }
  4645. return res;
  4646. }
  4647. Buffer.prototype.slice = function slice(start, end) {
  4648. var len = this.length;
  4649. start = ~~start;
  4650. end = end === undefined ? len : ~~end;
  4651. if (start < 0) {
  4652. start += len;
  4653. if (start < 0) start = 0;
  4654. } else if (start > len) {
  4655. start = len;
  4656. }
  4657. if (end < 0) {
  4658. end += len;
  4659. if (end < 0) end = 0;
  4660. } else if (end > len) {
  4661. end = len;
  4662. }
  4663. if (end < start) end = start;
  4664. var newBuf;
  4665. if (Buffer.TYPED_ARRAY_SUPPORT) {
  4666. newBuf = this.subarray(start, end);
  4667. newBuf.__proto__ = Buffer.prototype;
  4668. } else {
  4669. var sliceLen = end - start;
  4670. newBuf = new Buffer(sliceLen, undefined);
  4671. for (var i = 0; i < sliceLen; ++i) {
  4672. newBuf[i] = this[i + start];
  4673. }
  4674. }
  4675. return newBuf;
  4676. };
  4677. /*
  4678. * Need to make sure that buffer isn't trying to write out of bounds.
  4679. */
  4680. function checkOffset(offset, ext, length) {
  4681. if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint');
  4682. if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length');
  4683. }
  4684. Buffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) {
  4685. offset = offset | 0;
  4686. byteLength = byteLength | 0;
  4687. if (!noAssert) checkOffset(offset, byteLength, this.length);
  4688. var val = this[offset];
  4689. var mul = 1;
  4690. var i = 0;
  4691. while (++i < byteLength && (mul *= 0x100)) {
  4692. val += this[offset + i] * mul;
  4693. }
  4694. return val;
  4695. };
  4696. Buffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) {
  4697. offset = offset | 0;
  4698. byteLength = byteLength | 0;
  4699. if (!noAssert) {
  4700. checkOffset(offset, byteLength, this.length);
  4701. }
  4702. var val = this[offset + --byteLength];
  4703. var mul = 1;
  4704. while (byteLength > 0 && (mul *= 0x100)) {
  4705. val += this[offset + --byteLength] * mul;
  4706. }
  4707. return val;
  4708. };
  4709. Buffer.prototype.readUInt8 = function readUInt8(offset, noAssert) {
  4710. if (!noAssert) checkOffset(offset, 1, this.length);
  4711. return this[offset];
  4712. };
  4713. Buffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {
  4714. if (!noAssert) checkOffset(offset, 2, this.length);
  4715. return this[offset] | this[offset + 1] << 8;
  4716. };
  4717. Buffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {
  4718. if (!noAssert) checkOffset(offset, 2, this.length);
  4719. return this[offset] << 8 | this[offset + 1];
  4720. };
  4721. Buffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {
  4722. if (!noAssert) checkOffset(offset, 4, this.length);
  4723. return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000;
  4724. };
  4725. Buffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {
  4726. if (!noAssert) checkOffset(offset, 4, this.length);
  4727. return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);
  4728. };
  4729. Buffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) {
  4730. offset = offset | 0;
  4731. byteLength = byteLength | 0;
  4732. if (!noAssert) checkOffset(offset, byteLength, this.length);
  4733. var val = this[offset];
  4734. var mul = 1;
  4735. var i = 0;
  4736. while (++i < byteLength && (mul *= 0x100)) {
  4737. val += this[offset + i] * mul;
  4738. }
  4739. mul *= 0x80;
  4740. if (val >= mul) val -= Math.pow(2, 8 * byteLength);
  4741. return val;
  4742. };
  4743. Buffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) {
  4744. offset = offset | 0;
  4745. byteLength = byteLength | 0;
  4746. if (!noAssert) checkOffset(offset, byteLength, this.length);
  4747. var i = byteLength;
  4748. var mul = 1;
  4749. var val = this[offset + --i];
  4750. while (i > 0 && (mul *= 0x100)) {
  4751. val += this[offset + --i] * mul;
  4752. }
  4753. mul *= 0x80;
  4754. if (val >= mul) val -= Math.pow(2, 8 * byteLength);
  4755. return val;
  4756. };
  4757. Buffer.prototype.readInt8 = function readInt8(offset, noAssert) {
  4758. if (!noAssert) checkOffset(offset, 1, this.length);
  4759. if (!(this[offset] & 0x80)) return this[offset];
  4760. return (0xff - this[offset] + 1) * -1;
  4761. };
  4762. Buffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) {
  4763. if (!noAssert) checkOffset(offset, 2, this.length);
  4764. var val = this[offset] | this[offset + 1] << 8;
  4765. return val & 0x8000 ? val | 0xFFFF0000 : val;
  4766. };
  4767. Buffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) {
  4768. if (!noAssert) checkOffset(offset, 2, this.length);
  4769. var val = this[offset + 1] | this[offset] << 8;
  4770. return val & 0x8000 ? val | 0xFFFF0000 : val;
  4771. };
  4772. Buffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) {
  4773. if (!noAssert) checkOffset(offset, 4, this.length);
  4774. return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;
  4775. };
  4776. Buffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) {
  4777. if (!noAssert) checkOffset(offset, 4, this.length);
  4778. return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];
  4779. };
  4780. Buffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) {
  4781. if (!noAssert) checkOffset(offset, 4, this.length);
  4782. return ieee754.read(this, offset, true, 23, 4);
  4783. };
  4784. Buffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) {
  4785. if (!noAssert) checkOffset(offset, 4, this.length);
  4786. return ieee754.read(this, offset, false, 23, 4);
  4787. };
  4788. Buffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {
  4789. if (!noAssert) checkOffset(offset, 8, this.length);
  4790. return ieee754.read(this, offset, true, 52, 8);
  4791. };
  4792. Buffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {
  4793. if (!noAssert) checkOffset(offset, 8, this.length);
  4794. return ieee754.read(this, offset, false, 52, 8);
  4795. };
  4796. function checkInt(buf, value, offset, ext, max, min) {
  4797. if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance');
  4798. if (value > max || value < min) throw new RangeError('"value" argument is out of bounds');
  4799. if (offset + ext > buf.length) throw new RangeError('Index out of range');
  4800. }
  4801. Buffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) {
  4802. value = +value;
  4803. offset = offset | 0;
  4804. byteLength = byteLength | 0;
  4805. if (!noAssert) {
  4806. var maxBytes = Math.pow(2, 8 * byteLength) - 1;
  4807. checkInt(this, value, offset, byteLength, maxBytes, 0);
  4808. }
  4809. var mul = 1;
  4810. var i = 0;
  4811. this[offset] = value & 0xFF;
  4812. while (++i < byteLength && (mul *= 0x100)) {
  4813. this[offset + i] = value / mul & 0xFF;
  4814. }
  4815. return offset + byteLength;
  4816. };
  4817. Buffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) {
  4818. value = +value;
  4819. offset = offset | 0;
  4820. byteLength = byteLength | 0;
  4821. if (!noAssert) {
  4822. var maxBytes = Math.pow(2, 8 * byteLength) - 1;
  4823. checkInt(this, value, offset, byteLength, maxBytes, 0);
  4824. }
  4825. var i = byteLength - 1;
  4826. var mul = 1;
  4827. this[offset + i] = value & 0xFF;
  4828. while (--i >= 0 && (mul *= 0x100)) {
  4829. this[offset + i] = value / mul & 0xFF;
  4830. }
  4831. return offset + byteLength;
  4832. };
  4833. Buffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {
  4834. value = +value;
  4835. offset = offset | 0;
  4836. if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);
  4837. if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);
  4838. this[offset] = value & 0xff;
  4839. return offset + 1;
  4840. };
  4841. function objectWriteUInt16(buf, value, offset, littleEndian) {
  4842. if (value < 0) value = 0xffff + value + 1;
  4843. for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
  4844. buf[offset + i] = (value & 0xff << 8 * (littleEndian ? i : 1 - i)) >>> (littleEndian ? i : 1 - i) * 8;
  4845. }
  4846. }
  4847. Buffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {
  4848. value = +value;
  4849. offset = offset | 0;
  4850. if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
  4851. if (Buffer.TYPED_ARRAY_SUPPORT) {
  4852. this[offset] = value & 0xff;
  4853. this[offset + 1] = value >>> 8;
  4854. } else {
  4855. objectWriteUInt16(this, value, offset, true);
  4856. }
  4857. return offset + 2;
  4858. };
  4859. Buffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {
  4860. value = +value;
  4861. offset = offset | 0;
  4862. if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
  4863. if (Buffer.TYPED_ARRAY_SUPPORT) {
  4864. this[offset] = value >>> 8;
  4865. this[offset + 1] = value & 0xff;
  4866. } else {
  4867. objectWriteUInt16(this, value, offset, false);
  4868. }
  4869. return offset + 2;
  4870. };
  4871. function objectWriteUInt32(buf, value, offset, littleEndian) {
  4872. if (value < 0) value = 0xffffffff + value + 1;
  4873. for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
  4874. buf[offset + i] = value >>> (littleEndian ? i : 3 - i) * 8 & 0xff;
  4875. }
  4876. }
  4877. Buffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {
  4878. value = +value;
  4879. offset = offset | 0;
  4880. if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
  4881. if (Buffer.TYPED_ARRAY_SUPPORT) {
  4882. this[offset + 3] = value >>> 24;
  4883. this[offset + 2] = value >>> 16;
  4884. this[offset + 1] = value >>> 8;
  4885. this[offset] = value & 0xff;
  4886. } else {
  4887. objectWriteUInt32(this, value, offset, true);
  4888. }
  4889. return offset + 4;
  4890. };
  4891. Buffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {
  4892. value = +value;
  4893. offset = offset | 0;
  4894. if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
  4895. if (Buffer.TYPED_ARRAY_SUPPORT) {
  4896. this[offset] = value >>> 24;
  4897. this[offset + 1] = value >>> 16;
  4898. this[offset + 2] = value >>> 8;
  4899. this[offset + 3] = value & 0xff;
  4900. } else {
  4901. objectWriteUInt32(this, value, offset, false);
  4902. }
  4903. return offset + 4;
  4904. };
  4905. Buffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) {
  4906. value = +value;
  4907. offset = offset | 0;
  4908. if (!noAssert) {
  4909. var limit = Math.pow(2, 8 * byteLength - 1);
  4910. checkInt(this, value, offset, byteLength, limit - 1, -limit);
  4911. }
  4912. var i = 0;
  4913. var mul = 1;
  4914. var sub = 0;
  4915. this[offset] = value & 0xFF;
  4916. while (++i < byteLength && (mul *= 0x100)) {
  4917. if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
  4918. sub = 1;
  4919. }
  4920. this[offset + i] = (value / mul >> 0) - sub & 0xFF;
  4921. }
  4922. return offset + byteLength;
  4923. };
  4924. Buffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) {
  4925. value = +value;
  4926. offset = offset | 0;
  4927. if (!noAssert) {
  4928. var limit = Math.pow(2, 8 * byteLength - 1);
  4929. checkInt(this, value, offset, byteLength, limit - 1, -limit);
  4930. }
  4931. var i = byteLength - 1;
  4932. var mul = 1;
  4933. var sub = 0;
  4934. this[offset + i] = value & 0xFF;
  4935. while (--i >= 0 && (mul *= 0x100)) {
  4936. if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
  4937. sub = 1;
  4938. }
  4939. this[offset + i] = (value / mul >> 0) - sub & 0xFF;
  4940. }
  4941. return offset + byteLength;
  4942. };
  4943. Buffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {
  4944. value = +value;
  4945. offset = offset | 0;
  4946. if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);
  4947. if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);
  4948. if (value < 0) value = 0xff + value + 1;
  4949. this[offset] = value & 0xff;
  4950. return offset + 1;
  4951. };
  4952. Buffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {
  4953. value = +value;
  4954. offset = offset | 0;
  4955. if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
  4956. if (Buffer.TYPED_ARRAY_SUPPORT) {
  4957. this[offset] = value & 0xff;
  4958. this[offset + 1] = value >>> 8;
  4959. } else {
  4960. objectWriteUInt16(this, value, offset, true);
  4961. }
  4962. return offset + 2;
  4963. };
  4964. Buffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {
  4965. value = +value;
  4966. offset = offset | 0;
  4967. if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
  4968. if (Buffer.TYPED_ARRAY_SUPPORT) {
  4969. this[offset] = value >>> 8;
  4970. this[offset + 1] = value & 0xff;
  4971. } else {
  4972. objectWriteUInt16(this, value, offset, false);
  4973. }
  4974. return offset + 2;
  4975. };
  4976. Buffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {
  4977. value = +value;
  4978. offset = offset | 0;
  4979. if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
  4980. if (Buffer.TYPED_ARRAY_SUPPORT) {
  4981. this[offset] = value & 0xff;
  4982. this[offset + 1] = value >>> 8;
  4983. this[offset + 2] = value >>> 16;
  4984. this[offset + 3] = value >>> 24;
  4985. } else {
  4986. objectWriteUInt32(this, value, offset, true);
  4987. }
  4988. return offset + 4;
  4989. };
  4990. Buffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {
  4991. value = +value;
  4992. offset = offset | 0;
  4993. if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
  4994. if (value < 0) value = 0xffffffff + value + 1;
  4995. if (Buffer.TYPED_ARRAY_SUPPORT) {
  4996. this[offset] = value >>> 24;
  4997. this[offset + 1] = value >>> 16;
  4998. this[offset + 2] = value >>> 8;
  4999. this[offset + 3] = value & 0xff;
  5000. } else {
  5001. objectWriteUInt32(this, value, offset, false);
  5002. }
  5003. return offset + 4;
  5004. };
  5005. function checkIEEE754(buf, value, offset, ext, max, min) {
  5006. if (offset + ext > buf.length) throw new RangeError('Index out of range');
  5007. if (offset < 0) throw new RangeError('Index out of range');
  5008. }
  5009. function writeFloat(buf, value, offset, littleEndian, noAssert) {
  5010. if (!noAssert) {
  5011. checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38);
  5012. }
  5013. ieee754.write(buf, value, offset, littleEndian, 23, 4);
  5014. return offset + 4;
  5015. }
  5016. Buffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {
  5017. return writeFloat(this, value, offset, true, noAssert);
  5018. };
  5019. Buffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {
  5020. return writeFloat(this, value, offset, false, noAssert);
  5021. };
  5022. function writeDouble(buf, value, offset, littleEndian, noAssert) {
  5023. if (!noAssert) {
  5024. checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308);
  5025. }
  5026. ieee754.write(buf, value, offset, littleEndian, 52, 8);
  5027. return offset + 8;
  5028. }
  5029. Buffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {
  5030. return writeDouble(this, value, offset, true, noAssert);
  5031. };
  5032. Buffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {
  5033. return writeDouble(this, value, offset, false, noAssert);
  5034. }; // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
  5035. Buffer.prototype.copy = function copy(target, targetStart, start, end) {
  5036. if (!start) start = 0;
  5037. if (!end && end !== 0) end = this.length;
  5038. if (targetStart >= target.length) targetStart = target.length;
  5039. if (!targetStart) targetStart = 0;
  5040. if (end > 0 && end < start) end = start; // Copy 0 bytes; we're done
  5041. if (end === start) return 0;
  5042. if (target.length === 0 || this.length === 0) return 0; // Fatal error conditions
  5043. if (targetStart < 0) {
  5044. throw new RangeError('targetStart out of bounds');
  5045. }
  5046. if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds');
  5047. if (end < 0) throw new RangeError('sourceEnd out of bounds'); // Are we oob?
  5048. if (end > this.length) end = this.length;
  5049. if (target.length - targetStart < end - start) {
  5050. end = target.length - targetStart + start;
  5051. }
  5052. var len = end - start;
  5053. var i;
  5054. if (this === target && start < targetStart && targetStart < end) {
  5055. // descending copy from end
  5056. for (i = len - 1; i >= 0; --i) {
  5057. target[i + targetStart] = this[i + start];
  5058. }
  5059. } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
  5060. // ascending copy from start
  5061. for (i = 0; i < len; ++i) {
  5062. target[i + targetStart] = this[i + start];
  5063. }
  5064. } else {
  5065. Uint8Array.prototype.set.call(target, this.subarray(start, start + len), targetStart);
  5066. }
  5067. return len;
  5068. }; // Usage:
  5069. // buffer.fill(number[, offset[, end]])
  5070. // buffer.fill(buffer[, offset[, end]])
  5071. // buffer.fill(string[, offset[, end]][, encoding])
  5072. Buffer.prototype.fill = function fill(val, start, end, encoding) {
  5073. // Handle string cases:
  5074. if (typeof val === 'string') {
  5075. if (typeof start === 'string') {
  5076. encoding = start;
  5077. start = 0;
  5078. end = this.length;
  5079. } else if (typeof end === 'string') {
  5080. encoding = end;
  5081. end = this.length;
  5082. }
  5083. if (val.length === 1) {
  5084. var code = val.charCodeAt(0);
  5085. if (code < 256) {
  5086. val = code;
  5087. }
  5088. }
  5089. if (encoding !== undefined && typeof encoding !== 'string') {
  5090. throw new TypeError('encoding must be a string');
  5091. }
  5092. if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
  5093. throw new TypeError('Unknown encoding: ' + encoding);
  5094. }
  5095. } else if (typeof val === 'number') {
  5096. val = val & 255;
  5097. } // Invalid ranges are not set to a default, so can range check early.
  5098. if (start < 0 || this.length < start || this.length < end) {
  5099. throw new RangeError('Out of range index');
  5100. }
  5101. if (end <= start) {
  5102. return this;
  5103. }
  5104. start = start >>> 0;
  5105. end = end === undefined ? this.length : end >>> 0;
  5106. if (!val) val = 0;
  5107. var i;
  5108. if (typeof val === 'number') {
  5109. for (i = start; i < end; ++i) {
  5110. this[i] = val;
  5111. }
  5112. } else {
  5113. var bytes = Buffer.isBuffer(val) ? val : utf8ToBytes(new Buffer(val, encoding).toString());
  5114. var len = bytes.length;
  5115. for (i = 0; i < end - start; ++i) {
  5116. this[i + start] = bytes[i % len];
  5117. }
  5118. }
  5119. return this;
  5120. }; // HELPER FUNCTIONS
  5121. // ================
  5122. var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g;
  5123. function base64clean(str) {
  5124. // Node strips out invalid characters like \n and \t from the string, base64-js does not
  5125. str = stringtrim(str).replace(INVALID_BASE64_RE, ''); // Node converts strings with length < 2 to ''
  5126. if (str.length < 2) return ''; // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
  5127. while (str.length % 4 !== 0) {
  5128. str = str + '=';
  5129. }
  5130. return str;
  5131. }
  5132. function stringtrim(str) {
  5133. if (str.trim) return str.trim();
  5134. return str.replace(/^\s+|\s+$/g, '');
  5135. }
  5136. function toHex(n) {
  5137. if (n < 16) return '0' + n.toString(16);
  5138. return n.toString(16);
  5139. }
  5140. function utf8ToBytes(string, units) {
  5141. units = units || Infinity;
  5142. var codePoint;
  5143. var length = string.length;
  5144. var leadSurrogate = null;
  5145. var bytes = [];
  5146. for (var i = 0; i < length; ++i) {
  5147. codePoint = string.charCodeAt(i); // is surrogate component
  5148. if (codePoint > 0xD7FF && codePoint < 0xE000) {
  5149. // last char was a lead
  5150. if (!leadSurrogate) {
  5151. // no lead yet
  5152. if (codePoint > 0xDBFF) {
  5153. // unexpected trail
  5154. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
  5155. continue;
  5156. } else if (i + 1 === length) {
  5157. // unpaired lead
  5158. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
  5159. continue;
  5160. } // valid lead
  5161. leadSurrogate = codePoint;
  5162. continue;
  5163. } // 2 leads in a row
  5164. if (codePoint < 0xDC00) {
  5165. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
  5166. leadSurrogate = codePoint;
  5167. continue;
  5168. } // valid surrogate pair
  5169. codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;
  5170. } else if (leadSurrogate) {
  5171. // valid bmp char, but last char was a lead
  5172. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
  5173. }
  5174. leadSurrogate = null; // encode utf8
  5175. if (codePoint < 0x80) {
  5176. if ((units -= 1) < 0) break;
  5177. bytes.push(codePoint);
  5178. } else if (codePoint < 0x800) {
  5179. if ((units -= 2) < 0) break;
  5180. bytes.push(codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80);
  5181. } else if (codePoint < 0x10000) {
  5182. if ((units -= 3) < 0) break;
  5183. bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);
  5184. } else if (codePoint < 0x110000) {
  5185. if ((units -= 4) < 0) break;
  5186. bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);
  5187. } else {
  5188. throw new Error('Invalid code point');
  5189. }
  5190. }
  5191. return bytes;
  5192. }
  5193. function asciiToBytes(str) {
  5194. var byteArray = [];
  5195. for (var i = 0; i < str.length; ++i) {
  5196. // Node's code seems to be doing this and not & 0x7F..
  5197. byteArray.push(str.charCodeAt(i) & 0xFF);
  5198. }
  5199. return byteArray;
  5200. }
  5201. function utf16leToBytes(str, units) {
  5202. var c, hi, lo;
  5203. var byteArray = [];
  5204. for (var i = 0; i < str.length; ++i) {
  5205. if ((units -= 2) < 0) break;
  5206. c = str.charCodeAt(i);
  5207. hi = c >> 8;
  5208. lo = c % 256;
  5209. byteArray.push(lo);
  5210. byteArray.push(hi);
  5211. }
  5212. return byteArray;
  5213. }
  5214. function base64ToBytes(str) {
  5215. return base64.toByteArray(base64clean(str));
  5216. }
  5217. function blitBuffer(src, dst, offset, length) {
  5218. for (var i = 0; i < length; ++i) {
  5219. if (i + offset >= dst.length || i >= src.length) break;
  5220. dst[i + offset] = src[i];
  5221. }
  5222. return i;
  5223. }
  5224. function isnan(val) {
  5225. return val !== val; // eslint-disable-line no-self-compare
  5226. }
  5227. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(5)))
  5228. /***/ }),
  5229. /* 15 */
  5230. /***/ (function(module, exports, __webpack_require__) {
  5231. /* WEBPACK VAR INJECTION */(function(Buffer) {// Copyright Joyent, Inc. and other Node contributors.
  5232. //
  5233. // Permission is hereby granted, free of charge, to any person obtaining a
  5234. // copy of this software and associated documentation files (the
  5235. // "Software"), to deal in the Software without restriction, including
  5236. // without limitation the rights to use, copy, modify, merge, publish,
  5237. // distribute, sublicense, and/or sell copies of the Software, and to permit
  5238. // persons to whom the Software is furnished to do so, subject to the
  5239. // following conditions:
  5240. //
  5241. // The above copyright notice and this permission notice shall be included
  5242. // in all copies or substantial portions of the Software.
  5243. //
  5244. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  5245. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  5246. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  5247. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  5248. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  5249. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  5250. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  5251. // NOTE: These type checking functions intentionally don't use `instanceof`
  5252. // because it is fragile and can be easily faked with `Object.create()`.
  5253. function isArray(arg) {
  5254. if (Array.isArray) {
  5255. return Array.isArray(arg);
  5256. }
  5257. return objectToString(arg) === '[object Array]';
  5258. }
  5259. exports.isArray = isArray;
  5260. function isBoolean(arg) {
  5261. return typeof arg === 'boolean';
  5262. }
  5263. exports.isBoolean = isBoolean;
  5264. function isNull(arg) {
  5265. return arg === null;
  5266. }
  5267. exports.isNull = isNull;
  5268. function isNullOrUndefined(arg) {
  5269. return arg == null;
  5270. }
  5271. exports.isNullOrUndefined = isNullOrUndefined;
  5272. function isNumber(arg) {
  5273. return typeof arg === 'number';
  5274. }
  5275. exports.isNumber = isNumber;
  5276. function isString(arg) {
  5277. return typeof arg === 'string';
  5278. }
  5279. exports.isString = isString;
  5280. function isSymbol(arg) {
  5281. return typeof arg === 'symbol';
  5282. }
  5283. exports.isSymbol = isSymbol;
  5284. function isUndefined(arg) {
  5285. return arg === void 0;
  5286. }
  5287. exports.isUndefined = isUndefined;
  5288. function isRegExp(re) {
  5289. return objectToString(re) === '[object RegExp]';
  5290. }
  5291. exports.isRegExp = isRegExp;
  5292. function isObject(arg) {
  5293. return typeof arg === 'object' && arg !== null;
  5294. }
  5295. exports.isObject = isObject;
  5296. function isDate(d) {
  5297. return objectToString(d) === '[object Date]';
  5298. }
  5299. exports.isDate = isDate;
  5300. function isError(e) {
  5301. return objectToString(e) === '[object Error]' || e instanceof Error;
  5302. }
  5303. exports.isError = isError;
  5304. function isFunction(arg) {
  5305. return typeof arg === 'function';
  5306. }
  5307. exports.isFunction = isFunction;
  5308. function isPrimitive(arg) {
  5309. return arg === null || typeof arg === 'boolean' || typeof arg === 'number' || typeof arg === 'string' || typeof arg === 'symbol' || // ES6 symbol
  5310. typeof arg === 'undefined';
  5311. }
  5312. exports.isPrimitive = isPrimitive;
  5313. exports.isBuffer = Buffer.isBuffer;
  5314. function objectToString(o) {
  5315. return Object.prototype.toString.call(o);
  5316. }
  5317. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(14).Buffer))
  5318. /***/ }),
  5319. /* 16 */
  5320. /***/ (function(module, exports) {
  5321. // shim for using process in browser
  5322. var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it
  5323. // don't break things. But we need to wrap it in a try catch in case it is
  5324. // wrapped in strict mode code which doesn't define any globals. It's inside a
  5325. // function because try/catches deoptimize in certain engines.
  5326. var cachedSetTimeout;
  5327. var cachedClearTimeout;
  5328. function defaultSetTimout() {
  5329. throw new Error('setTimeout has not been defined');
  5330. }
  5331. function defaultClearTimeout() {
  5332. throw new Error('clearTimeout has not been defined');
  5333. }
  5334. (function () {
  5335. try {
  5336. if (typeof setTimeout === 'function') {
  5337. cachedSetTimeout = setTimeout;
  5338. } else {
  5339. cachedSetTimeout = defaultSetTimout;
  5340. }
  5341. } catch (e) {
  5342. cachedSetTimeout = defaultSetTimout;
  5343. }
  5344. try {
  5345. if (typeof clearTimeout === 'function') {
  5346. cachedClearTimeout = clearTimeout;
  5347. } else {
  5348. cachedClearTimeout = defaultClearTimeout;
  5349. }
  5350. } catch (e) {
  5351. cachedClearTimeout = defaultClearTimeout;
  5352. }
  5353. })();
  5354. function runTimeout(fun) {
  5355. if (cachedSetTimeout === setTimeout) {
  5356. //normal enviroments in sane situations
  5357. return setTimeout(fun, 0);
  5358. } // if setTimeout wasn't available but was latter defined
  5359. if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
  5360. cachedSetTimeout = setTimeout;
  5361. return setTimeout(fun, 0);
  5362. }
  5363. try {
  5364. // when when somebody has screwed with setTimeout but no I.E. maddness
  5365. return cachedSetTimeout(fun, 0);
  5366. } catch (e) {
  5367. try {
  5368. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  5369. return cachedSetTimeout.call(null, fun, 0);
  5370. } catch (e) {
  5371. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
  5372. return cachedSetTimeout.call(this, fun, 0);
  5373. }
  5374. }
  5375. }
  5376. function runClearTimeout(marker) {
  5377. if (cachedClearTimeout === clearTimeout) {
  5378. //normal enviroments in sane situations
  5379. return clearTimeout(marker);
  5380. } // if clearTimeout wasn't available but was latter defined
  5381. if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
  5382. cachedClearTimeout = clearTimeout;
  5383. return clearTimeout(marker);
  5384. }
  5385. try {
  5386. // when when somebody has screwed with setTimeout but no I.E. maddness
  5387. return cachedClearTimeout(marker);
  5388. } catch (e) {
  5389. try {
  5390. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  5391. return cachedClearTimeout.call(null, marker);
  5392. } catch (e) {
  5393. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
  5394. // Some versions of I.E. have different rules for clearTimeout vs setTimeout
  5395. return cachedClearTimeout.call(this, marker);
  5396. }
  5397. }
  5398. }
  5399. var queue = [];
  5400. var draining = false;
  5401. var currentQueue;
  5402. var queueIndex = -1;
  5403. function cleanUpNextTick() {
  5404. if (!draining || !currentQueue) {
  5405. return;
  5406. }
  5407. draining = false;
  5408. if (currentQueue.length) {
  5409. queue = currentQueue.concat(queue);
  5410. } else {
  5411. queueIndex = -1;
  5412. }
  5413. if (queue.length) {
  5414. drainQueue();
  5415. }
  5416. }
  5417. function drainQueue() {
  5418. if (draining) {
  5419. return;
  5420. }
  5421. var timeout = runTimeout(cleanUpNextTick);
  5422. draining = true;
  5423. var len = queue.length;
  5424. while (len) {
  5425. currentQueue = queue;
  5426. queue = [];
  5427. while (++queueIndex < len) {
  5428. if (currentQueue) {
  5429. currentQueue[queueIndex].run();
  5430. }
  5431. }
  5432. queueIndex = -1;
  5433. len = queue.length;
  5434. }
  5435. currentQueue = null;
  5436. draining = false;
  5437. runClearTimeout(timeout);
  5438. }
  5439. process.nextTick = function (fun) {
  5440. var args = new Array(arguments.length - 1);
  5441. if (arguments.length > 1) {
  5442. for (var i = 1; i < arguments.length; i++) {
  5443. args[i - 1] = arguments[i];
  5444. }
  5445. }
  5446. queue.push(new Item(fun, args));
  5447. if (queue.length === 1 && !draining) {
  5448. runTimeout(drainQueue);
  5449. }
  5450. }; // v8 likes predictible objects
  5451. function Item(fun, array) {
  5452. this.fun = fun;
  5453. this.array = array;
  5454. }
  5455. Item.prototype.run = function () {
  5456. this.fun.apply(null, this.array);
  5457. };
  5458. process.title = 'browser';
  5459. process.browser = true;
  5460. process.env = {};
  5461. process.argv = [];
  5462. process.version = ''; // empty string to avoid regexp issues
  5463. process.versions = {};
  5464. function noop() {}
  5465. process.on = noop;
  5466. process.addListener = noop;
  5467. process.once = noop;
  5468. process.off = noop;
  5469. process.removeListener = noop;
  5470. process.removeAllListeners = noop;
  5471. process.emit = noop;
  5472. process.prependListener = noop;
  5473. process.prependOnceListener = noop;
  5474. process.listeners = function (name) {
  5475. return [];
  5476. };
  5477. process.binding = function (name) {
  5478. throw new Error('process.binding is not supported');
  5479. };
  5480. process.cwd = function () {
  5481. return '/';
  5482. };
  5483. process.chdir = function (dir) {
  5484. throw new Error('process.chdir is not supported');
  5485. };
  5486. process.umask = function () {
  5487. return 0;
  5488. };
  5489. /***/ }),
  5490. /* 17 */
  5491. /***/ (function(module, exports, __webpack_require__) {
  5492. "use strict";
  5493. /* WEBPACK VAR INJECTION */(function(process) {
  5494. if (typeof process === 'undefined' || !process.version || process.version.indexOf('v0.') === 0 || process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {
  5495. module.exports = {
  5496. nextTick: nextTick
  5497. };
  5498. } else {
  5499. module.exports = process;
  5500. }
  5501. function nextTick(fn, arg1, arg2, arg3) {
  5502. if (typeof fn !== 'function') {
  5503. throw new TypeError('"callback" argument must be a function');
  5504. }
  5505. var len = arguments.length;
  5506. var args, i;
  5507. switch (len) {
  5508. case 0:
  5509. case 1:
  5510. return process.nextTick(fn);
  5511. case 2:
  5512. return process.nextTick(function afterTickOne() {
  5513. fn.call(null, arg1);
  5514. });
  5515. case 3:
  5516. return process.nextTick(function afterTickTwo() {
  5517. fn.call(null, arg1, arg2);
  5518. });
  5519. case 4:
  5520. return process.nextTick(function afterTickThree() {
  5521. fn.call(null, arg1, arg2, arg3);
  5522. });
  5523. default:
  5524. args = new Array(len - 1);
  5525. i = 0;
  5526. while (i < args.length) {
  5527. args[i++] = arguments[i];
  5528. }
  5529. return process.nextTick(function afterTick() {
  5530. fn.apply(null, args);
  5531. });
  5532. }
  5533. }
  5534. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(16)))
  5535. /***/ }),
  5536. /* 18 */
  5537. /***/ (function(module, exports, __webpack_require__) {
  5538. /* WEBPACK VAR INJECTION */(function(global) {/**
  5539. * lodash (Custom Build) <https://lodash.com/>
  5540. * Build: `lodash modularize exports="npm" -o ./`
  5541. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  5542. * Released under MIT license <https://lodash.com/license>
  5543. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  5544. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  5545. */
  5546. /** Used as the `TypeError` message for "Functions" methods. */
  5547. var FUNC_ERROR_TEXT = 'Expected a function';
  5548. /** Used as references for various `Number` constants. */
  5549. var NAN = 0 / 0;
  5550. /** `Object#toString` result references. */
  5551. var symbolTag = '[object Symbol]';
  5552. /** Used to match leading and trailing whitespace. */
  5553. var reTrim = /^\s+|\s+$/g;
  5554. /** Used to detect bad signed hexadecimal string values. */
  5555. var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
  5556. /** Used to detect binary string values. */
  5557. var reIsBinary = /^0b[01]+$/i;
  5558. /** Used to detect octal string values. */
  5559. var reIsOctal = /^0o[0-7]+$/i;
  5560. /** Built-in method references without a dependency on `root`. */
  5561. var freeParseInt = parseInt;
  5562. /** Detect free variable `global` from Node.js. */
  5563. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  5564. /** Detect free variable `self`. */
  5565. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  5566. /** Used as a reference to the global object. */
  5567. var root = freeGlobal || freeSelf || Function('return this')();
  5568. /** Used for built-in method references. */
  5569. var objectProto = Object.prototype;
  5570. /**
  5571. * Used to resolve the
  5572. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  5573. * of values.
  5574. */
  5575. var objectToString = objectProto.toString;
  5576. /* Built-in method references for those with the same name as other `lodash` methods. */
  5577. var nativeMax = Math.max,
  5578. nativeMin = Math.min;
  5579. /**
  5580. * Gets the timestamp of the number of milliseconds that have elapsed since
  5581. * the Unix epoch (1 January 1970 00:00:00 UTC).
  5582. *
  5583. * @static
  5584. * @memberOf _
  5585. * @since 2.4.0
  5586. * @category Date
  5587. * @returns {number} Returns the timestamp.
  5588. * @example
  5589. *
  5590. * _.defer(function(stamp) {
  5591. * console.log(_.now() - stamp);
  5592. * }, _.now());
  5593. * // => Logs the number of milliseconds it took for the deferred invocation.
  5594. */
  5595. var now = function now() {
  5596. return root.Date.now();
  5597. };
  5598. /**
  5599. * Creates a debounced function that delays invoking `func` until after `wait`
  5600. * milliseconds have elapsed since the last time the debounced function was
  5601. * invoked. The debounced function comes with a `cancel` method to cancel
  5602. * delayed `func` invocations and a `flush` method to immediately invoke them.
  5603. * Provide `options` to indicate whether `func` should be invoked on the
  5604. * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
  5605. * with the last arguments provided to the debounced function. Subsequent
  5606. * calls to the debounced function return the result of the last `func`
  5607. * invocation.
  5608. *
  5609. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  5610. * invoked on the trailing edge of the timeout only if the debounced function
  5611. * is invoked more than once during the `wait` timeout.
  5612. *
  5613. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  5614. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  5615. *
  5616. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  5617. * for details over the differences between `_.debounce` and `_.throttle`.
  5618. *
  5619. * @static
  5620. * @memberOf _
  5621. * @since 0.1.0
  5622. * @category Function
  5623. * @param {Function} func The function to debounce.
  5624. * @param {number} [wait=0] The number of milliseconds to delay.
  5625. * @param {Object} [options={}] The options object.
  5626. * @param {boolean} [options.leading=false]
  5627. * Specify invoking on the leading edge of the timeout.
  5628. * @param {number} [options.maxWait]
  5629. * The maximum time `func` is allowed to be delayed before it's invoked.
  5630. * @param {boolean} [options.trailing=true]
  5631. * Specify invoking on the trailing edge of the timeout.
  5632. * @returns {Function} Returns the new debounced function.
  5633. * @example
  5634. *
  5635. * // Avoid costly calculations while the window size is in flux.
  5636. * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
  5637. *
  5638. * // Invoke `sendMail` when clicked, debouncing subsequent calls.
  5639. * jQuery(element).on('click', _.debounce(sendMail, 300, {
  5640. * 'leading': true,
  5641. * 'trailing': false
  5642. * }));
  5643. *
  5644. * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
  5645. * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
  5646. * var source = new EventSource('/stream');
  5647. * jQuery(source).on('message', debounced);
  5648. *
  5649. * // Cancel the trailing debounced invocation.
  5650. * jQuery(window).on('popstate', debounced.cancel);
  5651. */
  5652. function debounce(func, wait, options) {
  5653. var lastArgs,
  5654. lastThis,
  5655. maxWait,
  5656. result,
  5657. timerId,
  5658. lastCallTime,
  5659. lastInvokeTime = 0,
  5660. leading = false,
  5661. maxing = false,
  5662. trailing = true;
  5663. if (typeof func != 'function') {
  5664. throw new TypeError(FUNC_ERROR_TEXT);
  5665. }
  5666. wait = toNumber(wait) || 0;
  5667. if (isObject(options)) {
  5668. leading = !!options.leading;
  5669. maxing = 'maxWait' in options;
  5670. maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
  5671. trailing = 'trailing' in options ? !!options.trailing : trailing;
  5672. }
  5673. function invokeFunc(time) {
  5674. var args = lastArgs,
  5675. thisArg = lastThis;
  5676. lastArgs = lastThis = undefined;
  5677. lastInvokeTime = time;
  5678. result = func.apply(thisArg, args);
  5679. return result;
  5680. }
  5681. function leadingEdge(time) {
  5682. // Reset any `maxWait` timer.
  5683. lastInvokeTime = time; // Start the timer for the trailing edge.
  5684. timerId = setTimeout(timerExpired, wait); // Invoke the leading edge.
  5685. return leading ? invokeFunc(time) : result;
  5686. }
  5687. function remainingWait(time) {
  5688. var timeSinceLastCall = time - lastCallTime,
  5689. timeSinceLastInvoke = time - lastInvokeTime,
  5690. result = wait - timeSinceLastCall;
  5691. return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
  5692. }
  5693. function shouldInvoke(time) {
  5694. var timeSinceLastCall = time - lastCallTime,
  5695. timeSinceLastInvoke = time - lastInvokeTime; // Either this is the first call, activity has stopped and we're at the
  5696. // trailing edge, the system time has gone backwards and we're treating
  5697. // it as the trailing edge, or we've hit the `maxWait` limit.
  5698. return lastCallTime === undefined || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
  5699. }
  5700. function timerExpired() {
  5701. var time = now();
  5702. if (shouldInvoke(time)) {
  5703. return trailingEdge(time);
  5704. } // Restart the timer.
  5705. timerId = setTimeout(timerExpired, remainingWait(time));
  5706. }
  5707. function trailingEdge(time) {
  5708. timerId = undefined; // Only invoke if we have `lastArgs` which means `func` has been
  5709. // debounced at least once.
  5710. if (trailing && lastArgs) {
  5711. return invokeFunc(time);
  5712. }
  5713. lastArgs = lastThis = undefined;
  5714. return result;
  5715. }
  5716. function cancel() {
  5717. if (timerId !== undefined) {
  5718. clearTimeout(timerId);
  5719. }
  5720. lastInvokeTime = 0;
  5721. lastArgs = lastCallTime = lastThis = timerId = undefined;
  5722. }
  5723. function flush() {
  5724. return timerId === undefined ? result : trailingEdge(now());
  5725. }
  5726. function debounced() {
  5727. var time = now(),
  5728. isInvoking = shouldInvoke(time);
  5729. lastArgs = arguments;
  5730. lastThis = this;
  5731. lastCallTime = time;
  5732. if (isInvoking) {
  5733. if (timerId === undefined) {
  5734. return leadingEdge(lastCallTime);
  5735. }
  5736. if (maxing) {
  5737. // Handle invocations in a tight loop.
  5738. timerId = setTimeout(timerExpired, wait);
  5739. return invokeFunc(lastCallTime);
  5740. }
  5741. }
  5742. if (timerId === undefined) {
  5743. timerId = setTimeout(timerExpired, wait);
  5744. }
  5745. return result;
  5746. }
  5747. debounced.cancel = cancel;
  5748. debounced.flush = flush;
  5749. return debounced;
  5750. }
  5751. /**
  5752. * Checks if `value` is the
  5753. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  5754. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  5755. *
  5756. * @static
  5757. * @memberOf _
  5758. * @since 0.1.0
  5759. * @category Lang
  5760. * @param {*} value The value to check.
  5761. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  5762. * @example
  5763. *
  5764. * _.isObject({});
  5765. * // => true
  5766. *
  5767. * _.isObject([1, 2, 3]);
  5768. * // => true
  5769. *
  5770. * _.isObject(_.noop);
  5771. * // => true
  5772. *
  5773. * _.isObject(null);
  5774. * // => false
  5775. */
  5776. function isObject(value) {
  5777. var type = typeof value;
  5778. return !!value && (type == 'object' || type == 'function');
  5779. }
  5780. /**
  5781. * Checks if `value` is object-like. A value is object-like if it's not `null`
  5782. * and has a `typeof` result of "object".
  5783. *
  5784. * @static
  5785. * @memberOf _
  5786. * @since 4.0.0
  5787. * @category Lang
  5788. * @param {*} value The value to check.
  5789. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  5790. * @example
  5791. *
  5792. * _.isObjectLike({});
  5793. * // => true
  5794. *
  5795. * _.isObjectLike([1, 2, 3]);
  5796. * // => true
  5797. *
  5798. * _.isObjectLike(_.noop);
  5799. * // => false
  5800. *
  5801. * _.isObjectLike(null);
  5802. * // => false
  5803. */
  5804. function isObjectLike(value) {
  5805. return !!value && typeof value == 'object';
  5806. }
  5807. /**
  5808. * Checks if `value` is classified as a `Symbol` primitive or object.
  5809. *
  5810. * @static
  5811. * @memberOf _
  5812. * @since 4.0.0
  5813. * @category Lang
  5814. * @param {*} value The value to check.
  5815. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  5816. * @example
  5817. *
  5818. * _.isSymbol(Symbol.iterator);
  5819. * // => true
  5820. *
  5821. * _.isSymbol('abc');
  5822. * // => false
  5823. */
  5824. function isSymbol(value) {
  5825. return typeof value == 'symbol' || isObjectLike(value) && objectToString.call(value) == symbolTag;
  5826. }
  5827. /**
  5828. * Converts `value` to a number.
  5829. *
  5830. * @static
  5831. * @memberOf _
  5832. * @since 4.0.0
  5833. * @category Lang
  5834. * @param {*} value The value to process.
  5835. * @returns {number} Returns the number.
  5836. * @example
  5837. *
  5838. * _.toNumber(3.2);
  5839. * // => 3.2
  5840. *
  5841. * _.toNumber(Number.MIN_VALUE);
  5842. * // => 5e-324
  5843. *
  5844. * _.toNumber(Infinity);
  5845. * // => Infinity
  5846. *
  5847. * _.toNumber('3.2');
  5848. * // => 3.2
  5849. */
  5850. function toNumber(value) {
  5851. if (typeof value == 'number') {
  5852. return value;
  5853. }
  5854. if (isSymbol(value)) {
  5855. return NAN;
  5856. }
  5857. if (isObject(value)) {
  5858. var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
  5859. value = isObject(other) ? other + '' : other;
  5860. }
  5861. if (typeof value != 'string') {
  5862. return value === 0 ? value : +value;
  5863. }
  5864. value = value.replace(reTrim, '');
  5865. var isBinary = reIsBinary.test(value);
  5866. return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
  5867. }
  5868. module.exports = debounce;
  5869. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(5)))
  5870. /***/ }),
  5871. /* 19 */
  5872. /***/ (function(module, exports, __webpack_require__) {
  5873. /* WEBPACK VAR INJECTION */(function(global) {/**
  5874. * lodash (Custom Build) <https://lodash.com/>
  5875. * Build: `lodash modularize exports="npm" -o ./`
  5876. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  5877. * Released under MIT license <https://lodash.com/license>
  5878. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  5879. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  5880. */
  5881. /** Used as references for various `Number` constants. */
  5882. var INFINITY = 1 / 0;
  5883. /** `Object#toString` result references. */
  5884. var symbolTag = '[object Symbol]';
  5885. /** Used to compose unicode character classes. */
  5886. var rsAstralRange = "\\ud800-\\udfff",
  5887. rsComboMarksRange = "\\u0300-\\u036f\\ufe20-\\ufe23",
  5888. rsComboSymbolsRange = "\\u20d0-\\u20f0",
  5889. rsVarRange = "\\ufe0e\\ufe0f";
  5890. /** Used to compose unicode capture groups. */
  5891. var rsAstral = '[' + rsAstralRange + ']',
  5892. rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']',
  5893. rsFitz = "\\ud83c[\\udffb-\\udfff]",
  5894. rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
  5895. rsNonAstral = '[^' + rsAstralRange + ']',
  5896. rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}",
  5897. rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]",
  5898. rsZWJ = "\\u200d";
  5899. /** Used to compose unicode regexes. */
  5900. var reOptMod = rsModifier + '?',
  5901. rsOptVar = '[' + rsVarRange + ']?',
  5902. rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
  5903. rsSeq = rsOptVar + reOptMod + rsOptJoin,
  5904. rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
  5905. /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
  5906. var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
  5907. /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
  5908. var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']');
  5909. /** Detect free variable `global` from Node.js. */
  5910. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  5911. /** Detect free variable `self`. */
  5912. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  5913. /** Used as a reference to the global object. */
  5914. var root = freeGlobal || freeSelf || Function('return this')();
  5915. /**
  5916. * Converts an ASCII `string` to an array.
  5917. *
  5918. * @private
  5919. * @param {string} string The string to convert.
  5920. * @returns {Array} Returns the converted array.
  5921. */
  5922. function asciiToArray(string) {
  5923. return string.split('');
  5924. }
  5925. /**
  5926. * Checks if `string` contains Unicode symbols.
  5927. *
  5928. * @private
  5929. * @param {string} string The string to inspect.
  5930. * @returns {boolean} Returns `true` if a symbol is found, else `false`.
  5931. */
  5932. function hasUnicode(string) {
  5933. return reHasUnicode.test(string);
  5934. }
  5935. /**
  5936. * Converts `string` to an array.
  5937. *
  5938. * @private
  5939. * @param {string} string The string to convert.
  5940. * @returns {Array} Returns the converted array.
  5941. */
  5942. function stringToArray(string) {
  5943. return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string);
  5944. }
  5945. /**
  5946. * Converts a Unicode `string` to an array.
  5947. *
  5948. * @private
  5949. * @param {string} string The string to convert.
  5950. * @returns {Array} Returns the converted array.
  5951. */
  5952. function unicodeToArray(string) {
  5953. return string.match(reUnicode) || [];
  5954. }
  5955. /** Used for built-in method references. */
  5956. var objectProto = Object.prototype;
  5957. /**
  5958. * Used to resolve the
  5959. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  5960. * of values.
  5961. */
  5962. var objectToString = objectProto.toString;
  5963. /** Built-in value references. */
  5964. var Symbol = root.Symbol;
  5965. /** Used to convert symbols to primitives and strings. */
  5966. var symbolProto = Symbol ? Symbol.prototype : undefined,
  5967. symbolToString = symbolProto ? symbolProto.toString : undefined;
  5968. /**
  5969. * The base implementation of `_.slice` without an iteratee call guard.
  5970. *
  5971. * @private
  5972. * @param {Array} array The array to slice.
  5973. * @param {number} [start=0] The start position.
  5974. * @param {number} [end=array.length] The end position.
  5975. * @returns {Array} Returns the slice of `array`.
  5976. */
  5977. function baseSlice(array, start, end) {
  5978. var index = -1,
  5979. length = array.length;
  5980. if (start < 0) {
  5981. start = -start > length ? 0 : length + start;
  5982. }
  5983. end = end > length ? length : end;
  5984. if (end < 0) {
  5985. end += length;
  5986. }
  5987. length = start > end ? 0 : end - start >>> 0;
  5988. start >>>= 0;
  5989. var result = Array(length);
  5990. while (++index < length) {
  5991. result[index] = array[index + start];
  5992. }
  5993. return result;
  5994. }
  5995. /**
  5996. * The base implementation of `_.toString` which doesn't convert nullish
  5997. * values to empty strings.
  5998. *
  5999. * @private
  6000. * @param {*} value The value to process.
  6001. * @returns {string} Returns the string.
  6002. */
  6003. function baseToString(value) {
  6004. // Exit early for strings to avoid a performance hit in some environments.
  6005. if (typeof value == 'string') {
  6006. return value;
  6007. }
  6008. if (isSymbol(value)) {
  6009. return symbolToString ? symbolToString.call(value) : '';
  6010. }
  6011. var result = value + '';
  6012. return result == '0' && 1 / value == -INFINITY ? '-0' : result;
  6013. }
  6014. /**
  6015. * Casts `array` to a slice if it's needed.
  6016. *
  6017. * @private
  6018. * @param {Array} array The array to inspect.
  6019. * @param {number} start The start position.
  6020. * @param {number} [end=array.length] The end position.
  6021. * @returns {Array} Returns the cast slice.
  6022. */
  6023. function castSlice(array, start, end) {
  6024. var length = array.length;
  6025. end = end === undefined ? length : end;
  6026. return !start && end >= length ? array : baseSlice(array, start, end);
  6027. }
  6028. /**
  6029. * Creates a function like `_.lowerFirst`.
  6030. *
  6031. * @private
  6032. * @param {string} methodName The name of the `String` case method to use.
  6033. * @returns {Function} Returns the new case function.
  6034. */
  6035. function createCaseFirst(methodName) {
  6036. return function (string) {
  6037. string = toString(string);
  6038. var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined;
  6039. var chr = strSymbols ? strSymbols[0] : string.charAt(0);
  6040. var trailing = strSymbols ? castSlice(strSymbols, 1).join('') : string.slice(1);
  6041. return chr[methodName]() + trailing;
  6042. };
  6043. }
  6044. /**
  6045. * Checks if `value` is object-like. A value is object-like if it's not `null`
  6046. * and has a `typeof` result of "object".
  6047. *
  6048. * @static
  6049. * @memberOf _
  6050. * @since 4.0.0
  6051. * @category Lang
  6052. * @param {*} value The value to check.
  6053. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  6054. * @example
  6055. *
  6056. * _.isObjectLike({});
  6057. * // => true
  6058. *
  6059. * _.isObjectLike([1, 2, 3]);
  6060. * // => true
  6061. *
  6062. * _.isObjectLike(_.noop);
  6063. * // => false
  6064. *
  6065. * _.isObjectLike(null);
  6066. * // => false
  6067. */
  6068. function isObjectLike(value) {
  6069. return !!value && typeof value == 'object';
  6070. }
  6071. /**
  6072. * Checks if `value` is classified as a `Symbol` primitive or object.
  6073. *
  6074. * @static
  6075. * @memberOf _
  6076. * @since 4.0.0
  6077. * @category Lang
  6078. * @param {*} value The value to check.
  6079. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  6080. * @example
  6081. *
  6082. * _.isSymbol(Symbol.iterator);
  6083. * // => true
  6084. *
  6085. * _.isSymbol('abc');
  6086. * // => false
  6087. */
  6088. function isSymbol(value) {
  6089. return typeof value == 'symbol' || isObjectLike(value) && objectToString.call(value) == symbolTag;
  6090. }
  6091. /**
  6092. * Converts `value` to a string. An empty string is returned for `null`
  6093. * and `undefined` values. The sign of `-0` is preserved.
  6094. *
  6095. * @static
  6096. * @memberOf _
  6097. * @since 4.0.0
  6098. * @category Lang
  6099. * @param {*} value The value to process.
  6100. * @returns {string} Returns the string.
  6101. * @example
  6102. *
  6103. * _.toString(null);
  6104. * // => ''
  6105. *
  6106. * _.toString(-0);
  6107. * // => '-0'
  6108. *
  6109. * _.toString([1, 2, 3]);
  6110. * // => '1,2,3'
  6111. */
  6112. function toString(value) {
  6113. return value == null ? '' : baseToString(value);
  6114. }
  6115. /**
  6116. * Converts the first character of `string` to upper case.
  6117. *
  6118. * @static
  6119. * @memberOf _
  6120. * @since 4.0.0
  6121. * @category String
  6122. * @param {string} [string=''] The string to convert.
  6123. * @returns {string} Returns the converted string.
  6124. * @example
  6125. *
  6126. * _.upperFirst('fred');
  6127. * // => 'Fred'
  6128. *
  6129. * _.upperFirst('FRED');
  6130. * // => 'FRED'
  6131. */
  6132. var upperFirst = createCaseFirst('toUpperCase');
  6133. module.exports = upperFirst;
  6134. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(5)))
  6135. /***/ }),
  6136. /* 20 */
  6137. /***/ (function(module, exports) {
  6138. module.exports = __WEBPACK_EXTERNAL_MODULE__20__;
  6139. /***/ }),
  6140. /* 21 */
  6141. /***/ (function(module, exports) {
  6142. module.exports = __WEBPACK_EXTERNAL_MODULE__21__;
  6143. /***/ }),
  6144. /* 22 */
  6145. /***/ (function(module, exports, __webpack_require__) {
  6146. /* WEBPACK VAR INJECTION */(function(global) {/**
  6147. * lodash (Custom Build) <https://lodash.com/>
  6148. * Build: `lodash modularize exports="npm" -o ./`
  6149. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  6150. * Released under MIT license <https://lodash.com/license>
  6151. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  6152. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  6153. */
  6154. /** Used as references for various `Number` constants. */
  6155. var INFINITY = 1 / 0;
  6156. /** `Object#toString` result references. */
  6157. var symbolTag = '[object Symbol]';
  6158. /** Detect free variable `global` from Node.js. */
  6159. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  6160. /** Detect free variable `self`. */
  6161. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  6162. /** Used as a reference to the global object. */
  6163. var root = freeGlobal || freeSelf || Function('return this')();
  6164. /** Used for built-in method references. */
  6165. var objectProto = Object.prototype;
  6166. /** Used to generate unique IDs. */
  6167. var idCounter = 0;
  6168. /**
  6169. * Used to resolve the
  6170. * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
  6171. * of values.
  6172. */
  6173. var objectToString = objectProto.toString;
  6174. /** Built-in value references. */
  6175. var Symbol = root.Symbol;
  6176. /** Used to convert symbols to primitives and strings. */
  6177. var symbolProto = Symbol ? Symbol.prototype : undefined,
  6178. symbolToString = symbolProto ? symbolProto.toString : undefined;
  6179. /**
  6180. * The base implementation of `_.toString` which doesn't convert nullish
  6181. * values to empty strings.
  6182. *
  6183. * @private
  6184. * @param {*} value The value to process.
  6185. * @returns {string} Returns the string.
  6186. */
  6187. function baseToString(value) {
  6188. // Exit early for strings to avoid a performance hit in some environments.
  6189. if (typeof value == 'string') {
  6190. return value;
  6191. }
  6192. if (isSymbol(value)) {
  6193. return symbolToString ? symbolToString.call(value) : '';
  6194. }
  6195. var result = value + '';
  6196. return result == '0' && 1 / value == -INFINITY ? '-0' : result;
  6197. }
  6198. /**
  6199. * Checks if `value` is object-like. A value is object-like if it's not `null`
  6200. * and has a `typeof` result of "object".
  6201. *
  6202. * @static
  6203. * @memberOf _
  6204. * @since 4.0.0
  6205. * @category Lang
  6206. * @param {*} value The value to check.
  6207. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  6208. * @example
  6209. *
  6210. * _.isObjectLike({});
  6211. * // => true
  6212. *
  6213. * _.isObjectLike([1, 2, 3]);
  6214. * // => true
  6215. *
  6216. * _.isObjectLike(_.noop);
  6217. * // => false
  6218. *
  6219. * _.isObjectLike(null);
  6220. * // => false
  6221. */
  6222. function isObjectLike(value) {
  6223. return !!value && typeof value == 'object';
  6224. }
  6225. /**
  6226. * Checks if `value` is classified as a `Symbol` primitive or object.
  6227. *
  6228. * @static
  6229. * @memberOf _
  6230. * @since 4.0.0
  6231. * @category Lang
  6232. * @param {*} value The value to check.
  6233. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  6234. * @example
  6235. *
  6236. * _.isSymbol(Symbol.iterator);
  6237. * // => true
  6238. *
  6239. * _.isSymbol('abc');
  6240. * // => false
  6241. */
  6242. function isSymbol(value) {
  6243. return typeof value == 'symbol' || isObjectLike(value) && objectToString.call(value) == symbolTag;
  6244. }
  6245. /**
  6246. * Converts `value` to a string. An empty string is returned for `null`
  6247. * and `undefined` values. The sign of `-0` is preserved.
  6248. *
  6249. * @static
  6250. * @memberOf _
  6251. * @since 4.0.0
  6252. * @category Lang
  6253. * @param {*} value The value to process.
  6254. * @returns {string} Returns the string.
  6255. * @example
  6256. *
  6257. * _.toString(null);
  6258. * // => ''
  6259. *
  6260. * _.toString(-0);
  6261. * // => '-0'
  6262. *
  6263. * _.toString([1, 2, 3]);
  6264. * // => '1,2,3'
  6265. */
  6266. function toString(value) {
  6267. return value == null ? '' : baseToString(value);
  6268. }
  6269. /**
  6270. * Generates a unique ID. If `prefix` is given, the ID is appended to it.
  6271. *
  6272. * @static
  6273. * @since 0.1.0
  6274. * @memberOf _
  6275. * @category Util
  6276. * @param {string} [prefix=''] The value to prefix the ID with.
  6277. * @returns {string} Returns the unique ID.
  6278. * @example
  6279. *
  6280. * _.uniqueId('contact_');
  6281. * // => 'contact_104'
  6282. *
  6283. * _.uniqueId();
  6284. * // => '105'
  6285. */
  6286. function uniqueId(prefix) {
  6287. var id = ++idCounter;
  6288. return toString(prefix) + id;
  6289. }
  6290. module.exports = uniqueId;
  6291. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(5)))
  6292. /***/ }),
  6293. /* 23 */
  6294. /***/ (function(module, exports, __webpack_require__) {
  6295. /* WEBPACK VAR INJECTION */(function(global, module) {/**
  6296. * lodash (Custom Build) <https://lodash.com/>
  6297. * Build: `lodash modularize exports="npm" -o ./`
  6298. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  6299. * Released under MIT license <https://lodash.com/license>
  6300. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  6301. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  6302. */
  6303. /** Used as the size to enable large array optimizations. */
  6304. var LARGE_ARRAY_SIZE = 200;
  6305. /** Used to stand-in for `undefined` hash values. */
  6306. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  6307. /** Used as references for various `Number` constants. */
  6308. var MAX_SAFE_INTEGER = 9007199254740991;
  6309. /** `Object#toString` result references. */
  6310. var argsTag = '[object Arguments]',
  6311. arrayTag = '[object Array]',
  6312. boolTag = '[object Boolean]',
  6313. dateTag = '[object Date]',
  6314. errorTag = '[object Error]',
  6315. funcTag = '[object Function]',
  6316. genTag = '[object GeneratorFunction]',
  6317. mapTag = '[object Map]',
  6318. numberTag = '[object Number]',
  6319. objectTag = '[object Object]',
  6320. promiseTag = '[object Promise]',
  6321. regexpTag = '[object RegExp]',
  6322. setTag = '[object Set]',
  6323. stringTag = '[object String]',
  6324. symbolTag = '[object Symbol]',
  6325. weakMapTag = '[object WeakMap]';
  6326. var arrayBufferTag = '[object ArrayBuffer]',
  6327. dataViewTag = '[object DataView]',
  6328. float32Tag = '[object Float32Array]',
  6329. float64Tag = '[object Float64Array]',
  6330. int8Tag = '[object Int8Array]',
  6331. int16Tag = '[object Int16Array]',
  6332. int32Tag = '[object Int32Array]',
  6333. uint8Tag = '[object Uint8Array]',
  6334. uint8ClampedTag = '[object Uint8ClampedArray]',
  6335. uint16Tag = '[object Uint16Array]',
  6336. uint32Tag = '[object Uint32Array]';
  6337. /**
  6338. * Used to match `RegExp`
  6339. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  6340. */
  6341. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
  6342. /** Used to match `RegExp` flags from their coerced string values. */
  6343. var reFlags = /\w*$/;
  6344. /** Used to detect host constructors (Safari). */
  6345. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  6346. /** Used to detect unsigned integer values. */
  6347. var reIsUint = /^(?:0|[1-9]\d*)$/;
  6348. /** Used to identify `toStringTag` values supported by `_.clone`. */
  6349. var cloneableTags = {};
  6350. cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
  6351. cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
  6352. /** Detect free variable `global` from Node.js. */
  6353. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  6354. /** Detect free variable `self`. */
  6355. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  6356. /** Used as a reference to the global object. */
  6357. var root = freeGlobal || freeSelf || Function('return this')();
  6358. /** Detect free variable `exports`. */
  6359. var freeExports = true && exports && !exports.nodeType && exports;
  6360. /** Detect free variable `module`. */
  6361. var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
  6362. /** Detect the popular CommonJS extension `module.exports`. */
  6363. var moduleExports = freeModule && freeModule.exports === freeExports;
  6364. /**
  6365. * Adds the key-value `pair` to `map`.
  6366. *
  6367. * @private
  6368. * @param {Object} map The map to modify.
  6369. * @param {Array} pair The key-value pair to add.
  6370. * @returns {Object} Returns `map`.
  6371. */
  6372. function addMapEntry(map, pair) {
  6373. // Don't return `map.set` because it's not chainable in IE 11.
  6374. map.set(pair[0], pair[1]);
  6375. return map;
  6376. }
  6377. /**
  6378. * Adds `value` to `set`.
  6379. *
  6380. * @private
  6381. * @param {Object} set The set to modify.
  6382. * @param {*} value The value to add.
  6383. * @returns {Object} Returns `set`.
  6384. */
  6385. function addSetEntry(set, value) {
  6386. // Don't return `set.add` because it's not chainable in IE 11.
  6387. set.add(value);
  6388. return set;
  6389. }
  6390. /**
  6391. * A specialized version of `_.forEach` for arrays without support for
  6392. * iteratee shorthands.
  6393. *
  6394. * @private
  6395. * @param {Array} [array] The array to iterate over.
  6396. * @param {Function} iteratee The function invoked per iteration.
  6397. * @returns {Array} Returns `array`.
  6398. */
  6399. function arrayEach(array, iteratee) {
  6400. var index = -1,
  6401. length = array ? array.length : 0;
  6402. while (++index < length) {
  6403. if (iteratee(array[index], index, array) === false) {
  6404. break;
  6405. }
  6406. }
  6407. return array;
  6408. }
  6409. /**
  6410. * Appends the elements of `values` to `array`.
  6411. *
  6412. * @private
  6413. * @param {Array} array The array to modify.
  6414. * @param {Array} values The values to append.
  6415. * @returns {Array} Returns `array`.
  6416. */
  6417. function arrayPush(array, values) {
  6418. var index = -1,
  6419. length = values.length,
  6420. offset = array.length;
  6421. while (++index < length) {
  6422. array[offset + index] = values[index];
  6423. }
  6424. return array;
  6425. }
  6426. /**
  6427. * A specialized version of `_.reduce` for arrays without support for
  6428. * iteratee shorthands.
  6429. *
  6430. * @private
  6431. * @param {Array} [array] The array to iterate over.
  6432. * @param {Function} iteratee The function invoked per iteration.
  6433. * @param {*} [accumulator] The initial value.
  6434. * @param {boolean} [initAccum] Specify using the first element of `array` as
  6435. * the initial value.
  6436. * @returns {*} Returns the accumulated value.
  6437. */
  6438. function arrayReduce(array, iteratee, accumulator, initAccum) {
  6439. var index = -1,
  6440. length = array ? array.length : 0;
  6441. if (initAccum && length) {
  6442. accumulator = array[++index];
  6443. }
  6444. while (++index < length) {
  6445. accumulator = iteratee(accumulator, array[index], index, array);
  6446. }
  6447. return accumulator;
  6448. }
  6449. /**
  6450. * The base implementation of `_.times` without support for iteratee shorthands
  6451. * or max array length checks.
  6452. *
  6453. * @private
  6454. * @param {number} n The number of times to invoke `iteratee`.
  6455. * @param {Function} iteratee The function invoked per iteration.
  6456. * @returns {Array} Returns the array of results.
  6457. */
  6458. function baseTimes(n, iteratee) {
  6459. var index = -1,
  6460. result = Array(n);
  6461. while (++index < n) {
  6462. result[index] = iteratee(index);
  6463. }
  6464. return result;
  6465. }
  6466. /**
  6467. * Gets the value at `key` of `object`.
  6468. *
  6469. * @private
  6470. * @param {Object} [object] The object to query.
  6471. * @param {string} key The key of the property to get.
  6472. * @returns {*} Returns the property value.
  6473. */
  6474. function getValue(object, key) {
  6475. return object == null ? undefined : object[key];
  6476. }
  6477. /**
  6478. * Checks if `value` is a host object in IE < 9.
  6479. *
  6480. * @private
  6481. * @param {*} value The value to check.
  6482. * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
  6483. */
  6484. function isHostObject(value) {
  6485. // Many host objects are `Object` objects that can coerce to strings
  6486. // despite having improperly defined `toString` methods.
  6487. var result = false;
  6488. if (value != null && typeof value.toString != 'function') {
  6489. try {
  6490. result = !!(value + '');
  6491. } catch (e) {}
  6492. }
  6493. return result;
  6494. }
  6495. /**
  6496. * Converts `map` to its key-value pairs.
  6497. *
  6498. * @private
  6499. * @param {Object} map The map to convert.
  6500. * @returns {Array} Returns the key-value pairs.
  6501. */
  6502. function mapToArray(map) {
  6503. var index = -1,
  6504. result = Array(map.size);
  6505. map.forEach(function (value, key) {
  6506. result[++index] = [key, value];
  6507. });
  6508. return result;
  6509. }
  6510. /**
  6511. * Creates a unary function that invokes `func` with its argument transformed.
  6512. *
  6513. * @private
  6514. * @param {Function} func The function to wrap.
  6515. * @param {Function} transform The argument transform.
  6516. * @returns {Function} Returns the new function.
  6517. */
  6518. function overArg(func, transform) {
  6519. return function (arg) {
  6520. return func(transform(arg));
  6521. };
  6522. }
  6523. /**
  6524. * Converts `set` to an array of its values.
  6525. *
  6526. * @private
  6527. * @param {Object} set The set to convert.
  6528. * @returns {Array} Returns the values.
  6529. */
  6530. function setToArray(set) {
  6531. var index = -1,
  6532. result = Array(set.size);
  6533. set.forEach(function (value) {
  6534. result[++index] = value;
  6535. });
  6536. return result;
  6537. }
  6538. /** Used for built-in method references. */
  6539. var arrayProto = Array.prototype,
  6540. funcProto = Function.prototype,
  6541. objectProto = Object.prototype;
  6542. /** Used to detect overreaching core-js shims. */
  6543. var coreJsData = root['__core-js_shared__'];
  6544. /** Used to detect methods masquerading as native. */
  6545. var maskSrcKey = function () {
  6546. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  6547. return uid ? 'Symbol(src)_1.' + uid : '';
  6548. }();
  6549. /** Used to resolve the decompiled source of functions. */
  6550. var funcToString = funcProto.toString;
  6551. /** Used to check objects for own properties. */
  6552. var hasOwnProperty = objectProto.hasOwnProperty;
  6553. /**
  6554. * Used to resolve the
  6555. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  6556. * of values.
  6557. */
  6558. var objectToString = objectProto.toString;
  6559. /** Used to detect if a method is native. */
  6560. var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
  6561. /** Built-in value references. */
  6562. var Buffer = moduleExports ? root.Buffer : undefined,
  6563. Symbol = root.Symbol,
  6564. Uint8Array = root.Uint8Array,
  6565. getPrototype = overArg(Object.getPrototypeOf, Object),
  6566. objectCreate = Object.create,
  6567. propertyIsEnumerable = objectProto.propertyIsEnumerable,
  6568. splice = arrayProto.splice;
  6569. /* Built-in method references for those with the same name as other `lodash` methods. */
  6570. var nativeGetSymbols = Object.getOwnPropertySymbols,
  6571. nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
  6572. nativeKeys = overArg(Object.keys, Object);
  6573. /* Built-in method references that are verified to be native. */
  6574. var DataView = getNative(root, 'DataView'),
  6575. Map = getNative(root, 'Map'),
  6576. Promise = getNative(root, 'Promise'),
  6577. Set = getNative(root, 'Set'),
  6578. WeakMap = getNative(root, 'WeakMap'),
  6579. nativeCreate = getNative(Object, 'create');
  6580. /** Used to detect maps, sets, and weakmaps. */
  6581. var dataViewCtorString = toSource(DataView),
  6582. mapCtorString = toSource(Map),
  6583. promiseCtorString = toSource(Promise),
  6584. setCtorString = toSource(Set),
  6585. weakMapCtorString = toSource(WeakMap);
  6586. /** Used to convert symbols to primitives and strings. */
  6587. var symbolProto = Symbol ? Symbol.prototype : undefined,
  6588. symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
  6589. /**
  6590. * Creates a hash object.
  6591. *
  6592. * @private
  6593. * @constructor
  6594. * @param {Array} [entries] The key-value pairs to cache.
  6595. */
  6596. function Hash(entries) {
  6597. var index = -1,
  6598. length = entries ? entries.length : 0;
  6599. this.clear();
  6600. while (++index < length) {
  6601. var entry = entries[index];
  6602. this.set(entry[0], entry[1]);
  6603. }
  6604. }
  6605. /**
  6606. * Removes all key-value entries from the hash.
  6607. *
  6608. * @private
  6609. * @name clear
  6610. * @memberOf Hash
  6611. */
  6612. function hashClear() {
  6613. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  6614. }
  6615. /**
  6616. * Removes `key` and its value from the hash.
  6617. *
  6618. * @private
  6619. * @name delete
  6620. * @memberOf Hash
  6621. * @param {Object} hash The hash to modify.
  6622. * @param {string} key The key of the value to remove.
  6623. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  6624. */
  6625. function hashDelete(key) {
  6626. return this.has(key) && delete this.__data__[key];
  6627. }
  6628. /**
  6629. * Gets the hash value for `key`.
  6630. *
  6631. * @private
  6632. * @name get
  6633. * @memberOf Hash
  6634. * @param {string} key The key of the value to get.
  6635. * @returns {*} Returns the entry value.
  6636. */
  6637. function hashGet(key) {
  6638. var data = this.__data__;
  6639. if (nativeCreate) {
  6640. var result = data[key];
  6641. return result === HASH_UNDEFINED ? undefined : result;
  6642. }
  6643. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  6644. }
  6645. /**
  6646. * Checks if a hash value for `key` exists.
  6647. *
  6648. * @private
  6649. * @name has
  6650. * @memberOf Hash
  6651. * @param {string} key The key of the entry to check.
  6652. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  6653. */
  6654. function hashHas(key) {
  6655. var data = this.__data__;
  6656. return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
  6657. }
  6658. /**
  6659. * Sets the hash `key` to `value`.
  6660. *
  6661. * @private
  6662. * @name set
  6663. * @memberOf Hash
  6664. * @param {string} key The key of the value to set.
  6665. * @param {*} value The value to set.
  6666. * @returns {Object} Returns the hash instance.
  6667. */
  6668. function hashSet(key, value) {
  6669. var data = this.__data__;
  6670. data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value;
  6671. return this;
  6672. } // Add methods to `Hash`.
  6673. Hash.prototype.clear = hashClear;
  6674. Hash.prototype['delete'] = hashDelete;
  6675. Hash.prototype.get = hashGet;
  6676. Hash.prototype.has = hashHas;
  6677. Hash.prototype.set = hashSet;
  6678. /**
  6679. * Creates an list cache object.
  6680. *
  6681. * @private
  6682. * @constructor
  6683. * @param {Array} [entries] The key-value pairs to cache.
  6684. */
  6685. function ListCache(entries) {
  6686. var index = -1,
  6687. length = entries ? entries.length : 0;
  6688. this.clear();
  6689. while (++index < length) {
  6690. var entry = entries[index];
  6691. this.set(entry[0], entry[1]);
  6692. }
  6693. }
  6694. /**
  6695. * Removes all key-value entries from the list cache.
  6696. *
  6697. * @private
  6698. * @name clear
  6699. * @memberOf ListCache
  6700. */
  6701. function listCacheClear() {
  6702. this.__data__ = [];
  6703. }
  6704. /**
  6705. * Removes `key` and its value from the list cache.
  6706. *
  6707. * @private
  6708. * @name delete
  6709. * @memberOf ListCache
  6710. * @param {string} key The key of the value to remove.
  6711. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  6712. */
  6713. function listCacheDelete(key) {
  6714. var data = this.__data__,
  6715. index = assocIndexOf(data, key);
  6716. if (index < 0) {
  6717. return false;
  6718. }
  6719. var lastIndex = data.length - 1;
  6720. if (index == lastIndex) {
  6721. data.pop();
  6722. } else {
  6723. splice.call(data, index, 1);
  6724. }
  6725. return true;
  6726. }
  6727. /**
  6728. * Gets the list cache value for `key`.
  6729. *
  6730. * @private
  6731. * @name get
  6732. * @memberOf ListCache
  6733. * @param {string} key The key of the value to get.
  6734. * @returns {*} Returns the entry value.
  6735. */
  6736. function listCacheGet(key) {
  6737. var data = this.__data__,
  6738. index = assocIndexOf(data, key);
  6739. return index < 0 ? undefined : data[index][1];
  6740. }
  6741. /**
  6742. * Checks if a list cache value for `key` exists.
  6743. *
  6744. * @private
  6745. * @name has
  6746. * @memberOf ListCache
  6747. * @param {string} key The key of the entry to check.
  6748. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  6749. */
  6750. function listCacheHas(key) {
  6751. return assocIndexOf(this.__data__, key) > -1;
  6752. }
  6753. /**
  6754. * Sets the list cache `key` to `value`.
  6755. *
  6756. * @private
  6757. * @name set
  6758. * @memberOf ListCache
  6759. * @param {string} key The key of the value to set.
  6760. * @param {*} value The value to set.
  6761. * @returns {Object} Returns the list cache instance.
  6762. */
  6763. function listCacheSet(key, value) {
  6764. var data = this.__data__,
  6765. index = assocIndexOf(data, key);
  6766. if (index < 0) {
  6767. data.push([key, value]);
  6768. } else {
  6769. data[index][1] = value;
  6770. }
  6771. return this;
  6772. } // Add methods to `ListCache`.
  6773. ListCache.prototype.clear = listCacheClear;
  6774. ListCache.prototype['delete'] = listCacheDelete;
  6775. ListCache.prototype.get = listCacheGet;
  6776. ListCache.prototype.has = listCacheHas;
  6777. ListCache.prototype.set = listCacheSet;
  6778. /**
  6779. * Creates a map cache object to store key-value pairs.
  6780. *
  6781. * @private
  6782. * @constructor
  6783. * @param {Array} [entries] The key-value pairs to cache.
  6784. */
  6785. function MapCache(entries) {
  6786. var index = -1,
  6787. length = entries ? entries.length : 0;
  6788. this.clear();
  6789. while (++index < length) {
  6790. var entry = entries[index];
  6791. this.set(entry[0], entry[1]);
  6792. }
  6793. }
  6794. /**
  6795. * Removes all key-value entries from the map.
  6796. *
  6797. * @private
  6798. * @name clear
  6799. * @memberOf MapCache
  6800. */
  6801. function mapCacheClear() {
  6802. this.__data__ = {
  6803. 'hash': new Hash(),
  6804. 'map': new (Map || ListCache)(),
  6805. 'string': new Hash()
  6806. };
  6807. }
  6808. /**
  6809. * Removes `key` and its value from the map.
  6810. *
  6811. * @private
  6812. * @name delete
  6813. * @memberOf MapCache
  6814. * @param {string} key The key of the value to remove.
  6815. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  6816. */
  6817. function mapCacheDelete(key) {
  6818. return getMapData(this, key)['delete'](key);
  6819. }
  6820. /**
  6821. * Gets the map value for `key`.
  6822. *
  6823. * @private
  6824. * @name get
  6825. * @memberOf MapCache
  6826. * @param {string} key The key of the value to get.
  6827. * @returns {*} Returns the entry value.
  6828. */
  6829. function mapCacheGet(key) {
  6830. return getMapData(this, key).get(key);
  6831. }
  6832. /**
  6833. * Checks if a map value for `key` exists.
  6834. *
  6835. * @private
  6836. * @name has
  6837. * @memberOf MapCache
  6838. * @param {string} key The key of the entry to check.
  6839. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  6840. */
  6841. function mapCacheHas(key) {
  6842. return getMapData(this, key).has(key);
  6843. }
  6844. /**
  6845. * Sets the map `key` to `value`.
  6846. *
  6847. * @private
  6848. * @name set
  6849. * @memberOf MapCache
  6850. * @param {string} key The key of the value to set.
  6851. * @param {*} value The value to set.
  6852. * @returns {Object} Returns the map cache instance.
  6853. */
  6854. function mapCacheSet(key, value) {
  6855. getMapData(this, key).set(key, value);
  6856. return this;
  6857. } // Add methods to `MapCache`.
  6858. MapCache.prototype.clear = mapCacheClear;
  6859. MapCache.prototype['delete'] = mapCacheDelete;
  6860. MapCache.prototype.get = mapCacheGet;
  6861. MapCache.prototype.has = mapCacheHas;
  6862. MapCache.prototype.set = mapCacheSet;
  6863. /**
  6864. * Creates a stack cache object to store key-value pairs.
  6865. *
  6866. * @private
  6867. * @constructor
  6868. * @param {Array} [entries] The key-value pairs to cache.
  6869. */
  6870. function Stack(entries) {
  6871. this.__data__ = new ListCache(entries);
  6872. }
  6873. /**
  6874. * Removes all key-value entries from the stack.
  6875. *
  6876. * @private
  6877. * @name clear
  6878. * @memberOf Stack
  6879. */
  6880. function stackClear() {
  6881. this.__data__ = new ListCache();
  6882. }
  6883. /**
  6884. * Removes `key` and its value from the stack.
  6885. *
  6886. * @private
  6887. * @name delete
  6888. * @memberOf Stack
  6889. * @param {string} key The key of the value to remove.
  6890. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  6891. */
  6892. function stackDelete(key) {
  6893. return this.__data__['delete'](key);
  6894. }
  6895. /**
  6896. * Gets the stack value for `key`.
  6897. *
  6898. * @private
  6899. * @name get
  6900. * @memberOf Stack
  6901. * @param {string} key The key of the value to get.
  6902. * @returns {*} Returns the entry value.
  6903. */
  6904. function stackGet(key) {
  6905. return this.__data__.get(key);
  6906. }
  6907. /**
  6908. * Checks if a stack value for `key` exists.
  6909. *
  6910. * @private
  6911. * @name has
  6912. * @memberOf Stack
  6913. * @param {string} key The key of the entry to check.
  6914. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  6915. */
  6916. function stackHas(key) {
  6917. return this.__data__.has(key);
  6918. }
  6919. /**
  6920. * Sets the stack `key` to `value`.
  6921. *
  6922. * @private
  6923. * @name set
  6924. * @memberOf Stack
  6925. * @param {string} key The key of the value to set.
  6926. * @param {*} value The value to set.
  6927. * @returns {Object} Returns the stack cache instance.
  6928. */
  6929. function stackSet(key, value) {
  6930. var cache = this.__data__;
  6931. if (cache instanceof ListCache) {
  6932. var pairs = cache.__data__;
  6933. if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) {
  6934. pairs.push([key, value]);
  6935. return this;
  6936. }
  6937. cache = this.__data__ = new MapCache(pairs);
  6938. }
  6939. cache.set(key, value);
  6940. return this;
  6941. } // Add methods to `Stack`.
  6942. Stack.prototype.clear = stackClear;
  6943. Stack.prototype['delete'] = stackDelete;
  6944. Stack.prototype.get = stackGet;
  6945. Stack.prototype.has = stackHas;
  6946. Stack.prototype.set = stackSet;
  6947. /**
  6948. * Creates an array of the enumerable property names of the array-like `value`.
  6949. *
  6950. * @private
  6951. * @param {*} value The value to query.
  6952. * @param {boolean} inherited Specify returning inherited property names.
  6953. * @returns {Array} Returns the array of property names.
  6954. */
  6955. function arrayLikeKeys(value, inherited) {
  6956. // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
  6957. // Safari 9 makes `arguments.length` enumerable in strict mode.
  6958. var result = isArray(value) || isArguments(value) ? baseTimes(value.length, String) : [];
  6959. var length = result.length,
  6960. skipIndexes = !!length;
  6961. for (var key in value) {
  6962. if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
  6963. result.push(key);
  6964. }
  6965. }
  6966. return result;
  6967. }
  6968. /**
  6969. * Assigns `value` to `key` of `object` if the existing value is not equivalent
  6970. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  6971. * for equality comparisons.
  6972. *
  6973. * @private
  6974. * @param {Object} object The object to modify.
  6975. * @param {string} key The key of the property to assign.
  6976. * @param {*} value The value to assign.
  6977. */
  6978. function assignValue(object, key, value) {
  6979. var objValue = object[key];
  6980. if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === undefined && !(key in object)) {
  6981. object[key] = value;
  6982. }
  6983. }
  6984. /**
  6985. * Gets the index at which the `key` is found in `array` of key-value pairs.
  6986. *
  6987. * @private
  6988. * @param {Array} array The array to inspect.
  6989. * @param {*} key The key to search for.
  6990. * @returns {number} Returns the index of the matched value, else `-1`.
  6991. */
  6992. function assocIndexOf(array, key) {
  6993. var length = array.length;
  6994. while (length--) {
  6995. if (eq(array[length][0], key)) {
  6996. return length;
  6997. }
  6998. }
  6999. return -1;
  7000. }
  7001. /**
  7002. * The base implementation of `_.assign` without support for multiple sources
  7003. * or `customizer` functions.
  7004. *
  7005. * @private
  7006. * @param {Object} object The destination object.
  7007. * @param {Object} source The source object.
  7008. * @returns {Object} Returns `object`.
  7009. */
  7010. function baseAssign(object, source) {
  7011. return object && copyObject(source, keys(source), object);
  7012. }
  7013. /**
  7014. * The base implementation of `_.clone` and `_.cloneDeep` which tracks
  7015. * traversed objects.
  7016. *
  7017. * @private
  7018. * @param {*} value The value to clone.
  7019. * @param {boolean} [isDeep] Specify a deep clone.
  7020. * @param {boolean} [isFull] Specify a clone including symbols.
  7021. * @param {Function} [customizer] The function to customize cloning.
  7022. * @param {string} [key] The key of `value`.
  7023. * @param {Object} [object] The parent object of `value`.
  7024. * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
  7025. * @returns {*} Returns the cloned value.
  7026. */
  7027. function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
  7028. var result;
  7029. if (customizer) {
  7030. result = object ? customizer(value, key, object, stack) : customizer(value);
  7031. }
  7032. if (result !== undefined) {
  7033. return result;
  7034. }
  7035. if (!isObject(value)) {
  7036. return value;
  7037. }
  7038. var isArr = isArray(value);
  7039. if (isArr) {
  7040. result = initCloneArray(value);
  7041. if (!isDeep) {
  7042. return copyArray(value, result);
  7043. }
  7044. } else {
  7045. var tag = getTag(value),
  7046. isFunc = tag == funcTag || tag == genTag;
  7047. if (isBuffer(value)) {
  7048. return cloneBuffer(value, isDeep);
  7049. }
  7050. if (tag == objectTag || tag == argsTag || isFunc && !object) {
  7051. if (isHostObject(value)) {
  7052. return object ? value : {};
  7053. }
  7054. result = initCloneObject(isFunc ? {} : value);
  7055. if (!isDeep) {
  7056. return copySymbols(value, baseAssign(result, value));
  7057. }
  7058. } else {
  7059. if (!cloneableTags[tag]) {
  7060. return object ? value : {};
  7061. }
  7062. result = initCloneByTag(value, tag, baseClone, isDeep);
  7063. }
  7064. } // Check for circular references and return its corresponding clone.
  7065. stack || (stack = new Stack());
  7066. var stacked = stack.get(value);
  7067. if (stacked) {
  7068. return stacked;
  7069. }
  7070. stack.set(value, result);
  7071. if (!isArr) {
  7072. var props = isFull ? getAllKeys(value) : keys(value);
  7073. }
  7074. arrayEach(props || value, function (subValue, key) {
  7075. if (props) {
  7076. key = subValue;
  7077. subValue = value[key];
  7078. } // Recursively populate clone (susceptible to call stack limits).
  7079. assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));
  7080. });
  7081. return result;
  7082. }
  7083. /**
  7084. * The base implementation of `_.create` without support for assigning
  7085. * properties to the created object.
  7086. *
  7087. * @private
  7088. * @param {Object} prototype The object to inherit from.
  7089. * @returns {Object} Returns the new object.
  7090. */
  7091. function baseCreate(proto) {
  7092. return isObject(proto) ? objectCreate(proto) : {};
  7093. }
  7094. /**
  7095. * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
  7096. * `keysFunc` and `symbolsFunc` to get the enumerable property names and
  7097. * symbols of `object`.
  7098. *
  7099. * @private
  7100. * @param {Object} object The object to query.
  7101. * @param {Function} keysFunc The function to get the keys of `object`.
  7102. * @param {Function} symbolsFunc The function to get the symbols of `object`.
  7103. * @returns {Array} Returns the array of property names and symbols.
  7104. */
  7105. function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  7106. var result = keysFunc(object);
  7107. return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
  7108. }
  7109. /**
  7110. * The base implementation of `getTag`.
  7111. *
  7112. * @private
  7113. * @param {*} value The value to query.
  7114. * @returns {string} Returns the `toStringTag`.
  7115. */
  7116. function baseGetTag(value) {
  7117. return objectToString.call(value);
  7118. }
  7119. /**
  7120. * The base implementation of `_.isNative` without bad shim checks.
  7121. *
  7122. * @private
  7123. * @param {*} value The value to check.
  7124. * @returns {boolean} Returns `true` if `value` is a native function,
  7125. * else `false`.
  7126. */
  7127. function baseIsNative(value) {
  7128. if (!isObject(value) || isMasked(value)) {
  7129. return false;
  7130. }
  7131. var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
  7132. return pattern.test(toSource(value));
  7133. }
  7134. /**
  7135. * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
  7136. *
  7137. * @private
  7138. * @param {Object} object The object to query.
  7139. * @returns {Array} Returns the array of property names.
  7140. */
  7141. function baseKeys(object) {
  7142. if (!isPrototype(object)) {
  7143. return nativeKeys(object);
  7144. }
  7145. var result = [];
  7146. for (var key in Object(object)) {
  7147. if (hasOwnProperty.call(object, key) && key != 'constructor') {
  7148. result.push(key);
  7149. }
  7150. }
  7151. return result;
  7152. }
  7153. /**
  7154. * Creates a clone of `buffer`.
  7155. *
  7156. * @private
  7157. * @param {Buffer} buffer The buffer to clone.
  7158. * @param {boolean} [isDeep] Specify a deep clone.
  7159. * @returns {Buffer} Returns the cloned buffer.
  7160. */
  7161. function cloneBuffer(buffer, isDeep) {
  7162. if (isDeep) {
  7163. return buffer.slice();
  7164. }
  7165. var result = new buffer.constructor(buffer.length);
  7166. buffer.copy(result);
  7167. return result;
  7168. }
  7169. /**
  7170. * Creates a clone of `arrayBuffer`.
  7171. *
  7172. * @private
  7173. * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
  7174. * @returns {ArrayBuffer} Returns the cloned array buffer.
  7175. */
  7176. function cloneArrayBuffer(arrayBuffer) {
  7177. var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
  7178. new Uint8Array(result).set(new Uint8Array(arrayBuffer));
  7179. return result;
  7180. }
  7181. /**
  7182. * Creates a clone of `dataView`.
  7183. *
  7184. * @private
  7185. * @param {Object} dataView The data view to clone.
  7186. * @param {boolean} [isDeep] Specify a deep clone.
  7187. * @returns {Object} Returns the cloned data view.
  7188. */
  7189. function cloneDataView(dataView, isDeep) {
  7190. var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
  7191. return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
  7192. }
  7193. /**
  7194. * Creates a clone of `map`.
  7195. *
  7196. * @private
  7197. * @param {Object} map The map to clone.
  7198. * @param {Function} cloneFunc The function to clone values.
  7199. * @param {boolean} [isDeep] Specify a deep clone.
  7200. * @returns {Object} Returns the cloned map.
  7201. */
  7202. function cloneMap(map, isDeep, cloneFunc) {
  7203. var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);
  7204. return arrayReduce(array, addMapEntry, new map.constructor());
  7205. }
  7206. /**
  7207. * Creates a clone of `regexp`.
  7208. *
  7209. * @private
  7210. * @param {Object} regexp The regexp to clone.
  7211. * @returns {Object} Returns the cloned regexp.
  7212. */
  7213. function cloneRegExp(regexp) {
  7214. var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
  7215. result.lastIndex = regexp.lastIndex;
  7216. return result;
  7217. }
  7218. /**
  7219. * Creates a clone of `set`.
  7220. *
  7221. * @private
  7222. * @param {Object} set The set to clone.
  7223. * @param {Function} cloneFunc The function to clone values.
  7224. * @param {boolean} [isDeep] Specify a deep clone.
  7225. * @returns {Object} Returns the cloned set.
  7226. */
  7227. function cloneSet(set, isDeep, cloneFunc) {
  7228. var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);
  7229. return arrayReduce(array, addSetEntry, new set.constructor());
  7230. }
  7231. /**
  7232. * Creates a clone of the `symbol` object.
  7233. *
  7234. * @private
  7235. * @param {Object} symbol The symbol object to clone.
  7236. * @returns {Object} Returns the cloned symbol object.
  7237. */
  7238. function cloneSymbol(symbol) {
  7239. return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
  7240. }
  7241. /**
  7242. * Creates a clone of `typedArray`.
  7243. *
  7244. * @private
  7245. * @param {Object} typedArray The typed array to clone.
  7246. * @param {boolean} [isDeep] Specify a deep clone.
  7247. * @returns {Object} Returns the cloned typed array.
  7248. */
  7249. function cloneTypedArray(typedArray, isDeep) {
  7250. var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  7251. return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
  7252. }
  7253. /**
  7254. * Copies the values of `source` to `array`.
  7255. *
  7256. * @private
  7257. * @param {Array} source The array to copy values from.
  7258. * @param {Array} [array=[]] The array to copy values to.
  7259. * @returns {Array} Returns `array`.
  7260. */
  7261. function copyArray(source, array) {
  7262. var index = -1,
  7263. length = source.length;
  7264. array || (array = Array(length));
  7265. while (++index < length) {
  7266. array[index] = source[index];
  7267. }
  7268. return array;
  7269. }
  7270. /**
  7271. * Copies properties of `source` to `object`.
  7272. *
  7273. * @private
  7274. * @param {Object} source The object to copy properties from.
  7275. * @param {Array} props The property identifiers to copy.
  7276. * @param {Object} [object={}] The object to copy properties to.
  7277. * @param {Function} [customizer] The function to customize copied values.
  7278. * @returns {Object} Returns `object`.
  7279. */
  7280. function copyObject(source, props, object, customizer) {
  7281. object || (object = {});
  7282. var index = -1,
  7283. length = props.length;
  7284. while (++index < length) {
  7285. var key = props[index];
  7286. var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined;
  7287. assignValue(object, key, newValue === undefined ? source[key] : newValue);
  7288. }
  7289. return object;
  7290. }
  7291. /**
  7292. * Copies own symbol properties of `source` to `object`.
  7293. *
  7294. * @private
  7295. * @param {Object} source The object to copy symbols from.
  7296. * @param {Object} [object={}] The object to copy symbols to.
  7297. * @returns {Object} Returns `object`.
  7298. */
  7299. function copySymbols(source, object) {
  7300. return copyObject(source, getSymbols(source), object);
  7301. }
  7302. /**
  7303. * Creates an array of own enumerable property names and symbols of `object`.
  7304. *
  7305. * @private
  7306. * @param {Object} object The object to query.
  7307. * @returns {Array} Returns the array of property names and symbols.
  7308. */
  7309. function getAllKeys(object) {
  7310. return baseGetAllKeys(object, keys, getSymbols);
  7311. }
  7312. /**
  7313. * Gets the data for `map`.
  7314. *
  7315. * @private
  7316. * @param {Object} map The map to query.
  7317. * @param {string} key The reference key.
  7318. * @returns {*} Returns the map data.
  7319. */
  7320. function getMapData(map, key) {
  7321. var data = map.__data__;
  7322. return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map;
  7323. }
  7324. /**
  7325. * Gets the native function at `key` of `object`.
  7326. *
  7327. * @private
  7328. * @param {Object} object The object to query.
  7329. * @param {string} key The key of the method to get.
  7330. * @returns {*} Returns the function if it's native, else `undefined`.
  7331. */
  7332. function getNative(object, key) {
  7333. var value = getValue(object, key);
  7334. return baseIsNative(value) ? value : undefined;
  7335. }
  7336. /**
  7337. * Creates an array of the own enumerable symbol properties of `object`.
  7338. *
  7339. * @private
  7340. * @param {Object} object The object to query.
  7341. * @returns {Array} Returns the array of symbols.
  7342. */
  7343. var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
  7344. /**
  7345. * Gets the `toStringTag` of `value`.
  7346. *
  7347. * @private
  7348. * @param {*} value The value to query.
  7349. * @returns {string} Returns the `toStringTag`.
  7350. */
  7351. var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11,
  7352. // for data views in Edge < 14, and promises in Node.js.
  7353. if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
  7354. getTag = function getTag(value) {
  7355. var result = objectToString.call(value),
  7356. Ctor = result == objectTag ? value.constructor : undefined,
  7357. ctorString = Ctor ? toSource(Ctor) : undefined;
  7358. if (ctorString) {
  7359. switch (ctorString) {
  7360. case dataViewCtorString:
  7361. return dataViewTag;
  7362. case mapCtorString:
  7363. return mapTag;
  7364. case promiseCtorString:
  7365. return promiseTag;
  7366. case setCtorString:
  7367. return setTag;
  7368. case weakMapCtorString:
  7369. return weakMapTag;
  7370. }
  7371. }
  7372. return result;
  7373. };
  7374. }
  7375. /**
  7376. * Initializes an array clone.
  7377. *
  7378. * @private
  7379. * @param {Array} array The array to clone.
  7380. * @returns {Array} Returns the initialized clone.
  7381. */
  7382. function initCloneArray(array) {
  7383. var length = array.length,
  7384. result = array.constructor(length); // Add properties assigned by `RegExp#exec`.
  7385. if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
  7386. result.index = array.index;
  7387. result.input = array.input;
  7388. }
  7389. return result;
  7390. }
  7391. /**
  7392. * Initializes an object clone.
  7393. *
  7394. * @private
  7395. * @param {Object} object The object to clone.
  7396. * @returns {Object} Returns the initialized clone.
  7397. */
  7398. function initCloneObject(object) {
  7399. return typeof object.constructor == 'function' && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
  7400. }
  7401. /**
  7402. * Initializes an object clone based on its `toStringTag`.
  7403. *
  7404. * **Note:** This function only supports cloning values with tags of
  7405. * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
  7406. *
  7407. * @private
  7408. * @param {Object} object The object to clone.
  7409. * @param {string} tag The `toStringTag` of the object to clone.
  7410. * @param {Function} cloneFunc The function to clone values.
  7411. * @param {boolean} [isDeep] Specify a deep clone.
  7412. * @returns {Object} Returns the initialized clone.
  7413. */
  7414. function initCloneByTag(object, tag, cloneFunc, isDeep) {
  7415. var Ctor = object.constructor;
  7416. switch (tag) {
  7417. case arrayBufferTag:
  7418. return cloneArrayBuffer(object);
  7419. case boolTag:
  7420. case dateTag:
  7421. return new Ctor(+object);
  7422. case dataViewTag:
  7423. return cloneDataView(object, isDeep);
  7424. case float32Tag:
  7425. case float64Tag:
  7426. case int8Tag:
  7427. case int16Tag:
  7428. case int32Tag:
  7429. case uint8Tag:
  7430. case uint8ClampedTag:
  7431. case uint16Tag:
  7432. case uint32Tag:
  7433. return cloneTypedArray(object, isDeep);
  7434. case mapTag:
  7435. return cloneMap(object, isDeep, cloneFunc);
  7436. case numberTag:
  7437. case stringTag:
  7438. return new Ctor(object);
  7439. case regexpTag:
  7440. return cloneRegExp(object);
  7441. case setTag:
  7442. return cloneSet(object, isDeep, cloneFunc);
  7443. case symbolTag:
  7444. return cloneSymbol(object);
  7445. }
  7446. }
  7447. /**
  7448. * Checks if `value` is a valid array-like index.
  7449. *
  7450. * @private
  7451. * @param {*} value The value to check.
  7452. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  7453. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  7454. */
  7455. function isIndex(value, length) {
  7456. length = length == null ? MAX_SAFE_INTEGER : length;
  7457. return !!length && (typeof value == 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
  7458. }
  7459. /**
  7460. * Checks if `value` is suitable for use as unique object key.
  7461. *
  7462. * @private
  7463. * @param {*} value The value to check.
  7464. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  7465. */
  7466. function isKeyable(value) {
  7467. var type = typeof value;
  7468. return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null;
  7469. }
  7470. /**
  7471. * Checks if `func` has its source masked.
  7472. *
  7473. * @private
  7474. * @param {Function} func The function to check.
  7475. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  7476. */
  7477. function isMasked(func) {
  7478. return !!maskSrcKey && maskSrcKey in func;
  7479. }
  7480. /**
  7481. * Checks if `value` is likely a prototype object.
  7482. *
  7483. * @private
  7484. * @param {*} value The value to check.
  7485. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
  7486. */
  7487. function isPrototype(value) {
  7488. var Ctor = value && value.constructor,
  7489. proto = typeof Ctor == 'function' && Ctor.prototype || objectProto;
  7490. return value === proto;
  7491. }
  7492. /**
  7493. * Converts `func` to its source code.
  7494. *
  7495. * @private
  7496. * @param {Function} func The function to process.
  7497. * @returns {string} Returns the source code.
  7498. */
  7499. function toSource(func) {
  7500. if (func != null) {
  7501. try {
  7502. return funcToString.call(func);
  7503. } catch (e) {}
  7504. try {
  7505. return func + '';
  7506. } catch (e) {}
  7507. }
  7508. return '';
  7509. }
  7510. /**
  7511. * This method is like `_.clone` except that it recursively clones `value`.
  7512. *
  7513. * @static
  7514. * @memberOf _
  7515. * @since 1.0.0
  7516. * @category Lang
  7517. * @param {*} value The value to recursively clone.
  7518. * @returns {*} Returns the deep cloned value.
  7519. * @see _.clone
  7520. * @example
  7521. *
  7522. * var objects = [{ 'a': 1 }, { 'b': 2 }];
  7523. *
  7524. * var deep = _.cloneDeep(objects);
  7525. * console.log(deep[0] === objects[0]);
  7526. * // => false
  7527. */
  7528. function cloneDeep(value) {
  7529. return baseClone(value, true, true);
  7530. }
  7531. /**
  7532. * Performs a
  7533. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  7534. * comparison between two values to determine if they are equivalent.
  7535. *
  7536. * @static
  7537. * @memberOf _
  7538. * @since 4.0.0
  7539. * @category Lang
  7540. * @param {*} value The value to compare.
  7541. * @param {*} other The other value to compare.
  7542. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  7543. * @example
  7544. *
  7545. * var object = { 'a': 1 };
  7546. * var other = { 'a': 1 };
  7547. *
  7548. * _.eq(object, object);
  7549. * // => true
  7550. *
  7551. * _.eq(object, other);
  7552. * // => false
  7553. *
  7554. * _.eq('a', 'a');
  7555. * // => true
  7556. *
  7557. * _.eq('a', Object('a'));
  7558. * // => false
  7559. *
  7560. * _.eq(NaN, NaN);
  7561. * // => true
  7562. */
  7563. function eq(value, other) {
  7564. return value === other || value !== value && other !== other;
  7565. }
  7566. /**
  7567. * Checks if `value` is likely an `arguments` object.
  7568. *
  7569. * @static
  7570. * @memberOf _
  7571. * @since 0.1.0
  7572. * @category Lang
  7573. * @param {*} value The value to check.
  7574. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  7575. * else `false`.
  7576. * @example
  7577. *
  7578. * _.isArguments(function() { return arguments; }());
  7579. * // => true
  7580. *
  7581. * _.isArguments([1, 2, 3]);
  7582. * // => false
  7583. */
  7584. function isArguments(value) {
  7585. // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
  7586. return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
  7587. }
  7588. /**
  7589. * Checks if `value` is classified as an `Array` object.
  7590. *
  7591. * @static
  7592. * @memberOf _
  7593. * @since 0.1.0
  7594. * @category Lang
  7595. * @param {*} value The value to check.
  7596. * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  7597. * @example
  7598. *
  7599. * _.isArray([1, 2, 3]);
  7600. * // => true
  7601. *
  7602. * _.isArray(document.body.children);
  7603. * // => false
  7604. *
  7605. * _.isArray('abc');
  7606. * // => false
  7607. *
  7608. * _.isArray(_.noop);
  7609. * // => false
  7610. */
  7611. var isArray = Array.isArray;
  7612. /**
  7613. * Checks if `value` is array-like. A value is considered array-like if it's
  7614. * not a function and has a `value.length` that's an integer greater than or
  7615. * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
  7616. *
  7617. * @static
  7618. * @memberOf _
  7619. * @since 4.0.0
  7620. * @category Lang
  7621. * @param {*} value The value to check.
  7622. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  7623. * @example
  7624. *
  7625. * _.isArrayLike([1, 2, 3]);
  7626. * // => true
  7627. *
  7628. * _.isArrayLike(document.body.children);
  7629. * // => true
  7630. *
  7631. * _.isArrayLike('abc');
  7632. * // => true
  7633. *
  7634. * _.isArrayLike(_.noop);
  7635. * // => false
  7636. */
  7637. function isArrayLike(value) {
  7638. return value != null && isLength(value.length) && !isFunction(value);
  7639. }
  7640. /**
  7641. * This method is like `_.isArrayLike` except that it also checks if `value`
  7642. * is an object.
  7643. *
  7644. * @static
  7645. * @memberOf _
  7646. * @since 4.0.0
  7647. * @category Lang
  7648. * @param {*} value The value to check.
  7649. * @returns {boolean} Returns `true` if `value` is an array-like object,
  7650. * else `false`.
  7651. * @example
  7652. *
  7653. * _.isArrayLikeObject([1, 2, 3]);
  7654. * // => true
  7655. *
  7656. * _.isArrayLikeObject(document.body.children);
  7657. * // => true
  7658. *
  7659. * _.isArrayLikeObject('abc');
  7660. * // => false
  7661. *
  7662. * _.isArrayLikeObject(_.noop);
  7663. * // => false
  7664. */
  7665. function isArrayLikeObject(value) {
  7666. return isObjectLike(value) && isArrayLike(value);
  7667. }
  7668. /**
  7669. * Checks if `value` is a buffer.
  7670. *
  7671. * @static
  7672. * @memberOf _
  7673. * @since 4.3.0
  7674. * @category Lang
  7675. * @param {*} value The value to check.
  7676. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
  7677. * @example
  7678. *
  7679. * _.isBuffer(new Buffer(2));
  7680. * // => true
  7681. *
  7682. * _.isBuffer(new Uint8Array(2));
  7683. * // => false
  7684. */
  7685. var isBuffer = nativeIsBuffer || stubFalse;
  7686. /**
  7687. * Checks if `value` is classified as a `Function` object.
  7688. *
  7689. * @static
  7690. * @memberOf _
  7691. * @since 0.1.0
  7692. * @category Lang
  7693. * @param {*} value The value to check.
  7694. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  7695. * @example
  7696. *
  7697. * _.isFunction(_);
  7698. * // => true
  7699. *
  7700. * _.isFunction(/abc/);
  7701. * // => false
  7702. */
  7703. function isFunction(value) {
  7704. // The use of `Object#toString` avoids issues with the `typeof` operator
  7705. // in Safari 8-9 which returns 'object' for typed array and other constructors.
  7706. var tag = isObject(value) ? objectToString.call(value) : '';
  7707. return tag == funcTag || tag == genTag;
  7708. }
  7709. /**
  7710. * Checks if `value` is a valid array-like length.
  7711. *
  7712. * **Note:** This method is loosely based on
  7713. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  7714. *
  7715. * @static
  7716. * @memberOf _
  7717. * @since 4.0.0
  7718. * @category Lang
  7719. * @param {*} value The value to check.
  7720. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  7721. * @example
  7722. *
  7723. * _.isLength(3);
  7724. * // => true
  7725. *
  7726. * _.isLength(Number.MIN_VALUE);
  7727. * // => false
  7728. *
  7729. * _.isLength(Infinity);
  7730. * // => false
  7731. *
  7732. * _.isLength('3');
  7733. * // => false
  7734. */
  7735. function isLength(value) {
  7736. return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  7737. }
  7738. /**
  7739. * Checks if `value` is the
  7740. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  7741. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  7742. *
  7743. * @static
  7744. * @memberOf _
  7745. * @since 0.1.0
  7746. * @category Lang
  7747. * @param {*} value The value to check.
  7748. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  7749. * @example
  7750. *
  7751. * _.isObject({});
  7752. * // => true
  7753. *
  7754. * _.isObject([1, 2, 3]);
  7755. * // => true
  7756. *
  7757. * _.isObject(_.noop);
  7758. * // => true
  7759. *
  7760. * _.isObject(null);
  7761. * // => false
  7762. */
  7763. function isObject(value) {
  7764. var type = typeof value;
  7765. return !!value && (type == 'object' || type == 'function');
  7766. }
  7767. /**
  7768. * Checks if `value` is object-like. A value is object-like if it's not `null`
  7769. * and has a `typeof` result of "object".
  7770. *
  7771. * @static
  7772. * @memberOf _
  7773. * @since 4.0.0
  7774. * @category Lang
  7775. * @param {*} value The value to check.
  7776. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  7777. * @example
  7778. *
  7779. * _.isObjectLike({});
  7780. * // => true
  7781. *
  7782. * _.isObjectLike([1, 2, 3]);
  7783. * // => true
  7784. *
  7785. * _.isObjectLike(_.noop);
  7786. * // => false
  7787. *
  7788. * _.isObjectLike(null);
  7789. * // => false
  7790. */
  7791. function isObjectLike(value) {
  7792. return !!value && typeof value == 'object';
  7793. }
  7794. /**
  7795. * Creates an array of the own enumerable property names of `object`.
  7796. *
  7797. * **Note:** Non-object values are coerced to objects. See the
  7798. * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  7799. * for more details.
  7800. *
  7801. * @static
  7802. * @since 0.1.0
  7803. * @memberOf _
  7804. * @category Object
  7805. * @param {Object} object The object to query.
  7806. * @returns {Array} Returns the array of property names.
  7807. * @example
  7808. *
  7809. * function Foo() {
  7810. * this.a = 1;
  7811. * this.b = 2;
  7812. * }
  7813. *
  7814. * Foo.prototype.c = 3;
  7815. *
  7816. * _.keys(new Foo);
  7817. * // => ['a', 'b'] (iteration order is not guaranteed)
  7818. *
  7819. * _.keys('hi');
  7820. * // => ['0', '1']
  7821. */
  7822. function keys(object) {
  7823. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  7824. }
  7825. /**
  7826. * This method returns a new empty array.
  7827. *
  7828. * @static
  7829. * @memberOf _
  7830. * @since 4.13.0
  7831. * @category Util
  7832. * @returns {Array} Returns the new empty array.
  7833. * @example
  7834. *
  7835. * var arrays = _.times(2, _.stubArray);
  7836. *
  7837. * console.log(arrays);
  7838. * // => [[], []]
  7839. *
  7840. * console.log(arrays[0] === arrays[1]);
  7841. * // => false
  7842. */
  7843. function stubArray() {
  7844. return [];
  7845. }
  7846. /**
  7847. * This method returns `false`.
  7848. *
  7849. * @static
  7850. * @memberOf _
  7851. * @since 4.13.0
  7852. * @category Util
  7853. * @returns {boolean} Returns `false`.
  7854. * @example
  7855. *
  7856. * _.times(2, _.stubFalse);
  7857. * // => [false, false]
  7858. */
  7859. function stubFalse() {
  7860. return false;
  7861. }
  7862. module.exports = cloneDeep;
  7863. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(5), __webpack_require__(32)(module)))
  7864. /***/ }),
  7865. /* 24 */
  7866. /***/ (function(module, exports, __webpack_require__) {
  7867. "use strict";
  7868. var _interopRequireDefault = __webpack_require__(77);
  7869. exports.__esModule = true;
  7870. exports.default = void 0;
  7871. var _getDisplayName = _interopRequireDefault(__webpack_require__(78));
  7872. var wrapDisplayName = function wrapDisplayName(BaseComponent, hocName) {
  7873. return hocName + "(" + (0, _getDisplayName.default)(BaseComponent) + ")";
  7874. };
  7875. var _default = wrapDisplayName;
  7876. exports.default = _default;
  7877. /***/ }),
  7878. /* 25 */
  7879. /***/ (function(module, exports, __webpack_require__) {
  7880. "use strict";
  7881. var reactIs = __webpack_require__(79);
  7882. /**
  7883. * Copyright 2015, Yahoo! Inc.
  7884. * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
  7885. */
  7886. var REACT_STATICS = {
  7887. childContextTypes: true,
  7888. contextType: true,
  7889. contextTypes: true,
  7890. defaultProps: true,
  7891. displayName: true,
  7892. getDefaultProps: true,
  7893. getDerivedStateFromError: true,
  7894. getDerivedStateFromProps: true,
  7895. mixins: true,
  7896. propTypes: true,
  7897. type: true
  7898. };
  7899. var KNOWN_STATICS = {
  7900. name: true,
  7901. length: true,
  7902. prototype: true,
  7903. caller: true,
  7904. callee: true,
  7905. arguments: true,
  7906. arity: true
  7907. };
  7908. var FORWARD_REF_STATICS = {
  7909. '$$typeof': true,
  7910. render: true,
  7911. defaultProps: true,
  7912. displayName: true,
  7913. propTypes: true
  7914. };
  7915. var MEMO_STATICS = {
  7916. '$$typeof': true,
  7917. compare: true,
  7918. defaultProps: true,
  7919. displayName: true,
  7920. propTypes: true,
  7921. type: true
  7922. };
  7923. var TYPE_STATICS = {};
  7924. TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
  7925. function getStatics(component) {
  7926. if (reactIs.isMemo(component)) {
  7927. return MEMO_STATICS;
  7928. }
  7929. return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
  7930. }
  7931. var defineProperty = Object.defineProperty;
  7932. var getOwnPropertyNames = Object.getOwnPropertyNames;
  7933. var getOwnPropertySymbols = Object.getOwnPropertySymbols;
  7934. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  7935. var getPrototypeOf = Object.getPrototypeOf;
  7936. var objectPrototype = Object.prototype;
  7937. function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
  7938. if (typeof sourceComponent !== 'string') {
  7939. // don't hoist over string (html) components
  7940. if (objectPrototype) {
  7941. var inheritedComponent = getPrototypeOf(sourceComponent);
  7942. if (inheritedComponent && inheritedComponent !== objectPrototype) {
  7943. hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
  7944. }
  7945. }
  7946. var keys = getOwnPropertyNames(sourceComponent);
  7947. if (getOwnPropertySymbols) {
  7948. keys = keys.concat(getOwnPropertySymbols(sourceComponent));
  7949. }
  7950. var targetStatics = getStatics(targetComponent);
  7951. var sourceStatics = getStatics(sourceComponent);
  7952. for (var i = 0; i < keys.length; ++i) {
  7953. var key = keys[i];
  7954. if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
  7955. var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
  7956. try {
  7957. // Avoid failures from read-only properties
  7958. defineProperty(targetComponent, key, descriptor);
  7959. } catch (e) {}
  7960. }
  7961. }
  7962. }
  7963. return targetComponent;
  7964. }
  7965. module.exports = hoistNonReactStatics;
  7966. /***/ }),
  7967. /* 26 */
  7968. /***/ (function(module, exports, __webpack_require__) {
  7969. exports = module.exports = __webpack_require__(35);
  7970. exports.Stream = exports;
  7971. exports.Readable = exports;
  7972. exports.Writable = __webpack_require__(28);
  7973. exports.Duplex = __webpack_require__(7);
  7974. exports.Transform = __webpack_require__(38);
  7975. exports.PassThrough = __webpack_require__(68);
  7976. /***/ }),
  7977. /* 27 */
  7978. /***/ (function(module, exports, __webpack_require__) {
  7979. /* eslint-disable node/no-deprecated-api */
  7980. var buffer = __webpack_require__(14);
  7981. var Buffer = buffer.Buffer; // alternative to using Object.keys for old browsers
  7982. function copyProps(src, dst) {
  7983. for (var key in src) {
  7984. dst[key] = src[key];
  7985. }
  7986. }
  7987. if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
  7988. module.exports = buffer;
  7989. } else {
  7990. // Copy properties from require('buffer')
  7991. copyProps(buffer, exports);
  7992. exports.Buffer = SafeBuffer;
  7993. }
  7994. function SafeBuffer(arg, encodingOrOffset, length) {
  7995. return Buffer(arg, encodingOrOffset, length);
  7996. } // Copy static methods from Buffer
  7997. copyProps(Buffer, SafeBuffer);
  7998. SafeBuffer.from = function (arg, encodingOrOffset, length) {
  7999. if (typeof arg === 'number') {
  8000. throw new TypeError('Argument must not be a number');
  8001. }
  8002. return Buffer(arg, encodingOrOffset, length);
  8003. };
  8004. SafeBuffer.alloc = function (size, fill, encoding) {
  8005. if (typeof size !== 'number') {
  8006. throw new TypeError('Argument must be a number');
  8007. }
  8008. var buf = Buffer(size);
  8009. if (fill !== undefined) {
  8010. if (typeof encoding === 'string') {
  8011. buf.fill(fill, encoding);
  8012. } else {
  8013. buf.fill(fill);
  8014. }
  8015. } else {
  8016. buf.fill(0);
  8017. }
  8018. return buf;
  8019. };
  8020. SafeBuffer.allocUnsafe = function (size) {
  8021. if (typeof size !== 'number') {
  8022. throw new TypeError('Argument must be a number');
  8023. }
  8024. return Buffer(size);
  8025. };
  8026. SafeBuffer.allocUnsafeSlow = function (size) {
  8027. if (typeof size !== 'number') {
  8028. throw new TypeError('Argument must be a number');
  8029. }
  8030. return buffer.SlowBuffer(size);
  8031. };
  8032. /***/ }),
  8033. /* 28 */
  8034. /***/ (function(module, exports, __webpack_require__) {
  8035. "use strict";
  8036. /* WEBPACK VAR INJECTION */(function(process, setImmediate, global) {// Copyright Joyent, Inc. and other Node contributors.
  8037. //
  8038. // Permission is hereby granted, free of charge, to any person obtaining a
  8039. // copy of this software and associated documentation files (the
  8040. // "Software"), to deal in the Software without restriction, including
  8041. // without limitation the rights to use, copy, modify, merge, publish,
  8042. // distribute, sublicense, and/or sell copies of the Software, and to permit
  8043. // persons to whom the Software is furnished to do so, subject to the
  8044. // following conditions:
  8045. //
  8046. // The above copyright notice and this permission notice shall be included
  8047. // in all copies or substantial portions of the Software.
  8048. //
  8049. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  8050. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  8051. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  8052. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  8053. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  8054. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  8055. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  8056. // A bit simpler than readable streams.
  8057. // Implement an async ._write(chunk, encoding, cb), and it'll handle all
  8058. // the drain event emission and buffering.
  8059. /*<replacement>*/
  8060. var pna = __webpack_require__(17);
  8061. /*</replacement>*/
  8062. module.exports = Writable;
  8063. /* <replacement> */
  8064. function WriteReq(chunk, encoding, cb) {
  8065. this.chunk = chunk;
  8066. this.encoding = encoding;
  8067. this.callback = cb;
  8068. this.next = null;
  8069. } // It seems a linked list but it is not
  8070. // there will be only 2 of these for each stream
  8071. function CorkedRequest(state) {
  8072. var _this = this;
  8073. this.next = null;
  8074. this.entry = null;
  8075. this.finish = function () {
  8076. onCorkedFinish(_this, state);
  8077. };
  8078. }
  8079. /* </replacement> */
  8080. /*<replacement>*/
  8081. var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
  8082. /*</replacement>*/
  8083. /*<replacement>*/
  8084. var Duplex;
  8085. /*</replacement>*/
  8086. Writable.WritableState = WritableState;
  8087. /*<replacement>*/
  8088. var util = __webpack_require__(15);
  8089. util.inherits = __webpack_require__(11);
  8090. /*</replacement>*/
  8091. /*<replacement>*/
  8092. var internalUtil = {
  8093. deprecate: __webpack_require__(66)
  8094. };
  8095. /*</replacement>*/
  8096. /*<replacement>*/
  8097. var Stream = __webpack_require__(36);
  8098. /*</replacement>*/
  8099. /*<replacement>*/
  8100. var Buffer = __webpack_require__(27).Buffer;
  8101. var OurUint8Array = global.Uint8Array || function () {};
  8102. function _uint8ArrayToBuffer(chunk) {
  8103. return Buffer.from(chunk);
  8104. }
  8105. function _isUint8Array(obj) {
  8106. return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
  8107. }
  8108. /*</replacement>*/
  8109. var destroyImpl = __webpack_require__(37);
  8110. util.inherits(Writable, Stream);
  8111. function nop() {}
  8112. function WritableState(options, stream) {
  8113. Duplex = Duplex || __webpack_require__(7);
  8114. options = options || {}; // Duplex streams are both readable and writable, but share
  8115. // the same options object.
  8116. // However, some cases require setting options to different
  8117. // values for the readable and the writable sides of the duplex stream.
  8118. // These options can be provided separately as readableXXX and writableXXX.
  8119. var isDuplex = stream instanceof Duplex; // object stream flag to indicate whether or not this stream
  8120. // contains buffers or objects.
  8121. this.objectMode = !!options.objectMode;
  8122. if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; // the point at which write() starts returning false
  8123. // Note: 0 is a valid value, means that we always return false if
  8124. // the entire buffer is not flushed immediately on write()
  8125. var hwm = options.highWaterMark;
  8126. var writableHwm = options.writableHighWaterMark;
  8127. var defaultHwm = this.objectMode ? 16 : 16 * 1024;
  8128. if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm; // cast to ints.
  8129. this.highWaterMark = Math.floor(this.highWaterMark); // if _final has been called
  8130. this.finalCalled = false; // drain event flag.
  8131. this.needDrain = false; // at the start of calling end()
  8132. this.ending = false; // when end() has been called, and returned
  8133. this.ended = false; // when 'finish' is emitted
  8134. this.finished = false; // has it been destroyed
  8135. this.destroyed = false; // should we decode strings into buffers before passing to _write?
  8136. // this is here so that some node-core streams can optimize string
  8137. // handling at a lower level.
  8138. var noDecode = options.decodeStrings === false;
  8139. this.decodeStrings = !noDecode; // Crypto is kind of old and crusty. Historically, its default string
  8140. // encoding is 'binary' so we have to make this configurable.
  8141. // Everything else in the universe uses 'utf8', though.
  8142. this.defaultEncoding = options.defaultEncoding || 'utf8'; // not an actual buffer we keep track of, but a measurement
  8143. // of how much we're waiting to get pushed to some underlying
  8144. // socket or file.
  8145. this.length = 0; // a flag to see when we're in the middle of a write.
  8146. this.writing = false; // when true all writes will be buffered until .uncork() call
  8147. this.corked = 0; // a flag to be able to tell if the onwrite cb is called immediately,
  8148. // or on a later tick. We set this to true at first, because any
  8149. // actions that shouldn't happen until "later" should generally also
  8150. // not happen before the first write call.
  8151. this.sync = true; // a flag to know if we're processing previously buffered items, which
  8152. // may call the _write() callback in the same tick, so that we don't
  8153. // end up in an overlapped onwrite situation.
  8154. this.bufferProcessing = false; // the callback that's passed to _write(chunk,cb)
  8155. this.onwrite = function (er) {
  8156. onwrite(stream, er);
  8157. }; // the callback that the user supplies to write(chunk,encoding,cb)
  8158. this.writecb = null; // the amount that is being written when _write is called.
  8159. this.writelen = 0;
  8160. this.bufferedRequest = null;
  8161. this.lastBufferedRequest = null; // number of pending user-supplied write callbacks
  8162. // this must be 0 before 'finish' can be emitted
  8163. this.pendingcb = 0; // emit prefinish if the only thing we're waiting for is _write cbs
  8164. // This is relevant for synchronous Transform streams
  8165. this.prefinished = false; // True if the error was already emitted and should not be thrown again
  8166. this.errorEmitted = false; // count buffered requests
  8167. this.bufferedRequestCount = 0; // allocate the first CorkedRequest, there is always
  8168. // one allocated and free to use, and we maintain at most two
  8169. this.corkedRequestsFree = new CorkedRequest(this);
  8170. }
  8171. WritableState.prototype.getBuffer = function getBuffer() {
  8172. var current = this.bufferedRequest;
  8173. var out = [];
  8174. while (current) {
  8175. out.push(current);
  8176. current = current.next;
  8177. }
  8178. return out;
  8179. };
  8180. (function () {
  8181. try {
  8182. Object.defineProperty(WritableState.prototype, 'buffer', {
  8183. get: internalUtil.deprecate(function () {
  8184. return this.getBuffer();
  8185. }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
  8186. });
  8187. } catch (_) {}
  8188. })(); // Test _writableState for inheritance to account for Duplex streams,
  8189. // whose prototype chain only points to Readable.
  8190. var realHasInstance;
  8191. if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
  8192. realHasInstance = Function.prototype[Symbol.hasInstance];
  8193. Object.defineProperty(Writable, Symbol.hasInstance, {
  8194. value: function value(object) {
  8195. if (realHasInstance.call(this, object)) return true;
  8196. if (this !== Writable) return false;
  8197. return object && object._writableState instanceof WritableState;
  8198. }
  8199. });
  8200. } else {
  8201. realHasInstance = function realHasInstance(object) {
  8202. return object instanceof this;
  8203. };
  8204. }
  8205. function Writable(options) {
  8206. Duplex = Duplex || __webpack_require__(7); // Writable ctor is applied to Duplexes, too.
  8207. // `realHasInstance` is necessary because using plain `instanceof`
  8208. // would return false, as no `_writableState` property is attached.
  8209. // Trying to use the custom `instanceof` for Writable here will also break the
  8210. // Node.js LazyTransform implementation, which has a non-trivial getter for
  8211. // `_writableState` that would lead to infinite recursion.
  8212. if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
  8213. return new Writable(options);
  8214. }
  8215. this._writableState = new WritableState(options, this); // legacy.
  8216. this.writable = true;
  8217. if (options) {
  8218. if (typeof options.write === 'function') this._write = options.write;
  8219. if (typeof options.writev === 'function') this._writev = options.writev;
  8220. if (typeof options.destroy === 'function') this._destroy = options.destroy;
  8221. if (typeof options.final === 'function') this._final = options.final;
  8222. }
  8223. Stream.call(this);
  8224. } // Otherwise people can pipe Writable streams, which is just wrong.
  8225. Writable.prototype.pipe = function () {
  8226. this.emit('error', new Error('Cannot pipe, not readable'));
  8227. };
  8228. function writeAfterEnd(stream, cb) {
  8229. var er = new Error('write after end'); // TODO: defer error events consistently everywhere, not just the cb
  8230. stream.emit('error', er);
  8231. pna.nextTick(cb, er);
  8232. } // Checks that a user-supplied chunk is valid, especially for the particular
  8233. // mode the stream is in. Currently this means that `null` is never accepted
  8234. // and undefined/non-string values are only allowed in object mode.
  8235. function validChunk(stream, state, chunk, cb) {
  8236. var valid = true;
  8237. var er = false;
  8238. if (chunk === null) {
  8239. er = new TypeError('May not write null values to stream');
  8240. } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
  8241. er = new TypeError('Invalid non-string/buffer chunk');
  8242. }
  8243. if (er) {
  8244. stream.emit('error', er);
  8245. pna.nextTick(cb, er);
  8246. valid = false;
  8247. }
  8248. return valid;
  8249. }
  8250. Writable.prototype.write = function (chunk, encoding, cb) {
  8251. var state = this._writableState;
  8252. var ret = false;
  8253. var isBuf = !state.objectMode && _isUint8Array(chunk);
  8254. if (isBuf && !Buffer.isBuffer(chunk)) {
  8255. chunk = _uint8ArrayToBuffer(chunk);
  8256. }
  8257. if (typeof encoding === 'function') {
  8258. cb = encoding;
  8259. encoding = null;
  8260. }
  8261. if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
  8262. if (typeof cb !== 'function') cb = nop;
  8263. if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
  8264. state.pendingcb++;
  8265. ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
  8266. }
  8267. return ret;
  8268. };
  8269. Writable.prototype.cork = function () {
  8270. var state = this._writableState;
  8271. state.corked++;
  8272. };
  8273. Writable.prototype.uncork = function () {
  8274. var state = this._writableState;
  8275. if (state.corked) {
  8276. state.corked--;
  8277. if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
  8278. }
  8279. };
  8280. Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
  8281. // node::ParseEncoding() requires lower case.
  8282. if (typeof encoding === 'string') encoding = encoding.toLowerCase();
  8283. if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
  8284. this._writableState.defaultEncoding = encoding;
  8285. return this;
  8286. };
  8287. function decodeChunk(state, chunk, encoding) {
  8288. if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
  8289. chunk = Buffer.from(chunk, encoding);
  8290. }
  8291. return chunk;
  8292. }
  8293. Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
  8294. // making it explicit this property is not enumerable
  8295. // because otherwise some prototype manipulation in
  8296. // userland will fail
  8297. enumerable: false,
  8298. get: function get() {
  8299. return this._writableState.highWaterMark;
  8300. }
  8301. }); // if we're already writing something, then just put this
  8302. // in the queue, and wait our turn. Otherwise, call _write
  8303. // If we return false, then we need a drain event, so set that flag.
  8304. function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
  8305. if (!isBuf) {
  8306. var newChunk = decodeChunk(state, chunk, encoding);
  8307. if (chunk !== newChunk) {
  8308. isBuf = true;
  8309. encoding = 'buffer';
  8310. chunk = newChunk;
  8311. }
  8312. }
  8313. var len = state.objectMode ? 1 : chunk.length;
  8314. state.length += len;
  8315. var ret = state.length < state.highWaterMark; // we must ensure that previous needDrain will not be reset to false.
  8316. if (!ret) state.needDrain = true;
  8317. if (state.writing || state.corked) {
  8318. var last = state.lastBufferedRequest;
  8319. state.lastBufferedRequest = {
  8320. chunk: chunk,
  8321. encoding: encoding,
  8322. isBuf: isBuf,
  8323. callback: cb,
  8324. next: null
  8325. };
  8326. if (last) {
  8327. last.next = state.lastBufferedRequest;
  8328. } else {
  8329. state.bufferedRequest = state.lastBufferedRequest;
  8330. }
  8331. state.bufferedRequestCount += 1;
  8332. } else {
  8333. doWrite(stream, state, false, len, chunk, encoding, cb);
  8334. }
  8335. return ret;
  8336. }
  8337. function doWrite(stream, state, writev, len, chunk, encoding, cb) {
  8338. state.writelen = len;
  8339. state.writecb = cb;
  8340. state.writing = true;
  8341. state.sync = true;
  8342. if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
  8343. state.sync = false;
  8344. }
  8345. function onwriteError(stream, state, sync, er, cb) {
  8346. --state.pendingcb;
  8347. if (sync) {
  8348. // defer the callback if we are being called synchronously
  8349. // to avoid piling up things on the stack
  8350. pna.nextTick(cb, er); // this can emit finish, and it will always happen
  8351. // after error
  8352. pna.nextTick(finishMaybe, stream, state);
  8353. stream._writableState.errorEmitted = true;
  8354. stream.emit('error', er);
  8355. } else {
  8356. // the caller expect this to happen before if
  8357. // it is async
  8358. cb(er);
  8359. stream._writableState.errorEmitted = true;
  8360. stream.emit('error', er); // this can emit finish, but finish must
  8361. // always follow error
  8362. finishMaybe(stream, state);
  8363. }
  8364. }
  8365. function onwriteStateUpdate(state) {
  8366. state.writing = false;
  8367. state.writecb = null;
  8368. state.length -= state.writelen;
  8369. state.writelen = 0;
  8370. }
  8371. function onwrite(stream, er) {
  8372. var state = stream._writableState;
  8373. var sync = state.sync;
  8374. var cb = state.writecb;
  8375. onwriteStateUpdate(state);
  8376. if (er) onwriteError(stream, state, sync, er, cb);else {
  8377. // Check if we're actually ready to finish, but don't emit yet
  8378. var finished = needFinish(state);
  8379. if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
  8380. clearBuffer(stream, state);
  8381. }
  8382. if (sync) {
  8383. /*<replacement>*/
  8384. asyncWrite(afterWrite, stream, state, finished, cb);
  8385. /*</replacement>*/
  8386. } else {
  8387. afterWrite(stream, state, finished, cb);
  8388. }
  8389. }
  8390. }
  8391. function afterWrite(stream, state, finished, cb) {
  8392. if (!finished) onwriteDrain(stream, state);
  8393. state.pendingcb--;
  8394. cb();
  8395. finishMaybe(stream, state);
  8396. } // Must force callback to be called on nextTick, so that we don't
  8397. // emit 'drain' before the write() consumer gets the 'false' return
  8398. // value, and has a chance to attach a 'drain' listener.
  8399. function onwriteDrain(stream, state) {
  8400. if (state.length === 0 && state.needDrain) {
  8401. state.needDrain = false;
  8402. stream.emit('drain');
  8403. }
  8404. } // if there's something in the buffer waiting, then process it
  8405. function clearBuffer(stream, state) {
  8406. state.bufferProcessing = true;
  8407. var entry = state.bufferedRequest;
  8408. if (stream._writev && entry && entry.next) {
  8409. // Fast case, write everything using _writev()
  8410. var l = state.bufferedRequestCount;
  8411. var buffer = new Array(l);
  8412. var holder = state.corkedRequestsFree;
  8413. holder.entry = entry;
  8414. var count = 0;
  8415. var allBuffers = true;
  8416. while (entry) {
  8417. buffer[count] = entry;
  8418. if (!entry.isBuf) allBuffers = false;
  8419. entry = entry.next;
  8420. count += 1;
  8421. }
  8422. buffer.allBuffers = allBuffers;
  8423. doWrite(stream, state, true, state.length, buffer, '', holder.finish); // doWrite is almost always async, defer these to save a bit of time
  8424. // as the hot path ends with doWrite
  8425. state.pendingcb++;
  8426. state.lastBufferedRequest = null;
  8427. if (holder.next) {
  8428. state.corkedRequestsFree = holder.next;
  8429. holder.next = null;
  8430. } else {
  8431. state.corkedRequestsFree = new CorkedRequest(state);
  8432. }
  8433. state.bufferedRequestCount = 0;
  8434. } else {
  8435. // Slow case, write chunks one-by-one
  8436. while (entry) {
  8437. var chunk = entry.chunk;
  8438. var encoding = entry.encoding;
  8439. var cb = entry.callback;
  8440. var len = state.objectMode ? 1 : chunk.length;
  8441. doWrite(stream, state, false, len, chunk, encoding, cb);
  8442. entry = entry.next;
  8443. state.bufferedRequestCount--; // if we didn't call the onwrite immediately, then
  8444. // it means that we need to wait until it does.
  8445. // also, that means that the chunk and cb are currently
  8446. // being processed, so move the buffer counter past them.
  8447. if (state.writing) {
  8448. break;
  8449. }
  8450. }
  8451. if (entry === null) state.lastBufferedRequest = null;
  8452. }
  8453. state.bufferedRequest = entry;
  8454. state.bufferProcessing = false;
  8455. }
  8456. Writable.prototype._write = function (chunk, encoding, cb) {
  8457. cb(new Error('_write() is not implemented'));
  8458. };
  8459. Writable.prototype._writev = null;
  8460. Writable.prototype.end = function (chunk, encoding, cb) {
  8461. var state = this._writableState;
  8462. if (typeof chunk === 'function') {
  8463. cb = chunk;
  8464. chunk = null;
  8465. encoding = null;
  8466. } else if (typeof encoding === 'function') {
  8467. cb = encoding;
  8468. encoding = null;
  8469. }
  8470. if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); // .end() fully uncorks
  8471. if (state.corked) {
  8472. state.corked = 1;
  8473. this.uncork();
  8474. } // ignore unnecessary end() calls.
  8475. if (!state.ending && !state.finished) endWritable(this, state, cb);
  8476. };
  8477. function needFinish(state) {
  8478. return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
  8479. }
  8480. function callFinal(stream, state) {
  8481. stream._final(function (err) {
  8482. state.pendingcb--;
  8483. if (err) {
  8484. stream.emit('error', err);
  8485. }
  8486. state.prefinished = true;
  8487. stream.emit('prefinish');
  8488. finishMaybe(stream, state);
  8489. });
  8490. }
  8491. function prefinish(stream, state) {
  8492. if (!state.prefinished && !state.finalCalled) {
  8493. if (typeof stream._final === 'function') {
  8494. state.pendingcb++;
  8495. state.finalCalled = true;
  8496. pna.nextTick(callFinal, stream, state);
  8497. } else {
  8498. state.prefinished = true;
  8499. stream.emit('prefinish');
  8500. }
  8501. }
  8502. }
  8503. function finishMaybe(stream, state) {
  8504. var need = needFinish(state);
  8505. if (need) {
  8506. prefinish(stream, state);
  8507. if (state.pendingcb === 0) {
  8508. state.finished = true;
  8509. stream.emit('finish');
  8510. }
  8511. }
  8512. return need;
  8513. }
  8514. function endWritable(stream, state, cb) {
  8515. state.ending = true;
  8516. finishMaybe(stream, state);
  8517. if (cb) {
  8518. if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);
  8519. }
  8520. state.ended = true;
  8521. stream.writable = false;
  8522. }
  8523. function onCorkedFinish(corkReq, state, err) {
  8524. var entry = corkReq.entry;
  8525. corkReq.entry = null;
  8526. while (entry) {
  8527. var cb = entry.callback;
  8528. state.pendingcb--;
  8529. cb(err);
  8530. entry = entry.next;
  8531. }
  8532. if (state.corkedRequestsFree) {
  8533. state.corkedRequestsFree.next = corkReq;
  8534. } else {
  8535. state.corkedRequestsFree = corkReq;
  8536. }
  8537. }
  8538. Object.defineProperty(Writable.prototype, 'destroyed', {
  8539. get: function get() {
  8540. if (this._writableState === undefined) {
  8541. return false;
  8542. }
  8543. return this._writableState.destroyed;
  8544. },
  8545. set: function set(value) {
  8546. // we ignore the value if the stream
  8547. // has not been initialized yet
  8548. if (!this._writableState) {
  8549. return;
  8550. } // backward compatibility, the user is explicitly
  8551. // managing destroyed
  8552. this._writableState.destroyed = value;
  8553. }
  8554. });
  8555. Writable.prototype.destroy = destroyImpl.destroy;
  8556. Writable.prototype._undestroy = destroyImpl.undestroy;
  8557. Writable.prototype._destroy = function (err, cb) {
  8558. this.end();
  8559. cb(err);
  8560. };
  8561. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(16), __webpack_require__(64).setImmediate, __webpack_require__(5)))
  8562. /***/ }),
  8563. /* 29 */
  8564. /***/ (function(module, exports, __webpack_require__) {
  8565. "use strict";
  8566. // Copyright Joyent, Inc. and other Node contributors.
  8567. //
  8568. // Permission is hereby granted, free of charge, to any person obtaining a
  8569. // copy of this software and associated documentation files (the
  8570. // "Software"), to deal in the Software without restriction, including
  8571. // without limitation the rights to use, copy, modify, merge, publish,
  8572. // distribute, sublicense, and/or sell copies of the Software, and to permit
  8573. // persons to whom the Software is furnished to do so, subject to the
  8574. // following conditions:
  8575. //
  8576. // The above copyright notice and this permission notice shall be included
  8577. // in all copies or substantial portions of the Software.
  8578. //
  8579. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  8580. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  8581. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  8582. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  8583. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  8584. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  8585. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  8586. /*<replacement>*/
  8587. var Buffer = __webpack_require__(67).Buffer;
  8588. /*</replacement>*/
  8589. var isEncoding = Buffer.isEncoding || function (encoding) {
  8590. encoding = '' + encoding;
  8591. switch (encoding && encoding.toLowerCase()) {
  8592. case 'hex':
  8593. case 'utf8':
  8594. case 'utf-8':
  8595. case 'ascii':
  8596. case 'binary':
  8597. case 'base64':
  8598. case 'ucs2':
  8599. case 'ucs-2':
  8600. case 'utf16le':
  8601. case 'utf-16le':
  8602. case 'raw':
  8603. return true;
  8604. default:
  8605. return false;
  8606. }
  8607. };
  8608. function _normalizeEncoding(enc) {
  8609. if (!enc) return 'utf8';
  8610. var retried;
  8611. while (true) {
  8612. switch (enc) {
  8613. case 'utf8':
  8614. case 'utf-8':
  8615. return 'utf8';
  8616. case 'ucs2':
  8617. case 'ucs-2':
  8618. case 'utf16le':
  8619. case 'utf-16le':
  8620. return 'utf16le';
  8621. case 'latin1':
  8622. case 'binary':
  8623. return 'latin1';
  8624. case 'base64':
  8625. case 'ascii':
  8626. case 'hex':
  8627. return enc;
  8628. default:
  8629. if (retried) return; // undefined
  8630. enc = ('' + enc).toLowerCase();
  8631. retried = true;
  8632. }
  8633. }
  8634. }
  8635. ; // Do not cache `Buffer.isEncoding` when checking encoding names as some
  8636. // modules monkey-patch it to support additional encodings
  8637. function normalizeEncoding(enc) {
  8638. var nenc = _normalizeEncoding(enc);
  8639. if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
  8640. return nenc || enc;
  8641. } // StringDecoder provides an interface for efficiently splitting a series of
  8642. // buffers into a series of JS strings without breaking apart multi-byte
  8643. // characters.
  8644. exports.StringDecoder = StringDecoder;
  8645. function StringDecoder(encoding) {
  8646. this.encoding = normalizeEncoding(encoding);
  8647. var nb;
  8648. switch (this.encoding) {
  8649. case 'utf16le':
  8650. this.text = utf16Text;
  8651. this.end = utf16End;
  8652. nb = 4;
  8653. break;
  8654. case 'utf8':
  8655. this.fillLast = utf8FillLast;
  8656. nb = 4;
  8657. break;
  8658. case 'base64':
  8659. this.text = base64Text;
  8660. this.end = base64End;
  8661. nb = 3;
  8662. break;
  8663. default:
  8664. this.write = simpleWrite;
  8665. this.end = simpleEnd;
  8666. return;
  8667. }
  8668. this.lastNeed = 0;
  8669. this.lastTotal = 0;
  8670. this.lastChar = Buffer.allocUnsafe(nb);
  8671. }
  8672. StringDecoder.prototype.write = function (buf) {
  8673. if (buf.length === 0) return '';
  8674. var r;
  8675. var i;
  8676. if (this.lastNeed) {
  8677. r = this.fillLast(buf);
  8678. if (r === undefined) return '';
  8679. i = this.lastNeed;
  8680. this.lastNeed = 0;
  8681. } else {
  8682. i = 0;
  8683. }
  8684. if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
  8685. return r || '';
  8686. };
  8687. StringDecoder.prototype.end = utf8End; // Returns only complete characters in a Buffer
  8688. StringDecoder.prototype.text = utf8Text; // Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
  8689. StringDecoder.prototype.fillLast = function (buf) {
  8690. if (this.lastNeed <= buf.length) {
  8691. buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
  8692. return this.lastChar.toString(this.encoding, 0, this.lastTotal);
  8693. }
  8694. buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
  8695. this.lastNeed -= buf.length;
  8696. }; // Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
  8697. // continuation byte. If an invalid byte is detected, -2 is returned.
  8698. function utf8CheckByte(byte) {
  8699. if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
  8700. return byte >> 6 === 0x02 ? -1 : -2;
  8701. } // Checks at most 3 bytes at the end of a Buffer in order to detect an
  8702. // incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
  8703. // needed to complete the UTF-8 character (if applicable) are returned.
  8704. function utf8CheckIncomplete(self, buf, i) {
  8705. var j = buf.length - 1;
  8706. if (j < i) return 0;
  8707. var nb = utf8CheckByte(buf[j]);
  8708. if (nb >= 0) {
  8709. if (nb > 0) self.lastNeed = nb - 1;
  8710. return nb;
  8711. }
  8712. if (--j < i || nb === -2) return 0;
  8713. nb = utf8CheckByte(buf[j]);
  8714. if (nb >= 0) {
  8715. if (nb > 0) self.lastNeed = nb - 2;
  8716. return nb;
  8717. }
  8718. if (--j < i || nb === -2) return 0;
  8719. nb = utf8CheckByte(buf[j]);
  8720. if (nb >= 0) {
  8721. if (nb > 0) {
  8722. if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
  8723. }
  8724. return nb;
  8725. }
  8726. return 0;
  8727. } // Validates as many continuation bytes for a multi-byte UTF-8 character as
  8728. // needed or are available. If we see a non-continuation byte where we expect
  8729. // one, we "replace" the validated continuation bytes we've seen so far with
  8730. // a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
  8731. // behavior. The continuation byte check is included three times in the case
  8732. // where all of the continuation bytes for a character exist in the same buffer.
  8733. // It is also done this way as a slight performance increase instead of using a
  8734. // loop.
  8735. function utf8CheckExtraBytes(self, buf, p) {
  8736. if ((buf[0] & 0xC0) !== 0x80) {
  8737. self.lastNeed = 0;
  8738. return "\uFFFD";
  8739. }
  8740. if (self.lastNeed > 1 && buf.length > 1) {
  8741. if ((buf[1] & 0xC0) !== 0x80) {
  8742. self.lastNeed = 1;
  8743. return "\uFFFD";
  8744. }
  8745. if (self.lastNeed > 2 && buf.length > 2) {
  8746. if ((buf[2] & 0xC0) !== 0x80) {
  8747. self.lastNeed = 2;
  8748. return "\uFFFD";
  8749. }
  8750. }
  8751. }
  8752. } // Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
  8753. function utf8FillLast(buf) {
  8754. var p = this.lastTotal - this.lastNeed;
  8755. var r = utf8CheckExtraBytes(this, buf, p);
  8756. if (r !== undefined) return r;
  8757. if (this.lastNeed <= buf.length) {
  8758. buf.copy(this.lastChar, p, 0, this.lastNeed);
  8759. return this.lastChar.toString(this.encoding, 0, this.lastTotal);
  8760. }
  8761. buf.copy(this.lastChar, p, 0, buf.length);
  8762. this.lastNeed -= buf.length;
  8763. } // Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
  8764. // partial character, the character's bytes are buffered until the required
  8765. // number of bytes are available.
  8766. function utf8Text(buf, i) {
  8767. var total = utf8CheckIncomplete(this, buf, i);
  8768. if (!this.lastNeed) return buf.toString('utf8', i);
  8769. this.lastTotal = total;
  8770. var end = buf.length - (total - this.lastNeed);
  8771. buf.copy(this.lastChar, 0, end);
  8772. return buf.toString('utf8', i, end);
  8773. } // For UTF-8, a replacement character is added when ending on a partial
  8774. // character.
  8775. function utf8End(buf) {
  8776. var r = buf && buf.length ? this.write(buf) : '';
  8777. if (this.lastNeed) return r + "\uFFFD";
  8778. return r;
  8779. } // UTF-16LE typically needs two bytes per character, but even if we have an even
  8780. // number of bytes available, we need to check if we end on a leading/high
  8781. // surrogate. In that case, we need to wait for the next two bytes in order to
  8782. // decode the last character properly.
  8783. function utf16Text(buf, i) {
  8784. if ((buf.length - i) % 2 === 0) {
  8785. var r = buf.toString('utf16le', i);
  8786. if (r) {
  8787. var c = r.charCodeAt(r.length - 1);
  8788. if (c >= 0xD800 && c <= 0xDBFF) {
  8789. this.lastNeed = 2;
  8790. this.lastTotal = 4;
  8791. this.lastChar[0] = buf[buf.length - 2];
  8792. this.lastChar[1] = buf[buf.length - 1];
  8793. return r.slice(0, -1);
  8794. }
  8795. }
  8796. return r;
  8797. }
  8798. this.lastNeed = 1;
  8799. this.lastTotal = 2;
  8800. this.lastChar[0] = buf[buf.length - 1];
  8801. return buf.toString('utf16le', i, buf.length - 1);
  8802. } // For UTF-16LE we do not explicitly append special replacement characters if we
  8803. // end on a partial character, we simply let v8 handle that.
  8804. function utf16End(buf) {
  8805. var r = buf && buf.length ? this.write(buf) : '';
  8806. if (this.lastNeed) {
  8807. var end = this.lastTotal - this.lastNeed;
  8808. return r + this.lastChar.toString('utf16le', 0, end);
  8809. }
  8810. return r;
  8811. }
  8812. function base64Text(buf, i) {
  8813. var n = (buf.length - i) % 3;
  8814. if (n === 0) return buf.toString('base64', i);
  8815. this.lastNeed = 3 - n;
  8816. this.lastTotal = 3;
  8817. if (n === 1) {
  8818. this.lastChar[0] = buf[buf.length - 1];
  8819. } else {
  8820. this.lastChar[0] = buf[buf.length - 2];
  8821. this.lastChar[1] = buf[buf.length - 1];
  8822. }
  8823. return buf.toString('base64', i, buf.length - n);
  8824. }
  8825. function base64End(buf) {
  8826. var r = buf && buf.length ? this.write(buf) : '';
  8827. if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
  8828. return r;
  8829. } // Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
  8830. function simpleWrite(buf) {
  8831. return buf.toString(this.encoding);
  8832. }
  8833. function simpleEnd(buf) {
  8834. return buf && buf.length ? this.write(buf) : '';
  8835. }
  8836. /***/ }),
  8837. /* 30 */
  8838. /***/ (function(module, exports, __webpack_require__) {
  8839. var isArray = __webpack_require__(31).isArray;
  8840. module.exports = {
  8841. copyOptions: function copyOptions(options) {
  8842. var key,
  8843. copy = {};
  8844. for (key in options) {
  8845. if (options.hasOwnProperty(key)) {
  8846. copy[key] = options[key];
  8847. }
  8848. }
  8849. return copy;
  8850. },
  8851. ensureFlagExists: function ensureFlagExists(item, options) {
  8852. if (!(item in options) || typeof options[item] !== 'boolean') {
  8853. options[item] = false;
  8854. }
  8855. },
  8856. ensureSpacesExists: function ensureSpacesExists(options) {
  8857. if (!('spaces' in options) || typeof options.spaces !== 'number' && typeof options.spaces !== 'string') {
  8858. options.spaces = 0;
  8859. }
  8860. },
  8861. ensureAlwaysArrayExists: function ensureAlwaysArrayExists(options) {
  8862. if (!('alwaysArray' in options) || typeof options.alwaysArray !== 'boolean' && !isArray(options.alwaysArray)) {
  8863. options.alwaysArray = false;
  8864. }
  8865. },
  8866. ensureKeyExists: function ensureKeyExists(key, options) {
  8867. if (!(key + 'Key' in options) || typeof options[key + 'Key'] !== 'string') {
  8868. options[key + 'Key'] = options.compact ? '_' + key : key;
  8869. }
  8870. },
  8871. checkFnExists: function checkFnExists(key, options) {
  8872. return key + 'Fn' in options;
  8873. }
  8874. };
  8875. /***/ }),
  8876. /* 31 */
  8877. /***/ (function(module, exports) {
  8878. module.exports = {
  8879. isArray: function isArray(value) {
  8880. if (Array.isArray) {
  8881. return Array.isArray(value);
  8882. } // fallback for older browsers like IE 8
  8883. return Object.prototype.toString.call(value) === '[object Array]';
  8884. }
  8885. };
  8886. /***/ }),
  8887. /* 32 */
  8888. /***/ (function(module, exports) {
  8889. module.exports = function (module) {
  8890. if (!module.webpackPolyfill) {
  8891. module.deprecate = function () {};
  8892. module.paths = []; // module.parent = undefined by default
  8893. if (!module.children) module.children = [];
  8894. Object.defineProperty(module, "loaded", {
  8895. enumerable: true,
  8896. get: function get() {
  8897. return module.l;
  8898. }
  8899. });
  8900. Object.defineProperty(module, "id", {
  8901. enumerable: true,
  8902. get: function get() {
  8903. return module.i;
  8904. }
  8905. });
  8906. module.webpackPolyfill = 1;
  8907. }
  8908. return module;
  8909. };
  8910. /***/ }),
  8911. /* 33 */
  8912. /***/ (function(module, exports, __webpack_require__) {
  8913. var sax = __webpack_require__(57);
  8914. var expat
  8915. /*= require('node-expat');*/
  8916. = {
  8917. on: function on() {},
  8918. parse: function parse() {}
  8919. };
  8920. var helper = __webpack_require__(30);
  8921. var isArray = __webpack_require__(31).isArray;
  8922. var options;
  8923. var pureJsParser = true;
  8924. var currentElement;
  8925. function validateOptions(userOptions) {
  8926. options = helper.copyOptions(userOptions);
  8927. helper.ensureFlagExists('ignoreDeclaration', options);
  8928. helper.ensureFlagExists('ignoreInstruction', options);
  8929. helper.ensureFlagExists('ignoreAttributes', options);
  8930. helper.ensureFlagExists('ignoreText', options);
  8931. helper.ensureFlagExists('ignoreComment', options);
  8932. helper.ensureFlagExists('ignoreCdata', options);
  8933. helper.ensureFlagExists('ignoreDoctype', options);
  8934. helper.ensureFlagExists('compact', options);
  8935. helper.ensureFlagExists('alwaysChildren', options);
  8936. helper.ensureFlagExists('addParent', options);
  8937. helper.ensureFlagExists('trim', options);
  8938. helper.ensureFlagExists('nativeType', options);
  8939. helper.ensureFlagExists('nativeTypeAttributes', options);
  8940. helper.ensureFlagExists('sanitize', options);
  8941. helper.ensureFlagExists('instructionHasAttributes', options);
  8942. helper.ensureFlagExists('captureSpacesBetweenElements', options);
  8943. helper.ensureAlwaysArrayExists(options);
  8944. helper.ensureKeyExists('declaration', options);
  8945. helper.ensureKeyExists('instruction', options);
  8946. helper.ensureKeyExists('attributes', options);
  8947. helper.ensureKeyExists('text', options);
  8948. helper.ensureKeyExists('comment', options);
  8949. helper.ensureKeyExists('cdata', options);
  8950. helper.ensureKeyExists('doctype', options);
  8951. helper.ensureKeyExists('type', options);
  8952. helper.ensureKeyExists('name', options);
  8953. helper.ensureKeyExists('elements', options);
  8954. helper.ensureKeyExists('parent', options);
  8955. helper.checkFnExists('doctype', options);
  8956. helper.checkFnExists('instruction', options);
  8957. helper.checkFnExists('cdata', options);
  8958. helper.checkFnExists('comment', options);
  8959. helper.checkFnExists('text', options);
  8960. helper.checkFnExists('instructionName', options);
  8961. helper.checkFnExists('elementName', options);
  8962. helper.checkFnExists('attributeName', options);
  8963. helper.checkFnExists('attributeValue', options);
  8964. helper.checkFnExists('attributes', options);
  8965. return options;
  8966. }
  8967. function nativeType(value) {
  8968. var nValue = Number(value);
  8969. if (!isNaN(nValue)) {
  8970. return nValue;
  8971. }
  8972. var bValue = value.toLowerCase();
  8973. if (bValue === 'true') {
  8974. return true;
  8975. } else if (bValue === 'false') {
  8976. return false;
  8977. }
  8978. return value;
  8979. }
  8980. function addField(type, value) {
  8981. var key;
  8982. if (options.compact) {
  8983. if (!currentElement[options[type + 'Key']] && (isArray(options.alwaysArray) ? options.alwaysArray.indexOf(options[type + 'Key']) !== -1 : options.alwaysArray)) {
  8984. currentElement[options[type + 'Key']] = [];
  8985. }
  8986. if (currentElement[options[type + 'Key']] && !isArray(currentElement[options[type + 'Key']])) {
  8987. currentElement[options[type + 'Key']] = [currentElement[options[type + 'Key']]];
  8988. }
  8989. if (type + 'Fn' in options && typeof value === 'string') {
  8990. value = options[type + 'Fn'](value, currentElement);
  8991. }
  8992. if (type === 'instruction' && ('instructionFn' in options || 'instructionNameFn' in options)) {
  8993. for (key in value) {
  8994. if (value.hasOwnProperty(key)) {
  8995. if ('instructionFn' in options) {
  8996. value[key] = options.instructionFn(value[key], key, currentElement);
  8997. } else {
  8998. var temp = value[key];
  8999. delete value[key];
  9000. value[options.instructionNameFn(key, temp, currentElement)] = temp;
  9001. }
  9002. }
  9003. }
  9004. }
  9005. if (isArray(currentElement[options[type + 'Key']])) {
  9006. currentElement[options[type + 'Key']].push(value);
  9007. } else {
  9008. currentElement[options[type + 'Key']] = value;
  9009. }
  9010. } else {
  9011. if (!currentElement[options.elementsKey]) {
  9012. currentElement[options.elementsKey] = [];
  9013. }
  9014. var element = {};
  9015. element[options.typeKey] = type;
  9016. if (type === 'instruction') {
  9017. for (key in value) {
  9018. if (value.hasOwnProperty(key)) {
  9019. break;
  9020. }
  9021. }
  9022. element[options.nameKey] = 'instructionNameFn' in options ? options.instructionNameFn(key, value, currentElement) : key;
  9023. if (options.instructionHasAttributes) {
  9024. element[options.attributesKey] = value[key][options.attributesKey];
  9025. if ('instructionFn' in options) {
  9026. element[options.attributesKey] = options.instructionFn(element[options.attributesKey], key, currentElement);
  9027. }
  9028. } else {
  9029. if ('instructionFn' in options) {
  9030. value[key] = options.instructionFn(value[key], key, currentElement);
  9031. }
  9032. element[options.instructionKey] = value[key];
  9033. }
  9034. } else {
  9035. if (type + 'Fn' in options) {
  9036. value = options[type + 'Fn'](value, currentElement);
  9037. }
  9038. element[options[type + 'Key']] = value;
  9039. }
  9040. if (options.addParent) {
  9041. element[options.parentKey] = currentElement;
  9042. }
  9043. currentElement[options.elementsKey].push(element);
  9044. }
  9045. }
  9046. function manipulateAttributes(attributes) {
  9047. if ('attributesFn' in options && attributes) {
  9048. attributes = options.attributesFn(attributes, currentElement);
  9049. }
  9050. if ((options.trim || 'attributeValueFn' in options || 'attributeNameFn' in options || options.nativeTypeAttributes) && attributes) {
  9051. var key;
  9052. for (key in attributes) {
  9053. if (attributes.hasOwnProperty(key)) {
  9054. if (options.trim) attributes[key] = attributes[key].trim();
  9055. if (options.nativeTypeAttributes) {
  9056. attributes[key] = nativeType(attributes[key]);
  9057. }
  9058. if ('attributeValueFn' in options) attributes[key] = options.attributeValueFn(attributes[key], key, currentElement);
  9059. if ('attributeNameFn' in options) {
  9060. var temp = attributes[key];
  9061. delete attributes[key];
  9062. attributes[options.attributeNameFn(key, attributes[key], currentElement)] = temp;
  9063. }
  9064. }
  9065. }
  9066. }
  9067. return attributes;
  9068. }
  9069. function onInstruction(instruction) {
  9070. var attributes = {};
  9071. if (instruction.body && (instruction.name.toLowerCase() === 'xml' || options.instructionHasAttributes)) {
  9072. var attrsRegExp = /([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g;
  9073. var match;
  9074. while ((match = attrsRegExp.exec(instruction.body)) !== null) {
  9075. attributes[match[1]] = match[2] || match[3] || match[4];
  9076. }
  9077. attributes = manipulateAttributes(attributes);
  9078. }
  9079. if (instruction.name.toLowerCase() === 'xml') {
  9080. if (options.ignoreDeclaration) {
  9081. return;
  9082. }
  9083. currentElement[options.declarationKey] = {};
  9084. if (Object.keys(attributes).length) {
  9085. currentElement[options.declarationKey][options.attributesKey] = attributes;
  9086. }
  9087. if (options.addParent) {
  9088. currentElement[options.declarationKey][options.parentKey] = currentElement;
  9089. }
  9090. } else {
  9091. if (options.ignoreInstruction) {
  9092. return;
  9093. }
  9094. if (options.trim) {
  9095. instruction.body = instruction.body.trim();
  9096. }
  9097. var value = {};
  9098. if (options.instructionHasAttributes && Object.keys(attributes).length) {
  9099. value[instruction.name] = {};
  9100. value[instruction.name][options.attributesKey] = attributes;
  9101. } else {
  9102. value[instruction.name] = instruction.body;
  9103. }
  9104. addField('instruction', value);
  9105. }
  9106. }
  9107. function onStartElement(name, attributes) {
  9108. var element;
  9109. if (typeof name === 'object') {
  9110. attributes = name.attributes;
  9111. name = name.name;
  9112. }
  9113. attributes = manipulateAttributes(attributes);
  9114. if ('elementNameFn' in options) {
  9115. name = options.elementNameFn(name, currentElement);
  9116. }
  9117. if (options.compact) {
  9118. element = {};
  9119. if (!options.ignoreAttributes && attributes && Object.keys(attributes).length) {
  9120. element[options.attributesKey] = {};
  9121. var key;
  9122. for (key in attributes) {
  9123. if (attributes.hasOwnProperty(key)) {
  9124. element[options.attributesKey][key] = attributes[key];
  9125. }
  9126. }
  9127. }
  9128. if (!(name in currentElement) && (isArray(options.alwaysArray) ? options.alwaysArray.indexOf(name) !== -1 : options.alwaysArray)) {
  9129. currentElement[name] = [];
  9130. }
  9131. if (currentElement[name] && !isArray(currentElement[name])) {
  9132. currentElement[name] = [currentElement[name]];
  9133. }
  9134. if (isArray(currentElement[name])) {
  9135. currentElement[name].push(element);
  9136. } else {
  9137. currentElement[name] = element;
  9138. }
  9139. } else {
  9140. if (!currentElement[options.elementsKey]) {
  9141. currentElement[options.elementsKey] = [];
  9142. }
  9143. element = {};
  9144. element[options.typeKey] = 'element';
  9145. element[options.nameKey] = name;
  9146. if (!options.ignoreAttributes && attributes && Object.keys(attributes).length) {
  9147. element[options.attributesKey] = attributes;
  9148. }
  9149. if (options.alwaysChildren) {
  9150. element[options.elementsKey] = [];
  9151. }
  9152. currentElement[options.elementsKey].push(element);
  9153. }
  9154. element[options.parentKey] = currentElement; // will be deleted in onEndElement() if !options.addParent
  9155. currentElement = element;
  9156. }
  9157. function onText(text) {
  9158. if (options.ignoreText) {
  9159. return;
  9160. }
  9161. if (!text.trim() && !options.captureSpacesBetweenElements) {
  9162. return;
  9163. }
  9164. if (options.trim) {
  9165. text = text.trim();
  9166. }
  9167. if (options.nativeType) {
  9168. text = nativeType(text);
  9169. }
  9170. if (options.sanitize) {
  9171. text = text.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
  9172. }
  9173. addField('text', text);
  9174. }
  9175. function onComment(comment) {
  9176. if (options.ignoreComment) {
  9177. return;
  9178. }
  9179. if (options.trim) {
  9180. comment = comment.trim();
  9181. }
  9182. addField('comment', comment);
  9183. }
  9184. function onEndElement(name) {
  9185. var parentElement = currentElement[options.parentKey];
  9186. if (!options.addParent) {
  9187. delete currentElement[options.parentKey];
  9188. }
  9189. currentElement = parentElement;
  9190. }
  9191. function onCdata(cdata) {
  9192. if (options.ignoreCdata) {
  9193. return;
  9194. }
  9195. if (options.trim) {
  9196. cdata = cdata.trim();
  9197. }
  9198. addField('cdata', cdata);
  9199. }
  9200. function onDoctype(doctype) {
  9201. if (options.ignoreDoctype) {
  9202. return;
  9203. }
  9204. doctype = doctype.replace(/^ /, '');
  9205. if (options.trim) {
  9206. doctype = doctype.trim();
  9207. }
  9208. addField('doctype', doctype);
  9209. }
  9210. function onError(error) {
  9211. error.note = error; //console.error(error);
  9212. }
  9213. module.exports = function (xml, userOptions) {
  9214. var parser = pureJsParser ? sax.parser(true, {}) : parser = new expat.Parser('UTF-8');
  9215. var result = {};
  9216. currentElement = result;
  9217. options = validateOptions(userOptions);
  9218. if (pureJsParser) {
  9219. parser.opt = {
  9220. strictEntities: true
  9221. };
  9222. parser.onopentag = onStartElement;
  9223. parser.ontext = onText;
  9224. parser.oncomment = onComment;
  9225. parser.onclosetag = onEndElement;
  9226. parser.onerror = onError;
  9227. parser.oncdata = onCdata;
  9228. parser.ondoctype = onDoctype;
  9229. parser.onprocessinginstruction = onInstruction;
  9230. } else {
  9231. parser.on('startElement', onStartElement);
  9232. parser.on('text', onText);
  9233. parser.on('comment', onComment);
  9234. parser.on('endElement', onEndElement);
  9235. parser.on('error', onError); //parser.on('startCdata', onStartCdata);
  9236. //parser.on('endCdata', onEndCdata);
  9237. //parser.on('entityDecl', onEntityDecl);
  9238. }
  9239. if (pureJsParser) {
  9240. parser.write(xml).close();
  9241. } else {
  9242. if (!parser.parse(xml)) {
  9243. throw new Error('XML parsing error: ' + parser.getError());
  9244. }
  9245. }
  9246. if (result[options.elementsKey]) {
  9247. var temp = result[options.elementsKey];
  9248. delete result[options.elementsKey];
  9249. result[options.elementsKey] = temp;
  9250. delete result.text;
  9251. }
  9252. return result;
  9253. };
  9254. /***/ }),
  9255. /* 34 */
  9256. /***/ (function(module, exports) {
  9257. var toString = {}.toString;
  9258. module.exports = Array.isArray || function (arr) {
  9259. return toString.call(arr) == '[object Array]';
  9260. };
  9261. /***/ }),
  9262. /* 35 */
  9263. /***/ (function(module, exports, __webpack_require__) {
  9264. "use strict";
  9265. /* WEBPACK VAR INJECTION */(function(global, process) {// Copyright Joyent, Inc. and other Node contributors.
  9266. //
  9267. // Permission is hereby granted, free of charge, to any person obtaining a
  9268. // copy of this software and associated documentation files (the
  9269. // "Software"), to deal in the Software without restriction, including
  9270. // without limitation the rights to use, copy, modify, merge, publish,
  9271. // distribute, sublicense, and/or sell copies of the Software, and to permit
  9272. // persons to whom the Software is furnished to do so, subject to the
  9273. // following conditions:
  9274. //
  9275. // The above copyright notice and this permission notice shall be included
  9276. // in all copies or substantial portions of the Software.
  9277. //
  9278. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  9279. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  9280. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  9281. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  9282. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  9283. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  9284. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  9285. /*<replacement>*/
  9286. var pna = __webpack_require__(17);
  9287. /*</replacement>*/
  9288. module.exports = Readable;
  9289. /*<replacement>*/
  9290. var isArray = __webpack_require__(34);
  9291. /*</replacement>*/
  9292. /*<replacement>*/
  9293. var Duplex;
  9294. /*</replacement>*/
  9295. Readable.ReadableState = ReadableState;
  9296. /*<replacement>*/
  9297. var EE = __webpack_require__(8).EventEmitter;
  9298. var EElistenerCount = function EElistenerCount(emitter, type) {
  9299. return emitter.listeners(type).length;
  9300. };
  9301. /*</replacement>*/
  9302. /*<replacement>*/
  9303. var Stream = __webpack_require__(36);
  9304. /*</replacement>*/
  9305. /*<replacement>*/
  9306. var Buffer = __webpack_require__(27).Buffer;
  9307. var OurUint8Array = global.Uint8Array || function () {};
  9308. function _uint8ArrayToBuffer(chunk) {
  9309. return Buffer.from(chunk);
  9310. }
  9311. function _isUint8Array(obj) {
  9312. return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
  9313. }
  9314. /*</replacement>*/
  9315. /*<replacement>*/
  9316. var util = __webpack_require__(15);
  9317. util.inherits = __webpack_require__(11);
  9318. /*</replacement>*/
  9319. /*<replacement>*/
  9320. var debugUtil = __webpack_require__(61);
  9321. var debug = void 0;
  9322. if (debugUtil && debugUtil.debuglog) {
  9323. debug = debugUtil.debuglog('stream');
  9324. } else {
  9325. debug = function debug() {};
  9326. }
  9327. /*</replacement>*/
  9328. var BufferList = __webpack_require__(62);
  9329. var destroyImpl = __webpack_require__(37);
  9330. var StringDecoder;
  9331. util.inherits(Readable, Stream);
  9332. var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
  9333. function prependListener(emitter, event, fn) {
  9334. // Sadly this is not cacheable as some libraries bundle their own
  9335. // event emitter implementation with them.
  9336. if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); // This is a hack to make sure that our error handler is attached before any
  9337. // userland ones. NEVER DO THIS. This is here only because this code needs
  9338. // to continue to work with older versions of Node.js that do not include
  9339. // the prependListener() method. The goal is to eventually remove this hack.
  9340. if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
  9341. }
  9342. function ReadableState(options, stream) {
  9343. Duplex = Duplex || __webpack_require__(7);
  9344. options = options || {}; // Duplex streams are both readable and writable, but share
  9345. // the same options object.
  9346. // However, some cases require setting options to different
  9347. // values for the readable and the writable sides of the duplex stream.
  9348. // These options can be provided separately as readableXXX and writableXXX.
  9349. var isDuplex = stream instanceof Duplex; // object stream flag. Used to make read(n) ignore n and to
  9350. // make all the buffer merging and length checks go away
  9351. this.objectMode = !!options.objectMode;
  9352. if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; // the point at which it stops calling _read() to fill the buffer
  9353. // Note: 0 is a valid value, means "don't call _read preemptively ever"
  9354. var hwm = options.highWaterMark;
  9355. var readableHwm = options.readableHighWaterMark;
  9356. var defaultHwm = this.objectMode ? 16 : 16 * 1024;
  9357. if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm; // cast to ints.
  9358. this.highWaterMark = Math.floor(this.highWaterMark); // A linked list is used to store data chunks instead of an array because the
  9359. // linked list can remove elements from the beginning faster than
  9360. // array.shift()
  9361. this.buffer = new BufferList();
  9362. this.length = 0;
  9363. this.pipes = null;
  9364. this.pipesCount = 0;
  9365. this.flowing = null;
  9366. this.ended = false;
  9367. this.endEmitted = false;
  9368. this.reading = false; // a flag to be able to tell if the event 'readable'/'data' is emitted
  9369. // immediately, or on a later tick. We set this to true at first, because
  9370. // any actions that shouldn't happen until "later" should generally also
  9371. // not happen before the first read call.
  9372. this.sync = true; // whenever we return null, then we set a flag to say
  9373. // that we're awaiting a 'readable' event emission.
  9374. this.needReadable = false;
  9375. this.emittedReadable = false;
  9376. this.readableListening = false;
  9377. this.resumeScheduled = false; // has it been destroyed
  9378. this.destroyed = false; // Crypto is kind of old and crusty. Historically, its default string
  9379. // encoding is 'binary' so we have to make this configurable.
  9380. // Everything else in the universe uses 'utf8', though.
  9381. this.defaultEncoding = options.defaultEncoding || 'utf8'; // the number of writers that are awaiting a drain event in .pipe()s
  9382. this.awaitDrain = 0; // if true, a maybeReadMore has been scheduled
  9383. this.readingMore = false;
  9384. this.decoder = null;
  9385. this.encoding = null;
  9386. if (options.encoding) {
  9387. if (!StringDecoder) StringDecoder = __webpack_require__(29).StringDecoder;
  9388. this.decoder = new StringDecoder(options.encoding);
  9389. this.encoding = options.encoding;
  9390. }
  9391. }
  9392. function Readable(options) {
  9393. Duplex = Duplex || __webpack_require__(7);
  9394. if (!(this instanceof Readable)) return new Readable(options);
  9395. this._readableState = new ReadableState(options, this); // legacy
  9396. this.readable = true;
  9397. if (options) {
  9398. if (typeof options.read === 'function') this._read = options.read;
  9399. if (typeof options.destroy === 'function') this._destroy = options.destroy;
  9400. }
  9401. Stream.call(this);
  9402. }
  9403. Object.defineProperty(Readable.prototype, 'destroyed', {
  9404. get: function get() {
  9405. if (this._readableState === undefined) {
  9406. return false;
  9407. }
  9408. return this._readableState.destroyed;
  9409. },
  9410. set: function set(value) {
  9411. // we ignore the value if the stream
  9412. // has not been initialized yet
  9413. if (!this._readableState) {
  9414. return;
  9415. } // backward compatibility, the user is explicitly
  9416. // managing destroyed
  9417. this._readableState.destroyed = value;
  9418. }
  9419. });
  9420. Readable.prototype.destroy = destroyImpl.destroy;
  9421. Readable.prototype._undestroy = destroyImpl.undestroy;
  9422. Readable.prototype._destroy = function (err, cb) {
  9423. this.push(null);
  9424. cb(err);
  9425. }; // Manually shove something into the read() buffer.
  9426. // This returns true if the highWaterMark has not been hit yet,
  9427. // similar to how Writable.write() returns true if you should
  9428. // write() some more.
  9429. Readable.prototype.push = function (chunk, encoding) {
  9430. var state = this._readableState;
  9431. var skipChunkCheck;
  9432. if (!state.objectMode) {
  9433. if (typeof chunk === 'string') {
  9434. encoding = encoding || state.defaultEncoding;
  9435. if (encoding !== state.encoding) {
  9436. chunk = Buffer.from(chunk, encoding);
  9437. encoding = '';
  9438. }
  9439. skipChunkCheck = true;
  9440. }
  9441. } else {
  9442. skipChunkCheck = true;
  9443. }
  9444. return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
  9445. }; // Unshift should *always* be something directly out of read()
  9446. Readable.prototype.unshift = function (chunk) {
  9447. return readableAddChunk(this, chunk, null, true, false);
  9448. };
  9449. function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
  9450. var state = stream._readableState;
  9451. if (chunk === null) {
  9452. state.reading = false;
  9453. onEofChunk(stream, state);
  9454. } else {
  9455. var er;
  9456. if (!skipChunkCheck) er = chunkInvalid(state, chunk);
  9457. if (er) {
  9458. stream.emit('error', er);
  9459. } else if (state.objectMode || chunk && chunk.length > 0) {
  9460. if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
  9461. chunk = _uint8ArrayToBuffer(chunk);
  9462. }
  9463. if (addToFront) {
  9464. if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
  9465. } else if (state.ended) {
  9466. stream.emit('error', new Error('stream.push() after EOF'));
  9467. } else {
  9468. state.reading = false;
  9469. if (state.decoder && !encoding) {
  9470. chunk = state.decoder.write(chunk);
  9471. if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
  9472. } else {
  9473. addChunk(stream, state, chunk, false);
  9474. }
  9475. }
  9476. } else if (!addToFront) {
  9477. state.reading = false;
  9478. }
  9479. }
  9480. return needMoreData(state);
  9481. }
  9482. function addChunk(stream, state, chunk, addToFront) {
  9483. if (state.flowing && state.length === 0 && !state.sync) {
  9484. stream.emit('data', chunk);
  9485. stream.read(0);
  9486. } else {
  9487. // update the buffer info.
  9488. state.length += state.objectMode ? 1 : chunk.length;
  9489. if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
  9490. if (state.needReadable) emitReadable(stream);
  9491. }
  9492. maybeReadMore(stream, state);
  9493. }
  9494. function chunkInvalid(state, chunk) {
  9495. var er;
  9496. if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
  9497. er = new TypeError('Invalid non-string/buffer chunk');
  9498. }
  9499. return er;
  9500. } // if it's past the high water mark, we can push in some more.
  9501. // Also, if we have no data yet, we can stand some
  9502. // more bytes. This is to work around cases where hwm=0,
  9503. // such as the repl. Also, if the push() triggered a
  9504. // readable event, and the user called read(largeNumber) such that
  9505. // needReadable was set, then we ought to push more, so that another
  9506. // 'readable' event will be triggered.
  9507. function needMoreData(state) {
  9508. return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
  9509. }
  9510. Readable.prototype.isPaused = function () {
  9511. return this._readableState.flowing === false;
  9512. }; // backwards compatibility.
  9513. Readable.prototype.setEncoding = function (enc) {
  9514. if (!StringDecoder) StringDecoder = __webpack_require__(29).StringDecoder;
  9515. this._readableState.decoder = new StringDecoder(enc);
  9516. this._readableState.encoding = enc;
  9517. return this;
  9518. }; // Don't raise the hwm > 8MB
  9519. var MAX_HWM = 0x800000;
  9520. function computeNewHighWaterMark(n) {
  9521. if (n >= MAX_HWM) {
  9522. n = MAX_HWM;
  9523. } else {
  9524. // Get the next highest power of 2 to prevent increasing hwm excessively in
  9525. // tiny amounts
  9526. n--;
  9527. n |= n >>> 1;
  9528. n |= n >>> 2;
  9529. n |= n >>> 4;
  9530. n |= n >>> 8;
  9531. n |= n >>> 16;
  9532. n++;
  9533. }
  9534. return n;
  9535. } // This function is designed to be inlinable, so please take care when making
  9536. // changes to the function body.
  9537. function howMuchToRead(n, state) {
  9538. if (n <= 0 || state.length === 0 && state.ended) return 0;
  9539. if (state.objectMode) return 1;
  9540. if (n !== n) {
  9541. // Only flow one buffer at a time
  9542. if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
  9543. } // If we're asking for more than the current hwm, then raise the hwm.
  9544. if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
  9545. if (n <= state.length) return n; // Don't have enough
  9546. if (!state.ended) {
  9547. state.needReadable = true;
  9548. return 0;
  9549. }
  9550. return state.length;
  9551. } // you can override either this method, or the async _read(n) below.
  9552. Readable.prototype.read = function (n) {
  9553. debug('read', n);
  9554. n = parseInt(n, 10);
  9555. var state = this._readableState;
  9556. var nOrig = n;
  9557. if (n !== 0) state.emittedReadable = false; // if we're doing read(0) to trigger a readable event, but we
  9558. // already have a bunch of data in the buffer, then just trigger
  9559. // the 'readable' event and move on.
  9560. if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
  9561. debug('read: emitReadable', state.length, state.ended);
  9562. if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
  9563. return null;
  9564. }
  9565. n = howMuchToRead(n, state); // if we've ended, and we're now clear, then finish it up.
  9566. if (n === 0 && state.ended) {
  9567. if (state.length === 0) endReadable(this);
  9568. return null;
  9569. } // All the actual chunk generation logic needs to be
  9570. // *below* the call to _read. The reason is that in certain
  9571. // synthetic stream cases, such as passthrough streams, _read
  9572. // may be a completely synchronous operation which may change
  9573. // the state of the read buffer, providing enough data when
  9574. // before there was *not* enough.
  9575. //
  9576. // So, the steps are:
  9577. // 1. Figure out what the state of things will be after we do
  9578. // a read from the buffer.
  9579. //
  9580. // 2. If that resulting state will trigger a _read, then call _read.
  9581. // Note that this may be asynchronous, or synchronous. Yes, it is
  9582. // deeply ugly to write APIs this way, but that still doesn't mean
  9583. // that the Readable class should behave improperly, as streams are
  9584. // designed to be sync/async agnostic.
  9585. // Take note if the _read call is sync or async (ie, if the read call
  9586. // has returned yet), so that we know whether or not it's safe to emit
  9587. // 'readable' etc.
  9588. //
  9589. // 3. Actually pull the requested chunks out of the buffer and return.
  9590. // if we need a readable event, then we need to do some reading.
  9591. var doRead = state.needReadable;
  9592. debug('need readable', doRead); // if we currently have less than the highWaterMark, then also read some
  9593. if (state.length === 0 || state.length - n < state.highWaterMark) {
  9594. doRead = true;
  9595. debug('length less than watermark', doRead);
  9596. } // however, if we've ended, then there's no point, and if we're already
  9597. // reading, then it's unnecessary.
  9598. if (state.ended || state.reading) {
  9599. doRead = false;
  9600. debug('reading or ended', doRead);
  9601. } else if (doRead) {
  9602. debug('do read');
  9603. state.reading = true;
  9604. state.sync = true; // if the length is currently zero, then we *need* a readable event.
  9605. if (state.length === 0) state.needReadable = true; // call internal read method
  9606. this._read(state.highWaterMark);
  9607. state.sync = false; // If _read pushed data synchronously, then `reading` will be false,
  9608. // and we need to re-evaluate how much data we can return to the user.
  9609. if (!state.reading) n = howMuchToRead(nOrig, state);
  9610. }
  9611. var ret;
  9612. if (n > 0) ret = fromList(n, state);else ret = null;
  9613. if (ret === null) {
  9614. state.needReadable = true;
  9615. n = 0;
  9616. } else {
  9617. state.length -= n;
  9618. }
  9619. if (state.length === 0) {
  9620. // If we have nothing in the buffer, then we want to know
  9621. // as soon as we *do* get something into the buffer.
  9622. if (!state.ended) state.needReadable = true; // If we tried to read() past the EOF, then emit end on the next tick.
  9623. if (nOrig !== n && state.ended) endReadable(this);
  9624. }
  9625. if (ret !== null) this.emit('data', ret);
  9626. return ret;
  9627. };
  9628. function onEofChunk(stream, state) {
  9629. if (state.ended) return;
  9630. if (state.decoder) {
  9631. var chunk = state.decoder.end();
  9632. if (chunk && chunk.length) {
  9633. state.buffer.push(chunk);
  9634. state.length += state.objectMode ? 1 : chunk.length;
  9635. }
  9636. }
  9637. state.ended = true; // emit 'readable' now to make sure it gets picked up.
  9638. emitReadable(stream);
  9639. } // Don't emit readable right away in sync mode, because this can trigger
  9640. // another read() call => stack overflow. This way, it might trigger
  9641. // a nextTick recursion warning, but that's not so bad.
  9642. function emitReadable(stream) {
  9643. var state = stream._readableState;
  9644. state.needReadable = false;
  9645. if (!state.emittedReadable) {
  9646. debug('emitReadable', state.flowing);
  9647. state.emittedReadable = true;
  9648. if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);
  9649. }
  9650. }
  9651. function emitReadable_(stream) {
  9652. debug('emit readable');
  9653. stream.emit('readable');
  9654. flow(stream);
  9655. } // at this point, the user has presumably seen the 'readable' event,
  9656. // and called read() to consume some data. that may have triggered
  9657. // in turn another _read(n) call, in which case reading = true if
  9658. // it's in progress.
  9659. // However, if we're not ended, or reading, and the length < hwm,
  9660. // then go ahead and try to read some more preemptively.
  9661. function maybeReadMore(stream, state) {
  9662. if (!state.readingMore) {
  9663. state.readingMore = true;
  9664. pna.nextTick(maybeReadMore_, stream, state);
  9665. }
  9666. }
  9667. function maybeReadMore_(stream, state) {
  9668. var len = state.length;
  9669. while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
  9670. debug('maybeReadMore read 0');
  9671. stream.read(0);
  9672. if (len === state.length) // didn't get any data, stop spinning.
  9673. break;else len = state.length;
  9674. }
  9675. state.readingMore = false;
  9676. } // abstract method. to be overridden in specific implementation classes.
  9677. // call cb(er, data) where data is <= n in length.
  9678. // for virtual (non-string, non-buffer) streams, "length" is somewhat
  9679. // arbitrary, and perhaps not very meaningful.
  9680. Readable.prototype._read = function (n) {
  9681. this.emit('error', new Error('_read() is not implemented'));
  9682. };
  9683. Readable.prototype.pipe = function (dest, pipeOpts) {
  9684. var src = this;
  9685. var state = this._readableState;
  9686. switch (state.pipesCount) {
  9687. case 0:
  9688. state.pipes = dest;
  9689. break;
  9690. case 1:
  9691. state.pipes = [state.pipes, dest];
  9692. break;
  9693. default:
  9694. state.pipes.push(dest);
  9695. break;
  9696. }
  9697. state.pipesCount += 1;
  9698. debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
  9699. var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
  9700. var endFn = doEnd ? onend : unpipe;
  9701. if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);
  9702. dest.on('unpipe', onunpipe);
  9703. function onunpipe(readable, unpipeInfo) {
  9704. debug('onunpipe');
  9705. if (readable === src) {
  9706. if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
  9707. unpipeInfo.hasUnpiped = true;
  9708. cleanup();
  9709. }
  9710. }
  9711. }
  9712. function onend() {
  9713. debug('onend');
  9714. dest.end();
  9715. } // when the dest drains, it reduces the awaitDrain counter
  9716. // on the source. This would be more elegant with a .once()
  9717. // handler in flow(), but adding and removing repeatedly is
  9718. // too slow.
  9719. var ondrain = pipeOnDrain(src);
  9720. dest.on('drain', ondrain);
  9721. var cleanedUp = false;
  9722. function cleanup() {
  9723. debug('cleanup'); // cleanup event handlers once the pipe is broken
  9724. dest.removeListener('close', onclose);
  9725. dest.removeListener('finish', onfinish);
  9726. dest.removeListener('drain', ondrain);
  9727. dest.removeListener('error', onerror);
  9728. dest.removeListener('unpipe', onunpipe);
  9729. src.removeListener('end', onend);
  9730. src.removeListener('end', unpipe);
  9731. src.removeListener('data', ondata);
  9732. cleanedUp = true; // if the reader is waiting for a drain event from this
  9733. // specific writer, then it would cause it to never start
  9734. // flowing again.
  9735. // So, if this is awaiting a drain, then we just call it now.
  9736. // If we don't know, then assume that we are waiting for one.
  9737. if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
  9738. } // If the user pushes more data while we're writing to dest then we'll end up
  9739. // in ondata again. However, we only want to increase awaitDrain once because
  9740. // dest will only emit one 'drain' event for the multiple writes.
  9741. // => Introduce a guard on increasing awaitDrain.
  9742. var increasedAwaitDrain = false;
  9743. src.on('data', ondata);
  9744. function ondata(chunk) {
  9745. debug('ondata');
  9746. increasedAwaitDrain = false;
  9747. var ret = dest.write(chunk);
  9748. if (false === ret && !increasedAwaitDrain) {
  9749. // If the user unpiped during `dest.write()`, it is possible
  9750. // to get stuck in a permanently paused state if that write
  9751. // also returned false.
  9752. // => Check whether `dest` is still a piping destination.
  9753. if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
  9754. debug('false write response, pause', src._readableState.awaitDrain);
  9755. src._readableState.awaitDrain++;
  9756. increasedAwaitDrain = true;
  9757. }
  9758. src.pause();
  9759. }
  9760. } // if the dest has an error, then stop piping into it.
  9761. // however, don't suppress the throwing behavior for this.
  9762. function onerror(er) {
  9763. debug('onerror', er);
  9764. unpipe();
  9765. dest.removeListener('error', onerror);
  9766. if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
  9767. } // Make sure our error handler is attached before userland ones.
  9768. prependListener(dest, 'error', onerror); // Both close and finish should trigger unpipe, but only once.
  9769. function onclose() {
  9770. dest.removeListener('finish', onfinish);
  9771. unpipe();
  9772. }
  9773. dest.once('close', onclose);
  9774. function onfinish() {
  9775. debug('onfinish');
  9776. dest.removeListener('close', onclose);
  9777. unpipe();
  9778. }
  9779. dest.once('finish', onfinish);
  9780. function unpipe() {
  9781. debug('unpipe');
  9782. src.unpipe(dest);
  9783. } // tell the dest that it's being piped to
  9784. dest.emit('pipe', src); // start the flow if it hasn't been started already.
  9785. if (!state.flowing) {
  9786. debug('pipe resume');
  9787. src.resume();
  9788. }
  9789. return dest;
  9790. };
  9791. function pipeOnDrain(src) {
  9792. return function () {
  9793. var state = src._readableState;
  9794. debug('pipeOnDrain', state.awaitDrain);
  9795. if (state.awaitDrain) state.awaitDrain--;
  9796. if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
  9797. state.flowing = true;
  9798. flow(src);
  9799. }
  9800. };
  9801. }
  9802. Readable.prototype.unpipe = function (dest) {
  9803. var state = this._readableState;
  9804. var unpipeInfo = {
  9805. hasUnpiped: false
  9806. }; // if we're not piping anywhere, then do nothing.
  9807. if (state.pipesCount === 0) return this; // just one destination. most common case.
  9808. if (state.pipesCount === 1) {
  9809. // passed in one, but it's not the right one.
  9810. if (dest && dest !== state.pipes) return this;
  9811. if (!dest) dest = state.pipes; // got a match.
  9812. state.pipes = null;
  9813. state.pipesCount = 0;
  9814. state.flowing = false;
  9815. if (dest) dest.emit('unpipe', this, unpipeInfo);
  9816. return this;
  9817. } // slow case. multiple pipe destinations.
  9818. if (!dest) {
  9819. // remove all.
  9820. var dests = state.pipes;
  9821. var len = state.pipesCount;
  9822. state.pipes = null;
  9823. state.pipesCount = 0;
  9824. state.flowing = false;
  9825. for (var i = 0; i < len; i++) {
  9826. dests[i].emit('unpipe', this, unpipeInfo);
  9827. }
  9828. return this;
  9829. } // try to find the right one.
  9830. var index = indexOf(state.pipes, dest);
  9831. if (index === -1) return this;
  9832. state.pipes.splice(index, 1);
  9833. state.pipesCount -= 1;
  9834. if (state.pipesCount === 1) state.pipes = state.pipes[0];
  9835. dest.emit('unpipe', this, unpipeInfo);
  9836. return this;
  9837. }; // set up data events if they are asked for
  9838. // Ensure readable listeners eventually get something
  9839. Readable.prototype.on = function (ev, fn) {
  9840. var res = Stream.prototype.on.call(this, ev, fn);
  9841. if (ev === 'data') {
  9842. // Start flowing on next tick if stream isn't explicitly paused
  9843. if (this._readableState.flowing !== false) this.resume();
  9844. } else if (ev === 'readable') {
  9845. var state = this._readableState;
  9846. if (!state.endEmitted && !state.readableListening) {
  9847. state.readableListening = state.needReadable = true;
  9848. state.emittedReadable = false;
  9849. if (!state.reading) {
  9850. pna.nextTick(nReadingNextTick, this);
  9851. } else if (state.length) {
  9852. emitReadable(this);
  9853. }
  9854. }
  9855. }
  9856. return res;
  9857. };
  9858. Readable.prototype.addListener = Readable.prototype.on;
  9859. function nReadingNextTick(self) {
  9860. debug('readable nexttick read 0');
  9861. self.read(0);
  9862. } // pause() and resume() are remnants of the legacy readable stream API
  9863. // If the user uses them, then switch into old mode.
  9864. Readable.prototype.resume = function () {
  9865. var state = this._readableState;
  9866. if (!state.flowing) {
  9867. debug('resume');
  9868. state.flowing = true;
  9869. resume(this, state);
  9870. }
  9871. return this;
  9872. };
  9873. function resume(stream, state) {
  9874. if (!state.resumeScheduled) {
  9875. state.resumeScheduled = true;
  9876. pna.nextTick(resume_, stream, state);
  9877. }
  9878. }
  9879. function resume_(stream, state) {
  9880. if (!state.reading) {
  9881. debug('resume read 0');
  9882. stream.read(0);
  9883. }
  9884. state.resumeScheduled = false;
  9885. state.awaitDrain = 0;
  9886. stream.emit('resume');
  9887. flow(stream);
  9888. if (state.flowing && !state.reading) stream.read(0);
  9889. }
  9890. Readable.prototype.pause = function () {
  9891. debug('call pause flowing=%j', this._readableState.flowing);
  9892. if (false !== this._readableState.flowing) {
  9893. debug('pause');
  9894. this._readableState.flowing = false;
  9895. this.emit('pause');
  9896. }
  9897. return this;
  9898. };
  9899. function flow(stream) {
  9900. var state = stream._readableState;
  9901. debug('flow', state.flowing);
  9902. while (state.flowing && stream.read() !== null) {}
  9903. } // wrap an old-style stream as the async data source.
  9904. // This is *not* part of the readable stream interface.
  9905. // It is an ugly unfortunate mess of history.
  9906. Readable.prototype.wrap = function (stream) {
  9907. var _this = this;
  9908. var state = this._readableState;
  9909. var paused = false;
  9910. stream.on('end', function () {
  9911. debug('wrapped end');
  9912. if (state.decoder && !state.ended) {
  9913. var chunk = state.decoder.end();
  9914. if (chunk && chunk.length) _this.push(chunk);
  9915. }
  9916. _this.push(null);
  9917. });
  9918. stream.on('data', function (chunk) {
  9919. debug('wrapped data');
  9920. if (state.decoder) chunk = state.decoder.write(chunk); // don't skip over falsy values in objectMode
  9921. if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
  9922. var ret = _this.push(chunk);
  9923. if (!ret) {
  9924. paused = true;
  9925. stream.pause();
  9926. }
  9927. }); // proxy all the other methods.
  9928. // important when wrapping filters and duplexes.
  9929. for (var i in stream) {
  9930. if (this[i] === undefined && typeof stream[i] === 'function') {
  9931. this[i] = function (method) {
  9932. return function () {
  9933. return stream[method].apply(stream, arguments);
  9934. };
  9935. }(i);
  9936. }
  9937. } // proxy certain important events.
  9938. for (var n = 0; n < kProxyEvents.length; n++) {
  9939. stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
  9940. } // when we try to consume some more bytes, simply unpause the
  9941. // underlying stream.
  9942. this._read = function (n) {
  9943. debug('wrapped _read', n);
  9944. if (paused) {
  9945. paused = false;
  9946. stream.resume();
  9947. }
  9948. };
  9949. return this;
  9950. };
  9951. Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
  9952. // making it explicit this property is not enumerable
  9953. // because otherwise some prototype manipulation in
  9954. // userland will fail
  9955. enumerable: false,
  9956. get: function get() {
  9957. return this._readableState.highWaterMark;
  9958. }
  9959. }); // exposed for testing purposes only.
  9960. Readable._fromList = fromList; // Pluck off n bytes from an array of buffers.
  9961. // Length is the combined lengths of all the buffers in the list.
  9962. // This function is designed to be inlinable, so please take care when making
  9963. // changes to the function body.
  9964. function fromList(n, state) {
  9965. // nothing buffered
  9966. if (state.length === 0) return null;
  9967. var ret;
  9968. if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
  9969. // read it all, truncate the list
  9970. if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
  9971. state.buffer.clear();
  9972. } else {
  9973. // read part of list
  9974. ret = fromListPartial(n, state.buffer, state.decoder);
  9975. }
  9976. return ret;
  9977. } // Extracts only enough buffered data to satisfy the amount requested.
  9978. // This function is designed to be inlinable, so please take care when making
  9979. // changes to the function body.
  9980. function fromListPartial(n, list, hasStrings) {
  9981. var ret;
  9982. if (n < list.head.data.length) {
  9983. // slice is the same for buffers and strings
  9984. ret = list.head.data.slice(0, n);
  9985. list.head.data = list.head.data.slice(n);
  9986. } else if (n === list.head.data.length) {
  9987. // first chunk is a perfect match
  9988. ret = list.shift();
  9989. } else {
  9990. // result spans more than one buffer
  9991. ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
  9992. }
  9993. return ret;
  9994. } // Copies a specified amount of characters from the list of buffered data
  9995. // chunks.
  9996. // This function is designed to be inlinable, so please take care when making
  9997. // changes to the function body.
  9998. function copyFromBufferString(n, list) {
  9999. var p = list.head;
  10000. var c = 1;
  10001. var ret = p.data;
  10002. n -= ret.length;
  10003. while (p = p.next) {
  10004. var str = p.data;
  10005. var nb = n > str.length ? str.length : n;
  10006. if (nb === str.length) ret += str;else ret += str.slice(0, n);
  10007. n -= nb;
  10008. if (n === 0) {
  10009. if (nb === str.length) {
  10010. ++c;
  10011. if (p.next) list.head = p.next;else list.head = list.tail = null;
  10012. } else {
  10013. list.head = p;
  10014. p.data = str.slice(nb);
  10015. }
  10016. break;
  10017. }
  10018. ++c;
  10019. }
  10020. list.length -= c;
  10021. return ret;
  10022. } // Copies a specified amount of bytes from the list of buffered data chunks.
  10023. // This function is designed to be inlinable, so please take care when making
  10024. // changes to the function body.
  10025. function copyFromBuffer(n, list) {
  10026. var ret = Buffer.allocUnsafe(n);
  10027. var p = list.head;
  10028. var c = 1;
  10029. p.data.copy(ret);
  10030. n -= p.data.length;
  10031. while (p = p.next) {
  10032. var buf = p.data;
  10033. var nb = n > buf.length ? buf.length : n;
  10034. buf.copy(ret, ret.length - n, 0, nb);
  10035. n -= nb;
  10036. if (n === 0) {
  10037. if (nb === buf.length) {
  10038. ++c;
  10039. if (p.next) list.head = p.next;else list.head = list.tail = null;
  10040. } else {
  10041. list.head = p;
  10042. p.data = buf.slice(nb);
  10043. }
  10044. break;
  10045. }
  10046. ++c;
  10047. }
  10048. list.length -= c;
  10049. return ret;
  10050. }
  10051. function endReadable(stream) {
  10052. var state = stream._readableState; // If we get here before consuming all the bytes, then that is a
  10053. // bug in node. Should never happen.
  10054. if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
  10055. if (!state.endEmitted) {
  10056. state.ended = true;
  10057. pna.nextTick(endReadableNT, state, stream);
  10058. }
  10059. }
  10060. function endReadableNT(state, stream) {
  10061. // Check that we didn't get one last unshift.
  10062. if (!state.endEmitted && state.length === 0) {
  10063. state.endEmitted = true;
  10064. stream.readable = false;
  10065. stream.emit('end');
  10066. }
  10067. }
  10068. function indexOf(xs, x) {
  10069. for (var i = 0, l = xs.length; i < l; i++) {
  10070. if (xs[i] === x) return i;
  10071. }
  10072. return -1;
  10073. }
  10074. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(5), __webpack_require__(16)))
  10075. /***/ }),
  10076. /* 36 */
  10077. /***/ (function(module, exports, __webpack_require__) {
  10078. module.exports = __webpack_require__(8).EventEmitter;
  10079. /***/ }),
  10080. /* 37 */
  10081. /***/ (function(module, exports, __webpack_require__) {
  10082. "use strict";
  10083. /*<replacement>*/
  10084. var pna = __webpack_require__(17);
  10085. /*</replacement>*/
  10086. // undocumented cb() API, needed for core, not for public API
  10087. function destroy(err, cb) {
  10088. var _this = this;
  10089. var readableDestroyed = this._readableState && this._readableState.destroyed;
  10090. var writableDestroyed = this._writableState && this._writableState.destroyed;
  10091. if (readableDestroyed || writableDestroyed) {
  10092. if (cb) {
  10093. cb(err);
  10094. } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
  10095. pna.nextTick(emitErrorNT, this, err);
  10096. }
  10097. return this;
  10098. } // we set destroyed to true before firing error callbacks in order
  10099. // to make it re-entrance safe in case destroy() is called within callbacks
  10100. if (this._readableState) {
  10101. this._readableState.destroyed = true;
  10102. } // if this is a duplex stream mark the writable part as destroyed as well
  10103. if (this._writableState) {
  10104. this._writableState.destroyed = true;
  10105. }
  10106. this._destroy(err || null, function (err) {
  10107. if (!cb && err) {
  10108. pna.nextTick(emitErrorNT, _this, err);
  10109. if (_this._writableState) {
  10110. _this._writableState.errorEmitted = true;
  10111. }
  10112. } else if (cb) {
  10113. cb(err);
  10114. }
  10115. });
  10116. return this;
  10117. }
  10118. function undestroy() {
  10119. if (this._readableState) {
  10120. this._readableState.destroyed = false;
  10121. this._readableState.reading = false;
  10122. this._readableState.ended = false;
  10123. this._readableState.endEmitted = false;
  10124. }
  10125. if (this._writableState) {
  10126. this._writableState.destroyed = false;
  10127. this._writableState.ended = false;
  10128. this._writableState.ending = false;
  10129. this._writableState.finished = false;
  10130. this._writableState.errorEmitted = false;
  10131. }
  10132. }
  10133. function emitErrorNT(self, err) {
  10134. self.emit('error', err);
  10135. }
  10136. module.exports = {
  10137. destroy: destroy,
  10138. undestroy: undestroy
  10139. };
  10140. /***/ }),
  10141. /* 38 */
  10142. /***/ (function(module, exports, __webpack_require__) {
  10143. "use strict";
  10144. // Copyright Joyent, Inc. and other Node contributors.
  10145. //
  10146. // Permission is hereby granted, free of charge, to any person obtaining a
  10147. // copy of this software and associated documentation files (the
  10148. // "Software"), to deal in the Software without restriction, including
  10149. // without limitation the rights to use, copy, modify, merge, publish,
  10150. // distribute, sublicense, and/or sell copies of the Software, and to permit
  10151. // persons to whom the Software is furnished to do so, subject to the
  10152. // following conditions:
  10153. //
  10154. // The above copyright notice and this permission notice shall be included
  10155. // in all copies or substantial portions of the Software.
  10156. //
  10157. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  10158. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  10159. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  10160. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  10161. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  10162. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  10163. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  10164. // a transform stream is a readable/writable stream where you do
  10165. // something with the data. Sometimes it's called a "filter",
  10166. // but that's not a great name for it, since that implies a thing where
  10167. // some bits pass through, and others are simply ignored. (That would
  10168. // be a valid example of a transform, of course.)
  10169. //
  10170. // While the output is causally related to the input, it's not a
  10171. // necessarily symmetric or synchronous transformation. For example,
  10172. // a zlib stream might take multiple plain-text writes(), and then
  10173. // emit a single compressed chunk some time in the future.
  10174. //
  10175. // Here's how this works:
  10176. //
  10177. // The Transform stream has all the aspects of the readable and writable
  10178. // stream classes. When you write(chunk), that calls _write(chunk,cb)
  10179. // internally, and returns false if there's a lot of pending writes
  10180. // buffered up. When you call read(), that calls _read(n) until
  10181. // there's enough pending readable data buffered up.
  10182. //
  10183. // In a transform stream, the written data is placed in a buffer. When
  10184. // _read(n) is called, it transforms the queued up data, calling the
  10185. // buffered _write cb's as it consumes chunks. If consuming a single
  10186. // written chunk would result in multiple output chunks, then the first
  10187. // outputted bit calls the readcb, and subsequent chunks just go into
  10188. // the read buffer, and will cause it to emit 'readable' if necessary.
  10189. //
  10190. // This way, back-pressure is actually determined by the reading side,
  10191. // since _read has to be called to start processing a new chunk. However,
  10192. // a pathological inflate type of transform can cause excessive buffering
  10193. // here. For example, imagine a stream where every byte of input is
  10194. // interpreted as an integer from 0-255, and then results in that many
  10195. // bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
  10196. // 1kb of data being output. In this case, you could write a very small
  10197. // amount of input, and end up with a very large amount of output. In
  10198. // such a pathological inflating mechanism, there'd be no way to tell
  10199. // the system to stop doing the transform. A single 4MB write could
  10200. // cause the system to run out of memory.
  10201. //
  10202. // However, even in such a pathological case, only a single written chunk
  10203. // would be consumed, and then the rest would wait (un-transformed) until
  10204. // the results of the previous transformed chunk were consumed.
  10205. module.exports = Transform;
  10206. var Duplex = __webpack_require__(7);
  10207. /*<replacement>*/
  10208. var util = __webpack_require__(15);
  10209. util.inherits = __webpack_require__(11);
  10210. /*</replacement>*/
  10211. util.inherits(Transform, Duplex);
  10212. function afterTransform(er, data) {
  10213. var ts = this._transformState;
  10214. ts.transforming = false;
  10215. var cb = ts.writecb;
  10216. if (!cb) {
  10217. return this.emit('error', new Error('write callback called multiple times'));
  10218. }
  10219. ts.writechunk = null;
  10220. ts.writecb = null;
  10221. if (data != null) // single equals check for both `null` and `undefined`
  10222. this.push(data);
  10223. cb(er);
  10224. var rs = this._readableState;
  10225. rs.reading = false;
  10226. if (rs.needReadable || rs.length < rs.highWaterMark) {
  10227. this._read(rs.highWaterMark);
  10228. }
  10229. }
  10230. function Transform(options) {
  10231. if (!(this instanceof Transform)) return new Transform(options);
  10232. Duplex.call(this, options);
  10233. this._transformState = {
  10234. afterTransform: afterTransform.bind(this),
  10235. needTransform: false,
  10236. transforming: false,
  10237. writecb: null,
  10238. writechunk: null,
  10239. writeencoding: null
  10240. }; // start out asking for a readable event once data is transformed.
  10241. this._readableState.needReadable = true; // we have implemented the _read method, and done the other things
  10242. // that Readable wants before the first _read call, so unset the
  10243. // sync guard flag.
  10244. this._readableState.sync = false;
  10245. if (options) {
  10246. if (typeof options.transform === 'function') this._transform = options.transform;
  10247. if (typeof options.flush === 'function') this._flush = options.flush;
  10248. } // When the writable side finishes, then flush out anything remaining.
  10249. this.on('prefinish', prefinish);
  10250. }
  10251. function prefinish() {
  10252. var _this = this;
  10253. if (typeof this._flush === 'function') {
  10254. this._flush(function (er, data) {
  10255. done(_this, er, data);
  10256. });
  10257. } else {
  10258. done(this, null, null);
  10259. }
  10260. }
  10261. Transform.prototype.push = function (chunk, encoding) {
  10262. this._transformState.needTransform = false;
  10263. return Duplex.prototype.push.call(this, chunk, encoding);
  10264. }; // This is the part where you do stuff!
  10265. // override this function in implementation classes.
  10266. // 'chunk' is an input chunk.
  10267. //
  10268. // Call `push(newChunk)` to pass along transformed output
  10269. // to the readable side. You may call 'push' zero or more times.
  10270. //
  10271. // Call `cb(err)` when you are done with this chunk. If you pass
  10272. // an error, then that'll put the hurt on the whole operation. If you
  10273. // never call cb(), then you'll never get another chunk.
  10274. Transform.prototype._transform = function (chunk, encoding, cb) {
  10275. throw new Error('_transform() is not implemented');
  10276. };
  10277. Transform.prototype._write = function (chunk, encoding, cb) {
  10278. var ts = this._transformState;
  10279. ts.writecb = cb;
  10280. ts.writechunk = chunk;
  10281. ts.writeencoding = encoding;
  10282. if (!ts.transforming) {
  10283. var rs = this._readableState;
  10284. if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
  10285. }
  10286. }; // Doesn't matter what the args are here.
  10287. // _transform does all the work.
  10288. // That we got here means that the readable side wants more data.
  10289. Transform.prototype._read = function (n) {
  10290. var ts = this._transformState;
  10291. if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
  10292. ts.transforming = true;
  10293. this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
  10294. } else {
  10295. // mark that we need a transform, so that any data that comes in
  10296. // will get processed, now that we've asked for it.
  10297. ts.needTransform = true;
  10298. }
  10299. };
  10300. Transform.prototype._destroy = function (err, cb) {
  10301. var _this2 = this;
  10302. Duplex.prototype._destroy.call(this, err, function (err2) {
  10303. cb(err2);
  10304. _this2.emit('close');
  10305. });
  10306. };
  10307. function done(stream, er, data) {
  10308. if (er) return stream.emit('error', er);
  10309. if (data != null) // single equals check for both `null` and `undefined`
  10310. stream.push(data); // if there's nothing in the write buffer, then that means
  10311. // that nothing more will ever be provided
  10312. if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');
  10313. if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');
  10314. return stream.push(null);
  10315. }
  10316. /***/ }),
  10317. /* 39 */
  10318. /***/ (function(module, exports, __webpack_require__) {
  10319. var helper = __webpack_require__(30);
  10320. var isArray = __webpack_require__(31).isArray;
  10321. var currentElement, currentElementName;
  10322. function validateOptions(userOptions) {
  10323. var options = helper.copyOptions(userOptions);
  10324. helper.ensureFlagExists('ignoreDeclaration', options);
  10325. helper.ensureFlagExists('ignoreInstruction', options);
  10326. helper.ensureFlagExists('ignoreAttributes', options);
  10327. helper.ensureFlagExists('ignoreText', options);
  10328. helper.ensureFlagExists('ignoreComment', options);
  10329. helper.ensureFlagExists('ignoreCdata', options);
  10330. helper.ensureFlagExists('ignoreDoctype', options);
  10331. helper.ensureFlagExists('compact', options);
  10332. helper.ensureFlagExists('indentText', options);
  10333. helper.ensureFlagExists('indentCdata', options);
  10334. helper.ensureFlagExists('indentAttributes', options);
  10335. helper.ensureFlagExists('indentInstruction', options);
  10336. helper.ensureFlagExists('fullTagEmptyElement', options);
  10337. helper.ensureFlagExists('noQuotesForNativeAttributes', options);
  10338. helper.ensureSpacesExists(options);
  10339. if (typeof options.spaces === 'number') {
  10340. options.spaces = Array(options.spaces + 1).join(' ');
  10341. }
  10342. helper.ensureKeyExists('declaration', options);
  10343. helper.ensureKeyExists('instruction', options);
  10344. helper.ensureKeyExists('attributes', options);
  10345. helper.ensureKeyExists('text', options);
  10346. helper.ensureKeyExists('comment', options);
  10347. helper.ensureKeyExists('cdata', options);
  10348. helper.ensureKeyExists('doctype', options);
  10349. helper.ensureKeyExists('type', options);
  10350. helper.ensureKeyExists('name', options);
  10351. helper.ensureKeyExists('elements', options);
  10352. helper.checkFnExists('doctype', options);
  10353. helper.checkFnExists('instruction', options);
  10354. helper.checkFnExists('cdata', options);
  10355. helper.checkFnExists('comment', options);
  10356. helper.checkFnExists('text', options);
  10357. helper.checkFnExists('instructionName', options);
  10358. helper.checkFnExists('elementName', options);
  10359. helper.checkFnExists('attributeName', options);
  10360. helper.checkFnExists('attributeValue', options);
  10361. helper.checkFnExists('attributes', options);
  10362. helper.checkFnExists('fullTagEmptyElement', options);
  10363. return options;
  10364. }
  10365. function writeIndentation(options, depth, firstLine) {
  10366. return (!firstLine && options.spaces ? '\n' : '') + Array(depth + 1).join(options.spaces);
  10367. }
  10368. function writeAttributes(attributes, options, depth) {
  10369. if (options.ignoreAttributes) {
  10370. return '';
  10371. }
  10372. if ('attributesFn' in options) {
  10373. attributes = options.attributesFn(attributes, currentElementName, currentElement);
  10374. }
  10375. var key,
  10376. attr,
  10377. attrName,
  10378. quote,
  10379. result = [];
  10380. for (key in attributes) {
  10381. if (attributes.hasOwnProperty(key) && attributes[key] !== null && attributes[key] !== undefined) {
  10382. quote = options.noQuotesForNativeAttributes && typeof attributes[key] !== 'string' ? '' : '"';
  10383. attr = '' + attributes[key]; // ensure number and boolean are converted to String
  10384. attr = attr.replace(/"/g, '&quot;');
  10385. attrName = 'attributeNameFn' in options ? options.attributeNameFn(key, attr, currentElementName, currentElement) : key;
  10386. result.push(options.spaces && options.indentAttributes ? writeIndentation(options, depth + 1, false) : ' ');
  10387. result.push(attrName + '=' + quote + ('attributeValueFn' in options ? options.attributeValueFn(attr, key, currentElementName, currentElement) : attr) + quote);
  10388. }
  10389. }
  10390. if (attributes && Object.keys(attributes).length && options.spaces && options.indentAttributes) {
  10391. result.push(writeIndentation(options, depth, false));
  10392. }
  10393. return result.join('');
  10394. }
  10395. function writeDeclaration(declaration, options, depth) {
  10396. currentElement = declaration;
  10397. currentElementName = 'xml';
  10398. return options.ignoreDeclaration ? '' : '<?' + 'xml' + writeAttributes(declaration[options.attributesKey], options, depth) + '?>';
  10399. }
  10400. function writeInstruction(instruction, options, depth) {
  10401. if (options.ignoreInstruction) {
  10402. return '';
  10403. }
  10404. var key;
  10405. for (key in instruction) {
  10406. if (instruction.hasOwnProperty(key)) {
  10407. break;
  10408. }
  10409. }
  10410. var instructionName = 'instructionNameFn' in options ? options.instructionNameFn(key, instruction[key], currentElementName, currentElement) : key;
  10411. if (typeof instruction[key] === 'object') {
  10412. currentElement = instruction;
  10413. currentElementName = instructionName;
  10414. return '<?' + instructionName + writeAttributes(instruction[key][options.attributesKey], options, depth) + '?>';
  10415. } else {
  10416. var instructionValue = instruction[key] ? instruction[key] : '';
  10417. if ('instructionFn' in options) instructionValue = options.instructionFn(instructionValue, key, currentElementName, currentElement);
  10418. return '<?' + instructionName + (instructionValue ? ' ' + instructionValue : '') + '?>';
  10419. }
  10420. }
  10421. function writeComment(comment, options) {
  10422. return options.ignoreComment ? '' : '<!--' + ('commentFn' in options ? options.commentFn(comment, currentElementName, currentElement) : comment) + '-->';
  10423. }
  10424. function writeCdata(cdata, options) {
  10425. return options.ignoreCdata ? '' : '<![CDATA[' + ('cdataFn' in options ? options.cdataFn(cdata, currentElementName, currentElement) : cdata.replace(']]>', ']]]]><![CDATA[>')) + ']]>';
  10426. }
  10427. function writeDoctype(doctype, options) {
  10428. return options.ignoreDoctype ? '' : '<!DOCTYPE ' + ('doctypeFn' in options ? options.doctypeFn(doctype, currentElementName, currentElement) : doctype) + '>';
  10429. }
  10430. function writeText(text, options) {
  10431. if (options.ignoreText) return '';
  10432. text = '' + text; // ensure Number and Boolean are converted to String
  10433. text = text.replace(/&amp;/g, '&'); // desanitize to avoid double sanitization
  10434. text = text.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
  10435. return 'textFn' in options ? options.textFn(text, currentElementName, currentElement) : text;
  10436. }
  10437. function hasContent(element, options) {
  10438. var i;
  10439. if (element.elements && element.elements.length) {
  10440. for (i = 0; i < element.elements.length; ++i) {
  10441. switch (element.elements[i][options.typeKey]) {
  10442. case 'text':
  10443. if (options.indentText) {
  10444. return true;
  10445. }
  10446. break;
  10447. // skip to next key
  10448. case 'cdata':
  10449. if (options.indentCdata) {
  10450. return true;
  10451. }
  10452. break;
  10453. // skip to next key
  10454. case 'instruction':
  10455. if (options.indentInstruction) {
  10456. return true;
  10457. }
  10458. break;
  10459. // skip to next key
  10460. case 'doctype':
  10461. case 'comment':
  10462. case 'element':
  10463. return true;
  10464. default:
  10465. return true;
  10466. }
  10467. }
  10468. }
  10469. return false;
  10470. }
  10471. function writeElement(element, options, depth) {
  10472. currentElement = element;
  10473. currentElementName = element.name;
  10474. var xml = [],
  10475. elementName = 'elementNameFn' in options ? options.elementNameFn(element.name, element) : element.name;
  10476. xml.push('<' + elementName);
  10477. if (element[options.attributesKey]) {
  10478. xml.push(writeAttributes(element[options.attributesKey], options, depth));
  10479. }
  10480. var withClosingTag = element[options.elementsKey] && element[options.elementsKey].length || element[options.attributesKey] && element[options.attributesKey]['xml:space'] === 'preserve';
  10481. if (!withClosingTag) {
  10482. if ('fullTagEmptyElementFn' in options) {
  10483. withClosingTag = options.fullTagEmptyElementFn(element.name, element);
  10484. } else {
  10485. withClosingTag = options.fullTagEmptyElement;
  10486. }
  10487. }
  10488. if (withClosingTag) {
  10489. xml.push('>');
  10490. if (element[options.elementsKey] && element[options.elementsKey].length) {
  10491. xml.push(writeElements(element[options.elementsKey], options, depth + 1));
  10492. currentElement = element;
  10493. currentElementName = element.name;
  10494. }
  10495. xml.push(options.spaces && hasContent(element, options) ? '\n' + Array(depth + 1).join(options.spaces) : '');
  10496. xml.push('</' + elementName + '>');
  10497. } else {
  10498. xml.push('/>');
  10499. }
  10500. return xml.join('');
  10501. }
  10502. function writeElements(elements, options, depth, firstLine) {
  10503. return elements.reduce(function (xml, element) {
  10504. var indent = writeIndentation(options, depth, firstLine && !xml);
  10505. switch (element.type) {
  10506. case 'element':
  10507. return xml + indent + writeElement(element, options, depth);
  10508. case 'comment':
  10509. return xml + indent + writeComment(element[options.commentKey], options);
  10510. case 'doctype':
  10511. return xml + indent + writeDoctype(element[options.doctypeKey], options);
  10512. case 'cdata':
  10513. return xml + (options.indentCdata ? indent : '') + writeCdata(element[options.cdataKey], options);
  10514. case 'text':
  10515. return xml + (options.indentText ? indent : '') + writeText(element[options.textKey], options);
  10516. case 'instruction':
  10517. var instruction = {};
  10518. instruction[element[options.nameKey]] = element[options.attributesKey] ? element : element[options.instructionKey];
  10519. return xml + (options.indentInstruction ? indent : '') + writeInstruction(instruction, options, depth);
  10520. }
  10521. }, '');
  10522. }
  10523. function hasContentCompact(element, options, anyContent) {
  10524. var key;
  10525. for (key in element) {
  10526. if (element.hasOwnProperty(key)) {
  10527. switch (key) {
  10528. case options.parentKey:
  10529. case options.attributesKey:
  10530. break;
  10531. // skip to next key
  10532. case options.textKey:
  10533. if (options.indentText || anyContent) {
  10534. return true;
  10535. }
  10536. break;
  10537. // skip to next key
  10538. case options.cdataKey:
  10539. if (options.indentCdata || anyContent) {
  10540. return true;
  10541. }
  10542. break;
  10543. // skip to next key
  10544. case options.instructionKey:
  10545. if (options.indentInstruction || anyContent) {
  10546. return true;
  10547. }
  10548. break;
  10549. // skip to next key
  10550. case options.doctypeKey:
  10551. case options.commentKey:
  10552. return true;
  10553. default:
  10554. return true;
  10555. }
  10556. }
  10557. }
  10558. return false;
  10559. }
  10560. function writeElementCompact(element, name, options, depth, indent) {
  10561. currentElement = element;
  10562. currentElementName = name;
  10563. var elementName = 'elementNameFn' in options ? options.elementNameFn(name, element) : name;
  10564. if (typeof element === 'undefined' || element === null || element === '') {
  10565. return 'fullTagEmptyElementFn' in options && options.fullTagEmptyElementFn(name, element) || options.fullTagEmptyElement ? '<' + elementName + '></' + elementName + '>' : '<' + elementName + '/>';
  10566. }
  10567. var xml = [];
  10568. if (name) {
  10569. xml.push('<' + elementName);
  10570. if (typeof element !== 'object') {
  10571. xml.push('>' + writeText(element, options) + '</' + elementName + '>');
  10572. return xml.join('');
  10573. }
  10574. if (element[options.attributesKey]) {
  10575. xml.push(writeAttributes(element[options.attributesKey], options, depth));
  10576. }
  10577. var withClosingTag = hasContentCompact(element, options, true) || element[options.attributesKey] && element[options.attributesKey]['xml:space'] === 'preserve';
  10578. if (!withClosingTag) {
  10579. if ('fullTagEmptyElementFn' in options) {
  10580. withClosingTag = options.fullTagEmptyElementFn(name, element);
  10581. } else {
  10582. withClosingTag = options.fullTagEmptyElement;
  10583. }
  10584. }
  10585. if (withClosingTag) {
  10586. xml.push('>');
  10587. } else {
  10588. xml.push('/>');
  10589. return xml.join('');
  10590. }
  10591. }
  10592. xml.push(writeElementsCompact(element, options, depth + 1, false));
  10593. currentElement = element;
  10594. currentElementName = name;
  10595. if (name) {
  10596. xml.push((indent ? writeIndentation(options, depth, false) : '') + '</' + elementName + '>');
  10597. }
  10598. return xml.join('');
  10599. }
  10600. function writeElementsCompact(element, options, depth, firstLine) {
  10601. var i,
  10602. key,
  10603. nodes,
  10604. xml = [];
  10605. for (key in element) {
  10606. if (element.hasOwnProperty(key)) {
  10607. nodes = isArray(element[key]) ? element[key] : [element[key]];
  10608. for (i = 0; i < nodes.length; ++i) {
  10609. switch (key) {
  10610. case options.declarationKey:
  10611. xml.push(writeDeclaration(nodes[i], options, depth));
  10612. break;
  10613. case options.instructionKey:
  10614. xml.push((options.indentInstruction ? writeIndentation(options, depth, firstLine) : '') + writeInstruction(nodes[i], options, depth));
  10615. break;
  10616. case options.attributesKey:
  10617. case options.parentKey:
  10618. break;
  10619. // skip
  10620. case options.textKey:
  10621. xml.push((options.indentText ? writeIndentation(options, depth, firstLine) : '') + writeText(nodes[i], options));
  10622. break;
  10623. case options.cdataKey:
  10624. xml.push((options.indentCdata ? writeIndentation(options, depth, firstLine) : '') + writeCdata(nodes[i], options));
  10625. break;
  10626. case options.doctypeKey:
  10627. xml.push(writeIndentation(options, depth, firstLine) + writeDoctype(nodes[i], options));
  10628. break;
  10629. case options.commentKey:
  10630. xml.push(writeIndentation(options, depth, firstLine) + writeComment(nodes[i], options));
  10631. break;
  10632. default:
  10633. xml.push(writeIndentation(options, depth, firstLine) + writeElementCompact(nodes[i], key, options, depth, hasContentCompact(nodes[i], options)));
  10634. }
  10635. firstLine = firstLine && !xml.length;
  10636. }
  10637. }
  10638. }
  10639. return xml.join('');
  10640. }
  10641. module.exports = function (js, options) {
  10642. options = validateOptions(options);
  10643. var xml = [];
  10644. currentElement = js;
  10645. currentElementName = '_root_';
  10646. if (options.compact) {
  10647. xml.push(writeElementsCompact(js, options, 0, true));
  10648. } else {
  10649. if (js[options.declarationKey]) {
  10650. xml.push(writeDeclaration(js[options.declarationKey], options, 0));
  10651. }
  10652. if (js[options.elementsKey] && js[options.elementsKey].length) {
  10653. xml.push(writeElements(js[options.elementsKey], options, 0, !xml.length));
  10654. }
  10655. }
  10656. return xml.join('');
  10657. };
  10658. /***/ }),
  10659. /* 40 */
  10660. /***/ (function(module) {
  10661. module.exports = JSON.parse("[{\"title\":\"经典深色\",\"label\":\"dark\",\"textColor\":\"#fff\",\"background\":\"rgba(0,0,0,0.6)\",\"colorGroup\":[\"#dd6b66\",\"#759aa0\",\"#e69d87\",\"#8dc1a9\",\"#ea7e53\"]},{\"title\":\"经典浅色\",\"label\":\"light\",\"textColor\":\"#333\",\"background\":\"rgba(255, 255, 255,0.6)\",\"colorGroup\":[\"#3fb1e3\",\"#6be6c1\",\"#626c91\",\"#a0a7e6\",\"#c4ebad\"]},{\"title\":\"绿色渐变\",\"label\":\"green-g\",\"textColor\":\"#fff\",\"background\":\"rgba(0,0,0,0.6)\",\"colorGroup\":[\"#064049\",\"#165A65\",\"#1F717F\",\"#3097AB\",\"#9AEAF4\"]},{\"title\":\"蓝色渐变\",\"label\":\"blue-g\",\"textColor\":\"#fff\",\"background\":\"rgba(0,0,0,0.6)\",\"colorGroup\":[\"#243BCC\",\"#1C55FF\",\"#0C75FF\",\"#338FFF\",\"#00CDF1\"]},{\"title\":\"橙红渐变\",\"label\":\"red-g\",\"textColor\":\"#fff\",\"background\":\"rgba(0,0,0,0.6)\",\"colorGroup\":[\"#770000\",\"#882241\",\"#BE3144\",\"#F05940\",\"#FF8417\"]},{\"title\":\"紫色渐变\",\"label\":\"purple-g\",\"textColor\":\"#fff\",\"background\":\"rgba(0,0,0,0.6)\",\"colorGroup\":[\"#2F2AA4\",\"#5432D3\",\"#8B3B86\",\"#9740B1\",\"#7B6CF5\"]},{\"title\":\"深蓝黑色\",\"label\":\"bluedark-dark\",\"textColor\":\"#fff\",\"background\":\"rgba(0,0,0,0.6)\",\"colorGroup\":[\"#15D1F2\",\"#499BFF\",\"#2C61FF\",\"#243BCC\",\"#67A9FF\"]},{\"title\":\"墨绿黑色\",\"label\":\"green-dark\",\"textColor\":\"#fff\",\"background\":\"rgba(0,0,0,0.6)\",\"colorGroup\":[\"#2D808D\",\"#53A8B6\",\"#7AC2D0\",\"#BCE4E9\",\"#F1FDFF\"]},{\"title\":\"浅蓝黑色\",\"label\":\"blue-dark\",\"textColor\":\"#fff\",\"background\":\"rgba(0,0,0,0.6)\",\"colorGroup\":[\"#00E9FF\",\"#BBE7FF\",\"#6AE5C1\",\"#46ABFF\",\"#363EFF\"]},{\"title\":\"浅灰黑色\",\"label\":\"grey-dark\",\"textColor\":\"#fff\",\"background\":\"rgba(0,0,0,0.6)\",\"colorGroup\":[\"#52606D\",\"#8894A0\",\"#BACBDB\",\"#D3DDE8\",\"#F2F5F8\"]},{\"title\":\"深紫黑色\",\"label\":\"purple-dark\",\"textColor\":\"#fff\",\"background\":\"rgba(0,0,0,0.6)\",\"colorGroup\":[\"#7B6CF6\",\"#5432D3\",\"#241F92\",\"#8B3B86\",\"#E6A5FF\"]},{\"title\":\"深蓝白色\",\"label\":\"blue-light\",\"textColor\":\"#000\",\"background\":\"rgba(255,255,255,0.6)\",\"colorGroup\":[\"#243BCC\",\"#2C61FF\",\"#499BFF\",\"#15D1F2\",\"#67A9FF\"]},{\"title\":\"深红白色\",\"label\":\"red-light\",\"textColor\":\"#000\",\"background\":\"rgba(255,255,255,0.6)\",\"colorGroup\":[\"#F05940\",\"#BE3144\",\"#882241\",\"#770000\",\"#FF8418\"]}]");
  10662. /***/ }),
  10663. /* 41 */
  10664. /***/ (function(module, exports, __webpack_require__) {
  10665. /*jslint node:true */
  10666. var xml2js = __webpack_require__(33);
  10667. var xml2json = __webpack_require__(73);
  10668. var js2xml = __webpack_require__(39);
  10669. var json2xml = __webpack_require__(74);
  10670. module.exports = {
  10671. xml2js: xml2js,
  10672. xml2json: xml2json,
  10673. js2xml: js2xml,
  10674. json2xml: json2xml
  10675. };
  10676. /***/ }),
  10677. /* 42 */
  10678. /***/ (function(module, exports, __webpack_require__) {
  10679. !function (t, e) {
  10680. true ? module.exports = e(__webpack_require__(75), __webpack_require__(76)) : undefined;
  10681. }(this, function (m, d) {
  10682. "use strict";
  10683. var t;
  10684. return m = m && m.hasOwnProperty("default") ? m.default : m, d = d && d.hasOwnProperty("default") ? d.default : d, function (t) {
  10685. var u;
  10686. t.exports;
  10687. (u = window).DOMParser = window.DOMParser;
  10688. function p() {
  10689. return document.createElement("canvas");
  10690. }
  10691. var f,
  10692. c = function c(t, e, i) {
  10693. if (null != t || null != e || null != i) {
  10694. var n = function (s) {
  10695. var A = {
  10696. opts: s,
  10697. FRAMERATE: 30,
  10698. MAX_VIRTUAL_PIXELS: 3e4,
  10699. rootEmSize: 12,
  10700. emSize: 12,
  10701. log: function log(t) {}
  10702. };
  10703. 1 == A.opts.log && "undefined" != typeof console && (A.log = function (t) {
  10704. console.log(t);
  10705. });
  10706. A.init = function (t) {
  10707. var e = 0;
  10708. A.UniqueId = function () {
  10709. return "canvg" + ++e;
  10710. }, A.Definitions = {}, A.Styles = {}, A.StylesSpecificity = {}, A.Animations = [], A.Images = [], A.ctx = t, A.ViewPort = new function () {
  10711. this.viewPorts = [], this.Clear = function () {
  10712. this.viewPorts = [];
  10713. }, this.SetCurrent = function (t, e) {
  10714. this.viewPorts.push({
  10715. width: t,
  10716. height: e
  10717. });
  10718. }, this.RemoveCurrent = function () {
  10719. this.viewPorts.pop();
  10720. }, this.Current = function () {
  10721. return this.viewPorts[this.viewPorts.length - 1];
  10722. }, this.width = function () {
  10723. return this.Current().width;
  10724. }, this.height = function () {
  10725. return this.Current().height;
  10726. }, this.ComputeSize = function (t) {
  10727. return null != t && "number" == typeof t ? t : "x" == t ? this.width() : "y" == t ? this.height() : Math.sqrt(Math.pow(this.width(), 2) + Math.pow(this.height(), 2)) / Math.sqrt(2);
  10728. };
  10729. }();
  10730. }, A.init(), A.ImagesLoaded = function () {
  10731. for (var t = 0; t < A.Images.length; t++) {
  10732. if (!A.Images[t].loaded) return !1;
  10733. }
  10734. return !0;
  10735. }, A.trim = function (t) {
  10736. return t.replace(/^\s+|\s+$/g, "");
  10737. }, A.compressSpaces = function (t) {
  10738. return t.replace(/(?!\u3000)\s+/gm, " ");
  10739. }, A.ajax = function (t) {
  10740. var e;
  10741. return (e = u.XMLHttpRequest ? new u.XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP")) ? (e.open("GET", t, !1), e.send(null), e.responseText) : null;
  10742. }, A.parseXml = function (e) {
  10743. if ("undefined" != typeof Windows && void 0 !== Windows.Data && void 0 !== Windows.Data.Xml) {
  10744. var t = new Windows.Data.Xml.Dom.XmlDocument(),
  10745. i = new Windows.Data.Xml.Dom.XmlLoadSettings();
  10746. return i.prohibitDtd = !1, t.loadXml(e, i), t;
  10747. }
  10748. if (!u.DOMParser) {
  10749. e = e.replace(/<!DOCTYPE svg[^>]*>/, "");
  10750. var t = new ActiveXObject("Microsoft.XMLDOM");
  10751. return t.async = "false", t.loadXML(e), t;
  10752. }
  10753. try {
  10754. var n = s.xmldom ? new u.DOMParser(s.xmldom) : new u.DOMParser();
  10755. return n.parseFromString(e, "image/svg+xml");
  10756. } catch (t) {
  10757. return (n = s.xmldom ? new u.DOMParser(s.xmldom) : new u.DOMParser()).parseFromString(e, "text/xml");
  10758. }
  10759. }, A.Property = function (t, e) {
  10760. this.name = t, this.value = e;
  10761. }, A.Property.prototype.getValue = function () {
  10762. return this.value;
  10763. }, A.Property.prototype.hasValue = function () {
  10764. return null != this.value && "" !== this.value;
  10765. }, A.Property.prototype.numValue = function () {
  10766. if (!this.hasValue()) return 0;
  10767. var t = parseFloat(this.value);
  10768. return (this.value + "").match(/%$/) && (t /= 100), t;
  10769. }, A.Property.prototype.valueOrDefault = function (t) {
  10770. return this.hasValue() ? this.value : t;
  10771. }, A.Property.prototype.numValueOrDefault = function (t) {
  10772. return this.hasValue() ? this.numValue() : t;
  10773. }, A.Property.prototype.addOpacity = function (t) {
  10774. var e = this.value;
  10775. if (null != t.value && "" != t.value && "string" == typeof this.value) {
  10776. var i = new m(this.value);
  10777. i.ok && (e = "rgba(" + i.r + ", " + i.g + ", " + i.b + ", " + t.numValue() + ")");
  10778. }
  10779. return new A.Property(this.name, e);
  10780. }, A.Property.prototype.getDefinition = function () {
  10781. var t = this.value.match(/#([^\)'"]+)/);
  10782. return t && (t = t[1]), t || (t = this.value), A.Definitions[t];
  10783. }, A.Property.prototype.isUrlDefinition = function () {
  10784. return 0 == this.value.indexOf("url(");
  10785. }, A.Property.prototype.getFillStyleDefinition = function (t, e) {
  10786. var i = this.getDefinition();
  10787. if (null != i && i.createGradient) return i.createGradient(A.ctx, t, e);
  10788. if (null != i && i.createPattern) {
  10789. if (i.getHrefAttribute().hasValue()) {
  10790. var n = i.attribute("patternTransform");
  10791. i = i.getHrefAttribute().getDefinition(), n.hasValue() && (i.attribute("patternTransform", !0).value = n.value);
  10792. }
  10793. return i.createPattern(A.ctx, t);
  10794. }
  10795. return null;
  10796. }, A.Property.prototype.getDPI = function (t) {
  10797. return 96;
  10798. }, A.Property.prototype.getREM = function (t) {
  10799. return A.rootEmSize;
  10800. }, A.Property.prototype.getEM = function (t) {
  10801. return A.emSize;
  10802. }, A.Property.prototype.getUnits = function () {
  10803. var t = this.value + "";
  10804. return t.replace(/[0-9\.\-]/g, "");
  10805. }, A.Property.prototype.isPixels = function () {
  10806. if (!this.hasValue()) return !1;
  10807. var t = this.value + "";
  10808. return !!t.match(/px$/) || !!t.match(/^[0-9]+$/);
  10809. }, A.Property.prototype.toPixels = function (t, e) {
  10810. if (!this.hasValue()) return 0;
  10811. var i = this.value + "";
  10812. if (i.match(/rem$/)) return this.numValue() * this.getREM(t);
  10813. if (i.match(/em$/)) return this.numValue() * this.getEM(t);
  10814. if (i.match(/ex$/)) return this.numValue() * this.getEM(t) / 2;
  10815. if (i.match(/px$/)) return this.numValue();
  10816. if (i.match(/pt$/)) return this.numValue() * this.getDPI(t) * (1 / 72);
  10817. if (i.match(/pc$/)) return 15 * this.numValue();
  10818. if (i.match(/cm$/)) return this.numValue() * this.getDPI(t) / 2.54;
  10819. if (i.match(/mm$/)) return this.numValue() * this.getDPI(t) / 25.4;
  10820. if (i.match(/in$/)) return this.numValue() * this.getDPI(t);
  10821. if (i.match(/%$/)) return this.numValue() * A.ViewPort.ComputeSize(t);
  10822. var n = this.numValue();
  10823. return e && n < 1 ? n * A.ViewPort.ComputeSize(t) : n;
  10824. }, A.Property.prototype.toMilliseconds = function () {
  10825. if (!this.hasValue()) return 0;
  10826. var t = this.value + "";
  10827. return t.match(/s$/) ? 1e3 * this.numValue() : (t.match(/ms$/), this.numValue());
  10828. }, A.Property.prototype.toRadians = function () {
  10829. if (!this.hasValue()) return 0;
  10830. var t = this.value + "";
  10831. return t.match(/deg$/) ? this.numValue() * (Math.PI / 180) : t.match(/grad$/) ? this.numValue() * (Math.PI / 200) : t.match(/rad$/) ? this.numValue() : this.numValue() * (Math.PI / 180);
  10832. };
  10833. var t = {
  10834. baseline: "alphabetic",
  10835. "before-edge": "top",
  10836. "text-before-edge": "top",
  10837. middle: "middle",
  10838. central: "middle",
  10839. "after-edge": "bottom",
  10840. "text-after-edge": "bottom",
  10841. ideographic: "ideographic",
  10842. alphabetic: "alphabetic",
  10843. hanging: "hanging",
  10844. mathematical: "alphabetic"
  10845. };
  10846. return A.Property.prototype.toTextBaseline = function () {
  10847. return this.hasValue() ? t[this.value] : null;
  10848. }, A.Font = new function () {
  10849. this.Styles = "normal|italic|oblique|inherit", this.Variants = "normal|small-caps|inherit", this.Weights = "normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit", this.CreateFont = function (t, e, i, n, s, a) {
  10850. var r = null != a ? this.Parse(a) : this.CreateFont("", "", "", "", "", A.ctx.font);
  10851. return {
  10852. fontFamily: s = s || r.fontFamily,
  10853. fontSize: n || r.fontSize,
  10854. fontStyle: t || r.fontStyle,
  10855. fontWeight: i || r.fontWeight,
  10856. fontVariant: e || r.fontVariant,
  10857. toString: function toString() {
  10858. return [this.fontStyle, this.fontVariant, this.fontWeight, this.fontSize, this.fontFamily].join(" ");
  10859. }
  10860. };
  10861. };
  10862. var r = this;
  10863. this.Parse = function (t) {
  10864. for (var e = {}, i = A.trim(A.compressSpaces(t || "")).split(" "), n = {
  10865. fontSize: !1,
  10866. fontStyle: !1,
  10867. fontWeight: !1,
  10868. fontVariant: !1
  10869. }, s = "", a = 0; a < i.length; a++) {
  10870. n.fontStyle || -1 == r.Styles.indexOf(i[a]) ? n.fontVariant || -1 == r.Variants.indexOf(i[a]) ? n.fontWeight || -1 == r.Weights.indexOf(i[a]) ? n.fontSize ? "inherit" != i[a] && (s += i[a]) : ("inherit" != i[a] && (e.fontSize = i[a].split("/")[0]), n.fontStyle = n.fontVariant = n.fontWeight = n.fontSize = !0) : ("inherit" != i[a] && (e.fontWeight = i[a]), n.fontStyle = n.fontVariant = n.fontWeight = !0) : ("inherit" != i[a] && (e.fontVariant = i[a]), n.fontStyle = n.fontVariant = !0) : ("inherit" != i[a] && (e.fontStyle = i[a]), n.fontStyle = !0);
  10871. }
  10872. return "" != s && (e.fontFamily = s), e;
  10873. };
  10874. }(), A.ToNumberArray = function (t) {
  10875. for (var e = A.trim(A.compressSpaces((t || "").replace(/,/g, " "))).split(" "), i = 0; i < e.length; i++) {
  10876. e[i] = parseFloat(e[i]);
  10877. }
  10878. return e;
  10879. }, A.Point = function (t, e) {
  10880. this.x = t, this.y = e;
  10881. }, A.Point.prototype.angleTo = function (t) {
  10882. return Math.atan2(t.y - this.y, t.x - this.x);
  10883. }, A.Point.prototype.applyTransform = function (t) {
  10884. var e = this.x * t[0] + this.y * t[2] + t[4],
  10885. i = this.x * t[1] + this.y * t[3] + t[5];
  10886. this.x = e, this.y = i;
  10887. }, A.CreatePoint = function (t) {
  10888. var e = A.ToNumberArray(t);
  10889. return new A.Point(e[0], e[1]);
  10890. }, A.CreatePath = function (t) {
  10891. for (var e = A.ToNumberArray(t), i = [], n = 0; n < e.length; n += 2) {
  10892. i.push(new A.Point(e[n], e[n + 1]));
  10893. }
  10894. return i;
  10895. }, A.BoundingBox = function (t, e, i, n) {
  10896. this.x1 = Number.NaN, this.y1 = Number.NaN, this.x2 = Number.NaN, this.y2 = Number.NaN, this.x = function () {
  10897. return this.x1;
  10898. }, this.y = function () {
  10899. return this.y1;
  10900. }, this.width = function () {
  10901. return this.x2 - this.x1;
  10902. }, this.height = function () {
  10903. return this.y2 - this.y1;
  10904. }, this.addPoint = function (t, e) {
  10905. null != t && ((isNaN(this.x1) || isNaN(this.x2)) && (this.x1 = t, this.x2 = t), t < this.x1 && (this.x1 = t), t > this.x2 && (this.x2 = t)), null != e && ((isNaN(this.y1) || isNaN(this.y2)) && (this.y1 = e, this.y2 = e), e < this.y1 && (this.y1 = e), e > this.y2 && (this.y2 = e));
  10906. }, this.addX = function (t) {
  10907. this.addPoint(t, null);
  10908. }, this.addY = function (t) {
  10909. this.addPoint(null, t);
  10910. }, this.addBoundingBox = function (t) {
  10911. this.addPoint(t.x1, t.y1), this.addPoint(t.x2, t.y2);
  10912. }, this.addQuadraticCurve = function (t, e, i, n, s, a) {
  10913. var r = t + 2 / 3 * (i - t),
  10914. o = e + 2 / 3 * (n - e),
  10915. l = r + 1 / 3 * (s - t),
  10916. h = o + 1 / 3 * (a - e);
  10917. this.addBezierCurve(t, e, r, l, o, h, s, a);
  10918. }, this.addBezierCurve = function (t, e, i, n, s, a, r, o) {
  10919. var l = [t, e],
  10920. h = [i, n],
  10921. u = [s, a],
  10922. c = [r, o];
  10923. this.addPoint(l[0], l[1]), this.addPoint(c[0], c[1]);
  10924. for (var f = 0; f <= 1; f++) {
  10925. var m = function m(t) {
  10926. return Math.pow(1 - t, 3) * l[f] + 3 * Math.pow(1 - t, 2) * t * h[f] + 3 * (1 - t) * Math.pow(t, 2) * u[f] + Math.pow(t, 3) * c[f];
  10927. },
  10928. p = 6 * l[f] - 12 * h[f] + 6 * u[f],
  10929. d = -3 * l[f] + 9 * h[f] - 9 * u[f] + 3 * c[f],
  10930. y = 3 * h[f] - 3 * l[f];
  10931. if (0 != d) {
  10932. var v = Math.pow(p, 2) - 4 * y * d;
  10933. if (!(v < 0)) {
  10934. var g = (-p + Math.sqrt(v)) / (2 * d);
  10935. 0 < g && g < 1 && (0 == f && this.addX(m(g)), 1 == f && this.addY(m(g)));
  10936. var x = (-p - Math.sqrt(v)) / (2 * d);
  10937. 0 < x && x < 1 && (0 == f && this.addX(m(x)), 1 == f && this.addY(m(x)));
  10938. }
  10939. } else {
  10940. if (0 == p) continue;
  10941. var b = -y / p;
  10942. 0 < b && b < 1 && (0 == f && this.addX(m(b)), 1 == f && this.addY(m(b)));
  10943. }
  10944. }
  10945. }, this.isPointInBox = function (t, e) {
  10946. return this.x1 <= t && t <= this.x2 && this.y1 <= e && e <= this.y2;
  10947. }, this.addPoint(t, e), this.addPoint(i, n);
  10948. }, A.Transform = function (t) {
  10949. var e = this;
  10950. this.Type = {}, this.Type.translate = function (t) {
  10951. this.p = A.CreatePoint(t), this.apply = function (t) {
  10952. t.translate(this.p.x || 0, this.p.y || 0);
  10953. }, this.unapply = function (t) {
  10954. t.translate(-1 * this.p.x || 0, -1 * this.p.y || 0);
  10955. }, this.applyToPoint = function (t) {
  10956. t.applyTransform([1, 0, 0, 1, this.p.x || 0, this.p.y || 0]);
  10957. };
  10958. }, this.Type.rotate = function (t) {
  10959. var e = A.ToNumberArray(t);
  10960. this.angle = new A.Property("angle", e[0]), this.cx = e[1] || 0, this.cy = e[2] || 0, this.apply = function (t) {
  10961. t.translate(this.cx, this.cy), t.rotate(this.angle.toRadians()), t.translate(-this.cx, -this.cy);
  10962. }, this.unapply = function (t) {
  10963. t.translate(this.cx, this.cy), t.rotate(-1 * this.angle.toRadians()), t.translate(-this.cx, -this.cy);
  10964. }, this.applyToPoint = function (t) {
  10965. var e = this.angle.toRadians();
  10966. t.applyTransform([1, 0, 0, 1, this.p.x || 0, this.p.y || 0]), t.applyTransform([Math.cos(e), Math.sin(e), -Math.sin(e), Math.cos(e), 0, 0]), t.applyTransform([1, 0, 0, 1, -this.p.x || 0, -this.p.y || 0]);
  10967. };
  10968. }, this.Type.scale = function (t) {
  10969. this.p = A.CreatePoint(t), this.apply = function (t) {
  10970. t.scale(this.p.x || 1, this.p.y || this.p.x || 1);
  10971. }, this.unapply = function (t) {
  10972. t.scale(1 / this.p.x || 1, 1 / this.p.y || this.p.x || 1);
  10973. }, this.applyToPoint = function (t) {
  10974. t.applyTransform([this.p.x || 0, 0, 0, this.p.y || 0, 0, 0]);
  10975. };
  10976. }, this.Type.matrix = function (t) {
  10977. this.m = A.ToNumberArray(t), this.apply = function (t) {
  10978. t.transform(this.m[0], this.m[1], this.m[2], this.m[3], this.m[4], this.m[5]);
  10979. }, this.unapply = function (t) {
  10980. var e = this.m[0],
  10981. i = this.m[2],
  10982. n = this.m[4],
  10983. s = this.m[1],
  10984. a = this.m[3],
  10985. r = this.m[5],
  10986. o = 1 / (e * (1 * a - 0 * r) - i * (1 * s - 0 * r) + n * (0 * s - 0 * a));
  10987. t.transform(o * (1 * a - 0 * r), o * (0 * r - 1 * s), o * (0 * n - 1 * i), o * (1 * e - 0 * n), o * (i * r - n * a), o * (n * s - e * r));
  10988. }, this.applyToPoint = function (t) {
  10989. t.applyTransform(this.m);
  10990. };
  10991. }, this.Type.SkewBase = function (t) {
  10992. this.base = e.Type.matrix, this.base(t), this.angle = new A.Property("angle", t);
  10993. }, this.Type.SkewBase.prototype = new this.Type.matrix(), this.Type.skewX = function (t) {
  10994. this.base = e.Type.SkewBase, this.base(t), this.m = [1, 0, Math.tan(this.angle.toRadians()), 1, 0, 0];
  10995. }, this.Type.skewX.prototype = new this.Type.SkewBase(), this.Type.skewY = function (t) {
  10996. this.base = e.Type.SkewBase, this.base(t), this.m = [1, Math.tan(this.angle.toRadians()), 0, 1, 0, 0];
  10997. }, this.Type.skewY.prototype = new this.Type.SkewBase(), this.transforms = [], this.apply = function (t) {
  10998. for (var e = 0; e < this.transforms.length; e++) {
  10999. this.transforms[e].apply(t);
  11000. }
  11001. }, this.unapply = function (t) {
  11002. for (var e = this.transforms.length - 1; 0 <= e; e--) {
  11003. this.transforms[e].unapply(t);
  11004. }
  11005. }, this.applyToPoint = function (t) {
  11006. for (var e = 0; e < this.transforms.length; e++) {
  11007. this.transforms[e].applyToPoint(t);
  11008. }
  11009. };
  11010. for (var i = A.trim(A.compressSpaces(t)).replace(/\)([a-zA-Z])/g, ") $1").replace(/\)(\s?,\s?)/g, ") ").split(/\s(?=[a-z])/), n = 0; n < i.length; n++) {
  11011. if ("none" !== i[n]) {
  11012. var s = A.trim(i[n].split("(")[0]),
  11013. a = i[n].split("(")[1].replace(")", ""),
  11014. r = this.Type[s];
  11015. if (void 0 !== r) {
  11016. var o = new r(a);
  11017. o.type = s, this.transforms.push(o);
  11018. }
  11019. }
  11020. }
  11021. }, A.AspectRatio = function (t, e, i, n, s, a, r, o, l, h) {
  11022. var u = (e = (e = A.compressSpaces(e)).replace(/^defer\s/, "")).split(" ")[0] || "xMidYMid",
  11023. c = e.split(" ")[1] || "meet",
  11024. f = i / n,
  11025. m = s / a,
  11026. p = Math.min(f, m),
  11027. d = Math.max(f, m);
  11028. "meet" == c && (n *= p, a *= p), "slice" == c && (n *= d, a *= d), l = new A.Property("refX", l), h = new A.Property("refY", h), l.hasValue() && h.hasValue() ? t.translate(-p * l.toPixels("x"), -p * h.toPixels("y")) : (u.match(/^xMid/) && ("meet" == c && p == m || "slice" == c && d == m) && t.translate(i / 2 - n / 2, 0), u.match(/YMid$/) && ("meet" == c && p == f || "slice" == c && d == f) && t.translate(0, s / 2 - a / 2), u.match(/^xMax/) && ("meet" == c && p == m || "slice" == c && d == m) && t.translate(i - n, 0), u.match(/YMax$/) && ("meet" == c && p == f || "slice" == c && d == f) && t.translate(0, s - a)), "none" == u ? t.scale(f, m) : "meet" == c ? t.scale(p, p) : "slice" == c && t.scale(d, d), t.translate(null == r ? 0 : -r, null == o ? 0 : -o);
  11029. }, A.Element = {}, A.EmptyProperty = new A.Property("EMPTY", ""), A.Element.ElementBase = function (a) {
  11030. this.attributes = {}, this.styles = {}, this.stylesSpecificity = {}, this.children = [], this.attribute = function (t, e) {
  11031. var i = this.attributes[t];
  11032. return null != i ? i : (1 == e && (i = new A.Property(t, ""), this.attributes[t] = i), i || A.EmptyProperty);
  11033. }, this.getHrefAttribute = function () {
  11034. for (var t in this.attributes) {
  11035. if ("href" == t || t.match(/:href$/)) return this.attributes[t];
  11036. }
  11037. return A.EmptyProperty;
  11038. }, this.style = function (t, e, i) {
  11039. var n = this.styles[t];
  11040. if (null != n) return n;
  11041. var s = this.attribute(t);
  11042. if (null != s && s.hasValue()) return this.styles[t] = s;
  11043. if (1 != i) {
  11044. var a = this.parent;
  11045. if (null != a) {
  11046. var r = a.style(t);
  11047. if (null != r && r.hasValue()) return r;
  11048. }
  11049. }
  11050. return 1 == e && (n = new A.Property(t, ""), this.styles[t] = n), n || A.EmptyProperty;
  11051. }, this.render = function (t) {
  11052. if ("none" != this.style("display").value && "hidden" != this.style("visibility").value) {
  11053. if (t.save(), this.style("mask").hasValue()) {
  11054. var e = this.style("mask").getDefinition();
  11055. null != e && e.apply(t, this);
  11056. } else if (this.style("filter").hasValue()) {
  11057. var i = this.style("filter").getDefinition();
  11058. null != i && i.apply(t, this);
  11059. } else this.setContext(t), this.renderChildren(t), this.clearContext(t);
  11060. t.restore();
  11061. }
  11062. }, this.setContext = function (t) {}, this.clearContext = function (t) {}, this.renderChildren = function (t) {
  11063. for (var e = 0; e < this.children.length; e++) {
  11064. this.children[e].render(t);
  11065. }
  11066. }, this.addChild = function (t, e) {
  11067. var i = t;
  11068. e && (i = A.CreateElement(t)), i.parent = this, "title" != i.type && this.children.push(i);
  11069. }, this.addStylesFromStyleDefinition = function () {
  11070. for (var t in A.Styles) {
  11071. if ("@" != t[0] && f(a, t)) {
  11072. var e = A.Styles[t],
  11073. i = A.StylesSpecificity[t];
  11074. if (null != e) for (var n in e) {
  11075. var s = this.stylesSpecificity[n];
  11076. void 0 === s && (s = "000"), s < i && (this.styles[n] = e[n], this.stylesSpecificity[n] = i);
  11077. }
  11078. }
  11079. }
  11080. };
  11081. var t,
  11082. e = new RegExp("^[A-Z-]+$");
  11083. if (null != a && 1 == a.nodeType) {
  11084. for (var i = 0; i < a.attributes.length; i++) {
  11085. var n = a.attributes[i],
  11086. s = (t = n.nodeName, e.test(t) ? t.toLowerCase() : t);
  11087. this.attributes[s] = new A.Property(s, n.value);
  11088. }
  11089. if (this.addStylesFromStyleDefinition(), this.attribute("style").hasValue()) {
  11090. var r = this.attribute("style").value.split(";");
  11091. for (i = 0; i < r.length; i++) {
  11092. if ("" != A.trim(r[i])) {
  11093. var o = r[i].split(":"),
  11094. l = A.trim(o[0]),
  11095. h = A.trim(o[1]);
  11096. this.styles[l] = new A.Property(l, h);
  11097. }
  11098. }
  11099. }
  11100. for (this.attribute("id").hasValue() && null == A.Definitions[this.attribute("id").value] && (A.Definitions[this.attribute("id").value] = this), i = 0; i < a.childNodes.length; i++) {
  11101. var u = a.childNodes[i];
  11102. if (1 == u.nodeType && this.addChild(u, !0), this.captureTextNodes && (3 == u.nodeType || 4 == u.nodeType)) {
  11103. var c = u.value || u.text || u.textContent || "";
  11104. "" != A.compressSpaces(c) && this.addChild(new A.Element.tspan(u), !1);
  11105. }
  11106. }
  11107. }
  11108. }, A.Element.RenderedElementBase = function (t) {
  11109. this.base = A.Element.ElementBase, this.base(t), this.calculateOpacity = function () {
  11110. for (var t = 1, e = this; null != e;) {
  11111. var i = e.style("opacity", !1, !0);
  11112. i.hasValue() && (t *= i.numValue()), e = e.parent;
  11113. }
  11114. return t;
  11115. }, this.setContext = function (t, e) {
  11116. if (!e) {
  11117. var i;
  11118. if (this.style("fill").isUrlDefinition()) null != (i = this.style("fill").getFillStyleDefinition(this, this.style("fill-opacity"))) && (t.fillStyle = i);else if (this.style("fill").hasValue()) {
  11119. var n;
  11120. "currentColor" == (n = this.style("fill")).value && (n.value = this.style("color").value), "inherit" != n.value && (t.fillStyle = "none" == n.value ? "rgba(0,0,0,0)" : n.value);
  11121. }
  11122. if (this.style("fill-opacity").hasValue() && (n = (n = new A.Property("fill", t.fillStyle)).addOpacity(this.style("fill-opacity")), t.fillStyle = n.value), this.style("stroke").isUrlDefinition()) null != (i = this.style("stroke").getFillStyleDefinition(this, this.style("stroke-opacity"))) && (t.strokeStyle = i);else if (this.style("stroke").hasValue()) {
  11123. var s;
  11124. "currentColor" == (s = this.style("stroke")).value && (s.value = this.style("color").value), "inherit" != s.value && (t.strokeStyle = "none" == s.value ? "rgba(0,0,0,0)" : s.value);
  11125. }
  11126. if (this.style("stroke-opacity").hasValue() && (s = (s = new A.Property("stroke", t.strokeStyle)).addOpacity(this.style("stroke-opacity")), t.strokeStyle = s.value), this.style("stroke-width").hasValue()) {
  11127. var a = this.style("stroke-width").toPixels();
  11128. t.lineWidth = 0 == a ? .001 : a;
  11129. }
  11130. if (this.style("stroke-linecap").hasValue() && (t.lineCap = this.style("stroke-linecap").value), this.style("stroke-linejoin").hasValue() && (t.lineJoin = this.style("stroke-linejoin").value), this.style("stroke-miterlimit").hasValue() && (t.miterLimit = this.style("stroke-miterlimit").value), this.style("paint-order").hasValue() && (t.paintOrder = this.style("paint-order").value), this.style("stroke-dasharray").hasValue() && "none" != this.style("stroke-dasharray").value) {
  11131. var r = A.ToNumberArray(this.style("stroke-dasharray").value);
  11132. void 0 !== t.setLineDash ? t.setLineDash(r) : void 0 !== t.webkitLineDash ? t.webkitLineDash = r : void 0 === t.mozDash || 1 == r.length && 0 == r[0] || (t.mozDash = r);
  11133. var o = this.style("stroke-dashoffset").toPixels();
  11134. void 0 !== t.lineDashOffset ? t.lineDashOffset = o : void 0 !== t.webkitLineDashOffset ? t.webkitLineDashOffset = o : void 0 !== t.mozDashOffset && (t.mozDashOffset = o);
  11135. }
  11136. }
  11137. if (void 0 !== t.font) {
  11138. t.font = A.Font.CreateFont(this.style("font-style").value, this.style("font-variant").value, this.style("font-weight").value, this.style("font-size").hasValue() ? this.style("font-size").toPixels() + "px" : "", this.style("font-family").value).toString();
  11139. var l = this.style("font-size", !1, !1);
  11140. l.isPixels() && (A.emSize = l.toPixels());
  11141. }
  11142. if (this.style("transform", !1, !0).hasValue() && new A.Transform(this.style("transform", !1, !0).value).apply(t), this.style("clip-path", !1, !0).hasValue()) {
  11143. var h = this.style("clip-path", !1, !0).getDefinition();
  11144. null != h && h.apply(t);
  11145. }
  11146. t.globalAlpha = this.calculateOpacity();
  11147. };
  11148. }, A.Element.RenderedElementBase.prototype = new A.Element.ElementBase(), A.Element.PathElementBase = function (t) {
  11149. this.base = A.Element.RenderedElementBase, this.base(t), this.path = function (t) {
  11150. return null != t && t.beginPath(), new A.BoundingBox();
  11151. }, this.renderChildren = function (t) {
  11152. this.path(t), A.Mouse.checkPath(this, t), "" != t.fillStyle && ("inherit" != this.style("fill-rule").valueOrDefault("inherit") ? t.fill(this.style("fill-rule").value) : t.fill()), "" != t.strokeStyle && t.stroke();
  11153. var e = this.getMarkers();
  11154. if (null != e) {
  11155. if (this.style("marker-start").isUrlDefinition() && (i = this.style("marker-start").getDefinition()).render(t, e[0][0], e[0][1]), this.style("marker-mid").isUrlDefinition()) for (var i = this.style("marker-mid").getDefinition(), n = 1; n < e.length - 1; n++) {
  11156. i.render(t, e[n][0], e[n][1]);
  11157. }
  11158. this.style("marker-end").isUrlDefinition() && (i = this.style("marker-end").getDefinition()).render(t, e[e.length - 1][0], e[e.length - 1][1]);
  11159. }
  11160. }, this.getBoundingBox = function () {
  11161. return this.path();
  11162. }, this.getMarkers = function () {
  11163. return null;
  11164. };
  11165. }, A.Element.PathElementBase.prototype = new A.Element.RenderedElementBase(), A.Element.svg = function (t) {
  11166. this.base = A.Element.RenderedElementBase, this.base(t), this.baseClearContext = this.clearContext, this.clearContext = function (t) {
  11167. this.baseClearContext(t), A.ViewPort.RemoveCurrent();
  11168. }, this.baseSetContext = this.setContext, this.setContext = function (t) {
  11169. if (t.strokeStyle = "rgba(0,0,0,0)", t.lineCap = "butt", t.lineJoin = "miter", t.miterLimit = 4, t.canvas.style && void 0 !== t.font && void 0 !== u.getComputedStyle) {
  11170. t.font = u.getComputedStyle(t.canvas).getPropertyValue("font");
  11171. var e = new A.Property("fontSize", A.Font.Parse(t.font).fontSize);
  11172. e.hasValue() && (A.rootEmSize = A.emSize = e.toPixels("y"));
  11173. }
  11174. this.baseSetContext(t), this.attribute("x").hasValue() || (this.attribute("x", !0).value = 0), this.attribute("y").hasValue() || (this.attribute("y", !0).value = 0), t.translate(this.attribute("x").toPixels("x"), this.attribute("y").toPixels("y"));
  11175. var i = A.ViewPort.width(),
  11176. n = A.ViewPort.height();
  11177. if (this.attribute("width").hasValue() || (this.attribute("width", !0).value = "100%"), this.attribute("height").hasValue() || (this.attribute("height", !0).value = "100%"), void 0 === this.root) {
  11178. i = this.attribute("width").toPixels("x"), n = this.attribute("height").toPixels("y");
  11179. var s = 0,
  11180. a = 0;
  11181. this.attribute("refX").hasValue() && this.attribute("refY").hasValue() && (s = -this.attribute("refX").toPixels("x"), a = -this.attribute("refY").toPixels("y")), "visible" != this.attribute("overflow").valueOrDefault("hidden") && (t.beginPath(), t.moveTo(s, a), t.lineTo(i, a), t.lineTo(i, n), t.lineTo(s, n), t.closePath(), t.clip());
  11182. }
  11183. if (A.ViewPort.SetCurrent(i, n), this.attribute("viewBox").hasValue()) {
  11184. var r = A.ToNumberArray(this.attribute("viewBox").value),
  11185. o = r[0],
  11186. l = r[1];
  11187. i = r[2], n = r[3], A.AspectRatio(t, this.attribute("preserveAspectRatio").value, A.ViewPort.width(), i, A.ViewPort.height(), n, o, l, this.attribute("refX").value, this.attribute("refY").value), A.ViewPort.RemoveCurrent(), A.ViewPort.SetCurrent(r[2], r[3]);
  11188. }
  11189. };
  11190. }, A.Element.svg.prototype = new A.Element.RenderedElementBase(), A.Element.rect = function (t) {
  11191. this.base = A.Element.PathElementBase, this.base(t), this.path = function (t) {
  11192. var e = this.attribute("x").toPixels("x"),
  11193. i = this.attribute("y").toPixels("y"),
  11194. n = this.attribute("width").toPixels("x"),
  11195. s = this.attribute("height").toPixels("y"),
  11196. a = this.attribute("rx").toPixels("x"),
  11197. r = this.attribute("ry").toPixels("y");
  11198. if (this.attribute("rx").hasValue() && !this.attribute("ry").hasValue() && (r = a), this.attribute("ry").hasValue() && !this.attribute("rx").hasValue() && (a = r), a = Math.min(a, n / 2), r = Math.min(r, s / 2), null != t) {
  11199. var o = (Math.sqrt(2) - 1) / 3 * 4;
  11200. t.beginPath(), t.moveTo(e + a, i), t.lineTo(e + n - a, i), t.bezierCurveTo(e + n - a + o * a, i, e + n, i + r - o * r, e + n, i + r), t.lineTo(e + n, i + s - r), t.bezierCurveTo(e + n, i + s - r + o * r, e + n - a + o * a, i + s, e + n - a, i + s), t.lineTo(e + a, i + s), t.bezierCurveTo(e + a - o * a, i + s, e, i + s - r + o * r, e, i + s - r), t.lineTo(e, i + r), t.bezierCurveTo(e, i + r - o * r, e + a - o * a, i, e + a, i), t.closePath();
  11201. }
  11202. return new A.BoundingBox(e, i, e + n, i + s);
  11203. };
  11204. }, A.Element.rect.prototype = new A.Element.PathElementBase(), A.Element.circle = function (t) {
  11205. this.base = A.Element.PathElementBase, this.base(t), this.path = function (t) {
  11206. var e = this.attribute("cx").toPixels("x"),
  11207. i = this.attribute("cy").toPixels("y"),
  11208. n = this.attribute("r").toPixels();
  11209. return null != t && (t.beginPath(), t.arc(e, i, n, 0, 2 * Math.PI, !1), t.closePath()), new A.BoundingBox(e - n, i - n, e + n, i + n);
  11210. };
  11211. }, A.Element.circle.prototype = new A.Element.PathElementBase(), A.Element.ellipse = function (t) {
  11212. this.base = A.Element.PathElementBase, this.base(t), this.path = function (t) {
  11213. var e = (Math.sqrt(2) - 1) / 3 * 4,
  11214. i = this.attribute("rx").toPixels("x"),
  11215. n = this.attribute("ry").toPixels("y"),
  11216. s = this.attribute("cx").toPixels("x"),
  11217. a = this.attribute("cy").toPixels("y");
  11218. return null != t && (t.beginPath(), t.moveTo(s + i, a), t.bezierCurveTo(s + i, a + e * n, s + e * i, a + n, s, a + n), t.bezierCurveTo(s - e * i, a + n, s - i, a + e * n, s - i, a), t.bezierCurveTo(s - i, a - e * n, s - e * i, a - n, s, a - n), t.bezierCurveTo(s + e * i, a - n, s + i, a - e * n, s + i, a), t.closePath()), new A.BoundingBox(s - i, a - n, s + i, a + n);
  11219. };
  11220. }, A.Element.ellipse.prototype = new A.Element.PathElementBase(), A.Element.line = function (t) {
  11221. this.base = A.Element.PathElementBase, this.base(t), this.getPoints = function () {
  11222. return [new A.Point(this.attribute("x1").toPixels("x"), this.attribute("y1").toPixels("y")), new A.Point(this.attribute("x2").toPixels("x"), this.attribute("y2").toPixels("y"))];
  11223. }, this.path = function (t) {
  11224. var e = this.getPoints();
  11225. return null != t && (t.beginPath(), t.moveTo(e[0].x, e[0].y), t.lineTo(e[1].x, e[1].y)), new A.BoundingBox(e[0].x, e[0].y, e[1].x, e[1].y);
  11226. }, this.getMarkers = function () {
  11227. var t = this.getPoints(),
  11228. e = t[0].angleTo(t[1]);
  11229. return [[t[0], e], [t[1], e]];
  11230. };
  11231. }, A.Element.line.prototype = new A.Element.PathElementBase(), A.Element.polyline = function (t) {
  11232. this.base = A.Element.PathElementBase, this.base(t), this.points = A.CreatePath(this.attribute("points").value), this.path = function (t) {
  11233. var e = new A.BoundingBox(this.points[0].x, this.points[0].y);
  11234. null != t && (t.beginPath(), t.moveTo(this.points[0].x, this.points[0].y));
  11235. for (var i = 1; i < this.points.length; i++) {
  11236. e.addPoint(this.points[i].x, this.points[i].y), null != t && t.lineTo(this.points[i].x, this.points[i].y);
  11237. }
  11238. return e;
  11239. }, this.getMarkers = function () {
  11240. for (var t = [], e = 0; e < this.points.length - 1; e++) {
  11241. t.push([this.points[e], this.points[e].angleTo(this.points[e + 1])]);
  11242. }
  11243. return 0 < t.length && t.push([this.points[this.points.length - 1], t[t.length - 1][1]]), t;
  11244. };
  11245. }, A.Element.polyline.prototype = new A.Element.PathElementBase(), A.Element.polygon = function (t) {
  11246. this.base = A.Element.polyline, this.base(t), this.basePath = this.path, this.path = function (t) {
  11247. var e = this.basePath(t);
  11248. return null != t && (t.lineTo(this.points[0].x, this.points[0].y), t.closePath()), e;
  11249. };
  11250. }, A.Element.polygon.prototype = new A.Element.polyline(), A.Element.path = function (t) {
  11251. this.base = A.Element.PathElementBase, this.base(t);
  11252. var e = this.attribute("d").value;
  11253. e = e.replace(/,/gm, " ");
  11254. for (var i = 0; i < 2; i++) {
  11255. e = e.replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm, "$1 $2");
  11256. }
  11257. for (e = (e = e.replace(/([^\s])([MmZzLlHhVvCcSsQqTtAa])/gm, "$1 $2")).replace(/([0-9])([+\-])/gm, "$1 $2"), i = 0; i < 2; i++) {
  11258. e = e.replace(/(\.[0-9]*)(\.)/gm, "$1 $2");
  11259. }
  11260. e = e.replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm, "$1 $3 $4 "), e = A.compressSpaces(e), e = A.trim(e), this.PathParser = new function (t) {
  11261. this.tokens = t.split(" "), this.reset = function () {
  11262. this.i = -1, this.command = "", this.previousCommand = "", this.start = new A.Point(0, 0), this.control = new A.Point(0, 0), this.current = new A.Point(0, 0), this.points = [], this.angles = [];
  11263. }, this.isEnd = function () {
  11264. return this.i >= this.tokens.length - 1;
  11265. }, this.isCommandOrEnd = function () {
  11266. return !!this.isEnd() || null != this.tokens[this.i + 1].match(/^[A-Za-z]$/);
  11267. }, this.isRelativeCommand = function () {
  11268. switch (this.command) {
  11269. case "m":
  11270. case "l":
  11271. case "h":
  11272. case "v":
  11273. case "c":
  11274. case "s":
  11275. case "q":
  11276. case "t":
  11277. case "a":
  11278. case "z":
  11279. return !0;
  11280. }
  11281. return !1;
  11282. }, this.getToken = function () {
  11283. return this.i++, this.tokens[this.i];
  11284. }, this.getScalar = function () {
  11285. return parseFloat(this.getToken());
  11286. }, this.nextCommand = function () {
  11287. this.previousCommand = this.command, this.command = this.getToken();
  11288. }, this.getPoint = function () {
  11289. var t = new A.Point(this.getScalar(), this.getScalar());
  11290. return this.makeAbsolute(t);
  11291. }, this.getAsControlPoint = function () {
  11292. var t = this.getPoint();
  11293. return this.control = t;
  11294. }, this.getAsCurrentPoint = function () {
  11295. var t = this.getPoint();
  11296. return this.current = t;
  11297. }, this.getReflectedControlPoint = function () {
  11298. return "c" != this.previousCommand.toLowerCase() && "s" != this.previousCommand.toLowerCase() && "q" != this.previousCommand.toLowerCase() && "t" != this.previousCommand.toLowerCase() ? this.current : new A.Point(2 * this.current.x - this.control.x, 2 * this.current.y - this.control.y);
  11299. }, this.makeAbsolute = function (t) {
  11300. return this.isRelativeCommand() && (t.x += this.current.x, t.y += this.current.y), t;
  11301. }, this.addMarker = function (t, e, i) {
  11302. null != i && 0 < this.angles.length && null == this.angles[this.angles.length - 1] && (this.angles[this.angles.length - 1] = this.points[this.points.length - 1].angleTo(i)), this.addMarkerAngle(t, null == e ? null : e.angleTo(t));
  11303. }, this.addMarkerAngle = function (t, e) {
  11304. this.points.push(t), this.angles.push(e);
  11305. }, this.getMarkerPoints = function () {
  11306. return this.points;
  11307. }, this.getMarkerAngles = function () {
  11308. for (var t = 0; t < this.angles.length; t++) {
  11309. if (null == this.angles[t]) for (var e = t + 1; e < this.angles.length; e++) {
  11310. if (null != this.angles[e]) {
  11311. this.angles[t] = this.angles[e];
  11312. break;
  11313. }
  11314. }
  11315. }
  11316. return this.angles;
  11317. };
  11318. }(e), this.path = function (t) {
  11319. var e = this.PathParser;
  11320. e.reset();
  11321. var i = new A.BoundingBox();
  11322. for (null != t && t.beginPath(); !e.isEnd();) {
  11323. switch (e.nextCommand(), e.command) {
  11324. case "M":
  11325. case "m":
  11326. var n = e.getAsCurrentPoint();
  11327. for (e.addMarker(n), i.addPoint(n.x, n.y), null != t && t.moveTo(n.x, n.y), e.start = e.current; !e.isCommandOrEnd();) {
  11328. n = e.getAsCurrentPoint(), e.addMarker(n, e.start), i.addPoint(n.x, n.y), null != t && t.lineTo(n.x, n.y);
  11329. }
  11330. break;
  11331. case "L":
  11332. case "l":
  11333. for (; !e.isCommandOrEnd();) {
  11334. var s = e.current;
  11335. n = e.getAsCurrentPoint(), e.addMarker(n, s), i.addPoint(n.x, n.y), null != t && t.lineTo(n.x, n.y);
  11336. }
  11337. break;
  11338. case "H":
  11339. case "h":
  11340. for (; !e.isCommandOrEnd();) {
  11341. var a = new A.Point((e.isRelativeCommand() ? e.current.x : 0) + e.getScalar(), e.current.y);
  11342. e.addMarker(a, e.current), e.current = a, i.addPoint(e.current.x, e.current.y), null != t && t.lineTo(e.current.x, e.current.y);
  11343. }
  11344. break;
  11345. case "V":
  11346. case "v":
  11347. for (; !e.isCommandOrEnd();) {
  11348. a = new A.Point(e.current.x, (e.isRelativeCommand() ? e.current.y : 0) + e.getScalar()), e.addMarker(a, e.current), e.current = a, i.addPoint(e.current.x, e.current.y), null != t && t.lineTo(e.current.x, e.current.y);
  11349. }
  11350. break;
  11351. case "C":
  11352. case "c":
  11353. for (; !e.isCommandOrEnd();) {
  11354. var r = e.current,
  11355. o = e.getPoint(),
  11356. l = e.getAsControlPoint(),
  11357. h = e.getAsCurrentPoint();
  11358. e.addMarker(h, l, o), i.addBezierCurve(r.x, r.y, o.x, o.y, l.x, l.y, h.x, h.y), null != t && t.bezierCurveTo(o.x, o.y, l.x, l.y, h.x, h.y);
  11359. }
  11360. break;
  11361. case "S":
  11362. case "s":
  11363. for (; !e.isCommandOrEnd();) {
  11364. r = e.current, o = e.getReflectedControlPoint(), l = e.getAsControlPoint(), h = e.getAsCurrentPoint(), e.addMarker(h, l, o), i.addBezierCurve(r.x, r.y, o.x, o.y, l.x, l.y, h.x, h.y), null != t && t.bezierCurveTo(o.x, o.y, l.x, l.y, h.x, h.y);
  11365. }
  11366. break;
  11367. case "Q":
  11368. case "q":
  11369. for (; !e.isCommandOrEnd();) {
  11370. r = e.current, l = e.getAsControlPoint(), h = e.getAsCurrentPoint(), e.addMarker(h, l, l), i.addQuadraticCurve(r.x, r.y, l.x, l.y, h.x, h.y), null != t && t.quadraticCurveTo(l.x, l.y, h.x, h.y);
  11371. }
  11372. break;
  11373. case "T":
  11374. case "t":
  11375. for (; !e.isCommandOrEnd();) {
  11376. r = e.current, l = e.getReflectedControlPoint(), e.control = l, h = e.getAsCurrentPoint(), e.addMarker(h, l, l), i.addQuadraticCurve(r.x, r.y, l.x, l.y, h.x, h.y), null != t && t.quadraticCurveTo(l.x, l.y, h.x, h.y);
  11377. }
  11378. break;
  11379. case "A":
  11380. case "a":
  11381. for (; !e.isCommandOrEnd();) {
  11382. r = e.current;
  11383. var u = e.getScalar(),
  11384. c = e.getScalar(),
  11385. f = e.getScalar() * (Math.PI / 180),
  11386. m = e.getScalar(),
  11387. p = e.getScalar(),
  11388. d = (h = e.getAsCurrentPoint(), new A.Point(Math.cos(f) * (r.x - h.x) / 2 + Math.sin(f) * (r.y - h.y) / 2, -Math.sin(f) * (r.x - h.x) / 2 + Math.cos(f) * (r.y - h.y) / 2)),
  11389. y = Math.pow(d.x, 2) / Math.pow(u, 2) + Math.pow(d.y, 2) / Math.pow(c, 2);
  11390. 1 < y && (u *= Math.sqrt(y), c *= Math.sqrt(y));
  11391. var v = (m == p ? -1 : 1) * Math.sqrt((Math.pow(u, 2) * Math.pow(c, 2) - Math.pow(u, 2) * Math.pow(d.y, 2) - Math.pow(c, 2) * Math.pow(d.x, 2)) / (Math.pow(u, 2) * Math.pow(d.y, 2) + Math.pow(c, 2) * Math.pow(d.x, 2)));
  11392. isNaN(v) && (v = 0);
  11393. var g = new A.Point(v * u * d.y / c, v * -c * d.x / u),
  11394. x = new A.Point((r.x + h.x) / 2 + Math.cos(f) * g.x - Math.sin(f) * g.y, (r.y + h.y) / 2 + Math.sin(f) * g.x + Math.cos(f) * g.y),
  11395. b = function b(t) {
  11396. return Math.sqrt(Math.pow(t[0], 2) + Math.pow(t[1], 2));
  11397. },
  11398. P = function P(t, e) {
  11399. return (t[0] * e[0] + t[1] * e[1]) / (b(t) * b(e));
  11400. },
  11401. E = function E(t, e) {
  11402. return (t[0] * e[1] < t[1] * e[0] ? -1 : 1) * Math.acos(P(t, e));
  11403. },
  11404. w = E([1, 0], [(d.x - g.x) / u, (d.y - g.y) / c]),
  11405. B = [(d.x - g.x) / u, (d.y - g.y) / c],
  11406. C = [(-d.x - g.x) / u, (-d.y - g.y) / c],
  11407. T = E(B, C);
  11408. P(B, C) <= -1 && (T = Math.PI), 1 <= P(B, C) && (T = 0);
  11409. var V = 1 - p ? 1 : -1,
  11410. M = w + V * (T / 2),
  11411. S = new A.Point(x.x + u * Math.cos(M), x.y + c * Math.sin(M));
  11412. if (e.addMarkerAngle(S, M - V * Math.PI / 2), e.addMarkerAngle(h, M - V * Math.PI), i.addPoint(h.x, h.y), null != t) {
  11413. P = c < u ? u : c;
  11414. var k = c < u ? 1 : u / c,
  11415. D = c < u ? c / u : 1;
  11416. t.translate(x.x, x.y), t.rotate(f), t.scale(k, D), t.arc(0, 0, P, w, w + T, 1 - p), t.scale(1 / k, 1 / D), t.rotate(-f), t.translate(-x.x, -x.y);
  11417. }
  11418. }
  11419. break;
  11420. case "Z":
  11421. case "z":
  11422. null != t && i.x1 !== i.x2 && i.y1 !== i.y2 && t.closePath(), e.current = e.start;
  11423. }
  11424. }
  11425. return i;
  11426. }, this.getMarkers = function () {
  11427. for (var t = this.PathParser.getMarkerPoints(), e = this.PathParser.getMarkerAngles(), i = [], n = 0; n < t.length; n++) {
  11428. i.push([t[n], e[n]]);
  11429. }
  11430. return i;
  11431. };
  11432. }, A.Element.path.prototype = new A.Element.PathElementBase(), A.Element.pattern = function (t) {
  11433. this.base = A.Element.ElementBase, this.base(t), this.createPattern = function (t, e) {
  11434. var i = this.attribute("width").toPixels("x", !0),
  11435. n = this.attribute("height").toPixels("y", !0),
  11436. s = new A.Element.svg();
  11437. s.attributes.viewBox = new A.Property("viewBox", this.attribute("viewBox").value), s.attributes.width = new A.Property("width", i + "px"), s.attributes.height = new A.Property("height", n + "px"), s.attributes.transform = new A.Property("transform", this.attribute("patternTransform").value), s.children = this.children;
  11438. var a = p();
  11439. a.width = i, a.height = n;
  11440. var r = a.getContext("2d");
  11441. this.attribute("x").hasValue() && this.attribute("y").hasValue() && r.translate(this.attribute("x").toPixels("x", !0), this.attribute("y").toPixels("y", !0));
  11442. for (var o = -1; o <= 1; o++) {
  11443. for (var l = -1; l <= 1; l++) {
  11444. r.save(), s.attributes.x = new A.Property("x", o * a.width), s.attributes.y = new A.Property("y", l * a.height), s.render(r), r.restore();
  11445. }
  11446. }
  11447. return t.createPattern(a, "repeat");
  11448. };
  11449. }, A.Element.pattern.prototype = new A.Element.ElementBase(), A.Element.marker = function (t) {
  11450. this.base = A.Element.ElementBase, this.base(t), this.baseRender = this.render, this.render = function (t, e, i) {
  11451. if (e) {
  11452. t.translate(e.x, e.y), "auto" == this.attribute("orient").valueOrDefault("auto") && t.rotate(i), "strokeWidth" == this.attribute("markerUnits").valueOrDefault("strokeWidth") && t.scale(t.lineWidth, t.lineWidth), t.save();
  11453. var n = new A.Element.svg();
  11454. n.attributes.viewBox = new A.Property("viewBox", this.attribute("viewBox").value), n.attributes.refX = new A.Property("refX", this.attribute("refX").value), n.attributes.refY = new A.Property("refY", this.attribute("refY").value), n.attributes.width = new A.Property("width", this.attribute("markerWidth").value), n.attributes.height = new A.Property("height", this.attribute("markerHeight").value), n.attributes.fill = new A.Property("fill", this.attribute("fill").valueOrDefault("black")), n.attributes.stroke = new A.Property("stroke", this.attribute("stroke").valueOrDefault("none")), n.children = this.children, n.render(t), t.restore(), "strokeWidth" == this.attribute("markerUnits").valueOrDefault("strokeWidth") && t.scale(1 / t.lineWidth, 1 / t.lineWidth), "auto" == this.attribute("orient").valueOrDefault("auto") && t.rotate(-i), t.translate(-e.x, -e.y);
  11455. }
  11456. };
  11457. }, A.Element.marker.prototype = new A.Element.ElementBase(), A.Element.defs = function (t) {
  11458. this.base = A.Element.ElementBase, this.base(t), this.render = function (t) {};
  11459. }, A.Element.defs.prototype = new A.Element.ElementBase(), A.Element.GradientBase = function (t) {
  11460. this.base = A.Element.ElementBase, this.base(t), this.stops = [];
  11461. for (var e = 0; e < this.children.length; e++) {
  11462. var i = this.children[e];
  11463. "stop" == i.type && this.stops.push(i);
  11464. }
  11465. this.getGradient = function () {}, this.gradientUnits = function () {
  11466. return this.attribute("gradientUnits").valueOrDefault("objectBoundingBox");
  11467. }, this.attributesToInherit = ["gradientUnits"], this.inheritStopContainer = function (t) {
  11468. for (var e = 0; e < this.attributesToInherit.length; e++) {
  11469. var i = this.attributesToInherit[e];
  11470. !this.attribute(i).hasValue() && t.attribute(i).hasValue() && (this.attribute(i, !0).value = t.attribute(i).value);
  11471. }
  11472. }, this.createGradient = function (t, e, i) {
  11473. var n = this;
  11474. this.getHrefAttribute().hasValue() && (n = this.getHrefAttribute().getDefinition(), this.inheritStopContainer(n));
  11475. var s = function s(t) {
  11476. return i.hasValue() ? new A.Property("color", t).addOpacity(i).value : t;
  11477. },
  11478. a = this.getGradient(t, e);
  11479. if (null == a) return s(n.stops[n.stops.length - 1].color);
  11480. for (var r = 0; r < n.stops.length; r++) {
  11481. a.addColorStop(n.stops[r].offset, s(n.stops[r].color));
  11482. }
  11483. if (this.attribute("gradientTransform").hasValue()) {
  11484. var o = A.ViewPort.viewPorts[0],
  11485. l = new A.Element.rect();
  11486. l.attributes.x = new A.Property("x", -A.MAX_VIRTUAL_PIXELS / 3), l.attributes.y = new A.Property("y", -A.MAX_VIRTUAL_PIXELS / 3), l.attributes.width = new A.Property("width", A.MAX_VIRTUAL_PIXELS), l.attributes.height = new A.Property("height", A.MAX_VIRTUAL_PIXELS);
  11487. var h = new A.Element.g();
  11488. h.attributes.transform = new A.Property("transform", this.attribute("gradientTransform").value), h.children = [l];
  11489. var u = new A.Element.svg();
  11490. u.attributes.x = new A.Property("x", 0), u.attributes.y = new A.Property("y", 0), u.attributes.width = new A.Property("width", o.width), u.attributes.height = new A.Property("height", o.height), u.children = [h];
  11491. var c = p();
  11492. c.width = o.width, c.height = o.height;
  11493. var f = c.getContext("2d");
  11494. return f.fillStyle = a, u.render(f), f.createPattern(c, "no-repeat");
  11495. }
  11496. return a;
  11497. };
  11498. }, A.Element.GradientBase.prototype = new A.Element.ElementBase(), A.Element.linearGradient = function (t) {
  11499. this.base = A.Element.GradientBase, this.base(t), this.attributesToInherit.push("x1"), this.attributesToInherit.push("y1"), this.attributesToInherit.push("x2"), this.attributesToInherit.push("y2"), this.getGradient = function (t, e) {
  11500. var i = "objectBoundingBox" == this.gradientUnits() ? e.getBoundingBox(t) : null;
  11501. this.attribute("x1").hasValue() || this.attribute("y1").hasValue() || this.attribute("x2").hasValue() || this.attribute("y2").hasValue() || (this.attribute("x1", !0).value = 0, this.attribute("y1", !0).value = 0, this.attribute("x2", !0).value = 1, this.attribute("y2", !0).value = 0);
  11502. var n = "objectBoundingBox" == this.gradientUnits() ? i.x() + i.width() * this.attribute("x1").numValue() : this.attribute("x1").toPixels("x"),
  11503. s = "objectBoundingBox" == this.gradientUnits() ? i.y() + i.height() * this.attribute("y1").numValue() : this.attribute("y1").toPixels("y"),
  11504. a = "objectBoundingBox" == this.gradientUnits() ? i.x() + i.width() * this.attribute("x2").numValue() : this.attribute("x2").toPixels("x"),
  11505. r = "objectBoundingBox" == this.gradientUnits() ? i.y() + i.height() * this.attribute("y2").numValue() : this.attribute("y2").toPixels("y");
  11506. return n == a && s == r ? null : t.createLinearGradient(n, s, a, r);
  11507. };
  11508. }, A.Element.linearGradient.prototype = new A.Element.GradientBase(), A.Element.radialGradient = function (t) {
  11509. this.base = A.Element.GradientBase, this.base(t), this.attributesToInherit.push("cx"), this.attributesToInherit.push("cy"), this.attributesToInherit.push("r"), this.attributesToInherit.push("fx"), this.attributesToInherit.push("fy"), this.getGradient = function (t, e) {
  11510. var i = e.getBoundingBox(t);
  11511. this.attribute("cx").hasValue() || (this.attribute("cx", !0).value = "50%"), this.attribute("cy").hasValue() || (this.attribute("cy", !0).value = "50%"), this.attribute("r").hasValue() || (this.attribute("r", !0).value = "50%");
  11512. var n = "objectBoundingBox" == this.gradientUnits() ? i.x() + i.width() * this.attribute("cx").numValue() : this.attribute("cx").toPixels("x"),
  11513. s = "objectBoundingBox" == this.gradientUnits() ? i.y() + i.height() * this.attribute("cy").numValue() : this.attribute("cy").toPixels("y"),
  11514. a = n,
  11515. r = s;
  11516. this.attribute("fx").hasValue() && (a = "objectBoundingBox" == this.gradientUnits() ? i.x() + i.width() * this.attribute("fx").numValue() : this.attribute("fx").toPixels("x")), this.attribute("fy").hasValue() && (r = "objectBoundingBox" == this.gradientUnits() ? i.y() + i.height() * this.attribute("fy").numValue() : this.attribute("fy").toPixels("y"));
  11517. var o = "objectBoundingBox" == this.gradientUnits() ? (i.width() + i.height()) / 2 * this.attribute("r").numValue() : this.attribute("r").toPixels();
  11518. return t.createRadialGradient(a, r, 0, n, s, o);
  11519. };
  11520. }, A.Element.radialGradient.prototype = new A.Element.GradientBase(), A.Element.stop = function (t) {
  11521. this.base = A.Element.ElementBase, this.base(t), this.offset = this.attribute("offset").numValue(), this.offset < 0 && (this.offset = 0), 1 < this.offset && (this.offset = 1);
  11522. var e = this.style("stop-color", !0);
  11523. "" === e.value && (e.value = "#000"), this.style("stop-opacity").hasValue() && (e = e.addOpacity(this.style("stop-opacity"))), this.color = e.value;
  11524. }, A.Element.stop.prototype = new A.Element.ElementBase(), A.Element.AnimateBase = function (t) {
  11525. this.base = A.Element.ElementBase, this.base(t), A.Animations.push(this), this.duration = 0, this.begin = this.attribute("begin").toMilliseconds(), this.maxDuration = this.begin + this.attribute("dur").toMilliseconds(), this.getProperty = function () {
  11526. var t = this.attribute("attributeType").value,
  11527. e = this.attribute("attributeName").value;
  11528. return "CSS" == t ? this.parent.style(e, !0) : this.parent.attribute(e, !0);
  11529. }, this.initialValue = null, this.initialUnits = "", this.removed = !1, this.calcValue = function () {
  11530. return "";
  11531. }, this.update = function (t) {
  11532. if (null == this.initialValue && (this.initialValue = this.getProperty().value, this.initialUnits = this.getProperty().getUnits()), this.duration > this.maxDuration) {
  11533. if ("indefinite" == this.attribute("repeatCount").value || "indefinite" == this.attribute("repeatDur").value) this.duration = 0;else if ("freeze" != this.attribute("fill").valueOrDefault("remove") || this.frozen) {
  11534. if ("remove" == this.attribute("fill").valueOrDefault("remove") && !this.removed) return this.removed = !0, this.getProperty().value = this.parent.animationFrozen ? this.parent.animationFrozenValue : this.initialValue, !0;
  11535. } else this.frozen = !0, this.parent.animationFrozen = !0, this.parent.animationFrozenValue = this.getProperty().value;
  11536. return !1;
  11537. }
  11538. this.duration = this.duration + t;
  11539. var e = !1;
  11540. if (this.begin < this.duration) {
  11541. var i = this.calcValue();
  11542. this.attribute("type").hasValue() && (i = this.attribute("type").value + "(" + i + ")"), this.getProperty().value = i, e = !0;
  11543. }
  11544. return e;
  11545. }, this.from = this.attribute("from"), this.to = this.attribute("to"), this.values = this.attribute("values"), this.values.hasValue() && (this.values.value = this.values.value.split(";")), this.progress = function () {
  11546. var t = {
  11547. progress: (this.duration - this.begin) / (this.maxDuration - this.begin)
  11548. };
  11549. if (this.values.hasValue()) {
  11550. var e = t.progress * (this.values.value.length - 1),
  11551. i = Math.floor(e),
  11552. n = Math.ceil(e);
  11553. t.from = new A.Property("from", parseFloat(this.values.value[i])), t.to = new A.Property("to", parseFloat(this.values.value[n])), t.progress = (e - i) / (n - i);
  11554. } else t.from = this.from, t.to = this.to;
  11555. return t;
  11556. };
  11557. }, A.Element.AnimateBase.prototype = new A.Element.ElementBase(), A.Element.animate = function (t) {
  11558. this.base = A.Element.AnimateBase, this.base(t), this.calcValue = function () {
  11559. var t = this.progress();
  11560. return t.from.numValue() + (t.to.numValue() - t.from.numValue()) * t.progress + this.initialUnits;
  11561. };
  11562. }, A.Element.animate.prototype = new A.Element.AnimateBase(), A.Element.animateColor = function (t) {
  11563. this.base = A.Element.AnimateBase, this.base(t), this.calcValue = function () {
  11564. var t = this.progress(),
  11565. e = new m(t.from.value),
  11566. i = new m(t.to.value);
  11567. if (e.ok && i.ok) {
  11568. var n = e.r + (i.r - e.r) * t.progress,
  11569. s = e.g + (i.g - e.g) * t.progress,
  11570. a = e.b + (i.b - e.b) * t.progress;
  11571. return "rgb(" + parseInt(n, 10) + "," + parseInt(s, 10) + "," + parseInt(a, 10) + ")";
  11572. }
  11573. return this.attribute("from").value;
  11574. };
  11575. }, A.Element.animateColor.prototype = new A.Element.AnimateBase(), A.Element.animateTransform = function (t) {
  11576. this.base = A.Element.AnimateBase, this.base(t), this.calcValue = function () {
  11577. for (var t = this.progress(), e = A.ToNumberArray(t.from.value), i = A.ToNumberArray(t.to.value), n = "", s = 0; s < e.length; s++) {
  11578. n += e[s] + (i[s] - e[s]) * t.progress + " ";
  11579. }
  11580. return n;
  11581. };
  11582. }, A.Element.animateTransform.prototype = new A.Element.animate(), A.Element.font = function (t) {
  11583. this.base = A.Element.ElementBase, this.base(t), this.horizAdvX = this.attribute("horiz-adv-x").numValue(), this.isRTL = !1, this.isArabic = !1, this.fontFace = null, this.missingGlyph = null, this.glyphs = [];
  11584. for (var e = 0; e < this.children.length; e++) {
  11585. var i = this.children[e];
  11586. "font-face" == i.type ? (this.fontFace = i).style("font-family").hasValue() && (A.Definitions[i.style("font-family").value] = this) : "missing-glyph" == i.type ? this.missingGlyph = i : "glyph" == i.type && ("" != i.arabicForm ? (this.isRTL = !0, this.isArabic = !0, void 0 === this.glyphs[i.unicode] && (this.glyphs[i.unicode] = []), this.glyphs[i.unicode][i.arabicForm] = i) : this.glyphs[i.unicode] = i);
  11587. }
  11588. }, A.Element.font.prototype = new A.Element.ElementBase(), A.Element.fontface = function (t) {
  11589. this.base = A.Element.ElementBase, this.base(t), this.ascent = this.attribute("ascent").value, this.descent = this.attribute("descent").value, this.unitsPerEm = this.attribute("units-per-em").numValue();
  11590. }, A.Element.fontface.prototype = new A.Element.ElementBase(), A.Element.missingglyph = function (t) {
  11591. this.base = A.Element.path, this.base(t), this.horizAdvX = 0;
  11592. }, A.Element.missingglyph.prototype = new A.Element.path(), A.Element.glyph = function (t) {
  11593. this.base = A.Element.path, this.base(t), this.horizAdvX = this.attribute("horiz-adv-x").numValue(), this.unicode = this.attribute("unicode").value, this.arabicForm = this.attribute("arabic-form").value;
  11594. }, A.Element.glyph.prototype = new A.Element.path(), A.Element.text = function (t) {
  11595. this.captureTextNodes = !0, this.base = A.Element.RenderedElementBase, this.base(t), this.baseSetContext = this.setContext, this.setContext = function (t) {
  11596. this.baseSetContext(t);
  11597. var e = this.style("dominant-baseline").toTextBaseline();
  11598. null == e && (e = this.style("alignment-baseline").toTextBaseline()), null != e && (t.textBaseline = e);
  11599. }, this.initializeCoordinates = function (t) {
  11600. this.x = this.attribute("x").toPixels("x"), this.y = this.attribute("y").toPixels("y"), this.attribute("dx").hasValue() && (this.x += this.attribute("dx").toPixels("x")), this.attribute("dy").hasValue() && (this.y += this.attribute("dy").toPixels("y")), this.x += this.getAnchorDelta(t, this, 0);
  11601. }, this.getBoundingBox = function (t) {
  11602. this.initializeCoordinates(t);
  11603. for (var e = null, i = 0; i < this.children.length; i++) {
  11604. var n = this.getChildBoundingBox(t, this, this, i);
  11605. null == e ? e = n : e.addBoundingBox(n);
  11606. }
  11607. return e;
  11608. }, this.renderChildren = function (t) {
  11609. this.initializeCoordinates(t);
  11610. for (var e = 0; e < this.children.length; e++) {
  11611. this.renderChild(t, this, this, e);
  11612. }
  11613. }, this.getAnchorDelta = function (t, e, i) {
  11614. var n = this.style("text-anchor").valueOrDefault("start");
  11615. if ("start" != n) {
  11616. for (var s = 0, a = i; a < e.children.length; a++) {
  11617. var r = e.children[a];
  11618. if (i < a && r.attribute("x").hasValue()) break;
  11619. s += r.measureTextRecursive(t);
  11620. }
  11621. return -1 * ("end" == n ? s : s / 2);
  11622. }
  11623. return 0;
  11624. }, this.adjustChildCoordinates = function (t, e, i, n) {
  11625. var s = i.children[n];
  11626. return s.attribute("x").hasValue() ? (s.x = s.attribute("x").toPixels("x") + e.getAnchorDelta(t, i, n), s.attribute("dx").hasValue() && (s.x += s.attribute("dx").toPixels("x"))) : (s.attribute("dx").hasValue() && (e.x += s.attribute("dx").toPixels("x")), s.x = e.x), e.x = s.x + s.measureText(t), s.attribute("y").hasValue() ? (s.y = s.attribute("y").toPixels("y"), s.attribute("dy").hasValue() && (s.y += s.attribute("dy").toPixels("y"))) : (s.attribute("dy").hasValue() && (e.y += s.attribute("dy").toPixels("y")), s.y = e.y), e.y = s.y, s;
  11627. }, this.getChildBoundingBox = function (t, e, i, n) {
  11628. var s = this.adjustChildCoordinates(t, e, i, n),
  11629. a = s.getBoundingBox(t);
  11630. for (n = 0; n < s.children.length; n++) {
  11631. var r = e.getChildBoundingBox(t, e, s, n);
  11632. a.addBoundingBox(r);
  11633. }
  11634. return a;
  11635. }, this.renderChild = function (t, e, i, n) {
  11636. var s = this.adjustChildCoordinates(t, e, i, n);
  11637. for (s.render(t), n = 0; n < s.children.length; n++) {
  11638. e.renderChild(t, e, s, n);
  11639. }
  11640. };
  11641. }, A.Element.text.prototype = new A.Element.RenderedElementBase(), A.Element.TextElementBase = function (t) {
  11642. this.base = A.Element.RenderedElementBase, this.base(t), this.getGlyph = function (t, e, i) {
  11643. var n = e[i],
  11644. s = null;
  11645. if (t.isArabic) {
  11646. var a = "isolated";
  11647. (0 == i || " " == e[i - 1]) && i < e.length - 2 && " " != e[i + 1] && (a = "terminal"), 0 < i && " " != e[i - 1] && i < e.length - 2 && " " != e[i + 1] && (a = "medial"), 0 < i && " " != e[i - 1] && (i == e.length - 1 || " " == e[i + 1]) && (a = "initial"), void 0 !== t.glyphs[n] && null == (s = t.glyphs[n][a]) && "glyph" == t.glyphs[n].type && (s = t.glyphs[n]);
  11648. } else s = t.glyphs[n];
  11649. return null == s && (s = t.missingGlyph), s;
  11650. }, this.renderChildren = function (t) {
  11651. var e = this.parent.style("font-family").getDefinition();
  11652. if (null == e) "stroke" == t.paintOrder ? ("" != t.strokeStyle && t.strokeText(A.compressSpaces(this.getText()), this.x, this.y), "" != t.fillStyle && t.fillText(A.compressSpaces(this.getText()), this.x, this.y)) : ("" != t.fillStyle && t.fillText(A.compressSpaces(this.getText()), this.x, this.y), "" != t.strokeStyle && t.strokeText(A.compressSpaces(this.getText()), this.x, this.y));else {
  11653. var i = this.parent.style("font-size").numValueOrDefault(A.Font.Parse(A.ctx.font).fontSize),
  11654. n = this.parent.style("font-style").valueOrDefault(A.Font.Parse(A.ctx.font).fontStyle),
  11655. s = this.getText();
  11656. e.isRTL && (s = s.split("").reverse().join(""));
  11657. for (var a = A.ToNumberArray(this.parent.attribute("dx").value), r = 0; r < s.length; r++) {
  11658. var o = this.getGlyph(e, s, r),
  11659. l = i / e.fontFace.unitsPerEm;
  11660. t.translate(this.x, this.y), t.scale(l, -l);
  11661. var h = t.lineWidth;
  11662. t.lineWidth = t.lineWidth * e.fontFace.unitsPerEm / i, "italic" == n && t.transform(1, 0, .4, 1, 0, 0), o.render(t), "italic" == n && t.transform(1, 0, -.4, 1, 0, 0), t.lineWidth = h, t.scale(1 / l, -1 / l), t.translate(-this.x, -this.y), this.x += i * (o.horizAdvX || e.horizAdvX) / e.fontFace.unitsPerEm, void 0 === a[r] || isNaN(a[r]) || (this.x += a[r]);
  11663. }
  11664. }
  11665. }, this.getText = function () {}, this.measureTextRecursive = function (t) {
  11666. for (var e = this.measureText(t), i = 0; i < this.children.length; i++) {
  11667. e += this.children[i].measureTextRecursive(t);
  11668. }
  11669. return e;
  11670. }, this.measureText = function (t) {
  11671. var e = this.parent.style("font-family").getDefinition();
  11672. if (null != e) {
  11673. var i = this.parent.style("font-size").numValueOrDefault(A.Font.Parse(A.ctx.font).fontSize),
  11674. n = 0,
  11675. s = this.getText();
  11676. e.isRTL && (s = s.split("").reverse().join(""));
  11677. for (var a = A.ToNumberArray(this.parent.attribute("dx").value), r = 0; r < s.length; r++) {
  11678. n += (this.getGlyph(e, s, r).horizAdvX || e.horizAdvX) * i / e.fontFace.unitsPerEm, void 0 === a[r] || isNaN(a[r]) || (n += a[r]);
  11679. }
  11680. return n;
  11681. }
  11682. var o = A.compressSpaces(this.getText());
  11683. if (!t.measureText) return 10 * o.length;
  11684. t.save(), this.setContext(t, !0);
  11685. var l = t.measureText(o).width;
  11686. return t.restore(), l;
  11687. }, this.getBoundingBox = function (t) {
  11688. var e = this.parent.style("font-size").numValueOrDefault(A.Font.Parse(A.ctx.font).fontSize);
  11689. return new A.BoundingBox(this.x, this.y - e, this.x + this.measureText(t), this.y);
  11690. };
  11691. }, A.Element.TextElementBase.prototype = new A.Element.RenderedElementBase(), A.Element.tspan = function (t) {
  11692. this.captureTextNodes = !0, this.base = A.Element.TextElementBase, this.base(t), this.text = A.compressSpaces(t.value || t.text || t.textContent || ""), this.getText = function () {
  11693. return 0 < this.children.length ? "" : this.text;
  11694. };
  11695. }, A.Element.tspan.prototype = new A.Element.TextElementBase(), A.Element.tref = function (t) {
  11696. this.base = A.Element.TextElementBase, this.base(t), this.getText = function () {
  11697. var t = this.getHrefAttribute().getDefinition();
  11698. if (null != t) return t.children[0].getText();
  11699. };
  11700. }, A.Element.tref.prototype = new A.Element.TextElementBase(), A.Element.a = function (t) {
  11701. this.base = A.Element.TextElementBase, this.base(t), this.hasText = 0 < t.childNodes.length;
  11702. for (var e = 0; e < t.childNodes.length; e++) {
  11703. 3 != t.childNodes[e].nodeType && (this.hasText = !1);
  11704. }
  11705. this.text = this.hasText ? t.childNodes[0].value || t.childNodes[0].data : "", this.getText = function () {
  11706. return this.text;
  11707. }, this.baseRenderChildren = this.renderChildren, this.renderChildren = function (t) {
  11708. if (this.hasText) {
  11709. this.baseRenderChildren(t);
  11710. var e = new A.Property("fontSize", A.Font.Parse(A.ctx.font).fontSize);
  11711. A.Mouse.checkBoundingBox(this, new A.BoundingBox(this.x, this.y - e.toPixels("y"), this.x + this.measureText(t), this.y));
  11712. } else if (0 < this.children.length) {
  11713. var i = new A.Element.g();
  11714. i.children = this.children, i.parent = this, i.render(t);
  11715. }
  11716. }, this.onclick = function () {
  11717. u.open(this.getHrefAttribute().value);
  11718. }, this.onmousemove = function () {
  11719. A.ctx.canvas.style.cursor = "pointer";
  11720. };
  11721. }, A.Element.a.prototype = new A.Element.TextElementBase(), A.Element.image = function (t) {
  11722. this.base = A.Element.RenderedElementBase, this.base(t);
  11723. var e = this.getHrefAttribute().value;
  11724. if ("" != e) {
  11725. var a = e.match(/\.svg$/);
  11726. if (A.Images.push(this), this.loaded = !1, a) this.img = A.ajax(e), this.loaded = !0;else {
  11727. this.img = document.createElement("img"), 1 == A.opts.useCORS && (this.img.crossOrigin = "Anonymous");
  11728. var r = this;
  11729. this.img.onload = function () {
  11730. r.loaded = !0;
  11731. }, this.img.onerror = function () {
  11732. A.log('ERROR: image "' + e + '" not found'), r.loaded = !0;
  11733. }, this.img.src = e;
  11734. }
  11735. this.renderChildren = function (t) {
  11736. var e = this.attribute("x").toPixels("x"),
  11737. i = this.attribute("y").toPixels("y"),
  11738. n = this.attribute("width").toPixels("x"),
  11739. s = this.attribute("height").toPixels("y");
  11740. 0 != n && 0 != s && (t.save(), a ? t.drawSvg(this.img, e, i, n, s) : (t.translate(e, i), A.AspectRatio(t, this.attribute("preserveAspectRatio").value, n, this.img.width, s, this.img.height, 0, 0), r.loaded && (void 0 === this.img.complete || this.img.complete) && t.drawImage(this.img, 0, 0)), t.restore());
  11741. }, this.getBoundingBox = function () {
  11742. var t = this.attribute("x").toPixels("x"),
  11743. e = this.attribute("y").toPixels("y"),
  11744. i = this.attribute("width").toPixels("x"),
  11745. n = this.attribute("height").toPixels("y");
  11746. return new A.BoundingBox(t, e, t + i, e + n);
  11747. };
  11748. }
  11749. }, A.Element.image.prototype = new A.Element.RenderedElementBase(), A.Element.g = function (t) {
  11750. this.base = A.Element.RenderedElementBase, this.base(t), this.getBoundingBox = function (t) {
  11751. for (var e = new A.BoundingBox(), i = 0; i < this.children.length; i++) {
  11752. e.addBoundingBox(this.children[i].getBoundingBox(t));
  11753. }
  11754. return e;
  11755. };
  11756. }, A.Element.g.prototype = new A.Element.RenderedElementBase(), A.Element.symbol = function (t) {
  11757. this.base = A.Element.RenderedElementBase, this.base(t), this.render = function (t) {};
  11758. }, A.Element.symbol.prototype = new A.Element.RenderedElementBase(), A.Element.style = function (t) {
  11759. this.base = A.Element.ElementBase, this.base(t);
  11760. for (var e = "", i = 0; i < t.childNodes.length; i++) {
  11761. e += t.childNodes[i].data;
  11762. }
  11763. e = e.replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm, "");
  11764. var n = (e = A.compressSpaces(e)).split("}");
  11765. for (i = 0; i < n.length; i++) {
  11766. if ("" != A.trim(n[i])) for (var s = n[i].split("{"), a = s[0].split(","), r = s[1].split(";"), o = 0; o < a.length; o++) {
  11767. var l = A.trim(a[o]);
  11768. if ("" != l) {
  11769. for (var h = A.Styles[l] || {}, u = 0; u < r.length; u++) {
  11770. var c = r[u].indexOf(":"),
  11771. f = r[u].substr(0, c),
  11772. m = r[u].substr(c + 1, r[u].length - c);
  11773. null != f && null != m && (h[A.trim(f)] = new A.Property(A.trim(f), A.trim(m)));
  11774. }
  11775. if (A.Styles[l] = h, A.StylesSpecificity[l] = w(l), "@font-face" == l) for (var p = h["font-family"].value.replace(/"/g, ""), d = h.src.value.split(","), y = 0; y < d.length; y++) {
  11776. if (0 < d[y].indexOf('format("svg")')) for (var v = d[y].indexOf("url"), g = d[y].indexOf(")", v), x = d[y].substr(v + 5, g - v - 6), b = A.parseXml(A.ajax(x)).getElementsByTagName("font"), P = 0; P < b.length; P++) {
  11777. var E = A.CreateElement(b[P]);
  11778. A.Definitions[p] = E;
  11779. }
  11780. }
  11781. }
  11782. }
  11783. }
  11784. }, A.Element.style.prototype = new A.Element.ElementBase(), A.Element.use = function (t) {
  11785. this.base = A.Element.RenderedElementBase, this.base(t), this.baseSetContext = this.setContext, this.setContext = function (t) {
  11786. this.baseSetContext(t), this.attribute("x").hasValue() && t.translate(this.attribute("x").toPixels("x"), 0), this.attribute("y").hasValue() && t.translate(0, this.attribute("y").toPixels("y"));
  11787. };
  11788. var n = this.getHrefAttribute().getDefinition();
  11789. this.path = function (t) {
  11790. null != n && n.path(t);
  11791. }, this.elementTransform = function () {
  11792. if (null != n && n.style("transform", !1, !0).hasValue()) return new A.Transform(n.style("transform", !1, !0).value);
  11793. }, this.getBoundingBox = function (t) {
  11794. if (null != n) return n.getBoundingBox(t);
  11795. }, this.renderChildren = function (t) {
  11796. if (null != n) {
  11797. var e = n;
  11798. "symbol" == n.type && ((e = new A.Element.svg()).type = "svg", e.attributes.viewBox = new A.Property("viewBox", n.attribute("viewBox").value), e.attributes.preserveAspectRatio = new A.Property("preserveAspectRatio", n.attribute("preserveAspectRatio").value), e.attributes.overflow = new A.Property("overflow", n.attribute("overflow").value), e.children = n.children), "svg" == e.type && (this.attribute("width").hasValue() && (e.attributes.width = new A.Property("width", this.attribute("width").value)), this.attribute("height").hasValue() && (e.attributes.height = new A.Property("height", this.attribute("height").value)));
  11799. var i = e.parent;
  11800. e.parent = null, e.render(t), e.parent = i;
  11801. }
  11802. };
  11803. }, A.Element.use.prototype = new A.Element.RenderedElementBase(), A.Element.mask = function (t) {
  11804. this.base = A.Element.ElementBase, this.base(t), this.apply = function (t, e) {
  11805. var i = this.attribute("x").toPixels("x"),
  11806. n = this.attribute("y").toPixels("y"),
  11807. s = this.attribute("width").toPixels("x"),
  11808. a = this.attribute("height").toPixels("y");
  11809. if (0 == s && 0 == a) {
  11810. for (var r = new A.BoundingBox(), o = 0; o < this.children.length; o++) {
  11811. r.addBoundingBox(this.children[o].getBoundingBox(t));
  11812. }
  11813. i = Math.floor(r.x1), n = Math.floor(r.y1), s = Math.floor(r.width()), a = Math.floor(r.height());
  11814. }
  11815. var l = e.attribute("mask").value;
  11816. e.attribute("mask").value = "";
  11817. var h = p();
  11818. h.width = i + s, h.height = n + a;
  11819. var u = h.getContext("2d");
  11820. this.renderChildren(u);
  11821. var c = p();
  11822. c.width = i + s, c.height = n + a;
  11823. var f = c.getContext("2d");
  11824. e.render(f), f.globalCompositeOperation = "destination-in", f.fillStyle = u.createPattern(h, "no-repeat"), f.fillRect(0, 0, i + s, n + a), t.fillStyle = f.createPattern(c, "no-repeat"), t.fillRect(0, 0, i + s, n + a), e.attribute("mask").value = l;
  11825. }, this.render = function (t) {};
  11826. }, A.Element.mask.prototype = new A.Element.ElementBase(), A.Element.clipPath = function (t) {
  11827. this.base = A.Element.ElementBase, this.base(t), this.apply = function (t) {
  11828. var e = "undefined" != typeof CanvasRenderingContext2D,
  11829. i = t.beginPath,
  11830. n = t.closePath;
  11831. e && (CanvasRenderingContext2D.prototype.beginPath = function () {}, CanvasRenderingContext2D.prototype.closePath = function () {}), i.call(t);
  11832. for (var s = 0; s < this.children.length; s++) {
  11833. var a = this.children[s];
  11834. if (void 0 !== a.path) {
  11835. var r = void 0 !== a.elementTransform && a.elementTransform();
  11836. !r && a.style("transform", !1, !0).hasValue() && (r = new A.Transform(a.style("transform", !1, !0).value)), r && r.apply(t), a.path(t), e && (CanvasRenderingContext2D.prototype.closePath = n), r && r.unapply(t);
  11837. }
  11838. }
  11839. n.call(t), t.clip(), e && (CanvasRenderingContext2D.prototype.beginPath = i, CanvasRenderingContext2D.prototype.closePath = n);
  11840. }, this.render = function (t) {};
  11841. }, A.Element.clipPath.prototype = new A.Element.ElementBase(), A.Element.filter = function (t) {
  11842. this.base = A.Element.ElementBase, this.base(t), this.apply = function (t, e) {
  11843. var i = e.getBoundingBox(t),
  11844. n = Math.floor(i.x1),
  11845. s = Math.floor(i.y1),
  11846. a = Math.floor(i.width()),
  11847. r = Math.floor(i.height()),
  11848. o = e.style("filter").value;
  11849. e.style("filter").value = "";
  11850. for (var l = 0, h = 0, u = 0; u < this.children.length; u++) {
  11851. var c = this.children[u].extraFilterDistance || 0;
  11852. l = Math.max(l, c), h = Math.max(h, c);
  11853. }
  11854. var f = p();
  11855. f.width = a + 2 * l, f.height = r + 2 * h;
  11856. var m = f.getContext("2d");
  11857. for (m.translate(-n + l, -s + h), e.render(m), u = 0; u < this.children.length; u++) {
  11858. "function" == typeof this.children[u].apply && this.children[u].apply(m, 0, 0, a + 2 * l, r + 2 * h);
  11859. }
  11860. t.drawImage(f, 0, 0, a + 2 * l, r + 2 * h, n - l, s - h, a + 2 * l, r + 2 * h), e.style("filter", !0).value = o;
  11861. }, this.render = function (t) {};
  11862. }, A.Element.filter.prototype = new A.Element.ElementBase(), A.Element.feMorphology = function (t) {
  11863. this.base = A.Element.ElementBase, this.base(t), this.apply = function (t, e, i, n, s) {};
  11864. }, A.Element.feMorphology.prototype = new A.Element.ElementBase(), A.Element.feComposite = function (t) {
  11865. this.base = A.Element.ElementBase, this.base(t), this.apply = function (t, e, i, n, s) {};
  11866. }, A.Element.feComposite.prototype = new A.Element.ElementBase(), A.Element.feColorMatrix = function (t) {
  11867. this.base = A.Element.ElementBase, this.base(t);
  11868. var n = A.ToNumberArray(this.attribute("values").value);
  11869. switch (this.attribute("type").valueOrDefault("matrix")) {
  11870. case "saturate":
  11871. var e = n[0];
  11872. n = [.213 + .787 * e, .715 - .715 * e, .072 - .072 * e, 0, 0, .213 - .213 * e, .715 + .285 * e, .072 - .072 * e, 0, 0, .213 - .213 * e, .715 - .715 * e, .072 + .928 * e, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];
  11873. break;
  11874. case "hueRotate":
  11875. var s = n[0] * Math.PI / 180,
  11876. i = function i(t, e, _i) {
  11877. return t + Math.cos(s) * e + Math.sin(s) * _i;
  11878. };
  11879. n = [i(.213, .787, -.213), i(.715, -.715, -.715), i(.072, -.072, .928), 0, 0, i(.213, -.213, .143), i(.715, .285, .14), i(.072, -.072, -.283), 0, 0, i(.213, -.213, -.787), i(.715, -.715, .715), i(.072, .928, .072), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];
  11880. break;
  11881. case "luminanceToAlpha":
  11882. n = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, .2125, .7154, .0721, 0, 0, 0, 0, 0, 0, 1];
  11883. }
  11884. function u(t, e, i, n, s, a) {
  11885. return t[i * n * 4 + 4 * e + a];
  11886. }
  11887. function c(t, e, i, n, s, a, r) {
  11888. t[i * n * 4 + 4 * e + a] = r;
  11889. }
  11890. function f(t, e) {
  11891. var i = n[t];
  11892. return i * (i < 0 ? e - 255 : e);
  11893. }
  11894. this.apply = function (t, e, i, n, s) {
  11895. var a = t.getImageData(0, 0, n, s);
  11896. for (i = 0; i < s; i++) {
  11897. for (e = 0; e < n; e++) {
  11898. var r = u(a.data, e, i, n, 0, 0),
  11899. o = u(a.data, e, i, n, 0, 1),
  11900. l = u(a.data, e, i, n, 0, 2),
  11901. h = u(a.data, e, i, n, 0, 3);
  11902. c(a.data, e, i, n, 0, 0, f(0, r) + f(1, o) + f(2, l) + f(3, h) + f(4, 1)), c(a.data, e, i, n, 0, 1, f(5, r) + f(6, o) + f(7, l) + f(8, h) + f(9, 1)), c(a.data, e, i, n, 0, 2, f(10, r) + f(11, o) + f(12, l) + f(13, h) + f(14, 1)), c(a.data, e, i, n, 0, 3, f(15, r) + f(16, o) + f(17, l) + f(18, h) + f(19, 1));
  11903. }
  11904. }
  11905. t.clearRect(0, 0, n, s), t.putImageData(a, 0, 0);
  11906. };
  11907. }, A.Element.feColorMatrix.prototype = new A.Element.ElementBase(), A.Element.feGaussianBlur = function (t) {
  11908. this.base = A.Element.ElementBase, this.base(t), this.blurRadius = Math.floor(this.attribute("stdDeviation").numValue()), this.extraFilterDistance = this.blurRadius, this.apply = function (t, e, i, n, s) {
  11909. d && void 0 !== d.canvasRGBA ? (t.canvas.id = A.UniqueId(), t.canvas.style.display = "none", document.body.appendChild(t.canvas), d.canvasRGBA(t.canvas, e, i, n, s, this.blurRadius), document.body.removeChild(t.canvas)) : A.log("ERROR: StackBlur.js must be included for blur to work");
  11910. };
  11911. }, A.Element.feGaussianBlur.prototype = new A.Element.ElementBase(), A.Element.title = function (t) {}, A.Element.title.prototype = new A.Element.ElementBase(), A.Element.desc = function (t) {}, A.Element.desc.prototype = new A.Element.ElementBase(), A.Element.MISSING = function (t) {
  11912. A.log("ERROR: Element '" + t.nodeName + "' not yet implemented.");
  11913. }, A.Element.MISSING.prototype = new A.Element.ElementBase(), A.CreateElement = function (t) {
  11914. var e = t.nodeName.replace(/^[^:]+:/, "");
  11915. e = e.replace(/\-/g, "");
  11916. var i = null;
  11917. return (i = void 0 !== A.Element[e] ? new A.Element[e](t) : new A.Element.MISSING(t)).type = t.nodeName, i;
  11918. }, A.load = function (t, e) {
  11919. A.loadXml(t, A.ajax(e));
  11920. }, A.loadXml = function (t, e) {
  11921. A.loadXmlDoc(t, A.parseXml(e));
  11922. }, A.loadXmlDoc = function (a, r) {
  11923. A.init(a);
  11924. var i = function i(t) {
  11925. for (var e = a.canvas; e;) {
  11926. t.x -= e.offsetLeft, t.y -= e.offsetTop, e = e.offsetParent;
  11927. }
  11928. return u.scrollX && (t.x += u.scrollX), u.scrollY && (t.y += u.scrollY), t;
  11929. };
  11930. 1 != A.opts.ignoreMouse && (a.canvas.onclick = function (t) {
  11931. var e = i(new A.Point(null != t ? t.clientX : event.clientX, null != t ? t.clientY : event.clientY));
  11932. A.Mouse.onclick(e.x, e.y);
  11933. }, a.canvas.onmousemove = function (t) {
  11934. var e = i(new A.Point(null != t ? t.clientX : event.clientX, null != t ? t.clientY : event.clientY));
  11935. A.Mouse.onmousemove(e.x, e.y);
  11936. });
  11937. var o = A.CreateElement(r.documentElement);
  11938. o.root = !0, o.addStylesFromStyleDefinition();
  11939. var l = !0,
  11940. n = function n() {
  11941. A.ViewPort.Clear(), a.canvas.parentNode ? A.ViewPort.SetCurrent(a.canvas.parentNode.clientWidth, a.canvas.parentNode.clientHeight) : A.ViewPort.SetCurrent(800, 600), 1 != A.opts.ignoreDimensions && (o.style("width").hasValue() && (a.canvas.width = o.style("width").toPixels("x"), a.canvas.style && (a.canvas.style.width = a.canvas.width + "px")), o.style("height").hasValue() && (a.canvas.height = o.style("height").toPixels("y"), a.canvas.style && (a.canvas.style.height = a.canvas.height + "px")));
  11942. var t = a.canvas.clientWidth || a.canvas.width,
  11943. e = a.canvas.clientHeight || a.canvas.height;
  11944. if (1 == A.opts.ignoreDimensions && o.style("width").hasValue() && o.style("height").hasValue() && (t = o.style("width").toPixels("x"), e = o.style("height").toPixels("y")), A.ViewPort.SetCurrent(t, e), null != A.opts.offsetX && (o.attribute("x", !0).value = A.opts.offsetX), null != A.opts.offsetY && (o.attribute("y", !0).value = A.opts.offsetY), null != A.opts.scaleWidth || null != A.opts.scaleHeight) {
  11945. var i = null,
  11946. n = null,
  11947. s = A.ToNumberArray(o.attribute("viewBox").value);
  11948. null != A.opts.scaleWidth && (o.attribute("width").hasValue() ? i = o.attribute("width").toPixels("x") / A.opts.scaleWidth : isNaN(s[2]) || (i = s[2] / A.opts.scaleWidth)), null != A.opts.scaleHeight && (o.attribute("height").hasValue() ? n = o.attribute("height").toPixels("y") / A.opts.scaleHeight : isNaN(s[3]) || (n = s[3] / A.opts.scaleHeight)), null == i && (i = n), null == n && (n = i), o.attribute("width", !0).value = A.opts.scaleWidth, o.attribute("height", !0).value = A.opts.scaleHeight, o.style("transform", !0, !0).value += " scale(" + 1 / i + "," + 1 / n + ")";
  11949. }
  11950. 1 != A.opts.ignoreClear && a.clearRect(0, 0, t, e), o.render(a), l && (l = !1, "function" == typeof A.opts.renderCallback && A.opts.renderCallback(r));
  11951. },
  11952. s = !0;
  11953. A.ImagesLoaded() && (s = !1, n()), A.intervalID = setInterval(function () {
  11954. var t = !1;
  11955. if (s && A.ImagesLoaded() && (t = !(s = !1)), 1 != A.opts.ignoreMouse && (t |= A.Mouse.hasEvents()), 1 != A.opts.ignoreAnimation) for (var e = 0; e < A.Animations.length; e++) {
  11956. t |= A.Animations[e].update(1e3 / A.FRAMERATE);
  11957. }
  11958. "function" == typeof A.opts.forceRedraw && 1 == A.opts.forceRedraw() && (t = !0), t && (n(), A.Mouse.runEvents());
  11959. }, 1e3 / A.FRAMERATE);
  11960. }, A.stop = function () {
  11961. A.intervalID && clearInterval(A.intervalID);
  11962. }, A.Mouse = new function () {
  11963. this.events = [], this.hasEvents = function () {
  11964. return 0 != this.events.length;
  11965. }, this.onclick = function (t, e) {
  11966. this.events.push({
  11967. type: "onclick",
  11968. x: t,
  11969. y: e,
  11970. run: function run(t) {
  11971. t.onclick && t.onclick();
  11972. }
  11973. });
  11974. }, this.onmousemove = function (t, e) {
  11975. this.events.push({
  11976. type: "onmousemove",
  11977. x: t,
  11978. y: e,
  11979. run: function run(t) {
  11980. t.onmousemove && t.onmousemove();
  11981. }
  11982. });
  11983. }, this.eventElements = [], this.checkPath = function (t, e) {
  11984. for (var i = 0; i < this.events.length; i++) {
  11985. var n = this.events[i];
  11986. e.isPointInPath && e.isPointInPath(n.x, n.y) && (this.eventElements[i] = t);
  11987. }
  11988. }, this.checkBoundingBox = function (t, e) {
  11989. for (var i = 0; i < this.events.length; i++) {
  11990. var n = this.events[i];
  11991. e.isPointInBox(n.x, n.y) && (this.eventElements[i] = t);
  11992. }
  11993. }, this.runEvents = function () {
  11994. A.ctx.canvas.style.cursor = "";
  11995. for (var t = 0; t < this.events.length; t++) {
  11996. for (var e = this.events[t], i = this.eventElements[t]; i;) {
  11997. e.run(i), i = i.parent;
  11998. }
  11999. }
  12000. this.events = [], this.eventElements = [];
  12001. };
  12002. }(), A;
  12003. }(i || {});
  12004. "string" == typeof t && (t = document.getElementById(t)), null != t.svg && t.svg.stop(), t.childNodes && 1 == t.childNodes.length && "OBJECT" == t.childNodes[0].nodeName || (t.svg = n);
  12005. var s = t.getContext("2d");
  12006. void 0 !== e.documentElement ? n.loadXmlDoc(s, e) : "<" == e.substr(0, 1) ? n.loadXml(s, e) : n.load(s, e);
  12007. } else for (var a = document.querySelectorAll("svg"), r = 0; r < a.length; r++) {
  12008. var o = a[r],
  12009. l = document.createElement("canvas");
  12010. l.width = o.clientWidth, l.height = o.clientHeight, o.parentNode.insertBefore(l, o), o.parentNode.removeChild(o);
  12011. var h = document.createElement("div");
  12012. h.appendChild(o), c(l, h.innerHTML);
  12013. }
  12014. };
  12015. "undefined" == typeof Element || (void 0 !== Element.prototype.matches ? f = function f(t, e) {
  12016. return t.matches(e);
  12017. } : void 0 !== Element.prototype.webkitMatchesSelector ? f = function f(t, e) {
  12018. return t.webkitMatchesSelector(e);
  12019. } : void 0 !== Element.prototype.mozMatchesSelector ? f = function f(t, e) {
  12020. return t.mozMatchesSelector(e);
  12021. } : void 0 !== Element.prototype.msMatchesSelector ? f = function f(t, e) {
  12022. return t.msMatchesSelector(e);
  12023. } : void 0 !== Element.prototype.oMatchesSelector ? f = function f(t, e) {
  12024. return t.oMatchesSelector(e);
  12025. } : ("function" != typeof jQuery && "function" != typeof Zepto || (f = function f(t, e) {
  12026. return $(t).is(e);
  12027. }), void 0 === f && "undefined" != typeof Sizzle && (f = Sizzle.matchesSelector)));
  12028. var e = /(\[[^\]]+\])/g,
  12029. i = /(#[^\s\+>~\.\[:]+)/g,
  12030. a = /(\.[^\s\+>~\.\[:]+)/g,
  12031. r = /(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,
  12032. o = /(:[\w-]+\([^\)]*\))/gi,
  12033. l = /(:[^\s\+>~\.\[:]+)/g,
  12034. h = /([^\s\+>~\.\[:]+)/g;
  12035. function w(n) {
  12036. var s = [0, 0, 0],
  12037. t = function t(_t, e) {
  12038. var i = n.match(_t);
  12039. null != i && (s[e] += i.length, n = n.replace(_t, " "));
  12040. };
  12041. return n = (n = n.replace(/:not\(([^\)]*)\)/g, " $1 ")).replace(/{[\s\S]*/gm, " "), t(e, 1), t(i, 0), t(a, 1), t(r, 2), t(o, 1), t(l, 1), n = (n = n.replace(/[\*\s\+>~]/g, " ")).replace(/[#\.]/g, " "), t(h, 2), s.join("");
  12042. }
  12043. "undefined" != typeof CanvasRenderingContext2D && (CanvasRenderingContext2D.prototype.drawSvg = function (t, e, i, n, s, a) {
  12044. var r = {
  12045. ignoreMouse: !0,
  12046. ignoreAnimation: !0,
  12047. ignoreDimensions: !0,
  12048. ignoreClear: !0,
  12049. offsetX: e,
  12050. offsetY: i,
  12051. scaleWidth: n,
  12052. scaleHeight: s
  12053. };
  12054. for (var o in a) {
  12055. a.hasOwnProperty(o) && (r[o] = a[o]);
  12056. }
  12057. c(this.canvas, t, r);
  12058. }), t.exports = c;
  12059. }(t = {
  12060. exports: {}
  12061. }, t.exports), t.exports;
  12062. });
  12063. /***/ }),
  12064. /* 43 */
  12065. /***/ (function(module) {
  12066. module.exports = JSON.parse("[{\"name\":\"黑龙江省\",\"coord\":[127.64559817675396,48.48668098449708]},{\"name\":\"内蒙古自治区\",\"coord\":[118.34519572208615,45.370218276977525]},{\"name\":\"新疆维吾尔自治区\",\"coord\":[87.13479065593184,41.75497055053711]},{\"name\":\"吉林省\",\"coord\":[126.12985278813787,43.57983207702637]},{\"name\":\"辽宁省\",\"coord\":[124.02494773936439,41.105743408203125]},{\"name\":\"甘肃省\",\"coord\":[102.87785725633012,37.69582366943361]},{\"name\":\"河北省\",\"coord\":[115.66327227481898,39.33383178710938]},{\"name\":\"北京市\",\"coord\":[116.62199343603638,40.25053787231445]},{\"name\":\"山西省\",\"coord\":[112.45180235808988,37.666561126708984]},{\"name\":\"天津市\",\"coord\":[117.35711842642581,39.406789779663086]},{\"name\":\"陕西省\",\"coord\":[109.56294003056632,35.64754199981689]},{\"name\":\"宁夏回族自治区\",\"coord\":[105.96110877640074,37.3081169128418]},{\"name\":\"青海省\",\"coord\":[96.07301048277901,35.44417190551758]},{\"name\":\"山东省\",\"coord\":[118.03833752951093,36.29800605773925]},{\"name\":\"西藏自治区\",\"coord\":[87.47361520439412,31.6703872680664]},{\"name\":\"河南省\",\"coord\":[113.07832397097275,33.87751102447509]},{\"name\":\"江苏省\",\"coord\":[119.93926538201052,32.945452690124505]},{\"name\":\"安徽省\",\"coord\":[117.15146765881019,32.024482727050774]},{\"name\":\"四川省\",\"coord\":[102.28998890142759,30.182161331176758]},{\"name\":\"湖北省\",\"coord\":[112.87798261431585,31.157071113586426]},{\"name\":\"重庆市\",\"coord\":[107.870126637831,30.188085556030266]},{\"name\":\"上海市\",\"coord\":[121.42561166015514,31.276043891906745]},{\"name\":\"浙江省\",\"coord\":[119.75337092707514,29.175934791564945]},{\"name\":\"湖南省\",\"coord\":[111.52770282777405,27.38110256195069]},{\"name\":\"江西省\",\"coord\":[115.51091280655628,27.283511161804206]},{\"name\":\"云南省\",\"coord\":[101.27053825991308,25.19783210754396]},{\"name\":\"贵州省\",\"coord\":[106.49672346773299,26.92267990112305]},{\"name\":\"福建省\",\"coord\":[117.9976766946587,25.939599990844727]},{\"name\":\"广西壮族自治区\",\"coord\":[108.98706831086302,23.891559600830078]},{\"name\":\"台湾省\",\"coord\":[120.82468432537434,23.602651596069336]},{\"name\":\"香港特别行政区\",\"coord\":[114.21036850371561,22.374858856201172]},{\"name\":\"海南省\",\"coord\":[109.62792940960824,19.163116455078125]},{\"name\":\"广东省\",\"coord\":[113.32127888266032,22.873867034912106]},{\"name\":\"澳门特别行政区\",\"coord\":[113.56819996291901,22.160347992976]}]");
  12067. /***/ }),
  12068. /* 44 */
  12069. /***/ (function(module) {
  12070. module.exports = JSON.parse("[{\"name\":\"克拉玛依市\",\"coord\":[85.01486759299489,45.406422237230046]},{\"name\":\"昌吉回族自治州\",\"coord\":[88.7154624754753,44.26991024636568]},{\"name\":\"石河子市\",\"coord\":[86.0208600035924,44.239045558096805]},{\"name\":\"霍林郭勒市\",\"coord\":[114.73479243733115,44.16058374713977]},{\"name\":\"本溪市\",\"coord\":[124.64357865201586,41.177197783134275]},{\"name\":\"嘉峪关市\",\"coord\":[98.16891560537093,39.76279786284264]},{\"name\":\"莱芜市\",\"coord\":[117.65723565456207,36.27916499211527]},{\"name\":\"神农架林区\",\"coord\":[110.48296222218153,31.581260143666697]},{\"name\":\"天门市\",\"coord\":[113.00615321481195,30.64105781887143]},{\"name\":\"鄂州市\",\"coord\":[114.94764081970385,30.325634953844585]},{\"name\":\"潜江市\",\"coord\":[112.70703817700621,30.349210666019893]},{\"name\":\"仙桃市\",\"coord\":[113.34688900729822,30.315951161935402]},{\"name\":\"萍乡市\",\"coord\":[113.88072263074415,27.47193090553213]},{\"name\":\"台湾省\",\"coord\":[120.14338943402045,23.596002465926095]},{\"name\":\"东莞市\",\"coord\":[113.89443658529342,22.897826158636448]},{\"name\":\"中山市\",\"coord\":[113.37118387764659,22.501478858616522]},{\"name\":\"珠海市\",\"coord\":[113.21799258934986,22.23782602992192]},{\"name\":\"北海市\",\"coord\":[109.18248083043899,21.695773689750148]},{\"name\":\"香港\",\"coord\":[114.20689279508653,22.36016760139811]},{\"name\":\"舟山市\",\"coord\":[122.22514712841459,30.338633120695956]},{\"name\":\"克孜勒苏柯尔克孜\",\"coord\":[74.62910472637343,39.59886016069875]},{\"name\":\"喀什地区\",\"coord\":[77.19899922143753,37.85462871211595]},{\"name\":\"阿克苏地区\",\"coord\":[81.43930290016381,41.067304799230456]},{\"name\":\"和田地区\",\"coord\":[80.69780509160952,36.95287032287055]},{\"name\":\"阿里地区\",\"coord\":[82.536487505389,32.69566569631762]},{\"name\":\"日喀则地区\",\"coord\":[86.5996831353606,29.54861754814263]},{\"name\":\"那曲地区\",\"coord\":[88.32523292667608,33.20600450932715]},{\"name\":\"玉树藏族自治州\",\"coord\":[95.2107128446203,33.90320387919257]},{\"name\":\"迪庆藏族自治州\",\"coord\":[99.42465312188943,28.052797714348895]},{\"name\":\"怒江傈傈族自治州\",\"coord\":[98.85737910439825,26.98345757528851]},{\"name\":\"大理白族自治州\",\"coord\":[99.93934374816013,25.684737357453045]},{\"name\":\"德宏傣族景颇族自\",\"coord\":[98.13830877778075,24.593421919561205]},{\"name\":\"保山市\",\"coord\":[99.19031013453166,24.979380341662]},{\"name\":\"临沧市\",\"coord\":[99.62483778975081,24.058807858948214]},{\"name\":\"普洱市\",\"coord\":[100.94440267992684,23.44121660743221]},{\"name\":\"西双版纳傣族自治\",\"coord\":[100.86105801845994,21.882475641324206]},{\"name\":\"拉萨市\",\"coord\":[91.3684790613129,30.14176592960237]},{\"name\":\"山南地区\",\"coord\":[92.11665242621062,28.33000201578789]},{\"name\":\"林芝地区\",\"coord\":[94.9307847458166,29.125110156601963]},{\"name\":\"昌都地区\",\"coord\":[97.33912235873476,30.48520825551814]},{\"name\":\"丽江市\",\"coord\":[100.65713436205135,26.96190318191959]},{\"name\":\"攀枝花市\",\"coord\":[101.73355913301131,26.714486678752795]},{\"name\":\"凉山彝族自治州\",\"coord\":[102.08678551422615,27.683020519860396]},{\"name\":\"楚雄彝族自治州\",\"coord\":[101.68264761198458,25.369603845264024]},{\"name\":\"红河哈尼族彝族自\",\"coord\":[102.95101719613119,23.624860095239875]},{\"name\":\"文山壮族苗族自治\",\"coord\":[104.8708359910614,23.579587266862504]},{\"name\":\"百色市\",\"coord\":[106.69546907589859,23.98220841166522]},{\"name\":\"崇左市\",\"coord\":[107.3277087317123,22.49769755349952]},{\"name\":\"防城港市\",\"coord\":[107.88939931155171,21.94550204069006]},{\"name\":\"南宁市\",\"coord\":[108.67078983716917,23.12207641861882]},{\"name\":\"钦州市\",\"coord\":[108.8532307305186,22.157690108421384]},{\"name\":\"玉林市\",\"coord\":[110.26918466489103,22.391823643610415]},{\"name\":\"湛江市\",\"coord\":[109.93033457863683,21.086751055633457]},{\"name\":\"茂名市\",\"coord\":[110.80336192333934,22.069184739040775]},{\"name\":\"阳江市\",\"coord\":[111.70471342186183,22.108751366417575]},{\"name\":\"江门市\",\"coord\":[112.53715618649149,22.297368082806777]},{\"name\":\"广州市\",\"coord\":[113.4949302208309,23.28359314707863]},{\"name\":\"清远市\",\"coord\":[113.10957368131268,24.334444053233856]},{\"name\":\"肇庆市\",\"coord\":[112.11117530204233,23.60241158796112]},{\"name\":\"梧州市\",\"coord\":[111.01709510772797,23.518132876753846]},{\"name\":\"贺州市\",\"coord\":[111.50423061842756,24.4095096817199]},{\"name\":\"桂林市\",\"coord\":[110.44046163393094,25.353966673735407]},{\"name\":\"柳州市\",\"coord\":[109.34854449214147,24.972408051485047]},{\"name\":\"河池市\",\"coord\":[107.81191841865586,24.649291651298164]},{\"name\":\"黔东南苗族侗族自\",\"coord\":[108.39952601614591,26.429286420465576]},{\"name\":\"贵阳市\",\"coord\":[106.59784062851153,26.797907456479816]},{\"name\":\"安顺市\",\"coord\":[105.76161265300635,25.988644902171018]},{\"name\":\"黔西南布依族苗族\",\"coord\":[105.5954078788574,25.404850939549405]},{\"name\":\"曲靖市\",\"coord\":[103.9164335632742,25.697243690315265]},{\"name\":\"六盘水市\",\"coord\":[104.77723228072432,26.15402255629164]},{\"name\":\"毕节地区\",\"coord\":[105.03867422931839,27.077913968069666]},{\"name\":\"昭通市\",\"coord\":[104.29730513046874,27.62418247971078]},{\"name\":\"宜宾市\",\"coord\":[104.76748901448207,28.553501804266475]},{\"name\":\"乐山市\",\"coord\":[103.56027669102787,29.160754519210577]},{\"name\":\"自贡市\",\"coord\":[104.63272827056402,29.273152614922402]},{\"name\":\"内江市\",\"coord\":[104.82644562304716,29.61272653799929]},{\"name\":\"遵义市\",\"coord\":[106.82413636302059,28.191847588570702]},{\"name\":\"达州市\",\"coord\":[107.59704170009518,31.32138258839703]},{\"name\":\"遂宁市\",\"coord\":[105.48979445433736,30.677687821242678]},{\"name\":\"广安市\",\"coord\":[106.56708164098042,30.43500706741521]},{\"name\":\"泸州市\",\"coord\":[105.42591761727707,28.50277238478137]},{\"name\":\"资阳市\",\"coord\":[104.97995126874034,30.154251886139654]},{\"name\":\"雅安市\",\"coord\":[102.69931299964517,29.892630706195035]},{\"name\":\"眉山市\",\"coord\":[104.07052881858888,29.894202166560405]},{\"name\":\"甘孜藏族自治州\",\"coord\":[100.50721042614238,30.975216556269658]},{\"name\":\"果洛藏族自治州\",\"coord\":[99.30775565051923,34.03539865224808]},{\"name\":\"海南藏族自治州\",\"coord\":[100.39969108016373,35.90048272566899]},{\"name\":\"黄南藏族自治州\",\"coord\":[101.5360706381689,35.10286360841902]},{\"name\":\"赣南藏族自治州\",\"coord\":[102.97083885806067,34.326752803339026]},{\"name\":\"陇南市\",\"coord\":[105.24780098912132,33.57031117443431]},{\"name\":\"天水市\",\"coord\":[105.53503634660417,34.62320421368087]},{\"name\":\"定西市\",\"coord\":[104.58787768541339,35.08900966621695]},{\"name\":\"临夏回族自治州\",\"coord\":[103.2612870434902,35.591577124455235]},{\"name\":\"西宁市\",\"coord\":[101.57680657999033,36.84800271717157]},{\"name\":\"海东地区\",\"coord\":[102.30909850729282,36.287400615025646]},{\"name\":\"海北藏族自治州\",\"coord\":[100.27122484450717,37.892557516083826]},{\"name\":\"金昌市\",\"coord\":[102.02244049169511,38.497330414886164]},{\"name\":\"酒泉市\",\"coord\":[95.94486678270127,40.56891536586272]},{\"name\":\"海西蒙古族藏族自\",\"coord\":[94.67143298050689,36.022725148503724]},{\"name\":\"巴音郭楞蒙古自治\",\"coord\":[88.18116214759745,39.556478810319916]},{\"name\":\"哈密地区\",\"coord\":[93.84302392518026,42.95015211178875]},{\"name\":\"叶鲁番地区\",\"coord\":[89.82035217277885,42.399368632283505]},{\"name\":\"乌鲁木齐市\",\"coord\":[88.00048109561487,43.549986370786]},{\"name\":\"阿勒泰地区\",\"coord\":[88.11213933257655,47.05593413019629]},{\"name\":\"博尔塔拉蒙古自治\",\"coord\":[82.26402238163408,44.671135542630864]},{\"name\":\"伊犁哈萨克自治州\",\"coord\":[82.80778717477179,43.53783381365267]},{\"name\":\"阿拉善盟\",\"coord\":[103.29923966842289,40.10955801781495]},{\"name\":\"武威市\",\"coord\":[102.73362058791429,37.94211141321436]},{\"name\":\"兰州市\",\"coord\":[103.73793563506032,36.27379827886003]},{\"name\":\"中卫市\",\"coord\":[105.6943786030716,37.20654236148948]},{\"name\":\"银川市\",\"coord\":[106.20022174140034,38.52103167597483]},{\"name\":\"石嘴山市\",\"coord\":[106.41544011793628,38.84054137571417]},{\"name\":\"乌海市\",\"coord\":[106.8984175998405,39.54616572239788]},{\"name\":\"鄂尔多斯市\",\"coord\":[108.43285571424619,39.24036799350715]},{\"name\":\"巴彦淖尔市\",\"coord\":[107.45840392808307,41.30159860424196]},{\"name\":\"包头市\",\"coord\":[110.46472193224272,41.48017783644221]},{\"name\":\"呼和浩特市\",\"coord\":[111.48365173603975,40.498363056149884]},{\"name\":\"乌兰察布市\",\"coord\":[112.61568977597707,41.75789561273154]},{\"name\":\"大同市\",\"coord\":[113.7107192749083,39.898956799744184]},{\"name\":\"朔州市\",\"coord\":[112.65428748167508,39.681772914701924]},{\"name\":\"忻州市\",\"coord\":[112.36127575589583,38.88990233614568]},{\"name\":\"榆林市\",\"coord\":[109.68473112169593,38.19921027134876]},{\"name\":\"延安市\",\"coord\":[109.52425222161318,36.406522726136814]},{\"name\":\"庆阳市\",\"coord\":[107.73052193155061,36.183821532624464]},{\"name\":\"固原市\",\"coord\":[106.20191575442442,36.11634909496382]},{\"name\":\"白银市\",\"coord\":[104.68634478137065,36.51582865625868]},{\"name\":\"宝鸡市\",\"coord\":[107.33534779230747,34.3387216485855]},{\"name\":\"汉中市\",\"coord\":[107.03534754266246,33.00142998064871]},{\"name\":\"广元市\",\"coord\":[105.92928137563939,32.21872447205537]},{\"name\":\"巴中市\",\"coord\":[107.03422410306194,31.99874720836291]},{\"name\":\"南充市\",\"coord\":[106.32964805032347,31.156657700184095]},{\"name\":\"绵阳市\",\"coord\":[104.58949560201106,31.88628780630976]},{\"name\":\"德阳市\",\"coord\":[104.41542984932845,31.110558133718676]},{\"name\":\"成都市\",\"coord\":[103.8852290010473,30.777258040348634]},{\"name\":\"阿坝藏族羌族自治\",\"coord\":[102.26209319552814,32.45725845387284]},{\"name\":\"安康市\",\"coord\":[109.14236501848015,32.77467694678074]},{\"name\":\"十堰市\",\"coord\":[110.39934083416314,32.376209039347906]},{\"name\":\"襄阳市\",\"coord\":[111.97539147094662,31.93399822417465]},{\"name\":\"宜昌市\",\"coord\":[111.22204852395754,30.772457669035354]},{\"name\":\"恩施市\",\"coord\":[109.42158366502872,30.260366574390105]},{\"name\":\"张家界市\",\"coord\":[110.59760006538717,29.330107409240718]},{\"name\":\"吉首市\",\"coord\":[109.72176899848378,28.681903937242495]},{\"name\":\"铜仁地区\",\"coord\":[108.54247523485463,28.11736237519646]},{\"name\":\"重庆市\",\"coord\":[107.86007108564992,30.186253395053196]},{\"name\":\"怀化市\",\"coord\":[109.94325166787243,27.43919084801186]},{\"name\":\"益阳市\",\"coord\":[112.43060358108062,28.75127294553697]},{\"name\":\"娄底市\",\"coord\":[111.41891416951897,27.696312460064604]},{\"name\":\"常德市\",\"coord\":[111.72571610131646,29.27189463838195]},{\"name\":\"荆州市\",\"coord\":[112.65896596965268,30.05161542755362]},{\"name\":\"荆门市\",\"coord\":[112.6586855902184,31.01267124474617]},{\"name\":\"岳阳市\",\"coord\":[113.2595036144316,29.106247116930163]},{\"name\":\"长沙市\",\"coord\":[113.15415586456598,28.222934680488425]},{\"name\":\"湘潭市\",\"coord\":[112.51092596317824,27.69881544105668]},{\"name\":\"株州市\",\"coord\":[113.49665538546823,27.03993794610501]},{\"name\":\"衡阳市\",\"coord\":[112.48849636578527,26.783613569970782]},{\"name\":\"邵阳市\",\"coord\":[110.6723832117475,26.81652287086792]},{\"name\":\"永州市\",\"coord\":[111.8565364154186,25.768488267811968]},{\"name\":\"韶关市\",\"coord\":[113.53420325850979,24.69848878771937]},{\"name\":\"惠州市\",\"coord\":[114.32029589634925,23.25504544231892]},{\"name\":\"佛山市\",\"coord\":[112.95925897403649,23.10116677189257]},{\"name\":\"云浮市\",\"coord\":[111.78042514904234,22.840400494105687]},{\"name\":\"深圳市\",\"coord\":[114.13138648919008,22.649563063468342]},{\"name\":\"汕尾市\",\"coord\":[115.57412892884373,23.06989642104901]},{\"name\":\"河源市\",\"coord\":[114.89746229844398,23.97971937124767]},{\"name\":\"揭阳市\",\"coord\":[116.04290004239446,23.304802704715357]},{\"name\":\"汕头市\",\"coord\":[116.7008461897183,23.35898625947344]},{\"name\":\"潮州市\",\"coord\":[116.75405548481658,23.854381508863064]},{\"name\":\"梅州市\",\"coord\":[116.13719397345734,24.15633544812716]},{\"name\":\"漳州市\",\"coord\":[117.38279760543345,24.41111215459575]},{\"name\":\"厦门市\",\"coord\":[118.04275971554665,24.675908246507944]},{\"name\":\"龙岩市\",\"coord\":[116.69341144552507,25.20284542644492]},{\"name\":\"泉州市\",\"coord\":[118.12035864630246,25.22984144365049]},{\"name\":\"莆田市\",\"coord\":[118.82439690138142,25.439653480972687]},{\"name\":\"福州市\",\"coord\":[119.1608285845262,25.99117532466728]},{\"name\":\"三明市\",\"coord\":[117.51188176216434,26.318292906961602]},{\"name\":\"南平市\",\"coord\":[118.16153136678187,27.306303151805437]},{\"name\":\"抚州市\",\"coord\":[116.3455359885574,27.487043655935366]},{\"name\":\"鹰潭市\",\"coord\":[117.01082360702333,28.241253742969946]},{\"name\":\"吉安市\",\"coord\":[114.91377151807418,26.957486660664525]},{\"name\":\"赣州市\",\"coord\":[115.046455717572,25.81565075681663]},{\"name\":\"郴州市\",\"coord\":[113.1544526703492,25.871927095452524]},{\"name\":\"新余市\",\"coord\":[114.94161795877827,27.79044654578371]},{\"name\":\"宜春市\",\"coord\":[115.04574494880995,28.306428044943356]},{\"name\":\"南昌市\",\"coord\":[115.9963824234495,28.664803351584705]},{\"name\":\"九江市\",\"coord\":[115.53225905704193,29.362905920276297]},{\"name\":\"上饶市\",\"coord\":[117.8595355766598,28.765755150094634]},{\"name\":\"景德镇市\",\"coord\":[117.25387030721845,29.33426823662448]},{\"name\":\"黄山市\",\"coord\":[117.85476357809696,29.969632034273722]},{\"name\":\"池州市\",\"coord\":[117.34517113140791,30.208089337922335]},{\"name\":\"铜陵市\",\"coord\":[117.93160431300694,30.926442655001676]},{\"name\":\"安庆市\",\"coord\":[116.54307680610799,30.524265461641296]},{\"name\":\"黄石市\",\"coord\":[115.02354597728443,29.924060229331015]},{\"name\":\"咸宁市\",\"coord\":[114.26967602231792,29.652174021136048]},{\"name\":\"黄冈市\",\"coord\":[115.2859016705373,30.65856897065683]},{\"name\":\"武汉市\",\"coord\":[114.34552076948799,30.68836237966767]},{\"name\":\"随州市\",\"coord\":[113.3850627838818,31.87891659924412]},{\"name\":\"信阳市\",\"coord\":[114.81374730587638,32.0309685135914]},{\"name\":\"驻马店市\",\"coord\":[114.07756451509235,32.896720987266114]},{\"name\":\"商洛市\",\"coord\":[109.82044421310393,33.77403373563189]},{\"name\":\"西安市\",\"coord\":[109.11839808451401,34.225257215515896]},{\"name\":\"渭南市\",\"coord\":[109.75732444226935,35.025913644359306]},{\"name\":\"铜川市\",\"coord\":[108.98695328111377,35.19235092947735]},{\"name\":\"咸阳市\",\"coord\":[108.36398776446165,34.84311348287181]},{\"name\":\"三门峡市\",\"coord\":[110.80049688104964,34.31818709571671]},{\"name\":\"运城市\",\"coord\":[111.1736679525165,35.19010372283576]},{\"name\":\"洛阳市\",\"coord\":[111.87577573098216,34.33379926109848]},{\"name\":\"平顶山市\",\"coord\":[112.80931281928427,33.759895800153096]},{\"name\":\"漯河市\",\"coord\":[113.83505724178012,33.70034266174508]},{\"name\":\"许昌市\",\"coord\":[113.78762484088509,34.051835688452435]},{\"name\":\"郑州市\",\"coord\":[113.49619951867594,34.61181797865449]},{\"name\":\"焦作市\",\"coord\":[113.13404280173008,35.134167097471625]},{\"name\":\"晋城市\",\"coord\":[112.7495732073233,35.63186423091449]},{\"name\":\"长治市\",\"coord\":[112.85900842873183,36.45872910742828]},{\"name\":\"临汾市\",\"coord\":[111.49379787924448,36.22810800777857]},{\"name\":\"太原市\",\"coord\":[112.15628804033796,37.91704444063036]},{\"name\":\"吕梁市\",\"coord\":[111.31901105774872,37.712740463356496]},{\"name\":\"晋中市\",\"coord\":[113.08199599739676,37.36532613794343]},{\"name\":\"邯郸市\",\"coord\":[114.41824047234618,36.530119932543315]},{\"name\":\"安阳市\",\"coord\":[113.88883283163116,35.7797611183252]},{\"name\":\"鹤壁市\",\"coord\":[114.3654094911545,35.75770487428472]},{\"name\":\"新乡市\",\"coord\":[113.9184107718167,35.348471214026716]},{\"name\":\"开封市\",\"coord\":[114.52801677500626,34.61371216679872]},{\"name\":\"周口市\",\"coord\":[114.88509782391864,33.69999759722657]},{\"name\":\"阜阳市\",\"coord\":[115.44595951398213,32.98060371610532]},{\"name\":\"淮南市\",\"coord\":[116.68941991880993,32.79972275772595]},{\"name\":\"蚌埠市\",\"coord\":[117.38594715783302,33.106729536033896]},{\"name\":\"淮北市\",\"coord\":[116.69651711889378,33.69527529383458]},{\"name\":\"宿州市\",\"coord\":[117.30175405886838,33.943330421260015]},{\"name\":\"亳州市\",\"coord\":[116.12410804185097,33.46769392946132]},{\"name\":\"商丘市\",\"coord\":[115.59575176872548,34.28339840831147]},{\"name\":\"菏泽市\",\"coord\":[115.53631974831816,35.197319393220624]},{\"name\":\"濮阳市\",\"coord\":[115.3070485514902,35.775883510964334]},{\"name\":\"聊城市\",\"coord\":[115.8870069012884,36.40529594548765]},{\"name\":\"邢台市\",\"coord\":[114.74259008644859,37.251396750084155]},{\"name\":\"石家庄市\",\"coord\":[114.56923838363613,38.13141710980106]},{\"name\":\"阳泉市\",\"coord\":[113.39216149668508,38.09075470547468]},{\"name\":\"保定市\",\"coord\":[115.261524468934,39.09118520781398]},{\"name\":\"衡水市\",\"coord\":[115.8182936677897,37.715661598187154]},{\"name\":\"德州市\",\"coord\":[116.4582273790399,37.19372347888644]},{\"name\":\"沧州市\",\"coord\":[116.76192710911863,38.20240042039232]},{\"name\":\"廊坊市\",\"coord\":[116.50410772133856,39.27896741763884]},{\"name\":\"天津市\",\"coord\":[117.31988934444873,39.37154482470619]},{\"name\":\"北京市\",\"coord\":[116.59734730757869,40.237112944270976]},{\"name\":\"张家口市\",\"coord\":[115.1823606483226,40.83732566607167]},{\"name\":\"唐山市\",\"coord\":[117.8693184261954,39.71862889477249]},{\"name\":\"秦皇岛市\",\"coord\":[119.30467355367742,39.990574652162564]},{\"name\":\"承德市\",\"coord\":[117.16275671911026,41.36623845548547]},{\"name\":\"葫芦岛市\",\"coord\":[119.9342336210531,40.5628822626519]},{\"name\":\"朝阳市\",\"coord\":[120.11853493535794,41.471852354885755]},{\"name\":\"赤峰市\",\"coord\":[118.50943546234379,43.25452976059767]},{\"name\":\"锦州市\",\"coord\":[121.5167549323861,41.45933087433065]},{\"name\":\"营口市\",\"coord\":[122.58571915054674,40.42093503997384]},{\"name\":\"丹东市\",\"coord\":[124.33549382902183,40.46369290272115]},{\"name\":\"辽阳市\",\"coord\":[123.34064798039414,41.152331397771356]},{\"name\":\"盘锦市\",\"coord\":[122.06718005354679,41.05573599862555]},{\"name\":\"阜新市\",\"coord\":[121.93889757908204,42.27641773244204]},{\"name\":\"鞍山市\",\"coord\":[122.78904432242356,40.77781183142038]},{\"name\":\"沈阳市\",\"coord\":[122.99508899709724,42.1162195010079]},{\"name\":\"铁岭市\",\"coord\":[124.23100515588399,42.72666083611828]},{\"name\":\"扶顺市\",\"coord\":[124.46027188217573,41.82955407638859]},{\"name\":\"通辽市\",\"coord\":[122.0729370657937,43.90889130864869]},{\"name\":\"兴安盟\",\"coord\":[120.79456431092532,45.92003249442161]},{\"name\":\"白城市\",\"coord\":[123.10619907715235,45.25475749267784]},{\"name\":\"齐齐哈尔市\",\"coord\":[124.5462214659102,47.55395009317394]},{\"name\":\"大兴安岭地区\",\"coord\":[124.50992855161529,52.18438447846694]},{\"name\":\"黑河市\",\"coord\":[127.14721400335922,49.25080134026901]},{\"name\":\"大庆市\",\"coord\":[124.40329830095243,46.401048760966745]},{\"name\":\"绥化市\",\"coord\":[126.5214484055605,46.76992452194825]},{\"name\":\"松原市\",\"coord\":[124.21244334807682,44.75779381338502]},{\"name\":\"四平市\",\"coord\":[124.27839350328821,43.52139065090318]},{\"name\":\"通化市\",\"coord\":[125.67392830706305,41.91771808663852]},{\"name\":\"辽源市\",\"coord\":[125.33529527643432,42.758340204944986]},{\"name\":\"吉林市\",\"coord\":[126.83350281902375,43.60730120049175]},{\"name\":\"长春市\",\"coord\":[125.53597875970374,44.24624314701737]},{\"name\":\"白山市\",\"coord\":[127.16780160322108,42.093893880305075]},{\"name\":\"哈尔滨市\",\"coord\":[127.39125008786029,45.36200668820575]},{\"name\":\"鹤岗市\",\"coord\":[130.4703811258197,47.66520688940109]},{\"name\":\"伊春市\",\"coord\":[128.91240831703635,47.93833794565277]},{\"name\":\"七台河市\",\"coord\":[131.2677920224311,45.945099776108584]},{\"name\":\"鸡西市\",\"coord\":[132.38059153660274,45.722934218318535]},{\"name\":\"双鸭山市\",\"coord\":[132.3184817002743,46.65813679030265]},{\"name\":\"佳木斯市\",\"coord\":[132.26174446608726,47.17569713691394]},{\"name\":\"呼伦贝尔市\",\"coord\":[122.3210739998419,50.18176996070858]},{\"name\":\"孝感市\",\"coord\":[113.83749892135485,31.11757234692128]},{\"name\":\"贵港市\",\"coord\":[110.07354588052804,23.380735604767374]},{\"name\":\"黔南布依族苗族自\",\"coord\":[107.30931767543106,26.2976919432269]},{\"name\":\"宁德市\",\"coord\":[119.52482556634342,27.013151692716413]},{\"name\":\"温州市\",\"coord\":[120.30037042732202,27.8699145504001]},{\"name\":\"台州市\",\"coord\":[120.88886782713843,28.670799172772313]},{\"name\":\"丽水市\",\"coord\":[119.56796851966463,28.170268394477755]},{\"name\":\"衢州市\",\"coord\":[118.79479802644406,28.865874397158763]},{\"name\":\"金华市\",\"coord\":[119.99381920686633,29.093455548185744]},{\"name\":\"绍兴市\",\"coord\":[120.46546691682343,29.69382513836818]},{\"name\":\"宁波市\",\"coord\":[121.42142987830871,29.70001162878972]},{\"name\":\"杭州市\",\"coord\":[119.4405685790891,29.87218307296989]},{\"name\":\"宣城市\",\"coord\":[118.68748382914703,30.628143499626418]},{\"name\":\"湖州市\",\"coord\":[119.98261306633574,30.7945175862809]},{\"name\":\"嘉兴市\",\"coord\":[120.83889215988998,30.67538495499343]},{\"name\":\"上海市\",\"coord\":[121.37534147322967,31.25628247908459]},{\"name\":\"苏州市\",\"coord\":[120.6906182622391,31.381280695137775]},{\"name\":\"无锡市\",\"coord\":[120.32182300914366,31.54113306724517]},{\"name\":\"常州市\",\"coord\":[119.61953292830165,31.611878565375576]},{\"name\":\"南京市\",\"coord\":[118.71890548838064,31.910863187910323]},{\"name\":\"镇江市\",\"coord\":[119.42349332902813,31.97942313430778]},{\"name\":\"合肥市\",\"coord\":[117.30651975617157,31.79407863049138]},{\"name\":\"六安市\",\"coord\":[116.24668220575353,31.820846193819513]},{\"name\":\"滁州市\",\"coord\":[117.88422385307969,32.51792621904418]},{\"name\":\"泰州市\",\"coord\":[120.03124303305091,32.56503102346783]},{\"name\":\"南通市\",\"coord\":[120.85599446760912,32.18496706099728]},{\"name\":\"盐城市\",\"coord\":[120.01812490612667,33.54219948734023]},{\"name\":\"淮安市\",\"coord\":[119.0749424205415,33.39203631772854]},{\"name\":\"宿迁市\",\"coord\":[118.45404943216346,33.666258719120265]},{\"name\":\"徐州市\",\"coord\":[117.77482249295966,34.30847766157078]},{\"name\":\"济宁市\",\"coord\":[116.74147276546373,35.27488504351119]},{\"name\":\"枣庄市\",\"coord\":[117.43359942491492,34.884162021736]},{\"name\":\"连云港市\",\"coord\":[119.01553213785074,34.54316517587849]},{\"name\":\"临沂市\",\"coord\":[118.31478835349617,35.28173079028279]},{\"name\":\"日照市\",\"coord\":[119.14265350444272,35.54479073199592]},{\"name\":\"青岛市\",\"coord\":[120.27779044405756,36.3464117375903]},{\"name\":\"威海市\",\"coord\":[122.12963327195605,37.13879077904251]},{\"name\":\"烟台市\",\"coord\":[120.7689567423966,37.19772002195597]},{\"name\":\"潍坊市\",\"coord\":[119.02178548592039,36.49292234053931]},{\"name\":\"淄博市\",\"coord\":[117.92936024367185,36.60871347163638]},{\"name\":\"泰安市\",\"coord\":[116.93810893944303,36.0423330118612]},{\"name\":\"济南市\",\"coord\":[117.34560282551296,36.769574973846304]},{\"name\":\"东营市\",\"coord\":[118.4915054457184,37.52194690335787]},{\"name\":\"滨州市\",\"coord\":[117.67610299757533,37.4439597758601]},{\"name\":\"昆明市\",\"coord\":[102.93100245594789,25.481300763922075]},{\"name\":\"玉溪市\",\"coord\":[102.23080854291823,24.156168324611663]},{\"name\":\"塔城地区\",\"coord\":[83.60908162840168,45.3721852373893]},{\"name\":\"张掖市\",\"coord\":[100.47710030600572,38.704239320458385]},{\"name\":\"南阳市\",\"coord\":[112.1400670951149,33.03033276715801]},{\"name\":\"扬州市\",\"coord\":[119.48949608990988,32.80956776339646]},{\"name\":\"延边朝鲜族自治州\",\"coord\":[129.3577692895626,43.24968794080283]},{\"name\":\"牡丹江市\",\"coord\":[129.87240796405672,44.7073040108322]},{\"name\":\"澳门\",\"coord\":[113.56289691515346,22.14602596262204]},{\"name\":\"吴忠市\",\"coord\":[106.76894508116403,37.72566765880316]},{\"name\":\"来宾市\",\"coord\":[109.25592217010114,23.86346274681084]},{\"name\":\"平凉市\",\"coord\":[107.0708132782897,35.30329631658711]},{\"name\":\"马鞍山市\",\"coord\":[118.27245878467022,31.657727937739004]},{\"name\":\"芜湖市\",\"coord\":[118.32992684415504,31.081688223101658]},{\"name\":\"澄迈县\",\"coord\":[110.04198076060266,19.694955078668105]},{\"name\":\"保亭黎族苗族自治\",\"coord\":[109.6055304964257,18.6101488675304]},{\"name\":\"乐东黎族自治县\",\"coord\":[109.04051999525574,18.643137437909203]},{\"name\":\"儋州市\",\"coord\":[109.3431358337404,19.550974957403195]},{\"name\":\"定安县\",\"coord\":[110.38744429685676,19.47557074114284]},{\"name\":\"屯昌县\",\"coord\":[110.00574767630334,19.367175093044388]},{\"name\":\"白沙黎族自治县\",\"coord\":[109.36860737761768,19.214416393082217]},{\"name\":\"琼中黎族苗族自治\",\"coord\":[109.86691465937548,19.073671135862682]},{\"name\":\"东方市\",\"coord\":[108.86903802405428,19.017352815445214]},{\"name\":\"昌江黎族自治县\",\"coord\":[108.9686431884767,19.182594167127824]},{\"name\":\"海口市\",\"coord\":[110.420654296875,19.806565564640795]},{\"name\":\"济源市\",\"coord\":[112.38051465474433,35.07958362422394]},{\"name\":\"五指山市\",\"coord\":[109.53595187364496,18.832908264613966]},{\"name\":\"大连市\",\"coord\":[121.96662235866603,39.444150542439914]},{\"name\":\"文昌市三沙市\",\"coord\":[110.81828537536748,19.756501444162936]},{\"name\":\"三亚市\",\"coord\":[109.38424600793707,18.39186315877128]},{\"name\":\"万宁市\",\"coord\":[110.28485046979574,18.860240588635115]},{\"name\":\"陵水黎族自治县\",\"coord\":[109.95577603229562,18.594712684620465]},{\"name\":\"临高县\",\"coord\":[109.71915395436967,19.79420403032508]},{\"name\":\"琼海市\",\"coord\":[110.41650700703043,19.22315873149372]}]");
  12071. /***/ }),
  12072. /* 45 */
  12073. /***/ (function(module, exports) {
  12074. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlgAAAJYCAMAAACJuGjuAAAAyVBMVEXb29vV1dXr6+vm5ubh4eHPz8/e3t7j4+PIyMjo6OjY2NjMzMzCwsLS0tK3t7e9vb3y8vLFxcWvr6/v7++rq6vu7u6/v7+6urqjo6Obm5ufn5+0tLSysrKoqKiPj4+mpqb09PSEhISHh4eTk5OXl5d4eHj39/eLi4tzc3N7e3uVlZVra2t/f39iYmICAgJYWFhSUlJvb28rKytdXV1nZ2dERERJSUkJCQlNTU0/Pz86Oj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SVCPgXi/zt0uemHP5DeELqo47mE4faA8tllvPcqdqwABFudhiVHO1bNeXy+vXMTPVNd8CVY29/P2is/U9m0PgaduY9h8n0mGnxfbt8khJSe1Ou5DMgFVxRcFEwyl3l8RR0WRyIbCVN932PA3WbD9EASdNkRASuvvGm9TYCELaFIBZ6N32ZFoUCnTqasdgkaNBjajqumbdqgQYDs/HLz5Lwocv4pLcgkExSQXfLZ/QjIeto/rrcXPeZdTRDYuSOwmjIkpXe+xa+DeuottgZ11jOwAAAABJRU5ErkJggg=="
  12075. /***/ }),
  12076. /* 46 */
  12077. /***/ (function(module, exports, __webpack_require__) {
  12078. "use strict";
  12079. Object.defineProperty(exports, "__esModule", {
  12080. value: true
  12081. });
  12082. var meta_1 = __webpack_require__(82);
  12083. /**
  12084. * Takes a set of features, calculates the bbox of all input features, and returns a bounding box.
  12085. *
  12086. * @name bbox
  12087. * @param {GeoJSON} geojson any GeoJSON object
  12088. * @returns {BBox} bbox extent in [minX, minY, maxX, maxY] order
  12089. * @example
  12090. * var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]]);
  12091. * var bbox = turf.bbox(line);
  12092. * var bboxPolygon = turf.bboxPolygon(bbox);
  12093. *
  12094. * //addToMap
  12095. * var addToMap = [line, bboxPolygon]
  12096. */
  12097. function bbox(geojson) {
  12098. var result = [Infinity, Infinity, -Infinity, -Infinity];
  12099. meta_1.coordEach(geojson, function (coord) {
  12100. if (result[0] > coord[0]) {
  12101. result[0] = coord[0];
  12102. }
  12103. if (result[1] > coord[1]) {
  12104. result[1] = coord[1];
  12105. }
  12106. if (result[2] < coord[0]) {
  12107. result[2] = coord[0];
  12108. }
  12109. if (result[3] < coord[1]) {
  12110. result[3] = coord[1];
  12111. }
  12112. });
  12113. return result;
  12114. }
  12115. exports.default = bbox;
  12116. /***/ }),
  12117. /* 47 */
  12118. /***/ (function(module, exports, __webpack_require__) {
  12119. module.exports = __webpack_require__(84);
  12120. /***/ }),
  12121. /* 48 */
  12122. /***/ (function(module, exports, __webpack_require__) {
  12123. // extracted by mini-css-extract-plugin
  12124. /***/ }),
  12125. /* 49 */
  12126. /***/ (function(module, exports, __webpack_require__) {
  12127. // extracted by mini-css-extract-plugin
  12128. /***/ }),
  12129. /* 50 */
  12130. /***/ (function(module, exports, __webpack_require__) {
  12131. var arrayWithHoles = __webpack_require__(51);
  12132. var iterableToArrayLimit = __webpack_require__(52);
  12133. var nonIterableRest = __webpack_require__(53);
  12134. function _slicedToArray(arr, i) {
  12135. return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();
  12136. }
  12137. module.exports = _slicedToArray;
  12138. /***/ }),
  12139. /* 51 */
  12140. /***/ (function(module, exports) {
  12141. function _arrayWithHoles(arr) {
  12142. if (Array.isArray(arr)) return arr;
  12143. }
  12144. module.exports = _arrayWithHoles;
  12145. /***/ }),
  12146. /* 52 */
  12147. /***/ (function(module, exports) {
  12148. function _iterableToArrayLimit(arr, i) {
  12149. if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
  12150. return;
  12151. }
  12152. var _arr = [];
  12153. var _n = true;
  12154. var _d = false;
  12155. var _e = undefined;
  12156. try {
  12157. for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
  12158. _arr.push(_s.value);
  12159. if (i && _arr.length === i) break;
  12160. }
  12161. } catch (err) {
  12162. _d = true;
  12163. _e = err;
  12164. } finally {
  12165. try {
  12166. if (!_n && _i["return"] != null) _i["return"]();
  12167. } finally {
  12168. if (_d) throw _e;
  12169. }
  12170. }
  12171. return _arr;
  12172. }
  12173. module.exports = _iterableToArrayLimit;
  12174. /***/ }),
  12175. /* 53 */
  12176. /***/ (function(module, exports) {
  12177. function _nonIterableRest() {
  12178. throw new TypeError("Invalid attempt to destructure non-iterable instance");
  12179. }
  12180. module.exports = _nonIterableRest;
  12181. /***/ }),
  12182. /* 54 */
  12183. /***/ (function(module, exports, __webpack_require__) {
  12184. "use strict";
  12185. module.exports = {
  12186. "aliceblue": [240, 248, 255],
  12187. "antiquewhite": [250, 235, 215],
  12188. "aqua": [0, 255, 255],
  12189. "aquamarine": [127, 255, 212],
  12190. "azure": [240, 255, 255],
  12191. "beige": [245, 245, 220],
  12192. "bisque": [255, 228, 196],
  12193. "black": [0, 0, 0],
  12194. "blanchedalmond": [255, 235, 205],
  12195. "blue": [0, 0, 255],
  12196. "blueviolet": [138, 43, 226],
  12197. "brown": [165, 42, 42],
  12198. "burlywood": [222, 184, 135],
  12199. "cadetblue": [95, 158, 160],
  12200. "chartreuse": [127, 255, 0],
  12201. "chocolate": [210, 105, 30],
  12202. "coral": [255, 127, 80],
  12203. "cornflowerblue": [100, 149, 237],
  12204. "cornsilk": [255, 248, 220],
  12205. "crimson": [220, 20, 60],
  12206. "cyan": [0, 255, 255],
  12207. "darkblue": [0, 0, 139],
  12208. "darkcyan": [0, 139, 139],
  12209. "darkgoldenrod": [184, 134, 11],
  12210. "darkgray": [169, 169, 169],
  12211. "darkgreen": [0, 100, 0],
  12212. "darkgrey": [169, 169, 169],
  12213. "darkkhaki": [189, 183, 107],
  12214. "darkmagenta": [139, 0, 139],
  12215. "darkolivegreen": [85, 107, 47],
  12216. "darkorange": [255, 140, 0],
  12217. "darkorchid": [153, 50, 204],
  12218. "darkred": [139, 0, 0],
  12219. "darksalmon": [233, 150, 122],
  12220. "darkseagreen": [143, 188, 143],
  12221. "darkslateblue": [72, 61, 139],
  12222. "darkslategray": [47, 79, 79],
  12223. "darkslategrey": [47, 79, 79],
  12224. "darkturquoise": [0, 206, 209],
  12225. "darkviolet": [148, 0, 211],
  12226. "deeppink": [255, 20, 147],
  12227. "deepskyblue": [0, 191, 255],
  12228. "dimgray": [105, 105, 105],
  12229. "dimgrey": [105, 105, 105],
  12230. "dodgerblue": [30, 144, 255],
  12231. "firebrick": [178, 34, 34],
  12232. "floralwhite": [255, 250, 240],
  12233. "forestgreen": [34, 139, 34],
  12234. "fuchsia": [255, 0, 255],
  12235. "gainsboro": [220, 220, 220],
  12236. "ghostwhite": [248, 248, 255],
  12237. "gold": [255, 215, 0],
  12238. "goldenrod": [218, 165, 32],
  12239. "gray": [128, 128, 128],
  12240. "green": [0, 128, 0],
  12241. "greenyellow": [173, 255, 47],
  12242. "grey": [128, 128, 128],
  12243. "honeydew": [240, 255, 240],
  12244. "hotpink": [255, 105, 180],
  12245. "indianred": [205, 92, 92],
  12246. "indigo": [75, 0, 130],
  12247. "ivory": [255, 255, 240],
  12248. "khaki": [240, 230, 140],
  12249. "lavender": [230, 230, 250],
  12250. "lavenderblush": [255, 240, 245],
  12251. "lawngreen": [124, 252, 0],
  12252. "lemonchiffon": [255, 250, 205],
  12253. "lightblue": [173, 216, 230],
  12254. "lightcoral": [240, 128, 128],
  12255. "lightcyan": [224, 255, 255],
  12256. "lightgoldenrodyellow": [250, 250, 210],
  12257. "lightgray": [211, 211, 211],
  12258. "lightgreen": [144, 238, 144],
  12259. "lightgrey": [211, 211, 211],
  12260. "lightpink": [255, 182, 193],
  12261. "lightsalmon": [255, 160, 122],
  12262. "lightseagreen": [32, 178, 170],
  12263. "lightskyblue": [135, 206, 250],
  12264. "lightslategray": [119, 136, 153],
  12265. "lightslategrey": [119, 136, 153],
  12266. "lightsteelblue": [176, 196, 222],
  12267. "lightyellow": [255, 255, 224],
  12268. "lime": [0, 255, 0],
  12269. "limegreen": [50, 205, 50],
  12270. "linen": [250, 240, 230],
  12271. "magenta": [255, 0, 255],
  12272. "maroon": [128, 0, 0],
  12273. "mediumaquamarine": [102, 205, 170],
  12274. "mediumblue": [0, 0, 205],
  12275. "mediumorchid": [186, 85, 211],
  12276. "mediumpurple": [147, 112, 219],
  12277. "mediumseagreen": [60, 179, 113],
  12278. "mediumslateblue": [123, 104, 238],
  12279. "mediumspringgreen": [0, 250, 154],
  12280. "mediumturquoise": [72, 209, 204],
  12281. "mediumvioletred": [199, 21, 133],
  12282. "midnightblue": [25, 25, 112],
  12283. "mintcream": [245, 255, 250],
  12284. "mistyrose": [255, 228, 225],
  12285. "moccasin": [255, 228, 181],
  12286. "navajowhite": [255, 222, 173],
  12287. "navy": [0, 0, 128],
  12288. "oldlace": [253, 245, 230],
  12289. "olive": [128, 128, 0],
  12290. "olivedrab": [107, 142, 35],
  12291. "orange": [255, 165, 0],
  12292. "orangered": [255, 69, 0],
  12293. "orchid": [218, 112, 214],
  12294. "palegoldenrod": [238, 232, 170],
  12295. "palegreen": [152, 251, 152],
  12296. "paleturquoise": [175, 238, 238],
  12297. "palevioletred": [219, 112, 147],
  12298. "papayawhip": [255, 239, 213],
  12299. "peachpuff": [255, 218, 185],
  12300. "peru": [205, 133, 63],
  12301. "pink": [255, 192, 203],
  12302. "plum": [221, 160, 221],
  12303. "powderblue": [176, 224, 230],
  12304. "purple": [128, 0, 128],
  12305. "rebeccapurple": [102, 51, 153],
  12306. "red": [255, 0, 0],
  12307. "rosybrown": [188, 143, 143],
  12308. "royalblue": [65, 105, 225],
  12309. "saddlebrown": [139, 69, 19],
  12310. "salmon": [250, 128, 114],
  12311. "sandybrown": [244, 164, 96],
  12312. "seagreen": [46, 139, 87],
  12313. "seashell": [255, 245, 238],
  12314. "sienna": [160, 82, 45],
  12315. "silver": [192, 192, 192],
  12316. "skyblue": [135, 206, 235],
  12317. "slateblue": [106, 90, 205],
  12318. "slategray": [112, 128, 144],
  12319. "slategrey": [112, 128, 144],
  12320. "snow": [255, 250, 250],
  12321. "springgreen": [0, 255, 127],
  12322. "steelblue": [70, 130, 180],
  12323. "tan": [210, 180, 140],
  12324. "teal": [0, 128, 128],
  12325. "thistle": [216, 191, 216],
  12326. "tomato": [255, 99, 71],
  12327. "turquoise": [64, 224, 208],
  12328. "violet": [238, 130, 238],
  12329. "wheat": [245, 222, 179],
  12330. "white": [255, 255, 255],
  12331. "whitesmoke": [245, 245, 245],
  12332. "yellow": [255, 255, 0],
  12333. "yellowgreen": [154, 205, 50]
  12334. };
  12335. /***/ }),
  12336. /* 55 */
  12337. /***/ (function(module, exports, __webpack_require__) {
  12338. /**
  12339. * geostats() is a tiny and standalone javascript library for classification
  12340. * Project page - https://github.com/simogeo/geostats
  12341. * Copyright (c) 2011 Simon Georget, http://www.empreinte-urbaine.eu
  12342. * Licensed under the MIT license
  12343. */
  12344. (function (definition) {
  12345. // This file will function properly as a <script> tag, or a module
  12346. // using CommonJS and NodeJS or RequireJS module formats.
  12347. // CommonJS
  12348. if (true) {
  12349. module.exports = definition(); // RequireJS
  12350. } else {}
  12351. })(function () {
  12352. var isInt = function isInt(n) {
  12353. return typeof n === 'number' && parseFloat(n) == parseInt(n, 10) && !isNaN(n);
  12354. }; // 6 characters
  12355. var _t = function _t(str) {
  12356. return str;
  12357. }; //taking from http://stackoverflow.com/questions/18082/validate-decimal-numbers-in-javascript-isnumeric
  12358. var isNumber = function isNumber(n) {
  12359. return !isNaN(parseFloat(n)) && isFinite(n);
  12360. }; //indexOf polyfill
  12361. // from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf
  12362. if (!Array.prototype.indexOf) {
  12363. Array.prototype.indexOf = function (searchElement, fromIndex) {
  12364. if (this === undefined || this === null) {
  12365. throw new TypeError('"this" is null or not defined');
  12366. }
  12367. var length = this.length >>> 0; // Hack to convert object.length to a UInt32
  12368. fromIndex = +fromIndex || 0;
  12369. if (Math.abs(fromIndex) === Infinity) {
  12370. fromIndex = 0;
  12371. }
  12372. if (fromIndex < 0) {
  12373. fromIndex += length;
  12374. if (fromIndex < 0) {
  12375. fromIndex = 0;
  12376. }
  12377. }
  12378. for (; fromIndex < length; fromIndex++) {
  12379. if (this[fromIndex] === searchElement) {
  12380. return fromIndex;
  12381. }
  12382. }
  12383. return -1;
  12384. };
  12385. }
  12386. var geostats = function geostats(a) {
  12387. this.objectID = '';
  12388. this.separator = ' - ';
  12389. this.legendSeparator = this.separator;
  12390. this.method = '';
  12391. this.precision = 0;
  12392. this.precisionflag = 'auto';
  12393. this.roundlength = 2; // Number of decimals, round values
  12394. this.is_uniqueValues = false;
  12395. this.debug = false;
  12396. this.silent = false;
  12397. this.bounds = Array();
  12398. this.ranges = Array();
  12399. this.inner_ranges = null;
  12400. this.colors = Array();
  12401. this.counter = Array(); // statistics information
  12402. this.stat_sorted = null;
  12403. this.stat_mean = null;
  12404. this.stat_median = null;
  12405. this.stat_sum = null;
  12406. this.stat_max = null;
  12407. this.stat_min = null;
  12408. this.stat_pop = null;
  12409. this.stat_variance = null;
  12410. this.stat_stddev = null;
  12411. this.stat_cov = null;
  12412. /**
  12413. * logging method
  12414. */
  12415. this.log = function (msg, force) {
  12416. if (this.debug == true || force != null) console.log(this.objectID + "(object id) :: " + msg);
  12417. };
  12418. /**
  12419. * Set bounds
  12420. */
  12421. this.setBounds = function (a) {
  12422. this.log('Setting bounds (' + a.length + ') : ' + a.join());
  12423. this.bounds = Array(); // init empty array to prevent bug when calling classification after another with less items (sample getQuantile(6) and getQuantile(4))
  12424. this.bounds = a; //this.bounds = this.decimalFormat(a);
  12425. };
  12426. /**
  12427. * Set a new serie
  12428. */
  12429. this.setSerie = function (a) {
  12430. this.log('Setting serie (' + a.length + ') : ' + a.join());
  12431. this.serie = Array(); // init empty array to prevent bug when calling classification after another with less items (sample getQuantile(6) and getQuantile(4))
  12432. this.serie = a; //reset statistics after changing serie
  12433. this.resetStatistics();
  12434. this.setPrecision();
  12435. };
  12436. /**
  12437. * Set colors
  12438. */
  12439. this.setColors = function (colors) {
  12440. this.log('Setting color ramp (' + colors.length + ') : ' + colors.join());
  12441. this.colors = colors;
  12442. };
  12443. /**
  12444. * Get feature count
  12445. * With bounds array(0, 0.75, 1.5, 2.25, 3);
  12446. * should populate this.counter with 5 keys
  12447. * and increment counters for each key
  12448. */
  12449. this.doCount = function () {
  12450. if (this._nodata()) return;
  12451. var tmp = this.sorted();
  12452. this.counter = new Array(); // we init counter with 0 value
  12453. for (i = 0; i < this.bounds.length - 1; i++) {
  12454. this.counter[i] = 0;
  12455. }
  12456. for (j = 0; j < tmp.length; j++) {
  12457. // get current class for value to increment the counter
  12458. var cclass = this.getClass(tmp[j]);
  12459. this.counter[cclass]++;
  12460. }
  12461. };
  12462. /**
  12463. * Set decimal precision according to user input
  12464. * or automatcally determined according
  12465. * to the given serie.
  12466. */
  12467. this.setPrecision = function (decimals) {
  12468. // only when called from user
  12469. if (typeof decimals !== "undefined") {
  12470. this.precisionflag = 'manual';
  12471. this.precision = decimals;
  12472. } // we calculate the maximal decimal length on given serie
  12473. if (this.precisionflag == 'auto') {
  12474. for (var i = 0; i < this.serie.length; i++) {
  12475. // check if the given value is a number and a float
  12476. if (!isNaN(this.serie[i] + "") && (this.serie[i] + "").toString().indexOf('.') != -1) {
  12477. var precision = (this.serie[i] + "").split(".")[1].length;
  12478. } else {
  12479. var precision = 0;
  12480. }
  12481. if (precision > this.precision) {
  12482. this.precision = precision;
  12483. }
  12484. }
  12485. }
  12486. if (this.precision > 20) {
  12487. // prevent "Uncaught RangeError: toFixed() digits argument must be between 0 and 20" bug. See https://github.com/simogeo/geostats/issues/34
  12488. this.log('this.precision value (' + this.precision + ') is greater than max value. Automatic set-up to 20 to prevent "Uncaught RangeError: toFixed()" when calling decimalFormat() method.');
  12489. this.precision = 20;
  12490. }
  12491. this.log('Calling setPrecision(). Mode : ' + this.precisionflag + ' - Decimals : ' + this.precision);
  12492. this.serie = this.decimalFormat(this.serie);
  12493. };
  12494. /**
  12495. * Format array numbers regarding to precision
  12496. */
  12497. this.decimalFormat = function (a) {
  12498. var b = new Array();
  12499. for (var i = 0; i < a.length; i++) {
  12500. // check if the given value is a number
  12501. if (isNumber(a[i])) {
  12502. b[i] = parseFloat(parseFloat(a[i]).toFixed(this.precision));
  12503. } else {
  12504. b[i] = a[i];
  12505. }
  12506. }
  12507. return b;
  12508. };
  12509. /**
  12510. * Transform a bounds array to a range array the following array : array(0,
  12511. * 0.75, 1.5, 2.25, 3); becomes : array('0-0.75', '0.75-1.5', '1.5-2.25',
  12512. * '2.25-3');
  12513. */
  12514. this.setRanges = function () {
  12515. this.ranges = Array(); // init empty array to prevent bug when calling classification after another with less items (sample getQuantile(6) and getQuantile(4))
  12516. for (i = 0; i < this.bounds.length - 1; i++) {
  12517. this.ranges[i] = this.bounds[i] + this.separator + this.bounds[i + 1];
  12518. }
  12519. };
  12520. /** return min value */
  12521. this.min = function () {
  12522. if (this._nodata()) return;
  12523. this.stat_min = this.serie[0];
  12524. for (i = 0; i < this.pop(); i++) {
  12525. if (this.serie[i] < this.stat_min) {
  12526. this.stat_min = this.serie[i];
  12527. }
  12528. }
  12529. return this.stat_min;
  12530. };
  12531. /** return max value */
  12532. this.max = function () {
  12533. if (this._nodata()) return;
  12534. this.stat_max = this.serie[0];
  12535. for (i = 0; i < this.pop(); i++) {
  12536. if (this.serie[i] > this.stat_max) {
  12537. this.stat_max = this.serie[i];
  12538. }
  12539. }
  12540. return this.stat_max;
  12541. };
  12542. /** return sum value */
  12543. this.sum = function () {
  12544. if (this._nodata()) return;
  12545. if (this.stat_sum == null) {
  12546. this.stat_sum = 0;
  12547. for (i = 0; i < this.pop(); i++) {
  12548. this.stat_sum += parseFloat(this.serie[i]);
  12549. }
  12550. }
  12551. return this.stat_sum;
  12552. };
  12553. /** return population number */
  12554. this.pop = function () {
  12555. if (this._nodata()) return;
  12556. if (this.stat_pop == null) {
  12557. this.stat_pop = this.serie.length;
  12558. }
  12559. return this.stat_pop;
  12560. };
  12561. /** return mean value */
  12562. this.mean = function () {
  12563. if (this._nodata()) return;
  12564. if (this.stat_mean == null) {
  12565. this.stat_mean = parseFloat(this.sum() / this.pop());
  12566. }
  12567. return this.stat_mean;
  12568. };
  12569. /** return median value */
  12570. this.median = function () {
  12571. if (this._nodata()) return;
  12572. if (this.stat_median == null) {
  12573. this.stat_median = 0;
  12574. var tmp = this.sorted(); // serie pop is odd
  12575. if (tmp.length % 2) {
  12576. this.stat_median = parseFloat(tmp[Math.ceil(tmp.length / 2) - 1]); // serie pop is even
  12577. } else {
  12578. this.stat_median = (parseFloat(tmp[tmp.length / 2 - 1]) + parseFloat(tmp[tmp.length / 2])) / 2;
  12579. }
  12580. }
  12581. return this.stat_median;
  12582. };
  12583. /** return variance value */
  12584. this.variance = function () {
  12585. round = typeof round === "undefined" ? true : false;
  12586. if (this._nodata()) return;
  12587. if (this.stat_variance == null) {
  12588. var tmp = 0,
  12589. serie_mean = this.mean();
  12590. for (var i = 0; i < this.pop(); i++) {
  12591. tmp += Math.pow(this.serie[i] - serie_mean, 2);
  12592. }
  12593. this.stat_variance = tmp / this.pop();
  12594. if (round == true) {
  12595. this.stat_variance = Math.round(this.stat_variance * Math.pow(10, this.roundlength)) / Math.pow(10, this.roundlength);
  12596. }
  12597. }
  12598. return this.stat_variance;
  12599. };
  12600. /** return standard deviation value */
  12601. this.stddev = function (round) {
  12602. round = typeof round === "undefined" ? true : false;
  12603. if (this._nodata()) return;
  12604. if (this.stat_stddev == null) {
  12605. this.stat_stddev = Math.sqrt(this.variance());
  12606. if (round == true) {
  12607. this.stat_stddev = Math.round(this.stat_stddev * Math.pow(10, this.roundlength)) / Math.pow(10, this.roundlength);
  12608. }
  12609. }
  12610. return this.stat_stddev;
  12611. };
  12612. /** coefficient of variation - measure of dispersion */
  12613. this.cov = function (round) {
  12614. round = typeof round === "undefined" ? true : false;
  12615. if (this._nodata()) return;
  12616. if (this.stat_cov == null) {
  12617. this.stat_cov = this.stddev() / this.mean();
  12618. if (round == true) {
  12619. this.stat_cov = Math.round(this.stat_cov * Math.pow(10, this.roundlength)) / Math.pow(10, this.roundlength);
  12620. }
  12621. }
  12622. return this.stat_cov;
  12623. };
  12624. /** reset all attributes after setting a new serie */
  12625. this.resetStatistics = function () {
  12626. this.stat_sorted = null;
  12627. this.stat_mean = null;
  12628. this.stat_median = null;
  12629. this.stat_sum = null;
  12630. this.stat_max = null;
  12631. this.stat_min = null;
  12632. this.stat_pop = null;
  12633. this.stat_variance = null;
  12634. this.stat_stddev = null;
  12635. this.stat_cov = null;
  12636. };
  12637. /** data test */
  12638. this._nodata = function () {
  12639. if (this.serie.length == 0) {
  12640. if (this.silent) this.log("[silent mode] Error. You should first enter a serie!", true);else throw new TypeError("Error. You should first enter a serie!");
  12641. return 1;
  12642. } else return 0;
  12643. };
  12644. /** check if the serie contains negative value */
  12645. this._hasNegativeValue = function () {
  12646. for (i = 0; i < this.serie.length; i++) {
  12647. if (this.serie[i] < 0) return true;
  12648. }
  12649. return false;
  12650. };
  12651. /** check if the serie contains zero value */
  12652. this._hasZeroValue = function () {
  12653. for (i = 0; i < this.serie.length; i++) {
  12654. if (parseFloat(this.serie[i]) === 0) return true;
  12655. }
  12656. return false;
  12657. };
  12658. /** return sorted values (as array) */
  12659. this.sorted = function () {
  12660. if (this.stat_sorted == null) {
  12661. if (this.is_uniqueValues == false) {
  12662. this.stat_sorted = this.serie.sort(function (a, b) {
  12663. return a - b;
  12664. });
  12665. } else {
  12666. this.stat_sorted = this.serie.sort(function (a, b) {
  12667. var nameA = a.toString().toLowerCase(),
  12668. nameB = b.toString().toLowerCase();
  12669. if (nameA < nameB) return -1;
  12670. if (nameA > nameB) return 1;
  12671. return 0;
  12672. });
  12673. }
  12674. }
  12675. return this.stat_sorted;
  12676. };
  12677. /** return all info */
  12678. this.info = function () {
  12679. if (this._nodata()) return;
  12680. var content = '';
  12681. content += _t('Population') + ' : ' + this.pop() + ' - [' + _t('Min') + ' : ' + this.min() + ' | ' + _t('Max') + ' : ' + this.max() + ']' + "\n";
  12682. content += _t('Mean') + ' : ' + this.mean() + ' - ' + _t('Median') + ' : ' + this.median() + "\n";
  12683. content += _t('Variance') + ' : ' + this.variance() + ' - ' + _t('Standard deviation') + ' : ' + this.stddev() + ' - ' + _t('Coefficient of variation') + ' : ' + this.cov() + "\n";
  12684. return content;
  12685. };
  12686. /**
  12687. * Set Manual classification Return an array with bounds : ie array(0,
  12688. * 0.75, 1.5, 2.25, 3);
  12689. * Set ranges and prepare data for displaying legend
  12690. *
  12691. */
  12692. this.setClassManually = function (array) {
  12693. if (this._nodata()) return;
  12694. if (array[0] !== this.min() || array[array.length - 1] !== this.max()) {
  12695. if (this.silent) this.log("[silent mode] " + t('Given bounds may not be correct! please check your input.\nMin value : ' + this.min() + ' / Max value : ' + this.max()), true);else throw new TypeError(_t('Given bounds may not be correct! please check your input.\nMin value : ' + this.min() + ' / Max value : ' + this.max()));
  12696. return;
  12697. }
  12698. this.setBounds(array);
  12699. this.setRanges(); // we specify the classification method
  12700. this.method = _t('manual classification') + ' (' + (array.length - 1) + ' ' + _t('classes') + ')';
  12701. return this.bounds;
  12702. };
  12703. /**
  12704. * Equal intervals classification Return an array with bounds : ie array(0,
  12705. * 0.75, 1.5, 2.25, 3);
  12706. */
  12707. this.getClassEqInterval = function (nbClass, forceMin, forceMax) {
  12708. if (this._nodata()) return;
  12709. var tmpMin = typeof forceMin === "undefined" ? this.min() : forceMin;
  12710. var tmpMax = typeof forceMax === "undefined" ? this.max() : forceMax;
  12711. var a = Array();
  12712. var val = tmpMin;
  12713. var interval = (tmpMax - tmpMin) / nbClass;
  12714. for (i = 0; i <= nbClass; i++) {
  12715. a[i] = val;
  12716. val += interval;
  12717. } //-> Fix last bound to Max of values
  12718. a[nbClass] = tmpMax;
  12719. this.setBounds(a);
  12720. this.setRanges(); // we specify the classification method
  12721. this.method = _t('eq. intervals') + ' (' + nbClass + ' ' + _t('classes') + ')';
  12722. return this.bounds;
  12723. };
  12724. this.getQuantiles = function (nbClass) {
  12725. var tmp = this.sorted();
  12726. var quantiles = [];
  12727. var step = this.pop() / nbClass;
  12728. for (var i = 1; i < nbClass; i++) {
  12729. var qidx = Math.round(i * step + 0.49);
  12730. quantiles.push(tmp[qidx - 1]); // zero-based
  12731. }
  12732. return quantiles;
  12733. };
  12734. /**
  12735. * Quantile classification Return an array with bounds : ie array(0, 0.75,
  12736. * 1.5, 2.25, 3);
  12737. */
  12738. this.getClassQuantile = function (nbClass) {
  12739. if (this._nodata()) return;
  12740. var tmp = this.sorted();
  12741. var bounds = this.getQuantiles(nbClass);
  12742. bounds.unshift(tmp[0]);
  12743. if (bounds[tmp.length - 1] !== tmp[tmp.length - 1]) bounds.push(tmp[tmp.length - 1]);
  12744. this.setBounds(bounds);
  12745. this.setRanges(); // we specify the classification method
  12746. this.method = _t('quantile') + ' (' + nbClass + ' ' + _t('classes') + ')';
  12747. return this.bounds;
  12748. };
  12749. /**
  12750. * Standard Deviation classification
  12751. * Return an array with bounds : ie array(0,
  12752. * 0.75, 1.5, 2.25, 3);
  12753. */
  12754. this.getClassStdDeviation = function (nbClass, matchBounds) {
  12755. if (this._nodata()) return;
  12756. var tmpMax = this.max();
  12757. var tmpMin = this.min();
  12758. var a = Array(); // number of classes is odd
  12759. if (nbClass % 2 == 1) {
  12760. // Euclidean division to get the inferior bound
  12761. var infBound = Math.floor(nbClass / 2);
  12762. var supBound = infBound + 1; // we set the central bounds
  12763. a[infBound] = this.mean() - this.stddev() / 2;
  12764. a[supBound] = this.mean() + this.stddev() / 2; // Values < to infBound, except first one
  12765. for (i = infBound - 1; i > 0; i--) {
  12766. var val = a[i + 1] - this.stddev();
  12767. a[i] = val;
  12768. } // Values > to supBound, except last one
  12769. for (i = supBound + 1; i < nbClass; i++) {
  12770. var val = a[i - 1] + this.stddev();
  12771. a[i] = val;
  12772. } // number of classes is even
  12773. } else {
  12774. var meanBound = nbClass / 2; // we get the mean value
  12775. a[meanBound] = this.mean(); // Values < to the mean, except first one
  12776. for (i = meanBound - 1; i > 0; i--) {
  12777. var val = a[i + 1] - this.stddev();
  12778. a[i] = val;
  12779. } // Values > to the mean, except last one
  12780. for (i = meanBound + 1; i < nbClass; i++) {
  12781. var val = a[i - 1] + this.stddev();
  12782. a[i] = val;
  12783. }
  12784. } // we finally set the first value
  12785. // do we excatly match min value or not ?
  12786. a[0] = typeof matchBounds === "undefined" ? a[1] - this.stddev() : this.min(); // we finally set the last value
  12787. // do we excatly match max value or not ?
  12788. a[nbClass] = typeof matchBounds === "undefined" ? a[nbClass - 1] + this.stddev() : this.max();
  12789. this.setBounds(a);
  12790. this.setRanges(); // we specify the classification method
  12791. this.method = _t('std deviation') + ' (' + nbClass + ' ' + _t('classes') + ')';
  12792. return this.bounds;
  12793. };
  12794. /**
  12795. * Geometric Progression classification
  12796. * http://en.wikipedia.org/wiki/Geometric_progression
  12797. * Return an array with bounds : ie array(0,
  12798. * 0.75, 1.5, 2.25, 3);
  12799. */
  12800. this.getClassGeometricProgression = function (nbClass) {
  12801. if (this._nodata()) return;
  12802. if (this._hasNegativeValue() || this._hasZeroValue()) {
  12803. if (this.silent) this.log("[silent mode] " + _t('geometric progression can\'t be applied with a serie containing negative or zero values.'), true);else throw new TypeError(_t('geometric progression can\'t be applied with a serie containing negative or zero values.'));
  12804. return;
  12805. }
  12806. var a = Array();
  12807. var tmpMin = this.min();
  12808. var tmpMax = this.max();
  12809. var logMax = Math.log(tmpMax) / Math.LN10; // max decimal logarithm (or base 10)
  12810. var logMin = Math.log(tmpMin) / Math.LN10;
  12811. ; // min decimal logarithm (or base 10)
  12812. var interval = (logMax - logMin) / nbClass; // we compute log bounds
  12813. for (i = 0; i < nbClass; i++) {
  12814. if (i == 0) {
  12815. a[i] = logMin;
  12816. } else {
  12817. a[i] = a[i - 1] + interval;
  12818. }
  12819. } // we compute antilog
  12820. a = a.map(function (x) {
  12821. return Math.pow(10, x);
  12822. }); // and we finally add max value
  12823. a.push(this.max());
  12824. this.setBounds(a);
  12825. this.setRanges(); // we specify the classification method
  12826. this.method = _t('geometric progression') + ' (' + nbClass + ' ' + _t('classes') + ')';
  12827. return this.bounds;
  12828. };
  12829. /**
  12830. * Arithmetic Progression classification
  12831. * http://en.wikipedia.org/wiki/Arithmetic_progression
  12832. * Return an array with bounds : ie array(0,
  12833. * 0.75, 1.5, 2.25, 3);
  12834. */
  12835. this.getClassArithmeticProgression = function (nbClass) {
  12836. if (this._nodata()) return;
  12837. var denominator = 0; // we compute the (french) "Raison"
  12838. for (i = 1; i <= nbClass; i++) {
  12839. denominator += i;
  12840. }
  12841. var a = Array();
  12842. var tmpMin = this.min();
  12843. var tmpMax = this.max();
  12844. var interval = (tmpMax - tmpMin) / denominator;
  12845. for (i = 0; i <= nbClass; i++) {
  12846. if (i == 0) {
  12847. a[i] = tmpMin;
  12848. } else {
  12849. a[i] = a[i - 1] + i * interval;
  12850. }
  12851. }
  12852. this.setBounds(a);
  12853. this.setRanges(); // we specify the classification method
  12854. this.method = _t('arithmetic progression') + ' (' + nbClass + ' ' + _t('classes') + ')';
  12855. return this.bounds;
  12856. };
  12857. /**
  12858. * Credits : Doug Curl (javascript) and Daniel J Lewis (python implementation)
  12859. * http://www.arcgis.com/home/item.html?id=0b633ff2f40d412995b8be377211c47b
  12860. * http://danieljlewis.org/2010/06/07/jenks-natural-breaks-algorithm-in-python/
  12861. */
  12862. this.getClassJenks = function (nbClass) {
  12863. if (this._nodata()) return;
  12864. dataList = this.sorted(); // now iterate through the datalist:
  12865. // determine mat1 and mat2
  12866. // really not sure how these 2 different arrays are set - the code for
  12867. // each seems the same!
  12868. // but the effect are 2 different arrays: mat1 and mat2
  12869. var mat1 = [];
  12870. for (var x = 0, xl = dataList.length + 1; x < xl; x++) {
  12871. var temp = [];
  12872. for (var j = 0, jl = nbClass + 1; j < jl; j++) {
  12873. temp.push(0);
  12874. }
  12875. mat1.push(temp);
  12876. }
  12877. var mat2 = [];
  12878. for (var i = 0, il = dataList.length + 1; i < il; i++) {
  12879. var temp2 = [];
  12880. for (var c = 0, cl = nbClass + 1; c < cl; c++) {
  12881. temp2.push(0);
  12882. }
  12883. mat2.push(temp2);
  12884. } // absolutely no idea what this does - best I can tell, it sets the 1st
  12885. // group in the
  12886. // mat1 and mat2 arrays to 1 and 0 respectively
  12887. for (var y = 1, yl = nbClass + 1; y < yl; y++) {
  12888. mat1[0][y] = 1;
  12889. mat2[0][y] = 0;
  12890. for (var t = 1, tl = dataList.length + 1; t < tl; t++) {
  12891. mat2[t][y] = Infinity;
  12892. }
  12893. var v = 0.0;
  12894. } // and this part - I'm a little clueless on - but it works
  12895. // pretty sure it iterates across the entire dataset and compares each
  12896. // value to
  12897. // one another to and adjust the indices until you meet the rules:
  12898. // minimum deviation
  12899. // within a class and maximum separation between classes
  12900. for (var l = 2, ll = dataList.length + 1; l < ll; l++) {
  12901. var s1 = 0.0;
  12902. var s2 = 0.0;
  12903. var w = 0.0;
  12904. for (var m = 1, ml = l + 1; m < ml; m++) {
  12905. var i3 = l - m + 1;
  12906. var val = parseFloat(dataList[i3 - 1]);
  12907. s2 += val * val;
  12908. s1 += val;
  12909. w += 1;
  12910. v = s2 - s1 * s1 / w;
  12911. var i4 = i3 - 1;
  12912. if (i4 != 0) {
  12913. for (var p = 2, pl = nbClass + 1; p < pl; p++) {
  12914. if (mat2[l][p] >= v + mat2[i4][p - 1]) {
  12915. mat1[l][p] = i3;
  12916. mat2[l][p] = v + mat2[i4][p - 1];
  12917. }
  12918. }
  12919. }
  12920. }
  12921. mat1[l][1] = 1;
  12922. mat2[l][1] = v;
  12923. }
  12924. var k = dataList.length;
  12925. var kclass = []; // fill the kclass (classification) array with zeros:
  12926. for (i = 0; i <= nbClass; i++) {
  12927. kclass.push(0);
  12928. } // this is the last number in the array:
  12929. kclass[nbClass] = parseFloat(dataList[dataList.length - 1]); // this is the first number - can set to zero, but want to set to lowest
  12930. // to use for legend:
  12931. kclass[0] = parseFloat(dataList[0]);
  12932. var countNum = nbClass;
  12933. while (countNum >= 2) {
  12934. var id = parseInt(mat1[k][countNum] - 2);
  12935. kclass[countNum - 1] = dataList[id];
  12936. k = parseInt(mat1[k][countNum] - 1); // spits out the rank and value of the break values:
  12937. // console.log("id="+id,"rank = " + String(mat1[k][countNum]),"val =
  12938. // " + String(dataList[id]))
  12939. // count down:
  12940. countNum -= 1;
  12941. } // check to see if the 0 and 1 in the array are the same - if so, set 0
  12942. // to 0:
  12943. if (kclass[0] == kclass[1]) {
  12944. kclass[0] = 0;
  12945. }
  12946. this.setBounds(kclass);
  12947. this.setRanges();
  12948. this.method = _t('Jenks') + ' (' + nbClass + ' ' + _t('classes') + ')';
  12949. return this.bounds; //array of breaks
  12950. };
  12951. /**
  12952. * Quantile classification Return an array with bounds : ie array(0, 0.75,
  12953. * 1.5, 2.25, 3);
  12954. */
  12955. this.getClassUniqueValues = function () {
  12956. if (this._nodata()) return;
  12957. this.is_uniqueValues = true;
  12958. var tmp = this.sorted(); // display in alphabetical order
  12959. var a = Array();
  12960. for (i = 0; i < this.pop(); i++) {
  12961. if (a.indexOf(tmp[i]) === -1) a.push(tmp[i]);
  12962. }
  12963. this.bounds = a; // we specify the classification method
  12964. this.method = _t('unique values');
  12965. return a;
  12966. };
  12967. /**
  12968. * Return the class of a given value.
  12969. * For example value : 6
  12970. * and bounds array = (0, 4, 8, 12);
  12971. * Return 2
  12972. */
  12973. this.getClass = function (value) {
  12974. for (i = 0; i < this.bounds.length; i++) {
  12975. if (this.is_uniqueValues == true) {
  12976. if (value == this.bounds[i]) return i;
  12977. } else {
  12978. // parseFloat() is necessary
  12979. if (parseFloat(value) <= this.bounds[i + 1]) {
  12980. return i;
  12981. }
  12982. }
  12983. }
  12984. return _t("Unable to get value's class.");
  12985. };
  12986. /**
  12987. * Return the ranges array : array('0-0.75', '0.75-1.5', '1.5-2.25',
  12988. * '2.25-3');
  12989. */
  12990. this.getRanges = function () {
  12991. return this.ranges;
  12992. };
  12993. /**
  12994. * Returns the number/index of this.ranges that value falls into
  12995. */
  12996. this.getRangeNum = function (value) {
  12997. var bounds, i;
  12998. for (i = 0; i < this.ranges.length; i++) {
  12999. bounds = this.ranges[i].split(/ - /);
  13000. if (value <= parseFloat(bounds[1])) {
  13001. return i;
  13002. }
  13003. }
  13004. };
  13005. /*
  13006. * Compute inner ranges based on serie.
  13007. * Produce discontinous ranges used for legend - return an array similar to :
  13008. * array('0.00-0.74', '0.98-1.52', '1.78-2.25', '2.99-3.14');
  13009. * If inner ranges already computed, return array values.
  13010. */
  13011. this.getInnerRanges = function () {
  13012. // if already computed, we return the result
  13013. if (this.inner_ranges != null) return this.inner_ranges;
  13014. var a = new Array();
  13015. var tmp = this.sorted();
  13016. var cnt = 1; // bounds array counter
  13017. for (i = 0; i < tmp.length; i++) {
  13018. if (i == 0) var range_firstvalue = tmp[i]; // we init first range value
  13019. if (parseFloat(tmp[i]) > parseFloat(this.bounds[cnt])) {
  13020. a[cnt - 1] = '' + range_firstvalue + this.separator + tmp[i - 1];
  13021. var range_firstvalue = tmp[i];
  13022. cnt++;
  13023. } // we reach the last range, we finally complete manually
  13024. // and return the array
  13025. if (cnt == this.bounds.length - 1) {
  13026. // we set the last value
  13027. a[cnt - 1] = '' + range_firstvalue + this.separator + tmp[tmp.length - 1];
  13028. this.inner_ranges = a;
  13029. return this.inner_ranges;
  13030. }
  13031. }
  13032. };
  13033. this.getSortedlist = function () {
  13034. return this.sorted().join(', ');
  13035. };
  13036. /**
  13037. * Return an html legend
  13038. * colors : specify an array of color (hexadecimal values)
  13039. * legend : specify a text input for the legend. By default, just displays 'legend'
  13040. * counter : if not null, display counter value
  13041. * callback : if not null, callback function applied on legend boundaries
  13042. * mode : null, 'default', 'distinct', 'discontinuous' :
  13043. * - if mode is null, will display legend as 'default mode'
  13044. * - 'default' : displays ranges like in ranges array (continuous values), sample : 29.26 - 378.80 / 378.80 - 2762.25 / 2762.25 - 6884.84
  13045. * - 'distinct' : Add + 1 according to decimal precision to distinguish classes (discrete values), sample : 29.26 - 378.80 / 378.81 - 2762.25 / 2762.26 - 6884.84
  13046. * - 'discontinuous' : indicates the range of data actually falling in each class , sample : 29.26 - 225.43 / 852.12 - 2762.20 / 3001.25 - 6884.84 / not implemented yet
  13047. * order : null, 'ASC', 'DESC'
  13048. */
  13049. this.getHtmlLegend = function (colors, legend, counter, callback, mode, order) {
  13050. var cnt = '';
  13051. var elements = new Array();
  13052. this.doCount(); // we do count, even if not displayed
  13053. if (colors != null) {
  13054. ccolors = colors;
  13055. } else {
  13056. ccolors = this.colors;
  13057. }
  13058. if (legend != null) {
  13059. lg = legend;
  13060. } else {
  13061. lg = 'Legend';
  13062. }
  13063. if (counter != null) {
  13064. getcounter = true;
  13065. } else {
  13066. getcounter = false;
  13067. }
  13068. if (callback != null) {
  13069. fn = callback;
  13070. } else {
  13071. fn = function fn(o) {
  13072. return o;
  13073. };
  13074. }
  13075. if (mode == null) {
  13076. mode = 'default';
  13077. }
  13078. if (mode == 'discontinuous') {
  13079. this.getInnerRanges(); // check if some classes are not populated / equivalent of in_array function
  13080. if (this.counter.indexOf(0) !== -1) {
  13081. if (this.silent) this.log("[silent mode] " + _t("Geostats cannot apply 'discontinuous' mode to the getHtmlLegend() method because some classes are not populated.\nPlease switch to 'default' or 'distinct' modes. Exit!"), true);else throw new TypeError(_t("Geostats cannot apply 'discontinuous' mode to the getHtmlLegend() method because some classes are not populated.\nPlease switch to 'default' or 'distinct' modes. Exit!"));
  13082. return;
  13083. }
  13084. }
  13085. if (order !== 'DESC') order = 'ASC';
  13086. if (ccolors.length < this.ranges.length) {
  13087. if (this.silent) this.log("[silent mode] " + _t('The number of colors should fit the number of ranges. Exit!'), true);else throw new TypeError(_t('The number of colors should fit the number of ranges. Exit!'));
  13088. return;
  13089. }
  13090. if (this.is_uniqueValues == false) {
  13091. for (i = 0; i < this.ranges.length; i++) {
  13092. if (getcounter === true) {
  13093. cnt = ' <span class="geostats-legend-counter">(' + this.counter[i] + ')</span>';
  13094. } //console.log("Ranges : " + this.ranges[i]);
  13095. // default mode
  13096. var tmp = this.ranges[i].split(this.separator);
  13097. var start_value = parseFloat(tmp[0]).toFixed(this.precision);
  13098. var end_value = parseFloat(tmp[1]).toFixed(this.precision); // if mode == 'distinct' and we are not working on the first value
  13099. if (mode == 'distinct' && i != 0) {
  13100. if (isInt(start_value)) {
  13101. start_value = parseInt(start_value) + 1; // format to float if necessary
  13102. if (this.precisionflag == 'manual' && this.precision != 0) start_value = parseFloat(start_value).toFixed(this.precision);
  13103. } else {
  13104. start_value = parseFloat(start_value) + 1 / Math.pow(10, this.precision); // strangely the formula above return sometimes long decimal values,
  13105. // the following instruction fix it
  13106. start_value = parseFloat(start_value).toFixed(this.precision);
  13107. }
  13108. } // if mode == 'discontinuous'
  13109. if (mode == 'discontinuous') {
  13110. var tmp = this.inner_ranges[i].split(this.separator); // console.log("Ranges : " + this.inner_ranges[i]);
  13111. var start_value = parseFloat(tmp[0]).toFixed(this.precision);
  13112. var end_value = parseFloat(tmp[1]).toFixed(this.precision);
  13113. } // we apply callback function
  13114. var el = fn(start_value) + this.legendSeparator + fn(end_value);
  13115. var block = '<div><div class="geostats-legend-block" style="background-color:' + ccolors[i] + '"></div> ' + el + cnt + '</div>';
  13116. elements.push(block);
  13117. }
  13118. } else {
  13119. // only if classification is done on unique values
  13120. for (i = 0; i < this.bounds.length; i++) {
  13121. if (getcounter === true) {
  13122. cnt = ' <span class="geostats-legend-counter">(' + this.counter[i] + ')</span>';
  13123. }
  13124. var el = fn(this.bounds[i]);
  13125. var block = '<div><div class="geostats-legend-block" style="background-color:' + ccolors[i] + '"></div> ' + el + cnt + '</div>';
  13126. elements.push(block);
  13127. }
  13128. } // do we reverse the return legend ?
  13129. if (order === 'DESC') elements.reverse(); // finally we create HTML and return it
  13130. var content = '<div class="geostats-legend"><div class="geostats-legend-title">' + _t(lg) + '</div>';
  13131. for (i = 0; i < elements.length; i++) {
  13132. content += elements[i];
  13133. }
  13134. content += '</div>';
  13135. return content;
  13136. }; // object constructor
  13137. // At the end of script. If not setPrecision() method is not known
  13138. // we create an object identifier for debugging
  13139. this.objectID = new Date().getUTCMilliseconds();
  13140. this.log('Creating new geostats object');
  13141. if (typeof a !== 'undefined' && a.length > 0) {
  13142. this.serie = a;
  13143. this.setPrecision();
  13144. this.log('Setting serie (' + a.length + ') : ' + a.join());
  13145. } else {
  13146. this.serie = Array();
  13147. }
  13148. ; // creating aliases on classification function for backward compatibility
  13149. this.getJenks = this.getClassJenks;
  13150. this.getGeometricProgression = this.getClassGeometricProgression;
  13151. this.getEqInterval = this.getClassEqInterval;
  13152. this.getQuantile = this.getClassQuantile;
  13153. this.getStdDeviation = this.getClassStdDeviation;
  13154. this.getUniqueValues = this.getClassUniqueValues;
  13155. this.getArithmeticProgression = this.getClassArithmeticProgression;
  13156. };
  13157. window.geostats = geostats;
  13158. return geostats;
  13159. });
  13160. /***/ }),
  13161. /* 56 */
  13162. /***/ (function(module, exports) {
  13163. /*
  13164. * JsonSQL
  13165. * By: Trent Richardson [http://trentrichardson.com]
  13166. * Version 0.1
  13167. * Last Modified: 1/1/2008
  13168. *
  13169. * Copyright 2008 Trent Richardson
  13170. *
  13171. * Licensed under the Apache License, Version 2.0 (the "License");
  13172. * you may not use this file except in compliance with the License.
  13173. * You may obtain a copy of the License at
  13174. *
  13175. * http://www.apache.org/licenses/LICENSE-2.0
  13176. *
  13177. * Unless required by applicable law or agreed to in writing, software
  13178. * distributed under the License is distributed on an "AS IS" BASIS,
  13179. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13180. * See the License for the specific language governing permissions and
  13181. * limitations under the License.
  13182. */
  13183. window.jsonsql = {
  13184. query: function query(sql, json) {
  13185. var returnfields = sql.match(/^(select)\s+([a-z0-9_\,\.\s\*]+)\s+from\s+([a-z0-9_\.]+)(?: where\s+\((.+)\))?\s*(?:order\sby\s+([a-z0-9_\,]+))?\s*(asc|desc|ascnum|descnum)?\s*(?:limit\s+([0-9_\,]+))?/i);
  13186. var ops = {
  13187. fields: returnfields[2].replace(' ', '').split(','),
  13188. from: returnfields[3].replace(' ', ''),
  13189. where: returnfields[4] == undefined ? "true" : returnfields[4],
  13190. orderby: returnfields[5] == undefined ? [] : returnfields[5].replace(' ', '').split(','),
  13191. order: returnfields[6] == undefined ? "asc" : returnfields[6],
  13192. limit: returnfields[7] == undefined ? [] : returnfields[7].replace(' ', '').split(',')
  13193. };
  13194. return this.parse(json, ops);
  13195. },
  13196. parse: function parse(json, ops) {
  13197. var o = {
  13198. fields: ["*"],
  13199. from: "json",
  13200. where: "",
  13201. orderby: [],
  13202. order: "asc",
  13203. limit: []
  13204. };
  13205. for (i in ops) {
  13206. o[i] = ops[i];
  13207. }
  13208. var result = [];
  13209. result = this.returnFilter(json, o);
  13210. result = this.returnOrderBy(result, o.orderby, o.order);
  13211. result = this.returnLimit(result, o.limit);
  13212. return result;
  13213. },
  13214. returnFilter: function returnFilter(json, jsonsql_o) {
  13215. var jsonsql_scope = eval(jsonsql_o.from);
  13216. var jsonsql_result = [];
  13217. var jsonsql_rc = 0;
  13218. if (jsonsql_o.where == "") jsonsql_o.where = "true";
  13219. for (var jsonsql_i in jsonsql_scope) {
  13220. with (jsonsql_scope[jsonsql_i]) {
  13221. if (eval(jsonsql_o.where)) {
  13222. jsonsql_result[jsonsql_rc++] = this.returnFields(jsonsql_scope[jsonsql_i], jsonsql_o.fields);
  13223. }
  13224. }
  13225. }
  13226. return jsonsql_result;
  13227. },
  13228. returnFields: function returnFields(scope, fields) {
  13229. if (fields.length == 0) fields = ["*"];
  13230. if (fields[0] == "*") return scope;
  13231. var returnobj = {};
  13232. for (var i in fields) {
  13233. returnobj[fields[i]] = scope[fields[i]];
  13234. }
  13235. return returnobj;
  13236. },
  13237. returnOrderBy: function returnOrderBy(result, orderby, order) {
  13238. if (orderby.length == 0) return result;
  13239. result.sort(function (a, b) {
  13240. switch (order.toLowerCase()) {
  13241. case "desc":
  13242. return eval('a.' + orderby[0] + ' < b.' + orderby[0]) ? 1 : -1;
  13243. case "asc":
  13244. return eval('a.' + orderby[0] + ' > b.' + orderby[0]) ? 1 : -1;
  13245. case "descnum":
  13246. return eval('a.' + orderby[0] + ' - b.' + orderby[0]);
  13247. case "ascnum":
  13248. return eval('b.' + orderby[0] + ' - a.' + orderby[0]);
  13249. }
  13250. });
  13251. return result;
  13252. },
  13253. returnLimit: function returnLimit(result, limit) {
  13254. switch (limit.length) {
  13255. case 0:
  13256. return result;
  13257. case 1:
  13258. return result.splice(0, limit[0]);
  13259. case 2:
  13260. return result.splice(limit[0] - 1, limit[1]);
  13261. }
  13262. }
  13263. };
  13264. /***/ }),
  13265. /* 57 */
  13266. /***/ (function(module, exports, __webpack_require__) {
  13267. /* WEBPACK VAR INJECTION */(function(Buffer) {;
  13268. (function (sax) {
  13269. // wrapper for non-node envs
  13270. sax.parser = function (strict, opt) {
  13271. return new SAXParser(strict, opt);
  13272. };
  13273. sax.SAXParser = SAXParser;
  13274. sax.SAXStream = SAXStream;
  13275. sax.createStream = createStream; // When we pass the MAX_BUFFER_LENGTH position, start checking for buffer overruns.
  13276. // When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)),
  13277. // since that's the earliest that a buffer overrun could occur. This way, checks are
  13278. // as rare as required, but as often as necessary to ensure never crossing this bound.
  13279. // Furthermore, buffers are only tested at most once per write(), so passing a very
  13280. // large string into write() might have undesirable effects, but this is manageable by
  13281. // the caller, so it is assumed to be safe. Thus, a call to write() may, in the extreme
  13282. // edge case, result in creating at most one complete copy of the string passed in.
  13283. // Set to Infinity to have unlimited buffers.
  13284. sax.MAX_BUFFER_LENGTH = 64 * 1024;
  13285. var buffers = ['comment', 'sgmlDecl', 'textNode', 'tagName', 'doctype', 'procInstName', 'procInstBody', 'entity', 'attribName', 'attribValue', 'cdata', 'script'];
  13286. sax.EVENTS = ['text', 'processinginstruction', 'sgmldeclaration', 'doctype', 'comment', 'opentagstart', 'attribute', 'opentag', 'closetag', 'opencdata', 'cdata', 'closecdata', 'error', 'end', 'ready', 'script', 'opennamespace', 'closenamespace'];
  13287. function SAXParser(strict, opt) {
  13288. if (!(this instanceof SAXParser)) {
  13289. return new SAXParser(strict, opt);
  13290. }
  13291. var parser = this;
  13292. clearBuffers(parser);
  13293. parser.q = parser.c = '';
  13294. parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH;
  13295. parser.opt = opt || {};
  13296. parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags;
  13297. parser.looseCase = parser.opt.lowercase ? 'toLowerCase' : 'toUpperCase';
  13298. parser.tags = [];
  13299. parser.closed = parser.closedRoot = parser.sawRoot = false;
  13300. parser.tag = parser.error = null;
  13301. parser.strict = !!strict;
  13302. parser.noscript = !!(strict || parser.opt.noscript);
  13303. parser.state = S.BEGIN;
  13304. parser.strictEntities = parser.opt.strictEntities;
  13305. parser.ENTITIES = parser.strictEntities ? Object.create(sax.XML_ENTITIES) : Object.create(sax.ENTITIES);
  13306. parser.attribList = []; // namespaces form a prototype chain.
  13307. // it always points at the current tag,
  13308. // which protos to its parent tag.
  13309. if (parser.opt.xmlns) {
  13310. parser.ns = Object.create(rootNS);
  13311. } // mostly just for error reporting
  13312. parser.trackPosition = parser.opt.position !== false;
  13313. if (parser.trackPosition) {
  13314. parser.position = parser.line = parser.column = 0;
  13315. }
  13316. emit(parser, 'onready');
  13317. }
  13318. if (!Object.create) {
  13319. Object.create = function (o) {
  13320. function F() {}
  13321. F.prototype = o;
  13322. var newf = new F();
  13323. return newf;
  13324. };
  13325. }
  13326. if (!Object.keys) {
  13327. Object.keys = function (o) {
  13328. var a = [];
  13329. for (var i in o) {
  13330. if (o.hasOwnProperty(i)) a.push(i);
  13331. }
  13332. return a;
  13333. };
  13334. }
  13335. function checkBufferLength(parser) {
  13336. var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10);
  13337. var maxActual = 0;
  13338. for (var i = 0, l = buffers.length; i < l; i++) {
  13339. var len = parser[buffers[i]].length;
  13340. if (len > maxAllowed) {
  13341. // Text/cdata nodes can get big, and since they're buffered,
  13342. // we can get here under normal conditions.
  13343. // Avoid issues by emitting the text node now,
  13344. // so at least it won't get any bigger.
  13345. switch (buffers[i]) {
  13346. case 'textNode':
  13347. closeText(parser);
  13348. break;
  13349. case 'cdata':
  13350. emitNode(parser, 'oncdata', parser.cdata);
  13351. parser.cdata = '';
  13352. break;
  13353. case 'script':
  13354. emitNode(parser, 'onscript', parser.script);
  13355. parser.script = '';
  13356. break;
  13357. default:
  13358. error(parser, 'Max buffer length exceeded: ' + buffers[i]);
  13359. }
  13360. }
  13361. maxActual = Math.max(maxActual, len);
  13362. } // schedule the next check for the earliest possible buffer overrun.
  13363. var m = sax.MAX_BUFFER_LENGTH - maxActual;
  13364. parser.bufferCheckPosition = m + parser.position;
  13365. }
  13366. function clearBuffers(parser) {
  13367. for (var i = 0, l = buffers.length; i < l; i++) {
  13368. parser[buffers[i]] = '';
  13369. }
  13370. }
  13371. function flushBuffers(parser) {
  13372. closeText(parser);
  13373. if (parser.cdata !== '') {
  13374. emitNode(parser, 'oncdata', parser.cdata);
  13375. parser.cdata = '';
  13376. }
  13377. if (parser.script !== '') {
  13378. emitNode(parser, 'onscript', parser.script);
  13379. parser.script = '';
  13380. }
  13381. }
  13382. SAXParser.prototype = {
  13383. end: function end() {
  13384. _end(this);
  13385. },
  13386. write: write,
  13387. resume: function resume() {
  13388. this.error = null;
  13389. return this;
  13390. },
  13391. close: function close() {
  13392. return this.write(null);
  13393. },
  13394. flush: function flush() {
  13395. flushBuffers(this);
  13396. }
  13397. };
  13398. var Stream;
  13399. try {
  13400. Stream = __webpack_require__(60).Stream;
  13401. } catch (ex) {
  13402. Stream = function Stream() {};
  13403. }
  13404. var streamWraps = sax.EVENTS.filter(function (ev) {
  13405. return ev !== 'error' && ev !== 'end';
  13406. });
  13407. function createStream(strict, opt) {
  13408. return new SAXStream(strict, opt);
  13409. }
  13410. function SAXStream(strict, opt) {
  13411. if (!(this instanceof SAXStream)) {
  13412. return new SAXStream(strict, opt);
  13413. }
  13414. Stream.apply(this);
  13415. this._parser = new SAXParser(strict, opt);
  13416. this.writable = true;
  13417. this.readable = true;
  13418. var me = this;
  13419. this._parser.onend = function () {
  13420. me.emit('end');
  13421. };
  13422. this._parser.onerror = function (er) {
  13423. me.emit('error', er); // if didn't throw, then means error was handled.
  13424. // go ahead and clear error, so we can write again.
  13425. me._parser.error = null;
  13426. };
  13427. this._decoder = null;
  13428. streamWraps.forEach(function (ev) {
  13429. Object.defineProperty(me, 'on' + ev, {
  13430. get: function get() {
  13431. return me._parser['on' + ev];
  13432. },
  13433. set: function set(h) {
  13434. if (!h) {
  13435. me.removeAllListeners(ev);
  13436. me._parser['on' + ev] = h;
  13437. return h;
  13438. }
  13439. me.on(ev, h);
  13440. },
  13441. enumerable: true,
  13442. configurable: false
  13443. });
  13444. });
  13445. }
  13446. SAXStream.prototype = Object.create(Stream.prototype, {
  13447. constructor: {
  13448. value: SAXStream
  13449. }
  13450. });
  13451. SAXStream.prototype.write = function (data) {
  13452. if (typeof Buffer === 'function' && typeof Buffer.isBuffer === 'function' && Buffer.isBuffer(data)) {
  13453. if (!this._decoder) {
  13454. var SD = __webpack_require__(29).StringDecoder;
  13455. this._decoder = new SD('utf8');
  13456. }
  13457. data = this._decoder.write(data);
  13458. }
  13459. this._parser.write(data.toString());
  13460. this.emit('data', data);
  13461. return true;
  13462. };
  13463. SAXStream.prototype.end = function (chunk) {
  13464. if (chunk && chunk.length) {
  13465. this.write(chunk);
  13466. }
  13467. this._parser.end();
  13468. return true;
  13469. };
  13470. SAXStream.prototype.on = function (ev, handler) {
  13471. var me = this;
  13472. if (!me._parser['on' + ev] && streamWraps.indexOf(ev) !== -1) {
  13473. me._parser['on' + ev] = function () {
  13474. var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments);
  13475. args.splice(0, 0, ev);
  13476. me.emit.apply(me, args);
  13477. };
  13478. }
  13479. return Stream.prototype.on.call(me, ev, handler);
  13480. }; // this really needs to be replaced with character classes.
  13481. // XML allows all manner of ridiculous numbers and digits.
  13482. var CDATA = '[CDATA[';
  13483. var DOCTYPE = 'DOCTYPE';
  13484. var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace';
  13485. var XMLNS_NAMESPACE = 'http://www.w3.org/2000/xmlns/';
  13486. var rootNS = {
  13487. xml: XML_NAMESPACE,
  13488. xmlns: XMLNS_NAMESPACE
  13489. }; // http://www.w3.org/TR/REC-xml/#NT-NameStartChar
  13490. // This implementation works on strings, a single character at a time
  13491. // as such, it cannot ever support astral-plane characters (10000-EFFFF)
  13492. // without a significant breaking change to either this parser, or the
  13493. // JavaScript language. Implementation of an emoji-capable xml parser
  13494. // is left as an exercise for the reader.
  13495. var nameStart = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;
  13496. var nameBody = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;
  13497. var entityStart = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;
  13498. var entityBody = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;
  13499. function isWhitespace(c) {
  13500. return c === ' ' || c === '\n' || c === '\r' || c === '\t';
  13501. }
  13502. function isQuote(c) {
  13503. return c === '"' || c === '\'';
  13504. }
  13505. function isAttribEnd(c) {
  13506. return c === '>' || isWhitespace(c);
  13507. }
  13508. function isMatch(regex, c) {
  13509. return regex.test(c);
  13510. }
  13511. function notMatch(regex, c) {
  13512. return !isMatch(regex, c);
  13513. }
  13514. var S = 0;
  13515. sax.STATE = {
  13516. BEGIN: S++,
  13517. // leading byte order mark or whitespace
  13518. BEGIN_WHITESPACE: S++,
  13519. // leading whitespace
  13520. TEXT: S++,
  13521. // general stuff
  13522. TEXT_ENTITY: S++,
  13523. // &amp and such.
  13524. OPEN_WAKA: S++,
  13525. // <
  13526. SGML_DECL: S++,
  13527. // <!BLARG
  13528. SGML_DECL_QUOTED: S++,
  13529. // <!BLARG foo "bar
  13530. DOCTYPE: S++,
  13531. // <!DOCTYPE
  13532. DOCTYPE_QUOTED: S++,
  13533. // <!DOCTYPE "//blah
  13534. DOCTYPE_DTD: S++,
  13535. // <!DOCTYPE "//blah" [ ...
  13536. DOCTYPE_DTD_QUOTED: S++,
  13537. // <!DOCTYPE "//blah" [ "foo
  13538. COMMENT_STARTING: S++,
  13539. // <!-
  13540. COMMENT: S++,
  13541. // <!--
  13542. COMMENT_ENDING: S++,
  13543. // <!-- blah -
  13544. COMMENT_ENDED: S++,
  13545. // <!-- blah --
  13546. CDATA: S++,
  13547. // <![CDATA[ something
  13548. CDATA_ENDING: S++,
  13549. // ]
  13550. CDATA_ENDING_2: S++,
  13551. // ]]
  13552. PROC_INST: S++,
  13553. // <?hi
  13554. PROC_INST_BODY: S++,
  13555. // <?hi there
  13556. PROC_INST_ENDING: S++,
  13557. // <?hi "there" ?
  13558. OPEN_TAG: S++,
  13559. // <strong
  13560. OPEN_TAG_SLASH: S++,
  13561. // <strong /
  13562. ATTRIB: S++,
  13563. // <a
  13564. ATTRIB_NAME: S++,
  13565. // <a foo
  13566. ATTRIB_NAME_SAW_WHITE: S++,
  13567. // <a foo _
  13568. ATTRIB_VALUE: S++,
  13569. // <a foo=
  13570. ATTRIB_VALUE_QUOTED: S++,
  13571. // <a foo="bar
  13572. ATTRIB_VALUE_CLOSED: S++,
  13573. // <a foo="bar"
  13574. ATTRIB_VALUE_UNQUOTED: S++,
  13575. // <a foo=bar
  13576. ATTRIB_VALUE_ENTITY_Q: S++,
  13577. // <foo bar="&quot;"
  13578. ATTRIB_VALUE_ENTITY_U: S++,
  13579. // <foo bar=&quot
  13580. CLOSE_TAG: S++,
  13581. // </a
  13582. CLOSE_TAG_SAW_WHITE: S++,
  13583. // </a >
  13584. SCRIPT: S++,
  13585. // <script> ...
  13586. SCRIPT_ENDING: S++ // <script> ... <
  13587. };
  13588. sax.XML_ENTITIES = {
  13589. 'amp': '&',
  13590. 'gt': '>',
  13591. 'lt': '<',
  13592. 'quot': '"',
  13593. 'apos': "'"
  13594. };
  13595. sax.ENTITIES = {
  13596. 'amp': '&',
  13597. 'gt': '>',
  13598. 'lt': '<',
  13599. 'quot': '"',
  13600. 'apos': "'",
  13601. 'AElig': 198,
  13602. 'Aacute': 193,
  13603. 'Acirc': 194,
  13604. 'Agrave': 192,
  13605. 'Aring': 197,
  13606. 'Atilde': 195,
  13607. 'Auml': 196,
  13608. 'Ccedil': 199,
  13609. 'ETH': 208,
  13610. 'Eacute': 201,
  13611. 'Ecirc': 202,
  13612. 'Egrave': 200,
  13613. 'Euml': 203,
  13614. 'Iacute': 205,
  13615. 'Icirc': 206,
  13616. 'Igrave': 204,
  13617. 'Iuml': 207,
  13618. 'Ntilde': 209,
  13619. 'Oacute': 211,
  13620. 'Ocirc': 212,
  13621. 'Ograve': 210,
  13622. 'Oslash': 216,
  13623. 'Otilde': 213,
  13624. 'Ouml': 214,
  13625. 'THORN': 222,
  13626. 'Uacute': 218,
  13627. 'Ucirc': 219,
  13628. 'Ugrave': 217,
  13629. 'Uuml': 220,
  13630. 'Yacute': 221,
  13631. 'aacute': 225,
  13632. 'acirc': 226,
  13633. 'aelig': 230,
  13634. 'agrave': 224,
  13635. 'aring': 229,
  13636. 'atilde': 227,
  13637. 'auml': 228,
  13638. 'ccedil': 231,
  13639. 'eacute': 233,
  13640. 'ecirc': 234,
  13641. 'egrave': 232,
  13642. 'eth': 240,
  13643. 'euml': 235,
  13644. 'iacute': 237,
  13645. 'icirc': 238,
  13646. 'igrave': 236,
  13647. 'iuml': 239,
  13648. 'ntilde': 241,
  13649. 'oacute': 243,
  13650. 'ocirc': 244,
  13651. 'ograve': 242,
  13652. 'oslash': 248,
  13653. 'otilde': 245,
  13654. 'ouml': 246,
  13655. 'szlig': 223,
  13656. 'thorn': 254,
  13657. 'uacute': 250,
  13658. 'ucirc': 251,
  13659. 'ugrave': 249,
  13660. 'uuml': 252,
  13661. 'yacute': 253,
  13662. 'yuml': 255,
  13663. 'copy': 169,
  13664. 'reg': 174,
  13665. 'nbsp': 160,
  13666. 'iexcl': 161,
  13667. 'cent': 162,
  13668. 'pound': 163,
  13669. 'curren': 164,
  13670. 'yen': 165,
  13671. 'brvbar': 166,
  13672. 'sect': 167,
  13673. 'uml': 168,
  13674. 'ordf': 170,
  13675. 'laquo': 171,
  13676. 'not': 172,
  13677. 'shy': 173,
  13678. 'macr': 175,
  13679. 'deg': 176,
  13680. 'plusmn': 177,
  13681. 'sup1': 185,
  13682. 'sup2': 178,
  13683. 'sup3': 179,
  13684. 'acute': 180,
  13685. 'micro': 181,
  13686. 'para': 182,
  13687. 'middot': 183,
  13688. 'cedil': 184,
  13689. 'ordm': 186,
  13690. 'raquo': 187,
  13691. 'frac14': 188,
  13692. 'frac12': 189,
  13693. 'frac34': 190,
  13694. 'iquest': 191,
  13695. 'times': 215,
  13696. 'divide': 247,
  13697. 'OElig': 338,
  13698. 'oelig': 339,
  13699. 'Scaron': 352,
  13700. 'scaron': 353,
  13701. 'Yuml': 376,
  13702. 'fnof': 402,
  13703. 'circ': 710,
  13704. 'tilde': 732,
  13705. 'Alpha': 913,
  13706. 'Beta': 914,
  13707. 'Gamma': 915,
  13708. 'Delta': 916,
  13709. 'Epsilon': 917,
  13710. 'Zeta': 918,
  13711. 'Eta': 919,
  13712. 'Theta': 920,
  13713. 'Iota': 921,
  13714. 'Kappa': 922,
  13715. 'Lambda': 923,
  13716. 'Mu': 924,
  13717. 'Nu': 925,
  13718. 'Xi': 926,
  13719. 'Omicron': 927,
  13720. 'Pi': 928,
  13721. 'Rho': 929,
  13722. 'Sigma': 931,
  13723. 'Tau': 932,
  13724. 'Upsilon': 933,
  13725. 'Phi': 934,
  13726. 'Chi': 935,
  13727. 'Psi': 936,
  13728. 'Omega': 937,
  13729. 'alpha': 945,
  13730. 'beta': 946,
  13731. 'gamma': 947,
  13732. 'delta': 948,
  13733. 'epsilon': 949,
  13734. 'zeta': 950,
  13735. 'eta': 951,
  13736. 'theta': 952,
  13737. 'iota': 953,
  13738. 'kappa': 954,
  13739. 'lambda': 955,
  13740. 'mu': 956,
  13741. 'nu': 957,
  13742. 'xi': 958,
  13743. 'omicron': 959,
  13744. 'pi': 960,
  13745. 'rho': 961,
  13746. 'sigmaf': 962,
  13747. 'sigma': 963,
  13748. 'tau': 964,
  13749. 'upsilon': 965,
  13750. 'phi': 966,
  13751. 'chi': 967,
  13752. 'psi': 968,
  13753. 'omega': 969,
  13754. 'thetasym': 977,
  13755. 'upsih': 978,
  13756. 'piv': 982,
  13757. 'ensp': 8194,
  13758. 'emsp': 8195,
  13759. 'thinsp': 8201,
  13760. 'zwnj': 8204,
  13761. 'zwj': 8205,
  13762. 'lrm': 8206,
  13763. 'rlm': 8207,
  13764. 'ndash': 8211,
  13765. 'mdash': 8212,
  13766. 'lsquo': 8216,
  13767. 'rsquo': 8217,
  13768. 'sbquo': 8218,
  13769. 'ldquo': 8220,
  13770. 'rdquo': 8221,
  13771. 'bdquo': 8222,
  13772. 'dagger': 8224,
  13773. 'Dagger': 8225,
  13774. 'bull': 8226,
  13775. 'hellip': 8230,
  13776. 'permil': 8240,
  13777. 'prime': 8242,
  13778. 'Prime': 8243,
  13779. 'lsaquo': 8249,
  13780. 'rsaquo': 8250,
  13781. 'oline': 8254,
  13782. 'frasl': 8260,
  13783. 'euro': 8364,
  13784. 'image': 8465,
  13785. 'weierp': 8472,
  13786. 'real': 8476,
  13787. 'trade': 8482,
  13788. 'alefsym': 8501,
  13789. 'larr': 8592,
  13790. 'uarr': 8593,
  13791. 'rarr': 8594,
  13792. 'darr': 8595,
  13793. 'harr': 8596,
  13794. 'crarr': 8629,
  13795. 'lArr': 8656,
  13796. 'uArr': 8657,
  13797. 'rArr': 8658,
  13798. 'dArr': 8659,
  13799. 'hArr': 8660,
  13800. 'forall': 8704,
  13801. 'part': 8706,
  13802. 'exist': 8707,
  13803. 'empty': 8709,
  13804. 'nabla': 8711,
  13805. 'isin': 8712,
  13806. 'notin': 8713,
  13807. 'ni': 8715,
  13808. 'prod': 8719,
  13809. 'sum': 8721,
  13810. 'minus': 8722,
  13811. 'lowast': 8727,
  13812. 'radic': 8730,
  13813. 'prop': 8733,
  13814. 'infin': 8734,
  13815. 'ang': 8736,
  13816. 'and': 8743,
  13817. 'or': 8744,
  13818. 'cap': 8745,
  13819. 'cup': 8746,
  13820. 'int': 8747,
  13821. 'there4': 8756,
  13822. 'sim': 8764,
  13823. 'cong': 8773,
  13824. 'asymp': 8776,
  13825. 'ne': 8800,
  13826. 'equiv': 8801,
  13827. 'le': 8804,
  13828. 'ge': 8805,
  13829. 'sub': 8834,
  13830. 'sup': 8835,
  13831. 'nsub': 8836,
  13832. 'sube': 8838,
  13833. 'supe': 8839,
  13834. 'oplus': 8853,
  13835. 'otimes': 8855,
  13836. 'perp': 8869,
  13837. 'sdot': 8901,
  13838. 'lceil': 8968,
  13839. 'rceil': 8969,
  13840. 'lfloor': 8970,
  13841. 'rfloor': 8971,
  13842. 'lang': 9001,
  13843. 'rang': 9002,
  13844. 'loz': 9674,
  13845. 'spades': 9824,
  13846. 'clubs': 9827,
  13847. 'hearts': 9829,
  13848. 'diams': 9830
  13849. };
  13850. Object.keys(sax.ENTITIES).forEach(function (key) {
  13851. var e = sax.ENTITIES[key];
  13852. var s = typeof e === 'number' ? String.fromCharCode(e) : e;
  13853. sax.ENTITIES[key] = s;
  13854. });
  13855. for (var s in sax.STATE) {
  13856. sax.STATE[sax.STATE[s]] = s;
  13857. } // shorthand
  13858. S = sax.STATE;
  13859. function emit(parser, event, data) {
  13860. parser[event] && parser[event](data);
  13861. }
  13862. function emitNode(parser, nodeType, data) {
  13863. if (parser.textNode) closeText(parser);
  13864. emit(parser, nodeType, data);
  13865. }
  13866. function closeText(parser) {
  13867. parser.textNode = textopts(parser.opt, parser.textNode);
  13868. if (parser.textNode) emit(parser, 'ontext', parser.textNode);
  13869. parser.textNode = '';
  13870. }
  13871. function textopts(opt, text) {
  13872. if (opt.trim) text = text.trim();
  13873. if (opt.normalize) text = text.replace(/\s+/g, ' ');
  13874. return text;
  13875. }
  13876. function error(parser, er) {
  13877. closeText(parser);
  13878. if (parser.trackPosition) {
  13879. er += '\nLine: ' + parser.line + '\nColumn: ' + parser.column + '\nChar: ' + parser.c;
  13880. }
  13881. er = new Error(er);
  13882. parser.error = er;
  13883. emit(parser, 'onerror', er);
  13884. return parser;
  13885. }
  13886. function _end(parser) {
  13887. if (parser.sawRoot && !parser.closedRoot) strictFail(parser, 'Unclosed root tag');
  13888. if (parser.state !== S.BEGIN && parser.state !== S.BEGIN_WHITESPACE && parser.state !== S.TEXT) {
  13889. error(parser, 'Unexpected end');
  13890. }
  13891. closeText(parser);
  13892. parser.c = '';
  13893. parser.closed = true;
  13894. emit(parser, 'onend');
  13895. SAXParser.call(parser, parser.strict, parser.opt);
  13896. return parser;
  13897. }
  13898. function strictFail(parser, message) {
  13899. if (typeof parser !== 'object' || !(parser instanceof SAXParser)) {
  13900. throw new Error('bad call to strictFail');
  13901. }
  13902. if (parser.strict) {
  13903. error(parser, message);
  13904. }
  13905. }
  13906. function newTag(parser) {
  13907. if (!parser.strict) parser.tagName = parser.tagName[parser.looseCase]();
  13908. var parent = parser.tags[parser.tags.length - 1] || parser;
  13909. var tag = parser.tag = {
  13910. name: parser.tagName,
  13911. attributes: {}
  13912. }; // will be overridden if tag contails an xmlns="foo" or xmlns:foo="bar"
  13913. if (parser.opt.xmlns) {
  13914. tag.ns = parent.ns;
  13915. }
  13916. parser.attribList.length = 0;
  13917. emitNode(parser, 'onopentagstart', tag);
  13918. }
  13919. function qname(name, attribute) {
  13920. var i = name.indexOf(':');
  13921. var qualName = i < 0 ? ['', name] : name.split(':');
  13922. var prefix = qualName[0];
  13923. var local = qualName[1]; // <x "xmlns"="http://foo">
  13924. if (attribute && name === 'xmlns') {
  13925. prefix = 'xmlns';
  13926. local = '';
  13927. }
  13928. return {
  13929. prefix: prefix,
  13930. local: local
  13931. };
  13932. }
  13933. function attrib(parser) {
  13934. if (!parser.strict) {
  13935. parser.attribName = parser.attribName[parser.looseCase]();
  13936. }
  13937. if (parser.attribList.indexOf(parser.attribName) !== -1 || parser.tag.attributes.hasOwnProperty(parser.attribName)) {
  13938. parser.attribName = parser.attribValue = '';
  13939. return;
  13940. }
  13941. if (parser.opt.xmlns) {
  13942. var qn = qname(parser.attribName, true);
  13943. var prefix = qn.prefix;
  13944. var local = qn.local;
  13945. if (prefix === 'xmlns') {
  13946. // namespace binding attribute. push the binding into scope
  13947. if (local === 'xml' && parser.attribValue !== XML_NAMESPACE) {
  13948. strictFail(parser, 'xml: prefix must be bound to ' + XML_NAMESPACE + '\n' + 'Actual: ' + parser.attribValue);
  13949. } else if (local === 'xmlns' && parser.attribValue !== XMLNS_NAMESPACE) {
  13950. strictFail(parser, 'xmlns: prefix must be bound to ' + XMLNS_NAMESPACE + '\n' + 'Actual: ' + parser.attribValue);
  13951. } else {
  13952. var tag = parser.tag;
  13953. var parent = parser.tags[parser.tags.length - 1] || parser;
  13954. if (tag.ns === parent.ns) {
  13955. tag.ns = Object.create(parent.ns);
  13956. }
  13957. tag.ns[local] = parser.attribValue;
  13958. }
  13959. } // defer onattribute events until all attributes have been seen
  13960. // so any new bindings can take effect. preserve attribute order
  13961. // so deferred events can be emitted in document order
  13962. parser.attribList.push([parser.attribName, parser.attribValue]);
  13963. } else {
  13964. // in non-xmlns mode, we can emit the event right away
  13965. parser.tag.attributes[parser.attribName] = parser.attribValue;
  13966. emitNode(parser, 'onattribute', {
  13967. name: parser.attribName,
  13968. value: parser.attribValue
  13969. });
  13970. }
  13971. parser.attribName = parser.attribValue = '';
  13972. }
  13973. function openTag(parser, selfClosing) {
  13974. if (parser.opt.xmlns) {
  13975. // emit namespace binding events
  13976. var tag = parser.tag; // add namespace info to tag
  13977. var qn = qname(parser.tagName);
  13978. tag.prefix = qn.prefix;
  13979. tag.local = qn.local;
  13980. tag.uri = tag.ns[qn.prefix] || '';
  13981. if (tag.prefix && !tag.uri) {
  13982. strictFail(parser, 'Unbound namespace prefix: ' + JSON.stringify(parser.tagName));
  13983. tag.uri = qn.prefix;
  13984. }
  13985. var parent = parser.tags[parser.tags.length - 1] || parser;
  13986. if (tag.ns && parent.ns !== tag.ns) {
  13987. Object.keys(tag.ns).forEach(function (p) {
  13988. emitNode(parser, 'onopennamespace', {
  13989. prefix: p,
  13990. uri: tag.ns[p]
  13991. });
  13992. });
  13993. } // handle deferred onattribute events
  13994. // Note: do not apply default ns to attributes:
  13995. // http://www.w3.org/TR/REC-xml-names/#defaulting
  13996. for (var i = 0, l = parser.attribList.length; i < l; i++) {
  13997. var nv = parser.attribList[i];
  13998. var name = nv[0];
  13999. var value = nv[1];
  14000. var qualName = qname(name, true);
  14001. var prefix = qualName.prefix;
  14002. var local = qualName.local;
  14003. var uri = prefix === '' ? '' : tag.ns[prefix] || '';
  14004. var a = {
  14005. name: name,
  14006. value: value,
  14007. prefix: prefix,
  14008. local: local,
  14009. uri: uri
  14010. }; // if there's any attributes with an undefined namespace,
  14011. // then fail on them now.
  14012. if (prefix && prefix !== 'xmlns' && !uri) {
  14013. strictFail(parser, 'Unbound namespace prefix: ' + JSON.stringify(prefix));
  14014. a.uri = prefix;
  14015. }
  14016. parser.tag.attributes[name] = a;
  14017. emitNode(parser, 'onattribute', a);
  14018. }
  14019. parser.attribList.length = 0;
  14020. }
  14021. parser.tag.isSelfClosing = !!selfClosing; // process the tag
  14022. parser.sawRoot = true;
  14023. parser.tags.push(parser.tag);
  14024. emitNode(parser, 'onopentag', parser.tag);
  14025. if (!selfClosing) {
  14026. // special case for <script> in non-strict mode.
  14027. if (!parser.noscript && parser.tagName.toLowerCase() === 'script') {
  14028. parser.state = S.SCRIPT;
  14029. } else {
  14030. parser.state = S.TEXT;
  14031. }
  14032. parser.tag = null;
  14033. parser.tagName = '';
  14034. }
  14035. parser.attribName = parser.attribValue = '';
  14036. parser.attribList.length = 0;
  14037. }
  14038. function closeTag(parser) {
  14039. if (!parser.tagName) {
  14040. strictFail(parser, 'Weird empty close tag.');
  14041. parser.textNode += '</>';
  14042. parser.state = S.TEXT;
  14043. return;
  14044. }
  14045. if (parser.script) {
  14046. if (parser.tagName !== 'script') {
  14047. parser.script += '</' + parser.tagName + '>';
  14048. parser.tagName = '';
  14049. parser.state = S.SCRIPT;
  14050. return;
  14051. }
  14052. emitNode(parser, 'onscript', parser.script);
  14053. parser.script = '';
  14054. } // first make sure that the closing tag actually exists.
  14055. // <a><b></c></b></a> will close everything, otherwise.
  14056. var t = parser.tags.length;
  14057. var tagName = parser.tagName;
  14058. if (!parser.strict) {
  14059. tagName = tagName[parser.looseCase]();
  14060. }
  14061. var closeTo = tagName;
  14062. while (t--) {
  14063. var close = parser.tags[t];
  14064. if (close.name !== closeTo) {
  14065. // fail the first time in strict mode
  14066. strictFail(parser, 'Unexpected close tag');
  14067. } else {
  14068. break;
  14069. }
  14070. } // didn't find it. we already failed for strict, so just abort.
  14071. if (t < 0) {
  14072. strictFail(parser, 'Unmatched closing tag: ' + parser.tagName);
  14073. parser.textNode += '</' + parser.tagName + '>';
  14074. parser.state = S.TEXT;
  14075. return;
  14076. }
  14077. parser.tagName = tagName;
  14078. var s = parser.tags.length;
  14079. while (s-- > t) {
  14080. var tag = parser.tag = parser.tags.pop();
  14081. parser.tagName = parser.tag.name;
  14082. emitNode(parser, 'onclosetag', parser.tagName);
  14083. var x = {};
  14084. for (var i in tag.ns) {
  14085. x[i] = tag.ns[i];
  14086. }
  14087. var parent = parser.tags[parser.tags.length - 1] || parser;
  14088. if (parser.opt.xmlns && tag.ns !== parent.ns) {
  14089. // remove namespace bindings introduced by tag
  14090. Object.keys(tag.ns).forEach(function (p) {
  14091. var n = tag.ns[p];
  14092. emitNode(parser, 'onclosenamespace', {
  14093. prefix: p,
  14094. uri: n
  14095. });
  14096. });
  14097. }
  14098. }
  14099. if (t === 0) parser.closedRoot = true;
  14100. parser.tagName = parser.attribValue = parser.attribName = '';
  14101. parser.attribList.length = 0;
  14102. parser.state = S.TEXT;
  14103. }
  14104. function parseEntity(parser) {
  14105. var entity = parser.entity;
  14106. var entityLC = entity.toLowerCase();
  14107. var num;
  14108. var numStr = '';
  14109. if (parser.ENTITIES[entity]) {
  14110. return parser.ENTITIES[entity];
  14111. }
  14112. if (parser.ENTITIES[entityLC]) {
  14113. return parser.ENTITIES[entityLC];
  14114. }
  14115. entity = entityLC;
  14116. if (entity.charAt(0) === '#') {
  14117. if (entity.charAt(1) === 'x') {
  14118. entity = entity.slice(2);
  14119. num = parseInt(entity, 16);
  14120. numStr = num.toString(16);
  14121. } else {
  14122. entity = entity.slice(1);
  14123. num = parseInt(entity, 10);
  14124. numStr = num.toString(10);
  14125. }
  14126. }
  14127. entity = entity.replace(/^0+/, '');
  14128. if (isNaN(num) || numStr.toLowerCase() !== entity) {
  14129. strictFail(parser, 'Invalid character entity');
  14130. return '&' + parser.entity + ';';
  14131. }
  14132. return String.fromCodePoint(num);
  14133. }
  14134. function beginWhiteSpace(parser, c) {
  14135. if (c === '<') {
  14136. parser.state = S.OPEN_WAKA;
  14137. parser.startTagPosition = parser.position;
  14138. } else if (!isWhitespace(c)) {
  14139. // have to process this as a text node.
  14140. // weird, but happens.
  14141. strictFail(parser, 'Non-whitespace before first tag.');
  14142. parser.textNode = c;
  14143. parser.state = S.TEXT;
  14144. }
  14145. }
  14146. function charAt(chunk, i) {
  14147. var result = '';
  14148. if (i < chunk.length) {
  14149. result = chunk.charAt(i);
  14150. }
  14151. return result;
  14152. }
  14153. function write(chunk) {
  14154. var parser = this;
  14155. if (this.error) {
  14156. throw this.error;
  14157. }
  14158. if (parser.closed) {
  14159. return error(parser, 'Cannot write after close. Assign an onready handler.');
  14160. }
  14161. if (chunk === null) {
  14162. return _end(parser);
  14163. }
  14164. if (typeof chunk === 'object') {
  14165. chunk = chunk.toString();
  14166. }
  14167. var i = 0;
  14168. var c = '';
  14169. while (true) {
  14170. c = charAt(chunk, i++);
  14171. parser.c = c;
  14172. if (!c) {
  14173. break;
  14174. }
  14175. if (parser.trackPosition) {
  14176. parser.position++;
  14177. if (c === '\n') {
  14178. parser.line++;
  14179. parser.column = 0;
  14180. } else {
  14181. parser.column++;
  14182. }
  14183. }
  14184. switch (parser.state) {
  14185. case S.BEGIN:
  14186. parser.state = S.BEGIN_WHITESPACE;
  14187. if (c === "\uFEFF") {
  14188. continue;
  14189. }
  14190. beginWhiteSpace(parser, c);
  14191. continue;
  14192. case S.BEGIN_WHITESPACE:
  14193. beginWhiteSpace(parser, c);
  14194. continue;
  14195. case S.TEXT:
  14196. if (parser.sawRoot && !parser.closedRoot) {
  14197. var starti = i - 1;
  14198. while (c && c !== '<' && c !== '&') {
  14199. c = charAt(chunk, i++);
  14200. if (c && parser.trackPosition) {
  14201. parser.position++;
  14202. if (c === '\n') {
  14203. parser.line++;
  14204. parser.column = 0;
  14205. } else {
  14206. parser.column++;
  14207. }
  14208. }
  14209. }
  14210. parser.textNode += chunk.substring(starti, i - 1);
  14211. }
  14212. if (c === '<' && !(parser.sawRoot && parser.closedRoot && !parser.strict)) {
  14213. parser.state = S.OPEN_WAKA;
  14214. parser.startTagPosition = parser.position;
  14215. } else {
  14216. if (!isWhitespace(c) && (!parser.sawRoot || parser.closedRoot)) {
  14217. strictFail(parser, 'Text data outside of root node.');
  14218. }
  14219. if (c === '&') {
  14220. parser.state = S.TEXT_ENTITY;
  14221. } else {
  14222. parser.textNode += c;
  14223. }
  14224. }
  14225. continue;
  14226. case S.SCRIPT:
  14227. // only non-strict
  14228. if (c === '<') {
  14229. parser.state = S.SCRIPT_ENDING;
  14230. } else {
  14231. parser.script += c;
  14232. }
  14233. continue;
  14234. case S.SCRIPT_ENDING:
  14235. if (c === '/') {
  14236. parser.state = S.CLOSE_TAG;
  14237. } else {
  14238. parser.script += '<' + c;
  14239. parser.state = S.SCRIPT;
  14240. }
  14241. continue;
  14242. case S.OPEN_WAKA:
  14243. // either a /, ?, !, or text is coming next.
  14244. if (c === '!') {
  14245. parser.state = S.SGML_DECL;
  14246. parser.sgmlDecl = '';
  14247. } else if (isWhitespace(c)) {// wait for it...
  14248. } else if (isMatch(nameStart, c)) {
  14249. parser.state = S.OPEN_TAG;
  14250. parser.tagName = c;
  14251. } else if (c === '/') {
  14252. parser.state = S.CLOSE_TAG;
  14253. parser.tagName = '';
  14254. } else if (c === '?') {
  14255. parser.state = S.PROC_INST;
  14256. parser.procInstName = parser.procInstBody = '';
  14257. } else {
  14258. strictFail(parser, 'Unencoded <'); // if there was some whitespace, then add that in.
  14259. if (parser.startTagPosition + 1 < parser.position) {
  14260. var pad = parser.position - parser.startTagPosition;
  14261. c = new Array(pad).join(' ') + c;
  14262. }
  14263. parser.textNode += '<' + c;
  14264. parser.state = S.TEXT;
  14265. }
  14266. continue;
  14267. case S.SGML_DECL:
  14268. if ((parser.sgmlDecl + c).toUpperCase() === CDATA) {
  14269. emitNode(parser, 'onopencdata');
  14270. parser.state = S.CDATA;
  14271. parser.sgmlDecl = '';
  14272. parser.cdata = '';
  14273. } else if (parser.sgmlDecl + c === '--') {
  14274. parser.state = S.COMMENT;
  14275. parser.comment = '';
  14276. parser.sgmlDecl = '';
  14277. } else if ((parser.sgmlDecl + c).toUpperCase() === DOCTYPE) {
  14278. parser.state = S.DOCTYPE;
  14279. if (parser.doctype || parser.sawRoot) {
  14280. strictFail(parser, 'Inappropriately located doctype declaration');
  14281. }
  14282. parser.doctype = '';
  14283. parser.sgmlDecl = '';
  14284. } else if (c === '>') {
  14285. emitNode(parser, 'onsgmldeclaration', parser.sgmlDecl);
  14286. parser.sgmlDecl = '';
  14287. parser.state = S.TEXT;
  14288. } else if (isQuote(c)) {
  14289. parser.state = S.SGML_DECL_QUOTED;
  14290. parser.sgmlDecl += c;
  14291. } else {
  14292. parser.sgmlDecl += c;
  14293. }
  14294. continue;
  14295. case S.SGML_DECL_QUOTED:
  14296. if (c === parser.q) {
  14297. parser.state = S.SGML_DECL;
  14298. parser.q = '';
  14299. }
  14300. parser.sgmlDecl += c;
  14301. continue;
  14302. case S.DOCTYPE:
  14303. if (c === '>') {
  14304. parser.state = S.TEXT;
  14305. emitNode(parser, 'ondoctype', parser.doctype);
  14306. parser.doctype = true; // just remember that we saw it.
  14307. } else {
  14308. parser.doctype += c;
  14309. if (c === '[') {
  14310. parser.state = S.DOCTYPE_DTD;
  14311. } else if (isQuote(c)) {
  14312. parser.state = S.DOCTYPE_QUOTED;
  14313. parser.q = c;
  14314. }
  14315. }
  14316. continue;
  14317. case S.DOCTYPE_QUOTED:
  14318. parser.doctype += c;
  14319. if (c === parser.q) {
  14320. parser.q = '';
  14321. parser.state = S.DOCTYPE;
  14322. }
  14323. continue;
  14324. case S.DOCTYPE_DTD:
  14325. parser.doctype += c;
  14326. if (c === ']') {
  14327. parser.state = S.DOCTYPE;
  14328. } else if (isQuote(c)) {
  14329. parser.state = S.DOCTYPE_DTD_QUOTED;
  14330. parser.q = c;
  14331. }
  14332. continue;
  14333. case S.DOCTYPE_DTD_QUOTED:
  14334. parser.doctype += c;
  14335. if (c === parser.q) {
  14336. parser.state = S.DOCTYPE_DTD;
  14337. parser.q = '';
  14338. }
  14339. continue;
  14340. case S.COMMENT:
  14341. if (c === '-') {
  14342. parser.state = S.COMMENT_ENDING;
  14343. } else {
  14344. parser.comment += c;
  14345. }
  14346. continue;
  14347. case S.COMMENT_ENDING:
  14348. if (c === '-') {
  14349. parser.state = S.COMMENT_ENDED;
  14350. parser.comment = textopts(parser.opt, parser.comment);
  14351. if (parser.comment) {
  14352. emitNode(parser, 'oncomment', parser.comment);
  14353. }
  14354. parser.comment = '';
  14355. } else {
  14356. parser.comment += '-' + c;
  14357. parser.state = S.COMMENT;
  14358. }
  14359. continue;
  14360. case S.COMMENT_ENDED:
  14361. if (c !== '>') {
  14362. strictFail(parser, 'Malformed comment'); // allow <!-- blah -- bloo --> in non-strict mode,
  14363. // which is a comment of " blah -- bloo "
  14364. parser.comment += '--' + c;
  14365. parser.state = S.COMMENT;
  14366. } else {
  14367. parser.state = S.TEXT;
  14368. }
  14369. continue;
  14370. case S.CDATA:
  14371. if (c === ']') {
  14372. parser.state = S.CDATA_ENDING;
  14373. } else {
  14374. parser.cdata += c;
  14375. }
  14376. continue;
  14377. case S.CDATA_ENDING:
  14378. if (c === ']') {
  14379. parser.state = S.CDATA_ENDING_2;
  14380. } else {
  14381. parser.cdata += ']' + c;
  14382. parser.state = S.CDATA;
  14383. }
  14384. continue;
  14385. case S.CDATA_ENDING_2:
  14386. if (c === '>') {
  14387. if (parser.cdata) {
  14388. emitNode(parser, 'oncdata', parser.cdata);
  14389. }
  14390. emitNode(parser, 'onclosecdata');
  14391. parser.cdata = '';
  14392. parser.state = S.TEXT;
  14393. } else if (c === ']') {
  14394. parser.cdata += ']';
  14395. } else {
  14396. parser.cdata += ']]' + c;
  14397. parser.state = S.CDATA;
  14398. }
  14399. continue;
  14400. case S.PROC_INST:
  14401. if (c === '?') {
  14402. parser.state = S.PROC_INST_ENDING;
  14403. } else if (isWhitespace(c)) {
  14404. parser.state = S.PROC_INST_BODY;
  14405. } else {
  14406. parser.procInstName += c;
  14407. }
  14408. continue;
  14409. case S.PROC_INST_BODY:
  14410. if (!parser.procInstBody && isWhitespace(c)) {
  14411. continue;
  14412. } else if (c === '?') {
  14413. parser.state = S.PROC_INST_ENDING;
  14414. } else {
  14415. parser.procInstBody += c;
  14416. }
  14417. continue;
  14418. case S.PROC_INST_ENDING:
  14419. if (c === '>') {
  14420. emitNode(parser, 'onprocessinginstruction', {
  14421. name: parser.procInstName,
  14422. body: parser.procInstBody
  14423. });
  14424. parser.procInstName = parser.procInstBody = '';
  14425. parser.state = S.TEXT;
  14426. } else {
  14427. parser.procInstBody += '?' + c;
  14428. parser.state = S.PROC_INST_BODY;
  14429. }
  14430. continue;
  14431. case S.OPEN_TAG:
  14432. if (isMatch(nameBody, c)) {
  14433. parser.tagName += c;
  14434. } else {
  14435. newTag(parser);
  14436. if (c === '>') {
  14437. openTag(parser);
  14438. } else if (c === '/') {
  14439. parser.state = S.OPEN_TAG_SLASH;
  14440. } else {
  14441. if (!isWhitespace(c)) {
  14442. strictFail(parser, 'Invalid character in tag name');
  14443. }
  14444. parser.state = S.ATTRIB;
  14445. }
  14446. }
  14447. continue;
  14448. case S.OPEN_TAG_SLASH:
  14449. if (c === '>') {
  14450. openTag(parser, true);
  14451. closeTag(parser);
  14452. } else {
  14453. strictFail(parser, 'Forward-slash in opening tag not followed by >');
  14454. parser.state = S.ATTRIB;
  14455. }
  14456. continue;
  14457. case S.ATTRIB:
  14458. // haven't read the attribute name yet.
  14459. if (isWhitespace(c)) {
  14460. continue;
  14461. } else if (c === '>') {
  14462. openTag(parser);
  14463. } else if (c === '/') {
  14464. parser.state = S.OPEN_TAG_SLASH;
  14465. } else if (isMatch(nameStart, c)) {
  14466. parser.attribName = c;
  14467. parser.attribValue = '';
  14468. parser.state = S.ATTRIB_NAME;
  14469. } else {
  14470. strictFail(parser, 'Invalid attribute name');
  14471. }
  14472. continue;
  14473. case S.ATTRIB_NAME:
  14474. if (c === '=') {
  14475. parser.state = S.ATTRIB_VALUE;
  14476. } else if (c === '>') {
  14477. strictFail(parser, 'Attribute without value');
  14478. parser.attribValue = parser.attribName;
  14479. attrib(parser);
  14480. openTag(parser);
  14481. } else if (isWhitespace(c)) {
  14482. parser.state = S.ATTRIB_NAME_SAW_WHITE;
  14483. } else if (isMatch(nameBody, c)) {
  14484. parser.attribName += c;
  14485. } else {
  14486. strictFail(parser, 'Invalid attribute name');
  14487. }
  14488. continue;
  14489. case S.ATTRIB_NAME_SAW_WHITE:
  14490. if (c === '=') {
  14491. parser.state = S.ATTRIB_VALUE;
  14492. } else if (isWhitespace(c)) {
  14493. continue;
  14494. } else {
  14495. strictFail(parser, 'Attribute without value');
  14496. parser.tag.attributes[parser.attribName] = '';
  14497. parser.attribValue = '';
  14498. emitNode(parser, 'onattribute', {
  14499. name: parser.attribName,
  14500. value: ''
  14501. });
  14502. parser.attribName = '';
  14503. if (c === '>') {
  14504. openTag(parser);
  14505. } else if (isMatch(nameStart, c)) {
  14506. parser.attribName = c;
  14507. parser.state = S.ATTRIB_NAME;
  14508. } else {
  14509. strictFail(parser, 'Invalid attribute name');
  14510. parser.state = S.ATTRIB;
  14511. }
  14512. }
  14513. continue;
  14514. case S.ATTRIB_VALUE:
  14515. if (isWhitespace(c)) {
  14516. continue;
  14517. } else if (isQuote(c)) {
  14518. parser.q = c;
  14519. parser.state = S.ATTRIB_VALUE_QUOTED;
  14520. } else {
  14521. strictFail(parser, 'Unquoted attribute value');
  14522. parser.state = S.ATTRIB_VALUE_UNQUOTED;
  14523. parser.attribValue = c;
  14524. }
  14525. continue;
  14526. case S.ATTRIB_VALUE_QUOTED:
  14527. if (c !== parser.q) {
  14528. if (c === '&') {
  14529. parser.state = S.ATTRIB_VALUE_ENTITY_Q;
  14530. } else {
  14531. parser.attribValue += c;
  14532. }
  14533. continue;
  14534. }
  14535. attrib(parser);
  14536. parser.q = '';
  14537. parser.state = S.ATTRIB_VALUE_CLOSED;
  14538. continue;
  14539. case S.ATTRIB_VALUE_CLOSED:
  14540. if (isWhitespace(c)) {
  14541. parser.state = S.ATTRIB;
  14542. } else if (c === '>') {
  14543. openTag(parser);
  14544. } else if (c === '/') {
  14545. parser.state = S.OPEN_TAG_SLASH;
  14546. } else if (isMatch(nameStart, c)) {
  14547. strictFail(parser, 'No whitespace between attributes');
  14548. parser.attribName = c;
  14549. parser.attribValue = '';
  14550. parser.state = S.ATTRIB_NAME;
  14551. } else {
  14552. strictFail(parser, 'Invalid attribute name');
  14553. }
  14554. continue;
  14555. case S.ATTRIB_VALUE_UNQUOTED:
  14556. if (!isAttribEnd(c)) {
  14557. if (c === '&') {
  14558. parser.state = S.ATTRIB_VALUE_ENTITY_U;
  14559. } else {
  14560. parser.attribValue += c;
  14561. }
  14562. continue;
  14563. }
  14564. attrib(parser);
  14565. if (c === '>') {
  14566. openTag(parser);
  14567. } else {
  14568. parser.state = S.ATTRIB;
  14569. }
  14570. continue;
  14571. case S.CLOSE_TAG:
  14572. if (!parser.tagName) {
  14573. if (isWhitespace(c)) {
  14574. continue;
  14575. } else if (notMatch(nameStart, c)) {
  14576. if (parser.script) {
  14577. parser.script += '</' + c;
  14578. parser.state = S.SCRIPT;
  14579. } else {
  14580. strictFail(parser, 'Invalid tagname in closing tag.');
  14581. }
  14582. } else {
  14583. parser.tagName = c;
  14584. }
  14585. } else if (c === '>') {
  14586. closeTag(parser);
  14587. } else if (isMatch(nameBody, c)) {
  14588. parser.tagName += c;
  14589. } else if (parser.script) {
  14590. parser.script += '</' + parser.tagName;
  14591. parser.tagName = '';
  14592. parser.state = S.SCRIPT;
  14593. } else {
  14594. if (!isWhitespace(c)) {
  14595. strictFail(parser, 'Invalid tagname in closing tag');
  14596. }
  14597. parser.state = S.CLOSE_TAG_SAW_WHITE;
  14598. }
  14599. continue;
  14600. case S.CLOSE_TAG_SAW_WHITE:
  14601. if (isWhitespace(c)) {
  14602. continue;
  14603. }
  14604. if (c === '>') {
  14605. closeTag(parser);
  14606. } else {
  14607. strictFail(parser, 'Invalid characters in closing tag');
  14608. }
  14609. continue;
  14610. case S.TEXT_ENTITY:
  14611. case S.ATTRIB_VALUE_ENTITY_Q:
  14612. case S.ATTRIB_VALUE_ENTITY_U:
  14613. var returnState;
  14614. var buffer;
  14615. switch (parser.state) {
  14616. case S.TEXT_ENTITY:
  14617. returnState = S.TEXT;
  14618. buffer = 'textNode';
  14619. break;
  14620. case S.ATTRIB_VALUE_ENTITY_Q:
  14621. returnState = S.ATTRIB_VALUE_QUOTED;
  14622. buffer = 'attribValue';
  14623. break;
  14624. case S.ATTRIB_VALUE_ENTITY_U:
  14625. returnState = S.ATTRIB_VALUE_UNQUOTED;
  14626. buffer = 'attribValue';
  14627. break;
  14628. }
  14629. if (c === ';') {
  14630. parser[buffer] += parseEntity(parser);
  14631. parser.entity = '';
  14632. parser.state = returnState;
  14633. } else if (isMatch(parser.entity.length ? entityBody : entityStart, c)) {
  14634. parser.entity += c;
  14635. } else {
  14636. strictFail(parser, 'Invalid character in entity name');
  14637. parser[buffer] += '&' + parser.entity + c;
  14638. parser.entity = '';
  14639. parser.state = returnState;
  14640. }
  14641. continue;
  14642. default:
  14643. throw new Error(parser, 'Unknown state: ' + parser.state);
  14644. }
  14645. } // while
  14646. if (parser.position >= parser.bufferCheckPosition) {
  14647. checkBufferLength(parser);
  14648. }
  14649. return parser;
  14650. }
  14651. /*! http://mths.be/fromcodepoint v0.1.0 by @mathias */
  14652. /* istanbul ignore next */
  14653. if (!String.fromCodePoint) {
  14654. (function () {
  14655. var stringFromCharCode = String.fromCharCode;
  14656. var floor = Math.floor;
  14657. var fromCodePoint = function fromCodePoint() {
  14658. var MAX_SIZE = 0x4000;
  14659. var codeUnits = [];
  14660. var highSurrogate;
  14661. var lowSurrogate;
  14662. var index = -1;
  14663. var length = arguments.length;
  14664. if (!length) {
  14665. return '';
  14666. }
  14667. var result = '';
  14668. while (++index < length) {
  14669. var codePoint = Number(arguments[index]);
  14670. if (!isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity`
  14671. codePoint < 0 || // not a valid Unicode code point
  14672. codePoint > 0x10FFFF || // not a valid Unicode code point
  14673. floor(codePoint) !== codePoint // not an integer
  14674. ) {
  14675. throw RangeError('Invalid code point: ' + codePoint);
  14676. }
  14677. if (codePoint <= 0xFFFF) {
  14678. // BMP code point
  14679. codeUnits.push(codePoint);
  14680. } else {
  14681. // Astral code point; split in surrogate halves
  14682. // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
  14683. codePoint -= 0x10000;
  14684. highSurrogate = (codePoint >> 10) + 0xD800;
  14685. lowSurrogate = codePoint % 0x400 + 0xDC00;
  14686. codeUnits.push(highSurrogate, lowSurrogate);
  14687. }
  14688. if (index + 1 === length || codeUnits.length > MAX_SIZE) {
  14689. result += stringFromCharCode.apply(null, codeUnits);
  14690. codeUnits.length = 0;
  14691. }
  14692. }
  14693. return result;
  14694. };
  14695. /* istanbul ignore next */
  14696. if (Object.defineProperty) {
  14697. Object.defineProperty(String, 'fromCodePoint', {
  14698. value: fromCodePoint,
  14699. configurable: true,
  14700. writable: true
  14701. });
  14702. } else {
  14703. String.fromCodePoint = fromCodePoint;
  14704. }
  14705. })();
  14706. }
  14707. })( false ? undefined : exports);
  14708. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(14).Buffer))
  14709. /***/ }),
  14710. /* 58 */
  14711. /***/ (function(module, exports, __webpack_require__) {
  14712. "use strict";
  14713. exports.byteLength = byteLength;
  14714. exports.toByteArray = toByteArray;
  14715. exports.fromByteArray = fromByteArray;
  14716. var lookup = [];
  14717. var revLookup = [];
  14718. var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;
  14719. var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
  14720. for (var i = 0, len = code.length; i < len; ++i) {
  14721. lookup[i] = code[i];
  14722. revLookup[code.charCodeAt(i)] = i;
  14723. } // Support decoding URL-safe base64 strings, as Node.js does.
  14724. // See: https://en.wikipedia.org/wiki/Base64#URL_applications
  14725. revLookup['-'.charCodeAt(0)] = 62;
  14726. revLookup['_'.charCodeAt(0)] = 63;
  14727. function getLens(b64) {
  14728. var len = b64.length;
  14729. if (len % 4 > 0) {
  14730. throw new Error('Invalid string. Length must be a multiple of 4');
  14731. } // Trim off extra bytes after placeholder bytes are found
  14732. // See: https://github.com/beatgammit/base64-js/issues/42
  14733. var validLen = b64.indexOf('=');
  14734. if (validLen === -1) validLen = len;
  14735. var placeHoldersLen = validLen === len ? 0 : 4 - validLen % 4;
  14736. return [validLen, placeHoldersLen];
  14737. } // base64 is 4/3 + up to two characters of the original data
  14738. function byteLength(b64) {
  14739. var lens = getLens(b64);
  14740. var validLen = lens[0];
  14741. var placeHoldersLen = lens[1];
  14742. return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
  14743. }
  14744. function _byteLength(b64, validLen, placeHoldersLen) {
  14745. return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
  14746. }
  14747. function toByteArray(b64) {
  14748. var tmp;
  14749. var lens = getLens(b64);
  14750. var validLen = lens[0];
  14751. var placeHoldersLen = lens[1];
  14752. var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));
  14753. var curByte = 0; // if there are placeholders, only get up to the last complete 4 chars
  14754. var len = placeHoldersLen > 0 ? validLen - 4 : validLen;
  14755. var i;
  14756. for (i = 0; i < len; i += 4) {
  14757. tmp = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | revLookup[b64.charCodeAt(i + 3)];
  14758. arr[curByte++] = tmp >> 16 & 0xFF;
  14759. arr[curByte++] = tmp >> 8 & 0xFF;
  14760. arr[curByte++] = tmp & 0xFF;
  14761. }
  14762. if (placeHoldersLen === 2) {
  14763. tmp = revLookup[b64.charCodeAt(i)] << 2 | revLookup[b64.charCodeAt(i + 1)] >> 4;
  14764. arr[curByte++] = tmp & 0xFF;
  14765. }
  14766. if (placeHoldersLen === 1) {
  14767. tmp = revLookup[b64.charCodeAt(i)] << 10 | revLookup[b64.charCodeAt(i + 1)] << 4 | revLookup[b64.charCodeAt(i + 2)] >> 2;
  14768. arr[curByte++] = tmp >> 8 & 0xFF;
  14769. arr[curByte++] = tmp & 0xFF;
  14770. }
  14771. return arr;
  14772. }
  14773. function tripletToBase64(num) {
  14774. return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F];
  14775. }
  14776. function encodeChunk(uint8, start, end) {
  14777. var tmp;
  14778. var output = [];
  14779. for (var i = start; i < end; i += 3) {
  14780. tmp = (uint8[i] << 16 & 0xFF0000) + (uint8[i + 1] << 8 & 0xFF00) + (uint8[i + 2] & 0xFF);
  14781. output.push(tripletToBase64(tmp));
  14782. }
  14783. return output.join('');
  14784. }
  14785. function fromByteArray(uint8) {
  14786. var tmp;
  14787. var len = uint8.length;
  14788. var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes
  14789. var parts = [];
  14790. var maxChunkLength = 16383; // must be multiple of 3
  14791. // go through the array every three bytes, we'll deal with trailing stuff later
  14792. for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
  14793. parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength));
  14794. } // pad the end with zeros, but make sure to not forget the extra bytes
  14795. if (extraBytes === 1) {
  14796. tmp = uint8[len - 1];
  14797. parts.push(lookup[tmp >> 2] + lookup[tmp << 4 & 0x3F] + '==');
  14798. } else if (extraBytes === 2) {
  14799. tmp = (uint8[len - 2] << 8) + uint8[len - 1];
  14800. parts.push(lookup[tmp >> 10] + lookup[tmp >> 4 & 0x3F] + lookup[tmp << 2 & 0x3F] + '=');
  14801. }
  14802. return parts.join('');
  14803. }
  14804. /***/ }),
  14805. /* 59 */
  14806. /***/ (function(module, exports) {
  14807. exports.read = function (buffer, offset, isLE, mLen, nBytes) {
  14808. var e, m;
  14809. var eLen = nBytes * 8 - mLen - 1;
  14810. var eMax = (1 << eLen) - 1;
  14811. var eBias = eMax >> 1;
  14812. var nBits = -7;
  14813. var i = isLE ? nBytes - 1 : 0;
  14814. var d = isLE ? -1 : 1;
  14815. var s = buffer[offset + i];
  14816. i += d;
  14817. e = s & (1 << -nBits) - 1;
  14818. s >>= -nBits;
  14819. nBits += eLen;
  14820. for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
  14821. m = e & (1 << -nBits) - 1;
  14822. e >>= -nBits;
  14823. nBits += mLen;
  14824. for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
  14825. if (e === 0) {
  14826. e = 1 - eBias;
  14827. } else if (e === eMax) {
  14828. return m ? NaN : (s ? -1 : 1) * Infinity;
  14829. } else {
  14830. m = m + Math.pow(2, mLen);
  14831. e = e - eBias;
  14832. }
  14833. return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
  14834. };
  14835. exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
  14836. var e, m, c;
  14837. var eLen = nBytes * 8 - mLen - 1;
  14838. var eMax = (1 << eLen) - 1;
  14839. var eBias = eMax >> 1;
  14840. var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
  14841. var i = isLE ? 0 : nBytes - 1;
  14842. var d = isLE ? 1 : -1;
  14843. var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
  14844. value = Math.abs(value);
  14845. if (isNaN(value) || value === Infinity) {
  14846. m = isNaN(value) ? 1 : 0;
  14847. e = eMax;
  14848. } else {
  14849. e = Math.floor(Math.log(value) / Math.LN2);
  14850. if (value * (c = Math.pow(2, -e)) < 1) {
  14851. e--;
  14852. c *= 2;
  14853. }
  14854. if (e + eBias >= 1) {
  14855. value += rt / c;
  14856. } else {
  14857. value += rt * Math.pow(2, 1 - eBias);
  14858. }
  14859. if (value * c >= 2) {
  14860. e++;
  14861. c /= 2;
  14862. }
  14863. if (e + eBias >= eMax) {
  14864. m = 0;
  14865. e = eMax;
  14866. } else if (e + eBias >= 1) {
  14867. m = (value * c - 1) * Math.pow(2, mLen);
  14868. e = e + eBias;
  14869. } else {
  14870. m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
  14871. e = 0;
  14872. }
  14873. }
  14874. for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
  14875. e = e << mLen | m;
  14876. eLen += mLen;
  14877. for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
  14878. buffer[offset + i - d] |= s * 128;
  14879. };
  14880. /***/ }),
  14881. /* 60 */
  14882. /***/ (function(module, exports, __webpack_require__) {
  14883. // Copyright Joyent, Inc. and other Node contributors.
  14884. //
  14885. // Permission is hereby granted, free of charge, to any person obtaining a
  14886. // copy of this software and associated documentation files (the
  14887. // "Software"), to deal in the Software without restriction, including
  14888. // without limitation the rights to use, copy, modify, merge, publish,
  14889. // distribute, sublicense, and/or sell copies of the Software, and to permit
  14890. // persons to whom the Software is furnished to do so, subject to the
  14891. // following conditions:
  14892. //
  14893. // The above copyright notice and this permission notice shall be included
  14894. // in all copies or substantial portions of the Software.
  14895. //
  14896. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  14897. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  14898. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  14899. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  14900. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  14901. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  14902. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  14903. module.exports = Stream;
  14904. var EE = __webpack_require__(8).EventEmitter;
  14905. var inherits = __webpack_require__(11);
  14906. inherits(Stream, EE);
  14907. Stream.Readable = __webpack_require__(26);
  14908. Stream.Writable = __webpack_require__(69);
  14909. Stream.Duplex = __webpack_require__(70);
  14910. Stream.Transform = __webpack_require__(71);
  14911. Stream.PassThrough = __webpack_require__(72); // Backwards-compat with node 0.4.x
  14912. Stream.Stream = Stream; // old-style streams. Note that the pipe method (the only relevant
  14913. // part of this class) is overridden in the Readable class.
  14914. function Stream() {
  14915. EE.call(this);
  14916. }
  14917. Stream.prototype.pipe = function (dest, options) {
  14918. var source = this;
  14919. function ondata(chunk) {
  14920. if (dest.writable) {
  14921. if (false === dest.write(chunk) && source.pause) {
  14922. source.pause();
  14923. }
  14924. }
  14925. }
  14926. source.on('data', ondata);
  14927. function ondrain() {
  14928. if (source.readable && source.resume) {
  14929. source.resume();
  14930. }
  14931. }
  14932. dest.on('drain', ondrain); // If the 'end' option is not supplied, dest.end() will be called when
  14933. // source gets the 'end' or 'close' events. Only dest.end() once.
  14934. if (!dest._isStdio && (!options || options.end !== false)) {
  14935. source.on('end', onend);
  14936. source.on('close', onclose);
  14937. }
  14938. var didOnEnd = false;
  14939. function onend() {
  14940. if (didOnEnd) return;
  14941. didOnEnd = true;
  14942. dest.end();
  14943. }
  14944. function onclose() {
  14945. if (didOnEnd) return;
  14946. didOnEnd = true;
  14947. if (typeof dest.destroy === 'function') dest.destroy();
  14948. } // don't leave dangling pipes when there are errors.
  14949. function onerror(er) {
  14950. cleanup();
  14951. if (EE.listenerCount(this, 'error') === 0) {
  14952. throw er; // Unhandled stream error in pipe.
  14953. }
  14954. }
  14955. source.on('error', onerror);
  14956. dest.on('error', onerror); // remove all the event listeners that were added.
  14957. function cleanup() {
  14958. source.removeListener('data', ondata);
  14959. dest.removeListener('drain', ondrain);
  14960. source.removeListener('end', onend);
  14961. source.removeListener('close', onclose);
  14962. source.removeListener('error', onerror);
  14963. dest.removeListener('error', onerror);
  14964. source.removeListener('end', cleanup);
  14965. source.removeListener('close', cleanup);
  14966. dest.removeListener('close', cleanup);
  14967. }
  14968. source.on('end', cleanup);
  14969. source.on('close', cleanup);
  14970. dest.on('close', cleanup);
  14971. dest.emit('pipe', source); // Allow for unix-like usage: A.pipe(B).pipe(C)
  14972. return dest;
  14973. };
  14974. /***/ }),
  14975. /* 61 */
  14976. /***/ (function(module, exports) {
  14977. /* (ignored) */
  14978. /***/ }),
  14979. /* 62 */
  14980. /***/ (function(module, exports, __webpack_require__) {
  14981. "use strict";
  14982. function _classCallCheck(instance, Constructor) {
  14983. if (!(instance instanceof Constructor)) {
  14984. throw new TypeError("Cannot call a class as a function");
  14985. }
  14986. }
  14987. var Buffer = __webpack_require__(27).Buffer;
  14988. var util = __webpack_require__(63);
  14989. function copyBuffer(src, target, offset) {
  14990. src.copy(target, offset);
  14991. }
  14992. module.exports = function () {
  14993. function BufferList() {
  14994. _classCallCheck(this, BufferList);
  14995. this.head = null;
  14996. this.tail = null;
  14997. this.length = 0;
  14998. }
  14999. BufferList.prototype.push = function push(v) {
  15000. var entry = {
  15001. data: v,
  15002. next: null
  15003. };
  15004. if (this.length > 0) this.tail.next = entry;else this.head = entry;
  15005. this.tail = entry;
  15006. ++this.length;
  15007. };
  15008. BufferList.prototype.unshift = function unshift(v) {
  15009. var entry = {
  15010. data: v,
  15011. next: this.head
  15012. };
  15013. if (this.length === 0) this.tail = entry;
  15014. this.head = entry;
  15015. ++this.length;
  15016. };
  15017. BufferList.prototype.shift = function shift() {
  15018. if (this.length === 0) return;
  15019. var ret = this.head.data;
  15020. if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
  15021. --this.length;
  15022. return ret;
  15023. };
  15024. BufferList.prototype.clear = function clear() {
  15025. this.head = this.tail = null;
  15026. this.length = 0;
  15027. };
  15028. BufferList.prototype.join = function join(s) {
  15029. if (this.length === 0) return '';
  15030. var p = this.head;
  15031. var ret = '' + p.data;
  15032. while (p = p.next) {
  15033. ret += s + p.data;
  15034. }
  15035. return ret;
  15036. };
  15037. BufferList.prototype.concat = function concat(n) {
  15038. if (this.length === 0) return Buffer.alloc(0);
  15039. if (this.length === 1) return this.head.data;
  15040. var ret = Buffer.allocUnsafe(n >>> 0);
  15041. var p = this.head;
  15042. var i = 0;
  15043. while (p) {
  15044. copyBuffer(p.data, ret, i);
  15045. i += p.data.length;
  15046. p = p.next;
  15047. }
  15048. return ret;
  15049. };
  15050. return BufferList;
  15051. }();
  15052. if (util && util.inspect && util.inspect.custom) {
  15053. module.exports.prototype[util.inspect.custom] = function () {
  15054. var obj = util.inspect({
  15055. length: this.length
  15056. });
  15057. return this.constructor.name + ' ' + obj;
  15058. };
  15059. }
  15060. /***/ }),
  15061. /* 63 */
  15062. /***/ (function(module, exports) {
  15063. /* (ignored) */
  15064. /***/ }),
  15065. /* 64 */
  15066. /***/ (function(module, exports, __webpack_require__) {
  15067. /* WEBPACK VAR INJECTION */(function(global) {var scope = typeof global !== "undefined" && global || typeof self !== "undefined" && self || window;
  15068. var apply = Function.prototype.apply; // DOM APIs, for completeness
  15069. exports.setTimeout = function () {
  15070. return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);
  15071. };
  15072. exports.setInterval = function () {
  15073. return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);
  15074. };
  15075. exports.clearTimeout = exports.clearInterval = function (timeout) {
  15076. if (timeout) {
  15077. timeout.close();
  15078. }
  15079. };
  15080. function Timeout(id, clearFn) {
  15081. this._id = id;
  15082. this._clearFn = clearFn;
  15083. }
  15084. Timeout.prototype.unref = Timeout.prototype.ref = function () {};
  15085. Timeout.prototype.close = function () {
  15086. this._clearFn.call(scope, this._id);
  15087. }; // Does not start the time, just sets up the members needed.
  15088. exports.enroll = function (item, msecs) {
  15089. clearTimeout(item._idleTimeoutId);
  15090. item._idleTimeout = msecs;
  15091. };
  15092. exports.unenroll = function (item) {
  15093. clearTimeout(item._idleTimeoutId);
  15094. item._idleTimeout = -1;
  15095. };
  15096. exports._unrefActive = exports.active = function (item) {
  15097. clearTimeout(item._idleTimeoutId);
  15098. var msecs = item._idleTimeout;
  15099. if (msecs >= 0) {
  15100. item._idleTimeoutId = setTimeout(function onTimeout() {
  15101. if (item._onTimeout) item._onTimeout();
  15102. }, msecs);
  15103. }
  15104. }; // setimmediate attaches itself to the global object
  15105. __webpack_require__(65); // On some exotic environments, it's not clear which object `setimmediate` was
  15106. // able to install onto. Search each possibility in the same order as the
  15107. // `setimmediate` library.
  15108. exports.setImmediate = typeof self !== "undefined" && self.setImmediate || typeof global !== "undefined" && global.setImmediate || this && this.setImmediate;
  15109. exports.clearImmediate = typeof self !== "undefined" && self.clearImmediate || typeof global !== "undefined" && global.clearImmediate || this && this.clearImmediate;
  15110. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(5)))
  15111. /***/ }),
  15112. /* 65 */
  15113. /***/ (function(module, exports, __webpack_require__) {
  15114. /* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {
  15115. "use strict";
  15116. if (global.setImmediate) {
  15117. return;
  15118. }
  15119. var nextHandle = 1; // Spec says greater than zero
  15120. var tasksByHandle = {};
  15121. var currentlyRunningATask = false;
  15122. var doc = global.document;
  15123. var registerImmediate;
  15124. function setImmediate(callback) {
  15125. // Callback can either be a function or a string
  15126. if (typeof callback !== "function") {
  15127. callback = new Function("" + callback);
  15128. } // Copy function arguments
  15129. var args = new Array(arguments.length - 1);
  15130. for (var i = 0; i < args.length; i++) {
  15131. args[i] = arguments[i + 1];
  15132. } // Store and register the task
  15133. var task = {
  15134. callback: callback,
  15135. args: args
  15136. };
  15137. tasksByHandle[nextHandle] = task;
  15138. registerImmediate(nextHandle);
  15139. return nextHandle++;
  15140. }
  15141. function clearImmediate(handle) {
  15142. delete tasksByHandle[handle];
  15143. }
  15144. function run(task) {
  15145. var callback = task.callback;
  15146. var args = task.args;
  15147. switch (args.length) {
  15148. case 0:
  15149. callback();
  15150. break;
  15151. case 1:
  15152. callback(args[0]);
  15153. break;
  15154. case 2:
  15155. callback(args[0], args[1]);
  15156. break;
  15157. case 3:
  15158. callback(args[0], args[1], args[2]);
  15159. break;
  15160. default:
  15161. callback.apply(undefined, args);
  15162. break;
  15163. }
  15164. }
  15165. function runIfPresent(handle) {
  15166. // From the spec: "Wait until any invocations of this algorithm started before this one have completed."
  15167. // So if we're currently running a task, we'll need to delay this invocation.
  15168. if (currentlyRunningATask) {
  15169. // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a
  15170. // "too much recursion" error.
  15171. setTimeout(runIfPresent, 0, handle);
  15172. } else {
  15173. var task = tasksByHandle[handle];
  15174. if (task) {
  15175. currentlyRunningATask = true;
  15176. try {
  15177. run(task);
  15178. } finally {
  15179. clearImmediate(handle);
  15180. currentlyRunningATask = false;
  15181. }
  15182. }
  15183. }
  15184. }
  15185. function installNextTickImplementation() {
  15186. registerImmediate = function registerImmediate(handle) {
  15187. process.nextTick(function () {
  15188. runIfPresent(handle);
  15189. });
  15190. };
  15191. }
  15192. function canUsePostMessage() {
  15193. // The test against `importScripts` prevents this implementation from being installed inside a web worker,
  15194. // where `global.postMessage` means something completely different and can't be used for this purpose.
  15195. if (global.postMessage && !global.importScripts) {
  15196. var postMessageIsAsynchronous = true;
  15197. var oldOnMessage = global.onmessage;
  15198. global.onmessage = function () {
  15199. postMessageIsAsynchronous = false;
  15200. };
  15201. global.postMessage("", "*");
  15202. global.onmessage = oldOnMessage;
  15203. return postMessageIsAsynchronous;
  15204. }
  15205. }
  15206. function installPostMessageImplementation() {
  15207. // Installs an event handler on `global` for the `message` event: see
  15208. // * https://developer.mozilla.org/en/DOM/window.postMessage
  15209. // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages
  15210. var messagePrefix = "setImmediate$" + Math.random() + "$";
  15211. var onGlobalMessage = function onGlobalMessage(event) {
  15212. if (event.source === global && typeof event.data === "string" && event.data.indexOf(messagePrefix) === 0) {
  15213. runIfPresent(+event.data.slice(messagePrefix.length));
  15214. }
  15215. };
  15216. if (global.addEventListener) {
  15217. global.addEventListener("message", onGlobalMessage, false);
  15218. } else {
  15219. global.attachEvent("onmessage", onGlobalMessage);
  15220. }
  15221. registerImmediate = function registerImmediate(handle) {
  15222. global.postMessage(messagePrefix + handle, "*");
  15223. };
  15224. }
  15225. function installMessageChannelImplementation() {
  15226. var channel = new MessageChannel();
  15227. channel.port1.onmessage = function (event) {
  15228. var handle = event.data;
  15229. runIfPresent(handle);
  15230. };
  15231. registerImmediate = function registerImmediate(handle) {
  15232. channel.port2.postMessage(handle);
  15233. };
  15234. }
  15235. function installReadyStateChangeImplementation() {
  15236. var html = doc.documentElement;
  15237. registerImmediate = function registerImmediate(handle) {
  15238. // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted
  15239. // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.
  15240. var script = doc.createElement("script");
  15241. script.onreadystatechange = function () {
  15242. runIfPresent(handle);
  15243. script.onreadystatechange = null;
  15244. html.removeChild(script);
  15245. script = null;
  15246. };
  15247. html.appendChild(script);
  15248. };
  15249. }
  15250. function installSetTimeoutImplementation() {
  15251. registerImmediate = function registerImmediate(handle) {
  15252. setTimeout(runIfPresent, 0, handle);
  15253. };
  15254. } // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.
  15255. var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);
  15256. attachTo = attachTo && attachTo.setTimeout ? attachTo : global; // Don't get fooled by e.g. browserify environments.
  15257. if ({}.toString.call(global.process) === "[object process]") {
  15258. // For Node.js before 0.9
  15259. installNextTickImplementation();
  15260. } else if (canUsePostMessage()) {
  15261. // For non-IE10 modern browsers
  15262. installPostMessageImplementation();
  15263. } else if (global.MessageChannel) {
  15264. // For web workers, where supported
  15265. installMessageChannelImplementation();
  15266. } else if (doc && "onreadystatechange" in doc.createElement("script")) {
  15267. // For IE 6–8
  15268. installReadyStateChangeImplementation();
  15269. } else {
  15270. // For older browsers
  15271. installSetTimeoutImplementation();
  15272. }
  15273. attachTo.setImmediate = setImmediate;
  15274. attachTo.clearImmediate = clearImmediate;
  15275. })(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self);
  15276. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(5), __webpack_require__(16)))
  15277. /***/ }),
  15278. /* 66 */
  15279. /***/ (function(module, exports, __webpack_require__) {
  15280. /* WEBPACK VAR INJECTION */(function(global) {/**
  15281. * Module exports.
  15282. */
  15283. module.exports = deprecate;
  15284. /**
  15285. * Mark that a method should not be used.
  15286. * Returns a modified function which warns once by default.
  15287. *
  15288. * If `localStorage.noDeprecation = true` is set, then it is a no-op.
  15289. *
  15290. * If `localStorage.throwDeprecation = true` is set, then deprecated functions
  15291. * will throw an Error when invoked.
  15292. *
  15293. * If `localStorage.traceDeprecation = true` is set, then deprecated functions
  15294. * will invoke `console.trace()` instead of `console.error()`.
  15295. *
  15296. * @param {Function} fn - the function to deprecate
  15297. * @param {String} msg - the string to print to the console when `fn` is invoked
  15298. * @returns {Function} a new "deprecated" version of `fn`
  15299. * @api public
  15300. */
  15301. function deprecate(fn, msg) {
  15302. if (config('noDeprecation')) {
  15303. return fn;
  15304. }
  15305. var warned = false;
  15306. function deprecated() {
  15307. if (!warned) {
  15308. if (config('throwDeprecation')) {
  15309. throw new Error(msg);
  15310. } else if (config('traceDeprecation')) {
  15311. console.trace(msg);
  15312. } else {
  15313. console.warn(msg);
  15314. }
  15315. warned = true;
  15316. }
  15317. return fn.apply(this, arguments);
  15318. }
  15319. return deprecated;
  15320. }
  15321. /**
  15322. * Checks `localStorage` for boolean values for the given `name`.
  15323. *
  15324. * @param {String} name
  15325. * @returns {Boolean}
  15326. * @api private
  15327. */
  15328. function config(name) {
  15329. // accessing global.localStorage can trigger a DOMException in sandboxed iframes
  15330. try {
  15331. if (!global.localStorage) return false;
  15332. } catch (_) {
  15333. return false;
  15334. }
  15335. var val = global.localStorage[name];
  15336. if (null == val) return false;
  15337. return String(val).toLowerCase() === 'true';
  15338. }
  15339. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(5)))
  15340. /***/ }),
  15341. /* 67 */
  15342. /***/ (function(module, exports, __webpack_require__) {
  15343. /* eslint-disable node/no-deprecated-api */
  15344. var buffer = __webpack_require__(14);
  15345. var Buffer = buffer.Buffer; // alternative to using Object.keys for old browsers
  15346. function copyProps(src, dst) {
  15347. for (var key in src) {
  15348. dst[key] = src[key];
  15349. }
  15350. }
  15351. if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
  15352. module.exports = buffer;
  15353. } else {
  15354. // Copy properties from require('buffer')
  15355. copyProps(buffer, exports);
  15356. exports.Buffer = SafeBuffer;
  15357. }
  15358. function SafeBuffer(arg, encodingOrOffset, length) {
  15359. return Buffer(arg, encodingOrOffset, length);
  15360. } // Copy static methods from Buffer
  15361. copyProps(Buffer, SafeBuffer);
  15362. SafeBuffer.from = function (arg, encodingOrOffset, length) {
  15363. if (typeof arg === 'number') {
  15364. throw new TypeError('Argument must not be a number');
  15365. }
  15366. return Buffer(arg, encodingOrOffset, length);
  15367. };
  15368. SafeBuffer.alloc = function (size, fill, encoding) {
  15369. if (typeof size !== 'number') {
  15370. throw new TypeError('Argument must be a number');
  15371. }
  15372. var buf = Buffer(size);
  15373. if (fill !== undefined) {
  15374. if (typeof encoding === 'string') {
  15375. buf.fill(fill, encoding);
  15376. } else {
  15377. buf.fill(fill);
  15378. }
  15379. } else {
  15380. buf.fill(0);
  15381. }
  15382. return buf;
  15383. };
  15384. SafeBuffer.allocUnsafe = function (size) {
  15385. if (typeof size !== 'number') {
  15386. throw new TypeError('Argument must be a number');
  15387. }
  15388. return Buffer(size);
  15389. };
  15390. SafeBuffer.allocUnsafeSlow = function (size) {
  15391. if (typeof size !== 'number') {
  15392. throw new TypeError('Argument must be a number');
  15393. }
  15394. return buffer.SlowBuffer(size);
  15395. };
  15396. /***/ }),
  15397. /* 68 */
  15398. /***/ (function(module, exports, __webpack_require__) {
  15399. "use strict";
  15400. // Copyright Joyent, Inc. and other Node contributors.
  15401. //
  15402. // Permission is hereby granted, free of charge, to any person obtaining a
  15403. // copy of this software and associated documentation files (the
  15404. // "Software"), to deal in the Software without restriction, including
  15405. // without limitation the rights to use, copy, modify, merge, publish,
  15406. // distribute, sublicense, and/or sell copies of the Software, and to permit
  15407. // persons to whom the Software is furnished to do so, subject to the
  15408. // following conditions:
  15409. //
  15410. // The above copyright notice and this permission notice shall be included
  15411. // in all copies or substantial portions of the Software.
  15412. //
  15413. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  15414. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  15415. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  15416. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  15417. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  15418. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  15419. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  15420. // a passthrough stream.
  15421. // basically just the most minimal sort of Transform stream.
  15422. // Every written chunk gets output as-is.
  15423. module.exports = PassThrough;
  15424. var Transform = __webpack_require__(38);
  15425. /*<replacement>*/
  15426. var util = __webpack_require__(15);
  15427. util.inherits = __webpack_require__(11);
  15428. /*</replacement>*/
  15429. util.inherits(PassThrough, Transform);
  15430. function PassThrough(options) {
  15431. if (!(this instanceof PassThrough)) return new PassThrough(options);
  15432. Transform.call(this, options);
  15433. }
  15434. PassThrough.prototype._transform = function (chunk, encoding, cb) {
  15435. cb(null, chunk);
  15436. };
  15437. /***/ }),
  15438. /* 69 */
  15439. /***/ (function(module, exports, __webpack_require__) {
  15440. module.exports = __webpack_require__(28);
  15441. /***/ }),
  15442. /* 70 */
  15443. /***/ (function(module, exports, __webpack_require__) {
  15444. module.exports = __webpack_require__(7);
  15445. /***/ }),
  15446. /* 71 */
  15447. /***/ (function(module, exports, __webpack_require__) {
  15448. module.exports = __webpack_require__(26).Transform;
  15449. /***/ }),
  15450. /* 72 */
  15451. /***/ (function(module, exports, __webpack_require__) {
  15452. module.exports = __webpack_require__(26).PassThrough;
  15453. /***/ }),
  15454. /* 73 */
  15455. /***/ (function(module, exports, __webpack_require__) {
  15456. var helper = __webpack_require__(30);
  15457. var xml2js = __webpack_require__(33);
  15458. function validateOptions(userOptions) {
  15459. var options = helper.copyOptions(userOptions);
  15460. helper.ensureSpacesExists(options);
  15461. return options;
  15462. }
  15463. module.exports = function (xml, userOptions) {
  15464. var options, js, json, parentKey;
  15465. options = validateOptions(userOptions);
  15466. js = xml2js(xml, options);
  15467. parentKey = 'compact' in options && options.compact ? '_parent' : 'parent'; // parentKey = ptions.compact ? '_parent' : 'parent'; // consider this
  15468. if ('addParent' in options && options.addParent) {
  15469. json = JSON.stringify(js, function (k, v) {
  15470. return k === parentKey ? '_' : v;
  15471. }, options.spaces);
  15472. } else {
  15473. json = JSON.stringify(js, null, options.spaces);
  15474. }
  15475. return json.replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
  15476. };
  15477. /***/ }),
  15478. /* 74 */
  15479. /***/ (function(module, exports, __webpack_require__) {
  15480. /* WEBPACK VAR INJECTION */(function(Buffer) {var js2xml = __webpack_require__(39);
  15481. module.exports = function (json, options) {
  15482. if (json instanceof Buffer) {
  15483. json = json.toString();
  15484. }
  15485. var js = null;
  15486. if (typeof json === 'string') {
  15487. try {
  15488. js = JSON.parse(json);
  15489. } catch (e) {
  15490. throw new Error('The JSON structure is invalid');
  15491. }
  15492. } else {
  15493. js = json;
  15494. }
  15495. return js2xml(js, options);
  15496. };
  15497. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(14).Buffer))
  15498. /***/ }),
  15499. /* 75 */
  15500. /***/ (function(module, exports) {
  15501. /*
  15502. Based on rgbcolor.js by Stoyan Stefanov <sstoo@gmail.com>
  15503. http://www.phpied.com/rgb-color-parser-in-javascript/
  15504. */
  15505. module.exports = function (color_string) {
  15506. this.ok = false;
  15507. this.alpha = 1.0; // strip any leading #
  15508. if (color_string.charAt(0) == '#') {
  15509. // remove # if any
  15510. color_string = color_string.substr(1, 6);
  15511. }
  15512. color_string = color_string.replace(/ /g, '');
  15513. color_string = color_string.toLowerCase(); // before getting into regexps, try simple matches
  15514. // and overwrite the input
  15515. var simple_colors = {
  15516. aliceblue: 'f0f8ff',
  15517. antiquewhite: 'faebd7',
  15518. aqua: '00ffff',
  15519. aquamarine: '7fffd4',
  15520. azure: 'f0ffff',
  15521. beige: 'f5f5dc',
  15522. bisque: 'ffe4c4',
  15523. black: '000000',
  15524. blanchedalmond: 'ffebcd',
  15525. blue: '0000ff',
  15526. blueviolet: '8a2be2',
  15527. brown: 'a52a2a',
  15528. burlywood: 'deb887',
  15529. cadetblue: '5f9ea0',
  15530. chartreuse: '7fff00',
  15531. chocolate: 'd2691e',
  15532. coral: 'ff7f50',
  15533. cornflowerblue: '6495ed',
  15534. cornsilk: 'fff8dc',
  15535. crimson: 'dc143c',
  15536. cyan: '00ffff',
  15537. darkblue: '00008b',
  15538. darkcyan: '008b8b',
  15539. darkgoldenrod: 'b8860b',
  15540. darkgray: 'a9a9a9',
  15541. darkgreen: '006400',
  15542. darkkhaki: 'bdb76b',
  15543. darkmagenta: '8b008b',
  15544. darkolivegreen: '556b2f',
  15545. darkorange: 'ff8c00',
  15546. darkorchid: '9932cc',
  15547. darkred: '8b0000',
  15548. darksalmon: 'e9967a',
  15549. darkseagreen: '8fbc8f',
  15550. darkslateblue: '483d8b',
  15551. darkslategray: '2f4f4f',
  15552. darkturquoise: '00ced1',
  15553. darkviolet: '9400d3',
  15554. deeppink: 'ff1493',
  15555. deepskyblue: '00bfff',
  15556. dimgray: '696969',
  15557. dodgerblue: '1e90ff',
  15558. feldspar: 'd19275',
  15559. firebrick: 'b22222',
  15560. floralwhite: 'fffaf0',
  15561. forestgreen: '228b22',
  15562. fuchsia: 'ff00ff',
  15563. gainsboro: 'dcdcdc',
  15564. ghostwhite: 'f8f8ff',
  15565. gold: 'ffd700',
  15566. goldenrod: 'daa520',
  15567. gray: '808080',
  15568. green: '008000',
  15569. greenyellow: 'adff2f',
  15570. honeydew: 'f0fff0',
  15571. hotpink: 'ff69b4',
  15572. indianred: 'cd5c5c',
  15573. indigo: '4b0082',
  15574. ivory: 'fffff0',
  15575. khaki: 'f0e68c',
  15576. lavender: 'e6e6fa',
  15577. lavenderblush: 'fff0f5',
  15578. lawngreen: '7cfc00',
  15579. lemonchiffon: 'fffacd',
  15580. lightblue: 'add8e6',
  15581. lightcoral: 'f08080',
  15582. lightcyan: 'e0ffff',
  15583. lightgoldenrodyellow: 'fafad2',
  15584. lightgrey: 'd3d3d3',
  15585. lightgreen: '90ee90',
  15586. lightpink: 'ffb6c1',
  15587. lightsalmon: 'ffa07a',
  15588. lightseagreen: '20b2aa',
  15589. lightskyblue: '87cefa',
  15590. lightslateblue: '8470ff',
  15591. lightslategray: '778899',
  15592. lightsteelblue: 'b0c4de',
  15593. lightyellow: 'ffffe0',
  15594. lime: '00ff00',
  15595. limegreen: '32cd32',
  15596. linen: 'faf0e6',
  15597. magenta: 'ff00ff',
  15598. maroon: '800000',
  15599. mediumaquamarine: '66cdaa',
  15600. mediumblue: '0000cd',
  15601. mediumorchid: 'ba55d3',
  15602. mediumpurple: '9370d8',
  15603. mediumseagreen: '3cb371',
  15604. mediumslateblue: '7b68ee',
  15605. mediumspringgreen: '00fa9a',
  15606. mediumturquoise: '48d1cc',
  15607. mediumvioletred: 'c71585',
  15608. midnightblue: '191970',
  15609. mintcream: 'f5fffa',
  15610. mistyrose: 'ffe4e1',
  15611. moccasin: 'ffe4b5',
  15612. navajowhite: 'ffdead',
  15613. navy: '000080',
  15614. oldlace: 'fdf5e6',
  15615. olive: '808000',
  15616. olivedrab: '6b8e23',
  15617. orange: 'ffa500',
  15618. orangered: 'ff4500',
  15619. orchid: 'da70d6',
  15620. palegoldenrod: 'eee8aa',
  15621. palegreen: '98fb98',
  15622. paleturquoise: 'afeeee',
  15623. palevioletred: 'd87093',
  15624. papayawhip: 'ffefd5',
  15625. peachpuff: 'ffdab9',
  15626. peru: 'cd853f',
  15627. pink: 'ffc0cb',
  15628. plum: 'dda0dd',
  15629. powderblue: 'b0e0e6',
  15630. purple: '800080',
  15631. rebeccapurple: '663399',
  15632. red: 'ff0000',
  15633. rosybrown: 'bc8f8f',
  15634. royalblue: '4169e1',
  15635. saddlebrown: '8b4513',
  15636. salmon: 'fa8072',
  15637. sandybrown: 'f4a460',
  15638. seagreen: '2e8b57',
  15639. seashell: 'fff5ee',
  15640. sienna: 'a0522d',
  15641. silver: 'c0c0c0',
  15642. skyblue: '87ceeb',
  15643. slateblue: '6a5acd',
  15644. slategray: '708090',
  15645. snow: 'fffafa',
  15646. springgreen: '00ff7f',
  15647. steelblue: '4682b4',
  15648. tan: 'd2b48c',
  15649. teal: '008080',
  15650. thistle: 'd8bfd8',
  15651. tomato: 'ff6347',
  15652. turquoise: '40e0d0',
  15653. violet: 'ee82ee',
  15654. violetred: 'd02090',
  15655. wheat: 'f5deb3',
  15656. white: 'ffffff',
  15657. whitesmoke: 'f5f5f5',
  15658. yellow: 'ffff00',
  15659. yellowgreen: '9acd32'
  15660. };
  15661. color_string = simple_colors[color_string] || color_string; // emd of simple type-in colors
  15662. // array of color definition objects
  15663. var color_defs = [{
  15664. re: /^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,
  15665. example: ['rgba(123, 234, 45, 0.8)', 'rgba(255,234,245,1.0)'],
  15666. process: function process(bits) {
  15667. return [parseInt(bits[1]), parseInt(bits[2]), parseInt(bits[3]), parseFloat(bits[4])];
  15668. }
  15669. }, {
  15670. re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,
  15671. example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'],
  15672. process: function process(bits) {
  15673. return [parseInt(bits[1]), parseInt(bits[2]), parseInt(bits[3])];
  15674. }
  15675. }, {
  15676. re: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
  15677. example: ['#00ff00', '336699'],
  15678. process: function process(bits) {
  15679. return [parseInt(bits[1], 16), parseInt(bits[2], 16), parseInt(bits[3], 16)];
  15680. }
  15681. }, {
  15682. re: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  15683. example: ['#fb0', 'f0f'],
  15684. process: function process(bits) {
  15685. return [parseInt(bits[1] + bits[1], 16), parseInt(bits[2] + bits[2], 16), parseInt(bits[3] + bits[3], 16)];
  15686. }
  15687. }]; // search through the definitions to find a match
  15688. for (var i = 0; i < color_defs.length; i++) {
  15689. var re = color_defs[i].re;
  15690. var processor = color_defs[i].process;
  15691. var bits = re.exec(color_string);
  15692. if (bits) {
  15693. var channels = processor(bits);
  15694. this.r = channels[0];
  15695. this.g = channels[1];
  15696. this.b = channels[2];
  15697. if (channels.length > 3) {
  15698. this.alpha = channels[3];
  15699. }
  15700. this.ok = true;
  15701. }
  15702. } // validate/cleanup values
  15703. this.r = this.r < 0 || isNaN(this.r) ? 0 : this.r > 255 ? 255 : this.r;
  15704. this.g = this.g < 0 || isNaN(this.g) ? 0 : this.g > 255 ? 255 : this.g;
  15705. this.b = this.b < 0 || isNaN(this.b) ? 0 : this.b > 255 ? 255 : this.b;
  15706. this.alpha = this.alpha < 0 ? 0 : this.alpha > 1.0 || isNaN(this.alpha) ? 1.0 : this.alpha; // some getters
  15707. this.toRGB = function () {
  15708. return 'rgb(' + this.r + ', ' + this.g + ', ' + this.b + ')';
  15709. };
  15710. this.toRGBA = function () {
  15711. return 'rgba(' + this.r + ', ' + this.g + ', ' + this.b + ', ' + this.alpha + ')';
  15712. };
  15713. this.toHex = function () {
  15714. var r = this.r.toString(16);
  15715. var g = this.g.toString(16);
  15716. var b = this.b.toString(16);
  15717. if (r.length == 1) r = '0' + r;
  15718. if (g.length == 1) g = '0' + g;
  15719. if (b.length == 1) b = '0' + b;
  15720. return '#' + r + g + b;
  15721. }; // help
  15722. this.getHelpXML = function () {
  15723. var examples = new Array(); // add regexps
  15724. for (var i = 0; i < color_defs.length; i++) {
  15725. var example = color_defs[i].example;
  15726. for (var j = 0; j < example.length; j++) {
  15727. examples[examples.length] = example[j];
  15728. }
  15729. } // add type-in colors
  15730. for (var sc in simple_colors) {
  15731. examples[examples.length] = sc;
  15732. }
  15733. var xml = document.createElement('ul');
  15734. xml.setAttribute('id', 'rgbcolor-examples');
  15735. for (var i = 0; i < examples.length; i++) {
  15736. try {
  15737. var list_item = document.createElement('li');
  15738. var list_color = new RGBColor(examples[i]);
  15739. var example_div = document.createElement('div');
  15740. example_div.style.cssText = 'margin: 3px; ' + 'border: 1px solid black; ' + 'background:' + list_color.toHex() + '; ' + 'color:' + list_color.toHex();
  15741. example_div.appendChild(document.createTextNode('test'));
  15742. var list_item_value = document.createTextNode(' ' + examples[i] + ' -> ' + list_color.toRGB() + ' -> ' + list_color.toHex());
  15743. list_item.appendChild(example_div);
  15744. list_item.appendChild(list_item_value);
  15745. xml.appendChild(list_item);
  15746. } catch (e) {}
  15747. }
  15748. return xml;
  15749. };
  15750. };
  15751. /***/ }),
  15752. /* 76 */
  15753. /***/ (function(module, exports) {
  15754. /*
  15755. StackBlur - a fast almost Gaussian Blur For Canvas
  15756. Version: 0.5
  15757. Author: Mario Klingemann
  15758. Contact: mario@quasimondo.com
  15759. Website: http://www.quasimondo.com/StackBlurForCanvas
  15760. Twitter: @quasimondo
  15761. In case you find this class useful - especially in commercial projects -
  15762. I am not totally unhappy for a small donation to my PayPal account
  15763. mario@quasimondo.de
  15764. Or support me on flattr:
  15765. https://flattr.com/thing/72791/StackBlur-a-fast-almost-Gaussian-Blur-Effect-for-CanvasJavascript
  15766. Copyright (c) 2010 Mario Klingemann
  15767. Permission is hereby granted, free of charge, to any person
  15768. obtaining a copy of this software and associated documentation
  15769. files (the "Software"), to deal in the Software without
  15770. restriction, including without limitation the rights to use,
  15771. copy, modify, merge, publish, distribute, sublicense, and/or sell
  15772. copies of the Software, and to permit persons to whom the
  15773. Software is furnished to do so, subject to the following
  15774. conditions:
  15775. The above copyright notice and this permission notice shall be
  15776. included in all copies or substantial portions of the Software.
  15777. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  15778. EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  15779. OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  15780. NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  15781. HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  15782. WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  15783. FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  15784. OTHER DEALINGS IN THE SOFTWARE.
  15785. */
  15786. var mul_table = [512, 512, 456, 512, 328, 456, 335, 512, 405, 328, 271, 456, 388, 335, 292, 512, 454, 405, 364, 328, 298, 271, 496, 456, 420, 388, 360, 335, 312, 292, 273, 512, 482, 454, 428, 405, 383, 364, 345, 328, 312, 298, 284, 271, 259, 496, 475, 456, 437, 420, 404, 388, 374, 360, 347, 335, 323, 312, 302, 292, 282, 273, 265, 512, 497, 482, 468, 454, 441, 428, 417, 405, 394, 383, 373, 364, 354, 345, 337, 328, 320, 312, 305, 298, 291, 284, 278, 271, 265, 259, 507, 496, 485, 475, 465, 456, 446, 437, 428, 420, 412, 404, 396, 388, 381, 374, 367, 360, 354, 347, 341, 335, 329, 323, 318, 312, 307, 302, 297, 292, 287, 282, 278, 273, 269, 265, 261, 512, 505, 497, 489, 482, 475, 468, 461, 454, 447, 441, 435, 428, 422, 417, 411, 405, 399, 394, 389, 383, 378, 373, 368, 364, 359, 354, 350, 345, 341, 337, 332, 328, 324, 320, 316, 312, 309, 305, 301, 298, 294, 291, 287, 284, 281, 278, 274, 271, 268, 265, 262, 259, 257, 507, 501, 496, 491, 485, 480, 475, 470, 465, 460, 456, 451, 446, 442, 437, 433, 428, 424, 420, 416, 412, 408, 404, 400, 396, 392, 388, 385, 381, 377, 374, 370, 367, 363, 360, 357, 354, 350, 347, 344, 341, 338, 335, 332, 329, 326, 323, 320, 318, 315, 312, 310, 307, 304, 302, 299, 297, 294, 292, 289, 287, 285, 282, 280, 278, 275, 273, 271, 269, 267, 265, 263, 261, 259];
  15787. var shg_table = [9, 11, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24];
  15788. function processImage(img, canvas, radius, blurAlphaChannel) {
  15789. if (typeof img == 'string') {
  15790. var img = document.getElementById(img);
  15791. } else if (typeof HTMLImageElement !== 'undefined' && !img instanceof HTMLImageElement) {
  15792. return;
  15793. }
  15794. var w = img.naturalWidth;
  15795. var h = img.naturalHeight;
  15796. if (typeof canvas == 'string') {
  15797. var canvas = document.getElementById(canvas);
  15798. } else if (typeof HTMLCanvasElement !== 'undefined' && !canvas instanceof HTMLCanvasElement) {
  15799. return;
  15800. }
  15801. canvas.style.width = w + 'px';
  15802. canvas.style.height = h + 'px';
  15803. canvas.width = w;
  15804. canvas.height = h;
  15805. var context = canvas.getContext('2d');
  15806. context.clearRect(0, 0, w, h);
  15807. context.drawImage(img, 0, 0);
  15808. if (isNaN(radius) || radius < 1) return;
  15809. if (blurAlphaChannel) processCanvasRGBA(canvas, 0, 0, w, h, radius);else processCanvasRGB(canvas, 0, 0, w, h, radius);
  15810. }
  15811. function getImageDataFromCanvas(canvas, top_x, top_y, width, height) {
  15812. if (typeof canvas == 'string') var canvas = document.getElementById(canvas);else if (typeof HTMLCanvasElement !== 'undefined' && !canvas instanceof HTMLCanvasElement) return;
  15813. var context = canvas.getContext('2d');
  15814. var imageData;
  15815. try {
  15816. try {
  15817. imageData = context.getImageData(top_x, top_y, width, height);
  15818. } catch (e) {
  15819. throw new Error("unable to access local image data: " + e);
  15820. return;
  15821. }
  15822. } catch (e) {
  15823. throw new Error("unable to access image data: " + e);
  15824. }
  15825. return imageData;
  15826. }
  15827. function processCanvasRGBA(canvas, top_x, top_y, width, height, radius) {
  15828. if (isNaN(radius) || radius < 1) return;
  15829. radius |= 0;
  15830. var imageData = getImageDataFromCanvas(canvas, top_x, top_y, width, height);
  15831. imageData = processImageDataRGBA(imageData, top_x, top_y, width, height, radius);
  15832. canvas.getContext('2d').putImageData(imageData, top_x, top_y);
  15833. }
  15834. function processImageDataRGBA(imageData, top_x, top_y, width, height, radius) {
  15835. var pixels = imageData.data;
  15836. var x, y, i, p, yp, yi, yw, r_sum, g_sum, b_sum, a_sum, r_out_sum, g_out_sum, b_out_sum, a_out_sum, r_in_sum, g_in_sum, b_in_sum, a_in_sum, pr, pg, pb, pa, rbs;
  15837. var div = radius + radius + 1;
  15838. var w4 = width << 2;
  15839. var widthMinus1 = width - 1;
  15840. var heightMinus1 = height - 1;
  15841. var radiusPlus1 = radius + 1;
  15842. var sumFactor = radiusPlus1 * (radiusPlus1 + 1) / 2;
  15843. var stackStart = new BlurStack();
  15844. var stack = stackStart;
  15845. for (i = 1; i < div; i++) {
  15846. stack = stack.next = new BlurStack();
  15847. if (i == radiusPlus1) var stackEnd = stack;
  15848. }
  15849. stack.next = stackStart;
  15850. var stackIn = null;
  15851. var stackOut = null;
  15852. yw = yi = 0;
  15853. var mul_sum = mul_table[radius];
  15854. var shg_sum = shg_table[radius];
  15855. for (y = 0; y < height; y++) {
  15856. r_in_sum = g_in_sum = b_in_sum = a_in_sum = r_sum = g_sum = b_sum = a_sum = 0;
  15857. r_out_sum = radiusPlus1 * (pr = pixels[yi]);
  15858. g_out_sum = radiusPlus1 * (pg = pixels[yi + 1]);
  15859. b_out_sum = radiusPlus1 * (pb = pixels[yi + 2]);
  15860. a_out_sum = radiusPlus1 * (pa = pixels[yi + 3]);
  15861. r_sum += sumFactor * pr;
  15862. g_sum += sumFactor * pg;
  15863. b_sum += sumFactor * pb;
  15864. a_sum += sumFactor * pa;
  15865. stack = stackStart;
  15866. for (i = 0; i < radiusPlus1; i++) {
  15867. stack.r = pr;
  15868. stack.g = pg;
  15869. stack.b = pb;
  15870. stack.a = pa;
  15871. stack = stack.next;
  15872. }
  15873. for (i = 1; i < radiusPlus1; i++) {
  15874. p = yi + ((widthMinus1 < i ? widthMinus1 : i) << 2);
  15875. r_sum += (stack.r = pr = pixels[p]) * (rbs = radiusPlus1 - i);
  15876. g_sum += (stack.g = pg = pixels[p + 1]) * rbs;
  15877. b_sum += (stack.b = pb = pixels[p + 2]) * rbs;
  15878. a_sum += (stack.a = pa = pixels[p + 3]) * rbs;
  15879. r_in_sum += pr;
  15880. g_in_sum += pg;
  15881. b_in_sum += pb;
  15882. a_in_sum += pa;
  15883. stack = stack.next;
  15884. }
  15885. stackIn = stackStart;
  15886. stackOut = stackEnd;
  15887. for (x = 0; x < width; x++) {
  15888. pixels[yi + 3] = pa = a_sum * mul_sum >> shg_sum;
  15889. if (pa != 0) {
  15890. pa = 255 / pa;
  15891. pixels[yi] = (r_sum * mul_sum >> shg_sum) * pa;
  15892. pixels[yi + 1] = (g_sum * mul_sum >> shg_sum) * pa;
  15893. pixels[yi + 2] = (b_sum * mul_sum >> shg_sum) * pa;
  15894. } else {
  15895. pixels[yi] = pixels[yi + 1] = pixels[yi + 2] = 0;
  15896. }
  15897. r_sum -= r_out_sum;
  15898. g_sum -= g_out_sum;
  15899. b_sum -= b_out_sum;
  15900. a_sum -= a_out_sum;
  15901. r_out_sum -= stackIn.r;
  15902. g_out_sum -= stackIn.g;
  15903. b_out_sum -= stackIn.b;
  15904. a_out_sum -= stackIn.a;
  15905. p = yw + ((p = x + radius + 1) < widthMinus1 ? p : widthMinus1) << 2;
  15906. r_in_sum += stackIn.r = pixels[p];
  15907. g_in_sum += stackIn.g = pixels[p + 1];
  15908. b_in_sum += stackIn.b = pixels[p + 2];
  15909. a_in_sum += stackIn.a = pixels[p + 3];
  15910. r_sum += r_in_sum;
  15911. g_sum += g_in_sum;
  15912. b_sum += b_in_sum;
  15913. a_sum += a_in_sum;
  15914. stackIn = stackIn.next;
  15915. r_out_sum += pr = stackOut.r;
  15916. g_out_sum += pg = stackOut.g;
  15917. b_out_sum += pb = stackOut.b;
  15918. a_out_sum += pa = stackOut.a;
  15919. r_in_sum -= pr;
  15920. g_in_sum -= pg;
  15921. b_in_sum -= pb;
  15922. a_in_sum -= pa;
  15923. stackOut = stackOut.next;
  15924. yi += 4;
  15925. }
  15926. yw += width;
  15927. }
  15928. for (x = 0; x < width; x++) {
  15929. g_in_sum = b_in_sum = a_in_sum = r_in_sum = g_sum = b_sum = a_sum = r_sum = 0;
  15930. yi = x << 2;
  15931. r_out_sum = radiusPlus1 * (pr = pixels[yi]);
  15932. g_out_sum = radiusPlus1 * (pg = pixels[yi + 1]);
  15933. b_out_sum = radiusPlus1 * (pb = pixels[yi + 2]);
  15934. a_out_sum = radiusPlus1 * (pa = pixels[yi + 3]);
  15935. r_sum += sumFactor * pr;
  15936. g_sum += sumFactor * pg;
  15937. b_sum += sumFactor * pb;
  15938. a_sum += sumFactor * pa;
  15939. stack = stackStart;
  15940. for (i = 0; i < radiusPlus1; i++) {
  15941. stack.r = pr;
  15942. stack.g = pg;
  15943. stack.b = pb;
  15944. stack.a = pa;
  15945. stack = stack.next;
  15946. }
  15947. yp = width;
  15948. for (i = 1; i <= radius; i++) {
  15949. yi = yp + x << 2;
  15950. r_sum += (stack.r = pr = pixels[yi]) * (rbs = radiusPlus1 - i);
  15951. g_sum += (stack.g = pg = pixels[yi + 1]) * rbs;
  15952. b_sum += (stack.b = pb = pixels[yi + 2]) * rbs;
  15953. a_sum += (stack.a = pa = pixels[yi + 3]) * rbs;
  15954. r_in_sum += pr;
  15955. g_in_sum += pg;
  15956. b_in_sum += pb;
  15957. a_in_sum += pa;
  15958. stack = stack.next;
  15959. if (i < heightMinus1) {
  15960. yp += width;
  15961. }
  15962. }
  15963. yi = x;
  15964. stackIn = stackStart;
  15965. stackOut = stackEnd;
  15966. for (y = 0; y < height; y++) {
  15967. p = yi << 2;
  15968. pixels[p + 3] = pa = a_sum * mul_sum >> shg_sum;
  15969. if (pa > 0) {
  15970. pa = 255 / pa;
  15971. pixels[p] = (r_sum * mul_sum >> shg_sum) * pa;
  15972. pixels[p + 1] = (g_sum * mul_sum >> shg_sum) * pa;
  15973. pixels[p + 2] = (b_sum * mul_sum >> shg_sum) * pa;
  15974. } else {
  15975. pixels[p] = pixels[p + 1] = pixels[p + 2] = 0;
  15976. }
  15977. r_sum -= r_out_sum;
  15978. g_sum -= g_out_sum;
  15979. b_sum -= b_out_sum;
  15980. a_sum -= a_out_sum;
  15981. r_out_sum -= stackIn.r;
  15982. g_out_sum -= stackIn.g;
  15983. b_out_sum -= stackIn.b;
  15984. a_out_sum -= stackIn.a;
  15985. p = x + ((p = y + radiusPlus1) < heightMinus1 ? p : heightMinus1) * width << 2;
  15986. r_sum += r_in_sum += stackIn.r = pixels[p];
  15987. g_sum += g_in_sum += stackIn.g = pixels[p + 1];
  15988. b_sum += b_in_sum += stackIn.b = pixels[p + 2];
  15989. a_sum += a_in_sum += stackIn.a = pixels[p + 3];
  15990. stackIn = stackIn.next;
  15991. r_out_sum += pr = stackOut.r;
  15992. g_out_sum += pg = stackOut.g;
  15993. b_out_sum += pb = stackOut.b;
  15994. a_out_sum += pa = stackOut.a;
  15995. r_in_sum -= pr;
  15996. g_in_sum -= pg;
  15997. b_in_sum -= pb;
  15998. a_in_sum -= pa;
  15999. stackOut = stackOut.next;
  16000. yi += width;
  16001. }
  16002. }
  16003. return imageData;
  16004. }
  16005. function processCanvasRGB(canvas, top_x, top_y, width, height, radius) {
  16006. if (isNaN(radius) || radius < 1) return;
  16007. radius |= 0;
  16008. var imageData = getImageDataFromCanvas(canvas, top_x, top_y, width, height);
  16009. imageData = processImageDataRGB(imageData, top_x, top_y, width, height, radius);
  16010. canvas.getContext('2d').putImageData(imageData, top_x, top_y);
  16011. }
  16012. function processImageDataRGB(imageData, top_x, top_y, width, height, radius) {
  16013. var pixels = imageData.data;
  16014. var x, y, i, p, yp, yi, yw, r_sum, g_sum, b_sum, r_out_sum, g_out_sum, b_out_sum, r_in_sum, g_in_sum, b_in_sum, pr, pg, pb, rbs;
  16015. var div = radius + radius + 1;
  16016. var w4 = width << 2;
  16017. var widthMinus1 = width - 1;
  16018. var heightMinus1 = height - 1;
  16019. var radiusPlus1 = radius + 1;
  16020. var sumFactor = radiusPlus1 * (radiusPlus1 + 1) / 2;
  16021. var stackStart = new BlurStack();
  16022. var stack = stackStart;
  16023. for (i = 1; i < div; i++) {
  16024. stack = stack.next = new BlurStack();
  16025. if (i == radiusPlus1) var stackEnd = stack;
  16026. }
  16027. stack.next = stackStart;
  16028. var stackIn = null;
  16029. var stackOut = null;
  16030. yw = yi = 0;
  16031. var mul_sum = mul_table[radius];
  16032. var shg_sum = shg_table[radius];
  16033. for (y = 0; y < height; y++) {
  16034. r_in_sum = g_in_sum = b_in_sum = r_sum = g_sum = b_sum = 0;
  16035. r_out_sum = radiusPlus1 * (pr = pixels[yi]);
  16036. g_out_sum = radiusPlus1 * (pg = pixels[yi + 1]);
  16037. b_out_sum = radiusPlus1 * (pb = pixels[yi + 2]);
  16038. r_sum += sumFactor * pr;
  16039. g_sum += sumFactor * pg;
  16040. b_sum += sumFactor * pb;
  16041. stack = stackStart;
  16042. for (i = 0; i < radiusPlus1; i++) {
  16043. stack.r = pr;
  16044. stack.g = pg;
  16045. stack.b = pb;
  16046. stack = stack.next;
  16047. }
  16048. for (i = 1; i < radiusPlus1; i++) {
  16049. p = yi + ((widthMinus1 < i ? widthMinus1 : i) << 2);
  16050. r_sum += (stack.r = pr = pixels[p]) * (rbs = radiusPlus1 - i);
  16051. g_sum += (stack.g = pg = pixels[p + 1]) * rbs;
  16052. b_sum += (stack.b = pb = pixels[p + 2]) * rbs;
  16053. r_in_sum += pr;
  16054. g_in_sum += pg;
  16055. b_in_sum += pb;
  16056. stack = stack.next;
  16057. }
  16058. stackIn = stackStart;
  16059. stackOut = stackEnd;
  16060. for (x = 0; x < width; x++) {
  16061. pixels[yi] = r_sum * mul_sum >> shg_sum;
  16062. pixels[yi + 1] = g_sum * mul_sum >> shg_sum;
  16063. pixels[yi + 2] = b_sum * mul_sum >> shg_sum;
  16064. r_sum -= r_out_sum;
  16065. g_sum -= g_out_sum;
  16066. b_sum -= b_out_sum;
  16067. r_out_sum -= stackIn.r;
  16068. g_out_sum -= stackIn.g;
  16069. b_out_sum -= stackIn.b;
  16070. p = yw + ((p = x + radius + 1) < widthMinus1 ? p : widthMinus1) << 2;
  16071. r_in_sum += stackIn.r = pixels[p];
  16072. g_in_sum += stackIn.g = pixels[p + 1];
  16073. b_in_sum += stackIn.b = pixels[p + 2];
  16074. r_sum += r_in_sum;
  16075. g_sum += g_in_sum;
  16076. b_sum += b_in_sum;
  16077. stackIn = stackIn.next;
  16078. r_out_sum += pr = stackOut.r;
  16079. g_out_sum += pg = stackOut.g;
  16080. b_out_sum += pb = stackOut.b;
  16081. r_in_sum -= pr;
  16082. g_in_sum -= pg;
  16083. b_in_sum -= pb;
  16084. stackOut = stackOut.next;
  16085. yi += 4;
  16086. }
  16087. yw += width;
  16088. }
  16089. for (x = 0; x < width; x++) {
  16090. g_in_sum = b_in_sum = r_in_sum = g_sum = b_sum = r_sum = 0;
  16091. yi = x << 2;
  16092. r_out_sum = radiusPlus1 * (pr = pixels[yi]);
  16093. g_out_sum = radiusPlus1 * (pg = pixels[yi + 1]);
  16094. b_out_sum = radiusPlus1 * (pb = pixels[yi + 2]);
  16095. r_sum += sumFactor * pr;
  16096. g_sum += sumFactor * pg;
  16097. b_sum += sumFactor * pb;
  16098. stack = stackStart;
  16099. for (i = 0; i < radiusPlus1; i++) {
  16100. stack.r = pr;
  16101. stack.g = pg;
  16102. stack.b = pb;
  16103. stack = stack.next;
  16104. }
  16105. yp = width;
  16106. for (i = 1; i <= radius; i++) {
  16107. yi = yp + x << 2;
  16108. r_sum += (stack.r = pr = pixels[yi]) * (rbs = radiusPlus1 - i);
  16109. g_sum += (stack.g = pg = pixels[yi + 1]) * rbs;
  16110. b_sum += (stack.b = pb = pixels[yi + 2]) * rbs;
  16111. r_in_sum += pr;
  16112. g_in_sum += pg;
  16113. b_in_sum += pb;
  16114. stack = stack.next;
  16115. if (i < heightMinus1) {
  16116. yp += width;
  16117. }
  16118. }
  16119. yi = x;
  16120. stackIn = stackStart;
  16121. stackOut = stackEnd;
  16122. for (y = 0; y < height; y++) {
  16123. p = yi << 2;
  16124. pixels[p] = r_sum * mul_sum >> shg_sum;
  16125. pixels[p + 1] = g_sum * mul_sum >> shg_sum;
  16126. pixels[p + 2] = b_sum * mul_sum >> shg_sum;
  16127. r_sum -= r_out_sum;
  16128. g_sum -= g_out_sum;
  16129. b_sum -= b_out_sum;
  16130. r_out_sum -= stackIn.r;
  16131. g_out_sum -= stackIn.g;
  16132. b_out_sum -= stackIn.b;
  16133. p = x + ((p = y + radiusPlus1) < heightMinus1 ? p : heightMinus1) * width << 2;
  16134. r_sum += r_in_sum += stackIn.r = pixels[p];
  16135. g_sum += g_in_sum += stackIn.g = pixels[p + 1];
  16136. b_sum += b_in_sum += stackIn.b = pixels[p + 2];
  16137. stackIn = stackIn.next;
  16138. r_out_sum += pr = stackOut.r;
  16139. g_out_sum += pg = stackOut.g;
  16140. b_out_sum += pb = stackOut.b;
  16141. r_in_sum -= pr;
  16142. g_in_sum -= pg;
  16143. b_in_sum -= pb;
  16144. stackOut = stackOut.next;
  16145. yi += width;
  16146. }
  16147. }
  16148. return imageData;
  16149. }
  16150. function BlurStack() {
  16151. this.r = 0;
  16152. this.g = 0;
  16153. this.b = 0;
  16154. this.a = 0;
  16155. this.next = null;
  16156. }
  16157. module.exports = {
  16158. image: processImage,
  16159. canvasRGBA: processCanvasRGBA,
  16160. canvasRGB: processCanvasRGB,
  16161. imageDataRGBA: processImageDataRGBA,
  16162. imageDataRGB: processImageDataRGB
  16163. };
  16164. /***/ }),
  16165. /* 77 */
  16166. /***/ (function(module, exports) {
  16167. function _interopRequireDefault(obj) {
  16168. return obj && obj.__esModule ? obj : {
  16169. "default": obj
  16170. };
  16171. }
  16172. module.exports = _interopRequireDefault;
  16173. /***/ }),
  16174. /* 78 */
  16175. /***/ (function(module, exports, __webpack_require__) {
  16176. "use strict";
  16177. exports.__esModule = true;
  16178. exports.default = void 0;
  16179. var getDisplayName = function getDisplayName(Component) {
  16180. if (typeof Component === 'string') {
  16181. return Component;
  16182. }
  16183. if (!Component) {
  16184. return undefined;
  16185. }
  16186. return Component.displayName || Component.name || 'Component';
  16187. };
  16188. var _default = getDisplayName;
  16189. exports.default = _default;
  16190. /***/ }),
  16191. /* 79 */
  16192. /***/ (function(module, exports, __webpack_require__) {
  16193. "use strict";
  16194. if (true) {
  16195. module.exports = __webpack_require__(80);
  16196. } else {}
  16197. /***/ }),
  16198. /* 80 */
  16199. /***/ (function(module, exports, __webpack_require__) {
  16200. "use strict";
  16201. /** @license React v16.12.0
  16202. * react-is.production.min.js
  16203. *
  16204. * Copyright (c) Facebook, Inc. and its affiliates.
  16205. *
  16206. * This source code is licensed under the MIT license found in the
  16207. * LICENSE file in the root directory of this source tree.
  16208. */
  16209. Object.defineProperty(exports, "__esModule", {
  16210. value: !0
  16211. });
  16212. var b = "function" === typeof Symbol && Symbol.for,
  16213. c = b ? Symbol.for("react.element") : 60103,
  16214. d = b ? Symbol.for("react.portal") : 60106,
  16215. e = b ? Symbol.for("react.fragment") : 60107,
  16216. f = b ? Symbol.for("react.strict_mode") : 60108,
  16217. g = b ? Symbol.for("react.profiler") : 60114,
  16218. h = b ? Symbol.for("react.provider") : 60109,
  16219. k = b ? Symbol.for("react.context") : 60110,
  16220. l = b ? Symbol.for("react.async_mode") : 60111,
  16221. m = b ? Symbol.for("react.concurrent_mode") : 60111,
  16222. n = b ? Symbol.for("react.forward_ref") : 60112,
  16223. p = b ? Symbol.for("react.suspense") : 60113,
  16224. q = b ? Symbol.for("react.suspense_list") : 60120,
  16225. r = b ? Symbol.for("react.memo") : 60115,
  16226. t = b ? Symbol.for("react.lazy") : 60116,
  16227. v = b ? Symbol.for("react.fundamental") : 60117,
  16228. w = b ? Symbol.for("react.responder") : 60118,
  16229. x = b ? Symbol.for("react.scope") : 60119;
  16230. function y(a) {
  16231. if ("object" === typeof a && null !== a) {
  16232. var u = a.$$typeof;
  16233. switch (u) {
  16234. case c:
  16235. switch (a = a.type, a) {
  16236. case l:
  16237. case m:
  16238. case e:
  16239. case g:
  16240. case f:
  16241. case p:
  16242. return a;
  16243. default:
  16244. switch (a = a && a.$$typeof, a) {
  16245. case k:
  16246. case n:
  16247. case t:
  16248. case r:
  16249. case h:
  16250. return a;
  16251. default:
  16252. return u;
  16253. }
  16254. }
  16255. case d:
  16256. return u;
  16257. }
  16258. }
  16259. }
  16260. function z(a) {
  16261. return y(a) === m;
  16262. }
  16263. exports.typeOf = y;
  16264. exports.AsyncMode = l;
  16265. exports.ConcurrentMode = m;
  16266. exports.ContextConsumer = k;
  16267. exports.ContextProvider = h;
  16268. exports.Element = c;
  16269. exports.ForwardRef = n;
  16270. exports.Fragment = e;
  16271. exports.Lazy = t;
  16272. exports.Memo = r;
  16273. exports.Portal = d;
  16274. exports.Profiler = g;
  16275. exports.StrictMode = f;
  16276. exports.Suspense = p;
  16277. exports.isValidElementType = function (a) {
  16278. return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === v || a.$$typeof === w || a.$$typeof === x);
  16279. };
  16280. exports.isAsyncMode = function (a) {
  16281. return z(a) || y(a) === l;
  16282. };
  16283. exports.isConcurrentMode = z;
  16284. exports.isContextConsumer = function (a) {
  16285. return y(a) === k;
  16286. };
  16287. exports.isContextProvider = function (a) {
  16288. return y(a) === h;
  16289. };
  16290. exports.isElement = function (a) {
  16291. return "object" === typeof a && null !== a && a.$$typeof === c;
  16292. };
  16293. exports.isForwardRef = function (a) {
  16294. return y(a) === n;
  16295. };
  16296. exports.isFragment = function (a) {
  16297. return y(a) === e;
  16298. };
  16299. exports.isLazy = function (a) {
  16300. return y(a) === t;
  16301. };
  16302. exports.isMemo = function (a) {
  16303. return y(a) === r;
  16304. };
  16305. exports.isPortal = function (a) {
  16306. return y(a) === d;
  16307. };
  16308. exports.isProfiler = function (a) {
  16309. return y(a) === g;
  16310. };
  16311. exports.isStrictMode = function (a) {
  16312. return y(a) === f;
  16313. };
  16314. exports.isSuspense = function (a) {
  16315. return y(a) === p;
  16316. };
  16317. /***/ }),
  16318. /* 81 */
  16319. /***/ (function(module, exports) {
  16320. module.exports = __WEBPACK_EXTERNAL_MODULE__81__;
  16321. /***/ }),
  16322. /* 82 */
  16323. /***/ (function(module, exports, __webpack_require__) {
  16324. "use strict";
  16325. Object.defineProperty(exports, '__esModule', {
  16326. value: true
  16327. });
  16328. var helpers = __webpack_require__(83);
  16329. /**
  16330. * Callback for coordEach
  16331. *
  16332. * @callback coordEachCallback
  16333. * @param {Array<number>} currentCoord The current coordinate being processed.
  16334. * @param {number} coordIndex The current index of the coordinate being processed.
  16335. * @param {number} featureIndex The current index of the Feature being processed.
  16336. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  16337. * @param {number} geometryIndex The current index of the Geometry being processed.
  16338. */
  16339. /**
  16340. * Iterate over coordinates in any GeoJSON object, similar to Array.forEach()
  16341. *
  16342. * @name coordEach
  16343. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  16344. * @param {Function} callback a method that takes (currentCoord, coordIndex, featureIndex, multiFeatureIndex)
  16345. * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.
  16346. * @returns {void}
  16347. * @example
  16348. * var features = turf.featureCollection([
  16349. * turf.point([26, 37], {"foo": "bar"}),
  16350. * turf.point([36, 53], {"hello": "world"})
  16351. * ]);
  16352. *
  16353. * turf.coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  16354. * //=currentCoord
  16355. * //=coordIndex
  16356. * //=featureIndex
  16357. * //=multiFeatureIndex
  16358. * //=geometryIndex
  16359. * });
  16360. */
  16361. function coordEach(geojson, callback, excludeWrapCoord) {
  16362. // Handles null Geometry -- Skips this GeoJSON
  16363. if (geojson === null) return;
  16364. var j,
  16365. k,
  16366. l,
  16367. geometry,
  16368. stopG,
  16369. coords,
  16370. geometryMaybeCollection,
  16371. wrapShrink = 0,
  16372. coordIndex = 0,
  16373. isGeometryCollection,
  16374. type = geojson.type,
  16375. isFeatureCollection = type === 'FeatureCollection',
  16376. isFeature = type === 'Feature',
  16377. stop = isFeatureCollection ? geojson.features.length : 1; // This logic may look a little weird. The reason why it is that way
  16378. // is because it's trying to be fast. GeoJSON supports multiple kinds
  16379. // of objects at its root: FeatureCollection, Features, Geometries.
  16380. // This function has the responsibility of handling all of them, and that
  16381. // means that some of the `for` loops you see below actually just don't apply
  16382. // to certain inputs. For instance, if you give this just a
  16383. // Point geometry, then both loops are short-circuited and all we do
  16384. // is gradually rename the input until it's called 'geometry'.
  16385. //
  16386. // This also aims to allocate as few resources as possible: just a
  16387. // few numbers and booleans, rather than any temporary arrays as would
  16388. // be required with the normalization approach.
  16389. for (var featureIndex = 0; featureIndex < stop; featureIndex++) {
  16390. geometryMaybeCollection = isFeatureCollection ? geojson.features[featureIndex].geometry : isFeature ? geojson.geometry : geojson;
  16391. isGeometryCollection = geometryMaybeCollection ? geometryMaybeCollection.type === 'GeometryCollection' : false;
  16392. stopG = isGeometryCollection ? geometryMaybeCollection.geometries.length : 1;
  16393. for (var geomIndex = 0; geomIndex < stopG; geomIndex++) {
  16394. var multiFeatureIndex = 0;
  16395. var geometryIndex = 0;
  16396. geometry = isGeometryCollection ? geometryMaybeCollection.geometries[geomIndex] : geometryMaybeCollection; // Handles null Geometry -- Skips this geometry
  16397. if (geometry === null) continue;
  16398. coords = geometry.coordinates;
  16399. var geomType = geometry.type;
  16400. wrapShrink = excludeWrapCoord && (geomType === 'Polygon' || geomType === 'MultiPolygon') ? 1 : 0;
  16401. switch (geomType) {
  16402. case null:
  16403. break;
  16404. case 'Point':
  16405. if (callback(coords, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  16406. coordIndex++;
  16407. multiFeatureIndex++;
  16408. break;
  16409. case 'LineString':
  16410. case 'MultiPoint':
  16411. for (j = 0; j < coords.length; j++) {
  16412. if (callback(coords[j], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  16413. coordIndex++;
  16414. if (geomType === 'MultiPoint') multiFeatureIndex++;
  16415. }
  16416. if (geomType === 'LineString') multiFeatureIndex++;
  16417. break;
  16418. case 'Polygon':
  16419. case 'MultiLineString':
  16420. for (j = 0; j < coords.length; j++) {
  16421. for (k = 0; k < coords[j].length - wrapShrink; k++) {
  16422. if (callback(coords[j][k], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  16423. coordIndex++;
  16424. }
  16425. if (geomType === 'MultiLineString') multiFeatureIndex++;
  16426. if (geomType === 'Polygon') geometryIndex++;
  16427. }
  16428. if (geomType === 'Polygon') multiFeatureIndex++;
  16429. break;
  16430. case 'MultiPolygon':
  16431. for (j = 0; j < coords.length; j++) {
  16432. geometryIndex = 0;
  16433. for (k = 0; k < coords[j].length; k++) {
  16434. for (l = 0; l < coords[j][k].length - wrapShrink; l++) {
  16435. if (callback(coords[j][k][l], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  16436. coordIndex++;
  16437. }
  16438. geometryIndex++;
  16439. }
  16440. multiFeatureIndex++;
  16441. }
  16442. break;
  16443. case 'GeometryCollection':
  16444. for (j = 0; j < geometry.geometries.length; j++) {
  16445. if (coordEach(geometry.geometries[j], callback, excludeWrapCoord) === false) return false;
  16446. }
  16447. break;
  16448. default:
  16449. throw new Error('Unknown Geometry Type');
  16450. }
  16451. }
  16452. }
  16453. }
  16454. /**
  16455. * Callback for coordReduce
  16456. *
  16457. * The first time the callback function is called, the values provided as arguments depend
  16458. * on whether the reduce method has an initialValue argument.
  16459. *
  16460. * If an initialValue is provided to the reduce method:
  16461. * - The previousValue argument is initialValue.
  16462. * - The currentValue argument is the value of the first element present in the array.
  16463. *
  16464. * If an initialValue is not provided:
  16465. * - The previousValue argument is the value of the first element present in the array.
  16466. * - The currentValue argument is the value of the second element present in the array.
  16467. *
  16468. * @callback coordReduceCallback
  16469. * @param {*} previousValue The accumulated value previously returned in the last invocation
  16470. * of the callback, or initialValue, if supplied.
  16471. * @param {Array<number>} currentCoord The current coordinate being processed.
  16472. * @param {number} coordIndex The current index of the coordinate being processed.
  16473. * Starts at index 0, if an initialValue is provided, and at index 1 otherwise.
  16474. * @param {number} featureIndex The current index of the Feature being processed.
  16475. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  16476. * @param {number} geometryIndex The current index of the Geometry being processed.
  16477. */
  16478. /**
  16479. * Reduce coordinates in any GeoJSON object, similar to Array.reduce()
  16480. *
  16481. * @name coordReduce
  16482. * @param {FeatureCollection|Geometry|Feature} geojson any GeoJSON object
  16483. * @param {Function} callback a method that takes (previousValue, currentCoord, coordIndex)
  16484. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  16485. * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.
  16486. * @returns {*} The value that results from the reduction.
  16487. * @example
  16488. * var features = turf.featureCollection([
  16489. * turf.point([26, 37], {"foo": "bar"}),
  16490. * turf.point([36, 53], {"hello": "world"})
  16491. * ]);
  16492. *
  16493. * turf.coordReduce(features, function (previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  16494. * //=previousValue
  16495. * //=currentCoord
  16496. * //=coordIndex
  16497. * //=featureIndex
  16498. * //=multiFeatureIndex
  16499. * //=geometryIndex
  16500. * return currentCoord;
  16501. * });
  16502. */
  16503. function coordReduce(geojson, callback, initialValue, excludeWrapCoord) {
  16504. var previousValue = initialValue;
  16505. coordEach(geojson, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  16506. if (coordIndex === 0 && initialValue === undefined) previousValue = currentCoord;else previousValue = callback(previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex);
  16507. }, excludeWrapCoord);
  16508. return previousValue;
  16509. }
  16510. /**
  16511. * Callback for propEach
  16512. *
  16513. * @callback propEachCallback
  16514. * @param {Object} currentProperties The current Properties being processed.
  16515. * @param {number} featureIndex The current index of the Feature being processed.
  16516. */
  16517. /**
  16518. * Iterate over properties in any GeoJSON object, similar to Array.forEach()
  16519. *
  16520. * @name propEach
  16521. * @param {FeatureCollection|Feature} geojson any GeoJSON object
  16522. * @param {Function} callback a method that takes (currentProperties, featureIndex)
  16523. * @returns {void}
  16524. * @example
  16525. * var features = turf.featureCollection([
  16526. * turf.point([26, 37], {foo: 'bar'}),
  16527. * turf.point([36, 53], {hello: 'world'})
  16528. * ]);
  16529. *
  16530. * turf.propEach(features, function (currentProperties, featureIndex) {
  16531. * //=currentProperties
  16532. * //=featureIndex
  16533. * });
  16534. */
  16535. function propEach(geojson, callback) {
  16536. var i;
  16537. switch (geojson.type) {
  16538. case 'FeatureCollection':
  16539. for (i = 0; i < geojson.features.length; i++) {
  16540. if (callback(geojson.features[i].properties, i) === false) break;
  16541. }
  16542. break;
  16543. case 'Feature':
  16544. callback(geojson.properties, 0);
  16545. break;
  16546. }
  16547. }
  16548. /**
  16549. * Callback for propReduce
  16550. *
  16551. * The first time the callback function is called, the values provided as arguments depend
  16552. * on whether the reduce method has an initialValue argument.
  16553. *
  16554. * If an initialValue is provided to the reduce method:
  16555. * - The previousValue argument is initialValue.
  16556. * - The currentValue argument is the value of the first element present in the array.
  16557. *
  16558. * If an initialValue is not provided:
  16559. * - The previousValue argument is the value of the first element present in the array.
  16560. * - The currentValue argument is the value of the second element present in the array.
  16561. *
  16562. * @callback propReduceCallback
  16563. * @param {*} previousValue The accumulated value previously returned in the last invocation
  16564. * of the callback, or initialValue, if supplied.
  16565. * @param {*} currentProperties The current Properties being processed.
  16566. * @param {number} featureIndex The current index of the Feature being processed.
  16567. */
  16568. /**
  16569. * Reduce properties in any GeoJSON object into a single value,
  16570. * similar to how Array.reduce works. However, in this case we lazily run
  16571. * the reduction, so an array of all properties is unnecessary.
  16572. *
  16573. * @name propReduce
  16574. * @param {FeatureCollection|Feature} geojson any GeoJSON object
  16575. * @param {Function} callback a method that takes (previousValue, currentProperties, featureIndex)
  16576. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  16577. * @returns {*} The value that results from the reduction.
  16578. * @example
  16579. * var features = turf.featureCollection([
  16580. * turf.point([26, 37], {foo: 'bar'}),
  16581. * turf.point([36, 53], {hello: 'world'})
  16582. * ]);
  16583. *
  16584. * turf.propReduce(features, function (previousValue, currentProperties, featureIndex) {
  16585. * //=previousValue
  16586. * //=currentProperties
  16587. * //=featureIndex
  16588. * return currentProperties
  16589. * });
  16590. */
  16591. function propReduce(geojson, callback, initialValue) {
  16592. var previousValue = initialValue;
  16593. propEach(geojson, function (currentProperties, featureIndex) {
  16594. if (featureIndex === 0 && initialValue === undefined) previousValue = currentProperties;else previousValue = callback(previousValue, currentProperties, featureIndex);
  16595. });
  16596. return previousValue;
  16597. }
  16598. /**
  16599. * Callback for featureEach
  16600. *
  16601. * @callback featureEachCallback
  16602. * @param {Feature<any>} currentFeature The current Feature being processed.
  16603. * @param {number} featureIndex The current index of the Feature being processed.
  16604. */
  16605. /**
  16606. * Iterate over features in any GeoJSON object, similar to
  16607. * Array.forEach.
  16608. *
  16609. * @name featureEach
  16610. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  16611. * @param {Function} callback a method that takes (currentFeature, featureIndex)
  16612. * @returns {void}
  16613. * @example
  16614. * var features = turf.featureCollection([
  16615. * turf.point([26, 37], {foo: 'bar'}),
  16616. * turf.point([36, 53], {hello: 'world'})
  16617. * ]);
  16618. *
  16619. * turf.featureEach(features, function (currentFeature, featureIndex) {
  16620. * //=currentFeature
  16621. * //=featureIndex
  16622. * });
  16623. */
  16624. function featureEach(geojson, callback) {
  16625. if (geojson.type === 'Feature') {
  16626. callback(geojson, 0);
  16627. } else if (geojson.type === 'FeatureCollection') {
  16628. for (var i = 0; i < geojson.features.length; i++) {
  16629. if (callback(geojson.features[i], i) === false) break;
  16630. }
  16631. }
  16632. }
  16633. /**
  16634. * Callback for featureReduce
  16635. *
  16636. * The first time the callback function is called, the values provided as arguments depend
  16637. * on whether the reduce method has an initialValue argument.
  16638. *
  16639. * If an initialValue is provided to the reduce method:
  16640. * - The previousValue argument is initialValue.
  16641. * - The currentValue argument is the value of the first element present in the array.
  16642. *
  16643. * If an initialValue is not provided:
  16644. * - The previousValue argument is the value of the first element present in the array.
  16645. * - The currentValue argument is the value of the second element present in the array.
  16646. *
  16647. * @callback featureReduceCallback
  16648. * @param {*} previousValue The accumulated value previously returned in the last invocation
  16649. * of the callback, or initialValue, if supplied.
  16650. * @param {Feature} currentFeature The current Feature being processed.
  16651. * @param {number} featureIndex The current index of the Feature being processed.
  16652. */
  16653. /**
  16654. * Reduce features in any GeoJSON object, similar to Array.reduce().
  16655. *
  16656. * @name featureReduce
  16657. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  16658. * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex)
  16659. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  16660. * @returns {*} The value that results from the reduction.
  16661. * @example
  16662. * var features = turf.featureCollection([
  16663. * turf.point([26, 37], {"foo": "bar"}),
  16664. * turf.point([36, 53], {"hello": "world"})
  16665. * ]);
  16666. *
  16667. * turf.featureReduce(features, function (previousValue, currentFeature, featureIndex) {
  16668. * //=previousValue
  16669. * //=currentFeature
  16670. * //=featureIndex
  16671. * return currentFeature
  16672. * });
  16673. */
  16674. function featureReduce(geojson, callback, initialValue) {
  16675. var previousValue = initialValue;
  16676. featureEach(geojson, function (currentFeature, featureIndex) {
  16677. if (featureIndex === 0 && initialValue === undefined) previousValue = currentFeature;else previousValue = callback(previousValue, currentFeature, featureIndex);
  16678. });
  16679. return previousValue;
  16680. }
  16681. /**
  16682. * Get all coordinates from any GeoJSON object.
  16683. *
  16684. * @name coordAll
  16685. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  16686. * @returns {Array<Array<number>>} coordinate position array
  16687. * @example
  16688. * var features = turf.featureCollection([
  16689. * turf.point([26, 37], {foo: 'bar'}),
  16690. * turf.point([36, 53], {hello: 'world'})
  16691. * ]);
  16692. *
  16693. * var coords = turf.coordAll(features);
  16694. * //= [[26, 37], [36, 53]]
  16695. */
  16696. function coordAll(geojson) {
  16697. var coords = [];
  16698. coordEach(geojson, function (coord) {
  16699. coords.push(coord);
  16700. });
  16701. return coords;
  16702. }
  16703. /**
  16704. * Callback for geomEach
  16705. *
  16706. * @callback geomEachCallback
  16707. * @param {Geometry} currentGeometry The current Geometry being processed.
  16708. * @param {number} featureIndex The current index of the Feature being processed.
  16709. * @param {Object} featureProperties The current Feature Properties being processed.
  16710. * @param {Array<number>} featureBBox The current Feature BBox being processed.
  16711. * @param {number|string} featureId The current Feature Id being processed.
  16712. */
  16713. /**
  16714. * Iterate over each geometry in any GeoJSON object, similar to Array.forEach()
  16715. *
  16716. * @name geomEach
  16717. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  16718. * @param {Function} callback a method that takes (currentGeometry, featureIndex, featureProperties, featureBBox, featureId)
  16719. * @returns {void}
  16720. * @example
  16721. * var features = turf.featureCollection([
  16722. * turf.point([26, 37], {foo: 'bar'}),
  16723. * turf.point([36, 53], {hello: 'world'})
  16724. * ]);
  16725. *
  16726. * turf.geomEach(features, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  16727. * //=currentGeometry
  16728. * //=featureIndex
  16729. * //=featureProperties
  16730. * //=featureBBox
  16731. * //=featureId
  16732. * });
  16733. */
  16734. function geomEach(geojson, callback) {
  16735. var i,
  16736. j,
  16737. g,
  16738. geometry,
  16739. stopG,
  16740. geometryMaybeCollection,
  16741. isGeometryCollection,
  16742. featureProperties,
  16743. featureBBox,
  16744. featureId,
  16745. featureIndex = 0,
  16746. isFeatureCollection = geojson.type === 'FeatureCollection',
  16747. isFeature = geojson.type === 'Feature',
  16748. stop = isFeatureCollection ? geojson.features.length : 1; // This logic may look a little weird. The reason why it is that way
  16749. // is because it's trying to be fast. GeoJSON supports multiple kinds
  16750. // of objects at its root: FeatureCollection, Features, Geometries.
  16751. // This function has the responsibility of handling all of them, and that
  16752. // means that some of the `for` loops you see below actually just don't apply
  16753. // to certain inputs. For instance, if you give this just a
  16754. // Point geometry, then both loops are short-circuited and all we do
  16755. // is gradually rename the input until it's called 'geometry'.
  16756. //
  16757. // This also aims to allocate as few resources as possible: just a
  16758. // few numbers and booleans, rather than any temporary arrays as would
  16759. // be required with the normalization approach.
  16760. for (i = 0; i < stop; i++) {
  16761. geometryMaybeCollection = isFeatureCollection ? geojson.features[i].geometry : isFeature ? geojson.geometry : geojson;
  16762. featureProperties = isFeatureCollection ? geojson.features[i].properties : isFeature ? geojson.properties : {};
  16763. featureBBox = isFeatureCollection ? geojson.features[i].bbox : isFeature ? geojson.bbox : undefined;
  16764. featureId = isFeatureCollection ? geojson.features[i].id : isFeature ? geojson.id : undefined;
  16765. isGeometryCollection = geometryMaybeCollection ? geometryMaybeCollection.type === 'GeometryCollection' : false;
  16766. stopG = isGeometryCollection ? geometryMaybeCollection.geometries.length : 1;
  16767. for (g = 0; g < stopG; g++) {
  16768. geometry = isGeometryCollection ? geometryMaybeCollection.geometries[g] : geometryMaybeCollection; // Handle null Geometry
  16769. if (geometry === null) {
  16770. if (callback(null, featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  16771. continue;
  16772. }
  16773. switch (geometry.type) {
  16774. case 'Point':
  16775. case 'LineString':
  16776. case 'MultiPoint':
  16777. case 'Polygon':
  16778. case 'MultiLineString':
  16779. case 'MultiPolygon':
  16780. {
  16781. if (callback(geometry, featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  16782. break;
  16783. }
  16784. case 'GeometryCollection':
  16785. {
  16786. for (j = 0; j < geometry.geometries.length; j++) {
  16787. if (callback(geometry.geometries[j], featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  16788. }
  16789. break;
  16790. }
  16791. default:
  16792. throw new Error('Unknown Geometry Type');
  16793. }
  16794. } // Only increase `featureIndex` per each feature
  16795. featureIndex++;
  16796. }
  16797. }
  16798. /**
  16799. * Callback for geomReduce
  16800. *
  16801. * The first time the callback function is called, the values provided as arguments depend
  16802. * on whether the reduce method has an initialValue argument.
  16803. *
  16804. * If an initialValue is provided to the reduce method:
  16805. * - The previousValue argument is initialValue.
  16806. * - The currentValue argument is the value of the first element present in the array.
  16807. *
  16808. * If an initialValue is not provided:
  16809. * - The previousValue argument is the value of the first element present in the array.
  16810. * - The currentValue argument is the value of the second element present in the array.
  16811. *
  16812. * @callback geomReduceCallback
  16813. * @param {*} previousValue The accumulated value previously returned in the last invocation
  16814. * of the callback, or initialValue, if supplied.
  16815. * @param {Geometry} currentGeometry The current Geometry being processed.
  16816. * @param {number} featureIndex The current index of the Feature being processed.
  16817. * @param {Object} featureProperties The current Feature Properties being processed.
  16818. * @param {Array<number>} featureBBox The current Feature BBox being processed.
  16819. * @param {number|string} featureId The current Feature Id being processed.
  16820. */
  16821. /**
  16822. * Reduce geometry in any GeoJSON object, similar to Array.reduce().
  16823. *
  16824. * @name geomReduce
  16825. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  16826. * @param {Function} callback a method that takes (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId)
  16827. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  16828. * @returns {*} The value that results from the reduction.
  16829. * @example
  16830. * var features = turf.featureCollection([
  16831. * turf.point([26, 37], {foo: 'bar'}),
  16832. * turf.point([36, 53], {hello: 'world'})
  16833. * ]);
  16834. *
  16835. * turf.geomReduce(features, function (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  16836. * //=previousValue
  16837. * //=currentGeometry
  16838. * //=featureIndex
  16839. * //=featureProperties
  16840. * //=featureBBox
  16841. * //=featureId
  16842. * return currentGeometry
  16843. * });
  16844. */
  16845. function geomReduce(geojson, callback, initialValue) {
  16846. var previousValue = initialValue;
  16847. geomEach(geojson, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  16848. if (featureIndex === 0 && initialValue === undefined) previousValue = currentGeometry;else previousValue = callback(previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId);
  16849. });
  16850. return previousValue;
  16851. }
  16852. /**
  16853. * Callback for flattenEach
  16854. *
  16855. * @callback flattenEachCallback
  16856. * @param {Feature} currentFeature The current flattened feature being processed.
  16857. * @param {number} featureIndex The current index of the Feature being processed.
  16858. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  16859. */
  16860. /**
  16861. * Iterate over flattened features in any GeoJSON object, similar to
  16862. * Array.forEach.
  16863. *
  16864. * @name flattenEach
  16865. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  16866. * @param {Function} callback a method that takes (currentFeature, featureIndex, multiFeatureIndex)
  16867. * @example
  16868. * var features = turf.featureCollection([
  16869. * turf.point([26, 37], {foo: 'bar'}),
  16870. * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})
  16871. * ]);
  16872. *
  16873. * turf.flattenEach(features, function (currentFeature, featureIndex, multiFeatureIndex) {
  16874. * //=currentFeature
  16875. * //=featureIndex
  16876. * //=multiFeatureIndex
  16877. * });
  16878. */
  16879. function flattenEach(geojson, callback) {
  16880. geomEach(geojson, function (geometry, featureIndex, properties, bbox, id) {
  16881. // Callback for single geometry
  16882. var type = geometry === null ? null : geometry.type;
  16883. switch (type) {
  16884. case null:
  16885. case 'Point':
  16886. case 'LineString':
  16887. case 'Polygon':
  16888. if (callback(helpers.feature(geometry, properties, {
  16889. bbox: bbox,
  16890. id: id
  16891. }), featureIndex, 0) === false) return false;
  16892. return;
  16893. }
  16894. var geomType; // Callback for multi-geometry
  16895. switch (type) {
  16896. case 'MultiPoint':
  16897. geomType = 'Point';
  16898. break;
  16899. case 'MultiLineString':
  16900. geomType = 'LineString';
  16901. break;
  16902. case 'MultiPolygon':
  16903. geomType = 'Polygon';
  16904. break;
  16905. }
  16906. for (var multiFeatureIndex = 0; multiFeatureIndex < geometry.coordinates.length; multiFeatureIndex++) {
  16907. var coordinate = geometry.coordinates[multiFeatureIndex];
  16908. var geom = {
  16909. type: geomType,
  16910. coordinates: coordinate
  16911. };
  16912. if (callback(helpers.feature(geom, properties), featureIndex, multiFeatureIndex) === false) return false;
  16913. }
  16914. });
  16915. }
  16916. /**
  16917. * Callback for flattenReduce
  16918. *
  16919. * The first time the callback function is called, the values provided as arguments depend
  16920. * on whether the reduce method has an initialValue argument.
  16921. *
  16922. * If an initialValue is provided to the reduce method:
  16923. * - The previousValue argument is initialValue.
  16924. * - The currentValue argument is the value of the first element present in the array.
  16925. *
  16926. * If an initialValue is not provided:
  16927. * - The previousValue argument is the value of the first element present in the array.
  16928. * - The currentValue argument is the value of the second element present in the array.
  16929. *
  16930. * @callback flattenReduceCallback
  16931. * @param {*} previousValue The accumulated value previously returned in the last invocation
  16932. * of the callback, or initialValue, if supplied.
  16933. * @param {Feature} currentFeature The current Feature being processed.
  16934. * @param {number} featureIndex The current index of the Feature being processed.
  16935. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  16936. */
  16937. /**
  16938. * Reduce flattened features in any GeoJSON object, similar to Array.reduce().
  16939. *
  16940. * @name flattenReduce
  16941. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  16942. * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex, multiFeatureIndex)
  16943. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  16944. * @returns {*} The value that results from the reduction.
  16945. * @example
  16946. * var features = turf.featureCollection([
  16947. * turf.point([26, 37], {foo: 'bar'}),
  16948. * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})
  16949. * ]);
  16950. *
  16951. * turf.flattenReduce(features, function (previousValue, currentFeature, featureIndex, multiFeatureIndex) {
  16952. * //=previousValue
  16953. * //=currentFeature
  16954. * //=featureIndex
  16955. * //=multiFeatureIndex
  16956. * return currentFeature
  16957. * });
  16958. */
  16959. function flattenReduce(geojson, callback, initialValue) {
  16960. var previousValue = initialValue;
  16961. flattenEach(geojson, function (currentFeature, featureIndex, multiFeatureIndex) {
  16962. if (featureIndex === 0 && multiFeatureIndex === 0 && initialValue === undefined) previousValue = currentFeature;else previousValue = callback(previousValue, currentFeature, featureIndex, multiFeatureIndex);
  16963. });
  16964. return previousValue;
  16965. }
  16966. /**
  16967. * Callback for segmentEach
  16968. *
  16969. * @callback segmentEachCallback
  16970. * @param {Feature<LineString>} currentSegment The current Segment being processed.
  16971. * @param {number} featureIndex The current index of the Feature being processed.
  16972. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  16973. * @param {number} geometryIndex The current index of the Geometry being processed.
  16974. * @param {number} segmentIndex The current index of the Segment being processed.
  16975. * @returns {void}
  16976. */
  16977. /**
  16978. * Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEach()
  16979. * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  16980. *
  16981. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON
  16982. * @param {Function} callback a method that takes (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex)
  16983. * @returns {void}
  16984. * @example
  16985. * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);
  16986. *
  16987. * // Iterate over GeoJSON by 2-vertex segments
  16988. * turf.segmentEach(polygon, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  16989. * //=currentSegment
  16990. * //=featureIndex
  16991. * //=multiFeatureIndex
  16992. * //=geometryIndex
  16993. * //=segmentIndex
  16994. * });
  16995. *
  16996. * // Calculate the total number of segments
  16997. * var total = 0;
  16998. * turf.segmentEach(polygon, function () {
  16999. * total++;
  17000. * });
  17001. */
  17002. function segmentEach(geojson, callback) {
  17003. flattenEach(geojson, function (feature, featureIndex, multiFeatureIndex) {
  17004. var segmentIndex = 0; // Exclude null Geometries
  17005. if (!feature.geometry) return; // (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  17006. var type = feature.geometry.type;
  17007. if (type === 'Point' || type === 'MultiPoint') return; // Generate 2-vertex line segments
  17008. var previousCoords;
  17009. var previousFeatureIndex = 0;
  17010. var previousMultiIndex = 0;
  17011. var prevGeomIndex = 0;
  17012. if (coordEach(feature, function (currentCoord, coordIndex, featureIndexCoord, multiPartIndexCoord, geometryIndex) {
  17013. // Simulating a meta.coordReduce() since `reduce` operations cannot be stopped by returning `false`
  17014. if (previousCoords === undefined || featureIndex > previousFeatureIndex || multiPartIndexCoord > previousMultiIndex || geometryIndex > prevGeomIndex) {
  17015. previousCoords = currentCoord;
  17016. previousFeatureIndex = featureIndex;
  17017. previousMultiIndex = multiPartIndexCoord;
  17018. prevGeomIndex = geometryIndex;
  17019. segmentIndex = 0;
  17020. return;
  17021. }
  17022. var currentSegment = helpers.lineString([previousCoords, currentCoord], feature.properties);
  17023. if (callback(currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) === false) return false;
  17024. segmentIndex++;
  17025. previousCoords = currentCoord;
  17026. }) === false) return false;
  17027. });
  17028. }
  17029. /**
  17030. * Callback for segmentReduce
  17031. *
  17032. * The first time the callback function is called, the values provided as arguments depend
  17033. * on whether the reduce method has an initialValue argument.
  17034. *
  17035. * If an initialValue is provided to the reduce method:
  17036. * - The previousValue argument is initialValue.
  17037. * - The currentValue argument is the value of the first element present in the array.
  17038. *
  17039. * If an initialValue is not provided:
  17040. * - The previousValue argument is the value of the first element present in the array.
  17041. * - The currentValue argument is the value of the second element present in the array.
  17042. *
  17043. * @callback segmentReduceCallback
  17044. * @param {*} previousValue The accumulated value previously returned in the last invocation
  17045. * of the callback, or initialValue, if supplied.
  17046. * @param {Feature<LineString>} currentSegment The current Segment being processed.
  17047. * @param {number} featureIndex The current index of the Feature being processed.
  17048. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  17049. * @param {number} geometryIndex The current index of the Geometry being processed.
  17050. * @param {number} segmentIndex The current index of the Segment being processed.
  17051. */
  17052. /**
  17053. * Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce()
  17054. * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  17055. *
  17056. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON
  17057. * @param {Function} callback a method that takes (previousValue, currentSegment, currentIndex)
  17058. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  17059. * @returns {void}
  17060. * @example
  17061. * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);
  17062. *
  17063. * // Iterate over GeoJSON by 2-vertex segments
  17064. * turf.segmentReduce(polygon, function (previousSegment, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  17065. * //= previousSegment
  17066. * //= currentSegment
  17067. * //= featureIndex
  17068. * //= multiFeatureIndex
  17069. * //= geometryIndex
  17070. * //= segmentInex
  17071. * return currentSegment
  17072. * });
  17073. *
  17074. * // Calculate the total number of segments
  17075. * var initialValue = 0
  17076. * var total = turf.segmentReduce(polygon, function (previousValue) {
  17077. * previousValue++;
  17078. * return previousValue;
  17079. * }, initialValue);
  17080. */
  17081. function segmentReduce(geojson, callback, initialValue) {
  17082. var previousValue = initialValue;
  17083. var started = false;
  17084. segmentEach(geojson, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  17085. if (started === false && initialValue === undefined) previousValue = currentSegment;else previousValue = callback(previousValue, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex);
  17086. started = true;
  17087. });
  17088. return previousValue;
  17089. }
  17090. /**
  17091. * Callback for lineEach
  17092. *
  17093. * @callback lineEachCallback
  17094. * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed
  17095. * @param {number} featureIndex The current index of the Feature being processed
  17096. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed
  17097. * @param {number} geometryIndex The current index of the Geometry being processed
  17098. */
  17099. /**
  17100. * Iterate over line or ring coordinates in LineString, Polygon, MultiLineString, MultiPolygon Features or Geometries,
  17101. * similar to Array.forEach.
  17102. *
  17103. * @name lineEach
  17104. * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object
  17105. * @param {Function} callback a method that takes (currentLine, featureIndex, multiFeatureIndex, geometryIndex)
  17106. * @example
  17107. * var multiLine = turf.multiLineString([
  17108. * [[26, 37], [35, 45]],
  17109. * [[36, 53], [38, 50], [41, 55]]
  17110. * ]);
  17111. *
  17112. * turf.lineEach(multiLine, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  17113. * //=currentLine
  17114. * //=featureIndex
  17115. * //=multiFeatureIndex
  17116. * //=geometryIndex
  17117. * });
  17118. */
  17119. function lineEach(geojson, callback) {
  17120. // validation
  17121. if (!geojson) throw new Error('geojson is required');
  17122. flattenEach(geojson, function (feature, featureIndex, multiFeatureIndex) {
  17123. if (feature.geometry === null) return;
  17124. var type = feature.geometry.type;
  17125. var coords = feature.geometry.coordinates;
  17126. switch (type) {
  17127. case 'LineString':
  17128. if (callback(feature, featureIndex, multiFeatureIndex, 0, 0) === false) return false;
  17129. break;
  17130. case 'Polygon':
  17131. for (var geometryIndex = 0; geometryIndex < coords.length; geometryIndex++) {
  17132. if (callback(helpers.lineString(coords[geometryIndex], feature.properties), featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  17133. }
  17134. break;
  17135. }
  17136. });
  17137. }
  17138. /**
  17139. * Callback for lineReduce
  17140. *
  17141. * The first time the callback function is called, the values provided as arguments depend
  17142. * on whether the reduce method has an initialValue argument.
  17143. *
  17144. * If an initialValue is provided to the reduce method:
  17145. * - The previousValue argument is initialValue.
  17146. * - The currentValue argument is the value of the first element present in the array.
  17147. *
  17148. * If an initialValue is not provided:
  17149. * - The previousValue argument is the value of the first element present in the array.
  17150. * - The currentValue argument is the value of the second element present in the array.
  17151. *
  17152. * @callback lineReduceCallback
  17153. * @param {*} previousValue The accumulated value previously returned in the last invocation
  17154. * of the callback, or initialValue, if supplied.
  17155. * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed.
  17156. * @param {number} featureIndex The current index of the Feature being processed
  17157. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed
  17158. * @param {number} geometryIndex The current index of the Geometry being processed
  17159. */
  17160. /**
  17161. * Reduce features in any GeoJSON object, similar to Array.reduce().
  17162. *
  17163. * @name lineReduce
  17164. * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object
  17165. * @param {Function} callback a method that takes (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex)
  17166. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  17167. * @returns {*} The value that results from the reduction.
  17168. * @example
  17169. * var multiPoly = turf.multiPolygon([
  17170. * turf.polygon([[[12,48],[2,41],[24,38],[12,48]], [[9,44],[13,41],[13,45],[9,44]]]),
  17171. * turf.polygon([[[5, 5], [0, 0], [2, 2], [4, 4], [5, 5]]])
  17172. * ]);
  17173. *
  17174. * turf.lineReduce(multiPoly, function (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  17175. * //=previousValue
  17176. * //=currentLine
  17177. * //=featureIndex
  17178. * //=multiFeatureIndex
  17179. * //=geometryIndex
  17180. * return currentLine
  17181. * });
  17182. */
  17183. function lineReduce(geojson, callback, initialValue) {
  17184. var previousValue = initialValue;
  17185. lineEach(geojson, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  17186. if (featureIndex === 0 && initialValue === undefined) previousValue = currentLine;else previousValue = callback(previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex);
  17187. });
  17188. return previousValue;
  17189. }
  17190. /**
  17191. * Finds a particular 2-vertex LineString Segment from a GeoJSON using `@turf/meta` indexes.
  17192. *
  17193. * Negative indexes are permitted.
  17194. * Point & MultiPoint will always return null.
  17195. *
  17196. * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry
  17197. * @param {Object} [options={}] Optional parameters
  17198. * @param {number} [options.featureIndex=0] Feature Index
  17199. * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index
  17200. * @param {number} [options.geometryIndex=0] Geometry Index
  17201. * @param {number} [options.segmentIndex=0] Segment Index
  17202. * @param {Object} [options.properties={}] Translate Properties to output LineString
  17203. * @param {BBox} [options.bbox={}] Translate BBox to output LineString
  17204. * @param {number|string} [options.id={}] Translate Id to output LineString
  17205. * @returns {Feature<LineString>} 2-vertex GeoJSON Feature LineString
  17206. * @example
  17207. * var multiLine = turf.multiLineString([
  17208. * [[10, 10], [50, 30], [30, 40]],
  17209. * [[-10, -10], [-50, -30], [-30, -40]]
  17210. * ]);
  17211. *
  17212. * // First Segment (defaults are 0)
  17213. * turf.findSegment(multiLine);
  17214. * // => Feature<LineString<[[10, 10], [50, 30]]>>
  17215. *
  17216. * // First Segment of 2nd Multi Feature
  17217. * turf.findSegment(multiLine, {multiFeatureIndex: 1});
  17218. * // => Feature<LineString<[[-10, -10], [-50, -30]]>>
  17219. *
  17220. * // Last Segment of Last Multi Feature
  17221. * turf.findSegment(multiLine, {multiFeatureIndex: -1, segmentIndex: -1});
  17222. * // => Feature<LineString<[[-50, -30], [-30, -40]]>>
  17223. */
  17224. function findSegment(geojson, options) {
  17225. // Optional Parameters
  17226. options = options || {};
  17227. if (!helpers.isObject(options)) throw new Error('options is invalid');
  17228. var featureIndex = options.featureIndex || 0;
  17229. var multiFeatureIndex = options.multiFeatureIndex || 0;
  17230. var geometryIndex = options.geometryIndex || 0;
  17231. var segmentIndex = options.segmentIndex || 0; // Find FeatureIndex
  17232. var properties = options.properties;
  17233. var geometry;
  17234. switch (geojson.type) {
  17235. case 'FeatureCollection':
  17236. if (featureIndex < 0) featureIndex = geojson.features.length + featureIndex;
  17237. properties = properties || geojson.features[featureIndex].properties;
  17238. geometry = geojson.features[featureIndex].geometry;
  17239. break;
  17240. case 'Feature':
  17241. properties = properties || geojson.properties;
  17242. geometry = geojson.geometry;
  17243. break;
  17244. case 'Point':
  17245. case 'MultiPoint':
  17246. return null;
  17247. case 'LineString':
  17248. case 'Polygon':
  17249. case 'MultiLineString':
  17250. case 'MultiPolygon':
  17251. geometry = geojson;
  17252. break;
  17253. default:
  17254. throw new Error('geojson is invalid');
  17255. } // Find SegmentIndex
  17256. if (geometry === null) return null;
  17257. var coords = geometry.coordinates;
  17258. switch (geometry.type) {
  17259. case 'Point':
  17260. case 'MultiPoint':
  17261. return null;
  17262. case 'LineString':
  17263. if (segmentIndex < 0) segmentIndex = coords.length + segmentIndex - 1;
  17264. return helpers.lineString([coords[segmentIndex], coords[segmentIndex + 1]], properties, options);
  17265. case 'Polygon':
  17266. if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;
  17267. if (segmentIndex < 0) segmentIndex = coords[geometryIndex].length + segmentIndex - 1;
  17268. return helpers.lineString([coords[geometryIndex][segmentIndex], coords[geometryIndex][segmentIndex + 1]], properties, options);
  17269. case 'MultiLineString':
  17270. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  17271. if (segmentIndex < 0) segmentIndex = coords[multiFeatureIndex].length + segmentIndex - 1;
  17272. return helpers.lineString([coords[multiFeatureIndex][segmentIndex], coords[multiFeatureIndex][segmentIndex + 1]], properties, options);
  17273. case 'MultiPolygon':
  17274. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  17275. if (geometryIndex < 0) geometryIndex = coords[multiFeatureIndex].length + geometryIndex;
  17276. if (segmentIndex < 0) segmentIndex = coords[multiFeatureIndex][geometryIndex].length - segmentIndex - 1;
  17277. return helpers.lineString([coords[multiFeatureIndex][geometryIndex][segmentIndex], coords[multiFeatureIndex][geometryIndex][segmentIndex + 1]], properties, options);
  17278. }
  17279. throw new Error('geojson is invalid');
  17280. }
  17281. /**
  17282. * Finds a particular Point from a GeoJSON using `@turf/meta` indexes.
  17283. *
  17284. * Negative indexes are permitted.
  17285. *
  17286. * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry
  17287. * @param {Object} [options={}] Optional parameters
  17288. * @param {number} [options.featureIndex=0] Feature Index
  17289. * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index
  17290. * @param {number} [options.geometryIndex=0] Geometry Index
  17291. * @param {number} [options.coordIndex=0] Coord Index
  17292. * @param {Object} [options.properties={}] Translate Properties to output Point
  17293. * @param {BBox} [options.bbox={}] Translate BBox to output Point
  17294. * @param {number|string} [options.id={}] Translate Id to output Point
  17295. * @returns {Feature<Point>} 2-vertex GeoJSON Feature Point
  17296. * @example
  17297. * var multiLine = turf.multiLineString([
  17298. * [[10, 10], [50, 30], [30, 40]],
  17299. * [[-10, -10], [-50, -30], [-30, -40]]
  17300. * ]);
  17301. *
  17302. * // First Segment (defaults are 0)
  17303. * turf.findPoint(multiLine);
  17304. * // => Feature<Point<[10, 10]>>
  17305. *
  17306. * // First Segment of the 2nd Multi-Feature
  17307. * turf.findPoint(multiLine, {multiFeatureIndex: 1});
  17308. * // => Feature<Point<[-10, -10]>>
  17309. *
  17310. * // Last Segment of last Multi-Feature
  17311. * turf.findPoint(multiLine, {multiFeatureIndex: -1, coordIndex: -1});
  17312. * // => Feature<Point<[-30, -40]>>
  17313. */
  17314. function findPoint(geojson, options) {
  17315. // Optional Parameters
  17316. options = options || {};
  17317. if (!helpers.isObject(options)) throw new Error('options is invalid');
  17318. var featureIndex = options.featureIndex || 0;
  17319. var multiFeatureIndex = options.multiFeatureIndex || 0;
  17320. var geometryIndex = options.geometryIndex || 0;
  17321. var coordIndex = options.coordIndex || 0; // Find FeatureIndex
  17322. var properties = options.properties;
  17323. var geometry;
  17324. switch (geojson.type) {
  17325. case 'FeatureCollection':
  17326. if (featureIndex < 0) featureIndex = geojson.features.length + featureIndex;
  17327. properties = properties || geojson.features[featureIndex].properties;
  17328. geometry = geojson.features[featureIndex].geometry;
  17329. break;
  17330. case 'Feature':
  17331. properties = properties || geojson.properties;
  17332. geometry = geojson.geometry;
  17333. break;
  17334. case 'Point':
  17335. case 'MultiPoint':
  17336. return null;
  17337. case 'LineString':
  17338. case 'Polygon':
  17339. case 'MultiLineString':
  17340. case 'MultiPolygon':
  17341. geometry = geojson;
  17342. break;
  17343. default:
  17344. throw new Error('geojson is invalid');
  17345. } // Find Coord Index
  17346. if (geometry === null) return null;
  17347. var coords = geometry.coordinates;
  17348. switch (geometry.type) {
  17349. case 'Point':
  17350. return helpers.point(coords, properties, options);
  17351. case 'MultiPoint':
  17352. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  17353. return helpers.point(coords[multiFeatureIndex], properties, options);
  17354. case 'LineString':
  17355. if (coordIndex < 0) coordIndex = coords.length + coordIndex;
  17356. return helpers.point(coords[coordIndex], properties, options);
  17357. case 'Polygon':
  17358. if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;
  17359. if (coordIndex < 0) coordIndex = coords[geometryIndex].length + coordIndex;
  17360. return helpers.point(coords[geometryIndex][coordIndex], properties, options);
  17361. case 'MultiLineString':
  17362. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  17363. if (coordIndex < 0) coordIndex = coords[multiFeatureIndex].length + coordIndex;
  17364. return helpers.point(coords[multiFeatureIndex][coordIndex], properties, options);
  17365. case 'MultiPolygon':
  17366. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  17367. if (geometryIndex < 0) geometryIndex = coords[multiFeatureIndex].length + geometryIndex;
  17368. if (coordIndex < 0) coordIndex = coords[multiFeatureIndex][geometryIndex].length - coordIndex;
  17369. return helpers.point(coords[multiFeatureIndex][geometryIndex][coordIndex], properties, options);
  17370. }
  17371. throw new Error('geojson is invalid');
  17372. }
  17373. exports.coordEach = coordEach;
  17374. exports.coordReduce = coordReduce;
  17375. exports.propEach = propEach;
  17376. exports.propReduce = propReduce;
  17377. exports.featureEach = featureEach;
  17378. exports.featureReduce = featureReduce;
  17379. exports.coordAll = coordAll;
  17380. exports.geomEach = geomEach;
  17381. exports.geomReduce = geomReduce;
  17382. exports.flattenEach = flattenEach;
  17383. exports.flattenReduce = flattenReduce;
  17384. exports.segmentEach = segmentEach;
  17385. exports.segmentReduce = segmentReduce;
  17386. exports.lineEach = lineEach;
  17387. exports.lineReduce = lineReduce;
  17388. exports.findSegment = findSegment;
  17389. exports.findPoint = findPoint;
  17390. /***/ }),
  17391. /* 83 */
  17392. /***/ (function(module, exports, __webpack_require__) {
  17393. "use strict";
  17394. Object.defineProperty(exports, "__esModule", {
  17395. value: true
  17396. });
  17397. /**
  17398. * @module helpers
  17399. */
  17400. /**
  17401. * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.
  17402. *
  17403. * @memberof helpers
  17404. * @type {number}
  17405. */
  17406. exports.earthRadius = 6371008.8;
  17407. /**
  17408. * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.
  17409. *
  17410. * @memberof helpers
  17411. * @type {Object}
  17412. */
  17413. exports.factors = {
  17414. centimeters: exports.earthRadius * 100,
  17415. centimetres: exports.earthRadius * 100,
  17416. degrees: exports.earthRadius / 111325,
  17417. feet: exports.earthRadius * 3.28084,
  17418. inches: exports.earthRadius * 39.370,
  17419. kilometers: exports.earthRadius / 1000,
  17420. kilometres: exports.earthRadius / 1000,
  17421. meters: exports.earthRadius,
  17422. metres: exports.earthRadius,
  17423. miles: exports.earthRadius / 1609.344,
  17424. millimeters: exports.earthRadius * 1000,
  17425. millimetres: exports.earthRadius * 1000,
  17426. nauticalmiles: exports.earthRadius / 1852,
  17427. radians: 1,
  17428. yards: exports.earthRadius / 1.0936
  17429. };
  17430. /**
  17431. * Units of measurement factors based on 1 meter.
  17432. *
  17433. * @memberof helpers
  17434. * @type {Object}
  17435. */
  17436. exports.unitsFactors = {
  17437. centimeters: 100,
  17438. centimetres: 100,
  17439. degrees: 1 / 111325,
  17440. feet: 3.28084,
  17441. inches: 39.370,
  17442. kilometers: 1 / 1000,
  17443. kilometres: 1 / 1000,
  17444. meters: 1,
  17445. metres: 1,
  17446. miles: 1 / 1609.344,
  17447. millimeters: 1000,
  17448. millimetres: 1000,
  17449. nauticalmiles: 1 / 1852,
  17450. radians: 1 / exports.earthRadius,
  17451. yards: 1 / 1.0936
  17452. };
  17453. /**
  17454. * Area of measurement factors based on 1 square meter.
  17455. *
  17456. * @memberof helpers
  17457. * @type {Object}
  17458. */
  17459. exports.areaFactors = {
  17460. acres: 0.000247105,
  17461. centimeters: 10000,
  17462. centimetres: 10000,
  17463. feet: 10.763910417,
  17464. inches: 1550.003100006,
  17465. kilometers: 0.000001,
  17466. kilometres: 0.000001,
  17467. meters: 1,
  17468. metres: 1,
  17469. miles: 3.86e-7,
  17470. millimeters: 1000000,
  17471. millimetres: 1000000,
  17472. yards: 1.195990046
  17473. };
  17474. /**
  17475. * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.
  17476. *
  17477. * @name feature
  17478. * @param {Geometry} geometry input geometry
  17479. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  17480. * @param {Object} [options={}] Optional Parameters
  17481. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  17482. * @param {string|number} [options.id] Identifier associated with the Feature
  17483. * @returns {Feature} a GeoJSON Feature
  17484. * @example
  17485. * var geometry = {
  17486. * "type": "Point",
  17487. * "coordinates": [110, 50]
  17488. * };
  17489. *
  17490. * var feature = turf.feature(geometry);
  17491. *
  17492. * //=feature
  17493. */
  17494. function feature(geom, properties, options) {
  17495. if (options === void 0) {
  17496. options = {};
  17497. }
  17498. var feat = {
  17499. type: "Feature"
  17500. };
  17501. if (options.id === 0 || options.id) {
  17502. feat.id = options.id;
  17503. }
  17504. if (options.bbox) {
  17505. feat.bbox = options.bbox;
  17506. }
  17507. feat.properties = properties || {};
  17508. feat.geometry = geom;
  17509. return feat;
  17510. }
  17511. exports.feature = feature;
  17512. /**
  17513. * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.
  17514. * For GeometryCollection type use `helpers.geometryCollection`
  17515. *
  17516. * @name geometry
  17517. * @param {string} type Geometry Type
  17518. * @param {Array<any>} coordinates Coordinates
  17519. * @param {Object} [options={}] Optional Parameters
  17520. * @returns {Geometry} a GeoJSON Geometry
  17521. * @example
  17522. * var type = "Point";
  17523. * var coordinates = [110, 50];
  17524. * var geometry = turf.geometry(type, coordinates);
  17525. * // => geometry
  17526. */
  17527. function geometry(type, coordinates, options) {
  17528. if (options === void 0) {
  17529. options = {};
  17530. }
  17531. switch (type) {
  17532. case "Point":
  17533. return point(coordinates).geometry;
  17534. case "LineString":
  17535. return lineString(coordinates).geometry;
  17536. case "Polygon":
  17537. return polygon(coordinates).geometry;
  17538. case "MultiPoint":
  17539. return multiPoint(coordinates).geometry;
  17540. case "MultiLineString":
  17541. return multiLineString(coordinates).geometry;
  17542. case "MultiPolygon":
  17543. return multiPolygon(coordinates).geometry;
  17544. default:
  17545. throw new Error(type + " is invalid");
  17546. }
  17547. }
  17548. exports.geometry = geometry;
  17549. /**
  17550. * Creates a {@link Point} {@link Feature} from a Position.
  17551. *
  17552. * @name point
  17553. * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)
  17554. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  17555. * @param {Object} [options={}] Optional Parameters
  17556. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  17557. * @param {string|number} [options.id] Identifier associated with the Feature
  17558. * @returns {Feature<Point>} a Point feature
  17559. * @example
  17560. * var point = turf.point([-75.343, 39.984]);
  17561. *
  17562. * //=point
  17563. */
  17564. function point(coordinates, properties, options) {
  17565. if (options === void 0) {
  17566. options = {};
  17567. }
  17568. var geom = {
  17569. type: "Point",
  17570. coordinates: coordinates
  17571. };
  17572. return feature(geom, properties, options);
  17573. }
  17574. exports.point = point;
  17575. /**
  17576. * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.
  17577. *
  17578. * @name points
  17579. * @param {Array<Array<number>>} coordinates an array of Points
  17580. * @param {Object} [properties={}] Translate these properties to each Feature
  17581. * @param {Object} [options={}] Optional Parameters
  17582. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]
  17583. * associated with the FeatureCollection
  17584. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  17585. * @returns {FeatureCollection<Point>} Point Feature
  17586. * @example
  17587. * var points = turf.points([
  17588. * [-75, 39],
  17589. * [-80, 45],
  17590. * [-78, 50]
  17591. * ]);
  17592. *
  17593. * //=points
  17594. */
  17595. function points(coordinates, properties, options) {
  17596. if (options === void 0) {
  17597. options = {};
  17598. }
  17599. return featureCollection(coordinates.map(function (coords) {
  17600. return point(coords, properties);
  17601. }), options);
  17602. }
  17603. exports.points = points;
  17604. /**
  17605. * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.
  17606. *
  17607. * @name polygon
  17608. * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings
  17609. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  17610. * @param {Object} [options={}] Optional Parameters
  17611. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  17612. * @param {string|number} [options.id] Identifier associated with the Feature
  17613. * @returns {Feature<Polygon>} Polygon Feature
  17614. * @example
  17615. * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });
  17616. *
  17617. * //=polygon
  17618. */
  17619. function polygon(coordinates, properties, options) {
  17620. if (options === void 0) {
  17621. options = {};
  17622. }
  17623. for (var _i = 0, coordinates_1 = coordinates; _i < coordinates_1.length; _i++) {
  17624. var ring = coordinates_1[_i];
  17625. if (ring.length < 4) {
  17626. throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");
  17627. }
  17628. for (var j = 0; j < ring[ring.length - 1].length; j++) {
  17629. // Check if first point of Polygon contains two numbers
  17630. if (ring[ring.length - 1][j] !== ring[0][j]) {
  17631. throw new Error("First and last Position are not equivalent.");
  17632. }
  17633. }
  17634. }
  17635. var geom = {
  17636. type: "Polygon",
  17637. coordinates: coordinates
  17638. };
  17639. return feature(geom, properties, options);
  17640. }
  17641. exports.polygon = polygon;
  17642. /**
  17643. * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.
  17644. *
  17645. * @name polygons
  17646. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates
  17647. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  17648. * @param {Object} [options={}] Optional Parameters
  17649. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  17650. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  17651. * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection
  17652. * @example
  17653. * var polygons = turf.polygons([
  17654. * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],
  17655. * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],
  17656. * ]);
  17657. *
  17658. * //=polygons
  17659. */
  17660. function polygons(coordinates, properties, options) {
  17661. if (options === void 0) {
  17662. options = {};
  17663. }
  17664. return featureCollection(coordinates.map(function (coords) {
  17665. return polygon(coords, properties);
  17666. }), options);
  17667. }
  17668. exports.polygons = polygons;
  17669. /**
  17670. * Creates a {@link LineString} {@link Feature} from an Array of Positions.
  17671. *
  17672. * @name lineString
  17673. * @param {Array<Array<number>>} coordinates an array of Positions
  17674. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  17675. * @param {Object} [options={}] Optional Parameters
  17676. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  17677. * @param {string|number} [options.id] Identifier associated with the Feature
  17678. * @returns {Feature<LineString>} LineString Feature
  17679. * @example
  17680. * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});
  17681. * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});
  17682. *
  17683. * //=linestring1
  17684. * //=linestring2
  17685. */
  17686. function lineString(coordinates, properties, options) {
  17687. if (options === void 0) {
  17688. options = {};
  17689. }
  17690. if (coordinates.length < 2) {
  17691. throw new Error("coordinates must be an array of two or more positions");
  17692. }
  17693. var geom = {
  17694. type: "LineString",
  17695. coordinates: coordinates
  17696. };
  17697. return feature(geom, properties, options);
  17698. }
  17699. exports.lineString = lineString;
  17700. /**
  17701. * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.
  17702. *
  17703. * @name lineStrings
  17704. * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings
  17705. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  17706. * @param {Object} [options={}] Optional Parameters
  17707. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]
  17708. * associated with the FeatureCollection
  17709. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  17710. * @returns {FeatureCollection<LineString>} LineString FeatureCollection
  17711. * @example
  17712. * var linestrings = turf.lineStrings([
  17713. * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],
  17714. * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]
  17715. * ]);
  17716. *
  17717. * //=linestrings
  17718. */
  17719. function lineStrings(coordinates, properties, options) {
  17720. if (options === void 0) {
  17721. options = {};
  17722. }
  17723. return featureCollection(coordinates.map(function (coords) {
  17724. return lineString(coords, properties);
  17725. }), options);
  17726. }
  17727. exports.lineStrings = lineStrings;
  17728. /**
  17729. * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.
  17730. *
  17731. * @name featureCollection
  17732. * @param {Feature[]} features input features
  17733. * @param {Object} [options={}] Optional Parameters
  17734. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  17735. * @param {string|number} [options.id] Identifier associated with the Feature
  17736. * @returns {FeatureCollection} FeatureCollection of Features
  17737. * @example
  17738. * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});
  17739. * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});
  17740. * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});
  17741. *
  17742. * var collection = turf.featureCollection([
  17743. * locationA,
  17744. * locationB,
  17745. * locationC
  17746. * ]);
  17747. *
  17748. * //=collection
  17749. */
  17750. function featureCollection(features, options) {
  17751. if (options === void 0) {
  17752. options = {};
  17753. }
  17754. var fc = {
  17755. type: "FeatureCollection"
  17756. };
  17757. if (options.id) {
  17758. fc.id = options.id;
  17759. }
  17760. if (options.bbox) {
  17761. fc.bbox = options.bbox;
  17762. }
  17763. fc.features = features;
  17764. return fc;
  17765. }
  17766. exports.featureCollection = featureCollection;
  17767. /**
  17768. * Creates a {@link Feature<MultiLineString>} based on a
  17769. * coordinate array. Properties can be added optionally.
  17770. *
  17771. * @name multiLineString
  17772. * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings
  17773. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  17774. * @param {Object} [options={}] Optional Parameters
  17775. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  17776. * @param {string|number} [options.id] Identifier associated with the Feature
  17777. * @returns {Feature<MultiLineString>} a MultiLineString feature
  17778. * @throws {Error} if no coordinates are passed
  17779. * @example
  17780. * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);
  17781. *
  17782. * //=multiLine
  17783. */
  17784. function multiLineString(coordinates, properties, options) {
  17785. if (options === void 0) {
  17786. options = {};
  17787. }
  17788. var geom = {
  17789. type: "MultiLineString",
  17790. coordinates: coordinates
  17791. };
  17792. return feature(geom, properties, options);
  17793. }
  17794. exports.multiLineString = multiLineString;
  17795. /**
  17796. * Creates a {@link Feature<MultiPoint>} based on a
  17797. * coordinate array. Properties can be added optionally.
  17798. *
  17799. * @name multiPoint
  17800. * @param {Array<Array<number>>} coordinates an array of Positions
  17801. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  17802. * @param {Object} [options={}] Optional Parameters
  17803. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  17804. * @param {string|number} [options.id] Identifier associated with the Feature
  17805. * @returns {Feature<MultiPoint>} a MultiPoint feature
  17806. * @throws {Error} if no coordinates are passed
  17807. * @example
  17808. * var multiPt = turf.multiPoint([[0,0],[10,10]]);
  17809. *
  17810. * //=multiPt
  17811. */
  17812. function multiPoint(coordinates, properties, options) {
  17813. if (options === void 0) {
  17814. options = {};
  17815. }
  17816. var geom = {
  17817. type: "MultiPoint",
  17818. coordinates: coordinates
  17819. };
  17820. return feature(geom, properties, options);
  17821. }
  17822. exports.multiPoint = multiPoint;
  17823. /**
  17824. * Creates a {@link Feature<MultiPolygon>} based on a
  17825. * coordinate array. Properties can be added optionally.
  17826. *
  17827. * @name multiPolygon
  17828. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons
  17829. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  17830. * @param {Object} [options={}] Optional Parameters
  17831. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  17832. * @param {string|number} [options.id] Identifier associated with the Feature
  17833. * @returns {Feature<MultiPolygon>} a multipolygon feature
  17834. * @throws {Error} if no coordinates are passed
  17835. * @example
  17836. * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);
  17837. *
  17838. * //=multiPoly
  17839. *
  17840. */
  17841. function multiPolygon(coordinates, properties, options) {
  17842. if (options === void 0) {
  17843. options = {};
  17844. }
  17845. var geom = {
  17846. type: "MultiPolygon",
  17847. coordinates: coordinates
  17848. };
  17849. return feature(geom, properties, options);
  17850. }
  17851. exports.multiPolygon = multiPolygon;
  17852. /**
  17853. * Creates a {@link Feature<GeometryCollection>} based on a
  17854. * coordinate array. Properties can be added optionally.
  17855. *
  17856. * @name geometryCollection
  17857. * @param {Array<Geometry>} geometries an array of GeoJSON Geometries
  17858. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  17859. * @param {Object} [options={}] Optional Parameters
  17860. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  17861. * @param {string|number} [options.id] Identifier associated with the Feature
  17862. * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature
  17863. * @example
  17864. * var pt = turf.geometry("Point", [100, 0]);
  17865. * var line = turf.geometry("LineString", [[101, 0], [102, 1]]);
  17866. * var collection = turf.geometryCollection([pt, line]);
  17867. *
  17868. * // => collection
  17869. */
  17870. function geometryCollection(geometries, properties, options) {
  17871. if (options === void 0) {
  17872. options = {};
  17873. }
  17874. var geom = {
  17875. type: "GeometryCollection",
  17876. geometries: geometries
  17877. };
  17878. return feature(geom, properties, options);
  17879. }
  17880. exports.geometryCollection = geometryCollection;
  17881. /**
  17882. * Round number to precision
  17883. *
  17884. * @param {number} num Number
  17885. * @param {number} [precision=0] Precision
  17886. * @returns {number} rounded number
  17887. * @example
  17888. * turf.round(120.4321)
  17889. * //=120
  17890. *
  17891. * turf.round(120.4321, 2)
  17892. * //=120.43
  17893. */
  17894. function round(num, precision) {
  17895. if (precision === void 0) {
  17896. precision = 0;
  17897. }
  17898. if (precision && !(precision >= 0)) {
  17899. throw new Error("precision must be a positive number");
  17900. }
  17901. var multiplier = Math.pow(10, precision || 0);
  17902. return Math.round(num * multiplier) / multiplier;
  17903. }
  17904. exports.round = round;
  17905. /**
  17906. * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.
  17907. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  17908. *
  17909. * @name radiansToLength
  17910. * @param {number} radians in radians across the sphere
  17911. * @param {string} [units="kilometers"] can be degrees, radians, miles, or kilometers inches, yards, metres,
  17912. * meters, kilometres, kilometers.
  17913. * @returns {number} distance
  17914. */
  17915. function radiansToLength(radians, units) {
  17916. if (units === void 0) {
  17917. units = "kilometers";
  17918. }
  17919. var factor = exports.factors[units];
  17920. if (!factor) {
  17921. throw new Error(units + " units is invalid");
  17922. }
  17923. return radians * factor;
  17924. }
  17925. exports.radiansToLength = radiansToLength;
  17926. /**
  17927. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians
  17928. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  17929. *
  17930. * @name lengthToRadians
  17931. * @param {number} distance in real units
  17932. * @param {string} [units="kilometers"] can be degrees, radians, miles, or kilometers inches, yards, metres,
  17933. * meters, kilometres, kilometers.
  17934. * @returns {number} radians
  17935. */
  17936. function lengthToRadians(distance, units) {
  17937. if (units === void 0) {
  17938. units = "kilometers";
  17939. }
  17940. var factor = exports.factors[units];
  17941. if (!factor) {
  17942. throw new Error(units + " units is invalid");
  17943. }
  17944. return distance / factor;
  17945. }
  17946. exports.lengthToRadians = lengthToRadians;
  17947. /**
  17948. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees
  17949. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet
  17950. *
  17951. * @name lengthToDegrees
  17952. * @param {number} distance in real units
  17953. * @param {string} [units="kilometers"] can be degrees, radians, miles, or kilometers inches, yards, metres,
  17954. * meters, kilometres, kilometers.
  17955. * @returns {number} degrees
  17956. */
  17957. function lengthToDegrees(distance, units) {
  17958. return radiansToDegrees(lengthToRadians(distance, units));
  17959. }
  17960. exports.lengthToDegrees = lengthToDegrees;
  17961. /**
  17962. * Converts any bearing angle from the north line direction (positive clockwise)
  17963. * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line
  17964. *
  17965. * @name bearingToAzimuth
  17966. * @param {number} bearing angle, between -180 and +180 degrees
  17967. * @returns {number} angle between 0 and 360 degrees
  17968. */
  17969. function bearingToAzimuth(bearing) {
  17970. var angle = bearing % 360;
  17971. if (angle < 0) {
  17972. angle += 360;
  17973. }
  17974. return angle;
  17975. }
  17976. exports.bearingToAzimuth = bearingToAzimuth;
  17977. /**
  17978. * Converts an angle in radians to degrees
  17979. *
  17980. * @name radiansToDegrees
  17981. * @param {number} radians angle in radians
  17982. * @returns {number} degrees between 0 and 360 degrees
  17983. */
  17984. function radiansToDegrees(radians) {
  17985. var degrees = radians % (2 * Math.PI);
  17986. return degrees * 180 / Math.PI;
  17987. }
  17988. exports.radiansToDegrees = radiansToDegrees;
  17989. /**
  17990. * Converts an angle in degrees to radians
  17991. *
  17992. * @name degreesToRadians
  17993. * @param {number} degrees angle between 0 and 360 degrees
  17994. * @returns {number} angle in radians
  17995. */
  17996. function degreesToRadians(degrees) {
  17997. var radians = degrees % 360;
  17998. return radians * Math.PI / 180;
  17999. }
  18000. exports.degreesToRadians = degreesToRadians;
  18001. /**
  18002. * Converts a length to the requested unit.
  18003. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  18004. *
  18005. * @param {number} length to be converted
  18006. * @param {Units} [originalUnit="kilometers"] of the length
  18007. * @param {Units} [finalUnit="kilometers"] returned unit
  18008. * @returns {number} the converted length
  18009. */
  18010. function convertLength(length, originalUnit, finalUnit) {
  18011. if (originalUnit === void 0) {
  18012. originalUnit = "kilometers";
  18013. }
  18014. if (finalUnit === void 0) {
  18015. finalUnit = "kilometers";
  18016. }
  18017. if (!(length >= 0)) {
  18018. throw new Error("length must be a positive number");
  18019. }
  18020. return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);
  18021. }
  18022. exports.convertLength = convertLength;
  18023. /**
  18024. * Converts a area to the requested unit.
  18025. * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches
  18026. * @param {number} area to be converted
  18027. * @param {Units} [originalUnit="meters"] of the distance
  18028. * @param {Units} [finalUnit="kilometers"] returned unit
  18029. * @returns {number} the converted distance
  18030. */
  18031. function convertArea(area, originalUnit, finalUnit) {
  18032. if (originalUnit === void 0) {
  18033. originalUnit = "meters";
  18034. }
  18035. if (finalUnit === void 0) {
  18036. finalUnit = "kilometers";
  18037. }
  18038. if (!(area >= 0)) {
  18039. throw new Error("area must be a positive number");
  18040. }
  18041. var startFactor = exports.areaFactors[originalUnit];
  18042. if (!startFactor) {
  18043. throw new Error("invalid original units");
  18044. }
  18045. var finalFactor = exports.areaFactors[finalUnit];
  18046. if (!finalFactor) {
  18047. throw new Error("invalid final units");
  18048. }
  18049. return area / startFactor * finalFactor;
  18050. }
  18051. exports.convertArea = convertArea;
  18052. /**
  18053. * isNumber
  18054. *
  18055. * @param {*} num Number to validate
  18056. * @returns {boolean} true/false
  18057. * @example
  18058. * turf.isNumber(123)
  18059. * //=true
  18060. * turf.isNumber('foo')
  18061. * //=false
  18062. */
  18063. function isNumber(num) {
  18064. return !isNaN(num) && num !== null && !Array.isArray(num) && !/^\s*$/.test(num);
  18065. }
  18066. exports.isNumber = isNumber;
  18067. /**
  18068. * isObject
  18069. *
  18070. * @param {*} input variable to validate
  18071. * @returns {boolean} true/false
  18072. * @example
  18073. * turf.isObject({elevation: 10})
  18074. * //=true
  18075. * turf.isObject('foo')
  18076. * //=false
  18077. */
  18078. function isObject(input) {
  18079. return !!input && input.constructor === Object;
  18080. }
  18081. exports.isObject = isObject;
  18082. /**
  18083. * Validate BBox
  18084. *
  18085. * @private
  18086. * @param {Array<number>} bbox BBox to validate
  18087. * @returns {void}
  18088. * @throws Error if BBox is not valid
  18089. * @example
  18090. * validateBBox([-180, -40, 110, 50])
  18091. * //=OK
  18092. * validateBBox([-180, -40])
  18093. * //=Error
  18094. * validateBBox('Foo')
  18095. * //=Error
  18096. * validateBBox(5)
  18097. * //=Error
  18098. * validateBBox(null)
  18099. * //=Error
  18100. * validateBBox(undefined)
  18101. * //=Error
  18102. */
  18103. function validateBBox(bbox) {
  18104. if (!bbox) {
  18105. throw new Error("bbox is required");
  18106. }
  18107. if (!Array.isArray(bbox)) {
  18108. throw new Error("bbox must be an Array");
  18109. }
  18110. if (bbox.length !== 4 && bbox.length !== 6) {
  18111. throw new Error("bbox must be an Array of 4 or 6 numbers");
  18112. }
  18113. bbox.forEach(function (num) {
  18114. if (!isNumber(num)) {
  18115. throw new Error("bbox must only contain numbers");
  18116. }
  18117. });
  18118. }
  18119. exports.validateBBox = validateBBox;
  18120. /**
  18121. * Validate Id
  18122. *
  18123. * @private
  18124. * @param {string|number} id Id to validate
  18125. * @returns {void}
  18126. * @throws Error if Id is not valid
  18127. * @example
  18128. * validateId([-180, -40, 110, 50])
  18129. * //=Error
  18130. * validateId([-180, -40])
  18131. * //=Error
  18132. * validateId('Foo')
  18133. * //=OK
  18134. * validateId(5)
  18135. * //=OK
  18136. * validateId(null)
  18137. * //=Error
  18138. * validateId(undefined)
  18139. * //=Error
  18140. */
  18141. function validateId(id) {
  18142. if (!id) {
  18143. throw new Error("id is required");
  18144. }
  18145. if (["string", "number"].indexOf(typeof id) === -1) {
  18146. throw new Error("id must be a number or a string");
  18147. }
  18148. }
  18149. exports.validateId = validateId; // Deprecated methods
  18150. function radians2degrees() {
  18151. throw new Error("method has been renamed to `radiansToDegrees`");
  18152. }
  18153. exports.radians2degrees = radians2degrees;
  18154. function degrees2radians() {
  18155. throw new Error("method has been renamed to `degreesToRadians`");
  18156. }
  18157. exports.degrees2radians = degrees2radians;
  18158. function distanceToDegrees() {
  18159. throw new Error("method has been renamed to `lengthToDegrees`");
  18160. }
  18161. exports.distanceToDegrees = distanceToDegrees;
  18162. function distanceToRadians() {
  18163. throw new Error("method has been renamed to `lengthToRadians`");
  18164. }
  18165. exports.distanceToRadians = distanceToRadians;
  18166. function radiansToDistance() {
  18167. throw new Error("method has been renamed to `radiansToLength`");
  18168. }
  18169. exports.radiansToDistance = radiansToDistance;
  18170. function bearingToAngle() {
  18171. throw new Error("method has been renamed to `bearingToAzimuth`");
  18172. }
  18173. exports.bearingToAngle = bearingToAngle;
  18174. function convertDistance() {
  18175. throw new Error("method has been renamed to `convertLength`");
  18176. }
  18177. exports.convertDistance = convertDistance;
  18178. /***/ }),
  18179. /* 84 */
  18180. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  18181. "use strict";
  18182. __webpack_require__.r(__webpack_exports__);
  18183. var _types_namespaceObject = {};
  18184. __webpack_require__.r(_types_namespaceObject);
  18185. __webpack_require__.d(_types_namespaceObject, "CircleStyle", function() { return CircleStyle_CircleStyle; });
  18186. __webpack_require__.d(_types_namespaceObject, "FillStyle", function() { return FillStyle_FillStyle; });
  18187. __webpack_require__.d(_types_namespaceObject, "LineStyle", function() { return LineStyle_LineStyle; });
  18188. __webpack_require__.d(_types_namespaceObject, "HeatMapStyle", function() { return HeatMapStyle_HeatMapStyle; });
  18189. __webpack_require__.d(_types_namespaceObject, "SymbolStyle", function() { return SymbolStyle_SymbolStyle; });
  18190. var components_namespaceObject = {};
  18191. __webpack_require__.r(components_namespaceObject);
  18192. __webpack_require__.d(components_namespaceObject, "SmWebMap", function() { return web_map_WebMap; });
  18193. __webpack_require__.d(components_namespaceObject, "SmMap", function() { return web_map_Map; });
  18194. __webpack_require__.d(components_namespaceObject, "SmSource", function() { return Source_Source; });
  18195. __webpack_require__.d(components_namespaceObject, "SmLayer", function() { return Layer_Layer; });
  18196. __webpack_require__.d(components_namespaceObject, "SmGeojsonLayer", function() { return GeojsonLayer_GeojsonLayer; });
  18197. __webpack_require__.d(components_namespaceObject, "SmRasterTileLayer", function() { return RasterTileLayer_RasterTileLayer; });
  18198. __webpack_require__.d(components_namespaceObject, "SmVectorTileLayer", function() { return VectorTileLayer_VectorTileLayer; });
  18199. __webpack_require__.d(components_namespaceObject, "SmUniqueThemeLayer", function() { return UniqueThemeLayer_UniqueThemeLayer; });
  18200. __webpack_require__.d(components_namespaceObject, "SmRanksymbolThemeLayer", function() { return RanksymbolThemeLayer_RanksymbolThemeLayer; });
  18201. __webpack_require__.d(components_namespaceObject, "SmRangeThemeLayer", function() { return RangeThemeLayer_RangeThemeLayer; });
  18202. __webpack_require__.d(components_namespaceObject, "SmGraphThemeLayer", function() { return GraphThemeLayer_GraphThemeLayer; });
  18203. __webpack_require__.d(components_namespaceObject, "SmClusterLayer", function() { return cluster_ClusterLayer; });
  18204. __webpack_require__.d(components_namespaceObject, "SmDeckglLayer", function() { return DeckglLayer_DeckglLayer; });
  18205. __webpack_require__.d(components_namespaceObject, "SmLabelThemeLayer", function() { return LabelThemeLayer_LabelThemeLayer; });
  18206. __webpack_require__.d(components_namespaceObject, "SmHeatmapLayer", function() { return HeatmapLayer_HeatmapLayer; });
  18207. __webpack_require__.d(components_namespaceObject, "SmMapvLayer", function() { return MapvLayer_MapvLayer; });
  18208. __webpack_require__.d(components_namespaceObject, "SmEchartsLayer", function() { return EchartsLayer_EchartsLayer; });
  18209. __webpack_require__.d(components_namespaceObject, "SmDataFlowLayer", function() { return DataFlowLayer_DataFlowLayer; });
  18210. __webpack_require__.d(components_namespaceObject, "SmFireLayer", function() { return FireLayer_FireLayer; });
  18211. __webpack_require__.d(components_namespaceObject, "SmAnimateMarkerLayer", function() { return AnimateMarkerLayer_AnimateMarkerLayer; });
  18212. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/defineProperty.js
  18213. function _defineProperty(obj, key, value) {
  18214. if (key in obj) {
  18215. Object.defineProperty(obj, key, {
  18216. value: value,
  18217. enumerable: true,
  18218. configurable: true,
  18219. writable: true
  18220. });
  18221. } else {
  18222. obj[key] = value;
  18223. }
  18224. return obj;
  18225. }
  18226. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
  18227. function ownKeys(object, enumerableOnly) {
  18228. var keys = Object.keys(object);
  18229. if (Object.getOwnPropertySymbols) {
  18230. var symbols = Object.getOwnPropertySymbols(object);
  18231. if (enumerableOnly) symbols = symbols.filter(function (sym) {
  18232. return Object.getOwnPropertyDescriptor(object, sym).enumerable;
  18233. });
  18234. keys.push.apply(keys, symbols);
  18235. }
  18236. return keys;
  18237. }
  18238. function _objectSpread2(target) {
  18239. for (var i = 1; i < arguments.length; i++) {
  18240. var source = arguments[i] != null ? arguments[i] : {};
  18241. if (i % 2) {
  18242. ownKeys(Object(source), true).forEach(function (key) {
  18243. _defineProperty(target, key, source[key]);
  18244. });
  18245. } else if (Object.getOwnPropertyDescriptors) {
  18246. Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
  18247. } else {
  18248. ownKeys(Object(source)).forEach(function (key) {
  18249. Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
  18250. });
  18251. }
  18252. }
  18253. return target;
  18254. }
  18255. // EXTERNAL MODULE: ./src/common/_assets/iconfont/icon-sm-components.css
  18256. var icon_sm_components = __webpack_require__(48);
  18257. // EXTERNAL MODULE: ./src/mapboxgl/style.scss
  18258. var mapboxgl_style = __webpack_require__(49);
  18259. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/classCallCheck.js
  18260. function _classCallCheck(instance, Constructor) {
  18261. if (!(instance instanceof Constructor)) {
  18262. throw new TypeError("Cannot call a class as a function");
  18263. }
  18264. }
  18265. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/createClass.js
  18266. function _defineProperties(target, props) {
  18267. for (var i = 0; i < props.length; i++) {
  18268. var descriptor = props[i];
  18269. descriptor.enumerable = descriptor.enumerable || false;
  18270. descriptor.configurable = true;
  18271. if ("value" in descriptor) descriptor.writable = true;
  18272. Object.defineProperty(target, descriptor.key, descriptor);
  18273. }
  18274. }
  18275. function _createClass(Constructor, protoProps, staticProps) {
  18276. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  18277. if (staticProps) _defineProperties(Constructor, staticProps);
  18278. return Constructor;
  18279. }
  18280. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/typeof.js
  18281. function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); }
  18282. function _typeof(obj) {
  18283. if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") {
  18284. _typeof = function _typeof(obj) {
  18285. return _typeof2(obj);
  18286. };
  18287. } else {
  18288. _typeof = function _typeof(obj) {
  18289. return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
  18290. };
  18291. }
  18292. return _typeof(obj);
  18293. }
  18294. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
  18295. function _assertThisInitialized(self) {
  18296. if (self === void 0) {
  18297. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  18298. }
  18299. return self;
  18300. }
  18301. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
  18302. function _possibleConstructorReturn(self, call) {
  18303. if (call && (_typeof(call) === "object" || typeof call === "function")) {
  18304. return call;
  18305. }
  18306. return _assertThisInitialized(self);
  18307. }
  18308. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
  18309. function _getPrototypeOf(o) {
  18310. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  18311. return o.__proto__ || Object.getPrototypeOf(o);
  18312. };
  18313. return _getPrototypeOf(o);
  18314. }
  18315. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
  18316. function _setPrototypeOf(o, p) {
  18317. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  18318. o.__proto__ = p;
  18319. return o;
  18320. };
  18321. return _setPrototypeOf(o, p);
  18322. }
  18323. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/inherits.js
  18324. function _inherits(subClass, superClass) {
  18325. if (typeof superClass !== "function" && superClass !== null) {
  18326. throw new TypeError("Super expression must either be null or a function");
  18327. }
  18328. subClass.prototype = Object.create(superClass && superClass.prototype, {
  18329. constructor: {
  18330. value: subClass,
  18331. writable: true,
  18332. configurable: true
  18333. }
  18334. });
  18335. if (superClass) _setPrototypeOf(subClass, superClass);
  18336. }
  18337. // EXTERNAL MODULE: external {"root":"React","commonjs":"react","commonjs2":"react","amd":"react"}
  18338. var external_root_React_commonjs_react_commonjs2_react_amd_react_ = __webpack_require__(1);
  18339. var external_root_React_commonjs_react_commonjs2_react_amd_react_default = /*#__PURE__*/__webpack_require__.n(external_root_React_commonjs_react_commonjs2_react_amd_react_);
  18340. // CONCATENATED MODULE: ./node_modules/resize-detector/esm/index.js
  18341. var raf = null;
  18342. function requestAnimationFrame(callback) {
  18343. if (!raf) {
  18344. raf = (window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function (callback) {
  18345. return setTimeout(callback, 16);
  18346. }).bind(window);
  18347. }
  18348. return raf(callback);
  18349. }
  18350. var caf = null;
  18351. function cancelAnimationFrame(id) {
  18352. if (!caf) {
  18353. caf = (window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || function (id) {
  18354. clearTimeout(id);
  18355. }).bind(window);
  18356. }
  18357. caf(id);
  18358. }
  18359. function createStyles(styleText) {
  18360. var style = document.createElement('style');
  18361. style.type = 'text/css';
  18362. if (style.styleSheet) {
  18363. style.styleSheet.cssText = styleText;
  18364. } else {
  18365. style.appendChild(document.createTextNode(styleText));
  18366. }
  18367. (document.querySelector('head') || document.body).appendChild(style);
  18368. return style;
  18369. }
  18370. function createElement(tagName) {
  18371. var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  18372. var elem = document.createElement(tagName);
  18373. Object.keys(props).forEach(function (key) {
  18374. elem[key] = props[key];
  18375. });
  18376. return elem;
  18377. }
  18378. function getComputedStyle(elem, prop, pseudo) {
  18379. // for older versions of Firefox, `getComputedStyle` required
  18380. // the second argument and may return `null` for some elements
  18381. // when `display: none`
  18382. var computedStyle = window.getComputedStyle(elem, pseudo || null) || {
  18383. display: 'none'
  18384. };
  18385. return computedStyle[prop];
  18386. }
  18387. function getRenderInfo(elem) {
  18388. if (!document.documentElement.contains(elem)) {
  18389. return {
  18390. detached: true,
  18391. rendered: false
  18392. };
  18393. }
  18394. var current = elem;
  18395. while (current !== document) {
  18396. if (getComputedStyle(current, 'display') === 'none') {
  18397. return {
  18398. detached: false,
  18399. rendered: false
  18400. };
  18401. }
  18402. current = current.parentNode;
  18403. }
  18404. return {
  18405. detached: false,
  18406. rendered: true
  18407. };
  18408. }
  18409. var css = ".resize-triggers{visibility:hidden;opacity:0}.resize-contract-trigger,.resize-contract-trigger:before,.resize-expand-trigger,.resize-triggers{content:\"\";position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden}.resize-contract-trigger,.resize-expand-trigger{background:#eee;overflow:auto}.resize-contract-trigger:before{width:200%;height:200%}";
  18410. var total = 0;
  18411. var esm_style = null;
  18412. function addListener(elem, callback) {
  18413. if (!elem.__resize_mutation_handler__) {
  18414. elem.__resize_mutation_handler__ = handleMutation.bind(elem);
  18415. }
  18416. var listeners = elem.__resize_listeners__;
  18417. if (!listeners) {
  18418. elem.__resize_listeners__ = [];
  18419. if (window.ResizeObserver) {
  18420. var offsetWidth = elem.offsetWidth,
  18421. offsetHeight = elem.offsetHeight;
  18422. var ro = new ResizeObserver(function () {
  18423. if (!elem.__resize_observer_triggered__) {
  18424. elem.__resize_observer_triggered__ = true;
  18425. if (elem.offsetWidth === offsetWidth && elem.offsetHeight === offsetHeight) {
  18426. return;
  18427. }
  18428. }
  18429. runCallbacks(elem);
  18430. }); // initially display none won't trigger ResizeObserver callback
  18431. var _getRenderInfo = getRenderInfo(elem),
  18432. detached = _getRenderInfo.detached,
  18433. rendered = _getRenderInfo.rendered;
  18434. elem.__resize_observer_triggered__ = detached === false && rendered === false;
  18435. elem.__resize_observer__ = ro;
  18436. ro.observe(elem);
  18437. } else if (elem.attachEvent && elem.addEventListener) {
  18438. // targeting IE9/10
  18439. elem.__resize_legacy_resize_handler__ = function handleLegacyResize() {
  18440. runCallbacks(elem);
  18441. };
  18442. elem.attachEvent('onresize', elem.__resize_legacy_resize_handler__);
  18443. document.addEventListener('DOMSubtreeModified', elem.__resize_mutation_handler__);
  18444. } else {
  18445. if (!total) {
  18446. esm_style = createStyles(css);
  18447. }
  18448. initTriggers(elem);
  18449. elem.__resize_rendered__ = getRenderInfo(elem).rendered;
  18450. if (window.MutationObserver) {
  18451. var mo = new MutationObserver(elem.__resize_mutation_handler__);
  18452. mo.observe(document, {
  18453. attributes: true,
  18454. childList: true,
  18455. characterData: true,
  18456. subtree: true
  18457. });
  18458. elem.__resize_mutation_observer__ = mo;
  18459. }
  18460. }
  18461. }
  18462. elem.__resize_listeners__.push(callback);
  18463. total++;
  18464. }
  18465. function removeListener(elem, callback) {
  18466. var listeners = elem.__resize_listeners__;
  18467. if (!listeners) {
  18468. return;
  18469. }
  18470. if (callback) {
  18471. listeners.splice(listeners.indexOf(callback), 1);
  18472. } // no listeners exist, or removing all listeners
  18473. if (!listeners.length || !callback) {
  18474. // targeting IE9/10
  18475. if (elem.detachEvent && elem.removeEventListener) {
  18476. elem.detachEvent('onresize', elem.__resize_legacy_resize_handler__);
  18477. document.removeEventListener('DOMSubtreeModified', elem.__resize_mutation_handler__);
  18478. return;
  18479. }
  18480. if (elem.__resize_observer__) {
  18481. elem.__resize_observer__.unobserve(elem);
  18482. elem.__resize_observer__.disconnect();
  18483. elem.__resize_observer__ = null;
  18484. } else {
  18485. if (elem.__resize_mutation_observer__) {
  18486. elem.__resize_mutation_observer__.disconnect();
  18487. elem.__resize_mutation_observer__ = null;
  18488. }
  18489. elem.removeEventListener('scroll', handleScroll);
  18490. elem.removeChild(elem.__resize_triggers__.triggers);
  18491. elem.__resize_triggers__ = null;
  18492. }
  18493. elem.__resize_listeners__ = null;
  18494. }
  18495. if (! --total && esm_style) {
  18496. esm_style.parentNode.removeChild(esm_style);
  18497. }
  18498. }
  18499. function getUpdatedSize(elem) {
  18500. var _elem$__resize_last__ = elem.__resize_last__,
  18501. width = _elem$__resize_last__.width,
  18502. height = _elem$__resize_last__.height;
  18503. var offsetWidth = elem.offsetWidth,
  18504. offsetHeight = elem.offsetHeight;
  18505. if (offsetWidth !== width || offsetHeight !== height) {
  18506. return {
  18507. width: offsetWidth,
  18508. height: offsetHeight
  18509. };
  18510. }
  18511. return null;
  18512. }
  18513. function handleMutation() {
  18514. // `this` denotes the scrolling element
  18515. var _getRenderInfo2 = getRenderInfo(this),
  18516. rendered = _getRenderInfo2.rendered,
  18517. detached = _getRenderInfo2.detached;
  18518. if (rendered !== this.__resize_rendered__) {
  18519. if (!detached && this.__resize_triggers__) {
  18520. resetTriggers(this);
  18521. this.addEventListener('scroll', handleScroll, true);
  18522. }
  18523. this.__resize_rendered__ = rendered;
  18524. runCallbacks(this);
  18525. }
  18526. }
  18527. function handleScroll() {
  18528. var _this = this;
  18529. // `this` denotes the scrolling element
  18530. resetTriggers(this);
  18531. if (this.__resize_raf__) {
  18532. cancelAnimationFrame(this.__resize_raf__);
  18533. }
  18534. this.__resize_raf__ = requestAnimationFrame(function () {
  18535. var updated = getUpdatedSize(_this);
  18536. if (updated) {
  18537. _this.__resize_last__ = updated;
  18538. runCallbacks(_this);
  18539. }
  18540. });
  18541. }
  18542. function runCallbacks(elem) {
  18543. if (!elem || !elem.__resize_listeners__) {
  18544. return;
  18545. }
  18546. elem.__resize_listeners__.forEach(function (callback) {
  18547. callback.call(elem);
  18548. });
  18549. }
  18550. function initTriggers(elem) {
  18551. var position = getComputedStyle(elem, 'position');
  18552. if (!position || position === 'static') {
  18553. elem.style.position = 'relative';
  18554. }
  18555. elem.__resize_old_position__ = position;
  18556. elem.__resize_last__ = {};
  18557. var triggers = createElement('div', {
  18558. className: 'resize-triggers'
  18559. });
  18560. var expand = createElement('div', {
  18561. className: 'resize-expand-trigger'
  18562. });
  18563. var expandChild = createElement('div');
  18564. var contract = createElement('div', {
  18565. className: 'resize-contract-trigger'
  18566. });
  18567. expand.appendChild(expandChild);
  18568. triggers.appendChild(expand);
  18569. triggers.appendChild(contract);
  18570. elem.appendChild(triggers);
  18571. elem.__resize_triggers__ = {
  18572. triggers: triggers,
  18573. expand: expand,
  18574. expandChild: expandChild,
  18575. contract: contract
  18576. };
  18577. resetTriggers(elem);
  18578. elem.addEventListener('scroll', handleScroll, true);
  18579. elem.__resize_last__ = {
  18580. width: elem.offsetWidth,
  18581. height: elem.offsetHeight
  18582. };
  18583. }
  18584. function resetTriggers(elem) {
  18585. var _elem$__resize_trigge = elem.__resize_triggers__,
  18586. expand = _elem$__resize_trigge.expand,
  18587. expandChild = _elem$__resize_trigge.expandChild,
  18588. contract = _elem$__resize_trigge.contract; // batch read
  18589. var csw = contract.scrollWidth,
  18590. csh = contract.scrollHeight;
  18591. var eow = expand.offsetWidth,
  18592. eoh = expand.offsetHeight,
  18593. esw = expand.scrollWidth,
  18594. esh = expand.scrollHeight; // batch write
  18595. contract.scrollLeft = csw;
  18596. contract.scrollTop = csh;
  18597. expandChild.style.width = eow + 1 + 'px';
  18598. expandChild.style.height = eoh + 1 + 'px';
  18599. expand.scrollLeft = esw;
  18600. expand.scrollTop = esh;
  18601. }
  18602. // EXTERNAL MODULE: ./node_modules/lodash.debounce/index.js
  18603. var lodash_debounce = __webpack_require__(18);
  18604. var lodash_debounce_default = /*#__PURE__*/__webpack_require__.n(lodash_debounce);
  18605. // EXTERNAL MODULE: ./node_modules/lodash.capitalize/index.js
  18606. var lodash_capitalize = __webpack_require__(12);
  18607. var lodash_capitalize_default = /*#__PURE__*/__webpack_require__.n(lodash_capitalize);
  18608. // EXTERNAL MODULE: ./node_modules/lodash.upperfirst/index.js
  18609. var lodash_upperfirst = __webpack_require__(19);
  18610. var lodash_upperfirst_default = /*#__PURE__*/__webpack_require__.n(lodash_upperfirst);
  18611. // EXTERNAL MODULE: external "antd"
  18612. var external_antd_ = __webpack_require__(9);
  18613. // EXTERNAL MODULE: ./node_modules/lodash.get/index.js
  18614. var lodash_get = __webpack_require__(13);
  18615. var lodash_get_default = /*#__PURE__*/__webpack_require__.n(lodash_get);
  18616. // EXTERNAL MODULE: ./node_modules/lodash.isequal/index.js
  18617. var lodash_isequal = __webpack_require__(4);
  18618. var lodash_isequal_default = /*#__PURE__*/__webpack_require__.n(lodash_isequal);
  18619. // EXTERNAL MODULE: ./node_modules/events/events.js
  18620. var events = __webpack_require__(8);
  18621. // CONCATENATED MODULE: ./src/mapboxgl/web-map/SourceModel.js
  18622. var SourceModel_SourceModel=/*#__PURE__*/function(){function SourceModel(options){_classCallCheck(this,SourceModel);this.id=options.source;this.sourceLayerList={};this.layers=[];this.type=null;}_createClass(SourceModel,[{key:"addLayer",value:function addLayer(layer,sourceLayer){if(sourceLayer){if(!this.sourceLayerList[sourceLayer]){this.sourceLayerList[sourceLayer]=[];}this.sourceLayerList[sourceLayer].push(layer);}else{this.sourceLayerList=undefined;}this.layers.push(layer);this.type=layer.type;if([layer.visibility,this.visibility].includes('visible')){this.visibility='visible';}else{this.visibility='none';}}}]);return SourceModel;}();/* harmony default export */ var web_map_SourceModel = (SourceModel_SourceModel);
  18623. // CONCATENATED MODULE: ./src/mapboxgl/web-map/LayerModel.js
  18624. /**
  18625. * @class LayerModel
  18626. * @description 图层数据模型。
  18627. * @param {Object} options - 图层参数。
  18628. * @param {String} [options.id] - 图层 ID。
  18629. * @param {Number} [options.maxzoom] - 最大缩放级别。
  18630. * @param {Number} [options.minzoom] - 最小缩放级别。
  18631. * @param {GeoJSONObject} [options.source] - 数据源。
  18632. * @param {String} [options.type] - 图层类型。
  18633. * @param {String} [options.visibility] - 图层是否可见。
  18634. * @category Model
  18635. */var LayerModel_LayerModel=function LayerModel(){var options=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,LayerModel);this.id=options.id;this.maxzoom=options.maxzoom;this.minzoom=options.minzoom;this.source=options.source;this.type=options.type;this.visibility=options.visibility||'visible';};/* harmony default export */ var web_map_LayerModel = (LayerModel_LayerModel);
  18636. // CONCATENATED MODULE: ./src/mapboxgl/web-map/SourceListModel.js
  18637. var SourceListModel_SourceListModel=/*#__PURE__*/function(){function SourceListModel(options){_classCallCheck(this,SourceListModel);this.map=options.map;this.style=this.map.getStyle();this.layers=this.map.getStyle().layers;this.overlayLayers=this.map.overlayLayersManager;this.detailLayers=null;this.sourceList={};this.sourceNames=[];this._initLayers();this._initSource();this.excludeSourceNames=['tdt-search-','tdt-route-','smmeasure','mapbox-gl-draw'];}_createClass(SourceListModel,[{key:"getSourceList",value:function getSourceList(){var sourceList={};for(var key in this.sourceList){if(key&&this.excludeSource(key)){sourceList[key]=this.sourceList[key];}}return sourceList;}},{key:"getSourceNames",value:function getSourceNames(){var _this=this;var names=[];this.sourceNames.forEach(function(element){if(element&&_this.excludeSource(element)){names.push(element);}});return names;}},{key:"excludeSource",value:function excludeSource(key){for(var i=0;i<this.excludeSourceNames.length;i++){if(key.indexOf(this.excludeSourceNames[i])>=0){return false;}}return true;}},{key:"getLegendStyle",value:function getLegendStyle(sourceName){if(sourceName){return this.sourceList[sourceName]?this.sourceList[sourceName].style:'';}var sourceList=Object.values(this.sourceList)||[];var styles=sourceList.filter(function(item){return!!item.style;});return styles;}},{key:"getLayers",value:function getLayers(){return this.detailLayers;}},{key:"getLayersBySourceLayer",value:function getLayersBySourceLayer(sourceName,sourceLayer){return this.sourceList[sourceName]['sourceLayerList'][sourceLayer];}},{key:"getSourceLayersBySource",value:function getSourceLayersBySource(sourceName){return this.sourceList[sourceName]['sourceLayerList'];}},{key:"addSourceStyle",value:function addSourceStyle(sourceName,sourceStyle){if(this.sourceList[sourceName]){this.sourceList[sourceName]['style']=sourceStyle;}}},{key:"_initLayers",value:function _initLayers(){var _this2=this;this.layers&&(this.detailLayers=this.layers.map(function(layer){return _this2.map.getLayer(layer.id);}));var overLayerList=Object.values(this.overlayLayers);overLayerList.forEach(function(overlayer){if(overlayer.id){_this2.detailLayers.push({id:overlayer.id,visibility:overlayer.visibility?'visible':'none',source:overlayer.id});}});}},{key:"_initSource",value:function _initSource(){var _this3=this;this.detailLayers&&this.detailLayers.forEach(function(layer){if(!_this3.sourceList[layer['source']]){_this3.sourceList[layer['source']]=new web_map_SourceModel({source:layer['source']});_this3.sourceNames.push(layer['source']);}_this3.sourceList[layer['source']].addLayer(new web_map_LayerModel(layer),layer['sourceLayer']);});}}]);return SourceListModel;}();/* harmony default export */ var web_map_SourceListModel = (SourceListModel_SourceListModel);
  18638. // EXTERNAL MODULE: ./src/common/_utils/style/theme/theme.json
  18639. var theme = __webpack_require__(40);
  18640. // CONCATENATED MODULE: ./src/common/_utils/global-event.ts
  18641. var global_event_GlobalEvent=/*#__PURE__*/function(_EventEmitter){_inherits(GlobalEvent,_EventEmitter);function GlobalEvent(){var _this;var themValue=arguments.length>0&&arguments[0]!==undefined?arguments[0]:theme[1];_classCallCheck(this,GlobalEvent);_this=_possibleConstructorReturn(this,_getPrototypeOf(GlobalEvent).call(this));_this._theme=void 0;_this._theme=themValue;return _this;}_createClass(GlobalEvent,[{key:"theme",get:function get(){return this._theme;},set:function set(themValue){this._theme=themValue;}}]);return GlobalEvent;}(events["EventEmitter"]);/* harmony default export */ var global_event = (new global_event_GlobalEvent());
  18642. // CONCATENATED MODULE: ./src/mapboxgl/_types/map-event.ts
  18643. var map_event_MapEvent=/*#__PURE__*/function(_EventEmitter){_inherits(MapEvent,_EventEmitter);function MapEvent(){var _getPrototypeOf2;var _this;_classCallCheck(this,MapEvent);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_possibleConstructorReturn(this,(_getPrototypeOf2=_getPrototypeOf(MapEvent)).call.apply(_getPrototypeOf2,[this].concat(args)));_this.mapCache={};_this.webMapCache={};return _this;}_createClass(MapEvent,[{key:"getMap",value:function getMap(mapTarget){return this.mapCache[mapTarget];}},{key:"getWebMap",value:function getWebMap(webmapTarget){return this.webMapCache[webmapTarget];}},{key:"getAllMaps",value:function getAllMaps(){return this.mapCache;}},{key:"getAllWebMap",value:function getAllWebMap(){return this.webMapCache;}},{key:"setMap",value:function setMap(mapTarget,map){this.mapCache[mapTarget]=map;}},{key:"setWebMap",value:function setWebMap(webmapTarget,webmap){this.webMapCache[webmapTarget]=webmap;}},{key:"deleteMap",value:function deleteMap(mapTarget){global_event.emit('delete-map',mapTarget);// drawEvent.$options.deletDrawOfMap(mapTarget);
  18644. delete this.mapCache[mapTarget];}},{key:"deleteWebMap",value:function deleteWebMap(webmapTarget){delete this.webMapCache[webmapTarget];}},{key:"getMapSource",value:function getMapSource(mapTarget){var sources=[];var map=this.getMap(mapTarget);if(map){var sourceListModel=new web_map_SourceListModel({map:map});var sourceList=sourceListModel.getSourceList();for(var key in sourceList){if(key){var layers=sourceList[key].layers||[];layers.forEach(function(item){if(item.source&&item.type!=='raster'){sources.push(item.source);}});}}}return sources;}}]);return MapEvent;}(events["EventEmitter"]);/* harmony default export */ var map_event = (new map_event_MapEvent());
  18645. // EXTERNAL MODULE: external {"root":"mapboxgl","commonjs":"../public/libs/mapboxgl/mapbox-gl-enhance.js","commonjs2":"../public/libs/mapboxgl/mapbox-gl-enhance.js","amd":"../public/libs/mapboxgl/mapbox-gl-enhance.js"}
  18646. var mapbox_gl_enhance_js_ = __webpack_require__(0);
  18647. var mapbox_gl_enhance_js_default = /*#__PURE__*/__webpack_require__.n(mapbox_gl_enhance_js_);
  18648. // CONCATENATED MODULE: ./src/mapboxgl/_utils/geometry-util.js
  18649. var handleMultyPolygon=function handleMultyPolygon(features){features.forEach(function(feature){if(feature.geometry.type!=='Polygon'){return;}var coords=feature.geometry.coordinates;if(coords.length>1){var coordinates=[];coords.forEach(function(coord){coordinates.push([coord]);});feature.geometry.coordinates=coordinates;feature.geometry.type='MultiPolygon';}});return features;};
  18650. // EXTERNAL MODULE: ./node_modules/colorcolor/src/colorcolor.js
  18651. var colorcolor = __webpack_require__(10);
  18652. var colorcolor_default = /*#__PURE__*/__webpack_require__.n(colorcolor);
  18653. // CONCATENATED MODULE: ./src/common/_utils/util.js
  18654. // 获取当前时间返回置顶格式
  18655. // export function getDateTime(timeType) {
  18656. // return geti18n().d(new Date(), timeType.replace(/\+/g, '_'), getLanguage());
  18657. // }
  18658. // hex -> rgba
  18659. function hexToRgba(hex,opacity){return'rgba('+parseInt('0x'+hex.slice(1,3))+','+parseInt('0x'+hex.slice(3,5))+','+parseInt('0x'+hex.slice(5,7))+','+opacity+')';}// export function isTransparent(color) {
  18660. // const rgba = colorcolor(color, 'rgba');
  18661. // return +rgba.match(/(\d(\.\d+)?)+/g)[3] === 0;
  18662. // }
  18663. // 保留指定位数的小数
  18664. function reservedDecimal(val,precise){return Number(val).toFixed(precise);}// 清除数字(字符串型的)的逗号
  18665. function clearNumberComma(num){if(num.replace){num=num.replace(/,/g,'');}return num;}/**
  18666. * 判断是否地理X坐标
  18667. * @param data
  18668. */function isXField(data){var lowerdata=data.toLowerCase();return lowerdata==='x'||lowerdata==='smx'||lowerdata==='jd'||lowerdata==='经度'||lowerdata==='东经'||lowerdata==='longitude'||lowerdata==='lot'||lowerdata==='lon'||lowerdata==='lng'||lowerdata==='x坐标';}/**
  18669. * 判断是否地理Y坐标
  18670. * @param data
  18671. */function isYField(data){var lowerdata=data.toLowerCase();return lowerdata==='y'||lowerdata==='smy'||lowerdata==='wd'||lowerdata==='纬度'||lowerdata==='北纬'||lowerdata==='latitude'||lowerdata==='lat'||lowerdata==='y坐标';}function getColorWithOpacity(color,opacity){if(color.indexOf('rgba')>-1){return color.substring(0,color.lastIndexOf(',')+1)+opacity+')';}var newColor=colorcolor_default()(color,'rgb');return'rgba'+newColor.substring(3,newColor.length-1)+",".concat(opacity,")");}var HOOKS=['loaded','removed'];function callHook(instanceRef,hook,map){HOOKS.includes(hook)&&instanceRef[hook]&&typeof instanceRef[hook]==='function'&&instanceRef[hook](map);}function getComponentInstance(ref){this.instanceRef=ref;}function isFunction(event){return Object.prototype.toString.call(event)==='[object Function]';}function getFirstMapTarget(maps){var firstTarget;for(var key in maps){if(!!key){firstTarget=key;break;}}return firstTarget;}
  18672. // EXTERNAL MODULE: external {"root":"SuperMap","commonjs":"../public/libs/iclient-mapboxgl/iclient-mapboxgl.min.js","commonjs2":"../public/libs/iclient-mapboxgl/iclient-mapboxgl.min.js","amd":"../public/libs/iclient-mapboxgl/iclient-mapboxgl.min.js"}
  18673. var iclient_mapboxgl_min_js_ = __webpack_require__(6);
  18674. // EXTERNAL MODULE: ./public/libs/geostats/geostats.js
  18675. var geostats = __webpack_require__(55);
  18676. // EXTERNAL MODULE: ./public/libs/json-sql/jsonsql.js
  18677. var jsonsql = __webpack_require__(56);
  18678. // EXTERNAL MODULE: ./node_modules/xml-js/lib/index.js
  18679. var lib = __webpack_require__(41);
  18680. // EXTERNAL MODULE: ./node_modules/canvg/dist/browser/canvg.min.js
  18681. var canvg_min = __webpack_require__(42);
  18682. var canvg_min_default = /*#__PURE__*/__webpack_require__.n(canvg_min);
  18683. // EXTERNAL MODULE: external "echarts"
  18684. var external_echarts_ = __webpack_require__(20);
  18685. var external_echarts_default = /*#__PURE__*/__webpack_require__.n(external_echarts_);
  18686. // EXTERNAL MODULE: external {"root":"EchartsLayer","commonjs":"../public/libs/echarts-layer/EchartsLayer.js","commonjs2":"../public/libs/echarts-layer/EchartsLayer.js","amd":"../public/libs/echarts-layer/EchartsLayer.js"}
  18687. var EchartsLayer_js_ = __webpack_require__(21);
  18688. var EchartsLayer_js_default = /*#__PURE__*/__webpack_require__.n(EchartsLayer_js_);
  18689. // EXTERNAL MODULE: ./src/mapboxgl/web-map/config/ProvinceCenter.json
  18690. var ProvinceCenter = __webpack_require__(43);
  18691. // EXTERNAL MODULE: ./src/mapboxgl/web-map/config/MunicipalCenter.json
  18692. var MunicipalCenter = __webpack_require__(44);
  18693. // EXTERNAL MODULE: ./node_modules/lodash.uniqueid/index.js
  18694. var lodash_uniqueid = __webpack_require__(22);
  18695. var lodash_uniqueid_default = /*#__PURE__*/__webpack_require__.n(lodash_uniqueid);
  18696. // EXTERNAL MODULE: ./node_modules/lodash.clonedeep/index.js
  18697. var lodash_clonedeep = __webpack_require__(23);
  18698. var lodash_clonedeep_default = /*#__PURE__*/__webpack_require__.n(lodash_clonedeep);
  18699. // CONCATENATED MODULE: ./src/mapboxgl/web-map/WebMapViewModel.ts
  18700. /* eslint-disable */ /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  18701. * This program are made available under the terms of the Apache License, Version 2.0
  18702. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html. */// eslint-disable-line import/extensions
  18703. // eslint-disable-line import/extensions
  18704. var MB_SCALEDENOMINATOR_3857=['559082264.0287178','279541132.0143589','139770566.0071794','69885283.00358972','34942641.50179486','17471320.75089743','8735660.375448715','4367830.1877224357','2183915.093862179','1091957.546931089','545978.7734655447','272989.7734655447','272989.3867327723','136494.6933663862','68247.34668319309','34123.67334159654','17061.83667079827','8530.918335399136','4265.459167699568','2132.729583849784'];var MB_SCALEDENOMINATOR_4326=['5.590822640287176E8','2.795411320143588E8','1.397705660071794E8','6.98852830035897E7','3.494264150179485E7','1.7471320750897426E7','8735660.375448713','4367830.187724357','2183915.0938621783','1091957.5469310891','545978.7734655446','272989.3867327723','136494.69336638614','68247.34668319307','34123.673341596535','17061.836670798268','8530.918335399134'];var DEFAULT_WELLKNOWNSCALESET=['GoogleCRS84Quad','GoogleMapsCompatible','GlobalCRS84Scale'];// 迁徙图最大支持要素数量
  18705. var MAX_MIGRATION_ANIMATION_COUNT=1000;/**
  18706. * @class WebMapViewModel
  18707. * @category ViewModel
  18708. * @classdesc 对接 iPortal/Online 地图类。目前支持地图坐标系包括:'EPSG:3857','EPSG:4326','EPSG:4490','EPSG:4214','EPSG:4610'。
  18709. * @param {number} id - iPortal|Online 地图 ID。
  18710. * @param {Object} options - 参数。
  18711. * @param {string} [options.target='map'] - 地图容器 ID。
  18712. * @param {string} [options.serverUrl="http://www.supermapol.com"] - SuperMap iPortal/Online 服务器地址。当设置 `id` 时有效。
  18713. * @param {string} [options.accessToken] - 用于访问 SuperMap iPortal 、SuperMap Online 中受保护的服务。当设置 `id` 时有效。
  18714. * @param {string} [options.accessKey] - SuperMap iServer 提供的一种基于 Token(令牌)的用户身份验证机制。当设置 `id` 时有效。
  18715. * @param {String} [options.tiandituKey] - 用于访问天地图的服务。当设置 `id` 时有效。
  18716. * @param {boolean} [options.withCredentials=false] - 请求是否携带 cookie。当设置 `id` 时有效。
  18717. * @param {boolean} [options.excludePortalProxyUrl] - server 传递过来的 URL 是否带有代理。当设置 `id` 时有效。
  18718. * @fires WebMapViewModel#mapinitialized
  18719. * @fires WebMapViewModel#getmapinfofailed
  18720. * @fires WebMapViewModel#getwmtsinfofailed
  18721. * @fires WebMapViewModel#getlayerdatasourcefailed
  18722. * @fires WebMapViewModel#addlayerssucceeded
  18723. */var WebMapViewModel_WebMapViewModel=/*#__PURE__*/function(_mapboxgl$Evented){_inherits(WebMapViewModel,_mapboxgl$Evented);// on: any;
  18724. // fire: any;
  18725. function WebMapViewModel(id){var _this;var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var mapOptions=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{style:{version:8,sources:{},layers:[]}};_classCallCheck(this,WebMapViewModel);_this=_possibleConstructorReturn(this,_getPrototypeOf(WebMapViewModel).call(this));_this.map=void 0;_this.mapId=void 0;_this.mapOptions=void 0;_this.serverUrl=void 0;_this.accessToken=void 0;_this.accessKey=void 0;_this.tiandituKey=void 0;_this.withCredentials=void 0;_this.target=void 0;_this.excludePortalProxyUrl=void 0;_this.center=void 0;_this.zoom=void 0;_this.mapParams={};_this.baseProjection=void 0;_this.echartslayer=[];_this._sourceListModel=void 0;_this._legendList=void 0;_this._layers=[];_this._svgDiv=void 0;_this._fieldMaxValue=void 0;_this._taskID=void 0;_this.layerAdded=void 0;_this._handleDataflowFeaturesCallback=void 0;_this._dataflowService=void 0;_this.mapId=id;_this.mapOptions=Object.assign({style:{version:8,sources:{},layers:[]}},mapOptions);_this.serverUrl=options.serverUrl||'http://www.supermapol.com';_this.accessToken=options.accessToken;_this.accessKey=options.accessKey;_this.tiandituKey=options.tiandituKey||'';_this.withCredentials=options.withCredentials||false;_this.target=options.target||'map';_this.excludePortalProxyUrl=options.excludePortalProxyUrl;_this.center=mapOptions.center||[];_this.zoom=mapOptions.zoom;_this.echartslayer=[];_this._createWebMap();return _this;}/**
  18726. * @function WebMapViewModel.prototype.resize
  18727. * @description Map 更新大小。
  18728. */_createClass(WebMapViewModel,[{key:"resize",value:function resize(){this.map&&this.map.resize();this.echartsLayerResize();}/**
  18729. * @function WebMapViewModel.prototype.EchartsLayerResize
  18730. * @description echartslayer 更新大小。
  18731. */},{key:"echartsLayerResize",value:function echartsLayerResize(){this.echartslayer.forEach(function(echartslayer){echartslayer.chart.resize();});}/**
  18732. * @function WebMapViewModel.prototype.setMapId
  18733. * @description 设置地图 ID。
  18734. * @param {String} mapId - iPortal|Online 地图 ID。
  18735. */},{key:"setMapId",value:function setMapId(mapId){var _this2=this;this.mapId=mapId;setTimeout(function(){_this2._createWebMap();},0);}/**
  18736. * @function WebMapViewModel.prototype.setServerUrl
  18737. * @description 设置地图的地址。
  18738. * @param {string} options.serverUrl - 地图的地址。
  18739. */},{key:"setServerUrl",value:function setServerUrl(serverUrl){this.serverUrl=serverUrl;}},{key:"setWithCredentials",value:function setWithCredentials(withCredentials){this.withCredentials=withCredentials;}/**
  18740. * @function WebMapViewModel.prototype.setCRS
  18741. * @description 设置地图的投影。
  18742. * @param {Number} crs - 地图投影。
  18743. */},{key:"setCrs",value:function setCrs(crs){if(this.map){this.mapOptions.crs=crs;//@ts-ignore
  18744. crs&&this.map.setCRS(mapbox_gl_enhance_js_default.a.CRS.get(crs));}}/**
  18745. * @function WebMapViewModel.prototype.setZoom
  18746. * @description 设置地图的缩放级别。
  18747. * @param {Number} zoom - 地图缩放级别。
  18748. */},{key:"setZoom",value:function setZoom(zoom){if(this.map){this.mapOptions.zoom=zoom;(zoom||zoom===0)&&this.map.setZoom(zoom);}}/**
  18749. * @function WebMapViewModel.prototype.setCenter
  18750. * @description 设置地图的中心点。
  18751. * @param {Array} center - 地图中心点。
  18752. */},{key:"setCenter",value:function setCenter(center){if(this.map){this.mapOptions.center=center;center&&center.length>0&&this.map.setCenter(center);}}/**
  18753. * @function WebMapViewModel.prototype.setMaxBounds
  18754. * @description 设置地图的最大范围。
  18755. * @param {Array} maxBounds - 地图最大范围。
  18756. */},{key:"setMaxBounds",value:function setMaxBounds(maxBounds){if(this.map){this.mapOptions.maxBounds=maxBounds;maxBounds&&maxBounds.length>0&&this.map.setMaxBounds(maxBounds);}}/**
  18757. * @function WebMapViewModel.prototype.setMinZoom
  18758. * @description 设置地图的最小级别。
  18759. * @param {Number} minZoom - 地图最小级别。
  18760. */},{key:"setMinZoom",value:function setMinZoom(minZoom){if(this.map){this.mapOptions.minZoom=minZoom;(minZoom||minZoom===0)&&this.map.setMinZoom(minZoom);}}/**
  18761. * @function WebMapViewModel.prototype.setMaxZoom
  18762. * @description 设置地图的最大级别。
  18763. * @param {Number} maxZoom - 地图最大级别。
  18764. */},{key:"setMaxZoom",value:function setMaxZoom(maxZoom){if(this.map){this.mapOptions.maxZoom=maxZoom;(maxZoom||maxZoom===0)&&this.map.setMinZoom(maxZoom);}}/**
  18765. * @function WebMapViewModel.prototype.setRenderWorldCopies
  18766. * @description 设置地图的平铺。
  18767. * @param {Boolean} renderWorldCopies - 地图是否平铺。
  18768. */},{key:"setRenderWorldCopies",value:function setRenderWorldCopies(renderWorldCopies){if(this.map){this.mapOptions.renderWorldCopies=renderWorldCopies;renderWorldCopies&&this.map.setRenderWorldCopies(renderWorldCopies);}}/**
  18769. * @function WebMapViewModel.prototype.setBearing
  18770. * @description 设置地图的方位。
  18771. * @param {Number} bearing - 地图的初始方位。
  18772. */},{key:"setBearing",value:function setBearing(bearing){if(this.map){this.mapOptions.bearing=bearing;(bearing||bearing===0)&&this.map.setBearing(bearing);}}/**
  18773. * @function WebMapViewModel.prototype.setPitch
  18774. * @description 设置地图的俯仰。
  18775. * @param {Number} pitch - 地图的初始俯仰。
  18776. */},{key:"setPitch",value:function setPitch(pitch){if(this.map){this.mapOptions.pitch=pitch;(pitch||pitch===0)&&this.map.setPitch(pitch);}}/**
  18777. * @function WebMapViewModel.prototype.setStyle
  18778. * @description 设置地图的样式。
  18779. * @param {Object} style - 地图的样式。
  18780. */},{key:"setStyle",value:function setStyle(style){if(this.map){this.mapOptions.style=style;style&&this.map.setStyle(style);}}},{key:"_createWebMap",/**
  18781. * @private
  18782. * @function WebMapViewModel.prototype._createWebMap
  18783. * @description 登陆窗口后添加地图图层。
  18784. */value:function _createWebMap(){var _this3=this;if(this.map){this.map.remove();this.center=[];this.zoom=null;this._dataflowService&&this._dataflowService.off('messageSucceeded',this._handleDataflowFeaturesCallback);}if(!this.mapId||!this.serverUrl){this.mapOptions.container=this.target;setTimeout(function(){_this3.map=new mapbox_gl_enhance_js_default.a.Map(_this3.mapOptions);_this3.map.on('load',function(){_this3.fire('addlayerssucceeded',{map:_this3.map,mapparams:{},layers:[]});});},0);return;}this._legendList={};this._taskID=new Date();var urlArr=this.serverUrl.split('');if(urlArr[urlArr.length-1]!=='/'){this.serverUrl+='/';}var mapUrl=this.serverUrl+'web/maps/'+this.mapId+'/map';if(this.accessToken||this.accessKey){mapUrl+= true?'token='+this.accessToken:undefined;}var filter='getUrlResource.json?url=';if(this.excludePortalProxyUrl&&this.serverUrl.indexOf(filter)>-1){// 大屏需求,或者有加上代理的
  18785. var urlArray=this.serverUrl.split(filter);if(urlArray.length>1){mapUrl=urlArray[0]+filter+this.serverUrl+'web/maps/'+this.mapId+'/map.json';}}this._getMapInfo(mapUrl,this._taskID);}/**
  18786. * @private
  18787. * @function WebMapViewModel.prototype._createMap
  18788. * @description 创建地图。
  18789. */},{key:"_createMap",value:function _createMap(mapInfo){// 获取字体样式
  18790. var fonts=[];var layers=mapInfo.layers;// 获取 label 图层字体类型
  18791. if(layers&&layers.length>0){layers.forEach(function(layer){layer.labelStyle&&fonts.push(layer.labelStyle.fontFamily);},this);}fonts.push("'supermapol-icons'");var fontFamilys=fonts.join(',');// zoom
  18792. var center;center=mapInfo.center&&[mapInfo.center.x,mapInfo.center.y];// center
  18793. var zoom=mapInfo.level||0;zoom=zoom===0?0:zoom-1;if(!center){center=[0,0];}if(this.baseProjection==='EPSG:3857'){center=this._unproject(center);}center=new mapbox_gl_enhance_js_default.a.LngLat(center[0],center[1]);// 初始化 map
  18794. this.map=new mapbox_gl_enhance_js_default.a.Map({container:this.target,center:this.center.length?this.center:center,zoom:this.zoom||zoom,style:{version:8,sources:{},// "glyphs": 'http://iclsvr.supermap.io/iserver/services/map-beijing/rest/maps/beijingMap/tileFeature/sdffonts/{fontstack}/{range}.pbf',
  18795. layers:[]},// @ts-ignore -------- crs 为 enhance 新加属性
  18796. crs:this.baseProjection,localIdeographFontFamily:fontFamilys||'',renderWorldCopies:false,preserveDrawingBuffer:this.mapOptions.preserveDrawingBuffer||false});/**
  18797. * @event WebMapViewModel#mapinitialized
  18798. * @description Map 初始化成功。
  18799. * @property {mapboxglTypes.Map} map - MapBoxGL Map 对象。
  18800. */this.fire('mapinitialized',{map:this.map});}/**
  18801. * @private
  18802. * @function WebMapViewModel.prototype._getMapInfo
  18803. * @description 获取地图的 JSON 信息。
  18804. * @param {string} url - 请求地图的 url。
  18805. */},{key:"_getMapInfo",value:function _getMapInfo(url,_taskID){var _this4=this;var mapUrl=url.indexOf('.json')===-1?"".concat(url,".json"):url;SuperMap.FetchRequest.get(mapUrl,null,{withCredentials:this.withCredentials}).then(function(response){return response.json();}).then(function(mapInfo){_this4.baseProjection=mapInfo.projection;// 存储地图的名称以及描述等信息,返回给用户
  18806. _this4.mapParams={title:mapInfo.title,description:mapInfo.description};// 坐标系异常处理
  18807. if(mapbox_gl_enhance_js_default.a.CRS.get(_this4.baseProjection)){_this4._createMap(mapInfo);var layers=mapInfo.layers;_this4.map.on('load',function(){if(mapInfo.baseLayer&&mapInfo.baseLayer.layerType==='MAPBOXSTYLE'){// 添加矢量瓦片服务作为底图
  18808. _this4._addMVTBaseMap(mapInfo);}else{_this4._addBaseMap(mapInfo);}if(!layers||layers.length===0){_this4._sendMapToUser(0,0);}else{_this4._addLayers(layers,_taskID);}});}else{throw Error('不支持当前地图的坐标系');}}).catch(function(error){/**
  18809. * @event WebMapViewModel#getmapinfofailed
  18810. * @description 获取地图信息失败。
  18811. * @property {Object} error - 失败原因。
  18812. */_this4.fire('getmapinfofailed',{error:error});});}},{key:"_addMVTBaseMap",value:function _addMVTBaseMap(mapInfo){var baseLayer=mapInfo.baseLayer,url=baseLayer.dataSource.url;// @ts-ignore
  18813. this.map.addStyle(url);}/**
  18814. * @private
  18815. * @function WebMapViewModel.prototype._addBaseMap
  18816. * @description 添加底图。
  18817. * @param {Object} mapInfo - map 信息。
  18818. */},{key:"_addBaseMap",value:function _addBaseMap(mapInfo){this._createBaseLayer(mapInfo);}/**
  18819. * @private
  18820. * @function WebMapViewModel.prototype._createBaseLayer
  18821. * @description 创建底图。
  18822. * @param {Object} mapInfo - map 信息。
  18823. */},{key:"_createBaseLayer",value:function _createBaseLayer(mapInfo){var layerInfo=mapInfo.baseLayer||mapInfo;var layerType=layerInfo.layerType;// 底图和rest地图兼容
  18824. if(layerType.indexOf('TIANDITU_VEC')>-1||layerType.indexOf('TIANDITU_IMG')>-1||layerType.indexOf('TIANDITU_TER')>-1){layerType=layerType.substr(0,12);}var mapUrls={CLOUD:'http://t2.dituhui.com/FileService/image?map=quanguo&type=web&x={x}&y={y}&z={z}',CLOUD_BLACK:'http://t3.dituhui.com/MapService/getGdp?x={x}&y={y}&z={z}',OSM:'http://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png',GOOGLE:'http://www.google.cn/maps/vt/pb=!1m4!1m3!1i{z}!2i{x}!3i{y}!2m3!1e0!2sm!3i380072576!3m8!2szh-CN!3scn!5e1105!12m4!1e68!2m2!1sset!2sRoadmap!4e0!5m1!1e0',GOOGLE_CN:'https://mt{0-3}.google.cn/vt/lyrs=m&hl=zh-CN&gl=cn&x={x}&y={y}&z={z}',JAPAN_STD:'http://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png',JAPAN_PALE:'http://cyberjapandata.gsi.go.jp/xyz/pale/{z}/{x}/{y}.png',JAPAN_RELIEF:'http://cyberjapandata.gsi.go.jp/xyz/relief/{z}/{x}/{y}.png',JAPAN_ORT:'http://cyberjapandata.gsi.go.jp/xyz/ort/{z}/{x}/{y}.jpg'};var url;switch(layerType){case'TIANDITU_VEC':case'TIANDITU_IMG':case'TIANDITU_TER':this._createTiandituLayer(mapInfo);break;case'BING':this._createBingLayer(layerInfo.name);break;case'WMS':this._createWMSLayer(layerInfo);break;case'WMTS':this._createWMTSLayer(layerInfo);break;case'TILE':case'SUPERMAP_REST':this._createDynamicTiledLayer(layerInfo);break;case'CLOUD':case'CLOUD_BLACK':case'OSM':case'JAPAN_ORT':case'JAPAN_RELIEF':case'JAPAN_PALE':case'JAPAN_STD':case'GOOGLE_CN':case'GOOGLE':url=mapUrls[layerType];this._createXYZLayer(layerInfo,url);break;default:break;}}/**
  18825. * @private
  18826. * @function WebMapViewModel.prototype._createTiandituLayer
  18827. * @description 创建天地图底图。
  18828. * @param {Object} mapInfo - map 信息。
  18829. */},{key:"_createTiandituLayer",value:function _createTiandituLayer(mapInfo){var tiandituUrls=this._getTiandituUrl(mapInfo);var layerType=mapInfo.baseLayer.layerType;var isLabel=Boolean(mapInfo.baseLayer.labelLayerVisible);var labelUrl=tiandituUrls['labelUrl'];var tiandituUrl=tiandituUrls['tiandituUrl'];this._addBaselayer(tiandituUrl,'tianditu-layers-'+layerType);isLabel&&this._addBaselayer(labelUrl,'tianditu-label-layers-'+layerType);}/**
  18830. * @private
  18831. * @function WebMapViewModel.prototype._createWMTSLayer
  18832. * @description 创建 WMTS 底图。
  18833. * @param {Object} layerInfo - 地图信息。
  18834. */},{key:"_createWMTSLayer",value:function _createWMTSLayer(layerInfo){var _this5=this;var wmtsUrl=this._getWMTSUrl(layerInfo);this._filterWMTSIsMatched(layerInfo,function(isMatched,matchMaxZoom){isMatched&&_this5._addBaselayer([wmtsUrl],'wmts-layers'+layerInfo.name,0,matchMaxZoom);});}/**
  18835. * @private
  18836. * @function WebMapViewModel.prototype._filterWMTSIsMatched
  18837. * @description 过滤能够跟mapboxgl匹配的wmts服务。
  18838. * @param {Object} mapInfo - map 信息。
  18839. * @callback matchedCallback
  18840. */},{key:"_filterWMTSIsMatched",value:function _filterWMTSIsMatched(mapInfo,matchedCallback){var _this6=this;var isMatched=false;var matchMaxZoom=22;var url=mapInfo.url;var options={withCredentials:false,withoutFormatSuffix:true};SuperMap.FetchRequest.get(url,null,options).then(function(response){return response.text();}).then(function(capabilitiesText){var converts=lib||window.convert;var tileMatrixSet=JSON.parse(converts.xml2json(capabilitiesText,{compact:true,spaces:4})).Capabilities.Contents.TileMatrixSet;for(var i=0;i<tileMatrixSet.length;i++){if(tileMatrixSet[i]['ows:Identifier']&&tileMatrixSet[i]['ows:Identifier']['_text']===mapInfo.tileMatrixSet){if(DEFAULT_WELLKNOWNSCALESET.includes(tileMatrixSet[i]['WellKnownScaleSet']['_text'])){isMatched=true;}else if(tileMatrixSet[i]['WellKnownScaleSet']&&tileMatrixSet[i]['WellKnownScaleSet']['_text']==='Custom'){var matchedScaleDenominator=[];// 坐标系判断
  18841. var defaultCRSScaleDenominators=// @ts-ignore -------- crs 为 enhance 新加属性
  18842. _this6.map.crs==='EPSG:3857'?MB_SCALEDENOMINATOR_3857:MB_SCALEDENOMINATOR_4326;for(var j=0,len=defaultCRSScaleDenominators.length;j<len;j++){if(!tileMatrixSet[i].TileMatrix[j]){break;}if(defaultCRSScaleDenominators[j]!==tileMatrixSet[i].TileMatrix[j]['ScaleDenominator']['_text']){break;}matchedScaleDenominator.push(defaultCRSScaleDenominators[j]);}matchMaxZoom=matchedScaleDenominator.length-1;if(matchedScaleDenominator.length!==0){isMatched=true;}else{throw Error('不支持传入的 TileMatrixSet');}}else{throw Error('不支持传入的 TileMatrixSet');}}}matchedCallback(isMatched,matchMaxZoom);}).catch(function(error){/**
  18843. * @event WebMapViewModel#getwmtsinfofailed
  18844. * @description 获取 WMTS 图层信息失败。
  18845. * @property {Object} error - 失败原因。
  18846. * @property {mapboxglTypes.Map} map - MapBoxGL Map 对象。
  18847. */_this6.fire('getwmtsinfofailed',{error:error,map:_this6.map});});}/**
  18848. * @private
  18849. * @function WebMapViewModel.prototype._createBingLayer
  18850. * @description 创建 Bing 图层。
  18851. */},{key:"_createBingLayer",value:function _createBingLayer(layerName){var bingUrl='http://dynamic.t0.tiles.ditu.live.com/comp/ch/{quadkey}?it=G,TW,L,LA&mkt=zh-cn&og=109&cstl=w4c&ur=CN&n=z';// @ts-ignore
  18852. this._addBaselayer([bingUrl],'bing-layers-'+layerName);}/**
  18853. * @private
  18854. * @function WebMapViewModel.prototype._createXYZLayer
  18855. * @description 创建 XYZ 底图。
  18856. * @param {String} url - url 地址。
  18857. */},{key:"_createXYZLayer",value:function _createXYZLayer(layerInfo,url){var urlArr=[];if(layerInfo.layerType==='OSM'){var res=url.match(/\w\-\w/g)[0];var start=res[0];var end=res[2];var alphabet='';for(var i=97;i<123;i++){alphabet+=String.fromCharCode(i);}var alphabetArr=alphabet.split('');var startIndex=alphabetArr.indexOf(start);var endIndex=alphabetArr.indexOf(end);var res3=alphabetArr.slice(startIndex,endIndex+1);for(var _i=0;_i<res3.length;_i++){var replaceRes=url.replace(/{\w\-\w}/g,res3[_i]);urlArr.push(replaceRes);}}else if(layerInfo.layerType==='GOOGLE_CN'){var _res=url.match(/\d\-\d/g)[0];var _start=parseInt(_res[0]);var _end=parseInt(_res[2]);for(var _i2=_start;_i2<=_end;_i2++){var _replaceRes=url.replace(/{\d\-\d}/g,_i2.toString());urlArr.push(_replaceRes);}}else{urlArr=[url];}this._addBaselayer(urlArr,'XYZ-layers-'+layerInfo.name);}/**
  18858. * @private
  18859. * @function WebMapViewModel.prototype._createDynamicTiledLayer
  18860. * @description 创建 iserver 底图。
  18861. * @param {Object} layerInfo - 图层信息。
  18862. */},{key:"_createDynamicTiledLayer",value:function _createDynamicTiledLayer(layerInfo){var url=layerInfo.url+'/zxyTileImage.png?z={z}&x={x}&y={y}';// @ts-ignore -------- setCRS 为 enhance 新加属性
  18863. if(this.map.setCRS&&this.baseProjection!=='EPSG:3857'){url=layerInfo.url+'/image.png?viewBounds={viewBounds}&width={width}&height={height}';}this._addBaselayer([url],'tile-layers-'+layerInfo.name);}/**
  18864. * @private
  18865. * @function WebMapViewModel.prototype._createWMSLayer
  18866. * @description 创建 WMS 图层。
  18867. * @param {Object} layerInfo - 图层信息。
  18868. */},{key:"_createWMSLayer",value:function _createWMSLayer(layerInfo){var WMSUrl=this._getWMSUrl(layerInfo);this._addBaselayer([WMSUrl],'WMS-layers-'+layerInfo.name);}/**
  18869. * @private
  18870. * @function WebMapViewModel.prototype._createVectorLayer
  18871. * @description 创建 Vector 图层。
  18872. * @param {Object} layerInfo - map 信息。
  18873. * @param {Array} features - 属性 信息。
  18874. */},{key:"_createVectorLayer",value:function _createVectorLayer(layerInfo,features){var style=layerInfo.style;var type=layerInfo.featureType;var layerID=layerInfo.layerID;var visible=layerInfo.visible;var layerStyle={style:this._transformStyleToMapBoxGl(style,type),layout:{visibility:visible}};var source={type:'geojson',data:{type:'FeatureCollection',features:features}};this._addOverlayToMap(type,source,layerID,layerStyle);// 如果面有边框
  18875. type==='POLYGON'&&style.strokeColor&&this._addStrokeLineForPoly(style,source,layerID+'-strokeLine',visible);}/**
  18876. * @function WebMapViewModel.prototype._getTiandituUrl
  18877. * @private
  18878. * @description 创建天地图url;
  18879. * @param {Object} mapInfo - map 信息。
  18880. */},{key:"_getTiandituUrl",value:function _getTiandituUrl(mapInfo){var re=/t0/gi;var tiandituUrls={tiandituUrl:[],labelUrl:[]};var layerType=mapInfo.baseLayer.layerType.split('_')[1].toLowerCase();var isLabel=Boolean(mapInfo.baseLayer.labelLayerVisible);var url="http://t0.tianditu.com/{layer}_{proj}/wmts?tk=".concat(this.tiandituKey);var labelUrl=url;var layerLabelMap={vec:'cva',ter:'cta',img:'cia'};var tilematrixSet=this.baseProjection==='EPSG:4326'?'c':'w';var options={service:'WMTS',request:'GetTile',style:'default',version:'1.0.0',layer:layerType,tilematrixSet:tilematrixSet,format:'tiles',width:256,height:256};url+=this._getParamString(options,url)+'&tilematrix={z}&tilerow={y}&tilecol={x}';var tiandituUrl=url.replace('{layer}',layerType).replace('{proj}',tilematrixSet);var tiandituUrlArr=[];for(var i=0;i<8;i++){tiandituUrlArr.push(tiandituUrl.replace(re,"t".concat(i)));}tiandituUrls['tiandituUrl']=tiandituUrlArr;// 如果有 label 图层
  18881. if(isLabel){var labelLayer=layerLabelMap[layerType];options.layer=labelLayer;labelUrl+=this._getParamString(options,labelUrl)+'&tilematrix={z}&tilerow={y}&tilecol={x}';labelUrl=labelUrl.replace('{layer}',labelLayer).replace('{proj}',tilematrixSet);var labelUrlArr=[];for(var _i3=0;_i3<8;_i3++){labelUrlArr.push(labelUrl.replace(re,"t".concat(_i3)));}tiandituUrls['labelUrl']=labelUrlArr;}return tiandituUrls;}/**
  18882. * @function WebMapViewModel.prototype._getWMSUrl
  18883. * @private
  18884. * @description 创建 WMS url;
  18885. * @param {Object} mapInfo - map 信息。
  18886. */},{key:"_getWMSUrl",value:function _getWMSUrl(mapInfo){var url=mapInfo.url;url=url.split('?')[0];var strArr=url.split('/');var options={service:'WMS',request:'GetMap',layers:strArr[strArr.length-1],styles:'',format:'image/png',transparent:'true',version:'1.1.1',width:256,height:256,srs:this.baseProjection};var bbox=this.baseProjection==='EPSG:4326'?'{bbox-epsg-4326}':'{bbox-epsg-3857}';url+=this._getParamString(options,url)+"&bbox=".concat(bbox);return url;}/**
  18887. * @private
  18888. * @function WebMapViewModel.prototype._checkUploadToRelationship
  18889. * @description 检查是否上传到关系型
  18890. * @param {String} fileId - 文件的id
  18891. * @returns {Promise<T | never>} 关系型文件一些参数
  18892. */},{key:"_checkUploadToRelationship",value:function _checkUploadToRelationship(fileId){return SuperMap.FetchRequest.get("".concat(this.serverUrl,"web/datas/").concat(fileId,"/datasets.json"),null,{withCredentials:this.withCredentials}).then(function(response){return response.json();}).then(function(result){return result;});}/**
  18893. * @private
  18894. * @function ol.supermap.WebMap.prototype._getDataService
  18895. * @description 获取上传的数据信息
  18896. * @param {String} fileId - 文件id
  18897. * @param {String} datasetName 数据服务的数据集名称
  18898. * @returns {Promise<T | never>} 数据的信息
  18899. */},{key:"_getDataService",value:function _getDataService(fileId,datasetName){return SuperMap.FetchRequest.get("".concat(this.serverUrl,"web/datas/").concat(fileId,".json"),null,{withCredentials:this.withCredentials}).then(function(response){return response.json();}).then(function(result){result.fileId=fileId;result.datasetName=datasetName;return result;});}/**
  18900. * @private
  18901. * @function WebMapViewModel.prototype._getService
  18902. * @description 获取当前数据发布的服务中的某种类型服务
  18903. * @param {Array} services 服务集合
  18904. * @param {String} type 服务类型,RESTDATA, RESTMAP
  18905. * @returns {Object} 服务
  18906. */},{key:"_getService",value:function _getService(services,type){var service=services.filter(function(info){return info&&info.serviceType===type;});return service[0];}},{key:"_getServiceInfoFromLayer",value:function _getServiceInfoFromLayer(layerIndex,len,layer,dataItemServices,datasetName,featureType,info){var _this7=this;var isMapService=info?!info.isMvt:layer.layerType==='HOSTED_TILE',isAdded=false;dataItemServices.forEach(function(service,index){if(isAdded){return;}//有服务了,就不需要循环
  18907. if(service&&isMapService&&service.serviceType==='RESTMAP'){isAdded=true;//地图服务,判断使用mvt还是tile
  18908. _this7._getTileLayerInfo(service.address).then(function(restMaps){restMaps.forEach(function(restMapInfo){var bounds=restMapInfo.bounds;layer.layerType='TILE';layer.orginEpsgCode=_this7.baseProjection;layer.units=restMapInfo.coordUnit&&restMapInfo.coordUnit.toLowerCase();layer.extent=[bounds.left,bounds.bottom,bounds.right,bounds.top];layer.visibleScales=restMapInfo.visibleScales;layer.url=restMapInfo.url;layer.sourceType='TILE';_this7._createBaseLayer(layer);_this7.layerAdded++;_this7._sendMapToUser(_this7.layerAdded,len);});});}// TODO 对接 MVT
  18909. else if(service&&!isMapService&&service.serviceType==='RESTDATA'){if(info&&info.isMvt){_this7._addVectorLayer(info,layer,featureType);_this7.layerAdded++;_this7._sendMapToUser(_this7.layerAdded,len);}else{//数据服务
  18910. isAdded=true;//关系型文件发布的数据服务
  18911. _this7._getDatasources(service.address).then(function(datasourceName){layer.dataSource.dataSourceName=datasourceName+':'+datasetName;layer.dataSource.url="".concat(service.address,"/data");_this7._getFeatureBySQL(layer.dataSource.url,[layer.dataSource.dataSourceName||layer.name],function(result){var features=_this7._parseGeoJsonData2Feature({allDatas:{features:result.result.features.features},fileCode:layer.projection,featureProjection:_this7.baseProjection});_this7._addLayer(layer,features,layerIndex);_this7.layerAdded++;_this7._sendMapToUser(_this7.layerAdded,len);},function(err){_this7.layerAdded++;_this7._sendMapToUser(_this7.layerAdded,len);_this7.fire('getlayerdatasourcefailed',{error:err,layer:layer,map:_this7.map});});});}}},this);if(!isAdded){//循环完成了,也没有找到合适的服务。有可能服务被删除
  18912. this.layerAdded++;this._sendMapToUser(this.layerAdded,len);this.fire('getlayerdatasourcefailed',{error:null,layer:layer,map:this.map});}}/**
  18913. * @private
  18914. * @function WebMapViewModel.prototype._getDatasources
  18915. * @description 获取关系型文件发布的数据服务中数据源的名称
  18916. * @param {String} url - 获取数据源信息的url
  18917. * @returns {Promise<T | never>} 数据源名称
  18918. */},{key:"_getDatasources",value:function _getDatasources(url){return SuperMap.FetchRequest.get("".concat(url,"/data/datasources.json")).then(function(response){return response.json();}).then(function(datasource){var datasourceNames=datasource.datasourceNames;return datasourceNames[0];});}/**
  18919. * @private
  18920. * @function WebMapViewModel.prototype._getTileLayerInfo
  18921. * @description 获取地图服务的信息
  18922. * @param {String} url 地图服务的url(没有地图名字)
  18923. * @returns {Promise<T | never>} 地图服务信息
  18924. */},{key:"_getTileLayerInfo",value:function _getTileLayerInfo(url){var _this8=this;var proxyUrl=this.serverUrl+'apps/viewer/getUrlResource.json?url=';var requestUrl=proxyUrl+encodeURIComponent(url);var epsgCode=this.baseProjection.split('EPSG:')[1];return SuperMap.FetchRequest.get("".concat(requestUrl,"/maps.json"),null,{withCredentials:this.withCredentials}).then(function(response){return response.json();}).then(function(mapInfo){var promises=[];if(mapInfo){mapInfo.forEach(function(info){var promise=SuperMap.FetchRequest.get("".concat(proxyUrl).concat(info.path,".json?prjCoordSys=").concat(JSON.stringify({epsgCode:epsgCode})),null,{withCredentials:_this8.withCredentials}).then(function(response){return response.json();}).then(function(restMapInfo){restMapInfo.url=info.path;return restMapInfo;});promises.push(promise);});}return Promise.all(promises).then(function(allRestMaps){return allRestMaps;});});}/**
  18925. * @private
  18926. * @function WebMapViewModel.prototype._addLayers
  18927. * @description 添加叠加图层。
  18928. * @param {Object} mapInfo - 图层信息。
  18929. */},{key:"_addLayers",value:function _addLayers(layers,_taskID){var _this9=this;// 存储地图上所有的图层对象
  18930. this._layers=layers;var features;this.layerAdded=0;var len=layers.length;if(len>0){layers.forEach(function(layer,index){if(layer.dataSource&&layer.dataSource.serverId||layer.layerType==='MARKER'||layer.layerType==='HOSTED_TILE'){//数据存储到iportal上了
  18931. var dataSource=layer.dataSource,serverId=dataSource?dataSource.serverId:layer.serverId;if(!serverId){_this9._addLayer(layer,null,index);_this9.layerAdded++;_this9._sendMapToUser(_this9.layerAdded,len);return;}if(layer.layerType==='MARKER'||dataSource&&(!dataSource.accessType||dataSource.accessType==='DIRECT')){//原来二进制文件
  18932. var url="".concat(_this9.serverUrl,"web/datas/").concat(serverId,"/content.json?pageSize=9999999&currentPage=1");if(_this9.accessToken){url="".concat(url,"&").concat(_this9.accessKey,"=").concat(_this9.accessToken);}SuperMap.FetchRequest.get(url,null,{withCredentials:_this9.withCredentials}).then(function(response){return response.json();}).then(function(data){if(_taskID!==_this9._taskID){return;}if(data.succeed===false){//请求失败
  18933. _this9.layerAdded++;_this9._sendMapToUser(_this9.layerAdded,len);// -----------------------todo-----------------
  18934. _this9.fire('getlayerdatasourcefailed',{error:data.error,layer:layer,map:_this9.map});return;}if(data&&data.type){if(data.type==='JSON'||data.type==='GEOJSON'){data.content=JSON.parse(data.content.trim());features=_this9._formatGeoJSON(data.content);}else if(data.type==='EXCEL'||data.type==='CSV'){features=_this9._excelData2Feature(data.content);}_this9._addLayer(layer,features,index);_this9.layerAdded++;_this9._sendMapToUser(_this9.layerAdded,len);}}).catch(function(error){_this9.layerAdded++;_this9._sendMapToUser(_this9.layerAdded,len);_this9.fire('getlayerdatasourcefailed',{error:error,layer:layer,map:_this9.map});});}else{//关系型文件
  18935. var isMapService=layer.layerType==='HOSTED_TILE',_serverId=dataSource?dataSource.serverId:layer.serverId;_this9._checkUploadToRelationship(_serverId).then(function(result){if(result&&result.length>0){var datasetName=result[0].name,featureType=result[0].type.toUpperCase();_this9._getDataService(_serverId,datasetName).then(function(data){var dataItemServices=data.dataItemServices;if(dataItemServices.length===0){_this9.layerAdded++;_this9._sendMapToUser(_this9.layerAdded,len);_this9.fire('getlayerdatasourcefailed',{error:null,layer:layer,map:_this9.map});return;}if(isMapService){var dataService=dataItemServices.filter(function(info){return info&&info.serviceType==='RESTDATA';})[0];_this9._isMvt(dataService.address,datasetName).then(function(info){_this9._getServiceInfoFromLayer(index,len,layer,dataItemServices,datasetName,featureType,info);}).catch(function(){//判断失败就走之前逻辑,>数据量用tile
  18936. _this9._getServiceInfoFromLayer(index,len,layer,dataItemServices,datasetName,featureType);});}else{_this9._getServiceInfoFromLayer(index,len,layer,dataItemServices,datasetName,featureType);}});}else{_this9.layerAdded++;_this9._sendMapToUser(_this9.layerAdded,len);_this9.fire('getlayerdatasourcefailed',{error:null,layer:layer,map:_this9.map});}}).catch(function(error){_this9.layerAdded++;_this9._sendMapToUser(_this9.layerAdded,len);_this9.fire('getlayerdatasourcefailed',{error:error,layer:layer,map:_this9.map});});}}else if(layer.layerType==='SUPERMAP_REST'||layer.layerType==='TILE'||layer.layerType==='WMS'||layer.layerType==='WMTS'){_this9._createBaseLayer(layer);_this9.layerAdded++;_this9._sendMapToUser(_this9.layerAdded,len);}else if(layer.dataSource&&layer.dataSource.type==='REST_DATA'){//从restData获取数据
  18937. var _dataSource=layer.dataSource;_this9._getFeatureBySQL(_dataSource.url,[_dataSource.dataSourseName||layer.name],function(result){features=_this9._parseGeoJsonData2Feature({allDatas:{features:result.result.features.features},fileCode:layer.projection,featureProjection:_this9.baseProjection});_this9._addLayer(layer,features,index);_this9.layerAdded++;_this9._sendMapToUser(_this9.layerAdded,len);},function(err){_this9.layerAdded++;_this9._sendMapToUser(_this9.layerAdded,len);_this9.fire('getlayerdatasourcefailed',{error:err,layer:layer,map:_this9.map});});}else if(layer.dataSource&&layer.dataSource.type==='REST_MAP'&&layer.dataSource.url){_this9._queryFeatureBySQL(layer.dataSource.url,layer.dataSource.layerName,function(result){var recordsets=result&&result.result.recordsets;var recordset=recordsets&&recordsets[0];var attributes=recordset.fields;if(recordset&&attributes){var fileterAttrs=[];for(var i in attributes){var value=attributes[i];if(value.indexOf('Sm')!==0||value==='SmID'){fileterAttrs.push(value);}}_this9._getFeatures(fileterAttrs,layer,function(features){_this9._addLayer(layer,features,index);_this9.layerAdded++;_this9._sendMapToUser(_this9.layerAdded,len);},function(err){_this9.layerAdded++;_this9.fire('getlayerdatasourcefailed',{error:err,layer:layer,map:_this9.map});});}},function(err){_this9.fire('getlayerdatasourcefailed',{error:err,layer:layer,map:_this9.map});},'smid=1');}else if(layer.layerType==='DATAFLOW_POINT_TRACK'||layer.layerType==='DATAFLOW_HEAT'){_this9._getDataflowInfo(layer,function(){_this9._addLayer(layer,null,index);_this9.layerAdded++;_this9._sendMapToUser(_this9.layerAdded,len);},function(e){_this9.layerAdded++;// TODO fire faild
  18938. });}},this);}}/**
  18939. * @private
  18940. * @function WebMapViewModel.prototype._getFeatures
  18941. */},{key:"_getFeatures",value:function _getFeatures(fields,layerInfo,resolve,reject){var _this10=this;var source=layerInfo.dataSource;// 示例数据
  18942. var fileCode=layerInfo.projection;this._queryFeatureBySQL(source.url,source.layerName,function(result){var recordsets=result.result.recordsets[0];var features=recordsets.features.features;var featuresObj=_this10._parseGeoJsonData2Feature({allDatas:{features:features},fileCode:fileCode,featureProjection:_this10.baseProjection});resolve(featuresObj);},function(err){reject(err);},null,fields);}/**
  18943. * @private
  18944. * @function WebMapViewModel.prototype._addLayer
  18945. * @description 将单个图层添加到地图上。
  18946. * @param layerInfo 某个图层的图层信息
  18947. * @param {Array.<GeoJSON>} features - feature。
  18948. */},{key:"_addLayer",value:function _addLayer(layerInfo,features,index){var layerType=layerInfo.layerType;layerInfo.layerID=layerType+'-'+layerInfo.name+'-'+index;layerInfo.visible=layerInfo.visible?'visible':'none';// mbgl 目前不能处理 geojson 复杂面情况
  18949. // mbgl isssue https://github.com/mapbox/mapbox-gl-js/issues/7023
  18950. if(features&&features[0]&&features[0].geometry.type==='Polygon'){features=handleMultyPolygon(features);}if(layerInfo.style&&layerInfo.filterCondition){// 将 feature 根据过滤条件进行过滤, 分段专题图和单值专题图因为要计算 styleGroup 所以暂时不过滤
  18951. if(layerType!=='RANGE'&&layerType!=='UNIQUE'&&layerType!=='RANK_SYMBOL'){features=this._getFiterFeatures(layerInfo.filterCondition,features);}}if(features&&layerInfo.projection!=='EPSG:4326'){this._transformFeatures(features);}if(layerType==='VECTOR'){if(layerInfo.featureType==='POINT'){if(layerInfo.style.type==='SYMBOL_POINT'){this._createSymbolLayer(layerInfo,features);}else{this._createGraphicLayer(layerInfo,features);}}else{// 线和面
  18952. this._createVectorLayer(layerInfo,features);}}else if(layerType==='UNIQUE'){this._createUniqueLayer(layerInfo,features);}else if(layerType==='RANGE'){this._createRangeLayer(layerInfo,features);}else if(layerType==='HEAT'){this._createHeatLayer(layerInfo,features);}else if(layerType==='MARKER'){this._createMarkerLayer(layerInfo,features);}else if(layerInfo.layerType==='MIGRATION'){this._createMigrationLayer(layerInfo,features);}else if(layerInfo.layerType==='RANK_SYMBOL'){this._createRankSymbolLayer(layerInfo,features);}else if(layerInfo.layerType==='DATAFLOW_POINT_TRACK'||layerInfo.layerType==='DATAFLOW_HEAT'){this._createDataflowLayer(layerInfo);}if(layerInfo.labelStyle&&layerInfo.labelStyle.labelField&&layerInfo.layerType!=='DATAFLOW_POINT_TRACK'){// 存在标签专题图
  18953. this._addLabelLayer(layerInfo,features);}}},{key:"_createDataflowLayer",value:function _createDataflowLayer(layerInfo){var dataflowService=new mapbox_gl_enhance_js_default.a.supermap.DataFlowService(layerInfo.wsUrl).initSubscribe();this._handleDataflowFeaturesCallback=this._handleDataflowFeatures.bind(this,layerInfo);dataflowService.on('messageSucceeded',this._handleDataflowFeaturesCallback);this._dataflowService=dataflowService;}},{key:"_handleDataflowFeatures",value:function _handleDataflowFeatures(layerInfo,e){var features=JSON.parse(e.data);// this._transformFeatures([features]); // TODO 坐标系
  18954. this.fire('dataflowfeatureupdated',{features:features,identifyField:layerInfo.identifyField,layerID:layerInfo.layerID});if(layerInfo.filterCondition){//过滤条件
  18955. var condition=this._replaceFilterCharacter(layerInfo.filterCondition);var sql='select * from json where ('+condition+')';var filterResult=window['jsonsql'].query(sql,{attributes:features.properties});if(filterResult&&filterResult.length>0){this._addDataflowLayer(layerInfo,features);}}else{this._addDataflowLayer(layerInfo,features);}}},{key:"_getDataFlowRotateStyle",value:function _getDataFlowRotateStyle(features,directionField,identifyField){var iconRotateExpression=['match',['get',identifyField]];features.forEach(function(feature){var value;if(directionField!==undefined&&directionField!=='未设置'&&directionField!=='None'){value=feature.properties[directionField];}else{value=0;}if(value>360||value<0){return null;}// @ts-ignore
  18956. iconRotateExpression.push(feature.properties[identifyField],parseInt(value));});// @ts-ignore
  18957. iconRotateExpression.push(0);return iconRotateExpression;}},{key:"_addDataflowLayer",value:function _addDataflowLayer(layerInfo,feature){var layerID=layerInfo.layerID;if(layerInfo.layerType==='DATAFLOW_HEAT'){if(!this.map.getSource(layerID)){this._createHeatLayer(layerInfo,[feature]);}else{this._updateDataFlowFeature(layerID,feature,layerInfo);}}else{var layerStyle=layerInfo.pointStyle;layerInfo.style=layerStyle;if(!this.map.getSource(layerID)){var iconRotateExpression=this._getDataFlowRotateStyle([feature],layerInfo.directionField,layerInfo.identifyField);if(['BASIC_POINT','SVG_POINT','IMAGE_POINT'].includes(layerStyle.type)){this._createGraphicLayer(layerInfo,[feature],null,iconRotateExpression);}else{this._createSymbolLayer(layerInfo,[feature],null,iconRotateExpression);}}else{this._updateDataFlowFeature(layerID,feature,layerInfo,'point');}if(layerInfo.labelStyle&&layerInfo.visible){if(!this.map.getSource(layerID+'label')){this._addLabelLayer(layerInfo,[feature]);}else{this._updateDataFlowFeature(layerID+'label',feature,layerInfo);}}if(layerInfo.lineStyle&&layerInfo.visible){if(!this.map.getSource(layerID+'-line')){var geometry=feature.geometry.coordinates;var lineFeature={type:'Feature',properties:feature.properties,geometry:{type:'LineString',coordinates:[geometry]}};this._createVectorLayer({style:layerInfo.lineStyle,featureType:'LINE',visible:'visible',layerID:layerID+'-line'},[lineFeature]);}else{this._updateDataFlowFeature(layerID+'-line',feature,layerInfo,'line');}}}}},{key:"_updateDataFlowFeature",value:function _updateDataFlowFeature(sourceID,newFeature,layerInfo,type){var identifyField=layerInfo.identifyField,maxPointCount=layerInfo.maxPointCount,directionField=layerInfo.directionField;// @ts-ignore
  18958. var features=lodash_clonedeep_default()(this.map.getSource(sourceID)._data.features);var has=false;features.map(function(item,index){if(item.properties[identifyField]===newFeature.properties[identifyField]){has=true;if(type==='line'){var coordinates=item.geometry.coordinates;coordinates.push(newFeature.geometry.coordinates);if(maxPointCount&&coordinates.length>maxPointCount){coordinates.splice(0,coordinates.length-maxPointCount);}features[index].geometry.coordinates=coordinates;}else{features[index]=newFeature;}}});if(!has){if(type==='line'){features.push({type:'Feature',properties:newFeature.properties,geometry:{type:'LineString',coordinates:[newFeature.geometry.coordinates]}});}else{features.push(newFeature);}}// @ts-ignore
  18959. this.map.getSource(sourceID).setData({type:'FeatureCollection',features:features});if(type==='point'){var _type=layerInfo.pointStyle.type;var iconRotateExpression=this._getDataFlowRotateStyle(features,directionField,identifyField);if(['SVG_POINT','IMAGE_POINT'].includes(_type)){this.map.setLayoutProperty(sourceID,'icon-rotate',iconRotateExpression);}else if(_type==='SYMBOL_POINT'){this.map.setLayoutProperty(sourceID,'text-rotate',iconRotateExpression);}}}},{key:"_getDataflowInfo",value:function _getDataflowInfo(layerInfo,success,faild){var url=layerInfo.url,token;var requestUrl="".concat(url,".json");if(layerInfo.credential&&layerInfo.credential.token){token=layerInfo.credential.token;requestUrl+="?token=".concat(token);}SuperMap.FetchRequest.get(requestUrl).then(function(response){return response.json();}).then(function(result){if(result&&result.featureMetaData){layerInfo.featureType=result.featureMetaData.featureType.toUpperCase();layerInfo.dataSource={dataTypes:{}};if(result.featureMetaData.fieldInfos&&result.featureMetaData.fieldInfos.length>0){result.featureMetaData.fieldInfos.forEach(function(data){var name=data.name.trim();if(data.type==='TEXT'){layerInfo.dataSource.dataTypes[name]='STRING';}else if(['DOUBLE','INT','FLOAT','LONG','SHORT'].includes(data.type)){layerInfo.dataSource.dataTypes[name]='NUMBER';}else{layerInfo.dataSource.dataTypes[name]='UNKNOWN';}});}layerInfo.wsUrl=result.urls[0].url;layerInfo.name=result.urls[0].url.split('iserver/services/')[1].split('/dataflow')[0];success();}else{//失败也要到成功会调函数中,否则不会继续执行
  18960. faild();}}).catch(function(){faild();});}},{key:"_createMigrationLayer",value:function _createMigrationLayer(layerInfo,features){window['echarts']=external_echarts_default.a;var properties=this._getFeatureProperties(features);var lineData=this._createLinesData(layerInfo,properties);var pointData=this._createPointsData(lineData,layerInfo,properties);var options=this._createOptions(layerInfo,lineData,pointData);var echartslayer=new EchartsLayer_js_default.a(this.map);echartslayer.chart.setOption(options);this.echartslayer.push(echartslayer);}},{key:"_createOptions",value:function _createOptions(layerInfo,lineData,pointData){var series;var lineSeries=this._createLineSeries(layerInfo,lineData);if(pointData&&pointData.length){var pointSeries=this._createPointSeries(layerInfo,pointData);series=lineSeries.concat(pointSeries);}else{series=lineSeries.slice();}var options={GLMap:{roam:true},// geo: {
  18961. // map: 'GLMap',
  18962. // label: {
  18963. // emphasis: {
  18964. // show: false
  18965. // }
  18966. // },
  18967. // roam: true,
  18968. // itemStyle: {
  18969. // normal: {
  18970. // areaColor: '#323c48',
  18971. // borderColor: '#404a59'
  18972. // },
  18973. // emphasis: {
  18974. // areaColor: '#2a333d'
  18975. // }
  18976. // }
  18977. // },
  18978. series:series};return options;}},{key:"_createPointSeries",value:function _createPointSeries(layerInfo,pointData){var lineSetting=layerInfo.lineSetting;var animationSetting=layerInfo.animationSetting;var labelSetting=layerInfo.labelSetting;var pointSeries=[{name:'point-series',coordinateSystem:'GLMap',zlevel:2,label:{normal:{show:labelSetting.show,position:'right',formatter:'{b}',color:labelSetting.color,fontFamily:labelSetting.fontFamily}},itemStyle:{normal:{color:lineSetting.color||labelSetting.color}},data:pointData}];if(animationSetting.show){// 开启动画
  18979. // @ts-ignore
  18980. pointSeries[0].type='effectScatter';// @ts-ignore
  18981. pointSeries[0].rippleEffect={brushType:'stroke'};}else{// 关闭动画
  18982. // @ts-ignore
  18983. pointSeries[0].type='scatter';}return pointSeries;}},{key:"_createLineSeries",value:function _createLineSeries(layerInfo,lineData){var lineSetting=layerInfo.lineSetting;var animationSetting=layerInfo.animationSetting;var linesSeries=[// 轨迹线样式
  18984. {name:'line-series',coordinateSystem:'GLMap',type:'lines',zlevel:1,effect:{show:animationSetting.show,constantSpeed:animationSetting.constantSpeed,trailLength:0,symbol:animationSetting.symbol,symbolSize:animationSetting.symbolSize},lineStyle:{normal:{color:lineSetting.color,type:lineSetting.type,width:lineSetting.width,opacity:lineSetting.opacity,curveness:lineSetting.curveness}},data:lineData}];if(lineData.length>=MAX_MIGRATION_ANIMATION_COUNT){// @ts-ignore
  18985. linesSeries[0].large=true;// @ts-ignore
  18986. linesSeries[0].largeThreshold=100;// @ts-ignore
  18987. linesSeries[0].blendMode='lighter';}return linesSeries;}},{key:"_createLinesData",value:function _createLinesData(layerInfo,properties){var data=[];if(properties&&properties.length){// 重新获取数据
  18988. var from=layerInfo.from,to=layerInfo.to,fromCoord,toCoord;if(from.type==='XY_FIELD'&&from['xField']&&from['yField']&&to['xField']&&to['yField']){properties.forEach(function(property){var fromX=property[from['xField']],fromY=property[from['yField']],toX=property[to['xField']],toY=property[to['yField']];if(!fromX||!fromY||!toX||!toY){return;}fromCoord=[property[from['xField']],property[from['yField']]];toCoord=[property[to['xField']],property[to['yField']]];data.push({coords:[fromCoord,toCoord]});});}else if(from.type==='PLACE_FIELD'&&from['field']&&to['field']){var centerDatas=ProvinceCenter.concat(MunicipalCenter);properties.forEach(function(property){var fromField=property[from['field']],toField=property[to['field']];fromCoord=centerDatas.find(function(item){return mapbox_gl_enhance_js_default.a.supermap.Util.isMatchAdministrativeName(item.name,fromField);});toCoord=centerDatas.find(function(item){return mapbox_gl_enhance_js_default.a.supermap.Util.isMatchAdministrativeName(item.name,toField);});if(!fromCoord||!toCoord){return;}data.push({coords:[fromCoord.coord,toCoord.coord]});});}}return data;}},{key:"_createPointsData",value:function _createPointsData(lineData,layerInfo,properties){var data=[],labelSetting=layerInfo.labelSetting;// 标签隐藏则直接返回
  18989. if(!labelSetting.show||!lineData.length){return data;}var fromData=[],toData=[];lineData.forEach(function(item,idx){var coords=item.coords,fromCoord=coords[0],toCoord=coords[1],fromProperty=properties[idx][labelSetting.from],toProperty=properties[idx][labelSetting.to];// 起始字段去重
  18990. var f=fromData.find(function(d){return d.value[0]===fromCoord[0]&&d.value[1]===fromCoord[1];});!f&&fromData.push({name:fromProperty,value:fromCoord});// 终点字段去重
  18991. var t=toData.find(function(d){return d.value[0]===toCoord[0]&&d.value[1]===toCoord[1];});!t&&toData.push({name:toProperty,value:toCoord});});data=fromData.concat(toData);return data;}},{key:"_createRankSymbolLayer",value:function _createRankSymbolLayer(layerInfo,features){var fieldName=layerInfo.themeSetting.themeField;var style=layerInfo.style;var featureType=layerInfo.featureType;var styleSource=this._createRankStyleSource(layerInfo,features,layerInfo.featureType);var styleGroups=styleSource.styleGroups;features=this._getFiterFeatures(layerInfo.filterCondition,features);// 获取 expression
  18992. var expression=['match',['get','index']];features.forEach(function(row){var tartget=parseFloat(row.properties[fieldName]);if(styleGroups){for(var i=0;i<styleGroups.length;i++){if(styleGroups[i].start<=tartget&&tartget<styleGroups[i].end){var radius=style.type==='SYMBOL_POINT'||style.type==='IMAGE_POINT'?style.type==='SYMBOL_POINT'?styleGroups[i].radius*2:Number.parseFloat((styleGroups[i].radius/style.imageInfo.size.h).toFixed(2))*2:styleGroups[i].radius;expression.push(row.properties['index'],radius);}}}// @ts-ignore
  18993. !tartget&&expression.push(row.properties['index'],1);},this);// @ts-ignore
  18994. expression.push(1);if(style.type==='SYMBOL_POINT'){this._createSymbolLayer(layerInfo,features,expression);}else if(style.type==='IMAGE_POINT'){this._createGraphicLayer(layerInfo,features,expression);}else{var source={type:'geojson',data:{type:'FeatureCollection',features:features}};// 获取样式
  18995. var layerStyle={layout:{visibility:layerInfo.visible}};layerStyle.style=this._transformStyleToMapBoxGl(style,featureType,expression,'circle-radius');var layerID=layerInfo.layerID;this._addOverlayToMap(featureType,source,layerID,layerStyle);}}},{key:"_createRankStyleSource",value:function _createRankStyleSource(parameters,features,featureType){var themeSetting=parameters.themeSetting,themeField=themeSetting.themeField;var styleGroups=this._getRankStyleGroup(themeField,features,parameters,featureType);// @ts-ignore
  18996. return styleGroups?{parameters:parameters,styleGroups:styleGroups}:false;}},{key:"_getRankStyleGroup",value:function _getRankStyleGroup(themeField,features,parameters,featureType){// 找出所有的单值
  18997. var values=[],segements=[],style=parameters.style,themeSetting=parameters.themeSetting,segmentMethod=themeSetting.segmentMethod,segmentCount=themeSetting.segmentCount,customSettings=themeSetting.customSettings,minR=parameters.themeSetting.minRadius,maxR=parameters.themeSetting.maxRadius;features.forEach(function(feature){var properties=feature.properties,value=properties[themeField];// 过滤掉空值和非数值
  18998. if(value==null||!mapbox_gl_enhance_js_default.a.supermap.Util.isNumber(value)){return;}values.push(Number(value));});try{segements=SuperMap.ArrayStatistic.getArraySegments(values,segmentMethod,segmentCount);}catch(error){console.error(error);}// 处理自定义 分段
  18999. for(var i=0;i<segmentCount;i++){if(i in customSettings){var startValue=customSettings[i]['segment']['start'],endValue=customSettings[i]['segment']['end'];startValue!=null&&(segements[i]=startValue);endValue!=null&&(segements[i+1]=endValue);}}//生成styleGroup
  19000. var styleGroup=[];if(segements&&segements.length){var len=segements.length,incrementR=(maxR-minR)/(len-1),// 半径增量
  19001. start,end,radius=Number(((maxR+minR)/2).toFixed(2));for(var _i4=0;_i4<len-1;_i4++){start=Number(segements[_i4].toFixed(2));end=Number(segements[_i4+1].toFixed(2));// 这里特殊处理以下分段值相同的情况(即所有字段值相同)
  19002. radius=start===end?radius:minR+Math.round(incrementR*_i4);// 最后一个分段时将end+0.01,避免取不到最大值
  19003. end=_i4===len-2?end+0.01:end;// 处理自定义 半径
  19004. radius=customSettings[_i4]&&customSettings[_i4].radius?customSettings[_i4].radius:radius;style.radius=radius;styleGroup.push({radius:radius,start:start,end:end});}return styleGroup;}else{return false;}}/**
  19005. * @private
  19006. * @function WebMapViewModel.prototype._addLabelLayer
  19007. * @description 添加标签图层。
  19008. * @param layerInfo 某个图层的图层信息。
  19009. * @param {Array.<GeoJSON>} features - feature。
  19010. */},{key:"_addLabelLayer",value:function _addLabelLayer(layerInfo,features){var labelStyle=layerInfo.labelStyle;this.map.addLayer({id:layerInfo.layerID+'label',type:'symbol',source:{type:'geojson',data:{type:'FeatureCollection',features:features}},paint:{'text-color':labelStyle.fill,'text-halo-color':'rgba(255,255,255,0.8)','text-halo-width':parseFloat(labelStyle.fontSize)||12},layout:{'text-field':"{".concat(labelStyle.labelField,"}"),'text-size':parseFloat(labelStyle.fontSize)||12,'text-offset':labelStyle.offsetX?[labelStyle.offsetX/10||0,labelStyle.offsetY/10||0]:[0,-2.5],'text-font':['DIN Offc Pro Italic','Arial Unicode MS Regular'],visibility:layerInfo.visible}});}/**
  19011. * @private
  19012. * @function WebMapViewModel.prototype._createSymbolLayer
  19013. * @description 添加 symbol 图层。
  19014. * @param layerInfo 某个图层的图层信息。
  19015. * @param {Array.<GeoJSON>} features - feature。
  19016. */},{key:"_createSymbolLayer",value:function _createSymbolLayer(layerInfo,features,textSize,textRotateExpresion){// 用来请求symbol_point字体文件
  19017. var target=document.getElementById("".concat(this.target));target.classList.add('supermapol-icons-map');var style=layerInfo.style;var unicode=layerInfo.style.unicode;var text=String.fromCharCode(parseInt(unicode.replace(/^&#x/,''),16));var layerID=layerInfo.layerID;this.map.addSource(layerID,{type:'geojson',data:{type:'FeatureCollection',features:[]}});this.map.addLayer({id:layerID,type:'symbol',source:layerID,paint:{'text-color':style.fillColor},layout:{'text-field':text,'text-size':textSize||style.fontSize&&parseFloat(style.fontSize)||12,'text-font':['DIN Offc Pro Italic','Arial Unicode MS Regular'],'text-rotate':textRotateExpresion||0,visibility:layerInfo.visible}});// @ts-ignore
  19018. this.map.getSource(layerID).setData({type:'FeatureCollection',features:features});}/**
  19019. * @private
  19020. * @function WebMapViewModel.prototype._createGraphicLayer
  19021. * @description 创建 Graphic 图层。
  19022. * @param {Object} layerInfo - map 信息。
  19023. * @param {Array} features - 属性 信息。
  19024. */},{key:"_createGraphicLayer",value:function _createGraphicLayer(layerInfo,features,iconSizeExpression,iconRotateExpression){var _this11=this;var style=layerInfo.style;var layerID=layerInfo.layerID;var source={type:'geojson',data:{type:'FeatureCollection',features:features}};if(style.type==='IMAGE_POINT'){var imageInfo=style.imageInfo;this.map.loadImage(imageInfo.url,function(error,image){if(error){console.log(error);}var iconSize=Number.parseFloat((style.radius/image.height).toFixed(2))*2;_this11.map.addImage('imageIcon',image);_this11.map.addLayer({id:layerID,type:'symbol',source:source,layout:{'icon-image':'imageIcon','icon-size':iconSizeExpression||iconSize,visibility:layerInfo.visible,'icon-rotate':iconRotateExpression||0}});});}else if(style.type==='SVG_POINT'){var svgUrl=style.url;if(!this._svgDiv){this._svgDiv=document.createElement('div');document.body.appendChild(this._svgDiv);}this._getCanvasFromSVG(svgUrl,this._svgDiv,function(canvas){var imgUrl=canvas.toDataURL('img/png');imgUrl&&_this11.map.loadImage(imgUrl,function(error,image){if(error){console.log(error);}var iconSize=Number.parseFloat((style.radius/canvas.width).toFixed(2));_this11.map.addImage('imageIcon',image);_this11.map.addLayer({id:layerID,type:'symbol',source:source,layout:{'icon-image':'imageIcon','icon-size':iconSizeExpression||iconSize,visibility:layerInfo.visible,'icon-rotate':iconRotateExpression||0}});});});}else{var layerStyle={style:this._transformStyleToMapBoxGl(style,layerInfo.featureType),layout:{visibility:layerInfo.visible}};this._addOverlayToMap('POINT',source,layerID,layerStyle);}}/**
  19025. * @private
  19026. * @function WebMapViewModel.prototype._createUniqueLayer
  19027. * @description 创建单值图层。
  19028. * @param layerInfo 某个图层的图层信息
  19029. * @param features 图层上的 feature
  19030. */},{key:"_createUniqueLayer",value:function _createUniqueLayer(layerInfo,features){var styleGroup=this._getUniqueStyleGroup(layerInfo,features);features=this._getFiterFeatures(layerInfo.filterCondition,features);var style=layerInfo.style;var themeField=layerInfo.themeSetting.themeField;Object.keys(features[0].properties).forEach(function(key){key.toLocaleUpperCase()===themeField.toLocaleUpperCase()&&(themeField=key);});var type=layerInfo.featureType;var expression=['match',['get','index']];var layerID=layerInfo.layerID;features.forEach(function(row){styleGroup.forEach(function(item){if(item.value===row.properties[themeField]){expression.push(row.properties['index'],item.color);}});});expression.push('#ffffff');// 图例相关
  19031. this._initLegendConfigInfo(layerInfo,styleGroup);var visible=layerInfo.visible;var layerStyle={style:this._transformStyleToMapBoxGl(style,type,expression),layout:{visibility:visible}};var source={type:'geojson',data:{type:'FeatureCollection',features:features}};this._addOverlayToMap(type,source,layerID,layerStyle);type==='POLYGON'&&style.strokeColor&&this._addStrokeLineForPoly(style,source,layerID+'-strokeLine',visible);}/**
  19032. * @private
  19033. * @function WebMapViewModel.prototype._getUniqueStyleGroup
  19034. * @description 获取单值的目标字段与颜色的对应数组。
  19035. * @param layerInfo 某个图层的图层信息
  19036. * @param features 图层上的 feature
  19037. */},{key:"_getUniqueStyleGroup",value:function _getUniqueStyleGroup(parameters,features){// 找出所有的单值
  19038. var featureType=parameters.featureType;var style=parameters.style;var themeSetting=parameters.themeSetting;var fieldName=themeSetting.themeField;var colors=themeSetting.colors;Object.keys(features[0].properties).forEach(function(key){key.toLocaleUpperCase()===fieldName.toLocaleUpperCase()&&(fieldName=key);});var names=[];var customSettings=themeSetting.customSettings;for(var i in features){var properties=features[i].properties;var name=properties[fieldName];var isSaved=false;for(var j in names){if(names[j]===name){isSaved=true;break;}}if(!isSaved){names.push(name);}}// 获取一定量的颜色
  19039. var curentColors=colors;curentColors=SuperMap.ColorsPickerUtil.getGradientColors(curentColors,names.length);// 生成styleGroup
  19040. var styleGroup=[];names.forEach(function(name,index){var color=curentColors[index];if(name in customSettings){color=customSettings[name];}if(featureType==='LINE'){style.strokeColor=color;}else{style.fillColor=color;}styleGroup.push({color:color,value:name});},this);return styleGroup;}/**
  19041. * @private
  19042. * @function WebMapViewModel.prototype._getWMTSUrl
  19043. * @description 根据传入的配置信息拼接wmts url。
  19044. * @param options 配置对象
  19045. */},{key:"_getWMTSUrl",value:function _getWMTSUrl(options){var obj={service:'WMTS',request:'GetTile',version:'1.0.0',style:'default',layer:options.layer,tilematrixSet:options.tileMatrixSet,format:'image/png'};var url=options.url;url+=this._getParamString(obj,url)+'&tilematrix={z}&tilerow={y}&tilecol={x}';return url;}/**
  19046. * @private
  19047. * @function WebMapViewModel.prototype._createMarkerLayer
  19048. * @description 添加标记图层。
  19049. * @param {Array.<GeoJSON>} features - feature。
  19050. */},{key:"_createMarkerLayer",value:function _createMarkerLayer(layerInfo,features){var _this12=this;features&&features.forEach(function(feature){var geomType=feature.geometry.type.toUpperCase();var defaultStyle=feature.dv_v5_markerStyle;if(geomType==='POINT'&&defaultStyle.text){// 说明是文字的feature类型
  19051. geomType='TEXT';}var featureInfo=_this12._setFeatureInfo(feature);feature.properties['useStyle']=defaultStyle;feature.properties['featureInfo']=featureInfo;if(geomType==='POINT'&&defaultStyle.src&&defaultStyle.src.indexOf('http://')===-1&&defaultStyle.src.indexOf('https://')===-1){// 说明地址不完整
  19052. defaultStyle.src=_this12.serverUrl+defaultStyle.src;}var source={type:'geojson',data:feature};var index=feature.properties.index;var layerID=geomType+'-'+index;// image-marker
  19053. geomType==='POINT'&&defaultStyle.src&&defaultStyle.src.indexOf('svg')<=-1&&_this12.map.loadImage(defaultStyle.src,function(error,image){if(error){console.log(error);}_this12.map.addImage(index+'',image);_this12.map.addLayer({id:layerID,type:'symbol',source:source,layout:{'icon-image':index+'','icon-size':defaultStyle.scale,visibility:layerInfo.visible}});});// svg-marker
  19054. if(geomType==='POINT'&&defaultStyle.src&&defaultStyle.src.indexOf('svg')>-1){if(!_this12._svgDiv){_this12._svgDiv=document.createElement('div');document.body.appendChild(_this12._svgDiv);}_this12._getCanvasFromSVG(defaultStyle.src,_this12._svgDiv,function(canvas){var imgUrl=canvas.toDataURL('img/png');imgUrl&&_this12.map.loadImage(imgUrl,function(error,image){if(error){console.log(error);}_this12.map.addImage(index+'',image);_this12.map.addLayer({id:layerID,type:'symbol',source:source,layout:{'icon-image':index+'','icon-size':defaultStyle.scale,visibility:layerInfo.visible}});});});}// point-line-polygon-marker
  19055. if(!defaultStyle.src){var layeStyle={layout:{}};if(geomType==='LINESTRING'&&defaultStyle.lineCap){geomType='LINE';layeStyle.layout={'line-cap':defaultStyle.lineCap};}var visible=layerInfo.visible;layeStyle.layout.visibility=visible;// get style
  19056. layeStyle.style=_this12._transformStyleToMapBoxGl(defaultStyle,geomType);_this12._addOverlayToMap(geomType,source,layerID,layeStyle);// 若面有边框
  19057. geomType==='POLYGON'&&defaultStyle.strokeColor&&_this12._addStrokeLineForPoly(defaultStyle,source,layerID+'-strokeLine',visible);}},this);}/**
  19058. * @private
  19059. * @function WebMapViewModel.prototype._setFeatureInfo
  19060. * @description 设置 feature 信息。
  19061. * @param {Array.<GeoJSON>} features - feature。
  19062. */},{key:"_setFeatureInfo",value:function _setFeatureInfo(feature){var featureInfo;var info=feature.dv_v5_markerInfo;if(info&&info.dataViz_title){// 有featureInfo信息就不需要再添加
  19063. featureInfo=info;}else{// featureInfo = this.getDefaultAttribute();
  19064. return info;}var properties=feature.properties;for(var key in featureInfo){if(properties[key]){featureInfo[key]=properties[key];delete properties[key];}}return featureInfo;}/**
  19065. * @private
  19066. * @function WebMapViewModel.prototype._createHeatLayer
  19067. * @description 添加热力图。
  19068. * @param {Array.<GeoJSON>} features - feature。
  19069. */},{key:"_createHeatLayer",value:function _createHeatLayer(layerInfo,features){var style=layerInfo.themeSetting;var layerOption={gradient:style.colors.slice(),radius:parseInt(style.radius)};// 自定义颜色
  19070. var customSettings=style.customSettings;for(var i in customSettings){layerOption.gradient[i]=customSettings[i];}// 权重字段恢复
  19071. if(style.weight){this._changeWeight(features,style.weight);}var color=['interpolate',['linear'],['heatmap-density']];var length=layerOption.gradient.length;var step=parseFloat((1/length).toFixed(2));layerOption.gradient.forEach(function(item,index){color.push(index*step);if(index===0){item=mapbox_gl_enhance_js_default.a.supermap.Util.hexToRgba(item,0);}color.push(item);});// 图例相关
  19072. this._initLegendConfigInfo(layerInfo,layerOption.gradient);var paint={'heatmap-color':color,'heatmap-radius':style.radius+15,'heatmap-intensity':{base:1,stops:[[0,0.8],[22,1]]}};if(features[0].weight&&features.length>=4){var weight=[];features.forEach(function(item){weight.push(item.weight);});var max=SuperMap.ArrayStatistic.getMax(weight);var min=SuperMap.ArrayStatistic.getMin(weight);paint['heatmap-weight']=['interpolate',['linear'],['get','weight'],min,0,max,1];}this.map.addLayer({id:layerInfo.layerID,type:'heatmap',source:{type:'geojson',data:{type:'FeatureCollection',features:features}},paint:paint});}/**
  19073. * @private
  19074. * @function WebMapViewModel.prototype._changeWeight
  19075. * @description 改变当前权重字段
  19076. * @param {Array.<GeoJSON>} features - feature。
  19077. * @param {String} weightFeild - 权重字段
  19078. */},{key:"_changeWeight",value:function _changeWeight(features,weightFeild){this._fieldMaxValue={};this._getMaxValue(features,weightFeild);var maxValue=this._fieldMaxValue[weightFeild];features.forEach(function(feature){var attributes=feature.properties;var value=attributes[weightFeild];feature['weight']=value/maxValue;});}/**
  19079. * @private
  19080. * @function WebMapViewModel.prototype._getMaxValue
  19081. * @description 获取当前字段对应的最大值,用于计算权重。
  19082. * @param {Array.<GeoJSON>} features - feature。
  19083. * @param {String} weightFeild - 权重字段
  19084. */},{key:"_getMaxValue",value:function _getMaxValue(features,weightField){var values=[];var attributes;var field=weightField;if(this._fieldMaxValue[field]){return;}features.forEach(function(feature){// 收集当前权重字段对应的所有值
  19085. attributes=feature.properties;attributes&&parseFloat(attributes[field])&&values.push(parseFloat(attributes[field]));});this._fieldMaxValue[field]=SuperMap.ArrayStatistic.getArrayStatistic(values,'Maximum');}/**
  19086. * @private
  19087. * @function WebMapViewModel.prototype._createRangeLayer
  19088. * @description 添加分段专题图。
  19089. * @param {Array.<GeoJSON>} features - feature。
  19090. */},{key:"_createRangeLayer",value:function _createRangeLayer(layerInfo,features){var fieldName=layerInfo.themeSetting.themeField;var style=layerInfo.style;var featureType=layerInfo.featureType;var styleGroups=this._getRangeStyleGroup(layerInfo,features);features=this._getFiterFeatures(layerInfo.filterCondition,features);var source={type:'geojson',data:{type:'FeatureCollection',features:features}};// 获取 expression
  19091. var expression=['match',['get','index']];features.forEach(function(row){var tartget=parseFloat(row.properties[fieldName]);if(styleGroups){for(var i=0;i<styleGroups.length;i++){if(styleGroups[i].start<=tartget&&tartget<styleGroups[i].end){expression.push(row.properties['index'],styleGroups[i].color);}}}!tartget&&expression.push(row.properties['index'],'rgba(0, 0, 0, 0)');},this);expression.push('rgba(0, 0, 0, 0)');// 图例处理
  19092. this._initLegendConfigInfo(layerInfo,styleGroups);// 获取样式
  19093. var layerStyle={layout:{}};if(featureType==='LINE'&&style.lineCap){layerStyle.layout={'line-cap':style.lineCap};}var visible=layerInfo.visible;layerStyle.layout.visibility=visible;layerStyle.style=this._transformStyleToMapBoxGl(style,featureType,expression);// 添加图层
  19094. var layerID=layerInfo.layerID;this._addOverlayToMap(featureType,source,layerID,layerStyle);// 如果面有边框
  19095. featureType==='POLYGON'&&style.strokeColor&&this._addStrokeLineForPoly(style,source,layerID+'-strokeline',visible);}/**
  19096. * @private
  19097. * @function WebMapViewModel.prototype._getFiterFeatures
  19098. * @description 通过过滤条件查询满足的 feature。
  19099. * @param {String} filterCondition - 过滤条件。
  19100. * @param {array} allFeatures - 图层上的 feature 集合
  19101. */},{key:"_getFiterFeatures",value:function _getFiterFeatures(filterCondition,allFeatures){if(!filterCondition){return allFeatures;}var condition=this._replaceFilterCharacter(filterCondition);var sql='select * from json where ('+condition+')';var filterFeatures=[];for(var i=0;i<allFeatures.length;i++){var feature=allFeatures[i];var filterResult=void 0;try{filterResult=window['jsonsql'].query(sql,{properties:feature.properties});}catch(err){// 必须把要过滤得内容封装成一个对象,主要是处理jsonsql(line : 62)中由于with语句遍历对象造成的问题
  19102. continue;}if(filterResult&&filterResult.length>0){// afterFilterFeatureIdx.push(i);
  19103. filterFeatures.push(feature);}}return filterFeatures;}/**
  19104. * @private
  19105. * @function WebMapViewModel.prototype._replaceFilterCharacter
  19106. * @description 获取过滤字符串。
  19107. * @param {String} filterString - 过滤条件。
  19108. */},{key:"_replaceFilterCharacter",value:function _replaceFilterCharacter(filterString){filterString=filterString.replace(/=/g,'==').replace(/AND|and/g,'&&').replace(/or|OR/g,'||').replace(/<==/g,'<=').replace(/>==/g,'>=');return filterString;}/**
  19109. * @private
  19110. * @function WebMapViewModel.prototype._getRangeStyleGroup
  19111. * @description 获取分段样式。
  19112. * @param {Array.<GeoJSON>} features - feature。
  19113. */},{key:"_getRangeStyleGroup",value:function _getRangeStyleGroup(layerInfo,features){// 找出分段值
  19114. var featureType=layerInfo.featureType;var style=layerInfo.style;var values=[];var attributes;var themeSetting=layerInfo.themeSetting;var customSettings=themeSetting.customSettings;var fieldName=themeSetting.themeField;var segmentCount=themeSetting.segmentCount;features.forEach(function(feature){attributes=feature.properties||feature.get('Properties');if(attributes){// 过滤掉非数值的数据
  19115. attributes[fieldName]&&mapbox_gl_enhance_js_default.a.supermap.Util.isNumber(attributes[fieldName])&&values.push(parseFloat(attributes[fieldName]));}else if(feature.get(fieldName)&&mapbox_gl_enhance_js_default.a.supermap.Util.isNumber(feature.get(fieldName))){feature.get(fieldName)&&values.push(parseFloat(feature.get(fieldName)));}},this);var segements=SuperMap.ArrayStatistic.getArraySegments(values,themeSetting.segmentMethod,segmentCount);if(segements){var itemNum=segmentCount;if(attributes&&segements[0]===segements[attributes.length-1]){itemNum=1;segements.length=2;}// 保留两位有效数
  19116. for(var i=0;i<segements.length;i++){var value=segements[i];value=i===0?Math.floor(value*100)/100:Math.ceil(value*100)/100+0.1;// 加0.1 解决最大值没有样式问题
  19117. segements[i]=Number(value.toFixed(2));}// 获取一定量的颜色
  19118. var curentColors=themeSetting.colors;// curentColors = SuperMap.ColorsPickerUtil.getGradientColors(curentColors, itemNum, 'RANGE');
  19119. for(var index=0;index<itemNum;index++){if(index in customSettings){if(customSettings[index]['segment']['start']){segements[index]=customSettings[index]['segment']['start'];}if(customSettings[index]['segment']['end']){segements[index+1]=customSettings[index]['segment']['end'];}}}// 生成styleGroup
  19120. var styleGroups=[];for(var _i5=0;_i5<itemNum;_i5++){var color=curentColors[_i5];if(_i5 in customSettings){if(customSettings[_i5].color){color=customSettings[_i5].color;}}if(featureType==='LINE'){style.strokeColor=color;}else{style.fillColor=color;}var start=segements[_i5];var end=segements[_i5+1];var styleObj=JSON.parse(JSON.stringify(style));styleGroups.push({style:styleObj,color:color,start:start,end:end});}return styleGroups;}}/**
  19121. * @private
  19122. * @function WebMapViewModel.prototype._formatGeoJSON
  19123. * @description 格式 GeoJSON。
  19124. * @param {GeoJSON} data - GeoJSON 数据。
  19125. */},{key:"_formatGeoJSON",value:function _formatGeoJSON(data){var features=data.features;features.forEach(function(row,index){row.properties['index']=index;});return features;}/**
  19126. * @private
  19127. * @function WebMapViewModel.prototype._excelData2Feature将
  19128. * @description csv 和 xls 文件内容转换成 geojson
  19129. * @param content 文件内容
  19130. * @param layerInfo 图层信息
  19131. * @returns {Array} feature的数组集合
  19132. */},{key:"_excelData2Feature",value:function _excelData2Feature(dataContent){var fieldCaptions=dataContent.colTitles;// 位置属性处理
  19133. var xfieldIndex=-1;var yfieldIndex=-1;for(var i=0,len=fieldCaptions.length;i<len;i++){if(isXField(fieldCaptions[i])){xfieldIndex=i;}if(isYField(fieldCaptions[i])){yfieldIndex=i;}}// feature 构建后期支持坐标系 4326/3857
  19134. var features=[];for(var _i6=0,_len=dataContent.rows.length;_i6<_len;_i6++){var row=dataContent.rows[_i6];var x=Number(row[xfieldIndex]);var y=Number(row[yfieldIndex]);// 属性信息
  19135. var attributes={};for(var index in dataContent.colTitles){var key=dataContent.colTitles[index];attributes[key]=dataContent.rows[_i6][index];}attributes['index']=_i6+'';// 目前csv 只支持处理点,所以先生成点类型的 geojson
  19136. var feature={type:'Feature',geometry:{type:'Point',coordinates:[x,y]},properties:attributes};features.push(feature);}return features;}/**
  19137. * @private
  19138. * @function WebMapViewModel.prototype._sendMapToUser
  19139. * @description 返回最终的 map 对象给用户,供他们操作使用。
  19140. * @param count
  19141. * @param layersLen
  19142. */},{key:"_sendMapToUser",value:function _sendMapToUser(count,layersLen){if(count===layersLen){/**
  19143. * @event WebMapViewModel#addlayerssucceeded
  19144. * @description 添加图层成功。
  19145. * @property {mapboxglTypes.Map} map - MapBoxGL Map 对象。
  19146. * @property {Object} mapparams - 地图信息。
  19147. * @property {string} mapParams.title - 地图标题。
  19148. * @property {string} mapParams.description - 地图描述。
  19149. * @property {Array.<Object>} layers - 地图上所有的图层对象。
  19150. */this._sourceListModel=new web_map_SourceListModel({map:this.map});for(var layerID in this._legendList){this._sourceListModel.addSourceStyle(layerID,this._legendList[layerID]);}for(var index=this._layers.length-2;index>-1;index--){var targetlayerId=this._layers[index].layerID;var beforLayerId=this._layers[index+1].layerID;this.map.moveLayer(targetlayerId,beforLayerId);}this.fire('addlayerssucceeded',{map:this.map,mapparams:this.mapParams,layers:this._layers});}}/**
  19151. * @function WebMapViewModel.prototype._unproject
  19152. * @private
  19153. * @description 墨卡托转经纬度。
  19154. * @param {} point - 待转换的点。
  19155. */},{key:"_unproject",value:function _unproject(point){var d=180/Math.PI;var r=6378137;var ts=Math.exp(-point[1]/r);var phi=Math.PI/2-2*Math.atan(ts);for(var i=0,dphi=0.1,con;i<15&&Math.abs(dphi)>1e-7;i++){con=1;dphi=Math.PI/2-2*Math.atan(ts*con)-phi;phi+=dphi;}return[point[0]*d/r,phi*d];}/**
  19156. * @function WebMapViewModel.prototype._getParamString
  19157. * @private
  19158. * @param {Object} obj - 待添加的参数。
  19159. * @param {string} existingUrl - 待添加参数的 url。
  19160. * @param {Boolean} [uppercase] - 参数是否转换为大写。
  19161. */},{key:"_getParamString",value:function _getParamString(obj,existingUrl){var uppercase=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;var params=[];for(var i in obj){params.push((uppercase?i.toUpperCase():i)+'='+obj[i]);}return(!existingUrl||existingUrl.indexOf('?')===-1?'?':'&')+params.join('&');}/**
  19162. * @private
  19163. * @function WebMapViewModel.prototype._transformStyleToMapBoxGl
  19164. * @description 根据图层类型将 layerInfo 中的 style 属性格式转换为 mapboxglTypes 中的 style 格式。
  19165. * @param {Object} style - layerInfo中的style属性
  19166. * @param {String} type - 图层类型
  19167. * @param {Array} [expression] - 存储颜色值得表达式
  19168. */},{key:"_transformStyleToMapBoxGl",value:function _transformStyleToMapBoxGl(style,type,expression,expressionType){var transTable={};if((style.type==='POINT'||style.type==='BASIC_POINT'||type==='POINT')&&type!=='LINE'){transTable={fillColor:'circle-color',strokeWidth:'circle-stroke-width',fillOpacity:'circle-opacity',radius:'circle-radius',strokeColor:'circle-stroke-color',strokeOpacity:'circle-stroke-opacity'};}else if(['LINE','LINESTRING','MULTILINESTRING'].includes(type)){transTable={strokeWidth:'line-width',strokeColor:'line-color',strokeOpacity:'line-opacity'};}else if(['REGION','POLYGON','MULTIPOLYGON'].includes(type)){transTable={fillColor:'fill-color',fillOpacity:'fill-opacity',strokeColor:'fill-outline-color'};}var newObj={};for(var item in style){if(transTable[item]){newObj[transTable[item]]=style[item];}}if(expression){if(expressionType){newObj[expressionType]=expression;}else if(newObj['circle-color']){newObj['circle-color']=expression;}else if(newObj['line-color']){newObj['line-color']=expression;}else{newObj['fill-color']=expression;}}if(style.lineDash&&style.lineDash!=='solid'&&type==='LINE'){newObj['line-dasharray']=this._dashStyle(style);}return newObj;}/**
  19169. * @private
  19170. * @function WebMapViewModel.prototype.._dashStyle
  19171. * @description 符号样式。
  19172. * @param {Object} style - 样式参数。
  19173. * @param {number} widthFactor - 宽度系数。
  19174. */},{key:"_dashStyle",value:function _dashStyle(style){if(!style){return[];}// var w = style.strokeWidth * widthFactor;
  19175. var w=1;var str=style.strokeDashstyle||style.lineDash;switch(str){case'solid':return[];case'dot':return[1,4*w];case'dash':return[4*w,4*w];case'dashdot':return[4*w,4*w,1*w,4*w];case'longdash':return[8*w,4*w];case'longdashdot':return[8*w,4*w,1,4*w];default:if(!str){return[];}if(SuperMap.Util.isArray(str)){return str;}str=SuperMap.String.trim(str).replace(/\s+/g,',');return str.replace(/\[|\]/gi,'').split(',');}}/**
  19176. * @private
  19177. * @description 将SVG转换成Canvas
  19178. * @param svgUrl
  19179. * @param divDom
  19180. * @param callBack
  19181. */},{key:"_getCanvasFromSVG",value:function _getCanvasFromSVG(svgUrl,divDom,callBack){// 一个图层对应一个canvas
  19182. var canvas=document.createElement('canvas');canvas.id='dataviz-canvas-'+mapbox_gl_enhance_js_default.a.supermap.Util.newGuid(8);canvas.style.display='none';divDom.appendChild(canvas);var canvgs=window.canvg?window.canvg:canvg_min_default.a;canvgs(canvas.id,svgUrl,{ignoreMouse:true,ignoreAnimation:true,renderCallback:function renderCallback(){if(canvas.width>300||canvas.height>300){return;}callBack(canvas);},forceRedraw:function forceRedraw(){return false;}});}/**
  19183. * @private
  19184. * @function WebMapViewModel.prototype._addOverlayToMap
  19185. * @description 添加基础矢量图层到 MAP
  19186. * @param {Object} style - mabgl style
  19187. * @param {String} type - 图层类型
  19188. */},{key:"_addOverlayToMap",value:function _addOverlayToMap(type,source,layerID,layerStyle){var mbglTypeMap={POINT:'circle',LINE:'line',POLYGON:'fill'};var mbglType=mbglTypeMap[type];if(mbglType==='circle'||mbglType==='line'||mbglType==='fill'){this.map.addLayer({id:layerID,type:mbglType,source:source,paint:layerStyle.style,layout:layerStyle.layout||{}});}}},{key:"_addBaselayer",value:function _addBaselayer(url,layerID){var minzoom=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;var maxzoom=arguments.length>3&&arguments[3]!==undefined?arguments[3]:22;var source={type:'raster',tiles:url,tileSize:256};this.map.addLayer({id:layerID,type:'raster',source:source,minzoom:minzoom,maxzoom:maxzoom});}/**
  19189. * @private
  19190. * @function WebMapViewModel.prototype._addStrokeLineForPoly
  19191. * @description 添加面的边框。
  19192. * @param {Object} style - mabgl style
  19193. */},{key:"_addStrokeLineForPoly",value:function _addStrokeLineForPoly(style,source,layerID,visible){var lineStyle={style:this._transformStyleToMapBoxGl(style,'LINE'),layout:{visibility:visible}};this._addOverlayToMap('LINE',source,layerID,lineStyle);}/**
  19194. * @private
  19195. * @function WebMapViewModel.prototype._parseGeoJsonData2Feature
  19196. * @description 将从restData地址上获取的json转换成feature(从iserver中获取的json转换成feature)
  19197. * @param {object} metaData - json内容
  19198. */},{key:"_parseGeoJsonData2Feature",value:function _parseGeoJsonData2Feature(metaData){var allFeatures=metaData.allDatas.features;var features=[];for(var i=0,len=allFeatures.length;i<len;i++){var feature=allFeatures[i];var coordinate=feature.geometry.coordinates;if(allFeatures[i].geometry.type==='Point'){// 标注图层 还没有属性值时候不加
  19199. if(allFeatures[i].properties){allFeatures[i].properties.lon=coordinate[0];allFeatures[i].properties.lat=coordinate[1];}}feature.properties['index']=i+'';features.push(feature);}return features;}/**
  19200. * @private
  19201. * @function WebMapViewModel.prototype._getFeatureBySQL
  19202. * @description 通过 sql 方式查询数据。
  19203. */},{key:"_getFeatureBySQL",value:function _getFeatureBySQL(url,datasetNames,_processCompleted,processFaild){var getFeatureParam,getFeatureBySQLService,getFeatureBySQLParams;getFeatureParam=new SuperMap.FilterParameter({name:datasetNames.join().replace(':','@'),attributeFilter:'SMID > 0'});getFeatureBySQLParams=new SuperMap.GetFeaturesBySQLParameters({queryParameter:getFeatureParam,datasetNames:datasetNames,fromIndex:0,toIndex:-1,maxFeatures:-1,returnContent:true});var options={eventListeners:{processCompleted:function processCompleted(getFeaturesEventArgs){_processCompleted&&_processCompleted(getFeaturesEventArgs);},processFailed:function processFailed(e){processFaild&&processFaild(e);}}};getFeatureBySQLService=new SuperMap.GetFeaturesBySQLService(url,options);getFeatureBySQLService.processAsync(getFeatureBySQLParams);}/**
  19204. * @private
  19205. * @function WebMapViewModel.prototype._queryFeatureBySQL
  19206. * @description 通过 sql 方式查询数据。
  19207. */},{key:"_queryFeatureBySQL",value:function _queryFeatureBySQL(url,layerName,processCompleted,processFaild,attributeFilter,fields,epsgCode,startRecord,recordLength,onlyAttribute){var queryParam=new SuperMap.FilterParameter({name:layerName,attributeFilter:attributeFilter});if(fields){queryParam.fields=fields;}var params={queryParams:[queryParam]};if(onlyAttribute){params.queryOption=SuperMap.QueryOption.ATTRIBUTE;}startRecord&&(params.startRecord=startRecord);recordLength&&(params.expectCount=recordLength);if(epsgCode){params.prjCoordSys={epsgCode:epsgCode};}var queryBySQLParams=new SuperMap.QueryBySQLParameters(params);var queryBySQLService=new mapbox_gl_enhance_js_default.a.supermap.QueryService(url);queryBySQLService.queryBySQL(queryBySQLParams,function(data){data.type==='processCompleted'?processCompleted(data):processFaild(data);});}},{key:"_initLegendConfigInfo",value:function _initLegendConfigInfo(layerInfo,style){if(!this._legendList[layerInfo.layerID]){this._legendList[layerInfo.layerID]={layerType:layerInfo.layerType,featureType:layerInfo.featureType,layerId:layerInfo.layerID,themeField:layerInfo.layerType==='HEAT'?layerInfo.themeSetting.weight:layerInfo.themeSetting.themeField,styleGroup:style};}}},{key:"_getFeatureProperties",value:function _getFeatureProperties(features){var properties=[];if(features&&features.length){features.forEach(function(feature){var property=feature.properties;property&&properties.push(property);});}return properties;}},{key:"_addVectorLayer",value:function _addVectorLayer(info,layerInfo,featureType){var style=this._getDataVectorTileStyle(featureType);var paint=this._transformStyleToMapBoxGl(style,featureType);var url=info.url+'/tileFeature.mvt';var origin=mapbox_gl_enhance_js_default.a.CRS.get(this.baseProjection).getOrigin();url+="?&returnAttributes=true&width=512&height=512&x={x}&y={y}&scale={scale}&origin={x:".concat(origin[0],",y:").concat(origin[1],"}");this.map.addLayer({id:lodash_uniqueid_default()(layerInfo.name+'-'),// @ts-ignore
  19208. type:style.mbglType,source:{type:'vector',tiles:[url]},'source-layer':"".concat(info.datasetName,"@").concat(info.datasourceName),paint:paint,layout:{visibility:layerInfo.visible?'visible':'none'}});}},{key:"_isMvt",value:function _isMvt(serviceUrl,datasetName){var _this13=this;return this._getDatasetsInfo(serviceUrl,datasetName).then(function(info){//判断是否和底图坐标系一直
  19209. if(info.epsgCode==_this13.baseProjection.split('EPSG:')[1]){return SuperMap.FetchRequest.get("".concat(info.url,"/tilefeature.mvt")).then(function(response){return response.json();}).then(function(result){info.isMvt=result.error&&result.error.code===400;return info;}).catch(function(){return info;});}return info;});}},{key:"_getDatasetsInfo",value:function _getDatasetsInfo(serviceUrl,datasetName){return this._getDatasources(serviceUrl).then(function(datasourceName){//判断mvt服务是否可用
  19210. var url="".concat(serviceUrl,"/data/datasources/").concat(datasourceName,"/datasets/").concat(datasetName);return SuperMap.FetchRequest.get(url).then(function(response){return response.json();}).then(function(datasetsInfo){return{epsgCode:datasetsInfo.datasetInfo.prjCoordSys.epsgCode,bounds:datasetsInfo.datasetInfo.bounds,datasourceName:datasourceName,datasetName:datasetName,url:url//返回的是原始url,没有代理。因为用于请求mvt
  19211. };});});}},{key:"_getDataVectorTileStyle",value:function _getDataVectorTileStyle(featureType){var styleParameters={radius:8,//圆点半径
  19212. fillColor:'#EE4D5A',//填充色
  19213. fillOpacity:0.9,strokeColor:'#ffffff',//边框颜色
  19214. strokeWidth:1,strokeOpacity:1,lineDash:'solid',type:'BASIC_POINT',mbglType:'circle'};if(['LINE','LINESTRING','MULTILINESTRING'].includes(featureType)){styleParameters.strokeColor='#4CC8A3';styleParameters.strokeWidth=2;styleParameters.mbglType='line';}else if(['REGION','POLYGON','MULTIPOLYGON'].includes(featureType)){styleParameters.fillColor='#826DBA';styleParameters.mbglType='fill';}return styleParameters;}},{key:"_transformFeatures",value:function _transformFeatures(features){var _this14=this;features&&features.forEach(function(feature,index){var geometryType=feature.geometry.type;var coordinates=feature.geometry.coordinates;if(geometryType==='LineString'){coordinates.forEach(function(coordinate,index){coordinate=_this14._unproject(coordinate);coordinates[index]=coordinate;},_this14);}else if(geometryType==='Point'){coordinates=_this14._unproject(coordinates);feature.geometry.coordinates=coordinates;}else if(geometryType==='MultiPolygon'||geometryType==='Polygon'){coordinates.forEach(function(coordinate,index){var coords=geometryType==='MultiPolygon'?coordinate[0]:coordinate;coords.forEach(function(latlng,index){latlng=_this14._unproject(latlng);coords[index]=latlng;});coordinates[index]=coordinate;});}features[index]=feature;},this);}},{key:"getSourceListModel",get:function get(){return this._sourceListModel;}}]);return WebMapViewModel;}(mapbox_gl_enhance_js_default.a.Evented);
  19215. // CONCATENATED MODULE: ./src/mapboxgl/web-map/interface.ts
  19216. var MAP_EVENT_NAMES=['onResize','onWebglcontextlost','onWebglcontextrestored','onRemove','onMovestart','onContextmenu','onDblclick','onClick','onTouchcancel','onTouchmove','onTouchend','onTouchstart','onDataloading','onMousemove','onMouseup','onMousedown','onSourcedataloading','onError','onData','onStyledata','onSourcedata','onMouseout','onStyledataloading','onMoveend','onMove','onRender','onZoom','onZoomstart','onZoomend','onBoxzoomstart','onBoxzoomcancel','onBoxzoomend','onRotate','onRotatestart','onRotateend','onDragend','onDrag','onDragstart','onPitch','onIdle'];;
  19217. // CONCATENATED MODULE: ./src/mapboxgl/web-map/WebMap.tsx
  19218. var WebMap_WebMap=/*#__PURE__*/function(_React$Component){_inherits(WebMap,_React$Component);function WebMap(props){var _this;_classCallCheck(this,WebMap);_this=_possibleConstructorReturn(this,_getPrototypeOf(WebMap).call(this,props));_this.map=void 0;_this.viewModel=void 0;_this.selfRef=void 0;_this.initializeWebMap=function(){var _this$props=_this.props,target=_this$props.target,serverUrl=_this$props.serverUrl,accessToken=_this$props.accessToken,accessKey=_this$props.accessKey,tiandituKey=_this$props.tiandituKey,withCredentials=_this$props.withCredentials,excludePortalProxyUrl=_this$props.excludePortalProxyUrl,mapOptions=_this$props.mapOptions,autoresize=_this$props.autoresize;_this.viewModel=new WebMapViewModel_WebMapViewModel(_this.props.mapId,{target:target,serverUrl:serverUrl,accessToken:accessToken,accessKey:accessKey,tiandituKey:tiandituKey,withCredentials:withCredentials,excludePortalProxyUrl:excludePortalProxyUrl},mapOptions);if(autoresize){addListener(_this.selfRef.current,_this.__resizeHandler);}};_this.registerEvents=function(){var _this$props2=_this.props,target=_this$props2.target,onLoad=_this$props2.onLoad;_this.viewModel.on('addlayerssucceeded',function(e){_this.setState({spinning:false});map_event.setMap(target,e.map);_this.viewModel&&map_event.setWebMap(target,_this.viewModel);map_event.emit('load-map',e.map,target);e.map.resize();_this.map=e.map;// 绑定map event
  19219. _this.bindMapEvents();/**
  19220. * @event load
  19221. * @desc webmap 加载完成之后触发。
  19222. * @property {mapboxgl.Map} map - MapBoxGL Map 对象。
  19223. */isFunction(onLoad)&&onLoad(_objectSpread2({},e,{component:_assertThisInitialized(_this)}));});_this.viewModel.on('getmapinfofailed',function(e){var onGetMapFailed=_this.props.onGetMapFailed;/**
  19224. * @event getMapFailed
  19225. * @desc 获取 WebMap 地图信息失败。
  19226. * @property {Object} error - 失败原因。
  19227. */isFunction(onGetMapFailed)&&onGetMapFailed({error:e.error});external_antd_["message"].error(e.error.message);_this.setState({spinning:false});});_this.viewModel.on('getlayerdatasourcefailed',function(e){var onGetLayerDatasourceFailed=_this.props.onGetLayerDatasourceFailed;/**
  19228. * @event getLayerDatasourceFailed
  19229. * @desc 获取图层数据失败。
  19230. * @property {Object} error - 失败原因。
  19231. * @property {Object} layer - 图层信息。
  19232. * @property {mapboxgl.Map} map - MapBoxGL Map 对象。
  19233. */isFunction(onGetLayerDatasourceFailed)&&onGetLayerDatasourceFailed({error:e.error,layer:e.layer,map:e.map});// TODO
  19234. // message.error(this.$t('webmap.getLayerInfoFailed'));
  19235. external_antd_["message"].error('获取图层信息失败!');});};_this.state={spinning:true,viewModelProps:['mapId','serverUrl','mapOptions.center','mapOptions.zoom','mapOptions.style','mapOptions.crs','mapOptions.minZoom','mapOptions.maxZoom','mapOptions.maxBounds','mapOptions.renderWorldCopies','mapOptions.bearing','mapOptions.pitch','withCredentials']};_this.selfRef=external_root_React_commonjs_react_commonjs2_react_amd_react_default.a.createRef();_this.__resizeHandler=lodash_debounce_default()(_this.__resizeHandler.bind(_assertThisInitialized(_this)),100,{leading:true});return _this;}_createClass(WebMap,[{key:"componentDidMount",value:function componentDidMount(){this.initializeWebMap();this.registerEvents();}},{key:"componentDidUpdate",value:function componentDidUpdate(prevProps){var _this2=this;this.viewModel&&this.state.viewModelProps.forEach(function(prop){var name=prop.includes('.')?prop.split('.')[1]:prop;var funcName="set".concat(lodash_upperfirst_default()(name));var propsValue=lodash_get_default()(_this2.props,prop);var prevPropsValue=lodash_get_default()(prevProps,prop);if(propsValue&&!lodash_isequal_default()(propsValue,prevPropsValue)){_this2.viewModel[funcName](propsValue);}});}},{key:"componentWillUnmount",value:function componentWillUnmount(){var _this$props3=this.props,target=_this$props3.target,autoresize=_this$props3.autoresize;map_event.deleteMap(target);map_event.deleteWebMap(target);if(autoresize&&this.selfRef.current){removeListener(this.selfRef.current,this.__resizeHandler);}}},{key:"__resizeHandler",value:function __resizeHandler(){this.resize();}},{key:"resize",value:function resize(){if(this.viewModel&&this.viewModel.resize){this.viewModel.resize();}}},{key:"bindMapEvents",value:function bindMapEvents(){var _this3=this;Object.keys(this.props).forEach(function(eventName){if(MAP_EVENT_NAMES.includes(eventName)){var name=eventName.replace('on','');_this3.bindMapEvent(name.toLowerCase(),_this3.mapEventCallback.bind(_this3));}});}},{key:"bindMapEvent",value:function bindMapEvent(eventName,eventCallback){this.map.on(eventName,eventCallback);}},{key:"mapEventCallback",value:function mapEventCallback(event){var data=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this.emitMapEvent(event.type,_objectSpread2({mapboxEvent:event},data));}},{key:"emitMapEvent",value:function emitMapEvent(name){var data=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var originEventName="on".concat(lodash_capitalize_default()(name));if(isFunction(this.props[originEventName])){this.props[originEventName](_objectSpread2({map:this.map,component:this},data));}}},{key:"render",value:function render(){var spinning=this.state.spinning;var _this$props4=this.props,target=_this$props4.target,children=_this$props4.children;return external_root_React_commonjs_react_commonjs2_react_amd_react_default.a.createElement("div",{id:target,className:"sm-component-web-map",ref:this.selfRef},children,spinning&&external_root_React_commonjs_react_commonjs2_react_amd_react_default.a.createElement(external_antd_["Spin"],{size:"large",tip:"\u5730\u56FE\u52A0\u8F7D\u4E2D...",spinning:spinning}));}}]);return WebMap;}(external_root_React_commonjs_react_commonjs2_react_amd_react_default.a.Component);WebMap_WebMap.defaultProps={target:'map',autoresize:true};/* harmony default export */ var web_map_WebMap = (WebMap_WebMap);
  19236. // CONCATENATED MODULE: ./src/mapboxgl/web-map/MapViewModal.ts
  19237. var MapViewModal_MapViewModal=/*#__PURE__*/function(_mapboxgl$Evented){_inherits(MapViewModal,_mapboxgl$Evented);function MapViewModal(options){var _this;var mapOptions=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{style:{version:8,sources:{},layers:[]}};_classCallCheck(this,MapViewModal);_this=_possibleConstructorReturn(this,_getPrototypeOf(MapViewModal).call(this));_this.map=void 0;_this.mapOptions=void 0;_this.tiandituKey=void 0;_this.target=void 0;_this.center=void 0;_this.zoom=void 0;_this.mapOptions=Object.assign({style:{version:8,sources:{},layers:[]}},mapOptions);_this.tiandituKey=options.tiandituKey||'';_this.target=options.target||'map';_this.center=mapOptions.center||[];_this.zoom=mapOptions.zoom;_this._createMap();return _this;}_createClass(MapViewModal,[{key:"_createMap",value:function _createMap(){var _this2=this;if(this.map){this.map.remove();this.center=[];this.zoom=null;}this.mapOptions.container=this.target;setTimeout(function(){_this2.map=new mapbox_gl_enhance_js_default.a.Map(_this2.mapOptions);_this2.map.on('load',function(){_this2.fire('addlayerssucceeded',{map:_this2.map});});},0);return;}/**
  19238. * @function WebMapViewModel.prototype.resize
  19239. * @description Map 更新大小。
  19240. */},{key:"resize",value:function resize(){this.map&&this.map.resize();}/**
  19241. * @function WebMapViewModel.prototype.setCRS
  19242. * @description 设置地图的投影。
  19243. * @param {Number} crs - 地图投影。
  19244. */},{key:"setCrs",value:function setCrs(crs){if(this.map){this.mapOptions.crs=crs;//@ts-ignore
  19245. crs&&this.map.setCRS(mapbox_gl_enhance_js_default.a.CRS.get(crs));}}/**
  19246. * @function WebMapViewModel.prototype.setZoom
  19247. * @description 设置地图的缩放级别。
  19248. * @param {Number} zoom - 地图缩放级别。
  19249. */},{key:"setZoom",value:function setZoom(zoom){if(this.map){this.mapOptions.zoom=zoom;(zoom||zoom===0)&&this.map.setZoom(zoom);}}/**
  19250. * @function WebMapViewModel.prototype.setCenter
  19251. * @description 设置地图的中心点。
  19252. * @param {Array} center - 地图中心点。
  19253. */},{key:"setCenter",value:function setCenter(center){if(this.map){this.mapOptions.center=center;center&&center.length>0&&this.map.setCenter(center);}}/**
  19254. * @function WebMapViewModel.prototype.setMaxBounds
  19255. * @description 设置地图的最大范围。
  19256. * @param {Array} maxBounds - 地图最大范围。
  19257. */},{key:"setMaxBounds",value:function setMaxBounds(maxBounds){if(this.map){this.mapOptions.maxBounds=maxBounds;maxBounds&&maxBounds.length>0&&this.map.setMaxBounds(maxBounds);}}/**
  19258. * @function WebMapViewModel.prototype.setMinZoom
  19259. * @description 设置地图的最小级别。
  19260. * @param {Number} minZoom - 地图最小级别。
  19261. */},{key:"setMinZoom",value:function setMinZoom(minZoom){if(this.map){this.mapOptions.minZoom=minZoom;(minZoom||minZoom===0)&&this.map.setMinZoom(minZoom);}}/**
  19262. * @function WebMapViewModel.prototype.setMaxZoom
  19263. * @description 设置地图的最大级别。
  19264. * @param {Number} maxZoom - 地图最大级别。
  19265. */},{key:"setMaxZoom",value:function setMaxZoom(maxZoom){if(this.map){this.mapOptions.maxZoom=maxZoom;(maxZoom||maxZoom===0)&&this.map.setMinZoom(maxZoom);}}/**
  19266. * @function WebMapViewModel.prototype.setRenderWorldCopies
  19267. * @description 设置地图的平铺。
  19268. * @param {Boolean} renderWorldCopies - 地图是否平铺。
  19269. */},{key:"setRenderWorldCopies",value:function setRenderWorldCopies(renderWorldCopies){if(this.map){this.mapOptions.renderWorldCopies=renderWorldCopies;renderWorldCopies&&this.map.setRenderWorldCopies(renderWorldCopies);}}/**
  19270. * @function WebMapViewModel.prototype.setBearing
  19271. * @description 设置地图的方位。
  19272. * @param {Number} bearing - 地图的初始方位。
  19273. */},{key:"setBearing",value:function setBearing(bearing){if(this.map){this.mapOptions.bearing=bearing;(bearing||bearing===0)&&this.map.setBearing(bearing);}}/**
  19274. * @function WebMapViewModel.prototype.setPitch
  19275. * @description 设置地图的俯仰。
  19276. * @param {Number} pitch - 地图的初始俯仰。
  19277. */},{key:"setPitch",value:function setPitch(pitch){if(this.map){this.mapOptions.pitch=pitch;(pitch||pitch===0)&&this.map.setPitch(pitch);}}},{key:"addSprites",value:function addSprites(sourceId,sprite){var _this$map;if((_this$map=this.map)===null||_this$map===void 0?void 0:_this$map.style){this.map.style.addSprite(sourceId,sprite);}}},{key:"addGlyphs",value:function addGlyphs(sourceId,glyph){var _this$map2;if((_this$map2=this.map)===null||_this$map2===void 0?void 0:_this$map2.style){this.map.style.addGlyphs(sourceId,glyph);}}}]);return MapViewModal;}(mapbox_gl_enhance_js_default.a.Evented);/* harmony default export */ var web_map_MapViewModal = (MapViewModal_MapViewModal);
  19278. // CONCATENATED MODULE: ./src/mapboxgl/web-map/Map.tsx
  19279. var Map_Map=/*#__PURE__*/function(_Component){_inherits(Map,_Component);function Map(props){var _this;_classCallCheck(this,Map);_this=_possibleConstructorReturn(this,_getPrototypeOf(Map).call(this,props));_this.selfRef=void 0;_this.viewModel=void 0;_this.map=void 0;_this.viewModelProps=['mapOptions.center','mapOptions.zoom','mapOptions.crs','mapOptions.minZoom','mapOptions.maxZoom','mapOptions.maxBounds','mapOptions.renderWorldCopies','mapOptions.bearing','mapOptions.pitch'];_this.initializeWebMap=function(){var _this$props=_this.props,target=_this$props.target,tiandituKey=_this$props.tiandituKey,mapOptions=_this$props.mapOptions,autoresize=_this$props.autoresize;_this.viewModel=new web_map_MapViewModal({target:target,tiandituKey:tiandituKey},mapOptions);if(autoresize){addListener(_this.selfRef.current,_this.__resizeHandler);}};_this.registerEvents=function(){var _this$props2=_this.props,target=_this$props2.target,onLoad=_this$props2.onLoad;_this.viewModel.on('addlayerssucceeded',function(e){_this.setState({spinning:false});map_event.setMap(target,e.map);_this.viewModel&&map_event.setWebMap(target,_this.viewModel);map_event.emit('load-map',e.map,target);e.map.resize();_this.map=e.map;if(false){}// 绑定map event
  19280. _this.bindMapEvents();/**
  19281. * @event load
  19282. * @desc webmap 加载完成之后触发。
  19283. * @property {mapboxgl.Map} map - MapBoxGL Map 对象。
  19284. */isFunction(onLoad)&&onLoad(_objectSpread2({},e,{component:_assertThisInitialized(_this)}));});};_this.mapEventCallback=function(event){var data=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_this.emitMapEvent(event.type,_objectSpread2({mapboxEvent:event},data));};_this.state={spinning:true};_this.selfRef=external_root_React_commonjs_react_commonjs2_react_amd_react_default.a.createRef();_this.__resizeHandler=lodash_debounce_default()(_this.__resizeHandler.bind(_assertThisInitialized(_this)),100,{leading:true});return _this;}_createClass(Map,[{key:"componentDidMount",value:function componentDidMount(){this.initializeWebMap();this.registerEvents();}},{key:"componentDidUpdate",value:function componentDidUpdate(prevProps){var _this2=this;this.viewModel&&this.viewModelProps.forEach(function(prop){var name=prop.includes('.')?prop.split('.')[1]:prop;var funcName="set".concat(lodash_upperfirst_default()(name));var propsValue=lodash_get_default()(_this2.props,prop);var prevPropsValue=lodash_get_default()(prevProps,prop);if(propsValue&&!lodash_isequal_default()(propsValue,prevPropsValue)){_this2.viewModel[funcName](propsValue);}});var _this$props3=this.props,sprites=_this$props3.sprites,glyphs=_this$props3.glyphs;for(var id in sprites){if(prevProps.sprites[id]!==sprites[id]){this.viewModel.addSprites(id,sprites[id]);}}for(var _id in glyphs){if(prevProps.glyphs[_id]!==glyphs[_id]){this.viewModel.addGlyphs(_id,glyphs[_id]);}}}},{key:"componentWillUnmount",value:function componentWillUnmount(){var _this$props4=this.props,target=_this$props4.target,autoresize=_this$props4.autoresize;map_event.deleteMap(target);map_event.deleteWebMap(target);if(autoresize&&this.selfRef.current){removeListener(this.selfRef.current,this.__resizeHandler);}}},{key:"bindMapEvents",value:function bindMapEvents(){var _this3=this;Object.keys(this.props).forEach(function(eventName){if(MAP_EVENT_NAMES.includes(eventName)){var name=eventName.replace('on','');_this3.bindMapEvent(name.toLowerCase(),_this3.mapEventCallback);}});}},{key:"bindMapEvent",value:function bindMapEvent(eventName,eventCallback){this.map.on(eventName,eventCallback);}},{key:"emitMapEvent",value:function emitMapEvent(name){var data=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var originEventName="on".concat(lodash_capitalize_default()(name));if(isFunction(this.props[originEventName])){this.props[originEventName](_objectSpread2({map:this.map,component:this},data));}}},{key:"__resizeHandler",value:function __resizeHandler(){this.resize();}},{key:"resize",value:function resize(){if(this.viewModel&&this.viewModel.resize){this.viewModel.resize();}}},{key:"render",value:function render(){var spinning=this.state.spinning;var _this$props5=this.props,target=_this$props5.target,children=_this$props5.children;return external_root_React_commonjs_react_commonjs2_react_amd_react_default.a.createElement("div",{id:target,className:"sm-component-map",ref:this.selfRef},!spinning&&children);}}]);return Map;}(external_root_React_commonjs_react_commonjs2_react_amd_react_["Component"]);Map_Map.defaultProps={target:'map',autoresize:true};/* harmony default export */ var web_map_Map = (Map_Map);
  19285. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
  19286. function _objectWithoutPropertiesLoose(source, excluded) {
  19287. if (source == null) return {};
  19288. var target = {};
  19289. var sourceKeys = Object.keys(source);
  19290. var key, i;
  19291. for (i = 0; i < sourceKeys.length; i++) {
  19292. key = sourceKeys[i];
  19293. if (excluded.indexOf(key) >= 0) continue;
  19294. target[key] = source[key];
  19295. }
  19296. return target;
  19297. }
  19298. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
  19299. function _objectWithoutProperties(source, excluded) {
  19300. if (source == null) return {};
  19301. var target = _objectWithoutPropertiesLoose(source, excluded);
  19302. var key, i;
  19303. if (Object.getOwnPropertySymbols) {
  19304. var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
  19305. for (i = 0; i < sourceSymbolKeys.length; i++) {
  19306. key = sourceSymbolKeys[i];
  19307. if (excluded.indexOf(key) >= 0) continue;
  19308. if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
  19309. target[key] = source[key];
  19310. }
  19311. }
  19312. return target;
  19313. }
  19314. // EXTERNAL MODULE: ./node_modules/recompose/compose.js
  19315. var compose = __webpack_require__(2);
  19316. var compose_default = /*#__PURE__*/__webpack_require__.n(compose);
  19317. // EXTERNAL MODULE: ./node_modules/recompose/wrapDisplayName.js
  19318. var wrapDisplayName = __webpack_require__(24);
  19319. var wrapDisplayName_default = /*#__PURE__*/__webpack_require__.n(wrapDisplayName);
  19320. // EXTERNAL MODULE: ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js
  19321. var hoist_non_react_statics_cjs = __webpack_require__(25);
  19322. var hoist_non_react_statics_cjs_default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics_cjs);
  19323. // CONCATENATED MODULE: ./src/mapboxgl/_mixin/map-getter.tsx
  19324. function mapGetter(WrappedComponent){var MapGetter=/*#__PURE__*/function(_React$Component){_inherits(MapGetter,_React$Component);function MapGetter(props){var _this;_classCallCheck(this,MapGetter);_this=_possibleConstructorReturn(this,_getPrototypeOf(MapGetter).call(this,props));_this.map=void 0;_this.webmap=void 0;_this.instanceRef=void 0;_this.getComponentInstance=void 0;_this.loadMapSucceed=_this.loadMapSucceed.bind(_assertThisInitialized(_this));_this.deleteMapSucceed=_this.deleteMapSucceed.bind(_assertThisInitialized(_this));_this.getComponentInstance=getComponentInstance.bind(_assertThisInitialized(_this));return _this;}_createClass(MapGetter,[{key:"componentDidMount",value:function componentDidMount(){var targetName=this.getTargetName();if(map_event.getMap(targetName)){this.loadMap(targetName);}map_event.on('load-map',this.loadMapSucceed);global_event.on('delete-map',this.deleteMapSucceed);}},{key:"componentDidUpdate",value:function componentDidUpdate(prevProps){var mapTarget=this.props.mapTarget;var prevMapTarget=prevProps.mapTarget;if(mapTarget&&prevMapTarget&&mapTarget!==prevMapTarget){this.mapTargetChanged(mapTarget);}}},{key:"componentWillUnmount",value:function componentWillUnmount(){map_event.off('load-map',this.loadMapSucceed);global_event.off('delete-map',this.deleteMapSucceed);}},{key:"getTargetName",value:function getTargetName(){/**
  19325. * 便于区分存在多个map时,子组件对应的map的渲染;
  19326. * map 和 webmap 的 props 属性是 target 其他组件都叫 mapTarget
  19327. * 如果子组件包裹在 map 组件里面,若没有传 mapTarget, 则 targetName 直接取父元素的target 的值
  19328. * 如果子组件和 map 同层级,且没有设置 mapTarget 时,则默认渲染到第一个 map 上
  19329. *
  19330. */ // const selfParent = this._reactInternalInstance._currentElement._owner._instance;
  19331. // console.log(selfParent);
  19332. // console.log('selfParent: ', selfParent);
  19333. // const parentTarget =
  19334. // selfParent && selfParent.name.toLowerCase() === 'smwebmap' &&
  19335. // selfParent.target;
  19336. // return this.props.mapTarget || parentTarget || Object.keys(mapEvent.getAllMaps())[0];
  19337. var maps=map_event.getAllMaps();return this.props.mapTarget||getFirstMapTarget(maps);}},{key:"loadMapSucceed",value:function loadMapSucceed(map,target){var targetName=this.getTargetName();if(target===targetName){this.loadMap(target);}}},{key:"mapTargetChanged",value:function mapTargetChanged(target){// 多个map切换的时候,需要删除该组件与前一个map的图层绑定, 如果新的target没有对应的map,那么默认绑定第一个地图
  19338. var maps=map_event.getAllMaps();var targetName=getFirstMapTarget(maps);var firstMap=map_event.getMap(targetName);this.resetData();if(map_event.getMap(target)||firstMap){this.loadMap(target);}}},{key:"loadMap",value:function loadMap(targetName){this.map=map_event.getMap(targetName);this.webmap=map_event.getWebMap(targetName);callHook(this.instanceRef,'loaded',this.map);// 控制与map组件同级的组件的显示加载
  19339. // setTimeout(() => {
  19340. // /**
  19341. // * @event loaded
  19342. // * @desc 组件加载渲染完成之后触发。
  19343. // */
  19344. // this.$emit('loaded');
  19345. // }, 0);
  19346. }},{key:"deleteMapSucceed",value:function deleteMapSucceed(target){var targetName=this.getTargetName();if(target===targetName){this.resetData();}}},{key:"resetData",value:function resetData(){this.map=null;this.webmap=null;callHook(this.instanceRef,'removed',this.map);}},{key:"mapNotLoadedTip",value:function mapNotLoadedTip(){if(!this.map){external_antd_["message"].destroy();// TODO
  19347. // message.warning(this.$t('warning.unassociatedMap'));
  19348. external_antd_["message"].warning('您需要配置关联地图!');return true;}return false;}},{key:"render",value:function render(){return external_root_React_commonjs_react_commonjs2_react_amd_react_default.a.createElement(WrappedComponent,Object.assign({},this.props,{ref:this.getComponentInstance,mapNotLoadedTip:this.mapNotLoadedTip}));}}]);return MapGetter;}(external_root_React_commonjs_react_commonjs2_react_amd_react_default.a.Component);MapGetter.displayName=wrapDisplayName_default()(WrappedComponent,'mapGetter');return hoist_non_react_statics_cjs_default()(MapGetter,WrappedComponent);}
  19349. // CONCATENATED MODULE: ./src/mapboxgl/web-map/Source.tsx
  19350. var _dec,_class;var Source_Source=(_dec=compose_default()(mapGetter),_dec(_class=/*#__PURE__*/function(_React$PureComponent){_inherits(Source,_React$PureComponent);function Source(){_classCallCheck(this,Source);return _possibleConstructorReturn(this,_getPrototypeOf(Source).apply(this,arguments));}_createClass(Source,[{key:"componentDidUpdate",value:function componentDidUpdate(){console.log("source \"".concat(this.props.id,"\" updated"));}},{key:"loaded",value:function loaded(map){var _this$props=this.props,id=_this$props.id,mapNotLoadedTip=_this$props.mapNotLoadedTip,sourceOption=_objectWithoutProperties(_this$props,["id","mapNotLoadedTip"]);if(map.getSource(id)){console.log("There is already a source with the id \"".concat(id,"\""));return;}map.addSource(id,sourceOption);}},{key:"render",value:function render(){return null;}}]);return Source;}(external_root_React_commonjs_react_commonjs2_react_amd_react_default.a.PureComponent))||_class);
  19351. // CONCATENATED MODULE: ./src/mapboxgl/_mixin/base-layer.tsx
  19352. function withLayer(WrappedComponent){var BaseLayer=/*#__PURE__*/function(_PureComponent){_inherits(BaseLayer,_PureComponent);function BaseLayer(props){var _this;_classCallCheck(this,BaseLayer);_this=_possibleConstructorReturn(this,_getPrototypeOf(BaseLayer).call(this,props));_this.map=void 0;_this.instanceRef=void 0;_this.eventList=void 0;_this.registerEvents=[];_this.overLayer=void 0;_this.getComponentInstance=void 0;_this.$_emitEvent=function(name){var data=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var originEventName="on".concat(lodash_capitalize_default()(name));if(isFunction(_this.props[originEventName])){_this.props[originEventName](_objectSpread2({map:_this.map,layerId:_this.props.layerId},data));}};_this.$_emitLayerMapEvent=function(event){_this.$_emitEvent(event.type,{mapboxEvent:event});};_this.$_bindLayerEvents=function(){Object.keys(_this.props).forEach(function(eventName){if(_this.eventList.includes(eventName)){var layerId=_this.props.layerId;// @ts-ignore
  19353. var layer=_this.map.overlayLayersManager[layerId];var name=eventName.replace('on','');var registerEventName=name.toLowerCase();_this.registerEvents.push(registerEventName);if(layer){_this.overLayer=layer;layer.on(registerEventName,_this.$_emitLayerMapEvent);}else{_this.map.on(registerEventName,layerId,_this.$_emitLayerMapEvent);}}});};_this.$_unbindLayerEvents=function(events){if(_this.map){events.forEach(function(eventName){!_this.overLayer&&_this.map.off(eventName,_this.props.layerId,_this.$_emitLayerMapEvent);});}};_this.move=function(beforeId){_this.map.moveLayer(_this.props.layerId,beforeId);_this.$_emitEvent('layer-moved',{beforeId:beforeId});};_this.remove=function(){var layerId=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_this.props.layerId;if(_this.registerEvents&&_this.registerEvents.length){_this.$_unbindLayerEvents(_this.registerEvents);}_this.map.removeLayer(layerId);_this.$_emitEvent('layer-removed');};_this.eventList=['onMousedown','onMouseup','onClick','onDblclick','onMousemove','onMouseenter','onMouseleave','onMouseover','onMouseout','onContextmenu','onTouchstart','onTouchend','onTouchcancel'];_this.getComponentInstance=getComponentInstance.bind(_assertThisInitialized(_this));return _this;}_createClass(BaseLayer,[{key:"componentDidUpdate",value:function componentDidUpdate(prevProps){if(prevProps.minzoom!==this.props.minzoom||prevProps.maxzoom!==this.props.maxzoom){this.map.setLayerZoomRange(this.props.layerId,this.props.minzoom,this.props.maxzoom);}if(prevProps.filter!==this.props.filter){this.map.setFilter(this.props.layerId,this.props.filter);}if(this.props.layout&&prevProps.layout!==this.props.layout){for(var _i=0,_Object$keys=Object.keys(this.props.layout);_i<_Object$keys.length;_i++){var prop=_Object$keys[_i];this.map.setLayoutProperty(this.props.layerId,prop,this.props.layout[prop]);}}if(this.props.paint&&prevProps.paint!==this.props.paint){for(var _i2=0,_Object$keys2=Object.keys(this.props.paint);_i2<_Object$keys2.length;_i2++){var _prop=_Object$keys2[_i2];this.map.setPaintProperty(this.props.layerId,_prop,this.props.paint[_prop]);}}if(this.props.metadata&&prevProps.metadata!==this.props.metadata){var layer=this.map.getLayer(this.props.layerId),metadata=layer.metadata;if(metadata){Object.assign(layer.metadata,this.props.metadata);}else{layer.metadata=this.props.metadata;}}if(prevProps.before!==this.props.before){this.move(this.props.before);}}},{key:"componentWillUnmount",value:function componentWillUnmount(){this.remove();}},{key:"loaded",value:function loaded(map){this.map=map;callHook(this.instanceRef,'loaded',this.map);this.$_bindLayerEvents();}},{key:"removed",value:function removed(map){if(this.props.layerId&&this.map){this.remove();}this.map=map;callHook(this.instanceRef,'removed',this.map);}},{key:"render",value:function render(){// const { layerId } = this.props;
  19354. // const id = source || layerId;
  19355. // const sourceLoaded =
  19356. // this.map && layerId ? this.map.isSourceLoaded(layerId) : false;
  19357. // const mapLayer = this.map ? this.map.getLayer(layerId) : null;
  19358. // const mapSource =
  19359. // this.map && layerId ? this.map.getSource(layerId) : null;
  19360. var newProps=Object.assign({},this.props,{// sourceLoaded,
  19361. // mapLayer,
  19362. // mapSource
  19363. });return external_root_React_commonjs_react_commonjs2_react_amd_react_default.a.createElement(WrappedComponent,Object.assign({},newProps,{ref:this.getComponentInstance,move:this.move,remove:this.remove}));}}]);return BaseLayer;}(external_root_React_commonjs_react_commonjs2_react_amd_react_["PureComponent"]);BaseLayer.displayName=wrapDisplayName_default()(WrappedComponent,'withLayer');BaseLayer.defaultProps={layerId:lodash_uniqueid_default()("".concat(WrappedComponent.name.toLowerCase(),"-")),minzoom:0,maxzoom:22,before:undefined};;return hoist_non_react_statics_cjs_default()(BaseLayer,WrappedComponent);};
  19364. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/Layer.tsx
  19365. var Layer_dec,Layer_class;var Layer_Layer=(Layer_dec=compose_default()(mapGetter,withLayer),Layer_dec(Layer_class=/*#__PURE__*/function(_React$Component){_inherits(Layer,_React$Component);function Layer(){_classCallCheck(this,Layer);return _possibleConstructorReturn(this,_getPrototypeOf(Layer).apply(this,arguments));}_createClass(Layer,[{key:"loaded",value:function loaded(map){var _this$props=this.props,type=_this$props.type,source=_this$props.source,layerId=_this$props.layerId,minzoom=_this$props.minzoom,maxzoom=_this$props.maxzoom,filter=_this$props.filter,layout=_this$props.layout,paint=_this$props.paint,metadata=_this$props.metadata,before=_this$props.before;if(map.getLayer(layerId)){console.error("There is already a layer with the id \"".concat(layerId,"\""));return;}if(typeof source==='string'&&!map.getSource(source)){console.error("Source \"".concat(source,"\" is not loaded"));return;}if(type!=='background'&&!source){console.error("Source is required unless type is background");return;}var layerOption={id:layerId,type:type};source&&(layerOption.source=source);minzoom!==undefined&&(layerOption.minzoom=minzoom);maxzoom!==undefined&&(layerOption.maxzoom=maxzoom);filter&&(layerOption.filter=filter);layout&&(layerOption.layout=layout);paint&&(layerOption.paint=paint);metadata&&(layerOption.metadata=metadata);this.props['source-layer']&&(layerOption['source-layer']=this.props['source-layer']);map.addLayer(layerOption,before);}},{key:"removed",value:function removed(){}},{key:"render",value:function render(){return null;}}]);return Layer;}(external_root_React_commonjs_react_commonjs2_react_amd_react_default.a.Component))||Layer_class);
  19366. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/geojson/GeojsonLayerViewModel.js
  19367. var GeojsonLayerViewModel_GeojsonLayerViewModel=/*#__PURE__*/function(_mapboxgl$Evented){_inherits(GeojsonLayerViewModel,_mapboxgl$Evented);function GeojsonLayerViewModel(map,GeojsonLayerOptions){var _this;_classCallCheck(this,GeojsonLayerViewModel);_this=_possibleConstructorReturn(this,_getPrototypeOf(GeojsonLayerViewModel).call(this));if(!map){throw new Error('map is requierd');}_this.map=map;var layerStyle=GeojsonLayerOptions.layerStyle,data=GeojsonLayerOptions.data,layerId=GeojsonLayerOptions.layerId;_this.data=data;_this.layerStyle=layerStyle;_this.layerId=layerId;_this.data&&_this._addLayer();return _this;}_createClass(GeojsonLayerViewModel,[{key:"setData",value:function setData(data){if(!data||!this.map.getSource(this.layerId)){return;}this.data=data;if(this.layerId&&!this.map.getSource(this.layerId)){this._addLayer();}else{this.map.getSource(this.layerId).setData(data);}}},{key:"setLayerStyle",value:function setLayerStyle(layerStyle){if(!layerStyle||!this.map.getSource(this.layerId)){return;}var paint=layerStyle.paint,layout=layerStyle.layout;for(var _i=0,_Object$keys=Object.keys(paint);_i<_Object$keys.length;_i++){var prop=_Object$keys[_i];this.map.setPaintProperty(this.layerId,prop,paint[prop]);}for(var _i2=0,_Object$keys2=Object.keys(layout);_i2<_Object$keys2.length;_i2++){var _prop=_Object$keys2[_i2];this.map.setLayoutProperty(this.layerId,_prop,layout[_prop]);}this.layerStyle=layerStyle;}},{key:"_addLayer",value:function _addLayer(){if(!(this.layerStyle instanceof Object))throw new Error('layerStyle 不能为空');var _this$layerStyle=this.layerStyle,paint=_this$layerStyle.paint,layout=_this$layerStyle.layout;this.map.addLayer({id:this.layerId,type:this._getLayerType(paint),source:{type:'geojson',data:this.data},layout:layout||{},paint:paint||{}});}},{key:"_getLayerType",value:function _getLayerType(){var paint=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var keys=Object.keys(paint).join(' ');var reg=/circle-|line-|fill-extrusion-|fill-+/i;var matchType=keys.match(reg);var type=matchType?matchType[0]:'';return type.substr(0,type.length-1);}}]);return GeojsonLayerViewModel;}(mapbox_gl_enhance_js_default.a.Evented);
  19368. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/geojson/GeojsonLayer.tsx
  19369. var GeojsonLayer_dec,GeojsonLayer_class,_temp;var GeojsonLayer_GeojsonLayer=(GeojsonLayer_dec=compose_default()(mapGetter,withLayer),GeojsonLayer_dec(GeojsonLayer_class=(_temp=/*#__PURE__*/function(_Component){_inherits(GeojsonLayer,_Component);function GeojsonLayer(){var _getPrototypeOf2;var _this;_classCallCheck(this,GeojsonLayer);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_possibleConstructorReturn(this,(_getPrototypeOf2=_getPrototypeOf(GeojsonLayer)).call.apply(_getPrototypeOf2,[this].concat(args)));_this.viewModel=void 0;return _this;}_createClass(GeojsonLayer,[{key:"componentDidUpdate",value:function componentDidUpdate(prevProps){if(prevProps.layerStyle!==this.props.layerStyle){this.viewModel&&this.viewModel.setLayerStyle(this.props.layerStyle);}if(!lodash_isequal_default()(this.props.data,prevProps.data)&&this.viewModel){this.viewModel.setData(this.props.data);}}},{key:"loaded",value:function loaded(map){this.viewModel=new GeojsonLayerViewModel_GeojsonLayerViewModel(map,this.props);}},{key:"render",value:function render(){return null;}}]);return GeojsonLayer;}(external_root_React_commonjs_react_commonjs2_react_amd_react_["Component"]),_temp))||GeojsonLayer_class);
  19370. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/raster-tile/RasterTileLayerViewModel.js
  19371. var RasterTileLayerViewModel_RasterTileLayerViewModel=/*#__PURE__*/function(_mapboxgl$Evented){_inherits(RasterTileLayerViewModel,_mapboxgl$Evented);function RasterTileLayerViewModel(map,rasterLayerOptions){var _this;_classCallCheck(this,RasterTileLayerViewModel);_this=_possibleConstructorReturn(this,_getPrototypeOf(RasterTileLayerViewModel).call(this));_this.map=map;var layerId=rasterLayerOptions.layerId,tileSize=rasterLayerOptions.tileSize,mapUrl=rasterLayerOptions.mapUrl,tiles=rasterLayerOptions.tiles,bounds=rasterLayerOptions.bounds,_rasterLayerOptions$m=rasterLayerOptions.minZoom,minZoom=_rasterLayerOptions$m===void 0?0:_rasterLayerOptions$m,_rasterLayerOptions$m2=rasterLayerOptions.maxZoom,maxZoom=_rasterLayerOptions$m2===void 0?22:_rasterLayerOptions$m2,attribution=rasterLayerOptions.attribution,_rasterLayerOptions$s=rasterLayerOptions.scheme,scheme=_rasterLayerOptions$s===void 0?'xyz':_rasterLayerOptions$s,_rasterLayerOptions$v=rasterLayerOptions.visible,visible=_rasterLayerOptions$v===void 0?true:_rasterLayerOptions$v,_rasterLayerOptions$o=rasterLayerOptions.opacity,opacity=_rasterLayerOptions$o===void 0?1:_rasterLayerOptions$o,before=rasterLayerOptions.before;_this.layerId=layerId;_this.tileSize=tileSize;_this.mapUrl=mapUrl;_this.tiles=tiles;_this.bounds=bounds;_this.minZoom=minZoom;_this.maxZoom=maxZoom;_this.attribution=attribution;_this.scheme=scheme;_this.opacity=opacity;_this.visibility=visible?'visible':'none';_this.before=before;// enhance扩展,传iserver标识是iserver rest map
  19372. _this.rasterSource='';_this._init();return _this;}_createClass(RasterTileLayerViewModel,[{key:"_init",value:function _init(){if(this.mapUrl){this._addRestMapLayer();}else{this._addLayer();}}},{key:"_addRestMapLayer",value:function _addRestMapLayer(){var _this2=this;var service=new mapbox_gl_enhance_js_default.a.supermap.MapService(this.mapUrl);service.getMapInfo(function(mapObj){if(!_this2.layerId){_this2.layerId=mapObj.name;}if(!_this2.tileSize&&mapObj.viewer){_this2.tileSize=mapObj.viewer.width;}var bounds=mapObj.bounds;if(!_this2.bounds&&bounds){_this2.bounds=[bounds.left,bounds.bottom,bounds.right,bounds.top];}_this2.rasterSource='iserver';_this2.tiles=[_this2.mapUrl];_this2._addLayer(mapObj);});}},{key:"_addLayer",value:function _addLayer(){this.map.addLayer({id:this.layerId||"raster-layer-".concat(new Date().getTime()),type:'raster',layout:{visibility:this.visibility},paint:{'raster-opacity':this.opacity},source:{bounds:this.bounds||[-180,-85.051129,180,85.051129],type:'raster',tileSize:this.tileSize||256,tiles:this.tiles,rasterSource:this.rasterSource,minzoom:this.minZoom,maxzoom:this.maxZoom,scheme:this.scheme}},this.before);}}]);return RasterTileLayerViewModel;}(mapbox_gl_enhance_js_default.a.Evented);
  19373. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/raster-tile/RasterTileLayer.tsx
  19374. var RasterTileLayer_dec,RasterTileLayer_class,_class2,RasterTileLayer_temp;var RasterTileLayer_RasterTileLayer=(RasterTileLayer_dec=compose_default()(mapGetter,withLayer),RasterTileLayer_dec(RasterTileLayer_class=(RasterTileLayer_temp=_class2=/*#__PURE__*/function(_React$Component){_inherits(RasterTileLayer,_React$Component);function RasterTileLayer(){var _getPrototypeOf2;var _this;_classCallCheck(this,RasterTileLayer);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_possibleConstructorReturn(this,(_getPrototypeOf2=_getPrototypeOf(RasterTileLayer)).call.apply(_getPrototypeOf2,[this].concat(args)));_this.viewModel=void 0;return _this;}_createClass(RasterTileLayer,[{key:"loaded",value:function loaded(map){this.viewModel=new RasterTileLayerViewModel_RasterTileLayerViewModel(map,this.props);}},{key:"removed",value:function removed(){this.viewModel=null;}},{key:"render",value:function render(){return null;}}]);return RasterTileLayer;}(external_root_React_commonjs_react_commonjs2_react_amd_react_default.a.Component),_class2.defaultProps={scheme:'xyz',visible:true,opacity:1},RasterTileLayer_temp))||RasterTileLayer_class);
  19375. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/vector-tile/VectorTileLayer.tsx
  19376. var VectorTileLayer_dec,VectorTileLayer_class;var VectorTileLayer_VectorTileLayer=(VectorTileLayer_dec=compose_default()(mapGetter,withLayer),VectorTileLayer_dec(VectorTileLayer_class=/*#__PURE__*/function(_React$Component){_inherits(VectorTileLayer,_React$Component);function VectorTileLayer(){_classCallCheck(this,VectorTileLayer);return _possibleConstructorReturn(this,_getPrototypeOf(VectorTileLayer).apply(this,arguments));}_createClass(VectorTileLayer,[{key:"loaded",value:function loaded(map){if(map&&map['addStyle']){map['addStyle'](this.props.styleOptions,this.props.before);}}},{key:"render",value:function render(){return null;}}]);return VectorTileLayer;}(external_root_React_commonjs_react_commonjs2_react_amd_react_default.a.Component))||VectorTileLayer_class);
  19377. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/unique-theme/UniqueThemeLayerViewModel.js
  19378. var UniqueThemeLayerViewModel_UniqueThemeLayerViewModel=/*#__PURE__*/function(_mapboxgl$Evented){_inherits(UniqueThemeLayerViewModel,_mapboxgl$Evented);function UniqueThemeLayerViewModel(map,themeProps){var _this;_classCallCheck(this,UniqueThemeLayerViewModel);_this=_possibleConstructorReturn(this,_getPrototypeOf(UniqueThemeLayerViewModel).call(this));_this.map=map;var options=themeProps.options,layerId=themeProps.layerId,data=themeProps.data,layerName=themeProps.layerName;_this.layerName=layerName||layerId;options.id=options.id||layerId;_this.options=options;_this.data=data||[];_this._init();return _this;}_createClass(UniqueThemeLayerViewModel,[{key:"_init",value:function _init(){this.themeLayer=new mapbox_gl_enhance_js_default.a.supermap.UniqueThemeLayer(this.layerName,this.options);this.map.addLayer(this.themeLayer);if(this.data&&this.data.length){this.setData(this.data);}}},{key:"setData",value:function setData(data){this.themeLayer.addFeatures(data);}}]);return UniqueThemeLayerViewModel;}(mapbox_gl_enhance_js_default.a.Evented);
  19379. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/unique-theme/UniqueThemeLayer.tsx
  19380. var UniqueThemeLayer_dec,UniqueThemeLayer_class,UniqueThemeLayer_class2,UniqueThemeLayer_temp;var UniqueThemeLayer_UniqueThemeLayer=(UniqueThemeLayer_dec=compose_default()(mapGetter,withLayer),UniqueThemeLayer_dec(UniqueThemeLayer_class=(UniqueThemeLayer_temp=UniqueThemeLayer_class2=/*#__PURE__*/function(_React$Component){_inherits(UniqueThemeLayer,_React$Component);function UniqueThemeLayer(){var _getPrototypeOf2;var _this;_classCallCheck(this,UniqueThemeLayer);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_possibleConstructorReturn(this,(_getPrototypeOf2=_getPrototypeOf(UniqueThemeLayer)).call.apply(_getPrototypeOf2,[this].concat(args)));_this.viewModel=void 0;return _this;}_createClass(UniqueThemeLayer,[{key:"componentDidUpdate",value:function componentDidUpdate(prevProps){var data=this.props.data;if(!lodash_isequal_default()(prevProps.data,data)&&this.viewModel){this.viewModel.setData(data);}}},{key:"loaded",value:function loaded(map){var onLoad=this.props.onLoad;this.viewModel=new UniqueThemeLayerViewModel_UniqueThemeLayerViewModel(map,this.props);isFunction(onLoad)&&onLoad(this.viewModel.themeLayer,map);}},{key:"render",value:function render(){return null;}}]);return UniqueThemeLayer;}(external_root_React_commonjs_react_commonjs2_react_amd_react_default.a.Component),UniqueThemeLayer_class2.defaultProps={options:{}},UniqueThemeLayer_temp))||UniqueThemeLayer_class);
  19381. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/ranksymbol-theme/RanksymbolThemeLayerViewModel.js
  19382. var RanksymbolThemeLayerViewModel_RanksymbolThemeLayerViewModel=/*#__PURE__*/function(_mapboxgl$Evented){_inherits(RanksymbolThemeLayerViewModel,_mapboxgl$Evented);function RanksymbolThemeLayerViewModel(map,themeProps){var _this;_classCallCheck(this,RanksymbolThemeLayerViewModel);_this=_possibleConstructorReturn(this,_getPrototypeOf(RanksymbolThemeLayerViewModel).call(this));_this.map=map;var layerName=themeProps.layerName,options=themeProps.options,symbolType=themeProps.symbolType,layerId=themeProps.layerId,data=themeProps.data;_this.layerName=layerName||layerId;_this.symbolType=symbolType||'Circle';options.id=options.id||layerId;_this.options=options;_this.data=data||[];_this._init();return _this;}_createClass(RanksymbolThemeLayerViewModel,[{key:"_init",value:function _init(){this.themeLayer=new mapbox_gl_enhance_js_default.a.supermap.RankSymbolThemeLayer(this.layerName,this.symbolType,this.options);this.map.addLayer(this.themeLayer);this.themeLayer.addFeatures(this.data);}}]);return RanksymbolThemeLayerViewModel;}(mapbox_gl_enhance_js_default.a.Evented);
  19383. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/ranksymbol-theme/RanksymbolThemeLayer.tsx
  19384. var RanksymbolThemeLayer_dec,RanksymbolThemeLayer_class,RanksymbolThemeLayer_temp;var RanksymbolThemeLayer_RanksymbolThemeLayer=(RanksymbolThemeLayer_dec=compose_default()(mapGetter,withLayer),RanksymbolThemeLayer_dec(RanksymbolThemeLayer_class=(RanksymbolThemeLayer_temp=/*#__PURE__*/function(_Component){_inherits(RanksymbolThemeLayer,_Component);function RanksymbolThemeLayer(){var _getPrototypeOf2;var _this;_classCallCheck(this,RanksymbolThemeLayer);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_possibleConstructorReturn(this,(_getPrototypeOf2=_getPrototypeOf(RanksymbolThemeLayer)).call.apply(_getPrototypeOf2,[this].concat(args)));_this.viewModel=void 0;return _this;}_createClass(RanksymbolThemeLayer,[{key:"loaded",value:function loaded(map){var onLoad=this.props.onLoad;this.viewModel=new RanksymbolThemeLayerViewModel_RanksymbolThemeLayerViewModel(map,this.props);isFunction(onLoad)&&onLoad(this.viewModel.themeLayer,map);}},{key:"render",value:function render(){return null;}}]);return RanksymbolThemeLayer;}(external_root_React_commonjs_react_commonjs2_react_amd_react_["Component"]),RanksymbolThemeLayer_temp))||RanksymbolThemeLayer_class);
  19385. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/range-theme/RangeThemeLayerViewModel.js
  19386. var RangeThemeLayerViewModel_RangeThemeLayerViewModel=/*#__PURE__*/function(_mapboxgl$Evented){_inherits(RangeThemeLayerViewModel,_mapboxgl$Evented);function RangeThemeLayerViewModel(map,themeProps){var _this;_classCallCheck(this,RangeThemeLayerViewModel);_this=_possibleConstructorReturn(this,_getPrototypeOf(RangeThemeLayerViewModel).call(this));var layerName=themeProps.layerName,options=themeProps.options,layerId=themeProps.layerId,data=themeProps.data;_this.map=map;_this.layerName=layerName||layerId;options.id=options.id||layerId;_this.options=options;_this.data=data||[];_this._init();return _this;}_createClass(RangeThemeLayerViewModel,[{key:"_init",value:function _init(){this.themeLayer=new mapbox_gl_enhance_js_default.a.supermap.RangeThemeLayer(this.layerName,this.options);this.map.addLayer(this.themeLayer);if(this.data&&this.data.length){this.setData(this.data);}}},{key:"setData",value:function setData(data){this.themeLayer.addFeatures(data);}}]);return RangeThemeLayerViewModel;}(mapbox_gl_enhance_js_default.a.Evented);
  19387. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/range-theme/RangeThemeLayer.tsx
  19388. var RangeThemeLayer_dec,RangeThemeLayer_class,RangeThemeLayer_class2,RangeThemeLayer_temp;var RangeThemeLayer_RangeThemeLayer=(RangeThemeLayer_dec=compose_default()(mapGetter,withLayer),RangeThemeLayer_dec(RangeThemeLayer_class=(RangeThemeLayer_temp=RangeThemeLayer_class2=/*#__PURE__*/function(_React$Component){_inherits(RangeThemeLayer,_React$Component);function RangeThemeLayer(){var _getPrototypeOf2;var _this;_classCallCheck(this,RangeThemeLayer);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_possibleConstructorReturn(this,(_getPrototypeOf2=_getPrototypeOf(RangeThemeLayer)).call.apply(_getPrototypeOf2,[this].concat(args)));_this.viewModel=void 0;return _this;}_createClass(RangeThemeLayer,[{key:"componentDidUpdate",value:function componentDidUpdate(prevProps){var data=this.props.data;if(!lodash_isequal_default()(prevProps.data,data)&&this.viewModel){this.viewModel.setData(data);}}},{key:"loaded",value:function loaded(map){var onLoad=this.props.onLoad;this.viewModel=new RangeThemeLayerViewModel_RangeThemeLayerViewModel(map,this.props);isFunction(onLoad)&&onLoad(this.viewModel.themeLayer,map);}},{key:"render",value:function render(){return null;}}]);return RangeThemeLayer;}(external_root_React_commonjs_react_commonjs2_react_amd_react_default.a.Component),RangeThemeLayer_class2.defaultProps={options:{}},RangeThemeLayer_temp))||RangeThemeLayer_class);
  19389. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/graph-theme/GraphThemeLayerViewModel.js
  19390. var GraphThemeLayerViewModel_GraphThemeLayerViewModel=/*#__PURE__*/function(_mapboxgl$Evented){_inherits(GraphThemeLayerViewModel,_mapboxgl$Evented);function GraphThemeLayerViewModel(map,themeProps){var _this;_classCallCheck(this,GraphThemeLayerViewModel);_this=_possibleConstructorReturn(this,_getPrototypeOf(GraphThemeLayerViewModel).call(this));_this.map=map;var layerName=themeProps.layerName,options=themeProps.options,chartsType=themeProps.chartsType,layerId=themeProps.layerId,data=themeProps.data;_this.layerName=layerName||layerId;_this.chartsType=chartsType||'Bar';options.id=options.id||layerId;_this.options=options;_this.data=data||{};_this._init();return _this;}_createClass(GraphThemeLayerViewModel,[{key:"_init",value:function _init(){this.themeLayer=new mapbox_gl_enhance_js_default.a.supermap.GraphThemeLayer(this.layerName,this.chartsType,this.options);this.map.addLayer(this.themeLayer);if(JSON.stringify(this.data)!=='{}'){this.setData(this.data);}}},{key:"setData",value:function setData(data){this.themeLayer.addFeatures(data);}}]);return GraphThemeLayerViewModel;}(mapbox_gl_enhance_js_default.a.Evented);
  19391. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/graph-theme/GraphThemeLayer.tsx
  19392. var GraphThemeLayer_dec,GraphThemeLayer_class,GraphThemeLayer_class2,GraphThemeLayer_temp;var GraphThemeLayer_GraphThemeLayer=(GraphThemeLayer_dec=compose_default()(mapGetter,withLayer),GraphThemeLayer_dec(GraphThemeLayer_class=(GraphThemeLayer_temp=GraphThemeLayer_class2=/*#__PURE__*/function(_React$Component){_inherits(GraphThemeLayer,_React$Component);function GraphThemeLayer(){var _getPrototypeOf2;var _this;_classCallCheck(this,GraphThemeLayer);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_possibleConstructorReturn(this,(_getPrototypeOf2=_getPrototypeOf(GraphThemeLayer)).call.apply(_getPrototypeOf2,[this].concat(args)));_this.viewModel=void 0;return _this;}_createClass(GraphThemeLayer,[{key:"componentDidUpdate",value:function componentDidUpdate(prevProps){var data=this.props.data;if(!lodash_isequal_default()(prevProps.data,data)&&this.viewModel){this.viewModel.setData(data);}}},{key:"loaded",value:function loaded(map){var onLoad=this.props.onLoad;this.viewModel=new GraphThemeLayerViewModel_GraphThemeLayerViewModel(map,this.props);isFunction(onLoad)&&onLoad(this.viewModel.themeLayer,map);}},{key:"render",value:function render(){return null;}}]);return GraphThemeLayer;}(external_root_React_commonjs_react_commonjs2_react_amd_react_default.a.Component),GraphThemeLayer_class2.defaultProps={options:{},chartsType:'Bar'},GraphThemeLayer_temp))||GraphThemeLayer_class);
  19393. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/cluster/ClusterLayerViewModel.js
  19394. /**
  19395. * @class ClusterLayerViewModel
  19396. * @param {mapboxgl.map} map - mapboxgl map 对象。
  19397. * @param {Object} data - Cluster layer data。
  19398. * @param {Object} options - 可选参数。
  19399. * @param {String} [options.layerId] - 图层 ID。
  19400. * @param {Object} [options.clusteredPointStyle] - 聚合点的 Paint 对象。
  19401. * @param {Object} [options.unclusteredPointStyle] - 未聚合的点的 Paint 对象。
  19402. * @param {Object} [options.clusteredPointTextLayout] - 聚合点的文本 layout 对象
  19403. * @param {number} [options.radius=50] - 图层聚合点半径。
  19404. * @param {number} [options.maxZoom=14] - 图层最大显示级别。
  19405. */var ClusterLayerViewModel_ClusterLayerViewModel=/*#__PURE__*/function(_mapboxgl$Evented){_inherits(ClusterLayerViewModel,_mapboxgl$Evented);function ClusterLayerViewModel(map,data){var _this;var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};_classCallCheck(this,ClusterLayerViewModel);_this=_possibleConstructorReturn(this,_getPrototypeOf(ClusterLayerViewModel).call(this));_this.options=options;if(!map){throw new Error('map is requierd');}_this.map=map;_this.data=data;_this.layerId=options.layerId||'clusterLayer'+new Date().getTime();_this.data&&_this._initializeClusterLayer();return _this;}_createClass(ClusterLayerViewModel,[{key:"setData",value:function setData(data){if(!data){return;}this.data=data;if(this.layerId&&!this.map.getSource(this.layerId)){this._initializeClusterLayer();}else{this.map.getSource(this.layerId).setData(data);}}},{key:"setClusteredPointStyle",value:function setClusteredPointStyle(clusteredPointStyle){if(!clusteredPointStyle||this.layerId&&!this.map.getSource(this.layerId)){return;}this.options.clusteredPointStyle=clusteredPointStyle;this._setPaintProperty(clusteredPointStyle.paint,this.layerId);this._setLayoutProperty(clusteredPointStyle.layout,this.layerId);}},{key:"setUnclusteredPointStyle",value:function setUnclusteredPointStyle(unclusteredPointStyle){var layerId='unclustered_point'+this.layerId;if(!unclusteredPointStyle||!this.map.getSource(layerId)){return;}this.options.unclusteredPointStyle=unclusteredPointStyle;this._setPaintProperty(unclusteredPointStyle.paint,layerId);this._setLayoutProperty(unclusteredPointStyle.layout,layerId);}},{key:"setClusteredPointTextLayout",value:function setClusteredPointTextLayout(clusteredPointTextLayout){var layerId='count_'+this.layerId;if(!clusteredPointTextLayout||!this.map.getSource(layerId)){return;}this.options.clusteredPointTextLayout=clusteredPointTextLayout;this._setLayoutProperty(clusteredPointTextLayout,layerId);}},{key:"_setPaintProperty",value:function _setPaintProperty(paint,layerId){var _this2=this;Object.keys(paint).forEach(function(key){_this2.map.setPaintProperty(layerId,key,paint[key]);});}},{key:"_setLayoutProperty",value:function _setLayoutProperty(layout,layerId){var _this3=this;Object.keys(layout).forEach(function(key){_this3.map.setLayoutProperty(layerId,key,layout[key]);});}},{key:"_initializeClusterLayer",value:function _initializeClusterLayer(){var _this4=this;this.map.addSource(this.layerId,{type:'geojson',data:this.data,cluster:true,clusterMaxZoom:this.options.maxZoom||14,clusterRadius:this.options.radius||50});this.map.addLayer({id:this.layerId,type:'circle',source:this.layerId,filter:['has','point_count'],paint:this.options.clusteredPointStyle&&this.options.clusteredPointStyle.paint||{'circle-color':['step',['get','point_count'],'#51bbd6',100,'#f1f075',750,'#f28cb1'],'circle-radius':['step',['get','point_count'],20,100,30,750,40]}});// 聚合点文本 layer
  19406. this.map.addLayer({id:'count_'+this.layerId,type:'symbol',source:this.layerId,filter:['has','point_count'],layout:this.options.clusteredPointTextLayout||{'text-field':'{point_count_abbreviated}','text-font':['DIN Offc Pro Medium','Arial Unicode MS Bold'],'text-size':12}});// 未聚合点 layer
  19407. this.map.addLayer({id:'unclustered_point'+this.layerId,type:'circle',source:this.layerId,filter:['!',['has','point_count']],paint:this.options.unclusteredPointStyle&&this.options.unclusteredPointStyle.paint||{'circle-color':'#11b4da','circle-radius':4,'circle-stroke-width':1,'circle-stroke-color':'#fff'}});/**
  19408. * @event addcusterlayersucceeded
  19409. * @description 添加点聚合图层成功后触发。
  19410. * @property {Object} map - mapboxgl map 对象。
  19411. */this.fire('addcusterlayersucceeded',{map:this.map});this.map.on('click',this.layerId,function(e){var features=_this4.map.queryRenderedFeatures(e.point,{layers:[_this4.layerId]});var clusterId=features[0].properties.cluster_id;_this4.map.getSource(_this4.layerId).getClusterExpansionZoom(clusterId,function(err,zoom){if(err)return;_this4.map.easeTo({center:features[0].geometry.coordinates,zoom:zoom});});});this.map.on('mouseenter',this.layerId,function(){_this4.map.getCanvas().style.cursor='pointer';});this.map.on('mouseleave',this.layerId,function(){_this4.map.getCanvas().style.cursor='';});}}]);return ClusterLayerViewModel;}(mapbox_gl_enhance_js_default.a.Evented);
  19412. // CONCATENATED MODULE: ./src/mapboxgl/_types/CircleStyle.js
  19413. /**
  19414. * @class CircleStyle
  19415. * @category BaseTypes Style
  19416. * @classdesc 点图层样式类。
  19417. * @param {mapboxgl.LayersCircle} paint - MapboxGL 点图层 Paint 配置。
  19418. * @param {mapboxgl.LayersCircle} layout - MapboxGL 点图层 Layout 配置。
  19419. */var CircleStyle_CircleStyle=function CircleStyle(){var paint=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var layout=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,CircleStyle);this.layout={visibility:'visible'};this.paint={'circle-radius':6,'circle-color':'#3fb1e3','circle-opacity':1,'circle-blur':0,'circle-translate':[0,0],'circle-translate-anchor':'map','circle-pitch-scale':'map','circle-pitch-alignment':'viewport','circle-stroke-width':0,'circle-stroke-color':'#000','circle-stroke-opacity':1};Object.assign(this.paint,paint);Object.assign(this.layout,layout);};
  19420. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/cluster/ClusterLayer.tsx
  19421. var ClusterLayer_dec,ClusterLayer_class,ClusterLayer_class2,ClusterLayer_temp;var ClusterLayer_ClusterLayer=(ClusterLayer_dec=compose_default()(mapGetter,withLayer),ClusterLayer_dec(ClusterLayer_class=(ClusterLayer_temp=ClusterLayer_class2=/*#__PURE__*/function(_Component){_inherits(ClusterLayer,_Component);function ClusterLayer(){var _getPrototypeOf2;var _this;_classCallCheck(this,ClusterLayer);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_possibleConstructorReturn(this,(_getPrototypeOf2=_getPrototypeOf(ClusterLayer)).call.apply(_getPrototypeOf2,[this].concat(args)));_this.viewModel=void 0;return _this;}_createClass(ClusterLayer,[{key:"componentDidUpdate",value:function componentDidUpdate(prevProps){var _this$props=this.props,data=_this$props.data,clusteredPointStyle=_this$props.clusteredPointStyle,unclusteredPointStyle=_this$props.unclusteredPointStyle,clusteredPointTextLayout=_this$props.clusteredPointTextLayout;if(!lodash_isequal_default()(data,prevProps.data)){this.viewModel&&this.viewModel.setData(data);}if(prevProps.clusteredPointStyle!==clusteredPointStyle){this.viewModel&&this.viewModel.setClusteredPointStyle(clusteredPointStyle);}if(prevProps.unclusteredPointStyle!==unclusteredPointStyle){this.viewModel&&this.viewModel.setUnclusteredPointStyle(unclusteredPointStyle);}if(prevProps.clusteredPointTextLayout!==clusteredPointTextLayout){this.viewModel&&this.viewModel.setClusteredPointTextLayout(clusteredPointTextLayout);}}},{key:"loaded",value:function loaded(map){var options=JSON.parse(JSON.stringify(this.props));delete options.data;this.viewModel=new ClusterLayerViewModel_ClusterLayerViewModel(map,this.props.data,_objectSpread2({},options));}},{key:"render",value:function render(){return null;}}]);return ClusterLayer;}(external_root_React_commonjs_react_commonjs2_react_amd_react_["Component"]),ClusterLayer_class2.defaultProps={radius:50,maxZoom:14,clusteredPointStyle:new CircleStyle_CircleStyle({'circle-color':['step',['get','point_count'],'#51bbd6',100,'#f1f075',750,'#f28cb1'],'circle-radius':['step',['get','point_count'],20,100,30,750,40]}),unclusteredPointStyle:new CircleStyle_CircleStyle({'circle-color':'#11b4da','circle-radius':4,'circle-stroke-width':1,'circle-stroke-color':'#fff'})},ClusterLayer_temp))||ClusterLayer_class);/* harmony default export */ var cluster_ClusterLayer = (ClusterLayer_ClusterLayer);
  19422. // EXTERNAL MODULE: external {"root":"DeckGL","commonjs":"../public/libs/deckgl/deck.gl.min.js","commonjs2":"../public/libs/deckgl/deck.gl.min.js","amd":"../public/libs/deckgl/deck.gl.min.js"}
  19423. var deck_gl_min_js_ = __webpack_require__(81);
  19424. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/deckgl/DeckglLayerViewModel.js
  19425. var DeckglLayerViewModel_DeckglLayerViewModel=/*#__PURE__*/function(_mapboxgl$Evented){_inherits(DeckglLayerViewModel,_mapboxgl$Evented);function DeckglLayerViewModel(map,deckglProps){var _this;_classCallCheck(this,DeckglLayerViewModel);_this=_possibleConstructorReturn(this,_getPrototypeOf(DeckglLayerViewModel).call(this));_this.map=map;var layerType=deckglProps.layerType,options=deckglProps.options,layerId=deckglProps.layerId;_this.layerType=layerType;options.data=options.data||[];options.layerId=options.layerId||layerId;_this.options=options;_this._init();return _this;}_createClass(DeckglLayerViewModel,[{key:"_init",value:function _init(){if(this.layerType&&this.options){this._addDeckglLayer();}}},{key:"_addDeckglLayer",value:function _addDeckglLayer(){var deckglLayer=new mapbox_gl_enhance_js_default.a.supermap.DeckglLayer(this.layerType,this.options);this.map.addLayer(deckglLayer);}}]);return DeckglLayerViewModel;}(mapbox_gl_enhance_js_default.a.Evented);
  19426. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/deckgl/DeckglLayer.tsx
  19427. var DeckglLayer_dec,DeckglLayer_class,DeckglLayer_temp;var LAYER_TYPE_ID_LIST=['scatter-plot','path-layer','polygon-layer','arc-layer','hexagon-layer','screen-grid-layer'];var DeckglLayer_DeckglLayer=(DeckglLayer_dec=compose_default()(mapGetter,withLayer),DeckglLayer_dec(DeckglLayer_class=(DeckglLayer_temp=/*#__PURE__*/function(_Component){_inherits(DeckglLayer,_Component);function DeckglLayer(){var _getPrototypeOf2;var _this;_classCallCheck(this,DeckglLayer);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_possibleConstructorReturn(this,(_getPrototypeOf2=_getPrototypeOf(DeckglLayer)).call.apply(_getPrototypeOf2,[this].concat(args)));_this.viewModel=void 0;return _this;}_createClass(DeckglLayer,[{key:"loaded",value:function loaded(map){var _this2=this;var matchIndex=LAYER_TYPE_ID_LIST.findIndex(function(item){return item===_this2.props.layerType;});if(matchIndex>-1){this.viewModel=new DeckglLayerViewModel_DeckglLayerViewModel(map,this.props);}}},{key:"render",value:function render(){return null;}}]);return DeckglLayer;}(external_root_React_commonjs_react_commonjs2_react_amd_react_["Component"]),DeckglLayer_temp))||DeckglLayer_class);
  19428. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/label-theme/LabelThemeLayerViewModel.js
  19429. var LabelThemeLayerViewModel_LabelThemeLayerViewModel=/*#__PURE__*/function(_mapboxgl$Evented){_inherits(LabelThemeLayerViewModel,_mapboxgl$Evented);function LabelThemeLayerViewModel(map,themeProps){var _this;_classCallCheck(this,LabelThemeLayerViewModel);_this=_possibleConstructorReturn(this,_getPrototypeOf(LabelThemeLayerViewModel).call(this));var layerName=themeProps.layerName,options=themeProps.options,layerId=themeProps.layerId,data=themeProps.data;_this.map=map;_this.layerName=layerName||layerId;options.id=options.id||layerId;_this.options=options;_this.data=data||[];_this._init();return _this;}_createClass(LabelThemeLayerViewModel,[{key:"_init",value:function _init(){this.themeLayer=new mapbox_gl_enhance_js_default.a.supermap.LabelThemeLayer(this.layerName,this.options);this.map.addLayer(this.themeLayer);this.themeLayer.addFeatures(this.data);}}]);return LabelThemeLayerViewModel;}(mapbox_gl_enhance_js_default.a.Evented);
  19430. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/label-theme/LabelThemeLayer.tsx
  19431. var LabelThemeLayer_dec,LabelThemeLayer_class,LabelThemeLayer_class2,LabelThemeLayer_temp;var LabelThemeLayer_LabelThemeLayer=(LabelThemeLayer_dec=compose_default()(mapGetter,withLayer),LabelThemeLayer_dec(LabelThemeLayer_class=(LabelThemeLayer_temp=LabelThemeLayer_class2=/*#__PURE__*/function(_Component){_inherits(LabelThemeLayer,_Component);function LabelThemeLayer(){var _getPrototypeOf2;var _this;_classCallCheck(this,LabelThemeLayer);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_possibleConstructorReturn(this,(_getPrototypeOf2=_getPrototypeOf(LabelThemeLayer)).call.apply(_getPrototypeOf2,[this].concat(args)));_this.viewModel=void 0;return _this;}_createClass(LabelThemeLayer,[{key:"loaded",value:function loaded(map){var onLoad=this.props.onLoad;this.viewModel=new LabelThemeLayerViewModel_LabelThemeLayerViewModel(map,this.props);isFunction(onLoad)&&onLoad(this.viewModel.themeLayer,map);}},{key:"render",value:function render(){return null;}}]);return LabelThemeLayer;}(external_root_React_commonjs_react_commonjs2_react_amd_react_["Component"]),LabelThemeLayer_class2.defaultProps={options:{}},LabelThemeLayer_temp))||LabelThemeLayer_class);
  19432. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/heatmap/HeatmapLayerViewModel.js
  19433. /**
  19434. * @class HeatMapLayerViewModel
  19435. * @param {mapboxgl.map} map - mapboxgl map 对象。
  19436. * @param {String} data - 热力图数据。
  19437. * @param {Object} options - 可选参数。
  19438. * @param {Object} [options.layerId] - 图层名。
  19439. * @param {Object} [options.layerStyle] - 图层样式配置。
  19440. */var HeatmapLayerViewModel_HeatMapLayerViewModel=/*#__PURE__*/function(_mapboxgl$Evented){_inherits(HeatMapLayerViewModel,_mapboxgl$Evented);function HeatMapLayerViewModel(map,data,options){var _this;_classCallCheck(this,HeatMapLayerViewModel);_this=_possibleConstructorReturn(this,_getPrototypeOf(HeatMapLayerViewModel).call(this));if(!map){throw new Error('map is requierd');}options=options||{};_this.map=map;_this.data=data;_this.layerId=options.layerId||'heatmap'+new Date().getTime();var layerStyle=options.layerStyle;_this.paint=layerStyle&&layerStyle.paint;_this.layout=layerStyle&&layerStyle.layout;_this._initializeHeatMapLayer();return _this;}_createClass(HeatMapLayerViewModel,[{key:"_initializeHeatMapLayer",value:function _initializeHeatMapLayer(){this.map.addSource(this.layerId,{type:'geojson',data:this.data});this.map.addLayer({id:this.layerId,type:'heatmap',source:this.layerId,maxzoom:9,paint:this.paint||{'heatmap-intensity':['interpolate',['linear'],['zoom'],0,1,9,3],'heatmap-color':['interpolate',['linear'],['heatmap-density'],0,'rgba(33,102,172,0)',0.2,'rgb(103,169,207)',0.4,'rgb(209,229,240)',0.6,'rgb(253,219,199)',0.8,'rgb(239,138,98)',1,'rgb(178,24,43)'],'heatmap-radius':['interpolate',['linear'],['zoom'],0,2,9,20],'heatmap-opacity':['interpolate',['linear'],['zoom'],7,1,9,0]},layout:this.layout||{}});this.fire('heatmaplayeraddsucceeded',{map:this.map});}}]);return HeatMapLayerViewModel;}(mapbox_gl_enhance_js_default.a.Evented);
  19441. // CONCATENATED MODULE: ./src/mapboxgl/_types/HeatMapStyle.js
  19442. var HeatMapStyle_HeatMapStyle=function HeatMapStyle(){var paint=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var layout=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,HeatMapStyle);this.paint={'heatmap-radius':30,'heatmap-weight':1,'heatmap-intensity':1,'heatmap-color':['interpolate',['linear'],['heatmap-density'],0,'rgba(0, 0, 255, 0)',0.1,'royalblue',0.3,'cyan',0.5,'lime',0.7,'yellow',1,'red'],'heatmap-opacity':1};this.layout={visibility:'visible'};Object.assign(this.paint,paint);Object.assign(this.layout,layout);};
  19443. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/heatmap/HeatmapLayer.tsx
  19444. var HeatmapLayer_dec,HeatmapLayer_class,HeatmapLayer_class2,HeatmapLayer_temp;var HeatmapLayer_HeatmapLayer=(HeatmapLayer_dec=compose_default()(mapGetter,withLayer),HeatmapLayer_dec(HeatmapLayer_class=(HeatmapLayer_temp=HeatmapLayer_class2=/*#__PURE__*/function(_React$Component){_inherits(HeatmapLayer,_React$Component);function HeatmapLayer(){var _getPrototypeOf2;var _this;_classCallCheck(this,HeatmapLayer);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_possibleConstructorReturn(this,(_getPrototypeOf2=_getPrototypeOf(HeatmapLayer)).call.apply(_getPrototypeOf2,[this].concat(args)));_this.viewModel=void 0;return _this;}_createClass(HeatmapLayer,[{key:"loaded",value:function loaded(map){var _this$props=this.props,data=_this$props.data,layerId=_this$props.layerId,layerStyle=_this$props.layerStyle;this.viewModel=new HeatmapLayerViewModel_HeatMapLayerViewModel(map,data,{layerId:layerId,layerStyle:layerStyle});}},{key:"render",value:function render(){return null;}}]);return HeatmapLayer;}(external_root_React_commonjs_react_commonjs2_react_amd_react_default.a.Component),HeatmapLayer_class2.defaultProps={layerStyle:new HeatMapStyle_HeatMapStyle()},HeatmapLayer_temp))||HeatmapLayer_class);
  19445. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/mapv/MapvLayerViewModel.js
  19446. var MapvLayerViewModel_MapvLayerViewModel=/*#__PURE__*/function(_mapboxgl$Evented){_inherits(MapvLayerViewModel,_mapboxgl$Evented);function MapvLayerViewModel(map,mapvLayerProps){var _this;_classCallCheck(this,MapvLayerViewModel);_this=_possibleConstructorReturn(this,_getPrototypeOf(MapvLayerViewModel).call(this));_this.map=map;var data=mapvLayerProps.data,options=mapvLayerProps.options,layerId=mapvLayerProps.layerId;_this.data=data;_this.options=options.layerId?options:_objectSpread2({},options,{layerId:layerId});_this._init();return _this;}_createClass(MapvLayerViewModel,[{key:"_init",value:function _init(){if(this.data&&this.options){this._addMapvLayer();}}},{key:"_addMapvLayer",value:function _addMapvLayer(){var mapVLayer=new mapbox_gl_enhance_js_default.a.supermap.MapvLayer('',this.data,this.options);this.map.addLayer(mapVLayer);}}]);return MapvLayerViewModel;}(mapbox_gl_enhance_js_default.a.Evented);
  19447. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/mapv/MapvLayer.tsx
  19448. var MapvLayer_dec,MapvLayer_class,MapvLayer_class2,MapvLayer_temp;var MapvLayer_MapvLayer=(MapvLayer_dec=compose_default()(mapGetter,withLayer),MapvLayer_dec(MapvLayer_class=(MapvLayer_temp=MapvLayer_class2=/*#__PURE__*/function(_React$Component){_inherits(MapvLayer,_React$Component);function MapvLayer(){var _getPrototypeOf2;var _this;_classCallCheck(this,MapvLayer);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_possibleConstructorReturn(this,(_getPrototypeOf2=_getPrototypeOf(MapvLayer)).call.apply(_getPrototypeOf2,[this].concat(args)));_this.viewModel=void 0;return _this;}_createClass(MapvLayer,[{key:"loaded",value:function loaded(map){this.viewModel=new MapvLayerViewModel_MapvLayerViewModel(map,this.props);}},{key:"render",value:function render(){return null;}}]);return MapvLayer;}(external_root_React_commonjs_react_commonjs2_react_amd_react_default.a.Component),MapvLayer_class2.defaultProps={options:{},data:{}},MapvLayer_temp))||MapvLayer_class);
  19449. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/echarts/EchatsLayerViewModel.js
  19450. /**
  19451. * @class EchatsLayerViewModel
  19452. * @param {mapboxgl.map} map - mapboxgl map 对象。
  19453. * @param {String} options - EchartsLayer options。
  19454. */var EchatsLayerViewModel_EchatsLayerViewModel=/*#__PURE__*/function(_mapboxgl$Evented){_inherits(EchatsLayerViewModel,_mapboxgl$Evented);function EchatsLayerViewModel(map,options){var _this;_classCallCheck(this,EchatsLayerViewModel);_this=_possibleConstructorReturn(this,_getPrototypeOf(EchatsLayerViewModel).call(this));if(!options){throw new Error('echarts options is requierd');}if(!map){throw new Error('map is requierd');}_this.map=map;_this.options=options;_this._initializeEchartsLayer();return _this;}_createClass(EchatsLayerViewModel,[{key:"_initializeEchartsLayer",value:function _initializeEchartsLayer(){window.echarts=external_echarts_default.a;var echartslayer=new EchartsLayer_js_default.a(this.map);echartslayer.chart.setOption(this.options);/**
  19455. * @event echartslayeraddsucceeded
  19456. * @property {Object} layer - Echarts Layer.
  19457. */this.fire('echartslayeraddsucceeded',{layer:echartslayer});this.echartslayer=echartslayer;}}]);return EchatsLayerViewModel;}(mapbox_gl_enhance_js_default.a.Evented);
  19458. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/echarts/EchartsLayer.tsx
  19459. var EchartsLayer_dec,EchartsLayer_class,EchartsLayer_temp;var EchartsLayer_EchartsLayer=(EchartsLayer_dec=compose_default()(mapGetter,withLayer),EchartsLayer_dec(EchartsLayer_class=(EchartsLayer_temp=/*#__PURE__*/function(_React$Component){_inherits(EchartsLayer,_React$Component);function EchartsLayer(){var _getPrototypeOf2;var _this;_classCallCheck(this,EchartsLayer);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_possibleConstructorReturn(this,(_getPrototypeOf2=_getPrototypeOf(EchartsLayer)).call.apply(_getPrototypeOf2,[this].concat(args)));_this.viewModel=void 0;return _this;}_createClass(EchartsLayer,[{key:"loaded",value:function loaded(map){this.viewModel=new EchatsLayerViewModel_EchatsLayerViewModel(map,this.props.options);}},{key:"render",value:function render(){return null;}}]);return EchartsLayer;}(external_root_React_commonjs_react_commonjs2_react_amd_react_default.a.Component),EchartsLayer_temp))||EchartsLayer_class);
  19460. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/dataflow/DataFlowLayerViewModel.js
  19461. /**
  19462. * @class DataFlowLayerViewModel
  19463. * @category ViewModel
  19464. * @classdesc 数据流图层组件功能类。
  19465. * @param {mapboxgl.Map} map - mapboxgl map 对象。
  19466. * @param {String} serviceUrl - 数据流服务地址。
  19467. * @param {Object} [options] - 可选参数。
  19468. * @param {String} [options.layerId] - 图层 ID。
  19469. * @param {Object} [options.layerStyle] - 指定图层样式。
  19470. * @param {GeoJSONObject} [options.geometry] - 指定几何范围,该范围内的要素才能被订阅。
  19471. * @param {String} [options.excludeField] - 排除字段。
  19472. * @param {Object} [options.styleOptions] - style OPtion
  19473. * @fires DataFlowLayerViewModel#subscribesucceeded
  19474. * @fires DataFlowLayerViewModel#subscribefailed
  19475. * @fires DataFlowLayerViewModel#dataUpdated
  19476. */var DataFlowLayerViewModel_DataFlowLayerViewModel=/*#__PURE__*/function(_mapboxgl$Evented){_inherits(DataFlowLayerViewModel,_mapboxgl$Evented);function DataFlowLayerViewModel(map,serviceUrl,options){var _this;_classCallCheck(this,DataFlowLayerViewModel);_this=_possibleConstructorReturn(this,_getPrototypeOf(DataFlowLayerViewModel).call(this));if(!serviceUrl){throw new Error('serviceUrl is requierd');}if(!map){throw new Error('map is requierd');}_this.options=options||{};_this.map=map;_this.serviceUrl=serviceUrl;_this.sourceID=options.layerId||'dataFlow'+new Date().getTime();_this.layerStyle=options.layerStyle||{};if(_this.options.registerToken){SuperMap.SecurityManager.registerToken(_this.serviceUrl,_this.options.registerToken);}_this._initializeDataFlow();return _this;}_createClass(DataFlowLayerViewModel,[{key:"setLaterStyle",value:function setLaterStyle(layerStyle){this.layerStyle=layerStyle;}/**
  19477. * @function DataFlowLayerViewModel.prototype.setExcludeField
  19478. * @description 设置唯一字段。
  19479. * @param {string} excludeField - 唯一字段。
  19480. */},{key:"setExcludeField",value:function setExcludeField(excludeField){this.dataService.setExcludeField(excludeField);this.options.excludeField=excludeField;return this;}/**
  19481. * @function DataFlowLayerViewModel.prototype.setGeometry
  19482. * @description 设置集合要素。
  19483. * @param {GeoJSONObject} geometry - 待设置的 GeoJSON 几何要素对象。
  19484. */},{key:"setGeometry",value:function setGeometry(geometry){this.dataService.setGeometry(geometry);this.options.geometry=geometry;return this;}},{key:"_initializeDataFlow",value:function _initializeDataFlow(){var _this2=this;var dataService=new mapbox_gl_enhance_js_default.a.supermap.DataFlowService(this.serviceUrl,{geometry:this.options.geometry,excludeField:this.options.excludeField}).initSubscribe();dataService.on('subscribeSocketConnected',function(e){/**
  19485. * @event DataFlowLayerViewModel#subscribesucceeded
  19486. * @description 数据订阅成功后触发。
  19487. * @property {Object} e - 事件对象。
  19488. */_this2.fire('subscribesucceeded',e);});dataService.on('subscribeSocketError',function(e){/**
  19489. * @event DataFlowLayerViewModel#subscribefailed
  19490. * @description 数据订阅失败后触发。
  19491. * @property {Object} e - 事件对象。
  19492. */_this2.fire('subscribefailed',e);});dataService.on('messageSucceeded',function(msg){_this2._addLayer(msg);});this.dataService=dataService;}},{key:"_addLayer",value:function _addLayer(msg){if(!msg.featureResult){return;}var feature=msg.featureResult;var type=feature.geometry.type;var layerStyle=this.layerStyle;if(!this.map.getSource(this.sourceID)){this.map.addSource(this.sourceID,{type:'geojson',data:{type:'FeatureCollection',features:[feature]}});if(type==='Point'){var pointType='circle';var pointPaint={'circle-radius':6,'circle-color':'red'};if(layerStyle.symbol){pointType='symbol';pointPaint={};}this.map.addLayer({id:this.sourceID,type:pointType,source:this.sourceID,paint:layerStyle[pointType]&&layerStyle[pointType].paint||pointPaint,layout:layerStyle[pointType]&&layerStyle[pointType].layout||{}});}else if(type==='MultiPolygon'||type==='Polygon'){this.map.addLayer({id:this.sourceID,type:'fill',paint:layerStyle.fill&&layerStyle.fill.paint||{'fill-color':'red','fill-opacity':1},layout:layerStyle.fill&&layerStyle.fill.layout||{},source:this.sourceID});}else if(type==='LineString'||type==='Line'||type==='MultiLineString'){this.map.addLayer({id:this.sourceID,type:'line',paint:layerStyle.line&&layerStyle.line.paint||{'line-width':5,'line-color':'red','line-opacity':1},layout:layerStyle.line&&layerStyle.line.layout||{},source:this.sourceID});}}else{// update layer
  19493. var features=lodash_clonedeep_default()(this.map.getSource(this.sourceID)._data.features);var has=false;features.forEach(function(item,index){if(item.properties.id===feature.properties.id){has=true;features[index]=feature;}});if(!has){features.push(feature);}this.map.getSource(this.sourceID).setData({type:'FeatureCollection',features:features});/**
  19494. * @event DataFlowLayerViewModel#dataUpdated
  19495. * @description 数据更新成功后触发。
  19496. * @property {GeoJSONObject} data - 更新的数据。
  19497. * @property {mapboxgl.Map} map - MapBoxGL Map 对象。
  19498. */this.fire('dataupdated',{data:feature,map:this.map});}}}]);return DataFlowLayerViewModel;}(mapbox_gl_enhance_js_default.a.Evented);
  19499. // CONCATENATED MODULE: ./src/mapboxgl/_types/FillStyle.js
  19500. /**
  19501. * @class FillStyle
  19502. * @category BaseTypes Style
  19503. * @classdesc 面图层样式类。
  19504. * @param {mapboxgl.LayersFill} paint - MapboxGL 面图层 Paint 配置。
  19505. * @param {mapboxgl.LayersFill} layout - MapboxGL 面图层 Layout 配置。
  19506. */var FillStyle_FillStyle=function FillStyle(){var paint=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var layout=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,FillStyle);this.layout={visibility:'visible'};this.paint={'fill-opacity':0.8,'fill-color':'#3fb1e3','fill-translate':[0,0],'fill-antialias':true,'fill-outline-color':'#3fb1e3','fill-translate-anchor':'map'};Object.assign(this.paint,paint);Object.assign(this.layout,layout);};
  19507. // CONCATENATED MODULE: ./src/mapboxgl/_types/LineStyle.js
  19508. /**
  19509. * @class LineStyle
  19510. * @category BaseTypes Style
  19511. * @classdesc 线图层样式类。
  19512. * @param {mapboxgl.LayersLine} paint - MapboxGL 线图层 Paint 配置。
  19513. * @param {mapboxgl.LayersLine} layout - MapboxGL 线图层 Layout 配置。
  19514. */var LineStyle_LineStyle=function LineStyle(){var paint=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var layout=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,LineStyle);this.layout={visibility:'visible','line-cap':'butt','line-join':'miter'};this.paint={'line-opacity':1,'line-color':'#3fb1e3','line-width':3,'line-blur':1};Object.assign(this.paint,paint);Object.assign(this.layout,layout);};
  19515. // CONCATENATED MODULE: ./src/mapboxgl/_types/SymbolStyle.js
  19516. /**
  19517. * @class SymbolStyle
  19518. * @classdesc symbol 图层样式类。
  19519. */var SymbolStyle_SymbolStyle=function SymbolStyle(){var paint=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var layout=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,SymbolStyle);this.paint=Object.assign({},paint);this.layout=Object.assign({visibility:'visible'},layout);};
  19520. // CONCATENATED MODULE: ./src/mapboxgl/_types/index.js
  19521. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/dataflow/DataFlowLayer.tsx
  19522. var DataFlowLayer_dec,DataFlowLayer_class,DataFlowLayer_class2,DataFlowLayer_temp;var DataFlowLayer_DataFlowLayer=(DataFlowLayer_dec=compose_default()(mapGetter,withLayer),DataFlowLayer_dec(DataFlowLayer_class=(DataFlowLayer_temp=DataFlowLayer_class2=/*#__PURE__*/function(_React$Component){_inherits(DataFlowLayer,_React$Component);function DataFlowLayer(){var _getPrototypeOf2;var _this;_classCallCheck(this,DataFlowLayer);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_possibleConstructorReturn(this,(_getPrototypeOf2=_getPrototypeOf(DataFlowLayer)).call.apply(_getPrototypeOf2,[this].concat(args)));_this.viewModel=void 0;return _this;}_createClass(DataFlowLayer,[{key:"loaded",value:function loaded(map){var options=JSON.parse(JSON.stringify(this.props));delete options.serviceUrl;this.viewModel=new DataFlowLayerViewModel_DataFlowLayerViewModel(map,this.props.serviceUrl,_objectSpread2({},options));this.registerEvents();}},{key:"registerEvents",value:function registerEvents(){var _this2=this;// @ts-ignore
  19523. this.viewModel.on('subscribefailed',function(e){// this.$message.error(this.$t('dataFlow.dataSubscriptionFailed'));
  19524. /**
  19525. * @event subscribeFailed
  19526. * @desc 数据订阅失败后触发。
  19527. * @property {Object} e - 事件对象。
  19528. */isFunction(_this2.props.onSubscribeFailed)&&_this2.props.onSubscribeFailed(e);});// @ts-ignore
  19529. this.viewModel.on('subscribesucceeded',function(e){/**
  19530. * @event subscribeSucceeded
  19531. * @desc 数据订阅失败后触发。
  19532. * @property {Object} e - 事件对象。
  19533. */isFunction(_this2.props.onSubscribeSucceeded)&&_this2.props.onSubscribeSucceeded(e);});// @ts-ignore
  19534. this.viewModel.on('dataupdated',function(e){/**
  19535. * @event dataUpdated
  19536. * @desc 数据更新成功后触发。
  19537. * @property {GeoJSONObject} data - 更新的数据。
  19538. * @property {mapboxgl.Map} map - MapBoxGL Map 对象。
  19539. */isFunction(_this2.props.onDataUpdated)&&_this2.props.onDataUpdated(e);});}},{key:"render",value:function render(){return null;}}]);return DataFlowLayer;}(external_root_React_commonjs_react_commonjs2_react_amd_react_default.a.Component),DataFlowLayer_class2.defaultProps={layerStyle:{line:new LineStyle_LineStyle(),circle:new CircleStyle_CircleStyle(),fill:new FillStyle_FillStyle()}},DataFlowLayer_temp))||DataFlowLayer_class);
  19540. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
  19541. function _arrayWithoutHoles(arr) {
  19542. if (Array.isArray(arr)) {
  19543. for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
  19544. arr2[i] = arr[i];
  19545. }
  19546. return arr2;
  19547. }
  19548. }
  19549. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/iterableToArray.js
  19550. function _iterableToArray(iter) {
  19551. if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
  19552. }
  19553. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
  19554. function _nonIterableSpread() {
  19555. throw new TypeError("Invalid attempt to spread non-iterable instance");
  19556. }
  19557. // CONCATENATED MODULE: ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
  19558. function _toConsumableArray(arr) {
  19559. return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
  19560. }
  19561. // EXTERNAL MODULE: external {"root":"THREE","commonjs":"three","commonjs2":"three","amd":"three"}
  19562. var external_root_THREE_commonjs_three_commonjs2_three_amd_three_ = __webpack_require__(3);
  19563. // EXTERNAL MODULE: ./src/mapboxgl/web-map/layer/fire/assets/tendrils.png
  19564. var tendrils = __webpack_require__(45);
  19565. var tendrils_default = /*#__PURE__*/__webpack_require__.n(tendrils);
  19566. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/fire/FireLayerViewModel.ts
  19567. /**
  19568. * @class FireLayerViewModel
  19569. * @param {mapboxgl.map} map - mapboxgl map 对象。
  19570. */var FireLayerViewModel_FireLayerViewModel=/*#__PURE__*/function(_mapboxgl$Evented){_inherits(FireLayerViewModel,_mapboxgl$Evented);function FireLayerViewModel(map,features){var _this;var modelScale=arguments.length>2&&arguments[2]!==undefined?arguments[2]:5.41843220338983e-6;var layerId=arguments.length>3?arguments[3]:undefined;_classCallCheck(this,FireLayerViewModel);_this=_possibleConstructorReturn(this,_getPrototypeOf(FireLayerViewModel).call(this));_this.map=void 0;_this.layerId=void 0;_this.features=void 0;_this.modelScale=void 0;_this.camera=void 0;_this.scene=void 0;_this.renderer=void 0;_this._object=void 0;_this._fireballs=void 0;_this._height=void 0;_this._radius=void 0;_this._fireMaterial=void 0;_this._light=void 0;_this._lightIntensity=void 0;if(!map){throw new Error('map is requierd');}_this.map=map;_this.layerId=layerId;_this.features=features;_this.modelScale=modelScale;_this.features&&_this._addFireLayer();return _this;}_createClass(FireLayerViewModel,[{key:"setFeatures",value:function setFeatures(features){this.features=features;this._addFireLayer();}},{key:"setModelScale",value:function setModelScale(modelScale){this.modelScale=modelScale;this._addFireLayer();}},{key:"_addFireLayer",value:function _addFireLayer(){var _this2=this;var feature=this.features.features[0];if(feature.geometry.type!=='Point'){throw new Error("Feature's type must be point");}if(this.features.features.length>50){throw new Error('The maximum number of features is 50');}this.features.features.forEach(function(feature,index){var geometry=feature.geometry;if(geometry.type==='Point'){_this2._initializeFireLayer(geometry.coordinates,index);}});}},{key:"_initializeFireLayer",value:function _initializeFireLayer(originCoordinate,index){var _this3=this;var modelTransform=this._getModelTransform(originCoordinate);var layerId=this.layerId&&this.layerId+'-'+index||"threeLayerFire-".concat(new Date());this.map.getLayer(layerId)&&this.map.removeLayer(layerId);var customLayer={id:layerId,type:'custom',renderingMode:'3d',onAdd:function onAdd(map,gl){_this3.camera=new external_root_THREE_commonjs_three_commonjs2_three_amd_three_["PerspectiveCamera"](45,map.getCanvas().width/map.getCanvas().height,0.1,2000);_this3.scene=new external_root_THREE_commonjs_three_commonjs2_three_amd_three_["Scene"]();_this3.renderer=new external_root_THREE_commonjs_three_commonjs2_three_amd_three_["WebGLRenderer"]({canvas:map.getCanvas(),context:gl,antialias:true});_this3.renderer.autoClear=false;var rig=new external_root_THREE_commonjs_three_commonjs2_three_amd_three_["Group"]();rig.add(_this3.camera);_this3.scene.add(rig);_this3._fire();_this3.scene.add(_this3._object);var light=new external_root_THREE_commonjs_three_commonjs2_three_amd_three_["PointLight"](0xffffff,1,100);light.position.set(10,10,20);_this3.scene.add(light);_this3.map=map;},render:function render(gl,matrix){var rotationX=new external_root_THREE_commonjs_three_commonjs2_three_amd_three_["Matrix4"]().makeRotationAxis(new external_root_THREE_commonjs_three_commonjs2_three_amd_three_["Vector3"](1,0,0),modelTransform.rotateX);var rotationY=new external_root_THREE_commonjs_three_commonjs2_three_amd_three_["Matrix4"]().makeRotationAxis(new external_root_THREE_commonjs_three_commonjs2_three_amd_three_["Vector3"](0,1,0),modelTransform.rotateY);var rotationZ=new external_root_THREE_commonjs_three_commonjs2_three_amd_three_["Matrix4"]().makeRotationAxis(new external_root_THREE_commonjs_three_commonjs2_three_amd_three_["Vector3"](0,0,1),modelTransform.rotateZ);var m=new external_root_THREE_commonjs_three_commonjs2_three_amd_three_["Matrix4"]().fromArray(matrix);var l=new external_root_THREE_commonjs_three_commonjs2_three_amd_three_["Matrix4"]().makeTranslation(modelTransform.translateX,modelTransform.translateY,modelTransform.translateZ).scale(new external_root_THREE_commonjs_three_commonjs2_three_amd_three_["Vector3"](modelTransform.scale,-modelTransform.scale,modelTransform.scale)).multiply(rotationX).multiply(rotationY).multiply(rotationZ);_this3.camera.projectionMatrix.elements=matrix;_this3.camera.projectionMatrix=m.multiply(l);_this3.renderer.state.reset();_this3._update();_this3.renderer.render(_this3.scene,_this3.camera);// @ts-ignore
  19571. _this3.map.triggerRepaint();}};// @ts-ignore TODO mapbox-gl types 未更新
  19572. this.map.addLayer(customLayer);}},{key:"_getModelTransform",value:function _getModelTransform(originCoordinate){var modelOrigin=originCoordinate;var modelAltitude=0;var modelRotate=[Math.PI/2,0,0];var modelTransform={translateX:mapbox_gl_enhance_js_default.a.MercatorCoordinate.fromLngLat(modelOrigin,modelAltitude).x,translateY:mapbox_gl_enhance_js_default.a.MercatorCoordinate.fromLngLat(modelOrigin,modelAltitude).y,translateZ:mapbox_gl_enhance_js_default.a.MercatorCoordinate.fromLngLat(modelOrigin,modelAltitude).z,rotateX:modelRotate[0],rotateY:modelRotate[1],rotateZ:modelRotate[2],scale:this.modelScale};return modelTransform;}},{key:"_fire",value:function _fire(){var _this$_object;var density=arguments.length>0&&arguments[0]!==undefined?arguments[0]:150;var height=arguments.length>1&&arguments[1]!==undefined?arguments[1]:8;var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0.2;this._object=new external_root_THREE_commonjs_three_commonjs2_three_amd_three_["Group"]();this._fireballs=[];this._height=height;this._radius=r;var texture=new external_root_THREE_commonjs_three_commonjs2_three_amd_three_["TextureLoader"]().load(tendrils_default.a,function(){console.log('loaded');},undefined,function(e){console.log('error',e);});// @ts-ignore
  19573. texture.crossOrigin='';// "anonymous";
  19574. this._fireMaterial=new external_root_THREE_commonjs_three_commonjs2_three_amd_three_["ShaderMaterial"]({uniforms:{time:{value:1.0},blend:{value:1.0},blendPattern:{type:'t',value:texture}},vertexShader:"precision mediump float;\n precision mediump int;\n attribute vec4 color;\n varying vec2 vUv;\n varying float vFade;\n void main()\t{\n vUv = uv;\n vec4 localPosition = vec4( position, 1);\n vFade = clamp((localPosition.y + 3.0) / 6.0, 0.0, 1.0);\n gl_Position = projectionMatrix * modelViewMatrix * localPosition;\n }",fragmentShader:"precision mediump float;\n precision mediump int;\n uniform float time;\n uniform float blend;\n uniform sampler2D blendPattern;\n varying float vFade;\n varying vec2 vUv;\n\n\n void main()\t{\n\n vec4 startColor = vec4(1., 0.5, 0.1, 1.0);\n vec4 endColor = vec4(0.2, 0.2, 0.2, 1.0);\n\n float dissolve = texture2D(blendPattern, vUv).r * 0.5;\n\n float spread = 0.4;\n\n float fadeAmount = smoothstep(\n max(0.0, vFade - spread),\n min(1.0, vFade + spread),\n blend + dissolve\n );\n\n vec4 color = mix(\n startColor, endColor,\n smoothstep(0.1,1., fadeAmount)\n );\n\n gl_FragColor = vec4(color.rgb, 1.-fadeAmount);\n }",transparent:true,side:external_root_THREE_commonjs_three_commonjs2_three_amd_three_["DoubleSide"],blending:external_root_THREE_commonjs_three_commonjs2_three_amd_three_["AdditiveBlending"]});this._light=new external_root_THREE_commonjs_three_commonjs2_three_amd_three_["PointLight"](0xff5500,1,100);this._light.position.set(0,0.4,0);this._lightIntensity=Math.random()*5;this._object.add(this._light);// this._fireMaterial = new THREE.MeshStandardMaterial(0x661100);
  19575. for(var i=0;i<density;i++){var geometry=new external_root_THREE_commonjs_three_commonjs2_three_amd_three_["SphereGeometry"](1,32,32);var mat=this._fireMaterial.clone();mat.uniforms.blendPattern.value=texture;mat.needsUpdate=true;var sphere=new external_root_THREE_commonjs_three_commonjs2_three_amd_three_["Mesh"](geometry,mat);sphere.position.y=Math.random()*height;sphere.position.x=(0.5-Math.random())*this._radius;sphere.position.z=(0.5-Math.random())*this._radius;sphere.rotateX(Math.random()*5);sphere.rotateZ(Math.random()*5);sphere.rotateY(Math.random()*5);// @ts-ignore
  19576. sphere.dirX=(0.5-Math.random())*0.006;// @ts-ignore
  19577. sphere.dirY=0.006;// @ts-ignore
  19578. sphere.dirZ=(0.5-Math.random())*0.006;this._fireballs.push(sphere);}(_this$_object=this._object).add.apply(_this$_object,_toConsumableArray(this._fireballs));}},{key:"_update",value:function _update(){var _this4=this;this._fireballs.forEach(function(ball){ball.position.y+=ball.dirY;ball.position.x+=Math.sin(ball.position.y)*ball.dirX;ball.position.z+=Math.cos(ball.position.y)*ball.dirZ;if(ball.position.y>_this4._height){ball.position.y=Math.random()*0.1;ball.position.x=(0.5-Math.random())*_this4._radius;ball.position.z=(0.5-Math.random())*_this4._radius;}var p=0.1+ball.position.y/_this4._height;ball.rotateX((1.2-p)*0.01);ball.rotateZ((1.2-p)*0.01);ball.rotateY((1.2-p)*0.01);ball.scale.set(p,p,p);/// ball.opacity = p;
  19579. ball.material.uniforms.blend.value=p;// ball.material.needsUpdate = true;
  19580. });this._light.intensity+=(this._lightIntensity-this._light.intensity)*0.006;if(Math.random()>0.8){this._lightIntensity=Math.random()*5;}}}]);return FireLayerViewModel;}(mapbox_gl_enhance_js_default.a.Evented);
  19581. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/fire/FireLayer.tsx
  19582. var FireLayer_dec,FireLayer_class,FireLayer_class2,FireLayer_temp;var FireLayer_FireLayer=(FireLayer_dec=compose_default()(mapGetter,withLayer),FireLayer_dec(FireLayer_class=(FireLayer_temp=FireLayer_class2=/*#__PURE__*/function(_React$Component){_inherits(FireLayer,_React$Component);function FireLayer(){var _getPrototypeOf2;var _this;_classCallCheck(this,FireLayer);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_possibleConstructorReturn(this,(_getPrototypeOf2=_getPrototypeOf(FireLayer)).call.apply(_getPrototypeOf2,[this].concat(args)));_this.viewModel=void 0;return _this;}_createClass(FireLayer,[{key:"componentDidUpdate",value:function componentDidUpdate(prevProps){var _this$props=this.props,features=_this$props.features,modelScale=_this$props.modelScale;if(this.viewModel){if(!lodash_isequal_default()(prevProps.features,features)){this.viewModel.setFeatures(features);}if(prevProps.modelScale!==modelScale){this.viewModel.setModelScale(modelScale);}}}},{key:"loaded",value:function loaded(map){this.viewModel=new FireLayerViewModel_FireLayerViewModel(map,this.props.features,this.props.modelScale,this.props.layerId);}},{key:"render",value:function render(){return null;}}]);return FireLayer;}(external_root_React_commonjs_react_commonjs2_react_amd_react_default.a.Component),FireLayer_class2.defaultProps={modelScale:5.41843220338983e-6},FireLayer_temp))||FireLayer_class);
  19583. // CONCATENATED MODULE: ./node_modules/@turf/envelope/node_modules/@turf/helpers/main.es.js
  19584. /**
  19585. * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.
  19586. */
  19587. var earthRadius = 6371008.8;
  19588. /**
  19589. * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.
  19590. */
  19591. var factors = {
  19592. meters: earthRadius,
  19593. metres: earthRadius,
  19594. millimeters: earthRadius * 1000,
  19595. millimetres: earthRadius * 1000,
  19596. centimeters: earthRadius * 100,
  19597. centimetres: earthRadius * 100,
  19598. kilometers: earthRadius / 1000,
  19599. kilometres: earthRadius / 1000,
  19600. miles: earthRadius / 1609.344,
  19601. nauticalmiles: earthRadius / 1852,
  19602. inches: earthRadius * 39.370,
  19603. yards: earthRadius / 1.0936,
  19604. feet: earthRadius * 3.28084,
  19605. radians: 1,
  19606. degrees: earthRadius / 111325
  19607. };
  19608. /**
  19609. * Units of measurement factors based on 1 meter.
  19610. */
  19611. var unitsFactors = {
  19612. meters: 1,
  19613. metres: 1,
  19614. millimeters: 1000,
  19615. millimetres: 1000,
  19616. centimeters: 100,
  19617. centimetres: 100,
  19618. kilometers: 1 / 1000,
  19619. kilometres: 1 / 1000,
  19620. miles: 1 / 1609.344,
  19621. nauticalmiles: 1 / 1852,
  19622. inches: 39.370,
  19623. yards: 1 / 1.0936,
  19624. feet: 3.28084,
  19625. radians: 1 / earthRadius,
  19626. degrees: 1 / 111325
  19627. };
  19628. /**
  19629. * Area of measurement factors based on 1 square meter.
  19630. */
  19631. var areaFactors = {
  19632. meters: 1,
  19633. metres: 1,
  19634. millimeters: 1000000,
  19635. millimetres: 1000000,
  19636. centimeters: 10000,
  19637. centimetres: 10000,
  19638. kilometers: 0.000001,
  19639. kilometres: 0.000001,
  19640. acres: 0.000247105,
  19641. miles: 3.86e-7,
  19642. yards: 1.195990046,
  19643. feet: 10.763910417,
  19644. inches: 1550.003100006
  19645. };
  19646. /**
  19647. * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.
  19648. *
  19649. * @name feature
  19650. * @param {Geometry} geometry input geometry
  19651. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  19652. * @param {Object} [options={}] Optional Parameters
  19653. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  19654. * @param {string|number} [options.id] Identifier associated with the Feature
  19655. * @returns {Feature} a GeoJSON Feature
  19656. * @example
  19657. * var geometry = {
  19658. * "type": "Point",
  19659. * "coordinates": [110, 50]
  19660. * };
  19661. *
  19662. * var feature = turf.feature(geometry);
  19663. *
  19664. * //=feature
  19665. */
  19666. function main_es_feature(geometry, properties, options) {
  19667. // Optional Parameters
  19668. options = options || {};
  19669. if (!isObject(options)) throw new Error('options is invalid');
  19670. var bbox = options.bbox;
  19671. var id = options.id; // Validation
  19672. if (geometry === undefined) throw new Error('geometry is required');
  19673. if (properties && properties.constructor !== Object) throw new Error('properties must be an Object');
  19674. if (bbox) validateBBox(bbox);
  19675. if (id) validateId(id); // Main
  19676. var feat = {
  19677. type: 'Feature'
  19678. };
  19679. if (id) feat.id = id;
  19680. if (bbox) feat.bbox = bbox;
  19681. feat.properties = properties || {};
  19682. feat.geometry = geometry;
  19683. return feat;
  19684. }
  19685. /**
  19686. * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.
  19687. * For GeometryCollection type use `helpers.geometryCollection`
  19688. *
  19689. * @name geometry
  19690. * @param {string} type Geometry Type
  19691. * @param {Array<number>} coordinates Coordinates
  19692. * @param {Object} [options={}] Optional Parameters
  19693. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Geometry
  19694. * @returns {Geometry} a GeoJSON Geometry
  19695. * @example
  19696. * var type = 'Point';
  19697. * var coordinates = [110, 50];
  19698. *
  19699. * var geometry = turf.geometry(type, coordinates);
  19700. *
  19701. * //=geometry
  19702. */
  19703. function main_es_geometry(type, coordinates, options) {
  19704. // Optional Parameters
  19705. options = options || {};
  19706. if (!isObject(options)) throw new Error('options is invalid');
  19707. var bbox = options.bbox; // Validation
  19708. if (!type) throw new Error('type is required');
  19709. if (!coordinates) throw new Error('coordinates is required');
  19710. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  19711. if (bbox) validateBBox(bbox); // Main
  19712. var geom;
  19713. switch (type) {
  19714. case 'Point':
  19715. geom = main_es_point(coordinates).geometry;
  19716. break;
  19717. case 'LineString':
  19718. geom = lineString(coordinates).geometry;
  19719. break;
  19720. case 'Polygon':
  19721. geom = polygon(coordinates).geometry;
  19722. break;
  19723. case 'MultiPoint':
  19724. geom = multiPoint(coordinates).geometry;
  19725. break;
  19726. case 'MultiLineString':
  19727. geom = multiLineString(coordinates).geometry;
  19728. break;
  19729. case 'MultiPolygon':
  19730. geom = multiPolygon(coordinates).geometry;
  19731. break;
  19732. default:
  19733. throw new Error(type + ' is invalid');
  19734. }
  19735. if (bbox) geom.bbox = bbox;
  19736. return geom;
  19737. }
  19738. /**
  19739. * Creates a {@link Point} {@link Feature} from a Position.
  19740. *
  19741. * @name point
  19742. * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)
  19743. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  19744. * @param {Object} [options={}] Optional Parameters
  19745. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  19746. * @param {string|number} [options.id] Identifier associated with the Feature
  19747. * @returns {Feature<Point>} a Point feature
  19748. * @example
  19749. * var point = turf.point([-75.343, 39.984]);
  19750. *
  19751. * //=point
  19752. */
  19753. function main_es_point(coordinates, properties, options) {
  19754. if (!coordinates) throw new Error('coordinates is required');
  19755. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  19756. if (coordinates.length < 2) throw new Error('coordinates must be at least 2 numbers long');
  19757. if (!isNumber(coordinates[0]) || !isNumber(coordinates[1])) throw new Error('coordinates must contain numbers');
  19758. return main_es_feature({
  19759. type: 'Point',
  19760. coordinates: coordinates
  19761. }, properties, options);
  19762. }
  19763. /**
  19764. * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.
  19765. *
  19766. * @name points
  19767. * @param {Array<Array<number>>} coordinates an array of Points
  19768. * @param {Object} [properties={}] Translate these properties to each Feature
  19769. * @param {Object} [options={}] Optional Parameters
  19770. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  19771. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  19772. * @returns {FeatureCollection<Point>} Point Feature
  19773. * @example
  19774. * var points = turf.points([
  19775. * [-75, 39],
  19776. * [-80, 45],
  19777. * [-78, 50]
  19778. * ]);
  19779. *
  19780. * //=points
  19781. */
  19782. function points(coordinates, properties, options) {
  19783. if (!coordinates) throw new Error('coordinates is required');
  19784. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  19785. return featureCollection(coordinates.map(function (coords) {
  19786. return main_es_point(coords, properties);
  19787. }), options);
  19788. }
  19789. /**
  19790. * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.
  19791. *
  19792. * @name polygon
  19793. * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings
  19794. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  19795. * @param {Object} [options={}] Optional Parameters
  19796. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  19797. * @param {string|number} [options.id] Identifier associated with the Feature
  19798. * @returns {Feature<Polygon>} Polygon Feature
  19799. * @example
  19800. * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });
  19801. *
  19802. * //=polygon
  19803. */
  19804. function polygon(coordinates, properties, options) {
  19805. if (!coordinates) throw new Error('coordinates is required');
  19806. for (var i = 0; i < coordinates.length; i++) {
  19807. var ring = coordinates[i];
  19808. if (ring.length < 4) {
  19809. throw new Error('Each LinearRing of a Polygon must have 4 or more Positions.');
  19810. }
  19811. for (var j = 0; j < ring[ring.length - 1].length; j++) {
  19812. // Check if first point of Polygon contains two numbers
  19813. if (i === 0 && j === 0 && !isNumber(ring[0][0]) || !isNumber(ring[0][1])) throw new Error('coordinates must contain numbers');
  19814. if (ring[ring.length - 1][j] !== ring[0][j]) {
  19815. throw new Error('First and last Position are not equivalent.');
  19816. }
  19817. }
  19818. }
  19819. return main_es_feature({
  19820. type: 'Polygon',
  19821. coordinates: coordinates
  19822. }, properties, options);
  19823. }
  19824. /**
  19825. * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.
  19826. *
  19827. * @name polygons
  19828. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates
  19829. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  19830. * @param {Object} [options={}] Optional Parameters
  19831. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  19832. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  19833. * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection
  19834. * @example
  19835. * var polygons = turf.polygons([
  19836. * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],
  19837. * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],
  19838. * ]);
  19839. *
  19840. * //=polygons
  19841. */
  19842. function polygons(coordinates, properties, options) {
  19843. if (!coordinates) throw new Error('coordinates is required');
  19844. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  19845. return featureCollection(coordinates.map(function (coords) {
  19846. return polygon(coords, properties);
  19847. }), options);
  19848. }
  19849. /**
  19850. * Creates a {@link LineString} {@link Feature} from an Array of Positions.
  19851. *
  19852. * @name lineString
  19853. * @param {Array<Array<number>>} coordinates an array of Positions
  19854. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  19855. * @param {Object} [options={}] Optional Parameters
  19856. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  19857. * @param {string|number} [options.id] Identifier associated with the Feature
  19858. * @returns {Feature<LineString>} LineString Feature
  19859. * @example
  19860. * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});
  19861. * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});
  19862. *
  19863. * //=linestring1
  19864. * //=linestring2
  19865. */
  19866. function lineString(coordinates, properties, options) {
  19867. if (!coordinates) throw new Error('coordinates is required');
  19868. if (coordinates.length < 2) throw new Error('coordinates must be an array of two or more positions'); // Check if first point of LineString contains two numbers
  19869. if (!isNumber(coordinates[0][1]) || !isNumber(coordinates[0][1])) throw new Error('coordinates must contain numbers');
  19870. return main_es_feature({
  19871. type: 'LineString',
  19872. coordinates: coordinates
  19873. }, properties, options);
  19874. }
  19875. /**
  19876. * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.
  19877. *
  19878. * @name lineStrings
  19879. * @param {Array<Array<number>>} coordinates an array of LinearRings
  19880. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  19881. * @param {Object} [options={}] Optional Parameters
  19882. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  19883. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  19884. * @returns {FeatureCollection<LineString>} LineString FeatureCollection
  19885. * @example
  19886. * var linestrings = turf.lineStrings([
  19887. * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],
  19888. * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]
  19889. * ]);
  19890. *
  19891. * //=linestrings
  19892. */
  19893. function lineStrings(coordinates, properties, options) {
  19894. if (!coordinates) throw new Error('coordinates is required');
  19895. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  19896. return featureCollection(coordinates.map(function (coords) {
  19897. return lineString(coords, properties);
  19898. }), options);
  19899. }
  19900. /**
  19901. * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.
  19902. *
  19903. * @name featureCollection
  19904. * @param {Feature[]} features input features
  19905. * @param {Object} [options={}] Optional Parameters
  19906. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  19907. * @param {string|number} [options.id] Identifier associated with the Feature
  19908. * @returns {FeatureCollection} FeatureCollection of Features
  19909. * @example
  19910. * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});
  19911. * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});
  19912. * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});
  19913. *
  19914. * var collection = turf.featureCollection([
  19915. * locationA,
  19916. * locationB,
  19917. * locationC
  19918. * ]);
  19919. *
  19920. * //=collection
  19921. */
  19922. function featureCollection(features, options) {
  19923. // Optional Parameters
  19924. options = options || {};
  19925. if (!isObject(options)) throw new Error('options is invalid');
  19926. var bbox = options.bbox;
  19927. var id = options.id; // Validation
  19928. if (!features) throw new Error('No features passed');
  19929. if (!Array.isArray(features)) throw new Error('features must be an Array');
  19930. if (bbox) validateBBox(bbox);
  19931. if (id) validateId(id); // Main
  19932. var fc = {
  19933. type: 'FeatureCollection'
  19934. };
  19935. if (id) fc.id = id;
  19936. if (bbox) fc.bbox = bbox;
  19937. fc.features = features;
  19938. return fc;
  19939. }
  19940. /**
  19941. * Creates a {@link Feature<MultiLineString>} based on a
  19942. * coordinate array. Properties can be added optionally.
  19943. *
  19944. * @name multiLineString
  19945. * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings
  19946. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  19947. * @param {Object} [options={}] Optional Parameters
  19948. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  19949. * @param {string|number} [options.id] Identifier associated with the Feature
  19950. * @returns {Feature<MultiLineString>} a MultiLineString feature
  19951. * @throws {Error} if no coordinates are passed
  19952. * @example
  19953. * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);
  19954. *
  19955. * //=multiLine
  19956. */
  19957. function multiLineString(coordinates, properties, options) {
  19958. if (!coordinates) throw new Error('coordinates is required');
  19959. return main_es_feature({
  19960. type: 'MultiLineString',
  19961. coordinates: coordinates
  19962. }, properties, options);
  19963. }
  19964. /**
  19965. * Creates a {@link Feature<MultiPoint>} based on a
  19966. * coordinate array. Properties can be added optionally.
  19967. *
  19968. * @name multiPoint
  19969. * @param {Array<Array<number>>} coordinates an array of Positions
  19970. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  19971. * @param {Object} [options={}] Optional Parameters
  19972. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  19973. * @param {string|number} [options.id] Identifier associated with the Feature
  19974. * @returns {Feature<MultiPoint>} a MultiPoint feature
  19975. * @throws {Error} if no coordinates are passed
  19976. * @example
  19977. * var multiPt = turf.multiPoint([[0,0],[10,10]]);
  19978. *
  19979. * //=multiPt
  19980. */
  19981. function multiPoint(coordinates, properties, options) {
  19982. if (!coordinates) throw new Error('coordinates is required');
  19983. return main_es_feature({
  19984. type: 'MultiPoint',
  19985. coordinates: coordinates
  19986. }, properties, options);
  19987. }
  19988. /**
  19989. * Creates a {@link Feature<MultiPolygon>} based on a
  19990. * coordinate array. Properties can be added optionally.
  19991. *
  19992. * @name multiPolygon
  19993. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons
  19994. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  19995. * @param {Object} [options={}] Optional Parameters
  19996. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  19997. * @param {string|number} [options.id] Identifier associated with the Feature
  19998. * @returns {Feature<MultiPolygon>} a multipolygon feature
  19999. * @throws {Error} if no coordinates are passed
  20000. * @example
  20001. * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);
  20002. *
  20003. * //=multiPoly
  20004. *
  20005. */
  20006. function multiPolygon(coordinates, properties, options) {
  20007. if (!coordinates) throw new Error('coordinates is required');
  20008. return main_es_feature({
  20009. type: 'MultiPolygon',
  20010. coordinates: coordinates
  20011. }, properties, options);
  20012. }
  20013. /**
  20014. * Creates a {@link Feature<GeometryCollection>} based on a
  20015. * coordinate array. Properties can be added optionally.
  20016. *
  20017. * @name geometryCollection
  20018. * @param {Array<Geometry>} geometries an array of GeoJSON Geometries
  20019. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  20020. * @param {Object} [options={}] Optional Parameters
  20021. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  20022. * @param {string|number} [options.id] Identifier associated with the Feature
  20023. * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature
  20024. * @example
  20025. * var pt = {
  20026. * "type": "Point",
  20027. * "coordinates": [100, 0]
  20028. * };
  20029. * var line = {
  20030. * "type": "LineString",
  20031. * "coordinates": [ [101, 0], [102, 1] ]
  20032. * };
  20033. * var collection = turf.geometryCollection([pt, line]);
  20034. *
  20035. * //=collection
  20036. */
  20037. function geometryCollection(geometries, properties, options) {
  20038. if (!geometries) throw new Error('geometries is required');
  20039. if (!Array.isArray(geometries)) throw new Error('geometries must be an Array');
  20040. return main_es_feature({
  20041. type: 'GeometryCollection',
  20042. geometries: geometries
  20043. }, properties, options);
  20044. }
  20045. /**
  20046. * Round number to precision
  20047. *
  20048. * @param {number} num Number
  20049. * @param {number} [precision=0] Precision
  20050. * @returns {number} rounded number
  20051. * @example
  20052. * turf.round(120.4321)
  20053. * //=120
  20054. *
  20055. * turf.round(120.4321, 2)
  20056. * //=120.43
  20057. */
  20058. function round(num, precision) {
  20059. if (num === undefined || num === null || isNaN(num)) throw new Error('num is required');
  20060. if (precision && !(precision >= 0)) throw new Error('precision must be a positive number');
  20061. var multiplier = Math.pow(10, precision || 0);
  20062. return Math.round(num * multiplier) / multiplier;
  20063. }
  20064. /**
  20065. * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.
  20066. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  20067. *
  20068. * @name radiansToLength
  20069. * @param {number} radians in radians across the sphere
  20070. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  20071. * @returns {number} distance
  20072. */
  20073. function radiansToLength(radians, units) {
  20074. if (radians === undefined || radians === null) throw new Error('radians is required');
  20075. if (units && typeof units !== 'string') throw new Error('units must be a string');
  20076. var factor = factors[units || 'kilometers'];
  20077. if (!factor) throw new Error(units + ' units is invalid');
  20078. return radians * factor;
  20079. }
  20080. /**
  20081. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians
  20082. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  20083. *
  20084. * @name lengthToRadians
  20085. * @param {number} distance in real units
  20086. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  20087. * @returns {number} radians
  20088. */
  20089. function lengthToRadians(distance, units) {
  20090. if (distance === undefined || distance === null) throw new Error('distance is required');
  20091. if (units && typeof units !== 'string') throw new Error('units must be a string');
  20092. var factor = factors[units || 'kilometers'];
  20093. if (!factor) throw new Error(units + ' units is invalid');
  20094. return distance / factor;
  20095. }
  20096. /**
  20097. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees
  20098. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet
  20099. *
  20100. * @name lengthToDegrees
  20101. * @param {number} distance in real units
  20102. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  20103. * @returns {number} degrees
  20104. */
  20105. function lengthToDegrees(distance, units) {
  20106. return radiansToDegrees(lengthToRadians(distance, units));
  20107. }
  20108. /**
  20109. * Converts any bearing angle from the north line direction (positive clockwise)
  20110. * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line
  20111. *
  20112. * @name bearingToAzimuth
  20113. * @param {number} bearing angle, between -180 and +180 degrees
  20114. * @returns {number} angle between 0 and 360 degrees
  20115. */
  20116. function bearingToAzimuth(bearing) {
  20117. if (bearing === null || bearing === undefined) throw new Error('bearing is required');
  20118. var angle = bearing % 360;
  20119. if (angle < 0) angle += 360;
  20120. return angle;
  20121. }
  20122. /**
  20123. * Converts an angle in radians to degrees
  20124. *
  20125. * @name radiansToDegrees
  20126. * @param {number} radians angle in radians
  20127. * @returns {number} degrees between 0 and 360 degrees
  20128. */
  20129. function radiansToDegrees(radians) {
  20130. if (radians === null || radians === undefined) throw new Error('radians is required');
  20131. var degrees = radians % (2 * Math.PI);
  20132. return degrees * 180 / Math.PI;
  20133. }
  20134. /**
  20135. * Converts an angle in degrees to radians
  20136. *
  20137. * @name degreesToRadians
  20138. * @param {number} degrees angle between 0 and 360 degrees
  20139. * @returns {number} angle in radians
  20140. */
  20141. function degreesToRadians(degrees) {
  20142. if (degrees === null || degrees === undefined) throw new Error('degrees is required');
  20143. var radians = degrees % 360;
  20144. return radians * Math.PI / 180;
  20145. }
  20146. /**
  20147. * Converts a length to the requested unit.
  20148. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  20149. *
  20150. * @param {number} length to be converted
  20151. * @param {string} originalUnit of the length
  20152. * @param {string} [finalUnit='kilometers'] returned unit
  20153. * @returns {number} the converted length
  20154. */
  20155. function convertLength(length, originalUnit, finalUnit) {
  20156. if (length === null || length === undefined) throw new Error('length is required');
  20157. if (!(length >= 0)) throw new Error('length must be a positive number');
  20158. return radiansToLength(lengthToRadians(length, originalUnit), finalUnit || 'kilometers');
  20159. }
  20160. /**
  20161. * Converts a area to the requested unit.
  20162. * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches
  20163. * @param {number} area to be converted
  20164. * @param {string} [originalUnit='meters'] of the distance
  20165. * @param {string} [finalUnit='kilometers'] returned unit
  20166. * @returns {number} the converted distance
  20167. */
  20168. function convertArea(area, originalUnit, finalUnit) {
  20169. if (area === null || area === undefined) throw new Error('area is required');
  20170. if (!(area >= 0)) throw new Error('area must be a positive number');
  20171. var startFactor = areaFactors[originalUnit || 'meters'];
  20172. if (!startFactor) throw new Error('invalid original units');
  20173. var finalFactor = areaFactors[finalUnit || 'kilometers'];
  20174. if (!finalFactor) throw new Error('invalid final units');
  20175. return area / startFactor * finalFactor;
  20176. }
  20177. /**
  20178. * isNumber
  20179. *
  20180. * @param {*} num Number to validate
  20181. * @returns {boolean} true/false
  20182. * @example
  20183. * turf.isNumber(123)
  20184. * //=true
  20185. * turf.isNumber('foo')
  20186. * //=false
  20187. */
  20188. function isNumber(num) {
  20189. return !isNaN(num) && num !== null && !Array.isArray(num);
  20190. }
  20191. /**
  20192. * isObject
  20193. *
  20194. * @param {*} input variable to validate
  20195. * @returns {boolean} true/false
  20196. * @example
  20197. * turf.isObject({elevation: 10})
  20198. * //=true
  20199. * turf.isObject('foo')
  20200. * //=false
  20201. */
  20202. function isObject(input) {
  20203. return !!input && input.constructor === Object;
  20204. }
  20205. /**
  20206. * Validate BBox
  20207. *
  20208. * @private
  20209. * @param {Array<number>} bbox BBox to validate
  20210. * @returns {void}
  20211. * @throws Error if BBox is not valid
  20212. * @example
  20213. * validateBBox([-180, -40, 110, 50])
  20214. * //=OK
  20215. * validateBBox([-180, -40])
  20216. * //=Error
  20217. * validateBBox('Foo')
  20218. * //=Error
  20219. * validateBBox(5)
  20220. * //=Error
  20221. * validateBBox(null)
  20222. * //=Error
  20223. * validateBBox(undefined)
  20224. * //=Error
  20225. */
  20226. function validateBBox(bbox) {
  20227. if (!bbox) throw new Error('bbox is required');
  20228. if (!Array.isArray(bbox)) throw new Error('bbox must be an Array');
  20229. if (bbox.length !== 4 && bbox.length !== 6) throw new Error('bbox must be an Array of 4 or 6 numbers');
  20230. bbox.forEach(function (num) {
  20231. if (!isNumber(num)) throw new Error('bbox must only contain numbers');
  20232. });
  20233. }
  20234. /**
  20235. * Validate Id
  20236. *
  20237. * @private
  20238. * @param {string|number} id Id to validate
  20239. * @returns {void}
  20240. * @throws Error if Id is not valid
  20241. * @example
  20242. * validateId([-180, -40, 110, 50])
  20243. * //=Error
  20244. * validateId([-180, -40])
  20245. * //=Error
  20246. * validateId('Foo')
  20247. * //=OK
  20248. * validateId(5)
  20249. * //=OK
  20250. * validateId(null)
  20251. * //=Error
  20252. * validateId(undefined)
  20253. * //=Error
  20254. */
  20255. function validateId(id) {
  20256. if (!id) throw new Error('id is required');
  20257. if (['string', 'number'].indexOf(typeof id) === -1) throw new Error('id must be a number or a string');
  20258. } // Deprecated methods
  20259. function radians2degrees() {
  20260. throw new Error('method has been renamed to `radiansToDegrees`');
  20261. }
  20262. function degrees2radians() {
  20263. throw new Error('method has been renamed to `degreesToRadians`');
  20264. }
  20265. function distanceToDegrees() {
  20266. throw new Error('method has been renamed to `lengthToDegrees`');
  20267. }
  20268. function distanceToRadians() {
  20269. throw new Error('method has been renamed to `lengthToRadians`');
  20270. }
  20271. function radiansToDistance() {
  20272. throw new Error('method has been renamed to `radiansToLength`');
  20273. }
  20274. function bearingToAngle() {
  20275. throw new Error('method has been renamed to `bearingToAzimuth`');
  20276. }
  20277. function convertDistance() {
  20278. throw new Error('method has been renamed to `convertLength`');
  20279. }
  20280. // CONCATENATED MODULE: ./node_modules/@turf/envelope/node_modules/@turf/meta/main.es.js
  20281. /**
  20282. * Callback for coordEach
  20283. *
  20284. * @callback coordEachCallback
  20285. * @param {Array<number>} currentCoord The current coordinate being processed.
  20286. * @param {number} coordIndex The current index of the coordinate being processed.
  20287. * @param {number} featureIndex The current index of the Feature being processed.
  20288. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  20289. * @param {number} geometryIndex The current index of the Geometry being processed.
  20290. */
  20291. /**
  20292. * Iterate over coordinates in any GeoJSON object, similar to Array.forEach()
  20293. *
  20294. * @name coordEach
  20295. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  20296. * @param {Function} callback a method that takes (currentCoord, coordIndex, featureIndex, multiFeatureIndex)
  20297. * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.
  20298. * @returns {void}
  20299. * @example
  20300. * var features = turf.featureCollection([
  20301. * turf.point([26, 37], {"foo": "bar"}),
  20302. * turf.point([36, 53], {"hello": "world"})
  20303. * ]);
  20304. *
  20305. * turf.coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  20306. * //=currentCoord
  20307. * //=coordIndex
  20308. * //=featureIndex
  20309. * //=multiFeatureIndex
  20310. * //=geometryIndex
  20311. * });
  20312. */
  20313. function coordEach(geojson, callback, excludeWrapCoord) {
  20314. // Handles null Geometry -- Skips this GeoJSON
  20315. if (geojson === null) return;
  20316. var j,
  20317. k,
  20318. l,
  20319. geometry,
  20320. stopG,
  20321. coords,
  20322. geometryMaybeCollection,
  20323. wrapShrink = 0,
  20324. coordIndex = 0,
  20325. isGeometryCollection,
  20326. type = geojson.type,
  20327. isFeatureCollection = type === 'FeatureCollection',
  20328. isFeature = type === 'Feature',
  20329. stop = isFeatureCollection ? geojson.features.length : 1; // This logic may look a little weird. The reason why it is that way
  20330. // is because it's trying to be fast. GeoJSON supports multiple kinds
  20331. // of objects at its root: FeatureCollection, Features, Geometries.
  20332. // This function has the responsibility of handling all of them, and that
  20333. // means that some of the `for` loops you see below actually just don't apply
  20334. // to certain inputs. For instance, if you give this just a
  20335. // Point geometry, then both loops are short-circuited and all we do
  20336. // is gradually rename the input until it's called 'geometry'.
  20337. //
  20338. // This also aims to allocate as few resources as possible: just a
  20339. // few numbers and booleans, rather than any temporary arrays as would
  20340. // be required with the normalization approach.
  20341. for (var featureIndex = 0; featureIndex < stop; featureIndex++) {
  20342. geometryMaybeCollection = isFeatureCollection ? geojson.features[featureIndex].geometry : isFeature ? geojson.geometry : geojson;
  20343. isGeometryCollection = geometryMaybeCollection ? geometryMaybeCollection.type === 'GeometryCollection' : false;
  20344. stopG = isGeometryCollection ? geometryMaybeCollection.geometries.length : 1;
  20345. for (var geomIndex = 0; geomIndex < stopG; geomIndex++) {
  20346. var multiFeatureIndex = 0;
  20347. var geometryIndex = 0;
  20348. geometry = isGeometryCollection ? geometryMaybeCollection.geometries[geomIndex] : geometryMaybeCollection; // Handles null Geometry -- Skips this geometry
  20349. if (geometry === null) continue;
  20350. coords = geometry.coordinates;
  20351. var geomType = geometry.type;
  20352. wrapShrink = excludeWrapCoord && (geomType === 'Polygon' || geomType === 'MultiPolygon') ? 1 : 0;
  20353. switch (geomType) {
  20354. case null:
  20355. break;
  20356. case 'Point':
  20357. if (callback(coords, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  20358. coordIndex++;
  20359. multiFeatureIndex++;
  20360. break;
  20361. case 'LineString':
  20362. case 'MultiPoint':
  20363. for (j = 0; j < coords.length; j++) {
  20364. if (callback(coords[j], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  20365. coordIndex++;
  20366. if (geomType === 'MultiPoint') multiFeatureIndex++;
  20367. }
  20368. if (geomType === 'LineString') multiFeatureIndex++;
  20369. break;
  20370. case 'Polygon':
  20371. case 'MultiLineString':
  20372. for (j = 0; j < coords.length; j++) {
  20373. for (k = 0; k < coords[j].length - wrapShrink; k++) {
  20374. if (callback(coords[j][k], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  20375. coordIndex++;
  20376. }
  20377. if (geomType === 'MultiLineString') multiFeatureIndex++;
  20378. if (geomType === 'Polygon') geometryIndex++;
  20379. }
  20380. if (geomType === 'Polygon') multiFeatureIndex++;
  20381. break;
  20382. case 'MultiPolygon':
  20383. for (j = 0; j < coords.length; j++) {
  20384. if (geomType === 'MultiPolygon') geometryIndex = 0;
  20385. for (k = 0; k < coords[j].length; k++) {
  20386. for (l = 0; l < coords[j][k].length - wrapShrink; l++) {
  20387. if (callback(coords[j][k][l], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  20388. coordIndex++;
  20389. }
  20390. geometryIndex++;
  20391. }
  20392. multiFeatureIndex++;
  20393. }
  20394. break;
  20395. case 'GeometryCollection':
  20396. for (j = 0; j < geometry.geometries.length; j++) {
  20397. if (coordEach(geometry.geometries[j], callback, excludeWrapCoord) === false) return false;
  20398. }
  20399. break;
  20400. default:
  20401. throw new Error('Unknown Geometry Type');
  20402. }
  20403. }
  20404. }
  20405. }
  20406. /**
  20407. * Callback for coordReduce
  20408. *
  20409. * The first time the callback function is called, the values provided as arguments depend
  20410. * on whether the reduce method has an initialValue argument.
  20411. *
  20412. * If an initialValue is provided to the reduce method:
  20413. * - The previousValue argument is initialValue.
  20414. * - The currentValue argument is the value of the first element present in the array.
  20415. *
  20416. * If an initialValue is not provided:
  20417. * - The previousValue argument is the value of the first element present in the array.
  20418. * - The currentValue argument is the value of the second element present in the array.
  20419. *
  20420. * @callback coordReduceCallback
  20421. * @param {*} previousValue The accumulated value previously returned in the last invocation
  20422. * of the callback, or initialValue, if supplied.
  20423. * @param {Array<number>} currentCoord The current coordinate being processed.
  20424. * @param {number} coordIndex The current index of the coordinate being processed.
  20425. * Starts at index 0, if an initialValue is provided, and at index 1 otherwise.
  20426. * @param {number} featureIndex The current index of the Feature being processed.
  20427. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  20428. * @param {number} geometryIndex The current index of the Geometry being processed.
  20429. */
  20430. /**
  20431. * Reduce coordinates in any GeoJSON object, similar to Array.reduce()
  20432. *
  20433. * @name coordReduce
  20434. * @param {FeatureCollection|Geometry|Feature} geojson any GeoJSON object
  20435. * @param {Function} callback a method that takes (previousValue, currentCoord, coordIndex)
  20436. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  20437. * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.
  20438. * @returns {*} The value that results from the reduction.
  20439. * @example
  20440. * var features = turf.featureCollection([
  20441. * turf.point([26, 37], {"foo": "bar"}),
  20442. * turf.point([36, 53], {"hello": "world"})
  20443. * ]);
  20444. *
  20445. * turf.coordReduce(features, function (previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  20446. * //=previousValue
  20447. * //=currentCoord
  20448. * //=coordIndex
  20449. * //=featureIndex
  20450. * //=multiFeatureIndex
  20451. * //=geometryIndex
  20452. * return currentCoord;
  20453. * });
  20454. */
  20455. function coordReduce(geojson, callback, initialValue, excludeWrapCoord) {
  20456. var previousValue = initialValue;
  20457. coordEach(geojson, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  20458. if (coordIndex === 0 && initialValue === undefined) previousValue = currentCoord;else previousValue = callback(previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex);
  20459. }, excludeWrapCoord);
  20460. return previousValue;
  20461. }
  20462. /**
  20463. * Callback for propEach
  20464. *
  20465. * @callback propEachCallback
  20466. * @param {Object} currentProperties The current Properties being processed.
  20467. * @param {number} featureIndex The current index of the Feature being processed.
  20468. */
  20469. /**
  20470. * Iterate over properties in any GeoJSON object, similar to Array.forEach()
  20471. *
  20472. * @name propEach
  20473. * @param {FeatureCollection|Feature} geojson any GeoJSON object
  20474. * @param {Function} callback a method that takes (currentProperties, featureIndex)
  20475. * @returns {void}
  20476. * @example
  20477. * var features = turf.featureCollection([
  20478. * turf.point([26, 37], {foo: 'bar'}),
  20479. * turf.point([36, 53], {hello: 'world'})
  20480. * ]);
  20481. *
  20482. * turf.propEach(features, function (currentProperties, featureIndex) {
  20483. * //=currentProperties
  20484. * //=featureIndex
  20485. * });
  20486. */
  20487. function propEach(geojson, callback) {
  20488. var i;
  20489. switch (geojson.type) {
  20490. case 'FeatureCollection':
  20491. for (i = 0; i < geojson.features.length; i++) {
  20492. if (callback(geojson.features[i].properties, i) === false) break;
  20493. }
  20494. break;
  20495. case 'Feature':
  20496. callback(geojson.properties, 0);
  20497. break;
  20498. }
  20499. }
  20500. /**
  20501. * Callback for propReduce
  20502. *
  20503. * The first time the callback function is called, the values provided as arguments depend
  20504. * on whether the reduce method has an initialValue argument.
  20505. *
  20506. * If an initialValue is provided to the reduce method:
  20507. * - The previousValue argument is initialValue.
  20508. * - The currentValue argument is the value of the first element present in the array.
  20509. *
  20510. * If an initialValue is not provided:
  20511. * - The previousValue argument is the value of the first element present in the array.
  20512. * - The currentValue argument is the value of the second element present in the array.
  20513. *
  20514. * @callback propReduceCallback
  20515. * @param {*} previousValue The accumulated value previously returned in the last invocation
  20516. * of the callback, or initialValue, if supplied.
  20517. * @param {*} currentProperties The current Properties being processed.
  20518. * @param {number} featureIndex The current index of the Feature being processed.
  20519. */
  20520. /**
  20521. * Reduce properties in any GeoJSON object into a single value,
  20522. * similar to how Array.reduce works. However, in this case we lazily run
  20523. * the reduction, so an array of all properties is unnecessary.
  20524. *
  20525. * @name propReduce
  20526. * @param {FeatureCollection|Feature} geojson any GeoJSON object
  20527. * @param {Function} callback a method that takes (previousValue, currentProperties, featureIndex)
  20528. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  20529. * @returns {*} The value that results from the reduction.
  20530. * @example
  20531. * var features = turf.featureCollection([
  20532. * turf.point([26, 37], {foo: 'bar'}),
  20533. * turf.point([36, 53], {hello: 'world'})
  20534. * ]);
  20535. *
  20536. * turf.propReduce(features, function (previousValue, currentProperties, featureIndex) {
  20537. * //=previousValue
  20538. * //=currentProperties
  20539. * //=featureIndex
  20540. * return currentProperties
  20541. * });
  20542. */
  20543. function propReduce(geojson, callback, initialValue) {
  20544. var previousValue = initialValue;
  20545. propEach(geojson, function (currentProperties, featureIndex) {
  20546. if (featureIndex === 0 && initialValue === undefined) previousValue = currentProperties;else previousValue = callback(previousValue, currentProperties, featureIndex);
  20547. });
  20548. return previousValue;
  20549. }
  20550. /**
  20551. * Callback for featureEach
  20552. *
  20553. * @callback featureEachCallback
  20554. * @param {Feature<any>} currentFeature The current Feature being processed.
  20555. * @param {number} featureIndex The current index of the Feature being processed.
  20556. */
  20557. /**
  20558. * Iterate over features in any GeoJSON object, similar to
  20559. * Array.forEach.
  20560. *
  20561. * @name featureEach
  20562. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  20563. * @param {Function} callback a method that takes (currentFeature, featureIndex)
  20564. * @returns {void}
  20565. * @example
  20566. * var features = turf.featureCollection([
  20567. * turf.point([26, 37], {foo: 'bar'}),
  20568. * turf.point([36, 53], {hello: 'world'})
  20569. * ]);
  20570. *
  20571. * turf.featureEach(features, function (currentFeature, featureIndex) {
  20572. * //=currentFeature
  20573. * //=featureIndex
  20574. * });
  20575. */
  20576. function featureEach(geojson, callback) {
  20577. if (geojson.type === 'Feature') {
  20578. callback(geojson, 0);
  20579. } else if (geojson.type === 'FeatureCollection') {
  20580. for (var i = 0; i < geojson.features.length; i++) {
  20581. if (callback(geojson.features[i], i) === false) break;
  20582. }
  20583. }
  20584. }
  20585. /**
  20586. * Callback for featureReduce
  20587. *
  20588. * The first time the callback function is called, the values provided as arguments depend
  20589. * on whether the reduce method has an initialValue argument.
  20590. *
  20591. * If an initialValue is provided to the reduce method:
  20592. * - The previousValue argument is initialValue.
  20593. * - The currentValue argument is the value of the first element present in the array.
  20594. *
  20595. * If an initialValue is not provided:
  20596. * - The previousValue argument is the value of the first element present in the array.
  20597. * - The currentValue argument is the value of the second element present in the array.
  20598. *
  20599. * @callback featureReduceCallback
  20600. * @param {*} previousValue The accumulated value previously returned in the last invocation
  20601. * of the callback, or initialValue, if supplied.
  20602. * @param {Feature} currentFeature The current Feature being processed.
  20603. * @param {number} featureIndex The current index of the Feature being processed.
  20604. */
  20605. /**
  20606. * Reduce features in any GeoJSON object, similar to Array.reduce().
  20607. *
  20608. * @name featureReduce
  20609. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  20610. * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex)
  20611. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  20612. * @returns {*} The value that results from the reduction.
  20613. * @example
  20614. * var features = turf.featureCollection([
  20615. * turf.point([26, 37], {"foo": "bar"}),
  20616. * turf.point([36, 53], {"hello": "world"})
  20617. * ]);
  20618. *
  20619. * turf.featureReduce(features, function (previousValue, currentFeature, featureIndex) {
  20620. * //=previousValue
  20621. * //=currentFeature
  20622. * //=featureIndex
  20623. * return currentFeature
  20624. * });
  20625. */
  20626. function featureReduce(geojson, callback, initialValue) {
  20627. var previousValue = initialValue;
  20628. featureEach(geojson, function (currentFeature, featureIndex) {
  20629. if (featureIndex === 0 && initialValue === undefined) previousValue = currentFeature;else previousValue = callback(previousValue, currentFeature, featureIndex);
  20630. });
  20631. return previousValue;
  20632. }
  20633. /**
  20634. * Get all coordinates from any GeoJSON object.
  20635. *
  20636. * @name coordAll
  20637. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  20638. * @returns {Array<Array<number>>} coordinate position array
  20639. * @example
  20640. * var features = turf.featureCollection([
  20641. * turf.point([26, 37], {foo: 'bar'}),
  20642. * turf.point([36, 53], {hello: 'world'})
  20643. * ]);
  20644. *
  20645. * var coords = turf.coordAll(features);
  20646. * //= [[26, 37], [36, 53]]
  20647. */
  20648. function coordAll(geojson) {
  20649. var coords = [];
  20650. coordEach(geojson, function (coord) {
  20651. coords.push(coord);
  20652. });
  20653. return coords;
  20654. }
  20655. /**
  20656. * Callback for geomEach
  20657. *
  20658. * @callback geomEachCallback
  20659. * @param {Geometry} currentGeometry The current Geometry being processed.
  20660. * @param {number} featureIndex The current index of the Feature being processed.
  20661. * @param {Object} featureProperties The current Feature Properties being processed.
  20662. * @param {Array<number>} featureBBox The current Feature BBox being processed.
  20663. * @param {number|string} featureId The current Feature Id being processed.
  20664. */
  20665. /**
  20666. * Iterate over each geometry in any GeoJSON object, similar to Array.forEach()
  20667. *
  20668. * @name geomEach
  20669. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  20670. * @param {Function} callback a method that takes (currentGeometry, featureIndex, featureProperties, featureBBox, featureId)
  20671. * @returns {void}
  20672. * @example
  20673. * var features = turf.featureCollection([
  20674. * turf.point([26, 37], {foo: 'bar'}),
  20675. * turf.point([36, 53], {hello: 'world'})
  20676. * ]);
  20677. *
  20678. * turf.geomEach(features, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  20679. * //=currentGeometry
  20680. * //=featureIndex
  20681. * //=featureProperties
  20682. * //=featureBBox
  20683. * //=featureId
  20684. * });
  20685. */
  20686. function geomEach(geojson, callback) {
  20687. var i,
  20688. j,
  20689. g,
  20690. geometry,
  20691. stopG,
  20692. geometryMaybeCollection,
  20693. isGeometryCollection,
  20694. featureProperties,
  20695. featureBBox,
  20696. featureId,
  20697. featureIndex = 0,
  20698. isFeatureCollection = geojson.type === 'FeatureCollection',
  20699. isFeature = geojson.type === 'Feature',
  20700. stop = isFeatureCollection ? geojson.features.length : 1; // This logic may look a little weird. The reason why it is that way
  20701. // is because it's trying to be fast. GeoJSON supports multiple kinds
  20702. // of objects at its root: FeatureCollection, Features, Geometries.
  20703. // This function has the responsibility of handling all of them, and that
  20704. // means that some of the `for` loops you see below actually just don't apply
  20705. // to certain inputs. For instance, if you give this just a
  20706. // Point geometry, then both loops are short-circuited and all we do
  20707. // is gradually rename the input until it's called 'geometry'.
  20708. //
  20709. // This also aims to allocate as few resources as possible: just a
  20710. // few numbers and booleans, rather than any temporary arrays as would
  20711. // be required with the normalization approach.
  20712. for (i = 0; i < stop; i++) {
  20713. geometryMaybeCollection = isFeatureCollection ? geojson.features[i].geometry : isFeature ? geojson.geometry : geojson;
  20714. featureProperties = isFeatureCollection ? geojson.features[i].properties : isFeature ? geojson.properties : {};
  20715. featureBBox = isFeatureCollection ? geojson.features[i].bbox : isFeature ? geojson.bbox : undefined;
  20716. featureId = isFeatureCollection ? geojson.features[i].id : isFeature ? geojson.id : undefined;
  20717. isGeometryCollection = geometryMaybeCollection ? geometryMaybeCollection.type === 'GeometryCollection' : false;
  20718. stopG = isGeometryCollection ? geometryMaybeCollection.geometries.length : 1;
  20719. for (g = 0; g < stopG; g++) {
  20720. geometry = isGeometryCollection ? geometryMaybeCollection.geometries[g] : geometryMaybeCollection; // Handle null Geometry
  20721. if (geometry === null) {
  20722. if (callback(null, featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  20723. continue;
  20724. }
  20725. switch (geometry.type) {
  20726. case 'Point':
  20727. case 'LineString':
  20728. case 'MultiPoint':
  20729. case 'Polygon':
  20730. case 'MultiLineString':
  20731. case 'MultiPolygon':
  20732. {
  20733. if (callback(geometry, featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  20734. break;
  20735. }
  20736. case 'GeometryCollection':
  20737. {
  20738. for (j = 0; j < geometry.geometries.length; j++) {
  20739. if (callback(geometry.geometries[j], featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  20740. }
  20741. break;
  20742. }
  20743. default:
  20744. throw new Error('Unknown Geometry Type');
  20745. }
  20746. } // Only increase `featureIndex` per each feature
  20747. featureIndex++;
  20748. }
  20749. }
  20750. /**
  20751. * Callback for geomReduce
  20752. *
  20753. * The first time the callback function is called, the values provided as arguments depend
  20754. * on whether the reduce method has an initialValue argument.
  20755. *
  20756. * If an initialValue is provided to the reduce method:
  20757. * - The previousValue argument is initialValue.
  20758. * - The currentValue argument is the value of the first element present in the array.
  20759. *
  20760. * If an initialValue is not provided:
  20761. * - The previousValue argument is the value of the first element present in the array.
  20762. * - The currentValue argument is the value of the second element present in the array.
  20763. *
  20764. * @callback geomReduceCallback
  20765. * @param {*} previousValue The accumulated value previously returned in the last invocation
  20766. * of the callback, or initialValue, if supplied.
  20767. * @param {Geometry} currentGeometry The current Geometry being processed.
  20768. * @param {number} featureIndex The current index of the Feature being processed.
  20769. * @param {Object} featureProperties The current Feature Properties being processed.
  20770. * @param {Array<number>} featureBBox The current Feature BBox being processed.
  20771. * @param {number|string} featureId The current Feature Id being processed.
  20772. */
  20773. /**
  20774. * Reduce geometry in any GeoJSON object, similar to Array.reduce().
  20775. *
  20776. * @name geomReduce
  20777. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  20778. * @param {Function} callback a method that takes (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId)
  20779. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  20780. * @returns {*} The value that results from the reduction.
  20781. * @example
  20782. * var features = turf.featureCollection([
  20783. * turf.point([26, 37], {foo: 'bar'}),
  20784. * turf.point([36, 53], {hello: 'world'})
  20785. * ]);
  20786. *
  20787. * turf.geomReduce(features, function (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  20788. * //=previousValue
  20789. * //=currentGeometry
  20790. * //=featureIndex
  20791. * //=featureProperties
  20792. * //=featureBBox
  20793. * //=featureId
  20794. * return currentGeometry
  20795. * });
  20796. */
  20797. function geomReduce(geojson, callback, initialValue) {
  20798. var previousValue = initialValue;
  20799. geomEach(geojson, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  20800. if (featureIndex === 0 && initialValue === undefined) previousValue = currentGeometry;else previousValue = callback(previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId);
  20801. });
  20802. return previousValue;
  20803. }
  20804. /**
  20805. * Callback for flattenEach
  20806. *
  20807. * @callback flattenEachCallback
  20808. * @param {Feature} currentFeature The current flattened feature being processed.
  20809. * @param {number} featureIndex The current index of the Feature being processed.
  20810. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  20811. */
  20812. /**
  20813. * Iterate over flattened features in any GeoJSON object, similar to
  20814. * Array.forEach.
  20815. *
  20816. * @name flattenEach
  20817. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  20818. * @param {Function} callback a method that takes (currentFeature, featureIndex, multiFeatureIndex)
  20819. * @example
  20820. * var features = turf.featureCollection([
  20821. * turf.point([26, 37], {foo: 'bar'}),
  20822. * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})
  20823. * ]);
  20824. *
  20825. * turf.flattenEach(features, function (currentFeature, featureIndex, multiFeatureIndex) {
  20826. * //=currentFeature
  20827. * //=featureIndex
  20828. * //=multiFeatureIndex
  20829. * });
  20830. */
  20831. function flattenEach(geojson, callback) {
  20832. geomEach(geojson, function (geometry, featureIndex, properties, bbox, id) {
  20833. // Callback for single geometry
  20834. var type = geometry === null ? null : geometry.type;
  20835. switch (type) {
  20836. case null:
  20837. case 'Point':
  20838. case 'LineString':
  20839. case 'Polygon':
  20840. if (callback(main_es_feature(geometry, properties, {
  20841. bbox: bbox,
  20842. id: id
  20843. }), featureIndex, 0) === false) return false;
  20844. return;
  20845. }
  20846. var geomType; // Callback for multi-geometry
  20847. switch (type) {
  20848. case 'MultiPoint':
  20849. geomType = 'Point';
  20850. break;
  20851. case 'MultiLineString':
  20852. geomType = 'LineString';
  20853. break;
  20854. case 'MultiPolygon':
  20855. geomType = 'Polygon';
  20856. break;
  20857. }
  20858. for (var multiFeatureIndex = 0; multiFeatureIndex < geometry.coordinates.length; multiFeatureIndex++) {
  20859. var coordinate = geometry.coordinates[multiFeatureIndex];
  20860. var geom = {
  20861. type: geomType,
  20862. coordinates: coordinate
  20863. };
  20864. if (callback(main_es_feature(geom, properties), featureIndex, multiFeatureIndex) === false) return false;
  20865. }
  20866. });
  20867. }
  20868. /**
  20869. * Callback for flattenReduce
  20870. *
  20871. * The first time the callback function is called, the values provided as arguments depend
  20872. * on whether the reduce method has an initialValue argument.
  20873. *
  20874. * If an initialValue is provided to the reduce method:
  20875. * - The previousValue argument is initialValue.
  20876. * - The currentValue argument is the value of the first element present in the array.
  20877. *
  20878. * If an initialValue is not provided:
  20879. * - The previousValue argument is the value of the first element present in the array.
  20880. * - The currentValue argument is the value of the second element present in the array.
  20881. *
  20882. * @callback flattenReduceCallback
  20883. * @param {*} previousValue The accumulated value previously returned in the last invocation
  20884. * of the callback, or initialValue, if supplied.
  20885. * @param {Feature} currentFeature The current Feature being processed.
  20886. * @param {number} featureIndex The current index of the Feature being processed.
  20887. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  20888. */
  20889. /**
  20890. * Reduce flattened features in any GeoJSON object, similar to Array.reduce().
  20891. *
  20892. * @name flattenReduce
  20893. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  20894. * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex, multiFeatureIndex)
  20895. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  20896. * @returns {*} The value that results from the reduction.
  20897. * @example
  20898. * var features = turf.featureCollection([
  20899. * turf.point([26, 37], {foo: 'bar'}),
  20900. * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})
  20901. * ]);
  20902. *
  20903. * turf.flattenReduce(features, function (previousValue, currentFeature, featureIndex, multiFeatureIndex) {
  20904. * //=previousValue
  20905. * //=currentFeature
  20906. * //=featureIndex
  20907. * //=multiFeatureIndex
  20908. * return currentFeature
  20909. * });
  20910. */
  20911. function flattenReduce(geojson, callback, initialValue) {
  20912. var previousValue = initialValue;
  20913. flattenEach(geojson, function (currentFeature, featureIndex, multiFeatureIndex) {
  20914. if (featureIndex === 0 && multiFeatureIndex === 0 && initialValue === undefined) previousValue = currentFeature;else previousValue = callback(previousValue, currentFeature, featureIndex, multiFeatureIndex);
  20915. });
  20916. return previousValue;
  20917. }
  20918. /**
  20919. * Callback for segmentEach
  20920. *
  20921. * @callback segmentEachCallback
  20922. * @param {Feature<LineString>} currentSegment The current Segment being processed.
  20923. * @param {number} featureIndex The current index of the Feature being processed.
  20924. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  20925. * @param {number} geometryIndex The current index of the Geometry being processed.
  20926. * @param {number} segmentIndex The current index of the Segment being processed.
  20927. * @returns {void}
  20928. */
  20929. /**
  20930. * Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEach()
  20931. * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  20932. *
  20933. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON
  20934. * @param {Function} callback a method that takes (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex)
  20935. * @returns {void}
  20936. * @example
  20937. * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);
  20938. *
  20939. * // Iterate over GeoJSON by 2-vertex segments
  20940. * turf.segmentEach(polygon, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  20941. * //=currentSegment
  20942. * //=featureIndex
  20943. * //=multiFeatureIndex
  20944. * //=geometryIndex
  20945. * //=segmentIndex
  20946. * });
  20947. *
  20948. * // Calculate the total number of segments
  20949. * var total = 0;
  20950. * turf.segmentEach(polygon, function () {
  20951. * total++;
  20952. * });
  20953. */
  20954. function segmentEach(geojson, callback) {
  20955. flattenEach(geojson, function (feature$$1, featureIndex, multiFeatureIndex) {
  20956. var segmentIndex = 0; // Exclude null Geometries
  20957. if (!feature$$1.geometry) return; // (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  20958. var type = feature$$1.geometry.type;
  20959. if (type === 'Point' || type === 'MultiPoint') return; // Generate 2-vertex line segments
  20960. var previousCoords;
  20961. if (coordEach(feature$$1, function (currentCoord, coordIndex, featureIndexCoord, mutliPartIndexCoord, geometryIndex) {
  20962. // Simulating a meta.coordReduce() since `reduce` operations cannot be stopped by returning `false`
  20963. if (previousCoords === undefined) {
  20964. previousCoords = currentCoord;
  20965. return;
  20966. }
  20967. var currentSegment = lineString([previousCoords, currentCoord], feature$$1.properties);
  20968. if (callback(currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) === false) return false;
  20969. segmentIndex++;
  20970. previousCoords = currentCoord;
  20971. }) === false) return false;
  20972. });
  20973. }
  20974. /**
  20975. * Callback for segmentReduce
  20976. *
  20977. * The first time the callback function is called, the values provided as arguments depend
  20978. * on whether the reduce method has an initialValue argument.
  20979. *
  20980. * If an initialValue is provided to the reduce method:
  20981. * - The previousValue argument is initialValue.
  20982. * - The currentValue argument is the value of the first element present in the array.
  20983. *
  20984. * If an initialValue is not provided:
  20985. * - The previousValue argument is the value of the first element present in the array.
  20986. * - The currentValue argument is the value of the second element present in the array.
  20987. *
  20988. * @callback segmentReduceCallback
  20989. * @param {*} previousValue The accumulated value previously returned in the last invocation
  20990. * of the callback, or initialValue, if supplied.
  20991. * @param {Feature<LineString>} currentSegment The current Segment being processed.
  20992. * @param {number} featureIndex The current index of the Feature being processed.
  20993. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  20994. * @param {number} geometryIndex The current index of the Geometry being processed.
  20995. * @param {number} segmentIndex The current index of the Segment being processed.
  20996. */
  20997. /**
  20998. * Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce()
  20999. * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  21000. *
  21001. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON
  21002. * @param {Function} callback a method that takes (previousValue, currentSegment, currentIndex)
  21003. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  21004. * @returns {void}
  21005. * @example
  21006. * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);
  21007. *
  21008. * // Iterate over GeoJSON by 2-vertex segments
  21009. * turf.segmentReduce(polygon, function (previousSegment, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  21010. * //= previousSegment
  21011. * //= currentSegment
  21012. * //= featureIndex
  21013. * //= multiFeatureIndex
  21014. * //= geometryIndex
  21015. * //= segmentInex
  21016. * return currentSegment
  21017. * });
  21018. *
  21019. * // Calculate the total number of segments
  21020. * var initialValue = 0
  21021. * var total = turf.segmentReduce(polygon, function (previousValue) {
  21022. * previousValue++;
  21023. * return previousValue;
  21024. * }, initialValue);
  21025. */
  21026. function segmentReduce(geojson, callback, initialValue) {
  21027. var previousValue = initialValue;
  21028. var started = false;
  21029. segmentEach(geojson, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  21030. if (started === false && initialValue === undefined) previousValue = currentSegment;else previousValue = callback(previousValue, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex);
  21031. started = true;
  21032. });
  21033. return previousValue;
  21034. }
  21035. /**
  21036. * Callback for lineEach
  21037. *
  21038. * @callback lineEachCallback
  21039. * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed
  21040. * @param {number} featureIndex The current index of the Feature being processed
  21041. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed
  21042. * @param {number} geometryIndex The current index of the Geometry being processed
  21043. */
  21044. /**
  21045. * Iterate over line or ring coordinates in LineString, Polygon, MultiLineString, MultiPolygon Features or Geometries,
  21046. * similar to Array.forEach.
  21047. *
  21048. * @name lineEach
  21049. * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object
  21050. * @param {Function} callback a method that takes (currentLine, featureIndex, multiFeatureIndex, geometryIndex)
  21051. * @example
  21052. * var multiLine = turf.multiLineString([
  21053. * [[26, 37], [35, 45]],
  21054. * [[36, 53], [38, 50], [41, 55]]
  21055. * ]);
  21056. *
  21057. * turf.lineEach(multiLine, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  21058. * //=currentLine
  21059. * //=featureIndex
  21060. * //=multiFeatureIndex
  21061. * //=geometryIndex
  21062. * });
  21063. */
  21064. function lineEach(geojson, callback) {
  21065. // validation
  21066. if (!geojson) throw new Error('geojson is required');
  21067. flattenEach(geojson, function (feature$$1, featureIndex, multiFeatureIndex) {
  21068. if (feature$$1.geometry === null) return;
  21069. var type = feature$$1.geometry.type;
  21070. var coords = feature$$1.geometry.coordinates;
  21071. switch (type) {
  21072. case 'LineString':
  21073. if (callback(feature$$1, featureIndex, multiFeatureIndex, 0, 0) === false) return false;
  21074. break;
  21075. case 'Polygon':
  21076. for (var geometryIndex = 0; geometryIndex < coords.length; geometryIndex++) {
  21077. if (callback(lineString(coords[geometryIndex], feature$$1.properties), featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  21078. }
  21079. break;
  21080. }
  21081. });
  21082. }
  21083. /**
  21084. * Callback for lineReduce
  21085. *
  21086. * The first time the callback function is called, the values provided as arguments depend
  21087. * on whether the reduce method has an initialValue argument.
  21088. *
  21089. * If an initialValue is provided to the reduce method:
  21090. * - The previousValue argument is initialValue.
  21091. * - The currentValue argument is the value of the first element present in the array.
  21092. *
  21093. * If an initialValue is not provided:
  21094. * - The previousValue argument is the value of the first element present in the array.
  21095. * - The currentValue argument is the value of the second element present in the array.
  21096. *
  21097. * @callback lineReduceCallback
  21098. * @param {*} previousValue The accumulated value previously returned in the last invocation
  21099. * of the callback, or initialValue, if supplied.
  21100. * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed.
  21101. * @param {number} featureIndex The current index of the Feature being processed
  21102. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed
  21103. * @param {number} geometryIndex The current index of the Geometry being processed
  21104. */
  21105. /**
  21106. * Reduce features in any GeoJSON object, similar to Array.reduce().
  21107. *
  21108. * @name lineReduce
  21109. * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object
  21110. * @param {Function} callback a method that takes (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex)
  21111. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  21112. * @returns {*} The value that results from the reduction.
  21113. * @example
  21114. * var multiPoly = turf.multiPolygon([
  21115. * turf.polygon([[[12,48],[2,41],[24,38],[12,48]], [[9,44],[13,41],[13,45],[9,44]]]),
  21116. * turf.polygon([[[5, 5], [0, 0], [2, 2], [4, 4], [5, 5]]])
  21117. * ]);
  21118. *
  21119. * turf.lineReduce(multiPoly, function (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  21120. * //=previousValue
  21121. * //=currentLine
  21122. * //=featureIndex
  21123. * //=multiFeatureIndex
  21124. * //=geometryIndex
  21125. * return currentLine
  21126. * });
  21127. */
  21128. function lineReduce(geojson, callback, initialValue) {
  21129. var previousValue = initialValue;
  21130. lineEach(geojson, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  21131. if (featureIndex === 0 && initialValue === undefined) previousValue = currentLine;else previousValue = callback(previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex);
  21132. });
  21133. return previousValue;
  21134. }
  21135. /**
  21136. * Finds a particular 2-vertex LineString Segment from a GeoJSON using `@turf/meta` indexes.
  21137. *
  21138. * Negative indexes are permitted.
  21139. * Point & MultiPoint will always return null.
  21140. *
  21141. * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry
  21142. * @param {Object} [options={}] Optional parameters
  21143. * @param {number} [options.featureIndex=0] Feature Index
  21144. * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index
  21145. * @param {number} [options.geometryIndex=0] Geometry Index
  21146. * @param {number} [options.segmentIndex=0] Segment Index
  21147. * @param {Object} [options.properties={}] Translate Properties to output LineString
  21148. * @param {BBox} [options.bbox={}] Translate BBox to output LineString
  21149. * @param {number|string} [options.id={}] Translate Id to output LineString
  21150. * @returns {Feature<LineString>} 2-vertex GeoJSON Feature LineString
  21151. * @example
  21152. * var multiLine = turf.multiLineString([
  21153. * [[10, 10], [50, 30], [30, 40]],
  21154. * [[-10, -10], [-50, -30], [-30, -40]]
  21155. * ]);
  21156. *
  21157. * // First Segment (defaults are 0)
  21158. * turf.findSegment(multiLine);
  21159. * // => Feature<LineString<[[10, 10], [50, 30]]>>
  21160. *
  21161. * // First Segment of 2nd Multi Feature
  21162. * turf.findSegment(multiLine, {multiFeatureIndex: 1});
  21163. * // => Feature<LineString<[[-10, -10], [-50, -30]]>>
  21164. *
  21165. * // Last Segment of Last Multi Feature
  21166. * turf.findSegment(multiLine, {multiFeatureIndex: -1, segmentIndex: -1});
  21167. * // => Feature<LineString<[[-50, -30], [-30, -40]]>>
  21168. */
  21169. function findSegment(geojson, options) {
  21170. // Optional Parameters
  21171. options = options || {};
  21172. if (!isObject(options)) throw new Error('options is invalid');
  21173. var featureIndex = options.featureIndex || 0;
  21174. var multiFeatureIndex = options.multiFeatureIndex || 0;
  21175. var geometryIndex = options.geometryIndex || 0;
  21176. var segmentIndex = options.segmentIndex || 0; // Find FeatureIndex
  21177. var properties = options.properties;
  21178. var geometry;
  21179. switch (geojson.type) {
  21180. case 'FeatureCollection':
  21181. if (featureIndex < 0) featureIndex = geojson.features.length + featureIndex;
  21182. properties = properties || geojson.features[featureIndex].properties;
  21183. geometry = geojson.features[featureIndex].geometry;
  21184. break;
  21185. case 'Feature':
  21186. properties = properties || geojson.properties;
  21187. geometry = geojson.geometry;
  21188. break;
  21189. case 'Point':
  21190. case 'MultiPoint':
  21191. return null;
  21192. case 'LineString':
  21193. case 'Polygon':
  21194. case 'MultiLineString':
  21195. case 'MultiPolygon':
  21196. geometry = geojson;
  21197. break;
  21198. default:
  21199. throw new Error('geojson is invalid');
  21200. } // Find SegmentIndex
  21201. if (geometry === null) return null;
  21202. var coords = geometry.coordinates;
  21203. switch (geometry.type) {
  21204. case 'Point':
  21205. case 'MultiPoint':
  21206. return null;
  21207. case 'LineString':
  21208. if (segmentIndex < 0) segmentIndex = coords.length + segmentIndex - 1;
  21209. return lineString([coords[segmentIndex], coords[segmentIndex + 1]], properties, options);
  21210. case 'Polygon':
  21211. if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;
  21212. if (segmentIndex < 0) segmentIndex = coords[geometryIndex].length + segmentIndex - 1;
  21213. return lineString([coords[geometryIndex][segmentIndex], coords[geometryIndex][segmentIndex + 1]], properties, options);
  21214. case 'MultiLineString':
  21215. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  21216. if (segmentIndex < 0) segmentIndex = coords[multiFeatureIndex].length + segmentIndex - 1;
  21217. return lineString([coords[multiFeatureIndex][segmentIndex], coords[multiFeatureIndex][segmentIndex + 1]], properties, options);
  21218. case 'MultiPolygon':
  21219. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  21220. if (geometryIndex < 0) geometryIndex = coords[multiFeatureIndex].length + geometryIndex;
  21221. if (segmentIndex < 0) segmentIndex = coords[multiFeatureIndex][geometryIndex].length - segmentIndex - 1;
  21222. return lineString([coords[multiFeatureIndex][geometryIndex][segmentIndex], coords[multiFeatureIndex][geometryIndex][segmentIndex + 1]], properties, options);
  21223. }
  21224. throw new Error('geojson is invalid');
  21225. }
  21226. /**
  21227. * Finds a particular Point from a GeoJSON using `@turf/meta` indexes.
  21228. *
  21229. * Negative indexes are permitted.
  21230. *
  21231. * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry
  21232. * @param {Object} [options={}] Optional parameters
  21233. * @param {number} [options.featureIndex=0] Feature Index
  21234. * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index
  21235. * @param {number} [options.geometryIndex=0] Geometry Index
  21236. * @param {number} [options.coordIndex=0] Coord Index
  21237. * @param {Object} [options.properties={}] Translate Properties to output Point
  21238. * @param {BBox} [options.bbox={}] Translate BBox to output Point
  21239. * @param {number|string} [options.id={}] Translate Id to output Point
  21240. * @returns {Feature<Point>} 2-vertex GeoJSON Feature Point
  21241. * @example
  21242. * var multiLine = turf.multiLineString([
  21243. * [[10, 10], [50, 30], [30, 40]],
  21244. * [[-10, -10], [-50, -30], [-30, -40]]
  21245. * ]);
  21246. *
  21247. * // First Segment (defaults are 0)
  21248. * turf.findPoint(multiLine);
  21249. * // => Feature<Point<[10, 10]>>
  21250. *
  21251. * // First Segment of the 2nd Multi-Feature
  21252. * turf.findPoint(multiLine, {multiFeatureIndex: 1});
  21253. * // => Feature<Point<[-10, -10]>>
  21254. *
  21255. * // Last Segment of last Multi-Feature
  21256. * turf.findPoint(multiLine, {multiFeatureIndex: -1, coordIndex: -1});
  21257. * // => Feature<Point<[-30, -40]>>
  21258. */
  21259. function findPoint(geojson, options) {
  21260. // Optional Parameters
  21261. options = options || {};
  21262. if (!isObject(options)) throw new Error('options is invalid');
  21263. var featureIndex = options.featureIndex || 0;
  21264. var multiFeatureIndex = options.multiFeatureIndex || 0;
  21265. var geometryIndex = options.geometryIndex || 0;
  21266. var coordIndex = options.coordIndex || 0; // Find FeatureIndex
  21267. var properties = options.properties;
  21268. var geometry;
  21269. switch (geojson.type) {
  21270. case 'FeatureCollection':
  21271. if (featureIndex < 0) featureIndex = geojson.features.length + featureIndex;
  21272. properties = properties || geojson.features[featureIndex].properties;
  21273. geometry = geojson.features[featureIndex].geometry;
  21274. break;
  21275. case 'Feature':
  21276. properties = properties || geojson.properties;
  21277. geometry = geojson.geometry;
  21278. break;
  21279. case 'Point':
  21280. case 'MultiPoint':
  21281. return null;
  21282. case 'LineString':
  21283. case 'Polygon':
  21284. case 'MultiLineString':
  21285. case 'MultiPolygon':
  21286. geometry = geojson;
  21287. break;
  21288. default:
  21289. throw new Error('geojson is invalid');
  21290. } // Find Coord Index
  21291. if (geometry === null) return null;
  21292. var coords = geometry.coordinates;
  21293. switch (geometry.type) {
  21294. case 'Point':
  21295. return main_es_point(coords, properties, options);
  21296. case 'MultiPoint':
  21297. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  21298. return main_es_point(coords[multiFeatureIndex], properties, options);
  21299. case 'LineString':
  21300. if (coordIndex < 0) coordIndex = coords.length + coordIndex;
  21301. return main_es_point(coords[coordIndex], properties, options);
  21302. case 'Polygon':
  21303. if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;
  21304. if (coordIndex < 0) coordIndex = coords[geometryIndex].length + coordIndex;
  21305. return main_es_point(coords[geometryIndex][coordIndex], properties, options);
  21306. case 'MultiLineString':
  21307. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  21308. if (coordIndex < 0) coordIndex = coords[multiFeatureIndex].length + coordIndex;
  21309. return main_es_point(coords[multiFeatureIndex][coordIndex], properties, options);
  21310. case 'MultiPolygon':
  21311. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  21312. if (geometryIndex < 0) geometryIndex = coords[multiFeatureIndex].length + geometryIndex;
  21313. if (coordIndex < 0) coordIndex = coords[multiFeatureIndex][geometryIndex].length - coordIndex;
  21314. return main_es_point(coords[multiFeatureIndex][geometryIndex][coordIndex], properties, options);
  21315. }
  21316. throw new Error('geojson is invalid');
  21317. }
  21318. // CONCATENATED MODULE: ./node_modules/@turf/envelope/node_modules/@turf/bbox/main.es.js
  21319. /**
  21320. * Takes a set of features, calculates the bbox of all input features, and returns a bounding box.
  21321. *
  21322. * @name bbox
  21323. * @param {GeoJSON} geojson any GeoJSON object
  21324. * @returns {BBox} bbox extent in [minX, minY, maxX, maxY] order
  21325. * @example
  21326. * var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]]);
  21327. * var bbox = turf.bbox(line);
  21328. * var bboxPolygon = turf.bboxPolygon(bbox);
  21329. *
  21330. * //addToMap
  21331. * var addToMap = [line, bboxPolygon]
  21332. */
  21333. function main_es_bbox(geojson) {
  21334. var BBox = [Infinity, Infinity, -Infinity, -Infinity];
  21335. coordEach(geojson, function (coord) {
  21336. if (BBox[0] > coord[0]) BBox[0] = coord[0];
  21337. if (BBox[1] > coord[1]) BBox[1] = coord[1];
  21338. if (BBox[2] < coord[0]) BBox[2] = coord[0];
  21339. if (BBox[3] < coord[1]) BBox[3] = coord[1];
  21340. });
  21341. return BBox;
  21342. }
  21343. /* harmony default export */ var main_es = (main_es_bbox);
  21344. // CONCATENATED MODULE: ./node_modules/@turf/bbox-polygon/node_modules/@turf/helpers/main.es.js
  21345. /**
  21346. * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.
  21347. */
  21348. var main_es_earthRadius = 6371008.8;
  21349. /**
  21350. * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.
  21351. */
  21352. var main_es_factors = {
  21353. meters: main_es_earthRadius,
  21354. metres: main_es_earthRadius,
  21355. millimeters: main_es_earthRadius * 1000,
  21356. millimetres: main_es_earthRadius * 1000,
  21357. centimeters: main_es_earthRadius * 100,
  21358. centimetres: main_es_earthRadius * 100,
  21359. kilometers: main_es_earthRadius / 1000,
  21360. kilometres: main_es_earthRadius / 1000,
  21361. miles: main_es_earthRadius / 1609.344,
  21362. nauticalmiles: main_es_earthRadius / 1852,
  21363. inches: main_es_earthRadius * 39.370,
  21364. yards: main_es_earthRadius / 1.0936,
  21365. feet: main_es_earthRadius * 3.28084,
  21366. radians: 1,
  21367. degrees: main_es_earthRadius / 111325
  21368. };
  21369. /**
  21370. * Units of measurement factors based on 1 meter.
  21371. */
  21372. var main_es_unitsFactors = {
  21373. meters: 1,
  21374. metres: 1,
  21375. millimeters: 1000,
  21376. millimetres: 1000,
  21377. centimeters: 100,
  21378. centimetres: 100,
  21379. kilometers: 1 / 1000,
  21380. kilometres: 1 / 1000,
  21381. miles: 1 / 1609.344,
  21382. nauticalmiles: 1 / 1852,
  21383. inches: 39.370,
  21384. yards: 1 / 1.0936,
  21385. feet: 3.28084,
  21386. radians: 1 / main_es_earthRadius,
  21387. degrees: 1 / 111325
  21388. };
  21389. /**
  21390. * Area of measurement factors based on 1 square meter.
  21391. */
  21392. var main_es_areaFactors = {
  21393. meters: 1,
  21394. metres: 1,
  21395. millimeters: 1000000,
  21396. millimetres: 1000000,
  21397. centimeters: 10000,
  21398. centimetres: 10000,
  21399. kilometers: 0.000001,
  21400. kilometres: 0.000001,
  21401. acres: 0.000247105,
  21402. miles: 3.86e-7,
  21403. yards: 1.195990046,
  21404. feet: 10.763910417,
  21405. inches: 1550.003100006
  21406. };
  21407. /**
  21408. * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.
  21409. *
  21410. * @name feature
  21411. * @param {Geometry} geometry input geometry
  21412. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  21413. * @param {Object} [options={}] Optional Parameters
  21414. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  21415. * @param {string|number} [options.id] Identifier associated with the Feature
  21416. * @returns {Feature} a GeoJSON Feature
  21417. * @example
  21418. * var geometry = {
  21419. * "type": "Point",
  21420. * "coordinates": [110, 50]
  21421. * };
  21422. *
  21423. * var feature = turf.feature(geometry);
  21424. *
  21425. * //=feature
  21426. */
  21427. function helpers_main_es_feature(geometry, properties, options) {
  21428. // Optional Parameters
  21429. options = options || {};
  21430. if (!main_es_isObject(options)) throw new Error('options is invalid');
  21431. var bbox = options.bbox;
  21432. var id = options.id; // Validation
  21433. if (geometry === undefined) throw new Error('geometry is required');
  21434. if (properties && properties.constructor !== Object) throw new Error('properties must be an Object');
  21435. if (bbox) main_es_validateBBox(bbox);
  21436. if (id) main_es_validateId(id); // Main
  21437. var feat = {
  21438. type: 'Feature'
  21439. };
  21440. if (id) feat.id = id;
  21441. if (bbox) feat.bbox = bbox;
  21442. feat.properties = properties || {};
  21443. feat.geometry = geometry;
  21444. return feat;
  21445. }
  21446. /**
  21447. * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.
  21448. * For GeometryCollection type use `helpers.geometryCollection`
  21449. *
  21450. * @name geometry
  21451. * @param {string} type Geometry Type
  21452. * @param {Array<number>} coordinates Coordinates
  21453. * @param {Object} [options={}] Optional Parameters
  21454. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Geometry
  21455. * @returns {Geometry} a GeoJSON Geometry
  21456. * @example
  21457. * var type = 'Point';
  21458. * var coordinates = [110, 50];
  21459. *
  21460. * var geometry = turf.geometry(type, coordinates);
  21461. *
  21462. * //=geometry
  21463. */
  21464. function helpers_main_es_geometry(type, coordinates, options) {
  21465. // Optional Parameters
  21466. options = options || {};
  21467. if (!main_es_isObject(options)) throw new Error('options is invalid');
  21468. var bbox = options.bbox; // Validation
  21469. if (!type) throw new Error('type is required');
  21470. if (!coordinates) throw new Error('coordinates is required');
  21471. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  21472. if (bbox) main_es_validateBBox(bbox); // Main
  21473. var geom;
  21474. switch (type) {
  21475. case 'Point':
  21476. geom = helpers_main_es_point(coordinates).geometry;
  21477. break;
  21478. case 'LineString':
  21479. geom = main_es_lineString(coordinates).geometry;
  21480. break;
  21481. case 'Polygon':
  21482. geom = main_es_polygon(coordinates).geometry;
  21483. break;
  21484. case 'MultiPoint':
  21485. geom = main_es_multiPoint(coordinates).geometry;
  21486. break;
  21487. case 'MultiLineString':
  21488. geom = main_es_multiLineString(coordinates).geometry;
  21489. break;
  21490. case 'MultiPolygon':
  21491. geom = main_es_multiPolygon(coordinates).geometry;
  21492. break;
  21493. default:
  21494. throw new Error(type + ' is invalid');
  21495. }
  21496. if (bbox) geom.bbox = bbox;
  21497. return geom;
  21498. }
  21499. /**
  21500. * Creates a {@link Point} {@link Feature} from a Position.
  21501. *
  21502. * @name point
  21503. * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)
  21504. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  21505. * @param {Object} [options={}] Optional Parameters
  21506. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  21507. * @param {string|number} [options.id] Identifier associated with the Feature
  21508. * @returns {Feature<Point>} a Point feature
  21509. * @example
  21510. * var point = turf.point([-75.343, 39.984]);
  21511. *
  21512. * //=point
  21513. */
  21514. function helpers_main_es_point(coordinates, properties, options) {
  21515. if (!coordinates) throw new Error('coordinates is required');
  21516. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  21517. if (coordinates.length < 2) throw new Error('coordinates must be at least 2 numbers long');
  21518. if (!main_es_isNumber(coordinates[0]) || !main_es_isNumber(coordinates[1])) throw new Error('coordinates must contain numbers');
  21519. return helpers_main_es_feature({
  21520. type: 'Point',
  21521. coordinates: coordinates
  21522. }, properties, options);
  21523. }
  21524. /**
  21525. * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.
  21526. *
  21527. * @name points
  21528. * @param {Array<Array<number>>} coordinates an array of Points
  21529. * @param {Object} [properties={}] Translate these properties to each Feature
  21530. * @param {Object} [options={}] Optional Parameters
  21531. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  21532. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  21533. * @returns {FeatureCollection<Point>} Point Feature
  21534. * @example
  21535. * var points = turf.points([
  21536. * [-75, 39],
  21537. * [-80, 45],
  21538. * [-78, 50]
  21539. * ]);
  21540. *
  21541. * //=points
  21542. */
  21543. function main_es_points(coordinates, properties, options) {
  21544. if (!coordinates) throw new Error('coordinates is required');
  21545. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  21546. return main_es_featureCollection(coordinates.map(function (coords) {
  21547. return helpers_main_es_point(coords, properties);
  21548. }), options);
  21549. }
  21550. /**
  21551. * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.
  21552. *
  21553. * @name polygon
  21554. * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings
  21555. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  21556. * @param {Object} [options={}] Optional Parameters
  21557. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  21558. * @param {string|number} [options.id] Identifier associated with the Feature
  21559. * @returns {Feature<Polygon>} Polygon Feature
  21560. * @example
  21561. * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });
  21562. *
  21563. * //=polygon
  21564. */
  21565. function main_es_polygon(coordinates, properties, options) {
  21566. if (!coordinates) throw new Error('coordinates is required');
  21567. for (var i = 0; i < coordinates.length; i++) {
  21568. var ring = coordinates[i];
  21569. if (ring.length < 4) {
  21570. throw new Error('Each LinearRing of a Polygon must have 4 or more Positions.');
  21571. }
  21572. for (var j = 0; j < ring[ring.length - 1].length; j++) {
  21573. // Check if first point of Polygon contains two numbers
  21574. if (i === 0 && j === 0 && !main_es_isNumber(ring[0][0]) || !main_es_isNumber(ring[0][1])) throw new Error('coordinates must contain numbers');
  21575. if (ring[ring.length - 1][j] !== ring[0][j]) {
  21576. throw new Error('First and last Position are not equivalent.');
  21577. }
  21578. }
  21579. }
  21580. return helpers_main_es_feature({
  21581. type: 'Polygon',
  21582. coordinates: coordinates
  21583. }, properties, options);
  21584. }
  21585. /**
  21586. * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.
  21587. *
  21588. * @name polygons
  21589. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates
  21590. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  21591. * @param {Object} [options={}] Optional Parameters
  21592. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  21593. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  21594. * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection
  21595. * @example
  21596. * var polygons = turf.polygons([
  21597. * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],
  21598. * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],
  21599. * ]);
  21600. *
  21601. * //=polygons
  21602. */
  21603. function main_es_polygons(coordinates, properties, options) {
  21604. if (!coordinates) throw new Error('coordinates is required');
  21605. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  21606. return main_es_featureCollection(coordinates.map(function (coords) {
  21607. return main_es_polygon(coords, properties);
  21608. }), options);
  21609. }
  21610. /**
  21611. * Creates a {@link LineString} {@link Feature} from an Array of Positions.
  21612. *
  21613. * @name lineString
  21614. * @param {Array<Array<number>>} coordinates an array of Positions
  21615. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  21616. * @param {Object} [options={}] Optional Parameters
  21617. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  21618. * @param {string|number} [options.id] Identifier associated with the Feature
  21619. * @returns {Feature<LineString>} LineString Feature
  21620. * @example
  21621. * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});
  21622. * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});
  21623. *
  21624. * //=linestring1
  21625. * //=linestring2
  21626. */
  21627. function main_es_lineString(coordinates, properties, options) {
  21628. if (!coordinates) throw new Error('coordinates is required');
  21629. if (coordinates.length < 2) throw new Error('coordinates must be an array of two or more positions'); // Check if first point of LineString contains two numbers
  21630. if (!main_es_isNumber(coordinates[0][1]) || !main_es_isNumber(coordinates[0][1])) throw new Error('coordinates must contain numbers');
  21631. return helpers_main_es_feature({
  21632. type: 'LineString',
  21633. coordinates: coordinates
  21634. }, properties, options);
  21635. }
  21636. /**
  21637. * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.
  21638. *
  21639. * @name lineStrings
  21640. * @param {Array<Array<number>>} coordinates an array of LinearRings
  21641. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  21642. * @param {Object} [options={}] Optional Parameters
  21643. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  21644. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  21645. * @returns {FeatureCollection<LineString>} LineString FeatureCollection
  21646. * @example
  21647. * var linestrings = turf.lineStrings([
  21648. * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],
  21649. * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]
  21650. * ]);
  21651. *
  21652. * //=linestrings
  21653. */
  21654. function main_es_lineStrings(coordinates, properties, options) {
  21655. if (!coordinates) throw new Error('coordinates is required');
  21656. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  21657. return main_es_featureCollection(coordinates.map(function (coords) {
  21658. return main_es_lineString(coords, properties);
  21659. }), options);
  21660. }
  21661. /**
  21662. * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.
  21663. *
  21664. * @name featureCollection
  21665. * @param {Feature[]} features input features
  21666. * @param {Object} [options={}] Optional Parameters
  21667. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  21668. * @param {string|number} [options.id] Identifier associated with the Feature
  21669. * @returns {FeatureCollection} FeatureCollection of Features
  21670. * @example
  21671. * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});
  21672. * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});
  21673. * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});
  21674. *
  21675. * var collection = turf.featureCollection([
  21676. * locationA,
  21677. * locationB,
  21678. * locationC
  21679. * ]);
  21680. *
  21681. * //=collection
  21682. */
  21683. function main_es_featureCollection(features, options) {
  21684. // Optional Parameters
  21685. options = options || {};
  21686. if (!main_es_isObject(options)) throw new Error('options is invalid');
  21687. var bbox = options.bbox;
  21688. var id = options.id; // Validation
  21689. if (!features) throw new Error('No features passed');
  21690. if (!Array.isArray(features)) throw new Error('features must be an Array');
  21691. if (bbox) main_es_validateBBox(bbox);
  21692. if (id) main_es_validateId(id); // Main
  21693. var fc = {
  21694. type: 'FeatureCollection'
  21695. };
  21696. if (id) fc.id = id;
  21697. if (bbox) fc.bbox = bbox;
  21698. fc.features = features;
  21699. return fc;
  21700. }
  21701. /**
  21702. * Creates a {@link Feature<MultiLineString>} based on a
  21703. * coordinate array. Properties can be added optionally.
  21704. *
  21705. * @name multiLineString
  21706. * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings
  21707. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  21708. * @param {Object} [options={}] Optional Parameters
  21709. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  21710. * @param {string|number} [options.id] Identifier associated with the Feature
  21711. * @returns {Feature<MultiLineString>} a MultiLineString feature
  21712. * @throws {Error} if no coordinates are passed
  21713. * @example
  21714. * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);
  21715. *
  21716. * //=multiLine
  21717. */
  21718. function main_es_multiLineString(coordinates, properties, options) {
  21719. if (!coordinates) throw new Error('coordinates is required');
  21720. return helpers_main_es_feature({
  21721. type: 'MultiLineString',
  21722. coordinates: coordinates
  21723. }, properties, options);
  21724. }
  21725. /**
  21726. * Creates a {@link Feature<MultiPoint>} based on a
  21727. * coordinate array. Properties can be added optionally.
  21728. *
  21729. * @name multiPoint
  21730. * @param {Array<Array<number>>} coordinates an array of Positions
  21731. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  21732. * @param {Object} [options={}] Optional Parameters
  21733. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  21734. * @param {string|number} [options.id] Identifier associated with the Feature
  21735. * @returns {Feature<MultiPoint>} a MultiPoint feature
  21736. * @throws {Error} if no coordinates are passed
  21737. * @example
  21738. * var multiPt = turf.multiPoint([[0,0],[10,10]]);
  21739. *
  21740. * //=multiPt
  21741. */
  21742. function main_es_multiPoint(coordinates, properties, options) {
  21743. if (!coordinates) throw new Error('coordinates is required');
  21744. return helpers_main_es_feature({
  21745. type: 'MultiPoint',
  21746. coordinates: coordinates
  21747. }, properties, options);
  21748. }
  21749. /**
  21750. * Creates a {@link Feature<MultiPolygon>} based on a
  21751. * coordinate array. Properties can be added optionally.
  21752. *
  21753. * @name multiPolygon
  21754. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons
  21755. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  21756. * @param {Object} [options={}] Optional Parameters
  21757. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  21758. * @param {string|number} [options.id] Identifier associated with the Feature
  21759. * @returns {Feature<MultiPolygon>} a multipolygon feature
  21760. * @throws {Error} if no coordinates are passed
  21761. * @example
  21762. * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);
  21763. *
  21764. * //=multiPoly
  21765. *
  21766. */
  21767. function main_es_multiPolygon(coordinates, properties, options) {
  21768. if (!coordinates) throw new Error('coordinates is required');
  21769. return helpers_main_es_feature({
  21770. type: 'MultiPolygon',
  21771. coordinates: coordinates
  21772. }, properties, options);
  21773. }
  21774. /**
  21775. * Creates a {@link Feature<GeometryCollection>} based on a
  21776. * coordinate array. Properties can be added optionally.
  21777. *
  21778. * @name geometryCollection
  21779. * @param {Array<Geometry>} geometries an array of GeoJSON Geometries
  21780. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  21781. * @param {Object} [options={}] Optional Parameters
  21782. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  21783. * @param {string|number} [options.id] Identifier associated with the Feature
  21784. * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature
  21785. * @example
  21786. * var pt = {
  21787. * "type": "Point",
  21788. * "coordinates": [100, 0]
  21789. * };
  21790. * var line = {
  21791. * "type": "LineString",
  21792. * "coordinates": [ [101, 0], [102, 1] ]
  21793. * };
  21794. * var collection = turf.geometryCollection([pt, line]);
  21795. *
  21796. * //=collection
  21797. */
  21798. function main_es_geometryCollection(geometries, properties, options) {
  21799. if (!geometries) throw new Error('geometries is required');
  21800. if (!Array.isArray(geometries)) throw new Error('geometries must be an Array');
  21801. return helpers_main_es_feature({
  21802. type: 'GeometryCollection',
  21803. geometries: geometries
  21804. }, properties, options);
  21805. }
  21806. /**
  21807. * Round number to precision
  21808. *
  21809. * @param {number} num Number
  21810. * @param {number} [precision=0] Precision
  21811. * @returns {number} rounded number
  21812. * @example
  21813. * turf.round(120.4321)
  21814. * //=120
  21815. *
  21816. * turf.round(120.4321, 2)
  21817. * //=120.43
  21818. */
  21819. function main_es_round(num, precision) {
  21820. if (num === undefined || num === null || isNaN(num)) throw new Error('num is required');
  21821. if (precision && !(precision >= 0)) throw new Error('precision must be a positive number');
  21822. var multiplier = Math.pow(10, precision || 0);
  21823. return Math.round(num * multiplier) / multiplier;
  21824. }
  21825. /**
  21826. * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.
  21827. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  21828. *
  21829. * @name radiansToLength
  21830. * @param {number} radians in radians across the sphere
  21831. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  21832. * @returns {number} distance
  21833. */
  21834. function main_es_radiansToLength(radians, units) {
  21835. if (radians === undefined || radians === null) throw new Error('radians is required');
  21836. if (units && typeof units !== 'string') throw new Error('units must be a string');
  21837. var factor = main_es_factors[units || 'kilometers'];
  21838. if (!factor) throw new Error(units + ' units is invalid');
  21839. return radians * factor;
  21840. }
  21841. /**
  21842. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians
  21843. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  21844. *
  21845. * @name lengthToRadians
  21846. * @param {number} distance in real units
  21847. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  21848. * @returns {number} radians
  21849. */
  21850. function main_es_lengthToRadians(distance, units) {
  21851. if (distance === undefined || distance === null) throw new Error('distance is required');
  21852. if (units && typeof units !== 'string') throw new Error('units must be a string');
  21853. var factor = main_es_factors[units || 'kilometers'];
  21854. if (!factor) throw new Error(units + ' units is invalid');
  21855. return distance / factor;
  21856. }
  21857. /**
  21858. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees
  21859. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet
  21860. *
  21861. * @name lengthToDegrees
  21862. * @param {number} distance in real units
  21863. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  21864. * @returns {number} degrees
  21865. */
  21866. function main_es_lengthToDegrees(distance, units) {
  21867. return main_es_radiansToDegrees(main_es_lengthToRadians(distance, units));
  21868. }
  21869. /**
  21870. * Converts any bearing angle from the north line direction (positive clockwise)
  21871. * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line
  21872. *
  21873. * @name bearingToAzimuth
  21874. * @param {number} bearing angle, between -180 and +180 degrees
  21875. * @returns {number} angle between 0 and 360 degrees
  21876. */
  21877. function main_es_bearingToAzimuth(bearing) {
  21878. if (bearing === null || bearing === undefined) throw new Error('bearing is required');
  21879. var angle = bearing % 360;
  21880. if (angle < 0) angle += 360;
  21881. return angle;
  21882. }
  21883. /**
  21884. * Converts an angle in radians to degrees
  21885. *
  21886. * @name radiansToDegrees
  21887. * @param {number} radians angle in radians
  21888. * @returns {number} degrees between 0 and 360 degrees
  21889. */
  21890. function main_es_radiansToDegrees(radians) {
  21891. if (radians === null || radians === undefined) throw new Error('radians is required');
  21892. var degrees = radians % (2 * Math.PI);
  21893. return degrees * 180 / Math.PI;
  21894. }
  21895. /**
  21896. * Converts an angle in degrees to radians
  21897. *
  21898. * @name degreesToRadians
  21899. * @param {number} degrees angle between 0 and 360 degrees
  21900. * @returns {number} angle in radians
  21901. */
  21902. function main_es_degreesToRadians(degrees) {
  21903. if (degrees === null || degrees === undefined) throw new Error('degrees is required');
  21904. var radians = degrees % 360;
  21905. return radians * Math.PI / 180;
  21906. }
  21907. /**
  21908. * Converts a length to the requested unit.
  21909. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  21910. *
  21911. * @param {number} length to be converted
  21912. * @param {string} originalUnit of the length
  21913. * @param {string} [finalUnit='kilometers'] returned unit
  21914. * @returns {number} the converted length
  21915. */
  21916. function main_es_convertLength(length, originalUnit, finalUnit) {
  21917. if (length === null || length === undefined) throw new Error('length is required');
  21918. if (!(length >= 0)) throw new Error('length must be a positive number');
  21919. return main_es_radiansToLength(main_es_lengthToRadians(length, originalUnit), finalUnit || 'kilometers');
  21920. }
  21921. /**
  21922. * Converts a area to the requested unit.
  21923. * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches
  21924. * @param {number} area to be converted
  21925. * @param {string} [originalUnit='meters'] of the distance
  21926. * @param {string} [finalUnit='kilometers'] returned unit
  21927. * @returns {number} the converted distance
  21928. */
  21929. function main_es_convertArea(area, originalUnit, finalUnit) {
  21930. if (area === null || area === undefined) throw new Error('area is required');
  21931. if (!(area >= 0)) throw new Error('area must be a positive number');
  21932. var startFactor = main_es_areaFactors[originalUnit || 'meters'];
  21933. if (!startFactor) throw new Error('invalid original units');
  21934. var finalFactor = main_es_areaFactors[finalUnit || 'kilometers'];
  21935. if (!finalFactor) throw new Error('invalid final units');
  21936. return area / startFactor * finalFactor;
  21937. }
  21938. /**
  21939. * isNumber
  21940. *
  21941. * @param {*} num Number to validate
  21942. * @returns {boolean} true/false
  21943. * @example
  21944. * turf.isNumber(123)
  21945. * //=true
  21946. * turf.isNumber('foo')
  21947. * //=false
  21948. */
  21949. function main_es_isNumber(num) {
  21950. return !isNaN(num) && num !== null && !Array.isArray(num);
  21951. }
  21952. /**
  21953. * isObject
  21954. *
  21955. * @param {*} input variable to validate
  21956. * @returns {boolean} true/false
  21957. * @example
  21958. * turf.isObject({elevation: 10})
  21959. * //=true
  21960. * turf.isObject('foo')
  21961. * //=false
  21962. */
  21963. function main_es_isObject(input) {
  21964. return !!input && input.constructor === Object;
  21965. }
  21966. /**
  21967. * Validate BBox
  21968. *
  21969. * @private
  21970. * @param {Array<number>} bbox BBox to validate
  21971. * @returns {void}
  21972. * @throws Error if BBox is not valid
  21973. * @example
  21974. * validateBBox([-180, -40, 110, 50])
  21975. * //=OK
  21976. * validateBBox([-180, -40])
  21977. * //=Error
  21978. * validateBBox('Foo')
  21979. * //=Error
  21980. * validateBBox(5)
  21981. * //=Error
  21982. * validateBBox(null)
  21983. * //=Error
  21984. * validateBBox(undefined)
  21985. * //=Error
  21986. */
  21987. function main_es_validateBBox(bbox) {
  21988. if (!bbox) throw new Error('bbox is required');
  21989. if (!Array.isArray(bbox)) throw new Error('bbox must be an Array');
  21990. if (bbox.length !== 4 && bbox.length !== 6) throw new Error('bbox must be an Array of 4 or 6 numbers');
  21991. bbox.forEach(function (num) {
  21992. if (!main_es_isNumber(num)) throw new Error('bbox must only contain numbers');
  21993. });
  21994. }
  21995. /**
  21996. * Validate Id
  21997. *
  21998. * @private
  21999. * @param {string|number} id Id to validate
  22000. * @returns {void}
  22001. * @throws Error if Id is not valid
  22002. * @example
  22003. * validateId([-180, -40, 110, 50])
  22004. * //=Error
  22005. * validateId([-180, -40])
  22006. * //=Error
  22007. * validateId('Foo')
  22008. * //=OK
  22009. * validateId(5)
  22010. * //=OK
  22011. * validateId(null)
  22012. * //=Error
  22013. * validateId(undefined)
  22014. * //=Error
  22015. */
  22016. function main_es_validateId(id) {
  22017. if (!id) throw new Error('id is required');
  22018. if (['string', 'number'].indexOf(typeof id) === -1) throw new Error('id must be a number or a string');
  22019. } // Deprecated methods
  22020. function main_es_radians2degrees() {
  22021. throw new Error('method has been renamed to `radiansToDegrees`');
  22022. }
  22023. function main_es_degrees2radians() {
  22024. throw new Error('method has been renamed to `degreesToRadians`');
  22025. }
  22026. function main_es_distanceToDegrees() {
  22027. throw new Error('method has been renamed to `lengthToDegrees`');
  22028. }
  22029. function main_es_distanceToRadians() {
  22030. throw new Error('method has been renamed to `lengthToRadians`');
  22031. }
  22032. function main_es_radiansToDistance() {
  22033. throw new Error('method has been renamed to `radiansToLength`');
  22034. }
  22035. function main_es_bearingToAngle() {
  22036. throw new Error('method has been renamed to `bearingToAzimuth`');
  22037. }
  22038. function main_es_convertDistance() {
  22039. throw new Error('method has been renamed to `convertLength`');
  22040. }
  22041. // CONCATENATED MODULE: ./node_modules/@turf/bbox-polygon/main.es.js
  22042. /**
  22043. * Takes a bbox and returns an equivalent {@link Polygon|polygon}.
  22044. *
  22045. * @name bboxPolygon
  22046. * @param {BBox} bbox extent in [minX, minY, maxX, maxY] order
  22047. * @returns {Feature<Polygon>} a Polygon representation of the bounding box
  22048. * @example
  22049. * var bbox = [0, 0, 10, 10];
  22050. *
  22051. * var poly = turf.bboxPolygon(bbox);
  22052. *
  22053. * //addToMap
  22054. * var addToMap = [poly]
  22055. */
  22056. function bboxPolygon(bbox) {
  22057. main_es_validateBBox(bbox); // Convert BBox positions to Numbers
  22058. // No performance loss for including Number()
  22059. // https://github.com/Turfjs/turf/issues/1119
  22060. var west = Number(bbox[0]);
  22061. var south = Number(bbox[1]);
  22062. var east = Number(bbox[2]);
  22063. var north = Number(bbox[3]);
  22064. if (bbox.length === 6) throw new Error('@turf/bbox-polygon does not support BBox with 6 positions');
  22065. var lowLeft = [west, south];
  22066. var topLeft = [west, north];
  22067. var topRight = [east, north];
  22068. var lowRight = [east, south];
  22069. return main_es_polygon([[lowLeft, lowRight, topRight, topLeft, lowLeft]]);
  22070. }
  22071. /* harmony default export */ var bbox_polygon_main_es = (bboxPolygon);
  22072. // CONCATENATED MODULE: ./node_modules/@turf/envelope/main.es.js
  22073. /**
  22074. * Takes any number of features and returns a rectangular {@link Polygon} that encompasses all vertices.
  22075. *
  22076. * @name envelope
  22077. * @param {GeoJSON} geojson input features
  22078. * @returns {Feature<Polygon>} a rectangular Polygon feature that encompasses all vertices
  22079. * @example
  22080. * var features = turf.featureCollection([
  22081. * turf.point([-75.343, 39.984], {"name": "Location A"}),
  22082. * turf.point([-75.833, 39.284], {"name": "Location B"}),
  22083. * turf.point([-75.534, 39.123], {"name": "Location C"})
  22084. * ]);
  22085. *
  22086. * var enveloped = turf.envelope(features);
  22087. *
  22088. * //addToMap
  22089. * var addToMap = [features, enveloped];
  22090. */
  22091. function envelope(geojson) {
  22092. return bbox_polygon_main_es(main_es(geojson));
  22093. }
  22094. /* harmony default export */ var envelope_main_es = (envelope);
  22095. // EXTERNAL MODULE: ./node_modules/@turf/bbox/index.js
  22096. var _turf_bbox = __webpack_require__(46);
  22097. var bbox_default = /*#__PURE__*/__webpack_require__.n(_turf_bbox);
  22098. // CONCATENATED MODULE: ./node_modules/@turf/clone/main.es.js
  22099. /**
  22100. * Returns a cloned copy of the passed GeoJSON Object, including possible 'Foreign Members'.
  22101. * ~3-5x faster than the common JSON.parse + JSON.stringify combo method.
  22102. *
  22103. * @name clone
  22104. * @param {GeoJSON} geojson GeoJSON Object
  22105. * @returns {GeoJSON} cloned GeoJSON Object
  22106. * @example
  22107. * var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]], {color: 'red'});
  22108. *
  22109. * var lineCloned = turf.clone(line);
  22110. */
  22111. function clone(geojson) {
  22112. if (!geojson) throw new Error('geojson is required');
  22113. switch (geojson.type) {
  22114. case 'Feature':
  22115. return cloneFeature(geojson);
  22116. case 'FeatureCollection':
  22117. return cloneFeatureCollection(geojson);
  22118. case 'Point':
  22119. case 'LineString':
  22120. case 'Polygon':
  22121. case 'MultiPoint':
  22122. case 'MultiLineString':
  22123. case 'MultiPolygon':
  22124. case 'GeometryCollection':
  22125. return cloneGeometry(geojson);
  22126. default:
  22127. throw new Error('unknown GeoJSON type');
  22128. }
  22129. }
  22130. /**
  22131. * Clone Feature
  22132. *
  22133. * @private
  22134. * @param {Feature<any>} geojson GeoJSON Feature
  22135. * @returns {Feature<any>} cloned Feature
  22136. */
  22137. function cloneFeature(geojson) {
  22138. var cloned = {
  22139. type: 'Feature'
  22140. }; // Preserve Foreign Members
  22141. Object.keys(geojson).forEach(function (key) {
  22142. switch (key) {
  22143. case 'type':
  22144. case 'properties':
  22145. case 'geometry':
  22146. return;
  22147. default:
  22148. cloned[key] = geojson[key];
  22149. }
  22150. }); // Add properties & geometry last
  22151. cloned.properties = cloneProperties(geojson.properties);
  22152. cloned.geometry = cloneGeometry(geojson.geometry);
  22153. return cloned;
  22154. }
  22155. /**
  22156. * Clone Properties
  22157. *
  22158. * @private
  22159. * @param {Object} properties GeoJSON Properties
  22160. * @returns {Object} cloned Properties
  22161. */
  22162. function cloneProperties(properties) {
  22163. var cloned = {};
  22164. if (!properties) return cloned;
  22165. Object.keys(properties).forEach(function (key) {
  22166. var value = properties[key];
  22167. if (typeof value === 'object') {
  22168. if (value === null) {
  22169. // handle null
  22170. cloned[key] = null;
  22171. } else if (value.length) {
  22172. // handle Array
  22173. cloned[key] = value.map(function (item) {
  22174. return item;
  22175. });
  22176. } else {
  22177. // handle generic Object
  22178. cloned[key] = cloneProperties(value);
  22179. }
  22180. } else cloned[key] = value;
  22181. });
  22182. return cloned;
  22183. }
  22184. /**
  22185. * Clone Feature Collection
  22186. *
  22187. * @private
  22188. * @param {FeatureCollection<any>} geojson GeoJSON Feature Collection
  22189. * @returns {FeatureCollection<any>} cloned Feature Collection
  22190. */
  22191. function cloneFeatureCollection(geojson) {
  22192. var cloned = {
  22193. type: 'FeatureCollection'
  22194. }; // Preserve Foreign Members
  22195. Object.keys(geojson).forEach(function (key) {
  22196. switch (key) {
  22197. case 'type':
  22198. case 'features':
  22199. return;
  22200. default:
  22201. cloned[key] = geojson[key];
  22202. }
  22203. }); // Add features
  22204. cloned.features = geojson.features.map(function (feature) {
  22205. return cloneFeature(feature);
  22206. });
  22207. return cloned;
  22208. }
  22209. /**
  22210. * Clone Geometry
  22211. *
  22212. * @private
  22213. * @param {Geometry<any>} geometry GeoJSON Geometry
  22214. * @returns {Geometry<any>} cloned Geometry
  22215. */
  22216. function cloneGeometry(geometry) {
  22217. var geom = {
  22218. type: geometry.type
  22219. };
  22220. if (geometry.bbox) geom.bbox = geometry.bbox;
  22221. if (geometry.type === 'GeometryCollection') {
  22222. geom.geometries = geometry.geometries.map(function (geom) {
  22223. return cloneGeometry(geom);
  22224. });
  22225. return geom;
  22226. }
  22227. geom.coordinates = deepSlice(geometry.coordinates);
  22228. return geom;
  22229. }
  22230. /**
  22231. * Deep Slice coordinates
  22232. *
  22233. * @private
  22234. * @param {Coordinates} coords Coordinates
  22235. * @returns {Coordinates} all coordinates sliced
  22236. */
  22237. function deepSlice(coords) {
  22238. if (typeof coords[0] !== 'object') {
  22239. return coords.slice();
  22240. }
  22241. return coords.map(function (coord) {
  22242. return deepSlice(coord);
  22243. });
  22244. }
  22245. /* harmony default export */ var clone_main_es = (clone);
  22246. // CONCATENATED MODULE: ./node_modules/@turf/center/node_modules/@turf/helpers/main.es.js
  22247. /**
  22248. * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.
  22249. */
  22250. var helpers_main_es_earthRadius = 6371008.8;
  22251. /**
  22252. * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.
  22253. */
  22254. var helpers_main_es_factors = {
  22255. meters: helpers_main_es_earthRadius,
  22256. metres: helpers_main_es_earthRadius,
  22257. millimeters: helpers_main_es_earthRadius * 1000,
  22258. millimetres: helpers_main_es_earthRadius * 1000,
  22259. centimeters: helpers_main_es_earthRadius * 100,
  22260. centimetres: helpers_main_es_earthRadius * 100,
  22261. kilometers: helpers_main_es_earthRadius / 1000,
  22262. kilometres: helpers_main_es_earthRadius / 1000,
  22263. miles: helpers_main_es_earthRadius / 1609.344,
  22264. nauticalmiles: helpers_main_es_earthRadius / 1852,
  22265. inches: helpers_main_es_earthRadius * 39.370,
  22266. yards: helpers_main_es_earthRadius / 1.0936,
  22267. feet: helpers_main_es_earthRadius * 3.28084,
  22268. radians: 1,
  22269. degrees: helpers_main_es_earthRadius / 111325
  22270. };
  22271. /**
  22272. * Units of measurement factors based on 1 meter.
  22273. */
  22274. var helpers_main_es_unitsFactors = {
  22275. meters: 1,
  22276. metres: 1,
  22277. millimeters: 1000,
  22278. millimetres: 1000,
  22279. centimeters: 100,
  22280. centimetres: 100,
  22281. kilometers: 1 / 1000,
  22282. kilometres: 1 / 1000,
  22283. miles: 1 / 1609.344,
  22284. nauticalmiles: 1 / 1852,
  22285. inches: 39.370,
  22286. yards: 1 / 1.0936,
  22287. feet: 3.28084,
  22288. radians: 1 / helpers_main_es_earthRadius,
  22289. degrees: 1 / 111325
  22290. };
  22291. /**
  22292. * Area of measurement factors based on 1 square meter.
  22293. */
  22294. var helpers_main_es_areaFactors = {
  22295. meters: 1,
  22296. metres: 1,
  22297. millimeters: 1000000,
  22298. millimetres: 1000000,
  22299. centimeters: 10000,
  22300. centimetres: 10000,
  22301. kilometers: 0.000001,
  22302. kilometres: 0.000001,
  22303. acres: 0.000247105,
  22304. miles: 3.86e-7,
  22305. yards: 1.195990046,
  22306. feet: 10.763910417,
  22307. inches: 1550.003100006
  22308. };
  22309. /**
  22310. * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.
  22311. *
  22312. * @name feature
  22313. * @param {Geometry} geometry input geometry
  22314. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  22315. * @param {Object} [options={}] Optional Parameters
  22316. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  22317. * @param {string|number} [options.id] Identifier associated with the Feature
  22318. * @returns {Feature} a GeoJSON Feature
  22319. * @example
  22320. * var geometry = {
  22321. * "type": "Point",
  22322. * "coordinates": [110, 50]
  22323. * };
  22324. *
  22325. * var feature = turf.feature(geometry);
  22326. *
  22327. * //=feature
  22328. */
  22329. function _turf_helpers_main_es_feature(geometry, properties, options) {
  22330. // Optional Parameters
  22331. options = options || {};
  22332. if (!helpers_main_es_isObject(options)) throw new Error('options is invalid');
  22333. var bbox = options.bbox;
  22334. var id = options.id; // Validation
  22335. if (geometry === undefined) throw new Error('geometry is required');
  22336. if (properties && properties.constructor !== Object) throw new Error('properties must be an Object');
  22337. if (bbox) helpers_main_es_validateBBox(bbox);
  22338. if (id) helpers_main_es_validateId(id); // Main
  22339. var feat = {
  22340. type: 'Feature'
  22341. };
  22342. if (id) feat.id = id;
  22343. if (bbox) feat.bbox = bbox;
  22344. feat.properties = properties || {};
  22345. feat.geometry = geometry;
  22346. return feat;
  22347. }
  22348. /**
  22349. * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.
  22350. * For GeometryCollection type use `helpers.geometryCollection`
  22351. *
  22352. * @name geometry
  22353. * @param {string} type Geometry Type
  22354. * @param {Array<number>} coordinates Coordinates
  22355. * @param {Object} [options={}] Optional Parameters
  22356. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Geometry
  22357. * @returns {Geometry} a GeoJSON Geometry
  22358. * @example
  22359. * var type = 'Point';
  22360. * var coordinates = [110, 50];
  22361. *
  22362. * var geometry = turf.geometry(type, coordinates);
  22363. *
  22364. * //=geometry
  22365. */
  22366. function _turf_helpers_main_es_geometry(type, coordinates, options) {
  22367. // Optional Parameters
  22368. options = options || {};
  22369. if (!helpers_main_es_isObject(options)) throw new Error('options is invalid');
  22370. var bbox = options.bbox; // Validation
  22371. if (!type) throw new Error('type is required');
  22372. if (!coordinates) throw new Error('coordinates is required');
  22373. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  22374. if (bbox) helpers_main_es_validateBBox(bbox); // Main
  22375. var geom;
  22376. switch (type) {
  22377. case 'Point':
  22378. geom = _turf_helpers_main_es_point(coordinates).geometry;
  22379. break;
  22380. case 'LineString':
  22381. geom = helpers_main_es_lineString(coordinates).geometry;
  22382. break;
  22383. case 'Polygon':
  22384. geom = helpers_main_es_polygon(coordinates).geometry;
  22385. break;
  22386. case 'MultiPoint':
  22387. geom = helpers_main_es_multiPoint(coordinates).geometry;
  22388. break;
  22389. case 'MultiLineString':
  22390. geom = helpers_main_es_multiLineString(coordinates).geometry;
  22391. break;
  22392. case 'MultiPolygon':
  22393. geom = helpers_main_es_multiPolygon(coordinates).geometry;
  22394. break;
  22395. default:
  22396. throw new Error(type + ' is invalid');
  22397. }
  22398. if (bbox) geom.bbox = bbox;
  22399. return geom;
  22400. }
  22401. /**
  22402. * Creates a {@link Point} {@link Feature} from a Position.
  22403. *
  22404. * @name point
  22405. * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)
  22406. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  22407. * @param {Object} [options={}] Optional Parameters
  22408. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  22409. * @param {string|number} [options.id] Identifier associated with the Feature
  22410. * @returns {Feature<Point>} a Point feature
  22411. * @example
  22412. * var point = turf.point([-75.343, 39.984]);
  22413. *
  22414. * //=point
  22415. */
  22416. function _turf_helpers_main_es_point(coordinates, properties, options) {
  22417. if (!coordinates) throw new Error('coordinates is required');
  22418. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  22419. if (coordinates.length < 2) throw new Error('coordinates must be at least 2 numbers long');
  22420. if (!helpers_main_es_isNumber(coordinates[0]) || !helpers_main_es_isNumber(coordinates[1])) throw new Error('coordinates must contain numbers');
  22421. return _turf_helpers_main_es_feature({
  22422. type: 'Point',
  22423. coordinates: coordinates
  22424. }, properties, options);
  22425. }
  22426. /**
  22427. * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.
  22428. *
  22429. * @name points
  22430. * @param {Array<Array<number>>} coordinates an array of Points
  22431. * @param {Object} [properties={}] Translate these properties to each Feature
  22432. * @param {Object} [options={}] Optional Parameters
  22433. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  22434. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  22435. * @returns {FeatureCollection<Point>} Point Feature
  22436. * @example
  22437. * var points = turf.points([
  22438. * [-75, 39],
  22439. * [-80, 45],
  22440. * [-78, 50]
  22441. * ]);
  22442. *
  22443. * //=points
  22444. */
  22445. function helpers_main_es_points(coordinates, properties, options) {
  22446. if (!coordinates) throw new Error('coordinates is required');
  22447. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  22448. return helpers_main_es_featureCollection(coordinates.map(function (coords) {
  22449. return _turf_helpers_main_es_point(coords, properties);
  22450. }), options);
  22451. }
  22452. /**
  22453. * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.
  22454. *
  22455. * @name polygon
  22456. * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings
  22457. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  22458. * @param {Object} [options={}] Optional Parameters
  22459. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  22460. * @param {string|number} [options.id] Identifier associated with the Feature
  22461. * @returns {Feature<Polygon>} Polygon Feature
  22462. * @example
  22463. * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });
  22464. *
  22465. * //=polygon
  22466. */
  22467. function helpers_main_es_polygon(coordinates, properties, options) {
  22468. if (!coordinates) throw new Error('coordinates is required');
  22469. for (var i = 0; i < coordinates.length; i++) {
  22470. var ring = coordinates[i];
  22471. if (ring.length < 4) {
  22472. throw new Error('Each LinearRing of a Polygon must have 4 or more Positions.');
  22473. }
  22474. for (var j = 0; j < ring[ring.length - 1].length; j++) {
  22475. // Check if first point of Polygon contains two numbers
  22476. if (i === 0 && j === 0 && !helpers_main_es_isNumber(ring[0][0]) || !helpers_main_es_isNumber(ring[0][1])) throw new Error('coordinates must contain numbers');
  22477. if (ring[ring.length - 1][j] !== ring[0][j]) {
  22478. throw new Error('First and last Position are not equivalent.');
  22479. }
  22480. }
  22481. }
  22482. return _turf_helpers_main_es_feature({
  22483. type: 'Polygon',
  22484. coordinates: coordinates
  22485. }, properties, options);
  22486. }
  22487. /**
  22488. * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.
  22489. *
  22490. * @name polygons
  22491. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates
  22492. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  22493. * @param {Object} [options={}] Optional Parameters
  22494. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  22495. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  22496. * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection
  22497. * @example
  22498. * var polygons = turf.polygons([
  22499. * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],
  22500. * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],
  22501. * ]);
  22502. *
  22503. * //=polygons
  22504. */
  22505. function helpers_main_es_polygons(coordinates, properties, options) {
  22506. if (!coordinates) throw new Error('coordinates is required');
  22507. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  22508. return helpers_main_es_featureCollection(coordinates.map(function (coords) {
  22509. return helpers_main_es_polygon(coords, properties);
  22510. }), options);
  22511. }
  22512. /**
  22513. * Creates a {@link LineString} {@link Feature} from an Array of Positions.
  22514. *
  22515. * @name lineString
  22516. * @param {Array<Array<number>>} coordinates an array of Positions
  22517. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  22518. * @param {Object} [options={}] Optional Parameters
  22519. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  22520. * @param {string|number} [options.id] Identifier associated with the Feature
  22521. * @returns {Feature<LineString>} LineString Feature
  22522. * @example
  22523. * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});
  22524. * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});
  22525. *
  22526. * //=linestring1
  22527. * //=linestring2
  22528. */
  22529. function helpers_main_es_lineString(coordinates, properties, options) {
  22530. if (!coordinates) throw new Error('coordinates is required');
  22531. if (coordinates.length < 2) throw new Error('coordinates must be an array of two or more positions'); // Check if first point of LineString contains two numbers
  22532. if (!helpers_main_es_isNumber(coordinates[0][1]) || !helpers_main_es_isNumber(coordinates[0][1])) throw new Error('coordinates must contain numbers');
  22533. return _turf_helpers_main_es_feature({
  22534. type: 'LineString',
  22535. coordinates: coordinates
  22536. }, properties, options);
  22537. }
  22538. /**
  22539. * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.
  22540. *
  22541. * @name lineStrings
  22542. * @param {Array<Array<number>>} coordinates an array of LinearRings
  22543. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  22544. * @param {Object} [options={}] Optional Parameters
  22545. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  22546. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  22547. * @returns {FeatureCollection<LineString>} LineString FeatureCollection
  22548. * @example
  22549. * var linestrings = turf.lineStrings([
  22550. * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],
  22551. * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]
  22552. * ]);
  22553. *
  22554. * //=linestrings
  22555. */
  22556. function helpers_main_es_lineStrings(coordinates, properties, options) {
  22557. if (!coordinates) throw new Error('coordinates is required');
  22558. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  22559. return helpers_main_es_featureCollection(coordinates.map(function (coords) {
  22560. return helpers_main_es_lineString(coords, properties);
  22561. }), options);
  22562. }
  22563. /**
  22564. * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.
  22565. *
  22566. * @name featureCollection
  22567. * @param {Feature[]} features input features
  22568. * @param {Object} [options={}] Optional Parameters
  22569. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  22570. * @param {string|number} [options.id] Identifier associated with the Feature
  22571. * @returns {FeatureCollection} FeatureCollection of Features
  22572. * @example
  22573. * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});
  22574. * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});
  22575. * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});
  22576. *
  22577. * var collection = turf.featureCollection([
  22578. * locationA,
  22579. * locationB,
  22580. * locationC
  22581. * ]);
  22582. *
  22583. * //=collection
  22584. */
  22585. function helpers_main_es_featureCollection(features, options) {
  22586. // Optional Parameters
  22587. options = options || {};
  22588. if (!helpers_main_es_isObject(options)) throw new Error('options is invalid');
  22589. var bbox = options.bbox;
  22590. var id = options.id; // Validation
  22591. if (!features) throw new Error('No features passed');
  22592. if (!Array.isArray(features)) throw new Error('features must be an Array');
  22593. if (bbox) helpers_main_es_validateBBox(bbox);
  22594. if (id) helpers_main_es_validateId(id); // Main
  22595. var fc = {
  22596. type: 'FeatureCollection'
  22597. };
  22598. if (id) fc.id = id;
  22599. if (bbox) fc.bbox = bbox;
  22600. fc.features = features;
  22601. return fc;
  22602. }
  22603. /**
  22604. * Creates a {@link Feature<MultiLineString>} based on a
  22605. * coordinate array. Properties can be added optionally.
  22606. *
  22607. * @name multiLineString
  22608. * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings
  22609. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  22610. * @param {Object} [options={}] Optional Parameters
  22611. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  22612. * @param {string|number} [options.id] Identifier associated with the Feature
  22613. * @returns {Feature<MultiLineString>} a MultiLineString feature
  22614. * @throws {Error} if no coordinates are passed
  22615. * @example
  22616. * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);
  22617. *
  22618. * //=multiLine
  22619. */
  22620. function helpers_main_es_multiLineString(coordinates, properties, options) {
  22621. if (!coordinates) throw new Error('coordinates is required');
  22622. return _turf_helpers_main_es_feature({
  22623. type: 'MultiLineString',
  22624. coordinates: coordinates
  22625. }, properties, options);
  22626. }
  22627. /**
  22628. * Creates a {@link Feature<MultiPoint>} based on a
  22629. * coordinate array. Properties can be added optionally.
  22630. *
  22631. * @name multiPoint
  22632. * @param {Array<Array<number>>} coordinates an array of Positions
  22633. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  22634. * @param {Object} [options={}] Optional Parameters
  22635. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  22636. * @param {string|number} [options.id] Identifier associated with the Feature
  22637. * @returns {Feature<MultiPoint>} a MultiPoint feature
  22638. * @throws {Error} if no coordinates are passed
  22639. * @example
  22640. * var multiPt = turf.multiPoint([[0,0],[10,10]]);
  22641. *
  22642. * //=multiPt
  22643. */
  22644. function helpers_main_es_multiPoint(coordinates, properties, options) {
  22645. if (!coordinates) throw new Error('coordinates is required');
  22646. return _turf_helpers_main_es_feature({
  22647. type: 'MultiPoint',
  22648. coordinates: coordinates
  22649. }, properties, options);
  22650. }
  22651. /**
  22652. * Creates a {@link Feature<MultiPolygon>} based on a
  22653. * coordinate array. Properties can be added optionally.
  22654. *
  22655. * @name multiPolygon
  22656. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons
  22657. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  22658. * @param {Object} [options={}] Optional Parameters
  22659. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  22660. * @param {string|number} [options.id] Identifier associated with the Feature
  22661. * @returns {Feature<MultiPolygon>} a multipolygon feature
  22662. * @throws {Error} if no coordinates are passed
  22663. * @example
  22664. * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);
  22665. *
  22666. * //=multiPoly
  22667. *
  22668. */
  22669. function helpers_main_es_multiPolygon(coordinates, properties, options) {
  22670. if (!coordinates) throw new Error('coordinates is required');
  22671. return _turf_helpers_main_es_feature({
  22672. type: 'MultiPolygon',
  22673. coordinates: coordinates
  22674. }, properties, options);
  22675. }
  22676. /**
  22677. * Creates a {@link Feature<GeometryCollection>} based on a
  22678. * coordinate array. Properties can be added optionally.
  22679. *
  22680. * @name geometryCollection
  22681. * @param {Array<Geometry>} geometries an array of GeoJSON Geometries
  22682. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  22683. * @param {Object} [options={}] Optional Parameters
  22684. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  22685. * @param {string|number} [options.id] Identifier associated with the Feature
  22686. * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature
  22687. * @example
  22688. * var pt = {
  22689. * "type": "Point",
  22690. * "coordinates": [100, 0]
  22691. * };
  22692. * var line = {
  22693. * "type": "LineString",
  22694. * "coordinates": [ [101, 0], [102, 1] ]
  22695. * };
  22696. * var collection = turf.geometryCollection([pt, line]);
  22697. *
  22698. * //=collection
  22699. */
  22700. function helpers_main_es_geometryCollection(geometries, properties, options) {
  22701. if (!geometries) throw new Error('geometries is required');
  22702. if (!Array.isArray(geometries)) throw new Error('geometries must be an Array');
  22703. return _turf_helpers_main_es_feature({
  22704. type: 'GeometryCollection',
  22705. geometries: geometries
  22706. }, properties, options);
  22707. }
  22708. /**
  22709. * Round number to precision
  22710. *
  22711. * @param {number} num Number
  22712. * @param {number} [precision=0] Precision
  22713. * @returns {number} rounded number
  22714. * @example
  22715. * turf.round(120.4321)
  22716. * //=120
  22717. *
  22718. * turf.round(120.4321, 2)
  22719. * //=120.43
  22720. */
  22721. function helpers_main_es_round(num, precision) {
  22722. if (num === undefined || num === null || isNaN(num)) throw new Error('num is required');
  22723. if (precision && !(precision >= 0)) throw new Error('precision must be a positive number');
  22724. var multiplier = Math.pow(10, precision || 0);
  22725. return Math.round(num * multiplier) / multiplier;
  22726. }
  22727. /**
  22728. * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.
  22729. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  22730. *
  22731. * @name radiansToLength
  22732. * @param {number} radians in radians across the sphere
  22733. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  22734. * @returns {number} distance
  22735. */
  22736. function helpers_main_es_radiansToLength(radians, units) {
  22737. if (radians === undefined || radians === null) throw new Error('radians is required');
  22738. if (units && typeof units !== 'string') throw new Error('units must be a string');
  22739. var factor = helpers_main_es_factors[units || 'kilometers'];
  22740. if (!factor) throw new Error(units + ' units is invalid');
  22741. return radians * factor;
  22742. }
  22743. /**
  22744. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians
  22745. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  22746. *
  22747. * @name lengthToRadians
  22748. * @param {number} distance in real units
  22749. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  22750. * @returns {number} radians
  22751. */
  22752. function helpers_main_es_lengthToRadians(distance, units) {
  22753. if (distance === undefined || distance === null) throw new Error('distance is required');
  22754. if (units && typeof units !== 'string') throw new Error('units must be a string');
  22755. var factor = helpers_main_es_factors[units || 'kilometers'];
  22756. if (!factor) throw new Error(units + ' units is invalid');
  22757. return distance / factor;
  22758. }
  22759. /**
  22760. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees
  22761. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet
  22762. *
  22763. * @name lengthToDegrees
  22764. * @param {number} distance in real units
  22765. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  22766. * @returns {number} degrees
  22767. */
  22768. function helpers_main_es_lengthToDegrees(distance, units) {
  22769. return helpers_main_es_radiansToDegrees(helpers_main_es_lengthToRadians(distance, units));
  22770. }
  22771. /**
  22772. * Converts any bearing angle from the north line direction (positive clockwise)
  22773. * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line
  22774. *
  22775. * @name bearingToAzimuth
  22776. * @param {number} bearing angle, between -180 and +180 degrees
  22777. * @returns {number} angle between 0 and 360 degrees
  22778. */
  22779. function helpers_main_es_bearingToAzimuth(bearing) {
  22780. if (bearing === null || bearing === undefined) throw new Error('bearing is required');
  22781. var angle = bearing % 360;
  22782. if (angle < 0) angle += 360;
  22783. return angle;
  22784. }
  22785. /**
  22786. * Converts an angle in radians to degrees
  22787. *
  22788. * @name radiansToDegrees
  22789. * @param {number} radians angle in radians
  22790. * @returns {number} degrees between 0 and 360 degrees
  22791. */
  22792. function helpers_main_es_radiansToDegrees(radians) {
  22793. if (radians === null || radians === undefined) throw new Error('radians is required');
  22794. var degrees = radians % (2 * Math.PI);
  22795. return degrees * 180 / Math.PI;
  22796. }
  22797. /**
  22798. * Converts an angle in degrees to radians
  22799. *
  22800. * @name degreesToRadians
  22801. * @param {number} degrees angle between 0 and 360 degrees
  22802. * @returns {number} angle in radians
  22803. */
  22804. function helpers_main_es_degreesToRadians(degrees) {
  22805. if (degrees === null || degrees === undefined) throw new Error('degrees is required');
  22806. var radians = degrees % 360;
  22807. return radians * Math.PI / 180;
  22808. }
  22809. /**
  22810. * Converts a length to the requested unit.
  22811. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  22812. *
  22813. * @param {number} length to be converted
  22814. * @param {string} originalUnit of the length
  22815. * @param {string} [finalUnit='kilometers'] returned unit
  22816. * @returns {number} the converted length
  22817. */
  22818. function helpers_main_es_convertLength(length, originalUnit, finalUnit) {
  22819. if (length === null || length === undefined) throw new Error('length is required');
  22820. if (!(length >= 0)) throw new Error('length must be a positive number');
  22821. return helpers_main_es_radiansToLength(helpers_main_es_lengthToRadians(length, originalUnit), finalUnit || 'kilometers');
  22822. }
  22823. /**
  22824. * Converts a area to the requested unit.
  22825. * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches
  22826. * @param {number} area to be converted
  22827. * @param {string} [originalUnit='meters'] of the distance
  22828. * @param {string} [finalUnit='kilometers'] returned unit
  22829. * @returns {number} the converted distance
  22830. */
  22831. function helpers_main_es_convertArea(area, originalUnit, finalUnit) {
  22832. if (area === null || area === undefined) throw new Error('area is required');
  22833. if (!(area >= 0)) throw new Error('area must be a positive number');
  22834. var startFactor = helpers_main_es_areaFactors[originalUnit || 'meters'];
  22835. if (!startFactor) throw new Error('invalid original units');
  22836. var finalFactor = helpers_main_es_areaFactors[finalUnit || 'kilometers'];
  22837. if (!finalFactor) throw new Error('invalid final units');
  22838. return area / startFactor * finalFactor;
  22839. }
  22840. /**
  22841. * isNumber
  22842. *
  22843. * @param {*} num Number to validate
  22844. * @returns {boolean} true/false
  22845. * @example
  22846. * turf.isNumber(123)
  22847. * //=true
  22848. * turf.isNumber('foo')
  22849. * //=false
  22850. */
  22851. function helpers_main_es_isNumber(num) {
  22852. return !isNaN(num) && num !== null && !Array.isArray(num);
  22853. }
  22854. /**
  22855. * isObject
  22856. *
  22857. * @param {*} input variable to validate
  22858. * @returns {boolean} true/false
  22859. * @example
  22860. * turf.isObject({elevation: 10})
  22861. * //=true
  22862. * turf.isObject('foo')
  22863. * //=false
  22864. */
  22865. function helpers_main_es_isObject(input) {
  22866. return !!input && input.constructor === Object;
  22867. }
  22868. /**
  22869. * Validate BBox
  22870. *
  22871. * @private
  22872. * @param {Array<number>} bbox BBox to validate
  22873. * @returns {void}
  22874. * @throws Error if BBox is not valid
  22875. * @example
  22876. * validateBBox([-180, -40, 110, 50])
  22877. * //=OK
  22878. * validateBBox([-180, -40])
  22879. * //=Error
  22880. * validateBBox('Foo')
  22881. * //=Error
  22882. * validateBBox(5)
  22883. * //=Error
  22884. * validateBBox(null)
  22885. * //=Error
  22886. * validateBBox(undefined)
  22887. * //=Error
  22888. */
  22889. function helpers_main_es_validateBBox(bbox) {
  22890. if (!bbox) throw new Error('bbox is required');
  22891. if (!Array.isArray(bbox)) throw new Error('bbox must be an Array');
  22892. if (bbox.length !== 4 && bbox.length !== 6) throw new Error('bbox must be an Array of 4 or 6 numbers');
  22893. bbox.forEach(function (num) {
  22894. if (!helpers_main_es_isNumber(num)) throw new Error('bbox must only contain numbers');
  22895. });
  22896. }
  22897. /**
  22898. * Validate Id
  22899. *
  22900. * @private
  22901. * @param {string|number} id Id to validate
  22902. * @returns {void}
  22903. * @throws Error if Id is not valid
  22904. * @example
  22905. * validateId([-180, -40, 110, 50])
  22906. * //=Error
  22907. * validateId([-180, -40])
  22908. * //=Error
  22909. * validateId('Foo')
  22910. * //=OK
  22911. * validateId(5)
  22912. * //=OK
  22913. * validateId(null)
  22914. * //=Error
  22915. * validateId(undefined)
  22916. * //=Error
  22917. */
  22918. function helpers_main_es_validateId(id) {
  22919. if (!id) throw new Error('id is required');
  22920. if (['string', 'number'].indexOf(typeof id) === -1) throw new Error('id must be a number or a string');
  22921. } // Deprecated methods
  22922. function helpers_main_es_radians2degrees() {
  22923. throw new Error('method has been renamed to `radiansToDegrees`');
  22924. }
  22925. function helpers_main_es_degrees2radians() {
  22926. throw new Error('method has been renamed to `degreesToRadians`');
  22927. }
  22928. function helpers_main_es_distanceToDegrees() {
  22929. throw new Error('method has been renamed to `lengthToDegrees`');
  22930. }
  22931. function helpers_main_es_distanceToRadians() {
  22932. throw new Error('method has been renamed to `lengthToRadians`');
  22933. }
  22934. function helpers_main_es_radiansToDistance() {
  22935. throw new Error('method has been renamed to `radiansToLength`');
  22936. }
  22937. function helpers_main_es_bearingToAngle() {
  22938. throw new Error('method has been renamed to `bearingToAzimuth`');
  22939. }
  22940. function helpers_main_es_convertDistance() {
  22941. throw new Error('method has been renamed to `convertLength`');
  22942. }
  22943. // CONCATENATED MODULE: ./node_modules/@turf/center/node_modules/@turf/meta/main.es.js
  22944. /**
  22945. * Callback for coordEach
  22946. *
  22947. * @callback coordEachCallback
  22948. * @param {Array<number>} currentCoord The current coordinate being processed.
  22949. * @param {number} coordIndex The current index of the coordinate being processed.
  22950. * @param {number} featureIndex The current index of the Feature being processed.
  22951. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  22952. * @param {number} geometryIndex The current index of the Geometry being processed.
  22953. */
  22954. /**
  22955. * Iterate over coordinates in any GeoJSON object, similar to Array.forEach()
  22956. *
  22957. * @name coordEach
  22958. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  22959. * @param {Function} callback a method that takes (currentCoord, coordIndex, featureIndex, multiFeatureIndex)
  22960. * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.
  22961. * @returns {void}
  22962. * @example
  22963. * var features = turf.featureCollection([
  22964. * turf.point([26, 37], {"foo": "bar"}),
  22965. * turf.point([36, 53], {"hello": "world"})
  22966. * ]);
  22967. *
  22968. * turf.coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  22969. * //=currentCoord
  22970. * //=coordIndex
  22971. * //=featureIndex
  22972. * //=multiFeatureIndex
  22973. * //=geometryIndex
  22974. * });
  22975. */
  22976. function main_es_coordEach(geojson, callback, excludeWrapCoord) {
  22977. // Handles null Geometry -- Skips this GeoJSON
  22978. if (geojson === null) return;
  22979. var j,
  22980. k,
  22981. l,
  22982. geometry,
  22983. stopG,
  22984. coords,
  22985. geometryMaybeCollection,
  22986. wrapShrink = 0,
  22987. coordIndex = 0,
  22988. isGeometryCollection,
  22989. type = geojson.type,
  22990. isFeatureCollection = type === 'FeatureCollection',
  22991. isFeature = type === 'Feature',
  22992. stop = isFeatureCollection ? geojson.features.length : 1; // This logic may look a little weird. The reason why it is that way
  22993. // is because it's trying to be fast. GeoJSON supports multiple kinds
  22994. // of objects at its root: FeatureCollection, Features, Geometries.
  22995. // This function has the responsibility of handling all of them, and that
  22996. // means that some of the `for` loops you see below actually just don't apply
  22997. // to certain inputs. For instance, if you give this just a
  22998. // Point geometry, then both loops are short-circuited and all we do
  22999. // is gradually rename the input until it's called 'geometry'.
  23000. //
  23001. // This also aims to allocate as few resources as possible: just a
  23002. // few numbers and booleans, rather than any temporary arrays as would
  23003. // be required with the normalization approach.
  23004. for (var featureIndex = 0; featureIndex < stop; featureIndex++) {
  23005. geometryMaybeCollection = isFeatureCollection ? geojson.features[featureIndex].geometry : isFeature ? geojson.geometry : geojson;
  23006. isGeometryCollection = geometryMaybeCollection ? geometryMaybeCollection.type === 'GeometryCollection' : false;
  23007. stopG = isGeometryCollection ? geometryMaybeCollection.geometries.length : 1;
  23008. for (var geomIndex = 0; geomIndex < stopG; geomIndex++) {
  23009. var multiFeatureIndex = 0;
  23010. var geometryIndex = 0;
  23011. geometry = isGeometryCollection ? geometryMaybeCollection.geometries[geomIndex] : geometryMaybeCollection; // Handles null Geometry -- Skips this geometry
  23012. if (geometry === null) continue;
  23013. coords = geometry.coordinates;
  23014. var geomType = geometry.type;
  23015. wrapShrink = excludeWrapCoord && (geomType === 'Polygon' || geomType === 'MultiPolygon') ? 1 : 0;
  23016. switch (geomType) {
  23017. case null:
  23018. break;
  23019. case 'Point':
  23020. if (callback(coords, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  23021. coordIndex++;
  23022. multiFeatureIndex++;
  23023. break;
  23024. case 'LineString':
  23025. case 'MultiPoint':
  23026. for (j = 0; j < coords.length; j++) {
  23027. if (callback(coords[j], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  23028. coordIndex++;
  23029. if (geomType === 'MultiPoint') multiFeatureIndex++;
  23030. }
  23031. if (geomType === 'LineString') multiFeatureIndex++;
  23032. break;
  23033. case 'Polygon':
  23034. case 'MultiLineString':
  23035. for (j = 0; j < coords.length; j++) {
  23036. for (k = 0; k < coords[j].length - wrapShrink; k++) {
  23037. if (callback(coords[j][k], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  23038. coordIndex++;
  23039. }
  23040. if (geomType === 'MultiLineString') multiFeatureIndex++;
  23041. if (geomType === 'Polygon') geometryIndex++;
  23042. }
  23043. if (geomType === 'Polygon') multiFeatureIndex++;
  23044. break;
  23045. case 'MultiPolygon':
  23046. for (j = 0; j < coords.length; j++) {
  23047. if (geomType === 'MultiPolygon') geometryIndex = 0;
  23048. for (k = 0; k < coords[j].length; k++) {
  23049. for (l = 0; l < coords[j][k].length - wrapShrink; l++) {
  23050. if (callback(coords[j][k][l], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  23051. coordIndex++;
  23052. }
  23053. geometryIndex++;
  23054. }
  23055. multiFeatureIndex++;
  23056. }
  23057. break;
  23058. case 'GeometryCollection':
  23059. for (j = 0; j < geometry.geometries.length; j++) {
  23060. if (main_es_coordEach(geometry.geometries[j], callback, excludeWrapCoord) === false) return false;
  23061. }
  23062. break;
  23063. default:
  23064. throw new Error('Unknown Geometry Type');
  23065. }
  23066. }
  23067. }
  23068. }
  23069. /**
  23070. * Callback for coordReduce
  23071. *
  23072. * The first time the callback function is called, the values provided as arguments depend
  23073. * on whether the reduce method has an initialValue argument.
  23074. *
  23075. * If an initialValue is provided to the reduce method:
  23076. * - The previousValue argument is initialValue.
  23077. * - The currentValue argument is the value of the first element present in the array.
  23078. *
  23079. * If an initialValue is not provided:
  23080. * - The previousValue argument is the value of the first element present in the array.
  23081. * - The currentValue argument is the value of the second element present in the array.
  23082. *
  23083. * @callback coordReduceCallback
  23084. * @param {*} previousValue The accumulated value previously returned in the last invocation
  23085. * of the callback, or initialValue, if supplied.
  23086. * @param {Array<number>} currentCoord The current coordinate being processed.
  23087. * @param {number} coordIndex The current index of the coordinate being processed.
  23088. * Starts at index 0, if an initialValue is provided, and at index 1 otherwise.
  23089. * @param {number} featureIndex The current index of the Feature being processed.
  23090. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  23091. * @param {number} geometryIndex The current index of the Geometry being processed.
  23092. */
  23093. /**
  23094. * Reduce coordinates in any GeoJSON object, similar to Array.reduce()
  23095. *
  23096. * @name coordReduce
  23097. * @param {FeatureCollection|Geometry|Feature} geojson any GeoJSON object
  23098. * @param {Function} callback a method that takes (previousValue, currentCoord, coordIndex)
  23099. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  23100. * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.
  23101. * @returns {*} The value that results from the reduction.
  23102. * @example
  23103. * var features = turf.featureCollection([
  23104. * turf.point([26, 37], {"foo": "bar"}),
  23105. * turf.point([36, 53], {"hello": "world"})
  23106. * ]);
  23107. *
  23108. * turf.coordReduce(features, function (previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  23109. * //=previousValue
  23110. * //=currentCoord
  23111. * //=coordIndex
  23112. * //=featureIndex
  23113. * //=multiFeatureIndex
  23114. * //=geometryIndex
  23115. * return currentCoord;
  23116. * });
  23117. */
  23118. function main_es_coordReduce(geojson, callback, initialValue, excludeWrapCoord) {
  23119. var previousValue = initialValue;
  23120. main_es_coordEach(geojson, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  23121. if (coordIndex === 0 && initialValue === undefined) previousValue = currentCoord;else previousValue = callback(previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex);
  23122. }, excludeWrapCoord);
  23123. return previousValue;
  23124. }
  23125. /**
  23126. * Callback for propEach
  23127. *
  23128. * @callback propEachCallback
  23129. * @param {Object} currentProperties The current Properties being processed.
  23130. * @param {number} featureIndex The current index of the Feature being processed.
  23131. */
  23132. /**
  23133. * Iterate over properties in any GeoJSON object, similar to Array.forEach()
  23134. *
  23135. * @name propEach
  23136. * @param {FeatureCollection|Feature} geojson any GeoJSON object
  23137. * @param {Function} callback a method that takes (currentProperties, featureIndex)
  23138. * @returns {void}
  23139. * @example
  23140. * var features = turf.featureCollection([
  23141. * turf.point([26, 37], {foo: 'bar'}),
  23142. * turf.point([36, 53], {hello: 'world'})
  23143. * ]);
  23144. *
  23145. * turf.propEach(features, function (currentProperties, featureIndex) {
  23146. * //=currentProperties
  23147. * //=featureIndex
  23148. * });
  23149. */
  23150. function main_es_propEach(geojson, callback) {
  23151. var i;
  23152. switch (geojson.type) {
  23153. case 'FeatureCollection':
  23154. for (i = 0; i < geojson.features.length; i++) {
  23155. if (callback(geojson.features[i].properties, i) === false) break;
  23156. }
  23157. break;
  23158. case 'Feature':
  23159. callback(geojson.properties, 0);
  23160. break;
  23161. }
  23162. }
  23163. /**
  23164. * Callback for propReduce
  23165. *
  23166. * The first time the callback function is called, the values provided as arguments depend
  23167. * on whether the reduce method has an initialValue argument.
  23168. *
  23169. * If an initialValue is provided to the reduce method:
  23170. * - The previousValue argument is initialValue.
  23171. * - The currentValue argument is the value of the first element present in the array.
  23172. *
  23173. * If an initialValue is not provided:
  23174. * - The previousValue argument is the value of the first element present in the array.
  23175. * - The currentValue argument is the value of the second element present in the array.
  23176. *
  23177. * @callback propReduceCallback
  23178. * @param {*} previousValue The accumulated value previously returned in the last invocation
  23179. * of the callback, or initialValue, if supplied.
  23180. * @param {*} currentProperties The current Properties being processed.
  23181. * @param {number} featureIndex The current index of the Feature being processed.
  23182. */
  23183. /**
  23184. * Reduce properties in any GeoJSON object into a single value,
  23185. * similar to how Array.reduce works. However, in this case we lazily run
  23186. * the reduction, so an array of all properties is unnecessary.
  23187. *
  23188. * @name propReduce
  23189. * @param {FeatureCollection|Feature} geojson any GeoJSON object
  23190. * @param {Function} callback a method that takes (previousValue, currentProperties, featureIndex)
  23191. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  23192. * @returns {*} The value that results from the reduction.
  23193. * @example
  23194. * var features = turf.featureCollection([
  23195. * turf.point([26, 37], {foo: 'bar'}),
  23196. * turf.point([36, 53], {hello: 'world'})
  23197. * ]);
  23198. *
  23199. * turf.propReduce(features, function (previousValue, currentProperties, featureIndex) {
  23200. * //=previousValue
  23201. * //=currentProperties
  23202. * //=featureIndex
  23203. * return currentProperties
  23204. * });
  23205. */
  23206. function main_es_propReduce(geojson, callback, initialValue) {
  23207. var previousValue = initialValue;
  23208. main_es_propEach(geojson, function (currentProperties, featureIndex) {
  23209. if (featureIndex === 0 && initialValue === undefined) previousValue = currentProperties;else previousValue = callback(previousValue, currentProperties, featureIndex);
  23210. });
  23211. return previousValue;
  23212. }
  23213. /**
  23214. * Callback for featureEach
  23215. *
  23216. * @callback featureEachCallback
  23217. * @param {Feature<any>} currentFeature The current Feature being processed.
  23218. * @param {number} featureIndex The current index of the Feature being processed.
  23219. */
  23220. /**
  23221. * Iterate over features in any GeoJSON object, similar to
  23222. * Array.forEach.
  23223. *
  23224. * @name featureEach
  23225. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  23226. * @param {Function} callback a method that takes (currentFeature, featureIndex)
  23227. * @returns {void}
  23228. * @example
  23229. * var features = turf.featureCollection([
  23230. * turf.point([26, 37], {foo: 'bar'}),
  23231. * turf.point([36, 53], {hello: 'world'})
  23232. * ]);
  23233. *
  23234. * turf.featureEach(features, function (currentFeature, featureIndex) {
  23235. * //=currentFeature
  23236. * //=featureIndex
  23237. * });
  23238. */
  23239. function main_es_featureEach(geojson, callback) {
  23240. if (geojson.type === 'Feature') {
  23241. callback(geojson, 0);
  23242. } else if (geojson.type === 'FeatureCollection') {
  23243. for (var i = 0; i < geojson.features.length; i++) {
  23244. if (callback(geojson.features[i], i) === false) break;
  23245. }
  23246. }
  23247. }
  23248. /**
  23249. * Callback for featureReduce
  23250. *
  23251. * The first time the callback function is called, the values provided as arguments depend
  23252. * on whether the reduce method has an initialValue argument.
  23253. *
  23254. * If an initialValue is provided to the reduce method:
  23255. * - The previousValue argument is initialValue.
  23256. * - The currentValue argument is the value of the first element present in the array.
  23257. *
  23258. * If an initialValue is not provided:
  23259. * - The previousValue argument is the value of the first element present in the array.
  23260. * - The currentValue argument is the value of the second element present in the array.
  23261. *
  23262. * @callback featureReduceCallback
  23263. * @param {*} previousValue The accumulated value previously returned in the last invocation
  23264. * of the callback, or initialValue, if supplied.
  23265. * @param {Feature} currentFeature The current Feature being processed.
  23266. * @param {number} featureIndex The current index of the Feature being processed.
  23267. */
  23268. /**
  23269. * Reduce features in any GeoJSON object, similar to Array.reduce().
  23270. *
  23271. * @name featureReduce
  23272. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  23273. * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex)
  23274. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  23275. * @returns {*} The value that results from the reduction.
  23276. * @example
  23277. * var features = turf.featureCollection([
  23278. * turf.point([26, 37], {"foo": "bar"}),
  23279. * turf.point([36, 53], {"hello": "world"})
  23280. * ]);
  23281. *
  23282. * turf.featureReduce(features, function (previousValue, currentFeature, featureIndex) {
  23283. * //=previousValue
  23284. * //=currentFeature
  23285. * //=featureIndex
  23286. * return currentFeature
  23287. * });
  23288. */
  23289. function main_es_featureReduce(geojson, callback, initialValue) {
  23290. var previousValue = initialValue;
  23291. main_es_featureEach(geojson, function (currentFeature, featureIndex) {
  23292. if (featureIndex === 0 && initialValue === undefined) previousValue = currentFeature;else previousValue = callback(previousValue, currentFeature, featureIndex);
  23293. });
  23294. return previousValue;
  23295. }
  23296. /**
  23297. * Get all coordinates from any GeoJSON object.
  23298. *
  23299. * @name coordAll
  23300. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  23301. * @returns {Array<Array<number>>} coordinate position array
  23302. * @example
  23303. * var features = turf.featureCollection([
  23304. * turf.point([26, 37], {foo: 'bar'}),
  23305. * turf.point([36, 53], {hello: 'world'})
  23306. * ]);
  23307. *
  23308. * var coords = turf.coordAll(features);
  23309. * //= [[26, 37], [36, 53]]
  23310. */
  23311. function main_es_coordAll(geojson) {
  23312. var coords = [];
  23313. main_es_coordEach(geojson, function (coord) {
  23314. coords.push(coord);
  23315. });
  23316. return coords;
  23317. }
  23318. /**
  23319. * Callback for geomEach
  23320. *
  23321. * @callback geomEachCallback
  23322. * @param {Geometry} currentGeometry The current Geometry being processed.
  23323. * @param {number} featureIndex The current index of the Feature being processed.
  23324. * @param {Object} featureProperties The current Feature Properties being processed.
  23325. * @param {Array<number>} featureBBox The current Feature BBox being processed.
  23326. * @param {number|string} featureId The current Feature Id being processed.
  23327. */
  23328. /**
  23329. * Iterate over each geometry in any GeoJSON object, similar to Array.forEach()
  23330. *
  23331. * @name geomEach
  23332. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  23333. * @param {Function} callback a method that takes (currentGeometry, featureIndex, featureProperties, featureBBox, featureId)
  23334. * @returns {void}
  23335. * @example
  23336. * var features = turf.featureCollection([
  23337. * turf.point([26, 37], {foo: 'bar'}),
  23338. * turf.point([36, 53], {hello: 'world'})
  23339. * ]);
  23340. *
  23341. * turf.geomEach(features, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  23342. * //=currentGeometry
  23343. * //=featureIndex
  23344. * //=featureProperties
  23345. * //=featureBBox
  23346. * //=featureId
  23347. * });
  23348. */
  23349. function main_es_geomEach(geojson, callback) {
  23350. var i,
  23351. j,
  23352. g,
  23353. geometry,
  23354. stopG,
  23355. geometryMaybeCollection,
  23356. isGeometryCollection,
  23357. featureProperties,
  23358. featureBBox,
  23359. featureId,
  23360. featureIndex = 0,
  23361. isFeatureCollection = geojson.type === 'FeatureCollection',
  23362. isFeature = geojson.type === 'Feature',
  23363. stop = isFeatureCollection ? geojson.features.length : 1; // This logic may look a little weird. The reason why it is that way
  23364. // is because it's trying to be fast. GeoJSON supports multiple kinds
  23365. // of objects at its root: FeatureCollection, Features, Geometries.
  23366. // This function has the responsibility of handling all of them, and that
  23367. // means that some of the `for` loops you see below actually just don't apply
  23368. // to certain inputs. For instance, if you give this just a
  23369. // Point geometry, then both loops are short-circuited and all we do
  23370. // is gradually rename the input until it's called 'geometry'.
  23371. //
  23372. // This also aims to allocate as few resources as possible: just a
  23373. // few numbers and booleans, rather than any temporary arrays as would
  23374. // be required with the normalization approach.
  23375. for (i = 0; i < stop; i++) {
  23376. geometryMaybeCollection = isFeatureCollection ? geojson.features[i].geometry : isFeature ? geojson.geometry : geojson;
  23377. featureProperties = isFeatureCollection ? geojson.features[i].properties : isFeature ? geojson.properties : {};
  23378. featureBBox = isFeatureCollection ? geojson.features[i].bbox : isFeature ? geojson.bbox : undefined;
  23379. featureId = isFeatureCollection ? geojson.features[i].id : isFeature ? geojson.id : undefined;
  23380. isGeometryCollection = geometryMaybeCollection ? geometryMaybeCollection.type === 'GeometryCollection' : false;
  23381. stopG = isGeometryCollection ? geometryMaybeCollection.geometries.length : 1;
  23382. for (g = 0; g < stopG; g++) {
  23383. geometry = isGeometryCollection ? geometryMaybeCollection.geometries[g] : geometryMaybeCollection; // Handle null Geometry
  23384. if (geometry === null) {
  23385. if (callback(null, featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  23386. continue;
  23387. }
  23388. switch (geometry.type) {
  23389. case 'Point':
  23390. case 'LineString':
  23391. case 'MultiPoint':
  23392. case 'Polygon':
  23393. case 'MultiLineString':
  23394. case 'MultiPolygon':
  23395. {
  23396. if (callback(geometry, featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  23397. break;
  23398. }
  23399. case 'GeometryCollection':
  23400. {
  23401. for (j = 0; j < geometry.geometries.length; j++) {
  23402. if (callback(geometry.geometries[j], featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  23403. }
  23404. break;
  23405. }
  23406. default:
  23407. throw new Error('Unknown Geometry Type');
  23408. }
  23409. } // Only increase `featureIndex` per each feature
  23410. featureIndex++;
  23411. }
  23412. }
  23413. /**
  23414. * Callback for geomReduce
  23415. *
  23416. * The first time the callback function is called, the values provided as arguments depend
  23417. * on whether the reduce method has an initialValue argument.
  23418. *
  23419. * If an initialValue is provided to the reduce method:
  23420. * - The previousValue argument is initialValue.
  23421. * - The currentValue argument is the value of the first element present in the array.
  23422. *
  23423. * If an initialValue is not provided:
  23424. * - The previousValue argument is the value of the first element present in the array.
  23425. * - The currentValue argument is the value of the second element present in the array.
  23426. *
  23427. * @callback geomReduceCallback
  23428. * @param {*} previousValue The accumulated value previously returned in the last invocation
  23429. * of the callback, or initialValue, if supplied.
  23430. * @param {Geometry} currentGeometry The current Geometry being processed.
  23431. * @param {number} featureIndex The current index of the Feature being processed.
  23432. * @param {Object} featureProperties The current Feature Properties being processed.
  23433. * @param {Array<number>} featureBBox The current Feature BBox being processed.
  23434. * @param {number|string} featureId The current Feature Id being processed.
  23435. */
  23436. /**
  23437. * Reduce geometry in any GeoJSON object, similar to Array.reduce().
  23438. *
  23439. * @name geomReduce
  23440. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  23441. * @param {Function} callback a method that takes (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId)
  23442. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  23443. * @returns {*} The value that results from the reduction.
  23444. * @example
  23445. * var features = turf.featureCollection([
  23446. * turf.point([26, 37], {foo: 'bar'}),
  23447. * turf.point([36, 53], {hello: 'world'})
  23448. * ]);
  23449. *
  23450. * turf.geomReduce(features, function (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  23451. * //=previousValue
  23452. * //=currentGeometry
  23453. * //=featureIndex
  23454. * //=featureProperties
  23455. * //=featureBBox
  23456. * //=featureId
  23457. * return currentGeometry
  23458. * });
  23459. */
  23460. function main_es_geomReduce(geojson, callback, initialValue) {
  23461. var previousValue = initialValue;
  23462. main_es_geomEach(geojson, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  23463. if (featureIndex === 0 && initialValue === undefined) previousValue = currentGeometry;else previousValue = callback(previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId);
  23464. });
  23465. return previousValue;
  23466. }
  23467. /**
  23468. * Callback for flattenEach
  23469. *
  23470. * @callback flattenEachCallback
  23471. * @param {Feature} currentFeature The current flattened feature being processed.
  23472. * @param {number} featureIndex The current index of the Feature being processed.
  23473. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  23474. */
  23475. /**
  23476. * Iterate over flattened features in any GeoJSON object, similar to
  23477. * Array.forEach.
  23478. *
  23479. * @name flattenEach
  23480. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  23481. * @param {Function} callback a method that takes (currentFeature, featureIndex, multiFeatureIndex)
  23482. * @example
  23483. * var features = turf.featureCollection([
  23484. * turf.point([26, 37], {foo: 'bar'}),
  23485. * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})
  23486. * ]);
  23487. *
  23488. * turf.flattenEach(features, function (currentFeature, featureIndex, multiFeatureIndex) {
  23489. * //=currentFeature
  23490. * //=featureIndex
  23491. * //=multiFeatureIndex
  23492. * });
  23493. */
  23494. function main_es_flattenEach(geojson, callback) {
  23495. main_es_geomEach(geojson, function (geometry, featureIndex, properties, bbox, id) {
  23496. // Callback for single geometry
  23497. var type = geometry === null ? null : geometry.type;
  23498. switch (type) {
  23499. case null:
  23500. case 'Point':
  23501. case 'LineString':
  23502. case 'Polygon':
  23503. if (callback(_turf_helpers_main_es_feature(geometry, properties, {
  23504. bbox: bbox,
  23505. id: id
  23506. }), featureIndex, 0) === false) return false;
  23507. return;
  23508. }
  23509. var geomType; // Callback for multi-geometry
  23510. switch (type) {
  23511. case 'MultiPoint':
  23512. geomType = 'Point';
  23513. break;
  23514. case 'MultiLineString':
  23515. geomType = 'LineString';
  23516. break;
  23517. case 'MultiPolygon':
  23518. geomType = 'Polygon';
  23519. break;
  23520. }
  23521. for (var multiFeatureIndex = 0; multiFeatureIndex < geometry.coordinates.length; multiFeatureIndex++) {
  23522. var coordinate = geometry.coordinates[multiFeatureIndex];
  23523. var geom = {
  23524. type: geomType,
  23525. coordinates: coordinate
  23526. };
  23527. if (callback(_turf_helpers_main_es_feature(geom, properties), featureIndex, multiFeatureIndex) === false) return false;
  23528. }
  23529. });
  23530. }
  23531. /**
  23532. * Callback for flattenReduce
  23533. *
  23534. * The first time the callback function is called, the values provided as arguments depend
  23535. * on whether the reduce method has an initialValue argument.
  23536. *
  23537. * If an initialValue is provided to the reduce method:
  23538. * - The previousValue argument is initialValue.
  23539. * - The currentValue argument is the value of the first element present in the array.
  23540. *
  23541. * If an initialValue is not provided:
  23542. * - The previousValue argument is the value of the first element present in the array.
  23543. * - The currentValue argument is the value of the second element present in the array.
  23544. *
  23545. * @callback flattenReduceCallback
  23546. * @param {*} previousValue The accumulated value previously returned in the last invocation
  23547. * of the callback, or initialValue, if supplied.
  23548. * @param {Feature} currentFeature The current Feature being processed.
  23549. * @param {number} featureIndex The current index of the Feature being processed.
  23550. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  23551. */
  23552. /**
  23553. * Reduce flattened features in any GeoJSON object, similar to Array.reduce().
  23554. *
  23555. * @name flattenReduce
  23556. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  23557. * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex, multiFeatureIndex)
  23558. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  23559. * @returns {*} The value that results from the reduction.
  23560. * @example
  23561. * var features = turf.featureCollection([
  23562. * turf.point([26, 37], {foo: 'bar'}),
  23563. * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})
  23564. * ]);
  23565. *
  23566. * turf.flattenReduce(features, function (previousValue, currentFeature, featureIndex, multiFeatureIndex) {
  23567. * //=previousValue
  23568. * //=currentFeature
  23569. * //=featureIndex
  23570. * //=multiFeatureIndex
  23571. * return currentFeature
  23572. * });
  23573. */
  23574. function main_es_flattenReduce(geojson, callback, initialValue) {
  23575. var previousValue = initialValue;
  23576. main_es_flattenEach(geojson, function (currentFeature, featureIndex, multiFeatureIndex) {
  23577. if (featureIndex === 0 && multiFeatureIndex === 0 && initialValue === undefined) previousValue = currentFeature;else previousValue = callback(previousValue, currentFeature, featureIndex, multiFeatureIndex);
  23578. });
  23579. return previousValue;
  23580. }
  23581. /**
  23582. * Callback for segmentEach
  23583. *
  23584. * @callback segmentEachCallback
  23585. * @param {Feature<LineString>} currentSegment The current Segment being processed.
  23586. * @param {number} featureIndex The current index of the Feature being processed.
  23587. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  23588. * @param {number} geometryIndex The current index of the Geometry being processed.
  23589. * @param {number} segmentIndex The current index of the Segment being processed.
  23590. * @returns {void}
  23591. */
  23592. /**
  23593. * Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEach()
  23594. * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  23595. *
  23596. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON
  23597. * @param {Function} callback a method that takes (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex)
  23598. * @returns {void}
  23599. * @example
  23600. * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);
  23601. *
  23602. * // Iterate over GeoJSON by 2-vertex segments
  23603. * turf.segmentEach(polygon, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  23604. * //=currentSegment
  23605. * //=featureIndex
  23606. * //=multiFeatureIndex
  23607. * //=geometryIndex
  23608. * //=segmentIndex
  23609. * });
  23610. *
  23611. * // Calculate the total number of segments
  23612. * var total = 0;
  23613. * turf.segmentEach(polygon, function () {
  23614. * total++;
  23615. * });
  23616. */
  23617. function main_es_segmentEach(geojson, callback) {
  23618. main_es_flattenEach(geojson, function (feature$$1, featureIndex, multiFeatureIndex) {
  23619. var segmentIndex = 0; // Exclude null Geometries
  23620. if (!feature$$1.geometry) return; // (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  23621. var type = feature$$1.geometry.type;
  23622. if (type === 'Point' || type === 'MultiPoint') return; // Generate 2-vertex line segments
  23623. var previousCoords;
  23624. if (main_es_coordEach(feature$$1, function (currentCoord, coordIndex, featureIndexCoord, mutliPartIndexCoord, geometryIndex) {
  23625. // Simulating a meta.coordReduce() since `reduce` operations cannot be stopped by returning `false`
  23626. if (previousCoords === undefined) {
  23627. previousCoords = currentCoord;
  23628. return;
  23629. }
  23630. var currentSegment = helpers_main_es_lineString([previousCoords, currentCoord], feature$$1.properties);
  23631. if (callback(currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) === false) return false;
  23632. segmentIndex++;
  23633. previousCoords = currentCoord;
  23634. }) === false) return false;
  23635. });
  23636. }
  23637. /**
  23638. * Callback for segmentReduce
  23639. *
  23640. * The first time the callback function is called, the values provided as arguments depend
  23641. * on whether the reduce method has an initialValue argument.
  23642. *
  23643. * If an initialValue is provided to the reduce method:
  23644. * - The previousValue argument is initialValue.
  23645. * - The currentValue argument is the value of the first element present in the array.
  23646. *
  23647. * If an initialValue is not provided:
  23648. * - The previousValue argument is the value of the first element present in the array.
  23649. * - The currentValue argument is the value of the second element present in the array.
  23650. *
  23651. * @callback segmentReduceCallback
  23652. * @param {*} previousValue The accumulated value previously returned in the last invocation
  23653. * of the callback, or initialValue, if supplied.
  23654. * @param {Feature<LineString>} currentSegment The current Segment being processed.
  23655. * @param {number} featureIndex The current index of the Feature being processed.
  23656. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  23657. * @param {number} geometryIndex The current index of the Geometry being processed.
  23658. * @param {number} segmentIndex The current index of the Segment being processed.
  23659. */
  23660. /**
  23661. * Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce()
  23662. * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  23663. *
  23664. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON
  23665. * @param {Function} callback a method that takes (previousValue, currentSegment, currentIndex)
  23666. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  23667. * @returns {void}
  23668. * @example
  23669. * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);
  23670. *
  23671. * // Iterate over GeoJSON by 2-vertex segments
  23672. * turf.segmentReduce(polygon, function (previousSegment, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  23673. * //= previousSegment
  23674. * //= currentSegment
  23675. * //= featureIndex
  23676. * //= multiFeatureIndex
  23677. * //= geometryIndex
  23678. * //= segmentInex
  23679. * return currentSegment
  23680. * });
  23681. *
  23682. * // Calculate the total number of segments
  23683. * var initialValue = 0
  23684. * var total = turf.segmentReduce(polygon, function (previousValue) {
  23685. * previousValue++;
  23686. * return previousValue;
  23687. * }, initialValue);
  23688. */
  23689. function main_es_segmentReduce(geojson, callback, initialValue) {
  23690. var previousValue = initialValue;
  23691. var started = false;
  23692. main_es_segmentEach(geojson, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  23693. if (started === false && initialValue === undefined) previousValue = currentSegment;else previousValue = callback(previousValue, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex);
  23694. started = true;
  23695. });
  23696. return previousValue;
  23697. }
  23698. /**
  23699. * Callback for lineEach
  23700. *
  23701. * @callback lineEachCallback
  23702. * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed
  23703. * @param {number} featureIndex The current index of the Feature being processed
  23704. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed
  23705. * @param {number} geometryIndex The current index of the Geometry being processed
  23706. */
  23707. /**
  23708. * Iterate over line or ring coordinates in LineString, Polygon, MultiLineString, MultiPolygon Features or Geometries,
  23709. * similar to Array.forEach.
  23710. *
  23711. * @name lineEach
  23712. * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object
  23713. * @param {Function} callback a method that takes (currentLine, featureIndex, multiFeatureIndex, geometryIndex)
  23714. * @example
  23715. * var multiLine = turf.multiLineString([
  23716. * [[26, 37], [35, 45]],
  23717. * [[36, 53], [38, 50], [41, 55]]
  23718. * ]);
  23719. *
  23720. * turf.lineEach(multiLine, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  23721. * //=currentLine
  23722. * //=featureIndex
  23723. * //=multiFeatureIndex
  23724. * //=geometryIndex
  23725. * });
  23726. */
  23727. function main_es_lineEach(geojson, callback) {
  23728. // validation
  23729. if (!geojson) throw new Error('geojson is required');
  23730. main_es_flattenEach(geojson, function (feature$$1, featureIndex, multiFeatureIndex) {
  23731. if (feature$$1.geometry === null) return;
  23732. var type = feature$$1.geometry.type;
  23733. var coords = feature$$1.geometry.coordinates;
  23734. switch (type) {
  23735. case 'LineString':
  23736. if (callback(feature$$1, featureIndex, multiFeatureIndex, 0, 0) === false) return false;
  23737. break;
  23738. case 'Polygon':
  23739. for (var geometryIndex = 0; geometryIndex < coords.length; geometryIndex++) {
  23740. if (callback(helpers_main_es_lineString(coords[geometryIndex], feature$$1.properties), featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  23741. }
  23742. break;
  23743. }
  23744. });
  23745. }
  23746. /**
  23747. * Callback for lineReduce
  23748. *
  23749. * The first time the callback function is called, the values provided as arguments depend
  23750. * on whether the reduce method has an initialValue argument.
  23751. *
  23752. * If an initialValue is provided to the reduce method:
  23753. * - The previousValue argument is initialValue.
  23754. * - The currentValue argument is the value of the first element present in the array.
  23755. *
  23756. * If an initialValue is not provided:
  23757. * - The previousValue argument is the value of the first element present in the array.
  23758. * - The currentValue argument is the value of the second element present in the array.
  23759. *
  23760. * @callback lineReduceCallback
  23761. * @param {*} previousValue The accumulated value previously returned in the last invocation
  23762. * of the callback, or initialValue, if supplied.
  23763. * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed.
  23764. * @param {number} featureIndex The current index of the Feature being processed
  23765. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed
  23766. * @param {number} geometryIndex The current index of the Geometry being processed
  23767. */
  23768. /**
  23769. * Reduce features in any GeoJSON object, similar to Array.reduce().
  23770. *
  23771. * @name lineReduce
  23772. * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object
  23773. * @param {Function} callback a method that takes (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex)
  23774. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  23775. * @returns {*} The value that results from the reduction.
  23776. * @example
  23777. * var multiPoly = turf.multiPolygon([
  23778. * turf.polygon([[[12,48],[2,41],[24,38],[12,48]], [[9,44],[13,41],[13,45],[9,44]]]),
  23779. * turf.polygon([[[5, 5], [0, 0], [2, 2], [4, 4], [5, 5]]])
  23780. * ]);
  23781. *
  23782. * turf.lineReduce(multiPoly, function (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  23783. * //=previousValue
  23784. * //=currentLine
  23785. * //=featureIndex
  23786. * //=multiFeatureIndex
  23787. * //=geometryIndex
  23788. * return currentLine
  23789. * });
  23790. */
  23791. function main_es_lineReduce(geojson, callback, initialValue) {
  23792. var previousValue = initialValue;
  23793. main_es_lineEach(geojson, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  23794. if (featureIndex === 0 && initialValue === undefined) previousValue = currentLine;else previousValue = callback(previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex);
  23795. });
  23796. return previousValue;
  23797. }
  23798. /**
  23799. * Finds a particular 2-vertex LineString Segment from a GeoJSON using `@turf/meta` indexes.
  23800. *
  23801. * Negative indexes are permitted.
  23802. * Point & MultiPoint will always return null.
  23803. *
  23804. * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry
  23805. * @param {Object} [options={}] Optional parameters
  23806. * @param {number} [options.featureIndex=0] Feature Index
  23807. * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index
  23808. * @param {number} [options.geometryIndex=0] Geometry Index
  23809. * @param {number} [options.segmentIndex=0] Segment Index
  23810. * @param {Object} [options.properties={}] Translate Properties to output LineString
  23811. * @param {BBox} [options.bbox={}] Translate BBox to output LineString
  23812. * @param {number|string} [options.id={}] Translate Id to output LineString
  23813. * @returns {Feature<LineString>} 2-vertex GeoJSON Feature LineString
  23814. * @example
  23815. * var multiLine = turf.multiLineString([
  23816. * [[10, 10], [50, 30], [30, 40]],
  23817. * [[-10, -10], [-50, -30], [-30, -40]]
  23818. * ]);
  23819. *
  23820. * // First Segment (defaults are 0)
  23821. * turf.findSegment(multiLine);
  23822. * // => Feature<LineString<[[10, 10], [50, 30]]>>
  23823. *
  23824. * // First Segment of 2nd Multi Feature
  23825. * turf.findSegment(multiLine, {multiFeatureIndex: 1});
  23826. * // => Feature<LineString<[[-10, -10], [-50, -30]]>>
  23827. *
  23828. * // Last Segment of Last Multi Feature
  23829. * turf.findSegment(multiLine, {multiFeatureIndex: -1, segmentIndex: -1});
  23830. * // => Feature<LineString<[[-50, -30], [-30, -40]]>>
  23831. */
  23832. function main_es_findSegment(geojson, options) {
  23833. // Optional Parameters
  23834. options = options || {};
  23835. if (!helpers_main_es_isObject(options)) throw new Error('options is invalid');
  23836. var featureIndex = options.featureIndex || 0;
  23837. var multiFeatureIndex = options.multiFeatureIndex || 0;
  23838. var geometryIndex = options.geometryIndex || 0;
  23839. var segmentIndex = options.segmentIndex || 0; // Find FeatureIndex
  23840. var properties = options.properties;
  23841. var geometry;
  23842. switch (geojson.type) {
  23843. case 'FeatureCollection':
  23844. if (featureIndex < 0) featureIndex = geojson.features.length + featureIndex;
  23845. properties = properties || geojson.features[featureIndex].properties;
  23846. geometry = geojson.features[featureIndex].geometry;
  23847. break;
  23848. case 'Feature':
  23849. properties = properties || geojson.properties;
  23850. geometry = geojson.geometry;
  23851. break;
  23852. case 'Point':
  23853. case 'MultiPoint':
  23854. return null;
  23855. case 'LineString':
  23856. case 'Polygon':
  23857. case 'MultiLineString':
  23858. case 'MultiPolygon':
  23859. geometry = geojson;
  23860. break;
  23861. default:
  23862. throw new Error('geojson is invalid');
  23863. } // Find SegmentIndex
  23864. if (geometry === null) return null;
  23865. var coords = geometry.coordinates;
  23866. switch (geometry.type) {
  23867. case 'Point':
  23868. case 'MultiPoint':
  23869. return null;
  23870. case 'LineString':
  23871. if (segmentIndex < 0) segmentIndex = coords.length + segmentIndex - 1;
  23872. return helpers_main_es_lineString([coords[segmentIndex], coords[segmentIndex + 1]], properties, options);
  23873. case 'Polygon':
  23874. if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;
  23875. if (segmentIndex < 0) segmentIndex = coords[geometryIndex].length + segmentIndex - 1;
  23876. return helpers_main_es_lineString([coords[geometryIndex][segmentIndex], coords[geometryIndex][segmentIndex + 1]], properties, options);
  23877. case 'MultiLineString':
  23878. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  23879. if (segmentIndex < 0) segmentIndex = coords[multiFeatureIndex].length + segmentIndex - 1;
  23880. return helpers_main_es_lineString([coords[multiFeatureIndex][segmentIndex], coords[multiFeatureIndex][segmentIndex + 1]], properties, options);
  23881. case 'MultiPolygon':
  23882. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  23883. if (geometryIndex < 0) geometryIndex = coords[multiFeatureIndex].length + geometryIndex;
  23884. if (segmentIndex < 0) segmentIndex = coords[multiFeatureIndex][geometryIndex].length - segmentIndex - 1;
  23885. return helpers_main_es_lineString([coords[multiFeatureIndex][geometryIndex][segmentIndex], coords[multiFeatureIndex][geometryIndex][segmentIndex + 1]], properties, options);
  23886. }
  23887. throw new Error('geojson is invalid');
  23888. }
  23889. /**
  23890. * Finds a particular Point from a GeoJSON using `@turf/meta` indexes.
  23891. *
  23892. * Negative indexes are permitted.
  23893. *
  23894. * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry
  23895. * @param {Object} [options={}] Optional parameters
  23896. * @param {number} [options.featureIndex=0] Feature Index
  23897. * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index
  23898. * @param {number} [options.geometryIndex=0] Geometry Index
  23899. * @param {number} [options.coordIndex=0] Coord Index
  23900. * @param {Object} [options.properties={}] Translate Properties to output Point
  23901. * @param {BBox} [options.bbox={}] Translate BBox to output Point
  23902. * @param {number|string} [options.id={}] Translate Id to output Point
  23903. * @returns {Feature<Point>} 2-vertex GeoJSON Feature Point
  23904. * @example
  23905. * var multiLine = turf.multiLineString([
  23906. * [[10, 10], [50, 30], [30, 40]],
  23907. * [[-10, -10], [-50, -30], [-30, -40]]
  23908. * ]);
  23909. *
  23910. * // First Segment (defaults are 0)
  23911. * turf.findPoint(multiLine);
  23912. * // => Feature<Point<[10, 10]>>
  23913. *
  23914. * // First Segment of the 2nd Multi-Feature
  23915. * turf.findPoint(multiLine, {multiFeatureIndex: 1});
  23916. * // => Feature<Point<[-10, -10]>>
  23917. *
  23918. * // Last Segment of last Multi-Feature
  23919. * turf.findPoint(multiLine, {multiFeatureIndex: -1, coordIndex: -1});
  23920. * // => Feature<Point<[-30, -40]>>
  23921. */
  23922. function main_es_findPoint(geojson, options) {
  23923. // Optional Parameters
  23924. options = options || {};
  23925. if (!helpers_main_es_isObject(options)) throw new Error('options is invalid');
  23926. var featureIndex = options.featureIndex || 0;
  23927. var multiFeatureIndex = options.multiFeatureIndex || 0;
  23928. var geometryIndex = options.geometryIndex || 0;
  23929. var coordIndex = options.coordIndex || 0; // Find FeatureIndex
  23930. var properties = options.properties;
  23931. var geometry;
  23932. switch (geojson.type) {
  23933. case 'FeatureCollection':
  23934. if (featureIndex < 0) featureIndex = geojson.features.length + featureIndex;
  23935. properties = properties || geojson.features[featureIndex].properties;
  23936. geometry = geojson.features[featureIndex].geometry;
  23937. break;
  23938. case 'Feature':
  23939. properties = properties || geojson.properties;
  23940. geometry = geojson.geometry;
  23941. break;
  23942. case 'Point':
  23943. case 'MultiPoint':
  23944. return null;
  23945. case 'LineString':
  23946. case 'Polygon':
  23947. case 'MultiLineString':
  23948. case 'MultiPolygon':
  23949. geometry = geojson;
  23950. break;
  23951. default:
  23952. throw new Error('geojson is invalid');
  23953. } // Find Coord Index
  23954. if (geometry === null) return null;
  23955. var coords = geometry.coordinates;
  23956. switch (geometry.type) {
  23957. case 'Point':
  23958. return _turf_helpers_main_es_point(coords, properties, options);
  23959. case 'MultiPoint':
  23960. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  23961. return _turf_helpers_main_es_point(coords[multiFeatureIndex], properties, options);
  23962. case 'LineString':
  23963. if (coordIndex < 0) coordIndex = coords.length + coordIndex;
  23964. return _turf_helpers_main_es_point(coords[coordIndex], properties, options);
  23965. case 'Polygon':
  23966. if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;
  23967. if (coordIndex < 0) coordIndex = coords[geometryIndex].length + coordIndex;
  23968. return _turf_helpers_main_es_point(coords[geometryIndex][coordIndex], properties, options);
  23969. case 'MultiLineString':
  23970. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  23971. if (coordIndex < 0) coordIndex = coords[multiFeatureIndex].length + coordIndex;
  23972. return _turf_helpers_main_es_point(coords[multiFeatureIndex][coordIndex], properties, options);
  23973. case 'MultiPolygon':
  23974. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  23975. if (geometryIndex < 0) geometryIndex = coords[multiFeatureIndex].length + geometryIndex;
  23976. if (coordIndex < 0) coordIndex = coords[multiFeatureIndex][geometryIndex].length - coordIndex;
  23977. return _turf_helpers_main_es_point(coords[multiFeatureIndex][geometryIndex][coordIndex], properties, options);
  23978. }
  23979. throw new Error('geojson is invalid');
  23980. }
  23981. // CONCATENATED MODULE: ./node_modules/@turf/center/node_modules/@turf/bbox/main.es.js
  23982. /**
  23983. * Takes a set of features, calculates the bbox of all input features, and returns a bounding box.
  23984. *
  23985. * @name bbox
  23986. * @param {GeoJSON} geojson any GeoJSON object
  23987. * @returns {BBox} bbox extent in [minX, minY, maxX, maxY] order
  23988. * @example
  23989. * var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]]);
  23990. * var bbox = turf.bbox(line);
  23991. * var bboxPolygon = turf.bboxPolygon(bbox);
  23992. *
  23993. * //addToMap
  23994. * var addToMap = [line, bboxPolygon]
  23995. */
  23996. function bbox_main_es_bbox(geojson) {
  23997. var BBox = [Infinity, Infinity, -Infinity, -Infinity];
  23998. main_es_coordEach(geojson, function (coord) {
  23999. if (BBox[0] > coord[0]) BBox[0] = coord[0];
  24000. if (BBox[1] > coord[1]) BBox[1] = coord[1];
  24001. if (BBox[2] < coord[0]) BBox[2] = coord[0];
  24002. if (BBox[3] < coord[1]) BBox[3] = coord[1];
  24003. });
  24004. return BBox;
  24005. }
  24006. /* harmony default export */ var bbox_main_es = (bbox_main_es_bbox);
  24007. // CONCATENATED MODULE: ./node_modules/@turf/center/main.es.js
  24008. /**
  24009. * Takes a {@link Feature} or {@link FeatureCollection} and returns the absolute center point of all features.
  24010. *
  24011. * @name center
  24012. * @param {GeoJSON} geojson GeoJSON to be centered
  24013. * @param {Object} [options={}] Optional parameters
  24014. * @param {Object} [options.properties={}] an Object that is used as the {@link Feature}'s properties
  24015. * @returns {Feature<Point>} a Point feature at the absolute center point of all input features
  24016. * @example
  24017. * var features = turf.featureCollection([
  24018. * turf.point( [-97.522259, 35.4691]),
  24019. * turf.point( [-97.502754, 35.463455]),
  24020. * turf.point( [-97.508269, 35.463245])
  24021. * ]);
  24022. *
  24023. * var center = turf.center(features);
  24024. *
  24025. * //addToMap
  24026. * var addToMap = [features, center]
  24027. * center.properties['marker-size'] = 'large';
  24028. * center.properties['marker-color'] = '#000';
  24029. */
  24030. function main_es_center(geojson, options) {
  24031. // Optional parameters
  24032. options = options || {};
  24033. if (!helpers_main_es_isObject(options)) throw new Error('options is invalid');
  24034. var properties = options.properties; // Input validation
  24035. if (!geojson) throw new Error('geojson is required');
  24036. var ext = bbox_main_es(geojson);
  24037. var x = (ext[0] + ext[2]) / 2;
  24038. var y = (ext[1] + ext[3]) / 2;
  24039. return _turf_helpers_main_es_point([x, y], properties);
  24040. }
  24041. /* harmony default export */ var center_main_es = (main_es_center);
  24042. // CONCATENATED MODULE: ./node_modules/@turf/centroid/node_modules/@turf/helpers/main.es.js
  24043. /**
  24044. * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.
  24045. */
  24046. var _turf_helpers_main_es_earthRadius = 6371008.8;
  24047. /**
  24048. * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.
  24049. */
  24050. var _turf_helpers_main_es_factors = {
  24051. meters: _turf_helpers_main_es_earthRadius,
  24052. metres: _turf_helpers_main_es_earthRadius,
  24053. millimeters: _turf_helpers_main_es_earthRadius * 1000,
  24054. millimetres: _turf_helpers_main_es_earthRadius * 1000,
  24055. centimeters: _turf_helpers_main_es_earthRadius * 100,
  24056. centimetres: _turf_helpers_main_es_earthRadius * 100,
  24057. kilometers: _turf_helpers_main_es_earthRadius / 1000,
  24058. kilometres: _turf_helpers_main_es_earthRadius / 1000,
  24059. miles: _turf_helpers_main_es_earthRadius / 1609.344,
  24060. nauticalmiles: _turf_helpers_main_es_earthRadius / 1852,
  24061. inches: _turf_helpers_main_es_earthRadius * 39.370,
  24062. yards: _turf_helpers_main_es_earthRadius / 1.0936,
  24063. feet: _turf_helpers_main_es_earthRadius * 3.28084,
  24064. radians: 1,
  24065. degrees: _turf_helpers_main_es_earthRadius / 111325
  24066. };
  24067. /**
  24068. * Units of measurement factors based on 1 meter.
  24069. */
  24070. var _turf_helpers_main_es_unitsFactors = {
  24071. meters: 1,
  24072. metres: 1,
  24073. millimeters: 1000,
  24074. millimetres: 1000,
  24075. centimeters: 100,
  24076. centimetres: 100,
  24077. kilometers: 1 / 1000,
  24078. kilometres: 1 / 1000,
  24079. miles: 1 / 1609.344,
  24080. nauticalmiles: 1 / 1852,
  24081. inches: 39.370,
  24082. yards: 1 / 1.0936,
  24083. feet: 3.28084,
  24084. radians: 1 / _turf_helpers_main_es_earthRadius,
  24085. degrees: 1 / 111325
  24086. };
  24087. /**
  24088. * Area of measurement factors based on 1 square meter.
  24089. */
  24090. var _turf_helpers_main_es_areaFactors = {
  24091. meters: 1,
  24092. metres: 1,
  24093. millimeters: 1000000,
  24094. millimetres: 1000000,
  24095. centimeters: 10000,
  24096. centimetres: 10000,
  24097. kilometers: 0.000001,
  24098. kilometres: 0.000001,
  24099. acres: 0.000247105,
  24100. miles: 3.86e-7,
  24101. yards: 1.195990046,
  24102. feet: 10.763910417,
  24103. inches: 1550.003100006
  24104. };
  24105. /**
  24106. * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.
  24107. *
  24108. * @name feature
  24109. * @param {Geometry} geometry input geometry
  24110. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  24111. * @param {Object} [options={}] Optional Parameters
  24112. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  24113. * @param {string|number} [options.id] Identifier associated with the Feature
  24114. * @returns {Feature} a GeoJSON Feature
  24115. * @example
  24116. * var geometry = {
  24117. * "type": "Point",
  24118. * "coordinates": [110, 50]
  24119. * };
  24120. *
  24121. * var feature = turf.feature(geometry);
  24122. *
  24123. * //=feature
  24124. */
  24125. function node_modules_turf_helpers_main_es_feature(geometry, properties, options) {
  24126. // Optional Parameters
  24127. options = options || {};
  24128. if (!_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  24129. var bbox = options.bbox;
  24130. var id = options.id; // Validation
  24131. if (geometry === undefined) throw new Error('geometry is required');
  24132. if (properties && properties.constructor !== Object) throw new Error('properties must be an Object');
  24133. if (bbox) _turf_helpers_main_es_validateBBox(bbox);
  24134. if (id) _turf_helpers_main_es_validateId(id); // Main
  24135. var feat = {
  24136. type: 'Feature'
  24137. };
  24138. if (id) feat.id = id;
  24139. if (bbox) feat.bbox = bbox;
  24140. feat.properties = properties || {};
  24141. feat.geometry = geometry;
  24142. return feat;
  24143. }
  24144. /**
  24145. * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.
  24146. * For GeometryCollection type use `helpers.geometryCollection`
  24147. *
  24148. * @name geometry
  24149. * @param {string} type Geometry Type
  24150. * @param {Array<number>} coordinates Coordinates
  24151. * @param {Object} [options={}] Optional Parameters
  24152. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Geometry
  24153. * @returns {Geometry} a GeoJSON Geometry
  24154. * @example
  24155. * var type = 'Point';
  24156. * var coordinates = [110, 50];
  24157. *
  24158. * var geometry = turf.geometry(type, coordinates);
  24159. *
  24160. * //=geometry
  24161. */
  24162. function node_modules_turf_helpers_main_es_geometry(type, coordinates, options) {
  24163. // Optional Parameters
  24164. options = options || {};
  24165. if (!_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  24166. var bbox = options.bbox; // Validation
  24167. if (!type) throw new Error('type is required');
  24168. if (!coordinates) throw new Error('coordinates is required');
  24169. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  24170. if (bbox) _turf_helpers_main_es_validateBBox(bbox); // Main
  24171. var geom;
  24172. switch (type) {
  24173. case 'Point':
  24174. geom = node_modules_turf_helpers_main_es_point(coordinates).geometry;
  24175. break;
  24176. case 'LineString':
  24177. geom = _turf_helpers_main_es_lineString(coordinates).geometry;
  24178. break;
  24179. case 'Polygon':
  24180. geom = _turf_helpers_main_es_polygon(coordinates).geometry;
  24181. break;
  24182. case 'MultiPoint':
  24183. geom = _turf_helpers_main_es_multiPoint(coordinates).geometry;
  24184. break;
  24185. case 'MultiLineString':
  24186. geom = _turf_helpers_main_es_multiLineString(coordinates).geometry;
  24187. break;
  24188. case 'MultiPolygon':
  24189. geom = _turf_helpers_main_es_multiPolygon(coordinates).geometry;
  24190. break;
  24191. default:
  24192. throw new Error(type + ' is invalid');
  24193. }
  24194. if (bbox) geom.bbox = bbox;
  24195. return geom;
  24196. }
  24197. /**
  24198. * Creates a {@link Point} {@link Feature} from a Position.
  24199. *
  24200. * @name point
  24201. * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)
  24202. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  24203. * @param {Object} [options={}] Optional Parameters
  24204. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  24205. * @param {string|number} [options.id] Identifier associated with the Feature
  24206. * @returns {Feature<Point>} a Point feature
  24207. * @example
  24208. * var point = turf.point([-75.343, 39.984]);
  24209. *
  24210. * //=point
  24211. */
  24212. function node_modules_turf_helpers_main_es_point(coordinates, properties, options) {
  24213. if (!coordinates) throw new Error('coordinates is required');
  24214. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  24215. if (coordinates.length < 2) throw new Error('coordinates must be at least 2 numbers long');
  24216. if (!_turf_helpers_main_es_isNumber(coordinates[0]) || !_turf_helpers_main_es_isNumber(coordinates[1])) throw new Error('coordinates must contain numbers');
  24217. return node_modules_turf_helpers_main_es_feature({
  24218. type: 'Point',
  24219. coordinates: coordinates
  24220. }, properties, options);
  24221. }
  24222. /**
  24223. * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.
  24224. *
  24225. * @name points
  24226. * @param {Array<Array<number>>} coordinates an array of Points
  24227. * @param {Object} [properties={}] Translate these properties to each Feature
  24228. * @param {Object} [options={}] Optional Parameters
  24229. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  24230. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  24231. * @returns {FeatureCollection<Point>} Point Feature
  24232. * @example
  24233. * var points = turf.points([
  24234. * [-75, 39],
  24235. * [-80, 45],
  24236. * [-78, 50]
  24237. * ]);
  24238. *
  24239. * //=points
  24240. */
  24241. function _turf_helpers_main_es_points(coordinates, properties, options) {
  24242. if (!coordinates) throw new Error('coordinates is required');
  24243. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  24244. return _turf_helpers_main_es_featureCollection(coordinates.map(function (coords) {
  24245. return node_modules_turf_helpers_main_es_point(coords, properties);
  24246. }), options);
  24247. }
  24248. /**
  24249. * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.
  24250. *
  24251. * @name polygon
  24252. * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings
  24253. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  24254. * @param {Object} [options={}] Optional Parameters
  24255. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  24256. * @param {string|number} [options.id] Identifier associated with the Feature
  24257. * @returns {Feature<Polygon>} Polygon Feature
  24258. * @example
  24259. * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });
  24260. *
  24261. * //=polygon
  24262. */
  24263. function _turf_helpers_main_es_polygon(coordinates, properties, options) {
  24264. if (!coordinates) throw new Error('coordinates is required');
  24265. for (var i = 0; i < coordinates.length; i++) {
  24266. var ring = coordinates[i];
  24267. if (ring.length < 4) {
  24268. throw new Error('Each LinearRing of a Polygon must have 4 or more Positions.');
  24269. }
  24270. for (var j = 0; j < ring[ring.length - 1].length; j++) {
  24271. // Check if first point of Polygon contains two numbers
  24272. if (i === 0 && j === 0 && !_turf_helpers_main_es_isNumber(ring[0][0]) || !_turf_helpers_main_es_isNumber(ring[0][1])) throw new Error('coordinates must contain numbers');
  24273. if (ring[ring.length - 1][j] !== ring[0][j]) {
  24274. throw new Error('First and last Position are not equivalent.');
  24275. }
  24276. }
  24277. }
  24278. return node_modules_turf_helpers_main_es_feature({
  24279. type: 'Polygon',
  24280. coordinates: coordinates
  24281. }, properties, options);
  24282. }
  24283. /**
  24284. * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.
  24285. *
  24286. * @name polygons
  24287. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates
  24288. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  24289. * @param {Object} [options={}] Optional Parameters
  24290. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  24291. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  24292. * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection
  24293. * @example
  24294. * var polygons = turf.polygons([
  24295. * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],
  24296. * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],
  24297. * ]);
  24298. *
  24299. * //=polygons
  24300. */
  24301. function _turf_helpers_main_es_polygons(coordinates, properties, options) {
  24302. if (!coordinates) throw new Error('coordinates is required');
  24303. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  24304. return _turf_helpers_main_es_featureCollection(coordinates.map(function (coords) {
  24305. return _turf_helpers_main_es_polygon(coords, properties);
  24306. }), options);
  24307. }
  24308. /**
  24309. * Creates a {@link LineString} {@link Feature} from an Array of Positions.
  24310. *
  24311. * @name lineString
  24312. * @param {Array<Array<number>>} coordinates an array of Positions
  24313. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  24314. * @param {Object} [options={}] Optional Parameters
  24315. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  24316. * @param {string|number} [options.id] Identifier associated with the Feature
  24317. * @returns {Feature<LineString>} LineString Feature
  24318. * @example
  24319. * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});
  24320. * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});
  24321. *
  24322. * //=linestring1
  24323. * //=linestring2
  24324. */
  24325. function _turf_helpers_main_es_lineString(coordinates, properties, options) {
  24326. if (!coordinates) throw new Error('coordinates is required');
  24327. if (coordinates.length < 2) throw new Error('coordinates must be an array of two or more positions'); // Check if first point of LineString contains two numbers
  24328. if (!_turf_helpers_main_es_isNumber(coordinates[0][1]) || !_turf_helpers_main_es_isNumber(coordinates[0][1])) throw new Error('coordinates must contain numbers');
  24329. return node_modules_turf_helpers_main_es_feature({
  24330. type: 'LineString',
  24331. coordinates: coordinates
  24332. }, properties, options);
  24333. }
  24334. /**
  24335. * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.
  24336. *
  24337. * @name lineStrings
  24338. * @param {Array<Array<number>>} coordinates an array of LinearRings
  24339. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  24340. * @param {Object} [options={}] Optional Parameters
  24341. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  24342. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  24343. * @returns {FeatureCollection<LineString>} LineString FeatureCollection
  24344. * @example
  24345. * var linestrings = turf.lineStrings([
  24346. * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],
  24347. * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]
  24348. * ]);
  24349. *
  24350. * //=linestrings
  24351. */
  24352. function _turf_helpers_main_es_lineStrings(coordinates, properties, options) {
  24353. if (!coordinates) throw new Error('coordinates is required');
  24354. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  24355. return _turf_helpers_main_es_featureCollection(coordinates.map(function (coords) {
  24356. return _turf_helpers_main_es_lineString(coords, properties);
  24357. }), options);
  24358. }
  24359. /**
  24360. * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.
  24361. *
  24362. * @name featureCollection
  24363. * @param {Feature[]} features input features
  24364. * @param {Object} [options={}] Optional Parameters
  24365. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  24366. * @param {string|number} [options.id] Identifier associated with the Feature
  24367. * @returns {FeatureCollection} FeatureCollection of Features
  24368. * @example
  24369. * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});
  24370. * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});
  24371. * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});
  24372. *
  24373. * var collection = turf.featureCollection([
  24374. * locationA,
  24375. * locationB,
  24376. * locationC
  24377. * ]);
  24378. *
  24379. * //=collection
  24380. */
  24381. function _turf_helpers_main_es_featureCollection(features, options) {
  24382. // Optional Parameters
  24383. options = options || {};
  24384. if (!_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  24385. var bbox = options.bbox;
  24386. var id = options.id; // Validation
  24387. if (!features) throw new Error('No features passed');
  24388. if (!Array.isArray(features)) throw new Error('features must be an Array');
  24389. if (bbox) _turf_helpers_main_es_validateBBox(bbox);
  24390. if (id) _turf_helpers_main_es_validateId(id); // Main
  24391. var fc = {
  24392. type: 'FeatureCollection'
  24393. };
  24394. if (id) fc.id = id;
  24395. if (bbox) fc.bbox = bbox;
  24396. fc.features = features;
  24397. return fc;
  24398. }
  24399. /**
  24400. * Creates a {@link Feature<MultiLineString>} based on a
  24401. * coordinate array. Properties can be added optionally.
  24402. *
  24403. * @name multiLineString
  24404. * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings
  24405. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  24406. * @param {Object} [options={}] Optional Parameters
  24407. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  24408. * @param {string|number} [options.id] Identifier associated with the Feature
  24409. * @returns {Feature<MultiLineString>} a MultiLineString feature
  24410. * @throws {Error} if no coordinates are passed
  24411. * @example
  24412. * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);
  24413. *
  24414. * //=multiLine
  24415. */
  24416. function _turf_helpers_main_es_multiLineString(coordinates, properties, options) {
  24417. if (!coordinates) throw new Error('coordinates is required');
  24418. return node_modules_turf_helpers_main_es_feature({
  24419. type: 'MultiLineString',
  24420. coordinates: coordinates
  24421. }, properties, options);
  24422. }
  24423. /**
  24424. * Creates a {@link Feature<MultiPoint>} based on a
  24425. * coordinate array. Properties can be added optionally.
  24426. *
  24427. * @name multiPoint
  24428. * @param {Array<Array<number>>} coordinates an array of Positions
  24429. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  24430. * @param {Object} [options={}] Optional Parameters
  24431. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  24432. * @param {string|number} [options.id] Identifier associated with the Feature
  24433. * @returns {Feature<MultiPoint>} a MultiPoint feature
  24434. * @throws {Error} if no coordinates are passed
  24435. * @example
  24436. * var multiPt = turf.multiPoint([[0,0],[10,10]]);
  24437. *
  24438. * //=multiPt
  24439. */
  24440. function _turf_helpers_main_es_multiPoint(coordinates, properties, options) {
  24441. if (!coordinates) throw new Error('coordinates is required');
  24442. return node_modules_turf_helpers_main_es_feature({
  24443. type: 'MultiPoint',
  24444. coordinates: coordinates
  24445. }, properties, options);
  24446. }
  24447. /**
  24448. * Creates a {@link Feature<MultiPolygon>} based on a
  24449. * coordinate array. Properties can be added optionally.
  24450. *
  24451. * @name multiPolygon
  24452. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons
  24453. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  24454. * @param {Object} [options={}] Optional Parameters
  24455. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  24456. * @param {string|number} [options.id] Identifier associated with the Feature
  24457. * @returns {Feature<MultiPolygon>} a multipolygon feature
  24458. * @throws {Error} if no coordinates are passed
  24459. * @example
  24460. * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);
  24461. *
  24462. * //=multiPoly
  24463. *
  24464. */
  24465. function _turf_helpers_main_es_multiPolygon(coordinates, properties, options) {
  24466. if (!coordinates) throw new Error('coordinates is required');
  24467. return node_modules_turf_helpers_main_es_feature({
  24468. type: 'MultiPolygon',
  24469. coordinates: coordinates
  24470. }, properties, options);
  24471. }
  24472. /**
  24473. * Creates a {@link Feature<GeometryCollection>} based on a
  24474. * coordinate array. Properties can be added optionally.
  24475. *
  24476. * @name geometryCollection
  24477. * @param {Array<Geometry>} geometries an array of GeoJSON Geometries
  24478. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  24479. * @param {Object} [options={}] Optional Parameters
  24480. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  24481. * @param {string|number} [options.id] Identifier associated with the Feature
  24482. * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature
  24483. * @example
  24484. * var pt = {
  24485. * "type": "Point",
  24486. * "coordinates": [100, 0]
  24487. * };
  24488. * var line = {
  24489. * "type": "LineString",
  24490. * "coordinates": [ [101, 0], [102, 1] ]
  24491. * };
  24492. * var collection = turf.geometryCollection([pt, line]);
  24493. *
  24494. * //=collection
  24495. */
  24496. function _turf_helpers_main_es_geometryCollection(geometries, properties, options) {
  24497. if (!geometries) throw new Error('geometries is required');
  24498. if (!Array.isArray(geometries)) throw new Error('geometries must be an Array');
  24499. return node_modules_turf_helpers_main_es_feature({
  24500. type: 'GeometryCollection',
  24501. geometries: geometries
  24502. }, properties, options);
  24503. }
  24504. /**
  24505. * Round number to precision
  24506. *
  24507. * @param {number} num Number
  24508. * @param {number} [precision=0] Precision
  24509. * @returns {number} rounded number
  24510. * @example
  24511. * turf.round(120.4321)
  24512. * //=120
  24513. *
  24514. * turf.round(120.4321, 2)
  24515. * //=120.43
  24516. */
  24517. function _turf_helpers_main_es_round(num, precision) {
  24518. if (num === undefined || num === null || isNaN(num)) throw new Error('num is required');
  24519. if (precision && !(precision >= 0)) throw new Error('precision must be a positive number');
  24520. var multiplier = Math.pow(10, precision || 0);
  24521. return Math.round(num * multiplier) / multiplier;
  24522. }
  24523. /**
  24524. * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.
  24525. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  24526. *
  24527. * @name radiansToLength
  24528. * @param {number} radians in radians across the sphere
  24529. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  24530. * @returns {number} distance
  24531. */
  24532. function _turf_helpers_main_es_radiansToLength(radians, units) {
  24533. if (radians === undefined || radians === null) throw new Error('radians is required');
  24534. if (units && typeof units !== 'string') throw new Error('units must be a string');
  24535. var factor = _turf_helpers_main_es_factors[units || 'kilometers'];
  24536. if (!factor) throw new Error(units + ' units is invalid');
  24537. return radians * factor;
  24538. }
  24539. /**
  24540. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians
  24541. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  24542. *
  24543. * @name lengthToRadians
  24544. * @param {number} distance in real units
  24545. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  24546. * @returns {number} radians
  24547. */
  24548. function _turf_helpers_main_es_lengthToRadians(distance, units) {
  24549. if (distance === undefined || distance === null) throw new Error('distance is required');
  24550. if (units && typeof units !== 'string') throw new Error('units must be a string');
  24551. var factor = _turf_helpers_main_es_factors[units || 'kilometers'];
  24552. if (!factor) throw new Error(units + ' units is invalid');
  24553. return distance / factor;
  24554. }
  24555. /**
  24556. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees
  24557. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet
  24558. *
  24559. * @name lengthToDegrees
  24560. * @param {number} distance in real units
  24561. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  24562. * @returns {number} degrees
  24563. */
  24564. function _turf_helpers_main_es_lengthToDegrees(distance, units) {
  24565. return _turf_helpers_main_es_radiansToDegrees(_turf_helpers_main_es_lengthToRadians(distance, units));
  24566. }
  24567. /**
  24568. * Converts any bearing angle from the north line direction (positive clockwise)
  24569. * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line
  24570. *
  24571. * @name bearingToAzimuth
  24572. * @param {number} bearing angle, between -180 and +180 degrees
  24573. * @returns {number} angle between 0 and 360 degrees
  24574. */
  24575. function _turf_helpers_main_es_bearingToAzimuth(bearing) {
  24576. if (bearing === null || bearing === undefined) throw new Error('bearing is required');
  24577. var angle = bearing % 360;
  24578. if (angle < 0) angle += 360;
  24579. return angle;
  24580. }
  24581. /**
  24582. * Converts an angle in radians to degrees
  24583. *
  24584. * @name radiansToDegrees
  24585. * @param {number} radians angle in radians
  24586. * @returns {number} degrees between 0 and 360 degrees
  24587. */
  24588. function _turf_helpers_main_es_radiansToDegrees(radians) {
  24589. if (radians === null || radians === undefined) throw new Error('radians is required');
  24590. var degrees = radians % (2 * Math.PI);
  24591. return degrees * 180 / Math.PI;
  24592. }
  24593. /**
  24594. * Converts an angle in degrees to radians
  24595. *
  24596. * @name degreesToRadians
  24597. * @param {number} degrees angle between 0 and 360 degrees
  24598. * @returns {number} angle in radians
  24599. */
  24600. function _turf_helpers_main_es_degreesToRadians(degrees) {
  24601. if (degrees === null || degrees === undefined) throw new Error('degrees is required');
  24602. var radians = degrees % 360;
  24603. return radians * Math.PI / 180;
  24604. }
  24605. /**
  24606. * Converts a length to the requested unit.
  24607. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  24608. *
  24609. * @param {number} length to be converted
  24610. * @param {string} originalUnit of the length
  24611. * @param {string} [finalUnit='kilometers'] returned unit
  24612. * @returns {number} the converted length
  24613. */
  24614. function _turf_helpers_main_es_convertLength(length, originalUnit, finalUnit) {
  24615. if (length === null || length === undefined) throw new Error('length is required');
  24616. if (!(length >= 0)) throw new Error('length must be a positive number');
  24617. return _turf_helpers_main_es_radiansToLength(_turf_helpers_main_es_lengthToRadians(length, originalUnit), finalUnit || 'kilometers');
  24618. }
  24619. /**
  24620. * Converts a area to the requested unit.
  24621. * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches
  24622. * @param {number} area to be converted
  24623. * @param {string} [originalUnit='meters'] of the distance
  24624. * @param {string} [finalUnit='kilometers'] returned unit
  24625. * @returns {number} the converted distance
  24626. */
  24627. function _turf_helpers_main_es_convertArea(area, originalUnit, finalUnit) {
  24628. if (area === null || area === undefined) throw new Error('area is required');
  24629. if (!(area >= 0)) throw new Error('area must be a positive number');
  24630. var startFactor = _turf_helpers_main_es_areaFactors[originalUnit || 'meters'];
  24631. if (!startFactor) throw new Error('invalid original units');
  24632. var finalFactor = _turf_helpers_main_es_areaFactors[finalUnit || 'kilometers'];
  24633. if (!finalFactor) throw new Error('invalid final units');
  24634. return area / startFactor * finalFactor;
  24635. }
  24636. /**
  24637. * isNumber
  24638. *
  24639. * @param {*} num Number to validate
  24640. * @returns {boolean} true/false
  24641. * @example
  24642. * turf.isNumber(123)
  24643. * //=true
  24644. * turf.isNumber('foo')
  24645. * //=false
  24646. */
  24647. function _turf_helpers_main_es_isNumber(num) {
  24648. return !isNaN(num) && num !== null && !Array.isArray(num);
  24649. }
  24650. /**
  24651. * isObject
  24652. *
  24653. * @param {*} input variable to validate
  24654. * @returns {boolean} true/false
  24655. * @example
  24656. * turf.isObject({elevation: 10})
  24657. * //=true
  24658. * turf.isObject('foo')
  24659. * //=false
  24660. */
  24661. function _turf_helpers_main_es_isObject(input) {
  24662. return !!input && input.constructor === Object;
  24663. }
  24664. /**
  24665. * Validate BBox
  24666. *
  24667. * @private
  24668. * @param {Array<number>} bbox BBox to validate
  24669. * @returns {void}
  24670. * @throws Error if BBox is not valid
  24671. * @example
  24672. * validateBBox([-180, -40, 110, 50])
  24673. * //=OK
  24674. * validateBBox([-180, -40])
  24675. * //=Error
  24676. * validateBBox('Foo')
  24677. * //=Error
  24678. * validateBBox(5)
  24679. * //=Error
  24680. * validateBBox(null)
  24681. * //=Error
  24682. * validateBBox(undefined)
  24683. * //=Error
  24684. */
  24685. function _turf_helpers_main_es_validateBBox(bbox) {
  24686. if (!bbox) throw new Error('bbox is required');
  24687. if (!Array.isArray(bbox)) throw new Error('bbox must be an Array');
  24688. if (bbox.length !== 4 && bbox.length !== 6) throw new Error('bbox must be an Array of 4 or 6 numbers');
  24689. bbox.forEach(function (num) {
  24690. if (!_turf_helpers_main_es_isNumber(num)) throw new Error('bbox must only contain numbers');
  24691. });
  24692. }
  24693. /**
  24694. * Validate Id
  24695. *
  24696. * @private
  24697. * @param {string|number} id Id to validate
  24698. * @returns {void}
  24699. * @throws Error if Id is not valid
  24700. * @example
  24701. * validateId([-180, -40, 110, 50])
  24702. * //=Error
  24703. * validateId([-180, -40])
  24704. * //=Error
  24705. * validateId('Foo')
  24706. * //=OK
  24707. * validateId(5)
  24708. * //=OK
  24709. * validateId(null)
  24710. * //=Error
  24711. * validateId(undefined)
  24712. * //=Error
  24713. */
  24714. function _turf_helpers_main_es_validateId(id) {
  24715. if (!id) throw new Error('id is required');
  24716. if (['string', 'number'].indexOf(typeof id) === -1) throw new Error('id must be a number or a string');
  24717. } // Deprecated methods
  24718. function _turf_helpers_main_es_radians2degrees() {
  24719. throw new Error('method has been renamed to `radiansToDegrees`');
  24720. }
  24721. function _turf_helpers_main_es_degrees2radians() {
  24722. throw new Error('method has been renamed to `degreesToRadians`');
  24723. }
  24724. function _turf_helpers_main_es_distanceToDegrees() {
  24725. throw new Error('method has been renamed to `lengthToDegrees`');
  24726. }
  24727. function _turf_helpers_main_es_distanceToRadians() {
  24728. throw new Error('method has been renamed to `lengthToRadians`');
  24729. }
  24730. function _turf_helpers_main_es_radiansToDistance() {
  24731. throw new Error('method has been renamed to `radiansToLength`');
  24732. }
  24733. function _turf_helpers_main_es_bearingToAngle() {
  24734. throw new Error('method has been renamed to `bearingToAzimuth`');
  24735. }
  24736. function _turf_helpers_main_es_convertDistance() {
  24737. throw new Error('method has been renamed to `convertLength`');
  24738. }
  24739. // CONCATENATED MODULE: ./node_modules/@turf/centroid/node_modules/@turf/meta/main.es.js
  24740. /**
  24741. * Callback for coordEach
  24742. *
  24743. * @callback coordEachCallback
  24744. * @param {Array<number>} currentCoord The current coordinate being processed.
  24745. * @param {number} coordIndex The current index of the coordinate being processed.
  24746. * @param {number} featureIndex The current index of the Feature being processed.
  24747. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  24748. * @param {number} geometryIndex The current index of the Geometry being processed.
  24749. */
  24750. /**
  24751. * Iterate over coordinates in any GeoJSON object, similar to Array.forEach()
  24752. *
  24753. * @name coordEach
  24754. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  24755. * @param {Function} callback a method that takes (currentCoord, coordIndex, featureIndex, multiFeatureIndex)
  24756. * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.
  24757. * @returns {void}
  24758. * @example
  24759. * var features = turf.featureCollection([
  24760. * turf.point([26, 37], {"foo": "bar"}),
  24761. * turf.point([36, 53], {"hello": "world"})
  24762. * ]);
  24763. *
  24764. * turf.coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  24765. * //=currentCoord
  24766. * //=coordIndex
  24767. * //=featureIndex
  24768. * //=multiFeatureIndex
  24769. * //=geometryIndex
  24770. * });
  24771. */
  24772. function meta_main_es_coordEach(geojson, callback, excludeWrapCoord) {
  24773. // Handles null Geometry -- Skips this GeoJSON
  24774. if (geojson === null) return;
  24775. var j,
  24776. k,
  24777. l,
  24778. geometry,
  24779. stopG,
  24780. coords,
  24781. geometryMaybeCollection,
  24782. wrapShrink = 0,
  24783. coordIndex = 0,
  24784. isGeometryCollection,
  24785. type = geojson.type,
  24786. isFeatureCollection = type === 'FeatureCollection',
  24787. isFeature = type === 'Feature',
  24788. stop = isFeatureCollection ? geojson.features.length : 1; // This logic may look a little weird. The reason why it is that way
  24789. // is because it's trying to be fast. GeoJSON supports multiple kinds
  24790. // of objects at its root: FeatureCollection, Features, Geometries.
  24791. // This function has the responsibility of handling all of them, and that
  24792. // means that some of the `for` loops you see below actually just don't apply
  24793. // to certain inputs. For instance, if you give this just a
  24794. // Point geometry, then both loops are short-circuited and all we do
  24795. // is gradually rename the input until it's called 'geometry'.
  24796. //
  24797. // This also aims to allocate as few resources as possible: just a
  24798. // few numbers and booleans, rather than any temporary arrays as would
  24799. // be required with the normalization approach.
  24800. for (var featureIndex = 0; featureIndex < stop; featureIndex++) {
  24801. geometryMaybeCollection = isFeatureCollection ? geojson.features[featureIndex].geometry : isFeature ? geojson.geometry : geojson;
  24802. isGeometryCollection = geometryMaybeCollection ? geometryMaybeCollection.type === 'GeometryCollection' : false;
  24803. stopG = isGeometryCollection ? geometryMaybeCollection.geometries.length : 1;
  24804. for (var geomIndex = 0; geomIndex < stopG; geomIndex++) {
  24805. var multiFeatureIndex = 0;
  24806. var geometryIndex = 0;
  24807. geometry = isGeometryCollection ? geometryMaybeCollection.geometries[geomIndex] : geometryMaybeCollection; // Handles null Geometry -- Skips this geometry
  24808. if (geometry === null) continue;
  24809. coords = geometry.coordinates;
  24810. var geomType = geometry.type;
  24811. wrapShrink = excludeWrapCoord && (geomType === 'Polygon' || geomType === 'MultiPolygon') ? 1 : 0;
  24812. switch (geomType) {
  24813. case null:
  24814. break;
  24815. case 'Point':
  24816. if (callback(coords, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  24817. coordIndex++;
  24818. multiFeatureIndex++;
  24819. break;
  24820. case 'LineString':
  24821. case 'MultiPoint':
  24822. for (j = 0; j < coords.length; j++) {
  24823. if (callback(coords[j], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  24824. coordIndex++;
  24825. if (geomType === 'MultiPoint') multiFeatureIndex++;
  24826. }
  24827. if (geomType === 'LineString') multiFeatureIndex++;
  24828. break;
  24829. case 'Polygon':
  24830. case 'MultiLineString':
  24831. for (j = 0; j < coords.length; j++) {
  24832. for (k = 0; k < coords[j].length - wrapShrink; k++) {
  24833. if (callback(coords[j][k], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  24834. coordIndex++;
  24835. }
  24836. if (geomType === 'MultiLineString') multiFeatureIndex++;
  24837. if (geomType === 'Polygon') geometryIndex++;
  24838. }
  24839. if (geomType === 'Polygon') multiFeatureIndex++;
  24840. break;
  24841. case 'MultiPolygon':
  24842. for (j = 0; j < coords.length; j++) {
  24843. if (geomType === 'MultiPolygon') geometryIndex = 0;
  24844. for (k = 0; k < coords[j].length; k++) {
  24845. for (l = 0; l < coords[j][k].length - wrapShrink; l++) {
  24846. if (callback(coords[j][k][l], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  24847. coordIndex++;
  24848. }
  24849. geometryIndex++;
  24850. }
  24851. multiFeatureIndex++;
  24852. }
  24853. break;
  24854. case 'GeometryCollection':
  24855. for (j = 0; j < geometry.geometries.length; j++) {
  24856. if (meta_main_es_coordEach(geometry.geometries[j], callback, excludeWrapCoord) === false) return false;
  24857. }
  24858. break;
  24859. default:
  24860. throw new Error('Unknown Geometry Type');
  24861. }
  24862. }
  24863. }
  24864. }
  24865. /**
  24866. * Callback for coordReduce
  24867. *
  24868. * The first time the callback function is called, the values provided as arguments depend
  24869. * on whether the reduce method has an initialValue argument.
  24870. *
  24871. * If an initialValue is provided to the reduce method:
  24872. * - The previousValue argument is initialValue.
  24873. * - The currentValue argument is the value of the first element present in the array.
  24874. *
  24875. * If an initialValue is not provided:
  24876. * - The previousValue argument is the value of the first element present in the array.
  24877. * - The currentValue argument is the value of the second element present in the array.
  24878. *
  24879. * @callback coordReduceCallback
  24880. * @param {*} previousValue The accumulated value previously returned in the last invocation
  24881. * of the callback, or initialValue, if supplied.
  24882. * @param {Array<number>} currentCoord The current coordinate being processed.
  24883. * @param {number} coordIndex The current index of the coordinate being processed.
  24884. * Starts at index 0, if an initialValue is provided, and at index 1 otherwise.
  24885. * @param {number} featureIndex The current index of the Feature being processed.
  24886. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  24887. * @param {number} geometryIndex The current index of the Geometry being processed.
  24888. */
  24889. /**
  24890. * Reduce coordinates in any GeoJSON object, similar to Array.reduce()
  24891. *
  24892. * @name coordReduce
  24893. * @param {FeatureCollection|Geometry|Feature} geojson any GeoJSON object
  24894. * @param {Function} callback a method that takes (previousValue, currentCoord, coordIndex)
  24895. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  24896. * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.
  24897. * @returns {*} The value that results from the reduction.
  24898. * @example
  24899. * var features = turf.featureCollection([
  24900. * turf.point([26, 37], {"foo": "bar"}),
  24901. * turf.point([36, 53], {"hello": "world"})
  24902. * ]);
  24903. *
  24904. * turf.coordReduce(features, function (previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  24905. * //=previousValue
  24906. * //=currentCoord
  24907. * //=coordIndex
  24908. * //=featureIndex
  24909. * //=multiFeatureIndex
  24910. * //=geometryIndex
  24911. * return currentCoord;
  24912. * });
  24913. */
  24914. function meta_main_es_coordReduce(geojson, callback, initialValue, excludeWrapCoord) {
  24915. var previousValue = initialValue;
  24916. meta_main_es_coordEach(geojson, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  24917. if (coordIndex === 0 && initialValue === undefined) previousValue = currentCoord;else previousValue = callback(previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex);
  24918. }, excludeWrapCoord);
  24919. return previousValue;
  24920. }
  24921. /**
  24922. * Callback for propEach
  24923. *
  24924. * @callback propEachCallback
  24925. * @param {Object} currentProperties The current Properties being processed.
  24926. * @param {number} featureIndex The current index of the Feature being processed.
  24927. */
  24928. /**
  24929. * Iterate over properties in any GeoJSON object, similar to Array.forEach()
  24930. *
  24931. * @name propEach
  24932. * @param {FeatureCollection|Feature} geojson any GeoJSON object
  24933. * @param {Function} callback a method that takes (currentProperties, featureIndex)
  24934. * @returns {void}
  24935. * @example
  24936. * var features = turf.featureCollection([
  24937. * turf.point([26, 37], {foo: 'bar'}),
  24938. * turf.point([36, 53], {hello: 'world'})
  24939. * ]);
  24940. *
  24941. * turf.propEach(features, function (currentProperties, featureIndex) {
  24942. * //=currentProperties
  24943. * //=featureIndex
  24944. * });
  24945. */
  24946. function meta_main_es_propEach(geojson, callback) {
  24947. var i;
  24948. switch (geojson.type) {
  24949. case 'FeatureCollection':
  24950. for (i = 0; i < geojson.features.length; i++) {
  24951. if (callback(geojson.features[i].properties, i) === false) break;
  24952. }
  24953. break;
  24954. case 'Feature':
  24955. callback(geojson.properties, 0);
  24956. break;
  24957. }
  24958. }
  24959. /**
  24960. * Callback for propReduce
  24961. *
  24962. * The first time the callback function is called, the values provided as arguments depend
  24963. * on whether the reduce method has an initialValue argument.
  24964. *
  24965. * If an initialValue is provided to the reduce method:
  24966. * - The previousValue argument is initialValue.
  24967. * - The currentValue argument is the value of the first element present in the array.
  24968. *
  24969. * If an initialValue is not provided:
  24970. * - The previousValue argument is the value of the first element present in the array.
  24971. * - The currentValue argument is the value of the second element present in the array.
  24972. *
  24973. * @callback propReduceCallback
  24974. * @param {*} previousValue The accumulated value previously returned in the last invocation
  24975. * of the callback, or initialValue, if supplied.
  24976. * @param {*} currentProperties The current Properties being processed.
  24977. * @param {number} featureIndex The current index of the Feature being processed.
  24978. */
  24979. /**
  24980. * Reduce properties in any GeoJSON object into a single value,
  24981. * similar to how Array.reduce works. However, in this case we lazily run
  24982. * the reduction, so an array of all properties is unnecessary.
  24983. *
  24984. * @name propReduce
  24985. * @param {FeatureCollection|Feature} geojson any GeoJSON object
  24986. * @param {Function} callback a method that takes (previousValue, currentProperties, featureIndex)
  24987. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  24988. * @returns {*} The value that results from the reduction.
  24989. * @example
  24990. * var features = turf.featureCollection([
  24991. * turf.point([26, 37], {foo: 'bar'}),
  24992. * turf.point([36, 53], {hello: 'world'})
  24993. * ]);
  24994. *
  24995. * turf.propReduce(features, function (previousValue, currentProperties, featureIndex) {
  24996. * //=previousValue
  24997. * //=currentProperties
  24998. * //=featureIndex
  24999. * return currentProperties
  25000. * });
  25001. */
  25002. function meta_main_es_propReduce(geojson, callback, initialValue) {
  25003. var previousValue = initialValue;
  25004. meta_main_es_propEach(geojson, function (currentProperties, featureIndex) {
  25005. if (featureIndex === 0 && initialValue === undefined) previousValue = currentProperties;else previousValue = callback(previousValue, currentProperties, featureIndex);
  25006. });
  25007. return previousValue;
  25008. }
  25009. /**
  25010. * Callback for featureEach
  25011. *
  25012. * @callback featureEachCallback
  25013. * @param {Feature<any>} currentFeature The current Feature being processed.
  25014. * @param {number} featureIndex The current index of the Feature being processed.
  25015. */
  25016. /**
  25017. * Iterate over features in any GeoJSON object, similar to
  25018. * Array.forEach.
  25019. *
  25020. * @name featureEach
  25021. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  25022. * @param {Function} callback a method that takes (currentFeature, featureIndex)
  25023. * @returns {void}
  25024. * @example
  25025. * var features = turf.featureCollection([
  25026. * turf.point([26, 37], {foo: 'bar'}),
  25027. * turf.point([36, 53], {hello: 'world'})
  25028. * ]);
  25029. *
  25030. * turf.featureEach(features, function (currentFeature, featureIndex) {
  25031. * //=currentFeature
  25032. * //=featureIndex
  25033. * });
  25034. */
  25035. function meta_main_es_featureEach(geojson, callback) {
  25036. if (geojson.type === 'Feature') {
  25037. callback(geojson, 0);
  25038. } else if (geojson.type === 'FeatureCollection') {
  25039. for (var i = 0; i < geojson.features.length; i++) {
  25040. if (callback(geojson.features[i], i) === false) break;
  25041. }
  25042. }
  25043. }
  25044. /**
  25045. * Callback for featureReduce
  25046. *
  25047. * The first time the callback function is called, the values provided as arguments depend
  25048. * on whether the reduce method has an initialValue argument.
  25049. *
  25050. * If an initialValue is provided to the reduce method:
  25051. * - The previousValue argument is initialValue.
  25052. * - The currentValue argument is the value of the first element present in the array.
  25053. *
  25054. * If an initialValue is not provided:
  25055. * - The previousValue argument is the value of the first element present in the array.
  25056. * - The currentValue argument is the value of the second element present in the array.
  25057. *
  25058. * @callback featureReduceCallback
  25059. * @param {*} previousValue The accumulated value previously returned in the last invocation
  25060. * of the callback, or initialValue, if supplied.
  25061. * @param {Feature} currentFeature The current Feature being processed.
  25062. * @param {number} featureIndex The current index of the Feature being processed.
  25063. */
  25064. /**
  25065. * Reduce features in any GeoJSON object, similar to Array.reduce().
  25066. *
  25067. * @name featureReduce
  25068. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  25069. * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex)
  25070. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  25071. * @returns {*} The value that results from the reduction.
  25072. * @example
  25073. * var features = turf.featureCollection([
  25074. * turf.point([26, 37], {"foo": "bar"}),
  25075. * turf.point([36, 53], {"hello": "world"})
  25076. * ]);
  25077. *
  25078. * turf.featureReduce(features, function (previousValue, currentFeature, featureIndex) {
  25079. * //=previousValue
  25080. * //=currentFeature
  25081. * //=featureIndex
  25082. * return currentFeature
  25083. * });
  25084. */
  25085. function meta_main_es_featureReduce(geojson, callback, initialValue) {
  25086. var previousValue = initialValue;
  25087. meta_main_es_featureEach(geojson, function (currentFeature, featureIndex) {
  25088. if (featureIndex === 0 && initialValue === undefined) previousValue = currentFeature;else previousValue = callback(previousValue, currentFeature, featureIndex);
  25089. });
  25090. return previousValue;
  25091. }
  25092. /**
  25093. * Get all coordinates from any GeoJSON object.
  25094. *
  25095. * @name coordAll
  25096. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  25097. * @returns {Array<Array<number>>} coordinate position array
  25098. * @example
  25099. * var features = turf.featureCollection([
  25100. * turf.point([26, 37], {foo: 'bar'}),
  25101. * turf.point([36, 53], {hello: 'world'})
  25102. * ]);
  25103. *
  25104. * var coords = turf.coordAll(features);
  25105. * //= [[26, 37], [36, 53]]
  25106. */
  25107. function meta_main_es_coordAll(geojson) {
  25108. var coords = [];
  25109. meta_main_es_coordEach(geojson, function (coord) {
  25110. coords.push(coord);
  25111. });
  25112. return coords;
  25113. }
  25114. /**
  25115. * Callback for geomEach
  25116. *
  25117. * @callback geomEachCallback
  25118. * @param {Geometry} currentGeometry The current Geometry being processed.
  25119. * @param {number} featureIndex The current index of the Feature being processed.
  25120. * @param {Object} featureProperties The current Feature Properties being processed.
  25121. * @param {Array<number>} featureBBox The current Feature BBox being processed.
  25122. * @param {number|string} featureId The current Feature Id being processed.
  25123. */
  25124. /**
  25125. * Iterate over each geometry in any GeoJSON object, similar to Array.forEach()
  25126. *
  25127. * @name geomEach
  25128. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  25129. * @param {Function} callback a method that takes (currentGeometry, featureIndex, featureProperties, featureBBox, featureId)
  25130. * @returns {void}
  25131. * @example
  25132. * var features = turf.featureCollection([
  25133. * turf.point([26, 37], {foo: 'bar'}),
  25134. * turf.point([36, 53], {hello: 'world'})
  25135. * ]);
  25136. *
  25137. * turf.geomEach(features, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  25138. * //=currentGeometry
  25139. * //=featureIndex
  25140. * //=featureProperties
  25141. * //=featureBBox
  25142. * //=featureId
  25143. * });
  25144. */
  25145. function meta_main_es_geomEach(geojson, callback) {
  25146. var i,
  25147. j,
  25148. g,
  25149. geometry,
  25150. stopG,
  25151. geometryMaybeCollection,
  25152. isGeometryCollection,
  25153. featureProperties,
  25154. featureBBox,
  25155. featureId,
  25156. featureIndex = 0,
  25157. isFeatureCollection = geojson.type === 'FeatureCollection',
  25158. isFeature = geojson.type === 'Feature',
  25159. stop = isFeatureCollection ? geojson.features.length : 1; // This logic may look a little weird. The reason why it is that way
  25160. // is because it's trying to be fast. GeoJSON supports multiple kinds
  25161. // of objects at its root: FeatureCollection, Features, Geometries.
  25162. // This function has the responsibility of handling all of them, and that
  25163. // means that some of the `for` loops you see below actually just don't apply
  25164. // to certain inputs. For instance, if you give this just a
  25165. // Point geometry, then both loops are short-circuited and all we do
  25166. // is gradually rename the input until it's called 'geometry'.
  25167. //
  25168. // This also aims to allocate as few resources as possible: just a
  25169. // few numbers and booleans, rather than any temporary arrays as would
  25170. // be required with the normalization approach.
  25171. for (i = 0; i < stop; i++) {
  25172. geometryMaybeCollection = isFeatureCollection ? geojson.features[i].geometry : isFeature ? geojson.geometry : geojson;
  25173. featureProperties = isFeatureCollection ? geojson.features[i].properties : isFeature ? geojson.properties : {};
  25174. featureBBox = isFeatureCollection ? geojson.features[i].bbox : isFeature ? geojson.bbox : undefined;
  25175. featureId = isFeatureCollection ? geojson.features[i].id : isFeature ? geojson.id : undefined;
  25176. isGeometryCollection = geometryMaybeCollection ? geometryMaybeCollection.type === 'GeometryCollection' : false;
  25177. stopG = isGeometryCollection ? geometryMaybeCollection.geometries.length : 1;
  25178. for (g = 0; g < stopG; g++) {
  25179. geometry = isGeometryCollection ? geometryMaybeCollection.geometries[g] : geometryMaybeCollection; // Handle null Geometry
  25180. if (geometry === null) {
  25181. if (callback(null, featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  25182. continue;
  25183. }
  25184. switch (geometry.type) {
  25185. case 'Point':
  25186. case 'LineString':
  25187. case 'MultiPoint':
  25188. case 'Polygon':
  25189. case 'MultiLineString':
  25190. case 'MultiPolygon':
  25191. {
  25192. if (callback(geometry, featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  25193. break;
  25194. }
  25195. case 'GeometryCollection':
  25196. {
  25197. for (j = 0; j < geometry.geometries.length; j++) {
  25198. if (callback(geometry.geometries[j], featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  25199. }
  25200. break;
  25201. }
  25202. default:
  25203. throw new Error('Unknown Geometry Type');
  25204. }
  25205. } // Only increase `featureIndex` per each feature
  25206. featureIndex++;
  25207. }
  25208. }
  25209. /**
  25210. * Callback for geomReduce
  25211. *
  25212. * The first time the callback function is called, the values provided as arguments depend
  25213. * on whether the reduce method has an initialValue argument.
  25214. *
  25215. * If an initialValue is provided to the reduce method:
  25216. * - The previousValue argument is initialValue.
  25217. * - The currentValue argument is the value of the first element present in the array.
  25218. *
  25219. * If an initialValue is not provided:
  25220. * - The previousValue argument is the value of the first element present in the array.
  25221. * - The currentValue argument is the value of the second element present in the array.
  25222. *
  25223. * @callback geomReduceCallback
  25224. * @param {*} previousValue The accumulated value previously returned in the last invocation
  25225. * of the callback, or initialValue, if supplied.
  25226. * @param {Geometry} currentGeometry The current Geometry being processed.
  25227. * @param {number} featureIndex The current index of the Feature being processed.
  25228. * @param {Object} featureProperties The current Feature Properties being processed.
  25229. * @param {Array<number>} featureBBox The current Feature BBox being processed.
  25230. * @param {number|string} featureId The current Feature Id being processed.
  25231. */
  25232. /**
  25233. * Reduce geometry in any GeoJSON object, similar to Array.reduce().
  25234. *
  25235. * @name geomReduce
  25236. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  25237. * @param {Function} callback a method that takes (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId)
  25238. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  25239. * @returns {*} The value that results from the reduction.
  25240. * @example
  25241. * var features = turf.featureCollection([
  25242. * turf.point([26, 37], {foo: 'bar'}),
  25243. * turf.point([36, 53], {hello: 'world'})
  25244. * ]);
  25245. *
  25246. * turf.geomReduce(features, function (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  25247. * //=previousValue
  25248. * //=currentGeometry
  25249. * //=featureIndex
  25250. * //=featureProperties
  25251. * //=featureBBox
  25252. * //=featureId
  25253. * return currentGeometry
  25254. * });
  25255. */
  25256. function meta_main_es_geomReduce(geojson, callback, initialValue) {
  25257. var previousValue = initialValue;
  25258. meta_main_es_geomEach(geojson, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  25259. if (featureIndex === 0 && initialValue === undefined) previousValue = currentGeometry;else previousValue = callback(previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId);
  25260. });
  25261. return previousValue;
  25262. }
  25263. /**
  25264. * Callback for flattenEach
  25265. *
  25266. * @callback flattenEachCallback
  25267. * @param {Feature} currentFeature The current flattened feature being processed.
  25268. * @param {number} featureIndex The current index of the Feature being processed.
  25269. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  25270. */
  25271. /**
  25272. * Iterate over flattened features in any GeoJSON object, similar to
  25273. * Array.forEach.
  25274. *
  25275. * @name flattenEach
  25276. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  25277. * @param {Function} callback a method that takes (currentFeature, featureIndex, multiFeatureIndex)
  25278. * @example
  25279. * var features = turf.featureCollection([
  25280. * turf.point([26, 37], {foo: 'bar'}),
  25281. * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})
  25282. * ]);
  25283. *
  25284. * turf.flattenEach(features, function (currentFeature, featureIndex, multiFeatureIndex) {
  25285. * //=currentFeature
  25286. * //=featureIndex
  25287. * //=multiFeatureIndex
  25288. * });
  25289. */
  25290. function meta_main_es_flattenEach(geojson, callback) {
  25291. meta_main_es_geomEach(geojson, function (geometry, featureIndex, properties, bbox, id) {
  25292. // Callback for single geometry
  25293. var type = geometry === null ? null : geometry.type;
  25294. switch (type) {
  25295. case null:
  25296. case 'Point':
  25297. case 'LineString':
  25298. case 'Polygon':
  25299. if (callback(node_modules_turf_helpers_main_es_feature(geometry, properties, {
  25300. bbox: bbox,
  25301. id: id
  25302. }), featureIndex, 0) === false) return false;
  25303. return;
  25304. }
  25305. var geomType; // Callback for multi-geometry
  25306. switch (type) {
  25307. case 'MultiPoint':
  25308. geomType = 'Point';
  25309. break;
  25310. case 'MultiLineString':
  25311. geomType = 'LineString';
  25312. break;
  25313. case 'MultiPolygon':
  25314. geomType = 'Polygon';
  25315. break;
  25316. }
  25317. for (var multiFeatureIndex = 0; multiFeatureIndex < geometry.coordinates.length; multiFeatureIndex++) {
  25318. var coordinate = geometry.coordinates[multiFeatureIndex];
  25319. var geom = {
  25320. type: geomType,
  25321. coordinates: coordinate
  25322. };
  25323. if (callback(node_modules_turf_helpers_main_es_feature(geom, properties), featureIndex, multiFeatureIndex) === false) return false;
  25324. }
  25325. });
  25326. }
  25327. /**
  25328. * Callback for flattenReduce
  25329. *
  25330. * The first time the callback function is called, the values provided as arguments depend
  25331. * on whether the reduce method has an initialValue argument.
  25332. *
  25333. * If an initialValue is provided to the reduce method:
  25334. * - The previousValue argument is initialValue.
  25335. * - The currentValue argument is the value of the first element present in the array.
  25336. *
  25337. * If an initialValue is not provided:
  25338. * - The previousValue argument is the value of the first element present in the array.
  25339. * - The currentValue argument is the value of the second element present in the array.
  25340. *
  25341. * @callback flattenReduceCallback
  25342. * @param {*} previousValue The accumulated value previously returned in the last invocation
  25343. * of the callback, or initialValue, if supplied.
  25344. * @param {Feature} currentFeature The current Feature being processed.
  25345. * @param {number} featureIndex The current index of the Feature being processed.
  25346. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  25347. */
  25348. /**
  25349. * Reduce flattened features in any GeoJSON object, similar to Array.reduce().
  25350. *
  25351. * @name flattenReduce
  25352. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  25353. * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex, multiFeatureIndex)
  25354. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  25355. * @returns {*} The value that results from the reduction.
  25356. * @example
  25357. * var features = turf.featureCollection([
  25358. * turf.point([26, 37], {foo: 'bar'}),
  25359. * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})
  25360. * ]);
  25361. *
  25362. * turf.flattenReduce(features, function (previousValue, currentFeature, featureIndex, multiFeatureIndex) {
  25363. * //=previousValue
  25364. * //=currentFeature
  25365. * //=featureIndex
  25366. * //=multiFeatureIndex
  25367. * return currentFeature
  25368. * });
  25369. */
  25370. function meta_main_es_flattenReduce(geojson, callback, initialValue) {
  25371. var previousValue = initialValue;
  25372. meta_main_es_flattenEach(geojson, function (currentFeature, featureIndex, multiFeatureIndex) {
  25373. if (featureIndex === 0 && multiFeatureIndex === 0 && initialValue === undefined) previousValue = currentFeature;else previousValue = callback(previousValue, currentFeature, featureIndex, multiFeatureIndex);
  25374. });
  25375. return previousValue;
  25376. }
  25377. /**
  25378. * Callback for segmentEach
  25379. *
  25380. * @callback segmentEachCallback
  25381. * @param {Feature<LineString>} currentSegment The current Segment being processed.
  25382. * @param {number} featureIndex The current index of the Feature being processed.
  25383. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  25384. * @param {number} geometryIndex The current index of the Geometry being processed.
  25385. * @param {number} segmentIndex The current index of the Segment being processed.
  25386. * @returns {void}
  25387. */
  25388. /**
  25389. * Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEach()
  25390. * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  25391. *
  25392. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON
  25393. * @param {Function} callback a method that takes (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex)
  25394. * @returns {void}
  25395. * @example
  25396. * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);
  25397. *
  25398. * // Iterate over GeoJSON by 2-vertex segments
  25399. * turf.segmentEach(polygon, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  25400. * //=currentSegment
  25401. * //=featureIndex
  25402. * //=multiFeatureIndex
  25403. * //=geometryIndex
  25404. * //=segmentIndex
  25405. * });
  25406. *
  25407. * // Calculate the total number of segments
  25408. * var total = 0;
  25409. * turf.segmentEach(polygon, function () {
  25410. * total++;
  25411. * });
  25412. */
  25413. function meta_main_es_segmentEach(geojson, callback) {
  25414. meta_main_es_flattenEach(geojson, function (feature$$1, featureIndex, multiFeatureIndex) {
  25415. var segmentIndex = 0; // Exclude null Geometries
  25416. if (!feature$$1.geometry) return; // (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  25417. var type = feature$$1.geometry.type;
  25418. if (type === 'Point' || type === 'MultiPoint') return; // Generate 2-vertex line segments
  25419. var previousCoords;
  25420. if (meta_main_es_coordEach(feature$$1, function (currentCoord, coordIndex, featureIndexCoord, mutliPartIndexCoord, geometryIndex) {
  25421. // Simulating a meta.coordReduce() since `reduce` operations cannot be stopped by returning `false`
  25422. if (previousCoords === undefined) {
  25423. previousCoords = currentCoord;
  25424. return;
  25425. }
  25426. var currentSegment = _turf_helpers_main_es_lineString([previousCoords, currentCoord], feature$$1.properties);
  25427. if (callback(currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) === false) return false;
  25428. segmentIndex++;
  25429. previousCoords = currentCoord;
  25430. }) === false) return false;
  25431. });
  25432. }
  25433. /**
  25434. * Callback for segmentReduce
  25435. *
  25436. * The first time the callback function is called, the values provided as arguments depend
  25437. * on whether the reduce method has an initialValue argument.
  25438. *
  25439. * If an initialValue is provided to the reduce method:
  25440. * - The previousValue argument is initialValue.
  25441. * - The currentValue argument is the value of the first element present in the array.
  25442. *
  25443. * If an initialValue is not provided:
  25444. * - The previousValue argument is the value of the first element present in the array.
  25445. * - The currentValue argument is the value of the second element present in the array.
  25446. *
  25447. * @callback segmentReduceCallback
  25448. * @param {*} previousValue The accumulated value previously returned in the last invocation
  25449. * of the callback, or initialValue, if supplied.
  25450. * @param {Feature<LineString>} currentSegment The current Segment being processed.
  25451. * @param {number} featureIndex The current index of the Feature being processed.
  25452. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  25453. * @param {number} geometryIndex The current index of the Geometry being processed.
  25454. * @param {number} segmentIndex The current index of the Segment being processed.
  25455. */
  25456. /**
  25457. * Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce()
  25458. * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  25459. *
  25460. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON
  25461. * @param {Function} callback a method that takes (previousValue, currentSegment, currentIndex)
  25462. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  25463. * @returns {void}
  25464. * @example
  25465. * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);
  25466. *
  25467. * // Iterate over GeoJSON by 2-vertex segments
  25468. * turf.segmentReduce(polygon, function (previousSegment, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  25469. * //= previousSegment
  25470. * //= currentSegment
  25471. * //= featureIndex
  25472. * //= multiFeatureIndex
  25473. * //= geometryIndex
  25474. * //= segmentInex
  25475. * return currentSegment
  25476. * });
  25477. *
  25478. * // Calculate the total number of segments
  25479. * var initialValue = 0
  25480. * var total = turf.segmentReduce(polygon, function (previousValue) {
  25481. * previousValue++;
  25482. * return previousValue;
  25483. * }, initialValue);
  25484. */
  25485. function meta_main_es_segmentReduce(geojson, callback, initialValue) {
  25486. var previousValue = initialValue;
  25487. var started = false;
  25488. meta_main_es_segmentEach(geojson, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  25489. if (started === false && initialValue === undefined) previousValue = currentSegment;else previousValue = callback(previousValue, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex);
  25490. started = true;
  25491. });
  25492. return previousValue;
  25493. }
  25494. /**
  25495. * Callback for lineEach
  25496. *
  25497. * @callback lineEachCallback
  25498. * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed
  25499. * @param {number} featureIndex The current index of the Feature being processed
  25500. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed
  25501. * @param {number} geometryIndex The current index of the Geometry being processed
  25502. */
  25503. /**
  25504. * Iterate over line or ring coordinates in LineString, Polygon, MultiLineString, MultiPolygon Features or Geometries,
  25505. * similar to Array.forEach.
  25506. *
  25507. * @name lineEach
  25508. * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object
  25509. * @param {Function} callback a method that takes (currentLine, featureIndex, multiFeatureIndex, geometryIndex)
  25510. * @example
  25511. * var multiLine = turf.multiLineString([
  25512. * [[26, 37], [35, 45]],
  25513. * [[36, 53], [38, 50], [41, 55]]
  25514. * ]);
  25515. *
  25516. * turf.lineEach(multiLine, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  25517. * //=currentLine
  25518. * //=featureIndex
  25519. * //=multiFeatureIndex
  25520. * //=geometryIndex
  25521. * });
  25522. */
  25523. function meta_main_es_lineEach(geojson, callback) {
  25524. // validation
  25525. if (!geojson) throw new Error('geojson is required');
  25526. meta_main_es_flattenEach(geojson, function (feature$$1, featureIndex, multiFeatureIndex) {
  25527. if (feature$$1.geometry === null) return;
  25528. var type = feature$$1.geometry.type;
  25529. var coords = feature$$1.geometry.coordinates;
  25530. switch (type) {
  25531. case 'LineString':
  25532. if (callback(feature$$1, featureIndex, multiFeatureIndex, 0, 0) === false) return false;
  25533. break;
  25534. case 'Polygon':
  25535. for (var geometryIndex = 0; geometryIndex < coords.length; geometryIndex++) {
  25536. if (callback(_turf_helpers_main_es_lineString(coords[geometryIndex], feature$$1.properties), featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  25537. }
  25538. break;
  25539. }
  25540. });
  25541. }
  25542. /**
  25543. * Callback for lineReduce
  25544. *
  25545. * The first time the callback function is called, the values provided as arguments depend
  25546. * on whether the reduce method has an initialValue argument.
  25547. *
  25548. * If an initialValue is provided to the reduce method:
  25549. * - The previousValue argument is initialValue.
  25550. * - The currentValue argument is the value of the first element present in the array.
  25551. *
  25552. * If an initialValue is not provided:
  25553. * - The previousValue argument is the value of the first element present in the array.
  25554. * - The currentValue argument is the value of the second element present in the array.
  25555. *
  25556. * @callback lineReduceCallback
  25557. * @param {*} previousValue The accumulated value previously returned in the last invocation
  25558. * of the callback, or initialValue, if supplied.
  25559. * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed.
  25560. * @param {number} featureIndex The current index of the Feature being processed
  25561. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed
  25562. * @param {number} geometryIndex The current index of the Geometry being processed
  25563. */
  25564. /**
  25565. * Reduce features in any GeoJSON object, similar to Array.reduce().
  25566. *
  25567. * @name lineReduce
  25568. * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object
  25569. * @param {Function} callback a method that takes (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex)
  25570. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  25571. * @returns {*} The value that results from the reduction.
  25572. * @example
  25573. * var multiPoly = turf.multiPolygon([
  25574. * turf.polygon([[[12,48],[2,41],[24,38],[12,48]], [[9,44],[13,41],[13,45],[9,44]]]),
  25575. * turf.polygon([[[5, 5], [0, 0], [2, 2], [4, 4], [5, 5]]])
  25576. * ]);
  25577. *
  25578. * turf.lineReduce(multiPoly, function (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  25579. * //=previousValue
  25580. * //=currentLine
  25581. * //=featureIndex
  25582. * //=multiFeatureIndex
  25583. * //=geometryIndex
  25584. * return currentLine
  25585. * });
  25586. */
  25587. function meta_main_es_lineReduce(geojson, callback, initialValue) {
  25588. var previousValue = initialValue;
  25589. meta_main_es_lineEach(geojson, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  25590. if (featureIndex === 0 && initialValue === undefined) previousValue = currentLine;else previousValue = callback(previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex);
  25591. });
  25592. return previousValue;
  25593. }
  25594. /**
  25595. * Finds a particular 2-vertex LineString Segment from a GeoJSON using `@turf/meta` indexes.
  25596. *
  25597. * Negative indexes are permitted.
  25598. * Point & MultiPoint will always return null.
  25599. *
  25600. * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry
  25601. * @param {Object} [options={}] Optional parameters
  25602. * @param {number} [options.featureIndex=0] Feature Index
  25603. * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index
  25604. * @param {number} [options.geometryIndex=0] Geometry Index
  25605. * @param {number} [options.segmentIndex=0] Segment Index
  25606. * @param {Object} [options.properties={}] Translate Properties to output LineString
  25607. * @param {BBox} [options.bbox={}] Translate BBox to output LineString
  25608. * @param {number|string} [options.id={}] Translate Id to output LineString
  25609. * @returns {Feature<LineString>} 2-vertex GeoJSON Feature LineString
  25610. * @example
  25611. * var multiLine = turf.multiLineString([
  25612. * [[10, 10], [50, 30], [30, 40]],
  25613. * [[-10, -10], [-50, -30], [-30, -40]]
  25614. * ]);
  25615. *
  25616. * // First Segment (defaults are 0)
  25617. * turf.findSegment(multiLine);
  25618. * // => Feature<LineString<[[10, 10], [50, 30]]>>
  25619. *
  25620. * // First Segment of 2nd Multi Feature
  25621. * turf.findSegment(multiLine, {multiFeatureIndex: 1});
  25622. * // => Feature<LineString<[[-10, -10], [-50, -30]]>>
  25623. *
  25624. * // Last Segment of Last Multi Feature
  25625. * turf.findSegment(multiLine, {multiFeatureIndex: -1, segmentIndex: -1});
  25626. * // => Feature<LineString<[[-50, -30], [-30, -40]]>>
  25627. */
  25628. function meta_main_es_findSegment(geojson, options) {
  25629. // Optional Parameters
  25630. options = options || {};
  25631. if (!_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  25632. var featureIndex = options.featureIndex || 0;
  25633. var multiFeatureIndex = options.multiFeatureIndex || 0;
  25634. var geometryIndex = options.geometryIndex || 0;
  25635. var segmentIndex = options.segmentIndex || 0; // Find FeatureIndex
  25636. var properties = options.properties;
  25637. var geometry;
  25638. switch (geojson.type) {
  25639. case 'FeatureCollection':
  25640. if (featureIndex < 0) featureIndex = geojson.features.length + featureIndex;
  25641. properties = properties || geojson.features[featureIndex].properties;
  25642. geometry = geojson.features[featureIndex].geometry;
  25643. break;
  25644. case 'Feature':
  25645. properties = properties || geojson.properties;
  25646. geometry = geojson.geometry;
  25647. break;
  25648. case 'Point':
  25649. case 'MultiPoint':
  25650. return null;
  25651. case 'LineString':
  25652. case 'Polygon':
  25653. case 'MultiLineString':
  25654. case 'MultiPolygon':
  25655. geometry = geojson;
  25656. break;
  25657. default:
  25658. throw new Error('geojson is invalid');
  25659. } // Find SegmentIndex
  25660. if (geometry === null) return null;
  25661. var coords = geometry.coordinates;
  25662. switch (geometry.type) {
  25663. case 'Point':
  25664. case 'MultiPoint':
  25665. return null;
  25666. case 'LineString':
  25667. if (segmentIndex < 0) segmentIndex = coords.length + segmentIndex - 1;
  25668. return _turf_helpers_main_es_lineString([coords[segmentIndex], coords[segmentIndex + 1]], properties, options);
  25669. case 'Polygon':
  25670. if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;
  25671. if (segmentIndex < 0) segmentIndex = coords[geometryIndex].length + segmentIndex - 1;
  25672. return _turf_helpers_main_es_lineString([coords[geometryIndex][segmentIndex], coords[geometryIndex][segmentIndex + 1]], properties, options);
  25673. case 'MultiLineString':
  25674. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  25675. if (segmentIndex < 0) segmentIndex = coords[multiFeatureIndex].length + segmentIndex - 1;
  25676. return _turf_helpers_main_es_lineString([coords[multiFeatureIndex][segmentIndex], coords[multiFeatureIndex][segmentIndex + 1]], properties, options);
  25677. case 'MultiPolygon':
  25678. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  25679. if (geometryIndex < 0) geometryIndex = coords[multiFeatureIndex].length + geometryIndex;
  25680. if (segmentIndex < 0) segmentIndex = coords[multiFeatureIndex][geometryIndex].length - segmentIndex - 1;
  25681. return _turf_helpers_main_es_lineString([coords[multiFeatureIndex][geometryIndex][segmentIndex], coords[multiFeatureIndex][geometryIndex][segmentIndex + 1]], properties, options);
  25682. }
  25683. throw new Error('geojson is invalid');
  25684. }
  25685. /**
  25686. * Finds a particular Point from a GeoJSON using `@turf/meta` indexes.
  25687. *
  25688. * Negative indexes are permitted.
  25689. *
  25690. * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry
  25691. * @param {Object} [options={}] Optional parameters
  25692. * @param {number} [options.featureIndex=0] Feature Index
  25693. * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index
  25694. * @param {number} [options.geometryIndex=0] Geometry Index
  25695. * @param {number} [options.coordIndex=0] Coord Index
  25696. * @param {Object} [options.properties={}] Translate Properties to output Point
  25697. * @param {BBox} [options.bbox={}] Translate BBox to output Point
  25698. * @param {number|string} [options.id={}] Translate Id to output Point
  25699. * @returns {Feature<Point>} 2-vertex GeoJSON Feature Point
  25700. * @example
  25701. * var multiLine = turf.multiLineString([
  25702. * [[10, 10], [50, 30], [30, 40]],
  25703. * [[-10, -10], [-50, -30], [-30, -40]]
  25704. * ]);
  25705. *
  25706. * // First Segment (defaults are 0)
  25707. * turf.findPoint(multiLine);
  25708. * // => Feature<Point<[10, 10]>>
  25709. *
  25710. * // First Segment of the 2nd Multi-Feature
  25711. * turf.findPoint(multiLine, {multiFeatureIndex: 1});
  25712. * // => Feature<Point<[-10, -10]>>
  25713. *
  25714. * // Last Segment of last Multi-Feature
  25715. * turf.findPoint(multiLine, {multiFeatureIndex: -1, coordIndex: -1});
  25716. * // => Feature<Point<[-30, -40]>>
  25717. */
  25718. function meta_main_es_findPoint(geojson, options) {
  25719. // Optional Parameters
  25720. options = options || {};
  25721. if (!_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  25722. var featureIndex = options.featureIndex || 0;
  25723. var multiFeatureIndex = options.multiFeatureIndex || 0;
  25724. var geometryIndex = options.geometryIndex || 0;
  25725. var coordIndex = options.coordIndex || 0; // Find FeatureIndex
  25726. var properties = options.properties;
  25727. var geometry;
  25728. switch (geojson.type) {
  25729. case 'FeatureCollection':
  25730. if (featureIndex < 0) featureIndex = geojson.features.length + featureIndex;
  25731. properties = properties || geojson.features[featureIndex].properties;
  25732. geometry = geojson.features[featureIndex].geometry;
  25733. break;
  25734. case 'Feature':
  25735. properties = properties || geojson.properties;
  25736. geometry = geojson.geometry;
  25737. break;
  25738. case 'Point':
  25739. case 'MultiPoint':
  25740. return null;
  25741. case 'LineString':
  25742. case 'Polygon':
  25743. case 'MultiLineString':
  25744. case 'MultiPolygon':
  25745. geometry = geojson;
  25746. break;
  25747. default:
  25748. throw new Error('geojson is invalid');
  25749. } // Find Coord Index
  25750. if (geometry === null) return null;
  25751. var coords = geometry.coordinates;
  25752. switch (geometry.type) {
  25753. case 'Point':
  25754. return node_modules_turf_helpers_main_es_point(coords, properties, options);
  25755. case 'MultiPoint':
  25756. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  25757. return node_modules_turf_helpers_main_es_point(coords[multiFeatureIndex], properties, options);
  25758. case 'LineString':
  25759. if (coordIndex < 0) coordIndex = coords.length + coordIndex;
  25760. return node_modules_turf_helpers_main_es_point(coords[coordIndex], properties, options);
  25761. case 'Polygon':
  25762. if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;
  25763. if (coordIndex < 0) coordIndex = coords[geometryIndex].length + coordIndex;
  25764. return node_modules_turf_helpers_main_es_point(coords[geometryIndex][coordIndex], properties, options);
  25765. case 'MultiLineString':
  25766. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  25767. if (coordIndex < 0) coordIndex = coords[multiFeatureIndex].length + coordIndex;
  25768. return node_modules_turf_helpers_main_es_point(coords[multiFeatureIndex][coordIndex], properties, options);
  25769. case 'MultiPolygon':
  25770. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  25771. if (geometryIndex < 0) geometryIndex = coords[multiFeatureIndex].length + geometryIndex;
  25772. if (coordIndex < 0) coordIndex = coords[multiFeatureIndex][geometryIndex].length - coordIndex;
  25773. return node_modules_turf_helpers_main_es_point(coords[multiFeatureIndex][geometryIndex][coordIndex], properties, options);
  25774. }
  25775. throw new Error('geojson is invalid');
  25776. }
  25777. // CONCATENATED MODULE: ./node_modules/@turf/centroid/main.es.js
  25778. /**
  25779. * Takes one or more features and calculates the centroid using the mean of all vertices.
  25780. * This lessens the effect of small islands and artifacts when calculating the centroid of a set of polygons.
  25781. *
  25782. * @name centroid
  25783. * @param {GeoJSON} geojson GeoJSON to be centered
  25784. * @param {Object} [properties={}] an Object that is used as the {@link Feature}'s properties
  25785. * @returns {Feature<Point>} the centroid of the input features
  25786. * @example
  25787. * var polygon = turf.polygon([[[-81, 41], [-88, 36], [-84, 31], [-80, 33], [-77, 39], [-81, 41]]]);
  25788. *
  25789. * var centroid = turf.centroid(polygon);
  25790. *
  25791. * //addToMap
  25792. * var addToMap = [polygon, centroid]
  25793. */
  25794. function centroid(geojson, properties) {
  25795. var xSum = 0;
  25796. var ySum = 0;
  25797. var len = 0;
  25798. meta_main_es_coordEach(geojson, function (coord) {
  25799. xSum += coord[0];
  25800. ySum += coord[1];
  25801. len++;
  25802. }, true);
  25803. return node_modules_turf_helpers_main_es_point([xSum / len, ySum / len], properties);
  25804. }
  25805. /* harmony default export */ var centroid_main_es = (centroid);
  25806. // CONCATENATED MODULE: ./node_modules/@turf/transform-scale/node_modules/@turf/helpers/main.es.js
  25807. /**
  25808. * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.
  25809. */
  25810. var node_modules_turf_helpers_main_es_earthRadius = 6371008.8;
  25811. /**
  25812. * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.
  25813. */
  25814. var node_modules_turf_helpers_main_es_factors = {
  25815. meters: node_modules_turf_helpers_main_es_earthRadius,
  25816. metres: node_modules_turf_helpers_main_es_earthRadius,
  25817. millimeters: node_modules_turf_helpers_main_es_earthRadius * 1000,
  25818. millimetres: node_modules_turf_helpers_main_es_earthRadius * 1000,
  25819. centimeters: node_modules_turf_helpers_main_es_earthRadius * 100,
  25820. centimetres: node_modules_turf_helpers_main_es_earthRadius * 100,
  25821. kilometers: node_modules_turf_helpers_main_es_earthRadius / 1000,
  25822. kilometres: node_modules_turf_helpers_main_es_earthRadius / 1000,
  25823. miles: node_modules_turf_helpers_main_es_earthRadius / 1609.344,
  25824. nauticalmiles: node_modules_turf_helpers_main_es_earthRadius / 1852,
  25825. inches: node_modules_turf_helpers_main_es_earthRadius * 39.370,
  25826. yards: node_modules_turf_helpers_main_es_earthRadius / 1.0936,
  25827. feet: node_modules_turf_helpers_main_es_earthRadius * 3.28084,
  25828. radians: 1,
  25829. degrees: node_modules_turf_helpers_main_es_earthRadius / 111325
  25830. };
  25831. /**
  25832. * Units of measurement factors based on 1 meter.
  25833. */
  25834. var node_modules_turf_helpers_main_es_unitsFactors = {
  25835. meters: 1,
  25836. metres: 1,
  25837. millimeters: 1000,
  25838. millimetres: 1000,
  25839. centimeters: 100,
  25840. centimetres: 100,
  25841. kilometers: 1 / 1000,
  25842. kilometres: 1 / 1000,
  25843. miles: 1 / 1609.344,
  25844. nauticalmiles: 1 / 1852,
  25845. inches: 39.370,
  25846. yards: 1 / 1.0936,
  25847. feet: 3.28084,
  25848. radians: 1 / node_modules_turf_helpers_main_es_earthRadius,
  25849. degrees: 1 / 111325
  25850. };
  25851. /**
  25852. * Area of measurement factors based on 1 square meter.
  25853. */
  25854. var node_modules_turf_helpers_main_es_areaFactors = {
  25855. meters: 1,
  25856. metres: 1,
  25857. millimeters: 1000000,
  25858. millimetres: 1000000,
  25859. centimeters: 10000,
  25860. centimetres: 10000,
  25861. kilometers: 0.000001,
  25862. kilometres: 0.000001,
  25863. acres: 0.000247105,
  25864. miles: 3.86e-7,
  25865. yards: 1.195990046,
  25866. feet: 10.763910417,
  25867. inches: 1550.003100006
  25868. };
  25869. /**
  25870. * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.
  25871. *
  25872. * @name feature
  25873. * @param {Geometry} geometry input geometry
  25874. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  25875. * @param {Object} [options={}] Optional Parameters
  25876. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  25877. * @param {string|number} [options.id] Identifier associated with the Feature
  25878. * @returns {Feature} a GeoJSON Feature
  25879. * @example
  25880. * var geometry = {
  25881. * "type": "Point",
  25882. * "coordinates": [110, 50]
  25883. * };
  25884. *
  25885. * var feature = turf.feature(geometry);
  25886. *
  25887. * //=feature
  25888. */
  25889. function transform_scale_node_modules_turf_helpers_main_es_feature(geometry, properties, options) {
  25890. // Optional Parameters
  25891. options = options || {};
  25892. if (!node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  25893. var bbox = options.bbox;
  25894. var id = options.id; // Validation
  25895. if (geometry === undefined) throw new Error('geometry is required');
  25896. if (properties && properties.constructor !== Object) throw new Error('properties must be an Object');
  25897. if (bbox) node_modules_turf_helpers_main_es_validateBBox(bbox);
  25898. if (id) node_modules_turf_helpers_main_es_validateId(id); // Main
  25899. var feat = {
  25900. type: 'Feature'
  25901. };
  25902. if (id) feat.id = id;
  25903. if (bbox) feat.bbox = bbox;
  25904. feat.properties = properties || {};
  25905. feat.geometry = geometry;
  25906. return feat;
  25907. }
  25908. /**
  25909. * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.
  25910. * For GeometryCollection type use `helpers.geometryCollection`
  25911. *
  25912. * @name geometry
  25913. * @param {string} type Geometry Type
  25914. * @param {Array<number>} coordinates Coordinates
  25915. * @param {Object} [options={}] Optional Parameters
  25916. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Geometry
  25917. * @returns {Geometry} a GeoJSON Geometry
  25918. * @example
  25919. * var type = 'Point';
  25920. * var coordinates = [110, 50];
  25921. *
  25922. * var geometry = turf.geometry(type, coordinates);
  25923. *
  25924. * //=geometry
  25925. */
  25926. function transform_scale_node_modules_turf_helpers_main_es_geometry(type, coordinates, options) {
  25927. // Optional Parameters
  25928. options = options || {};
  25929. if (!node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  25930. var bbox = options.bbox; // Validation
  25931. if (!type) throw new Error('type is required');
  25932. if (!coordinates) throw new Error('coordinates is required');
  25933. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  25934. if (bbox) node_modules_turf_helpers_main_es_validateBBox(bbox); // Main
  25935. var geom;
  25936. switch (type) {
  25937. case 'Point':
  25938. geom = transform_scale_node_modules_turf_helpers_main_es_point(coordinates).geometry;
  25939. break;
  25940. case 'LineString':
  25941. geom = node_modules_turf_helpers_main_es_lineString(coordinates).geometry;
  25942. break;
  25943. case 'Polygon':
  25944. geom = node_modules_turf_helpers_main_es_polygon(coordinates).geometry;
  25945. break;
  25946. case 'MultiPoint':
  25947. geom = node_modules_turf_helpers_main_es_multiPoint(coordinates).geometry;
  25948. break;
  25949. case 'MultiLineString':
  25950. geom = node_modules_turf_helpers_main_es_multiLineString(coordinates).geometry;
  25951. break;
  25952. case 'MultiPolygon':
  25953. geom = node_modules_turf_helpers_main_es_multiPolygon(coordinates).geometry;
  25954. break;
  25955. default:
  25956. throw new Error(type + ' is invalid');
  25957. }
  25958. if (bbox) geom.bbox = bbox;
  25959. return geom;
  25960. }
  25961. /**
  25962. * Creates a {@link Point} {@link Feature} from a Position.
  25963. *
  25964. * @name point
  25965. * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)
  25966. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  25967. * @param {Object} [options={}] Optional Parameters
  25968. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  25969. * @param {string|number} [options.id] Identifier associated with the Feature
  25970. * @returns {Feature<Point>} a Point feature
  25971. * @example
  25972. * var point = turf.point([-75.343, 39.984]);
  25973. *
  25974. * //=point
  25975. */
  25976. function transform_scale_node_modules_turf_helpers_main_es_point(coordinates, properties, options) {
  25977. if (!coordinates) throw new Error('coordinates is required');
  25978. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  25979. if (coordinates.length < 2) throw new Error('coordinates must be at least 2 numbers long');
  25980. if (!node_modules_turf_helpers_main_es_isNumber(coordinates[0]) || !node_modules_turf_helpers_main_es_isNumber(coordinates[1])) throw new Error('coordinates must contain numbers');
  25981. return transform_scale_node_modules_turf_helpers_main_es_feature({
  25982. type: 'Point',
  25983. coordinates: coordinates
  25984. }, properties, options);
  25985. }
  25986. /**
  25987. * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.
  25988. *
  25989. * @name points
  25990. * @param {Array<Array<number>>} coordinates an array of Points
  25991. * @param {Object} [properties={}] Translate these properties to each Feature
  25992. * @param {Object} [options={}] Optional Parameters
  25993. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  25994. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  25995. * @returns {FeatureCollection<Point>} Point Feature
  25996. * @example
  25997. * var points = turf.points([
  25998. * [-75, 39],
  25999. * [-80, 45],
  26000. * [-78, 50]
  26001. * ]);
  26002. *
  26003. * //=points
  26004. */
  26005. function node_modules_turf_helpers_main_es_points(coordinates, properties, options) {
  26006. if (!coordinates) throw new Error('coordinates is required');
  26007. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  26008. return node_modules_turf_helpers_main_es_featureCollection(coordinates.map(function (coords) {
  26009. return transform_scale_node_modules_turf_helpers_main_es_point(coords, properties);
  26010. }), options);
  26011. }
  26012. /**
  26013. * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.
  26014. *
  26015. * @name polygon
  26016. * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings
  26017. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  26018. * @param {Object} [options={}] Optional Parameters
  26019. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  26020. * @param {string|number} [options.id] Identifier associated with the Feature
  26021. * @returns {Feature<Polygon>} Polygon Feature
  26022. * @example
  26023. * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });
  26024. *
  26025. * //=polygon
  26026. */
  26027. function node_modules_turf_helpers_main_es_polygon(coordinates, properties, options) {
  26028. if (!coordinates) throw new Error('coordinates is required');
  26029. for (var i = 0; i < coordinates.length; i++) {
  26030. var ring = coordinates[i];
  26031. if (ring.length < 4) {
  26032. throw new Error('Each LinearRing of a Polygon must have 4 or more Positions.');
  26033. }
  26034. for (var j = 0; j < ring[ring.length - 1].length; j++) {
  26035. // Check if first point of Polygon contains two numbers
  26036. if (i === 0 && j === 0 && !node_modules_turf_helpers_main_es_isNumber(ring[0][0]) || !node_modules_turf_helpers_main_es_isNumber(ring[0][1])) throw new Error('coordinates must contain numbers');
  26037. if (ring[ring.length - 1][j] !== ring[0][j]) {
  26038. throw new Error('First and last Position are not equivalent.');
  26039. }
  26040. }
  26041. }
  26042. return transform_scale_node_modules_turf_helpers_main_es_feature({
  26043. type: 'Polygon',
  26044. coordinates: coordinates
  26045. }, properties, options);
  26046. }
  26047. /**
  26048. * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.
  26049. *
  26050. * @name polygons
  26051. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates
  26052. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  26053. * @param {Object} [options={}] Optional Parameters
  26054. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  26055. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  26056. * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection
  26057. * @example
  26058. * var polygons = turf.polygons([
  26059. * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],
  26060. * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],
  26061. * ]);
  26062. *
  26063. * //=polygons
  26064. */
  26065. function node_modules_turf_helpers_main_es_polygons(coordinates, properties, options) {
  26066. if (!coordinates) throw new Error('coordinates is required');
  26067. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  26068. return node_modules_turf_helpers_main_es_featureCollection(coordinates.map(function (coords) {
  26069. return node_modules_turf_helpers_main_es_polygon(coords, properties);
  26070. }), options);
  26071. }
  26072. /**
  26073. * Creates a {@link LineString} {@link Feature} from an Array of Positions.
  26074. *
  26075. * @name lineString
  26076. * @param {Array<Array<number>>} coordinates an array of Positions
  26077. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  26078. * @param {Object} [options={}] Optional Parameters
  26079. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  26080. * @param {string|number} [options.id] Identifier associated with the Feature
  26081. * @returns {Feature<LineString>} LineString Feature
  26082. * @example
  26083. * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});
  26084. * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});
  26085. *
  26086. * //=linestring1
  26087. * //=linestring2
  26088. */
  26089. function node_modules_turf_helpers_main_es_lineString(coordinates, properties, options) {
  26090. if (!coordinates) throw new Error('coordinates is required');
  26091. if (coordinates.length < 2) throw new Error('coordinates must be an array of two or more positions'); // Check if first point of LineString contains two numbers
  26092. if (!node_modules_turf_helpers_main_es_isNumber(coordinates[0][1]) || !node_modules_turf_helpers_main_es_isNumber(coordinates[0][1])) throw new Error('coordinates must contain numbers');
  26093. return transform_scale_node_modules_turf_helpers_main_es_feature({
  26094. type: 'LineString',
  26095. coordinates: coordinates
  26096. }, properties, options);
  26097. }
  26098. /**
  26099. * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.
  26100. *
  26101. * @name lineStrings
  26102. * @param {Array<Array<number>>} coordinates an array of LinearRings
  26103. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  26104. * @param {Object} [options={}] Optional Parameters
  26105. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  26106. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  26107. * @returns {FeatureCollection<LineString>} LineString FeatureCollection
  26108. * @example
  26109. * var linestrings = turf.lineStrings([
  26110. * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],
  26111. * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]
  26112. * ]);
  26113. *
  26114. * //=linestrings
  26115. */
  26116. function node_modules_turf_helpers_main_es_lineStrings(coordinates, properties, options) {
  26117. if (!coordinates) throw new Error('coordinates is required');
  26118. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  26119. return node_modules_turf_helpers_main_es_featureCollection(coordinates.map(function (coords) {
  26120. return node_modules_turf_helpers_main_es_lineString(coords, properties);
  26121. }), options);
  26122. }
  26123. /**
  26124. * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.
  26125. *
  26126. * @name featureCollection
  26127. * @param {Feature[]} features input features
  26128. * @param {Object} [options={}] Optional Parameters
  26129. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  26130. * @param {string|number} [options.id] Identifier associated with the Feature
  26131. * @returns {FeatureCollection} FeatureCollection of Features
  26132. * @example
  26133. * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});
  26134. * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});
  26135. * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});
  26136. *
  26137. * var collection = turf.featureCollection([
  26138. * locationA,
  26139. * locationB,
  26140. * locationC
  26141. * ]);
  26142. *
  26143. * //=collection
  26144. */
  26145. function node_modules_turf_helpers_main_es_featureCollection(features, options) {
  26146. // Optional Parameters
  26147. options = options || {};
  26148. if (!node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  26149. var bbox = options.bbox;
  26150. var id = options.id; // Validation
  26151. if (!features) throw new Error('No features passed');
  26152. if (!Array.isArray(features)) throw new Error('features must be an Array');
  26153. if (bbox) node_modules_turf_helpers_main_es_validateBBox(bbox);
  26154. if (id) node_modules_turf_helpers_main_es_validateId(id); // Main
  26155. var fc = {
  26156. type: 'FeatureCollection'
  26157. };
  26158. if (id) fc.id = id;
  26159. if (bbox) fc.bbox = bbox;
  26160. fc.features = features;
  26161. return fc;
  26162. }
  26163. /**
  26164. * Creates a {@link Feature<MultiLineString>} based on a
  26165. * coordinate array. Properties can be added optionally.
  26166. *
  26167. * @name multiLineString
  26168. * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings
  26169. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  26170. * @param {Object} [options={}] Optional Parameters
  26171. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  26172. * @param {string|number} [options.id] Identifier associated with the Feature
  26173. * @returns {Feature<MultiLineString>} a MultiLineString feature
  26174. * @throws {Error} if no coordinates are passed
  26175. * @example
  26176. * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);
  26177. *
  26178. * //=multiLine
  26179. */
  26180. function node_modules_turf_helpers_main_es_multiLineString(coordinates, properties, options) {
  26181. if (!coordinates) throw new Error('coordinates is required');
  26182. return transform_scale_node_modules_turf_helpers_main_es_feature({
  26183. type: 'MultiLineString',
  26184. coordinates: coordinates
  26185. }, properties, options);
  26186. }
  26187. /**
  26188. * Creates a {@link Feature<MultiPoint>} based on a
  26189. * coordinate array. Properties can be added optionally.
  26190. *
  26191. * @name multiPoint
  26192. * @param {Array<Array<number>>} coordinates an array of Positions
  26193. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  26194. * @param {Object} [options={}] Optional Parameters
  26195. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  26196. * @param {string|number} [options.id] Identifier associated with the Feature
  26197. * @returns {Feature<MultiPoint>} a MultiPoint feature
  26198. * @throws {Error} if no coordinates are passed
  26199. * @example
  26200. * var multiPt = turf.multiPoint([[0,0],[10,10]]);
  26201. *
  26202. * //=multiPt
  26203. */
  26204. function node_modules_turf_helpers_main_es_multiPoint(coordinates, properties, options) {
  26205. if (!coordinates) throw new Error('coordinates is required');
  26206. return transform_scale_node_modules_turf_helpers_main_es_feature({
  26207. type: 'MultiPoint',
  26208. coordinates: coordinates
  26209. }, properties, options);
  26210. }
  26211. /**
  26212. * Creates a {@link Feature<MultiPolygon>} based on a
  26213. * coordinate array. Properties can be added optionally.
  26214. *
  26215. * @name multiPolygon
  26216. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons
  26217. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  26218. * @param {Object} [options={}] Optional Parameters
  26219. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  26220. * @param {string|number} [options.id] Identifier associated with the Feature
  26221. * @returns {Feature<MultiPolygon>} a multipolygon feature
  26222. * @throws {Error} if no coordinates are passed
  26223. * @example
  26224. * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);
  26225. *
  26226. * //=multiPoly
  26227. *
  26228. */
  26229. function node_modules_turf_helpers_main_es_multiPolygon(coordinates, properties, options) {
  26230. if (!coordinates) throw new Error('coordinates is required');
  26231. return transform_scale_node_modules_turf_helpers_main_es_feature({
  26232. type: 'MultiPolygon',
  26233. coordinates: coordinates
  26234. }, properties, options);
  26235. }
  26236. /**
  26237. * Creates a {@link Feature<GeometryCollection>} based on a
  26238. * coordinate array. Properties can be added optionally.
  26239. *
  26240. * @name geometryCollection
  26241. * @param {Array<Geometry>} geometries an array of GeoJSON Geometries
  26242. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  26243. * @param {Object} [options={}] Optional Parameters
  26244. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  26245. * @param {string|number} [options.id] Identifier associated with the Feature
  26246. * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature
  26247. * @example
  26248. * var pt = {
  26249. * "type": "Point",
  26250. * "coordinates": [100, 0]
  26251. * };
  26252. * var line = {
  26253. * "type": "LineString",
  26254. * "coordinates": [ [101, 0], [102, 1] ]
  26255. * };
  26256. * var collection = turf.geometryCollection([pt, line]);
  26257. *
  26258. * //=collection
  26259. */
  26260. function node_modules_turf_helpers_main_es_geometryCollection(geometries, properties, options) {
  26261. if (!geometries) throw new Error('geometries is required');
  26262. if (!Array.isArray(geometries)) throw new Error('geometries must be an Array');
  26263. return transform_scale_node_modules_turf_helpers_main_es_feature({
  26264. type: 'GeometryCollection',
  26265. geometries: geometries
  26266. }, properties, options);
  26267. }
  26268. /**
  26269. * Round number to precision
  26270. *
  26271. * @param {number} num Number
  26272. * @param {number} [precision=0] Precision
  26273. * @returns {number} rounded number
  26274. * @example
  26275. * turf.round(120.4321)
  26276. * //=120
  26277. *
  26278. * turf.round(120.4321, 2)
  26279. * //=120.43
  26280. */
  26281. function node_modules_turf_helpers_main_es_round(num, precision) {
  26282. if (num === undefined || num === null || isNaN(num)) throw new Error('num is required');
  26283. if (precision && !(precision >= 0)) throw new Error('precision must be a positive number');
  26284. var multiplier = Math.pow(10, precision || 0);
  26285. return Math.round(num * multiplier) / multiplier;
  26286. }
  26287. /**
  26288. * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.
  26289. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  26290. *
  26291. * @name radiansToLength
  26292. * @param {number} radians in radians across the sphere
  26293. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  26294. * @returns {number} distance
  26295. */
  26296. function node_modules_turf_helpers_main_es_radiansToLength(radians, units) {
  26297. if (radians === undefined || radians === null) throw new Error('radians is required');
  26298. if (units && typeof units !== 'string') throw new Error('units must be a string');
  26299. var factor = node_modules_turf_helpers_main_es_factors[units || 'kilometers'];
  26300. if (!factor) throw new Error(units + ' units is invalid');
  26301. return radians * factor;
  26302. }
  26303. /**
  26304. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians
  26305. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  26306. *
  26307. * @name lengthToRadians
  26308. * @param {number} distance in real units
  26309. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  26310. * @returns {number} radians
  26311. */
  26312. function node_modules_turf_helpers_main_es_lengthToRadians(distance, units) {
  26313. if (distance === undefined || distance === null) throw new Error('distance is required');
  26314. if (units && typeof units !== 'string') throw new Error('units must be a string');
  26315. var factor = node_modules_turf_helpers_main_es_factors[units || 'kilometers'];
  26316. if (!factor) throw new Error(units + ' units is invalid');
  26317. return distance / factor;
  26318. }
  26319. /**
  26320. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees
  26321. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet
  26322. *
  26323. * @name lengthToDegrees
  26324. * @param {number} distance in real units
  26325. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  26326. * @returns {number} degrees
  26327. */
  26328. function node_modules_turf_helpers_main_es_lengthToDegrees(distance, units) {
  26329. return node_modules_turf_helpers_main_es_radiansToDegrees(node_modules_turf_helpers_main_es_lengthToRadians(distance, units));
  26330. }
  26331. /**
  26332. * Converts any bearing angle from the north line direction (positive clockwise)
  26333. * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line
  26334. *
  26335. * @name bearingToAzimuth
  26336. * @param {number} bearing angle, between -180 and +180 degrees
  26337. * @returns {number} angle between 0 and 360 degrees
  26338. */
  26339. function node_modules_turf_helpers_main_es_bearingToAzimuth(bearing) {
  26340. if (bearing === null || bearing === undefined) throw new Error('bearing is required');
  26341. var angle = bearing % 360;
  26342. if (angle < 0) angle += 360;
  26343. return angle;
  26344. }
  26345. /**
  26346. * Converts an angle in radians to degrees
  26347. *
  26348. * @name radiansToDegrees
  26349. * @param {number} radians angle in radians
  26350. * @returns {number} degrees between 0 and 360 degrees
  26351. */
  26352. function node_modules_turf_helpers_main_es_radiansToDegrees(radians) {
  26353. if (radians === null || radians === undefined) throw new Error('radians is required');
  26354. var degrees = radians % (2 * Math.PI);
  26355. return degrees * 180 / Math.PI;
  26356. }
  26357. /**
  26358. * Converts an angle in degrees to radians
  26359. *
  26360. * @name degreesToRadians
  26361. * @param {number} degrees angle between 0 and 360 degrees
  26362. * @returns {number} angle in radians
  26363. */
  26364. function node_modules_turf_helpers_main_es_degreesToRadians(degrees) {
  26365. if (degrees === null || degrees === undefined) throw new Error('degrees is required');
  26366. var radians = degrees % 360;
  26367. return radians * Math.PI / 180;
  26368. }
  26369. /**
  26370. * Converts a length to the requested unit.
  26371. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  26372. *
  26373. * @param {number} length to be converted
  26374. * @param {string} originalUnit of the length
  26375. * @param {string} [finalUnit='kilometers'] returned unit
  26376. * @returns {number} the converted length
  26377. */
  26378. function node_modules_turf_helpers_main_es_convertLength(length, originalUnit, finalUnit) {
  26379. if (length === null || length === undefined) throw new Error('length is required');
  26380. if (!(length >= 0)) throw new Error('length must be a positive number');
  26381. return node_modules_turf_helpers_main_es_radiansToLength(node_modules_turf_helpers_main_es_lengthToRadians(length, originalUnit), finalUnit || 'kilometers');
  26382. }
  26383. /**
  26384. * Converts a area to the requested unit.
  26385. * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches
  26386. * @param {number} area to be converted
  26387. * @param {string} [originalUnit='meters'] of the distance
  26388. * @param {string} [finalUnit='kilometers'] returned unit
  26389. * @returns {number} the converted distance
  26390. */
  26391. function node_modules_turf_helpers_main_es_convertArea(area, originalUnit, finalUnit) {
  26392. if (area === null || area === undefined) throw new Error('area is required');
  26393. if (!(area >= 0)) throw new Error('area must be a positive number');
  26394. var startFactor = node_modules_turf_helpers_main_es_areaFactors[originalUnit || 'meters'];
  26395. if (!startFactor) throw new Error('invalid original units');
  26396. var finalFactor = node_modules_turf_helpers_main_es_areaFactors[finalUnit || 'kilometers'];
  26397. if (!finalFactor) throw new Error('invalid final units');
  26398. return area / startFactor * finalFactor;
  26399. }
  26400. /**
  26401. * isNumber
  26402. *
  26403. * @param {*} num Number to validate
  26404. * @returns {boolean} true/false
  26405. * @example
  26406. * turf.isNumber(123)
  26407. * //=true
  26408. * turf.isNumber('foo')
  26409. * //=false
  26410. */
  26411. function node_modules_turf_helpers_main_es_isNumber(num) {
  26412. return !isNaN(num) && num !== null && !Array.isArray(num);
  26413. }
  26414. /**
  26415. * isObject
  26416. *
  26417. * @param {*} input variable to validate
  26418. * @returns {boolean} true/false
  26419. * @example
  26420. * turf.isObject({elevation: 10})
  26421. * //=true
  26422. * turf.isObject('foo')
  26423. * //=false
  26424. */
  26425. function node_modules_turf_helpers_main_es_isObject(input) {
  26426. return !!input && input.constructor === Object;
  26427. }
  26428. /**
  26429. * Validate BBox
  26430. *
  26431. * @private
  26432. * @param {Array<number>} bbox BBox to validate
  26433. * @returns {void}
  26434. * @throws Error if BBox is not valid
  26435. * @example
  26436. * validateBBox([-180, -40, 110, 50])
  26437. * //=OK
  26438. * validateBBox([-180, -40])
  26439. * //=Error
  26440. * validateBBox('Foo')
  26441. * //=Error
  26442. * validateBBox(5)
  26443. * //=Error
  26444. * validateBBox(null)
  26445. * //=Error
  26446. * validateBBox(undefined)
  26447. * //=Error
  26448. */
  26449. function node_modules_turf_helpers_main_es_validateBBox(bbox) {
  26450. if (!bbox) throw new Error('bbox is required');
  26451. if (!Array.isArray(bbox)) throw new Error('bbox must be an Array');
  26452. if (bbox.length !== 4 && bbox.length !== 6) throw new Error('bbox must be an Array of 4 or 6 numbers');
  26453. bbox.forEach(function (num) {
  26454. if (!node_modules_turf_helpers_main_es_isNumber(num)) throw new Error('bbox must only contain numbers');
  26455. });
  26456. }
  26457. /**
  26458. * Validate Id
  26459. *
  26460. * @private
  26461. * @param {string|number} id Id to validate
  26462. * @returns {void}
  26463. * @throws Error if Id is not valid
  26464. * @example
  26465. * validateId([-180, -40, 110, 50])
  26466. * //=Error
  26467. * validateId([-180, -40])
  26468. * //=Error
  26469. * validateId('Foo')
  26470. * //=OK
  26471. * validateId(5)
  26472. * //=OK
  26473. * validateId(null)
  26474. * //=Error
  26475. * validateId(undefined)
  26476. * //=Error
  26477. */
  26478. function node_modules_turf_helpers_main_es_validateId(id) {
  26479. if (!id) throw new Error('id is required');
  26480. if (['string', 'number'].indexOf(typeof id) === -1) throw new Error('id must be a number or a string');
  26481. } // Deprecated methods
  26482. function node_modules_turf_helpers_main_es_radians2degrees() {
  26483. throw new Error('method has been renamed to `radiansToDegrees`');
  26484. }
  26485. function node_modules_turf_helpers_main_es_degrees2radians() {
  26486. throw new Error('method has been renamed to `degreesToRadians`');
  26487. }
  26488. function node_modules_turf_helpers_main_es_distanceToDegrees() {
  26489. throw new Error('method has been renamed to `lengthToDegrees`');
  26490. }
  26491. function node_modules_turf_helpers_main_es_distanceToRadians() {
  26492. throw new Error('method has been renamed to `lengthToRadians`');
  26493. }
  26494. function node_modules_turf_helpers_main_es_radiansToDistance() {
  26495. throw new Error('method has been renamed to `radiansToLength`');
  26496. }
  26497. function node_modules_turf_helpers_main_es_bearingToAngle() {
  26498. throw new Error('method has been renamed to `bearingToAzimuth`');
  26499. }
  26500. function node_modules_turf_helpers_main_es_convertDistance() {
  26501. throw new Error('method has been renamed to `convertLength`');
  26502. }
  26503. // CONCATENATED MODULE: ./node_modules/@turf/transform-scale/node_modules/@turf/meta/main.es.js
  26504. /**
  26505. * Callback for coordEach
  26506. *
  26507. * @callback coordEachCallback
  26508. * @param {Array<number>} currentCoord The current coordinate being processed.
  26509. * @param {number} coordIndex The current index of the coordinate being processed.
  26510. * @param {number} featureIndex The current index of the Feature being processed.
  26511. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  26512. * @param {number} geometryIndex The current index of the Geometry being processed.
  26513. */
  26514. /**
  26515. * Iterate over coordinates in any GeoJSON object, similar to Array.forEach()
  26516. *
  26517. * @name coordEach
  26518. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  26519. * @param {Function} callback a method that takes (currentCoord, coordIndex, featureIndex, multiFeatureIndex)
  26520. * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.
  26521. * @returns {void}
  26522. * @example
  26523. * var features = turf.featureCollection([
  26524. * turf.point([26, 37], {"foo": "bar"}),
  26525. * turf.point([36, 53], {"hello": "world"})
  26526. * ]);
  26527. *
  26528. * turf.coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  26529. * //=currentCoord
  26530. * //=coordIndex
  26531. * //=featureIndex
  26532. * //=multiFeatureIndex
  26533. * //=geometryIndex
  26534. * });
  26535. */
  26536. function _turf_meta_main_es_coordEach(geojson, callback, excludeWrapCoord) {
  26537. // Handles null Geometry -- Skips this GeoJSON
  26538. if (geojson === null) return;
  26539. var j,
  26540. k,
  26541. l,
  26542. geometry,
  26543. stopG,
  26544. coords,
  26545. geometryMaybeCollection,
  26546. wrapShrink = 0,
  26547. coordIndex = 0,
  26548. isGeometryCollection,
  26549. type = geojson.type,
  26550. isFeatureCollection = type === 'FeatureCollection',
  26551. isFeature = type === 'Feature',
  26552. stop = isFeatureCollection ? geojson.features.length : 1; // This logic may look a little weird. The reason why it is that way
  26553. // is because it's trying to be fast. GeoJSON supports multiple kinds
  26554. // of objects at its root: FeatureCollection, Features, Geometries.
  26555. // This function has the responsibility of handling all of them, and that
  26556. // means that some of the `for` loops you see below actually just don't apply
  26557. // to certain inputs. For instance, if you give this just a
  26558. // Point geometry, then both loops are short-circuited and all we do
  26559. // is gradually rename the input until it's called 'geometry'.
  26560. //
  26561. // This also aims to allocate as few resources as possible: just a
  26562. // few numbers and booleans, rather than any temporary arrays as would
  26563. // be required with the normalization approach.
  26564. for (var featureIndex = 0; featureIndex < stop; featureIndex++) {
  26565. geometryMaybeCollection = isFeatureCollection ? geojson.features[featureIndex].geometry : isFeature ? geojson.geometry : geojson;
  26566. isGeometryCollection = geometryMaybeCollection ? geometryMaybeCollection.type === 'GeometryCollection' : false;
  26567. stopG = isGeometryCollection ? geometryMaybeCollection.geometries.length : 1;
  26568. for (var geomIndex = 0; geomIndex < stopG; geomIndex++) {
  26569. var multiFeatureIndex = 0;
  26570. var geometryIndex = 0;
  26571. geometry = isGeometryCollection ? geometryMaybeCollection.geometries[geomIndex] : geometryMaybeCollection; // Handles null Geometry -- Skips this geometry
  26572. if (geometry === null) continue;
  26573. coords = geometry.coordinates;
  26574. var geomType = geometry.type;
  26575. wrapShrink = excludeWrapCoord && (geomType === 'Polygon' || geomType === 'MultiPolygon') ? 1 : 0;
  26576. switch (geomType) {
  26577. case null:
  26578. break;
  26579. case 'Point':
  26580. if (callback(coords, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  26581. coordIndex++;
  26582. multiFeatureIndex++;
  26583. break;
  26584. case 'LineString':
  26585. case 'MultiPoint':
  26586. for (j = 0; j < coords.length; j++) {
  26587. if (callback(coords[j], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  26588. coordIndex++;
  26589. if (geomType === 'MultiPoint') multiFeatureIndex++;
  26590. }
  26591. if (geomType === 'LineString') multiFeatureIndex++;
  26592. break;
  26593. case 'Polygon':
  26594. case 'MultiLineString':
  26595. for (j = 0; j < coords.length; j++) {
  26596. for (k = 0; k < coords[j].length - wrapShrink; k++) {
  26597. if (callback(coords[j][k], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  26598. coordIndex++;
  26599. }
  26600. if (geomType === 'MultiLineString') multiFeatureIndex++;
  26601. if (geomType === 'Polygon') geometryIndex++;
  26602. }
  26603. if (geomType === 'Polygon') multiFeatureIndex++;
  26604. break;
  26605. case 'MultiPolygon':
  26606. for (j = 0; j < coords.length; j++) {
  26607. if (geomType === 'MultiPolygon') geometryIndex = 0;
  26608. for (k = 0; k < coords[j].length; k++) {
  26609. for (l = 0; l < coords[j][k].length - wrapShrink; l++) {
  26610. if (callback(coords[j][k][l], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  26611. coordIndex++;
  26612. }
  26613. geometryIndex++;
  26614. }
  26615. multiFeatureIndex++;
  26616. }
  26617. break;
  26618. case 'GeometryCollection':
  26619. for (j = 0; j < geometry.geometries.length; j++) {
  26620. if (_turf_meta_main_es_coordEach(geometry.geometries[j], callback, excludeWrapCoord) === false) return false;
  26621. }
  26622. break;
  26623. default:
  26624. throw new Error('Unknown Geometry Type');
  26625. }
  26626. }
  26627. }
  26628. }
  26629. /**
  26630. * Callback for coordReduce
  26631. *
  26632. * The first time the callback function is called, the values provided as arguments depend
  26633. * on whether the reduce method has an initialValue argument.
  26634. *
  26635. * If an initialValue is provided to the reduce method:
  26636. * - The previousValue argument is initialValue.
  26637. * - The currentValue argument is the value of the first element present in the array.
  26638. *
  26639. * If an initialValue is not provided:
  26640. * - The previousValue argument is the value of the first element present in the array.
  26641. * - The currentValue argument is the value of the second element present in the array.
  26642. *
  26643. * @callback coordReduceCallback
  26644. * @param {*} previousValue The accumulated value previously returned in the last invocation
  26645. * of the callback, or initialValue, if supplied.
  26646. * @param {Array<number>} currentCoord The current coordinate being processed.
  26647. * @param {number} coordIndex The current index of the coordinate being processed.
  26648. * Starts at index 0, if an initialValue is provided, and at index 1 otherwise.
  26649. * @param {number} featureIndex The current index of the Feature being processed.
  26650. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  26651. * @param {number} geometryIndex The current index of the Geometry being processed.
  26652. */
  26653. /**
  26654. * Reduce coordinates in any GeoJSON object, similar to Array.reduce()
  26655. *
  26656. * @name coordReduce
  26657. * @param {FeatureCollection|Geometry|Feature} geojson any GeoJSON object
  26658. * @param {Function} callback a method that takes (previousValue, currentCoord, coordIndex)
  26659. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  26660. * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.
  26661. * @returns {*} The value that results from the reduction.
  26662. * @example
  26663. * var features = turf.featureCollection([
  26664. * turf.point([26, 37], {"foo": "bar"}),
  26665. * turf.point([36, 53], {"hello": "world"})
  26666. * ]);
  26667. *
  26668. * turf.coordReduce(features, function (previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  26669. * //=previousValue
  26670. * //=currentCoord
  26671. * //=coordIndex
  26672. * //=featureIndex
  26673. * //=multiFeatureIndex
  26674. * //=geometryIndex
  26675. * return currentCoord;
  26676. * });
  26677. */
  26678. function _turf_meta_main_es_coordReduce(geojson, callback, initialValue, excludeWrapCoord) {
  26679. var previousValue = initialValue;
  26680. _turf_meta_main_es_coordEach(geojson, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  26681. if (coordIndex === 0 && initialValue === undefined) previousValue = currentCoord;else previousValue = callback(previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex);
  26682. }, excludeWrapCoord);
  26683. return previousValue;
  26684. }
  26685. /**
  26686. * Callback for propEach
  26687. *
  26688. * @callback propEachCallback
  26689. * @param {Object} currentProperties The current Properties being processed.
  26690. * @param {number} featureIndex The current index of the Feature being processed.
  26691. */
  26692. /**
  26693. * Iterate over properties in any GeoJSON object, similar to Array.forEach()
  26694. *
  26695. * @name propEach
  26696. * @param {FeatureCollection|Feature} geojson any GeoJSON object
  26697. * @param {Function} callback a method that takes (currentProperties, featureIndex)
  26698. * @returns {void}
  26699. * @example
  26700. * var features = turf.featureCollection([
  26701. * turf.point([26, 37], {foo: 'bar'}),
  26702. * turf.point([36, 53], {hello: 'world'})
  26703. * ]);
  26704. *
  26705. * turf.propEach(features, function (currentProperties, featureIndex) {
  26706. * //=currentProperties
  26707. * //=featureIndex
  26708. * });
  26709. */
  26710. function _turf_meta_main_es_propEach(geojson, callback) {
  26711. var i;
  26712. switch (geojson.type) {
  26713. case 'FeatureCollection':
  26714. for (i = 0; i < geojson.features.length; i++) {
  26715. if (callback(geojson.features[i].properties, i) === false) break;
  26716. }
  26717. break;
  26718. case 'Feature':
  26719. callback(geojson.properties, 0);
  26720. break;
  26721. }
  26722. }
  26723. /**
  26724. * Callback for propReduce
  26725. *
  26726. * The first time the callback function is called, the values provided as arguments depend
  26727. * on whether the reduce method has an initialValue argument.
  26728. *
  26729. * If an initialValue is provided to the reduce method:
  26730. * - The previousValue argument is initialValue.
  26731. * - The currentValue argument is the value of the first element present in the array.
  26732. *
  26733. * If an initialValue is not provided:
  26734. * - The previousValue argument is the value of the first element present in the array.
  26735. * - The currentValue argument is the value of the second element present in the array.
  26736. *
  26737. * @callback propReduceCallback
  26738. * @param {*} previousValue The accumulated value previously returned in the last invocation
  26739. * of the callback, or initialValue, if supplied.
  26740. * @param {*} currentProperties The current Properties being processed.
  26741. * @param {number} featureIndex The current index of the Feature being processed.
  26742. */
  26743. /**
  26744. * Reduce properties in any GeoJSON object into a single value,
  26745. * similar to how Array.reduce works. However, in this case we lazily run
  26746. * the reduction, so an array of all properties is unnecessary.
  26747. *
  26748. * @name propReduce
  26749. * @param {FeatureCollection|Feature} geojson any GeoJSON object
  26750. * @param {Function} callback a method that takes (previousValue, currentProperties, featureIndex)
  26751. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  26752. * @returns {*} The value that results from the reduction.
  26753. * @example
  26754. * var features = turf.featureCollection([
  26755. * turf.point([26, 37], {foo: 'bar'}),
  26756. * turf.point([36, 53], {hello: 'world'})
  26757. * ]);
  26758. *
  26759. * turf.propReduce(features, function (previousValue, currentProperties, featureIndex) {
  26760. * //=previousValue
  26761. * //=currentProperties
  26762. * //=featureIndex
  26763. * return currentProperties
  26764. * });
  26765. */
  26766. function _turf_meta_main_es_propReduce(geojson, callback, initialValue) {
  26767. var previousValue = initialValue;
  26768. _turf_meta_main_es_propEach(geojson, function (currentProperties, featureIndex) {
  26769. if (featureIndex === 0 && initialValue === undefined) previousValue = currentProperties;else previousValue = callback(previousValue, currentProperties, featureIndex);
  26770. });
  26771. return previousValue;
  26772. }
  26773. /**
  26774. * Callback for featureEach
  26775. *
  26776. * @callback featureEachCallback
  26777. * @param {Feature<any>} currentFeature The current Feature being processed.
  26778. * @param {number} featureIndex The current index of the Feature being processed.
  26779. */
  26780. /**
  26781. * Iterate over features in any GeoJSON object, similar to
  26782. * Array.forEach.
  26783. *
  26784. * @name featureEach
  26785. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  26786. * @param {Function} callback a method that takes (currentFeature, featureIndex)
  26787. * @returns {void}
  26788. * @example
  26789. * var features = turf.featureCollection([
  26790. * turf.point([26, 37], {foo: 'bar'}),
  26791. * turf.point([36, 53], {hello: 'world'})
  26792. * ]);
  26793. *
  26794. * turf.featureEach(features, function (currentFeature, featureIndex) {
  26795. * //=currentFeature
  26796. * //=featureIndex
  26797. * });
  26798. */
  26799. function _turf_meta_main_es_featureEach(geojson, callback) {
  26800. if (geojson.type === 'Feature') {
  26801. callback(geojson, 0);
  26802. } else if (geojson.type === 'FeatureCollection') {
  26803. for (var i = 0; i < geojson.features.length; i++) {
  26804. if (callback(geojson.features[i], i) === false) break;
  26805. }
  26806. }
  26807. }
  26808. /**
  26809. * Callback for featureReduce
  26810. *
  26811. * The first time the callback function is called, the values provided as arguments depend
  26812. * on whether the reduce method has an initialValue argument.
  26813. *
  26814. * If an initialValue is provided to the reduce method:
  26815. * - The previousValue argument is initialValue.
  26816. * - The currentValue argument is the value of the first element present in the array.
  26817. *
  26818. * If an initialValue is not provided:
  26819. * - The previousValue argument is the value of the first element present in the array.
  26820. * - The currentValue argument is the value of the second element present in the array.
  26821. *
  26822. * @callback featureReduceCallback
  26823. * @param {*} previousValue The accumulated value previously returned in the last invocation
  26824. * of the callback, or initialValue, if supplied.
  26825. * @param {Feature} currentFeature The current Feature being processed.
  26826. * @param {number} featureIndex The current index of the Feature being processed.
  26827. */
  26828. /**
  26829. * Reduce features in any GeoJSON object, similar to Array.reduce().
  26830. *
  26831. * @name featureReduce
  26832. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  26833. * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex)
  26834. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  26835. * @returns {*} The value that results from the reduction.
  26836. * @example
  26837. * var features = turf.featureCollection([
  26838. * turf.point([26, 37], {"foo": "bar"}),
  26839. * turf.point([36, 53], {"hello": "world"})
  26840. * ]);
  26841. *
  26842. * turf.featureReduce(features, function (previousValue, currentFeature, featureIndex) {
  26843. * //=previousValue
  26844. * //=currentFeature
  26845. * //=featureIndex
  26846. * return currentFeature
  26847. * });
  26848. */
  26849. function _turf_meta_main_es_featureReduce(geojson, callback, initialValue) {
  26850. var previousValue = initialValue;
  26851. _turf_meta_main_es_featureEach(geojson, function (currentFeature, featureIndex) {
  26852. if (featureIndex === 0 && initialValue === undefined) previousValue = currentFeature;else previousValue = callback(previousValue, currentFeature, featureIndex);
  26853. });
  26854. return previousValue;
  26855. }
  26856. /**
  26857. * Get all coordinates from any GeoJSON object.
  26858. *
  26859. * @name coordAll
  26860. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  26861. * @returns {Array<Array<number>>} coordinate position array
  26862. * @example
  26863. * var features = turf.featureCollection([
  26864. * turf.point([26, 37], {foo: 'bar'}),
  26865. * turf.point([36, 53], {hello: 'world'})
  26866. * ]);
  26867. *
  26868. * var coords = turf.coordAll(features);
  26869. * //= [[26, 37], [36, 53]]
  26870. */
  26871. function _turf_meta_main_es_coordAll(geojson) {
  26872. var coords = [];
  26873. _turf_meta_main_es_coordEach(geojson, function (coord) {
  26874. coords.push(coord);
  26875. });
  26876. return coords;
  26877. }
  26878. /**
  26879. * Callback for geomEach
  26880. *
  26881. * @callback geomEachCallback
  26882. * @param {Geometry} currentGeometry The current Geometry being processed.
  26883. * @param {number} featureIndex The current index of the Feature being processed.
  26884. * @param {Object} featureProperties The current Feature Properties being processed.
  26885. * @param {Array<number>} featureBBox The current Feature BBox being processed.
  26886. * @param {number|string} featureId The current Feature Id being processed.
  26887. */
  26888. /**
  26889. * Iterate over each geometry in any GeoJSON object, similar to Array.forEach()
  26890. *
  26891. * @name geomEach
  26892. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  26893. * @param {Function} callback a method that takes (currentGeometry, featureIndex, featureProperties, featureBBox, featureId)
  26894. * @returns {void}
  26895. * @example
  26896. * var features = turf.featureCollection([
  26897. * turf.point([26, 37], {foo: 'bar'}),
  26898. * turf.point([36, 53], {hello: 'world'})
  26899. * ]);
  26900. *
  26901. * turf.geomEach(features, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  26902. * //=currentGeometry
  26903. * //=featureIndex
  26904. * //=featureProperties
  26905. * //=featureBBox
  26906. * //=featureId
  26907. * });
  26908. */
  26909. function _turf_meta_main_es_geomEach(geojson, callback) {
  26910. var i,
  26911. j,
  26912. g,
  26913. geometry,
  26914. stopG,
  26915. geometryMaybeCollection,
  26916. isGeometryCollection,
  26917. featureProperties,
  26918. featureBBox,
  26919. featureId,
  26920. featureIndex = 0,
  26921. isFeatureCollection = geojson.type === 'FeatureCollection',
  26922. isFeature = geojson.type === 'Feature',
  26923. stop = isFeatureCollection ? geojson.features.length : 1; // This logic may look a little weird. The reason why it is that way
  26924. // is because it's trying to be fast. GeoJSON supports multiple kinds
  26925. // of objects at its root: FeatureCollection, Features, Geometries.
  26926. // This function has the responsibility of handling all of them, and that
  26927. // means that some of the `for` loops you see below actually just don't apply
  26928. // to certain inputs. For instance, if you give this just a
  26929. // Point geometry, then both loops are short-circuited and all we do
  26930. // is gradually rename the input until it's called 'geometry'.
  26931. //
  26932. // This also aims to allocate as few resources as possible: just a
  26933. // few numbers and booleans, rather than any temporary arrays as would
  26934. // be required with the normalization approach.
  26935. for (i = 0; i < stop; i++) {
  26936. geometryMaybeCollection = isFeatureCollection ? geojson.features[i].geometry : isFeature ? geojson.geometry : geojson;
  26937. featureProperties = isFeatureCollection ? geojson.features[i].properties : isFeature ? geojson.properties : {};
  26938. featureBBox = isFeatureCollection ? geojson.features[i].bbox : isFeature ? geojson.bbox : undefined;
  26939. featureId = isFeatureCollection ? geojson.features[i].id : isFeature ? geojson.id : undefined;
  26940. isGeometryCollection = geometryMaybeCollection ? geometryMaybeCollection.type === 'GeometryCollection' : false;
  26941. stopG = isGeometryCollection ? geometryMaybeCollection.geometries.length : 1;
  26942. for (g = 0; g < stopG; g++) {
  26943. geometry = isGeometryCollection ? geometryMaybeCollection.geometries[g] : geometryMaybeCollection; // Handle null Geometry
  26944. if (geometry === null) {
  26945. if (callback(null, featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  26946. continue;
  26947. }
  26948. switch (geometry.type) {
  26949. case 'Point':
  26950. case 'LineString':
  26951. case 'MultiPoint':
  26952. case 'Polygon':
  26953. case 'MultiLineString':
  26954. case 'MultiPolygon':
  26955. {
  26956. if (callback(geometry, featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  26957. break;
  26958. }
  26959. case 'GeometryCollection':
  26960. {
  26961. for (j = 0; j < geometry.geometries.length; j++) {
  26962. if (callback(geometry.geometries[j], featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  26963. }
  26964. break;
  26965. }
  26966. default:
  26967. throw new Error('Unknown Geometry Type');
  26968. }
  26969. } // Only increase `featureIndex` per each feature
  26970. featureIndex++;
  26971. }
  26972. }
  26973. /**
  26974. * Callback for geomReduce
  26975. *
  26976. * The first time the callback function is called, the values provided as arguments depend
  26977. * on whether the reduce method has an initialValue argument.
  26978. *
  26979. * If an initialValue is provided to the reduce method:
  26980. * - The previousValue argument is initialValue.
  26981. * - The currentValue argument is the value of the first element present in the array.
  26982. *
  26983. * If an initialValue is not provided:
  26984. * - The previousValue argument is the value of the first element present in the array.
  26985. * - The currentValue argument is the value of the second element present in the array.
  26986. *
  26987. * @callback geomReduceCallback
  26988. * @param {*} previousValue The accumulated value previously returned in the last invocation
  26989. * of the callback, or initialValue, if supplied.
  26990. * @param {Geometry} currentGeometry The current Geometry being processed.
  26991. * @param {number} featureIndex The current index of the Feature being processed.
  26992. * @param {Object} featureProperties The current Feature Properties being processed.
  26993. * @param {Array<number>} featureBBox The current Feature BBox being processed.
  26994. * @param {number|string} featureId The current Feature Id being processed.
  26995. */
  26996. /**
  26997. * Reduce geometry in any GeoJSON object, similar to Array.reduce().
  26998. *
  26999. * @name geomReduce
  27000. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  27001. * @param {Function} callback a method that takes (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId)
  27002. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  27003. * @returns {*} The value that results from the reduction.
  27004. * @example
  27005. * var features = turf.featureCollection([
  27006. * turf.point([26, 37], {foo: 'bar'}),
  27007. * turf.point([36, 53], {hello: 'world'})
  27008. * ]);
  27009. *
  27010. * turf.geomReduce(features, function (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  27011. * //=previousValue
  27012. * //=currentGeometry
  27013. * //=featureIndex
  27014. * //=featureProperties
  27015. * //=featureBBox
  27016. * //=featureId
  27017. * return currentGeometry
  27018. * });
  27019. */
  27020. function _turf_meta_main_es_geomReduce(geojson, callback, initialValue) {
  27021. var previousValue = initialValue;
  27022. _turf_meta_main_es_geomEach(geojson, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  27023. if (featureIndex === 0 && initialValue === undefined) previousValue = currentGeometry;else previousValue = callback(previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId);
  27024. });
  27025. return previousValue;
  27026. }
  27027. /**
  27028. * Callback for flattenEach
  27029. *
  27030. * @callback flattenEachCallback
  27031. * @param {Feature} currentFeature The current flattened feature being processed.
  27032. * @param {number} featureIndex The current index of the Feature being processed.
  27033. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  27034. */
  27035. /**
  27036. * Iterate over flattened features in any GeoJSON object, similar to
  27037. * Array.forEach.
  27038. *
  27039. * @name flattenEach
  27040. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  27041. * @param {Function} callback a method that takes (currentFeature, featureIndex, multiFeatureIndex)
  27042. * @example
  27043. * var features = turf.featureCollection([
  27044. * turf.point([26, 37], {foo: 'bar'}),
  27045. * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})
  27046. * ]);
  27047. *
  27048. * turf.flattenEach(features, function (currentFeature, featureIndex, multiFeatureIndex) {
  27049. * //=currentFeature
  27050. * //=featureIndex
  27051. * //=multiFeatureIndex
  27052. * });
  27053. */
  27054. function _turf_meta_main_es_flattenEach(geojson, callback) {
  27055. _turf_meta_main_es_geomEach(geojson, function (geometry, featureIndex, properties, bbox, id) {
  27056. // Callback for single geometry
  27057. var type = geometry === null ? null : geometry.type;
  27058. switch (type) {
  27059. case null:
  27060. case 'Point':
  27061. case 'LineString':
  27062. case 'Polygon':
  27063. if (callback(transform_scale_node_modules_turf_helpers_main_es_feature(geometry, properties, {
  27064. bbox: bbox,
  27065. id: id
  27066. }), featureIndex, 0) === false) return false;
  27067. return;
  27068. }
  27069. var geomType; // Callback for multi-geometry
  27070. switch (type) {
  27071. case 'MultiPoint':
  27072. geomType = 'Point';
  27073. break;
  27074. case 'MultiLineString':
  27075. geomType = 'LineString';
  27076. break;
  27077. case 'MultiPolygon':
  27078. geomType = 'Polygon';
  27079. break;
  27080. }
  27081. for (var multiFeatureIndex = 0; multiFeatureIndex < geometry.coordinates.length; multiFeatureIndex++) {
  27082. var coordinate = geometry.coordinates[multiFeatureIndex];
  27083. var geom = {
  27084. type: geomType,
  27085. coordinates: coordinate
  27086. };
  27087. if (callback(transform_scale_node_modules_turf_helpers_main_es_feature(geom, properties), featureIndex, multiFeatureIndex) === false) return false;
  27088. }
  27089. });
  27090. }
  27091. /**
  27092. * Callback for flattenReduce
  27093. *
  27094. * The first time the callback function is called, the values provided as arguments depend
  27095. * on whether the reduce method has an initialValue argument.
  27096. *
  27097. * If an initialValue is provided to the reduce method:
  27098. * - The previousValue argument is initialValue.
  27099. * - The currentValue argument is the value of the first element present in the array.
  27100. *
  27101. * If an initialValue is not provided:
  27102. * - The previousValue argument is the value of the first element present in the array.
  27103. * - The currentValue argument is the value of the second element present in the array.
  27104. *
  27105. * @callback flattenReduceCallback
  27106. * @param {*} previousValue The accumulated value previously returned in the last invocation
  27107. * of the callback, or initialValue, if supplied.
  27108. * @param {Feature} currentFeature The current Feature being processed.
  27109. * @param {number} featureIndex The current index of the Feature being processed.
  27110. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  27111. */
  27112. /**
  27113. * Reduce flattened features in any GeoJSON object, similar to Array.reduce().
  27114. *
  27115. * @name flattenReduce
  27116. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  27117. * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex, multiFeatureIndex)
  27118. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  27119. * @returns {*} The value that results from the reduction.
  27120. * @example
  27121. * var features = turf.featureCollection([
  27122. * turf.point([26, 37], {foo: 'bar'}),
  27123. * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})
  27124. * ]);
  27125. *
  27126. * turf.flattenReduce(features, function (previousValue, currentFeature, featureIndex, multiFeatureIndex) {
  27127. * //=previousValue
  27128. * //=currentFeature
  27129. * //=featureIndex
  27130. * //=multiFeatureIndex
  27131. * return currentFeature
  27132. * });
  27133. */
  27134. function _turf_meta_main_es_flattenReduce(geojson, callback, initialValue) {
  27135. var previousValue = initialValue;
  27136. _turf_meta_main_es_flattenEach(geojson, function (currentFeature, featureIndex, multiFeatureIndex) {
  27137. if (featureIndex === 0 && multiFeatureIndex === 0 && initialValue === undefined) previousValue = currentFeature;else previousValue = callback(previousValue, currentFeature, featureIndex, multiFeatureIndex);
  27138. });
  27139. return previousValue;
  27140. }
  27141. /**
  27142. * Callback for segmentEach
  27143. *
  27144. * @callback segmentEachCallback
  27145. * @param {Feature<LineString>} currentSegment The current Segment being processed.
  27146. * @param {number} featureIndex The current index of the Feature being processed.
  27147. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  27148. * @param {number} geometryIndex The current index of the Geometry being processed.
  27149. * @param {number} segmentIndex The current index of the Segment being processed.
  27150. * @returns {void}
  27151. */
  27152. /**
  27153. * Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEach()
  27154. * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  27155. *
  27156. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON
  27157. * @param {Function} callback a method that takes (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex)
  27158. * @returns {void}
  27159. * @example
  27160. * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);
  27161. *
  27162. * // Iterate over GeoJSON by 2-vertex segments
  27163. * turf.segmentEach(polygon, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  27164. * //=currentSegment
  27165. * //=featureIndex
  27166. * //=multiFeatureIndex
  27167. * //=geometryIndex
  27168. * //=segmentIndex
  27169. * });
  27170. *
  27171. * // Calculate the total number of segments
  27172. * var total = 0;
  27173. * turf.segmentEach(polygon, function () {
  27174. * total++;
  27175. * });
  27176. */
  27177. function _turf_meta_main_es_segmentEach(geojson, callback) {
  27178. _turf_meta_main_es_flattenEach(geojson, function (feature$$1, featureIndex, multiFeatureIndex) {
  27179. var segmentIndex = 0; // Exclude null Geometries
  27180. if (!feature$$1.geometry) return; // (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  27181. var type = feature$$1.geometry.type;
  27182. if (type === 'Point' || type === 'MultiPoint') return; // Generate 2-vertex line segments
  27183. var previousCoords;
  27184. if (_turf_meta_main_es_coordEach(feature$$1, function (currentCoord, coordIndex, featureIndexCoord, mutliPartIndexCoord, geometryIndex) {
  27185. // Simulating a meta.coordReduce() since `reduce` operations cannot be stopped by returning `false`
  27186. if (previousCoords === undefined) {
  27187. previousCoords = currentCoord;
  27188. return;
  27189. }
  27190. var currentSegment = node_modules_turf_helpers_main_es_lineString([previousCoords, currentCoord], feature$$1.properties);
  27191. if (callback(currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) === false) return false;
  27192. segmentIndex++;
  27193. previousCoords = currentCoord;
  27194. }) === false) return false;
  27195. });
  27196. }
  27197. /**
  27198. * Callback for segmentReduce
  27199. *
  27200. * The first time the callback function is called, the values provided as arguments depend
  27201. * on whether the reduce method has an initialValue argument.
  27202. *
  27203. * If an initialValue is provided to the reduce method:
  27204. * - The previousValue argument is initialValue.
  27205. * - The currentValue argument is the value of the first element present in the array.
  27206. *
  27207. * If an initialValue is not provided:
  27208. * - The previousValue argument is the value of the first element present in the array.
  27209. * - The currentValue argument is the value of the second element present in the array.
  27210. *
  27211. * @callback segmentReduceCallback
  27212. * @param {*} previousValue The accumulated value previously returned in the last invocation
  27213. * of the callback, or initialValue, if supplied.
  27214. * @param {Feature<LineString>} currentSegment The current Segment being processed.
  27215. * @param {number} featureIndex The current index of the Feature being processed.
  27216. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  27217. * @param {number} geometryIndex The current index of the Geometry being processed.
  27218. * @param {number} segmentIndex The current index of the Segment being processed.
  27219. */
  27220. /**
  27221. * Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce()
  27222. * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  27223. *
  27224. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON
  27225. * @param {Function} callback a method that takes (previousValue, currentSegment, currentIndex)
  27226. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  27227. * @returns {void}
  27228. * @example
  27229. * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);
  27230. *
  27231. * // Iterate over GeoJSON by 2-vertex segments
  27232. * turf.segmentReduce(polygon, function (previousSegment, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  27233. * //= previousSegment
  27234. * //= currentSegment
  27235. * //= featureIndex
  27236. * //= multiFeatureIndex
  27237. * //= geometryIndex
  27238. * //= segmentInex
  27239. * return currentSegment
  27240. * });
  27241. *
  27242. * // Calculate the total number of segments
  27243. * var initialValue = 0
  27244. * var total = turf.segmentReduce(polygon, function (previousValue) {
  27245. * previousValue++;
  27246. * return previousValue;
  27247. * }, initialValue);
  27248. */
  27249. function _turf_meta_main_es_segmentReduce(geojson, callback, initialValue) {
  27250. var previousValue = initialValue;
  27251. var started = false;
  27252. _turf_meta_main_es_segmentEach(geojson, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  27253. if (started === false && initialValue === undefined) previousValue = currentSegment;else previousValue = callback(previousValue, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex);
  27254. started = true;
  27255. });
  27256. return previousValue;
  27257. }
  27258. /**
  27259. * Callback for lineEach
  27260. *
  27261. * @callback lineEachCallback
  27262. * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed
  27263. * @param {number} featureIndex The current index of the Feature being processed
  27264. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed
  27265. * @param {number} geometryIndex The current index of the Geometry being processed
  27266. */
  27267. /**
  27268. * Iterate over line or ring coordinates in LineString, Polygon, MultiLineString, MultiPolygon Features or Geometries,
  27269. * similar to Array.forEach.
  27270. *
  27271. * @name lineEach
  27272. * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object
  27273. * @param {Function} callback a method that takes (currentLine, featureIndex, multiFeatureIndex, geometryIndex)
  27274. * @example
  27275. * var multiLine = turf.multiLineString([
  27276. * [[26, 37], [35, 45]],
  27277. * [[36, 53], [38, 50], [41, 55]]
  27278. * ]);
  27279. *
  27280. * turf.lineEach(multiLine, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  27281. * //=currentLine
  27282. * //=featureIndex
  27283. * //=multiFeatureIndex
  27284. * //=geometryIndex
  27285. * });
  27286. */
  27287. function _turf_meta_main_es_lineEach(geojson, callback) {
  27288. // validation
  27289. if (!geojson) throw new Error('geojson is required');
  27290. _turf_meta_main_es_flattenEach(geojson, function (feature$$1, featureIndex, multiFeatureIndex) {
  27291. if (feature$$1.geometry === null) return;
  27292. var type = feature$$1.geometry.type;
  27293. var coords = feature$$1.geometry.coordinates;
  27294. switch (type) {
  27295. case 'LineString':
  27296. if (callback(feature$$1, featureIndex, multiFeatureIndex, 0, 0) === false) return false;
  27297. break;
  27298. case 'Polygon':
  27299. for (var geometryIndex = 0; geometryIndex < coords.length; geometryIndex++) {
  27300. if (callback(node_modules_turf_helpers_main_es_lineString(coords[geometryIndex], feature$$1.properties), featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  27301. }
  27302. break;
  27303. }
  27304. });
  27305. }
  27306. /**
  27307. * Callback for lineReduce
  27308. *
  27309. * The first time the callback function is called, the values provided as arguments depend
  27310. * on whether the reduce method has an initialValue argument.
  27311. *
  27312. * If an initialValue is provided to the reduce method:
  27313. * - The previousValue argument is initialValue.
  27314. * - The currentValue argument is the value of the first element present in the array.
  27315. *
  27316. * If an initialValue is not provided:
  27317. * - The previousValue argument is the value of the first element present in the array.
  27318. * - The currentValue argument is the value of the second element present in the array.
  27319. *
  27320. * @callback lineReduceCallback
  27321. * @param {*} previousValue The accumulated value previously returned in the last invocation
  27322. * of the callback, or initialValue, if supplied.
  27323. * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed.
  27324. * @param {number} featureIndex The current index of the Feature being processed
  27325. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed
  27326. * @param {number} geometryIndex The current index of the Geometry being processed
  27327. */
  27328. /**
  27329. * Reduce features in any GeoJSON object, similar to Array.reduce().
  27330. *
  27331. * @name lineReduce
  27332. * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object
  27333. * @param {Function} callback a method that takes (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex)
  27334. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  27335. * @returns {*} The value that results from the reduction.
  27336. * @example
  27337. * var multiPoly = turf.multiPolygon([
  27338. * turf.polygon([[[12,48],[2,41],[24,38],[12,48]], [[9,44],[13,41],[13,45],[9,44]]]),
  27339. * turf.polygon([[[5, 5], [0, 0], [2, 2], [4, 4], [5, 5]]])
  27340. * ]);
  27341. *
  27342. * turf.lineReduce(multiPoly, function (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  27343. * //=previousValue
  27344. * //=currentLine
  27345. * //=featureIndex
  27346. * //=multiFeatureIndex
  27347. * //=geometryIndex
  27348. * return currentLine
  27349. * });
  27350. */
  27351. function _turf_meta_main_es_lineReduce(geojson, callback, initialValue) {
  27352. var previousValue = initialValue;
  27353. _turf_meta_main_es_lineEach(geojson, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  27354. if (featureIndex === 0 && initialValue === undefined) previousValue = currentLine;else previousValue = callback(previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex);
  27355. });
  27356. return previousValue;
  27357. }
  27358. /**
  27359. * Finds a particular 2-vertex LineString Segment from a GeoJSON using `@turf/meta` indexes.
  27360. *
  27361. * Negative indexes are permitted.
  27362. * Point & MultiPoint will always return null.
  27363. *
  27364. * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry
  27365. * @param {Object} [options={}] Optional parameters
  27366. * @param {number} [options.featureIndex=0] Feature Index
  27367. * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index
  27368. * @param {number} [options.geometryIndex=0] Geometry Index
  27369. * @param {number} [options.segmentIndex=0] Segment Index
  27370. * @param {Object} [options.properties={}] Translate Properties to output LineString
  27371. * @param {BBox} [options.bbox={}] Translate BBox to output LineString
  27372. * @param {number|string} [options.id={}] Translate Id to output LineString
  27373. * @returns {Feature<LineString>} 2-vertex GeoJSON Feature LineString
  27374. * @example
  27375. * var multiLine = turf.multiLineString([
  27376. * [[10, 10], [50, 30], [30, 40]],
  27377. * [[-10, -10], [-50, -30], [-30, -40]]
  27378. * ]);
  27379. *
  27380. * // First Segment (defaults are 0)
  27381. * turf.findSegment(multiLine);
  27382. * // => Feature<LineString<[[10, 10], [50, 30]]>>
  27383. *
  27384. * // First Segment of 2nd Multi Feature
  27385. * turf.findSegment(multiLine, {multiFeatureIndex: 1});
  27386. * // => Feature<LineString<[[-10, -10], [-50, -30]]>>
  27387. *
  27388. * // Last Segment of Last Multi Feature
  27389. * turf.findSegment(multiLine, {multiFeatureIndex: -1, segmentIndex: -1});
  27390. * // => Feature<LineString<[[-50, -30], [-30, -40]]>>
  27391. */
  27392. function _turf_meta_main_es_findSegment(geojson, options) {
  27393. // Optional Parameters
  27394. options = options || {};
  27395. if (!node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  27396. var featureIndex = options.featureIndex || 0;
  27397. var multiFeatureIndex = options.multiFeatureIndex || 0;
  27398. var geometryIndex = options.geometryIndex || 0;
  27399. var segmentIndex = options.segmentIndex || 0; // Find FeatureIndex
  27400. var properties = options.properties;
  27401. var geometry;
  27402. switch (geojson.type) {
  27403. case 'FeatureCollection':
  27404. if (featureIndex < 0) featureIndex = geojson.features.length + featureIndex;
  27405. properties = properties || geojson.features[featureIndex].properties;
  27406. geometry = geojson.features[featureIndex].geometry;
  27407. break;
  27408. case 'Feature':
  27409. properties = properties || geojson.properties;
  27410. geometry = geojson.geometry;
  27411. break;
  27412. case 'Point':
  27413. case 'MultiPoint':
  27414. return null;
  27415. case 'LineString':
  27416. case 'Polygon':
  27417. case 'MultiLineString':
  27418. case 'MultiPolygon':
  27419. geometry = geojson;
  27420. break;
  27421. default:
  27422. throw new Error('geojson is invalid');
  27423. } // Find SegmentIndex
  27424. if (geometry === null) return null;
  27425. var coords = geometry.coordinates;
  27426. switch (geometry.type) {
  27427. case 'Point':
  27428. case 'MultiPoint':
  27429. return null;
  27430. case 'LineString':
  27431. if (segmentIndex < 0) segmentIndex = coords.length + segmentIndex - 1;
  27432. return node_modules_turf_helpers_main_es_lineString([coords[segmentIndex], coords[segmentIndex + 1]], properties, options);
  27433. case 'Polygon':
  27434. if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;
  27435. if (segmentIndex < 0) segmentIndex = coords[geometryIndex].length + segmentIndex - 1;
  27436. return node_modules_turf_helpers_main_es_lineString([coords[geometryIndex][segmentIndex], coords[geometryIndex][segmentIndex + 1]], properties, options);
  27437. case 'MultiLineString':
  27438. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  27439. if (segmentIndex < 0) segmentIndex = coords[multiFeatureIndex].length + segmentIndex - 1;
  27440. return node_modules_turf_helpers_main_es_lineString([coords[multiFeatureIndex][segmentIndex], coords[multiFeatureIndex][segmentIndex + 1]], properties, options);
  27441. case 'MultiPolygon':
  27442. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  27443. if (geometryIndex < 0) geometryIndex = coords[multiFeatureIndex].length + geometryIndex;
  27444. if (segmentIndex < 0) segmentIndex = coords[multiFeatureIndex][geometryIndex].length - segmentIndex - 1;
  27445. return node_modules_turf_helpers_main_es_lineString([coords[multiFeatureIndex][geometryIndex][segmentIndex], coords[multiFeatureIndex][geometryIndex][segmentIndex + 1]], properties, options);
  27446. }
  27447. throw new Error('geojson is invalid');
  27448. }
  27449. /**
  27450. * Finds a particular Point from a GeoJSON using `@turf/meta` indexes.
  27451. *
  27452. * Negative indexes are permitted.
  27453. *
  27454. * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry
  27455. * @param {Object} [options={}] Optional parameters
  27456. * @param {number} [options.featureIndex=0] Feature Index
  27457. * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index
  27458. * @param {number} [options.geometryIndex=0] Geometry Index
  27459. * @param {number} [options.coordIndex=0] Coord Index
  27460. * @param {Object} [options.properties={}] Translate Properties to output Point
  27461. * @param {BBox} [options.bbox={}] Translate BBox to output Point
  27462. * @param {number|string} [options.id={}] Translate Id to output Point
  27463. * @returns {Feature<Point>} 2-vertex GeoJSON Feature Point
  27464. * @example
  27465. * var multiLine = turf.multiLineString([
  27466. * [[10, 10], [50, 30], [30, 40]],
  27467. * [[-10, -10], [-50, -30], [-30, -40]]
  27468. * ]);
  27469. *
  27470. * // First Segment (defaults are 0)
  27471. * turf.findPoint(multiLine);
  27472. * // => Feature<Point<[10, 10]>>
  27473. *
  27474. * // First Segment of the 2nd Multi-Feature
  27475. * turf.findPoint(multiLine, {multiFeatureIndex: 1});
  27476. * // => Feature<Point<[-10, -10]>>
  27477. *
  27478. * // Last Segment of last Multi-Feature
  27479. * turf.findPoint(multiLine, {multiFeatureIndex: -1, coordIndex: -1});
  27480. * // => Feature<Point<[-30, -40]>>
  27481. */
  27482. function _turf_meta_main_es_findPoint(geojson, options) {
  27483. // Optional Parameters
  27484. options = options || {};
  27485. if (!node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  27486. var featureIndex = options.featureIndex || 0;
  27487. var multiFeatureIndex = options.multiFeatureIndex || 0;
  27488. var geometryIndex = options.geometryIndex || 0;
  27489. var coordIndex = options.coordIndex || 0; // Find FeatureIndex
  27490. var properties = options.properties;
  27491. var geometry;
  27492. switch (geojson.type) {
  27493. case 'FeatureCollection':
  27494. if (featureIndex < 0) featureIndex = geojson.features.length + featureIndex;
  27495. properties = properties || geojson.features[featureIndex].properties;
  27496. geometry = geojson.features[featureIndex].geometry;
  27497. break;
  27498. case 'Feature':
  27499. properties = properties || geojson.properties;
  27500. geometry = geojson.geometry;
  27501. break;
  27502. case 'Point':
  27503. case 'MultiPoint':
  27504. return null;
  27505. case 'LineString':
  27506. case 'Polygon':
  27507. case 'MultiLineString':
  27508. case 'MultiPolygon':
  27509. geometry = geojson;
  27510. break;
  27511. default:
  27512. throw new Error('geojson is invalid');
  27513. } // Find Coord Index
  27514. if (geometry === null) return null;
  27515. var coords = geometry.coordinates;
  27516. switch (geometry.type) {
  27517. case 'Point':
  27518. return transform_scale_node_modules_turf_helpers_main_es_point(coords, properties, options);
  27519. case 'MultiPoint':
  27520. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  27521. return transform_scale_node_modules_turf_helpers_main_es_point(coords[multiFeatureIndex], properties, options);
  27522. case 'LineString':
  27523. if (coordIndex < 0) coordIndex = coords.length + coordIndex;
  27524. return transform_scale_node_modules_turf_helpers_main_es_point(coords[coordIndex], properties, options);
  27525. case 'Polygon':
  27526. if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;
  27527. if (coordIndex < 0) coordIndex = coords[geometryIndex].length + coordIndex;
  27528. return transform_scale_node_modules_turf_helpers_main_es_point(coords[geometryIndex][coordIndex], properties, options);
  27529. case 'MultiLineString':
  27530. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  27531. if (coordIndex < 0) coordIndex = coords[multiFeatureIndex].length + coordIndex;
  27532. return transform_scale_node_modules_turf_helpers_main_es_point(coords[multiFeatureIndex][coordIndex], properties, options);
  27533. case 'MultiPolygon':
  27534. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  27535. if (geometryIndex < 0) geometryIndex = coords[multiFeatureIndex].length + geometryIndex;
  27536. if (coordIndex < 0) coordIndex = coords[multiFeatureIndex][geometryIndex].length - coordIndex;
  27537. return transform_scale_node_modules_turf_helpers_main_es_point(coords[multiFeatureIndex][geometryIndex][coordIndex], properties, options);
  27538. }
  27539. throw new Error('geojson is invalid');
  27540. }
  27541. // CONCATENATED MODULE: ./node_modules/@turf/transform-scale/node_modules/@turf/bbox/main.es.js
  27542. /**
  27543. * Takes a set of features, calculates the bbox of all input features, and returns a bounding box.
  27544. *
  27545. * @name bbox
  27546. * @param {GeoJSON} geojson any GeoJSON object
  27547. * @returns {BBox} bbox extent in [minX, minY, maxX, maxY] order
  27548. * @example
  27549. * var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]]);
  27550. * var bbox = turf.bbox(line);
  27551. * var bboxPolygon = turf.bboxPolygon(bbox);
  27552. *
  27553. * //addToMap
  27554. * var addToMap = [line, bboxPolygon]
  27555. */
  27556. function _turf_bbox_main_es_bbox(geojson) {
  27557. var BBox = [Infinity, Infinity, -Infinity, -Infinity];
  27558. _turf_meta_main_es_coordEach(geojson, function (coord) {
  27559. if (BBox[0] > coord[0]) BBox[0] = coord[0];
  27560. if (BBox[1] > coord[1]) BBox[1] = coord[1];
  27561. if (BBox[2] < coord[0]) BBox[2] = coord[0];
  27562. if (BBox[3] < coord[1]) BBox[3] = coord[1];
  27563. });
  27564. return BBox;
  27565. }
  27566. /* harmony default export */ var _turf_bbox_main_es = (_turf_bbox_main_es_bbox);
  27567. // CONCATENATED MODULE: ./node_modules/@turf/invariant/node_modules/@turf/helpers/main.es.js
  27568. /**
  27569. * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.
  27570. */
  27571. var invariant_node_modules_turf_helpers_main_es_earthRadius = 6371008.8;
  27572. /**
  27573. * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.
  27574. */
  27575. var invariant_node_modules_turf_helpers_main_es_factors = {
  27576. meters: invariant_node_modules_turf_helpers_main_es_earthRadius,
  27577. metres: invariant_node_modules_turf_helpers_main_es_earthRadius,
  27578. millimeters: invariant_node_modules_turf_helpers_main_es_earthRadius * 1000,
  27579. millimetres: invariant_node_modules_turf_helpers_main_es_earthRadius * 1000,
  27580. centimeters: invariant_node_modules_turf_helpers_main_es_earthRadius * 100,
  27581. centimetres: invariant_node_modules_turf_helpers_main_es_earthRadius * 100,
  27582. kilometers: invariant_node_modules_turf_helpers_main_es_earthRadius / 1000,
  27583. kilometres: invariant_node_modules_turf_helpers_main_es_earthRadius / 1000,
  27584. miles: invariant_node_modules_turf_helpers_main_es_earthRadius / 1609.344,
  27585. nauticalmiles: invariant_node_modules_turf_helpers_main_es_earthRadius / 1852,
  27586. inches: invariant_node_modules_turf_helpers_main_es_earthRadius * 39.370,
  27587. yards: invariant_node_modules_turf_helpers_main_es_earthRadius / 1.0936,
  27588. feet: invariant_node_modules_turf_helpers_main_es_earthRadius * 3.28084,
  27589. radians: 1,
  27590. degrees: invariant_node_modules_turf_helpers_main_es_earthRadius / 111325
  27591. };
  27592. /**
  27593. * Units of measurement factors based on 1 meter.
  27594. */
  27595. var invariant_node_modules_turf_helpers_main_es_unitsFactors = {
  27596. meters: 1,
  27597. metres: 1,
  27598. millimeters: 1000,
  27599. millimetres: 1000,
  27600. centimeters: 100,
  27601. centimetres: 100,
  27602. kilometers: 1 / 1000,
  27603. kilometres: 1 / 1000,
  27604. miles: 1 / 1609.344,
  27605. nauticalmiles: 1 / 1852,
  27606. inches: 39.370,
  27607. yards: 1 / 1.0936,
  27608. feet: 3.28084,
  27609. radians: 1 / invariant_node_modules_turf_helpers_main_es_earthRadius,
  27610. degrees: 1 / 111325
  27611. };
  27612. /**
  27613. * Area of measurement factors based on 1 square meter.
  27614. */
  27615. var invariant_node_modules_turf_helpers_main_es_areaFactors = {
  27616. meters: 1,
  27617. metres: 1,
  27618. millimeters: 1000000,
  27619. millimetres: 1000000,
  27620. centimeters: 10000,
  27621. centimetres: 10000,
  27622. kilometers: 0.000001,
  27623. kilometres: 0.000001,
  27624. acres: 0.000247105,
  27625. miles: 3.86e-7,
  27626. yards: 1.195990046,
  27627. feet: 10.763910417,
  27628. inches: 1550.003100006
  27629. };
  27630. /**
  27631. * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.
  27632. *
  27633. * @name feature
  27634. * @param {Geometry} geometry input geometry
  27635. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  27636. * @param {Object} [options={}] Optional Parameters
  27637. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  27638. * @param {string|number} [options.id] Identifier associated with the Feature
  27639. * @returns {Feature} a GeoJSON Feature
  27640. * @example
  27641. * var geometry = {
  27642. * "type": "Point",
  27643. * "coordinates": [110, 50]
  27644. * };
  27645. *
  27646. * var feature = turf.feature(geometry);
  27647. *
  27648. * //=feature
  27649. */
  27650. function invariant_node_modules_turf_helpers_main_es_feature(geometry, properties, options) {
  27651. // Optional Parameters
  27652. options = options || {};
  27653. if (!invariant_node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  27654. var bbox = options.bbox;
  27655. var id = options.id; // Validation
  27656. if (geometry === undefined) throw new Error('geometry is required');
  27657. if (properties && properties.constructor !== Object) throw new Error('properties must be an Object');
  27658. if (bbox) invariant_node_modules_turf_helpers_main_es_validateBBox(bbox);
  27659. if (id) invariant_node_modules_turf_helpers_main_es_validateId(id); // Main
  27660. var feat = {
  27661. type: 'Feature'
  27662. };
  27663. if (id) feat.id = id;
  27664. if (bbox) feat.bbox = bbox;
  27665. feat.properties = properties || {};
  27666. feat.geometry = geometry;
  27667. return feat;
  27668. }
  27669. /**
  27670. * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.
  27671. * For GeometryCollection type use `helpers.geometryCollection`
  27672. *
  27673. * @name geometry
  27674. * @param {string} type Geometry Type
  27675. * @param {Array<number>} coordinates Coordinates
  27676. * @param {Object} [options={}] Optional Parameters
  27677. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Geometry
  27678. * @returns {Geometry} a GeoJSON Geometry
  27679. * @example
  27680. * var type = 'Point';
  27681. * var coordinates = [110, 50];
  27682. *
  27683. * var geometry = turf.geometry(type, coordinates);
  27684. *
  27685. * //=geometry
  27686. */
  27687. function invariant_node_modules_turf_helpers_main_es_geometry(type, coordinates, options) {
  27688. // Optional Parameters
  27689. options = options || {};
  27690. if (!invariant_node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  27691. var bbox = options.bbox; // Validation
  27692. if (!type) throw new Error('type is required');
  27693. if (!coordinates) throw new Error('coordinates is required');
  27694. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  27695. if (bbox) invariant_node_modules_turf_helpers_main_es_validateBBox(bbox); // Main
  27696. var geom;
  27697. switch (type) {
  27698. case 'Point':
  27699. geom = invariant_node_modules_turf_helpers_main_es_point(coordinates).geometry;
  27700. break;
  27701. case 'LineString':
  27702. geom = invariant_node_modules_turf_helpers_main_es_lineString(coordinates).geometry;
  27703. break;
  27704. case 'Polygon':
  27705. geom = invariant_node_modules_turf_helpers_main_es_polygon(coordinates).geometry;
  27706. break;
  27707. case 'MultiPoint':
  27708. geom = invariant_node_modules_turf_helpers_main_es_multiPoint(coordinates).geometry;
  27709. break;
  27710. case 'MultiLineString':
  27711. geom = invariant_node_modules_turf_helpers_main_es_multiLineString(coordinates).geometry;
  27712. break;
  27713. case 'MultiPolygon':
  27714. geom = invariant_node_modules_turf_helpers_main_es_multiPolygon(coordinates).geometry;
  27715. break;
  27716. default:
  27717. throw new Error(type + ' is invalid');
  27718. }
  27719. if (bbox) geom.bbox = bbox;
  27720. return geom;
  27721. }
  27722. /**
  27723. * Creates a {@link Point} {@link Feature} from a Position.
  27724. *
  27725. * @name point
  27726. * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)
  27727. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  27728. * @param {Object} [options={}] Optional Parameters
  27729. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  27730. * @param {string|number} [options.id] Identifier associated with the Feature
  27731. * @returns {Feature<Point>} a Point feature
  27732. * @example
  27733. * var point = turf.point([-75.343, 39.984]);
  27734. *
  27735. * //=point
  27736. */
  27737. function invariant_node_modules_turf_helpers_main_es_point(coordinates, properties, options) {
  27738. if (!coordinates) throw new Error('coordinates is required');
  27739. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  27740. if (coordinates.length < 2) throw new Error('coordinates must be at least 2 numbers long');
  27741. if (!invariant_node_modules_turf_helpers_main_es_isNumber(coordinates[0]) || !invariant_node_modules_turf_helpers_main_es_isNumber(coordinates[1])) throw new Error('coordinates must contain numbers');
  27742. return invariant_node_modules_turf_helpers_main_es_feature({
  27743. type: 'Point',
  27744. coordinates: coordinates
  27745. }, properties, options);
  27746. }
  27747. /**
  27748. * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.
  27749. *
  27750. * @name points
  27751. * @param {Array<Array<number>>} coordinates an array of Points
  27752. * @param {Object} [properties={}] Translate these properties to each Feature
  27753. * @param {Object} [options={}] Optional Parameters
  27754. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  27755. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  27756. * @returns {FeatureCollection<Point>} Point Feature
  27757. * @example
  27758. * var points = turf.points([
  27759. * [-75, 39],
  27760. * [-80, 45],
  27761. * [-78, 50]
  27762. * ]);
  27763. *
  27764. * //=points
  27765. */
  27766. function invariant_node_modules_turf_helpers_main_es_points(coordinates, properties, options) {
  27767. if (!coordinates) throw new Error('coordinates is required');
  27768. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  27769. return invariant_node_modules_turf_helpers_main_es_featureCollection(coordinates.map(function (coords) {
  27770. return invariant_node_modules_turf_helpers_main_es_point(coords, properties);
  27771. }), options);
  27772. }
  27773. /**
  27774. * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.
  27775. *
  27776. * @name polygon
  27777. * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings
  27778. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  27779. * @param {Object} [options={}] Optional Parameters
  27780. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  27781. * @param {string|number} [options.id] Identifier associated with the Feature
  27782. * @returns {Feature<Polygon>} Polygon Feature
  27783. * @example
  27784. * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });
  27785. *
  27786. * //=polygon
  27787. */
  27788. function invariant_node_modules_turf_helpers_main_es_polygon(coordinates, properties, options) {
  27789. if (!coordinates) throw new Error('coordinates is required');
  27790. for (var i = 0; i < coordinates.length; i++) {
  27791. var ring = coordinates[i];
  27792. if (ring.length < 4) {
  27793. throw new Error('Each LinearRing of a Polygon must have 4 or more Positions.');
  27794. }
  27795. for (var j = 0; j < ring[ring.length - 1].length; j++) {
  27796. // Check if first point of Polygon contains two numbers
  27797. if (i === 0 && j === 0 && !invariant_node_modules_turf_helpers_main_es_isNumber(ring[0][0]) || !invariant_node_modules_turf_helpers_main_es_isNumber(ring[0][1])) throw new Error('coordinates must contain numbers');
  27798. if (ring[ring.length - 1][j] !== ring[0][j]) {
  27799. throw new Error('First and last Position are not equivalent.');
  27800. }
  27801. }
  27802. }
  27803. return invariant_node_modules_turf_helpers_main_es_feature({
  27804. type: 'Polygon',
  27805. coordinates: coordinates
  27806. }, properties, options);
  27807. }
  27808. /**
  27809. * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.
  27810. *
  27811. * @name polygons
  27812. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates
  27813. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  27814. * @param {Object} [options={}] Optional Parameters
  27815. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  27816. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  27817. * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection
  27818. * @example
  27819. * var polygons = turf.polygons([
  27820. * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],
  27821. * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],
  27822. * ]);
  27823. *
  27824. * //=polygons
  27825. */
  27826. function invariant_node_modules_turf_helpers_main_es_polygons(coordinates, properties, options) {
  27827. if (!coordinates) throw new Error('coordinates is required');
  27828. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  27829. return invariant_node_modules_turf_helpers_main_es_featureCollection(coordinates.map(function (coords) {
  27830. return invariant_node_modules_turf_helpers_main_es_polygon(coords, properties);
  27831. }), options);
  27832. }
  27833. /**
  27834. * Creates a {@link LineString} {@link Feature} from an Array of Positions.
  27835. *
  27836. * @name lineString
  27837. * @param {Array<Array<number>>} coordinates an array of Positions
  27838. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  27839. * @param {Object} [options={}] Optional Parameters
  27840. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  27841. * @param {string|number} [options.id] Identifier associated with the Feature
  27842. * @returns {Feature<LineString>} LineString Feature
  27843. * @example
  27844. * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});
  27845. * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});
  27846. *
  27847. * //=linestring1
  27848. * //=linestring2
  27849. */
  27850. function invariant_node_modules_turf_helpers_main_es_lineString(coordinates, properties, options) {
  27851. if (!coordinates) throw new Error('coordinates is required');
  27852. if (coordinates.length < 2) throw new Error('coordinates must be an array of two or more positions'); // Check if first point of LineString contains two numbers
  27853. if (!invariant_node_modules_turf_helpers_main_es_isNumber(coordinates[0][1]) || !invariant_node_modules_turf_helpers_main_es_isNumber(coordinates[0][1])) throw new Error('coordinates must contain numbers');
  27854. return invariant_node_modules_turf_helpers_main_es_feature({
  27855. type: 'LineString',
  27856. coordinates: coordinates
  27857. }, properties, options);
  27858. }
  27859. /**
  27860. * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.
  27861. *
  27862. * @name lineStrings
  27863. * @param {Array<Array<number>>} coordinates an array of LinearRings
  27864. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  27865. * @param {Object} [options={}] Optional Parameters
  27866. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  27867. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  27868. * @returns {FeatureCollection<LineString>} LineString FeatureCollection
  27869. * @example
  27870. * var linestrings = turf.lineStrings([
  27871. * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],
  27872. * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]
  27873. * ]);
  27874. *
  27875. * //=linestrings
  27876. */
  27877. function invariant_node_modules_turf_helpers_main_es_lineStrings(coordinates, properties, options) {
  27878. if (!coordinates) throw new Error('coordinates is required');
  27879. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  27880. return invariant_node_modules_turf_helpers_main_es_featureCollection(coordinates.map(function (coords) {
  27881. return invariant_node_modules_turf_helpers_main_es_lineString(coords, properties);
  27882. }), options);
  27883. }
  27884. /**
  27885. * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.
  27886. *
  27887. * @name featureCollection
  27888. * @param {Feature[]} features input features
  27889. * @param {Object} [options={}] Optional Parameters
  27890. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  27891. * @param {string|number} [options.id] Identifier associated with the Feature
  27892. * @returns {FeatureCollection} FeatureCollection of Features
  27893. * @example
  27894. * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});
  27895. * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});
  27896. * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});
  27897. *
  27898. * var collection = turf.featureCollection([
  27899. * locationA,
  27900. * locationB,
  27901. * locationC
  27902. * ]);
  27903. *
  27904. * //=collection
  27905. */
  27906. function invariant_node_modules_turf_helpers_main_es_featureCollection(features, options) {
  27907. // Optional Parameters
  27908. options = options || {};
  27909. if (!invariant_node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  27910. var bbox = options.bbox;
  27911. var id = options.id; // Validation
  27912. if (!features) throw new Error('No features passed');
  27913. if (!Array.isArray(features)) throw new Error('features must be an Array');
  27914. if (bbox) invariant_node_modules_turf_helpers_main_es_validateBBox(bbox);
  27915. if (id) invariant_node_modules_turf_helpers_main_es_validateId(id); // Main
  27916. var fc = {
  27917. type: 'FeatureCollection'
  27918. };
  27919. if (id) fc.id = id;
  27920. if (bbox) fc.bbox = bbox;
  27921. fc.features = features;
  27922. return fc;
  27923. }
  27924. /**
  27925. * Creates a {@link Feature<MultiLineString>} based on a
  27926. * coordinate array. Properties can be added optionally.
  27927. *
  27928. * @name multiLineString
  27929. * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings
  27930. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  27931. * @param {Object} [options={}] Optional Parameters
  27932. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  27933. * @param {string|number} [options.id] Identifier associated with the Feature
  27934. * @returns {Feature<MultiLineString>} a MultiLineString feature
  27935. * @throws {Error} if no coordinates are passed
  27936. * @example
  27937. * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);
  27938. *
  27939. * //=multiLine
  27940. */
  27941. function invariant_node_modules_turf_helpers_main_es_multiLineString(coordinates, properties, options) {
  27942. if (!coordinates) throw new Error('coordinates is required');
  27943. return invariant_node_modules_turf_helpers_main_es_feature({
  27944. type: 'MultiLineString',
  27945. coordinates: coordinates
  27946. }, properties, options);
  27947. }
  27948. /**
  27949. * Creates a {@link Feature<MultiPoint>} based on a
  27950. * coordinate array. Properties can be added optionally.
  27951. *
  27952. * @name multiPoint
  27953. * @param {Array<Array<number>>} coordinates an array of Positions
  27954. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  27955. * @param {Object} [options={}] Optional Parameters
  27956. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  27957. * @param {string|number} [options.id] Identifier associated with the Feature
  27958. * @returns {Feature<MultiPoint>} a MultiPoint feature
  27959. * @throws {Error} if no coordinates are passed
  27960. * @example
  27961. * var multiPt = turf.multiPoint([[0,0],[10,10]]);
  27962. *
  27963. * //=multiPt
  27964. */
  27965. function invariant_node_modules_turf_helpers_main_es_multiPoint(coordinates, properties, options) {
  27966. if (!coordinates) throw new Error('coordinates is required');
  27967. return invariant_node_modules_turf_helpers_main_es_feature({
  27968. type: 'MultiPoint',
  27969. coordinates: coordinates
  27970. }, properties, options);
  27971. }
  27972. /**
  27973. * Creates a {@link Feature<MultiPolygon>} based on a
  27974. * coordinate array. Properties can be added optionally.
  27975. *
  27976. * @name multiPolygon
  27977. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons
  27978. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  27979. * @param {Object} [options={}] Optional Parameters
  27980. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  27981. * @param {string|number} [options.id] Identifier associated with the Feature
  27982. * @returns {Feature<MultiPolygon>} a multipolygon feature
  27983. * @throws {Error} if no coordinates are passed
  27984. * @example
  27985. * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);
  27986. *
  27987. * //=multiPoly
  27988. *
  27989. */
  27990. function invariant_node_modules_turf_helpers_main_es_multiPolygon(coordinates, properties, options) {
  27991. if (!coordinates) throw new Error('coordinates is required');
  27992. return invariant_node_modules_turf_helpers_main_es_feature({
  27993. type: 'MultiPolygon',
  27994. coordinates: coordinates
  27995. }, properties, options);
  27996. }
  27997. /**
  27998. * Creates a {@link Feature<GeometryCollection>} based on a
  27999. * coordinate array. Properties can be added optionally.
  28000. *
  28001. * @name geometryCollection
  28002. * @param {Array<Geometry>} geometries an array of GeoJSON Geometries
  28003. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  28004. * @param {Object} [options={}] Optional Parameters
  28005. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  28006. * @param {string|number} [options.id] Identifier associated with the Feature
  28007. * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature
  28008. * @example
  28009. * var pt = {
  28010. * "type": "Point",
  28011. * "coordinates": [100, 0]
  28012. * };
  28013. * var line = {
  28014. * "type": "LineString",
  28015. * "coordinates": [ [101, 0], [102, 1] ]
  28016. * };
  28017. * var collection = turf.geometryCollection([pt, line]);
  28018. *
  28019. * //=collection
  28020. */
  28021. function invariant_node_modules_turf_helpers_main_es_geometryCollection(geometries, properties, options) {
  28022. if (!geometries) throw new Error('geometries is required');
  28023. if (!Array.isArray(geometries)) throw new Error('geometries must be an Array');
  28024. return invariant_node_modules_turf_helpers_main_es_feature({
  28025. type: 'GeometryCollection',
  28026. geometries: geometries
  28027. }, properties, options);
  28028. }
  28029. /**
  28030. * Round number to precision
  28031. *
  28032. * @param {number} num Number
  28033. * @param {number} [precision=0] Precision
  28034. * @returns {number} rounded number
  28035. * @example
  28036. * turf.round(120.4321)
  28037. * //=120
  28038. *
  28039. * turf.round(120.4321, 2)
  28040. * //=120.43
  28041. */
  28042. function invariant_node_modules_turf_helpers_main_es_round(num, precision) {
  28043. if (num === undefined || num === null || isNaN(num)) throw new Error('num is required');
  28044. if (precision && !(precision >= 0)) throw new Error('precision must be a positive number');
  28045. var multiplier = Math.pow(10, precision || 0);
  28046. return Math.round(num * multiplier) / multiplier;
  28047. }
  28048. /**
  28049. * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.
  28050. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  28051. *
  28052. * @name radiansToLength
  28053. * @param {number} radians in radians across the sphere
  28054. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  28055. * @returns {number} distance
  28056. */
  28057. function invariant_node_modules_turf_helpers_main_es_radiansToLength(radians, units) {
  28058. if (radians === undefined || radians === null) throw new Error('radians is required');
  28059. if (units && typeof units !== 'string') throw new Error('units must be a string');
  28060. var factor = invariant_node_modules_turf_helpers_main_es_factors[units || 'kilometers'];
  28061. if (!factor) throw new Error(units + ' units is invalid');
  28062. return radians * factor;
  28063. }
  28064. /**
  28065. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians
  28066. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  28067. *
  28068. * @name lengthToRadians
  28069. * @param {number} distance in real units
  28070. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  28071. * @returns {number} radians
  28072. */
  28073. function invariant_node_modules_turf_helpers_main_es_lengthToRadians(distance, units) {
  28074. if (distance === undefined || distance === null) throw new Error('distance is required');
  28075. if (units && typeof units !== 'string') throw new Error('units must be a string');
  28076. var factor = invariant_node_modules_turf_helpers_main_es_factors[units || 'kilometers'];
  28077. if (!factor) throw new Error(units + ' units is invalid');
  28078. return distance / factor;
  28079. }
  28080. /**
  28081. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees
  28082. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet
  28083. *
  28084. * @name lengthToDegrees
  28085. * @param {number} distance in real units
  28086. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  28087. * @returns {number} degrees
  28088. */
  28089. function invariant_node_modules_turf_helpers_main_es_lengthToDegrees(distance, units) {
  28090. return invariant_node_modules_turf_helpers_main_es_radiansToDegrees(invariant_node_modules_turf_helpers_main_es_lengthToRadians(distance, units));
  28091. }
  28092. /**
  28093. * Converts any bearing angle from the north line direction (positive clockwise)
  28094. * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line
  28095. *
  28096. * @name bearingToAzimuth
  28097. * @param {number} bearing angle, between -180 and +180 degrees
  28098. * @returns {number} angle between 0 and 360 degrees
  28099. */
  28100. function invariant_node_modules_turf_helpers_main_es_bearingToAzimuth(bearing) {
  28101. if (bearing === null || bearing === undefined) throw new Error('bearing is required');
  28102. var angle = bearing % 360;
  28103. if (angle < 0) angle += 360;
  28104. return angle;
  28105. }
  28106. /**
  28107. * Converts an angle in radians to degrees
  28108. *
  28109. * @name radiansToDegrees
  28110. * @param {number} radians angle in radians
  28111. * @returns {number} degrees between 0 and 360 degrees
  28112. */
  28113. function invariant_node_modules_turf_helpers_main_es_radiansToDegrees(radians) {
  28114. if (radians === null || radians === undefined) throw new Error('radians is required');
  28115. var degrees = radians % (2 * Math.PI);
  28116. return degrees * 180 / Math.PI;
  28117. }
  28118. /**
  28119. * Converts an angle in degrees to radians
  28120. *
  28121. * @name degreesToRadians
  28122. * @param {number} degrees angle between 0 and 360 degrees
  28123. * @returns {number} angle in radians
  28124. */
  28125. function invariant_node_modules_turf_helpers_main_es_degreesToRadians(degrees) {
  28126. if (degrees === null || degrees === undefined) throw new Error('degrees is required');
  28127. var radians = degrees % 360;
  28128. return radians * Math.PI / 180;
  28129. }
  28130. /**
  28131. * Converts a length to the requested unit.
  28132. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  28133. *
  28134. * @param {number} length to be converted
  28135. * @param {string} originalUnit of the length
  28136. * @param {string} [finalUnit='kilometers'] returned unit
  28137. * @returns {number} the converted length
  28138. */
  28139. function invariant_node_modules_turf_helpers_main_es_convertLength(length, originalUnit, finalUnit) {
  28140. if (length === null || length === undefined) throw new Error('length is required');
  28141. if (!(length >= 0)) throw new Error('length must be a positive number');
  28142. return invariant_node_modules_turf_helpers_main_es_radiansToLength(invariant_node_modules_turf_helpers_main_es_lengthToRadians(length, originalUnit), finalUnit || 'kilometers');
  28143. }
  28144. /**
  28145. * Converts a area to the requested unit.
  28146. * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches
  28147. * @param {number} area to be converted
  28148. * @param {string} [originalUnit='meters'] of the distance
  28149. * @param {string} [finalUnit='kilometers'] returned unit
  28150. * @returns {number} the converted distance
  28151. */
  28152. function invariant_node_modules_turf_helpers_main_es_convertArea(area, originalUnit, finalUnit) {
  28153. if (area === null || area === undefined) throw new Error('area is required');
  28154. if (!(area >= 0)) throw new Error('area must be a positive number');
  28155. var startFactor = invariant_node_modules_turf_helpers_main_es_areaFactors[originalUnit || 'meters'];
  28156. if (!startFactor) throw new Error('invalid original units');
  28157. var finalFactor = invariant_node_modules_turf_helpers_main_es_areaFactors[finalUnit || 'kilometers'];
  28158. if (!finalFactor) throw new Error('invalid final units');
  28159. return area / startFactor * finalFactor;
  28160. }
  28161. /**
  28162. * isNumber
  28163. *
  28164. * @param {*} num Number to validate
  28165. * @returns {boolean} true/false
  28166. * @example
  28167. * turf.isNumber(123)
  28168. * //=true
  28169. * turf.isNumber('foo')
  28170. * //=false
  28171. */
  28172. function invariant_node_modules_turf_helpers_main_es_isNumber(num) {
  28173. return !isNaN(num) && num !== null && !Array.isArray(num);
  28174. }
  28175. /**
  28176. * isObject
  28177. *
  28178. * @param {*} input variable to validate
  28179. * @returns {boolean} true/false
  28180. * @example
  28181. * turf.isObject({elevation: 10})
  28182. * //=true
  28183. * turf.isObject('foo')
  28184. * //=false
  28185. */
  28186. function invariant_node_modules_turf_helpers_main_es_isObject(input) {
  28187. return !!input && input.constructor === Object;
  28188. }
  28189. /**
  28190. * Validate BBox
  28191. *
  28192. * @private
  28193. * @param {Array<number>} bbox BBox to validate
  28194. * @returns {void}
  28195. * @throws Error if BBox is not valid
  28196. * @example
  28197. * validateBBox([-180, -40, 110, 50])
  28198. * //=OK
  28199. * validateBBox([-180, -40])
  28200. * //=Error
  28201. * validateBBox('Foo')
  28202. * //=Error
  28203. * validateBBox(5)
  28204. * //=Error
  28205. * validateBBox(null)
  28206. * //=Error
  28207. * validateBBox(undefined)
  28208. * //=Error
  28209. */
  28210. function invariant_node_modules_turf_helpers_main_es_validateBBox(bbox) {
  28211. if (!bbox) throw new Error('bbox is required');
  28212. if (!Array.isArray(bbox)) throw new Error('bbox must be an Array');
  28213. if (bbox.length !== 4 && bbox.length !== 6) throw new Error('bbox must be an Array of 4 or 6 numbers');
  28214. bbox.forEach(function (num) {
  28215. if (!invariant_node_modules_turf_helpers_main_es_isNumber(num)) throw new Error('bbox must only contain numbers');
  28216. });
  28217. }
  28218. /**
  28219. * Validate Id
  28220. *
  28221. * @private
  28222. * @param {string|number} id Id to validate
  28223. * @returns {void}
  28224. * @throws Error if Id is not valid
  28225. * @example
  28226. * validateId([-180, -40, 110, 50])
  28227. * //=Error
  28228. * validateId([-180, -40])
  28229. * //=Error
  28230. * validateId('Foo')
  28231. * //=OK
  28232. * validateId(5)
  28233. * //=OK
  28234. * validateId(null)
  28235. * //=Error
  28236. * validateId(undefined)
  28237. * //=Error
  28238. */
  28239. function invariant_node_modules_turf_helpers_main_es_validateId(id) {
  28240. if (!id) throw new Error('id is required');
  28241. if (['string', 'number'].indexOf(typeof id) === -1) throw new Error('id must be a number or a string');
  28242. } // Deprecated methods
  28243. function invariant_node_modules_turf_helpers_main_es_radians2degrees() {
  28244. throw new Error('method has been renamed to `radiansToDegrees`');
  28245. }
  28246. function invariant_node_modules_turf_helpers_main_es_degrees2radians() {
  28247. throw new Error('method has been renamed to `degreesToRadians`');
  28248. }
  28249. function invariant_node_modules_turf_helpers_main_es_distanceToDegrees() {
  28250. throw new Error('method has been renamed to `lengthToDegrees`');
  28251. }
  28252. function invariant_node_modules_turf_helpers_main_es_distanceToRadians() {
  28253. throw new Error('method has been renamed to `lengthToRadians`');
  28254. }
  28255. function invariant_node_modules_turf_helpers_main_es_radiansToDistance() {
  28256. throw new Error('method has been renamed to `radiansToLength`');
  28257. }
  28258. function invariant_node_modules_turf_helpers_main_es_bearingToAngle() {
  28259. throw new Error('method has been renamed to `bearingToAzimuth`');
  28260. }
  28261. function invariant_node_modules_turf_helpers_main_es_convertDistance() {
  28262. throw new Error('method has been renamed to `convertLength`');
  28263. }
  28264. // CONCATENATED MODULE: ./node_modules/@turf/invariant/main.es.js
  28265. /**
  28266. * Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.
  28267. *
  28268. * @name getCoord
  28269. * @param {Array<number>|Geometry<Point>|Feature<Point>} coord GeoJSON Point or an Array of numbers
  28270. * @returns {Array<number>} coordinates
  28271. * @example
  28272. * var pt = turf.point([10, 10]);
  28273. *
  28274. * var coord = turf.getCoord(pt);
  28275. * //= [10, 10]
  28276. */
  28277. function getCoord(coord) {
  28278. if (!coord) throw new Error('coord is required');
  28279. if (coord.type === 'Feature' && coord.geometry !== null && coord.geometry.type === 'Point') return coord.geometry.coordinates;
  28280. if (coord.type === 'Point') return coord.coordinates;
  28281. if (Array.isArray(coord) && coord.length >= 2 && coord[0].length === undefined && coord[1].length === undefined) return coord;
  28282. throw new Error('coord must be GeoJSON Point or an Array of numbers');
  28283. }
  28284. /**
  28285. * Unwrap coordinates from a Feature, Geometry Object or an Array
  28286. *
  28287. * @name getCoords
  28288. * @param {Array<any>|Geometry|Feature} coords Feature, Geometry Object or an Array
  28289. * @returns {Array<any>} coordinates
  28290. * @example
  28291. * var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);
  28292. *
  28293. * var coords = turf.getCoords(poly);
  28294. * //= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]
  28295. */
  28296. function getCoords(coords) {
  28297. if (!coords) throw new Error('coords is required'); // Feature
  28298. if (coords.type === 'Feature' && coords.geometry !== null) return coords.geometry.coordinates; // Geometry
  28299. if (coords.coordinates) return coords.coordinates; // Array of numbers
  28300. if (Array.isArray(coords)) return coords;
  28301. throw new Error('coords must be GeoJSON Feature, Geometry Object or an Array');
  28302. }
  28303. /**
  28304. * Checks if coordinates contains a number
  28305. *
  28306. * @name containsNumber
  28307. * @param {Array<any>} coordinates GeoJSON Coordinates
  28308. * @returns {boolean} true if Array contains a number
  28309. */
  28310. function containsNumber(coordinates) {
  28311. if (coordinates.length > 1 && invariant_node_modules_turf_helpers_main_es_isNumber(coordinates[0]) && invariant_node_modules_turf_helpers_main_es_isNumber(coordinates[1])) {
  28312. return true;
  28313. }
  28314. if (Array.isArray(coordinates[0]) && coordinates[0].length) {
  28315. return containsNumber(coordinates[0]);
  28316. }
  28317. throw new Error('coordinates must only contain numbers');
  28318. }
  28319. /**
  28320. * Enforce expectations about types of GeoJSON objects for Turf.
  28321. *
  28322. * @name geojsonType
  28323. * @param {GeoJSON} value any GeoJSON object
  28324. * @param {string} type expected GeoJSON type
  28325. * @param {string} name name of calling function
  28326. * @throws {Error} if value is not the expected type.
  28327. */
  28328. function geojsonType(value, type, name) {
  28329. if (!type || !name) throw new Error('type and name required');
  28330. if (!value || value.type !== type) {
  28331. throw new Error('Invalid input to ' + name + ': must be a ' + type + ', given ' + value.type);
  28332. }
  28333. }
  28334. /**
  28335. * Enforce expectations about types of {@link Feature} inputs for Turf.
  28336. * Internally this uses {@link geojsonType} to judge geometry types.
  28337. *
  28338. * @name featureOf
  28339. * @param {Feature} feature a feature with an expected geometry type
  28340. * @param {string} type expected GeoJSON type
  28341. * @param {string} name name of calling function
  28342. * @throws {Error} error if value is not the expected type.
  28343. */
  28344. function featureOf(feature, type, name) {
  28345. if (!feature) throw new Error('No feature passed');
  28346. if (!name) throw new Error('.featureOf() requires a name');
  28347. if (!feature || feature.type !== 'Feature' || !feature.geometry) {
  28348. throw new Error('Invalid input to ' + name + ', Feature with geometry required');
  28349. }
  28350. if (!feature.geometry || feature.geometry.type !== type) {
  28351. throw new Error('Invalid input to ' + name + ': must be a ' + type + ', given ' + feature.geometry.type);
  28352. }
  28353. }
  28354. /**
  28355. * Enforce expectations about types of {@link FeatureCollection} inputs for Turf.
  28356. * Internally this uses {@link geojsonType} to judge geometry types.
  28357. *
  28358. * @name collectionOf
  28359. * @param {FeatureCollection} featureCollection a FeatureCollection for which features will be judged
  28360. * @param {string} type expected GeoJSON type
  28361. * @param {string} name name of calling function
  28362. * @throws {Error} if value is not the expected type.
  28363. */
  28364. function collectionOf(featureCollection, type, name) {
  28365. if (!featureCollection) throw new Error('No featureCollection passed');
  28366. if (!name) throw new Error('.collectionOf() requires a name');
  28367. if (!featureCollection || featureCollection.type !== 'FeatureCollection') {
  28368. throw new Error('Invalid input to ' + name + ', FeatureCollection required');
  28369. }
  28370. for (var i = 0; i < featureCollection.features.length; i++) {
  28371. var feature = featureCollection.features[i];
  28372. if (!feature || feature.type !== 'Feature' || !feature.geometry) {
  28373. throw new Error('Invalid input to ' + name + ', Feature with geometry required');
  28374. }
  28375. if (!feature.geometry || feature.geometry.type !== type) {
  28376. throw new Error('Invalid input to ' + name + ': must be a ' + type + ', given ' + feature.geometry.type);
  28377. }
  28378. }
  28379. }
  28380. /**
  28381. * Get Geometry from Feature or Geometry Object
  28382. *
  28383. * @param {Feature|Geometry} geojson GeoJSON Feature or Geometry Object
  28384. * @returns {Geometry|null} GeoJSON Geometry Object
  28385. * @throws {Error} if geojson is not a Feature or Geometry Object
  28386. * @example
  28387. * var point = {
  28388. * "type": "Feature",
  28389. * "properties": {},
  28390. * "geometry": {
  28391. * "type": "Point",
  28392. * "coordinates": [110, 40]
  28393. * }
  28394. * }
  28395. * var geom = turf.getGeom(point)
  28396. * //={"type": "Point", "coordinates": [110, 40]}
  28397. */
  28398. function getGeom(geojson) {
  28399. if (!geojson) throw new Error('geojson is required');
  28400. if (geojson.geometry !== undefined) return geojson.geometry;
  28401. if (geojson.coordinates || geojson.geometries) return geojson;
  28402. throw new Error('geojson must be a valid Feature or Geometry Object');
  28403. }
  28404. /**
  28405. * Get Geometry Type from Feature or Geometry Object
  28406. *
  28407. * @throws {Error} **DEPRECATED** in v5.0.0 in favor of getType
  28408. */
  28409. function getGeomType() {
  28410. throw new Error('invariant.getGeomType has been deprecated in v5.0 in favor of invariant.getType');
  28411. }
  28412. /**
  28413. * Get GeoJSON object's type, Geometry type is prioritize.
  28414. *
  28415. * @param {GeoJSON} geojson GeoJSON object
  28416. * @param {string} [name="geojson"] name of the variable to display in error message
  28417. * @returns {string} GeoJSON type
  28418. * @example
  28419. * var point = {
  28420. * "type": "Feature",
  28421. * "properties": {},
  28422. * "geometry": {
  28423. * "type": "Point",
  28424. * "coordinates": [110, 40]
  28425. * }
  28426. * }
  28427. * var geom = turf.getType(point)
  28428. * //="Point"
  28429. */
  28430. function getType(geojson, name) {
  28431. if (!geojson) throw new Error((name || 'geojson') + ' is required'); // GeoJSON Feature & GeometryCollection
  28432. if (geojson.geometry && geojson.geometry.type) return geojson.geometry.type; // GeoJSON Geometry & FeatureCollection
  28433. if (geojson.type) return geojson.type;
  28434. throw new Error((name || 'geojson') + ' is invalid');
  28435. }
  28436. // CONCATENATED MODULE: ./node_modules/@turf/rhumb-bearing/node_modules/@turf/helpers/main.es.js
  28437. /**
  28438. * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.
  28439. */
  28440. var rhumb_bearing_node_modules_turf_helpers_main_es_earthRadius = 6371008.8;
  28441. /**
  28442. * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.
  28443. */
  28444. var rhumb_bearing_node_modules_turf_helpers_main_es_factors = {
  28445. meters: rhumb_bearing_node_modules_turf_helpers_main_es_earthRadius,
  28446. metres: rhumb_bearing_node_modules_turf_helpers_main_es_earthRadius,
  28447. millimeters: rhumb_bearing_node_modules_turf_helpers_main_es_earthRadius * 1000,
  28448. millimetres: rhumb_bearing_node_modules_turf_helpers_main_es_earthRadius * 1000,
  28449. centimeters: rhumb_bearing_node_modules_turf_helpers_main_es_earthRadius * 100,
  28450. centimetres: rhumb_bearing_node_modules_turf_helpers_main_es_earthRadius * 100,
  28451. kilometers: rhumb_bearing_node_modules_turf_helpers_main_es_earthRadius / 1000,
  28452. kilometres: rhumb_bearing_node_modules_turf_helpers_main_es_earthRadius / 1000,
  28453. miles: rhumb_bearing_node_modules_turf_helpers_main_es_earthRadius / 1609.344,
  28454. nauticalmiles: rhumb_bearing_node_modules_turf_helpers_main_es_earthRadius / 1852,
  28455. inches: rhumb_bearing_node_modules_turf_helpers_main_es_earthRadius * 39.370,
  28456. yards: rhumb_bearing_node_modules_turf_helpers_main_es_earthRadius / 1.0936,
  28457. feet: rhumb_bearing_node_modules_turf_helpers_main_es_earthRadius * 3.28084,
  28458. radians: 1,
  28459. degrees: rhumb_bearing_node_modules_turf_helpers_main_es_earthRadius / 111325
  28460. };
  28461. /**
  28462. * Units of measurement factors based on 1 meter.
  28463. */
  28464. var rhumb_bearing_node_modules_turf_helpers_main_es_unitsFactors = {
  28465. meters: 1,
  28466. metres: 1,
  28467. millimeters: 1000,
  28468. millimetres: 1000,
  28469. centimeters: 100,
  28470. centimetres: 100,
  28471. kilometers: 1 / 1000,
  28472. kilometres: 1 / 1000,
  28473. miles: 1 / 1609.344,
  28474. nauticalmiles: 1 / 1852,
  28475. inches: 39.370,
  28476. yards: 1 / 1.0936,
  28477. feet: 3.28084,
  28478. radians: 1 / rhumb_bearing_node_modules_turf_helpers_main_es_earthRadius,
  28479. degrees: 1 / 111325
  28480. };
  28481. /**
  28482. * Area of measurement factors based on 1 square meter.
  28483. */
  28484. var rhumb_bearing_node_modules_turf_helpers_main_es_areaFactors = {
  28485. meters: 1,
  28486. metres: 1,
  28487. millimeters: 1000000,
  28488. millimetres: 1000000,
  28489. centimeters: 10000,
  28490. centimetres: 10000,
  28491. kilometers: 0.000001,
  28492. kilometres: 0.000001,
  28493. acres: 0.000247105,
  28494. miles: 3.86e-7,
  28495. yards: 1.195990046,
  28496. feet: 10.763910417,
  28497. inches: 1550.003100006
  28498. };
  28499. /**
  28500. * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.
  28501. *
  28502. * @name feature
  28503. * @param {Geometry} geometry input geometry
  28504. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  28505. * @param {Object} [options={}] Optional Parameters
  28506. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  28507. * @param {string|number} [options.id] Identifier associated with the Feature
  28508. * @returns {Feature} a GeoJSON Feature
  28509. * @example
  28510. * var geometry = {
  28511. * "type": "Point",
  28512. * "coordinates": [110, 50]
  28513. * };
  28514. *
  28515. * var feature = turf.feature(geometry);
  28516. *
  28517. * //=feature
  28518. */
  28519. function rhumb_bearing_node_modules_turf_helpers_main_es_feature(geometry, properties, options) {
  28520. // Optional Parameters
  28521. options = options || {};
  28522. if (!rhumb_bearing_node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  28523. var bbox = options.bbox;
  28524. var id = options.id; // Validation
  28525. if (geometry === undefined) throw new Error('geometry is required');
  28526. if (properties && properties.constructor !== Object) throw new Error('properties must be an Object');
  28527. if (bbox) rhumb_bearing_node_modules_turf_helpers_main_es_validateBBox(bbox);
  28528. if (id) rhumb_bearing_node_modules_turf_helpers_main_es_validateId(id); // Main
  28529. var feat = {
  28530. type: 'Feature'
  28531. };
  28532. if (id) feat.id = id;
  28533. if (bbox) feat.bbox = bbox;
  28534. feat.properties = properties || {};
  28535. feat.geometry = geometry;
  28536. return feat;
  28537. }
  28538. /**
  28539. * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.
  28540. * For GeometryCollection type use `helpers.geometryCollection`
  28541. *
  28542. * @name geometry
  28543. * @param {string} type Geometry Type
  28544. * @param {Array<number>} coordinates Coordinates
  28545. * @param {Object} [options={}] Optional Parameters
  28546. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Geometry
  28547. * @returns {Geometry} a GeoJSON Geometry
  28548. * @example
  28549. * var type = 'Point';
  28550. * var coordinates = [110, 50];
  28551. *
  28552. * var geometry = turf.geometry(type, coordinates);
  28553. *
  28554. * //=geometry
  28555. */
  28556. function rhumb_bearing_node_modules_turf_helpers_main_es_geometry(type, coordinates, options) {
  28557. // Optional Parameters
  28558. options = options || {};
  28559. if (!rhumb_bearing_node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  28560. var bbox = options.bbox; // Validation
  28561. if (!type) throw new Error('type is required');
  28562. if (!coordinates) throw new Error('coordinates is required');
  28563. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  28564. if (bbox) rhumb_bearing_node_modules_turf_helpers_main_es_validateBBox(bbox); // Main
  28565. var geom;
  28566. switch (type) {
  28567. case 'Point':
  28568. geom = rhumb_bearing_node_modules_turf_helpers_main_es_point(coordinates).geometry;
  28569. break;
  28570. case 'LineString':
  28571. geom = rhumb_bearing_node_modules_turf_helpers_main_es_lineString(coordinates).geometry;
  28572. break;
  28573. case 'Polygon':
  28574. geom = rhumb_bearing_node_modules_turf_helpers_main_es_polygon(coordinates).geometry;
  28575. break;
  28576. case 'MultiPoint':
  28577. geom = rhumb_bearing_node_modules_turf_helpers_main_es_multiPoint(coordinates).geometry;
  28578. break;
  28579. case 'MultiLineString':
  28580. geom = rhumb_bearing_node_modules_turf_helpers_main_es_multiLineString(coordinates).geometry;
  28581. break;
  28582. case 'MultiPolygon':
  28583. geom = rhumb_bearing_node_modules_turf_helpers_main_es_multiPolygon(coordinates).geometry;
  28584. break;
  28585. default:
  28586. throw new Error(type + ' is invalid');
  28587. }
  28588. if (bbox) geom.bbox = bbox;
  28589. return geom;
  28590. }
  28591. /**
  28592. * Creates a {@link Point} {@link Feature} from a Position.
  28593. *
  28594. * @name point
  28595. * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)
  28596. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  28597. * @param {Object} [options={}] Optional Parameters
  28598. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  28599. * @param {string|number} [options.id] Identifier associated with the Feature
  28600. * @returns {Feature<Point>} a Point feature
  28601. * @example
  28602. * var point = turf.point([-75.343, 39.984]);
  28603. *
  28604. * //=point
  28605. */
  28606. function rhumb_bearing_node_modules_turf_helpers_main_es_point(coordinates, properties, options) {
  28607. if (!coordinates) throw new Error('coordinates is required');
  28608. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  28609. if (coordinates.length < 2) throw new Error('coordinates must be at least 2 numbers long');
  28610. if (!rhumb_bearing_node_modules_turf_helpers_main_es_isNumber(coordinates[0]) || !rhumb_bearing_node_modules_turf_helpers_main_es_isNumber(coordinates[1])) throw new Error('coordinates must contain numbers');
  28611. return rhumb_bearing_node_modules_turf_helpers_main_es_feature({
  28612. type: 'Point',
  28613. coordinates: coordinates
  28614. }, properties, options);
  28615. }
  28616. /**
  28617. * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.
  28618. *
  28619. * @name points
  28620. * @param {Array<Array<number>>} coordinates an array of Points
  28621. * @param {Object} [properties={}] Translate these properties to each Feature
  28622. * @param {Object} [options={}] Optional Parameters
  28623. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  28624. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  28625. * @returns {FeatureCollection<Point>} Point Feature
  28626. * @example
  28627. * var points = turf.points([
  28628. * [-75, 39],
  28629. * [-80, 45],
  28630. * [-78, 50]
  28631. * ]);
  28632. *
  28633. * //=points
  28634. */
  28635. function rhumb_bearing_node_modules_turf_helpers_main_es_points(coordinates, properties, options) {
  28636. if (!coordinates) throw new Error('coordinates is required');
  28637. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  28638. return rhumb_bearing_node_modules_turf_helpers_main_es_featureCollection(coordinates.map(function (coords) {
  28639. return rhumb_bearing_node_modules_turf_helpers_main_es_point(coords, properties);
  28640. }), options);
  28641. }
  28642. /**
  28643. * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.
  28644. *
  28645. * @name polygon
  28646. * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings
  28647. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  28648. * @param {Object} [options={}] Optional Parameters
  28649. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  28650. * @param {string|number} [options.id] Identifier associated with the Feature
  28651. * @returns {Feature<Polygon>} Polygon Feature
  28652. * @example
  28653. * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });
  28654. *
  28655. * //=polygon
  28656. */
  28657. function rhumb_bearing_node_modules_turf_helpers_main_es_polygon(coordinates, properties, options) {
  28658. if (!coordinates) throw new Error('coordinates is required');
  28659. for (var i = 0; i < coordinates.length; i++) {
  28660. var ring = coordinates[i];
  28661. if (ring.length < 4) {
  28662. throw new Error('Each LinearRing of a Polygon must have 4 or more Positions.');
  28663. }
  28664. for (var j = 0; j < ring[ring.length - 1].length; j++) {
  28665. // Check if first point of Polygon contains two numbers
  28666. if (i === 0 && j === 0 && !rhumb_bearing_node_modules_turf_helpers_main_es_isNumber(ring[0][0]) || !rhumb_bearing_node_modules_turf_helpers_main_es_isNumber(ring[0][1])) throw new Error('coordinates must contain numbers');
  28667. if (ring[ring.length - 1][j] !== ring[0][j]) {
  28668. throw new Error('First and last Position are not equivalent.');
  28669. }
  28670. }
  28671. }
  28672. return rhumb_bearing_node_modules_turf_helpers_main_es_feature({
  28673. type: 'Polygon',
  28674. coordinates: coordinates
  28675. }, properties, options);
  28676. }
  28677. /**
  28678. * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.
  28679. *
  28680. * @name polygons
  28681. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates
  28682. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  28683. * @param {Object} [options={}] Optional Parameters
  28684. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  28685. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  28686. * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection
  28687. * @example
  28688. * var polygons = turf.polygons([
  28689. * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],
  28690. * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],
  28691. * ]);
  28692. *
  28693. * //=polygons
  28694. */
  28695. function rhumb_bearing_node_modules_turf_helpers_main_es_polygons(coordinates, properties, options) {
  28696. if (!coordinates) throw new Error('coordinates is required');
  28697. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  28698. return rhumb_bearing_node_modules_turf_helpers_main_es_featureCollection(coordinates.map(function (coords) {
  28699. return rhumb_bearing_node_modules_turf_helpers_main_es_polygon(coords, properties);
  28700. }), options);
  28701. }
  28702. /**
  28703. * Creates a {@link LineString} {@link Feature} from an Array of Positions.
  28704. *
  28705. * @name lineString
  28706. * @param {Array<Array<number>>} coordinates an array of Positions
  28707. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  28708. * @param {Object} [options={}] Optional Parameters
  28709. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  28710. * @param {string|number} [options.id] Identifier associated with the Feature
  28711. * @returns {Feature<LineString>} LineString Feature
  28712. * @example
  28713. * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});
  28714. * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});
  28715. *
  28716. * //=linestring1
  28717. * //=linestring2
  28718. */
  28719. function rhumb_bearing_node_modules_turf_helpers_main_es_lineString(coordinates, properties, options) {
  28720. if (!coordinates) throw new Error('coordinates is required');
  28721. if (coordinates.length < 2) throw new Error('coordinates must be an array of two or more positions'); // Check if first point of LineString contains two numbers
  28722. if (!rhumb_bearing_node_modules_turf_helpers_main_es_isNumber(coordinates[0][1]) || !rhumb_bearing_node_modules_turf_helpers_main_es_isNumber(coordinates[0][1])) throw new Error('coordinates must contain numbers');
  28723. return rhumb_bearing_node_modules_turf_helpers_main_es_feature({
  28724. type: 'LineString',
  28725. coordinates: coordinates
  28726. }, properties, options);
  28727. }
  28728. /**
  28729. * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.
  28730. *
  28731. * @name lineStrings
  28732. * @param {Array<Array<number>>} coordinates an array of LinearRings
  28733. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  28734. * @param {Object} [options={}] Optional Parameters
  28735. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  28736. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  28737. * @returns {FeatureCollection<LineString>} LineString FeatureCollection
  28738. * @example
  28739. * var linestrings = turf.lineStrings([
  28740. * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],
  28741. * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]
  28742. * ]);
  28743. *
  28744. * //=linestrings
  28745. */
  28746. function rhumb_bearing_node_modules_turf_helpers_main_es_lineStrings(coordinates, properties, options) {
  28747. if (!coordinates) throw new Error('coordinates is required');
  28748. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  28749. return rhumb_bearing_node_modules_turf_helpers_main_es_featureCollection(coordinates.map(function (coords) {
  28750. return rhumb_bearing_node_modules_turf_helpers_main_es_lineString(coords, properties);
  28751. }), options);
  28752. }
  28753. /**
  28754. * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.
  28755. *
  28756. * @name featureCollection
  28757. * @param {Feature[]} features input features
  28758. * @param {Object} [options={}] Optional Parameters
  28759. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  28760. * @param {string|number} [options.id] Identifier associated with the Feature
  28761. * @returns {FeatureCollection} FeatureCollection of Features
  28762. * @example
  28763. * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});
  28764. * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});
  28765. * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});
  28766. *
  28767. * var collection = turf.featureCollection([
  28768. * locationA,
  28769. * locationB,
  28770. * locationC
  28771. * ]);
  28772. *
  28773. * //=collection
  28774. */
  28775. function rhumb_bearing_node_modules_turf_helpers_main_es_featureCollection(features, options) {
  28776. // Optional Parameters
  28777. options = options || {};
  28778. if (!rhumb_bearing_node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  28779. var bbox = options.bbox;
  28780. var id = options.id; // Validation
  28781. if (!features) throw new Error('No features passed');
  28782. if (!Array.isArray(features)) throw new Error('features must be an Array');
  28783. if (bbox) rhumb_bearing_node_modules_turf_helpers_main_es_validateBBox(bbox);
  28784. if (id) rhumb_bearing_node_modules_turf_helpers_main_es_validateId(id); // Main
  28785. var fc = {
  28786. type: 'FeatureCollection'
  28787. };
  28788. if (id) fc.id = id;
  28789. if (bbox) fc.bbox = bbox;
  28790. fc.features = features;
  28791. return fc;
  28792. }
  28793. /**
  28794. * Creates a {@link Feature<MultiLineString>} based on a
  28795. * coordinate array. Properties can be added optionally.
  28796. *
  28797. * @name multiLineString
  28798. * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings
  28799. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  28800. * @param {Object} [options={}] Optional Parameters
  28801. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  28802. * @param {string|number} [options.id] Identifier associated with the Feature
  28803. * @returns {Feature<MultiLineString>} a MultiLineString feature
  28804. * @throws {Error} if no coordinates are passed
  28805. * @example
  28806. * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);
  28807. *
  28808. * //=multiLine
  28809. */
  28810. function rhumb_bearing_node_modules_turf_helpers_main_es_multiLineString(coordinates, properties, options) {
  28811. if (!coordinates) throw new Error('coordinates is required');
  28812. return rhumb_bearing_node_modules_turf_helpers_main_es_feature({
  28813. type: 'MultiLineString',
  28814. coordinates: coordinates
  28815. }, properties, options);
  28816. }
  28817. /**
  28818. * Creates a {@link Feature<MultiPoint>} based on a
  28819. * coordinate array. Properties can be added optionally.
  28820. *
  28821. * @name multiPoint
  28822. * @param {Array<Array<number>>} coordinates an array of Positions
  28823. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  28824. * @param {Object} [options={}] Optional Parameters
  28825. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  28826. * @param {string|number} [options.id] Identifier associated with the Feature
  28827. * @returns {Feature<MultiPoint>} a MultiPoint feature
  28828. * @throws {Error} if no coordinates are passed
  28829. * @example
  28830. * var multiPt = turf.multiPoint([[0,0],[10,10]]);
  28831. *
  28832. * //=multiPt
  28833. */
  28834. function rhumb_bearing_node_modules_turf_helpers_main_es_multiPoint(coordinates, properties, options) {
  28835. if (!coordinates) throw new Error('coordinates is required');
  28836. return rhumb_bearing_node_modules_turf_helpers_main_es_feature({
  28837. type: 'MultiPoint',
  28838. coordinates: coordinates
  28839. }, properties, options);
  28840. }
  28841. /**
  28842. * Creates a {@link Feature<MultiPolygon>} based on a
  28843. * coordinate array. Properties can be added optionally.
  28844. *
  28845. * @name multiPolygon
  28846. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons
  28847. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  28848. * @param {Object} [options={}] Optional Parameters
  28849. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  28850. * @param {string|number} [options.id] Identifier associated with the Feature
  28851. * @returns {Feature<MultiPolygon>} a multipolygon feature
  28852. * @throws {Error} if no coordinates are passed
  28853. * @example
  28854. * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);
  28855. *
  28856. * //=multiPoly
  28857. *
  28858. */
  28859. function rhumb_bearing_node_modules_turf_helpers_main_es_multiPolygon(coordinates, properties, options) {
  28860. if (!coordinates) throw new Error('coordinates is required');
  28861. return rhumb_bearing_node_modules_turf_helpers_main_es_feature({
  28862. type: 'MultiPolygon',
  28863. coordinates: coordinates
  28864. }, properties, options);
  28865. }
  28866. /**
  28867. * Creates a {@link Feature<GeometryCollection>} based on a
  28868. * coordinate array. Properties can be added optionally.
  28869. *
  28870. * @name geometryCollection
  28871. * @param {Array<Geometry>} geometries an array of GeoJSON Geometries
  28872. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  28873. * @param {Object} [options={}] Optional Parameters
  28874. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  28875. * @param {string|number} [options.id] Identifier associated with the Feature
  28876. * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature
  28877. * @example
  28878. * var pt = {
  28879. * "type": "Point",
  28880. * "coordinates": [100, 0]
  28881. * };
  28882. * var line = {
  28883. * "type": "LineString",
  28884. * "coordinates": [ [101, 0], [102, 1] ]
  28885. * };
  28886. * var collection = turf.geometryCollection([pt, line]);
  28887. *
  28888. * //=collection
  28889. */
  28890. function rhumb_bearing_node_modules_turf_helpers_main_es_geometryCollection(geometries, properties, options) {
  28891. if (!geometries) throw new Error('geometries is required');
  28892. if (!Array.isArray(geometries)) throw new Error('geometries must be an Array');
  28893. return rhumb_bearing_node_modules_turf_helpers_main_es_feature({
  28894. type: 'GeometryCollection',
  28895. geometries: geometries
  28896. }, properties, options);
  28897. }
  28898. /**
  28899. * Round number to precision
  28900. *
  28901. * @param {number} num Number
  28902. * @param {number} [precision=0] Precision
  28903. * @returns {number} rounded number
  28904. * @example
  28905. * turf.round(120.4321)
  28906. * //=120
  28907. *
  28908. * turf.round(120.4321, 2)
  28909. * //=120.43
  28910. */
  28911. function rhumb_bearing_node_modules_turf_helpers_main_es_round(num, precision) {
  28912. if (num === undefined || num === null || isNaN(num)) throw new Error('num is required');
  28913. if (precision && !(precision >= 0)) throw new Error('precision must be a positive number');
  28914. var multiplier = Math.pow(10, precision || 0);
  28915. return Math.round(num * multiplier) / multiplier;
  28916. }
  28917. /**
  28918. * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.
  28919. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  28920. *
  28921. * @name radiansToLength
  28922. * @param {number} radians in radians across the sphere
  28923. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  28924. * @returns {number} distance
  28925. */
  28926. function rhumb_bearing_node_modules_turf_helpers_main_es_radiansToLength(radians, units) {
  28927. if (radians === undefined || radians === null) throw new Error('radians is required');
  28928. if (units && typeof units !== 'string') throw new Error('units must be a string');
  28929. var factor = rhumb_bearing_node_modules_turf_helpers_main_es_factors[units || 'kilometers'];
  28930. if (!factor) throw new Error(units + ' units is invalid');
  28931. return radians * factor;
  28932. }
  28933. /**
  28934. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians
  28935. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  28936. *
  28937. * @name lengthToRadians
  28938. * @param {number} distance in real units
  28939. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  28940. * @returns {number} radians
  28941. */
  28942. function rhumb_bearing_node_modules_turf_helpers_main_es_lengthToRadians(distance, units) {
  28943. if (distance === undefined || distance === null) throw new Error('distance is required');
  28944. if (units && typeof units !== 'string') throw new Error('units must be a string');
  28945. var factor = rhumb_bearing_node_modules_turf_helpers_main_es_factors[units || 'kilometers'];
  28946. if (!factor) throw new Error(units + ' units is invalid');
  28947. return distance / factor;
  28948. }
  28949. /**
  28950. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees
  28951. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet
  28952. *
  28953. * @name lengthToDegrees
  28954. * @param {number} distance in real units
  28955. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  28956. * @returns {number} degrees
  28957. */
  28958. function rhumb_bearing_node_modules_turf_helpers_main_es_lengthToDegrees(distance, units) {
  28959. return rhumb_bearing_node_modules_turf_helpers_main_es_radiansToDegrees(rhumb_bearing_node_modules_turf_helpers_main_es_lengthToRadians(distance, units));
  28960. }
  28961. /**
  28962. * Converts any bearing angle from the north line direction (positive clockwise)
  28963. * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line
  28964. *
  28965. * @name bearingToAzimuth
  28966. * @param {number} bearing angle, between -180 and +180 degrees
  28967. * @returns {number} angle between 0 and 360 degrees
  28968. */
  28969. function rhumb_bearing_node_modules_turf_helpers_main_es_bearingToAzimuth(bearing) {
  28970. if (bearing === null || bearing === undefined) throw new Error('bearing is required');
  28971. var angle = bearing % 360;
  28972. if (angle < 0) angle += 360;
  28973. return angle;
  28974. }
  28975. /**
  28976. * Converts an angle in radians to degrees
  28977. *
  28978. * @name radiansToDegrees
  28979. * @param {number} radians angle in radians
  28980. * @returns {number} degrees between 0 and 360 degrees
  28981. */
  28982. function rhumb_bearing_node_modules_turf_helpers_main_es_radiansToDegrees(radians) {
  28983. if (radians === null || radians === undefined) throw new Error('radians is required');
  28984. var degrees = radians % (2 * Math.PI);
  28985. return degrees * 180 / Math.PI;
  28986. }
  28987. /**
  28988. * Converts an angle in degrees to radians
  28989. *
  28990. * @name degreesToRadians
  28991. * @param {number} degrees angle between 0 and 360 degrees
  28992. * @returns {number} angle in radians
  28993. */
  28994. function rhumb_bearing_node_modules_turf_helpers_main_es_degreesToRadians(degrees) {
  28995. if (degrees === null || degrees === undefined) throw new Error('degrees is required');
  28996. var radians = degrees % 360;
  28997. return radians * Math.PI / 180;
  28998. }
  28999. /**
  29000. * Converts a length to the requested unit.
  29001. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  29002. *
  29003. * @param {number} length to be converted
  29004. * @param {string} originalUnit of the length
  29005. * @param {string} [finalUnit='kilometers'] returned unit
  29006. * @returns {number} the converted length
  29007. */
  29008. function rhumb_bearing_node_modules_turf_helpers_main_es_convertLength(length, originalUnit, finalUnit) {
  29009. if (length === null || length === undefined) throw new Error('length is required');
  29010. if (!(length >= 0)) throw new Error('length must be a positive number');
  29011. return rhumb_bearing_node_modules_turf_helpers_main_es_radiansToLength(rhumb_bearing_node_modules_turf_helpers_main_es_lengthToRadians(length, originalUnit), finalUnit || 'kilometers');
  29012. }
  29013. /**
  29014. * Converts a area to the requested unit.
  29015. * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches
  29016. * @param {number} area to be converted
  29017. * @param {string} [originalUnit='meters'] of the distance
  29018. * @param {string} [finalUnit='kilometers'] returned unit
  29019. * @returns {number} the converted distance
  29020. */
  29021. function rhumb_bearing_node_modules_turf_helpers_main_es_convertArea(area, originalUnit, finalUnit) {
  29022. if (area === null || area === undefined) throw new Error('area is required');
  29023. if (!(area >= 0)) throw new Error('area must be a positive number');
  29024. var startFactor = rhumb_bearing_node_modules_turf_helpers_main_es_areaFactors[originalUnit || 'meters'];
  29025. if (!startFactor) throw new Error('invalid original units');
  29026. var finalFactor = rhumb_bearing_node_modules_turf_helpers_main_es_areaFactors[finalUnit || 'kilometers'];
  29027. if (!finalFactor) throw new Error('invalid final units');
  29028. return area / startFactor * finalFactor;
  29029. }
  29030. /**
  29031. * isNumber
  29032. *
  29033. * @param {*} num Number to validate
  29034. * @returns {boolean} true/false
  29035. * @example
  29036. * turf.isNumber(123)
  29037. * //=true
  29038. * turf.isNumber('foo')
  29039. * //=false
  29040. */
  29041. function rhumb_bearing_node_modules_turf_helpers_main_es_isNumber(num) {
  29042. return !isNaN(num) && num !== null && !Array.isArray(num);
  29043. }
  29044. /**
  29045. * isObject
  29046. *
  29047. * @param {*} input variable to validate
  29048. * @returns {boolean} true/false
  29049. * @example
  29050. * turf.isObject({elevation: 10})
  29051. * //=true
  29052. * turf.isObject('foo')
  29053. * //=false
  29054. */
  29055. function rhumb_bearing_node_modules_turf_helpers_main_es_isObject(input) {
  29056. return !!input && input.constructor === Object;
  29057. }
  29058. /**
  29059. * Validate BBox
  29060. *
  29061. * @private
  29062. * @param {Array<number>} bbox BBox to validate
  29063. * @returns {void}
  29064. * @throws Error if BBox is not valid
  29065. * @example
  29066. * validateBBox([-180, -40, 110, 50])
  29067. * //=OK
  29068. * validateBBox([-180, -40])
  29069. * //=Error
  29070. * validateBBox('Foo')
  29071. * //=Error
  29072. * validateBBox(5)
  29073. * //=Error
  29074. * validateBBox(null)
  29075. * //=Error
  29076. * validateBBox(undefined)
  29077. * //=Error
  29078. */
  29079. function rhumb_bearing_node_modules_turf_helpers_main_es_validateBBox(bbox) {
  29080. if (!bbox) throw new Error('bbox is required');
  29081. if (!Array.isArray(bbox)) throw new Error('bbox must be an Array');
  29082. if (bbox.length !== 4 && bbox.length !== 6) throw new Error('bbox must be an Array of 4 or 6 numbers');
  29083. bbox.forEach(function (num) {
  29084. if (!rhumb_bearing_node_modules_turf_helpers_main_es_isNumber(num)) throw new Error('bbox must only contain numbers');
  29085. });
  29086. }
  29087. /**
  29088. * Validate Id
  29089. *
  29090. * @private
  29091. * @param {string|number} id Id to validate
  29092. * @returns {void}
  29093. * @throws Error if Id is not valid
  29094. * @example
  29095. * validateId([-180, -40, 110, 50])
  29096. * //=Error
  29097. * validateId([-180, -40])
  29098. * //=Error
  29099. * validateId('Foo')
  29100. * //=OK
  29101. * validateId(5)
  29102. * //=OK
  29103. * validateId(null)
  29104. * //=Error
  29105. * validateId(undefined)
  29106. * //=Error
  29107. */
  29108. function rhumb_bearing_node_modules_turf_helpers_main_es_validateId(id) {
  29109. if (!id) throw new Error('id is required');
  29110. if (['string', 'number'].indexOf(typeof id) === -1) throw new Error('id must be a number or a string');
  29111. } // Deprecated methods
  29112. function rhumb_bearing_node_modules_turf_helpers_main_es_radians2degrees() {
  29113. throw new Error('method has been renamed to `radiansToDegrees`');
  29114. }
  29115. function rhumb_bearing_node_modules_turf_helpers_main_es_degrees2radians() {
  29116. throw new Error('method has been renamed to `degreesToRadians`');
  29117. }
  29118. function rhumb_bearing_node_modules_turf_helpers_main_es_distanceToDegrees() {
  29119. throw new Error('method has been renamed to `lengthToDegrees`');
  29120. }
  29121. function rhumb_bearing_node_modules_turf_helpers_main_es_distanceToRadians() {
  29122. throw new Error('method has been renamed to `lengthToRadians`');
  29123. }
  29124. function rhumb_bearing_node_modules_turf_helpers_main_es_radiansToDistance() {
  29125. throw new Error('method has been renamed to `radiansToLength`');
  29126. }
  29127. function rhumb_bearing_node_modules_turf_helpers_main_es_bearingToAngle() {
  29128. throw new Error('method has been renamed to `bearingToAzimuth`');
  29129. }
  29130. function rhumb_bearing_node_modules_turf_helpers_main_es_convertDistance() {
  29131. throw new Error('method has been renamed to `convertLength`');
  29132. }
  29133. // CONCATENATED MODULE: ./node_modules/@turf/rhumb-bearing/main.es.js
  29134. // https://en.wikipedia.org/wiki/Rhumb_line
  29135. /**
  29136. * Takes two {@link Point|points} and finds the bearing angle between them along a Rhumb line
  29137. * i.e. the angle measured in degrees start the north line (0 degrees)
  29138. *
  29139. * @name rhumbBearing
  29140. * @param {Coord} start starting Point
  29141. * @param {Coord} end ending Point
  29142. * @param {Object} [options] Optional parameters
  29143. * @param {boolean} [options.final=false] calculates the final bearing if true
  29144. * @returns {number} bearing from north in decimal degrees, between -180 and 180 degrees (positive clockwise)
  29145. * @example
  29146. * var point1 = turf.point([-75.343, 39.984], {"marker-color": "#F00"});
  29147. * var point2 = turf.point([-75.534, 39.123], {"marker-color": "#00F"});
  29148. *
  29149. * var bearing = turf.rhumbBearing(point1, point2);
  29150. *
  29151. * //addToMap
  29152. * var addToMap = [point1, point2];
  29153. * point1.properties.bearing = bearing;
  29154. * point2.properties.bearing = bearing;
  29155. */
  29156. function rhumbBearing(start, end, options) {
  29157. // Optional parameters
  29158. options = options || {};
  29159. if (!rhumb_bearing_node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  29160. var final = options.final; // validation
  29161. if (!start) throw new Error('start point is required');
  29162. if (!end) throw new Error('end point is required');
  29163. var bear360;
  29164. if (final) bear360 = calculateRhumbBearing(getCoord(end), getCoord(start));else bear360 = calculateRhumbBearing(getCoord(start), getCoord(end));
  29165. var bear180 = bear360 > 180 ? -(360 - bear360) : bear360;
  29166. return bear180;
  29167. }
  29168. /**
  29169. * Returns the bearing from ‘this’ point to destination point along a rhumb line.
  29170. * Adapted from Geodesy: https://github.com/chrisveness/geodesy/blob/master/latlon-spherical.js
  29171. *
  29172. * @private
  29173. * @param {Array<number>} from - origin point.
  29174. * @param {Array<number>} to - destination point.
  29175. * @returns {number} Bearing in degrees from north.
  29176. * @example
  29177. * var p1 = new LatLon(51.127, 1.338);
  29178. * var p2 = new LatLon(50.964, 1.853);
  29179. * var d = p1.rhumbBearingTo(p2); // 116.7 m
  29180. */
  29181. function calculateRhumbBearing(from, to) {
  29182. // φ => phi
  29183. // Δλ => deltaLambda
  29184. // Δψ => deltaPsi
  29185. // θ => theta
  29186. var phi1 = rhumb_bearing_node_modules_turf_helpers_main_es_degreesToRadians(from[1]);
  29187. var phi2 = rhumb_bearing_node_modules_turf_helpers_main_es_degreesToRadians(to[1]);
  29188. var deltaLambda = rhumb_bearing_node_modules_turf_helpers_main_es_degreesToRadians(to[0] - from[0]); // if deltaLambdaon over 180° take shorter rhumb line across the anti-meridian:
  29189. if (deltaLambda > Math.PI) deltaLambda -= 2 * Math.PI;
  29190. if (deltaLambda < -Math.PI) deltaLambda += 2 * Math.PI;
  29191. var deltaPsi = Math.log(Math.tan(phi2 / 2 + Math.PI / 4) / Math.tan(phi1 / 2 + Math.PI / 4));
  29192. var theta = Math.atan2(deltaLambda, deltaPsi);
  29193. return (rhumb_bearing_node_modules_turf_helpers_main_es_radiansToDegrees(theta) + 360) % 360;
  29194. }
  29195. /* harmony default export */ var rhumb_bearing_main_es = (rhumbBearing);
  29196. // CONCATENATED MODULE: ./node_modules/@turf/rhumb-distance/node_modules/@turf/helpers/main.es.js
  29197. /**
  29198. * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.
  29199. */
  29200. var rhumb_distance_node_modules_turf_helpers_main_es_earthRadius = 6371008.8;
  29201. /**
  29202. * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.
  29203. */
  29204. var rhumb_distance_node_modules_turf_helpers_main_es_factors = {
  29205. meters: rhumb_distance_node_modules_turf_helpers_main_es_earthRadius,
  29206. metres: rhumb_distance_node_modules_turf_helpers_main_es_earthRadius,
  29207. millimeters: rhumb_distance_node_modules_turf_helpers_main_es_earthRadius * 1000,
  29208. millimetres: rhumb_distance_node_modules_turf_helpers_main_es_earthRadius * 1000,
  29209. centimeters: rhumb_distance_node_modules_turf_helpers_main_es_earthRadius * 100,
  29210. centimetres: rhumb_distance_node_modules_turf_helpers_main_es_earthRadius * 100,
  29211. kilometers: rhumb_distance_node_modules_turf_helpers_main_es_earthRadius / 1000,
  29212. kilometres: rhumb_distance_node_modules_turf_helpers_main_es_earthRadius / 1000,
  29213. miles: rhumb_distance_node_modules_turf_helpers_main_es_earthRadius / 1609.344,
  29214. nauticalmiles: rhumb_distance_node_modules_turf_helpers_main_es_earthRadius / 1852,
  29215. inches: rhumb_distance_node_modules_turf_helpers_main_es_earthRadius * 39.370,
  29216. yards: rhumb_distance_node_modules_turf_helpers_main_es_earthRadius / 1.0936,
  29217. feet: rhumb_distance_node_modules_turf_helpers_main_es_earthRadius * 3.28084,
  29218. radians: 1,
  29219. degrees: rhumb_distance_node_modules_turf_helpers_main_es_earthRadius / 111325
  29220. };
  29221. /**
  29222. * Units of measurement factors based on 1 meter.
  29223. */
  29224. var rhumb_distance_node_modules_turf_helpers_main_es_unitsFactors = {
  29225. meters: 1,
  29226. metres: 1,
  29227. millimeters: 1000,
  29228. millimetres: 1000,
  29229. centimeters: 100,
  29230. centimetres: 100,
  29231. kilometers: 1 / 1000,
  29232. kilometres: 1 / 1000,
  29233. miles: 1 / 1609.344,
  29234. nauticalmiles: 1 / 1852,
  29235. inches: 39.370,
  29236. yards: 1 / 1.0936,
  29237. feet: 3.28084,
  29238. radians: 1 / rhumb_distance_node_modules_turf_helpers_main_es_earthRadius,
  29239. degrees: 1 / 111325
  29240. };
  29241. /**
  29242. * Area of measurement factors based on 1 square meter.
  29243. */
  29244. var rhumb_distance_node_modules_turf_helpers_main_es_areaFactors = {
  29245. meters: 1,
  29246. metres: 1,
  29247. millimeters: 1000000,
  29248. millimetres: 1000000,
  29249. centimeters: 10000,
  29250. centimetres: 10000,
  29251. kilometers: 0.000001,
  29252. kilometres: 0.000001,
  29253. acres: 0.000247105,
  29254. miles: 3.86e-7,
  29255. yards: 1.195990046,
  29256. feet: 10.763910417,
  29257. inches: 1550.003100006
  29258. };
  29259. /**
  29260. * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.
  29261. *
  29262. * @name feature
  29263. * @param {Geometry} geometry input geometry
  29264. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  29265. * @param {Object} [options={}] Optional Parameters
  29266. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  29267. * @param {string|number} [options.id] Identifier associated with the Feature
  29268. * @returns {Feature} a GeoJSON Feature
  29269. * @example
  29270. * var geometry = {
  29271. * "type": "Point",
  29272. * "coordinates": [110, 50]
  29273. * };
  29274. *
  29275. * var feature = turf.feature(geometry);
  29276. *
  29277. * //=feature
  29278. */
  29279. function rhumb_distance_node_modules_turf_helpers_main_es_feature(geometry, properties, options) {
  29280. // Optional Parameters
  29281. options = options || {};
  29282. if (!rhumb_distance_node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  29283. var bbox = options.bbox;
  29284. var id = options.id; // Validation
  29285. if (geometry === undefined) throw new Error('geometry is required');
  29286. if (properties && properties.constructor !== Object) throw new Error('properties must be an Object');
  29287. if (bbox) rhumb_distance_node_modules_turf_helpers_main_es_validateBBox(bbox);
  29288. if (id) rhumb_distance_node_modules_turf_helpers_main_es_validateId(id); // Main
  29289. var feat = {
  29290. type: 'Feature'
  29291. };
  29292. if (id) feat.id = id;
  29293. if (bbox) feat.bbox = bbox;
  29294. feat.properties = properties || {};
  29295. feat.geometry = geometry;
  29296. return feat;
  29297. }
  29298. /**
  29299. * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.
  29300. * For GeometryCollection type use `helpers.geometryCollection`
  29301. *
  29302. * @name geometry
  29303. * @param {string} type Geometry Type
  29304. * @param {Array<number>} coordinates Coordinates
  29305. * @param {Object} [options={}] Optional Parameters
  29306. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Geometry
  29307. * @returns {Geometry} a GeoJSON Geometry
  29308. * @example
  29309. * var type = 'Point';
  29310. * var coordinates = [110, 50];
  29311. *
  29312. * var geometry = turf.geometry(type, coordinates);
  29313. *
  29314. * //=geometry
  29315. */
  29316. function rhumb_distance_node_modules_turf_helpers_main_es_geometry(type, coordinates, options) {
  29317. // Optional Parameters
  29318. options = options || {};
  29319. if (!rhumb_distance_node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  29320. var bbox = options.bbox; // Validation
  29321. if (!type) throw new Error('type is required');
  29322. if (!coordinates) throw new Error('coordinates is required');
  29323. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  29324. if (bbox) rhumb_distance_node_modules_turf_helpers_main_es_validateBBox(bbox); // Main
  29325. var geom;
  29326. switch (type) {
  29327. case 'Point':
  29328. geom = rhumb_distance_node_modules_turf_helpers_main_es_point(coordinates).geometry;
  29329. break;
  29330. case 'LineString':
  29331. geom = rhumb_distance_node_modules_turf_helpers_main_es_lineString(coordinates).geometry;
  29332. break;
  29333. case 'Polygon':
  29334. geom = rhumb_distance_node_modules_turf_helpers_main_es_polygon(coordinates).geometry;
  29335. break;
  29336. case 'MultiPoint':
  29337. geom = rhumb_distance_node_modules_turf_helpers_main_es_multiPoint(coordinates).geometry;
  29338. break;
  29339. case 'MultiLineString':
  29340. geom = rhumb_distance_node_modules_turf_helpers_main_es_multiLineString(coordinates).geometry;
  29341. break;
  29342. case 'MultiPolygon':
  29343. geom = rhumb_distance_node_modules_turf_helpers_main_es_multiPolygon(coordinates).geometry;
  29344. break;
  29345. default:
  29346. throw new Error(type + ' is invalid');
  29347. }
  29348. if (bbox) geom.bbox = bbox;
  29349. return geom;
  29350. }
  29351. /**
  29352. * Creates a {@link Point} {@link Feature} from a Position.
  29353. *
  29354. * @name point
  29355. * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)
  29356. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  29357. * @param {Object} [options={}] Optional Parameters
  29358. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  29359. * @param {string|number} [options.id] Identifier associated with the Feature
  29360. * @returns {Feature<Point>} a Point feature
  29361. * @example
  29362. * var point = turf.point([-75.343, 39.984]);
  29363. *
  29364. * //=point
  29365. */
  29366. function rhumb_distance_node_modules_turf_helpers_main_es_point(coordinates, properties, options) {
  29367. if (!coordinates) throw new Error('coordinates is required');
  29368. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  29369. if (coordinates.length < 2) throw new Error('coordinates must be at least 2 numbers long');
  29370. if (!rhumb_distance_node_modules_turf_helpers_main_es_isNumber(coordinates[0]) || !rhumb_distance_node_modules_turf_helpers_main_es_isNumber(coordinates[1])) throw new Error('coordinates must contain numbers');
  29371. return rhumb_distance_node_modules_turf_helpers_main_es_feature({
  29372. type: 'Point',
  29373. coordinates: coordinates
  29374. }, properties, options);
  29375. }
  29376. /**
  29377. * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.
  29378. *
  29379. * @name points
  29380. * @param {Array<Array<number>>} coordinates an array of Points
  29381. * @param {Object} [properties={}] Translate these properties to each Feature
  29382. * @param {Object} [options={}] Optional Parameters
  29383. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  29384. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  29385. * @returns {FeatureCollection<Point>} Point Feature
  29386. * @example
  29387. * var points = turf.points([
  29388. * [-75, 39],
  29389. * [-80, 45],
  29390. * [-78, 50]
  29391. * ]);
  29392. *
  29393. * //=points
  29394. */
  29395. function rhumb_distance_node_modules_turf_helpers_main_es_points(coordinates, properties, options) {
  29396. if (!coordinates) throw new Error('coordinates is required');
  29397. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  29398. return rhumb_distance_node_modules_turf_helpers_main_es_featureCollection(coordinates.map(function (coords) {
  29399. return rhumb_distance_node_modules_turf_helpers_main_es_point(coords, properties);
  29400. }), options);
  29401. }
  29402. /**
  29403. * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.
  29404. *
  29405. * @name polygon
  29406. * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings
  29407. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  29408. * @param {Object} [options={}] Optional Parameters
  29409. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  29410. * @param {string|number} [options.id] Identifier associated with the Feature
  29411. * @returns {Feature<Polygon>} Polygon Feature
  29412. * @example
  29413. * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });
  29414. *
  29415. * //=polygon
  29416. */
  29417. function rhumb_distance_node_modules_turf_helpers_main_es_polygon(coordinates, properties, options) {
  29418. if (!coordinates) throw new Error('coordinates is required');
  29419. for (var i = 0; i < coordinates.length; i++) {
  29420. var ring = coordinates[i];
  29421. if (ring.length < 4) {
  29422. throw new Error('Each LinearRing of a Polygon must have 4 or more Positions.');
  29423. }
  29424. for (var j = 0; j < ring[ring.length - 1].length; j++) {
  29425. // Check if first point of Polygon contains two numbers
  29426. if (i === 0 && j === 0 && !rhumb_distance_node_modules_turf_helpers_main_es_isNumber(ring[0][0]) || !rhumb_distance_node_modules_turf_helpers_main_es_isNumber(ring[0][1])) throw new Error('coordinates must contain numbers');
  29427. if (ring[ring.length - 1][j] !== ring[0][j]) {
  29428. throw new Error('First and last Position are not equivalent.');
  29429. }
  29430. }
  29431. }
  29432. return rhumb_distance_node_modules_turf_helpers_main_es_feature({
  29433. type: 'Polygon',
  29434. coordinates: coordinates
  29435. }, properties, options);
  29436. }
  29437. /**
  29438. * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.
  29439. *
  29440. * @name polygons
  29441. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates
  29442. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  29443. * @param {Object} [options={}] Optional Parameters
  29444. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  29445. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  29446. * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection
  29447. * @example
  29448. * var polygons = turf.polygons([
  29449. * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],
  29450. * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],
  29451. * ]);
  29452. *
  29453. * //=polygons
  29454. */
  29455. function rhumb_distance_node_modules_turf_helpers_main_es_polygons(coordinates, properties, options) {
  29456. if (!coordinates) throw new Error('coordinates is required');
  29457. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  29458. return rhumb_distance_node_modules_turf_helpers_main_es_featureCollection(coordinates.map(function (coords) {
  29459. return rhumb_distance_node_modules_turf_helpers_main_es_polygon(coords, properties);
  29460. }), options);
  29461. }
  29462. /**
  29463. * Creates a {@link LineString} {@link Feature} from an Array of Positions.
  29464. *
  29465. * @name lineString
  29466. * @param {Array<Array<number>>} coordinates an array of Positions
  29467. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  29468. * @param {Object} [options={}] Optional Parameters
  29469. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  29470. * @param {string|number} [options.id] Identifier associated with the Feature
  29471. * @returns {Feature<LineString>} LineString Feature
  29472. * @example
  29473. * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});
  29474. * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});
  29475. *
  29476. * //=linestring1
  29477. * //=linestring2
  29478. */
  29479. function rhumb_distance_node_modules_turf_helpers_main_es_lineString(coordinates, properties, options) {
  29480. if (!coordinates) throw new Error('coordinates is required');
  29481. if (coordinates.length < 2) throw new Error('coordinates must be an array of two or more positions'); // Check if first point of LineString contains two numbers
  29482. if (!rhumb_distance_node_modules_turf_helpers_main_es_isNumber(coordinates[0][1]) || !rhumb_distance_node_modules_turf_helpers_main_es_isNumber(coordinates[0][1])) throw new Error('coordinates must contain numbers');
  29483. return rhumb_distance_node_modules_turf_helpers_main_es_feature({
  29484. type: 'LineString',
  29485. coordinates: coordinates
  29486. }, properties, options);
  29487. }
  29488. /**
  29489. * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.
  29490. *
  29491. * @name lineStrings
  29492. * @param {Array<Array<number>>} coordinates an array of LinearRings
  29493. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  29494. * @param {Object} [options={}] Optional Parameters
  29495. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  29496. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  29497. * @returns {FeatureCollection<LineString>} LineString FeatureCollection
  29498. * @example
  29499. * var linestrings = turf.lineStrings([
  29500. * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],
  29501. * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]
  29502. * ]);
  29503. *
  29504. * //=linestrings
  29505. */
  29506. function rhumb_distance_node_modules_turf_helpers_main_es_lineStrings(coordinates, properties, options) {
  29507. if (!coordinates) throw new Error('coordinates is required');
  29508. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  29509. return rhumb_distance_node_modules_turf_helpers_main_es_featureCollection(coordinates.map(function (coords) {
  29510. return rhumb_distance_node_modules_turf_helpers_main_es_lineString(coords, properties);
  29511. }), options);
  29512. }
  29513. /**
  29514. * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.
  29515. *
  29516. * @name featureCollection
  29517. * @param {Feature[]} features input features
  29518. * @param {Object} [options={}] Optional Parameters
  29519. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  29520. * @param {string|number} [options.id] Identifier associated with the Feature
  29521. * @returns {FeatureCollection} FeatureCollection of Features
  29522. * @example
  29523. * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});
  29524. * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});
  29525. * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});
  29526. *
  29527. * var collection = turf.featureCollection([
  29528. * locationA,
  29529. * locationB,
  29530. * locationC
  29531. * ]);
  29532. *
  29533. * //=collection
  29534. */
  29535. function rhumb_distance_node_modules_turf_helpers_main_es_featureCollection(features, options) {
  29536. // Optional Parameters
  29537. options = options || {};
  29538. if (!rhumb_distance_node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  29539. var bbox = options.bbox;
  29540. var id = options.id; // Validation
  29541. if (!features) throw new Error('No features passed');
  29542. if (!Array.isArray(features)) throw new Error('features must be an Array');
  29543. if (bbox) rhumb_distance_node_modules_turf_helpers_main_es_validateBBox(bbox);
  29544. if (id) rhumb_distance_node_modules_turf_helpers_main_es_validateId(id); // Main
  29545. var fc = {
  29546. type: 'FeatureCollection'
  29547. };
  29548. if (id) fc.id = id;
  29549. if (bbox) fc.bbox = bbox;
  29550. fc.features = features;
  29551. return fc;
  29552. }
  29553. /**
  29554. * Creates a {@link Feature<MultiLineString>} based on a
  29555. * coordinate array. Properties can be added optionally.
  29556. *
  29557. * @name multiLineString
  29558. * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings
  29559. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  29560. * @param {Object} [options={}] Optional Parameters
  29561. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  29562. * @param {string|number} [options.id] Identifier associated with the Feature
  29563. * @returns {Feature<MultiLineString>} a MultiLineString feature
  29564. * @throws {Error} if no coordinates are passed
  29565. * @example
  29566. * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);
  29567. *
  29568. * //=multiLine
  29569. */
  29570. function rhumb_distance_node_modules_turf_helpers_main_es_multiLineString(coordinates, properties, options) {
  29571. if (!coordinates) throw new Error('coordinates is required');
  29572. return rhumb_distance_node_modules_turf_helpers_main_es_feature({
  29573. type: 'MultiLineString',
  29574. coordinates: coordinates
  29575. }, properties, options);
  29576. }
  29577. /**
  29578. * Creates a {@link Feature<MultiPoint>} based on a
  29579. * coordinate array. Properties can be added optionally.
  29580. *
  29581. * @name multiPoint
  29582. * @param {Array<Array<number>>} coordinates an array of Positions
  29583. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  29584. * @param {Object} [options={}] Optional Parameters
  29585. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  29586. * @param {string|number} [options.id] Identifier associated with the Feature
  29587. * @returns {Feature<MultiPoint>} a MultiPoint feature
  29588. * @throws {Error} if no coordinates are passed
  29589. * @example
  29590. * var multiPt = turf.multiPoint([[0,0],[10,10]]);
  29591. *
  29592. * //=multiPt
  29593. */
  29594. function rhumb_distance_node_modules_turf_helpers_main_es_multiPoint(coordinates, properties, options) {
  29595. if (!coordinates) throw new Error('coordinates is required');
  29596. return rhumb_distance_node_modules_turf_helpers_main_es_feature({
  29597. type: 'MultiPoint',
  29598. coordinates: coordinates
  29599. }, properties, options);
  29600. }
  29601. /**
  29602. * Creates a {@link Feature<MultiPolygon>} based on a
  29603. * coordinate array. Properties can be added optionally.
  29604. *
  29605. * @name multiPolygon
  29606. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons
  29607. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  29608. * @param {Object} [options={}] Optional Parameters
  29609. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  29610. * @param {string|number} [options.id] Identifier associated with the Feature
  29611. * @returns {Feature<MultiPolygon>} a multipolygon feature
  29612. * @throws {Error} if no coordinates are passed
  29613. * @example
  29614. * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);
  29615. *
  29616. * //=multiPoly
  29617. *
  29618. */
  29619. function rhumb_distance_node_modules_turf_helpers_main_es_multiPolygon(coordinates, properties, options) {
  29620. if (!coordinates) throw new Error('coordinates is required');
  29621. return rhumb_distance_node_modules_turf_helpers_main_es_feature({
  29622. type: 'MultiPolygon',
  29623. coordinates: coordinates
  29624. }, properties, options);
  29625. }
  29626. /**
  29627. * Creates a {@link Feature<GeometryCollection>} based on a
  29628. * coordinate array. Properties can be added optionally.
  29629. *
  29630. * @name geometryCollection
  29631. * @param {Array<Geometry>} geometries an array of GeoJSON Geometries
  29632. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  29633. * @param {Object} [options={}] Optional Parameters
  29634. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  29635. * @param {string|number} [options.id] Identifier associated with the Feature
  29636. * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature
  29637. * @example
  29638. * var pt = {
  29639. * "type": "Point",
  29640. * "coordinates": [100, 0]
  29641. * };
  29642. * var line = {
  29643. * "type": "LineString",
  29644. * "coordinates": [ [101, 0], [102, 1] ]
  29645. * };
  29646. * var collection = turf.geometryCollection([pt, line]);
  29647. *
  29648. * //=collection
  29649. */
  29650. function rhumb_distance_node_modules_turf_helpers_main_es_geometryCollection(geometries, properties, options) {
  29651. if (!geometries) throw new Error('geometries is required');
  29652. if (!Array.isArray(geometries)) throw new Error('geometries must be an Array');
  29653. return rhumb_distance_node_modules_turf_helpers_main_es_feature({
  29654. type: 'GeometryCollection',
  29655. geometries: geometries
  29656. }, properties, options);
  29657. }
  29658. /**
  29659. * Round number to precision
  29660. *
  29661. * @param {number} num Number
  29662. * @param {number} [precision=0] Precision
  29663. * @returns {number} rounded number
  29664. * @example
  29665. * turf.round(120.4321)
  29666. * //=120
  29667. *
  29668. * turf.round(120.4321, 2)
  29669. * //=120.43
  29670. */
  29671. function rhumb_distance_node_modules_turf_helpers_main_es_round(num, precision) {
  29672. if (num === undefined || num === null || isNaN(num)) throw new Error('num is required');
  29673. if (precision && !(precision >= 0)) throw new Error('precision must be a positive number');
  29674. var multiplier = Math.pow(10, precision || 0);
  29675. return Math.round(num * multiplier) / multiplier;
  29676. }
  29677. /**
  29678. * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.
  29679. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  29680. *
  29681. * @name radiansToLength
  29682. * @param {number} radians in radians across the sphere
  29683. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  29684. * @returns {number} distance
  29685. */
  29686. function rhumb_distance_node_modules_turf_helpers_main_es_radiansToLength(radians, units) {
  29687. if (radians === undefined || radians === null) throw new Error('radians is required');
  29688. if (units && typeof units !== 'string') throw new Error('units must be a string');
  29689. var factor = rhumb_distance_node_modules_turf_helpers_main_es_factors[units || 'kilometers'];
  29690. if (!factor) throw new Error(units + ' units is invalid');
  29691. return radians * factor;
  29692. }
  29693. /**
  29694. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians
  29695. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  29696. *
  29697. * @name lengthToRadians
  29698. * @param {number} distance in real units
  29699. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  29700. * @returns {number} radians
  29701. */
  29702. function rhumb_distance_node_modules_turf_helpers_main_es_lengthToRadians(distance, units) {
  29703. if (distance === undefined || distance === null) throw new Error('distance is required');
  29704. if (units && typeof units !== 'string') throw new Error('units must be a string');
  29705. var factor = rhumb_distance_node_modules_turf_helpers_main_es_factors[units || 'kilometers'];
  29706. if (!factor) throw new Error(units + ' units is invalid');
  29707. return distance / factor;
  29708. }
  29709. /**
  29710. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees
  29711. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet
  29712. *
  29713. * @name lengthToDegrees
  29714. * @param {number} distance in real units
  29715. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  29716. * @returns {number} degrees
  29717. */
  29718. function rhumb_distance_node_modules_turf_helpers_main_es_lengthToDegrees(distance, units) {
  29719. return rhumb_distance_node_modules_turf_helpers_main_es_radiansToDegrees(rhumb_distance_node_modules_turf_helpers_main_es_lengthToRadians(distance, units));
  29720. }
  29721. /**
  29722. * Converts any bearing angle from the north line direction (positive clockwise)
  29723. * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line
  29724. *
  29725. * @name bearingToAzimuth
  29726. * @param {number} bearing angle, between -180 and +180 degrees
  29727. * @returns {number} angle between 0 and 360 degrees
  29728. */
  29729. function rhumb_distance_node_modules_turf_helpers_main_es_bearingToAzimuth(bearing) {
  29730. if (bearing === null || bearing === undefined) throw new Error('bearing is required');
  29731. var angle = bearing % 360;
  29732. if (angle < 0) angle += 360;
  29733. return angle;
  29734. }
  29735. /**
  29736. * Converts an angle in radians to degrees
  29737. *
  29738. * @name radiansToDegrees
  29739. * @param {number} radians angle in radians
  29740. * @returns {number} degrees between 0 and 360 degrees
  29741. */
  29742. function rhumb_distance_node_modules_turf_helpers_main_es_radiansToDegrees(radians) {
  29743. if (radians === null || radians === undefined) throw new Error('radians is required');
  29744. var degrees = radians % (2 * Math.PI);
  29745. return degrees * 180 / Math.PI;
  29746. }
  29747. /**
  29748. * Converts an angle in degrees to radians
  29749. *
  29750. * @name degreesToRadians
  29751. * @param {number} degrees angle between 0 and 360 degrees
  29752. * @returns {number} angle in radians
  29753. */
  29754. function rhumb_distance_node_modules_turf_helpers_main_es_degreesToRadians(degrees) {
  29755. if (degrees === null || degrees === undefined) throw new Error('degrees is required');
  29756. var radians = degrees % 360;
  29757. return radians * Math.PI / 180;
  29758. }
  29759. /**
  29760. * Converts a length to the requested unit.
  29761. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  29762. *
  29763. * @param {number} length to be converted
  29764. * @param {string} originalUnit of the length
  29765. * @param {string} [finalUnit='kilometers'] returned unit
  29766. * @returns {number} the converted length
  29767. */
  29768. function rhumb_distance_node_modules_turf_helpers_main_es_convertLength(length, originalUnit, finalUnit) {
  29769. if (length === null || length === undefined) throw new Error('length is required');
  29770. if (!(length >= 0)) throw new Error('length must be a positive number');
  29771. return rhumb_distance_node_modules_turf_helpers_main_es_radiansToLength(rhumb_distance_node_modules_turf_helpers_main_es_lengthToRadians(length, originalUnit), finalUnit || 'kilometers');
  29772. }
  29773. /**
  29774. * Converts a area to the requested unit.
  29775. * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches
  29776. * @param {number} area to be converted
  29777. * @param {string} [originalUnit='meters'] of the distance
  29778. * @param {string} [finalUnit='kilometers'] returned unit
  29779. * @returns {number} the converted distance
  29780. */
  29781. function rhumb_distance_node_modules_turf_helpers_main_es_convertArea(area, originalUnit, finalUnit) {
  29782. if (area === null || area === undefined) throw new Error('area is required');
  29783. if (!(area >= 0)) throw new Error('area must be a positive number');
  29784. var startFactor = rhumb_distance_node_modules_turf_helpers_main_es_areaFactors[originalUnit || 'meters'];
  29785. if (!startFactor) throw new Error('invalid original units');
  29786. var finalFactor = rhumb_distance_node_modules_turf_helpers_main_es_areaFactors[finalUnit || 'kilometers'];
  29787. if (!finalFactor) throw new Error('invalid final units');
  29788. return area / startFactor * finalFactor;
  29789. }
  29790. /**
  29791. * isNumber
  29792. *
  29793. * @param {*} num Number to validate
  29794. * @returns {boolean} true/false
  29795. * @example
  29796. * turf.isNumber(123)
  29797. * //=true
  29798. * turf.isNumber('foo')
  29799. * //=false
  29800. */
  29801. function rhumb_distance_node_modules_turf_helpers_main_es_isNumber(num) {
  29802. return !isNaN(num) && num !== null && !Array.isArray(num);
  29803. }
  29804. /**
  29805. * isObject
  29806. *
  29807. * @param {*} input variable to validate
  29808. * @returns {boolean} true/false
  29809. * @example
  29810. * turf.isObject({elevation: 10})
  29811. * //=true
  29812. * turf.isObject('foo')
  29813. * //=false
  29814. */
  29815. function rhumb_distance_node_modules_turf_helpers_main_es_isObject(input) {
  29816. return !!input && input.constructor === Object;
  29817. }
  29818. /**
  29819. * Validate BBox
  29820. *
  29821. * @private
  29822. * @param {Array<number>} bbox BBox to validate
  29823. * @returns {void}
  29824. * @throws Error if BBox is not valid
  29825. * @example
  29826. * validateBBox([-180, -40, 110, 50])
  29827. * //=OK
  29828. * validateBBox([-180, -40])
  29829. * //=Error
  29830. * validateBBox('Foo')
  29831. * //=Error
  29832. * validateBBox(5)
  29833. * //=Error
  29834. * validateBBox(null)
  29835. * //=Error
  29836. * validateBBox(undefined)
  29837. * //=Error
  29838. */
  29839. function rhumb_distance_node_modules_turf_helpers_main_es_validateBBox(bbox) {
  29840. if (!bbox) throw new Error('bbox is required');
  29841. if (!Array.isArray(bbox)) throw new Error('bbox must be an Array');
  29842. if (bbox.length !== 4 && bbox.length !== 6) throw new Error('bbox must be an Array of 4 or 6 numbers');
  29843. bbox.forEach(function (num) {
  29844. if (!rhumb_distance_node_modules_turf_helpers_main_es_isNumber(num)) throw new Error('bbox must only contain numbers');
  29845. });
  29846. }
  29847. /**
  29848. * Validate Id
  29849. *
  29850. * @private
  29851. * @param {string|number} id Id to validate
  29852. * @returns {void}
  29853. * @throws Error if Id is not valid
  29854. * @example
  29855. * validateId([-180, -40, 110, 50])
  29856. * //=Error
  29857. * validateId([-180, -40])
  29858. * //=Error
  29859. * validateId('Foo')
  29860. * //=OK
  29861. * validateId(5)
  29862. * //=OK
  29863. * validateId(null)
  29864. * //=Error
  29865. * validateId(undefined)
  29866. * //=Error
  29867. */
  29868. function rhumb_distance_node_modules_turf_helpers_main_es_validateId(id) {
  29869. if (!id) throw new Error('id is required');
  29870. if (['string', 'number'].indexOf(typeof id) === -1) throw new Error('id must be a number or a string');
  29871. } // Deprecated methods
  29872. function rhumb_distance_node_modules_turf_helpers_main_es_radians2degrees() {
  29873. throw new Error('method has been renamed to `radiansToDegrees`');
  29874. }
  29875. function rhumb_distance_node_modules_turf_helpers_main_es_degrees2radians() {
  29876. throw new Error('method has been renamed to `degreesToRadians`');
  29877. }
  29878. function rhumb_distance_node_modules_turf_helpers_main_es_distanceToDegrees() {
  29879. throw new Error('method has been renamed to `lengthToDegrees`');
  29880. }
  29881. function rhumb_distance_node_modules_turf_helpers_main_es_distanceToRadians() {
  29882. throw new Error('method has been renamed to `lengthToRadians`');
  29883. }
  29884. function rhumb_distance_node_modules_turf_helpers_main_es_radiansToDistance() {
  29885. throw new Error('method has been renamed to `radiansToLength`');
  29886. }
  29887. function rhumb_distance_node_modules_turf_helpers_main_es_bearingToAngle() {
  29888. throw new Error('method has been renamed to `bearingToAzimuth`');
  29889. }
  29890. function rhumb_distance_node_modules_turf_helpers_main_es_convertDistance() {
  29891. throw new Error('method has been renamed to `convertLength`');
  29892. }
  29893. // CONCATENATED MODULE: ./node_modules/@turf/rhumb-distance/main.es.js
  29894. // https://en.wikipedia.org/wiki/Rhumb_line
  29895. /**
  29896. * Calculates the distance along a rhumb line between two {@link Point|points} in degrees, radians,
  29897. * miles, or kilometers.
  29898. *
  29899. * @name rhumbDistance
  29900. * @param {Coord} from origin point
  29901. * @param {Coord} to destination point
  29902. * @param {Object} [options] Optional parameters
  29903. * @param {string} [options.units="kilometers"] can be degrees, radians, miles, or kilometers
  29904. * @returns {number} distance between the two points
  29905. * @example
  29906. * var from = turf.point([-75.343, 39.984]);
  29907. * var to = turf.point([-75.534, 39.123]);
  29908. * var options = {units: 'miles'};
  29909. *
  29910. * var distance = turf.rhumbDistance(from, to, options);
  29911. *
  29912. * //addToMap
  29913. * var addToMap = [from, to];
  29914. * from.properties.distance = distance;
  29915. * to.properties.distance = distance;
  29916. */
  29917. function rhumbDistance(from, to, options) {
  29918. // Optional parameters
  29919. options = options || {};
  29920. if (!rhumb_distance_node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  29921. var units = options.units; // validation
  29922. if (!from) throw new Error('from point is required');
  29923. if (!to) throw new Error('to point is required');
  29924. var origin = getCoord(from);
  29925. var destination = getCoord(to); // compensate the crossing of the 180th meridian (https://macwright.org/2016/09/26/the-180th-meridian.html)
  29926. // solution from https://github.com/mapbox/mapbox-gl-js/issues/3250#issuecomment-294887678
  29927. destination[0] += destination[0] - origin[0] > 180 ? -360 : origin[0] - destination[0] > 180 ? 360 : 0;
  29928. var distanceInMeters = calculateRhumbDistance(origin, destination);
  29929. var distance = rhumb_distance_node_modules_turf_helpers_main_es_convertLength(distanceInMeters, 'meters', units);
  29930. return distance;
  29931. }
  29932. /**
  29933. * Returns the distance travelling from ‘this’ point to destination point along a rhumb line.
  29934. * Adapted from Geodesy: https://github.com/chrisveness/geodesy/blob/master/latlon-spherical.js
  29935. *
  29936. * @private
  29937. * @param {Array<number>} origin point.
  29938. * @param {Array<number>} destination point.
  29939. * @param {number} [radius=6371e3] - (Mean) radius of earth (defaults to radius in metres).
  29940. * @returns {number} Distance in km between this point and destination point (same units as radius).
  29941. *
  29942. * @example
  29943. * var p1 = new LatLon(51.127, 1.338);
  29944. * var p2 = new LatLon(50.964, 1.853);
  29945. * var d = p1.distanceTo(p2); // 40.31 km
  29946. */
  29947. function calculateRhumbDistance(origin, destination, radius) {
  29948. // φ => phi
  29949. // λ => lambda
  29950. // ψ => psi
  29951. // Δ => Delta
  29952. // δ => delta
  29953. // θ => theta
  29954. radius = radius === undefined ? rhumb_distance_node_modules_turf_helpers_main_es_earthRadius : Number(radius); // see www.edwilliams.org/avform.htm#Rhumb
  29955. var R = radius;
  29956. var phi1 = origin[1] * Math.PI / 180;
  29957. var phi2 = destination[1] * Math.PI / 180;
  29958. var DeltaPhi = phi2 - phi1;
  29959. var DeltaLambda = Math.abs(destination[0] - origin[0]) * Math.PI / 180; // if dLon over 180° take shorter rhumb line across the anti-meridian:
  29960. if (DeltaLambda > Math.PI) DeltaLambda -= 2 * Math.PI; // on Mercator projection, longitude distances shrink by latitude; q is the 'stretch factor'
  29961. // q becomes ill-conditioned along E-W line (0/0); use empirical tolerance to avoid it
  29962. var DeltaPsi = Math.log(Math.tan(phi2 / 2 + Math.PI / 4) / Math.tan(phi1 / 2 + Math.PI / 4));
  29963. var q = Math.abs(DeltaPsi) > 10e-12 ? DeltaPhi / DeltaPsi : Math.cos(phi1); // distance is pythagoras on 'stretched' Mercator projection
  29964. var delta = Math.sqrt(DeltaPhi * DeltaPhi + q * q * DeltaLambda * DeltaLambda); // angular distance in radians
  29965. var dist = delta * R;
  29966. return dist;
  29967. }
  29968. /* harmony default export */ var rhumb_distance_main_es = (rhumbDistance);
  29969. // CONCATENATED MODULE: ./node_modules/@turf/rhumb-destination/node_modules/@turf/helpers/main.es.js
  29970. /**
  29971. * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.
  29972. */
  29973. var rhumb_destination_node_modules_turf_helpers_main_es_earthRadius = 6371008.8;
  29974. /**
  29975. * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.
  29976. */
  29977. var rhumb_destination_node_modules_turf_helpers_main_es_factors = {
  29978. meters: rhumb_destination_node_modules_turf_helpers_main_es_earthRadius,
  29979. metres: rhumb_destination_node_modules_turf_helpers_main_es_earthRadius,
  29980. millimeters: rhumb_destination_node_modules_turf_helpers_main_es_earthRadius * 1000,
  29981. millimetres: rhumb_destination_node_modules_turf_helpers_main_es_earthRadius * 1000,
  29982. centimeters: rhumb_destination_node_modules_turf_helpers_main_es_earthRadius * 100,
  29983. centimetres: rhumb_destination_node_modules_turf_helpers_main_es_earthRadius * 100,
  29984. kilometers: rhumb_destination_node_modules_turf_helpers_main_es_earthRadius / 1000,
  29985. kilometres: rhumb_destination_node_modules_turf_helpers_main_es_earthRadius / 1000,
  29986. miles: rhumb_destination_node_modules_turf_helpers_main_es_earthRadius / 1609.344,
  29987. nauticalmiles: rhumb_destination_node_modules_turf_helpers_main_es_earthRadius / 1852,
  29988. inches: rhumb_destination_node_modules_turf_helpers_main_es_earthRadius * 39.370,
  29989. yards: rhumb_destination_node_modules_turf_helpers_main_es_earthRadius / 1.0936,
  29990. feet: rhumb_destination_node_modules_turf_helpers_main_es_earthRadius * 3.28084,
  29991. radians: 1,
  29992. degrees: rhumb_destination_node_modules_turf_helpers_main_es_earthRadius / 111325
  29993. };
  29994. /**
  29995. * Units of measurement factors based on 1 meter.
  29996. */
  29997. var rhumb_destination_node_modules_turf_helpers_main_es_unitsFactors = {
  29998. meters: 1,
  29999. metres: 1,
  30000. millimeters: 1000,
  30001. millimetres: 1000,
  30002. centimeters: 100,
  30003. centimetres: 100,
  30004. kilometers: 1 / 1000,
  30005. kilometres: 1 / 1000,
  30006. miles: 1 / 1609.344,
  30007. nauticalmiles: 1 / 1852,
  30008. inches: 39.370,
  30009. yards: 1 / 1.0936,
  30010. feet: 3.28084,
  30011. radians: 1 / rhumb_destination_node_modules_turf_helpers_main_es_earthRadius,
  30012. degrees: 1 / 111325
  30013. };
  30014. /**
  30015. * Area of measurement factors based on 1 square meter.
  30016. */
  30017. var rhumb_destination_node_modules_turf_helpers_main_es_areaFactors = {
  30018. meters: 1,
  30019. metres: 1,
  30020. millimeters: 1000000,
  30021. millimetres: 1000000,
  30022. centimeters: 10000,
  30023. centimetres: 10000,
  30024. kilometers: 0.000001,
  30025. kilometres: 0.000001,
  30026. acres: 0.000247105,
  30027. miles: 3.86e-7,
  30028. yards: 1.195990046,
  30029. feet: 10.763910417,
  30030. inches: 1550.003100006
  30031. };
  30032. /**
  30033. * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.
  30034. *
  30035. * @name feature
  30036. * @param {Geometry} geometry input geometry
  30037. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  30038. * @param {Object} [options={}] Optional Parameters
  30039. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  30040. * @param {string|number} [options.id] Identifier associated with the Feature
  30041. * @returns {Feature} a GeoJSON Feature
  30042. * @example
  30043. * var geometry = {
  30044. * "type": "Point",
  30045. * "coordinates": [110, 50]
  30046. * };
  30047. *
  30048. * var feature = turf.feature(geometry);
  30049. *
  30050. * //=feature
  30051. */
  30052. function rhumb_destination_node_modules_turf_helpers_main_es_feature(geometry, properties, options) {
  30053. // Optional Parameters
  30054. options = options || {};
  30055. if (!rhumb_destination_node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  30056. var bbox = options.bbox;
  30057. var id = options.id; // Validation
  30058. if (geometry === undefined) throw new Error('geometry is required');
  30059. if (properties && properties.constructor !== Object) throw new Error('properties must be an Object');
  30060. if (bbox) rhumb_destination_node_modules_turf_helpers_main_es_validateBBox(bbox);
  30061. if (id) rhumb_destination_node_modules_turf_helpers_main_es_validateId(id); // Main
  30062. var feat = {
  30063. type: 'Feature'
  30064. };
  30065. if (id) feat.id = id;
  30066. if (bbox) feat.bbox = bbox;
  30067. feat.properties = properties || {};
  30068. feat.geometry = geometry;
  30069. return feat;
  30070. }
  30071. /**
  30072. * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.
  30073. * For GeometryCollection type use `helpers.geometryCollection`
  30074. *
  30075. * @name geometry
  30076. * @param {string} type Geometry Type
  30077. * @param {Array<number>} coordinates Coordinates
  30078. * @param {Object} [options={}] Optional Parameters
  30079. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Geometry
  30080. * @returns {Geometry} a GeoJSON Geometry
  30081. * @example
  30082. * var type = 'Point';
  30083. * var coordinates = [110, 50];
  30084. *
  30085. * var geometry = turf.geometry(type, coordinates);
  30086. *
  30087. * //=geometry
  30088. */
  30089. function rhumb_destination_node_modules_turf_helpers_main_es_geometry(type, coordinates, options) {
  30090. // Optional Parameters
  30091. options = options || {};
  30092. if (!rhumb_destination_node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  30093. var bbox = options.bbox; // Validation
  30094. if (!type) throw new Error('type is required');
  30095. if (!coordinates) throw new Error('coordinates is required');
  30096. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  30097. if (bbox) rhumb_destination_node_modules_turf_helpers_main_es_validateBBox(bbox); // Main
  30098. var geom;
  30099. switch (type) {
  30100. case 'Point':
  30101. geom = rhumb_destination_node_modules_turf_helpers_main_es_point(coordinates).geometry;
  30102. break;
  30103. case 'LineString':
  30104. geom = rhumb_destination_node_modules_turf_helpers_main_es_lineString(coordinates).geometry;
  30105. break;
  30106. case 'Polygon':
  30107. geom = rhumb_destination_node_modules_turf_helpers_main_es_polygon(coordinates).geometry;
  30108. break;
  30109. case 'MultiPoint':
  30110. geom = rhumb_destination_node_modules_turf_helpers_main_es_multiPoint(coordinates).geometry;
  30111. break;
  30112. case 'MultiLineString':
  30113. geom = rhumb_destination_node_modules_turf_helpers_main_es_multiLineString(coordinates).geometry;
  30114. break;
  30115. case 'MultiPolygon':
  30116. geom = rhumb_destination_node_modules_turf_helpers_main_es_multiPolygon(coordinates).geometry;
  30117. break;
  30118. default:
  30119. throw new Error(type + ' is invalid');
  30120. }
  30121. if (bbox) geom.bbox = bbox;
  30122. return geom;
  30123. }
  30124. /**
  30125. * Creates a {@link Point} {@link Feature} from a Position.
  30126. *
  30127. * @name point
  30128. * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)
  30129. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  30130. * @param {Object} [options={}] Optional Parameters
  30131. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  30132. * @param {string|number} [options.id] Identifier associated with the Feature
  30133. * @returns {Feature<Point>} a Point feature
  30134. * @example
  30135. * var point = turf.point([-75.343, 39.984]);
  30136. *
  30137. * //=point
  30138. */
  30139. function rhumb_destination_node_modules_turf_helpers_main_es_point(coordinates, properties, options) {
  30140. if (!coordinates) throw new Error('coordinates is required');
  30141. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  30142. if (coordinates.length < 2) throw new Error('coordinates must be at least 2 numbers long');
  30143. if (!rhumb_destination_node_modules_turf_helpers_main_es_isNumber(coordinates[0]) || !rhumb_destination_node_modules_turf_helpers_main_es_isNumber(coordinates[1])) throw new Error('coordinates must contain numbers');
  30144. return rhumb_destination_node_modules_turf_helpers_main_es_feature({
  30145. type: 'Point',
  30146. coordinates: coordinates
  30147. }, properties, options);
  30148. }
  30149. /**
  30150. * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.
  30151. *
  30152. * @name points
  30153. * @param {Array<Array<number>>} coordinates an array of Points
  30154. * @param {Object} [properties={}] Translate these properties to each Feature
  30155. * @param {Object} [options={}] Optional Parameters
  30156. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  30157. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  30158. * @returns {FeatureCollection<Point>} Point Feature
  30159. * @example
  30160. * var points = turf.points([
  30161. * [-75, 39],
  30162. * [-80, 45],
  30163. * [-78, 50]
  30164. * ]);
  30165. *
  30166. * //=points
  30167. */
  30168. function rhumb_destination_node_modules_turf_helpers_main_es_points(coordinates, properties, options) {
  30169. if (!coordinates) throw new Error('coordinates is required');
  30170. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  30171. return rhumb_destination_node_modules_turf_helpers_main_es_featureCollection(coordinates.map(function (coords) {
  30172. return rhumb_destination_node_modules_turf_helpers_main_es_point(coords, properties);
  30173. }), options);
  30174. }
  30175. /**
  30176. * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.
  30177. *
  30178. * @name polygon
  30179. * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings
  30180. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  30181. * @param {Object} [options={}] Optional Parameters
  30182. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  30183. * @param {string|number} [options.id] Identifier associated with the Feature
  30184. * @returns {Feature<Polygon>} Polygon Feature
  30185. * @example
  30186. * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });
  30187. *
  30188. * //=polygon
  30189. */
  30190. function rhumb_destination_node_modules_turf_helpers_main_es_polygon(coordinates, properties, options) {
  30191. if (!coordinates) throw new Error('coordinates is required');
  30192. for (var i = 0; i < coordinates.length; i++) {
  30193. var ring = coordinates[i];
  30194. if (ring.length < 4) {
  30195. throw new Error('Each LinearRing of a Polygon must have 4 or more Positions.');
  30196. }
  30197. for (var j = 0; j < ring[ring.length - 1].length; j++) {
  30198. // Check if first point of Polygon contains two numbers
  30199. if (i === 0 && j === 0 && !rhumb_destination_node_modules_turf_helpers_main_es_isNumber(ring[0][0]) || !rhumb_destination_node_modules_turf_helpers_main_es_isNumber(ring[0][1])) throw new Error('coordinates must contain numbers');
  30200. if (ring[ring.length - 1][j] !== ring[0][j]) {
  30201. throw new Error('First and last Position are not equivalent.');
  30202. }
  30203. }
  30204. }
  30205. return rhumb_destination_node_modules_turf_helpers_main_es_feature({
  30206. type: 'Polygon',
  30207. coordinates: coordinates
  30208. }, properties, options);
  30209. }
  30210. /**
  30211. * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.
  30212. *
  30213. * @name polygons
  30214. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates
  30215. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  30216. * @param {Object} [options={}] Optional Parameters
  30217. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  30218. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  30219. * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection
  30220. * @example
  30221. * var polygons = turf.polygons([
  30222. * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],
  30223. * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],
  30224. * ]);
  30225. *
  30226. * //=polygons
  30227. */
  30228. function rhumb_destination_node_modules_turf_helpers_main_es_polygons(coordinates, properties, options) {
  30229. if (!coordinates) throw new Error('coordinates is required');
  30230. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  30231. return rhumb_destination_node_modules_turf_helpers_main_es_featureCollection(coordinates.map(function (coords) {
  30232. return rhumb_destination_node_modules_turf_helpers_main_es_polygon(coords, properties);
  30233. }), options);
  30234. }
  30235. /**
  30236. * Creates a {@link LineString} {@link Feature} from an Array of Positions.
  30237. *
  30238. * @name lineString
  30239. * @param {Array<Array<number>>} coordinates an array of Positions
  30240. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  30241. * @param {Object} [options={}] Optional Parameters
  30242. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  30243. * @param {string|number} [options.id] Identifier associated with the Feature
  30244. * @returns {Feature<LineString>} LineString Feature
  30245. * @example
  30246. * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});
  30247. * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});
  30248. *
  30249. * //=linestring1
  30250. * //=linestring2
  30251. */
  30252. function rhumb_destination_node_modules_turf_helpers_main_es_lineString(coordinates, properties, options) {
  30253. if (!coordinates) throw new Error('coordinates is required');
  30254. if (coordinates.length < 2) throw new Error('coordinates must be an array of two or more positions'); // Check if first point of LineString contains two numbers
  30255. if (!rhumb_destination_node_modules_turf_helpers_main_es_isNumber(coordinates[0][1]) || !rhumb_destination_node_modules_turf_helpers_main_es_isNumber(coordinates[0][1])) throw new Error('coordinates must contain numbers');
  30256. return rhumb_destination_node_modules_turf_helpers_main_es_feature({
  30257. type: 'LineString',
  30258. coordinates: coordinates
  30259. }, properties, options);
  30260. }
  30261. /**
  30262. * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.
  30263. *
  30264. * @name lineStrings
  30265. * @param {Array<Array<number>>} coordinates an array of LinearRings
  30266. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  30267. * @param {Object} [options={}] Optional Parameters
  30268. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection
  30269. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  30270. * @returns {FeatureCollection<LineString>} LineString FeatureCollection
  30271. * @example
  30272. * var linestrings = turf.lineStrings([
  30273. * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],
  30274. * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]
  30275. * ]);
  30276. *
  30277. * //=linestrings
  30278. */
  30279. function rhumb_destination_node_modules_turf_helpers_main_es_lineStrings(coordinates, properties, options) {
  30280. if (!coordinates) throw new Error('coordinates is required');
  30281. if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');
  30282. return rhumb_destination_node_modules_turf_helpers_main_es_featureCollection(coordinates.map(function (coords) {
  30283. return rhumb_destination_node_modules_turf_helpers_main_es_lineString(coords, properties);
  30284. }), options);
  30285. }
  30286. /**
  30287. * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.
  30288. *
  30289. * @name featureCollection
  30290. * @param {Feature[]} features input features
  30291. * @param {Object} [options={}] Optional Parameters
  30292. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  30293. * @param {string|number} [options.id] Identifier associated with the Feature
  30294. * @returns {FeatureCollection} FeatureCollection of Features
  30295. * @example
  30296. * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});
  30297. * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});
  30298. * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});
  30299. *
  30300. * var collection = turf.featureCollection([
  30301. * locationA,
  30302. * locationB,
  30303. * locationC
  30304. * ]);
  30305. *
  30306. * //=collection
  30307. */
  30308. function rhumb_destination_node_modules_turf_helpers_main_es_featureCollection(features, options) {
  30309. // Optional Parameters
  30310. options = options || {};
  30311. if (!rhumb_destination_node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  30312. var bbox = options.bbox;
  30313. var id = options.id; // Validation
  30314. if (!features) throw new Error('No features passed');
  30315. if (!Array.isArray(features)) throw new Error('features must be an Array');
  30316. if (bbox) rhumb_destination_node_modules_turf_helpers_main_es_validateBBox(bbox);
  30317. if (id) rhumb_destination_node_modules_turf_helpers_main_es_validateId(id); // Main
  30318. var fc = {
  30319. type: 'FeatureCollection'
  30320. };
  30321. if (id) fc.id = id;
  30322. if (bbox) fc.bbox = bbox;
  30323. fc.features = features;
  30324. return fc;
  30325. }
  30326. /**
  30327. * Creates a {@link Feature<MultiLineString>} based on a
  30328. * coordinate array. Properties can be added optionally.
  30329. *
  30330. * @name multiLineString
  30331. * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings
  30332. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  30333. * @param {Object} [options={}] Optional Parameters
  30334. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  30335. * @param {string|number} [options.id] Identifier associated with the Feature
  30336. * @returns {Feature<MultiLineString>} a MultiLineString feature
  30337. * @throws {Error} if no coordinates are passed
  30338. * @example
  30339. * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);
  30340. *
  30341. * //=multiLine
  30342. */
  30343. function rhumb_destination_node_modules_turf_helpers_main_es_multiLineString(coordinates, properties, options) {
  30344. if (!coordinates) throw new Error('coordinates is required');
  30345. return rhumb_destination_node_modules_turf_helpers_main_es_feature({
  30346. type: 'MultiLineString',
  30347. coordinates: coordinates
  30348. }, properties, options);
  30349. }
  30350. /**
  30351. * Creates a {@link Feature<MultiPoint>} based on a
  30352. * coordinate array. Properties can be added optionally.
  30353. *
  30354. * @name multiPoint
  30355. * @param {Array<Array<number>>} coordinates an array of Positions
  30356. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  30357. * @param {Object} [options={}] Optional Parameters
  30358. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  30359. * @param {string|number} [options.id] Identifier associated with the Feature
  30360. * @returns {Feature<MultiPoint>} a MultiPoint feature
  30361. * @throws {Error} if no coordinates are passed
  30362. * @example
  30363. * var multiPt = turf.multiPoint([[0,0],[10,10]]);
  30364. *
  30365. * //=multiPt
  30366. */
  30367. function rhumb_destination_node_modules_turf_helpers_main_es_multiPoint(coordinates, properties, options) {
  30368. if (!coordinates) throw new Error('coordinates is required');
  30369. return rhumb_destination_node_modules_turf_helpers_main_es_feature({
  30370. type: 'MultiPoint',
  30371. coordinates: coordinates
  30372. }, properties, options);
  30373. }
  30374. /**
  30375. * Creates a {@link Feature<MultiPolygon>} based on a
  30376. * coordinate array. Properties can be added optionally.
  30377. *
  30378. * @name multiPolygon
  30379. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons
  30380. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  30381. * @param {Object} [options={}] Optional Parameters
  30382. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  30383. * @param {string|number} [options.id] Identifier associated with the Feature
  30384. * @returns {Feature<MultiPolygon>} a multipolygon feature
  30385. * @throws {Error} if no coordinates are passed
  30386. * @example
  30387. * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);
  30388. *
  30389. * //=multiPoly
  30390. *
  30391. */
  30392. function rhumb_destination_node_modules_turf_helpers_main_es_multiPolygon(coordinates, properties, options) {
  30393. if (!coordinates) throw new Error('coordinates is required');
  30394. return rhumb_destination_node_modules_turf_helpers_main_es_feature({
  30395. type: 'MultiPolygon',
  30396. coordinates: coordinates
  30397. }, properties, options);
  30398. }
  30399. /**
  30400. * Creates a {@link Feature<GeometryCollection>} based on a
  30401. * coordinate array. Properties can be added optionally.
  30402. *
  30403. * @name geometryCollection
  30404. * @param {Array<Geometry>} geometries an array of GeoJSON Geometries
  30405. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  30406. * @param {Object} [options={}] Optional Parameters
  30407. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  30408. * @param {string|number} [options.id] Identifier associated with the Feature
  30409. * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature
  30410. * @example
  30411. * var pt = {
  30412. * "type": "Point",
  30413. * "coordinates": [100, 0]
  30414. * };
  30415. * var line = {
  30416. * "type": "LineString",
  30417. * "coordinates": [ [101, 0], [102, 1] ]
  30418. * };
  30419. * var collection = turf.geometryCollection([pt, line]);
  30420. *
  30421. * //=collection
  30422. */
  30423. function rhumb_destination_node_modules_turf_helpers_main_es_geometryCollection(geometries, properties, options) {
  30424. if (!geometries) throw new Error('geometries is required');
  30425. if (!Array.isArray(geometries)) throw new Error('geometries must be an Array');
  30426. return rhumb_destination_node_modules_turf_helpers_main_es_feature({
  30427. type: 'GeometryCollection',
  30428. geometries: geometries
  30429. }, properties, options);
  30430. }
  30431. /**
  30432. * Round number to precision
  30433. *
  30434. * @param {number} num Number
  30435. * @param {number} [precision=0] Precision
  30436. * @returns {number} rounded number
  30437. * @example
  30438. * turf.round(120.4321)
  30439. * //=120
  30440. *
  30441. * turf.round(120.4321, 2)
  30442. * //=120.43
  30443. */
  30444. function rhumb_destination_node_modules_turf_helpers_main_es_round(num, precision) {
  30445. if (num === undefined || num === null || isNaN(num)) throw new Error('num is required');
  30446. if (precision && !(precision >= 0)) throw new Error('precision must be a positive number');
  30447. var multiplier = Math.pow(10, precision || 0);
  30448. return Math.round(num * multiplier) / multiplier;
  30449. }
  30450. /**
  30451. * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.
  30452. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  30453. *
  30454. * @name radiansToLength
  30455. * @param {number} radians in radians across the sphere
  30456. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  30457. * @returns {number} distance
  30458. */
  30459. function rhumb_destination_node_modules_turf_helpers_main_es_radiansToLength(radians, units) {
  30460. if (radians === undefined || radians === null) throw new Error('radians is required');
  30461. if (units && typeof units !== 'string') throw new Error('units must be a string');
  30462. var factor = rhumb_destination_node_modules_turf_helpers_main_es_factors[units || 'kilometers'];
  30463. if (!factor) throw new Error(units + ' units is invalid');
  30464. return radians * factor;
  30465. }
  30466. /**
  30467. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians
  30468. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  30469. *
  30470. * @name lengthToRadians
  30471. * @param {number} distance in real units
  30472. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  30473. * @returns {number} radians
  30474. */
  30475. function rhumb_destination_node_modules_turf_helpers_main_es_lengthToRadians(distance, units) {
  30476. if (distance === undefined || distance === null) throw new Error('distance is required');
  30477. if (units && typeof units !== 'string') throw new Error('units must be a string');
  30478. var factor = rhumb_destination_node_modules_turf_helpers_main_es_factors[units || 'kilometers'];
  30479. if (!factor) throw new Error(units + ' units is invalid');
  30480. return distance / factor;
  30481. }
  30482. /**
  30483. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees
  30484. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet
  30485. *
  30486. * @name lengthToDegrees
  30487. * @param {number} distance in real units
  30488. * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.
  30489. * @returns {number} degrees
  30490. */
  30491. function rhumb_destination_node_modules_turf_helpers_main_es_lengthToDegrees(distance, units) {
  30492. return rhumb_destination_node_modules_turf_helpers_main_es_radiansToDegrees(rhumb_destination_node_modules_turf_helpers_main_es_lengthToRadians(distance, units));
  30493. }
  30494. /**
  30495. * Converts any bearing angle from the north line direction (positive clockwise)
  30496. * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line
  30497. *
  30498. * @name bearingToAzimuth
  30499. * @param {number} bearing angle, between -180 and +180 degrees
  30500. * @returns {number} angle between 0 and 360 degrees
  30501. */
  30502. function rhumb_destination_node_modules_turf_helpers_main_es_bearingToAzimuth(bearing) {
  30503. if (bearing === null || bearing === undefined) throw new Error('bearing is required');
  30504. var angle = bearing % 360;
  30505. if (angle < 0) angle += 360;
  30506. return angle;
  30507. }
  30508. /**
  30509. * Converts an angle in radians to degrees
  30510. *
  30511. * @name radiansToDegrees
  30512. * @param {number} radians angle in radians
  30513. * @returns {number} degrees between 0 and 360 degrees
  30514. */
  30515. function rhumb_destination_node_modules_turf_helpers_main_es_radiansToDegrees(radians) {
  30516. if (radians === null || radians === undefined) throw new Error('radians is required');
  30517. var degrees = radians % (2 * Math.PI);
  30518. return degrees * 180 / Math.PI;
  30519. }
  30520. /**
  30521. * Converts an angle in degrees to radians
  30522. *
  30523. * @name degreesToRadians
  30524. * @param {number} degrees angle between 0 and 360 degrees
  30525. * @returns {number} angle in radians
  30526. */
  30527. function rhumb_destination_node_modules_turf_helpers_main_es_degreesToRadians(degrees) {
  30528. if (degrees === null || degrees === undefined) throw new Error('degrees is required');
  30529. var radians = degrees % 360;
  30530. return radians * Math.PI / 180;
  30531. }
  30532. /**
  30533. * Converts a length to the requested unit.
  30534. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  30535. *
  30536. * @param {number} length to be converted
  30537. * @param {string} originalUnit of the length
  30538. * @param {string} [finalUnit='kilometers'] returned unit
  30539. * @returns {number} the converted length
  30540. */
  30541. function rhumb_destination_node_modules_turf_helpers_main_es_convertLength(length, originalUnit, finalUnit) {
  30542. if (length === null || length === undefined) throw new Error('length is required');
  30543. if (!(length >= 0)) throw new Error('length must be a positive number');
  30544. return rhumb_destination_node_modules_turf_helpers_main_es_radiansToLength(rhumb_destination_node_modules_turf_helpers_main_es_lengthToRadians(length, originalUnit), finalUnit || 'kilometers');
  30545. }
  30546. /**
  30547. * Converts a area to the requested unit.
  30548. * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches
  30549. * @param {number} area to be converted
  30550. * @param {string} [originalUnit='meters'] of the distance
  30551. * @param {string} [finalUnit='kilometers'] returned unit
  30552. * @returns {number} the converted distance
  30553. */
  30554. function rhumb_destination_node_modules_turf_helpers_main_es_convertArea(area, originalUnit, finalUnit) {
  30555. if (area === null || area === undefined) throw new Error('area is required');
  30556. if (!(area >= 0)) throw new Error('area must be a positive number');
  30557. var startFactor = rhumb_destination_node_modules_turf_helpers_main_es_areaFactors[originalUnit || 'meters'];
  30558. if (!startFactor) throw new Error('invalid original units');
  30559. var finalFactor = rhumb_destination_node_modules_turf_helpers_main_es_areaFactors[finalUnit || 'kilometers'];
  30560. if (!finalFactor) throw new Error('invalid final units');
  30561. return area / startFactor * finalFactor;
  30562. }
  30563. /**
  30564. * isNumber
  30565. *
  30566. * @param {*} num Number to validate
  30567. * @returns {boolean} true/false
  30568. * @example
  30569. * turf.isNumber(123)
  30570. * //=true
  30571. * turf.isNumber('foo')
  30572. * //=false
  30573. */
  30574. function rhumb_destination_node_modules_turf_helpers_main_es_isNumber(num) {
  30575. return !isNaN(num) && num !== null && !Array.isArray(num);
  30576. }
  30577. /**
  30578. * isObject
  30579. *
  30580. * @param {*} input variable to validate
  30581. * @returns {boolean} true/false
  30582. * @example
  30583. * turf.isObject({elevation: 10})
  30584. * //=true
  30585. * turf.isObject('foo')
  30586. * //=false
  30587. */
  30588. function rhumb_destination_node_modules_turf_helpers_main_es_isObject(input) {
  30589. return !!input && input.constructor === Object;
  30590. }
  30591. /**
  30592. * Validate BBox
  30593. *
  30594. * @private
  30595. * @param {Array<number>} bbox BBox to validate
  30596. * @returns {void}
  30597. * @throws Error if BBox is not valid
  30598. * @example
  30599. * validateBBox([-180, -40, 110, 50])
  30600. * //=OK
  30601. * validateBBox([-180, -40])
  30602. * //=Error
  30603. * validateBBox('Foo')
  30604. * //=Error
  30605. * validateBBox(5)
  30606. * //=Error
  30607. * validateBBox(null)
  30608. * //=Error
  30609. * validateBBox(undefined)
  30610. * //=Error
  30611. */
  30612. function rhumb_destination_node_modules_turf_helpers_main_es_validateBBox(bbox) {
  30613. if (!bbox) throw new Error('bbox is required');
  30614. if (!Array.isArray(bbox)) throw new Error('bbox must be an Array');
  30615. if (bbox.length !== 4 && bbox.length !== 6) throw new Error('bbox must be an Array of 4 or 6 numbers');
  30616. bbox.forEach(function (num) {
  30617. if (!rhumb_destination_node_modules_turf_helpers_main_es_isNumber(num)) throw new Error('bbox must only contain numbers');
  30618. });
  30619. }
  30620. /**
  30621. * Validate Id
  30622. *
  30623. * @private
  30624. * @param {string|number} id Id to validate
  30625. * @returns {void}
  30626. * @throws Error if Id is not valid
  30627. * @example
  30628. * validateId([-180, -40, 110, 50])
  30629. * //=Error
  30630. * validateId([-180, -40])
  30631. * //=Error
  30632. * validateId('Foo')
  30633. * //=OK
  30634. * validateId(5)
  30635. * //=OK
  30636. * validateId(null)
  30637. * //=Error
  30638. * validateId(undefined)
  30639. * //=Error
  30640. */
  30641. function rhumb_destination_node_modules_turf_helpers_main_es_validateId(id) {
  30642. if (!id) throw new Error('id is required');
  30643. if (['string', 'number'].indexOf(typeof id) === -1) throw new Error('id must be a number or a string');
  30644. } // Deprecated methods
  30645. function rhumb_destination_node_modules_turf_helpers_main_es_radians2degrees() {
  30646. throw new Error('method has been renamed to `radiansToDegrees`');
  30647. }
  30648. function rhumb_destination_node_modules_turf_helpers_main_es_degrees2radians() {
  30649. throw new Error('method has been renamed to `degreesToRadians`');
  30650. }
  30651. function rhumb_destination_node_modules_turf_helpers_main_es_distanceToDegrees() {
  30652. throw new Error('method has been renamed to `lengthToDegrees`');
  30653. }
  30654. function rhumb_destination_node_modules_turf_helpers_main_es_distanceToRadians() {
  30655. throw new Error('method has been renamed to `lengthToRadians`');
  30656. }
  30657. function rhumb_destination_node_modules_turf_helpers_main_es_radiansToDistance() {
  30658. throw new Error('method has been renamed to `radiansToLength`');
  30659. }
  30660. function rhumb_destination_node_modules_turf_helpers_main_es_bearingToAngle() {
  30661. throw new Error('method has been renamed to `bearingToAzimuth`');
  30662. }
  30663. function rhumb_destination_node_modules_turf_helpers_main_es_convertDistance() {
  30664. throw new Error('method has been renamed to `convertLength`');
  30665. }
  30666. // CONCATENATED MODULE: ./node_modules/@turf/rhumb-destination/main.es.js
  30667. // https://en.wikipedia.org/wiki/Rhumb_line
  30668. /**
  30669. * Returns the destination {@link Point} having travelled the given distance along a Rhumb line from the
  30670. * origin Point with the (varant) given bearing.
  30671. *
  30672. * @name rhumbDestination
  30673. * @param {Coord} origin starting point
  30674. * @param {number} distance distance from the starting point
  30675. * @param {number} bearing varant bearing angle ranging from -180 to 180 degrees from north
  30676. * @param {Object} [options={}] Optional parameters
  30677. * @param {string} [options.units='kilometers'] can be degrees, radians, miles, or kilometers
  30678. * @param {Object} [options.properties={}] translate properties to destination point
  30679. * @returns {Feature<Point>} Destination point.
  30680. * @example
  30681. * var pt = turf.point([-75.343, 39.984], {"marker-color": "F00"});
  30682. * var distance = 50;
  30683. * var bearing = 90;
  30684. * var options = {units: 'miles'};
  30685. *
  30686. * var destination = turf.rhumbDestination(pt, distance, bearing, options);
  30687. *
  30688. * //addToMap
  30689. * var addToMap = [pt, destination]
  30690. * destination.properties['marker-color'] = '#00F';
  30691. */
  30692. function rhumbDestination(origin, distance, bearing, options) {
  30693. // Optional parameters
  30694. options = options || {};
  30695. if (!rhumb_destination_node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  30696. var units = options.units;
  30697. var properties = options.properties; // validation
  30698. if (!origin) throw new Error('origin is required');
  30699. if (distance === undefined || distance === null) throw new Error('distance is required');
  30700. if (bearing === undefined || bearing === null) throw new Error('bearing is required');
  30701. if (!(distance >= 0)) throw new Error('distance must be greater than 0');
  30702. var distanceInMeters = rhumb_destination_node_modules_turf_helpers_main_es_convertLength(distance, units, 'meters');
  30703. var coords = getCoord(origin);
  30704. var destination = calculateRhumbDestination(coords, distanceInMeters, bearing); // compensate the crossing of the 180th meridian (https://macwright.org/2016/09/26/the-180th-meridian.html)
  30705. // solution from https://github.com/mapbox/mapbox-gl-js/issues/3250#issuecomment-294887678
  30706. destination[0] += destination[0] - coords[0] > 180 ? -360 : coords[0] - destination[0] > 180 ? 360 : 0;
  30707. return rhumb_destination_node_modules_turf_helpers_main_es_point(destination, properties);
  30708. }
  30709. /**
  30710. * Returns the destination point having travelled along a rhumb line from origin point the given
  30711. * distance on the given bearing.
  30712. * Adapted from Geodesy: http://www.movable-type.co.uk/scripts/latlong.html#rhumblines
  30713. *
  30714. * @private
  30715. * @param {Array<number>} origin - point
  30716. * @param {number} distance - Distance travelled, in same units as earth radius (default: metres).
  30717. * @param {number} bearing - Bearing in degrees from north.
  30718. * @param {number} [radius=6371e3] - (Mean) radius of earth (defaults to radius in metres).
  30719. * @returns {Array<number>} Destination point.
  30720. */
  30721. function calculateRhumbDestination(origin, distance, bearing, radius) {
  30722. // φ => phi
  30723. // λ => lambda
  30724. // ψ => psi
  30725. // Δ => Delta
  30726. // δ => delta
  30727. // θ => theta
  30728. radius = radius === undefined ? rhumb_destination_node_modules_turf_helpers_main_es_earthRadius : Number(radius);
  30729. var delta = distance / radius; // angular distance in radians
  30730. var lambda1 = origin[0] * Math.PI / 180; // to radians, but without normalize to 𝜋
  30731. var phi1 = rhumb_destination_node_modules_turf_helpers_main_es_degreesToRadians(origin[1]);
  30732. var theta = rhumb_destination_node_modules_turf_helpers_main_es_degreesToRadians(bearing);
  30733. var DeltaPhi = delta * Math.cos(theta);
  30734. var phi2 = phi1 + DeltaPhi; // check for some daft bugger going past the pole, normalise latitude if so
  30735. if (Math.abs(phi2) > Math.PI / 2) phi2 = phi2 > 0 ? Math.PI - phi2 : -Math.PI - phi2;
  30736. var DeltaPsi = Math.log(Math.tan(phi2 / 2 + Math.PI / 4) / Math.tan(phi1 / 2 + Math.PI / 4));
  30737. var q = Math.abs(DeltaPsi) > 10e-12 ? DeltaPhi / DeltaPsi : Math.cos(phi1); // E-W course becomes ill-conditioned with 0/0
  30738. var DeltaLambda = delta * Math.sin(theta) / q;
  30739. var lambda2 = lambda1 + DeltaLambda;
  30740. return [(lambda2 * 180 / Math.PI + 540) % 360 - 180, phi2 * 180 / Math.PI]; // normalise to −180..+180°
  30741. }
  30742. /* harmony default export */ var rhumb_destination_main_es = (rhumbDestination);
  30743. // CONCATENATED MODULE: ./node_modules/@turf/transform-scale/main.es.js
  30744. /**
  30745. * Scale a GeoJSON from a given point by a factor of scaling (ex: factor=2 would make the GeoJSON 200% larger).
  30746. * If a FeatureCollection is provided, the origin point will be calculated based on each individual Feature.
  30747. *
  30748. * @name transformScale
  30749. * @param {GeoJSON} geojson GeoJSON to be scaled
  30750. * @param {number} factor of scaling, positive or negative values greater than 0
  30751. * @param {Object} [options={}] Optional parameters
  30752. * @param {string|Coord} [options.origin='centroid'] Point from which the scaling will occur (string options: sw/se/nw/ne/center/centroid)
  30753. * @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)
  30754. * @returns {GeoJSON} scaled GeoJSON
  30755. * @example
  30756. * var poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);
  30757. * var scaledPoly = turf.transformScale(poly, 3);
  30758. *
  30759. * //addToMap
  30760. * var addToMap = [poly, scaledPoly];
  30761. * scaledPoly.properties = {stroke: '#F00', 'stroke-width': 4};
  30762. */
  30763. function transformScale(geojson, factor, options) {
  30764. // Optional parameters
  30765. options = options || {};
  30766. if (!node_modules_turf_helpers_main_es_isObject(options)) throw new Error('options is invalid');
  30767. var origin = options.origin;
  30768. var mutate = options.mutate; // Input validation
  30769. if (!geojson) throw new Error('geojson required');
  30770. if (typeof factor !== 'number' || factor === 0) throw new Error('invalid factor');
  30771. var originIsPoint = Array.isArray(origin) || typeof origin === 'object'; // Clone geojson to avoid side effects
  30772. if (mutate !== true) geojson = clone_main_es(geojson); // Scale each Feature separately
  30773. if (geojson.type === 'FeatureCollection' && !originIsPoint) {
  30774. _turf_meta_main_es_featureEach(geojson, function (feature, index) {
  30775. geojson.features[index] = scale(feature, factor, origin);
  30776. });
  30777. return geojson;
  30778. } // Scale Feature/Geometry
  30779. return scale(geojson, factor, origin);
  30780. }
  30781. /**
  30782. * Scale Feature/Geometry
  30783. *
  30784. * @private
  30785. * @param {Feature|Geometry} feature GeoJSON Feature/Geometry
  30786. * @param {number} factor of scaling, positive or negative values greater than 0
  30787. * @param {string|Coord} [origin="centroid"] Point from which the scaling will occur (string options: sw/se/nw/ne/center/centroid)
  30788. * @returns {Feature|Geometry} scaled GeoJSON Feature/Geometry
  30789. */
  30790. function scale(feature, factor, origin) {
  30791. // Default params
  30792. var isPoint = getType(feature) === 'Point';
  30793. origin = defineOrigin(feature, origin); // Shortcut no-scaling
  30794. if (factor === 1 || isPoint) return feature; // Scale each coordinate
  30795. _turf_meta_main_es_coordEach(feature, function (coord) {
  30796. var originalDistance = rhumb_distance_main_es(origin, coord);
  30797. var bearing = rhumb_bearing_main_es(origin, coord);
  30798. var newDistance = originalDistance * factor;
  30799. var newCoord = getCoords(rhumb_destination_main_es(origin, newDistance, bearing));
  30800. coord[0] = newCoord[0];
  30801. coord[1] = newCoord[1];
  30802. if (coord.length === 3) coord[2] *= factor;
  30803. });
  30804. return feature;
  30805. }
  30806. /**
  30807. * Define Origin
  30808. *
  30809. * @private
  30810. * @param {GeoJSON} geojson GeoJSON
  30811. * @param {string|Coord} origin sw/se/nw/ne/center/centroid
  30812. * @returns {Feature<Point>} Point origin
  30813. */
  30814. function defineOrigin(geojson, origin) {
  30815. // Default params
  30816. if (origin === undefined || origin === null) origin = 'centroid'; // Input Coord
  30817. if (Array.isArray(origin) || typeof origin === 'object') return getCoord(origin); // Define BBox
  30818. var bbox = geojson.bbox ? geojson.bbox : _turf_bbox_main_es(geojson);
  30819. var west = bbox[0];
  30820. var south = bbox[1];
  30821. var east = bbox[2];
  30822. var north = bbox[3];
  30823. switch (origin) {
  30824. case 'sw':
  30825. case 'southwest':
  30826. case 'westsouth':
  30827. case 'bottomleft':
  30828. return transform_scale_node_modules_turf_helpers_main_es_point([west, south]);
  30829. case 'se':
  30830. case 'southeast':
  30831. case 'eastsouth':
  30832. case 'bottomright':
  30833. return transform_scale_node_modules_turf_helpers_main_es_point([east, south]);
  30834. case 'nw':
  30835. case 'northwest':
  30836. case 'westnorth':
  30837. case 'topleft':
  30838. return transform_scale_node_modules_turf_helpers_main_es_point([west, north]);
  30839. case 'ne':
  30840. case 'northeast':
  30841. case 'eastnorth':
  30842. case 'topright':
  30843. return transform_scale_node_modules_turf_helpers_main_es_point([east, north]);
  30844. case 'center':
  30845. return center_main_es(geojson);
  30846. case undefined:
  30847. case null:
  30848. case 'centroid':
  30849. return centroid_main_es(geojson);
  30850. default:
  30851. throw new Error('invalid origin');
  30852. }
  30853. }
  30854. /* harmony default export */ var transform_scale_main_es = (transformScale);
  30855. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/animate-marker/AnimateMarkerLayerViewModel.ts
  30856. var AnimateMarkerLayerViewModel_AnimateMarkerLayerViewModel=/*#__PURE__*/function(_mapboxgl$Evented){_inherits(AnimateMarkerLayerViewModel,_mapboxgl$Evented);function AnimateMarkerLayerViewModel(map,features,markersElement){var _this;var fitBounds=arguments.length>3&&arguments[3]!==undefined?arguments[3]:true;_classCallCheck(this,AnimateMarkerLayerViewModel);_this=_possibleConstructorReturn(this,_getPrototypeOf(AnimateMarkerLayerViewModel).call(this));_this.map=void 0;_this.features=void 0;_this.markers=void 0;_this.markersElement=void 0;_this.fitBounds=void 0;if(!map){throw new Error('map is requierd');}_this.map=map;_this.features=features;_this.markers=[];_this.markersElement=markersElement;_this.fitBounds=fitBounds;_this.features&&_this._initalizeMarkerLayer();return _this;}_createClass(AnimateMarkerLayerViewModel,[{key:"setType",value:function setType(markersElement){this.markersElement=markersElement;this._initalizeMarkerLayer();}},{key:"setFeatures",value:function setFeatures(features,markersElement){this.markersElement=markersElement;this.features=features;this._initalizeMarkerLayer();}},{key:"_initalizeMarkerLayer",value:function _initalizeMarkerLayer(){if(!this.features||JSON.stringify(this.features)==='{}'){return;}this.clearMarkerLayer();this._createMarker();}},{key:"_createMarker",value:function _createMarker(){var _this2=this;this.features.features.forEach(function(point,index){var marker=new mapbox_gl_enhance_js_default.a.Marker(_this2.markersElement[index]||_this2.markersElement[0])// @ts-ignore
  30857. .setLngLat(point.geometry.coordinates).addTo(_this2.map);_this2.markers.push(marker);},this);if(this.fitBounds){// @ts-ignore
  30858. var bounds=bbox_default()(transform_scale_main_es(envelope_main_es(this.features),1.7));this.fitBounds&&this.map.fitBounds([[bounds[0],bounds[1]],[bounds[2],bounds[3]]],{maxZoom:17});}}},{key:"clearMarkerLayer",value:function clearMarkerLayer(){this.markers.length>0&&this.markers.forEach(function(marker){marker&&marker.remove();});this.markers=[];}}]);return AnimateMarkerLayerViewModel;}(mapbox_gl_enhance_js_default.a.Evented);
  30859. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/animate-marker/marker/Marker.ts
  30860. var Marker_Marker=/*#__PURE__*/function(){function Marker(features){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Marker);this.features=void 0;this.markersElement=[];this.options=void 0;this.features=features;this.options=options;}_createClass(Marker,[{key:"setFeatures",value:function setFeatures(features){this.markersElement=[];this.features=features;this.features&&this._createMarker();}},{key:"getMarkersElement",value:function getMarkersElement(){return this.markersElement;}},{key:"setMarkersTextField",value:function setMarkersTextField(textField){if(!this.features||JSON.stringify(this.features)==='{}'){return;}this.options.textField=textField;var name=document.getElementsByClassName('sm-component-animate-marker__name');for(var i=0;i<name.length;i++){var properties=this.features.features[i]&&this.features.features[i].properties;if(properties&&properties[textField]){name[i].innerHTML=properties[textField];}else{name[i].innerHTML='';}}}},{key:"setMarkersTextFontSize",value:function setMarkersTextFontSize(textFontSize){this.options.textFontSize=textFontSize;var pulse=document.getElementsByClassName('sm-component-animate-marker__name-container');for(var i=0;i<pulse.length;i++){// @ts-ignore
  30861. pulse[i].style.fontSize=textFontSize+'px';}}},{key:"setMarkersTextColor",value:function setMarkersTextColor(textColor){this.options.textColor=textColor;var pulse=document.getElementsByClassName('sm-component-animate-marker__name-container');for(var i=0;i<pulse.length;i++){// @ts-ignore
  30862. pulse[i].style.color=textColor;}}},{key:"_getColorWithOpacity",value:function _getColorWithOpacity(color,opacity){return getColorWithOpacity(color,opacity);}},{key:"_getTextContainer",value:function _getTextContainer(point,className){var name;if(point.properties&&Object.keys(point.properties).length!==0&&this.options.textField){name=point.properties[this.options.textField];}var nameContainer=document.createElement('div');nameContainer.className="sm-component-animate-marker__name-container sm-component-animate-marker__name-container--".concat(className);this.options.textColor&&(nameContainer.style.color=this.options.textColor);this.options.textFontSize&&(nameContainer.style.fontSize=this.options.textFontSize+'px');var nameSpan=document.createElement('span');nameSpan.className="sm-component-animate-marker__".concat(className," sm-component-animate-marker__name");nameSpan.innerHTML=name||'';nameContainer.appendChild(nameSpan);return nameContainer;}}]);return Marker;}();
  30863. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/animate-marker/marker/BreathingApertureMarker.ts
  30864. var BreathingApertureMarker_BreathingApertureMarker=/*#__PURE__*/function(_Marker){_inherits(BreathingApertureMarker,_Marker);function BreathingApertureMarker(features){var _this;var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,BreathingApertureMarker);_this=_possibleConstructorReturn(this,_getPrototypeOf(BreathingApertureMarker).call(this,features,options));_this.features&&_this._createMarker();return _this;}_createClass(BreathingApertureMarker,[{key:"setMarkersWidth",value:function setMarkersWidth(width){this.options.width=width;var pulse=document.getElementsByClassName('sm-component-animate-marker__pulse');for(var i=0;i<pulse.length;i++){// @ts-ignore
  30865. this._setBreathingApertureWidth(pulse[i].style);}}},{key:"setMarkersColors",value:function setMarkersColors(colors){this.options.colors=colors;if(colors&&colors.length&&colors.length>0){var dot=document.getElementsByClassName('sm-component-animate-marker__dot-point');for(var i=0;i<dot.length;i++){// @ts-ignore
  30866. dot[i].style.background=this.options.colors[0];}var pulse=document.getElementsByClassName('sm-component-animate-marker__pulse');for(var _i=0;_i<pulse.length;_i++){// @ts-ignore
  30867. var style=pulse[_i].style;style.borderColor=this.options.colors[0];style.boxShadow="0 0 12px ".concat(this.options.colors[1],", 0 0 20px ").concat(this.options.colors[1]," inset");}}}},{key:"_createMarker",value:function _createMarker(){var _this2=this;this.features.features.forEach(function(point){var markerContainer=document.createElement('div');markerContainer.className='sm-component-animate-marker--breathing-aperture';var dot=document.createElement('span');dot.className='sm-component-animate-marker__dot-point';var colors;if(_this2.options.colors&&_this2.options.colors.length&&_this2.options.colors.length>0){colors=_this2.options.colors;}colors&&(dot.style.background=colors[0]);markerContainer.appendChild(dot);var childElements=_this2._createMakerElement(3,'span',['sm-component-animate-marker__delay','sm-component-animate-marker__pulse']);childElements.forEach(function(element){if(colors){element.style.borderColor=colors[0];element.style.boxShadow="0 0 12px ".concat(colors[1],", 0 0 20px ").concat(colors[1]," inset");}_this2._setBreathingApertureWidth(element.style);markerContainer.appendChild(element);});var nameContainer=_this2._getTextContainer(point,'breathing-aperture-name');markerContainer.appendChild(nameContainer);_this2.markersElement.push(markerContainer);},this);}},{key:"_setBreathingApertureWidth",value:function _setBreathingApertureWidth(style){var width=this.options.width;if(width){style.width=width+'px';style.height=width+'px';style.top=-width/2+'px';style.left=-width/2+'px';style.borderRadius=width/2+'px';}}},{key:"_createMakerElement",value:function _createMakerElement(length,type,classNames){var markerElements=[];for(var i=1;i<length+1;i++){var element=document.createElement(type);element.className="".concat(classNames[0],"-0").concat(i," ").concat(classNames[1]);markerElements.push(element);}return markerElements;}}]);return BreathingApertureMarker;}(Marker_Marker);
  30868. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/animate-marker/marker/DiffusedApertureMarker.ts
  30869. var DiffusedApertureMarker_DiffusedApertureMarker=/*#__PURE__*/function(_Marker){_inherits(DiffusedApertureMarker,_Marker);function DiffusedApertureMarker(features){var _this;var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,DiffusedApertureMarker);_this=_possibleConstructorReturn(this,_getPrototypeOf(DiffusedApertureMarker).call(this,features,options));_this.features&&_this._createMarker();return _this;}_createClass(DiffusedApertureMarker,[{key:"setMarkersWidth",value:function setMarkersWidth(width){this.options.width=width;var markerContainer=document.getElementsByClassName('sm-component-animate-marker--diffused-aperture');for(var i=0;i<markerContainer.length;i++){// @ts-ignore
  30870. var style=markerContainer[i].style;style.setProperty('--container-width',width+'px');}}},{key:"setMarkersColors",value:function setMarkersColors(colors){this.options.colors=colors;if(colors&&colors.length&&colors.length>0){var markerContainer=document.getElementsByClassName('sm-component-animate-marker--diffused-aperture');for(var i=0;i<markerContainer.length;i++){// @ts-ignore
  30871. var style=markerContainer[i].style;style.setProperty('--background-color',this.options.colors[0]);style.setProperty('--box-shadow-color',this.options.colors[1]||this.options.colors[0]);}}}},{key:"_createMarker",value:function _createMarker(){var _this2=this;this.features.features.forEach(function(point){var markerContainer=document.createElement('div');markerContainer.className='sm-component-animate-marker--diffused-aperture';var wrapper=document.createElement('div');wrapper.className='sm-component-animate-marker__diffused-aperture-wrapper';var bg=document.createElement('div');bg.className='sm-component-animate-marker__bg';wrapper.appendChild(bg);var circle=document.createElement('div');circle.className='sm-component-animate-marker__circle';wrapper.appendChild(circle);markerContainer.appendChild(wrapper);var nameContainer=_this2._getTextContainer(point,'diffused-aperture-name');markerContainer.appendChild(nameContainer);_this2.options.width&&markerContainer.style.setProperty('--container-width',_this2.options.width+'px');if(_this2.options.colors&&_this2.options.colors.length&&_this2.options.colors.length>0){markerContainer.style.setProperty('--background-color',_this2.options.colors[0]);markerContainer.style.setProperty('--box-shadow-color',_this2.options.colors[1]||_this2.options.colors[0]);}_this2.markersElement.push(markerContainer);},this);}}]);return DiffusedApertureMarker;}(Marker_Marker);
  30872. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/animate-marker/marker/HaloRingMarker.ts
  30873. var HaloRingMarker_HaloRingMarker=/*#__PURE__*/function(_Marker){_inherits(HaloRingMarker,_Marker);function HaloRingMarker(features){var _this;var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,HaloRingMarker);_this=_possibleConstructorReturn(this,_getPrototypeOf(HaloRingMarker).call(this,features,options));_this.features&&_this._createMarker();return _this;}_createClass(HaloRingMarker,[{key:"setMarkersWidth",value:function setMarkersWidth(width){this.options.width=width;var markerContainer=document.getElementsByClassName('sm-component-animate-marker--halo-ring');for(var i=0;i<markerContainer.length;i++){// @ts-ignore
  30874. var style=markerContainer[i].style;style.setProperty('--halo-width',this.options.width+'px');style.setProperty('--halo-left',-this.options.width/2+'px');style.setProperty('--box-shadow-width-1',this.options.width/10+'px');style.setProperty('--box-shadow-width-2',this.options.width/4+'px');}}},{key:"setMarkersColors",value:function setMarkersColors(colors){this.options.colors=colors;if(colors&&colors.length&&colors.length>0){var markerContainer=document.getElementsByClassName('sm-component-animate-marker--halo-ring');for(var i=0;i<markerContainer.length;i++){// @ts-ignore
  30875. var style=markerContainer[i].style;style.setProperty('--color-1',this._getColorWithOpacity(this.options.colors[0],0.3));style.setProperty('--color-1-transparent',this._getColorWithOpacity(this.options.colors[0],0.1));style.setProperty('--color-2',this._getColorWithOpacity(this.options.colors[1],0.3));style.setProperty('--color-2-transparent',this._getColorWithOpacity(this.options.colors[1],0.1));}}}},{key:"_createMarker",value:function _createMarker(){var _this2=this;this.features.features.forEach(function(point){var markerContainer=document.createElement('div');markerContainer.className='sm-component-animate-marker--halo-ring';var childElements=_this2._createMakerElement(8,'div',['sm-component-animate-marker__ring','sm-component-animate-marker__halo']);childElements.forEach(function(element){markerContainer.appendChild(element);});var nameContainer=_this2._getTextContainer(point,'halo-ring-name');markerContainer.appendChild(nameContainer);if(_this2.options.width){markerContainer.style.setProperty('--halo-width',_this2.options.width+'px');markerContainer.style.setProperty('--halo-left',-_this2.options.width/2+'px');markerContainer.style.setProperty('--box-shadow-width-1',_this2.options.width/10+'px');markerContainer.style.setProperty('--box-shadow-width-2',_this2.options.width/4+'px');}if(_this2.options.colors&&_this2.options.colors.length&&_this2.options.colors.length>0){markerContainer.style.setProperty('--color-1',_this2._getColorWithOpacity(colorcolor_default()(_this2.options.colors[0],'rgba',true),0.3));markerContainer.style.setProperty('--color-1-transparent',_this2._getColorWithOpacity(colorcolor_default()(_this2.options.colors[0],'rgba',true),0.1));markerContainer.style.setProperty('--color-2',_this2._getColorWithOpacity(colorcolor_default()(_this2.options.colors[1],'rgba',true),0.3));markerContainer.style.setProperty('--color-2-transparent',_this2._getColorWithOpacity(colorcolor_default()(_this2.options.colors[1],'rgba',true),0.1));}_this2.markersElement.push(markerContainer);},this);}},{key:"_createMakerElement",value:function _createMakerElement(length,type,classNames){var markerElements=[];for(var i=1;i<length+1;i++){var element=document.createElement(type);element.className="".concat(classNames[0],"-0").concat(i," ").concat(classNames[1]);markerElements.push(element);}return markerElements;}}]);return HaloRingMarker;}(Marker_Marker);
  30876. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/animate-marker/marker/RotatingApertureMarker.ts
  30877. var RotatingApertureMarker_RotatingApertureMarker=/*#__PURE__*/function(_Marker){_inherits(RotatingApertureMarker,_Marker);function RotatingApertureMarker(features){var _this;var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,RotatingApertureMarker);_this=_possibleConstructorReturn(this,_getPrototypeOf(RotatingApertureMarker).call(this,features,options));_this.features&&_this._createMarker();return _this;}_createClass(RotatingApertureMarker,[{key:"setMarkersWidth",value:function setMarkersWidth(width){this.options.width=width;// TODO 待抛出 width 不能小于 40
  30878. if(!this.options.width||this.options.width<40){return;}var dotsMarker=document.getElementsByClassName('sm-component-animate-marker--rotating-aperture');for(var i=0;i<dotsMarker.length;i++){// @ts-ignore
  30879. dotsMarker[i].style.setProperty('--container-width',"".concat(this.options.width,"px"));var dots1=dotsMarker[i].children[0];var dots2=dotsMarker[i].children[1];var dots3=dotsMarker[i].children[2];dots1.setAttribute('style',this._getDotsStyleObj(this.options.width-32));dots2.setAttribute('style',this._getDotsStyleObj(this.options.width-16));dots3.setAttribute('style',this._getDotsStyleObj(this.options.width));}}},{key:"setMarkersColors",value:function setMarkersColors(colors){this.options.colors=colors;if(colors&&colors.length&&colors.length>0){var dotsMarker=document.getElementsByClassName('sm-component-animate-marker--rotating-aperture');for(var i=0;i<dotsMarker.length;i++){// @ts-ignore
  30880. var style=dotsMarker[i].style;style.setProperty('--light-color',this.options.colors[1]);style.setProperty('--color',this.options.colors[0]);style.setProperty('--line-color',this._getColorWithOpacity(this.options.colors[0],0.2));}}}},{key:"_createMarker",value:function _createMarker(){var _this2=this;this.features.features.forEach(function(point){var width=_this2.options.width&&_this2.options.width>=40?_this2.options.width:50;var markerContainer=document.createElement('div');markerContainer.className='sm-component-animate-marker--rotating-aperture';var childElements=_this2._createMakerElement(3,'div',['sm-component-animate-marker__dots','sm-component-animate-marker__dots']);childElements.forEach(function(element,index){var elementWidth;index===0&&(elementWidth=width-32);index===1&&(elementWidth=width-16);index===2&&(elementWidth=width);element.setAttribute('style',_this2._getDotsStyleObj(elementWidth));markerContainer.appendChild(element);});var nameContainer=_this2._getTextContainer(point,'rotating-aperture-name');markerContainer.appendChild(nameContainer);if(_this2.options.colors&&_this2.options.colors.length&&_this2.options.colors.length>0&&_this2.options.colors[0].indexOf('rgb')>-1){markerContainer.style.setProperty('--color',_this2.options.colors[0]);markerContainer.style.setProperty('--line-color',_this2._getColorWithOpacity(_this2.options.colors[0],0.2));markerContainer.style.setProperty('--light-color',_this2.options.colors[1]);}markerContainer.style.setProperty('--container-width',width+'px');_this2.markersElement.push(markerContainer);},this);}},{key:"_createMakerElement",value:function _createMakerElement(length,type,classNames){var markerElements=[];for(var i=1;i<length+1;i++){var element=document.createElement(type);element.className="".concat(classNames[0],"-0").concat(i," ").concat(classNames[1]);markerElements.push(element);}return markerElements;}},{key:"_getDotsStyleObj",value:function _getDotsStyleObj(width){return"--dots-width: ".concat(width,"px;\n --dots-height: ").concat(width,"px;\n --dots-box-shadow-x: ").concat(width/2+6,"px;\n --dots-box-shadow-x-negative: -").concat(width/2+6,"px;\n --dots-box-shadow-radius1: ").concat(width/2-2,"px;\n --dots-box-shadow-radius1-negative: -").concat(width/2-2,"px;\n --dots-box-shadow-radius2: ").concat(width/2-3,"px;\n --dots-box-shadow-radius2-negative: -").concat(width/2-3,"px;");}}]);return RotatingApertureMarker;}(Marker_Marker);
  30881. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/animate-marker/marker/RotatingTextBorderMarker.ts
  30882. var RotatingTextBorderMarker_RotatingTextBorderMarker=/*#__PURE__*/function(_Marker){_inherits(RotatingTextBorderMarker,_Marker);function RotatingTextBorderMarker(features){var _this;var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,RotatingTextBorderMarker);_this=_possibleConstructorReturn(this,_getPrototypeOf(RotatingTextBorderMarker).call(this,features));_this.options=void 0;_this.options=options;_this.features&&_this._createMarker();return _this;}_createClass(RotatingTextBorderMarker,[{key:"setMarkersWidth",value:function setMarkersWidth(width){this.options.width=width;this._setMarkerContainerProperty({'--clip-width-1':width+width/10+'px','--clip-width-2':width+width/10-2+'px','--boder-width':width+'px','--text-left-position':-width/2+'px'});}},{key:"setMarkersHeight",value:function setMarkersHeight(height){this.options.height=height;this._setMarkerContainerProperty({'--clip-height-1':height+height/10+'px','--clip-height-2':height+height/10-2+'px','--boder-height':height+'px'});}},{key:"setMarkersTextField",value:function setMarkersTextField(textField){if(!this.features||JSON.stringify(this.features)==='{}'){return;}this.options.textField=textField;var name=document.getElementsByClassName('sm-component-animate-marker__text');for(var i=0;i<name.length;i++){var properties=this.features.features[i]&&this.features.features[i].properties;if(properties&&properties[textField]){name[i].innerHTML=properties[textField];}else{name[i].innerHTML='';}}}},{key:"setMarkersTextColor",value:function setMarkersTextColor(textColor){this.options.textColor=textColor;this._setMarkerContainerProperty({'--text-color':textColor});}},{key:"setMarkersTextFontSize",value:function setMarkersTextFontSize(textFontSize){this.options.textFontSize=textFontSize;this._setMarkerContainerProperty({'--text-font-size':textFontSize+'px'});}},{key:"setMarkersColors",value:function setMarkersColors(colors){this.options.colors=colors;if(colors&&colors.length&&colors.length>0){this._setMarkerContainerProperty({'--border-color':colors[0],'--box-shadow-color':colors[1]});}}},{key:"_createMarker",value:function _createMarker(){var _this2=this;this.features.features.forEach(function(point){var markerContainer=document.createElement('div');markerContainer.className='sm-component-animate-marker--text-boder';var border=document.createElement('div');border.className='sm-component-animate-marker__boder';var keys=Object.keys(point.properties);var name;if(point.properties||Object.keys(point.properties).length!==0){name=point.properties[_this2.options.textField]||point.properties[keys[0]];}var span=document.createElement('span');span.className='sm-component-animate-marker__text';span.innerHTML=name||'';border.appendChild(span);if(_this2.options.colors&&_this2.options.colors.length&&_this2.options.colors.length>0){markerContainer.style.setProperty('--border-color',_this2.options.colors[0]);markerContainer.style.setProperty('--box-shadow-color',_this2.options.colors[1]);}_this2.options.textColor&&markerContainer.style.setProperty('--text-color',_this2.options.textColor);_this2.options.textFontSize&&markerContainer.style.setProperty('--text-font-size',_this2.options.textFontSize+'px');if(_this2.options.width){markerContainer.style.setProperty('--clip-width-1',_this2.options.width+_this2.options.width/10+'px');markerContainer.style.setProperty('--clip-width-2',_this2.options.width+_this2.options.width/10-2+'px');markerContainer.style.setProperty('--boder-width',_this2.options.width+'px');markerContainer.style.setProperty('--text-left-position',-_this2.options.width/2+'px');}if(_this2.options.height){markerContainer.style.setProperty('--clip-height-1',_this2.options.height+_this2.options.width/10+'px');markerContainer.style.setProperty('--clip-height-2',_this2.options.height+_this2.options.width/10-2+'px');markerContainer.style.setProperty('--boder-height',_this2.options.height+'px');}if((_this2.options.width||100)>(_this2.options.width||200)){markerContainer.style.setProperty('--animation-name','clipMe2');}else{markerContainer.style.setProperty('--animation-name','clipMe1');}markerContainer.appendChild(border);_this2.markersElement.push(markerContainer);},this);}},{key:"_setMarkerContainerProperty",value:function _setMarkerContainerProperty(properties){var _this3=this;var markerContainer=document.getElementsByClassName('sm-component-animate-marker--text-boder');var _loop=function _loop(i){// @ts-ignore
  30883. var style=markerContainer[i].style;Object.keys(properties).forEach(function(key){style.setProperty(key,properties[key]);});if((_this3.options.height||100)>(_this3.options.width||200)){style.setProperty('--animation-name','clipMe2');}else{style.setProperty('--animation-name','clipMe1');}};for(var i=0;i<markerContainer.length;i++){_loop(i);}}}]);return RotatingTextBorderMarker;}(Marker_Marker);
  30884. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/animate-marker/marker/FluorescenceMarker.ts
  30885. var FluorescenceMarker_FluorescenceMarker=/*#__PURE__*/function(_Marker){_inherits(FluorescenceMarker,_Marker);function FluorescenceMarker(features){var _this;var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,FluorescenceMarker);_this=_possibleConstructorReturn(this,_getPrototypeOf(FluorescenceMarker).call(this,features,options));_this.features&&_this._createMarker();return _this;}_createClass(FluorescenceMarker,[{key:"setMarkersWidth",value:function setMarkersWidth(width){this.options.width=width;var markerContainer=document.getElementsByClassName('sm-component-animate-marker--fluorescence');for(var i=0;i<markerContainer.length;i++){// @ts-ignore
  30886. this._setFluorescenceWidth(markerContainer[i].style);}}},{key:"setMarkersColors",value:function setMarkersColors(colors){this.options.colors=colors;if(colors&&colors.length&&colors.length>0){var markerContainer=document.getElementsByClassName('sm-component-animate-marker--fluorescence');for(var i=0;i<markerContainer.length;i++){// @ts-ignore
  30887. this._setFluorescenceColor(markerContainer[i].style);}}}},{key:"_createMarker",value:function _createMarker(){var _this2=this;this.features.features.forEach(function(point){var markerContainer=document.createElement('div');markerContainer.className='sm-component-animate-marker--fluorescence';var marker=document.createElement('div');marker.className='sm-component-animate-marker__fluorescence';markerContainer.appendChild(marker);var nameContainer=_this2._getTextContainer(point,'fluorescence-name');markerContainer.appendChild(nameContainer);_this2._setFluorescenceWidth(markerContainer.style);_this2._setFluorescenceColor(markerContainer.style);_this2.markersElement.push(markerContainer);});}},{key:"_setFluorescenceWidth",value:function _setFluorescenceWidth(style){if(this.options.width){style.setProperty('--container-width',this.options.width/3+'px');style.setProperty('--box-shadow-width',this.options.width+'px');}}},{key:"_setFluorescenceColor",value:function _setFluorescenceColor(style){if(this.options.colors&&this.options.colors.length>0){style.setProperty('--box-shadow-color',this.options.colors[0]);style.setProperty('--light-color',this.options.colors[1]);}}}]);return FluorescenceMarker;}(Marker_Marker);
  30888. // CONCATENATED MODULE: ./src/mapboxgl/web-map/layer/animate-marker/AnimateMarkerLayer.tsx
  30889. var AnimateMarkerLayer_class,AnimateMarkerLayer_class2,AnimateMarkerLayer_temp;var AnimateMarkerLayer_AnimateMarkerLayer=mapGetter(AnimateMarkerLayer_class=(AnimateMarkerLayer_temp=AnimateMarkerLayer_class2=/*#__PURE__*/function(_Component){_inherits(AnimateMarkerLayer,_Component);function AnimateMarkerLayer(){var _getPrototypeOf2;var _this;_classCallCheck(this,AnimateMarkerLayer);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_possibleConstructorReturn(this,(_getPrototypeOf2=_getPrototypeOf(AnimateMarkerLayer)).call.apply(_getPrototypeOf2,[this].concat(args)));_this.viewModel=void 0;_this.map=void 0;_this.marker=void 0;_this._markersElement=void 0;return _this;}_createClass(AnimateMarkerLayer,[{key:"componentDidMount",value:function componentDidMount(){this._markersElement=[];}},{key:"componentDidUpdate",value:function componentDidUpdate(prevProps){if(this.viewModel&&!lodash_isequal_default()(prevProps.features,this.props.features)){this._markersElement=[];this._getMarkerElement();this.props.features&&this.viewModel.setFeatures(this.props.features,this._markersElement);}if(this.viewModel&&!lodash_isequal_default()(prevProps.type,this.props.type)){this._markersElement=[];this._getMarkerElement();this.viewModel.setType(this._markersElement);}if(this.viewModel&&this.props.width&&prevProps.width!==this.props.width){this.marker&&this.marker.setMarkersWidth(this.props.width);}if(this.viewModel&&this.props.height&&prevProps.height!==this.props.height){this.marker&&this.marker.setMarkersHeight&&this.marker.setMarkersHeight(this.props.height);}if(this.viewModel&&this.props.textColor&&prevProps.textColor!==this.props.textColor){this.marker&&this.marker.setMarkersTextColor(this.props.textColor);}if(this.viewModel&&this.props.textFontSize&&prevProps.textFontSize!==this.props.textFontSize){this.marker&&this.marker.setMarkersTextFontSize(this.props.textFontSize);}if(this.viewModel&&this.props.colors&&this.props.colors.length&&this.props.colors.length>0&&!lodash_isequal_default()(prevProps.colors,this.props.colors)){this.marker&&this.marker.setMarkersTextFontSize(this.props.textFontSize);}if(this.viewModel&&this.props.textField&&prevProps.textField!==this.props.textField){this.marker&&this.marker.setMarkersTextField(this.props.textField);}}},{key:"componentWillUnmount",value:function componentWillUnmount(){this.viewModel&&this.viewModel.clearMarkerLayer();}},{key:"loaded",value:function loaded(map){this.props.features&&this._getMarkerElement();this.viewModel=new AnimateMarkerLayerViewModel_AnimateMarkerLayerViewModel(map,this.props.features,this._markersElement,this.props.fitBounds);}},{key:"_getMarkerElement",value:function _getMarkerElement(){this.setState({marker:null});var _this$props=this.props,features=_this$props.features,width=_this$props.width,height=_this$props.height,colors=_this$props.colors,textFontSize=_this$props.textFontSize,textColor=_this$props.textColor,textField=_this$props.textField,type=_this$props.type;if(!features||JSON.stringify(features)==='{}'||!features.features){this.viewModel&&this.viewModel.clearMarkerLayer();return;}switch(type){case'rotatingAperture':this.marker=new RotatingApertureMarker_RotatingApertureMarker(features,{width:width,colors:colors,textField:textField,textColor:textColor,textFontSize:textFontSize});break;case'haloRing':this.marker=new HaloRingMarker_HaloRingMarker(features,{width:width,colors:colors,textField:textField,textColor:textColor,textFontSize:textFontSize});break;case'breathingAperture':this.marker=new BreathingApertureMarker_BreathingApertureMarker(features,{width:width,colors:colors,textField:textField,textColor:textColor,textFontSize:textFontSize});break;case'diffusedAperture':this.marker=new DiffusedApertureMarker_DiffusedApertureMarker(features,{width:width,colors:colors,textField:textField,textColor:textColor,textFontSize:textFontSize});break;case'rotatingTextBorder':this.marker=new RotatingTextBorderMarker_RotatingTextBorderMarker(features,{width:width,height:height,colors:colors,textField:textField,textColor:textColor,textFontSize:textFontSize});break;case'fluorescence':this.marker=new FluorescenceMarker_FluorescenceMarker(features,{width:width,colors:colors,textField:textField,textColor:textColor,textFontSize:textFontSize});break;}this.marker&&(this._markersElement=this.marker.getMarkersElement());}},{key:"render",value:function render(){return null;}}]);return AnimateMarkerLayer;}(external_root_React_commonjs_react_commonjs2_react_amd_react_["Component"]),AnimateMarkerLayer_class2.defaultProps={type:'breathingAperture',textFontSize:14},AnimateMarkerLayer_temp))||AnimateMarkerLayer_class;
  30890. // CONCATENATED MODULE: ./src/mapboxgl/components.tsx
  30891. // source
  30892. // layers
  30893. // CONCATENATED MODULE: ./src/mapboxgl/index.tsx
  30894. /* concated harmony reexport SmWebMap */__webpack_require__.d(__webpack_exports__, "SmWebMap", function() { return web_map_WebMap; });
  30895. /* concated harmony reexport SmMap */__webpack_require__.d(__webpack_exports__, "SmMap", function() { return web_map_Map; });
  30896. /* concated harmony reexport SmSource */__webpack_require__.d(__webpack_exports__, "SmSource", function() { return Source_Source; });
  30897. /* concated harmony reexport SmLayer */__webpack_require__.d(__webpack_exports__, "SmLayer", function() { return Layer_Layer; });
  30898. /* concated harmony reexport SmGeojsonLayer */__webpack_require__.d(__webpack_exports__, "SmGeojsonLayer", function() { return GeojsonLayer_GeojsonLayer; });
  30899. /* concated harmony reexport SmRasterTileLayer */__webpack_require__.d(__webpack_exports__, "SmRasterTileLayer", function() { return RasterTileLayer_RasterTileLayer; });
  30900. /* concated harmony reexport SmVectorTileLayer */__webpack_require__.d(__webpack_exports__, "SmVectorTileLayer", function() { return VectorTileLayer_VectorTileLayer; });
  30901. /* concated harmony reexport SmUniqueThemeLayer */__webpack_require__.d(__webpack_exports__, "SmUniqueThemeLayer", function() { return UniqueThemeLayer_UniqueThemeLayer; });
  30902. /* concated harmony reexport SmRanksymbolThemeLayer */__webpack_require__.d(__webpack_exports__, "SmRanksymbolThemeLayer", function() { return RanksymbolThemeLayer_RanksymbolThemeLayer; });
  30903. /* concated harmony reexport SmRangeThemeLayer */__webpack_require__.d(__webpack_exports__, "SmRangeThemeLayer", function() { return RangeThemeLayer_RangeThemeLayer; });
  30904. /* concated harmony reexport SmGraphThemeLayer */__webpack_require__.d(__webpack_exports__, "SmGraphThemeLayer", function() { return GraphThemeLayer_GraphThemeLayer; });
  30905. /* concated harmony reexport SmClusterLayer */__webpack_require__.d(__webpack_exports__, "SmClusterLayer", function() { return cluster_ClusterLayer; });
  30906. /* concated harmony reexport SmDeckglLayer */__webpack_require__.d(__webpack_exports__, "SmDeckglLayer", function() { return DeckglLayer_DeckglLayer; });
  30907. /* concated harmony reexport SmLabelThemeLayer */__webpack_require__.d(__webpack_exports__, "SmLabelThemeLayer", function() { return LabelThemeLayer_LabelThemeLayer; });
  30908. /* concated harmony reexport SmHeatmapLayer */__webpack_require__.d(__webpack_exports__, "SmHeatmapLayer", function() { return HeatmapLayer_HeatmapLayer; });
  30909. /* concated harmony reexport SmMapvLayer */__webpack_require__.d(__webpack_exports__, "SmMapvLayer", function() { return MapvLayer_MapvLayer; });
  30910. /* concated harmony reexport SmEchartsLayer */__webpack_require__.d(__webpack_exports__, "SmEchartsLayer", function() { return EchartsLayer_EchartsLayer; });
  30911. /* concated harmony reexport SmDataFlowLayer */__webpack_require__.d(__webpack_exports__, "SmDataFlowLayer", function() { return DataFlowLayer_DataFlowLayer; });
  30912. /* concated harmony reexport SmFireLayer */__webpack_require__.d(__webpack_exports__, "SmFireLayer", function() { return FireLayer_FireLayer; });
  30913. /* concated harmony reexport SmAnimateMarkerLayer */__webpack_require__.d(__webpack_exports__, "SmAnimateMarkerLayer", function() { return AnimateMarkerLayer_AnimateMarkerLayer; });
  30914. /* harmony default export */ var mapboxgl = __webpack_exports__["default"] = (_objectSpread2({},components_namespaceObject,{commontypes:_types_namespaceObject}));
  30915. /***/ })
  30916. /******/ ])["default"];
  30917. });