iclient-leaflet-vue.js 1.6 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075350763507735078350793508035081350823508335084350853508635087350883508935090350913509235093350943509535096350973509835099351003510135102351033510435105351063510735108351093511035111351123511335114351153511635117351183511935120351213512235123351243512535126351273512835129351303513135132351333513435135351363513735138351393514035141351423514335144351453514635147351483514935150351513515235153351543515535156351573515835159351603516135162351633516435165351663516735168351693517035171351723517335174351753517635177351783517935180351813518235183351843518535186351873518835189351903519135192351933519435195351963519735198351993520035201352023520335204352053520635207352083520935210352113521235213352143521535216352173521835219352203522135222352233522435225352263522735228352293523035231352323523335234352353523635237352383523935240352413524235243352443524535246352473524835249352503525135252352533525435255352563525735258352593526035261352623526335264352653526635267352683526935270352713527235273352743527535276352773527835279352803528135282352833528435285352863528735288352893529035291352923529335294352953529635297352983529935300353013530235303353043530535306353073530835309353103531135312353133531435315353163531735318353193532035321353223532335324353253532635327353283532935330353313533235333353343533535336353373533835339353403534135342353433534435345353463534735348353493535035351353523535335354353553535635357353583535935360353613536235363353643536535366353673536835369353703537135372353733537435375353763537735378353793538035381353823538335384353853538635387353883538935390353913539235393353943539535396353973539835399354003540135402354033540435405354063540735408354093541035411354123541335414354153541635417354183541935420354213542235423354243542535426354273542835429354303543135432354333543435435354363543735438354393544035441354423544335444354453544635447354483544935450354513545235453354543545535456354573545835459354603546135462354633546435465354663546735468354693547035471354723547335474354753547635477354783547935480354813548235483354843548535486354873548835489354903549135492354933549435495354963549735498354993550035501355023550335504355053550635507355083550935510355113551235513355143551535516355173551835519355203552135522355233552435525355263552735528355293553035531355323553335534355353553635537355383553935540355413554235543355443554535546355473554835549355503555135552355533555435555355563555735558355593556035561355623556335564355653556635567355683556935570355713557235573355743557535576355773557835579355803558135582355833558435585355863558735588355893559035591355923559335594355953559635597355983559935600356013560235603356043560535606356073560835609356103561135612356133561435615356163561735618356193562035621356223562335624356253562635627356283562935630356313563235633356343563535636356373563835639356403564135642356433564435645356463564735648356493565035651356523565335654356553565635657356583565935660356613566235663356643566535666356673566835669356703567135672356733567435675356763567735678356793568035681356823568335684356853568635687356883568935690356913569235693356943569535696356973569835699357003570135702357033570435705357063570735708357093571035711357123571335714357153571635717357183571935720357213572235723357243572535726357273572835729357303573135732357333573435735357363573735738357393574035741357423574335744357453574635747357483574935750357513575235753357543575535756357573575835759357603576135762357633576435765357663576735768357693577035771357723577335774357753577635777357783577935780357813578235783357843578535786357873578835789357903579135792357933579435795357963579735798357993580035801358023580335804358053580635807358083580935810358113581235813358143581535816358173581835819358203582135822358233582435825358263582735828358293583035831358323583335834358353583635837358383583935840358413584235843358443584535846358473584835849358503585135852358533585435855358563585735858358593586035861358623586335864358653586635867358683586935870358713587235873358743587535876358773587835879358803588135882358833588435885358863588735888358893589035891358923589335894358953589635897358983589935900359013590235903359043590535906359073590835909359103591135912359133591435915359163591735918359193592035921359223592335924359253592635927359283592935930359313593235933359343593535936359373593835939359403594135942359433594435945359463594735948359493595035951359523595335954359553595635957359583595935960359613596235963359643596535966359673596835969359703597135972359733597435975359763597735978359793598035981359823598335984359853598635987359883598935990359913599235993359943599535996359973599835999360003600136002360033600436005360063600736008360093601036011360123601336014360153601636017360183601936020360213602236023360243602536026360273602836029360303603136032360333603436035360363603736038360393604036041360423604336044360453604636047360483604936050360513605236053360543605536056360573605836059360603606136062360633606436065360663606736068360693607036071360723607336074360753607636077360783607936080360813608236083360843608536086360873608836089360903609136092360933609436095360963609736098360993610036101361023610336104361053610636107361083610936110361113611236113361143611536116361173611836119361203612136122361233612436125361263612736128361293613036131361323613336134361353613636137361383613936140361413614236143361443614536146361473614836149361503615136152361533615436155361563615736158361593616036161361623616336164361653616636167361683616936170361713617236173361743617536176361773617836179361803618136182361833618436185361863618736188361893619036191361923619336194361953619636197361983619936200362013620236203362043620536206362073620836209362103621136212362133621436215362163621736218362193622036221362223622336224362253622636227362283622936230362313623236233362343623536236362373623836239362403624136242362433624436245362463624736248362493625036251362523625336254362553625636257362583625936260362613626236263362643626536266362673626836269362703627136272362733627436275362763627736278362793628036281362823628336284362853628636287362883628936290362913629236293362943629536296362973629836299363003630136302363033630436305363063630736308363093631036311363123631336314363153631636317363183631936320363213632236323363243632536326363273632836329363303633136332363333633436335363363633736338363393634036341363423634336344363453634636347363483634936350363513635236353363543635536356363573635836359363603636136362363633636436365363663636736368363693637036371363723637336374363753637636377363783637936380363813638236383363843638536386363873638836389363903639136392363933639436395363963639736398363993640036401364023640336404364053640636407364083640936410364113641236413364143641536416364173641836419364203642136422364233642436425364263642736428364293643036431364323643336434364353643636437364383643936440364413644236443364443644536446364473644836449364503645136452364533645436455364563645736458364593646036461364623646336464364653646636467364683646936470364713647236473364743647536476364773647836479364803648136482364833648436485364863648736488364893649036491364923649336494364953649636497364983649936500365013650236503365043650536506365073650836509365103651136512365133651436515365163651736518365193652036521365223652336524365253652636527365283652936530365313653236533365343653536536365373653836539365403654136542365433654436545365463654736548365493655036551365523655336554365553655636557365583655936560365613656236563365643656536566365673656836569365703657136572365733657436575365763657736578365793658036581365823658336584365853658636587365883658936590365913659236593365943659536596365973659836599366003660136602366033660436605366063660736608366093661036611366123661336614366153661636617366183661936620366213662236623366243662536626366273662836629366303663136632366333663436635366363663736638366393664036641366423664336644366453664636647366483664936650366513665236653366543665536656366573665836659366603666136662366633666436665366663666736668366693667036671366723667336674366753667636677366783667936680366813668236683366843668536686366873668836689366903669136692366933669436695366963669736698366993670036701367023670336704367053670636707367083670936710367113671236713367143671536716367173671836719367203672136722367233672436725367263672736728367293673036731367323673336734367353673636737367383673936740367413674236743367443674536746367473674836749367503675136752367533675436755367563675736758367593676036761367623676336764367653676636767367683676936770367713677236773367743677536776367773677836779367803678136782367833678436785367863678736788367893679036791367923679336794367953679636797367983679936800368013680236803368043680536806368073680836809368103681136812368133681436815368163681736818368193682036821368223682336824368253682636827368283682936830368313683236833368343683536836368373683836839368403684136842368433684436845368463684736848368493685036851368523685336854368553685636857368583685936860368613686236863368643686536866368673686836869368703687136872368733687436875368763687736878368793688036881368823688336884368853688636887368883688936890368913689236893368943689536896368973689836899369003690136902369033690436905369063690736908369093691036911369123691336914369153691636917369183691936920369213692236923369243692536926369273692836929369303693136932369333693436935369363693736938369393694036941369423694336944369453694636947369483694936950369513695236953369543695536956369573695836959369603696136962369633696436965369663696736968369693697036971369723697336974369753697636977369783697936980369813698236983369843698536986369873698836989369903699136992369933699436995369963699736998369993700037001370023700337004370053700637007370083700937010370113701237013370143701537016370173701837019370203702137022370233702437025370263702737028370293703037031370323703337034370353703637037370383703937040370413704237043370443704537046370473704837049370503705137052370533705437055370563705737058370593706037061370623706337064370653706637067370683706937070370713707237073370743707537076370773707837079370803708137082370833708437085370863708737088370893709037091370923709337094370953709637097370983709937100371013710237103371043710537106371073710837109371103711137112371133711437115371163711737118371193712037121371223712337124371253712637127371283712937130371313713237133371343713537136371373713837139371403714137142371433714437145371463714737148371493715037151371523715337154371553715637157371583715937160371613716237163371643716537166371673716837169371703717137172371733717437175371763717737178371793718037181371823718337184371853718637187371883718937190371913719237193371943719537196371973719837199372003720137202372033720437205372063720737208372093721037211372123721337214372153721637217372183721937220372213722237223372243722537226372273722837229372303723137232372333723437235372363723737238372393724037241372423724337244372453724637247372483724937250372513725237253372543725537256372573725837259372603726137262372633726437265372663726737268372693727037271372723727337274372753727637277372783727937280372813728237283372843728537286372873728837289372903729137292372933729437295372963729737298372993730037301373023730337304373053730637307373083730937310373113731237313373143731537316373173731837319373203732137322373233732437325373263732737328373293733037331373323733337334373353733637337373383733937340373413734237343373443734537346373473734837349373503735137352373533735437355373563735737358373593736037361373623736337364373653736637367373683736937370373713737237373373743737537376373773737837379373803738137382373833738437385373863738737388373893739037391373923739337394373953739637397373983739937400374013740237403374043740537406374073740837409374103741137412374133741437415374163741737418374193742037421374223742337424374253742637427374283742937430374313743237433374343743537436374373743837439374403744137442374433744437445374463744737448374493745037451374523745337454374553745637457374583745937460374613746237463374643746537466374673746837469374703747137472374733747437475374763747737478374793748037481374823748337484374853748637487374883748937490374913749237493374943749537496374973749837499375003750137502375033750437505375063750737508375093751037511375123751337514375153751637517375183751937520375213752237523375243752537526375273752837529375303753137532375333753437535375363753737538375393754037541375423754337544375453754637547375483754937550375513755237553375543755537556375573755837559375603756137562375633756437565375663756737568375693757037571375723757337574375753757637577375783757937580375813758237583375843758537586375873758837589375903759137592375933759437595375963759737598375993760037601376023760337604376053760637607376083760937610376113761237613376143761537616376173761837619376203762137622376233762437625376263762737628376293763037631376323763337634376353763637637376383763937640376413764237643376443764537646376473764837649376503765137652376533765437655376563765737658376593766037661376623766337664376653766637667376683766937670376713767237673376743767537676376773767837679376803768137682376833768437685376863768737688376893769037691376923769337694376953769637697376983769937700377013770237703377043770537706377073770837709377103771137712377133771437715377163771737718377193772037721377223772337724377253772637727377283772937730377313773237733377343773537736377373773837739377403774137742377433774437745377463774737748377493775037751377523775337754377553775637757377583775937760377613776237763377643776537766377673776837769377703777137772377733777437775377763777737778377793778037781377823778337784377853778637787377883778937790377913779237793377943779537796377973779837799378003780137802378033780437805378063780737808378093781037811378123781337814378153781637817378183781937820378213782237823378243782537826378273782837829378303783137832378333783437835378363783737838378393784037841378423784337844378453784637847378483784937850378513785237853378543785537856378573785837859378603786137862378633786437865378663786737868378693787037871378723787337874378753787637877378783787937880378813788237883378843788537886378873788837889378903789137892378933789437895378963789737898378993790037901379023790337904379053790637907379083790937910379113791237913379143791537916379173791837919379203792137922379233792437925379263792737928379293793037931379323793337934379353793637937379383793937940379413794237943379443794537946379473794837949379503795137952379533795437955379563795737958379593796037961379623796337964379653796637967379683796937970379713797237973379743797537976379773797837979379803798137982379833798437985379863798737988379893799037991379923799337994379953799637997379983799938000380013800238003380043800538006380073800838009380103801138012380133801438015380163801738018380193802038021380223802338024380253802638027380283802938030380313803238033380343803538036380373803838039380403804138042380433804438045380463804738048380493805038051380523805338054380553805638057380583805938060380613806238063380643806538066380673806838069380703807138072380733807438075380763807738078380793808038081380823808338084380853808638087380883808938090380913809238093380943809538096380973809838099381003810138102381033810438105381063810738108381093811038111381123811338114381153811638117381183811938120381213812238123381243812538126381273812838129381303813138132381333813438135381363813738138381393814038141381423814338144381453814638147381483814938150381513815238153381543815538156381573815838159381603816138162381633816438165381663816738168381693817038171381723817338174381753817638177381783817938180381813818238183381843818538186381873818838189381903819138192381933819438195381963819738198381993820038201382023820338204382053820638207382083820938210382113821238213382143821538216382173821838219382203822138222382233822438225382263822738228382293823038231382323823338234382353823638237382383823938240382413824238243382443824538246382473824838249382503825138252382533825438255382563825738258382593826038261382623826338264382653826638267382683826938270382713827238273382743827538276382773827838279382803828138282382833828438285382863828738288382893829038291382923829338294382953829638297382983829938300383013830238303383043830538306383073830838309383103831138312383133831438315383163831738318383193832038321383223832338324383253832638327383283832938330383313833238333383343833538336383373833838339383403834138342383433834438345383463834738348383493835038351383523835338354383553835638357383583835938360383613836238363383643836538366383673836838369383703837138372383733837438375383763837738378383793838038381383823838338384383853838638387383883838938390383913839238393383943839538396383973839838399384003840138402384033840438405384063840738408384093841038411384123841338414384153841638417384183841938420384213842238423384243842538426384273842838429384303843138432384333843438435384363843738438384393844038441384423844338444384453844638447384483844938450384513845238453384543845538456384573845838459384603846138462384633846438465384663846738468384693847038471384723847338474384753847638477384783847938480384813848238483384843848538486384873848838489384903849138492384933849438495384963849738498384993850038501385023850338504385053850638507385083850938510385113851238513385143851538516385173851838519385203852138522385233852438525385263852738528385293853038531385323853338534385353853638537385383853938540385413854238543385443854538546385473854838549385503855138552385533855438555385563855738558385593856038561385623856338564385653856638567385683856938570385713857238573385743857538576385773857838579385803858138582385833858438585385863858738588385893859038591385923859338594385953859638597385983859938600386013860238603386043860538606386073860838609386103861138612386133861438615386163861738618386193862038621386223862338624386253862638627386283862938630386313863238633386343863538636386373863838639386403864138642386433864438645386463864738648386493865038651386523865338654386553865638657386583865938660386613866238663386643866538666386673866838669386703867138672386733867438675386763867738678386793868038681386823868338684386853868638687386883868938690386913869238693386943869538696386973869838699387003870138702387033870438705387063870738708387093871038711387123871338714387153871638717387183871938720387213872238723387243872538726387273872838729387303873138732387333873438735387363873738738387393874038741387423874338744387453874638747387483874938750387513875238753387543875538756387573875838759387603876138762387633876438765387663876738768387693877038771387723877338774387753877638777387783877938780387813878238783387843878538786387873878838789387903879138792387933879438795387963879738798387993880038801388023880338804388053880638807388083880938810388113881238813388143881538816388173881838819388203882138822388233882438825388263882738828388293883038831388323883338834388353883638837388383883938840388413884238843388443884538846388473884838849388503885138852388533885438855388563885738858388593886038861388623886338864388653886638867388683886938870388713887238873388743887538876388773887838879388803888138882388833888438885388863888738888388893889038891388923889338894388953889638897388983889938900389013890238903389043890538906389073890838909389103891138912389133891438915389163891738918389193892038921389223892338924389253892638927389283892938930389313893238933389343893538936389373893838939389403894138942389433894438945389463894738948389493895038951389523895338954389553895638957389583895938960389613896238963389643896538966389673896838969389703897138972389733897438975389763897738978389793898038981389823898338984389853898638987389883898938990389913899238993389943899538996389973899838999390003900139002390033900439005390063900739008390093901039011390123901339014390153901639017390183901939020390213902239023390243902539026390273902839029390303903139032390333903439035390363903739038390393904039041390423904339044390453904639047390483904939050390513905239053390543905539056390573905839059390603906139062390633906439065390663906739068390693907039071390723907339074390753907639077390783907939080390813908239083390843908539086390873908839089390903909139092390933909439095390963909739098390993910039101391023910339104391053910639107391083910939110391113911239113391143911539116391173911839119391203912139122391233912439125391263912739128391293913039131391323913339134391353913639137391383913939140391413914239143391443914539146391473914839149391503915139152391533915439155391563915739158391593916039161391623916339164391653916639167391683916939170391713917239173391743917539176391773917839179391803918139182391833918439185391863918739188391893919039191391923919339194391953919639197391983919939200392013920239203392043920539206392073920839209392103921139212392133921439215392163921739218392193922039221392223922339224392253922639227392283922939230392313923239233392343923539236392373923839239392403924139242392433924439245392463924739248392493925039251392523925339254392553925639257392583925939260392613926239263392643926539266392673926839269392703927139272392733927439275392763927739278392793928039281392823928339284392853928639287392883928939290392913929239293392943929539296392973929839299393003930139302393033930439305393063930739308393093931039311393123931339314393153931639317393183931939320393213932239323393243932539326393273932839329393303933139332393333933439335393363933739338393393934039341393423934339344393453934639347393483934939350393513935239353393543935539356393573935839359393603936139362393633936439365393663936739368393693937039371393723937339374393753937639377393783937939380393813938239383393843938539386393873938839389393903939139392393933939439395393963939739398393993940039401394023940339404394053940639407394083940939410394113941239413394143941539416394173941839419394203942139422394233942439425394263942739428394293943039431394323943339434394353943639437394383943939440394413944239443394443944539446394473944839449394503945139452394533945439455394563945739458394593946039461394623946339464394653946639467394683946939470394713947239473394743947539476394773947839479394803948139482394833948439485394863948739488394893949039491394923949339494394953949639497394983949939500395013950239503395043950539506395073950839509395103951139512395133951439515395163951739518395193952039521395223952339524395253952639527395283952939530395313953239533395343953539536395373953839539395403954139542395433954439545395463954739548395493955039551395523955339554395553955639557395583955939560395613956239563395643956539566395673956839569395703957139572395733957439575395763957739578395793958039581395823958339584395853958639587395883958939590395913959239593395943959539596395973959839599396003960139602396033960439605396063960739608396093961039611396123961339614396153961639617396183961939620396213962239623396243962539626396273962839629396303963139632396333963439635396363963739638396393964039641396423964339644396453964639647396483964939650396513965239653396543965539656396573965839659396603966139662396633966439665396663966739668396693967039671396723967339674396753967639677396783967939680396813968239683396843968539686396873968839689396903969139692396933969439695396963969739698396993970039701397023970339704397053970639707397083970939710397113971239713397143971539716397173971839719397203972139722397233972439725397263972739728397293973039731397323973339734397353973639737397383973939740397413974239743397443974539746397473974839749397503975139752397533975439755397563975739758397593976039761397623976339764397653976639767397683976939770397713977239773397743977539776397773977839779397803978139782397833978439785397863978739788397893979039791397923979339794397953979639797397983979939800398013980239803398043980539806398073980839809398103981139812398133981439815398163981739818398193982039821398223982339824398253982639827398283982939830398313983239833398343983539836398373983839839398403984139842398433984439845398463984739848398493985039851398523985339854398553985639857398583985939860398613986239863398643986539866398673986839869398703987139872398733987439875398763987739878398793988039881398823988339884398853988639887398883988939890398913989239893398943989539896398973989839899399003990139902399033990439905399063990739908399093991039911399123991339914399153991639917399183991939920399213992239923399243992539926399273992839929399303993139932399333993439935399363993739938399393994039941399423994339944399453994639947399483994939950399513995239953399543995539956399573995839959399603996139962399633996439965399663996739968399693997039971399723997339974399753997639977399783997939980399813998239983399843998539986399873998839989399903999139992399933999439995399963999739998399994000040001400024000340004400054000640007400084000940010400114001240013400144001540016400174001840019400204002140022400234002440025400264002740028400294003040031400324003340034400354003640037400384003940040400414004240043400444004540046400474004840049400504005140052400534005440055400564005740058400594006040061400624006340064400654006640067400684006940070400714007240073400744007540076400774007840079400804008140082400834008440085400864008740088400894009040091400924009340094400954009640097400984009940100401014010240103401044010540106401074010840109401104011140112401134011440115401164011740118401194012040121401224012340124401254012640127401284012940130401314013240133401344013540136401374013840139401404014140142401434014440145401464014740148401494015040151401524015340154401554015640157401584015940160401614016240163401644016540166401674016840169401704017140172401734017440175401764017740178401794018040181401824018340184401854018640187401884018940190401914019240193401944019540196401974019840199402004020140202402034020440205402064020740208402094021040211402124021340214402154021640217402184021940220402214022240223402244022540226402274022840229402304023140232402334023440235402364023740238402394024040241402424024340244402454024640247402484024940250402514025240253402544025540256402574025840259402604026140262402634026440265402664026740268402694027040271402724027340274402754027640277402784027940280402814028240283402844028540286402874028840289402904029140292402934029440295402964029740298402994030040301403024030340304403054030640307403084030940310403114031240313403144031540316403174031840319403204032140322403234032440325403264032740328403294033040331403324033340334403354033640337403384033940340403414034240343403444034540346403474034840349403504035140352403534035440355403564035740358403594036040361403624036340364403654036640367403684036940370403714037240373403744037540376403774037840379403804038140382403834038440385403864038740388403894039040391403924039340394403954039640397403984039940400404014040240403404044040540406404074040840409404104041140412404134041440415404164041740418404194042040421404224042340424404254042640427404284042940430404314043240433404344043540436404374043840439404404044140442404434044440445404464044740448404494045040451404524045340454404554045640457404584045940460404614046240463404644046540466404674046840469404704047140472404734047440475404764047740478404794048040481404824048340484404854048640487404884048940490404914049240493404944049540496404974049840499405004050140502405034050440505405064050740508405094051040511405124051340514405154051640517405184051940520405214052240523405244052540526405274052840529405304053140532405334053440535405364053740538405394054040541405424054340544405454054640547405484054940550405514055240553405544055540556405574055840559405604056140562405634056440565405664056740568405694057040571405724057340574405754057640577405784057940580405814058240583405844058540586405874058840589405904059140592405934059440595405964059740598405994060040601406024060340604406054060640607406084060940610406114061240613406144061540616406174061840619406204062140622406234062440625406264062740628406294063040631406324063340634406354063640637406384063940640406414064240643406444064540646406474064840649406504065140652406534065440655406564065740658406594066040661406624066340664406654066640667406684066940670406714067240673406744067540676406774067840679406804068140682406834068440685406864068740688406894069040691406924069340694406954069640697406984069940700407014070240703407044070540706407074070840709407104071140712407134071440715407164071740718407194072040721407224072340724407254072640727407284072940730407314073240733407344073540736407374073840739407404074140742407434074440745407464074740748407494075040751407524075340754407554075640757407584075940760407614076240763407644076540766407674076840769407704077140772407734077440775407764077740778407794078040781407824078340784407854078640787407884078940790407914079240793407944079540796407974079840799408004080140802408034080440805408064080740808408094081040811408124081340814408154081640817408184081940820408214082240823408244082540826408274082840829408304083140832408334083440835408364083740838408394084040841408424084340844408454084640847408484084940850408514085240853408544085540856408574085840859408604086140862408634086440865408664086740868408694087040871408724087340874408754087640877408784087940880408814088240883408844088540886408874088840889408904089140892408934089440895408964089740898408994090040901409024090340904409054090640907409084090940910409114091240913409144091540916409174091840919409204092140922409234092440925409264092740928409294093040931409324093340934409354093640937409384093940940409414094240943409444094540946409474094840949409504095140952409534095440955409564095740958409594096040961409624096340964409654096640967409684096940970409714097240973409744097540976409774097840979409804098140982409834098440985409864098740988409894099040991409924099340994409954099640997409984099941000410014100241003410044100541006410074100841009410104101141012410134101441015410164101741018410194102041021410224102341024410254102641027410284102941030410314103241033410344103541036410374103841039410404104141042410434104441045410464104741048410494105041051410524105341054410554105641057410584105941060410614106241063410644106541066410674106841069410704107141072410734107441075410764107741078410794108041081410824108341084410854108641087410884108941090410914109241093410944109541096410974109841099411004110141102411034110441105411064110741108411094111041111411124111341114411154111641117411184111941120411214112241123411244112541126411274112841129411304113141132411334113441135411364113741138411394114041141411424114341144411454114641147411484114941150411514115241153411544115541156411574115841159411604116141162411634116441165411664116741168411694117041171411724117341174411754117641177411784117941180411814118241183411844118541186411874118841189411904119141192411934119441195411964119741198411994120041201412024120341204412054120641207412084120941210412114121241213412144121541216412174121841219412204122141222412234122441225412264122741228412294123041231412324123341234412354123641237412384123941240412414124241243412444124541246412474124841249412504125141252412534125441255412564125741258412594126041261412624126341264412654126641267412684126941270412714127241273412744127541276412774127841279412804128141282412834128441285412864128741288412894129041291412924129341294412954129641297412984129941300413014130241303413044130541306413074130841309413104131141312413134131441315413164131741318413194132041321413224132341324413254132641327413284132941330413314133241333413344133541336413374133841339413404134141342413434134441345413464134741348413494135041351413524135341354413554135641357413584135941360413614136241363413644136541366413674136841369413704137141372413734137441375413764137741378413794138041381413824138341384413854138641387413884138941390413914139241393413944139541396413974139841399414004140141402414034140441405414064140741408414094141041411414124141341414414154141641417414184141941420414214142241423414244142541426414274142841429414304143141432414334143441435414364143741438414394144041441414424144341444414454144641447414484144941450414514145241453414544145541456414574145841459414604146141462414634146441465414664146741468414694147041471414724147341474414754147641477414784147941480414814148241483414844148541486414874148841489414904149141492414934149441495414964149741498414994150041501415024150341504415054150641507415084150941510415114151241513415144151541516415174151841519415204152141522415234152441525415264152741528415294153041531415324153341534415354153641537415384153941540415414154241543415444154541546415474154841549415504155141552415534155441555415564155741558415594156041561415624156341564415654156641567415684156941570415714157241573415744157541576415774157841579415804158141582415834158441585415864158741588415894159041591415924159341594415954159641597415984159941600416014160241603416044160541606416074160841609416104161141612416134161441615416164161741618416194162041621416224162341624416254162641627416284162941630416314163241633416344163541636416374163841639416404164141642416434164441645416464164741648416494165041651416524165341654416554165641657416584165941660416614166241663416644166541666416674166841669416704167141672416734167441675416764167741678416794168041681416824168341684416854168641687416884168941690416914169241693416944169541696416974169841699417004170141702417034170441705417064170741708417094171041711417124171341714417154171641717417184171941720417214172241723417244172541726417274172841729417304173141732417334173441735417364173741738417394174041741417424174341744417454174641747417484174941750417514175241753417544175541756417574175841759417604176141762417634176441765417664176741768417694177041771417724177341774417754177641777417784177941780417814178241783417844178541786417874178841789417904179141792417934179441795417964179741798417994180041801418024180341804418054180641807418084180941810418114181241813418144181541816418174181841819418204182141822418234182441825418264182741828418294183041831418324183341834418354183641837418384183941840418414184241843418444184541846418474184841849418504185141852418534185441855418564185741858418594186041861418624186341864418654186641867418684186941870418714187241873418744187541876418774187841879418804188141882418834188441885418864188741888418894189041891418924189341894418954189641897418984189941900419014190241903419044190541906419074190841909419104191141912419134191441915419164191741918419194192041921419224192341924419254192641927419284192941930419314193241933419344193541936419374193841939419404194141942419434194441945419464194741948419494195041951419524195341954419554195641957419584195941960419614196241963419644196541966419674196841969419704197141972419734197441975419764197741978419794198041981419824198341984419854198641987419884198941990419914199241993419944199541996419974199841999420004200142002420034200442005420064200742008420094201042011420124201342014420154201642017420184201942020420214202242023420244202542026420274202842029420304203142032420334203442035420364203742038420394204042041420424204342044420454204642047420484204942050420514205242053420544205542056420574205842059420604206142062420634206442065420664206742068420694207042071420724207342074420754207642077420784207942080420814208242083420844208542086420874208842089420904209142092420934209442095420964209742098420994210042101421024210342104421054210642107421084210942110421114211242113421144211542116421174211842119421204212142122421234212442125421264212742128421294213042131421324213342134421354213642137421384213942140421414214242143421444214542146421474214842149421504215142152421534215442155421564215742158421594216042161421624216342164421654216642167421684216942170421714217242173421744217542176421774217842179421804218142182421834218442185421864218742188421894219042191421924219342194421954219642197421984219942200422014220242203422044220542206422074220842209422104221142212422134221442215422164221742218422194222042221422224222342224422254222642227422284222942230422314223242233422344223542236422374223842239422404224142242422434224442245422464224742248422494225042251422524225342254422554225642257422584225942260422614226242263422644226542266422674226842269422704227142272422734227442275422764227742278422794228042281422824228342284422854228642287422884228942290422914229242293422944229542296422974229842299423004230142302423034230442305423064230742308423094231042311423124231342314423154231642317423184231942320423214232242323423244232542326423274232842329423304233142332423334233442335423364233742338423394234042341423424234342344423454234642347423484234942350423514235242353423544235542356423574235842359423604236142362423634236442365423664236742368423694237042371423724237342374423754237642377423784237942380423814238242383423844238542386423874238842389423904239142392423934239442395423964239742398423994240042401424024240342404424054240642407424084240942410424114241242413424144241542416424174241842419424204242142422424234242442425424264242742428424294243042431424324243342434424354243642437424384243942440424414244242443424444244542446424474244842449424504245142452424534245442455424564245742458424594246042461424624246342464424654246642467424684246942470424714247242473424744247542476424774247842479424804248142482424834248442485424864248742488424894249042491424924249342494424954249642497424984249942500425014250242503425044250542506425074250842509425104251142512425134251442515425164251742518425194252042521425224252342524425254252642527425284252942530425314253242533425344253542536425374253842539425404254142542425434254442545425464254742548425494255042551425524255342554425554255642557425584255942560425614256242563425644256542566425674256842569425704257142572425734257442575425764257742578425794258042581425824258342584425854258642587425884258942590425914259242593425944259542596425974259842599426004260142602426034260442605426064260742608426094261042611426124261342614426154261642617426184261942620426214262242623426244262542626426274262842629426304263142632426334263442635426364263742638426394264042641426424264342644426454264642647426484264942650426514265242653426544265542656426574265842659426604266142662426634266442665426664266742668426694267042671426724267342674426754267642677426784267942680426814268242683426844268542686426874268842689426904269142692426934269442695426964269742698426994270042701427024270342704427054270642707427084270942710427114271242713427144271542716427174271842719427204272142722427234272442725427264272742728427294273042731427324273342734427354273642737427384273942740427414274242743427444274542746427474274842749427504275142752427534275442755427564275742758427594276042761427624276342764427654276642767427684276942770427714277242773427744277542776427774277842779427804278142782427834278442785427864278742788427894279042791427924279342794427954279642797427984279942800428014280242803428044280542806428074280842809428104281142812428134281442815428164281742818428194282042821428224282342824428254282642827428284282942830428314283242833428344283542836428374283842839428404284142842428434284442845428464284742848428494285042851428524285342854428554285642857428584285942860428614286242863428644286542866428674286842869428704287142872428734287442875428764287742878428794288042881428824288342884428854288642887428884288942890428914289242893428944289542896428974289842899429004290142902429034290442905429064290742908429094291042911429124291342914429154291642917429184291942920429214292242923429244292542926429274292842929429304293142932429334293442935429364293742938429394294042941429424294342944429454294642947429484294942950429514295242953429544295542956429574295842959429604296142962429634296442965429664296742968429694297042971429724297342974429754297642977429784297942980429814298242983429844298542986429874298842989429904299142992429934299442995429964299742998429994300043001430024300343004430054300643007430084300943010430114301243013430144301543016430174301843019430204302143022430234302443025430264302743028430294303043031430324303343034430354303643037430384303943040430414304243043430444304543046430474304843049430504305143052430534305443055430564305743058430594306043061430624306343064430654306643067430684306943070430714307243073430744307543076430774307843079430804308143082430834308443085430864308743088430894309043091430924309343094430954309643097430984309943100431014310243103431044310543106431074310843109431104311143112431134311443115431164311743118431194312043121431224312343124431254312643127431284312943130431314313243133431344313543136431374313843139431404314143142431434314443145431464314743148431494315043151431524315343154431554315643157431584315943160431614316243163431644316543166431674316843169431704317143172431734317443175431764317743178431794318043181431824318343184431854318643187431884318943190431914319243193431944319543196431974319843199432004320143202432034320443205432064320743208432094321043211432124321343214432154321643217432184321943220432214322243223432244322543226432274322843229432304323143232432334323443235432364323743238432394324043241432424324343244432454324643247432484324943250432514325243253432544325543256432574325843259432604326143262432634326443265432664326743268432694327043271432724327343274432754327643277432784327943280432814328243283432844328543286432874328843289432904329143292432934329443295432964329743298432994330043301433024330343304433054330643307433084330943310433114331243313433144331543316433174331843319433204332143322433234332443325433264332743328433294333043331433324333343334433354333643337433384333943340433414334243343433444334543346433474334843349433504335143352433534335443355433564335743358433594336043361433624336343364433654336643367433684336943370433714337243373433744337543376433774337843379433804338143382433834338443385433864338743388433894339043391433924339343394433954339643397433984339943400434014340243403434044340543406434074340843409434104341143412434134341443415434164341743418434194342043421434224342343424434254342643427434284342943430434314343243433434344343543436434374343843439434404344143442434434344443445434464344743448434494345043451434524345343454434554345643457434584345943460434614346243463434644346543466434674346843469434704347143472434734347443475434764347743478434794348043481434824348343484434854348643487434884348943490434914349243493434944349543496434974349843499435004350143502435034350443505435064350743508435094351043511435124351343514435154351643517435184351943520435214352243523435244352543526435274352843529435304353143532435334353443535435364353743538435394354043541435424354343544435454354643547435484354943550435514355243553435544355543556435574355843559435604356143562435634356443565435664356743568435694357043571435724357343574435754357643577435784357943580435814358243583435844358543586435874358843589435904359143592435934359443595435964359743598435994360043601436024360343604436054360643607436084360943610436114361243613436144361543616436174361843619436204362143622436234362443625436264362743628436294363043631436324363343634436354363643637436384363943640436414364243643436444364543646436474364843649436504365143652436534365443655436564365743658436594366043661436624366343664436654366643667436684366943670436714367243673436744367543676436774367843679436804368143682436834368443685436864368743688436894369043691436924369343694436954369643697436984369943700437014370243703437044370543706437074370843709437104371143712437134371443715437164371743718437194372043721437224372343724437254372643727437284372943730437314373243733437344373543736437374373843739437404374143742437434374443745437464374743748437494375043751437524375343754437554375643757437584375943760437614376243763437644376543766437674376843769437704377143772437734377443775437764377743778437794378043781437824378343784437854378643787437884378943790437914379243793437944379543796437974379843799438004380143802438034380443805438064380743808438094381043811438124381343814438154381643817438184381943820438214382243823438244382543826438274382843829438304383143832438334383443835438364383743838438394384043841438424384343844438454384643847438484384943850438514385243853438544385543856438574385843859438604386143862438634386443865438664386743868438694387043871438724387343874438754387643877438784387943880438814388243883438844388543886438874388843889438904389143892438934389443895438964389743898438994390043901439024390343904439054390643907439084390943910439114391243913439144391543916439174391843919439204392143922439234392443925439264392743928439294393043931439324393343934439354393643937439384393943940439414394243943439444394543946439474394843949439504395143952439534395443955439564395743958439594396043961439624396343964439654396643967439684396943970439714397243973439744397543976439774397843979439804398143982439834398443985439864398743988439894399043991439924399343994439954399643997439984399944000440014400244003440044400544006440074400844009440104401144012440134401444015440164401744018440194402044021440224402344024440254402644027440284402944030440314403244033440344403544036440374403844039440404404144042440434404444045440464404744048440494405044051440524405344054440554405644057440584405944060440614406244063440644406544066440674406844069440704407144072440734407444075440764407744078440794408044081440824408344084440854408644087440884408944090440914409244093440944409544096440974409844099441004410144102441034410444105441064410744108441094411044111441124411344114441154411644117441184411944120441214412244123441244412544126441274412844129441304413144132441334413444135441364413744138441394414044141441424414344144441454414644147441484414944150441514415244153441544415544156441574415844159441604416144162441634416444165441664416744168441694417044171441724417344174441754417644177441784417944180441814418244183441844418544186441874418844189441904419144192441934419444195441964419744198441994420044201442024420344204442054420644207442084420944210442114421244213442144421544216442174421844219442204422144222442234422444225442264422744228442294423044231442324423344234442354423644237442384423944240442414424244243442444424544246442474424844249442504425144252442534425444255442564425744258442594426044261442624426344264442654426644267442684426944270442714427244273442744427544276442774427844279442804428144282442834428444285442864428744288442894429044291442924429344294442954429644297442984429944300443014430244303443044430544306443074430844309443104431144312443134431444315443164431744318443194432044321443224432344324443254432644327443284432944330443314433244333443344433544336443374433844339443404434144342443434434444345443464434744348443494435044351443524435344354443554435644357443584435944360443614436244363443644436544366443674436844369443704437144372443734437444375443764437744378443794438044381443824438344384443854438644387443884438944390443914439244393443944439544396443974439844399444004440144402444034440444405444064440744408444094441044411444124441344414444154441644417444184441944420444214442244423444244442544426444274442844429444304443144432444334443444435444364443744438444394444044441444424444344444444454444644447444484444944450444514445244453444544445544456444574445844459444604446144462444634446444465444664446744468444694447044471444724447344474444754447644477444784447944480444814448244483444844448544486444874448844489444904449144492444934449444495444964449744498444994450044501445024450344504445054450644507445084450944510445114451244513445144451544516445174451844519445204452144522445234452444525445264452744528445294453044531445324453344534445354453644537445384453944540445414454244543445444454544546445474454844549445504455144552445534455444555445564455744558445594456044561445624456344564445654456644567445684456944570445714457244573445744457544576445774457844579445804458144582445834458444585445864458744588445894459044591445924459344594445954459644597445984459944600446014460244603446044460544606446074460844609446104461144612446134461444615446164461744618446194462044621446224462344624446254462644627446284462944630446314463244633446344463544636446374463844639446404464144642446434464444645446464464744648446494465044651446524465344654446554465644657446584465944660446614466244663446644466544666446674466844669446704467144672446734467444675446764467744678446794468044681446824468344684446854468644687446884468944690446914469244693446944469544696446974469844699447004470144702447034470444705447064470744708447094471044711447124471344714447154471644717447184471944720447214472244723447244472544726447274472844729447304473144732447334473444735447364473744738447394474044741447424474344744447454474644747447484474944750447514475244753447544475544756447574475844759447604476144762447634476444765447664476744768447694477044771447724477344774447754477644777447784477944780447814478244783447844478544786447874478844789447904479144792447934479444795447964479744798447994480044801448024480344804448054480644807448084480944810448114481244813448144481544816448174481844819448204482144822448234482444825448264482744828448294483044831448324483344834448354483644837448384483944840448414484244843448444484544846448474484844849448504485144852448534485444855448564485744858448594486044861448624486344864448654486644867448684486944870448714487244873448744487544876448774487844879448804488144882448834488444885448864488744888448894489044891448924489344894448954489644897448984489944900449014490244903449044490544906449074490844909449104491144912449134491444915449164491744918449194492044921449224492344924449254492644927449284492944930449314493244933449344493544936449374493844939449404494144942449434494444945449464494744948449494495044951449524495344954449554495644957449584495944960449614496244963449644496544966449674496844969449704497144972449734497444975449764497744978449794498044981449824498344984449854498644987449884498944990449914499244993449944499544996449974499844999450004500145002450034500445005450064500745008450094501045011450124501345014450154501645017450184501945020450214502245023450244502545026450274502845029450304503145032450334503445035450364503745038450394504045041450424504345044450454504645047450484504945050450514505245053450544505545056450574505845059450604506145062450634506445065450664506745068450694507045071450724507345074450754507645077450784507945080450814508245083450844508545086450874508845089450904509145092450934509445095450964509745098450994510045101451024510345104451054510645107451084510945110451114511245113451144511545116451174511845119451204512145122451234512445125451264512745128451294513045131451324513345134451354513645137451384513945140451414514245143451444514545146451474514845149451504515145152451534515445155451564515745158451594516045161451624516345164451654516645167451684516945170451714517245173451744517545176451774517845179451804518145182451834518445185451864518745188451894519045191451924519345194451954519645197451984519945200452014520245203452044520545206452074520845209452104521145212452134521445215452164521745218452194522045221452224522345224452254522645227452284522945230452314523245233452344523545236452374523845239452404524145242452434524445245452464524745248452494525045251452524525345254452554525645257452584525945260452614526245263452644526545266452674526845269452704527145272452734527445275452764527745278452794528045281452824528345284452854528645287452884528945290452914529245293452944529545296452974529845299453004530145302453034530445305453064530745308453094531045311453124531345314453154531645317453184531945320453214532245323453244532545326453274532845329453304533145332453334533445335453364533745338453394534045341453424534345344453454534645347453484534945350453514535245353453544535545356453574535845359453604536145362453634536445365453664536745368453694537045371453724537345374453754537645377453784537945380453814538245383453844538545386453874538845389453904539145392453934539445395453964539745398453994540045401454024540345404454054540645407454084540945410454114541245413454144541545416454174541845419454204542145422454234542445425454264542745428454294543045431454324543345434454354543645437454384543945440454414544245443454444544545446454474544845449454504545145452454534545445455454564545745458454594546045461454624546345464454654546645467454684546945470454714547245473454744547545476454774547845479454804548145482454834548445485454864548745488454894549045491454924549345494454954549645497454984549945500455014550245503455044550545506455074550845509455104551145512455134551445515455164551745518455194552045521455224552345524455254552645527455284552945530455314553245533455344553545536455374553845539455404554145542455434554445545455464554745548455494555045551455524555345554455554555645557455584555945560455614556245563455644556545566455674556845569455704557145572455734557445575455764557745578455794558045581455824558345584455854558645587455884558945590455914559245593455944559545596455974559845599456004560145602456034560445605456064560745608456094561045611456124561345614456154561645617456184561945620456214562245623456244562545626456274562845629456304563145632456334563445635456364563745638456394564045641456424564345644456454564645647456484564945650456514565245653456544565545656456574565845659456604566145662456634566445665456664566745668456694567045671456724567345674456754567645677456784567945680456814568245683456844568545686456874568845689456904569145692456934569445695456964569745698456994570045701457024570345704457054570645707457084570945710457114571245713457144571545716457174571845719457204572145722457234572445725457264572745728457294573045731457324573345734457354573645737457384573945740457414574245743457444574545746457474574845749457504575145752457534575445755457564575745758457594576045761457624576345764457654576645767457684576945770457714577245773457744577545776457774577845779457804578145782457834578445785457864578745788457894579045791457924579345794457954579645797457984579945800458014580245803458044580545806458074580845809458104581145812458134581445815458164581745818458194582045821458224582345824458254582645827458284582945830458314583245833458344583545836458374583845839458404584145842458434584445845458464584745848458494585045851458524585345854458554585645857458584585945860458614586245863458644586545866458674586845869458704587145872458734587445875458764587745878458794588045881458824588345884458854588645887458884588945890458914589245893458944589545896458974589845899459004590145902459034590445905459064590745908459094591045911459124591345914459154591645917459184591945920459214592245923459244592545926459274592845929459304593145932459334593445935459364593745938459394594045941459424594345944459454594645947459484594945950459514595245953459544595545956459574595845959459604596145962459634596445965459664596745968459694597045971459724597345974459754597645977459784597945980459814598245983459844598545986459874598845989459904599145992459934599445995459964599745998459994600046001460024600346004460054600646007460084600946010460114601246013460144601546016460174601846019460204602146022460234602446025460264602746028460294603046031460324603346034460354603646037460384603946040460414604246043460444604546046460474604846049460504605146052460534605446055460564605746058460594606046061460624606346064460654606646067460684606946070460714607246073460744607546076460774607846079460804608146082460834608446085460864608746088460894609046091460924609346094460954609646097460984609946100461014610246103461044610546106461074610846109461104611146112461134611446115461164611746118461194612046121461224612346124461254612646127461284612946130461314613246133461344613546136461374613846139461404614146142461434614446145461464614746148461494615046151461524615346154461554615646157461584615946160461614616246163461644616546166461674616846169461704617146172461734617446175461764617746178461794618046181461824618346184461854618646187461884618946190461914619246193461944619546196461974619846199462004620146202462034620446205462064620746208462094621046211462124621346214462154621646217462184621946220462214622246223462244622546226462274622846229462304623146232462334623446235462364623746238462394624046241462424624346244462454624646247462484624946250462514625246253462544625546256462574625846259462604626146262462634626446265462664626746268462694627046271462724627346274462754627646277462784627946280462814628246283462844628546286462874628846289462904629146292462934629446295462964629746298462994630046301463024630346304463054630646307463084630946310463114631246313463144631546316463174631846319463204632146322463234632446325463264632746328463294633046331463324633346334463354633646337463384633946340463414634246343463444634546346463474634846349463504635146352463534635446355463564635746358463594636046361463624636346364463654636646367463684636946370463714637246373463744637546376463774637846379463804638146382463834638446385463864638746388463894639046391463924639346394463954639646397463984639946400464014640246403464044640546406464074640846409464104641146412464134641446415464164641746418464194642046421464224642346424464254642646427464284642946430464314643246433464344643546436464374643846439464404644146442464434644446445464464644746448464494645046451464524645346454464554645646457464584645946460464614646246463464644646546466464674646846469464704647146472464734647446475464764647746478464794648046481464824648346484464854648646487464884648946490464914649246493464944649546496464974649846499465004650146502465034650446505465064650746508465094651046511465124651346514465154651646517465184651946520465214652246523465244652546526465274652846529465304653146532465334653446535465364653746538465394654046541465424654346544465454654646547465484654946550465514655246553465544655546556465574655846559465604656146562465634656446565465664656746568465694657046571465724657346574465754657646577465784657946580465814658246583465844658546586465874658846589465904659146592465934659446595465964659746598465994660046601466024660346604466054660646607466084660946610466114661246613466144661546616466174661846619466204662146622466234662446625466264662746628466294663046631466324663346634466354663646637466384663946640466414664246643466444664546646466474664846649466504665146652466534665446655466564665746658466594666046661466624666346664466654666646667466684666946670466714667246673466744667546676466774667846679466804668146682466834668446685466864668746688466894669046691466924669346694466954669646697466984669946700467014670246703467044670546706467074670846709467104671146712467134671446715467164671746718467194672046721467224672346724467254672646727467284672946730467314673246733467344673546736467374673846739467404674146742467434674446745467464674746748467494675046751467524675346754467554675646757467584675946760467614676246763467644676546766467674676846769467704677146772467734677446775467764677746778467794678046781467824678346784467854678646787467884678946790467914679246793467944679546796467974679846799468004680146802468034680446805468064680746808468094681046811468124681346814468154681646817468184681946820468214682246823468244682546826468274682846829468304683146832468334683446835468364683746838468394684046841468424684346844468454684646847468484684946850468514685246853468544685546856468574685846859468604686146862468634686446865468664686746868468694687046871468724687346874468754687646877468784687946880468814688246883468844688546886468874688846889468904689146892468934689446895468964689746898468994690046901469024690346904469054690646907469084690946910469114691246913469144691546916469174691846919469204692146922469234692446925469264692746928469294693046931469324693346934469354693646937469384693946940469414694246943469444694546946469474694846949469504695146952469534695446955469564695746958469594696046961469624696346964469654696646967469684696946970469714697246973469744697546976469774697846979469804698146982469834698446985469864698746988469894699046991469924699346994469954699646997469984699947000470014700247003470044700547006470074700847009470104701147012470134701447015470164701747018470194702047021470224702347024470254702647027470284702947030470314703247033470344703547036470374703847039470404704147042470434704447045470464704747048470494705047051470524705347054470554705647057470584705947060470614706247063470644706547066470674706847069470704707147072470734707447075470764707747078470794708047081470824708347084470854708647087470884708947090470914709247093470944709547096470974709847099471004710147102471034710447105471064710747108471094711047111471124711347114471154711647117471184711947120471214712247123471244712547126471274712847129471304713147132471334713447135471364713747138471394714047141471424714347144471454714647147471484714947150471514715247153471544715547156471574715847159471604716147162471634716447165471664716747168471694717047171471724717347174471754717647177471784717947180471814718247183471844718547186471874718847189471904719147192471934719447195471964719747198471994720047201472024720347204472054720647207472084720947210472114721247213472144721547216472174721847219472204722147222472234722447225472264722747228472294723047231472324723347234472354723647237472384723947240472414724247243472444724547246472474724847249472504725147252472534725447255472564725747258472594726047261472624726347264472654726647267472684726947270472714727247273472744727547276472774727847279472804728147282472834728447285472864728747288472894729047291472924729347294472954729647297472984729947300473014730247303473044730547306473074730847309473104731147312473134731447315473164731747318473194732047321473224732347324473254732647327473284732947330473314733247333473344733547336473374733847339473404734147342473434734447345473464734747348473494735047351473524735347354473554735647357473584735947360473614736247363473644736547366473674736847369473704737147372473734737447375473764737747378473794738047381473824738347384473854738647387473884738947390473914739247393473944739547396473974739847399474004740147402474034740447405474064740747408474094741047411474124741347414474154741647417474184741947420474214742247423474244742547426474274742847429474304743147432474334743447435474364743747438474394744047441474424744347444474454744647447474484744947450474514745247453474544745547456474574745847459474604746147462474634746447465474664746747468474694747047471474724747347474474754747647477474784747947480474814748247483474844748547486474874748847489474904749147492474934749447495474964749747498474994750047501475024750347504475054750647507475084750947510475114751247513475144751547516475174751847519475204752147522475234752447525475264752747528475294753047531475324753347534475354753647537475384753947540475414754247543475444754547546475474754847549475504755147552475534755447555475564755747558475594756047561475624756347564475654756647567475684756947570475714757247573475744757547576475774757847579475804758147582475834758447585475864758747588475894759047591475924759347594475954759647597475984759947600476014760247603476044760547606476074760847609476104761147612476134761447615476164761747618476194762047621476224762347624476254762647627476284762947630476314763247633476344763547636476374763847639476404764147642476434764447645476464764747648476494765047651476524765347654476554765647657476584765947660476614766247663476644766547666476674766847669476704767147672476734767447675476764767747678476794768047681476824768347684476854768647687476884768947690476914769247693476944769547696476974769847699477004770147702477034770447705477064770747708477094771047711477124771347714477154771647717477184771947720477214772247723477244772547726477274772847729477304773147732477334773447735477364773747738477394774047741477424774347744477454774647747477484774947750477514775247753477544775547756477574775847759477604776147762477634776447765477664776747768477694777047771477724777347774477754777647777477784777947780477814778247783477844778547786477874778847789477904779147792477934779447795477964779747798477994780047801478024780347804478054780647807478084780947810478114781247813478144781547816478174781847819478204782147822478234782447825478264782747828478294783047831478324783347834478354783647837478384783947840478414784247843478444784547846478474784847849478504785147852478534785447855478564785747858478594786047861478624786347864478654786647867478684786947870478714787247873478744787547876478774787847879478804788147882478834788447885478864788747888478894789047891478924789347894478954789647897478984789947900479014790247903479044790547906479074790847909479104791147912479134791447915479164791747918479194792047921479224792347924479254792647927479284792947930479314793247933479344793547936479374793847939479404794147942479434794447945479464794747948479494795047951479524795347954479554795647957479584795947960479614796247963479644796547966479674796847969479704797147972479734797447975479764797747978479794798047981479824798347984479854798647987479884798947990479914799247993479944799547996479974799847999480004800148002480034800448005480064800748008480094801048011480124801348014480154801648017480184801948020480214802248023480244802548026480274802848029480304803148032480334803448035480364803748038480394804048041480424804348044480454804648047480484804948050480514805248053480544805548056480574805848059480604806148062480634806448065480664806748068480694807048071480724807348074480754807648077480784807948080480814808248083480844808548086480874808848089480904809148092480934809448095480964809748098480994810048101481024810348104481054810648107481084810948110481114811248113481144811548116481174811848119481204812148122481234812448125481264812748128481294813048131481324813348134481354813648137481384813948140481414814248143481444814548146481474814848149481504815148152481534815448155481564815748158481594816048161481624816348164481654816648167481684816948170481714817248173481744817548176481774817848179481804818148182481834818448185481864818748188481894819048191481924819348194481954819648197481984819948200482014820248203482044820548206482074820848209482104821148212482134821448215482164821748218482194822048221482224822348224482254822648227482284822948230482314823248233482344823548236482374823848239482404824148242482434824448245482464824748248482494825048251482524825348254482554825648257482584825948260482614826248263482644826548266482674826848269482704827148272482734827448275482764827748278482794828048281482824828348284482854828648287482884828948290482914829248293482944829548296482974829848299483004830148302483034830448305483064830748308483094831048311483124831348314483154831648317483184831948320483214832248323483244832548326483274832848329483304833148332483334833448335483364833748338483394834048341483424834348344483454834648347483484834948350483514835248353483544835548356483574835848359483604836148362483634836448365483664836748368483694837048371483724837348374483754837648377483784837948380483814838248383483844838548386483874838848389483904839148392483934839448395483964839748398483994840048401484024840348404484054840648407484084840948410484114841248413484144841548416484174841848419484204842148422484234842448425484264842748428484294843048431484324843348434484354843648437484384843948440484414844248443484444844548446484474844848449484504845148452484534845448455484564845748458484594846048461484624846348464484654846648467484684846948470484714847248473484744847548476484774847848479484804848148482484834848448485484864848748488484894849048491484924849348494484954849648497484984849948500485014850248503485044850548506485074850848509485104851148512485134851448515485164851748518485194852048521485224852348524485254852648527485284852948530485314853248533485344853548536485374853848539485404854148542485434854448545485464854748548485494855048551485524855348554485554855648557485584855948560485614856248563485644856548566485674856848569485704857148572485734857448575485764857748578485794858048581485824858348584485854858648587485884858948590485914859248593485944859548596485974859848599486004860148602486034860448605486064860748608486094861048611486124861348614486154861648617486184861948620486214862248623486244862548626486274862848629486304863148632486334863448635486364863748638486394864048641486424864348644486454864648647486484864948650486514865248653486544865548656486574865848659486604866148662486634866448665486664866748668486694867048671486724867348674486754867648677486784867948680486814868248683486844868548686486874868848689486904869148692486934869448695486964869748698486994870048701487024870348704487054870648707487084870948710487114871248713487144871548716487174871848719487204872148722487234872448725487264872748728487294873048731487324873348734487354873648737487384873948740487414874248743487444874548746487474874848749487504875148752487534875448755487564875748758487594876048761487624876348764487654876648767487684876948770487714877248773487744877548776487774877848779487804878148782487834878448785487864878748788487894879048791487924879348794487954879648797487984879948800488014880248803488044880548806488074880848809488104881148812488134881448815488164881748818488194882048821488224882348824488254882648827488284882948830488314883248833488344883548836488374883848839488404884148842488434884448845488464884748848488494885048851488524885348854488554885648857488584885948860488614886248863488644886548866488674886848869488704887148872488734887448875488764887748878488794888048881488824888348884488854888648887488884888948890488914889248893488944889548896488974889848899489004890148902489034890448905489064890748908489094891048911489124891348914489154891648917489184891948920489214892248923489244892548926489274892848929489304893148932489334893448935489364893748938489394894048941489424894348944489454894648947489484894948950489514895248953489544895548956489574895848959489604896148962489634896448965489664896748968489694897048971489724897348974489754897648977489784897948980489814898248983489844898548986489874898848989489904899148992489934899448995489964899748998489994900049001490024900349004490054900649007490084900949010490114901249013490144901549016490174901849019490204902149022490234902449025490264902749028490294903049031490324903349034490354903649037490384903949040490414904249043490444904549046490474904849049490504905149052490534905449055490564905749058490594906049061490624906349064490654906649067490684906949070490714907249073490744907549076490774907849079490804908149082490834908449085490864908749088490894909049091490924909349094490954909649097490984909949100491014910249103491044910549106491074910849109491104911149112491134911449115491164911749118491194912049121491224912349124491254912649127491284912949130491314913249133491344913549136491374913849139491404914149142491434914449145491464914749148491494915049151491524915349154491554915649157491584915949160491614916249163491644916549166491674916849169491704917149172491734917449175491764917749178491794918049181491824918349184491854918649187491884918949190491914919249193491944919549196491974919849199492004920149202492034920449205492064920749208492094921049211492124921349214492154921649217492184921949220492214922249223492244922549226492274922849229492304923149232492334923449235492364923749238492394924049241492424924349244492454924649247492484924949250492514925249253492544925549256492574925849259492604926149262492634926449265492664926749268492694927049271492724927349274492754927649277492784927949280492814928249283492844928549286492874928849289492904929149292492934929449295492964929749298492994930049301493024930349304493054930649307493084930949310493114931249313493144931549316493174931849319493204932149322493234932449325493264932749328493294933049331493324933349334493354933649337493384933949340493414934249343493444934549346493474934849349493504935149352493534935449355493564935749358493594936049361493624936349364493654936649367493684936949370493714937249373493744937549376493774937849379493804938149382493834938449385493864938749388493894939049391493924939349394493954939649397493984939949400494014940249403494044940549406494074940849409494104941149412494134941449415494164941749418494194942049421494224942349424494254942649427494284942949430494314943249433494344943549436494374943849439494404944149442494434944449445494464944749448494494945049451494524945349454494554945649457494584945949460494614946249463494644946549466494674946849469494704947149472494734947449475494764947749478494794948049481494824948349484494854948649487494884948949490494914949249493494944949549496494974949849499495004950149502495034950449505495064950749508495094951049511495124951349514495154951649517495184951949520495214952249523495244952549526495274952849529495304953149532495334953449535495364953749538495394954049541495424954349544495454954649547495484954949550495514955249553495544955549556495574955849559495604956149562495634956449565495664956749568495694957049571495724957349574495754957649577495784957949580495814958249583495844958549586495874958849589495904959149592495934959449595495964959749598495994960049601496024960349604496054960649607496084960949610496114961249613496144961549616496174961849619496204962149622496234962449625496264962749628496294963049631496324963349634496354963649637496384963949640496414964249643496444964549646496474964849649496504965149652496534965449655496564965749658496594966049661496624966349664496654966649667496684966949670496714967249673496744967549676496774967849679496804968149682496834968449685496864968749688496894969049691496924969349694496954969649697496984969949700497014970249703497044970549706497074970849709497104971149712497134971449715497164971749718497194972049721497224972349724497254972649727497284972949730497314973249733497344973549736497374973849739497404974149742497434974449745497464974749748497494975049751497524975349754497554975649757497584975949760497614976249763497644976549766497674976849769497704977149772497734977449775497764977749778497794978049781497824978349784497854978649787497884978949790497914979249793497944979549796497974979849799498004980149802498034980449805498064980749808498094981049811498124981349814498154981649817498184981949820498214982249823498244982549826498274982849829498304983149832498334983449835498364983749838498394984049841498424984349844498454984649847498484984949850498514985249853498544985549856498574985849859498604986149862498634986449865498664986749868498694987049871498724987349874498754987649877498784987949880498814988249883498844988549886498874988849889498904989149892498934989449895498964989749898498994990049901499024990349904499054990649907499084990949910499114991249913499144991549916499174991849919499204992149922499234992449925499264992749928499294993049931499324993349934499354993649937499384993949940499414994249943499444994549946499474994849949499504995149952499534995449955499564995749958499594996049961499624996349964499654996649967499684996949970499714997249973499744997549976499774997849979499804998149982499834998449985499864998749988499894999049991499924999349994499954999649997499984999950000500015000250003500045000550006500075000850009500105001150012500135001450015500165001750018500195002050021500225002350024500255002650027500285002950030500315003250033500345003550036500375003850039500405004150042500435004450045500465004750048500495005050051500525005350054500555005650057500585005950060500615006250063500645006550066500675006850069500705007150072500735007450075500765007750078500795008050081500825008350084500855008650087500885008950090500915009250093500945009550096500975009850099501005010150102501035010450105501065010750108501095011050111501125011350114501155011650117501185011950120501215012250123501245012550126501275012850129501305013150132501335013450135501365013750138501395014050141501425014350144501455014650147501485014950150501515015250153501545015550156501575015850159501605016150162501635016450165501665016750168501695017050171501725017350174501755017650177501785017950180501815018250183501845018550186501875018850189501905019150192501935019450195501965019750198501995020050201502025020350204502055020650207502085020950210502115021250213502145021550216502175021850219502205022150222502235022450225502265022750228502295023050231502325023350234502355023650237502385023950240502415024250243502445024550246502475024850249502505025150252502535025450255502565025750258502595026050261502625026350264502655026650267502685026950270502715027250273502745027550276502775027850279502805028150282502835028450285502865028750288502895029050291502925029350294502955029650297502985029950300503015030250303503045030550306503075030850309503105031150312503135031450315503165031750318503195032050321503225032350324503255032650327503285032950330503315033250333503345033550336503375033850339503405034150342503435034450345503465034750348503495035050351503525035350354503555035650357503585035950360503615036250363503645036550366503675036850369503705037150372503735037450375503765037750378503795038050381503825038350384503855038650387503885038950390503915039250393503945039550396503975039850399504005040150402504035040450405504065040750408504095041050411504125041350414504155041650417504185041950420504215042250423504245042550426504275042850429504305043150432504335043450435504365043750438504395044050441504425044350444504455044650447504485044950450504515045250453504545045550456504575045850459504605046150462504635046450465504665046750468504695047050471504725047350474504755047650477504785047950480504815048250483504845048550486504875048850489504905049150492504935049450495504965049750498504995050050501505025050350504505055050650507505085050950510505115051250513505145051550516505175051850519505205052150522505235052450525505265052750528505295053050531505325053350534505355053650537505385053950540505415054250543505445054550546505475054850549505505055150552505535055450555505565055750558505595056050561505625056350564505655056650567505685056950570505715057250573505745057550576505775057850579505805058150582505835058450585505865058750588505895059050591505925059350594505955059650597505985059950600506015060250603506045060550606506075060850609506105061150612506135061450615506165061750618506195062050621506225062350624506255062650627506285062950630506315063250633506345063550636506375063850639506405064150642506435064450645506465064750648506495065050651506525065350654506555065650657506585065950660506615066250663506645066550666506675066850669506705067150672506735067450675506765067750678506795068050681506825068350684506855068650687506885068950690506915069250693506945069550696506975069850699507005070150702507035070450705507065070750708507095071050711507125071350714507155071650717507185071950720507215072250723507245072550726507275072850729507305073150732507335073450735507365073750738507395074050741507425074350744507455074650747507485074950750507515075250753507545075550756507575075850759507605076150762507635076450765507665076750768507695077050771507725077350774507755077650777507785077950780507815078250783507845078550786507875078850789507905079150792507935079450795507965079750798507995080050801508025080350804508055080650807508085080950810508115081250813508145081550816508175081850819508205082150822508235082450825508265082750828508295083050831508325083350834508355083650837508385083950840508415084250843508445084550846508475084850849508505085150852508535085450855508565085750858508595086050861508625086350864508655086650867508685086950870508715087250873508745087550876508775087850879508805088150882508835088450885508865088750888508895089050891508925089350894508955089650897508985089950900509015090250903509045090550906509075090850909509105091150912509135091450915509165091750918509195092050921509225092350924509255092650927509285092950930509315093250933509345093550936509375093850939509405094150942509435094450945509465094750948509495095050951509525095350954509555095650957509585095950960509615096250963509645096550966509675096850969509705097150972509735097450975509765097750978509795098050981509825098350984509855098650987509885098950990509915099250993509945099550996509975099850999510005100151002510035100451005510065100751008510095101051011510125101351014510155101651017510185101951020510215102251023510245102551026510275102851029510305103151032510335103451035510365103751038510395104051041510425104351044510455104651047510485104951050510515105251053510545105551056510575105851059510605106151062510635106451065510665106751068510695107051071510725107351074510755107651077510785107951080510815108251083510845108551086510875108851089510905109151092510935109451095510965109751098510995110051101511025110351104511055110651107511085110951110511115111251113511145111551116511175111851119511205112151122511235112451125511265112751128511295113051131511325113351134511355113651137511385113951140511415114251143511445114551146511475114851149511505115151152511535115451155511565115751158511595116051161511625116351164511655116651167511685116951170511715117251173511745117551176511775117851179511805118151182511835118451185511865118751188
  1. /*!
  2. *
  3. * @supermap/vue-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("vue"), require("leaflet"), require("../static/libs/iclient-leaflet/iclient-leaflet.min.js"), require("vue-echarts"), require("ant-design-vue"), require("echarts-liquidfill"), require("video.js"), require("echarts"));
  12. else if(typeof define === 'function' && define.amd)
  13. define(["vue", "leaflet", "../static/libs/iclient-leaflet/iclient-leaflet.min.js", "vue-echarts", "ant-design-vue", "echarts-liquidfill", "video.js", "echarts"], factory);
  14. else if(typeof exports === 'object')
  15. exports["Components"] = factory(require("vue"), require("leaflet"), require("../static/libs/iclient-leaflet/iclient-leaflet.min.js"), require("vue-echarts"), require("ant-design-vue"), require("echarts-liquidfill"), require("video.js"), require("echarts"));
  16. else
  17. root["SuperMap"] = root["SuperMap"] || {}, root["SuperMap"]["Components"] = factory(root["Vue"], root["L"], root["SuperMap"], root["VueECharts"], root["antd"], root["echarts-liquidfill"], root["_videojs"], root["echarts"]);
  18. })(window, function(__WEBPACK_EXTERNAL_MODULE__5643__, __WEBPACK_EXTERNAL_MODULE__73e4__, __WEBPACK_EXTERNAL_MODULE__751d__, __WEBPACK_EXTERNAL_MODULE__8275__, __WEBPACK_EXTERNAL_MODULE_a587__, __WEBPACK_EXTERNAL_MODULE_acbb__, __WEBPACK_EXTERNAL_MODULE_be3f__, __WEBPACK_EXTERNAL_MODULE_f840__) {
  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 = 0);
  103. /******/ })
  104. /************************************************************************/
  105. /******/ ({
  106. /***/ 0:
  107. /***/ (function(module, exports, __webpack_require__) {
  108. module.exports = __webpack_require__("f8a6");
  109. /***/ }),
  110. /***/ "022b":
  111. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  112. "use strict";
  113. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/common/indicator/Indicator.vue?vue&type=template&id=39b17318&
  114. var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"sm-component-indicator",style:(_vm.getBackgroundStyle)},[_c('div',{class:("sm-component-indicator__content sm-component-indicator__content-" + _vm.mode)},[_c('span',{directives:[{name:"show",rawName:"v-show",value:(_vm.showTitleUnit),expression:"showTitleUnit"}],staticClass:"sm-component-indicator__title",style:([_vm.unit_titleStyle, _vm.getTextColorStyle])},[_vm._v(_vm._s(_vm.titleData))]),_vm._v(" "),_c('div',[_c('span',{staticClass:"sm-component-indicator__num",style:(_vm.indicatorStyle)},[(_vm.isNumber(_vm.indicatorNum))?_c('countTo',{attrs:{"decimals":_vm.calDecimals,"startVal":_vm.startData,"endVal":_vm.numData,"duration":Number(_vm.duration) || 1000,"separator":_vm.separator,"numBackground":_vm.numBackground,"numSpacing":_vm.numSpacing,"separatorBackground":_vm.separatorBackground,"fontSize":parseFloat(_vm.fontSize) + _vm.fontUnit}}):_vm._e(),_vm._v("\n "+_vm._s(_vm.isNumber(_vm.indicatorNum) ? '' : _vm.indicatorNum)+"\n ")],1),_vm._v(" "),_c('span',{directives:[{name:"show",rawName:"v-show",value:(_vm.showTitleUnit),expression:"showTitleUnit"}],staticClass:"sm-component-indicator__unit",style:([_vm.unit_titleStyle, _vm.getTextColorStyle])},[_vm._v(_vm._s(_vm.unitData))])])])])}
  115. var staticRenderFns = []
  116. // CONCATENATED MODULE: ./src/common/indicator/Indicator.vue?vue&type=template&id=39b17318&
  117. /* concated harmony reexport render */__webpack_require__.d(__webpack_exports__, "a", function() { return render; });
  118. /* concated harmony reexport staticRenderFns */__webpack_require__.d(__webpack_exports__, "b", function() { return staticRenderFns; });
  119. /***/ }),
  120. /***/ "0318":
  121. /***/ (function(module, exports, __webpack_require__) {
  122. /* eslint-disable node/no-deprecated-api */
  123. var buffer = __webpack_require__("3be6")
  124. var Buffer = buffer.Buffer
  125. // alternative to using Object.keys for old browsers
  126. function copyProps (src, dst) {
  127. for (var key in src) {
  128. dst[key] = src[key]
  129. }
  130. }
  131. if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
  132. module.exports = buffer
  133. } else {
  134. // Copy properties from require('buffer')
  135. copyProps(buffer, exports)
  136. exports.Buffer = SafeBuffer
  137. }
  138. function SafeBuffer (arg, encodingOrOffset, length) {
  139. return Buffer(arg, encodingOrOffset, length)
  140. }
  141. // Copy static methods from Buffer
  142. copyProps(Buffer, SafeBuffer)
  143. SafeBuffer.from = function (arg, encodingOrOffset, length) {
  144. if (typeof arg === 'number') {
  145. throw new TypeError('Argument must not be a number')
  146. }
  147. return Buffer(arg, encodingOrOffset, length)
  148. }
  149. SafeBuffer.alloc = function (size, fill, encoding) {
  150. if (typeof size !== 'number') {
  151. throw new TypeError('Argument must be a number')
  152. }
  153. var buf = Buffer(size)
  154. if (fill !== undefined) {
  155. if (typeof encoding === 'string') {
  156. buf.fill(fill, encoding)
  157. } else {
  158. buf.fill(fill)
  159. }
  160. } else {
  161. buf.fill(0)
  162. }
  163. return buf
  164. }
  165. SafeBuffer.allocUnsafe = function (size) {
  166. if (typeof size !== 'number') {
  167. throw new TypeError('Argument must be a number')
  168. }
  169. return Buffer(size)
  170. }
  171. SafeBuffer.allocUnsafeSlow = function (size) {
  172. if (typeof size !== 'number') {
  173. throw new TypeError('Argument must be a number')
  174. }
  175. return buffer.SlowBuffer(size)
  176. }
  177. /***/ }),
  178. /***/ "05d2":
  179. /***/ (function(module, exports) {
  180. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhYAAAD+CAYAAABmz0wVAAAABGdBTUEAALGPC/xhBQAAFw1JREFUeAHt3U+rJOd1B+D+f1sj7OWQ1WgjSAhk4QS0NsGQD+CP4m2CMckqkI+iDxAwwWtB7EUgJKCNZhVmmUQzt/9V5ZzqrqvWydgJZ9fiqfGdqlPVp2/3I0P/eN+3epbvP3x4u/h/bO/evfvqYw/77M2bLz923jkCBAgQIEDg8QS+efv25x971a9fv/7iY+fruWUGi9Vy/fU4DovFcjUuF4txPl7czi3GxeLXv/ndL+PCOMRPPkke5P50PufORoAAAQIECPwABLabzfQulqtlRILFInbT9rOf/uRXizwzDsvIC9N+GfsIA8s8l8fDePl8ChbxiK+/+u2//93pdBqHacvdasgQMVzi8JYoDsfjNVTk+VuwyF96f5y1jQABAgQIEHg8gdUtTOQrz+Pc8vhpt4vcMP1vuVqvpkur1ZAH8bNabbfb5Rd//sd/PS7Gz+dYMt6HivNleRkukSgiQByPU9gYs8wTQ/65hYo8kb9wrvPYRoAAAQIECDymwBwsMjHkO8g6ssPycnlerjNQxIndbjtm5oiAMW5yvGIxLCJDrHLWYzFeFlOwiO6XkYprqBimXJEjFBkozlOqyFGKa6iY9pdxzOjxmHReNQECBAgQIPD7BCJDRHCI8JD7DBe5vyyHTaSLyACrHMHI3vNiFUHiGi4yS+TRFCwiMuSoQwSIHKkYhufDMYLFZTifr6HifL4OV5xOl1iIsVg8Pz9PgSIe8r19XrMRIECAAAECjykQuWEKDPN+v99P9XY7DVdEshjHzbCO+YzDar1eL/ZPu5dwkVkit5epkFxTkXMcOTgxh4pjJIkMFRkojsdjhI8hpkbOef0lUMTl6fgxCb1qAgQIECBA4F5gE+FiDhbxmR9TH5vV8bgadrvdlAOGTX7ub6eWyAyLXIcxLFdxcDcVEhMhsZJzmtoYcvojRyruQ0WOUMyBIkcpMkzE9Mh4OV8DRoQP4eL+v4pjAgQIECDwgAKbzXp5iNe9jn1Me8TPEOsrLmOMTixzCmSx2F+HJab3tl0clseYJ3mKXBGLPP/XiEWMVORCzRyxyDUV80jFHCriWpwfxkNMk2SQOMXP+XwWKB7w/zheMgECBAgQ+EMCm81muc1wET9PT7tVBozr459fwsW8/iLyQeaKOmIRazqnW0inkYiPhornCBaH5+MwB4oIHIvj6TpScToJGH/oP5BrBAgQIEDgEQS2280UIHbbWD+x348ZMHIw4Wm/i0Axb9dwMQeLmDaJtRSxbvM21LDJb9T8l3/9j3/IL7zK0YpYRjHd/ZFrKnL6I0cq5lDx4fkwzIEiw0SOcOSvmffzr7QnQIAAAQIEHk8gbiWdgsUp9jF4sJwDRn0nq9VxHQs6c2nmlB0iQyzzizT/7E//6Be3u0JifWesrZhDRS7WzISR8yrT9EeMVMyh4tv3h2nKZA4ThwgXh8M1YNRfrCZAgAABAgQeR+Dpabt8ylARn+0ZMjJgxKvP0YppbUWuu1hHNsiMkFkhpkqmb9PMDLFe76fBhilYTEMY2XX35VfXxZrXNRU5/ZEjFfehYg4Uz8/Xb+N8HDavlAABAgQIEPiYQH6m7/e7WFdxHbm4PSZDxSqmRaZ1lnnXSGaE/X6xngYkIjvEcs9pSUU+/nq7aRzE9MjLiEUu2JxHK3JuJRdp5nqKTDD585//9T6mRK6BIvfvPxxuMyv5lDYCBAgQIEDgEQVeffI0TYXMAePHP3o1ra2ItReZBRbn83qaychRi8wK83RIZoj5/V6nQqZ1FdeTQ3yj5nwxbymdRyvmNRU5UiFUzEL2BAgQIEDghyMwDxTkqEV+1sfIxZQJ8mu8I0jEXSIRMCIbPN3GJebMkCMXuVYzJV5GLLLIOZPc53dVTD9ltCKvzesp5pGK9x+u38KZ12wECBAgQIDAD0Mgw0V+5s9rLuZRi/wOqzkn5Duds8P8rjefvXnz5Ve//WauF7FscwoX05dgRfPLhTiYRytqqPj2W+Hi3skxAQIECBB4RIFPP93Hv3r+/c/0HLWY7xbJ9zQtkYgBiDyeM0Men2KqJDPFy4jFtADjNoyRSSQfNG8v0yC3uz/moZK8nqHiv+cH2hMgQIAAAQKPKxCf6Rku8g3kZ/13oxbTXSKZDaZreX3OCvf5Ic/ffeFFljYCBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX0Cw6NvpJECAAAECBIqAYFFAlAQIECBAgEBfQLDo2+kkQIAAAQIEioBgUUCUBAgQIECAQF9AsOjb6SRAgAABAgSKgGBRQJQECBAgQIBAX2Azt65Wy2X+ZL1er6b9fG273Sx3u+3y6Wm7fH4+jq8+eVq+/3AY8/qnn+6Xi2+fp+P58fYECBAgQIDA4wlMn+m3l52f9XmYn/2ZATIL3L+jOSvc54e8vvnm7dufbzebvz+dztPj1/GI6UKEi81m/b0neYon3u933zv3/sPzeP9CpifxFwECBAgQIPCQAq8+2S8zVOTnff7kZ//9G8lssLkNQMyZIa9HllhkpngZsciTq1uoyBQy/WTzJkYrtuvFKZ74eDyN86hFDRjZbyNAgAABAgQeW2AOFfku8jM/9zliEVlgygTryAZzTshrc3bI49ymNRbLu2mQ1fo6HZIXN+v1chtPsN/vFy/TIXejFhku5qGSfLyNAAECBAgQeFyB+1Axj1bM0yBTFphGK76bzZgzQ06HZJbId/4yYhGnpjUWmTyiOUYnzjHUMUzTIfejFtn04x+9WkWKGQ+H07S2wuhFqtgIECBAgMDjC0yBIkYqcgpkGqm4G62Yp0HWMfCQWSEzwxQqIkPM73wKFhk08kRcflnAudttVpfLJaY+dqvz+TLGE2SIyBGOIR+bW/7S+4BxPetvAgQIECBA4BEFcupjXlMxh4pPXz2t5tGKzAQ5DZIZId9fhorMDtPxLUtMwSKO44l2y8vleUof2+16dTyuhkwkOWrxtN/Nt6VmqFjFtMgYv3DMNRf5i59215GLfGIbAQIECBAg8JgC+Zmerzz30xKIWFeRoeKT/dMqs0Au2sxskCMVmRXmEYvMELllb9w2+uHtcrH+t3/8p3/+m+fnw3A4ns4xDXKJaY7L8/NzhIfzEAFieI6fw/NxOMXoxfl8HuPa4ni6TFMhcUeJ201T00aAAAECBB5YYL6lNBdqZqDIpRC51jJDxX63XUXgiJ9NjmDkjMU6jtcxwrHZR/D4q7/8i78dF5c/ua6xiIwxrbuIBBILNlfDZhyHYYiwsI8Riud5tGJazHk4HIfzeT3GL8uAMfNNKWUu7AkQIECAAIHHFZgDRa6pyOmPHKm4DxU5WhHX4vxt1CJHKzIJRHK4BotxWK7iWjRloFhthvU4bDJY5PZduFjHmot88vNlGM9xfInRi3xErsHIvY0AAQIECBB4XIEMEvnq85bSvDP0OvVxnf6YRyruQ0Xmipw2yQyxiCyRvbcRi9U0YpG5I+ZJxnE8xCjFNq/ftv2wWh3XOYqRUyMZMJ6i9TIFjCEWeM6PsydAgAABAgQeWWAOE/kecj1FBopcS7Hb7eKrJ64jFbs42MTpXFuR2WG6CWQZ0WG83I1YrIbVMC7HTB/xRDeT7fTFF9kSzzGeTpchplzWufYiH5DB4n5/a7IjQIAAAQIEHlAgMsB1xOK2z7UU+TYyUGQWmKc/MlREVsg7RPKmkFjMOXx/xCJO5S0jq01MjpzjjtL90y5Dw+KwPE63n8a1ZQxWxLqKWH8R+wwZw2UcL9M6jAeU85IJECBAgACB3ysw5YX4wswME5kB5n2uqcgwMY1UZNaIn816nB6eWSKSwXXEIoYdsinGMIY4cQ0X+dtilWfeUppf3RnfaRETIREqhvwT+7yeJ677a53HNgIECBAgQOAxBTJE5CvPIHHdR1zIP3E+s0Cen9ZUxGLN+1CRFzJLZM/L4s3tdrs8nU4v4WJYrpeRH8bbYEUmiuXheIy+dSSSvGvkuzBxf5xPaiNAgAABAgQeT2AOFvnK8zi3PJ6+pyLqPJWBYtrH9EccZKaI77eK77+4Ld6cvsci1nt+HVEhxy3GeIaMDdNxPOi2Xyx+/Zvf/XIKFPFX/pIIGtP+9N0tp3naRoAAAQIECDywQP4rpbllish9hojcfvbTn/zqektp3P0xLdQc4mxMf8RDM1Tk8TBePp+CRTb+X9u7d++++thjPnvz5suPnXeOAAECBAgQeDyB/KfPP/aqX79+/cXHztdz/wOOaWdXmTJgygAAAABJRU5ErkJggg=="
  181. /***/ }),
  182. /***/ "0640":
  183. /***/ (function(module, exports, __webpack_require__) {
  184. module.exports = __webpack_require__("bbe9").PassThrough
  185. /***/ }),
  186. /***/ "089f":
  187. /***/ (function(module, exports) {
  188. /** Used for built-in method references. */
  189. var objectProto = Object.prototype;
  190. /**
  191. * Used to resolve the
  192. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  193. * of values.
  194. */
  195. var nativeObjectToString = objectProto.toString;
  196. /**
  197. * Converts `value` to a string using `Object.prototype.toString`.
  198. *
  199. * @private
  200. * @param {*} value The value to convert.
  201. * @returns {string} Returns the converted string.
  202. */
  203. function objectToString(value) {
  204. return nativeObjectToString.call(value);
  205. }
  206. module.exports = objectToString;
  207. /***/ }),
  208. /***/ "08d1":
  209. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  210. "use strict";
  211. __webpack_require__.r(__webpack_exports__);
  212. /* harmony import */ var _Indicator_vue_vue_type_template_id_39b17318___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("022b");
  213. /* harmony import */ var _Indicator_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("13f5");
  214. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _Indicator_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _Indicator_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  215. /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b429");
  216. /* normalize component */
  217. var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
  218. _Indicator_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
  219. _Indicator_vue_vue_type_template_id_39b17318___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
  220. _Indicator_vue_vue_type_template_id_39b17318___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
  221. false,
  222. null,
  223. null,
  224. null
  225. )
  226. /* harmony default export */ __webpack_exports__["default"] = (component.exports);
  227. /***/ }),
  228. /***/ "0956":
  229. /***/ (function(module, exports, __webpack_require__) {
  230. "use strict";
  231. // Copyright Joyent, Inc. and other Node contributors.
  232. //
  233. // Permission is hereby granted, free of charge, to any person obtaining a
  234. // copy of this software and associated documentation files (the
  235. // "Software"), to deal in the Software without restriction, including
  236. // without limitation the rights to use, copy, modify, merge, publish,
  237. // distribute, sublicense, and/or sell copies of the Software, and to permit
  238. // persons to whom the Software is furnished to do so, subject to the
  239. // following conditions:
  240. //
  241. // The above copyright notice and this permission notice shall be included
  242. // in all copies or substantial portions of the Software.
  243. //
  244. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  245. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  246. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  247. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  248. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  249. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  250. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  251. var R = typeof Reflect === 'object' ? Reflect : null
  252. var ReflectApply = R && typeof R.apply === 'function'
  253. ? R.apply
  254. : function ReflectApply(target, receiver, args) {
  255. return Function.prototype.apply.call(target, receiver, args);
  256. }
  257. var ReflectOwnKeys
  258. if (R && typeof R.ownKeys === 'function') {
  259. ReflectOwnKeys = R.ownKeys
  260. } else if (Object.getOwnPropertySymbols) {
  261. ReflectOwnKeys = function ReflectOwnKeys(target) {
  262. return Object.getOwnPropertyNames(target)
  263. .concat(Object.getOwnPropertySymbols(target));
  264. };
  265. } else {
  266. ReflectOwnKeys = function ReflectOwnKeys(target) {
  267. return Object.getOwnPropertyNames(target);
  268. };
  269. }
  270. function ProcessEmitWarning(warning) {
  271. if (console && console.warn) console.warn(warning);
  272. }
  273. var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {
  274. return value !== value;
  275. }
  276. function EventEmitter() {
  277. EventEmitter.init.call(this);
  278. }
  279. module.exports = EventEmitter;
  280. // Backwards-compat with node 0.10.x
  281. EventEmitter.EventEmitter = EventEmitter;
  282. EventEmitter.prototype._events = undefined;
  283. EventEmitter.prototype._eventsCount = 0;
  284. EventEmitter.prototype._maxListeners = undefined;
  285. // By default EventEmitters will print a warning if more than 10 listeners are
  286. // added to it. This is a useful default which helps finding memory leaks.
  287. var defaultMaxListeners = 10;
  288. Object.defineProperty(EventEmitter, 'defaultMaxListeners', {
  289. enumerable: true,
  290. get: function() {
  291. return defaultMaxListeners;
  292. },
  293. set: function(arg) {
  294. if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {
  295. throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.');
  296. }
  297. defaultMaxListeners = arg;
  298. }
  299. });
  300. EventEmitter.init = function() {
  301. if (this._events === undefined ||
  302. this._events === Object.getPrototypeOf(this)._events) {
  303. this._events = Object.create(null);
  304. this._eventsCount = 0;
  305. }
  306. this._maxListeners = this._maxListeners || undefined;
  307. };
  308. // Obviously not all Emitters should be limited to 10. This function allows
  309. // that to be increased. Set to zero for unlimited.
  310. EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
  311. if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {
  312. throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.');
  313. }
  314. this._maxListeners = n;
  315. return this;
  316. };
  317. function $getMaxListeners(that) {
  318. if (that._maxListeners === undefined)
  319. return EventEmitter.defaultMaxListeners;
  320. return that._maxListeners;
  321. }
  322. EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
  323. return $getMaxListeners(this);
  324. };
  325. EventEmitter.prototype.emit = function emit(type) {
  326. var args = [];
  327. for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);
  328. var doError = (type === 'error');
  329. var events = this._events;
  330. if (events !== undefined)
  331. doError = (doError && events.error === undefined);
  332. else if (!doError)
  333. return false;
  334. // If there is no 'error' event listener then throw.
  335. if (doError) {
  336. var er;
  337. if (args.length > 0)
  338. er = args[0];
  339. if (er instanceof Error) {
  340. // Note: The comments on the `throw` lines are intentional, they show
  341. // up in Node's output if this results in an unhandled exception.
  342. throw er; // Unhandled 'error' event
  343. }
  344. // At least give some kind of context to the user
  345. var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));
  346. err.context = er;
  347. throw err; // Unhandled 'error' event
  348. }
  349. var handler = events[type];
  350. if (handler === undefined)
  351. return false;
  352. if (typeof handler === 'function') {
  353. ReflectApply(handler, this, args);
  354. } else {
  355. var len = handler.length;
  356. var listeners = arrayClone(handler, len);
  357. for (var i = 0; i < len; ++i)
  358. ReflectApply(listeners[i], this, args);
  359. }
  360. return true;
  361. };
  362. function _addListener(target, type, listener, prepend) {
  363. var m;
  364. var events;
  365. var existing;
  366. if (typeof listener !== 'function') {
  367. throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
  368. }
  369. events = target._events;
  370. if (events === undefined) {
  371. events = target._events = Object.create(null);
  372. target._eventsCount = 0;
  373. } else {
  374. // To avoid recursion in the case that type === "newListener"! Before
  375. // adding it to the listeners, first emit "newListener".
  376. if (events.newListener !== undefined) {
  377. target.emit('newListener', type,
  378. listener.listener ? listener.listener : listener);
  379. // Re-assign `events` because a newListener handler could have caused the
  380. // this._events to be assigned to a new object
  381. events = target._events;
  382. }
  383. existing = events[type];
  384. }
  385. if (existing === undefined) {
  386. // Optimize the case of one listener. Don't need the extra array object.
  387. existing = events[type] = listener;
  388. ++target._eventsCount;
  389. } else {
  390. if (typeof existing === 'function') {
  391. // Adding the second element, need to change to array.
  392. existing = events[type] =
  393. prepend ? [listener, existing] : [existing, listener];
  394. // If we've already got an array, just append.
  395. } else if (prepend) {
  396. existing.unshift(listener);
  397. } else {
  398. existing.push(listener);
  399. }
  400. // Check for listener leak
  401. m = $getMaxListeners(target);
  402. if (m > 0 && existing.length > m && !existing.warned) {
  403. existing.warned = true;
  404. // No error code for this since it is a Warning
  405. // eslint-disable-next-line no-restricted-syntax
  406. var w = new Error('Possible EventEmitter memory leak detected. ' +
  407. existing.length + ' ' + String(type) + ' listeners ' +
  408. 'added. Use emitter.setMaxListeners() to ' +
  409. 'increase limit');
  410. w.name = 'MaxListenersExceededWarning';
  411. w.emitter = target;
  412. w.type = type;
  413. w.count = existing.length;
  414. ProcessEmitWarning(w);
  415. }
  416. }
  417. return target;
  418. }
  419. EventEmitter.prototype.addListener = function addListener(type, listener) {
  420. return _addListener(this, type, listener, false);
  421. };
  422. EventEmitter.prototype.on = EventEmitter.prototype.addListener;
  423. EventEmitter.prototype.prependListener =
  424. function prependListener(type, listener) {
  425. return _addListener(this, type, listener, true);
  426. };
  427. function onceWrapper() {
  428. var args = [];
  429. for (var i = 0; i < arguments.length; i++) args.push(arguments[i]);
  430. if (!this.fired) {
  431. this.target.removeListener(this.type, this.wrapFn);
  432. this.fired = true;
  433. ReflectApply(this.listener, this.target, args);
  434. }
  435. }
  436. function _onceWrap(target, type, listener) {
  437. var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };
  438. var wrapped = onceWrapper.bind(state);
  439. wrapped.listener = listener;
  440. state.wrapFn = wrapped;
  441. return wrapped;
  442. }
  443. EventEmitter.prototype.once = function once(type, listener) {
  444. if (typeof listener !== 'function') {
  445. throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
  446. }
  447. this.on(type, _onceWrap(this, type, listener));
  448. return this;
  449. };
  450. EventEmitter.prototype.prependOnceListener =
  451. function prependOnceListener(type, listener) {
  452. if (typeof listener !== 'function') {
  453. throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
  454. }
  455. this.prependListener(type, _onceWrap(this, type, listener));
  456. return this;
  457. };
  458. // Emits a 'removeListener' event if and only if the listener was removed.
  459. EventEmitter.prototype.removeListener =
  460. function removeListener(type, listener) {
  461. var list, events, position, i, originalListener;
  462. if (typeof listener !== 'function') {
  463. throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
  464. }
  465. events = this._events;
  466. if (events === undefined)
  467. return this;
  468. list = events[type];
  469. if (list === undefined)
  470. return this;
  471. if (list === listener || list.listener === listener) {
  472. if (--this._eventsCount === 0)
  473. this._events = Object.create(null);
  474. else {
  475. delete events[type];
  476. if (events.removeListener)
  477. this.emit('removeListener', type, list.listener || listener);
  478. }
  479. } else if (typeof list !== 'function') {
  480. position = -1;
  481. for (i = list.length - 1; i >= 0; i--) {
  482. if (list[i] === listener || list[i].listener === listener) {
  483. originalListener = list[i].listener;
  484. position = i;
  485. break;
  486. }
  487. }
  488. if (position < 0)
  489. return this;
  490. if (position === 0)
  491. list.shift();
  492. else {
  493. spliceOne(list, position);
  494. }
  495. if (list.length === 1)
  496. events[type] = list[0];
  497. if (events.removeListener !== undefined)
  498. this.emit('removeListener', type, originalListener || listener);
  499. }
  500. return this;
  501. };
  502. EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
  503. EventEmitter.prototype.removeAllListeners =
  504. function removeAllListeners(type) {
  505. var listeners, events, i;
  506. events = this._events;
  507. if (events === undefined)
  508. return this;
  509. // not listening for removeListener, no need to emit
  510. if (events.removeListener === undefined) {
  511. if (arguments.length === 0) {
  512. this._events = Object.create(null);
  513. this._eventsCount = 0;
  514. } else if (events[type] !== undefined) {
  515. if (--this._eventsCount === 0)
  516. this._events = Object.create(null);
  517. else
  518. delete events[type];
  519. }
  520. return this;
  521. }
  522. // emit removeListener for all listeners on all events
  523. if (arguments.length === 0) {
  524. var keys = Object.keys(events);
  525. var key;
  526. for (i = 0; i < keys.length; ++i) {
  527. key = keys[i];
  528. if (key === 'removeListener') continue;
  529. this.removeAllListeners(key);
  530. }
  531. this.removeAllListeners('removeListener');
  532. this._events = Object.create(null);
  533. this._eventsCount = 0;
  534. return this;
  535. }
  536. listeners = events[type];
  537. if (typeof listeners === 'function') {
  538. this.removeListener(type, listeners);
  539. } else if (listeners !== undefined) {
  540. // LIFO order
  541. for (i = listeners.length - 1; i >= 0; i--) {
  542. this.removeListener(type, listeners[i]);
  543. }
  544. }
  545. return this;
  546. };
  547. function _listeners(target, type, unwrap) {
  548. var events = target._events;
  549. if (events === undefined)
  550. return [];
  551. var evlistener = events[type];
  552. if (evlistener === undefined)
  553. return [];
  554. if (typeof evlistener === 'function')
  555. return unwrap ? [evlistener.listener || evlistener] : [evlistener];
  556. return unwrap ?
  557. unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
  558. }
  559. EventEmitter.prototype.listeners = function listeners(type) {
  560. return _listeners(this, type, true);
  561. };
  562. EventEmitter.prototype.rawListeners = function rawListeners(type) {
  563. return _listeners(this, type, false);
  564. };
  565. EventEmitter.listenerCount = function(emitter, type) {
  566. if (typeof emitter.listenerCount === 'function') {
  567. return emitter.listenerCount(type);
  568. } else {
  569. return listenerCount.call(emitter, type);
  570. }
  571. };
  572. EventEmitter.prototype.listenerCount = listenerCount;
  573. function listenerCount(type) {
  574. var events = this._events;
  575. if (events !== undefined) {
  576. var evlistener = events[type];
  577. if (typeof evlistener === 'function') {
  578. return 1;
  579. } else if (evlistener !== undefined) {
  580. return evlistener.length;
  581. }
  582. }
  583. return 0;
  584. }
  585. EventEmitter.prototype.eventNames = function eventNames() {
  586. return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
  587. };
  588. function arrayClone(arr, n) {
  589. var copy = new Array(n);
  590. for (var i = 0; i < n; ++i)
  591. copy[i] = arr[i];
  592. return copy;
  593. }
  594. function spliceOne(list, index) {
  595. for (; index + 1 < list.length; index++)
  596. list[index] = list[index + 1];
  597. list.pop();
  598. }
  599. function unwrapListeners(arr) {
  600. var ret = new Array(arr.length);
  601. for (var i = 0; i < ret.length; ++i) {
  602. ret[i] = arr[i].listener || arr[i];
  603. }
  604. return ret;
  605. }
  606. /***/ }),
  607. /***/ "0b0f":
  608. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  609. "use strict";
  610. __webpack_require__.r(__webpack_exports__);
  611. /* harmony import */ var _TimeText_vue_vue_type_template_id_6da009bc___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("827d");
  612. /* harmony import */ var _TimeText_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("d5f4");
  613. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _TimeText_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _TimeText_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  614. /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b429");
  615. /* normalize component */
  616. var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
  617. _TimeText_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
  618. _TimeText_vue_vue_type_template_id_6da009bc___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
  619. _TimeText_vue_vue_type_template_id_6da009bc___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
  620. false,
  621. null,
  622. null,
  623. null
  624. )
  625. /* harmony default export */ __webpack_exports__["default"] = (component.exports);
  626. /***/ }),
  627. /***/ "0b11":
  628. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  629. "use strict";
  630. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/common/chart/ChartMixin.vue?vue&type=template&id=1f1efe10&
  631. var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('sm-card',{directives:[{name:"show",rawName:"v-show",value:(_vm.isShow),expression:"isShow"}],staticClass:"sm-component-chart",attrs:{"icon-class":_vm.iconClass,"icon-position":_vm.position,"header-name":_vm.headerName,"auto-rotate":_vm.autoRotate,"collapsed":_vm.collapsed}},[_c('v-chart',{ref:_vm.chartId,style:(_vm._chartStyle),attrs:{"id":_vm.chartId,"options":_vm._chartOptions,"initOptions":_vm.initOptions,"group":_vm.group,"manual-update":_vm.manualUpdate,"theme":_vm.theme || _vm.chartTheme},on:{"datazoom":_vm.dataZoomHandler}}),_vm._v(" "),_c('TablePopup',_vm._b({directives:[{name:"show",rawName:"v-show",value:(false),expression:"false"}],ref:"chartTablePopup",attrs:{"text-color":_vm.textColor,"background":_vm.background}},'TablePopup',_vm.tablePopupProps,false))],1)}
  632. var staticRenderFns = []
  633. // CONCATENATED MODULE: ./src/common/chart/ChartMixin.vue?vue&type=template&id=1f1efe10&
  634. /* concated harmony reexport render */__webpack_require__.d(__webpack_exports__, "a", function() { return render; });
  635. /* concated harmony reexport staticRenderFns */__webpack_require__.d(__webpack_exports__, "b", function() { return staticRenderFns; });
  636. /***/ }),
  637. /***/ "0e27":
  638. /***/ (function(module, exports, __webpack_require__) {
  639. "use strict";
  640. Object.defineProperty(exports, "__esModule", {
  641. value: true
  642. });
  643. exports.default = void 0;
  644. var _default = {
  645. props: {
  646. content: {
  647. type: String,
  648. default: '',
  649. custom: true
  650. }
  651. },
  652. data: function data() {
  653. return {
  654. isMap: false
  655. };
  656. },
  657. mounted: function mounted() {
  658. this.popperOptions = {};
  659. },
  660. render: function render(h) {
  661. if (this.$slots.default) {
  662. // 如果是其他bindpopup的layer,不要绑定style
  663. var style = this.isMap ? {
  664. style: {
  665. display: 'none'
  666. }
  667. } : {};
  668. return h('div', style, this.$slots.default);
  669. }
  670. return null;
  671. }
  672. };
  673. exports.default = _default;
  674. /***/ }),
  675. /***/ "0f9e":
  676. /***/ (function(module, exports, __webpack_require__) {
  677. "use strict";
  678. var _interopRequireDefault = __webpack_require__("8e6d");
  679. Object.defineProperty(exports, "__esModule", {
  680. value: true
  681. });
  682. exports.default = void 0;
  683. var _typeof2 = _interopRequireDefault(__webpack_require__("7ae5"));
  684. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__("4066"));
  685. var _defineProperty2 = _interopRequireDefault(__webpack_require__("279f"));
  686. __webpack_require__("f840");
  687. var _vueEcharts = _interopRequireDefault(__webpack_require__("8275"));
  688. var _lodash = _interopRequireDefault(__webpack_require__("f344"));
  689. var _lodash2 = _interopRequireDefault(__webpack_require__("6e63"));
  690. var _lodash3 = _interopRequireDefault(__webpack_require__("5f9f"));
  691. var _debounce = _interopRequireDefault(__webpack_require__("331f"));
  692. var _lodash4 = _interopRequireDefault(__webpack_require__("25a2"));
  693. var _card = _interopRequireDefault(__webpack_require__("333c"));
  694. var _theme = _interopRequireDefault(__webpack_require__("9259"));
  695. var _timer = _interopRequireDefault(__webpack_require__("8156"));
  696. var _chart = __webpack_require__("33aa");
  697. var _EchartsDataService = _interopRequireDefault(__webpack_require__("50c6"));
  698. var _TablePopup = _interopRequireDefault(__webpack_require__("b397"));
  699. var _util = __webpack_require__("1448");
  700. var _resizeDetector = __webpack_require__("e0f2");
  701. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
  702. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
  703. // 枚举事件类型
  704. var EVENTS = ['legendselectchanged', 'legendselected', 'legendunselected', 'legendscroll', 'datazoom', 'datarangeselected', 'timelinechanged', 'timelineplaychanged', 'restore', 'dataviewchanged', 'magictypechanged', 'geoselectchanged', 'geoselected', 'geounselected', 'pieselectchanged', 'pieselected', 'pieunselected', 'mapselectchanged', 'mapselected', 'mapunselected', 'axisareaselected', 'focusnodeadjacency', 'unfocusnodeadjacency', 'brush', 'brushselected', 'rendered', 'finished', 'click', 'dblclick', 'mouseover', 'mouseout', 'mousemove', 'mousedown', 'mouseup', 'globalout', 'contextmenu'];
  705. var _default2 = {
  706. components: {
  707. 'v-chart': _vueEcharts.default,
  708. TablePopup: _TablePopup.default
  709. },
  710. mixins: [_theme.default, _card.default, _timer.default],
  711. props: {
  712. iconClass: {
  713. type: String,
  714. default: 'sm-components-icons-attribute'
  715. },
  716. dataset: {
  717. type: Object,
  718. default: function _default() {
  719. return null;
  720. }
  721. },
  722. datasetOptions: {
  723. type: Array,
  724. default: function _default() {
  725. return null;
  726. }
  727. },
  728. colorGroup: {
  729. type: Array
  730. },
  731. options: {
  732. type: Object,
  733. default: function _default() {
  734. return {};
  735. }
  736. },
  737. autoresize: {
  738. type: Boolean,
  739. default: true
  740. },
  741. theme: {
  742. type: [Object, String]
  743. },
  744. initOptions: {
  745. type: Object
  746. },
  747. group: {
  748. type: String
  749. },
  750. manualUpdate: {
  751. type: Boolean,
  752. default: false
  753. },
  754. autoPlay: {
  755. type: Boolean,
  756. default: false
  757. },
  758. associatedMap: {
  759. type: Boolean,
  760. default: false
  761. },
  762. highlightOptions: {
  763. type: Array,
  764. default: function _default() {
  765. return [];
  766. }
  767. },
  768. highlightColor: {
  769. type: String,
  770. default: '#01ffff'
  771. }
  772. },
  773. data: function data() {
  774. return {
  775. chartId: (0, _lodash.default)("".concat(this.$options.name.toLowerCase(), "-")),
  776. chartTheme: {},
  777. // 图表的主题
  778. echartOptions: {},
  779. // 最后生成的echart数据
  780. datasetChange: false,
  781. // dataset是否改变
  782. dataSeriesCache: {},
  783. tablePopupProps: {},
  784. startSpin: null,
  785. customSeries: [],
  786. dataZoomHandler: function dataZoomHandler() {}
  787. };
  788. },
  789. computed: {
  790. width: function width() {
  791. return this.smChart && this.smChart.width;
  792. },
  793. height: function height() {
  794. return this.smChart && this.smChart.height;
  795. },
  796. computedOptions: function computedOptions() {
  797. return this.smChart && this.smChart.computedOptions;
  798. },
  799. _chartStyle: function _chartStyle() {
  800. return {
  801. width: '100%',
  802. height: this.headerName ? 'calc(100% - 30px)' : '100%'
  803. };
  804. },
  805. parseOptions: function parseOptions() {
  806. var _this2 = this;
  807. if (!this.options.series) {
  808. return this.options;
  809. }
  810. if (this.options.series.find(function (item) {
  811. return item.type === '2.5Bar';
  812. })) {
  813. return _objectSpread({}, this.options, {
  814. series: []
  815. });
  816. }
  817. if (this.options.series[0] && this.options.series[0].customType === 'customRingsSeries') {
  818. return _objectSpread({}, this.options, {
  819. series: [].concat((0, _toConsumableArray2.default)(this.options.series), (0, _toConsumableArray2.default)(this.customSeries))
  820. });
  821. }
  822. var series = this.options.series.map(function (serie, index) {
  823. if (serie.label) {
  824. var cloneSerie = (0, _lodash4.default)(serie);
  825. cloneSerie.label.normal = _this2._controlLabel(cloneSerie.label.normal, cloneSerie.maxLabels);
  826. return cloneSerie;
  827. }
  828. return serie;
  829. });
  830. return _objectSpread({}, this.options, {
  831. series: series
  832. });
  833. },
  834. _chartOptions: function _chartOptions() {
  835. return this._isRequestData && this.echartOptions || this.parseOptions;
  836. },
  837. // 是否传入dataset和datasetOptions
  838. _isRequestData: function _isRequestData() {
  839. return this.dataset && Object.keys(this.dataset).length > 0 && (this.dataset.url || this.dataset.geoJSON) && this.datasetOptions && this.datasetOptions.length > 0;
  840. },
  841. xBar: function xBar() {
  842. return this.options && this.options.yAxis && this.options.yAxis.type === 'category';
  843. },
  844. popupBackground: function popupBackground() {
  845. return this.backgroundData ? (0, _util.getColorWithOpacity)(this.backgroundData, 0.5) : this.backgroundData;
  846. },
  847. colorNumber: function colorNumber() {
  848. var length = this.datasetOptions && this.datasetOptions.length || this.echartOptions.series && this.echartOptions.series.length;
  849. var colorNumber = this.colorGroupsData.length;
  850. if (length && length > colorNumber) {
  851. colorNumber = length;
  852. }
  853. return colorNumber;
  854. }
  855. },
  856. watch: {
  857. theme: function theme() {
  858. this.chartTheme = null;
  859. },
  860. colorGroupsData: function colorGroupsData(newVal, oldVal) {
  861. if (!(0, _lodash3.default)(newVal, oldVal)) {
  862. this._setChartTheme();
  863. }
  864. },
  865. textColorsData: function textColorsData(newVal, oldVal) {
  866. if (!(0, _lodash3.default)(newVal, oldVal)) {
  867. this._setChartTheme();
  868. }
  869. },
  870. backgroundData: function backgroundData(newVal, oldVal) {
  871. if (!(0, _lodash3.default)(newVal, oldVal)) {
  872. this._setChartTheme();
  873. this.changePopupArrowStyle();
  874. }
  875. },
  876. dataset: {
  877. handler: function handler(newVal, oldVal) {
  878. this._isRequestData && this._setEchartOptions(this.dataset, this.datasetOptions, this.options);
  879. this.datasetChange = true;
  880. },
  881. deep: true
  882. },
  883. datasetOptions: {
  884. handler: function handler(newVal, oldVal) {
  885. if (!(0, _lodash3.default)(newVal, oldVal)) {
  886. this._setChartTheme();
  887. this.registerShape();
  888. }
  889. !this.echartsDataService && this._isRequestData && this._setEchartOptions(this.dataset, this.datasetOptions, this.options);
  890. this.echartsDataService && this.echartsDataService.setDatasetOptions(this.datasetOptions);
  891. this.echartsDataService && this.dataSeriesCache && this._changeChartData(this.echartsDataService, this.datasetOptions, this.options);
  892. }
  893. },
  894. options: {
  895. handler: function handler(newVal, oldVal) {
  896. if (this.datasetChange && !this.dataSeriesCache) {
  897. return;
  898. }
  899. if (this.dataSeriesCache && JSON.stringify(this.dataSeriesCache) !== '{}') {
  900. this.echartOptions = this._optionsHandler(this.options, this.dataSeriesCache);
  901. } else {
  902. this.echartOptions = Object.assign({}, this.options);
  903. }
  904. },
  905. deep: true
  906. },
  907. autoresize: function autoresize() {
  908. if (this.autoresize) {
  909. (0, _resizeDetector.addListener)(this.$el, this.__resizeHandler);
  910. } else {
  911. (0, _resizeDetector.removeListener)(this.$el, this.__resizeHandler);
  912. }
  913. },
  914. // 以下为echart的配置参数
  915. width: function width() {
  916. return this.smChart && this.smChart.width;
  917. },
  918. height: function height() {
  919. return this.smChart && this.smChart.height;
  920. },
  921. computedOptions: function computedOptions() {
  922. return this.smChart && this.smChart.computedOptions;
  923. },
  924. autoPlay: function autoPlay() {
  925. this._handlePieAutoPlay();
  926. },
  927. associatedMap: function associatedMap() {
  928. if (!this.associatedMap) {
  929. this.clearPopup && this.clearPopup();
  930. }
  931. },
  932. highlightOptions: {
  933. handler: function handler(newVal, oldVal) {
  934. this.setItemStyleColor();
  935. },
  936. deep: true
  937. }
  938. },
  939. created: function created() {
  940. this._setChartTheme(); // // 切换主题
  941. // this.$on('theme-style-changed', () => {
  942. // this._setChartTheme();
  943. // });
  944. this.registerShape();
  945. },
  946. mounted: function mounted() {
  947. // 设置echarts实例
  948. this.smChart = this.$refs[this.chartId]; // 派发echart所有事件
  949. var smChart = this._getEchart();
  950. var self = this;
  951. EVENTS.forEach(function (event) {
  952. smChart.$on(event, function (params) {
  953. if (event === 'click') {
  954. self.handleChartClick(params);
  955. }
  956. self.$emit(event, params);
  957. });
  958. });
  959. this._initAutoResize();
  960. this._initDataZoom();
  961. if (this.options.series && this.options.series[0] && this.options.series[0].customType === 'customRingsSeries') {
  962. this.startEffect();
  963. }
  964. !this._isRequestData && this.autoPlay && this._handlePieAutoPlay(); // 请求数据, 合并echartopiton, 设置echartOptions
  965. this._isRequestData && this._setEchartOptions(this.dataset, this.datasetOptions, this.options);
  966. },
  967. updated: function updated() {
  968. this._handlePieAutoPlay(); // 更新自动播放
  969. },
  970. beforeDestroy: function beforeDestroy() {
  971. clearInterval(this.pieAutoPlay); // clear 自动播放
  972. clearInterval(this.startAngle);
  973. if (this.autoresize) {
  974. (0, _resizeDetector.removeListener)(this.$el, this.__resizeHandler);
  975. }
  976. },
  977. methods: {
  978. _initAutoResize: function _initAutoResize() {
  979. var _this3 = this;
  980. this.__resizeHandler = (0, _debounce.default)(function () {
  981. _this3.resize();
  982. }, 100, {
  983. leading: true
  984. });
  985. if (this.autoresize) {
  986. // @ts-ignore
  987. (0, _resizeDetector.addListener)(this.$el, this.__resizeHandler);
  988. }
  989. },
  990. _initDataZoom: function _initDataZoom() {
  991. var _this4 = this;
  992. this.dataZoomHandler = (0, _debounce.default)(function () {
  993. _this4._dataZoomChanged();
  994. }, 500, {
  995. leading: true
  996. });
  997. },
  998. getStringColor: function getStringColor(color) {
  999. if (color instanceof Object) {
  1000. return ((color.colorStops || [])[0] || {}).color;
  1001. }
  1002. return color;
  1003. },
  1004. setGradientColor: function setGradientColor(color, nextColor) {
  1005. if (typeof color === 'string') {
  1006. return new this.$options.graphic.LinearGradient(0, 0, 0, 1, [{
  1007. offset: 0,
  1008. color: color
  1009. }, {
  1010. offset: 1,
  1011. color: nextColor || color
  1012. }]);
  1013. }
  1014. return color;
  1015. },
  1016. _initAxisLabel: function _initAxisLabel(axisLabel, data, visualMap, series) {
  1017. if (!this.xBar) {
  1018. return;
  1019. }
  1020. var sortSeriesIndex = this.datasetOptions.findIndex(function (item) {
  1021. return item.sort !== 'unsort' && item.rankLabel;
  1022. });
  1023. if (sortSeriesIndex > -1 && axisLabel && data) {
  1024. for (var index = 0, len = data.length, rankIndex = len - 1; index < len; index++, rankIndex--) {
  1025. data[index] = rankIndex < 10 ? "0".concat(rankIndex).concat(data[index]) : "".concat(rankIndex).concat(data[index]);
  1026. }
  1027. var firstVisualMap = visualMap && visualMap.find(function (item) {
  1028. return item.seriesIndex === sortSeriesIndex;
  1029. });
  1030. axisLabel.rich = axisLabel.rich || {};
  1031. axisLabel.rich.default = {
  1032. backgroundColor: this.getStringColor(this.colorGroup[sortSeriesIndex]),
  1033. width: 20,
  1034. height: 20,
  1035. align: 'center',
  1036. borderRadius: 2
  1037. };
  1038. firstVisualMap && firstVisualMap.pieces.map(function (item) {
  1039. axisLabel.rich["".concat(parseInt(item.min), "_").concat(parseInt(item.max))] = {
  1040. backgroundColor: item.color,
  1041. width: 20,
  1042. height: 20,
  1043. align: 'center',
  1044. borderRadius: 2
  1045. };
  1046. });
  1047. var serieData = series && series[sortSeriesIndex].data;
  1048. axisLabel.formatter = function (label, index) {
  1049. var orderNum = parseInt(label.slice(0, 2)) + 1;
  1050. var leftLabel = label.slice(2);
  1051. var labelValue = serieData && +serieData[index];
  1052. if (firstVisualMap) {
  1053. var matchItem = firstVisualMap.pieces.find(function (item) {
  1054. return labelValue >= item.min && labelValue <= item.max;
  1055. });
  1056. if (matchItem) {
  1057. return ["{".concat(parseInt(matchItem.min), "_").concat(parseInt(matchItem.max), "|").concat(orderNum, "} ").concat(leftLabel)].join('\n');
  1058. }
  1059. }
  1060. return ["{default|".concat(orderNum, "} ").concat(leftLabel)].join('\n');
  1061. };
  1062. }
  1063. },
  1064. setItemStyleColor: function setItemStyleColor() {
  1065. var _this5 = this;
  1066. var isSet = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
  1067. var series = arguments.length > 1 ? arguments[1] : undefined;
  1068. var highlightOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.highlightOptions;
  1069. var color = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : this.highlightColor;
  1070. series = series || (0, _lodash4.default)(this.echartOptions && this.echartOptions.series) || [];
  1071. series.forEach(function (serie, seriesIndex) {
  1072. var dataIndexs = highlightOptions.map(function (item) {
  1073. if (item.seriesIndex.includes(seriesIndex)) {
  1074. return item.dataIndex;
  1075. }
  1076. });
  1077. var colors = highlightOptions.map(function (item) {
  1078. if (item.seriesIndex.includes(seriesIndex)) {
  1079. return item.color || color;
  1080. }
  1081. });
  1082. var serieColor = _this5.options.series && _this5.options.series[seriesIndex] && _this5.options.series[seriesIndex].itemStyle && _this5.options.series[seriesIndex].itemStyle.color;
  1083. serie.itemStyle = serie.itemStyle || {
  1084. color: ''
  1085. };
  1086. serie.itemStyle.color = function (_ref) {
  1087. var dataIndex = _ref.dataIndex;
  1088. var index = dataIndexs.indexOf(dataIndex);
  1089. if (index > -1) {
  1090. return colors[index];
  1091. } else if (serie.type === 'pie') {
  1092. var colorGroup = _this5._handlerColorGroup(serie.data.length);
  1093. return colorGroup[dataIndex];
  1094. } else {
  1095. return serieColor;
  1096. }
  1097. };
  1098. });
  1099. isSet && this.$set(this.echartOptions, 'series', series);
  1100. },
  1101. _handlePieAutoPlay: function _handlePieAutoPlay() {
  1102. var seriesType = this._chartOptions.series && this._chartOptions.series[0] && this._chartOptions.series[0].type;
  1103. var echartsNode = this.smChart.chart;
  1104. if (this._chartOptions.legend && this._chartOptions.legend.data && this._chartOptions.legend.data.length && echartsNode && seriesType === 'pie') {
  1105. this.clearPieAutoPlay(echartsNode);
  1106. if (this.autoPlay) {
  1107. this.setPieAutoPlay(echartsNode);
  1108. }
  1109. }
  1110. },
  1111. setPieAutoPlay: function setPieAutoPlay(echartsNode) {
  1112. var _this6 = this;
  1113. var i = -1;
  1114. this.pieAutoPlay = setInterval(function () {
  1115. echartsNode.dispatchAction({
  1116. type: 'downplay',
  1117. seriesIndex: 0,
  1118. dataIndex: i
  1119. });
  1120. i++;
  1121. if (i >= _this6._chartOptions.legend.data.length) {
  1122. i = 0;
  1123. }
  1124. echartsNode.dispatchAction({
  1125. type: 'highlight',
  1126. seriesIndex: 0,
  1127. dataIndex: i
  1128. });
  1129. }, 2000);
  1130. },
  1131. clearPieAutoPlay: function clearPieAutoPlay(echartsNode) {
  1132. clearInterval(this.pieAutoPlay);
  1133. for (var i = 0; i < this._chartOptions.legend.data.length; i++) {
  1134. echartsNode.dispatchAction({
  1135. type: 'downplay',
  1136. seriesIndex: 0,
  1137. dataIndex: i
  1138. });
  1139. }
  1140. },
  1141. timing: function timing() {
  1142. var _this7 = this;
  1143. this.echartsDataService && this.echartsDataService.getDataOption(this.dataset, this.xBar).then(function (options) {
  1144. _this7.hideLoading(); // 缓存dataSeriesCache,请求后格式化成echart的数据
  1145. _this7.dataSeriesCache = Object.assign({}, options);
  1146. _this7.datasetChange = false; // 设置echartOptions
  1147. _this7.echartOptions = _this7._optionsHandler(_this7.options, options);
  1148. });
  1149. },
  1150. // 请求数据,设置echartOptions
  1151. _setEchartOptions: function _setEchartOptions(dataset, datasetOptions, echartOptions) {
  1152. var _this8 = this;
  1153. this.echartsDataService = null;
  1154. this.dataSeriesCache = null;
  1155. if (this.dataset.type !== 'geoJSON') {
  1156. this.showLoading('default', {
  1157. text: this.$t('info.loading'),
  1158. color: this.colorGroupsData[0],
  1159. textColor: this.textColorsData,
  1160. maskColor: 'rgba(0,0,0,0.8)',
  1161. zlevel: 0
  1162. });
  1163. }
  1164. this.echartsDataService = new _EchartsDataService.default(dataset, datasetOptions);
  1165. this.echartsDataService.getDataOption(dataset, this.xBar).then(function (options) {
  1166. _this8.hideLoading(); // 缓存dataSeriesCache,请求后格式化成echart的数据
  1167. _this8.dataSeriesCache = Object.assign({}, options);
  1168. _this8.datasetChange = false; // 设置echartOptions
  1169. _this8.echartOptions = _this8._optionsHandler(echartOptions, options);
  1170. });
  1171. },
  1172. _optionsHandler: function _optionsHandler(options, dataOptions, dataZoomChanged) {
  1173. var _this9 = this;
  1174. dataOptions = dataOptions && (0, _lodash4.default)(dataOptions); // clone 避免引起重复刷新
  1175. options = options && (0, _lodash4.default)(options); // clone 避免引起重复刷新
  1176. var extraSeries = [];
  1177. if (options && options.legend && !options.legend.type) {
  1178. options.legend.type = 'scroll';
  1179. }
  1180. var yAxis = options.yAxis;
  1181. var xAxis = options.xAxis;
  1182. if (xAxis && dataOptions.xAxis) {
  1183. var axis = xAxis;
  1184. var axisData = dataOptions.xAxis[0];
  1185. var type = 'xAxis';
  1186. if (yAxis && yAxis.type === 'category') {
  1187. // 处理条形图
  1188. type = 'yAxis';
  1189. axis = yAxis;
  1190. dataOptions.yAxis = dataOptions.xAxis;
  1191. delete dataOptions.xAxis;
  1192. this._initAxisLabel(yAxis.axisLabel, dataOptions.yAxis[0].data, options.visualMap, dataOptions.series);
  1193. }
  1194. if (dataOptions.series.length === 0) {
  1195. axis = [{}];
  1196. } else if (!Array.isArray(axis)) {
  1197. if (axisData.data && axisData.data.length) {
  1198. axis.data = [];
  1199. }
  1200. axis = [Object.assign({}, axisData, axis)];
  1201. }
  1202. options[type] = axis;
  1203. }
  1204. if (options && options.series && dataOptions.series) {
  1205. if (dataOptions.series.length === 0) {
  1206. options.series = [];
  1207. } else {
  1208. options.series = options.series.map(function (element, index) {
  1209. return Object.assign({}, element, dataOptions.series[index] || {});
  1210. });
  1211. var dataZoom = options.dataZoom && options.dataZoom[0];
  1212. options.series = options.series.map(function (serie, index) {
  1213. var label = serie.label && serie.label.normal;
  1214. if (serie.label) {
  1215. serie.label.normal = _this9._controlLabel(label, serie.maxLabels);
  1216. }
  1217. if (label && label.show && label.smart) {
  1218. label.position = label.position || 'top';
  1219. var data = serie.data;
  1220. var startDataIndex = 0;
  1221. var endDataIndex = data.length - 1;
  1222. if (dataZoom && dataZoom.show !== false) {
  1223. if (dataZoom.start > dataZoom.end) {
  1224. var oldStart = dataZoom.start;
  1225. dataZoom.start = dataZoom.end;
  1226. dataZoom.end = oldStart;
  1227. }
  1228. if (dataZoomChanged) {
  1229. var _ref2 = _this9.smChart.chart.getOption().dataZoom[0] || {},
  1230. startValue = _ref2.startValue,
  1231. endValue = _ref2.endValue;
  1232. startDataIndex = startValue;
  1233. endDataIndex = endValue;
  1234. options.dataZoom = options.dataZoom.map(function (val) {
  1235. if (startValue >= 0 && endValue >= 0) {
  1236. val.startValue = startValue;
  1237. val.endValue = endValue;
  1238. delete val.start;
  1239. delete val.end;
  1240. return val;
  1241. }
  1242. return val;
  1243. });
  1244. } else {
  1245. startDataIndex = Math.floor(dataZoom.start / 100 * data.length);
  1246. endDataIndex = Math.ceil(dataZoom.end / 100 * data.length);
  1247. }
  1248. data = serie.data.slice(startDataIndex, endDataIndex + 1);
  1249. }
  1250. label.formatter = function (_ref3) {
  1251. var dataIndex = _ref3.dataIndex,
  1252. value = _ref3.value;
  1253. var result = '';
  1254. if (dataIndex === startDataIndex || dataIndex === endDataIndex || Math.max.apply(null, data) + '' === value + '') {
  1255. result = value;
  1256. }
  1257. return result;
  1258. };
  1259. } else if (serie && serie.type !== 'pie' && serie.type !== 'radar') {
  1260. var colorGroup = (0, _chart.getMultiColorGroup)(_this9.colorGroupsData, _this9.colorNumber);
  1261. if (serie.type === '2.5Bar') {
  1262. var shape = serie.shape;
  1263. var defaultColor = serie.itemStyle && serie.itemStyle.color;
  1264. if (['square', 'rectangle'].includes(shape)) {
  1265. var cubeType = shape;
  1266. serie.type = 'custom';
  1267. dataOptions.series[index] && (dataOptions.series[index].type = 'custom');
  1268. var _this = _this9;
  1269. serie.renderItem = function (params, api) {
  1270. var location = api.coord([api.value(0), api.value(1)]);
  1271. var fillColor = defaultColor || colorGroup[params.seriesIndex];
  1272. if (_this.highlightOptions) {
  1273. var matchData = _this.highlightOptions.find(function (item) {
  1274. return item.seriesIndex.includes(params.seriesIndex) && item.dataIndex === params.dataIndex;
  1275. });
  1276. if (matchData && (matchData.color || _this.highlightColor)) {
  1277. fillColor = matchData.color || _this.highlightColor;
  1278. }
  1279. }
  1280. var leftColor, rightColor, topColor;
  1281. if ((0, _typeof2.default)(fillColor) === 'object') {
  1282. var copyLeftColor = (0, _lodash4.default)(fillColor);
  1283. var copyRightColor = (0, _lodash4.default)(fillColor);
  1284. var copyTopColor = (0, _lodash4.default)(fillColor);
  1285. copyLeftColor.colorStops[0].color = (0, _util.getColorWithOpacity)(copyLeftColor.colorStops[0].color, 0.4);
  1286. copyLeftColor.colorStops[1].color = (0, _util.getColorWithOpacity)(copyLeftColor.colorStops[1].color, 0.4);
  1287. copyRightColor.colorStops[0].color = (0, _util.getColorWithOpacity)(copyRightColor.colorStops[0].color, 0.7);
  1288. copyRightColor.colorStops[1].color = (0, _util.getColorWithOpacity)(copyRightColor.colorStops[1].color, 0.7);
  1289. copyTopColor.colorStops[0].color = (0, _util.getColorWithOpacity)(copyTopColor.colorStops[0].color, 0.85);
  1290. copyTopColor.colorStops[1].color = (0, _util.getColorWithOpacity)(copyTopColor.colorStops[1].color, 0.85);
  1291. leftColor = copyLeftColor;
  1292. rightColor = copyRightColor;
  1293. topColor = copyTopColor;
  1294. } else {
  1295. leftColor = (0, _util.getColorWithOpacity)(fillColor, 0.4);
  1296. rightColor = (0, _util.getColorWithOpacity)(fillColor, 0.7);
  1297. topColor = (0, _util.getColorWithOpacity)(fillColor, 0.85);
  1298. }
  1299. return {
  1300. type: 'group',
  1301. children: [{
  1302. type: "Cube".concat(cubeType, "Left"),
  1303. shape: {
  1304. api: api,
  1305. xValue: api.value(0),
  1306. yValue: api.value(1),
  1307. x: location[0],
  1308. y: location[1],
  1309. xAxisPoint: api.coord([api.value(0), 0])
  1310. },
  1311. style: {
  1312. fill: leftColor
  1313. }
  1314. }, {
  1315. type: "Cube".concat(cubeType, "Right"),
  1316. shape: {
  1317. api: api,
  1318. xValue: api.value(0),
  1319. yValue: api.value(1),
  1320. x: location[0],
  1321. y: location[1],
  1322. xAxisPoint: api.coord([api.value(0), 0])
  1323. },
  1324. style: {
  1325. fill: rightColor
  1326. }
  1327. }, {
  1328. type: "Cube".concat(cubeType, "Top"),
  1329. shape: {
  1330. api: api,
  1331. xValue: api.value(0),
  1332. yValue: api.value(1),
  1333. x: location[0],
  1334. y: location[1],
  1335. xAxisPoint: api.coord([api.value(0), 0])
  1336. },
  1337. style: {
  1338. fill: topColor
  1339. }
  1340. }]
  1341. };
  1342. };
  1343. } else if (shape === 'cylinder') {
  1344. var baseWidth = '100%';
  1345. var nextSerieDatas = dataOptions.series[index + 1] && dataOptions.series[index + 1].data;
  1346. serie.type = 'bar';
  1347. serie.barGap = '-100%';
  1348. options.tooltip.trigger === 'axis' && (options.tooltip.trigger = 'item');
  1349. dataOptions.series[index] && (dataOptions.series[index].type = 'bar');
  1350. var cirCleColor = defaultColor || colorGroup[index];
  1351. if (typeof cirCleColor === 'string') {
  1352. cirCleColor = _this9.setGradientColor(cirCleColor, '#fff');
  1353. }
  1354. extraSeries.push( // 头部的圆片
  1355. {
  1356. name: '',
  1357. type: 'pictorialBar',
  1358. symbolOffset: [0, -8],
  1359. symbolPosition: 'end',
  1360. z: 12,
  1361. itemStyle: {
  1362. normal: {
  1363. color: cirCleColor
  1364. }
  1365. },
  1366. data: dataOptions.series[index].data.map(function (item, dataIndex) {
  1367. return {
  1368. value: item,
  1369. symbolSize: !nextSerieDatas || nextSerieDatas[dataIndex] && +item >= +nextSerieDatas[dataIndex] ? [baseWidth, 15] : [0, 15]
  1370. };
  1371. })
  1372. }, {
  1373. // 底部的圆片
  1374. name: '',
  1375. type: 'pictorialBar',
  1376. symbolSize: [baseWidth, 10],
  1377. symbolOffset: [0, 5],
  1378. z: 12,
  1379. itemStyle: {
  1380. normal: {
  1381. color: cirCleColor
  1382. }
  1383. },
  1384. data: dataOptions.series[index].data
  1385. });
  1386. }
  1387. delete serie.shape;
  1388. }
  1389. }
  1390. return serie;
  1391. }); // 玫瑰图多个选中
  1392. if (options.series[0].type === 'pie' && options.series[0].roseType) {
  1393. options.series = options.series.map(function (serie) {
  1394. if (!serie.roseType) {
  1395. serie.roseType = options.series[0].roseType;
  1396. }
  1397. return serie;
  1398. });
  1399. } // pie的图例需要一个扇形是一个图例
  1400. if (options.legend && options.series.length > 0 && options.series[0].type === 'pie') {
  1401. options.legend.data = [];
  1402. options.series.forEach(function (element) {
  1403. if (element.data) {
  1404. var _options$legend$data;
  1405. (_options$legend$data = options.legend.data).push.apply(_options$legend$data, (0, _toConsumableArray2.default)(element.data.map(function (item) {
  1406. return item.name;
  1407. })));
  1408. }
  1409. });
  1410. }
  1411. }
  1412. }
  1413. if (options && options.radar && dataOptions.radar) {
  1414. options.radar.indicator = Object.assign({}, dataOptions.radar.indicator || {});
  1415. }
  1416. var series = dataOptions.series;
  1417. if (series && series.length && series[0].type === 'pie') {
  1418. this.setItemStyleColor(false, series);
  1419. }
  1420. if (this.highlightOptions && this.highlightOptions.length > 0) {
  1421. this.setItemStyleColor(true, series);
  1422. }
  1423. dataOptions.series = this._createRingShineSeries(series, options.series);
  1424. var mergeOptions = (0, _lodash2.default)(options, dataOptions);
  1425. if (extraSeries.length > 0) {
  1426. var _mergeOptions$series;
  1427. (_mergeOptions$series = mergeOptions.series).push.apply(_mergeOptions$series, extraSeries);
  1428. }
  1429. return mergeOptions;
  1430. },
  1431. _createRingShineSeries: function _createRingShineSeries(series, optionsSeries) {
  1432. var _this10 = this;
  1433. if (optionsSeries) {
  1434. this.datasetOptions.forEach(function (datasetOption, index) {
  1435. var _ref4 = optionsSeries[index] || {},
  1436. type = _ref4.type,
  1437. outerGap = _ref4.outerGap,
  1438. isShine = _ref4.isShine;
  1439. if (type === 'pie' && outerGap >= 0) {
  1440. var data = series[index].data.map(function (val) {
  1441. return val.value;
  1442. });
  1443. outerGap = outerGap || Math.min.apply(null, data) / 5;
  1444. series[index].data = _this10._createRingShineDataOption(series[index].data, outerGap, isShine);
  1445. delete optionsSeries[index].outerGap;
  1446. delete optionsSeries[index].isShine;
  1447. }
  1448. });
  1449. }
  1450. return series;
  1451. },
  1452. _createRingShineDataOption: function _createRingShineDataOption(data, outerGap, isShine) {
  1453. if (!data) {
  1454. return;
  1455. }
  1456. var colors = this._handlerColorGroup(data.length);
  1457. var gapItem = {
  1458. value: outerGap,
  1459. name: '',
  1460. itemStyle: {
  1461. normal: {
  1462. label: {
  1463. show: false
  1464. },
  1465. labelLine: {
  1466. show: false
  1467. },
  1468. color: 'rgba(0, 0, 0, 0)',
  1469. borderColor: 'rgba(0, 0, 0, 0)',
  1470. borderWidth: 0
  1471. }
  1472. }
  1473. };
  1474. var result = [];
  1475. for (var i = 0; i < data.length; i++) {
  1476. var dataItem = {
  1477. value: data[i].value,
  1478. name: data[i].name
  1479. };
  1480. if (isShine) {
  1481. dataItem.itemStyle = {
  1482. normal: {
  1483. borderWidth: 5,
  1484. shadowBlur: 10,
  1485. color: colors[i],
  1486. borderColor: colors[i],
  1487. shadowColor: colors[i]
  1488. }
  1489. };
  1490. }
  1491. result.push(dataItem);
  1492. if (data.length > 1) {
  1493. result.push(gapItem);
  1494. }
  1495. }
  1496. return result;
  1497. },
  1498. _handlerColorGroup: function _handlerColorGroup(serielDataLength) {
  1499. if ((0, _typeof2.default)(this.colorGroupsData[0]) === 'object') {
  1500. return (0, _chart.handleMultiGradient)(this.colorGroupsData, serielDataLength);
  1501. } else {
  1502. return SuperMap.ColorsPickerUtil.getGradientColors(this.colorGroupsData, serielDataLength, 'RANGE');
  1503. }
  1504. },
  1505. // 控制label显示条数
  1506. _controlLabel: function _controlLabel(normalLabel, maxLabels) {
  1507. if (normalLabel && normalLabel.show && maxLabels) {
  1508. var endNormalLabel = (0, _lodash4.default)(normalLabel);
  1509. var formatMode;
  1510. if (endNormalLabel.formatter && typeof endNormalLabel.formatter === 'string') {
  1511. formatMode = endNormalLabel.formatter;
  1512. }
  1513. endNormalLabel.formatter = function (_ref5) {
  1514. var dataIndex = _ref5.dataIndex,
  1515. value = _ref5.value,
  1516. name = _ref5.name,
  1517. percent = _ref5.percent;
  1518. var FORMATTER_MAP = {
  1519. '{b}: {c}': "".concat(name, ": ").concat(value),
  1520. '{b}': "".concat(name),
  1521. '{c}': "".concat(value),
  1522. '{d}%': "".concat(percent, "%")
  1523. };
  1524. var result = '';
  1525. if (dataIndex < maxLabels) {
  1526. result = FORMATTER_MAP[formatMode || '{c}'];
  1527. }
  1528. return result;
  1529. };
  1530. return endNormalLabel;
  1531. }
  1532. return normalLabel;
  1533. },
  1534. // 当datasetUrl不变,datasetOptions改变时
  1535. _changeChartData: function _changeChartData(echartsDataService, datasetOptions, echartOptions) {
  1536. var options;
  1537. options = echartsDataService.formatChartData(datasetOptions, this.xBar); // 缓存dataSeriesCache,格式化成echart的数据
  1538. this.dataSeriesCache = Object.assign({}, options); // 设置echartOptions
  1539. this.echartOptions = this._optionsHandler(echartOptions, options);
  1540. },
  1541. _setChartTheme: function _setChartTheme() {
  1542. if (!this.theme) {
  1543. var colorNumber = this.colorNumber;
  1544. this.chartTheme = (0, _chart.chartThemeUtil)(this.backgroundData, this.textColorsData, this.colorGroupsData, colorNumber);
  1545. }
  1546. },
  1547. // 获取echart实例
  1548. _getEchart: function _getEchart() {
  1549. return this.smChart;
  1550. },
  1551. // 以下全是同名调用echart的方法
  1552. /**
  1553. * 提供了一个更贴切的名称来描述 setOption 方法的实际行为。
  1554. * @param {Object} options - 图表的配置项和数据
  1555. * @param {Boolean} [notMerge = false] - 可选,是否不跟之前设置的 option 进行合并,默认为 false,即合并
  1556. * @param {Boolean} [lazyUpdate = false] - 可选,阻止调用 setOption 时抛出事件,默认为 false,即抛出事件
  1557. */
  1558. mergeOptions: function mergeOptions(options, notMerge, lazyUpdate) {
  1559. this._delegateMethod('mergeOptions', options, notMerge, lazyUpdate);
  1560. },
  1561. /**
  1562. * 此接口用于,在大数据量(百万以上)的渲染场景,分片加载数据和增量渲染。
  1563. * @param {Object} params - 数据配置
  1564. */
  1565. appendData: function appendData(params) {
  1566. this._delegateMethod('appendData', params);
  1567. },
  1568. /**
  1569. * 此接口用于,改变图表尺寸,在容器大小发生改变时需要手动调用。
  1570. * @param {Object} [options] - options可缺省。有下面几个可选项:width, height, silent
  1571. */
  1572. resize: function resize(options) {
  1573. this._delegateMethod('resize', options);
  1574. },
  1575. /**
  1576. * 此接口用于,触发图表行为。
  1577. * @param {Object} payload - 参数可以通过batch属性同时触发多个行为。
  1578. */
  1579. dispatchAction: function dispatchAction(payload) {
  1580. this._delegateMethod('dispatchAction', payload);
  1581. },
  1582. /**
  1583. * 此接口用于,转换坐标系上的点到像素坐标值。
  1584. * @param {Object} finder - 用于指示『在哪个坐标系或者系列上判断』。
  1585. * @param {Array|string} value - 要被转换的值。
  1586. */
  1587. convertToPixel: function convertToPixel(finder, value) {
  1588. return this._delegateMethod('convertToPixel', finder, value);
  1589. },
  1590. /**
  1591. * 此接口用于,转换像素坐标值到逻辑坐标系上的点。是 convertToPixel 的逆运算。
  1592. * @param {Object} finder - 用于指示『在哪个坐标系或者系列上判断』。
  1593. * @param {Array|string} value - 要被转换的值。
  1594. */
  1595. convertFromPixel: function convertFromPixel(finder, value) {
  1596. return this._delegateMethod('convertFromPixel', finder, value);
  1597. },
  1598. /**
  1599. * 此接口用于,判断给定的点是否在指定的坐标系或者系列上。
  1600. * @param {Object} finder - 用于指示『在哪个坐标系或者系列上判断』。
  1601. * @param {Array} value - 要被判断的点。
  1602. */
  1603. containPixel: function containPixel(finder, value) {
  1604. return this._delegateMethod('containPixel', finder, value);
  1605. },
  1606. /**
  1607. * 此接口用于,显示加载动画效果。可以在加载数据前手动调用该接口显示加载动画,在数据加载完成后调用 hideLoading 隐藏加载动画。
  1608. * @param {Object} [type] - 可选,加载动画类型,目前只有一种'default'。
  1609. * @param {Object} [options] - 可选,加载动画配置项,跟type有关。
  1610. */
  1611. showLoading: function showLoading(type, options) {
  1612. this._delegateMethod('showLoading', type, options);
  1613. },
  1614. /**
  1615. * 此接口用于,隐藏动画加载效果。
  1616. */
  1617. hideLoading: function hideLoading() {
  1618. this._delegateMethod('hideLoading');
  1619. },
  1620. /**
  1621. * 此接口用于,导出图表图片,返回一个 base64 的 URL,可以设置为Image的src。
  1622. * @param {Object} options - 导出配置
  1623. */
  1624. getDataURL: function getDataURL(options) {
  1625. return this._delegateMethod('getDataURL', options);
  1626. },
  1627. /**
  1628. * 此接口用于,导出联动的图表图片,返回一个 base64 的 url,可以设置为Image的src。导出图片中每个图表的相对位置跟容器的相对位置有关。
  1629. * @param {Object} options - 导出配置
  1630. */
  1631. getConnectedDataURL: function getConnectedDataURL(options) {
  1632. return this._delegateMethod('getConnectedDataURL', options);
  1633. },
  1634. /**
  1635. * 此接口用于,清空当前实例,会移除实例中所有的组件和图表。清空后调用 getOption 方法返回一个{}空对象。
  1636. */
  1637. clear: function clear() {
  1638. this._delegateMethod('clear');
  1639. },
  1640. /**
  1641. * 此接口用于,销毁实例,销毁后实例无法再被使用。
  1642. */
  1643. dispose: function dispose() {
  1644. this._delegateMethod('dispose');
  1645. },
  1646. // 内部调用的方法
  1647. _delegateMethod: function _delegateMethod(name) {
  1648. var _this$smChart;
  1649. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  1650. args[_key - 1] = arguments[_key];
  1651. }
  1652. return (_this$smChart = this.smChart)[name].apply(_this$smChart, args);
  1653. },
  1654. unSupportedFeatureTip: function unSupportedFeatureTip() {
  1655. this.$message.destroy();
  1656. this.$message.warning(this.$t('chart.unSupportedData'));
  1657. },
  1658. handleChartClick: function handleChartClick(params) {
  1659. if (this.associatedMap) {
  1660. var dataIndex = params.dataIndex;
  1661. var features = [];
  1662. if (this.echartsDataService && this.echartsDataService.sortDataCache) {
  1663. features = this.echartsDataService.sortDataCache.features || features;
  1664. }
  1665. var selectedFeature = features[dataIndex];
  1666. this.showDetailInfo(selectedFeature);
  1667. }
  1668. },
  1669. showDetailInfo: function showDetailInfo(feature) {
  1670. var _this11 = this;
  1671. var coordinates = ((feature || {}).geometry || {}).coordinates;
  1672. var hasCoordinates = coordinates && !!coordinates.length;
  1673. if (hasCoordinates && this.viewModel) {
  1674. var properties = feature.properties || {};
  1675. var _coordinates = (0, _util.getFeatureCenter)(feature);
  1676. var propsData = this.generateTableData(properties);
  1677. this.tablePopupProps = _objectSpread({}, propsData);
  1678. this.$nextTick(function () {
  1679. _this11.viewModel.setPopupContent(_coordinates, _this11.$refs.chartTablePopup.$el, _this11.changePopupArrowStyle);
  1680. });
  1681. } else {
  1682. var mapNotLoaded = this.mapNotLoadedTip();
  1683. if (mapNotLoaded) {
  1684. return;
  1685. }
  1686. if (!hasCoordinates) {
  1687. this.unSupportedFeatureTip();
  1688. }
  1689. }
  1690. },
  1691. generateTableData: function generateTableData(properties) {
  1692. var propsData = {
  1693. columns: [{
  1694. title: this.$t('search.attribute'),
  1695. dataIndex: 'attribute',
  1696. width: 120
  1697. }, {
  1698. title: this.$t('search.attributeValue'),
  1699. dataIndex: 'attributeValue',
  1700. width: 150
  1701. }],
  1702. data: []
  1703. };
  1704. for (var key in properties) {
  1705. if (key && properties[key]) {
  1706. var dataItem = {};
  1707. dataItem.attribute = key;
  1708. dataItem.attributeValue = properties[key];
  1709. propsData.data.push(dataItem);
  1710. }
  1711. }
  1712. return propsData;
  1713. },
  1714. changePopupArrowStyle: function changePopupArrowStyle() {},
  1715. mapNotLoadedTip: function mapNotLoadedTip() {},
  1716. _dataZoomChanged: function _dataZoomChanged() {
  1717. var flag = false;
  1718. this.options.series && this.options.series.forEach(function (serie, index) {
  1719. var labelConfig = serie.label && serie.label.normal;
  1720. flag = labelConfig.show && labelConfig.smart;
  1721. });
  1722. if (flag) {
  1723. this.echartOptions = this._optionsHandler(this.options, this.dataSeriesCache, true);
  1724. }
  1725. },
  1726. registerShape: function registerShape() {
  1727. var _this12 = this;
  1728. this.datasetOptions && this.options.series && this.datasetOptions.forEach(function (item, index) {
  1729. var graphicIntance = _this12.$options.graphic;
  1730. if (item.seriesType === '2.5Bar') {
  1731. var cubeType = _this12.options.series[index].shape;
  1732. if (graphicIntance.getShapeClass("Cube".concat(cubeType, "Left"))) {
  1733. return;
  1734. }
  1735. var CubeLeft, CubeRight, CubeTop;
  1736. switch (cubeType) {
  1737. case 'square':
  1738. // 绘制左侧面
  1739. CubeLeft = graphicIntance.extendShape({
  1740. shape: {
  1741. x: 0,
  1742. y: 0
  1743. },
  1744. buildPath: function buildPath(ctx, shape) {
  1745. // 会canvas的应该都能看得懂,shape是从custom传入的
  1746. var xAxisPoint = shape.xAxisPoint;
  1747. var c0 = [shape.x, shape.y];
  1748. var c1 = [shape.x - 13, shape.y - 13];
  1749. var c2 = [xAxisPoint[0] - 13, xAxisPoint[1] - 13];
  1750. var c3 = [xAxisPoint[0], xAxisPoint[1]];
  1751. ctx.moveTo(c0[0], c0[1]).lineTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).closePath();
  1752. }
  1753. }); // 绘制右侧面
  1754. CubeRight = graphicIntance.extendShape({
  1755. shape: {
  1756. x: 0,
  1757. y: 0
  1758. },
  1759. buildPath: function buildPath(ctx, shape) {
  1760. var xAxisPoint = shape.xAxisPoint;
  1761. var c1 = [shape.x, shape.y];
  1762. var c2 = [xAxisPoint[0], xAxisPoint[1]];
  1763. var c3 = [xAxisPoint[0] + 18, xAxisPoint[1] - 9];
  1764. var c4 = [shape.x + 18, shape.y - 9];
  1765. ctx.moveTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).lineTo(c4[0], c4[1]).closePath();
  1766. }
  1767. }); // 绘制顶面
  1768. CubeTop = graphicIntance.extendShape({
  1769. shape: {
  1770. x: 0,
  1771. y: 0
  1772. },
  1773. buildPath: function buildPath(ctx, shape) {
  1774. var c1 = [shape.x, shape.y];
  1775. var c2 = [shape.x + 18, shape.y - 9];
  1776. var c3 = [shape.x + 5, shape.y - 22];
  1777. var c4 = [shape.x - 13, shape.y - 13];
  1778. ctx.moveTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).lineTo(c4[0], c4[1]).closePath();
  1779. }
  1780. });
  1781. break;
  1782. case 'rectangle':
  1783. // 绘制左侧面
  1784. CubeLeft = graphicIntance.extendShape({
  1785. shape: {
  1786. x: 0,
  1787. y: 0
  1788. },
  1789. buildPath: function buildPath(ctx, shape) {
  1790. var xAxisPoint = shape.xAxisPoint;
  1791. var c0 = [shape.x, shape.y];
  1792. var c1 = [shape.x - 9, shape.y - 9];
  1793. var c2 = [xAxisPoint[0] - 9, xAxisPoint[1] - 9];
  1794. var c3 = [xAxisPoint[0], xAxisPoint[1]];
  1795. ctx.moveTo(c0[0], c0[1]).lineTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).closePath();
  1796. }
  1797. });
  1798. CubeRight = graphicIntance.extendShape({
  1799. shape: {
  1800. x: 0,
  1801. y: 0
  1802. },
  1803. buildPath: function buildPath(ctx, shape) {
  1804. var xAxisPoint = shape.xAxisPoint;
  1805. var c1 = [shape.x, shape.y];
  1806. var c2 = [xAxisPoint[0], xAxisPoint[1]];
  1807. var c3 = [xAxisPoint[0] + 18, xAxisPoint[1] - 9];
  1808. var c4 = [shape.x + 18, shape.y - 9];
  1809. ctx.moveTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).lineTo(c4[0], c4[1]).closePath();
  1810. }
  1811. });
  1812. CubeTop = graphicIntance.extendShape({
  1813. shape: {
  1814. x: 0,
  1815. y: 0
  1816. },
  1817. buildPath: function buildPath(ctx, shape) {
  1818. var c1 = [shape.x, shape.y];
  1819. var c2 = [shape.x + 18, shape.y - 9];
  1820. var c3 = [shape.x + 9, shape.y - 18];
  1821. var c4 = [shape.x - 9, shape.y - 9];
  1822. ctx.moveTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).lineTo(c4[0], c4[1]).closePath();
  1823. }
  1824. });
  1825. break;
  1826. }
  1827. CubeLeft && graphicIntance.registerShape("Cube".concat(cubeType, "Left"), CubeLeft);
  1828. CubeRight && graphicIntance.registerShape("Cube".concat(cubeType, "Right"), CubeRight);
  1829. CubeTop && graphicIntance.registerShape("Cube".concat(cubeType, "Top"), CubeTop);
  1830. }
  1831. });
  1832. },
  1833. getCirlPoint: function getCirlPoint(x0, y0, r, angle) {
  1834. var x1 = x0 + r * Math.cos(angle * Math.PI / 180);
  1835. var y1 = y0 + r * Math.sin(angle * Math.PI / 180);
  1836. return {
  1837. x: x1,
  1838. y: y1
  1839. };
  1840. },
  1841. spinLine: function spinLine(startAngle, endAngle, angle, effectColor, radius) {
  1842. return function (params, api) {
  1843. return {
  1844. type: 'arc',
  1845. shape: {
  1846. cx: api.getWidth() / 2,
  1847. cy: api.getHeight() / 2,
  1848. r: Math.min(api.getWidth(), api.getHeight()) / 2 * radius,
  1849. startAngle: (startAngle + angle) * Math.PI / 180,
  1850. endAngle: (endAngle + angle) * Math.PI / 180
  1851. },
  1852. style: {
  1853. stroke: effectColor,
  1854. fill: 'transparent',
  1855. lineWidth: 1.5
  1856. },
  1857. silent: true
  1858. };
  1859. };
  1860. },
  1861. spinPoint: function spinPoint(angle, spinAngle, effectColor, radius) {
  1862. var _this13 = this;
  1863. return function (params, api) {
  1864. var x0 = api.getWidth() / 2;
  1865. var y0 = api.getHeight() / 2;
  1866. var r = Math.min(api.getWidth(), api.getHeight()) / 2 * radius;
  1867. var point = _this13.getCirlPoint(x0, y0, r, angle + spinAngle);
  1868. return {
  1869. type: 'circle',
  1870. shape: {
  1871. cx: point.x,
  1872. cy: point.y,
  1873. r: 4
  1874. },
  1875. style: {
  1876. stroke: effectColor,
  1877. fill: effectColor
  1878. },
  1879. silent: true
  1880. };
  1881. };
  1882. },
  1883. customRingsLine: function customRingsLine(startAngle, endAngle, angle, effectColor, effectRadius) {
  1884. var series = {
  1885. name: 'ring0',
  1886. type: 'custom',
  1887. coordinateSystem: 'none',
  1888. renderItem: null,
  1889. data: [0]
  1890. };
  1891. series.renderItem = this.spinLine(startAngle, endAngle, angle, effectColor, effectRadius);
  1892. return series;
  1893. },
  1894. customRingsPoint: function customRingsPoint(startAngle, angle, effectColor, outEffectRadius) {
  1895. var series = {
  1896. name: 'ring4',
  1897. type: 'custom',
  1898. coordinateSystem: 'none',
  1899. renderItem: null,
  1900. data: [0]
  1901. };
  1902. series.renderItem = this.spinPoint(startAngle, angle, effectColor, outEffectRadius);
  1903. return series;
  1904. },
  1905. addEffect: function addEffect(angle) {
  1906. angle = angle || 0;
  1907. var effectColor = this.options.series[0].customOptions.color;
  1908. var effectRadius = this.options.series[0].customOptions.radius;
  1909. var outEffectRadius = effectRadius + 0.1; // customRightBottomLine
  1910. this.customSeries.push(this.customRingsLine(0, 90, angle, effectColor, effectRadius)); // customRightTopLine
  1911. this.customSeries.push(this.customRingsLine(270, 40, -angle, effectColor, outEffectRadius)); // customLeftTopLine
  1912. this.customSeries.push(this.customRingsLine(180, 270, angle, effectColor, effectRadius)); // customLeftBottomLine
  1913. this.customSeries.push(this.customRingsLine(90, 220, -angle, effectColor, outEffectRadius));
  1914. if (this.options.series[0].customOptions.pointState === 'startPoint') {
  1915. this.customSeries.push(this.customRingsPoint(270, -angle, effectColor, outEffectRadius));
  1916. this.customSeries.push(this.customRingsPoint(90, -angle, effectColor, outEffectRadius));
  1917. }
  1918. },
  1919. startEffect: function startEffect() {
  1920. var _this14 = this;
  1921. var angle = 0;
  1922. this.startSpin = setInterval(function () {
  1923. if (!_this14.options.series) {
  1924. return;
  1925. }
  1926. if (_this14.options.series[0].customType === 'customRingsSeries') {
  1927. _this14.customSeries = [];
  1928. angle += 3;
  1929. _this14.addEffect(angle);
  1930. }
  1931. }, 100);
  1932. },
  1933. customRenderItem: function customRenderItem() {}
  1934. },
  1935. // echarts所有静态方法
  1936. /**
  1937. * @function connect
  1938. * 多个图表实例实现联动。
  1939. * @param {string|Array} group - group的id,或者图表实例的数组。
  1940. */
  1941. connect: function connect(group) {
  1942. _vueEcharts.default && _vueEcharts.default.connect(group);
  1943. },
  1944. /**
  1945. * 解除图表实例的联动,如果只需要移除单个实例,可以将通过将该图表实例 group 设为空。
  1946. * @param {string} group - group的id。
  1947. */
  1948. disconnect: function disconnect(group) {
  1949. _vueEcharts.default && _vueEcharts.default.disConnect(group);
  1950. },
  1951. /**
  1952. * 注册可用的地图,必须在包括 geo 组件或者 map 图表类型的时候才能使用。
  1953. * @param {string} mapName - 地图名称,在 geo 组件或者 map 图表类型中设置的 map 对应的就是该值。
  1954. * @param {Object} geoJSON - GeoJson 格式的数据,具体格式见 http://geojson.org/。
  1955. * @param {Object} [specialAreas] - 可选。将地图中的部分区域缩放到合适的位置,可以使得整个地图的显示更加好看。
  1956. */
  1957. registerMap: function registerMap(mapName, geoJSON, specialAreas) {
  1958. _vueEcharts.default && _vueEcharts.default.registerMap(mapName, geoJSON, specialAreas);
  1959. },
  1960. /**
  1961. * 注册主题,用于初始化实例的时候指定。
  1962. * @param {string} name - 主题命名。
  1963. * @param {Object} theme - 主题配置。
  1964. */
  1965. registerTheme: function registerTheme(name, theme) {
  1966. _vueEcharts.default && _vueEcharts.default.registerTheme(name, theme);
  1967. },
  1968. /**
  1969. * @desc 图形相关帮助方法。
  1970. */
  1971. graphic: _vueEcharts.default && _vueEcharts.default.graphic
  1972. };
  1973. exports.default = _default2;
  1974. /***/ }),
  1975. /***/ "0fb2":
  1976. /***/ (function(module, exports, __webpack_require__) {
  1977. "use strict";
  1978. Object.defineProperty(exports, "__esModule", {
  1979. value: true
  1980. });
  1981. exports.default = void 0;
  1982. var _propsBinder = __webpack_require__("efee");
  1983. var _default = {
  1984. props: {
  1985. pane: {
  1986. type: String,
  1987. default: 'overlayPane'
  1988. },
  1989. name: {
  1990. type: String,
  1991. default: undefined
  1992. },
  1993. attribution: {
  1994. type: String,
  1995. default: null
  1996. }
  1997. },
  1998. mounted: function mounted() {
  1999. var _this = this;
  2000. if (this.layer) {
  2001. this.layer.on('add', function (e) {
  2002. _this.$emit('load', e);
  2003. });
  2004. }
  2005. (0, _propsBinder.propsBinder)(this, this.$props);
  2006. }
  2007. };
  2008. exports.default = _default;
  2009. /***/ }),
  2010. /***/ 1:
  2011. /***/ (function(module, exports) {
  2012. /* (ignored) */
  2013. /***/ }),
  2014. /***/ "10ba":
  2015. /***/ (function(module, exports, __webpack_require__) {
  2016. "use strict";
  2017. var _interopRequireDefault = __webpack_require__("8e6d");
  2018. Object.defineProperty(exports, "__esModule", {
  2019. value: true
  2020. });
  2021. exports.default = void 0;
  2022. var _theme = _interopRequireDefault(__webpack_require__("9259"));
  2023. var _util = __webpack_require__("1448");
  2024. //
  2025. //
  2026. //
  2027. //
  2028. //
  2029. //
  2030. //
  2031. //
  2032. //
  2033. //
  2034. //
  2035. //
  2036. //
  2037. var _default2 = {
  2038. name: 'SmTablePopup',
  2039. mixins: [_theme.default],
  2040. props: {
  2041. data: {
  2042. type: Array,
  2043. default: function _default() {
  2044. return [];
  2045. }
  2046. },
  2047. columns: {
  2048. type: Array,
  2049. default: function _default() {
  2050. return [];
  2051. }
  2052. }
  2053. },
  2054. computed: {
  2055. styleObject: function styleObject() {
  2056. return {
  2057. '--table-popup-active-color--text': this.colorGroupsData[0]
  2058. };
  2059. },
  2060. backgroundStyle: function backgroundStyle() {
  2061. return {
  2062. background: this.backgroundData ? (0, _util.getColorWithOpacity)(this.backgroundData, 0.5) : this.backgroundData
  2063. };
  2064. }
  2065. }
  2066. };
  2067. exports.default = _default2;
  2068. /***/ }),
  2069. /***/ "1164":
  2070. /***/ (function(module, exports, __webpack_require__) {
  2071. "use strict";
  2072. Object.defineProperty(exports, "__esModule", { value: true });
  2073. var meta_1 = __webpack_require__("49c0");
  2074. /**
  2075. * Takes a set of features, calculates the bbox of all input features, and returns a bounding box.
  2076. *
  2077. * @name bbox
  2078. * @param {GeoJSON} geojson any GeoJSON object
  2079. * @returns {BBox} bbox extent in [minX, minY, maxX, maxY] order
  2080. * @example
  2081. * var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]]);
  2082. * var bbox = turf.bbox(line);
  2083. * var bboxPolygon = turf.bboxPolygon(bbox);
  2084. *
  2085. * //addToMap
  2086. * var addToMap = [line, bboxPolygon]
  2087. */
  2088. function bbox(geojson) {
  2089. var result = [Infinity, Infinity, -Infinity, -Infinity];
  2090. meta_1.coordEach(geojson, function (coord) {
  2091. if (result[0] > coord[0]) {
  2092. result[0] = coord[0];
  2093. }
  2094. if (result[1] > coord[1]) {
  2095. result[1] = coord[1];
  2096. }
  2097. if (result[2] < coord[0]) {
  2098. result[2] = coord[0];
  2099. }
  2100. if (result[3] < coord[1]) {
  2101. result[3] = coord[1];
  2102. }
  2103. });
  2104. return result;
  2105. }
  2106. exports.default = bbox;
  2107. /***/ }),
  2108. /***/ "11f8":
  2109. /***/ (function(module, exports, __webpack_require__) {
  2110. "use strict";
  2111. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  2112. /**
  2113. * Copyright Marc J. Schmidt. See the LICENSE file at the top-level
  2114. * directory of this distribution and at
  2115. * https://github.com/marcj/css-element-queries/blob/master/LICENSE.
  2116. */
  2117. (function (root, factory) {
  2118. if (true) {
  2119. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__("76b8")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  2120. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  2121. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  2122. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  2123. } else {}
  2124. }(typeof window !== 'undefined' ? window : this, function (ResizeSensor) {
  2125. /**
  2126. *
  2127. * @type {Function}
  2128. * @constructor
  2129. */
  2130. var ElementQueries = function () {
  2131. //<style> element with our dynamically created styles
  2132. var cssStyleElement;
  2133. //all rules found for element queries
  2134. var allQueries = {};
  2135. //association map to identify which selector belongs to a element from the animationstart event.
  2136. var idToSelectorMapping = [];
  2137. /**
  2138. *
  2139. * @param element
  2140. * @returns {Number}
  2141. */
  2142. function getEmSize(element) {
  2143. if (!element) {
  2144. element = document.documentElement;
  2145. }
  2146. var fontSize = window.getComputedStyle(element, null).fontSize;
  2147. return parseFloat(fontSize) || 16;
  2148. }
  2149. /**
  2150. * Get element size
  2151. * @param {HTMLElement} element
  2152. * @returns {Object} {width, height}
  2153. */
  2154. function getElementSize(element) {
  2155. if (!element.getBoundingClientRect) {
  2156. return {
  2157. width: element.offsetWidth,
  2158. height: element.offsetHeight
  2159. }
  2160. }
  2161. var rect = element.getBoundingClientRect();
  2162. return {
  2163. width: Math.round(rect.width),
  2164. height: Math.round(rect.height)
  2165. }
  2166. }
  2167. /**
  2168. *
  2169. * @copyright https://github.com/Mr0grog/element-query/blob/master/LICENSE
  2170. *
  2171. * @param {HTMLElement} element
  2172. * @param {*} value
  2173. * @returns {*}
  2174. */
  2175. function convertToPx(element, value) {
  2176. var numbers = value.split(/\d/);
  2177. var units = numbers[numbers.length - 1];
  2178. value = parseFloat(value);
  2179. switch (units) {
  2180. case "px":
  2181. return value;
  2182. case "em":
  2183. return value * getEmSize(element);
  2184. case "rem":
  2185. return value * getEmSize();
  2186. // Viewport units!
  2187. // According to http://quirksmode.org/mobile/tableViewport.html
  2188. // documentElement.clientWidth/Height gets us the most reliable info
  2189. case "vw":
  2190. return value * document.documentElement.clientWidth / 100;
  2191. case "vh":
  2192. return value * document.documentElement.clientHeight / 100;
  2193. case "vmin":
  2194. case "vmax":
  2195. var vw = document.documentElement.clientWidth / 100;
  2196. var vh = document.documentElement.clientHeight / 100;
  2197. var chooser = Math[units === "vmin" ? "min" : "max"];
  2198. return value * chooser(vw, vh);
  2199. default:
  2200. return value;
  2201. // for now, not supporting physical units (since they are just a set number of px)
  2202. // or ex/ch (getting accurate measurements is hard)
  2203. }
  2204. }
  2205. /**
  2206. *
  2207. * @param {HTMLElement} element
  2208. * @param {String} id
  2209. * @constructor
  2210. */
  2211. function SetupInformation(element, id) {
  2212. this.element = element;
  2213. var key, option, elementSize, value, actualValue, attrValues, attrValue, attrName;
  2214. var attributes = ['min-width', 'min-height', 'max-width', 'max-height'];
  2215. /**
  2216. * Extracts the computed width/height and sets to min/max- attribute.
  2217. */
  2218. this.call = function () {
  2219. // extract current dimensions
  2220. elementSize = getElementSize(this.element);
  2221. attrValues = {};
  2222. for (key in allQueries[id]) {
  2223. if (!allQueries[id].hasOwnProperty(key)) {
  2224. continue;
  2225. }
  2226. option = allQueries[id][key];
  2227. value = convertToPx(this.element, option.value);
  2228. actualValue = option.property === 'width' ? elementSize.width : elementSize.height;
  2229. attrName = option.mode + '-' + option.property;
  2230. attrValue = '';
  2231. if (option.mode === 'min' && actualValue >= value) {
  2232. attrValue += option.value;
  2233. }
  2234. if (option.mode === 'max' && actualValue <= value) {
  2235. attrValue += option.value;
  2236. }
  2237. if (!attrValues[attrName]) attrValues[attrName] = '';
  2238. if (attrValue && -1 === (' ' + attrValues[attrName] + ' ').indexOf(' ' + attrValue + ' ')) {
  2239. attrValues[attrName] += ' ' + attrValue;
  2240. }
  2241. }
  2242. for (var k in attributes) {
  2243. if (!attributes.hasOwnProperty(k)) continue;
  2244. if (attrValues[attributes[k]]) {
  2245. this.element.setAttribute(attributes[k], attrValues[attributes[k]].substr(1));
  2246. } else {
  2247. this.element.removeAttribute(attributes[k]);
  2248. }
  2249. }
  2250. };
  2251. }
  2252. /**
  2253. * @param {HTMLElement} element
  2254. * @param {Object} id
  2255. */
  2256. function setupElement(element, id) {
  2257. if (!element.elementQueriesSetupInformation) {
  2258. element.elementQueriesSetupInformation = new SetupInformation(element, id);
  2259. }
  2260. if (!element.elementQueriesSensor) {
  2261. element.elementQueriesSensor = new ResizeSensor(element, function () {
  2262. element.elementQueriesSetupInformation.call();
  2263. });
  2264. }
  2265. }
  2266. /**
  2267. * Stores rules to the selector that should be applied once resized.
  2268. *
  2269. * @param {String} selector
  2270. * @param {String} mode min|max
  2271. * @param {String} property width|height
  2272. * @param {String} value
  2273. */
  2274. function queueQuery(selector, mode, property, value) {
  2275. if (typeof(allQueries[selector]) === 'undefined') {
  2276. allQueries[selector] = [];
  2277. // add animation to trigger animationstart event, so we know exactly when a element appears in the DOM
  2278. var id = idToSelectorMapping.length;
  2279. cssStyleElement.innerHTML += '\n' + selector + ' {animation: 0.1s element-queries;}';
  2280. cssStyleElement.innerHTML += '\n' + selector + ' > .resize-sensor {min-width: '+id+'px;}';
  2281. idToSelectorMapping.push(selector);
  2282. }
  2283. allQueries[selector].push({
  2284. mode: mode,
  2285. property: property,
  2286. value: value
  2287. });
  2288. }
  2289. function getQuery(container) {
  2290. var query;
  2291. if (document.querySelectorAll) query = (container) ? container.querySelectorAll.bind(container) : document.querySelectorAll.bind(document);
  2292. if (!query && 'undefined' !== typeof $$) query = $$;
  2293. if (!query && 'undefined' !== typeof jQuery) query = jQuery;
  2294. if (!query) {
  2295. throw 'No document.querySelectorAll, jQuery or Mootools\'s $$ found.';
  2296. }
  2297. return query;
  2298. }
  2299. /**
  2300. * If animationStart didn't catch a new element in the DOM, we can manually search for it
  2301. */
  2302. function findElementQueriesElements(container) {
  2303. var query = getQuery(container);
  2304. for (var selector in allQueries) if (allQueries.hasOwnProperty(selector)) {
  2305. // find all elements based on the extract query selector from the element query rule
  2306. var elements = query(selector, container);
  2307. for (var i = 0, j = elements.length; i < j; i++) {
  2308. setupElement(elements[i], selector);
  2309. }
  2310. }
  2311. }
  2312. /**
  2313. *
  2314. * @param {HTMLElement} element
  2315. */
  2316. function attachResponsiveImage(element) {
  2317. var children = [];
  2318. var rules = [];
  2319. var sources = [];
  2320. var defaultImageId = 0;
  2321. var lastActiveImage = -1;
  2322. var loadedImages = [];
  2323. for (var i in element.children) {
  2324. if (!element.children.hasOwnProperty(i)) continue;
  2325. if (element.children[i].tagName && element.children[i].tagName.toLowerCase() === 'img') {
  2326. children.push(element.children[i]);
  2327. var minWidth = element.children[i].getAttribute('min-width') || element.children[i].getAttribute('data-min-width');
  2328. //var minHeight = element.children[i].getAttribute('min-height') || element.children[i].getAttribute('data-min-height');
  2329. var src = element.children[i].getAttribute('data-src') || element.children[i].getAttribute('url');
  2330. sources.push(src);
  2331. var rule = {
  2332. minWidth: minWidth
  2333. };
  2334. rules.push(rule);
  2335. if (!minWidth) {
  2336. defaultImageId = children.length - 1;
  2337. element.children[i].style.display = 'block';
  2338. } else {
  2339. element.children[i].style.display = 'none';
  2340. }
  2341. }
  2342. }
  2343. lastActiveImage = defaultImageId;
  2344. function check() {
  2345. var imageToDisplay = false, i;
  2346. for (i in children) {
  2347. if (!children.hasOwnProperty(i)) continue;
  2348. if (rules[i].minWidth) {
  2349. if (element.offsetWidth > rules[i].minWidth) {
  2350. imageToDisplay = i;
  2351. }
  2352. }
  2353. }
  2354. if (!imageToDisplay) {
  2355. //no rule matched, show default
  2356. imageToDisplay = defaultImageId;
  2357. }
  2358. if (lastActiveImage !== imageToDisplay) {
  2359. //image change
  2360. if (!loadedImages[imageToDisplay]) {
  2361. //image has not been loaded yet, we need to load the image first in memory to prevent flash of
  2362. //no content
  2363. var image = new Image();
  2364. image.onload = function () {
  2365. children[imageToDisplay].src = sources[imageToDisplay];
  2366. children[lastActiveImage].style.display = 'none';
  2367. children[imageToDisplay].style.display = 'block';
  2368. loadedImages[imageToDisplay] = true;
  2369. lastActiveImage = imageToDisplay;
  2370. };
  2371. image.src = sources[imageToDisplay];
  2372. } else {
  2373. children[lastActiveImage].style.display = 'none';
  2374. children[imageToDisplay].style.display = 'block';
  2375. lastActiveImage = imageToDisplay;
  2376. }
  2377. } else {
  2378. //make sure for initial check call the .src is set correctly
  2379. children[imageToDisplay].src = sources[imageToDisplay];
  2380. }
  2381. }
  2382. element.resizeSensorInstance = new ResizeSensor(element, check);
  2383. check();
  2384. }
  2385. function findResponsiveImages() {
  2386. var query = getQuery();
  2387. var elements = query('[data-responsive-image],[responsive-image]');
  2388. for (var i = 0, j = elements.length; i < j; i++) {
  2389. attachResponsiveImage(elements[i]);
  2390. }
  2391. }
  2392. var regex = /,?[\s\t]*([^,\n]*?)((?:\[[\s\t]*?(?:min|max)-(?:width|height)[\s\t]*?[~$\^]?=[\s\t]*?"[^"]*?"[\s\t]*?])+)([^,\n\s\{]*)/mgi;
  2393. var attrRegex = /\[[\s\t]*?(min|max)-(width|height)[\s\t]*?[~$\^]?=[\s\t]*?"([^"]*?)"[\s\t]*?]/mgi;
  2394. /**
  2395. * @param {String} css
  2396. */
  2397. function extractQuery(css) {
  2398. var match, smatch, attrs, attrMatch;
  2399. css = css.replace(/'/g, '"');
  2400. while (null !== (match = regex.exec(css))) {
  2401. smatch = match[1] + match[3];
  2402. attrs = match[2];
  2403. while (null !== (attrMatch = attrRegex.exec(attrs))) {
  2404. queueQuery(smatch, attrMatch[1], attrMatch[2], attrMatch[3]);
  2405. }
  2406. }
  2407. }
  2408. /**
  2409. * @param {CssRule[]|String} rules
  2410. */
  2411. function readRules(rules) {
  2412. var selector = '';
  2413. if (!rules) {
  2414. return;
  2415. }
  2416. if ('string' === typeof rules) {
  2417. rules = rules.toLowerCase();
  2418. if (-1 !== rules.indexOf('min-width') || -1 !== rules.indexOf('max-width')) {
  2419. extractQuery(rules);
  2420. }
  2421. } else {
  2422. for (var i = 0, j = rules.length; i < j; i++) {
  2423. if (1 === rules[i].type) {
  2424. selector = rules[i].selectorText || rules[i].cssText;
  2425. if (-1 !== selector.indexOf('min-height') || -1 !== selector.indexOf('max-height')) {
  2426. extractQuery(selector);
  2427. } else if (-1 !== selector.indexOf('min-width') || -1 !== selector.indexOf('max-width')) {
  2428. extractQuery(selector);
  2429. }
  2430. } else if (4 === rules[i].type) {
  2431. readRules(rules[i].cssRules || rules[i].rules);
  2432. } else if (3 === rules[i].type) {
  2433. if(rules[i].styleSheet.hasOwnProperty("cssRules")) {
  2434. readRules(rules[i].styleSheet.cssRules);
  2435. }
  2436. }
  2437. }
  2438. }
  2439. }
  2440. var defaultCssInjected = false;
  2441. /**
  2442. * Searches all css rules and setups the event listener to all elements with element query rules..
  2443. */
  2444. this.init = function () {
  2445. var animationStart = 'animationstart';
  2446. if (typeof document.documentElement.style['webkitAnimationName'] !== 'undefined') {
  2447. animationStart = 'webkitAnimationStart';
  2448. } else if (typeof document.documentElement.style['MozAnimationName'] !== 'undefined') {
  2449. animationStart = 'mozanimationstart';
  2450. } else if (typeof document.documentElement.style['OAnimationName'] !== 'undefined') {
  2451. animationStart = 'oanimationstart';
  2452. }
  2453. document.body.addEventListener(animationStart, function (e) {
  2454. var element = e.target;
  2455. var styles = element && window.getComputedStyle(element, null);
  2456. var animationName = styles && styles.getPropertyValue('animation-name');
  2457. var requiresSetup = animationName && (-1 !== animationName.indexOf('element-queries'));
  2458. if (requiresSetup) {
  2459. element.elementQueriesSensor = new ResizeSensor(element, function () {
  2460. if (element.elementQueriesSetupInformation) {
  2461. element.elementQueriesSetupInformation.call();
  2462. }
  2463. });
  2464. var sensorStyles = window.getComputedStyle(element.resizeSensor, null);
  2465. var id = sensorStyles.getPropertyValue('min-width');
  2466. id = parseInt(id.replace('px', ''));
  2467. setupElement(e.target, idToSelectorMapping[id]);
  2468. }
  2469. });
  2470. if (!defaultCssInjected) {
  2471. cssStyleElement = document.createElement('style');
  2472. cssStyleElement.type = 'text/css';
  2473. cssStyleElement.innerHTML = '[responsive-image] > img, [data-responsive-image] {overflow: hidden; padding: 0; } [responsive-image] > img, [data-responsive-image] > img {width: 100%;}';
  2474. //safari wants at least one rule in keyframes to start working
  2475. cssStyleElement.innerHTML += '\n@keyframes element-queries { 0% { visibility: inherit; } }';
  2476. document.getElementsByTagName('head')[0].appendChild(cssStyleElement);
  2477. defaultCssInjected = true;
  2478. }
  2479. for (var i = 0, j = document.styleSheets.length; i < j; i++) {
  2480. try {
  2481. if (document.styleSheets[i].href && 0 === document.styleSheets[i].href.indexOf('file://')) {
  2482. console.warn("CssElementQueries: unable to parse local css files, " + document.styleSheets[i].href);
  2483. }
  2484. readRules(document.styleSheets[i].cssRules || document.styleSheets[i].rules || document.styleSheets[i].cssText);
  2485. } catch (e) {
  2486. }
  2487. }
  2488. findResponsiveImages();
  2489. };
  2490. /**
  2491. * Go through all collected rules (readRules()) and attach the resize-listener.
  2492. * Not necessary to call it manually, since we detect automatically when new elements
  2493. * are available in the DOM. However, sometimes handy for dirty DOM modifications.
  2494. *
  2495. * @param {HTMLElement} container only elements of the container are considered (document.body if not set)
  2496. */
  2497. this.findElementQueriesElements = function (container) {
  2498. findElementQueriesElements(container);
  2499. };
  2500. this.update = function () {
  2501. this.init();
  2502. };
  2503. };
  2504. ElementQueries.update = function () {
  2505. ElementQueries.instance.update();
  2506. };
  2507. /**
  2508. * Removes all sensor and elementquery information from the element.
  2509. *
  2510. * @param {HTMLElement} element
  2511. */
  2512. ElementQueries.detach = function (element) {
  2513. if (element.elementQueriesSetupInformation) {
  2514. //element queries
  2515. element.elementQueriesSensor.detach();
  2516. delete element.elementQueriesSetupInformation;
  2517. delete element.elementQueriesSensor;
  2518. } else if (element.resizeSensorInstance) {
  2519. //responsive image
  2520. element.resizeSensorInstance.detach();
  2521. delete element.resizeSensorInstance;
  2522. }
  2523. };
  2524. ElementQueries.init = function () {
  2525. if (!ElementQueries.instance) {
  2526. ElementQueries.instance = new ElementQueries();
  2527. }
  2528. ElementQueries.instance.init();
  2529. };
  2530. var domLoaded = function (callback) {
  2531. /* Mozilla, Chrome, Opera */
  2532. if (document.addEventListener) {
  2533. document.addEventListener('DOMContentLoaded', callback, false);
  2534. }
  2535. /* Safari, iCab, Konqueror */
  2536. else if (/KHTML|WebKit|iCab/i.test(navigator.userAgent)) {
  2537. var DOMLoadTimer = setInterval(function () {
  2538. if (/loaded|complete/i.test(document.readyState)) {
  2539. callback();
  2540. clearInterval(DOMLoadTimer);
  2541. }
  2542. }, 10);
  2543. }
  2544. /* Other web browsers */
  2545. else window.onload = callback;
  2546. };
  2547. ElementQueries.findElementQueriesElements = function (container) {
  2548. ElementQueries.instance.findElementQueriesElements(container);
  2549. };
  2550. ElementQueries.listen = function () {
  2551. domLoaded(ElementQueries.init);
  2552. };
  2553. return ElementQueries;
  2554. }));
  2555. /***/ }),
  2556. /***/ "13f5":
  2557. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2558. "use strict";
  2559. __webpack_require__.r(__webpack_exports__);
  2560. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Indicator_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a142");
  2561. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Indicator_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Indicator_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
  2562. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Indicator_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Indicator_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  2563. /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Indicator_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
  2564. /***/ }),
  2565. /***/ "13fc":
  2566. /***/ (function(module, exports, __webpack_require__) {
  2567. "use strict";
  2568. var _interopRequireDefault = __webpack_require__("8e6d");
  2569. Object.defineProperty(exports, "__esModule", {
  2570. value: true
  2571. });
  2572. exports.default = void 0;
  2573. var _mapGetter = _interopRequireDefault(__webpack_require__("2ed5"));
  2574. var _theme = _interopRequireDefault(__webpack_require__("9259"));
  2575. var _IdentifyViewModel = _interopRequireDefault(__webpack_require__("9153"));
  2576. //
  2577. //
  2578. //
  2579. //
  2580. //
  2581. //
  2582. //
  2583. //
  2584. //
  2585. //
  2586. //
  2587. //
  2588. //
  2589. var _default2 = {
  2590. name: 'SmIdentify',
  2591. mixins: [_mapGetter.default, _theme.default],
  2592. props: {
  2593. layerNames: {
  2594. type: Array,
  2595. default: function _default() {
  2596. return [];
  2597. }
  2598. },
  2599. fields: {
  2600. type: Array,
  2601. default: function _default() {
  2602. return [];
  2603. }
  2604. },
  2605. layerStyle: {
  2606. type: Object,
  2607. default: function _default() {
  2608. return {};
  2609. }
  2610. }
  2611. },
  2612. data: function data() {
  2613. return {
  2614. popupProps: {},
  2615. layers: [],
  2616. layerType: false,
  2617. popupLayers: [],
  2618. mapClickPosition: null
  2619. };
  2620. },
  2621. watch: {
  2622. layerNames: function layerNames(val, oldVal) {
  2623. if (val) {
  2624. this.$options.removed.call(this, oldVal);
  2625. this.setLayers();
  2626. }
  2627. },
  2628. backgroundData: function backgroundData() {
  2629. this.changeStyle();
  2630. }
  2631. },
  2632. loaded: function loaded() {
  2633. var _this = this;
  2634. this.setViewModel();
  2635. this.setLayers();
  2636. if (this.layers && this.layers.length > 0) {
  2637. this.layers.forEach(function (layer) {
  2638. var layerType = _this.viewModel.getLayerType(layer);
  2639. _this.bindLayerClick(layer, layerType);
  2640. });
  2641. } // 客户端专题图图层无准确坐标,通过地图坐标来实现
  2642. this.map.on('click', function (e) {
  2643. _this.mapClickPosition = _this.map.layerPointToLatLng(e.layerPoint);
  2644. });
  2645. },
  2646. removed: function removed() {
  2647. var layers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.layers;
  2648. // 清除点击事件和popup
  2649. this.popupLayers && this.popupLayers.forEach(function (layer) {
  2650. layer.closePopup();
  2651. layer.off('click');
  2652. layer.off('popupclose');
  2653. });
  2654. layers && layers.forEach(function (layer) {
  2655. layer.off('click');
  2656. }); // 清除高亮的图层
  2657. this.viewModel && this.viewModel.removed(); // 重置
  2658. this.popupLayers = [];
  2659. this.layers = [];
  2660. },
  2661. beforeDestroy: function beforeDestroy() {
  2662. this.map && this.map.off('click');
  2663. this.$options.removed.call(this);
  2664. },
  2665. methods: {
  2666. setViewModel: function setViewModel() {
  2667. this.viewModel = new _IdentifyViewModel.default(this.map, {
  2668. mapTarget: this.getTargetName(),
  2669. layerNames: this.layerNames,
  2670. layerStyle: this.layerStyle
  2671. });
  2672. },
  2673. // 通过layerName设置layers
  2674. setLayers: function setLayers() {
  2675. var _this2 = this;
  2676. // 重置layers
  2677. this.layers = [];
  2678. this.layerNames.forEach(function (layerName) {
  2679. var layer = _this2.getLayerByName(layerName);
  2680. layer && _this2.layers.push(layer);
  2681. });
  2682. },
  2683. // 通过layerName获取layer
  2684. getLayerByName: function getLayerByName(layerName) {
  2685. var layer = this.viewModel.getLayerByName(layerName);
  2686. if (!layer) {
  2687. this.$message.error(this.$t('identify.layerNotExit', {
  2688. layer: layerName
  2689. }));
  2690. }
  2691. return layer;
  2692. },
  2693. // 给选中图层绑定click
  2694. bindLayerClick: function bindLayerClick(layer, layerType) {
  2695. if (layerType) {
  2696. // 如果是geojson
  2697. this.bindGeojsonLayer(layer);
  2698. } else if (layer.TFEvents) {
  2699. // 如果是客户端专题图
  2700. this.bindThemeLayer(layer);
  2701. } else {
  2702. // 如果是其他的图层(marker,polygon,polyline,隐藏的客户端专题图)
  2703. this.bindOtherLayer(layer);
  2704. }
  2705. },
  2706. // geojsonlayer绑定click事件
  2707. bindGeojsonLayer: function bindGeojsonLayer(geojsonLayer) {
  2708. var _this3 = this;
  2709. geojsonLayer.on('click', function (e) {
  2710. // e.layer是被选中的某个要素
  2711. _this3.bindPopupLayer(e.layer.feature, e.layer, e.latlng);
  2712. });
  2713. },
  2714. // 给客户端专题图绑定click事件
  2715. bindThemeLayer: function bindThemeLayer(themeLayer) {
  2716. var _this4 = this;
  2717. themeLayer.on('click', function (e) {
  2718. if (e.target && e.target.refDataID) {
  2719. var themeFeature = themeLayer.getFeatureById(e.target.refDataID); // 将矢量要素转换成geojson
  2720. var feature = _this4.viewModel.formatGeoJSON(themeFeature); // 因为线坐标等要素不准确,所以用地图的点击的坐标点
  2721. _this4.bindPopupLayer(feature, themeLayer, '');
  2722. }
  2723. });
  2724. },
  2725. // 其他layer(layergroup等)绑定click事件
  2726. bindOtherLayer: function bindOtherLayer(otherLayer) {
  2727. var _this5 = this;
  2728. if (otherLayer._layers) {
  2729. for (var key in otherLayer._layers) {
  2730. var layer = otherLayer._layers[key];
  2731. if (layer.TFEvents) {
  2732. // 说明是客户端专题图
  2733. this.bindThemeLayer(otherLayer._layers[key]);
  2734. } else if (this.viewModel.getLayerType(layer)) {
  2735. this.bindGeojsonLayer(layer);
  2736. } else {
  2737. (function () {
  2738. // 普通图层
  2739. var popupLayer = void 0;
  2740. var feature = void 0;
  2741. layer.on('click', function (e) {
  2742. // geojson点线面图层marker,image-marker、 RANK_SYMBOL:等级符号专题图(返回的是layergroup);
  2743. var coordinates = e.sourceTarget && e.sourceTarget._point && _this5.map.layerPointToLatLng(e.sourceTarget._point) || e.target && e.target._latlng || e.latlng;
  2744. feature = {
  2745. type: 'Feature',
  2746. properties: coordinates,
  2747. geometry: {
  2748. type: 'Point',
  2749. coordinates: [coordinates.lng, coordinates.lat]
  2750. }
  2751. };
  2752. e.sourceTarget.feature = feature;
  2753. popupLayer = e.sourceTarget;
  2754. _this5.bindPopupLayer(feature, popupLayer, e.latlng);
  2755. });
  2756. })();
  2757. }
  2758. }
  2759. }
  2760. },
  2761. // 绑定popup
  2762. bindPopupLayer: function bindPopupLayer(feature, popupLayer, latlng) {
  2763. var _this6 = this;
  2764. if (!feature) {
  2765. return;
  2766. }
  2767. this.filterFeature(feature);
  2768. this.$nextTick(function () {
  2769. // 这个定时器是避免和专题图的点击事件(要清空popup)冲突
  2770. setTimeout(function () {
  2771. var popupDom = _this6.$refs.Popup;
  2772. popupDom.style.display = 'block';
  2773. popupLayer.bindPopup(popupDom); // 定时为了获取最近的一次地图点击事件的坐标mapClickPosition
  2774. popupLayer.openPopup(latlng || _this6.mapClickPosition); // popupclose(点击地图的时候,清除最后一次的高亮)
  2775. popupLayer.on('popupclose', function () {
  2776. return _this6.viewModel.removed();
  2777. });
  2778. if (!popupLayer.feature) {
  2779. popupLayer.feature = feature;
  2780. }
  2781. _this6.viewModel.addOverlayToMap(popupLayer, feature, _this6.layerStyle);
  2782. _this6.popupLayers.push(popupLayer);
  2783. }, 0);
  2784. });
  2785. },
  2786. // 过滤用户传入的字段
  2787. filterFeature: function filterFeature(feature) {
  2788. var _this7 = this;
  2789. // 重置popupProps
  2790. this.popupProps = {};
  2791. if (feature.properties) {
  2792. // 过滤字段
  2793. if (this.fields.length > 0) {
  2794. this.fields.forEach(function (field) {
  2795. if (feature.properties.hasOwnProperty(field)) {
  2796. _this7.popupProps[field] = feature.properties[field];
  2797. }
  2798. });
  2799. } else {
  2800. // 默认是读取layer的全部字段
  2801. this.popupProps = feature.properties;
  2802. }
  2803. }
  2804. },
  2805. // 根据主题改变样式
  2806. changeStyle: function changeStyle() {
  2807. var wrapper = document.querySelector('.leaflet-popup-content-wrapper');
  2808. var tip = document.querySelector('.leaflet-popup-tip');
  2809. wrapper && (wrapper.style.background = this.backgroundData);
  2810. tip && (tip.style.background = this.backgroundData);
  2811. }
  2812. }
  2813. };
  2814. exports.default = _default2;
  2815. /***/ }),
  2816. /***/ "1448":
  2817. /***/ (function(module, exports, __webpack_require__) {
  2818. "use strict";
  2819. var _interopRequireDefault = __webpack_require__("8e6d");
  2820. Object.defineProperty(exports, "__esModule", {
  2821. value: true
  2822. });
  2823. exports.getDateTime = getDateTime;
  2824. exports.hexToRgba = hexToRgba;
  2825. exports.isTransparent = isTransparent;
  2826. exports.reservedDecimal = reservedDecimal;
  2827. exports.clearNumberComma = clearNumberComma;
  2828. exports.isXField = isXField;
  2829. exports.isYField = isYField;
  2830. exports.getColorWithOpacity = getColorWithOpacity;
  2831. exports.parseUrl = parseUrl;
  2832. exports.getDataType = getDataType;
  2833. exports.isMatchUrl = isMatchUrl;
  2834. exports.isDate = isDate;
  2835. exports.isNumber = isNumber;
  2836. exports.getFeatureCenter = getFeatureCenter;
  2837. exports.getValueCaseInsensitive = getValueCaseInsensitive;
  2838. exports.filterInvalidData = filterInvalidData;
  2839. exports.handleWithCredentials = handleWithCredentials;
  2840. var _lang = __webpack_require__("4e21");
  2841. var _colorcolor = _interopRequireDefault(__webpack_require__("4552"));
  2842. var _center = _interopRequireDefault(__webpack_require__("cf46"));
  2843. // 获取当前时间返回置顶格式
  2844. function getDateTime(timeType) {
  2845. return (0, _lang.geti18n)().d(new Date(), timeType.replace(/\+/g, '_'), (0, _lang.getLanguage)());
  2846. } // hex -> rgba
  2847. function hexToRgba(hex, opacity) {
  2848. return 'rgba(' + parseInt('0x' + hex.slice(1, 3)) + ',' + parseInt('0x' + hex.slice(3, 5)) + ',' + parseInt('0x' + hex.slice(5, 7)) + ',' + opacity + ')';
  2849. }
  2850. function isTransparent(color) {
  2851. var rgba = (0, _colorcolor.default)(color, 'rgba');
  2852. return +rgba.match(/(\d(\.\d+)?)+/g)[3] === 0;
  2853. } // 保留指定位数的小数
  2854. function reservedDecimal(val, precise) {
  2855. return Number(val).toFixed(precise);
  2856. } // 清除数字(字符串型的)的逗号
  2857. function clearNumberComma(num) {
  2858. if (num.replace) {
  2859. num = num.replace(/,/g, '');
  2860. }
  2861. return num;
  2862. }
  2863. /**
  2864. * 判断是否地理X坐标
  2865. * @param data
  2866. */
  2867. function isXField(data) {
  2868. var lowerdata = data.toLowerCase();
  2869. return lowerdata === 'x' || lowerdata === 'smx' || lowerdata === 'jd' || lowerdata === '经度' || lowerdata === '东经' || lowerdata === 'longitude' || lowerdata === 'lot' || lowerdata === 'lon' || lowerdata === 'lng' || lowerdata === 'x坐标';
  2870. }
  2871. /**
  2872. * 判断是否地理Y坐标
  2873. * @param data
  2874. */
  2875. function isYField(data) {
  2876. var lowerdata = data.toLowerCase();
  2877. return lowerdata === 'y' || lowerdata === 'smy' || lowerdata === 'wd' || lowerdata === '纬度' || lowerdata === '北纬' || lowerdata === 'latitude' || lowerdata === 'lat' || lowerdata === 'y坐标';
  2878. }
  2879. function getColorWithOpacity(color, opacity) {
  2880. if (color.indexOf('rgba') > -1) {
  2881. return color.substring(0, color.lastIndexOf(',') + 1) + opacity + ')';
  2882. }
  2883. var newColor = (0, _colorcolor.default)(color, 'rgb');
  2884. return 'rgba' + newColor.substring(3, newColor.length - 1) + ",".concat(opacity, ")");
  2885. }
  2886. function parseUrl(url) {
  2887. var urlRe = /^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;
  2888. return url.match(urlRe);
  2889. }
  2890. function getDataType(data) {
  2891. return Object.prototype.toString.call(data);
  2892. } // 判断输入的地址是否符合地址格式
  2893. function isMatchUrl(str) {
  2894. var reg = new RegExp('(https?|http|file|ftp)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]');
  2895. return reg.test(str);
  2896. } // 判断是否为日期
  2897. function isDate(data) {
  2898. var reg = /((^((1[8-9]\d{2})|([2-9]\d{3}))([-\/\._])(10|12|0?[13578])([-\/\._])(3[01]|[12][0-9]|0?[1-9])$)|(^((1[8-9]\d{2})|([2-9]\d{3}))([-\/\._])(11|0?[469])([-\/\._])(30|[12][0-9]|0?[1-9])$)|(^((1[8-9]\d{2})|([2-9]\d{3}))([-\/\._])(0?2)([-\/\._])(2[0-8]|1[0-9]|0?[1-9])$)|(^([2468][048]00)([-\/\._])(0?2)([-\/\._])(29)$)|(^([3579][26]00)([-\/\._])(0?2)([-\/\._])(29)$)|(^([1][89][0][48])([-\/\._])(0?2)([-\/\._])(29)$)|(^([2-9][0-9][0][48])([-\/\._])(0?2)([-\/\._])(29)$)|(^([1][89][2468][048])([-\/\._])(0?2)([-\/\._])(29)$)|(^([2-9][0-9][2468][048])([-\/\._])(0?2)([-\/\._])(29)$)|(^([1][89][13579][26])([-\/\._])(0?2)([-\/\._])(29)$)|(^([2-9][0-9][13579][26])([-\/\._])(0?2)([-\/\._])(29)$))/gi;
  2899. return reg.test(data);
  2900. } // 判断是否为数值
  2901. function isNumber(data) {
  2902. var mdata = Number(data);
  2903. if (mdata === 0) {
  2904. return true;
  2905. }
  2906. return !isNaN(mdata);
  2907. }
  2908. function getFeatureCenter(feature) {
  2909. var coordinates = ((feature || {}).geometry || {}).coordinates;
  2910. var hasCoordinates = coordinates && !!coordinates.length;
  2911. if (!hasCoordinates) {
  2912. return;
  2913. }
  2914. var featureType = feature.geometry.type;
  2915. var center;
  2916. if (featureType === 'LineString') {
  2917. center = coordinates[parseInt(coordinates.length / 2)];
  2918. } else if (featureType === 'MultiLineString') {
  2919. var coord = coordinates[parseInt(coordinates.length / 2)];
  2920. center = coord[parseInt(coord.length / 2)];
  2921. } else {
  2922. center = (0, _center.default)(feature).geometry.coordinates;
  2923. }
  2924. return center;
  2925. }
  2926. function getValueCaseInsensitive(properties, searchKey) {
  2927. var isObj = getDataType(properties) === '[object Object]';
  2928. if (!searchKey || !isObj) {
  2929. return '';
  2930. }
  2931. var lowerSearchKey = searchKey.toLocaleLowerCase();
  2932. for (var key in properties) {
  2933. if (key.toLocaleLowerCase() === lowerSearchKey) {
  2934. return properties[key];
  2935. }
  2936. }
  2937. return '';
  2938. }
  2939. function filterInvalidData(datasetOptions, features) {
  2940. var xFields = datasetOptions.map(function (item) {
  2941. return item.xField;
  2942. });
  2943. var yFields = datasetOptions.map(function (item) {
  2944. return item.yField;
  2945. });
  2946. var nextFeatures = features.filter(function (feature) {
  2947. var matchXField = xFields.find(function (item) {
  2948. return feature.properties.hasOwnProperty(item);
  2949. });
  2950. var matchYField = yFields.find(function (item) {
  2951. return ![undefined, null, ''].includes(feature.properties[item]);
  2952. });
  2953. return !!(matchXField && matchYField);
  2954. });
  2955. return nextFeatures;
  2956. }
  2957. function handleWithCredentials(url, iportalServiceProxyUrl) {
  2958. var defaultValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  2959. if (!iportalServiceProxyUrl) {
  2960. return defaultValue;
  2961. }
  2962. return url.indexOf(iportalServiceProxyUrl) >= 0 || defaultValue;
  2963. }
  2964. /***/ }),
  2965. /***/ "14c7":
  2966. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2967. "use strict";
  2968. __webpack_require__.r(__webpack_exports__);
  2969. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Identify_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("13fc");
  2970. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Identify_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Identify_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
  2971. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Identify_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Identify_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  2972. /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Identify_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
  2973. /***/ }),
  2974. /***/ "14f6":
  2975. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2976. "use strict";
  2977. __webpack_require__.r(__webpack_exports__);
  2978. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_1_1_node_modules_vue_loader_lib_index_js_vue_loader_options_VideoPlayer_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8537");
  2979. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_1_1_node_modules_vue_loader_lib_index_js_vue_loader_options_VideoPlayer_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_1_1_node_modules_vue_loader_lib_index_js_vue_loader_options_VideoPlayer_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__);
  2980. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_1_1_node_modules_vue_loader_lib_index_js_vue_loader_options_VideoPlayer_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_1_1_node_modules_vue_loader_lib_index_js_vue_loader_options_VideoPlayer_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  2981. /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_1_1_node_modules_vue_loader_lib_index_js_vue_loader_options_VideoPlayer_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default.a);
  2982. /***/ }),
  2983. /***/ "1587":
  2984. /***/ (function(module, exports, __webpack_require__) {
  2985. "use strict";
  2986. var _interopRequireDefault = __webpack_require__("8e6d");
  2987. Object.defineProperty(exports, "__esModule", {
  2988. value: true
  2989. });
  2990. exports.default = void 0;
  2991. var _theme = _interopRequireDefault(__webpack_require__("9259"));
  2992. var _util = __webpack_require__("1448");
  2993. //
  2994. //
  2995. //
  2996. //
  2997. //
  2998. //
  2999. //
  3000. //
  3001. //
  3002. //
  3003. //
  3004. //
  3005. //
  3006. var _default = {
  3007. name: 'SmImage',
  3008. mixins: [_theme.default],
  3009. props: {
  3010. src: {
  3011. type: String
  3012. },
  3013. repeat: {
  3014. type: String,
  3015. default: 'center'
  3016. },
  3017. href: {
  3018. type: String,
  3019. default: ''
  3020. },
  3021. target: {
  3022. type: String,
  3023. default: '_self'
  3024. }
  3025. },
  3026. data: function data() {
  3027. return {
  3028. repeatOption: {
  3029. center: {
  3030. backgroundRepeat: 'no-repeat',
  3031. backgroundPosition: 'center',
  3032. backgroundSize: 'contain'
  3033. },
  3034. noRepeat: {
  3035. backgroundSize: '100% 100%',
  3036. backgroundRepeat: 'no-repeat'
  3037. },
  3038. repeatX: {
  3039. backgroundRepeat: 'repeat-x',
  3040. backgroundSize: 'auto 100%'
  3041. },
  3042. repeatY: {
  3043. backgroundRepeat: 'repeat-Y',
  3044. backgroundSize: '100% auto'
  3045. },
  3046. repeatXY: {
  3047. backgroundRepeat: 'repeat',
  3048. backgroundSize: 'auto'
  3049. }
  3050. }
  3051. };
  3052. },
  3053. computed: {
  3054. repeatStyle: function repeatStyle() {
  3055. return this.repeatOption[this.repeat];
  3056. },
  3057. imgUrl: function imgUrl() {
  3058. return {
  3059. backgroundImage: "url(".concat(this.src, ")")
  3060. };
  3061. },
  3062. realHref: function realHref() {
  3063. var href = this.href.replace(/ /g, '');
  3064. if (href && !(0, _util.parseUrl)(href)) {
  3065. return "http://".concat(href);
  3066. }
  3067. return href;
  3068. }
  3069. }
  3070. };
  3071. exports.default = _default;
  3072. /***/ }),
  3073. /***/ "15ad":
  3074. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3075. "use strict";
  3076. __webpack_require__.r(__webpack_exports__);
  3077. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Popup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("aa59");
  3078. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Popup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Popup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
  3079. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Popup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Popup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  3080. /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Popup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
  3081. /***/ }),
  3082. /***/ "16ed":
  3083. /***/ (function(module, exports, __webpack_require__) {
  3084. var _typeof = __webpack_require__("7ae5");
  3085. function _getRequireWildcardCache() {
  3086. if (typeof WeakMap !== "function") return null;
  3087. var cache = new WeakMap();
  3088. _getRequireWildcardCache = function _getRequireWildcardCache() {
  3089. return cache;
  3090. };
  3091. return cache;
  3092. }
  3093. function _interopRequireWildcard(obj) {
  3094. if (obj && obj.__esModule) {
  3095. return obj;
  3096. }
  3097. if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") {
  3098. return {
  3099. "default": obj
  3100. };
  3101. }
  3102. var cache = _getRequireWildcardCache();
  3103. if (cache && cache.has(obj)) {
  3104. return cache.get(obj);
  3105. }
  3106. var newObj = {};
  3107. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  3108. for (var key in obj) {
  3109. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  3110. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  3111. if (desc && (desc.get || desc.set)) {
  3112. Object.defineProperty(newObj, key, desc);
  3113. } else {
  3114. newObj[key] = obj[key];
  3115. }
  3116. }
  3117. }
  3118. newObj["default"] = obj;
  3119. if (cache) {
  3120. cache.set(obj, newObj);
  3121. }
  3122. return newObj;
  3123. }
  3124. module.exports = _interopRequireWildcard;
  3125. /***/ }),
  3126. /***/ "18ca":
  3127. /***/ (function(module, exports, __webpack_require__) {
  3128. var freeGlobal = __webpack_require__("5de5");
  3129. /** Detect free variable `self`. */
  3130. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  3131. /** Used as a reference to the global object. */
  3132. var root = freeGlobal || freeSelf || Function('return this')();
  3133. module.exports = root;
  3134. /***/ }),
  3135. /***/ "18e4":
  3136. /***/ (function(module, exports, __webpack_require__) {
  3137. module.exports = {
  3138. ResizeSensor: __webpack_require__("76b8"),
  3139. ElementQueries: __webpack_require__("11f8")
  3140. };
  3141. /***/ }),
  3142. /***/ "1969":
  3143. /***/ (function(module, exports, __webpack_require__) {
  3144. // extracted by mini-css-extract-plugin
  3145. /***/ }),
  3146. /***/ "19e1":
  3147. /***/ (function(module, exports) {
  3148. function _classCallCheck(instance, Constructor) {
  3149. if (!(instance instanceof Constructor)) {
  3150. throw new TypeError("Cannot call a class as a function");
  3151. }
  3152. }
  3153. module.exports = _classCallCheck;
  3154. /***/ }),
  3155. /***/ "1a91":
  3156. /***/ (function(module, exports, __webpack_require__) {
  3157. "use strict";
  3158. var _interopRequireDefault = __webpack_require__("8e6d");
  3159. Object.defineProperty(exports, "__esModule", {
  3160. value: true
  3161. });
  3162. exports.registerProjection = registerProjection;
  3163. exports.getProjection = getProjection;
  3164. exports.toEpsgCode = toEpsgCode;
  3165. exports.default = void 0;
  3166. var _vue = _interopRequireDefault(__webpack_require__("5643"));
  3167. var _util = __webpack_require__("1448");
  3168. var EpsgDefine = new _vue.default({
  3169. epsgCodes: {
  3170. 'EPSG:3857': 'PROJCS["WGS 84 / Pseudo-Mercator",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"],AUTHORITY["EPSG","3857"]]',
  3171. 'EPSG:4326': 'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],AXIS["Northing", "NORTH"],AXIS["Easting", "EAST"],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]',
  3172. 'EPSG:4490': 'GEOGCS["China Geodetic Coordinate System 2000", DATUM["China 2000", SPHEROID["CGCS2000", 6378137.0, 298.257222101, AUTHORITY["EPSG","1024"]], AUTHORITY["EPSG","1043"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic latitude", NORTH], AXIS["Geodetic longitude", EAST], AUTHORITY["EPSG","4490"]]'
  3173. },
  3174. registerProjection: function registerProjection(epsgKey, epsgValue) {
  3175. if ((0, _util.getDataType)(arguments[0]) === '[object Object]' && arguments.length === 1) {
  3176. this.epsgCodes = Object.assign({}, this.epsgCodes, arguments[0]);
  3177. } else if (epsgKey && epsgValue) {
  3178. this.epsgCodes[epsgKey] = epsgValue;
  3179. }
  3180. },
  3181. getProjection: function getProjection(epsgKey) {
  3182. return this.epsgCodes[epsgKey];
  3183. },
  3184. getAllProjections: function getAllProjections() {
  3185. return this.epsgCodes;
  3186. }
  3187. });
  3188. var _default = EpsgDefine;
  3189. exports.default = _default;
  3190. function registerProjection(epsgKey, epsgValue) {
  3191. return EpsgDefine.$options.registerProjection(epsgKey, epsgValue);
  3192. }
  3193. function getProjection(epsgKey) {
  3194. return EpsgDefine.$options.getProjection(epsgKey);
  3195. }
  3196. function toEpsgCode(wkt) {
  3197. if (typeof wkt !== 'string') {
  3198. return '';
  3199. } else if (wkt.indexOf('EPSG') === 0) {
  3200. return wkt;
  3201. } else {
  3202. var lastAuthority = wkt.lastIndexOf('AUTHORITY') + 10;
  3203. var endString = wkt.indexOf(']', lastAuthority) - 1;
  3204. if (lastAuthority > 0 && endString > 0) {
  3205. return "EPSG:".concat(wkt.substring(lastAuthority, endString).split(',')[1].substr(1));
  3206. } else {
  3207. return '';
  3208. }
  3209. }
  3210. }
  3211. /***/ }),
  3212. /***/ "1a9e":
  3213. /***/ (function(module, exports, __webpack_require__) {
  3214. "use strict";
  3215. var _interopRequireDefault = __webpack_require__("8e6d");
  3216. Object.defineProperty(exports, "__esModule", {
  3217. value: true
  3218. });
  3219. exports.Util = void 0;
  3220. var _typeof2 = _interopRequireDefault(__webpack_require__("7ae5"));
  3221. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  3222. * This program are made available under the terms of the Apache License, Version 2.0
  3223. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html. */
  3224. var Util = {};
  3225. /**
  3226. * @name Util
  3227. * @namespace
  3228. * @category BaseTypes Util
  3229. * @description common 工具类。
  3230. */
  3231. exports.Util = Util;
  3232. Util.extend = function (destination, source) {
  3233. destination = destination || {};
  3234. if (source) {
  3235. for (var property in source) {
  3236. var value = source[property];
  3237. if (value !== undefined) {
  3238. destination[property] = value;
  3239. }
  3240. }
  3241. var sourceIsEvt = typeof window.Event === 'function' && source instanceof window.Event;
  3242. if (!sourceIsEvt && source.hasOwnProperty && source.hasOwnProperty('toString')) {
  3243. destination.toString = source.toString;
  3244. }
  3245. }
  3246. return destination;
  3247. };
  3248. /**
  3249. * @description 对象拷贝。
  3250. * @param {Object} [des] - 目标对象。
  3251. * @param {Object} soc - 源对象。
  3252. */
  3253. Util.copy = function (des, soc) {
  3254. des = des || {};
  3255. var v;
  3256. if (soc) {
  3257. for (var p in des) {
  3258. v = soc[p];
  3259. if (typeof v !== 'undefined') {
  3260. des[p] = v;
  3261. }
  3262. }
  3263. }
  3264. };
  3265. /**
  3266. * @description 销毁对象,将其属性置空。
  3267. * @param {Object} [obj] - 目标对象。
  3268. */
  3269. Util.reset = function (obj) {
  3270. obj = obj || {};
  3271. for (var p in obj) {
  3272. if (obj.hasOwnProperty(p)) {
  3273. if ((0, _typeof2.default)(obj[p]) === 'object' && obj[p] instanceof Array) {
  3274. for (var i in obj[p]) {
  3275. if (obj[p][i].destroy) {
  3276. obj[p][i].destroy();
  3277. }
  3278. }
  3279. obj[p].length = 0;
  3280. } else if ((0, _typeof2.default)(obj[p]) === 'object' && obj[p] instanceof Object) {
  3281. if (obj[p].destroy) {
  3282. obj[p].destroy();
  3283. }
  3284. }
  3285. obj[p] = null;
  3286. }
  3287. }
  3288. };
  3289. /**
  3290. * @description 获取 HTML 元素数组。
  3291. * @returns {Array.<HTMLElement>} HTML 元素数组。
  3292. */
  3293. Util.getElement = function () {
  3294. var elements = [];
  3295. for (var i = 0, len = arguments.length; i < len; i++) {
  3296. var element = arguments[i];
  3297. if (typeof element === 'string') {
  3298. element = document.getElementById(element);
  3299. }
  3300. if (arguments.length === 1) {
  3301. return element;
  3302. }
  3303. elements.push(element);
  3304. }
  3305. return elements;
  3306. };
  3307. /**
  3308. * @description instance of 的跨浏览器实现。
  3309. * @param {Object} o - 对象。
  3310. * @returns {boolean} 是否是页面元素。
  3311. */
  3312. Util.isElement = function (o) {
  3313. return !!(o && o.nodeType === 1);
  3314. };
  3315. /**
  3316. * @description 判断一个对象是否是数组。
  3317. * @param {Object} a - 对象。
  3318. * @returns {boolean} 是否是数组。
  3319. */
  3320. Util.isArray = function (a) {
  3321. return Object.prototype.toString.call(a) === '[object Array]';
  3322. };
  3323. /**
  3324. * @description 从数组中删除某一项。
  3325. * @param {Array} array - 数组。
  3326. * @param {Object} item - 数组中要删除的一项。
  3327. * @returns {Array} 执行删除操作后的数组。
  3328. */
  3329. Util.removeItem = function (array, item) {
  3330. for (var i = array.length - 1; i >= 0; i--) {
  3331. if (array[i] === item) {
  3332. array.splice(i, 1);
  3333. }
  3334. }
  3335. return array;
  3336. };
  3337. /**
  3338. * @description 获取某对象再数组中的索引值。
  3339. * @param {Array} array - 数组。
  3340. * @param {Object} obj - 对象。
  3341. * @returns {number} 某对象再数组中的索引值。
  3342. */
  3343. Util.indexOf = function (array, obj) {
  3344. if (array == null) {
  3345. return -1;
  3346. } else {
  3347. // use the build-in function if available.
  3348. if (typeof array.indexOf === 'function') {
  3349. return array.indexOf(obj);
  3350. } else {
  3351. for (var i = 0, len = array.length; i < len; i++) {
  3352. if (array[i] === obj) {
  3353. return i;
  3354. }
  3355. }
  3356. return -1;
  3357. }
  3358. }
  3359. };
  3360. Util.getElement = function () {
  3361. var elements = [];
  3362. for (var i = 0, len = arguments.length; i < len; i++) {
  3363. var element = arguments[i];
  3364. if (typeof element === 'string') {
  3365. element = document.getElementById(element);
  3366. }
  3367. if (arguments.length === 1) {
  3368. return element;
  3369. }
  3370. elements.push(element);
  3371. }
  3372. return elements;
  3373. };
  3374. Util.lastSeqID = 0;
  3375. Util.createUniqueID = function (prefix) {
  3376. if (prefix == null) {
  3377. prefix = 'id_';
  3378. }
  3379. Util.lastSeqID += 1;
  3380. return prefix + Util.lastSeqID;
  3381. };
  3382. /***/ }),
  3383. /***/ "1d96":
  3384. /***/ (function(module, exports) {
  3385. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  3386. try {
  3387. var info = gen[key](arg);
  3388. var value = info.value;
  3389. } catch (error) {
  3390. reject(error);
  3391. return;
  3392. }
  3393. if (info.done) {
  3394. resolve(value);
  3395. } else {
  3396. Promise.resolve(value).then(_next, _throw);
  3397. }
  3398. }
  3399. function _asyncToGenerator(fn) {
  3400. return function () {
  3401. var self = this,
  3402. args = arguments;
  3403. return new Promise(function (resolve, reject) {
  3404. var gen = fn.apply(self, args);
  3405. function _next(value) {
  3406. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
  3407. }
  3408. function _throw(err) {
  3409. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  3410. }
  3411. _next(undefined);
  3412. });
  3413. };
  3414. }
  3415. module.exports = _asyncToGenerator;
  3416. /***/ }),
  3417. /***/ "1e44":
  3418. /***/ (function(module, exports) {
  3419. function _nonIterableSpread() {
  3420. throw new TypeError("Invalid attempt to spread non-iterable instance");
  3421. }
  3422. module.exports = _nonIterableSpread;
  3423. /***/ }),
  3424. /***/ 2:
  3425. /***/ (function(module, exports) {
  3426. /* (ignored) */
  3427. /***/ }),
  3428. /***/ "2322":
  3429. /***/ (function(module, exports, __webpack_require__) {
  3430. "use strict";
  3431. var _interopRequireDefault = __webpack_require__("8e6d");
  3432. Object.defineProperty(exports, "__esModule", {
  3433. value: true
  3434. });
  3435. exports.default = void 0;
  3436. var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
  3437. var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
  3438. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
  3439. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
  3440. var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
  3441. var _typeof2 = _interopRequireDefault(__webpack_require__("7ae5"));
  3442. var _WebMapViewModel = _interopRequireDefault(__webpack_require__("fb97"));
  3443. var _vmUpdater = _interopRequireDefault(__webpack_require__("3a49"));
  3444. var _mapEvent = _interopRequireDefault(__webpack_require__("3a8c"));
  3445. var _vuePropertyDecorator = __webpack_require__("e22c");
  3446. var _resizeDetector = __webpack_require__("e0f2");
  3447. var _debounce = _interopRequireDefault(__webpack_require__("331f"));
  3448. var _mapEvents = _interopRequireDefault(__webpack_require__("2b31"));
  3449. var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
  3450. var c = arguments.length,
  3451. r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
  3452. d;
  3453. if ((typeof Reflect === "undefined" ? "undefined" : (0, _typeof2.default)(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
  3454. if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  3455. }
  3456. return c > 3 && r && Object.defineProperty(target, key, r), r;
  3457. };
  3458. var SmWebMap =
  3459. /*#__PURE__*/
  3460. function (_Mixins) {
  3461. (0, _inherits2.default)(SmWebMap, _Mixins);
  3462. function SmWebMap() {
  3463. var _this;
  3464. (0, _classCallCheck2.default)(this, SmWebMap);
  3465. _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(SmWebMap).apply(this, arguments));
  3466. _this.spinning = true;
  3467. _this.ready = false;
  3468. return _this;
  3469. }
  3470. (0, _createClass2.default)(SmWebMap, [{
  3471. key: "mapIdChanged",
  3472. value: function mapIdChanged() {
  3473. this.spinning = true;
  3474. }
  3475. }, {
  3476. key: "mounted",
  3477. value: function mounted() {
  3478. this.initializeWebMap();
  3479. this.registerEvents();
  3480. }
  3481. }, {
  3482. key: "beforeDestroy",
  3483. value: function beforeDestroy() {
  3484. this.destory();
  3485. _mapEvent.default.$options.deleteMap(this.target);
  3486. _mapEvent.default.$options.deleteWebMap(this.target);
  3487. }
  3488. }, {
  3489. key: "load",
  3490. value: function load(value) {
  3491. return value;
  3492. }
  3493. }, {
  3494. key: "getMapFailed",
  3495. value: function getMapFailed(value) {
  3496. return value;
  3497. }
  3498. }, {
  3499. key: "getLayerDatasourceFailed",
  3500. value: function getLayerDatasourceFailed(value) {
  3501. return value;
  3502. }
  3503. }, {
  3504. key: "initializeWebMap",
  3505. value: function initializeWebMap() {
  3506. var _this2 = this;
  3507. var _this$$props = this.$props,
  3508. target = _this$$props.target,
  3509. serverUrl = _this$$props.serverUrl,
  3510. accessToken = _this$$props.accessToken,
  3511. accessKey = _this$$props.accessKey,
  3512. tiandituKey = _this$$props.tiandituKey,
  3513. withCredentials = _this$$props.withCredentials,
  3514. excludePortalProxyUrl = _this$$props.excludePortalProxyUrl,
  3515. isSuperMapOnline = _this$$props.isSuperMapOnline,
  3516. mapOptions = _this$$props.mapOptions;
  3517. this.viewModel = new _WebMapViewModel.default(this.mapId, {
  3518. target: target,
  3519. serverUrl: serverUrl,
  3520. accessToken: accessToken,
  3521. accessKey: accessKey,
  3522. tiandituKey: tiandituKey,
  3523. withCredentials: withCredentials,
  3524. excludePortalProxyUrl: excludePortalProxyUrl,
  3525. isSuperMapOnline: isSuperMapOnline
  3526. }, mapOptions);
  3527. if (this.autoresize) {
  3528. this.__resizeHandler = (0, _debounce.default)(function () {
  3529. _this2.resize();
  3530. }, 100, {
  3531. leading: true
  3532. });
  3533. (0, _resizeDetector.addListener)(this.$el, this.__resizeHandler);
  3534. }
  3535. }
  3536. }, {
  3537. key: "resize",
  3538. value: function resize() {
  3539. var _this3 = this;
  3540. if (this.viewModel && this.viewModel.resize) {
  3541. this.$nextTick(function () {
  3542. _this3.viewModel.resize();
  3543. });
  3544. }
  3545. }
  3546. }, {
  3547. key: "registerEvents",
  3548. value: function registerEvents() {
  3549. var _this4 = this;
  3550. this.viewModel.on({
  3551. addlayerssucceeded: function addlayerssucceeded(e) {
  3552. _this4.spinning = false;
  3553. _mapEvent.default.$options.setMap(_this4.target, e.map);
  3554. _this4.viewModel && _mapEvent.default.$options.setWebMap(_this4.target, _this4.viewModel);
  3555. _mapEvent.default.$emit('load-map', e.map, _this4.target);
  3556. _this4.map = e.map;
  3557. _this4.mapObject = e.map;
  3558. _this4.ready = true;
  3559. _this4.$nextTick(function () {
  3560. _this4.viewModel.resize();
  3561. });
  3562. _this4.bindMapEvents();
  3563. _this4.load({
  3564. map: e.map
  3565. });
  3566. },
  3567. getmapinfofailed: function getmapinfofailed(e) {
  3568. _this4.getMapFailed({
  3569. error: e.error
  3570. });
  3571. _this4.$message.error(e.error.message);
  3572. _this4.spinning = false;
  3573. },
  3574. getlayerdatasourcefailed: function getlayerdatasourcefailed(e) {
  3575. _this4.getLayerDatasourceFailed({
  3576. error: e.error,
  3577. layer: e.layer,
  3578. map: e.map
  3579. });
  3580. if (e.error === 'SAMPLE DATA is not supported') {
  3581. _this4.$message.error(_this4.$t('webmap.sampleDataNotSupport'));
  3582. } else {
  3583. _this4.$message.error(_this4.$t('webmap.getLayerInfoFailed'));
  3584. }
  3585. },
  3586. notsupportmvt: function notsupportmvt() {
  3587. _this4.$message.error('暂不支持加载矢量瓦片图层!');
  3588. _this4.spinning = false;
  3589. }
  3590. });
  3591. }
  3592. }, {
  3593. key: "destory",
  3594. value: function destory() {
  3595. if (this.autoresize) {
  3596. (0, _resizeDetector.removeListener)(this.$el, this.__resizeHandler);
  3597. }
  3598. }
  3599. }, {
  3600. key: "getMapTarget",
  3601. get: function get() {
  3602. return this.target;
  3603. }
  3604. }]);
  3605. return SmWebMap;
  3606. }((0, _vuePropertyDecorator.Mixins)(_vmUpdater.default, _mapEvents.default));
  3607. __decorate([(0, _vuePropertyDecorator.Provide)()], SmWebMap.prototype, "__resizeHandler", void 0);
  3608. __decorate([(0, _vuePropertyDecorator.Provide)()], SmWebMap.prototype, "ready", void 0);
  3609. __decorate([(0, _vuePropertyDecorator.Prop)()], SmWebMap.prototype, "mapId", void 0);
  3610. __decorate([(0, _vuePropertyDecorator.Prop)({
  3611. default: 'map'
  3612. })], SmWebMap.prototype, "target", void 0);
  3613. __decorate([(0, _vuePropertyDecorator.Prop)({
  3614. default: 'https://www.supermapol.com'
  3615. })], SmWebMap.prototype, "serverUrl", void 0);
  3616. __decorate([(0, _vuePropertyDecorator.Prop)()], SmWebMap.prototype, "accessToken", void 0);
  3617. __decorate([(0, _vuePropertyDecorator.Prop)()], SmWebMap.prototype, "accessKey", void 0);
  3618. __decorate([(0, _vuePropertyDecorator.Prop)()], SmWebMap.prototype, "tiandituKey", void 0);
  3619. __decorate([(0, _vuePropertyDecorator.Prop)({
  3620. default: false
  3621. })], SmWebMap.prototype, "withCredentials", void 0);
  3622. __decorate([(0, _vuePropertyDecorator.Prop)()], SmWebMap.prototype, "excludePortalProxyUrl", void 0);
  3623. __decorate([(0, _vuePropertyDecorator.Prop)()], SmWebMap.prototype, "isSuperMapOnline", void 0);
  3624. __decorate([(0, _vuePropertyDecorator.Prop)()], SmWebMap.prototype, "mapOptions", void 0);
  3625. __decorate([(0, _vuePropertyDecorator.Prop)({
  3626. default: true
  3627. })], SmWebMap.prototype, "autoresize", void 0);
  3628. __decorate([(0, _vuePropertyDecorator.Watch)('mapId')], SmWebMap.prototype, "mapIdChanged", null);
  3629. __decorate([(0, _vuePropertyDecorator.Emit)()], SmWebMap.prototype, "load", null);
  3630. __decorate([(0, _vuePropertyDecorator.Emit)()], SmWebMap.prototype, "getMapFailed", null);
  3631. __decorate([(0, _vuePropertyDecorator.Emit)()], SmWebMap.prototype, "getLayerDatasourceFailed", null);
  3632. SmWebMap = __decorate([(0, _vuePropertyDecorator.Component)({
  3633. name: 'SmWebMap',
  3634. viewModelProps: ['mapId', 'serverUrl', 'mapOptions.center', 'mapOptions.zoom', 'mapOptions.minZoom', 'mapOptions.maxZoom', 'mapOptions.maxBounds', 'withCredentials']
  3635. })], SmWebMap);
  3636. var _default = SmWebMap;
  3637. exports.default = _default;
  3638. /***/ }),
  3639. /***/ "2389":
  3640. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3641. "use strict";
  3642. __webpack_require__.r(__webpack_exports__);
  3643. /* harmony import */ var _Image_vue_vue_type_template_id_3aa6b84a___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a51f");
  3644. /* harmony import */ var _Image_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("eb1b");
  3645. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _Image_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _Image_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  3646. /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b429");
  3647. /* normalize component */
  3648. var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
  3649. _Image_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
  3650. _Image_vue_vue_type_template_id_3aa6b84a___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
  3651. _Image_vue_vue_type_template_id_3aa6b84a___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
  3652. false,
  3653. null,
  3654. null,
  3655. null
  3656. )
  3657. /* harmony default export */ __webpack_exports__["default"] = (component.exports);
  3658. /***/ }),
  3659. /***/ "238e":
  3660. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3661. "use strict";
  3662. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/common/liquidfill/LiquidFill.vue?vue&type=template&id=8aedaae4&
  3663. var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:"chart",staticClass:"sm-component-liquidFill",style:([_vm.background && _vm.getBackgroundStyle]),attrs:{"id":"chart"}})}
  3664. var staticRenderFns = []
  3665. // CONCATENATED MODULE: ./src/common/liquidfill/LiquidFill.vue?vue&type=template&id=8aedaae4&
  3666. /* concated harmony reexport render */__webpack_require__.d(__webpack_exports__, "a", function() { return render; });
  3667. /* concated harmony reexport staticRenderFns */__webpack_require__.d(__webpack_exports__, "b", function() { return staticRenderFns; });
  3668. /***/ }),
  3669. /***/ "2411":
  3670. /***/ (function(module, exports) {
  3671. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg=="
  3672. /***/ }),
  3673. /***/ "25a2":
  3674. /***/ (function(module, exports, __webpack_require__) {
  3675. /* WEBPACK VAR INJECTION */(function(global, module) {/**
  3676. * lodash (Custom Build) <https://lodash.com/>
  3677. * Build: `lodash modularize exports="npm" -o ./`
  3678. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  3679. * Released under MIT license <https://lodash.com/license>
  3680. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  3681. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  3682. */
  3683. /** Used as the size to enable large array optimizations. */
  3684. var LARGE_ARRAY_SIZE = 200;
  3685. /** Used to stand-in for `undefined` hash values. */
  3686. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  3687. /** Used as references for various `Number` constants. */
  3688. var MAX_SAFE_INTEGER = 9007199254740991;
  3689. /** `Object#toString` result references. */
  3690. var argsTag = '[object Arguments]',
  3691. arrayTag = '[object Array]',
  3692. boolTag = '[object Boolean]',
  3693. dateTag = '[object Date]',
  3694. errorTag = '[object Error]',
  3695. funcTag = '[object Function]',
  3696. genTag = '[object GeneratorFunction]',
  3697. mapTag = '[object Map]',
  3698. numberTag = '[object Number]',
  3699. objectTag = '[object Object]',
  3700. promiseTag = '[object Promise]',
  3701. regexpTag = '[object RegExp]',
  3702. setTag = '[object Set]',
  3703. stringTag = '[object String]',
  3704. symbolTag = '[object Symbol]',
  3705. weakMapTag = '[object WeakMap]';
  3706. var arrayBufferTag = '[object ArrayBuffer]',
  3707. dataViewTag = '[object DataView]',
  3708. float32Tag = '[object Float32Array]',
  3709. float64Tag = '[object Float64Array]',
  3710. int8Tag = '[object Int8Array]',
  3711. int16Tag = '[object Int16Array]',
  3712. int32Tag = '[object Int32Array]',
  3713. uint8Tag = '[object Uint8Array]',
  3714. uint8ClampedTag = '[object Uint8ClampedArray]',
  3715. uint16Tag = '[object Uint16Array]',
  3716. uint32Tag = '[object Uint32Array]';
  3717. /**
  3718. * Used to match `RegExp`
  3719. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  3720. */
  3721. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
  3722. /** Used to match `RegExp` flags from their coerced string values. */
  3723. var reFlags = /\w*$/;
  3724. /** Used to detect host constructors (Safari). */
  3725. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  3726. /** Used to detect unsigned integer values. */
  3727. var reIsUint = /^(?:0|[1-9]\d*)$/;
  3728. /** Used to identify `toStringTag` values supported by `_.clone`. */
  3729. var cloneableTags = {};
  3730. cloneableTags[argsTag] = cloneableTags[arrayTag] =
  3731. cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
  3732. cloneableTags[boolTag] = cloneableTags[dateTag] =
  3733. cloneableTags[float32Tag] = cloneableTags[float64Tag] =
  3734. cloneableTags[int8Tag] = cloneableTags[int16Tag] =
  3735. cloneableTags[int32Tag] = cloneableTags[mapTag] =
  3736. cloneableTags[numberTag] = cloneableTags[objectTag] =
  3737. cloneableTags[regexpTag] = cloneableTags[setTag] =
  3738. cloneableTags[stringTag] = cloneableTags[symbolTag] =
  3739. cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
  3740. cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
  3741. cloneableTags[errorTag] = cloneableTags[funcTag] =
  3742. cloneableTags[weakMapTag] = false;
  3743. /** Detect free variable `global` from Node.js. */
  3744. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  3745. /** Detect free variable `self`. */
  3746. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  3747. /** Used as a reference to the global object. */
  3748. var root = freeGlobal || freeSelf || Function('return this')();
  3749. /** Detect free variable `exports`. */
  3750. var freeExports = true && exports && !exports.nodeType && exports;
  3751. /** Detect free variable `module`. */
  3752. var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
  3753. /** Detect the popular CommonJS extension `module.exports`. */
  3754. var moduleExports = freeModule && freeModule.exports === freeExports;
  3755. /**
  3756. * Adds the key-value `pair` to `map`.
  3757. *
  3758. * @private
  3759. * @param {Object} map The map to modify.
  3760. * @param {Array} pair The key-value pair to add.
  3761. * @returns {Object} Returns `map`.
  3762. */
  3763. function addMapEntry(map, pair) {
  3764. // Don't return `map.set` because it's not chainable in IE 11.
  3765. map.set(pair[0], pair[1]);
  3766. return map;
  3767. }
  3768. /**
  3769. * Adds `value` to `set`.
  3770. *
  3771. * @private
  3772. * @param {Object} set The set to modify.
  3773. * @param {*} value The value to add.
  3774. * @returns {Object} Returns `set`.
  3775. */
  3776. function addSetEntry(set, value) {
  3777. // Don't return `set.add` because it's not chainable in IE 11.
  3778. set.add(value);
  3779. return set;
  3780. }
  3781. /**
  3782. * A specialized version of `_.forEach` for arrays without support for
  3783. * iteratee shorthands.
  3784. *
  3785. * @private
  3786. * @param {Array} [array] The array to iterate over.
  3787. * @param {Function} iteratee The function invoked per iteration.
  3788. * @returns {Array} Returns `array`.
  3789. */
  3790. function arrayEach(array, iteratee) {
  3791. var index = -1,
  3792. length = array ? array.length : 0;
  3793. while (++index < length) {
  3794. if (iteratee(array[index], index, array) === false) {
  3795. break;
  3796. }
  3797. }
  3798. return array;
  3799. }
  3800. /**
  3801. * Appends the elements of `values` to `array`.
  3802. *
  3803. * @private
  3804. * @param {Array} array The array to modify.
  3805. * @param {Array} values The values to append.
  3806. * @returns {Array} Returns `array`.
  3807. */
  3808. function arrayPush(array, values) {
  3809. var index = -1,
  3810. length = values.length,
  3811. offset = array.length;
  3812. while (++index < length) {
  3813. array[offset + index] = values[index];
  3814. }
  3815. return array;
  3816. }
  3817. /**
  3818. * A specialized version of `_.reduce` for arrays without support for
  3819. * iteratee shorthands.
  3820. *
  3821. * @private
  3822. * @param {Array} [array] The array to iterate over.
  3823. * @param {Function} iteratee The function invoked per iteration.
  3824. * @param {*} [accumulator] The initial value.
  3825. * @param {boolean} [initAccum] Specify using the first element of `array` as
  3826. * the initial value.
  3827. * @returns {*} Returns the accumulated value.
  3828. */
  3829. function arrayReduce(array, iteratee, accumulator, initAccum) {
  3830. var index = -1,
  3831. length = array ? array.length : 0;
  3832. if (initAccum && length) {
  3833. accumulator = array[++index];
  3834. }
  3835. while (++index < length) {
  3836. accumulator = iteratee(accumulator, array[index], index, array);
  3837. }
  3838. return accumulator;
  3839. }
  3840. /**
  3841. * The base implementation of `_.times` without support for iteratee shorthands
  3842. * or max array length checks.
  3843. *
  3844. * @private
  3845. * @param {number} n The number of times to invoke `iteratee`.
  3846. * @param {Function} iteratee The function invoked per iteration.
  3847. * @returns {Array} Returns the array of results.
  3848. */
  3849. function baseTimes(n, iteratee) {
  3850. var index = -1,
  3851. result = Array(n);
  3852. while (++index < n) {
  3853. result[index] = iteratee(index);
  3854. }
  3855. return result;
  3856. }
  3857. /**
  3858. * Gets the value at `key` of `object`.
  3859. *
  3860. * @private
  3861. * @param {Object} [object] The object to query.
  3862. * @param {string} key The key of the property to get.
  3863. * @returns {*} Returns the property value.
  3864. */
  3865. function getValue(object, key) {
  3866. return object == null ? undefined : object[key];
  3867. }
  3868. /**
  3869. * Checks if `value` is a host object in IE < 9.
  3870. *
  3871. * @private
  3872. * @param {*} value The value to check.
  3873. * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
  3874. */
  3875. function isHostObject(value) {
  3876. // Many host objects are `Object` objects that can coerce to strings
  3877. // despite having improperly defined `toString` methods.
  3878. var result = false;
  3879. if (value != null && typeof value.toString != 'function') {
  3880. try {
  3881. result = !!(value + '');
  3882. } catch (e) {}
  3883. }
  3884. return result;
  3885. }
  3886. /**
  3887. * Converts `map` to its key-value pairs.
  3888. *
  3889. * @private
  3890. * @param {Object} map The map to convert.
  3891. * @returns {Array} Returns the key-value pairs.
  3892. */
  3893. function mapToArray(map) {
  3894. var index = -1,
  3895. result = Array(map.size);
  3896. map.forEach(function(value, key) {
  3897. result[++index] = [key, value];
  3898. });
  3899. return result;
  3900. }
  3901. /**
  3902. * Creates a unary function that invokes `func` with its argument transformed.
  3903. *
  3904. * @private
  3905. * @param {Function} func The function to wrap.
  3906. * @param {Function} transform The argument transform.
  3907. * @returns {Function} Returns the new function.
  3908. */
  3909. function overArg(func, transform) {
  3910. return function(arg) {
  3911. return func(transform(arg));
  3912. };
  3913. }
  3914. /**
  3915. * Converts `set` to an array of its values.
  3916. *
  3917. * @private
  3918. * @param {Object} set The set to convert.
  3919. * @returns {Array} Returns the values.
  3920. */
  3921. function setToArray(set) {
  3922. var index = -1,
  3923. result = Array(set.size);
  3924. set.forEach(function(value) {
  3925. result[++index] = value;
  3926. });
  3927. return result;
  3928. }
  3929. /** Used for built-in method references. */
  3930. var arrayProto = Array.prototype,
  3931. funcProto = Function.prototype,
  3932. objectProto = Object.prototype;
  3933. /** Used to detect overreaching core-js shims. */
  3934. var coreJsData = root['__core-js_shared__'];
  3935. /** Used to detect methods masquerading as native. */
  3936. var maskSrcKey = (function() {
  3937. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  3938. return uid ? ('Symbol(src)_1.' + uid) : '';
  3939. }());
  3940. /** Used to resolve the decompiled source of functions. */
  3941. var funcToString = funcProto.toString;
  3942. /** Used to check objects for own properties. */
  3943. var hasOwnProperty = objectProto.hasOwnProperty;
  3944. /**
  3945. * Used to resolve the
  3946. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  3947. * of values.
  3948. */
  3949. var objectToString = objectProto.toString;
  3950. /** Used to detect if a method is native. */
  3951. var reIsNative = RegExp('^' +
  3952. funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  3953. .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  3954. );
  3955. /** Built-in value references. */
  3956. var Buffer = moduleExports ? root.Buffer : undefined,
  3957. Symbol = root.Symbol,
  3958. Uint8Array = root.Uint8Array,
  3959. getPrototype = overArg(Object.getPrototypeOf, Object),
  3960. objectCreate = Object.create,
  3961. propertyIsEnumerable = objectProto.propertyIsEnumerable,
  3962. splice = arrayProto.splice;
  3963. /* Built-in method references for those with the same name as other `lodash` methods. */
  3964. var nativeGetSymbols = Object.getOwnPropertySymbols,
  3965. nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
  3966. nativeKeys = overArg(Object.keys, Object);
  3967. /* Built-in method references that are verified to be native. */
  3968. var DataView = getNative(root, 'DataView'),
  3969. Map = getNative(root, 'Map'),
  3970. Promise = getNative(root, 'Promise'),
  3971. Set = getNative(root, 'Set'),
  3972. WeakMap = getNative(root, 'WeakMap'),
  3973. nativeCreate = getNative(Object, 'create');
  3974. /** Used to detect maps, sets, and weakmaps. */
  3975. var dataViewCtorString = toSource(DataView),
  3976. mapCtorString = toSource(Map),
  3977. promiseCtorString = toSource(Promise),
  3978. setCtorString = toSource(Set),
  3979. weakMapCtorString = toSource(WeakMap);
  3980. /** Used to convert symbols to primitives and strings. */
  3981. var symbolProto = Symbol ? Symbol.prototype : undefined,
  3982. symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
  3983. /**
  3984. * Creates a hash object.
  3985. *
  3986. * @private
  3987. * @constructor
  3988. * @param {Array} [entries] The key-value pairs to cache.
  3989. */
  3990. function Hash(entries) {
  3991. var index = -1,
  3992. length = entries ? entries.length : 0;
  3993. this.clear();
  3994. while (++index < length) {
  3995. var entry = entries[index];
  3996. this.set(entry[0], entry[1]);
  3997. }
  3998. }
  3999. /**
  4000. * Removes all key-value entries from the hash.
  4001. *
  4002. * @private
  4003. * @name clear
  4004. * @memberOf Hash
  4005. */
  4006. function hashClear() {
  4007. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  4008. }
  4009. /**
  4010. * Removes `key` and its value from the hash.
  4011. *
  4012. * @private
  4013. * @name delete
  4014. * @memberOf Hash
  4015. * @param {Object} hash The hash to modify.
  4016. * @param {string} key The key of the value to remove.
  4017. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  4018. */
  4019. function hashDelete(key) {
  4020. return this.has(key) && delete this.__data__[key];
  4021. }
  4022. /**
  4023. * Gets the hash value for `key`.
  4024. *
  4025. * @private
  4026. * @name get
  4027. * @memberOf Hash
  4028. * @param {string} key The key of the value to get.
  4029. * @returns {*} Returns the entry value.
  4030. */
  4031. function hashGet(key) {
  4032. var data = this.__data__;
  4033. if (nativeCreate) {
  4034. var result = data[key];
  4035. return result === HASH_UNDEFINED ? undefined : result;
  4036. }
  4037. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  4038. }
  4039. /**
  4040. * Checks if a hash value for `key` exists.
  4041. *
  4042. * @private
  4043. * @name has
  4044. * @memberOf Hash
  4045. * @param {string} key The key of the entry to check.
  4046. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  4047. */
  4048. function hashHas(key) {
  4049. var data = this.__data__;
  4050. return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
  4051. }
  4052. /**
  4053. * Sets the hash `key` to `value`.
  4054. *
  4055. * @private
  4056. * @name set
  4057. * @memberOf Hash
  4058. * @param {string} key The key of the value to set.
  4059. * @param {*} value The value to set.
  4060. * @returns {Object} Returns the hash instance.
  4061. */
  4062. function hashSet(key, value) {
  4063. var data = this.__data__;
  4064. data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
  4065. return this;
  4066. }
  4067. // Add methods to `Hash`.
  4068. Hash.prototype.clear = hashClear;
  4069. Hash.prototype['delete'] = hashDelete;
  4070. Hash.prototype.get = hashGet;
  4071. Hash.prototype.has = hashHas;
  4072. Hash.prototype.set = hashSet;
  4073. /**
  4074. * Creates an list cache object.
  4075. *
  4076. * @private
  4077. * @constructor
  4078. * @param {Array} [entries] The key-value pairs to cache.
  4079. */
  4080. function ListCache(entries) {
  4081. var index = -1,
  4082. length = entries ? entries.length : 0;
  4083. this.clear();
  4084. while (++index < length) {
  4085. var entry = entries[index];
  4086. this.set(entry[0], entry[1]);
  4087. }
  4088. }
  4089. /**
  4090. * Removes all key-value entries from the list cache.
  4091. *
  4092. * @private
  4093. * @name clear
  4094. * @memberOf ListCache
  4095. */
  4096. function listCacheClear() {
  4097. this.__data__ = [];
  4098. }
  4099. /**
  4100. * Removes `key` and its value from the list cache.
  4101. *
  4102. * @private
  4103. * @name delete
  4104. * @memberOf ListCache
  4105. * @param {string} key The key of the value to remove.
  4106. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  4107. */
  4108. function listCacheDelete(key) {
  4109. var data = this.__data__,
  4110. index = assocIndexOf(data, key);
  4111. if (index < 0) {
  4112. return false;
  4113. }
  4114. var lastIndex = data.length - 1;
  4115. if (index == lastIndex) {
  4116. data.pop();
  4117. } else {
  4118. splice.call(data, index, 1);
  4119. }
  4120. return true;
  4121. }
  4122. /**
  4123. * Gets the list cache value for `key`.
  4124. *
  4125. * @private
  4126. * @name get
  4127. * @memberOf ListCache
  4128. * @param {string} key The key of the value to get.
  4129. * @returns {*} Returns the entry value.
  4130. */
  4131. function listCacheGet(key) {
  4132. var data = this.__data__,
  4133. index = assocIndexOf(data, key);
  4134. return index < 0 ? undefined : data[index][1];
  4135. }
  4136. /**
  4137. * Checks if a list cache value for `key` exists.
  4138. *
  4139. * @private
  4140. * @name has
  4141. * @memberOf ListCache
  4142. * @param {string} key The key of the entry to check.
  4143. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  4144. */
  4145. function listCacheHas(key) {
  4146. return assocIndexOf(this.__data__, key) > -1;
  4147. }
  4148. /**
  4149. * Sets the list cache `key` to `value`.
  4150. *
  4151. * @private
  4152. * @name set
  4153. * @memberOf ListCache
  4154. * @param {string} key The key of the value to set.
  4155. * @param {*} value The value to set.
  4156. * @returns {Object} Returns the list cache instance.
  4157. */
  4158. function listCacheSet(key, value) {
  4159. var data = this.__data__,
  4160. index = assocIndexOf(data, key);
  4161. if (index < 0) {
  4162. data.push([key, value]);
  4163. } else {
  4164. data[index][1] = value;
  4165. }
  4166. return this;
  4167. }
  4168. // Add methods to `ListCache`.
  4169. ListCache.prototype.clear = listCacheClear;
  4170. ListCache.prototype['delete'] = listCacheDelete;
  4171. ListCache.prototype.get = listCacheGet;
  4172. ListCache.prototype.has = listCacheHas;
  4173. ListCache.prototype.set = listCacheSet;
  4174. /**
  4175. * Creates a map cache object to store key-value pairs.
  4176. *
  4177. * @private
  4178. * @constructor
  4179. * @param {Array} [entries] The key-value pairs to cache.
  4180. */
  4181. function MapCache(entries) {
  4182. var index = -1,
  4183. length = entries ? entries.length : 0;
  4184. this.clear();
  4185. while (++index < length) {
  4186. var entry = entries[index];
  4187. this.set(entry[0], entry[1]);
  4188. }
  4189. }
  4190. /**
  4191. * Removes all key-value entries from the map.
  4192. *
  4193. * @private
  4194. * @name clear
  4195. * @memberOf MapCache
  4196. */
  4197. function mapCacheClear() {
  4198. this.__data__ = {
  4199. 'hash': new Hash,
  4200. 'map': new (Map || ListCache),
  4201. 'string': new Hash
  4202. };
  4203. }
  4204. /**
  4205. * Removes `key` and its value from the map.
  4206. *
  4207. * @private
  4208. * @name delete
  4209. * @memberOf MapCache
  4210. * @param {string} key The key of the value to remove.
  4211. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  4212. */
  4213. function mapCacheDelete(key) {
  4214. return getMapData(this, key)['delete'](key);
  4215. }
  4216. /**
  4217. * Gets the map value for `key`.
  4218. *
  4219. * @private
  4220. * @name get
  4221. * @memberOf MapCache
  4222. * @param {string} key The key of the value to get.
  4223. * @returns {*} Returns the entry value.
  4224. */
  4225. function mapCacheGet(key) {
  4226. return getMapData(this, key).get(key);
  4227. }
  4228. /**
  4229. * Checks if a map value for `key` exists.
  4230. *
  4231. * @private
  4232. * @name has
  4233. * @memberOf MapCache
  4234. * @param {string} key The key of the entry to check.
  4235. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  4236. */
  4237. function mapCacheHas(key) {
  4238. return getMapData(this, key).has(key);
  4239. }
  4240. /**
  4241. * Sets the map `key` to `value`.
  4242. *
  4243. * @private
  4244. * @name set
  4245. * @memberOf MapCache
  4246. * @param {string} key The key of the value to set.
  4247. * @param {*} value The value to set.
  4248. * @returns {Object} Returns the map cache instance.
  4249. */
  4250. function mapCacheSet(key, value) {
  4251. getMapData(this, key).set(key, value);
  4252. return this;
  4253. }
  4254. // Add methods to `MapCache`.
  4255. MapCache.prototype.clear = mapCacheClear;
  4256. MapCache.prototype['delete'] = mapCacheDelete;
  4257. MapCache.prototype.get = mapCacheGet;
  4258. MapCache.prototype.has = mapCacheHas;
  4259. MapCache.prototype.set = mapCacheSet;
  4260. /**
  4261. * Creates a stack cache object to store key-value pairs.
  4262. *
  4263. * @private
  4264. * @constructor
  4265. * @param {Array} [entries] The key-value pairs to cache.
  4266. */
  4267. function Stack(entries) {
  4268. this.__data__ = new ListCache(entries);
  4269. }
  4270. /**
  4271. * Removes all key-value entries from the stack.
  4272. *
  4273. * @private
  4274. * @name clear
  4275. * @memberOf Stack
  4276. */
  4277. function stackClear() {
  4278. this.__data__ = new ListCache;
  4279. }
  4280. /**
  4281. * Removes `key` and its value from the stack.
  4282. *
  4283. * @private
  4284. * @name delete
  4285. * @memberOf Stack
  4286. * @param {string} key The key of the value to remove.
  4287. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  4288. */
  4289. function stackDelete(key) {
  4290. return this.__data__['delete'](key);
  4291. }
  4292. /**
  4293. * Gets the stack value for `key`.
  4294. *
  4295. * @private
  4296. * @name get
  4297. * @memberOf Stack
  4298. * @param {string} key The key of the value to get.
  4299. * @returns {*} Returns the entry value.
  4300. */
  4301. function stackGet(key) {
  4302. return this.__data__.get(key);
  4303. }
  4304. /**
  4305. * Checks if a stack value for `key` exists.
  4306. *
  4307. * @private
  4308. * @name has
  4309. * @memberOf Stack
  4310. * @param {string} key The key of the entry to check.
  4311. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  4312. */
  4313. function stackHas(key) {
  4314. return this.__data__.has(key);
  4315. }
  4316. /**
  4317. * Sets the stack `key` to `value`.
  4318. *
  4319. * @private
  4320. * @name set
  4321. * @memberOf Stack
  4322. * @param {string} key The key of the value to set.
  4323. * @param {*} value The value to set.
  4324. * @returns {Object} Returns the stack cache instance.
  4325. */
  4326. function stackSet(key, value) {
  4327. var cache = this.__data__;
  4328. if (cache instanceof ListCache) {
  4329. var pairs = cache.__data__;
  4330. if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
  4331. pairs.push([key, value]);
  4332. return this;
  4333. }
  4334. cache = this.__data__ = new MapCache(pairs);
  4335. }
  4336. cache.set(key, value);
  4337. return this;
  4338. }
  4339. // Add methods to `Stack`.
  4340. Stack.prototype.clear = stackClear;
  4341. Stack.prototype['delete'] = stackDelete;
  4342. Stack.prototype.get = stackGet;
  4343. Stack.prototype.has = stackHas;
  4344. Stack.prototype.set = stackSet;
  4345. /**
  4346. * Creates an array of the enumerable property names of the array-like `value`.
  4347. *
  4348. * @private
  4349. * @param {*} value The value to query.
  4350. * @param {boolean} inherited Specify returning inherited property names.
  4351. * @returns {Array} Returns the array of property names.
  4352. */
  4353. function arrayLikeKeys(value, inherited) {
  4354. // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
  4355. // Safari 9 makes `arguments.length` enumerable in strict mode.
  4356. var result = (isArray(value) || isArguments(value))
  4357. ? baseTimes(value.length, String)
  4358. : [];
  4359. var length = result.length,
  4360. skipIndexes = !!length;
  4361. for (var key in value) {
  4362. if ((inherited || hasOwnProperty.call(value, key)) &&
  4363. !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
  4364. result.push(key);
  4365. }
  4366. }
  4367. return result;
  4368. }
  4369. /**
  4370. * Assigns `value` to `key` of `object` if the existing value is not equivalent
  4371. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  4372. * for equality comparisons.
  4373. *
  4374. * @private
  4375. * @param {Object} object The object to modify.
  4376. * @param {string} key The key of the property to assign.
  4377. * @param {*} value The value to assign.
  4378. */
  4379. function assignValue(object, key, value) {
  4380. var objValue = object[key];
  4381. if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
  4382. (value === undefined && !(key in object))) {
  4383. object[key] = value;
  4384. }
  4385. }
  4386. /**
  4387. * Gets the index at which the `key` is found in `array` of key-value pairs.
  4388. *
  4389. * @private
  4390. * @param {Array} array The array to inspect.
  4391. * @param {*} key The key to search for.
  4392. * @returns {number} Returns the index of the matched value, else `-1`.
  4393. */
  4394. function assocIndexOf(array, key) {
  4395. var length = array.length;
  4396. while (length--) {
  4397. if (eq(array[length][0], key)) {
  4398. return length;
  4399. }
  4400. }
  4401. return -1;
  4402. }
  4403. /**
  4404. * The base implementation of `_.assign` without support for multiple sources
  4405. * or `customizer` functions.
  4406. *
  4407. * @private
  4408. * @param {Object} object The destination object.
  4409. * @param {Object} source The source object.
  4410. * @returns {Object} Returns `object`.
  4411. */
  4412. function baseAssign(object, source) {
  4413. return object && copyObject(source, keys(source), object);
  4414. }
  4415. /**
  4416. * The base implementation of `_.clone` and `_.cloneDeep` which tracks
  4417. * traversed objects.
  4418. *
  4419. * @private
  4420. * @param {*} value The value to clone.
  4421. * @param {boolean} [isDeep] Specify a deep clone.
  4422. * @param {boolean} [isFull] Specify a clone including symbols.
  4423. * @param {Function} [customizer] The function to customize cloning.
  4424. * @param {string} [key] The key of `value`.
  4425. * @param {Object} [object] The parent object of `value`.
  4426. * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
  4427. * @returns {*} Returns the cloned value.
  4428. */
  4429. function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
  4430. var result;
  4431. if (customizer) {
  4432. result = object ? customizer(value, key, object, stack) : customizer(value);
  4433. }
  4434. if (result !== undefined) {
  4435. return result;
  4436. }
  4437. if (!isObject(value)) {
  4438. return value;
  4439. }
  4440. var isArr = isArray(value);
  4441. if (isArr) {
  4442. result = initCloneArray(value);
  4443. if (!isDeep) {
  4444. return copyArray(value, result);
  4445. }
  4446. } else {
  4447. var tag = getTag(value),
  4448. isFunc = tag == funcTag || tag == genTag;
  4449. if (isBuffer(value)) {
  4450. return cloneBuffer(value, isDeep);
  4451. }
  4452. if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
  4453. if (isHostObject(value)) {
  4454. return object ? value : {};
  4455. }
  4456. result = initCloneObject(isFunc ? {} : value);
  4457. if (!isDeep) {
  4458. return copySymbols(value, baseAssign(result, value));
  4459. }
  4460. } else {
  4461. if (!cloneableTags[tag]) {
  4462. return object ? value : {};
  4463. }
  4464. result = initCloneByTag(value, tag, baseClone, isDeep);
  4465. }
  4466. }
  4467. // Check for circular references and return its corresponding clone.
  4468. stack || (stack = new Stack);
  4469. var stacked = stack.get(value);
  4470. if (stacked) {
  4471. return stacked;
  4472. }
  4473. stack.set(value, result);
  4474. if (!isArr) {
  4475. var props = isFull ? getAllKeys(value) : keys(value);
  4476. }
  4477. arrayEach(props || value, function(subValue, key) {
  4478. if (props) {
  4479. key = subValue;
  4480. subValue = value[key];
  4481. }
  4482. // Recursively populate clone (susceptible to call stack limits).
  4483. assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));
  4484. });
  4485. return result;
  4486. }
  4487. /**
  4488. * The base implementation of `_.create` without support for assigning
  4489. * properties to the created object.
  4490. *
  4491. * @private
  4492. * @param {Object} prototype The object to inherit from.
  4493. * @returns {Object} Returns the new object.
  4494. */
  4495. function baseCreate(proto) {
  4496. return isObject(proto) ? objectCreate(proto) : {};
  4497. }
  4498. /**
  4499. * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
  4500. * `keysFunc` and `symbolsFunc` to get the enumerable property names and
  4501. * symbols of `object`.
  4502. *
  4503. * @private
  4504. * @param {Object} object The object to query.
  4505. * @param {Function} keysFunc The function to get the keys of `object`.
  4506. * @param {Function} symbolsFunc The function to get the symbols of `object`.
  4507. * @returns {Array} Returns the array of property names and symbols.
  4508. */
  4509. function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  4510. var result = keysFunc(object);
  4511. return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
  4512. }
  4513. /**
  4514. * The base implementation of `getTag`.
  4515. *
  4516. * @private
  4517. * @param {*} value The value to query.
  4518. * @returns {string} Returns the `toStringTag`.
  4519. */
  4520. function baseGetTag(value) {
  4521. return objectToString.call(value);
  4522. }
  4523. /**
  4524. * The base implementation of `_.isNative` without bad shim checks.
  4525. *
  4526. * @private
  4527. * @param {*} value The value to check.
  4528. * @returns {boolean} Returns `true` if `value` is a native function,
  4529. * else `false`.
  4530. */
  4531. function baseIsNative(value) {
  4532. if (!isObject(value) || isMasked(value)) {
  4533. return false;
  4534. }
  4535. var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
  4536. return pattern.test(toSource(value));
  4537. }
  4538. /**
  4539. * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
  4540. *
  4541. * @private
  4542. * @param {Object} object The object to query.
  4543. * @returns {Array} Returns the array of property names.
  4544. */
  4545. function baseKeys(object) {
  4546. if (!isPrototype(object)) {
  4547. return nativeKeys(object);
  4548. }
  4549. var result = [];
  4550. for (var key in Object(object)) {
  4551. if (hasOwnProperty.call(object, key) && key != 'constructor') {
  4552. result.push(key);
  4553. }
  4554. }
  4555. return result;
  4556. }
  4557. /**
  4558. * Creates a clone of `buffer`.
  4559. *
  4560. * @private
  4561. * @param {Buffer} buffer The buffer to clone.
  4562. * @param {boolean} [isDeep] Specify a deep clone.
  4563. * @returns {Buffer} Returns the cloned buffer.
  4564. */
  4565. function cloneBuffer(buffer, isDeep) {
  4566. if (isDeep) {
  4567. return buffer.slice();
  4568. }
  4569. var result = new buffer.constructor(buffer.length);
  4570. buffer.copy(result);
  4571. return result;
  4572. }
  4573. /**
  4574. * Creates a clone of `arrayBuffer`.
  4575. *
  4576. * @private
  4577. * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
  4578. * @returns {ArrayBuffer} Returns the cloned array buffer.
  4579. */
  4580. function cloneArrayBuffer(arrayBuffer) {
  4581. var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
  4582. new Uint8Array(result).set(new Uint8Array(arrayBuffer));
  4583. return result;
  4584. }
  4585. /**
  4586. * Creates a clone of `dataView`.
  4587. *
  4588. * @private
  4589. * @param {Object} dataView The data view to clone.
  4590. * @param {boolean} [isDeep] Specify a deep clone.
  4591. * @returns {Object} Returns the cloned data view.
  4592. */
  4593. function cloneDataView(dataView, isDeep) {
  4594. var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
  4595. return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
  4596. }
  4597. /**
  4598. * Creates a clone of `map`.
  4599. *
  4600. * @private
  4601. * @param {Object} map The map to clone.
  4602. * @param {Function} cloneFunc The function to clone values.
  4603. * @param {boolean} [isDeep] Specify a deep clone.
  4604. * @returns {Object} Returns the cloned map.
  4605. */
  4606. function cloneMap(map, isDeep, cloneFunc) {
  4607. var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);
  4608. return arrayReduce(array, addMapEntry, new map.constructor);
  4609. }
  4610. /**
  4611. * Creates a clone of `regexp`.
  4612. *
  4613. * @private
  4614. * @param {Object} regexp The regexp to clone.
  4615. * @returns {Object} Returns the cloned regexp.
  4616. */
  4617. function cloneRegExp(regexp) {
  4618. var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
  4619. result.lastIndex = regexp.lastIndex;
  4620. return result;
  4621. }
  4622. /**
  4623. * Creates a clone of `set`.
  4624. *
  4625. * @private
  4626. * @param {Object} set The set to clone.
  4627. * @param {Function} cloneFunc The function to clone values.
  4628. * @param {boolean} [isDeep] Specify a deep clone.
  4629. * @returns {Object} Returns the cloned set.
  4630. */
  4631. function cloneSet(set, isDeep, cloneFunc) {
  4632. var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);
  4633. return arrayReduce(array, addSetEntry, new set.constructor);
  4634. }
  4635. /**
  4636. * Creates a clone of the `symbol` object.
  4637. *
  4638. * @private
  4639. * @param {Object} symbol The symbol object to clone.
  4640. * @returns {Object} Returns the cloned symbol object.
  4641. */
  4642. function cloneSymbol(symbol) {
  4643. return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
  4644. }
  4645. /**
  4646. * Creates a clone of `typedArray`.
  4647. *
  4648. * @private
  4649. * @param {Object} typedArray The typed array to clone.
  4650. * @param {boolean} [isDeep] Specify a deep clone.
  4651. * @returns {Object} Returns the cloned typed array.
  4652. */
  4653. function cloneTypedArray(typedArray, isDeep) {
  4654. var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  4655. return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
  4656. }
  4657. /**
  4658. * Copies the values of `source` to `array`.
  4659. *
  4660. * @private
  4661. * @param {Array} source The array to copy values from.
  4662. * @param {Array} [array=[]] The array to copy values to.
  4663. * @returns {Array} Returns `array`.
  4664. */
  4665. function copyArray(source, array) {
  4666. var index = -1,
  4667. length = source.length;
  4668. array || (array = Array(length));
  4669. while (++index < length) {
  4670. array[index] = source[index];
  4671. }
  4672. return array;
  4673. }
  4674. /**
  4675. * Copies properties of `source` to `object`.
  4676. *
  4677. * @private
  4678. * @param {Object} source The object to copy properties from.
  4679. * @param {Array} props The property identifiers to copy.
  4680. * @param {Object} [object={}] The object to copy properties to.
  4681. * @param {Function} [customizer] The function to customize copied values.
  4682. * @returns {Object} Returns `object`.
  4683. */
  4684. function copyObject(source, props, object, customizer) {
  4685. object || (object = {});
  4686. var index = -1,
  4687. length = props.length;
  4688. while (++index < length) {
  4689. var key = props[index];
  4690. var newValue = customizer
  4691. ? customizer(object[key], source[key], key, object, source)
  4692. : undefined;
  4693. assignValue(object, key, newValue === undefined ? source[key] : newValue);
  4694. }
  4695. return object;
  4696. }
  4697. /**
  4698. * Copies own symbol properties of `source` to `object`.
  4699. *
  4700. * @private
  4701. * @param {Object} source The object to copy symbols from.
  4702. * @param {Object} [object={}] The object to copy symbols to.
  4703. * @returns {Object} Returns `object`.
  4704. */
  4705. function copySymbols(source, object) {
  4706. return copyObject(source, getSymbols(source), object);
  4707. }
  4708. /**
  4709. * Creates an array of own enumerable property names and symbols of `object`.
  4710. *
  4711. * @private
  4712. * @param {Object} object The object to query.
  4713. * @returns {Array} Returns the array of property names and symbols.
  4714. */
  4715. function getAllKeys(object) {
  4716. return baseGetAllKeys(object, keys, getSymbols);
  4717. }
  4718. /**
  4719. * Gets the data for `map`.
  4720. *
  4721. * @private
  4722. * @param {Object} map The map to query.
  4723. * @param {string} key The reference key.
  4724. * @returns {*} Returns the map data.
  4725. */
  4726. function getMapData(map, key) {
  4727. var data = map.__data__;
  4728. return isKeyable(key)
  4729. ? data[typeof key == 'string' ? 'string' : 'hash']
  4730. : data.map;
  4731. }
  4732. /**
  4733. * Gets the native function at `key` of `object`.
  4734. *
  4735. * @private
  4736. * @param {Object} object The object to query.
  4737. * @param {string} key The key of the method to get.
  4738. * @returns {*} Returns the function if it's native, else `undefined`.
  4739. */
  4740. function getNative(object, key) {
  4741. var value = getValue(object, key);
  4742. return baseIsNative(value) ? value : undefined;
  4743. }
  4744. /**
  4745. * Creates an array of the own enumerable symbol properties of `object`.
  4746. *
  4747. * @private
  4748. * @param {Object} object The object to query.
  4749. * @returns {Array} Returns the array of symbols.
  4750. */
  4751. var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
  4752. /**
  4753. * Gets the `toStringTag` of `value`.
  4754. *
  4755. * @private
  4756. * @param {*} value The value to query.
  4757. * @returns {string} Returns the `toStringTag`.
  4758. */
  4759. var getTag = baseGetTag;
  4760. // Fallback for data views, maps, sets, and weak maps in IE 11,
  4761. // for data views in Edge < 14, and promises in Node.js.
  4762. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
  4763. (Map && getTag(new Map) != mapTag) ||
  4764. (Promise && getTag(Promise.resolve()) != promiseTag) ||
  4765. (Set && getTag(new Set) != setTag) ||
  4766. (WeakMap && getTag(new WeakMap) != weakMapTag)) {
  4767. getTag = function(value) {
  4768. var result = objectToString.call(value),
  4769. Ctor = result == objectTag ? value.constructor : undefined,
  4770. ctorString = Ctor ? toSource(Ctor) : undefined;
  4771. if (ctorString) {
  4772. switch (ctorString) {
  4773. case dataViewCtorString: return dataViewTag;
  4774. case mapCtorString: return mapTag;
  4775. case promiseCtorString: return promiseTag;
  4776. case setCtorString: return setTag;
  4777. case weakMapCtorString: return weakMapTag;
  4778. }
  4779. }
  4780. return result;
  4781. };
  4782. }
  4783. /**
  4784. * Initializes an array clone.
  4785. *
  4786. * @private
  4787. * @param {Array} array The array to clone.
  4788. * @returns {Array} Returns the initialized clone.
  4789. */
  4790. function initCloneArray(array) {
  4791. var length = array.length,
  4792. result = array.constructor(length);
  4793. // Add properties assigned by `RegExp#exec`.
  4794. if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
  4795. result.index = array.index;
  4796. result.input = array.input;
  4797. }
  4798. return result;
  4799. }
  4800. /**
  4801. * Initializes an object clone.
  4802. *
  4803. * @private
  4804. * @param {Object} object The object to clone.
  4805. * @returns {Object} Returns the initialized clone.
  4806. */
  4807. function initCloneObject(object) {
  4808. return (typeof object.constructor == 'function' && !isPrototype(object))
  4809. ? baseCreate(getPrototype(object))
  4810. : {};
  4811. }
  4812. /**
  4813. * Initializes an object clone based on its `toStringTag`.
  4814. *
  4815. * **Note:** This function only supports cloning values with tags of
  4816. * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
  4817. *
  4818. * @private
  4819. * @param {Object} object The object to clone.
  4820. * @param {string} tag The `toStringTag` of the object to clone.
  4821. * @param {Function} cloneFunc The function to clone values.
  4822. * @param {boolean} [isDeep] Specify a deep clone.
  4823. * @returns {Object} Returns the initialized clone.
  4824. */
  4825. function initCloneByTag(object, tag, cloneFunc, isDeep) {
  4826. var Ctor = object.constructor;
  4827. switch (tag) {
  4828. case arrayBufferTag:
  4829. return cloneArrayBuffer(object);
  4830. case boolTag:
  4831. case dateTag:
  4832. return new Ctor(+object);
  4833. case dataViewTag:
  4834. return cloneDataView(object, isDeep);
  4835. case float32Tag: case float64Tag:
  4836. case int8Tag: case int16Tag: case int32Tag:
  4837. case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
  4838. return cloneTypedArray(object, isDeep);
  4839. case mapTag:
  4840. return cloneMap(object, isDeep, cloneFunc);
  4841. case numberTag:
  4842. case stringTag:
  4843. return new Ctor(object);
  4844. case regexpTag:
  4845. return cloneRegExp(object);
  4846. case setTag:
  4847. return cloneSet(object, isDeep, cloneFunc);
  4848. case symbolTag:
  4849. return cloneSymbol(object);
  4850. }
  4851. }
  4852. /**
  4853. * Checks if `value` is a valid array-like index.
  4854. *
  4855. * @private
  4856. * @param {*} value The value to check.
  4857. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  4858. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  4859. */
  4860. function isIndex(value, length) {
  4861. length = length == null ? MAX_SAFE_INTEGER : length;
  4862. return !!length &&
  4863. (typeof value == 'number' || reIsUint.test(value)) &&
  4864. (value > -1 && value % 1 == 0 && value < length);
  4865. }
  4866. /**
  4867. * Checks if `value` is suitable for use as unique object key.
  4868. *
  4869. * @private
  4870. * @param {*} value The value to check.
  4871. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  4872. */
  4873. function isKeyable(value) {
  4874. var type = typeof value;
  4875. return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
  4876. ? (value !== '__proto__')
  4877. : (value === null);
  4878. }
  4879. /**
  4880. * Checks if `func` has its source masked.
  4881. *
  4882. * @private
  4883. * @param {Function} func The function to check.
  4884. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  4885. */
  4886. function isMasked(func) {
  4887. return !!maskSrcKey && (maskSrcKey in func);
  4888. }
  4889. /**
  4890. * Checks if `value` is likely a prototype object.
  4891. *
  4892. * @private
  4893. * @param {*} value The value to check.
  4894. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
  4895. */
  4896. function isPrototype(value) {
  4897. var Ctor = value && value.constructor,
  4898. proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
  4899. return value === proto;
  4900. }
  4901. /**
  4902. * Converts `func` to its source code.
  4903. *
  4904. * @private
  4905. * @param {Function} func The function to process.
  4906. * @returns {string} Returns the source code.
  4907. */
  4908. function toSource(func) {
  4909. if (func != null) {
  4910. try {
  4911. return funcToString.call(func);
  4912. } catch (e) {}
  4913. try {
  4914. return (func + '');
  4915. } catch (e) {}
  4916. }
  4917. return '';
  4918. }
  4919. /**
  4920. * This method is like `_.clone` except that it recursively clones `value`.
  4921. *
  4922. * @static
  4923. * @memberOf _
  4924. * @since 1.0.0
  4925. * @category Lang
  4926. * @param {*} value The value to recursively clone.
  4927. * @returns {*} Returns the deep cloned value.
  4928. * @see _.clone
  4929. * @example
  4930. *
  4931. * var objects = [{ 'a': 1 }, { 'b': 2 }];
  4932. *
  4933. * var deep = _.cloneDeep(objects);
  4934. * console.log(deep[0] === objects[0]);
  4935. * // => false
  4936. */
  4937. function cloneDeep(value) {
  4938. return baseClone(value, true, true);
  4939. }
  4940. /**
  4941. * Performs a
  4942. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  4943. * comparison between two values to determine if they are equivalent.
  4944. *
  4945. * @static
  4946. * @memberOf _
  4947. * @since 4.0.0
  4948. * @category Lang
  4949. * @param {*} value The value to compare.
  4950. * @param {*} other The other value to compare.
  4951. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  4952. * @example
  4953. *
  4954. * var object = { 'a': 1 };
  4955. * var other = { 'a': 1 };
  4956. *
  4957. * _.eq(object, object);
  4958. * // => true
  4959. *
  4960. * _.eq(object, other);
  4961. * // => false
  4962. *
  4963. * _.eq('a', 'a');
  4964. * // => true
  4965. *
  4966. * _.eq('a', Object('a'));
  4967. * // => false
  4968. *
  4969. * _.eq(NaN, NaN);
  4970. * // => true
  4971. */
  4972. function eq(value, other) {
  4973. return value === other || (value !== value && other !== other);
  4974. }
  4975. /**
  4976. * Checks if `value` is likely an `arguments` object.
  4977. *
  4978. * @static
  4979. * @memberOf _
  4980. * @since 0.1.0
  4981. * @category Lang
  4982. * @param {*} value The value to check.
  4983. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  4984. * else `false`.
  4985. * @example
  4986. *
  4987. * _.isArguments(function() { return arguments; }());
  4988. * // => true
  4989. *
  4990. * _.isArguments([1, 2, 3]);
  4991. * // => false
  4992. */
  4993. function isArguments(value) {
  4994. // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
  4995. return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
  4996. (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
  4997. }
  4998. /**
  4999. * Checks if `value` is classified as an `Array` object.
  5000. *
  5001. * @static
  5002. * @memberOf _
  5003. * @since 0.1.0
  5004. * @category Lang
  5005. * @param {*} value The value to check.
  5006. * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  5007. * @example
  5008. *
  5009. * _.isArray([1, 2, 3]);
  5010. * // => true
  5011. *
  5012. * _.isArray(document.body.children);
  5013. * // => false
  5014. *
  5015. * _.isArray('abc');
  5016. * // => false
  5017. *
  5018. * _.isArray(_.noop);
  5019. * // => false
  5020. */
  5021. var isArray = Array.isArray;
  5022. /**
  5023. * Checks if `value` is array-like. A value is considered array-like if it's
  5024. * not a function and has a `value.length` that's an integer greater than or
  5025. * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
  5026. *
  5027. * @static
  5028. * @memberOf _
  5029. * @since 4.0.0
  5030. * @category Lang
  5031. * @param {*} value The value to check.
  5032. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  5033. * @example
  5034. *
  5035. * _.isArrayLike([1, 2, 3]);
  5036. * // => true
  5037. *
  5038. * _.isArrayLike(document.body.children);
  5039. * // => true
  5040. *
  5041. * _.isArrayLike('abc');
  5042. * // => true
  5043. *
  5044. * _.isArrayLike(_.noop);
  5045. * // => false
  5046. */
  5047. function isArrayLike(value) {
  5048. return value != null && isLength(value.length) && !isFunction(value);
  5049. }
  5050. /**
  5051. * This method is like `_.isArrayLike` except that it also checks if `value`
  5052. * is an object.
  5053. *
  5054. * @static
  5055. * @memberOf _
  5056. * @since 4.0.0
  5057. * @category Lang
  5058. * @param {*} value The value to check.
  5059. * @returns {boolean} Returns `true` if `value` is an array-like object,
  5060. * else `false`.
  5061. * @example
  5062. *
  5063. * _.isArrayLikeObject([1, 2, 3]);
  5064. * // => true
  5065. *
  5066. * _.isArrayLikeObject(document.body.children);
  5067. * // => true
  5068. *
  5069. * _.isArrayLikeObject('abc');
  5070. * // => false
  5071. *
  5072. * _.isArrayLikeObject(_.noop);
  5073. * // => false
  5074. */
  5075. function isArrayLikeObject(value) {
  5076. return isObjectLike(value) && isArrayLike(value);
  5077. }
  5078. /**
  5079. * Checks if `value` is a buffer.
  5080. *
  5081. * @static
  5082. * @memberOf _
  5083. * @since 4.3.0
  5084. * @category Lang
  5085. * @param {*} value The value to check.
  5086. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
  5087. * @example
  5088. *
  5089. * _.isBuffer(new Buffer(2));
  5090. * // => true
  5091. *
  5092. * _.isBuffer(new Uint8Array(2));
  5093. * // => false
  5094. */
  5095. var isBuffer = nativeIsBuffer || stubFalse;
  5096. /**
  5097. * Checks if `value` is classified as a `Function` object.
  5098. *
  5099. * @static
  5100. * @memberOf _
  5101. * @since 0.1.0
  5102. * @category Lang
  5103. * @param {*} value The value to check.
  5104. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  5105. * @example
  5106. *
  5107. * _.isFunction(_);
  5108. * // => true
  5109. *
  5110. * _.isFunction(/abc/);
  5111. * // => false
  5112. */
  5113. function isFunction(value) {
  5114. // The use of `Object#toString` avoids issues with the `typeof` operator
  5115. // in Safari 8-9 which returns 'object' for typed array and other constructors.
  5116. var tag = isObject(value) ? objectToString.call(value) : '';
  5117. return tag == funcTag || tag == genTag;
  5118. }
  5119. /**
  5120. * Checks if `value` is a valid array-like length.
  5121. *
  5122. * **Note:** This method is loosely based on
  5123. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  5124. *
  5125. * @static
  5126. * @memberOf _
  5127. * @since 4.0.0
  5128. * @category Lang
  5129. * @param {*} value The value to check.
  5130. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  5131. * @example
  5132. *
  5133. * _.isLength(3);
  5134. * // => true
  5135. *
  5136. * _.isLength(Number.MIN_VALUE);
  5137. * // => false
  5138. *
  5139. * _.isLength(Infinity);
  5140. * // => false
  5141. *
  5142. * _.isLength('3');
  5143. * // => false
  5144. */
  5145. function isLength(value) {
  5146. return typeof value == 'number' &&
  5147. value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  5148. }
  5149. /**
  5150. * Checks if `value` is the
  5151. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  5152. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  5153. *
  5154. * @static
  5155. * @memberOf _
  5156. * @since 0.1.0
  5157. * @category Lang
  5158. * @param {*} value The value to check.
  5159. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  5160. * @example
  5161. *
  5162. * _.isObject({});
  5163. * // => true
  5164. *
  5165. * _.isObject([1, 2, 3]);
  5166. * // => true
  5167. *
  5168. * _.isObject(_.noop);
  5169. * // => true
  5170. *
  5171. * _.isObject(null);
  5172. * // => false
  5173. */
  5174. function isObject(value) {
  5175. var type = typeof value;
  5176. return !!value && (type == 'object' || type == 'function');
  5177. }
  5178. /**
  5179. * Checks if `value` is object-like. A value is object-like if it's not `null`
  5180. * and has a `typeof` result of "object".
  5181. *
  5182. * @static
  5183. * @memberOf _
  5184. * @since 4.0.0
  5185. * @category Lang
  5186. * @param {*} value The value to check.
  5187. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  5188. * @example
  5189. *
  5190. * _.isObjectLike({});
  5191. * // => true
  5192. *
  5193. * _.isObjectLike([1, 2, 3]);
  5194. * // => true
  5195. *
  5196. * _.isObjectLike(_.noop);
  5197. * // => false
  5198. *
  5199. * _.isObjectLike(null);
  5200. * // => false
  5201. */
  5202. function isObjectLike(value) {
  5203. return !!value && typeof value == 'object';
  5204. }
  5205. /**
  5206. * Creates an array of the own enumerable property names of `object`.
  5207. *
  5208. * **Note:** Non-object values are coerced to objects. See the
  5209. * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  5210. * for more details.
  5211. *
  5212. * @static
  5213. * @since 0.1.0
  5214. * @memberOf _
  5215. * @category Object
  5216. * @param {Object} object The object to query.
  5217. * @returns {Array} Returns the array of property names.
  5218. * @example
  5219. *
  5220. * function Foo() {
  5221. * this.a = 1;
  5222. * this.b = 2;
  5223. * }
  5224. *
  5225. * Foo.prototype.c = 3;
  5226. *
  5227. * _.keys(new Foo);
  5228. * // => ['a', 'b'] (iteration order is not guaranteed)
  5229. *
  5230. * _.keys('hi');
  5231. * // => ['0', '1']
  5232. */
  5233. function keys(object) {
  5234. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  5235. }
  5236. /**
  5237. * This method returns a new empty array.
  5238. *
  5239. * @static
  5240. * @memberOf _
  5241. * @since 4.13.0
  5242. * @category Util
  5243. * @returns {Array} Returns the new empty array.
  5244. * @example
  5245. *
  5246. * var arrays = _.times(2, _.stubArray);
  5247. *
  5248. * console.log(arrays);
  5249. * // => [[], []]
  5250. *
  5251. * console.log(arrays[0] === arrays[1]);
  5252. * // => false
  5253. */
  5254. function stubArray() {
  5255. return [];
  5256. }
  5257. /**
  5258. * This method returns `false`.
  5259. *
  5260. * @static
  5261. * @memberOf _
  5262. * @since 4.13.0
  5263. * @category Util
  5264. * @returns {boolean} Returns `false`.
  5265. * @example
  5266. *
  5267. * _.times(2, _.stubFalse);
  5268. * // => [false, false]
  5269. */
  5270. function stubFalse() {
  5271. return false;
  5272. }
  5273. module.exports = cloneDeep;
  5274. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("698d"), __webpack_require__("f586")(module)))
  5275. /***/ }),
  5276. /***/ "279f":
  5277. /***/ (function(module, exports) {
  5278. function _defineProperty(obj, key, value) {
  5279. if (key in obj) {
  5280. Object.defineProperty(obj, key, {
  5281. value: value,
  5282. enumerable: true,
  5283. configurable: true,
  5284. writable: true
  5285. });
  5286. } else {
  5287. obj[key] = value;
  5288. }
  5289. return obj;
  5290. }
  5291. module.exports = _defineProperty;
  5292. /***/ }),
  5293. /***/ "27f6":
  5294. /***/ (function(module, exports) {
  5295. function _assertThisInitialized(self) {
  5296. if (self === void 0) {
  5297. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  5298. }
  5299. return self;
  5300. }
  5301. module.exports = _assertThisInitialized;
  5302. /***/ }),
  5303. /***/ "29e0":
  5304. /***/ (function(module, exports) {
  5305. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhYAAAD+CAYAAABmz0wVAAAABGdBTUEAALGPC/xhBQAADb5JREFUeAHt3bGK3QkdhuFzJhtRsNRyr8DOQiHaiJ3LFILiDdhpZ7Gla2lhpxchLliE2AoSU1gIFlvY2FiK2AgK2Z1xpghvsUyW5Jt1T2aeNPvtzvzO/M9zin0hgRwPd/DX9y8vH/z2ybOfX15e/uQOvr2Tf0vH4/EX333n0bu/OR4/OvmH9YAECBAgcKsCx1t9tRN4sS/+7s9f/u/Ff359FRXfOoHHubePcBUXv//82Rd+8O/vfPUf9xbBGydAgMA9FLhTYfHw8bOvXRwu3r/6HN++h5/lKb7lv58dzr73/PzRn07x4TwTAQJ3R+DB46eXd+fdfPydfHT+zTfm/9dnH3/8N/O/PHzy9IcXx4s/XD29qDidj/Dt68/k+rM5nUfyJAQIECDwaQoc73rlfZp4XpsAAQIECBAgQIAAAQIECBAgQIAAAQIECBA4dYE35g+DnBrkm/5bSG/SHwQ6tc/e8xAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAgbslcLz6y7q+dLfekndDgAABAgQIfFYCd+bvCvmsAP1cAgQIECBAIAFhkYVFgAABAgQIjALCYgR0ToAAAQIECCQgLLKwCBAgQIAAgVFAWIyAzgkQIECAAIEEhEUWFgECBAgQIDAKCIsR0DkBAgQIECCQgLDIwiJAgAABAgRGAWExAjonQIAAAQIEEhAWWVgECBAgQIDAKCAsRkDnBAgQIECAQALCIguLAAECBAgQGAWExQjonAABAgQIEEhAWGRhESBAgAABAqOAsBgBnRMgQIAAAQIJCIssLAIECBAgQGAUEBYjoHMCBAgQIEAgAWGRhUWAAAECBAiMAsJiBHROgAABAgQIJCAssrAIECBAgACBUUBYjIDOCRAgQIAAgQSERRYWAQIECBAgMAoIixHQOQECBAgQIJCAsMjCIkCAAAECBEYBYTECOidAgAABAgQSEBZZWAQIECBAgMAoICxGQOcECBAgQIBAAsIiC4sAAQIECBAYBYTFCOicAAECBAgQSEBYZGERIECAAAECo4CwGAGdEyBAgAABAgkIiywsAgQIECBAYBQQFiOgcwIECBAgQCABYZGFRYAAAQIECIwCwmIEdE6AAAECBAgkICyysAgQIECAAIFRQFiMgM4JECBAgACBBIRFFhYBAgQIECAwCgiLEdA5AQIECBAgkICwyMIiQIAAAQIERgFhMQI6J0CAAAECBBIQFllYBAgQIECAwCggLEZA5wQIECBAgEACwiILiwABAgQIEBgFhMUI6JwAAQIECBBIQFhkYREgQIAAAQKjgLAYAZ0TIECAAAECCQiLLCwCBAgQIEBgFBAWI6BzAgQIECBAIAFhkYVFgAABAgQIjALCYgR0ToAAAQIECCQgLLKwCBAgQIAAgVFAWIyAzgkQIECAAIEEhEUWFgECBAgQIDAKCIsR0DkBAgQIECCQgLDIwiJAgAABAgRGAWExAjonQIAAAQIEEhAWWVgECBAgQIDAKCAsRkDnBAgQIECAQALCIguLAAECBAgQGAWExQjonAABAgQIEEhAWGRhESBAgAABAqOAsBgBnRMgQIAAAQIJCIssLAIECBAgQGAUEBYjoHMCBAgQIEAgAWGRhUWAAAECBAiMAsJiBHROgAABAgQIJCAssrAIECBAgACBUUBYjIDOCRAgQIAAgQSERRYWAQIECBAgMAoIixHQOQECBAgQIJCAsMjCIkCAAAECBEYBYTECOidAgAABAgQSEBZZWAQIECBAgMAoICxGQOcECBAgQIBAAsIiC4sAAQIECBAYBYTFCOicAAECBAgQSEBYZGERIECAAAECo4CwGAGdEyBAgAABAgkIiywsAgQIECBAYBQQFiOgcwIECBAgQCABYZGFRYAAAQIECIwCwmIEdE6AAAECBAgkICyysAgQIECAAIFRQFiMgM4JECBAgACBBIRFFhYBAgQIECAwCgiLEdA5AQIECBAgkICwyMIiQIAAAQIERgFhMQI6J0CAAAECBBIQFllYBAgQIECAwCggLEZA5wQIECBAgEACwiILiwABAgQIEBgFhMUI6JwAAQIECBBIQFhkYREgQIAAAQKjgLAYAZ0TIECAAAECCQiLLCwCBAgQIEBgFBAWI6BzAgQIECBAIAFhkYVFgAABAgQIjALCYgR0ToAAAQIECCQgLLKwCBAgQIAAgVFAWIyAzgkQIECAAIEEhEUWFgECBAgQIDAKCIsR0DkBAgQIECCQgLDIwiJAgAABAgRGAWExAjonQIAAAQIEEhAWWVgECBAgQIDAKCAsRkDnBAgQIECAQALCIguLAAECBAgQGAWExQjonAABAgQIEEhAWGRhESBAgAABAqOAsBgBnRMgQIAAAQIJCIssLAIECBAgQGAUEBYjoHMCBAgQIEAgAWGRhUWAAAECBAiMAsJiBHROgAABAgQIJCAssrAIECBAgACBUUBYjIDOCRAgQIAAgQSERRYWAQIECBAgMAoIixHQOQECBAgQIJCAsMjCIkCAAAECBEYBYTECOidAgAABAgQSEBZZWAQIECBAgMAoICxGQOcECBAgQIBAAsIiC4sAAQIECBAYBYTFCOicAAECBAgQSEBYZGERIECAAAECo4CwGAGdEyBAgAABAgkIiywsAgQIECBAYBQQFiOgcwIECBAgQCABYZGFRYAAAQIECIwCwmIEdE6AAAECBAgkICyysAgQIECAAIFRQFiMgM4JECBAgACBBIRFFhYBAgQIECAwCgiLEdA5AQIECBAgkICwyMIiQIAAAQIERgFhMQI6J0CAAAECBBIQFllYBAgQIECAwCggLEZA5wQIECBAgEACwiILiwABAgQIEBgFhMUI6JwAAQIECBBIQFhkYREgQIAAAQKjgLAYAZ0TIECAAAECCQiLLCwCBAgQIEBgFBAWI6BzAgQIECBAIAFhkYVFgAABAgQIjALCYgR0ToAAAQIECCQgLLKwCBAgQIAAgVFAWIyAzgkQIECAAIEEhEUWFgECBAgQIDAKCIsR0DkBAgQIECCQgLDIwiJAgAABAgRGAWExAjonQIAAAQIEEhAWWVgECBAgQIDAKCAsRkDnBAgQIECAQALCIguLAAECBAgQGAWExQjonAABAgQIEEhAWGRhESBAgAABAqOAsBgBnRMgQIAAAQIJCIssLAIECBAgQGAUEBYjoHMCBAgQIEAgAWGRhUWAAAECBAiMAsJiBHROgAABAgQIJCAssrAIECBAgACBUUBYjIDOCRAgQIAAgQSERRYWAQIECBAgMAoIixHQOQECBAgQIJCAsMjCIkCAAAECBEYBYTECOidAgAABAgQSEBZZWAQIECBAgMAoICxGQOcECBAgQIBAAsIiC4sAAQIECBAYBYTFCOicAAECBAgQSEBYZGERIECAAAECo4CwGAGdEyBAgAABAgkIiywsAgQIECBAYBQQFiOgcwIECBAgQCABYZGFRYAAAQIECIwCwmIEdE6AAAECBAgkICyysAgQIECAAIFRQFiMgM4JECBAgACBBIRFFhYBAgQIECAwCgiLEdA5AQIECBAgkICwyMIiQIAAAQIERgFhMQI6J0CAAAECBBIQFllYBAgQIECAwCggLEZA5wQIECBAgEACwiILiwABAgQIEBgFhMUI6JwAAQIECBBIQFhkYREgQIAAAQKjgLAYAZ0TIECAAAECCQiLLCwCBAgQIEBgFBAWI6BzAgQIECBAIAFhkYVFgAABAgQIjALCYgR0ToAAAQIECCQgLLKwCBAgQIAAgVFAWIyAzgkQIECAAIEEhEUWFgECBAgQIDAKCIsR0DkBAgQIECCQgLDIwiJAgAABAgRGAWExAjonQIAAAQIEEhAWWVgECBAgQIDAKCAsRkDnBAgQIECAQALCIguLAAECBAgQGAWExQjonAABAgQIEEhAWGRhESBAgAABAqOAsBgBnRMgQIAAAQIJCIssLAIECBAgQGAUEBYjoHMCBAgQIEAgAWGRhUWAAAECBAiMAsJiBHROgAABAgQIJCAssrAIECBAgACBUUBYjIDOCRAgQIAAgQSERRYWAQIECBAgMAoIixHQOQECBAgQIJCAsMjCIkCAAAECBEYBYTECOidAgAABAgQSEBZZWAQIECBAgMAoICxGQOcECBAgQIBAAsIiC4sAAQIECBAYBYTFCOicAAECBAgQSEBYZGERIECAAAECo4CwGAGdEyBAgAABAgkIiywsAgQIECBAYBQQFiOgcwIECBAgQCABYZGFRYAAAQIECIwCwmIEdE6AAAECBAgkICyysAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAEC91DgeA/fs7dMgAABAv8HgYdPnv3o4uLil9c/6uzs7MfP33n0qxc/9ra/9pUPPvjcX//2r/cvD4fzw+H4z7PDW99+fv71v7z4eW89/uN7l4fLn774d/+8WeB4OP7sw/NvvHfzd7z8K8Li5T6+SoAAAQKvIXDb4XD9CDe9pqh4jQ/oE06WuBAWn4DrywQIECDwagI3BcD1q9z210TFq302r/LdrxsXwuJVlH0vAQIECLxU4LbD4fqH3fSaouKlH8WtfPF14uL44PHTq9+S8osAAQIECBAgsAv8D3+y/1UxtS72AAAAAElFTkSuQmCC"
  5306. /***/ }),
  5307. /***/ "2b31":
  5308. /***/ (function(module, exports, __webpack_require__) {
  5309. "use strict";
  5310. var _interopRequireDefault = __webpack_require__("8e6d");
  5311. Object.defineProperty(exports, "__esModule", {
  5312. value: true
  5313. });
  5314. exports.default = void 0;
  5315. var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
  5316. var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
  5317. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
  5318. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
  5319. var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
  5320. var _typeof2 = _interopRequireDefault(__webpack_require__("7ae5"));
  5321. var _vue = _interopRequireDefault(__webpack_require__("5643"));
  5322. var _vuePropertyDecorator = __webpack_require__("e22c");
  5323. var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
  5324. var c = arguments.length,
  5325. r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
  5326. d;
  5327. if ((typeof Reflect === "undefined" ? "undefined" : (0, _typeof2.default)(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
  5328. if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  5329. }
  5330. return c > 3 && r && Object.defineProperty(target, key, r), r;
  5331. };
  5332. var MAP_EVENT_NAMES = ['zoomlevelschange', 'resize', 'unload', 'viewreset', 'load', 'zoomstart', 'movestart', 'zoom', 'move', 'zoomend', 'moveend', 'popupopen', 'popupclose', 'autopanstart', 'tooltipopen', 'tooltipclose', 'locationerror', 'locationfound', 'click', 'dblclick', 'mousedown', 'mouseup', 'mouseover', 'mouseout', 'mousemove', 'contextmenu', 'keypress', 'keydown', 'keyup', 'preclick', 'zoomanim'];
  5333. var MapEvents =
  5334. /*#__PURE__*/
  5335. function (_Vue) {
  5336. (0, _inherits2.default)(MapEvents, _Vue);
  5337. function MapEvents() {
  5338. (0, _classCallCheck2.default)(this, MapEvents);
  5339. return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(MapEvents).apply(this, arguments));
  5340. }
  5341. (0, _createClass2.default)(MapEvents, [{
  5342. key: "mapEventCallback",
  5343. value: function mapEventCallback(event) {
  5344. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  5345. this.emitMapEvent(event.type, Object.assign({
  5346. mapboxEvent: event
  5347. }, data));
  5348. }
  5349. }, {
  5350. key: "bindMapEvents",
  5351. value: function bindMapEvents() {
  5352. var _this = this;
  5353. Object.keys(this.$listeners).forEach(function (eventName) {
  5354. if (MAP_EVENT_NAMES.includes(eventName)) {
  5355. _this.bindMapEvent(eventName, _this.mapEventCallback.bind(_this));
  5356. }
  5357. });
  5358. }
  5359. }, {
  5360. key: "emitMapEvent",
  5361. value: function emitMapEvent(name) {
  5362. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  5363. this.$emit(name, Object.assign({
  5364. map: this.map,
  5365. component: this
  5366. }, data));
  5367. }
  5368. }, {
  5369. key: "bindMapEvent",
  5370. value: function bindMapEvent(eventName, eventCallback) {
  5371. this.map.on(eventName, eventCallback);
  5372. }
  5373. }]);
  5374. return MapEvents;
  5375. }(_vue.default);
  5376. MapEvents = __decorate([_vuePropertyDecorator.Component], MapEvents);
  5377. var _default = MapEvents;
  5378. exports.default = _default;
  5379. /***/ }),
  5380. /***/ "2bec":
  5381. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  5382. "use strict";
  5383. __webpack_require__.r(__webpack_exports__);
  5384. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LiquidFill_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("3a31");
  5385. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LiquidFill_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LiquidFill_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
  5386. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LiquidFill_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LiquidFill_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  5387. /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_LiquidFill_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
  5388. /***/ }),
  5389. /***/ "2c06":
  5390. /***/ (function(module) {
  5391. 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]}]");
  5392. /***/ }),
  5393. /***/ "2df9":
  5394. /***/ (function(module, exports) {
  5395. /**
  5396. * lodash (Custom Build) <https://lodash.com/>
  5397. * Build: `lodash modularize exports="npm" -o ./`
  5398. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  5399. * Released under MIT license <https://lodash.com/license>
  5400. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  5401. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  5402. */
  5403. /** `Object#toString` result references. */
  5404. var symbolTag = '[object Symbol]';
  5405. /** Used for built-in method references. */
  5406. var objectProto = Object.prototype;
  5407. /**
  5408. * Used to resolve the
  5409. * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
  5410. * of values.
  5411. */
  5412. var objectToString = objectProto.toString;
  5413. /**
  5414. * The base implementation of methods like `_.max` and `_.min` which accepts a
  5415. * `comparator` to determine the extremum value.
  5416. *
  5417. * @private
  5418. * @param {Array} array The array to iterate over.
  5419. * @param {Function} iteratee The iteratee invoked per iteration.
  5420. * @param {Function} comparator The comparator used to compare values.
  5421. * @returns {*} Returns the extremum value.
  5422. */
  5423. function baseExtremum(array, iteratee, comparator) {
  5424. var index = -1,
  5425. length = array.length;
  5426. while (++index < length) {
  5427. var value = array[index],
  5428. current = iteratee(value);
  5429. if (current != null && (computed === undefined
  5430. ? (current === current && !isSymbol(current))
  5431. : comparator(current, computed)
  5432. )) {
  5433. var computed = current,
  5434. result = value;
  5435. }
  5436. }
  5437. return result;
  5438. }
  5439. /**
  5440. * The base implementation of `_.gt` which doesn't coerce arguments to numbers.
  5441. *
  5442. * @private
  5443. * @param {*} value The value to compare.
  5444. * @param {*} other The other value to compare.
  5445. * @returns {boolean} Returns `true` if `value` is greater than `other`,
  5446. * else `false`.
  5447. */
  5448. function baseGt(value, other) {
  5449. return value > other;
  5450. }
  5451. /**
  5452. * Checks if `value` is object-like. A value is object-like if it's not `null`
  5453. * and has a `typeof` result of "object".
  5454. *
  5455. * @static
  5456. * @memberOf _
  5457. * @since 4.0.0
  5458. * @category Lang
  5459. * @param {*} value The value to check.
  5460. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  5461. * @example
  5462. *
  5463. * _.isObjectLike({});
  5464. * // => true
  5465. *
  5466. * _.isObjectLike([1, 2, 3]);
  5467. * // => true
  5468. *
  5469. * _.isObjectLike(_.noop);
  5470. * // => false
  5471. *
  5472. * _.isObjectLike(null);
  5473. * // => false
  5474. */
  5475. function isObjectLike(value) {
  5476. return !!value && typeof value == 'object';
  5477. }
  5478. /**
  5479. * Checks if `value` is classified as a `Symbol` primitive or object.
  5480. *
  5481. * @static
  5482. * @memberOf _
  5483. * @since 4.0.0
  5484. * @category Lang
  5485. * @param {*} value The value to check.
  5486. * @returns {boolean} Returns `true` if `value` is correctly classified,
  5487. * else `false`.
  5488. * @example
  5489. *
  5490. * _.isSymbol(Symbol.iterator);
  5491. * // => true
  5492. *
  5493. * _.isSymbol('abc');
  5494. * // => false
  5495. */
  5496. function isSymbol(value) {
  5497. return typeof value == 'symbol' ||
  5498. (isObjectLike(value) && objectToString.call(value) == symbolTag);
  5499. }
  5500. /**
  5501. * This method returns the first argument given to it.
  5502. *
  5503. * @static
  5504. * @since 0.1.0
  5505. * @memberOf _
  5506. * @category Util
  5507. * @param {*} value Any value.
  5508. * @returns {*} Returns `value`.
  5509. * @example
  5510. *
  5511. * var object = { 'user': 'fred' };
  5512. *
  5513. * _.identity(object) === object;
  5514. * // => true
  5515. */
  5516. function identity(value) {
  5517. return value;
  5518. }
  5519. /**
  5520. * Computes the maximum value of `array`. If `array` is empty or falsey,
  5521. * `undefined` is returned.
  5522. *
  5523. * @static
  5524. * @since 0.1.0
  5525. * @memberOf _
  5526. * @category Math
  5527. * @param {Array} array The array to iterate over.
  5528. * @returns {*} Returns the maximum value.
  5529. * @example
  5530. *
  5531. * _.max([4, 2, 8, 6]);
  5532. * // => 8
  5533. *
  5534. * _.max([]);
  5535. * // => undefined
  5536. */
  5537. function max(array) {
  5538. return (array && array.length)
  5539. ? baseExtremum(array, identity, baseGt)
  5540. : undefined;
  5541. }
  5542. module.exports = max;
  5543. /***/ }),
  5544. /***/ "2ed5":
  5545. /***/ (function(module, exports, __webpack_require__) {
  5546. "use strict";
  5547. var _interopRequireDefault = __webpack_require__("8e6d");
  5548. Object.defineProperty(exports, "__esModule", {
  5549. value: true
  5550. });
  5551. exports.default = void 0;
  5552. var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
  5553. var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
  5554. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
  5555. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
  5556. var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
  5557. var _typeof2 = _interopRequireDefault(__webpack_require__("7ae5"));
  5558. var _mapEvent = _interopRequireDefault(__webpack_require__("3a8c"));
  5559. var _globalEvent = _interopRequireDefault(__webpack_require__("fb6a"));
  5560. var _vue = _interopRequireDefault(__webpack_require__("5643"));
  5561. var _vuePropertyDecorator = __webpack_require__("e22c");
  5562. var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
  5563. var c = arguments.length,
  5564. r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
  5565. d;
  5566. if ((typeof Reflect === "undefined" ? "undefined" : (0, _typeof2.default)(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
  5567. if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  5568. }
  5569. return c > 3 && r && Object.defineProperty(target, key, r), r;
  5570. };
  5571. function callHook(vm, hook) {
  5572. var options = vm.constructor.options;
  5573. options.mixins && options.mixins.forEach(function (mixin) {
  5574. mixin[hook] && mixin[hook].call(vm, vm.$options.name);
  5575. });
  5576. options[hook] && options[hook].call(vm, vm);
  5577. }
  5578. var MapGetter =
  5579. /*#__PURE__*/
  5580. function (_Vue) {
  5581. (0, _inherits2.default)(MapGetter, _Vue);
  5582. function MapGetter() {
  5583. (0, _classCallCheck2.default)(this, MapGetter);
  5584. return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(MapGetter).apply(this, arguments));
  5585. }
  5586. (0, _createClass2.default)(MapGetter, [{
  5587. key: "mapTargetChanged",
  5588. value: function mapTargetChanged(newVal, oldVal) {
  5589. if (newVal && oldVal && newVal !== oldVal) {
  5590. callHook(this, 'removed');
  5591. if (_mapEvent.default.$options.getMap(newVal)) {
  5592. this.loadMap(newVal);
  5593. }
  5594. }
  5595. }
  5596. }, {
  5597. key: "mounted",
  5598. value: function mounted() {
  5599. var targetName = this.getTargetName();
  5600. if (_mapEvent.default.$options.getMap(targetName)) {
  5601. this.loadMap(targetName);
  5602. }
  5603. _mapEvent.default.$on('load-map', this.loadMapSucceed);
  5604. _globalEvent.default.$on('delete-map', this.deleteMapSucceed);
  5605. }
  5606. }, {
  5607. key: "beforeDestroy",
  5608. value: function beforeDestroy() {
  5609. _mapEvent.default.$off('load-map', this.loadMapSucceed);
  5610. _globalEvent.default.$off('delete-map', this.deleteMapSucceed);
  5611. }
  5612. }, {
  5613. key: "loadMapSucceed",
  5614. value: function loadMapSucceed(map, target) {
  5615. var targetName = this.getTargetName();
  5616. if (target === targetName) {
  5617. this.loadMap(target);
  5618. }
  5619. }
  5620. }, {
  5621. key: "getTargetName",
  5622. value: function getTargetName() {
  5623. var selfParent = this.$parent;
  5624. var parentTarget = selfParent && selfParent.$options.name && selfParent.$options.name.toLowerCase() === 'smwebmap' && selfParent.target;
  5625. return this.mapTarget || parentTarget || Object.keys(_mapEvent.default.$options.getAllMaps())[0];
  5626. }
  5627. }, {
  5628. key: "loadMap",
  5629. value: function loadMap(targetName) {
  5630. var _this = this;
  5631. this.map = _mapEvent.default.$options.getMap(targetName);
  5632. this.webmap = _mapEvent.default.$options.getWebMap(targetName);
  5633. callHook(this, 'loaded');
  5634. this.$nextTick(function () {
  5635. _this.$emit('loaded');
  5636. });
  5637. }
  5638. }, {
  5639. key: "deleteMapSucceed",
  5640. value: function deleteMapSucceed(target) {
  5641. var targetName = this.getTargetName();
  5642. if (target === targetName) {
  5643. callHook(this, 'removed');
  5644. this.map = null;
  5645. this.webmap = null;
  5646. this.viewModel && (this.viewModel = null);
  5647. }
  5648. }
  5649. }, {
  5650. key: "mapNotLoadedTip",
  5651. value: function mapNotLoadedTip() {
  5652. if (!this.map) {
  5653. this.$message.destroy();
  5654. this.$message.warning(this.$t('warning.unassociatedMap'));
  5655. return true;
  5656. }
  5657. return false;
  5658. }
  5659. }]);
  5660. return MapGetter;
  5661. }(_vue.default);
  5662. __decorate([(0, _vuePropertyDecorator.Prop)()], MapGetter.prototype, "mapTarget", void 0);
  5663. __decorate([(0, _vuePropertyDecorator.Watch)('mapTarget')], MapGetter.prototype, "mapTargetChanged", null);
  5664. MapGetter = __decorate([_vuePropertyDecorator.Component], MapGetter);
  5665. var _default = MapGetter;
  5666. exports.default = _default;
  5667. /***/ }),
  5668. /***/ "2efc":
  5669. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  5670. "use strict";
  5671. __webpack_require__.r(__webpack_exports__);
  5672. /*!
  5673. * vue-i18n v8.16.0
  5674. * (c) 2020 kazuya kawaguchi
  5675. * Released under the MIT License.
  5676. */
  5677. /* */
  5678. /**
  5679. * constants
  5680. */
  5681. var numberFormatKeys = [
  5682. 'style',
  5683. 'currency',
  5684. 'currencyDisplay',
  5685. 'useGrouping',
  5686. 'minimumIntegerDigits',
  5687. 'minimumFractionDigits',
  5688. 'maximumFractionDigits',
  5689. 'minimumSignificantDigits',
  5690. 'maximumSignificantDigits',
  5691. 'localeMatcher',
  5692. 'formatMatcher',
  5693. 'unit'
  5694. ];
  5695. /**
  5696. * utilities
  5697. */
  5698. function warn (msg, err) {
  5699. if (typeof console !== 'undefined') {
  5700. console.warn('[vue-i18n] ' + msg);
  5701. /* istanbul ignore if */
  5702. if (err) {
  5703. console.warn(err.stack);
  5704. }
  5705. }
  5706. }
  5707. function error (msg, err) {
  5708. if (typeof console !== 'undefined') {
  5709. console.error('[vue-i18n] ' + msg);
  5710. /* istanbul ignore if */
  5711. if (err) {
  5712. console.error(err.stack);
  5713. }
  5714. }
  5715. }
  5716. function isObject (obj) {
  5717. return obj !== null && typeof obj === 'object'
  5718. }
  5719. var toString = Object.prototype.toString;
  5720. var OBJECT_STRING = '[object Object]';
  5721. function isPlainObject (obj) {
  5722. return toString.call(obj) === OBJECT_STRING
  5723. }
  5724. function isNull (val) {
  5725. return val === null || val === undefined
  5726. }
  5727. function parseArgs () {
  5728. var args = [], len = arguments.length;
  5729. while ( len-- ) args[ len ] = arguments[ len ];
  5730. var locale = null;
  5731. var params = null;
  5732. if (args.length === 1) {
  5733. if (isObject(args[0]) || Array.isArray(args[0])) {
  5734. params = args[0];
  5735. } else if (typeof args[0] === 'string') {
  5736. locale = args[0];
  5737. }
  5738. } else if (args.length === 2) {
  5739. if (typeof args[0] === 'string') {
  5740. locale = args[0];
  5741. }
  5742. /* istanbul ignore if */
  5743. if (isObject(args[1]) || Array.isArray(args[1])) {
  5744. params = args[1];
  5745. }
  5746. }
  5747. return { locale: locale, params: params }
  5748. }
  5749. function looseClone (obj) {
  5750. return JSON.parse(JSON.stringify(obj))
  5751. }
  5752. function remove (arr, item) {
  5753. if (arr.length) {
  5754. var index = arr.indexOf(item);
  5755. if (index > -1) {
  5756. return arr.splice(index, 1)
  5757. }
  5758. }
  5759. }
  5760. var hasOwnProperty = Object.prototype.hasOwnProperty;
  5761. function hasOwn (obj, key) {
  5762. return hasOwnProperty.call(obj, key)
  5763. }
  5764. function merge (target) {
  5765. var arguments$1 = arguments;
  5766. var output = Object(target);
  5767. for (var i = 1; i < arguments.length; i++) {
  5768. var source = arguments$1[i];
  5769. if (source !== undefined && source !== null) {
  5770. var key = (void 0);
  5771. for (key in source) {
  5772. if (hasOwn(source, key)) {
  5773. if (isObject(source[key])) {
  5774. output[key] = merge(output[key], source[key]);
  5775. } else {
  5776. output[key] = source[key];
  5777. }
  5778. }
  5779. }
  5780. }
  5781. }
  5782. return output
  5783. }
  5784. function looseEqual (a, b) {
  5785. if (a === b) { return true }
  5786. var isObjectA = isObject(a);
  5787. var isObjectB = isObject(b);
  5788. if (isObjectA && isObjectB) {
  5789. try {
  5790. var isArrayA = Array.isArray(a);
  5791. var isArrayB = Array.isArray(b);
  5792. if (isArrayA && isArrayB) {
  5793. return a.length === b.length && a.every(function (e, i) {
  5794. return looseEqual(e, b[i])
  5795. })
  5796. } else if (!isArrayA && !isArrayB) {
  5797. var keysA = Object.keys(a);
  5798. var keysB = Object.keys(b);
  5799. return keysA.length === keysB.length && keysA.every(function (key) {
  5800. return looseEqual(a[key], b[key])
  5801. })
  5802. } else {
  5803. /* istanbul ignore next */
  5804. return false
  5805. }
  5806. } catch (e) {
  5807. /* istanbul ignore next */
  5808. return false
  5809. }
  5810. } else if (!isObjectA && !isObjectB) {
  5811. return String(a) === String(b)
  5812. } else {
  5813. return false
  5814. }
  5815. }
  5816. /* */
  5817. function extend (Vue) {
  5818. if (!Vue.prototype.hasOwnProperty('$i18n')) {
  5819. // $FlowFixMe
  5820. Object.defineProperty(Vue.prototype, '$i18n', {
  5821. get: function get () { return this._i18n }
  5822. });
  5823. }
  5824. Vue.prototype.$t = function (key) {
  5825. var values = [], len = arguments.length - 1;
  5826. while ( len-- > 0 ) values[ len ] = arguments[ len + 1 ];
  5827. var i18n = this.$i18n;
  5828. return i18n._t.apply(i18n, [ key, i18n.locale, i18n._getMessages(), this ].concat( values ))
  5829. };
  5830. Vue.prototype.$tc = function (key, choice) {
  5831. var values = [], len = arguments.length - 2;
  5832. while ( len-- > 0 ) values[ len ] = arguments[ len + 2 ];
  5833. var i18n = this.$i18n;
  5834. return i18n._tc.apply(i18n, [ key, i18n.locale, i18n._getMessages(), this, choice ].concat( values ))
  5835. };
  5836. Vue.prototype.$te = function (key, locale) {
  5837. var i18n = this.$i18n;
  5838. return i18n._te(key, i18n.locale, i18n._getMessages(), locale)
  5839. };
  5840. Vue.prototype.$d = function (value) {
  5841. var ref;
  5842. var args = [], len = arguments.length - 1;
  5843. while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];
  5844. return (ref = this.$i18n).d.apply(ref, [ value ].concat( args ))
  5845. };
  5846. Vue.prototype.$n = function (value) {
  5847. var ref;
  5848. var args = [], len = arguments.length - 1;
  5849. while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];
  5850. return (ref = this.$i18n).n.apply(ref, [ value ].concat( args ))
  5851. };
  5852. }
  5853. /* */
  5854. var mixin = {
  5855. beforeCreate: function beforeCreate () {
  5856. var options = this.$options;
  5857. options.i18n = options.i18n || (options.__i18n ? {} : null);
  5858. if (options.i18n) {
  5859. if (options.i18n instanceof VueI18n) {
  5860. // init locale messages via custom blocks
  5861. if (options.__i18n) {
  5862. try {
  5863. var localeMessages = {};
  5864. options.__i18n.forEach(function (resource) {
  5865. localeMessages = merge(localeMessages, JSON.parse(resource));
  5866. });
  5867. Object.keys(localeMessages).forEach(function (locale) {
  5868. options.i18n.mergeLocaleMessage(locale, localeMessages[locale]);
  5869. });
  5870. } catch (e) {
  5871. if (false) {}
  5872. }
  5873. }
  5874. this._i18n = options.i18n;
  5875. this._i18nWatcher = this._i18n.watchI18nData();
  5876. } else if (isPlainObject(options.i18n)) {
  5877. // component local i18n
  5878. if (this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n) {
  5879. options.i18n.root = this.$root;
  5880. options.i18n.formatter = this.$root.$i18n.formatter;
  5881. options.i18n.fallbackLocale = this.$root.$i18n.fallbackLocale;
  5882. options.i18n.formatFallbackMessages = this.$root.$i18n.formatFallbackMessages;
  5883. options.i18n.silentTranslationWarn = this.$root.$i18n.silentTranslationWarn;
  5884. options.i18n.silentFallbackWarn = this.$root.$i18n.silentFallbackWarn;
  5885. options.i18n.pluralizationRules = this.$root.$i18n.pluralizationRules;
  5886. options.i18n.preserveDirectiveContent = this.$root.$i18n.preserveDirectiveContent;
  5887. }
  5888. // init locale messages via custom blocks
  5889. if (options.__i18n) {
  5890. try {
  5891. var localeMessages$1 = {};
  5892. options.__i18n.forEach(function (resource) {
  5893. localeMessages$1 = merge(localeMessages$1, JSON.parse(resource));
  5894. });
  5895. options.i18n.messages = localeMessages$1;
  5896. } catch (e) {
  5897. if (false) {}
  5898. }
  5899. }
  5900. var ref = options.i18n;
  5901. var sharedMessages = ref.sharedMessages;
  5902. if (sharedMessages && isPlainObject(sharedMessages)) {
  5903. options.i18n.messages = merge(options.i18n.messages, sharedMessages);
  5904. }
  5905. this._i18n = new VueI18n(options.i18n);
  5906. this._i18nWatcher = this._i18n.watchI18nData();
  5907. if (options.i18n.sync === undefined || !!options.i18n.sync) {
  5908. this._localeWatcher = this.$i18n.watchLocale();
  5909. }
  5910. } else {
  5911. if (false) {}
  5912. }
  5913. } else if (this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n) {
  5914. // root i18n
  5915. this._i18n = this.$root.$i18n;
  5916. } else if (options.parent && options.parent.$i18n && options.parent.$i18n instanceof VueI18n) {
  5917. // parent i18n
  5918. this._i18n = options.parent.$i18n;
  5919. }
  5920. },
  5921. beforeMount: function beforeMount () {
  5922. var options = this.$options;
  5923. options.i18n = options.i18n || (options.__i18n ? {} : null);
  5924. if (options.i18n) {
  5925. if (options.i18n instanceof VueI18n) {
  5926. // init locale messages via custom blocks
  5927. this._i18n.subscribeDataChanging(this);
  5928. this._subscribing = true;
  5929. } else if (isPlainObject(options.i18n)) {
  5930. this._i18n.subscribeDataChanging(this);
  5931. this._subscribing = true;
  5932. } else {
  5933. if (false) {}
  5934. }
  5935. } else if (this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n) {
  5936. this._i18n.subscribeDataChanging(this);
  5937. this._subscribing = true;
  5938. } else if (options.parent && options.parent.$i18n && options.parent.$i18n instanceof VueI18n) {
  5939. this._i18n.subscribeDataChanging(this);
  5940. this._subscribing = true;
  5941. }
  5942. },
  5943. beforeDestroy: function beforeDestroy () {
  5944. if (!this._i18n) { return }
  5945. var self = this;
  5946. this.$nextTick(function () {
  5947. if (self._subscribing) {
  5948. self._i18n.unsubscribeDataChanging(self);
  5949. delete self._subscribing;
  5950. }
  5951. if (self._i18nWatcher) {
  5952. self._i18nWatcher();
  5953. self._i18n.destroyVM();
  5954. delete self._i18nWatcher;
  5955. }
  5956. if (self._localeWatcher) {
  5957. self._localeWatcher();
  5958. delete self._localeWatcher;
  5959. }
  5960. self._i18n = null;
  5961. });
  5962. }
  5963. };
  5964. /* */
  5965. var interpolationComponent = {
  5966. name: 'i18n',
  5967. functional: true,
  5968. props: {
  5969. tag: {
  5970. type: String
  5971. },
  5972. path: {
  5973. type: String,
  5974. required: true
  5975. },
  5976. locale: {
  5977. type: String
  5978. },
  5979. places: {
  5980. type: [Array, Object]
  5981. }
  5982. },
  5983. render: function render (h, ref) {
  5984. var data = ref.data;
  5985. var parent = ref.parent;
  5986. var props = ref.props;
  5987. var slots = ref.slots;
  5988. var $i18n = parent.$i18n;
  5989. if (!$i18n) {
  5990. if (false) {}
  5991. return
  5992. }
  5993. var path = props.path;
  5994. var locale = props.locale;
  5995. var places = props.places;
  5996. var params = slots();
  5997. var children = $i18n.i(
  5998. path,
  5999. locale,
  6000. onlyHasDefaultPlace(params) || places
  6001. ? useLegacyPlaces(params.default, places)
  6002. : params
  6003. );
  6004. var tag = props.tag || 'span';
  6005. return tag ? h(tag, data, children) : children
  6006. }
  6007. };
  6008. function onlyHasDefaultPlace (params) {
  6009. var prop;
  6010. for (prop in params) {
  6011. if (prop !== 'default') { return false }
  6012. }
  6013. return Boolean(prop)
  6014. }
  6015. function useLegacyPlaces (children, places) {
  6016. var params = places ? createParamsFromPlaces(places) : {};
  6017. if (!children) { return params }
  6018. // Filter empty text nodes
  6019. children = children.filter(function (child) {
  6020. return child.tag || child.text.trim() !== ''
  6021. });
  6022. var everyPlace = children.every(vnodeHasPlaceAttribute);
  6023. if (false) {}
  6024. return children.reduce(
  6025. everyPlace ? assignChildPlace : assignChildIndex,
  6026. params
  6027. )
  6028. }
  6029. function createParamsFromPlaces (places) {
  6030. if (false) {}
  6031. return Array.isArray(places)
  6032. ? places.reduce(assignChildIndex, {})
  6033. : Object.assign({}, places)
  6034. }
  6035. function assignChildPlace (params, child) {
  6036. if (child.data && child.data.attrs && child.data.attrs.place) {
  6037. params[child.data.attrs.place] = child;
  6038. }
  6039. return params
  6040. }
  6041. function assignChildIndex (params, child, index) {
  6042. params[index] = child;
  6043. return params
  6044. }
  6045. function vnodeHasPlaceAttribute (vnode) {
  6046. return Boolean(vnode.data && vnode.data.attrs && vnode.data.attrs.place)
  6047. }
  6048. /* */
  6049. var numberComponent = {
  6050. name: 'i18n-n',
  6051. functional: true,
  6052. props: {
  6053. tag: {
  6054. type: String,
  6055. default: 'span'
  6056. },
  6057. value: {
  6058. type: Number,
  6059. required: true
  6060. },
  6061. format: {
  6062. type: [String, Object]
  6063. },
  6064. locale: {
  6065. type: String
  6066. }
  6067. },
  6068. render: function render (h, ref) {
  6069. var props = ref.props;
  6070. var parent = ref.parent;
  6071. var data = ref.data;
  6072. var i18n = parent.$i18n;
  6073. if (!i18n) {
  6074. if (false) {}
  6075. return null
  6076. }
  6077. var key = null;
  6078. var options = null;
  6079. if (typeof props.format === 'string') {
  6080. key = props.format;
  6081. } else if (isObject(props.format)) {
  6082. if (props.format.key) {
  6083. key = props.format.key;
  6084. }
  6085. // Filter out number format options only
  6086. options = Object.keys(props.format).reduce(function (acc, prop) {
  6087. var obj;
  6088. if (numberFormatKeys.includes(prop)) {
  6089. return Object.assign({}, acc, ( obj = {}, obj[prop] = props.format[prop], obj ))
  6090. }
  6091. return acc
  6092. }, null);
  6093. }
  6094. var locale = props.locale || i18n.locale;
  6095. var parts = i18n._ntp(props.value, locale, key, options);
  6096. var values = parts.map(function (part, index) {
  6097. var obj;
  6098. var slot = data.scopedSlots && data.scopedSlots[part.type];
  6099. return slot ? slot(( obj = {}, obj[part.type] = part.value, obj.index = index, obj.parts = parts, obj )) : part.value
  6100. });
  6101. return h(props.tag, {
  6102. attrs: data.attrs,
  6103. 'class': data['class'],
  6104. staticClass: data.staticClass
  6105. }, values)
  6106. }
  6107. };
  6108. /* */
  6109. function bind (el, binding, vnode) {
  6110. if (!assert(el, vnode)) { return }
  6111. t(el, binding, vnode);
  6112. }
  6113. function update (el, binding, vnode, oldVNode) {
  6114. if (!assert(el, vnode)) { return }
  6115. var i18n = vnode.context.$i18n;
  6116. if (localeEqual(el, vnode) &&
  6117. (looseEqual(binding.value, binding.oldValue) &&
  6118. looseEqual(el._localeMessage, i18n.getLocaleMessage(i18n.locale)))) { return }
  6119. t(el, binding, vnode);
  6120. }
  6121. function unbind (el, binding, vnode, oldVNode) {
  6122. var vm = vnode.context;
  6123. if (!vm) {
  6124. warn('Vue instance does not exists in VNode context');
  6125. return
  6126. }
  6127. var i18n = vnode.context.$i18n || {};
  6128. if (!binding.modifiers.preserve && !i18n.preserveDirectiveContent) {
  6129. el.textContent = '';
  6130. }
  6131. el._vt = undefined;
  6132. delete el['_vt'];
  6133. el._locale = undefined;
  6134. delete el['_locale'];
  6135. el._localeMessage = undefined;
  6136. delete el['_localeMessage'];
  6137. }
  6138. function assert (el, vnode) {
  6139. var vm = vnode.context;
  6140. if (!vm) {
  6141. warn('Vue instance does not exists in VNode context');
  6142. return false
  6143. }
  6144. if (!vm.$i18n) {
  6145. warn('VueI18n instance does not exists in Vue instance');
  6146. return false
  6147. }
  6148. return true
  6149. }
  6150. function localeEqual (el, vnode) {
  6151. var vm = vnode.context;
  6152. return el._locale === vm.$i18n.locale
  6153. }
  6154. function t (el, binding, vnode) {
  6155. var ref$1, ref$2;
  6156. var value = binding.value;
  6157. var ref = parseValue(value);
  6158. var path = ref.path;
  6159. var locale = ref.locale;
  6160. var args = ref.args;
  6161. var choice = ref.choice;
  6162. if (!path && !locale && !args) {
  6163. warn('value type not supported');
  6164. return
  6165. }
  6166. if (!path) {
  6167. warn('`path` is required in v-t directive');
  6168. return
  6169. }
  6170. var vm = vnode.context;
  6171. if (choice) {
  6172. el._vt = el.textContent = (ref$1 = vm.$i18n).tc.apply(ref$1, [ path, choice ].concat( makeParams(locale, args) ));
  6173. } else {
  6174. el._vt = el.textContent = (ref$2 = vm.$i18n).t.apply(ref$2, [ path ].concat( makeParams(locale, args) ));
  6175. }
  6176. el._locale = vm.$i18n.locale;
  6177. el._localeMessage = vm.$i18n.getLocaleMessage(vm.$i18n.locale);
  6178. }
  6179. function parseValue (value) {
  6180. var path;
  6181. var locale;
  6182. var args;
  6183. var choice;
  6184. if (typeof value === 'string') {
  6185. path = value;
  6186. } else if (isPlainObject(value)) {
  6187. path = value.path;
  6188. locale = value.locale;
  6189. args = value.args;
  6190. choice = value.choice;
  6191. }
  6192. return { path: path, locale: locale, args: args, choice: choice }
  6193. }
  6194. function makeParams (locale, args) {
  6195. var params = [];
  6196. locale && params.push(locale);
  6197. if (args && (Array.isArray(args) || isPlainObject(args))) {
  6198. params.push(args);
  6199. }
  6200. return params
  6201. }
  6202. var Vue;
  6203. function install (_Vue) {
  6204. /* istanbul ignore if */
  6205. if (false) {}
  6206. install.installed = true;
  6207. Vue = _Vue;
  6208. var version = (Vue.version && Number(Vue.version.split('.')[0])) || -1;
  6209. /* istanbul ignore if */
  6210. if (false) {}
  6211. extend(Vue);
  6212. Vue.mixin(mixin);
  6213. Vue.directive('t', { bind: bind, update: update, unbind: unbind });
  6214. Vue.component(interpolationComponent.name, interpolationComponent);
  6215. Vue.component(numberComponent.name, numberComponent);
  6216. // use simple mergeStrategies to prevent i18n instance lose '__proto__'
  6217. var strats = Vue.config.optionMergeStrategies;
  6218. strats.i18n = function (parentVal, childVal) {
  6219. return childVal === undefined
  6220. ? parentVal
  6221. : childVal
  6222. };
  6223. }
  6224. /* */
  6225. var BaseFormatter = function BaseFormatter () {
  6226. this._caches = Object.create(null);
  6227. };
  6228. BaseFormatter.prototype.interpolate = function interpolate (message, values) {
  6229. if (!values) {
  6230. return [message]
  6231. }
  6232. var tokens = this._caches[message];
  6233. if (!tokens) {
  6234. tokens = parse(message);
  6235. this._caches[message] = tokens;
  6236. }
  6237. return compile(tokens, values)
  6238. };
  6239. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  6240. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  6241. function parse (format) {
  6242. var tokens = [];
  6243. var position = 0;
  6244. var text = '';
  6245. while (position < format.length) {
  6246. var char = format[position++];
  6247. if (char === '{') {
  6248. if (text) {
  6249. tokens.push({ type: 'text', value: text });
  6250. }
  6251. text = '';
  6252. var sub = '';
  6253. char = format[position++];
  6254. while (char !== undefined && char !== '}') {
  6255. sub += char;
  6256. char = format[position++];
  6257. }
  6258. var isClosed = char === '}';
  6259. var type = RE_TOKEN_LIST_VALUE.test(sub)
  6260. ? 'list'
  6261. : isClosed && RE_TOKEN_NAMED_VALUE.test(sub)
  6262. ? 'named'
  6263. : 'unknown';
  6264. tokens.push({ value: sub, type: type });
  6265. } else if (char === '%') {
  6266. // when found rails i18n syntax, skip text capture
  6267. if (format[(position)] !== '{') {
  6268. text += char;
  6269. }
  6270. } else {
  6271. text += char;
  6272. }
  6273. }
  6274. text && tokens.push({ type: 'text', value: text });
  6275. return tokens
  6276. }
  6277. function compile (tokens, values) {
  6278. var compiled = [];
  6279. var index = 0;
  6280. var mode = Array.isArray(values)
  6281. ? 'list'
  6282. : isObject(values)
  6283. ? 'named'
  6284. : 'unknown';
  6285. if (mode === 'unknown') { return compiled }
  6286. while (index < tokens.length) {
  6287. var token = tokens[index];
  6288. switch (token.type) {
  6289. case 'text':
  6290. compiled.push(token.value);
  6291. break
  6292. case 'list':
  6293. compiled.push(values[parseInt(token.value, 10)]);
  6294. break
  6295. case 'named':
  6296. if (mode === 'named') {
  6297. compiled.push((values)[token.value]);
  6298. } else {
  6299. if (false) {}
  6300. }
  6301. break
  6302. case 'unknown':
  6303. if (false) {}
  6304. break
  6305. }
  6306. index++;
  6307. }
  6308. return compiled
  6309. }
  6310. /* */
  6311. /**
  6312. * Path parser
  6313. * - Inspired:
  6314. * Vue.js Path parser
  6315. */
  6316. // actions
  6317. var APPEND = 0;
  6318. var PUSH = 1;
  6319. var INC_SUB_PATH_DEPTH = 2;
  6320. var PUSH_SUB_PATH = 3;
  6321. // states
  6322. var BEFORE_PATH = 0;
  6323. var IN_PATH = 1;
  6324. var BEFORE_IDENT = 2;
  6325. var IN_IDENT = 3;
  6326. var IN_SUB_PATH = 4;
  6327. var IN_SINGLE_QUOTE = 5;
  6328. var IN_DOUBLE_QUOTE = 6;
  6329. var AFTER_PATH = 7;
  6330. var ERROR = 8;
  6331. var pathStateMachine = [];
  6332. pathStateMachine[BEFORE_PATH] = {
  6333. 'ws': [BEFORE_PATH],
  6334. 'ident': [IN_IDENT, APPEND],
  6335. '[': [IN_SUB_PATH],
  6336. 'eof': [AFTER_PATH]
  6337. };
  6338. pathStateMachine[IN_PATH] = {
  6339. 'ws': [IN_PATH],
  6340. '.': [BEFORE_IDENT],
  6341. '[': [IN_SUB_PATH],
  6342. 'eof': [AFTER_PATH]
  6343. };
  6344. pathStateMachine[BEFORE_IDENT] = {
  6345. 'ws': [BEFORE_IDENT],
  6346. 'ident': [IN_IDENT, APPEND],
  6347. '0': [IN_IDENT, APPEND],
  6348. 'number': [IN_IDENT, APPEND]
  6349. };
  6350. pathStateMachine[IN_IDENT] = {
  6351. 'ident': [IN_IDENT, APPEND],
  6352. '0': [IN_IDENT, APPEND],
  6353. 'number': [IN_IDENT, APPEND],
  6354. 'ws': [IN_PATH, PUSH],
  6355. '.': [BEFORE_IDENT, PUSH],
  6356. '[': [IN_SUB_PATH, PUSH],
  6357. 'eof': [AFTER_PATH, PUSH]
  6358. };
  6359. pathStateMachine[IN_SUB_PATH] = {
  6360. "'": [IN_SINGLE_QUOTE, APPEND],
  6361. '"': [IN_DOUBLE_QUOTE, APPEND],
  6362. '[': [IN_SUB_PATH, INC_SUB_PATH_DEPTH],
  6363. ']': [IN_PATH, PUSH_SUB_PATH],
  6364. 'eof': ERROR,
  6365. 'else': [IN_SUB_PATH, APPEND]
  6366. };
  6367. pathStateMachine[IN_SINGLE_QUOTE] = {
  6368. "'": [IN_SUB_PATH, APPEND],
  6369. 'eof': ERROR,
  6370. 'else': [IN_SINGLE_QUOTE, APPEND]
  6371. };
  6372. pathStateMachine[IN_DOUBLE_QUOTE] = {
  6373. '"': [IN_SUB_PATH, APPEND],
  6374. 'eof': ERROR,
  6375. 'else': [IN_DOUBLE_QUOTE, APPEND]
  6376. };
  6377. /**
  6378. * Check if an expression is a literal value.
  6379. */
  6380. var literalValueRE = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
  6381. function isLiteral (exp) {
  6382. return literalValueRE.test(exp)
  6383. }
  6384. /**
  6385. * Strip quotes from a string
  6386. */
  6387. function stripQuotes (str) {
  6388. var a = str.charCodeAt(0);
  6389. var b = str.charCodeAt(str.length - 1);
  6390. return a === b && (a === 0x22 || a === 0x27)
  6391. ? str.slice(1, -1)
  6392. : str
  6393. }
  6394. /**
  6395. * Determine the type of a character in a keypath.
  6396. */
  6397. function getPathCharType (ch) {
  6398. if (ch === undefined || ch === null) { return 'eof' }
  6399. var code = ch.charCodeAt(0);
  6400. switch (code) {
  6401. case 0x5B: // [
  6402. case 0x5D: // ]
  6403. case 0x2E: // .
  6404. case 0x22: // "
  6405. case 0x27: // '
  6406. return ch
  6407. case 0x5F: // _
  6408. case 0x24: // $
  6409. case 0x2D: // -
  6410. return 'ident'
  6411. case 0x09: // Tab
  6412. case 0x0A: // Newline
  6413. case 0x0D: // Return
  6414. case 0xA0: // No-break space
  6415. case 0xFEFF: // Byte Order Mark
  6416. case 0x2028: // Line Separator
  6417. case 0x2029: // Paragraph Separator
  6418. return 'ws'
  6419. }
  6420. return 'ident'
  6421. }
  6422. /**
  6423. * Format a subPath, return its plain form if it is
  6424. * a literal string or number. Otherwise prepend the
  6425. * dynamic indicator (*).
  6426. */
  6427. function formatSubPath (path) {
  6428. var trimmed = path.trim();
  6429. // invalid leading 0
  6430. if (path.charAt(0) === '0' && isNaN(path)) { return false }
  6431. return isLiteral(trimmed) ? stripQuotes(trimmed) : '*' + trimmed
  6432. }
  6433. /**
  6434. * Parse a string path into an array of segments
  6435. */
  6436. function parse$1 (path) {
  6437. var keys = [];
  6438. var index = -1;
  6439. var mode = BEFORE_PATH;
  6440. var subPathDepth = 0;
  6441. var c;
  6442. var key;
  6443. var newChar;
  6444. var type;
  6445. var transition;
  6446. var action;
  6447. var typeMap;
  6448. var actions = [];
  6449. actions[PUSH] = function () {
  6450. if (key !== undefined) {
  6451. keys.push(key);
  6452. key = undefined;
  6453. }
  6454. };
  6455. actions[APPEND] = function () {
  6456. if (key === undefined) {
  6457. key = newChar;
  6458. } else {
  6459. key += newChar;
  6460. }
  6461. };
  6462. actions[INC_SUB_PATH_DEPTH] = function () {
  6463. actions[APPEND]();
  6464. subPathDepth++;
  6465. };
  6466. actions[PUSH_SUB_PATH] = function () {
  6467. if (subPathDepth > 0) {
  6468. subPathDepth--;
  6469. mode = IN_SUB_PATH;
  6470. actions[APPEND]();
  6471. } else {
  6472. subPathDepth = 0;
  6473. if (key === undefined) { return false }
  6474. key = formatSubPath(key);
  6475. if (key === false) {
  6476. return false
  6477. } else {
  6478. actions[PUSH]();
  6479. }
  6480. }
  6481. };
  6482. function maybeUnescapeQuote () {
  6483. var nextChar = path[index + 1];
  6484. if ((mode === IN_SINGLE_QUOTE && nextChar === "'") ||
  6485. (mode === IN_DOUBLE_QUOTE && nextChar === '"')) {
  6486. index++;
  6487. newChar = '\\' + nextChar;
  6488. actions[APPEND]();
  6489. return true
  6490. }
  6491. }
  6492. while (mode !== null) {
  6493. index++;
  6494. c = path[index];
  6495. if (c === '\\' && maybeUnescapeQuote()) {
  6496. continue
  6497. }
  6498. type = getPathCharType(c);
  6499. typeMap = pathStateMachine[mode];
  6500. transition = typeMap[type] || typeMap['else'] || ERROR;
  6501. if (transition === ERROR) {
  6502. return // parse error
  6503. }
  6504. mode = transition[0];
  6505. action = actions[transition[1]];
  6506. if (action) {
  6507. newChar = transition[2];
  6508. newChar = newChar === undefined
  6509. ? c
  6510. : newChar;
  6511. if (action() === false) {
  6512. return
  6513. }
  6514. }
  6515. if (mode === AFTER_PATH) {
  6516. return keys
  6517. }
  6518. }
  6519. }
  6520. var I18nPath = function I18nPath () {
  6521. this._cache = Object.create(null);
  6522. };
  6523. /**
  6524. * External parse that check for a cache hit first
  6525. */
  6526. I18nPath.prototype.parsePath = function parsePath (path) {
  6527. var hit = this._cache[path];
  6528. if (!hit) {
  6529. hit = parse$1(path);
  6530. if (hit) {
  6531. this._cache[path] = hit;
  6532. }
  6533. }
  6534. return hit || []
  6535. };
  6536. /**
  6537. * Get path value from path string
  6538. */
  6539. I18nPath.prototype.getPathValue = function getPathValue (obj, path) {
  6540. if (!isObject(obj)) { return null }
  6541. var paths = this.parsePath(path);
  6542. if (paths.length === 0) {
  6543. return null
  6544. } else {
  6545. var length = paths.length;
  6546. var last = obj;
  6547. var i = 0;
  6548. while (i < length) {
  6549. var value = last[paths[i]];
  6550. if (value === undefined) {
  6551. return null
  6552. }
  6553. last = value;
  6554. i++;
  6555. }
  6556. return last
  6557. }
  6558. };
  6559. /* */
  6560. var htmlTagMatcher = /<\/?[\w\s="/.':;#-\/]+>/;
  6561. var linkKeyMatcher = /(?:@(?:\.[a-z]+)?:(?:[\w\-_|.]+|\([\w\-_|.]+\)))/g;
  6562. var linkKeyPrefixMatcher = /^@(?:\.([a-z]+))?:/;
  6563. var bracketsMatcher = /[()]/g;
  6564. var defaultModifiers = {
  6565. 'upper': function (str) { return str.toLocaleUpperCase(); },
  6566. 'lower': function (str) { return str.toLocaleLowerCase(); },
  6567. 'capitalize': function (str) { return ("" + (str.charAt(0).toLocaleUpperCase()) + (str.substr(1))); }
  6568. };
  6569. var defaultFormatter = new BaseFormatter();
  6570. var VueI18n = function VueI18n (options) {
  6571. var this$1 = this;
  6572. if ( options === void 0 ) options = {};
  6573. // Auto install if it is not done yet and `window` has `Vue`.
  6574. // To allow users to avoid auto-installation in some cases,
  6575. // this code should be placed here. See #290
  6576. /* istanbul ignore if */
  6577. if (!Vue && typeof window !== 'undefined' && window.Vue) {
  6578. install(window.Vue);
  6579. }
  6580. var locale = options.locale || 'en-US';
  6581. var fallbackLocale = options.fallbackLocale || 'en-US';
  6582. var messages = options.messages || {};
  6583. var dateTimeFormats = options.dateTimeFormats || {};
  6584. var numberFormats = options.numberFormats || {};
  6585. this._vm = null;
  6586. this._formatter = options.formatter || defaultFormatter;
  6587. this._modifiers = options.modifiers || {};
  6588. this._missing = options.missing || null;
  6589. this._root = options.root || null;
  6590. this._sync = options.sync === undefined ? true : !!options.sync;
  6591. this._fallbackRoot = options.fallbackRoot === undefined
  6592. ? true
  6593. : !!options.fallbackRoot;
  6594. this._formatFallbackMessages = options.formatFallbackMessages === undefined
  6595. ? false
  6596. : !!options.formatFallbackMessages;
  6597. this._silentTranslationWarn = options.silentTranslationWarn === undefined
  6598. ? false
  6599. : options.silentTranslationWarn;
  6600. this._silentFallbackWarn = options.silentFallbackWarn === undefined
  6601. ? false
  6602. : !!options.silentFallbackWarn;
  6603. this._dateTimeFormatters = {};
  6604. this._numberFormatters = {};
  6605. this._path = new I18nPath();
  6606. this._dataListeners = [];
  6607. this._preserveDirectiveContent = options.preserveDirectiveContent === undefined
  6608. ? false
  6609. : !!options.preserveDirectiveContent;
  6610. this.pluralizationRules = options.pluralizationRules || {};
  6611. this._warnHtmlInMessage = options.warnHtmlInMessage || 'off';
  6612. this._postTranslation = options.postTranslation || null;
  6613. this._exist = function (message, key) {
  6614. if (!message || !key) { return false }
  6615. if (!isNull(this$1._path.getPathValue(message, key))) { return true }
  6616. // fallback for flat key
  6617. if (message[key]) { return true }
  6618. return false
  6619. };
  6620. if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {
  6621. Object.keys(messages).forEach(function (locale) {
  6622. this$1._checkLocaleMessage(locale, this$1._warnHtmlInMessage, messages[locale]);
  6623. });
  6624. }
  6625. this._initVM({
  6626. locale: locale,
  6627. fallbackLocale: fallbackLocale,
  6628. messages: messages,
  6629. dateTimeFormats: dateTimeFormats,
  6630. numberFormats: numberFormats
  6631. });
  6632. };
  6633. var prototypeAccessors = { vm: { configurable: true },messages: { configurable: true },dateTimeFormats: { configurable: true },numberFormats: { configurable: true },availableLocales: { configurable: true },locale: { configurable: true },fallbackLocale: { configurable: true },formatFallbackMessages: { configurable: true },missing: { configurable: true },formatter: { configurable: true },silentTranslationWarn: { configurable: true },silentFallbackWarn: { configurable: true },preserveDirectiveContent: { configurable: true },warnHtmlInMessage: { configurable: true },postTranslation: { configurable: true } };
  6634. VueI18n.prototype._checkLocaleMessage = function _checkLocaleMessage (locale, level, message) {
  6635. var paths = [];
  6636. var fn = function (level, locale, message, paths) {
  6637. if (isPlainObject(message)) {
  6638. Object.keys(message).forEach(function (key) {
  6639. var val = message[key];
  6640. if (isPlainObject(val)) {
  6641. paths.push(key);
  6642. paths.push('.');
  6643. fn(level, locale, val, paths);
  6644. paths.pop();
  6645. paths.pop();
  6646. } else {
  6647. paths.push(key);
  6648. fn(level, locale, val, paths);
  6649. paths.pop();
  6650. }
  6651. });
  6652. } else if (Array.isArray(message)) {
  6653. message.forEach(function (item, index) {
  6654. if (isPlainObject(item)) {
  6655. paths.push(("[" + index + "]"));
  6656. paths.push('.');
  6657. fn(level, locale, item, paths);
  6658. paths.pop();
  6659. paths.pop();
  6660. } else {
  6661. paths.push(("[" + index + "]"));
  6662. fn(level, locale, item, paths);
  6663. paths.pop();
  6664. }
  6665. });
  6666. } else if (typeof message === 'string') {
  6667. var ret = htmlTagMatcher.test(message);
  6668. if (ret) {
  6669. var msg = "Detected HTML in message '" + message + "' of keypath '" + (paths.join('')) + "' at '" + locale + "'. Consider component interpolation with '<i18n>' to avoid XSS. See https://bit.ly/2ZqJzkp";
  6670. if (level === 'warn') {
  6671. warn(msg);
  6672. } else if (level === 'error') {
  6673. error(msg);
  6674. }
  6675. }
  6676. }
  6677. };
  6678. fn(level, locale, message, paths);
  6679. };
  6680. VueI18n.prototype._initVM = function _initVM (data) {
  6681. var silent = Vue.config.silent;
  6682. Vue.config.silent = true;
  6683. this._vm = new Vue({ data: data });
  6684. Vue.config.silent = silent;
  6685. };
  6686. VueI18n.prototype.destroyVM = function destroyVM () {
  6687. this._vm.$destroy();
  6688. };
  6689. VueI18n.prototype.subscribeDataChanging = function subscribeDataChanging (vm) {
  6690. this._dataListeners.push(vm);
  6691. };
  6692. VueI18n.prototype.unsubscribeDataChanging = function unsubscribeDataChanging (vm) {
  6693. remove(this._dataListeners, vm);
  6694. };
  6695. VueI18n.prototype.watchI18nData = function watchI18nData () {
  6696. var self = this;
  6697. return this._vm.$watch('$data', function () {
  6698. var i = self._dataListeners.length;
  6699. while (i--) {
  6700. Vue.nextTick(function () {
  6701. self._dataListeners[i] && self._dataListeners[i].$forceUpdate();
  6702. });
  6703. }
  6704. }, { deep: true })
  6705. };
  6706. VueI18n.prototype.watchLocale = function watchLocale () {
  6707. /* istanbul ignore if */
  6708. if (!this._sync || !this._root) { return null }
  6709. var target = this._vm;
  6710. return this._root.$i18n.vm.$watch('locale', function (val) {
  6711. target.$set(target, 'locale', val);
  6712. target.$forceUpdate();
  6713. }, { immediate: true })
  6714. };
  6715. prototypeAccessors.vm.get = function () { return this._vm };
  6716. prototypeAccessors.messages.get = function () { return looseClone(this._getMessages()) };
  6717. prototypeAccessors.dateTimeFormats.get = function () { return looseClone(this._getDateTimeFormats()) };
  6718. prototypeAccessors.numberFormats.get = function () { return looseClone(this._getNumberFormats()) };
  6719. prototypeAccessors.availableLocales.get = function () { return Object.keys(this.messages).sort() };
  6720. prototypeAccessors.locale.get = function () { return this._vm.locale };
  6721. prototypeAccessors.locale.set = function (locale) {
  6722. this._vm.$set(this._vm, 'locale', locale);
  6723. };
  6724. prototypeAccessors.fallbackLocale.get = function () { return this._vm.fallbackLocale };
  6725. prototypeAccessors.fallbackLocale.set = function (locale) {
  6726. this._vm.$set(this._vm, 'fallbackLocale', locale);
  6727. };
  6728. prototypeAccessors.formatFallbackMessages.get = function () { return this._formatFallbackMessages };
  6729. prototypeAccessors.formatFallbackMessages.set = function (fallback) { this._formatFallbackMessages = fallback; };
  6730. prototypeAccessors.missing.get = function () { return this._missing };
  6731. prototypeAccessors.missing.set = function (handler) { this._missing = handler; };
  6732. prototypeAccessors.formatter.get = function () { return this._formatter };
  6733. prototypeAccessors.formatter.set = function (formatter) { this._formatter = formatter; };
  6734. prototypeAccessors.silentTranslationWarn.get = function () { return this._silentTranslationWarn };
  6735. prototypeAccessors.silentTranslationWarn.set = function (silent) { this._silentTranslationWarn = silent; };
  6736. prototypeAccessors.silentFallbackWarn.get = function () { return this._silentFallbackWarn };
  6737. prototypeAccessors.silentFallbackWarn.set = function (silent) { this._silentFallbackWarn = silent; };
  6738. prototypeAccessors.preserveDirectiveContent.get = function () { return this._preserveDirectiveContent };
  6739. prototypeAccessors.preserveDirectiveContent.set = function (preserve) { this._preserveDirectiveContent = preserve; };
  6740. prototypeAccessors.warnHtmlInMessage.get = function () { return this._warnHtmlInMessage };
  6741. prototypeAccessors.warnHtmlInMessage.set = function (level) {
  6742. var this$1 = this;
  6743. var orgLevel = this._warnHtmlInMessage;
  6744. this._warnHtmlInMessage = level;
  6745. if (orgLevel !== level && (level === 'warn' || level === 'error')) {
  6746. var messages = this._getMessages();
  6747. Object.keys(messages).forEach(function (locale) {
  6748. this$1._checkLocaleMessage(locale, this$1._warnHtmlInMessage, messages[locale]);
  6749. });
  6750. }
  6751. };
  6752. prototypeAccessors.postTranslation.get = function () { return this._postTranslation };
  6753. prototypeAccessors.postTranslation.set = function (handler) { this._postTranslation = handler; };
  6754. VueI18n.prototype._getMessages = function _getMessages () { return this._vm.messages };
  6755. VueI18n.prototype._getDateTimeFormats = function _getDateTimeFormats () { return this._vm.dateTimeFormats };
  6756. VueI18n.prototype._getNumberFormats = function _getNumberFormats () { return this._vm.numberFormats };
  6757. VueI18n.prototype._warnDefault = function _warnDefault (locale, key, result, vm, values, interpolateMode) {
  6758. if (!isNull(result)) { return result }
  6759. if (this._missing) {
  6760. var missingRet = this._missing.apply(null, [locale, key, vm, values]);
  6761. if (typeof missingRet === 'string') {
  6762. return missingRet
  6763. }
  6764. } else {
  6765. if (false) {}
  6766. }
  6767. if (this._formatFallbackMessages) {
  6768. var parsedArgs = parseArgs.apply(void 0, values);
  6769. return this._render(key, interpolateMode, parsedArgs.params, key)
  6770. } else {
  6771. return key
  6772. }
  6773. };
  6774. VueI18n.prototype._isFallbackRoot = function _isFallbackRoot (val) {
  6775. return !val && !isNull(this._root) && this._fallbackRoot
  6776. };
  6777. VueI18n.prototype._isSilentFallbackWarn = function _isSilentFallbackWarn (key) {
  6778. return this._silentFallbackWarn instanceof RegExp
  6779. ? this._silentFallbackWarn.test(key)
  6780. : this._silentFallbackWarn
  6781. };
  6782. VueI18n.prototype._isSilentFallback = function _isSilentFallback (locale, key) {
  6783. return this._isSilentFallbackWarn(key) && (this._isFallbackRoot() || locale !== this.fallbackLocale)
  6784. };
  6785. VueI18n.prototype._isSilentTranslationWarn = function _isSilentTranslationWarn (key) {
  6786. return this._silentTranslationWarn instanceof RegExp
  6787. ? this._silentTranslationWarn.test(key)
  6788. : this._silentTranslationWarn
  6789. };
  6790. VueI18n.prototype._interpolate = function _interpolate (
  6791. locale,
  6792. message,
  6793. key,
  6794. host,
  6795. interpolateMode,
  6796. values,
  6797. visitedLinkStack
  6798. ) {
  6799. if (!message) { return null }
  6800. var pathRet = this._path.getPathValue(message, key);
  6801. if (Array.isArray(pathRet) || isPlainObject(pathRet)) { return pathRet }
  6802. var ret;
  6803. if (isNull(pathRet)) {
  6804. /* istanbul ignore else */
  6805. if (isPlainObject(message)) {
  6806. ret = message[key];
  6807. if (typeof ret !== 'string') {
  6808. if (false) {}
  6809. return null
  6810. }
  6811. } else {
  6812. return null
  6813. }
  6814. } else {
  6815. /* istanbul ignore else */
  6816. if (typeof pathRet === 'string') {
  6817. ret = pathRet;
  6818. } else {
  6819. if (false) {}
  6820. return null
  6821. }
  6822. }
  6823. // Check for the existence of links within the translated string
  6824. if (ret.indexOf('@:') >= 0 || ret.indexOf('@.') >= 0) {
  6825. ret = this._link(locale, message, ret, host, 'raw', values, visitedLinkStack);
  6826. }
  6827. return this._render(ret, interpolateMode, values, key)
  6828. };
  6829. VueI18n.prototype._link = function _link (
  6830. locale,
  6831. message,
  6832. str,
  6833. host,
  6834. interpolateMode,
  6835. values,
  6836. visitedLinkStack
  6837. ) {
  6838. var ret = str;
  6839. // Match all the links within the local
  6840. // We are going to replace each of
  6841. // them with its translation
  6842. var matches = ret.match(linkKeyMatcher);
  6843. for (var idx in matches) {
  6844. // ie compatible: filter custom array
  6845. // prototype method
  6846. if (!matches.hasOwnProperty(idx)) {
  6847. continue
  6848. }
  6849. var link = matches[idx];
  6850. var linkKeyPrefixMatches = link.match(linkKeyPrefixMatcher);
  6851. var linkPrefix = linkKeyPrefixMatches[0];
  6852. var formatterName = linkKeyPrefixMatches[1];
  6853. // Remove the leading @:, @.case: and the brackets
  6854. var linkPlaceholder = link.replace(linkPrefix, '').replace(bracketsMatcher, '');
  6855. if (visitedLinkStack.includes(linkPlaceholder)) {
  6856. if (false) {}
  6857. return ret
  6858. }
  6859. visitedLinkStack.push(linkPlaceholder);
  6860. // Translate the link
  6861. var translated = this._interpolate(
  6862. locale, message, linkPlaceholder, host,
  6863. interpolateMode === 'raw' ? 'string' : interpolateMode,
  6864. interpolateMode === 'raw' ? undefined : values,
  6865. visitedLinkStack
  6866. );
  6867. if (this._isFallbackRoot(translated)) {
  6868. if (false) {}
  6869. /* istanbul ignore if */
  6870. if (!this._root) { throw Error('unexpected error') }
  6871. var root = this._root.$i18n;
  6872. translated = root._translate(
  6873. root._getMessages(), root.locale, root.fallbackLocale,
  6874. linkPlaceholder, host, interpolateMode, values
  6875. );
  6876. }
  6877. translated = this._warnDefault(
  6878. locale, linkPlaceholder, translated, host,
  6879. Array.isArray(values) ? values : [values],
  6880. interpolateMode
  6881. );
  6882. if (this._modifiers.hasOwnProperty(formatterName)) {
  6883. translated = this._modifiers[formatterName](translated);
  6884. } else if (defaultModifiers.hasOwnProperty(formatterName)) {
  6885. translated = defaultModifiers[formatterName](translated);
  6886. }
  6887. visitedLinkStack.pop();
  6888. // Replace the link with the translated
  6889. ret = !translated ? ret : ret.replace(link, translated);
  6890. }
  6891. return ret
  6892. };
  6893. VueI18n.prototype._render = function _render (message, interpolateMode, values, path) {
  6894. var ret = this._formatter.interpolate(message, values, path);
  6895. // If the custom formatter refuses to work - apply the default one
  6896. if (!ret) {
  6897. ret = defaultFormatter.interpolate(message, values, path);
  6898. }
  6899. // if interpolateMode is **not** 'string' ('row'),
  6900. // return the compiled data (e.g. ['foo', VNode, 'bar']) with formatter
  6901. return interpolateMode === 'string' && typeof ret !== 'string' ? ret.join('') : ret
  6902. };
  6903. VueI18n.prototype._translate = function _translate (
  6904. messages,
  6905. locale,
  6906. fallback,
  6907. key,
  6908. host,
  6909. interpolateMode,
  6910. args
  6911. ) {
  6912. var res =
  6913. this._interpolate(locale, messages[locale], key, host, interpolateMode, args, [key]);
  6914. if (!isNull(res)) { return res }
  6915. res = this._interpolate(fallback, messages[fallback], key, host, interpolateMode, args, [key]);
  6916. if (!isNull(res)) {
  6917. if (false) {}
  6918. return res
  6919. } else {
  6920. return null
  6921. }
  6922. };
  6923. VueI18n.prototype._t = function _t (key, _locale, messages, host) {
  6924. var ref;
  6925. var values = [], len = arguments.length - 4;
  6926. while ( len-- > 0 ) values[ len ] = arguments[ len + 4 ];
  6927. if (!key) { return '' }
  6928. var parsedArgs = parseArgs.apply(void 0, values);
  6929. var locale = parsedArgs.locale || _locale;
  6930. var ret = this._translate(
  6931. messages, locale, this.fallbackLocale, key,
  6932. host, 'string', parsedArgs.params
  6933. );
  6934. if (this._isFallbackRoot(ret)) {
  6935. if (false) {}
  6936. /* istanbul ignore if */
  6937. if (!this._root) { throw Error('unexpected error') }
  6938. return (ref = this._root).$t.apply(ref, [ key ].concat( values ))
  6939. } else {
  6940. ret = this._warnDefault(locale, key, ret, host, values, 'string');
  6941. if (this._postTranslation) {
  6942. ret = this._postTranslation(ret);
  6943. }
  6944. return ret
  6945. }
  6946. };
  6947. VueI18n.prototype.t = function t (key) {
  6948. var ref;
  6949. var values = [], len = arguments.length - 1;
  6950. while ( len-- > 0 ) values[ len ] = arguments[ len + 1 ];
  6951. return (ref = this)._t.apply(ref, [ key, this.locale, this._getMessages(), null ].concat( values ))
  6952. };
  6953. VueI18n.prototype._i = function _i (key, locale, messages, host, values) {
  6954. var ret =
  6955. this._translate(messages, locale, this.fallbackLocale, key, host, 'raw', values);
  6956. if (this._isFallbackRoot(ret)) {
  6957. if (false) {}
  6958. if (!this._root) { throw Error('unexpected error') }
  6959. return this._root.$i18n.i(key, locale, values)
  6960. } else {
  6961. return this._warnDefault(locale, key, ret, host, [values], 'raw')
  6962. }
  6963. };
  6964. VueI18n.prototype.i = function i (key, locale, values) {
  6965. /* istanbul ignore if */
  6966. if (!key) { return '' }
  6967. if (typeof locale !== 'string') {
  6968. locale = this.locale;
  6969. }
  6970. return this._i(key, locale, this._getMessages(), null, values)
  6971. };
  6972. VueI18n.prototype._tc = function _tc (
  6973. key,
  6974. _locale,
  6975. messages,
  6976. host,
  6977. choice
  6978. ) {
  6979. var ref;
  6980. var values = [], len = arguments.length - 5;
  6981. while ( len-- > 0 ) values[ len ] = arguments[ len + 5 ];
  6982. if (!key) { return '' }
  6983. if (choice === undefined) {
  6984. choice = 1;
  6985. }
  6986. var predefined = { 'count': choice, 'n': choice };
  6987. var parsedArgs = parseArgs.apply(void 0, values);
  6988. parsedArgs.params = Object.assign(predefined, parsedArgs.params);
  6989. values = parsedArgs.locale === null ? [parsedArgs.params] : [parsedArgs.locale, parsedArgs.params];
  6990. return this.fetchChoice((ref = this)._t.apply(ref, [ key, _locale, messages, host ].concat( values )), choice)
  6991. };
  6992. VueI18n.prototype.fetchChoice = function fetchChoice (message, choice) {
  6993. /* istanbul ignore if */
  6994. if (!message && typeof message !== 'string') { return null }
  6995. var choices = message.split('|');
  6996. choice = this.getChoiceIndex(choice, choices.length);
  6997. if (!choices[choice]) { return message }
  6998. return choices[choice].trim()
  6999. };
  7000. /**
  7001. * @param choice {number} a choice index given by the input to $tc: `$tc('path.to.rule', choiceIndex)`
  7002. * @param choicesLength {number} an overall amount of available choices
  7003. * @returns a final choice index
  7004. */
  7005. VueI18n.prototype.getChoiceIndex = function getChoiceIndex (choice, choicesLength) {
  7006. // Default (old) getChoiceIndex implementation - english-compatible
  7007. var defaultImpl = function (_choice, _choicesLength) {
  7008. _choice = Math.abs(_choice);
  7009. if (_choicesLength === 2) {
  7010. return _choice
  7011. ? _choice > 1
  7012. ? 1
  7013. : 0
  7014. : 1
  7015. }
  7016. return _choice ? Math.min(_choice, 2) : 0
  7017. };
  7018. if (this.locale in this.pluralizationRules) {
  7019. return this.pluralizationRules[this.locale].apply(this, [choice, choicesLength])
  7020. } else {
  7021. return defaultImpl(choice, choicesLength)
  7022. }
  7023. };
  7024. VueI18n.prototype.tc = function tc (key, choice) {
  7025. var ref;
  7026. var values = [], len = arguments.length - 2;
  7027. while ( len-- > 0 ) values[ len ] = arguments[ len + 2 ];
  7028. return (ref = this)._tc.apply(ref, [ key, this.locale, this._getMessages(), null, choice ].concat( values ))
  7029. };
  7030. VueI18n.prototype._te = function _te (key, locale, messages) {
  7031. var args = [], len = arguments.length - 3;
  7032. while ( len-- > 0 ) args[ len ] = arguments[ len + 3 ];
  7033. var _locale = parseArgs.apply(void 0, args).locale || locale;
  7034. return this._exist(messages[_locale], key)
  7035. };
  7036. VueI18n.prototype.te = function te (key, locale) {
  7037. return this._te(key, this.locale, this._getMessages(), locale)
  7038. };
  7039. VueI18n.prototype.getLocaleMessage = function getLocaleMessage (locale) {
  7040. return looseClone(this._vm.messages[locale] || {})
  7041. };
  7042. VueI18n.prototype.setLocaleMessage = function setLocaleMessage (locale, message) {
  7043. if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {
  7044. this._checkLocaleMessage(locale, this._warnHtmlInMessage, message);
  7045. }
  7046. this._vm.$set(this._vm.messages, locale, message);
  7047. };
  7048. VueI18n.prototype.mergeLocaleMessage = function mergeLocaleMessage (locale, message) {
  7049. if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {
  7050. this._checkLocaleMessage(locale, this._warnHtmlInMessage, message);
  7051. }
  7052. this._vm.$set(this._vm.messages, locale, merge({}, this._vm.messages[locale] || {}, message));
  7053. };
  7054. VueI18n.prototype.getDateTimeFormat = function getDateTimeFormat (locale) {
  7055. return looseClone(this._vm.dateTimeFormats[locale] || {})
  7056. };
  7057. VueI18n.prototype.setDateTimeFormat = function setDateTimeFormat (locale, format) {
  7058. this._vm.$set(this._vm.dateTimeFormats, locale, format);
  7059. };
  7060. VueI18n.prototype.mergeDateTimeFormat = function mergeDateTimeFormat (locale, format) {
  7061. this._vm.$set(this._vm.dateTimeFormats, locale, merge(this._vm.dateTimeFormats[locale] || {}, format));
  7062. };
  7063. VueI18n.prototype._localizeDateTime = function _localizeDateTime (
  7064. value,
  7065. locale,
  7066. fallback,
  7067. dateTimeFormats,
  7068. key
  7069. ) {
  7070. var _locale = locale;
  7071. var formats = dateTimeFormats[_locale];
  7072. // fallback locale
  7073. if (isNull(formats) || isNull(formats[key])) {
  7074. if (false) {}
  7075. _locale = fallback;
  7076. formats = dateTimeFormats[_locale];
  7077. }
  7078. if (isNull(formats) || isNull(formats[key])) {
  7079. return null
  7080. } else {
  7081. var format = formats[key];
  7082. var id = _locale + "__" + key;
  7083. var formatter = this._dateTimeFormatters[id];
  7084. if (!formatter) {
  7085. formatter = this._dateTimeFormatters[id] = new Intl.DateTimeFormat(_locale, format);
  7086. }
  7087. return formatter.format(value)
  7088. }
  7089. };
  7090. VueI18n.prototype._d = function _d (value, locale, key) {
  7091. /* istanbul ignore if */
  7092. if (false) {}
  7093. if (!key) {
  7094. return new Intl.DateTimeFormat(locale).format(value)
  7095. }
  7096. var ret =
  7097. this._localizeDateTime(value, locale, this.fallbackLocale, this._getDateTimeFormats(), key);
  7098. if (this._isFallbackRoot(ret)) {
  7099. if (false) {}
  7100. /* istanbul ignore if */
  7101. if (!this._root) { throw Error('unexpected error') }
  7102. return this._root.$i18n.d(value, key, locale)
  7103. } else {
  7104. return ret || ''
  7105. }
  7106. };
  7107. VueI18n.prototype.d = function d (value) {
  7108. var args = [], len = arguments.length - 1;
  7109. while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];
  7110. var locale = this.locale;
  7111. var key = null;
  7112. if (args.length === 1) {
  7113. if (typeof args[0] === 'string') {
  7114. key = args[0];
  7115. } else if (isObject(args[0])) {
  7116. if (args[0].locale) {
  7117. locale = args[0].locale;
  7118. }
  7119. if (args[0].key) {
  7120. key = args[0].key;
  7121. }
  7122. }
  7123. } else if (args.length === 2) {
  7124. if (typeof args[0] === 'string') {
  7125. key = args[0];
  7126. }
  7127. if (typeof args[1] === 'string') {
  7128. locale = args[1];
  7129. }
  7130. }
  7131. return this._d(value, locale, key)
  7132. };
  7133. VueI18n.prototype.getNumberFormat = function getNumberFormat (locale) {
  7134. return looseClone(this._vm.numberFormats[locale] || {})
  7135. };
  7136. VueI18n.prototype.setNumberFormat = function setNumberFormat (locale, format) {
  7137. this._vm.$set(this._vm.numberFormats, locale, format);
  7138. this._clearNumberFormat(locale, format);
  7139. };
  7140. VueI18n.prototype.mergeNumberFormat = function mergeNumberFormat (locale, format) {
  7141. this._vm.$set(this._vm.numberFormats, locale, merge(this._vm.numberFormats[locale] || {}, format));
  7142. this._clearNumberFormat(locale, format);
  7143. };
  7144. VueI18n.prototype._clearNumberFormat = function _clearNumberFormat (locale, format) {
  7145. for (var key in format) {
  7146. var id = locale + "__" + key;
  7147. if (!this._numberFormatters.hasOwnProperty(id)) {
  7148. continue
  7149. }
  7150. delete this._numberFormatters[id];
  7151. }
  7152. };
  7153. VueI18n.prototype._getNumberFormatter = function _getNumberFormatter (
  7154. value,
  7155. locale,
  7156. fallback,
  7157. numberFormats,
  7158. key,
  7159. options
  7160. ) {
  7161. var _locale = locale;
  7162. var formats = numberFormats[_locale];
  7163. // fallback locale
  7164. if (isNull(formats) || isNull(formats[key])) {
  7165. if (false) {}
  7166. _locale = fallback;
  7167. formats = numberFormats[_locale];
  7168. }
  7169. if (isNull(formats) || isNull(formats[key])) {
  7170. return null
  7171. } else {
  7172. var format = formats[key];
  7173. var formatter;
  7174. if (options) {
  7175. // If options specified - create one time number formatter
  7176. formatter = new Intl.NumberFormat(_locale, Object.assign({}, format, options));
  7177. } else {
  7178. var id = _locale + "__" + key;
  7179. formatter = this._numberFormatters[id];
  7180. if (!formatter) {
  7181. formatter = this._numberFormatters[id] = new Intl.NumberFormat(_locale, format);
  7182. }
  7183. }
  7184. return formatter
  7185. }
  7186. };
  7187. VueI18n.prototype._n = function _n (value, locale, key, options) {
  7188. /* istanbul ignore if */
  7189. if (!VueI18n.availabilities.numberFormat) {
  7190. if (false) {}
  7191. return ''
  7192. }
  7193. if (!key) {
  7194. var nf = !options ? new Intl.NumberFormat(locale) : new Intl.NumberFormat(locale, options);
  7195. return nf.format(value)
  7196. }
  7197. var formatter = this._getNumberFormatter(value, locale, this.fallbackLocale, this._getNumberFormats(), key, options);
  7198. var ret = formatter && formatter.format(value);
  7199. if (this._isFallbackRoot(ret)) {
  7200. if (false) {}
  7201. /* istanbul ignore if */
  7202. if (!this._root) { throw Error('unexpected error') }
  7203. return this._root.$i18n.n(value, Object.assign({}, { key: key, locale: locale }, options))
  7204. } else {
  7205. return ret || ''
  7206. }
  7207. };
  7208. VueI18n.prototype.n = function n (value) {
  7209. var args = [], len = arguments.length - 1;
  7210. while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];
  7211. var locale = this.locale;
  7212. var key = null;
  7213. var options = null;
  7214. if (args.length === 1) {
  7215. if (typeof args[0] === 'string') {
  7216. key = args[0];
  7217. } else if (isObject(args[0])) {
  7218. if (args[0].locale) {
  7219. locale = args[0].locale;
  7220. }
  7221. if (args[0].key) {
  7222. key = args[0].key;
  7223. }
  7224. // Filter out number format options only
  7225. options = Object.keys(args[0]).reduce(function (acc, key) {
  7226. var obj;
  7227. if (numberFormatKeys.includes(key)) {
  7228. return Object.assign({}, acc, ( obj = {}, obj[key] = args[0][key], obj ))
  7229. }
  7230. return acc
  7231. }, null);
  7232. }
  7233. } else if (args.length === 2) {
  7234. if (typeof args[0] === 'string') {
  7235. key = args[0];
  7236. }
  7237. if (typeof args[1] === 'string') {
  7238. locale = args[1];
  7239. }
  7240. }
  7241. return this._n(value, locale, key, options)
  7242. };
  7243. VueI18n.prototype._ntp = function _ntp (value, locale, key, options) {
  7244. /* istanbul ignore if */
  7245. if (!VueI18n.availabilities.numberFormat) {
  7246. if (false) {}
  7247. return []
  7248. }
  7249. if (!key) {
  7250. var nf = !options ? new Intl.NumberFormat(locale) : new Intl.NumberFormat(locale, options);
  7251. return nf.formatToParts(value)
  7252. }
  7253. var formatter = this._getNumberFormatter(value, locale, this.fallbackLocale, this._getNumberFormats(), key, options);
  7254. var ret = formatter && formatter.formatToParts(value);
  7255. if (this._isFallbackRoot(ret)) {
  7256. if (false) {}
  7257. /* istanbul ignore if */
  7258. if (!this._root) { throw Error('unexpected error') }
  7259. return this._root.$i18n._ntp(value, locale, key, options)
  7260. } else {
  7261. return ret || []
  7262. }
  7263. };
  7264. Object.defineProperties( VueI18n.prototype, prototypeAccessors );
  7265. var availabilities;
  7266. // $FlowFixMe
  7267. Object.defineProperty(VueI18n, 'availabilities', {
  7268. get: function get () {
  7269. if (!availabilities) {
  7270. var intlDefined = typeof Intl !== 'undefined';
  7271. availabilities = {
  7272. dateTimeFormat: intlDefined && typeof Intl.DateTimeFormat !== 'undefined',
  7273. numberFormat: intlDefined && typeof Intl.NumberFormat !== 'undefined'
  7274. };
  7275. }
  7276. return availabilities
  7277. }
  7278. });
  7279. VueI18n.install = install;
  7280. VueI18n.version = '8.16.0';
  7281. /* harmony default export */ __webpack_exports__["default"] = (VueI18n);
  7282. /***/ }),
  7283. /***/ "2f66":
  7284. /***/ (function(module, exports, __webpack_require__) {
  7285. "use strict";
  7286. var _interopRequireDefault = __webpack_require__("8e6d");
  7287. Object.defineProperty(exports, "__esModule", {
  7288. value: true
  7289. });
  7290. exports.default = void 0;
  7291. var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
  7292. var _lang = __webpack_require__("4e21");
  7293. var RestParameter = function RestParameter(options) {
  7294. (0, _classCallCheck2.default)(this, RestParameter);
  7295. this.url = options.url;
  7296. this.type = 'rest';
  7297. this.attributeFilter = options.attributeFilter || null;
  7298. this.maxFeatures = options.maxFeatures || 20;
  7299. this.name = options.name || (0, _lang.geti18n)().t('commontypes.restData');
  7300. this.proxy = options.proxy;
  7301. };
  7302. exports.default = RestParameter;
  7303. /***/ }),
  7304. /***/ "2f96":
  7305. /***/ (function(module, exports, __webpack_require__) {
  7306. var helper = __webpack_require__("cabd");
  7307. var xml2js = __webpack_require__("98c2");
  7308. function validateOptions (userOptions) {
  7309. var options = helper.copyOptions(userOptions);
  7310. helper.ensureSpacesExists(options);
  7311. return options;
  7312. }
  7313. module.exports = function(xml, userOptions) {
  7314. var options, js, json, parentKey;
  7315. options = validateOptions(userOptions);
  7316. js = xml2js(xml, options);
  7317. parentKey = 'compact' in options && options.compact ? '_parent' : 'parent';
  7318. // parentKey = ptions.compact ? '_parent' : 'parent'; // consider this
  7319. if ('addParent' in options && options.addParent) {
  7320. json = JSON.stringify(js, function (k, v) { return k === parentKey? '_' : v; }, options.spaces);
  7321. } else {
  7322. json = JSON.stringify(js, null, options.spaces);
  7323. }
  7324. return json.replace(/\u2028/g, '\\u2028').replace(/\u2029/g, '\\u2029');
  7325. };
  7326. /***/ }),
  7327. /***/ "30f7":
  7328. /***/ (function(module, exports) {
  7329. /**
  7330. * lodash 3.0.3 (Custom Build) <https://lodash.com/>
  7331. * Build: `lodash modularize exports="npm" -o ./`
  7332. * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
  7333. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  7334. * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  7335. * Available under MIT license <https://lodash.com/license>
  7336. */
  7337. /** `Object#toString` result references. */
  7338. var numberTag = '[object Number]';
  7339. /** Used for built-in method references. */
  7340. var objectProto = Object.prototype;
  7341. /**
  7342. * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
  7343. * of values.
  7344. */
  7345. var objectToString = objectProto.toString;
  7346. /**
  7347. * Checks if `value` is object-like. A value is object-like if it's not `null`
  7348. * and has a `typeof` result of "object".
  7349. *
  7350. * @static
  7351. * @memberOf _
  7352. * @category Lang
  7353. * @param {*} value The value to check.
  7354. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  7355. * @example
  7356. *
  7357. * _.isObjectLike({});
  7358. * // => true
  7359. *
  7360. * _.isObjectLike([1, 2, 3]);
  7361. * // => true
  7362. *
  7363. * _.isObjectLike(_.noop);
  7364. * // => false
  7365. *
  7366. * _.isObjectLike(null);
  7367. * // => false
  7368. */
  7369. function isObjectLike(value) {
  7370. return !!value && typeof value == 'object';
  7371. }
  7372. /**
  7373. * Checks if `value` is classified as a `Number` primitive or object.
  7374. *
  7375. * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are classified
  7376. * as numbers, use the `_.isFinite` method.
  7377. *
  7378. * @static
  7379. * @memberOf _
  7380. * @category Lang
  7381. * @param {*} value The value to check.
  7382. * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
  7383. * @example
  7384. *
  7385. * _.isNumber(3);
  7386. * // => true
  7387. *
  7388. * _.isNumber(Number.MIN_VALUE);
  7389. * // => true
  7390. *
  7391. * _.isNumber(Infinity);
  7392. * // => true
  7393. *
  7394. * _.isNumber('3');
  7395. * // => false
  7396. */
  7397. function isNumber(value) {
  7398. return typeof value == 'number' ||
  7399. (isObjectLike(value) && objectToString.call(value) == numberTag);
  7400. }
  7401. module.exports = isNumber;
  7402. /***/ }),
  7403. /***/ "31ff":
  7404. /***/ (function(module, exports) {
  7405. function _arrayWithHoles(arr) {
  7406. if (Array.isArray(arr)) return arr;
  7407. }
  7408. module.exports = _arrayWithHoles;
  7409. /***/ }),
  7410. /***/ "32bc":
  7411. /***/ (function(module, exports, __webpack_require__) {
  7412. "use strict";
  7413. var _interopRequireDefault = __webpack_require__("8e6d");
  7414. Object.defineProperty(exports, "__esModule", {
  7415. value: true
  7416. });
  7417. exports.default = void 0;
  7418. var _util = __webpack_require__("1448");
  7419. var _theme = _interopRequireDefault(__webpack_require__("9259"));
  7420. //
  7421. //
  7422. //
  7423. //
  7424. //
  7425. //
  7426. var _default = {
  7427. name: 'SmTimeText',
  7428. mixins: [_theme.default],
  7429. props: {
  7430. timeType: {
  7431. type: String,
  7432. default: 'date' // "date+second" "date+second+week"
  7433. },
  7434. fontStyle: {
  7435. type: Object
  7436. }
  7437. },
  7438. data: function data() {
  7439. return {
  7440. time: '',
  7441. timeInterval: null
  7442. };
  7443. },
  7444. watch: {
  7445. timeType: function timeType() {
  7446. this.initTime(this.timeType);
  7447. }
  7448. },
  7449. mounted: function mounted() {
  7450. this.initTime(this.timeType);
  7451. },
  7452. destroyed: function destroyed() {
  7453. clearInterval(this.timeInterval);
  7454. },
  7455. methods: {
  7456. // 初始化
  7457. initTime: function initTime(timeType) {
  7458. var _this = this;
  7459. clearInterval(this.timeInterval);
  7460. this.time = (0, _util.getDateTime)(timeType);
  7461. this.timeInterval = setInterval(function () {
  7462. _this.time = (0, _util.getDateTime)(timeType);
  7463. }, 1000);
  7464. }
  7465. }
  7466. };
  7467. exports.default = _default;
  7468. /***/ }),
  7469. /***/ "331f":
  7470. /***/ (function(module, exports, __webpack_require__) {
  7471. var isObject = __webpack_require__("d3a8"),
  7472. now = __webpack_require__("d201"),
  7473. toNumber = __webpack_require__("b9e2");
  7474. /** Error message constants. */
  7475. var FUNC_ERROR_TEXT = 'Expected a function';
  7476. /* Built-in method references for those with the same name as other `lodash` methods. */
  7477. var nativeMax = Math.max,
  7478. nativeMin = Math.min;
  7479. /**
  7480. * Creates a debounced function that delays invoking `func` until after `wait`
  7481. * milliseconds have elapsed since the last time the debounced function was
  7482. * invoked. The debounced function comes with a `cancel` method to cancel
  7483. * delayed `func` invocations and a `flush` method to immediately invoke them.
  7484. * Provide `options` to indicate whether `func` should be invoked on the
  7485. * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
  7486. * with the last arguments provided to the debounced function. Subsequent
  7487. * calls to the debounced function return the result of the last `func`
  7488. * invocation.
  7489. *
  7490. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  7491. * invoked on the trailing edge of the timeout only if the debounced function
  7492. * is invoked more than once during the `wait` timeout.
  7493. *
  7494. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  7495. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  7496. *
  7497. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  7498. * for details over the differences between `_.debounce` and `_.throttle`.
  7499. *
  7500. * @static
  7501. * @memberOf _
  7502. * @since 0.1.0
  7503. * @category Function
  7504. * @param {Function} func The function to debounce.
  7505. * @param {number} [wait=0] The number of milliseconds to delay.
  7506. * @param {Object} [options={}] The options object.
  7507. * @param {boolean} [options.leading=false]
  7508. * Specify invoking on the leading edge of the timeout.
  7509. * @param {number} [options.maxWait]
  7510. * The maximum time `func` is allowed to be delayed before it's invoked.
  7511. * @param {boolean} [options.trailing=true]
  7512. * Specify invoking on the trailing edge of the timeout.
  7513. * @returns {Function} Returns the new debounced function.
  7514. * @example
  7515. *
  7516. * // Avoid costly calculations while the window size is in flux.
  7517. * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
  7518. *
  7519. * // Invoke `sendMail` when clicked, debouncing subsequent calls.
  7520. * jQuery(element).on('click', _.debounce(sendMail, 300, {
  7521. * 'leading': true,
  7522. * 'trailing': false
  7523. * }));
  7524. *
  7525. * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
  7526. * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
  7527. * var source = new EventSource('/stream');
  7528. * jQuery(source).on('message', debounced);
  7529. *
  7530. * // Cancel the trailing debounced invocation.
  7531. * jQuery(window).on('popstate', debounced.cancel);
  7532. */
  7533. function debounce(func, wait, options) {
  7534. var lastArgs,
  7535. lastThis,
  7536. maxWait,
  7537. result,
  7538. timerId,
  7539. lastCallTime,
  7540. lastInvokeTime = 0,
  7541. leading = false,
  7542. maxing = false,
  7543. trailing = true;
  7544. if (typeof func != 'function') {
  7545. throw new TypeError(FUNC_ERROR_TEXT);
  7546. }
  7547. wait = toNumber(wait) || 0;
  7548. if (isObject(options)) {
  7549. leading = !!options.leading;
  7550. maxing = 'maxWait' in options;
  7551. maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
  7552. trailing = 'trailing' in options ? !!options.trailing : trailing;
  7553. }
  7554. function invokeFunc(time) {
  7555. var args = lastArgs,
  7556. thisArg = lastThis;
  7557. lastArgs = lastThis = undefined;
  7558. lastInvokeTime = time;
  7559. result = func.apply(thisArg, args);
  7560. return result;
  7561. }
  7562. function leadingEdge(time) {
  7563. // Reset any `maxWait` timer.
  7564. lastInvokeTime = time;
  7565. // Start the timer for the trailing edge.
  7566. timerId = setTimeout(timerExpired, wait);
  7567. // Invoke the leading edge.
  7568. return leading ? invokeFunc(time) : result;
  7569. }
  7570. function remainingWait(time) {
  7571. var timeSinceLastCall = time - lastCallTime,
  7572. timeSinceLastInvoke = time - lastInvokeTime,
  7573. timeWaiting = wait - timeSinceLastCall;
  7574. return maxing
  7575. ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
  7576. : timeWaiting;
  7577. }
  7578. function shouldInvoke(time) {
  7579. var timeSinceLastCall = time - lastCallTime,
  7580. timeSinceLastInvoke = time - lastInvokeTime;
  7581. // Either this is the first call, activity has stopped and we're at the
  7582. // trailing edge, the system time has gone backwards and we're treating
  7583. // it as the trailing edge, or we've hit the `maxWait` limit.
  7584. return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
  7585. (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
  7586. }
  7587. function timerExpired() {
  7588. var time = now();
  7589. if (shouldInvoke(time)) {
  7590. return trailingEdge(time);
  7591. }
  7592. // Restart the timer.
  7593. timerId = setTimeout(timerExpired, remainingWait(time));
  7594. }
  7595. function trailingEdge(time) {
  7596. timerId = undefined;
  7597. // Only invoke if we have `lastArgs` which means `func` has been
  7598. // debounced at least once.
  7599. if (trailing && lastArgs) {
  7600. return invokeFunc(time);
  7601. }
  7602. lastArgs = lastThis = undefined;
  7603. return result;
  7604. }
  7605. function cancel() {
  7606. if (timerId !== undefined) {
  7607. clearTimeout(timerId);
  7608. }
  7609. lastInvokeTime = 0;
  7610. lastArgs = lastCallTime = lastThis = timerId = undefined;
  7611. }
  7612. function flush() {
  7613. return timerId === undefined ? result : trailingEdge(now());
  7614. }
  7615. function debounced() {
  7616. var time = now(),
  7617. isInvoking = shouldInvoke(time);
  7618. lastArgs = arguments;
  7619. lastThis = this;
  7620. lastCallTime = time;
  7621. if (isInvoking) {
  7622. if (timerId === undefined) {
  7623. return leadingEdge(lastCallTime);
  7624. }
  7625. if (maxing) {
  7626. // Handle invocations in a tight loop.
  7627. clearTimeout(timerId);
  7628. timerId = setTimeout(timerExpired, wait);
  7629. return invokeFunc(lastCallTime);
  7630. }
  7631. }
  7632. if (timerId === undefined) {
  7633. timerId = setTimeout(timerExpired, wait);
  7634. }
  7635. return result;
  7636. }
  7637. debounced.cancel = cancel;
  7638. debounced.flush = flush;
  7639. return debounced;
  7640. }
  7641. module.exports = debounce;
  7642. /***/ }),
  7643. /***/ "333c":
  7644. /***/ (function(module, exports, __webpack_require__) {
  7645. "use strict";
  7646. var _interopRequireDefault = __webpack_require__("8e6d");
  7647. Object.defineProperty(exports, "__esModule", {
  7648. value: true
  7649. });
  7650. exports.default = void 0;
  7651. var _Card = _interopRequireDefault(__webpack_require__("f7bd"));
  7652. var _default = {
  7653. components: {
  7654. 'sm-card': _Card.default
  7655. },
  7656. data: function data() {
  7657. return {
  7658. isShow: true
  7659. };
  7660. },
  7661. props: {
  7662. position: {
  7663. type: String,
  7664. default: 'top-left',
  7665. validator: function validator(value) {
  7666. return ['top-left', 'top-right', 'bottom-left', 'bottom-right'].includes(value);
  7667. }
  7668. },
  7669. iconClass: {
  7670. type: String
  7671. },
  7672. autoRotate: {
  7673. type: Boolean,
  7674. default: false
  7675. },
  7676. headerName: {
  7677. type: String
  7678. },
  7679. collapsed: {
  7680. type: Boolean,
  7681. // 是否折叠
  7682. default: false
  7683. }
  7684. }
  7685. };
  7686. exports.default = _default;
  7687. /***/ }),
  7688. /***/ "338a":
  7689. /***/ (function(module, exports, __webpack_require__) {
  7690. "use strict";
  7691. var _interopRequireDefault = __webpack_require__("8e6d");
  7692. Object.defineProperty(exports, "__esModule", {
  7693. value: true
  7694. });
  7695. exports.default = void 0;
  7696. var _theme = _interopRequireDefault(__webpack_require__("9259"));
  7697. //
  7698. //
  7699. //
  7700. //
  7701. //
  7702. //
  7703. //
  7704. //
  7705. //
  7706. //
  7707. //
  7708. //
  7709. //
  7710. //
  7711. //
  7712. //
  7713. //
  7714. //
  7715. //
  7716. //
  7717. var _default = {
  7718. name: 'SmIcon',
  7719. mixins: [_theme.default],
  7720. props: {
  7721. type: {
  7722. type: String,
  7723. default: 'info'
  7724. },
  7725. iconStyle: {
  7726. type: Object
  7727. },
  7728. theme: {
  7729. type: String,
  7730. default: 'outlined'
  7731. },
  7732. twoToneColor: {
  7733. type: String
  7734. },
  7735. iconClass: {
  7736. type: String
  7737. },
  7738. component: {
  7739. type: Object
  7740. },
  7741. autoPrefix: {
  7742. type: Boolean,
  7743. default: true
  7744. }
  7745. },
  7746. computed: {
  7747. colorStyle: function colorStyle() {
  7748. return !this.iconStyle || !this.iconStyle.color ? this.getColorStyle(0) : {
  7749. color: this.iconStyle.color
  7750. };
  7751. },
  7752. customIconClass: function customIconClass() {
  7753. return this.autoPrefix ? 'sm-components-icons-' + this.iconClass : this.iconClass;
  7754. }
  7755. }
  7756. };
  7757. exports.default = _default;
  7758. /***/ }),
  7759. /***/ "33aa":
  7760. /***/ (function(module, exports, __webpack_require__) {
  7761. "use strict";
  7762. var _interopRequireDefault = __webpack_require__("8e6d");
  7763. Object.defineProperty(exports, "__esModule", {
  7764. value: true
  7765. });
  7766. exports.chartThemeUtil = exports.getMultiColorGroup = exports.handleMultiGradient = void 0;
  7767. var _typeof2 = _interopRequireDefault(__webpack_require__("7ae5"));
  7768. var _util = __webpack_require__("1448");
  7769. var _lodash = _interopRequireDefault(__webpack_require__("25a2"));
  7770. var handleMultiGradient = function handleMultiGradient(colorGroupsData, dataLength) {
  7771. var startColors = [];
  7772. var endColors = [];
  7773. var startColorGroups = [];
  7774. var endColorGroups = [];
  7775. var results = [];
  7776. colorGroupsData.forEach(function (colorInfo) {
  7777. startColors.push(colorInfo.colorStops[0].color);
  7778. endColors.push(colorInfo.colorStops[1].color);
  7779. });
  7780. startColorGroups = SuperMap.ColorsPickerUtil.getGradientColors(startColors, dataLength, 'RANGE');
  7781. endColorGroups = SuperMap.ColorsPickerUtil.getGradientColors(endColors, dataLength, 'RANGE');
  7782. for (var i = 0; i < dataLength; i++) {
  7783. var colorGroupDataCopy = (0, _lodash.default)(colorGroupsData[0]);
  7784. colorGroupDataCopy.colorStops = [{
  7785. offset: 0,
  7786. color: startColorGroups[i]
  7787. }, {
  7788. offset: 1,
  7789. color: endColorGroups[i]
  7790. }];
  7791. results.push(colorGroupDataCopy);
  7792. }
  7793. return results;
  7794. };
  7795. exports.handleMultiGradient = handleMultiGradient;
  7796. var getMultiColorGroup = function getMultiColorGroup(colorGroup, dataNumber) {
  7797. var nextColorGroup; // 是否需要产生分段颜色值
  7798. if (colorGroup && dataNumber > colorGroup.length && (0, _typeof2.default)(colorGroup[0]) === 'object') {
  7799. nextColorGroup = handleMultiGradient(colorGroup, dataNumber);
  7800. } else {
  7801. nextColorGroup = SuperMap.ColorsPickerUtil.getGradientColors(colorGroup, dataNumber, 'RANGE');
  7802. }
  7803. return nextColorGroup;
  7804. };
  7805. exports.getMultiColorGroup = getMultiColorGroup;
  7806. var chartThemeUtil = function chartThemeUtil() {
  7807. var background = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'rgba(255, 255, 255, 0.6)';
  7808. var textColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '#333';
  7809. var colorGroup = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ['#3fb1e3', '#6be6c1', '#626c91', '#a0a7e6', '#c4ebad', '#96dee8'];
  7810. var dataNumber = arguments.length > 3 ? arguments[3] : undefined;
  7811. colorGroup = getMultiColorGroup(colorGroup, dataNumber);
  7812. var chartTheme = {
  7813. color: colorGroup,
  7814. backgroundColor: background,
  7815. textStyle: {},
  7816. title: {
  7817. textStyle: {
  7818. color: textColor
  7819. },
  7820. subtextStyle: {
  7821. color: '#999999'
  7822. }
  7823. },
  7824. line: {
  7825. itemStyle: {
  7826. normal: {
  7827. borderWidth: '2'
  7828. }
  7829. },
  7830. lineStyle: {
  7831. normal: {
  7832. width: '3'
  7833. }
  7834. },
  7835. symbolSize: '8',
  7836. symbol: 'emptyCircle',
  7837. smooth: false
  7838. },
  7839. radar: {
  7840. name: {
  7841. textStyle: {
  7842. color: textColor
  7843. }
  7844. },
  7845. lineStyle: {
  7846. normal: {
  7847. width: '3',
  7848. color: textColor
  7849. }
  7850. },
  7851. splitLine: {
  7852. lineStyle: {
  7853. color: [(0, _util.getColorWithOpacity)(textColor, 1), (0, _util.getColorWithOpacity)(textColor, 0.8), (0, _util.getColorWithOpacity)(textColor, 0.6), (0, _util.getColorWithOpacity)(textColor, 0.4), (0, _util.getColorWithOpacity)(textColor, 0.2), (0, _util.getColorWithOpacity)(textColor, 0.1)]
  7854. }
  7855. },
  7856. axisLine: {
  7857. lineStyle: {
  7858. color: (0, _util.getColorWithOpacity)(textColor, 0.3)
  7859. }
  7860. },
  7861. symbolSize: '8',
  7862. symbol: 'emptyCircle',
  7863. smooth: false // 'radius': '63%'
  7864. },
  7865. bar: {
  7866. itemStyle: {
  7867. normal: {
  7868. barBorderWidth: 0,
  7869. barBorderColor: '#cccccc'
  7870. },
  7871. emphasis: {
  7872. barBorderWidth: 0,
  7873. barBorderColor: '#cccccc'
  7874. }
  7875. }
  7876. },
  7877. pie: {
  7878. itemStyle: {
  7879. normal: {
  7880. borderWidth: 0,
  7881. borderColor: '#cccccc'
  7882. },
  7883. emphasis: {
  7884. borderWidth: 0,
  7885. borderColor: '#cccccc'
  7886. }
  7887. },
  7888. radius: '63%'
  7889. },
  7890. scatter: {
  7891. itemStyle: {
  7892. normal: {
  7893. borderWidth: 0,
  7894. borderColor: '#cccccc'
  7895. },
  7896. emphasis: {
  7897. borderWidth: 0,
  7898. borderColor: '#cccccc'
  7899. }
  7900. }
  7901. },
  7902. boxplot: {
  7903. itemStyle: {
  7904. normal: {
  7905. borderWidth: 0,
  7906. borderColor: '#cccccc'
  7907. },
  7908. emphasis: {
  7909. borderWidth: 0,
  7910. borderColor: '#cccccc'
  7911. }
  7912. }
  7913. },
  7914. parallel: {
  7915. itemStyle: {
  7916. normal: {
  7917. borderWidth: 0,
  7918. borderColor: '#cccccc'
  7919. },
  7920. emphasis: {
  7921. borderWidth: 0,
  7922. borderColor: '#cccccc'
  7923. }
  7924. }
  7925. },
  7926. sankey: {
  7927. itemStyle: {
  7928. normal: {
  7929. borderWidth: 0,
  7930. borderColor: '#cccccc'
  7931. },
  7932. emphasis: {
  7933. borderWidth: 0,
  7934. borderColor: '#cccccc'
  7935. }
  7936. }
  7937. },
  7938. funnel: {
  7939. itemStyle: {
  7940. normal: {
  7941. borderWidth: 0,
  7942. borderColor: '#cccccc'
  7943. },
  7944. emphasis: {
  7945. borderWidth: 0,
  7946. borderColor: '#cccccc'
  7947. }
  7948. }
  7949. },
  7950. gauge: {
  7951. axisLine: {
  7952. // 坐标轴线
  7953. lineStyle: {
  7954. // 属性lineStyle控制线条样式
  7955. color: [[0.2, colorGroup[0]], [0.8, colorGroup[1]], [1, colorGroup[2]]]
  7956. }
  7957. },
  7958. itemStyle: {
  7959. normal: {
  7960. borderWidth: 0,
  7961. borderColor: '#cccccc'
  7962. },
  7963. emphasis: {
  7964. borderWidth: 0,
  7965. borderColor: '#cccccc'
  7966. }
  7967. }
  7968. },
  7969. candlestick: {
  7970. itemStyle: {
  7971. normal: {
  7972. color: '#e6a0d2',
  7973. color0: 'transparent',
  7974. borderColor: '#e6a0d2',
  7975. borderColor0: '#3fb1e3',
  7976. borderWidth: '2'
  7977. }
  7978. }
  7979. },
  7980. graph: {
  7981. itemStyle: {
  7982. normal: {
  7983. borderWidth: 0,
  7984. borderColor: '#cccccc'
  7985. }
  7986. },
  7987. lineStyle: {
  7988. normal: {
  7989. width: '1',
  7990. color: '#cccccc'
  7991. }
  7992. },
  7993. symbolSize: '8',
  7994. symbol: 'emptyCircle',
  7995. smooth: false,
  7996. color: colorGroup,
  7997. label: {
  7998. normal: {
  7999. textStyle: {
  8000. color: '#ffffff'
  8001. }
  8002. }
  8003. }
  8004. },
  8005. map: {
  8006. itemStyle: {
  8007. normal: {
  8008. areaColor: '#eeeeee',
  8009. borderColor: '#aaaaaa',
  8010. borderWidth: 0.5
  8011. },
  8012. emphasis: {
  8013. areaColor: 'rgba(63,177,227,0.25)',
  8014. borderColor: '#3fb1e3',
  8015. borderWidth: 1
  8016. }
  8017. },
  8018. label: {
  8019. normal: {
  8020. textStyle: {
  8021. color: '#ffffff'
  8022. }
  8023. },
  8024. emphasis: {
  8025. textStyle: {
  8026. color: 'rgb(63,177,227)'
  8027. }
  8028. }
  8029. }
  8030. },
  8031. geo: {
  8032. itemStyle: {
  8033. normal: {
  8034. areaColor: '#eeeeee',
  8035. borderColor: '#aaaaaa',
  8036. borderWidth: 0.5
  8037. },
  8038. emphasis: {
  8039. areaColor: 'rgba(63,177,227,0.25)',
  8040. borderColor: '#3fb1e3',
  8041. borderWidth: 1
  8042. }
  8043. },
  8044. label: {
  8045. normal: {
  8046. textStyle: {
  8047. color: '#ffffff'
  8048. }
  8049. },
  8050. emphasis: {
  8051. textStyle: {
  8052. color: 'rgb(63,177,227)'
  8053. }
  8054. }
  8055. }
  8056. },
  8057. categoryAxis: {
  8058. axisLine: {
  8059. show: true,
  8060. lineStyle: {
  8061. color: textColor
  8062. }
  8063. },
  8064. axisTick: {
  8065. show: true,
  8066. lineStyle: {
  8067. color: textColor
  8068. }
  8069. },
  8070. axisLabel: {
  8071. show: true,
  8072. rotate: -45,
  8073. interval: 'auto',
  8074. textStyle: {
  8075. color: textColor
  8076. }
  8077. },
  8078. splitLine: {
  8079. show: false,
  8080. lineStyle: {
  8081. color: ['#eeeeee']
  8082. }
  8083. },
  8084. splitArea: {
  8085. show: false,
  8086. areaStyle: {
  8087. color: ['rgba(250,250,250,0.05)', 'rgba(200,200,200,0.02)']
  8088. }
  8089. },
  8090. nameTextStyle: {
  8091. fontSize: 14
  8092. }
  8093. },
  8094. valueAxis: {
  8095. axisLine: {
  8096. show: true,
  8097. lineStyle: {
  8098. color: textColor
  8099. }
  8100. },
  8101. axisTick: {
  8102. show: true,
  8103. lineStyle: {
  8104. color: textColor
  8105. }
  8106. },
  8107. axisLabel: {
  8108. show: true,
  8109. rotate: 45,
  8110. interval: 'auto',
  8111. textStyle: {
  8112. color: textColor
  8113. }
  8114. },
  8115. splitLine: {
  8116. show: false,
  8117. lineStyle: {
  8118. color: ['#eeeeee']
  8119. }
  8120. },
  8121. splitArea: {
  8122. show: true // 'areaStyle': {
  8123. // 'color': [
  8124. // 'rgba(237,237,236,1)',
  8125. // 'rgba(252,252,251,1)'
  8126. // ]
  8127. // }
  8128. },
  8129. nameTextStyle: {
  8130. fontSize: 14
  8131. }
  8132. },
  8133. logAxis: {
  8134. axisLine: {
  8135. show: true,
  8136. lineStyle: {
  8137. color: textColor
  8138. }
  8139. },
  8140. axisTick: {
  8141. show: false,
  8142. lineStyle: {
  8143. color: textColor
  8144. }
  8145. },
  8146. axisLabel: {
  8147. show: true,
  8148. textStyle: {
  8149. color: textColor
  8150. }
  8151. },
  8152. splitLine: {
  8153. show: true,
  8154. lineStyle: {
  8155. color: [textColor]
  8156. }
  8157. },
  8158. splitArea: {
  8159. show: false,
  8160. areaStyle: {
  8161. color: ['rgba(250,250,250,0.05)', 'rgba(200,200,200,0.02)']
  8162. }
  8163. }
  8164. },
  8165. timeAxis: {
  8166. axisLine: {
  8167. show: true,
  8168. lineStyle: {
  8169. color: textColor
  8170. }
  8171. },
  8172. axisTick: {
  8173. show: false,
  8174. lineStyle: {
  8175. color: textColor
  8176. }
  8177. },
  8178. axisLabel: {
  8179. show: true,
  8180. textStyle: {
  8181. color: textColor
  8182. }
  8183. },
  8184. splitLine: {
  8185. show: true,
  8186. lineStyle: {
  8187. color: [textColor]
  8188. }
  8189. },
  8190. splitArea: {
  8191. show: false,
  8192. areaStyle: {
  8193. color: ['rgba(250,250,250,0.05)', 'rgba(200,200,200,0.02)']
  8194. }
  8195. }
  8196. },
  8197. toolbox: {
  8198. iconStyle: {
  8199. normal: {
  8200. borderColor: '#999999'
  8201. },
  8202. emphasis: {
  8203. borderColor: '#666666'
  8204. }
  8205. }
  8206. },
  8207. legend: {
  8208. textStyle: {
  8209. color: textColor
  8210. },
  8211. pageTextStyle: {
  8212. color: textColor
  8213. }
  8214. },
  8215. tooltip: {
  8216. axisPointer: {
  8217. lineStyle: {
  8218. color: '#cccccc',
  8219. width: 1
  8220. },
  8221. crossStyle: {
  8222. color: '#cccccc',
  8223. width: 1
  8224. }
  8225. }
  8226. },
  8227. timeline: {
  8228. lineStyle: {
  8229. color: '#626c91',
  8230. width: 1
  8231. },
  8232. itemStyle: {
  8233. normal: {
  8234. color: '#626c91',
  8235. borderWidth: 1
  8236. },
  8237. emphasis: {
  8238. color: '#626c91'
  8239. }
  8240. },
  8241. controlStyle: {
  8242. normal: {
  8243. color: '#626c91',
  8244. borderColor: '#626c91',
  8245. borderWidth: 0.5
  8246. },
  8247. emphasis: {
  8248. color: '#626c91',
  8249. borderColor: '#626c91',
  8250. borderWidth: 0.5
  8251. }
  8252. },
  8253. checkpointStyle: {
  8254. color: '#3fb1e3',
  8255. borderColor: 'rgba(63,177,227,0.15)'
  8256. },
  8257. label: {
  8258. normal: {
  8259. textStyle: {
  8260. color: '#626c91'
  8261. }
  8262. },
  8263. emphasis: {
  8264. textStyle: {
  8265. color: '#626c91'
  8266. }
  8267. }
  8268. }
  8269. },
  8270. visualMap: {
  8271. color: colorGroup
  8272. },
  8273. dataZoom: {
  8274. backgroundColor: 'rgba(255,255,255,0)',
  8275. dataBackgroundColor: 'rgba(222,222,222,1)',
  8276. fillerColor: 'rgba(114,230,212,0.25)',
  8277. handleColor: '#cccccc',
  8278. handleSize: '100%',
  8279. textStyle: {
  8280. color: textColor
  8281. }
  8282. },
  8283. markPoint: {
  8284. label: {
  8285. normal: {
  8286. textStyle: {
  8287. color: textColor
  8288. }
  8289. },
  8290. emphasis: {
  8291. textStyle: {
  8292. color: textColor
  8293. }
  8294. }
  8295. }
  8296. }
  8297. };
  8298. return chartTheme;
  8299. };
  8300. exports.chartThemeUtil = chartThemeUtil;
  8301. /***/ }),
  8302. /***/ "34c8":
  8303. /***/ (function(module, exports) {
  8304. function _iterableToArrayLimit(arr, i) {
  8305. if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
  8306. return;
  8307. }
  8308. var _arr = [];
  8309. var _n = true;
  8310. var _d = false;
  8311. var _e = undefined;
  8312. try {
  8313. for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
  8314. _arr.push(_s.value);
  8315. if (i && _arr.length === i) break;
  8316. }
  8317. } catch (err) {
  8318. _d = true;
  8319. _e = err;
  8320. } finally {
  8321. try {
  8322. if (!_n && _i["return"] != null) _i["return"]();
  8323. } finally {
  8324. if (_d) throw _e;
  8325. }
  8326. }
  8327. return _arr;
  8328. }
  8329. module.exports = _iterableToArrayLimit;
  8330. /***/ }),
  8331. /***/ "3605":
  8332. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8333. "use strict";
  8334. __webpack_require__.r(__webpack_exports__);
  8335. /* harmony import */ var _ChartMixin_vue_vue_type_template_id_1f1efe10___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("0b11");
  8336. /* harmony import */ var _ChartMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("d83d");
  8337. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _ChartMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _ChartMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  8338. /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b429");
  8339. /* normalize component */
  8340. var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
  8341. _ChartMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
  8342. _ChartMixin_vue_vue_type_template_id_1f1efe10___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
  8343. _ChartMixin_vue_vue_type_template_id_1f1efe10___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
  8344. false,
  8345. null,
  8346. null,
  8347. null
  8348. )
  8349. /* harmony default export */ __webpack_exports__["default"] = (component.exports);
  8350. /***/ }),
  8351. /***/ "383e":
  8352. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8353. "use strict";
  8354. __webpack_require__.r(__webpack_exports__);
  8355. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Icon_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("338a");
  8356. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Icon_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Icon_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
  8357. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Icon_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Icon_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  8358. /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Icon_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
  8359. /***/ }),
  8360. /***/ "3853":
  8361. /***/ (function(module) {
  8362. 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\"]}]");
  8363. /***/ }),
  8364. /***/ "38ce":
  8365. /***/ (function(module, exports, __webpack_require__) {
  8366. "use strict";
  8367. Object.defineProperty(exports, "__esModule", { value: true });
  8368. /**
  8369. * @module helpers
  8370. */
  8371. /**
  8372. * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.
  8373. *
  8374. * @memberof helpers
  8375. * @type {number}
  8376. */
  8377. exports.earthRadius = 6371008.8;
  8378. /**
  8379. * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.
  8380. *
  8381. * @memberof helpers
  8382. * @type {Object}
  8383. */
  8384. exports.factors = {
  8385. centimeters: exports.earthRadius * 100,
  8386. centimetres: exports.earthRadius * 100,
  8387. degrees: exports.earthRadius / 111325,
  8388. feet: exports.earthRadius * 3.28084,
  8389. inches: exports.earthRadius * 39.370,
  8390. kilometers: exports.earthRadius / 1000,
  8391. kilometres: exports.earthRadius / 1000,
  8392. meters: exports.earthRadius,
  8393. metres: exports.earthRadius,
  8394. miles: exports.earthRadius / 1609.344,
  8395. millimeters: exports.earthRadius * 1000,
  8396. millimetres: exports.earthRadius * 1000,
  8397. nauticalmiles: exports.earthRadius / 1852,
  8398. radians: 1,
  8399. yards: exports.earthRadius / 1.0936,
  8400. };
  8401. /**
  8402. * Units of measurement factors based on 1 meter.
  8403. *
  8404. * @memberof helpers
  8405. * @type {Object}
  8406. */
  8407. exports.unitsFactors = {
  8408. centimeters: 100,
  8409. centimetres: 100,
  8410. degrees: 1 / 111325,
  8411. feet: 3.28084,
  8412. inches: 39.370,
  8413. kilometers: 1 / 1000,
  8414. kilometres: 1 / 1000,
  8415. meters: 1,
  8416. metres: 1,
  8417. miles: 1 / 1609.344,
  8418. millimeters: 1000,
  8419. millimetres: 1000,
  8420. nauticalmiles: 1 / 1852,
  8421. radians: 1 / exports.earthRadius,
  8422. yards: 1 / 1.0936,
  8423. };
  8424. /**
  8425. * Area of measurement factors based on 1 square meter.
  8426. *
  8427. * @memberof helpers
  8428. * @type {Object}
  8429. */
  8430. exports.areaFactors = {
  8431. acres: 0.000247105,
  8432. centimeters: 10000,
  8433. centimetres: 10000,
  8434. feet: 10.763910417,
  8435. inches: 1550.003100006,
  8436. kilometers: 0.000001,
  8437. kilometres: 0.000001,
  8438. meters: 1,
  8439. metres: 1,
  8440. miles: 3.86e-7,
  8441. millimeters: 1000000,
  8442. millimetres: 1000000,
  8443. yards: 1.195990046,
  8444. };
  8445. /**
  8446. * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.
  8447. *
  8448. * @name feature
  8449. * @param {Geometry} geometry input geometry
  8450. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  8451. * @param {Object} [options={}] Optional Parameters
  8452. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  8453. * @param {string|number} [options.id] Identifier associated with the Feature
  8454. * @returns {Feature} a GeoJSON Feature
  8455. * @example
  8456. * var geometry = {
  8457. * "type": "Point",
  8458. * "coordinates": [110, 50]
  8459. * };
  8460. *
  8461. * var feature = turf.feature(geometry);
  8462. *
  8463. * //=feature
  8464. */
  8465. function feature(geom, properties, options) {
  8466. if (options === void 0) { options = {}; }
  8467. var feat = { type: "Feature" };
  8468. if (options.id === 0 || options.id) {
  8469. feat.id = options.id;
  8470. }
  8471. if (options.bbox) {
  8472. feat.bbox = options.bbox;
  8473. }
  8474. feat.properties = properties || {};
  8475. feat.geometry = geom;
  8476. return feat;
  8477. }
  8478. exports.feature = feature;
  8479. /**
  8480. * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.
  8481. * For GeometryCollection type use `helpers.geometryCollection`
  8482. *
  8483. * @name geometry
  8484. * @param {string} type Geometry Type
  8485. * @param {Array<any>} coordinates Coordinates
  8486. * @param {Object} [options={}] Optional Parameters
  8487. * @returns {Geometry} a GeoJSON Geometry
  8488. * @example
  8489. * var type = "Point";
  8490. * var coordinates = [110, 50];
  8491. * var geometry = turf.geometry(type, coordinates);
  8492. * // => geometry
  8493. */
  8494. function geometry(type, coordinates, options) {
  8495. if (options === void 0) { options = {}; }
  8496. switch (type) {
  8497. case "Point": return point(coordinates).geometry;
  8498. case "LineString": return lineString(coordinates).geometry;
  8499. case "Polygon": return polygon(coordinates).geometry;
  8500. case "MultiPoint": return multiPoint(coordinates).geometry;
  8501. case "MultiLineString": return multiLineString(coordinates).geometry;
  8502. case "MultiPolygon": return multiPolygon(coordinates).geometry;
  8503. default: throw new Error(type + " is invalid");
  8504. }
  8505. }
  8506. exports.geometry = geometry;
  8507. /**
  8508. * Creates a {@link Point} {@link Feature} from a Position.
  8509. *
  8510. * @name point
  8511. * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)
  8512. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  8513. * @param {Object} [options={}] Optional Parameters
  8514. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  8515. * @param {string|number} [options.id] Identifier associated with the Feature
  8516. * @returns {Feature<Point>} a Point feature
  8517. * @example
  8518. * var point = turf.point([-75.343, 39.984]);
  8519. *
  8520. * //=point
  8521. */
  8522. function point(coordinates, properties, options) {
  8523. if (options === void 0) { options = {}; }
  8524. var geom = {
  8525. type: "Point",
  8526. coordinates: coordinates,
  8527. };
  8528. return feature(geom, properties, options);
  8529. }
  8530. exports.point = point;
  8531. /**
  8532. * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.
  8533. *
  8534. * @name points
  8535. * @param {Array<Array<number>>} coordinates an array of Points
  8536. * @param {Object} [properties={}] Translate these properties to each Feature
  8537. * @param {Object} [options={}] Optional Parameters
  8538. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]
  8539. * associated with the FeatureCollection
  8540. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  8541. * @returns {FeatureCollection<Point>} Point Feature
  8542. * @example
  8543. * var points = turf.points([
  8544. * [-75, 39],
  8545. * [-80, 45],
  8546. * [-78, 50]
  8547. * ]);
  8548. *
  8549. * //=points
  8550. */
  8551. function points(coordinates, properties, options) {
  8552. if (options === void 0) { options = {}; }
  8553. return featureCollection(coordinates.map(function (coords) {
  8554. return point(coords, properties);
  8555. }), options);
  8556. }
  8557. exports.points = points;
  8558. /**
  8559. * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.
  8560. *
  8561. * @name polygon
  8562. * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings
  8563. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  8564. * @param {Object} [options={}] Optional Parameters
  8565. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  8566. * @param {string|number} [options.id] Identifier associated with the Feature
  8567. * @returns {Feature<Polygon>} Polygon Feature
  8568. * @example
  8569. * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });
  8570. *
  8571. * //=polygon
  8572. */
  8573. function polygon(coordinates, properties, options) {
  8574. if (options === void 0) { options = {}; }
  8575. for (var _i = 0, coordinates_1 = coordinates; _i < coordinates_1.length; _i++) {
  8576. var ring = coordinates_1[_i];
  8577. if (ring.length < 4) {
  8578. throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");
  8579. }
  8580. for (var j = 0; j < ring[ring.length - 1].length; j++) {
  8581. // Check if first point of Polygon contains two numbers
  8582. if (ring[ring.length - 1][j] !== ring[0][j]) {
  8583. throw new Error("First and last Position are not equivalent.");
  8584. }
  8585. }
  8586. }
  8587. var geom = {
  8588. type: "Polygon",
  8589. coordinates: coordinates,
  8590. };
  8591. return feature(geom, properties, options);
  8592. }
  8593. exports.polygon = polygon;
  8594. /**
  8595. * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.
  8596. *
  8597. * @name polygons
  8598. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates
  8599. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  8600. * @param {Object} [options={}] Optional Parameters
  8601. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  8602. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  8603. * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection
  8604. * @example
  8605. * var polygons = turf.polygons([
  8606. * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],
  8607. * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],
  8608. * ]);
  8609. *
  8610. * //=polygons
  8611. */
  8612. function polygons(coordinates, properties, options) {
  8613. if (options === void 0) { options = {}; }
  8614. return featureCollection(coordinates.map(function (coords) {
  8615. return polygon(coords, properties);
  8616. }), options);
  8617. }
  8618. exports.polygons = polygons;
  8619. /**
  8620. * Creates a {@link LineString} {@link Feature} from an Array of Positions.
  8621. *
  8622. * @name lineString
  8623. * @param {Array<Array<number>>} coordinates an array of Positions
  8624. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  8625. * @param {Object} [options={}] Optional Parameters
  8626. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  8627. * @param {string|number} [options.id] Identifier associated with the Feature
  8628. * @returns {Feature<LineString>} LineString Feature
  8629. * @example
  8630. * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});
  8631. * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});
  8632. *
  8633. * //=linestring1
  8634. * //=linestring2
  8635. */
  8636. function lineString(coordinates, properties, options) {
  8637. if (options === void 0) { options = {}; }
  8638. if (coordinates.length < 2) {
  8639. throw new Error("coordinates must be an array of two or more positions");
  8640. }
  8641. var geom = {
  8642. type: "LineString",
  8643. coordinates: coordinates,
  8644. };
  8645. return feature(geom, properties, options);
  8646. }
  8647. exports.lineString = lineString;
  8648. /**
  8649. * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.
  8650. *
  8651. * @name lineStrings
  8652. * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings
  8653. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  8654. * @param {Object} [options={}] Optional Parameters
  8655. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]
  8656. * associated with the FeatureCollection
  8657. * @param {string|number} [options.id] Identifier associated with the FeatureCollection
  8658. * @returns {FeatureCollection<LineString>} LineString FeatureCollection
  8659. * @example
  8660. * var linestrings = turf.lineStrings([
  8661. * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],
  8662. * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]
  8663. * ]);
  8664. *
  8665. * //=linestrings
  8666. */
  8667. function lineStrings(coordinates, properties, options) {
  8668. if (options === void 0) { options = {}; }
  8669. return featureCollection(coordinates.map(function (coords) {
  8670. return lineString(coords, properties);
  8671. }), options);
  8672. }
  8673. exports.lineStrings = lineStrings;
  8674. /**
  8675. * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.
  8676. *
  8677. * @name featureCollection
  8678. * @param {Feature[]} features input features
  8679. * @param {Object} [options={}] Optional Parameters
  8680. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  8681. * @param {string|number} [options.id] Identifier associated with the Feature
  8682. * @returns {FeatureCollection} FeatureCollection of Features
  8683. * @example
  8684. * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});
  8685. * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});
  8686. * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});
  8687. *
  8688. * var collection = turf.featureCollection([
  8689. * locationA,
  8690. * locationB,
  8691. * locationC
  8692. * ]);
  8693. *
  8694. * //=collection
  8695. */
  8696. function featureCollection(features, options) {
  8697. if (options === void 0) { options = {}; }
  8698. var fc = { type: "FeatureCollection" };
  8699. if (options.id) {
  8700. fc.id = options.id;
  8701. }
  8702. if (options.bbox) {
  8703. fc.bbox = options.bbox;
  8704. }
  8705. fc.features = features;
  8706. return fc;
  8707. }
  8708. exports.featureCollection = featureCollection;
  8709. /**
  8710. * Creates a {@link Feature<MultiLineString>} based on a
  8711. * coordinate array. Properties can be added optionally.
  8712. *
  8713. * @name multiLineString
  8714. * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings
  8715. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  8716. * @param {Object} [options={}] Optional Parameters
  8717. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  8718. * @param {string|number} [options.id] Identifier associated with the Feature
  8719. * @returns {Feature<MultiLineString>} a MultiLineString feature
  8720. * @throws {Error} if no coordinates are passed
  8721. * @example
  8722. * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);
  8723. *
  8724. * //=multiLine
  8725. */
  8726. function multiLineString(coordinates, properties, options) {
  8727. if (options === void 0) { options = {}; }
  8728. var geom = {
  8729. type: "MultiLineString",
  8730. coordinates: coordinates,
  8731. };
  8732. return feature(geom, properties, options);
  8733. }
  8734. exports.multiLineString = multiLineString;
  8735. /**
  8736. * Creates a {@link Feature<MultiPoint>} based on a
  8737. * coordinate array. Properties can be added optionally.
  8738. *
  8739. * @name multiPoint
  8740. * @param {Array<Array<number>>} coordinates an array of Positions
  8741. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  8742. * @param {Object} [options={}] Optional Parameters
  8743. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  8744. * @param {string|number} [options.id] Identifier associated with the Feature
  8745. * @returns {Feature<MultiPoint>} a MultiPoint feature
  8746. * @throws {Error} if no coordinates are passed
  8747. * @example
  8748. * var multiPt = turf.multiPoint([[0,0],[10,10]]);
  8749. *
  8750. * //=multiPt
  8751. */
  8752. function multiPoint(coordinates, properties, options) {
  8753. if (options === void 0) { options = {}; }
  8754. var geom = {
  8755. type: "MultiPoint",
  8756. coordinates: coordinates,
  8757. };
  8758. return feature(geom, properties, options);
  8759. }
  8760. exports.multiPoint = multiPoint;
  8761. /**
  8762. * Creates a {@link Feature<MultiPolygon>} based on a
  8763. * coordinate array. Properties can be added optionally.
  8764. *
  8765. * @name multiPolygon
  8766. * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons
  8767. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  8768. * @param {Object} [options={}] Optional Parameters
  8769. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  8770. * @param {string|number} [options.id] Identifier associated with the Feature
  8771. * @returns {Feature<MultiPolygon>} a multipolygon feature
  8772. * @throws {Error} if no coordinates are passed
  8773. * @example
  8774. * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);
  8775. *
  8776. * //=multiPoly
  8777. *
  8778. */
  8779. function multiPolygon(coordinates, properties, options) {
  8780. if (options === void 0) { options = {}; }
  8781. var geom = {
  8782. type: "MultiPolygon",
  8783. coordinates: coordinates,
  8784. };
  8785. return feature(geom, properties, options);
  8786. }
  8787. exports.multiPolygon = multiPolygon;
  8788. /**
  8789. * Creates a {@link Feature<GeometryCollection>} based on a
  8790. * coordinate array. Properties can be added optionally.
  8791. *
  8792. * @name geometryCollection
  8793. * @param {Array<Geometry>} geometries an array of GeoJSON Geometries
  8794. * @param {Object} [properties={}] an Object of key-value pairs to add as properties
  8795. * @param {Object} [options={}] Optional Parameters
  8796. * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
  8797. * @param {string|number} [options.id] Identifier associated with the Feature
  8798. * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature
  8799. * @example
  8800. * var pt = turf.geometry("Point", [100, 0]);
  8801. * var line = turf.geometry("LineString", [[101, 0], [102, 1]]);
  8802. * var collection = turf.geometryCollection([pt, line]);
  8803. *
  8804. * // => collection
  8805. */
  8806. function geometryCollection(geometries, properties, options) {
  8807. if (options === void 0) { options = {}; }
  8808. var geom = {
  8809. type: "GeometryCollection",
  8810. geometries: geometries,
  8811. };
  8812. return feature(geom, properties, options);
  8813. }
  8814. exports.geometryCollection = geometryCollection;
  8815. /**
  8816. * Round number to precision
  8817. *
  8818. * @param {number} num Number
  8819. * @param {number} [precision=0] Precision
  8820. * @returns {number} rounded number
  8821. * @example
  8822. * turf.round(120.4321)
  8823. * //=120
  8824. *
  8825. * turf.round(120.4321, 2)
  8826. * //=120.43
  8827. */
  8828. function round(num, precision) {
  8829. if (precision === void 0) { precision = 0; }
  8830. if (precision && !(precision >= 0)) {
  8831. throw new Error("precision must be a positive number");
  8832. }
  8833. var multiplier = Math.pow(10, precision || 0);
  8834. return Math.round(num * multiplier) / multiplier;
  8835. }
  8836. exports.round = round;
  8837. /**
  8838. * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.
  8839. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  8840. *
  8841. * @name radiansToLength
  8842. * @param {number} radians in radians across the sphere
  8843. * @param {string} [units="kilometers"] can be degrees, radians, miles, or kilometers inches, yards, metres,
  8844. * meters, kilometres, kilometers.
  8845. * @returns {number} distance
  8846. */
  8847. function radiansToLength(radians, units) {
  8848. if (units === void 0) { units = "kilometers"; }
  8849. var factor = exports.factors[units];
  8850. if (!factor) {
  8851. throw new Error(units + " units is invalid");
  8852. }
  8853. return radians * factor;
  8854. }
  8855. exports.radiansToLength = radiansToLength;
  8856. /**
  8857. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians
  8858. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  8859. *
  8860. * @name lengthToRadians
  8861. * @param {number} distance in real units
  8862. * @param {string} [units="kilometers"] can be degrees, radians, miles, or kilometers inches, yards, metres,
  8863. * meters, kilometres, kilometers.
  8864. * @returns {number} radians
  8865. */
  8866. function lengthToRadians(distance, units) {
  8867. if (units === void 0) { units = "kilometers"; }
  8868. var factor = exports.factors[units];
  8869. if (!factor) {
  8870. throw new Error(units + " units is invalid");
  8871. }
  8872. return distance / factor;
  8873. }
  8874. exports.lengthToRadians = lengthToRadians;
  8875. /**
  8876. * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees
  8877. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet
  8878. *
  8879. * @name lengthToDegrees
  8880. * @param {number} distance in real units
  8881. * @param {string} [units="kilometers"] can be degrees, radians, miles, or kilometers inches, yards, metres,
  8882. * meters, kilometres, kilometers.
  8883. * @returns {number} degrees
  8884. */
  8885. function lengthToDegrees(distance, units) {
  8886. return radiansToDegrees(lengthToRadians(distance, units));
  8887. }
  8888. exports.lengthToDegrees = lengthToDegrees;
  8889. /**
  8890. * Converts any bearing angle from the north line direction (positive clockwise)
  8891. * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line
  8892. *
  8893. * @name bearingToAzimuth
  8894. * @param {number} bearing angle, between -180 and +180 degrees
  8895. * @returns {number} angle between 0 and 360 degrees
  8896. */
  8897. function bearingToAzimuth(bearing) {
  8898. var angle = bearing % 360;
  8899. if (angle < 0) {
  8900. angle += 360;
  8901. }
  8902. return angle;
  8903. }
  8904. exports.bearingToAzimuth = bearingToAzimuth;
  8905. /**
  8906. * Converts an angle in radians to degrees
  8907. *
  8908. * @name radiansToDegrees
  8909. * @param {number} radians angle in radians
  8910. * @returns {number} degrees between 0 and 360 degrees
  8911. */
  8912. function radiansToDegrees(radians) {
  8913. var degrees = radians % (2 * Math.PI);
  8914. return degrees * 180 / Math.PI;
  8915. }
  8916. exports.radiansToDegrees = radiansToDegrees;
  8917. /**
  8918. * Converts an angle in degrees to radians
  8919. *
  8920. * @name degreesToRadians
  8921. * @param {number} degrees angle between 0 and 360 degrees
  8922. * @returns {number} angle in radians
  8923. */
  8924. function degreesToRadians(degrees) {
  8925. var radians = degrees % 360;
  8926. return radians * Math.PI / 180;
  8927. }
  8928. exports.degreesToRadians = degreesToRadians;
  8929. /**
  8930. * Converts a length to the requested unit.
  8931. * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
  8932. *
  8933. * @param {number} length to be converted
  8934. * @param {Units} [originalUnit="kilometers"] of the length
  8935. * @param {Units} [finalUnit="kilometers"] returned unit
  8936. * @returns {number} the converted length
  8937. */
  8938. function convertLength(length, originalUnit, finalUnit) {
  8939. if (originalUnit === void 0) { originalUnit = "kilometers"; }
  8940. if (finalUnit === void 0) { finalUnit = "kilometers"; }
  8941. if (!(length >= 0)) {
  8942. throw new Error("length must be a positive number");
  8943. }
  8944. return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);
  8945. }
  8946. exports.convertLength = convertLength;
  8947. /**
  8948. * Converts a area to the requested unit.
  8949. * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches
  8950. * @param {number} area to be converted
  8951. * @param {Units} [originalUnit="meters"] of the distance
  8952. * @param {Units} [finalUnit="kilometers"] returned unit
  8953. * @returns {number} the converted distance
  8954. */
  8955. function convertArea(area, originalUnit, finalUnit) {
  8956. if (originalUnit === void 0) { originalUnit = "meters"; }
  8957. if (finalUnit === void 0) { finalUnit = "kilometers"; }
  8958. if (!(area >= 0)) {
  8959. throw new Error("area must be a positive number");
  8960. }
  8961. var startFactor = exports.areaFactors[originalUnit];
  8962. if (!startFactor) {
  8963. throw new Error("invalid original units");
  8964. }
  8965. var finalFactor = exports.areaFactors[finalUnit];
  8966. if (!finalFactor) {
  8967. throw new Error("invalid final units");
  8968. }
  8969. return (area / startFactor) * finalFactor;
  8970. }
  8971. exports.convertArea = convertArea;
  8972. /**
  8973. * isNumber
  8974. *
  8975. * @param {*} num Number to validate
  8976. * @returns {boolean} true/false
  8977. * @example
  8978. * turf.isNumber(123)
  8979. * //=true
  8980. * turf.isNumber('foo')
  8981. * //=false
  8982. */
  8983. function isNumber(num) {
  8984. return !isNaN(num) && num !== null && !Array.isArray(num) && !/^\s*$/.test(num);
  8985. }
  8986. exports.isNumber = isNumber;
  8987. /**
  8988. * isObject
  8989. *
  8990. * @param {*} input variable to validate
  8991. * @returns {boolean} true/false
  8992. * @example
  8993. * turf.isObject({elevation: 10})
  8994. * //=true
  8995. * turf.isObject('foo')
  8996. * //=false
  8997. */
  8998. function isObject(input) {
  8999. return (!!input) && (input.constructor === Object);
  9000. }
  9001. exports.isObject = isObject;
  9002. /**
  9003. * Validate BBox
  9004. *
  9005. * @private
  9006. * @param {Array<number>} bbox BBox to validate
  9007. * @returns {void}
  9008. * @throws Error if BBox is not valid
  9009. * @example
  9010. * validateBBox([-180, -40, 110, 50])
  9011. * //=OK
  9012. * validateBBox([-180, -40])
  9013. * //=Error
  9014. * validateBBox('Foo')
  9015. * //=Error
  9016. * validateBBox(5)
  9017. * //=Error
  9018. * validateBBox(null)
  9019. * //=Error
  9020. * validateBBox(undefined)
  9021. * //=Error
  9022. */
  9023. function validateBBox(bbox) {
  9024. if (!bbox) {
  9025. throw new Error("bbox is required");
  9026. }
  9027. if (!Array.isArray(bbox)) {
  9028. throw new Error("bbox must be an Array");
  9029. }
  9030. if (bbox.length !== 4 && bbox.length !== 6) {
  9031. throw new Error("bbox must be an Array of 4 or 6 numbers");
  9032. }
  9033. bbox.forEach(function (num) {
  9034. if (!isNumber(num)) {
  9035. throw new Error("bbox must only contain numbers");
  9036. }
  9037. });
  9038. }
  9039. exports.validateBBox = validateBBox;
  9040. /**
  9041. * Validate Id
  9042. *
  9043. * @private
  9044. * @param {string|number} id Id to validate
  9045. * @returns {void}
  9046. * @throws Error if Id is not valid
  9047. * @example
  9048. * validateId([-180, -40, 110, 50])
  9049. * //=Error
  9050. * validateId([-180, -40])
  9051. * //=Error
  9052. * validateId('Foo')
  9053. * //=OK
  9054. * validateId(5)
  9055. * //=OK
  9056. * validateId(null)
  9057. * //=Error
  9058. * validateId(undefined)
  9059. * //=Error
  9060. */
  9061. function validateId(id) {
  9062. if (!id) {
  9063. throw new Error("id is required");
  9064. }
  9065. if (["string", "number"].indexOf(typeof id) === -1) {
  9066. throw new Error("id must be a number or a string");
  9067. }
  9068. }
  9069. exports.validateId = validateId;
  9070. // Deprecated methods
  9071. function radians2degrees() {
  9072. throw new Error("method has been renamed to `radiansToDegrees`");
  9073. }
  9074. exports.radians2degrees = radians2degrees;
  9075. function degrees2radians() {
  9076. throw new Error("method has been renamed to `degreesToRadians`");
  9077. }
  9078. exports.degrees2radians = degrees2radians;
  9079. function distanceToDegrees() {
  9080. throw new Error("method has been renamed to `lengthToDegrees`");
  9081. }
  9082. exports.distanceToDegrees = distanceToDegrees;
  9083. function distanceToRadians() {
  9084. throw new Error("method has been renamed to `lengthToRadians`");
  9085. }
  9086. exports.distanceToRadians = distanceToRadians;
  9087. function radiansToDistance() {
  9088. throw new Error("method has been renamed to `radiansToLength`");
  9089. }
  9090. exports.radiansToDistance = radiansToDistance;
  9091. function bearingToAngle() {
  9092. throw new Error("method has been renamed to `bearingToAzimuth`");
  9093. }
  9094. exports.bearingToAngle = bearingToAngle;
  9095. function convertDistance() {
  9096. throw new Error("method has been renamed to `convertLength`");
  9097. }
  9098. exports.convertDistance = convertDistance;
  9099. /***/ }),
  9100. /***/ "38cf":
  9101. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  9102. "use strict";
  9103. __webpack_require__.r(__webpack_exports__);
  9104. /* harmony import */ var _Border_vue_vue_type_template_id_531a677a___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("c492");
  9105. /* harmony import */ var _Border_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("cadc");
  9106. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _Border_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _Border_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  9107. /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b429");
  9108. /* normalize component */
  9109. var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
  9110. _Border_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
  9111. _Border_vue_vue_type_template_id_531a677a___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
  9112. _Border_vue_vue_type_template_id_531a677a___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
  9113. false,
  9114. null,
  9115. null,
  9116. null
  9117. )
  9118. /* harmony default export */ __webpack_exports__["default"] = (component.exports);
  9119. /***/ }),
  9120. /***/ "3a31":
  9121. /***/ (function(module, exports, __webpack_require__) {
  9122. "use strict";
  9123. var _interopRequireDefault = __webpack_require__("8e6d");
  9124. Object.defineProperty(exports, "__esModule", {
  9125. value: true
  9126. });
  9127. exports.default = void 0;
  9128. var _echarts = _interopRequireDefault(__webpack_require__("f840"));
  9129. var _theme = _interopRequireDefault(__webpack_require__("9259"));
  9130. __webpack_require__("acbb");
  9131. var _cssElementQueries = __webpack_require__("18e4");
  9132. var _timer = _interopRequireDefault(__webpack_require__("8156"));
  9133. var _thirdService = _interopRequireDefault(__webpack_require__("c51e"));
  9134. //
  9135. //
  9136. //
  9137. var _default = {
  9138. name: 'SmLiquidFill',
  9139. mixins: [_theme.default, _timer.default, _thirdService.default],
  9140. props: {
  9141. // 百分比的值
  9142. value: {
  9143. type: [Number, String],
  9144. default: 0
  9145. },
  9146. // 波浪数
  9147. waveCount: {
  9148. type: Number,
  9149. default: 1
  9150. },
  9151. // 字体
  9152. fontSize: {
  9153. type: [Number, String]
  9154. },
  9155. // 波浪颜色
  9156. waveColor: {
  9157. type: String
  9158. },
  9159. // 边框颜色
  9160. borderColor: {
  9161. type: String
  9162. },
  9163. // 数字在波浪外的颜色
  9164. labelColor: {
  9165. type: String,
  9166. default: '#626c91'
  9167. },
  9168. // 背景色
  9169. backgroundColor: {
  9170. type: String
  9171. },
  9172. // 数字在波浪内的颜色
  9173. insideLabelColor: {
  9174. type: String,
  9175. default: '#fff'
  9176. },
  9177. // 是否开启波浪动画
  9178. waveAnimation: {
  9179. type: Boolean,
  9180. default: false
  9181. }
  9182. },
  9183. data: function data() {
  9184. return {
  9185. waveColorData: '',
  9186. labelColorData: '',
  9187. insideLabelColorData: '',
  9188. borderColorData: '',
  9189. backgroundColorData: '',
  9190. finalValue: this.value
  9191. };
  9192. },
  9193. computed: {
  9194. // 根据波浪数渲染数据
  9195. calcData: function calcData() {
  9196. var data = [];
  9197. var formatValue = isNaN(this.finalValue) ? 0 : parseFloat(this.finalValue);
  9198. for (var i = 0; i < this.waveCount; i++) {
  9199. data.push(formatValue - i * 0.05);
  9200. }
  9201. return data;
  9202. }
  9203. },
  9204. watch: {
  9205. waveColor: function waveColor(val) {
  9206. this.waveColorData = val;
  9207. this.updateChart();
  9208. },
  9209. labelColor: function labelColor(val) {
  9210. this.labelColorData = val;
  9211. this.updateChart();
  9212. },
  9213. insideLabelColor: function insideLabelColor(val) {
  9214. this.insideLabelColorData = val;
  9215. this.updateChart();
  9216. },
  9217. borderColor: function borderColor(val) {
  9218. this.borderColorData = val;
  9219. this.updateChart();
  9220. },
  9221. backgroundColor: function backgroundColor(val) {
  9222. this.backgroundColorData = val;
  9223. this.updateChart();
  9224. },
  9225. finalValue: function finalValue() {
  9226. this.updateChart();
  9227. },
  9228. fontSize: function fontSize() {
  9229. this.updateChart();
  9230. },
  9231. waveCount: function waveCount() {
  9232. this.updateChart();
  9233. },
  9234. waveAnimation: function waveAnimation() {
  9235. this.updateChart();
  9236. },
  9237. value: function value(val) {
  9238. this.finalValue = val;
  9239. }
  9240. },
  9241. mounted: function mounted() {
  9242. var _this = this;
  9243. this.waveColorData = this.waveColor || this.getColor(0);
  9244. this.labelColorData = this.labelColor || this.getTextColor;
  9245. this.insideLabelColorData = this.insideLabelColor || this.getTextColor;
  9246. this.borderColorData = this.borderColor || this.waveColorData;
  9247. this.backgroundColorData = this.backgroundColor || this.getBackground;
  9248. setTimeout(function () {
  9249. _this.initializeChart();
  9250. _this.resize();
  9251. }, 0);
  9252. },
  9253. beforeDestroy: function beforeDestroy() {
  9254. this.restService && this.restService.remove('getdatasucceeded');
  9255. },
  9256. methods: {
  9257. resize: function resize() {
  9258. this.chart && this.chart.resize();
  9259. },
  9260. initializeChart: function initializeChart() {
  9261. var _this2 = this;
  9262. this.chart = _echarts.default.init(this.$refs.chart);
  9263. this.updateChart();
  9264. this.$on('theme-style-changed', function () {
  9265. _this2.waveColorData = _this2.getColor(0);
  9266. _this2.labelColorData = _this2.getTextColor;
  9267. _this2.insideLabelColorData = _this2.getTextColor;
  9268. _this2.borderColorData = _this2.getColor(0);
  9269. _this2.backgroundColorData = _this2.getBackground;
  9270. _this2.updateChart(true);
  9271. });
  9272. this.resizeObsever = new _cssElementQueries.ResizeSensor(this.$el, function () {
  9273. _this2.resize();
  9274. });
  9275. },
  9276. updateChart: function updateChart() {
  9277. var propsUpdate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  9278. this.chart && this.chart.setOption({
  9279. series: [{
  9280. color: [this.waveColorData],
  9281. type: 'liquidFill',
  9282. waveAnimation: this.waveAnimation,
  9283. animation: false,
  9284. radius: '95%',
  9285. data: this.calcData,
  9286. label: {
  9287. fontSize: parseFloat(this.fontSize),
  9288. color: this.labelColorData,
  9289. insideColor: this.insideLabelColorData
  9290. },
  9291. backgroundStyle: {
  9292. color: this.backgroundColorData
  9293. },
  9294. itemStyle: {
  9295. shadowColor: '#fff'
  9296. },
  9297. outline: {
  9298. borderDistance: 3,
  9299. itemStyle: {
  9300. borderColor: this.borderColorData,
  9301. borderWidth: 3,
  9302. shadowBlur: 0,
  9303. shadowColor: '#fff'
  9304. }
  9305. }
  9306. }]
  9307. });
  9308. },
  9309. timing: function timing() {
  9310. this.getData();
  9311. }
  9312. }
  9313. };
  9314. exports.default = _default;
  9315. /***/ }),
  9316. /***/ "3a49":
  9317. /***/ (function(module, exports, __webpack_require__) {
  9318. "use strict";
  9319. var _interopRequireDefault = __webpack_require__("8e6d");
  9320. Object.defineProperty(exports, "__esModule", {
  9321. value: true
  9322. });
  9323. exports.default = void 0;
  9324. var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
  9325. var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
  9326. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
  9327. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
  9328. var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
  9329. var _typeof2 = _interopRequireDefault(__webpack_require__("7ae5"));
  9330. var _vue = _interopRequireDefault(__webpack_require__("5643"));
  9331. var _vuePropertyDecorator = __webpack_require__("e22c");
  9332. var _lodash = _interopRequireDefault(__webpack_require__("5f9f"));
  9333. var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
  9334. var c = arguments.length,
  9335. r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
  9336. d;
  9337. if ((typeof Reflect === "undefined" ? "undefined" : (0, _typeof2.default)(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
  9338. if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  9339. }
  9340. return c > 3 && r && Object.defineProperty(target, key, r), r;
  9341. };
  9342. var VmUpdater =
  9343. /*#__PURE__*/
  9344. function (_Vue) {
  9345. (0, _inherits2.default)(VmUpdater, _Vue);
  9346. function VmUpdater() {
  9347. (0, _classCallCheck2.default)(this, VmUpdater);
  9348. return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(VmUpdater).apply(this, arguments));
  9349. }
  9350. (0, _createClass2.default)(VmUpdater, [{
  9351. key: "mounted",
  9352. value: function mounted() {
  9353. if (this.$options.viewModelProps) {
  9354. this.watchViewModelOptions(this.$options.viewModelProps);
  9355. }
  9356. }
  9357. }, {
  9358. key: "setViewModel",
  9359. value: function setViewModel(viewModel) {
  9360. this.viewModel = viewModel;
  9361. }
  9362. }, {
  9363. key: "watchViewModelOptions",
  9364. value: function watchViewModelOptions(viewModelProps) {
  9365. var _this = this;
  9366. viewModelProps.map(function (item) {
  9367. _this.$watch(item, function (newVal, oldVal) {
  9368. if (!(0, _lodash.default)(newVal, oldVal)) {
  9369. if (item.includes('.')) {
  9370. var itemArr = item.split('.');
  9371. item = itemArr[itemArr.length - 1];
  9372. }
  9373. var setFun = 'set' + item.replace(item[0], item[0].toUpperCase());
  9374. this.viewModel && this.viewModel[setFun](newVal);
  9375. }
  9376. }, {
  9377. deep: true
  9378. });
  9379. });
  9380. }
  9381. }]);
  9382. return VmUpdater;
  9383. }(_vue.default);
  9384. VmUpdater = __decorate([_vuePropertyDecorator.Component], VmUpdater);
  9385. var _default = VmUpdater;
  9386. exports.default = _default;
  9387. /***/ }),
  9388. /***/ "3a8c":
  9389. /***/ (function(module, exports, __webpack_require__) {
  9390. "use strict";
  9391. var _interopRequireDefault = __webpack_require__("8e6d");
  9392. Object.defineProperty(exports, "__esModule", {
  9393. value: true
  9394. });
  9395. exports.default = void 0;
  9396. var _vue = _interopRequireDefault(__webpack_require__("5643"));
  9397. var _globalEvent = _interopRequireDefault(__webpack_require__("fb6a"));
  9398. var _default = new _vue.default({
  9399. mapCache: {},
  9400. webMapCache: {},
  9401. getMap: function getMap(mapTarget) {
  9402. return this.mapCache[mapTarget];
  9403. },
  9404. getAllMaps: function getAllMaps() {
  9405. return this.mapCache;
  9406. },
  9407. setMap: function setMap(mapTarget, map) {
  9408. this.mapCache[mapTarget] = map;
  9409. },
  9410. deleteMap: function deleteMap(mapTarget) {
  9411. _globalEvent.default.$emit('delete-map', mapTarget);
  9412. delete this.mapCache[mapTarget];
  9413. },
  9414. getWebMap: function getWebMap(webmapTarget) {
  9415. return this.webMapCache[webmapTarget];
  9416. },
  9417. getAllWebMap: function getAllWebMap() {
  9418. return this.webMapCache;
  9419. },
  9420. setWebMap: function setWebMap(webmapTarget, webmap) {
  9421. this.webMapCache[webmapTarget] = webmap;
  9422. },
  9423. deleteWebMap: function deleteWebMap(webmapTarget) {
  9424. delete this.webMapCache[webmapTarget];
  9425. }
  9426. });
  9427. exports.default = _default;
  9428. /***/ }),
  9429. /***/ "3be6":
  9430. /***/ (function(module, exports, __webpack_require__) {
  9431. "use strict";
  9432. /* WEBPACK VAR INJECTION */(function(global) {/*!
  9433. * The buffer module from node.js, for the browser.
  9434. *
  9435. * @author Feross Aboukhadijeh <http://feross.org>
  9436. * @license MIT
  9437. */
  9438. /* eslint-disable no-proto */
  9439. var base64 = __webpack_require__("9711")
  9440. var ieee754 = __webpack_require__("4a62")
  9441. var isArray = __webpack_require__("5b56")
  9442. exports.Buffer = Buffer
  9443. exports.SlowBuffer = SlowBuffer
  9444. exports.INSPECT_MAX_BYTES = 50
  9445. /**
  9446. * If `Buffer.TYPED_ARRAY_SUPPORT`:
  9447. * === true Use Uint8Array implementation (fastest)
  9448. * === false Use Object implementation (most compatible, even IE6)
  9449. *
  9450. * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
  9451. * Opera 11.6+, iOS 4.2+.
  9452. *
  9453. * Due to various browser bugs, sometimes the Object implementation will be used even
  9454. * when the browser supports typed arrays.
  9455. *
  9456. * Note:
  9457. *
  9458. * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
  9459. * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
  9460. *
  9461. * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
  9462. *
  9463. * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
  9464. * incorrect length in some situations.
  9465. * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
  9466. * get the Object implementation, which is slower but behaves correctly.
  9467. */
  9468. Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
  9469. ? global.TYPED_ARRAY_SUPPORT
  9470. : typedArraySupport()
  9471. /*
  9472. * Export kMaxLength after typed array support is determined.
  9473. */
  9474. exports.kMaxLength = kMaxLength()
  9475. function typedArraySupport () {
  9476. try {
  9477. var arr = new Uint8Array(1)
  9478. arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
  9479. return arr.foo() === 42 && // typed array instances can be augmented
  9480. typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
  9481. arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
  9482. } catch (e) {
  9483. return false
  9484. }
  9485. }
  9486. function kMaxLength () {
  9487. return Buffer.TYPED_ARRAY_SUPPORT
  9488. ? 0x7fffffff
  9489. : 0x3fffffff
  9490. }
  9491. function createBuffer (that, length) {
  9492. if (kMaxLength() < length) {
  9493. throw new RangeError('Invalid typed array length')
  9494. }
  9495. if (Buffer.TYPED_ARRAY_SUPPORT) {
  9496. // Return an augmented `Uint8Array` instance, for best performance
  9497. that = new Uint8Array(length)
  9498. that.__proto__ = Buffer.prototype
  9499. } else {
  9500. // Fallback: Return an object instance of the Buffer class
  9501. if (that === null) {
  9502. that = new Buffer(length)
  9503. }
  9504. that.length = length
  9505. }
  9506. return that
  9507. }
  9508. /**
  9509. * The Buffer constructor returns instances of `Uint8Array` that have their
  9510. * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
  9511. * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
  9512. * and the `Uint8Array` methods. Square bracket notation works as expected -- it
  9513. * returns a single octet.
  9514. *
  9515. * The `Uint8Array` prototype remains unmodified.
  9516. */
  9517. function Buffer (arg, encodingOrOffset, length) {
  9518. if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
  9519. return new Buffer(arg, encodingOrOffset, length)
  9520. }
  9521. // Common case.
  9522. if (typeof arg === 'number') {
  9523. if (typeof encodingOrOffset === 'string') {
  9524. throw new Error(
  9525. 'If encoding is specified then the first argument must be a string'
  9526. )
  9527. }
  9528. return allocUnsafe(this, arg)
  9529. }
  9530. return from(this, arg, encodingOrOffset, length)
  9531. }
  9532. Buffer.poolSize = 8192 // not used by this implementation
  9533. // TODO: Legacy, not needed anymore. Remove in next major version.
  9534. Buffer._augment = function (arr) {
  9535. arr.__proto__ = Buffer.prototype
  9536. return arr
  9537. }
  9538. function from (that, value, encodingOrOffset, length) {
  9539. if (typeof value === 'number') {
  9540. throw new TypeError('"value" argument must not be a number')
  9541. }
  9542. if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
  9543. return fromArrayBuffer(that, value, encodingOrOffset, length)
  9544. }
  9545. if (typeof value === 'string') {
  9546. return fromString(that, value, encodingOrOffset)
  9547. }
  9548. return fromObject(that, value)
  9549. }
  9550. /**
  9551. * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
  9552. * if value is a number.
  9553. * Buffer.from(str[, encoding])
  9554. * Buffer.from(array)
  9555. * Buffer.from(buffer)
  9556. * Buffer.from(arrayBuffer[, byteOffset[, length]])
  9557. **/
  9558. Buffer.from = function (value, encodingOrOffset, length) {
  9559. return from(null, value, encodingOrOffset, length)
  9560. }
  9561. if (Buffer.TYPED_ARRAY_SUPPORT) {
  9562. Buffer.prototype.__proto__ = Uint8Array.prototype
  9563. Buffer.__proto__ = Uint8Array
  9564. if (typeof Symbol !== 'undefined' && Symbol.species &&
  9565. Buffer[Symbol.species] === Buffer) {
  9566. // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
  9567. Object.defineProperty(Buffer, Symbol.species, {
  9568. value: null,
  9569. configurable: true
  9570. })
  9571. }
  9572. }
  9573. function assertSize (size) {
  9574. if (typeof size !== 'number') {
  9575. throw new TypeError('"size" argument must be a number')
  9576. } else if (size < 0) {
  9577. throw new RangeError('"size" argument must not be negative')
  9578. }
  9579. }
  9580. function alloc (that, size, fill, encoding) {
  9581. assertSize(size)
  9582. if (size <= 0) {
  9583. return createBuffer(that, size)
  9584. }
  9585. if (fill !== undefined) {
  9586. // Only pay attention to encoding if it's a string. This
  9587. // prevents accidentally sending in a number that would
  9588. // be interpretted as a start offset.
  9589. return typeof encoding === 'string'
  9590. ? createBuffer(that, size).fill(fill, encoding)
  9591. : createBuffer(that, size).fill(fill)
  9592. }
  9593. return createBuffer(that, size)
  9594. }
  9595. /**
  9596. * Creates a new filled Buffer instance.
  9597. * alloc(size[, fill[, encoding]])
  9598. **/
  9599. Buffer.alloc = function (size, fill, encoding) {
  9600. return alloc(null, size, fill, encoding)
  9601. }
  9602. function allocUnsafe (that, size) {
  9603. assertSize(size)
  9604. that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
  9605. if (!Buffer.TYPED_ARRAY_SUPPORT) {
  9606. for (var i = 0; i < size; ++i) {
  9607. that[i] = 0
  9608. }
  9609. }
  9610. return that
  9611. }
  9612. /**
  9613. * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
  9614. * */
  9615. Buffer.allocUnsafe = function (size) {
  9616. return allocUnsafe(null, size)
  9617. }
  9618. /**
  9619. * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
  9620. */
  9621. Buffer.allocUnsafeSlow = function (size) {
  9622. return allocUnsafe(null, size)
  9623. }
  9624. function fromString (that, string, encoding) {
  9625. if (typeof encoding !== 'string' || encoding === '') {
  9626. encoding = 'utf8'
  9627. }
  9628. if (!Buffer.isEncoding(encoding)) {
  9629. throw new TypeError('"encoding" must be a valid string encoding')
  9630. }
  9631. var length = byteLength(string, encoding) | 0
  9632. that = createBuffer(that, length)
  9633. var actual = that.write(string, encoding)
  9634. if (actual !== length) {
  9635. // Writing a hex string, for example, that contains invalid characters will
  9636. // cause everything after the first invalid character to be ignored. (e.g.
  9637. // 'abxxcd' will be treated as 'ab')
  9638. that = that.slice(0, actual)
  9639. }
  9640. return that
  9641. }
  9642. function fromArrayLike (that, array) {
  9643. var length = array.length < 0 ? 0 : checked(array.length) | 0
  9644. that = createBuffer(that, length)
  9645. for (var i = 0; i < length; i += 1) {
  9646. that[i] = array[i] & 255
  9647. }
  9648. return that
  9649. }
  9650. function fromArrayBuffer (that, array, byteOffset, length) {
  9651. array.byteLength // this throws if `array` is not a valid ArrayBuffer
  9652. if (byteOffset < 0 || array.byteLength < byteOffset) {
  9653. throw new RangeError('\'offset\' is out of bounds')
  9654. }
  9655. if (array.byteLength < byteOffset + (length || 0)) {
  9656. throw new RangeError('\'length\' is out of bounds')
  9657. }
  9658. if (byteOffset === undefined && length === undefined) {
  9659. array = new Uint8Array(array)
  9660. } else if (length === undefined) {
  9661. array = new Uint8Array(array, byteOffset)
  9662. } else {
  9663. array = new Uint8Array(array, byteOffset, length)
  9664. }
  9665. if (Buffer.TYPED_ARRAY_SUPPORT) {
  9666. // Return an augmented `Uint8Array` instance, for best performance
  9667. that = array
  9668. that.__proto__ = Buffer.prototype
  9669. } else {
  9670. // Fallback: Return an object instance of the Buffer class
  9671. that = fromArrayLike(that, array)
  9672. }
  9673. return that
  9674. }
  9675. function fromObject (that, obj) {
  9676. if (Buffer.isBuffer(obj)) {
  9677. var len = checked(obj.length) | 0
  9678. that = createBuffer(that, len)
  9679. if (that.length === 0) {
  9680. return that
  9681. }
  9682. obj.copy(that, 0, 0, len)
  9683. return that
  9684. }
  9685. if (obj) {
  9686. if ((typeof ArrayBuffer !== 'undefined' &&
  9687. obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
  9688. if (typeof obj.length !== 'number' || isnan(obj.length)) {
  9689. return createBuffer(that, 0)
  9690. }
  9691. return fromArrayLike(that, obj)
  9692. }
  9693. if (obj.type === 'Buffer' && isArray(obj.data)) {
  9694. return fromArrayLike(that, obj.data)
  9695. }
  9696. }
  9697. throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
  9698. }
  9699. function checked (length) {
  9700. // Note: cannot use `length < kMaxLength()` here because that fails when
  9701. // length is NaN (which is otherwise coerced to zero.)
  9702. if (length >= kMaxLength()) {
  9703. throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
  9704. 'size: 0x' + kMaxLength().toString(16) + ' bytes')
  9705. }
  9706. return length | 0
  9707. }
  9708. function SlowBuffer (length) {
  9709. if (+length != length) { // eslint-disable-line eqeqeq
  9710. length = 0
  9711. }
  9712. return Buffer.alloc(+length)
  9713. }
  9714. Buffer.isBuffer = function isBuffer (b) {
  9715. return !!(b != null && b._isBuffer)
  9716. }
  9717. Buffer.compare = function compare (a, b) {
  9718. if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
  9719. throw new TypeError('Arguments must be Buffers')
  9720. }
  9721. if (a === b) return 0
  9722. var x = a.length
  9723. var y = b.length
  9724. for (var i = 0, len = Math.min(x, y); i < len; ++i) {
  9725. if (a[i] !== b[i]) {
  9726. x = a[i]
  9727. y = b[i]
  9728. break
  9729. }
  9730. }
  9731. if (x < y) return -1
  9732. if (y < x) return 1
  9733. return 0
  9734. }
  9735. Buffer.isEncoding = function isEncoding (encoding) {
  9736. switch (String(encoding).toLowerCase()) {
  9737. case 'hex':
  9738. case 'utf8':
  9739. case 'utf-8':
  9740. case 'ascii':
  9741. case 'latin1':
  9742. case 'binary':
  9743. case 'base64':
  9744. case 'ucs2':
  9745. case 'ucs-2':
  9746. case 'utf16le':
  9747. case 'utf-16le':
  9748. return true
  9749. default:
  9750. return false
  9751. }
  9752. }
  9753. Buffer.concat = function concat (list, length) {
  9754. if (!isArray(list)) {
  9755. throw new TypeError('"list" argument must be an Array of Buffers')
  9756. }
  9757. if (list.length === 0) {
  9758. return Buffer.alloc(0)
  9759. }
  9760. var i
  9761. if (length === undefined) {
  9762. length = 0
  9763. for (i = 0; i < list.length; ++i) {
  9764. length += list[i].length
  9765. }
  9766. }
  9767. var buffer = Buffer.allocUnsafe(length)
  9768. var pos = 0
  9769. for (i = 0; i < list.length; ++i) {
  9770. var buf = list[i]
  9771. if (!Buffer.isBuffer(buf)) {
  9772. throw new TypeError('"list" argument must be an Array of Buffers')
  9773. }
  9774. buf.copy(buffer, pos)
  9775. pos += buf.length
  9776. }
  9777. return buffer
  9778. }
  9779. function byteLength (string, encoding) {
  9780. if (Buffer.isBuffer(string)) {
  9781. return string.length
  9782. }
  9783. if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
  9784. (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
  9785. return string.byteLength
  9786. }
  9787. if (typeof string !== 'string') {
  9788. string = '' + string
  9789. }
  9790. var len = string.length
  9791. if (len === 0) return 0
  9792. // Use a for loop to avoid recursion
  9793. var loweredCase = false
  9794. for (;;) {
  9795. switch (encoding) {
  9796. case 'ascii':
  9797. case 'latin1':
  9798. case 'binary':
  9799. return len
  9800. case 'utf8':
  9801. case 'utf-8':
  9802. case undefined:
  9803. return utf8ToBytes(string).length
  9804. case 'ucs2':
  9805. case 'ucs-2':
  9806. case 'utf16le':
  9807. case 'utf-16le':
  9808. return len * 2
  9809. case 'hex':
  9810. return len >>> 1
  9811. case 'base64':
  9812. return base64ToBytes(string).length
  9813. default:
  9814. if (loweredCase) return utf8ToBytes(string).length // assume utf8
  9815. encoding = ('' + encoding).toLowerCase()
  9816. loweredCase = true
  9817. }
  9818. }
  9819. }
  9820. Buffer.byteLength = byteLength
  9821. function slowToString (encoding, start, end) {
  9822. var loweredCase = false
  9823. // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
  9824. // property of a typed array.
  9825. // This behaves neither like String nor Uint8Array in that we set start/end
  9826. // to their upper/lower bounds if the value passed is out of range.
  9827. // undefined is handled specially as per ECMA-262 6th Edition,
  9828. // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
  9829. if (start === undefined || start < 0) {
  9830. start = 0
  9831. }
  9832. // Return early if start > this.length. Done here to prevent potential uint32
  9833. // coercion fail below.
  9834. if (start > this.length) {
  9835. return ''
  9836. }
  9837. if (end === undefined || end > this.length) {
  9838. end = this.length
  9839. }
  9840. if (end <= 0) {
  9841. return ''
  9842. }
  9843. // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
  9844. end >>>= 0
  9845. start >>>= 0
  9846. if (end <= start) {
  9847. return ''
  9848. }
  9849. if (!encoding) encoding = 'utf8'
  9850. while (true) {
  9851. switch (encoding) {
  9852. case 'hex':
  9853. return hexSlice(this, start, end)
  9854. case 'utf8':
  9855. case 'utf-8':
  9856. return utf8Slice(this, start, end)
  9857. case 'ascii':
  9858. return asciiSlice(this, start, end)
  9859. case 'latin1':
  9860. case 'binary':
  9861. return latin1Slice(this, start, end)
  9862. case 'base64':
  9863. return base64Slice(this, start, end)
  9864. case 'ucs2':
  9865. case 'ucs-2':
  9866. case 'utf16le':
  9867. case 'utf-16le':
  9868. return utf16leSlice(this, start, end)
  9869. default:
  9870. if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
  9871. encoding = (encoding + '').toLowerCase()
  9872. loweredCase = true
  9873. }
  9874. }
  9875. }
  9876. // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
  9877. // Buffer instances.
  9878. Buffer.prototype._isBuffer = true
  9879. function swap (b, n, m) {
  9880. var i = b[n]
  9881. b[n] = b[m]
  9882. b[m] = i
  9883. }
  9884. Buffer.prototype.swap16 = function swap16 () {
  9885. var len = this.length
  9886. if (len % 2 !== 0) {
  9887. throw new RangeError('Buffer size must be a multiple of 16-bits')
  9888. }
  9889. for (var i = 0; i < len; i += 2) {
  9890. swap(this, i, i + 1)
  9891. }
  9892. return this
  9893. }
  9894. Buffer.prototype.swap32 = function swap32 () {
  9895. var len = this.length
  9896. if (len % 4 !== 0) {
  9897. throw new RangeError('Buffer size must be a multiple of 32-bits')
  9898. }
  9899. for (var i = 0; i < len; i += 4) {
  9900. swap(this, i, i + 3)
  9901. swap(this, i + 1, i + 2)
  9902. }
  9903. return this
  9904. }
  9905. Buffer.prototype.swap64 = function swap64 () {
  9906. var len = this.length
  9907. if (len % 8 !== 0) {
  9908. throw new RangeError('Buffer size must be a multiple of 64-bits')
  9909. }
  9910. for (var i = 0; i < len; i += 8) {
  9911. swap(this, i, i + 7)
  9912. swap(this, i + 1, i + 6)
  9913. swap(this, i + 2, i + 5)
  9914. swap(this, i + 3, i + 4)
  9915. }
  9916. return this
  9917. }
  9918. Buffer.prototype.toString = function toString () {
  9919. var length = this.length | 0
  9920. if (length === 0) return ''
  9921. if (arguments.length === 0) return utf8Slice(this, 0, length)
  9922. return slowToString.apply(this, arguments)
  9923. }
  9924. Buffer.prototype.equals = function equals (b) {
  9925. if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
  9926. if (this === b) return true
  9927. return Buffer.compare(this, b) === 0
  9928. }
  9929. Buffer.prototype.inspect = function inspect () {
  9930. var str = ''
  9931. var max = exports.INSPECT_MAX_BYTES
  9932. if (this.length > 0) {
  9933. str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
  9934. if (this.length > max) str += ' ... '
  9935. }
  9936. return '<Buffer ' + str + '>'
  9937. }
  9938. Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
  9939. if (!Buffer.isBuffer(target)) {
  9940. throw new TypeError('Argument must be a Buffer')
  9941. }
  9942. if (start === undefined) {
  9943. start = 0
  9944. }
  9945. if (end === undefined) {
  9946. end = target ? target.length : 0
  9947. }
  9948. if (thisStart === undefined) {
  9949. thisStart = 0
  9950. }
  9951. if (thisEnd === undefined) {
  9952. thisEnd = this.length
  9953. }
  9954. if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
  9955. throw new RangeError('out of range index')
  9956. }
  9957. if (thisStart >= thisEnd && start >= end) {
  9958. return 0
  9959. }
  9960. if (thisStart >= thisEnd) {
  9961. return -1
  9962. }
  9963. if (start >= end) {
  9964. return 1
  9965. }
  9966. start >>>= 0
  9967. end >>>= 0
  9968. thisStart >>>= 0
  9969. thisEnd >>>= 0
  9970. if (this === target) return 0
  9971. var x = thisEnd - thisStart
  9972. var y = end - start
  9973. var len = Math.min(x, y)
  9974. var thisCopy = this.slice(thisStart, thisEnd)
  9975. var targetCopy = target.slice(start, end)
  9976. for (var i = 0; i < len; ++i) {
  9977. if (thisCopy[i] !== targetCopy[i]) {
  9978. x = thisCopy[i]
  9979. y = targetCopy[i]
  9980. break
  9981. }
  9982. }
  9983. if (x < y) return -1
  9984. if (y < x) return 1
  9985. return 0
  9986. }
  9987. // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
  9988. // OR the last index of `val` in `buffer` at offset <= `byteOffset`.
  9989. //
  9990. // Arguments:
  9991. // - buffer - a Buffer to search
  9992. // - val - a string, Buffer, or number
  9993. // - byteOffset - an index into `buffer`; will be clamped to an int32
  9994. // - encoding - an optional encoding, relevant is val is a string
  9995. // - dir - true for indexOf, false for lastIndexOf
  9996. function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
  9997. // Empty buffer means no match
  9998. if (buffer.length === 0) return -1
  9999. // Normalize byteOffset
  10000. if (typeof byteOffset === 'string') {
  10001. encoding = byteOffset
  10002. byteOffset = 0
  10003. } else if (byteOffset > 0x7fffffff) {
  10004. byteOffset = 0x7fffffff
  10005. } else if (byteOffset < -0x80000000) {
  10006. byteOffset = -0x80000000
  10007. }
  10008. byteOffset = +byteOffset // Coerce to Number.
  10009. if (isNaN(byteOffset)) {
  10010. // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
  10011. byteOffset = dir ? 0 : (buffer.length - 1)
  10012. }
  10013. // Normalize byteOffset: negative offsets start from the end of the buffer
  10014. if (byteOffset < 0) byteOffset = buffer.length + byteOffset
  10015. if (byteOffset >= buffer.length) {
  10016. if (dir) return -1
  10017. else byteOffset = buffer.length - 1
  10018. } else if (byteOffset < 0) {
  10019. if (dir) byteOffset = 0
  10020. else return -1
  10021. }
  10022. // Normalize val
  10023. if (typeof val === 'string') {
  10024. val = Buffer.from(val, encoding)
  10025. }
  10026. // Finally, search either indexOf (if dir is true) or lastIndexOf
  10027. if (Buffer.isBuffer(val)) {
  10028. // Special case: looking for empty string/buffer always fails
  10029. if (val.length === 0) {
  10030. return -1
  10031. }
  10032. return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
  10033. } else if (typeof val === 'number') {
  10034. val = val & 0xFF // Search for a byte value [0-255]
  10035. if (Buffer.TYPED_ARRAY_SUPPORT &&
  10036. typeof Uint8Array.prototype.indexOf === 'function') {
  10037. if (dir) {
  10038. return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
  10039. } else {
  10040. return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
  10041. }
  10042. }
  10043. return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
  10044. }
  10045. throw new TypeError('val must be string, number or Buffer')
  10046. }
  10047. function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
  10048. var indexSize = 1
  10049. var arrLength = arr.length
  10050. var valLength = val.length
  10051. if (encoding !== undefined) {
  10052. encoding = String(encoding).toLowerCase()
  10053. if (encoding === 'ucs2' || encoding === 'ucs-2' ||
  10054. encoding === 'utf16le' || encoding === 'utf-16le') {
  10055. if (arr.length < 2 || val.length < 2) {
  10056. return -1
  10057. }
  10058. indexSize = 2
  10059. arrLength /= 2
  10060. valLength /= 2
  10061. byteOffset /= 2
  10062. }
  10063. }
  10064. function read (buf, i) {
  10065. if (indexSize === 1) {
  10066. return buf[i]
  10067. } else {
  10068. return buf.readUInt16BE(i * indexSize)
  10069. }
  10070. }
  10071. var i
  10072. if (dir) {
  10073. var foundIndex = -1
  10074. for (i = byteOffset; i < arrLength; i++) {
  10075. if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
  10076. if (foundIndex === -1) foundIndex = i
  10077. if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
  10078. } else {
  10079. if (foundIndex !== -1) i -= i - foundIndex
  10080. foundIndex = -1
  10081. }
  10082. }
  10083. } else {
  10084. if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
  10085. for (i = byteOffset; i >= 0; i--) {
  10086. var found = true
  10087. for (var j = 0; j < valLength; j++) {
  10088. if (read(arr, i + j) !== read(val, j)) {
  10089. found = false
  10090. break
  10091. }
  10092. }
  10093. if (found) return i
  10094. }
  10095. }
  10096. return -1
  10097. }
  10098. Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
  10099. return this.indexOf(val, byteOffset, encoding) !== -1
  10100. }
  10101. Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
  10102. return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
  10103. }
  10104. Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
  10105. return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
  10106. }
  10107. function hexWrite (buf, string, offset, length) {
  10108. offset = Number(offset) || 0
  10109. var remaining = buf.length - offset
  10110. if (!length) {
  10111. length = remaining
  10112. } else {
  10113. length = Number(length)
  10114. if (length > remaining) {
  10115. length = remaining
  10116. }
  10117. }
  10118. // must be an even number of digits
  10119. var strLen = string.length
  10120. if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')
  10121. if (length > strLen / 2) {
  10122. length = strLen / 2
  10123. }
  10124. for (var i = 0; i < length; ++i) {
  10125. var parsed = parseInt(string.substr(i * 2, 2), 16)
  10126. if (isNaN(parsed)) return i
  10127. buf[offset + i] = parsed
  10128. }
  10129. return i
  10130. }
  10131. function utf8Write (buf, string, offset, length) {
  10132. return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
  10133. }
  10134. function asciiWrite (buf, string, offset, length) {
  10135. return blitBuffer(asciiToBytes(string), buf, offset, length)
  10136. }
  10137. function latin1Write (buf, string, offset, length) {
  10138. return asciiWrite(buf, string, offset, length)
  10139. }
  10140. function base64Write (buf, string, offset, length) {
  10141. return blitBuffer(base64ToBytes(string), buf, offset, length)
  10142. }
  10143. function ucs2Write (buf, string, offset, length) {
  10144. return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
  10145. }
  10146. Buffer.prototype.write = function write (string, offset, length, encoding) {
  10147. // Buffer#write(string)
  10148. if (offset === undefined) {
  10149. encoding = 'utf8'
  10150. length = this.length
  10151. offset = 0
  10152. // Buffer#write(string, encoding)
  10153. } else if (length === undefined && typeof offset === 'string') {
  10154. encoding = offset
  10155. length = this.length
  10156. offset = 0
  10157. // Buffer#write(string, offset[, length][, encoding])
  10158. } else if (isFinite(offset)) {
  10159. offset = offset | 0
  10160. if (isFinite(length)) {
  10161. length = length | 0
  10162. if (encoding === undefined) encoding = 'utf8'
  10163. } else {
  10164. encoding = length
  10165. length = undefined
  10166. }
  10167. // legacy write(string, encoding, offset, length) - remove in v0.13
  10168. } else {
  10169. throw new Error(
  10170. 'Buffer.write(string, encoding, offset[, length]) is no longer supported'
  10171. )
  10172. }
  10173. var remaining = this.length - offset
  10174. if (length === undefined || length > remaining) length = remaining
  10175. if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
  10176. throw new RangeError('Attempt to write outside buffer bounds')
  10177. }
  10178. if (!encoding) encoding = 'utf8'
  10179. var loweredCase = false
  10180. for (;;) {
  10181. switch (encoding) {
  10182. case 'hex':
  10183. return hexWrite(this, string, offset, length)
  10184. case 'utf8':
  10185. case 'utf-8':
  10186. return utf8Write(this, string, offset, length)
  10187. case 'ascii':
  10188. return asciiWrite(this, string, offset, length)
  10189. case 'latin1':
  10190. case 'binary':
  10191. return latin1Write(this, string, offset, length)
  10192. case 'base64':
  10193. // Warning: maxLength not taken into account in base64Write
  10194. return base64Write(this, string, offset, length)
  10195. case 'ucs2':
  10196. case 'ucs-2':
  10197. case 'utf16le':
  10198. case 'utf-16le':
  10199. return ucs2Write(this, string, offset, length)
  10200. default:
  10201. if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
  10202. encoding = ('' + encoding).toLowerCase()
  10203. loweredCase = true
  10204. }
  10205. }
  10206. }
  10207. Buffer.prototype.toJSON = function toJSON () {
  10208. return {
  10209. type: 'Buffer',
  10210. data: Array.prototype.slice.call(this._arr || this, 0)
  10211. }
  10212. }
  10213. function base64Slice (buf, start, end) {
  10214. if (start === 0 && end === buf.length) {
  10215. return base64.fromByteArray(buf)
  10216. } else {
  10217. return base64.fromByteArray(buf.slice(start, end))
  10218. }
  10219. }
  10220. function utf8Slice (buf, start, end) {
  10221. end = Math.min(buf.length, end)
  10222. var res = []
  10223. var i = start
  10224. while (i < end) {
  10225. var firstByte = buf[i]
  10226. var codePoint = null
  10227. var bytesPerSequence = (firstByte > 0xEF) ? 4
  10228. : (firstByte > 0xDF) ? 3
  10229. : (firstByte > 0xBF) ? 2
  10230. : 1
  10231. if (i + bytesPerSequence <= end) {
  10232. var secondByte, thirdByte, fourthByte, tempCodePoint
  10233. switch (bytesPerSequence) {
  10234. case 1:
  10235. if (firstByte < 0x80) {
  10236. codePoint = firstByte
  10237. }
  10238. break
  10239. case 2:
  10240. secondByte = buf[i + 1]
  10241. if ((secondByte & 0xC0) === 0x80) {
  10242. tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
  10243. if (tempCodePoint > 0x7F) {
  10244. codePoint = tempCodePoint
  10245. }
  10246. }
  10247. break
  10248. case 3:
  10249. secondByte = buf[i + 1]
  10250. thirdByte = buf[i + 2]
  10251. if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
  10252. tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
  10253. if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
  10254. codePoint = tempCodePoint
  10255. }
  10256. }
  10257. break
  10258. case 4:
  10259. secondByte = buf[i + 1]
  10260. thirdByte = buf[i + 2]
  10261. fourthByte = buf[i + 3]
  10262. if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
  10263. tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
  10264. if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
  10265. codePoint = tempCodePoint
  10266. }
  10267. }
  10268. }
  10269. }
  10270. if (codePoint === null) {
  10271. // we did not generate a valid codePoint so insert a
  10272. // replacement char (U+FFFD) and advance only 1 byte
  10273. codePoint = 0xFFFD
  10274. bytesPerSequence = 1
  10275. } else if (codePoint > 0xFFFF) {
  10276. // encode to utf16 (surrogate pair dance)
  10277. codePoint -= 0x10000
  10278. res.push(codePoint >>> 10 & 0x3FF | 0xD800)
  10279. codePoint = 0xDC00 | codePoint & 0x3FF
  10280. }
  10281. res.push(codePoint)
  10282. i += bytesPerSequence
  10283. }
  10284. return decodeCodePointsArray(res)
  10285. }
  10286. // Based on http://stackoverflow.com/a/22747272/680742, the browser with
  10287. // the lowest limit is Chrome, with 0x10000 args.
  10288. // We go 1 magnitude less, for safety
  10289. var MAX_ARGUMENTS_LENGTH = 0x1000
  10290. function decodeCodePointsArray (codePoints) {
  10291. var len = codePoints.length
  10292. if (len <= MAX_ARGUMENTS_LENGTH) {
  10293. return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
  10294. }
  10295. // Decode in chunks to avoid "call stack size exceeded".
  10296. var res = ''
  10297. var i = 0
  10298. while (i < len) {
  10299. res += String.fromCharCode.apply(
  10300. String,
  10301. codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
  10302. )
  10303. }
  10304. return res
  10305. }
  10306. function asciiSlice (buf, start, end) {
  10307. var ret = ''
  10308. end = Math.min(buf.length, end)
  10309. for (var i = start; i < end; ++i) {
  10310. ret += String.fromCharCode(buf[i] & 0x7F)
  10311. }
  10312. return ret
  10313. }
  10314. function latin1Slice (buf, start, end) {
  10315. var ret = ''
  10316. end = Math.min(buf.length, end)
  10317. for (var i = start; i < end; ++i) {
  10318. ret += String.fromCharCode(buf[i])
  10319. }
  10320. return ret
  10321. }
  10322. function hexSlice (buf, start, end) {
  10323. var len = buf.length
  10324. if (!start || start < 0) start = 0
  10325. if (!end || end < 0 || end > len) end = len
  10326. var out = ''
  10327. for (var i = start; i < end; ++i) {
  10328. out += toHex(buf[i])
  10329. }
  10330. return out
  10331. }
  10332. function utf16leSlice (buf, start, end) {
  10333. var bytes = buf.slice(start, end)
  10334. var res = ''
  10335. for (var i = 0; i < bytes.length; i += 2) {
  10336. res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
  10337. }
  10338. return res
  10339. }
  10340. Buffer.prototype.slice = function slice (start, end) {
  10341. var len = this.length
  10342. start = ~~start
  10343. end = end === undefined ? len : ~~end
  10344. if (start < 0) {
  10345. start += len
  10346. if (start < 0) start = 0
  10347. } else if (start > len) {
  10348. start = len
  10349. }
  10350. if (end < 0) {
  10351. end += len
  10352. if (end < 0) end = 0
  10353. } else if (end > len) {
  10354. end = len
  10355. }
  10356. if (end < start) end = start
  10357. var newBuf
  10358. if (Buffer.TYPED_ARRAY_SUPPORT) {
  10359. newBuf = this.subarray(start, end)
  10360. newBuf.__proto__ = Buffer.prototype
  10361. } else {
  10362. var sliceLen = end - start
  10363. newBuf = new Buffer(sliceLen, undefined)
  10364. for (var i = 0; i < sliceLen; ++i) {
  10365. newBuf[i] = this[i + start]
  10366. }
  10367. }
  10368. return newBuf
  10369. }
  10370. /*
  10371. * Need to make sure that buffer isn't trying to write out of bounds.
  10372. */
  10373. function checkOffset (offset, ext, length) {
  10374. if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
  10375. if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
  10376. }
  10377. Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
  10378. offset = offset | 0
  10379. byteLength = byteLength | 0
  10380. if (!noAssert) checkOffset(offset, byteLength, this.length)
  10381. var val = this[offset]
  10382. var mul = 1
  10383. var i = 0
  10384. while (++i < byteLength && (mul *= 0x100)) {
  10385. val += this[offset + i] * mul
  10386. }
  10387. return val
  10388. }
  10389. Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
  10390. offset = offset | 0
  10391. byteLength = byteLength | 0
  10392. if (!noAssert) {
  10393. checkOffset(offset, byteLength, this.length)
  10394. }
  10395. var val = this[offset + --byteLength]
  10396. var mul = 1
  10397. while (byteLength > 0 && (mul *= 0x100)) {
  10398. val += this[offset + --byteLength] * mul
  10399. }
  10400. return val
  10401. }
  10402. Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
  10403. if (!noAssert) checkOffset(offset, 1, this.length)
  10404. return this[offset]
  10405. }
  10406. Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
  10407. if (!noAssert) checkOffset(offset, 2, this.length)
  10408. return this[offset] | (this[offset + 1] << 8)
  10409. }
  10410. Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
  10411. if (!noAssert) checkOffset(offset, 2, this.length)
  10412. return (this[offset] << 8) | this[offset + 1]
  10413. }
  10414. Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
  10415. if (!noAssert) checkOffset(offset, 4, this.length)
  10416. return ((this[offset]) |
  10417. (this[offset + 1] << 8) |
  10418. (this[offset + 2] << 16)) +
  10419. (this[offset + 3] * 0x1000000)
  10420. }
  10421. Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
  10422. if (!noAssert) checkOffset(offset, 4, this.length)
  10423. return (this[offset] * 0x1000000) +
  10424. ((this[offset + 1] << 16) |
  10425. (this[offset + 2] << 8) |
  10426. this[offset + 3])
  10427. }
  10428. Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
  10429. offset = offset | 0
  10430. byteLength = byteLength | 0
  10431. if (!noAssert) checkOffset(offset, byteLength, this.length)
  10432. var val = this[offset]
  10433. var mul = 1
  10434. var i = 0
  10435. while (++i < byteLength && (mul *= 0x100)) {
  10436. val += this[offset + i] * mul
  10437. }
  10438. mul *= 0x80
  10439. if (val >= mul) val -= Math.pow(2, 8 * byteLength)
  10440. return val
  10441. }
  10442. Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
  10443. offset = offset | 0
  10444. byteLength = byteLength | 0
  10445. if (!noAssert) checkOffset(offset, byteLength, this.length)
  10446. var i = byteLength
  10447. var mul = 1
  10448. var val = this[offset + --i]
  10449. while (i > 0 && (mul *= 0x100)) {
  10450. val += this[offset + --i] * mul
  10451. }
  10452. mul *= 0x80
  10453. if (val >= mul) val -= Math.pow(2, 8 * byteLength)
  10454. return val
  10455. }
  10456. Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
  10457. if (!noAssert) checkOffset(offset, 1, this.length)
  10458. if (!(this[offset] & 0x80)) return (this[offset])
  10459. return ((0xff - this[offset] + 1) * -1)
  10460. }
  10461. Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
  10462. if (!noAssert) checkOffset(offset, 2, this.length)
  10463. var val = this[offset] | (this[offset + 1] << 8)
  10464. return (val & 0x8000) ? val | 0xFFFF0000 : val
  10465. }
  10466. Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
  10467. if (!noAssert) checkOffset(offset, 2, this.length)
  10468. var val = this[offset + 1] | (this[offset] << 8)
  10469. return (val & 0x8000) ? val | 0xFFFF0000 : val
  10470. }
  10471. Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
  10472. if (!noAssert) checkOffset(offset, 4, this.length)
  10473. return (this[offset]) |
  10474. (this[offset + 1] << 8) |
  10475. (this[offset + 2] << 16) |
  10476. (this[offset + 3] << 24)
  10477. }
  10478. Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
  10479. if (!noAssert) checkOffset(offset, 4, this.length)
  10480. return (this[offset] << 24) |
  10481. (this[offset + 1] << 16) |
  10482. (this[offset + 2] << 8) |
  10483. (this[offset + 3])
  10484. }
  10485. Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
  10486. if (!noAssert) checkOffset(offset, 4, this.length)
  10487. return ieee754.read(this, offset, true, 23, 4)
  10488. }
  10489. Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
  10490. if (!noAssert) checkOffset(offset, 4, this.length)
  10491. return ieee754.read(this, offset, false, 23, 4)
  10492. }
  10493. Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
  10494. if (!noAssert) checkOffset(offset, 8, this.length)
  10495. return ieee754.read(this, offset, true, 52, 8)
  10496. }
  10497. Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
  10498. if (!noAssert) checkOffset(offset, 8, this.length)
  10499. return ieee754.read(this, offset, false, 52, 8)
  10500. }
  10501. function checkInt (buf, value, offset, ext, max, min) {
  10502. if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
  10503. if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
  10504. if (offset + ext > buf.length) throw new RangeError('Index out of range')
  10505. }
  10506. Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
  10507. value = +value
  10508. offset = offset | 0
  10509. byteLength = byteLength | 0
  10510. if (!noAssert) {
  10511. var maxBytes = Math.pow(2, 8 * byteLength) - 1
  10512. checkInt(this, value, offset, byteLength, maxBytes, 0)
  10513. }
  10514. var mul = 1
  10515. var i = 0
  10516. this[offset] = value & 0xFF
  10517. while (++i < byteLength && (mul *= 0x100)) {
  10518. this[offset + i] = (value / mul) & 0xFF
  10519. }
  10520. return offset + byteLength
  10521. }
  10522. Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
  10523. value = +value
  10524. offset = offset | 0
  10525. byteLength = byteLength | 0
  10526. if (!noAssert) {
  10527. var maxBytes = Math.pow(2, 8 * byteLength) - 1
  10528. checkInt(this, value, offset, byteLength, maxBytes, 0)
  10529. }
  10530. var i = byteLength - 1
  10531. var mul = 1
  10532. this[offset + i] = value & 0xFF
  10533. while (--i >= 0 && (mul *= 0x100)) {
  10534. this[offset + i] = (value / mul) & 0xFF
  10535. }
  10536. return offset + byteLength
  10537. }
  10538. Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
  10539. value = +value
  10540. offset = offset | 0
  10541. if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
  10542. if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
  10543. this[offset] = (value & 0xff)
  10544. return offset + 1
  10545. }
  10546. function objectWriteUInt16 (buf, value, offset, littleEndian) {
  10547. if (value < 0) value = 0xffff + value + 1
  10548. for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
  10549. buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
  10550. (littleEndian ? i : 1 - i) * 8
  10551. }
  10552. }
  10553. Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
  10554. value = +value
  10555. offset = offset | 0
  10556. if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
  10557. if (Buffer.TYPED_ARRAY_SUPPORT) {
  10558. this[offset] = (value & 0xff)
  10559. this[offset + 1] = (value >>> 8)
  10560. } else {
  10561. objectWriteUInt16(this, value, offset, true)
  10562. }
  10563. return offset + 2
  10564. }
  10565. Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
  10566. value = +value
  10567. offset = offset | 0
  10568. if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
  10569. if (Buffer.TYPED_ARRAY_SUPPORT) {
  10570. this[offset] = (value >>> 8)
  10571. this[offset + 1] = (value & 0xff)
  10572. } else {
  10573. objectWriteUInt16(this, value, offset, false)
  10574. }
  10575. return offset + 2
  10576. }
  10577. function objectWriteUInt32 (buf, value, offset, littleEndian) {
  10578. if (value < 0) value = 0xffffffff + value + 1
  10579. for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
  10580. buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
  10581. }
  10582. }
  10583. Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
  10584. value = +value
  10585. offset = offset | 0
  10586. if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
  10587. if (Buffer.TYPED_ARRAY_SUPPORT) {
  10588. this[offset + 3] = (value >>> 24)
  10589. this[offset + 2] = (value >>> 16)
  10590. this[offset + 1] = (value >>> 8)
  10591. this[offset] = (value & 0xff)
  10592. } else {
  10593. objectWriteUInt32(this, value, offset, true)
  10594. }
  10595. return offset + 4
  10596. }
  10597. Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
  10598. value = +value
  10599. offset = offset | 0
  10600. if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
  10601. if (Buffer.TYPED_ARRAY_SUPPORT) {
  10602. this[offset] = (value >>> 24)
  10603. this[offset + 1] = (value >>> 16)
  10604. this[offset + 2] = (value >>> 8)
  10605. this[offset + 3] = (value & 0xff)
  10606. } else {
  10607. objectWriteUInt32(this, value, offset, false)
  10608. }
  10609. return offset + 4
  10610. }
  10611. Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
  10612. value = +value
  10613. offset = offset | 0
  10614. if (!noAssert) {
  10615. var limit = Math.pow(2, 8 * byteLength - 1)
  10616. checkInt(this, value, offset, byteLength, limit - 1, -limit)
  10617. }
  10618. var i = 0
  10619. var mul = 1
  10620. var sub = 0
  10621. this[offset] = value & 0xFF
  10622. while (++i < byteLength && (mul *= 0x100)) {
  10623. if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
  10624. sub = 1
  10625. }
  10626. this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
  10627. }
  10628. return offset + byteLength
  10629. }
  10630. Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
  10631. value = +value
  10632. offset = offset | 0
  10633. if (!noAssert) {
  10634. var limit = Math.pow(2, 8 * byteLength - 1)
  10635. checkInt(this, value, offset, byteLength, limit - 1, -limit)
  10636. }
  10637. var i = byteLength - 1
  10638. var mul = 1
  10639. var sub = 0
  10640. this[offset + i] = value & 0xFF
  10641. while (--i >= 0 && (mul *= 0x100)) {
  10642. if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
  10643. sub = 1
  10644. }
  10645. this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
  10646. }
  10647. return offset + byteLength
  10648. }
  10649. Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
  10650. value = +value
  10651. offset = offset | 0
  10652. if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
  10653. if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
  10654. if (value < 0) value = 0xff + value + 1
  10655. this[offset] = (value & 0xff)
  10656. return offset + 1
  10657. }
  10658. Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
  10659. value = +value
  10660. offset = offset | 0
  10661. if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
  10662. if (Buffer.TYPED_ARRAY_SUPPORT) {
  10663. this[offset] = (value & 0xff)
  10664. this[offset + 1] = (value >>> 8)
  10665. } else {
  10666. objectWriteUInt16(this, value, offset, true)
  10667. }
  10668. return offset + 2
  10669. }
  10670. Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
  10671. value = +value
  10672. offset = offset | 0
  10673. if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
  10674. if (Buffer.TYPED_ARRAY_SUPPORT) {
  10675. this[offset] = (value >>> 8)
  10676. this[offset + 1] = (value & 0xff)
  10677. } else {
  10678. objectWriteUInt16(this, value, offset, false)
  10679. }
  10680. return offset + 2
  10681. }
  10682. Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
  10683. value = +value
  10684. offset = offset | 0
  10685. if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
  10686. if (Buffer.TYPED_ARRAY_SUPPORT) {
  10687. this[offset] = (value & 0xff)
  10688. this[offset + 1] = (value >>> 8)
  10689. this[offset + 2] = (value >>> 16)
  10690. this[offset + 3] = (value >>> 24)
  10691. } else {
  10692. objectWriteUInt32(this, value, offset, true)
  10693. }
  10694. return offset + 4
  10695. }
  10696. Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
  10697. value = +value
  10698. offset = offset | 0
  10699. if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
  10700. if (value < 0) value = 0xffffffff + value + 1
  10701. if (Buffer.TYPED_ARRAY_SUPPORT) {
  10702. this[offset] = (value >>> 24)
  10703. this[offset + 1] = (value >>> 16)
  10704. this[offset + 2] = (value >>> 8)
  10705. this[offset + 3] = (value & 0xff)
  10706. } else {
  10707. objectWriteUInt32(this, value, offset, false)
  10708. }
  10709. return offset + 4
  10710. }
  10711. function checkIEEE754 (buf, value, offset, ext, max, min) {
  10712. if (offset + ext > buf.length) throw new RangeError('Index out of range')
  10713. if (offset < 0) throw new RangeError('Index out of range')
  10714. }
  10715. function writeFloat (buf, value, offset, littleEndian, noAssert) {
  10716. if (!noAssert) {
  10717. checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
  10718. }
  10719. ieee754.write(buf, value, offset, littleEndian, 23, 4)
  10720. return offset + 4
  10721. }
  10722. Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
  10723. return writeFloat(this, value, offset, true, noAssert)
  10724. }
  10725. Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
  10726. return writeFloat(this, value, offset, false, noAssert)
  10727. }
  10728. function writeDouble (buf, value, offset, littleEndian, noAssert) {
  10729. if (!noAssert) {
  10730. checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
  10731. }
  10732. ieee754.write(buf, value, offset, littleEndian, 52, 8)
  10733. return offset + 8
  10734. }
  10735. Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
  10736. return writeDouble(this, value, offset, true, noAssert)
  10737. }
  10738. Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
  10739. return writeDouble(this, value, offset, false, noAssert)
  10740. }
  10741. // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
  10742. Buffer.prototype.copy = function copy (target, targetStart, start, end) {
  10743. if (!start) start = 0
  10744. if (!end && end !== 0) end = this.length
  10745. if (targetStart >= target.length) targetStart = target.length
  10746. if (!targetStart) targetStart = 0
  10747. if (end > 0 && end < start) end = start
  10748. // Copy 0 bytes; we're done
  10749. if (end === start) return 0
  10750. if (target.length === 0 || this.length === 0) return 0
  10751. // Fatal error conditions
  10752. if (targetStart < 0) {
  10753. throw new RangeError('targetStart out of bounds')
  10754. }
  10755. if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
  10756. if (end < 0) throw new RangeError('sourceEnd out of bounds')
  10757. // Are we oob?
  10758. if (end > this.length) end = this.length
  10759. if (target.length - targetStart < end - start) {
  10760. end = target.length - targetStart + start
  10761. }
  10762. var len = end - start
  10763. var i
  10764. if (this === target && start < targetStart && targetStart < end) {
  10765. // descending copy from end
  10766. for (i = len - 1; i >= 0; --i) {
  10767. target[i + targetStart] = this[i + start]
  10768. }
  10769. } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
  10770. // ascending copy from start
  10771. for (i = 0; i < len; ++i) {
  10772. target[i + targetStart] = this[i + start]
  10773. }
  10774. } else {
  10775. Uint8Array.prototype.set.call(
  10776. target,
  10777. this.subarray(start, start + len),
  10778. targetStart
  10779. )
  10780. }
  10781. return len
  10782. }
  10783. // Usage:
  10784. // buffer.fill(number[, offset[, end]])
  10785. // buffer.fill(buffer[, offset[, end]])
  10786. // buffer.fill(string[, offset[, end]][, encoding])
  10787. Buffer.prototype.fill = function fill (val, start, end, encoding) {
  10788. // Handle string cases:
  10789. if (typeof val === 'string') {
  10790. if (typeof start === 'string') {
  10791. encoding = start
  10792. start = 0
  10793. end = this.length
  10794. } else if (typeof end === 'string') {
  10795. encoding = end
  10796. end = this.length
  10797. }
  10798. if (val.length === 1) {
  10799. var code = val.charCodeAt(0)
  10800. if (code < 256) {
  10801. val = code
  10802. }
  10803. }
  10804. if (encoding !== undefined && typeof encoding !== 'string') {
  10805. throw new TypeError('encoding must be a string')
  10806. }
  10807. if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
  10808. throw new TypeError('Unknown encoding: ' + encoding)
  10809. }
  10810. } else if (typeof val === 'number') {
  10811. val = val & 255
  10812. }
  10813. // Invalid ranges are not set to a default, so can range check early.
  10814. if (start < 0 || this.length < start || this.length < end) {
  10815. throw new RangeError('Out of range index')
  10816. }
  10817. if (end <= start) {
  10818. return this
  10819. }
  10820. start = start >>> 0
  10821. end = end === undefined ? this.length : end >>> 0
  10822. if (!val) val = 0
  10823. var i
  10824. if (typeof val === 'number') {
  10825. for (i = start; i < end; ++i) {
  10826. this[i] = val
  10827. }
  10828. } else {
  10829. var bytes = Buffer.isBuffer(val)
  10830. ? val
  10831. : utf8ToBytes(new Buffer(val, encoding).toString())
  10832. var len = bytes.length
  10833. for (i = 0; i < end - start; ++i) {
  10834. this[i + start] = bytes[i % len]
  10835. }
  10836. }
  10837. return this
  10838. }
  10839. // HELPER FUNCTIONS
  10840. // ================
  10841. var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g
  10842. function base64clean (str) {
  10843. // Node strips out invalid characters like \n and \t from the string, base64-js does not
  10844. str = stringtrim(str).replace(INVALID_BASE64_RE, '')
  10845. // Node converts strings with length < 2 to ''
  10846. if (str.length < 2) return ''
  10847. // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
  10848. while (str.length % 4 !== 0) {
  10849. str = str + '='
  10850. }
  10851. return str
  10852. }
  10853. function stringtrim (str) {
  10854. if (str.trim) return str.trim()
  10855. return str.replace(/^\s+|\s+$/g, '')
  10856. }
  10857. function toHex (n) {
  10858. if (n < 16) return '0' + n.toString(16)
  10859. return n.toString(16)
  10860. }
  10861. function utf8ToBytes (string, units) {
  10862. units = units || Infinity
  10863. var codePoint
  10864. var length = string.length
  10865. var leadSurrogate = null
  10866. var bytes = []
  10867. for (var i = 0; i < length; ++i) {
  10868. codePoint = string.charCodeAt(i)
  10869. // is surrogate component
  10870. if (codePoint > 0xD7FF && codePoint < 0xE000) {
  10871. // last char was a lead
  10872. if (!leadSurrogate) {
  10873. // no lead yet
  10874. if (codePoint > 0xDBFF) {
  10875. // unexpected trail
  10876. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  10877. continue
  10878. } else if (i + 1 === length) {
  10879. // unpaired lead
  10880. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  10881. continue
  10882. }
  10883. // valid lead
  10884. leadSurrogate = codePoint
  10885. continue
  10886. }
  10887. // 2 leads in a row
  10888. if (codePoint < 0xDC00) {
  10889. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  10890. leadSurrogate = codePoint
  10891. continue
  10892. }
  10893. // valid surrogate pair
  10894. codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
  10895. } else if (leadSurrogate) {
  10896. // valid bmp char, but last char was a lead
  10897. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  10898. }
  10899. leadSurrogate = null
  10900. // encode utf8
  10901. if (codePoint < 0x80) {
  10902. if ((units -= 1) < 0) break
  10903. bytes.push(codePoint)
  10904. } else if (codePoint < 0x800) {
  10905. if ((units -= 2) < 0) break
  10906. bytes.push(
  10907. codePoint >> 0x6 | 0xC0,
  10908. codePoint & 0x3F | 0x80
  10909. )
  10910. } else if (codePoint < 0x10000) {
  10911. if ((units -= 3) < 0) break
  10912. bytes.push(
  10913. codePoint >> 0xC | 0xE0,
  10914. codePoint >> 0x6 & 0x3F | 0x80,
  10915. codePoint & 0x3F | 0x80
  10916. )
  10917. } else if (codePoint < 0x110000) {
  10918. if ((units -= 4) < 0) break
  10919. bytes.push(
  10920. codePoint >> 0x12 | 0xF0,
  10921. codePoint >> 0xC & 0x3F | 0x80,
  10922. codePoint >> 0x6 & 0x3F | 0x80,
  10923. codePoint & 0x3F | 0x80
  10924. )
  10925. } else {
  10926. throw new Error('Invalid code point')
  10927. }
  10928. }
  10929. return bytes
  10930. }
  10931. function asciiToBytes (str) {
  10932. var byteArray = []
  10933. for (var i = 0; i < str.length; ++i) {
  10934. // Node's code seems to be doing this and not & 0x7F..
  10935. byteArray.push(str.charCodeAt(i) & 0xFF)
  10936. }
  10937. return byteArray
  10938. }
  10939. function utf16leToBytes (str, units) {
  10940. var c, hi, lo
  10941. var byteArray = []
  10942. for (var i = 0; i < str.length; ++i) {
  10943. if ((units -= 2) < 0) break
  10944. c = str.charCodeAt(i)
  10945. hi = c >> 8
  10946. lo = c % 256
  10947. byteArray.push(lo)
  10948. byteArray.push(hi)
  10949. }
  10950. return byteArray
  10951. }
  10952. function base64ToBytes (str) {
  10953. return base64.toByteArray(base64clean(str))
  10954. }
  10955. function blitBuffer (src, dst, offset, length) {
  10956. for (var i = 0; i < length; ++i) {
  10957. if ((i + offset >= dst.length) || (i >= src.length)) break
  10958. dst[i + offset] = src[i]
  10959. }
  10960. return i
  10961. }
  10962. function isnan (val) {
  10963. return val !== val // eslint-disable-line no-self-compare
  10964. }
  10965. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("698d")))
  10966. /***/ }),
  10967. /***/ "3e48":
  10968. /***/ (function(module, exports, __webpack_require__) {
  10969. "use strict";
  10970. /* WEBPACK VAR INJECTION */(function(process) {
  10971. if (typeof process === 'undefined' ||
  10972. !process.version ||
  10973. process.version.indexOf('v0.') === 0 ||
  10974. process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {
  10975. module.exports = { nextTick: nextTick };
  10976. } else {
  10977. module.exports = process
  10978. }
  10979. function nextTick(fn, arg1, arg2, arg3) {
  10980. if (typeof fn !== 'function') {
  10981. throw new TypeError('"callback" argument must be a function');
  10982. }
  10983. var len = arguments.length;
  10984. var args, i;
  10985. switch (len) {
  10986. case 0:
  10987. case 1:
  10988. return process.nextTick(fn);
  10989. case 2:
  10990. return process.nextTick(function afterTickOne() {
  10991. fn.call(null, arg1);
  10992. });
  10993. case 3:
  10994. return process.nextTick(function afterTickTwo() {
  10995. fn.call(null, arg1, arg2);
  10996. });
  10997. case 4:
  10998. return process.nextTick(function afterTickThree() {
  10999. fn.call(null, arg1, arg2, arg3);
  11000. });
  11001. default:
  11002. args = new Array(len - 1);
  11003. i = 0;
  11004. while (i < args.length) {
  11005. args[i++] = arguments[i];
  11006. }
  11007. return process.nextTick(function afterTick() {
  11008. fn.apply(null, args);
  11009. });
  11010. }
  11011. }
  11012. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("f2ac")))
  11013. /***/ }),
  11014. /***/ "3e59":
  11015. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  11016. "use strict";
  11017. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/common/table-popup/TablePopup.vue?vue&type=template&id=1c51b447&
  11018. var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"sm-component-table-popup",style:([_vm.backgroundStyle, _vm.getTextColorStyle, _vm.styleObject])},[_c('div',{staticClass:"sm-component-table-popup__close"},[_vm._v("x")]),_vm._v(" "),_c('a-table',{staticClass:"sm-component-table-popup__table",style:(_vm.backgroundStyle),attrs:{"data-source":_vm.data,"columns":_vm.columns,"rowKey":function (record, index) { return index; },"pagination":false}})],1)}
  11019. var staticRenderFns = []
  11020. // CONCATENATED MODULE: ./src/common/table-popup/TablePopup.vue?vue&type=template&id=1c51b447&
  11021. /* concated harmony reexport render */__webpack_require__.d(__webpack_exports__, "a", function() { return render; });
  11022. /* concated harmony reexport staticRenderFns */__webpack_require__.d(__webpack_exports__, "b", function() { return staticRenderFns; });
  11023. /***/ }),
  11024. /***/ "3ef3":
  11025. /***/ (function(module, exports, __webpack_require__) {
  11026. /**
  11027. * geostats() is a tiny and standalone javascript library for classification
  11028. * Project page - https://github.com/simogeo/geostats
  11029. * Copyright (c) 2011 Simon Georget, http://www.empreinte-urbaine.eu
  11030. * Licensed under the MIT license
  11031. */
  11032. (function (definition) {
  11033. // This file will function properly as a <script> tag, or a module
  11034. // using CommonJS and NodeJS or RequireJS module formats.
  11035. // CommonJS
  11036. if (true) {
  11037. module.exports = definition();
  11038. // RequireJS
  11039. } else {}
  11040. })(function () {
  11041. var isInt = function(n) {
  11042. return typeof n === 'number' && parseFloat(n) == parseInt(n, 10) && !isNaN(n);
  11043. } // 6 characters
  11044. var _t = function(str) {
  11045. return str;
  11046. };
  11047. //taking from http://stackoverflow.com/questions/18082/validate-decimal-numbers-in-javascript-isnumeric
  11048. var isNumber = function(n) {
  11049. return !isNaN(parseFloat(n)) && isFinite(n);
  11050. }
  11051. //indexOf polyfill
  11052. // from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf
  11053. if (!Array.prototype.indexOf) {
  11054. Array.prototype.indexOf = function (searchElement, fromIndex) {
  11055. if ( this === undefined || this === null ) {
  11056. throw new TypeError( '"this" is null or not defined' );
  11057. }
  11058. var length = this.length >>> 0; // Hack to convert object.length to a UInt32
  11059. fromIndex = +fromIndex || 0;
  11060. if (Math.abs(fromIndex) === Infinity) {
  11061. fromIndex = 0;
  11062. }
  11063. if (fromIndex < 0) {
  11064. fromIndex += length;
  11065. if (fromIndex < 0) {
  11066. fromIndex = 0;
  11067. }
  11068. }
  11069. for (;fromIndex < length; fromIndex++) {
  11070. if (this[fromIndex] === searchElement) {
  11071. return fromIndex;
  11072. }
  11073. }
  11074. return -1;
  11075. };
  11076. }
  11077. var geostats = function(a) {
  11078. this.objectID = '';
  11079. this.separator = ' - ';
  11080. this.legendSeparator = this.separator;
  11081. this.method = '';
  11082. this.precision = 0;
  11083. this.precisionflag = 'auto';
  11084. this.roundlength = 2; // Number of decimals, round values
  11085. this.is_uniqueValues = false;
  11086. this.debug = false;
  11087. this.silent = false;
  11088. this.bounds = Array();
  11089. this.ranges = Array();
  11090. this.inner_ranges = null;
  11091. this.colors = Array();
  11092. this.counter = Array();
  11093. // statistics information
  11094. this.stat_sorted = null;
  11095. this.stat_mean = null;
  11096. this.stat_median = null;
  11097. this.stat_sum = null;
  11098. this.stat_max = null;
  11099. this.stat_min = null;
  11100. this.stat_pop = null;
  11101. this.stat_variance = null;
  11102. this.stat_stddev = null;
  11103. this.stat_cov = null;
  11104. /**
  11105. * logging method
  11106. */
  11107. this.log = function(msg, force) {
  11108. if(this.debug == true || force != null)
  11109. console.log(this.objectID + "(object id) :: " + msg);
  11110. };
  11111. /**
  11112. * Set bounds
  11113. */
  11114. this.setBounds = function(a) {
  11115. this.log('Setting bounds (' + a.length + ') : ' + a.join());
  11116. this.bounds = Array() // init empty array to prevent bug when calling classification after another with less items (sample getQuantile(6) and getQuantile(4))
  11117. this.bounds = a;
  11118. //this.bounds = this.decimalFormat(a);
  11119. };
  11120. /**
  11121. * Set a new serie
  11122. */
  11123. this.setSerie = function(a) {
  11124. this.log('Setting serie (' + a.length + ') : ' + a.join());
  11125. this.serie = Array() // init empty array to prevent bug when calling classification after another with less items (sample getQuantile(6) and getQuantile(4))
  11126. this.serie = a;
  11127. //reset statistics after changing serie
  11128. this.resetStatistics();
  11129. this.setPrecision();
  11130. };
  11131. /**
  11132. * Set colors
  11133. */
  11134. this.setColors = function(colors) {
  11135. this.log('Setting color ramp (' + colors.length + ') : ' + colors.join());
  11136. this.colors = colors;
  11137. };
  11138. /**
  11139. * Get feature count
  11140. * With bounds array(0, 0.75, 1.5, 2.25, 3);
  11141. * should populate this.counter with 5 keys
  11142. * and increment counters for each key
  11143. */
  11144. this.doCount = function() {
  11145. if (this._nodata())
  11146. return;
  11147. var tmp = this.sorted();
  11148. this.counter = new Array();
  11149. // we init counter with 0 value
  11150. for(i = 0; i < this.bounds.length -1; i++) {
  11151. this.counter[i]= 0;
  11152. }
  11153. for(j=0; j < tmp.length; j++) {
  11154. // get current class for value to increment the counter
  11155. var cclass = this.getClass(tmp[j]);
  11156. this.counter[cclass]++;
  11157. }
  11158. };
  11159. /**
  11160. * Set decimal precision according to user input
  11161. * or automatcally determined according
  11162. * to the given serie.
  11163. */
  11164. this.setPrecision = function(decimals) {
  11165. // only when called from user
  11166. if(typeof decimals !== "undefined") {
  11167. this.precisionflag = 'manual';
  11168. this.precision = decimals;
  11169. }
  11170. // we calculate the maximal decimal length on given serie
  11171. if(this.precisionflag == 'auto') {
  11172. for (var i = 0; i < this.serie.length; i++) {
  11173. // check if the given value is a number and a float
  11174. if (!isNaN((this.serie[i]+"")) && (this.serie[i]+"").toString().indexOf('.') != -1) {
  11175. var precision = (this.serie[i] + "").split(".")[1].length;
  11176. } else {
  11177. var precision = 0;
  11178. }
  11179. if(precision > this.precision) {
  11180. this.precision = precision;
  11181. }
  11182. }
  11183. }
  11184. if(this.precision > 20) {
  11185. // prevent "Uncaught RangeError: toFixed() digits argument must be between 0 and 20" bug. See https://github.com/simogeo/geostats/issues/34
  11186. 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.');
  11187. this.precision = 20;
  11188. }
  11189. this.log('Calling setPrecision(). Mode : ' + this.precisionflag + ' - Decimals : '+ this.precision);
  11190. this.serie = this.decimalFormat(this.serie);
  11191. };
  11192. /**
  11193. * Format array numbers regarding to precision
  11194. */
  11195. this.decimalFormat = function(a) {
  11196. var b = new Array();
  11197. for (var i = 0; i < a.length; i++) {
  11198. // check if the given value is a number
  11199. if (isNumber(a[i])) {
  11200. b[i] = parseFloat(parseFloat(a[i]).toFixed(this.precision));
  11201. } else {
  11202. b[i] = a[i];
  11203. }
  11204. }
  11205. return b;
  11206. }
  11207. /**
  11208. * Transform a bounds array to a range array the following array : array(0,
  11209. * 0.75, 1.5, 2.25, 3); becomes : array('0-0.75', '0.75-1.5', '1.5-2.25',
  11210. * '2.25-3');
  11211. */
  11212. this.setRanges = function() {
  11213. this.ranges = Array(); // init empty array to prevent bug when calling classification after another with less items (sample getQuantile(6) and getQuantile(4))
  11214. for (i = 0; i < (this.bounds.length - 1); i++) {
  11215. this.ranges[i] = this.bounds[i] + this.separator + this.bounds[i + 1];
  11216. }
  11217. };
  11218. /** return min value */
  11219. this.min = function() {
  11220. if (this._nodata())
  11221. return;
  11222. this.stat_min = this.serie[0];
  11223. for (i = 0; i < this.pop(); i++) {
  11224. if (this.serie[i] < this.stat_min) {
  11225. this.stat_min = this.serie[i];
  11226. }
  11227. }
  11228. return this.stat_min;
  11229. };
  11230. /** return max value */
  11231. this.max = function() {
  11232. if (this._nodata())
  11233. return;
  11234. this.stat_max = this.serie[0];
  11235. for (i = 0; i < this.pop(); i++) {
  11236. if (this.serie[i] > this.stat_max) {
  11237. this.stat_max = this.serie[i];
  11238. }
  11239. }
  11240. return this.stat_max;
  11241. };
  11242. /** return sum value */
  11243. this.sum = function() {
  11244. if (this._nodata())
  11245. return;
  11246. if (this.stat_sum == null) {
  11247. this.stat_sum = 0;
  11248. for (i = 0; i < this.pop(); i++) {
  11249. this.stat_sum += parseFloat(this.serie[i]);
  11250. }
  11251. }
  11252. return this.stat_sum;
  11253. };
  11254. /** return population number */
  11255. this.pop = function() {
  11256. if (this._nodata())
  11257. return;
  11258. if (this.stat_pop == null) {
  11259. this.stat_pop = this.serie.length;
  11260. }
  11261. return this.stat_pop;
  11262. };
  11263. /** return mean value */
  11264. this.mean = function() {
  11265. if (this._nodata())
  11266. return;
  11267. if (this.stat_mean == null) {
  11268. this.stat_mean = parseFloat(this.sum() / this.pop());
  11269. }
  11270. return this.stat_mean;
  11271. };
  11272. /** return median value */
  11273. this.median = function() {
  11274. if (this._nodata())
  11275. return;
  11276. if (this.stat_median == null) {
  11277. this.stat_median = 0;
  11278. var tmp = this.sorted();
  11279. // serie pop is odd
  11280. if (tmp.length % 2) {
  11281. this.stat_median = parseFloat(tmp[(Math.ceil(tmp.length / 2) - 1)]);
  11282. // serie pop is even
  11283. } else {
  11284. this.stat_median = ( parseFloat(tmp[((tmp.length / 2) - 1)]) + parseFloat(tmp[(tmp.length / 2)]) ) / 2;
  11285. }
  11286. }
  11287. return this.stat_median;
  11288. };
  11289. /** return variance value */
  11290. this.variance = function() {
  11291. round = (typeof round === "undefined") ? true : false;
  11292. if (this._nodata())
  11293. return;
  11294. if (this.stat_variance == null) {
  11295. var tmp = 0, serie_mean = this.mean();
  11296. for (var i = 0; i < this.pop(); i++) {
  11297. tmp += Math.pow( (this.serie[i] - serie_mean), 2 );
  11298. }
  11299. this.stat_variance = tmp / this.pop();
  11300. if(round == true) {
  11301. this.stat_variance = Math.round(this.stat_variance * Math.pow(10,this.roundlength) )/ Math.pow(10,this.roundlength);
  11302. }
  11303. }
  11304. return this.stat_variance;
  11305. };
  11306. /** return standard deviation value */
  11307. this.stddev = function(round) {
  11308. round = (typeof round === "undefined") ? true : false;
  11309. if (this._nodata())
  11310. return;
  11311. if (this.stat_stddev == null) {
  11312. this.stat_stddev = Math.sqrt(this.variance());
  11313. if(round == true) {
  11314. this.stat_stddev = Math.round(this.stat_stddev * Math.pow(10,this.roundlength) )/ Math.pow(10,this.roundlength);
  11315. }
  11316. }
  11317. return this.stat_stddev;
  11318. };
  11319. /** coefficient of variation - measure of dispersion */
  11320. this.cov = function(round) {
  11321. round = (typeof round === "undefined") ? true : false;
  11322. if (this._nodata())
  11323. return;
  11324. if (this.stat_cov == null) {
  11325. this.stat_cov = this.stddev() / this.mean();
  11326. if(round == true) {
  11327. this.stat_cov = Math.round(this.stat_cov * Math.pow(10,this.roundlength) )/ Math.pow(10,this.roundlength);
  11328. }
  11329. }
  11330. return this.stat_cov;
  11331. };
  11332. /** reset all attributes after setting a new serie */
  11333. this.resetStatistics = function() {
  11334. this.stat_sorted = null;
  11335. this.stat_mean = null;
  11336. this.stat_median = null;
  11337. this.stat_sum = null;
  11338. this.stat_max = null;
  11339. this.stat_min = null;
  11340. this.stat_pop = null;
  11341. this.stat_variance = null;
  11342. this.stat_stddev = null;
  11343. this.stat_cov = null;
  11344. }
  11345. /** data test */
  11346. this._nodata = function() {
  11347. if (this.serie.length == 0) {
  11348. if(this.silent) this.log("[silent mode] Error. You should first enter a serie!", true);
  11349. else throw new TypeError("Error. You should first enter a serie!");
  11350. return 1;
  11351. } else
  11352. return 0;
  11353. };
  11354. /** check if the serie contains negative value */
  11355. this._hasNegativeValue = function() {
  11356. for (i = 0; i < this.serie.length; i++) {
  11357. if(this.serie[i] < 0)
  11358. return true;
  11359. }
  11360. return false;
  11361. };
  11362. /** check if the serie contains zero value */
  11363. this._hasZeroValue = function() {
  11364. for (i = 0; i < this.serie.length; i++) {
  11365. if(parseFloat(this.serie[i]) === 0)
  11366. return true;
  11367. }
  11368. return false;
  11369. };
  11370. /** return sorted values (as array) */
  11371. this.sorted = function() {
  11372. if (this.stat_sorted == null) {
  11373. if(this.is_uniqueValues == false) {
  11374. this.stat_sorted = this.serie.sort(function(a, b) {
  11375. return a - b;
  11376. });
  11377. } else {
  11378. this.stat_sorted = this.serie.sort(function(a,b){
  11379. var nameA=a.toString().toLowerCase(), nameB=b.toString().toLowerCase();
  11380. if(nameA < nameB) return -1;
  11381. if(nameA > nameB) return 1;
  11382. return 0;
  11383. })
  11384. }
  11385. }
  11386. return this.stat_sorted;
  11387. };
  11388. /** return all info */
  11389. this.info = function() {
  11390. if (this._nodata())
  11391. return;
  11392. var content = '';
  11393. content += _t('Population') + ' : ' + this.pop() + ' - [' + _t('Min')
  11394. + ' : ' + this.min() + ' | ' + _t('Max') + ' : ' + this.max()
  11395. + ']' + "\n";
  11396. content += _t('Mean') + ' : ' + this.mean() + ' - ' + _t('Median') + ' : ' + this.median() + "\n";
  11397. content += _t('Variance') + ' : ' + this.variance() + ' - ' + _t('Standard deviation') + ' : ' + this.stddev()
  11398. + ' - ' + _t('Coefficient of variation') + ' : ' + this.cov() + "\n";
  11399. return content;
  11400. };
  11401. /**
  11402. * Set Manual classification Return an array with bounds : ie array(0,
  11403. * 0.75, 1.5, 2.25, 3);
  11404. * Set ranges and prepare data for displaying legend
  11405. *
  11406. */
  11407. this.setClassManually = function(array) {
  11408. if (this._nodata())
  11409. return;
  11410. if(array[0] !== this.min() || array[array.length-1] !== this.max()) {
  11411. 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);
  11412. else throw new TypeError(_t('Given bounds may not be correct! please check your input.\nMin value : ' + this.min() + ' / Max value : ' + this.max()));
  11413. return;
  11414. }
  11415. this.setBounds(array);
  11416. this.setRanges();
  11417. // we specify the classification method
  11418. this.method = _t('manual classification') + ' (' + (array.length -1) + ' ' + _t('classes') + ')';
  11419. return this.bounds;
  11420. };
  11421. /**
  11422. * Equal intervals classification Return an array with bounds : ie array(0,
  11423. * 0.75, 1.5, 2.25, 3);
  11424. */
  11425. this.getClassEqInterval = function(nbClass, forceMin, forceMax) {
  11426. if (this._nodata())
  11427. return;
  11428. var tmpMin = (typeof forceMin === "undefined") ? this.min() : forceMin;
  11429. var tmpMax = (typeof forceMax === "undefined") ? this.max() : forceMax;
  11430. var a = Array();
  11431. var val = tmpMin;
  11432. var interval = (tmpMax - tmpMin) / nbClass;
  11433. for (i = 0; i <= nbClass; i++) {
  11434. a[i] = val;
  11435. val += interval;
  11436. }
  11437. //-> Fix last bound to Max of values
  11438. a[nbClass] = tmpMax;
  11439. this.setBounds(a);
  11440. this.setRanges();
  11441. // we specify the classification method
  11442. this.method = _t('eq. intervals') + ' (' + nbClass + ' ' + _t('classes') + ')';
  11443. return this.bounds;
  11444. };
  11445. this.getQuantiles = function(nbClass) {
  11446. var tmp = this.sorted();
  11447. var quantiles = [];
  11448. var step = this.pop() / nbClass;
  11449. for (var i = 1; i < nbClass; i++) {
  11450. var qidx = Math.round(i*step+0.49);
  11451. quantiles.push(tmp[qidx-1]); // zero-based
  11452. }
  11453. return quantiles;
  11454. };
  11455. /**
  11456. * Quantile classification Return an array with bounds : ie array(0, 0.75,
  11457. * 1.5, 2.25, 3);
  11458. */
  11459. this.getClassQuantile = function(nbClass) {
  11460. if (this._nodata())
  11461. return;
  11462. var tmp = this.sorted();
  11463. var bounds = this.getQuantiles(nbClass);
  11464. bounds.unshift(tmp[0]);
  11465. if (bounds[tmp.length - 1] !== tmp[tmp.length - 1])
  11466. bounds.push(tmp[tmp.length - 1]);
  11467. this.setBounds(bounds);
  11468. this.setRanges();
  11469. // we specify the classification method
  11470. this.method = _t('quantile') + ' (' + nbClass + ' ' + _t('classes') + ')';
  11471. return this.bounds;
  11472. };
  11473. /**
  11474. * Standard Deviation classification
  11475. * Return an array with bounds : ie array(0,
  11476. * 0.75, 1.5, 2.25, 3);
  11477. */
  11478. this.getClassStdDeviation = function(nbClass, matchBounds) {
  11479. if (this._nodata())
  11480. return;
  11481. var tmpMax = this.max();
  11482. var tmpMin = this.min();
  11483. var a = Array();
  11484. // number of classes is odd
  11485. if(nbClass % 2 == 1) {
  11486. // Euclidean division to get the inferior bound
  11487. var infBound = Math.floor(nbClass / 2);
  11488. var supBound = infBound + 1;
  11489. // we set the central bounds
  11490. a[infBound] = this.mean() - ( this.stddev() / 2);
  11491. a[supBound] = this.mean() + ( this.stddev() / 2);
  11492. // Values < to infBound, except first one
  11493. for (i = infBound - 1; i > 0; i--) {
  11494. var val = a[i+1] - this.stddev();
  11495. a[i] = val;
  11496. }
  11497. // Values > to supBound, except last one
  11498. for (i = supBound + 1; i < nbClass; i++) {
  11499. var val = a[i-1] + this.stddev();
  11500. a[i] = val;
  11501. }
  11502. // number of classes is even
  11503. } else {
  11504. var meanBound = nbClass / 2;
  11505. // we get the mean value
  11506. a[meanBound] = this.mean();
  11507. // Values < to the mean, except first one
  11508. for (i = meanBound - 1; i > 0; i--) {
  11509. var val = a[i+1] - this.stddev();
  11510. a[i] = val;
  11511. }
  11512. // Values > to the mean, except last one
  11513. for (i = meanBound + 1; i < nbClass; i++) {
  11514. var val = a[i-1] + this.stddev();
  11515. a[i] = val;
  11516. }
  11517. }
  11518. // we finally set the first value
  11519. // do we excatly match min value or not ?
  11520. a[0] = (typeof matchBounds === "undefined") ? a[1]-this.stddev() : this.min();
  11521. // we finally set the last value
  11522. // do we excatly match max value or not ?
  11523. a[nbClass] = (typeof matchBounds === "undefined") ? a[nbClass-1]+this.stddev() : this.max();
  11524. this.setBounds(a);
  11525. this.setRanges();
  11526. // we specify the classification method
  11527. this.method = _t('std deviation') + ' (' + nbClass + ' ' + _t('classes')+ ')';
  11528. return this.bounds;
  11529. };
  11530. /**
  11531. * Geometric Progression classification
  11532. * http://en.wikipedia.org/wiki/Geometric_progression
  11533. * Return an array with bounds : ie array(0,
  11534. * 0.75, 1.5, 2.25, 3);
  11535. */
  11536. this.getClassGeometricProgression = function(nbClass) {
  11537. if (this._nodata())
  11538. return;
  11539. if(this._hasNegativeValue() || this._hasZeroValue()) {
  11540. if(this.silent) this.log("[silent mode] " + _t('geometric progression can\'t be applied with a serie containing negative or zero values.'), true);
  11541. else throw new TypeError(_t('geometric progression can\'t be applied with a serie containing negative or zero values.'));
  11542. return;
  11543. }
  11544. var a = Array();
  11545. var tmpMin = this.min();
  11546. var tmpMax = this.max();
  11547. var logMax = Math.log(tmpMax) / Math.LN10; // max decimal logarithm (or base 10)
  11548. var logMin = Math.log(tmpMin) / Math.LN10;; // min decimal logarithm (or base 10)
  11549. var interval = (logMax - logMin) / nbClass;
  11550. // we compute log bounds
  11551. for (i = 0; i < nbClass; i++) {
  11552. if(i == 0) {
  11553. a[i] = logMin;
  11554. } else {
  11555. a[i] = a[i-1] + interval;
  11556. }
  11557. }
  11558. // we compute antilog
  11559. a = a.map(function(x) { return Math.pow(10, x); });
  11560. // and we finally add max value
  11561. a.push(this.max());
  11562. this.setBounds(a);
  11563. this.setRanges();
  11564. // we specify the classification method
  11565. this.method = _t('geometric progression') + ' (' + nbClass + ' ' + _t('classes') + ')';
  11566. return this.bounds;
  11567. };
  11568. /**
  11569. * Arithmetic Progression classification
  11570. * http://en.wikipedia.org/wiki/Arithmetic_progression
  11571. * Return an array with bounds : ie array(0,
  11572. * 0.75, 1.5, 2.25, 3);
  11573. */
  11574. this.getClassArithmeticProgression = function(nbClass) {
  11575. if (this._nodata())
  11576. return;
  11577. var denominator = 0;
  11578. // we compute the (french) "Raison"
  11579. for (i = 1; i <= nbClass; i++) {
  11580. denominator += i;
  11581. }
  11582. var a = Array();
  11583. var tmpMin = this.min();
  11584. var tmpMax = this.max();
  11585. var interval = (tmpMax - tmpMin) / denominator;
  11586. for (i = 0; i <= nbClass; i++) {
  11587. if(i == 0) {
  11588. a[i] = tmpMin;
  11589. } else {
  11590. a[i] = a[i-1] + (i * interval);
  11591. }
  11592. }
  11593. this.setBounds(a);
  11594. this.setRanges();
  11595. // we specify the classification method
  11596. this.method = _t('arithmetic progression') + ' (' + nbClass + ' ' + _t('classes') + ')';
  11597. return this.bounds;
  11598. };
  11599. /**
  11600. * Credits : Doug Curl (javascript) and Daniel J Lewis (python implementation)
  11601. * http://www.arcgis.com/home/item.html?id=0b633ff2f40d412995b8be377211c47b
  11602. * http://danieljlewis.org/2010/06/07/jenks-natural-breaks-algorithm-in-python/
  11603. */
  11604. this.getClassJenks = function(nbClass) {
  11605. if (this._nodata())
  11606. return;
  11607. dataList = this.sorted();
  11608. // now iterate through the datalist:
  11609. // determine mat1 and mat2
  11610. // really not sure how these 2 different arrays are set - the code for
  11611. // each seems the same!
  11612. // but the effect are 2 different arrays: mat1 and mat2
  11613. var mat1 = []
  11614. for ( var x = 0, xl = dataList.length + 1; x < xl; x++) {
  11615. var temp = []
  11616. for ( var j = 0, jl = nbClass + 1; j < jl; j++) {
  11617. temp.push(0)
  11618. }
  11619. mat1.push(temp)
  11620. }
  11621. var mat2 = []
  11622. for ( var i = 0, il = dataList.length + 1; i < il; i++) {
  11623. var temp2 = []
  11624. for ( var c = 0, cl = nbClass + 1; c < cl; c++) {
  11625. temp2.push(0)
  11626. }
  11627. mat2.push(temp2)
  11628. }
  11629. // absolutely no idea what this does - best I can tell, it sets the 1st
  11630. // group in the
  11631. // mat1 and mat2 arrays to 1 and 0 respectively
  11632. for ( var y = 1, yl = nbClass + 1; y < yl; y++) {
  11633. mat1[0][y] = 1
  11634. mat2[0][y] = 0
  11635. for ( var t = 1, tl = dataList.length + 1; t < tl; t++) {
  11636. mat2[t][y] = Infinity
  11637. }
  11638. var v = 0.0
  11639. }
  11640. // and this part - I'm a little clueless on - but it works
  11641. // pretty sure it iterates across the entire dataset and compares each
  11642. // value to
  11643. // one another to and adjust the indices until you meet the rules:
  11644. // minimum deviation
  11645. // within a class and maximum separation between classes
  11646. for ( var l = 2, ll = dataList.length + 1; l < ll; l++) {
  11647. var s1 = 0.0
  11648. var s2 = 0.0
  11649. var w = 0.0
  11650. for ( var m = 1, ml = l + 1; m < ml; m++) {
  11651. var i3 = l - m + 1
  11652. var val = parseFloat(dataList[i3 - 1])
  11653. s2 += val * val
  11654. s1 += val
  11655. w += 1
  11656. v = s2 - (s1 * s1) / w
  11657. var i4 = i3 - 1
  11658. if (i4 != 0) {
  11659. for ( var p = 2, pl = nbClass + 1; p < pl; p++) {
  11660. if (mat2[l][p] >= (v + mat2[i4][p - 1])) {
  11661. mat1[l][p] = i3
  11662. mat2[l][p] = v + mat2[i4][p - 1]
  11663. }
  11664. }
  11665. }
  11666. }
  11667. mat1[l][1] = 1
  11668. mat2[l][1] = v
  11669. }
  11670. var k = dataList.length
  11671. var kclass = []
  11672. // fill the kclass (classification) array with zeros:
  11673. for (i = 0; i <= nbClass; i++) {
  11674. kclass.push(0);
  11675. }
  11676. // this is the last number in the array:
  11677. kclass[nbClass] = parseFloat(dataList[dataList.length - 1])
  11678. // this is the first number - can set to zero, but want to set to lowest
  11679. // to use for legend:
  11680. kclass[0] = parseFloat(dataList[0])
  11681. var countNum = nbClass
  11682. while (countNum >= 2) {
  11683. var id = parseInt((mat1[k][countNum]) - 2)
  11684. kclass[countNum - 1] = dataList[id]
  11685. k = parseInt((mat1[k][countNum] - 1))
  11686. // spits out the rank and value of the break values:
  11687. // console.log("id="+id,"rank = " + String(mat1[k][countNum]),"val =
  11688. // " + String(dataList[id]))
  11689. // count down:
  11690. countNum -= 1
  11691. }
  11692. // check to see if the 0 and 1 in the array are the same - if so, set 0
  11693. // to 0:
  11694. if (kclass[0] == kclass[1]) {
  11695. kclass[0] = 0
  11696. }
  11697. this.setBounds(kclass);
  11698. this.setRanges();
  11699. this.method = _t('Jenks') + ' (' + nbClass + ' ' + _t('classes') + ')';
  11700. return this.bounds; //array of breaks
  11701. }
  11702. /**
  11703. * Quantile classification Return an array with bounds : ie array(0, 0.75,
  11704. * 1.5, 2.25, 3);
  11705. */
  11706. this.getClassUniqueValues = function() {
  11707. if (this._nodata())
  11708. return;
  11709. this.is_uniqueValues = true;
  11710. var tmp = this.sorted(); // display in alphabetical order
  11711. var a = Array();
  11712. for (i = 0; i < this.pop(); i++) {
  11713. if(a.indexOf(tmp[i]) === -1)
  11714. a.push(tmp[i]);
  11715. }
  11716. this.bounds = a;
  11717. // we specify the classification method
  11718. this.method = _t('unique values');
  11719. return a;
  11720. };
  11721. /**
  11722. * Return the class of a given value.
  11723. * For example value : 6
  11724. * and bounds array = (0, 4, 8, 12);
  11725. * Return 2
  11726. */
  11727. this.getClass = function(value) {
  11728. for(i = 0; i < this.bounds.length; i++) {
  11729. if(this.is_uniqueValues == true) {
  11730. if(value == this.bounds[i])
  11731. return i;
  11732. } else {
  11733. // parseFloat() is necessary
  11734. if(parseFloat(value) <= this.bounds[i + 1]) {
  11735. return i;
  11736. }
  11737. }
  11738. }
  11739. return _t("Unable to get value's class.");
  11740. };
  11741. /**
  11742. * Return the ranges array : array('0-0.75', '0.75-1.5', '1.5-2.25',
  11743. * '2.25-3');
  11744. */
  11745. this.getRanges = function() {
  11746. return this.ranges;
  11747. };
  11748. /**
  11749. * Returns the number/index of this.ranges that value falls into
  11750. */
  11751. this.getRangeNum = function(value) {
  11752. var bounds, i;
  11753. for (i = 0; i < this.ranges.length; i++) {
  11754. bounds = this.ranges[i].split(/ - /);
  11755. if (value <= parseFloat(bounds[1])) {
  11756. return i;
  11757. }
  11758. }
  11759. }
  11760. /*
  11761. * Compute inner ranges based on serie.
  11762. * Produce discontinous ranges used for legend - return an array similar to :
  11763. * array('0.00-0.74', '0.98-1.52', '1.78-2.25', '2.99-3.14');
  11764. * If inner ranges already computed, return array values.
  11765. */
  11766. this.getInnerRanges = function() {
  11767. // if already computed, we return the result
  11768. if(this.inner_ranges != null)
  11769. return this.inner_ranges;
  11770. var a = new Array();
  11771. var tmp = this.sorted();
  11772. var cnt = 1; // bounds array counter
  11773. for (i = 0; i < tmp.length; i++) {
  11774. if(i == 0) var range_firstvalue = tmp[i]; // we init first range value
  11775. if(parseFloat(tmp[i]) > parseFloat(this.bounds[cnt])) {
  11776. a[cnt - 1] = '' + range_firstvalue + this.separator + tmp[i-1];
  11777. var range_firstvalue = tmp[i];
  11778. cnt++;
  11779. }
  11780. // we reach the last range, we finally complete manually
  11781. // and return the array
  11782. if(cnt == (this.bounds.length - 1)) {
  11783. // we set the last value
  11784. a[cnt - 1] = '' + range_firstvalue + this.separator + tmp[tmp.length-1];
  11785. this.inner_ranges = a;
  11786. return this.inner_ranges;
  11787. }
  11788. }
  11789. };
  11790. this.getSortedlist = function() {
  11791. return this.sorted().join(', ');
  11792. };
  11793. /**
  11794. * Return an html legend
  11795. * colors : specify an array of color (hexadecimal values)
  11796. * legend : specify a text input for the legend. By default, just displays 'legend'
  11797. * counter : if not null, display counter value
  11798. * callback : if not null, callback function applied on legend boundaries
  11799. * mode : null, 'default', 'distinct', 'discontinuous' :
  11800. * - if mode is null, will display legend as 'default mode'
  11801. * - 'default' : displays ranges like in ranges array (continuous values), sample : 29.26 - 378.80 / 378.80 - 2762.25 / 2762.25 - 6884.84
  11802. * - '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
  11803. * - '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
  11804. * order : null, 'ASC', 'DESC'
  11805. */
  11806. this.getHtmlLegend = function(colors, legend, counter, callback, mode, order) {
  11807. var cnt= '';
  11808. var elements = new Array();
  11809. this.doCount(); // we do count, even if not displayed
  11810. if(colors != null) {
  11811. ccolors = colors;
  11812. }
  11813. else {
  11814. ccolors = this.colors;
  11815. }
  11816. if(legend != null) {
  11817. lg = legend;
  11818. }
  11819. else {
  11820. lg = 'Legend';
  11821. }
  11822. if(counter != null) {
  11823. getcounter = true;
  11824. }
  11825. else {
  11826. getcounter = false;
  11827. }
  11828. if(callback != null) {
  11829. fn = callback;
  11830. }
  11831. else {
  11832. fn = function(o) {return o;};
  11833. }
  11834. if(mode == null) {
  11835. mode = 'default';
  11836. }
  11837. if(mode == 'discontinuous') {
  11838. this.getInnerRanges();
  11839. // check if some classes are not populated / equivalent of in_array function
  11840. if(this.counter.indexOf(0) !== -1) {
  11841. 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);
  11842. 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!"));
  11843. return;
  11844. }
  11845. }
  11846. if(order !== 'DESC') order = 'ASC';
  11847. if(ccolors.length < this.ranges.length) {
  11848. if(this.silent) this.log("[silent mode] " + _t('The number of colors should fit the number of ranges. Exit!'), true);
  11849. else throw new TypeError(_t('The number of colors should fit the number of ranges. Exit!'));
  11850. return;
  11851. }
  11852. if(this.is_uniqueValues == false) {
  11853. for (i = 0; i < (this.ranges.length); i++) {
  11854. if(getcounter===true) {
  11855. cnt = ' <span class="geostats-legend-counter">(' + this.counter[i] + ')</span>';
  11856. }
  11857. //console.log("Ranges : " + this.ranges[i]);
  11858. // default mode
  11859. var tmp = this.ranges[i].split(this.separator);
  11860. var start_value = parseFloat(tmp[0]).toFixed(this.precision);
  11861. var end_value = parseFloat(tmp[1]).toFixed(this.precision);
  11862. // if mode == 'distinct' and we are not working on the first value
  11863. if(mode == 'distinct' && i != 0) {
  11864. if(isInt(start_value)) {
  11865. start_value = parseInt(start_value) + 1;
  11866. // format to float if necessary
  11867. if(this.precisionflag == 'manual' && this.precision != 0) start_value = parseFloat(start_value).toFixed(this.precision);
  11868. } else {
  11869. start_value = parseFloat(start_value) + (1 / Math.pow(10,this.precision));
  11870. // strangely the formula above return sometimes long decimal values,
  11871. // the following instruction fix it
  11872. start_value = parseFloat(start_value).toFixed(this.precision);
  11873. }
  11874. }
  11875. // if mode == 'discontinuous'
  11876. if(mode == 'discontinuous') {
  11877. var tmp = this.inner_ranges[i].split(this.separator);
  11878. // console.log("Ranges : " + this.inner_ranges[i]);
  11879. var start_value = parseFloat(tmp[0]).toFixed(this.precision);
  11880. var end_value = parseFloat(tmp[1]).toFixed(this.precision);
  11881. }
  11882. // we apply callback function
  11883. var el = fn(start_value) + this.legendSeparator + fn(end_value);
  11884. var block = '<div><div class="geostats-legend-block" style="background-color:' + ccolors[i] + '"></div> ' + el + cnt + '</div>';
  11885. elements.push(block);
  11886. }
  11887. } else {
  11888. // only if classification is done on unique values
  11889. for (i = 0; i < (this.bounds.length); i++) {
  11890. if(getcounter===true) {
  11891. cnt = ' <span class="geostats-legend-counter">(' + this.counter[i] + ')</span>';
  11892. }
  11893. var el = fn(this.bounds[i]);
  11894. var block = '<div><div class="geostats-legend-block" style="background-color:' + ccolors[i] + '"></div> ' + el + cnt + '</div>';
  11895. elements.push(block);
  11896. }
  11897. }
  11898. // do we reverse the return legend ?
  11899. if(order === 'DESC') elements.reverse();
  11900. // finally we create HTML and return it
  11901. var content = '<div class="geostats-legend"><div class="geostats-legend-title">' + _t(lg) + '</div>';
  11902. for (i = 0; i < (elements.length); i++) {
  11903. content += elements[i];
  11904. }
  11905. content += '</div>';
  11906. return content;
  11907. };
  11908. // object constructor
  11909. // At the end of script. If not setPrecision() method is not known
  11910. // we create an object identifier for debugging
  11911. this.objectID = new Date().getUTCMilliseconds();
  11912. this.log('Creating new geostats object');
  11913. if(typeof a !== 'undefined' && a.length > 0) {
  11914. this.serie = a;
  11915. this.setPrecision();
  11916. this.log('Setting serie (' + a.length + ') : ' + a.join());
  11917. } else {
  11918. this.serie = Array();
  11919. };
  11920. // creating aliases on classification function for backward compatibility
  11921. this.getJenks = this.getClassJenks;
  11922. this.getGeometricProgression = this.getClassGeometricProgression;
  11923. this.getEqInterval = this.getClassEqInterval;
  11924. this.getQuantile = this.getClassQuantile;
  11925. this.getStdDeviation = this.getClassStdDeviation;
  11926. this.getUniqueValues = this.getClassUniqueValues;
  11927. this.getArithmeticProgression = this.getClassArithmeticProgression;
  11928. };
  11929. window.geostats = geostats;
  11930. return geostats;
  11931. });
  11932. /***/ }),
  11933. /***/ "4066":
  11934. /***/ (function(module, exports, __webpack_require__) {
  11935. var arrayWithoutHoles = __webpack_require__("d372");
  11936. var iterableToArray = __webpack_require__("4fe1");
  11937. var nonIterableSpread = __webpack_require__("1e44");
  11938. function _toConsumableArray(arr) {
  11939. return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread();
  11940. }
  11941. module.exports = _toConsumableArray;
  11942. /***/ }),
  11943. /***/ "4156":
  11944. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  11945. "use strict";
  11946. __webpack_require__.r(__webpack_exports__);
  11947. /* harmony import */ var _CountTo_vue_vue_type_template_id_c61b74f4___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("77c4");
  11948. /* harmony import */ var _CountTo_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("f14a");
  11949. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _CountTo_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _CountTo_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  11950. /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b429");
  11951. /* normalize component */
  11952. var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
  11953. _CountTo_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
  11954. _CountTo_vue_vue_type_template_id_c61b74f4___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
  11955. _CountTo_vue_vue_type_template_id_c61b74f4___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
  11956. false,
  11957. null,
  11958. null,
  11959. null
  11960. )
  11961. /* harmony default export */ __webpack_exports__["default"] = (component.exports);
  11962. /***/ }),
  11963. /***/ "4366":
  11964. /***/ (function(module, exports, __webpack_require__) {
  11965. module.exports = __webpack_require__("bbe9").Transform
  11966. /***/ }),
  11967. /***/ "4552":
  11968. /***/ (function(module, exports, __webpack_require__) {
  11969. "use strict";
  11970. /* WEBPACK VAR INJECTION */(function(global) {
  11971. var _interopRequireDefault = __webpack_require__("8e6d");
  11972. var _slicedToArray2 = _interopRequireDefault(__webpack_require__("5e4c"));
  11973. /*jshint esversion: 6 */
  11974. function colorcolor(color) {
  11975. var newColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "rgba";
  11976. var calculateOpacity = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  11977. color = color.toLowerCase();
  11978. newColor = newColor.toLowerCase();
  11979. var returnedColor = color;
  11980. var namedColor = __webpack_require__("8afa");
  11981. var r, g, b, a;
  11982. var roundTo = 4;
  11983. var colorDefinitions = {
  11984. rgb: {
  11985. re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,
  11986. example: ["rgb(123, 234, 45)", "rgb(255,234,245)"],
  11987. toRGBA: function toRGBA(bits) {
  11988. return [parseInt(bits[1], 10), parseInt(bits[2], 10), parseInt(bits[3], 10), 1];
  11989. }
  11990. },
  11991. rgba: {
  11992. re: /^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d+(?:\.\d+)?|\.\d+)\s*\)/,
  11993. example: ["rgba(123, 234, 45, 1)", "rgba(255,234,245, 0.5)"],
  11994. toRGBA: function toRGBA(bits) {
  11995. return [parseInt(bits[1], 10), parseInt(bits[2], 10), parseInt(bits[3], 10), parseFloat(bits[4])];
  11996. }
  11997. },
  11998. hex: {
  11999. re: /^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
  12000. example: ["00ff00", "336699"],
  12001. toRGBA: function toRGBA(bits) {
  12002. return [parseInt(bits[1], 16), parseInt(bits[2], 16), parseInt(bits[3], 16), 1];
  12003. }
  12004. },
  12005. hex3: {
  12006. re: /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  12007. example: ["fb0", "f0f"],
  12008. toRGBA: function toRGBA(bits) {
  12009. return [parseInt(bits[1] + bits[1], 16), parseInt(bits[2] + bits[2], 16), parseInt(bits[3] + bits[3], 16), 1];
  12010. }
  12011. },
  12012. hexa: {
  12013. re: /^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
  12014. example: ["00ff00ff", "336699a0"],
  12015. toRGBA: function toRGBA(bits) {
  12016. return [parseInt(bits[1], 16), parseInt(bits[2], 16), parseInt(bits[3], 16), parseInt(bits[4], 16) / 255];
  12017. }
  12018. },
  12019. hex4a: {
  12020. re: /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  12021. example: ["fb0f", "f0f8"],
  12022. toRGBA: function toRGBA(bits) {
  12023. 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];
  12024. }
  12025. },
  12026. hsl: {
  12027. re: /^hsl\((\d{1,3}),\s*(\d{1,3})%,\s*(\d{1,3})%\)$/,
  12028. example: ["hsl(120, 100%, 25%)", "hsl(0, 100%, 50%)"],
  12029. toRGBA: function toRGBA(bits) {
  12030. bits[4] = 1;
  12031. var rgba = hslToRgb(bits);
  12032. return [rgba.r, rgba.g, rgba.b, rgba.a];
  12033. }
  12034. },
  12035. hsla: {
  12036. re: /^hsla\((\d{1,3}),\s*(\d{1,3})%,\s*(\d{1,3})%,\s*(\d+(?:\.\d+)?|\.\d+)\s*\)/,
  12037. example: ["hsla(120, 100%, 25%, 1)", "hsla(0, 100%, 50%, 0.5)"],
  12038. toRGBA: function toRGBA(bits) {
  12039. var rgba = hslToRgb(bits);
  12040. return [rgba.r, rgba.g, rgba.b, rgba.a];
  12041. }
  12042. },
  12043. hsv: {
  12044. re: /^hsv\((\d{1,3}),\s*(\d{1,3})%,\s*(\d{1,3})%\)$/,
  12045. example: ["hsv(120, 100%, 25%)", "hsv(0, 100%, 50%)"],
  12046. toRGBA: function toRGBA(bits) {
  12047. var rgb = hsvToRgb(bits);
  12048. return [rgb.r, rgb.g, rgb.b, 1];
  12049. }
  12050. },
  12051. hsb: {
  12052. re: /^hsb\((\d{1,3}),\s*(\d{1,3})%,\s*(\d{1,3})%\)$/,
  12053. example: ["hsb(120, 100%, 25%)", "hsb(0, 100%, 50%)"],
  12054. toRGBA: function toRGBA(bits) {
  12055. var rgb = hsvToRgb(bits);
  12056. return [rgb.r, rgb.g, rgb.b, 1];
  12057. }
  12058. }
  12059. }; // If this is a named color, convert it to hex
  12060. if (namedColor.hasOwnProperty(color)) {
  12061. color = namedColor[color];
  12062. color.forEach(function (piece, index) {
  12063. "use strict";
  12064. color[index] = ("0" + piece.toString(16)).slice(-2);
  12065. });
  12066. color = "#" + color.join('');
  12067. } // Search the color definitions for a match
  12068. for (var colorDefinition in colorDefinitions) {
  12069. var re = colorDefinitions[colorDefinition].re;
  12070. var processor = colorDefinitions[colorDefinition].toRGBA;
  12071. var bits = re.exec(color);
  12072. if (bits) {
  12073. var channels = processor(bits);
  12074. r = channels[0];
  12075. g = channels[1];
  12076. b = channels[2];
  12077. a = +(Math.round(channels[3] + ("e+" + roundTo)) + ("e-" + roundTo));
  12078. }
  12079. }
  12080. r = Math.round(r < 0 || isNaN(r) ? 0 : r > 255 ? 255 : r);
  12081. g = Math.round(g < 0 || isNaN(g) ? 0 : g > 255 ? 255 : g);
  12082. b = Math.round(b < 0 || isNaN(b) ? 0 : b > 255 ? 255 : b);
  12083. a = a < 0 || isNaN(a) ? 0 : a > 1 ? 1 : a;
  12084. switch (newColor) {
  12085. case "hex":
  12086. returnedColor = "#" + ("0" + r.toString(16)).slice(-2) + ("0" + g.toString(16)).slice(-2) + ("0" + b.toString(16)).slice(-2);
  12087. break;
  12088. case "hexa":
  12089. if (calculateOpacity) {
  12090. var _calculateOpacityFrom = calculateOpacityFromWhite(r, g, b, a);
  12091. var _calculateOpacityFrom2 = (0, _slicedToArray2.default)(_calculateOpacityFrom, 4);
  12092. r = _calculateOpacityFrom2[0];
  12093. g = _calculateOpacityFrom2[1];
  12094. b = _calculateOpacityFrom2[2];
  12095. a = _calculateOpacityFrom2[3];
  12096. }
  12097. 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);
  12098. break;
  12099. case "hsl":
  12100. var hsl = rgbToHsl({
  12101. "r": r,
  12102. "g": g,
  12103. "b": b
  12104. });
  12105. returnedColor = "hsl(".concat(hsl.h, ",").concat(hsl.s, "%,").concat(hsl.l, "%)");
  12106. break;
  12107. case "hsla":
  12108. if (calculateOpacity) {
  12109. var _calculateOpacityFrom3 = calculateOpacityFromWhite(r, g, b, a);
  12110. var _calculateOpacityFrom4 = (0, _slicedToArray2.default)(_calculateOpacityFrom3, 4);
  12111. r = _calculateOpacityFrom4[0];
  12112. g = _calculateOpacityFrom4[1];
  12113. b = _calculateOpacityFrom4[2];
  12114. a = _calculateOpacityFrom4[3];
  12115. }
  12116. var hsla = rgbToHsl({
  12117. "r": r,
  12118. "g": g,
  12119. "b": b,
  12120. "a": a
  12121. });
  12122. returnedColor = "hsla(".concat(hsla.h, ",").concat(hsla.s, "%,").concat(hsla.l, "%,").concat(hsla.a, ")");
  12123. break;
  12124. case "hsb":
  12125. /* Same as `hsv` */
  12126. var hsb = rgbToHsv({
  12127. "r": r,
  12128. "g": g,
  12129. "b": b
  12130. });
  12131. returnedColor = "hsb(".concat(hsb.h, ",").concat(hsb.s, "%,").concat(hsb.v, "%)");
  12132. break;
  12133. case "hsv":
  12134. var hsv = rgbToHsv({
  12135. "r": r,
  12136. "g": g,
  12137. "b": b
  12138. });
  12139. returnedColor = "hsv(".concat(hsv.h, ",").concat(hsv.s, "%,").concat(hsv.v, "%)");
  12140. break;
  12141. case "rgb":
  12142. returnedColor = "rgb(".concat(r, ",").concat(g, ",").concat(b, ")");
  12143. break;
  12144. case "rgba":
  12145. /* falls through */
  12146. default:
  12147. if (calculateOpacity) {
  12148. var _calculateOpacityFrom5 = calculateOpacityFromWhite(r, g, b, a);
  12149. var _calculateOpacityFrom6 = (0, _slicedToArray2.default)(_calculateOpacityFrom5, 4);
  12150. r = _calculateOpacityFrom6[0];
  12151. g = _calculateOpacityFrom6[1];
  12152. b = _calculateOpacityFrom6[2];
  12153. a = _calculateOpacityFrom6[3];
  12154. }
  12155. returnedColor = "rgba(".concat(r, ",").concat(g, ",").concat(b, ",").concat(a, ")");
  12156. break;
  12157. }
  12158. return returnedColor;
  12159. }
  12160. function calculateOpacityFromWhite(r, g, b, a) {
  12161. "use strict";
  12162. var min = 0;
  12163. a = (255 - (min = Math.min(r, g, b))) / 255;
  12164. r = ( false || (r - min) / a).toFixed(0);
  12165. g = ( false || (g - min) / a).toFixed(0);
  12166. b = ( false || (b - min) / a).toFixed(0);
  12167. a = parseFloat(a.toFixed(4));
  12168. return [r, g, b, a];
  12169. }
  12170. function hslToRgb(bits) {
  12171. var rgba = {},
  12172. hsl = {
  12173. h: bits[1] / 360,
  12174. s: bits[2] / 100,
  12175. l: bits[3] / 100,
  12176. a: parseFloat(bits[4])
  12177. };
  12178. if (hsl.s === 0) {
  12179. var v = 255 * hsl.l;
  12180. rgba = {
  12181. r: v,
  12182. g: v,
  12183. b: v,
  12184. a: hsl.a
  12185. };
  12186. } else {
  12187. var q = hsl.l < 0.5 ? hsl.l * (1 + hsl.s) : hsl.l + hsl.s - hsl.l * hsl.s;
  12188. var p = 2 * hsl.l - q;
  12189. rgba.r = hueToRgb(p, q, hsl.h + 1 / 3) * 255;
  12190. rgba.g = hueToRgb(p, q, hsl.h) * 255;
  12191. rgba.b = hueToRgb(p, q, hsl.h - 1 / 3) * 255;
  12192. rgba.a = hsl.a;
  12193. }
  12194. return rgba;
  12195. }
  12196. function rgbToHsl(rgba) {
  12197. rgba.r = rgba.r / 255;
  12198. rgba.g = rgba.g / 255;
  12199. rgba.b = rgba.b / 255;
  12200. var max = Math.max(rgba.r, rgba.g, rgba.b),
  12201. min = Math.min(rgba.r, rgba.g, rgba.b),
  12202. hsl = [],
  12203. d;
  12204. hsl.a = rgba.a;
  12205. hsl.l = (max + min) / 2;
  12206. if (max === min) {
  12207. hsl.h = 0;
  12208. hsl.s = 0;
  12209. } else {
  12210. d = max - min;
  12211. hsl.s = hsl.l >= 0.5 ? d / (2 - max - min) : d / (max + min);
  12212. switch (max) {
  12213. case rgba.r:
  12214. hsl.h = (rgba.g - rgba.b) / d + (rgba.g < rgba.b ? 6 : 0);
  12215. break;
  12216. case rgba.g:
  12217. hsl.h = (rgba.b - rgba.r) / d + 2;
  12218. break;
  12219. case rgba.b:
  12220. hsl.h = (rgba.r - rgba.g) / d + 4;
  12221. break;
  12222. }
  12223. hsl.h /= 6;
  12224. }
  12225. hsl.h = parseInt((hsl.h * 360).toFixed(0), 10);
  12226. hsl.s = parseInt((hsl.s * 100).toFixed(0), 10);
  12227. hsl.l = parseInt((hsl.l * 100).toFixed(0), 10);
  12228. return hsl;
  12229. }
  12230. function hsvToRgb(bits) {
  12231. var rgb = {},
  12232. hsv = {
  12233. h: bits[1] / 360,
  12234. s: bits[2] / 100,
  12235. v: bits[3] / 100
  12236. },
  12237. i = Math.floor(hsv.h * 6),
  12238. f = hsv.h * 6 - i,
  12239. p = hsv.v * (1 - hsv.s),
  12240. q = hsv.v * (1 - f * hsv.s),
  12241. t = hsv.v * (1 - (1 - f) * hsv.s);
  12242. switch (i % 6) {
  12243. case 0:
  12244. rgb.r = hsv.v;
  12245. rgb.g = t;
  12246. rgb.b = p;
  12247. break;
  12248. case 1:
  12249. rgb.r = q;
  12250. rgb.g = hsv.v;
  12251. rgb.b = p;
  12252. break;
  12253. case 2:
  12254. rgb.r = p;
  12255. rgb.g = hsv.v;
  12256. rgb.b = t;
  12257. break;
  12258. case 3:
  12259. rgb.r = p;
  12260. rgb.g = q;
  12261. rgb.b = hsv.v;
  12262. break;
  12263. case 4:
  12264. rgb.r = t;
  12265. rgb.g = p;
  12266. rgb.b = hsv.v;
  12267. break;
  12268. case 5:
  12269. rgb.r = hsv.v;
  12270. rgb.g = p;
  12271. rgb.b = q;
  12272. break;
  12273. }
  12274. rgb.r = rgb.r * 255;
  12275. rgb.g = rgb.g * 255;
  12276. rgb.b = rgb.b * 255;
  12277. return rgb;
  12278. }
  12279. function rgbToHsv(rgba) {
  12280. rgba.r = toPercent(parseInt(rgba.r, 10) % 256, 256);
  12281. rgba.g = toPercent(parseInt(rgba.g, 10) % 256, 256);
  12282. rgba.b = toPercent(parseInt(rgba.b, 10) % 256, 256);
  12283. var max = Math.max(rgba.r, rgba.g, rgba.b),
  12284. min = Math.min(rgba.r, rgba.g, rgba.b),
  12285. d = max - min,
  12286. hsv = {
  12287. "h": 0,
  12288. "s": max === 0 ? 0 : d / max,
  12289. "v": max
  12290. };
  12291. if (max !== min) {
  12292. switch (max) {
  12293. case rgba.r:
  12294. hsv.h = (rgba.g - rgba.b) / d + (rgba.g < rgba.b ? 6 : 0);
  12295. break;
  12296. case rgba.g:
  12297. hsv.h = (rgba.b - rgba.r) / d + 2;
  12298. break;
  12299. case rgba.b:
  12300. hsv.h = (rgba.r - rgba.g) / d + 4;
  12301. break;
  12302. }
  12303. hsv.h /= 6;
  12304. }
  12305. hsv.h = parseInt((hsv.h * 360).toFixed(0), 10);
  12306. hsv.s = parseInt((hsv.s * 100).toFixed(0), 10);
  12307. hsv.v = parseInt((hsv.v * 100).toFixed(0), 10);
  12308. return hsv;
  12309. }
  12310. function hueToRgb(p, q, t) {
  12311. if (t < 0) {
  12312. t += 1;
  12313. }
  12314. if (t > 1) {
  12315. t -= 1;
  12316. }
  12317. if (t < 1 / 6) {
  12318. return p + (q - p) * 6 * t;
  12319. }
  12320. if (t < 1 / 2) {
  12321. return q;
  12322. }
  12323. if (t < 2 / 3) {
  12324. return p + (q - p) * ((2 / 3 - t) * 6);
  12325. }
  12326. return p;
  12327. }
  12328. function toPercent(amount, limit) {
  12329. return amount / limit;
  12330. }
  12331. module.exports = colorcolor;
  12332. global.colorcolor = module.exports;
  12333. /* ew */
  12334. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("698d")))
  12335. /***/ }),
  12336. /***/ "4849":
  12337. /***/ (function(module, exports, __webpack_require__) {
  12338. !function(t,e){ true?module.exports=e():undefined}(this,function(){return function(t){function e(n){if(i[n])return i[n].exports;var a=i[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,e),a.l=!0,a.exports}var i={};return e.m=t,e.c=i,e.i=function(t){return t},e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/dist/",e(e.s=2)}([function(t,e,i){var n=i(4)(i(1),i(5),null,null);t.exports=n.exports},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(3);e.default={props:{startVal:{type:Number,required:!1,default:0},endVal:{type:Number,required:!1,default:2017},duration:{type:Number,required:!1,default:3e3},autoplay:{type:Boolean,required:!1,default:!0},decimals:{type:Number,required:!1,default:0,validator:function(t){return t>=0}},decimal:{type:String,required:!1,default:"."},separator:{type:String,required:!1,default:","},prefix:{type:String,required:!1,default:""},suffix:{type:String,required:!1,default:""},useEasing:{type:Boolean,required:!1,default:!0},easingFn:{type:Function,default:function(t,e,i,n){return i*(1-Math.pow(2,-10*t/n))*1024/1023+e}}},data:function(){return{localStartVal:this.startVal,displayValue:this.formatNumber(this.startVal),printVal:null,paused:!1,localDuration:this.duration,startTime:null,timestamp:null,remaining:null,rAF:null}},computed:{countDown:function(){return this.startVal>this.endVal}},watch:{startVal:function(){this.autoplay&&this.start()},endVal:function(){this.autoplay&&this.start()}},mounted:function(){this.autoplay&&this.start(),this.$emit("mountedCallback")},methods:{start:function(){this.localStartVal=this.startVal,this.startTime=null,this.localDuration=this.duration,this.paused=!1,this.rAF=(0,n.requestAnimationFrame)(this.count)},pauseResume:function(){this.paused?(this.resume(),this.paused=!1):(this.pause(),this.paused=!0)},pause:function(){(0,n.cancelAnimationFrame)(this.rAF)},resume:function(){this.startTime=null,this.localDuration=+this.remaining,this.localStartVal=+this.printVal,(0,n.requestAnimationFrame)(this.count)},reset:function(){this.startTime=null,(0,n.cancelAnimationFrame)(this.rAF),this.displayValue=this.formatNumber(this.startVal)},count:function(t){this.startTime||(this.startTime=t),this.timestamp=t;var e=t-this.startTime;this.remaining=this.localDuration-e,this.useEasing?this.countDown?this.printVal=this.localStartVal-this.easingFn(e,0,this.localStartVal-this.endVal,this.localDuration):this.printVal=this.easingFn(e,this.localStartVal,this.endVal-this.localStartVal,this.localDuration):this.countDown?this.printVal=this.localStartVal-(this.localStartVal-this.endVal)*(e/this.localDuration):this.printVal=this.localStartVal+(this.localStartVal-this.startVal)*(e/this.localDuration),this.countDown?this.printVal=this.printVal<this.endVal?this.endVal:this.printVal:this.printVal=this.printVal>this.endVal?this.endVal:this.printVal,this.displayValue=this.formatNumber(this.printVal),e<this.localDuration?this.rAF=(0,n.requestAnimationFrame)(this.count):this.$emit("callback")},isNumber:function(t){return!isNaN(parseFloat(t))},formatNumber:function(t){t=t.toFixed(this.decimals),t+="";var e=t.split("."),i=e[0],n=e.length>1?this.decimal+e[1]:"",a=/(\d+)(\d{3})/;if(this.separator&&!this.isNumber(this.separator))for(;a.test(i);)i=i.replace(a,"$1"+this.separator+"$2");return this.prefix+i+n+this.suffix}},destroyed:function(){(0,n.cancelAnimationFrame)(this.rAF)}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),a=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=a.default,"undefined"!=typeof window&&window.Vue&&window.Vue.component("count-to",a.default)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=0,a="webkit moz ms o".split(" "),r=void 0,o=void 0;if("undefined"==typeof window)e.requestAnimationFrame=r=function(){},e.cancelAnimationFrame=o=function(){};else{e.requestAnimationFrame=r=window.requestAnimationFrame,e.cancelAnimationFrame=o=window.cancelAnimationFrame;for(var s=void 0,u=0;u<a.length&&(!r||!o);u++)s=a[u],e.requestAnimationFrame=r=r||window[s+"RequestAnimationFrame"],e.cancelAnimationFrame=o=o||window[s+"CancelAnimationFrame"]||window[s+"CancelRequestAnimationFrame"];r&&o||(e.requestAnimationFrame=r=function(t){var e=(new Date).getTime(),i=Math.max(0,16-(e-n)),a=window.setTimeout(function(){t(e+i)},i);return n=e+i,a},e.cancelAnimationFrame=o=function(t){window.clearTimeout(t)})}e.requestAnimationFrame=r,e.cancelAnimationFrame=o},function(t,e){t.exports=function(t,e,i,n){var a,r=t=t||{},o=typeof t.default;"object"!==o&&"function"!==o||(a=t,r=t.default);var s="function"==typeof r?r.options:r;if(e&&(s.render=e.render,s.staticRenderFns=e.staticRenderFns),i&&(s._scopeId=i),n){var u=Object.create(s.computed||null);Object.keys(n).forEach(function(t){var e=n[t];u[t]=function(){return e}}),s.computed=u}return{esModule:a,exports:r,options:s}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("span",[t._v("\n "+t._s(t.displayValue)+"\n")])},staticRenderFns:[]}}])});
  12339. //# sourceMappingURL=vue-count-to.min.js.map
  12340. /***/ }),
  12341. /***/ "49c0":
  12342. /***/ (function(module, exports, __webpack_require__) {
  12343. "use strict";
  12344. Object.defineProperty(exports, '__esModule', { value: true });
  12345. var helpers = __webpack_require__("38ce");
  12346. /**
  12347. * Callback for coordEach
  12348. *
  12349. * @callback coordEachCallback
  12350. * @param {Array<number>} currentCoord The current coordinate being processed.
  12351. * @param {number} coordIndex The current index of the coordinate being processed.
  12352. * @param {number} featureIndex The current index of the Feature being processed.
  12353. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  12354. * @param {number} geometryIndex The current index of the Geometry being processed.
  12355. */
  12356. /**
  12357. * Iterate over coordinates in any GeoJSON object, similar to Array.forEach()
  12358. *
  12359. * @name coordEach
  12360. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  12361. * @param {Function} callback a method that takes (currentCoord, coordIndex, featureIndex, multiFeatureIndex)
  12362. * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.
  12363. * @returns {void}
  12364. * @example
  12365. * var features = turf.featureCollection([
  12366. * turf.point([26, 37], {"foo": "bar"}),
  12367. * turf.point([36, 53], {"hello": "world"})
  12368. * ]);
  12369. *
  12370. * turf.coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  12371. * //=currentCoord
  12372. * //=coordIndex
  12373. * //=featureIndex
  12374. * //=multiFeatureIndex
  12375. * //=geometryIndex
  12376. * });
  12377. */
  12378. function coordEach(geojson, callback, excludeWrapCoord) {
  12379. // Handles null Geometry -- Skips this GeoJSON
  12380. if (geojson === null) return;
  12381. var j, k, l, geometry, stopG, coords,
  12382. geometryMaybeCollection,
  12383. wrapShrink = 0,
  12384. coordIndex = 0,
  12385. isGeometryCollection,
  12386. type = geojson.type,
  12387. isFeatureCollection = type === 'FeatureCollection',
  12388. isFeature = type === 'Feature',
  12389. stop = isFeatureCollection ? geojson.features.length : 1;
  12390. // This logic may look a little weird. The reason why it is that way
  12391. // is because it's trying to be fast. GeoJSON supports multiple kinds
  12392. // of objects at its root: FeatureCollection, Features, Geometries.
  12393. // This function has the responsibility of handling all of them, and that
  12394. // means that some of the `for` loops you see below actually just don't apply
  12395. // to certain inputs. For instance, if you give this just a
  12396. // Point geometry, then both loops are short-circuited and all we do
  12397. // is gradually rename the input until it's called 'geometry'.
  12398. //
  12399. // This also aims to allocate as few resources as possible: just a
  12400. // few numbers and booleans, rather than any temporary arrays as would
  12401. // be required with the normalization approach.
  12402. for (var featureIndex = 0; featureIndex < stop; featureIndex++) {
  12403. geometryMaybeCollection = (isFeatureCollection ? geojson.features[featureIndex].geometry :
  12404. (isFeature ? geojson.geometry : geojson));
  12405. isGeometryCollection = (geometryMaybeCollection) ? geometryMaybeCollection.type === 'GeometryCollection' : false;
  12406. stopG = isGeometryCollection ? geometryMaybeCollection.geometries.length : 1;
  12407. for (var geomIndex = 0; geomIndex < stopG; geomIndex++) {
  12408. var multiFeatureIndex = 0;
  12409. var geometryIndex = 0;
  12410. geometry = isGeometryCollection ?
  12411. geometryMaybeCollection.geometries[geomIndex] : geometryMaybeCollection;
  12412. // Handles null Geometry -- Skips this geometry
  12413. if (geometry === null) continue;
  12414. coords = geometry.coordinates;
  12415. var geomType = geometry.type;
  12416. wrapShrink = (excludeWrapCoord && (geomType === 'Polygon' || geomType === 'MultiPolygon')) ? 1 : 0;
  12417. switch (geomType) {
  12418. case null:
  12419. break;
  12420. case 'Point':
  12421. if (callback(coords, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  12422. coordIndex++;
  12423. multiFeatureIndex++;
  12424. break;
  12425. case 'LineString':
  12426. case 'MultiPoint':
  12427. for (j = 0; j < coords.length; j++) {
  12428. if (callback(coords[j], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  12429. coordIndex++;
  12430. if (geomType === 'MultiPoint') multiFeatureIndex++;
  12431. }
  12432. if (geomType === 'LineString') multiFeatureIndex++;
  12433. break;
  12434. case 'Polygon':
  12435. case 'MultiLineString':
  12436. for (j = 0; j < coords.length; j++) {
  12437. for (k = 0; k < coords[j].length - wrapShrink; k++) {
  12438. if (callback(coords[j][k], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  12439. coordIndex++;
  12440. }
  12441. if (geomType === 'MultiLineString') multiFeatureIndex++;
  12442. if (geomType === 'Polygon') geometryIndex++;
  12443. }
  12444. if (geomType === 'Polygon') multiFeatureIndex++;
  12445. break;
  12446. case 'MultiPolygon':
  12447. for (j = 0; j < coords.length; j++) {
  12448. geometryIndex = 0;
  12449. for (k = 0; k < coords[j].length; k++) {
  12450. for (l = 0; l < coords[j][k].length - wrapShrink; l++) {
  12451. if (callback(coords[j][k][l], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  12452. coordIndex++;
  12453. }
  12454. geometryIndex++;
  12455. }
  12456. multiFeatureIndex++;
  12457. }
  12458. break;
  12459. case 'GeometryCollection':
  12460. for (j = 0; j < geometry.geometries.length; j++)
  12461. if (coordEach(geometry.geometries[j], callback, excludeWrapCoord) === false) return false;
  12462. break;
  12463. default:
  12464. throw new Error('Unknown Geometry Type');
  12465. }
  12466. }
  12467. }
  12468. }
  12469. /**
  12470. * Callback for coordReduce
  12471. *
  12472. * The first time the callback function is called, the values provided as arguments depend
  12473. * on whether the reduce method has an initialValue argument.
  12474. *
  12475. * If an initialValue is provided to the reduce method:
  12476. * - The previousValue argument is initialValue.
  12477. * - The currentValue argument is the value of the first element present in the array.
  12478. *
  12479. * If an initialValue is not provided:
  12480. * - The previousValue argument is the value of the first element present in the array.
  12481. * - The currentValue argument is the value of the second element present in the array.
  12482. *
  12483. * @callback coordReduceCallback
  12484. * @param {*} previousValue The accumulated value previously returned in the last invocation
  12485. * of the callback, or initialValue, if supplied.
  12486. * @param {Array<number>} currentCoord The current coordinate being processed.
  12487. * @param {number} coordIndex The current index of the coordinate being processed.
  12488. * Starts at index 0, if an initialValue is provided, and at index 1 otherwise.
  12489. * @param {number} featureIndex The current index of the Feature being processed.
  12490. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  12491. * @param {number} geometryIndex The current index of the Geometry being processed.
  12492. */
  12493. /**
  12494. * Reduce coordinates in any GeoJSON object, similar to Array.reduce()
  12495. *
  12496. * @name coordReduce
  12497. * @param {FeatureCollection|Geometry|Feature} geojson any GeoJSON object
  12498. * @param {Function} callback a method that takes (previousValue, currentCoord, coordIndex)
  12499. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  12500. * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.
  12501. * @returns {*} The value that results from the reduction.
  12502. * @example
  12503. * var features = turf.featureCollection([
  12504. * turf.point([26, 37], {"foo": "bar"}),
  12505. * turf.point([36, 53], {"hello": "world"})
  12506. * ]);
  12507. *
  12508. * turf.coordReduce(features, function (previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  12509. * //=previousValue
  12510. * //=currentCoord
  12511. * //=coordIndex
  12512. * //=featureIndex
  12513. * //=multiFeatureIndex
  12514. * //=geometryIndex
  12515. * return currentCoord;
  12516. * });
  12517. */
  12518. function coordReduce(geojson, callback, initialValue, excludeWrapCoord) {
  12519. var previousValue = initialValue;
  12520. coordEach(geojson, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {
  12521. if (coordIndex === 0 && initialValue === undefined) previousValue = currentCoord;
  12522. else previousValue = callback(previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex);
  12523. }, excludeWrapCoord);
  12524. return previousValue;
  12525. }
  12526. /**
  12527. * Callback for propEach
  12528. *
  12529. * @callback propEachCallback
  12530. * @param {Object} currentProperties The current Properties being processed.
  12531. * @param {number} featureIndex The current index of the Feature being processed.
  12532. */
  12533. /**
  12534. * Iterate over properties in any GeoJSON object, similar to Array.forEach()
  12535. *
  12536. * @name propEach
  12537. * @param {FeatureCollection|Feature} geojson any GeoJSON object
  12538. * @param {Function} callback a method that takes (currentProperties, featureIndex)
  12539. * @returns {void}
  12540. * @example
  12541. * var features = turf.featureCollection([
  12542. * turf.point([26, 37], {foo: 'bar'}),
  12543. * turf.point([36, 53], {hello: 'world'})
  12544. * ]);
  12545. *
  12546. * turf.propEach(features, function (currentProperties, featureIndex) {
  12547. * //=currentProperties
  12548. * //=featureIndex
  12549. * });
  12550. */
  12551. function propEach(geojson, callback) {
  12552. var i;
  12553. switch (geojson.type) {
  12554. case 'FeatureCollection':
  12555. for (i = 0; i < geojson.features.length; i++) {
  12556. if (callback(geojson.features[i].properties, i) === false) break;
  12557. }
  12558. break;
  12559. case 'Feature':
  12560. callback(geojson.properties, 0);
  12561. break;
  12562. }
  12563. }
  12564. /**
  12565. * Callback for propReduce
  12566. *
  12567. * The first time the callback function is called, the values provided as arguments depend
  12568. * on whether the reduce method has an initialValue argument.
  12569. *
  12570. * If an initialValue is provided to the reduce method:
  12571. * - The previousValue argument is initialValue.
  12572. * - The currentValue argument is the value of the first element present in the array.
  12573. *
  12574. * If an initialValue is not provided:
  12575. * - The previousValue argument is the value of the first element present in the array.
  12576. * - The currentValue argument is the value of the second element present in the array.
  12577. *
  12578. * @callback propReduceCallback
  12579. * @param {*} previousValue The accumulated value previously returned in the last invocation
  12580. * of the callback, or initialValue, if supplied.
  12581. * @param {*} currentProperties The current Properties being processed.
  12582. * @param {number} featureIndex The current index of the Feature being processed.
  12583. */
  12584. /**
  12585. * Reduce properties in any GeoJSON object into a single value,
  12586. * similar to how Array.reduce works. However, in this case we lazily run
  12587. * the reduction, so an array of all properties is unnecessary.
  12588. *
  12589. * @name propReduce
  12590. * @param {FeatureCollection|Feature} geojson any GeoJSON object
  12591. * @param {Function} callback a method that takes (previousValue, currentProperties, featureIndex)
  12592. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  12593. * @returns {*} The value that results from the reduction.
  12594. * @example
  12595. * var features = turf.featureCollection([
  12596. * turf.point([26, 37], {foo: 'bar'}),
  12597. * turf.point([36, 53], {hello: 'world'})
  12598. * ]);
  12599. *
  12600. * turf.propReduce(features, function (previousValue, currentProperties, featureIndex) {
  12601. * //=previousValue
  12602. * //=currentProperties
  12603. * //=featureIndex
  12604. * return currentProperties
  12605. * });
  12606. */
  12607. function propReduce(geojson, callback, initialValue) {
  12608. var previousValue = initialValue;
  12609. propEach(geojson, function (currentProperties, featureIndex) {
  12610. if (featureIndex === 0 && initialValue === undefined) previousValue = currentProperties;
  12611. else previousValue = callback(previousValue, currentProperties, featureIndex);
  12612. });
  12613. return previousValue;
  12614. }
  12615. /**
  12616. * Callback for featureEach
  12617. *
  12618. * @callback featureEachCallback
  12619. * @param {Feature<any>} currentFeature The current Feature being processed.
  12620. * @param {number} featureIndex The current index of the Feature being processed.
  12621. */
  12622. /**
  12623. * Iterate over features in any GeoJSON object, similar to
  12624. * Array.forEach.
  12625. *
  12626. * @name featureEach
  12627. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  12628. * @param {Function} callback a method that takes (currentFeature, featureIndex)
  12629. * @returns {void}
  12630. * @example
  12631. * var features = turf.featureCollection([
  12632. * turf.point([26, 37], {foo: 'bar'}),
  12633. * turf.point([36, 53], {hello: 'world'})
  12634. * ]);
  12635. *
  12636. * turf.featureEach(features, function (currentFeature, featureIndex) {
  12637. * //=currentFeature
  12638. * //=featureIndex
  12639. * });
  12640. */
  12641. function featureEach(geojson, callback) {
  12642. if (geojson.type === 'Feature') {
  12643. callback(geojson, 0);
  12644. } else if (geojson.type === 'FeatureCollection') {
  12645. for (var i = 0; i < geojson.features.length; i++) {
  12646. if (callback(geojson.features[i], i) === false) break;
  12647. }
  12648. }
  12649. }
  12650. /**
  12651. * Callback for featureReduce
  12652. *
  12653. * The first time the callback function is called, the values provided as arguments depend
  12654. * on whether the reduce method has an initialValue argument.
  12655. *
  12656. * If an initialValue is provided to the reduce method:
  12657. * - The previousValue argument is initialValue.
  12658. * - The currentValue argument is the value of the first element present in the array.
  12659. *
  12660. * If an initialValue is not provided:
  12661. * - The previousValue argument is the value of the first element present in the array.
  12662. * - The currentValue argument is the value of the second element present in the array.
  12663. *
  12664. * @callback featureReduceCallback
  12665. * @param {*} previousValue The accumulated value previously returned in the last invocation
  12666. * of the callback, or initialValue, if supplied.
  12667. * @param {Feature} currentFeature The current Feature being processed.
  12668. * @param {number} featureIndex The current index of the Feature being processed.
  12669. */
  12670. /**
  12671. * Reduce features in any GeoJSON object, similar to Array.reduce().
  12672. *
  12673. * @name featureReduce
  12674. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  12675. * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex)
  12676. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  12677. * @returns {*} The value that results from the reduction.
  12678. * @example
  12679. * var features = turf.featureCollection([
  12680. * turf.point([26, 37], {"foo": "bar"}),
  12681. * turf.point([36, 53], {"hello": "world"})
  12682. * ]);
  12683. *
  12684. * turf.featureReduce(features, function (previousValue, currentFeature, featureIndex) {
  12685. * //=previousValue
  12686. * //=currentFeature
  12687. * //=featureIndex
  12688. * return currentFeature
  12689. * });
  12690. */
  12691. function featureReduce(geojson, callback, initialValue) {
  12692. var previousValue = initialValue;
  12693. featureEach(geojson, function (currentFeature, featureIndex) {
  12694. if (featureIndex === 0 && initialValue === undefined) previousValue = currentFeature;
  12695. else previousValue = callback(previousValue, currentFeature, featureIndex);
  12696. });
  12697. return previousValue;
  12698. }
  12699. /**
  12700. * Get all coordinates from any GeoJSON object.
  12701. *
  12702. * @name coordAll
  12703. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  12704. * @returns {Array<Array<number>>} coordinate position array
  12705. * @example
  12706. * var features = turf.featureCollection([
  12707. * turf.point([26, 37], {foo: 'bar'}),
  12708. * turf.point([36, 53], {hello: 'world'})
  12709. * ]);
  12710. *
  12711. * var coords = turf.coordAll(features);
  12712. * //= [[26, 37], [36, 53]]
  12713. */
  12714. function coordAll(geojson) {
  12715. var coords = [];
  12716. coordEach(geojson, function (coord) {
  12717. coords.push(coord);
  12718. });
  12719. return coords;
  12720. }
  12721. /**
  12722. * Callback for geomEach
  12723. *
  12724. * @callback geomEachCallback
  12725. * @param {Geometry} currentGeometry The current Geometry being processed.
  12726. * @param {number} featureIndex The current index of the Feature being processed.
  12727. * @param {Object} featureProperties The current Feature Properties being processed.
  12728. * @param {Array<number>} featureBBox The current Feature BBox being processed.
  12729. * @param {number|string} featureId The current Feature Id being processed.
  12730. */
  12731. /**
  12732. * Iterate over each geometry in any GeoJSON object, similar to Array.forEach()
  12733. *
  12734. * @name geomEach
  12735. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  12736. * @param {Function} callback a method that takes (currentGeometry, featureIndex, featureProperties, featureBBox, featureId)
  12737. * @returns {void}
  12738. * @example
  12739. * var features = turf.featureCollection([
  12740. * turf.point([26, 37], {foo: 'bar'}),
  12741. * turf.point([36, 53], {hello: 'world'})
  12742. * ]);
  12743. *
  12744. * turf.geomEach(features, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  12745. * //=currentGeometry
  12746. * //=featureIndex
  12747. * //=featureProperties
  12748. * //=featureBBox
  12749. * //=featureId
  12750. * });
  12751. */
  12752. function geomEach(geojson, callback) {
  12753. var i, j, g, geometry, stopG,
  12754. geometryMaybeCollection,
  12755. isGeometryCollection,
  12756. featureProperties,
  12757. featureBBox,
  12758. featureId,
  12759. featureIndex = 0,
  12760. isFeatureCollection = geojson.type === 'FeatureCollection',
  12761. isFeature = geojson.type === 'Feature',
  12762. stop = isFeatureCollection ? geojson.features.length : 1;
  12763. // This logic may look a little weird. The reason why it is that way
  12764. // is because it's trying to be fast. GeoJSON supports multiple kinds
  12765. // of objects at its root: FeatureCollection, Features, Geometries.
  12766. // This function has the responsibility of handling all of them, and that
  12767. // means that some of the `for` loops you see below actually just don't apply
  12768. // to certain inputs. For instance, if you give this just a
  12769. // Point geometry, then both loops are short-circuited and all we do
  12770. // is gradually rename the input until it's called 'geometry'.
  12771. //
  12772. // This also aims to allocate as few resources as possible: just a
  12773. // few numbers and booleans, rather than any temporary arrays as would
  12774. // be required with the normalization approach.
  12775. for (i = 0; i < stop; i++) {
  12776. geometryMaybeCollection = (isFeatureCollection ? geojson.features[i].geometry :
  12777. (isFeature ? geojson.geometry : geojson));
  12778. featureProperties = (isFeatureCollection ? geojson.features[i].properties :
  12779. (isFeature ? geojson.properties : {}));
  12780. featureBBox = (isFeatureCollection ? geojson.features[i].bbox :
  12781. (isFeature ? geojson.bbox : undefined));
  12782. featureId = (isFeatureCollection ? geojson.features[i].id :
  12783. (isFeature ? geojson.id : undefined));
  12784. isGeometryCollection = (geometryMaybeCollection) ? geometryMaybeCollection.type === 'GeometryCollection' : false;
  12785. stopG = isGeometryCollection ? geometryMaybeCollection.geometries.length : 1;
  12786. for (g = 0; g < stopG; g++) {
  12787. geometry = isGeometryCollection ?
  12788. geometryMaybeCollection.geometries[g] : geometryMaybeCollection;
  12789. // Handle null Geometry
  12790. if (geometry === null) {
  12791. if (callback(null, featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  12792. continue;
  12793. }
  12794. switch (geometry.type) {
  12795. case 'Point':
  12796. case 'LineString':
  12797. case 'MultiPoint':
  12798. case 'Polygon':
  12799. case 'MultiLineString':
  12800. case 'MultiPolygon': {
  12801. if (callback(geometry, featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  12802. break;
  12803. }
  12804. case 'GeometryCollection': {
  12805. for (j = 0; j < geometry.geometries.length; j++) {
  12806. if (callback(geometry.geometries[j], featureIndex, featureProperties, featureBBox, featureId) === false) return false;
  12807. }
  12808. break;
  12809. }
  12810. default:
  12811. throw new Error('Unknown Geometry Type');
  12812. }
  12813. }
  12814. // Only increase `featureIndex` per each feature
  12815. featureIndex++;
  12816. }
  12817. }
  12818. /**
  12819. * Callback for geomReduce
  12820. *
  12821. * The first time the callback function is called, the values provided as arguments depend
  12822. * on whether the reduce method has an initialValue argument.
  12823. *
  12824. * If an initialValue is provided to the reduce method:
  12825. * - The previousValue argument is initialValue.
  12826. * - The currentValue argument is the value of the first element present in the array.
  12827. *
  12828. * If an initialValue is not provided:
  12829. * - The previousValue argument is the value of the first element present in the array.
  12830. * - The currentValue argument is the value of the second element present in the array.
  12831. *
  12832. * @callback geomReduceCallback
  12833. * @param {*} previousValue The accumulated value previously returned in the last invocation
  12834. * of the callback, or initialValue, if supplied.
  12835. * @param {Geometry} currentGeometry The current Geometry being processed.
  12836. * @param {number} featureIndex The current index of the Feature being processed.
  12837. * @param {Object} featureProperties The current Feature Properties being processed.
  12838. * @param {Array<number>} featureBBox The current Feature BBox being processed.
  12839. * @param {number|string} featureId The current Feature Id being processed.
  12840. */
  12841. /**
  12842. * Reduce geometry in any GeoJSON object, similar to Array.reduce().
  12843. *
  12844. * @name geomReduce
  12845. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  12846. * @param {Function} callback a method that takes (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId)
  12847. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  12848. * @returns {*} The value that results from the reduction.
  12849. * @example
  12850. * var features = turf.featureCollection([
  12851. * turf.point([26, 37], {foo: 'bar'}),
  12852. * turf.point([36, 53], {hello: 'world'})
  12853. * ]);
  12854. *
  12855. * turf.geomReduce(features, function (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  12856. * //=previousValue
  12857. * //=currentGeometry
  12858. * //=featureIndex
  12859. * //=featureProperties
  12860. * //=featureBBox
  12861. * //=featureId
  12862. * return currentGeometry
  12863. * });
  12864. */
  12865. function geomReduce(geojson, callback, initialValue) {
  12866. var previousValue = initialValue;
  12867. geomEach(geojson, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {
  12868. if (featureIndex === 0 && initialValue === undefined) previousValue = currentGeometry;
  12869. else previousValue = callback(previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId);
  12870. });
  12871. return previousValue;
  12872. }
  12873. /**
  12874. * Callback for flattenEach
  12875. *
  12876. * @callback flattenEachCallback
  12877. * @param {Feature} currentFeature The current flattened feature being processed.
  12878. * @param {number} featureIndex The current index of the Feature being processed.
  12879. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  12880. */
  12881. /**
  12882. * Iterate over flattened features in any GeoJSON object, similar to
  12883. * Array.forEach.
  12884. *
  12885. * @name flattenEach
  12886. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  12887. * @param {Function} callback a method that takes (currentFeature, featureIndex, multiFeatureIndex)
  12888. * @example
  12889. * var features = turf.featureCollection([
  12890. * turf.point([26, 37], {foo: 'bar'}),
  12891. * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})
  12892. * ]);
  12893. *
  12894. * turf.flattenEach(features, function (currentFeature, featureIndex, multiFeatureIndex) {
  12895. * //=currentFeature
  12896. * //=featureIndex
  12897. * //=multiFeatureIndex
  12898. * });
  12899. */
  12900. function flattenEach(geojson, callback) {
  12901. geomEach(geojson, function (geometry, featureIndex, properties, bbox, id) {
  12902. // Callback for single geometry
  12903. var type = (geometry === null) ? null : geometry.type;
  12904. switch (type) {
  12905. case null:
  12906. case 'Point':
  12907. case 'LineString':
  12908. case 'Polygon':
  12909. if (callback(helpers.feature(geometry, properties, {bbox: bbox, id: id}), featureIndex, 0) === false) return false;
  12910. return;
  12911. }
  12912. var geomType;
  12913. // Callback for multi-geometry
  12914. switch (type) {
  12915. case 'MultiPoint':
  12916. geomType = 'Point';
  12917. break;
  12918. case 'MultiLineString':
  12919. geomType = 'LineString';
  12920. break;
  12921. case 'MultiPolygon':
  12922. geomType = 'Polygon';
  12923. break;
  12924. }
  12925. for (var multiFeatureIndex = 0; multiFeatureIndex < geometry.coordinates.length; multiFeatureIndex++) {
  12926. var coordinate = geometry.coordinates[multiFeatureIndex];
  12927. var geom = {
  12928. type: geomType,
  12929. coordinates: coordinate
  12930. };
  12931. if (callback(helpers.feature(geom, properties), featureIndex, multiFeatureIndex) === false) return false;
  12932. }
  12933. });
  12934. }
  12935. /**
  12936. * Callback for flattenReduce
  12937. *
  12938. * The first time the callback function is called, the values provided as arguments depend
  12939. * on whether the reduce method has an initialValue argument.
  12940. *
  12941. * If an initialValue is provided to the reduce method:
  12942. * - The previousValue argument is initialValue.
  12943. * - The currentValue argument is the value of the first element present in the array.
  12944. *
  12945. * If an initialValue is not provided:
  12946. * - The previousValue argument is the value of the first element present in the array.
  12947. * - The currentValue argument is the value of the second element present in the array.
  12948. *
  12949. * @callback flattenReduceCallback
  12950. * @param {*} previousValue The accumulated value previously returned in the last invocation
  12951. * of the callback, or initialValue, if supplied.
  12952. * @param {Feature} currentFeature The current Feature being processed.
  12953. * @param {number} featureIndex The current index of the Feature being processed.
  12954. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  12955. */
  12956. /**
  12957. * Reduce flattened features in any GeoJSON object, similar to Array.reduce().
  12958. *
  12959. * @name flattenReduce
  12960. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object
  12961. * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex, multiFeatureIndex)
  12962. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  12963. * @returns {*} The value that results from the reduction.
  12964. * @example
  12965. * var features = turf.featureCollection([
  12966. * turf.point([26, 37], {foo: 'bar'}),
  12967. * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})
  12968. * ]);
  12969. *
  12970. * turf.flattenReduce(features, function (previousValue, currentFeature, featureIndex, multiFeatureIndex) {
  12971. * //=previousValue
  12972. * //=currentFeature
  12973. * //=featureIndex
  12974. * //=multiFeatureIndex
  12975. * return currentFeature
  12976. * });
  12977. */
  12978. function flattenReduce(geojson, callback, initialValue) {
  12979. var previousValue = initialValue;
  12980. flattenEach(geojson, function (currentFeature, featureIndex, multiFeatureIndex) {
  12981. if (featureIndex === 0 && multiFeatureIndex === 0 && initialValue === undefined) previousValue = currentFeature;
  12982. else previousValue = callback(previousValue, currentFeature, featureIndex, multiFeatureIndex);
  12983. });
  12984. return previousValue;
  12985. }
  12986. /**
  12987. * Callback for segmentEach
  12988. *
  12989. * @callback segmentEachCallback
  12990. * @param {Feature<LineString>} currentSegment The current Segment being processed.
  12991. * @param {number} featureIndex The current index of the Feature being processed.
  12992. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  12993. * @param {number} geometryIndex The current index of the Geometry being processed.
  12994. * @param {number} segmentIndex The current index of the Segment being processed.
  12995. * @returns {void}
  12996. */
  12997. /**
  12998. * Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEach()
  12999. * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  13000. *
  13001. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON
  13002. * @param {Function} callback a method that takes (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex)
  13003. * @returns {void}
  13004. * @example
  13005. * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);
  13006. *
  13007. * // Iterate over GeoJSON by 2-vertex segments
  13008. * turf.segmentEach(polygon, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  13009. * //=currentSegment
  13010. * //=featureIndex
  13011. * //=multiFeatureIndex
  13012. * //=geometryIndex
  13013. * //=segmentIndex
  13014. * });
  13015. *
  13016. * // Calculate the total number of segments
  13017. * var total = 0;
  13018. * turf.segmentEach(polygon, function () {
  13019. * total++;
  13020. * });
  13021. */
  13022. function segmentEach(geojson, callback) {
  13023. flattenEach(geojson, function (feature, featureIndex, multiFeatureIndex) {
  13024. var segmentIndex = 0;
  13025. // Exclude null Geometries
  13026. if (!feature.geometry) return;
  13027. // (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  13028. var type = feature.geometry.type;
  13029. if (type === 'Point' || type === 'MultiPoint') return;
  13030. // Generate 2-vertex line segments
  13031. var previousCoords;
  13032. var previousFeatureIndex = 0;
  13033. var previousMultiIndex = 0;
  13034. var prevGeomIndex = 0;
  13035. if (coordEach(feature, function (currentCoord, coordIndex, featureIndexCoord, multiPartIndexCoord, geometryIndex) {
  13036. // Simulating a meta.coordReduce() since `reduce` operations cannot be stopped by returning `false`
  13037. if (previousCoords === undefined || featureIndex > previousFeatureIndex || multiPartIndexCoord > previousMultiIndex || geometryIndex > prevGeomIndex) {
  13038. previousCoords = currentCoord;
  13039. previousFeatureIndex = featureIndex;
  13040. previousMultiIndex = multiPartIndexCoord;
  13041. prevGeomIndex = geometryIndex;
  13042. segmentIndex = 0;
  13043. return;
  13044. }
  13045. var currentSegment = helpers.lineString([previousCoords, currentCoord], feature.properties);
  13046. if (callback(currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) === false) return false;
  13047. segmentIndex++;
  13048. previousCoords = currentCoord;
  13049. }) === false) return false;
  13050. });
  13051. }
  13052. /**
  13053. * Callback for segmentReduce
  13054. *
  13055. * The first time the callback function is called, the values provided as arguments depend
  13056. * on whether the reduce method has an initialValue argument.
  13057. *
  13058. * If an initialValue is provided to the reduce method:
  13059. * - The previousValue argument is initialValue.
  13060. * - The currentValue argument is the value of the first element present in the array.
  13061. *
  13062. * If an initialValue is not provided:
  13063. * - The previousValue argument is the value of the first element present in the array.
  13064. * - The currentValue argument is the value of the second element present in the array.
  13065. *
  13066. * @callback segmentReduceCallback
  13067. * @param {*} previousValue The accumulated value previously returned in the last invocation
  13068. * of the callback, or initialValue, if supplied.
  13069. * @param {Feature<LineString>} currentSegment The current Segment being processed.
  13070. * @param {number} featureIndex The current index of the Feature being processed.
  13071. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.
  13072. * @param {number} geometryIndex The current index of the Geometry being processed.
  13073. * @param {number} segmentIndex The current index of the Segment being processed.
  13074. */
  13075. /**
  13076. * Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce()
  13077. * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.
  13078. *
  13079. * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON
  13080. * @param {Function} callback a method that takes (previousValue, currentSegment, currentIndex)
  13081. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  13082. * @returns {void}
  13083. * @example
  13084. * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);
  13085. *
  13086. * // Iterate over GeoJSON by 2-vertex segments
  13087. * turf.segmentReduce(polygon, function (previousSegment, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  13088. * //= previousSegment
  13089. * //= currentSegment
  13090. * //= featureIndex
  13091. * //= multiFeatureIndex
  13092. * //= geometryIndex
  13093. * //= segmentInex
  13094. * return currentSegment
  13095. * });
  13096. *
  13097. * // Calculate the total number of segments
  13098. * var initialValue = 0
  13099. * var total = turf.segmentReduce(polygon, function (previousValue) {
  13100. * previousValue++;
  13101. * return previousValue;
  13102. * }, initialValue);
  13103. */
  13104. function segmentReduce(geojson, callback, initialValue) {
  13105. var previousValue = initialValue;
  13106. var started = false;
  13107. segmentEach(geojson, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {
  13108. if (started === false && initialValue === undefined) previousValue = currentSegment;
  13109. else previousValue = callback(previousValue, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex);
  13110. started = true;
  13111. });
  13112. return previousValue;
  13113. }
  13114. /**
  13115. * Callback for lineEach
  13116. *
  13117. * @callback lineEachCallback
  13118. * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed
  13119. * @param {number} featureIndex The current index of the Feature being processed
  13120. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed
  13121. * @param {number} geometryIndex The current index of the Geometry being processed
  13122. */
  13123. /**
  13124. * Iterate over line or ring coordinates in LineString, Polygon, MultiLineString, MultiPolygon Features or Geometries,
  13125. * similar to Array.forEach.
  13126. *
  13127. * @name lineEach
  13128. * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object
  13129. * @param {Function} callback a method that takes (currentLine, featureIndex, multiFeatureIndex, geometryIndex)
  13130. * @example
  13131. * var multiLine = turf.multiLineString([
  13132. * [[26, 37], [35, 45]],
  13133. * [[36, 53], [38, 50], [41, 55]]
  13134. * ]);
  13135. *
  13136. * turf.lineEach(multiLine, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  13137. * //=currentLine
  13138. * //=featureIndex
  13139. * //=multiFeatureIndex
  13140. * //=geometryIndex
  13141. * });
  13142. */
  13143. function lineEach(geojson, callback) {
  13144. // validation
  13145. if (!geojson) throw new Error('geojson is required');
  13146. flattenEach(geojson, function (feature, featureIndex, multiFeatureIndex) {
  13147. if (feature.geometry === null) return;
  13148. var type = feature.geometry.type;
  13149. var coords = feature.geometry.coordinates;
  13150. switch (type) {
  13151. case 'LineString':
  13152. if (callback(feature, featureIndex, multiFeatureIndex, 0, 0) === false) return false;
  13153. break;
  13154. case 'Polygon':
  13155. for (var geometryIndex = 0; geometryIndex < coords.length; geometryIndex++) {
  13156. if (callback(helpers.lineString(coords[geometryIndex], feature.properties), featureIndex, multiFeatureIndex, geometryIndex) === false) return false;
  13157. }
  13158. break;
  13159. }
  13160. });
  13161. }
  13162. /**
  13163. * Callback for lineReduce
  13164. *
  13165. * The first time the callback function is called, the values provided as arguments depend
  13166. * on whether the reduce method has an initialValue argument.
  13167. *
  13168. * If an initialValue is provided to the reduce method:
  13169. * - The previousValue argument is initialValue.
  13170. * - The currentValue argument is the value of the first element present in the array.
  13171. *
  13172. * If an initialValue is not provided:
  13173. * - The previousValue argument is the value of the first element present in the array.
  13174. * - The currentValue argument is the value of the second element present in the array.
  13175. *
  13176. * @callback lineReduceCallback
  13177. * @param {*} previousValue The accumulated value previously returned in the last invocation
  13178. * of the callback, or initialValue, if supplied.
  13179. * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed.
  13180. * @param {number} featureIndex The current index of the Feature being processed
  13181. * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed
  13182. * @param {number} geometryIndex The current index of the Geometry being processed
  13183. */
  13184. /**
  13185. * Reduce features in any GeoJSON object, similar to Array.reduce().
  13186. *
  13187. * @name lineReduce
  13188. * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object
  13189. * @param {Function} callback a method that takes (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex)
  13190. * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.
  13191. * @returns {*} The value that results from the reduction.
  13192. * @example
  13193. * var multiPoly = turf.multiPolygon([
  13194. * turf.polygon([[[12,48],[2,41],[24,38],[12,48]], [[9,44],[13,41],[13,45],[9,44]]]),
  13195. * turf.polygon([[[5, 5], [0, 0], [2, 2], [4, 4], [5, 5]]])
  13196. * ]);
  13197. *
  13198. * turf.lineReduce(multiPoly, function (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  13199. * //=previousValue
  13200. * //=currentLine
  13201. * //=featureIndex
  13202. * //=multiFeatureIndex
  13203. * //=geometryIndex
  13204. * return currentLine
  13205. * });
  13206. */
  13207. function lineReduce(geojson, callback, initialValue) {
  13208. var previousValue = initialValue;
  13209. lineEach(geojson, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {
  13210. if (featureIndex === 0 && initialValue === undefined) previousValue = currentLine;
  13211. else previousValue = callback(previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex);
  13212. });
  13213. return previousValue;
  13214. }
  13215. /**
  13216. * Finds a particular 2-vertex LineString Segment from a GeoJSON using `@turf/meta` indexes.
  13217. *
  13218. * Negative indexes are permitted.
  13219. * Point & MultiPoint will always return null.
  13220. *
  13221. * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry
  13222. * @param {Object} [options={}] Optional parameters
  13223. * @param {number} [options.featureIndex=0] Feature Index
  13224. * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index
  13225. * @param {number} [options.geometryIndex=0] Geometry Index
  13226. * @param {number} [options.segmentIndex=0] Segment Index
  13227. * @param {Object} [options.properties={}] Translate Properties to output LineString
  13228. * @param {BBox} [options.bbox={}] Translate BBox to output LineString
  13229. * @param {number|string} [options.id={}] Translate Id to output LineString
  13230. * @returns {Feature<LineString>} 2-vertex GeoJSON Feature LineString
  13231. * @example
  13232. * var multiLine = turf.multiLineString([
  13233. * [[10, 10], [50, 30], [30, 40]],
  13234. * [[-10, -10], [-50, -30], [-30, -40]]
  13235. * ]);
  13236. *
  13237. * // First Segment (defaults are 0)
  13238. * turf.findSegment(multiLine);
  13239. * // => Feature<LineString<[[10, 10], [50, 30]]>>
  13240. *
  13241. * // First Segment of 2nd Multi Feature
  13242. * turf.findSegment(multiLine, {multiFeatureIndex: 1});
  13243. * // => Feature<LineString<[[-10, -10], [-50, -30]]>>
  13244. *
  13245. * // Last Segment of Last Multi Feature
  13246. * turf.findSegment(multiLine, {multiFeatureIndex: -1, segmentIndex: -1});
  13247. * // => Feature<LineString<[[-50, -30], [-30, -40]]>>
  13248. */
  13249. function findSegment(geojson, options) {
  13250. // Optional Parameters
  13251. options = options || {};
  13252. if (!helpers.isObject(options)) throw new Error('options is invalid');
  13253. var featureIndex = options.featureIndex || 0;
  13254. var multiFeatureIndex = options.multiFeatureIndex || 0;
  13255. var geometryIndex = options.geometryIndex || 0;
  13256. var segmentIndex = options.segmentIndex || 0;
  13257. // Find FeatureIndex
  13258. var properties = options.properties;
  13259. var geometry;
  13260. switch (geojson.type) {
  13261. case 'FeatureCollection':
  13262. if (featureIndex < 0) featureIndex = geojson.features.length + featureIndex;
  13263. properties = properties || geojson.features[featureIndex].properties;
  13264. geometry = geojson.features[featureIndex].geometry;
  13265. break;
  13266. case 'Feature':
  13267. properties = properties || geojson.properties;
  13268. geometry = geojson.geometry;
  13269. break;
  13270. case 'Point':
  13271. case 'MultiPoint':
  13272. return null;
  13273. case 'LineString':
  13274. case 'Polygon':
  13275. case 'MultiLineString':
  13276. case 'MultiPolygon':
  13277. geometry = geojson;
  13278. break;
  13279. default:
  13280. throw new Error('geojson is invalid');
  13281. }
  13282. // Find SegmentIndex
  13283. if (geometry === null) return null;
  13284. var coords = geometry.coordinates;
  13285. switch (geometry.type) {
  13286. case 'Point':
  13287. case 'MultiPoint':
  13288. return null;
  13289. case 'LineString':
  13290. if (segmentIndex < 0) segmentIndex = coords.length + segmentIndex - 1;
  13291. return helpers.lineString([coords[segmentIndex], coords[segmentIndex + 1]], properties, options);
  13292. case 'Polygon':
  13293. if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;
  13294. if (segmentIndex < 0) segmentIndex = coords[geometryIndex].length + segmentIndex - 1;
  13295. return helpers.lineString([coords[geometryIndex][segmentIndex], coords[geometryIndex][segmentIndex + 1]], properties, options);
  13296. case 'MultiLineString':
  13297. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  13298. if (segmentIndex < 0) segmentIndex = coords[multiFeatureIndex].length + segmentIndex - 1;
  13299. return helpers.lineString([coords[multiFeatureIndex][segmentIndex], coords[multiFeatureIndex][segmentIndex + 1]], properties, options);
  13300. case 'MultiPolygon':
  13301. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  13302. if (geometryIndex < 0) geometryIndex = coords[multiFeatureIndex].length + geometryIndex;
  13303. if (segmentIndex < 0) segmentIndex = coords[multiFeatureIndex][geometryIndex].length - segmentIndex - 1;
  13304. return helpers.lineString([coords[multiFeatureIndex][geometryIndex][segmentIndex], coords[multiFeatureIndex][geometryIndex][segmentIndex + 1]], properties, options);
  13305. }
  13306. throw new Error('geojson is invalid');
  13307. }
  13308. /**
  13309. * Finds a particular Point from a GeoJSON using `@turf/meta` indexes.
  13310. *
  13311. * Negative indexes are permitted.
  13312. *
  13313. * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry
  13314. * @param {Object} [options={}] Optional parameters
  13315. * @param {number} [options.featureIndex=0] Feature Index
  13316. * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index
  13317. * @param {number} [options.geometryIndex=0] Geometry Index
  13318. * @param {number} [options.coordIndex=0] Coord Index
  13319. * @param {Object} [options.properties={}] Translate Properties to output Point
  13320. * @param {BBox} [options.bbox={}] Translate BBox to output Point
  13321. * @param {number|string} [options.id={}] Translate Id to output Point
  13322. * @returns {Feature<Point>} 2-vertex GeoJSON Feature Point
  13323. * @example
  13324. * var multiLine = turf.multiLineString([
  13325. * [[10, 10], [50, 30], [30, 40]],
  13326. * [[-10, -10], [-50, -30], [-30, -40]]
  13327. * ]);
  13328. *
  13329. * // First Segment (defaults are 0)
  13330. * turf.findPoint(multiLine);
  13331. * // => Feature<Point<[10, 10]>>
  13332. *
  13333. * // First Segment of the 2nd Multi-Feature
  13334. * turf.findPoint(multiLine, {multiFeatureIndex: 1});
  13335. * // => Feature<Point<[-10, -10]>>
  13336. *
  13337. * // Last Segment of last Multi-Feature
  13338. * turf.findPoint(multiLine, {multiFeatureIndex: -1, coordIndex: -1});
  13339. * // => Feature<Point<[-30, -40]>>
  13340. */
  13341. function findPoint(geojson, options) {
  13342. // Optional Parameters
  13343. options = options || {};
  13344. if (!helpers.isObject(options)) throw new Error('options is invalid');
  13345. var featureIndex = options.featureIndex || 0;
  13346. var multiFeatureIndex = options.multiFeatureIndex || 0;
  13347. var geometryIndex = options.geometryIndex || 0;
  13348. var coordIndex = options.coordIndex || 0;
  13349. // Find FeatureIndex
  13350. var properties = options.properties;
  13351. var geometry;
  13352. switch (geojson.type) {
  13353. case 'FeatureCollection':
  13354. if (featureIndex < 0) featureIndex = geojson.features.length + featureIndex;
  13355. properties = properties || geojson.features[featureIndex].properties;
  13356. geometry = geojson.features[featureIndex].geometry;
  13357. break;
  13358. case 'Feature':
  13359. properties = properties || geojson.properties;
  13360. geometry = geojson.geometry;
  13361. break;
  13362. case 'Point':
  13363. case 'MultiPoint':
  13364. return null;
  13365. case 'LineString':
  13366. case 'Polygon':
  13367. case 'MultiLineString':
  13368. case 'MultiPolygon':
  13369. geometry = geojson;
  13370. break;
  13371. default:
  13372. throw new Error('geojson is invalid');
  13373. }
  13374. // Find Coord Index
  13375. if (geometry === null) return null;
  13376. var coords = geometry.coordinates;
  13377. switch (geometry.type) {
  13378. case 'Point':
  13379. return helpers.point(coords, properties, options);
  13380. case 'MultiPoint':
  13381. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  13382. return helpers.point(coords[multiFeatureIndex], properties, options);
  13383. case 'LineString':
  13384. if (coordIndex < 0) coordIndex = coords.length + coordIndex;
  13385. return helpers.point(coords[coordIndex], properties, options);
  13386. case 'Polygon':
  13387. if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;
  13388. if (coordIndex < 0) coordIndex = coords[geometryIndex].length + coordIndex;
  13389. return helpers.point(coords[geometryIndex][coordIndex], properties, options);
  13390. case 'MultiLineString':
  13391. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  13392. if (coordIndex < 0) coordIndex = coords[multiFeatureIndex].length + coordIndex;
  13393. return helpers.point(coords[multiFeatureIndex][coordIndex], properties, options);
  13394. case 'MultiPolygon':
  13395. if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
  13396. if (geometryIndex < 0) geometryIndex = coords[multiFeatureIndex].length + geometryIndex;
  13397. if (coordIndex < 0) coordIndex = coords[multiFeatureIndex][geometryIndex].length - coordIndex;
  13398. return helpers.point(coords[multiFeatureIndex][geometryIndex][coordIndex], properties, options);
  13399. }
  13400. throw new Error('geojson is invalid');
  13401. }
  13402. exports.coordEach = coordEach;
  13403. exports.coordReduce = coordReduce;
  13404. exports.propEach = propEach;
  13405. exports.propReduce = propReduce;
  13406. exports.featureEach = featureEach;
  13407. exports.featureReduce = featureReduce;
  13408. exports.coordAll = coordAll;
  13409. exports.geomEach = geomEach;
  13410. exports.geomReduce = geomReduce;
  13411. exports.flattenEach = flattenEach;
  13412. exports.flattenReduce = flattenReduce;
  13413. exports.segmentEach = segmentEach;
  13414. exports.segmentReduce = segmentReduce;
  13415. exports.lineEach = lineEach;
  13416. exports.lineReduce = lineReduce;
  13417. exports.findSegment = findSegment;
  13418. exports.findPoint = findPoint;
  13419. /***/ }),
  13420. /***/ "49f9":
  13421. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  13422. "use strict";
  13423. __webpack_require__.r(__webpack_exports__);
  13424. /* harmony import */ var _WebMap_vue_vue_type_template_id_d25de088___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a3cf");
  13425. /* harmony import */ var _WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("8232");
  13426. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  13427. /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b429");
  13428. /* normalize component */
  13429. var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
  13430. _WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__["default"],
  13431. _WebMap_vue_vue_type_template_id_d25de088___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
  13432. _WebMap_vue_vue_type_template_id_d25de088___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
  13433. false,
  13434. null,
  13435. null,
  13436. null
  13437. )
  13438. /* harmony default export */ __webpack_exports__["default"] = (component.exports);
  13439. /***/ }),
  13440. /***/ "4a62":
  13441. /***/ (function(module, exports) {
  13442. exports.read = function (buffer, offset, isLE, mLen, nBytes) {
  13443. var e, m
  13444. var eLen = (nBytes * 8) - mLen - 1
  13445. var eMax = (1 << eLen) - 1
  13446. var eBias = eMax >> 1
  13447. var nBits = -7
  13448. var i = isLE ? (nBytes - 1) : 0
  13449. var d = isLE ? -1 : 1
  13450. var s = buffer[offset + i]
  13451. i += d
  13452. e = s & ((1 << (-nBits)) - 1)
  13453. s >>= (-nBits)
  13454. nBits += eLen
  13455. for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
  13456. m = e & ((1 << (-nBits)) - 1)
  13457. e >>= (-nBits)
  13458. nBits += mLen
  13459. for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
  13460. if (e === 0) {
  13461. e = 1 - eBias
  13462. } else if (e === eMax) {
  13463. return m ? NaN : ((s ? -1 : 1) * Infinity)
  13464. } else {
  13465. m = m + Math.pow(2, mLen)
  13466. e = e - eBias
  13467. }
  13468. return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
  13469. }
  13470. exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
  13471. var e, m, c
  13472. var eLen = (nBytes * 8) - mLen - 1
  13473. var eMax = (1 << eLen) - 1
  13474. var eBias = eMax >> 1
  13475. var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
  13476. var i = isLE ? 0 : (nBytes - 1)
  13477. var d = isLE ? 1 : -1
  13478. var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
  13479. value = Math.abs(value)
  13480. if (isNaN(value) || value === Infinity) {
  13481. m = isNaN(value) ? 1 : 0
  13482. e = eMax
  13483. } else {
  13484. e = Math.floor(Math.log(value) / Math.LN2)
  13485. if (value * (c = Math.pow(2, -e)) < 1) {
  13486. e--
  13487. c *= 2
  13488. }
  13489. if (e + eBias >= 1) {
  13490. value += rt / c
  13491. } else {
  13492. value += rt * Math.pow(2, 1 - eBias)
  13493. }
  13494. if (value * c >= 2) {
  13495. e++
  13496. c /= 2
  13497. }
  13498. if (e + eBias >= eMax) {
  13499. m = 0
  13500. e = eMax
  13501. } else if (e + eBias >= 1) {
  13502. m = ((value * c) - 1) * Math.pow(2, mLen)
  13503. e = e + eBias
  13504. } else {
  13505. m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
  13506. e = 0
  13507. }
  13508. }
  13509. for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
  13510. e = (e << mLen) | m
  13511. eLen += mLen
  13512. for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
  13513. buffer[offset + i - d] |= s * 128
  13514. }
  13515. /***/ }),
  13516. /***/ "4b85":
  13517. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  13518. "use strict";
  13519. __webpack_require__.r(__webpack_exports__);
  13520. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Progress_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("5310");
  13521. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Progress_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Progress_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
  13522. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Progress_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Progress_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  13523. /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Progress_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
  13524. /***/ }),
  13525. /***/ "4b93":
  13526. /***/ (function(module, exports) {
  13527. /**
  13528. * Checks if `value` is object-like. A value is object-like if it's not `null`
  13529. * and has a `typeof` result of "object".
  13530. *
  13531. * @static
  13532. * @memberOf _
  13533. * @since 4.0.0
  13534. * @category Lang
  13535. * @param {*} value The value to check.
  13536. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  13537. * @example
  13538. *
  13539. * _.isObjectLike({});
  13540. * // => true
  13541. *
  13542. * _.isObjectLike([1, 2, 3]);
  13543. * // => true
  13544. *
  13545. * _.isObjectLike(_.noop);
  13546. * // => false
  13547. *
  13548. * _.isObjectLike(null);
  13549. * // => false
  13550. */
  13551. function isObjectLike(value) {
  13552. return value != null && typeof value == 'object';
  13553. }
  13554. module.exports = isObjectLike;
  13555. /***/ }),
  13556. /***/ "4e21":
  13557. /***/ (function(module, exports, __webpack_require__) {
  13558. "use strict";
  13559. var _interopRequireDefault = __webpack_require__("8e6d");
  13560. Object.defineProperty(exports, "__esModule", {
  13561. value: true
  13562. });
  13563. exports.getLanguage = getLanguage;
  13564. exports.geti18n = geti18n;
  13565. exports.setLocale = setLocale;
  13566. exports.initi18n = initi18n;
  13567. exports.default = exports.lang = void 0;
  13568. var _defineProperty2 = _interopRequireDefault(__webpack_require__("279f"));
  13569. var _jsCookie = _interopRequireDefault(__webpack_require__("f53a"));
  13570. var _en = _interopRequireDefault(__webpack_require__("7fd4"));
  13571. var _zh = _interopRequireDefault(__webpack_require__("99ae"));
  13572. var _lodash = _interopRequireDefault(__webpack_require__("25a2"));
  13573. var _vueI18n = _interopRequireDefault(__webpack_require__("2efc"));
  13574. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
  13575. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
  13576. var dateTimeFormats = {
  13577. en: _en.default.dateTimeFormat,
  13578. zh: _zh.default.dateTimeFormat
  13579. };
  13580. var i18n = {};
  13581. var rooti18n;
  13582. var messages = {
  13583. en: _objectSpread({}, _en.default),
  13584. zh: _objectSpread({}, _zh.default)
  13585. };
  13586. function getLanguage() {
  13587. var lang = _jsCookie.default.get('language');
  13588. if (!lang) {
  13589. if (navigator.appName === 'Netscape') {
  13590. lang = navigator.language;
  13591. } else {
  13592. lang = navigator.browserLanguage;
  13593. }
  13594. }
  13595. if (lang) {
  13596. if (lang.indexOf('zh') === 0) {
  13597. return 'zh';
  13598. }
  13599. if (lang.indexOf('en') === 0) {
  13600. return 'en';
  13601. }
  13602. }
  13603. return 'zh';
  13604. }
  13605. function geti18n(n) {
  13606. return rooti18n || i18n;
  13607. }
  13608. function setLocale(locales) {
  13609. i18n.mergeLocaleMessage && i18n.mergeLocaleMessage(i18n.locale, locales);
  13610. }
  13611. var lang = {
  13612. en: (0, _lodash.default)(_en.default),
  13613. zh: (0, _lodash.default)(_zh.default)
  13614. };
  13615. exports.lang = lang;
  13616. function initi18n(Vue, config) {
  13617. config = config || {};
  13618. if (config.i18n) {
  13619. i18n = config.i18n;
  13620. if (!i18n.getDateTimeFormat().hasOwnProperty()) {
  13621. i18n.setDateTimeFormat('en', _en.default.dateTimeFormat);
  13622. i18n.setDateTimeFormat('zh', _zh.default.dateTimeFormat);
  13623. }
  13624. i18n.mergeLocaleMessage && i18n.mergeLocaleMessage('en', _en.default);
  13625. i18n.mergeLocaleMessage && i18n.mergeLocaleMessage('zh', _zh.default);
  13626. } else if (!Vue.prototype.hasOwnProperty('$i18n')) {
  13627. Object.defineProperty(Vue.prototype, '$i18n', {
  13628. get: function get() {
  13629. if (!rooti18n && this.$root && this.$root.$options.i18n) {
  13630. rooti18n = this.$root.$options.i18n;
  13631. }
  13632. return rooti18n || i18n;
  13633. }
  13634. });
  13635. Vue.use(_vueI18n.default);
  13636. i18n = new _vueI18n.default({
  13637. dateTimeFormats: dateTimeFormats,
  13638. locale: getLanguage(),
  13639. fallbackLocale: 'zh',
  13640. messages: messages
  13641. });
  13642. }
  13643. if (config.locale) {
  13644. setLocale(config.locale);
  13645. }
  13646. }
  13647. var _default = i18n;
  13648. /*
  13649. Example
  13650. 假设国际化资源配置为:
  13651. layerList: {
  13652. title: "图层",
  13653. hello: '{msg} world',
  13654. hello1: '{0} world',
  13655. theWorld: 'the world',
  13656. dio: 'DIO:',
  13657. linked: '@:(message.dio) @:(message.theWorld) !!!!',
  13658. apple: 'no apples | one apple | {count} apples'
  13659. },
  13660. vue中调用:
  13661. this.$tc('layerList.apple',10,{ count: 20 })
  13662. 文本模板调用:
  13663. $t方法:
  13664. <span>{{$t("layerList.title")}}</span>
  13665. ==>
  13666. <span>图层</span>
  13667. <span>{{$t("layerList.hello",{msg:"hello"})}}</span>
  13668. ==>
  13669. <span>hello world</span>
  13670. <span>{{$t("layerList.hello1",["bye"])}}</span>
  13671. ==>
  13672. <span>bye world</span>
  13673. <span>{{$t("layerList.linked")}}</span>
  13674. ==>
  13675. <span>DIO: the world !!!!</span>
  13676. $tc方法:
  13677. <p>{{ $tc('layerList.apple', 0) }}</p>
  13678. ==>
  13679. <p>no apples</p>
  13680. <p>{{ $tc('layerList.apple', 1) }}</p>
  13681. ==>
  13682. <p>one apple</p>
  13683. <p>{{ $tc('layerList.apple', 10}}</p>
  13684. ==>
  13685. <p>10 apples</p>
  13686. <p>{{ $tc('layerList.apple', 10, { count: 20 }) }}</p>
  13687. ==>
  13688. <p>20 apples</p>
  13689. 日期格式处理($d):https://kazupon.github.io/vue-i18n/guide/datetime.html
  13690. 数字格式处理($n):https://kazupon.github.io/vue-i18n/guide/number.html
  13691. */
  13692. exports.default = _default;
  13693. /***/ }),
  13694. /***/ "4fe1":
  13695. /***/ (function(module, exports) {
  13696. function _iterableToArray(iter) {
  13697. if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
  13698. }
  13699. module.exports = _iterableToArray;
  13700. /***/ }),
  13701. /***/ "50c6":
  13702. /***/ (function(module, exports, __webpack_require__) {
  13703. "use strict";
  13704. var _interopRequireDefault = __webpack_require__("8e6d");
  13705. Object.defineProperty(exports, "__esModule", {
  13706. value: true
  13707. });
  13708. exports.tranformSingleToMulti = tranformSingleToMulti;
  13709. exports.sortData = sortData;
  13710. exports.default = void 0;
  13711. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__("4066"));
  13712. var _defineProperty2 = _interopRequireDefault(__webpack_require__("279f"));
  13713. var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
  13714. var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
  13715. var _slicedToArray2 = _interopRequireDefault(__webpack_require__("5e4c"));
  13716. var _getFeatures = _interopRequireDefault(__webpack_require__("6e0d"));
  13717. var _lodash = _interopRequireDefault(__webpack_require__("ca6a"));
  13718. var _lodash2 = _interopRequireDefault(__webpack_require__("2df9"));
  13719. var _lodash3 = _interopRequireDefault(__webpack_require__("ae5c"));
  13720. var _util = __webpack_require__("1448");
  13721. var _statistics = __webpack_require__("9dde");
  13722. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
  13723. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
  13724. // 三方服务请求的结果为单对象的时候,是否要转成多个features
  13725. function tranformSingleToMulti(data) {
  13726. var dataInfo = (data.features[0] || {}).properties;
  13727. if (dataInfo) {
  13728. data.features = Object.entries(dataInfo).map(function (_ref) {
  13729. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  13730. key = _ref2[0],
  13731. value = _ref2[1];
  13732. return {
  13733. properties: {
  13734. label: key,
  13735. value: value
  13736. }
  13737. };
  13738. });
  13739. return Object.assign(data, (0, _statistics.statisticsFeatures)(data.features));
  13740. }
  13741. return data;
  13742. }
  13743. function sortData(features, datasetOptions, maxFeatures, xBar) {
  13744. var matchItem = datasetOptions.find(function (item) {
  13745. return item.sort && item.sort !== 'unsort';
  13746. });
  13747. var nextFeatures = [].concat(features);
  13748. if (matchItem) {
  13749. nextFeatures = (0, _lodash3.default)(features, function (feature) {
  13750. return isNaN(+feature.properties[matchItem.yField]) ? -Number.MAX_VALUE : +feature.properties[matchItem.yField];
  13751. }, matchItem.sort === 'ascending' ? 'asc' : 'desc');
  13752. }
  13753. var maxLen = +maxFeatures;
  13754. if (maxLen && nextFeatures.length > maxLen) {
  13755. nextFeatures.length = maxLen;
  13756. }
  13757. matchItem && xBar && nextFeatures.reverse();
  13758. return nextFeatures;
  13759. }
  13760. /**
  13761. * @class EchartsDataService
  13762. * @classdesc 图表组件功能类
  13763. * @param {Chart-dataset} dataset - 请求的参数
  13764. * @param {Array.<Chart-datasetOption>} datasetOptions - 数据解析的配置。
  13765. */
  13766. /**
  13767. * @typedef {Object} Chart-dataset - 数据来源
  13768. * @property {string} [type = 'iServer'] - 服务类型 iServer, iPortal。
  13769. * @property {string} url - 服务url地址。
  13770. * @property {boolean} [withCredentials = false] - 设置请求是否带cookie
  13771. * @property {SuperMap.FilterParameter} queryInfo - 查询条件
  13772. */
  13773. /**
  13774. * @typedef {Object} Chart-datasetOption - 解析数据的配置
  13775. * @property {string} seriesType - 图表类型line, bar, scatter, pie, radar, gauge。
  13776. * @property {boolean} [isStastic = false] - 是否统计数据。
  13777. * @property {boolean} [isStack = false] - 图表(line, bar, scatter)是否堆叠
  13778. * @property {string} xField - 数据的字段,坐标值
  13779. * @property {string} yField - 数据的字段,数据值
  13780. */
  13781. var EchartsDataService =
  13782. /*#__PURE__*/
  13783. function () {
  13784. function EchartsDataService(dataset, datasetOptions) {
  13785. (0, _classCallCheck2.default)(this, EchartsDataService);
  13786. // 设置默认值
  13787. dataset.withCredentials = dataset.withCredentials || false; // 请求认证
  13788. this.dataset = dataset;
  13789. this.datasetOptions = datasetOptions;
  13790. this.dataCache = null; // 缓存的是请求后的数据
  13791. this.sortDataCache = null;
  13792. this.axisDatas = []; // 坐标data
  13793. this.serieDatas = []; // series data
  13794. this.gridAxis = {
  13795. xAxis: [],
  13796. yAxis: {}
  13797. }; // 直角坐标系
  13798. this.radarAxis = {}; // 雷达图坐标系
  13799. this.radarMax = 0; // 雷达图坐标最大值
  13800. }
  13801. /**
  13802. * @function EchartsDataService.prototype.getDataOption
  13803. * @description 获取符合echart data数据格式的数据, 入口函数。
  13804. * @returns {Object} 带有请求的数据的promise对象
  13805. */
  13806. (0, _createClass2.default)(EchartsDataService, [{
  13807. key: "getDataOption",
  13808. value: function getDataOption(dataset) {
  13809. var _this = this;
  13810. var xBar = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  13811. // 设置datasets的默认配置type,withCredentials
  13812. var promise = new Promise(function (resolve, reject) {
  13813. // 请求数据,请求成功后,解析数据
  13814. var matchItem = _this.datasetOptions.find(function (item) {
  13815. return item.sort !== 'unsort';
  13816. });
  13817. var maxFeatures = matchItem ? '' : dataset.maxFeatures;
  13818. (0, _getFeatures.default)(_objectSpread({}, dataset, {
  13819. maxFeatures: maxFeatures
  13820. })).then(function (data) {
  13821. // 兼容三方服务接口返回的一个普通的对象
  13822. if (data.transformed && !!data.features.length) {
  13823. data = tranformSingleToMulti(data);
  13824. } // 解析数据,生成dataOption
  13825. var options;
  13826. if (_this.dataset.type === 'iPortal' || _this.dataset.type === 'iServer' || _this.dataset.type === 'rest' || _this.dataset.type === 'geoJSON') {
  13827. options = _this.formatChartData(_this.datasetOptions, xBar, data);
  13828. }
  13829. resolve(options);
  13830. }).catch(function (e) {
  13831. reject(e);
  13832. });
  13833. });
  13834. return promise;
  13835. }
  13836. /**
  13837. * @function EchartsDataService.prototype.formatChartData
  13838. * @description _requestData方法中返回的数据: 设置数据,转换数据格式。
  13839. * @param {Object} data - 从superMap的iserver,iportal中请求返回的数据
  13840. * @param {Object} datasetOptions - 数据解析的配置参数
  13841. * @returns {Object} 符合echart格式的数据
  13842. */
  13843. }, {
  13844. key: "formatChartData",
  13845. value: function formatChartData(datasetOptions) {
  13846. var _this2 = this;
  13847. var xBar = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  13848. var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.dataCache;
  13849. // 清除数据缓存
  13850. this._clearChartCache(); // 设置datasetOptions
  13851. this.setDatasetOptions(datasetOptions); // 设置this.data
  13852. data = this._setData(data, xBar); // 生成seriedata
  13853. datasetOptions.forEach(function (item) {
  13854. // 生成YData, XData
  13855. var fieldData = _this2._fieldsData(data, item, xBar); // 解析YData, XData,生成EchartsOption的data
  13856. var serieData = _this2._createDataOption(fieldData, item); // 设置坐标
  13857. _this2._createAxisData(fieldData, item);
  13858. if (!serieData.tooltip) {
  13859. serieData.tooltip = _this2._fixToolTip(data, item);
  13860. }
  13861. _this2.serieDatas.push(serieData);
  13862. });
  13863. var gridAxis = (this.gridAxis.xAxis.length > 0 || JSON.stringify(this.gridAxis.yAxis) !== '{}') && this.gridAxis;
  13864. var radarAxis = this.radarAxis;
  13865. var series = this.serieDatas;
  13866. return _objectSpread({}, gridAxis, {}, radarAxis, {
  13867. series: series
  13868. });
  13869. }
  13870. /**
  13871. * @function EchartsDataService.prototype.setDatasetOptions
  13872. * @private
  13873. * @description 设置datasetOptions
  13874. * @param {Array.<Chart-datasetOption>} datasetOptions - 数据解析的配置
  13875. */
  13876. }, {
  13877. key: "setDatasetOptions",
  13878. value: function setDatasetOptions(datasetOptions) {
  13879. this.datasetOptions = datasetOptions;
  13880. }
  13881. /**
  13882. * @function EchartsDataService.prototype._setData
  13883. * @private
  13884. * @description 给实例绑定data。
  13885. * @param {Object} data - 从superMap的iserver,iportal中请求返回的数据
  13886. */
  13887. }, {
  13888. key: "_setData",
  13889. value: function _setData(data, xBar) {
  13890. var nextData = data;
  13891. if (data) {
  13892. var nextFeatures = (0, _util.filterInvalidData)(this.datasetOptions, data.features); // 只过滤空数据但不排序的原数据
  13893. this.dataCache = (0, _statistics.statisticsFeatures)(nextFeatures);
  13894. nextFeatures = sortData(nextFeatures, this.datasetOptions, this.dataset.maxFeatures, xBar);
  13895. nextData = (0, _statistics.statisticsFeatures)(nextFeatures);
  13896. this.sortDataCache = nextData;
  13897. }
  13898. return nextData;
  13899. }
  13900. /**
  13901. * @function EchartsDataService.prototype._clearChartCache
  13902. * @private
  13903. * @description 清除已经生成的chart数据的缓存。
  13904. */
  13905. }, {
  13906. key: "_clearChartCache",
  13907. value: function _clearChartCache() {
  13908. this.axisDatas = []; // 坐标data
  13909. this.serieDatas = []; // series data
  13910. this.gridAxis = {
  13911. xAxis: [],
  13912. yAxis: {}
  13913. }; // 直角坐标系
  13914. }
  13915. /**
  13916. * @function EchartsDataService.prototype._createSeriesData
  13917. * @private
  13918. * @description 生成chart的serie。
  13919. * @param {Object} fieldData - 解析后的数据{xData,yData}
  13920. * @param {Chart-datasetOption} datasetOption - 数据解析的配置
  13921. * @returns {Object} 配置好的serieData
  13922. */
  13923. }, {
  13924. key: "_createDataOption",
  13925. value: function _createDataOption(fieldData, datasetOption) {
  13926. var chartType = datasetOption.seriesType;
  13927. var XData = fieldData.xData;
  13928. var YData = fieldData.yData;
  13929. var serieData = {
  13930. type: chartType,
  13931. name: datasetOption.yField,
  13932. data: []
  13933. };
  13934. if (chartType === 'pie') {
  13935. YData.forEach(function (value, index) {
  13936. serieData.data.push({
  13937. value: value,
  13938. name: XData[index]
  13939. });
  13940. });
  13941. } else if (chartType === 'radar') {
  13942. var yData = (0, _toConsumableArray2.default)(YData);
  13943. serieData.data.push({
  13944. value: (0, _toConsumableArray2.default)(YData),
  13945. name: datasetOption.yField
  13946. }); // 获取雷达图的max最大值
  13947. var maxValue = (0, _lodash2.default)(yData);
  13948. this.radarMax = Math.max(maxValue, this.radarMax);
  13949. } else {
  13950. // line bar scatter gauge
  13951. serieData.data = (0, _toConsumableArray2.default)(YData); // 是否堆叠数据(line,bar,scatter)
  13952. if (datasetOption.isStack) {
  13953. serieData.stack = 1;
  13954. } else {
  13955. serieData.stack = 0;
  13956. }
  13957. }
  13958. return serieData;
  13959. }
  13960. /**
  13961. * @function EchartsDataService.prototype._fixToolTip
  13962. * @private
  13963. * @description 调整tooltip显示,Todo 考虑支持用户自定义tooltip内容
  13964. * @param {Object} data - 数据
  13965. * @param {Chart-datasetOption} datasetOption - 数据解析的配置
  13966. * @returns {Object} tooltip
  13967. */
  13968. }, {
  13969. key: "_fixToolTip",
  13970. value: function _fixToolTip(data, datasetOption) {
  13971. if (data.transformed) {
  13972. if (datasetOption.seriesType === 'pie') {
  13973. return {
  13974. trigger: 'item',
  13975. formatter: '{b} : {c} ({d}%)'
  13976. };
  13977. }
  13978. return {
  13979. trigger: 'item',
  13980. formatter: '{b} : {c}'
  13981. };
  13982. }
  13983. return null;
  13984. }
  13985. /**
  13986. * @function EchartsDataService.prototype._createSeriesData
  13987. * @private
  13988. * @description 生成chart的serie。
  13989. * @param {Object} fieldData - 解析后的数据{xData,yData}
  13990. * @param {Chart-datasetOption} datasetOption - 数据解析的配置
  13991. * @returns {Object} 配置好的坐标data
  13992. */
  13993. }, {
  13994. key: "_createAxisData",
  13995. value: function _createAxisData(fieldData, datasetOption) {
  13996. var chartType = datasetOption.seriesType;
  13997. var XData = fieldData.xData;
  13998. var radarData = [];
  13999. var axisData;
  14000. if (chartType === 'radar' && XData) {
  14001. var radarMax = this.radarMax;
  14002. XData.forEach(function (text) {
  14003. radarData.push({
  14004. text: text,
  14005. max: radarMax
  14006. });
  14007. });
  14008. this.radarAxis = {
  14009. radar: {
  14010. indicator: radarData
  14011. }
  14012. };
  14013. axisData = this.radarAxis;
  14014. } else if (['bar', 'line', 'scatter', '2.5Bar'].find(function (item) {
  14015. return item === chartType;
  14016. })) {
  14017. var data = XData && (0, _toConsumableArray2.default)(XData);
  14018. if (!this.gridAxis.xAxis) {
  14019. this.gridAxis.xAxis = [];
  14020. this.gridAxis.yAxis = {};
  14021. }
  14022. if (this.gridAxis.xAxis.length === 0) {
  14023. this.gridAxis.xAxis.push({
  14024. data: data
  14025. });
  14026. } else {
  14027. this.gridAxis.xAxis[0] = {
  14028. data: data
  14029. };
  14030. }
  14031. axisData = this.gridAxis;
  14032. } else {
  14033. axisData = {};
  14034. }
  14035. return axisData;
  14036. }
  14037. /**
  14038. * @function EchartsDataService.prototype._fieldsData
  14039. * @private
  14040. * @description 将请求回来的数据,转换成适用于chart配置的数据。
  14041. * @param {Object} data - 从superMap的iserver,iportal中请求返回的数据
  14042. * @param {Chart-datasetOption} datasetOption - 数据解析的配置
  14043. * @returns {Object} 解析好的Ydata,xdata
  14044. */
  14045. }, {
  14046. key: "_fieldsData",
  14047. value: function _fieldsData(data, datasetOption) {
  14048. var xBar = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  14049. var fieldCaptions, fieldValues, xFieldIndex, yFieldIndex, fieldValueIndex, xData, yData, result;
  14050. var sort = datasetOption.sort,
  14051. yField = datasetOption.yField,
  14052. xField = datasetOption.xField,
  14053. isStastic = datasetOption.isStastic;
  14054. fieldCaptions = data.fieldCaptions; // 所有x字段
  14055. xFieldIndex = fieldCaptions.indexOf(xField); // x字段的下标
  14056. yFieldIndex = fieldCaptions.indexOf(yField); // y字段的下标
  14057. fieldValues = yFieldIndex < 0 ? [] : data.fieldValues[yFieldIndex]; // y字段的所有feature值
  14058. // 该数据是否需要统计,统计的是数组下标
  14059. if (isStastic) {
  14060. fieldValueIndex = this._getUniqFieldDatas(data, xFieldIndex, sort); // 生成统计后的数据
  14061. xData = this._stasticXData(fieldValueIndex, sort);
  14062. yData = this._stasticYData(fieldValues, fieldValueIndex, sort);
  14063. } else {
  14064. // 如果不是统计图表
  14065. xData = this._getFieldDatas(data, xFieldIndex);
  14066. yData = (0, _toConsumableArray2.default)(fieldValues);
  14067. }
  14068. result = {
  14069. xData: xData,
  14070. yData: yData
  14071. };
  14072. return result;
  14073. }
  14074. /**
  14075. * @function EchartsDataService.prototype._stasticXData
  14076. * @private
  14077. * @description 统计X字段数据,生成xData。
  14078. * @param {Object} fieldValueIndex - x字段的统计索引
  14079. * @returns {Array} 统计后的Xdata、
  14080. */
  14081. }, {
  14082. key: "_stasticXData",
  14083. value: function _stasticXData(fieldValueIndex) {
  14084. var xData = Object.keys(fieldValueIndex);
  14085. return xData;
  14086. }
  14087. /**
  14088. * @function EchartsDataService.prototype._stasticYData
  14089. * @private
  14090. * @description 统计数据,生成yData。
  14091. * @param {Object} fieldValues - y字段的所有feature值
  14092. * @param {Object} fieldValueIndex - x字段的统计索引
  14093. * @returns {Array} 统计后的Ydata、
  14094. */
  14095. }, {
  14096. key: "_stasticYData",
  14097. value: function _stasticYData(fieldValues, fieldValueIndex) {
  14098. var yData = []; // 统计Y字段
  14099. for (var key in fieldValueIndex) {
  14100. var total = 0;
  14101. fieldValueIndex[key].forEach(function (index) {
  14102. // 清除字符串型的数字的逗号
  14103. var num = fieldValues[index] && (0, _util.clearNumberComma)(fieldValues[index]);
  14104. total += (0, _lodash.default)(num);
  14105. });
  14106. yData.push(total);
  14107. }
  14108. return yData;
  14109. }
  14110. /**
  14111. * @function EchartsDataService.prototype._getUniqFieldDatas
  14112. * @private
  14113. * @description 获取x轴字段要统计的属性值
  14114. * @param {Object} data - 从superMap的iserver,iportal中请求返回的数据的fieldValue
  14115. * @param {String} fieldIndexs - x字段索引值数组
  14116. * @returns {Object} 返回x轴字段要统计的属性值,返回值为eg:[fieldIndex:1, statiscIndex:{浇水地:[5,2,5,4], 林地:[5,2,5,4]...}]。
  14117. */
  14118. }, {
  14119. key: "_getUniqFieldDatas",
  14120. value: function _getUniqFieldDatas(data, fieldIndex) {
  14121. var fieldValues = this._getFieldDatas(data, fieldIndex);
  14122. var uniqFieldValues = {};
  14123. if (fieldValues) {
  14124. fieldValues.forEach(function (value, index) {
  14125. if (!uniqFieldValues[value]) {
  14126. uniqFieldValues[value] = [index];
  14127. } else {
  14128. uniqFieldValues[value].push(index);
  14129. }
  14130. });
  14131. }
  14132. return uniqFieldValues;
  14133. }
  14134. /**
  14135. * @function EchartsDataService.prototype._getFieldDatas
  14136. * @private
  14137. * @description 。
  14138. * @param {Object} data - 从superMap的iserver,iportal中请求返回的数据的fieldValue
  14139. * @param {String} fieldIndex - x字段索引值
  14140. * @returns {Array} 返回的是一个数组[林地, 旱地, 林地,沼泽,旱地...]
  14141. */
  14142. }, {
  14143. key: "_getFieldDatas",
  14144. value: function _getFieldDatas(data, fieldIndex) {
  14145. // 获取x字段所有值,
  14146. return data.fieldValues[fieldIndex];
  14147. }
  14148. }]);
  14149. return EchartsDataService;
  14150. }();
  14151. exports.default = EchartsDataService;
  14152. /***/ }),
  14153. /***/ "5106":
  14154. /***/ (function(module, exports) {
  14155. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhYAAAD+CAYAAABmz0wVAAAABGdBTUEAALGPC/xhBQAANrxJREFUeAHt3QmcXGWd7vH3nFPVa9ZOYlYgbAIJIIu4IggqCjPjXBDxznVmnLkzd7xzHRY3FCGkERFxZbnO4vXq1RlnVMZxxgWRsCnKDiIMO0GW7DtJ73WW+/zfU1VdXalOKiVIkv5V0l1nec9S3+5PzpP3fc97AvcSvN5wzTd6M+eWjrfrwLlLbj/7fb216wvnXPKW1LkfuizrrF3ONAIIIIAAAgj8LgWCLHDBXybXXPy1Vo6qa/yL+7JQMdDfv/ThBx50pZFSdefFtqJbfNSRrqu7u1GoOEmh4seEiioXEwgggAACe7qArrBBELogDFwURs7pPQw1r2VhFLooijSvS7hfpnctj6xsMXKa0zpbr7L2Fdn6wBUKhdFlfj/5PqOCtlF5296XV9nRY2i/5fMoFgsqUz6+3v203p3LtJ0dN3OrVq51v7jtzjROkr9Irrz4/+3qj+FFDRYthYqzP3li6tLrhNL12tce7ebMm+M/qH4c/oNWPpCB2itVVUgQ6Jt9/DT10Jkg/EsZy0/r3VmZ/K/yispZec2nfmF1C5XRtJUrl0/9jBboldm68rvtTLvxy+zUrJi9rEzlPdPJpVZIr3w3Wuf/2n7sT37Ofr2V0fn79eWPaudpn8+/7Nj+y+Zs2s7cPoO+23I7Vl5Qq23f/i3fxpbbvu1N6/wxfJl8n7bctti0bpPbsnGTzfJCAAEEEHiRBexSFPoLvF30ywGhfIEPFSrsuuaDRiUM2IVegcPK2gU/DyAqY4FDwSEPGHrXdn6dtrOgoA1UXuUKOoamK8csVraxY1uQ8futhJX82HY8v38fdDSt/VgI2bBhs/vJdTemcSn+s+Tqpf+4KzR2SXtRXi2FinM/dXyaJdcXorD7Hae9xc2bN9vygl7l07KLYnk2s4oZuxyWF+Vv5YumXTm11i6itqW/IOvCaz9Uf+HXan+BtX2pjE375ZpNrZwu0bb3vEx+jPzCrWl/pc+3scNY6er+K8ey5eV95vut7ENBwR/T1isY2Gna0aplNacAkO8z34dm8nn7bufm522dhZB83t79udbsx7bLz9/K+b91ZWxbrdBKK7d5/Sa3eQOhwn4ivBBAAIGXREDXoDw45Bdvq7nwAUOhwgcHCwM+QOTL8xqMSg1HHjBsm0JUrqXwIcUChy7+2kehHBzy/Y7WVhRs//qyMJGHDIWKwObzfVmY8IHCBw0LE/lXpPVWs+JrUXRN3LB+o/vRj5alcZz8SXLVxf/crFH5Ct5s8cblWgoV53zqDWkW/1QpbNI73nGym79gjlNzyWB3d/daO4pdAvU/c2n7qoTyeWpay7Ig0NXYX0CtmAJEkNi75Qh71xr9danmbTt/Hdcqiwi2zF93/XR+nbbLtyUL28auvSpvV+AgtaOVt7PE4rdXKU0Hmk61ryDPH3YM/bXj24Qd07bXNvn2fj/5ctu3frEsz2h7zdjZ6fwVMLTcZUkWxH63Oo7tz87Hl8vPT/vUfu3Ta0srb+vtsNpf4svZvPZve863z9/125wKSVtmWSFJ7vv6ooX36zx5IYAAAgi8RALvfvjhthfiuBh1dUUdm+Ji0tVeSJOS8kDYkaZRIcsStWzoPU0LxSjozNKwUFB7hP65L6ah6h/CoBClrlPXOC3LigoUhVD/hCtIqJrCdfh5LVd8UU7Rehd26LpZCKKwoH/rC5HKa9uiLVPA6FDNREHXl4KuDVbNofoNV9Al1rbT9kGnbaP9FgYHh2bGcWmqhYz16za4f//+DYnm/zi5+uJvN0Ol/f92r1ZCRfHsT70uCZIblJgmW6hYsO9cpafC0KTurvX+bPK2Dk3qupwvsEusHOx0bZkFC2u8sEAgGrushj50WCHbwocDzdhFXpspCOQXYNtL+cLv92jhRcssKJQvxHYBt7J+53pXdtAefWCwd9u+etG2aS3zy304sGk1hmh7f0xbb+dmwcdaORQEtAfbZnSfPqT4D+XL2nb5+duyPDDoF8KHAjuO3z7U9joJCwr+U/vz0q9kpkDhEksusb05lbNztR1pzm+jfdz7jcP2u89ceCGAAAIIIFAR6H143aTB6dHXdVU9bmhoeGaSxN1W87Fm1Vr3b9+/3sLFHyVXLb22Un68d11nWn+1FCo++KnX6GSXqeplyjtOPdntu898dVQpDHd3da7TRdWugE9mUXheGCfDkV0O9YrtgqpXoa1tzLwbGnaF9vbMDQ25uPxesm06LI51ZIqDvnxJl2Pbvlidz5cXlM98+cq6fudGurSuz0o7N1wu36bLc1v3pGyr2+rcNufaJmVZezrZ73PIIot/bXHtU6dmA+VtbFGnhQp7bdzo+np6MpfHJtc1Q8t9vYxzW2flZbqTxJedGi/Q+zN+M/s+eeHCzD31lJ+fMXKQ1j3iVi1alO/Xlt6XZ4R5xx6bL7v1Vl/Wvj385jfny67Nfw++++53W+AZ3bZakgkEEEAAAQSc6123btJQKfxn1Yq8Jh4Zmab/FLfb/57XrV3vvnvtD+NSKf6vChff25FVy8GixVDx6iROblRzztS3q6Ziv/0WWIeUkpo/1tl/qtWUtLzNtZ3ZO2/Khh2dNOsQQAABBBBA4KURsHBRSqLv6L/kr4uTeJKa/dusH8bKVavdd779w1IpSc5Krlzy7+MdvaVg0VKoOO+yY1RTcaOq9aef8o6T3ML9FSqisNQ9qXuDTtr+J/105orvunzu5PL/68c7ZZYjgAACCCCAwEspcP5j6ycXp4XfVx3361Uv367/+EeJbjZ4/vnVqrn4UUkdOs9Mrlryg0bnYDev7tKrxVBxVJKWlqk7xPS3veMEt/8B+1jP09hChfVYVf+IZ1zY9m5CxS79KCiMAAIIIIDASyLw2UNnbStF6en6T//duk4n6iuoFpHAzZs/x535rlOL6mV6bXTeJb/X6OC7FCxaCRVt5152pNVU6OR63nbKm90BB+xvnSmTrkmdG/RuvSKfaQ/jMz89e1K510Gj02QZAggggAACCPwuBT47a9a24Sh5py7av1T3wUHd1RCr14KGhpjjzjj9tLZCVPyewsWp9efUdLBoKVScc9nhcVa6SflhxlveeoI78MCFuokjSLq7OzfYvTE6mefak+zM3le8Yk39iTGPAAIIIIAAAi+vQB4u4j9UdcUd6mcxoLMpxWoSecXsme4P/uBt7bpf9t8KZ196Su1ZNhUsWgoVZ396kYUKHWzmSW893h10kNVUuNSHiiiyeylWhHH2rt59Z62qPSGmEUAAAQQQQGD3EbBwUdqSnq7aijujYnGrOjAMJxoEYdbsGe7UU9/aEbWF/1H44KVvrZzxTjtvthQqzrv0MCWaW3Snx+yTTj7eHXLIQTb8RtrV1b5B41Uk6gyyUl9nXDZ/xvOVE+EdAQQQQAABBHZfgd51me4W2fQdjaRwVN/g4LRkJO6yDp2rV691119/y2CapL8fX7nk5h0Gi1ZCRfu5lx5SSpNbRTPnzSe/0R16aDlUdHZu1F0gsTqBrIyz4F1XzOt5bvfl48wQQAABBBBAoF7Aj3MRh99UuDhyoH9gztDwSLfVXqxds8HdeMOtA2kpPW3cppCWQsU5lx5cyqymws054cTXu1eqpsJ6knZ2dqimIhrRcKKrXBaeSaio/1ExjwACCCCAwO4voD6RfR2F9E/VYfLeru6ulRqLaluqWoueGdPda9/w6i4N8fzjhsGipVBx9qUHlpxCRZbNPf6E17pDFx1sfSqyrs7O9QXdWqqEsa7ogjMvmzf92d2fjjNEAAEEEEAAgUYCFi7SqPQX6it576TJk562gaMtXMybN9fGuuzeLli0Eio6Pnj5AeVQMf8Nb3qNW7TolXb3h0JFx0Y9YGVEM2uyqHRm79zpzzQ6SZYhgAACCCCAwJ4j8Pk5c/qzYvJXGjZCXSrtEVejT4sYEyxaChXnXb5wJBm2jpr7vP6Nr/ahQk/XzDo7OjcU29oGNJ7G+iyJ3/OZ2bOf3nPIOFMEEEAAAQQQ2JGADxdZGidJ6iq1FlbeHpHqXy2Fig9/ar+RkkJF5vZ93euPdYsXH6ocEbjO9vaNbW2FAbWEbMyS9D2f2ecV+VO0KgfjHQEEEEAAAQT2eAE9Tls1FoligH+2t/88Pli0Eio6P/SpfYZHEuuoufC41xztFh1+qHXUdNZRs629qGeAhptcmvw3QsUe/3vDB0AAAQQQQKChgAbOKiX2kG6NIZHG1iSiq39LoeLsKxYMxxYqsv1ffdyr3BGvOkyZInAdHW0b29vbtmp6UyFL3nv5gllPNDwTFiKAAAIIIIDAHi+gob59HwuNYeFs5Et7FfS29OEHHnSlkVL1Axbbim7xUUe6ru7uS24/+3291RWa6Dr/inlDQ0M3q+fngUcfc4Q7/MjFWqpQ0d6+qaOzc5PyxVZllj/51PxZj9duxzQCCCCAAAII7F0C6repYJGpKUQ1FgoX9vJNIU2HivMumzs0OKiaCnfwUUcf7o44arG1frj2trbNXd0dG5Qvtlmo+Oy8mY/6vfMNAQQQQAABBPZaAQ1Vpc6bidUv6JbTvMZizF0hO6qp6D73stlDSelm6bzyiCMXuSOPOtyaVFybhYrJ3XoyabDVlUrvI1Tstb8/fDAEEEAAAQTGCChLxEmmZhCNZZFkChh6VYPFjkLFpI987hWDmQ8Vhy4+4lB31DGHqyUkc8X2ti2TpnSvDrJsqwuDP7tiv7kPjzkiMwgggAACCCCwFwvk41jYsN6VGgvfFLLDUHH2p2cNjPTfpOaTRYsWH+KOPuZIAQWuvaP9halTJ61wWdAfZOH/uGJuD6FiL/7V4aMhgAACCCBQL6BAMZT3rQichQt7+RqL8TpqTr7g0zMGgpEbFSoOP+Swg9xRxx7hayoKbcWtU6dMek6b9xWz8K+u2KfnofqDMY8AAggggAACe7eA7gIt2d0gpVjjb/sROMvBotHdH1M++MWe/r6S1VQc+cpDD3THvPoor6NQsW36tClPa6YvdMn//PQ+PQ/u3Wx8OgQQQAABBBBoJJDY7aZ2q6l9lTtvFtSRc7tbSqd+/PLp2wa23ahxKl510CsPcEcfm4eKqFDo6+mZ9pQGxBgMXPEDVyyY/utGB2IZAggggAACCEwAAT0rxO4KSdWBU10j/AcO68epmHbel6b1DYwsU5vH0QcetNAdowGwVNrp0aj9PT3Tn9DtpQNhGJz9uQXTH5gAZHxEBBBAAAEEEBhHQI/tiK0pxGorxjSFVMpP/9hnpm5Lt96gOz6O3f/A/dzRxx2lfOFcFEUDM3qmPxoFQX8hDM793LxZ91e24R0BBBBAAAEEJqZAphoLvXyo2C5Y9Jx99ZStg0PXK1Qct9/++7hjjzvaD35VKBQGZ86a8YjVWOgu1Q9/Zt6s+yYmH58aAQQQQAABBGoFNOKmf1aIhYpSqeaukJnnXzH5hWDTT1Q78bp991ug5g+rqdCzyoJwqGfm9IfCKNqWpcFHv7Dv3Htqd8g0AggggAACCExcAT3ddDjzY1ikyg3qZ6FXOKv3y5M2Dw1epxzxhgX7znfH6Eml9uhzhYnhWbNmPthWiOzujwu+sO9MQsXE/d3hkyOAAAIIINBAIC3ZqJvWxyIr325a2LRp/Y8VKo6fO2+Ob/6wjppBVBiZOavnQbu1NAuSi76wYM5dDfbGIgQQQAABBBCYwAKqrNCI3qkGx0p9pYRRhAoVJ9jE4UfrKaW6UyQMw9KMGdMfaGsvblZvzyVfXDDnTlvPCwEEEEAAAQQQGCMQBepjYc0g6oVZqbGoFOjs6PCTM2fOeKCzo31bkLhLvrRw9h2V9bwjgAACCCCAAAK1AgoU+dNNaxb6Z4XYvKUN/XUdnR2b9RYqVNxeU45JBBBAAAEEEEBgjEASa+RNCw+WIcprqsHC2kE0+JUGzgoyPa10zIbMIIAAAggggAAC9QJZ6PQQsvw2U9+fQgWqwUJ9Oi1V+NShqfyekfo9MI8AAggggAACCJQFrCkkHxgr0J0hecCoBgtfh2FVFkFltG/cEEAAAQQQQACB8QXUyFENFtXbTSvFfetH4Csq1A6igMELAQQQQAABBBDYgYDChIJFPoaF+lH4kqM1FnmVhTWHaE352ac72BmrEEAAAQQQQGBiC2RBWMqqDyCrCxZ+1n+z6BGEE5uKT48AAggggAACOxNIU3tseuzvLPV3gGiDao2FbwrJbxexh4RUunjubJ+sRwABBBBAAIGJKpAlQ5WBsdRF0ytUg4Wfy7tW6N6QlBqLifpLwudGAAEEEECgSYHM5U0hVrwykkU1WORPJQstb1jkyGNHkzumGAIIIIAAAghMQIFQjyCzIb310StPN60GC38niD3yVANaMD7WBPzl4CMjgAACCCCwiwIjSVjyd4UoP1RqJKrBwicN32dTI3D6iotd3DvFEUAAAQQQQGBCCRRVY5FaqCjXWtiHrwaLPGr4vGE1FvSxmFC/GnxYBBBAAAEEdl0g1e2mSZzf72FjbNqrGizy0byt60Wqob/Lo1zkZfiOAAIIIIAAAghsJxCPlIbzh5jaDaV5shgNFr6aIl9olRrbbc0CBBBAAAEEEECgRiDRXSH2rBBLD5UOmqPBwvptqqJCK63vZp4wajZmEgEEEEAAAQQQqBUIQz04vdxx00bgtFc1WOS3g/jBvNMwoI9FLRzTCCCAAAIIILC9QBLWDOldvi2kGixsXoHCXqP3jPhZviGAAAIIIIAAAtsLZKU4ieO42r/CSlSDhTWAWLiwzhdqJ6GPxfZ+LEEAAQQQQACBGoHicDpknTcVHNSdIl9Rva00f+ypr8cgVNSgMYkAAggggAACjQUKUVtsY1jYHwsX9hqtsVB9hXXd1GKFDosfvBBAAAEEEEAAgfEFhlynHpuuUKHWDl9zoaI1wSK/HUTf9RTUkGAxviNrEEAAAQQQQEACHZ2bdVeIJtSDwm43tdaQalOITxJaYneNUGPB7wsCCCCAAAII7Exg8aJF+e2magapDK05GiyUNHw1hsKF1tPPYmearEcAAQQQQGCCC/QGwXZ3klabQnyoyBtA0nLHzgnOxcdHAAEEEEAAgV0VGFNjoYYQ257ail1VpDwCCCCAAAIIeIFqsLA564ChmgsLFoQLz8M3BBBAAAEEENgVgdFgoVBhDSVBGCpbqM2EFwIIIIAAAgggsIsCo30stKH16EwT/5iy0cCxizukOAIIIIAAAghMXIHRYGF3hcjB7jjVm33xQgABBBBAAAEEdklgTLCo3A3C7aa7ZEhhBBBAAAEEECgLjAkWtkxVFZkeREaNBb8iCCCAAAIIILDLAg2Chd0VQq7YZUk2QAABBBBAAIHRIb29hR4iokyx3ShaOCGAAAIIIIAAAs0IVGssfBuIPUAk9MNZcLtpM3qUQQABBBBAAIExAtVgYU8ls1eqMSxUb1HpxzmmMDMIIIAAAggggMCOBGrGq1BtRR4nLGHQyWJHaqxDAAEEEEAAgYYC1RoL/xAyFcmCLNHImzWBo+F2LEQAAQQQQAABBLYTGBssrA0k77pJjcV2VCxAAAEEEEAAgZ0JVIOFFcw0MpYShY3BSefNncmxHgEEEEAAAQS2E6gGi3LfTUsVqRpC6Ly5HRULEEAAAQQQQGBnAtW+FGmlkiLwd4XQFLIzOdYjgAACCCCAwHYC1RoL3wCisbGsFUTfaQrZjooFCCCAAAIIILAzgWqwyJtCVFERWMQIqbHYmRzrEUAAAQQQQGA7gWqwsMeOWZrQraaJWkN+tl1JFiCAAAIIIIAAAjsRqPaxyKsoMhcF2a1fPWjBzTvZjtUIIIAAAggggMB2AtUaCxsga+2qNe4rBy24ZbtSLEAAAQQQQAABBJoQqAaLtatWuzUr1zSxCUUQQAABBBBAAIHGAtWmEEJFYyCWIoAAAggggEDzAtVg0fwmlEQAAQQQQAABBBoLECwau7AUAQQQQAABBFoQIFi0gMYmCCCAAAIIINBYgGDR2IWlCCCAAAIIINCCAMGiBTQ2QQABBBBAAIHGAgSLxi4sRQABBBBAAIEWBAgWLaCxCQIIIIAAAgg0FiBYNHZhKQIIIIAAAgi0IECwaAGNTRBAAAEEEECgsQDBorELSxFAAAEEEECgBQGCRQtobIIAAggggAACjQUIFo1dWIoAAggggAACLQgQLFpAYxMEEEAAAQQQaCxAsGjswlIEEEAAAQQQaEGAYNECGpsggAACCCCAQGMBgkVjF5YigAACCCCAQAsCBIsW0NgEAQQQQAABBBoLECwau7AUAQQQQAABBFoQIFi0gMYmCCCAAAIIINBYgGDR2IWlCCCAAAIIINCCAMGiBTQ2QQABBBBAAIHGAgSLxi4sRQABBBBAAIEWBAgWLaCxCQIIIIAAAgg0FiBYNHZhKQIIIIAAAgi0IECwaAGNTRBAAAEEEECgsQDBorELSxFAAAEEEECgBQGCRQtobIIAAggggAACjQUIFo1dWIoAAggggAACLQgQLFpAYxMEEEAAAQQQaCxAsGjswlIEEEAAAQQQaEGAYNECGpsggAACCCCAQGMBgkVjF5YigAACCCCAQAsCBIsW0NgEAQQQQAABBBoLECwau7AUAQQQQAABBFoQIFi0gMYmCCCAAAIIINBYgGDR2IWlCCCAAAIIINCCAMGiBTQ2QQABBBBAAIFRgSnTp1VnCBZVCiYQQAABBBBAYFcFpvZMc9NmECx21Y3yCCCAAAIIIFAn8N5Hlx8xbcZ0LQ2qa6ixqFIwgQACCCCAAALNCvzpY88f6Vx0hJUPgtFgUWh2B5RDAAEEEEAAAQQqAqlLjgiCyFKF6itGgwU1FhUh3hFAAAEEEECgaQHVUoRpmoZhMDZKUGPRNCEFEUAAAQQQQKAikOUtIL6qorYpZGzMqJTmHQEEEEAAAQQQ2IFAkAZhNqZ3RV6YGosdoLEKAQQQQAABBBoLqGtFGLjUBfruMtVflF8Ei4oE7wgggAACCCDQtIDVVoROnTet4+Zo301HsGiakIIIIIAAAgggUBGwm0Eyl6p7hdVYVJY6gsUoBVMIIIAAAggg0LRAmka+osJXWIxWWVBj0bQgBRFAAAEEEECgImC3mwZhmFmk8N/KKwgWFSHeEUAAAQQQQKBpAYUJ/VHnTT9A1uhm3G46asEUAggggAACCDQpEIRqCUl1Z4j1sbCv8otgUZHgHQEEEEAAAQSaFsji1EKFDxajscI5gkXThBREAAEEEEAAgYpAGPkMkddYVBbqnT4WNRhMIoAAAggggECTAr4NRGV9S8honQXBokk/iiGAAAIIIIDAqIDlCZvz+aKm/aNmcrQwUwgggAACCCCAwA4FMo1j4Yf1LoeLcmFqLHaoxkoEEEAAAQQQaCTgH0CW2ggWdt/p6Isai1ELphBAAAEEEECgSQHdbKqnm9oYWbWxgs6bTfJRDAEEEEAAAQRqBfR4kEBPNVUFhRJGTTVFzWRtcaYRQAABBBBAAIEdCejhpj5F1DyBTMXpY7EjM9YhgAACCCCAQEMBPdo0VE1FVrnrtFKIGouKBO8IIIAAAggg0LSA6iuC1Ib0ti0Y0rtpNwoigAACCCCAQAMBX1URZOq96Z9GVi1BU0iVggkEEEAAAQQQaFZANRXW6qFUoc6bNTecEiyaFaQcAggggAACCIwKZPYAskjzujmk5o5TgsUoEVMIIIAAAggg0KSAv91Uz02v77xJsGgSkGIIIIAAAgggMCqguoow1az129QonNUVBIsqBRMIIIAAAggg0KyAmj8ClypW0MeiWTLKIYAAAggggMC4AlkW2b2mvimkZowsaizGFWMFAggggAACCIwnYJnC1uXf/HdflAGyxhNjOQIIIIAAAgiMK5B33lSwsHEsRnMFQ3qPK8YKBBBAAAEEEBhXQE0gkXptptbVIq+2yItSYzEuGSsQQAABBBBAYHwB9dysporRKguCxfhirEEAAQQQQACB8QSCIFSFRahRssaUoPPmGA5mEEAAAQQQQKAZgcDGxtKTQqwZpHZIb2osmtGjDAIIIIAAAgiMFdAjQrLKwJs1lRbUWIxlYg4BBBBAAAEEmhBQ94owC2zMTf2pCRbUWDSBRxEEEEAAAQQQGCuQN4JYc4iiRE2yoMZirBNzCCCAAAIIINCEgOoqMkUK9d2sqa7QdgSLJvAoggACCCCAAAJjBQIN6W0dN7NMEaMmXBAsxjoxhwACCCCAAALNCWjMTXWzsAeG1LzoY1GDwSQCCCCAAAIINC2grpupcoUfJau6ETUWVQomEEAAAQQQQKBZARvEQg0h5UaQ0VoLgkWzgpRDAAEEEEAAgVGBVH03fbuH3Xg6uphgMWrBFAIIIIAAAgg0K1CJFb7iYnSjmowxupApBBBAAAEEEEBgRwK+a0X12emjJQkWoxZMIYAAAggggECTAnaTqRpDdKcpnTebJKMYAggggAACCIwnoEebRlkW+Gen15ahj0WtBtMIIIAAAggg0JSAtYLkw3qPrbGgKaQpPgohgAACCCCAQK2AAkSoUTdDe1SIBvauriJYVCmYQAABBBBAAIFmBdS/wrpYKEdo/M3yaBa2LcGiWUHKIYAAAggggECNgH9s+th2EK2lj0UNEZMIIIAAAggg0JyAOm+GqYrW1lbYltRYNOdHKQQQQAABBBCoEUjVEmKNILZIHTmrL4JFlYIJBBBAAAEEEGhWQInChwr/ELLRvps0hTQLSDkEEEAAAQQQqBFQdYWvqlDHzdpaCvpY1BgxiQACCCCAAALNCaiSIsz04HQbeZOmkObMKIUAAggggAAC4wiUm0J8I4iFi8qrtvaisox3BBBAAAEEEEBgpwJ2Z0j9s0IIFjtlowACCCCAAAII1AvkDzYNynebUmNR78M8AggggAACCOyCgEbGiqzXpm8GGc0VYzpy7sLuKIoAAggggAACE1lAWcLihHpXjB3Sm7tCJvJvBZ8dAQQQQACBFgUyP5i39drUxHY1FlrgbxXR+7u/+92oxWOwGQIIIIAAAghMEIF82E2NvlkTKuyj5503tdSee2rtJI8sXkywmCC/FHxMBBBAAAEEWhbQg0IsPtj2vvKivCO/INRTT9WvU1+hO2BwOs0jLSuzIQIIIIAAAhNFIAhThQurmKjtsZknjcjaRyxYBK6QvNA5UUj4nAgggAACCCDQmoD1sbBqCetMUdse4msnAltlbST6lnS1U2PRmjFbIYAAAgggMGEErJ4iDVzqA0Q6Oqi3DxGV/hVeo1igj8WE+bXggyKAAAIIILDrAh9ZseHkNFM7iCorrLZCtRfVV15j4W8V8VUWLktK1FhUeZhAAAEEEEAAgVqBD61YfVKWZUstVGzetHl/tYi4gcHBahEfIqJipZIicFFaLFbXMoEAAggggAACCJQFPrJ6/ZvVYfMSl2WFzVu27Ds4ODg/U8L49f0PlUsEWV5jYX0vyq80jamxqGDwjgACCCCAAAJe4IPPrz8xS7LL9KT0cMuWFxYMDQzNt7aOu++4z61auVpT/hnq/8uHCDWQVNnUxYJgUdVgAgEEEEAAAQQ+aqHCuSvSLAv6tvbPG+gfWqCKCnf37fe5555dkQMF7uz06ov/Pg8W1vGiPLxFmiUEC36HEEAAAQQQQMALfOy5dSckLvucOmiGA339r+jr719g9RF33HGve/aZ53OlMDw3veriL9uMDxE2MJaNY5Epfah3Z0deiu8IIIAAAgggMJEFPrpq05uSJPmC6h6igf6Bmf19g/tYG8ddChXPPP1cThMGH1KouLriNBostCTQQFmhS+m8WdHhHQEEEEAAgQkq8LFV645P0+RK1TsUBgaHpvX39S+wwbvvvvN+9/TyZ3OVIPyoQsWXaonKTSGhCxUqbHiLLA1pCqkVYhoBBBBAAIEJJnDByk1vjNP4Grv7Y2hoeFpfX586agbBnXfc45Y/+ZuyRvBx9an4fD1NucbCitudqKqxyFKCRb0S8wgggAACCEwQgY+uXPvGOEv+VrmgODg8PGlbX//8IMtDxVNPPJ0rhOGFqqm4ohGJDxGFor3pTlRVWUQRNRaNoFiGAAIIIIDA3i7wsZUb36C7Rv9On7M4PDI8eaB/cJ4CRnDn7fe4Jx5fnn/8ILhYoeLTjSxO+PtvHewHsPC1FRrLwj+hLMvoY9FIi2UIIIAAAgjsxQIXrFj7+izI/kH1DB3DpZFJfdsG5mVpFtgtpY8/9pT/5LrB45L06qWXNmI4/n9/87WlOLnH11j4p5KpKaR8W0hlGM5G27EMAQQQQAABBPYygfNXbHxdGmb/V0GgrVQqdQz2D821moq71afi0Uef8J9WN5B+Mr5qaW+jj26hIk6Tn+qhplN9jUUY5bUVYRhZrQV9LBqpsQwBBBBAAIG9UOCCNRteq9DwNY2b2ZXGWefAwNBcPQskvPP2e90jj5RDRRBcHl/Vu7TRx6+EiscfemSqrc9rLLRH61+he001joXrbLQhyxBAAAEEEEBg7xK4cPWG1ySp+6Y+VUecJMWBgcHZmg5tnIqH//Mx/2E10tXn4quXfqLRJ68NFZs3bvJFfLBQ1YVqKnR3qh8kK6DGopEeyxBAAAEEENiLBD6+esNxSeb+SXeEdiVxXBgcGJyVpamvqXjowUf9J1VlwxcVKs5v9LEbhQorV62xsBnrvKn+FvSxMAxeCCCAAAII7KUCFipUE/Ftddbs1Mia0cDQ8ExVL4R33Xmfe/DXj/hPrTxwlULFhxsRjBcqrGw5WGj8Cquy0Eu3qlJj4SX4hgACCCCAwN4nsGTVlmNjl35bw2JOSnXXx9DQSI/6Q/jmjwd+9bD/wGrBuEah4rxGn35HocLKV2ssKsEictxu2giSZQgggAACCOzpAktWrT82CdJ/VVXCJNVUBIPDI9OCLItsmO7773/Ifzz1ivjb5Oql5zT6rDsLFbaNr6awh5BZsLC+FuoJSo1FI02WIYAAAgggsAcLLFm3+ejEhd/T4BKT9fjzaKRUmhakWXTnHfe5e+/9tf9k6m/xD7ql9G8afcxmQoVt50NEIYoUKjSnZ6JGQUSwaCTKMgQQQAABBPZQgSUr1x2dJekPwjCYlKXODY+MTNZ7dNddv3L33POA/1TKAV+Nr7r4r9UMYveJjnk1GypsIx8iItVWKFNoFE/LFtRYjNFkBgEEEEAAgT1YoHfF5qOSQvoDDSsxRc0SwXCp1GXNH3fddb+zL3spTHxdoeKvfptQMX1Gj+3oBR8s8iebWpWFnhXCOBbegW8IIIAAAgjs6QJL1m5+VeKyH6t2Ypqu8ulIKe50aao+Fb9yd6gJxF5a/s0lPRf/5W8bKg45YtELagE5Jb8VRHeYqnrEf6kqhKaQPf03ifNHAAEEEJjwAp9c03eE2iGu07M/pqsmIYvjpEs1FtHdavr4pR4qZi9d8/9pyYylf97bG6iBZOyr2eYPq6mwUFEstp1y21+/9+5yjYU6burI1olTj0YlWIy1ZQ4BBBBAAIE9SmDJmk1HxEFpmfo3TNeJZ0lSardhuu+6+wH3i9vu9p9FHTX/5YzjD/uz3rNevFBhO/Y1FpGvrQid9bVQsiBYeHK+IYAAAgggsOcJfHL1xsWqilimM59hZ58kcdGlLrSaitt+fqf/QKqp+O4ZbzrsT64966zEL6j51mpNRWUXeY2FBQq97CmnGniTYFHR4R0BBBBAAIE9SKB39cZFSRDerH4Ts3TaSZYmBXXaVKj4tfvZrXf4T6JL/b++qefE91571kkveqiwA9QECx3Znm6aMUCWl+cbAggggAACe5DARas2HJaG7iad8izd5JnaaJqpLu02RsUtt/zSfxJ10Pz+m3pO+KNbe0+K6z/ab1tTYfs79err2vNgofgSqaIisz+arD8Y8wgggAACCCCw+wpctHL9IWEULlPtxEz1mbRxKIIszcJ77/u1u+mmX/gTV6j4j6MWz3nPre9/6ULFlmD99/NgEeUjb9o9JxHPCtl9f3M4MwQQQAABBOoELl33wsGlNL1edQOzFCf0gFJVEugppffe95C7cdltvrTqD350aM9hZ933/rNKdZu7F6umwkKF9n1qufOmBQvdbqoja+yMYv1BmUcAAQQQQACB3U+gd90LB41k6fWKErMtTiRxGvpQoed+LFv2c3/CurRfd2jPonc93HvWSP0neDFDxca160+1/ftgYc8Jiax/hWouojDrqD8w8wgggAACCCCwewn0rl17QJKkP9ZtpAoVdveHxtfU4Ff36wmly26ohorr9896zvhdhIonH33UA/mmEB8qVGOR5wzGsdi9fnU4GwQQQAABBMYK9K7evDBO0ut0x8UcrVFVRVpUyCj8+sFH3A0//ZkvrD4Vy/bp2ff0p3r/fHjs1u5Fbf6wmgoLFb5nhw7kg0VgzSCqrbCXnnBK500vwTcEEEAAAQR2P4ELV23erxRkP1S/SIWKzCWltC3VbaUPPfRYbai4aW40+Q+f6f3zofpP8GI3f9SGCjtWXmPhm0AsWNg4FtxuWv9DYB4BBBBAAIHdQaB31aZ9Sy77D+WJ+aohUJ+KuCtJ07aH//Nx99Of3upPUTUVt8zumfPOFb3vH6w/55c6VNjx8rtCgvyuEKvG0BNO/bL6k2EeAQQQQAABBF4+gQtXbtyn5NJ/Uw3AfD2EI431lFKFinYLFTcsqzR/uJ8rVPz+qt73D9Sf6UsdKtRJ1L/G1Fj4R6eH9LGo/2EwjwACCCCAwMspcOHzG+ZnYfg9VVLso/aFtFQa6VZnzc5HH3kyDxVWMRC4X8xs6z7t5QoVBx92mBH9JK+xUFOI+lb4W0SosXg5f3U4NgIIIIAAAmMFzn9u/by0EFyrR4kt0JpsuJR0xiOl7sefWO5+esOt1s3CQsXtPT2zTl3b+4H+sVu/tB017VhWU2GhYsbsWT+Zls063ffYtIeP2Zfddqp8QVNI/U+FeQQQQAABBF4Ggd51fXOiKPyuRtHcT5dwNX8kHSPDw1Mee+KpvKNmHirunN7R+Y71vR/oqz/F30XzR22o+Mk5pw3nNRZKEzpxnY9abRwDZNX/YJhHAAEEEEDgdy3wibV9s4fiwe/of/z76NqclErxpCGFiuVPPe2W/fTnur3Trtnu7qlZz9s3fPacbfXn93KECjuHPFiUaywUfJQteGy6MfBCAAEEEEDg5RLoXbPmFUPp8D9rfKl9LUGMqKOmQsW05U89Eyy74WeVUHHv5Gjq2zddec7W+vN8uUKFnUfeFBJpKG/NWK0F41jU/3iYRwABBBBA4HcncMHqbbMGk+hbyhP76dqsjppx58DQ0IxqqNCzQPS6f1J3+ylbrvzglvozezlDhZ2LDxaqYvGhIlSTiCJG2wWr151Wf6LMI4AAAggggMBLK/DhVatmJunQN/W//YUuzYLS8EhXf//ArKeXP5vXVFioCNwDkwpT3vbCZy7YXH82L3eosPPxwWJoaMg/gMxqLPr7BhakSXDVx1au/4P6E2YeAQQQQAABBF4agQtWrJgRpcVv6D/7CzX8Q1qK445t/QOzn/nNc8FN1qciDxUPdne3vXXrlz60qf4sdodQYedkwWLgnrt+5e8IiTS0d0ntOAODg/NUe/HlC1Zt+C/1J848AggggAACCLy4Ah98/vmeOG37ehYoVOgx46WRuLOvb2DO88+s8DUVaZZaTcV/dhcnvWXb5Z/YWH/03SVU2HnpaenBO597buXgz275pTqDqJ9FIbJU1DUyPDJL/S2+cuHazafXfwDmEUAAAQQQQODFEfj4s1umF4PO/6P/6u+v5g+njprtff1985955vnwxmW3+o6aChWPdLV1v2XbFz6yof6ou1OosHML46uX3qSKij9U+83QLTf/Qp9LDyTTXSJ6nntHaWRkqkvSr120dvMZ9R+EeQQQQAABBBD47QR6f7N5WhyOfCVz2UG6JGelJG7btrV/n+eeXRHerGG607yj5mOdQfHkvs9/dF390Xa3UGHn5/tYxFctXRYG0enLlz87vMzGG1fVhQ3vrc4jbap+mRRm2bcuWr3xzPoPxDwCCCCAAAIItCbwseWbpvYV47/T7ZgKFS7VwFcdWzdv3f/551dENy27LQ8VQfB4Z0fXSf1XXbi2/ii7GioKYfT22/76vXfX7ufUq69r3xKs/379o8+tTP2Imjb4Ve224037YGEr46uXXK+6ijOeeuo3IzfoHtnI11zY/SJBQe097Xpa2j9etG4L4WI8SZYjgAACCCDQpEDvkxunpB3pl9UD4WBtkumW0vatW7fuv2Ll6ujmG3+hx5Zan4rgyY6OjpP7P3f+mvrdthIqfvE3f3pX7X5eilBh+68GC5tJrl5yXZAFZz7xxPKRH193U96uYyusy4hz7YpPX7tw1cZ3+SV8QwABBBBAAIFdFjh//frJfZ3JNepycIhaBjRMd9y2efOWg1asWFO4+cafK1QkFiqWt0fRSQOf/diq+gPszqHCznVMsLAFyTVLf6hairMef/zp0o9+fKPT09P0ldp7oATVqSJfpUOnSfFCAAEEEEBg1wQsVCQjwZW68eMQ3QGSxHHcvmnTloNXrVxTvPUmNX/4mgr3dHshOmnwSxetrN/77h4q7HytJqLhKzrv0jOyNPnOoYceWPj933ubhioPfcjQ+1ChEG1RH5P3Xz5n1g8absxCBBBAAAEEEBgj0Ltu3aStw+5LuvAuTq2qIkk6Nm98YdGqlavb7c7MJLaaCvdMe9Bx4uBVH39uzMaa2RNChZ3zuMHCVkZnX3pmFiT/csgrDyycdtpbnEH4XheBG2xrb98QZukHLps/64dWlhcCCCCAAAIINBb4yJo13elI8AXVUixSp8hQIaJ94/pNh69Zs7bjZzdXQ8VzbWH7iUNXXvBM/V72lFBh573DYGEFonMveY/G5fjWKw85IDrllBPV7BP4mouoWNzW0dG+Rremnnf53J7rrCwvBBBAAIGJK/C+J59dPJK4xRofyS4VYZqm/gFUhVR13Lp66G5DLdazI7JUoxxomUqFulMgSwMbn9GuR1Y+sEGr9QgrbZ/5ERBURNurnMpE5e3U5y+yo/iyGiQhzTIdVoNIWzm7tmnX9pOw42ihP76ts2PohoTyMjsfX1aHy9fZCabqN6kDh/5sNKkdhrZ3K6Nty2U1p/3kBfU9s/JWREdXOU3oODp2vh+/zC8XRJykbRs3bHzVmtVrOn9+y+15TYULnm9rD08c+vyS31jh2teeFCrsvPXZd/6Kzrvkj7LE/eNBBy+M3va2E1VzoT9J5optxRe6urust2qs21JjwZayIIsVRBL9ApQ00EeS6l0DbsWijoU8pPlYPxmVC2K1JcX6UcVJlmnbLE5dUNIdN4lu2x2q7kvLtXPbJrZt9GukWTeY2vZarhFC9TNK/b40XVJPkFi/TcP6PS6FURKXdFOwBhuJC12TSq4UJ9HAcBxHUwc7OufG1157Sex6e/UrxAsBBBBA4LcReO+Tzy7KRtziIEh1EbdrvkJFqsbzQn6h1wIfNCwwWMgI9I90GEU+LOgaYTci+gu3lVNoyENCGAW6tujibNcqhQuV0dU68sFB13K7avuLu+UA7dTKaCc+XNi0IoJlCrvO5UHDBxqV8fN2HraNbay/OnA+6eOBFfGBwrb0W+sC5YOQBQY7rs5fS7QvyzEKG3Z827UtU6DQnGUM/wguO06gi5adf5albevXbnjV2tVru2+79XYX++aPYGUxC08cvmbJcjuf2teeFirs3D1q7YcYbzo695N/LJBvHHjgwvCkk4/3xZQQfe2FJQElU32po6emrbNnPm+dPjWtpGFBJNH6fHk+beOe27LE1iWxX5cvs/JqeLH9a7/qOat1mX4A5TJ+f7XrNe6GlbFEox+SlbXj2Pb2biOZ5dN2rERltVxltbAcLsf71CxHAAEEENiZwJTp09yU6VPzZGCXabvK6rpuVxhdS8vXbF2Rq9d4W5bvNb+eq1weK/xV3dbk6+16X9murozfPt+PHauyH19pYMf1O8jX23Htn3tb5r/KB7Ai1WWVdbZQhf325WW1+7TDai+2of3Nt7d5W27zli3KfxQk/LJ8ey3VOdiCzRs3uZ8rVPg+Fc6tKgbRm4evXvKk30nNtz0xVNjpq1apuVd21y0Phq896dlNm7e8c8uWF4J9Fy7IL9Z2kdeF2ljtGm4XcLta+z9+Ol+my7z/wdp6K2EX+DwA2PL8y29va/Nd2Ba2scraMdSppbxnJUW/L1/QtvVBwUJEvm1+DlbYdpS/2/ZWTjUq1WX5BN8RQAABBFoVmDJtips8bWp58/IFtjpnF1/7Ki/QP7/VaX/xtfnyNr5cebpycfaz+mbrtAu/Lz+laXsvb1PehV+f/wvvN7TVeTlftrx9ubBd7GuP7a87teUqx/PltVc7d1vmy9i2lXm/MF/ng1M+r+/5/u2ErLDfRepWrVjj7vzl3eWOmsHqYrHtpOErL9prQoX/3PZtV17R2Z/877o8f3Xf/eYHx73mGNfe2a7NdVG3Wge1l1jtg9UeqH2iXFNh7SKKFTU1FnkthNVGVMKFylbLa3uVV+uF3ss1Fn6dBQeFg8oyCxM6Tl5DYbUTecDxNRRWRtv4wGJlrJZCyyrb27nk86rb2pUPT1kEEEAAAQReDIEgWFsoFt888oVPPFa/uz21pqLyOVq6rkbnfPIvdWH+igJFS9tXDs47AggggAACE1BgXcG1nTRyzSceqf/sJ/z9tw5Wd8B79L/fSjVQfZHR+SB4Qc0Obx9vRE0VPHW08HZTP5mWzTq92WG6t9t6Bwv+P48/bDtBrA7UAAAAAElFTkSuQmCC"
  14156. /***/ }),
  14157. /***/ "52fe":
  14158. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14159. "use strict";
  14160. __webpack_require__.r(__webpack_exports__);
  14161. /* harmony import */ var _Progress_vue_vue_type_template_id_0ed980d1___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ee84");
  14162. /* harmony import */ var _Progress_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("4b85");
  14163. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _Progress_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _Progress_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  14164. /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b429");
  14165. /* normalize component */
  14166. var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
  14167. _Progress_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
  14168. _Progress_vue_vue_type_template_id_0ed980d1___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
  14169. _Progress_vue_vue_type_template_id_0ed980d1___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
  14170. false,
  14171. null,
  14172. null,
  14173. null
  14174. )
  14175. /* harmony default export */ __webpack_exports__["default"] = (component.exports);
  14176. /***/ }),
  14177. /***/ "5310":
  14178. /***/ (function(module, exports, __webpack_require__) {
  14179. "use strict";
  14180. var _interopRequireDefault = __webpack_require__("8e6d");
  14181. Object.defineProperty(exports, "__esModule", {
  14182. value: true
  14183. });
  14184. exports.default = void 0;
  14185. var _theme = _interopRequireDefault(__webpack_require__("9259"));
  14186. var _cssElementQueries = __webpack_require__("18e4");
  14187. var _timer = _interopRequireDefault(__webpack_require__("8156"));
  14188. var _thirdService = _interopRequireDefault(__webpack_require__("c51e"));
  14189. //
  14190. //
  14191. //
  14192. //
  14193. //
  14194. //
  14195. //
  14196. //
  14197. //
  14198. //
  14199. //
  14200. //
  14201. //
  14202. //
  14203. //
  14204. //
  14205. var _default = {
  14206. name: 'SmProgress',
  14207. mixins: [_theme.default, _timer.default, _thirdService.default],
  14208. props: {
  14209. percent: {
  14210. type: [Number, String],
  14211. required: true
  14212. },
  14213. type: {
  14214. type: String,
  14215. default: 'line'
  14216. },
  14217. strokeWidth: {
  14218. type: [Number, String],
  14219. default: 6
  14220. },
  14221. status: {
  14222. type: String
  14223. },
  14224. strokeColor: {
  14225. type: String
  14226. },
  14227. trailColor: {
  14228. type: String,
  14229. default: '#f3f3f3'
  14230. },
  14231. size: {
  14232. type: [Number] // fix 其父元素宽高都很大的时候,需要传一个合适的size, 这时候不会自适应, 如需自适应则不传size
  14233. },
  14234. showInfo: {
  14235. type: Boolean,
  14236. default: true
  14237. },
  14238. gapDegree: {
  14239. type: Number,
  14240. default: 0
  14241. },
  14242. gapPosition: {
  14243. type: String,
  14244. default: 'top',
  14245. validator: function validator(gapPosition) {
  14246. var positionList = ['top', 'bottom', 'left', 'right'];
  14247. return positionList.includes(gapPosition);
  14248. }
  14249. },
  14250. strokeLinecap: {
  14251. type: String,
  14252. default: 'round',
  14253. validator: function validator(strokeLinecap) {
  14254. var strokeLinecapList = ['round', 'square'];
  14255. return strokeLinecapList.includes(strokeLinecap);
  14256. }
  14257. }
  14258. },
  14259. data: function data() {
  14260. return {
  14261. colorData: '',
  14262. circleWidth: 0,
  14263. finalValue: this.percent
  14264. };
  14265. },
  14266. computed: {
  14267. calWidth: function calWidth() {
  14268. if (this.size) {
  14269. return this.size;
  14270. }
  14271. return this.circleWidth;
  14272. }
  14273. },
  14274. watch: {
  14275. strokeColor: function strokeColor(val) {
  14276. this.colorData = val;
  14277. },
  14278. trailColor: {
  14279. handler: function handler() {
  14280. if (this.type === 'circle' && this.progressTrailNode) {
  14281. this.progressTrailNode.style.stroke = this.trailColor;
  14282. }
  14283. if (this.type === 'line' && this.progressLineTrailNode) {
  14284. this.progressLineTrailNode.style.backgroundColor = this.trailColor;
  14285. }
  14286. }
  14287. },
  14288. textColorsData: {
  14289. handler: function handler() {
  14290. if (this.progressTextNode) {
  14291. this.progressTextNode.style.color = this.getTextColor;
  14292. }
  14293. }
  14294. },
  14295. percent: function percent(val) {
  14296. this.finalValue = val;
  14297. }
  14298. },
  14299. created: function created() {
  14300. this.colorData = this.strokeColor || this.getColor(0);
  14301. },
  14302. mounted: function mounted() {
  14303. var _this = this;
  14304. this.$on('theme-style-changed', function () {
  14305. _this.colorData = _this.getColor(0);
  14306. });
  14307. this.progressTextNode = this.$el.querySelector('.ant-progress-text');
  14308. this.progressTextNode.style.color = this.getTextColor;
  14309. this.progressTrailNode = this.$el.querySelector('.ant-progress-circle-trail');
  14310. this.progressLineTrailNode = this.$el.querySelector('.ant-progress-inner');
  14311. if (this.type === 'circle' && this.progressTrailNode) {
  14312. this.progressTrailNode.style.stroke = this.trailColor;
  14313. }
  14314. if (this.type === 'line' && this.progressLineTrailNode) {
  14315. this.progressLineTrailNode.style.backgroundColor = this.trailColor;
  14316. }
  14317. this.resizeObsever = new _cssElementQueries.ResizeSensor(this.$el, function () {
  14318. _this.resize();
  14319. });
  14320. },
  14321. beforeDestroy: function beforeDestroy() {
  14322. this.restService && this.restService.remove('getdatasucceeded');
  14323. },
  14324. methods: {
  14325. resize: function resize() {
  14326. this.circleWidth = Math.min(this.$el.offsetWidth, this.$el.offsetHeight);
  14327. },
  14328. timing: function timing() {
  14329. this.getData();
  14330. }
  14331. }
  14332. };
  14333. exports.default = _default;
  14334. /***/ }),
  14335. /***/ "5465":
  14336. /***/ (function(module, exports, __webpack_require__) {
  14337. "use strict";
  14338. // Copyright Joyent, Inc. and other Node contributors.
  14339. //
  14340. // Permission is hereby granted, free of charge, to any person obtaining a
  14341. // copy of this software and associated documentation files (the
  14342. // "Software"), to deal in the Software without restriction, including
  14343. // without limitation the rights to use, copy, modify, merge, publish,
  14344. // distribute, sublicense, and/or sell copies of the Software, and to permit
  14345. // persons to whom the Software is furnished to do so, subject to the
  14346. // following conditions:
  14347. //
  14348. // The above copyright notice and this permission notice shall be included
  14349. // in all copies or substantial portions of the Software.
  14350. //
  14351. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  14352. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  14353. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  14354. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  14355. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  14356. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  14357. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  14358. /*<replacement>*/
  14359. var Buffer = __webpack_require__("0318").Buffer;
  14360. /*</replacement>*/
  14361. var isEncoding = Buffer.isEncoding || function (encoding) {
  14362. encoding = '' + encoding;
  14363. switch (encoding && encoding.toLowerCase()) {
  14364. case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
  14365. return true;
  14366. default:
  14367. return false;
  14368. }
  14369. };
  14370. function _normalizeEncoding(enc) {
  14371. if (!enc) return 'utf8';
  14372. var retried;
  14373. while (true) {
  14374. switch (enc) {
  14375. case 'utf8':
  14376. case 'utf-8':
  14377. return 'utf8';
  14378. case 'ucs2':
  14379. case 'ucs-2':
  14380. case 'utf16le':
  14381. case 'utf-16le':
  14382. return 'utf16le';
  14383. case 'latin1':
  14384. case 'binary':
  14385. return 'latin1';
  14386. case 'base64':
  14387. case 'ascii':
  14388. case 'hex':
  14389. return enc;
  14390. default:
  14391. if (retried) return; // undefined
  14392. enc = ('' + enc).toLowerCase();
  14393. retried = true;
  14394. }
  14395. }
  14396. };
  14397. // Do not cache `Buffer.isEncoding` when checking encoding names as some
  14398. // modules monkey-patch it to support additional encodings
  14399. function normalizeEncoding(enc) {
  14400. var nenc = _normalizeEncoding(enc);
  14401. if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
  14402. return nenc || enc;
  14403. }
  14404. // StringDecoder provides an interface for efficiently splitting a series of
  14405. // buffers into a series of JS strings without breaking apart multi-byte
  14406. // characters.
  14407. exports.StringDecoder = StringDecoder;
  14408. function StringDecoder(encoding) {
  14409. this.encoding = normalizeEncoding(encoding);
  14410. var nb;
  14411. switch (this.encoding) {
  14412. case 'utf16le':
  14413. this.text = utf16Text;
  14414. this.end = utf16End;
  14415. nb = 4;
  14416. break;
  14417. case 'utf8':
  14418. this.fillLast = utf8FillLast;
  14419. nb = 4;
  14420. break;
  14421. case 'base64':
  14422. this.text = base64Text;
  14423. this.end = base64End;
  14424. nb = 3;
  14425. break;
  14426. default:
  14427. this.write = simpleWrite;
  14428. this.end = simpleEnd;
  14429. return;
  14430. }
  14431. this.lastNeed = 0;
  14432. this.lastTotal = 0;
  14433. this.lastChar = Buffer.allocUnsafe(nb);
  14434. }
  14435. StringDecoder.prototype.write = function (buf) {
  14436. if (buf.length === 0) return '';
  14437. var r;
  14438. var i;
  14439. if (this.lastNeed) {
  14440. r = this.fillLast(buf);
  14441. if (r === undefined) return '';
  14442. i = this.lastNeed;
  14443. this.lastNeed = 0;
  14444. } else {
  14445. i = 0;
  14446. }
  14447. if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
  14448. return r || '';
  14449. };
  14450. StringDecoder.prototype.end = utf8End;
  14451. // Returns only complete characters in a Buffer
  14452. StringDecoder.prototype.text = utf8Text;
  14453. // Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
  14454. StringDecoder.prototype.fillLast = function (buf) {
  14455. if (this.lastNeed <= buf.length) {
  14456. buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
  14457. return this.lastChar.toString(this.encoding, 0, this.lastTotal);
  14458. }
  14459. buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
  14460. this.lastNeed -= buf.length;
  14461. };
  14462. // Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
  14463. // continuation byte. If an invalid byte is detected, -2 is returned.
  14464. function utf8CheckByte(byte) {
  14465. 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;
  14466. return byte >> 6 === 0x02 ? -1 : -2;
  14467. }
  14468. // Checks at most 3 bytes at the end of a Buffer in order to detect an
  14469. // incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
  14470. // needed to complete the UTF-8 character (if applicable) are returned.
  14471. function utf8CheckIncomplete(self, buf, i) {
  14472. var j = buf.length - 1;
  14473. if (j < i) return 0;
  14474. var nb = utf8CheckByte(buf[j]);
  14475. if (nb >= 0) {
  14476. if (nb > 0) self.lastNeed = nb - 1;
  14477. return nb;
  14478. }
  14479. if (--j < i || nb === -2) return 0;
  14480. nb = utf8CheckByte(buf[j]);
  14481. if (nb >= 0) {
  14482. if (nb > 0) self.lastNeed = nb - 2;
  14483. return nb;
  14484. }
  14485. if (--j < i || nb === -2) return 0;
  14486. nb = utf8CheckByte(buf[j]);
  14487. if (nb >= 0) {
  14488. if (nb > 0) {
  14489. if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
  14490. }
  14491. return nb;
  14492. }
  14493. return 0;
  14494. }
  14495. // Validates as many continuation bytes for a multi-byte UTF-8 character as
  14496. // needed or are available. If we see a non-continuation byte where we expect
  14497. // one, we "replace" the validated continuation bytes we've seen so far with
  14498. // a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
  14499. // behavior. The continuation byte check is included three times in the case
  14500. // where all of the continuation bytes for a character exist in the same buffer.
  14501. // It is also done this way as a slight performance increase instead of using a
  14502. // loop.
  14503. function utf8CheckExtraBytes(self, buf, p) {
  14504. if ((buf[0] & 0xC0) !== 0x80) {
  14505. self.lastNeed = 0;
  14506. return '\ufffd';
  14507. }
  14508. if (self.lastNeed > 1 && buf.length > 1) {
  14509. if ((buf[1] & 0xC0) !== 0x80) {
  14510. self.lastNeed = 1;
  14511. return '\ufffd';
  14512. }
  14513. if (self.lastNeed > 2 && buf.length > 2) {
  14514. if ((buf[2] & 0xC0) !== 0x80) {
  14515. self.lastNeed = 2;
  14516. return '\ufffd';
  14517. }
  14518. }
  14519. }
  14520. }
  14521. // Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
  14522. function utf8FillLast(buf) {
  14523. var p = this.lastTotal - this.lastNeed;
  14524. var r = utf8CheckExtraBytes(this, buf, p);
  14525. if (r !== undefined) return r;
  14526. if (this.lastNeed <= buf.length) {
  14527. buf.copy(this.lastChar, p, 0, this.lastNeed);
  14528. return this.lastChar.toString(this.encoding, 0, this.lastTotal);
  14529. }
  14530. buf.copy(this.lastChar, p, 0, buf.length);
  14531. this.lastNeed -= buf.length;
  14532. }
  14533. // Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
  14534. // partial character, the character's bytes are buffered until the required
  14535. // number of bytes are available.
  14536. function utf8Text(buf, i) {
  14537. var total = utf8CheckIncomplete(this, buf, i);
  14538. if (!this.lastNeed) return buf.toString('utf8', i);
  14539. this.lastTotal = total;
  14540. var end = buf.length - (total - this.lastNeed);
  14541. buf.copy(this.lastChar, 0, end);
  14542. return buf.toString('utf8', i, end);
  14543. }
  14544. // For UTF-8, a replacement character is added when ending on a partial
  14545. // character.
  14546. function utf8End(buf) {
  14547. var r = buf && buf.length ? this.write(buf) : '';
  14548. if (this.lastNeed) return r + '\ufffd';
  14549. return r;
  14550. }
  14551. // UTF-16LE typically needs two bytes per character, but even if we have an even
  14552. // number of bytes available, we need to check if we end on a leading/high
  14553. // surrogate. In that case, we need to wait for the next two bytes in order to
  14554. // decode the last character properly.
  14555. function utf16Text(buf, i) {
  14556. if ((buf.length - i) % 2 === 0) {
  14557. var r = buf.toString('utf16le', i);
  14558. if (r) {
  14559. var c = r.charCodeAt(r.length - 1);
  14560. if (c >= 0xD800 && c <= 0xDBFF) {
  14561. this.lastNeed = 2;
  14562. this.lastTotal = 4;
  14563. this.lastChar[0] = buf[buf.length - 2];
  14564. this.lastChar[1] = buf[buf.length - 1];
  14565. return r.slice(0, -1);
  14566. }
  14567. }
  14568. return r;
  14569. }
  14570. this.lastNeed = 1;
  14571. this.lastTotal = 2;
  14572. this.lastChar[0] = buf[buf.length - 1];
  14573. return buf.toString('utf16le', i, buf.length - 1);
  14574. }
  14575. // For UTF-16LE we do not explicitly append special replacement characters if we
  14576. // end on a partial character, we simply let v8 handle that.
  14577. function utf16End(buf) {
  14578. var r = buf && buf.length ? this.write(buf) : '';
  14579. if (this.lastNeed) {
  14580. var end = this.lastTotal - this.lastNeed;
  14581. return r + this.lastChar.toString('utf16le', 0, end);
  14582. }
  14583. return r;
  14584. }
  14585. function base64Text(buf, i) {
  14586. var n = (buf.length - i) % 3;
  14587. if (n === 0) return buf.toString('base64', i);
  14588. this.lastNeed = 3 - n;
  14589. this.lastTotal = 3;
  14590. if (n === 1) {
  14591. this.lastChar[0] = buf[buf.length - 1];
  14592. } else {
  14593. this.lastChar[0] = buf[buf.length - 2];
  14594. this.lastChar[1] = buf[buf.length - 1];
  14595. }
  14596. return buf.toString('base64', i, buf.length - n);
  14597. }
  14598. function base64End(buf) {
  14599. var r = buf && buf.length ? this.write(buf) : '';
  14600. if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
  14601. return r;
  14602. }
  14603. // Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
  14604. function simpleWrite(buf) {
  14605. return buf.toString(this.encoding);
  14606. }
  14607. function simpleEnd(buf) {
  14608. return buf && buf.length ? this.write(buf) : '';
  14609. }
  14610. /***/ }),
  14611. /***/ "54da":
  14612. /***/ (function(module, exports, __webpack_require__) {
  14613. /* eslint-disable node/no-deprecated-api */
  14614. var buffer = __webpack_require__("3be6")
  14615. var Buffer = buffer.Buffer
  14616. // alternative to using Object.keys for old browsers
  14617. function copyProps (src, dst) {
  14618. for (var key in src) {
  14619. dst[key] = src[key]
  14620. }
  14621. }
  14622. if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
  14623. module.exports = buffer
  14624. } else {
  14625. // Copy properties from require('buffer')
  14626. copyProps(buffer, exports)
  14627. exports.Buffer = SafeBuffer
  14628. }
  14629. function SafeBuffer (arg, encodingOrOffset, length) {
  14630. return Buffer(arg, encodingOrOffset, length)
  14631. }
  14632. // Copy static methods from Buffer
  14633. copyProps(Buffer, SafeBuffer)
  14634. SafeBuffer.from = function (arg, encodingOrOffset, length) {
  14635. if (typeof arg === 'number') {
  14636. throw new TypeError('Argument must not be a number')
  14637. }
  14638. return Buffer(arg, encodingOrOffset, length)
  14639. }
  14640. SafeBuffer.alloc = function (size, fill, encoding) {
  14641. if (typeof size !== 'number') {
  14642. throw new TypeError('Argument must be a number')
  14643. }
  14644. var buf = Buffer(size)
  14645. if (fill !== undefined) {
  14646. if (typeof encoding === 'string') {
  14647. buf.fill(fill, encoding)
  14648. } else {
  14649. buf.fill(fill)
  14650. }
  14651. } else {
  14652. buf.fill(0)
  14653. }
  14654. return buf
  14655. }
  14656. SafeBuffer.allocUnsafe = function (size) {
  14657. if (typeof size !== 'number') {
  14658. throw new TypeError('Argument must be a number')
  14659. }
  14660. return Buffer(size)
  14661. }
  14662. SafeBuffer.allocUnsafeSlow = function (size) {
  14663. if (typeof size !== 'number') {
  14664. throw new TypeError('Argument must be a number')
  14665. }
  14666. return buffer.SlowBuffer(size)
  14667. }
  14668. /***/ }),
  14669. /***/ "550a":
  14670. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14671. "use strict";
  14672. __webpack_require__.r(__webpack_exports__);
  14673. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Chart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dd34");
  14674. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Chart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Chart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
  14675. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Chart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Chart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  14676. /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Chart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
  14677. /***/ }),
  14678. /***/ "5643":
  14679. /***/ (function(module, exports) {
  14680. module.exports = __WEBPACK_EXTERNAL_MODULE__5643__;
  14681. /***/ }),
  14682. /***/ "5648":
  14683. /***/ (function(module, exports, __webpack_require__) {
  14684. module.exports = __webpack_require__("d711");
  14685. /***/ }),
  14686. /***/ "5993":
  14687. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  14688. "use strict";
  14689. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/common/card/Card.vue?vue&type=template&id=0b7b8e8a&
  14690. var render = function () {
  14691. var _obj, _obj$1, _obj$2;
  14692. var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"sm-component-card"},[(_vm.iconClass)?_c('div',{class:( _obj = {}, _obj['sm-component-card__icon'] = true, _obj['is-' + _vm.position] = true, _obj[("is-click-" + (_vm.isShow ? 'out' : 'in'))] = true, _obj['is-not-header'] = !_vm.headerName, _obj ),style:([_vm.getBackgroundStyle, _vm.getTextColorStyle, _vm.iconStyleObject]),on:{"click":_vm.iconClicked}},[_c('div',{class:( _obj$1 = {}, _obj$1[_vm.iconClass] = true, _obj$1['is-auto-rotate'] = _vm.autoRotate, _obj$1['sm-component-card__component-icon'] = true, _obj$1 ),style:([_vm.iconStyle])})]):_vm._e(),_vm._v(" "),_c('transition',{attrs:{"name":"sm-component-zoom-in"},on:{"after-leave":function($event){return _vm.toggleTransition('leave')},"enter":function($event){return _vm.toggleTransition('enter')}}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isShow),expression:"isShow"}],class:( _obj$2 = {}, _obj$2['sm-component-card__content'] = true, _obj$2['is-not-header'] = !_vm.headerName, _obj$2['is-' + _vm.position] = true, _obj$2['is-icon'] = _vm.iconClass, _obj$2 ),style:([_vm.getCardStyle])},[(_vm.headerName)?_c('div',{staticClass:"sm-component-card__header",style:([_vm.getBackgroundStyle, _vm.getTextColorStyle])},[_c('span',{staticClass:"sm-component-card__header-name"},[_vm._v(_vm._s(_vm.headerName))])]):_vm._e(),_vm._v(" "),_vm._t("default")],2)])],1)}
  14693. var staticRenderFns = []
  14694. // CONCATENATED MODULE: ./src/common/card/Card.vue?vue&type=template&id=0b7b8e8a&
  14695. /* concated harmony reexport render */__webpack_require__.d(__webpack_exports__, "a", function() { return render; });
  14696. /* concated harmony reexport staticRenderFns */__webpack_require__.d(__webpack_exports__, "b", function() { return staticRenderFns; });
  14697. /***/ }),
  14698. /***/ "5a51":
  14699. /***/ (function(module, exports, __webpack_require__) {
  14700. "use strict";
  14701. var _interopRequireDefault = __webpack_require__("8e6d");
  14702. Object.defineProperty(exports, "__esModule", {
  14703. value: true
  14704. });
  14705. exports.default = void 0;
  14706. var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
  14707. var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
  14708. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
  14709. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
  14710. var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
  14711. var _leafletWrapper = _interopRequireDefault(__webpack_require__("6f27"));
  14712. var ChartViewModel =
  14713. /*#__PURE__*/
  14714. function (_L$Evented) {
  14715. (0, _inherits2.default)(ChartViewModel, _L$Evented);
  14716. function ChartViewModel(map, options) {
  14717. var _this;
  14718. (0, _classCallCheck2.default)(this, ChartViewModel);
  14719. _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(ChartViewModel).call(this, null));
  14720. _this.map = map;
  14721. _this.options = options;
  14722. return _this;
  14723. }
  14724. (0, _createClass2.default)(ChartViewModel, [{
  14725. key: "setPopupContent",
  14726. value: function setPopupContent(coordinates, popupContainer, callback) {
  14727. this.clear();
  14728. var fromatCoordinates = _leafletWrapper.default.GeoJSON.coordsToLatLng(coordinates);
  14729. popupContainer.style.display = 'block';
  14730. this.popup = new _leafletWrapper.default.Popup({
  14731. className: 'sm-leaflet-tabel-popup sm-component-chart-result-popup',
  14732. closeOnClick: true,
  14733. maxWidth: 800
  14734. });
  14735. this.marker = new _leafletWrapper.default.Marker();
  14736. this.popup.setLatLng(fromatCoordinates).setContent(popupContainer);
  14737. this.map.on('popupopen', function () {
  14738. callback && callback();
  14739. });
  14740. this.marker.setLatLng(fromatCoordinates).bindPopup(this.popup).addTo(this.map);
  14741. this.map.flyTo(fromatCoordinates);
  14742. }
  14743. }, {
  14744. key: "clear",
  14745. value: function clear() {
  14746. if (this.popup) {
  14747. this.popup.remove();
  14748. this.popup = null;
  14749. }
  14750. if (this.marker) {
  14751. this.marker.remove();
  14752. this.marker = null;
  14753. }
  14754. if (this.map) {
  14755. this.map.off('popupopen', function () {});
  14756. }
  14757. }
  14758. }]);
  14759. return ChartViewModel;
  14760. }(_leafletWrapper.default.Evented);
  14761. exports.default = ChartViewModel;
  14762. /***/ }),
  14763. /***/ "5b56":
  14764. /***/ (function(module, exports) {
  14765. var toString = {}.toString;
  14766. module.exports = Array.isArray || function (arr) {
  14767. return toString.call(arr) == '[object Array]';
  14768. };
  14769. /***/ }),
  14770. /***/ "5bb9":
  14771. /***/ (function(module, exports, __webpack_require__) {
  14772. "use strict";
  14773. var _interopRequireDefault = __webpack_require__("8e6d");
  14774. Object.defineProperty(exports, "__esModule", {
  14775. value: true
  14776. });
  14777. exports.default = void 0;
  14778. var _mapGetter = _interopRequireDefault(__webpack_require__("2ed5"));
  14779. var _SmTileLayerViewModel = _interopRequireDefault(__webpack_require__("5f55"));
  14780. var _propsBinder = __webpack_require__("efee");
  14781. var _TileLayer = _interopRequireDefault(__webpack_require__("cdb0"));
  14782. var _default = {
  14783. name: 'SmTileLayer',
  14784. mixins: [_mapGetter.default, _TileLayer.default],
  14785. props: {
  14786. layersID: {
  14787. type: String
  14788. },
  14789. redirect: {
  14790. type: Boolean,
  14791. default: false
  14792. },
  14793. cacheEnabled: {
  14794. type: Boolean,
  14795. default: true
  14796. },
  14797. clipRegionEnabled: {
  14798. type: Boolean,
  14799. default: false
  14800. },
  14801. prjCoordSys: {
  14802. type: Object
  14803. },
  14804. overlapDisplayed: {
  14805. type: Boolean,
  14806. default: false
  14807. },
  14808. overlapDisplayedOptions: {
  14809. type: String
  14810. },
  14811. tileversion: {
  14812. type: String
  14813. },
  14814. serverType: {
  14815. type: String,
  14816. default: 'iServer'
  14817. },
  14818. tileProxy: {
  14819. type: String
  14820. },
  14821. format: {
  14822. type: String,
  14823. default: 'png',
  14824. validator: function validator(val) {
  14825. return ['png', 'jpg', 'bmp', 'gif'].indexOf(val) !== -1;
  14826. }
  14827. },
  14828. tileSize: {
  14829. type: Number,
  14830. default: 256
  14831. },
  14832. url: {
  14833. type: String
  14834. },
  14835. transparent: {
  14836. type: Boolean,
  14837. default: true
  14838. },
  14839. clipRegion: {
  14840. type: Object
  14841. },
  14842. crs: {
  14843. type: Object
  14844. }
  14845. },
  14846. created: function created() {
  14847. var _this = this;
  14848. var _loop = function _loop(key) {
  14849. var setMethodName = 'set' + (0, _propsBinder.capitalizeFirstLetter)(key);
  14850. if (!_this[setMethodName]) {
  14851. _this[setMethodName] = function (newValue) {
  14852. this.viewModel && this.viewModel[setMethodName](newValue);
  14853. };
  14854. }
  14855. };
  14856. for (var key in this.$props) {
  14857. _loop(key);
  14858. }
  14859. this.viewModel = new _SmTileLayerViewModel.default(this.$props);
  14860. this.layer = this.viewModel.getLayer();
  14861. },
  14862. loaded: function loaded() {
  14863. this.viewModel.addTo(this.map);
  14864. },
  14865. render: function render() {}
  14866. };
  14867. exports.default = _default;
  14868. /***/ }),
  14869. /***/ "5bf3":
  14870. /***/ (function(module, exports, __webpack_require__) {
  14871. "use strict";
  14872. var _interopRequireDefault = __webpack_require__("8e6d");
  14873. Object.defineProperty(exports, "__esModule", {
  14874. value: true
  14875. });
  14876. exports.default = void 0;
  14877. var _defineProperty2 = _interopRequireDefault(__webpack_require__("279f"));
  14878. var _typeof2 = _interopRequireDefault(__webpack_require__("7ae5"));
  14879. var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
  14880. var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
  14881. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
  14882. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
  14883. var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
  14884. var _Events2 = __webpack_require__("e3e2");
  14885. var _util = __webpack_require__("1448");
  14886. var _statistics = __webpack_require__("9dde");
  14887. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
  14888. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
  14889. var RestService =
  14890. /*#__PURE__*/
  14891. function (_Events) {
  14892. (0, _inherits2.default)(RestService, _Events);
  14893. function RestService(options) {
  14894. var _this;
  14895. (0, _classCallCheck2.default)(this, RestService);
  14896. _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(RestService).call(this));
  14897. _this.eventTypes = ['getdatafailed', 'getdatasucceeded'];
  14898. _this.options = options || {};
  14899. return _this;
  14900. }
  14901. (0, _createClass2.default)(RestService, [{
  14902. key: "setProxy",
  14903. value: function setProxy(proxy) {
  14904. this.options.proxy = proxy;
  14905. }
  14906. /**
  14907. * @function RestService.prototype.getData
  14908. * @description 请求数据。
  14909. */
  14910. }, {
  14911. key: "getData",
  14912. value: function getData(data, queryInfo) {
  14913. var _this2 = this;
  14914. if (!data) {
  14915. return;
  14916. } // 如果是geojson
  14917. if ((0, _typeof2.default)(data) === 'object') {
  14918. this.transfromGeoJSON(_objectSpread({}, data), queryInfo);
  14919. return;
  14920. } // 如果是url, 就发送请求
  14921. var url = data;
  14922. SuperMap.FetchRequest.get(url, null, {
  14923. withoutFormatSuffix: true,
  14924. proxy: this.options.proxy
  14925. }).then(function (response) {
  14926. return response.json();
  14927. }).then(function (data) {
  14928. if (!data) {
  14929. // 请求失败
  14930. _this2.triggerEvent('getdatafailed', {
  14931. data: data
  14932. });
  14933. } else {
  14934. var resData = data.hasOwnProperty('data') ? data.data : data;
  14935. _this2.transfromGeoJSON(resData, queryInfo);
  14936. }
  14937. }).catch(function (error) {
  14938. console.log(error);
  14939. _this2.triggerEvent('getdatafailed', {
  14940. error: error
  14941. });
  14942. });
  14943. }
  14944. }, {
  14945. key: "transfromGeoJSON",
  14946. value: function transfromGeoJSON(resData, queryInfo) {
  14947. var generateData = {
  14948. type: 'FeatureCollection',
  14949. features: []
  14950. };
  14951. var dataType = (0, _util.getDataType)(resData);
  14952. var limitLen = (queryInfo || {}).maxFeatures;
  14953. if (dataType !== '[object Object]' || !resData.type || resData.type !== 'FeatureCollection' || (0, _util.getDataType)(resData.features) !== '[object Array]') {
  14954. generateData.features = this._generateData(resData, limitLen);
  14955. } else {
  14956. generateData = resData;
  14957. generateData.features = this._generateData(resData.features, limitLen, false);
  14958. }
  14959. if (this.transformed) {
  14960. generateData.transformed = this.transformed;
  14961. }
  14962. var triggerData = Object.assign({}, generateData, (0, _statistics.statisticsFeatures)(generateData.features));
  14963. this.triggerEvent('getdatasucceeded', triggerData);
  14964. }
  14965. }, {
  14966. key: "_generateData",
  14967. value: function _generateData(data, limitLen) {
  14968. var generateTransformed = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  14969. var dataType = (0, _util.getDataType)(data);
  14970. var features = [];
  14971. var subData;
  14972. switch (dataType) {
  14973. case '[object Number]':
  14974. case '[object String]':
  14975. var feature = {
  14976. properties: {
  14977. value: data
  14978. }
  14979. };
  14980. features.push(feature);
  14981. break;
  14982. case '[object Array]':
  14983. subData = limitLen && !isNaN(+limitLen) && limitLen < data.length ? data.slice(0, limitLen) : data;
  14984. features = subData.map(function (item) {
  14985. if ((0, _util.getDataType)(item) === '[object Object]' && item.hasOwnProperty('properties') && (0, _util.getDataType)(item.properties) === '[object Object]') {
  14986. return item;
  14987. } else {
  14988. var _feature = {
  14989. properties: (0, _util.getDataType)(item) === '[object Object]' ? item : {
  14990. value: item
  14991. }
  14992. };
  14993. return _feature;
  14994. }
  14995. });
  14996. break;
  14997. case '[object Object]':
  14998. subData = data;
  14999. if (limitLen && !isNaN(+limitLen) && limitLen < Object.keys(data).length) {
  15000. subData = Object.fromEntries(Object.entries(data).slice(0, limitLen));
  15001. }
  15002. if (!subData.hasOwnProperty('properties') || (0, _util.getDataType)(subData.properties) !== '[object Object]') {
  15003. if (generateTransformed) {
  15004. this.transformed = true;
  15005. }
  15006. subData = {
  15007. properties: subData
  15008. };
  15009. }
  15010. features.push(subData);
  15011. break;
  15012. }
  15013. return features;
  15014. }
  15015. }]);
  15016. return RestService;
  15017. }(_Events2.Events);
  15018. exports.default = RestService;
  15019. /***/ }),
  15020. /***/ "5c61":
  15021. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  15022. "use strict";
  15023. __webpack_require__.r(__webpack_exports__);
  15024. /* harmony import */ var _Icon_vue_vue_type_template_id_076da86b___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("c794");
  15025. /* harmony import */ var _Icon_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("383e");
  15026. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _Icon_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _Icon_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  15027. /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b429");
  15028. /* normalize component */
  15029. var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
  15030. _Icon_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
  15031. _Icon_vue_vue_type_template_id_076da86b___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
  15032. _Icon_vue_vue_type_template_id_076da86b___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
  15033. false,
  15034. null,
  15035. null,
  15036. null
  15037. )
  15038. /* harmony default export */ __webpack_exports__["default"] = (component.exports);
  15039. /***/ }),
  15040. /***/ "5de5":
  15041. /***/ (function(module, exports, __webpack_require__) {
  15042. /* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */
  15043. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  15044. module.exports = freeGlobal;
  15045. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("698d")))
  15046. /***/ }),
  15047. /***/ "5df1":
  15048. /***/ (function(module, exports) {
  15049. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC"
  15050. /***/ }),
  15051. /***/ "5e45":
  15052. /***/ (function(module, exports, __webpack_require__) {
  15053. /* WEBPACK VAR INJECTION */(function(Buffer) {var js2xml = __webpack_require__("c365");
  15054. module.exports = function (json, options) {
  15055. if (json instanceof Buffer) {
  15056. json = json.toString();
  15057. }
  15058. var js = null;
  15059. if (typeof (json) === 'string') {
  15060. try {
  15061. js = JSON.parse(json);
  15062. } catch (e) {
  15063. throw new Error('The JSON structure is invalid');
  15064. }
  15065. } else {
  15066. js = json;
  15067. }
  15068. return js2xml(js, options);
  15069. };
  15070. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("3be6").Buffer))
  15071. /***/ }),
  15072. /***/ "5e4c":
  15073. /***/ (function(module, exports, __webpack_require__) {
  15074. var arrayWithHoles = __webpack_require__("31ff");
  15075. var iterableToArrayLimit = __webpack_require__("34c8");
  15076. var nonIterableRest = __webpack_require__("830f");
  15077. function _slicedToArray(arr, i) {
  15078. return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();
  15079. }
  15080. module.exports = _slicedToArray;
  15081. /***/ }),
  15082. /***/ "5e89":
  15083. /***/ (function(module, exports, __webpack_require__) {
  15084. module.exports = __webpack_require__("0956").EventEmitter;
  15085. /***/ }),
  15086. /***/ "5f3d":
  15087. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  15088. "use strict";
  15089. __webpack_require__.r(__webpack_exports__);
  15090. /* harmony import */ var _Text_vue_vue_type_template_id_5e2ac717___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("9243");
  15091. /* harmony import */ var _Text_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("e736");
  15092. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _Text_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _Text_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  15093. /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b429");
  15094. /* normalize component */
  15095. var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
  15096. _Text_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
  15097. _Text_vue_vue_type_template_id_5e2ac717___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
  15098. _Text_vue_vue_type_template_id_5e2ac717___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
  15099. false,
  15100. null,
  15101. null,
  15102. null
  15103. )
  15104. /* harmony default export */ __webpack_exports__["default"] = (component.exports);
  15105. /***/ }),
  15106. /***/ "5f55":
  15107. /***/ (function(module, exports, __webpack_require__) {
  15108. "use strict";
  15109. var _interopRequireDefault = __webpack_require__("8e6d");
  15110. Object.defineProperty(exports, "__esModule", {
  15111. value: true
  15112. });
  15113. exports.default = void 0;
  15114. var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
  15115. var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
  15116. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
  15117. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
  15118. var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
  15119. var _leaflet = _interopRequireDefault(__webpack_require__("73e4"));
  15120. __webpack_require__("751d");
  15121. var _propsBinder = __webpack_require__("efee");
  15122. var RasterTileLayerViewModel =
  15123. /*#__PURE__*/
  15124. function (_L$Evented) {
  15125. (0, _inherits2.default)(RasterTileLayerViewModel, _L$Evented);
  15126. function RasterTileLayerViewModel(options) {
  15127. var _this;
  15128. (0, _classCallCheck2.default)(this, RasterTileLayerViewModel);
  15129. _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(RasterTileLayerViewModel).call(this));
  15130. _this.defaultOptions = {
  15131. minZoom: 0,
  15132. maxZoom: 22,
  15133. opacity: 1,
  15134. tileSize: 256
  15135. };
  15136. var _loop = function _loop(key) {
  15137. var setMethodName = 'set' + (0, _propsBinder.capitalizeFirstLetter)(key);
  15138. _this[setMethodName] = function (newVal) {
  15139. if (this.layer) {
  15140. this.layer._paramsChanged = true;
  15141. if (key === 'url') {
  15142. this.layer.setUrl(newVal);
  15143. } else if (key === 'bounds') {
  15144. this.layer.options[key] = this._setBounds(newVal);
  15145. } else {
  15146. this.layer.options[key] = newVal;
  15147. this.layer.redraw();
  15148. }
  15149. }
  15150. };
  15151. };
  15152. for (var key in options) {
  15153. _loop(key);
  15154. }
  15155. Object.assign(_this.defaultOptions, options);
  15156. _this.defaultOptions.bounds && (_this.defaultOptions.bounds = _this._setBounds(_this.defaultOptions.bounds));
  15157. _this._init();
  15158. return _this;
  15159. }
  15160. (0, _createClass2.default)(RasterTileLayerViewModel, [{
  15161. key: "_setBounds",
  15162. value: function _setBounds(bounds) {
  15163. return _leaflet.default.latLngBounds(_leaflet.default.latLng(bounds[1], bounds[0]), _leaflet.default.latLng(bounds[3], bounds[2]));
  15164. }
  15165. }, {
  15166. key: "_init",
  15167. value: function _init() {
  15168. this._addLayer();
  15169. }
  15170. }, {
  15171. key: "_addLayer",
  15172. value: function _addLayer() {
  15173. this.layer = _leaflet.default.supermap.tiledMapLayer(this.defaultOptions.url, this.defaultOptions);
  15174. }
  15175. }, {
  15176. key: "getLayer",
  15177. value: function getLayer() {
  15178. return this.layer;
  15179. }
  15180. }, {
  15181. key: "addTo",
  15182. value: function addTo(map) {
  15183. this.map = map;
  15184. this.map.addLayer(this.layer);
  15185. }
  15186. }, {
  15187. key: "clear",
  15188. value: function clear() {
  15189. var map = this.map,
  15190. layer = this.layer;
  15191. if (map && layer && map.hasLayer(this.layer)) {
  15192. map.removeLayer(layer);
  15193. }
  15194. }
  15195. }]);
  15196. return RasterTileLayerViewModel;
  15197. }(_leaflet.default.Evented);
  15198. exports.default = RasterTileLayerViewModel;
  15199. /***/ }),
  15200. /***/ "5f9f":
  15201. /***/ (function(module, exports, __webpack_require__) {
  15202. /* WEBPACK VAR INJECTION */(function(global, module) {/**
  15203. * Lodash (Custom Build) <https://lodash.com/>
  15204. * Build: `lodash modularize exports="npm" -o ./`
  15205. * Copyright JS Foundation and other contributors <https://js.foundation/>
  15206. * Released under MIT license <https://lodash.com/license>
  15207. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  15208. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  15209. */
  15210. /** Used as the size to enable large array optimizations. */
  15211. var LARGE_ARRAY_SIZE = 200;
  15212. /** Used to stand-in for `undefined` hash values. */
  15213. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  15214. /** Used to compose bitmasks for value comparisons. */
  15215. var COMPARE_PARTIAL_FLAG = 1,
  15216. COMPARE_UNORDERED_FLAG = 2;
  15217. /** Used as references for various `Number` constants. */
  15218. var MAX_SAFE_INTEGER = 9007199254740991;
  15219. /** `Object#toString` result references. */
  15220. var argsTag = '[object Arguments]',
  15221. arrayTag = '[object Array]',
  15222. asyncTag = '[object AsyncFunction]',
  15223. boolTag = '[object Boolean]',
  15224. dateTag = '[object Date]',
  15225. errorTag = '[object Error]',
  15226. funcTag = '[object Function]',
  15227. genTag = '[object GeneratorFunction]',
  15228. mapTag = '[object Map]',
  15229. numberTag = '[object Number]',
  15230. nullTag = '[object Null]',
  15231. objectTag = '[object Object]',
  15232. promiseTag = '[object Promise]',
  15233. proxyTag = '[object Proxy]',
  15234. regexpTag = '[object RegExp]',
  15235. setTag = '[object Set]',
  15236. stringTag = '[object String]',
  15237. symbolTag = '[object Symbol]',
  15238. undefinedTag = '[object Undefined]',
  15239. weakMapTag = '[object WeakMap]';
  15240. var arrayBufferTag = '[object ArrayBuffer]',
  15241. dataViewTag = '[object DataView]',
  15242. float32Tag = '[object Float32Array]',
  15243. float64Tag = '[object Float64Array]',
  15244. int8Tag = '[object Int8Array]',
  15245. int16Tag = '[object Int16Array]',
  15246. int32Tag = '[object Int32Array]',
  15247. uint8Tag = '[object Uint8Array]',
  15248. uint8ClampedTag = '[object Uint8ClampedArray]',
  15249. uint16Tag = '[object Uint16Array]',
  15250. uint32Tag = '[object Uint32Array]';
  15251. /**
  15252. * Used to match `RegExp`
  15253. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  15254. */
  15255. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
  15256. /** Used to detect host constructors (Safari). */
  15257. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  15258. /** Used to detect unsigned integer values. */
  15259. var reIsUint = /^(?:0|[1-9]\d*)$/;
  15260. /** Used to identify `toStringTag` values of typed arrays. */
  15261. var typedArrayTags = {};
  15262. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
  15263. typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
  15264. typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
  15265. typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
  15266. typedArrayTags[uint32Tag] = true;
  15267. typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
  15268. typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
  15269. typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
  15270. typedArrayTags[errorTag] = typedArrayTags[funcTag] =
  15271. typedArrayTags[mapTag] = typedArrayTags[numberTag] =
  15272. typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
  15273. typedArrayTags[setTag] = typedArrayTags[stringTag] =
  15274. typedArrayTags[weakMapTag] = false;
  15275. /** Detect free variable `global` from Node.js. */
  15276. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  15277. /** Detect free variable `self`. */
  15278. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  15279. /** Used as a reference to the global object. */
  15280. var root = freeGlobal || freeSelf || Function('return this')();
  15281. /** Detect free variable `exports`. */
  15282. var freeExports = true && exports && !exports.nodeType && exports;
  15283. /** Detect free variable `module`. */
  15284. var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
  15285. /** Detect the popular CommonJS extension `module.exports`. */
  15286. var moduleExports = freeModule && freeModule.exports === freeExports;
  15287. /** Detect free variable `process` from Node.js. */
  15288. var freeProcess = moduleExports && freeGlobal.process;
  15289. /** Used to access faster Node.js helpers. */
  15290. var nodeUtil = (function() {
  15291. try {
  15292. return freeProcess && freeProcess.binding && freeProcess.binding('util');
  15293. } catch (e) {}
  15294. }());
  15295. /* Node.js helper references. */
  15296. var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
  15297. /**
  15298. * A specialized version of `_.filter` for arrays without support for
  15299. * iteratee shorthands.
  15300. *
  15301. * @private
  15302. * @param {Array} [array] The array to iterate over.
  15303. * @param {Function} predicate The function invoked per iteration.
  15304. * @returns {Array} Returns the new filtered array.
  15305. */
  15306. function arrayFilter(array, predicate) {
  15307. var index = -1,
  15308. length = array == null ? 0 : array.length,
  15309. resIndex = 0,
  15310. result = [];
  15311. while (++index < length) {
  15312. var value = array[index];
  15313. if (predicate(value, index, array)) {
  15314. result[resIndex++] = value;
  15315. }
  15316. }
  15317. return result;
  15318. }
  15319. /**
  15320. * Appends the elements of `values` to `array`.
  15321. *
  15322. * @private
  15323. * @param {Array} array The array to modify.
  15324. * @param {Array} values The values to append.
  15325. * @returns {Array} Returns `array`.
  15326. */
  15327. function arrayPush(array, values) {
  15328. var index = -1,
  15329. length = values.length,
  15330. offset = array.length;
  15331. while (++index < length) {
  15332. array[offset + index] = values[index];
  15333. }
  15334. return array;
  15335. }
  15336. /**
  15337. * A specialized version of `_.some` for arrays without support for iteratee
  15338. * shorthands.
  15339. *
  15340. * @private
  15341. * @param {Array} [array] The array to iterate over.
  15342. * @param {Function} predicate The function invoked per iteration.
  15343. * @returns {boolean} Returns `true` if any element passes the predicate check,
  15344. * else `false`.
  15345. */
  15346. function arraySome(array, predicate) {
  15347. var index = -1,
  15348. length = array == null ? 0 : array.length;
  15349. while (++index < length) {
  15350. if (predicate(array[index], index, array)) {
  15351. return true;
  15352. }
  15353. }
  15354. return false;
  15355. }
  15356. /**
  15357. * The base implementation of `_.times` without support for iteratee shorthands
  15358. * or max array length checks.
  15359. *
  15360. * @private
  15361. * @param {number} n The number of times to invoke `iteratee`.
  15362. * @param {Function} iteratee The function invoked per iteration.
  15363. * @returns {Array} Returns the array of results.
  15364. */
  15365. function baseTimes(n, iteratee) {
  15366. var index = -1,
  15367. result = Array(n);
  15368. while (++index < n) {
  15369. result[index] = iteratee(index);
  15370. }
  15371. return result;
  15372. }
  15373. /**
  15374. * The base implementation of `_.unary` without support for storing metadata.
  15375. *
  15376. * @private
  15377. * @param {Function} func The function to cap arguments for.
  15378. * @returns {Function} Returns the new capped function.
  15379. */
  15380. function baseUnary(func) {
  15381. return function(value) {
  15382. return func(value);
  15383. };
  15384. }
  15385. /**
  15386. * Checks if a `cache` value for `key` exists.
  15387. *
  15388. * @private
  15389. * @param {Object} cache The cache to query.
  15390. * @param {string} key The key of the entry to check.
  15391. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  15392. */
  15393. function cacheHas(cache, key) {
  15394. return cache.has(key);
  15395. }
  15396. /**
  15397. * Gets the value at `key` of `object`.
  15398. *
  15399. * @private
  15400. * @param {Object} [object] The object to query.
  15401. * @param {string} key The key of the property to get.
  15402. * @returns {*} Returns the property value.
  15403. */
  15404. function getValue(object, key) {
  15405. return object == null ? undefined : object[key];
  15406. }
  15407. /**
  15408. * Converts `map` to its key-value pairs.
  15409. *
  15410. * @private
  15411. * @param {Object} map The map to convert.
  15412. * @returns {Array} Returns the key-value pairs.
  15413. */
  15414. function mapToArray(map) {
  15415. var index = -1,
  15416. result = Array(map.size);
  15417. map.forEach(function(value, key) {
  15418. result[++index] = [key, value];
  15419. });
  15420. return result;
  15421. }
  15422. /**
  15423. * Creates a unary function that invokes `func` with its argument transformed.
  15424. *
  15425. * @private
  15426. * @param {Function} func The function to wrap.
  15427. * @param {Function} transform The argument transform.
  15428. * @returns {Function} Returns the new function.
  15429. */
  15430. function overArg(func, transform) {
  15431. return function(arg) {
  15432. return func(transform(arg));
  15433. };
  15434. }
  15435. /**
  15436. * Converts `set` to an array of its values.
  15437. *
  15438. * @private
  15439. * @param {Object} set The set to convert.
  15440. * @returns {Array} Returns the values.
  15441. */
  15442. function setToArray(set) {
  15443. var index = -1,
  15444. result = Array(set.size);
  15445. set.forEach(function(value) {
  15446. result[++index] = value;
  15447. });
  15448. return result;
  15449. }
  15450. /** Used for built-in method references. */
  15451. var arrayProto = Array.prototype,
  15452. funcProto = Function.prototype,
  15453. objectProto = Object.prototype;
  15454. /** Used to detect overreaching core-js shims. */
  15455. var coreJsData = root['__core-js_shared__'];
  15456. /** Used to resolve the decompiled source of functions. */
  15457. var funcToString = funcProto.toString;
  15458. /** Used to check objects for own properties. */
  15459. var hasOwnProperty = objectProto.hasOwnProperty;
  15460. /** Used to detect methods masquerading as native. */
  15461. var maskSrcKey = (function() {
  15462. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  15463. return uid ? ('Symbol(src)_1.' + uid) : '';
  15464. }());
  15465. /**
  15466. * Used to resolve the
  15467. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  15468. * of values.
  15469. */
  15470. var nativeObjectToString = objectProto.toString;
  15471. /** Used to detect if a method is native. */
  15472. var reIsNative = RegExp('^' +
  15473. funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  15474. .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  15475. );
  15476. /** Built-in value references. */
  15477. var Buffer = moduleExports ? root.Buffer : undefined,
  15478. Symbol = root.Symbol,
  15479. Uint8Array = root.Uint8Array,
  15480. propertyIsEnumerable = objectProto.propertyIsEnumerable,
  15481. splice = arrayProto.splice,
  15482. symToStringTag = Symbol ? Symbol.toStringTag : undefined;
  15483. /* Built-in method references for those with the same name as other `lodash` methods. */
  15484. var nativeGetSymbols = Object.getOwnPropertySymbols,
  15485. nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
  15486. nativeKeys = overArg(Object.keys, Object);
  15487. /* Built-in method references that are verified to be native. */
  15488. var DataView = getNative(root, 'DataView'),
  15489. Map = getNative(root, 'Map'),
  15490. Promise = getNative(root, 'Promise'),
  15491. Set = getNative(root, 'Set'),
  15492. WeakMap = getNative(root, 'WeakMap'),
  15493. nativeCreate = getNative(Object, 'create');
  15494. /** Used to detect maps, sets, and weakmaps. */
  15495. var dataViewCtorString = toSource(DataView),
  15496. mapCtorString = toSource(Map),
  15497. promiseCtorString = toSource(Promise),
  15498. setCtorString = toSource(Set),
  15499. weakMapCtorString = toSource(WeakMap);
  15500. /** Used to convert symbols to primitives and strings. */
  15501. var symbolProto = Symbol ? Symbol.prototype : undefined,
  15502. symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
  15503. /**
  15504. * Creates a hash object.
  15505. *
  15506. * @private
  15507. * @constructor
  15508. * @param {Array} [entries] The key-value pairs to cache.
  15509. */
  15510. function Hash(entries) {
  15511. var index = -1,
  15512. length = entries == null ? 0 : entries.length;
  15513. this.clear();
  15514. while (++index < length) {
  15515. var entry = entries[index];
  15516. this.set(entry[0], entry[1]);
  15517. }
  15518. }
  15519. /**
  15520. * Removes all key-value entries from the hash.
  15521. *
  15522. * @private
  15523. * @name clear
  15524. * @memberOf Hash
  15525. */
  15526. function hashClear() {
  15527. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  15528. this.size = 0;
  15529. }
  15530. /**
  15531. * Removes `key` and its value from the hash.
  15532. *
  15533. * @private
  15534. * @name delete
  15535. * @memberOf Hash
  15536. * @param {Object} hash The hash to modify.
  15537. * @param {string} key The key of the value to remove.
  15538. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  15539. */
  15540. function hashDelete(key) {
  15541. var result = this.has(key) && delete this.__data__[key];
  15542. this.size -= result ? 1 : 0;
  15543. return result;
  15544. }
  15545. /**
  15546. * Gets the hash value for `key`.
  15547. *
  15548. * @private
  15549. * @name get
  15550. * @memberOf Hash
  15551. * @param {string} key The key of the value to get.
  15552. * @returns {*} Returns the entry value.
  15553. */
  15554. function hashGet(key) {
  15555. var data = this.__data__;
  15556. if (nativeCreate) {
  15557. var result = data[key];
  15558. return result === HASH_UNDEFINED ? undefined : result;
  15559. }
  15560. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  15561. }
  15562. /**
  15563. * Checks if a hash value for `key` exists.
  15564. *
  15565. * @private
  15566. * @name has
  15567. * @memberOf Hash
  15568. * @param {string} key The key of the entry to check.
  15569. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  15570. */
  15571. function hashHas(key) {
  15572. var data = this.__data__;
  15573. return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
  15574. }
  15575. /**
  15576. * Sets the hash `key` to `value`.
  15577. *
  15578. * @private
  15579. * @name set
  15580. * @memberOf Hash
  15581. * @param {string} key The key of the value to set.
  15582. * @param {*} value The value to set.
  15583. * @returns {Object} Returns the hash instance.
  15584. */
  15585. function hashSet(key, value) {
  15586. var data = this.__data__;
  15587. this.size += this.has(key) ? 0 : 1;
  15588. data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
  15589. return this;
  15590. }
  15591. // Add methods to `Hash`.
  15592. Hash.prototype.clear = hashClear;
  15593. Hash.prototype['delete'] = hashDelete;
  15594. Hash.prototype.get = hashGet;
  15595. Hash.prototype.has = hashHas;
  15596. Hash.prototype.set = hashSet;
  15597. /**
  15598. * Creates an list cache object.
  15599. *
  15600. * @private
  15601. * @constructor
  15602. * @param {Array} [entries] The key-value pairs to cache.
  15603. */
  15604. function ListCache(entries) {
  15605. var index = -1,
  15606. length = entries == null ? 0 : entries.length;
  15607. this.clear();
  15608. while (++index < length) {
  15609. var entry = entries[index];
  15610. this.set(entry[0], entry[1]);
  15611. }
  15612. }
  15613. /**
  15614. * Removes all key-value entries from the list cache.
  15615. *
  15616. * @private
  15617. * @name clear
  15618. * @memberOf ListCache
  15619. */
  15620. function listCacheClear() {
  15621. this.__data__ = [];
  15622. this.size = 0;
  15623. }
  15624. /**
  15625. * Removes `key` and its value from the list cache.
  15626. *
  15627. * @private
  15628. * @name delete
  15629. * @memberOf ListCache
  15630. * @param {string} key The key of the value to remove.
  15631. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  15632. */
  15633. function listCacheDelete(key) {
  15634. var data = this.__data__,
  15635. index = assocIndexOf(data, key);
  15636. if (index < 0) {
  15637. return false;
  15638. }
  15639. var lastIndex = data.length - 1;
  15640. if (index == lastIndex) {
  15641. data.pop();
  15642. } else {
  15643. splice.call(data, index, 1);
  15644. }
  15645. --this.size;
  15646. return true;
  15647. }
  15648. /**
  15649. * Gets the list cache value for `key`.
  15650. *
  15651. * @private
  15652. * @name get
  15653. * @memberOf ListCache
  15654. * @param {string} key The key of the value to get.
  15655. * @returns {*} Returns the entry value.
  15656. */
  15657. function listCacheGet(key) {
  15658. var data = this.__data__,
  15659. index = assocIndexOf(data, key);
  15660. return index < 0 ? undefined : data[index][1];
  15661. }
  15662. /**
  15663. * Checks if a list cache value for `key` exists.
  15664. *
  15665. * @private
  15666. * @name has
  15667. * @memberOf ListCache
  15668. * @param {string} key The key of the entry to check.
  15669. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  15670. */
  15671. function listCacheHas(key) {
  15672. return assocIndexOf(this.__data__, key) > -1;
  15673. }
  15674. /**
  15675. * Sets the list cache `key` to `value`.
  15676. *
  15677. * @private
  15678. * @name set
  15679. * @memberOf ListCache
  15680. * @param {string} key The key of the value to set.
  15681. * @param {*} value The value to set.
  15682. * @returns {Object} Returns the list cache instance.
  15683. */
  15684. function listCacheSet(key, value) {
  15685. var data = this.__data__,
  15686. index = assocIndexOf(data, key);
  15687. if (index < 0) {
  15688. ++this.size;
  15689. data.push([key, value]);
  15690. } else {
  15691. data[index][1] = value;
  15692. }
  15693. return this;
  15694. }
  15695. // Add methods to `ListCache`.
  15696. ListCache.prototype.clear = listCacheClear;
  15697. ListCache.prototype['delete'] = listCacheDelete;
  15698. ListCache.prototype.get = listCacheGet;
  15699. ListCache.prototype.has = listCacheHas;
  15700. ListCache.prototype.set = listCacheSet;
  15701. /**
  15702. * Creates a map cache object to store key-value pairs.
  15703. *
  15704. * @private
  15705. * @constructor
  15706. * @param {Array} [entries] The key-value pairs to cache.
  15707. */
  15708. function MapCache(entries) {
  15709. var index = -1,
  15710. length = entries == null ? 0 : entries.length;
  15711. this.clear();
  15712. while (++index < length) {
  15713. var entry = entries[index];
  15714. this.set(entry[0], entry[1]);
  15715. }
  15716. }
  15717. /**
  15718. * Removes all key-value entries from the map.
  15719. *
  15720. * @private
  15721. * @name clear
  15722. * @memberOf MapCache
  15723. */
  15724. function mapCacheClear() {
  15725. this.size = 0;
  15726. this.__data__ = {
  15727. 'hash': new Hash,
  15728. 'map': new (Map || ListCache),
  15729. 'string': new Hash
  15730. };
  15731. }
  15732. /**
  15733. * Removes `key` and its value from the map.
  15734. *
  15735. * @private
  15736. * @name delete
  15737. * @memberOf MapCache
  15738. * @param {string} key The key of the value to remove.
  15739. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  15740. */
  15741. function mapCacheDelete(key) {
  15742. var result = getMapData(this, key)['delete'](key);
  15743. this.size -= result ? 1 : 0;
  15744. return result;
  15745. }
  15746. /**
  15747. * Gets the map value for `key`.
  15748. *
  15749. * @private
  15750. * @name get
  15751. * @memberOf MapCache
  15752. * @param {string} key The key of the value to get.
  15753. * @returns {*} Returns the entry value.
  15754. */
  15755. function mapCacheGet(key) {
  15756. return getMapData(this, key).get(key);
  15757. }
  15758. /**
  15759. * Checks if a map value for `key` exists.
  15760. *
  15761. * @private
  15762. * @name has
  15763. * @memberOf MapCache
  15764. * @param {string} key The key of the entry to check.
  15765. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  15766. */
  15767. function mapCacheHas(key) {
  15768. return getMapData(this, key).has(key);
  15769. }
  15770. /**
  15771. * Sets the map `key` to `value`.
  15772. *
  15773. * @private
  15774. * @name set
  15775. * @memberOf MapCache
  15776. * @param {string} key The key of the value to set.
  15777. * @param {*} value The value to set.
  15778. * @returns {Object} Returns the map cache instance.
  15779. */
  15780. function mapCacheSet(key, value) {
  15781. var data = getMapData(this, key),
  15782. size = data.size;
  15783. data.set(key, value);
  15784. this.size += data.size == size ? 0 : 1;
  15785. return this;
  15786. }
  15787. // Add methods to `MapCache`.
  15788. MapCache.prototype.clear = mapCacheClear;
  15789. MapCache.prototype['delete'] = mapCacheDelete;
  15790. MapCache.prototype.get = mapCacheGet;
  15791. MapCache.prototype.has = mapCacheHas;
  15792. MapCache.prototype.set = mapCacheSet;
  15793. /**
  15794. *
  15795. * Creates an array cache object to store unique values.
  15796. *
  15797. * @private
  15798. * @constructor
  15799. * @param {Array} [values] The values to cache.
  15800. */
  15801. function SetCache(values) {
  15802. var index = -1,
  15803. length = values == null ? 0 : values.length;
  15804. this.__data__ = new MapCache;
  15805. while (++index < length) {
  15806. this.add(values[index]);
  15807. }
  15808. }
  15809. /**
  15810. * Adds `value` to the array cache.
  15811. *
  15812. * @private
  15813. * @name add
  15814. * @memberOf SetCache
  15815. * @alias push
  15816. * @param {*} value The value to cache.
  15817. * @returns {Object} Returns the cache instance.
  15818. */
  15819. function setCacheAdd(value) {
  15820. this.__data__.set(value, HASH_UNDEFINED);
  15821. return this;
  15822. }
  15823. /**
  15824. * Checks if `value` is in the array cache.
  15825. *
  15826. * @private
  15827. * @name has
  15828. * @memberOf SetCache
  15829. * @param {*} value The value to search for.
  15830. * @returns {number} Returns `true` if `value` is found, else `false`.
  15831. */
  15832. function setCacheHas(value) {
  15833. return this.__data__.has(value);
  15834. }
  15835. // Add methods to `SetCache`.
  15836. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
  15837. SetCache.prototype.has = setCacheHas;
  15838. /**
  15839. * Creates a stack cache object to store key-value pairs.
  15840. *
  15841. * @private
  15842. * @constructor
  15843. * @param {Array} [entries] The key-value pairs to cache.
  15844. */
  15845. function Stack(entries) {
  15846. var data = this.__data__ = new ListCache(entries);
  15847. this.size = data.size;
  15848. }
  15849. /**
  15850. * Removes all key-value entries from the stack.
  15851. *
  15852. * @private
  15853. * @name clear
  15854. * @memberOf Stack
  15855. */
  15856. function stackClear() {
  15857. this.__data__ = new ListCache;
  15858. this.size = 0;
  15859. }
  15860. /**
  15861. * Removes `key` and its value from the stack.
  15862. *
  15863. * @private
  15864. * @name delete
  15865. * @memberOf Stack
  15866. * @param {string} key The key of the value to remove.
  15867. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  15868. */
  15869. function stackDelete(key) {
  15870. var data = this.__data__,
  15871. result = data['delete'](key);
  15872. this.size = data.size;
  15873. return result;
  15874. }
  15875. /**
  15876. * Gets the stack value for `key`.
  15877. *
  15878. * @private
  15879. * @name get
  15880. * @memberOf Stack
  15881. * @param {string} key The key of the value to get.
  15882. * @returns {*} Returns the entry value.
  15883. */
  15884. function stackGet(key) {
  15885. return this.__data__.get(key);
  15886. }
  15887. /**
  15888. * Checks if a stack value for `key` exists.
  15889. *
  15890. * @private
  15891. * @name has
  15892. * @memberOf Stack
  15893. * @param {string} key The key of the entry to check.
  15894. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  15895. */
  15896. function stackHas(key) {
  15897. return this.__data__.has(key);
  15898. }
  15899. /**
  15900. * Sets the stack `key` to `value`.
  15901. *
  15902. * @private
  15903. * @name set
  15904. * @memberOf Stack
  15905. * @param {string} key The key of the value to set.
  15906. * @param {*} value The value to set.
  15907. * @returns {Object} Returns the stack cache instance.
  15908. */
  15909. function stackSet(key, value) {
  15910. var data = this.__data__;
  15911. if (data instanceof ListCache) {
  15912. var pairs = data.__data__;
  15913. if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
  15914. pairs.push([key, value]);
  15915. this.size = ++data.size;
  15916. return this;
  15917. }
  15918. data = this.__data__ = new MapCache(pairs);
  15919. }
  15920. data.set(key, value);
  15921. this.size = data.size;
  15922. return this;
  15923. }
  15924. // Add methods to `Stack`.
  15925. Stack.prototype.clear = stackClear;
  15926. Stack.prototype['delete'] = stackDelete;
  15927. Stack.prototype.get = stackGet;
  15928. Stack.prototype.has = stackHas;
  15929. Stack.prototype.set = stackSet;
  15930. /**
  15931. * Creates an array of the enumerable property names of the array-like `value`.
  15932. *
  15933. * @private
  15934. * @param {*} value The value to query.
  15935. * @param {boolean} inherited Specify returning inherited property names.
  15936. * @returns {Array} Returns the array of property names.
  15937. */
  15938. function arrayLikeKeys(value, inherited) {
  15939. var isArr = isArray(value),
  15940. isArg = !isArr && isArguments(value),
  15941. isBuff = !isArr && !isArg && isBuffer(value),
  15942. isType = !isArr && !isArg && !isBuff && isTypedArray(value),
  15943. skipIndexes = isArr || isArg || isBuff || isType,
  15944. result = skipIndexes ? baseTimes(value.length, String) : [],
  15945. length = result.length;
  15946. for (var key in value) {
  15947. if ((inherited || hasOwnProperty.call(value, key)) &&
  15948. !(skipIndexes && (
  15949. // Safari 9 has enumerable `arguments.length` in strict mode.
  15950. key == 'length' ||
  15951. // Node.js 0.10 has enumerable non-index properties on buffers.
  15952. (isBuff && (key == 'offset' || key == 'parent')) ||
  15953. // PhantomJS 2 has enumerable non-index properties on typed arrays.
  15954. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
  15955. // Skip index properties.
  15956. isIndex(key, length)
  15957. ))) {
  15958. result.push(key);
  15959. }
  15960. }
  15961. return result;
  15962. }
  15963. /**
  15964. * Gets the index at which the `key` is found in `array` of key-value pairs.
  15965. *
  15966. * @private
  15967. * @param {Array} array The array to inspect.
  15968. * @param {*} key The key to search for.
  15969. * @returns {number} Returns the index of the matched value, else `-1`.
  15970. */
  15971. function assocIndexOf(array, key) {
  15972. var length = array.length;
  15973. while (length--) {
  15974. if (eq(array[length][0], key)) {
  15975. return length;
  15976. }
  15977. }
  15978. return -1;
  15979. }
  15980. /**
  15981. * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
  15982. * `keysFunc` and `symbolsFunc` to get the enumerable property names and
  15983. * symbols of `object`.
  15984. *
  15985. * @private
  15986. * @param {Object} object The object to query.
  15987. * @param {Function} keysFunc The function to get the keys of `object`.
  15988. * @param {Function} symbolsFunc The function to get the symbols of `object`.
  15989. * @returns {Array} Returns the array of property names and symbols.
  15990. */
  15991. function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  15992. var result = keysFunc(object);
  15993. return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
  15994. }
  15995. /**
  15996. * The base implementation of `getTag` without fallbacks for buggy environments.
  15997. *
  15998. * @private
  15999. * @param {*} value The value to query.
  16000. * @returns {string} Returns the `toStringTag`.
  16001. */
  16002. function baseGetTag(value) {
  16003. if (value == null) {
  16004. return value === undefined ? undefinedTag : nullTag;
  16005. }
  16006. return (symToStringTag && symToStringTag in Object(value))
  16007. ? getRawTag(value)
  16008. : objectToString(value);
  16009. }
  16010. /**
  16011. * The base implementation of `_.isArguments`.
  16012. *
  16013. * @private
  16014. * @param {*} value The value to check.
  16015. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  16016. */
  16017. function baseIsArguments(value) {
  16018. return isObjectLike(value) && baseGetTag(value) == argsTag;
  16019. }
  16020. /**
  16021. * The base implementation of `_.isEqual` which supports partial comparisons
  16022. * and tracks traversed objects.
  16023. *
  16024. * @private
  16025. * @param {*} value The value to compare.
  16026. * @param {*} other The other value to compare.
  16027. * @param {boolean} bitmask The bitmask flags.
  16028. * 1 - Unordered comparison
  16029. * 2 - Partial comparison
  16030. * @param {Function} [customizer] The function to customize comparisons.
  16031. * @param {Object} [stack] Tracks traversed `value` and `other` objects.
  16032. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  16033. */
  16034. function baseIsEqual(value, other, bitmask, customizer, stack) {
  16035. if (value === other) {
  16036. return true;
  16037. }
  16038. if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
  16039. return value !== value && other !== other;
  16040. }
  16041. return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
  16042. }
  16043. /**
  16044. * A specialized version of `baseIsEqual` for arrays and objects which performs
  16045. * deep comparisons and tracks traversed objects enabling objects with circular
  16046. * references to be compared.
  16047. *
  16048. * @private
  16049. * @param {Object} object The object to compare.
  16050. * @param {Object} other The other object to compare.
  16051. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  16052. * @param {Function} customizer The function to customize comparisons.
  16053. * @param {Function} equalFunc The function to determine equivalents of values.
  16054. * @param {Object} [stack] Tracks traversed `object` and `other` objects.
  16055. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  16056. */
  16057. function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
  16058. var objIsArr = isArray(object),
  16059. othIsArr = isArray(other),
  16060. objTag = objIsArr ? arrayTag : getTag(object),
  16061. othTag = othIsArr ? arrayTag : getTag(other);
  16062. objTag = objTag == argsTag ? objectTag : objTag;
  16063. othTag = othTag == argsTag ? objectTag : othTag;
  16064. var objIsObj = objTag == objectTag,
  16065. othIsObj = othTag == objectTag,
  16066. isSameTag = objTag == othTag;
  16067. if (isSameTag && isBuffer(object)) {
  16068. if (!isBuffer(other)) {
  16069. return false;
  16070. }
  16071. objIsArr = true;
  16072. objIsObj = false;
  16073. }
  16074. if (isSameTag && !objIsObj) {
  16075. stack || (stack = new Stack);
  16076. return (objIsArr || isTypedArray(object))
  16077. ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
  16078. : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
  16079. }
  16080. if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
  16081. var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
  16082. othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
  16083. if (objIsWrapped || othIsWrapped) {
  16084. var objUnwrapped = objIsWrapped ? object.value() : object,
  16085. othUnwrapped = othIsWrapped ? other.value() : other;
  16086. stack || (stack = new Stack);
  16087. return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
  16088. }
  16089. }
  16090. if (!isSameTag) {
  16091. return false;
  16092. }
  16093. stack || (stack = new Stack);
  16094. return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
  16095. }
  16096. /**
  16097. * The base implementation of `_.isNative` without bad shim checks.
  16098. *
  16099. * @private
  16100. * @param {*} value The value to check.
  16101. * @returns {boolean} Returns `true` if `value` is a native function,
  16102. * else `false`.
  16103. */
  16104. function baseIsNative(value) {
  16105. if (!isObject(value) || isMasked(value)) {
  16106. return false;
  16107. }
  16108. var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
  16109. return pattern.test(toSource(value));
  16110. }
  16111. /**
  16112. * The base implementation of `_.isTypedArray` without Node.js optimizations.
  16113. *
  16114. * @private
  16115. * @param {*} value The value to check.
  16116. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  16117. */
  16118. function baseIsTypedArray(value) {
  16119. return isObjectLike(value) &&
  16120. isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
  16121. }
  16122. /**
  16123. * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
  16124. *
  16125. * @private
  16126. * @param {Object} object The object to query.
  16127. * @returns {Array} Returns the array of property names.
  16128. */
  16129. function baseKeys(object) {
  16130. if (!isPrototype(object)) {
  16131. return nativeKeys(object);
  16132. }
  16133. var result = [];
  16134. for (var key in Object(object)) {
  16135. if (hasOwnProperty.call(object, key) && key != 'constructor') {
  16136. result.push(key);
  16137. }
  16138. }
  16139. return result;
  16140. }
  16141. /**
  16142. * A specialized version of `baseIsEqualDeep` for arrays with support for
  16143. * partial deep comparisons.
  16144. *
  16145. * @private
  16146. * @param {Array} array The array to compare.
  16147. * @param {Array} other The other array to compare.
  16148. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  16149. * @param {Function} customizer The function to customize comparisons.
  16150. * @param {Function} equalFunc The function to determine equivalents of values.
  16151. * @param {Object} stack Tracks traversed `array` and `other` objects.
  16152. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
  16153. */
  16154. function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
  16155. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  16156. arrLength = array.length,
  16157. othLength = other.length;
  16158. if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
  16159. return false;
  16160. }
  16161. // Assume cyclic values are equal.
  16162. var stacked = stack.get(array);
  16163. if (stacked && stack.get(other)) {
  16164. return stacked == other;
  16165. }
  16166. var index = -1,
  16167. result = true,
  16168. seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
  16169. stack.set(array, other);
  16170. stack.set(other, array);
  16171. // Ignore non-index properties.
  16172. while (++index < arrLength) {
  16173. var arrValue = array[index],
  16174. othValue = other[index];
  16175. if (customizer) {
  16176. var compared = isPartial
  16177. ? customizer(othValue, arrValue, index, other, array, stack)
  16178. : customizer(arrValue, othValue, index, array, other, stack);
  16179. }
  16180. if (compared !== undefined) {
  16181. if (compared) {
  16182. continue;
  16183. }
  16184. result = false;
  16185. break;
  16186. }
  16187. // Recursively compare arrays (susceptible to call stack limits).
  16188. if (seen) {
  16189. if (!arraySome(other, function(othValue, othIndex) {
  16190. if (!cacheHas(seen, othIndex) &&
  16191. (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
  16192. return seen.push(othIndex);
  16193. }
  16194. })) {
  16195. result = false;
  16196. break;
  16197. }
  16198. } else if (!(
  16199. arrValue === othValue ||
  16200. equalFunc(arrValue, othValue, bitmask, customizer, stack)
  16201. )) {
  16202. result = false;
  16203. break;
  16204. }
  16205. }
  16206. stack['delete'](array);
  16207. stack['delete'](other);
  16208. return result;
  16209. }
  16210. /**
  16211. * A specialized version of `baseIsEqualDeep` for comparing objects of
  16212. * the same `toStringTag`.
  16213. *
  16214. * **Note:** This function only supports comparing values with tags of
  16215. * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
  16216. *
  16217. * @private
  16218. * @param {Object} object The object to compare.
  16219. * @param {Object} other The other object to compare.
  16220. * @param {string} tag The `toStringTag` of the objects to compare.
  16221. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  16222. * @param {Function} customizer The function to customize comparisons.
  16223. * @param {Function} equalFunc The function to determine equivalents of values.
  16224. * @param {Object} stack Tracks traversed `object` and `other` objects.
  16225. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  16226. */
  16227. function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
  16228. switch (tag) {
  16229. case dataViewTag:
  16230. if ((object.byteLength != other.byteLength) ||
  16231. (object.byteOffset != other.byteOffset)) {
  16232. return false;
  16233. }
  16234. object = object.buffer;
  16235. other = other.buffer;
  16236. case arrayBufferTag:
  16237. if ((object.byteLength != other.byteLength) ||
  16238. !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
  16239. return false;
  16240. }
  16241. return true;
  16242. case boolTag:
  16243. case dateTag:
  16244. case numberTag:
  16245. // Coerce booleans to `1` or `0` and dates to milliseconds.
  16246. // Invalid dates are coerced to `NaN`.
  16247. return eq(+object, +other);
  16248. case errorTag:
  16249. return object.name == other.name && object.message == other.message;
  16250. case regexpTag:
  16251. case stringTag:
  16252. // Coerce regexes to strings and treat strings, primitives and objects,
  16253. // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
  16254. // for more details.
  16255. return object == (other + '');
  16256. case mapTag:
  16257. var convert = mapToArray;
  16258. case setTag:
  16259. var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
  16260. convert || (convert = setToArray);
  16261. if (object.size != other.size && !isPartial) {
  16262. return false;
  16263. }
  16264. // Assume cyclic values are equal.
  16265. var stacked = stack.get(object);
  16266. if (stacked) {
  16267. return stacked == other;
  16268. }
  16269. bitmask |= COMPARE_UNORDERED_FLAG;
  16270. // Recursively compare objects (susceptible to call stack limits).
  16271. stack.set(object, other);
  16272. var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
  16273. stack['delete'](object);
  16274. return result;
  16275. case symbolTag:
  16276. if (symbolValueOf) {
  16277. return symbolValueOf.call(object) == symbolValueOf.call(other);
  16278. }
  16279. }
  16280. return false;
  16281. }
  16282. /**
  16283. * A specialized version of `baseIsEqualDeep` for objects with support for
  16284. * partial deep comparisons.
  16285. *
  16286. * @private
  16287. * @param {Object} object The object to compare.
  16288. * @param {Object} other The other object to compare.
  16289. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  16290. * @param {Function} customizer The function to customize comparisons.
  16291. * @param {Function} equalFunc The function to determine equivalents of values.
  16292. * @param {Object} stack Tracks traversed `object` and `other` objects.
  16293. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  16294. */
  16295. function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
  16296. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  16297. objProps = getAllKeys(object),
  16298. objLength = objProps.length,
  16299. othProps = getAllKeys(other),
  16300. othLength = othProps.length;
  16301. if (objLength != othLength && !isPartial) {
  16302. return false;
  16303. }
  16304. var index = objLength;
  16305. while (index--) {
  16306. var key = objProps[index];
  16307. if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
  16308. return false;
  16309. }
  16310. }
  16311. // Assume cyclic values are equal.
  16312. var stacked = stack.get(object);
  16313. if (stacked && stack.get(other)) {
  16314. return stacked == other;
  16315. }
  16316. var result = true;
  16317. stack.set(object, other);
  16318. stack.set(other, object);
  16319. var skipCtor = isPartial;
  16320. while (++index < objLength) {
  16321. key = objProps[index];
  16322. var objValue = object[key],
  16323. othValue = other[key];
  16324. if (customizer) {
  16325. var compared = isPartial
  16326. ? customizer(othValue, objValue, key, other, object, stack)
  16327. : customizer(objValue, othValue, key, object, other, stack);
  16328. }
  16329. // Recursively compare objects (susceptible to call stack limits).
  16330. if (!(compared === undefined
  16331. ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
  16332. : compared
  16333. )) {
  16334. result = false;
  16335. break;
  16336. }
  16337. skipCtor || (skipCtor = key == 'constructor');
  16338. }
  16339. if (result && !skipCtor) {
  16340. var objCtor = object.constructor,
  16341. othCtor = other.constructor;
  16342. // Non `Object` object instances with different constructors are not equal.
  16343. if (objCtor != othCtor &&
  16344. ('constructor' in object && 'constructor' in other) &&
  16345. !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
  16346. typeof othCtor == 'function' && othCtor instanceof othCtor)) {
  16347. result = false;
  16348. }
  16349. }
  16350. stack['delete'](object);
  16351. stack['delete'](other);
  16352. return result;
  16353. }
  16354. /**
  16355. * Creates an array of own enumerable property names and symbols of `object`.
  16356. *
  16357. * @private
  16358. * @param {Object} object The object to query.
  16359. * @returns {Array} Returns the array of property names and symbols.
  16360. */
  16361. function getAllKeys(object) {
  16362. return baseGetAllKeys(object, keys, getSymbols);
  16363. }
  16364. /**
  16365. * Gets the data for `map`.
  16366. *
  16367. * @private
  16368. * @param {Object} map The map to query.
  16369. * @param {string} key The reference key.
  16370. * @returns {*} Returns the map data.
  16371. */
  16372. function getMapData(map, key) {
  16373. var data = map.__data__;
  16374. return isKeyable(key)
  16375. ? data[typeof key == 'string' ? 'string' : 'hash']
  16376. : data.map;
  16377. }
  16378. /**
  16379. * Gets the native function at `key` of `object`.
  16380. *
  16381. * @private
  16382. * @param {Object} object The object to query.
  16383. * @param {string} key The key of the method to get.
  16384. * @returns {*} Returns the function if it's native, else `undefined`.
  16385. */
  16386. function getNative(object, key) {
  16387. var value = getValue(object, key);
  16388. return baseIsNative(value) ? value : undefined;
  16389. }
  16390. /**
  16391. * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
  16392. *
  16393. * @private
  16394. * @param {*} value The value to query.
  16395. * @returns {string} Returns the raw `toStringTag`.
  16396. */
  16397. function getRawTag(value) {
  16398. var isOwn = hasOwnProperty.call(value, symToStringTag),
  16399. tag = value[symToStringTag];
  16400. try {
  16401. value[symToStringTag] = undefined;
  16402. var unmasked = true;
  16403. } catch (e) {}
  16404. var result = nativeObjectToString.call(value);
  16405. if (unmasked) {
  16406. if (isOwn) {
  16407. value[symToStringTag] = tag;
  16408. } else {
  16409. delete value[symToStringTag];
  16410. }
  16411. }
  16412. return result;
  16413. }
  16414. /**
  16415. * Creates an array of the own enumerable symbols of `object`.
  16416. *
  16417. * @private
  16418. * @param {Object} object The object to query.
  16419. * @returns {Array} Returns the array of symbols.
  16420. */
  16421. var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
  16422. if (object == null) {
  16423. return [];
  16424. }
  16425. object = Object(object);
  16426. return arrayFilter(nativeGetSymbols(object), function(symbol) {
  16427. return propertyIsEnumerable.call(object, symbol);
  16428. });
  16429. };
  16430. /**
  16431. * Gets the `toStringTag` of `value`.
  16432. *
  16433. * @private
  16434. * @param {*} value The value to query.
  16435. * @returns {string} Returns the `toStringTag`.
  16436. */
  16437. var getTag = baseGetTag;
  16438. // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
  16439. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
  16440. (Map && getTag(new Map) != mapTag) ||
  16441. (Promise && getTag(Promise.resolve()) != promiseTag) ||
  16442. (Set && getTag(new Set) != setTag) ||
  16443. (WeakMap && getTag(new WeakMap) != weakMapTag)) {
  16444. getTag = function(value) {
  16445. var result = baseGetTag(value),
  16446. Ctor = result == objectTag ? value.constructor : undefined,
  16447. ctorString = Ctor ? toSource(Ctor) : '';
  16448. if (ctorString) {
  16449. switch (ctorString) {
  16450. case dataViewCtorString: return dataViewTag;
  16451. case mapCtorString: return mapTag;
  16452. case promiseCtorString: return promiseTag;
  16453. case setCtorString: return setTag;
  16454. case weakMapCtorString: return weakMapTag;
  16455. }
  16456. }
  16457. return result;
  16458. };
  16459. }
  16460. /**
  16461. * Checks if `value` is a valid array-like index.
  16462. *
  16463. * @private
  16464. * @param {*} value The value to check.
  16465. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  16466. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  16467. */
  16468. function isIndex(value, length) {
  16469. length = length == null ? MAX_SAFE_INTEGER : length;
  16470. return !!length &&
  16471. (typeof value == 'number' || reIsUint.test(value)) &&
  16472. (value > -1 && value % 1 == 0 && value < length);
  16473. }
  16474. /**
  16475. * Checks if `value` is suitable for use as unique object key.
  16476. *
  16477. * @private
  16478. * @param {*} value The value to check.
  16479. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  16480. */
  16481. function isKeyable(value) {
  16482. var type = typeof value;
  16483. return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
  16484. ? (value !== '__proto__')
  16485. : (value === null);
  16486. }
  16487. /**
  16488. * Checks if `func` has its source masked.
  16489. *
  16490. * @private
  16491. * @param {Function} func The function to check.
  16492. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  16493. */
  16494. function isMasked(func) {
  16495. return !!maskSrcKey && (maskSrcKey in func);
  16496. }
  16497. /**
  16498. * Checks if `value` is likely a prototype object.
  16499. *
  16500. * @private
  16501. * @param {*} value The value to check.
  16502. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
  16503. */
  16504. function isPrototype(value) {
  16505. var Ctor = value && value.constructor,
  16506. proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
  16507. return value === proto;
  16508. }
  16509. /**
  16510. * Converts `value` to a string using `Object.prototype.toString`.
  16511. *
  16512. * @private
  16513. * @param {*} value The value to convert.
  16514. * @returns {string} Returns the converted string.
  16515. */
  16516. function objectToString(value) {
  16517. return nativeObjectToString.call(value);
  16518. }
  16519. /**
  16520. * Converts `func` to its source code.
  16521. *
  16522. * @private
  16523. * @param {Function} func The function to convert.
  16524. * @returns {string} Returns the source code.
  16525. */
  16526. function toSource(func) {
  16527. if (func != null) {
  16528. try {
  16529. return funcToString.call(func);
  16530. } catch (e) {}
  16531. try {
  16532. return (func + '');
  16533. } catch (e) {}
  16534. }
  16535. return '';
  16536. }
  16537. /**
  16538. * Performs a
  16539. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  16540. * comparison between two values to determine if they are equivalent.
  16541. *
  16542. * @static
  16543. * @memberOf _
  16544. * @since 4.0.0
  16545. * @category Lang
  16546. * @param {*} value The value to compare.
  16547. * @param {*} other The other value to compare.
  16548. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  16549. * @example
  16550. *
  16551. * var object = { 'a': 1 };
  16552. * var other = { 'a': 1 };
  16553. *
  16554. * _.eq(object, object);
  16555. * // => true
  16556. *
  16557. * _.eq(object, other);
  16558. * // => false
  16559. *
  16560. * _.eq('a', 'a');
  16561. * // => true
  16562. *
  16563. * _.eq('a', Object('a'));
  16564. * // => false
  16565. *
  16566. * _.eq(NaN, NaN);
  16567. * // => true
  16568. */
  16569. function eq(value, other) {
  16570. return value === other || (value !== value && other !== other);
  16571. }
  16572. /**
  16573. * Checks if `value` is likely an `arguments` object.
  16574. *
  16575. * @static
  16576. * @memberOf _
  16577. * @since 0.1.0
  16578. * @category Lang
  16579. * @param {*} value The value to check.
  16580. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  16581. * else `false`.
  16582. * @example
  16583. *
  16584. * _.isArguments(function() { return arguments; }());
  16585. * // => true
  16586. *
  16587. * _.isArguments([1, 2, 3]);
  16588. * // => false
  16589. */
  16590. var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
  16591. return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
  16592. !propertyIsEnumerable.call(value, 'callee');
  16593. };
  16594. /**
  16595. * Checks if `value` is classified as an `Array` object.
  16596. *
  16597. * @static
  16598. * @memberOf _
  16599. * @since 0.1.0
  16600. * @category Lang
  16601. * @param {*} value The value to check.
  16602. * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  16603. * @example
  16604. *
  16605. * _.isArray([1, 2, 3]);
  16606. * // => true
  16607. *
  16608. * _.isArray(document.body.children);
  16609. * // => false
  16610. *
  16611. * _.isArray('abc');
  16612. * // => false
  16613. *
  16614. * _.isArray(_.noop);
  16615. * // => false
  16616. */
  16617. var isArray = Array.isArray;
  16618. /**
  16619. * Checks if `value` is array-like. A value is considered array-like if it's
  16620. * not a function and has a `value.length` that's an integer greater than or
  16621. * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
  16622. *
  16623. * @static
  16624. * @memberOf _
  16625. * @since 4.0.0
  16626. * @category Lang
  16627. * @param {*} value The value to check.
  16628. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  16629. * @example
  16630. *
  16631. * _.isArrayLike([1, 2, 3]);
  16632. * // => true
  16633. *
  16634. * _.isArrayLike(document.body.children);
  16635. * // => true
  16636. *
  16637. * _.isArrayLike('abc');
  16638. * // => true
  16639. *
  16640. * _.isArrayLike(_.noop);
  16641. * // => false
  16642. */
  16643. function isArrayLike(value) {
  16644. return value != null && isLength(value.length) && !isFunction(value);
  16645. }
  16646. /**
  16647. * Checks if `value` is a buffer.
  16648. *
  16649. * @static
  16650. * @memberOf _
  16651. * @since 4.3.0
  16652. * @category Lang
  16653. * @param {*} value The value to check.
  16654. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
  16655. * @example
  16656. *
  16657. * _.isBuffer(new Buffer(2));
  16658. * // => true
  16659. *
  16660. * _.isBuffer(new Uint8Array(2));
  16661. * // => false
  16662. */
  16663. var isBuffer = nativeIsBuffer || stubFalse;
  16664. /**
  16665. * Performs a deep comparison between two values to determine if they are
  16666. * equivalent.
  16667. *
  16668. * **Note:** This method supports comparing arrays, array buffers, booleans,
  16669. * date objects, error objects, maps, numbers, `Object` objects, regexes,
  16670. * sets, strings, symbols, and typed arrays. `Object` objects are compared
  16671. * by their own, not inherited, enumerable properties. Functions and DOM
  16672. * nodes are compared by strict equality, i.e. `===`.
  16673. *
  16674. * @static
  16675. * @memberOf _
  16676. * @since 0.1.0
  16677. * @category Lang
  16678. * @param {*} value The value to compare.
  16679. * @param {*} other The other value to compare.
  16680. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  16681. * @example
  16682. *
  16683. * var object = { 'a': 1 };
  16684. * var other = { 'a': 1 };
  16685. *
  16686. * _.isEqual(object, other);
  16687. * // => true
  16688. *
  16689. * object === other;
  16690. * // => false
  16691. */
  16692. function isEqual(value, other) {
  16693. return baseIsEqual(value, other);
  16694. }
  16695. /**
  16696. * Checks if `value` is classified as a `Function` object.
  16697. *
  16698. * @static
  16699. * @memberOf _
  16700. * @since 0.1.0
  16701. * @category Lang
  16702. * @param {*} value The value to check.
  16703. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  16704. * @example
  16705. *
  16706. * _.isFunction(_);
  16707. * // => true
  16708. *
  16709. * _.isFunction(/abc/);
  16710. * // => false
  16711. */
  16712. function isFunction(value) {
  16713. if (!isObject(value)) {
  16714. return false;
  16715. }
  16716. // The use of `Object#toString` avoids issues with the `typeof` operator
  16717. // in Safari 9 which returns 'object' for typed arrays and other constructors.
  16718. var tag = baseGetTag(value);
  16719. return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
  16720. }
  16721. /**
  16722. * Checks if `value` is a valid array-like length.
  16723. *
  16724. * **Note:** This method is loosely based on
  16725. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  16726. *
  16727. * @static
  16728. * @memberOf _
  16729. * @since 4.0.0
  16730. * @category Lang
  16731. * @param {*} value The value to check.
  16732. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  16733. * @example
  16734. *
  16735. * _.isLength(3);
  16736. * // => true
  16737. *
  16738. * _.isLength(Number.MIN_VALUE);
  16739. * // => false
  16740. *
  16741. * _.isLength(Infinity);
  16742. * // => false
  16743. *
  16744. * _.isLength('3');
  16745. * // => false
  16746. */
  16747. function isLength(value) {
  16748. return typeof value == 'number' &&
  16749. value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  16750. }
  16751. /**
  16752. * Checks if `value` is the
  16753. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  16754. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  16755. *
  16756. * @static
  16757. * @memberOf _
  16758. * @since 0.1.0
  16759. * @category Lang
  16760. * @param {*} value The value to check.
  16761. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  16762. * @example
  16763. *
  16764. * _.isObject({});
  16765. * // => true
  16766. *
  16767. * _.isObject([1, 2, 3]);
  16768. * // => true
  16769. *
  16770. * _.isObject(_.noop);
  16771. * // => true
  16772. *
  16773. * _.isObject(null);
  16774. * // => false
  16775. */
  16776. function isObject(value) {
  16777. var type = typeof value;
  16778. return value != null && (type == 'object' || type == 'function');
  16779. }
  16780. /**
  16781. * Checks if `value` is object-like. A value is object-like if it's not `null`
  16782. * and has a `typeof` result of "object".
  16783. *
  16784. * @static
  16785. * @memberOf _
  16786. * @since 4.0.0
  16787. * @category Lang
  16788. * @param {*} value The value to check.
  16789. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  16790. * @example
  16791. *
  16792. * _.isObjectLike({});
  16793. * // => true
  16794. *
  16795. * _.isObjectLike([1, 2, 3]);
  16796. * // => true
  16797. *
  16798. * _.isObjectLike(_.noop);
  16799. * // => false
  16800. *
  16801. * _.isObjectLike(null);
  16802. * // => false
  16803. */
  16804. function isObjectLike(value) {
  16805. return value != null && typeof value == 'object';
  16806. }
  16807. /**
  16808. * Checks if `value` is classified as a typed array.
  16809. *
  16810. * @static
  16811. * @memberOf _
  16812. * @since 3.0.0
  16813. * @category Lang
  16814. * @param {*} value The value to check.
  16815. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  16816. * @example
  16817. *
  16818. * _.isTypedArray(new Uint8Array);
  16819. * // => true
  16820. *
  16821. * _.isTypedArray([]);
  16822. * // => false
  16823. */
  16824. var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
  16825. /**
  16826. * Creates an array of the own enumerable property names of `object`.
  16827. *
  16828. * **Note:** Non-object values are coerced to objects. See the
  16829. * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  16830. * for more details.
  16831. *
  16832. * @static
  16833. * @since 0.1.0
  16834. * @memberOf _
  16835. * @category Object
  16836. * @param {Object} object The object to query.
  16837. * @returns {Array} Returns the array of property names.
  16838. * @example
  16839. *
  16840. * function Foo() {
  16841. * this.a = 1;
  16842. * this.b = 2;
  16843. * }
  16844. *
  16845. * Foo.prototype.c = 3;
  16846. *
  16847. * _.keys(new Foo);
  16848. * // => ['a', 'b'] (iteration order is not guaranteed)
  16849. *
  16850. * _.keys('hi');
  16851. * // => ['0', '1']
  16852. */
  16853. function keys(object) {
  16854. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  16855. }
  16856. /**
  16857. * This method returns a new empty array.
  16858. *
  16859. * @static
  16860. * @memberOf _
  16861. * @since 4.13.0
  16862. * @category Util
  16863. * @returns {Array} Returns the new empty array.
  16864. * @example
  16865. *
  16866. * var arrays = _.times(2, _.stubArray);
  16867. *
  16868. * console.log(arrays);
  16869. * // => [[], []]
  16870. *
  16871. * console.log(arrays[0] === arrays[1]);
  16872. * // => false
  16873. */
  16874. function stubArray() {
  16875. return [];
  16876. }
  16877. /**
  16878. * This method returns `false`.
  16879. *
  16880. * @static
  16881. * @memberOf _
  16882. * @since 4.13.0
  16883. * @category Util
  16884. * @returns {boolean} Returns `false`.
  16885. * @example
  16886. *
  16887. * _.times(2, _.stubFalse);
  16888. * // => [false, false]
  16889. */
  16890. function stubFalse() {
  16891. return false;
  16892. }
  16893. module.exports = isEqual;
  16894. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("698d"), __webpack_require__("f586")(module)))
  16895. /***/ }),
  16896. /***/ "6375":
  16897. /***/ (function(module, exports, __webpack_require__) {
  16898. "use strict";
  16899. var _interopRequireDefault = __webpack_require__("8e6d");
  16900. Object.defineProperty(exports, "__esModule", {
  16901. value: true
  16902. });
  16903. exports.default = void 0;
  16904. var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
  16905. var _lang = __webpack_require__("4e21");
  16906. var AddressMatchParameter = function AddressMatchParameter(options) {
  16907. (0, _classCallCheck2.default)(this, AddressMatchParameter);
  16908. this.url = options.url;
  16909. this.name = options.name || (0, _lang.geti18n)().t('commontypes.addressMatch');
  16910. this.proxy = options.proxy;
  16911. };
  16912. exports.default = AddressMatchParameter;
  16913. /***/ }),
  16914. /***/ "63f3":
  16915. /***/ (function(module, exports, __webpack_require__) {
  16916. "use strict";
  16917. Object.defineProperty(exports, "__esModule", {
  16918. value: true
  16919. });
  16920. exports.ArrayExt = exports.FunctionExt = exports.NumberExt = exports.StringExt = void 0;
  16921. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  16922. * This program are made available under the terms of the Apache License, Version 2.0
  16923. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html. */
  16924. var StringExt = {
  16925. startsWith: function startsWith(str, sub) {
  16926. return str.indexOf(sub) === 0;
  16927. },
  16928. contains: function contains(str, sub) {
  16929. return str.indexOf(sub) !== -1;
  16930. },
  16931. trim: function trim(str) {
  16932. return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
  16933. },
  16934. camelize: function camelize(str) {
  16935. var oStringList = str.split('-');
  16936. var camelizedString = oStringList[0];
  16937. for (var i = 1, len = oStringList.length; i < len; i++) {
  16938. var s = oStringList[i];
  16939. camelizedString += s.charAt(0).toUpperCase() + s.substring(1);
  16940. }
  16941. return camelizedString;
  16942. },
  16943. format: function format(template, context, args) {
  16944. if (!context) {
  16945. context = window;
  16946. } // Example matching:
  16947. // str = ${foo.bar}
  16948. // match = foo.bar
  16949. var replacer = function replacer(str, match) {
  16950. var replacement; // Loop through all subs. Example: ${a.b.c}
  16951. // 0 -> replacement = context[a];
  16952. // 1 -> replacement = context[a][b];
  16953. // 2 -> replacement = context[a][b][c];
  16954. var subs = match.split(/\.+/);
  16955. for (var i = 0; i < subs.length; i++) {
  16956. if (i === 0) {
  16957. replacement = context;
  16958. }
  16959. replacement = replacement[subs[i]];
  16960. }
  16961. if (typeof replacement === 'function') {
  16962. replacement = args ? replacement.apply(null, args) : replacement();
  16963. } // If replacement is undefined, return the string 'undefined'.
  16964. // This is a workaround for a bugs in browsers not properly
  16965. // dealing with non-participating groups in regular expressions:
  16966. // http://blog.stevenlevithan.com/archives/npcg-javascript
  16967. if (typeof replacement === 'undefined') {
  16968. return 'undefined';
  16969. } else {
  16970. return replacement;
  16971. }
  16972. };
  16973. return template.replace(String.tokenRegEx, replacer);
  16974. },
  16975. /**
  16976. * @member {RegExp} [String.tokenRegEx]
  16977. * @description 寻找带 token 的字符串,默认为 tokenRegEx=/\$\{([\w.]+?)\}/g。
  16978. * @example
  16979. * Examples: ${a}, ${a.b.c}, ${a-b}, ${5}
  16980. */
  16981. tokenRegEx: /\$\{([\w.]+?)\}/g,
  16982. /**
  16983. * @member {RegExp} [String.numberRegEx]
  16984. * @description 判断一个字符串是否只包含一个数值,默认为 numberRegEx=/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/。
  16985. */
  16986. numberRegEx: /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/,
  16987. /**
  16988. * @function String.isNumeric
  16989. * @description 判断一个字符串是否只包含一个数值。
  16990. * @example
  16991. * (code)
  16992. * String.isNumeric("6.02e23") // true
  16993. * String.isNumeric("12 dozen") // false
  16994. * String.isNumeric("4") // true
  16995. * String.isNumeric(" 4 ") // false
  16996. * (end)
  16997. * @returns {boolean} 字符串包含唯一的数值,返回 true;否则返回 false。
  16998. */
  16999. isNumeric: function isNumeric(value) {
  17000. return String.numberRegEx.test(value);
  17001. },
  17002. /**
  17003. * @function String.numericIf
  17004. * @description 把一个看似数值型的字符串转化为一个数值。
  17005. * @returns {(number|string)} 如果能转换为数值则返回数值,否则返回字符串本身。
  17006. */
  17007. numericIf: function numericIf(value) {
  17008. return String.isNumeric(value) ? parseFloat(value) : value;
  17009. }
  17010. };
  17011. /**
  17012. * @name Number
  17013. * @namespace
  17014. * @category BaseTypes Util
  17015. * @description 数值操作的一系列常用扩展函数。
  17016. */
  17017. exports.StringExt = StringExt;
  17018. var NumberExt = {
  17019. decimalSeparator: '.',
  17020. thousandsSeparator: ',',
  17021. limitSigDigs: function limitSigDigs(num, sig) {
  17022. var fig = 0;
  17023. if (sig > 0) {
  17024. fig = parseFloat(num.toPrecision(sig));
  17025. }
  17026. return fig;
  17027. },
  17028. format: function format(num, dec, tsep, dsep) {
  17029. dec = typeof dec !== 'undefined' ? dec : 0;
  17030. tsep = typeof tsep !== 'undefined' ? tsep : Number.thousandsSeparator;
  17031. dsep = typeof dsep !== 'undefined' ? dsep : Number.decimalSeparator;
  17032. if (dec != null) {
  17033. num = parseFloat(num.toFixed(dec));
  17034. }
  17035. var parts = num.toString().split('.');
  17036. if (parts.length === 1 && dec == null) {
  17037. // integer where we do not want to touch the decimals
  17038. dec = 0;
  17039. }
  17040. var integer = parts[0];
  17041. if (tsep) {
  17042. var thousands = /(-?[0-9]+)([0-9]{3})/;
  17043. while (thousands.test(integer)) {
  17044. integer = integer.replace(thousands, '$1' + tsep + '$2');
  17045. }
  17046. }
  17047. var str;
  17048. if (dec === 0) {
  17049. str = integer;
  17050. } else {
  17051. var rem = parts.length > 1 ? parts[1] : '0';
  17052. if (dec != null) {
  17053. rem = rem + new Array(dec - rem.length + 1).join('0');
  17054. }
  17055. str = integer + dsep + rem;
  17056. }
  17057. return str;
  17058. }
  17059. }; // if (!NumberExt.prototype.limitSigDigs) {
  17060. // /**
  17061. // * APIMethod: Number.limitSigDigs
  17062. // * 限制浮点数的有效数字位数.
  17063. // * @param {integer} sig -有效位数。
  17064. // * @returns {integer} 将数字四舍五入到指定数量的有效位数。
  17065. // * 如果传入值 为 null、0、或者是负数, 返回值 0。
  17066. // */
  17067. // NumberExt.prototype.limitSigDigs = function (sig) {
  17068. // return NumberExt.limitSigDigs(this, sig);
  17069. // };
  17070. // }
  17071. exports.NumberExt = NumberExt;
  17072. var FunctionExt = {
  17073. bind: function bind(func, object) {
  17074. // create a reference to all arguments past the second one
  17075. var args = Array.prototype.slice.apply(arguments, [2]);
  17076. return function () {
  17077. // Push on any additional arguments from the actual function call.
  17078. // These will come after those sent to the bind call.
  17079. var newArgs = args.concat(Array.prototype.slice.apply(arguments, [0]));
  17080. return func.apply(object, newArgs);
  17081. };
  17082. },
  17083. bindAsEventListener: function bindAsEventListener(func, object) {
  17084. return function (event) {
  17085. return func.call(object, event || window.event);
  17086. };
  17087. },
  17088. False: function False() {
  17089. return false;
  17090. },
  17091. True: function True() {
  17092. return true;
  17093. },
  17094. Void: function Void() {}
  17095. };
  17096. exports.FunctionExt = FunctionExt;
  17097. var ArrayExt = {
  17098. /**
  17099. * @function Array.filter
  17100. * @description 过滤数组,提供了 ECMA-262 标准中 Array.prototype.filter 函数的扩展。详见:{@link http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/filter}
  17101. * @param {Array} array - 要过滤的数组。
  17102. * @param {function} callback - 数组中的每一个元素调用该函数。</br>
  17103. * 如果函数的返回值为 true,该元素将包含在返回的数组中。该函数有三个参数: 数组中的元素,元素的索引,数组自身。</br>
  17104. * 如果设置了可选参数 caller,在调用 callback 时,使用可选参数 caller 设置为 callback 的参数。</br>
  17105. * @param {Object} [caller] - 在调用 callback 时,使用参数 caller 设置为 callback 的参数。
  17106. * @returns {Array} callback 函数返回 true 时的元素将作为返回数组中的元素。
  17107. */
  17108. filter: function filter(array, callback, caller) {
  17109. var selected = [];
  17110. if (Array.prototype.filter) {
  17111. selected = array.filter(callback, caller);
  17112. } else {
  17113. var len = array.length;
  17114. if (typeof callback !== 'function') {
  17115. throw new TypeError();
  17116. }
  17117. for (var i = 0; i < len; i++) {
  17118. if (i in array) {
  17119. var val = array[i];
  17120. if (callback.call(caller, val, i, array)) {
  17121. selected.push(val);
  17122. }
  17123. }
  17124. }
  17125. }
  17126. return selected;
  17127. }
  17128. };
  17129. exports.ArrayExt = ArrayExt;
  17130. /***/ }),
  17131. /***/ "65db":
  17132. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  17133. "use strict";
  17134. __webpack_require__.r(__webpack_exports__);
  17135. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Card_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("b757");
  17136. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Card_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Card_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
  17137. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Card_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Card_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  17138. /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Card_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
  17139. /***/ }),
  17140. /***/ "66f6":
  17141. /***/ (function(module, exports) {
  17142. function _defineProperties(target, props) {
  17143. for (var i = 0; i < props.length; i++) {
  17144. var descriptor = props[i];
  17145. descriptor.enumerable = descriptor.enumerable || false;
  17146. descriptor.configurable = true;
  17147. if ("value" in descriptor) descriptor.writable = true;
  17148. Object.defineProperty(target, descriptor.key, descriptor);
  17149. }
  17150. }
  17151. function _createClass(Constructor, protoProps, staticProps) {
  17152. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  17153. if (staticProps) _defineProperties(Constructor, staticProps);
  17154. return Constructor;
  17155. }
  17156. module.exports = _createClass;
  17157. /***/ }),
  17158. /***/ "6704":
  17159. /***/ (function(module, exports, __webpack_require__) {
  17160. var Symbol = __webpack_require__("80e6"),
  17161. getRawTag = __webpack_require__("8330"),
  17162. objectToString = __webpack_require__("089f");
  17163. /** `Object#toString` result references. */
  17164. var nullTag = '[object Null]',
  17165. undefinedTag = '[object Undefined]';
  17166. /** Built-in value references. */
  17167. var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
  17168. /**
  17169. * The base implementation of `getTag` without fallbacks for buggy environments.
  17170. *
  17171. * @private
  17172. * @param {*} value The value to query.
  17173. * @returns {string} Returns the `toStringTag`.
  17174. */
  17175. function baseGetTag(value) {
  17176. if (value == null) {
  17177. return value === undefined ? undefinedTag : nullTag;
  17178. }
  17179. return (symToStringTag && symToStringTag in Object(value))
  17180. ? getRawTag(value)
  17181. : objectToString(value);
  17182. }
  17183. module.exports = baseGetTag;
  17184. /***/ }),
  17185. /***/ "698d":
  17186. /***/ (function(module, exports) {
  17187. var g;
  17188. // This works in non-strict mode
  17189. g = (function() {
  17190. return this;
  17191. })();
  17192. try {
  17193. // This works if eval is allowed (see CSP)
  17194. g = g || new Function("return this")();
  17195. } catch (e) {
  17196. // This works if the window reference is available
  17197. if (typeof window === "object") g = window;
  17198. }
  17199. // g can still be undefined, but nothing to do about it...
  17200. // We return undefined, instead of nothing here, so it's
  17201. // easier to handle this case. if(!global) { ...}
  17202. module.exports = g;
  17203. /***/ }),
  17204. /***/ "6b51":
  17205. /***/ (function(module, exports, __webpack_require__) {
  17206. var setPrototypeOf = __webpack_require__("e1d3");
  17207. function _inherits(subClass, superClass) {
  17208. if (typeof superClass !== "function" && superClass !== null) {
  17209. throw new TypeError("Super expression must either be null or a function");
  17210. }
  17211. subClass.prototype = Object.create(superClass && superClass.prototype, {
  17212. constructor: {
  17213. value: subClass,
  17214. writable: true,
  17215. configurable: true
  17216. }
  17217. });
  17218. if (superClass) setPrototypeOf(subClass, superClass);
  17219. }
  17220. module.exports = _inherits;
  17221. /***/ }),
  17222. /***/ "6b73":
  17223. /***/ (function(module, exports) {
  17224. /*
  17225. Based on rgbcolor.js by Stoyan Stefanov <sstoo@gmail.com>
  17226. http://www.phpied.com/rgb-color-parser-in-javascript/
  17227. */
  17228. module.exports = function(color_string) {
  17229. this.ok = false;
  17230. this.alpha = 1.0;
  17231. // strip any leading #
  17232. if (color_string.charAt(0) == '#') { // remove # if any
  17233. color_string = color_string.substr(1,6);
  17234. }
  17235. color_string = color_string.replace(/ /g,'');
  17236. color_string = color_string.toLowerCase();
  17237. // before getting into regexps, try simple matches
  17238. // and overwrite the input
  17239. var simple_colors = {
  17240. aliceblue: 'f0f8ff',
  17241. antiquewhite: 'faebd7',
  17242. aqua: '00ffff',
  17243. aquamarine: '7fffd4',
  17244. azure: 'f0ffff',
  17245. beige: 'f5f5dc',
  17246. bisque: 'ffe4c4',
  17247. black: '000000',
  17248. blanchedalmond: 'ffebcd',
  17249. blue: '0000ff',
  17250. blueviolet: '8a2be2',
  17251. brown: 'a52a2a',
  17252. burlywood: 'deb887',
  17253. cadetblue: '5f9ea0',
  17254. chartreuse: '7fff00',
  17255. chocolate: 'd2691e',
  17256. coral: 'ff7f50',
  17257. cornflowerblue: '6495ed',
  17258. cornsilk: 'fff8dc',
  17259. crimson: 'dc143c',
  17260. cyan: '00ffff',
  17261. darkblue: '00008b',
  17262. darkcyan: '008b8b',
  17263. darkgoldenrod: 'b8860b',
  17264. darkgray: 'a9a9a9',
  17265. darkgreen: '006400',
  17266. darkkhaki: 'bdb76b',
  17267. darkmagenta: '8b008b',
  17268. darkolivegreen: '556b2f',
  17269. darkorange: 'ff8c00',
  17270. darkorchid: '9932cc',
  17271. darkred: '8b0000',
  17272. darksalmon: 'e9967a',
  17273. darkseagreen: '8fbc8f',
  17274. darkslateblue: '483d8b',
  17275. darkslategray: '2f4f4f',
  17276. darkturquoise: '00ced1',
  17277. darkviolet: '9400d3',
  17278. deeppink: 'ff1493',
  17279. deepskyblue: '00bfff',
  17280. dimgray: '696969',
  17281. dodgerblue: '1e90ff',
  17282. feldspar: 'd19275',
  17283. firebrick: 'b22222',
  17284. floralwhite: 'fffaf0',
  17285. forestgreen: '228b22',
  17286. fuchsia: 'ff00ff',
  17287. gainsboro: 'dcdcdc',
  17288. ghostwhite: 'f8f8ff',
  17289. gold: 'ffd700',
  17290. goldenrod: 'daa520',
  17291. gray: '808080',
  17292. green: '008000',
  17293. greenyellow: 'adff2f',
  17294. honeydew: 'f0fff0',
  17295. hotpink: 'ff69b4',
  17296. indianred : 'cd5c5c',
  17297. indigo : '4b0082',
  17298. ivory: 'fffff0',
  17299. khaki: 'f0e68c',
  17300. lavender: 'e6e6fa',
  17301. lavenderblush: 'fff0f5',
  17302. lawngreen: '7cfc00',
  17303. lemonchiffon: 'fffacd',
  17304. lightblue: 'add8e6',
  17305. lightcoral: 'f08080',
  17306. lightcyan: 'e0ffff',
  17307. lightgoldenrodyellow: 'fafad2',
  17308. lightgrey: 'd3d3d3',
  17309. lightgreen: '90ee90',
  17310. lightpink: 'ffb6c1',
  17311. lightsalmon: 'ffa07a',
  17312. lightseagreen: '20b2aa',
  17313. lightskyblue: '87cefa',
  17314. lightslateblue: '8470ff',
  17315. lightslategray: '778899',
  17316. lightsteelblue: 'b0c4de',
  17317. lightyellow: 'ffffe0',
  17318. lime: '00ff00',
  17319. limegreen: '32cd32',
  17320. linen: 'faf0e6',
  17321. magenta: 'ff00ff',
  17322. maroon: '800000',
  17323. mediumaquamarine: '66cdaa',
  17324. mediumblue: '0000cd',
  17325. mediumorchid: 'ba55d3',
  17326. mediumpurple: '9370d8',
  17327. mediumseagreen: '3cb371',
  17328. mediumslateblue: '7b68ee',
  17329. mediumspringgreen: '00fa9a',
  17330. mediumturquoise: '48d1cc',
  17331. mediumvioletred: 'c71585',
  17332. midnightblue: '191970',
  17333. mintcream: 'f5fffa',
  17334. mistyrose: 'ffe4e1',
  17335. moccasin: 'ffe4b5',
  17336. navajowhite: 'ffdead',
  17337. navy: '000080',
  17338. oldlace: 'fdf5e6',
  17339. olive: '808000',
  17340. olivedrab: '6b8e23',
  17341. orange: 'ffa500',
  17342. orangered: 'ff4500',
  17343. orchid: 'da70d6',
  17344. palegoldenrod: 'eee8aa',
  17345. palegreen: '98fb98',
  17346. paleturquoise: 'afeeee',
  17347. palevioletred: 'd87093',
  17348. papayawhip: 'ffefd5',
  17349. peachpuff: 'ffdab9',
  17350. peru: 'cd853f',
  17351. pink: 'ffc0cb',
  17352. plum: 'dda0dd',
  17353. powderblue: 'b0e0e6',
  17354. purple: '800080',
  17355. rebeccapurple: '663399',
  17356. red: 'ff0000',
  17357. rosybrown: 'bc8f8f',
  17358. royalblue: '4169e1',
  17359. saddlebrown: '8b4513',
  17360. salmon: 'fa8072',
  17361. sandybrown: 'f4a460',
  17362. seagreen: '2e8b57',
  17363. seashell: 'fff5ee',
  17364. sienna: 'a0522d',
  17365. silver: 'c0c0c0',
  17366. skyblue: '87ceeb',
  17367. slateblue: '6a5acd',
  17368. slategray: '708090',
  17369. snow: 'fffafa',
  17370. springgreen: '00ff7f',
  17371. steelblue: '4682b4',
  17372. tan: 'd2b48c',
  17373. teal: '008080',
  17374. thistle: 'd8bfd8',
  17375. tomato: 'ff6347',
  17376. turquoise: '40e0d0',
  17377. violet: 'ee82ee',
  17378. violetred: 'd02090',
  17379. wheat: 'f5deb3',
  17380. white: 'ffffff',
  17381. whitesmoke: 'f5f5f5',
  17382. yellow: 'ffff00',
  17383. yellowgreen: '9acd32'
  17384. };
  17385. color_string = simple_colors[color_string] || color_string;
  17386. // emd of simple type-in colors
  17387. // array of color definition objects
  17388. var color_defs = [
  17389. {
  17390. re: /^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,
  17391. example: ['rgba(123, 234, 45, 0.8)', 'rgba(255,234,245,1.0)'],
  17392. process: function (bits){
  17393. return [
  17394. parseInt(bits[1]),
  17395. parseInt(bits[2]),
  17396. parseInt(bits[3]),
  17397. parseFloat(bits[4])
  17398. ];
  17399. }
  17400. },
  17401. {
  17402. re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,
  17403. example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'],
  17404. process: function (bits){
  17405. return [
  17406. parseInt(bits[1]),
  17407. parseInt(bits[2]),
  17408. parseInt(bits[3])
  17409. ];
  17410. }
  17411. },
  17412. {
  17413. re: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
  17414. example: ['#00ff00', '336699'],
  17415. process: function (bits){
  17416. return [
  17417. parseInt(bits[1], 16),
  17418. parseInt(bits[2], 16),
  17419. parseInt(bits[3], 16)
  17420. ];
  17421. }
  17422. },
  17423. {
  17424. re: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  17425. example: ['#fb0', 'f0f'],
  17426. process: function (bits){
  17427. return [
  17428. parseInt(bits[1] + bits[1], 16),
  17429. parseInt(bits[2] + bits[2], 16),
  17430. parseInt(bits[3] + bits[3], 16)
  17431. ];
  17432. }
  17433. }
  17434. ];
  17435. // search through the definitions to find a match
  17436. for (var i = 0; i < color_defs.length; i++) {
  17437. var re = color_defs[i].re;
  17438. var processor = color_defs[i].process;
  17439. var bits = re.exec(color_string);
  17440. if (bits) {
  17441. var channels = processor(bits);
  17442. this.r = channels[0];
  17443. this.g = channels[1];
  17444. this.b = channels[2];
  17445. if (channels.length > 3) {
  17446. this.alpha = channels[3];
  17447. }
  17448. this.ok = true;
  17449. }
  17450. }
  17451. // validate/cleanup values
  17452. this.r = (this.r < 0 || isNaN(this.r)) ? 0 : ((this.r > 255) ? 255 : this.r);
  17453. this.g = (this.g < 0 || isNaN(this.g)) ? 0 : ((this.g > 255) ? 255 : this.g);
  17454. this.b = (this.b < 0 || isNaN(this.b)) ? 0 : ((this.b > 255) ? 255 : this.b);
  17455. this.alpha = (this.alpha < 0) ? 0 : ((this.alpha > 1.0 || isNaN(this.alpha)) ? 1.0 : this.alpha);
  17456. // some getters
  17457. this.toRGB = function () {
  17458. return 'rgb(' + this.r + ', ' + this.g + ', ' + this.b + ')';
  17459. }
  17460. this.toRGBA = function () {
  17461. return 'rgba(' + this.r + ', ' + this.g + ', ' + this.b + ', ' + this.alpha + ')';
  17462. }
  17463. this.toHex = function () {
  17464. var r = this.r.toString(16);
  17465. var g = this.g.toString(16);
  17466. var b = this.b.toString(16);
  17467. if (r.length == 1) r = '0' + r;
  17468. if (g.length == 1) g = '0' + g;
  17469. if (b.length == 1) b = '0' + b;
  17470. return '#' + r + g + b;
  17471. }
  17472. // help
  17473. this.getHelpXML = function () {
  17474. var examples = new Array();
  17475. // add regexps
  17476. for (var i = 0; i < color_defs.length; i++) {
  17477. var example = color_defs[i].example;
  17478. for (var j = 0; j < example.length; j++) {
  17479. examples[examples.length] = example[j];
  17480. }
  17481. }
  17482. // add type-in colors
  17483. for (var sc in simple_colors) {
  17484. examples[examples.length] = sc;
  17485. }
  17486. var xml = document.createElement('ul');
  17487. xml.setAttribute('id', 'rgbcolor-examples');
  17488. for (var i = 0; i < examples.length; i++) {
  17489. try {
  17490. var list_item = document.createElement('li');
  17491. var list_color = new RGBColor(examples[i]);
  17492. var example_div = document.createElement('div');
  17493. example_div.style.cssText =
  17494. 'margin: 3px; '
  17495. + 'border: 1px solid black; '
  17496. + 'background:' + list_color.toHex() + '; '
  17497. + 'color:' + list_color.toHex()
  17498. ;
  17499. example_div.appendChild(document.createTextNode('test'));
  17500. var list_item_value = document.createTextNode(
  17501. ' ' + examples[i] + ' -> ' + list_color.toRGB() + ' -> ' + list_color.toHex()
  17502. );
  17503. list_item.appendChild(example_div);
  17504. list_item.appendChild(list_item_value);
  17505. xml.appendChild(list_item);
  17506. } catch(e){}
  17507. }
  17508. return xml;
  17509. }
  17510. }
  17511. /***/ }),
  17512. /***/ "6e0d":
  17513. /***/ (function(module, exports, __webpack_require__) {
  17514. "use strict";
  17515. var _interopRequireDefault = __webpack_require__("8e6d");
  17516. Object.defineProperty(exports, "__esModule", {
  17517. value: true
  17518. });
  17519. exports.default = getFeatures;
  17520. var _iServerRestService = _interopRequireDefault(__webpack_require__("e340"));
  17521. var _iPortalDataService = _interopRequireDefault(__webpack_require__("9d60"));
  17522. var _RestService = _interopRequireDefault(__webpack_require__("5bf3"));
  17523. function getFeatures(dataset) {
  17524. var superMapService;
  17525. var params = [];
  17526. var promise = new Promise(function (resolve, reject) {
  17527. var url = dataset.url,
  17528. type = dataset.type,
  17529. geoJSON = dataset.geoJSON,
  17530. maxFeatures = dataset.maxFeatures,
  17531. attributeFilter = dataset.attributeFilter,
  17532. dataName = dataset.dataName,
  17533. layerName = dataset.layerName,
  17534. withCredentials = dataset.withCredentials,
  17535. preferContent = dataset.preferContent,
  17536. epsgCode = dataset.epsgCode;
  17537. if (dataset && (url || geoJSON) && type) {
  17538. var queryInfo = {
  17539. maxFeatures: maxFeatures,
  17540. attributeFilter: attributeFilter
  17541. };
  17542. if (type === 'iServer') {
  17543. var datasetInfo;
  17544. var options = {};
  17545. if (dataset.proxy) {
  17546. options.proxy = dataset.proxy;
  17547. }
  17548. epsgCode && (options.epsgCode = epsgCode);
  17549. superMapService = new _iServerRestService.default(dataset.url, options);
  17550. if (dataName) {
  17551. var arr = dataName[0].split(':');
  17552. datasetInfo = {
  17553. datasetName: arr[1],
  17554. dataSourceName: arr[0],
  17555. dataUrl: url
  17556. };
  17557. } else {
  17558. datasetInfo = {
  17559. mapName: layerName,
  17560. dataUrl: url
  17561. };
  17562. }
  17563. params = [datasetInfo, queryInfo];
  17564. } else if (type === 'iPortal') {
  17565. queryInfo.withCredentials = withCredentials;
  17566. superMapService = new _iPortalDataService.default(url, withCredentials, {
  17567. epsgCode: epsgCode
  17568. });
  17569. params = [queryInfo, !!preferContent];
  17570. } else if (type === 'rest') {
  17571. superMapService = new _RestService.default({
  17572. proxy: dataset.proxy
  17573. });
  17574. params = [url, queryInfo];
  17575. } else if (type === 'geoJSON' && geoJSON) {
  17576. superMapService = new _RestService.default();
  17577. params = [geoJSON, queryInfo];
  17578. }
  17579. }
  17580. if (superMapService) {
  17581. superMapService.on({
  17582. getdatasucceeded: function getdatasucceeded(data) {
  17583. resolve(data);
  17584. },
  17585. getdatafailed: function getdatafailed(e) {
  17586. reject(e);
  17587. }
  17588. });
  17589. superMapService.getData(params[0], params[1]);
  17590. }
  17591. });
  17592. return promise;
  17593. }
  17594. /***/ }),
  17595. /***/ "6e63":
  17596. /***/ (function(module, exports, __webpack_require__) {
  17597. /* WEBPACK VAR INJECTION */(function(global, module) {/**
  17598. * Lodash (Custom Build) <https://lodash.com/>
  17599. * Build: `lodash modularize exports="npm" -o ./`
  17600. * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
  17601. * Released under MIT license <https://lodash.com/license>
  17602. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  17603. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  17604. */
  17605. /** Used as the size to enable large array optimizations. */
  17606. var LARGE_ARRAY_SIZE = 200;
  17607. /** Used to stand-in for `undefined` hash values. */
  17608. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  17609. /** Used to detect hot functions by number of calls within a span of milliseconds. */
  17610. var HOT_COUNT = 800,
  17611. HOT_SPAN = 16;
  17612. /** Used as references for various `Number` constants. */
  17613. var MAX_SAFE_INTEGER = 9007199254740991;
  17614. /** `Object#toString` result references. */
  17615. var argsTag = '[object Arguments]',
  17616. arrayTag = '[object Array]',
  17617. asyncTag = '[object AsyncFunction]',
  17618. boolTag = '[object Boolean]',
  17619. dateTag = '[object Date]',
  17620. errorTag = '[object Error]',
  17621. funcTag = '[object Function]',
  17622. genTag = '[object GeneratorFunction]',
  17623. mapTag = '[object Map]',
  17624. numberTag = '[object Number]',
  17625. nullTag = '[object Null]',
  17626. objectTag = '[object Object]',
  17627. proxyTag = '[object Proxy]',
  17628. regexpTag = '[object RegExp]',
  17629. setTag = '[object Set]',
  17630. stringTag = '[object String]',
  17631. undefinedTag = '[object Undefined]',
  17632. weakMapTag = '[object WeakMap]';
  17633. var arrayBufferTag = '[object ArrayBuffer]',
  17634. dataViewTag = '[object DataView]',
  17635. float32Tag = '[object Float32Array]',
  17636. float64Tag = '[object Float64Array]',
  17637. int8Tag = '[object Int8Array]',
  17638. int16Tag = '[object Int16Array]',
  17639. int32Tag = '[object Int32Array]',
  17640. uint8Tag = '[object Uint8Array]',
  17641. uint8ClampedTag = '[object Uint8ClampedArray]',
  17642. uint16Tag = '[object Uint16Array]',
  17643. uint32Tag = '[object Uint32Array]';
  17644. /**
  17645. * Used to match `RegExp`
  17646. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  17647. */
  17648. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
  17649. /** Used to detect host constructors (Safari). */
  17650. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  17651. /** Used to detect unsigned integer values. */
  17652. var reIsUint = /^(?:0|[1-9]\d*)$/;
  17653. /** Used to identify `toStringTag` values of typed arrays. */
  17654. var typedArrayTags = {};
  17655. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
  17656. typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
  17657. typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
  17658. typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
  17659. typedArrayTags[uint32Tag] = true;
  17660. typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
  17661. typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
  17662. typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
  17663. typedArrayTags[errorTag] = typedArrayTags[funcTag] =
  17664. typedArrayTags[mapTag] = typedArrayTags[numberTag] =
  17665. typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
  17666. typedArrayTags[setTag] = typedArrayTags[stringTag] =
  17667. typedArrayTags[weakMapTag] = false;
  17668. /** Detect free variable `global` from Node.js. */
  17669. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  17670. /** Detect free variable `self`. */
  17671. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  17672. /** Used as a reference to the global object. */
  17673. var root = freeGlobal || freeSelf || Function('return this')();
  17674. /** Detect free variable `exports`. */
  17675. var freeExports = true && exports && !exports.nodeType && exports;
  17676. /** Detect free variable `module`. */
  17677. var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
  17678. /** Detect the popular CommonJS extension `module.exports`. */
  17679. var moduleExports = freeModule && freeModule.exports === freeExports;
  17680. /** Detect free variable `process` from Node.js. */
  17681. var freeProcess = moduleExports && freeGlobal.process;
  17682. /** Used to access faster Node.js helpers. */
  17683. var nodeUtil = (function() {
  17684. try {
  17685. // Use `util.types` for Node.js 10+.
  17686. var types = freeModule && freeModule.require && freeModule.require('util').types;
  17687. if (types) {
  17688. return types;
  17689. }
  17690. // Legacy `process.binding('util')` for Node.js < 10.
  17691. return freeProcess && freeProcess.binding && freeProcess.binding('util');
  17692. } catch (e) {}
  17693. }());
  17694. /* Node.js helper references. */
  17695. var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
  17696. /**
  17697. * A faster alternative to `Function#apply`, this function invokes `func`
  17698. * with the `this` binding of `thisArg` and the arguments of `args`.
  17699. *
  17700. * @private
  17701. * @param {Function} func The function to invoke.
  17702. * @param {*} thisArg The `this` binding of `func`.
  17703. * @param {Array} args The arguments to invoke `func` with.
  17704. * @returns {*} Returns the result of `func`.
  17705. */
  17706. function apply(func, thisArg, args) {
  17707. switch (args.length) {
  17708. case 0: return func.call(thisArg);
  17709. case 1: return func.call(thisArg, args[0]);
  17710. case 2: return func.call(thisArg, args[0], args[1]);
  17711. case 3: return func.call(thisArg, args[0], args[1], args[2]);
  17712. }
  17713. return func.apply(thisArg, args);
  17714. }
  17715. /**
  17716. * The base implementation of `_.times` without support for iteratee shorthands
  17717. * or max array length checks.
  17718. *
  17719. * @private
  17720. * @param {number} n The number of times to invoke `iteratee`.
  17721. * @param {Function} iteratee The function invoked per iteration.
  17722. * @returns {Array} Returns the array of results.
  17723. */
  17724. function baseTimes(n, iteratee) {
  17725. var index = -1,
  17726. result = Array(n);
  17727. while (++index < n) {
  17728. result[index] = iteratee(index);
  17729. }
  17730. return result;
  17731. }
  17732. /**
  17733. * The base implementation of `_.unary` without support for storing metadata.
  17734. *
  17735. * @private
  17736. * @param {Function} func The function to cap arguments for.
  17737. * @returns {Function} Returns the new capped function.
  17738. */
  17739. function baseUnary(func) {
  17740. return function(value) {
  17741. return func(value);
  17742. };
  17743. }
  17744. /**
  17745. * Gets the value at `key` of `object`.
  17746. *
  17747. * @private
  17748. * @param {Object} [object] The object to query.
  17749. * @param {string} key The key of the property to get.
  17750. * @returns {*} Returns the property value.
  17751. */
  17752. function getValue(object, key) {
  17753. return object == null ? undefined : object[key];
  17754. }
  17755. /**
  17756. * Creates a unary function that invokes `func` with its argument transformed.
  17757. *
  17758. * @private
  17759. * @param {Function} func The function to wrap.
  17760. * @param {Function} transform The argument transform.
  17761. * @returns {Function} Returns the new function.
  17762. */
  17763. function overArg(func, transform) {
  17764. return function(arg) {
  17765. return func(transform(arg));
  17766. };
  17767. }
  17768. /** Used for built-in method references. */
  17769. var arrayProto = Array.prototype,
  17770. funcProto = Function.prototype,
  17771. objectProto = Object.prototype;
  17772. /** Used to detect overreaching core-js shims. */
  17773. var coreJsData = root['__core-js_shared__'];
  17774. /** Used to resolve the decompiled source of functions. */
  17775. var funcToString = funcProto.toString;
  17776. /** Used to check objects for own properties. */
  17777. var hasOwnProperty = objectProto.hasOwnProperty;
  17778. /** Used to detect methods masquerading as native. */
  17779. var maskSrcKey = (function() {
  17780. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  17781. return uid ? ('Symbol(src)_1.' + uid) : '';
  17782. }());
  17783. /**
  17784. * Used to resolve the
  17785. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  17786. * of values.
  17787. */
  17788. var nativeObjectToString = objectProto.toString;
  17789. /** Used to infer the `Object` constructor. */
  17790. var objectCtorString = funcToString.call(Object);
  17791. /** Used to detect if a method is native. */
  17792. var reIsNative = RegExp('^' +
  17793. funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  17794. .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  17795. );
  17796. /** Built-in value references. */
  17797. var Buffer = moduleExports ? root.Buffer : undefined,
  17798. Symbol = root.Symbol,
  17799. Uint8Array = root.Uint8Array,
  17800. allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
  17801. getPrototype = overArg(Object.getPrototypeOf, Object),
  17802. objectCreate = Object.create,
  17803. propertyIsEnumerable = objectProto.propertyIsEnumerable,
  17804. splice = arrayProto.splice,
  17805. symToStringTag = Symbol ? Symbol.toStringTag : undefined;
  17806. var defineProperty = (function() {
  17807. try {
  17808. var func = getNative(Object, 'defineProperty');
  17809. func({}, '', {});
  17810. return func;
  17811. } catch (e) {}
  17812. }());
  17813. /* Built-in method references for those with the same name as other `lodash` methods. */
  17814. var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
  17815. nativeMax = Math.max,
  17816. nativeNow = Date.now;
  17817. /* Built-in method references that are verified to be native. */
  17818. var Map = getNative(root, 'Map'),
  17819. nativeCreate = getNative(Object, 'create');
  17820. /**
  17821. * The base implementation of `_.create` without support for assigning
  17822. * properties to the created object.
  17823. *
  17824. * @private
  17825. * @param {Object} proto The object to inherit from.
  17826. * @returns {Object} Returns the new object.
  17827. */
  17828. var baseCreate = (function() {
  17829. function object() {}
  17830. return function(proto) {
  17831. if (!isObject(proto)) {
  17832. return {};
  17833. }
  17834. if (objectCreate) {
  17835. return objectCreate(proto);
  17836. }
  17837. object.prototype = proto;
  17838. var result = new object;
  17839. object.prototype = undefined;
  17840. return result;
  17841. };
  17842. }());
  17843. /**
  17844. * Creates a hash object.
  17845. *
  17846. * @private
  17847. * @constructor
  17848. * @param {Array} [entries] The key-value pairs to cache.
  17849. */
  17850. function Hash(entries) {
  17851. var index = -1,
  17852. length = entries == null ? 0 : entries.length;
  17853. this.clear();
  17854. while (++index < length) {
  17855. var entry = entries[index];
  17856. this.set(entry[0], entry[1]);
  17857. }
  17858. }
  17859. /**
  17860. * Removes all key-value entries from the hash.
  17861. *
  17862. * @private
  17863. * @name clear
  17864. * @memberOf Hash
  17865. */
  17866. function hashClear() {
  17867. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  17868. this.size = 0;
  17869. }
  17870. /**
  17871. * Removes `key` and its value from the hash.
  17872. *
  17873. * @private
  17874. * @name delete
  17875. * @memberOf Hash
  17876. * @param {Object} hash The hash to modify.
  17877. * @param {string} key The key of the value to remove.
  17878. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  17879. */
  17880. function hashDelete(key) {
  17881. var result = this.has(key) && delete this.__data__[key];
  17882. this.size -= result ? 1 : 0;
  17883. return result;
  17884. }
  17885. /**
  17886. * Gets the hash value for `key`.
  17887. *
  17888. * @private
  17889. * @name get
  17890. * @memberOf Hash
  17891. * @param {string} key The key of the value to get.
  17892. * @returns {*} Returns the entry value.
  17893. */
  17894. function hashGet(key) {
  17895. var data = this.__data__;
  17896. if (nativeCreate) {
  17897. var result = data[key];
  17898. return result === HASH_UNDEFINED ? undefined : result;
  17899. }
  17900. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  17901. }
  17902. /**
  17903. * Checks if a hash value for `key` exists.
  17904. *
  17905. * @private
  17906. * @name has
  17907. * @memberOf Hash
  17908. * @param {string} key The key of the entry to check.
  17909. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  17910. */
  17911. function hashHas(key) {
  17912. var data = this.__data__;
  17913. return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
  17914. }
  17915. /**
  17916. * Sets the hash `key` to `value`.
  17917. *
  17918. * @private
  17919. * @name set
  17920. * @memberOf Hash
  17921. * @param {string} key The key of the value to set.
  17922. * @param {*} value The value to set.
  17923. * @returns {Object} Returns the hash instance.
  17924. */
  17925. function hashSet(key, value) {
  17926. var data = this.__data__;
  17927. this.size += this.has(key) ? 0 : 1;
  17928. data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
  17929. return this;
  17930. }
  17931. // Add methods to `Hash`.
  17932. Hash.prototype.clear = hashClear;
  17933. Hash.prototype['delete'] = hashDelete;
  17934. Hash.prototype.get = hashGet;
  17935. Hash.prototype.has = hashHas;
  17936. Hash.prototype.set = hashSet;
  17937. /**
  17938. * Creates an list cache object.
  17939. *
  17940. * @private
  17941. * @constructor
  17942. * @param {Array} [entries] The key-value pairs to cache.
  17943. */
  17944. function ListCache(entries) {
  17945. var index = -1,
  17946. length = entries == null ? 0 : entries.length;
  17947. this.clear();
  17948. while (++index < length) {
  17949. var entry = entries[index];
  17950. this.set(entry[0], entry[1]);
  17951. }
  17952. }
  17953. /**
  17954. * Removes all key-value entries from the list cache.
  17955. *
  17956. * @private
  17957. * @name clear
  17958. * @memberOf ListCache
  17959. */
  17960. function listCacheClear() {
  17961. this.__data__ = [];
  17962. this.size = 0;
  17963. }
  17964. /**
  17965. * Removes `key` and its value from the list cache.
  17966. *
  17967. * @private
  17968. * @name delete
  17969. * @memberOf ListCache
  17970. * @param {string} key The key of the value to remove.
  17971. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  17972. */
  17973. function listCacheDelete(key) {
  17974. var data = this.__data__,
  17975. index = assocIndexOf(data, key);
  17976. if (index < 0) {
  17977. return false;
  17978. }
  17979. var lastIndex = data.length - 1;
  17980. if (index == lastIndex) {
  17981. data.pop();
  17982. } else {
  17983. splice.call(data, index, 1);
  17984. }
  17985. --this.size;
  17986. return true;
  17987. }
  17988. /**
  17989. * Gets the list cache value for `key`.
  17990. *
  17991. * @private
  17992. * @name get
  17993. * @memberOf ListCache
  17994. * @param {string} key The key of the value to get.
  17995. * @returns {*} Returns the entry value.
  17996. */
  17997. function listCacheGet(key) {
  17998. var data = this.__data__,
  17999. index = assocIndexOf(data, key);
  18000. return index < 0 ? undefined : data[index][1];
  18001. }
  18002. /**
  18003. * Checks if a list cache value for `key` exists.
  18004. *
  18005. * @private
  18006. * @name has
  18007. * @memberOf ListCache
  18008. * @param {string} key The key of the entry to check.
  18009. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  18010. */
  18011. function listCacheHas(key) {
  18012. return assocIndexOf(this.__data__, key) > -1;
  18013. }
  18014. /**
  18015. * Sets the list cache `key` to `value`.
  18016. *
  18017. * @private
  18018. * @name set
  18019. * @memberOf ListCache
  18020. * @param {string} key The key of the value to set.
  18021. * @param {*} value The value to set.
  18022. * @returns {Object} Returns the list cache instance.
  18023. */
  18024. function listCacheSet(key, value) {
  18025. var data = this.__data__,
  18026. index = assocIndexOf(data, key);
  18027. if (index < 0) {
  18028. ++this.size;
  18029. data.push([key, value]);
  18030. } else {
  18031. data[index][1] = value;
  18032. }
  18033. return this;
  18034. }
  18035. // Add methods to `ListCache`.
  18036. ListCache.prototype.clear = listCacheClear;
  18037. ListCache.prototype['delete'] = listCacheDelete;
  18038. ListCache.prototype.get = listCacheGet;
  18039. ListCache.prototype.has = listCacheHas;
  18040. ListCache.prototype.set = listCacheSet;
  18041. /**
  18042. * Creates a map cache object to store key-value pairs.
  18043. *
  18044. * @private
  18045. * @constructor
  18046. * @param {Array} [entries] The key-value pairs to cache.
  18047. */
  18048. function MapCache(entries) {
  18049. var index = -1,
  18050. length = entries == null ? 0 : entries.length;
  18051. this.clear();
  18052. while (++index < length) {
  18053. var entry = entries[index];
  18054. this.set(entry[0], entry[1]);
  18055. }
  18056. }
  18057. /**
  18058. * Removes all key-value entries from the map.
  18059. *
  18060. * @private
  18061. * @name clear
  18062. * @memberOf MapCache
  18063. */
  18064. function mapCacheClear() {
  18065. this.size = 0;
  18066. this.__data__ = {
  18067. 'hash': new Hash,
  18068. 'map': new (Map || ListCache),
  18069. 'string': new Hash
  18070. };
  18071. }
  18072. /**
  18073. * Removes `key` and its value from the map.
  18074. *
  18075. * @private
  18076. * @name delete
  18077. * @memberOf MapCache
  18078. * @param {string} key The key of the value to remove.
  18079. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  18080. */
  18081. function mapCacheDelete(key) {
  18082. var result = getMapData(this, key)['delete'](key);
  18083. this.size -= result ? 1 : 0;
  18084. return result;
  18085. }
  18086. /**
  18087. * Gets the map value for `key`.
  18088. *
  18089. * @private
  18090. * @name get
  18091. * @memberOf MapCache
  18092. * @param {string} key The key of the value to get.
  18093. * @returns {*} Returns the entry value.
  18094. */
  18095. function mapCacheGet(key) {
  18096. return getMapData(this, key).get(key);
  18097. }
  18098. /**
  18099. * Checks if a map value for `key` exists.
  18100. *
  18101. * @private
  18102. * @name has
  18103. * @memberOf MapCache
  18104. * @param {string} key The key of the entry to check.
  18105. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  18106. */
  18107. function mapCacheHas(key) {
  18108. return getMapData(this, key).has(key);
  18109. }
  18110. /**
  18111. * Sets the map `key` to `value`.
  18112. *
  18113. * @private
  18114. * @name set
  18115. * @memberOf MapCache
  18116. * @param {string} key The key of the value to set.
  18117. * @param {*} value The value to set.
  18118. * @returns {Object} Returns the map cache instance.
  18119. */
  18120. function mapCacheSet(key, value) {
  18121. var data = getMapData(this, key),
  18122. size = data.size;
  18123. data.set(key, value);
  18124. this.size += data.size == size ? 0 : 1;
  18125. return this;
  18126. }
  18127. // Add methods to `MapCache`.
  18128. MapCache.prototype.clear = mapCacheClear;
  18129. MapCache.prototype['delete'] = mapCacheDelete;
  18130. MapCache.prototype.get = mapCacheGet;
  18131. MapCache.prototype.has = mapCacheHas;
  18132. MapCache.prototype.set = mapCacheSet;
  18133. /**
  18134. * Creates a stack cache object to store key-value pairs.
  18135. *
  18136. * @private
  18137. * @constructor
  18138. * @param {Array} [entries] The key-value pairs to cache.
  18139. */
  18140. function Stack(entries) {
  18141. var data = this.__data__ = new ListCache(entries);
  18142. this.size = data.size;
  18143. }
  18144. /**
  18145. * Removes all key-value entries from the stack.
  18146. *
  18147. * @private
  18148. * @name clear
  18149. * @memberOf Stack
  18150. */
  18151. function stackClear() {
  18152. this.__data__ = new ListCache;
  18153. this.size = 0;
  18154. }
  18155. /**
  18156. * Removes `key` and its value from the stack.
  18157. *
  18158. * @private
  18159. * @name delete
  18160. * @memberOf Stack
  18161. * @param {string} key The key of the value to remove.
  18162. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  18163. */
  18164. function stackDelete(key) {
  18165. var data = this.__data__,
  18166. result = data['delete'](key);
  18167. this.size = data.size;
  18168. return result;
  18169. }
  18170. /**
  18171. * Gets the stack value for `key`.
  18172. *
  18173. * @private
  18174. * @name get
  18175. * @memberOf Stack
  18176. * @param {string} key The key of the value to get.
  18177. * @returns {*} Returns the entry value.
  18178. */
  18179. function stackGet(key) {
  18180. return this.__data__.get(key);
  18181. }
  18182. /**
  18183. * Checks if a stack value for `key` exists.
  18184. *
  18185. * @private
  18186. * @name has
  18187. * @memberOf Stack
  18188. * @param {string} key The key of the entry to check.
  18189. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  18190. */
  18191. function stackHas(key) {
  18192. return this.__data__.has(key);
  18193. }
  18194. /**
  18195. * Sets the stack `key` to `value`.
  18196. *
  18197. * @private
  18198. * @name set
  18199. * @memberOf Stack
  18200. * @param {string} key The key of the value to set.
  18201. * @param {*} value The value to set.
  18202. * @returns {Object} Returns the stack cache instance.
  18203. */
  18204. function stackSet(key, value) {
  18205. var data = this.__data__;
  18206. if (data instanceof ListCache) {
  18207. var pairs = data.__data__;
  18208. if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
  18209. pairs.push([key, value]);
  18210. this.size = ++data.size;
  18211. return this;
  18212. }
  18213. data = this.__data__ = new MapCache(pairs);
  18214. }
  18215. data.set(key, value);
  18216. this.size = data.size;
  18217. return this;
  18218. }
  18219. // Add methods to `Stack`.
  18220. Stack.prototype.clear = stackClear;
  18221. Stack.prototype['delete'] = stackDelete;
  18222. Stack.prototype.get = stackGet;
  18223. Stack.prototype.has = stackHas;
  18224. Stack.prototype.set = stackSet;
  18225. /**
  18226. * Creates an array of the enumerable property names of the array-like `value`.
  18227. *
  18228. * @private
  18229. * @param {*} value The value to query.
  18230. * @param {boolean} inherited Specify returning inherited property names.
  18231. * @returns {Array} Returns the array of property names.
  18232. */
  18233. function arrayLikeKeys(value, inherited) {
  18234. var isArr = isArray(value),
  18235. isArg = !isArr && isArguments(value),
  18236. isBuff = !isArr && !isArg && isBuffer(value),
  18237. isType = !isArr && !isArg && !isBuff && isTypedArray(value),
  18238. skipIndexes = isArr || isArg || isBuff || isType,
  18239. result = skipIndexes ? baseTimes(value.length, String) : [],
  18240. length = result.length;
  18241. for (var key in value) {
  18242. if ((inherited || hasOwnProperty.call(value, key)) &&
  18243. !(skipIndexes && (
  18244. // Safari 9 has enumerable `arguments.length` in strict mode.
  18245. key == 'length' ||
  18246. // Node.js 0.10 has enumerable non-index properties on buffers.
  18247. (isBuff && (key == 'offset' || key == 'parent')) ||
  18248. // PhantomJS 2 has enumerable non-index properties on typed arrays.
  18249. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
  18250. // Skip index properties.
  18251. isIndex(key, length)
  18252. ))) {
  18253. result.push(key);
  18254. }
  18255. }
  18256. return result;
  18257. }
  18258. /**
  18259. * This function is like `assignValue` except that it doesn't assign
  18260. * `undefined` values.
  18261. *
  18262. * @private
  18263. * @param {Object} object The object to modify.
  18264. * @param {string} key The key of the property to assign.
  18265. * @param {*} value The value to assign.
  18266. */
  18267. function assignMergeValue(object, key, value) {
  18268. if ((value !== undefined && !eq(object[key], value)) ||
  18269. (value === undefined && !(key in object))) {
  18270. baseAssignValue(object, key, value);
  18271. }
  18272. }
  18273. /**
  18274. * Assigns `value` to `key` of `object` if the existing value is not equivalent
  18275. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  18276. * for equality comparisons.
  18277. *
  18278. * @private
  18279. * @param {Object} object The object to modify.
  18280. * @param {string} key The key of the property to assign.
  18281. * @param {*} value The value to assign.
  18282. */
  18283. function assignValue(object, key, value) {
  18284. var objValue = object[key];
  18285. if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
  18286. (value === undefined && !(key in object))) {
  18287. baseAssignValue(object, key, value);
  18288. }
  18289. }
  18290. /**
  18291. * Gets the index at which the `key` is found in `array` of key-value pairs.
  18292. *
  18293. * @private
  18294. * @param {Array} array The array to inspect.
  18295. * @param {*} key The key to search for.
  18296. * @returns {number} Returns the index of the matched value, else `-1`.
  18297. */
  18298. function assocIndexOf(array, key) {
  18299. var length = array.length;
  18300. while (length--) {
  18301. if (eq(array[length][0], key)) {
  18302. return length;
  18303. }
  18304. }
  18305. return -1;
  18306. }
  18307. /**
  18308. * The base implementation of `assignValue` and `assignMergeValue` without
  18309. * value checks.
  18310. *
  18311. * @private
  18312. * @param {Object} object The object to modify.
  18313. * @param {string} key The key of the property to assign.
  18314. * @param {*} value The value to assign.
  18315. */
  18316. function baseAssignValue(object, key, value) {
  18317. if (key == '__proto__' && defineProperty) {
  18318. defineProperty(object, key, {
  18319. 'configurable': true,
  18320. 'enumerable': true,
  18321. 'value': value,
  18322. 'writable': true
  18323. });
  18324. } else {
  18325. object[key] = value;
  18326. }
  18327. }
  18328. /**
  18329. * The base implementation of `baseForOwn` which iterates over `object`
  18330. * properties returned by `keysFunc` and invokes `iteratee` for each property.
  18331. * Iteratee functions may exit iteration early by explicitly returning `false`.
  18332. *
  18333. * @private
  18334. * @param {Object} object The object to iterate over.
  18335. * @param {Function} iteratee The function invoked per iteration.
  18336. * @param {Function} keysFunc The function to get the keys of `object`.
  18337. * @returns {Object} Returns `object`.
  18338. */
  18339. var baseFor = createBaseFor();
  18340. /**
  18341. * The base implementation of `getTag` without fallbacks for buggy environments.
  18342. *
  18343. * @private
  18344. * @param {*} value The value to query.
  18345. * @returns {string} Returns the `toStringTag`.
  18346. */
  18347. function baseGetTag(value) {
  18348. if (value == null) {
  18349. return value === undefined ? undefinedTag : nullTag;
  18350. }
  18351. return (symToStringTag && symToStringTag in Object(value))
  18352. ? getRawTag(value)
  18353. : objectToString(value);
  18354. }
  18355. /**
  18356. * The base implementation of `_.isArguments`.
  18357. *
  18358. * @private
  18359. * @param {*} value The value to check.
  18360. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  18361. */
  18362. function baseIsArguments(value) {
  18363. return isObjectLike(value) && baseGetTag(value) == argsTag;
  18364. }
  18365. /**
  18366. * The base implementation of `_.isNative` without bad shim checks.
  18367. *
  18368. * @private
  18369. * @param {*} value The value to check.
  18370. * @returns {boolean} Returns `true` if `value` is a native function,
  18371. * else `false`.
  18372. */
  18373. function baseIsNative(value) {
  18374. if (!isObject(value) || isMasked(value)) {
  18375. return false;
  18376. }
  18377. var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
  18378. return pattern.test(toSource(value));
  18379. }
  18380. /**
  18381. * The base implementation of `_.isTypedArray` without Node.js optimizations.
  18382. *
  18383. * @private
  18384. * @param {*} value The value to check.
  18385. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  18386. */
  18387. function baseIsTypedArray(value) {
  18388. return isObjectLike(value) &&
  18389. isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
  18390. }
  18391. /**
  18392. * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
  18393. *
  18394. * @private
  18395. * @param {Object} object The object to query.
  18396. * @returns {Array} Returns the array of property names.
  18397. */
  18398. function baseKeysIn(object) {
  18399. if (!isObject(object)) {
  18400. return nativeKeysIn(object);
  18401. }
  18402. var isProto = isPrototype(object),
  18403. result = [];
  18404. for (var key in object) {
  18405. if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
  18406. result.push(key);
  18407. }
  18408. }
  18409. return result;
  18410. }
  18411. /**
  18412. * The base implementation of `_.merge` without support for multiple sources.
  18413. *
  18414. * @private
  18415. * @param {Object} object The destination object.
  18416. * @param {Object} source The source object.
  18417. * @param {number} srcIndex The index of `source`.
  18418. * @param {Function} [customizer] The function to customize merged values.
  18419. * @param {Object} [stack] Tracks traversed source values and their merged
  18420. * counterparts.
  18421. */
  18422. function baseMerge(object, source, srcIndex, customizer, stack) {
  18423. if (object === source) {
  18424. return;
  18425. }
  18426. baseFor(source, function(srcValue, key) {
  18427. stack || (stack = new Stack);
  18428. if (isObject(srcValue)) {
  18429. baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
  18430. }
  18431. else {
  18432. var newValue = customizer
  18433. ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
  18434. : undefined;
  18435. if (newValue === undefined) {
  18436. newValue = srcValue;
  18437. }
  18438. assignMergeValue(object, key, newValue);
  18439. }
  18440. }, keysIn);
  18441. }
  18442. /**
  18443. * A specialized version of `baseMerge` for arrays and objects which performs
  18444. * deep merges and tracks traversed objects enabling objects with circular
  18445. * references to be merged.
  18446. *
  18447. * @private
  18448. * @param {Object} object The destination object.
  18449. * @param {Object} source The source object.
  18450. * @param {string} key The key of the value to merge.
  18451. * @param {number} srcIndex The index of `source`.
  18452. * @param {Function} mergeFunc The function to merge values.
  18453. * @param {Function} [customizer] The function to customize assigned values.
  18454. * @param {Object} [stack] Tracks traversed source values and their merged
  18455. * counterparts.
  18456. */
  18457. function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
  18458. var objValue = safeGet(object, key),
  18459. srcValue = safeGet(source, key),
  18460. stacked = stack.get(srcValue);
  18461. if (stacked) {
  18462. assignMergeValue(object, key, stacked);
  18463. return;
  18464. }
  18465. var newValue = customizer
  18466. ? customizer(objValue, srcValue, (key + ''), object, source, stack)
  18467. : undefined;
  18468. var isCommon = newValue === undefined;
  18469. if (isCommon) {
  18470. var isArr = isArray(srcValue),
  18471. isBuff = !isArr && isBuffer(srcValue),
  18472. isTyped = !isArr && !isBuff && isTypedArray(srcValue);
  18473. newValue = srcValue;
  18474. if (isArr || isBuff || isTyped) {
  18475. if (isArray(objValue)) {
  18476. newValue = objValue;
  18477. }
  18478. else if (isArrayLikeObject(objValue)) {
  18479. newValue = copyArray(objValue);
  18480. }
  18481. else if (isBuff) {
  18482. isCommon = false;
  18483. newValue = cloneBuffer(srcValue, true);
  18484. }
  18485. else if (isTyped) {
  18486. isCommon = false;
  18487. newValue = cloneTypedArray(srcValue, true);
  18488. }
  18489. else {
  18490. newValue = [];
  18491. }
  18492. }
  18493. else if (isPlainObject(srcValue) || isArguments(srcValue)) {
  18494. newValue = objValue;
  18495. if (isArguments(objValue)) {
  18496. newValue = toPlainObject(objValue);
  18497. }
  18498. else if (!isObject(objValue) || isFunction(objValue)) {
  18499. newValue = initCloneObject(srcValue);
  18500. }
  18501. }
  18502. else {
  18503. isCommon = false;
  18504. }
  18505. }
  18506. if (isCommon) {
  18507. // Recursively merge objects and arrays (susceptible to call stack limits).
  18508. stack.set(srcValue, newValue);
  18509. mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
  18510. stack['delete'](srcValue);
  18511. }
  18512. assignMergeValue(object, key, newValue);
  18513. }
  18514. /**
  18515. * The base implementation of `_.rest` which doesn't validate or coerce arguments.
  18516. *
  18517. * @private
  18518. * @param {Function} func The function to apply a rest parameter to.
  18519. * @param {number} [start=func.length-1] The start position of the rest parameter.
  18520. * @returns {Function} Returns the new function.
  18521. */
  18522. function baseRest(func, start) {
  18523. return setToString(overRest(func, start, identity), func + '');
  18524. }
  18525. /**
  18526. * The base implementation of `setToString` without support for hot loop shorting.
  18527. *
  18528. * @private
  18529. * @param {Function} func The function to modify.
  18530. * @param {Function} string The `toString` result.
  18531. * @returns {Function} Returns `func`.
  18532. */
  18533. var baseSetToString = !defineProperty ? identity : function(func, string) {
  18534. return defineProperty(func, 'toString', {
  18535. 'configurable': true,
  18536. 'enumerable': false,
  18537. 'value': constant(string),
  18538. 'writable': true
  18539. });
  18540. };
  18541. /**
  18542. * Creates a clone of `buffer`.
  18543. *
  18544. * @private
  18545. * @param {Buffer} buffer The buffer to clone.
  18546. * @param {boolean} [isDeep] Specify a deep clone.
  18547. * @returns {Buffer} Returns the cloned buffer.
  18548. */
  18549. function cloneBuffer(buffer, isDeep) {
  18550. if (isDeep) {
  18551. return buffer.slice();
  18552. }
  18553. var length = buffer.length,
  18554. result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
  18555. buffer.copy(result);
  18556. return result;
  18557. }
  18558. /**
  18559. * Creates a clone of `arrayBuffer`.
  18560. *
  18561. * @private
  18562. * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
  18563. * @returns {ArrayBuffer} Returns the cloned array buffer.
  18564. */
  18565. function cloneArrayBuffer(arrayBuffer) {
  18566. var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
  18567. new Uint8Array(result).set(new Uint8Array(arrayBuffer));
  18568. return result;
  18569. }
  18570. /**
  18571. * Creates a clone of `typedArray`.
  18572. *
  18573. * @private
  18574. * @param {Object} typedArray The typed array to clone.
  18575. * @param {boolean} [isDeep] Specify a deep clone.
  18576. * @returns {Object} Returns the cloned typed array.
  18577. */
  18578. function cloneTypedArray(typedArray, isDeep) {
  18579. var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  18580. return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
  18581. }
  18582. /**
  18583. * Copies the values of `source` to `array`.
  18584. *
  18585. * @private
  18586. * @param {Array} source The array to copy values from.
  18587. * @param {Array} [array=[]] The array to copy values to.
  18588. * @returns {Array} Returns `array`.
  18589. */
  18590. function copyArray(source, array) {
  18591. var index = -1,
  18592. length = source.length;
  18593. array || (array = Array(length));
  18594. while (++index < length) {
  18595. array[index] = source[index];
  18596. }
  18597. return array;
  18598. }
  18599. /**
  18600. * Copies properties of `source` to `object`.
  18601. *
  18602. * @private
  18603. * @param {Object} source The object to copy properties from.
  18604. * @param {Array} props The property identifiers to copy.
  18605. * @param {Object} [object={}] The object to copy properties to.
  18606. * @param {Function} [customizer] The function to customize copied values.
  18607. * @returns {Object} Returns `object`.
  18608. */
  18609. function copyObject(source, props, object, customizer) {
  18610. var isNew = !object;
  18611. object || (object = {});
  18612. var index = -1,
  18613. length = props.length;
  18614. while (++index < length) {
  18615. var key = props[index];
  18616. var newValue = customizer
  18617. ? customizer(object[key], source[key], key, object, source)
  18618. : undefined;
  18619. if (newValue === undefined) {
  18620. newValue = source[key];
  18621. }
  18622. if (isNew) {
  18623. baseAssignValue(object, key, newValue);
  18624. } else {
  18625. assignValue(object, key, newValue);
  18626. }
  18627. }
  18628. return object;
  18629. }
  18630. /**
  18631. * Creates a function like `_.assign`.
  18632. *
  18633. * @private
  18634. * @param {Function} assigner The function to assign values.
  18635. * @returns {Function} Returns the new assigner function.
  18636. */
  18637. function createAssigner(assigner) {
  18638. return baseRest(function(object, sources) {
  18639. var index = -1,
  18640. length = sources.length,
  18641. customizer = length > 1 ? sources[length - 1] : undefined,
  18642. guard = length > 2 ? sources[2] : undefined;
  18643. customizer = (assigner.length > 3 && typeof customizer == 'function')
  18644. ? (length--, customizer)
  18645. : undefined;
  18646. if (guard && isIterateeCall(sources[0], sources[1], guard)) {
  18647. customizer = length < 3 ? undefined : customizer;
  18648. length = 1;
  18649. }
  18650. object = Object(object);
  18651. while (++index < length) {
  18652. var source = sources[index];
  18653. if (source) {
  18654. assigner(object, source, index, customizer);
  18655. }
  18656. }
  18657. return object;
  18658. });
  18659. }
  18660. /**
  18661. * Creates a base function for methods like `_.forIn` and `_.forOwn`.
  18662. *
  18663. * @private
  18664. * @param {boolean} [fromRight] Specify iterating from right to left.
  18665. * @returns {Function} Returns the new base function.
  18666. */
  18667. function createBaseFor(fromRight) {
  18668. return function(object, iteratee, keysFunc) {
  18669. var index = -1,
  18670. iterable = Object(object),
  18671. props = keysFunc(object),
  18672. length = props.length;
  18673. while (length--) {
  18674. var key = props[fromRight ? length : ++index];
  18675. if (iteratee(iterable[key], key, iterable) === false) {
  18676. break;
  18677. }
  18678. }
  18679. return object;
  18680. };
  18681. }
  18682. /**
  18683. * Gets the data for `map`.
  18684. *
  18685. * @private
  18686. * @param {Object} map The map to query.
  18687. * @param {string} key The reference key.
  18688. * @returns {*} Returns the map data.
  18689. */
  18690. function getMapData(map, key) {
  18691. var data = map.__data__;
  18692. return isKeyable(key)
  18693. ? data[typeof key == 'string' ? 'string' : 'hash']
  18694. : data.map;
  18695. }
  18696. /**
  18697. * Gets the native function at `key` of `object`.
  18698. *
  18699. * @private
  18700. * @param {Object} object The object to query.
  18701. * @param {string} key The key of the method to get.
  18702. * @returns {*} Returns the function if it's native, else `undefined`.
  18703. */
  18704. function getNative(object, key) {
  18705. var value = getValue(object, key);
  18706. return baseIsNative(value) ? value : undefined;
  18707. }
  18708. /**
  18709. * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
  18710. *
  18711. * @private
  18712. * @param {*} value The value to query.
  18713. * @returns {string} Returns the raw `toStringTag`.
  18714. */
  18715. function getRawTag(value) {
  18716. var isOwn = hasOwnProperty.call(value, symToStringTag),
  18717. tag = value[symToStringTag];
  18718. try {
  18719. value[symToStringTag] = undefined;
  18720. var unmasked = true;
  18721. } catch (e) {}
  18722. var result = nativeObjectToString.call(value);
  18723. if (unmasked) {
  18724. if (isOwn) {
  18725. value[symToStringTag] = tag;
  18726. } else {
  18727. delete value[symToStringTag];
  18728. }
  18729. }
  18730. return result;
  18731. }
  18732. /**
  18733. * Initializes an object clone.
  18734. *
  18735. * @private
  18736. * @param {Object} object The object to clone.
  18737. * @returns {Object} Returns the initialized clone.
  18738. */
  18739. function initCloneObject(object) {
  18740. return (typeof object.constructor == 'function' && !isPrototype(object))
  18741. ? baseCreate(getPrototype(object))
  18742. : {};
  18743. }
  18744. /**
  18745. * Checks if `value` is a valid array-like index.
  18746. *
  18747. * @private
  18748. * @param {*} value The value to check.
  18749. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  18750. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  18751. */
  18752. function isIndex(value, length) {
  18753. var type = typeof value;
  18754. length = length == null ? MAX_SAFE_INTEGER : length;
  18755. return !!length &&
  18756. (type == 'number' ||
  18757. (type != 'symbol' && reIsUint.test(value))) &&
  18758. (value > -1 && value % 1 == 0 && value < length);
  18759. }
  18760. /**
  18761. * Checks if the given arguments are from an iteratee call.
  18762. *
  18763. * @private
  18764. * @param {*} value The potential iteratee value argument.
  18765. * @param {*} index The potential iteratee index or key argument.
  18766. * @param {*} object The potential iteratee object argument.
  18767. * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
  18768. * else `false`.
  18769. */
  18770. function isIterateeCall(value, index, object) {
  18771. if (!isObject(object)) {
  18772. return false;
  18773. }
  18774. var type = typeof index;
  18775. if (type == 'number'
  18776. ? (isArrayLike(object) && isIndex(index, object.length))
  18777. : (type == 'string' && index in object)
  18778. ) {
  18779. return eq(object[index], value);
  18780. }
  18781. return false;
  18782. }
  18783. /**
  18784. * Checks if `value` is suitable for use as unique object key.
  18785. *
  18786. * @private
  18787. * @param {*} value The value to check.
  18788. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  18789. */
  18790. function isKeyable(value) {
  18791. var type = typeof value;
  18792. return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
  18793. ? (value !== '__proto__')
  18794. : (value === null);
  18795. }
  18796. /**
  18797. * Checks if `func` has its source masked.
  18798. *
  18799. * @private
  18800. * @param {Function} func The function to check.
  18801. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  18802. */
  18803. function isMasked(func) {
  18804. return !!maskSrcKey && (maskSrcKey in func);
  18805. }
  18806. /**
  18807. * Checks if `value` is likely a prototype object.
  18808. *
  18809. * @private
  18810. * @param {*} value The value to check.
  18811. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
  18812. */
  18813. function isPrototype(value) {
  18814. var Ctor = value && value.constructor,
  18815. proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
  18816. return value === proto;
  18817. }
  18818. /**
  18819. * This function is like
  18820. * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  18821. * except that it includes inherited enumerable properties.
  18822. *
  18823. * @private
  18824. * @param {Object} object The object to query.
  18825. * @returns {Array} Returns the array of property names.
  18826. */
  18827. function nativeKeysIn(object) {
  18828. var result = [];
  18829. if (object != null) {
  18830. for (var key in Object(object)) {
  18831. result.push(key);
  18832. }
  18833. }
  18834. return result;
  18835. }
  18836. /**
  18837. * Converts `value` to a string using `Object.prototype.toString`.
  18838. *
  18839. * @private
  18840. * @param {*} value The value to convert.
  18841. * @returns {string} Returns the converted string.
  18842. */
  18843. function objectToString(value) {
  18844. return nativeObjectToString.call(value);
  18845. }
  18846. /**
  18847. * A specialized version of `baseRest` which transforms the rest array.
  18848. *
  18849. * @private
  18850. * @param {Function} func The function to apply a rest parameter to.
  18851. * @param {number} [start=func.length-1] The start position of the rest parameter.
  18852. * @param {Function} transform The rest array transform.
  18853. * @returns {Function} Returns the new function.
  18854. */
  18855. function overRest(func, start, transform) {
  18856. start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
  18857. return function() {
  18858. var args = arguments,
  18859. index = -1,
  18860. length = nativeMax(args.length - start, 0),
  18861. array = Array(length);
  18862. while (++index < length) {
  18863. array[index] = args[start + index];
  18864. }
  18865. index = -1;
  18866. var otherArgs = Array(start + 1);
  18867. while (++index < start) {
  18868. otherArgs[index] = args[index];
  18869. }
  18870. otherArgs[start] = transform(array);
  18871. return apply(func, this, otherArgs);
  18872. };
  18873. }
  18874. /**
  18875. * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
  18876. *
  18877. * @private
  18878. * @param {Object} object The object to query.
  18879. * @param {string} key The key of the property to get.
  18880. * @returns {*} Returns the property value.
  18881. */
  18882. function safeGet(object, key) {
  18883. if (key === 'constructor' && typeof object[key] === 'function') {
  18884. return;
  18885. }
  18886. if (key == '__proto__') {
  18887. return;
  18888. }
  18889. return object[key];
  18890. }
  18891. /**
  18892. * Sets the `toString` method of `func` to return `string`.
  18893. *
  18894. * @private
  18895. * @param {Function} func The function to modify.
  18896. * @param {Function} string The `toString` result.
  18897. * @returns {Function} Returns `func`.
  18898. */
  18899. var setToString = shortOut(baseSetToString);
  18900. /**
  18901. * Creates a function that'll short out and invoke `identity` instead
  18902. * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
  18903. * milliseconds.
  18904. *
  18905. * @private
  18906. * @param {Function} func The function to restrict.
  18907. * @returns {Function} Returns the new shortable function.
  18908. */
  18909. function shortOut(func) {
  18910. var count = 0,
  18911. lastCalled = 0;
  18912. return function() {
  18913. var stamp = nativeNow(),
  18914. remaining = HOT_SPAN - (stamp - lastCalled);
  18915. lastCalled = stamp;
  18916. if (remaining > 0) {
  18917. if (++count >= HOT_COUNT) {
  18918. return arguments[0];
  18919. }
  18920. } else {
  18921. count = 0;
  18922. }
  18923. return func.apply(undefined, arguments);
  18924. };
  18925. }
  18926. /**
  18927. * Converts `func` to its source code.
  18928. *
  18929. * @private
  18930. * @param {Function} func The function to convert.
  18931. * @returns {string} Returns the source code.
  18932. */
  18933. function toSource(func) {
  18934. if (func != null) {
  18935. try {
  18936. return funcToString.call(func);
  18937. } catch (e) {}
  18938. try {
  18939. return (func + '');
  18940. } catch (e) {}
  18941. }
  18942. return '';
  18943. }
  18944. /**
  18945. * Performs a
  18946. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  18947. * comparison between two values to determine if they are equivalent.
  18948. *
  18949. * @static
  18950. * @memberOf _
  18951. * @since 4.0.0
  18952. * @category Lang
  18953. * @param {*} value The value to compare.
  18954. * @param {*} other The other value to compare.
  18955. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  18956. * @example
  18957. *
  18958. * var object = { 'a': 1 };
  18959. * var other = { 'a': 1 };
  18960. *
  18961. * _.eq(object, object);
  18962. * // => true
  18963. *
  18964. * _.eq(object, other);
  18965. * // => false
  18966. *
  18967. * _.eq('a', 'a');
  18968. * // => true
  18969. *
  18970. * _.eq('a', Object('a'));
  18971. * // => false
  18972. *
  18973. * _.eq(NaN, NaN);
  18974. * // => true
  18975. */
  18976. function eq(value, other) {
  18977. return value === other || (value !== value && other !== other);
  18978. }
  18979. /**
  18980. * Checks if `value` is likely an `arguments` object.
  18981. *
  18982. * @static
  18983. * @memberOf _
  18984. * @since 0.1.0
  18985. * @category Lang
  18986. * @param {*} value The value to check.
  18987. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  18988. * else `false`.
  18989. * @example
  18990. *
  18991. * _.isArguments(function() { return arguments; }());
  18992. * // => true
  18993. *
  18994. * _.isArguments([1, 2, 3]);
  18995. * // => false
  18996. */
  18997. var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
  18998. return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
  18999. !propertyIsEnumerable.call(value, 'callee');
  19000. };
  19001. /**
  19002. * Checks if `value` is classified as an `Array` object.
  19003. *
  19004. * @static
  19005. * @memberOf _
  19006. * @since 0.1.0
  19007. * @category Lang
  19008. * @param {*} value The value to check.
  19009. * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  19010. * @example
  19011. *
  19012. * _.isArray([1, 2, 3]);
  19013. * // => true
  19014. *
  19015. * _.isArray(document.body.children);
  19016. * // => false
  19017. *
  19018. * _.isArray('abc');
  19019. * // => false
  19020. *
  19021. * _.isArray(_.noop);
  19022. * // => false
  19023. */
  19024. var isArray = Array.isArray;
  19025. /**
  19026. * Checks if `value` is array-like. A value is considered array-like if it's
  19027. * not a function and has a `value.length` that's an integer greater than or
  19028. * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
  19029. *
  19030. * @static
  19031. * @memberOf _
  19032. * @since 4.0.0
  19033. * @category Lang
  19034. * @param {*} value The value to check.
  19035. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  19036. * @example
  19037. *
  19038. * _.isArrayLike([1, 2, 3]);
  19039. * // => true
  19040. *
  19041. * _.isArrayLike(document.body.children);
  19042. * // => true
  19043. *
  19044. * _.isArrayLike('abc');
  19045. * // => true
  19046. *
  19047. * _.isArrayLike(_.noop);
  19048. * // => false
  19049. */
  19050. function isArrayLike(value) {
  19051. return value != null && isLength(value.length) && !isFunction(value);
  19052. }
  19053. /**
  19054. * This method is like `_.isArrayLike` except that it also checks if `value`
  19055. * is an object.
  19056. *
  19057. * @static
  19058. * @memberOf _
  19059. * @since 4.0.0
  19060. * @category Lang
  19061. * @param {*} value The value to check.
  19062. * @returns {boolean} Returns `true` if `value` is an array-like object,
  19063. * else `false`.
  19064. * @example
  19065. *
  19066. * _.isArrayLikeObject([1, 2, 3]);
  19067. * // => true
  19068. *
  19069. * _.isArrayLikeObject(document.body.children);
  19070. * // => true
  19071. *
  19072. * _.isArrayLikeObject('abc');
  19073. * // => false
  19074. *
  19075. * _.isArrayLikeObject(_.noop);
  19076. * // => false
  19077. */
  19078. function isArrayLikeObject(value) {
  19079. return isObjectLike(value) && isArrayLike(value);
  19080. }
  19081. /**
  19082. * Checks if `value` is a buffer.
  19083. *
  19084. * @static
  19085. * @memberOf _
  19086. * @since 4.3.0
  19087. * @category Lang
  19088. * @param {*} value The value to check.
  19089. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
  19090. * @example
  19091. *
  19092. * _.isBuffer(new Buffer(2));
  19093. * // => true
  19094. *
  19095. * _.isBuffer(new Uint8Array(2));
  19096. * // => false
  19097. */
  19098. var isBuffer = nativeIsBuffer || stubFalse;
  19099. /**
  19100. * Checks if `value` is classified as a `Function` object.
  19101. *
  19102. * @static
  19103. * @memberOf _
  19104. * @since 0.1.0
  19105. * @category Lang
  19106. * @param {*} value The value to check.
  19107. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  19108. * @example
  19109. *
  19110. * _.isFunction(_);
  19111. * // => true
  19112. *
  19113. * _.isFunction(/abc/);
  19114. * // => false
  19115. */
  19116. function isFunction(value) {
  19117. if (!isObject(value)) {
  19118. return false;
  19119. }
  19120. // The use of `Object#toString` avoids issues with the `typeof` operator
  19121. // in Safari 9 which returns 'object' for typed arrays and other constructors.
  19122. var tag = baseGetTag(value);
  19123. return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
  19124. }
  19125. /**
  19126. * Checks if `value` is a valid array-like length.
  19127. *
  19128. * **Note:** This method is loosely based on
  19129. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  19130. *
  19131. * @static
  19132. * @memberOf _
  19133. * @since 4.0.0
  19134. * @category Lang
  19135. * @param {*} value The value to check.
  19136. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  19137. * @example
  19138. *
  19139. * _.isLength(3);
  19140. * // => true
  19141. *
  19142. * _.isLength(Number.MIN_VALUE);
  19143. * // => false
  19144. *
  19145. * _.isLength(Infinity);
  19146. * // => false
  19147. *
  19148. * _.isLength('3');
  19149. * // => false
  19150. */
  19151. function isLength(value) {
  19152. return typeof value == 'number' &&
  19153. value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  19154. }
  19155. /**
  19156. * Checks if `value` is the
  19157. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  19158. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  19159. *
  19160. * @static
  19161. * @memberOf _
  19162. * @since 0.1.0
  19163. * @category Lang
  19164. * @param {*} value The value to check.
  19165. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  19166. * @example
  19167. *
  19168. * _.isObject({});
  19169. * // => true
  19170. *
  19171. * _.isObject([1, 2, 3]);
  19172. * // => true
  19173. *
  19174. * _.isObject(_.noop);
  19175. * // => true
  19176. *
  19177. * _.isObject(null);
  19178. * // => false
  19179. */
  19180. function isObject(value) {
  19181. var type = typeof value;
  19182. return value != null && (type == 'object' || type == 'function');
  19183. }
  19184. /**
  19185. * Checks if `value` is object-like. A value is object-like if it's not `null`
  19186. * and has a `typeof` result of "object".
  19187. *
  19188. * @static
  19189. * @memberOf _
  19190. * @since 4.0.0
  19191. * @category Lang
  19192. * @param {*} value The value to check.
  19193. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  19194. * @example
  19195. *
  19196. * _.isObjectLike({});
  19197. * // => true
  19198. *
  19199. * _.isObjectLike([1, 2, 3]);
  19200. * // => true
  19201. *
  19202. * _.isObjectLike(_.noop);
  19203. * // => false
  19204. *
  19205. * _.isObjectLike(null);
  19206. * // => false
  19207. */
  19208. function isObjectLike(value) {
  19209. return value != null && typeof value == 'object';
  19210. }
  19211. /**
  19212. * Checks if `value` is a plain object, that is, an object created by the
  19213. * `Object` constructor or one with a `[[Prototype]]` of `null`.
  19214. *
  19215. * @static
  19216. * @memberOf _
  19217. * @since 0.8.0
  19218. * @category Lang
  19219. * @param {*} value The value to check.
  19220. * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
  19221. * @example
  19222. *
  19223. * function Foo() {
  19224. * this.a = 1;
  19225. * }
  19226. *
  19227. * _.isPlainObject(new Foo);
  19228. * // => false
  19229. *
  19230. * _.isPlainObject([1, 2, 3]);
  19231. * // => false
  19232. *
  19233. * _.isPlainObject({ 'x': 0, 'y': 0 });
  19234. * // => true
  19235. *
  19236. * _.isPlainObject(Object.create(null));
  19237. * // => true
  19238. */
  19239. function isPlainObject(value) {
  19240. if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
  19241. return false;
  19242. }
  19243. var proto = getPrototype(value);
  19244. if (proto === null) {
  19245. return true;
  19246. }
  19247. var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
  19248. return typeof Ctor == 'function' && Ctor instanceof Ctor &&
  19249. funcToString.call(Ctor) == objectCtorString;
  19250. }
  19251. /**
  19252. * Checks if `value` is classified as a typed array.
  19253. *
  19254. * @static
  19255. * @memberOf _
  19256. * @since 3.0.0
  19257. * @category Lang
  19258. * @param {*} value The value to check.
  19259. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  19260. * @example
  19261. *
  19262. * _.isTypedArray(new Uint8Array);
  19263. * // => true
  19264. *
  19265. * _.isTypedArray([]);
  19266. * // => false
  19267. */
  19268. var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
  19269. /**
  19270. * Converts `value` to a plain object flattening inherited enumerable string
  19271. * keyed properties of `value` to own properties of the plain object.
  19272. *
  19273. * @static
  19274. * @memberOf _
  19275. * @since 3.0.0
  19276. * @category Lang
  19277. * @param {*} value The value to convert.
  19278. * @returns {Object} Returns the converted plain object.
  19279. * @example
  19280. *
  19281. * function Foo() {
  19282. * this.b = 2;
  19283. * }
  19284. *
  19285. * Foo.prototype.c = 3;
  19286. *
  19287. * _.assign({ 'a': 1 }, new Foo);
  19288. * // => { 'a': 1, 'b': 2 }
  19289. *
  19290. * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
  19291. * // => { 'a': 1, 'b': 2, 'c': 3 }
  19292. */
  19293. function toPlainObject(value) {
  19294. return copyObject(value, keysIn(value));
  19295. }
  19296. /**
  19297. * Creates an array of the own and inherited enumerable property names of `object`.
  19298. *
  19299. * **Note:** Non-object values are coerced to objects.
  19300. *
  19301. * @static
  19302. * @memberOf _
  19303. * @since 3.0.0
  19304. * @category Object
  19305. * @param {Object} object The object to query.
  19306. * @returns {Array} Returns the array of property names.
  19307. * @example
  19308. *
  19309. * function Foo() {
  19310. * this.a = 1;
  19311. * this.b = 2;
  19312. * }
  19313. *
  19314. * Foo.prototype.c = 3;
  19315. *
  19316. * _.keysIn(new Foo);
  19317. * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
  19318. */
  19319. function keysIn(object) {
  19320. return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
  19321. }
  19322. /**
  19323. * This method is like `_.assign` except that it recursively merges own and
  19324. * inherited enumerable string keyed properties of source objects into the
  19325. * destination object. Source properties that resolve to `undefined` are
  19326. * skipped if a destination value exists. Array and plain object properties
  19327. * are merged recursively. Other objects and value types are overridden by
  19328. * assignment. Source objects are applied from left to right. Subsequent
  19329. * sources overwrite property assignments of previous sources.
  19330. *
  19331. * **Note:** This method mutates `object`.
  19332. *
  19333. * @static
  19334. * @memberOf _
  19335. * @since 0.5.0
  19336. * @category Object
  19337. * @param {Object} object The destination object.
  19338. * @param {...Object} [sources] The source objects.
  19339. * @returns {Object} Returns `object`.
  19340. * @example
  19341. *
  19342. * var object = {
  19343. * 'a': [{ 'b': 2 }, { 'd': 4 }]
  19344. * };
  19345. *
  19346. * var other = {
  19347. * 'a': [{ 'c': 3 }, { 'e': 5 }]
  19348. * };
  19349. *
  19350. * _.merge(object, other);
  19351. * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
  19352. */
  19353. var merge = createAssigner(function(object, source, srcIndex) {
  19354. baseMerge(object, source, srcIndex);
  19355. });
  19356. /**
  19357. * Creates a function that returns `value`.
  19358. *
  19359. * @static
  19360. * @memberOf _
  19361. * @since 2.4.0
  19362. * @category Util
  19363. * @param {*} value The value to return from the new function.
  19364. * @returns {Function} Returns the new constant function.
  19365. * @example
  19366. *
  19367. * var objects = _.times(2, _.constant({ 'a': 1 }));
  19368. *
  19369. * console.log(objects);
  19370. * // => [{ 'a': 1 }, { 'a': 1 }]
  19371. *
  19372. * console.log(objects[0] === objects[1]);
  19373. * // => true
  19374. */
  19375. function constant(value) {
  19376. return function() {
  19377. return value;
  19378. };
  19379. }
  19380. /**
  19381. * This method returns the first argument it receives.
  19382. *
  19383. * @static
  19384. * @since 0.1.0
  19385. * @memberOf _
  19386. * @category Util
  19387. * @param {*} value Any value.
  19388. * @returns {*} Returns `value`.
  19389. * @example
  19390. *
  19391. * var object = { 'a': 1 };
  19392. *
  19393. * console.log(_.identity(object) === object);
  19394. * // => true
  19395. */
  19396. function identity(value) {
  19397. return value;
  19398. }
  19399. /**
  19400. * This method returns `false`.
  19401. *
  19402. * @static
  19403. * @memberOf _
  19404. * @since 4.13.0
  19405. * @category Util
  19406. * @returns {boolean} Returns `false`.
  19407. * @example
  19408. *
  19409. * _.times(2, _.stubFalse);
  19410. * // => [false, false]
  19411. */
  19412. function stubFalse() {
  19413. return false;
  19414. }
  19415. module.exports = merge;
  19416. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("698d"), __webpack_require__("f586")(module)))
  19417. /***/ }),
  19418. /***/ "6ed2":
  19419. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  19420. "use strict";
  19421. __webpack_require__.r(__webpack_exports__);
  19422. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Iframe_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("f3da");
  19423. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Iframe_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Iframe_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
  19424. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Iframe_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Iframe_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  19425. /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Iframe_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
  19426. /***/ }),
  19427. /***/ "6f27":
  19428. /***/ (function(module, exports, __webpack_require__) {
  19429. "use strict";
  19430. var _interopRequireDefault = __webpack_require__("8e6d");
  19431. Object.defineProperty(exports, "__esModule", {
  19432. value: true
  19433. });
  19434. exports.default = void 0;
  19435. var _leaflet = _interopRequireDefault(__webpack_require__("73e4"));
  19436. // @property lastId: Number
  19437. // Last unique ID used by [`stamp()`](#util-stamp)
  19438. var lastId = 0; // @function stamp(obj: Object): Number
  19439. // Returns the unique ID of an object, assigning it one if it doesn't have it.
  19440. function stamp(obj) {
  19441. /*eslint-disable */
  19442. obj._leaflet_id = obj._leaflet_id || ++lastId;
  19443. return obj._leaflet_id;
  19444. /* eslint-enable */
  19445. }
  19446. _leaflet.default.Map.prototype.addLayer = function (layer, name) {
  19447. if (!layer._layerAdd) {
  19448. throw new Error('The provided object is not a Layer.');
  19449. }
  19450. var id = stamp(layer); // 如果layer已存在,返回this
  19451. if (this._layers[id] || this._layers[name]) {
  19452. return this;
  19453. } // 如果用户没有传入name,就生成一个name
  19454. if (!name) {
  19455. name = 'sm-custom' + id;
  19456. } // 如果该name已存在,就生成新的name
  19457. if (this._layers[name]) {
  19458. this.fire('addLayerFailed', 'layer name重复,请输入唯一的name');
  19459. return this;
  19460. } // 将layer和name添加到layersOnMap
  19461. layer.name = name; // 不要将featureLayer加入layersOnMap
  19462. // let _layersId = {};
  19463. // for (let key in this._layers) {
  19464. // if (this._layers[key]._layers) {
  19465. // _layersId[key] = [];
  19466. // for (let key2 in this._layers[key]._layers) {
  19467. // _layersId[key].push(key2);
  19468. // }
  19469. // }
  19470. // }
  19471. // let layersOnMapFlag = true;
  19472. // for (let key in _layersId) {
  19473. // if (_layersId[key].indexOf(id + '') > -1) {
  19474. // layersOnMapFlag = false;
  19475. // }
  19476. // }
  19477. if (!this.layersOnMap) {
  19478. this.layersOnMap = [];
  19479. }
  19480. this.layersOnMap.push({
  19481. name: name,
  19482. layer: layer
  19483. }); // if (layersOnMapFlag) {
  19484. // this.layersOnMap.push({ name, layer });
  19485. // }
  19486. this._layers[id] = layer;
  19487. layer._mapToAdd = this;
  19488. if (layer.beforeAdd) {
  19489. layer.beforeAdd(this);
  19490. }
  19491. this.whenReady(layer._layerAdd, layer);
  19492. return this;
  19493. };
  19494. _leaflet.default.Map.prototype.removeLayer = function (layer, name) {
  19495. // 重新构造layersOnMap
  19496. this.layersOnMap = this.layersOnMap.filter(function (l) {
  19497. return l.name !== (layer.name || name);
  19498. }); // 如果是传入图层,就用图层id; 如果传入name,通过name去获取图层id
  19499. var id = stamp(layer) || this._layers[name].id;
  19500. if (!this._layers[id]) {
  19501. return this;
  19502. }
  19503. if (this._loaded) {
  19504. layer.onRemove(this);
  19505. }
  19506. if (layer.getAttribution && this.attributionControl) {
  19507. this.attributionControl.removeAttribution(layer.getAttribution());
  19508. }
  19509. delete this._layers[id];
  19510. if (this._loaded) {
  19511. this.fire('layerremove', {
  19512. layer: layer,
  19513. name: name
  19514. });
  19515. layer.fire('remove');
  19516. }
  19517. layer._map = layer._mapToAdd = null;
  19518. return this;
  19519. };
  19520. _leaflet.default.Map.include({
  19521. getLayersOnMap: function getLayersOnMap() {
  19522. return this.layersOnMap;
  19523. },
  19524. getLayerById: function getLayerById(id) {
  19525. return this._layers[id];
  19526. },
  19527. getLayerByName: function getLayerByName(name) {
  19528. for (var key in this._layers) {
  19529. if (name === this._layers[key].name) {
  19530. return this._layers[key];
  19531. }
  19532. }
  19533. },
  19534. getAllLayers: function getAllLayers() {
  19535. return this._layers;
  19536. }
  19537. });
  19538. delete _leaflet.default.Icon.Default.prototype._getIconUrl;
  19539. _leaflet.default.Icon.Default.mergeOptions({
  19540. iconRetinaUrl: __webpack_require__("2411"),
  19541. iconUrl: __webpack_require__("fd74"),
  19542. shadowUrl: __webpack_require__("5df1")
  19543. });
  19544. window.L = _leaflet.default;
  19545. var _default = _leaflet.default;
  19546. exports.default = _default;
  19547. /***/ }),
  19548. /***/ "717b":
  19549. /***/ (function(module, exports, __webpack_require__) {
  19550. // extracted by mini-css-extract-plugin
  19551. /***/ }),
  19552. /***/ "7319":
  19553. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  19554. "use strict";
  19555. __webpack_require__.r(__webpack_exports__);
  19556. // CONCATENATED MODULE: ./node_modules/proj4/lib/global.js
  19557. /* harmony default export */ var global = (function(defs) {
  19558. defs('EPSG:4326', "+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees");
  19559. defs('EPSG:4269', "+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees");
  19560. defs('EPSG:3857', "+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");
  19561. defs.WGS84 = defs['EPSG:4326'];
  19562. defs['EPSG:3785'] = defs['EPSG:3857']; // maintain backward compat, official code is 3857
  19563. defs.GOOGLE = defs['EPSG:3857'];
  19564. defs['EPSG:900913'] = defs['EPSG:3857'];
  19565. defs['EPSG:102113'] = defs['EPSG:3857'];
  19566. });
  19567. // CONCATENATED MODULE: ./node_modules/proj4/lib/constants/values.js
  19568. var PJD_3PARAM = 1;
  19569. var PJD_7PARAM = 2;
  19570. var PJD_WGS84 = 4; // WGS84 or equivalent
  19571. var PJD_NODATUM = 5; // WGS84 or equivalent
  19572. var SEC_TO_RAD = 4.84813681109535993589914102357e-6;
  19573. var HALF_PI = Math.PI/2;
  19574. // ellipoid pj_set_ell.c
  19575. var SIXTH = 0.1666666666666666667;
  19576. /* 1/6 */
  19577. var RA4 = 0.04722222222222222222;
  19578. /* 17/360 */
  19579. var RA6 = 0.02215608465608465608;
  19580. var EPSLN = 1.0e-10;
  19581. // you'd think you could use Number.EPSILON above but that makes
  19582. // Mollweide get into an infinate loop.
  19583. var D2R = 0.01745329251994329577;
  19584. var R2D = 57.29577951308232088;
  19585. var FORTPI = Math.PI/4;
  19586. var TWO_PI = Math.PI * 2;
  19587. // SPI is slightly greater than Math.PI, so values that exceed the -180..180
  19588. // degree range by a tiny amount don't get wrapped. This prevents points that
  19589. // have drifted from their original location along the 180th meridian (due to
  19590. // floating point error) from changing their sign.
  19591. var SPI = 3.14159265359;
  19592. // CONCATENATED MODULE: ./node_modules/proj4/lib/constants/PrimeMeridian.js
  19593. var PrimeMeridian_exports = {};
  19594. PrimeMeridian_exports.greenwich = 0.0; //"0dE",
  19595. PrimeMeridian_exports.lisbon = -9.131906111111; //"9d07'54.862\"W",
  19596. PrimeMeridian_exports.paris = 2.337229166667; //"2d20'14.025\"E",
  19597. PrimeMeridian_exports.bogota = -74.080916666667; //"74d04'51.3\"W",
  19598. PrimeMeridian_exports.madrid = -3.687938888889; //"3d41'16.58\"W",
  19599. PrimeMeridian_exports.rome = 12.452333333333; //"12d27'8.4\"E",
  19600. PrimeMeridian_exports.bern = 7.439583333333; //"7d26'22.5\"E",
  19601. PrimeMeridian_exports.jakarta = 106.807719444444; //"106d48'27.79\"E",
  19602. PrimeMeridian_exports.ferro = -17.666666666667; //"17d40'W",
  19603. PrimeMeridian_exports.brussels = 4.367975; //"4d22'4.71\"E",
  19604. PrimeMeridian_exports.stockholm = 18.058277777778; //"18d3'29.8\"E",
  19605. PrimeMeridian_exports.athens = 23.7163375; //"23d42'58.815\"E",
  19606. PrimeMeridian_exports.oslo = 10.722916666667; //"10d43'22.5\"E"
  19607. // CONCATENATED MODULE: ./node_modules/proj4/lib/constants/units.js
  19608. /* harmony default export */ var units = ({
  19609. ft: {to_meter: 0.3048},
  19610. 'us-ft': {to_meter: 1200 / 3937}
  19611. });
  19612. // CONCATENATED MODULE: ./node_modules/proj4/lib/match.js
  19613. var ignoredChar = /[\s_\-\/\(\)]/g;
  19614. function match(obj, key) {
  19615. if (obj[key]) {
  19616. return obj[key];
  19617. }
  19618. var keys = Object.keys(obj);
  19619. var lkey = key.toLowerCase().replace(ignoredChar, '');
  19620. var i = -1;
  19621. var testkey, processedKey;
  19622. while (++i < keys.length) {
  19623. testkey = keys[i];
  19624. processedKey = testkey.toLowerCase().replace(ignoredChar, '');
  19625. if (processedKey === lkey) {
  19626. return obj[testkey];
  19627. }
  19628. }
  19629. }
  19630. // CONCATENATED MODULE: ./node_modules/proj4/lib/projString.js
  19631. /* harmony default export */ var projString = (function(defData) {
  19632. var self = {};
  19633. var paramObj = defData.split('+').map(function(v) {
  19634. return v.trim();
  19635. }).filter(function(a) {
  19636. return a;
  19637. }).reduce(function(p, a) {
  19638. var split = a.split('=');
  19639. split.push(true);
  19640. p[split[0].toLowerCase()] = split[1];
  19641. return p;
  19642. }, {});
  19643. var paramName, paramVal, paramOutname;
  19644. var params = {
  19645. proj: 'projName',
  19646. datum: 'datumCode',
  19647. rf: function(v) {
  19648. self.rf = parseFloat(v);
  19649. },
  19650. lat_0: function(v) {
  19651. self.lat0 = v * D2R;
  19652. },
  19653. lat_1: function(v) {
  19654. self.lat1 = v * D2R;
  19655. },
  19656. lat_2: function(v) {
  19657. self.lat2 = v * D2R;
  19658. },
  19659. lat_ts: function(v) {
  19660. self.lat_ts = v * D2R;
  19661. },
  19662. lon_0: function(v) {
  19663. self.long0 = v * D2R;
  19664. },
  19665. lon_1: function(v) {
  19666. self.long1 = v * D2R;
  19667. },
  19668. lon_2: function(v) {
  19669. self.long2 = v * D2R;
  19670. },
  19671. alpha: function(v) {
  19672. self.alpha = parseFloat(v) * D2R;
  19673. },
  19674. lonc: function(v) {
  19675. self.longc = v * D2R;
  19676. },
  19677. x_0: function(v) {
  19678. self.x0 = parseFloat(v);
  19679. },
  19680. y_0: function(v) {
  19681. self.y0 = parseFloat(v);
  19682. },
  19683. k_0: function(v) {
  19684. self.k0 = parseFloat(v);
  19685. },
  19686. k: function(v) {
  19687. self.k0 = parseFloat(v);
  19688. },
  19689. a: function(v) {
  19690. self.a = parseFloat(v);
  19691. },
  19692. b: function(v) {
  19693. self.b = parseFloat(v);
  19694. },
  19695. r_a: function() {
  19696. self.R_A = true;
  19697. },
  19698. zone: function(v) {
  19699. self.zone = parseInt(v, 10);
  19700. },
  19701. south: function() {
  19702. self.utmSouth = true;
  19703. },
  19704. towgs84: function(v) {
  19705. self.datum_params = v.split(",").map(function(a) {
  19706. return parseFloat(a);
  19707. });
  19708. },
  19709. to_meter: function(v) {
  19710. self.to_meter = parseFloat(v);
  19711. },
  19712. units: function(v) {
  19713. self.units = v;
  19714. var unit = match(units, v);
  19715. if (unit) {
  19716. self.to_meter = unit.to_meter;
  19717. }
  19718. },
  19719. from_greenwich: function(v) {
  19720. self.from_greenwich = v * D2R;
  19721. },
  19722. pm: function(v) {
  19723. var pm = match(PrimeMeridian_exports, v);
  19724. self.from_greenwich = (pm ? pm : parseFloat(v)) * D2R;
  19725. },
  19726. nadgrids: function(v) {
  19727. if (v === '@null') {
  19728. self.datumCode = 'none';
  19729. }
  19730. else {
  19731. self.nadgrids = v;
  19732. }
  19733. },
  19734. axis: function(v) {
  19735. var legalAxis = "ewnsud";
  19736. if (v.length === 3 && legalAxis.indexOf(v.substr(0, 1)) !== -1 && legalAxis.indexOf(v.substr(1, 1)) !== -1 && legalAxis.indexOf(v.substr(2, 1)) !== -1) {
  19737. self.axis = v;
  19738. }
  19739. }
  19740. };
  19741. for (paramName in paramObj) {
  19742. paramVal = paramObj[paramName];
  19743. if (paramName in params) {
  19744. paramOutname = params[paramName];
  19745. if (typeof paramOutname === 'function') {
  19746. paramOutname(paramVal);
  19747. }
  19748. else {
  19749. self[paramOutname] = paramVal;
  19750. }
  19751. }
  19752. else {
  19753. self[paramName] = paramVal;
  19754. }
  19755. }
  19756. if(typeof self.datumCode === 'string' && self.datumCode !== "WGS84"){
  19757. self.datumCode = self.datumCode.toLowerCase();
  19758. }
  19759. return self;
  19760. });
  19761. // CONCATENATED MODULE: ./node_modules/wkt-parser/parser.js
  19762. /* harmony default export */ var parser = (parseString);
  19763. var NEUTRAL = 1;
  19764. var KEYWORD = 2;
  19765. var NUMBER = 3;
  19766. var QUOTED = 4;
  19767. var AFTERQUOTE = 5;
  19768. var ENDED = -1;
  19769. var whitespace = /\s/;
  19770. var latin = /[A-Za-z]/;
  19771. var keyword = /[A-Za-z84]/;
  19772. var endThings = /[,\]]/;
  19773. var digets = /[\d\.E\-\+]/;
  19774. // const ignoredChar = /[\s_\-\/\(\)]/g;
  19775. function Parser(text) {
  19776. if (typeof text !== 'string') {
  19777. throw new Error('not a string');
  19778. }
  19779. this.text = text.trim();
  19780. this.level = 0;
  19781. this.place = 0;
  19782. this.root = null;
  19783. this.stack = [];
  19784. this.currentObject = null;
  19785. this.state = NEUTRAL;
  19786. }
  19787. Parser.prototype.readCharicter = function() {
  19788. var char = this.text[this.place++];
  19789. if (this.state !== QUOTED) {
  19790. while (whitespace.test(char)) {
  19791. if (this.place >= this.text.length) {
  19792. return;
  19793. }
  19794. char = this.text[this.place++];
  19795. }
  19796. }
  19797. switch (this.state) {
  19798. case NEUTRAL:
  19799. return this.neutral(char);
  19800. case KEYWORD:
  19801. return this.keyword(char)
  19802. case QUOTED:
  19803. return this.quoted(char);
  19804. case AFTERQUOTE:
  19805. return this.afterquote(char);
  19806. case NUMBER:
  19807. return this.number(char);
  19808. case ENDED:
  19809. return;
  19810. }
  19811. };
  19812. Parser.prototype.afterquote = function(char) {
  19813. if (char === '"') {
  19814. this.word += '"';
  19815. this.state = QUOTED;
  19816. return;
  19817. }
  19818. if (endThings.test(char)) {
  19819. this.word = this.word.trim();
  19820. this.afterItem(char);
  19821. return;
  19822. }
  19823. throw new Error('havn\'t handled "' +char + '" in afterquote yet, index ' + this.place);
  19824. };
  19825. Parser.prototype.afterItem = function(char) {
  19826. if (char === ',') {
  19827. if (this.word !== null) {
  19828. this.currentObject.push(this.word);
  19829. }
  19830. this.word = null;
  19831. this.state = NEUTRAL;
  19832. return;
  19833. }
  19834. if (char === ']') {
  19835. this.level--;
  19836. if (this.word !== null) {
  19837. this.currentObject.push(this.word);
  19838. this.word = null;
  19839. }
  19840. this.state = NEUTRAL;
  19841. this.currentObject = this.stack.pop();
  19842. if (!this.currentObject) {
  19843. this.state = ENDED;
  19844. }
  19845. return;
  19846. }
  19847. };
  19848. Parser.prototype.number = function(char) {
  19849. if (digets.test(char)) {
  19850. this.word += char;
  19851. return;
  19852. }
  19853. if (endThings.test(char)) {
  19854. this.word = parseFloat(this.word);
  19855. this.afterItem(char);
  19856. return;
  19857. }
  19858. throw new Error('havn\'t handled "' +char + '" in number yet, index ' + this.place);
  19859. };
  19860. Parser.prototype.quoted = function(char) {
  19861. if (char === '"') {
  19862. this.state = AFTERQUOTE;
  19863. return;
  19864. }
  19865. this.word += char;
  19866. return;
  19867. };
  19868. Parser.prototype.keyword = function(char) {
  19869. if (keyword.test(char)) {
  19870. this.word += char;
  19871. return;
  19872. }
  19873. if (char === '[') {
  19874. var newObjects = [];
  19875. newObjects.push(this.word);
  19876. this.level++;
  19877. if (this.root === null) {
  19878. this.root = newObjects;
  19879. } else {
  19880. this.currentObject.push(newObjects);
  19881. }
  19882. this.stack.push(this.currentObject);
  19883. this.currentObject = newObjects;
  19884. this.state = NEUTRAL;
  19885. return;
  19886. }
  19887. if (endThings.test(char)) {
  19888. this.afterItem(char);
  19889. return;
  19890. }
  19891. throw new Error('havn\'t handled "' +char + '" in keyword yet, index ' + this.place);
  19892. };
  19893. Parser.prototype.neutral = function(char) {
  19894. if (latin.test(char)) {
  19895. this.word = char;
  19896. this.state = KEYWORD;
  19897. return;
  19898. }
  19899. if (char === '"') {
  19900. this.word = '';
  19901. this.state = QUOTED;
  19902. return;
  19903. }
  19904. if (digets.test(char)) {
  19905. this.word = char;
  19906. this.state = NUMBER;
  19907. return;
  19908. }
  19909. if (endThings.test(char)) {
  19910. this.afterItem(char);
  19911. return;
  19912. }
  19913. throw new Error('havn\'t handled "' +char + '" in neutral yet, index ' + this.place);
  19914. };
  19915. Parser.prototype.output = function() {
  19916. while (this.place < this.text.length) {
  19917. this.readCharicter();
  19918. }
  19919. if (this.state === ENDED) {
  19920. return this.root;
  19921. }
  19922. throw new Error('unable to parse string "' +this.text + '". State is ' + this.state);
  19923. };
  19924. function parseString(txt) {
  19925. var parser = new Parser(txt);
  19926. return parser.output();
  19927. }
  19928. // CONCATENATED MODULE: ./node_modules/wkt-parser/process.js
  19929. function mapit(obj, key, value) {
  19930. if (Array.isArray(key)) {
  19931. value.unshift(key);
  19932. key = null;
  19933. }
  19934. var thing = key ? {} : obj;
  19935. var out = value.reduce(function(newObj, item) {
  19936. sExpr(item, newObj);
  19937. return newObj
  19938. }, thing);
  19939. if (key) {
  19940. obj[key] = out;
  19941. }
  19942. }
  19943. function sExpr(v, obj) {
  19944. if (!Array.isArray(v)) {
  19945. obj[v] = true;
  19946. return;
  19947. }
  19948. var key = v.shift();
  19949. if (key === 'PARAMETER') {
  19950. key = v.shift();
  19951. }
  19952. if (v.length === 1) {
  19953. if (Array.isArray(v[0])) {
  19954. obj[key] = {};
  19955. sExpr(v[0], obj[key]);
  19956. return;
  19957. }
  19958. obj[key] = v[0];
  19959. return;
  19960. }
  19961. if (!v.length) {
  19962. obj[key] = true;
  19963. return;
  19964. }
  19965. if (key === 'TOWGS84') {
  19966. obj[key] = v;
  19967. return;
  19968. }
  19969. if (!Array.isArray(key)) {
  19970. obj[key] = {};
  19971. }
  19972. var i;
  19973. switch (key) {
  19974. case 'UNIT':
  19975. case 'PRIMEM':
  19976. case 'VERT_DATUM':
  19977. obj[key] = {
  19978. name: v[0].toLowerCase(),
  19979. convert: v[1]
  19980. };
  19981. if (v.length === 3) {
  19982. sExpr(v[2], obj[key]);
  19983. }
  19984. return;
  19985. case 'SPHEROID':
  19986. case 'ELLIPSOID':
  19987. obj[key] = {
  19988. name: v[0],
  19989. a: v[1],
  19990. rf: v[2]
  19991. };
  19992. if (v.length === 4) {
  19993. sExpr(v[3], obj[key]);
  19994. }
  19995. return;
  19996. case 'PROJECTEDCRS':
  19997. case 'PROJCRS':
  19998. case 'GEOGCS':
  19999. case 'GEOCCS':
  20000. case 'PROJCS':
  20001. case 'LOCAL_CS':
  20002. case 'GEODCRS':
  20003. case 'GEODETICCRS':
  20004. case 'GEODETICDATUM':
  20005. case 'EDATUM':
  20006. case 'ENGINEERINGDATUM':
  20007. case 'VERT_CS':
  20008. case 'VERTCRS':
  20009. case 'VERTICALCRS':
  20010. case 'COMPD_CS':
  20011. case 'COMPOUNDCRS':
  20012. case 'ENGINEERINGCRS':
  20013. case 'ENGCRS':
  20014. case 'FITTED_CS':
  20015. case 'LOCAL_DATUM':
  20016. case 'DATUM':
  20017. v[0] = ['name', v[0]];
  20018. mapit(obj, key, v);
  20019. return;
  20020. default:
  20021. i = -1;
  20022. while (++i < v.length) {
  20023. if (!Array.isArray(v[i])) {
  20024. return sExpr(v, obj[key]);
  20025. }
  20026. }
  20027. return mapit(obj, key, v);
  20028. }
  20029. }
  20030. // CONCATENATED MODULE: ./node_modules/wkt-parser/index.js
  20031. var wkt_parser_D2R = 0.01745329251994329577;
  20032. function rename(obj, params) {
  20033. var outName = params[0];
  20034. var inName = params[1];
  20035. if (!(outName in obj) && (inName in obj)) {
  20036. obj[outName] = obj[inName];
  20037. if (params.length === 3) {
  20038. obj[outName] = params[2](obj[outName]);
  20039. }
  20040. }
  20041. }
  20042. function d2r(input) {
  20043. return input * wkt_parser_D2R;
  20044. }
  20045. function cleanWKT(wkt) {
  20046. if (wkt.type === 'GEOGCS') {
  20047. wkt.projName = 'longlat';
  20048. } else if (wkt.type === 'LOCAL_CS') {
  20049. wkt.projName = 'identity';
  20050. wkt.local = true;
  20051. } else {
  20052. if (typeof wkt.PROJECTION === 'object') {
  20053. wkt.projName = Object.keys(wkt.PROJECTION)[0];
  20054. } else {
  20055. wkt.projName = wkt.PROJECTION;
  20056. }
  20057. }
  20058. if (wkt.UNIT) {
  20059. wkt.units = wkt.UNIT.name.toLowerCase();
  20060. if (wkt.units === 'metre') {
  20061. wkt.units = 'meter';
  20062. }
  20063. if (wkt.UNIT.convert) {
  20064. if (wkt.type === 'GEOGCS') {
  20065. if (wkt.DATUM && wkt.DATUM.SPHEROID) {
  20066. wkt.to_meter = wkt.UNIT.convert*wkt.DATUM.SPHEROID.a;
  20067. }
  20068. } else {
  20069. wkt.to_meter = wkt.UNIT.convert;
  20070. }
  20071. }
  20072. }
  20073. var geogcs = wkt.GEOGCS;
  20074. if (wkt.type === 'GEOGCS') {
  20075. geogcs = wkt;
  20076. }
  20077. if (geogcs) {
  20078. //if(wkt.GEOGCS.PRIMEM&&wkt.GEOGCS.PRIMEM.convert){
  20079. // wkt.from_greenwich=wkt.GEOGCS.PRIMEM.convert*D2R;
  20080. //}
  20081. if (geogcs.DATUM) {
  20082. wkt.datumCode = geogcs.DATUM.name.toLowerCase();
  20083. } else {
  20084. wkt.datumCode = geogcs.name.toLowerCase();
  20085. }
  20086. if (wkt.datumCode.slice(0, 2) === 'd_') {
  20087. wkt.datumCode = wkt.datumCode.slice(2);
  20088. }
  20089. if (wkt.datumCode === 'new_zealand_geodetic_datum_1949' || wkt.datumCode === 'new_zealand_1949') {
  20090. wkt.datumCode = 'nzgd49';
  20091. }
  20092. if (wkt.datumCode === 'wgs_1984') {
  20093. if (wkt.PROJECTION === 'Mercator_Auxiliary_Sphere') {
  20094. wkt.sphere = true;
  20095. }
  20096. wkt.datumCode = 'wgs84';
  20097. }
  20098. if (wkt.datumCode.slice(-6) === '_ferro') {
  20099. wkt.datumCode = wkt.datumCode.slice(0, - 6);
  20100. }
  20101. if (wkt.datumCode.slice(-8) === '_jakarta') {
  20102. wkt.datumCode = wkt.datumCode.slice(0, - 8);
  20103. }
  20104. if (~wkt.datumCode.indexOf('belge')) {
  20105. wkt.datumCode = 'rnb72';
  20106. }
  20107. if (geogcs.DATUM && geogcs.DATUM.SPHEROID) {
  20108. wkt.ellps = geogcs.DATUM.SPHEROID.name.replace('_19', '').replace(/[Cc]larke\_18/, 'clrk');
  20109. if (wkt.ellps.toLowerCase().slice(0, 13) === 'international') {
  20110. wkt.ellps = 'intl';
  20111. }
  20112. wkt.a = geogcs.DATUM.SPHEROID.a;
  20113. wkt.rf = parseFloat(geogcs.DATUM.SPHEROID.rf, 10);
  20114. }
  20115. if (geogcs.DATUM && geogcs.DATUM.TOWGS84) {
  20116. wkt.datum_params = geogcs.DATUM.TOWGS84;
  20117. }
  20118. if (~wkt.datumCode.indexOf('osgb_1936')) {
  20119. wkt.datumCode = 'osgb36';
  20120. }
  20121. if (~wkt.datumCode.indexOf('osni_1952')) {
  20122. wkt.datumCode = 'osni52';
  20123. }
  20124. if (~wkt.datumCode.indexOf('tm65')
  20125. || ~wkt.datumCode.indexOf('geodetic_datum_of_1965')) {
  20126. wkt.datumCode = 'ire65';
  20127. }
  20128. if (wkt.datumCode === 'ch1903+') {
  20129. wkt.datumCode = 'ch1903';
  20130. }
  20131. if (~wkt.datumCode.indexOf('israel')) {
  20132. wkt.datumCode = 'isr93';
  20133. }
  20134. }
  20135. if (wkt.b && !isFinite(wkt.b)) {
  20136. wkt.b = wkt.a;
  20137. }
  20138. function toMeter(input) {
  20139. var ratio = wkt.to_meter || 1;
  20140. return input * ratio;
  20141. }
  20142. var renamer = function(a) {
  20143. return rename(wkt, a);
  20144. };
  20145. var list = [
  20146. ['standard_parallel_1', 'Standard_Parallel_1'],
  20147. ['standard_parallel_2', 'Standard_Parallel_2'],
  20148. ['false_easting', 'False_Easting'],
  20149. ['false_northing', 'False_Northing'],
  20150. ['central_meridian', 'Central_Meridian'],
  20151. ['latitude_of_origin', 'Latitude_Of_Origin'],
  20152. ['latitude_of_origin', 'Central_Parallel'],
  20153. ['scale_factor', 'Scale_Factor'],
  20154. ['k0', 'scale_factor'],
  20155. ['latitude_of_center', 'Latitude_Of_Center'],
  20156. ['latitude_of_center', 'Latitude_of_center'],
  20157. ['lat0', 'latitude_of_center', d2r],
  20158. ['longitude_of_center', 'Longitude_Of_Center'],
  20159. ['longitude_of_center', 'Longitude_of_center'],
  20160. ['longc', 'longitude_of_center', d2r],
  20161. ['x0', 'false_easting', toMeter],
  20162. ['y0', 'false_northing', toMeter],
  20163. ['long0', 'central_meridian', d2r],
  20164. ['lat0', 'latitude_of_origin', d2r],
  20165. ['lat0', 'standard_parallel_1', d2r],
  20166. ['lat1', 'standard_parallel_1', d2r],
  20167. ['lat2', 'standard_parallel_2', d2r],
  20168. ['azimuth', 'Azimuth'],
  20169. ['alpha', 'azimuth', d2r],
  20170. ['srsCode', 'name']
  20171. ];
  20172. list.forEach(renamer);
  20173. if (!wkt.long0 && wkt.longc && (wkt.projName === 'Albers_Conic_Equal_Area' || wkt.projName === 'Lambert_Azimuthal_Equal_Area')) {
  20174. wkt.long0 = wkt.longc;
  20175. }
  20176. if (!wkt.lat_ts && wkt.lat1 && (wkt.projName === 'Stereographic_South_Pole' || wkt.projName === 'Polar Stereographic (variant B)')) {
  20177. wkt.lat0 = d2r(wkt.lat1 > 0 ? 90 : -90);
  20178. wkt.lat_ts = wkt.lat1;
  20179. }
  20180. }
  20181. /* harmony default export */ var wkt_parser = (function(wkt) {
  20182. var lisp = parser(wkt);
  20183. var type = lisp.shift();
  20184. var name = lisp.shift();
  20185. lisp.unshift(['name', name]);
  20186. lisp.unshift(['type', type]);
  20187. var obj = {};
  20188. sExpr(lisp, obj);
  20189. cleanWKT(obj);
  20190. return obj;
  20191. });
  20192. // CONCATENATED MODULE: ./node_modules/proj4/lib/defs.js
  20193. function defs(name) {
  20194. /*global console*/
  20195. var that = this;
  20196. if (arguments.length === 2) {
  20197. var def = arguments[1];
  20198. if (typeof def === 'string') {
  20199. if (def.charAt(0) === '+') {
  20200. defs[name] = projString(arguments[1]);
  20201. }
  20202. else {
  20203. defs[name] = wkt_parser(arguments[1]);
  20204. }
  20205. } else {
  20206. defs[name] = def;
  20207. }
  20208. }
  20209. else if (arguments.length === 1) {
  20210. if (Array.isArray(name)) {
  20211. return name.map(function(v) {
  20212. if (Array.isArray(v)) {
  20213. defs.apply(that, v);
  20214. }
  20215. else {
  20216. defs(v);
  20217. }
  20218. });
  20219. }
  20220. else if (typeof name === 'string') {
  20221. if (name in defs) {
  20222. return defs[name];
  20223. }
  20224. }
  20225. else if ('EPSG' in name) {
  20226. defs['EPSG:' + name.EPSG] = name;
  20227. }
  20228. else if ('ESRI' in name) {
  20229. defs['ESRI:' + name.ESRI] = name;
  20230. }
  20231. else if ('IAU2000' in name) {
  20232. defs['IAU2000:' + name.IAU2000] = name;
  20233. }
  20234. else {
  20235. console.log(name);
  20236. }
  20237. return;
  20238. }
  20239. }
  20240. global(defs);
  20241. /* harmony default export */ var lib_defs = (defs);
  20242. // CONCATENATED MODULE: ./node_modules/proj4/lib/parseCode.js
  20243. function testObj(code){
  20244. return typeof code === 'string';
  20245. }
  20246. function testDef(code){
  20247. return code in lib_defs;
  20248. }
  20249. var codeWords = ['PROJECTEDCRS', 'PROJCRS', 'GEOGCS','GEOCCS','PROJCS','LOCAL_CS', 'GEODCRS', 'GEODETICCRS', 'GEODETICDATUM', 'ENGCRS', 'ENGINEERINGCRS'];
  20250. function testWKT(code){
  20251. return codeWords.some(function (word) {
  20252. return code.indexOf(word) > -1;
  20253. });
  20254. }
  20255. var codes = ['3857', '900913', '3785', '102113'];
  20256. function checkMercator(item) {
  20257. var auth = match(item, 'authority');
  20258. if (!auth) {
  20259. return;
  20260. }
  20261. var code = match(auth, 'epsg');
  20262. return code && codes.indexOf(code) > -1;
  20263. }
  20264. function checkProjStr(item) {
  20265. var ext = match(item, 'extension');
  20266. if (!ext) {
  20267. return;
  20268. }
  20269. return match(ext, 'proj4');
  20270. }
  20271. function testProj(code){
  20272. return code[0] === '+';
  20273. }
  20274. function parse(code){
  20275. if (testObj(code)) {
  20276. //check to see if this is a WKT string
  20277. if (testDef(code)) {
  20278. return lib_defs[code];
  20279. }
  20280. if (testWKT(code)) {
  20281. var out = wkt_parser(code);
  20282. // test of spetial case, due to this being a very common and often malformed
  20283. if (checkMercator(out)) {
  20284. return lib_defs['EPSG:3857'];
  20285. }
  20286. var maybeProjStr = checkProjStr(out);
  20287. if (maybeProjStr) {
  20288. return projString(maybeProjStr);
  20289. }
  20290. return out;
  20291. }
  20292. if (testProj(code)) {
  20293. return projString(code);
  20294. }
  20295. }else{
  20296. return code;
  20297. }
  20298. }
  20299. /* harmony default export */ var parseCode = (parse);
  20300. // CONCATENATED MODULE: ./node_modules/proj4/lib/extend.js
  20301. /* harmony default export */ var extend = (function(destination, source) {
  20302. destination = destination || {};
  20303. var value, property;
  20304. if (!source) {
  20305. return destination;
  20306. }
  20307. for (property in source) {
  20308. value = source[property];
  20309. if (value !== undefined) {
  20310. destination[property] = value;
  20311. }
  20312. }
  20313. return destination;
  20314. });
  20315. // CONCATENATED MODULE: ./node_modules/proj4/lib/common/msfnz.js
  20316. /* harmony default export */ var msfnz = (function(eccent, sinphi, cosphi) {
  20317. var con = eccent * sinphi;
  20318. return cosphi / (Math.sqrt(1 - con * con));
  20319. });
  20320. // CONCATENATED MODULE: ./node_modules/proj4/lib/common/sign.js
  20321. /* harmony default export */ var sign = (function(x) {
  20322. return x<0 ? -1 : 1;
  20323. });
  20324. // CONCATENATED MODULE: ./node_modules/proj4/lib/common/adjust_lon.js
  20325. /* harmony default export */ var adjust_lon = (function(x) {
  20326. return (Math.abs(x) <= SPI) ? x : (x - (sign(x) * TWO_PI));
  20327. });
  20328. // CONCATENATED MODULE: ./node_modules/proj4/lib/common/tsfnz.js
  20329. /* harmony default export */ var tsfnz = (function(eccent, phi, sinphi) {
  20330. var con = eccent * sinphi;
  20331. var com = 0.5 * eccent;
  20332. con = Math.pow(((1 - con) / (1 + con)), com);
  20333. return (Math.tan(0.5 * (HALF_PI - phi)) / con);
  20334. });
  20335. // CONCATENATED MODULE: ./node_modules/proj4/lib/common/phi2z.js
  20336. /* harmony default export */ var phi2z = (function(eccent, ts) {
  20337. var eccnth = 0.5 * eccent;
  20338. var con, dphi;
  20339. var phi = HALF_PI - 2 * Math.atan(ts);
  20340. for (var i = 0; i <= 15; i++) {
  20341. con = eccent * Math.sin(phi);
  20342. dphi = HALF_PI - 2 * Math.atan(ts * (Math.pow(((1 - con) / (1 + con)), eccnth))) - phi;
  20343. phi += dphi;
  20344. if (Math.abs(dphi) <= 0.0000000001) {
  20345. return phi;
  20346. }
  20347. }
  20348. //console.log("phi2z has NoConvergence");
  20349. return -9999;
  20350. });
  20351. // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/merc.js
  20352. function init() {
  20353. var con = this.b / this.a;
  20354. this.es = 1 - con * con;
  20355. if(!('x0' in this)){
  20356. this.x0 = 0;
  20357. }
  20358. if(!('y0' in this)){
  20359. this.y0 = 0;
  20360. }
  20361. this.e = Math.sqrt(this.es);
  20362. if (this.lat_ts) {
  20363. if (this.sphere) {
  20364. this.k0 = Math.cos(this.lat_ts);
  20365. }
  20366. else {
  20367. this.k0 = msfnz(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts));
  20368. }
  20369. }
  20370. else {
  20371. if (!this.k0) {
  20372. if (this.k) {
  20373. this.k0 = this.k;
  20374. }
  20375. else {
  20376. this.k0 = 1;
  20377. }
  20378. }
  20379. }
  20380. }
  20381. /* Mercator forward equations--mapping lat,long to x,y
  20382. --------------------------------------------------*/
  20383. function forward(p) {
  20384. var lon = p.x;
  20385. var lat = p.y;
  20386. // convert to radians
  20387. if (lat * R2D > 90 && lat * R2D < -90 && lon * R2D > 180 && lon * R2D < -180) {
  20388. return null;
  20389. }
  20390. var x, y;
  20391. if (Math.abs(Math.abs(lat) - HALF_PI) <= EPSLN) {
  20392. return null;
  20393. }
  20394. else {
  20395. if (this.sphere) {
  20396. x = this.x0 + this.a * this.k0 * adjust_lon(lon - this.long0);
  20397. y = this.y0 + this.a * this.k0 * Math.log(Math.tan(FORTPI + 0.5 * lat));
  20398. }
  20399. else {
  20400. var sinphi = Math.sin(lat);
  20401. var ts = tsfnz(this.e, lat, sinphi);
  20402. x = this.x0 + this.a * this.k0 * adjust_lon(lon - this.long0);
  20403. y = this.y0 - this.a * this.k0 * Math.log(ts);
  20404. }
  20405. p.x = x;
  20406. p.y = y;
  20407. return p;
  20408. }
  20409. }
  20410. /* Mercator inverse equations--mapping x,y to lat/long
  20411. --------------------------------------------------*/
  20412. function inverse(p) {
  20413. var x = p.x - this.x0;
  20414. var y = p.y - this.y0;
  20415. var lon, lat;
  20416. if (this.sphere) {
  20417. lat = HALF_PI - 2 * Math.atan(Math.exp(-y / (this.a * this.k0)));
  20418. }
  20419. else {
  20420. var ts = Math.exp(-y / (this.a * this.k0));
  20421. lat = phi2z(this.e, ts);
  20422. if (lat === -9999) {
  20423. return null;
  20424. }
  20425. }
  20426. lon = adjust_lon(this.long0 + x / (this.a * this.k0));
  20427. p.x = lon;
  20428. p.y = lat;
  20429. return p;
  20430. }
  20431. var names = ["Mercator", "Popular Visualisation Pseudo Mercator", "Mercator_1SP", "Mercator_Auxiliary_Sphere", "merc"];
  20432. /* harmony default export */ var merc = ({
  20433. init: init,
  20434. forward: forward,
  20435. inverse: inverse,
  20436. names: names
  20437. });
  20438. // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/longlat.js
  20439. function longlat_init() {
  20440. //no-op for longlat
  20441. }
  20442. function identity(pt) {
  20443. return pt;
  20444. }
  20445. var longlat_names = ["longlat", "identity"];
  20446. /* harmony default export */ var longlat = ({
  20447. init: longlat_init,
  20448. forward: identity,
  20449. inverse: identity,
  20450. names: longlat_names
  20451. });
  20452. // CONCATENATED MODULE: ./node_modules/proj4/lib/projections.js
  20453. var projs = [merc, longlat];
  20454. var projections_names = {};
  20455. var projStore = [];
  20456. function add(proj, i) {
  20457. var len = projStore.length;
  20458. if (!proj.names) {
  20459. console.log(i);
  20460. return true;
  20461. }
  20462. projStore[len] = proj;
  20463. proj.names.forEach(function(n) {
  20464. projections_names[n.toLowerCase()] = len;
  20465. });
  20466. return this;
  20467. }
  20468. function get(name) {
  20469. if (!name) {
  20470. return false;
  20471. }
  20472. var n = name.toLowerCase();
  20473. if (typeof projections_names[n] !== 'undefined' && projStore[projections_names[n]]) {
  20474. return projStore[projections_names[n]];
  20475. }
  20476. }
  20477. function start() {
  20478. projs.forEach(add);
  20479. }
  20480. /* harmony default export */ var projections = ({
  20481. start: start,
  20482. add: add,
  20483. get: get
  20484. });
  20485. // CONCATENATED MODULE: ./node_modules/proj4/lib/constants/Ellipsoid.js
  20486. var Ellipsoid_exports = {};
  20487. Ellipsoid_exports.MERIT = {
  20488. a: 6378137.0,
  20489. rf: 298.257,
  20490. ellipseName: "MERIT 1983"
  20491. };
  20492. Ellipsoid_exports.SGS85 = {
  20493. a: 6378136.0,
  20494. rf: 298.257,
  20495. ellipseName: "Soviet Geodetic System 85"
  20496. };
  20497. Ellipsoid_exports.GRS80 = {
  20498. a: 6378137.0,
  20499. rf: 298.257222101,
  20500. ellipseName: "GRS 1980(IUGG, 1980)"
  20501. };
  20502. Ellipsoid_exports.IAU76 = {
  20503. a: 6378140.0,
  20504. rf: 298.257,
  20505. ellipseName: "IAU 1976"
  20506. };
  20507. Ellipsoid_exports.airy = {
  20508. a: 6377563.396,
  20509. b: 6356256.910,
  20510. ellipseName: "Airy 1830"
  20511. };
  20512. Ellipsoid_exports.APL4 = {
  20513. a: 6378137,
  20514. rf: 298.25,
  20515. ellipseName: "Appl. Physics. 1965"
  20516. };
  20517. Ellipsoid_exports.NWL9D = {
  20518. a: 6378145.0,
  20519. rf: 298.25,
  20520. ellipseName: "Naval Weapons Lab., 1965"
  20521. };
  20522. Ellipsoid_exports.mod_airy = {
  20523. a: 6377340.189,
  20524. b: 6356034.446,
  20525. ellipseName: "Modified Airy"
  20526. };
  20527. Ellipsoid_exports.andrae = {
  20528. a: 6377104.43,
  20529. rf: 300.0,
  20530. ellipseName: "Andrae 1876 (Den., Iclnd.)"
  20531. };
  20532. Ellipsoid_exports.aust_SA = {
  20533. a: 6378160.0,
  20534. rf: 298.25,
  20535. ellipseName: "Australian Natl & S. Amer. 1969"
  20536. };
  20537. Ellipsoid_exports.GRS67 = {
  20538. a: 6378160.0,
  20539. rf: 298.2471674270,
  20540. ellipseName: "GRS 67(IUGG 1967)"
  20541. };
  20542. Ellipsoid_exports.bessel = {
  20543. a: 6377397.155,
  20544. rf: 299.1528128,
  20545. ellipseName: "Bessel 1841"
  20546. };
  20547. Ellipsoid_exports.bess_nam = {
  20548. a: 6377483.865,
  20549. rf: 299.1528128,
  20550. ellipseName: "Bessel 1841 (Namibia)"
  20551. };
  20552. Ellipsoid_exports.clrk66 = {
  20553. a: 6378206.4,
  20554. b: 6356583.8,
  20555. ellipseName: "Clarke 1866"
  20556. };
  20557. Ellipsoid_exports.clrk80 = {
  20558. a: 6378249.145,
  20559. rf: 293.4663,
  20560. ellipseName: "Clarke 1880 mod."
  20561. };
  20562. Ellipsoid_exports.clrk58 = {
  20563. a: 6378293.645208759,
  20564. rf: 294.2606763692654,
  20565. ellipseName: "Clarke 1858"
  20566. };
  20567. Ellipsoid_exports.CPM = {
  20568. a: 6375738.7,
  20569. rf: 334.29,
  20570. ellipseName: "Comm. des Poids et Mesures 1799"
  20571. };
  20572. Ellipsoid_exports.delmbr = {
  20573. a: 6376428.0,
  20574. rf: 311.5,
  20575. ellipseName: "Delambre 1810 (Belgium)"
  20576. };
  20577. Ellipsoid_exports.engelis = {
  20578. a: 6378136.05,
  20579. rf: 298.2566,
  20580. ellipseName: "Engelis 1985"
  20581. };
  20582. Ellipsoid_exports.evrst30 = {
  20583. a: 6377276.345,
  20584. rf: 300.8017,
  20585. ellipseName: "Everest 1830"
  20586. };
  20587. Ellipsoid_exports.evrst48 = {
  20588. a: 6377304.063,
  20589. rf: 300.8017,
  20590. ellipseName: "Everest 1948"
  20591. };
  20592. Ellipsoid_exports.evrst56 = {
  20593. a: 6377301.243,
  20594. rf: 300.8017,
  20595. ellipseName: "Everest 1956"
  20596. };
  20597. Ellipsoid_exports.evrst69 = {
  20598. a: 6377295.664,
  20599. rf: 300.8017,
  20600. ellipseName: "Everest 1969"
  20601. };
  20602. Ellipsoid_exports.evrstSS = {
  20603. a: 6377298.556,
  20604. rf: 300.8017,
  20605. ellipseName: "Everest (Sabah & Sarawak)"
  20606. };
  20607. Ellipsoid_exports.fschr60 = {
  20608. a: 6378166.0,
  20609. rf: 298.3,
  20610. ellipseName: "Fischer (Mercury Datum) 1960"
  20611. };
  20612. Ellipsoid_exports.fschr60m = {
  20613. a: 6378155.0,
  20614. rf: 298.3,
  20615. ellipseName: "Fischer 1960"
  20616. };
  20617. Ellipsoid_exports.fschr68 = {
  20618. a: 6378150.0,
  20619. rf: 298.3,
  20620. ellipseName: "Fischer 1968"
  20621. };
  20622. Ellipsoid_exports.helmert = {
  20623. a: 6378200.0,
  20624. rf: 298.3,
  20625. ellipseName: "Helmert 1906"
  20626. };
  20627. Ellipsoid_exports.hough = {
  20628. a: 6378270.0,
  20629. rf: 297.0,
  20630. ellipseName: "Hough"
  20631. };
  20632. Ellipsoid_exports.intl = {
  20633. a: 6378388.0,
  20634. rf: 297.0,
  20635. ellipseName: "International 1909 (Hayford)"
  20636. };
  20637. Ellipsoid_exports.kaula = {
  20638. a: 6378163.0,
  20639. rf: 298.24,
  20640. ellipseName: "Kaula 1961"
  20641. };
  20642. Ellipsoid_exports.lerch = {
  20643. a: 6378139.0,
  20644. rf: 298.257,
  20645. ellipseName: "Lerch 1979"
  20646. };
  20647. Ellipsoid_exports.mprts = {
  20648. a: 6397300.0,
  20649. rf: 191.0,
  20650. ellipseName: "Maupertius 1738"
  20651. };
  20652. Ellipsoid_exports.new_intl = {
  20653. a: 6378157.5,
  20654. b: 6356772.2,
  20655. ellipseName: "New International 1967"
  20656. };
  20657. Ellipsoid_exports.plessis = {
  20658. a: 6376523.0,
  20659. rf: 6355863.0,
  20660. ellipseName: "Plessis 1817 (France)"
  20661. };
  20662. Ellipsoid_exports.krass = {
  20663. a: 6378245.0,
  20664. rf: 298.3,
  20665. ellipseName: "Krassovsky, 1942"
  20666. };
  20667. Ellipsoid_exports.SEasia = {
  20668. a: 6378155.0,
  20669. b: 6356773.3205,
  20670. ellipseName: "Southeast Asia"
  20671. };
  20672. Ellipsoid_exports.walbeck = {
  20673. a: 6376896.0,
  20674. b: 6355834.8467,
  20675. ellipseName: "Walbeck"
  20676. };
  20677. Ellipsoid_exports.WGS60 = {
  20678. a: 6378165.0,
  20679. rf: 298.3,
  20680. ellipseName: "WGS 60"
  20681. };
  20682. Ellipsoid_exports.WGS66 = {
  20683. a: 6378145.0,
  20684. rf: 298.25,
  20685. ellipseName: "WGS 66"
  20686. };
  20687. Ellipsoid_exports.WGS7 = {
  20688. a: 6378135.0,
  20689. rf: 298.26,
  20690. ellipseName: "WGS 72"
  20691. };
  20692. var WGS84 = Ellipsoid_exports.WGS84 = {
  20693. a: 6378137.0,
  20694. rf: 298.257223563,
  20695. ellipseName: "WGS 84"
  20696. };
  20697. Ellipsoid_exports.sphere = {
  20698. a: 6370997.0,
  20699. b: 6370997.0,
  20700. ellipseName: "Normal Sphere (r=6370997)"
  20701. };
  20702. // CONCATENATED MODULE: ./node_modules/proj4/lib/deriveConstants.js
  20703. function eccentricity(a, b, rf, R_A) {
  20704. var a2 = a * a; // used in geocentric
  20705. var b2 = b * b; // used in geocentric
  20706. var es = (a2 - b2) / a2; // e ^ 2
  20707. var e = 0;
  20708. if (R_A) {
  20709. a *= 1 - es * (SIXTH + es * (RA4 + es * RA6));
  20710. a2 = a * a;
  20711. es = 0;
  20712. } else {
  20713. e = Math.sqrt(es); // eccentricity
  20714. }
  20715. var ep2 = (a2 - b2) / b2; // used in geocentric
  20716. return {
  20717. es: es,
  20718. e: e,
  20719. ep2: ep2
  20720. };
  20721. }
  20722. function deriveConstants_sphere(a, b, rf, ellps, sphere) {
  20723. if (!a) { // do we have an ellipsoid?
  20724. var ellipse = match(Ellipsoid_exports, ellps);
  20725. if (!ellipse) {
  20726. ellipse = WGS84;
  20727. }
  20728. a = ellipse.a;
  20729. b = ellipse.b;
  20730. rf = ellipse.rf;
  20731. }
  20732. if (rf && !b) {
  20733. b = (1.0 - 1.0 / rf) * a;
  20734. }
  20735. if (rf === 0 || Math.abs(a - b) < EPSLN) {
  20736. sphere = true;
  20737. b = a;
  20738. }
  20739. return {
  20740. a: a,
  20741. b: b,
  20742. rf: rf,
  20743. sphere: sphere
  20744. };
  20745. }
  20746. // CONCATENATED MODULE: ./node_modules/proj4/lib/constants/Datum.js
  20747. var Datum_exports = {};
  20748. Datum_exports.wgs84 = {
  20749. towgs84: "0,0,0",
  20750. ellipse: "WGS84",
  20751. datumName: "WGS84"
  20752. };
  20753. Datum_exports.ch1903 = {
  20754. towgs84: "674.374,15.056,405.346",
  20755. ellipse: "bessel",
  20756. datumName: "swiss"
  20757. };
  20758. Datum_exports.ggrs87 = {
  20759. towgs84: "-199.87,74.79,246.62",
  20760. ellipse: "GRS80",
  20761. datumName: "Greek_Geodetic_Reference_System_1987"
  20762. };
  20763. Datum_exports.nad83 = {
  20764. towgs84: "0,0,0",
  20765. ellipse: "GRS80",
  20766. datumName: "North_American_Datum_1983"
  20767. };
  20768. Datum_exports.nad27 = {
  20769. nadgrids: "@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",
  20770. ellipse: "clrk66",
  20771. datumName: "North_American_Datum_1927"
  20772. };
  20773. Datum_exports.potsdam = {
  20774. towgs84: "606.0,23.0,413.0",
  20775. ellipse: "bessel",
  20776. datumName: "Potsdam Rauenberg 1950 DHDN"
  20777. };
  20778. Datum_exports.carthage = {
  20779. towgs84: "-263.0,6.0,431.0",
  20780. ellipse: "clark80",
  20781. datumName: "Carthage 1934 Tunisia"
  20782. };
  20783. Datum_exports.hermannskogel = {
  20784. towgs84: "653.0,-212.0,449.0",
  20785. ellipse: "bessel",
  20786. datumName: "Hermannskogel"
  20787. };
  20788. Datum_exports.osni52 = {
  20789. towgs84: "482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",
  20790. ellipse: "airy",
  20791. datumName: "Irish National"
  20792. };
  20793. Datum_exports.ire65 = {
  20794. towgs84: "482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",
  20795. ellipse: "mod_airy",
  20796. datumName: "Ireland 1965"
  20797. };
  20798. Datum_exports.rassadiran = {
  20799. towgs84: "-133.63,-157.5,-158.62",
  20800. ellipse: "intl",
  20801. datumName: "Rassadiran"
  20802. };
  20803. Datum_exports.nzgd49 = {
  20804. towgs84: "59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",
  20805. ellipse: "intl",
  20806. datumName: "New Zealand Geodetic Datum 1949"
  20807. };
  20808. Datum_exports.osgb36 = {
  20809. towgs84: "446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",
  20810. ellipse: "airy",
  20811. datumName: "Airy 1830"
  20812. };
  20813. Datum_exports.s_jtsk = {
  20814. towgs84: "589,76,480",
  20815. ellipse: 'bessel',
  20816. datumName: 'S-JTSK (Ferro)'
  20817. };
  20818. Datum_exports.beduaram = {
  20819. towgs84: '-106,-87,188',
  20820. ellipse: 'clrk80',
  20821. datumName: 'Beduaram'
  20822. };
  20823. Datum_exports.gunung_segara = {
  20824. towgs84: '-403,684,41',
  20825. ellipse: 'bessel',
  20826. datumName: 'Gunung Segara Jakarta'
  20827. };
  20828. Datum_exports.rnb72 = {
  20829. towgs84: "106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",
  20830. ellipse: "intl",
  20831. datumName: "Reseau National Belge 1972"
  20832. };
  20833. // CONCATENATED MODULE: ./node_modules/proj4/lib/datum.js
  20834. function datum(datumCode, datum_params, a, b, es, ep2) {
  20835. var out = {};
  20836. if (datumCode === undefined || datumCode === 'none') {
  20837. out.datum_type = PJD_NODATUM;
  20838. } else {
  20839. out.datum_type = PJD_WGS84;
  20840. }
  20841. if (datum_params) {
  20842. out.datum_params = datum_params.map(parseFloat);
  20843. if (out.datum_params[0] !== 0 || out.datum_params[1] !== 0 || out.datum_params[2] !== 0) {
  20844. out.datum_type = PJD_3PARAM;
  20845. }
  20846. if (out.datum_params.length > 3) {
  20847. if (out.datum_params[3] !== 0 || out.datum_params[4] !== 0 || out.datum_params[5] !== 0 || out.datum_params[6] !== 0) {
  20848. out.datum_type = PJD_7PARAM;
  20849. out.datum_params[3] *= SEC_TO_RAD;
  20850. out.datum_params[4] *= SEC_TO_RAD;
  20851. out.datum_params[5] *= SEC_TO_RAD;
  20852. out.datum_params[6] = (out.datum_params[6] / 1000000.0) + 1.0;
  20853. }
  20854. }
  20855. }
  20856. out.a = a; //datum object also uses these values
  20857. out.b = b;
  20858. out.es = es;
  20859. out.ep2 = ep2;
  20860. return out;
  20861. }
  20862. /* harmony default export */ var lib_datum = (datum);
  20863. // CONCATENATED MODULE: ./node_modules/proj4/lib/Proj.js
  20864. function Projection(srsCode,callback) {
  20865. if (!(this instanceof Projection)) {
  20866. return new Projection(srsCode);
  20867. }
  20868. callback = callback || function(error){
  20869. if(error){
  20870. throw error;
  20871. }
  20872. };
  20873. var json = parseCode(srsCode);
  20874. if(typeof json !== 'object'){
  20875. callback(srsCode);
  20876. return;
  20877. }
  20878. var ourProj = Projection.projections.get(json.projName);
  20879. if(!ourProj){
  20880. callback(srsCode);
  20881. return;
  20882. }
  20883. if (json.datumCode && json.datumCode !== 'none') {
  20884. var datumDef = match(Datum_exports, json.datumCode);
  20885. if (datumDef) {
  20886. json.datum_params = datumDef.towgs84 ? datumDef.towgs84.split(',') : null;
  20887. json.ellps = datumDef.ellipse;
  20888. json.datumName = datumDef.datumName ? datumDef.datumName : json.datumCode;
  20889. }
  20890. }
  20891. json.k0 = json.k0 || 1.0;
  20892. json.axis = json.axis || 'enu';
  20893. json.ellps = json.ellps || 'wgs84';
  20894. var sphere_ = deriveConstants_sphere(json.a, json.b, json.rf, json.ellps, json.sphere);
  20895. var ecc = eccentricity(sphere_.a, sphere_.b, sphere_.rf, json.R_A);
  20896. var datumObj = json.datum || lib_datum(json.datumCode, json.datum_params, sphere_.a, sphere_.b, ecc.es, ecc.ep2);
  20897. extend(this, json); // transfer everything over from the projection because we don't know what we'll need
  20898. extend(this, ourProj); // transfer all the methods from the projection
  20899. // copy the 4 things over we calulated in deriveConstants.sphere
  20900. this.a = sphere_.a;
  20901. this.b = sphere_.b;
  20902. this.rf = sphere_.rf;
  20903. this.sphere = sphere_.sphere;
  20904. // copy the 3 things we calculated in deriveConstants.eccentricity
  20905. this.es = ecc.es;
  20906. this.e = ecc.e;
  20907. this.ep2 = ecc.ep2;
  20908. // add in the datum object
  20909. this.datum = datumObj;
  20910. // init the projection
  20911. this.init();
  20912. // legecy callback from back in the day when it went to spatialreference.org
  20913. callback(null, this);
  20914. }
  20915. Projection.projections = projections;
  20916. Projection.projections.start();
  20917. /* harmony default export */ var Proj = (Projection);
  20918. // CONCATENATED MODULE: ./node_modules/proj4/lib/datumUtils.js
  20919. function compareDatums(source, dest) {
  20920. if (source.datum_type !== dest.datum_type) {
  20921. return false; // false, datums are not equal
  20922. } else if (source.a !== dest.a || Math.abs(source.es - dest.es) > 0.000000000050) {
  20923. // the tolerance for es is to ensure that GRS80 and WGS84
  20924. // are considered identical
  20925. return false;
  20926. } else if (source.datum_type === PJD_3PARAM) {
  20927. return (source.datum_params[0] === dest.datum_params[0] && source.datum_params[1] === dest.datum_params[1] && source.datum_params[2] === dest.datum_params[2]);
  20928. } else if (source.datum_type === PJD_7PARAM) {
  20929. return (source.datum_params[0] === dest.datum_params[0] && source.datum_params[1] === dest.datum_params[1] && source.datum_params[2] === dest.datum_params[2] && source.datum_params[3] === dest.datum_params[3] && source.datum_params[4] === dest.datum_params[4] && source.datum_params[5] === dest.datum_params[5] && source.datum_params[6] === dest.datum_params[6]);
  20930. } else {
  20931. return true; // datums are equal
  20932. }
  20933. } // cs_compare_datums()
  20934. /*
  20935. * The function Convert_Geodetic_To_Geocentric converts geodetic coordinates
  20936. * (latitude, longitude, and height) to geocentric coordinates (X, Y, Z),
  20937. * according to the current ellipsoid parameters.
  20938. *
  20939. * Latitude : Geodetic latitude in radians (input)
  20940. * Longitude : Geodetic longitude in radians (input)
  20941. * Height : Geodetic height, in meters (input)
  20942. * X : Calculated Geocentric X coordinate, in meters (output)
  20943. * Y : Calculated Geocentric Y coordinate, in meters (output)
  20944. * Z : Calculated Geocentric Z coordinate, in meters (output)
  20945. *
  20946. */
  20947. function geodeticToGeocentric(p, es, a) {
  20948. var Longitude = p.x;
  20949. var Latitude = p.y;
  20950. var Height = p.z ? p.z : 0; //Z value not always supplied
  20951. var Rn; /* Earth radius at location */
  20952. var Sin_Lat; /* Math.sin(Latitude) */
  20953. var Sin2_Lat; /* Square of Math.sin(Latitude) */
  20954. var Cos_Lat; /* Math.cos(Latitude) */
  20955. /*
  20956. ** Don't blow up if Latitude is just a little out of the value
  20957. ** range as it may just be a rounding issue. Also removed longitude
  20958. ** test, it should be wrapped by Math.cos() and Math.sin(). NFW for PROJ.4, Sep/2001.
  20959. */
  20960. if (Latitude < -HALF_PI && Latitude > -1.001 * HALF_PI) {
  20961. Latitude = -HALF_PI;
  20962. } else if (Latitude > HALF_PI && Latitude < 1.001 * HALF_PI) {
  20963. Latitude = HALF_PI;
  20964. } else if (Latitude < -HALF_PI) {
  20965. /* Latitude out of range */
  20966. //..reportError('geocent:lat out of range:' + Latitude);
  20967. return { x: -Infinity, y: -Infinity, z: p.z };
  20968. } else if (Latitude > HALF_PI) {
  20969. /* Latitude out of range */
  20970. return { x: Infinity, y: Infinity, z: p.z };
  20971. }
  20972. if (Longitude > Math.PI) {
  20973. Longitude -= (2 * Math.PI);
  20974. }
  20975. Sin_Lat = Math.sin(Latitude);
  20976. Cos_Lat = Math.cos(Latitude);
  20977. Sin2_Lat = Sin_Lat * Sin_Lat;
  20978. Rn = a / (Math.sqrt(1.0e0 - es * Sin2_Lat));
  20979. return {
  20980. x: (Rn + Height) * Cos_Lat * Math.cos(Longitude),
  20981. y: (Rn + Height) * Cos_Lat * Math.sin(Longitude),
  20982. z: ((Rn * (1 - es)) + Height) * Sin_Lat
  20983. };
  20984. } // cs_geodetic_to_geocentric()
  20985. function geocentricToGeodetic(p, es, a, b) {
  20986. /* local defintions and variables */
  20987. /* end-criterium of loop, accuracy of sin(Latitude) */
  20988. var genau = 1e-12;
  20989. var genau2 = (genau * genau);
  20990. var maxiter = 30;
  20991. var P; /* distance between semi-minor axis and location */
  20992. var RR; /* distance between center and location */
  20993. var CT; /* sin of geocentric latitude */
  20994. var ST; /* cos of geocentric latitude */
  20995. var RX;
  20996. var RK;
  20997. var RN; /* Earth radius at location */
  20998. var CPHI0; /* cos of start or old geodetic latitude in iterations */
  20999. var SPHI0; /* sin of start or old geodetic latitude in iterations */
  21000. var CPHI; /* cos of searched geodetic latitude */
  21001. var SPHI; /* sin of searched geodetic latitude */
  21002. var SDPHI; /* end-criterium: addition-theorem of sin(Latitude(iter)-Latitude(iter-1)) */
  21003. var iter; /* # of continous iteration, max. 30 is always enough (s.a.) */
  21004. var X = p.x;
  21005. var Y = p.y;
  21006. var Z = p.z ? p.z : 0.0; //Z value not always supplied
  21007. var Longitude;
  21008. var Latitude;
  21009. var Height;
  21010. P = Math.sqrt(X * X + Y * Y);
  21011. RR = Math.sqrt(X * X + Y * Y + Z * Z);
  21012. /* special cases for latitude and longitude */
  21013. if (P / a < genau) {
  21014. /* special case, if P=0. (X=0., Y=0.) */
  21015. Longitude = 0.0;
  21016. /* if (X,Y,Z)=(0.,0.,0.) then Height becomes semi-minor axis
  21017. * of ellipsoid (=center of mass), Latitude becomes PI/2 */
  21018. if (RR / a < genau) {
  21019. Latitude = HALF_PI;
  21020. Height = -b;
  21021. return {
  21022. x: p.x,
  21023. y: p.y,
  21024. z: p.z
  21025. };
  21026. }
  21027. } else {
  21028. /* ellipsoidal (geodetic) longitude
  21029. * interval: -PI < Longitude <= +PI */
  21030. Longitude = Math.atan2(Y, X);
  21031. }
  21032. /* --------------------------------------------------------------
  21033. * Following iterative algorithm was developped by
  21034. * "Institut for Erdmessung", University of Hannover, July 1988.
  21035. * Internet: www.ife.uni-hannover.de
  21036. * Iterative computation of CPHI,SPHI and Height.
  21037. * Iteration of CPHI and SPHI to 10**-12 radian resp.
  21038. * 2*10**-7 arcsec.
  21039. * --------------------------------------------------------------
  21040. */
  21041. CT = Z / RR;
  21042. ST = P / RR;
  21043. RX = 1.0 / Math.sqrt(1.0 - es * (2.0 - es) * ST * ST);
  21044. CPHI0 = ST * (1.0 - es) * RX;
  21045. SPHI0 = CT * RX;
  21046. iter = 0;
  21047. /* loop to find sin(Latitude) resp. Latitude
  21048. * until |sin(Latitude(iter)-Latitude(iter-1))| < genau */
  21049. do {
  21050. iter++;
  21051. RN = a / Math.sqrt(1.0 - es * SPHI0 * SPHI0);
  21052. /* ellipsoidal (geodetic) height */
  21053. Height = P * CPHI0 + Z * SPHI0 - RN * (1.0 - es * SPHI0 * SPHI0);
  21054. RK = es * RN / (RN + Height);
  21055. RX = 1.0 / Math.sqrt(1.0 - RK * (2.0 - RK) * ST * ST);
  21056. CPHI = ST * (1.0 - RK) * RX;
  21057. SPHI = CT * RX;
  21058. SDPHI = SPHI * CPHI0 - CPHI * SPHI0;
  21059. CPHI0 = CPHI;
  21060. SPHI0 = SPHI;
  21061. }
  21062. while (SDPHI * SDPHI > genau2 && iter < maxiter);
  21063. /* ellipsoidal (geodetic) latitude */
  21064. Latitude = Math.atan(SPHI / Math.abs(CPHI));
  21065. return {
  21066. x: Longitude,
  21067. y: Latitude,
  21068. z: Height
  21069. };
  21070. } // cs_geocentric_to_geodetic()
  21071. /****************************************************************/
  21072. // pj_geocentic_to_wgs84( p )
  21073. // p = point to transform in geocentric coordinates (x,y,z)
  21074. /** point object, nothing fancy, just allows values to be
  21075. passed back and forth by reference rather than by value.
  21076. Other point classes may be used as long as they have
  21077. x and y properties, which will get modified in the transform method.
  21078. */
  21079. function geocentricToWgs84(p, datum_type, datum_params) {
  21080. if (datum_type === PJD_3PARAM) {
  21081. // if( x[io] === HUGE_VAL )
  21082. // continue;
  21083. return {
  21084. x: p.x + datum_params[0],
  21085. y: p.y + datum_params[1],
  21086. z: p.z + datum_params[2],
  21087. };
  21088. } else if (datum_type === PJD_7PARAM) {
  21089. var Dx_BF = datum_params[0];
  21090. var Dy_BF = datum_params[1];
  21091. var Dz_BF = datum_params[2];
  21092. var Rx_BF = datum_params[3];
  21093. var Ry_BF = datum_params[4];
  21094. var Rz_BF = datum_params[5];
  21095. var M_BF = datum_params[6];
  21096. // if( x[io] === HUGE_VAL )
  21097. // continue;
  21098. return {
  21099. x: M_BF * (p.x - Rz_BF * p.y + Ry_BF * p.z) + Dx_BF,
  21100. y: M_BF * (Rz_BF * p.x + p.y - Rx_BF * p.z) + Dy_BF,
  21101. z: M_BF * (-Ry_BF * p.x + Rx_BF * p.y + p.z) + Dz_BF
  21102. };
  21103. }
  21104. } // cs_geocentric_to_wgs84
  21105. /****************************************************************/
  21106. // pj_geocentic_from_wgs84()
  21107. // coordinate system definition,
  21108. // point to transform in geocentric coordinates (x,y,z)
  21109. function geocentricFromWgs84(p, datum_type, datum_params) {
  21110. if (datum_type === PJD_3PARAM) {
  21111. //if( x[io] === HUGE_VAL )
  21112. // continue;
  21113. return {
  21114. x: p.x - datum_params[0],
  21115. y: p.y - datum_params[1],
  21116. z: p.z - datum_params[2],
  21117. };
  21118. } else if (datum_type === PJD_7PARAM) {
  21119. var Dx_BF = datum_params[0];
  21120. var Dy_BF = datum_params[1];
  21121. var Dz_BF = datum_params[2];
  21122. var Rx_BF = datum_params[3];
  21123. var Ry_BF = datum_params[4];
  21124. var Rz_BF = datum_params[5];
  21125. var M_BF = datum_params[6];
  21126. var x_tmp = (p.x - Dx_BF) / M_BF;
  21127. var y_tmp = (p.y - Dy_BF) / M_BF;
  21128. var z_tmp = (p.z - Dz_BF) / M_BF;
  21129. //if( x[io] === HUGE_VAL )
  21130. // continue;
  21131. return {
  21132. x: x_tmp + Rz_BF * y_tmp - Ry_BF * z_tmp,
  21133. y: -Rz_BF * x_tmp + y_tmp + Rx_BF * z_tmp,
  21134. z: Ry_BF * x_tmp - Rx_BF * y_tmp + z_tmp
  21135. };
  21136. } //cs_geocentric_from_wgs84()
  21137. }
  21138. // CONCATENATED MODULE: ./node_modules/proj4/lib/datum_transform.js
  21139. function checkParams(type) {
  21140. return (type === PJD_3PARAM || type === PJD_7PARAM);
  21141. }
  21142. /* harmony default export */ var datum_transform = (function(source, dest, point) {
  21143. // Short cut if the datums are identical.
  21144. if (compareDatums(source, dest)) {
  21145. return point; // in this case, zero is sucess,
  21146. // whereas cs_compare_datums returns 1 to indicate TRUE
  21147. // confusing, should fix this
  21148. }
  21149. // Explicitly skip datum transform by setting 'datum=none' as parameter for either source or dest
  21150. if (source.datum_type === PJD_NODATUM || dest.datum_type === PJD_NODATUM) {
  21151. return point;
  21152. }
  21153. // If this datum requires grid shifts, then apply it to geodetic coordinates.
  21154. // Do we need to go through geocentric coordinates?
  21155. if (source.es === dest.es && source.a === dest.a && !checkParams(source.datum_type) && !checkParams(dest.datum_type)) {
  21156. return point;
  21157. }
  21158. // Convert to geocentric coordinates.
  21159. point = geodeticToGeocentric(point, source.es, source.a);
  21160. // Convert between datums
  21161. if (checkParams(source.datum_type)) {
  21162. point = geocentricToWgs84(point, source.datum_type, source.datum_params);
  21163. }
  21164. if (checkParams(dest.datum_type)) {
  21165. point = geocentricFromWgs84(point, dest.datum_type, dest.datum_params);
  21166. }
  21167. return geocentricToGeodetic(point, dest.es, dest.a, dest.b);
  21168. });
  21169. // CONCATENATED MODULE: ./node_modules/proj4/lib/adjust_axis.js
  21170. /* harmony default export */ var adjust_axis = (function(crs, denorm, point) {
  21171. var xin = point.x,
  21172. yin = point.y,
  21173. zin = point.z || 0.0;
  21174. var v, t, i;
  21175. var out = {};
  21176. for (i = 0; i < 3; i++) {
  21177. if (denorm && i === 2 && point.z === undefined) {
  21178. continue;
  21179. }
  21180. if (i === 0) {
  21181. v = xin;
  21182. t = 'x';
  21183. }
  21184. else if (i === 1) {
  21185. v = yin;
  21186. t = 'y';
  21187. }
  21188. else {
  21189. v = zin;
  21190. t = 'z';
  21191. }
  21192. switch (crs.axis[i]) {
  21193. case 'e':
  21194. out[t] = v;
  21195. break;
  21196. case 'w':
  21197. out[t] = -v;
  21198. break;
  21199. case 'n':
  21200. out[t] = v;
  21201. break;
  21202. case 's':
  21203. out[t] = -v;
  21204. break;
  21205. case 'u':
  21206. if (point[t] !== undefined) {
  21207. out.z = v;
  21208. }
  21209. break;
  21210. case 'd':
  21211. if (point[t] !== undefined) {
  21212. out.z = -v;
  21213. }
  21214. break;
  21215. default:
  21216. //console.log("ERROR: unknow axis ("+crs.axis[i]+") - check definition of "+crs.projName);
  21217. return null;
  21218. }
  21219. }
  21220. return out;
  21221. });
  21222. // CONCATENATED MODULE: ./node_modules/proj4/lib/common/toPoint.js
  21223. /* harmony default export */ var toPoint = (function (array){
  21224. var out = {
  21225. x: array[0],
  21226. y: array[1]
  21227. };
  21228. if (array.length>2) {
  21229. out.z = array[2];
  21230. }
  21231. if (array.length>3) {
  21232. out.m = array[3];
  21233. }
  21234. return out;
  21235. });
  21236. // CONCATENATED MODULE: ./node_modules/proj4/lib/checkSanity.js
  21237. /* harmony default export */ var checkSanity = (function (point) {
  21238. checkCoord(point.x);
  21239. checkCoord(point.y);
  21240. });
  21241. function checkCoord(num) {
  21242. if (typeof Number.isFinite === 'function') {
  21243. if (Number.isFinite(num)) {
  21244. return;
  21245. }
  21246. throw new TypeError('coordinates must be finite numbers');
  21247. }
  21248. if (typeof num !== 'number' || num !== num || !isFinite(num)) {
  21249. throw new TypeError('coordinates must be finite numbers');
  21250. }
  21251. }
  21252. // CONCATENATED MODULE: ./node_modules/proj4/lib/transform.js
  21253. function checkNotWGS(source, dest) {
  21254. return ((source.datum.datum_type === PJD_3PARAM || source.datum.datum_type === PJD_7PARAM) && dest.datumCode !== 'WGS84') || ((dest.datum.datum_type === PJD_3PARAM || dest.datum.datum_type === PJD_7PARAM) && source.datumCode !== 'WGS84');
  21255. }
  21256. function transform(source, dest, point) {
  21257. var wgs84;
  21258. if (Array.isArray(point)) {
  21259. point = toPoint(point);
  21260. }
  21261. checkSanity(point);
  21262. // Workaround for datum shifts towgs84, if either source or destination projection is not wgs84
  21263. if (source.datum && dest.datum && checkNotWGS(source, dest)) {
  21264. wgs84 = new Proj('WGS84');
  21265. point = transform(source, wgs84, point);
  21266. source = wgs84;
  21267. }
  21268. // DGR, 2010/11/12
  21269. if (source.axis !== 'enu') {
  21270. point = adjust_axis(source, false, point);
  21271. }
  21272. // Transform source points to long/lat, if they aren't already.
  21273. if (source.projName === 'longlat') {
  21274. point = {
  21275. x: point.x * D2R,
  21276. y: point.y * D2R,
  21277. z: point.z || 0
  21278. };
  21279. } else {
  21280. if (source.to_meter) {
  21281. point = {
  21282. x: point.x * source.to_meter,
  21283. y: point.y * source.to_meter,
  21284. z: point.z || 0
  21285. };
  21286. }
  21287. point = source.inverse(point); // Convert Cartesian to longlat
  21288. }
  21289. // Adjust for the prime meridian if necessary
  21290. if (source.from_greenwich) {
  21291. point.x += source.from_greenwich;
  21292. }
  21293. // Convert datums if needed, and if possible.
  21294. point = datum_transform(source.datum, dest.datum, point);
  21295. // Adjust for the prime meridian if necessary
  21296. if (dest.from_greenwich) {
  21297. point = {
  21298. x: point.x - dest.from_greenwich,
  21299. y: point.y,
  21300. z: point.z || 0
  21301. };
  21302. }
  21303. if (dest.projName === 'longlat') {
  21304. // convert radians to decimal degrees
  21305. point = {
  21306. x: point.x * R2D,
  21307. y: point.y * R2D,
  21308. z: point.z || 0
  21309. };
  21310. } else { // else project
  21311. point = dest.forward(point);
  21312. if (dest.to_meter) {
  21313. point = {
  21314. x: point.x / dest.to_meter,
  21315. y: point.y / dest.to_meter,
  21316. z: point.z || 0
  21317. };
  21318. }
  21319. }
  21320. // DGR, 2010/11/12
  21321. if (dest.axis !== 'enu') {
  21322. return adjust_axis(dest, true, point);
  21323. }
  21324. return point;
  21325. }
  21326. // CONCATENATED MODULE: ./node_modules/proj4/lib/core.js
  21327. var core_wgs84 = Proj('WGS84');
  21328. function transformer(from, to, coords) {
  21329. var transformedArray, out, keys;
  21330. if (Array.isArray(coords)) {
  21331. transformedArray = transform(from, to, coords) || {x: NaN, y: NaN};
  21332. if (coords.length > 2) {
  21333. if ((typeof from.name !== 'undefined' && from.name === 'geocent') || (typeof to.name !== 'undefined' && to.name === 'geocent')) {
  21334. if (typeof transformedArray.z === 'number') {
  21335. return [transformedArray.x, transformedArray.y, transformedArray.z].concat(coords.splice(3));
  21336. } else {
  21337. return [transformedArray.x, transformedArray.y, coords[2]].concat(coords.splice(3));
  21338. }
  21339. } else {
  21340. return [transformedArray.x, transformedArray.y].concat(coords.splice(2));
  21341. }
  21342. } else {
  21343. return [transformedArray.x, transformedArray.y];
  21344. }
  21345. } else {
  21346. out = transform(from, to, coords);
  21347. keys = Object.keys(coords);
  21348. if (keys.length === 2) {
  21349. return out;
  21350. }
  21351. keys.forEach(function (key) {
  21352. if ((typeof from.name !== 'undefined' && from.name === 'geocent') || (typeof to.name !== 'undefined' && to.name === 'geocent')) {
  21353. if (key === 'x' || key === 'y' || key === 'z') {
  21354. return;
  21355. }
  21356. } else {
  21357. if (key === 'x' || key === 'y') {
  21358. return;
  21359. }
  21360. }
  21361. out[key] = coords[key];
  21362. });
  21363. return out;
  21364. }
  21365. }
  21366. function checkProj(item) {
  21367. if (item instanceof Proj) {
  21368. return item;
  21369. }
  21370. if (item.oProj) {
  21371. return item.oProj;
  21372. }
  21373. return Proj(item);
  21374. }
  21375. function core_proj4(fromProj, toProj, coord) {
  21376. fromProj = checkProj(fromProj);
  21377. var single = false;
  21378. var obj;
  21379. if (typeof toProj === 'undefined') {
  21380. toProj = fromProj;
  21381. fromProj = core_wgs84;
  21382. single = true;
  21383. } else if (typeof toProj.x !== 'undefined' || Array.isArray(toProj)) {
  21384. coord = toProj;
  21385. toProj = fromProj;
  21386. fromProj = core_wgs84;
  21387. single = true;
  21388. }
  21389. toProj = checkProj(toProj);
  21390. if (coord) {
  21391. return transformer(fromProj, toProj, coord);
  21392. } else {
  21393. obj = {
  21394. forward: function (coords) {
  21395. return transformer(fromProj, toProj, coords);
  21396. },
  21397. inverse: function (coords) {
  21398. return transformer(toProj, fromProj, coords);
  21399. }
  21400. };
  21401. if (single) {
  21402. obj.oProj = toProj;
  21403. }
  21404. return obj;
  21405. }
  21406. }
  21407. /* harmony default export */ var core = (core_proj4);
  21408. // CONCATENATED MODULE: ./node_modules/mgrs/mgrs.js
  21409. /**
  21410. * UTM zones are grouped, and assigned to one of a group of 6
  21411. * sets.
  21412. *
  21413. * {int} @private
  21414. */
  21415. var NUM_100K_SETS = 6;
  21416. /**
  21417. * The column letters (for easting) of the lower left value, per
  21418. * set.
  21419. *
  21420. * {string} @private
  21421. */
  21422. var SET_ORIGIN_COLUMN_LETTERS = 'AJSAJS';
  21423. /**
  21424. * The row letters (for northing) of the lower left value, per
  21425. * set.
  21426. *
  21427. * {string} @private
  21428. */
  21429. var SET_ORIGIN_ROW_LETTERS = 'AFAFAF';
  21430. var mgrs_A = 65; // A
  21431. var I = 73; // I
  21432. var O = 79; // O
  21433. var mgrs_V = 86; // V
  21434. var mgrs_Z = 90; // Z
  21435. /* harmony default export */ var mgrs = ({
  21436. forward: mgrs_forward,
  21437. inverse: mgrs_inverse,
  21438. toPoint: mgrs_toPoint
  21439. });
  21440. /**
  21441. * Conversion of lat/lon to MGRS.
  21442. *
  21443. * @param {object} ll Object literal with lat and lon properties on a
  21444. * WGS84 ellipsoid.
  21445. * @param {int} accuracy Accuracy in digits (5 for 1 m, 4 for 10 m, 3 for
  21446. * 100 m, 2 for 1000 m or 1 for 10000 m). Optional, default is 5.
  21447. * @return {string} the MGRS string for the given location and accuracy.
  21448. */
  21449. function mgrs_forward(ll, accuracy) {
  21450. accuracy = accuracy || 5; // default accuracy 1m
  21451. return encode(LLtoUTM({
  21452. lat: ll[1],
  21453. lon: ll[0]
  21454. }), accuracy);
  21455. };
  21456. /**
  21457. * Conversion of MGRS to lat/lon.
  21458. *
  21459. * @param {string} mgrs MGRS string.
  21460. * @return {array} An array with left (longitude), bottom (latitude), right
  21461. * (longitude) and top (latitude) values in WGS84, representing the
  21462. * bounding box for the provided MGRS reference.
  21463. */
  21464. function mgrs_inverse(mgrs) {
  21465. var bbox = UTMtoLL(decode(mgrs.toUpperCase()));
  21466. if (bbox.lat && bbox.lon) {
  21467. return [bbox.lon, bbox.lat, bbox.lon, bbox.lat];
  21468. }
  21469. return [bbox.left, bbox.bottom, bbox.right, bbox.top];
  21470. };
  21471. function mgrs_toPoint(mgrs) {
  21472. var bbox = UTMtoLL(decode(mgrs.toUpperCase()));
  21473. if (bbox.lat && bbox.lon) {
  21474. return [bbox.lon, bbox.lat];
  21475. }
  21476. return [(bbox.left + bbox.right) / 2, (bbox.top + bbox.bottom) / 2];
  21477. };
  21478. /**
  21479. * Conversion from degrees to radians.
  21480. *
  21481. * @private
  21482. * @param {number} deg the angle in degrees.
  21483. * @return {number} the angle in radians.
  21484. */
  21485. function degToRad(deg) {
  21486. return (deg * (Math.PI / 180.0));
  21487. }
  21488. /**
  21489. * Conversion from radians to degrees.
  21490. *
  21491. * @private
  21492. * @param {number} rad the angle in radians.
  21493. * @return {number} the angle in degrees.
  21494. */
  21495. function radToDeg(rad) {
  21496. return (180.0 * (rad / Math.PI));
  21497. }
  21498. /**
  21499. * Converts a set of Longitude and Latitude co-ordinates to UTM
  21500. * using the WGS84 ellipsoid.
  21501. *
  21502. * @private
  21503. * @param {object} ll Object literal with lat and lon properties
  21504. * representing the WGS84 coordinate to be converted.
  21505. * @return {object} Object literal containing the UTM value with easting,
  21506. * northing, zoneNumber and zoneLetter properties, and an optional
  21507. * accuracy property in digits. Returns null if the conversion failed.
  21508. */
  21509. function LLtoUTM(ll) {
  21510. var Lat = ll.lat;
  21511. var Long = ll.lon;
  21512. var a = 6378137.0; //ellip.radius;
  21513. var eccSquared = 0.00669438; //ellip.eccsq;
  21514. var k0 = 0.9996;
  21515. var LongOrigin;
  21516. var eccPrimeSquared;
  21517. var N, T, C, A, M;
  21518. var LatRad = degToRad(Lat);
  21519. var LongRad = degToRad(Long);
  21520. var LongOriginRad;
  21521. var ZoneNumber;
  21522. // (int)
  21523. ZoneNumber = Math.floor((Long + 180) / 6) + 1;
  21524. //Make sure the longitude 180.00 is in Zone 60
  21525. if (Long === 180) {
  21526. ZoneNumber = 60;
  21527. }
  21528. // Special zone for Norway
  21529. if (Lat >= 56.0 && Lat < 64.0 && Long >= 3.0 && Long < 12.0) {
  21530. ZoneNumber = 32;
  21531. }
  21532. // Special zones for Svalbard
  21533. if (Lat >= 72.0 && Lat < 84.0) {
  21534. if (Long >= 0.0 && Long < 9.0) {
  21535. ZoneNumber = 31;
  21536. }
  21537. else if (Long >= 9.0 && Long < 21.0) {
  21538. ZoneNumber = 33;
  21539. }
  21540. else if (Long >= 21.0 && Long < 33.0) {
  21541. ZoneNumber = 35;
  21542. }
  21543. else if (Long >= 33.0 && Long < 42.0) {
  21544. ZoneNumber = 37;
  21545. }
  21546. }
  21547. LongOrigin = (ZoneNumber - 1) * 6 - 180 + 3; //+3 puts origin
  21548. // in middle of
  21549. // zone
  21550. LongOriginRad = degToRad(LongOrigin);
  21551. eccPrimeSquared = (eccSquared) / (1 - eccSquared);
  21552. N = a / Math.sqrt(1 - eccSquared * Math.sin(LatRad) * Math.sin(LatRad));
  21553. T = Math.tan(LatRad) * Math.tan(LatRad);
  21554. C = eccPrimeSquared * Math.cos(LatRad) * Math.cos(LatRad);
  21555. A = Math.cos(LatRad) * (LongRad - LongOriginRad);
  21556. M = a * ((1 - eccSquared / 4 - 3 * eccSquared * eccSquared / 64 - 5 * eccSquared * eccSquared * eccSquared / 256) * LatRad - (3 * eccSquared / 8 + 3 * eccSquared * eccSquared / 32 + 45 * eccSquared * eccSquared * eccSquared / 1024) * Math.sin(2 * LatRad) + (15 * eccSquared * eccSquared / 256 + 45 * eccSquared * eccSquared * eccSquared / 1024) * Math.sin(4 * LatRad) - (35 * eccSquared * eccSquared * eccSquared / 3072) * Math.sin(6 * LatRad));
  21557. var UTMEasting = (k0 * N * (A + (1 - T + C) * A * A * A / 6.0 + (5 - 18 * T + T * T + 72 * C - 58 * eccPrimeSquared) * A * A * A * A * A / 120.0) + 500000.0);
  21558. var UTMNorthing = (k0 * (M + N * Math.tan(LatRad) * (A * A / 2 + (5 - T + 9 * C + 4 * C * C) * A * A * A * A / 24.0 + (61 - 58 * T + T * T + 600 * C - 330 * eccPrimeSquared) * A * A * A * A * A * A / 720.0)));
  21559. if (Lat < 0.0) {
  21560. UTMNorthing += 10000000.0; //10000000 meter offset for
  21561. // southern hemisphere
  21562. }
  21563. return {
  21564. northing: Math.round(UTMNorthing),
  21565. easting: Math.round(UTMEasting),
  21566. zoneNumber: ZoneNumber,
  21567. zoneLetter: getLetterDesignator(Lat)
  21568. };
  21569. }
  21570. /**
  21571. * Converts UTM coords to lat/long, using the WGS84 ellipsoid. This is a convenience
  21572. * class where the Zone can be specified as a single string eg."60N" which
  21573. * is then broken down into the ZoneNumber and ZoneLetter.
  21574. *
  21575. * @private
  21576. * @param {object} utm An object literal with northing, easting, zoneNumber
  21577. * and zoneLetter properties. If an optional accuracy property is
  21578. * provided (in meters), a bounding box will be returned instead of
  21579. * latitude and longitude.
  21580. * @return {object} An object literal containing either lat and lon values
  21581. * (if no accuracy was provided), or top, right, bottom and left values
  21582. * for the bounding box calculated according to the provided accuracy.
  21583. * Returns null if the conversion failed.
  21584. */
  21585. function UTMtoLL(utm) {
  21586. var UTMNorthing = utm.northing;
  21587. var UTMEasting = utm.easting;
  21588. var zoneLetter = utm.zoneLetter;
  21589. var zoneNumber = utm.zoneNumber;
  21590. // check the ZoneNummber is valid
  21591. if (zoneNumber < 0 || zoneNumber > 60) {
  21592. return null;
  21593. }
  21594. var k0 = 0.9996;
  21595. var a = 6378137.0; //ellip.radius;
  21596. var eccSquared = 0.00669438; //ellip.eccsq;
  21597. var eccPrimeSquared;
  21598. var e1 = (1 - Math.sqrt(1 - eccSquared)) / (1 + Math.sqrt(1 - eccSquared));
  21599. var N1, T1, C1, R1, D, M;
  21600. var LongOrigin;
  21601. var mu, phi1Rad;
  21602. // remove 500,000 meter offset for longitude
  21603. var x = UTMEasting - 500000.0;
  21604. var y = UTMNorthing;
  21605. // We must know somehow if we are in the Northern or Southern
  21606. // hemisphere, this is the only time we use the letter So even
  21607. // if the Zone letter isn't exactly correct it should indicate
  21608. // the hemisphere correctly
  21609. if (zoneLetter < 'N') {
  21610. y -= 10000000.0; // remove 10,000,000 meter offset used
  21611. // for southern hemisphere
  21612. }
  21613. // There are 60 zones with zone 1 being at West -180 to -174
  21614. LongOrigin = (zoneNumber - 1) * 6 - 180 + 3; // +3 puts origin
  21615. // in middle of
  21616. // zone
  21617. eccPrimeSquared = (eccSquared) / (1 - eccSquared);
  21618. M = y / k0;
  21619. mu = M / (a * (1 - eccSquared / 4 - 3 * eccSquared * eccSquared / 64 - 5 * eccSquared * eccSquared * eccSquared / 256));
  21620. phi1Rad = mu + (3 * e1 / 2 - 27 * e1 * e1 * e1 / 32) * Math.sin(2 * mu) + (21 * e1 * e1 / 16 - 55 * e1 * e1 * e1 * e1 / 32) * Math.sin(4 * mu) + (151 * e1 * e1 * e1 / 96) * Math.sin(6 * mu);
  21621. // double phi1 = ProjMath.radToDeg(phi1Rad);
  21622. N1 = a / Math.sqrt(1 - eccSquared * Math.sin(phi1Rad) * Math.sin(phi1Rad));
  21623. T1 = Math.tan(phi1Rad) * Math.tan(phi1Rad);
  21624. C1 = eccPrimeSquared * Math.cos(phi1Rad) * Math.cos(phi1Rad);
  21625. R1 = a * (1 - eccSquared) / Math.pow(1 - eccSquared * Math.sin(phi1Rad) * Math.sin(phi1Rad), 1.5);
  21626. D = x / (N1 * k0);
  21627. var lat = phi1Rad - (N1 * Math.tan(phi1Rad) / R1) * (D * D / 2 - (5 + 3 * T1 + 10 * C1 - 4 * C1 * C1 - 9 * eccPrimeSquared) * D * D * D * D / 24 + (61 + 90 * T1 + 298 * C1 + 45 * T1 * T1 - 252 * eccPrimeSquared - 3 * C1 * C1) * D * D * D * D * D * D / 720);
  21628. lat = radToDeg(lat);
  21629. var lon = (D - (1 + 2 * T1 + C1) * D * D * D / 6 + (5 - 2 * C1 + 28 * T1 - 3 * C1 * C1 + 8 * eccPrimeSquared + 24 * T1 * T1) * D * D * D * D * D / 120) / Math.cos(phi1Rad);
  21630. lon = LongOrigin + radToDeg(lon);
  21631. var result;
  21632. if (utm.accuracy) {
  21633. var topRight = UTMtoLL({
  21634. northing: utm.northing + utm.accuracy,
  21635. easting: utm.easting + utm.accuracy,
  21636. zoneLetter: utm.zoneLetter,
  21637. zoneNumber: utm.zoneNumber
  21638. });
  21639. result = {
  21640. top: topRight.lat,
  21641. right: topRight.lon,
  21642. bottom: lat,
  21643. left: lon
  21644. };
  21645. }
  21646. else {
  21647. result = {
  21648. lat: lat,
  21649. lon: lon
  21650. };
  21651. }
  21652. return result;
  21653. }
  21654. /**
  21655. * Calculates the MGRS letter designator for the given latitude.
  21656. *
  21657. * @private
  21658. * @param {number} lat The latitude in WGS84 to get the letter designator
  21659. * for.
  21660. * @return {char} The letter designator.
  21661. */
  21662. function getLetterDesignator(lat) {
  21663. //This is here as an error flag to show that the Latitude is
  21664. //outside MGRS limits
  21665. var LetterDesignator = 'Z';
  21666. if ((84 >= lat) && (lat >= 72)) {
  21667. LetterDesignator = 'X';
  21668. }
  21669. else if ((72 > lat) && (lat >= 64)) {
  21670. LetterDesignator = 'W';
  21671. }
  21672. else if ((64 > lat) && (lat >= 56)) {
  21673. LetterDesignator = 'V';
  21674. }
  21675. else if ((56 > lat) && (lat >= 48)) {
  21676. LetterDesignator = 'U';
  21677. }
  21678. else if ((48 > lat) && (lat >= 40)) {
  21679. LetterDesignator = 'T';
  21680. }
  21681. else if ((40 > lat) && (lat >= 32)) {
  21682. LetterDesignator = 'S';
  21683. }
  21684. else if ((32 > lat) && (lat >= 24)) {
  21685. LetterDesignator = 'R';
  21686. }
  21687. else if ((24 > lat) && (lat >= 16)) {
  21688. LetterDesignator = 'Q';
  21689. }
  21690. else if ((16 > lat) && (lat >= 8)) {
  21691. LetterDesignator = 'P';
  21692. }
  21693. else if ((8 > lat) && (lat >= 0)) {
  21694. LetterDesignator = 'N';
  21695. }
  21696. else if ((0 > lat) && (lat >= -8)) {
  21697. LetterDesignator = 'M';
  21698. }
  21699. else if ((-8 > lat) && (lat >= -16)) {
  21700. LetterDesignator = 'L';
  21701. }
  21702. else if ((-16 > lat) && (lat >= -24)) {
  21703. LetterDesignator = 'K';
  21704. }
  21705. else if ((-24 > lat) && (lat >= -32)) {
  21706. LetterDesignator = 'J';
  21707. }
  21708. else if ((-32 > lat) && (lat >= -40)) {
  21709. LetterDesignator = 'H';
  21710. }
  21711. else if ((-40 > lat) && (lat >= -48)) {
  21712. LetterDesignator = 'G';
  21713. }
  21714. else if ((-48 > lat) && (lat >= -56)) {
  21715. LetterDesignator = 'F';
  21716. }
  21717. else if ((-56 > lat) && (lat >= -64)) {
  21718. LetterDesignator = 'E';
  21719. }
  21720. else if ((-64 > lat) && (lat >= -72)) {
  21721. LetterDesignator = 'D';
  21722. }
  21723. else if ((-72 > lat) && (lat >= -80)) {
  21724. LetterDesignator = 'C';
  21725. }
  21726. return LetterDesignator;
  21727. }
  21728. /**
  21729. * Encodes a UTM location as MGRS string.
  21730. *
  21731. * @private
  21732. * @param {object} utm An object literal with easting, northing,
  21733. * zoneLetter, zoneNumber
  21734. * @param {number} accuracy Accuracy in digits (1-5).
  21735. * @return {string} MGRS string for the given UTM location.
  21736. */
  21737. function encode(utm, accuracy) {
  21738. // prepend with leading zeroes
  21739. var seasting = "00000" + utm.easting,
  21740. snorthing = "00000" + utm.northing;
  21741. return utm.zoneNumber + utm.zoneLetter + get100kID(utm.easting, utm.northing, utm.zoneNumber) + seasting.substr(seasting.length - 5, accuracy) + snorthing.substr(snorthing.length - 5, accuracy);
  21742. }
  21743. /**
  21744. * Get the two letter 100k designator for a given UTM easting,
  21745. * northing and zone number value.
  21746. *
  21747. * @private
  21748. * @param {number} easting
  21749. * @param {number} northing
  21750. * @param {number} zoneNumber
  21751. * @return the two letter 100k designator for the given UTM location.
  21752. */
  21753. function get100kID(easting, northing, zoneNumber) {
  21754. var setParm = get100kSetForZone(zoneNumber);
  21755. var setColumn = Math.floor(easting / 100000);
  21756. var setRow = Math.floor(northing / 100000) % 20;
  21757. return getLetter100kID(setColumn, setRow, setParm);
  21758. }
  21759. /**
  21760. * Given a UTM zone number, figure out the MGRS 100K set it is in.
  21761. *
  21762. * @private
  21763. * @param {number} i An UTM zone number.
  21764. * @return {number} the 100k set the UTM zone is in.
  21765. */
  21766. function get100kSetForZone(i) {
  21767. var setParm = i % NUM_100K_SETS;
  21768. if (setParm === 0) {
  21769. setParm = NUM_100K_SETS;
  21770. }
  21771. return setParm;
  21772. }
  21773. /**
  21774. * Get the two-letter MGRS 100k designator given information
  21775. * translated from the UTM northing, easting and zone number.
  21776. *
  21777. * @private
  21778. * @param {number} column the column index as it relates to the MGRS
  21779. * 100k set spreadsheet, created from the UTM easting.
  21780. * Values are 1-8.
  21781. * @param {number} row the row index as it relates to the MGRS 100k set
  21782. * spreadsheet, created from the UTM northing value. Values
  21783. * are from 0-19.
  21784. * @param {number} parm the set block, as it relates to the MGRS 100k set
  21785. * spreadsheet, created from the UTM zone. Values are from
  21786. * 1-60.
  21787. * @return two letter MGRS 100k code.
  21788. */
  21789. function getLetter100kID(column, row, parm) {
  21790. // colOrigin and rowOrigin are the letters at the origin of the set
  21791. var index = parm - 1;
  21792. var colOrigin = SET_ORIGIN_COLUMN_LETTERS.charCodeAt(index);
  21793. var rowOrigin = SET_ORIGIN_ROW_LETTERS.charCodeAt(index);
  21794. // colInt and rowInt are the letters to build to return
  21795. var colInt = colOrigin + column - 1;
  21796. var rowInt = rowOrigin + row;
  21797. var rollover = false;
  21798. if (colInt > mgrs_Z) {
  21799. colInt = colInt - mgrs_Z + mgrs_A - 1;
  21800. rollover = true;
  21801. }
  21802. if (colInt === I || (colOrigin < I && colInt > I) || ((colInt > I || colOrigin < I) && rollover)) {
  21803. colInt++;
  21804. }
  21805. if (colInt === O || (colOrigin < O && colInt > O) || ((colInt > O || colOrigin < O) && rollover)) {
  21806. colInt++;
  21807. if (colInt === I) {
  21808. colInt++;
  21809. }
  21810. }
  21811. if (colInt > mgrs_Z) {
  21812. colInt = colInt - mgrs_Z + mgrs_A - 1;
  21813. }
  21814. if (rowInt > mgrs_V) {
  21815. rowInt = rowInt - mgrs_V + mgrs_A - 1;
  21816. rollover = true;
  21817. }
  21818. else {
  21819. rollover = false;
  21820. }
  21821. if (((rowInt === I) || ((rowOrigin < I) && (rowInt > I))) || (((rowInt > I) || (rowOrigin < I)) && rollover)) {
  21822. rowInt++;
  21823. }
  21824. if (((rowInt === O) || ((rowOrigin < O) && (rowInt > O))) || (((rowInt > O) || (rowOrigin < O)) && rollover)) {
  21825. rowInt++;
  21826. if (rowInt === I) {
  21827. rowInt++;
  21828. }
  21829. }
  21830. if (rowInt > mgrs_V) {
  21831. rowInt = rowInt - mgrs_V + mgrs_A - 1;
  21832. }
  21833. var twoLetter = String.fromCharCode(colInt) + String.fromCharCode(rowInt);
  21834. return twoLetter;
  21835. }
  21836. /**
  21837. * Decode the UTM parameters from a MGRS string.
  21838. *
  21839. * @private
  21840. * @param {string} mgrsString an UPPERCASE coordinate string is expected.
  21841. * @return {object} An object literal with easting, northing, zoneLetter,
  21842. * zoneNumber and accuracy (in meters) properties.
  21843. */
  21844. function decode(mgrsString) {
  21845. if (mgrsString && mgrsString.length === 0) {
  21846. throw ("MGRSPoint coverting from nothing");
  21847. }
  21848. var length = mgrsString.length;
  21849. var hunK = null;
  21850. var sb = "";
  21851. var testChar;
  21852. var i = 0;
  21853. // get Zone number
  21854. while (!(/[A-Z]/).test(testChar = mgrsString.charAt(i))) {
  21855. if (i >= 2) {
  21856. throw ("MGRSPoint bad conversion from: " + mgrsString);
  21857. }
  21858. sb += testChar;
  21859. i++;
  21860. }
  21861. var zoneNumber = parseInt(sb, 10);
  21862. if (i === 0 || i + 3 > length) {
  21863. // A good MGRS string has to be 4-5 digits long,
  21864. // ##AAA/#AAA at least.
  21865. throw ("MGRSPoint bad conversion from: " + mgrsString);
  21866. }
  21867. var zoneLetter = mgrsString.charAt(i++);
  21868. // Should we check the zone letter here? Why not.
  21869. if (zoneLetter <= 'A' || zoneLetter === 'B' || zoneLetter === 'Y' || zoneLetter >= 'Z' || zoneLetter === 'I' || zoneLetter === 'O') {
  21870. throw ("MGRSPoint zone letter " + zoneLetter + " not handled: " + mgrsString);
  21871. }
  21872. hunK = mgrsString.substring(i, i += 2);
  21873. var set = get100kSetForZone(zoneNumber);
  21874. var east100k = getEastingFromChar(hunK.charAt(0), set);
  21875. var north100k = getNorthingFromChar(hunK.charAt(1), set);
  21876. // We have a bug where the northing may be 2000000 too low.
  21877. // How
  21878. // do we know when to roll over?
  21879. while (north100k < getMinNorthing(zoneLetter)) {
  21880. north100k += 2000000;
  21881. }
  21882. // calculate the char index for easting/northing separator
  21883. var remainder = length - i;
  21884. if (remainder % 2 !== 0) {
  21885. throw ("MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters" + mgrsString);
  21886. }
  21887. var sep = remainder / 2;
  21888. var sepEasting = 0.0;
  21889. var sepNorthing = 0.0;
  21890. var accuracyBonus, sepEastingString, sepNorthingString, easting, northing;
  21891. if (sep > 0) {
  21892. accuracyBonus = 100000.0 / Math.pow(10, sep);
  21893. sepEastingString = mgrsString.substring(i, i + sep);
  21894. sepEasting = parseFloat(sepEastingString) * accuracyBonus;
  21895. sepNorthingString = mgrsString.substring(i + sep);
  21896. sepNorthing = parseFloat(sepNorthingString) * accuracyBonus;
  21897. }
  21898. easting = sepEasting + east100k;
  21899. northing = sepNorthing + north100k;
  21900. return {
  21901. easting: easting,
  21902. northing: northing,
  21903. zoneLetter: zoneLetter,
  21904. zoneNumber: zoneNumber,
  21905. accuracy: accuracyBonus
  21906. };
  21907. }
  21908. /**
  21909. * Given the first letter from a two-letter MGRS 100k zone, and given the
  21910. * MGRS table set for the zone number, figure out the easting value that
  21911. * should be added to the other, secondary easting value.
  21912. *
  21913. * @private
  21914. * @param {char} e The first letter from a two-letter MGRS 100´k zone.
  21915. * @param {number} set The MGRS table set for the zone number.
  21916. * @return {number} The easting value for the given letter and set.
  21917. */
  21918. function getEastingFromChar(e, set) {
  21919. // colOrigin is the letter at the origin of the set for the
  21920. // column
  21921. var curCol = SET_ORIGIN_COLUMN_LETTERS.charCodeAt(set - 1);
  21922. var eastingValue = 100000.0;
  21923. var rewindMarker = false;
  21924. while (curCol !== e.charCodeAt(0)) {
  21925. curCol++;
  21926. if (curCol === I) {
  21927. curCol++;
  21928. }
  21929. if (curCol === O) {
  21930. curCol++;
  21931. }
  21932. if (curCol > mgrs_Z) {
  21933. if (rewindMarker) {
  21934. throw ("Bad character: " + e);
  21935. }
  21936. curCol = mgrs_A;
  21937. rewindMarker = true;
  21938. }
  21939. eastingValue += 100000.0;
  21940. }
  21941. return eastingValue;
  21942. }
  21943. /**
  21944. * Given the second letter from a two-letter MGRS 100k zone, and given the
  21945. * MGRS table set for the zone number, figure out the northing value that
  21946. * should be added to the other, secondary northing value. You have to
  21947. * remember that Northings are determined from the equator, and the vertical
  21948. * cycle of letters mean a 2000000 additional northing meters. This happens
  21949. * approx. every 18 degrees of latitude. This method does *NOT* count any
  21950. * additional northings. You have to figure out how many 2000000 meters need
  21951. * to be added for the zone letter of the MGRS coordinate.
  21952. *
  21953. * @private
  21954. * @param {char} n Second letter of the MGRS 100k zone
  21955. * @param {number} set The MGRS table set number, which is dependent on the
  21956. * UTM zone number.
  21957. * @return {number} The northing value for the given letter and set.
  21958. */
  21959. function getNorthingFromChar(n, set) {
  21960. if (n > 'V') {
  21961. throw ("MGRSPoint given invalid Northing " + n);
  21962. }
  21963. // rowOrigin is the letter at the origin of the set for the
  21964. // column
  21965. var curRow = SET_ORIGIN_ROW_LETTERS.charCodeAt(set - 1);
  21966. var northingValue = 0.0;
  21967. var rewindMarker = false;
  21968. while (curRow !== n.charCodeAt(0)) {
  21969. curRow++;
  21970. if (curRow === I) {
  21971. curRow++;
  21972. }
  21973. if (curRow === O) {
  21974. curRow++;
  21975. }
  21976. // fixing a bug making whole application hang in this loop
  21977. // when 'n' is a wrong character
  21978. if (curRow > mgrs_V) {
  21979. if (rewindMarker) { // making sure that this loop ends
  21980. throw ("Bad character: " + n);
  21981. }
  21982. curRow = mgrs_A;
  21983. rewindMarker = true;
  21984. }
  21985. northingValue += 100000.0;
  21986. }
  21987. return northingValue;
  21988. }
  21989. /**
  21990. * The function getMinNorthing returns the minimum northing value of a MGRS
  21991. * zone.
  21992. *
  21993. * Ported from Geotrans' c Lattitude_Band_Value structure table.
  21994. *
  21995. * @private
  21996. * @param {char} zoneLetter The MGRS zone to get the min northing for.
  21997. * @return {number}
  21998. */
  21999. function getMinNorthing(zoneLetter) {
  22000. var northing;
  22001. switch (zoneLetter) {
  22002. case 'C':
  22003. northing = 1100000.0;
  22004. break;
  22005. case 'D':
  22006. northing = 2000000.0;
  22007. break;
  22008. case 'E':
  22009. northing = 2800000.0;
  22010. break;
  22011. case 'F':
  22012. northing = 3700000.0;
  22013. break;
  22014. case 'G':
  22015. northing = 4600000.0;
  22016. break;
  22017. case 'H':
  22018. northing = 5500000.0;
  22019. break;
  22020. case 'J':
  22021. northing = 6400000.0;
  22022. break;
  22023. case 'K':
  22024. northing = 7300000.0;
  22025. break;
  22026. case 'L':
  22027. northing = 8200000.0;
  22028. break;
  22029. case 'M':
  22030. northing = 9100000.0;
  22031. break;
  22032. case 'N':
  22033. northing = 0.0;
  22034. break;
  22035. case 'P':
  22036. northing = 800000.0;
  22037. break;
  22038. case 'Q':
  22039. northing = 1700000.0;
  22040. break;
  22041. case 'R':
  22042. northing = 2600000.0;
  22043. break;
  22044. case 'S':
  22045. northing = 3500000.0;
  22046. break;
  22047. case 'T':
  22048. northing = 4400000.0;
  22049. break;
  22050. case 'U':
  22051. northing = 5300000.0;
  22052. break;
  22053. case 'V':
  22054. northing = 6200000.0;
  22055. break;
  22056. case 'W':
  22057. northing = 7000000.0;
  22058. break;
  22059. case 'X':
  22060. northing = 7900000.0;
  22061. break;
  22062. default:
  22063. northing = -1.0;
  22064. }
  22065. if (northing >= 0.0) {
  22066. return northing;
  22067. }
  22068. else {
  22069. throw ("Invalid zone letter: " + zoneLetter);
  22070. }
  22071. }
  22072. // CONCATENATED MODULE: ./node_modules/proj4/lib/Point.js
  22073. function Point(x, y, z) {
  22074. if (!(this instanceof Point)) {
  22075. return new Point(x, y, z);
  22076. }
  22077. if (Array.isArray(x)) {
  22078. this.x = x[0];
  22079. this.y = x[1];
  22080. this.z = x[2] || 0.0;
  22081. } else if(typeof x === 'object') {
  22082. this.x = x.x;
  22083. this.y = x.y;
  22084. this.z = x.z || 0.0;
  22085. } else if (typeof x === 'string' && typeof y === 'undefined') {
  22086. var coords = x.split(',');
  22087. this.x = parseFloat(coords[0], 10);
  22088. this.y = parseFloat(coords[1], 10);
  22089. this.z = parseFloat(coords[2], 10) || 0.0;
  22090. } else {
  22091. this.x = x;
  22092. this.y = y;
  22093. this.z = z || 0.0;
  22094. }
  22095. console.warn('proj4.Point will be removed in version 3, use proj4.toPoint');
  22096. }
  22097. Point.fromMGRS = function(mgrsStr) {
  22098. return new Point(mgrs_toPoint(mgrsStr));
  22099. };
  22100. Point.prototype.toMGRS = function(accuracy) {
  22101. return mgrs_forward([this.x, this.y], accuracy);
  22102. };
  22103. /* harmony default export */ var lib_Point = (Point);
  22104. // CONCATENATED MODULE: ./node_modules/proj4/lib/common/pj_enfn.js
  22105. var C00 = 1;
  22106. var C02 = 0.25;
  22107. var C04 = 0.046875;
  22108. var C06 = 0.01953125;
  22109. var C08 = 0.01068115234375;
  22110. var C22 = 0.75;
  22111. var C44 = 0.46875;
  22112. var C46 = 0.01302083333333333333;
  22113. var C48 = 0.00712076822916666666;
  22114. var C66 = 0.36458333333333333333;
  22115. var C68 = 0.00569661458333333333;
  22116. var C88 = 0.3076171875;
  22117. /* harmony default export */ var pj_enfn = (function(es) {
  22118. var en = [];
  22119. en[0] = C00 - es * (C02 + es * (C04 + es * (C06 + es * C08)));
  22120. en[1] = es * (C22 - es * (C04 + es * (C06 + es * C08)));
  22121. var t = es * es;
  22122. en[2] = t * (C44 - es * (C46 + es * C48));
  22123. t *= es;
  22124. en[3] = t * (C66 - es * C68);
  22125. en[4] = t * es * C88;
  22126. return en;
  22127. });
  22128. // CONCATENATED MODULE: ./node_modules/proj4/lib/common/pj_mlfn.js
  22129. /* harmony default export */ var pj_mlfn = (function(phi, sphi, cphi, en) {
  22130. cphi *= sphi;
  22131. sphi *= sphi;
  22132. return (en[0] * phi - cphi * (en[1] + sphi * (en[2] + sphi * (en[3] + sphi * en[4]))));
  22133. });
  22134. // CONCATENATED MODULE: ./node_modules/proj4/lib/common/pj_inv_mlfn.js
  22135. var MAX_ITER = 20;
  22136. /* harmony default export */ var pj_inv_mlfn = (function(arg, es, en) {
  22137. var k = 1 / (1 - es);
  22138. var phi = arg;
  22139. for (var i = MAX_ITER; i; --i) { /* rarely goes over 2 iterations */
  22140. var s = Math.sin(phi);
  22141. var t = 1 - es * s * s;
  22142. //t = this.pj_mlfn(phi, s, Math.cos(phi), en) - arg;
  22143. //phi -= t * (t * Math.sqrt(t)) * k;
  22144. t = (pj_mlfn(phi, s, Math.cos(phi), en) - arg) * (t * Math.sqrt(t)) * k;
  22145. phi -= t;
  22146. if (Math.abs(t) < EPSLN) {
  22147. return phi;
  22148. }
  22149. }
  22150. //..reportError("cass:pj_inv_mlfn: Convergence error");
  22151. return phi;
  22152. });
  22153. // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/tmerc.js
  22154. // Heavily based on this tmerc projection implementation
  22155. // https://github.com/mbloch/mapshaper-proj/blob/master/src/projections/tmerc.js
  22156. function tmerc_init() {
  22157. this.x0 = this.x0 !== undefined ? this.x0 : 0;
  22158. this.y0 = this.y0 !== undefined ? this.y0 : 0;
  22159. this.long0 = this.long0 !== undefined ? this.long0 : 0;
  22160. this.lat0 = this.lat0 !== undefined ? this.lat0 : 0;
  22161. if (this.es) {
  22162. this.en = pj_enfn(this.es);
  22163. this.ml0 = pj_mlfn(this.lat0, Math.sin(this.lat0), Math.cos(this.lat0), this.en);
  22164. }
  22165. }
  22166. /**
  22167. Transverse Mercator Forward - long/lat to x/y
  22168. long/lat in radians
  22169. */
  22170. function tmerc_forward(p) {
  22171. var lon = p.x;
  22172. var lat = p.y;
  22173. var delta_lon = adjust_lon(lon - this.long0);
  22174. var con;
  22175. var x, y;
  22176. var sin_phi = Math.sin(lat);
  22177. var cos_phi = Math.cos(lat);
  22178. if (!this.es) {
  22179. var b = cos_phi * Math.sin(delta_lon);
  22180. if ((Math.abs(Math.abs(b) - 1)) < EPSLN) {
  22181. return (93);
  22182. }
  22183. else {
  22184. x = 0.5 * this.a * this.k0 * Math.log((1 + b) / (1 - b)) + this.x0;
  22185. y = cos_phi * Math.cos(delta_lon) / Math.sqrt(1 - Math.pow(b, 2));
  22186. b = Math.abs(y);
  22187. if (b >= 1) {
  22188. if ((b - 1) > EPSLN) {
  22189. return (93);
  22190. }
  22191. else {
  22192. y = 0;
  22193. }
  22194. }
  22195. else {
  22196. y = Math.acos(y);
  22197. }
  22198. if (lat < 0) {
  22199. y = -y;
  22200. }
  22201. y = this.a * this.k0 * (y - this.lat0) + this.y0;
  22202. }
  22203. }
  22204. else {
  22205. var al = cos_phi * delta_lon;
  22206. var als = Math.pow(al, 2);
  22207. var c = this.ep2 * Math.pow(cos_phi, 2);
  22208. var cs = Math.pow(c, 2);
  22209. var tq = Math.abs(cos_phi) > EPSLN ? Math.tan(lat) : 0;
  22210. var t = Math.pow(tq, 2);
  22211. var ts = Math.pow(t, 2);
  22212. con = 1 - this.es * Math.pow(sin_phi, 2);
  22213. al = al / Math.sqrt(con);
  22214. var ml = pj_mlfn(lat, sin_phi, cos_phi, this.en);
  22215. x = this.a * (this.k0 * al * (1 +
  22216. als / 6 * (1 - t + c +
  22217. als / 20 * (5 - 18 * t + ts + 14 * c - 58 * t * c +
  22218. als / 42 * (61 + 179 * ts - ts * t - 479 * t))))) +
  22219. this.x0;
  22220. y = this.a * (this.k0 * (ml - this.ml0 +
  22221. sin_phi * delta_lon * al / 2 * (1 +
  22222. als / 12 * (5 - t + 9 * c + 4 * cs +
  22223. als / 30 * (61 + ts - 58 * t + 270 * c - 330 * t * c +
  22224. als / 56 * (1385 + 543 * ts - ts * t - 3111 * t)))))) +
  22225. this.y0;
  22226. }
  22227. p.x = x;
  22228. p.y = y;
  22229. return p;
  22230. }
  22231. /**
  22232. Transverse Mercator Inverse - x/y to long/lat
  22233. */
  22234. function tmerc_inverse(p) {
  22235. var con, phi;
  22236. var lat, lon;
  22237. var x = (p.x - this.x0) * (1 / this.a);
  22238. var y = (p.y - this.y0) * (1 / this.a);
  22239. if (!this.es) {
  22240. var f = Math.exp(x / this.k0);
  22241. var g = 0.5 * (f - 1 / f);
  22242. var temp = this.lat0 + y / this.k0;
  22243. var h = Math.cos(temp);
  22244. con = Math.sqrt((1 - Math.pow(h, 2)) / (1 + Math.pow(g, 2)));
  22245. lat = Math.asin(con);
  22246. if (y < 0) {
  22247. lat = -lat;
  22248. }
  22249. if ((g === 0) && (h === 0)) {
  22250. lon = 0;
  22251. }
  22252. else {
  22253. lon = adjust_lon(Math.atan2(g, h) + this.long0);
  22254. }
  22255. }
  22256. else { // ellipsoidal form
  22257. con = this.ml0 + y / this.k0;
  22258. phi = pj_inv_mlfn(con, this.es, this.en);
  22259. if (Math.abs(phi) < HALF_PI) {
  22260. var sin_phi = Math.sin(phi);
  22261. var cos_phi = Math.cos(phi);
  22262. var tan_phi = Math.abs(cos_phi) > EPSLN ? Math.tan(phi) : 0;
  22263. var c = this.ep2 * Math.pow(cos_phi, 2);
  22264. var cs = Math.pow(c, 2);
  22265. var t = Math.pow(tan_phi, 2);
  22266. var ts = Math.pow(t, 2);
  22267. con = 1 - this.es * Math.pow(sin_phi, 2);
  22268. var d = x * Math.sqrt(con) / this.k0;
  22269. var ds = Math.pow(d, 2);
  22270. con = con * tan_phi;
  22271. lat = phi - (con * ds / (1 - this.es)) * 0.5 * (1 -
  22272. ds / 12 * (5 + 3 * t - 9 * c * t + c - 4 * cs -
  22273. ds / 30 * (61 + 90 * t - 252 * c * t + 45 * ts + 46 * c -
  22274. ds / 56 * (1385 + 3633 * t + 4095 * ts + 1574 * ts * t))));
  22275. lon = adjust_lon(this.long0 + (d * (1 -
  22276. ds / 6 * (1 + 2 * t + c -
  22277. ds / 20 * (5 + 28 * t + 24 * ts + 8 * c * t + 6 * c -
  22278. ds / 42 * (61 + 662 * t + 1320 * ts + 720 * ts * t)))) / cos_phi));
  22279. }
  22280. else {
  22281. lat = HALF_PI * sign(y);
  22282. lon = 0;
  22283. }
  22284. }
  22285. p.x = lon;
  22286. p.y = lat;
  22287. return p;
  22288. }
  22289. var tmerc_names = ["Transverse_Mercator", "Transverse Mercator", "tmerc"];
  22290. /* harmony default export */ var tmerc = ({
  22291. init: tmerc_init,
  22292. forward: tmerc_forward,
  22293. inverse: tmerc_inverse,
  22294. names: tmerc_names
  22295. });
  22296. // CONCATENATED MODULE: ./node_modules/proj4/lib/common/sinh.js
  22297. /* harmony default export */ var sinh = (function(x) {
  22298. var r = Math.exp(x);
  22299. r = (r - 1 / r) / 2;
  22300. return r;
  22301. });
  22302. // CONCATENATED MODULE: ./node_modules/proj4/lib/common/hypot.js
  22303. /* harmony default export */ var hypot = (function(x, y) {
  22304. x = Math.abs(x);
  22305. y = Math.abs(y);
  22306. var a = Math.max(x, y);
  22307. var b = Math.min(x, y) / (a ? a : 1);
  22308. return a * Math.sqrt(1 + Math.pow(b, 2));
  22309. });
  22310. // CONCATENATED MODULE: ./node_modules/proj4/lib/common/log1py.js
  22311. /* harmony default export */ var log1py = (function(x) {
  22312. var y = 1 + x;
  22313. var z = y - 1;
  22314. return z === 0 ? x : x * Math.log(y) / z;
  22315. });
  22316. // CONCATENATED MODULE: ./node_modules/proj4/lib/common/asinhy.js
  22317. /* harmony default export */ var asinhy = (function(x) {
  22318. var y = Math.abs(x);
  22319. y = log1py(y * (1 + y / (hypot(1, y) + 1)));
  22320. return x < 0 ? -y : y;
  22321. });
  22322. // CONCATENATED MODULE: ./node_modules/proj4/lib/common/gatg.js
  22323. /* harmony default export */ var gatg = (function(pp, B) {
  22324. var cos_2B = 2 * Math.cos(2 * B);
  22325. var i = pp.length - 1;
  22326. var h1 = pp[i];
  22327. var h2 = 0;
  22328. var h;
  22329. while (--i >= 0) {
  22330. h = -h2 + cos_2B * h1 + pp[i];
  22331. h2 = h1;
  22332. h1 = h;
  22333. }
  22334. return (B + h * Math.sin(2 * B));
  22335. });
  22336. // CONCATENATED MODULE: ./node_modules/proj4/lib/common/clens.js
  22337. /* harmony default export */ var clens = (function(pp, arg_r) {
  22338. var r = 2 * Math.cos(arg_r);
  22339. var i = pp.length - 1;
  22340. var hr1 = pp[i];
  22341. var hr2 = 0;
  22342. var hr;
  22343. while (--i >= 0) {
  22344. hr = -hr2 + r * hr1 + pp[i];
  22345. hr2 = hr1;
  22346. hr1 = hr;
  22347. }
  22348. return Math.sin(arg_r) * hr;
  22349. });
  22350. // CONCATENATED MODULE: ./node_modules/proj4/lib/common/cosh.js
  22351. /* harmony default export */ var cosh = (function(x) {
  22352. var r = Math.exp(x);
  22353. r = (r + 1 / r) / 2;
  22354. return r;
  22355. });
  22356. // CONCATENATED MODULE: ./node_modules/proj4/lib/common/clens_cmplx.js
  22357. /* harmony default export */ var clens_cmplx = (function(pp, arg_r, arg_i) {
  22358. var sin_arg_r = Math.sin(arg_r);
  22359. var cos_arg_r = Math.cos(arg_r);
  22360. var sinh_arg_i = sinh(arg_i);
  22361. var cosh_arg_i = cosh(arg_i);
  22362. var r = 2 * cos_arg_r * cosh_arg_i;
  22363. var i = -2 * sin_arg_r * sinh_arg_i;
  22364. var j = pp.length - 1;
  22365. var hr = pp[j];
  22366. var hi1 = 0;
  22367. var hr1 = 0;
  22368. var hi = 0;
  22369. var hr2;
  22370. var hi2;
  22371. while (--j >= 0) {
  22372. hr2 = hr1;
  22373. hi2 = hi1;
  22374. hr1 = hr;
  22375. hi1 = hi;
  22376. hr = -hr2 + r * hr1 - i * hi1 + pp[j];
  22377. hi = -hi2 + i * hr1 + r * hi1;
  22378. }
  22379. r = sin_arg_r * cosh_arg_i;
  22380. i = cos_arg_r * sinh_arg_i;
  22381. return [r * hr - i * hi, r * hi + i * hr];
  22382. });
  22383. // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/etmerc.js
  22384. // Heavily based on this etmerc projection implementation
  22385. // https://github.com/mbloch/mapshaper-proj/blob/master/src/projections/etmerc.js
  22386. function etmerc_init() {
  22387. if (this.es === undefined || this.es <= 0) {
  22388. throw new Error('incorrect elliptical usage');
  22389. }
  22390. this.x0 = this.x0 !== undefined ? this.x0 : 0;
  22391. this.y0 = this.y0 !== undefined ? this.y0 : 0;
  22392. this.long0 = this.long0 !== undefined ? this.long0 : 0;
  22393. this.lat0 = this.lat0 !== undefined ? this.lat0 : 0;
  22394. this.cgb = [];
  22395. this.cbg = [];
  22396. this.utg = [];
  22397. this.gtu = [];
  22398. var f = this.es / (1 + Math.sqrt(1 - this.es));
  22399. var n = f / (2 - f);
  22400. var np = n;
  22401. this.cgb[0] = n * (2 + n * (-2 / 3 + n * (-2 + n * (116 / 45 + n * (26 / 45 + n * (-2854 / 675 ))))));
  22402. this.cbg[0] = n * (-2 + n * ( 2 / 3 + n * ( 4 / 3 + n * (-82 / 45 + n * (32 / 45 + n * (4642 / 4725))))));
  22403. np = np * n;
  22404. this.cgb[1] = np * (7 / 3 + n * (-8 / 5 + n * (-227 / 45 + n * (2704 / 315 + n * (2323 / 945)))));
  22405. this.cbg[1] = np * (5 / 3 + n * (-16 / 15 + n * ( -13 / 9 + n * (904 / 315 + n * (-1522 / 945)))));
  22406. np = np * n;
  22407. this.cgb[2] = np * (56 / 15 + n * (-136 / 35 + n * (-1262 / 105 + n * (73814 / 2835))));
  22408. this.cbg[2] = np * (-26 / 15 + n * (34 / 21 + n * (8 / 5 + n * (-12686 / 2835))));
  22409. np = np * n;
  22410. this.cgb[3] = np * (4279 / 630 + n * (-332 / 35 + n * (-399572 / 14175)));
  22411. this.cbg[3] = np * (1237 / 630 + n * (-12 / 5 + n * ( -24832 / 14175)));
  22412. np = np * n;
  22413. this.cgb[4] = np * (4174 / 315 + n * (-144838 / 6237));
  22414. this.cbg[4] = np * (-734 / 315 + n * (109598 / 31185));
  22415. np = np * n;
  22416. this.cgb[5] = np * (601676 / 22275);
  22417. this.cbg[5] = np * (444337 / 155925);
  22418. np = Math.pow(n, 2);
  22419. this.Qn = this.k0 / (1 + n) * (1 + np * (1 / 4 + np * (1 / 64 + np / 256)));
  22420. this.utg[0] = n * (-0.5 + n * ( 2 / 3 + n * (-37 / 96 + n * ( 1 / 360 + n * (81 / 512 + n * (-96199 / 604800))))));
  22421. this.gtu[0] = n * (0.5 + n * (-2 / 3 + n * (5 / 16 + n * (41 / 180 + n * (-127 / 288 + n * (7891 / 37800))))));
  22422. this.utg[1] = np * (-1 / 48 + n * (-1 / 15 + n * (437 / 1440 + n * (-46 / 105 + n * (1118711 / 3870720)))));
  22423. this.gtu[1] = np * (13 / 48 + n * (-3 / 5 + n * (557 / 1440 + n * (281 / 630 + n * (-1983433 / 1935360)))));
  22424. np = np * n;
  22425. this.utg[2] = np * (-17 / 480 + n * (37 / 840 + n * (209 / 4480 + n * (-5569 / 90720 ))));
  22426. this.gtu[2] = np * (61 / 240 + n * (-103 / 140 + n * (15061 / 26880 + n * (167603 / 181440))));
  22427. np = np * n;
  22428. this.utg[3] = np * (-4397 / 161280 + n * (11 / 504 + n * (830251 / 7257600)));
  22429. this.gtu[3] = np * (49561 / 161280 + n * (-179 / 168 + n * (6601661 / 7257600)));
  22430. np = np * n;
  22431. this.utg[4] = np * (-4583 / 161280 + n * (108847 / 3991680));
  22432. this.gtu[4] = np * (34729 / 80640 + n * (-3418889 / 1995840));
  22433. np = np * n;
  22434. this.utg[5] = np * (-20648693 / 638668800);
  22435. this.gtu[5] = np * (212378941 / 319334400);
  22436. var Z = gatg(this.cbg, this.lat0);
  22437. this.Zb = -this.Qn * (Z + clens(this.gtu, 2 * Z));
  22438. }
  22439. function etmerc_forward(p) {
  22440. var Ce = adjust_lon(p.x - this.long0);
  22441. var Cn = p.y;
  22442. Cn = gatg(this.cbg, Cn);
  22443. var sin_Cn = Math.sin(Cn);
  22444. var cos_Cn = Math.cos(Cn);
  22445. var sin_Ce = Math.sin(Ce);
  22446. var cos_Ce = Math.cos(Ce);
  22447. Cn = Math.atan2(sin_Cn, cos_Ce * cos_Cn);
  22448. Ce = Math.atan2(sin_Ce * cos_Cn, hypot(sin_Cn, cos_Cn * cos_Ce));
  22449. Ce = asinhy(Math.tan(Ce));
  22450. var tmp = clens_cmplx(this.gtu, 2 * Cn, 2 * Ce);
  22451. Cn = Cn + tmp[0];
  22452. Ce = Ce + tmp[1];
  22453. var x;
  22454. var y;
  22455. if (Math.abs(Ce) <= 2.623395162778) {
  22456. x = this.a * (this.Qn * Ce) + this.x0;
  22457. y = this.a * (this.Qn * Cn + this.Zb) + this.y0;
  22458. }
  22459. else {
  22460. x = Infinity;
  22461. y = Infinity;
  22462. }
  22463. p.x = x;
  22464. p.y = y;
  22465. return p;
  22466. }
  22467. function etmerc_inverse(p) {
  22468. var Ce = (p.x - this.x0) * (1 / this.a);
  22469. var Cn = (p.y - this.y0) * (1 / this.a);
  22470. Cn = (Cn - this.Zb) / this.Qn;
  22471. Ce = Ce / this.Qn;
  22472. var lon;
  22473. var lat;
  22474. if (Math.abs(Ce) <= 2.623395162778) {
  22475. var tmp = clens_cmplx(this.utg, 2 * Cn, 2 * Ce);
  22476. Cn = Cn + tmp[0];
  22477. Ce = Ce + tmp[1];
  22478. Ce = Math.atan(sinh(Ce));
  22479. var sin_Cn = Math.sin(Cn);
  22480. var cos_Cn = Math.cos(Cn);
  22481. var sin_Ce = Math.sin(Ce);
  22482. var cos_Ce = Math.cos(Ce);
  22483. Cn = Math.atan2(sin_Cn * cos_Ce, hypot(sin_Ce, cos_Ce * cos_Cn));
  22484. Ce = Math.atan2(sin_Ce, cos_Ce * cos_Cn);
  22485. lon = adjust_lon(Ce + this.long0);
  22486. lat = gatg(this.cgb, Cn);
  22487. }
  22488. else {
  22489. lon = Infinity;
  22490. lat = Infinity;
  22491. }
  22492. p.x = lon;
  22493. p.y = lat;
  22494. return p;
  22495. }
  22496. var etmerc_names = ["Extended_Transverse_Mercator", "Extended Transverse Mercator", "etmerc"];
  22497. /* harmony default export */ var etmerc = ({
  22498. init: etmerc_init,
  22499. forward: etmerc_forward,
  22500. inverse: etmerc_inverse,
  22501. names: etmerc_names
  22502. });
  22503. // CONCATENATED MODULE: ./node_modules/proj4/lib/common/adjust_zone.js
  22504. /* harmony default export */ var adjust_zone = (function(zone, lon) {
  22505. if (zone === undefined) {
  22506. zone = Math.floor((adjust_lon(lon) + Math.PI) * 30 / Math.PI) + 1;
  22507. if (zone < 0) {
  22508. return 0;
  22509. } else if (zone > 60) {
  22510. return 60;
  22511. }
  22512. }
  22513. return zone;
  22514. });
  22515. // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/utm.js
  22516. var dependsOn = 'etmerc';
  22517. function utm_init() {
  22518. var zone = adjust_zone(this.zone, this.long0);
  22519. if (zone === undefined) {
  22520. throw new Error('unknown utm zone');
  22521. }
  22522. this.lat0 = 0;
  22523. this.long0 = ((6 * Math.abs(zone)) - 183) * D2R;
  22524. this.x0 = 500000;
  22525. this.y0 = this.utmSouth ? 10000000 : 0;
  22526. this.k0 = 0.9996;
  22527. etmerc.init.apply(this);
  22528. this.forward = etmerc.forward;
  22529. this.inverse = etmerc.inverse;
  22530. }
  22531. var utm_names = ["Universal Transverse Mercator System", "utm"];
  22532. /* harmony default export */ var utm = ({
  22533. init: utm_init,
  22534. names: utm_names,
  22535. dependsOn: dependsOn
  22536. });
  22537. // CONCATENATED MODULE: ./node_modules/proj4/lib/common/srat.js
  22538. /* harmony default export */ var srat = (function(esinp, exp) {
  22539. return (Math.pow((1 - esinp) / (1 + esinp), exp));
  22540. });
  22541. // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/gauss.js
  22542. var gauss_MAX_ITER = 20;
  22543. function gauss_init() {
  22544. var sphi = Math.sin(this.lat0);
  22545. var cphi = Math.cos(this.lat0);
  22546. cphi *= cphi;
  22547. this.rc = Math.sqrt(1 - this.es) / (1 - this.es * sphi * sphi);
  22548. this.C = Math.sqrt(1 + this.es * cphi * cphi / (1 - this.es));
  22549. this.phic0 = Math.asin(sphi / this.C);
  22550. this.ratexp = 0.5 * this.C * this.e;
  22551. this.K = Math.tan(0.5 * this.phic0 + FORTPI) / (Math.pow(Math.tan(0.5 * this.lat0 + FORTPI), this.C) * srat(this.e * sphi, this.ratexp));
  22552. }
  22553. function gauss_forward(p) {
  22554. var lon = p.x;
  22555. var lat = p.y;
  22556. p.y = 2 * Math.atan(this.K * Math.pow(Math.tan(0.5 * lat + FORTPI), this.C) * srat(this.e * Math.sin(lat), this.ratexp)) - HALF_PI;
  22557. p.x = this.C * lon;
  22558. return p;
  22559. }
  22560. function gauss_inverse(p) {
  22561. var DEL_TOL = 1e-14;
  22562. var lon = p.x / this.C;
  22563. var lat = p.y;
  22564. var num = Math.pow(Math.tan(0.5 * lat + FORTPI) / this.K, 1 / this.C);
  22565. for (var i = gauss_MAX_ITER; i > 0; --i) {
  22566. lat = 2 * Math.atan(num * srat(this.e * Math.sin(p.y), - 0.5 * this.e)) - HALF_PI;
  22567. if (Math.abs(lat - p.y) < DEL_TOL) {
  22568. break;
  22569. }
  22570. p.y = lat;
  22571. }
  22572. /* convergence failed */
  22573. if (!i) {
  22574. return null;
  22575. }
  22576. p.x = lon;
  22577. p.y = lat;
  22578. return p;
  22579. }
  22580. var gauss_names = ["gauss"];
  22581. /* harmony default export */ var gauss = ({
  22582. init: gauss_init,
  22583. forward: gauss_forward,
  22584. inverse: gauss_inverse,
  22585. names: gauss_names
  22586. });
  22587. // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/sterea.js
  22588. function sterea_init() {
  22589. gauss.init.apply(this);
  22590. if (!this.rc) {
  22591. return;
  22592. }
  22593. this.sinc0 = Math.sin(this.phic0);
  22594. this.cosc0 = Math.cos(this.phic0);
  22595. this.R2 = 2 * this.rc;
  22596. if (!this.title) {
  22597. this.title = "Oblique Stereographic Alternative";
  22598. }
  22599. }
  22600. function sterea_forward(p) {
  22601. var sinc, cosc, cosl, k;
  22602. p.x = adjust_lon(p.x - this.long0);
  22603. gauss.forward.apply(this, [p]);
  22604. sinc = Math.sin(p.y);
  22605. cosc = Math.cos(p.y);
  22606. cosl = Math.cos(p.x);
  22607. k = this.k0 * this.R2 / (1 + this.sinc0 * sinc + this.cosc0 * cosc * cosl);
  22608. p.x = k * cosc * Math.sin(p.x);
  22609. p.y = k * (this.cosc0 * sinc - this.sinc0 * cosc * cosl);
  22610. p.x = this.a * p.x + this.x0;
  22611. p.y = this.a * p.y + this.y0;
  22612. return p;
  22613. }
  22614. function sterea_inverse(p) {
  22615. var sinc, cosc, lon, lat, rho;
  22616. p.x = (p.x - this.x0) / this.a;
  22617. p.y = (p.y - this.y0) / this.a;
  22618. p.x /= this.k0;
  22619. p.y /= this.k0;
  22620. if ((rho = Math.sqrt(p.x * p.x + p.y * p.y))) {
  22621. var c = 2 * Math.atan2(rho, this.R2);
  22622. sinc = Math.sin(c);
  22623. cosc = Math.cos(c);
  22624. lat = Math.asin(cosc * this.sinc0 + p.y * sinc * this.cosc0 / rho);
  22625. lon = Math.atan2(p.x * sinc, rho * this.cosc0 * cosc - p.y * this.sinc0 * sinc);
  22626. }
  22627. else {
  22628. lat = this.phic0;
  22629. lon = 0;
  22630. }
  22631. p.x = lon;
  22632. p.y = lat;
  22633. gauss.inverse.apply(this, [p]);
  22634. p.x = adjust_lon(p.x + this.long0);
  22635. return p;
  22636. }
  22637. var sterea_names = ["Stereographic_North_Pole", "Oblique_Stereographic", "Polar_Stereographic", "sterea","Oblique Stereographic Alternative","Double_Stereographic"];
  22638. /* harmony default export */ var sterea = ({
  22639. init: sterea_init,
  22640. forward: sterea_forward,
  22641. inverse: sterea_inverse,
  22642. names: sterea_names
  22643. });
  22644. // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/stere.js
  22645. function ssfn_(phit, sinphi, eccen) {
  22646. sinphi *= eccen;
  22647. return (Math.tan(0.5 * (HALF_PI + phit)) * Math.pow((1 - sinphi) / (1 + sinphi), 0.5 * eccen));
  22648. }
  22649. function stere_init() {
  22650. this.coslat0 = Math.cos(this.lat0);
  22651. this.sinlat0 = Math.sin(this.lat0);
  22652. if (this.sphere) {
  22653. if (this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= EPSLN) {
  22654. this.k0 = 0.5 * (1 + sign(this.lat0) * Math.sin(this.lat_ts));
  22655. }
  22656. }
  22657. else {
  22658. if (Math.abs(this.coslat0) <= EPSLN) {
  22659. if (this.lat0 > 0) {
  22660. //North pole
  22661. //trace('stere:north pole');
  22662. this.con = 1;
  22663. }
  22664. else {
  22665. //South pole
  22666. //trace('stere:south pole');
  22667. this.con = -1;
  22668. }
  22669. }
  22670. this.cons = Math.sqrt(Math.pow(1 + this.e, 1 + this.e) * Math.pow(1 - this.e, 1 - this.e));
  22671. if (this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= EPSLN) {
  22672. this.k0 = 0.5 * this.cons * msfnz(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)) / tsfnz(this.e, this.con * this.lat_ts, this.con * Math.sin(this.lat_ts));
  22673. }
  22674. this.ms1 = msfnz(this.e, this.sinlat0, this.coslat0);
  22675. this.X0 = 2 * Math.atan(this.ssfn_(this.lat0, this.sinlat0, this.e)) - HALF_PI;
  22676. this.cosX0 = Math.cos(this.X0);
  22677. this.sinX0 = Math.sin(this.X0);
  22678. }
  22679. }
  22680. // Stereographic forward equations--mapping lat,long to x,y
  22681. function stere_forward(p) {
  22682. var lon = p.x;
  22683. var lat = p.y;
  22684. var sinlat = Math.sin(lat);
  22685. var coslat = Math.cos(lat);
  22686. var A, X, sinX, cosX, ts, rh;
  22687. var dlon = adjust_lon(lon - this.long0);
  22688. if (Math.abs(Math.abs(lon - this.long0) - Math.PI) <= EPSLN && Math.abs(lat + this.lat0) <= EPSLN) {
  22689. //case of the origine point
  22690. //trace('stere:this is the origin point');
  22691. p.x = NaN;
  22692. p.y = NaN;
  22693. return p;
  22694. }
  22695. if (this.sphere) {
  22696. //trace('stere:sphere case');
  22697. A = 2 * this.k0 / (1 + this.sinlat0 * sinlat + this.coslat0 * coslat * Math.cos(dlon));
  22698. p.x = this.a * A * coslat * Math.sin(dlon) + this.x0;
  22699. p.y = this.a * A * (this.coslat0 * sinlat - this.sinlat0 * coslat * Math.cos(dlon)) + this.y0;
  22700. return p;
  22701. }
  22702. else {
  22703. X = 2 * Math.atan(this.ssfn_(lat, sinlat, this.e)) - HALF_PI;
  22704. cosX = Math.cos(X);
  22705. sinX = Math.sin(X);
  22706. if (Math.abs(this.coslat0) <= EPSLN) {
  22707. ts = tsfnz(this.e, lat * this.con, this.con * sinlat);
  22708. rh = 2 * this.a * this.k0 * ts / this.cons;
  22709. p.x = this.x0 + rh * Math.sin(lon - this.long0);
  22710. p.y = this.y0 - this.con * rh * Math.cos(lon - this.long0);
  22711. //trace(p.toString());
  22712. return p;
  22713. }
  22714. else if (Math.abs(this.sinlat0) < EPSLN) {
  22715. //Eq
  22716. //trace('stere:equateur');
  22717. A = 2 * this.a * this.k0 / (1 + cosX * Math.cos(dlon));
  22718. p.y = A * sinX;
  22719. }
  22720. else {
  22721. //other case
  22722. //trace('stere:normal case');
  22723. A = 2 * this.a * this.k0 * this.ms1 / (this.cosX0 * (1 + this.sinX0 * sinX + this.cosX0 * cosX * Math.cos(dlon)));
  22724. p.y = A * (this.cosX0 * sinX - this.sinX0 * cosX * Math.cos(dlon)) + this.y0;
  22725. }
  22726. p.x = A * cosX * Math.sin(dlon) + this.x0;
  22727. }
  22728. //trace(p.toString());
  22729. return p;
  22730. }
  22731. //* Stereographic inverse equations--mapping x,y to lat/long
  22732. function stere_inverse(p) {
  22733. p.x -= this.x0;
  22734. p.y -= this.y0;
  22735. var lon, lat, ts, ce, Chi;
  22736. var rh = Math.sqrt(p.x * p.x + p.y * p.y);
  22737. if (this.sphere) {
  22738. var c = 2 * Math.atan(rh / (2 * this.a * this.k0));
  22739. lon = this.long0;
  22740. lat = this.lat0;
  22741. if (rh <= EPSLN) {
  22742. p.x = lon;
  22743. p.y = lat;
  22744. return p;
  22745. }
  22746. lat = Math.asin(Math.cos(c) * this.sinlat0 + p.y * Math.sin(c) * this.coslat0 / rh);
  22747. if (Math.abs(this.coslat0) < EPSLN) {
  22748. if (this.lat0 > 0) {
  22749. lon = adjust_lon(this.long0 + Math.atan2(p.x, - 1 * p.y));
  22750. }
  22751. else {
  22752. lon = adjust_lon(this.long0 + Math.atan2(p.x, p.y));
  22753. }
  22754. }
  22755. else {
  22756. lon = adjust_lon(this.long0 + Math.atan2(p.x * Math.sin(c), rh * this.coslat0 * Math.cos(c) - p.y * this.sinlat0 * Math.sin(c)));
  22757. }
  22758. p.x = lon;
  22759. p.y = lat;
  22760. return p;
  22761. }
  22762. else {
  22763. if (Math.abs(this.coslat0) <= EPSLN) {
  22764. if (rh <= EPSLN) {
  22765. lat = this.lat0;
  22766. lon = this.long0;
  22767. p.x = lon;
  22768. p.y = lat;
  22769. //trace(p.toString());
  22770. return p;
  22771. }
  22772. p.x *= this.con;
  22773. p.y *= this.con;
  22774. ts = rh * this.cons / (2 * this.a * this.k0);
  22775. lat = this.con * phi2z(this.e, ts);
  22776. lon = this.con * adjust_lon(this.con * this.long0 + Math.atan2(p.x, - 1 * p.y));
  22777. }
  22778. else {
  22779. ce = 2 * Math.atan(rh * this.cosX0 / (2 * this.a * this.k0 * this.ms1));
  22780. lon = this.long0;
  22781. if (rh <= EPSLN) {
  22782. Chi = this.X0;
  22783. }
  22784. else {
  22785. Chi = Math.asin(Math.cos(ce) * this.sinX0 + p.y * Math.sin(ce) * this.cosX0 / rh);
  22786. lon = adjust_lon(this.long0 + Math.atan2(p.x * Math.sin(ce), rh * this.cosX0 * Math.cos(ce) - p.y * this.sinX0 * Math.sin(ce)));
  22787. }
  22788. lat = -1 * phi2z(this.e, Math.tan(0.5 * (HALF_PI + Chi)));
  22789. }
  22790. }
  22791. p.x = lon;
  22792. p.y = lat;
  22793. //trace(p.toString());
  22794. return p;
  22795. }
  22796. var stere_names = ["stere", "Stereographic_South_Pole", "Polar Stereographic (variant B)"];
  22797. /* harmony default export */ var stere = ({
  22798. init: stere_init,
  22799. forward: stere_forward,
  22800. inverse: stere_inverse,
  22801. names: stere_names,
  22802. ssfn_: ssfn_
  22803. });
  22804. // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/somerc.js
  22805. /*
  22806. references:
  22807. Formules et constantes pour le Calcul pour la
  22808. projection cylindrique conforme à axe oblique et pour la transformation entre
  22809. des systèmes de référence.
  22810. http://www.swisstopo.admin.ch/internet/swisstopo/fr/home/topics/survey/sys/refsys/switzerland.parsysrelated1.31216.downloadList.77004.DownloadFile.tmp/swissprojectionfr.pdf
  22811. */
  22812. function somerc_init() {
  22813. var phy0 = this.lat0;
  22814. this.lambda0 = this.long0;
  22815. var sinPhy0 = Math.sin(phy0);
  22816. var semiMajorAxis = this.a;
  22817. var invF = this.rf;
  22818. var flattening = 1 / invF;
  22819. var e2 = 2 * flattening - Math.pow(flattening, 2);
  22820. var e = this.e = Math.sqrt(e2);
  22821. this.R = this.k0 * semiMajorAxis * Math.sqrt(1 - e2) / (1 - e2 * Math.pow(sinPhy0, 2));
  22822. this.alpha = Math.sqrt(1 + e2 / (1 - e2) * Math.pow(Math.cos(phy0), 4));
  22823. this.b0 = Math.asin(sinPhy0 / this.alpha);
  22824. var k1 = Math.log(Math.tan(Math.PI / 4 + this.b0 / 2));
  22825. var k2 = Math.log(Math.tan(Math.PI / 4 + phy0 / 2));
  22826. var k3 = Math.log((1 + e * sinPhy0) / (1 - e * sinPhy0));
  22827. this.K = k1 - this.alpha * k2 + this.alpha * e / 2 * k3;
  22828. }
  22829. function somerc_forward(p) {
  22830. var Sa1 = Math.log(Math.tan(Math.PI / 4 - p.y / 2));
  22831. var Sa2 = this.e / 2 * Math.log((1 + this.e * Math.sin(p.y)) / (1 - this.e * Math.sin(p.y)));
  22832. var S = -this.alpha * (Sa1 + Sa2) + this.K;
  22833. // spheric latitude
  22834. var b = 2 * (Math.atan(Math.exp(S)) - Math.PI / 4);
  22835. // spheric longitude
  22836. var I = this.alpha * (p.x - this.lambda0);
  22837. // psoeudo equatorial rotation
  22838. var rotI = Math.atan(Math.sin(I) / (Math.sin(this.b0) * Math.tan(b) + Math.cos(this.b0) * Math.cos(I)));
  22839. var rotB = Math.asin(Math.cos(this.b0) * Math.sin(b) - Math.sin(this.b0) * Math.cos(b) * Math.cos(I));
  22840. p.y = this.R / 2 * Math.log((1 + Math.sin(rotB)) / (1 - Math.sin(rotB))) + this.y0;
  22841. p.x = this.R * rotI + this.x0;
  22842. return p;
  22843. }
  22844. function somerc_inverse(p) {
  22845. var Y = p.x - this.x0;
  22846. var X = p.y - this.y0;
  22847. var rotI = Y / this.R;
  22848. var rotB = 2 * (Math.atan(Math.exp(X / this.R)) - Math.PI / 4);
  22849. var b = Math.asin(Math.cos(this.b0) * Math.sin(rotB) + Math.sin(this.b0) * Math.cos(rotB) * Math.cos(rotI));
  22850. var I = Math.atan(Math.sin(rotI) / (Math.cos(this.b0) * Math.cos(rotI) - Math.sin(this.b0) * Math.tan(rotB)));
  22851. var lambda = this.lambda0 + I / this.alpha;
  22852. var S = 0;
  22853. var phy = b;
  22854. var prevPhy = -1000;
  22855. var iteration = 0;
  22856. while (Math.abs(phy - prevPhy) > 0.0000001) {
  22857. if (++iteration > 20) {
  22858. //...reportError("omercFwdInfinity");
  22859. return;
  22860. }
  22861. //S = Math.log(Math.tan(Math.PI / 4 + phy / 2));
  22862. S = 1 / this.alpha * (Math.log(Math.tan(Math.PI / 4 + b / 2)) - this.K) + this.e * Math.log(Math.tan(Math.PI / 4 + Math.asin(this.e * Math.sin(phy)) / 2));
  22863. prevPhy = phy;
  22864. phy = 2 * Math.atan(Math.exp(S)) - Math.PI / 2;
  22865. }
  22866. p.x = lambda;
  22867. p.y = phy;
  22868. return p;
  22869. }
  22870. var somerc_names = ["somerc"];
  22871. /* harmony default export */ var somerc = ({
  22872. init: somerc_init,
  22873. forward: somerc_forward,
  22874. inverse: somerc_inverse,
  22875. names: somerc_names
  22876. });
  22877. // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/omerc.js
  22878. /* Initialize the Oblique Mercator projection
  22879. ------------------------------------------*/
  22880. function omerc_init() {
  22881. this.no_off = this.no_off || false;
  22882. this.no_rot = this.no_rot || false;
  22883. if (isNaN(this.k0)) {
  22884. this.k0 = 1;
  22885. }
  22886. var sinlat = Math.sin(this.lat0);
  22887. var coslat = Math.cos(this.lat0);
  22888. var con = this.e * sinlat;
  22889. this.bl = Math.sqrt(1 + this.es / (1 - this.es) * Math.pow(coslat, 4));
  22890. this.al = this.a * this.bl * this.k0 * Math.sqrt(1 - this.es) / (1 - con * con);
  22891. var t0 = tsfnz(this.e, this.lat0, sinlat);
  22892. var dl = this.bl / coslat * Math.sqrt((1 - this.es) / (1 - con * con));
  22893. if (dl * dl < 1) {
  22894. dl = 1;
  22895. }
  22896. var fl;
  22897. var gl;
  22898. if (!isNaN(this.longc)) {
  22899. //Central point and azimuth method
  22900. if (this.lat0 >= 0) {
  22901. fl = dl + Math.sqrt(dl * dl - 1);
  22902. }
  22903. else {
  22904. fl = dl - Math.sqrt(dl * dl - 1);
  22905. }
  22906. this.el = fl * Math.pow(t0, this.bl);
  22907. gl = 0.5 * (fl - 1 / fl);
  22908. this.gamma0 = Math.asin(Math.sin(this.alpha) / dl);
  22909. this.long0 = this.longc - Math.asin(gl * Math.tan(this.gamma0)) / this.bl;
  22910. }
  22911. else {
  22912. //2 points method
  22913. var t1 = tsfnz(this.e, this.lat1, Math.sin(this.lat1));
  22914. var t2 = tsfnz(this.e, this.lat2, Math.sin(this.lat2));
  22915. if (this.lat0 >= 0) {
  22916. this.el = (dl + Math.sqrt(dl * dl - 1)) * Math.pow(t0, this.bl);
  22917. }
  22918. else {
  22919. this.el = (dl - Math.sqrt(dl * dl - 1)) * Math.pow(t0, this.bl);
  22920. }
  22921. var hl = Math.pow(t1, this.bl);
  22922. var ll = Math.pow(t2, this.bl);
  22923. fl = this.el / hl;
  22924. gl = 0.5 * (fl - 1 / fl);
  22925. var jl = (this.el * this.el - ll * hl) / (this.el * this.el + ll * hl);
  22926. var pl = (ll - hl) / (ll + hl);
  22927. var dlon12 = adjust_lon(this.long1 - this.long2);
  22928. this.long0 = 0.5 * (this.long1 + this.long2) - Math.atan(jl * Math.tan(0.5 * this.bl * (dlon12)) / pl) / this.bl;
  22929. this.long0 = adjust_lon(this.long0);
  22930. var dlon10 = adjust_lon(this.long1 - this.long0);
  22931. this.gamma0 = Math.atan(Math.sin(this.bl * (dlon10)) / gl);
  22932. this.alpha = Math.asin(dl * Math.sin(this.gamma0));
  22933. }
  22934. if (this.no_off) {
  22935. this.uc = 0;
  22936. }
  22937. else {
  22938. if (this.lat0 >= 0) {
  22939. this.uc = this.al / this.bl * Math.atan2(Math.sqrt(dl * dl - 1), Math.cos(this.alpha));
  22940. }
  22941. else {
  22942. this.uc = -1 * this.al / this.bl * Math.atan2(Math.sqrt(dl * dl - 1), Math.cos(this.alpha));
  22943. }
  22944. }
  22945. }
  22946. /* Oblique Mercator forward equations--mapping lat,long to x,y
  22947. ----------------------------------------------------------*/
  22948. function omerc_forward(p) {
  22949. var lon = p.x;
  22950. var lat = p.y;
  22951. var dlon = adjust_lon(lon - this.long0);
  22952. var us, vs;
  22953. var con;
  22954. if (Math.abs(Math.abs(lat) - HALF_PI) <= EPSLN) {
  22955. if (lat > 0) {
  22956. con = -1;
  22957. }
  22958. else {
  22959. con = 1;
  22960. }
  22961. vs = this.al / this.bl * Math.log(Math.tan(FORTPI + con * this.gamma0 * 0.5));
  22962. us = -1 * con * HALF_PI * this.al / this.bl;
  22963. }
  22964. else {
  22965. var t = tsfnz(this.e, lat, Math.sin(lat));
  22966. var ql = this.el / Math.pow(t, this.bl);
  22967. var sl = 0.5 * (ql - 1 / ql);
  22968. var tl = 0.5 * (ql + 1 / ql);
  22969. var vl = Math.sin(this.bl * (dlon));
  22970. var ul = (sl * Math.sin(this.gamma0) - vl * Math.cos(this.gamma0)) / tl;
  22971. if (Math.abs(Math.abs(ul) - 1) <= EPSLN) {
  22972. vs = Number.POSITIVE_INFINITY;
  22973. }
  22974. else {
  22975. vs = 0.5 * this.al * Math.log((1 - ul) / (1 + ul)) / this.bl;
  22976. }
  22977. if (Math.abs(Math.cos(this.bl * (dlon))) <= EPSLN) {
  22978. us = this.al * this.bl * (dlon);
  22979. }
  22980. else {
  22981. us = this.al * Math.atan2(sl * Math.cos(this.gamma0) + vl * Math.sin(this.gamma0), Math.cos(this.bl * dlon)) / this.bl;
  22982. }
  22983. }
  22984. if (this.no_rot) {
  22985. p.x = this.x0 + us;
  22986. p.y = this.y0 + vs;
  22987. }
  22988. else {
  22989. us -= this.uc;
  22990. p.x = this.x0 + vs * Math.cos(this.alpha) + us * Math.sin(this.alpha);
  22991. p.y = this.y0 + us * Math.cos(this.alpha) - vs * Math.sin(this.alpha);
  22992. }
  22993. return p;
  22994. }
  22995. function omerc_inverse(p) {
  22996. var us, vs;
  22997. if (this.no_rot) {
  22998. vs = p.y - this.y0;
  22999. us = p.x - this.x0;
  23000. }
  23001. else {
  23002. vs = (p.x - this.x0) * Math.cos(this.alpha) - (p.y - this.y0) * Math.sin(this.alpha);
  23003. us = (p.y - this.y0) * Math.cos(this.alpha) + (p.x - this.x0) * Math.sin(this.alpha);
  23004. us += this.uc;
  23005. }
  23006. var qp = Math.exp(-1 * this.bl * vs / this.al);
  23007. var sp = 0.5 * (qp - 1 / qp);
  23008. var tp = 0.5 * (qp + 1 / qp);
  23009. var vp = Math.sin(this.bl * us / this.al);
  23010. var up = (vp * Math.cos(this.gamma0) + sp * Math.sin(this.gamma0)) / tp;
  23011. var ts = Math.pow(this.el / Math.sqrt((1 + up) / (1 - up)), 1 / this.bl);
  23012. if (Math.abs(up - 1) < EPSLN) {
  23013. p.x = this.long0;
  23014. p.y = HALF_PI;
  23015. }
  23016. else if (Math.abs(up + 1) < EPSLN) {
  23017. p.x = this.long0;
  23018. p.y = -1 * HALF_PI;
  23019. }
  23020. else {
  23021. p.y = phi2z(this.e, ts);
  23022. p.x = adjust_lon(this.long0 - Math.atan2(sp * Math.cos(this.gamma0) - vp * Math.sin(this.gamma0), Math.cos(this.bl * us / this.al)) / this.bl);
  23023. }
  23024. return p;
  23025. }
  23026. var omerc_names = ["Hotine_Oblique_Mercator", "Hotine Oblique Mercator", "Hotine_Oblique_Mercator_Azimuth_Natural_Origin", "Hotine_Oblique_Mercator_Azimuth_Center", "omerc"];
  23027. /* harmony default export */ var omerc = ({
  23028. init: omerc_init,
  23029. forward: omerc_forward,
  23030. inverse: omerc_inverse,
  23031. names: omerc_names
  23032. });
  23033. // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/lcc.js
  23034. function lcc_init() {
  23035. // array of: r_maj,r_min,lat1,lat2,c_lon,c_lat,false_east,false_north
  23036. //double c_lat; /* center latitude */
  23037. //double c_lon; /* center longitude */
  23038. //double lat1; /* first standard parallel */
  23039. //double lat2; /* second standard parallel */
  23040. //double r_maj; /* major axis */
  23041. //double r_min; /* minor axis */
  23042. //double false_east; /* x offset in meters */
  23043. //double false_north; /* y offset in meters */
  23044. if (!this.lat2) {
  23045. this.lat2 = this.lat1;
  23046. } //if lat2 is not defined
  23047. if (!this.k0) {
  23048. this.k0 = 1;
  23049. }
  23050. this.x0 = this.x0 || 0;
  23051. this.y0 = this.y0 || 0;
  23052. // Standard Parallels cannot be equal and on opposite sides of the equator
  23053. if (Math.abs(this.lat1 + this.lat2) < EPSLN) {
  23054. return;
  23055. }
  23056. var temp = this.b / this.a;
  23057. this.e = Math.sqrt(1 - temp * temp);
  23058. var sin1 = Math.sin(this.lat1);
  23059. var cos1 = Math.cos(this.lat1);
  23060. var ms1 = msfnz(this.e, sin1, cos1);
  23061. var ts1 = tsfnz(this.e, this.lat1, sin1);
  23062. var sin2 = Math.sin(this.lat2);
  23063. var cos2 = Math.cos(this.lat2);
  23064. var ms2 = msfnz(this.e, sin2, cos2);
  23065. var ts2 = tsfnz(this.e, this.lat2, sin2);
  23066. var ts0 = tsfnz(this.e, this.lat0, Math.sin(this.lat0));
  23067. if (Math.abs(this.lat1 - this.lat2) > EPSLN) {
  23068. this.ns = Math.log(ms1 / ms2) / Math.log(ts1 / ts2);
  23069. }
  23070. else {
  23071. this.ns = sin1;
  23072. }
  23073. if (isNaN(this.ns)) {
  23074. this.ns = sin1;
  23075. }
  23076. this.f0 = ms1 / (this.ns * Math.pow(ts1, this.ns));
  23077. this.rh = this.a * this.f0 * Math.pow(ts0, this.ns);
  23078. if (!this.title) {
  23079. this.title = "Lambert Conformal Conic";
  23080. }
  23081. }
  23082. // Lambert Conformal conic forward equations--mapping lat,long to x,y
  23083. // -----------------------------------------------------------------
  23084. function lcc_forward(p) {
  23085. var lon = p.x;
  23086. var lat = p.y;
  23087. // singular cases :
  23088. if (Math.abs(2 * Math.abs(lat) - Math.PI) <= EPSLN) {
  23089. lat = sign(lat) * (HALF_PI - 2 * EPSLN);
  23090. }
  23091. var con = Math.abs(Math.abs(lat) - HALF_PI);
  23092. var ts, rh1;
  23093. if (con > EPSLN) {
  23094. ts = tsfnz(this.e, lat, Math.sin(lat));
  23095. rh1 = this.a * this.f0 * Math.pow(ts, this.ns);
  23096. }
  23097. else {
  23098. con = lat * this.ns;
  23099. if (con <= 0) {
  23100. return null;
  23101. }
  23102. rh1 = 0;
  23103. }
  23104. var theta = this.ns * adjust_lon(lon - this.long0);
  23105. p.x = this.k0 * (rh1 * Math.sin(theta)) + this.x0;
  23106. p.y = this.k0 * (this.rh - rh1 * Math.cos(theta)) + this.y0;
  23107. return p;
  23108. }
  23109. // Lambert Conformal Conic inverse equations--mapping x,y to lat/long
  23110. // -----------------------------------------------------------------
  23111. function lcc_inverse(p) {
  23112. var rh1, con, ts;
  23113. var lat, lon;
  23114. var x = (p.x - this.x0) / this.k0;
  23115. var y = (this.rh - (p.y - this.y0) / this.k0);
  23116. if (this.ns > 0) {
  23117. rh1 = Math.sqrt(x * x + y * y);
  23118. con = 1;
  23119. }
  23120. else {
  23121. rh1 = -Math.sqrt(x * x + y * y);
  23122. con = -1;
  23123. }
  23124. var theta = 0;
  23125. if (rh1 !== 0) {
  23126. theta = Math.atan2((con * x), (con * y));
  23127. }
  23128. if ((rh1 !== 0) || (this.ns > 0)) {
  23129. con = 1 / this.ns;
  23130. ts = Math.pow((rh1 / (this.a * this.f0)), con);
  23131. lat = phi2z(this.e, ts);
  23132. if (lat === -9999) {
  23133. return null;
  23134. }
  23135. }
  23136. else {
  23137. lat = -HALF_PI;
  23138. }
  23139. lon = adjust_lon(theta / this.ns + this.long0);
  23140. p.x = lon;
  23141. p.y = lat;
  23142. return p;
  23143. }
  23144. var lcc_names = ["Lambert Tangential Conformal Conic Projection", "Lambert_Conformal_Conic", "Lambert_Conformal_Conic_2SP", "lcc"];
  23145. /* harmony default export */ var lcc = ({
  23146. init: lcc_init,
  23147. forward: lcc_forward,
  23148. inverse: lcc_inverse,
  23149. names: lcc_names
  23150. });
  23151. // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/krovak.js
  23152. function krovak_init() {
  23153. this.a = 6377397.155;
  23154. this.es = 0.006674372230614;
  23155. this.e = Math.sqrt(this.es);
  23156. if (!this.lat0) {
  23157. this.lat0 = 0.863937979737193;
  23158. }
  23159. if (!this.long0) {
  23160. this.long0 = 0.7417649320975901 - 0.308341501185665;
  23161. }
  23162. /* if scale not set default to 0.9999 */
  23163. if (!this.k0) {
  23164. this.k0 = 0.9999;
  23165. }
  23166. this.s45 = 0.785398163397448; /* 45 */
  23167. this.s90 = 2 * this.s45;
  23168. this.fi0 = this.lat0;
  23169. this.e2 = this.es;
  23170. this.e = Math.sqrt(this.e2);
  23171. this.alfa = Math.sqrt(1 + (this.e2 * Math.pow(Math.cos(this.fi0), 4)) / (1 - this.e2));
  23172. this.uq = 1.04216856380474;
  23173. this.u0 = Math.asin(Math.sin(this.fi0) / this.alfa);
  23174. this.g = Math.pow((1 + this.e * Math.sin(this.fi0)) / (1 - this.e * Math.sin(this.fi0)), this.alfa * this.e / 2);
  23175. this.k = Math.tan(this.u0 / 2 + this.s45) / Math.pow(Math.tan(this.fi0 / 2 + this.s45), this.alfa) * this.g;
  23176. this.k1 = this.k0;
  23177. this.n0 = this.a * Math.sqrt(1 - this.e2) / (1 - this.e2 * Math.pow(Math.sin(this.fi0), 2));
  23178. this.s0 = 1.37008346281555;
  23179. this.n = Math.sin(this.s0);
  23180. this.ro0 = this.k1 * this.n0 / Math.tan(this.s0);
  23181. this.ad = this.s90 - this.uq;
  23182. }
  23183. /* ellipsoid */
  23184. /* calculate xy from lat/lon */
  23185. /* Constants, identical to inverse transform function */
  23186. function krovak_forward(p) {
  23187. var gfi, u, deltav, s, d, eps, ro;
  23188. var lon = p.x;
  23189. var lat = p.y;
  23190. var delta_lon = adjust_lon(lon - this.long0);
  23191. /* Transformation */
  23192. gfi = Math.pow(((1 + this.e * Math.sin(lat)) / (1 - this.e * Math.sin(lat))), (this.alfa * this.e / 2));
  23193. u = 2 * (Math.atan(this.k * Math.pow(Math.tan(lat / 2 + this.s45), this.alfa) / gfi) - this.s45);
  23194. deltav = -delta_lon * this.alfa;
  23195. s = Math.asin(Math.cos(this.ad) * Math.sin(u) + Math.sin(this.ad) * Math.cos(u) * Math.cos(deltav));
  23196. d = Math.asin(Math.cos(u) * Math.sin(deltav) / Math.cos(s));
  23197. eps = this.n * d;
  23198. ro = this.ro0 * Math.pow(Math.tan(this.s0 / 2 + this.s45), this.n) / Math.pow(Math.tan(s / 2 + this.s45), this.n);
  23199. p.y = ro * Math.cos(eps) / 1;
  23200. p.x = ro * Math.sin(eps) / 1;
  23201. if (!this.czech) {
  23202. p.y *= -1;
  23203. p.x *= -1;
  23204. }
  23205. return (p);
  23206. }
  23207. /* calculate lat/lon from xy */
  23208. function krovak_inverse(p) {
  23209. var u, deltav, s, d, eps, ro, fi1;
  23210. var ok;
  23211. /* Transformation */
  23212. /* revert y, x*/
  23213. var tmp = p.x;
  23214. p.x = p.y;
  23215. p.y = tmp;
  23216. if (!this.czech) {
  23217. p.y *= -1;
  23218. p.x *= -1;
  23219. }
  23220. ro = Math.sqrt(p.x * p.x + p.y * p.y);
  23221. eps = Math.atan2(p.y, p.x);
  23222. d = eps / Math.sin(this.s0);
  23223. s = 2 * (Math.atan(Math.pow(this.ro0 / ro, 1 / this.n) * Math.tan(this.s0 / 2 + this.s45)) - this.s45);
  23224. u = Math.asin(Math.cos(this.ad) * Math.sin(s) - Math.sin(this.ad) * Math.cos(s) * Math.cos(d));
  23225. deltav = Math.asin(Math.cos(s) * Math.sin(d) / Math.cos(u));
  23226. p.x = this.long0 - deltav / this.alfa;
  23227. fi1 = u;
  23228. ok = 0;
  23229. var iter = 0;
  23230. do {
  23231. p.y = 2 * (Math.atan(Math.pow(this.k, - 1 / this.alfa) * Math.pow(Math.tan(u / 2 + this.s45), 1 / this.alfa) * Math.pow((1 + this.e * Math.sin(fi1)) / (1 - this.e * Math.sin(fi1)), this.e / 2)) - this.s45);
  23232. if (Math.abs(fi1 - p.y) < 0.0000000001) {
  23233. ok = 1;
  23234. }
  23235. fi1 = p.y;
  23236. iter += 1;
  23237. } while (ok === 0 && iter < 15);
  23238. if (iter >= 15) {
  23239. return null;
  23240. }
  23241. return (p);
  23242. }
  23243. var krovak_names = ["Krovak", "krovak"];
  23244. /* harmony default export */ var krovak = ({
  23245. init: krovak_init,
  23246. forward: krovak_forward,
  23247. inverse: krovak_inverse,
  23248. names: krovak_names
  23249. });
  23250. // CONCATENATED MODULE: ./node_modules/proj4/lib/common/mlfn.js
  23251. /* harmony default export */ var mlfn = (function(e0, e1, e2, e3, phi) {
  23252. return (e0 * phi - e1 * Math.sin(2 * phi) + e2 * Math.sin(4 * phi) - e3 * Math.sin(6 * phi));
  23253. });
  23254. // CONCATENATED MODULE: ./node_modules/proj4/lib/common/e0fn.js
  23255. /* harmony default export */ var e0fn = (function(x) {
  23256. return (1 - 0.25 * x * (1 + x / 16 * (3 + 1.25 * x)));
  23257. });
  23258. // CONCATENATED MODULE: ./node_modules/proj4/lib/common/e1fn.js
  23259. /* harmony default export */ var e1fn = (function(x) {
  23260. return (0.375 * x * (1 + 0.25 * x * (1 + 0.46875 * x)));
  23261. });
  23262. // CONCATENATED MODULE: ./node_modules/proj4/lib/common/e2fn.js
  23263. /* harmony default export */ var e2fn = (function(x) {
  23264. return (0.05859375 * x * x * (1 + 0.75 * x));
  23265. });
  23266. // CONCATENATED MODULE: ./node_modules/proj4/lib/common/e3fn.js
  23267. /* harmony default export */ var e3fn = (function(x) {
  23268. return (x * x * x * (35 / 3072));
  23269. });
  23270. // CONCATENATED MODULE: ./node_modules/proj4/lib/common/gN.js
  23271. /* harmony default export */ var gN = (function(a, e, sinphi) {
  23272. var temp = e * sinphi;
  23273. return a / Math.sqrt(1 - temp * temp);
  23274. });
  23275. // CONCATENATED MODULE: ./node_modules/proj4/lib/common/adjust_lat.js
  23276. /* harmony default export */ var adjust_lat = (function(x) {
  23277. return (Math.abs(x) < HALF_PI) ? x : (x - (sign(x) * Math.PI));
  23278. });
  23279. // CONCATENATED MODULE: ./node_modules/proj4/lib/common/imlfn.js
  23280. /* harmony default export */ var imlfn = (function(ml, e0, e1, e2, e3) {
  23281. var phi;
  23282. var dphi;
  23283. phi = ml / e0;
  23284. for (var i = 0; i < 15; i++) {
  23285. dphi = (ml - (e0 * phi - e1 * Math.sin(2 * phi) + e2 * Math.sin(4 * phi) - e3 * Math.sin(6 * phi))) / (e0 - 2 * e1 * Math.cos(2 * phi) + 4 * e2 * Math.cos(4 * phi) - 6 * e3 * Math.cos(6 * phi));
  23286. phi += dphi;
  23287. if (Math.abs(dphi) <= 0.0000000001) {
  23288. return phi;
  23289. }
  23290. }
  23291. //..reportError("IMLFN-CONV:Latitude failed to converge after 15 iterations");
  23292. return NaN;
  23293. });
  23294. // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/cass.js
  23295. function cass_init() {
  23296. if (!this.sphere) {
  23297. this.e0 = e0fn(this.es);
  23298. this.e1 = e1fn(this.es);
  23299. this.e2 = e2fn(this.es);
  23300. this.e3 = e3fn(this.es);
  23301. this.ml0 = this.a * mlfn(this.e0, this.e1, this.e2, this.e3, this.lat0);
  23302. }
  23303. }
  23304. /* Cassini forward equations--mapping lat,long to x,y
  23305. -----------------------------------------------------------------------*/
  23306. function cass_forward(p) {
  23307. /* Forward equations
  23308. -----------------*/
  23309. var x, y;
  23310. var lam = p.x;
  23311. var phi = p.y;
  23312. lam = adjust_lon(lam - this.long0);
  23313. if (this.sphere) {
  23314. x = this.a * Math.asin(Math.cos(phi) * Math.sin(lam));
  23315. y = this.a * (Math.atan2(Math.tan(phi), Math.cos(lam)) - this.lat0);
  23316. }
  23317. else {
  23318. //ellipsoid
  23319. var sinphi = Math.sin(phi);
  23320. var cosphi = Math.cos(phi);
  23321. var nl = gN(this.a, this.e, sinphi);
  23322. var tl = Math.tan(phi) * Math.tan(phi);
  23323. var al = lam * Math.cos(phi);
  23324. var asq = al * al;
  23325. var cl = this.es * cosphi * cosphi / (1 - this.es);
  23326. var ml = this.a * mlfn(this.e0, this.e1, this.e2, this.e3, phi);
  23327. x = nl * al * (1 - asq * tl * (1 / 6 - (8 - tl + 8 * cl) * asq / 120));
  23328. y = ml - this.ml0 + nl * sinphi / cosphi * asq * (0.5 + (5 - tl + 6 * cl) * asq / 24);
  23329. }
  23330. p.x = x + this.x0;
  23331. p.y = y + this.y0;
  23332. return p;
  23333. }
  23334. /* Inverse equations
  23335. -----------------*/
  23336. function cass_inverse(p) {
  23337. p.x -= this.x0;
  23338. p.y -= this.y0;
  23339. var x = p.x / this.a;
  23340. var y = p.y / this.a;
  23341. var phi, lam;
  23342. if (this.sphere) {
  23343. var dd = y + this.lat0;
  23344. phi = Math.asin(Math.sin(dd) * Math.cos(x));
  23345. lam = Math.atan2(Math.tan(x), Math.cos(dd));
  23346. }
  23347. else {
  23348. /* ellipsoid */
  23349. var ml1 = this.ml0 / this.a + y;
  23350. var phi1 = imlfn(ml1, this.e0, this.e1, this.e2, this.e3);
  23351. if (Math.abs(Math.abs(phi1) - HALF_PI) <= EPSLN) {
  23352. p.x = this.long0;
  23353. p.y = HALF_PI;
  23354. if (y < 0) {
  23355. p.y *= -1;
  23356. }
  23357. return p;
  23358. }
  23359. var nl1 = gN(this.a, this.e, Math.sin(phi1));
  23360. var rl1 = nl1 * nl1 * nl1 / this.a / this.a * (1 - this.es);
  23361. var tl1 = Math.pow(Math.tan(phi1), 2);
  23362. var dl = x * this.a / nl1;
  23363. var dsq = dl * dl;
  23364. phi = phi1 - nl1 * Math.tan(phi1) / rl1 * dl * dl * (0.5 - (1 + 3 * tl1) * dl * dl / 24);
  23365. lam = dl * (1 - dsq * (tl1 / 3 + (1 + 3 * tl1) * tl1 * dsq / 15)) / Math.cos(phi1);
  23366. }
  23367. p.x = adjust_lon(lam + this.long0);
  23368. p.y = adjust_lat(phi);
  23369. return p;
  23370. }
  23371. var cass_names = ["Cassini", "Cassini_Soldner", "cass"];
  23372. /* harmony default export */ var cass = ({
  23373. init: cass_init,
  23374. forward: cass_forward,
  23375. inverse: cass_inverse,
  23376. names: cass_names
  23377. });
  23378. // CONCATENATED MODULE: ./node_modules/proj4/lib/common/qsfnz.js
  23379. /* harmony default export */ var qsfnz = (function(eccent, sinphi) {
  23380. var con;
  23381. if (eccent > 1.0e-7) {
  23382. con = eccent * sinphi;
  23383. return ((1 - eccent * eccent) * (sinphi / (1 - con * con) - (0.5 / eccent) * Math.log((1 - con) / (1 + con))));
  23384. }
  23385. else {
  23386. return (2 * sinphi);
  23387. }
  23388. });
  23389. // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/laea.js
  23390. /*
  23391. reference
  23392. "New Equal-Area Map Projections for Noncircular Regions", John P. Snyder,
  23393. The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355.
  23394. */
  23395. var S_POLE = 1;
  23396. var N_POLE = 2;
  23397. var EQUIT = 3;
  23398. var OBLIQ = 4;
  23399. /* Initialize the Lambert Azimuthal Equal Area projection
  23400. ------------------------------------------------------*/
  23401. function laea_init() {
  23402. var t = Math.abs(this.lat0);
  23403. if (Math.abs(t - HALF_PI) < EPSLN) {
  23404. this.mode = this.lat0 < 0 ? this.S_POLE : this.N_POLE;
  23405. }
  23406. else if (Math.abs(t) < EPSLN) {
  23407. this.mode = this.EQUIT;
  23408. }
  23409. else {
  23410. this.mode = this.OBLIQ;
  23411. }
  23412. if (this.es > 0) {
  23413. var sinphi;
  23414. this.qp = qsfnz(this.e, 1);
  23415. this.mmf = 0.5 / (1 - this.es);
  23416. this.apa = authset(this.es);
  23417. switch (this.mode) {
  23418. case this.N_POLE:
  23419. this.dd = 1;
  23420. break;
  23421. case this.S_POLE:
  23422. this.dd = 1;
  23423. break;
  23424. case this.EQUIT:
  23425. this.rq = Math.sqrt(0.5 * this.qp);
  23426. this.dd = 1 / this.rq;
  23427. this.xmf = 1;
  23428. this.ymf = 0.5 * this.qp;
  23429. break;
  23430. case this.OBLIQ:
  23431. this.rq = Math.sqrt(0.5 * this.qp);
  23432. sinphi = Math.sin(this.lat0);
  23433. this.sinb1 = qsfnz(this.e, sinphi) / this.qp;
  23434. this.cosb1 = Math.sqrt(1 - this.sinb1 * this.sinb1);
  23435. this.dd = Math.cos(this.lat0) / (Math.sqrt(1 - this.es * sinphi * sinphi) * this.rq * this.cosb1);
  23436. this.ymf = (this.xmf = this.rq) / this.dd;
  23437. this.xmf *= this.dd;
  23438. break;
  23439. }
  23440. }
  23441. else {
  23442. if (this.mode === this.OBLIQ) {
  23443. this.sinph0 = Math.sin(this.lat0);
  23444. this.cosph0 = Math.cos(this.lat0);
  23445. }
  23446. }
  23447. }
  23448. /* Lambert Azimuthal Equal Area forward equations--mapping lat,long to x,y
  23449. -----------------------------------------------------------------------*/
  23450. function laea_forward(p) {
  23451. /* Forward equations
  23452. -----------------*/
  23453. var x, y, coslam, sinlam, sinphi, q, sinb, cosb, b, cosphi;
  23454. var lam = p.x;
  23455. var phi = p.y;
  23456. lam = adjust_lon(lam - this.long0);
  23457. if (this.sphere) {
  23458. sinphi = Math.sin(phi);
  23459. cosphi = Math.cos(phi);
  23460. coslam = Math.cos(lam);
  23461. if (this.mode === this.OBLIQ || this.mode === this.EQUIT) {
  23462. y = (this.mode === this.EQUIT) ? 1 + cosphi * coslam : 1 + this.sinph0 * sinphi + this.cosph0 * cosphi * coslam;
  23463. if (y <= EPSLN) {
  23464. return null;
  23465. }
  23466. y = Math.sqrt(2 / y);
  23467. x = y * cosphi * Math.sin(lam);
  23468. y *= (this.mode === this.EQUIT) ? sinphi : this.cosph0 * sinphi - this.sinph0 * cosphi * coslam;
  23469. }
  23470. else if (this.mode === this.N_POLE || this.mode === this.S_POLE) {
  23471. if (this.mode === this.N_POLE) {
  23472. coslam = -coslam;
  23473. }
  23474. if (Math.abs(phi + this.phi0) < EPSLN) {
  23475. return null;
  23476. }
  23477. y = FORTPI - phi * 0.5;
  23478. y = 2 * ((this.mode === this.S_POLE) ? Math.cos(y) : Math.sin(y));
  23479. x = y * Math.sin(lam);
  23480. y *= coslam;
  23481. }
  23482. }
  23483. else {
  23484. sinb = 0;
  23485. cosb = 0;
  23486. b = 0;
  23487. coslam = Math.cos(lam);
  23488. sinlam = Math.sin(lam);
  23489. sinphi = Math.sin(phi);
  23490. q = qsfnz(this.e, sinphi);
  23491. if (this.mode === this.OBLIQ || this.mode === this.EQUIT) {
  23492. sinb = q / this.qp;
  23493. cosb = Math.sqrt(1 - sinb * sinb);
  23494. }
  23495. switch (this.mode) {
  23496. case this.OBLIQ:
  23497. b = 1 + this.sinb1 * sinb + this.cosb1 * cosb * coslam;
  23498. break;
  23499. case this.EQUIT:
  23500. b = 1 + cosb * coslam;
  23501. break;
  23502. case this.N_POLE:
  23503. b = HALF_PI + phi;
  23504. q = this.qp - q;
  23505. break;
  23506. case this.S_POLE:
  23507. b = phi - HALF_PI;
  23508. q = this.qp + q;
  23509. break;
  23510. }
  23511. if (Math.abs(b) < EPSLN) {
  23512. return null;
  23513. }
  23514. switch (this.mode) {
  23515. case this.OBLIQ:
  23516. case this.EQUIT:
  23517. b = Math.sqrt(2 / b);
  23518. if (this.mode === this.OBLIQ) {
  23519. y = this.ymf * b * (this.cosb1 * sinb - this.sinb1 * cosb * coslam);
  23520. }
  23521. else {
  23522. y = (b = Math.sqrt(2 / (1 + cosb * coslam))) * sinb * this.ymf;
  23523. }
  23524. x = this.xmf * b * cosb * sinlam;
  23525. break;
  23526. case this.N_POLE:
  23527. case this.S_POLE:
  23528. if (q >= 0) {
  23529. x = (b = Math.sqrt(q)) * sinlam;
  23530. y = coslam * ((this.mode === this.S_POLE) ? b : -b);
  23531. }
  23532. else {
  23533. x = y = 0;
  23534. }
  23535. break;
  23536. }
  23537. }
  23538. p.x = this.a * x + this.x0;
  23539. p.y = this.a * y + this.y0;
  23540. return p;
  23541. }
  23542. /* Inverse equations
  23543. -----------------*/
  23544. function laea_inverse(p) {
  23545. p.x -= this.x0;
  23546. p.y -= this.y0;
  23547. var x = p.x / this.a;
  23548. var y = p.y / this.a;
  23549. var lam, phi, cCe, sCe, q, rho, ab;
  23550. if (this.sphere) {
  23551. var cosz = 0,
  23552. rh, sinz = 0;
  23553. rh = Math.sqrt(x * x + y * y);
  23554. phi = rh * 0.5;
  23555. if (phi > 1) {
  23556. return null;
  23557. }
  23558. phi = 2 * Math.asin(phi);
  23559. if (this.mode === this.OBLIQ || this.mode === this.EQUIT) {
  23560. sinz = Math.sin(phi);
  23561. cosz = Math.cos(phi);
  23562. }
  23563. switch (this.mode) {
  23564. case this.EQUIT:
  23565. phi = (Math.abs(rh) <= EPSLN) ? 0 : Math.asin(y * sinz / rh);
  23566. x *= sinz;
  23567. y = cosz * rh;
  23568. break;
  23569. case this.OBLIQ:
  23570. phi = (Math.abs(rh) <= EPSLN) ? this.phi0 : Math.asin(cosz * this.sinph0 + y * sinz * this.cosph0 / rh);
  23571. x *= sinz * this.cosph0;
  23572. y = (cosz - Math.sin(phi) * this.sinph0) * rh;
  23573. break;
  23574. case this.N_POLE:
  23575. y = -y;
  23576. phi = HALF_PI - phi;
  23577. break;
  23578. case this.S_POLE:
  23579. phi -= HALF_PI;
  23580. break;
  23581. }
  23582. lam = (y === 0 && (this.mode === this.EQUIT || this.mode === this.OBLIQ)) ? 0 : Math.atan2(x, y);
  23583. }
  23584. else {
  23585. ab = 0;
  23586. if (this.mode === this.OBLIQ || this.mode === this.EQUIT) {
  23587. x /= this.dd;
  23588. y *= this.dd;
  23589. rho = Math.sqrt(x * x + y * y);
  23590. if (rho < EPSLN) {
  23591. p.x = 0;
  23592. p.y = this.phi0;
  23593. return p;
  23594. }
  23595. sCe = 2 * Math.asin(0.5 * rho / this.rq);
  23596. cCe = Math.cos(sCe);
  23597. x *= (sCe = Math.sin(sCe));
  23598. if (this.mode === this.OBLIQ) {
  23599. ab = cCe * this.sinb1 + y * sCe * this.cosb1 / rho;
  23600. q = this.qp * ab;
  23601. y = rho * this.cosb1 * cCe - y * this.sinb1 * sCe;
  23602. }
  23603. else {
  23604. ab = y * sCe / rho;
  23605. q = this.qp * ab;
  23606. y = rho * cCe;
  23607. }
  23608. }
  23609. else if (this.mode === this.N_POLE || this.mode === this.S_POLE) {
  23610. if (this.mode === this.N_POLE) {
  23611. y = -y;
  23612. }
  23613. q = (x * x + y * y);
  23614. if (!q) {
  23615. p.x = 0;
  23616. p.y = this.phi0;
  23617. return p;
  23618. }
  23619. ab = 1 - q / this.qp;
  23620. if (this.mode === this.S_POLE) {
  23621. ab = -ab;
  23622. }
  23623. }
  23624. lam = Math.atan2(x, y);
  23625. phi = authlat(Math.asin(ab), this.apa);
  23626. }
  23627. p.x = adjust_lon(this.long0 + lam);
  23628. p.y = phi;
  23629. return p;
  23630. }
  23631. /* determine latitude from authalic latitude */
  23632. var P00 = 0.33333333333333333333;
  23633. var P01 = 0.17222222222222222222;
  23634. var P02 = 0.10257936507936507936;
  23635. var P10 = 0.06388888888888888888;
  23636. var P11 = 0.06640211640211640211;
  23637. var P20 = 0.01641501294219154443;
  23638. function authset(es) {
  23639. var t;
  23640. var APA = [];
  23641. APA[0] = es * P00;
  23642. t = es * es;
  23643. APA[0] += t * P01;
  23644. APA[1] = t * P10;
  23645. t *= es;
  23646. APA[0] += t * P02;
  23647. APA[1] += t * P11;
  23648. APA[2] = t * P20;
  23649. return APA;
  23650. }
  23651. function authlat(beta, APA) {
  23652. var t = beta + beta;
  23653. return (beta + APA[0] * Math.sin(t) + APA[1] * Math.sin(t + t) + APA[2] * Math.sin(t + t + t));
  23654. }
  23655. var laea_names = ["Lambert Azimuthal Equal Area", "Lambert_Azimuthal_Equal_Area", "laea"];
  23656. /* harmony default export */ var laea = ({
  23657. init: laea_init,
  23658. forward: laea_forward,
  23659. inverse: laea_inverse,
  23660. names: laea_names,
  23661. S_POLE: S_POLE,
  23662. N_POLE: N_POLE,
  23663. EQUIT: EQUIT,
  23664. OBLIQ: OBLIQ
  23665. });
  23666. // CONCATENATED MODULE: ./node_modules/proj4/lib/common/asinz.js
  23667. /* harmony default export */ var asinz = (function(x) {
  23668. if (Math.abs(x) > 1) {
  23669. x = (x > 1) ? 1 : -1;
  23670. }
  23671. return Math.asin(x);
  23672. });
  23673. // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/aea.js
  23674. function aea_init() {
  23675. if (Math.abs(this.lat1 + this.lat2) < EPSLN) {
  23676. return;
  23677. }
  23678. this.temp = this.b / this.a;
  23679. this.es = 1 - Math.pow(this.temp, 2);
  23680. this.e3 = Math.sqrt(this.es);
  23681. this.sin_po = Math.sin(this.lat1);
  23682. this.cos_po = Math.cos(this.lat1);
  23683. this.t1 = this.sin_po;
  23684. this.con = this.sin_po;
  23685. this.ms1 = msfnz(this.e3, this.sin_po, this.cos_po);
  23686. this.qs1 = qsfnz(this.e3, this.sin_po, this.cos_po);
  23687. this.sin_po = Math.sin(this.lat2);
  23688. this.cos_po = Math.cos(this.lat2);
  23689. this.t2 = this.sin_po;
  23690. this.ms2 = msfnz(this.e3, this.sin_po, this.cos_po);
  23691. this.qs2 = qsfnz(this.e3, this.sin_po, this.cos_po);
  23692. this.sin_po = Math.sin(this.lat0);
  23693. this.cos_po = Math.cos(this.lat0);
  23694. this.t3 = this.sin_po;
  23695. this.qs0 = qsfnz(this.e3, this.sin_po, this.cos_po);
  23696. if (Math.abs(this.lat1 - this.lat2) > EPSLN) {
  23697. this.ns0 = (this.ms1 * this.ms1 - this.ms2 * this.ms2) / (this.qs2 - this.qs1);
  23698. }
  23699. else {
  23700. this.ns0 = this.con;
  23701. }
  23702. this.c = this.ms1 * this.ms1 + this.ns0 * this.qs1;
  23703. this.rh = this.a * Math.sqrt(this.c - this.ns0 * this.qs0) / this.ns0;
  23704. }
  23705. /* Albers Conical Equal Area forward equations--mapping lat,long to x,y
  23706. -------------------------------------------------------------------*/
  23707. function aea_forward(p) {
  23708. var lon = p.x;
  23709. var lat = p.y;
  23710. this.sin_phi = Math.sin(lat);
  23711. this.cos_phi = Math.cos(lat);
  23712. var qs = qsfnz(this.e3, this.sin_phi, this.cos_phi);
  23713. var rh1 = this.a * Math.sqrt(this.c - this.ns0 * qs) / this.ns0;
  23714. var theta = this.ns0 * adjust_lon(lon - this.long0);
  23715. var x = rh1 * Math.sin(theta) + this.x0;
  23716. var y = this.rh - rh1 * Math.cos(theta) + this.y0;
  23717. p.x = x;
  23718. p.y = y;
  23719. return p;
  23720. }
  23721. function aea_inverse(p) {
  23722. var rh1, qs, con, theta, lon, lat;
  23723. p.x -= this.x0;
  23724. p.y = this.rh - p.y + this.y0;
  23725. if (this.ns0 >= 0) {
  23726. rh1 = Math.sqrt(p.x * p.x + p.y * p.y);
  23727. con = 1;
  23728. }
  23729. else {
  23730. rh1 = -Math.sqrt(p.x * p.x + p.y * p.y);
  23731. con = -1;
  23732. }
  23733. theta = 0;
  23734. if (rh1 !== 0) {
  23735. theta = Math.atan2(con * p.x, con * p.y);
  23736. }
  23737. con = rh1 * this.ns0 / this.a;
  23738. if (this.sphere) {
  23739. lat = Math.asin((this.c - con * con) / (2 * this.ns0));
  23740. }
  23741. else {
  23742. qs = (this.c - con * con) / this.ns0;
  23743. lat = this.phi1z(this.e3, qs);
  23744. }
  23745. lon = adjust_lon(theta / this.ns0 + this.long0);
  23746. p.x = lon;
  23747. p.y = lat;
  23748. return p;
  23749. }
  23750. /* Function to compute phi1, the latitude for the inverse of the
  23751. Albers Conical Equal-Area projection.
  23752. -------------------------------------------*/
  23753. function phi1z(eccent, qs) {
  23754. var sinphi, cosphi, con, com, dphi;
  23755. var phi = asinz(0.5 * qs);
  23756. if (eccent < EPSLN) {
  23757. return phi;
  23758. }
  23759. var eccnts = eccent * eccent;
  23760. for (var i = 1; i <= 25; i++) {
  23761. sinphi = Math.sin(phi);
  23762. cosphi = Math.cos(phi);
  23763. con = eccent * sinphi;
  23764. com = 1 - con * con;
  23765. dphi = 0.5 * com * com / cosphi * (qs / (1 - eccnts) - sinphi / com + 0.5 / eccent * Math.log((1 - con) / (1 + con)));
  23766. phi = phi + dphi;
  23767. if (Math.abs(dphi) <= 1e-7) {
  23768. return phi;
  23769. }
  23770. }
  23771. return null;
  23772. }
  23773. var aea_names = ["Albers_Conic_Equal_Area", "Albers", "aea"];
  23774. /* harmony default export */ var aea = ({
  23775. init: aea_init,
  23776. forward: aea_forward,
  23777. inverse: aea_inverse,
  23778. names: aea_names,
  23779. phi1z: phi1z
  23780. });
  23781. // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/gnom.js
  23782. /*
  23783. reference:
  23784. Wolfram Mathworld "Gnomonic Projection"
  23785. http://mathworld.wolfram.com/GnomonicProjection.html
  23786. Accessed: 12th November 2009
  23787. */
  23788. function gnom_init() {
  23789. /* Place parameters in static storage for common use
  23790. -------------------------------------------------*/
  23791. this.sin_p14 = Math.sin(this.lat0);
  23792. this.cos_p14 = Math.cos(this.lat0);
  23793. // Approximation for projecting points to the horizon (infinity)
  23794. this.infinity_dist = 1000 * this.a;
  23795. this.rc = 1;
  23796. }
  23797. /* Gnomonic forward equations--mapping lat,long to x,y
  23798. ---------------------------------------------------*/
  23799. function gnom_forward(p) {
  23800. var sinphi, cosphi; /* sin and cos value */
  23801. var dlon; /* delta longitude value */
  23802. var coslon; /* cos of longitude */
  23803. var ksp; /* scale factor */
  23804. var g;
  23805. var x, y;
  23806. var lon = p.x;
  23807. var lat = p.y;
  23808. /* Forward equations
  23809. -----------------*/
  23810. dlon = adjust_lon(lon - this.long0);
  23811. sinphi = Math.sin(lat);
  23812. cosphi = Math.cos(lat);
  23813. coslon = Math.cos(dlon);
  23814. g = this.sin_p14 * sinphi + this.cos_p14 * cosphi * coslon;
  23815. ksp = 1;
  23816. if ((g > 0) || (Math.abs(g) <= EPSLN)) {
  23817. x = this.x0 + this.a * ksp * cosphi * Math.sin(dlon) / g;
  23818. y = this.y0 + this.a * ksp * (this.cos_p14 * sinphi - this.sin_p14 * cosphi * coslon) / g;
  23819. }
  23820. else {
  23821. // Point is in the opposing hemisphere and is unprojectable
  23822. // We still need to return a reasonable point, so we project
  23823. // to infinity, on a bearing
  23824. // equivalent to the northern hemisphere equivalent
  23825. // This is a reasonable approximation for short shapes and lines that
  23826. // straddle the horizon.
  23827. x = this.x0 + this.infinity_dist * cosphi * Math.sin(dlon);
  23828. y = this.y0 + this.infinity_dist * (this.cos_p14 * sinphi - this.sin_p14 * cosphi * coslon);
  23829. }
  23830. p.x = x;
  23831. p.y = y;
  23832. return p;
  23833. }
  23834. function gnom_inverse(p) {
  23835. var rh; /* Rho */
  23836. var sinc, cosc;
  23837. var c;
  23838. var lon, lat;
  23839. /* Inverse equations
  23840. -----------------*/
  23841. p.x = (p.x - this.x0) / this.a;
  23842. p.y = (p.y - this.y0) / this.a;
  23843. p.x /= this.k0;
  23844. p.y /= this.k0;
  23845. if ((rh = Math.sqrt(p.x * p.x + p.y * p.y))) {
  23846. c = Math.atan2(rh, this.rc);
  23847. sinc = Math.sin(c);
  23848. cosc = Math.cos(c);
  23849. lat = asinz(cosc * this.sin_p14 + (p.y * sinc * this.cos_p14) / rh);
  23850. lon = Math.atan2(p.x * sinc, rh * this.cos_p14 * cosc - p.y * this.sin_p14 * sinc);
  23851. lon = adjust_lon(this.long0 + lon);
  23852. }
  23853. else {
  23854. lat = this.phic0;
  23855. lon = 0;
  23856. }
  23857. p.x = lon;
  23858. p.y = lat;
  23859. return p;
  23860. }
  23861. var gnom_names = ["gnom"];
  23862. /* harmony default export */ var gnom = ({
  23863. init: gnom_init,
  23864. forward: gnom_forward,
  23865. inverse: gnom_inverse,
  23866. names: gnom_names
  23867. });
  23868. // CONCATENATED MODULE: ./node_modules/proj4/lib/common/iqsfnz.js
  23869. /* harmony default export */ var iqsfnz = (function(eccent, q) {
  23870. var temp = 1 - (1 - eccent * eccent) / (2 * eccent) * Math.log((1 - eccent) / (1 + eccent));
  23871. if (Math.abs(Math.abs(q) - temp) < 1.0E-6) {
  23872. if (q < 0) {
  23873. return (-1 * HALF_PI);
  23874. }
  23875. else {
  23876. return HALF_PI;
  23877. }
  23878. }
  23879. //var phi = 0.5* q/(1-eccent*eccent);
  23880. var phi = Math.asin(0.5 * q);
  23881. var dphi;
  23882. var sin_phi;
  23883. var cos_phi;
  23884. var con;
  23885. for (var i = 0; i < 30; i++) {
  23886. sin_phi = Math.sin(phi);
  23887. cos_phi = Math.cos(phi);
  23888. con = eccent * sin_phi;
  23889. dphi = Math.pow(1 - con * con, 2) / (2 * cos_phi) * (q / (1 - eccent * eccent) - sin_phi / (1 - con * con) + 0.5 / eccent * Math.log((1 - con) / (1 + con)));
  23890. phi += dphi;
  23891. if (Math.abs(dphi) <= 0.0000000001) {
  23892. return phi;
  23893. }
  23894. }
  23895. //console.log("IQSFN-CONV:Latitude failed to converge after 30 iterations");
  23896. return NaN;
  23897. });
  23898. // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/cea.js
  23899. /*
  23900. reference:
  23901. "Cartographic Projection Procedures for the UNIX Environment-
  23902. A User's Manual" by Gerald I. Evenden,
  23903. USGS Open File Report 90-284and Release 4 Interim Reports (2003)
  23904. */
  23905. function cea_init() {
  23906. //no-op
  23907. if (!this.sphere) {
  23908. this.k0 = msfnz(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts));
  23909. }
  23910. }
  23911. /* Cylindrical Equal Area forward equations--mapping lat,long to x,y
  23912. ------------------------------------------------------------*/
  23913. function cea_forward(p) {
  23914. var lon = p.x;
  23915. var lat = p.y;
  23916. var x, y;
  23917. /* Forward equations
  23918. -----------------*/
  23919. var dlon = adjust_lon(lon - this.long0);
  23920. if (this.sphere) {
  23921. x = this.x0 + this.a * dlon * Math.cos(this.lat_ts);
  23922. y = this.y0 + this.a * Math.sin(lat) / Math.cos(this.lat_ts);
  23923. }
  23924. else {
  23925. var qs = qsfnz(this.e, Math.sin(lat));
  23926. x = this.x0 + this.a * this.k0 * dlon;
  23927. y = this.y0 + this.a * qs * 0.5 / this.k0;
  23928. }
  23929. p.x = x;
  23930. p.y = y;
  23931. return p;
  23932. }
  23933. /* Cylindrical Equal Area inverse equations--mapping x,y to lat/long
  23934. ------------------------------------------------------------*/
  23935. function cea_inverse(p) {
  23936. p.x -= this.x0;
  23937. p.y -= this.y0;
  23938. var lon, lat;
  23939. if (this.sphere) {
  23940. lon = adjust_lon(this.long0 + (p.x / this.a) / Math.cos(this.lat_ts));
  23941. lat = Math.asin((p.y / this.a) * Math.cos(this.lat_ts));
  23942. }
  23943. else {
  23944. lat = iqsfnz(this.e, 2 * p.y * this.k0 / this.a);
  23945. lon = adjust_lon(this.long0 + p.x / (this.a * this.k0));
  23946. }
  23947. p.x = lon;
  23948. p.y = lat;
  23949. return p;
  23950. }
  23951. var cea_names = ["cea"];
  23952. /* harmony default export */ var cea = ({
  23953. init: cea_init,
  23954. forward: cea_forward,
  23955. inverse: cea_inverse,
  23956. names: cea_names
  23957. });
  23958. // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/eqc.js
  23959. function eqc_init() {
  23960. this.x0 = this.x0 || 0;
  23961. this.y0 = this.y0 || 0;
  23962. this.lat0 = this.lat0 || 0;
  23963. this.long0 = this.long0 || 0;
  23964. this.lat_ts = this.lat_ts || 0;
  23965. this.title = this.title || "Equidistant Cylindrical (Plate Carre)";
  23966. this.rc = Math.cos(this.lat_ts);
  23967. }
  23968. // forward equations--mapping lat,long to x,y
  23969. // -----------------------------------------------------------------
  23970. function eqc_forward(p) {
  23971. var lon = p.x;
  23972. var lat = p.y;
  23973. var dlon = adjust_lon(lon - this.long0);
  23974. var dlat = adjust_lat(lat - this.lat0);
  23975. p.x = this.x0 + (this.a * dlon * this.rc);
  23976. p.y = this.y0 + (this.a * dlat);
  23977. return p;
  23978. }
  23979. // inverse equations--mapping x,y to lat/long
  23980. // -----------------------------------------------------------------
  23981. function eqc_inverse(p) {
  23982. var x = p.x;
  23983. var y = p.y;
  23984. p.x = adjust_lon(this.long0 + ((x - this.x0) / (this.a * this.rc)));
  23985. p.y = adjust_lat(this.lat0 + ((y - this.y0) / (this.a)));
  23986. return p;
  23987. }
  23988. var eqc_names = ["Equirectangular", "Equidistant_Cylindrical", "eqc"];
  23989. /* harmony default export */ var eqc = ({
  23990. init: eqc_init,
  23991. forward: eqc_forward,
  23992. inverse: eqc_inverse,
  23993. names: eqc_names
  23994. });
  23995. // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/poly.js
  23996. var poly_MAX_ITER = 20;
  23997. function poly_init() {
  23998. /* Place parameters in static storage for common use
  23999. -------------------------------------------------*/
  24000. this.temp = this.b / this.a;
  24001. this.es = 1 - Math.pow(this.temp, 2); // devait etre dans tmerc.js mais n y est pas donc je commente sinon retour de valeurs nulles
  24002. this.e = Math.sqrt(this.es);
  24003. this.e0 = e0fn(this.es);
  24004. this.e1 = e1fn(this.es);
  24005. this.e2 = e2fn(this.es);
  24006. this.e3 = e3fn(this.es);
  24007. this.ml0 = this.a * mlfn(this.e0, this.e1, this.e2, this.e3, this.lat0); //si que des zeros le calcul ne se fait pas
  24008. }
  24009. /* Polyconic forward equations--mapping lat,long to x,y
  24010. ---------------------------------------------------*/
  24011. function poly_forward(p) {
  24012. var lon = p.x;
  24013. var lat = p.y;
  24014. var x, y, el;
  24015. var dlon = adjust_lon(lon - this.long0);
  24016. el = dlon * Math.sin(lat);
  24017. if (this.sphere) {
  24018. if (Math.abs(lat) <= EPSLN) {
  24019. x = this.a * dlon;
  24020. y = -1 * this.a * this.lat0;
  24021. }
  24022. else {
  24023. x = this.a * Math.sin(el) / Math.tan(lat);
  24024. y = this.a * (adjust_lat(lat - this.lat0) + (1 - Math.cos(el)) / Math.tan(lat));
  24025. }
  24026. }
  24027. else {
  24028. if (Math.abs(lat) <= EPSLN) {
  24029. x = this.a * dlon;
  24030. y = -1 * this.ml0;
  24031. }
  24032. else {
  24033. var nl = gN(this.a, this.e, Math.sin(lat)) / Math.tan(lat);
  24034. x = nl * Math.sin(el);
  24035. y = this.a * mlfn(this.e0, this.e1, this.e2, this.e3, lat) - this.ml0 + nl * (1 - Math.cos(el));
  24036. }
  24037. }
  24038. p.x = x + this.x0;
  24039. p.y = y + this.y0;
  24040. return p;
  24041. }
  24042. /* Inverse equations
  24043. -----------------*/
  24044. function poly_inverse(p) {
  24045. var lon, lat, x, y, i;
  24046. var al, bl;
  24047. var phi, dphi;
  24048. x = p.x - this.x0;
  24049. y = p.y - this.y0;
  24050. if (this.sphere) {
  24051. if (Math.abs(y + this.a * this.lat0) <= EPSLN) {
  24052. lon = adjust_lon(x / this.a + this.long0);
  24053. lat = 0;
  24054. }
  24055. else {
  24056. al = this.lat0 + y / this.a;
  24057. bl = x * x / this.a / this.a + al * al;
  24058. phi = al;
  24059. var tanphi;
  24060. for (i = poly_MAX_ITER; i; --i) {
  24061. tanphi = Math.tan(phi);
  24062. dphi = -1 * (al * (phi * tanphi + 1) - phi - 0.5 * (phi * phi + bl) * tanphi) / ((phi - al) / tanphi - 1);
  24063. phi += dphi;
  24064. if (Math.abs(dphi) <= EPSLN) {
  24065. lat = phi;
  24066. break;
  24067. }
  24068. }
  24069. lon = adjust_lon(this.long0 + (Math.asin(x * Math.tan(phi) / this.a)) / Math.sin(lat));
  24070. }
  24071. }
  24072. else {
  24073. if (Math.abs(y + this.ml0) <= EPSLN) {
  24074. lat = 0;
  24075. lon = adjust_lon(this.long0 + x / this.a);
  24076. }
  24077. else {
  24078. al = (this.ml0 + y) / this.a;
  24079. bl = x * x / this.a / this.a + al * al;
  24080. phi = al;
  24081. var cl, mln, mlnp, ma;
  24082. var con;
  24083. for (i = poly_MAX_ITER; i; --i) {
  24084. con = this.e * Math.sin(phi);
  24085. cl = Math.sqrt(1 - con * con) * Math.tan(phi);
  24086. mln = this.a * mlfn(this.e0, this.e1, this.e2, this.e3, phi);
  24087. mlnp = this.e0 - 2 * this.e1 * Math.cos(2 * phi) + 4 * this.e2 * Math.cos(4 * phi) - 6 * this.e3 * Math.cos(6 * phi);
  24088. ma = mln / this.a;
  24089. dphi = (al * (cl * ma + 1) - ma - 0.5 * cl * (ma * ma + bl)) / (this.es * Math.sin(2 * phi) * (ma * ma + bl - 2 * al * ma) / (4 * cl) + (al - ma) * (cl * mlnp - 2 / Math.sin(2 * phi)) - mlnp);
  24090. phi -= dphi;
  24091. if (Math.abs(dphi) <= EPSLN) {
  24092. lat = phi;
  24093. break;
  24094. }
  24095. }
  24096. //lat=phi4z(this.e,this.e0,this.e1,this.e2,this.e3,al,bl,0,0);
  24097. cl = Math.sqrt(1 - this.es * Math.pow(Math.sin(lat), 2)) * Math.tan(lat);
  24098. lon = adjust_lon(this.long0 + Math.asin(x * cl / this.a) / Math.sin(lat));
  24099. }
  24100. }
  24101. p.x = lon;
  24102. p.y = lat;
  24103. return p;
  24104. }
  24105. var poly_names = ["Polyconic", "poly"];
  24106. /* harmony default export */ var poly = ({
  24107. init: poly_init,
  24108. forward: poly_forward,
  24109. inverse: poly_inverse,
  24110. names: poly_names
  24111. });
  24112. // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/nzmg.js
  24113. /*
  24114. reference
  24115. Department of Land and Survey Technical Circular 1973/32
  24116. http://www.linz.govt.nz/docs/miscellaneous/nz-map-definition.pdf
  24117. OSG Technical Report 4.1
  24118. http://www.linz.govt.nz/docs/miscellaneous/nzmg.pdf
  24119. */
  24120. /**
  24121. * iterations: Number of iterations to refine inverse transform.
  24122. * 0 -> km accuracy
  24123. * 1 -> m accuracy -- suitable for most mapping applications
  24124. * 2 -> mm accuracy
  24125. */
  24126. var iterations = 1;
  24127. function nzmg_init() {
  24128. this.A = [];
  24129. this.A[1] = 0.6399175073;
  24130. this.A[2] = -0.1358797613;
  24131. this.A[3] = 0.063294409;
  24132. this.A[4] = -0.02526853;
  24133. this.A[5] = 0.0117879;
  24134. this.A[6] = -0.0055161;
  24135. this.A[7] = 0.0026906;
  24136. this.A[8] = -0.001333;
  24137. this.A[9] = 0.00067;
  24138. this.A[10] = -0.00034;
  24139. this.B_re = [];
  24140. this.B_im = [];
  24141. this.B_re[1] = 0.7557853228;
  24142. this.B_im[1] = 0;
  24143. this.B_re[2] = 0.249204646;
  24144. this.B_im[2] = 0.003371507;
  24145. this.B_re[3] = -0.001541739;
  24146. this.B_im[3] = 0.041058560;
  24147. this.B_re[4] = -0.10162907;
  24148. this.B_im[4] = 0.01727609;
  24149. this.B_re[5] = -0.26623489;
  24150. this.B_im[5] = -0.36249218;
  24151. this.B_re[6] = -0.6870983;
  24152. this.B_im[6] = -1.1651967;
  24153. this.C_re = [];
  24154. this.C_im = [];
  24155. this.C_re[1] = 1.3231270439;
  24156. this.C_im[1] = 0;
  24157. this.C_re[2] = -0.577245789;
  24158. this.C_im[2] = -0.007809598;
  24159. this.C_re[3] = 0.508307513;
  24160. this.C_im[3] = -0.112208952;
  24161. this.C_re[4] = -0.15094762;
  24162. this.C_im[4] = 0.18200602;
  24163. this.C_re[5] = 1.01418179;
  24164. this.C_im[5] = 1.64497696;
  24165. this.C_re[6] = 1.9660549;
  24166. this.C_im[6] = 2.5127645;
  24167. this.D = [];
  24168. this.D[1] = 1.5627014243;
  24169. this.D[2] = 0.5185406398;
  24170. this.D[3] = -0.03333098;
  24171. this.D[4] = -0.1052906;
  24172. this.D[5] = -0.0368594;
  24173. this.D[6] = 0.007317;
  24174. this.D[7] = 0.01220;
  24175. this.D[8] = 0.00394;
  24176. this.D[9] = -0.0013;
  24177. }
  24178. /**
  24179. New Zealand Map Grid Forward - long/lat to x/y
  24180. long/lat in radians
  24181. */
  24182. function nzmg_forward(p) {
  24183. var n;
  24184. var lon = p.x;
  24185. var lat = p.y;
  24186. var delta_lat = lat - this.lat0;
  24187. var delta_lon = lon - this.long0;
  24188. // 1. Calculate d_phi and d_psi ... // and d_lambda
  24189. // For this algorithm, delta_latitude is in seconds of arc x 10-5, so we need to scale to those units. Longitude is radians.
  24190. var d_phi = delta_lat / SEC_TO_RAD * 1E-5;
  24191. var d_lambda = delta_lon;
  24192. var d_phi_n = 1; // d_phi^0
  24193. var d_psi = 0;
  24194. for (n = 1; n <= 10; n++) {
  24195. d_phi_n = d_phi_n * d_phi;
  24196. d_psi = d_psi + this.A[n] * d_phi_n;
  24197. }
  24198. // 2. Calculate theta
  24199. var th_re = d_psi;
  24200. var th_im = d_lambda;
  24201. // 3. Calculate z
  24202. var th_n_re = 1;
  24203. var th_n_im = 0; // theta^0
  24204. var th_n_re1;
  24205. var th_n_im1;
  24206. var z_re = 0;
  24207. var z_im = 0;
  24208. for (n = 1; n <= 6; n++) {
  24209. th_n_re1 = th_n_re * th_re - th_n_im * th_im;
  24210. th_n_im1 = th_n_im * th_re + th_n_re * th_im;
  24211. th_n_re = th_n_re1;
  24212. th_n_im = th_n_im1;
  24213. z_re = z_re + this.B_re[n] * th_n_re - this.B_im[n] * th_n_im;
  24214. z_im = z_im + this.B_im[n] * th_n_re + this.B_re[n] * th_n_im;
  24215. }
  24216. // 4. Calculate easting and northing
  24217. p.x = (z_im * this.a) + this.x0;
  24218. p.y = (z_re * this.a) + this.y0;
  24219. return p;
  24220. }
  24221. /**
  24222. New Zealand Map Grid Inverse - x/y to long/lat
  24223. */
  24224. function nzmg_inverse(p) {
  24225. var n;
  24226. var x = p.x;
  24227. var y = p.y;
  24228. var delta_x = x - this.x0;
  24229. var delta_y = y - this.y0;
  24230. // 1. Calculate z
  24231. var z_re = delta_y / this.a;
  24232. var z_im = delta_x / this.a;
  24233. // 2a. Calculate theta - first approximation gives km accuracy
  24234. var z_n_re = 1;
  24235. var z_n_im = 0; // z^0
  24236. var z_n_re1;
  24237. var z_n_im1;
  24238. var th_re = 0;
  24239. var th_im = 0;
  24240. for (n = 1; n <= 6; n++) {
  24241. z_n_re1 = z_n_re * z_re - z_n_im * z_im;
  24242. z_n_im1 = z_n_im * z_re + z_n_re * z_im;
  24243. z_n_re = z_n_re1;
  24244. z_n_im = z_n_im1;
  24245. th_re = th_re + this.C_re[n] * z_n_re - this.C_im[n] * z_n_im;
  24246. th_im = th_im + this.C_im[n] * z_n_re + this.C_re[n] * z_n_im;
  24247. }
  24248. // 2b. Iterate to refine the accuracy of the calculation
  24249. // 0 iterations gives km accuracy
  24250. // 1 iteration gives m accuracy -- good enough for most mapping applications
  24251. // 2 iterations bives mm accuracy
  24252. for (var i = 0; i < this.iterations; i++) {
  24253. var th_n_re = th_re;
  24254. var th_n_im = th_im;
  24255. var th_n_re1;
  24256. var th_n_im1;
  24257. var num_re = z_re;
  24258. var num_im = z_im;
  24259. for (n = 2; n <= 6; n++) {
  24260. th_n_re1 = th_n_re * th_re - th_n_im * th_im;
  24261. th_n_im1 = th_n_im * th_re + th_n_re * th_im;
  24262. th_n_re = th_n_re1;
  24263. th_n_im = th_n_im1;
  24264. num_re = num_re + (n - 1) * (this.B_re[n] * th_n_re - this.B_im[n] * th_n_im);
  24265. num_im = num_im + (n - 1) * (this.B_im[n] * th_n_re + this.B_re[n] * th_n_im);
  24266. }
  24267. th_n_re = 1;
  24268. th_n_im = 0;
  24269. var den_re = this.B_re[1];
  24270. var den_im = this.B_im[1];
  24271. for (n = 2; n <= 6; n++) {
  24272. th_n_re1 = th_n_re * th_re - th_n_im * th_im;
  24273. th_n_im1 = th_n_im * th_re + th_n_re * th_im;
  24274. th_n_re = th_n_re1;
  24275. th_n_im = th_n_im1;
  24276. den_re = den_re + n * (this.B_re[n] * th_n_re - this.B_im[n] * th_n_im);
  24277. den_im = den_im + n * (this.B_im[n] * th_n_re + this.B_re[n] * th_n_im);
  24278. }
  24279. // Complex division
  24280. var den2 = den_re * den_re + den_im * den_im;
  24281. th_re = (num_re * den_re + num_im * den_im) / den2;
  24282. th_im = (num_im * den_re - num_re * den_im) / den2;
  24283. }
  24284. // 3. Calculate d_phi ... // and d_lambda
  24285. var d_psi = th_re;
  24286. var d_lambda = th_im;
  24287. var d_psi_n = 1; // d_psi^0
  24288. var d_phi = 0;
  24289. for (n = 1; n <= 9; n++) {
  24290. d_psi_n = d_psi_n * d_psi;
  24291. d_phi = d_phi + this.D[n] * d_psi_n;
  24292. }
  24293. // 4. Calculate latitude and longitude
  24294. // d_phi is calcuated in second of arc * 10^-5, so we need to scale back to radians. d_lambda is in radians.
  24295. var lat = this.lat0 + (d_phi * SEC_TO_RAD * 1E5);
  24296. var lon = this.long0 + d_lambda;
  24297. p.x = lon;
  24298. p.y = lat;
  24299. return p;
  24300. }
  24301. var nzmg_names = ["New_Zealand_Map_Grid", "nzmg"];
  24302. /* harmony default export */ var nzmg = ({
  24303. init: nzmg_init,
  24304. forward: nzmg_forward,
  24305. inverse: nzmg_inverse,
  24306. names: nzmg_names
  24307. });
  24308. // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/mill.js
  24309. /*
  24310. reference
  24311. "New Equal-Area Map Projections for Noncircular Regions", John P. Snyder,
  24312. The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355.
  24313. */
  24314. /* Initialize the Miller Cylindrical projection
  24315. -------------------------------------------*/
  24316. function mill_init() {
  24317. //no-op
  24318. }
  24319. /* Miller Cylindrical forward equations--mapping lat,long to x,y
  24320. ------------------------------------------------------------*/
  24321. function mill_forward(p) {
  24322. var lon = p.x;
  24323. var lat = p.y;
  24324. /* Forward equations
  24325. -----------------*/
  24326. var dlon = adjust_lon(lon - this.long0);
  24327. var x = this.x0 + this.a * dlon;
  24328. var y = this.y0 + this.a * Math.log(Math.tan((Math.PI / 4) + (lat / 2.5))) * 1.25;
  24329. p.x = x;
  24330. p.y = y;
  24331. return p;
  24332. }
  24333. /* Miller Cylindrical inverse equations--mapping x,y to lat/long
  24334. ------------------------------------------------------------*/
  24335. function mill_inverse(p) {
  24336. p.x -= this.x0;
  24337. p.y -= this.y0;
  24338. var lon = adjust_lon(this.long0 + p.x / this.a);
  24339. var lat = 2.5 * (Math.atan(Math.exp(0.8 * p.y / this.a)) - Math.PI / 4);
  24340. p.x = lon;
  24341. p.y = lat;
  24342. return p;
  24343. }
  24344. var mill_names = ["Miller_Cylindrical", "mill"];
  24345. /* harmony default export */ var mill = ({
  24346. init: mill_init,
  24347. forward: mill_forward,
  24348. inverse: mill_inverse,
  24349. names: mill_names
  24350. });
  24351. // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/sinu.js
  24352. var sinu_MAX_ITER = 20;
  24353. function sinu_init() {
  24354. /* Place parameters in static storage for common use
  24355. -------------------------------------------------*/
  24356. if (!this.sphere) {
  24357. this.en = pj_enfn(this.es);
  24358. }
  24359. else {
  24360. this.n = 1;
  24361. this.m = 0;
  24362. this.es = 0;
  24363. this.C_y = Math.sqrt((this.m + 1) / this.n);
  24364. this.C_x = this.C_y / (this.m + 1);
  24365. }
  24366. }
  24367. /* Sinusoidal forward equations--mapping lat,long to x,y
  24368. -----------------------------------------------------*/
  24369. function sinu_forward(p) {
  24370. var x, y;
  24371. var lon = p.x;
  24372. var lat = p.y;
  24373. /* Forward equations
  24374. -----------------*/
  24375. lon = adjust_lon(lon - this.long0);
  24376. if (this.sphere) {
  24377. if (!this.m) {
  24378. lat = this.n !== 1 ? Math.asin(this.n * Math.sin(lat)) : lat;
  24379. }
  24380. else {
  24381. var k = this.n * Math.sin(lat);
  24382. for (var i = sinu_MAX_ITER; i; --i) {
  24383. var V = (this.m * lat + Math.sin(lat) - k) / (this.m + Math.cos(lat));
  24384. lat -= V;
  24385. if (Math.abs(V) < EPSLN) {
  24386. break;
  24387. }
  24388. }
  24389. }
  24390. x = this.a * this.C_x * lon * (this.m + Math.cos(lat));
  24391. y = this.a * this.C_y * lat;
  24392. }
  24393. else {
  24394. var s = Math.sin(lat);
  24395. var c = Math.cos(lat);
  24396. y = this.a * pj_mlfn(lat, s, c, this.en);
  24397. x = this.a * lon * c / Math.sqrt(1 - this.es * s * s);
  24398. }
  24399. p.x = x;
  24400. p.y = y;
  24401. return p;
  24402. }
  24403. function sinu_inverse(p) {
  24404. var lat, temp, lon, s;
  24405. p.x -= this.x0;
  24406. lon = p.x / this.a;
  24407. p.y -= this.y0;
  24408. lat = p.y / this.a;
  24409. if (this.sphere) {
  24410. lat /= this.C_y;
  24411. lon = lon / (this.C_x * (this.m + Math.cos(lat)));
  24412. if (this.m) {
  24413. lat = asinz((this.m * lat + Math.sin(lat)) / this.n);
  24414. }
  24415. else if (this.n !== 1) {
  24416. lat = asinz(Math.sin(lat) / this.n);
  24417. }
  24418. lon = adjust_lon(lon + this.long0);
  24419. lat = adjust_lat(lat);
  24420. }
  24421. else {
  24422. lat = pj_inv_mlfn(p.y / this.a, this.es, this.en);
  24423. s = Math.abs(lat);
  24424. if (s < HALF_PI) {
  24425. s = Math.sin(lat);
  24426. temp = this.long0 + p.x * Math.sqrt(1 - this.es * s * s) / (this.a * Math.cos(lat));
  24427. //temp = this.long0 + p.x / (this.a * Math.cos(lat));
  24428. lon = adjust_lon(temp);
  24429. }
  24430. else if ((s - EPSLN) < HALF_PI) {
  24431. lon = this.long0;
  24432. }
  24433. }
  24434. p.x = lon;
  24435. p.y = lat;
  24436. return p;
  24437. }
  24438. var sinu_names = ["Sinusoidal", "sinu"];
  24439. /* harmony default export */ var sinu = ({
  24440. init: sinu_init,
  24441. forward: sinu_forward,
  24442. inverse: sinu_inverse,
  24443. names: sinu_names
  24444. });
  24445. // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/moll.js
  24446. function moll_init() {}
  24447. /* Mollweide forward equations--mapping lat,long to x,y
  24448. ----------------------------------------------------*/
  24449. function moll_forward(p) {
  24450. /* Forward equations
  24451. -----------------*/
  24452. var lon = p.x;
  24453. var lat = p.y;
  24454. var delta_lon = adjust_lon(lon - this.long0);
  24455. var theta = lat;
  24456. var con = Math.PI * Math.sin(lat);
  24457. /* Iterate using the Newton-Raphson method to find theta
  24458. -----------------------------------------------------*/
  24459. while (true) {
  24460. var delta_theta = -(theta + Math.sin(theta) - con) / (1 + Math.cos(theta));
  24461. theta += delta_theta;
  24462. if (Math.abs(delta_theta) < EPSLN) {
  24463. break;
  24464. }
  24465. }
  24466. theta /= 2;
  24467. /* If the latitude is 90 deg, force the x coordinate to be "0 + false easting"
  24468. this is done here because of precision problems with "cos(theta)"
  24469. --------------------------------------------------------------------------*/
  24470. if (Math.PI / 2 - Math.abs(lat) < EPSLN) {
  24471. delta_lon = 0;
  24472. }
  24473. var x = 0.900316316158 * this.a * delta_lon * Math.cos(theta) + this.x0;
  24474. var y = 1.4142135623731 * this.a * Math.sin(theta) + this.y0;
  24475. p.x = x;
  24476. p.y = y;
  24477. return p;
  24478. }
  24479. function moll_inverse(p) {
  24480. var theta;
  24481. var arg;
  24482. /* Inverse equations
  24483. -----------------*/
  24484. p.x -= this.x0;
  24485. p.y -= this.y0;
  24486. arg = p.y / (1.4142135623731 * this.a);
  24487. /* Because of division by zero problems, 'arg' can not be 1. Therefore
  24488. a number very close to one is used instead.
  24489. -------------------------------------------------------------------*/
  24490. if (Math.abs(arg) > 0.999999999999) {
  24491. arg = 0.999999999999;
  24492. }
  24493. theta = Math.asin(arg);
  24494. var lon = adjust_lon(this.long0 + (p.x / (0.900316316158 * this.a * Math.cos(theta))));
  24495. if (lon < (-Math.PI)) {
  24496. lon = -Math.PI;
  24497. }
  24498. if (lon > Math.PI) {
  24499. lon = Math.PI;
  24500. }
  24501. arg = (2 * theta + Math.sin(2 * theta)) / Math.PI;
  24502. if (Math.abs(arg) > 1) {
  24503. arg = 1;
  24504. }
  24505. var lat = Math.asin(arg);
  24506. p.x = lon;
  24507. p.y = lat;
  24508. return p;
  24509. }
  24510. var moll_names = ["Mollweide", "moll"];
  24511. /* harmony default export */ var moll = ({
  24512. init: moll_init,
  24513. forward: moll_forward,
  24514. inverse: moll_inverse,
  24515. names: moll_names
  24516. });
  24517. // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/eqdc.js
  24518. function eqdc_init() {
  24519. /* Place parameters in static storage for common use
  24520. -------------------------------------------------*/
  24521. // Standard Parallels cannot be equal and on opposite sides of the equator
  24522. if (Math.abs(this.lat1 + this.lat2) < EPSLN) {
  24523. return;
  24524. }
  24525. this.lat2 = this.lat2 || this.lat1;
  24526. this.temp = this.b / this.a;
  24527. this.es = 1 - Math.pow(this.temp, 2);
  24528. this.e = Math.sqrt(this.es);
  24529. this.e0 = e0fn(this.es);
  24530. this.e1 = e1fn(this.es);
  24531. this.e2 = e2fn(this.es);
  24532. this.e3 = e3fn(this.es);
  24533. this.sinphi = Math.sin(this.lat1);
  24534. this.cosphi = Math.cos(this.lat1);
  24535. this.ms1 = msfnz(this.e, this.sinphi, this.cosphi);
  24536. this.ml1 = mlfn(this.e0, this.e1, this.e2, this.e3, this.lat1);
  24537. if (Math.abs(this.lat1 - this.lat2) < EPSLN) {
  24538. this.ns = this.sinphi;
  24539. }
  24540. else {
  24541. this.sinphi = Math.sin(this.lat2);
  24542. this.cosphi = Math.cos(this.lat2);
  24543. this.ms2 = msfnz(this.e, this.sinphi, this.cosphi);
  24544. this.ml2 = mlfn(this.e0, this.e1, this.e2, this.e3, this.lat2);
  24545. this.ns = (this.ms1 - this.ms2) / (this.ml2 - this.ml1);
  24546. }
  24547. this.g = this.ml1 + this.ms1 / this.ns;
  24548. this.ml0 = mlfn(this.e0, this.e1, this.e2, this.e3, this.lat0);
  24549. this.rh = this.a * (this.g - this.ml0);
  24550. }
  24551. /* Equidistant Conic forward equations--mapping lat,long to x,y
  24552. -----------------------------------------------------------*/
  24553. function eqdc_forward(p) {
  24554. var lon = p.x;
  24555. var lat = p.y;
  24556. var rh1;
  24557. /* Forward equations
  24558. -----------------*/
  24559. if (this.sphere) {
  24560. rh1 = this.a * (this.g - lat);
  24561. }
  24562. else {
  24563. var ml = mlfn(this.e0, this.e1, this.e2, this.e3, lat);
  24564. rh1 = this.a * (this.g - ml);
  24565. }
  24566. var theta = this.ns * adjust_lon(lon - this.long0);
  24567. var x = this.x0 + rh1 * Math.sin(theta);
  24568. var y = this.y0 + this.rh - rh1 * Math.cos(theta);
  24569. p.x = x;
  24570. p.y = y;
  24571. return p;
  24572. }
  24573. /* Inverse equations
  24574. -----------------*/
  24575. function eqdc_inverse(p) {
  24576. p.x -= this.x0;
  24577. p.y = this.rh - p.y + this.y0;
  24578. var con, rh1, lat, lon;
  24579. if (this.ns >= 0) {
  24580. rh1 = Math.sqrt(p.x * p.x + p.y * p.y);
  24581. con = 1;
  24582. }
  24583. else {
  24584. rh1 = -Math.sqrt(p.x * p.x + p.y * p.y);
  24585. con = -1;
  24586. }
  24587. var theta = 0;
  24588. if (rh1 !== 0) {
  24589. theta = Math.atan2(con * p.x, con * p.y);
  24590. }
  24591. if (this.sphere) {
  24592. lon = adjust_lon(this.long0 + theta / this.ns);
  24593. lat = adjust_lat(this.g - rh1 / this.a);
  24594. p.x = lon;
  24595. p.y = lat;
  24596. return p;
  24597. }
  24598. else {
  24599. var ml = this.g - rh1 / this.a;
  24600. lat = imlfn(ml, this.e0, this.e1, this.e2, this.e3);
  24601. lon = adjust_lon(this.long0 + theta / this.ns);
  24602. p.x = lon;
  24603. p.y = lat;
  24604. return p;
  24605. }
  24606. }
  24607. var eqdc_names = ["Equidistant_Conic", "eqdc"];
  24608. /* harmony default export */ var eqdc = ({
  24609. init: eqdc_init,
  24610. forward: eqdc_forward,
  24611. inverse: eqdc_inverse,
  24612. names: eqdc_names
  24613. });
  24614. // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/vandg.js
  24615. /* Initialize the Van Der Grinten projection
  24616. ----------------------------------------*/
  24617. function vandg_init() {
  24618. //this.R = 6370997; //Radius of earth
  24619. this.R = this.a;
  24620. }
  24621. function vandg_forward(p) {
  24622. var lon = p.x;
  24623. var lat = p.y;
  24624. /* Forward equations
  24625. -----------------*/
  24626. var dlon = adjust_lon(lon - this.long0);
  24627. var x, y;
  24628. if (Math.abs(lat) <= EPSLN) {
  24629. x = this.x0 + this.R * dlon;
  24630. y = this.y0;
  24631. }
  24632. var theta = asinz(2 * Math.abs(lat / Math.PI));
  24633. if ((Math.abs(dlon) <= EPSLN) || (Math.abs(Math.abs(lat) - HALF_PI) <= EPSLN)) {
  24634. x = this.x0;
  24635. if (lat >= 0) {
  24636. y = this.y0 + Math.PI * this.R * Math.tan(0.5 * theta);
  24637. }
  24638. else {
  24639. y = this.y0 + Math.PI * this.R * -Math.tan(0.5 * theta);
  24640. }
  24641. // return(OK);
  24642. }
  24643. var al = 0.5 * Math.abs((Math.PI / dlon) - (dlon / Math.PI));
  24644. var asq = al * al;
  24645. var sinth = Math.sin(theta);
  24646. var costh = Math.cos(theta);
  24647. var g = costh / (sinth + costh - 1);
  24648. var gsq = g * g;
  24649. var m = g * (2 / sinth - 1);
  24650. var msq = m * m;
  24651. var con = Math.PI * this.R * (al * (g - msq) + Math.sqrt(asq * (g - msq) * (g - msq) - (msq + asq) * (gsq - msq))) / (msq + asq);
  24652. if (dlon < 0) {
  24653. con = -con;
  24654. }
  24655. x = this.x0 + con;
  24656. //con = Math.abs(con / (Math.PI * this.R));
  24657. var q = asq + g;
  24658. con = Math.PI * this.R * (m * q - al * Math.sqrt((msq + asq) * (asq + 1) - q * q)) / (msq + asq);
  24659. if (lat >= 0) {
  24660. //y = this.y0 + Math.PI * this.R * Math.sqrt(1 - con * con - 2 * al * con);
  24661. y = this.y0 + con;
  24662. }
  24663. else {
  24664. //y = this.y0 - Math.PI * this.R * Math.sqrt(1 - con * con - 2 * al * con);
  24665. y = this.y0 - con;
  24666. }
  24667. p.x = x;
  24668. p.y = y;
  24669. return p;
  24670. }
  24671. /* Van Der Grinten inverse equations--mapping x,y to lat/long
  24672. ---------------------------------------------------------*/
  24673. function vandg_inverse(p) {
  24674. var lon, lat;
  24675. var xx, yy, xys, c1, c2, c3;
  24676. var a1;
  24677. var m1;
  24678. var con;
  24679. var th1;
  24680. var d;
  24681. /* inverse equations
  24682. -----------------*/
  24683. p.x -= this.x0;
  24684. p.y -= this.y0;
  24685. con = Math.PI * this.R;
  24686. xx = p.x / con;
  24687. yy = p.y / con;
  24688. xys = xx * xx + yy * yy;
  24689. c1 = -Math.abs(yy) * (1 + xys);
  24690. c2 = c1 - 2 * yy * yy + xx * xx;
  24691. c3 = -2 * c1 + 1 + 2 * yy * yy + xys * xys;
  24692. d = yy * yy / c3 + (2 * c2 * c2 * c2 / c3 / c3 / c3 - 9 * c1 * c2 / c3 / c3) / 27;
  24693. a1 = (c1 - c2 * c2 / 3 / c3) / c3;
  24694. m1 = 2 * Math.sqrt(-a1 / 3);
  24695. con = ((3 * d) / a1) / m1;
  24696. if (Math.abs(con) > 1) {
  24697. if (con >= 0) {
  24698. con = 1;
  24699. }
  24700. else {
  24701. con = -1;
  24702. }
  24703. }
  24704. th1 = Math.acos(con) / 3;
  24705. if (p.y >= 0) {
  24706. lat = (-m1 * Math.cos(th1 + Math.PI / 3) - c2 / 3 / c3) * Math.PI;
  24707. }
  24708. else {
  24709. lat = -(-m1 * Math.cos(th1 + Math.PI / 3) - c2 / 3 / c3) * Math.PI;
  24710. }
  24711. if (Math.abs(xx) < EPSLN) {
  24712. lon = this.long0;
  24713. }
  24714. else {
  24715. lon = adjust_lon(this.long0 + Math.PI * (xys - 1 + Math.sqrt(1 + 2 * (xx * xx - yy * yy) + xys * xys)) / 2 / xx);
  24716. }
  24717. p.x = lon;
  24718. p.y = lat;
  24719. return p;
  24720. }
  24721. var vandg_names = ["Van_der_Grinten_I", "VanDerGrinten", "vandg"];
  24722. /* harmony default export */ var vandg = ({
  24723. init: vandg_init,
  24724. forward: vandg_forward,
  24725. inverse: vandg_inverse,
  24726. names: vandg_names
  24727. });
  24728. // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/aeqd.js
  24729. function aeqd_init() {
  24730. this.sin_p12 = Math.sin(this.lat0);
  24731. this.cos_p12 = Math.cos(this.lat0);
  24732. }
  24733. function aeqd_forward(p) {
  24734. var lon = p.x;
  24735. var lat = p.y;
  24736. var sinphi = Math.sin(p.y);
  24737. var cosphi = Math.cos(p.y);
  24738. var dlon = adjust_lon(lon - this.long0);
  24739. var e0, e1, e2, e3, Mlp, Ml, tanphi, Nl1, Nl, psi, Az, G, H, GH, Hs, c, kp, cos_c, s, s2, s3, s4, s5;
  24740. if (this.sphere) {
  24741. if (Math.abs(this.sin_p12 - 1) <= EPSLN) {
  24742. //North Pole case
  24743. p.x = this.x0 + this.a * (HALF_PI - lat) * Math.sin(dlon);
  24744. p.y = this.y0 - this.a * (HALF_PI - lat) * Math.cos(dlon);
  24745. return p;
  24746. }
  24747. else if (Math.abs(this.sin_p12 + 1) <= EPSLN) {
  24748. //South Pole case
  24749. p.x = this.x0 + this.a * (HALF_PI + lat) * Math.sin(dlon);
  24750. p.y = this.y0 + this.a * (HALF_PI + lat) * Math.cos(dlon);
  24751. return p;
  24752. }
  24753. else {
  24754. //default case
  24755. cos_c = this.sin_p12 * sinphi + this.cos_p12 * cosphi * Math.cos(dlon);
  24756. c = Math.acos(cos_c);
  24757. kp = c / Math.sin(c);
  24758. p.x = this.x0 + this.a * kp * cosphi * Math.sin(dlon);
  24759. p.y = this.y0 + this.a * kp * (this.cos_p12 * sinphi - this.sin_p12 * cosphi * Math.cos(dlon));
  24760. return p;
  24761. }
  24762. }
  24763. else {
  24764. e0 = e0fn(this.es);
  24765. e1 = e1fn(this.es);
  24766. e2 = e2fn(this.es);
  24767. e3 = e3fn(this.es);
  24768. if (Math.abs(this.sin_p12 - 1) <= EPSLN) {
  24769. //North Pole case
  24770. Mlp = this.a * mlfn(e0, e1, e2, e3, HALF_PI);
  24771. Ml = this.a * mlfn(e0, e1, e2, e3, lat);
  24772. p.x = this.x0 + (Mlp - Ml) * Math.sin(dlon);
  24773. p.y = this.y0 - (Mlp - Ml) * Math.cos(dlon);
  24774. return p;
  24775. }
  24776. else if (Math.abs(this.sin_p12 + 1) <= EPSLN) {
  24777. //South Pole case
  24778. Mlp = this.a * mlfn(e0, e1, e2, e3, HALF_PI);
  24779. Ml = this.a * mlfn(e0, e1, e2, e3, lat);
  24780. p.x = this.x0 + (Mlp + Ml) * Math.sin(dlon);
  24781. p.y = this.y0 + (Mlp + Ml) * Math.cos(dlon);
  24782. return p;
  24783. }
  24784. else {
  24785. //Default case
  24786. tanphi = sinphi / cosphi;
  24787. Nl1 = gN(this.a, this.e, this.sin_p12);
  24788. Nl = gN(this.a, this.e, sinphi);
  24789. psi = Math.atan((1 - this.es) * tanphi + this.es * Nl1 * this.sin_p12 / (Nl * cosphi));
  24790. Az = Math.atan2(Math.sin(dlon), this.cos_p12 * Math.tan(psi) - this.sin_p12 * Math.cos(dlon));
  24791. if (Az === 0) {
  24792. s = Math.asin(this.cos_p12 * Math.sin(psi) - this.sin_p12 * Math.cos(psi));
  24793. }
  24794. else if (Math.abs(Math.abs(Az) - Math.PI) <= EPSLN) {
  24795. s = -Math.asin(this.cos_p12 * Math.sin(psi) - this.sin_p12 * Math.cos(psi));
  24796. }
  24797. else {
  24798. s = Math.asin(Math.sin(dlon) * Math.cos(psi) / Math.sin(Az));
  24799. }
  24800. G = this.e * this.sin_p12 / Math.sqrt(1 - this.es);
  24801. H = this.e * this.cos_p12 * Math.cos(Az) / Math.sqrt(1 - this.es);
  24802. GH = G * H;
  24803. Hs = H * H;
  24804. s2 = s * s;
  24805. s3 = s2 * s;
  24806. s4 = s3 * s;
  24807. s5 = s4 * s;
  24808. c = Nl1 * s * (1 - s2 * Hs * (1 - Hs) / 6 + s3 / 8 * GH * (1 - 2 * Hs) + s4 / 120 * (Hs * (4 - 7 * Hs) - 3 * G * G * (1 - 7 * Hs)) - s5 / 48 * GH);
  24809. p.x = this.x0 + c * Math.sin(Az);
  24810. p.y = this.y0 + c * Math.cos(Az);
  24811. return p;
  24812. }
  24813. }
  24814. }
  24815. function aeqd_inverse(p) {
  24816. p.x -= this.x0;
  24817. p.y -= this.y0;
  24818. var rh, z, sinz, cosz, lon, lat, con, e0, e1, e2, e3, Mlp, M, N1, psi, Az, cosAz, tmp, A, B, D, Ee, F;
  24819. if (this.sphere) {
  24820. rh = Math.sqrt(p.x * p.x + p.y * p.y);
  24821. if (rh > (2 * HALF_PI * this.a)) {
  24822. return;
  24823. }
  24824. z = rh / this.a;
  24825. sinz = Math.sin(z);
  24826. cosz = Math.cos(z);
  24827. lon = this.long0;
  24828. if (Math.abs(rh) <= EPSLN) {
  24829. lat = this.lat0;
  24830. }
  24831. else {
  24832. lat = asinz(cosz * this.sin_p12 + (p.y * sinz * this.cos_p12) / rh);
  24833. con = Math.abs(this.lat0) - HALF_PI;
  24834. if (Math.abs(con) <= EPSLN) {
  24835. if (this.lat0 >= 0) {
  24836. lon = adjust_lon(this.long0 + Math.atan2(p.x, - p.y));
  24837. }
  24838. else {
  24839. lon = adjust_lon(this.long0 - Math.atan2(-p.x, p.y));
  24840. }
  24841. }
  24842. else {
  24843. /*con = cosz - this.sin_p12 * Math.sin(lat);
  24844. if ((Math.abs(con) < EPSLN) && (Math.abs(p.x) < EPSLN)) {
  24845. //no-op, just keep the lon value as is
  24846. } else {
  24847. var temp = Math.atan2((p.x * sinz * this.cos_p12), (con * rh));
  24848. lon = adjust_lon(this.long0 + Math.atan2((p.x * sinz * this.cos_p12), (con * rh)));
  24849. }*/
  24850. lon = adjust_lon(this.long0 + Math.atan2(p.x * sinz, rh * this.cos_p12 * cosz - p.y * this.sin_p12 * sinz));
  24851. }
  24852. }
  24853. p.x = lon;
  24854. p.y = lat;
  24855. return p;
  24856. }
  24857. else {
  24858. e0 = e0fn(this.es);
  24859. e1 = e1fn(this.es);
  24860. e2 = e2fn(this.es);
  24861. e3 = e3fn(this.es);
  24862. if (Math.abs(this.sin_p12 - 1) <= EPSLN) {
  24863. //North pole case
  24864. Mlp = this.a * mlfn(e0, e1, e2, e3, HALF_PI);
  24865. rh = Math.sqrt(p.x * p.x + p.y * p.y);
  24866. M = Mlp - rh;
  24867. lat = imlfn(M / this.a, e0, e1, e2, e3);
  24868. lon = adjust_lon(this.long0 + Math.atan2(p.x, - 1 * p.y));
  24869. p.x = lon;
  24870. p.y = lat;
  24871. return p;
  24872. }
  24873. else if (Math.abs(this.sin_p12 + 1) <= EPSLN) {
  24874. //South pole case
  24875. Mlp = this.a * mlfn(e0, e1, e2, e3, HALF_PI);
  24876. rh = Math.sqrt(p.x * p.x + p.y * p.y);
  24877. M = rh - Mlp;
  24878. lat = imlfn(M / this.a, e0, e1, e2, e3);
  24879. lon = adjust_lon(this.long0 + Math.atan2(p.x, p.y));
  24880. p.x = lon;
  24881. p.y = lat;
  24882. return p;
  24883. }
  24884. else {
  24885. //default case
  24886. rh = Math.sqrt(p.x * p.x + p.y * p.y);
  24887. Az = Math.atan2(p.x, p.y);
  24888. N1 = gN(this.a, this.e, this.sin_p12);
  24889. cosAz = Math.cos(Az);
  24890. tmp = this.e * this.cos_p12 * cosAz;
  24891. A = -tmp * tmp / (1 - this.es);
  24892. B = 3 * this.es * (1 - A) * this.sin_p12 * this.cos_p12 * cosAz / (1 - this.es);
  24893. D = rh / N1;
  24894. Ee = D - A * (1 + A) * Math.pow(D, 3) / 6 - B * (1 + 3 * A) * Math.pow(D, 4) / 24;
  24895. F = 1 - A * Ee * Ee / 2 - D * Ee * Ee * Ee / 6;
  24896. psi = Math.asin(this.sin_p12 * Math.cos(Ee) + this.cos_p12 * Math.sin(Ee) * cosAz);
  24897. lon = adjust_lon(this.long0 + Math.asin(Math.sin(Az) * Math.sin(Ee) / Math.cos(psi)));
  24898. lat = Math.atan((1 - this.es * F * this.sin_p12 / Math.sin(psi)) * Math.tan(psi) / (1 - this.es));
  24899. p.x = lon;
  24900. p.y = lat;
  24901. return p;
  24902. }
  24903. }
  24904. }
  24905. var aeqd_names = ["Azimuthal_Equidistant", "aeqd"];
  24906. /* harmony default export */ var aeqd = ({
  24907. init: aeqd_init,
  24908. forward: aeqd_forward,
  24909. inverse: aeqd_inverse,
  24910. names: aeqd_names
  24911. });
  24912. // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/ortho.js
  24913. function ortho_init() {
  24914. //double temp; /* temporary variable */
  24915. /* Place parameters in static storage for common use
  24916. -------------------------------------------------*/
  24917. this.sin_p14 = Math.sin(this.lat0);
  24918. this.cos_p14 = Math.cos(this.lat0);
  24919. }
  24920. /* Orthographic forward equations--mapping lat,long to x,y
  24921. ---------------------------------------------------*/
  24922. function ortho_forward(p) {
  24923. var sinphi, cosphi; /* sin and cos value */
  24924. var dlon; /* delta longitude value */
  24925. var coslon; /* cos of longitude */
  24926. var ksp; /* scale factor */
  24927. var g, x, y;
  24928. var lon = p.x;
  24929. var lat = p.y;
  24930. /* Forward equations
  24931. -----------------*/
  24932. dlon = adjust_lon(lon - this.long0);
  24933. sinphi = Math.sin(lat);
  24934. cosphi = Math.cos(lat);
  24935. coslon = Math.cos(dlon);
  24936. g = this.sin_p14 * sinphi + this.cos_p14 * cosphi * coslon;
  24937. ksp = 1;
  24938. if ((g > 0) || (Math.abs(g) <= EPSLN)) {
  24939. x = this.a * ksp * cosphi * Math.sin(dlon);
  24940. y = this.y0 + this.a * ksp * (this.cos_p14 * sinphi - this.sin_p14 * cosphi * coslon);
  24941. }
  24942. p.x = x;
  24943. p.y = y;
  24944. return p;
  24945. }
  24946. function ortho_inverse(p) {
  24947. var rh; /* height above ellipsoid */
  24948. var z; /* angle */
  24949. var sinz, cosz; /* sin of z and cos of z */
  24950. var con;
  24951. var lon, lat;
  24952. /* Inverse equations
  24953. -----------------*/
  24954. p.x -= this.x0;
  24955. p.y -= this.y0;
  24956. rh = Math.sqrt(p.x * p.x + p.y * p.y);
  24957. z = asinz(rh / this.a);
  24958. sinz = Math.sin(z);
  24959. cosz = Math.cos(z);
  24960. lon = this.long0;
  24961. if (Math.abs(rh) <= EPSLN) {
  24962. lat = this.lat0;
  24963. p.x = lon;
  24964. p.y = lat;
  24965. return p;
  24966. }
  24967. lat = asinz(cosz * this.sin_p14 + (p.y * sinz * this.cos_p14) / rh);
  24968. con = Math.abs(this.lat0) - HALF_PI;
  24969. if (Math.abs(con) <= EPSLN) {
  24970. if (this.lat0 >= 0) {
  24971. lon = adjust_lon(this.long0 + Math.atan2(p.x, - p.y));
  24972. }
  24973. else {
  24974. lon = adjust_lon(this.long0 - Math.atan2(-p.x, p.y));
  24975. }
  24976. p.x = lon;
  24977. p.y = lat;
  24978. return p;
  24979. }
  24980. lon = adjust_lon(this.long0 + Math.atan2((p.x * sinz), rh * this.cos_p14 * cosz - p.y * this.sin_p14 * sinz));
  24981. p.x = lon;
  24982. p.y = lat;
  24983. return p;
  24984. }
  24985. var ortho_names = ["ortho"];
  24986. /* harmony default export */ var ortho = ({
  24987. init: ortho_init,
  24988. forward: ortho_forward,
  24989. inverse: ortho_inverse,
  24990. names: ortho_names
  24991. });
  24992. // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/qsc.js
  24993. // QSC projection rewritten from the original PROJ4
  24994. // https://github.com/OSGeo/proj.4/blob/master/src/PJ_qsc.c
  24995. /* constants */
  24996. var FACE_ENUM = {
  24997. FRONT: 1,
  24998. RIGHT: 2,
  24999. BACK: 3,
  25000. LEFT: 4,
  25001. TOP: 5,
  25002. BOTTOM: 6
  25003. };
  25004. var AREA_ENUM = {
  25005. AREA_0: 1,
  25006. AREA_1: 2,
  25007. AREA_2: 3,
  25008. AREA_3: 4
  25009. };
  25010. function qsc_init() {
  25011. this.x0 = this.x0 || 0;
  25012. this.y0 = this.y0 || 0;
  25013. this.lat0 = this.lat0 || 0;
  25014. this.long0 = this.long0 || 0;
  25015. this.lat_ts = this.lat_ts || 0;
  25016. this.title = this.title || "Quadrilateralized Spherical Cube";
  25017. /* Determine the cube face from the center of projection. */
  25018. if (this.lat0 >= HALF_PI - FORTPI / 2.0) {
  25019. this.face = FACE_ENUM.TOP;
  25020. } else if (this.lat0 <= -(HALF_PI - FORTPI / 2.0)) {
  25021. this.face = FACE_ENUM.BOTTOM;
  25022. } else if (Math.abs(this.long0) <= FORTPI) {
  25023. this.face = FACE_ENUM.FRONT;
  25024. } else if (Math.abs(this.long0) <= HALF_PI + FORTPI) {
  25025. this.face = this.long0 > 0.0 ? FACE_ENUM.RIGHT : FACE_ENUM.LEFT;
  25026. } else {
  25027. this.face = FACE_ENUM.BACK;
  25028. }
  25029. /* Fill in useful values for the ellipsoid <-> sphere shift
  25030. * described in [LK12]. */
  25031. if (this.es !== 0) {
  25032. this.one_minus_f = 1 - (this.a - this.b) / this.a;
  25033. this.one_minus_f_squared = this.one_minus_f * this.one_minus_f;
  25034. }
  25035. }
  25036. // QSC forward equations--mapping lat,long to x,y
  25037. // -----------------------------------------------------------------
  25038. function qsc_forward(p) {
  25039. var xy = {x: 0, y: 0};
  25040. var lat, lon;
  25041. var theta, phi;
  25042. var t, mu;
  25043. /* nu; */
  25044. var area = {value: 0};
  25045. // move lon according to projection's lon
  25046. p.x -= this.long0;
  25047. /* Convert the geodetic latitude to a geocentric latitude.
  25048. * This corresponds to the shift from the ellipsoid to the sphere
  25049. * described in [LK12]. */
  25050. if (this.es !== 0) {//if (P->es != 0) {
  25051. lat = Math.atan(this.one_minus_f_squared * Math.tan(p.y));
  25052. } else {
  25053. lat = p.y;
  25054. }
  25055. /* Convert the input lat, lon into theta, phi as used by QSC.
  25056. * This depends on the cube face and the area on it.
  25057. * For the top and bottom face, we can compute theta and phi
  25058. * directly from phi, lam. For the other faces, we must use
  25059. * unit sphere cartesian coordinates as an intermediate step. */
  25060. lon = p.x; //lon = lp.lam;
  25061. if (this.face === FACE_ENUM.TOP) {
  25062. phi = HALF_PI - lat;
  25063. if (lon >= FORTPI && lon <= HALF_PI + FORTPI) {
  25064. area.value = AREA_ENUM.AREA_0;
  25065. theta = lon - HALF_PI;
  25066. } else if (lon > HALF_PI + FORTPI || lon <= -(HALF_PI + FORTPI)) {
  25067. area.value = AREA_ENUM.AREA_1;
  25068. theta = (lon > 0.0 ? lon - SPI : lon + SPI);
  25069. } else if (lon > -(HALF_PI + FORTPI) && lon <= -FORTPI) {
  25070. area.value = AREA_ENUM.AREA_2;
  25071. theta = lon + HALF_PI;
  25072. } else {
  25073. area.value = AREA_ENUM.AREA_3;
  25074. theta = lon;
  25075. }
  25076. } else if (this.face === FACE_ENUM.BOTTOM) {
  25077. phi = HALF_PI + lat;
  25078. if (lon >= FORTPI && lon <= HALF_PI + FORTPI) {
  25079. area.value = AREA_ENUM.AREA_0;
  25080. theta = -lon + HALF_PI;
  25081. } else if (lon < FORTPI && lon >= -FORTPI) {
  25082. area.value = AREA_ENUM.AREA_1;
  25083. theta = -lon;
  25084. } else if (lon < -FORTPI && lon >= -(HALF_PI + FORTPI)) {
  25085. area.value = AREA_ENUM.AREA_2;
  25086. theta = -lon - HALF_PI;
  25087. } else {
  25088. area.value = AREA_ENUM.AREA_3;
  25089. theta = (lon > 0.0 ? -lon + SPI : -lon - SPI);
  25090. }
  25091. } else {
  25092. var q, r, s;
  25093. var sinlat, coslat;
  25094. var sinlon, coslon;
  25095. if (this.face === FACE_ENUM.RIGHT) {
  25096. lon = qsc_shift_lon_origin(lon, +HALF_PI);
  25097. } else if (this.face === FACE_ENUM.BACK) {
  25098. lon = qsc_shift_lon_origin(lon, +SPI);
  25099. } else if (this.face === FACE_ENUM.LEFT) {
  25100. lon = qsc_shift_lon_origin(lon, -HALF_PI);
  25101. }
  25102. sinlat = Math.sin(lat);
  25103. coslat = Math.cos(lat);
  25104. sinlon = Math.sin(lon);
  25105. coslon = Math.cos(lon);
  25106. q = coslat * coslon;
  25107. r = coslat * sinlon;
  25108. s = sinlat;
  25109. if (this.face === FACE_ENUM.FRONT) {
  25110. phi = Math.acos(q);
  25111. theta = qsc_fwd_equat_face_theta(phi, s, r, area);
  25112. } else if (this.face === FACE_ENUM.RIGHT) {
  25113. phi = Math.acos(r);
  25114. theta = qsc_fwd_equat_face_theta(phi, s, -q, area);
  25115. } else if (this.face === FACE_ENUM.BACK) {
  25116. phi = Math.acos(-q);
  25117. theta = qsc_fwd_equat_face_theta(phi, s, -r, area);
  25118. } else if (this.face === FACE_ENUM.LEFT) {
  25119. phi = Math.acos(-r);
  25120. theta = qsc_fwd_equat_face_theta(phi, s, q, area);
  25121. } else {
  25122. /* Impossible */
  25123. phi = theta = 0;
  25124. area.value = AREA_ENUM.AREA_0;
  25125. }
  25126. }
  25127. /* Compute mu and nu for the area of definition.
  25128. * For mu, see Eq. (3-21) in [OL76], but note the typos:
  25129. * compare with Eq. (3-14). For nu, see Eq. (3-38). */
  25130. mu = Math.atan((12 / SPI) * (theta + Math.acos(Math.sin(theta) * Math.cos(FORTPI)) - HALF_PI));
  25131. t = Math.sqrt((1 - Math.cos(phi)) / (Math.cos(mu) * Math.cos(mu)) / (1 - Math.cos(Math.atan(1 / Math.cos(theta)))));
  25132. /* Apply the result to the real area. */
  25133. if (area.value === AREA_ENUM.AREA_1) {
  25134. mu += HALF_PI;
  25135. } else if (area.value === AREA_ENUM.AREA_2) {
  25136. mu += SPI;
  25137. } else if (area.value === AREA_ENUM.AREA_3) {
  25138. mu += 1.5 * SPI;
  25139. }
  25140. /* Now compute x, y from mu and nu */
  25141. xy.x = t * Math.cos(mu);
  25142. xy.y = t * Math.sin(mu);
  25143. xy.x = xy.x * this.a + this.x0;
  25144. xy.y = xy.y * this.a + this.y0;
  25145. p.x = xy.x;
  25146. p.y = xy.y;
  25147. return p;
  25148. }
  25149. // QSC inverse equations--mapping x,y to lat/long
  25150. // -----------------------------------------------------------------
  25151. function qsc_inverse(p) {
  25152. var lp = {lam: 0, phi: 0};
  25153. var mu, nu, cosmu, tannu;
  25154. var tantheta, theta, cosphi, phi;
  25155. var t;
  25156. var area = {value: 0};
  25157. /* de-offset */
  25158. p.x = (p.x - this.x0) / this.a;
  25159. p.y = (p.y - this.y0) / this.a;
  25160. /* Convert the input x, y to the mu and nu angles as used by QSC.
  25161. * This depends on the area of the cube face. */
  25162. nu = Math.atan(Math.sqrt(p.x * p.x + p.y * p.y));
  25163. mu = Math.atan2(p.y, p.x);
  25164. if (p.x >= 0.0 && p.x >= Math.abs(p.y)) {
  25165. area.value = AREA_ENUM.AREA_0;
  25166. } else if (p.y >= 0.0 && p.y >= Math.abs(p.x)) {
  25167. area.value = AREA_ENUM.AREA_1;
  25168. mu -= HALF_PI;
  25169. } else if (p.x < 0.0 && -p.x >= Math.abs(p.y)) {
  25170. area.value = AREA_ENUM.AREA_2;
  25171. mu = (mu < 0.0 ? mu + SPI : mu - SPI);
  25172. } else {
  25173. area.value = AREA_ENUM.AREA_3;
  25174. mu += HALF_PI;
  25175. }
  25176. /* Compute phi and theta for the area of definition.
  25177. * The inverse projection is not described in the original paper, but some
  25178. * good hints can be found here (as of 2011-12-14):
  25179. * http://fits.gsfc.nasa.gov/fitsbits/saf.93/saf.9302
  25180. * (search for "Message-Id: <9302181759.AA25477 at fits.cv.nrao.edu>") */
  25181. t = (SPI / 12) * Math.tan(mu);
  25182. tantheta = Math.sin(t) / (Math.cos(t) - (1 / Math.sqrt(2)));
  25183. theta = Math.atan(tantheta);
  25184. cosmu = Math.cos(mu);
  25185. tannu = Math.tan(nu);
  25186. cosphi = 1 - cosmu * cosmu * tannu * tannu * (1 - Math.cos(Math.atan(1 / Math.cos(theta))));
  25187. if (cosphi < -1) {
  25188. cosphi = -1;
  25189. } else if (cosphi > +1) {
  25190. cosphi = +1;
  25191. }
  25192. /* Apply the result to the real area on the cube face.
  25193. * For the top and bottom face, we can compute phi and lam directly.
  25194. * For the other faces, we must use unit sphere cartesian coordinates
  25195. * as an intermediate step. */
  25196. if (this.face === FACE_ENUM.TOP) {
  25197. phi = Math.acos(cosphi);
  25198. lp.phi = HALF_PI - phi;
  25199. if (area.value === AREA_ENUM.AREA_0) {
  25200. lp.lam = theta + HALF_PI;
  25201. } else if (area.value === AREA_ENUM.AREA_1) {
  25202. lp.lam = (theta < 0.0 ? theta + SPI : theta - SPI);
  25203. } else if (area.value === AREA_ENUM.AREA_2) {
  25204. lp.lam = theta - HALF_PI;
  25205. } else /* area.value == AREA_ENUM.AREA_3 */ {
  25206. lp.lam = theta;
  25207. }
  25208. } else if (this.face === FACE_ENUM.BOTTOM) {
  25209. phi = Math.acos(cosphi);
  25210. lp.phi = phi - HALF_PI;
  25211. if (area.value === AREA_ENUM.AREA_0) {
  25212. lp.lam = -theta + HALF_PI;
  25213. } else if (area.value === AREA_ENUM.AREA_1) {
  25214. lp.lam = -theta;
  25215. } else if (area.value === AREA_ENUM.AREA_2) {
  25216. lp.lam = -theta - HALF_PI;
  25217. } else /* area.value == AREA_ENUM.AREA_3 */ {
  25218. lp.lam = (theta < 0.0 ? -theta - SPI : -theta + SPI);
  25219. }
  25220. } else {
  25221. /* Compute phi and lam via cartesian unit sphere coordinates. */
  25222. var q, r, s;
  25223. q = cosphi;
  25224. t = q * q;
  25225. if (t >= 1) {
  25226. s = 0;
  25227. } else {
  25228. s = Math.sqrt(1 - t) * Math.sin(theta);
  25229. }
  25230. t += s * s;
  25231. if (t >= 1) {
  25232. r = 0;
  25233. } else {
  25234. r = Math.sqrt(1 - t);
  25235. }
  25236. /* Rotate q,r,s into the correct area. */
  25237. if (area.value === AREA_ENUM.AREA_1) {
  25238. t = r;
  25239. r = -s;
  25240. s = t;
  25241. } else if (area.value === AREA_ENUM.AREA_2) {
  25242. r = -r;
  25243. s = -s;
  25244. } else if (area.value === AREA_ENUM.AREA_3) {
  25245. t = r;
  25246. r = s;
  25247. s = -t;
  25248. }
  25249. /* Rotate q,r,s into the correct cube face. */
  25250. if (this.face === FACE_ENUM.RIGHT) {
  25251. t = q;
  25252. q = -r;
  25253. r = t;
  25254. } else if (this.face === FACE_ENUM.BACK) {
  25255. q = -q;
  25256. r = -r;
  25257. } else if (this.face === FACE_ENUM.LEFT) {
  25258. t = q;
  25259. q = r;
  25260. r = -t;
  25261. }
  25262. /* Now compute phi and lam from the unit sphere coordinates. */
  25263. lp.phi = Math.acos(-s) - HALF_PI;
  25264. lp.lam = Math.atan2(r, q);
  25265. if (this.face === FACE_ENUM.RIGHT) {
  25266. lp.lam = qsc_shift_lon_origin(lp.lam, -HALF_PI);
  25267. } else if (this.face === FACE_ENUM.BACK) {
  25268. lp.lam = qsc_shift_lon_origin(lp.lam, -SPI);
  25269. } else if (this.face === FACE_ENUM.LEFT) {
  25270. lp.lam = qsc_shift_lon_origin(lp.lam, +HALF_PI);
  25271. }
  25272. }
  25273. /* Apply the shift from the sphere to the ellipsoid as described
  25274. * in [LK12]. */
  25275. if (this.es !== 0) {
  25276. var invert_sign;
  25277. var tanphi, xa;
  25278. invert_sign = (lp.phi < 0 ? 1 : 0);
  25279. tanphi = Math.tan(lp.phi);
  25280. xa = this.b / Math.sqrt(tanphi * tanphi + this.one_minus_f_squared);
  25281. lp.phi = Math.atan(Math.sqrt(this.a * this.a - xa * xa) / (this.one_minus_f * xa));
  25282. if (invert_sign) {
  25283. lp.phi = -lp.phi;
  25284. }
  25285. }
  25286. lp.lam += this.long0;
  25287. p.x = lp.lam;
  25288. p.y = lp.phi;
  25289. return p;
  25290. }
  25291. /* Helper function for forward projection: compute the theta angle
  25292. * and determine the area number. */
  25293. function qsc_fwd_equat_face_theta(phi, y, x, area) {
  25294. var theta;
  25295. if (phi < EPSLN) {
  25296. area.value = AREA_ENUM.AREA_0;
  25297. theta = 0.0;
  25298. } else {
  25299. theta = Math.atan2(y, x);
  25300. if (Math.abs(theta) <= FORTPI) {
  25301. area.value = AREA_ENUM.AREA_0;
  25302. } else if (theta > FORTPI && theta <= HALF_PI + FORTPI) {
  25303. area.value = AREA_ENUM.AREA_1;
  25304. theta -= HALF_PI;
  25305. } else if (theta > HALF_PI + FORTPI || theta <= -(HALF_PI + FORTPI)) {
  25306. area.value = AREA_ENUM.AREA_2;
  25307. theta = (theta >= 0.0 ? theta - SPI : theta + SPI);
  25308. } else {
  25309. area.value = AREA_ENUM.AREA_3;
  25310. theta += HALF_PI;
  25311. }
  25312. }
  25313. return theta;
  25314. }
  25315. /* Helper function: shift the longitude. */
  25316. function qsc_shift_lon_origin(lon, offset) {
  25317. var slon = lon + offset;
  25318. if (slon < -SPI) {
  25319. slon += TWO_PI;
  25320. } else if (slon > +SPI) {
  25321. slon -= TWO_PI;
  25322. }
  25323. return slon;
  25324. }
  25325. var qsc_names = ["Quadrilateralized Spherical Cube", "Quadrilateralized_Spherical_Cube", "qsc"];
  25326. /* harmony default export */ var qsc = ({
  25327. init: qsc_init,
  25328. forward: qsc_forward,
  25329. inverse: qsc_inverse,
  25330. names: qsc_names
  25331. });
  25332. // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/robin.js
  25333. // Robinson projection
  25334. // Based on https://github.com/OSGeo/proj.4/blob/master/src/PJ_robin.c
  25335. // Polynomial coeficients from http://article.gmane.org/gmane.comp.gis.proj-4.devel/6039
  25336. var COEFS_X = [
  25337. [1.0000, 2.2199e-17, -7.15515e-05, 3.1103e-06],
  25338. [0.9986, -0.000482243, -2.4897e-05, -1.3309e-06],
  25339. [0.9954, -0.00083103, -4.48605e-05, -9.86701e-07],
  25340. [0.9900, -0.00135364, -5.9661e-05, 3.6777e-06],
  25341. [0.9822, -0.00167442, -4.49547e-06, -5.72411e-06],
  25342. [0.9730, -0.00214868, -9.03571e-05, 1.8736e-08],
  25343. [0.9600, -0.00305085, -9.00761e-05, 1.64917e-06],
  25344. [0.9427, -0.00382792, -6.53386e-05, -2.6154e-06],
  25345. [0.9216, -0.00467746, -0.00010457, 4.81243e-06],
  25346. [0.8962, -0.00536223, -3.23831e-05, -5.43432e-06],
  25347. [0.8679, -0.00609363, -0.000113898, 3.32484e-06],
  25348. [0.8350, -0.00698325, -6.40253e-05, 9.34959e-07],
  25349. [0.7986, -0.00755338, -5.00009e-05, 9.35324e-07],
  25350. [0.7597, -0.00798324, -3.5971e-05, -2.27626e-06],
  25351. [0.7186, -0.00851367, -7.01149e-05, -8.6303e-06],
  25352. [0.6732, -0.00986209, -0.000199569, 1.91974e-05],
  25353. [0.6213, -0.010418, 8.83923e-05, 6.24051e-06],
  25354. [0.5722, -0.00906601, 0.000182, 6.24051e-06],
  25355. [0.5322, -0.00677797, 0.000275608, 6.24051e-06]
  25356. ];
  25357. var COEFS_Y = [
  25358. [-5.20417e-18, 0.0124, 1.21431e-18, -8.45284e-11],
  25359. [0.0620, 0.0124, -1.26793e-09, 4.22642e-10],
  25360. [0.1240, 0.0124, 5.07171e-09, -1.60604e-09],
  25361. [0.1860, 0.0123999, -1.90189e-08, 6.00152e-09],
  25362. [0.2480, 0.0124002, 7.10039e-08, -2.24e-08],
  25363. [0.3100, 0.0123992, -2.64997e-07, 8.35986e-08],
  25364. [0.3720, 0.0124029, 9.88983e-07, -3.11994e-07],
  25365. [0.4340, 0.0123893, -3.69093e-06, -4.35621e-07],
  25366. [0.4958, 0.0123198, -1.02252e-05, -3.45523e-07],
  25367. [0.5571, 0.0121916, -1.54081e-05, -5.82288e-07],
  25368. [0.6176, 0.0119938, -2.41424e-05, -5.25327e-07],
  25369. [0.6769, 0.011713, -3.20223e-05, -5.16405e-07],
  25370. [0.7346, 0.0113541, -3.97684e-05, -6.09052e-07],
  25371. [0.7903, 0.0109107, -4.89042e-05, -1.04739e-06],
  25372. [0.8435, 0.0103431, -6.4615e-05, -1.40374e-09],
  25373. [0.8936, 0.00969686, -6.4636e-05, -8.547e-06],
  25374. [0.9394, 0.00840947, -0.000192841, -4.2106e-06],
  25375. [0.9761, 0.00616527, -0.000256, -4.2106e-06],
  25376. [1.0000, 0.00328947, -0.000319159, -4.2106e-06]
  25377. ];
  25378. var FXC = 0.8487;
  25379. var FYC = 1.3523;
  25380. var C1 = R2D/5; // rad to 5-degree interval
  25381. var RC1 = 1/C1;
  25382. var NODES = 18;
  25383. var poly3_val = function(coefs, x) {
  25384. return coefs[0] + x * (coefs[1] + x * (coefs[2] + x * coefs[3]));
  25385. };
  25386. var poly3_der = function(coefs, x) {
  25387. return coefs[1] + x * (2 * coefs[2] + x * 3 * coefs[3]);
  25388. };
  25389. function newton_rapshon(f_df, start, max_err, iters) {
  25390. var x = start;
  25391. for (; iters; --iters) {
  25392. var upd = f_df(x);
  25393. x -= upd;
  25394. if (Math.abs(upd) < max_err) {
  25395. break;
  25396. }
  25397. }
  25398. return x;
  25399. }
  25400. function robin_init() {
  25401. this.x0 = this.x0 || 0;
  25402. this.y0 = this.y0 || 0;
  25403. this.long0 = this.long0 || 0;
  25404. this.es = 0;
  25405. this.title = this.title || "Robinson";
  25406. }
  25407. function robin_forward(ll) {
  25408. var lon = adjust_lon(ll.x - this.long0);
  25409. var dphi = Math.abs(ll.y);
  25410. var i = Math.floor(dphi * C1);
  25411. if (i < 0) {
  25412. i = 0;
  25413. } else if (i >= NODES) {
  25414. i = NODES - 1;
  25415. }
  25416. dphi = R2D * (dphi - RC1 * i);
  25417. var xy = {
  25418. x: poly3_val(COEFS_X[i], dphi) * lon,
  25419. y: poly3_val(COEFS_Y[i], dphi)
  25420. };
  25421. if (ll.y < 0) {
  25422. xy.y = -xy.y;
  25423. }
  25424. xy.x = xy.x * this.a * FXC + this.x0;
  25425. xy.y = xy.y * this.a * FYC + this.y0;
  25426. return xy;
  25427. }
  25428. function robin_inverse(xy) {
  25429. var ll = {
  25430. x: (xy.x - this.x0) / (this.a * FXC),
  25431. y: Math.abs(xy.y - this.y0) / (this.a * FYC)
  25432. };
  25433. if (ll.y >= 1) { // pathologic case
  25434. ll.x /= COEFS_X[NODES][0];
  25435. ll.y = xy.y < 0 ? -HALF_PI : HALF_PI;
  25436. } else {
  25437. // find table interval
  25438. var i = Math.floor(ll.y * NODES);
  25439. if (i < 0) {
  25440. i = 0;
  25441. } else if (i >= NODES) {
  25442. i = NODES - 1;
  25443. }
  25444. for (;;) {
  25445. if (COEFS_Y[i][0] > ll.y) {
  25446. --i;
  25447. } else if (COEFS_Y[i+1][0] <= ll.y) {
  25448. ++i;
  25449. } else {
  25450. break;
  25451. }
  25452. }
  25453. // linear interpolation in 5 degree interval
  25454. var coefs = COEFS_Y[i];
  25455. var t = 5 * (ll.y - coefs[0]) / (COEFS_Y[i+1][0] - coefs[0]);
  25456. // find t so that poly3_val(coefs, t) = ll.y
  25457. t = newton_rapshon(function(x) {
  25458. return (poly3_val(coefs, x) - ll.y) / poly3_der(coefs, x);
  25459. }, t, EPSLN, 100);
  25460. ll.x /= poly3_val(COEFS_X[i], t);
  25461. ll.y = (5 * i + t) * D2R;
  25462. if (xy.y < 0) {
  25463. ll.y = -ll.y;
  25464. }
  25465. }
  25466. ll.x = adjust_lon(ll.x + this.long0);
  25467. return ll;
  25468. }
  25469. var robin_names = ["Robinson", "robin"];
  25470. /* harmony default export */ var robin = ({
  25471. init: robin_init,
  25472. forward: robin_forward,
  25473. inverse: robin_inverse,
  25474. names: robin_names
  25475. });
  25476. // CONCATENATED MODULE: ./node_modules/proj4/lib/projections/geocent.js
  25477. function geocent_init() {
  25478. this.name = 'geocent';
  25479. }
  25480. function geocent_forward(p) {
  25481. var point = geodeticToGeocentric(p, this.es, this.a);
  25482. return point;
  25483. }
  25484. function geocent_inverse(p) {
  25485. var point = geocentricToGeodetic(p, this.es, this.a, this.b);
  25486. return point;
  25487. }
  25488. var geocent_names = ["Geocentric", 'geocentric', "geocent", "Geocent"];
  25489. /* harmony default export */ var geocent = ({
  25490. init: geocent_init,
  25491. forward: geocent_forward,
  25492. inverse: geocent_inverse,
  25493. names: geocent_names
  25494. });
  25495. // CONCATENATED MODULE: ./node_modules/proj4/projs.js
  25496. /* harmony default export */ var proj4_projs = (function(proj4){
  25497. proj4.Proj.projections.add(tmerc);
  25498. proj4.Proj.projections.add(etmerc);
  25499. proj4.Proj.projections.add(utm);
  25500. proj4.Proj.projections.add(sterea);
  25501. proj4.Proj.projections.add(stere);
  25502. proj4.Proj.projections.add(somerc);
  25503. proj4.Proj.projections.add(omerc);
  25504. proj4.Proj.projections.add(lcc);
  25505. proj4.Proj.projections.add(krovak);
  25506. proj4.Proj.projections.add(cass);
  25507. proj4.Proj.projections.add(laea);
  25508. proj4.Proj.projections.add(aea);
  25509. proj4.Proj.projections.add(gnom);
  25510. proj4.Proj.projections.add(cea);
  25511. proj4.Proj.projections.add(eqc);
  25512. proj4.Proj.projections.add(poly);
  25513. proj4.Proj.projections.add(nzmg);
  25514. proj4.Proj.projections.add(mill);
  25515. proj4.Proj.projections.add(sinu);
  25516. proj4.Proj.projections.add(moll);
  25517. proj4.Proj.projections.add(eqdc);
  25518. proj4.Proj.projections.add(vandg);
  25519. proj4.Proj.projections.add(aeqd);
  25520. proj4.Proj.projections.add(ortho);
  25521. proj4.Proj.projections.add(qsc);
  25522. proj4.Proj.projections.add(robin);
  25523. proj4.Proj.projections.add(geocent);
  25524. });
  25525. // CONCATENATED MODULE: ./node_modules/proj4/lib/index.js
  25526. core.defaultDatum = 'WGS84'; //default datum
  25527. core.Proj = Proj;
  25528. core.WGS84 = new core.Proj('WGS84');
  25529. core.Point = lib_Point;
  25530. core.toPoint = toPoint;
  25531. core.defs = lib_defs;
  25532. core.transform = transform;
  25533. core.mgrs = mgrs;
  25534. core.version = '__VERSION__';
  25535. proj4_projs(core);
  25536. /* harmony default export */ var lib = __webpack_exports__["default"] = (core);
  25537. /***/ }),
  25538. /***/ "73e4":
  25539. /***/ (function(module, exports) {
  25540. module.exports = __WEBPACK_EXTERNAL_MODULE__73e4__;
  25541. /***/ }),
  25542. /***/ "743a":
  25543. /***/ (function(module, exports, __webpack_require__) {
  25544. // extracted by mini-css-extract-plugin
  25545. /***/ }),
  25546. /***/ "74c0":
  25547. /***/ (function(module, exports, __webpack_require__) {
  25548. "use strict";
  25549. /*<replacement>*/
  25550. var pna = __webpack_require__("3e48");
  25551. /*</replacement>*/
  25552. // undocumented cb() API, needed for core, not for public API
  25553. function destroy(err, cb) {
  25554. var _this = this;
  25555. var readableDestroyed = this._readableState && this._readableState.destroyed;
  25556. var writableDestroyed = this._writableState && this._writableState.destroyed;
  25557. if (readableDestroyed || writableDestroyed) {
  25558. if (cb) {
  25559. cb(err);
  25560. } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
  25561. pna.nextTick(emitErrorNT, this, err);
  25562. }
  25563. return this;
  25564. }
  25565. // we set destroyed to true before firing error callbacks in order
  25566. // to make it re-entrance safe in case destroy() is called within callbacks
  25567. if (this._readableState) {
  25568. this._readableState.destroyed = true;
  25569. }
  25570. // if this is a duplex stream mark the writable part as destroyed as well
  25571. if (this._writableState) {
  25572. this._writableState.destroyed = true;
  25573. }
  25574. this._destroy(err || null, function (err) {
  25575. if (!cb && err) {
  25576. pna.nextTick(emitErrorNT, _this, err);
  25577. if (_this._writableState) {
  25578. _this._writableState.errorEmitted = true;
  25579. }
  25580. } else if (cb) {
  25581. cb(err);
  25582. }
  25583. });
  25584. return this;
  25585. }
  25586. function undestroy() {
  25587. if (this._readableState) {
  25588. this._readableState.destroyed = false;
  25589. this._readableState.reading = false;
  25590. this._readableState.ended = false;
  25591. this._readableState.endEmitted = false;
  25592. }
  25593. if (this._writableState) {
  25594. this._writableState.destroyed = false;
  25595. this._writableState.ended = false;
  25596. this._writableState.ending = false;
  25597. this._writableState.finished = false;
  25598. this._writableState.errorEmitted = false;
  25599. }
  25600. }
  25601. function emitErrorNT(self, err) {
  25602. self.emit('error', err);
  25603. }
  25604. module.exports = {
  25605. destroy: destroy,
  25606. undestroy: undestroy
  25607. };
  25608. /***/ }),
  25609. /***/ "751d":
  25610. /***/ (function(module, exports) {
  25611. module.exports = __WEBPACK_EXTERNAL_MODULE__751d__;
  25612. /***/ }),
  25613. /***/ "76b8":
  25614. /***/ (function(module, exports, __webpack_require__) {
  25615. "use strict";
  25616. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;
  25617. /**
  25618. * Copyright Marc J. Schmidt. See the LICENSE file at the top-level
  25619. * directory of this distribution and at
  25620. * https://github.com/marcj/css-element-queries/blob/master/LICENSE.
  25621. */
  25622. (function (root, factory) {
  25623. if (true) {
  25624. !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  25625. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  25626. (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
  25627. __WEBPACK_AMD_DEFINE_FACTORY__),
  25628. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  25629. } else {}
  25630. }(typeof window !== 'undefined' ? window : this, function () {
  25631. // Make sure it does not throw in a SSR (Server Side Rendering) situation
  25632. if (typeof window === "undefined") {
  25633. return null;
  25634. }
  25635. // https://github.com/Semantic-Org/Semantic-UI/issues/3855
  25636. // https://github.com/marcj/css-element-queries/issues/257
  25637. var globalWindow = typeof window != 'undefined' && window.Math == Math
  25638. ? window
  25639. : typeof self != 'undefined' && self.Math == Math
  25640. ? self
  25641. : Function('return this')();
  25642. // Only used for the dirty checking, so the event callback count is limited to max 1 call per fps per sensor.
  25643. // In combination with the event based resize sensor this saves cpu time, because the sensor is too fast and
  25644. // would generate too many unnecessary events.
  25645. var requestAnimationFrame = globalWindow.requestAnimationFrame ||
  25646. globalWindow.mozRequestAnimationFrame ||
  25647. globalWindow.webkitRequestAnimationFrame ||
  25648. function (fn) {
  25649. return globalWindow.setTimeout(fn, 20);
  25650. };
  25651. var cancelAnimationFrame = globalWindow.cancelAnimationFrame ||
  25652. globalWindow.mozCancelAnimationFrame ||
  25653. globalWindow.webkitCancelAnimationFrame ||
  25654. function (timer) {
  25655. globalWindow.clearTimeout(timer);
  25656. };
  25657. /**
  25658. * Iterate over each of the provided element(s).
  25659. *
  25660. * @param {HTMLElement|HTMLElement[]} elements
  25661. * @param {Function} callback
  25662. */
  25663. function forEachElement(elements, callback){
  25664. var elementsType = Object.prototype.toString.call(elements);
  25665. var isCollectionTyped = ('[object Array]' === elementsType
  25666. || ('[object NodeList]' === elementsType)
  25667. || ('[object HTMLCollection]' === elementsType)
  25668. || ('[object Object]' === elementsType)
  25669. || ('undefined' !== typeof jQuery && elements instanceof jQuery) //jquery
  25670. || ('undefined' !== typeof Elements && elements instanceof Elements) //mootools
  25671. );
  25672. var i = 0, j = elements.length;
  25673. if (isCollectionTyped) {
  25674. for (; i < j; i++) {
  25675. callback(elements[i]);
  25676. }
  25677. } else {
  25678. callback(elements);
  25679. }
  25680. }
  25681. /**
  25682. * Get element size
  25683. * @param {HTMLElement} element
  25684. * @returns {Object} {width, height}
  25685. */
  25686. function getElementSize(element) {
  25687. if (!element.getBoundingClientRect) {
  25688. return {
  25689. width: element.offsetWidth,
  25690. height: element.offsetHeight
  25691. }
  25692. }
  25693. var rect = element.getBoundingClientRect();
  25694. return {
  25695. width: Math.round(rect.width),
  25696. height: Math.round(rect.height)
  25697. }
  25698. }
  25699. /**
  25700. * Apply CSS styles to element.
  25701. *
  25702. * @param {HTMLElement} element
  25703. * @param {Object} style
  25704. */
  25705. function setStyle(element, style) {
  25706. Object.keys(style).forEach(function(key) {
  25707. element.style[key] = style[key];
  25708. });
  25709. }
  25710. /**
  25711. * Class for dimension change detection.
  25712. *
  25713. * @param {Element|Element[]|Elements|jQuery} element
  25714. * @param {Function} callback
  25715. *
  25716. * @constructor
  25717. */
  25718. var ResizeSensor = function(element, callback) {
  25719. //Is used when checking in reset() only for invisible elements
  25720. var lastAnimationFrameForInvisibleCheck = 0;
  25721. /**
  25722. *
  25723. * @constructor
  25724. */
  25725. function EventQueue() {
  25726. var q = [];
  25727. this.add = function(ev) {
  25728. q.push(ev);
  25729. };
  25730. var i, j;
  25731. this.call = function(sizeInfo) {
  25732. for (i = 0, j = q.length; i < j; i++) {
  25733. q[i].call(this, sizeInfo);
  25734. }
  25735. };
  25736. this.remove = function(ev) {
  25737. var newQueue = [];
  25738. for(i = 0, j = q.length; i < j; i++) {
  25739. if(q[i] !== ev) newQueue.push(q[i]);
  25740. }
  25741. q = newQueue;
  25742. };
  25743. this.length = function() {
  25744. return q.length;
  25745. }
  25746. }
  25747. /**
  25748. *
  25749. * @param {HTMLElement} element
  25750. * @param {Function} resized
  25751. */
  25752. function attachResizeEvent(element, resized) {
  25753. if (!element) return;
  25754. if (element.resizedAttached) {
  25755. element.resizedAttached.add(resized);
  25756. return;
  25757. }
  25758. element.resizedAttached = new EventQueue();
  25759. element.resizedAttached.add(resized);
  25760. element.resizeSensor = document.createElement('div');
  25761. element.resizeSensor.dir = 'ltr';
  25762. element.resizeSensor.className = 'resize-sensor';
  25763. var style = {
  25764. pointerEvents: 'none',
  25765. position: 'absolute',
  25766. left: '0px',
  25767. top: '0px',
  25768. right: '0px',
  25769. bottom: '0px',
  25770. overflow: 'hidden',
  25771. zIndex: '-1',
  25772. visibility: 'hidden',
  25773. maxWidth: '100%'
  25774. };
  25775. var styleChild = {
  25776. position: 'absolute',
  25777. left: '0px',
  25778. top: '0px',
  25779. transition: '0s',
  25780. };
  25781. setStyle(element.resizeSensor, style);
  25782. var expand = document.createElement('div');
  25783. expand.className = 'resize-sensor-expand';
  25784. setStyle(expand, style);
  25785. var expandChild = document.createElement('div');
  25786. setStyle(expandChild, styleChild);
  25787. expand.appendChild(expandChild);
  25788. var shrink = document.createElement('div');
  25789. shrink.className = 'resize-sensor-shrink';
  25790. setStyle(shrink, style);
  25791. var shrinkChild = document.createElement('div');
  25792. setStyle(shrinkChild, styleChild);
  25793. setStyle(shrinkChild, { width: '200%', height: '200%' });
  25794. shrink.appendChild(shrinkChild);
  25795. element.resizeSensor.appendChild(expand);
  25796. element.resizeSensor.appendChild(shrink);
  25797. element.appendChild(element.resizeSensor);
  25798. var computedStyle = window.getComputedStyle(element);
  25799. var position = computedStyle ? computedStyle.getPropertyValue('position') : null;
  25800. if ('absolute' !== position && 'relative' !== position && 'fixed' !== position && 'sticky' !== position) {
  25801. element.style.position = 'relative';
  25802. }
  25803. var dirty = false;
  25804. //last request animation frame id used in onscroll event
  25805. var rafId = 0;
  25806. var size = getElementSize(element);
  25807. var lastWidth = 0;
  25808. var lastHeight = 0;
  25809. var initialHiddenCheck = true;
  25810. lastAnimationFrameForInvisibleCheck = 0;
  25811. var resetExpandShrink = function () {
  25812. var width = element.offsetWidth;
  25813. var height = element.offsetHeight;
  25814. expandChild.style.width = (width + 10) + 'px';
  25815. expandChild.style.height = (height + 10) + 'px';
  25816. expand.scrollLeft = width + 10;
  25817. expand.scrollTop = height + 10;
  25818. shrink.scrollLeft = width + 10;
  25819. shrink.scrollTop = height + 10;
  25820. };
  25821. var reset = function() {
  25822. // Check if element is hidden
  25823. if (initialHiddenCheck) {
  25824. var invisible = element.offsetWidth === 0 && element.offsetHeight === 0;
  25825. if (invisible) {
  25826. // Check in next frame
  25827. if (!lastAnimationFrameForInvisibleCheck){
  25828. lastAnimationFrameForInvisibleCheck = requestAnimationFrame(function(){
  25829. lastAnimationFrameForInvisibleCheck = 0;
  25830. reset();
  25831. });
  25832. }
  25833. return;
  25834. } else {
  25835. // Stop checking
  25836. initialHiddenCheck = false;
  25837. }
  25838. }
  25839. resetExpandShrink();
  25840. };
  25841. element.resizeSensor.resetSensor = reset;
  25842. var onResized = function() {
  25843. rafId = 0;
  25844. if (!dirty) return;
  25845. lastWidth = size.width;
  25846. lastHeight = size.height;
  25847. if (element.resizedAttached) {
  25848. element.resizedAttached.call(size);
  25849. }
  25850. };
  25851. var onScroll = function() {
  25852. size = getElementSize(element);
  25853. dirty = size.width !== lastWidth || size.height !== lastHeight;
  25854. if (dirty && !rafId) {
  25855. rafId = requestAnimationFrame(onResized);
  25856. }
  25857. reset();
  25858. };
  25859. var addEvent = function(el, name, cb) {
  25860. if (el.attachEvent) {
  25861. el.attachEvent('on' + name, cb);
  25862. } else {
  25863. el.addEventListener(name, cb);
  25864. }
  25865. };
  25866. addEvent(expand, 'scroll', onScroll);
  25867. addEvent(shrink, 'scroll', onScroll);
  25868. // Fix for custom Elements and invisible elements
  25869. lastAnimationFrameForInvisibleCheck = requestAnimationFrame(function(){
  25870. lastAnimationFrameForInvisibleCheck = 0;
  25871. reset();
  25872. });
  25873. }
  25874. forEachElement(element, function(elem){
  25875. attachResizeEvent(elem, callback);
  25876. });
  25877. this.detach = function(ev) {
  25878. // clean up the unfinished animation frame to prevent a potential endless requestAnimationFrame of reset
  25879. if (!lastAnimationFrameForInvisibleCheck) {
  25880. cancelAnimationFrame(lastAnimationFrameForInvisibleCheck);
  25881. lastAnimationFrameForInvisibleCheck = 0;
  25882. }
  25883. ResizeSensor.detach(element, ev);
  25884. };
  25885. this.reset = function() {
  25886. element.resizeSensor.resetSensor();
  25887. };
  25888. };
  25889. ResizeSensor.reset = function(element) {
  25890. forEachElement(element, function(elem){
  25891. elem.resizeSensor.resetSensor();
  25892. });
  25893. };
  25894. ResizeSensor.detach = function(element, ev) {
  25895. forEachElement(element, function(elem){
  25896. if (!elem) return;
  25897. if(elem.resizedAttached && typeof ev === "function"){
  25898. elem.resizedAttached.remove(ev);
  25899. if(elem.resizedAttached.length()) return;
  25900. }
  25901. if (elem.resizeSensor) {
  25902. if (elem.contains(elem.resizeSensor)) {
  25903. elem.removeChild(elem.resizeSensor);
  25904. }
  25905. delete elem.resizeSensor;
  25906. delete elem.resizedAttached;
  25907. }
  25908. });
  25909. };
  25910. if (typeof MutationObserver !== "undefined") {
  25911. var observer = new MutationObserver(function (mutations) {
  25912. for (var i in mutations) {
  25913. if (mutations.hasOwnProperty(i)) {
  25914. var items = mutations[i].addedNodes;
  25915. for (var j = 0; j < items.length; j++) {
  25916. if (items[j].resizeSensor) {
  25917. ResizeSensor.reset(items[j]);
  25918. }
  25919. }
  25920. }
  25921. }
  25922. });
  25923. document.addEventListener("DOMContentLoaded", function (event) {
  25924. observer.observe(document.body, {
  25925. childList: true,
  25926. subtree: true,
  25927. });
  25928. });
  25929. }
  25930. return ResizeSensor;
  25931. }));
  25932. /***/ }),
  25933. /***/ "77c4":
  25934. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  25935. "use strict";
  25936. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/common/indicator/CountTo.vue?vue&type=template&id=c61b74f4&
  25937. var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',_vm._l((_vm.numDataList),function(numVale,index){return _c('div',{key:index,staticClass:"sm-component-count-to__numItem",style:([_vm.calNumBackground(numVale),_vm.numInterval,_vm.numStyle])},[_c('span',[_vm._v(_vm._s(numVale))])])}),0)}
  25938. var staticRenderFns = []
  25939. // CONCATENATED MODULE: ./src/common/indicator/CountTo.vue?vue&type=template&id=c61b74f4&
  25940. /* concated harmony reexport render */__webpack_require__.d(__webpack_exports__, "a", function() { return render; });
  25941. /* concated harmony reexport staticRenderFns */__webpack_require__.d(__webpack_exports__, "b", function() { return staticRenderFns; });
  25942. /***/ }),
  25943. /***/ "7ae5":
  25944. /***/ (function(module, exports) {
  25945. function _typeof(obj) {
  25946. if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
  25947. module.exports = _typeof = function _typeof(obj) {
  25948. return typeof obj;
  25949. };
  25950. } else {
  25951. module.exports = _typeof = function _typeof(obj) {
  25952. return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  25953. };
  25954. }
  25955. return _typeof(obj);
  25956. }
  25957. module.exports = _typeof;
  25958. /***/ }),
  25959. /***/ "7cfc":
  25960. /***/ (function(module, exports, __webpack_require__) {
  25961. /**
  25962. * Copyright (c) 2014-present, Facebook, Inc.
  25963. *
  25964. * This source code is licensed under the MIT license found in the
  25965. * LICENSE file in the root directory of this source tree.
  25966. */
  25967. var runtime = (function (exports) {
  25968. "use strict";
  25969. var Op = Object.prototype;
  25970. var hasOwn = Op.hasOwnProperty;
  25971. var undefined; // More compressible than void 0.
  25972. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  25973. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  25974. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  25975. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  25976. function wrap(innerFn, outerFn, self, tryLocsList) {
  25977. // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
  25978. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  25979. var generator = Object.create(protoGenerator.prototype);
  25980. var context = new Context(tryLocsList || []);
  25981. // The ._invoke method unifies the implementations of the .next,
  25982. // .throw, and .return methods.
  25983. generator._invoke = makeInvokeMethod(innerFn, self, context);
  25984. return generator;
  25985. }
  25986. exports.wrap = wrap;
  25987. // Try/catch helper to minimize deoptimizations. Returns a completion
  25988. // record like context.tryEntries[i].completion. This interface could
  25989. // have been (and was previously) designed to take a closure to be
  25990. // invoked without arguments, but in all the cases we care about we
  25991. // already have an existing method we want to call, so there's no need
  25992. // to create a new function object. We can even get away with assuming
  25993. // the method takes exactly one argument, since that happens to be true
  25994. // in every case, so we don't have to touch the arguments object. The
  25995. // only additional allocation required is the completion record, which
  25996. // has a stable shape and so hopefully should be cheap to allocate.
  25997. function tryCatch(fn, obj, arg) {
  25998. try {
  25999. return { type: "normal", arg: fn.call(obj, arg) };
  26000. } catch (err) {
  26001. return { type: "throw", arg: err };
  26002. }
  26003. }
  26004. var GenStateSuspendedStart = "suspendedStart";
  26005. var GenStateSuspendedYield = "suspendedYield";
  26006. var GenStateExecuting = "executing";
  26007. var GenStateCompleted = "completed";
  26008. // Returning this object from the innerFn has the same effect as
  26009. // breaking out of the dispatch switch statement.
  26010. var ContinueSentinel = {};
  26011. // Dummy constructor functions that we use as the .constructor and
  26012. // .constructor.prototype properties for functions that return Generator
  26013. // objects. For full spec compliance, you may wish to configure your
  26014. // minifier not to mangle the names of these two functions.
  26015. function Generator() {}
  26016. function GeneratorFunction() {}
  26017. function GeneratorFunctionPrototype() {}
  26018. // This is a polyfill for %IteratorPrototype% for environments that
  26019. // don't natively support it.
  26020. var IteratorPrototype = {};
  26021. IteratorPrototype[iteratorSymbol] = function () {
  26022. return this;
  26023. };
  26024. var getProto = Object.getPrototypeOf;
  26025. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  26026. if (NativeIteratorPrototype &&
  26027. NativeIteratorPrototype !== Op &&
  26028. hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  26029. // This environment has a native %IteratorPrototype%; use it instead
  26030. // of the polyfill.
  26031. IteratorPrototype = NativeIteratorPrototype;
  26032. }
  26033. var Gp = GeneratorFunctionPrototype.prototype =
  26034. Generator.prototype = Object.create(IteratorPrototype);
  26035. GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  26036. GeneratorFunctionPrototype.constructor = GeneratorFunction;
  26037. GeneratorFunctionPrototype[toStringTagSymbol] =
  26038. GeneratorFunction.displayName = "GeneratorFunction";
  26039. // Helper for defining the .next, .throw, and .return methods of the
  26040. // Iterator interface in terms of a single ._invoke method.
  26041. function defineIteratorMethods(prototype) {
  26042. ["next", "throw", "return"].forEach(function(method) {
  26043. prototype[method] = function(arg) {
  26044. return this._invoke(method, arg);
  26045. };
  26046. });
  26047. }
  26048. exports.isGeneratorFunction = function(genFun) {
  26049. var ctor = typeof genFun === "function" && genFun.constructor;
  26050. return ctor
  26051. ? ctor === GeneratorFunction ||
  26052. // For the native GeneratorFunction constructor, the best we can
  26053. // do is to check its .name property.
  26054. (ctor.displayName || ctor.name) === "GeneratorFunction"
  26055. : false;
  26056. };
  26057. exports.mark = function(genFun) {
  26058. if (Object.setPrototypeOf) {
  26059. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  26060. } else {
  26061. genFun.__proto__ = GeneratorFunctionPrototype;
  26062. if (!(toStringTagSymbol in genFun)) {
  26063. genFun[toStringTagSymbol] = "GeneratorFunction";
  26064. }
  26065. }
  26066. genFun.prototype = Object.create(Gp);
  26067. return genFun;
  26068. };
  26069. // Within the body of any async function, `await x` is transformed to
  26070. // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  26071. // `hasOwn.call(value, "__await")` to determine if the yielded value is
  26072. // meant to be awaited.
  26073. exports.awrap = function(arg) {
  26074. return { __await: arg };
  26075. };
  26076. function AsyncIterator(generator) {
  26077. function invoke(method, arg, resolve, reject) {
  26078. var record = tryCatch(generator[method], generator, arg);
  26079. if (record.type === "throw") {
  26080. reject(record.arg);
  26081. } else {
  26082. var result = record.arg;
  26083. var value = result.value;
  26084. if (value &&
  26085. typeof value === "object" &&
  26086. hasOwn.call(value, "__await")) {
  26087. return Promise.resolve(value.__await).then(function(value) {
  26088. invoke("next", value, resolve, reject);
  26089. }, function(err) {
  26090. invoke("throw", err, resolve, reject);
  26091. });
  26092. }
  26093. return Promise.resolve(value).then(function(unwrapped) {
  26094. // When a yielded Promise is resolved, its final value becomes
  26095. // the .value of the Promise<{value,done}> result for the
  26096. // current iteration.
  26097. result.value = unwrapped;
  26098. resolve(result);
  26099. }, function(error) {
  26100. // If a rejected Promise was yielded, throw the rejection back
  26101. // into the async generator function so it can be handled there.
  26102. return invoke("throw", error, resolve, reject);
  26103. });
  26104. }
  26105. }
  26106. var previousPromise;
  26107. function enqueue(method, arg) {
  26108. function callInvokeWithMethodAndArg() {
  26109. return new Promise(function(resolve, reject) {
  26110. invoke(method, arg, resolve, reject);
  26111. });
  26112. }
  26113. return previousPromise =
  26114. // If enqueue has been called before, then we want to wait until
  26115. // all previous Promises have been resolved before calling invoke,
  26116. // so that results are always delivered in the correct order. If
  26117. // enqueue has not been called before, then it is important to
  26118. // call invoke immediately, without waiting on a callback to fire,
  26119. // so that the async generator function has the opportunity to do
  26120. // any necessary setup in a predictable way. This predictability
  26121. // is why the Promise constructor synchronously invokes its
  26122. // executor callback, and why async functions synchronously
  26123. // execute code before the first await. Since we implement simple
  26124. // async functions in terms of async generators, it is especially
  26125. // important to get this right, even though it requires care.
  26126. previousPromise ? previousPromise.then(
  26127. callInvokeWithMethodAndArg,
  26128. // Avoid propagating failures to Promises returned by later
  26129. // invocations of the iterator.
  26130. callInvokeWithMethodAndArg
  26131. ) : callInvokeWithMethodAndArg();
  26132. }
  26133. // Define the unified helper method that is used to implement .next,
  26134. // .throw, and .return (see defineIteratorMethods).
  26135. this._invoke = enqueue;
  26136. }
  26137. defineIteratorMethods(AsyncIterator.prototype);
  26138. AsyncIterator.prototype[asyncIteratorSymbol] = function () {
  26139. return this;
  26140. };
  26141. exports.AsyncIterator = AsyncIterator;
  26142. // Note that simple async functions are implemented on top of
  26143. // AsyncIterator objects; they just return a Promise for the value of
  26144. // the final result produced by the iterator.
  26145. exports.async = function(innerFn, outerFn, self, tryLocsList) {
  26146. var iter = new AsyncIterator(
  26147. wrap(innerFn, outerFn, self, tryLocsList)
  26148. );
  26149. return exports.isGeneratorFunction(outerFn)
  26150. ? iter // If outerFn is a generator, return the full iterator.
  26151. : iter.next().then(function(result) {
  26152. return result.done ? result.value : iter.next();
  26153. });
  26154. };
  26155. function makeInvokeMethod(innerFn, self, context) {
  26156. var state = GenStateSuspendedStart;
  26157. return function invoke(method, arg) {
  26158. if (state === GenStateExecuting) {
  26159. throw new Error("Generator is already running");
  26160. }
  26161. if (state === GenStateCompleted) {
  26162. if (method === "throw") {
  26163. throw arg;
  26164. }
  26165. // Be forgiving, per 25.3.3.3.3 of the spec:
  26166. // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
  26167. return doneResult();
  26168. }
  26169. context.method = method;
  26170. context.arg = arg;
  26171. while (true) {
  26172. var delegate = context.delegate;
  26173. if (delegate) {
  26174. var delegateResult = maybeInvokeDelegate(delegate, context);
  26175. if (delegateResult) {
  26176. if (delegateResult === ContinueSentinel) continue;
  26177. return delegateResult;
  26178. }
  26179. }
  26180. if (context.method === "next") {
  26181. // Setting context._sent for legacy support of Babel's
  26182. // function.sent implementation.
  26183. context.sent = context._sent = context.arg;
  26184. } else if (context.method === "throw") {
  26185. if (state === GenStateSuspendedStart) {
  26186. state = GenStateCompleted;
  26187. throw context.arg;
  26188. }
  26189. context.dispatchException(context.arg);
  26190. } else if (context.method === "return") {
  26191. context.abrupt("return", context.arg);
  26192. }
  26193. state = GenStateExecuting;
  26194. var record = tryCatch(innerFn, self, context);
  26195. if (record.type === "normal") {
  26196. // If an exception is thrown from innerFn, we leave state ===
  26197. // GenStateExecuting and loop back for another invocation.
  26198. state = context.done
  26199. ? GenStateCompleted
  26200. : GenStateSuspendedYield;
  26201. if (record.arg === ContinueSentinel) {
  26202. continue;
  26203. }
  26204. return {
  26205. value: record.arg,
  26206. done: context.done
  26207. };
  26208. } else if (record.type === "throw") {
  26209. state = GenStateCompleted;
  26210. // Dispatch the exception by looping back around to the
  26211. // context.dispatchException(context.arg) call above.
  26212. context.method = "throw";
  26213. context.arg = record.arg;
  26214. }
  26215. }
  26216. };
  26217. }
  26218. // Call delegate.iterator[context.method](context.arg) and handle the
  26219. // result, either by returning a { value, done } result from the
  26220. // delegate iterator, or by modifying context.method and context.arg,
  26221. // setting context.delegate to null, and returning the ContinueSentinel.
  26222. function maybeInvokeDelegate(delegate, context) {
  26223. var method = delegate.iterator[context.method];
  26224. if (method === undefined) {
  26225. // A .throw or .return when the delegate iterator has no .throw
  26226. // method always terminates the yield* loop.
  26227. context.delegate = null;
  26228. if (context.method === "throw") {
  26229. // Note: ["return"] must be used for ES3 parsing compatibility.
  26230. if (delegate.iterator["return"]) {
  26231. // If the delegate iterator has a return method, give it a
  26232. // chance to clean up.
  26233. context.method = "return";
  26234. context.arg = undefined;
  26235. maybeInvokeDelegate(delegate, context);
  26236. if (context.method === "throw") {
  26237. // If maybeInvokeDelegate(context) changed context.method from
  26238. // "return" to "throw", let that override the TypeError below.
  26239. return ContinueSentinel;
  26240. }
  26241. }
  26242. context.method = "throw";
  26243. context.arg = new TypeError(
  26244. "The iterator does not provide a 'throw' method");
  26245. }
  26246. return ContinueSentinel;
  26247. }
  26248. var record = tryCatch(method, delegate.iterator, context.arg);
  26249. if (record.type === "throw") {
  26250. context.method = "throw";
  26251. context.arg = record.arg;
  26252. context.delegate = null;
  26253. return ContinueSentinel;
  26254. }
  26255. var info = record.arg;
  26256. if (! info) {
  26257. context.method = "throw";
  26258. context.arg = new TypeError("iterator result is not an object");
  26259. context.delegate = null;
  26260. return ContinueSentinel;
  26261. }
  26262. if (info.done) {
  26263. // Assign the result of the finished delegate to the temporary
  26264. // variable specified by delegate.resultName (see delegateYield).
  26265. context[delegate.resultName] = info.value;
  26266. // Resume execution at the desired location (see delegateYield).
  26267. context.next = delegate.nextLoc;
  26268. // If context.method was "throw" but the delegate handled the
  26269. // exception, let the outer generator proceed normally. If
  26270. // context.method was "next", forget context.arg since it has been
  26271. // "consumed" by the delegate iterator. If context.method was
  26272. // "return", allow the original .return call to continue in the
  26273. // outer generator.
  26274. if (context.method !== "return") {
  26275. context.method = "next";
  26276. context.arg = undefined;
  26277. }
  26278. } else {
  26279. // Re-yield the result returned by the delegate method.
  26280. return info;
  26281. }
  26282. // The delegate iterator is finished, so forget it and continue with
  26283. // the outer generator.
  26284. context.delegate = null;
  26285. return ContinueSentinel;
  26286. }
  26287. // Define Generator.prototype.{next,throw,return} in terms of the
  26288. // unified ._invoke helper method.
  26289. defineIteratorMethods(Gp);
  26290. Gp[toStringTagSymbol] = "Generator";
  26291. // A Generator should always return itself as the iterator object when the
  26292. // @@iterator function is called on it. Some browsers' implementations of the
  26293. // iterator prototype chain incorrectly implement this, causing the Generator
  26294. // object to not be returned from this call. This ensures that doesn't happen.
  26295. // See https://github.com/facebook/regenerator/issues/274 for more details.
  26296. Gp[iteratorSymbol] = function() {
  26297. return this;
  26298. };
  26299. Gp.toString = function() {
  26300. return "[object Generator]";
  26301. };
  26302. function pushTryEntry(locs) {
  26303. var entry = { tryLoc: locs[0] };
  26304. if (1 in locs) {
  26305. entry.catchLoc = locs[1];
  26306. }
  26307. if (2 in locs) {
  26308. entry.finallyLoc = locs[2];
  26309. entry.afterLoc = locs[3];
  26310. }
  26311. this.tryEntries.push(entry);
  26312. }
  26313. function resetTryEntry(entry) {
  26314. var record = entry.completion || {};
  26315. record.type = "normal";
  26316. delete record.arg;
  26317. entry.completion = record;
  26318. }
  26319. function Context(tryLocsList) {
  26320. // The root entry object (effectively a try statement without a catch
  26321. // or a finally block) gives us a place to store values thrown from
  26322. // locations where there is no enclosing try statement.
  26323. this.tryEntries = [{ tryLoc: "root" }];
  26324. tryLocsList.forEach(pushTryEntry, this);
  26325. this.reset(true);
  26326. }
  26327. exports.keys = function(object) {
  26328. var keys = [];
  26329. for (var key in object) {
  26330. keys.push(key);
  26331. }
  26332. keys.reverse();
  26333. // Rather than returning an object with a next method, we keep
  26334. // things simple and return the next function itself.
  26335. return function next() {
  26336. while (keys.length) {
  26337. var key = keys.pop();
  26338. if (key in object) {
  26339. next.value = key;
  26340. next.done = false;
  26341. return next;
  26342. }
  26343. }
  26344. // To avoid creating an additional object, we just hang the .value
  26345. // and .done properties off the next function object itself. This
  26346. // also ensures that the minifier will not anonymize the function.
  26347. next.done = true;
  26348. return next;
  26349. };
  26350. };
  26351. function values(iterable) {
  26352. if (iterable) {
  26353. var iteratorMethod = iterable[iteratorSymbol];
  26354. if (iteratorMethod) {
  26355. return iteratorMethod.call(iterable);
  26356. }
  26357. if (typeof iterable.next === "function") {
  26358. return iterable;
  26359. }
  26360. if (!isNaN(iterable.length)) {
  26361. var i = -1, next = function next() {
  26362. while (++i < iterable.length) {
  26363. if (hasOwn.call(iterable, i)) {
  26364. next.value = iterable[i];
  26365. next.done = false;
  26366. return next;
  26367. }
  26368. }
  26369. next.value = undefined;
  26370. next.done = true;
  26371. return next;
  26372. };
  26373. return next.next = next;
  26374. }
  26375. }
  26376. // Return an iterator with no values.
  26377. return { next: doneResult };
  26378. }
  26379. exports.values = values;
  26380. function doneResult() {
  26381. return { value: undefined, done: true };
  26382. }
  26383. Context.prototype = {
  26384. constructor: Context,
  26385. reset: function(skipTempReset) {
  26386. this.prev = 0;
  26387. this.next = 0;
  26388. // Resetting context._sent for legacy support of Babel's
  26389. // function.sent implementation.
  26390. this.sent = this._sent = undefined;
  26391. this.done = false;
  26392. this.delegate = null;
  26393. this.method = "next";
  26394. this.arg = undefined;
  26395. this.tryEntries.forEach(resetTryEntry);
  26396. if (!skipTempReset) {
  26397. for (var name in this) {
  26398. // Not sure about the optimal order of these conditions:
  26399. if (name.charAt(0) === "t" &&
  26400. hasOwn.call(this, name) &&
  26401. !isNaN(+name.slice(1))) {
  26402. this[name] = undefined;
  26403. }
  26404. }
  26405. }
  26406. },
  26407. stop: function() {
  26408. this.done = true;
  26409. var rootEntry = this.tryEntries[0];
  26410. var rootRecord = rootEntry.completion;
  26411. if (rootRecord.type === "throw") {
  26412. throw rootRecord.arg;
  26413. }
  26414. return this.rval;
  26415. },
  26416. dispatchException: function(exception) {
  26417. if (this.done) {
  26418. throw exception;
  26419. }
  26420. var context = this;
  26421. function handle(loc, caught) {
  26422. record.type = "throw";
  26423. record.arg = exception;
  26424. context.next = loc;
  26425. if (caught) {
  26426. // If the dispatched exception was caught by a catch block,
  26427. // then let that catch block handle the exception normally.
  26428. context.method = "next";
  26429. context.arg = undefined;
  26430. }
  26431. return !! caught;
  26432. }
  26433. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  26434. var entry = this.tryEntries[i];
  26435. var record = entry.completion;
  26436. if (entry.tryLoc === "root") {
  26437. // Exception thrown outside of any try block that could handle
  26438. // it, so set the completion value of the entire function to
  26439. // throw the exception.
  26440. return handle("end");
  26441. }
  26442. if (entry.tryLoc <= this.prev) {
  26443. var hasCatch = hasOwn.call(entry, "catchLoc");
  26444. var hasFinally = hasOwn.call(entry, "finallyLoc");
  26445. if (hasCatch && hasFinally) {
  26446. if (this.prev < entry.catchLoc) {
  26447. return handle(entry.catchLoc, true);
  26448. } else if (this.prev < entry.finallyLoc) {
  26449. return handle(entry.finallyLoc);
  26450. }
  26451. } else if (hasCatch) {
  26452. if (this.prev < entry.catchLoc) {
  26453. return handle(entry.catchLoc, true);
  26454. }
  26455. } else if (hasFinally) {
  26456. if (this.prev < entry.finallyLoc) {
  26457. return handle(entry.finallyLoc);
  26458. }
  26459. } else {
  26460. throw new Error("try statement without catch or finally");
  26461. }
  26462. }
  26463. }
  26464. },
  26465. abrupt: function(type, arg) {
  26466. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  26467. var entry = this.tryEntries[i];
  26468. if (entry.tryLoc <= this.prev &&
  26469. hasOwn.call(entry, "finallyLoc") &&
  26470. this.prev < entry.finallyLoc) {
  26471. var finallyEntry = entry;
  26472. break;
  26473. }
  26474. }
  26475. if (finallyEntry &&
  26476. (type === "break" ||
  26477. type === "continue") &&
  26478. finallyEntry.tryLoc <= arg &&
  26479. arg <= finallyEntry.finallyLoc) {
  26480. // Ignore the finally entry if control is not jumping to a
  26481. // location outside the try/catch block.
  26482. finallyEntry = null;
  26483. }
  26484. var record = finallyEntry ? finallyEntry.completion : {};
  26485. record.type = type;
  26486. record.arg = arg;
  26487. if (finallyEntry) {
  26488. this.method = "next";
  26489. this.next = finallyEntry.finallyLoc;
  26490. return ContinueSentinel;
  26491. }
  26492. return this.complete(record);
  26493. },
  26494. complete: function(record, afterLoc) {
  26495. if (record.type === "throw") {
  26496. throw record.arg;
  26497. }
  26498. if (record.type === "break" ||
  26499. record.type === "continue") {
  26500. this.next = record.arg;
  26501. } else if (record.type === "return") {
  26502. this.rval = this.arg = record.arg;
  26503. this.method = "return";
  26504. this.next = "end";
  26505. } else if (record.type === "normal" && afterLoc) {
  26506. this.next = afterLoc;
  26507. }
  26508. return ContinueSentinel;
  26509. },
  26510. finish: function(finallyLoc) {
  26511. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  26512. var entry = this.tryEntries[i];
  26513. if (entry.finallyLoc === finallyLoc) {
  26514. this.complete(entry.completion, entry.afterLoc);
  26515. resetTryEntry(entry);
  26516. return ContinueSentinel;
  26517. }
  26518. }
  26519. },
  26520. "catch": function(tryLoc) {
  26521. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  26522. var entry = this.tryEntries[i];
  26523. if (entry.tryLoc === tryLoc) {
  26524. var record = entry.completion;
  26525. if (record.type === "throw") {
  26526. var thrown = record.arg;
  26527. resetTryEntry(entry);
  26528. }
  26529. return thrown;
  26530. }
  26531. }
  26532. // The context.catch method must only be called with a location
  26533. // argument that corresponds to a known catch block.
  26534. throw new Error("illegal catch attempt");
  26535. },
  26536. delegateYield: function(iterable, resultName, nextLoc) {
  26537. this.delegate = {
  26538. iterator: values(iterable),
  26539. resultName: resultName,
  26540. nextLoc: nextLoc
  26541. };
  26542. if (this.method === "next") {
  26543. // Deliberately forget the last sent value so that we don't
  26544. // accidentally pass it on to the delegate.
  26545. this.arg = undefined;
  26546. }
  26547. return ContinueSentinel;
  26548. }
  26549. };
  26550. // Regardless of whether this script is executing as a CommonJS module
  26551. // or not, return the runtime object so that we can declare the variable
  26552. // regeneratorRuntime in the outer scope, which allows this module to be
  26553. // injected easily by `bin/regenerator --include-runtime script.js`.
  26554. return exports;
  26555. }(
  26556. // If this script is executing as a CommonJS module, use module.exports
  26557. // as the regeneratorRuntime namespace. Otherwise create a new empty
  26558. // object. Either way, the resulting object will be used to initialize
  26559. // the regeneratorRuntime variable at the top of this file.
  26560. true ? module.exports : undefined
  26561. ));
  26562. try {
  26563. regeneratorRuntime = runtime;
  26564. } catch (accidentalStrictMode) {
  26565. // This module should not be running in strict mode, so the above
  26566. // assignment should always work unless something is misconfigured. Just
  26567. // in case runtime.js accidentally runs in strict mode, we can escape
  26568. // strict mode using a global Function call. This could conceivably fail
  26569. // if a Content Security Policy forbids using Function, but in that case
  26570. // the proper solution is to fix the accidental strict mode problem. If
  26571. // you've misconfigured your bundler to force strict mode and applied a
  26572. // CSP to forbid Function, and you're not willing to fix either of those
  26573. // problems, please detail your unique predicament in a GitHub issue.
  26574. Function("r", "regeneratorRuntime = r")(runtime);
  26575. }
  26576. /***/ }),
  26577. /***/ "7de9":
  26578. /***/ (function(module, exports) {
  26579. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhYAAAD+CAYAAABmz0wVAAAABGdBTUEAALGPC/xhBQAADVFJREFUeAHt2zFuEwEARFGCOExuRoGoEF3KtFSIIpyC43AbUIpIabzJSpaYT16aWNn1ZvzGxcgr33z9+evPOz8ECBAgQIAAgWsIGBbXUHQNAgQIECBA4HFTvMdAgAABAgQIELiWgGFxLUnXIUCAAAECBN4ZFt4EBAgQIECAwNUEDIurUboQAQIECBAgYFh4DxAgQIAAAQJXE/hwdKVvt598FfUIyDECBAgQIPAGBb78/nFz6WUfDovHJx09+dJF/Z0AAQIECBD4PwVe+tDBrZD/s3evigABAgQI/BOBFz+xeEr1+f7BbZEnDL8JECBAgMAbE/h+9/Hi7Y/nFK8eFo9Peu1Fn/8DjwkQIECAAIG2wJkPF9wKaXctPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpAcNiqg5hCBAgQIBAW8CwaPcnPQECBAgQmBIwLKbqEIYAAQIECLQFDIt2f9ITIECAAIEpgQ9n0ny+f/hz5nznEiBAgAABAm9L4NXD4vvdx5u3RePVEiBAgAABAmcF3Ao5K+Z8AgQIECBA4KLAi59YfLv95PbHRT4HCBAgQIAAgecCh8Piy+8fbn881/KYAAECBAgQOBRwK+SQx0ECBAgQIEDgjIBhcUbLuQQIECBAgMChgGFxyOMgAQIECBAgcEbAsDij5VwCBAgQIEDgUMCwOORxkAABAgQIEDgjcPP15y9fJz0j5lwCBAgQIEDgosBfCPklARb6dIIAAAAASUVORK5CYII="
  26580. /***/ }),
  26581. /***/ "7fd4":
  26582. /***/ (function(module, exports, __webpack_require__) {
  26583. "use strict";
  26584. Object.defineProperty(exports, "__esModule", {
  26585. value: true
  26586. });
  26587. exports.default = void 0;
  26588. var _default = {
  26589. dateTimeFormat: {
  26590. date: {
  26591. year: 'numeric',
  26592. month: 'short',
  26593. day: 'numeric'
  26594. },
  26595. date_second: {
  26596. year: 'numeric',
  26597. month: 'short',
  26598. day: 'numeric',
  26599. hour: 'numeric',
  26600. minute: 'numeric',
  26601. second: 'numeric'
  26602. },
  26603. date_second_week: {
  26604. year: 'numeric',
  26605. month: 'short',
  26606. day: 'numeric',
  26607. weekday: 'long',
  26608. hour: 'numeric',
  26609. minute: 'numeric',
  26610. second: 'numeric'
  26611. }
  26612. },
  26613. // messageTemplate
  26614. warning: {
  26615. unsupportedVideoAddress: 'The video address is illegal',
  26616. unavailableVideo: 'This video is temporarily unavailable, please try again later',
  26617. mapNotLoaded: 'The associated map has not been loaded yet, please wait for a second',
  26618. unassociatedMap: 'You need to configure the associated map!'
  26619. },
  26620. success: {},
  26621. info: {
  26622. loading: 'Loading...',
  26623. pressEscToExit: 'Press the ESC key or click the close button to exit'
  26624. },
  26625. unit: {
  26626. kilometers: 'km',
  26627. miles: 'mi',
  26628. meters: 'm',
  26629. yards: 'yd',
  26630. feet: 'ft',
  26631. squarekilometers: 'sq km',
  26632. squaremiles: 'sq mi',
  26633. squaremeters: 'sq m',
  26634. squareyards: 'sq yd',
  26635. squarefeet: 'sq ft'
  26636. },
  26637. error: {},
  26638. commontypes: {
  26639. restData: 'SuperMap Rest Data Service',
  26640. restMap: 'SuperMap Rest Map Service',
  26641. addressMatch: 'SuperMap Address Matching Service',
  26642. iportalData: 'SuperMap iPortal Data',
  26643. onlineLocalSearch: 'SuperMap Online Local Search'
  26644. },
  26645. // 微件
  26646. timeText: {
  26647. Year: 'year',
  26648. Month: 'month',
  26649. Day: 'd',
  26650. hour: 'h',
  26651. minute: 'min',
  26652. second: 's'
  26653. },
  26654. zoom: {},
  26655. chart: {
  26656. unSupportedData: 'The current data does not support linkage with the map'
  26657. },
  26658. layerList: {
  26659. title: 'Layer'
  26660. },
  26661. miniMap: {},
  26662. pan: {},
  26663. scale: {},
  26664. webmap: {
  26665. loadingTip: 'Map is loading...',
  26666. crsNotSupport: 'The coordinate system of the current map is not supported!',
  26667. TileMatrixSetNotSuppport: 'Incoming TileMatrixSet is not supported!',
  26668. getLayerInfoFailed: 'Failed to get layer information!',
  26669. getThemeInfoFailed: 'Failed to get theme information!',
  26670. crsnotsupport: 'Unsupported coordinate system!',
  26671. baiduMapNotSupport: 'Baidu maps is not supported yet!',
  26672. sampleDataNotSupport: 'Sample datas is not supported yet!',
  26673. mvtNotSupport: 'Vector tile layers is not supported yet!'
  26674. },
  26675. legend: {
  26676. themeField: 'Thematic Field',
  26677. title: 'Legend',
  26678. top: 'Highest',
  26679. bottom: 'Lowest',
  26680. noMatchLayer: 'No matching layer'
  26681. },
  26682. measure: {
  26683. mapMeasure: 'Measure',
  26684. measureResult: 'Measurement Result',
  26685. distance: 'Distance',
  26686. area: 'Area',
  26687. delete: 'Empty',
  26688. selectPlaceholder: 'Please Select',
  26689. startingPoint: 'Starting Point'
  26690. },
  26691. search: {
  26692. noResult: 'The query result is empty!',
  26693. noKey: 'The search keyword cannot be empty. Please enter the search condition.',
  26694. inputPlaceHolder: 'Find an address or location',
  26695. attribute: 'Attribute',
  26696. attributeValue: 'Attribute Value',
  26697. setSearchSource: 'Please set the search source!',
  26698. address: 'Address',
  26699. null: 'Null',
  26700. illegalFeature: 'Features must contain legal coordinates!'
  26701. },
  26702. query: {
  26703. query: 'Query',
  26704. queryJob: 'Task',
  26705. queryResult: 'Result',
  26706. attributeCondition: 'Attribute Condition',
  26707. spatialFilter: 'Spatial Filter',
  26708. mapBounds: 'Query within the whole map extent',
  26709. currentMapBounds: 'Query within current viewbound',
  26710. applicate: 'Apply',
  26711. noResult: 'No Result',
  26712. resultAlreadyExists: 'The current query result already exists!',
  26713. querying: 'Querying...',
  26714. attribute: 'Attribute',
  26715. attributeValue: 'Attribute Value',
  26716. noResults: 'The query result is empty!',
  26717. queryFailed: 'Query failed!',
  26718. seviceNotSupport: 'This service does not support queries!'
  26719. },
  26720. identify: {
  26721. layerNotExit: "The layer '{layer}' does not exist in the map's style",
  26722. noData: 'no Data'
  26723. },
  26724. openFile: {
  26725. fileSizeExceeded: "The file size is too big! The file size can't exceed 10M!",
  26726. fileTypeUnsupported: 'This file format is not supported!',
  26727. openFileFail: 'File open failed!',
  26728. openFileSuccess: 'File open succeeded!',
  26729. selectFile: 'Select File',
  26730. openEmptyFile: 'The opened file is empty!',
  26731. openFile: 'Open File'
  26732. },
  26733. draw: {
  26734. draw: 'Draw'
  26735. },
  26736. indicator: {
  26737. title: 'Indicator Title',
  26738. unit: 'Unit'
  26739. },
  26740. layerManager: {
  26741. title: 'Layer Manager'
  26742. },
  26743. tdtResults: {
  26744. on: 'on ',
  26745. station: ' station',
  26746. total: 'total',
  26747. about: 'about ',
  26748. // pagination
  26749. homePage: 'Home',
  26750. prevPage: 'Previous',
  26751. nextPage: 'Next',
  26752. // nothingResult
  26753. searchNoResult: 'No related results were found',
  26754. youCanTry: 'You can try',
  26755. enterCorrect: 'Check if the input is correct',
  26756. enterOtherKeyWords: 'Enter another keyword to search',
  26757. onTdtMap: 'On the map of the sky',
  26758. addThisAddress: 'Add this address',
  26759. uWantTo: 'Are you looking for',
  26760. // pointResults
  26761. totalFind: 'found',
  26762. piecesResults: 'result',
  26763. phone: 'Tell',
  26764. address: 'Address',
  26765. setStartPonint: 'Set as starting point',
  26766. setEndPonint: 'Set as end point',
  26767. // routePlan
  26768. totalMiles: 'total mileage',
  26769. distance: 'About {distance} km',
  26770. showDetails: 'Show full details',
  26771. switchTimes: 'Transfer {switchTimes} times',
  26772. noSwitch: 'No transfer',
  26773. walk: 'Walk to',
  26774. getOff: 'get off',
  26775. getOn: 'boarding',
  26776. take: 'take ',
  26777. noSearchResults: 'No line information was found',
  26778. fastRoute: 'Fastest line',
  26779. shortRoute: 'Shortest line',
  26780. walkRoute: 'Less high speed',
  26781. fast: 'Faster',
  26782. noSubway: 'No subway',
  26783. lessSwitch: 'Less transfer',
  26784. lessWalk: 'Less walking',
  26785. // staticResult
  26786. cityHadResults: 'The following cities have results, please choose',
  26787. moreCity: 'More cities',
  26788. // LineResult
  26789. allFound: 'Found for you',
  26790. piecesBusRoute: 'bus route',
  26791. showDetail: 'Expand details',
  26792. busEndTime: 'First and last bus time',
  26793. relateAdress: 'Click here to see the location of "{keyWord}"',
  26794. // areaResult
  26795. switchTo: 'Switched to'
  26796. },
  26797. tdtRoute: {
  26798. title: 'Route',
  26799. clearRoute: 'Clear route',
  26800. pleaseEnterStartPoint: 'Please enter the starting address',
  26801. pleaseEnterEndPoint: 'Please enter the destination address',
  26802. search: 'Search',
  26803. startPoint: 'Starting address',
  26804. endPoint: 'Destination address',
  26805. mapLoadedFiled: 'Map failed to load',
  26806. busEndTime: 'First and last bus time',
  26807. about: 'about ',
  26808. station: ' station',
  26809. total: 'total',
  26810. hour: ' hour',
  26811. minutes: ' minutes'
  26812. },
  26813. tdtSearch: {
  26814. phone: 'Tell',
  26815. address: 'Address',
  26816. noData: 'No data',
  26817. transport: 'traffic'
  26818. },
  26819. tdtMapSwitcher: {
  26820. title: 'Map Switcher',
  26821. image: 'image',
  26822. vector: 'vector',
  26823. terrain: 'terrain',
  26824. placeName: 'placeName',
  26825. TiandituVec: 'TiandituVecLayer',
  26826. TiandituTer: 'TiandituTerLayer',
  26827. TiandituImg: 'TiandituImgLayer',
  26828. TiandituCva: 'TiandituCvaLabel',
  26829. TiandituCta: 'TiandituCtaLabel',
  26830. TiandituCia: 'TiandituCiaLabel'
  26831. },
  26832. // layer
  26833. dataFlow: {
  26834. dataSubscriptionFailed: 'Data subscription failed!'
  26835. },
  26836. animateMarkerlayer: {
  26837. unsupportedData: 'The data is not supported, please reset the data!'
  26838. }
  26839. };
  26840. exports.default = _default;
  26841. /***/ }),
  26842. /***/ "80e6":
  26843. /***/ (function(module, exports, __webpack_require__) {
  26844. var root = __webpack_require__("18ca");
  26845. /** Built-in value references. */
  26846. var Symbol = root.Symbol;
  26847. module.exports = Symbol;
  26848. /***/ }),
  26849. /***/ "8156":
  26850. /***/ (function(module, exports, __webpack_require__) {
  26851. "use strict";
  26852. var _interopRequireDefault = __webpack_require__("8e6d");
  26853. Object.defineProperty(exports, "__esModule", {
  26854. value: true
  26855. });
  26856. exports.default = void 0;
  26857. var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
  26858. var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
  26859. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
  26860. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
  26861. var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
  26862. var _typeof2 = _interopRequireDefault(__webpack_require__("7ae5"));
  26863. var _vue = _interopRequireDefault(__webpack_require__("5643"));
  26864. var _vuePropertyDecorator = __webpack_require__("e22c");
  26865. var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
  26866. var c = arguments.length,
  26867. r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
  26868. d;
  26869. if ((typeof Reflect === "undefined" ? "undefined" : (0, _typeof2.default)(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
  26870. if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  26871. }
  26872. return c > 3 && r && Object.defineProperty(target, key, r), r;
  26873. };
  26874. var Timer =
  26875. /*#__PURE__*/
  26876. function (_Vue) {
  26877. (0, _inherits2.default)(Timer, _Vue);
  26878. function Timer() {
  26879. var _this;
  26880. (0, _classCallCheck2.default)(this, Timer);
  26881. _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(Timer).apply(this, arguments));
  26882. _this.timer = null;
  26883. return _this;
  26884. }
  26885. (0, _createClass2.default)(Timer, [{
  26886. key: "onStartTimingChange",
  26887. value: function onStartTimingChange(newValue) {
  26888. if (newValue) {
  26889. this._start();
  26890. } else {
  26891. this._close();
  26892. }
  26893. }
  26894. }, {
  26895. key: "onFrequencyChange",
  26896. value: function onFrequencyChange() {
  26897. if (this.startTiming) {
  26898. this.resetTimer();
  26899. }
  26900. }
  26901. }, {
  26902. key: "_start",
  26903. value: function _start() {
  26904. var _this2 = this;
  26905. var time = 1000 * this.frequency || 3000;
  26906. this.startTimer();
  26907. this.timer = setInterval(function () {
  26908. _this2.timing();
  26909. }, time);
  26910. }
  26911. }, {
  26912. key: "_close",
  26913. value: function _close() {
  26914. if (this.timer) {
  26915. clearInterval(this.timer);
  26916. this.timer = null;
  26917. }
  26918. this.closeTimer();
  26919. }
  26920. }, {
  26921. key: "startTimer",
  26922. value: function startTimer() {}
  26923. }, {
  26924. key: "timing",
  26925. value: function timing() {}
  26926. }, {
  26927. key: "closeTimer",
  26928. value: function closeTimer() {}
  26929. }, {
  26930. key: "resetTimer",
  26931. value: function resetTimer() {
  26932. this._close();
  26933. this._start();
  26934. }
  26935. }, {
  26936. key: "beforeDestroy",
  26937. value: function beforeDestroy() {
  26938. this.startTiming && this._close();
  26939. }
  26940. }]);
  26941. return Timer;
  26942. }(_vue.default);
  26943. __decorate([(0, _vuePropertyDecorator.Prop)({
  26944. default: false
  26945. })], Timer.prototype, "startTiming", void 0);
  26946. __decorate([(0, _vuePropertyDecorator.Prop)({
  26947. default: 3
  26948. })], Timer.prototype, "frequency", void 0);
  26949. __decorate([(0, _vuePropertyDecorator.Watch)('startTiming', {
  26950. immediate: true
  26951. })], Timer.prototype, "onStartTimingChange", null);
  26952. __decorate([(0, _vuePropertyDecorator.Watch)('frequency')], Timer.prototype, "onFrequencyChange", null);
  26953. Timer = __decorate([_vuePropertyDecorator.Component], Timer);
  26954. var _default = Timer;
  26955. exports.default = _default;
  26956. /***/ }),
  26957. /***/ "8232":
  26958. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  26959. "use strict";
  26960. __webpack_require__.r(__webpack_exports__);
  26961. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_1_1_node_modules_vue_loader_lib_index_js_vue_loader_options_WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("2322");
  26962. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_1_1_node_modules_vue_loader_lib_index_js_vue_loader_options_WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_1_1_node_modules_vue_loader_lib_index_js_vue_loader_options_WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__);
  26963. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_1_1_node_modules_vue_loader_lib_index_js_vue_loader_options_WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_1_1_node_modules_vue_loader_lib_index_js_vue_loader_options_WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  26964. /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_ts_loader_index_js_ref_1_1_node_modules_vue_loader_lib_index_js_vue_loader_options_WebMap_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_0___default.a);
  26965. /***/ }),
  26966. /***/ "8275":
  26967. /***/ (function(module, exports) {
  26968. module.exports = __WEBPACK_EXTERNAL_MODULE__8275__;
  26969. /***/ }),
  26970. /***/ "827d":
  26971. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  26972. "use strict";
  26973. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/common/time-text/TimeText.vue?vue&type=template&id=6da009bc&
  26974. var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"sm-component-time-text",style:([_vm.fontStyle, _vm.getBackgroundStyle, _vm.getTextColorStyle])},[_c('span',[_vm._v(_vm._s(_vm.time))])])}
  26975. var staticRenderFns = []
  26976. // CONCATENATED MODULE: ./src/common/time-text/TimeText.vue?vue&type=template&id=6da009bc&
  26977. /* concated harmony reexport render */__webpack_require__.d(__webpack_exports__, "a", function() { return render; });
  26978. /* concated harmony reexport staticRenderFns */__webpack_require__.d(__webpack_exports__, "b", function() { return staticRenderFns; });
  26979. /***/ }),
  26980. /***/ "830f":
  26981. /***/ (function(module, exports) {
  26982. function _nonIterableRest() {
  26983. throw new TypeError("Invalid attempt to destructure non-iterable instance");
  26984. }
  26985. module.exports = _nonIterableRest;
  26986. /***/ }),
  26987. /***/ "8330":
  26988. /***/ (function(module, exports, __webpack_require__) {
  26989. var Symbol = __webpack_require__("80e6");
  26990. /** Used for built-in method references. */
  26991. var objectProto = Object.prototype;
  26992. /** Used to check objects for own properties. */
  26993. var hasOwnProperty = objectProto.hasOwnProperty;
  26994. /**
  26995. * Used to resolve the
  26996. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  26997. * of values.
  26998. */
  26999. var nativeObjectToString = objectProto.toString;
  27000. /** Built-in value references. */
  27001. var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
  27002. /**
  27003. * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
  27004. *
  27005. * @private
  27006. * @param {*} value The value to query.
  27007. * @returns {string} Returns the raw `toStringTag`.
  27008. */
  27009. function getRawTag(value) {
  27010. var isOwn = hasOwnProperty.call(value, symToStringTag),
  27011. tag = value[symToStringTag];
  27012. try {
  27013. value[symToStringTag] = undefined;
  27014. var unmasked = true;
  27015. } catch (e) {}
  27016. var result = nativeObjectToString.call(value);
  27017. if (unmasked) {
  27018. if (isOwn) {
  27019. value[symToStringTag] = tag;
  27020. } else {
  27021. delete value[symToStringTag];
  27022. }
  27023. }
  27024. return result;
  27025. }
  27026. module.exports = getRawTag;
  27027. /***/ }),
  27028. /***/ "8377":
  27029. /***/ (function(module, exports, __webpack_require__) {
  27030. var _typeof = __webpack_require__("7ae5");
  27031. var assertThisInitialized = __webpack_require__("27f6");
  27032. function _possibleConstructorReturn(self, call) {
  27033. if (call && (_typeof(call) === "object" || typeof call === "function")) {
  27034. return call;
  27035. }
  27036. return assertThisInitialized(self);
  27037. }
  27038. module.exports = _possibleConstructorReturn;
  27039. /***/ }),
  27040. /***/ "849c":
  27041. /***/ (function(module, exports, __webpack_require__) {
  27042. module.exports = __webpack_require__("7cfc");
  27043. /***/ }),
  27044. /***/ "8537":
  27045. /***/ (function(module, exports, __webpack_require__) {
  27046. "use strict";
  27047. var _interopRequireDefault = __webpack_require__("8e6d");
  27048. Object.defineProperty(exports, "__esModule", {
  27049. value: true
  27050. });
  27051. exports.default = void 0;
  27052. var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
  27053. var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
  27054. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
  27055. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
  27056. var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
  27057. var _typeof2 = _interopRequireDefault(__webpack_require__("7ae5"));
  27058. var _vue = _interopRequireDefault(__webpack_require__("5643"));
  27059. var _vuePropertyDecorator = __webpack_require__("e22c");
  27060. __webpack_require__("717b");
  27061. var _vueVideoPlayer = __webpack_require__("dfae");
  27062. var _lodash = _interopRequireDefault(__webpack_require__("25a2"));
  27063. var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
  27064. var c = arguments.length,
  27065. r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
  27066. d;
  27067. if ((typeof Reflect === "undefined" ? "undefined" : (0, _typeof2.default)(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
  27068. if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  27069. }
  27070. return c > 3 && r && Object.defineProperty(target, key, r), r;
  27071. };
  27072. var SmVideoPlayer =
  27073. /*#__PURE__*/
  27074. function (_Vue) {
  27075. (0, _inherits2.default)(SmVideoPlayer, _Vue);
  27076. function SmVideoPlayer() {
  27077. var _this;
  27078. (0, _classCallCheck2.default)(this, SmVideoPlayer);
  27079. _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(SmVideoPlayer).apply(this, arguments));
  27080. _this.isFirst = true;
  27081. _this.modalVisible = false;
  27082. _this.playerOptions = {};
  27083. _this.modalPlayerOptions = {};
  27084. return _this;
  27085. }
  27086. (0, _createClass2.default)(SmVideoPlayer, [{
  27087. key: "modalVisibleChanged",
  27088. value: function modalVisibleChanged() {
  27089. if (this.modalVisible && this.modalVideoPlayer) {
  27090. this.modalVideoPlayer.currentTime(0);
  27091. this.modalVideoPlayer.play();
  27092. }
  27093. }
  27094. }, {
  27095. key: "urlChanged",
  27096. value: function urlChanged() {
  27097. this.handlePlayerOptions();
  27098. }
  27099. }, {
  27100. key: "optionsChanged",
  27101. value: function optionsChanged() {
  27102. this.handlePlayerOptions();
  27103. }
  27104. }, {
  27105. key: "created",
  27106. value: function created() {
  27107. this.handlePlayerOptions();
  27108. }
  27109. }, {
  27110. key: "handlePlayerOptions",
  27111. value: function handlePlayerOptions() {
  27112. if (!this.url) {
  27113. return;
  27114. }
  27115. if (!this.checkUrl(this.url)) {
  27116. this.$message.warning(this.$t('warning.unsupportedVideoAddress'), 1);
  27117. if (this.playerOptions.sources) {
  27118. this.playerOptions.sources[0].src = '';
  27119. this.modalPlayerOptions.sources[0].src = '';
  27120. }
  27121. return;
  27122. }
  27123. var sourcesType = this.url.split('.');
  27124. var commonOptions = {
  27125. height: '100%',
  27126. autoplay: this.options.autoplay !== null ? this.options.autoplay : false,
  27127. muted: this.options.muted !== null ? this.options.muted : true,
  27128. loop: this.options.loop !== null ? this.options.loop : false,
  27129. fluid: false,
  27130. language: 'zh-CN',
  27131. playbackRates: [0.7, 1.0, 1.5, 2.0],
  27132. sources: [{
  27133. type: "video/".concat(sourcesType[sourcesType.length - 1]),
  27134. src: "".concat(this.options.autoplay && !this.options.popupToPlay ? this.url : this.url + '#t=0.8')
  27135. }],
  27136. preload: 'metadata',
  27137. poster: '',
  27138. controlBar: {
  27139. timeDivider: false,
  27140. durationDisplay: false,
  27141. remainingTimeDisplay: false,
  27142. fullscreenToggle: true
  27143. },
  27144. notSupportedMessage: this.$t('warning.unavailableVideo')
  27145. };
  27146. this.playerOptions = (0, _lodash.default)(commonOptions);
  27147. this.modalPlayerOptions = (0, _lodash.default)(commonOptions);
  27148. this.modalPlayerOptions.sources[0].src = this.url;
  27149. this.modalPlayerOptions.autoplay = true;
  27150. this.modalPlayerOptions.preload = 'none';
  27151. this.modalPlayerOptions.height = '600';
  27152. }
  27153. }, {
  27154. key: "onPlayerPlay",
  27155. value: function onPlayerPlay(player) {
  27156. if (!this.checkUrl(this.url)) {
  27157. return;
  27158. }
  27159. if (this.isFirst && this.options.popupToPlay) {
  27160. this.$message.info(this.$t('info.pressEscToExit'), 3);
  27161. }
  27162. if (this.isFirst && !this.options.popupToPlay && !this.options.autoplay) {
  27163. player.currentTime(0);
  27164. this.isFirst = false;
  27165. }
  27166. if (this.options.popupToPlay) {
  27167. player.pause();
  27168. player.currentTime(1);
  27169. player.controlBar.el_.style.visibility = 'hidden';
  27170. this.modalVisible = true;
  27171. } else {
  27172. this.handleControlBar(player);
  27173. }
  27174. }
  27175. }, {
  27176. key: "onModalPlayerPlay",
  27177. value: function onModalPlayerPlay(player) {
  27178. this.handleControlBar(player);
  27179. }
  27180. }, {
  27181. key: "onModalPlayerLoadeddata",
  27182. value: function onModalPlayerLoadeddata(player) {
  27183. this.modalVideoPlayer = player;
  27184. player.play();
  27185. this.handleControlBar(player);
  27186. }
  27187. }, {
  27188. key: "onPlayerEnded",
  27189. value: function onPlayerEnded(player) {
  27190. if (!this.options.autoplay && !this.options.popupToPlay) {
  27191. player.currentTime(1);
  27192. this.isFirst = true;
  27193. }
  27194. }
  27195. }, {
  27196. key: "onPlayerLoadeddata",
  27197. value: function onPlayerLoadeddata(player) {
  27198. if (!this.checkUrl(this.url)) {
  27199. return;
  27200. }
  27201. this.options.popupToPlay && player.pause();
  27202. !this.options.popupToPlay && this.options.autoplay && player.play();
  27203. }
  27204. }, {
  27205. key: "handleControlBar",
  27206. value: function handleControlBar(player) {
  27207. var isControlBarShow = this.options.controlBar === null ? true : this.options.controlBar;
  27208. if (isControlBarShow) {
  27209. player.controlBar.el_.style.visibility = 'visible';
  27210. } else {
  27211. player.controlBar.el_.style.visibility = 'hidden';
  27212. }
  27213. }
  27214. }, {
  27215. key: "checkUrl",
  27216. value: function checkUrl(url) {
  27217. var match;
  27218. if (url === '' || !this.isMatchUrl(url) || url.indexOf('ogg') < 0 && url.indexOf('mp4') < 0 && url.indexOf('webm') < 0) {
  27219. match = false;
  27220. } else {
  27221. match = true;
  27222. }
  27223. return match;
  27224. }
  27225. }, {
  27226. key: "isMatchUrl",
  27227. value: function isMatchUrl(str) {
  27228. var reg = new RegExp('(https?|http|file|ftp)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]');
  27229. return reg.test(str);
  27230. }
  27231. }, {
  27232. key: "player",
  27233. get: function get() {
  27234. return this.$refs.videoPlayer.player;
  27235. }
  27236. }]);
  27237. return SmVideoPlayer;
  27238. }(_vue.default);
  27239. __decorate([(0, _vuePropertyDecorator.Prop)()], SmVideoPlayer.prototype, "url", void 0);
  27240. __decorate([(0, _vuePropertyDecorator.Prop)({
  27241. default: function _default() {
  27242. return {
  27243. muted: true,
  27244. loop: false,
  27245. popupToPlay: false,
  27246. autoplay: false,
  27247. controlBar: true
  27248. };
  27249. }
  27250. })], SmVideoPlayer.prototype, "options", void 0);
  27251. __decorate([(0, _vuePropertyDecorator.Watch)('modalVisible')], SmVideoPlayer.prototype, "modalVisibleChanged", null);
  27252. __decorate([(0, _vuePropertyDecorator.Watch)('url')], SmVideoPlayer.prototype, "urlChanged", null);
  27253. __decorate([(0, _vuePropertyDecorator.Watch)('options')], SmVideoPlayer.prototype, "optionsChanged", null);
  27254. SmVideoPlayer = __decorate([(0, _vuePropertyDecorator.Component)({
  27255. name: 'SmVideoPlayer',
  27256. components: {
  27257. videoPlayer: _vueVideoPlayer.videoPlayer
  27258. }
  27259. })], SmVideoPlayer);
  27260. var _default2 = SmVideoPlayer;
  27261. exports.default = _default2;
  27262. /***/ }),
  27263. /***/ "85c3":
  27264. /***/ (function(module, exports, __webpack_require__) {
  27265. "use strict";
  27266. var _interopRequireDefault = __webpack_require__("8e6d");
  27267. Object.defineProperty(exports, "__esModule", {
  27268. value: true
  27269. });
  27270. exports.default = void 0;
  27271. var _Layer = _interopRequireDefault(__webpack_require__("0fb2"));
  27272. var _default = {
  27273. mixins: [_Layer.default],
  27274. props: {
  27275. pane: {
  27276. type: String,
  27277. default: 'tilePane'
  27278. },
  27279. opacity: {
  27280. type: Number,
  27281. default: 1,
  27282. validator: function validator(opacity) {
  27283. return opacity >= 0 && opacity <= 1;
  27284. }
  27285. },
  27286. bounds: {
  27287. type: Array
  27288. },
  27289. zIndex: {
  27290. type: Number,
  27291. default: 1
  27292. },
  27293. tileSize: {
  27294. type: Number,
  27295. default: 256
  27296. },
  27297. noWrap: {
  27298. type: Boolean,
  27299. default: false
  27300. }
  27301. }
  27302. };
  27303. exports.default = _default;
  27304. /***/ }),
  27305. /***/ "8607":
  27306. /***/ (function(module, exports, __webpack_require__) {
  27307. "use strict";
  27308. var _interopRequireDefault = __webpack_require__("8e6d");
  27309. Object.defineProperty(exports, "__esModule", {
  27310. value: true
  27311. });
  27312. Object.defineProperty(exports, "AddressMatchParameter", {
  27313. enumerable: true,
  27314. get: function get() {
  27315. return _AddressMatchParameter.default;
  27316. }
  27317. });
  27318. Object.defineProperty(exports, "iPortalDataParameter", {
  27319. enumerable: true,
  27320. get: function get() {
  27321. return _iPortalDataParameter.default;
  27322. }
  27323. });
  27324. Object.defineProperty(exports, "RestDataParameter", {
  27325. enumerable: true,
  27326. get: function get() {
  27327. return _RestDataParameter.default;
  27328. }
  27329. });
  27330. Object.defineProperty(exports, "RestMapParameter", {
  27331. enumerable: true,
  27332. get: function get() {
  27333. return _RestMapParameter.default;
  27334. }
  27335. });
  27336. Object.defineProperty(exports, "RestParameter", {
  27337. enumerable: true,
  27338. get: function get() {
  27339. return _RestParameter.default;
  27340. }
  27341. });
  27342. var _AddressMatchParameter = _interopRequireDefault(__webpack_require__("6375"));
  27343. var _iPortalDataParameter = _interopRequireDefault(__webpack_require__("c486"));
  27344. var _RestDataParameter = _interopRequireDefault(__webpack_require__("ff4e"));
  27345. var _RestMapParameter = _interopRequireDefault(__webpack_require__("9c55"));
  27346. var _RestParameter = _interopRequireDefault(__webpack_require__("2f66"));
  27347. /***/ }),
  27348. /***/ "88e1":
  27349. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  27350. "use strict";
  27351. __webpack_require__.r(__webpack_exports__);
  27352. /* harmony import */ var _SmTileLayer_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("cce2");
  27353. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _SmTileLayer_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _SmTileLayer_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  27354. /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("b429");
  27355. var render, staticRenderFns
  27356. /* normalize component */
  27357. var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(
  27358. _SmTileLayer_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"],
  27359. render,
  27360. staticRenderFns,
  27361. false,
  27362. null,
  27363. null,
  27364. null
  27365. )
  27366. /* harmony default export */ __webpack_exports__["default"] = (component.exports);
  27367. /***/ }),
  27368. /***/ "8afa":
  27369. /***/ (function(module, exports, __webpack_require__) {
  27370. "use strict";
  27371. module.exports = {
  27372. "aliceblue": [240, 248, 255],
  27373. "antiquewhite": [250, 235, 215],
  27374. "aqua": [0, 255, 255],
  27375. "aquamarine": [127, 255, 212],
  27376. "azure": [240, 255, 255],
  27377. "beige": [245, 245, 220],
  27378. "bisque": [255, 228, 196],
  27379. "black": [0, 0, 0],
  27380. "blanchedalmond": [255, 235, 205],
  27381. "blue": [0, 0, 255],
  27382. "blueviolet": [138, 43, 226],
  27383. "brown": [165, 42, 42],
  27384. "burlywood": [222, 184, 135],
  27385. "cadetblue": [95, 158, 160],
  27386. "chartreuse": [127, 255, 0],
  27387. "chocolate": [210, 105, 30],
  27388. "coral": [255, 127, 80],
  27389. "cornflowerblue": [100, 149, 237],
  27390. "cornsilk": [255, 248, 220],
  27391. "crimson": [220, 20, 60],
  27392. "cyan": [0, 255, 255],
  27393. "darkblue": [0, 0, 139],
  27394. "darkcyan": [0, 139, 139],
  27395. "darkgoldenrod": [184, 134, 11],
  27396. "darkgray": [169, 169, 169],
  27397. "darkgreen": [0, 100, 0],
  27398. "darkgrey": [169, 169, 169],
  27399. "darkkhaki": [189, 183, 107],
  27400. "darkmagenta": [139, 0, 139],
  27401. "darkolivegreen": [85, 107, 47],
  27402. "darkorange": [255, 140, 0],
  27403. "darkorchid": [153, 50, 204],
  27404. "darkred": [139, 0, 0],
  27405. "darksalmon": [233, 150, 122],
  27406. "darkseagreen": [143, 188, 143],
  27407. "darkslateblue": [72, 61, 139],
  27408. "darkslategray": [47, 79, 79],
  27409. "darkslategrey": [47, 79, 79],
  27410. "darkturquoise": [0, 206, 209],
  27411. "darkviolet": [148, 0, 211],
  27412. "deeppink": [255, 20, 147],
  27413. "deepskyblue": [0, 191, 255],
  27414. "dimgray": [105, 105, 105],
  27415. "dimgrey": [105, 105, 105],
  27416. "dodgerblue": [30, 144, 255],
  27417. "firebrick": [178, 34, 34],
  27418. "floralwhite": [255, 250, 240],
  27419. "forestgreen": [34, 139, 34],
  27420. "fuchsia": [255, 0, 255],
  27421. "gainsboro": [220, 220, 220],
  27422. "ghostwhite": [248, 248, 255],
  27423. "gold": [255, 215, 0],
  27424. "goldenrod": [218, 165, 32],
  27425. "gray": [128, 128, 128],
  27426. "green": [0, 128, 0],
  27427. "greenyellow": [173, 255, 47],
  27428. "grey": [128, 128, 128],
  27429. "honeydew": [240, 255, 240],
  27430. "hotpink": [255, 105, 180],
  27431. "indianred": [205, 92, 92],
  27432. "indigo": [75, 0, 130],
  27433. "ivory": [255, 255, 240],
  27434. "khaki": [240, 230, 140],
  27435. "lavender": [230, 230, 250],
  27436. "lavenderblush": [255, 240, 245],
  27437. "lawngreen": [124, 252, 0],
  27438. "lemonchiffon": [255, 250, 205],
  27439. "lightblue": [173, 216, 230],
  27440. "lightcoral": [240, 128, 128],
  27441. "lightcyan": [224, 255, 255],
  27442. "lightgoldenrodyellow": [250, 250, 210],
  27443. "lightgray": [211, 211, 211],
  27444. "lightgreen": [144, 238, 144],
  27445. "lightgrey": [211, 211, 211],
  27446. "lightpink": [255, 182, 193],
  27447. "lightsalmon": [255, 160, 122],
  27448. "lightseagreen": [32, 178, 170],
  27449. "lightskyblue": [135, 206, 250],
  27450. "lightslategray": [119, 136, 153],
  27451. "lightslategrey": [119, 136, 153],
  27452. "lightsteelblue": [176, 196, 222],
  27453. "lightyellow": [255, 255, 224],
  27454. "lime": [0, 255, 0],
  27455. "limegreen": [50, 205, 50],
  27456. "linen": [250, 240, 230],
  27457. "magenta": [255, 0, 255],
  27458. "maroon": [128, 0, 0],
  27459. "mediumaquamarine": [102, 205, 170],
  27460. "mediumblue": [0, 0, 205],
  27461. "mediumorchid": [186, 85, 211],
  27462. "mediumpurple": [147, 112, 219],
  27463. "mediumseagreen": [60, 179, 113],
  27464. "mediumslateblue": [123, 104, 238],
  27465. "mediumspringgreen": [0, 250, 154],
  27466. "mediumturquoise": [72, 209, 204],
  27467. "mediumvioletred": [199, 21, 133],
  27468. "midnightblue": [25, 25, 112],
  27469. "mintcream": [245, 255, 250],
  27470. "mistyrose": [255, 228, 225],
  27471. "moccasin": [255, 228, 181],
  27472. "navajowhite": [255, 222, 173],
  27473. "navy": [0, 0, 128],
  27474. "oldlace": [253, 245, 230],
  27475. "olive": [128, 128, 0],
  27476. "olivedrab": [107, 142, 35],
  27477. "orange": [255, 165, 0],
  27478. "orangered": [255, 69, 0],
  27479. "orchid": [218, 112, 214],
  27480. "palegoldenrod": [238, 232, 170],
  27481. "palegreen": [152, 251, 152],
  27482. "paleturquoise": [175, 238, 238],
  27483. "palevioletred": [219, 112, 147],
  27484. "papayawhip": [255, 239, 213],
  27485. "peachpuff": [255, 218, 185],
  27486. "peru": [205, 133, 63],
  27487. "pink": [255, 192, 203],
  27488. "plum": [221, 160, 221],
  27489. "powderblue": [176, 224, 230],
  27490. "purple": [128, 0, 128],
  27491. "rebeccapurple": [102, 51, 153],
  27492. "red": [255, 0, 0],
  27493. "rosybrown": [188, 143, 143],
  27494. "royalblue": [65, 105, 225],
  27495. "saddlebrown": [139, 69, 19],
  27496. "salmon": [250, 128, 114],
  27497. "sandybrown": [244, 164, 96],
  27498. "seagreen": [46, 139, 87],
  27499. "seashell": [255, 245, 238],
  27500. "sienna": [160, 82, 45],
  27501. "silver": [192, 192, 192],
  27502. "skyblue": [135, 206, 235],
  27503. "slateblue": [106, 90, 205],
  27504. "slategray": [112, 128, 144],
  27505. "slategrey": [112, 128, 144],
  27506. "snow": [255, 250, 250],
  27507. "springgreen": [0, 255, 127],
  27508. "steelblue": [70, 130, 180],
  27509. "tan": [210, 180, 140],
  27510. "teal": [0, 128, 128],
  27511. "thistle": [216, 191, 216],
  27512. "tomato": [255, 99, 71],
  27513. "turquoise": [64, 224, 208],
  27514. "violet": [238, 130, 238],
  27515. "wheat": [245, 222, 179],
  27516. "white": [255, 255, 255],
  27517. "whitesmoke": [245, 245, 245],
  27518. "yellow": [255, 255, 0],
  27519. "yellowgreen": [154, 205, 50]
  27520. };
  27521. /***/ }),
  27522. /***/ "8b18":
  27523. /***/ (function(module, exports, __webpack_require__) {
  27524. "use strict";
  27525. var _interopRequireDefault = __webpack_require__("8e6d");
  27526. Object.defineProperty(exports, "__esModule", {
  27527. value: true
  27528. });
  27529. exports.default = void 0;
  27530. var _vueCountTo = _interopRequireDefault(__webpack_require__("4849"));
  27531. var _util = __webpack_require__("1448");
  27532. //
  27533. //
  27534. //
  27535. //
  27536. //
  27537. //
  27538. //
  27539. //
  27540. //
  27541. //
  27542. //
  27543. //
  27544. //
  27545. var _default2 = {
  27546. name: 'SmCountTo',
  27547. extends: _vueCountTo.default,
  27548. props: {
  27549. fontSize: {
  27550. type: [String, Number]
  27551. },
  27552. numBackground: {
  27553. type: Object,
  27554. default: function _default() {
  27555. return {
  27556. color: 'rgba(0, 0, 0, 0)',
  27557. image: '',
  27558. padding: 0
  27559. };
  27560. }
  27561. },
  27562. numSpacing: {
  27563. type: Number,
  27564. default: 0
  27565. },
  27566. separatorBackground: {
  27567. type: Boolean,
  27568. default: false
  27569. }
  27570. },
  27571. computed: {
  27572. calNumBackground: function calNumBackground() {
  27573. var _this = this;
  27574. return function (value) {
  27575. if (!_this.numBackground) {
  27576. return {};
  27577. }
  27578. if (value && !_this.separatorBackground && (value === _this.separator || value === _this.decimal)) {
  27579. return {};
  27580. }
  27581. var reg = /\d+(\.\d+)?([a-z]+)/gi;
  27582. var fontUnit = _this.fontSize ? _this.fontSize.replace(reg, '$2') : '';
  27583. var styleObj = {
  27584. backgroundColor: _this.numBackground.color,
  27585. padding: _this.numBackground.padding
  27586. };
  27587. if (_this.numBackground.image) {
  27588. styleObj = Object.assign(styleObj, {
  27589. backgroundImage: "url(".concat(_this.numBackground.image, ")"),
  27590. backgroundSize: '100% 100%'
  27591. });
  27592. }
  27593. if (_this.numBackground.image || !(0, _util.isTransparent)(_this.numBackground.color)) {
  27594. styleObj = Object.assign(styleObj, {
  27595. textIndent: "".concat(parseFloat(_this.fontSize) * 0.16).concat(fontUnit),
  27596. letterSpacing: "".concat(parseFloat(_this.fontSize) * 0.16).concat(fontUnit)
  27597. });
  27598. } else {
  27599. styleObj = Object.assign(styleObj, {
  27600. textIndent: "".concat(parseFloat(_this.fontSize) * 0.06).concat(fontUnit),
  27601. letterSpacing: "".concat(parseFloat(_this.fontSize) * 0.06).concat(fontUnit)
  27602. });
  27603. }
  27604. return styleObj;
  27605. };
  27606. },
  27607. numInterval: function numInterval() {
  27608. return {
  27609. marginRight: "".concat(this.numSpacing, "px")
  27610. };
  27611. },
  27612. numStyle: function numStyle() {
  27613. return {
  27614. fontSize: this.fontSize
  27615. };
  27616. },
  27617. numDataList: function numDataList() {
  27618. return this.displayValue.split('').map(function (num) {
  27619. return num;
  27620. });
  27621. }
  27622. },
  27623. watch: {
  27624. separator: function separator() {
  27625. this.start();
  27626. },
  27627. decimals: function decimals() {
  27628. this.start();
  27629. }
  27630. }
  27631. };
  27632. exports.default = _default2;
  27633. /***/ }),
  27634. /***/ "8d32":
  27635. /***/ (function(module, exports, __webpack_require__) {
  27636. /* WEBPACK VAR INJECTION */(function(global) {
  27637. /**
  27638. * Module exports.
  27639. */
  27640. module.exports = deprecate;
  27641. /**
  27642. * Mark that a method should not be used.
  27643. * Returns a modified function which warns once by default.
  27644. *
  27645. * If `localStorage.noDeprecation = true` is set, then it is a no-op.
  27646. *
  27647. * If `localStorage.throwDeprecation = true` is set, then deprecated functions
  27648. * will throw an Error when invoked.
  27649. *
  27650. * If `localStorage.traceDeprecation = true` is set, then deprecated functions
  27651. * will invoke `console.trace()` instead of `console.error()`.
  27652. *
  27653. * @param {Function} fn - the function to deprecate
  27654. * @param {String} msg - the string to print to the console when `fn` is invoked
  27655. * @returns {Function} a new "deprecated" version of `fn`
  27656. * @api public
  27657. */
  27658. function deprecate (fn, msg) {
  27659. if (config('noDeprecation')) {
  27660. return fn;
  27661. }
  27662. var warned = false;
  27663. function deprecated() {
  27664. if (!warned) {
  27665. if (config('throwDeprecation')) {
  27666. throw new Error(msg);
  27667. } else if (config('traceDeprecation')) {
  27668. console.trace(msg);
  27669. } else {
  27670. console.warn(msg);
  27671. }
  27672. warned = true;
  27673. }
  27674. return fn.apply(this, arguments);
  27675. }
  27676. return deprecated;
  27677. }
  27678. /**
  27679. * Checks `localStorage` for boolean values for the given `name`.
  27680. *
  27681. * @param {String} name
  27682. * @returns {Boolean}
  27683. * @api private
  27684. */
  27685. function config (name) {
  27686. // accessing global.localStorage can trigger a DOMException in sandboxed iframes
  27687. try {
  27688. if (!global.localStorage) return false;
  27689. } catch (_) {
  27690. return false;
  27691. }
  27692. var val = global.localStorage[name];
  27693. if (null == val) return false;
  27694. return String(val).toLowerCase() === 'true';
  27695. }
  27696. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("698d")))
  27697. /***/ }),
  27698. /***/ "8e6d":
  27699. /***/ (function(module, exports) {
  27700. function _interopRequireDefault(obj) {
  27701. return obj && obj.__esModule ? obj : {
  27702. "default": obj
  27703. };
  27704. }
  27705. module.exports = _interopRequireDefault;
  27706. /***/ }),
  27707. /***/ "908c":
  27708. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  27709. "use strict";
  27710. __webpack_require__.r(__webpack_exports__);
  27711. /* harmony import */ var _LiquidFill_vue_vue_type_template_id_8aedaae4___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("238e");
  27712. /* harmony import */ var _LiquidFill_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2bec");
  27713. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _LiquidFill_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _LiquidFill_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  27714. /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b429");
  27715. /* normalize component */
  27716. var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
  27717. _LiquidFill_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
  27718. _LiquidFill_vue_vue_type_template_id_8aedaae4___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
  27719. _LiquidFill_vue_vue_type_template_id_8aedaae4___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
  27720. false,
  27721. null,
  27722. null,
  27723. null
  27724. )
  27725. /* harmony default export */ __webpack_exports__["default"] = (component.exports);
  27726. /***/ }),
  27727. /***/ "9106":
  27728. /***/ (function(module, exports) {
  27729. /*
  27730. StackBlur - a fast almost Gaussian Blur For Canvas
  27731. Version: 0.5
  27732. Author: Mario Klingemann
  27733. Contact: mario@quasimondo.com
  27734. Website: http://www.quasimondo.com/StackBlurForCanvas
  27735. Twitter: @quasimondo
  27736. In case you find this class useful - especially in commercial projects -
  27737. I am not totally unhappy for a small donation to my PayPal account
  27738. mario@quasimondo.de
  27739. Or support me on flattr:
  27740. https://flattr.com/thing/72791/StackBlur-a-fast-almost-Gaussian-Blur-Effect-for-CanvasJavascript
  27741. Copyright (c) 2010 Mario Klingemann
  27742. Permission is hereby granted, free of charge, to any person
  27743. obtaining a copy of this software and associated documentation
  27744. files (the "Software"), to deal in the Software without
  27745. restriction, including without limitation the rights to use,
  27746. copy, modify, merge, publish, distribute, sublicense, and/or sell
  27747. copies of the Software, and to permit persons to whom the
  27748. Software is furnished to do so, subject to the following
  27749. conditions:
  27750. The above copyright notice and this permission notice shall be
  27751. included in all copies or substantial portions of the Software.
  27752. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  27753. EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  27754. OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  27755. NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  27756. HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  27757. WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  27758. FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  27759. OTHER DEALINGS IN THE SOFTWARE.
  27760. */
  27761. var mul_table = [
  27762. 512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,
  27763. 454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,
  27764. 482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,
  27765. 437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,
  27766. 497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,
  27767. 320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,
  27768. 446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,
  27769. 329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,
  27770. 505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,
  27771. 399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,
  27772. 324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,
  27773. 268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,
  27774. 451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,
  27775. 385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,
  27776. 332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,
  27777. 289,287,285,282,280,278,275,273,271,269,267,265,263,261,259];
  27778. var shg_table = [
  27779. 9, 11, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17,
  27780. 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19,
  27781. 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20,
  27782. 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21,
  27783. 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
  27784. 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22,
  27785. 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
  27786. 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23,
  27787. 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
  27788. 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
  27789. 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
  27790. 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
  27791. 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
  27792. 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
  27793. 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
  27794. 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24 ];
  27795. function processImage(img, canvas, radius, blurAlphaChannel)
  27796. {
  27797. if (typeof(img) == 'string') {
  27798. var img = document.getElementById(img);
  27799. }
  27800. else if (typeof HTMLImageElement !== 'undefined' && !img instanceof HTMLImageElement) {
  27801. return;
  27802. }
  27803. var w = img.naturalWidth;
  27804. var h = img.naturalHeight;
  27805. if (typeof(canvas) == 'string') {
  27806. var canvas = document.getElementById(canvas);
  27807. }
  27808. else if (typeof HTMLCanvasElement !== 'undefined' && !canvas instanceof HTMLCanvasElement) {
  27809. return;
  27810. }
  27811. canvas.style.width = w + 'px';
  27812. canvas.style.height = h + 'px';
  27813. canvas.width = w;
  27814. canvas.height = h;
  27815. var context = canvas.getContext('2d');
  27816. context.clearRect(0, 0, w, h);
  27817. context.drawImage(img, 0, 0);
  27818. if (isNaN(radius) || radius < 1) return;
  27819. if (blurAlphaChannel)
  27820. processCanvasRGBA(canvas, 0, 0, w, h, radius);
  27821. else
  27822. processCanvasRGB(canvas, 0, 0, w, h, radius);
  27823. }
  27824. function getImageDataFromCanvas(canvas, top_x, top_y, width, height)
  27825. {
  27826. if (typeof(canvas) == 'string')
  27827. var canvas = document.getElementById(canvas);
  27828. else if (typeof HTMLCanvasElement !== 'undefined' && !canvas instanceof HTMLCanvasElement)
  27829. return;
  27830. var context = canvas.getContext('2d');
  27831. var imageData;
  27832. try {
  27833. try {
  27834. imageData = context.getImageData(top_x, top_y, width, height);
  27835. } catch(e) {
  27836. throw new Error("unable to access local image data: " + e);
  27837. return;
  27838. }
  27839. } catch(e) {
  27840. throw new Error("unable to access image data: " + e);
  27841. }
  27842. return imageData;
  27843. }
  27844. function processCanvasRGBA(canvas, top_x, top_y, width, height, radius)
  27845. {
  27846. if (isNaN(radius) || radius < 1) return;
  27847. radius |= 0;
  27848. var imageData = getImageDataFromCanvas(canvas, top_x, top_y, width, height);
  27849. imageData = processImageDataRGBA(imageData, top_x, top_y, width, height, radius);
  27850. canvas.getContext('2d').putImageData(imageData, top_x, top_y);
  27851. }
  27852. function processImageDataRGBA(imageData, top_x, top_y, width, height, radius)
  27853. {
  27854. var pixels = imageData.data;
  27855. var x, y, i, p, yp, yi, yw, r_sum, g_sum, b_sum, a_sum,
  27856. r_out_sum, g_out_sum, b_out_sum, a_out_sum,
  27857. r_in_sum, g_in_sum, b_in_sum, a_in_sum,
  27858. pr, pg, pb, pa, rbs;
  27859. var div = radius + radius + 1;
  27860. var w4 = width << 2;
  27861. var widthMinus1 = width - 1;
  27862. var heightMinus1 = height - 1;
  27863. var radiusPlus1 = radius + 1;
  27864. var sumFactor = radiusPlus1 * (radiusPlus1 + 1) / 2;
  27865. var stackStart = new BlurStack();
  27866. var stack = stackStart;
  27867. for (i = 1; i < div; i++)
  27868. {
  27869. stack = stack.next = new BlurStack();
  27870. if (i == radiusPlus1) var stackEnd = stack;
  27871. }
  27872. stack.next = stackStart;
  27873. var stackIn = null;
  27874. var stackOut = null;
  27875. yw = yi = 0;
  27876. var mul_sum = mul_table[radius];
  27877. var shg_sum = shg_table[radius];
  27878. for (y = 0; y < height; y++)
  27879. {
  27880. r_in_sum = g_in_sum = b_in_sum = a_in_sum = r_sum = g_sum = b_sum = a_sum = 0;
  27881. r_out_sum = radiusPlus1 * (pr = pixels[yi]);
  27882. g_out_sum = radiusPlus1 * (pg = pixels[yi+1]);
  27883. b_out_sum = radiusPlus1 * (pb = pixels[yi+2]);
  27884. a_out_sum = radiusPlus1 * (pa = pixels[yi+3]);
  27885. r_sum += sumFactor * pr;
  27886. g_sum += sumFactor * pg;
  27887. b_sum += sumFactor * pb;
  27888. a_sum += sumFactor * pa;
  27889. stack = stackStart;
  27890. for (i = 0; i < radiusPlus1; i++)
  27891. {
  27892. stack.r = pr;
  27893. stack.g = pg;
  27894. stack.b = pb;
  27895. stack.a = pa;
  27896. stack = stack.next;
  27897. }
  27898. for (i = 1; i < radiusPlus1; i++)
  27899. {
  27900. p = yi + ((widthMinus1 < i ? widthMinus1 : i) << 2);
  27901. r_sum += (stack.r = (pr = pixels[p])) * (rbs = radiusPlus1 - i);
  27902. g_sum += (stack.g = (pg = pixels[p+1])) * rbs;
  27903. b_sum += (stack.b = (pb = pixels[p+2])) * rbs;
  27904. a_sum += (stack.a = (pa = pixels[p+3])) * rbs;
  27905. r_in_sum += pr;
  27906. g_in_sum += pg;
  27907. b_in_sum += pb;
  27908. a_in_sum += pa;
  27909. stack = stack.next;
  27910. }
  27911. stackIn = stackStart;
  27912. stackOut = stackEnd;
  27913. for (x = 0; x < width; x++)
  27914. {
  27915. pixels[yi+3] = pa = (a_sum * mul_sum) >> shg_sum;
  27916. if (pa != 0)
  27917. {
  27918. pa = 255 / pa;
  27919. pixels[yi] = ((r_sum * mul_sum) >> shg_sum) * pa;
  27920. pixels[yi+1] = ((g_sum * mul_sum) >> shg_sum) * pa;
  27921. pixels[yi+2] = ((b_sum * mul_sum) >> shg_sum) * pa;
  27922. } else {
  27923. pixels[yi] = pixels[yi+1] = pixels[yi+2] = 0;
  27924. }
  27925. r_sum -= r_out_sum;
  27926. g_sum -= g_out_sum;
  27927. b_sum -= b_out_sum;
  27928. a_sum -= a_out_sum;
  27929. r_out_sum -= stackIn.r;
  27930. g_out_sum -= stackIn.g;
  27931. b_out_sum -= stackIn.b;
  27932. a_out_sum -= stackIn.a;
  27933. p = (yw + ((p = x + radius + 1) < widthMinus1 ? p : widthMinus1)) << 2;
  27934. r_in_sum += (stackIn.r = pixels[p]);
  27935. g_in_sum += (stackIn.g = pixels[p+1]);
  27936. b_in_sum += (stackIn.b = pixels[p+2]);
  27937. a_in_sum += (stackIn.a = pixels[p+3]);
  27938. r_sum += r_in_sum;
  27939. g_sum += g_in_sum;
  27940. b_sum += b_in_sum;
  27941. a_sum += a_in_sum;
  27942. stackIn = stackIn.next;
  27943. r_out_sum += (pr = stackOut.r);
  27944. g_out_sum += (pg = stackOut.g);
  27945. b_out_sum += (pb = stackOut.b);
  27946. a_out_sum += (pa = stackOut.a);
  27947. r_in_sum -= pr;
  27948. g_in_sum -= pg;
  27949. b_in_sum -= pb;
  27950. a_in_sum -= pa;
  27951. stackOut = stackOut.next;
  27952. yi += 4;
  27953. }
  27954. yw += width;
  27955. }
  27956. for (x = 0; x < width; x++)
  27957. {
  27958. g_in_sum = b_in_sum = a_in_sum = r_in_sum = g_sum = b_sum = a_sum = r_sum = 0;
  27959. yi = x << 2;
  27960. r_out_sum = radiusPlus1 * (pr = pixels[yi]);
  27961. g_out_sum = radiusPlus1 * (pg = pixels[yi+1]);
  27962. b_out_sum = radiusPlus1 * (pb = pixels[yi+2]);
  27963. a_out_sum = radiusPlus1 * (pa = pixels[yi+3]);
  27964. r_sum += sumFactor * pr;
  27965. g_sum += sumFactor * pg;
  27966. b_sum += sumFactor * pb;
  27967. a_sum += sumFactor * pa;
  27968. stack = stackStart;
  27969. for (i = 0; i < radiusPlus1; i++)
  27970. {
  27971. stack.r = pr;
  27972. stack.g = pg;
  27973. stack.b = pb;
  27974. stack.a = pa;
  27975. stack = stack.next;
  27976. }
  27977. yp = width;
  27978. for (i = 1; i <= radius; i++)
  27979. {
  27980. yi = (yp + x) << 2;
  27981. r_sum += (stack.r = (pr = pixels[yi])) * (rbs = radiusPlus1 - i);
  27982. g_sum += (stack.g = (pg = pixels[yi+1])) * rbs;
  27983. b_sum += (stack.b = (pb = pixels[yi+2])) * rbs;
  27984. a_sum += (stack.a = (pa = pixels[yi+3])) * rbs;
  27985. r_in_sum += pr;
  27986. g_in_sum += pg;
  27987. b_in_sum += pb;
  27988. a_in_sum += pa;
  27989. stack = stack.next;
  27990. if(i < heightMinus1)
  27991. {
  27992. yp += width;
  27993. }
  27994. }
  27995. yi = x;
  27996. stackIn = stackStart;
  27997. stackOut = stackEnd;
  27998. for (y = 0; y < height; y++)
  27999. {
  28000. p = yi << 2;
  28001. pixels[p+3] = pa = (a_sum * mul_sum) >> shg_sum;
  28002. if (pa > 0)
  28003. {
  28004. pa = 255 / pa;
  28005. pixels[p] = ((r_sum * mul_sum) >> shg_sum) * pa;
  28006. pixels[p+1] = ((g_sum * mul_sum) >> shg_sum) * pa;
  28007. pixels[p+2] = ((b_sum * mul_sum) >> shg_sum) * pa;
  28008. } else {
  28009. pixels[p] = pixels[p+1] = pixels[p+2] = 0;
  28010. }
  28011. r_sum -= r_out_sum;
  28012. g_sum -= g_out_sum;
  28013. b_sum -= b_out_sum;
  28014. a_sum -= a_out_sum;
  28015. r_out_sum -= stackIn.r;
  28016. g_out_sum -= stackIn.g;
  28017. b_out_sum -= stackIn.b;
  28018. a_out_sum -= stackIn.a;
  28019. p = (x + (((p = y + radiusPlus1) < heightMinus1 ? p : heightMinus1) * width)) << 2;
  28020. r_sum += (r_in_sum += (stackIn.r = pixels[p]));
  28021. g_sum += (g_in_sum += (stackIn.g = pixels[p+1]));
  28022. b_sum += (b_in_sum += (stackIn.b = pixels[p+2]));
  28023. a_sum += (a_in_sum += (stackIn.a = pixels[p+3]));
  28024. stackIn = stackIn.next;
  28025. r_out_sum += (pr = stackOut.r);
  28026. g_out_sum += (pg = stackOut.g);
  28027. b_out_sum += (pb = stackOut.b);
  28028. a_out_sum += (pa = stackOut.a);
  28029. r_in_sum -= pr;
  28030. g_in_sum -= pg;
  28031. b_in_sum -= pb;
  28032. a_in_sum -= pa;
  28033. stackOut = stackOut.next;
  28034. yi += width;
  28035. }
  28036. }
  28037. return imageData;
  28038. }
  28039. function processCanvasRGB(canvas, top_x, top_y, width, height, radius)
  28040. {
  28041. if (isNaN(radius) || radius < 1) return;
  28042. radius |= 0;
  28043. var imageData = getImageDataFromCanvas(canvas, top_x, top_y, width, height);
  28044. imageData = processImageDataRGB(imageData, top_x, top_y, width, height, radius);
  28045. canvas.getContext('2d').putImageData(imageData, top_x, top_y);
  28046. }
  28047. function processImageDataRGB(imageData, top_x, top_y, width, height, radius)
  28048. {
  28049. var pixels = imageData.data;
  28050. var x, y, i, p, yp, yi, yw, r_sum, g_sum, b_sum,
  28051. r_out_sum, g_out_sum, b_out_sum,
  28052. r_in_sum, g_in_sum, b_in_sum,
  28053. pr, pg, pb, rbs;
  28054. var div = radius + radius + 1;
  28055. var w4 = width << 2;
  28056. var widthMinus1 = width - 1;
  28057. var heightMinus1 = height - 1;
  28058. var radiusPlus1 = radius + 1;
  28059. var sumFactor = radiusPlus1 * (radiusPlus1 + 1) / 2;
  28060. var stackStart = new BlurStack();
  28061. var stack = stackStart;
  28062. for (i = 1; i < div; i++)
  28063. {
  28064. stack = stack.next = new BlurStack();
  28065. if (i == radiusPlus1) var stackEnd = stack;
  28066. }
  28067. stack.next = stackStart;
  28068. var stackIn = null;
  28069. var stackOut = null;
  28070. yw = yi = 0;
  28071. var mul_sum = mul_table[radius];
  28072. var shg_sum = shg_table[radius];
  28073. for (y = 0; y < height; y++)
  28074. {
  28075. r_in_sum = g_in_sum = b_in_sum = r_sum = g_sum = b_sum = 0;
  28076. r_out_sum = radiusPlus1 * (pr = pixels[yi]);
  28077. g_out_sum = radiusPlus1 * (pg = pixels[yi+1]);
  28078. b_out_sum = radiusPlus1 * (pb = pixels[yi+2]);
  28079. r_sum += sumFactor * pr;
  28080. g_sum += sumFactor * pg;
  28081. b_sum += sumFactor * pb;
  28082. stack = stackStart;
  28083. for (i = 0; i < radiusPlus1; i++)
  28084. {
  28085. stack.r = pr;
  28086. stack.g = pg;
  28087. stack.b = pb;
  28088. stack = stack.next;
  28089. }
  28090. for (i = 1; i < radiusPlus1; i++)
  28091. {
  28092. p = yi + ((widthMinus1 < i ? widthMinus1 : i) << 2);
  28093. r_sum += (stack.r = (pr = pixels[p])) * (rbs = radiusPlus1 - i);
  28094. g_sum += (stack.g = (pg = pixels[p+1])) * rbs;
  28095. b_sum += (stack.b = (pb = pixels[p+2])) * rbs;
  28096. r_in_sum += pr;
  28097. g_in_sum += pg;
  28098. b_in_sum += pb;
  28099. stack = stack.next;
  28100. }
  28101. stackIn = stackStart;
  28102. stackOut = stackEnd;
  28103. for (x = 0; x < width; x++)
  28104. {
  28105. pixels[yi] = (r_sum * mul_sum) >> shg_sum;
  28106. pixels[yi+1] = (g_sum * mul_sum) >> shg_sum;
  28107. pixels[yi+2] = (b_sum * mul_sum) >> shg_sum;
  28108. r_sum -= r_out_sum;
  28109. g_sum -= g_out_sum;
  28110. b_sum -= b_out_sum;
  28111. r_out_sum -= stackIn.r;
  28112. g_out_sum -= stackIn.g;
  28113. b_out_sum -= stackIn.b;
  28114. p = (yw + ((p = x + radius + 1) < widthMinus1 ? p : widthMinus1)) << 2;
  28115. r_in_sum += (stackIn.r = pixels[p]);
  28116. g_in_sum += (stackIn.g = pixels[p+1]);
  28117. b_in_sum += (stackIn.b = pixels[p+2]);
  28118. r_sum += r_in_sum;
  28119. g_sum += g_in_sum;
  28120. b_sum += b_in_sum;
  28121. stackIn = stackIn.next;
  28122. r_out_sum += (pr = stackOut.r);
  28123. g_out_sum += (pg = stackOut.g);
  28124. b_out_sum += (pb = stackOut.b);
  28125. r_in_sum -= pr;
  28126. g_in_sum -= pg;
  28127. b_in_sum -= pb;
  28128. stackOut = stackOut.next;
  28129. yi += 4;
  28130. }
  28131. yw += width;
  28132. }
  28133. for (x = 0; x < width; x++)
  28134. {
  28135. g_in_sum = b_in_sum = r_in_sum = g_sum = b_sum = r_sum = 0;
  28136. yi = x << 2;
  28137. r_out_sum = radiusPlus1 * (pr = pixels[yi]);
  28138. g_out_sum = radiusPlus1 * (pg = pixels[yi+1]);
  28139. b_out_sum = radiusPlus1 * (pb = pixels[yi+2]);
  28140. r_sum += sumFactor * pr;
  28141. g_sum += sumFactor * pg;
  28142. b_sum += sumFactor * pb;
  28143. stack = stackStart;
  28144. for (i = 0; i < radiusPlus1; i++)
  28145. {
  28146. stack.r = pr;
  28147. stack.g = pg;
  28148. stack.b = pb;
  28149. stack = stack.next;
  28150. }
  28151. yp = width;
  28152. for (i = 1; i <= radius; i++)
  28153. {
  28154. yi = (yp + x) << 2;
  28155. r_sum += (stack.r = (pr = pixels[yi])) * (rbs = radiusPlus1 - i);
  28156. g_sum += (stack.g = (pg = pixels[yi+1])) * rbs;
  28157. b_sum += (stack.b = (pb = pixels[yi+2])) * rbs;
  28158. r_in_sum += pr;
  28159. g_in_sum += pg;
  28160. b_in_sum += pb;
  28161. stack = stack.next;
  28162. if(i < heightMinus1)
  28163. {
  28164. yp += width;
  28165. }
  28166. }
  28167. yi = x;
  28168. stackIn = stackStart;
  28169. stackOut = stackEnd;
  28170. for (y = 0; y < height; y++)
  28171. {
  28172. p = yi << 2;
  28173. pixels[p] = (r_sum * mul_sum) >> shg_sum;
  28174. pixels[p+1] = (g_sum * mul_sum) >> shg_sum;
  28175. pixels[p+2] = (b_sum * mul_sum) >> shg_sum;
  28176. r_sum -= r_out_sum;
  28177. g_sum -= g_out_sum;
  28178. b_sum -= b_out_sum;
  28179. r_out_sum -= stackIn.r;
  28180. g_out_sum -= stackIn.g;
  28181. b_out_sum -= stackIn.b;
  28182. p = (x + (((p = y + radiusPlus1) < heightMinus1 ? p : heightMinus1) * width)) << 2;
  28183. r_sum += (r_in_sum += (stackIn.r = pixels[p]));
  28184. g_sum += (g_in_sum += (stackIn.g = pixels[p+1]));
  28185. b_sum += (b_in_sum += (stackIn.b = pixels[p+2]));
  28186. stackIn = stackIn.next;
  28187. r_out_sum += (pr = stackOut.r);
  28188. g_out_sum += (pg = stackOut.g);
  28189. b_out_sum += (pb = stackOut.b);
  28190. r_in_sum -= pr;
  28191. g_in_sum -= pg;
  28192. b_in_sum -= pb;
  28193. stackOut = stackOut.next;
  28194. yi += width;
  28195. }
  28196. }
  28197. return imageData;
  28198. }
  28199. function BlurStack()
  28200. {
  28201. this.r = 0;
  28202. this.g = 0;
  28203. this.b = 0;
  28204. this.a = 0;
  28205. this.next = null;
  28206. }
  28207. module.exports = {
  28208. image: processImage,
  28209. canvasRGBA: processCanvasRGBA,
  28210. canvasRGB: processCanvasRGB,
  28211. imageDataRGBA: processImageDataRGBA,
  28212. imageDataRGB: processImageDataRGB
  28213. };
  28214. /***/ }),
  28215. /***/ "9107":
  28216. /***/ (function(module, exports, __webpack_require__) {
  28217. /* WEBPACK VAR INJECTION */(function(Buffer) {// Copyright Joyent, Inc. and other Node contributors.
  28218. //
  28219. // Permission is hereby granted, free of charge, to any person obtaining a
  28220. // copy of this software and associated documentation files (the
  28221. // "Software"), to deal in the Software without restriction, including
  28222. // without limitation the rights to use, copy, modify, merge, publish,
  28223. // distribute, sublicense, and/or sell copies of the Software, and to permit
  28224. // persons to whom the Software is furnished to do so, subject to the
  28225. // following conditions:
  28226. //
  28227. // The above copyright notice and this permission notice shall be included
  28228. // in all copies or substantial portions of the Software.
  28229. //
  28230. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  28231. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  28232. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  28233. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  28234. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  28235. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  28236. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  28237. // NOTE: These type checking functions intentionally don't use `instanceof`
  28238. // because it is fragile and can be easily faked with `Object.create()`.
  28239. function isArray(arg) {
  28240. if (Array.isArray) {
  28241. return Array.isArray(arg);
  28242. }
  28243. return objectToString(arg) === '[object Array]';
  28244. }
  28245. exports.isArray = isArray;
  28246. function isBoolean(arg) {
  28247. return typeof arg === 'boolean';
  28248. }
  28249. exports.isBoolean = isBoolean;
  28250. function isNull(arg) {
  28251. return arg === null;
  28252. }
  28253. exports.isNull = isNull;
  28254. function isNullOrUndefined(arg) {
  28255. return arg == null;
  28256. }
  28257. exports.isNullOrUndefined = isNullOrUndefined;
  28258. function isNumber(arg) {
  28259. return typeof arg === 'number';
  28260. }
  28261. exports.isNumber = isNumber;
  28262. function isString(arg) {
  28263. return typeof arg === 'string';
  28264. }
  28265. exports.isString = isString;
  28266. function isSymbol(arg) {
  28267. return typeof arg === 'symbol';
  28268. }
  28269. exports.isSymbol = isSymbol;
  28270. function isUndefined(arg) {
  28271. return arg === void 0;
  28272. }
  28273. exports.isUndefined = isUndefined;
  28274. function isRegExp(re) {
  28275. return objectToString(re) === '[object RegExp]';
  28276. }
  28277. exports.isRegExp = isRegExp;
  28278. function isObject(arg) {
  28279. return typeof arg === 'object' && arg !== null;
  28280. }
  28281. exports.isObject = isObject;
  28282. function isDate(d) {
  28283. return objectToString(d) === '[object Date]';
  28284. }
  28285. exports.isDate = isDate;
  28286. function isError(e) {
  28287. return (objectToString(e) === '[object Error]' || e instanceof Error);
  28288. }
  28289. exports.isError = isError;
  28290. function isFunction(arg) {
  28291. return typeof arg === 'function';
  28292. }
  28293. exports.isFunction = isFunction;
  28294. function isPrimitive(arg) {
  28295. return arg === null ||
  28296. typeof arg === 'boolean' ||
  28297. typeof arg === 'number' ||
  28298. typeof arg === 'string' ||
  28299. typeof arg === 'symbol' || // ES6 symbol
  28300. typeof arg === 'undefined';
  28301. }
  28302. exports.isPrimitive = isPrimitive;
  28303. exports.isBuffer = Buffer.isBuffer;
  28304. function objectToString(o) {
  28305. return Object.prototype.toString.call(o);
  28306. }
  28307. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("3be6").Buffer))
  28308. /***/ }),
  28309. /***/ "9153":
  28310. /***/ (function(module, exports, __webpack_require__) {
  28311. "use strict";
  28312. var _interopRequireDefault = __webpack_require__("8e6d");
  28313. Object.defineProperty(exports, "__esModule", {
  28314. value: true
  28315. });
  28316. exports.default = void 0;
  28317. var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
  28318. var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
  28319. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
  28320. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
  28321. var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
  28322. var _leafletWrapper = _interopRequireDefault(__webpack_require__("6f27"));
  28323. __webpack_require__("751d");
  28324. var _lodash = _interopRequireDefault(__webpack_require__("25a2"));
  28325. /**
  28326. * @class IdentifyViewModel
  28327. * @description 点选 viewModel.
  28328. * @param {Object} map - map 对象。
  28329. * @param {String} [options.layerName] - 图层名。
  28330. * @param {Object} [options.layerStyle] - 查询结果图层样式配置。
  28331. * @extends L.Evented
  28332. */
  28333. var IdentifyViewModel =
  28334. /*#__PURE__*/
  28335. function (_L$Evented) {
  28336. (0, _inherits2.default)(IdentifyViewModel, _L$Evented);
  28337. function IdentifyViewModel(map, options) {
  28338. var _this;
  28339. (0, _classCallCheck2.default)(this, IdentifyViewModel);
  28340. _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(IdentifyViewModel).call(this));
  28341. _this.map = map;
  28342. _this.layerNames = options.layerNames;
  28343. _this.layerStyle = options.layerStyle || {};
  28344. _this.popup = null;
  28345. _this.lastLayerName = '';
  28346. return _this;
  28347. }
  28348. /**
  28349. * @function IdentifyViewModel.prototype.getLayerByName
  28350. * @desc 获取。
  28351. * @param {Array} name - 图层名。
  28352. */
  28353. (0, _createClass2.default)(IdentifyViewModel, [{
  28354. key: "getLayerByName",
  28355. value: function getLayerByName(name) {
  28356. return this.map.getLayerByName(name);
  28357. }
  28358. /**
  28359. * @function IdentifyViewModel.prototype.getLayerById
  28360. * @desc 获取。
  28361. * @param {Array} id - 图层名。
  28362. */
  28363. }, {
  28364. key: "getLayerById",
  28365. value: function getLayerById(id) {
  28366. return this.map.getLayerById(id);
  28367. }
  28368. /**
  28369. * @function IdentifyViewModel.prototype.getLayerType
  28370. * @desc 判断是否是geojson
  28371. * @param {Array} layer - 图层名。
  28372. */
  28373. }, {
  28374. key: "getLayerType",
  28375. value: function getLayerType(layer) {
  28376. return layer instanceof _leafletWrapper.default.GeoJSON;
  28377. }
  28378. /**
  28379. * @function IdentifyViewModel.prototype.addOverlayToMap
  28380. * @desc 添加高亮图层。
  28381. * @param {Object} layer - layer。
  28382. * @param {Object} feature - geojson
  28383. * @param {Object} customStyle - 用户自定义样式
  28384. */
  28385. }, {
  28386. key: "addOverlayToMap",
  28387. value: function addOverlayToMap(layer, feature) {
  28388. var customStyle = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.layerStyle;
  28389. // 高亮前,清除之前的高亮
  28390. this.lastLayerName && this.removed(this.lastLayerName); // 默认样式
  28391. var defaultStyle = {
  28392. color: '#409eff',
  28393. fillColor: '#409eff',
  28394. fillOpacity: 1,
  28395. opacity: 0.6,
  28396. renderer: _leafletWrapper.default.svg()
  28397. }; // new layer
  28398. var styleOptions = Object.assign((0, _lodash.default)(layer.options), defaultStyle, customStyle);
  28399. var overlayer;
  28400. var type = feature.geometry.type;
  28401. if (type === 'Point' || type === 'MultiPoint') {
  28402. var geoCoordinates = (0, _lodash.default)(feature.geometry.coordinates);
  28403. overlayer = _leafletWrapper.default.circleMarker(geoCoordinates.reverse(), styleOptions);
  28404. } else {
  28405. overlayer = _leafletWrapper.default.geoJSON(feature, {
  28406. style: function style() {
  28407. return styleOptions;
  28408. }
  28409. });
  28410. } // 上图,记录图层名
  28411. this.map.addLayer(overlayer, layer.name + '-SM-highlighted');
  28412. this.lastLayerName = layer.name;
  28413. }
  28414. /**
  28415. * @function IdentifyViewModel.prototype.removed
  28416. * @desc 将客户端专题图的矢量要素转换成geojson。
  28417. * @param {Object} themeFeature - themeFeature。
  28418. */
  28419. }, {
  28420. key: "formatGeoJSON",
  28421. value: function formatGeoJSON(themeFeature) {
  28422. var formatObj = new SuperMap.Format.GeoJSON();
  28423. var serverGeometry = SuperMap.ServerGeometry.fromGeometry(themeFeature.geometry);
  28424. var geojson = formatObj.toGeoJSON(serverGeometry);
  28425. geojson.properties = themeFeature.attributes;
  28426. return geojson;
  28427. }
  28428. /**
  28429. * @function IdentifyViewModel.prototype.removed
  28430. * @desc 清除高亮图层。
  28431. * @param {String} lastLayerName - 图层名。
  28432. */
  28433. }, {
  28434. key: "removed",
  28435. value: function removed() {
  28436. var lastLayerName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.lastLayerName;
  28437. // 移除高亮图层
  28438. if (lastLayerName && this.getLayerByName(lastLayerName + '-SM-highlighted')) {
  28439. this.map.removeLayer(this.getLayerByName(lastLayerName + '-SM-highlighted'));
  28440. this.lastLayerName = '';
  28441. }
  28442. }
  28443. }]);
  28444. return IdentifyViewModel;
  28445. }(_leafletWrapper.default.Evented);
  28446. exports.default = IdentifyViewModel;
  28447. /***/ }),
  28448. /***/ "9243":
  28449. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  28450. "use strict";
  28451. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/common/text/Text.vue?vue&type=template&id=5e2ac717&
  28452. var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"sm-component-text",style:([_vm.customStyle, _vm.getBackgroundStyle, _vm.getTextColorStyle])},[(_vm.href)?_c('span',[_c('a',{staticClass:"sm-component-text__href",style:([_vm.getTextColorStyle]),attrs:{"target":_vm.target,"href":_vm.href}},[_vm._v(_vm._s(_vm.finalValue))])]):_c('span',{staticClass:"sm-component-text__span"},[_vm._v(_vm._s(_vm.finalValue))])])}
  28453. var staticRenderFns = []
  28454. // CONCATENATED MODULE: ./src/common/text/Text.vue?vue&type=template&id=5e2ac717&
  28455. /* concated harmony reexport render */__webpack_require__.d(__webpack_exports__, "a", function() { return render; });
  28456. /* concated harmony reexport staticRenderFns */__webpack_require__.d(__webpack_exports__, "b", function() { return staticRenderFns; });
  28457. /***/ }),
  28458. /***/ "9259":
  28459. /***/ (function(module, exports, __webpack_require__) {
  28460. "use strict";
  28461. var _interopRequireDefault = __webpack_require__("8e6d");
  28462. Object.defineProperty(exports, "__esModule", {
  28463. value: true
  28464. });
  28465. exports.default = void 0;
  28466. var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
  28467. var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
  28468. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
  28469. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
  28470. var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
  28471. var _typeof2 = _interopRequireDefault(__webpack_require__("7ae5"));
  28472. var _vue = _interopRequireDefault(__webpack_require__("5643"));
  28473. var _vuePropertyDecorator = __webpack_require__("e22c");
  28474. var _globalEvent = _interopRequireDefault(__webpack_require__("fb6a"));
  28475. var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
  28476. var c = arguments.length,
  28477. r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
  28478. d;
  28479. if ((typeof Reflect === "undefined" ? "undefined" : (0, _typeof2.default)(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
  28480. if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  28481. }
  28482. return c > 3 && r && Object.defineProperty(target, key, r), r;
  28483. };
  28484. var Theme =
  28485. /*#__PURE__*/
  28486. function (_Vue) {
  28487. (0, _inherits2.default)(Theme, _Vue);
  28488. function Theme() {
  28489. var _this;
  28490. (0, _classCallCheck2.default)(this, Theme);
  28491. _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(Theme).apply(this, arguments));
  28492. _this.backgroundData = '';
  28493. _this.textColorsData = '';
  28494. _this.colorGroupsData = [];
  28495. return _this;
  28496. }
  28497. (0, _createClass2.default)(Theme, [{
  28498. key: "backgroundChanged",
  28499. value: function backgroundChanged(newValue) {
  28500. this.backgroundData = newValue;
  28501. }
  28502. }, {
  28503. key: "textColorChanged",
  28504. value: function textColorChanged(newValue) {
  28505. this.textColorsData = newValue;
  28506. }
  28507. }, {
  28508. key: "colorGroupChanged",
  28509. value: function colorGroupChanged(newValue) {
  28510. this.colorGroupsData = newValue;
  28511. }
  28512. }, {
  28513. key: "created",
  28514. value: function created() {
  28515. var theme = _globalEvent.default.$options.theme;
  28516. this.backgroundData = this.background || theme && theme.background;
  28517. this.textColorsData = this.textColor || theme && theme.textColor;
  28518. this.colorGroupsData = this.colorGroup || theme && theme.colorGroup;
  28519. }
  28520. }, {
  28521. key: "themeStyleChanged",
  28522. value: function themeStyleChanged(value) {
  28523. return value;
  28524. }
  28525. }, {
  28526. key: "mounted",
  28527. value: function mounted() {
  28528. var _this2 = this;
  28529. _globalEvent.default.$on('change-theme', function (themeStyle) {
  28530. _this2.backgroundData = themeStyle.background;
  28531. _this2.textColorsData = themeStyle.textColor;
  28532. _this2.colorGroupsData = themeStyle.colorGroup;
  28533. _this2.themeStyleChanged();
  28534. });
  28535. }
  28536. }, {
  28537. key: "getBackgroundStyle",
  28538. get: function get() {
  28539. return {
  28540. background: this.backgroundData
  28541. };
  28542. }
  28543. }, {
  28544. key: "getTextColorStyle",
  28545. get: function get() {
  28546. return {
  28547. color: this.textColorsData
  28548. };
  28549. }
  28550. }, {
  28551. key: "getBackground",
  28552. get: function get() {
  28553. return this.backgroundData;
  28554. }
  28555. }, {
  28556. key: "getTextColor",
  28557. get: function get() {
  28558. return this.textColorsData;
  28559. }
  28560. }, {
  28561. key: "getColorStyle",
  28562. get: function get() {
  28563. return function (index) {
  28564. return {
  28565. color: this.colorGroupsData[index]
  28566. };
  28567. };
  28568. }
  28569. }, {
  28570. key: "getColor",
  28571. get: function get() {
  28572. return function (index) {
  28573. return this.colorGroupsData[index];
  28574. };
  28575. }
  28576. }]);
  28577. return Theme;
  28578. }(_vue.default);
  28579. __decorate([(0, _vuePropertyDecorator.Prop)()], Theme.prototype, "background", void 0);
  28580. __decorate([(0, _vuePropertyDecorator.Prop)()], Theme.prototype, "textColor", void 0);
  28581. __decorate([(0, _vuePropertyDecorator.Prop)()], Theme.prototype, "colorGroup", void 0);
  28582. __decorate([(0, _vuePropertyDecorator.Watch)('background')], Theme.prototype, "backgroundChanged", null);
  28583. __decorate([(0, _vuePropertyDecorator.Watch)('textColor')], Theme.prototype, "textColorChanged", null);
  28584. __decorate([(0, _vuePropertyDecorator.Watch)('colorGroup')], Theme.prototype, "colorGroupChanged", null);
  28585. __decorate([(0, _vuePropertyDecorator.Emit)()], Theme.prototype, "themeStyleChanged", null);
  28586. Theme = __decorate([_vuePropertyDecorator.Component], Theme);
  28587. var _default = Theme;
  28588. exports.default = _default;
  28589. /***/ }),
  28590. /***/ "9270":
  28591. /***/ (function(module, exports, __webpack_require__) {
  28592. "use strict";
  28593. var _interopRequireDefault = __webpack_require__("8e6d");
  28594. Object.defineProperty(exports, "__esModule", {
  28595. value: true
  28596. });
  28597. exports.Pixel = void 0;
  28598. var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
  28599. var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
  28600. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  28601. * This program are made available under the terms of the Apache License, Version 2.0
  28602. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html. */
  28603. /**
  28604. * @class Pixel
  28605. * @category BaseTypes Geometry
  28606. * @classdesc 此类用 x,y 坐标描绘屏幕坐标(像素点)。
  28607. * @param {number} [x=0.0] - x 坐标。
  28608. * @param {number} [y=0.0] - y 坐标。
  28609. * @param {Pixel.Mode} [mode=Pixel.Mode.LeftTop] - 坐标模式。
  28610. *
  28611. * @example
  28612. * //单独创建一个对象
  28613. * var pixcel = new Pixel(100,50);
  28614. *
  28615. * //依据 size 创建
  28616. * var size = new Size(21,25);
  28617. * var offset = new Pixel(-(size.w/2), -size.h);
  28618. */
  28619. var Pixel =
  28620. /*#__PURE__*/
  28621. function () {
  28622. function Pixel(x, y, mode) {
  28623. (0, _classCallCheck2.default)(this, Pixel);
  28624. /**
  28625. * @member {number} [Pixel.prototype.x=0.0]
  28626. * @description x 坐标。
  28627. */
  28628. this.x = x ? parseFloat(x) : 0.0;
  28629. /**
  28630. * @member {number} [Pixel.prototype.y=0.0]
  28631. * @description y 坐标。
  28632. */
  28633. this.y = y ? parseFloat(y) : 0.0;
  28634. /**
  28635. * @member {Pixel.Mode} [Pixel.prototype.mode=Pixel.Mode.LeftTop]
  28636. * @description 坐标模式,有左上、右上、右下、左下这几种模式,分别表示相对于左上角、右上角、右下角、左下角的坐标。
  28637. */
  28638. this.mode = mode;
  28639. this.CLASS_NAME = 'Pixel';
  28640. /**
  28641. * @enum Pixel.Mode
  28642. * @readonly
  28643. * @description 模式。
  28644. * @type {string}
  28645. */
  28646. Pixel.Mode = {
  28647. /** 左上模式。 */
  28648. LeftTop: 'lefttop',
  28649. /** 右上模式。 */
  28650. RightTop: 'righttop',
  28651. /** 右下模式。 */
  28652. RightBottom: 'rightbottom',
  28653. /** 左下模式。 */
  28654. LeftBottom: 'leftbottom'
  28655. };
  28656. }
  28657. /**
  28658. * @function Pixel.prototype.toString
  28659. * @description 返回此对象的字符串形式。
  28660. * @example
  28661. *
  28662. * var pixcel = new Pixel(100,50);
  28663. * var str = pixcel.toString();
  28664. *
  28665. * @returns {string} 例如: "x=200.4,y=242.2"
  28666. */
  28667. (0, _createClass2.default)(Pixel, [{
  28668. key: "toString",
  28669. value: function toString() {
  28670. return 'x=' + this.x + ',y=' + this.y;
  28671. }
  28672. /**
  28673. * @function Pixel.prototype.clone
  28674. * @description 克隆当前的 pixel 对象。
  28675. * @example
  28676. * var pixcel = new Pixel(100,50);
  28677. * var pixcel2 = pixcel.clone();
  28678. * @returns {Pixel} 返回一个新的与当前 pixel 对象有相同 x、y 坐标的 pixel 对象。
  28679. */
  28680. }, {
  28681. key: "clone",
  28682. value: function clone() {
  28683. return new Pixel(this.x, this.y, this.mode);
  28684. }
  28685. /**
  28686. * @function Pixel.prototype.equals
  28687. * @description 比较两 pixel 是否相等。
  28688. * @example
  28689. * var pixcel = new Pixel(100,50);
  28690. * var pixcel2 = new Pixel(100,50);
  28691. * var isEquals = pixcel.equals(pixcel2);
  28692. *
  28693. * @param {Pixel} px - 用于比较相等的 pixel 对象。
  28694. * @returns {boolean} 如果传入的像素点和当前像素点相同返回 true,如果不同或传入参数为 NULL 则返回 false。
  28695. */
  28696. }, {
  28697. key: "equals",
  28698. value: function equals(px) {
  28699. var equals = false;
  28700. if (px != null) {
  28701. equals = this.x === px.x && this.y === px.y || isNaN(this.x) && isNaN(this.y) && isNaN(px.x) && isNaN(px.y);
  28702. }
  28703. return equals;
  28704. }
  28705. /**
  28706. * @function Pixel.prototype.distanceTo
  28707. * @description 返回两个 pixel 的距离。
  28708. * @example
  28709. * var pixcel = new Pixel(100,50);
  28710. * var pixcel2 = new Pixel(110,30);
  28711. * var distance = pixcel.distanceTo(pixcel2);
  28712. *
  28713. * @param {Pixel} px - 用于计算的一个 pixel。
  28714. * @returns {float} 作为参数传入的像素与当前像素点的距离。
  28715. */
  28716. }, {
  28717. key: "distanceTo",
  28718. value: function distanceTo(px) {
  28719. return Math.sqrt(Math.pow(this.x - px.x, 2) + Math.pow(this.y - px.y, 2));
  28720. }
  28721. /**
  28722. * @function Pixel.prototype.add
  28723. * @description 在原来像素坐标基础上,x 值加上传入的 x 参数,y 值加上传入的 y 参数。
  28724. * @example
  28725. * var pixcel = new Pixel(100,50);
  28726. * //pixcel2是新的对象
  28727. * var pixcel2 = pixcel.add(20,30);
  28728. *
  28729. * @param {number} x - 传入的 x 值。
  28730. * @param {number} y - 传入的 y 值。
  28731. * @returns {Pixel} 返回一个新的 pixel 对象,该 pixel 是由当前的 pixel 与传入的 x,y 相加得到。
  28732. */
  28733. }, {
  28734. key: "add",
  28735. value: function add(x, y) {
  28736. if (x == null || y == null) {
  28737. throw new TypeError('Pixel.add cannot receive null values');
  28738. }
  28739. return new Pixel(this.x + x, this.y + y);
  28740. }
  28741. /**
  28742. * @function Pixel.prototype.offset
  28743. * @description 通过传入的 {@link Pixel} 参数对原屏幕坐标进行偏移。
  28744. * @example
  28745. * var pixcel = new Pixel(100,50);
  28746. * var pixcel2 = new Pixel(130,20);
  28747. * //pixcel3 是新的对象
  28748. * var pixcel3 = pixcel.offset(pixcel2);
  28749. *
  28750. * @param {Pixel} px - 传入的 <Pixel> 对象。
  28751. * @returns {Pixel} 返回一个新的 pixel,该 pixel 是由当前的 pixel 对象的 x,y 值与传入的 Pixel 对象的 x,y 值相加得到。
  28752. */
  28753. }, {
  28754. key: "offset",
  28755. value: function offset(px) {
  28756. var newPx = this.clone();
  28757. if (px) {
  28758. newPx = this.add(px.x, px.y);
  28759. }
  28760. return newPx;
  28761. }
  28762. /**
  28763. *
  28764. * @function Pixel.prototype.destroy
  28765. * @description 销毁此对象。销毁后此对象的所有属性为 null,而不是初始值。
  28766. * @example
  28767. * var pixcel = new Pixel(100,50);
  28768. * pixcel.destroy();
  28769. */
  28770. }, {
  28771. key: "destroy",
  28772. value: function destroy() {
  28773. this.x = null;
  28774. this.y = null;
  28775. this.mode = null;
  28776. }
  28777. }]);
  28778. return Pixel;
  28779. }();
  28780. exports.Pixel = Pixel;
  28781. /***/ }),
  28782. /***/ "92a1":
  28783. /***/ (function(module, exports, __webpack_require__) {
  28784. // Copyright Joyent, Inc. and other Node contributors.
  28785. //
  28786. // Permission is hereby granted, free of charge, to any person obtaining a
  28787. // copy of this software and associated documentation files (the
  28788. // "Software"), to deal in the Software without restriction, including
  28789. // without limitation the rights to use, copy, modify, merge, publish,
  28790. // distribute, sublicense, and/or sell copies of the Software, and to permit
  28791. // persons to whom the Software is furnished to do so, subject to the
  28792. // following conditions:
  28793. //
  28794. // The above copyright notice and this permission notice shall be included
  28795. // in all copies or substantial portions of the Software.
  28796. //
  28797. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  28798. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  28799. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  28800. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  28801. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  28802. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  28803. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  28804. module.exports = Stream;
  28805. var EE = __webpack_require__("0956").EventEmitter;
  28806. var inherits = __webpack_require__("fe04");
  28807. inherits(Stream, EE);
  28808. Stream.Readable = __webpack_require__("bbe9");
  28809. Stream.Writable = __webpack_require__("f29e");
  28810. Stream.Duplex = __webpack_require__("5648");
  28811. Stream.Transform = __webpack_require__("4366");
  28812. Stream.PassThrough = __webpack_require__("0640");
  28813. // Backwards-compat with node 0.4.x
  28814. Stream.Stream = Stream;
  28815. // old-style streams. Note that the pipe method (the only relevant
  28816. // part of this class) is overridden in the Readable class.
  28817. function Stream() {
  28818. EE.call(this);
  28819. }
  28820. Stream.prototype.pipe = function(dest, options) {
  28821. var source = this;
  28822. function ondata(chunk) {
  28823. if (dest.writable) {
  28824. if (false === dest.write(chunk) && source.pause) {
  28825. source.pause();
  28826. }
  28827. }
  28828. }
  28829. source.on('data', ondata);
  28830. function ondrain() {
  28831. if (source.readable && source.resume) {
  28832. source.resume();
  28833. }
  28834. }
  28835. dest.on('drain', ondrain);
  28836. // If the 'end' option is not supplied, dest.end() will be called when
  28837. // source gets the 'end' or 'close' events. Only dest.end() once.
  28838. if (!dest._isStdio && (!options || options.end !== false)) {
  28839. source.on('end', onend);
  28840. source.on('close', onclose);
  28841. }
  28842. var didOnEnd = false;
  28843. function onend() {
  28844. if (didOnEnd) return;
  28845. didOnEnd = true;
  28846. dest.end();
  28847. }
  28848. function onclose() {
  28849. if (didOnEnd) return;
  28850. didOnEnd = true;
  28851. if (typeof dest.destroy === 'function') dest.destroy();
  28852. }
  28853. // don't leave dangling pipes when there are errors.
  28854. function onerror(er) {
  28855. cleanup();
  28856. if (EE.listenerCount(this, 'error') === 0) {
  28857. throw er; // Unhandled stream error in pipe.
  28858. }
  28859. }
  28860. source.on('error', onerror);
  28861. dest.on('error', onerror);
  28862. // remove all the event listeners that were added.
  28863. function cleanup() {
  28864. source.removeListener('data', ondata);
  28865. dest.removeListener('drain', ondrain);
  28866. source.removeListener('end', onend);
  28867. source.removeListener('close', onclose);
  28868. source.removeListener('error', onerror);
  28869. dest.removeListener('error', onerror);
  28870. source.removeListener('end', cleanup);
  28871. source.removeListener('close', cleanup);
  28872. dest.removeListener('close', cleanup);
  28873. }
  28874. source.on('end', cleanup);
  28875. source.on('close', cleanup);
  28876. dest.on('close', cleanup);
  28877. dest.emit('pipe', source);
  28878. // Allow for unix-like usage: A.pipe(B).pipe(C)
  28879. return dest;
  28880. };
  28881. /***/ }),
  28882. /***/ "9711":
  28883. /***/ (function(module, exports, __webpack_require__) {
  28884. "use strict";
  28885. exports.byteLength = byteLength
  28886. exports.toByteArray = toByteArray
  28887. exports.fromByteArray = fromByteArray
  28888. var lookup = []
  28889. var revLookup = []
  28890. var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
  28891. var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
  28892. for (var i = 0, len = code.length; i < len; ++i) {
  28893. lookup[i] = code[i]
  28894. revLookup[code.charCodeAt(i)] = i
  28895. }
  28896. // Support decoding URL-safe base64 strings, as Node.js does.
  28897. // See: https://en.wikipedia.org/wiki/Base64#URL_applications
  28898. revLookup['-'.charCodeAt(0)] = 62
  28899. revLookup['_'.charCodeAt(0)] = 63
  28900. function getLens (b64) {
  28901. var len = b64.length
  28902. if (len % 4 > 0) {
  28903. throw new Error('Invalid string. Length must be a multiple of 4')
  28904. }
  28905. // Trim off extra bytes after placeholder bytes are found
  28906. // See: https://github.com/beatgammit/base64-js/issues/42
  28907. var validLen = b64.indexOf('=')
  28908. if (validLen === -1) validLen = len
  28909. var placeHoldersLen = validLen === len
  28910. ? 0
  28911. : 4 - (validLen % 4)
  28912. return [validLen, placeHoldersLen]
  28913. }
  28914. // base64 is 4/3 + up to two characters of the original data
  28915. function byteLength (b64) {
  28916. var lens = getLens(b64)
  28917. var validLen = lens[0]
  28918. var placeHoldersLen = lens[1]
  28919. return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
  28920. }
  28921. function _byteLength (b64, validLen, placeHoldersLen) {
  28922. return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
  28923. }
  28924. function toByteArray (b64) {
  28925. var tmp
  28926. var lens = getLens(b64)
  28927. var validLen = lens[0]
  28928. var placeHoldersLen = lens[1]
  28929. var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
  28930. var curByte = 0
  28931. // if there are placeholders, only get up to the last complete 4 chars
  28932. var len = placeHoldersLen > 0
  28933. ? validLen - 4
  28934. : validLen
  28935. var i
  28936. for (i = 0; i < len; i += 4) {
  28937. tmp =
  28938. (revLookup[b64.charCodeAt(i)] << 18) |
  28939. (revLookup[b64.charCodeAt(i + 1)] << 12) |
  28940. (revLookup[b64.charCodeAt(i + 2)] << 6) |
  28941. revLookup[b64.charCodeAt(i + 3)]
  28942. arr[curByte++] = (tmp >> 16) & 0xFF
  28943. arr[curByte++] = (tmp >> 8) & 0xFF
  28944. arr[curByte++] = tmp & 0xFF
  28945. }
  28946. if (placeHoldersLen === 2) {
  28947. tmp =
  28948. (revLookup[b64.charCodeAt(i)] << 2) |
  28949. (revLookup[b64.charCodeAt(i + 1)] >> 4)
  28950. arr[curByte++] = tmp & 0xFF
  28951. }
  28952. if (placeHoldersLen === 1) {
  28953. tmp =
  28954. (revLookup[b64.charCodeAt(i)] << 10) |
  28955. (revLookup[b64.charCodeAt(i + 1)] << 4) |
  28956. (revLookup[b64.charCodeAt(i + 2)] >> 2)
  28957. arr[curByte++] = (tmp >> 8) & 0xFF
  28958. arr[curByte++] = tmp & 0xFF
  28959. }
  28960. return arr
  28961. }
  28962. function tripletToBase64 (num) {
  28963. return lookup[num >> 18 & 0x3F] +
  28964. lookup[num >> 12 & 0x3F] +
  28965. lookup[num >> 6 & 0x3F] +
  28966. lookup[num & 0x3F]
  28967. }
  28968. function encodeChunk (uint8, start, end) {
  28969. var tmp
  28970. var output = []
  28971. for (var i = start; i < end; i += 3) {
  28972. tmp =
  28973. ((uint8[i] << 16) & 0xFF0000) +
  28974. ((uint8[i + 1] << 8) & 0xFF00) +
  28975. (uint8[i + 2] & 0xFF)
  28976. output.push(tripletToBase64(tmp))
  28977. }
  28978. return output.join('')
  28979. }
  28980. function fromByteArray (uint8) {
  28981. var tmp
  28982. var len = uint8.length
  28983. var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
  28984. var parts = []
  28985. var maxChunkLength = 16383 // must be multiple of 3
  28986. // go through the array every three bytes, we'll deal with trailing stuff later
  28987. for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
  28988. parts.push(encodeChunk(
  28989. uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)
  28990. ))
  28991. }
  28992. // pad the end with zeros, but make sure to not forget the extra bytes
  28993. if (extraBytes === 1) {
  28994. tmp = uint8[len - 1]
  28995. parts.push(
  28996. lookup[tmp >> 2] +
  28997. lookup[(tmp << 4) & 0x3F] +
  28998. '=='
  28999. )
  29000. } else if (extraBytes === 2) {
  29001. tmp = (uint8[len - 2] << 8) + uint8[len - 1]
  29002. parts.push(
  29003. lookup[tmp >> 10] +
  29004. lookup[(tmp >> 4) & 0x3F] +
  29005. lookup[(tmp << 2) & 0x3F] +
  29006. '='
  29007. )
  29008. }
  29009. return parts.join('')
  29010. }
  29011. /***/ }),
  29012. /***/ "98c2":
  29013. /***/ (function(module, exports, __webpack_require__) {
  29014. var sax = __webpack_require__("ea23");
  29015. var expat /*= require('node-expat');*/ = { on: function () { }, parse: function () { } };
  29016. var helper = __webpack_require__("cabd");
  29017. var isArray = __webpack_require__("df2e").isArray;
  29018. var options;
  29019. var pureJsParser = true;
  29020. var currentElement;
  29021. function validateOptions(userOptions) {
  29022. options = helper.copyOptions(userOptions);
  29023. helper.ensureFlagExists('ignoreDeclaration', options);
  29024. helper.ensureFlagExists('ignoreInstruction', options);
  29025. helper.ensureFlagExists('ignoreAttributes', options);
  29026. helper.ensureFlagExists('ignoreText', options);
  29027. helper.ensureFlagExists('ignoreComment', options);
  29028. helper.ensureFlagExists('ignoreCdata', options);
  29029. helper.ensureFlagExists('ignoreDoctype', options);
  29030. helper.ensureFlagExists('compact', options);
  29031. helper.ensureFlagExists('alwaysChildren', options);
  29032. helper.ensureFlagExists('addParent', options);
  29033. helper.ensureFlagExists('trim', options);
  29034. helper.ensureFlagExists('nativeType', options);
  29035. helper.ensureFlagExists('nativeTypeAttributes', options);
  29036. helper.ensureFlagExists('sanitize', options);
  29037. helper.ensureFlagExists('instructionHasAttributes', options);
  29038. helper.ensureFlagExists('captureSpacesBetweenElements', options);
  29039. helper.ensureAlwaysArrayExists(options);
  29040. helper.ensureKeyExists('declaration', options);
  29041. helper.ensureKeyExists('instruction', options);
  29042. helper.ensureKeyExists('attributes', options);
  29043. helper.ensureKeyExists('text', options);
  29044. helper.ensureKeyExists('comment', options);
  29045. helper.ensureKeyExists('cdata', options);
  29046. helper.ensureKeyExists('doctype', options);
  29047. helper.ensureKeyExists('type', options);
  29048. helper.ensureKeyExists('name', options);
  29049. helper.ensureKeyExists('elements', options);
  29050. helper.ensureKeyExists('parent', options);
  29051. helper.checkFnExists('doctype', options);
  29052. helper.checkFnExists('instruction', options);
  29053. helper.checkFnExists('cdata', options);
  29054. helper.checkFnExists('comment', options);
  29055. helper.checkFnExists('text', options);
  29056. helper.checkFnExists('instructionName', options);
  29057. helper.checkFnExists('elementName', options);
  29058. helper.checkFnExists('attributeName', options);
  29059. helper.checkFnExists('attributeValue', options);
  29060. helper.checkFnExists('attributes', options);
  29061. return options;
  29062. }
  29063. function nativeType(value) {
  29064. var nValue = Number(value);
  29065. if (!isNaN(nValue)) {
  29066. return nValue;
  29067. }
  29068. var bValue = value.toLowerCase();
  29069. if (bValue === 'true') {
  29070. return true;
  29071. } else if (bValue === 'false') {
  29072. return false;
  29073. }
  29074. return value;
  29075. }
  29076. function addField(type, value) {
  29077. var key;
  29078. if (options.compact) {
  29079. if (
  29080. !currentElement[options[type + 'Key']] &&
  29081. (isArray(options.alwaysArray) ? options.alwaysArray.indexOf(options[type + 'Key']) !== -1 : options.alwaysArray)
  29082. ) {
  29083. currentElement[options[type + 'Key']] = [];
  29084. }
  29085. if (currentElement[options[type + 'Key']] && !isArray(currentElement[options[type + 'Key']])) {
  29086. currentElement[options[type + 'Key']] = [currentElement[options[type + 'Key']]];
  29087. }
  29088. if (type + 'Fn' in options && typeof value === 'string') {
  29089. value = options[type + 'Fn'](value, currentElement);
  29090. }
  29091. if (type === 'instruction' && ('instructionFn' in options || 'instructionNameFn' in options)) {
  29092. for (key in value) {
  29093. if (value.hasOwnProperty(key)) {
  29094. if ('instructionFn' in options) {
  29095. value[key] = options.instructionFn(value[key], key, currentElement);
  29096. } else {
  29097. var temp = value[key];
  29098. delete value[key];
  29099. value[options.instructionNameFn(key, temp, currentElement)] = temp;
  29100. }
  29101. }
  29102. }
  29103. }
  29104. if (isArray(currentElement[options[type + 'Key']])) {
  29105. currentElement[options[type + 'Key']].push(value);
  29106. } else {
  29107. currentElement[options[type + 'Key']] = value;
  29108. }
  29109. } else {
  29110. if (!currentElement[options.elementsKey]) {
  29111. currentElement[options.elementsKey] = [];
  29112. }
  29113. var element = {};
  29114. element[options.typeKey] = type;
  29115. if (type === 'instruction') {
  29116. for (key in value) {
  29117. if (value.hasOwnProperty(key)) {
  29118. break;
  29119. }
  29120. }
  29121. element[options.nameKey] = 'instructionNameFn' in options ? options.instructionNameFn(key, value, currentElement) : key;
  29122. if (options.instructionHasAttributes) {
  29123. element[options.attributesKey] = value[key][options.attributesKey];
  29124. if ('instructionFn' in options) {
  29125. element[options.attributesKey] = options.instructionFn(element[options.attributesKey], key, currentElement);
  29126. }
  29127. } else {
  29128. if ('instructionFn' in options) {
  29129. value[key] = options.instructionFn(value[key], key, currentElement);
  29130. }
  29131. element[options.instructionKey] = value[key];
  29132. }
  29133. } else {
  29134. if (type + 'Fn' in options) {
  29135. value = options[type + 'Fn'](value, currentElement);
  29136. }
  29137. element[options[type + 'Key']] = value;
  29138. }
  29139. if (options.addParent) {
  29140. element[options.parentKey] = currentElement;
  29141. }
  29142. currentElement[options.elementsKey].push(element);
  29143. }
  29144. }
  29145. function manipulateAttributes(attributes) {
  29146. if ('attributesFn' in options && attributes) {
  29147. attributes = options.attributesFn(attributes, currentElement);
  29148. }
  29149. if ((options.trim || 'attributeValueFn' in options || 'attributeNameFn' in options || options.nativeTypeAttributes) && attributes) {
  29150. var key;
  29151. for (key in attributes) {
  29152. if (attributes.hasOwnProperty(key)) {
  29153. if (options.trim) attributes[key] = attributes[key].trim();
  29154. if (options.nativeTypeAttributes) {
  29155. attributes[key] = nativeType(attributes[key]);
  29156. }
  29157. if ('attributeValueFn' in options) attributes[key] = options.attributeValueFn(attributes[key], key, currentElement);
  29158. if ('attributeNameFn' in options) {
  29159. var temp = attributes[key];
  29160. delete attributes[key];
  29161. attributes[options.attributeNameFn(key, attributes[key], currentElement)] = temp;
  29162. }
  29163. }
  29164. }
  29165. }
  29166. return attributes;
  29167. }
  29168. function onInstruction(instruction) {
  29169. var attributes = {};
  29170. if (instruction.body && (instruction.name.toLowerCase() === 'xml' || options.instructionHasAttributes)) {
  29171. var attrsRegExp = /([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g;
  29172. var match;
  29173. while ((match = attrsRegExp.exec(instruction.body)) !== null) {
  29174. attributes[match[1]] = match[2] || match[3] || match[4];
  29175. }
  29176. attributes = manipulateAttributes(attributes);
  29177. }
  29178. if (instruction.name.toLowerCase() === 'xml') {
  29179. if (options.ignoreDeclaration) {
  29180. return;
  29181. }
  29182. currentElement[options.declarationKey] = {};
  29183. if (Object.keys(attributes).length) {
  29184. currentElement[options.declarationKey][options.attributesKey] = attributes;
  29185. }
  29186. if (options.addParent) {
  29187. currentElement[options.declarationKey][options.parentKey] = currentElement;
  29188. }
  29189. } else {
  29190. if (options.ignoreInstruction) {
  29191. return;
  29192. }
  29193. if (options.trim) {
  29194. instruction.body = instruction.body.trim();
  29195. }
  29196. var value = {};
  29197. if (options.instructionHasAttributes && Object.keys(attributes).length) {
  29198. value[instruction.name] = {};
  29199. value[instruction.name][options.attributesKey] = attributes;
  29200. } else {
  29201. value[instruction.name] = instruction.body;
  29202. }
  29203. addField('instruction', value);
  29204. }
  29205. }
  29206. function onStartElement(name, attributes) {
  29207. var element;
  29208. if (typeof name === 'object') {
  29209. attributes = name.attributes;
  29210. name = name.name;
  29211. }
  29212. attributes = manipulateAttributes(attributes);
  29213. if ('elementNameFn' in options) {
  29214. name = options.elementNameFn(name, currentElement);
  29215. }
  29216. if (options.compact) {
  29217. element = {};
  29218. if (!options.ignoreAttributes && attributes && Object.keys(attributes).length) {
  29219. element[options.attributesKey] = {};
  29220. var key;
  29221. for (key in attributes) {
  29222. if (attributes.hasOwnProperty(key)) {
  29223. element[options.attributesKey][key] = attributes[key];
  29224. }
  29225. }
  29226. }
  29227. if (
  29228. !(name in currentElement) &&
  29229. (isArray(options.alwaysArray) ? options.alwaysArray.indexOf(name) !== -1 : options.alwaysArray)
  29230. ) {
  29231. currentElement[name] = [];
  29232. }
  29233. if (currentElement[name] && !isArray(currentElement[name])) {
  29234. currentElement[name] = [currentElement[name]];
  29235. }
  29236. if (isArray(currentElement[name])) {
  29237. currentElement[name].push(element);
  29238. } else {
  29239. currentElement[name] = element;
  29240. }
  29241. } else {
  29242. if (!currentElement[options.elementsKey]) {
  29243. currentElement[options.elementsKey] = [];
  29244. }
  29245. element = {};
  29246. element[options.typeKey] = 'element';
  29247. element[options.nameKey] = name;
  29248. if (!options.ignoreAttributes && attributes && Object.keys(attributes).length) {
  29249. element[options.attributesKey] = attributes;
  29250. }
  29251. if (options.alwaysChildren) {
  29252. element[options.elementsKey] = [];
  29253. }
  29254. currentElement[options.elementsKey].push(element);
  29255. }
  29256. element[options.parentKey] = currentElement; // will be deleted in onEndElement() if !options.addParent
  29257. currentElement = element;
  29258. }
  29259. function onText(text) {
  29260. if (options.ignoreText) {
  29261. return;
  29262. }
  29263. if (!text.trim() && !options.captureSpacesBetweenElements) {
  29264. return;
  29265. }
  29266. if (options.trim) {
  29267. text = text.trim();
  29268. }
  29269. if (options.nativeType) {
  29270. text = nativeType(text);
  29271. }
  29272. if (options.sanitize) {
  29273. text = text.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
  29274. }
  29275. addField('text', text);
  29276. }
  29277. function onComment(comment) {
  29278. if (options.ignoreComment) {
  29279. return;
  29280. }
  29281. if (options.trim) {
  29282. comment = comment.trim();
  29283. }
  29284. addField('comment', comment);
  29285. }
  29286. function onEndElement(name) {
  29287. var parentElement = currentElement[options.parentKey];
  29288. if (!options.addParent) {
  29289. delete currentElement[options.parentKey];
  29290. }
  29291. currentElement = parentElement;
  29292. }
  29293. function onCdata(cdata) {
  29294. if (options.ignoreCdata) {
  29295. return;
  29296. }
  29297. if (options.trim) {
  29298. cdata = cdata.trim();
  29299. }
  29300. addField('cdata', cdata);
  29301. }
  29302. function onDoctype(doctype) {
  29303. if (options.ignoreDoctype) {
  29304. return;
  29305. }
  29306. doctype = doctype.replace(/^ /, '');
  29307. if (options.trim) {
  29308. doctype = doctype.trim();
  29309. }
  29310. addField('doctype', doctype);
  29311. }
  29312. function onError(error) {
  29313. error.note = error; //console.error(error);
  29314. }
  29315. module.exports = function (xml, userOptions) {
  29316. var parser = pureJsParser ? sax.parser(true, {}) : parser = new expat.Parser('UTF-8');
  29317. var result = {};
  29318. currentElement = result;
  29319. options = validateOptions(userOptions);
  29320. if (pureJsParser) {
  29321. parser.opt = {strictEntities: true};
  29322. parser.onopentag = onStartElement;
  29323. parser.ontext = onText;
  29324. parser.oncomment = onComment;
  29325. parser.onclosetag = onEndElement;
  29326. parser.onerror = onError;
  29327. parser.oncdata = onCdata;
  29328. parser.ondoctype = onDoctype;
  29329. parser.onprocessinginstruction = onInstruction;
  29330. } else {
  29331. parser.on('startElement', onStartElement);
  29332. parser.on('text', onText);
  29333. parser.on('comment', onComment);
  29334. parser.on('endElement', onEndElement);
  29335. parser.on('error', onError);
  29336. //parser.on('startCdata', onStartCdata);
  29337. //parser.on('endCdata', onEndCdata);
  29338. //parser.on('entityDecl', onEntityDecl);
  29339. }
  29340. if (pureJsParser) {
  29341. parser.write(xml).close();
  29342. } else {
  29343. if (!parser.parse(xml)) {
  29344. throw new Error('XML parsing error: ' + parser.getError());
  29345. }
  29346. }
  29347. if (result[options.elementsKey]) {
  29348. var temp = result[options.elementsKey];
  29349. delete result[options.elementsKey];
  29350. result[options.elementsKey] = temp;
  29351. delete result.text;
  29352. }
  29353. return result;
  29354. };
  29355. /***/ }),
  29356. /***/ "9903":
  29357. /***/ (function(module, exports, __webpack_require__) {
  29358. "use strict";
  29359. var _interopRequireDefault = __webpack_require__("8e6d");
  29360. Object.defineProperty(exports, "__esModule", {
  29361. value: true
  29362. });
  29363. Object.defineProperty(exports, "Icon", {
  29364. enumerable: true,
  29365. get: function get() {
  29366. return _Icon.default;
  29367. }
  29368. });
  29369. Object.defineProperty(exports, "Indicator", {
  29370. enumerable: true,
  29371. get: function get() {
  29372. return _Indicator.default;
  29373. }
  29374. });
  29375. Object.defineProperty(exports, "LiquidFill", {
  29376. enumerable: true,
  29377. get: function get() {
  29378. return _LiquidFill.default;
  29379. }
  29380. });
  29381. Object.defineProperty(exports, "Progress", {
  29382. enumerable: true,
  29383. get: function get() {
  29384. return _Progress.default;
  29385. }
  29386. });
  29387. Object.defineProperty(exports, "Text", {
  29388. enumerable: true,
  29389. get: function get() {
  29390. return _Text.default;
  29391. }
  29392. });
  29393. Object.defineProperty(exports, "TimeText", {
  29394. enumerable: true,
  29395. get: function get() {
  29396. return _TimeText.default;
  29397. }
  29398. });
  29399. Object.defineProperty(exports, "Border", {
  29400. enumerable: true,
  29401. get: function get() {
  29402. return _Border.default;
  29403. }
  29404. });
  29405. Object.defineProperty(exports, "Image", {
  29406. enumerable: true,
  29407. get: function get() {
  29408. return _Image.default;
  29409. }
  29410. });
  29411. Object.defineProperty(exports, "VideoPlayer", {
  29412. enumerable: true,
  29413. get: function get() {
  29414. return _VideoPlayer.default;
  29415. }
  29416. });
  29417. Object.defineProperty(exports, "Iframe", {
  29418. enumerable: true,
  29419. get: function get() {
  29420. return _Iframe.default;
  29421. }
  29422. });
  29423. Object.defineProperty(exports, "TablePopup", {
  29424. enumerable: true,
  29425. get: function get() {
  29426. return _TablePopup.default;
  29427. }
  29428. });
  29429. Object.defineProperty(exports, "Identify", {
  29430. enumerable: true,
  29431. get: function get() {
  29432. return _Identify.default;
  29433. }
  29434. });
  29435. Object.defineProperty(exports, "Popup", {
  29436. enumerable: true,
  29437. get: function get() {
  29438. return _Popup.default;
  29439. }
  29440. });
  29441. Object.defineProperty(exports, "Chart", {
  29442. enumerable: true,
  29443. get: function get() {
  29444. return _Chart.default;
  29445. }
  29446. });
  29447. Object.defineProperty(exports, "WebMap", {
  29448. enumerable: true,
  29449. get: function get() {
  29450. return _WebMap.default;
  29451. }
  29452. });
  29453. Object.defineProperty(exports, "SmTileLayer", {
  29454. enumerable: true,
  29455. get: function get() {
  29456. return _SmTileLayer.default;
  29457. }
  29458. });
  29459. var _Icon = _interopRequireDefault(__webpack_require__("5c61"));
  29460. var _Indicator = _interopRequireDefault(__webpack_require__("08d1"));
  29461. var _LiquidFill = _interopRequireDefault(__webpack_require__("908c"));
  29462. var _Progress = _interopRequireDefault(__webpack_require__("52fe"));
  29463. var _Text = _interopRequireDefault(__webpack_require__("5f3d"));
  29464. var _TimeText = _interopRequireDefault(__webpack_require__("0b0f"));
  29465. var _Border = _interopRequireDefault(__webpack_require__("38cf"));
  29466. var _Image = _interopRequireDefault(__webpack_require__("2389"));
  29467. var _VideoPlayer = _interopRequireDefault(__webpack_require__("b1eb"));
  29468. var _Iframe = _interopRequireDefault(__webpack_require__("e7f3"));
  29469. var _TablePopup = _interopRequireDefault(__webpack_require__("b397"));
  29470. var _Identify = _interopRequireDefault(__webpack_require__("d1f6"));
  29471. var _Popup = _interopRequireDefault(__webpack_require__("9a20"));
  29472. var _Chart = _interopRequireDefault(__webpack_require__("c7a6"));
  29473. var _WebMap = _interopRequireDefault(__webpack_require__("49f9"));
  29474. var _SmTileLayer = _interopRequireDefault(__webpack_require__("88e1"));
  29475. /***/ }),
  29476. /***/ "99ae":
  29477. /***/ (function(module, exports, __webpack_require__) {
  29478. "use strict";
  29479. Object.defineProperty(exports, "__esModule", {
  29480. value: true
  29481. });
  29482. exports.default = void 0;
  29483. var _default = {
  29484. dateTimeFormat: {
  29485. date: {
  29486. year: 'numeric',
  29487. month: 'short',
  29488. day: 'numeric'
  29489. },
  29490. date_second: {
  29491. year: 'numeric',
  29492. month: 'short',
  29493. day: 'numeric',
  29494. hour: 'numeric',
  29495. minute: 'numeric',
  29496. second: 'numeric'
  29497. },
  29498. date_second_week: {
  29499. year: 'numeric',
  29500. month: 'short',
  29501. day: 'numeric',
  29502. weekday: 'long',
  29503. hour: 'numeric',
  29504. minute: 'numeric',
  29505. second: 'numeric'
  29506. }
  29507. },
  29508. // messageTemplate
  29509. warning: {
  29510. unsupportedVideoAddress: '视频地址不合法',
  29511. unavailableVideo: '此视频暂无法播放,请稍后再试',
  29512. mapNotLoaded: '关联的地图尚未加载完整,请稍后',
  29513. unassociatedMap: '您需要配置关联地图!'
  29514. },
  29515. success: {},
  29516. info: {
  29517. loading: '加载中',
  29518. pressEscToExit: '按下 ESC 键或点击关闭按钮退出'
  29519. },
  29520. unit: {
  29521. kilometers: '千米',
  29522. miles: '英里',
  29523. meters: '米',
  29524. yards: '码',
  29525. feet: '英尺',
  29526. squarekilometers: '平方千米',
  29527. squaremiles: '平方英里',
  29528. squaremeters: '平方米',
  29529. squareyards: '平方码',
  29530. squarefeet: '平方英尺'
  29531. },
  29532. error: {},
  29533. commontypes: {
  29534. restData: 'SuperMap Rest 数据服务',
  29535. restMap: 'SuperMap Rest 地图服务',
  29536. addressMatch: 'SuperMap 地址匹配服务',
  29537. iportalData: 'SuperMap iPortal 数据',
  29538. onlineLocalSearch: 'SuperMap Online 本地搜索'
  29539. },
  29540. // 组件
  29541. timeText: {
  29542. Year: '年',
  29543. Month: '月',
  29544. Day: '日',
  29545. hour: '时',
  29546. minute: '分',
  29547. second: '秒'
  29548. },
  29549. zoom: {},
  29550. chart: {
  29551. unSupportedData: '当前数据不支持与地图联动'
  29552. },
  29553. layerList: {
  29554. title: '图层'
  29555. },
  29556. miniMap: {},
  29557. pan: {},
  29558. scale: {},
  29559. webmap: {
  29560. loadingTip: '地图加载中...',
  29561. crsNotSupport: '不支持当前地图的坐标系!',
  29562. TileMatrixSetNotSuppport: '不支持传入的 TileMatrixSet!',
  29563. getLayerInfoFailed: '获取图层信息失败!',
  29564. getThemeInfoFailed: '获取图层样式信息失败!',
  29565. crsnotsupport: '不支持的坐标系!',
  29566. baiduMapNotSupport: '暂不支持加载百度地图!',
  29567. sampleDataNotSupport: '暂不支持加载示例数据!',
  29568. mvtNotSupport: '暂不支持加载矢量瓦片图层!'
  29569. },
  29570. legend: {
  29571. themeField: '专题字段',
  29572. title: '图例',
  29573. top: '最高',
  29574. bottom: '最低',
  29575. noMatchLayer: '没有匹配的图层'
  29576. },
  29577. measure: {
  29578. mapMeasure: '量算',
  29579. measureResult: '测量结果',
  29580. distance: '距离',
  29581. area: '面积',
  29582. delete: '清空',
  29583. selectPlaceholder: '请选择',
  29584. startingPoint: '起点'
  29585. },
  29586. search: {
  29587. noResult: '查询结果为空!',
  29588. noKey: '搜索关键字不能为空,请输入搜索条件。',
  29589. inputPlaceHolder: '查找地址或地点',
  29590. attribute: '属性',
  29591. attributeValue: '属性值',
  29592. setSearchSource: '请设置搜索源!',
  29593. address: '地址',
  29594. null: '空',
  29595. illegalFeature: '要素必须包含合法的坐标!'
  29596. },
  29597. query: {
  29598. query: '查询',
  29599. queryJob: '任务',
  29600. queryResult: '结果',
  29601. attributeCondition: '属性条件',
  29602. spatialFilter: '空间过滤器',
  29603. mapBounds: '返回地图全图范围的要素',
  29604. currentMapBounds: '返回当前地图范围内的要素',
  29605. applicate: '应用',
  29606. noResult: '无结果',
  29607. resultAlreadyExists: '当前查询结果已经存在!',
  29608. querying: '查询中',
  29609. attribute: '属性',
  29610. attributeValue: '属性值',
  29611. noResults: '查询结果为空!',
  29612. queryFailed: '查询失败!',
  29613. seviceNotSupport: '此服务不支持查询!'
  29614. },
  29615. identify: {
  29616. layerNotExit: "地图上不存在该图层: '{layer}'",
  29617. noData: '无数据'
  29618. },
  29619. openFile: {
  29620. fileSizeExceeded: '文件大小超限!文件大小不得超过 10M!',
  29621. fileTypeUnsupported: '不支持该文件格式!',
  29622. openFileFail: '打开文件失败!',
  29623. openFileSuccess: '打开文件成功!',
  29624. selectFile: '选择文件',
  29625. openEmptyFile: '打开文件为空!',
  29626. openFile: '打开文件'
  29627. },
  29628. draw: {
  29629. draw: '绘制'
  29630. },
  29631. indicator: {
  29632. title: '指标标题',
  29633. unit: '单位'
  29634. },
  29635. layerManager: {
  29636. title: '图层管理'
  29637. },
  29638. tdtResults: {
  29639. on: '在',
  29640. station: '站',
  29641. total: '共',
  29642. about: '约',
  29643. // pagination
  29644. homePage: '首页',
  29645. prevPage: '上一页',
  29646. nextPage: '下一页',
  29647. // nothingResult
  29648. searchNoResult: '没有查询到相关结果',
  29649. youCanTry: '您可以尝试',
  29650. enterCorrect: '检查输入是否正确',
  29651. enterOtherKeyWords: '输入其他关键字进行搜索',
  29652. onTdtMap: '在天地图上',
  29653. addThisAddress: '添加该地点',
  29654. uWantTo: '您是否要找',
  29655. // pointResults
  29656. totalFind: '共找到',
  29657. piecesResults: '条结果',
  29658. phone: '电话',
  29659. address: '地址',
  29660. setStartPonint: '设为起点',
  29661. setEndPonint: '设为终点',
  29662. // routePlan
  29663. totalMiles: '总里程',
  29664. distance: '约{distance}公里',
  29665. showDetails: '显示全部详情',
  29666. switchTimes: '换乘{switchTimes}次',
  29667. noSwitch: '无换乘',
  29668. walk: '步行至',
  29669. getOff: '下车',
  29670. getOn: '上车',
  29671. take: '乘坐',
  29672. noSearchResults: '没有查询到线路信息',
  29673. fastRoute: '最快线路',
  29674. shortRoute: '最短线路',
  29675. walkRoute: '少走高速',
  29676. fast: '较快捷',
  29677. noSubway: '不坐地铁',
  29678. lessSwitch: '少换乘',
  29679. lessWalk: '少步行',
  29680. // staticResult
  29681. cityHadResults: '以下城市有结果,请您选择',
  29682. moreCity: '更多城市',
  29683. // LineResult
  29684. allFound: '共为您找到',
  29685. piecesBusRoute: '条公交线路',
  29686. showDetail: '展开详情',
  29687. busEndTime: '首末车时间',
  29688. relateAdress: '点击此处查看 "{keyWord}" 的相关地点',
  29689. // areaResult
  29690. switchTo: '已切换到'
  29691. },
  29692. tdtRoute: {
  29693. title: '路线',
  29694. clearRoute: '清除路线',
  29695. pleaseEnterStartPoint: '请输入起点',
  29696. pleaseEnterEndPoint: '请输入终点',
  29697. search: '搜索',
  29698. startPoint: '起点',
  29699. endPoint: '终点',
  29700. mapLoadedFiled: '地图加载失败',
  29701. busEndTime: '首末车时间',
  29702. about: '约',
  29703. station: '站',
  29704. total: '共',
  29705. hour: '小时',
  29706. minutes: '分钟'
  29707. },
  29708. tdtSearch: {
  29709. phone: '电话',
  29710. address: '地址',
  29711. noData: '暂无',
  29712. transport: '交通'
  29713. },
  29714. tdtMapSwitcher: {
  29715. title: '地图切换',
  29716. image: '影像',
  29717. vector: '矢量',
  29718. terrain: '地形',
  29719. placeName: '地名',
  29720. TiandituVec: '天地图矢量底图',
  29721. TiandituTer: '天地图地形底图',
  29722. TiandituImg: '天地图影像底图',
  29723. TiandituCva: '天地图矢量注记',
  29724. TiandituCta: '天地图地形注记',
  29725. TiandituCia: '天地图影像注记'
  29726. },
  29727. // layer
  29728. dataFlow: {
  29729. dataSubscriptionFailed: '数据订阅失败!'
  29730. },
  29731. animateMarkerlayer: {
  29732. unsupportedData: '当前图层不支持该数据,请重新传入数据!'
  29733. }
  29734. };
  29735. exports.default = _default;
  29736. /***/ }),
  29737. /***/ "9a20":
  29738. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  29739. "use strict";
  29740. __webpack_require__.r(__webpack_exports__);
  29741. /* harmony import */ var _Popup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("15ad");
  29742. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _Popup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _Popup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  29743. /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("b429");
  29744. var render, staticRenderFns
  29745. /* normalize component */
  29746. var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(
  29747. _Popup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"],
  29748. render,
  29749. staticRenderFns,
  29750. false,
  29751. null,
  29752. null,
  29753. null
  29754. )
  29755. /* harmony default export */ __webpack_exports__["default"] = (component.exports);
  29756. /***/ }),
  29757. /***/ "9bd6":
  29758. /***/ (function(module, exports, __webpack_require__) {
  29759. "use strict";
  29760. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  29761. var Buffer = __webpack_require__("54da").Buffer;
  29762. var util = __webpack_require__(2);
  29763. function copyBuffer(src, target, offset) {
  29764. src.copy(target, offset);
  29765. }
  29766. module.exports = function () {
  29767. function BufferList() {
  29768. _classCallCheck(this, BufferList);
  29769. this.head = null;
  29770. this.tail = null;
  29771. this.length = 0;
  29772. }
  29773. BufferList.prototype.push = function push(v) {
  29774. var entry = { data: v, next: null };
  29775. if (this.length > 0) this.tail.next = entry;else this.head = entry;
  29776. this.tail = entry;
  29777. ++this.length;
  29778. };
  29779. BufferList.prototype.unshift = function unshift(v) {
  29780. var entry = { data: v, next: this.head };
  29781. if (this.length === 0) this.tail = entry;
  29782. this.head = entry;
  29783. ++this.length;
  29784. };
  29785. BufferList.prototype.shift = function shift() {
  29786. if (this.length === 0) return;
  29787. var ret = this.head.data;
  29788. if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
  29789. --this.length;
  29790. return ret;
  29791. };
  29792. BufferList.prototype.clear = function clear() {
  29793. this.head = this.tail = null;
  29794. this.length = 0;
  29795. };
  29796. BufferList.prototype.join = function join(s) {
  29797. if (this.length === 0) return '';
  29798. var p = this.head;
  29799. var ret = '' + p.data;
  29800. while (p = p.next) {
  29801. ret += s + p.data;
  29802. }return ret;
  29803. };
  29804. BufferList.prototype.concat = function concat(n) {
  29805. if (this.length === 0) return Buffer.alloc(0);
  29806. if (this.length === 1) return this.head.data;
  29807. var ret = Buffer.allocUnsafe(n >>> 0);
  29808. var p = this.head;
  29809. var i = 0;
  29810. while (p) {
  29811. copyBuffer(p.data, ret, i);
  29812. i += p.data.length;
  29813. p = p.next;
  29814. }
  29815. return ret;
  29816. };
  29817. return BufferList;
  29818. }();
  29819. if (util && util.inspect && util.inspect.custom) {
  29820. module.exports.prototype[util.inspect.custom] = function () {
  29821. var obj = util.inspect({ length: this.length });
  29822. return this.constructor.name + ' ' + obj;
  29823. };
  29824. }
  29825. /***/ }),
  29826. /***/ "9c55":
  29827. /***/ (function(module, exports, __webpack_require__) {
  29828. "use strict";
  29829. var _interopRequireDefault = __webpack_require__("8e6d");
  29830. Object.defineProperty(exports, "__esModule", {
  29831. value: true
  29832. });
  29833. exports.default = void 0;
  29834. var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
  29835. var _lang = __webpack_require__("4e21");
  29836. var RestMapParameter = function RestMapParameter(options) {
  29837. (0, _classCallCheck2.default)(this, RestMapParameter);
  29838. this.type = 'iServer';
  29839. this.url = options.url;
  29840. this.layerName = options.layerName;
  29841. this.attributeFilter = options.attributeFilter || null;
  29842. this.maxFeatures = options.maxFeatures || 20;
  29843. this.name = options.name || (0, _lang.geti18n)().t('commontypes.restMap');
  29844. this.proxy = options.proxy;
  29845. };
  29846. exports.default = RestMapParameter;
  29847. /***/ }),
  29848. /***/ "9c77":
  29849. /***/ (function(module, exports, __webpack_require__) {
  29850. "use strict";
  29851. /* WEBPACK VAR INJECTION */(function(process, global) {// Copyright Joyent, Inc. and other Node contributors.
  29852. //
  29853. // Permission is hereby granted, free of charge, to any person obtaining a
  29854. // copy of this software and associated documentation files (the
  29855. // "Software"), to deal in the Software without restriction, including
  29856. // without limitation the rights to use, copy, modify, merge, publish,
  29857. // distribute, sublicense, and/or sell copies of the Software, and to permit
  29858. // persons to whom the Software is furnished to do so, subject to the
  29859. // following conditions:
  29860. //
  29861. // The above copyright notice and this permission notice shall be included
  29862. // in all copies or substantial portions of the Software.
  29863. //
  29864. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  29865. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  29866. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  29867. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  29868. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  29869. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  29870. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  29871. // A bit simpler than readable streams.
  29872. // Implement an async ._write(chunk, encoding, cb), and it'll handle all
  29873. // the drain event emission and buffering.
  29874. /*<replacement>*/
  29875. var pna = __webpack_require__("3e48");
  29876. /*</replacement>*/
  29877. module.exports = Writable;
  29878. /* <replacement> */
  29879. function WriteReq(chunk, encoding, cb) {
  29880. this.chunk = chunk;
  29881. this.encoding = encoding;
  29882. this.callback = cb;
  29883. this.next = null;
  29884. }
  29885. // It seems a linked list but it is not
  29886. // there will be only 2 of these for each stream
  29887. function CorkedRequest(state) {
  29888. var _this = this;
  29889. this.next = null;
  29890. this.entry = null;
  29891. this.finish = function () {
  29892. onCorkedFinish(_this, state);
  29893. };
  29894. }
  29895. /* </replacement> */
  29896. /*<replacement>*/
  29897. var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
  29898. /*</replacement>*/
  29899. /*<replacement>*/
  29900. var Duplex;
  29901. /*</replacement>*/
  29902. Writable.WritableState = WritableState;
  29903. /*<replacement>*/
  29904. var util = __webpack_require__("9107");
  29905. util.inherits = __webpack_require__("fe04");
  29906. /*</replacement>*/
  29907. /*<replacement>*/
  29908. var internalUtil = {
  29909. deprecate: __webpack_require__("8d32")
  29910. };
  29911. /*</replacement>*/
  29912. /*<replacement>*/
  29913. var Stream = __webpack_require__("5e89");
  29914. /*</replacement>*/
  29915. /*<replacement>*/
  29916. var Buffer = __webpack_require__("54da").Buffer;
  29917. var OurUint8Array = global.Uint8Array || function () {};
  29918. function _uint8ArrayToBuffer(chunk) {
  29919. return Buffer.from(chunk);
  29920. }
  29921. function _isUint8Array(obj) {
  29922. return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
  29923. }
  29924. /*</replacement>*/
  29925. var destroyImpl = __webpack_require__("74c0");
  29926. util.inherits(Writable, Stream);
  29927. function nop() {}
  29928. function WritableState(options, stream) {
  29929. Duplex = Duplex || __webpack_require__("d711");
  29930. options = options || {};
  29931. // Duplex streams are both readable and writable, but share
  29932. // the same options object.
  29933. // However, some cases require setting options to different
  29934. // values for the readable and the writable sides of the duplex stream.
  29935. // These options can be provided separately as readableXXX and writableXXX.
  29936. var isDuplex = stream instanceof Duplex;
  29937. // object stream flag to indicate whether or not this stream
  29938. // contains buffers or objects.
  29939. this.objectMode = !!options.objectMode;
  29940. if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
  29941. // the point at which write() starts returning false
  29942. // Note: 0 is a valid value, means that we always return false if
  29943. // the entire buffer is not flushed immediately on write()
  29944. var hwm = options.highWaterMark;
  29945. var writableHwm = options.writableHighWaterMark;
  29946. var defaultHwm = this.objectMode ? 16 : 16 * 1024;
  29947. if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;
  29948. // cast to ints.
  29949. this.highWaterMark = Math.floor(this.highWaterMark);
  29950. // if _final has been called
  29951. this.finalCalled = false;
  29952. // drain event flag.
  29953. this.needDrain = false;
  29954. // at the start of calling end()
  29955. this.ending = false;
  29956. // when end() has been called, and returned
  29957. this.ended = false;
  29958. // when 'finish' is emitted
  29959. this.finished = false;
  29960. // has it been destroyed
  29961. this.destroyed = false;
  29962. // should we decode strings into buffers before passing to _write?
  29963. // this is here so that some node-core streams can optimize string
  29964. // handling at a lower level.
  29965. var noDecode = options.decodeStrings === false;
  29966. this.decodeStrings = !noDecode;
  29967. // Crypto is kind of old and crusty. Historically, its default string
  29968. // encoding is 'binary' so we have to make this configurable.
  29969. // Everything else in the universe uses 'utf8', though.
  29970. this.defaultEncoding = options.defaultEncoding || 'utf8';
  29971. // not an actual buffer we keep track of, but a measurement
  29972. // of how much we're waiting to get pushed to some underlying
  29973. // socket or file.
  29974. this.length = 0;
  29975. // a flag to see when we're in the middle of a write.
  29976. this.writing = false;
  29977. // when true all writes will be buffered until .uncork() call
  29978. this.corked = 0;
  29979. // a flag to be able to tell if the onwrite cb is called immediately,
  29980. // or on a later tick. We set this to true at first, because any
  29981. // actions that shouldn't happen until "later" should generally also
  29982. // not happen before the first write call.
  29983. this.sync = true;
  29984. // a flag to know if we're processing previously buffered items, which
  29985. // may call the _write() callback in the same tick, so that we don't
  29986. // end up in an overlapped onwrite situation.
  29987. this.bufferProcessing = false;
  29988. // the callback that's passed to _write(chunk,cb)
  29989. this.onwrite = function (er) {
  29990. onwrite(stream, er);
  29991. };
  29992. // the callback that the user supplies to write(chunk,encoding,cb)
  29993. this.writecb = null;
  29994. // the amount that is being written when _write is called.
  29995. this.writelen = 0;
  29996. this.bufferedRequest = null;
  29997. this.lastBufferedRequest = null;
  29998. // number of pending user-supplied write callbacks
  29999. // this must be 0 before 'finish' can be emitted
  30000. this.pendingcb = 0;
  30001. // emit prefinish if the only thing we're waiting for is _write cbs
  30002. // This is relevant for synchronous Transform streams
  30003. this.prefinished = false;
  30004. // True if the error was already emitted and should not be thrown again
  30005. this.errorEmitted = false;
  30006. // count buffered requests
  30007. this.bufferedRequestCount = 0;
  30008. // allocate the first CorkedRequest, there is always
  30009. // one allocated and free to use, and we maintain at most two
  30010. this.corkedRequestsFree = new CorkedRequest(this);
  30011. }
  30012. WritableState.prototype.getBuffer = function getBuffer() {
  30013. var current = this.bufferedRequest;
  30014. var out = [];
  30015. while (current) {
  30016. out.push(current);
  30017. current = current.next;
  30018. }
  30019. return out;
  30020. };
  30021. (function () {
  30022. try {
  30023. Object.defineProperty(WritableState.prototype, 'buffer', {
  30024. get: internalUtil.deprecate(function () {
  30025. return this.getBuffer();
  30026. }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
  30027. });
  30028. } catch (_) {}
  30029. })();
  30030. // Test _writableState for inheritance to account for Duplex streams,
  30031. // whose prototype chain only points to Readable.
  30032. var realHasInstance;
  30033. if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
  30034. realHasInstance = Function.prototype[Symbol.hasInstance];
  30035. Object.defineProperty(Writable, Symbol.hasInstance, {
  30036. value: function (object) {
  30037. if (realHasInstance.call(this, object)) return true;
  30038. if (this !== Writable) return false;
  30039. return object && object._writableState instanceof WritableState;
  30040. }
  30041. });
  30042. } else {
  30043. realHasInstance = function (object) {
  30044. return object instanceof this;
  30045. };
  30046. }
  30047. function Writable(options) {
  30048. Duplex = Duplex || __webpack_require__("d711");
  30049. // Writable ctor is applied to Duplexes, too.
  30050. // `realHasInstance` is necessary because using plain `instanceof`
  30051. // would return false, as no `_writableState` property is attached.
  30052. // Trying to use the custom `instanceof` for Writable here will also break the
  30053. // Node.js LazyTransform implementation, which has a non-trivial getter for
  30054. // `_writableState` that would lead to infinite recursion.
  30055. if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
  30056. return new Writable(options);
  30057. }
  30058. this._writableState = new WritableState(options, this);
  30059. // legacy.
  30060. this.writable = true;
  30061. if (options) {
  30062. if (typeof options.write === 'function') this._write = options.write;
  30063. if (typeof options.writev === 'function') this._writev = options.writev;
  30064. if (typeof options.destroy === 'function') this._destroy = options.destroy;
  30065. if (typeof options.final === 'function') this._final = options.final;
  30066. }
  30067. Stream.call(this);
  30068. }
  30069. // Otherwise people can pipe Writable streams, which is just wrong.
  30070. Writable.prototype.pipe = function () {
  30071. this.emit('error', new Error('Cannot pipe, not readable'));
  30072. };
  30073. function writeAfterEnd(stream, cb) {
  30074. var er = new Error('write after end');
  30075. // TODO: defer error events consistently everywhere, not just the cb
  30076. stream.emit('error', er);
  30077. pna.nextTick(cb, er);
  30078. }
  30079. // Checks that a user-supplied chunk is valid, especially for the particular
  30080. // mode the stream is in. Currently this means that `null` is never accepted
  30081. // and undefined/non-string values are only allowed in object mode.
  30082. function validChunk(stream, state, chunk, cb) {
  30083. var valid = true;
  30084. var er = false;
  30085. if (chunk === null) {
  30086. er = new TypeError('May not write null values to stream');
  30087. } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
  30088. er = new TypeError('Invalid non-string/buffer chunk');
  30089. }
  30090. if (er) {
  30091. stream.emit('error', er);
  30092. pna.nextTick(cb, er);
  30093. valid = false;
  30094. }
  30095. return valid;
  30096. }
  30097. Writable.prototype.write = function (chunk, encoding, cb) {
  30098. var state = this._writableState;
  30099. var ret = false;
  30100. var isBuf = !state.objectMode && _isUint8Array(chunk);
  30101. if (isBuf && !Buffer.isBuffer(chunk)) {
  30102. chunk = _uint8ArrayToBuffer(chunk);
  30103. }
  30104. if (typeof encoding === 'function') {
  30105. cb = encoding;
  30106. encoding = null;
  30107. }
  30108. if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
  30109. if (typeof cb !== 'function') cb = nop;
  30110. if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
  30111. state.pendingcb++;
  30112. ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
  30113. }
  30114. return ret;
  30115. };
  30116. Writable.prototype.cork = function () {
  30117. var state = this._writableState;
  30118. state.corked++;
  30119. };
  30120. Writable.prototype.uncork = function () {
  30121. var state = this._writableState;
  30122. if (state.corked) {
  30123. state.corked--;
  30124. if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
  30125. }
  30126. };
  30127. Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
  30128. // node::ParseEncoding() requires lower case.
  30129. if (typeof encoding === 'string') encoding = encoding.toLowerCase();
  30130. 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);
  30131. this._writableState.defaultEncoding = encoding;
  30132. return this;
  30133. };
  30134. function decodeChunk(state, chunk, encoding) {
  30135. if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
  30136. chunk = Buffer.from(chunk, encoding);
  30137. }
  30138. return chunk;
  30139. }
  30140. Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
  30141. // making it explicit this property is not enumerable
  30142. // because otherwise some prototype manipulation in
  30143. // userland will fail
  30144. enumerable: false,
  30145. get: function () {
  30146. return this._writableState.highWaterMark;
  30147. }
  30148. });
  30149. // if we're already writing something, then just put this
  30150. // in the queue, and wait our turn. Otherwise, call _write
  30151. // If we return false, then we need a drain event, so set that flag.
  30152. function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
  30153. if (!isBuf) {
  30154. var newChunk = decodeChunk(state, chunk, encoding);
  30155. if (chunk !== newChunk) {
  30156. isBuf = true;
  30157. encoding = 'buffer';
  30158. chunk = newChunk;
  30159. }
  30160. }
  30161. var len = state.objectMode ? 1 : chunk.length;
  30162. state.length += len;
  30163. var ret = state.length < state.highWaterMark;
  30164. // we must ensure that previous needDrain will not be reset to false.
  30165. if (!ret) state.needDrain = true;
  30166. if (state.writing || state.corked) {
  30167. var last = state.lastBufferedRequest;
  30168. state.lastBufferedRequest = {
  30169. chunk: chunk,
  30170. encoding: encoding,
  30171. isBuf: isBuf,
  30172. callback: cb,
  30173. next: null
  30174. };
  30175. if (last) {
  30176. last.next = state.lastBufferedRequest;
  30177. } else {
  30178. state.bufferedRequest = state.lastBufferedRequest;
  30179. }
  30180. state.bufferedRequestCount += 1;
  30181. } else {
  30182. doWrite(stream, state, false, len, chunk, encoding, cb);
  30183. }
  30184. return ret;
  30185. }
  30186. function doWrite(stream, state, writev, len, chunk, encoding, cb) {
  30187. state.writelen = len;
  30188. state.writecb = cb;
  30189. state.writing = true;
  30190. state.sync = true;
  30191. if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
  30192. state.sync = false;
  30193. }
  30194. function onwriteError(stream, state, sync, er, cb) {
  30195. --state.pendingcb;
  30196. if (sync) {
  30197. // defer the callback if we are being called synchronously
  30198. // to avoid piling up things on the stack
  30199. pna.nextTick(cb, er);
  30200. // this can emit finish, and it will always happen
  30201. // after error
  30202. pna.nextTick(finishMaybe, stream, state);
  30203. stream._writableState.errorEmitted = true;
  30204. stream.emit('error', er);
  30205. } else {
  30206. // the caller expect this to happen before if
  30207. // it is async
  30208. cb(er);
  30209. stream._writableState.errorEmitted = true;
  30210. stream.emit('error', er);
  30211. // this can emit finish, but finish must
  30212. // always follow error
  30213. finishMaybe(stream, state);
  30214. }
  30215. }
  30216. function onwriteStateUpdate(state) {
  30217. state.writing = false;
  30218. state.writecb = null;
  30219. state.length -= state.writelen;
  30220. state.writelen = 0;
  30221. }
  30222. function onwrite(stream, er) {
  30223. var state = stream._writableState;
  30224. var sync = state.sync;
  30225. var cb = state.writecb;
  30226. onwriteStateUpdate(state);
  30227. if (er) onwriteError(stream, state, sync, er, cb);else {
  30228. // Check if we're actually ready to finish, but don't emit yet
  30229. var finished = needFinish(state);
  30230. if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
  30231. clearBuffer(stream, state);
  30232. }
  30233. if (sync) {
  30234. /*<replacement>*/
  30235. asyncWrite(afterWrite, stream, state, finished, cb);
  30236. /*</replacement>*/
  30237. } else {
  30238. afterWrite(stream, state, finished, cb);
  30239. }
  30240. }
  30241. }
  30242. function afterWrite(stream, state, finished, cb) {
  30243. if (!finished) onwriteDrain(stream, state);
  30244. state.pendingcb--;
  30245. cb();
  30246. finishMaybe(stream, state);
  30247. }
  30248. // Must force callback to be called on nextTick, so that we don't
  30249. // emit 'drain' before the write() consumer gets the 'false' return
  30250. // value, and has a chance to attach a 'drain' listener.
  30251. function onwriteDrain(stream, state) {
  30252. if (state.length === 0 && state.needDrain) {
  30253. state.needDrain = false;
  30254. stream.emit('drain');
  30255. }
  30256. }
  30257. // if there's something in the buffer waiting, then process it
  30258. function clearBuffer(stream, state) {
  30259. state.bufferProcessing = true;
  30260. var entry = state.bufferedRequest;
  30261. if (stream._writev && entry && entry.next) {
  30262. // Fast case, write everything using _writev()
  30263. var l = state.bufferedRequestCount;
  30264. var buffer = new Array(l);
  30265. var holder = state.corkedRequestsFree;
  30266. holder.entry = entry;
  30267. var count = 0;
  30268. var allBuffers = true;
  30269. while (entry) {
  30270. buffer[count] = entry;
  30271. if (!entry.isBuf) allBuffers = false;
  30272. entry = entry.next;
  30273. count += 1;
  30274. }
  30275. buffer.allBuffers = allBuffers;
  30276. doWrite(stream, state, true, state.length, buffer, '', holder.finish);
  30277. // doWrite is almost always async, defer these to save a bit of time
  30278. // as the hot path ends with doWrite
  30279. state.pendingcb++;
  30280. state.lastBufferedRequest = null;
  30281. if (holder.next) {
  30282. state.corkedRequestsFree = holder.next;
  30283. holder.next = null;
  30284. } else {
  30285. state.corkedRequestsFree = new CorkedRequest(state);
  30286. }
  30287. state.bufferedRequestCount = 0;
  30288. } else {
  30289. // Slow case, write chunks one-by-one
  30290. while (entry) {
  30291. var chunk = entry.chunk;
  30292. var encoding = entry.encoding;
  30293. var cb = entry.callback;
  30294. var len = state.objectMode ? 1 : chunk.length;
  30295. doWrite(stream, state, false, len, chunk, encoding, cb);
  30296. entry = entry.next;
  30297. state.bufferedRequestCount--;
  30298. // if we didn't call the onwrite immediately, then
  30299. // it means that we need to wait until it does.
  30300. // also, that means that the chunk and cb are currently
  30301. // being processed, so move the buffer counter past them.
  30302. if (state.writing) {
  30303. break;
  30304. }
  30305. }
  30306. if (entry === null) state.lastBufferedRequest = null;
  30307. }
  30308. state.bufferedRequest = entry;
  30309. state.bufferProcessing = false;
  30310. }
  30311. Writable.prototype._write = function (chunk, encoding, cb) {
  30312. cb(new Error('_write() is not implemented'));
  30313. };
  30314. Writable.prototype._writev = null;
  30315. Writable.prototype.end = function (chunk, encoding, cb) {
  30316. var state = this._writableState;
  30317. if (typeof chunk === 'function') {
  30318. cb = chunk;
  30319. chunk = null;
  30320. encoding = null;
  30321. } else if (typeof encoding === 'function') {
  30322. cb = encoding;
  30323. encoding = null;
  30324. }
  30325. if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);
  30326. // .end() fully uncorks
  30327. if (state.corked) {
  30328. state.corked = 1;
  30329. this.uncork();
  30330. }
  30331. // ignore unnecessary end() calls.
  30332. if (!state.ending && !state.finished) endWritable(this, state, cb);
  30333. };
  30334. function needFinish(state) {
  30335. return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
  30336. }
  30337. function callFinal(stream, state) {
  30338. stream._final(function (err) {
  30339. state.pendingcb--;
  30340. if (err) {
  30341. stream.emit('error', err);
  30342. }
  30343. state.prefinished = true;
  30344. stream.emit('prefinish');
  30345. finishMaybe(stream, state);
  30346. });
  30347. }
  30348. function prefinish(stream, state) {
  30349. if (!state.prefinished && !state.finalCalled) {
  30350. if (typeof stream._final === 'function') {
  30351. state.pendingcb++;
  30352. state.finalCalled = true;
  30353. pna.nextTick(callFinal, stream, state);
  30354. } else {
  30355. state.prefinished = true;
  30356. stream.emit('prefinish');
  30357. }
  30358. }
  30359. }
  30360. function finishMaybe(stream, state) {
  30361. var need = needFinish(state);
  30362. if (need) {
  30363. prefinish(stream, state);
  30364. if (state.pendingcb === 0) {
  30365. state.finished = true;
  30366. stream.emit('finish');
  30367. }
  30368. }
  30369. return need;
  30370. }
  30371. function endWritable(stream, state, cb) {
  30372. state.ending = true;
  30373. finishMaybe(stream, state);
  30374. if (cb) {
  30375. if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);
  30376. }
  30377. state.ended = true;
  30378. stream.writable = false;
  30379. }
  30380. function onCorkedFinish(corkReq, state, err) {
  30381. var entry = corkReq.entry;
  30382. corkReq.entry = null;
  30383. while (entry) {
  30384. var cb = entry.callback;
  30385. state.pendingcb--;
  30386. cb(err);
  30387. entry = entry.next;
  30388. }
  30389. if (state.corkedRequestsFree) {
  30390. state.corkedRequestsFree.next = corkReq;
  30391. } else {
  30392. state.corkedRequestsFree = corkReq;
  30393. }
  30394. }
  30395. Object.defineProperty(Writable.prototype, 'destroyed', {
  30396. get: function () {
  30397. if (this._writableState === undefined) {
  30398. return false;
  30399. }
  30400. return this._writableState.destroyed;
  30401. },
  30402. set: function (value) {
  30403. // we ignore the value if the stream
  30404. // has not been initialized yet
  30405. if (!this._writableState) {
  30406. return;
  30407. }
  30408. // backward compatibility, the user is explicitly
  30409. // managing destroyed
  30410. this._writableState.destroyed = value;
  30411. }
  30412. });
  30413. Writable.prototype.destroy = destroyImpl.destroy;
  30414. Writable.prototype._undestroy = destroyImpl.undestroy;
  30415. Writable.prototype._destroy = function (err, cb) {
  30416. this.end();
  30417. cb(err);
  30418. };
  30419. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("f2ac"), __webpack_require__("698d")))
  30420. /***/ }),
  30421. /***/ "9d60":
  30422. /***/ (function(module, exports, __webpack_require__) {
  30423. "use strict";
  30424. var _interopRequireWildcard = __webpack_require__("16ed");
  30425. var _interopRequireDefault = __webpack_require__("8e6d");
  30426. Object.defineProperty(exports, "__esModule", {
  30427. value: true
  30428. });
  30429. exports.default = void 0;
  30430. var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
  30431. var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
  30432. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
  30433. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
  30434. var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
  30435. var _iServerRestService = _interopRequireWildcard(__webpack_require__("e340"));
  30436. var _util = __webpack_require__("1448");
  30437. var _Events2 = __webpack_require__("e3e2");
  30438. /**
  30439. * @class iPortalDataService
  30440. * @classdesc iPortal 数据请求类。
  30441. * @category BaseTypes Util
  30442. * @param {string} url - iPortal 数据地址。
  30443. * @param {Boolean} [withCredentials=false] - 请求是否携带 cookie。
  30444. * @fires iPortalDataService#getdatasucceeded
  30445. * @fires iPortalDataService#getdatafailed
  30446. * @fires iPortalDataService#featureisempty
  30447. */
  30448. var iPortalDataService =
  30449. /*#__PURE__*/
  30450. function (_Events) {
  30451. (0, _inherits2.default)(iPortalDataService, _Events);
  30452. function iPortalDataService(url, withCredentials) {
  30453. var _this;
  30454. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  30455. (0, _classCallCheck2.default)(this, iPortalDataService);
  30456. _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(iPortalDataService).call(this));
  30457. _this.url = url;
  30458. _this.withCredentials = withCredentials || false;
  30459. _this.epsgCode = options.epsgCode;
  30460. _this.iportalServiceProxyUrl = options.iportalServiceProxyUrl;
  30461. _this.eventTypes = ['getdatasucceeded', 'getdatafailed', 'featureisempty'];
  30462. _this.initSerivce(url);
  30463. return _this;
  30464. }
  30465. (0, _createClass2.default)(iPortalDataService, [{
  30466. key: "initSerivce",
  30467. value: function initSerivce(url) {
  30468. var _this2 = this;
  30469. this.iserverService = new _iServerRestService.default(url, {
  30470. epsgCode: this.epsgCode
  30471. });
  30472. this.iserverService.on({
  30473. getdatasucceeded: function getdatasucceeded(e) {
  30474. /**
  30475. * @event iPortalDataService#getdatasucceeded
  30476. * @description 请求数据成功后触发。
  30477. * @property {Object} e - 事件对象。
  30478. */
  30479. _this2.triggerEvent('getdatasucceeded', e);
  30480. },
  30481. getdatafailed: function getdatafailed(e) {
  30482. /**
  30483. * @event iPortalDataService#getdatafailed
  30484. * @description 请求数据失败后触发。
  30485. * @property {Object} e - 事件对象。
  30486. */
  30487. _this2.triggerEvent('getdatafailed', e);
  30488. },
  30489. featureisempty: function featureisempty(e) {
  30490. /**
  30491. * @event iPortalDataService#featureisempty
  30492. * @description 请求数据为空后触发。
  30493. * @property {Object} e - 事件对象。
  30494. */
  30495. _this2.triggerEvent('featureisempty', e);
  30496. }
  30497. });
  30498. }
  30499. /**
  30500. * @function iPortalDataService.prototype.getData
  30501. * @description 请求数据。
  30502. * @param {Object} queryInfo - 可选参数。
  30503. * @param {Object} [queryInfo.maxFeatures] - 最多可返回的要素数量。
  30504. * @param {Object} [queryInfo.attributeFilter] - 属性过滤条件。
  30505. * @param {Object} [queryInfo.keyWord] - 筛选关键字。
  30506. */
  30507. }, {
  30508. key: "getData",
  30509. value: function getData(queryInfo) {
  30510. var _this3 = this;
  30511. var preferContent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  30512. if (!this.url) {
  30513. return;
  30514. }
  30515. var datasetUrl = this.url;
  30516. if (preferContent) {
  30517. this._getDatafromContent(datasetUrl, queryInfo);
  30518. return;
  30519. }
  30520. SuperMap.FetchRequest.get(datasetUrl, null, {
  30521. withCredentials: this.withCredentials
  30522. }).then(function (response) {
  30523. return response.json();
  30524. }).then(function (data) {
  30525. if (data.succeed === false) {
  30526. // 请求失败
  30527. _this3.triggerEvent('getdatafailed', {
  30528. data: data
  30529. });
  30530. return;
  30531. } // 是否有rest服务
  30532. if (data.dataItemServices && data.dataItemServices.length > 0) {
  30533. var dataItemServices = data.dataItemServices;
  30534. var resultData = dataItemServices.find(function (item) {
  30535. return (item.serviceType === 'RESTDATA' || item.serviceType === 'RESTMAP') && item.serviceStatus === 'PUBLISHED';
  30536. }); // 有rest服务并且address不为空(online的address服务为'')
  30537. if (resultData && resultData.address) {
  30538. // 如果有服务,获取数据源和数据集, 然后请求rest服务
  30539. _this3._getDatafromRest(resultData.serviceType, resultData.address, queryInfo);
  30540. } else {
  30541. _this3._getDatafromContent(datasetUrl, queryInfo);
  30542. }
  30543. } else {
  30544. _this3._getDatafromContent(datasetUrl, queryInfo);
  30545. }
  30546. }).catch(function (error) {
  30547. console.log(error);
  30548. _this3.triggerEvent('getdatafailed', {
  30549. error: error
  30550. });
  30551. });
  30552. }
  30553. }, {
  30554. key: "_getDatafromRest",
  30555. value: function _getDatafromRest(serviceType, address, queryInfo) {
  30556. var _this4 = this;
  30557. if (serviceType === 'RESTDATA') {
  30558. var url = "".concat(address, "/data/datasources");
  30559. var dataSourceName;
  30560. var datasetName; // 请求获取数据源名
  30561. SuperMap.FetchRequest.get(url, null, {
  30562. withCredentials: (0, _util.handleWithCredentials)(url, this.iportalServiceProxyUrl, this.withCredentials)
  30563. }).then(function (response) {
  30564. return response.json();
  30565. }).then(function (data) {
  30566. dataSourceName = data.datasourceNames[0];
  30567. url = "".concat(address, "/data/datasources/").concat(dataSourceName, "/datasets"); // 请求获取数据集名
  30568. SuperMap.FetchRequest.get(url, null, {
  30569. withCredentials: (0, _util.handleWithCredentials)(url, _this4.iportalServiceProxyUrl, _this4.withCredentials)
  30570. }).then(function (response) {
  30571. return response.json();
  30572. }).then(function (data) {
  30573. datasetName = data.datasetNames[0]; // 请求restdata服务
  30574. _this4.iserverService.getDataFeatures({
  30575. datasetName: datasetName,
  30576. dataSourceName: dataSourceName,
  30577. dataUrl: url.split('/datasources')[0]
  30578. }, Object.assign({}, queryInfo, {
  30579. withCredentials: (0, _util.handleWithCredentials)(url, _this4.iportalServiceProxyUrl, _this4.withCredentials)
  30580. }));
  30581. }).catch(function (error) {
  30582. console.log(error);
  30583. _this4.triggerEvent('getdatafailed', {
  30584. error: error
  30585. });
  30586. });
  30587. });
  30588. } else {
  30589. // 如果是地图服务
  30590. var _url = "".concat(address, "/maps");
  30591. var mapName;
  30592. var layerName;
  30593. var path; // 请求获取地图名
  30594. SuperMap.FetchRequest.get(_url, null, {
  30595. withCredentials: (0, _util.handleWithCredentials)(_url, this.iportalServiceProxyUrl, this.withCredentials)
  30596. }).then(function (response) {
  30597. return response.json();
  30598. }).then(function (data) {
  30599. mapName = data[0].name;
  30600. path = data[0].path;
  30601. _url = _url = "".concat(address, "/maps/").concat(mapName, "/layers"); // 请求获取图层名
  30602. SuperMap.FetchRequest.get(_url, null, {
  30603. withCredentials: (0, _util.handleWithCredentials)(_url, _this4.iportalServiceProxyUrl, _this4.withCredentials)
  30604. }).then(function (response) {
  30605. return response.json();
  30606. }).then(function (data) {
  30607. layerName = data[0].subLayers.layers[0].caption; // 请求restmap服务
  30608. _this4.iserverService.getMapFeatures({
  30609. mapName: layerName,
  30610. dataUrl: path
  30611. }, Object.assign({}, queryInfo, {
  30612. withCredentials: (0, _util.handleWithCredentials)(_url, _this4.iportalServiceProxyUrl, _this4.withCredentials)
  30613. }));
  30614. return layerName;
  30615. }).catch(function (error) {
  30616. console.log(error);
  30617. _this4.triggerEvent('getdatafailed', {
  30618. error: error
  30619. });
  30620. });
  30621. }).catch(function (error) {
  30622. console.log(error);
  30623. _this4.triggerEvent('getdatafailed', {
  30624. error: error
  30625. });
  30626. });
  30627. }
  30628. }
  30629. }, {
  30630. key: "_getDatafromContent",
  30631. value: function _getDatafromContent(datasetUrl, queryInfo) {
  30632. var _this5 = this;
  30633. var result = {};
  30634. datasetUrl += '/content.json?pageSize=9999999&currentPage=1'; // 获取图层数据
  30635. SuperMap.FetchRequest.get(datasetUrl, null, {
  30636. withCredentials: this.withCredentials
  30637. }).then(function (response) {
  30638. return response.json();
  30639. }).then(function (data) {
  30640. if (data.succeed === false) {
  30641. // 请求失败
  30642. _this5.triggerEvent('getdatafailed', {
  30643. data: data
  30644. });
  30645. return;
  30646. }
  30647. if (data.type) {
  30648. var features;
  30649. var type = 'FeatureCollection';
  30650. if (data.type === 'JSON' || data.type === 'GEOJSON') {
  30651. data.content = JSON.parse(data.content.trim()); // 如果是json文件 data.content = {type:'fco', features},格式不固定
  30652. if (!data.content.features) {
  30653. features = _this5._json2Feature(data.content, queryInfo);
  30654. }
  30655. features = _this5._formatGeoJSON(features || data.content, queryInfo);
  30656. type = data.content.type;
  30657. } else if (data.type === 'EXCEL' || data.type === 'CSV') {
  30658. features = _this5._excelData2Feature(data.content, queryInfo);
  30659. }
  30660. features = _this5._transformContentFeatures(features);
  30661. result.features = {
  30662. type: type,
  30663. features: features
  30664. };
  30665. _this5.vertified && (result.vertified = _this5.vertified);
  30666. _this5.iserverService._getFeaturesSucceed({
  30667. result: result
  30668. });
  30669. }
  30670. }).catch(function (error) {
  30671. console.log(error);
  30672. _this5.triggerEvent('getdatafailed', {
  30673. error: error
  30674. });
  30675. });
  30676. }
  30677. }, {
  30678. key: "_formatGeoJSON",
  30679. value: function _formatGeoJSON(data, queryInfo) {
  30680. var features = data.features;
  30681. if (queryInfo && queryInfo.maxFeatures > 0) {
  30682. features = features.slice(0, queryInfo.maxFeatures);
  30683. }
  30684. features.forEach(function (row, index) {
  30685. row.properties['index'] = index;
  30686. });
  30687. return features;
  30688. }
  30689. }, {
  30690. key: "_excelData2Feature",
  30691. value: function _excelData2Feature(dataContent, queryInfo) {
  30692. var fieldCaptions = dataContent.colTitles; // 位置属性处理
  30693. var xfieldIndex = -1;
  30694. var yfieldIndex = -1;
  30695. for (var i = 0, _len = fieldCaptions.length; i < _len; i++) {
  30696. if ((0, _util.isXField)(fieldCaptions[i])) {
  30697. xfieldIndex = i;
  30698. }
  30699. if ((0, _util.isYField)(fieldCaptions[i])) {
  30700. yfieldIndex = i;
  30701. }
  30702. } // feature 构建后期支持坐标系 4326/3857
  30703. var features = [];
  30704. var len = dataContent.rows.length;
  30705. if (queryInfo && queryInfo.maxFeatures > 0 && len > queryInfo.maxFeatures) {
  30706. len = queryInfo.maxFeatures;
  30707. }
  30708. for (var _i = 0; _i < len; _i++) {
  30709. var row = dataContent.rows[_i];
  30710. var x = xfieldIndex !== -1 && Number(row[xfieldIndex]);
  30711. var y = yfieldIndex !== -1 && Number(row[yfieldIndex]); // 属性信息
  30712. var attributes = {};
  30713. for (var index in dataContent.colTitles) {
  30714. var key = dataContent.colTitles[index];
  30715. attributes[key] = dataContent.rows[_i][index];
  30716. }
  30717. var feature = {
  30718. type: 'Feature',
  30719. properties: attributes
  30720. };
  30721. if (x && y) {
  30722. attributes['index'] = _i + '';
  30723. feature.geometry = {
  30724. type: 'Point',
  30725. coordinates: [x, y]
  30726. };
  30727. } // 目前csv 只支持处理点,所以先生成点类型的 geojson
  30728. features.push(feature);
  30729. }
  30730. return features;
  30731. }
  30732. }, {
  30733. key: "_json2Feature",
  30734. value: function _json2Feature(dataContent) {
  30735. var content = typeof dataContent === 'string' ? JSON.parse(dataContent) : dataContent;
  30736. var features = [];
  30737. if (content instanceof Array) {
  30738. content.map(function (val) {
  30739. if (val.hasOwnProperty('geometry')) {
  30740. features.push({
  30741. properties: val.properties || val,
  30742. geometry: val.geometry
  30743. });
  30744. } else {
  30745. features.push({
  30746. properties: val
  30747. });
  30748. }
  30749. });
  30750. } else if (content) {
  30751. features = [{
  30752. properties: content
  30753. }];
  30754. }
  30755. return {
  30756. features: features
  30757. };
  30758. } // 转坐标系
  30759. }, {
  30760. key: "_transformContentFeatures",
  30761. value: function _transformContentFeatures(features) {
  30762. var transformedFeatures = features;
  30763. if (features && !!features.length) {
  30764. var epsgCode = (0, _iServerRestService.vertifyEpsgCode)(features[0]);
  30765. transformedFeatures = (0, _iServerRestService.transformFeatures)(epsgCode, features);
  30766. this.vertified = true;
  30767. }
  30768. return transformedFeatures;
  30769. }
  30770. }]);
  30771. return iPortalDataService;
  30772. }(_Events2.Events);
  30773. exports.default = iPortalDataService;
  30774. /***/ }),
  30775. /***/ "9dde":
  30776. /***/ (function(module, exports, __webpack_require__) {
  30777. "use strict";
  30778. Object.defineProperty(exports, "__esModule", {
  30779. value: true
  30780. });
  30781. exports.statisticsFeatures = statisticsFeatures;
  30782. function statisticsFeatures(features, fields, fieldCaptions, fieldTypes) {
  30783. var data = {
  30784. features: features,
  30785. fields: fields || [],
  30786. fieldCaptions: fieldCaptions || [],
  30787. fieldValues: [],
  30788. fieldTypes: fieldTypes
  30789. };
  30790. if (features && !!features.length && !fieldCaptions && !fields) {
  30791. var properties = Object.assign({}, features[0].properties, features[features.length - 1].properties); // 获取每个字段的名字和类型
  30792. for (var attr in properties) {
  30793. data.fieldCaptions.push(attr);
  30794. data.fields.push(attr);
  30795. }
  30796. }
  30797. for (var m in data.fields) {
  30798. var fieldValue = [];
  30799. for (var j in features) {
  30800. var feature = features[j];
  30801. var field = data.fields[m];
  30802. var value = feature.properties[field];
  30803. fieldValue.push(value);
  30804. } // fieldValues [[每个字段的所有要素值],[],[]]
  30805. data.fieldValues.push(fieldValue);
  30806. }
  30807. return data;
  30808. }
  30809. /***/ }),
  30810. /***/ "a00e":
  30811. /***/ (function(module, exports) {
  30812. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhYAAAD+CAYAAABmz0wVAAAABGdBTUEAALGPC/xhBQAAFVhJREFUeAHt3VdzG0cWBlBx7V3nnHM5r+Pu0z77p+9PWEfZco4KDrItOQfuvTZAkyAlEdMTu89UtUiAmJ7u06jSV3dmgJ3d3d2nThze/nP4Kc8QIECAAAECDQl80mWuV+dOOzs7p/bvHGHj/v2P/U6AAAECBAg0JfBg19n+ESwutXMEjv9e6m+eJ0CAAAECBOoTiOLCTszqyc2iw5VmGvu9lK/525Ve6O8ECBAgQIAAgeMKCBbHlfI6AgQIECDQhkBWLHa7TlWw6CpnPwIECBAgQOCQgGBxiMQTBAgQIECAQFcBwaKrnP0IECBAgACBQwKCxSESTxAgQIAAAQJdBS57u2nXTqfY7xIf9DXFUByTAAECBAjMQmDbW0b7GLSKRR+K+iBAgAABAvUIuCuknrU0EwIECBAgsGwBFYtlr5/REyBAgACBWQkIFrNaDoMhQIAAAQLLFhAslr1+Rk+AAAECBGYlUM1dIVNc+TqrlTQYAgQIECDQj4CLN/tx1AsBAgQIECBQKuBUSKmg/QkQIECAAIE9AcFij8IvBAgQIECAQKnAoNdY+DTM0uWxPwECBAgQ6C4wxfWHKhbd18ueBAgQIECgRoGiizcHrVhMkZRqXGFzIkCAAAECSxFQsVjKShknAQIECBBYgIBgsYBFMkQCBAgQILAUAcFiKStlnAQIECBAYAECgsUCFskQCRAgQIDAiAJFF28KFiOulEMRIECAAIHaBQSL2lfY/AgQIECAwIgCgsWI2A5FgAABAgRqFxAsal9h8yNAgAABAiMKCBYjYjsUAQIECBBYgICLNxewSIZIgAABAgSaEFCxaGKZTZIAAQIECIwjIFiM4+woBAgQIECgCQHBoollNkkCBAgQIDCOgGAxjrOjECBAgACBpQi4eHMpK2WcBAgQIECgdgEVi9pX2PwIECBAgMCIAoLFiNgORYAAAQIEahcQLGpfYfMjQIAAAQIjCggWI2I7FAECBAgQWICAizcXsEiGSIAAAQIEmhBQsWhimU2SAAECBAiMIyBYjOPsKAQIECBAoAkBwaKJZTZJAgQIECAwjoBgMY6zoxAgQIAAgaUIuHhzKStlnAQIECBAoHYBFYvaV9j8CBAgQIDAiAKCxYjYDkWAAAECBGoXECxqX2HzI0CAAAECIwoIFiNiOxQBAgQIEKhdQLCofYXNjwABAgQIbCfgrpDtvLyaAAECBAgQGEpAxWIoWf0SIECAAIEGBQSLBhfdlAkQIECAwFACgsVQsvolQIAAAQLLFHCNxTLXzagJECBAgEB9AioW9a2pGREgQIAAgckEBIvJ6B2YAAECBAjUJyBY1LemZkSAAAECBCYTECwmo3dgAgQIECBQn4BgUd+amhEBAgQIECgRcFdIiZ59CRAgQIAAgf4EVCz6s9QTAQIECBBoXkCwaP4tAIAAAQIECPQnIFj0Z6knAgQIECDQvIBg0fxbAAABAgQIEDgg4OLNAxweECBAgAABApMJqFhMRu/ABAgQIECgPgHBor41NSMCBAgQIDCZgGAxGb0DEyBAgACB+gQEi/rW1IwIECBAgECJgIs3S/TsS4AAAQIECPQnoGLRn6WeCBAgQIBA8wKCRfNvAQAECBAgQKA/AcGiP0s9ESBAgACB5gUEi+bfAgAIECBAgMABARdvHuDwgAABAgQIEJhMQMViMnoHJkCAAAEC9QkIFvWtqRkRIECAAIHJBASLyegdmAABAgQI1CcgWNS3pmZEgAABAgRKBFy8WaJnXwIECBAgQKA/ARWL/iz1RIAAAQIEmhcQLJp/CwAgQIAAAQL9CQgW/VnqiQABAgQINC8gWDT/FgBAgAABAgT6ExAs+rPUEwECBAgQqEHAXSE1rKI5ECBAgACBGgRULGpYRXMgQIAAAQIzERAsZrIQhkGAAAECBGoQECxqWEVzIECAAAEC/Qm4xqI/Sz0RIECAAAECJQIqFiV69iVAgAABAgQOCAgWBzg8IECAAAECBEoEBIsSPfsSIECAAAECBwQEiwMcHhAgQIAAgeYFXLzZ/FsAAAECBAgQmImAisVMFsIwCBAgQIBADQKCRQ2raA4ECBAgQGAmAoLFTBbCMAgQIECAQA0CgkUNq2gOBAgQIEBgJgKCxUwWwjAIECBAgMBMBNwVMpOFMAwCBAgQINC8gIpF828BAAQIECBAoD8BwaI/Sz0RIECAAIHmBQSL5t8CAAgQIECAwAEB11gc4PCAAAECBAgQmExAxWIyegcmQIAAAQL1CQgW9a2pGREgQIAAgckEBIvJ6B2YAAECBAjUJyBY1LemZkSAAAECBCYTECwmo3dgAgQIECAwSwF3hcxyWQyKAAECBAg0KKBi0eCimzIBAgQIEBhKQLAYSla/BAgQIECgQQHBosFFN2UCBAgQIDCUgGAxlKx+CRAgQIDAMgVcvLnMdTNqAgQIECBQn4CKRX1rakYECBAgQGAyAcFiMnoHJkCAAAEC9QkIFvWtqRkRIECAAIHJBASLyegdmAABAgQIzFLAxZuzXBaDIkCAAAECDQqoWDS46KZMgAABAgSGEhAshpLVLwECBAgQaFBAsGhw0U2ZAAECBAgMJSBYDCWrXwIECBAgsEwBF28uc92MmgABAgQI1CegYlHfmpoRAQIECBCYTECwmIzegQkQIECAQH0CgkV9a2pGBAgQIEBgMgHBYjJ6ByZAgAABArMUcPHmLJfFoAgQIECAQIMCKhYNLropEyBAgACBoQQEi6Fk9UuAAAECBBoUECwaXHRTJkCAAAECQwkIFkPJ6pcAAQIECDQoIFg0uOimTIAAAQIELiPgrpDL4PgTAQIECBAgMKKAisWI2A5FgAABAgRqFxAsal9h8yNAgAABAiMKCBYjYjsUAQIECBBYgIBrLBawSIZIgAABAgSaEFCxaGKZTZIAAQIECIwjIFiM4+woBAgQIECgCQHBoollNkkCBAgQIDCOgGAxjrOjECBAgACBJgQEiyaW2SQJECBAgMCxBdwVcmwqLyRAgAABAgQGFVCxGJRX5wQIECBAoC0BwaKt9TZbAgQIECAwqIBgMSivzgkQIECAQFsCgkVb6222BAgQIEDgSgIu3rySkL8TIECAAAEC4wioWIzj7CgECBAgQKAJAcGiiWU2SQIECBAgMI6AYDGOs6MQIECAAIEmBASLJpbZJAkQIECAwLEFXLx5bCovJECAAAECBAYVULEYlFfnBAgQIECgfoHd3d1H17MULNYSfhIgQIAAAQJbC6xCxSOrHU9evXUPdiBAgAABAgQIhECEisfix8P5a7STOzs75wSLkLARIECAAAECewLHungzQsXjscdD0fZCRfYgWKSCjQABAgQIEDi2wEaoeCMqFZ+vdxYs1hJ+EiBAgAABAlcUiFDxRLzowWhZqXg9QsUX+3cSLPZr+J0AAQIECBC4pECEiifjjw9EOzJU5I6CRSrYCBAgQIAAgcsKbISK16JS8eVROwgWR6l4jgABAgQItCtw4OLNCBT5OCsV90fLSsUlQ0X8TcUiEWwECBAgQIDAYYGNUPF7vCJDxVeHX/nXMyoWf1n4jQABAgQIEFgJrELFU/HwvmjHChW5q2CRCjYCBAgQIEBgU+DpeOLeaBkqXo1KxfnNFxz1WLA4SsVzBAgQIECgbYEMFXdG2ypUJJlgkQo2AgQIECBAID+iOy/UfCLar6v2SlQqvt6GxpeQbaPltQQIECBAoFKBVah4Jqa3rlRsHSqSRrCo9A1iWgQIECBA4LgC+0LF3bHPb9E6hYo8nlMhqWAjQIAAAQKNCkSoyCJDViruipah4s1o30brtKlYdGKzEwECBAgQWL7AEaHi5ZjVxZKZCRYlevYlQIAAAQILFViFimdj+FmpyIs1X44LNbNSceCTN+PxVptgsRWXFxMgQIAAgeUL7AsVeaFmhoq8pqLz6Y/9Iq6x2K/hdwIECBAgULnAKlQ8F9O8I9q6UnGhr2mrWPQlqR8CBAgQIDBzgaFDRU5fxWLmbwLDI0CAAAECfQisQsXz0dft0X6JltdUFF2oedS4BIujVDxHgAABAgQqEohQcVVMJ0PFbdGuFCqKLt4ULCp645gKAQIECBDYFDgiVPwvKhXfbb6ur8eCRV+S+iFAgAABAjMTWIWKF2JYt0bLSsWgoSKnL1ikgo0AAQIECFQmsBEqfo7p5TUVg1Uq1nyCxVrCTwIECBAgUInAKlS8GNO5JVqGiqxUfD/G9ASLMZQdgwABAgQIjCQQoSL/b8/TH6OHipyiYJEKNgIECBAgUIHAKlRkpeLmaD9Fy0rFD1tOreiuEB+QtaW2lxMgQIAAgTkK9BQqiqcmWBQT6oAAAQIECEwrMJdQkQpOhUz7XnB0AgQIECBQJLAKFf+KTm6K9mO0PP2RPyfZBItJ2B2UAAECBAiUC0So+Hv0ktdU9BoqIpjsdh2dYNFVzn4ECBAgQGBCgVWoyErFjdHyAs38nIqiSkX0mV+jnrendt4Ei850diRAgAABAtMIHBEq8vRH3gXSeYs+74qdr4/2cedOYkfBokTPvgQIECBAYGSBCAD/iENmpeKGaFmp6DNUfBIB5bfos/MmWHSmsyMBAgQIEBhXYCNU5Cdp5umP0krF3dHPddGKQ0VqCBapYCNAgAABAjMXOCJUZKWi6HqI6DNDxbXRegkVSShYpIKNAAECBAjMWGAVKv4dQ8xrILJS0UeouCf6uSbap6WnP6KPvU2w2KPwCwECBAgQmJ9AhIr8zz+vqchQkd9Omqc/SisV90Y/eatqVip+j5+9bYJFb5Q6IkCAAAEC/QqsQkVWKvIaiOJQEf3l94BkpSJDRVYqeg0V0adTIYlgI0CAAAECcxPYCBUXY3xZqfil6zhXoSIrFVlUGCRU5NhULFLBRoAAAQIEZiQQISAvqMzTH1mp6DNUXBX9DRYqom/BIhFsBAgQIEBgLgKrUJGnPzJcXIj2Sg+VivuinzwN8tkQpz+i371NxWKPwi8ECBAgQGBagRFCRefvADmujGBxXCmvI0CAAAECAwpEqMjTHlmpyLtAslKR11T8Gj87bdFfVijuj5ZhIisVg4eKHKhgkQo2AgQIECAwocBGqPg2hpKnP/oKFafHChVJKFhM+EZyaAIECBAgMECo+FuoZqUiv/PjzJihIldTsEgFGwECBAgQmEAgQkV+6FWe/sgvFvsm2quFlYoMFQ9Ey2rH6KEijilYJIKNAAECBAiMLXBEqMjTH52/WTT6W4eK/KyLs2NXKtZ+KhZrCT8JECBAgMBIAhEC8ivP83MqslLxdbSsVCw+VMQ8TmS6sREgQIAAAQIjCQwUKh6M4ef3h0xWqVjzqVisJfwkQIAAAQIDC6xCRV5Tkd/VcT7aa4WVivwkzbym4qdo56Y6/RHH3tsEiz0KvxAgQIAAgeEEIlTcGL3n6Y8+Q0VWKn6IQHFuuJFv17NgsZ2XVxMgQIAAga0FNkLFV9FBVio6f7No9JeVigwV30c/n289oAF3ECwGxNU1AQIECBCIEHBTKGSlIv/PrTpU5GoLFqlgI0CAAAECAwhshIov4xCvF1Yq8v/trFRcjH6+GGDIxV0KFsWEOiBAgAABAocFNkJFhoA3egoVF6KfDCmz3NxuOstlMSgCBAgQWLJAhIqbY/zr0x99hYqHos9Zh4pcMxWLVLARIECAAIGeBPaFirzAMi+sPFlYqci7SPL0xzfRT16jMetNsJj18hgcAQIECCxJIELFLTHeF6P1HSq+jlBxfgkWgsUSVskYCRAgQGD2AhuhIj9XIisVu10HHv1lpSJPf5xfSqjIuQoWqWAjQIAAAQIFAhECbo3dX4iWlYo+QkV+h0ie/vgqQkV+l8hiNsFiMUtloAQIECAwR4FVqMjTH3lDxNlobxZWKhYbKnJ9BItUsBEgQIAAgQ4CESpui92yUpGh4ky0t3oKFV9GP99Ef4vbBIvFLZkBEyBAgMAcBAYIFdfEvPL0x+cRKr6dwxy7jEGw6KJmHwIECBBoWiBCxe0B8Hy0rFScjnaqsFJRRagIB6dCEsFGgAABAgSOKzBAqLg2jp1ffZ5fe37huOOY6+tULOa6MsZFgAABArMTiFBxRwwqKxU70T6L9nZhpaKqUBEew1YsYgGeyoPYCBAgQIBAXwLxH/mpvvrapp+NUPFpjOPtbfbffG30tw4VZ6Ovi5t/X+pjFYulrpxxEyBAgMBoAhEC7oyDPRctKxV9hIrrop/7o1UVKmI+w1YspkqVOTEbAQIECBDoQ2AjVHwS/7e9U9Jv9LcOFWeir+9K+prjvioWc1wVYyJAgACBWQhECLgrBvJstKxUfBxB4N2SgUV/18f+90WrMlSkjWCRCjYCBAgQILAhMGCoOB0B5fuNw1XzULCoZilNhAABAgT6EohQcXf09Uy0rFR8FEHgvZK+o78bYv97o1UdKtJo0GARkO4KSWUbAQIECPQmEP/JD3pXSPzfdU8MNkNFbh/G8d7/89du/+4LFZ9FXz9062U5ew0aLJbDYKQECBAgQODEiQFCxY3hmkGliVCR7yHBIhVsBAgQINC8QISKPFXxzxXEB1Fd+KAEJfpbh4q8PfXHkr6WtK9gsaTVMlYCBAgQGERgI1S8H0Hgw5IDRX83xf55nUZToSLNBItUsBEgQIBAswIRAvL2z6dXAEJF4TtBsCgEtDsBAgQILFcgQkV++uX6RoP3olLxUclsor+bY//87Iv8IK2fSvpa6r6DBotAHfTK3aWiGzcBAgQITC+wESrejf+zPi4ZlVDxp96gwaJkgexLgAABAgSGEogQkF9T/uSq/z5CxS3RV37zaX4658+rfpv8IVg0uewmTYAAgXYFNkLFOxEEPinRiP7WoSJPfzQdKtJRsCh5N9mXAAECBBYlECHgwRjwE6tBvx1B4NOSCUR/t8b+t0cTKlaQgkXJO8q+BAgQILAYgQgBD8VgH18NuI9QcVv0lS1Pf/yy6rf5H4JF828BAAQIEKhfYCNUnIog8FnJrKO/DBRZrRAqNiAFiw0QDwkQIECgLoEIAQ/HjB5bzeqtCBWnS2YY/eWpj7yuIk9/qFRsYAoWGyAeEiBAgEA9AhECHonZPLqaUR+hIu/8yM+qyErFr6t+/dgnIFjsw/ArAQIECNQjsBEq3owgcKZkdtFfhor8qG6h4jKQfwSLwFp/6tj6pXnVbH7L2+bz67/7SYAAAQIE5iyQn1ORLbf3ot0c/6dlpaFky1tJ8/SHSsVlFHeO+lvgv3TU854jQIAAAQILEzgZQeDswsa86OE6FbLo5TN4AgQIELiEwG48n6Hi3CX+7umBBP4PbSiG3RVuKeMAAAAASUVORK5CYII="
  30813. /***/ }),
  30814. /***/ "a142":
  30815. /***/ (function(module, exports, __webpack_require__) {
  30816. "use strict";
  30817. var _interopRequireDefault = __webpack_require__("8e6d");
  30818. Object.defineProperty(exports, "__esModule", {
  30819. value: true
  30820. });
  30821. exports.default = void 0;
  30822. var _theme = _interopRequireDefault(__webpack_require__("9259"));
  30823. var _timer = _interopRequireDefault(__webpack_require__("8156"));
  30824. var _RestService = _interopRequireDefault(__webpack_require__("5bf3"));
  30825. var _CountTo = _interopRequireDefault(__webpack_require__("4156"));
  30826. //
  30827. //
  30828. //
  30829. //
  30830. //
  30831. //
  30832. //
  30833. //
  30834. //
  30835. //
  30836. //
  30837. //
  30838. //
  30839. //
  30840. //
  30841. //
  30842. //
  30843. //
  30844. //
  30845. //
  30846. //
  30847. //
  30848. //
  30849. //
  30850. //
  30851. //
  30852. //
  30853. //
  30854. //
  30855. //
  30856. //
  30857. //
  30858. //
  30859. //
  30860. var _default2 = {
  30861. name: 'SmIndicator',
  30862. components: {
  30863. countTo: _CountTo.default
  30864. },
  30865. mixins: [_theme.default, _timer.default],
  30866. props: {
  30867. title: {
  30868. type: String,
  30869. default: function _default() {
  30870. return this.$t('indicator.title');
  30871. }
  30872. },
  30873. unit: {
  30874. type: String,
  30875. default: function _default() {
  30876. return this.$t('indicator.unit');
  30877. }
  30878. },
  30879. indicatorColor: {
  30880. type: String
  30881. },
  30882. // title/unit
  30883. textFontSize: {
  30884. type: [String, Number]
  30885. },
  30886. fontSize: {
  30887. type: [String, Number]
  30888. },
  30889. fontWeight: {
  30890. type: [String, Number],
  30891. default: 'border'
  30892. },
  30893. num: {
  30894. type: [Number, String],
  30895. default: 0
  30896. },
  30897. url: {
  30898. type: String
  30899. },
  30900. proxy: {
  30901. type: String
  30902. },
  30903. animated: {
  30904. type: Boolean,
  30905. default: false
  30906. },
  30907. duration: {
  30908. type: [Number, String],
  30909. default: 1000
  30910. },
  30911. decimals: {
  30912. type: Number,
  30913. default: -1
  30914. },
  30915. mode: {
  30916. type: String,
  30917. default: 'vertical',
  30918. validator: function validator(val) {
  30919. return ['vertical', 'horizontal'];
  30920. }
  30921. },
  30922. separator: {
  30923. type: String,
  30924. default: ','
  30925. },
  30926. numSpacing: {
  30927. type: Number,
  30928. default: 0
  30929. },
  30930. numBackground: {
  30931. type: Object,
  30932. default: function _default() {
  30933. return {
  30934. color: 'rgba(0, 0, 0, 0)',
  30935. image: '',
  30936. padding: 0
  30937. };
  30938. }
  30939. },
  30940. separatorBackground: {
  30941. type: Boolean,
  30942. default: false
  30943. },
  30944. showTitleUnit: {
  30945. type: Boolean,
  30946. default: true
  30947. },
  30948. titleField: String,
  30949. numField: String,
  30950. unitField: String,
  30951. thresholdsStyle: Array
  30952. },
  30953. data: function data() {
  30954. return {
  30955. indicatorColorData: '',
  30956. titleData: this.title,
  30957. unitData: this.unit,
  30958. numData: 0,
  30959. startData: 0,
  30960. indicatorNum: 0
  30961. };
  30962. },
  30963. computed: {
  30964. unit_titleStyle: function unit_titleStyle() {
  30965. return {
  30966. fontSize: this.textFontSize || parseFloat(this.fontSize) * 0.66 + this.fontUnit,
  30967. fontWeight: this.fontWeight
  30968. };
  30969. },
  30970. fontUnit: function fontUnit() {
  30971. var reg = /\d+(\.\d+)?([a-z]+)/gi;
  30972. var fontUnit = this.fontSize ? this.fontSize.replace(reg, '$2') : '';
  30973. return fontUnit;
  30974. },
  30975. indicatorStyle: function indicatorStyle() {
  30976. var _this = this;
  30977. var color = this.indicatorColorData;
  30978. if (!isNaN(this.indicatorNum) && this.thresholdsStyle) {
  30979. var matchStyle = this.thresholdsStyle.find(function (item) {
  30980. var status;
  30981. if (item.min) {
  30982. status = +_this.indicatorNum >= +item.min;
  30983. }
  30984. if (item.max) {
  30985. status = status === void 0 ? true : status;
  30986. status = status && +_this.indicatorNum <= +item.max;
  30987. }
  30988. return status;
  30989. });
  30990. if (matchStyle) {
  30991. color = matchStyle.color;
  30992. }
  30993. }
  30994. var style = {
  30995. color: color
  30996. };
  30997. typeof this.indicatorNum === 'string' && (style.fontSize = parseFloat(this.fontSize) + this.fontUnit);
  30998. return style;
  30999. },
  31000. direction: function direction() {
  31001. return {
  31002. vertical: 'column',
  31003. horizontal: 'row'
  31004. }[this.mode];
  31005. },
  31006. calDecimals: function calDecimals() {
  31007. if (this.decimals > 0) {
  31008. return this.decimals;
  31009. }
  31010. if (this.numData.toString().split('.')[1]) {
  31011. return this.numData.toString().split('.')[1].length;
  31012. }
  31013. return 0;
  31014. }
  31015. },
  31016. watch: {
  31017. url: {
  31018. handler: function handler(val) {
  31019. if (val) {
  31020. this.getData();
  31021. } else {
  31022. this.unitData = this.unit;
  31023. this.changeNumData(this.num);
  31024. this.titleData = this.title;
  31025. this.fetchProperties = null;
  31026. }
  31027. },
  31028. immediate: true
  31029. },
  31030. indicatorColor: function indicatorColor(val) {
  31031. this.indicatorColorData = val;
  31032. },
  31033. proxy: function proxy() {
  31034. this.restService && this.restService.setProxy(this.proxy);
  31035. if (this.url) {
  31036. this.getData();
  31037. }
  31038. }
  31039. },
  31040. mounted: function mounted() {
  31041. var _this2 = this;
  31042. this.$on('theme-style-changed', function () {
  31043. _this2.indicatorColorData = _this2.getColor(0);
  31044. });
  31045. this.indicatorColorData = this.indicatorColor || this.getColor(0);
  31046. this.partsOfPropsWatcher();
  31047. },
  31048. beforeDestroy: function beforeDestroy() {
  31049. this.restService && this.restService.remove('getdatasucceeded');
  31050. },
  31051. methods: {
  31052. partsOfPropsWatcher: function partsOfPropsWatcher() {
  31053. var _this3 = this;
  31054. var propsFields = ['title', 'unit', 'num', 'titleField', 'unitField', 'numField'];
  31055. propsFields.forEach(function (props) {
  31056. _this3.$watch(props, function (next) {
  31057. switch (props) {
  31058. case 'title':
  31059. this.titleData = next;
  31060. break;
  31061. case 'titleField':
  31062. if (this.fetchProperties && this.fetchProperties.hasOwnProperty(next)) {
  31063. this.titleData = this.fetchProperties[this.titleField];
  31064. } else {
  31065. this.titleData = this.title;
  31066. }
  31067. break;
  31068. case 'unit':
  31069. this.unitData = next;
  31070. break;
  31071. case 'unitField':
  31072. if (this.fetchProperties && this.fetchProperties.hasOwnProperty(next)) {
  31073. this.unitData = this.fetchProperties[this.unitField];
  31074. } else {
  31075. this.unitData = this.unit;
  31076. }
  31077. break;
  31078. case 'num':
  31079. this.changeNumData(next);
  31080. break;
  31081. case 'numField':
  31082. if (this.fetchProperties && this.fetchProperties.hasOwnProperty(next)) {
  31083. this.changeNumData(this.fetchProperties[this.numField]);
  31084. } else {
  31085. this.changeNumData(this.num);
  31086. }
  31087. break;
  31088. }
  31089. });
  31090. });
  31091. },
  31092. isNumber: function isNumber(str) {
  31093. return /^\d+$/.test(str);
  31094. },
  31095. timing: function timing() {
  31096. this.getData();
  31097. },
  31098. fetchData: function fetchData(_ref) {
  31099. var features = _ref.features;
  31100. if (features && !!features.length) {
  31101. var properties = features[0].properties;
  31102. this.fetchProperties = properties;
  31103. this.unitData = properties.hasOwnProperty(this.unitField) ? properties[this.unitField] : this.unit;
  31104. properties.hasOwnProperty(this.numField) ? this.changeNumData(properties[this.numField]) : this.changeNumData(this.num);
  31105. this.titleData = properties.hasOwnProperty(this.titleField) ? properties[this.titleField] : this.title;
  31106. }
  31107. },
  31108. getData: function getData() {
  31109. this.getRestService().getData(this.url);
  31110. },
  31111. changeNumData: function changeNumData(newData) {
  31112. var startData = this.animated ? +this.numData : +newData;
  31113. this.startData = isNaN(startData) ? 0 : startData;
  31114. this.numData = +newData;
  31115. this.indicatorNum = newData;
  31116. },
  31117. getRestService: function getRestService() {
  31118. if (!this.restService) {
  31119. this.restService = new _RestService.default({
  31120. proxy: this.proxy
  31121. });
  31122. this.restService.on({
  31123. getdatasucceeded: this.fetchData
  31124. });
  31125. }
  31126. return this.restService;
  31127. }
  31128. }
  31129. };
  31130. exports.default = _default2;
  31131. /***/ }),
  31132. /***/ "a2ee":
  31133. /***/ (function(module, exports, __webpack_require__) {
  31134. "use strict";
  31135. var _interopRequireDefault = __webpack_require__("8e6d");
  31136. Object.defineProperty(exports, "__esModule", {
  31137. value: true
  31138. });
  31139. exports.default = void 0;
  31140. var _theme = _interopRequireDefault(__webpack_require__("9259"));
  31141. var _timer = _interopRequireDefault(__webpack_require__("8156"));
  31142. var _thirdService = _interopRequireDefault(__webpack_require__("c51e"));
  31143. //
  31144. //
  31145. //
  31146. //
  31147. //
  31148. //
  31149. //
  31150. //
  31151. //
  31152. var _default = {
  31153. name: 'SmText',
  31154. mixins: [_theme.default, _timer.default, _thirdService.default],
  31155. props: {
  31156. fontStyle: {
  31157. type: Object
  31158. },
  31159. title: {
  31160. type: String
  31161. },
  31162. href: {
  31163. type: String,
  31164. default: ''
  31165. },
  31166. target: {
  31167. type: String,
  31168. default: '_self'
  31169. }
  31170. },
  31171. data: function data() {
  31172. return {
  31173. finalValue: this.title
  31174. };
  31175. },
  31176. computed: {
  31177. customStyle: function customStyle() {
  31178. var style = Object.assign({}, this.fontStyle);
  31179. if (style.textAlign && !style.justifyContent) {
  31180. var textAlign = style.textAlign;
  31181. style.justifyContent = textAlign === 'left' ? 'flex-start' : textAlign === 'right' ? 'flex-end' : 'center';
  31182. delete style.textAlign;
  31183. }
  31184. return style;
  31185. }
  31186. },
  31187. watch: {
  31188. title: function title(val) {
  31189. this.finalValue = val;
  31190. }
  31191. },
  31192. beforeDestroy: function beforeDestroy() {
  31193. this.restService && this.restService.remove('getdatasucceeded');
  31194. },
  31195. methods: {
  31196. timing: function timing() {
  31197. this.getData();
  31198. }
  31199. }
  31200. };
  31201. exports.default = _default;
  31202. /***/ }),
  31203. /***/ "a3cf":
  31204. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  31205. "use strict";
  31206. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/leaflet/web-map/WebMap.vue?vue&type=template&id=d25de088&
  31207. var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"sm-component-web-map",attrs:{"id":_vm.target}},[(_vm.ready)?_vm._t("default"):_vm._e(),_vm._v(" "),(_vm.spinning)?_c('a-spin',{attrs:{"size":"large","tip":_vm.$t('webmap.loadingTip'),"spinning":_vm.spinning}}):_vm._e()],2)}
  31208. var staticRenderFns = []
  31209. // CONCATENATED MODULE: ./src/leaflet/web-map/WebMap.vue?vue&type=template&id=d25de088&
  31210. /* concated harmony reexport render */__webpack_require__.d(__webpack_exports__, "a", function() { return render; });
  31211. /* concated harmony reexport staticRenderFns */__webpack_require__.d(__webpack_exports__, "b", function() { return staticRenderFns; });
  31212. /***/ }),
  31213. /***/ "a51f":
  31214. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  31215. "use strict";
  31216. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/common/image/Image.vue?vue&type=template&id=3aa6b84a&
  31217. var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"sm-component-image",style:([_vm.getBackgroundStyle, _vm.getTextColorStyle])},[_c('a',{class:['sm-component-image__link', _vm.realHref ? '': 'sm-component-image__noLink'],attrs:{"href":_vm.realHref,"target":_vm.target}},[(_vm.src)?_c('div',{staticClass:"sm-component-image__content",style:([_vm.repeatStyle,_vm.imgUrl])}):_c('i',{staticClass:"sm-components-icons-x-bmp sm-component-image__defaultImg"})])])}
  31218. var staticRenderFns = []
  31219. // CONCATENATED MODULE: ./src/common/image/Image.vue?vue&type=template&id=3aa6b84a&
  31220. /* concated harmony reexport render */__webpack_require__.d(__webpack_exports__, "a", function() { return render; });
  31221. /* concated harmony reexport staticRenderFns */__webpack_require__.d(__webpack_exports__, "b", function() { return staticRenderFns; });
  31222. /***/ }),
  31223. /***/ "a587":
  31224. /***/ (function(module, exports) {
  31225. module.exports = __WEBPACK_EXTERNAL_MODULE_a587__;
  31226. /***/ }),
  31227. /***/ "a759":
  31228. /***/ (function(module) {
  31229. module.exports = JSON.parse("{\"border1\":{\"type\":\"1\",\"borderWidth\":[12,12,12,12],\"borderEdge\":{\"top\":12,\"left\":12,\"right\":12,\"bottom\":12}},\"border2\":{\"type\":\"2\",\"borderWidth\":[12,12,12,12],\"borderEdge\":{\"top\":12,\"left\":12,\"right\":12,\"bottom\":12}},\"border3\":{\"type\":\"3\",\"borderWidth\":[19,19,19,19],\"borderEdge\":{\"top\":19,\"left\":19,\"right\":19,\"bottom\":19}},\"border4\":{\"type\":\"4\",\"borderWidth\":[20,40,20,40],\"borderEdge\":{\"top\":20,\"left\":20,\"right\":20,\"bottom\":20}},\"border5\":{\"type\":\"5\",\"borderWidth\":[12,135,12,160],\"borderEdge\":{\"top\":12,\"left\":12,\"right\":12,\"bottom\":12}},\"border6\":{\"type\":\"6\",\"borderWidth\":[12,12,12,12],\"borderEdge\":{\"top\":12,\"left\":12,\"right\":12,\"bottom\":12}},\"border7\":{\"type\":\"7\",\"borderWidth\":[88,138,134,130],\"borderEdge\":{\"top\":30,\"left\":30,\"right\":32,\"bottom\":32}},\"border8\":{\"type\":\"8\",\"borderWidth\":[24,100,24,100],\"borderEdge\":{\"top\":17,\"left\":17,\"right\":17,\"bottom\":17}},\"border9\":{\"type\":\"9\",\"borderWidth\":[100,90,70,75],\"borderEdge\":{\"top\":32,\"left\":32,\"right\":32,\"bottom\":32}},\"border10\":{\"type\":\"10\",\"borderWidth\":[27,104,100,52],\"borderEdge\":{\"top\":27,\"left\":23,\"right\":60,\"bottom\":44}},\"border11\":{\"type\":\"11\",\"borderWidth\":[26,52,26,52],\"borderEdge\":{\"top\":12,\"left\":12,\"right\":12,\"bottom\":12}},\"border12\":{\"type\":\"12\",\"borderWidth\":[109,271,100,180],\"borderEdge\":{\"top\":30,\"left\":12,\"right\":12,\"bottom\":25}},\"border13\":{\"type\":\"13\",\"borderWidth\":[20,24,20,24],\"borderEdge\":{\"top\":20,\"left\":22,\"right\":24,\"bottom\":20}}}");
  31230. /***/ }),
  31231. /***/ "aa59":
  31232. /***/ (function(module, exports, __webpack_require__) {
  31233. "use strict";
  31234. var _interopRequireDefault = __webpack_require__("8e6d");
  31235. Object.defineProperty(exports, "__esModule", {
  31236. value: true
  31237. });
  31238. exports.default = void 0;
  31239. var _Popper = _interopRequireDefault(__webpack_require__("0e27"));
  31240. var _Options = _interopRequireDefault(__webpack_require__("dcc9"));
  31241. var _vmUpdater = _interopRequireDefault(__webpack_require__("3a49"));
  31242. var _theme = _interopRequireDefault(__webpack_require__("9259"));
  31243. var _mapGetter = _interopRequireDefault(__webpack_require__("2ed5"));
  31244. var _PopupViewModel = _interopRequireDefault(__webpack_require__("b6b0"));
  31245. var _default2 = {
  31246. name: 'SmPopup',
  31247. mixins: [_Popper.default, _Options.default, _vmUpdater.default, _mapGetter.default, _theme.default],
  31248. viewModelProps: ['latLng', 'content'],
  31249. props: {
  31250. latLng: {
  31251. type: [Object, Array],
  31252. default: function _default() {
  31253. return [];
  31254. }
  31255. }
  31256. },
  31257. watch: {
  31258. backgroundData: function backgroundData() {
  31259. this.changePopupStyle();
  31260. },
  31261. options: function options() {
  31262. this.loaded();
  31263. }
  31264. },
  31265. loaded: function loaded() {
  31266. var _this = this;
  31267. this.setViewModel();
  31268. this.mapObject = this.viewModel.getPopup();
  31269. this.parentContainer = this.$parent; // 如果有父组件有mapObject,则可以绑定在上面(默认绑定在map上面)
  31270. var parentContainerObject = this.parentContainer && this.parentContainer.mapObject || this.map;
  31271. if (parentContainerObject) {
  31272. // 如果有bindpopup方法的就绑定
  31273. if (parentContainerObject.bindPopup) {
  31274. parentContainerObject.bindPopup(this.mapObject);
  31275. this.$nextTick(function () {
  31276. _this.$emit('ready', _this.mapObject);
  31277. });
  31278. return;
  31279. } // 如果是地图,则openOn(this.map)
  31280. this.isMap = this.viewModel.isMap(parentContainerObject);
  31281. if (this.isMap) {
  31282. parentContainerObject.on('click', function (e) {
  31283. var latLng = _this.map.layerPointToLatLng(e.layerPoint);
  31284. _this.viewModel.setLatLng(latLng); // 通过slot进来的content
  31285. if (_this.$el && _this.$el.style) {
  31286. _this.$el.style.display = 'block';
  31287. }
  31288. _this.$nextTick(function () {
  31289. _this.$emit('ready', _this.mapObject);
  31290. });
  31291. _this.$on('ready', _this.viewModel.openOnMap);
  31292. });
  31293. }
  31294. }
  31295. },
  31296. beforeDestroy: function beforeDestroy() {
  31297. if (this.parentContainer) {
  31298. if (this.parentContainer.unbindPopup) {
  31299. this.parentContainer.unbindPopup();
  31300. } else if (this.parentContainer.mapObject && this.parentContainer.mapObject.unbindPopup) {
  31301. this.parentContainer.mapObject.unbindPopup();
  31302. }
  31303. }
  31304. },
  31305. methods: {
  31306. setViewModel: function setViewModel() {
  31307. this.viewModel = new _PopupViewModel.default(this.map, {
  31308. latLng: this.latLng,
  31309. content: this.content || this.$el,
  31310. options: this.options
  31311. });
  31312. },
  31313. changePopupStyle: function changePopupStyle() {
  31314. var popupContent = document.querySelector('.leaflet-popup-content-wrapper');
  31315. var popupTip = document.querySelector('.leaflet-popup-tip');
  31316. var popupCloseBtn = document.querySelector('.leaflet-container a.leaflet-popup-close-button:hover');
  31317. if (popupContent) {
  31318. popupContent.style.background = this.backgroundData;
  31319. }
  31320. if (popupTip) {
  31321. popupTip.style.background = this.backgroundData;
  31322. }
  31323. if (popupCloseBtn) {
  31324. popupTip.style.color = this.textColorsData;
  31325. }
  31326. }
  31327. }
  31328. };
  31329. exports.default = _default2;
  31330. /***/ }),
  31331. /***/ "acbb":
  31332. /***/ (function(module, exports) {
  31333. module.exports = __WEBPACK_EXTERNAL_MODULE_acbb__;
  31334. /***/ }),
  31335. /***/ "ae5c":
  31336. /***/ (function(module, exports, __webpack_require__) {
  31337. /* WEBPACK VAR INJECTION */(function(global, module) {/**
  31338. * lodash (Custom Build) <https://lodash.com/>
  31339. * Build: `lodash modularize exports="npm" -o ./`
  31340. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  31341. * Released under MIT license <https://lodash.com/license>
  31342. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  31343. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  31344. */
  31345. /** Used as the size to enable large array optimizations. */
  31346. var LARGE_ARRAY_SIZE = 200;
  31347. /** Used as the `TypeError` message for "Functions" methods. */
  31348. var FUNC_ERROR_TEXT = 'Expected a function';
  31349. /** Used to stand-in for `undefined` hash values. */
  31350. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  31351. /** Used to compose bitmasks for comparison styles. */
  31352. var UNORDERED_COMPARE_FLAG = 1,
  31353. PARTIAL_COMPARE_FLAG = 2;
  31354. /** Used as references for various `Number` constants. */
  31355. var INFINITY = 1 / 0,
  31356. MAX_SAFE_INTEGER = 9007199254740991;
  31357. /** `Object#toString` result references. */
  31358. var argsTag = '[object Arguments]',
  31359. arrayTag = '[object Array]',
  31360. boolTag = '[object Boolean]',
  31361. dateTag = '[object Date]',
  31362. errorTag = '[object Error]',
  31363. funcTag = '[object Function]',
  31364. genTag = '[object GeneratorFunction]',
  31365. mapTag = '[object Map]',
  31366. numberTag = '[object Number]',
  31367. objectTag = '[object Object]',
  31368. promiseTag = '[object Promise]',
  31369. regexpTag = '[object RegExp]',
  31370. setTag = '[object Set]',
  31371. stringTag = '[object String]',
  31372. symbolTag = '[object Symbol]',
  31373. weakMapTag = '[object WeakMap]';
  31374. var arrayBufferTag = '[object ArrayBuffer]',
  31375. dataViewTag = '[object DataView]',
  31376. float32Tag = '[object Float32Array]',
  31377. float64Tag = '[object Float64Array]',
  31378. int8Tag = '[object Int8Array]',
  31379. int16Tag = '[object Int16Array]',
  31380. int32Tag = '[object Int32Array]',
  31381. uint8Tag = '[object Uint8Array]',
  31382. uint8ClampedTag = '[object Uint8ClampedArray]',
  31383. uint16Tag = '[object Uint16Array]',
  31384. uint32Tag = '[object Uint32Array]';
  31385. /** Used to match property names within property paths. */
  31386. var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
  31387. reIsPlainProp = /^\w*$/,
  31388. reLeadingDot = /^\./,
  31389. rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
  31390. /**
  31391. * Used to match `RegExp`
  31392. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  31393. */
  31394. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
  31395. /** Used to match backslashes in property paths. */
  31396. var reEscapeChar = /\\(\\)?/g;
  31397. /** Used to detect host constructors (Safari). */
  31398. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  31399. /** Used to detect unsigned integer values. */
  31400. var reIsUint = /^(?:0|[1-9]\d*)$/;
  31401. /** Used to identify `toStringTag` values of typed arrays. */
  31402. var typedArrayTags = {};
  31403. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
  31404. typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
  31405. typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
  31406. typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
  31407. typedArrayTags[uint32Tag] = true;
  31408. typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
  31409. typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
  31410. typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
  31411. typedArrayTags[errorTag] = typedArrayTags[funcTag] =
  31412. typedArrayTags[mapTag] = typedArrayTags[numberTag] =
  31413. typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
  31414. typedArrayTags[setTag] = typedArrayTags[stringTag] =
  31415. typedArrayTags[weakMapTag] = false;
  31416. /** Detect free variable `global` from Node.js. */
  31417. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  31418. /** Detect free variable `self`. */
  31419. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  31420. /** Used as a reference to the global object. */
  31421. var root = freeGlobal || freeSelf || Function('return this')();
  31422. /** Detect free variable `exports`. */
  31423. var freeExports = true && exports && !exports.nodeType && exports;
  31424. /** Detect free variable `module`. */
  31425. var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
  31426. /** Detect the popular CommonJS extension `module.exports`. */
  31427. var moduleExports = freeModule && freeModule.exports === freeExports;
  31428. /** Detect free variable `process` from Node.js. */
  31429. var freeProcess = moduleExports && freeGlobal.process;
  31430. /** Used to access faster Node.js helpers. */
  31431. var nodeUtil = (function() {
  31432. try {
  31433. return freeProcess && freeProcess.binding('util');
  31434. } catch (e) {}
  31435. }());
  31436. /* Node.js helper references. */
  31437. var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
  31438. /**
  31439. * A specialized version of `_.map` for arrays without support for iteratee
  31440. * shorthands.
  31441. *
  31442. * @private
  31443. * @param {Array} [array] The array to iterate over.
  31444. * @param {Function} iteratee The function invoked per iteration.
  31445. * @returns {Array} Returns the new mapped array.
  31446. */
  31447. function arrayMap(array, iteratee) {
  31448. var index = -1,
  31449. length = array ? array.length : 0,
  31450. result = Array(length);
  31451. while (++index < length) {
  31452. result[index] = iteratee(array[index], index, array);
  31453. }
  31454. return result;
  31455. }
  31456. /**
  31457. * A specialized version of `_.some` for arrays without support for iteratee
  31458. * shorthands.
  31459. *
  31460. * @private
  31461. * @param {Array} [array] The array to iterate over.
  31462. * @param {Function} predicate The function invoked per iteration.
  31463. * @returns {boolean} Returns `true` if any element passes the predicate check,
  31464. * else `false`.
  31465. */
  31466. function arraySome(array, predicate) {
  31467. var index = -1,
  31468. length = array ? array.length : 0;
  31469. while (++index < length) {
  31470. if (predicate(array[index], index, array)) {
  31471. return true;
  31472. }
  31473. }
  31474. return false;
  31475. }
  31476. /**
  31477. * The base implementation of `_.property` without support for deep paths.
  31478. *
  31479. * @private
  31480. * @param {string} key The key of the property to get.
  31481. * @returns {Function} Returns the new accessor function.
  31482. */
  31483. function baseProperty(key) {
  31484. return function(object) {
  31485. return object == null ? undefined : object[key];
  31486. };
  31487. }
  31488. /**
  31489. * The base implementation of `_.sortBy` which uses `comparer` to define the
  31490. * sort order of `array` and replaces criteria objects with their corresponding
  31491. * values.
  31492. *
  31493. * @private
  31494. * @param {Array} array The array to sort.
  31495. * @param {Function} comparer The function to define sort order.
  31496. * @returns {Array} Returns `array`.
  31497. */
  31498. function baseSortBy(array, comparer) {
  31499. var length = array.length;
  31500. array.sort(comparer);
  31501. while (length--) {
  31502. array[length] = array[length].value;
  31503. }
  31504. return array;
  31505. }
  31506. /**
  31507. * The base implementation of `_.times` without support for iteratee shorthands
  31508. * or max array length checks.
  31509. *
  31510. * @private
  31511. * @param {number} n The number of times to invoke `iteratee`.
  31512. * @param {Function} iteratee The function invoked per iteration.
  31513. * @returns {Array} Returns the array of results.
  31514. */
  31515. function baseTimes(n, iteratee) {
  31516. var index = -1,
  31517. result = Array(n);
  31518. while (++index < n) {
  31519. result[index] = iteratee(index);
  31520. }
  31521. return result;
  31522. }
  31523. /**
  31524. * The base implementation of `_.unary` without support for storing metadata.
  31525. *
  31526. * @private
  31527. * @param {Function} func The function to cap arguments for.
  31528. * @returns {Function} Returns the new capped function.
  31529. */
  31530. function baseUnary(func) {
  31531. return function(value) {
  31532. return func(value);
  31533. };
  31534. }
  31535. /**
  31536. * Gets the value at `key` of `object`.
  31537. *
  31538. * @private
  31539. * @param {Object} [object] The object to query.
  31540. * @param {string} key The key of the property to get.
  31541. * @returns {*} Returns the property value.
  31542. */
  31543. function getValue(object, key) {
  31544. return object == null ? undefined : object[key];
  31545. }
  31546. /**
  31547. * Checks if `value` is a host object in IE < 9.
  31548. *
  31549. * @private
  31550. * @param {*} value The value to check.
  31551. * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
  31552. */
  31553. function isHostObject(value) {
  31554. // Many host objects are `Object` objects that can coerce to strings
  31555. // despite having improperly defined `toString` methods.
  31556. var result = false;
  31557. if (value != null && typeof value.toString != 'function') {
  31558. try {
  31559. result = !!(value + '');
  31560. } catch (e) {}
  31561. }
  31562. return result;
  31563. }
  31564. /**
  31565. * Converts `map` to its key-value pairs.
  31566. *
  31567. * @private
  31568. * @param {Object} map The map to convert.
  31569. * @returns {Array} Returns the key-value pairs.
  31570. */
  31571. function mapToArray(map) {
  31572. var index = -1,
  31573. result = Array(map.size);
  31574. map.forEach(function(value, key) {
  31575. result[++index] = [key, value];
  31576. });
  31577. return result;
  31578. }
  31579. /**
  31580. * Creates a unary function that invokes `func` with its argument transformed.
  31581. *
  31582. * @private
  31583. * @param {Function} func The function to wrap.
  31584. * @param {Function} transform The argument transform.
  31585. * @returns {Function} Returns the new function.
  31586. */
  31587. function overArg(func, transform) {
  31588. return function(arg) {
  31589. return func(transform(arg));
  31590. };
  31591. }
  31592. /**
  31593. * Converts `set` to an array of its values.
  31594. *
  31595. * @private
  31596. * @param {Object} set The set to convert.
  31597. * @returns {Array} Returns the values.
  31598. */
  31599. function setToArray(set) {
  31600. var index = -1,
  31601. result = Array(set.size);
  31602. set.forEach(function(value) {
  31603. result[++index] = value;
  31604. });
  31605. return result;
  31606. }
  31607. /** Used for built-in method references. */
  31608. var arrayProto = Array.prototype,
  31609. funcProto = Function.prototype,
  31610. objectProto = Object.prototype;
  31611. /** Used to detect overreaching core-js shims. */
  31612. var coreJsData = root['__core-js_shared__'];
  31613. /** Used to detect methods masquerading as native. */
  31614. var maskSrcKey = (function() {
  31615. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  31616. return uid ? ('Symbol(src)_1.' + uid) : '';
  31617. }());
  31618. /** Used to resolve the decompiled source of functions. */
  31619. var funcToString = funcProto.toString;
  31620. /** Used to check objects for own properties. */
  31621. var hasOwnProperty = objectProto.hasOwnProperty;
  31622. /**
  31623. * Used to resolve the
  31624. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  31625. * of values.
  31626. */
  31627. var objectToString = objectProto.toString;
  31628. /** Used to detect if a method is native. */
  31629. var reIsNative = RegExp('^' +
  31630. funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  31631. .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  31632. );
  31633. /** Built-in value references. */
  31634. var Symbol = root.Symbol,
  31635. Uint8Array = root.Uint8Array,
  31636. propertyIsEnumerable = objectProto.propertyIsEnumerable,
  31637. splice = arrayProto.splice;
  31638. /* Built-in method references for those with the same name as other `lodash` methods. */
  31639. var nativeKeys = overArg(Object.keys, Object);
  31640. /* Built-in method references that are verified to be native. */
  31641. var DataView = getNative(root, 'DataView'),
  31642. Map = getNative(root, 'Map'),
  31643. Promise = getNative(root, 'Promise'),
  31644. Set = getNative(root, 'Set'),
  31645. WeakMap = getNative(root, 'WeakMap'),
  31646. nativeCreate = getNative(Object, 'create');
  31647. /** Used to detect maps, sets, and weakmaps. */
  31648. var dataViewCtorString = toSource(DataView),
  31649. mapCtorString = toSource(Map),
  31650. promiseCtorString = toSource(Promise),
  31651. setCtorString = toSource(Set),
  31652. weakMapCtorString = toSource(WeakMap);
  31653. /** Used to convert symbols to primitives and strings. */
  31654. var symbolProto = Symbol ? Symbol.prototype : undefined,
  31655. symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
  31656. symbolToString = symbolProto ? symbolProto.toString : undefined;
  31657. /**
  31658. * Creates a hash object.
  31659. *
  31660. * @private
  31661. * @constructor
  31662. * @param {Array} [entries] The key-value pairs to cache.
  31663. */
  31664. function Hash(entries) {
  31665. var index = -1,
  31666. length = entries ? entries.length : 0;
  31667. this.clear();
  31668. while (++index < length) {
  31669. var entry = entries[index];
  31670. this.set(entry[0], entry[1]);
  31671. }
  31672. }
  31673. /**
  31674. * Removes all key-value entries from the hash.
  31675. *
  31676. * @private
  31677. * @name clear
  31678. * @memberOf Hash
  31679. */
  31680. function hashClear() {
  31681. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  31682. }
  31683. /**
  31684. * Removes `key` and its value from the hash.
  31685. *
  31686. * @private
  31687. * @name delete
  31688. * @memberOf Hash
  31689. * @param {Object} hash The hash to modify.
  31690. * @param {string} key The key of the value to remove.
  31691. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  31692. */
  31693. function hashDelete(key) {
  31694. return this.has(key) && delete this.__data__[key];
  31695. }
  31696. /**
  31697. * Gets the hash value for `key`.
  31698. *
  31699. * @private
  31700. * @name get
  31701. * @memberOf Hash
  31702. * @param {string} key The key of the value to get.
  31703. * @returns {*} Returns the entry value.
  31704. */
  31705. function hashGet(key) {
  31706. var data = this.__data__;
  31707. if (nativeCreate) {
  31708. var result = data[key];
  31709. return result === HASH_UNDEFINED ? undefined : result;
  31710. }
  31711. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  31712. }
  31713. /**
  31714. * Checks if a hash value for `key` exists.
  31715. *
  31716. * @private
  31717. * @name has
  31718. * @memberOf Hash
  31719. * @param {string} key The key of the entry to check.
  31720. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  31721. */
  31722. function hashHas(key) {
  31723. var data = this.__data__;
  31724. return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
  31725. }
  31726. /**
  31727. * Sets the hash `key` to `value`.
  31728. *
  31729. * @private
  31730. * @name set
  31731. * @memberOf Hash
  31732. * @param {string} key The key of the value to set.
  31733. * @param {*} value The value to set.
  31734. * @returns {Object} Returns the hash instance.
  31735. */
  31736. function hashSet(key, value) {
  31737. var data = this.__data__;
  31738. data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
  31739. return this;
  31740. }
  31741. // Add methods to `Hash`.
  31742. Hash.prototype.clear = hashClear;
  31743. Hash.prototype['delete'] = hashDelete;
  31744. Hash.prototype.get = hashGet;
  31745. Hash.prototype.has = hashHas;
  31746. Hash.prototype.set = hashSet;
  31747. /**
  31748. * Creates an list cache object.
  31749. *
  31750. * @private
  31751. * @constructor
  31752. * @param {Array} [entries] The key-value pairs to cache.
  31753. */
  31754. function ListCache(entries) {
  31755. var index = -1,
  31756. length = entries ? entries.length : 0;
  31757. this.clear();
  31758. while (++index < length) {
  31759. var entry = entries[index];
  31760. this.set(entry[0], entry[1]);
  31761. }
  31762. }
  31763. /**
  31764. * Removes all key-value entries from the list cache.
  31765. *
  31766. * @private
  31767. * @name clear
  31768. * @memberOf ListCache
  31769. */
  31770. function listCacheClear() {
  31771. this.__data__ = [];
  31772. }
  31773. /**
  31774. * Removes `key` and its value from the list cache.
  31775. *
  31776. * @private
  31777. * @name delete
  31778. * @memberOf ListCache
  31779. * @param {string} key The key of the value to remove.
  31780. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  31781. */
  31782. function listCacheDelete(key) {
  31783. var data = this.__data__,
  31784. index = assocIndexOf(data, key);
  31785. if (index < 0) {
  31786. return false;
  31787. }
  31788. var lastIndex = data.length - 1;
  31789. if (index == lastIndex) {
  31790. data.pop();
  31791. } else {
  31792. splice.call(data, index, 1);
  31793. }
  31794. return true;
  31795. }
  31796. /**
  31797. * Gets the list cache value for `key`.
  31798. *
  31799. * @private
  31800. * @name get
  31801. * @memberOf ListCache
  31802. * @param {string} key The key of the value to get.
  31803. * @returns {*} Returns the entry value.
  31804. */
  31805. function listCacheGet(key) {
  31806. var data = this.__data__,
  31807. index = assocIndexOf(data, key);
  31808. return index < 0 ? undefined : data[index][1];
  31809. }
  31810. /**
  31811. * Checks if a list cache value for `key` exists.
  31812. *
  31813. * @private
  31814. * @name has
  31815. * @memberOf ListCache
  31816. * @param {string} key The key of the entry to check.
  31817. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  31818. */
  31819. function listCacheHas(key) {
  31820. return assocIndexOf(this.__data__, key) > -1;
  31821. }
  31822. /**
  31823. * Sets the list cache `key` to `value`.
  31824. *
  31825. * @private
  31826. * @name set
  31827. * @memberOf ListCache
  31828. * @param {string} key The key of the value to set.
  31829. * @param {*} value The value to set.
  31830. * @returns {Object} Returns the list cache instance.
  31831. */
  31832. function listCacheSet(key, value) {
  31833. var data = this.__data__,
  31834. index = assocIndexOf(data, key);
  31835. if (index < 0) {
  31836. data.push([key, value]);
  31837. } else {
  31838. data[index][1] = value;
  31839. }
  31840. return this;
  31841. }
  31842. // Add methods to `ListCache`.
  31843. ListCache.prototype.clear = listCacheClear;
  31844. ListCache.prototype['delete'] = listCacheDelete;
  31845. ListCache.prototype.get = listCacheGet;
  31846. ListCache.prototype.has = listCacheHas;
  31847. ListCache.prototype.set = listCacheSet;
  31848. /**
  31849. * Creates a map cache object to store key-value pairs.
  31850. *
  31851. * @private
  31852. * @constructor
  31853. * @param {Array} [entries] The key-value pairs to cache.
  31854. */
  31855. function MapCache(entries) {
  31856. var index = -1,
  31857. length = entries ? entries.length : 0;
  31858. this.clear();
  31859. while (++index < length) {
  31860. var entry = entries[index];
  31861. this.set(entry[0], entry[1]);
  31862. }
  31863. }
  31864. /**
  31865. * Removes all key-value entries from the map.
  31866. *
  31867. * @private
  31868. * @name clear
  31869. * @memberOf MapCache
  31870. */
  31871. function mapCacheClear() {
  31872. this.__data__ = {
  31873. 'hash': new Hash,
  31874. 'map': new (Map || ListCache),
  31875. 'string': new Hash
  31876. };
  31877. }
  31878. /**
  31879. * Removes `key` and its value from the map.
  31880. *
  31881. * @private
  31882. * @name delete
  31883. * @memberOf MapCache
  31884. * @param {string} key The key of the value to remove.
  31885. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  31886. */
  31887. function mapCacheDelete(key) {
  31888. return getMapData(this, key)['delete'](key);
  31889. }
  31890. /**
  31891. * Gets the map value for `key`.
  31892. *
  31893. * @private
  31894. * @name get
  31895. * @memberOf MapCache
  31896. * @param {string} key The key of the value to get.
  31897. * @returns {*} Returns the entry value.
  31898. */
  31899. function mapCacheGet(key) {
  31900. return getMapData(this, key).get(key);
  31901. }
  31902. /**
  31903. * Checks if a map value for `key` exists.
  31904. *
  31905. * @private
  31906. * @name has
  31907. * @memberOf MapCache
  31908. * @param {string} key The key of the entry to check.
  31909. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  31910. */
  31911. function mapCacheHas(key) {
  31912. return getMapData(this, key).has(key);
  31913. }
  31914. /**
  31915. * Sets the map `key` to `value`.
  31916. *
  31917. * @private
  31918. * @name set
  31919. * @memberOf MapCache
  31920. * @param {string} key The key of the value to set.
  31921. * @param {*} value The value to set.
  31922. * @returns {Object} Returns the map cache instance.
  31923. */
  31924. function mapCacheSet(key, value) {
  31925. getMapData(this, key).set(key, value);
  31926. return this;
  31927. }
  31928. // Add methods to `MapCache`.
  31929. MapCache.prototype.clear = mapCacheClear;
  31930. MapCache.prototype['delete'] = mapCacheDelete;
  31931. MapCache.prototype.get = mapCacheGet;
  31932. MapCache.prototype.has = mapCacheHas;
  31933. MapCache.prototype.set = mapCacheSet;
  31934. /**
  31935. *
  31936. * Creates an array cache object to store unique values.
  31937. *
  31938. * @private
  31939. * @constructor
  31940. * @param {Array} [values] The values to cache.
  31941. */
  31942. function SetCache(values) {
  31943. var index = -1,
  31944. length = values ? values.length : 0;
  31945. this.__data__ = new MapCache;
  31946. while (++index < length) {
  31947. this.add(values[index]);
  31948. }
  31949. }
  31950. /**
  31951. * Adds `value` to the array cache.
  31952. *
  31953. * @private
  31954. * @name add
  31955. * @memberOf SetCache
  31956. * @alias push
  31957. * @param {*} value The value to cache.
  31958. * @returns {Object} Returns the cache instance.
  31959. */
  31960. function setCacheAdd(value) {
  31961. this.__data__.set(value, HASH_UNDEFINED);
  31962. return this;
  31963. }
  31964. /**
  31965. * Checks if `value` is in the array cache.
  31966. *
  31967. * @private
  31968. * @name has
  31969. * @memberOf SetCache
  31970. * @param {*} value The value to search for.
  31971. * @returns {number} Returns `true` if `value` is found, else `false`.
  31972. */
  31973. function setCacheHas(value) {
  31974. return this.__data__.has(value);
  31975. }
  31976. // Add methods to `SetCache`.
  31977. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
  31978. SetCache.prototype.has = setCacheHas;
  31979. /**
  31980. * Creates a stack cache object to store key-value pairs.
  31981. *
  31982. * @private
  31983. * @constructor
  31984. * @param {Array} [entries] The key-value pairs to cache.
  31985. */
  31986. function Stack(entries) {
  31987. this.__data__ = new ListCache(entries);
  31988. }
  31989. /**
  31990. * Removes all key-value entries from the stack.
  31991. *
  31992. * @private
  31993. * @name clear
  31994. * @memberOf Stack
  31995. */
  31996. function stackClear() {
  31997. this.__data__ = new ListCache;
  31998. }
  31999. /**
  32000. * Removes `key` and its value from the stack.
  32001. *
  32002. * @private
  32003. * @name delete
  32004. * @memberOf Stack
  32005. * @param {string} key The key of the value to remove.
  32006. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  32007. */
  32008. function stackDelete(key) {
  32009. return this.__data__['delete'](key);
  32010. }
  32011. /**
  32012. * Gets the stack value for `key`.
  32013. *
  32014. * @private
  32015. * @name get
  32016. * @memberOf Stack
  32017. * @param {string} key The key of the value to get.
  32018. * @returns {*} Returns the entry value.
  32019. */
  32020. function stackGet(key) {
  32021. return this.__data__.get(key);
  32022. }
  32023. /**
  32024. * Checks if a stack value for `key` exists.
  32025. *
  32026. * @private
  32027. * @name has
  32028. * @memberOf Stack
  32029. * @param {string} key The key of the entry to check.
  32030. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  32031. */
  32032. function stackHas(key) {
  32033. return this.__data__.has(key);
  32034. }
  32035. /**
  32036. * Sets the stack `key` to `value`.
  32037. *
  32038. * @private
  32039. * @name set
  32040. * @memberOf Stack
  32041. * @param {string} key The key of the value to set.
  32042. * @param {*} value The value to set.
  32043. * @returns {Object} Returns the stack cache instance.
  32044. */
  32045. function stackSet(key, value) {
  32046. var cache = this.__data__;
  32047. if (cache instanceof ListCache) {
  32048. var pairs = cache.__data__;
  32049. if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
  32050. pairs.push([key, value]);
  32051. return this;
  32052. }
  32053. cache = this.__data__ = new MapCache(pairs);
  32054. }
  32055. cache.set(key, value);
  32056. return this;
  32057. }
  32058. // Add methods to `Stack`.
  32059. Stack.prototype.clear = stackClear;
  32060. Stack.prototype['delete'] = stackDelete;
  32061. Stack.prototype.get = stackGet;
  32062. Stack.prototype.has = stackHas;
  32063. Stack.prototype.set = stackSet;
  32064. /**
  32065. * Creates an array of the enumerable property names of the array-like `value`.
  32066. *
  32067. * @private
  32068. * @param {*} value The value to query.
  32069. * @param {boolean} inherited Specify returning inherited property names.
  32070. * @returns {Array} Returns the array of property names.
  32071. */
  32072. function arrayLikeKeys(value, inherited) {
  32073. // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
  32074. // Safari 9 makes `arguments.length` enumerable in strict mode.
  32075. var result = (isArray(value) || isArguments(value))
  32076. ? baseTimes(value.length, String)
  32077. : [];
  32078. var length = result.length,
  32079. skipIndexes = !!length;
  32080. for (var key in value) {
  32081. if ((inherited || hasOwnProperty.call(value, key)) &&
  32082. !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
  32083. result.push(key);
  32084. }
  32085. }
  32086. return result;
  32087. }
  32088. /**
  32089. * Gets the index at which the `key` is found in `array` of key-value pairs.
  32090. *
  32091. * @private
  32092. * @param {Array} array The array to inspect.
  32093. * @param {*} key The key to search for.
  32094. * @returns {number} Returns the index of the matched value, else `-1`.
  32095. */
  32096. function assocIndexOf(array, key) {
  32097. var length = array.length;
  32098. while (length--) {
  32099. if (eq(array[length][0], key)) {
  32100. return length;
  32101. }
  32102. }
  32103. return -1;
  32104. }
  32105. /**
  32106. * The base implementation of `_.forEach` without support for iteratee shorthands.
  32107. *
  32108. * @private
  32109. * @param {Array|Object} collection The collection to iterate over.
  32110. * @param {Function} iteratee The function invoked per iteration.
  32111. * @returns {Array|Object} Returns `collection`.
  32112. */
  32113. var baseEach = createBaseEach(baseForOwn);
  32114. /**
  32115. * The base implementation of `baseForOwn` which iterates over `object`
  32116. * properties returned by `keysFunc` and invokes `iteratee` for each property.
  32117. * Iteratee functions may exit iteration early by explicitly returning `false`.
  32118. *
  32119. * @private
  32120. * @param {Object} object The object to iterate over.
  32121. * @param {Function} iteratee The function invoked per iteration.
  32122. * @param {Function} keysFunc The function to get the keys of `object`.
  32123. * @returns {Object} Returns `object`.
  32124. */
  32125. var baseFor = createBaseFor();
  32126. /**
  32127. * The base implementation of `_.forOwn` without support for iteratee shorthands.
  32128. *
  32129. * @private
  32130. * @param {Object} object The object to iterate over.
  32131. * @param {Function} iteratee The function invoked per iteration.
  32132. * @returns {Object} Returns `object`.
  32133. */
  32134. function baseForOwn(object, iteratee) {
  32135. return object && baseFor(object, iteratee, keys);
  32136. }
  32137. /**
  32138. * The base implementation of `_.get` without support for default values.
  32139. *
  32140. * @private
  32141. * @param {Object} object The object to query.
  32142. * @param {Array|string} path The path of the property to get.
  32143. * @returns {*} Returns the resolved value.
  32144. */
  32145. function baseGet(object, path) {
  32146. path = isKey(path, object) ? [path] : castPath(path);
  32147. var index = 0,
  32148. length = path.length;
  32149. while (object != null && index < length) {
  32150. object = object[toKey(path[index++])];
  32151. }
  32152. return (index && index == length) ? object : undefined;
  32153. }
  32154. /**
  32155. * The base implementation of `getTag`.
  32156. *
  32157. * @private
  32158. * @param {*} value The value to query.
  32159. * @returns {string} Returns the `toStringTag`.
  32160. */
  32161. function baseGetTag(value) {
  32162. return objectToString.call(value);
  32163. }
  32164. /**
  32165. * The base implementation of `_.hasIn` without support for deep paths.
  32166. *
  32167. * @private
  32168. * @param {Object} [object] The object to query.
  32169. * @param {Array|string} key The key to check.
  32170. * @returns {boolean} Returns `true` if `key` exists, else `false`.
  32171. */
  32172. function baseHasIn(object, key) {
  32173. return object != null && key in Object(object);
  32174. }
  32175. /**
  32176. * The base implementation of `_.isEqual` which supports partial comparisons
  32177. * and tracks traversed objects.
  32178. *
  32179. * @private
  32180. * @param {*} value The value to compare.
  32181. * @param {*} other The other value to compare.
  32182. * @param {Function} [customizer] The function to customize comparisons.
  32183. * @param {boolean} [bitmask] The bitmask of comparison flags.
  32184. * The bitmask may be composed of the following flags:
  32185. * 1 - Unordered comparison
  32186. * 2 - Partial comparison
  32187. * @param {Object} [stack] Tracks traversed `value` and `other` objects.
  32188. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  32189. */
  32190. function baseIsEqual(value, other, customizer, bitmask, stack) {
  32191. if (value === other) {
  32192. return true;
  32193. }
  32194. if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
  32195. return value !== value && other !== other;
  32196. }
  32197. return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);
  32198. }
  32199. /**
  32200. * A specialized version of `baseIsEqual` for arrays and objects which performs
  32201. * deep comparisons and tracks traversed objects enabling objects with circular
  32202. * references to be compared.
  32203. *
  32204. * @private
  32205. * @param {Object} object The object to compare.
  32206. * @param {Object} other The other object to compare.
  32207. * @param {Function} equalFunc The function to determine equivalents of values.
  32208. * @param {Function} [customizer] The function to customize comparisons.
  32209. * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual`
  32210. * for more details.
  32211. * @param {Object} [stack] Tracks traversed `object` and `other` objects.
  32212. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  32213. */
  32214. function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
  32215. var objIsArr = isArray(object),
  32216. othIsArr = isArray(other),
  32217. objTag = arrayTag,
  32218. othTag = arrayTag;
  32219. if (!objIsArr) {
  32220. objTag = getTag(object);
  32221. objTag = objTag == argsTag ? objectTag : objTag;
  32222. }
  32223. if (!othIsArr) {
  32224. othTag = getTag(other);
  32225. othTag = othTag == argsTag ? objectTag : othTag;
  32226. }
  32227. var objIsObj = objTag == objectTag && !isHostObject(object),
  32228. othIsObj = othTag == objectTag && !isHostObject(other),
  32229. isSameTag = objTag == othTag;
  32230. if (isSameTag && !objIsObj) {
  32231. stack || (stack = new Stack);
  32232. return (objIsArr || isTypedArray(object))
  32233. ? equalArrays(object, other, equalFunc, customizer, bitmask, stack)
  32234. : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);
  32235. }
  32236. if (!(bitmask & PARTIAL_COMPARE_FLAG)) {
  32237. var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
  32238. othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
  32239. if (objIsWrapped || othIsWrapped) {
  32240. var objUnwrapped = objIsWrapped ? object.value() : object,
  32241. othUnwrapped = othIsWrapped ? other.value() : other;
  32242. stack || (stack = new Stack);
  32243. return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);
  32244. }
  32245. }
  32246. if (!isSameTag) {
  32247. return false;
  32248. }
  32249. stack || (stack = new Stack);
  32250. return equalObjects(object, other, equalFunc, customizer, bitmask, stack);
  32251. }
  32252. /**
  32253. * The base implementation of `_.isMatch` without support for iteratee shorthands.
  32254. *
  32255. * @private
  32256. * @param {Object} object The object to inspect.
  32257. * @param {Object} source The object of property values to match.
  32258. * @param {Array} matchData The property names, values, and compare flags to match.
  32259. * @param {Function} [customizer] The function to customize comparisons.
  32260. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  32261. */
  32262. function baseIsMatch(object, source, matchData, customizer) {
  32263. var index = matchData.length,
  32264. length = index,
  32265. noCustomizer = !customizer;
  32266. if (object == null) {
  32267. return !length;
  32268. }
  32269. object = Object(object);
  32270. while (index--) {
  32271. var data = matchData[index];
  32272. if ((noCustomizer && data[2])
  32273. ? data[1] !== object[data[0]]
  32274. : !(data[0] in object)
  32275. ) {
  32276. return false;
  32277. }
  32278. }
  32279. while (++index < length) {
  32280. data = matchData[index];
  32281. var key = data[0],
  32282. objValue = object[key],
  32283. srcValue = data[1];
  32284. if (noCustomizer && data[2]) {
  32285. if (objValue === undefined && !(key in object)) {
  32286. return false;
  32287. }
  32288. } else {
  32289. var stack = new Stack;
  32290. if (customizer) {
  32291. var result = customizer(objValue, srcValue, key, object, source, stack);
  32292. }
  32293. if (!(result === undefined
  32294. ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack)
  32295. : result
  32296. )) {
  32297. return false;
  32298. }
  32299. }
  32300. }
  32301. return true;
  32302. }
  32303. /**
  32304. * The base implementation of `_.isNative` without bad shim checks.
  32305. *
  32306. * @private
  32307. * @param {*} value The value to check.
  32308. * @returns {boolean} Returns `true` if `value` is a native function,
  32309. * else `false`.
  32310. */
  32311. function baseIsNative(value) {
  32312. if (!isObject(value) || isMasked(value)) {
  32313. return false;
  32314. }
  32315. var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
  32316. return pattern.test(toSource(value));
  32317. }
  32318. /**
  32319. * The base implementation of `_.isTypedArray` without Node.js optimizations.
  32320. *
  32321. * @private
  32322. * @param {*} value The value to check.
  32323. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  32324. */
  32325. function baseIsTypedArray(value) {
  32326. return isObjectLike(value) &&
  32327. isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
  32328. }
  32329. /**
  32330. * The base implementation of `_.iteratee`.
  32331. *
  32332. * @private
  32333. * @param {*} [value=_.identity] The value to convert to an iteratee.
  32334. * @returns {Function} Returns the iteratee.
  32335. */
  32336. function baseIteratee(value) {
  32337. // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
  32338. // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
  32339. if (typeof value == 'function') {
  32340. return value;
  32341. }
  32342. if (value == null) {
  32343. return identity;
  32344. }
  32345. if (typeof value == 'object') {
  32346. return isArray(value)
  32347. ? baseMatchesProperty(value[0], value[1])
  32348. : baseMatches(value);
  32349. }
  32350. return property(value);
  32351. }
  32352. /**
  32353. * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
  32354. *
  32355. * @private
  32356. * @param {Object} object The object to query.
  32357. * @returns {Array} Returns the array of property names.
  32358. */
  32359. function baseKeys(object) {
  32360. if (!isPrototype(object)) {
  32361. return nativeKeys(object);
  32362. }
  32363. var result = [];
  32364. for (var key in Object(object)) {
  32365. if (hasOwnProperty.call(object, key) && key != 'constructor') {
  32366. result.push(key);
  32367. }
  32368. }
  32369. return result;
  32370. }
  32371. /**
  32372. * The base implementation of `_.map` without support for iteratee shorthands.
  32373. *
  32374. * @private
  32375. * @param {Array|Object} collection The collection to iterate over.
  32376. * @param {Function} iteratee The function invoked per iteration.
  32377. * @returns {Array} Returns the new mapped array.
  32378. */
  32379. function baseMap(collection, iteratee) {
  32380. var index = -1,
  32381. result = isArrayLike(collection) ? Array(collection.length) : [];
  32382. baseEach(collection, function(value, key, collection) {
  32383. result[++index] = iteratee(value, key, collection);
  32384. });
  32385. return result;
  32386. }
  32387. /**
  32388. * The base implementation of `_.matches` which doesn't clone `source`.
  32389. *
  32390. * @private
  32391. * @param {Object} source The object of property values to match.
  32392. * @returns {Function} Returns the new spec function.
  32393. */
  32394. function baseMatches(source) {
  32395. var matchData = getMatchData(source);
  32396. if (matchData.length == 1 && matchData[0][2]) {
  32397. return matchesStrictComparable(matchData[0][0], matchData[0][1]);
  32398. }
  32399. return function(object) {
  32400. return object === source || baseIsMatch(object, source, matchData);
  32401. };
  32402. }
  32403. /**
  32404. * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
  32405. *
  32406. * @private
  32407. * @param {string} path The path of the property to get.
  32408. * @param {*} srcValue The value to match.
  32409. * @returns {Function} Returns the new spec function.
  32410. */
  32411. function baseMatchesProperty(path, srcValue) {
  32412. if (isKey(path) && isStrictComparable(srcValue)) {
  32413. return matchesStrictComparable(toKey(path), srcValue);
  32414. }
  32415. return function(object) {
  32416. var objValue = get(object, path);
  32417. return (objValue === undefined && objValue === srcValue)
  32418. ? hasIn(object, path)
  32419. : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);
  32420. };
  32421. }
  32422. /**
  32423. * The base implementation of `_.orderBy` without param guards.
  32424. *
  32425. * @private
  32426. * @param {Array|Object} collection The collection to iterate over.
  32427. * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
  32428. * @param {string[]} orders The sort orders of `iteratees`.
  32429. * @returns {Array} Returns the new sorted array.
  32430. */
  32431. function baseOrderBy(collection, iteratees, orders) {
  32432. var index = -1;
  32433. iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee));
  32434. var result = baseMap(collection, function(value, key, collection) {
  32435. var criteria = arrayMap(iteratees, function(iteratee) {
  32436. return iteratee(value);
  32437. });
  32438. return { 'criteria': criteria, 'index': ++index, 'value': value };
  32439. });
  32440. return baseSortBy(result, function(object, other) {
  32441. return compareMultiple(object, other, orders);
  32442. });
  32443. }
  32444. /**
  32445. * A specialized version of `baseProperty` which supports deep paths.
  32446. *
  32447. * @private
  32448. * @param {Array|string} path The path of the property to get.
  32449. * @returns {Function} Returns the new accessor function.
  32450. */
  32451. function basePropertyDeep(path) {
  32452. return function(object) {
  32453. return baseGet(object, path);
  32454. };
  32455. }
  32456. /**
  32457. * The base implementation of `_.toString` which doesn't convert nullish
  32458. * values to empty strings.
  32459. *
  32460. * @private
  32461. * @param {*} value The value to process.
  32462. * @returns {string} Returns the string.
  32463. */
  32464. function baseToString(value) {
  32465. // Exit early for strings to avoid a performance hit in some environments.
  32466. if (typeof value == 'string') {
  32467. return value;
  32468. }
  32469. if (isSymbol(value)) {
  32470. return symbolToString ? symbolToString.call(value) : '';
  32471. }
  32472. var result = (value + '');
  32473. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  32474. }
  32475. /**
  32476. * Casts `value` to a path array if it's not one.
  32477. *
  32478. * @private
  32479. * @param {*} value The value to inspect.
  32480. * @returns {Array} Returns the cast property path array.
  32481. */
  32482. function castPath(value) {
  32483. return isArray(value) ? value : stringToPath(value);
  32484. }
  32485. /**
  32486. * Compares values to sort them in ascending order.
  32487. *
  32488. * @private
  32489. * @param {*} value The value to compare.
  32490. * @param {*} other The other value to compare.
  32491. * @returns {number} Returns the sort order indicator for `value`.
  32492. */
  32493. function compareAscending(value, other) {
  32494. if (value !== other) {
  32495. var valIsDefined = value !== undefined,
  32496. valIsNull = value === null,
  32497. valIsReflexive = value === value,
  32498. valIsSymbol = isSymbol(value);
  32499. var othIsDefined = other !== undefined,
  32500. othIsNull = other === null,
  32501. othIsReflexive = other === other,
  32502. othIsSymbol = isSymbol(other);
  32503. if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
  32504. (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
  32505. (valIsNull && othIsDefined && othIsReflexive) ||
  32506. (!valIsDefined && othIsReflexive) ||
  32507. !valIsReflexive) {
  32508. return 1;
  32509. }
  32510. if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
  32511. (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
  32512. (othIsNull && valIsDefined && valIsReflexive) ||
  32513. (!othIsDefined && valIsReflexive) ||
  32514. !othIsReflexive) {
  32515. return -1;
  32516. }
  32517. }
  32518. return 0;
  32519. }
  32520. /**
  32521. * Used by `_.orderBy` to compare multiple properties of a value to another
  32522. * and stable sort them.
  32523. *
  32524. * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
  32525. * specify an order of "desc" for descending or "asc" for ascending sort order
  32526. * of corresponding values.
  32527. *
  32528. * @private
  32529. * @param {Object} object The object to compare.
  32530. * @param {Object} other The other object to compare.
  32531. * @param {boolean[]|string[]} orders The order to sort by for each property.
  32532. * @returns {number} Returns the sort order indicator for `object`.
  32533. */
  32534. function compareMultiple(object, other, orders) {
  32535. var index = -1,
  32536. objCriteria = object.criteria,
  32537. othCriteria = other.criteria,
  32538. length = objCriteria.length,
  32539. ordersLength = orders.length;
  32540. while (++index < length) {
  32541. var result = compareAscending(objCriteria[index], othCriteria[index]);
  32542. if (result) {
  32543. if (index >= ordersLength) {
  32544. return result;
  32545. }
  32546. var order = orders[index];
  32547. return result * (order == 'desc' ? -1 : 1);
  32548. }
  32549. }
  32550. // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
  32551. // that causes it, under certain circumstances, to provide the same value for
  32552. // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
  32553. // for more details.
  32554. //
  32555. // This also ensures a stable sort in V8 and other engines.
  32556. // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
  32557. return object.index - other.index;
  32558. }
  32559. /**
  32560. * Creates a `baseEach` or `baseEachRight` function.
  32561. *
  32562. * @private
  32563. * @param {Function} eachFunc The function to iterate over a collection.
  32564. * @param {boolean} [fromRight] Specify iterating from right to left.
  32565. * @returns {Function} Returns the new base function.
  32566. */
  32567. function createBaseEach(eachFunc, fromRight) {
  32568. return function(collection, iteratee) {
  32569. if (collection == null) {
  32570. return collection;
  32571. }
  32572. if (!isArrayLike(collection)) {
  32573. return eachFunc(collection, iteratee);
  32574. }
  32575. var length = collection.length,
  32576. index = fromRight ? length : -1,
  32577. iterable = Object(collection);
  32578. while ((fromRight ? index-- : ++index < length)) {
  32579. if (iteratee(iterable[index], index, iterable) === false) {
  32580. break;
  32581. }
  32582. }
  32583. return collection;
  32584. };
  32585. }
  32586. /**
  32587. * Creates a base function for methods like `_.forIn` and `_.forOwn`.
  32588. *
  32589. * @private
  32590. * @param {boolean} [fromRight] Specify iterating from right to left.
  32591. * @returns {Function} Returns the new base function.
  32592. */
  32593. function createBaseFor(fromRight) {
  32594. return function(object, iteratee, keysFunc) {
  32595. var index = -1,
  32596. iterable = Object(object),
  32597. props = keysFunc(object),
  32598. length = props.length;
  32599. while (length--) {
  32600. var key = props[fromRight ? length : ++index];
  32601. if (iteratee(iterable[key], key, iterable) === false) {
  32602. break;
  32603. }
  32604. }
  32605. return object;
  32606. };
  32607. }
  32608. /**
  32609. * A specialized version of `baseIsEqualDeep` for arrays with support for
  32610. * partial deep comparisons.
  32611. *
  32612. * @private
  32613. * @param {Array} array The array to compare.
  32614. * @param {Array} other The other array to compare.
  32615. * @param {Function} equalFunc The function to determine equivalents of values.
  32616. * @param {Function} customizer The function to customize comparisons.
  32617. * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
  32618. * for more details.
  32619. * @param {Object} stack Tracks traversed `array` and `other` objects.
  32620. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
  32621. */
  32622. function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
  32623. var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
  32624. arrLength = array.length,
  32625. othLength = other.length;
  32626. if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
  32627. return false;
  32628. }
  32629. // Assume cyclic values are equal.
  32630. var stacked = stack.get(array);
  32631. if (stacked && stack.get(other)) {
  32632. return stacked == other;
  32633. }
  32634. var index = -1,
  32635. result = true,
  32636. seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined;
  32637. stack.set(array, other);
  32638. stack.set(other, array);
  32639. // Ignore non-index properties.
  32640. while (++index < arrLength) {
  32641. var arrValue = array[index],
  32642. othValue = other[index];
  32643. if (customizer) {
  32644. var compared = isPartial
  32645. ? customizer(othValue, arrValue, index, other, array, stack)
  32646. : customizer(arrValue, othValue, index, array, other, stack);
  32647. }
  32648. if (compared !== undefined) {
  32649. if (compared) {
  32650. continue;
  32651. }
  32652. result = false;
  32653. break;
  32654. }
  32655. // Recursively compare arrays (susceptible to call stack limits).
  32656. if (seen) {
  32657. if (!arraySome(other, function(othValue, othIndex) {
  32658. if (!seen.has(othIndex) &&
  32659. (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {
  32660. return seen.add(othIndex);
  32661. }
  32662. })) {
  32663. result = false;
  32664. break;
  32665. }
  32666. } else if (!(
  32667. arrValue === othValue ||
  32668. equalFunc(arrValue, othValue, customizer, bitmask, stack)
  32669. )) {
  32670. result = false;
  32671. break;
  32672. }
  32673. }
  32674. stack['delete'](array);
  32675. stack['delete'](other);
  32676. return result;
  32677. }
  32678. /**
  32679. * A specialized version of `baseIsEqualDeep` for comparing objects of
  32680. * the same `toStringTag`.
  32681. *
  32682. * **Note:** This function only supports comparing values with tags of
  32683. * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
  32684. *
  32685. * @private
  32686. * @param {Object} object The object to compare.
  32687. * @param {Object} other The other object to compare.
  32688. * @param {string} tag The `toStringTag` of the objects to compare.
  32689. * @param {Function} equalFunc The function to determine equivalents of values.
  32690. * @param {Function} customizer The function to customize comparisons.
  32691. * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
  32692. * for more details.
  32693. * @param {Object} stack Tracks traversed `object` and `other` objects.
  32694. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  32695. */
  32696. function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
  32697. switch (tag) {
  32698. case dataViewTag:
  32699. if ((object.byteLength != other.byteLength) ||
  32700. (object.byteOffset != other.byteOffset)) {
  32701. return false;
  32702. }
  32703. object = object.buffer;
  32704. other = other.buffer;
  32705. case arrayBufferTag:
  32706. if ((object.byteLength != other.byteLength) ||
  32707. !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
  32708. return false;
  32709. }
  32710. return true;
  32711. case boolTag:
  32712. case dateTag:
  32713. case numberTag:
  32714. // Coerce booleans to `1` or `0` and dates to milliseconds.
  32715. // Invalid dates are coerced to `NaN`.
  32716. return eq(+object, +other);
  32717. case errorTag:
  32718. return object.name == other.name && object.message == other.message;
  32719. case regexpTag:
  32720. case stringTag:
  32721. // Coerce regexes to strings and treat strings, primitives and objects,
  32722. // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
  32723. // for more details.
  32724. return object == (other + '');
  32725. case mapTag:
  32726. var convert = mapToArray;
  32727. case setTag:
  32728. var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
  32729. convert || (convert = setToArray);
  32730. if (object.size != other.size && !isPartial) {
  32731. return false;
  32732. }
  32733. // Assume cyclic values are equal.
  32734. var stacked = stack.get(object);
  32735. if (stacked) {
  32736. return stacked == other;
  32737. }
  32738. bitmask |= UNORDERED_COMPARE_FLAG;
  32739. // Recursively compare objects (susceptible to call stack limits).
  32740. stack.set(object, other);
  32741. var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);
  32742. stack['delete'](object);
  32743. return result;
  32744. case symbolTag:
  32745. if (symbolValueOf) {
  32746. return symbolValueOf.call(object) == symbolValueOf.call(other);
  32747. }
  32748. }
  32749. return false;
  32750. }
  32751. /**
  32752. * A specialized version of `baseIsEqualDeep` for objects with support for
  32753. * partial deep comparisons.
  32754. *
  32755. * @private
  32756. * @param {Object} object The object to compare.
  32757. * @param {Object} other The other object to compare.
  32758. * @param {Function} equalFunc The function to determine equivalents of values.
  32759. * @param {Function} customizer The function to customize comparisons.
  32760. * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
  32761. * for more details.
  32762. * @param {Object} stack Tracks traversed `object` and `other` objects.
  32763. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  32764. */
  32765. function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
  32766. var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
  32767. objProps = keys(object),
  32768. objLength = objProps.length,
  32769. othProps = keys(other),
  32770. othLength = othProps.length;
  32771. if (objLength != othLength && !isPartial) {
  32772. return false;
  32773. }
  32774. var index = objLength;
  32775. while (index--) {
  32776. var key = objProps[index];
  32777. if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
  32778. return false;
  32779. }
  32780. }
  32781. // Assume cyclic values are equal.
  32782. var stacked = stack.get(object);
  32783. if (stacked && stack.get(other)) {
  32784. return stacked == other;
  32785. }
  32786. var result = true;
  32787. stack.set(object, other);
  32788. stack.set(other, object);
  32789. var skipCtor = isPartial;
  32790. while (++index < objLength) {
  32791. key = objProps[index];
  32792. var objValue = object[key],
  32793. othValue = other[key];
  32794. if (customizer) {
  32795. var compared = isPartial
  32796. ? customizer(othValue, objValue, key, other, object, stack)
  32797. : customizer(objValue, othValue, key, object, other, stack);
  32798. }
  32799. // Recursively compare objects (susceptible to call stack limits).
  32800. if (!(compared === undefined
  32801. ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack))
  32802. : compared
  32803. )) {
  32804. result = false;
  32805. break;
  32806. }
  32807. skipCtor || (skipCtor = key == 'constructor');
  32808. }
  32809. if (result && !skipCtor) {
  32810. var objCtor = object.constructor,
  32811. othCtor = other.constructor;
  32812. // Non `Object` object instances with different constructors are not equal.
  32813. if (objCtor != othCtor &&
  32814. ('constructor' in object && 'constructor' in other) &&
  32815. !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
  32816. typeof othCtor == 'function' && othCtor instanceof othCtor)) {
  32817. result = false;
  32818. }
  32819. }
  32820. stack['delete'](object);
  32821. stack['delete'](other);
  32822. return result;
  32823. }
  32824. /**
  32825. * Gets the data for `map`.
  32826. *
  32827. * @private
  32828. * @param {Object} map The map to query.
  32829. * @param {string} key The reference key.
  32830. * @returns {*} Returns the map data.
  32831. */
  32832. function getMapData(map, key) {
  32833. var data = map.__data__;
  32834. return isKeyable(key)
  32835. ? data[typeof key == 'string' ? 'string' : 'hash']
  32836. : data.map;
  32837. }
  32838. /**
  32839. * Gets the property names, values, and compare flags of `object`.
  32840. *
  32841. * @private
  32842. * @param {Object} object The object to query.
  32843. * @returns {Array} Returns the match data of `object`.
  32844. */
  32845. function getMatchData(object) {
  32846. var result = keys(object),
  32847. length = result.length;
  32848. while (length--) {
  32849. var key = result[length],
  32850. value = object[key];
  32851. result[length] = [key, value, isStrictComparable(value)];
  32852. }
  32853. return result;
  32854. }
  32855. /**
  32856. * Gets the native function at `key` of `object`.
  32857. *
  32858. * @private
  32859. * @param {Object} object The object to query.
  32860. * @param {string} key The key of the method to get.
  32861. * @returns {*} Returns the function if it's native, else `undefined`.
  32862. */
  32863. function getNative(object, key) {
  32864. var value = getValue(object, key);
  32865. return baseIsNative(value) ? value : undefined;
  32866. }
  32867. /**
  32868. * Gets the `toStringTag` of `value`.
  32869. *
  32870. * @private
  32871. * @param {*} value The value to query.
  32872. * @returns {string} Returns the `toStringTag`.
  32873. */
  32874. var getTag = baseGetTag;
  32875. // Fallback for data views, maps, sets, and weak maps in IE 11,
  32876. // for data views in Edge < 14, and promises in Node.js.
  32877. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
  32878. (Map && getTag(new Map) != mapTag) ||
  32879. (Promise && getTag(Promise.resolve()) != promiseTag) ||
  32880. (Set && getTag(new Set) != setTag) ||
  32881. (WeakMap && getTag(new WeakMap) != weakMapTag)) {
  32882. getTag = function(value) {
  32883. var result = objectToString.call(value),
  32884. Ctor = result == objectTag ? value.constructor : undefined,
  32885. ctorString = Ctor ? toSource(Ctor) : undefined;
  32886. if (ctorString) {
  32887. switch (ctorString) {
  32888. case dataViewCtorString: return dataViewTag;
  32889. case mapCtorString: return mapTag;
  32890. case promiseCtorString: return promiseTag;
  32891. case setCtorString: return setTag;
  32892. case weakMapCtorString: return weakMapTag;
  32893. }
  32894. }
  32895. return result;
  32896. };
  32897. }
  32898. /**
  32899. * Checks if `path` exists on `object`.
  32900. *
  32901. * @private
  32902. * @param {Object} object The object to query.
  32903. * @param {Array|string} path The path to check.
  32904. * @param {Function} hasFunc The function to check properties.
  32905. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  32906. */
  32907. function hasPath(object, path, hasFunc) {
  32908. path = isKey(path, object) ? [path] : castPath(path);
  32909. var result,
  32910. index = -1,
  32911. length = path.length;
  32912. while (++index < length) {
  32913. var key = toKey(path[index]);
  32914. if (!(result = object != null && hasFunc(object, key))) {
  32915. break;
  32916. }
  32917. object = object[key];
  32918. }
  32919. if (result) {
  32920. return result;
  32921. }
  32922. var length = object ? object.length : 0;
  32923. return !!length && isLength(length) && isIndex(key, length) &&
  32924. (isArray(object) || isArguments(object));
  32925. }
  32926. /**
  32927. * Checks if `value` is a valid array-like index.
  32928. *
  32929. * @private
  32930. * @param {*} value The value to check.
  32931. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  32932. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  32933. */
  32934. function isIndex(value, length) {
  32935. length = length == null ? MAX_SAFE_INTEGER : length;
  32936. return !!length &&
  32937. (typeof value == 'number' || reIsUint.test(value)) &&
  32938. (value > -1 && value % 1 == 0 && value < length);
  32939. }
  32940. /**
  32941. * Checks if `value` is a property name and not a property path.
  32942. *
  32943. * @private
  32944. * @param {*} value The value to check.
  32945. * @param {Object} [object] The object to query keys on.
  32946. * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
  32947. */
  32948. function isKey(value, object) {
  32949. if (isArray(value)) {
  32950. return false;
  32951. }
  32952. var type = typeof value;
  32953. if (type == 'number' || type == 'symbol' || type == 'boolean' ||
  32954. value == null || isSymbol(value)) {
  32955. return true;
  32956. }
  32957. return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
  32958. (object != null && value in Object(object));
  32959. }
  32960. /**
  32961. * Checks if `value` is suitable for use as unique object key.
  32962. *
  32963. * @private
  32964. * @param {*} value The value to check.
  32965. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  32966. */
  32967. function isKeyable(value) {
  32968. var type = typeof value;
  32969. return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
  32970. ? (value !== '__proto__')
  32971. : (value === null);
  32972. }
  32973. /**
  32974. * Checks if `func` has its source masked.
  32975. *
  32976. * @private
  32977. * @param {Function} func The function to check.
  32978. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  32979. */
  32980. function isMasked(func) {
  32981. return !!maskSrcKey && (maskSrcKey in func);
  32982. }
  32983. /**
  32984. * Checks if `value` is likely a prototype object.
  32985. *
  32986. * @private
  32987. * @param {*} value The value to check.
  32988. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
  32989. */
  32990. function isPrototype(value) {
  32991. var Ctor = value && value.constructor,
  32992. proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
  32993. return value === proto;
  32994. }
  32995. /**
  32996. * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
  32997. *
  32998. * @private
  32999. * @param {*} value The value to check.
  33000. * @returns {boolean} Returns `true` if `value` if suitable for strict
  33001. * equality comparisons, else `false`.
  33002. */
  33003. function isStrictComparable(value) {
  33004. return value === value && !isObject(value);
  33005. }
  33006. /**
  33007. * A specialized version of `matchesProperty` for source values suitable
  33008. * for strict equality comparisons, i.e. `===`.
  33009. *
  33010. * @private
  33011. * @param {string} key The key of the property to get.
  33012. * @param {*} srcValue The value to match.
  33013. * @returns {Function} Returns the new spec function.
  33014. */
  33015. function matchesStrictComparable(key, srcValue) {
  33016. return function(object) {
  33017. if (object == null) {
  33018. return false;
  33019. }
  33020. return object[key] === srcValue &&
  33021. (srcValue !== undefined || (key in Object(object)));
  33022. };
  33023. }
  33024. /**
  33025. * Converts `string` to a property path array.
  33026. *
  33027. * @private
  33028. * @param {string} string The string to convert.
  33029. * @returns {Array} Returns the property path array.
  33030. */
  33031. var stringToPath = memoize(function(string) {
  33032. string = toString(string);
  33033. var result = [];
  33034. if (reLeadingDot.test(string)) {
  33035. result.push('');
  33036. }
  33037. string.replace(rePropName, function(match, number, quote, string) {
  33038. result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
  33039. });
  33040. return result;
  33041. });
  33042. /**
  33043. * Converts `value` to a string key if it's not a string or symbol.
  33044. *
  33045. * @private
  33046. * @param {*} value The value to inspect.
  33047. * @returns {string|symbol} Returns the key.
  33048. */
  33049. function toKey(value) {
  33050. if (typeof value == 'string' || isSymbol(value)) {
  33051. return value;
  33052. }
  33053. var result = (value + '');
  33054. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  33055. }
  33056. /**
  33057. * Converts `func` to its source code.
  33058. *
  33059. * @private
  33060. * @param {Function} func The function to process.
  33061. * @returns {string} Returns the source code.
  33062. */
  33063. function toSource(func) {
  33064. if (func != null) {
  33065. try {
  33066. return funcToString.call(func);
  33067. } catch (e) {}
  33068. try {
  33069. return (func + '');
  33070. } catch (e) {}
  33071. }
  33072. return '';
  33073. }
  33074. /**
  33075. * This method is like `_.sortBy` except that it allows specifying the sort
  33076. * orders of the iteratees to sort by. If `orders` is unspecified, all values
  33077. * are sorted in ascending order. Otherwise, specify an order of "desc" for
  33078. * descending or "asc" for ascending sort order of corresponding values.
  33079. *
  33080. * @static
  33081. * @memberOf _
  33082. * @since 4.0.0
  33083. * @category Collection
  33084. * @param {Array|Object} collection The collection to iterate over.
  33085. * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
  33086. * The iteratees to sort by.
  33087. * @param {string[]} [orders] The sort orders of `iteratees`.
  33088. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
  33089. * @returns {Array} Returns the new sorted array.
  33090. * @example
  33091. *
  33092. * var users = [
  33093. * { 'user': 'fred', 'age': 48 },
  33094. * { 'user': 'barney', 'age': 34 },
  33095. * { 'user': 'fred', 'age': 40 },
  33096. * { 'user': 'barney', 'age': 36 }
  33097. * ];
  33098. *
  33099. * // Sort by `user` in ascending order and by `age` in descending order.
  33100. * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
  33101. * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
  33102. */
  33103. function orderBy(collection, iteratees, orders, guard) {
  33104. if (collection == null) {
  33105. return [];
  33106. }
  33107. if (!isArray(iteratees)) {
  33108. iteratees = iteratees == null ? [] : [iteratees];
  33109. }
  33110. orders = guard ? undefined : orders;
  33111. if (!isArray(orders)) {
  33112. orders = orders == null ? [] : [orders];
  33113. }
  33114. return baseOrderBy(collection, iteratees, orders);
  33115. }
  33116. /**
  33117. * Creates a function that memoizes the result of `func`. If `resolver` is
  33118. * provided, it determines the cache key for storing the result based on the
  33119. * arguments provided to the memoized function. By default, the first argument
  33120. * provided to the memoized function is used as the map cache key. The `func`
  33121. * is invoked with the `this` binding of the memoized function.
  33122. *
  33123. * **Note:** The cache is exposed as the `cache` property on the memoized
  33124. * function. Its creation may be customized by replacing the `_.memoize.Cache`
  33125. * constructor with one whose instances implement the
  33126. * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
  33127. * method interface of `delete`, `get`, `has`, and `set`.
  33128. *
  33129. * @static
  33130. * @memberOf _
  33131. * @since 0.1.0
  33132. * @category Function
  33133. * @param {Function} func The function to have its output memoized.
  33134. * @param {Function} [resolver] The function to resolve the cache key.
  33135. * @returns {Function} Returns the new memoized function.
  33136. * @example
  33137. *
  33138. * var object = { 'a': 1, 'b': 2 };
  33139. * var other = { 'c': 3, 'd': 4 };
  33140. *
  33141. * var values = _.memoize(_.values);
  33142. * values(object);
  33143. * // => [1, 2]
  33144. *
  33145. * values(other);
  33146. * // => [3, 4]
  33147. *
  33148. * object.a = 2;
  33149. * values(object);
  33150. * // => [1, 2]
  33151. *
  33152. * // Modify the result cache.
  33153. * values.cache.set(object, ['a', 'b']);
  33154. * values(object);
  33155. * // => ['a', 'b']
  33156. *
  33157. * // Replace `_.memoize.Cache`.
  33158. * _.memoize.Cache = WeakMap;
  33159. */
  33160. function memoize(func, resolver) {
  33161. if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
  33162. throw new TypeError(FUNC_ERROR_TEXT);
  33163. }
  33164. var memoized = function() {
  33165. var args = arguments,
  33166. key = resolver ? resolver.apply(this, args) : args[0],
  33167. cache = memoized.cache;
  33168. if (cache.has(key)) {
  33169. return cache.get(key);
  33170. }
  33171. var result = func.apply(this, args);
  33172. memoized.cache = cache.set(key, result);
  33173. return result;
  33174. };
  33175. memoized.cache = new (memoize.Cache || MapCache);
  33176. return memoized;
  33177. }
  33178. // Assign cache to `_.memoize`.
  33179. memoize.Cache = MapCache;
  33180. /**
  33181. * Performs a
  33182. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  33183. * comparison between two values to determine if they are equivalent.
  33184. *
  33185. * @static
  33186. * @memberOf _
  33187. * @since 4.0.0
  33188. * @category Lang
  33189. * @param {*} value The value to compare.
  33190. * @param {*} other The other value to compare.
  33191. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  33192. * @example
  33193. *
  33194. * var object = { 'a': 1 };
  33195. * var other = { 'a': 1 };
  33196. *
  33197. * _.eq(object, object);
  33198. * // => true
  33199. *
  33200. * _.eq(object, other);
  33201. * // => false
  33202. *
  33203. * _.eq('a', 'a');
  33204. * // => true
  33205. *
  33206. * _.eq('a', Object('a'));
  33207. * // => false
  33208. *
  33209. * _.eq(NaN, NaN);
  33210. * // => true
  33211. */
  33212. function eq(value, other) {
  33213. return value === other || (value !== value && other !== other);
  33214. }
  33215. /**
  33216. * Checks if `value` is likely an `arguments` object.
  33217. *
  33218. * @static
  33219. * @memberOf _
  33220. * @since 0.1.0
  33221. * @category Lang
  33222. * @param {*} value The value to check.
  33223. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  33224. * else `false`.
  33225. * @example
  33226. *
  33227. * _.isArguments(function() { return arguments; }());
  33228. * // => true
  33229. *
  33230. * _.isArguments([1, 2, 3]);
  33231. * // => false
  33232. */
  33233. function isArguments(value) {
  33234. // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
  33235. return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
  33236. (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
  33237. }
  33238. /**
  33239. * Checks if `value` is classified as an `Array` object.
  33240. *
  33241. * @static
  33242. * @memberOf _
  33243. * @since 0.1.0
  33244. * @category Lang
  33245. * @param {*} value The value to check.
  33246. * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  33247. * @example
  33248. *
  33249. * _.isArray([1, 2, 3]);
  33250. * // => true
  33251. *
  33252. * _.isArray(document.body.children);
  33253. * // => false
  33254. *
  33255. * _.isArray('abc');
  33256. * // => false
  33257. *
  33258. * _.isArray(_.noop);
  33259. * // => false
  33260. */
  33261. var isArray = Array.isArray;
  33262. /**
  33263. * Checks if `value` is array-like. A value is considered array-like if it's
  33264. * not a function and has a `value.length` that's an integer greater than or
  33265. * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
  33266. *
  33267. * @static
  33268. * @memberOf _
  33269. * @since 4.0.0
  33270. * @category Lang
  33271. * @param {*} value The value to check.
  33272. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  33273. * @example
  33274. *
  33275. * _.isArrayLike([1, 2, 3]);
  33276. * // => true
  33277. *
  33278. * _.isArrayLike(document.body.children);
  33279. * // => true
  33280. *
  33281. * _.isArrayLike('abc');
  33282. * // => true
  33283. *
  33284. * _.isArrayLike(_.noop);
  33285. * // => false
  33286. */
  33287. function isArrayLike(value) {
  33288. return value != null && isLength(value.length) && !isFunction(value);
  33289. }
  33290. /**
  33291. * This method is like `_.isArrayLike` except that it also checks if `value`
  33292. * is an object.
  33293. *
  33294. * @static
  33295. * @memberOf _
  33296. * @since 4.0.0
  33297. * @category Lang
  33298. * @param {*} value The value to check.
  33299. * @returns {boolean} Returns `true` if `value` is an array-like object,
  33300. * else `false`.
  33301. * @example
  33302. *
  33303. * _.isArrayLikeObject([1, 2, 3]);
  33304. * // => true
  33305. *
  33306. * _.isArrayLikeObject(document.body.children);
  33307. * // => true
  33308. *
  33309. * _.isArrayLikeObject('abc');
  33310. * // => false
  33311. *
  33312. * _.isArrayLikeObject(_.noop);
  33313. * // => false
  33314. */
  33315. function isArrayLikeObject(value) {
  33316. return isObjectLike(value) && isArrayLike(value);
  33317. }
  33318. /**
  33319. * Checks if `value` is classified as a `Function` object.
  33320. *
  33321. * @static
  33322. * @memberOf _
  33323. * @since 0.1.0
  33324. * @category Lang
  33325. * @param {*} value The value to check.
  33326. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  33327. * @example
  33328. *
  33329. * _.isFunction(_);
  33330. * // => true
  33331. *
  33332. * _.isFunction(/abc/);
  33333. * // => false
  33334. */
  33335. function isFunction(value) {
  33336. // The use of `Object#toString` avoids issues with the `typeof` operator
  33337. // in Safari 8-9 which returns 'object' for typed array and other constructors.
  33338. var tag = isObject(value) ? objectToString.call(value) : '';
  33339. return tag == funcTag || tag == genTag;
  33340. }
  33341. /**
  33342. * Checks if `value` is a valid array-like length.
  33343. *
  33344. * **Note:** This method is loosely based on
  33345. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  33346. *
  33347. * @static
  33348. * @memberOf _
  33349. * @since 4.0.0
  33350. * @category Lang
  33351. * @param {*} value The value to check.
  33352. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  33353. * @example
  33354. *
  33355. * _.isLength(3);
  33356. * // => true
  33357. *
  33358. * _.isLength(Number.MIN_VALUE);
  33359. * // => false
  33360. *
  33361. * _.isLength(Infinity);
  33362. * // => false
  33363. *
  33364. * _.isLength('3');
  33365. * // => false
  33366. */
  33367. function isLength(value) {
  33368. return typeof value == 'number' &&
  33369. value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  33370. }
  33371. /**
  33372. * Checks if `value` is the
  33373. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  33374. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  33375. *
  33376. * @static
  33377. * @memberOf _
  33378. * @since 0.1.0
  33379. * @category Lang
  33380. * @param {*} value The value to check.
  33381. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  33382. * @example
  33383. *
  33384. * _.isObject({});
  33385. * // => true
  33386. *
  33387. * _.isObject([1, 2, 3]);
  33388. * // => true
  33389. *
  33390. * _.isObject(_.noop);
  33391. * // => true
  33392. *
  33393. * _.isObject(null);
  33394. * // => false
  33395. */
  33396. function isObject(value) {
  33397. var type = typeof value;
  33398. return !!value && (type == 'object' || type == 'function');
  33399. }
  33400. /**
  33401. * Checks if `value` is object-like. A value is object-like if it's not `null`
  33402. * and has a `typeof` result of "object".
  33403. *
  33404. * @static
  33405. * @memberOf _
  33406. * @since 4.0.0
  33407. * @category Lang
  33408. * @param {*} value The value to check.
  33409. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  33410. * @example
  33411. *
  33412. * _.isObjectLike({});
  33413. * // => true
  33414. *
  33415. * _.isObjectLike([1, 2, 3]);
  33416. * // => true
  33417. *
  33418. * _.isObjectLike(_.noop);
  33419. * // => false
  33420. *
  33421. * _.isObjectLike(null);
  33422. * // => false
  33423. */
  33424. function isObjectLike(value) {
  33425. return !!value && typeof value == 'object';
  33426. }
  33427. /**
  33428. * Checks if `value` is classified as a `Symbol` primitive or object.
  33429. *
  33430. * @static
  33431. * @memberOf _
  33432. * @since 4.0.0
  33433. * @category Lang
  33434. * @param {*} value The value to check.
  33435. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  33436. * @example
  33437. *
  33438. * _.isSymbol(Symbol.iterator);
  33439. * // => true
  33440. *
  33441. * _.isSymbol('abc');
  33442. * // => false
  33443. */
  33444. function isSymbol(value) {
  33445. return typeof value == 'symbol' ||
  33446. (isObjectLike(value) && objectToString.call(value) == symbolTag);
  33447. }
  33448. /**
  33449. * Checks if `value` is classified as a typed array.
  33450. *
  33451. * @static
  33452. * @memberOf _
  33453. * @since 3.0.0
  33454. * @category Lang
  33455. * @param {*} value The value to check.
  33456. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  33457. * @example
  33458. *
  33459. * _.isTypedArray(new Uint8Array);
  33460. * // => true
  33461. *
  33462. * _.isTypedArray([]);
  33463. * // => false
  33464. */
  33465. var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
  33466. /**
  33467. * Converts `value` to a string. An empty string is returned for `null`
  33468. * and `undefined` values. The sign of `-0` is preserved.
  33469. *
  33470. * @static
  33471. * @memberOf _
  33472. * @since 4.0.0
  33473. * @category Lang
  33474. * @param {*} value The value to process.
  33475. * @returns {string} Returns the string.
  33476. * @example
  33477. *
  33478. * _.toString(null);
  33479. * // => ''
  33480. *
  33481. * _.toString(-0);
  33482. * // => '-0'
  33483. *
  33484. * _.toString([1, 2, 3]);
  33485. * // => '1,2,3'
  33486. */
  33487. function toString(value) {
  33488. return value == null ? '' : baseToString(value);
  33489. }
  33490. /**
  33491. * Gets the value at `path` of `object`. If the resolved value is
  33492. * `undefined`, the `defaultValue` is returned in its place.
  33493. *
  33494. * @static
  33495. * @memberOf _
  33496. * @since 3.7.0
  33497. * @category Object
  33498. * @param {Object} object The object to query.
  33499. * @param {Array|string} path The path of the property to get.
  33500. * @param {*} [defaultValue] The value returned for `undefined` resolved values.
  33501. * @returns {*} Returns the resolved value.
  33502. * @example
  33503. *
  33504. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  33505. *
  33506. * _.get(object, 'a[0].b.c');
  33507. * // => 3
  33508. *
  33509. * _.get(object, ['a', '0', 'b', 'c']);
  33510. * // => 3
  33511. *
  33512. * _.get(object, 'a.b.c', 'default');
  33513. * // => 'default'
  33514. */
  33515. function get(object, path, defaultValue) {
  33516. var result = object == null ? undefined : baseGet(object, path);
  33517. return result === undefined ? defaultValue : result;
  33518. }
  33519. /**
  33520. * Checks if `path` is a direct or inherited property of `object`.
  33521. *
  33522. * @static
  33523. * @memberOf _
  33524. * @since 4.0.0
  33525. * @category Object
  33526. * @param {Object} object The object to query.
  33527. * @param {Array|string} path The path to check.
  33528. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  33529. * @example
  33530. *
  33531. * var object = _.create({ 'a': _.create({ 'b': 2 }) });
  33532. *
  33533. * _.hasIn(object, 'a');
  33534. * // => true
  33535. *
  33536. * _.hasIn(object, 'a.b');
  33537. * // => true
  33538. *
  33539. * _.hasIn(object, ['a', 'b']);
  33540. * // => true
  33541. *
  33542. * _.hasIn(object, 'b');
  33543. * // => false
  33544. */
  33545. function hasIn(object, path) {
  33546. return object != null && hasPath(object, path, baseHasIn);
  33547. }
  33548. /**
  33549. * Creates an array of the own enumerable property names of `object`.
  33550. *
  33551. * **Note:** Non-object values are coerced to objects. See the
  33552. * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  33553. * for more details.
  33554. *
  33555. * @static
  33556. * @since 0.1.0
  33557. * @memberOf _
  33558. * @category Object
  33559. * @param {Object} object The object to query.
  33560. * @returns {Array} Returns the array of property names.
  33561. * @example
  33562. *
  33563. * function Foo() {
  33564. * this.a = 1;
  33565. * this.b = 2;
  33566. * }
  33567. *
  33568. * Foo.prototype.c = 3;
  33569. *
  33570. * _.keys(new Foo);
  33571. * // => ['a', 'b'] (iteration order is not guaranteed)
  33572. *
  33573. * _.keys('hi');
  33574. * // => ['0', '1']
  33575. */
  33576. function keys(object) {
  33577. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  33578. }
  33579. /**
  33580. * This method returns the first argument it receives.
  33581. *
  33582. * @static
  33583. * @since 0.1.0
  33584. * @memberOf _
  33585. * @category Util
  33586. * @param {*} value Any value.
  33587. * @returns {*} Returns `value`.
  33588. * @example
  33589. *
  33590. * var object = { 'a': 1 };
  33591. *
  33592. * console.log(_.identity(object) === object);
  33593. * // => true
  33594. */
  33595. function identity(value) {
  33596. return value;
  33597. }
  33598. /**
  33599. * Creates a function that returns the value at `path` of a given object.
  33600. *
  33601. * @static
  33602. * @memberOf _
  33603. * @since 2.4.0
  33604. * @category Util
  33605. * @param {Array|string} path The path of the property to get.
  33606. * @returns {Function} Returns the new accessor function.
  33607. * @example
  33608. *
  33609. * var objects = [
  33610. * { 'a': { 'b': 2 } },
  33611. * { 'a': { 'b': 1 } }
  33612. * ];
  33613. *
  33614. * _.map(objects, _.property('a.b'));
  33615. * // => [2, 1]
  33616. *
  33617. * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
  33618. * // => [1, 2]
  33619. */
  33620. function property(path) {
  33621. return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
  33622. }
  33623. module.exports = orderBy;
  33624. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("698d"), __webpack_require__("f586")(module)))
  33625. /***/ }),
  33626. /***/ "b1eb":
  33627. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  33628. "use strict";
  33629. __webpack_require__.r(__webpack_exports__);
  33630. /* harmony import */ var _VideoPlayer_vue_vue_type_template_id_4df6cab8___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("c363");
  33631. /* harmony import */ var _VideoPlayer_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("14f6");
  33632. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _VideoPlayer_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _VideoPlayer_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  33633. /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b429");
  33634. /* normalize component */
  33635. var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
  33636. _VideoPlayer_vue_vue_type_script_lang_ts___WEBPACK_IMPORTED_MODULE_1__["default"],
  33637. _VideoPlayer_vue_vue_type_template_id_4df6cab8___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
  33638. _VideoPlayer_vue_vue_type_template_id_4df6cab8___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
  33639. false,
  33640. null,
  33641. null,
  33642. null
  33643. )
  33644. /* harmony default export */ __webpack_exports__["default"] = (component.exports);
  33645. /***/ }),
  33646. /***/ "b397":
  33647. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  33648. "use strict";
  33649. __webpack_require__.r(__webpack_exports__);
  33650. /* harmony import */ var _TablePopup_vue_vue_type_template_id_1c51b447___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("3e59");
  33651. /* harmony import */ var _TablePopup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("e4fa");
  33652. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _TablePopup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _TablePopup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  33653. /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b429");
  33654. /* normalize component */
  33655. var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
  33656. _TablePopup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
  33657. _TablePopup_vue_vue_type_template_id_1c51b447___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
  33658. _TablePopup_vue_vue_type_template_id_1c51b447___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
  33659. false,
  33660. null,
  33661. null,
  33662. null
  33663. )
  33664. /* harmony default export */ __webpack_exports__["default"] = (component.exports);
  33665. /***/ }),
  33666. /***/ "b429":
  33667. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  33668. "use strict";
  33669. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
  33670. /* globals __VUE_SSR_CONTEXT__ */
  33671. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  33672. // This module is a runtime utility for cleaner component module output and will
  33673. // be included in the final webpack user bundle.
  33674. function normalizeComponent (
  33675. scriptExports,
  33676. render,
  33677. staticRenderFns,
  33678. functionalTemplate,
  33679. injectStyles,
  33680. scopeId,
  33681. moduleIdentifier, /* server only */
  33682. shadowMode /* vue-cli only */
  33683. ) {
  33684. // Vue.extend constructor export interop
  33685. var options = typeof scriptExports === 'function'
  33686. ? scriptExports.options
  33687. : scriptExports
  33688. // render functions
  33689. if (render) {
  33690. options.render = render
  33691. options.staticRenderFns = staticRenderFns
  33692. options._compiled = true
  33693. }
  33694. // functional template
  33695. if (functionalTemplate) {
  33696. options.functional = true
  33697. }
  33698. // scopedId
  33699. if (scopeId) {
  33700. options._scopeId = 'data-v-' + scopeId
  33701. }
  33702. var hook
  33703. if (moduleIdentifier) { // server build
  33704. hook = function (context) {
  33705. // 2.3 injection
  33706. context =
  33707. context || // cached call
  33708. (this.$vnode && this.$vnode.ssrContext) || // stateful
  33709. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  33710. // 2.2 with runInNewContext: true
  33711. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  33712. context = __VUE_SSR_CONTEXT__
  33713. }
  33714. // inject component styles
  33715. if (injectStyles) {
  33716. injectStyles.call(this, context)
  33717. }
  33718. // register component module identifier for async chunk inferrence
  33719. if (context && context._registeredComponents) {
  33720. context._registeredComponents.add(moduleIdentifier)
  33721. }
  33722. }
  33723. // used by ssr in case component is cached and beforeCreate
  33724. // never gets called
  33725. options._ssrRegister = hook
  33726. } else if (injectStyles) {
  33727. hook = shadowMode
  33728. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  33729. : injectStyles
  33730. }
  33731. if (hook) {
  33732. if (options.functional) {
  33733. // for template-only hot-reload because in that case the render fn doesn't
  33734. // go through the normalizer
  33735. options._injectStyles = hook
  33736. // register for functioal component in vue file
  33737. var originalRender = options.render
  33738. options.render = function renderWithStyleInjection (h, context) {
  33739. hook.call(context)
  33740. return originalRender(h, context)
  33741. }
  33742. } else {
  33743. // inject component registration as beforeCreate hook
  33744. var existing = options.beforeCreate
  33745. options.beforeCreate = existing
  33746. ? [].concat(existing, hook)
  33747. : [hook]
  33748. }
  33749. }
  33750. return {
  33751. exports: scriptExports,
  33752. options: options
  33753. }
  33754. }
  33755. /***/ }),
  33756. /***/ "b556":
  33757. /***/ (function(module, exports, __webpack_require__) {
  33758. "use strict";
  33759. // Copyright Joyent, Inc. and other Node contributors.
  33760. //
  33761. // Permission is hereby granted, free of charge, to any person obtaining a
  33762. // copy of this software and associated documentation files (the
  33763. // "Software"), to deal in the Software without restriction, including
  33764. // without limitation the rights to use, copy, modify, merge, publish,
  33765. // distribute, sublicense, and/or sell copies of the Software, and to permit
  33766. // persons to whom the Software is furnished to do so, subject to the
  33767. // following conditions:
  33768. //
  33769. // The above copyright notice and this permission notice shall be included
  33770. // in all copies or substantial portions of the Software.
  33771. //
  33772. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  33773. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  33774. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  33775. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  33776. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  33777. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  33778. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  33779. // a transform stream is a readable/writable stream where you do
  33780. // something with the data. Sometimes it's called a "filter",
  33781. // but that's not a great name for it, since that implies a thing where
  33782. // some bits pass through, and others are simply ignored. (That would
  33783. // be a valid example of a transform, of course.)
  33784. //
  33785. // While the output is causally related to the input, it's not a
  33786. // necessarily symmetric or synchronous transformation. For example,
  33787. // a zlib stream might take multiple plain-text writes(), and then
  33788. // emit a single compressed chunk some time in the future.
  33789. //
  33790. // Here's how this works:
  33791. //
  33792. // The Transform stream has all the aspects of the readable and writable
  33793. // stream classes. When you write(chunk), that calls _write(chunk,cb)
  33794. // internally, and returns false if there's a lot of pending writes
  33795. // buffered up. When you call read(), that calls _read(n) until
  33796. // there's enough pending readable data buffered up.
  33797. //
  33798. // In a transform stream, the written data is placed in a buffer. When
  33799. // _read(n) is called, it transforms the queued up data, calling the
  33800. // buffered _write cb's as it consumes chunks. If consuming a single
  33801. // written chunk would result in multiple output chunks, then the first
  33802. // outputted bit calls the readcb, and subsequent chunks just go into
  33803. // the read buffer, and will cause it to emit 'readable' if necessary.
  33804. //
  33805. // This way, back-pressure is actually determined by the reading side,
  33806. // since _read has to be called to start processing a new chunk. However,
  33807. // a pathological inflate type of transform can cause excessive buffering
  33808. // here. For example, imagine a stream where every byte of input is
  33809. // interpreted as an integer from 0-255, and then results in that many
  33810. // bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
  33811. // 1kb of data being output. In this case, you could write a very small
  33812. // amount of input, and end up with a very large amount of output. In
  33813. // such a pathological inflating mechanism, there'd be no way to tell
  33814. // the system to stop doing the transform. A single 4MB write could
  33815. // cause the system to run out of memory.
  33816. //
  33817. // However, even in such a pathological case, only a single written chunk
  33818. // would be consumed, and then the rest would wait (un-transformed) until
  33819. // the results of the previous transformed chunk were consumed.
  33820. module.exports = Transform;
  33821. var Duplex = __webpack_require__("d711");
  33822. /*<replacement>*/
  33823. var util = __webpack_require__("9107");
  33824. util.inherits = __webpack_require__("fe04");
  33825. /*</replacement>*/
  33826. util.inherits(Transform, Duplex);
  33827. function afterTransform(er, data) {
  33828. var ts = this._transformState;
  33829. ts.transforming = false;
  33830. var cb = ts.writecb;
  33831. if (!cb) {
  33832. return this.emit('error', new Error('write callback called multiple times'));
  33833. }
  33834. ts.writechunk = null;
  33835. ts.writecb = null;
  33836. if (data != null) // single equals check for both `null` and `undefined`
  33837. this.push(data);
  33838. cb(er);
  33839. var rs = this._readableState;
  33840. rs.reading = false;
  33841. if (rs.needReadable || rs.length < rs.highWaterMark) {
  33842. this._read(rs.highWaterMark);
  33843. }
  33844. }
  33845. function Transform(options) {
  33846. if (!(this instanceof Transform)) return new Transform(options);
  33847. Duplex.call(this, options);
  33848. this._transformState = {
  33849. afterTransform: afterTransform.bind(this),
  33850. needTransform: false,
  33851. transforming: false,
  33852. writecb: null,
  33853. writechunk: null,
  33854. writeencoding: null
  33855. };
  33856. // start out asking for a readable event once data is transformed.
  33857. this._readableState.needReadable = true;
  33858. // we have implemented the _read method, and done the other things
  33859. // that Readable wants before the first _read call, so unset the
  33860. // sync guard flag.
  33861. this._readableState.sync = false;
  33862. if (options) {
  33863. if (typeof options.transform === 'function') this._transform = options.transform;
  33864. if (typeof options.flush === 'function') this._flush = options.flush;
  33865. }
  33866. // When the writable side finishes, then flush out anything remaining.
  33867. this.on('prefinish', prefinish);
  33868. }
  33869. function prefinish() {
  33870. var _this = this;
  33871. if (typeof this._flush === 'function') {
  33872. this._flush(function (er, data) {
  33873. done(_this, er, data);
  33874. });
  33875. } else {
  33876. done(this, null, null);
  33877. }
  33878. }
  33879. Transform.prototype.push = function (chunk, encoding) {
  33880. this._transformState.needTransform = false;
  33881. return Duplex.prototype.push.call(this, chunk, encoding);
  33882. };
  33883. // This is the part where you do stuff!
  33884. // override this function in implementation classes.
  33885. // 'chunk' is an input chunk.
  33886. //
  33887. // Call `push(newChunk)` to pass along transformed output
  33888. // to the readable side. You may call 'push' zero or more times.
  33889. //
  33890. // Call `cb(err)` when you are done with this chunk. If you pass
  33891. // an error, then that'll put the hurt on the whole operation. If you
  33892. // never call cb(), then you'll never get another chunk.
  33893. Transform.prototype._transform = function (chunk, encoding, cb) {
  33894. throw new Error('_transform() is not implemented');
  33895. };
  33896. Transform.prototype._write = function (chunk, encoding, cb) {
  33897. var ts = this._transformState;
  33898. ts.writecb = cb;
  33899. ts.writechunk = chunk;
  33900. ts.writeencoding = encoding;
  33901. if (!ts.transforming) {
  33902. var rs = this._readableState;
  33903. if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
  33904. }
  33905. };
  33906. // Doesn't matter what the args are here.
  33907. // _transform does all the work.
  33908. // That we got here means that the readable side wants more data.
  33909. Transform.prototype._read = function (n) {
  33910. var ts = this._transformState;
  33911. if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
  33912. ts.transforming = true;
  33913. this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
  33914. } else {
  33915. // mark that we need a transform, so that any data that comes in
  33916. // will get processed, now that we've asked for it.
  33917. ts.needTransform = true;
  33918. }
  33919. };
  33920. Transform.prototype._destroy = function (err, cb) {
  33921. var _this2 = this;
  33922. Duplex.prototype._destroy.call(this, err, function (err2) {
  33923. cb(err2);
  33924. _this2.emit('close');
  33925. });
  33926. };
  33927. function done(stream, er, data) {
  33928. if (er) return stream.emit('error', er);
  33929. if (data != null) // single equals check for both `null` and `undefined`
  33930. stream.push(data);
  33931. // if there's nothing in the write buffer, then that means
  33932. // that nothing more will ever be provided
  33933. if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');
  33934. if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');
  33935. return stream.push(null);
  33936. }
  33937. /***/ }),
  33938. /***/ "b557":
  33939. /***/ (function(module, exports) {
  33940. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhYAAAD+CAYAAABmz0wVAAAABGdBTUEAALGPC/xhBQAADXRJREFUeAHt3DFulAcYRVEcsRiW4X2wAAqUiobCVHFBQ4UosgD24WWwGyIKSxTDs681lsb5T5pE8z5PPMdIXM0Irj5/v/v56sL/+fj2+urCv0XfHgECBAgQeHaBl/B79l/PruB/QIAAAQIECBxG4Oq+frwrcJifuRdKgAABAgTOLnDfE96xODutJyRAgAABAscVEBbH/dl75QQIECBA4OwCwuLspJ6QAAECBAgcV0BYHPdn75UTIECAAIGzCwiLs5N6QgIECBAgcFyB1w+99C9v3l/833Px0GuwEyBAgAABAucR+PDj2/y7pR4Mi1/fxkNPcp5v1bMQIECAAAEClyzwmDcbfBRyyT9B3xsBAgQIEHhhAo96x+L+Nf19+6+PRe4x/JsAAQIECBxE4OvNu/nxx+8MKSx+feHdzT/Xvz+B/yZAgAABAgT+vwLXt5/uyqvzUUjRckuAAAECBAhMAWExeYwECBAgQIBAERAWRcstAQIECBAgMAWExeQxEiBAgAABAkVAWBQttwQIECBAgMAUEBaTx0iAAAECBAgUAWFRtNwSIECAAAECU0BYTB4jAQIECBAgUASERdFyS4AAAQIECEwBYTF5jAQIECBAgEAREBZFyy0BAgQIECAwBYTF5DESIECAAAECRUBYFC23BAgQIECAwBQQFpPHSIAAAQIECBQBYVG03BIgQIAAAQJTQFhMHiMBAgQIECBQBIRF0XJLgAABAgQITAFhMXmMBAgQIECAQBEQFkXLLQECBAgQIDAFhMXkMRIgQIAAAQJFQFgULbcECBAgQIDAFBAWk8dIgAABAgQIFAFhUbTcEiBAgAABAlNAWEweIwECBAgQIFAEhEXRckuAAAECBAhMAWExeYwECBAgQIBAERAWRcstAQIECBAgMAWExeQxEiBAgAABAkVAWBQttwQIECBAgMAUEBaTx0iAAAECBAgUAWFRtNwSIECAAAECU0BYTB4jAQIECBAgUASERdFyS4AAAQIECEwBYTF5jAQIECBAgEAREBZFyy0BAgQIECAwBYTF5DESIECAAAECRUBYFC23BAgQIECAwBQQFpPHSIAAAQIECBQBYVG03BIgQIAAAQJTQFhMHiMBAgQIECBQBIRF0XJLgAABAgQITAFhMXmMBAgQIECAQBEQFkXLLQECBAgQIDAFhMXkMRIgQIAAAQJFQFgULbcECBAgQIDAFBAWk8dIgAABAgQIFAFhUbTcEiBAgAABAlNAWEweIwECBAgQIFAEhEXRckuAAAECBAhMAWExeYwECBAgQIBAERAWRcstAQIECBAgMAWExeQxEiBAgAABAkVAWBQttwQIECBAgMAUEBaTx0iAAAECBAgUAWFRtNwSIECAAAECU0BYTB4jAQIECBAgUASERdFyS4AAAQIECEwBYTF5jAQIECBAgEAREBZFyy0BAgQIECAwBYTF5DESIECAAAECRUBYFC23BAgQIECAwBQQFpPHSIAAAQIECBQBYVG03BIgQIAAAQJTQFhMHiMBAgQIECBQBIRF0XJLgAABAgQITAFhMXmMBAgQIECAQBEQFkXLLQECBAgQIDAFhMXkMRIgQIAAAQJFQFgULbcECBAgQIDAFBAWk8dIgAABAgQIFAFhUbTcEiBAgAABAlNAWEweIwECBAgQIFAEhEXRckuAAAECBAhMAWExeYwECBAgQIBAERAWRcstAQIECBAgMAWExeQxEiBAgAABAkVAWBQttwQIECBAgMAUEBaTx0iAAAECBAgUAWFRtNwSIECAAAECU0BYTB4jAQIECBAgUASERdFyS4AAAQIECEwBYTF5jAQIECBAgEAREBZFyy0BAgQIECAwBYTF5DESIECAAAECRUBYFC23BAgQIECAwBQQFpPHSIAAAQIECBQBYVG03BIgQIAAAQJTQFhMHiMBAgQIECBQBIRF0XJLgAABAgQITAFhMXmMBAgQIECAQBEQFkXLLQECBAgQIDAFhMXkMRIgQIAAAQJFQFgULbcECBAgQIDAFBAWk8dIgAABAgQIFAFhUbTcEiBAgAABAlNAWEweIwECBAgQIFAEhEXRckuAAAECBAhMAWExeYwECBAgQIBAERAWRcstAQIECBAgMAWExeQxEiBAgAABAkVAWBQttwQIECBAgMAUEBaTx0iAAAECBAgUAWFRtNwSIECAAAECU0BYTB4jAQIECBAgUASERdFyS4AAAQIECEwBYTF5jAQIECBAgEAREBZFyy0BAgQIECAwBYTF5DESIECAAAECRUBYFC23BAgQIECAwBQQFpPHSIAAAQIECBQBYVG03BIgQIAAAQJTQFhMHiMBAgQIECBQBIRF0XJLgAABAgQITAFhMXmMBAgQIECAQBEQFkXLLQECBAgQIDAFhMXkMRIgQIAAAQJFQFgULbcECBAgQIDAFBAWk8dIgAABAgQIFAFhUbTcEiBAgAABAlNAWEweIwECBAgQIFAEhEXRckuAAAECBAhMAWExeYwECBAgQIBAERAWRcstAQIECBAgMAWExeQxEiBAgAABAkVAWBQttwQIECBAgMAUEBaTx0iAAAECBAgUAWFRtNwSIECAAAECU0BYTB4jAQIECBAgUASERdFyS4AAAQIECEwBYTF5jAQIECBAgEAREBZFyy0BAgQIECAwBYTF5DESIECAAAECRUBYFC23BAgQIECAwBQQFpPHSIAAAQIECBQBYVG03BIgQIAAAQJTQFhMHiMBAgQIECBQBIRF0XJLgAABAgQITAFhMXmMBAgQIECAQBEQFkXLLQECBAgQIDAFhMXkMRIgQIAAAQJFQFgULbcECBAgQIDAFBAWk8dIgAABAgQIFAFhUbTcEiBAgAABAlNAWEweIwECBAgQIFAEhEXRckuAAAECBAhMAWExeYwECBAgQIBAERAWRcstAQIECBAgMAWExeQxEiBAgAABAkVAWBQttwQIECBAgMAUEBaTx0iAAAECBAgUAWFRtNwSIECAAAECU0BYTB4jAQIECBAgUASERdFyS4AAAQIECEwBYTF5jAQIECBAgEAREBZFyy0BAgQIECAwBYTF5DESIECAAAECRUBYFC23BAgQIECAwBQQFpPHSIAAAQIECBQBYVG03BIgQIAAAQJTQFhMHiMBAgQIECBQBIRF0XJLgAABAgQITAFhMXmMBAgQIECAQBEQFkXLLQECBAgQIDAFhMXkMRIgQIAAAQJFQFgULbcECBAgQIDAFBAWk8dIgAABAgQIFAFhUbTcEiBAgAABAlNAWEweIwECBAgQIFAEhEXRckuAAAECBAhMAWExeYwECBAgQIBAERAWRcstAQIECBAgMAWExeQxEiBAgAABAkVAWBQttwQIECBAgMAUEBaTx0iAAAECBAgUAWFRtNwSIECAAAECU0BYTB4jAQIECBAgUASERdFyS4AAAQIECEwBYTF5jAQIECBAgEAREBZFyy0BAgQIECAwBYTF5DESIECAAAECRUBYFC23BAgQIECAwBQQFpPHSIAAAQIECBQBYVG03BIgQIAAAQJTQFhMHiMBAgQIECBQBIRF0XJLgAABAgQITAFhMXmMBAgQIECAQBEQFkXLLQECBAgQIDAFhMXkMRIgQIAAAQJFQFgULbcECBAgQIDAFBAWk8dIgAABAgQIFAFhUbTcEiBAgAABAlNAWEweIwECBAgQIFAEhEXRckuAAAECBAhMAWExeYwECBAgQIBAERAWRcstAQIECBAgMAWExeQxEiBAgAABAkVAWBQttwQIECBAgMAUEBaTx0iAAAECBAgUAWFRtNwSIECAAAECU0BYTB4jAQIECBAgUASERdFyS4AAAQIECEwBYTF5jAQIECBAgEAREBZFyy0BAgQIECAwBYTF5DESIECAAAECRUBYFC23BAgQIECAwBQQFpPHSIAAAQIECBQBYVG03BIgQIAAAQJTQFhMHiMBAgQIECBQBIRF0XJLgAABAgQITAFhMXmMBAgQIECAQBEQFkXLLQECBAgQIDAFhMXkMRIgQIAAAQJFQFgULbcECBAgQIDAFBAWk8dIgAABAgQIFAFhUbTcEiBAgAABAlNAWEweIwECBAgQIFAEhEXRckuAAAECBAhMAWExeYwECBAgQIBAERAWRcstAQIECBAgMAWExeQxEiBAgAABAkVAWBQttwQIECBAgMAUEBaTx0iAAAECBAgUAWFRtNwSIECAAAECU0BYTB4jAQIECBAgUASERdFyS4AAAQIECEwBYTF5jAQIECBAgEAREBZFyy0BAgQIECAwBYTF5DESIECAAAECRUBYFC23BAgQIECAwBR4PdcT4/Xtp7sTD3uIAAECBAgQIPAqhcXXm3dXzAgQIECAAAECfxLwUcifZDxOgAABAgQIZIFHvWPx5c37n/mZfQEBAgQIECBwOIEHw+LDj28+/jjcLwsvmAABAgQIPE3ARyFPc/NVBAgQIECAwAkBYXECxUMECBAgQIDA0wSExdPcfBUBAgQIECBwQkBYnEDxEAECBAgQIPA0AWHxNDdfRYAAAQIECJwQuPr8/e7i/yjpx7fX/mTKiR+ehwgQIEDgWAIv4fds71gc69ekV0uAAAECBJ5V4D9D2y5GdTuSHwAAAABJRU5ErkJggg=="
  33941. /***/ }),
  33942. /***/ "b6b0":
  33943. /***/ (function(module, exports, __webpack_require__) {
  33944. "use strict";
  33945. var _interopRequireDefault = __webpack_require__("8e6d");
  33946. Object.defineProperty(exports, "__esModule", {
  33947. value: true
  33948. });
  33949. exports.default = void 0;
  33950. var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
  33951. var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
  33952. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
  33953. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
  33954. var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
  33955. var _leafletWrapper = _interopRequireDefault(__webpack_require__("6f27"));
  33956. /**
  33957. * @class PopupViewModel
  33958. * @description popup viewModel.
  33959. * @extends leaflet.Evented
  33960. */
  33961. var PopupViewModel =
  33962. /*#__PURE__*/
  33963. function (_L$Evented) {
  33964. (0, _inherits2.default)(PopupViewModel, _L$Evented);
  33965. function PopupViewModel(map, options) {
  33966. var _this;
  33967. (0, _classCallCheck2.default)(this, PopupViewModel);
  33968. _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(PopupViewModel).call(this));
  33969. _this.map = map;
  33970. _this.mapObject = null;
  33971. _this.options = options.options || {};
  33972. _this.latLng = options.latLng;
  33973. _this.content = options.content;
  33974. _this.createPopup();
  33975. return _this;
  33976. }
  33977. /**
  33978. * @function PopupViewModel.prototype.createPopup
  33979. * @desc 创建popup
  33980. */
  33981. (0, _createClass2.default)(PopupViewModel, [{
  33982. key: "createPopup",
  33983. value: function createPopup() {
  33984. this.mapObject = _leafletWrapper.default.popup(this.options);
  33985. this.setLatLng();
  33986. this.setContent();
  33987. }
  33988. /**
  33989. * @function PopupViewModel.prototype.setContent
  33990. * @desc 设置popup内容
  33991. * @param {Array} content - 内容。
  33992. */
  33993. }, {
  33994. key: "setContent",
  33995. value: function setContent() {
  33996. var content = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.content;
  33997. if (this.mapObject && content) {
  33998. this.mapObject.setContent(content);
  33999. }
  34000. }
  34001. /**
  34002. * @function PopupViewModel.prototype.setLatLng
  34003. * @desc 设置latlng
  34004. * @param {Array} latLng - 坐标
  34005. */
  34006. }, {
  34007. key: "setLatLng",
  34008. value: function setLatLng() {
  34009. var latLng = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.latLng;
  34010. if (this.mapObject && latLng) {
  34011. this.mapObject.setLatLng(latLng);
  34012. }
  34013. }
  34014. /**
  34015. * @function PopupViewModel.prototype.getPopup
  34016. * @desc 获取popup
  34017. */
  34018. }, {
  34019. key: "getPopup",
  34020. value: function getPopup() {
  34021. return this.mapObject;
  34022. }
  34023. /**
  34024. * @function PopupViewModel.prototype.openOnMap
  34025. * @desc openOn MAP
  34026. */
  34027. }, {
  34028. key: "openOnMap",
  34029. value: function openOnMap() {
  34030. this.mapObject.openOn(this.map);
  34031. }
  34032. /**
  34033. * @function PopupViewModel.prototype.openOnMap
  34034. * @desc openOn MAP
  34035. */
  34036. }, {
  34037. key: "isMap",
  34038. value: function isMap(mapObject) {
  34039. return mapObject instanceof _leafletWrapper.default.Map;
  34040. }
  34041. }]);
  34042. return PopupViewModel;
  34043. }(_leafletWrapper.default.Evented);
  34044. exports.default = PopupViewModel;
  34045. /***/ }),
  34046. /***/ "b757":
  34047. /***/ (function(module, exports, __webpack_require__) {
  34048. "use strict";
  34049. var _interopRequireDefault = __webpack_require__("8e6d");
  34050. Object.defineProperty(exports, "__esModule", {
  34051. value: true
  34052. });
  34053. exports.default = void 0;
  34054. var _theme = _interopRequireDefault(__webpack_require__("9259"));
  34055. //
  34056. //
  34057. //
  34058. //
  34059. //
  34060. //
  34061. //
  34062. //
  34063. //
  34064. //
  34065. //
  34066. //
  34067. //
  34068. //
  34069. //
  34070. //
  34071. //
  34072. //
  34073. //
  34074. //
  34075. //
  34076. //
  34077. //
  34078. //
  34079. //
  34080. //
  34081. //
  34082. //
  34083. //
  34084. //
  34085. //
  34086. //
  34087. //
  34088. //
  34089. //
  34090. //
  34091. //
  34092. var _default = {
  34093. name: 'SmCard',
  34094. mixins: [_theme.default],
  34095. props: {
  34096. iconPosition: {
  34097. type: String,
  34098. default: 'top-left'
  34099. },
  34100. iconClass: {
  34101. type: String
  34102. },
  34103. autoRotate: {
  34104. type: Boolean,
  34105. default: false
  34106. },
  34107. headerName: {
  34108. type: String
  34109. },
  34110. collapsed: {
  34111. type: Boolean,
  34112. default: false
  34113. }
  34114. },
  34115. data: function data() {
  34116. return {
  34117. isShow: true,
  34118. transform: null
  34119. };
  34120. },
  34121. computed: {
  34122. getCardStyle: function getCardStyle() {
  34123. var style = {
  34124. background: 'transparent'
  34125. };
  34126. return !this.iconClass && !this.headerName ? style : this.getBackgroundStyle;
  34127. },
  34128. iconStyleObject: function iconStyleObject() {
  34129. return {
  34130. '--icon-color--hover': this.colorGroupsData[0]
  34131. };
  34132. },
  34133. iconStyle: function iconStyle() {
  34134. return {
  34135. transform: this.transform
  34136. };
  34137. },
  34138. position: function position() {
  34139. return this.iconPosition;
  34140. },
  34141. rotateDeg: function rotateDeg() {
  34142. return {
  34143. 'top-right': ['rotate(-45deg)', 'rotate(135deg)'],
  34144. 'top-left': ['rotate(-135deg)', 'rotate(45deg)'],
  34145. 'bottom-left': ['rotate(135deg)', 'rotate(-45deg)'],
  34146. 'bottom-right': ['rotate(45deg)', 'rotate(-135deg)']
  34147. };
  34148. },
  34149. hasHeaderRotateDeg: function hasHeaderRotateDeg() {
  34150. return {
  34151. 'top-right': ['rotate(-45deg)', 'rotate(135deg)'],
  34152. 'top-left': ['rotate(-135deg)', 'rotate(45deg)'],
  34153. 'bottom-left': ['rotate(-135deg)', 'rotate(45deg)'],
  34154. 'bottom-right': ['rotate(-45deg)', 'rotate(135deg)']
  34155. };
  34156. }
  34157. },
  34158. watch: {
  34159. iconClass: function iconClass(newVal, oldVal) {
  34160. if (newVal && !oldVal) {
  34161. this.isShow = !this.collapsed;
  34162. this.toggleTransition(this.collapsed ? 'leave' : 'enter');
  34163. } else if (!newVal) {
  34164. // 如果iconClass 为空 则默认显示内容
  34165. this.isShow = true;
  34166. }
  34167. },
  34168. iconPosition: function iconPosition() {
  34169. this.resetIconTransform();
  34170. }
  34171. },
  34172. created: function created() {
  34173. this.iconClass && (this.isShow = !this.collapsed);
  34174. this.resetIconTransform();
  34175. },
  34176. mounted: function mounted() {
  34177. this.toggleTransition(this.collapsed ? 'leave' : 'enter');
  34178. },
  34179. methods: {
  34180. iconClicked: function iconClicked() {
  34181. this.isShow = !this.isShow;
  34182. this.resetIconTransform();
  34183. this.$emit('content-show-state', this.isShow);
  34184. },
  34185. toggleTransition: function toggleTransition(type) {
  34186. var _this = this;
  34187. this.$nextTick(function () {
  34188. var iconDom = _this.$el.querySelector('.sm-component-card__icon');
  34189. if (iconDom) {
  34190. iconDom.style.position = type === 'leave' ? 'relative' : 'absolute';
  34191. }
  34192. });
  34193. },
  34194. resetIconTransform: function resetIconTransform() {
  34195. var rotateDeg = this.headerName ? this.hasHeaderRotateDeg : this.rotateDeg;
  34196. this.autoRotate && (this.transform = rotateDeg[this.position][this.isShow ? 1 : 0]);
  34197. }
  34198. }
  34199. };
  34200. exports.default = _default;
  34201. /***/ }),
  34202. /***/ "b7bd":
  34203. /***/ (function(module) {
  34204. 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]}]");
  34205. /***/ }),
  34206. /***/ "b982":
  34207. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  34208. "use strict";
  34209. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/common/iframe/Iframe.vue?vue&type=template&id=37ec6382&
  34210. var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('iframe',{staticClass:"sm-component-iframe",attrs:{"src":_vm.src,"scrolling":"auto"}})}
  34211. var staticRenderFns = []
  34212. // CONCATENATED MODULE: ./src/common/iframe/Iframe.vue?vue&type=template&id=37ec6382&
  34213. /* concated harmony reexport render */__webpack_require__.d(__webpack_exports__, "a", function() { return render; });
  34214. /* concated harmony reexport staticRenderFns */__webpack_require__.d(__webpack_exports__, "b", function() { return staticRenderFns; });
  34215. /***/ }),
  34216. /***/ "b9e2":
  34217. /***/ (function(module, exports, __webpack_require__) {
  34218. var isObject = __webpack_require__("d3a8"),
  34219. isSymbol = __webpack_require__("f885");
  34220. /** Used as references for various `Number` constants. */
  34221. var NAN = 0 / 0;
  34222. /** Used to match leading and trailing whitespace. */
  34223. var reTrim = /^\s+|\s+$/g;
  34224. /** Used to detect bad signed hexadecimal string values. */
  34225. var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
  34226. /** Used to detect binary string values. */
  34227. var reIsBinary = /^0b[01]+$/i;
  34228. /** Used to detect octal string values. */
  34229. var reIsOctal = /^0o[0-7]+$/i;
  34230. /** Built-in method references without a dependency on `root`. */
  34231. var freeParseInt = parseInt;
  34232. /**
  34233. * Converts `value` to a number.
  34234. *
  34235. * @static
  34236. * @memberOf _
  34237. * @since 4.0.0
  34238. * @category Lang
  34239. * @param {*} value The value to process.
  34240. * @returns {number} Returns the number.
  34241. * @example
  34242. *
  34243. * _.toNumber(3.2);
  34244. * // => 3.2
  34245. *
  34246. * _.toNumber(Number.MIN_VALUE);
  34247. * // => 5e-324
  34248. *
  34249. * _.toNumber(Infinity);
  34250. * // => Infinity
  34251. *
  34252. * _.toNumber('3.2');
  34253. * // => 3.2
  34254. */
  34255. function toNumber(value) {
  34256. if (typeof value == 'number') {
  34257. return value;
  34258. }
  34259. if (isSymbol(value)) {
  34260. return NAN;
  34261. }
  34262. if (isObject(value)) {
  34263. var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
  34264. value = isObject(other) ? (other + '') : other;
  34265. }
  34266. if (typeof value != 'string') {
  34267. return value === 0 ? value : +value;
  34268. }
  34269. value = value.replace(reTrim, '');
  34270. var isBinary = reIsBinary.test(value);
  34271. return (isBinary || reIsOctal.test(value))
  34272. ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
  34273. : (reIsBadHex.test(value) ? NAN : +value);
  34274. }
  34275. module.exports = toNumber;
  34276. /***/ }),
  34277. /***/ "bb52":
  34278. /***/ (function(module, exports) {
  34279. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhYAAAD+CAYAAABmz0wVAAAABGdBTUEAALGPC/xhBQAADWBJREFUeAHt3VFqkwkUhmFbstfBBYyL8MJbcS3euqySam+knZgOxeSD5n0GBpx2zOE8R/DlD9G7D99/PH7wDwECBAgQIEDgIgLC4iKMXoQAAQIECOQFfjXFfR4BAAECBAgQIHAxgcPzV7r//PVNb4scP328e/7z/ZgAAQIECBB4/wJ/0wMvwuKJ4vjvP6+L3N2LideFfJcAAQIECLxrgecPDg4Px1cfOhy/fHuxq7dCXnD4DwIECBAgQOBvBE6eWPx+MU8mflP4AQECBAgQqAo8HP78TsW5JxmeWFR/pdibAAECBAhcQUBYXAHVSxIgQIAAgaqAsKhe3t4ECBAgQOAKAsLiCqhekgABAgQIVAWERfXy9iZAgAABAlcQOA2Lp0+D+ETIFai9JAECBAgQuB2Bp0+L/OkTI6dhcTs724QAAQIECBAYCwiLMbhxBAgQIEDgtgX87aa3fV/bESBAgACBlYC/3XQlbQ4BAgQIEGgIeCukcWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAsKicWdbEiBAgACBiYCwmDAbQoAAAQIEGgLConFnWxIgQIAAgYmAsJgwG0KAAAECBBoCwqJxZ1sSIECAAIGJgLCYMBtCgAABAgQaAi/C4v7z18fG2rYkQIAAAQIELiHw33Z4ERaXGOA1CBAgQIAAga6AsOje3uYECBAgQODiAidhcXg4Pj79e/FJXpAAAQIECBC4GYFzvXASFjezsUUIECBAgACBuYCwmJMbSIAAAQIEbldAWNzubW1GgAABAgTmAsJiTm4gAQIECBC4XQFhcbu3tRkBAgQIEJgLHM5NPPfJkIfD/d25n+PrBAgQIECAwG0JnOuBc1t6YnFOxtcJECBAgACBNwucPLE4fvn26os8/6M7j58+enrxqpZvEiBAgACB9yfw4vf6/+mC0+2+//CHYZ2q+AoBAgQIECDwVoFfTeGtkLei+f8JECBAgACBswJ3HzyxOIvjGwQIECBAgMDbBH4C+z9OgLhU6J4AAAAASUVORK5CYII="
  34280. /***/ }),
  34281. /***/ "bbe9":
  34282. /***/ (function(module, exports, __webpack_require__) {
  34283. exports = module.exports = __webpack_require__("c66c");
  34284. exports.Stream = exports;
  34285. exports.Readable = exports;
  34286. exports.Writable = __webpack_require__("9c77");
  34287. exports.Duplex = __webpack_require__("d711");
  34288. exports.Transform = __webpack_require__("b556");
  34289. exports.PassThrough = __webpack_require__("e525");
  34290. /***/ }),
  34291. /***/ "be3f":
  34292. /***/ (function(module, exports) {
  34293. module.exports = __WEBPACK_EXTERNAL_MODULE_be3f__;
  34294. /***/ }),
  34295. /***/ "c031":
  34296. /***/ (function(module, exports) {
  34297. function _getPrototypeOf(o) {
  34298. module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  34299. return o.__proto__ || Object.getPrototypeOf(o);
  34300. };
  34301. return _getPrototypeOf(o);
  34302. }
  34303. module.exports = _getPrototypeOf;
  34304. /***/ }),
  34305. /***/ "c0cb":
  34306. /***/ (function(module, exports) {
  34307. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhYAAAD+CAYAAABmz0wVAAAABGdBTUEAALGPC/xhBQAAF+xJREFUeAHt3W+oZOddB/DnzN6VNNgXxq1CpakKBSFKIqXYImmb1oJB+qJbG2PxT5aCL0qQNApNFiQblE0CGheNikK5qUqMqU1fREihtan1hS9KbbQGqYFiEyykia0Qkywme4/PubNz93r3nGeec+fcM+fM+Qxc7tzzPPOc5/d5Zme+e+bMTBFcjkxg9ugL5ZENPoGBd06eKCZQphIJECCwUQJbR1rNnY+8IZx/+YlQltcc6X4MvpkCt20LZpu5sqoqiqfCFVfeEO656flDYXyzPBvKcGfjbYtwOry5uKexfdHQxTgdjFFed8fZsFM21xOK08W/3JusZzBjlOUdkffWBXHN7/uKovjDmu17m8qBjLE3oZZXZi3753cXKvKt9CRAYFoC1X+2qv90VY+Th7m8uTgdZuGBxpuW4Wz4jzL15Da/aRfjdDBG8eS9p0NRNNcTyrPltXck6xnMGEVxb8R9sHFtQvh4DA6nEu2RYhhjpOaYajuaQ837Q8WqyTw1+4G3eSlktQXyUshqfm49UIGuHh/LsgjPhO145OJXaystYksIp+KRi0/Wti82djFOB2PEJ9siXHvndghlfT2xIcxmp4on72msZ1BjhPD7kfjnF8w1vz8WA8SnarbvbtqtZQBjNM0vtb37YNHVP5rUrCfeNrTAIgBM/A6p/PYCXT1OluWxGC4ejk+59U9gRbgQJ3dzDBd/k5xkF+N0MEb5oUeOha9/5eE41+Z6ZrObi6/e01jPYMaoPEL44/jzcw32O3H7R2O4+NuG9ngWwTDGaJpf0/ZuXwrp6h9L02xtJ0CAwCYIVOdWVOdYVEd0V3lZpCguhKvDhyPJ47UsZTgWQ8dD4dnyxtr2xcYuxulgjOJTN10Ix380Xc/OzkPlT55urGcwY1Qe83MtnlgwH/hdPf8+EMPDew5s3/szho5BjLE3ocwr3R2xECoyyXUjQIDARYGuHjefLV8Xj01U4eJdtbZFeCWek3FjeFPx97Xti41djNPBGOU77n9deOnbsZ4yUc/sxnjkorGewYxRxrUJ4S/iz9sXzAd+n49//3IMEf94YPvenzF8DGKMvQktudJNsMj5x3H79pmwE+5aMh/NBAgQGKbALNwd7j91pvPJ5Tx+5uz0+fL14eXwd/EIxdsaur8Yw8V7w9XFlxva55u7GKeDMcqfvu/14X++G+spE/UU740nbTbWM5gxyvJ7I+5fx59rG+xfitt/IYaLJxvaq5dFBjFG0/z2b189WHT1j2L/rFwnQIDAlAS6ehx9trwq/gfuizFc/EQtXxG+E8PFu+ORi6/Vti82djFOB2OU7zhzVXjplS/GadXXE2I9x8O7i6/c11jPYMYoy++LdVQna/5Y/Km7/Hfc+KEYLv6trrHaFsPFIMZomt9i+2rBoqt/DIvZ+E2AAIGpCnT1ePpc+YPhfPiHGC7e0kD5XDzz4voYLp5uaJ9v7mKcDsYof+p0rOdCop7iuTDbur548nca6xnMGGVZvb340fjzIw32L8TtJ2O4+EZDexUuBjFG0/yq7YcPFl39I0jNThsBAgSmJNDV4+q3yqvD/8ZwEeKpnfWXZ8L3xHDxxuKZ+uaLW7sYp4Mxyrd+/Orw6pJ6jofr45GLxnoGM0ZZ/lDU/Uz8eWOD/bfi9g/EcPGfDe1VuBjEGE3zmzU1JLd3dedP7kQjAQIEJibQ1btFqsBwLPxM1HuuQbB6ov58qI4opC5djNPBGLuBYXY81hOPTtRfrg6vhc/vHpmobw+DGWMeGG6O06yOTtRdqsDx8MUjE3Xt1QdoVaFj7WPUTi5ubB8shIomS9sJECCwukBX4aJ6qeNYeF88Lv2d2klVL5WcD5+Lb0W9qrZ9sbGLcToYY/eljuPl++K0mut55cLnds+pWMz9wO/BjDF/qeMX4/Sq8yrqLtVLJX918ZyKuvYqXFQvl6x9jLrJtQsWQkWdoW0ECBDoVqC7cPG1GCx+Nk7uxdoJVid57oTPhupdHKlLdbLnquN0MMbuSZqzorme6iTPl89/dvfdIA31DGaM+UmavxSnWb0jpO5SneT5lzFcVO8Gqb3EcFGd6Ln2MQ5OLj9YCBUH7fxNgACBoxPoKlxUby89Ft4fg8ErtZOt3p76UngsHrmoPiuh+dLFOB2Msfv20mOzRD3x7akvfvex3c+xaKhmMGPM3156S5xm9VkWdZfq7akPxnDRuDYxXFRvUb0l/qx1jLj/vUtesBAq9sBcIUCAQG8CXYWL6oOxZuGDcd6vNsz9XfEDtj4dzwo83tA+39zFOB2MsfvBWLNjH4xhqaGe+MFaLz336fKtf9pYz2DGmH8w1q9F4Nca7N8et/9ZDBfNtQxkjMX8lwcLoWJh5TcBAgT6F+guXDwen4g/HH+qj4muu9wYv3fkoRguqu+4aL68qVh9nA7GKL569vH4pWTpel79xkO73x3SUM1gxiiKL8Qp3hp/dhqmekPcXn38d+PaxCMXgxijmn86WAgVDWtsMwECBHoU6CpczL+M7CMxXJS1s6++zOyZ8IkYLtIfRdDFOB2MsftlZMXsI7GW+nqqLzP7+j99Ij4hN9YzmDHmX0b2G7XrMt9YfZnZ7yVrGcgYzcFCqEisryYCBAj0LNBduPhkfBr+9cbZV1/D/mz4g8b2RUP1deyrjtPBGLtfo14UzfVUX8N+3Z3JegYzxvxr1H9rQVzzu/rW19+u2b63KR65qD7dc61j1AcLoWJvkVwhQIDAYAS6Chc/XDwQj1qcbqxrJx6W/2Z5trF90dDFOB2MUfzzvQ/Ez7horqcsby2vuyNZz2DGKIrtyHvfgrjm9y3xqMUdNdv3NsVwsdYxLj88JFTsLY4rBAgQGKSAx+lBLotJzQX+f7BwZ3W/IECAwDgEPF6PY50mOMtLwcKddILLr2QCBEYtkPO4ffv2mfheg7tGXafJj0Pg3KndTHEpWHzswX+NZwJfEz8n9KlwxZU3hOq1PBcCBAgQGLbAb/75D4QLO1/w+D3sZZrS7C6dvFmFiuoiVExp/dVKgMDYBX73V769+7hd/aewehw///IToTqS4UJgTQKXjljctj1/H/DFQxlrmo/dEiBAgMBhBPa/LHKY27sNgVUFLuaHS0csVh3Q7QkQIEBgfQLVy9fHZu/ZfTl7fbOwZwJhiwEBAgQIbIhA9bJICD++IdUoYywCi1c8Ls7XEYuxLJx5EiBAgACBEQgIFiNYJFMkQIAAAQJjERAsxrJS5kmAAAECBEYgIFiMYJFMkQABAgQIjEVAsBjLSpknAQIECBAYgYBgMYJFMkUCBAgQIDAWAcFiLCtlngQIECBAYAQCgsUIFskUCRAgQIDAWAQEi7GslHkSIECAAIERCAgWI1gkUyRAgAABAmMRECzGslLmSYAAAQIERiAgWIxgkUyRAAECBAiMRUCwGMtKmScBAgQIEBiBgGAxgkUyRQIECBAgMBYBwWIsK2WeBAgQIEBgBAKCxQgWyRQJECBAgMBYBASLsayUeRIgQIAAgREICBYjWCRTJECAAAECYxEQLMayUuZJgAABAgRGICBYjGCRTJEAAQIECIxFQLAYy0qZJwECBAgQGIGAYDGCRTJFAgQIECAwFgHBYiwrZZ4ECBAgQGAEAoLFCBbJFAkQIECAwFgEBIuxrJR5EiBAgACBEQgIFiNYJFMkQIAAAQJjERAsxrJS5kmAAAECBEYgIFiMYJFMkQABAgQIjEVAsBjLSpknAQIECBAYgYBgMYJFMkUCBAgQIDAWga3Zoy+U+ye7c27/X64TIECAAAECBPIFHLHIt9KTAAECBAgQWCIgWCwB0kyAAAECBAjkCwgW+VZ6EiBAgAABAksEBIslQJoJECBAgACBfAHBIt9KTwIECBAgQGCJQHHwXSGL/jsnTxSL634TIECAAAECBPYLHMwPi9zgiMV+JdcJECBAgACBlQQEi5X43JgAAQIECBDYLyBY7NdwnQABAgQIEFhJQLBYic+NCRAgQIAAgf0CgsV+DdcJECBAgACBlQQEi5X43JgAAQIECBDYLyBY7NdwnQABAgQIEFhJQLBYic+NCRAgQIAAgf0CW/v/cJ0AAQIECBAgcBiBxQdmOWJxGD23IUCAAAECBGoFBItaFhsJECBAgACBwwgIFodRcxsCBAgQIECgVkCwqGWxkQABAgQIEDiMgGBxGDW3IUCAAAECBGoFBItaFhsJECBAgACBwwgIFodRcxsCBAgQIECgVuCyz7HYOXmiqO1pIwECBAgQIEBgiYAjFkuANBMgQIAAAQL5AoJFvpWeBAgQIECAwBIBwWIJkGYCBAgQIEAgX0CwyLfSkwABAgQIEFgiIFgsAdJMgAABAgQI5AsIFvlWehIgQIAAAQJLBASLJUCaCRAgQIAAgXwBwSLfSk8CBAgQIEBgiYBgsQRIMwECBAgQIJAvIFjkW+lJgAABAgQILBEQLJYAaSZAgAABAgTyBQSLfCs9CRAgQIAAgSUCgsUSIM0ECBAgQIBAvoBgkW+lJwECBAgQIHBRoPo29LpvRBcs3EUIECBAgACBzgQEi84oDUSAAAECBAgIFu4DBAgQIECAQGcCgkVnlAYiQIAAAQIEBAv3AQIECBAgQKAzga29Mzpv2y47G9VABAgQIECAwCQFHLGY5LIrmgABAgQIHI3A1tEMa1QCBAgQIEBgCgI7X3psXua5U0V1xRGLKay6GgkQIECAQE8CgkVP0HZDgAABAgSmICBYTGGV1UiAAAECBHoSECx6grYbAgQIECAwBQHBYgqrrEYCBAgQINCTgGDRE7TdECBAgACBKQgIFlNYZTUSIECAAIGeBASLnqDthgABAgQITEFAsJjCKquRAAECBAj0JCBY9ARtNwQIECBAYAoCgsUUVlmNBAgQIECgJwHBoidouyFAgAABAlMQECymsMpqJECAAAECPQkIFj1B2w0BAgQIEJiCgGAxhVVWIwECBAgQ6ElAsOgJ2m4IECBAgMAUBASLKayyGgkQIECAQE8CgkVP0HZDgAABAgSmICBYTGGV1UiAAAECBHoSECx6grYbAgQIECAwBQHBYgqrrEYCBAgQINCTgGDRE7TdECBAgACBKQgIFlNYZTUSIECAAIGeBASLnqDthgABAgQITEFAsJjCKquRAAECBAj0JCBY9ARtNwQIECBAYAoCgsUUVlmNBAgQIECgJwHBoidouyFAgAABAlMQECymsMpqJECAAAECPQkIFj1B2w0BAgQIEJiCgGAxhVVWIwECBAgQ6ElAsOgJ2m4IECBAgMAUBASLKayyGgkQIECAQE8CgkVP0HZDgAABAgSmICBYTGGV1UiAAAECBHoSECx6grYbAgQIECAwBQHBYgqrrEYCBAgQINCTgGDRE7TdECBAgACBKQgIFlNYZTUSIECAAIGeBASLnqDthgABAgQITEFAsJjCKquRAAECBAj0JCBY9ARtNwQIECBAYAoCgsUUVlmNBAgQIECgJwHBoidouyFAgAABAlMQECymsMpqJECAAAECPQkIFj1B2w0BAgQIEJiCgGAxhVVWIwECBAgQ6ElAsOgJ2m4IECBAgMAUBASLKayyGgkQIECAQE8CgkVP0HZDgAABAgSmICBYTGGV1UiAAAECBHoSECx6grYbAgQIECAwBQHBYgqrrEYCBAgQINCTgGDRE7TdECBAgACBKQhsLYqcvfP986vvfKGsruycPFEs2vwmQIAAAQIECOQIOGKRo6QPAQIECBAgkCUgWGQx6USAAAECBAjkCAgWOUr6ECBAgAABAlkCW7NH5+dUZPXWiQABAgQIECCQEHDEIoGjiQABAgQIEGgnIFi089KbAAECBAgQSAgIFgkcTQQIECBAgEA7AcGinZfeBAgQIECAQEJAsEjgaCJAgAABAgTaCQgW7bz0JkCAAAECBBICgkUCRxMBAgQIECDQTkCwaOelNwECBAgQIJAQECwSOJoIECBAgACBdgKCRTsvvQkQIECAAIGEgGCRwNFEgAABAgQItBMQLNp56U2AAAECBAgkBASLBI4mAgQIECBAoJ2AYNHOS28CBAgQIEAgISBYJHA0ESBAgAABAu0EBIt2XnoTIECAAAECCQHBIoGjiQABAgQIEGgnIFi089KbAAECBAgQSAgIFgkcTQQIECBAgEA7AcGinZfeBAgQIECAQEJAsEjgaCJAgAABAgTaCQgW7bz0JkCAAAECBBICs52TJ4rqJ9FHEwECBAgQIEAgS8ARiywmnQgQIECAAIEcAcEiR0kfAgQIECBAIEtAsMhi0okAAQIECBDIERAscpT0IUCAAAECBLIEBIssJp0IECBAgACBHAHBIkdJHwIECBAgQCBLQLDIYtKJAAECBAgQyBEQLHKU9CFAgAABAgSyBASLLCadCBAgQIAAgRwBwSJHSR8CBAgQIEAgS0CwyGLSiQABAgQIEMgRECxylPQhQIAAAQIEsgQEiywmnQgQIECAAIEcAcEiR0kfAgQIECBAIEtAsMhi0okAAQIECBDIEdhadNr50mPzq+dOFYttfhMgQIAAAQIE2gg4YtFGS18CBAgQIEAgKSBYJHk0EiBAgAABAm0EBIs2WvoSIECAAAECSQHBIsmjkQABAgQIEGgjIFi00dKXAAECBAgQSAoIFkkejQQIECBAgEAbAcGijZa+BAgQIECAQFJAsEjyaCRAgAABAgTaCAgWbbT0JUCAAAECBJICgkWSRyMBAgQIECDQRkCwaKOlLwECBAgQIJAUECySPBoJECBAgACBNgKCRRstfQkQIECAAIGkgGCR5NFIgAABAgQItBEQLNpo6UuAAAECBAgkBQSLJI9GAgQIECBAoI2AYNFGS18CBAgQIEAgKSBYJHk0EiBAgAABAm0EBIs2WvoSIECAAAECSQHBIsmjkQABAgQIEGgjIFi00dKXAAECBAgQSAoIFkkejQQIECBAgEAbAcGijZa+BAgQIECAQFJAsEjyaCRAgAABAgTaCAgWbbT0JUCAAAECBJICgkWSRyMBAgQIECDQRkCwaKOlLwECBAgQIJAUECySPBoJECBAgACBNgKCRRstfQkQIECAAIGkgGCR5NFIgAABAgQItBEQLNpo6UuAAAECBAgkBbaSrVXj0+WZUIa7lvbTgcC6BIpwd3hLcWZdu7dfAgQIELgksPyIRfWAXT1wuxAYooBQMcRVMScCBCYscPkRi9u2y8s8/ujBEN523fznskYbCKxJQKhYE7zdEiBAoFng8mDR1PfLT85bqoDhQmDdAkLFulfA/gnkC9z5yBvC+ZefCGV5Tf6N9ByrQDHWiR/pvJvOK/FkdqTsBidAYAMFhIoNXNSGks6d2s0UgkWDT+NJq8JFk5jtBLIFZo++UO6cPJH9+LO/f3U9e0c6rkVgVhR3v/aB7z8T9oeKongqXHHlDeGem55fy6TstDeB5Sdv9jaVge2o6aTV6h0y1RENFwIEWgk0BYK221vtVOfeBYSK3skHt0PBIrUkwkVKRxuBzgWaQkbnOzLgkQgIFUfCOrpBBYtlSyZcLBPSTqBRQFBopNm4BqFi45b00AXlvyvk0LvYgBtW4eLp+LLuwQ8Km78sEnw40wassRI6E6jCRJvzJzrbsYHWJpATKrY+819ndspy6YctLu47++9HfVxfG94G7XhxP3DEIndRHbnIldJvggKOTExw0S+WvHgySZ2omRsqpqs4/sr37gexFEcs2qynIxdttPSdkMDif5lVyX1enxDxYEvdqWaWePeHUDHYpetsYvtDRTWoIxZtaR25aCumPwECmywgVGzy6i6t7WCoqG7giMVStpoOqSMX/778NcSaEce7yed6jHftVpy5/4muCDjim+89mQgVI17F1ae+dz84MJRgcQAk+8+mcJE9wAZ0zAkVt2+fCTu+HXcDVntewix+IeH9p84IFRuzoq0L2XsyESpa223SDfbuBzVFZX/yXc1tbaoEmj7+e9N1ckLFphuoj8BUBRKhYqok6r4kIFhcsljftXWGk6MICI5SrO++ZM8jFSj+JJy75aOjmLxQMYplWuckBYt16u/f9zrCxVGEiv01uU6AwGYJCBWbtZ5HVI1gcUSwhxq2z3DRdai4bdsXQx1q0d2IwAgFfKHYCBetvykLFv1Zb/aeBIvNXl/VEVgICBULCb8bBASLBpi1bj7KIxddH6lYK5SdEyBAgMDQBP4P0C0DtozKDvkAAAAASUVORK5CYII="
  34308. /***/ }),
  34309. /***/ "c363":
  34310. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  34311. "use strict";
  34312. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/common/video-player/VideoPlayer.vue?vue&type=template&id=4df6cab8&
  34313. var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"sm-component-video-player"},[_c('video-player',{ref:"videoPlayer",staticClass:"sm-component-video-player__player sm-component-video-player__player--main",attrs:{"options":_vm.playerOptions,"playsinline":true},on:{"play":function($event){return _vm.onPlayerPlay($event)},"ended":function($event){return _vm.onPlayerEnded($event)},"loadeddata":function($event){return _vm.onPlayerLoadeddata($event)}}}),_vm._v(" "),(_vm.url)?_c('a-modal',{attrs:{"wrapClassName":"sm-component-video-player-modal","footer":null,"width":"60%","maskClosable":false},model:{value:(_vm.modalVisible),callback:function ($$v) {_vm.modalVisible=$$v},expression:"modalVisible"}},[_c('video-player',{ref:"modalVideoPlayer",staticClass:"sm-component-video-player__player",attrs:{"options":_vm.modalPlayerOptions,"playsinline":true},on:{"play":function($event){return _vm.onModalPlayerPlay($event)},"loadeddata":function($event){return _vm.onModalPlayerLoadeddata($event)}}})],1):_vm._e()],1)}
  34314. var staticRenderFns = []
  34315. // CONCATENATED MODULE: ./src/common/video-player/VideoPlayer.vue?vue&type=template&id=4df6cab8&
  34316. /* concated harmony reexport render */__webpack_require__.d(__webpack_exports__, "a", function() { return render; });
  34317. /* concated harmony reexport staticRenderFns */__webpack_require__.d(__webpack_exports__, "b", function() { return staticRenderFns; });
  34318. /***/ }),
  34319. /***/ "c365":
  34320. /***/ (function(module, exports, __webpack_require__) {
  34321. var helper = __webpack_require__("cabd");
  34322. var isArray = __webpack_require__("df2e").isArray;
  34323. var currentElement, currentElementName;
  34324. function validateOptions(userOptions) {
  34325. var options = helper.copyOptions(userOptions);
  34326. helper.ensureFlagExists('ignoreDeclaration', options);
  34327. helper.ensureFlagExists('ignoreInstruction', options);
  34328. helper.ensureFlagExists('ignoreAttributes', options);
  34329. helper.ensureFlagExists('ignoreText', options);
  34330. helper.ensureFlagExists('ignoreComment', options);
  34331. helper.ensureFlagExists('ignoreCdata', options);
  34332. helper.ensureFlagExists('ignoreDoctype', options);
  34333. helper.ensureFlagExists('compact', options);
  34334. helper.ensureFlagExists('indentText', options);
  34335. helper.ensureFlagExists('indentCdata', options);
  34336. helper.ensureFlagExists('indentAttributes', options);
  34337. helper.ensureFlagExists('indentInstruction', options);
  34338. helper.ensureFlagExists('fullTagEmptyElement', options);
  34339. helper.ensureFlagExists('noQuotesForNativeAttributes', options);
  34340. helper.ensureSpacesExists(options);
  34341. if (typeof options.spaces === 'number') {
  34342. options.spaces = Array(options.spaces + 1).join(' ');
  34343. }
  34344. helper.ensureKeyExists('declaration', options);
  34345. helper.ensureKeyExists('instruction', options);
  34346. helper.ensureKeyExists('attributes', options);
  34347. helper.ensureKeyExists('text', options);
  34348. helper.ensureKeyExists('comment', options);
  34349. helper.ensureKeyExists('cdata', options);
  34350. helper.ensureKeyExists('doctype', options);
  34351. helper.ensureKeyExists('type', options);
  34352. helper.ensureKeyExists('name', options);
  34353. helper.ensureKeyExists('elements', options);
  34354. helper.checkFnExists('doctype', options);
  34355. helper.checkFnExists('instruction', options);
  34356. helper.checkFnExists('cdata', options);
  34357. helper.checkFnExists('comment', options);
  34358. helper.checkFnExists('text', options);
  34359. helper.checkFnExists('instructionName', options);
  34360. helper.checkFnExists('elementName', options);
  34361. helper.checkFnExists('attributeName', options);
  34362. helper.checkFnExists('attributeValue', options);
  34363. helper.checkFnExists('attributes', options);
  34364. helper.checkFnExists('fullTagEmptyElement', options);
  34365. return options;
  34366. }
  34367. function writeIndentation(options, depth, firstLine) {
  34368. return (!firstLine && options.spaces ? '\n' : '') + Array(depth + 1).join(options.spaces);
  34369. }
  34370. function writeAttributes(attributes, options, depth) {
  34371. if (options.ignoreAttributes) {
  34372. return '';
  34373. }
  34374. if ('attributesFn' in options) {
  34375. attributes = options.attributesFn(attributes, currentElementName, currentElement);
  34376. }
  34377. var key, attr, attrName, quote, result = [];
  34378. for (key in attributes) {
  34379. if (attributes.hasOwnProperty(key) && attributes[key] !== null && attributes[key] !== undefined) {
  34380. quote = options.noQuotesForNativeAttributes && typeof attributes[key] !== 'string' ? '' : '"';
  34381. attr = '' + attributes[key]; // ensure number and boolean are converted to String
  34382. attr = attr.replace(/"/g, '&quot;');
  34383. attrName = 'attributeNameFn' in options ? options.attributeNameFn(key, attr, currentElementName, currentElement) : key;
  34384. result.push((options.spaces && options.indentAttributes? writeIndentation(options, depth+1, false) : ' '));
  34385. result.push(attrName + '=' + quote + ('attributeValueFn' in options ? options.attributeValueFn(attr, key, currentElementName, currentElement) : attr) + quote);
  34386. }
  34387. }
  34388. if (attributes && Object.keys(attributes).length && options.spaces && options.indentAttributes) {
  34389. result.push(writeIndentation(options, depth, false));
  34390. }
  34391. return result.join('');
  34392. }
  34393. function writeDeclaration(declaration, options, depth) {
  34394. currentElement = declaration;
  34395. currentElementName = 'xml';
  34396. return options.ignoreDeclaration ? '' : '<?' + 'xml' + writeAttributes(declaration[options.attributesKey], options, depth) + '?>';
  34397. }
  34398. function writeInstruction(instruction, options, depth) {
  34399. if (options.ignoreInstruction) {
  34400. return '';
  34401. }
  34402. var key;
  34403. for (key in instruction) {
  34404. if (instruction.hasOwnProperty(key)) {
  34405. break;
  34406. }
  34407. }
  34408. var instructionName = 'instructionNameFn' in options ? options.instructionNameFn(key, instruction[key], currentElementName, currentElement) : key;
  34409. if (typeof instruction[key] === 'object') {
  34410. currentElement = instruction;
  34411. currentElementName = instructionName;
  34412. return '<?' + instructionName + writeAttributes(instruction[key][options.attributesKey], options, depth) + '?>';
  34413. } else {
  34414. var instructionValue = instruction[key] ? instruction[key] : '';
  34415. if ('instructionFn' in options) instructionValue = options.instructionFn(instructionValue, key, currentElementName, currentElement);
  34416. return '<?' + instructionName + (instructionValue ? ' ' + instructionValue : '') + '?>';
  34417. }
  34418. }
  34419. function writeComment(comment, options) {
  34420. return options.ignoreComment ? '' : '<!--' + ('commentFn' in options ? options.commentFn(comment, currentElementName, currentElement) : comment) + '-->';
  34421. }
  34422. function writeCdata(cdata, options) {
  34423. return options.ignoreCdata ? '' : '<![CDATA[' + ('cdataFn' in options ? options.cdataFn(cdata, currentElementName, currentElement) : cdata) + ']]>';
  34424. }
  34425. function writeDoctype(doctype, options) {
  34426. return options.ignoreDoctype ? '' : '<!DOCTYPE ' + ('doctypeFn' in options ? options.doctypeFn(doctype, currentElementName, currentElement) : doctype) + '>';
  34427. }
  34428. function writeText(text, options) {
  34429. if (options.ignoreText) return '';
  34430. text = '' + text; // ensure Number and Boolean are converted to String
  34431. text = text.replace(/&amp;/g, '&'); // desanitize to avoid double sanitization
  34432. text = text.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
  34433. return 'textFn' in options ? options.textFn(text, currentElementName, currentElement) : text;
  34434. }
  34435. function hasContent(element, options) {
  34436. var i;
  34437. if (element.elements && element.elements.length) {
  34438. for (i = 0; i < element.elements.length; ++i) {
  34439. switch (element.elements[i][options.typeKey]) {
  34440. case 'text':
  34441. if (options.indentText) {
  34442. return true;
  34443. }
  34444. break; // skip to next key
  34445. case 'cdata':
  34446. if (options.indentCdata) {
  34447. return true;
  34448. }
  34449. break; // skip to next key
  34450. case 'instruction':
  34451. if (options.indentInstruction) {
  34452. return true;
  34453. }
  34454. break; // skip to next key
  34455. case 'doctype':
  34456. case 'comment':
  34457. case 'element':
  34458. return true;
  34459. default:
  34460. return true;
  34461. }
  34462. }
  34463. }
  34464. return false;
  34465. }
  34466. function writeElement(element, options, depth) {
  34467. currentElement = element;
  34468. currentElementName = element.name;
  34469. var xml = [], elementName = 'elementNameFn' in options ? options.elementNameFn(element.name, element) : element.name;
  34470. xml.push('<' + elementName);
  34471. if (element[options.attributesKey]) {
  34472. xml.push(writeAttributes(element[options.attributesKey], options, depth));
  34473. }
  34474. var withClosingTag = element[options.elementsKey] && element[options.elementsKey].length || element[options.attributesKey] && element[options.attributesKey]['xml:space'] === 'preserve';
  34475. if (!withClosingTag) {
  34476. if ('fullTagEmptyElementFn' in options) {
  34477. withClosingTag = options.fullTagEmptyElementFn(element.name, element);
  34478. } else {
  34479. withClosingTag = options.fullTagEmptyElement;
  34480. }
  34481. }
  34482. if (withClosingTag) {
  34483. xml.push('>');
  34484. if (element[options.elementsKey] && element[options.elementsKey].length) {
  34485. xml.push(writeElements(element[options.elementsKey], options, depth + 1));
  34486. currentElement = element;
  34487. currentElementName = element.name;
  34488. }
  34489. xml.push(options.spaces && hasContent(element, options) ? '\n' + Array(depth + 1).join(options.spaces) : '');
  34490. xml.push('</' + elementName + '>');
  34491. } else {
  34492. xml.push('/>');
  34493. }
  34494. return xml.join('');
  34495. }
  34496. function writeElements(elements, options, depth, firstLine) {
  34497. return elements.reduce(function (xml, element) {
  34498. var indent = writeIndentation(options, depth, firstLine && !xml);
  34499. switch (element.type) {
  34500. case 'element': return xml + indent + writeElement(element, options, depth);
  34501. case 'comment': return xml + indent + writeComment(element[options.commentKey], options);
  34502. case 'doctype': return xml + indent + writeDoctype(element[options.doctypeKey], options);
  34503. case 'cdata': return xml + (options.indentCdata ? indent : '') + writeCdata(element[options.cdataKey], options);
  34504. case 'text': return xml + (options.indentText ? indent : '') + writeText(element[options.textKey], options);
  34505. case 'instruction':
  34506. var instruction = {};
  34507. instruction[element[options.nameKey]] = element[options.attributesKey] ? element : element[options.instructionKey];
  34508. return xml + (options.indentInstruction ? indent : '') + writeInstruction(instruction, options, depth);
  34509. }
  34510. }, '');
  34511. }
  34512. function hasContentCompact(element, options, anyContent) {
  34513. var key;
  34514. for (key in element) {
  34515. if (element.hasOwnProperty(key)) {
  34516. switch (key) {
  34517. case options.parentKey:
  34518. case options.attributesKey:
  34519. break; // skip to next key
  34520. case options.textKey:
  34521. if (options.indentText || anyContent) {
  34522. return true;
  34523. }
  34524. break; // skip to next key
  34525. case options.cdataKey:
  34526. if (options.indentCdata || anyContent) {
  34527. return true;
  34528. }
  34529. break; // skip to next key
  34530. case options.instructionKey:
  34531. if (options.indentInstruction || anyContent) {
  34532. return true;
  34533. }
  34534. break; // skip to next key
  34535. case options.doctypeKey:
  34536. case options.commentKey:
  34537. return true;
  34538. default:
  34539. return true;
  34540. }
  34541. }
  34542. }
  34543. return false;
  34544. }
  34545. function writeElementCompact(element, name, options, depth, indent) {
  34546. currentElement = element;
  34547. currentElementName = name;
  34548. var elementName = 'elementNameFn' in options ? options.elementNameFn(name, element) : name;
  34549. if (typeof element === 'undefined' || element === null) {
  34550. return 'fullTagEmptyElementFn' in options && options.fullTagEmptyElementFn(name, element) || options.fullTagEmptyElement ? '<' + elementName + '></' + elementName + '>' : '<' + elementName + '/>';
  34551. }
  34552. var xml = [];
  34553. if (name) {
  34554. xml.push('<' + elementName);
  34555. if (typeof element !== 'object') {
  34556. xml.push('>' + writeText(element,options) + '</' + elementName + '>');
  34557. return xml.join('');
  34558. }
  34559. if (element[options.attributesKey]) {
  34560. xml.push(writeAttributes(element[options.attributesKey], options, depth));
  34561. }
  34562. var withClosingTag = hasContentCompact(element, options, true) || element[options.attributesKey] && element[options.attributesKey]['xml:space'] === 'preserve';
  34563. if (!withClosingTag) {
  34564. if ('fullTagEmptyElementFn' in options) {
  34565. withClosingTag = options.fullTagEmptyElementFn(name, element);
  34566. } else {
  34567. withClosingTag = options.fullTagEmptyElement;
  34568. }
  34569. }
  34570. if (withClosingTag) {
  34571. xml.push('>');
  34572. } else {
  34573. xml.push('/>');
  34574. return xml.join('');
  34575. }
  34576. }
  34577. xml.push(writeElementsCompact(element, options, depth + 1, false));
  34578. currentElement = element;
  34579. currentElementName = name;
  34580. if (name) {
  34581. xml.push((indent ? writeIndentation(options, depth, false) : '') + '</' + elementName + '>');
  34582. }
  34583. return xml.join('');
  34584. }
  34585. function writeElementsCompact(element, options, depth, firstLine) {
  34586. var i, key, nodes, xml = [];
  34587. for (key in element) {
  34588. if (element.hasOwnProperty(key)) {
  34589. nodes = isArray(element[key]) ? element[key] : [element[key]];
  34590. for (i = 0; i < nodes.length; ++i) {
  34591. switch (key) {
  34592. case options.declarationKey: xml.push(writeDeclaration(nodes[i], options, depth)); break;
  34593. case options.instructionKey: xml.push((options.indentInstruction ? writeIndentation(options, depth, firstLine) : '') + writeInstruction(nodes[i], options, depth)); break;
  34594. case options.attributesKey: case options.parentKey: break; // skip
  34595. case options.textKey: xml.push((options.indentText ? writeIndentation(options, depth, firstLine) : '') + writeText(nodes[i], options)); break;
  34596. case options.cdataKey: xml.push((options.indentCdata ? writeIndentation(options, depth, firstLine) : '') + writeCdata(nodes[i], options)); break;
  34597. case options.doctypeKey: xml.push(writeIndentation(options, depth, firstLine) + writeDoctype(nodes[i], options)); break;
  34598. case options.commentKey: xml.push(writeIndentation(options, depth, firstLine) + writeComment(nodes[i], options)); break;
  34599. default: xml.push(writeIndentation(options, depth, firstLine) + writeElementCompact(nodes[i], key, options, depth, hasContentCompact(nodes[i], options)));
  34600. }
  34601. firstLine = firstLine && !xml.length;
  34602. }
  34603. }
  34604. }
  34605. return xml.join('');
  34606. }
  34607. module.exports = function (js, options) {
  34608. options = validateOptions(options);
  34609. var xml = [];
  34610. currentElement = js;
  34611. currentElementName = '_root_';
  34612. if (options.compact) {
  34613. xml.push(writeElementsCompact(js, options, 0, true));
  34614. } else {
  34615. if (js[options.declarationKey]) {
  34616. xml.push(writeDeclaration(js[options.declarationKey], options, 0));
  34617. }
  34618. if (js[options.elementsKey] && js[options.elementsKey].length) {
  34619. xml.push(writeElements(js[options.elementsKey], options, 0, !xml.length));
  34620. }
  34621. }
  34622. return xml.join('');
  34623. };
  34624. /***/ }),
  34625. /***/ "c486":
  34626. /***/ (function(module, exports, __webpack_require__) {
  34627. "use strict";
  34628. var _interopRequireDefault = __webpack_require__("8e6d");
  34629. Object.defineProperty(exports, "__esModule", {
  34630. value: true
  34631. });
  34632. exports.default = void 0;
  34633. var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
  34634. var _lang = __webpack_require__("4e21");
  34635. var iPortalDataParameter = function iPortalDataParameter(options) {
  34636. (0, _classCallCheck2.default)(this, iPortalDataParameter);
  34637. this.type = 'iPortal';
  34638. this.url = options.url;
  34639. this.attributeFilter = options.attributeFilter || null;
  34640. this.maxFeatures = options.maxFeatures || 20;
  34641. this.name = options.name || (0, _lang.geti18n)().t('commontypes.iportalData');
  34642. this.withCredentials = options.withCredentials || false;
  34643. };
  34644. exports.default = iPortalDataParameter;
  34645. /***/ }),
  34646. /***/ "c492":
  34647. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  34648. "use strict";
  34649. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/common/border/Border.vue?vue&type=template&id=531a677a&
  34650. var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:_vm.borderId,staticClass:"sm-component-border",style:(_vm.borderStyle)},[_c('div',{staticClass:"sm-component-border__content",style:(_vm.contentStyle)},[_vm._t("default")],2)])}
  34651. var staticRenderFns = []
  34652. // CONCATENATED MODULE: ./src/common/border/Border.vue?vue&type=template&id=531a677a&
  34653. /* concated harmony reexport render */__webpack_require__.d(__webpack_exports__, "a", function() { return render; });
  34654. /* concated harmony reexport staticRenderFns */__webpack_require__.d(__webpack_exports__, "b", function() { return staticRenderFns; });
  34655. /***/ }),
  34656. /***/ "c51e":
  34657. /***/ (function(module, exports, __webpack_require__) {
  34658. "use strict";
  34659. var _interopRequireDefault = __webpack_require__("8e6d");
  34660. Object.defineProperty(exports, "__esModule", {
  34661. value: true
  34662. });
  34663. exports.default = void 0;
  34664. var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
  34665. var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
  34666. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
  34667. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
  34668. var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
  34669. var _typeof2 = _interopRequireDefault(__webpack_require__("7ae5"));
  34670. var _vue = _interopRequireDefault(__webpack_require__("5643"));
  34671. var _vuePropertyDecorator = __webpack_require__("e22c");
  34672. var _RestService = _interopRequireDefault(__webpack_require__("5bf3"));
  34673. var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
  34674. var c = arguments.length,
  34675. r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
  34676. d;
  34677. if ((typeof Reflect === "undefined" ? "undefined" : (0, _typeof2.default)(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
  34678. if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  34679. }
  34680. return c > 3 && r && Object.defineProperty(target, key, r), r;
  34681. };
  34682. var ThirdService =
  34683. /*#__PURE__*/
  34684. function (_Vue) {
  34685. (0, _inherits2.default)(ThirdService, _Vue);
  34686. function ThirdService() {
  34687. var _this;
  34688. (0, _classCallCheck2.default)(this, ThirdService);
  34689. _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(ThirdService).apply(this, arguments));
  34690. _this.features = null;
  34691. _this.restService = null;
  34692. return _this;
  34693. }
  34694. (0, _createClass2.default)(ThirdService, [{
  34695. key: "onUrlChange",
  34696. value: function onUrlChange(newValue) {
  34697. if (newValue) {
  34698. this.getData();
  34699. }
  34700. }
  34701. }, {
  34702. key: "onFieldChange",
  34703. value: function onFieldChange(newValue) {
  34704. if (this.url) {
  34705. this.setValue(this.features);
  34706. }
  34707. }
  34708. }, {
  34709. key: "onProxyChange",
  34710. value: function onProxyChange(newValue) {
  34711. this.restService && this.restService.setProxy(this.proxy);
  34712. if (this.url) {
  34713. this.getData();
  34714. }
  34715. }
  34716. }, {
  34717. key: "getData",
  34718. value: function getData() {
  34719. if (!this.restService) {
  34720. this.restService = new _RestService.default({
  34721. proxy: this.proxy
  34722. });
  34723. this.restService.on({
  34724. getdatasucceeded: this.fetchData
  34725. });
  34726. }
  34727. this.restService.getData(this.url);
  34728. }
  34729. }, {
  34730. key: "fetchData",
  34731. value: function fetchData(_ref) {
  34732. var features = _ref.features;
  34733. this.features = features;
  34734. this.setValue(features);
  34735. }
  34736. }, {
  34737. key: "setValue",
  34738. value: function setValue(features) {
  34739. if (features && !!features.length) {
  34740. var field = this.field;
  34741. this.finalValue = features[0].properties[field];
  34742. }
  34743. }
  34744. }]);
  34745. return ThirdService;
  34746. }(_vue.default);
  34747. __decorate([(0, _vuePropertyDecorator.Prop)({
  34748. default: ''
  34749. })], ThirdService.prototype, "url", void 0);
  34750. __decorate([(0, _vuePropertyDecorator.Prop)({
  34751. default: ''
  34752. })], ThirdService.prototype, "field", void 0);
  34753. __decorate([(0, _vuePropertyDecorator.Prop)({
  34754. default: ''
  34755. })], ThirdService.prototype, "proxy", void 0);
  34756. __decorate([(0, _vuePropertyDecorator.Watch)('url', {
  34757. immediate: true
  34758. })], ThirdService.prototype, "onUrlChange", null);
  34759. __decorate([(0, _vuePropertyDecorator.Watch)('field')], ThirdService.prototype, "onFieldChange", null);
  34760. __decorate([(0, _vuePropertyDecorator.Watch)('proxy')], ThirdService.prototype, "onProxyChange", null);
  34761. ThirdService = __decorate([_vuePropertyDecorator.Component], ThirdService);
  34762. var _default = ThirdService;
  34763. exports.default = _default;
  34764. /***/ }),
  34765. /***/ "c66c":
  34766. /***/ (function(module, exports, __webpack_require__) {
  34767. "use strict";
  34768. /* WEBPACK VAR INJECTION */(function(global, process) {// Copyright Joyent, Inc. and other Node contributors.
  34769. //
  34770. // Permission is hereby granted, free of charge, to any person obtaining a
  34771. // copy of this software and associated documentation files (the
  34772. // "Software"), to deal in the Software without restriction, including
  34773. // without limitation the rights to use, copy, modify, merge, publish,
  34774. // distribute, sublicense, and/or sell copies of the Software, and to permit
  34775. // persons to whom the Software is furnished to do so, subject to the
  34776. // following conditions:
  34777. //
  34778. // The above copyright notice and this permission notice shall be included
  34779. // in all copies or substantial portions of the Software.
  34780. //
  34781. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  34782. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  34783. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  34784. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  34785. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  34786. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  34787. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  34788. /*<replacement>*/
  34789. var pna = __webpack_require__("3e48");
  34790. /*</replacement>*/
  34791. module.exports = Readable;
  34792. /*<replacement>*/
  34793. var isArray = __webpack_require__("5b56");
  34794. /*</replacement>*/
  34795. /*<replacement>*/
  34796. var Duplex;
  34797. /*</replacement>*/
  34798. Readable.ReadableState = ReadableState;
  34799. /*<replacement>*/
  34800. var EE = __webpack_require__("0956").EventEmitter;
  34801. var EElistenerCount = function (emitter, type) {
  34802. return emitter.listeners(type).length;
  34803. };
  34804. /*</replacement>*/
  34805. /*<replacement>*/
  34806. var Stream = __webpack_require__("5e89");
  34807. /*</replacement>*/
  34808. /*<replacement>*/
  34809. var Buffer = __webpack_require__("54da").Buffer;
  34810. var OurUint8Array = global.Uint8Array || function () {};
  34811. function _uint8ArrayToBuffer(chunk) {
  34812. return Buffer.from(chunk);
  34813. }
  34814. function _isUint8Array(obj) {
  34815. return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
  34816. }
  34817. /*</replacement>*/
  34818. /*<replacement>*/
  34819. var util = __webpack_require__("9107");
  34820. util.inherits = __webpack_require__("fe04");
  34821. /*</replacement>*/
  34822. /*<replacement>*/
  34823. var debugUtil = __webpack_require__(1);
  34824. var debug = void 0;
  34825. if (debugUtil && debugUtil.debuglog) {
  34826. debug = debugUtil.debuglog('stream');
  34827. } else {
  34828. debug = function () {};
  34829. }
  34830. /*</replacement>*/
  34831. var BufferList = __webpack_require__("9bd6");
  34832. var destroyImpl = __webpack_require__("74c0");
  34833. var StringDecoder;
  34834. util.inherits(Readable, Stream);
  34835. var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
  34836. function prependListener(emitter, event, fn) {
  34837. // Sadly this is not cacheable as some libraries bundle their own
  34838. // event emitter implementation with them.
  34839. if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);
  34840. // This is a hack to make sure that our error handler is attached before any
  34841. // userland ones. NEVER DO THIS. This is here only because this code needs
  34842. // to continue to work with older versions of Node.js that do not include
  34843. // the prependListener() method. The goal is to eventually remove this hack.
  34844. 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]];
  34845. }
  34846. function ReadableState(options, stream) {
  34847. Duplex = Duplex || __webpack_require__("d711");
  34848. options = options || {};
  34849. // Duplex streams are both readable and writable, but share
  34850. // the same options object.
  34851. // However, some cases require setting options to different
  34852. // values for the readable and the writable sides of the duplex stream.
  34853. // These options can be provided separately as readableXXX and writableXXX.
  34854. var isDuplex = stream instanceof Duplex;
  34855. // object stream flag. Used to make read(n) ignore n and to
  34856. // make all the buffer merging and length checks go away
  34857. this.objectMode = !!options.objectMode;
  34858. if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
  34859. // the point at which it stops calling _read() to fill the buffer
  34860. // Note: 0 is a valid value, means "don't call _read preemptively ever"
  34861. var hwm = options.highWaterMark;
  34862. var readableHwm = options.readableHighWaterMark;
  34863. var defaultHwm = this.objectMode ? 16 : 16 * 1024;
  34864. if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;
  34865. // cast to ints.
  34866. this.highWaterMark = Math.floor(this.highWaterMark);
  34867. // A linked list is used to store data chunks instead of an array because the
  34868. // linked list can remove elements from the beginning faster than
  34869. // array.shift()
  34870. this.buffer = new BufferList();
  34871. this.length = 0;
  34872. this.pipes = null;
  34873. this.pipesCount = 0;
  34874. this.flowing = null;
  34875. this.ended = false;
  34876. this.endEmitted = false;
  34877. this.reading = false;
  34878. // a flag to be able to tell if the event 'readable'/'data' is emitted
  34879. // immediately, or on a later tick. We set this to true at first, because
  34880. // any actions that shouldn't happen until "later" should generally also
  34881. // not happen before the first read call.
  34882. this.sync = true;
  34883. // whenever we return null, then we set a flag to say
  34884. // that we're awaiting a 'readable' event emission.
  34885. this.needReadable = false;
  34886. this.emittedReadable = false;
  34887. this.readableListening = false;
  34888. this.resumeScheduled = false;
  34889. // has it been destroyed
  34890. this.destroyed = false;
  34891. // Crypto is kind of old and crusty. Historically, its default string
  34892. // encoding is 'binary' so we have to make this configurable.
  34893. // Everything else in the universe uses 'utf8', though.
  34894. this.defaultEncoding = options.defaultEncoding || 'utf8';
  34895. // the number of writers that are awaiting a drain event in .pipe()s
  34896. this.awaitDrain = 0;
  34897. // if true, a maybeReadMore has been scheduled
  34898. this.readingMore = false;
  34899. this.decoder = null;
  34900. this.encoding = null;
  34901. if (options.encoding) {
  34902. if (!StringDecoder) StringDecoder = __webpack_require__("5465").StringDecoder;
  34903. this.decoder = new StringDecoder(options.encoding);
  34904. this.encoding = options.encoding;
  34905. }
  34906. }
  34907. function Readable(options) {
  34908. Duplex = Duplex || __webpack_require__("d711");
  34909. if (!(this instanceof Readable)) return new Readable(options);
  34910. this._readableState = new ReadableState(options, this);
  34911. // legacy
  34912. this.readable = true;
  34913. if (options) {
  34914. if (typeof options.read === 'function') this._read = options.read;
  34915. if (typeof options.destroy === 'function') this._destroy = options.destroy;
  34916. }
  34917. Stream.call(this);
  34918. }
  34919. Object.defineProperty(Readable.prototype, 'destroyed', {
  34920. get: function () {
  34921. if (this._readableState === undefined) {
  34922. return false;
  34923. }
  34924. return this._readableState.destroyed;
  34925. },
  34926. set: function (value) {
  34927. // we ignore the value if the stream
  34928. // has not been initialized yet
  34929. if (!this._readableState) {
  34930. return;
  34931. }
  34932. // backward compatibility, the user is explicitly
  34933. // managing destroyed
  34934. this._readableState.destroyed = value;
  34935. }
  34936. });
  34937. Readable.prototype.destroy = destroyImpl.destroy;
  34938. Readable.prototype._undestroy = destroyImpl.undestroy;
  34939. Readable.prototype._destroy = function (err, cb) {
  34940. this.push(null);
  34941. cb(err);
  34942. };
  34943. // Manually shove something into the read() buffer.
  34944. // This returns true if the highWaterMark has not been hit yet,
  34945. // similar to how Writable.write() returns true if you should
  34946. // write() some more.
  34947. Readable.prototype.push = function (chunk, encoding) {
  34948. var state = this._readableState;
  34949. var skipChunkCheck;
  34950. if (!state.objectMode) {
  34951. if (typeof chunk === 'string') {
  34952. encoding = encoding || state.defaultEncoding;
  34953. if (encoding !== state.encoding) {
  34954. chunk = Buffer.from(chunk, encoding);
  34955. encoding = '';
  34956. }
  34957. skipChunkCheck = true;
  34958. }
  34959. } else {
  34960. skipChunkCheck = true;
  34961. }
  34962. return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
  34963. };
  34964. // Unshift should *always* be something directly out of read()
  34965. Readable.prototype.unshift = function (chunk) {
  34966. return readableAddChunk(this, chunk, null, true, false);
  34967. };
  34968. function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
  34969. var state = stream._readableState;
  34970. if (chunk === null) {
  34971. state.reading = false;
  34972. onEofChunk(stream, state);
  34973. } else {
  34974. var er;
  34975. if (!skipChunkCheck) er = chunkInvalid(state, chunk);
  34976. if (er) {
  34977. stream.emit('error', er);
  34978. } else if (state.objectMode || chunk && chunk.length > 0) {
  34979. if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
  34980. chunk = _uint8ArrayToBuffer(chunk);
  34981. }
  34982. if (addToFront) {
  34983. if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
  34984. } else if (state.ended) {
  34985. stream.emit('error', new Error('stream.push() after EOF'));
  34986. } else {
  34987. state.reading = false;
  34988. if (state.decoder && !encoding) {
  34989. chunk = state.decoder.write(chunk);
  34990. if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
  34991. } else {
  34992. addChunk(stream, state, chunk, false);
  34993. }
  34994. }
  34995. } else if (!addToFront) {
  34996. state.reading = false;
  34997. }
  34998. }
  34999. return needMoreData(state);
  35000. }
  35001. function addChunk(stream, state, chunk, addToFront) {
  35002. if (state.flowing && state.length === 0 && !state.sync) {
  35003. stream.emit('data', chunk);
  35004. stream.read(0);
  35005. } else {
  35006. // update the buffer info.
  35007. state.length += state.objectMode ? 1 : chunk.length;
  35008. if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
  35009. if (state.needReadable) emitReadable(stream);
  35010. }
  35011. maybeReadMore(stream, state);
  35012. }
  35013. function chunkInvalid(state, chunk) {
  35014. var er;
  35015. if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
  35016. er = new TypeError('Invalid non-string/buffer chunk');
  35017. }
  35018. return er;
  35019. }
  35020. // if it's past the high water mark, we can push in some more.
  35021. // Also, if we have no data yet, we can stand some
  35022. // more bytes. This is to work around cases where hwm=0,
  35023. // such as the repl. Also, if the push() triggered a
  35024. // readable event, and the user called read(largeNumber) such that
  35025. // needReadable was set, then we ought to push more, so that another
  35026. // 'readable' event will be triggered.
  35027. function needMoreData(state) {
  35028. return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
  35029. }
  35030. Readable.prototype.isPaused = function () {
  35031. return this._readableState.flowing === false;
  35032. };
  35033. // backwards compatibility.
  35034. Readable.prototype.setEncoding = function (enc) {
  35035. if (!StringDecoder) StringDecoder = __webpack_require__("5465").StringDecoder;
  35036. this._readableState.decoder = new StringDecoder(enc);
  35037. this._readableState.encoding = enc;
  35038. return this;
  35039. };
  35040. // Don't raise the hwm > 8MB
  35041. var MAX_HWM = 0x800000;
  35042. function computeNewHighWaterMark(n) {
  35043. if (n >= MAX_HWM) {
  35044. n = MAX_HWM;
  35045. } else {
  35046. // Get the next highest power of 2 to prevent increasing hwm excessively in
  35047. // tiny amounts
  35048. n--;
  35049. n |= n >>> 1;
  35050. n |= n >>> 2;
  35051. n |= n >>> 4;
  35052. n |= n >>> 8;
  35053. n |= n >>> 16;
  35054. n++;
  35055. }
  35056. return n;
  35057. }
  35058. // This function is designed to be inlinable, so please take care when making
  35059. // changes to the function body.
  35060. function howMuchToRead(n, state) {
  35061. if (n <= 0 || state.length === 0 && state.ended) return 0;
  35062. if (state.objectMode) return 1;
  35063. if (n !== n) {
  35064. // Only flow one buffer at a time
  35065. if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
  35066. }
  35067. // If we're asking for more than the current hwm, then raise the hwm.
  35068. if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
  35069. if (n <= state.length) return n;
  35070. // Don't have enough
  35071. if (!state.ended) {
  35072. state.needReadable = true;
  35073. return 0;
  35074. }
  35075. return state.length;
  35076. }
  35077. // you can override either this method, or the async _read(n) below.
  35078. Readable.prototype.read = function (n) {
  35079. debug('read', n);
  35080. n = parseInt(n, 10);
  35081. var state = this._readableState;
  35082. var nOrig = n;
  35083. if (n !== 0) state.emittedReadable = false;
  35084. // if we're doing read(0) to trigger a readable event, but we
  35085. // already have a bunch of data in the buffer, then just trigger
  35086. // the 'readable' event and move on.
  35087. if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
  35088. debug('read: emitReadable', state.length, state.ended);
  35089. if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
  35090. return null;
  35091. }
  35092. n = howMuchToRead(n, state);
  35093. // if we've ended, and we're now clear, then finish it up.
  35094. if (n === 0 && state.ended) {
  35095. if (state.length === 0) endReadable(this);
  35096. return null;
  35097. }
  35098. // All the actual chunk generation logic needs to be
  35099. // *below* the call to _read. The reason is that in certain
  35100. // synthetic stream cases, such as passthrough streams, _read
  35101. // may be a completely synchronous operation which may change
  35102. // the state of the read buffer, providing enough data when
  35103. // before there was *not* enough.
  35104. //
  35105. // So, the steps are:
  35106. // 1. Figure out what the state of things will be after we do
  35107. // a read from the buffer.
  35108. //
  35109. // 2. If that resulting state will trigger a _read, then call _read.
  35110. // Note that this may be asynchronous, or synchronous. Yes, it is
  35111. // deeply ugly to write APIs this way, but that still doesn't mean
  35112. // that the Readable class should behave improperly, as streams are
  35113. // designed to be sync/async agnostic.
  35114. // Take note if the _read call is sync or async (ie, if the read call
  35115. // has returned yet), so that we know whether or not it's safe to emit
  35116. // 'readable' etc.
  35117. //
  35118. // 3. Actually pull the requested chunks out of the buffer and return.
  35119. // if we need a readable event, then we need to do some reading.
  35120. var doRead = state.needReadable;
  35121. debug('need readable', doRead);
  35122. // if we currently have less than the highWaterMark, then also read some
  35123. if (state.length === 0 || state.length - n < state.highWaterMark) {
  35124. doRead = true;
  35125. debug('length less than watermark', doRead);
  35126. }
  35127. // however, if we've ended, then there's no point, and if we're already
  35128. // reading, then it's unnecessary.
  35129. if (state.ended || state.reading) {
  35130. doRead = false;
  35131. debug('reading or ended', doRead);
  35132. } else if (doRead) {
  35133. debug('do read');
  35134. state.reading = true;
  35135. state.sync = true;
  35136. // if the length is currently zero, then we *need* a readable event.
  35137. if (state.length === 0) state.needReadable = true;
  35138. // call internal read method
  35139. this._read(state.highWaterMark);
  35140. state.sync = false;
  35141. // If _read pushed data synchronously, then `reading` will be false,
  35142. // and we need to re-evaluate how much data we can return to the user.
  35143. if (!state.reading) n = howMuchToRead(nOrig, state);
  35144. }
  35145. var ret;
  35146. if (n > 0) ret = fromList(n, state);else ret = null;
  35147. if (ret === null) {
  35148. state.needReadable = true;
  35149. n = 0;
  35150. } else {
  35151. state.length -= n;
  35152. }
  35153. if (state.length === 0) {
  35154. // If we have nothing in the buffer, then we want to know
  35155. // as soon as we *do* get something into the buffer.
  35156. if (!state.ended) state.needReadable = true;
  35157. // If we tried to read() past the EOF, then emit end on the next tick.
  35158. if (nOrig !== n && state.ended) endReadable(this);
  35159. }
  35160. if (ret !== null) this.emit('data', ret);
  35161. return ret;
  35162. };
  35163. function onEofChunk(stream, state) {
  35164. if (state.ended) return;
  35165. if (state.decoder) {
  35166. var chunk = state.decoder.end();
  35167. if (chunk && chunk.length) {
  35168. state.buffer.push(chunk);
  35169. state.length += state.objectMode ? 1 : chunk.length;
  35170. }
  35171. }
  35172. state.ended = true;
  35173. // emit 'readable' now to make sure it gets picked up.
  35174. emitReadable(stream);
  35175. }
  35176. // Don't emit readable right away in sync mode, because this can trigger
  35177. // another read() call => stack overflow. This way, it might trigger
  35178. // a nextTick recursion warning, but that's not so bad.
  35179. function emitReadable(stream) {
  35180. var state = stream._readableState;
  35181. state.needReadable = false;
  35182. if (!state.emittedReadable) {
  35183. debug('emitReadable', state.flowing);
  35184. state.emittedReadable = true;
  35185. if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);
  35186. }
  35187. }
  35188. function emitReadable_(stream) {
  35189. debug('emit readable');
  35190. stream.emit('readable');
  35191. flow(stream);
  35192. }
  35193. // at this point, the user has presumably seen the 'readable' event,
  35194. // and called read() to consume some data. that may have triggered
  35195. // in turn another _read(n) call, in which case reading = true if
  35196. // it's in progress.
  35197. // However, if we're not ended, or reading, and the length < hwm,
  35198. // then go ahead and try to read some more preemptively.
  35199. function maybeReadMore(stream, state) {
  35200. if (!state.readingMore) {
  35201. state.readingMore = true;
  35202. pna.nextTick(maybeReadMore_, stream, state);
  35203. }
  35204. }
  35205. function maybeReadMore_(stream, state) {
  35206. var len = state.length;
  35207. while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
  35208. debug('maybeReadMore read 0');
  35209. stream.read(0);
  35210. if (len === state.length)
  35211. // didn't get any data, stop spinning.
  35212. break;else len = state.length;
  35213. }
  35214. state.readingMore = false;
  35215. }
  35216. // abstract method. to be overridden in specific implementation classes.
  35217. // call cb(er, data) where data is <= n in length.
  35218. // for virtual (non-string, non-buffer) streams, "length" is somewhat
  35219. // arbitrary, and perhaps not very meaningful.
  35220. Readable.prototype._read = function (n) {
  35221. this.emit('error', new Error('_read() is not implemented'));
  35222. };
  35223. Readable.prototype.pipe = function (dest, pipeOpts) {
  35224. var src = this;
  35225. var state = this._readableState;
  35226. switch (state.pipesCount) {
  35227. case 0:
  35228. state.pipes = dest;
  35229. break;
  35230. case 1:
  35231. state.pipes = [state.pipes, dest];
  35232. break;
  35233. default:
  35234. state.pipes.push(dest);
  35235. break;
  35236. }
  35237. state.pipesCount += 1;
  35238. debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
  35239. var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
  35240. var endFn = doEnd ? onend : unpipe;
  35241. if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);
  35242. dest.on('unpipe', onunpipe);
  35243. function onunpipe(readable, unpipeInfo) {
  35244. debug('onunpipe');
  35245. if (readable === src) {
  35246. if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
  35247. unpipeInfo.hasUnpiped = true;
  35248. cleanup();
  35249. }
  35250. }
  35251. }
  35252. function onend() {
  35253. debug('onend');
  35254. dest.end();
  35255. }
  35256. // when the dest drains, it reduces the awaitDrain counter
  35257. // on the source. This would be more elegant with a .once()
  35258. // handler in flow(), but adding and removing repeatedly is
  35259. // too slow.
  35260. var ondrain = pipeOnDrain(src);
  35261. dest.on('drain', ondrain);
  35262. var cleanedUp = false;
  35263. function cleanup() {
  35264. debug('cleanup');
  35265. // cleanup event handlers once the pipe is broken
  35266. dest.removeListener('close', onclose);
  35267. dest.removeListener('finish', onfinish);
  35268. dest.removeListener('drain', ondrain);
  35269. dest.removeListener('error', onerror);
  35270. dest.removeListener('unpipe', onunpipe);
  35271. src.removeListener('end', onend);
  35272. src.removeListener('end', unpipe);
  35273. src.removeListener('data', ondata);
  35274. cleanedUp = true;
  35275. // if the reader is waiting for a drain event from this
  35276. // specific writer, then it would cause it to never start
  35277. // flowing again.
  35278. // So, if this is awaiting a drain, then we just call it now.
  35279. // If we don't know, then assume that we are waiting for one.
  35280. if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
  35281. }
  35282. // If the user pushes more data while we're writing to dest then we'll end up
  35283. // in ondata again. However, we only want to increase awaitDrain once because
  35284. // dest will only emit one 'drain' event for the multiple writes.
  35285. // => Introduce a guard on increasing awaitDrain.
  35286. var increasedAwaitDrain = false;
  35287. src.on('data', ondata);
  35288. function ondata(chunk) {
  35289. debug('ondata');
  35290. increasedAwaitDrain = false;
  35291. var ret = dest.write(chunk);
  35292. if (false === ret && !increasedAwaitDrain) {
  35293. // If the user unpiped during `dest.write()`, it is possible
  35294. // to get stuck in a permanently paused state if that write
  35295. // also returned false.
  35296. // => Check whether `dest` is still a piping destination.
  35297. if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
  35298. debug('false write response, pause', src._readableState.awaitDrain);
  35299. src._readableState.awaitDrain++;
  35300. increasedAwaitDrain = true;
  35301. }
  35302. src.pause();
  35303. }
  35304. }
  35305. // if the dest has an error, then stop piping into it.
  35306. // however, don't suppress the throwing behavior for this.
  35307. function onerror(er) {
  35308. debug('onerror', er);
  35309. unpipe();
  35310. dest.removeListener('error', onerror);
  35311. if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
  35312. }
  35313. // Make sure our error handler is attached before userland ones.
  35314. prependListener(dest, 'error', onerror);
  35315. // Both close and finish should trigger unpipe, but only once.
  35316. function onclose() {
  35317. dest.removeListener('finish', onfinish);
  35318. unpipe();
  35319. }
  35320. dest.once('close', onclose);
  35321. function onfinish() {
  35322. debug('onfinish');
  35323. dest.removeListener('close', onclose);
  35324. unpipe();
  35325. }
  35326. dest.once('finish', onfinish);
  35327. function unpipe() {
  35328. debug('unpipe');
  35329. src.unpipe(dest);
  35330. }
  35331. // tell the dest that it's being piped to
  35332. dest.emit('pipe', src);
  35333. // start the flow if it hasn't been started already.
  35334. if (!state.flowing) {
  35335. debug('pipe resume');
  35336. src.resume();
  35337. }
  35338. return dest;
  35339. };
  35340. function pipeOnDrain(src) {
  35341. return function () {
  35342. var state = src._readableState;
  35343. debug('pipeOnDrain', state.awaitDrain);
  35344. if (state.awaitDrain) state.awaitDrain--;
  35345. if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
  35346. state.flowing = true;
  35347. flow(src);
  35348. }
  35349. };
  35350. }
  35351. Readable.prototype.unpipe = function (dest) {
  35352. var state = this._readableState;
  35353. var unpipeInfo = { hasUnpiped: false };
  35354. // if we're not piping anywhere, then do nothing.
  35355. if (state.pipesCount === 0) return this;
  35356. // just one destination. most common case.
  35357. if (state.pipesCount === 1) {
  35358. // passed in one, but it's not the right one.
  35359. if (dest && dest !== state.pipes) return this;
  35360. if (!dest) dest = state.pipes;
  35361. // got a match.
  35362. state.pipes = null;
  35363. state.pipesCount = 0;
  35364. state.flowing = false;
  35365. if (dest) dest.emit('unpipe', this, unpipeInfo);
  35366. return this;
  35367. }
  35368. // slow case. multiple pipe destinations.
  35369. if (!dest) {
  35370. // remove all.
  35371. var dests = state.pipes;
  35372. var len = state.pipesCount;
  35373. state.pipes = null;
  35374. state.pipesCount = 0;
  35375. state.flowing = false;
  35376. for (var i = 0; i < len; i++) {
  35377. dests[i].emit('unpipe', this, unpipeInfo);
  35378. }return this;
  35379. }
  35380. // try to find the right one.
  35381. var index = indexOf(state.pipes, dest);
  35382. if (index === -1) return this;
  35383. state.pipes.splice(index, 1);
  35384. state.pipesCount -= 1;
  35385. if (state.pipesCount === 1) state.pipes = state.pipes[0];
  35386. dest.emit('unpipe', this, unpipeInfo);
  35387. return this;
  35388. };
  35389. // set up data events if they are asked for
  35390. // Ensure readable listeners eventually get something
  35391. Readable.prototype.on = function (ev, fn) {
  35392. var res = Stream.prototype.on.call(this, ev, fn);
  35393. if (ev === 'data') {
  35394. // Start flowing on next tick if stream isn't explicitly paused
  35395. if (this._readableState.flowing !== false) this.resume();
  35396. } else if (ev === 'readable') {
  35397. var state = this._readableState;
  35398. if (!state.endEmitted && !state.readableListening) {
  35399. state.readableListening = state.needReadable = true;
  35400. state.emittedReadable = false;
  35401. if (!state.reading) {
  35402. pna.nextTick(nReadingNextTick, this);
  35403. } else if (state.length) {
  35404. emitReadable(this);
  35405. }
  35406. }
  35407. }
  35408. return res;
  35409. };
  35410. Readable.prototype.addListener = Readable.prototype.on;
  35411. function nReadingNextTick(self) {
  35412. debug('readable nexttick read 0');
  35413. self.read(0);
  35414. }
  35415. // pause() and resume() are remnants of the legacy readable stream API
  35416. // If the user uses them, then switch into old mode.
  35417. Readable.prototype.resume = function () {
  35418. var state = this._readableState;
  35419. if (!state.flowing) {
  35420. debug('resume');
  35421. state.flowing = true;
  35422. resume(this, state);
  35423. }
  35424. return this;
  35425. };
  35426. function resume(stream, state) {
  35427. if (!state.resumeScheduled) {
  35428. state.resumeScheduled = true;
  35429. pna.nextTick(resume_, stream, state);
  35430. }
  35431. }
  35432. function resume_(stream, state) {
  35433. if (!state.reading) {
  35434. debug('resume read 0');
  35435. stream.read(0);
  35436. }
  35437. state.resumeScheduled = false;
  35438. state.awaitDrain = 0;
  35439. stream.emit('resume');
  35440. flow(stream);
  35441. if (state.flowing && !state.reading) stream.read(0);
  35442. }
  35443. Readable.prototype.pause = function () {
  35444. debug('call pause flowing=%j', this._readableState.flowing);
  35445. if (false !== this._readableState.flowing) {
  35446. debug('pause');
  35447. this._readableState.flowing = false;
  35448. this.emit('pause');
  35449. }
  35450. return this;
  35451. };
  35452. function flow(stream) {
  35453. var state = stream._readableState;
  35454. debug('flow', state.flowing);
  35455. while (state.flowing && stream.read() !== null) {}
  35456. }
  35457. // wrap an old-style stream as the async data source.
  35458. // This is *not* part of the readable stream interface.
  35459. // It is an ugly unfortunate mess of history.
  35460. Readable.prototype.wrap = function (stream) {
  35461. var _this = this;
  35462. var state = this._readableState;
  35463. var paused = false;
  35464. stream.on('end', function () {
  35465. debug('wrapped end');
  35466. if (state.decoder && !state.ended) {
  35467. var chunk = state.decoder.end();
  35468. if (chunk && chunk.length) _this.push(chunk);
  35469. }
  35470. _this.push(null);
  35471. });
  35472. stream.on('data', function (chunk) {
  35473. debug('wrapped data');
  35474. if (state.decoder) chunk = state.decoder.write(chunk);
  35475. // don't skip over falsy values in objectMode
  35476. if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
  35477. var ret = _this.push(chunk);
  35478. if (!ret) {
  35479. paused = true;
  35480. stream.pause();
  35481. }
  35482. });
  35483. // proxy all the other methods.
  35484. // important when wrapping filters and duplexes.
  35485. for (var i in stream) {
  35486. if (this[i] === undefined && typeof stream[i] === 'function') {
  35487. this[i] = function (method) {
  35488. return function () {
  35489. return stream[method].apply(stream, arguments);
  35490. };
  35491. }(i);
  35492. }
  35493. }
  35494. // proxy certain important events.
  35495. for (var n = 0; n < kProxyEvents.length; n++) {
  35496. stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
  35497. }
  35498. // when we try to consume some more bytes, simply unpause the
  35499. // underlying stream.
  35500. this._read = function (n) {
  35501. debug('wrapped _read', n);
  35502. if (paused) {
  35503. paused = false;
  35504. stream.resume();
  35505. }
  35506. };
  35507. return this;
  35508. };
  35509. Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
  35510. // making it explicit this property is not enumerable
  35511. // because otherwise some prototype manipulation in
  35512. // userland will fail
  35513. enumerable: false,
  35514. get: function () {
  35515. return this._readableState.highWaterMark;
  35516. }
  35517. });
  35518. // exposed for testing purposes only.
  35519. Readable._fromList = fromList;
  35520. // Pluck off n bytes from an array of buffers.
  35521. // Length is the combined lengths of all the buffers in the list.
  35522. // This function is designed to be inlinable, so please take care when making
  35523. // changes to the function body.
  35524. function fromList(n, state) {
  35525. // nothing buffered
  35526. if (state.length === 0) return null;
  35527. var ret;
  35528. if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
  35529. // read it all, truncate the list
  35530. 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);
  35531. state.buffer.clear();
  35532. } else {
  35533. // read part of list
  35534. ret = fromListPartial(n, state.buffer, state.decoder);
  35535. }
  35536. return ret;
  35537. }
  35538. // Extracts only enough buffered data to satisfy the amount requested.
  35539. // This function is designed to be inlinable, so please take care when making
  35540. // changes to the function body.
  35541. function fromListPartial(n, list, hasStrings) {
  35542. var ret;
  35543. if (n < list.head.data.length) {
  35544. // slice is the same for buffers and strings
  35545. ret = list.head.data.slice(0, n);
  35546. list.head.data = list.head.data.slice(n);
  35547. } else if (n === list.head.data.length) {
  35548. // first chunk is a perfect match
  35549. ret = list.shift();
  35550. } else {
  35551. // result spans more than one buffer
  35552. ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
  35553. }
  35554. return ret;
  35555. }
  35556. // Copies a specified amount of characters from the list of buffered data
  35557. // chunks.
  35558. // This function is designed to be inlinable, so please take care when making
  35559. // changes to the function body.
  35560. function copyFromBufferString(n, list) {
  35561. var p = list.head;
  35562. var c = 1;
  35563. var ret = p.data;
  35564. n -= ret.length;
  35565. while (p = p.next) {
  35566. var str = p.data;
  35567. var nb = n > str.length ? str.length : n;
  35568. if (nb === str.length) ret += str;else ret += str.slice(0, n);
  35569. n -= nb;
  35570. if (n === 0) {
  35571. if (nb === str.length) {
  35572. ++c;
  35573. if (p.next) list.head = p.next;else list.head = list.tail = null;
  35574. } else {
  35575. list.head = p;
  35576. p.data = str.slice(nb);
  35577. }
  35578. break;
  35579. }
  35580. ++c;
  35581. }
  35582. list.length -= c;
  35583. return ret;
  35584. }
  35585. // Copies a specified amount of bytes from the list of buffered data chunks.
  35586. // This function is designed to be inlinable, so please take care when making
  35587. // changes to the function body.
  35588. function copyFromBuffer(n, list) {
  35589. var ret = Buffer.allocUnsafe(n);
  35590. var p = list.head;
  35591. var c = 1;
  35592. p.data.copy(ret);
  35593. n -= p.data.length;
  35594. while (p = p.next) {
  35595. var buf = p.data;
  35596. var nb = n > buf.length ? buf.length : n;
  35597. buf.copy(ret, ret.length - n, 0, nb);
  35598. n -= nb;
  35599. if (n === 0) {
  35600. if (nb === buf.length) {
  35601. ++c;
  35602. if (p.next) list.head = p.next;else list.head = list.tail = null;
  35603. } else {
  35604. list.head = p;
  35605. p.data = buf.slice(nb);
  35606. }
  35607. break;
  35608. }
  35609. ++c;
  35610. }
  35611. list.length -= c;
  35612. return ret;
  35613. }
  35614. function endReadable(stream) {
  35615. var state = stream._readableState;
  35616. // If we get here before consuming all the bytes, then that is a
  35617. // bug in node. Should never happen.
  35618. if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
  35619. if (!state.endEmitted) {
  35620. state.ended = true;
  35621. pna.nextTick(endReadableNT, state, stream);
  35622. }
  35623. }
  35624. function endReadableNT(state, stream) {
  35625. // Check that we didn't get one last unshift.
  35626. if (!state.endEmitted && state.length === 0) {
  35627. state.endEmitted = true;
  35628. stream.readable = false;
  35629. stream.emit('end');
  35630. }
  35631. }
  35632. function indexOf(xs, x) {
  35633. for (var i = 0, l = xs.length; i < l; i++) {
  35634. if (xs[i] === x) return i;
  35635. }
  35636. return -1;
  35637. }
  35638. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("698d"), __webpack_require__("f2ac")))
  35639. /***/ }),
  35640. /***/ "c794":
  35641. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  35642. "use strict";
  35643. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/common/icon/Icon.vue?vue&type=template&id=076da86b&
  35644. var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"sm-component-icon"},[(!!_vm.iconClass)?_c('i',{class:_vm.customIconClass,style:([_vm.iconStyle, _vm.colorStyle]),attrs:{"theme":_vm.theme,"twoToneColor":_vm.twoToneColor,"component":_vm.component}}):_c('a-icon',{style:([_vm.iconStyle, _vm.colorStyle]),attrs:{"type":_vm.type,"theme":_vm.theme,"twoToneColor":_vm.twoToneColor,"component":_vm.component}})],1)}
  35645. var staticRenderFns = []
  35646. // CONCATENATED MODULE: ./src/common/icon/Icon.vue?vue&type=template&id=076da86b&
  35647. /* concated harmony reexport render */__webpack_require__.d(__webpack_exports__, "a", function() { return render; });
  35648. /* concated harmony reexport staticRenderFns */__webpack_require__.d(__webpack_exports__, "b", function() { return staticRenderFns; });
  35649. /***/ }),
  35650. /***/ "c7a6":
  35651. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  35652. "use strict";
  35653. __webpack_require__.r(__webpack_exports__);
  35654. /* harmony import */ var _Chart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("550a");
  35655. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _Chart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _Chart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  35656. /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("b429");
  35657. var render, staticRenderFns
  35658. /* normalize component */
  35659. var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(
  35660. _Chart_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"],
  35661. render,
  35662. staticRenderFns,
  35663. false,
  35664. null,
  35665. null,
  35666. null
  35667. )
  35668. /* harmony default export */ __webpack_exports__["default"] = (component.exports);
  35669. /***/ }),
  35670. /***/ "c978":
  35671. /***/ (function(module, exports, __webpack_require__) {
  35672. "use strict";
  35673. /*
  35674. * JsonSQL
  35675. * By: Trent Richardson [http://trentrichardson.com]
  35676. * Version 0.1
  35677. * Last Modified: 1/1/2008
  35678. *
  35679. * Copyright 2008 Trent Richardson
  35680. *
  35681. * Licensed under the Apache License, Version 2.0 (the "License");
  35682. * you may not use this file except in compliance with the License.
  35683. * You may obtain a copy of the License at
  35684. *
  35685. * http://www.apache.org/licenses/LICENSE-2.0
  35686. *
  35687. * Unless required by applicable law or agreed to in writing, software
  35688. * distributed under the License is distributed on an "AS IS" BASIS,
  35689. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  35690. * See the License for the specific language governing permissions and
  35691. * limitations under the License.
  35692. */
  35693. window.jsonsql = {
  35694. query: function query(sql, json) {
  35695. 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);
  35696. var ops = {
  35697. fields: returnfields[2].replace(' ', '').split(','),
  35698. from: returnfields[3].replace(' ', ''),
  35699. where: returnfields[4] == undefined ? 'true' : returnfields[4],
  35700. orderby: returnfields[5] == undefined ? [] : returnfields[5].replace(' ', '').split(','),
  35701. order: returnfields[6] == undefined ? 'asc' : returnfields[6],
  35702. limit: returnfields[7] == undefined ? [] : returnfields[7].replace(' ', '').split(',')
  35703. };
  35704. return this.parse(json, ops);
  35705. },
  35706. parse: function parse(json, ops) {
  35707. var o = {
  35708. fields: ['*'],
  35709. from: 'json',
  35710. where: '',
  35711. orderby: [],
  35712. order: 'asc',
  35713. limit: []
  35714. };
  35715. for (var i in ops) {
  35716. o[i] = ops[i];
  35717. }
  35718. var result = [];
  35719. result = this.returnFilter(json, o);
  35720. result = this.returnOrderBy(result, o.orderby, o.order);
  35721. result = this.returnLimit(result, o.limit);
  35722. return result;
  35723. },
  35724. returnFilter: function returnFilter(json, jsonsql_o) {
  35725. var jsonsql_scope = eval(jsonsql_o.from);
  35726. var jsonsql_result = [];
  35727. var jsonsql_rc = 0;
  35728. if (jsonsql_o.where == '') jsonsql_o.where = 'true';
  35729. for (var jsonsql_i in jsonsql_scope) {
  35730. // with(jsonsql_scope[jsonsql_i]){
  35731. // if(eval(jsonsql_o.where)){
  35732. // jsonsql_result[jsonsql_rc++] = this.returnFields(jsonsql_scope[jsonsql_i],jsonsql_o.fields);
  35733. // }
  35734. // }
  35735. // fix with -- stric mode
  35736. if (this.functionWith(jsonsql_scope[jsonsql_i], jsonsql_o.where)) {
  35737. jsonsql_result[jsonsql_rc++] = this.returnFields(jsonsql_scope[jsonsql_i], jsonsql_o.fields);
  35738. }
  35739. }
  35740. return jsonsql_result;
  35741. },
  35742. functionWith: function functionWith(scope, exp) {
  35743. if (!scope) return;
  35744. var resetArgs = '';
  35745. for (var key in scope) {
  35746. resetArgs = resetArgs + 'var ' + key + ' = _$_$_functionWith["' + key + '"];';
  35747. }
  35748. var nf = new Function('_$_$_functionWith', resetArgs + 'return ' + exp);
  35749. return nf(scope);
  35750. },
  35751. returnFields: function returnFields(scope, fields) {
  35752. if (fields.length == 0) fields = ['*'];
  35753. if (fields[0] == '*') return scope;
  35754. var returnobj = {};
  35755. for (var i in fields) {
  35756. returnobj[fields[i]] = scope[fields[i]];
  35757. }
  35758. return returnobj;
  35759. },
  35760. returnOrderBy: function returnOrderBy(result, orderby, order) {
  35761. if (orderby.length == 0) return result;
  35762. result.sort(function (a, b) {
  35763. switch (order.toLowerCase()) {
  35764. case 'desc':
  35765. return eval('a.' + orderby[0] + ' < b.' + orderby[0]) ? 1 : -1;
  35766. case 'asc':
  35767. return eval('a.' + orderby[0] + ' > b.' + orderby[0]) ? 1 : -1;
  35768. case 'descnum':
  35769. return eval('a.' + orderby[0] + ' - b.' + orderby[0]);
  35770. case 'ascnum':
  35771. return eval('b.' + orderby[0] + ' - a.' + orderby[0]);
  35772. }
  35773. });
  35774. return result;
  35775. },
  35776. returnLimit: function returnLimit(result, limit) {
  35777. switch (limit.length) {
  35778. case 0:
  35779. return result;
  35780. case 1:
  35781. return result.splice(0, limit[0]);
  35782. case 2:
  35783. return result.splice(limit[0] - 1, limit[1]);
  35784. }
  35785. }
  35786. };
  35787. /***/ }),
  35788. /***/ "ca6a":
  35789. /***/ (function(module, exports) {
  35790. /**
  35791. * lodash (Custom Build) <https://lodash.com/>
  35792. * Build: `lodash modularize exports="npm" -o ./`
  35793. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  35794. * Released under MIT license <https://lodash.com/license>
  35795. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  35796. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  35797. */
  35798. /** Used as references for various `Number` constants. */
  35799. var NAN = 0 / 0;
  35800. /** `Object#toString` result references. */
  35801. var symbolTag = '[object Symbol]';
  35802. /** Used to match leading and trailing whitespace. */
  35803. var reTrim = /^\s+|\s+$/g;
  35804. /** Used to detect bad signed hexadecimal string values. */
  35805. var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
  35806. /** Used to detect binary string values. */
  35807. var reIsBinary = /^0b[01]+$/i;
  35808. /** Used to detect octal string values. */
  35809. var reIsOctal = /^0o[0-7]+$/i;
  35810. /** Built-in method references without a dependency on `root`. */
  35811. var freeParseInt = parseInt;
  35812. /** Used for built-in method references. */
  35813. var objectProto = Object.prototype;
  35814. /**
  35815. * Used to resolve the
  35816. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  35817. * of values.
  35818. */
  35819. var objectToString = objectProto.toString;
  35820. /**
  35821. * Checks if `value` is the
  35822. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  35823. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  35824. *
  35825. * @static
  35826. * @memberOf _
  35827. * @since 0.1.0
  35828. * @category Lang
  35829. * @param {*} value The value to check.
  35830. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  35831. * @example
  35832. *
  35833. * _.isObject({});
  35834. * // => true
  35835. *
  35836. * _.isObject([1, 2, 3]);
  35837. * // => true
  35838. *
  35839. * _.isObject(_.noop);
  35840. * // => true
  35841. *
  35842. * _.isObject(null);
  35843. * // => false
  35844. */
  35845. function isObject(value) {
  35846. var type = typeof value;
  35847. return !!value && (type == 'object' || type == 'function');
  35848. }
  35849. /**
  35850. * Checks if `value` is object-like. A value is object-like if it's not `null`
  35851. * and has a `typeof` result of "object".
  35852. *
  35853. * @static
  35854. * @memberOf _
  35855. * @since 4.0.0
  35856. * @category Lang
  35857. * @param {*} value The value to check.
  35858. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  35859. * @example
  35860. *
  35861. * _.isObjectLike({});
  35862. * // => true
  35863. *
  35864. * _.isObjectLike([1, 2, 3]);
  35865. * // => true
  35866. *
  35867. * _.isObjectLike(_.noop);
  35868. * // => false
  35869. *
  35870. * _.isObjectLike(null);
  35871. * // => false
  35872. */
  35873. function isObjectLike(value) {
  35874. return !!value && typeof value == 'object';
  35875. }
  35876. /**
  35877. * Checks if `value` is classified as a `Symbol` primitive or object.
  35878. *
  35879. * @static
  35880. * @memberOf _
  35881. * @since 4.0.0
  35882. * @category Lang
  35883. * @param {*} value The value to check.
  35884. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  35885. * @example
  35886. *
  35887. * _.isSymbol(Symbol.iterator);
  35888. * // => true
  35889. *
  35890. * _.isSymbol('abc');
  35891. * // => false
  35892. */
  35893. function isSymbol(value) {
  35894. return typeof value == 'symbol' ||
  35895. (isObjectLike(value) && objectToString.call(value) == symbolTag);
  35896. }
  35897. /**
  35898. * Converts `value` to a number.
  35899. *
  35900. * @static
  35901. * @memberOf _
  35902. * @since 4.0.0
  35903. * @category Lang
  35904. * @param {*} value The value to process.
  35905. * @returns {number} Returns the number.
  35906. * @example
  35907. *
  35908. * _.toNumber(3.2);
  35909. * // => 3.2
  35910. *
  35911. * _.toNumber(Number.MIN_VALUE);
  35912. * // => 5e-324
  35913. *
  35914. * _.toNumber(Infinity);
  35915. * // => Infinity
  35916. *
  35917. * _.toNumber('3.2');
  35918. * // => 3.2
  35919. */
  35920. function toNumber(value) {
  35921. if (typeof value == 'number') {
  35922. return value;
  35923. }
  35924. if (isSymbol(value)) {
  35925. return NAN;
  35926. }
  35927. if (isObject(value)) {
  35928. var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
  35929. value = isObject(other) ? (other + '') : other;
  35930. }
  35931. if (typeof value != 'string') {
  35932. return value === 0 ? value : +value;
  35933. }
  35934. value = value.replace(reTrim, '');
  35935. var isBinary = reIsBinary.test(value);
  35936. return (isBinary || reIsOctal.test(value))
  35937. ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
  35938. : (reIsBadHex.test(value) ? NAN : +value);
  35939. }
  35940. module.exports = toNumber;
  35941. /***/ }),
  35942. /***/ "cabd":
  35943. /***/ (function(module, exports, __webpack_require__) {
  35944. var isArray = __webpack_require__("df2e").isArray;
  35945. module.exports = {
  35946. copyOptions: function (options) {
  35947. var key, copy = {};
  35948. for (key in options) {
  35949. if (options.hasOwnProperty(key)) {
  35950. copy[key] = options[key];
  35951. }
  35952. }
  35953. return copy;
  35954. },
  35955. ensureFlagExists: function (item, options) {
  35956. if (!(item in options) || typeof options[item] !== 'boolean') {
  35957. options[item] = false;
  35958. }
  35959. },
  35960. ensureSpacesExists: function (options) {
  35961. if (!('spaces' in options) || (typeof options.spaces !== 'number' && typeof options.spaces !== 'string')) {
  35962. options.spaces = 0;
  35963. }
  35964. },
  35965. ensureAlwaysArrayExists: function (options) {
  35966. if (!('alwaysArray' in options) || (typeof options.alwaysArray !== 'boolean' && !isArray(options.alwaysArray))) {
  35967. options.alwaysArray = false;
  35968. }
  35969. },
  35970. ensureKeyExists: function (key, options) {
  35971. if (!(key + 'Key' in options) || typeof options[key + 'Key'] !== 'string') {
  35972. options[key + 'Key'] = options.compact ? '_' + key : key;
  35973. }
  35974. },
  35975. checkFnExists: function (key, options) {
  35976. return key + 'Fn' in options;
  35977. }
  35978. };
  35979. /***/ }),
  35980. /***/ "cadc":
  35981. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  35982. "use strict";
  35983. __webpack_require__.r(__webpack_exports__);
  35984. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Border_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("f5a9");
  35985. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Border_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Border_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
  35986. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Border_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Border_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  35987. /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Border_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
  35988. /***/ }),
  35989. /***/ "cce2":
  35990. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  35991. "use strict";
  35992. __webpack_require__.r(__webpack_exports__);
  35993. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SmTileLayer_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("5bb9");
  35994. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SmTileLayer_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SmTileLayer_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
  35995. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SmTileLayer_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SmTileLayer_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  35996. /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_SmTileLayer_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
  35997. /***/ }),
  35998. /***/ "cdb0":
  35999. /***/ (function(module, exports, __webpack_require__) {
  36000. "use strict";
  36001. var _interopRequireDefault = __webpack_require__("8e6d");
  36002. Object.defineProperty(exports, "__esModule", {
  36003. value: true
  36004. });
  36005. exports.default = void 0;
  36006. var _GridLayer = _interopRequireDefault(__webpack_require__("85c3"));
  36007. var _default = {
  36008. mixins: [_GridLayer.default],
  36009. props: {
  36010. tms: {
  36011. type: Boolean,
  36012. default: false
  36013. },
  36014. detectRetina: {
  36015. type: Boolean,
  36016. default: false
  36017. }
  36018. },
  36019. render: function render() {
  36020. return null;
  36021. }
  36022. };
  36023. exports.default = _default;
  36024. /***/ }),
  36025. /***/ "cf46":
  36026. /***/ (function(module, exports, __webpack_require__) {
  36027. "use strict";
  36028. Object.defineProperty(exports, "__esModule", { value: true });
  36029. var bbox_1 = __webpack_require__("1164");
  36030. var helpers_1 = __webpack_require__("38ce");
  36031. /**
  36032. * Takes a {@link Feature} or {@link FeatureCollection} and returns the absolute center point of all features.
  36033. *
  36034. * @name center
  36035. * @param {GeoJSON} geojson GeoJSON to be centered
  36036. * @param {Object} [options={}] Optional parameters
  36037. * @param {Object} [options.properties={}] Translate GeoJSON Properties to Point
  36038. * @param {Object} [options.bbox={}] Translate GeoJSON BBox to Point
  36039. * @param {Object} [options.id={}] Translate GeoJSON Id to Point
  36040. * @returns {Feature<Point>} a Point feature at the absolute center point of all input features
  36041. * @example
  36042. * var features = turf.points([
  36043. * [-97.522259, 35.4691],
  36044. * [-97.502754, 35.463455],
  36045. * [-97.508269, 35.463245]
  36046. * ]);
  36047. *
  36048. * var center = turf.center(features);
  36049. *
  36050. * //addToMap
  36051. * var addToMap = [features, center]
  36052. * center.properties['marker-size'] = 'large';
  36053. * center.properties['marker-color'] = '#000';
  36054. */
  36055. function center(geojson, options) {
  36056. if (options === void 0) { options = {}; }
  36057. var ext = bbox_1.default(geojson);
  36058. var x = (ext[0] + ext[2]) / 2;
  36059. var y = (ext[1] + ext[3]) / 2;
  36060. return helpers_1.point([x, y], options.properties, options);
  36061. }
  36062. exports.default = center;
  36063. /***/ }),
  36064. /***/ "d073":
  36065. /***/ (function(module, exports, __webpack_require__) {
  36066. var map = {
  36067. "./dark.scss": "743a",
  36068. "./light.scss": "f2e5"
  36069. };
  36070. function webpackContext(req) {
  36071. var id = webpackContextResolve(req);
  36072. return __webpack_require__(id);
  36073. }
  36074. function webpackContextResolve(req) {
  36075. if(!__webpack_require__.o(map, req)) {
  36076. var e = new Error("Cannot find module '" + req + "'");
  36077. e.code = 'MODULE_NOT_FOUND';
  36078. throw e;
  36079. }
  36080. return map[req];
  36081. }
  36082. webpackContext.keys = function webpackContextKeys() {
  36083. return Object.keys(map);
  36084. };
  36085. webpackContext.resolve = webpackContextResolve;
  36086. module.exports = webpackContext;
  36087. webpackContext.id = "d073";
  36088. /***/ }),
  36089. /***/ "d1f6":
  36090. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  36091. "use strict";
  36092. __webpack_require__.r(__webpack_exports__);
  36093. /* harmony import */ var _Identify_vue_vue_type_template_id_44a6aa12___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d865");
  36094. /* harmony import */ var _Identify_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("14c7");
  36095. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _Identify_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _Identify_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  36096. /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b429");
  36097. /* normalize component */
  36098. var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
  36099. _Identify_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
  36100. _Identify_vue_vue_type_template_id_44a6aa12___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
  36101. _Identify_vue_vue_type_template_id_44a6aa12___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
  36102. false,
  36103. null,
  36104. null,
  36105. null
  36106. )
  36107. /* harmony default export */ __webpack_exports__["default"] = (component.exports);
  36108. /***/ }),
  36109. /***/ "d201":
  36110. /***/ (function(module, exports, __webpack_require__) {
  36111. var root = __webpack_require__("18ca");
  36112. /**
  36113. * Gets the timestamp of the number of milliseconds that have elapsed since
  36114. * the Unix epoch (1 January 1970 00:00:00 UTC).
  36115. *
  36116. * @static
  36117. * @memberOf _
  36118. * @since 2.4.0
  36119. * @category Date
  36120. * @returns {number} Returns the timestamp.
  36121. * @example
  36122. *
  36123. * _.defer(function(stamp) {
  36124. * console.log(_.now() - stamp);
  36125. * }, _.now());
  36126. * // => Logs the number of milliseconds it took for the deferred invocation.
  36127. */
  36128. var now = function() {
  36129. return root.Date.now();
  36130. };
  36131. module.exports = now;
  36132. /***/ }),
  36133. /***/ "d372":
  36134. /***/ (function(module, exports) {
  36135. function _arrayWithoutHoles(arr) {
  36136. if (Array.isArray(arr)) {
  36137. for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
  36138. arr2[i] = arr[i];
  36139. }
  36140. return arr2;
  36141. }
  36142. }
  36143. module.exports = _arrayWithoutHoles;
  36144. /***/ }),
  36145. /***/ "d3a8":
  36146. /***/ (function(module, exports) {
  36147. /**
  36148. * Checks if `value` is the
  36149. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  36150. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  36151. *
  36152. * @static
  36153. * @memberOf _
  36154. * @since 0.1.0
  36155. * @category Lang
  36156. * @param {*} value The value to check.
  36157. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  36158. * @example
  36159. *
  36160. * _.isObject({});
  36161. * // => true
  36162. *
  36163. * _.isObject([1, 2, 3]);
  36164. * // => true
  36165. *
  36166. * _.isObject(_.noop);
  36167. * // => true
  36168. *
  36169. * _.isObject(null);
  36170. * // => false
  36171. */
  36172. function isObject(value) {
  36173. var type = typeof value;
  36174. return value != null && (type == 'object' || type == 'function');
  36175. }
  36176. module.exports = isObject;
  36177. /***/ }),
  36178. /***/ "d5f4":
  36179. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  36180. "use strict";
  36181. __webpack_require__.r(__webpack_exports__);
  36182. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TimeText_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("32bc");
  36183. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TimeText_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TimeText_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
  36184. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TimeText_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TimeText_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  36185. /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TimeText_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
  36186. /***/ }),
  36187. /***/ "d6a7":
  36188. /***/ (function(module, exports, __webpack_require__) {
  36189. !function(t,e){ true?module.exports=e(__webpack_require__("6b73"),__webpack_require__("9106")):undefined}(this,function(m,d){"use strict";var t;return m=m&&m.hasOwnProperty("default")?m.default:m,d=d&&d.hasOwnProperty("default")?d.default:d,function(t){var u;t.exports;(u=window).DOMParser=window.DOMParser;function p(){return document.createElement("canvas")}var f,c=function(t,e,i){if(null!=t||null!=e||null!=i){var n=function(s){var A={opts:s,FRAMERATE:30,MAX_VIRTUAL_PIXELS:3e4,rootEmSize:12,emSize:12,log:function(t){}};1==A.opts.log&&"undefined"!=typeof console&&(A.log=function(t){console.log(t)});A.init=function(t){var e=0;A.UniqueId=function(){return"canvg"+ ++e},A.Definitions={},A.Styles={},A.StylesSpecificity={},A.Animations=[],A.Images=[],A.ctx=t,A.ViewPort=new function(){this.viewPorts=[],this.Clear=function(){this.viewPorts=[]},this.SetCurrent=function(t,e){this.viewPorts.push({width:t,height:e})},this.RemoveCurrent=function(){this.viewPorts.pop()},this.Current=function(){return this.viewPorts[this.viewPorts.length-1]},this.width=function(){return this.Current().width},this.height=function(){return this.Current().height},this.ComputeSize=function(t){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)}}},A.init(),A.ImagesLoaded=function(){for(var t=0;t<A.Images.length;t++)if(!A.Images[t].loaded)return!1;return!0},A.trim=function(t){return t.replace(/^\s+|\s+$/g,"")},A.compressSpaces=function(t){return t.replace(/(?!\u3000)\s+/gm," ")},A.ajax=function(t){var e;return(e=u.XMLHttpRequest?new u.XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"))?(e.open("GET",t,!1),e.send(null),e.responseText):null},A.parseXml=function(e){if("undefined"!=typeof Windows&&void 0!==Windows.Data&&void 0!==Windows.Data.Xml){var t=new Windows.Data.Xml.Dom.XmlDocument,i=new Windows.Data.Xml.Dom.XmlLoadSettings;return i.prohibitDtd=!1,t.loadXml(e,i),t}if(!u.DOMParser){e=e.replace(/<!DOCTYPE svg[^>]*>/,"");var t=new ActiveXObject("Microsoft.XMLDOM");return t.async="false",t.loadXML(e),t}try{var n=s.xmldom?new u.DOMParser(s.xmldom):new u.DOMParser;return n.parseFromString(e,"image/svg+xml")}catch(t){return(n=s.xmldom?new u.DOMParser(s.xmldom):new u.DOMParser).parseFromString(e,"text/xml")}},A.Property=function(t,e){this.name=t,this.value=e},A.Property.prototype.getValue=function(){return this.value},A.Property.prototype.hasValue=function(){return null!=this.value&&""!==this.value},A.Property.prototype.numValue=function(){if(!this.hasValue())return 0;var t=parseFloat(this.value);return(this.value+"").match(/%$/)&&(t/=100),t},A.Property.prototype.valueOrDefault=function(t){return this.hasValue()?this.value:t},A.Property.prototype.numValueOrDefault=function(t){return this.hasValue()?this.numValue():t},A.Property.prototype.addOpacity=function(t){var e=this.value;if(null!=t.value&&""!=t.value&&"string"==typeof this.value){var i=new m(this.value);i.ok&&(e="rgba("+i.r+", "+i.g+", "+i.b+", "+t.numValue()+")")}return new A.Property(this.name,e)},A.Property.prototype.getDefinition=function(){var t=this.value.match(/#([^\)'"]+)/);return t&&(t=t[1]),t||(t=this.value),A.Definitions[t]},A.Property.prototype.isUrlDefinition=function(){return 0==this.value.indexOf("url(")},A.Property.prototype.getFillStyleDefinition=function(t,e){var i=this.getDefinition();if(null!=i&&i.createGradient)return i.createGradient(A.ctx,t,e);if(null!=i&&i.createPattern){if(i.getHrefAttribute().hasValue()){var n=i.attribute("patternTransform");i=i.getHrefAttribute().getDefinition(),n.hasValue()&&(i.attribute("patternTransform",!0).value=n.value)}return i.createPattern(A.ctx,t)}return null},A.Property.prototype.getDPI=function(t){return 96},A.Property.prototype.getREM=function(t){return A.rootEmSize},A.Property.prototype.getEM=function(t){return A.emSize},A.Property.prototype.getUnits=function(){var t=this.value+"";return t.replace(/[0-9\.\-]/g,"")},A.Property.prototype.isPixels=function(){if(!this.hasValue())return!1;var t=this.value+"";return!!t.match(/px$/)||!!t.match(/^[0-9]+$/)},A.Property.prototype.toPixels=function(t,e){if(!this.hasValue())return 0;var i=this.value+"";if(i.match(/rem$/))return this.numValue()*this.getREM(t);if(i.match(/em$/))return this.numValue()*this.getEM(t);if(i.match(/ex$/))return this.numValue()*this.getEM(t)/2;if(i.match(/px$/))return this.numValue();if(i.match(/pt$/))return this.numValue()*this.getDPI(t)*(1/72);if(i.match(/pc$/))return 15*this.numValue();if(i.match(/cm$/))return this.numValue()*this.getDPI(t)/2.54;if(i.match(/mm$/))return this.numValue()*this.getDPI(t)/25.4;if(i.match(/in$/))return this.numValue()*this.getDPI(t);if(i.match(/%$/))return this.numValue()*A.ViewPort.ComputeSize(t);var n=this.numValue();return e&&n<1?n*A.ViewPort.ComputeSize(t):n},A.Property.prototype.toMilliseconds=function(){if(!this.hasValue())return 0;var t=this.value+"";return t.match(/s$/)?1e3*this.numValue():(t.match(/ms$/),this.numValue())},A.Property.prototype.toRadians=function(){if(!this.hasValue())return 0;var t=this.value+"";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)};var t={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};return A.Property.prototype.toTextBaseline=function(){return this.hasValue()?t[this.value]:null},A.Font=new function(){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){var r=null!=a?this.Parse(a):this.CreateFont("","","","","",A.ctx.font);return{fontFamily:s=s||r.fontFamily,fontSize:n||r.fontSize,fontStyle:t||r.fontStyle,fontWeight:i||r.fontWeight,fontVariant:e||r.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var r=this;this.Parse=function(t){for(var e={},i=A.trim(A.compressSpaces(t||"")).split(" "),n={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1},s="",a=0;a<i.length;a++)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);return""!=s&&(e.fontFamily=s),e}},A.ToNumberArray=function(t){for(var e=A.trim(A.compressSpaces((t||"").replace(/,/g," "))).split(" "),i=0;i<e.length;i++)e[i]=parseFloat(e[i]);return e},A.Point=function(t,e){this.x=t,this.y=e},A.Point.prototype.angleTo=function(t){return Math.atan2(t.y-this.y,t.x-this.x)},A.Point.prototype.applyTransform=function(t){var e=this.x*t[0]+this.y*t[2]+t[4],i=this.x*t[1]+this.y*t[3]+t[5];this.x=e,this.y=i},A.CreatePoint=function(t){var e=A.ToNumberArray(t);return new A.Point(e[0],e[1])},A.CreatePath=function(t){for(var e=A.ToNumberArray(t),i=[],n=0;n<e.length;n+=2)i.push(new A.Point(e[n],e[n+1]));return i},A.BoundingBox=function(t,e,i,n){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN,this.x=function(){return this.x1},this.y=function(){return this.y1},this.width=function(){return this.x2-this.x1},this.height=function(){return this.y2-this.y1},this.addPoint=function(t,e){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))},this.addX=function(t){this.addPoint(t,null)},this.addY=function(t){this.addPoint(null,t)},this.addBoundingBox=function(t){this.addPoint(t.x1,t.y1),this.addPoint(t.x2,t.y2)},this.addQuadraticCurve=function(t,e,i,n,s,a){var r=t+2/3*(i-t),o=e+2/3*(n-e),l=r+1/3*(s-t),h=o+1/3*(a-e);this.addBezierCurve(t,e,r,l,o,h,s,a)},this.addBezierCurve=function(t,e,i,n,s,a,r,o){var l=[t,e],h=[i,n],u=[s,a],c=[r,o];this.addPoint(l[0],l[1]),this.addPoint(c[0],c[1]);for(var f=0;f<=1;f++){var m=function(t){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]},p=6*l[f]-12*h[f]+6*u[f],d=-3*l[f]+9*h[f]-9*u[f]+3*c[f],y=3*h[f]-3*l[f];if(0!=d){var v=Math.pow(p,2)-4*y*d;if(!(v<0)){var g=(-p+Math.sqrt(v))/(2*d);0<g&&g<1&&(0==f&&this.addX(m(g)),1==f&&this.addY(m(g)));var x=(-p-Math.sqrt(v))/(2*d);0<x&&x<1&&(0==f&&this.addX(m(x)),1==f&&this.addY(m(x)))}}else{if(0==p)continue;var b=-y/p;0<b&&b<1&&(0==f&&this.addX(m(b)),1==f&&this.addY(m(b)))}}},this.isPointInBox=function(t,e){return this.x1<=t&&t<=this.x2&&this.y1<=e&&e<=this.y2},this.addPoint(t,e),this.addPoint(i,n)},A.Transform=function(t){var e=this;this.Type={},this.Type.translate=function(t){this.p=A.CreatePoint(t),this.apply=function(t){t.translate(this.p.x||0,this.p.y||0)},this.unapply=function(t){t.translate(-1*this.p.x||0,-1*this.p.y||0)},this.applyToPoint=function(t){t.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0])}},this.Type.rotate=function(t){var e=A.ToNumberArray(t);this.angle=new A.Property("angle",e[0]),this.cx=e[1]||0,this.cy=e[2]||0,this.apply=function(t){t.translate(this.cx,this.cy),t.rotate(this.angle.toRadians()),t.translate(-this.cx,-this.cy)},this.unapply=function(t){t.translate(this.cx,this.cy),t.rotate(-1*this.angle.toRadians()),t.translate(-this.cx,-this.cy)},this.applyToPoint=function(t){var e=this.angle.toRadians();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])}},this.Type.scale=function(t){this.p=A.CreatePoint(t),this.apply=function(t){t.scale(this.p.x||1,this.p.y||this.p.x||1)},this.unapply=function(t){t.scale(1/this.p.x||1,1/this.p.y||this.p.x||1)},this.applyToPoint=function(t){t.applyTransform([this.p.x||0,0,0,this.p.y||0,0,0])}},this.Type.matrix=function(t){this.m=A.ToNumberArray(t),this.apply=function(t){t.transform(this.m[0],this.m[1],this.m[2],this.m[3],this.m[4],this.m[5])},this.unapply=function(t){var e=this.m[0],i=this.m[2],n=this.m[4],s=this.m[1],a=this.m[3],r=this.m[5],o=1/(e*(1*a-0*r)-i*(1*s-0*r)+n*(0*s-0*a));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))},this.applyToPoint=function(t){t.applyTransform(this.m)}},this.Type.SkewBase=function(t){this.base=e.Type.matrix,this.base(t),this.angle=new A.Property("angle",t)},this.Type.SkewBase.prototype=new this.Type.matrix,this.Type.skewX=function(t){this.base=e.Type.SkewBase,this.base(t),this.m=[1,0,Math.tan(this.angle.toRadians()),1,0,0]},this.Type.skewX.prototype=new this.Type.SkewBase,this.Type.skewY=function(t){this.base=e.Type.SkewBase,this.base(t),this.m=[1,Math.tan(this.angle.toRadians()),0,1,0,0]},this.Type.skewY.prototype=new this.Type.SkewBase,this.transforms=[],this.apply=function(t){for(var e=0;e<this.transforms.length;e++)this.transforms[e].apply(t)},this.unapply=function(t){for(var e=this.transforms.length-1;0<=e;e--)this.transforms[e].unapply(t)},this.applyToPoint=function(t){for(var e=0;e<this.transforms.length;e++)this.transforms[e].applyToPoint(t)};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++)if("none"!==i[n]){var s=A.trim(i[n].split("(")[0]),a=i[n].split("(")[1].replace(")",""),r=this.Type[s];if(void 0!==r){var o=new r(a);o.type=s,this.transforms.push(o)}}},A.AspectRatio=function(t,e,i,n,s,a,r,o,l,h){var u=(e=(e=A.compressSpaces(e)).replace(/^defer\s/,"")).split(" ")[0]||"xMidYMid",c=e.split(" ")[1]||"meet",f=i/n,m=s/a,p=Math.min(f,m),d=Math.max(f,m);"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)},A.Element={},A.EmptyProperty=new A.Property("EMPTY",""),A.Element.ElementBase=function(a){this.attributes={},this.styles={},this.stylesSpecificity={},this.children=[],this.attribute=function(t,e){var i=this.attributes[t];return null!=i?i:(1==e&&(i=new A.Property(t,""),this.attributes[t]=i),i||A.EmptyProperty)},this.getHrefAttribute=function(){for(var t in this.attributes)if("href"==t||t.match(/:href$/))return this.attributes[t];return A.EmptyProperty},this.style=function(t,e,i){var n=this.styles[t];if(null!=n)return n;var s=this.attribute(t);if(null!=s&&s.hasValue())return this.styles[t]=s;if(1!=i){var a=this.parent;if(null!=a){var r=a.style(t);if(null!=r&&r.hasValue())return r}}return 1==e&&(n=new A.Property(t,""),this.styles[t]=n),n||A.EmptyProperty},this.render=function(t){if("none"!=this.style("display").value&&"hidden"!=this.style("visibility").value){if(t.save(),this.style("mask").hasValue()){var e=this.style("mask").getDefinition();null!=e&&e.apply(t,this)}else if(this.style("filter").hasValue()){var i=this.style("filter").getDefinition();null!=i&&i.apply(t,this)}else this.setContext(t),this.renderChildren(t),this.clearContext(t);t.restore()}},this.setContext=function(t){},this.clearContext=function(t){},this.renderChildren=function(t){for(var e=0;e<this.children.length;e++)this.children[e].render(t)},this.addChild=function(t,e){var i=t;e&&(i=A.CreateElement(t)),i.parent=this,"title"!=i.type&&this.children.push(i)},this.addStylesFromStyleDefinition=function(){for(var t in A.Styles)if("@"!=t[0]&&f(a,t)){var e=A.Styles[t],i=A.StylesSpecificity[t];if(null!=e)for(var n in e){var s=this.stylesSpecificity[n];void 0===s&&(s="000"),s<i&&(this.styles[n]=e[n],this.stylesSpecificity[n]=i)}}};var t,e=new RegExp("^[A-Z-]+$");if(null!=a&&1==a.nodeType){for(var i=0;i<a.attributes.length;i++){var n=a.attributes[i],s=(t=n.nodeName,e.test(t)?t.toLowerCase():t);this.attributes[s]=new A.Property(s,n.value)}if(this.addStylesFromStyleDefinition(),this.attribute("style").hasValue()){var r=this.attribute("style").value.split(";");for(i=0;i<r.length;i++)if(""!=A.trim(r[i])){var o=r[i].split(":"),l=A.trim(o[0]),h=A.trim(o[1]);this.styles[l]=new A.Property(l,h)}}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++){var u=a.childNodes[i];if(1==u.nodeType&&this.addChild(u,!0),this.captureTextNodes&&(3==u.nodeType||4==u.nodeType)){var c=u.value||u.text||u.textContent||"";""!=A.compressSpaces(c)&&this.addChild(new A.Element.tspan(u),!1)}}}},A.Element.RenderedElementBase=function(t){this.base=A.Element.ElementBase,this.base(t),this.calculateOpacity=function(){for(var t=1,e=this;null!=e;){var i=e.style("opacity",!1,!0);i.hasValue()&&(t*=i.numValue()),e=e.parent}return t},this.setContext=function(t,e){if(!e){var i;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()){var n;"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)}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()){var s;"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)}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()){var a=this.style("stroke-width").toPixels();t.lineWidth=0==a?.001:a}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){var r=A.ToNumberArray(this.style("stroke-dasharray").value);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);var o=this.style("stroke-dashoffset").toPixels();void 0!==t.lineDashOffset?t.lineDashOffset=o:void 0!==t.webkitLineDashOffset?t.webkitLineDashOffset=o:void 0!==t.mozDashOffset&&(t.mozDashOffset=o)}}if(void 0!==t.font){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();var l=this.style("font-size",!1,!1);l.isPixels()&&(A.emSize=l.toPixels())}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()){var h=this.style("clip-path",!1,!0).getDefinition();null!=h&&h.apply(t)}t.globalAlpha=this.calculateOpacity()}},A.Element.RenderedElementBase.prototype=new A.Element.ElementBase,A.Element.PathElementBase=function(t){this.base=A.Element.RenderedElementBase,this.base(t),this.path=function(t){return null!=t&&t.beginPath(),new A.BoundingBox},this.renderChildren=function(t){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();var e=this.getMarkers();if(null!=e){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++)i.render(t,e[n][0],e[n][1]);this.style("marker-end").isUrlDefinition()&&(i=this.style("marker-end").getDefinition()).render(t,e[e.length-1][0],e[e.length-1][1])}},this.getBoundingBox=function(){return this.path()},this.getMarkers=function(){return null}},A.Element.PathElementBase.prototype=new A.Element.RenderedElementBase,A.Element.svg=function(t){this.base=A.Element.RenderedElementBase,this.base(t),this.baseClearContext=this.clearContext,this.clearContext=function(t){this.baseClearContext(t),A.ViewPort.RemoveCurrent()},this.baseSetContext=this.setContext,this.setContext=function(t){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){t.font=u.getComputedStyle(t.canvas).getPropertyValue("font");var e=new A.Property("fontSize",A.Font.Parse(t.font).fontSize);e.hasValue()&&(A.rootEmSize=A.emSize=e.toPixels("y"))}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"));var i=A.ViewPort.width(),n=A.ViewPort.height();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){i=this.attribute("width").toPixels("x"),n=this.attribute("height").toPixels("y");var s=0,a=0;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())}if(A.ViewPort.SetCurrent(i,n),this.attribute("viewBox").hasValue()){var r=A.ToNumberArray(this.attribute("viewBox").value),o=r[0],l=r[1];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])}}},A.Element.svg.prototype=new A.Element.RenderedElementBase,A.Element.rect=function(t){this.base=A.Element.PathElementBase,this.base(t),this.path=function(t){var e=this.attribute("x").toPixels("x"),i=this.attribute("y").toPixels("y"),n=this.attribute("width").toPixels("x"),s=this.attribute("height").toPixels("y"),a=this.attribute("rx").toPixels("x"),r=this.attribute("ry").toPixels("y");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){var o=(Math.sqrt(2)-1)/3*4;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()}return new A.BoundingBox(e,i,e+n,i+s)}},A.Element.rect.prototype=new A.Element.PathElementBase,A.Element.circle=function(t){this.base=A.Element.PathElementBase,this.base(t),this.path=function(t){var e=this.attribute("cx").toPixels("x"),i=this.attribute("cy").toPixels("y"),n=this.attribute("r").toPixels();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)}},A.Element.circle.prototype=new A.Element.PathElementBase,A.Element.ellipse=function(t){this.base=A.Element.PathElementBase,this.base(t),this.path=function(t){var e=(Math.sqrt(2)-1)/3*4,i=this.attribute("rx").toPixels("x"),n=this.attribute("ry").toPixels("y"),s=this.attribute("cx").toPixels("x"),a=this.attribute("cy").toPixels("y");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)}},A.Element.ellipse.prototype=new A.Element.PathElementBase,A.Element.line=function(t){this.base=A.Element.PathElementBase,this.base(t),this.getPoints=function(){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"))]},this.path=function(t){var e=this.getPoints();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)},this.getMarkers=function(){var t=this.getPoints(),e=t[0].angleTo(t[1]);return[[t[0],e],[t[1],e]]}},A.Element.line.prototype=new A.Element.PathElementBase,A.Element.polyline=function(t){this.base=A.Element.PathElementBase,this.base(t),this.points=A.CreatePath(this.attribute("points").value),this.path=function(t){var e=new A.BoundingBox(this.points[0].x,this.points[0].y);null!=t&&(t.beginPath(),t.moveTo(this.points[0].x,this.points[0].y));for(var i=1;i<this.points.length;i++)e.addPoint(this.points[i].x,this.points[i].y),null!=t&&t.lineTo(this.points[i].x,this.points[i].y);return e},this.getMarkers=function(){for(var t=[],e=0;e<this.points.length-1;e++)t.push([this.points[e],this.points[e].angleTo(this.points[e+1])]);return 0<t.length&&t.push([this.points[this.points.length-1],t[t.length-1][1]]),t}},A.Element.polyline.prototype=new A.Element.PathElementBase,A.Element.polygon=function(t){this.base=A.Element.polyline,this.base(t),this.basePath=this.path,this.path=function(t){var e=this.basePath(t);return null!=t&&(t.lineTo(this.points[0].x,this.points[0].y),t.closePath()),e}},A.Element.polygon.prototype=new A.Element.polyline,A.Element.path=function(t){this.base=A.Element.PathElementBase,this.base(t);var e=this.attribute("d").value;e=e.replace(/,/gm," ");for(var i=0;i<2;i++)e=e.replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm,"$1 $2");for(e=(e=e.replace(/([^\s])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2")).replace(/([0-9])([+\-])/gm,"$1 $2"),i=0;i<2;i++)e=e.replace(/(\.[0-9]*)(\.)/gm,"$1 $2");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){this.tokens=t.split(" "),this.reset=function(){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=[]},this.isEnd=function(){return this.i>=this.tokens.length-1},this.isCommandOrEnd=function(){return!!this.isEnd()||null!=this.tokens[this.i+1].match(/^[A-Za-z]$/)},this.isRelativeCommand=function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return!0}return!1},this.getToken=function(){return this.i++,this.tokens[this.i]},this.getScalar=function(){return parseFloat(this.getToken())},this.nextCommand=function(){this.previousCommand=this.command,this.command=this.getToken()},this.getPoint=function(){var t=new A.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(t)},this.getAsControlPoint=function(){var t=this.getPoint();return this.control=t},this.getAsCurrentPoint=function(){var t=this.getPoint();return this.current=t},this.getReflectedControlPoint=function(){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)},this.makeAbsolute=function(t){return this.isRelativeCommand()&&(t.x+=this.current.x,t.y+=this.current.y),t},this.addMarker=function(t,e,i){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))},this.addMarkerAngle=function(t,e){this.points.push(t),this.angles.push(e)},this.getMarkerPoints=function(){return this.points},this.getMarkerAngles=function(){for(var t=0;t<this.angles.length;t++)if(null==this.angles[t])for(var e=t+1;e<this.angles.length;e++)if(null!=this.angles[e]){this.angles[t]=this.angles[e];break}return this.angles}}(e),this.path=function(t){var e=this.PathParser;e.reset();var i=new A.BoundingBox;for(null!=t&&t.beginPath();!e.isEnd();)switch(e.nextCommand(),e.command){case"M":case"m":var n=e.getAsCurrentPoint();for(e.addMarker(n),i.addPoint(n.x,n.y),null!=t&&t.moveTo(n.x,n.y),e.start=e.current;!e.isCommandOrEnd();)n=e.getAsCurrentPoint(),e.addMarker(n,e.start),i.addPoint(n.x,n.y),null!=t&&t.lineTo(n.x,n.y);break;case"L":case"l":for(;!e.isCommandOrEnd();){var s=e.current;n=e.getAsCurrentPoint(),e.addMarker(n,s),i.addPoint(n.x,n.y),null!=t&&t.lineTo(n.x,n.y)}break;case"H":case"h":for(;!e.isCommandOrEnd();){var a=new A.Point((e.isRelativeCommand()?e.current.x:0)+e.getScalar(),e.current.y);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)}break;case"V":case"v":for(;!e.isCommandOrEnd();)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);break;case"C":case"c":for(;!e.isCommandOrEnd();){var r=e.current,o=e.getPoint(),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)}break;case"S":case"s":for(;!e.isCommandOrEnd();)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);break;case"Q":case"q":for(;!e.isCommandOrEnd();)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);break;case"T":case"t":for(;!e.isCommandOrEnd();)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);break;case"A":case"a":for(;!e.isCommandOrEnd();){r=e.current;var u=e.getScalar(),c=e.getScalar(),f=e.getScalar()*(Math.PI/180),m=e.getScalar(),p=e.getScalar(),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)),y=Math.pow(d.x,2)/Math.pow(u,2)+Math.pow(d.y,2)/Math.pow(c,2);1<y&&(u*=Math.sqrt(y),c*=Math.sqrt(y));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)));isNaN(v)&&(v=0);var g=new A.Point(v*u*d.y/c,v*-c*d.x/u),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),b=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))},P=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(b(t)*b(e))},E=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(P(t,e))},w=E([1,0],[(d.x-g.x)/u,(d.y-g.y)/c]),B=[(d.x-g.x)/u,(d.y-g.y)/c],C=[(-d.x-g.x)/u,(-d.y-g.y)/c],T=E(B,C);P(B,C)<=-1&&(T=Math.PI),1<=P(B,C)&&(T=0);var V=1-p?1:-1,M=w+V*(T/2),S=new A.Point(x.x+u*Math.cos(M),x.y+c*Math.sin(M));if(e.addMarkerAngle(S,M-V*Math.PI/2),e.addMarkerAngle(h,M-V*Math.PI),i.addPoint(h.x,h.y),null!=t){P=c<u?u:c;var k=c<u?1:u/c,D=c<u?c/u:1;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)}}break;case"Z":case"z":null!=t&&i.x1!==i.x2&&i.y1!==i.y2&&t.closePath(),e.current=e.start}return i},this.getMarkers=function(){for(var t=this.PathParser.getMarkerPoints(),e=this.PathParser.getMarkerAngles(),i=[],n=0;n<t.length;n++)i.push([t[n],e[n]]);return i}},A.Element.path.prototype=new A.Element.PathElementBase,A.Element.pattern=function(t){this.base=A.Element.ElementBase,this.base(t),this.createPattern=function(t,e){var i=this.attribute("width").toPixels("x",!0),n=this.attribute("height").toPixels("y",!0),s=new A.Element.svg;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;var a=p();a.width=i,a.height=n;var r=a.getContext("2d");this.attribute("x").hasValue()&&this.attribute("y").hasValue()&&r.translate(this.attribute("x").toPixels("x",!0),this.attribute("y").toPixels("y",!0));for(var o=-1;o<=1;o++)for(var l=-1;l<=1;l++)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();return t.createPattern(a,"repeat")}},A.Element.pattern.prototype=new A.Element.ElementBase,A.Element.marker=function(t){this.base=A.Element.ElementBase,this.base(t),this.baseRender=this.render,this.render=function(t,e,i){if(e){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();var n=new A.Element.svg;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)}}},A.Element.marker.prototype=new A.Element.ElementBase,A.Element.defs=function(t){this.base=A.Element.ElementBase,this.base(t),this.render=function(t){}},A.Element.defs.prototype=new A.Element.ElementBase,A.Element.GradientBase=function(t){this.base=A.Element.ElementBase,this.base(t),this.stops=[];for(var e=0;e<this.children.length;e++){var i=this.children[e];"stop"==i.type&&this.stops.push(i)}this.getGradient=function(){},this.gradientUnits=function(){return this.attribute("gradientUnits").valueOrDefault("objectBoundingBox")},this.attributesToInherit=["gradientUnits"],this.inheritStopContainer=function(t){for(var e=0;e<this.attributesToInherit.length;e++){var i=this.attributesToInherit[e];!this.attribute(i).hasValue()&&t.attribute(i).hasValue()&&(this.attribute(i,!0).value=t.attribute(i).value)}},this.createGradient=function(t,e,i){var n=this;this.getHrefAttribute().hasValue()&&(n=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(n));var s=function(t){return i.hasValue()?new A.Property("color",t).addOpacity(i).value:t},a=this.getGradient(t,e);if(null==a)return s(n.stops[n.stops.length-1].color);for(var r=0;r<n.stops.length;r++)a.addColorStop(n.stops[r].offset,s(n.stops[r].color));if(this.attribute("gradientTransform").hasValue()){var o=A.ViewPort.viewPorts[0],l=new A.Element.rect;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);var h=new A.Element.g;h.attributes.transform=new A.Property("transform",this.attribute("gradientTransform").value),h.children=[l];var u=new A.Element.svg;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];var c=p();c.width=o.width,c.height=o.height;var f=c.getContext("2d");return f.fillStyle=a,u.render(f),f.createPattern(c,"no-repeat")}return a}},A.Element.GradientBase.prototype=new A.Element.ElementBase,A.Element.linearGradient=function(t){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){var i="objectBoundingBox"==this.gradientUnits()?e.getBoundingBox(t):null;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);var n="objectBoundingBox"==this.gradientUnits()?i.x()+i.width()*this.attribute("x1").numValue():this.attribute("x1").toPixels("x"),s="objectBoundingBox"==this.gradientUnits()?i.y()+i.height()*this.attribute("y1").numValue():this.attribute("y1").toPixels("y"),a="objectBoundingBox"==this.gradientUnits()?i.x()+i.width()*this.attribute("x2").numValue():this.attribute("x2").toPixels("x"),r="objectBoundingBox"==this.gradientUnits()?i.y()+i.height()*this.attribute("y2").numValue():this.attribute("y2").toPixels("y");return n==a&&s==r?null:t.createLinearGradient(n,s,a,r)}},A.Element.linearGradient.prototype=new A.Element.GradientBase,A.Element.radialGradient=function(t){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){var i=e.getBoundingBox(t);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%");var n="objectBoundingBox"==this.gradientUnits()?i.x()+i.width()*this.attribute("cx").numValue():this.attribute("cx").toPixels("x"),s="objectBoundingBox"==this.gradientUnits()?i.y()+i.height()*this.attribute("cy").numValue():this.attribute("cy").toPixels("y"),a=n,r=s;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"));var o="objectBoundingBox"==this.gradientUnits()?(i.width()+i.height())/2*this.attribute("r").numValue():this.attribute("r").toPixels();return t.createRadialGradient(a,r,0,n,s,o)}},A.Element.radialGradient.prototype=new A.Element.GradientBase,A.Element.stop=function(t){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);var e=this.style("stop-color",!0);""===e.value&&(e.value="#000"),this.style("stop-opacity").hasValue()&&(e=e.addOpacity(this.style("stop-opacity"))),this.color=e.value},A.Element.stop.prototype=new A.Element.ElementBase,A.Element.AnimateBase=function(t){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(){var t=this.attribute("attributeType").value,e=this.attribute("attributeName").value;return"CSS"==t?this.parent.style(e,!0):this.parent.attribute(e,!0)},this.initialValue=null,this.initialUnits="",this.removed=!1,this.calcValue=function(){return""},this.update=function(t){if(null==this.initialValue&&(this.initialValue=this.getProperty().value,this.initialUnits=this.getProperty().getUnits()),this.duration>this.maxDuration){if("indefinite"==this.attribute("repeatCount").value||"indefinite"==this.attribute("repeatDur").value)this.duration=0;else if("freeze"!=this.attribute("fill").valueOrDefault("remove")||this.frozen){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}else this.frozen=!0,this.parent.animationFrozen=!0,this.parent.animationFrozenValue=this.getProperty().value;return!1}this.duration=this.duration+t;var e=!1;if(this.begin<this.duration){var i=this.calcValue();this.attribute("type").hasValue()&&(i=this.attribute("type").value+"("+i+")"),this.getProperty().value=i,e=!0}return e},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(){var t={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(this.values.hasValue()){var e=t.progress*(this.values.value.length-1),i=Math.floor(e),n=Math.ceil(e);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)}else t.from=this.from,t.to=this.to;return t}},A.Element.AnimateBase.prototype=new A.Element.ElementBase,A.Element.animate=function(t){this.base=A.Element.AnimateBase,this.base(t),this.calcValue=function(){var t=this.progress();return t.from.numValue()+(t.to.numValue()-t.from.numValue())*t.progress+this.initialUnits}},A.Element.animate.prototype=new A.Element.AnimateBase,A.Element.animateColor=function(t){this.base=A.Element.AnimateBase,this.base(t),this.calcValue=function(){var t=this.progress(),e=new m(t.from.value),i=new m(t.to.value);if(e.ok&&i.ok){var n=e.r+(i.r-e.r)*t.progress,s=e.g+(i.g-e.g)*t.progress,a=e.b+(i.b-e.b)*t.progress;return"rgb("+parseInt(n,10)+","+parseInt(s,10)+","+parseInt(a,10)+")"}return this.attribute("from").value}},A.Element.animateColor.prototype=new A.Element.AnimateBase,A.Element.animateTransform=function(t){this.base=A.Element.AnimateBase,this.base(t),this.calcValue=function(){for(var t=this.progress(),e=A.ToNumberArray(t.from.value),i=A.ToNumberArray(t.to.value),n="",s=0;s<e.length;s++)n+=e[s]+(i[s]-e[s])*t.progress+" ";return n}},A.Element.animateTransform.prototype=new A.Element.animate,A.Element.font=function(t){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=[];for(var e=0;e<this.children.length;e++){var i=this.children[e];"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)}},A.Element.font.prototype=new A.Element.ElementBase,A.Element.fontface=function(t){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()},A.Element.fontface.prototype=new A.Element.ElementBase,A.Element.missingglyph=function(t){this.base=A.Element.path,this.base(t),this.horizAdvX=0},A.Element.missingglyph.prototype=new A.Element.path,A.Element.glyph=function(t){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},A.Element.glyph.prototype=new A.Element.path,A.Element.text=function(t){this.captureTextNodes=!0,this.base=A.Element.RenderedElementBase,this.base(t),this.baseSetContext=this.setContext,this.setContext=function(t){this.baseSetContext(t);var e=this.style("dominant-baseline").toTextBaseline();null==e&&(e=this.style("alignment-baseline").toTextBaseline()),null!=e&&(t.textBaseline=e)},this.initializeCoordinates=function(t){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)},this.getBoundingBox=function(t){this.initializeCoordinates(t);for(var e=null,i=0;i<this.children.length;i++){var n=this.getChildBoundingBox(t,this,this,i);null==e?e=n:e.addBoundingBox(n)}return e},this.renderChildren=function(t){this.initializeCoordinates(t);for(var e=0;e<this.children.length;e++)this.renderChild(t,this,this,e)},this.getAnchorDelta=function(t,e,i){var n=this.style("text-anchor").valueOrDefault("start");if("start"!=n){for(var s=0,a=i;a<e.children.length;a++){var r=e.children[a];if(i<a&&r.attribute("x").hasValue())break;s+=r.measureTextRecursive(t)}return-1*("end"==n?s:s/2)}return 0},this.adjustChildCoordinates=function(t,e,i,n){var s=i.children[n];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},this.getChildBoundingBox=function(t,e,i,n){var s=this.adjustChildCoordinates(t,e,i,n),a=s.getBoundingBox(t);for(n=0;n<s.children.length;n++){var r=e.getChildBoundingBox(t,e,s,n);a.addBoundingBox(r)}return a},this.renderChild=function(t,e,i,n){var s=this.adjustChildCoordinates(t,e,i,n);for(s.render(t),n=0;n<s.children.length;n++)e.renderChild(t,e,s,n)}},A.Element.text.prototype=new A.Element.RenderedElementBase,A.Element.TextElementBase=function(t){this.base=A.Element.RenderedElementBase,this.base(t),this.getGlyph=function(t,e,i){var n=e[i],s=null;if(t.isArabic){var a="isolated";(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])}else s=t.glyphs[n];return null==s&&(s=t.missingGlyph),s},this.renderChildren=function(t){var e=this.parent.style("font-family").getDefinition();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{var i=this.parent.style("font-size").numValueOrDefault(A.Font.Parse(A.ctx.font).fontSize),n=this.parent.style("font-style").valueOrDefault(A.Font.Parse(A.ctx.font).fontStyle),s=this.getText();e.isRTL&&(s=s.split("").reverse().join(""));for(var a=A.ToNumberArray(this.parent.attribute("dx").value),r=0;r<s.length;r++){var o=this.getGlyph(e,s,r),l=i/e.fontFace.unitsPerEm;t.translate(this.x,this.y),t.scale(l,-l);var h=t.lineWidth;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])}}},this.getText=function(){},this.measureTextRecursive=function(t){for(var e=this.measureText(t),i=0;i<this.children.length;i++)e+=this.children[i].measureTextRecursive(t);return e},this.measureText=function(t){var e=this.parent.style("font-family").getDefinition();if(null!=e){var i=this.parent.style("font-size").numValueOrDefault(A.Font.Parse(A.ctx.font).fontSize),n=0,s=this.getText();e.isRTL&&(s=s.split("").reverse().join(""));for(var a=A.ToNumberArray(this.parent.attribute("dx").value),r=0;r<s.length;r++)n+=(this.getGlyph(e,s,r).horizAdvX||e.horizAdvX)*i/e.fontFace.unitsPerEm,void 0===a[r]||isNaN(a[r])||(n+=a[r]);return n}var o=A.compressSpaces(this.getText());if(!t.measureText)return 10*o.length;t.save(),this.setContext(t,!0);var l=t.measureText(o).width;return t.restore(),l},this.getBoundingBox=function(t){var e=this.parent.style("font-size").numValueOrDefault(A.Font.Parse(A.ctx.font).fontSize);return new A.BoundingBox(this.x,this.y-e,this.x+this.measureText(t),this.y)}},A.Element.TextElementBase.prototype=new A.Element.RenderedElementBase,A.Element.tspan=function(t){this.captureTextNodes=!0,this.base=A.Element.TextElementBase,this.base(t),this.text=A.compressSpaces(t.value||t.text||t.textContent||""),this.getText=function(){return 0<this.children.length?"":this.text}},A.Element.tspan.prototype=new A.Element.TextElementBase,A.Element.tref=function(t){this.base=A.Element.TextElementBase,this.base(t),this.getText=function(){var t=this.getHrefAttribute().getDefinition();if(null!=t)return t.children[0].getText()}},A.Element.tref.prototype=new A.Element.TextElementBase,A.Element.a=function(t){this.base=A.Element.TextElementBase,this.base(t),this.hasText=0<t.childNodes.length;for(var e=0;e<t.childNodes.length;e++)3!=t.childNodes[e].nodeType&&(this.hasText=!1);this.text=this.hasText?t.childNodes[0].value||t.childNodes[0].data:"",this.getText=function(){return this.text},this.baseRenderChildren=this.renderChildren,this.renderChildren=function(t){if(this.hasText){this.baseRenderChildren(t);var e=new A.Property("fontSize",A.Font.Parse(A.ctx.font).fontSize);A.Mouse.checkBoundingBox(this,new A.BoundingBox(this.x,this.y-e.toPixels("y"),this.x+this.measureText(t),this.y))}else if(0<this.children.length){var i=new A.Element.g;i.children=this.children,i.parent=this,i.render(t)}},this.onclick=function(){u.open(this.getHrefAttribute().value)},this.onmousemove=function(){A.ctx.canvas.style.cursor="pointer"}},A.Element.a.prototype=new A.Element.TextElementBase,A.Element.image=function(t){this.base=A.Element.RenderedElementBase,this.base(t);var e=this.getHrefAttribute().value;if(""!=e){var a=e.match(/\.svg$/);if(A.Images.push(this),this.loaded=!1,a)this.img=A.ajax(e),this.loaded=!0;else{this.img=document.createElement("img"),1==A.opts.useCORS&&(this.img.crossOrigin="Anonymous");var r=this;this.img.onload=function(){r.loaded=!0},this.img.onerror=function(){A.log('ERROR: image "'+e+'" not found'),r.loaded=!0},this.img.src=e}this.renderChildren=function(t){var e=this.attribute("x").toPixels("x"),i=this.attribute("y").toPixels("y"),n=this.attribute("width").toPixels("x"),s=this.attribute("height").toPixels("y");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())},this.getBoundingBox=function(){var t=this.attribute("x").toPixels("x"),e=this.attribute("y").toPixels("y"),i=this.attribute("width").toPixels("x"),n=this.attribute("height").toPixels("y");return new A.BoundingBox(t,e,t+i,e+n)}}},A.Element.image.prototype=new A.Element.RenderedElementBase,A.Element.g=function(t){this.base=A.Element.RenderedElementBase,this.base(t),this.getBoundingBox=function(t){for(var e=new A.BoundingBox,i=0;i<this.children.length;i++)e.addBoundingBox(this.children[i].getBoundingBox(t));return e}},A.Element.g.prototype=new A.Element.RenderedElementBase,A.Element.symbol=function(t){this.base=A.Element.RenderedElementBase,this.base(t),this.render=function(t){}},A.Element.symbol.prototype=new A.Element.RenderedElementBase,A.Element.style=function(t){this.base=A.Element.ElementBase,this.base(t);for(var e="",i=0;i<t.childNodes.length;i++)e+=t.childNodes[i].data;e=e.replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"");var n=(e=A.compressSpaces(e)).split("}");for(i=0;i<n.length;i++)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++){var l=A.trim(a[o]);if(""!=l){for(var h=A.Styles[l]||{},u=0;u<r.length;u++){var c=r[u].indexOf(":"),f=r[u].substr(0,c),m=r[u].substr(c+1,r[u].length-c);null!=f&&null!=m&&(h[A.trim(f)]=new A.Property(A.trim(f),A.trim(m)))}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++)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++){var E=A.CreateElement(b[P]);A.Definitions[p]=E}}}},A.Element.style.prototype=new A.Element.ElementBase,A.Element.use=function(t){this.base=A.Element.RenderedElementBase,this.base(t),this.baseSetContext=this.setContext,this.setContext=function(t){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"))};var n=this.getHrefAttribute().getDefinition();this.path=function(t){null!=n&&n.path(t)},this.elementTransform=function(){if(null!=n&&n.style("transform",!1,!0).hasValue())return new A.Transform(n.style("transform",!1,!0).value)},this.getBoundingBox=function(t){if(null!=n)return n.getBoundingBox(t)},this.renderChildren=function(t){if(null!=n){var e=n;"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)));var i=e.parent;e.parent=null,e.render(t),e.parent=i}}},A.Element.use.prototype=new A.Element.RenderedElementBase,A.Element.mask=function(t){this.base=A.Element.ElementBase,this.base(t),this.apply=function(t,e){var i=this.attribute("x").toPixels("x"),n=this.attribute("y").toPixels("y"),s=this.attribute("width").toPixels("x"),a=this.attribute("height").toPixels("y");if(0==s&&0==a){for(var r=new A.BoundingBox,o=0;o<this.children.length;o++)r.addBoundingBox(this.children[o].getBoundingBox(t));i=Math.floor(r.x1),n=Math.floor(r.y1),s=Math.floor(r.width()),a=Math.floor(r.height())}var l=e.attribute("mask").value;e.attribute("mask").value="";var h=p();h.width=i+s,h.height=n+a;var u=h.getContext("2d");this.renderChildren(u);var c=p();c.width=i+s,c.height=n+a;var f=c.getContext("2d");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},this.render=function(t){}},A.Element.mask.prototype=new A.Element.ElementBase,A.Element.clipPath=function(t){this.base=A.Element.ElementBase,this.base(t),this.apply=function(t){var e="undefined"!=typeof CanvasRenderingContext2D,i=t.beginPath,n=t.closePath;e&&(CanvasRenderingContext2D.prototype.beginPath=function(){},CanvasRenderingContext2D.prototype.closePath=function(){}),i.call(t);for(var s=0;s<this.children.length;s++){var a=this.children[s];if(void 0!==a.path){var r=void 0!==a.elementTransform&&a.elementTransform();!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)}}n.call(t),t.clip(),e&&(CanvasRenderingContext2D.prototype.beginPath=i,CanvasRenderingContext2D.prototype.closePath=n)},this.render=function(t){}},A.Element.clipPath.prototype=new A.Element.ElementBase,A.Element.filter=function(t){this.base=A.Element.ElementBase,this.base(t),this.apply=function(t,e){var i=e.getBoundingBox(t),n=Math.floor(i.x1),s=Math.floor(i.y1),a=Math.floor(i.width()),r=Math.floor(i.height()),o=e.style("filter").value;e.style("filter").value="";for(var l=0,h=0,u=0;u<this.children.length;u++){var c=this.children[u].extraFilterDistance||0;l=Math.max(l,c),h=Math.max(h,c)}var f=p();f.width=a+2*l,f.height=r+2*h;var m=f.getContext("2d");for(m.translate(-n+l,-s+h),e.render(m),u=0;u<this.children.length;u++)"function"==typeof this.children[u].apply&&this.children[u].apply(m,0,0,a+2*l,r+2*h);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},this.render=function(t){}},A.Element.filter.prototype=new A.Element.ElementBase,A.Element.feMorphology=function(t){this.base=A.Element.ElementBase,this.base(t),this.apply=function(t,e,i,n,s){}},A.Element.feMorphology.prototype=new A.Element.ElementBase,A.Element.feComposite=function(t){this.base=A.Element.ElementBase,this.base(t),this.apply=function(t,e,i,n,s){}},A.Element.feComposite.prototype=new A.Element.ElementBase,A.Element.feColorMatrix=function(t){this.base=A.Element.ElementBase,this.base(t);var n=A.ToNumberArray(this.attribute("values").value);switch(this.attribute("type").valueOrDefault("matrix")){case"saturate":var e=n[0];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];break;case"hueRotate":var s=n[0]*Math.PI/180,i=function(t,e,i){return t+Math.cos(s)*e+Math.sin(s)*i};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];break;case"luminanceToAlpha":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]}function u(t,e,i,n,s,a){return t[i*n*4+4*e+a]}function c(t,e,i,n,s,a,r){t[i*n*4+4*e+a]=r}function f(t,e){var i=n[t];return i*(i<0?e-255:e)}this.apply=function(t,e,i,n,s){var a=t.getImageData(0,0,n,s);for(i=0;i<s;i++)for(e=0;e<n;e++){var r=u(a.data,e,i,n,0,0),o=u(a.data,e,i,n,0,1),l=u(a.data,e,i,n,0,2),h=u(a.data,e,i,n,0,3);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))}t.clearRect(0,0,n,s),t.putImageData(a,0,0)}},A.Element.feColorMatrix.prototype=new A.Element.ElementBase,A.Element.feGaussianBlur=function(t){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){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")}},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){A.log("ERROR: Element '"+t.nodeName+"' not yet implemented.")},A.Element.MISSING.prototype=new A.Element.ElementBase,A.CreateElement=function(t){var e=t.nodeName.replace(/^[^:]+:/,"");e=e.replace(/\-/g,"");var i=null;return(i=void 0!==A.Element[e]?new A.Element[e](t):new A.Element.MISSING(t)).type=t.nodeName,i},A.load=function(t,e){A.loadXml(t,A.ajax(e))},A.loadXml=function(t,e){A.loadXmlDoc(t,A.parseXml(e))},A.loadXmlDoc=function(a,r){A.init(a);var i=function(t){for(var e=a.canvas;e;)t.x-=e.offsetLeft,t.y-=e.offsetTop,e=e.offsetParent;return u.scrollX&&(t.x+=u.scrollX),u.scrollY&&(t.y+=u.scrollY),t};1!=A.opts.ignoreMouse&&(a.canvas.onclick=function(t){var e=i(new A.Point(null!=t?t.clientX:event.clientX,null!=t?t.clientY:event.clientY));A.Mouse.onclick(e.x,e.y)},a.canvas.onmousemove=function(t){var e=i(new A.Point(null!=t?t.clientX:event.clientX,null!=t?t.clientY:event.clientY));A.Mouse.onmousemove(e.x,e.y)});var o=A.CreateElement(r.documentElement);o.root=!0,o.addStylesFromStyleDefinition();var l=!0,n=function(){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")));var t=a.canvas.clientWidth||a.canvas.width,e=a.canvas.clientHeight||a.canvas.height;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){var i=null,n=null,s=A.ToNumberArray(o.attribute("viewBox").value);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+")"}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))},s=!0;A.ImagesLoaded()&&(s=!1,n()),A.intervalID=setInterval(function(){var t=!1;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++)t|=A.Animations[e].update(1e3/A.FRAMERATE);"function"==typeof A.opts.forceRedraw&&1==A.opts.forceRedraw()&&(t=!0),t&&(n(),A.Mouse.runEvents())},1e3/A.FRAMERATE)},A.stop=function(){A.intervalID&&clearInterval(A.intervalID)},A.Mouse=new function(){this.events=[],this.hasEvents=function(){return 0!=this.events.length},this.onclick=function(t,e){this.events.push({type:"onclick",x:t,y:e,run:function(t){t.onclick&&t.onclick()}})},this.onmousemove=function(t,e){this.events.push({type:"onmousemove",x:t,y:e,run:function(t){t.onmousemove&&t.onmousemove()}})},this.eventElements=[],this.checkPath=function(t,e){for(var i=0;i<this.events.length;i++){var n=this.events[i];e.isPointInPath&&e.isPointInPath(n.x,n.y)&&(this.eventElements[i]=t)}},this.checkBoundingBox=function(t,e){for(var i=0;i<this.events.length;i++){var n=this.events[i];e.isPointInBox(n.x,n.y)&&(this.eventElements[i]=t)}},this.runEvents=function(){A.ctx.canvas.style.cursor="";for(var t=0;t<this.events.length;t++)for(var e=this.events[t],i=this.eventElements[t];i;)e.run(i),i=i.parent;this.events=[],this.eventElements=[]}},A}(i||{});"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);var s=t.getContext("2d");void 0!==e.documentElement?n.loadXmlDoc(s,e):"<"==e.substr(0,1)?n.loadXml(s,e):n.load(s,e)}else for(var a=document.querySelectorAll("svg"),r=0;r<a.length;r++){var o=a[r],l=document.createElement("canvas");l.width=o.clientWidth,l.height=o.clientHeight,o.parentNode.insertBefore(l,o),o.parentNode.removeChild(o);var h=document.createElement("div");h.appendChild(o),c(l,h.innerHTML)}};"undefined"==typeof Element||(void 0!==Element.prototype.matches?f=function(t,e){return t.matches(e)}:void 0!==Element.prototype.webkitMatchesSelector?f=function(t,e){return t.webkitMatchesSelector(e)}:void 0!==Element.prototype.mozMatchesSelector?f=function(t,e){return t.mozMatchesSelector(e)}:void 0!==Element.prototype.msMatchesSelector?f=function(t,e){return t.msMatchesSelector(e)}:void 0!==Element.prototype.oMatchesSelector?f=function(t,e){return t.oMatchesSelector(e)}:("function"!=typeof jQuery&&"function"!=typeof Zepto||(f=function(t,e){return $(t).is(e)}),void 0===f&&"undefined"!=typeof Sizzle&&(f=Sizzle.matchesSelector)));var e=/(\[[^\]]+\])/g,i=/(#[^\s\+>~\.\[:]+)/g,a=/(\.[^\s\+>~\.\[:]+)/g,r=/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,o=/(:[\w-]+\([^\)]*\))/gi,l=/(:[^\s\+>~\.\[:]+)/g,h=/([^\s\+>~\.\[:]+)/g;function w(n){var s=[0,0,0],t=function(t,e){var i=n.match(t);null!=i&&(s[e]+=i.length,n=n.replace(t," "))};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("")}"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.drawSvg=function(t,e,i,n,s,a){var r={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:e,offsetY:i,scaleWidth:n,scaleHeight:s};for(var o in a)a.hasOwnProperty(o)&&(r[o]=a[o]);c(this.canvas,t,r)}),t.exports=c}(t={exports:{}},t.exports),t.exports});
  36190. /***/ }),
  36191. /***/ "d6e6":
  36192. /***/ (function(module, exports, __webpack_require__) {
  36193. "use strict";
  36194. var _interopRequireDefault = __webpack_require__("8e6d");
  36195. Object.defineProperty(exports, "__esModule", {
  36196. value: true
  36197. });
  36198. exports.default = void 0;
  36199. var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
  36200. var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
  36201. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
  36202. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
  36203. var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
  36204. var _Events2 = __webpack_require__("e3e2");
  36205. var _MunicipalCenter = _interopRequireDefault(__webpack_require__("b7bd"));
  36206. var _ProvinceCenter = _interopRequireDefault(__webpack_require__("2c06"));
  36207. __webpack_require__("3ef3");
  36208. __webpack_require__("c978");
  36209. var _lodash = _interopRequireDefault(__webpack_require__("30f7"));
  36210. var _canvg = _interopRequireDefault(__webpack_require__("d6a7"));
  36211. var _WebMapService = _interopRequireDefault(__webpack_require__("f875"));
  36212. var _util = __webpack_require__("1448");
  36213. var MAX_MIGRATION_ANIMATION_COUNT = 1000;
  36214. var WebMapBase =
  36215. /*#__PURE__*/
  36216. function (_Events) {
  36217. (0, _inherits2.default)(WebMapBase, _Events);
  36218. function WebMapBase(id, options, mapOptions) {
  36219. var _this;
  36220. (0, _classCallCheck2.default)(this, WebMapBase);
  36221. _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(WebMapBase).call(this));
  36222. _this.echartslayer = [];
  36223. _this._layers = [];
  36224. _this.serverUrl = options.serverUrl || 'https://www.supermapol.com';
  36225. _this.accessToken = options.accessToken;
  36226. _this.accessKey = options.accessKey;
  36227. _this.tiandituKey = options.tiandituKey || '';
  36228. _this.withCredentials = options.withCredentials || false;
  36229. _this.proxy = options.proxy;
  36230. _this.target = options.target || 'map';
  36231. _this.excludePortalProxyUrl = options.excludePortalProxyUrl;
  36232. _this.isSuperMapOnline = options.isSuperMapOnline;
  36233. _this.ignoreBaseProjection = options.ignoreBaseProjection;
  36234. _this.echartslayer = [];
  36235. _this.webMapService = new _WebMapService.default(id, options);
  36236. _this.mapOptions = mapOptions;
  36237. _this.eventTypes = ['getmapinfofailed', 'crsnotsupport', 'getlayerdatasourcefailed', 'addlayerssucceeded', 'notsupportmvt', 'notsupportbaidumap', 'projectionIsNotMatch', 'beforeremovemap'];
  36238. _this.mapId = id;
  36239. return _this;
  36240. }
  36241. (0, _createClass2.default)(WebMapBase, [{
  36242. key: "echartsLayerResize",
  36243. value: function echartsLayerResize() {
  36244. this.echartslayer.forEach(function (echartslayer) {
  36245. echartslayer.chart.resize();
  36246. });
  36247. }
  36248. }, {
  36249. key: "setMapId",
  36250. value: function setMapId(mapId) {
  36251. var _this2 = this;
  36252. this.mapId = mapId;
  36253. this.webMapService.setMapId(mapId);
  36254. setTimeout(function () {
  36255. _this2._initWebMap();
  36256. }, 0);
  36257. }
  36258. }, {
  36259. key: "setServerUrl",
  36260. value: function setServerUrl(serverUrl) {
  36261. this.serverUrl = serverUrl;
  36262. this.webMapService.setServerUrl(serverUrl);
  36263. }
  36264. }, {
  36265. key: "setWithCredentials",
  36266. value: function setWithCredentials(withCredentials) {
  36267. this.withCredentials = withCredentials;
  36268. this.webMapService.setWithCredentials(withCredentials);
  36269. }
  36270. }, {
  36271. key: "setProxy",
  36272. value: function setProxy(proxy) {
  36273. this.proxy = proxy;
  36274. this.webMapService.setProxy(proxy);
  36275. }
  36276. }, {
  36277. key: "setZoom",
  36278. value: function setZoom(zoom) {
  36279. if (this.map) {
  36280. this.mapOptions.zoom = zoom;
  36281. (zoom || zoom === 0) && this.map.setZoom(zoom, {
  36282. from: 'setZoom'
  36283. });
  36284. }
  36285. }
  36286. }, {
  36287. key: "setMaxBounds",
  36288. value: function setMaxBounds(maxBounds) {
  36289. if (this.map) {
  36290. this.mapOptions.maxBounds = maxBounds;
  36291. maxBounds && this.map.setMaxBounds(maxBounds);
  36292. }
  36293. }
  36294. }, {
  36295. key: "setMinZoom",
  36296. value: function setMinZoom(minZoom) {
  36297. if (this.map) {
  36298. this.mapOptions.minZoom = minZoom;
  36299. (minZoom || minZoom === 0) && this.map.setMinZoom(minZoom);
  36300. }
  36301. }
  36302. }, {
  36303. key: "setMaxZoom",
  36304. value: function setMaxZoom(maxZoom) {
  36305. if (this.map) {
  36306. this.mapOptions.maxZoom = maxZoom;
  36307. (maxZoom || maxZoom === 0) && this.map.setMinZoom(maxZoom);
  36308. }
  36309. }
  36310. }, {
  36311. key: "initWebMap",
  36312. value: function initWebMap() {
  36313. this.cleanWebMap();
  36314. if (this.webMapInfo) {
  36315. var mapInfo = this.webMapInfo;
  36316. mapInfo.mapParams = {
  36317. title: this.webMapInfo.title,
  36318. description: this.webMapInfo.description
  36319. };
  36320. this.mapParams = mapInfo.mapParams;
  36321. this._getMapInfo(mapInfo, null);
  36322. return;
  36323. } else if (!this.mapId || !this.serverUrl) {
  36324. this._createMap();
  36325. return;
  36326. }
  36327. this._taskID = new Date();
  36328. this.getMapInfo(this._taskID);
  36329. }
  36330. }, {
  36331. key: "getMapInfo",
  36332. value: function getMapInfo(_taskID) {
  36333. var _this3 = this;
  36334. this.serverUrl = this.webMapService.handleServerUrl(this.serverUrl);
  36335. this.webMapService.getMapInfo().then(function (mapInfo) {
  36336. if (_this3._taskID !== _taskID) {
  36337. return;
  36338. }
  36339. _this3.mapParams = mapInfo.mapParams;
  36340. _this3._getMapInfo(mapInfo, _taskID);
  36341. }, function (error) {
  36342. throw error;
  36343. }).catch(function (error) {
  36344. _this3.triggerEvent('getmapinfofailed', {
  36345. error: error
  36346. });
  36347. console.log(error);
  36348. });
  36349. }
  36350. }, {
  36351. key: "getBaseLayerType",
  36352. value: function getBaseLayerType(layerInfo) {
  36353. var layerType = layerInfo.layerType;
  36354. if (layerType.indexOf('TIANDITU_VEC') > -1 || layerType.indexOf('TIANDITU_IMG') > -1 || layerType.indexOf('TIANDITU_TER') > -1) {
  36355. layerType = 'TIANDITU';
  36356. }
  36357. switch (layerType) {
  36358. case 'TILE':
  36359. case 'SUPERMAP_REST':
  36360. return 'TILE';
  36361. case 'CLOUD':
  36362. case 'CLOUD_BLACK':
  36363. return 'CLOUD';
  36364. case 'OSM':
  36365. case 'JAPAN_ORT':
  36366. case 'JAPAN_RELIEF':
  36367. case 'JAPAN_PALE':
  36368. case 'JAPAN_STD':
  36369. case 'GOOGLE_CN':
  36370. case 'GOOGLE':
  36371. return 'XYZ';
  36372. default:
  36373. return layerType;
  36374. }
  36375. }
  36376. }, {
  36377. key: "getMapurls",
  36378. value: function getMapurls() {
  36379. var mapurl = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  36380. var mapUrls = {
  36381. CLOUD: mapurl.CLOUD || 'http://t2.dituhui.com/FileService/image?map=quanguo&type=web&x={x}&y={y}&z={z}',
  36382. CLOUD_BLACK: mapurl.CLOUD_BLACK || 'http://t3.dituhui.com/MapService/getGdp?x={x}&y={y}&z={z}',
  36383. OSM: mapurl.OSM || 'https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png',
  36384. GOOGLE: 'https://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',
  36385. GOOGLE_CN: 'https://mt{0-3}.google.cn/vt/lyrs=m&hl=zh-CN&gl=cn&x={x}&y={y}&z={z}',
  36386. JAPAN_STD: 'https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png',
  36387. JAPAN_PALE: 'https://cyberjapandata.gsi.go.jp/xyz/pale/{z}/{x}/{y}.png',
  36388. JAPAN_RELIEF: 'https://cyberjapandata.gsi.go.jp/xyz/relief/{z}/{x}/{y}.png',
  36389. JAPAN_ORT: 'https://cyberjapandata.gsi.go.jp/xyz/ort/{z}/{x}/{y}.jpg'
  36390. };
  36391. return mapUrls;
  36392. }
  36393. }, {
  36394. key: "getLayerFeatures",
  36395. value: function getLayerFeatures(layer, _taskID, type) {
  36396. var _this4 = this;
  36397. var getLayerFunc = this.webMapService.getLayerFeatures(type, layer, this.baseProjection);
  36398. getLayerFunc && getLayerFunc.then(function (result) {
  36399. if (_this4.mapId && _this4._taskID !== _taskID) {
  36400. return;
  36401. }
  36402. _this4._getLayerFeaturesSucceeded(result, layer);
  36403. }, function (error) {
  36404. throw new Error(error);
  36405. }).catch(function (error) {
  36406. _this4._addLayerSucceeded();
  36407. _this4.triggerEvent('getlayerdatasourcefailed', {
  36408. error: error,
  36409. layer: layer,
  36410. map: _this4.map
  36411. });
  36412. console.log(error);
  36413. });
  36414. }
  36415. }, {
  36416. key: "setFeatureInfo",
  36417. value: function setFeatureInfo(feature) {
  36418. var featureInfo;
  36419. var info = feature.dv_v5_markerInfo;
  36420. if (info && info.dataViz_title) {
  36421. featureInfo = info;
  36422. } else {
  36423. return info;
  36424. }
  36425. var properties = feature.properties;
  36426. for (var key in featureInfo) {
  36427. if (properties[key]) {
  36428. featureInfo[key] = properties[key];
  36429. delete properties[key];
  36430. }
  36431. }
  36432. return featureInfo;
  36433. }
  36434. }, {
  36435. key: "getRankStyleGroup",
  36436. value: function getRankStyleGroup(themeField, features, parameters) {
  36437. var values = [],
  36438. segements = [],
  36439. style = parameters.style,
  36440. themeSetting = parameters.themeSetting,
  36441. segmentMethod = themeSetting.segmentMethod,
  36442. segmentCount = themeSetting.segmentCount,
  36443. customSettings = themeSetting.customSettings,
  36444. minR = parameters.themeSetting.minRadius,
  36445. maxR = parameters.themeSetting.maxRadius,
  36446. colors = themeSetting.colors,
  36447. fillColor = style.fillColor;
  36448. features.forEach(function (feature) {
  36449. var properties = feature.properties,
  36450. value = properties[themeField];
  36451. if (value == null || !(0, _lodash.default)(+value)) {
  36452. return;
  36453. }
  36454. values.push(Number(value));
  36455. });
  36456. try {
  36457. segements = SuperMap.ArrayStatistic.getArraySegments(values, segmentMethod, segmentCount);
  36458. } catch (error) {
  36459. console.log(error);
  36460. }
  36461. for (var i = 0; i < segmentCount; i++) {
  36462. if (i in customSettings) {
  36463. var startValue = customSettings[i]['segment']['start'],
  36464. endValue = customSettings[i]['segment']['end'];
  36465. startValue != null && (segements[i] = startValue);
  36466. endValue != null && (segements[i + 1] = endValue);
  36467. }
  36468. }
  36469. var styleGroup = [];
  36470. if (segements && segements.length) {
  36471. var len = segements.length,
  36472. incrementR = (maxR - minR) / (len - 1),
  36473. start,
  36474. end,
  36475. radius = Number(((maxR + minR) / 2).toFixed(2)),
  36476. color = '';
  36477. var rangeColors = colors ? SuperMap.ColorsPickerUtil.getGradientColors(colors, len, 'RANGE') : [];
  36478. for (var _i = 0; _i < len - 1; _i++) {
  36479. start = Number(segements[_i].toFixed(2));
  36480. end = Number(segements[_i + 1].toFixed(2));
  36481. radius = start === end ? radius : minR + Math.round(incrementR * _i);
  36482. end = _i === len - 2 ? end + 0.01 : end;
  36483. radius = customSettings[_i] && customSettings[_i].radius ? customSettings[_i].radius : radius;
  36484. style.radius = radius;
  36485. if (colors && colors.length > 0) {
  36486. color = customSettings[_i] && customSettings[_i].color ? customSettings[_i].color : rangeColors[_i] || fillColor;
  36487. style.fillColor = color;
  36488. }
  36489. styleGroup.push({
  36490. radius: radius,
  36491. color: color,
  36492. start: start,
  36493. end: end,
  36494. style: style
  36495. });
  36496. }
  36497. return styleGroup;
  36498. } else {
  36499. return false;
  36500. }
  36501. }
  36502. }, {
  36503. key: "createRankStyleSource",
  36504. value: function createRankStyleSource(parameters, features) {
  36505. var themeSetting = parameters.themeSetting,
  36506. themeField = themeSetting.themeField;
  36507. var styleGroups = this.getRankStyleGroup(themeField, features, parameters);
  36508. return styleGroups ? {
  36509. parameters: parameters,
  36510. styleGroups: styleGroups
  36511. } : false;
  36512. }
  36513. }, {
  36514. key: "isMatchAdministrativeName",
  36515. value: function isMatchAdministrativeName(featureName, fieldName) {
  36516. var isString = typeof fieldName === 'string' && fieldName.constructor === String;
  36517. if (isString) {
  36518. var shortName = featureName.substr(0, 2);
  36519. if (shortName === '张家') {
  36520. shortName = featureName.substr(0, 3);
  36521. }
  36522. return !!fieldName.match(new RegExp(shortName));
  36523. }
  36524. return false;
  36525. }
  36526. }, {
  36527. key: "getRestMapLayerInfo",
  36528. value: function getRestMapLayerInfo(restMapInfo, layer) {
  36529. var bounds = restMapInfo.bounds,
  36530. coordUnit = restMapInfo.coordUnit,
  36531. visibleScales = restMapInfo.visibleScales,
  36532. url = restMapInfo.url;
  36533. layer.layerType = 'TILE';
  36534. layer.orginEpsgCode = this.baseProjection;
  36535. layer.units = coordUnit && coordUnit.toLowerCase();
  36536. layer.extent = [bounds.left, bounds.bottom, bounds.right, bounds.top];
  36537. layer.visibleScales = visibleScales;
  36538. layer.url = url;
  36539. layer.sourceType = 'TILE';
  36540. return layer;
  36541. }
  36542. }, {
  36543. key: "handleLayerFeatures",
  36544. value: function handleLayerFeatures(features, layerInfo) {
  36545. var layerType = layerInfo.layerType,
  36546. style = layerInfo.style,
  36547. themeSetting = layerInfo.themeSetting,
  36548. filterCondition = layerInfo.filterCondition;
  36549. if ((style || themeSetting) && filterCondition) {
  36550. if (layerType !== 'RANGE' && layerType !== 'UNIQUE' && layerType !== 'RANK_SYMBOL') {
  36551. features = this.getFilterFeatures(filterCondition, features);
  36552. }
  36553. }
  36554. return features;
  36555. }
  36556. }, {
  36557. key: "mergeFeatures",
  36558. value: function mergeFeatures(layerId, features, mergeByField) {
  36559. features = features.map(function (feature, index) {
  36560. if (!feature.properties.hasOwnProperty('index')) {
  36561. feature.properties.index = index;
  36562. }
  36563. return feature;
  36564. });
  36565. if (!mergeByField) {
  36566. return features;
  36567. }
  36568. var source = this.map.getSource(layerId);
  36569. if (!source || !source._data.features) {
  36570. return features;
  36571. }
  36572. var prevFeatures = source._data.features;
  36573. var nextFeatures = [];
  36574. features.forEach(function (feature) {
  36575. var prevFeature = prevFeatures.find(function (item) {
  36576. if (isNaN(+item.properties[mergeByField]) && isNaN(+feature.properties[mergeByField])) {
  36577. return JSON.stringify(item.properties[mergeByField] || '') === JSON.stringify(feature.properties[mergeByField] || '');
  36578. } else {
  36579. return +item.properties[mergeByField] === +feature.properties[mergeByField];
  36580. }
  36581. });
  36582. if (prevFeature) {
  36583. nextFeatures.push(Object.assign(Object.assign({}, prevFeature), feature));
  36584. } else if (feature.geometry) {
  36585. nextFeatures.push(feature);
  36586. }
  36587. });
  36588. return nextFeatures;
  36589. }
  36590. }, {
  36591. key: "getFilterFeatures",
  36592. value: function getFilterFeatures(filterCondition, allFeatures) {
  36593. if (!filterCondition) {
  36594. return allFeatures;
  36595. }
  36596. var condition = this.replaceFilterCharacter(filterCondition);
  36597. var sql = 'select * from json where (' + condition + ')';
  36598. var filterFeatures = [];
  36599. for (var i = 0; i < allFeatures.length; i++) {
  36600. var feature = allFeatures[i];
  36601. var filterResult = void 0;
  36602. try {
  36603. filterResult = window['jsonsql'].query(sql, {
  36604. properties: feature.properties
  36605. });
  36606. } catch (err) {
  36607. continue;
  36608. }
  36609. if (filterResult && filterResult.length > 0) {
  36610. filterFeatures.push(feature);
  36611. }
  36612. }
  36613. return filterFeatures;
  36614. }
  36615. }, {
  36616. key: "replaceFilterCharacter",
  36617. value: function replaceFilterCharacter(filterString) {
  36618. filterString = filterString.replace(/=/g, '==').replace(/AND|and/g, '&&').replace(/or|OR/g, '||').replace(/<==/g, '<=').replace(/>==/g, '>=');
  36619. return filterString;
  36620. }
  36621. }, {
  36622. key: "getEchartsLayerOptions",
  36623. value: function getEchartsLayerOptions(layerInfo, features, coordinateSystem) {
  36624. var properties = this.webMapService.getFeatureProperties(features);
  36625. var lineData = this._createLinesData(layerInfo, properties);
  36626. var pointData = this._createPointsData(lineData, layerInfo, properties);
  36627. var options = this._createOptions(layerInfo, lineData, pointData, coordinateSystem);
  36628. return options;
  36629. }
  36630. }, {
  36631. key: "getDashStyle",
  36632. value: function getDashStyle(str) {
  36633. var strokeWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
  36634. var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'array';
  36635. if (!str) {
  36636. return type === 'array' ? [] : '';
  36637. }
  36638. var w = strokeWidth;
  36639. var dashArr;
  36640. switch (str) {
  36641. case 'solid':
  36642. dashArr = [];
  36643. break;
  36644. case 'dot':
  36645. dashArr = [1, 4 * w];
  36646. break;
  36647. case 'dash':
  36648. dashArr = [4 * w, 4 * w];
  36649. break;
  36650. case 'dashrailway':
  36651. dashArr = [8 * w, 12 * w];
  36652. break;
  36653. case 'dashdot':
  36654. dashArr = [4 * w, 4 * w, 1 * w, 4 * w];
  36655. break;
  36656. case 'longdash':
  36657. dashArr = [8 * w, 4 * w];
  36658. break;
  36659. case 'longdashdot':
  36660. dashArr = [8 * w, 4 * w, 1, 4 * w];
  36661. break;
  36662. default:
  36663. if (SuperMap.Util.isArray(str)) {
  36664. dashArr = str;
  36665. }
  36666. str = SuperMap.String.trim(str).replace(/\s+/g, ',');
  36667. dashArr = str.replace(/\[|\]/gi, '').split(',');
  36668. break;
  36669. }
  36670. dashArr = type === 'array' ? dashArr : dashArr.join(',');
  36671. return dashArr;
  36672. }
  36673. }, {
  36674. key: "getCanvasFromSVG",
  36675. value: function getCanvasFromSVG(svgUrl, divDom, callBack) {
  36676. var canvas = document.createElement('canvas');
  36677. canvas.id = "dataviz-canvas-".concat(new Date().getTime());
  36678. canvas.style.display = 'none';
  36679. divDom.appendChild(canvas);
  36680. var canvgs = window.canvg ? window.canvg : _canvg.default;
  36681. canvgs(canvas.id, svgUrl, {
  36682. ignoreMouse: true,
  36683. ignoreAnimation: true,
  36684. renderCallback: function renderCallback() {
  36685. if (canvas.width > 300 || canvas.height > 300) {
  36686. return;
  36687. }
  36688. callBack(canvas);
  36689. },
  36690. forceRedraw: function forceRedraw() {
  36691. return false;
  36692. }
  36693. });
  36694. }
  36695. }, {
  36696. key: "getRangeStyleGroup",
  36697. value: function getRangeStyleGroup(layerInfo, features) {
  36698. var featureType = layerInfo.featureType,
  36699. style = layerInfo.style,
  36700. themeSetting = layerInfo.themeSetting;
  36701. var customSettings = themeSetting.customSettings,
  36702. themeField = themeSetting.themeField,
  36703. segmentCount = themeSetting.segmentCount,
  36704. segmentMethod = themeSetting.segmentMethod,
  36705. colors = themeSetting.colors;
  36706. var values = [];
  36707. var attributes;
  36708. features.forEach(function (feature) {
  36709. attributes = feature.properties;
  36710. if (attributes) {
  36711. var val = attributes[themeField];
  36712. (val || val === 0) && (0, _lodash.default)(+val) && values.push(parseFloat(val));
  36713. }
  36714. }, this);
  36715. var segements = SuperMap.ArrayStatistic.getArraySegments(values, segmentMethod, segmentCount);
  36716. if (segements) {
  36717. var itemNum = segmentCount;
  36718. if (attributes && segements[0] === segements[attributes.length - 1]) {
  36719. itemNum = 1;
  36720. segements.length = 2;
  36721. }
  36722. for (var i = 0; i < segements.length; i++) {
  36723. var value = segements[i];
  36724. value = i === 0 ? Math.floor(value * 100) / 100 : Math.ceil(value * 100) / 100 + 0.1;
  36725. segements[i] = Number(value.toFixed(2));
  36726. }
  36727. var curentColors = colors;
  36728. curentColors = SuperMap.ColorsPickerUtil.getGradientColors(curentColors, itemNum, 'RANGE');
  36729. for (var index = 0; index < itemNum; index++) {
  36730. if (index in customSettings) {
  36731. if (customSettings[index]['segment']['start']) {
  36732. segements[index] = customSettings[index]['segment']['start'];
  36733. }
  36734. if (customSettings[index]['segment']['end']) {
  36735. segements[index + 1] = customSettings[index]['segment']['end'];
  36736. }
  36737. }
  36738. }
  36739. var styleGroups = [];
  36740. for (var _i2 = 0; _i2 < itemNum; _i2++) {
  36741. var color = curentColors[_i2];
  36742. if (_i2 in customSettings) {
  36743. if (customSettings[_i2].color) {
  36744. color = customSettings[_i2].color;
  36745. }
  36746. }
  36747. if (featureType === 'LINE') {
  36748. style.strokeColor = color;
  36749. } else {
  36750. style.fillColor = color;
  36751. }
  36752. var start = segements[_i2];
  36753. var end = segements[_i2 + 1];
  36754. var styleObj = JSON.parse(JSON.stringify(style));
  36755. styleGroups.push({
  36756. style: styleObj,
  36757. color: color,
  36758. start: start,
  36759. end: end
  36760. });
  36761. }
  36762. return styleGroups;
  36763. }
  36764. }
  36765. }, {
  36766. key: "getUniqueStyleGroup",
  36767. value: function getUniqueStyleGroup(parameters, features) {
  36768. var featureType = parameters.featureType,
  36769. style = parameters.style,
  36770. themeSetting = parameters.themeSetting;
  36771. var themeField = themeSetting.themeField,
  36772. colors = themeSetting.colors,
  36773. customSettings = themeSetting.customSettings;
  36774. Object.keys(features[0].properties).forEach(function (key) {
  36775. key.toLocaleUpperCase() === themeField.toLocaleUpperCase() && (themeField = key);
  36776. });
  36777. var names = [];
  36778. for (var i in features) {
  36779. var properties = features[i].properties;
  36780. var name = properties[themeField];
  36781. var isSaved = false;
  36782. for (var j in names) {
  36783. if (names[j] === name) {
  36784. isSaved = true;
  36785. break;
  36786. }
  36787. }
  36788. if (!isSaved) {
  36789. names.push(name || '0');
  36790. }
  36791. }
  36792. var curentColors = colors;
  36793. curentColors = SuperMap.ColorsPickerUtil.getGradientColors(curentColors, names.length);
  36794. var styleGroup = [];
  36795. names.forEach(function (name, index) {
  36796. var color = curentColors[index];
  36797. if (name in customSettings) {
  36798. color = customSettings[name];
  36799. }
  36800. if (featureType === 'LINE') {
  36801. style.strokeColor = color;
  36802. } else {
  36803. style.fillColor = color;
  36804. }
  36805. styleGroup.push({
  36806. color: color,
  36807. style: Object.assign({}, style),
  36808. value: name
  36809. });
  36810. }, this);
  36811. return styleGroup;
  36812. }
  36813. }, {
  36814. key: "transformFeatures",
  36815. value: function transformFeatures(features) {
  36816. var _this5 = this;
  36817. features && features.forEach(function (feature, index) {
  36818. var geometryType = feature.geometry.type;
  36819. var coordinates = feature.geometry.coordinates;
  36820. if (coordinates.length === 0) {
  36821. return;
  36822. }
  36823. if (geometryType === 'LineString') {
  36824. coordinates.forEach(function (coordinate, index) {
  36825. coordinate = _this5._unproject(coordinate);
  36826. coordinates[index] = coordinate;
  36827. }, _this5);
  36828. } else if (geometryType === 'Point') {
  36829. coordinates = _this5._unproject(coordinates);
  36830. feature.geometry.coordinates = coordinates;
  36831. } else if (geometryType === 'MultiPolygon' || geometryType === 'Polygon') {
  36832. coordinates.forEach(function (coordinate, index) {
  36833. var coords = geometryType === 'MultiPolygon' ? coordinate[0] : coordinate;
  36834. coords.forEach(function (latlng, i) {
  36835. latlng = _this5._unproject(latlng);
  36836. coords[i] = latlng;
  36837. });
  36838. coordinates[index] = coordinate;
  36839. });
  36840. }
  36841. features[index] = feature;
  36842. });
  36843. return features;
  36844. }
  36845. }, {
  36846. key: "handleSvgColor",
  36847. value: function handleSvgColor(style, canvas) {
  36848. var fillColor = style.fillColor,
  36849. fillOpacity = style.fillOpacity,
  36850. strokeColor = style.strokeColor,
  36851. strokeOpacity = style.strokeOpacity,
  36852. strokeWidth = style.strokeWidth;
  36853. var context = canvas.getContext('2d');
  36854. if (fillColor) {
  36855. context.fillStyle = (0, _util.getColorWithOpacity)(fillColor, fillOpacity);
  36856. context.fill();
  36857. }
  36858. if (strokeColor || strokeWidth) {
  36859. context.strokeStyle = (0, _util.getColorWithOpacity)(strokeColor, strokeOpacity);
  36860. context.lineWidth = strokeWidth;
  36861. context.stroke();
  36862. }
  36863. }
  36864. }, {
  36865. key: "_createLinesData",
  36866. value: function _createLinesData(layerInfo, properties) {
  36867. var _this6 = this;
  36868. var data = [];
  36869. if (properties && properties.length) {
  36870. var from = layerInfo.from,
  36871. to = layerInfo.to,
  36872. fromCoord,
  36873. toCoord;
  36874. if (from.type === 'XY_FIELD' && from['xField'] && from['yField'] && to['xField'] && to['yField']) {
  36875. properties.forEach(function (property) {
  36876. var fromX = property[from['xField']],
  36877. fromY = property[from['yField']],
  36878. toX = property[to['xField']],
  36879. toY = property[to['yField']];
  36880. if (!fromX || !fromY || !toX || !toY) {
  36881. return;
  36882. }
  36883. fromCoord = [property[from['xField']], property[from['yField']]];
  36884. toCoord = [property[to['xField']], property[to['yField']]];
  36885. data.push({
  36886. coords: [fromCoord, toCoord]
  36887. });
  36888. });
  36889. } else if (from.type === 'PLACE_FIELD' && from['field'] && to['field']) {
  36890. var centerDatas = _ProvinceCenter.default.concat(_MunicipalCenter.default);
  36891. properties.forEach(function (property) {
  36892. var fromField = property[from['field']],
  36893. toField = property[to['field']];
  36894. fromCoord = centerDatas.find(function (item) {
  36895. return _this6.isMatchAdministrativeName(item.name, fromField);
  36896. });
  36897. toCoord = centerDatas.find(function (item) {
  36898. return _this6.isMatchAdministrativeName(item.name, toField);
  36899. });
  36900. if (!fromCoord || !toCoord) {
  36901. return;
  36902. }
  36903. data.push({
  36904. coords: [fromCoord.coord, toCoord.coord]
  36905. });
  36906. });
  36907. }
  36908. }
  36909. return data;
  36910. }
  36911. }, {
  36912. key: "_createPointsData",
  36913. value: function _createPointsData(lineData, layerInfo, properties) {
  36914. var data = [],
  36915. labelSetting = layerInfo.labelSetting;
  36916. if (!labelSetting.show || !lineData.length) {
  36917. return data;
  36918. }
  36919. var fromData = [],
  36920. toData = [];
  36921. lineData.forEach(function (item, idx) {
  36922. var coords = item.coords,
  36923. fromCoord = coords[0],
  36924. toCoord = coords[1],
  36925. fromProperty = properties[idx][labelSetting.from],
  36926. toProperty = properties[idx][labelSetting.to];
  36927. var f = fromData.find(function (d) {
  36928. return d.value[0] === fromCoord[0] && d.value[1] === fromCoord[1];
  36929. });
  36930. !f && fromData.push({
  36931. name: fromProperty,
  36932. value: fromCoord
  36933. });
  36934. var t = toData.find(function (d) {
  36935. return d.value[0] === toCoord[0] && d.value[1] === toCoord[1];
  36936. });
  36937. !t && toData.push({
  36938. name: toProperty,
  36939. value: toCoord
  36940. });
  36941. });
  36942. data = fromData.concat(toData);
  36943. return data;
  36944. }
  36945. }, {
  36946. key: "_createOptions",
  36947. value: function _createOptions(layerInfo, lineData, pointData, coordinateSystem) {
  36948. var series;
  36949. var lineSeries = this._createLineSeries(layerInfo, lineData, coordinateSystem);
  36950. if (pointData && pointData.length) {
  36951. var pointSeries = this._createPointSeries(layerInfo, pointData, coordinateSystem);
  36952. series = lineSeries.concat(pointSeries);
  36953. } else {
  36954. series = lineSeries.slice();
  36955. }
  36956. return {
  36957. series: series
  36958. };
  36959. }
  36960. }, {
  36961. key: "_createPointSeries",
  36962. value: function _createPointSeries(layerInfo, pointData, coordinateSystem) {
  36963. var lineSetting = layerInfo.lineSetting;
  36964. var animationSetting = layerInfo.animationSetting;
  36965. var labelSetting = layerInfo.labelSetting;
  36966. var pointSeries = [{
  36967. name: 'point-series',
  36968. coordinateSystem: coordinateSystem,
  36969. zlevel: 2,
  36970. label: {
  36971. normal: {
  36972. show: labelSetting.show,
  36973. position: 'right',
  36974. formatter: '{b}',
  36975. color: labelSetting.color,
  36976. fontFamily: labelSetting.fontFamily
  36977. }
  36978. },
  36979. itemStyle: {
  36980. normal: {
  36981. color: lineSetting.color || labelSetting.color
  36982. }
  36983. },
  36984. data: pointData
  36985. }];
  36986. if (animationSetting.show) {
  36987. pointSeries[0].type = 'effectScatter';
  36988. pointSeries[0].rippleEffect = {
  36989. brushType: 'stroke'
  36990. };
  36991. } else {
  36992. pointSeries[0].type = 'scatter';
  36993. }
  36994. return pointSeries;
  36995. }
  36996. }, {
  36997. key: "_createLineSeries",
  36998. value: function _createLineSeries(layerInfo, lineData, coordinateSystem) {
  36999. var lineSetting = layerInfo.lineSetting;
  37000. var animationSetting = layerInfo.animationSetting;
  37001. var linesSeries = [{
  37002. name: 'line-series',
  37003. coordinateSystem: coordinateSystem,
  37004. type: 'lines',
  37005. zlevel: 1,
  37006. effect: {
  37007. show: animationSetting.show,
  37008. constantSpeed: animationSetting.constantSpeed,
  37009. trailLength: 0,
  37010. symbol: animationSetting.symbol,
  37011. symbolSize: animationSetting.symbolSize
  37012. },
  37013. lineStyle: {
  37014. normal: {
  37015. color: lineSetting.color,
  37016. type: lineSetting.type,
  37017. width: lineSetting.width,
  37018. opacity: lineSetting.opacity,
  37019. curveness: lineSetting.curveness
  37020. }
  37021. },
  37022. data: lineData
  37023. }];
  37024. if (lineData.length >= MAX_MIGRATION_ANIMATION_COUNT) {
  37025. linesSeries[0].large = true;
  37026. linesSeries[0].largeThreshold = 100;
  37027. linesSeries[0].blendMode = 'lighter';
  37028. }
  37029. return linesSeries;
  37030. }
  37031. }, {
  37032. key: "_getLayerFeaturesSucceeded",
  37033. value: function _getLayerFeaturesSucceeded(result, layer) {
  37034. switch (result.type) {
  37035. case 'feature':
  37036. this._initOverlayLayer(layer, result.features);
  37037. break;
  37038. case 'restMap':
  37039. layer.layerType = 'restMap';
  37040. this._initOverlayLayer(layer, result.restMaps);
  37041. break;
  37042. case 'mvt':
  37043. layer.layerType = 'mvt';
  37044. this._initOverlayLayer(layer, result);
  37045. break;
  37046. case 'dataflow':
  37047. case 'noServerId':
  37048. this._initOverlayLayer(layer);
  37049. break;
  37050. }
  37051. }
  37052. }]);
  37053. return WebMapBase;
  37054. }(_Events2.Events);
  37055. exports.default = WebMapBase;
  37056. /***/ }),
  37057. /***/ "d711":
  37058. /***/ (function(module, exports, __webpack_require__) {
  37059. "use strict";
  37060. // Copyright Joyent, Inc. and other Node contributors.
  37061. //
  37062. // Permission is hereby granted, free of charge, to any person obtaining a
  37063. // copy of this software and associated documentation files (the
  37064. // "Software"), to deal in the Software without restriction, including
  37065. // without limitation the rights to use, copy, modify, merge, publish,
  37066. // distribute, sublicense, and/or sell copies of the Software, and to permit
  37067. // persons to whom the Software is furnished to do so, subject to the
  37068. // following conditions:
  37069. //
  37070. // The above copyright notice and this permission notice shall be included
  37071. // in all copies or substantial portions of the Software.
  37072. //
  37073. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  37074. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  37075. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  37076. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  37077. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  37078. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  37079. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  37080. // a duplex stream is just a stream that is both readable and writable.
  37081. // Since JS doesn't have multiple prototypal inheritance, this class
  37082. // prototypally inherits from Readable, and then parasitically from
  37083. // Writable.
  37084. /*<replacement>*/
  37085. var pna = __webpack_require__("3e48");
  37086. /*</replacement>*/
  37087. /*<replacement>*/
  37088. var objectKeys = Object.keys || function (obj) {
  37089. var keys = [];
  37090. for (var key in obj) {
  37091. keys.push(key);
  37092. }return keys;
  37093. };
  37094. /*</replacement>*/
  37095. module.exports = Duplex;
  37096. /*<replacement>*/
  37097. var util = __webpack_require__("9107");
  37098. util.inherits = __webpack_require__("fe04");
  37099. /*</replacement>*/
  37100. var Readable = __webpack_require__("c66c");
  37101. var Writable = __webpack_require__("9c77");
  37102. util.inherits(Duplex, Readable);
  37103. {
  37104. // avoid scope creep, the keys array can then be collected
  37105. var keys = objectKeys(Writable.prototype);
  37106. for (var v = 0; v < keys.length; v++) {
  37107. var method = keys[v];
  37108. if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
  37109. }
  37110. }
  37111. function Duplex(options) {
  37112. if (!(this instanceof Duplex)) return new Duplex(options);
  37113. Readable.call(this, options);
  37114. Writable.call(this, options);
  37115. if (options && options.readable === false) this.readable = false;
  37116. if (options && options.writable === false) this.writable = false;
  37117. this.allowHalfOpen = true;
  37118. if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
  37119. this.once('end', onend);
  37120. }
  37121. Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
  37122. // making it explicit this property is not enumerable
  37123. // because otherwise some prototype manipulation in
  37124. // userland will fail
  37125. enumerable: false,
  37126. get: function () {
  37127. return this._writableState.highWaterMark;
  37128. }
  37129. });
  37130. // the no-half-open enforcer
  37131. function onend() {
  37132. // if we allow half-open state, or if the writable side ended,
  37133. // then we're ok.
  37134. if (this.allowHalfOpen || this._writableState.ended) return;
  37135. // no more data can be written.
  37136. // But allow more writes to happen in this tick.
  37137. pna.nextTick(onEndNT, this);
  37138. }
  37139. function onEndNT(self) {
  37140. self.end();
  37141. }
  37142. Object.defineProperty(Duplex.prototype, 'destroyed', {
  37143. get: function () {
  37144. if (this._readableState === undefined || this._writableState === undefined) {
  37145. return false;
  37146. }
  37147. return this._readableState.destroyed && this._writableState.destroyed;
  37148. },
  37149. set: function (value) {
  37150. // we ignore the value if the stream
  37151. // has not been initialized yet
  37152. if (this._readableState === undefined || this._writableState === undefined) {
  37153. return;
  37154. }
  37155. // backward compatibility, the user is explicitly
  37156. // managing destroyed
  37157. this._readableState.destroyed = value;
  37158. this._writableState.destroyed = value;
  37159. }
  37160. });
  37161. Duplex.prototype._destroy = function (err, cb) {
  37162. this.push(null);
  37163. this.end();
  37164. pna.nextTick(cb, err);
  37165. };
  37166. /***/ }),
  37167. /***/ "d83d":
  37168. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  37169. "use strict";
  37170. __webpack_require__.r(__webpack_exports__);
  37171. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ChartMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("0f9e");
  37172. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ChartMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ChartMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
  37173. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ChartMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ChartMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  37174. /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ChartMixin_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
  37175. /***/ }),
  37176. /***/ "d865":
  37177. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  37178. "use strict";
  37179. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/leaflet/identify/Identify.vue?vue&type=template&id=44a6aa12&
  37180. var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('ul',{directives:[{name:"show",rawName:"v-show",value:(false),expression:"false"}],ref:"Popup",class:['sm-component-identify'],style:([_vm.getTextColorStyle])},_vm._l((_vm.popupProps),function(value,key,index){return _c('li',{key:index,staticClass:"sm-component-identify__body"},[_c('div',{staticClass:"sm-component-identify__left",attrs:{"title":key}},[_vm._v(_vm._s(key))]),_vm._v(" "),_c('div',{staticClass:"sm-component-identify__right",attrs:{"title":value}},[_vm._v(_vm._s(value))])])}),0)}
  37181. var staticRenderFns = []
  37182. // CONCATENATED MODULE: ./src/leaflet/identify/Identify.vue?vue&type=template&id=44a6aa12&
  37183. /* concated harmony reexport render */__webpack_require__.d(__webpack_exports__, "a", function() { return render; });
  37184. /* concated harmony reexport staticRenderFns */__webpack_require__.d(__webpack_exports__, "b", function() { return staticRenderFns; });
  37185. /***/ }),
  37186. /***/ "dafd":
  37187. /***/ (function(module, exports) {
  37188. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhYAAAD+CAYAAABmz0wVAAAABGdBTUEAALGPC/xhBQAACzdJREFUeAHt3VFu2jAcwGEHcZTugRtUPdZ6jl2r6g3yQO+S5Q9TMRSLJpbWOPnyFIjdOl+Y+ht0WZeO/e/U0tal9/R0eGtpydZKgAABAgRmCXz0L2lIz7Pm/tCk3Q993/nfNoAD2kaAAAECBNYs0GBUxOVoLyxi1eIiFGwECBAgsFaBRqMiLkebYRErFxehYCNAgACBtQk0HBVxKdoNi1i9uAgFGwECBAisRaDxqIjL0HZYxBmIi1CwESBAgEDrAiuIirgE+9vr0KX05/a5xT8exhUe+8Uv0wIJECBAgEBRIH6WNbiNy37Nl/0lLOLg8Osw9oWNAAECBAgQIFAW6I79dQ6Nt4Ro/6OQ8vk6QoAAAQIECPwvgX/3mdql2LERIECAAAECBOYKZDev3J3uYiku5lKaR4AAAQIEti2QRUVAnD8KiVtki4ttvzCcPQECBAgQmCNw899sXH7HQlzM4TSHAAECBAgQyAQuYRFP3lRHNs4uAQIECBAgQOChwHVYPBxuAAECBAgQIECgLCAsyjaOECBAgAABAhMFhMVEMMMJECBAgACBsoCwKNs4QoAAAQIECEwUEBYTwQwnQIAAAQIEygLComzjCAECBAgQIDBRQFhMBDOcAAECBAgQKAsIi7KNIwQIECBAgMBEAWExEcxwAgQIECBAoCwgLMo2jhAgQIAAAQITBYTFRDDDCRAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQKbEOiO/bCJE3WSBAgQIECAQJXAvWbYVX1FkwkQIECAAAECmYCwyDDsEiBAgAABAnUCwqLOz2wCBAgQIEAgExAWGYZdAgQIECBAoE5AWNT5mU2AAAECBAhkAsIiw7BLgAABAgQI1AkIizo/swkQIECAAIFMQFhkGHYJECBAgACBOgFhUednNgECBAgQIJAJCIsMwy4BAgQIECBQJyAs6vzMJkCAAAECBDIBYZFh2CVAgAABAgTqBK7D4qN/qftyZhMgQIAAAQJbFriERUTFkJ63jOHcCRAgQIAAgYkCN29KnMNCVExUNJwAAQIECBA4CcSbEllc7E4PvFPh1UGAAAECBAjMFcjiYu/jj7mK5hEgQIAAAQKfAue4SPvPJ7Kd7tgP2UO7BAgQIECAAIHHAmNcfAmLsSheH89c2Iguvaenw9vCVmU5BAgQIEDg+wIr+X3Hy78K+f6pL2ukqFjW9bAaAgQIEJgnEH9Bjp9pjW9th4WoaPzlZ/kECBAgcCWwgrhoNyxExdVr0QMCBAgQWIlA43HRZliIipX86XEaBAgQIHBXoOG4aC8sRMXd16AnCRAgQGBlAo3GxV/c4HmOBfV/nAAAAABJRU5ErkJggg=="
  37189. /***/ }),
  37190. /***/ "db36":
  37191. /***/ (function(module, exports, __webpack_require__) {
  37192. // extracted by mini-css-extract-plugin
  37193. /***/ }),
  37194. /***/ "dcc9":
  37195. /***/ (function(module, exports, __webpack_require__) {
  37196. "use strict";
  37197. Object.defineProperty(exports, "__esModule", {
  37198. value: true
  37199. });
  37200. exports.default = void 0;
  37201. var _default2 = {
  37202. props: {
  37203. options: {
  37204. type: Object,
  37205. default: function _default() {
  37206. return null;
  37207. }
  37208. }
  37209. }
  37210. };
  37211. exports.default = _default2;
  37212. /***/ }),
  37213. /***/ "dd34":
  37214. /***/ (function(module, exports, __webpack_require__) {
  37215. "use strict";
  37216. var _interopRequireDefault = __webpack_require__("8e6d");
  37217. Object.defineProperty(exports, "__esModule", {
  37218. value: true
  37219. });
  37220. exports.default = void 0;
  37221. var _mapGetter = _interopRequireDefault(__webpack_require__("2ed5"));
  37222. var _ChartMixin = _interopRequireDefault(__webpack_require__("3605"));
  37223. var _ChartViewModel = _interopRequireDefault(__webpack_require__("5a51"));
  37224. __webpack_require__("751d");
  37225. var _default = {
  37226. name: 'SmChart',
  37227. mixins: [_ChartMixin.default, _mapGetter.default],
  37228. loaded: function loaded() {
  37229. this.viewModel = new _ChartViewModel.default(this.map);
  37230. },
  37231. beforeDestroy: function beforeDestroy() {
  37232. this.$options.removed.call(this);
  37233. },
  37234. removed: function removed() {
  37235. this.clearPopup();
  37236. },
  37237. methods: {
  37238. clearPopup: function clearPopup() {
  37239. this.viewModel && this.viewModel.clear();
  37240. },
  37241. changePopupArrowStyle: function changePopupArrowStyle() {
  37242. var popupArrow = document.querySelector('.sm-component-chart-result-popup .leaflet-popup-tip');
  37243. if (popupArrow) {
  37244. popupArrow.style.background = this.popupBackground;
  37245. }
  37246. }
  37247. }
  37248. };
  37249. exports.default = _default;
  37250. /***/ }),
  37251. /***/ "ded2":
  37252. /***/ (function(module, exports, __webpack_require__) {
  37253. var map = {
  37254. "./border1.png": "dfc8",
  37255. "./border10.png": "a00e",
  37256. "./border11.png": "dafd",
  37257. "./border12.png": "c0cb",
  37258. "./border13.png": "f11d",
  37259. "./border2.png": "bb52",
  37260. "./border3.png": "7de9",
  37261. "./border4.png": "b557",
  37262. "./border5.png": "29e0",
  37263. "./border6.png": "05d2",
  37264. "./border7.png": "5106",
  37265. "./border8.png": "f1a1",
  37266. "./border9.png": "df8c"
  37267. };
  37268. function webpackContext(req) {
  37269. var id = webpackContextResolve(req);
  37270. return __webpack_require__(id);
  37271. }
  37272. function webpackContextResolve(req) {
  37273. if(!__webpack_require__.o(map, req)) {
  37274. var e = new Error("Cannot find module '" + req + "'");
  37275. e.code = 'MODULE_NOT_FOUND';
  37276. throw e;
  37277. }
  37278. return map[req];
  37279. }
  37280. webpackContext.keys = function webpackContextKeys() {
  37281. return Object.keys(map);
  37282. };
  37283. webpackContext.resolve = webpackContextResolve;
  37284. module.exports = webpackContext;
  37285. webpackContext.id = "ded2";
  37286. /***/ }),
  37287. /***/ "df2e":
  37288. /***/ (function(module, exports) {
  37289. module.exports = {
  37290. isArray: function(value) {
  37291. if (Array.isArray) {
  37292. return Array.isArray(value);
  37293. }
  37294. // fallback for older browsers like IE 8
  37295. return Object.prototype.toString.call( value ) === '[object Array]';
  37296. }
  37297. };
  37298. /***/ }),
  37299. /***/ "df8c":
  37300. /***/ (function(module, exports) {
  37301. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhYAAAD+CAYAAABmz0wVAAAABGdBTUEAALGPC/xhBQAAHF1JREFUeAHt3W2wXHV9B/A9e5ckvuxUVGoghGdQA6gw2E4fXhdtaRmfxxmn05d2MIankISnJCQQAmrfd9pplVYmSq362um0yoCApApokECAqjg6tm/Mvc3d09/vf3ZDBO5ms3tIcrOfQ+7uvXvO/797Pp6Z/fp/OlXnJNlW/NN3bq3efvrtdb+uqrru1PG5ynO/3+n04+/4qfLV/Bf74yH29+P1ODCfF5v9dfxeZeEoV2WJLD84fvg8fC3rL3VHpcPy/WeeOUlEfAwCBAgQILD8BHonw0de8aXv3hah4rb4LFVVRQ7IDxWBIL/3O1U3fiIkxFMnM0KkhjikyQiDfXFAsz+OrzrdKB8HlopKTXF0bKVQlsvyGVHiv+HuLDfY3xzskQABAgQIEJhE4IQHiwgVt1e/945bo+UgGiAiEHTjaz++6OsICE2LxeDbP17PLTJG8xxBo14c/DFIDcOc0ASHOCzripDRtGrk35kvsmCEi34EkGFlTZUeCRAgQIAAgSkFsh3ghG0rvvzwHdXqM24t7RQZAroRJsqniccMEtmMkC/E65E0IgjE7/ETnSVlXzUXr+e+PIssG6/nT9mfr8XWtHpkwcHv5bmJIKV5pOyJh+aQ4V+eCRAgQIAAgQkETliLxYoHHrmzWv2OzfHNH0kgvugzLEQjQv3fv7hj4ZMfuGOCc1GEAAECBAgQOM4C3c98cdhhUN75hASLFQ88vLV75hmbopUgx1+W8REx9qGuX/7ZnULFcb4ivB0BAgQIEGhR4LgHi1X//Oi2zpp33hIDH2IIRYx1aAZg1vWBn26NUHF7i+emKgIECBAgQOA4CxzXYLHqKxEqzj4zQkVOKY1BEGXmR8SLF3+2beETV912nM/d2xEgQIAAAQItCxy3YLFqz2Pbq7NWbyxDMHOAZU7o6HYjVBzYvvDxq25t+bxUR4AAAQIECJwAgeMSLFbt+d5d1dqzbo6VI6KlIqJFLGaVczT6z79818LHrtpyAs7bWxIgQIAAAQJvgsCbHixWPfT4jursNTflmIpmDYkcrRmTR/e/vGPhY1dsHnVOb9/8t2vnDx1aM+oY+wgQIECAAIE3X+DXO9d/e5x3Gaz2MM6hx35MhIqd3XPX3pSzP15dGjPaLA68tOPgR6/YNKpGoWKUjn0ECBAgQODkFHjTgsXKrz1xd/f8c26MTo9oqIjFq5oFsOp6/ws7D177PqHi5LwefCoCBAgQIDCVwJvSFbLyoSfumbv43OvLDcXy4zULYNX9Z5+/++C1779l1CfWUjFKxz4CBAgQIHByC7QeLFZ+/cldcxeesyFGUcSK2bmaZoypyNt17HvunoPXvDdmhSy9CRVL29hDgAABAgSWg0CrXSErv/Hkrt67zt8QXR9lnGY0VeRS3fXij/fvilBx8ygQoWKUjn0ECBAgQGB5CLTWYrHym9/f3bvkgvWlpSLjStw9tBPLVBx6at+9839x+U2jOISKUTr2ESBAgACB5SPQSrBY+c29u3vvvnB9zPeIf7nyVd5hNJarePrZ3fPXXH7jKA6hYpSOfQQIECBAYHkJTN0VEqHivtPWXby+M9es0l3uUpprYD297775P7v0hlEcQsUoHfsIECBAgMDyE5iqxeIt39p7/9y6S67LVSqqaKjI239EV0h96Oln7p//0GXXj+IQKkbp2EeAAAECBJanwMTBYmWGisvedV2cdlWXPpC8B3qn/r8fRKi4+rINoziEilE69hEgQIAAgeUrMFFXSOn+uDRaKsriV2VZzZz/US/uffrz81evEyqW7/XgkxMgQIAAgakEjrnF4i0xULN76UWfjXeNRSpiy8WvoqWiv/epL/zm6nWfK68t8aClYgkYLxMgQIAAgVNE4JiCRU4p7b7nwvVx7lWnXxbrLi0VhyJUzP/punx9yU2oWJLGDgIECBAgcMoIjB0sVv7bk/f2Lo51KvoxkTS2fMwxFYea7g8tFafMJeFECBAgQIDA5AJjBYuyTPcl53+uWUczHgdLVTQDNY2pmJxfSQIECBAgcGoJHHXwZrmhWN77I1oqqhxPkVs/VtT8wdMx+0OoaEA8EiBAgAABAikwssUib30+d9F51+c6FTE8M/5FDonuj7L4lXUqXEEECBAgQIDAawSWbLFY9dDjO+cuWHtDpIkyULNMKq3revGpfbvnP3Spxa9eA+lPAgQIECBAIG4T9kYIq776+I7q3LU3lnkfOfsjukDqut/cUMwy3W9E5jUCBAgQIEAgBF7XFbJqz/fuqs5Zc1OMp4jujziiiukfMaZi8ZnndrlLqWuGAAECBAgQGCXwW8FixZ7HtkeouDm7P8p4ikwWVdz7/Cf775n/i/fePKoi61SM0rGPAAECBAjMhsDhrpAVX3l029xZqzeWMRVlUc1+WaciQsXdB68RKmbjcnCWBAgQIEBgOoESLFY8+MjW7tozbynLXpUlumOhipwE8uz+nREqNo56Cy0Vo3TsI0CAAAECsyXQW/HAw1u7Z67elOtUxEoVnc5incMq6vrAizsOXvv+TaM4hIpROvYRIECAAIHZE+h212SoiCmlpaWiCRWL+w/cdfDa9wkVs3c9OGMCBAgQIDCVQDcCRbOgZj+6PyJcLD5/YPvCR67YPKpWLRWjdOwjQIAAAQKzK9CN5SnKUM0ytTTCxcKHr9wyikOoGKVjHwECBAgQmG2BbmmuKK0V2WCRC1csvQkVS9vYQ4AAAQIECMTKm9liUQJF3Atk1CZUjNKxjwABAgQIEEiBZoGsXLY7Jp5WI7LF/KFDa5ARIECAAAECBEYJ9GJGSCSK6AbJO5fGs40AAQIECBAgMKlAzArJPFGSRZkVMmlFyhEgQIAAAQIEetFUkTNOI1TEz6i+EFYECBAgQIAAgaMIRLCIJovFPCrHWRy+dchRitlNgAABAgQIEHi9QJkVUsJFBoujzAx5fXGvECBAgAABAgReFejGPULir5xyGo9HWcfi1WJ+I0CAAAECBAi8XqDXjNss9whpGi5ef4xXCBAgQIAAAQJjCfRy5c3SWlFFk0Xe3dRGgAABAgQIEJhQoBljMVjSu7kb2YQ1KUaAAAECBAjMvECZbprjNnOhrHyyESBAgAABAgQmFeh1FrMLZNLiyhEgQIAAAQIEXhWIe4XEGItc1TvDhYDxqozfCBAgQIAAgWMW6OXdTTNUZDdIjt+0ESBAgAABAgQmFTg8K6SKRTctYzEpo3IECBAgQIBACkSLRXOv9Drvmy5ZuCoIECBAgACBKQTi7qbR/5HjN0uo0BcyhaWiBAgQIEBg5gV6uYx3WSSrLME58x4ACBAgQIAAgSkEelW5V0jU0PSITFGVogQIECBAgMCsC5TbpmcHSM40NcRi1i8H50+AAAECBKYTKMEiB1nk4E3LWEyHqTQBAgQIEJh1gTIrpCqrYxm4OesXg/MnQIAAAQLTCpR1LHJhrH5ZHUubxbSgyhMgQIAAgVkW6HVi8Gb+V3XLKItZtnDuBAgQIECAwJQCgzEWUUuZFaLFYkpPxQkQIECAwEwLlJuQRYPFYDv8y/AFzwQIECBAgACBsQWam5BlnogVvW0ECBAgQIAAgWkEmgWysgcku0L0hExjqSwBAgQIEJh5gWaBrLIyVjUYwDnzJgAIECBAgACBCQW6eXfTMtM073I6XN57wsoUI0CAAAECBGZboKxjUW5EFt0gw1uozzaJsydAgAABAgQmFSh3N83Cg96QSetRjgABAgQIECDQadaxGA7aNNvUJUGAAAECBAhMIdAEi2GgGAaMKSpUlAABAgQIEJhdgVjSOwZtlpuQBYL7ps/uleDMCRAgQIBACwKHp5tmY8Ww4aKFelVBgAABAgQIzKBA0xUSJ56NFcOGixl0cMoECBAgQIBACwJlVkgZWqG5ogVOVRAgQIAAgdkW6HUWmzEWdaaLXNbbRoAAAQIECBCYUCC6QvoxtmJwBzKtFhMyKkaAAAECBAikQKy8meMrcoCFVOGSIECAAAECBKYT6NbRYlH6QGSL6SSVJkCAAAECBGLlzbzxWPaERKuFNgtXBAECBAgQIDCNQK+sXmHQ5jSGyhIgQIAAAQIDgW5nMVoq+ovxZ7RXWHnThUGAAAECBAhMIdDNDpAygDOX9s5uERsBAgQIECBAYEKBmBWSYSLCRQy0MMpiQkXFCBAgQIAAgSLQq7OlIrduPGuwaCw8EiBAgAABAhMJlHuFlCW9Y6xFp1t+m6gihQgQIECAAAECZbppWc47LcwOcUUQIECAAAECUwiU6aZl8OYUlShKgAABAgQIEEiBQYtFDq6IbpCyCicYAgQIECBAgMBkAtFiMRy0aeTmZIRKESBAgAABAkOBbp1rV2SmyGmnssXQxTMBAgQIECAwgcDhdSwyV1SSxQSEihAgQIAAAQJDgTLdNPNETjTVYDFk8UyAAAECBAhMItAEiyhZWixy/OYktShDgAABAgQIEAiBXmex36njtunV4cUsuBAgQIAAAQIEJhPo1TErpOoP7xOivWIyRqUIECBAgACBFGi6QqoIF/FHuR8ZFwIECBAgQIDAhAK96uDBw0UN4DxM4RcCBAgQIEBgAoEYXWEjQIAAAQIECLQjIFi046gWAgQIECBAIAQEC5cBAQIECBAg0JqAYNEapYoIECBAgAABwcI1QIAAAQIECLQmIFi0RqkiAgQIECBAQLBwDRAgQIAAAQKtCQgWrVGqiAABAgQIEBAsXAMECBAgQIBAawKCRWuUKiJAgAABAgQEC9cAAQIECBAg0JqAYNEapYoIECBAgAABwcI1QIAAAQIECLQmIFi0RqkiAgQIECBAQLBwDRAgQIAAAQKtCQgWrVGqiAABAgQIEBAsXAMECBAgQIBAawKCRWuUKiJAgAABAgQEC9cAAQIECBAg0JqAYNEapYoIECBAgAABwcI1QIAAAQIECLQmIFi0RqkiAgQIECBAQLBwDRAgQIAAAQKtCQgWrVGqiAABAgQIEBAsXAMECBAgQIBAawKCRWuUKiJAgAABAgQEC9cAAQIECBAg0JqAYNEapYoIECBAgAABwcI1QIAAAQIECLQmIFi0RqkiAgQIECBAQLBwDRAgQIAAAQKtCQgWrVGqiAABAgQIEBAsXAMECBAgQIBAawKCRWuUKiJAgAABAgQEC9cAAQIECBAg0JqAYNEapYoIECBAgAABwcI1QIAAAQIECLQmIFi0RqkiAgQIECBAQLBwDRAgQIAAAQKtCQgWrVGqiAABAgQIEBAsXAMECBAgQIBAawKCRWuUKiJAgAABAgQEC9cAAQIECBAg0JqAYNEapYoIECBAgAABwcI1QIAAAQIECLQmIFi0RqkiAgQIECBAQLBwDRAgQIAAAQKtCQgWrVGqiAABAgQIEBAsXAMECBAgQIBAawKCRWuUKiJAgAABAgQEC9cAAQIECBAg0JqAYNEapYoIECBAgAABwcI1QIAAAQIECLQmIFi0RqkiAgQIECBAQLBwDRAgQIAAAQKtCQgWrVGqiAABAgQIEBAsXAMECBAgQIBAawKCRWuUKiJAgAABAgQEC9cAAQIECBAg0JqAYNEapYoIECBAgAABwcI1QIAAAQIECLQmIFi0RqkiAgQIECBAQLBwDRAgQIAAAQKtCQgWrVGqiAABAgQIEBAsXAMECBAgQIBAawKCRWuUKiJAgAABAgQEC9cAAQIECBAg0JqAYNEapYoIECBAgAABwcI1QIAAAQIECLQmIFi0RqkiAgQIECBAQLBwDRAgQIAAAQKtCQgWrVGqiAABAgQIEBAsXAMECBAgQIBAawKCRWuUKiJAgAABAgQEC9cAAQIECBAg0JqAYNEapYoIECBAgAABwcI1QIAAAQIECLQmIFi0RqkiAgQIECBAQLBwDRAgQIAAAQKtCQgWrVGqiAABAgQIEBAsXAMECBAgQIBAawKCRWuUKiJAgAABAgQEC9cAAQIECBAg0JqAYNEapYoIECBAgAABwcI1QIAAAQIECLQm0GutJhURIECAAAECMydQnX56p1PHvzoeYhMsZu4ScMIECBAgQKA9gbqKzo+qqa+q+4JFe7RqIkCAAAECsyhQdaoIFtleUXe6gsUsXgLOmQABAgQItCVQzWVzRYSLeKz7/YgWNgIECBAgQIDAxALdTl26QiJcdLVYTMyoIAECBAgQIBAC3ewKqWLwZrRb9A3edE0QIECAAAEC0wiUwZt10xnSNXhzGkplCRAgQIAAgbkcVZHzTeNf9IkYY+GSIECAAAECBCYXyGARXSFV6RIxxmJySCUJECBAgACBEIiRmzFos6yPFYMsLJDloiBAgAABAgQmF8iWiqYnpNOJ1gtdIZNTKkmAAAECBGZeIKeY1tkVUsZaVFosZv6KAECAAAECBKYRyFARM0Oi0aJ0iWixmAZTWQIECBAgMOMCdbRYlLUswiEHcAoWM35BOH0CBAgQIDCNQIaJSBSdujzrCpnGUlkCBAgQIEAg+0ByAGc/2ioiY5gV4pIgQIAAAQIEJhYogzezdK7nHSFDsJiYUkECBAgQIECgdIEkQ7RYxDhOwcIlQYAAAQIECEwjkLNC4iZkcZ+Q7BXRYjGNpbIECBAgQGDGBZr1K7InJKec1oLFjF8PTp8AAQIECEwnkK0VZQBnM8zCdNPpOJUmQIAAAQKzLZALZA1W3czZIYLFbF8Ozp4AAQIECEwnkAtkDcJFHfNNBYvpOJUmQIAAAQKzLZALY+UW4SJbLAzebDg8EiBAgAABAhMI1LHqZhUzQpp40RUsJjBUhAABAgQIEBgKRCtFXceMkBjAWcUiWbpChjCeCRAgQIAAgWMWyDub5joW2WRRxyBOXSHHTKgAAQIECBCYLYGVvd4LS57xXLRYLMbMkDhgMOt0yUPtIECAAAECBGZcIEPFz7f9zf4lGYYzQgatFloslpSygwABAgQIzLbAUUNF8mQzxSBcdPpW3pztK8bZEyBAgACBJQTGChVZNqebZrjILX41eLOh8EiAAAECBAgMBMYNFb2/+/bGTi6QlWkiV9+MlgtdIS4jAgQIECBA4LDAuKFixd//+8bO7/zuthi5WW6ZXvf7GSziVmQ2AgQIECBAgEAIjB8q/nNT561v3dapYgGLaLGoszukO9ev/ud/bxEsXEoECBAgQIDA+KHiH/5jS/X20++M1oluBopmYay5fv3rX21e+Os/vltXiIuJAAECBAjMuMDYLRX/+J0t1emn3153oscjQkXp+Oh2+p1f/mLzob/6kx3JqMVixi8mp0+AAAECsy0wdqj40ndvq8542x2duUF2yHUrunGTkF/+6taFT/9RCRUpKVjM9vXk7AkQIEBghgXGDhUPlFBxW9xtLJopSqDInpB+5+ev3Lbw6T/YfiShrpAjNfxOgAABAgRmRGDsUPHlR+6o3vm2LZ3FerBud9wbJFbCqn/6yu0Ln/7Dba/l0mLxWhF/EyBAgACBU1xg7FDxwCN3ds86Y0u0TlRlIaxwqWO4Zv3zX9yx8Knf3/pGTILFG6l4jQABAgQInKICY4eKBx/Z2j37nZtLO0X2gORCWHNV3Xn5lTsXPvmBO5bi0RWylIzXCRAgQIDAKSYwbqhY9ZVHt3XOWn1LtE9UVSSLwZzSun7xla0Ln/rA7aNYBItROvYRIECAAIFTRGDsULHnse3VmtUb47SrejFW08yluhfrun/g5W0Ln7jytqNx6Ao5mpD9BAgQIEBgmQuMHSq++viO6pw1G2Phq+jziGQRoaKKX/svv7x94eNX3joOgxaLcZQcQ4AAAQIElqnAMYSKndW5a26Mjo+Y9BHtDlW0VsTkj8XnX7pr4SNXbhn39LVYjCvlOAIECBAgsMwExg0VK7/2xN3dC8+5MQZolpaKMgOk260XD7y0Y+EjV2w+ltMWLI5Fy7EECBAgQGCZCIwdKh564p7eJefdULo/hrM/crjmc8/vXLj2fZuO9XR1hRyrmOMJECBAgMBJLjB2qPj6k7vmLj53Qx2LX5XppHHbj9jqet8L9xy89v0xK+TYNy0Wx26mBAECBAgQOGkFxg4V33jy3t57LtiQi19VczmlNE4pVr9afGb/roN/+d6bJz1BLRaTyilHgAABAgROMoHxQ8Xe+3rvvuCz8fFjRc3IEzlYM+58vvij5+6dv/bym6Y5LS0W0+gpS4AAAQIEThKBYwgV9592+cWfzYGa+dHLtNJ4Wvzhvt3zf375jdOejhaLaQWVJ0CAAAECJ1hg7FDxrR/cf9plF10XH7e0VJSHmFN66Kkf3zd/zeU3tHEaWizaUFQHAQIECBA4QQLjhoq3fGvv/addGqHiiJaKvKHYoR8+c//8By+9vq2PL1i0JakeAgQIECBwnAXGDRUrv7l3d3fdxddFO8VvdX/09/7o8/NXX7ahzY+tK6RNTXURIECAAIHjJDB+qPj+7t57LlqfK2rW/TqSRYyqyBU1v//0F37zwXWfa/vjChZti6qPAAECBAi8yQJjh4pvPLmrd/EF6yNIxIqazTDNOsdUPPl0dH+sa7WlYnjKgsVQwjMBAgQIEFgGAmOHiq8/sat30fkb6n6/Kv0fOa80Q8V/xZiKlrs/jmQTLI7U8DsBAgQIEDiJBcYOFf/6xN1zF5y3IW52HhM/IlZEF0gJFTn744OXtTZQ842oxg4Wv965/ttvVIHXCBAgQIAAgZNHYOWeCBXnrb0hVr2qOotx2/P4aHVsi8/8ZHfM/mhlSumoszUrZJSOfQQIECBAYBkJrPrq4zvmLjj7hjrHaOZWD259/tS+e49HqMi3FCxSwUaAAAECBJa5wKo9j22v1p51U6eMqSiBosz+OPTUs7ti8aupV9Qcl2fsrpBxK3QcAQIECBAgcHwFVj346Pbq7DM3RjtFmVJa3r0bc0r3PX/P/BQ3FJvkLLRYTKKmDAECBAgQOEkEVjz4yNZqzeqNsUZFFa0VzaeKTBGh4u5p7lI66ekJFpPKKUeAAAECBE6wwIp/eXhrd/XqTRkqoqki7iSWi1/FXUqfe2FHhIqNJ+LjVd3PfDHnoNgIECBAgMApJxD/Hz62+P/QOeUyV3OoYpZE/B5fw/FnvD431+wbHlOOi2Nif91tnpuy3abM8PgsG8fGHUIH9R55/LDcEe+bx8VPPTeoO98/fh9+nvxs5TPla4PP8Fv1H/Fa+R/p8HvH8XNxXrk/v827sQ7WCy/tOPjhKzaV407AQ3wiGwECBAgQOEUF8ss2vmtzi6/y8hwzJkrGyFdjnYdmjYd8jq2KJJJHNSXKS3FM80J89zezLPKFPD6eo8Ph8MG5e/iTgabsyyKlsjwupmpEV0VZVjtfzLUlyt/5WlNf6crIVofyuZrXc1+WaV6L5/I+EURK3fn542cxy8d/L7y4/USGivxsgkUq2AgQIEDglBTIL/ryzZ7fy/FT/s6HQYDIb+fyxV9eiy/w+EIvX/JHaJTWiwwn8S/L5ZaP5bf4wi/hpASFLJ9/H/E+eVypO0sNXm9+LY9ZZam3HNR8lsOvxTs07xOPGR6ODBfxd5V/Z/F8jjEV/QMHIlRcuaW8eAIfBIsTiO+tCRAgQOA4COT3b37bZ2iIn+Z7vvlSzu/zwXd67M89sZUD8ss6WwEiKERrwLC1o7R+ZFX5k4eWIvHw6h/xe4aTwUHxfGRrRNNaMdwf9WZFWTiDQqk0WjWi/OHPm+XLZx60UOTnG9Sf9ZZwEZX2D/x068JHrzrhoSI/3v8DkctWrrwevwcAAAAASUVORK5CYII="
  37302. /***/ }),
  37303. /***/ "dfae":
  37304. /***/ (function(module, exports, __webpack_require__) {
  37305. !function(e,t){ true?module.exports=t(__webpack_require__("be3f")):undefined}(this,function(e){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=3)}([function(t,n){t.exports=e},function(e,t,n){"use strict";function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=function(e){return e&&e.__esModule?e:{default:e}}(r),s=window.videojs||o.default;"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(e),i=1;i<arguments.length;i++){var r=arguments[i];if(null!=r)for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])}return n},writable:!0,configurable:!0});var a=["loadeddata","canplay","canplaythrough","play","pause","waiting","playing","ended","error"];t.default={name:"video-player",props:{start:{type:Number,default:0},crossOrigin:{type:String,default:""},playsinline:{type:Boolean,default:!1},customEventName:{type:String,default:"statechanged"},options:{type:Object,required:!0},events:{type:Array,default:function(){return[]}},globalOptions:{type:Object,default:function(){return{controls:!0,controlBar:{remainingTimeDisplay:!1,playToggle:{},progressControl:{},fullscreenToggle:{},volumeMenuButton:{inline:!1,vertical:!0}},techOrder:["html5"],plugins:{}}}},globalEvents:{type:Array,default:function(){return[]}}},data:function(){return{player:null,reseted:!0}},mounted:function(){this.player||this.initialize()},beforeDestroy:function(){this.player&&this.dispose()},methods:{initialize:function(){var e=this,t=Object.assign({},this.globalOptions,this.options);this.playsinline&&(this.$refs.video.setAttribute("playsinline",this.playsinline),this.$refs.video.setAttribute("webkit-playsinline",this.playsinline),this.$refs.video.setAttribute("x5-playsinline",this.playsinline),this.$refs.video.setAttribute("x5-video-player-type","h5"),this.$refs.video.setAttribute("x5-video-player-fullscreen",!1)),""!==this.crossOrigin&&(this.$refs.video.crossOrigin=this.crossOrigin,this.$refs.video.setAttribute("crossOrigin",this.crossOrigin));var n=function(t,n){t&&e.$emit(t,e.player),n&&e.$emit(e.customEventName,i({},t,n))};t.plugins&&delete t.plugins.__ob__;var r=this;this.player=s(this.$refs.video,t,function(){for(var e=this,t=a.concat(r.events).concat(r.globalEvents),i={},o=0;o<t.length;o++)"string"==typeof t[o]&&void 0===i[t[o]]&&function(t){i[t]=null,e.on(t,function(){n(t,!0)})}(t[o]);this.on("timeupdate",function(){n("timeupdate",this.currentTime())}),r.$emit("ready",this)})},dispose:function(e){var t=this;this.player&&this.player.dispose&&("Flash"!==this.player.techName_&&this.player.pause&&this.player.pause(),this.player.dispose(),this.player=null,this.$nextTick(function(){t.reseted=!1,t.$nextTick(function(){t.reseted=!0,t.$nextTick(function(){e&&e()})})}))}},watch:{options:{deep:!0,handler:function(e,t){var n=this;this.dispose(function(){e&&e.sources&&e.sources.length&&n.initialize()})}}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),r=n.n(i);for(var o in i)["default","default"].indexOf(o)<0&&function(e){n.d(t,e,function(){return i[e]})}(o);var s=n(5),a=n(4),l=a(r.a,s.a,!1,null,null,null);t.default=l.exports},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.install=t.videoPlayer=t.videojs=void 0;var r=n(0),o=i(r),s=n(2),a=i(s),l=window.videojs||o.default,u=function(e,t){t&&(t.options&&(a.default.props.globalOptions.default=function(){return t.options}),t.events&&(a.default.props.globalEvents.default=function(){return t.events})),e.component(a.default.name,a.default)},d={videojs:l,videoPlayer:a.default,install:u};t.default=d,t.videojs=l,t.videoPlayer=a.default,t.install=u},function(e,t){e.exports=function(e,t,n,i,r,o){var s,a=e=e||{},l=typeof e.default;"object"!==l&&"function"!==l||(s=e,a=e.default);var u="function"==typeof a?a.options:a;t&&(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0),n&&(u.functional=!0),r&&(u._scopeId=r);var d;if(o?(d=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},u._ssrRegister=d):i&&(d=i),d){var c=u.functional,f=c?u.render:u.beforeCreate;c?(u._injectStyles=d,u.render=function(e,t){return d.call(t),f(e,t)}):u.beforeCreate=f?[].concat(f,d):[d]}return{esModule:s,exports:a,options:u}}},function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.reseted?n("div",{staticClass:"video-player"},[n("video",{ref:"video",staticClass:"video-js"})]):e._e()},r=[],o={render:i,staticRenderFns:r};t.a=o}])});
  37306. /***/ }),
  37307. /***/ "dfc8":
  37308. /***/ (function(module, exports) {
  37309. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhYAAAD+CAYAAABmz0wVAAAABGdBTUEAALGPC/xhBQAAFxJJREFUeAHt3U9u68qVB2CS8n2byH6ykgA9DLrTQAcBMsqk0YN+AXqUSe8g+8ooC7i2yJxTpGzpXYkiLRJ4cn3EtfivWDI/CfAPp0q6bfP3fw7NnaX92893WjhNgAABAgQIfGWB4d/+/e7tZV54udsqGnw7/uN/mqGPABL/+i4fyr/y0LZ3g8mS59CGAAECBAgQ+JUIDEPbNF35N6779nvT/NeS3649VSy+/f9ffm6G45A/7TFCRJ/bQ9mPHBH7ESZyv4SKDBO5n08R60a4WIKtDQECBAgQ+PULTKEiosUYKk77bdt0JWy0TXuIn9w/tMOha19/95c/ZOvLikWGimOEiqxMHI8RJWK/z2ARP/1b5IfTdgaJ3M4usoqRq/LogQABAgQIEHh2gcgO49JFeIit4xQoMkgM+fMyNO0xQkVuR7yY6hqnqz6GQs5DxfEtKxRjteKYwWKqXmSQyMpFhoxME+1hDBaSxcnTmgABAgQIPLfAcUoWw+s0HJIBIo9l0IjtLioYUbBo+kPTRMZojpch4D1YfFQqIlQMQ9/kcMhYvRhDRoaLMp8iAkWZbxHr4zGeKAOGoZDnfhf57QkQIECAwCTwMb8iUkOEiCHmVuaf+yGrFJkocmhkGgrJoHF4e69xZA/vwWKsSkR4eItAUUJFbB9f+/F4BIches3jbVYwpspF+R1yv2x4IECAAAECBJ5doMSECAwZJnJOxRCVihwCKduRB44RMIY+AkXM7oyZEiV4nN3zR7AocykiJJwmbGaoeMsqRQaH1+l4CR1RpIjjuWTAGNdl5YEAAQIECBB4coEMEBEXIki0ZSplF9WDLqoWWcnoY9ZFnn8rqWOIcJEFjDELTLd9FiwiJJRwkZWK+ClDHxEq3nJoJPezSnFa5/DHqVKhXDFZWhEgQIAAgecXKNMcslIRf/PHSsUYMrpIERkyMk10ER/6yAcxKPLL6RBt+9s/D+V7KvKTIMeoTLy+xTo/FRKzNPvvU8iYQkWGjHEoJKdWREKJJyi54jKtPL+qOyBAgAABArUKRGWiFC3ioZsqFBkwXl7GORZZyTh8y4mcXdPF+nDomm8vXR57/ek3fxwrFpFJ3j/tcapa5JyKsn0WKnK/fMdFpolSsRjDRa327psAAQIECHw9gcgEGSpiLkWWJPJPfhn+iAkVp3GOLodC4pOhfawPMUySnxZtY95FLFOTKURkcMgBlfyUx+lTITn8UYZDMkhkyMh1HMslP3oaCWNa57aFAAECBAgQeGaBMsciQ0IGhvjJj5dmusjj+b1WuWTwiO/GynGQ8knRzA8lQ5yCRfma7tcxKJSwEB3kkEeMiJQwMW5PoSKGQ8Y2sc4sk2FjfB6PBAgQIECAwLML5FyHCA5jqWIMGKUOEX/sS7go2SCHQiJFxBdZ9BFC2jiWEzljmSoW2SiTR1YjMnVkWMifMlkzDpdOok2eL9s5NXTczl5Onw7JbQsBAgQIECDwxAL5lZrxNz7CRflerPwkSO6Xw3FbGSgyD3QlE2TAiE+H5Hb8xDIGi8gK0SoHNaZlChK5V6oVeSYvyIb9lVBROpiutSJAgAABAgSeVqAULPKjptPf9sgX8bc/9vNrNmMpqxwqKd++ncdiOCRPjO0/KhbjwXiME6ecUKoW2TiWfKJSrcjtqUGpVJy1Lw09ECBAgAABAk8rkB8pncJFjHBkVSFLFHE7WbWIb9zMzbaMWkxDIHE6z03LGCxOX9WdB8v//xHzLT4qFNG+dJhnx2pFbl2Eio8O85SFAAECBAgQeFKBPqoV7+GiDHxEuChzLiJURIjIzdOEitwc/9+wqWpxGgrJEzHmUVJIPmTQeM8S07lcfVQsziobfRmCydMWAgQIECBA4LkF4kusIgNM4SJTROaBfCifFsn5mKcKxvsUiTh0muw55Y68xEKAAAECBAgQeFSgFDQe7cT1BAgQIECAQK0Cl1Hicq9WE/dNgAABAgQIbCIgWGzCqBMCBAgQIEAgBQQL7wMCBAgQIEBgMwHBYjNKHREgQIAAAQKChfcAAQIECBAgMC+wIi2saDr/nM4SIECAAAECBAQL7wECBAgQIEBgMwHBYjNKHREgQIAAAQKChfcAAQIECBAgsJmAYLEZpY4IECBAgAABwcJ7gAABAgQIENhMQLDYjFJHBAgQIECAgGDhPUCAAAECBAhsJiBYbEapIwIECBAgQECw8B4gQIAAAQIENhMQLDaj1BEBAgQIEPiCAjeTQtte/l+mY8Obzb8gjVsiQIAAAQIEdhYQLHYG1j0BAgQIEPh6Arfjw+0zX0/BHREgQIAAAQI7CwgWOwPrngABAgQI1CQgWNT0artXAgQIECCwWOBzEeFzVy3+pTQkQIAAAQIEahIQLGp6td0rAQIECBDYWUCw2BlY9wQIECBAoCYBwaKmV9u9EiBAgACBnQUEi52BdU+AAAECBGoSECxqerXdKwECBAgQ2FlAsNgZWPcECBAgQKAmAcGiplfbvRIgQIAAgYcEhviPx+YXwWLex1kCBAgQIEBghYBgsQJLUwIECBAgQGBeQLCY93GWAAECBAgQWCEgWKzA0pQAAQIECBCYFxAs5n2cJUCAAAECBFYICBYrsDQlQIAAAQIE5gUEi3kfZwkQIECAAIElAtMHUQWLJVjaECBAgAABAosEBItFTBoRIECAAAECSwQEiyVK2hAgQIAAAQKLBASLRUwaESBAgAABAksEBIslStoQIECAAAEC1wWG48X/HyJYXGdylAABAgQIEPiEgGDxCTSXECBAgAABAtcFBIvrLo4SIECAAAECnxAQLD6B5hICBAgQIEDguoBgcd3FUQIECBAgQOATAoLFJ9BcQoAAAQIE6hJYHheWt6xL0N0SIECAAAECnxAQLD6B5hICBAgQIEDguoBgcd3FUQIECBAgUJ1Av8EdCxYbIOqCAAECBAjUIzAfHebP1qPkTgkQIECAAIENBASLDRB1QYAAAQIE6hbo3v+/EMGi7neCuydAgAABApsKCBabcuqMAAECBAjULSBY1P36u3sCBAgQILCpgGCxKafOCBAgQIBA3QKCRd2vv7snQIAAAQKbCggWm3LqjAABAgQI1C0gWNT9+rt7AgQIECCwqYBgsSmnzggQIECAwBcWWJAaFjT5wkBujQABAgQIENhUQLDYlFNnBAgQIECgbgHBou7X390TIECAAIFNBQSLTTl1RoAAAQIE6hYQLOp+/d09AQIECBDYVECw2JRTZwQIECBAoG4BwaLu19/dEyBAgACBTQUEi005dUaAAAECBOoWECzqfv3dPQECBAgQ2FRAsNiUU2cECBAgQKBuAcGi7tff3RMgQIAAgU0FBItNOXVGgAABAgTqFhAs6n793T0BAgQIENhUQLDYlFNnBAgQIECgVoExUggWtb7+7psAAQIECOwgIFjsgKpLAgQIECBQq4BgUesr774JECBAgMAOAoLFDqi6JECAAAECtQoIFrW+8u6bAAECBAjsICBY7ICqSwIECBAgUIXAlRRx5VAVFG6SAAECBAgQ2EFAsNgBVZcECBAgQKAegcsocblXj4I7JUCAAAECBHYQECx2QNUlAQIECBCoVUCwqPWVd98ECBAgQGAHAcFiB1RdEiBAgACBWgUEi1pfefdNgAABAgR2EBAsdkDVJQECBAgQqFVAsKj1lXffBAgQIEBgBwHBYgdUXRIgQIAAgVoFBItaX3n3TYAAAQIEVgvcjw33W6x+UhcQIECAAAECVQm0H3crWHxY2CJAgAABAgQeFBAsHgR0OQECBAgQqE+gO6tRXN69YHHpYY8AAQIECBB4QECweADPpQQIECBAgMClgGBx6WGPAAECBAgQeEBAsHgAz6UECBAgQIDApYBgcelhjwABAgQIEHhAQLB4AM+lBAgQIECAwKWAYHHpYY8AAQIECBB4QECweADPpQQIECBAoG6BH2PEj0fqFnL3BAgQIECAwAMCgsUDeC4lQIAAAQIELgUEi0sPewQIECBAgMADAoLFA3guJUCAAAECX1LggXTwwKVfktJNESBAgAABAlcFpshwJzncOX21ZwcJECBAgAABAlcFBIurLA4SIECAAAECswLd9Qhx/ehsT04SIECAAAECBK4LCBbXXRwlQIAAAQIEPiEgWHwCzSUECBAgQIDAdQHB4rqLowQIECBAgMAnBASLT6C5hAABAgQIELguIFhcd3GUAAECBAgQCIGhado1EILFGi1tCRAgQIAAgVkBwWKWx0kCBAgQIEBgjYBgsUZLWwIECBAgQGBWQLCY5XGSAAECBAgQWCMgWKzR0pYAAQIECBBompn0MHOKHAECBAgQIEBgnYBgsc5LawIECBAgQGBGQLCYwXGKAAECBAgQWCcgWKzz0poAAQIECBCYERAsZnCcIkCAAAECBNYJCBbrvLQmQIAAAQIEZgQEixkcpwgQIECAAIF1AoLFOi+tCRAgQIAAgRkBwWIGxykCBAgQIEBgnYBgsc5LawIECBAgUKPA4v86XbCo8e3hngkQIECAwE4CgsVOsLolQIAAAQL1CLRt0w2lqiFY1POqu1MCBAgQILC7gGCxO7EnIECAAAEC9QgIFvW81u6UAAECBAjsLiBY7E7sCQgQIECAQD0CgkU9r7U7JUCAAAECuwsIFrsTewICBAgQIFCPgGBRz2vtTgkQIECAwO4CgsXuxJ6AAAECBAjUIyBY1PNau1MCBAgQILC7gGCxO7EnIECAAAEC9QgIFvW81u6UAAECBAjsLiBY7E7sCQgQIECAwBcW+EWS+MXuF75xt0aAAAECBAh8XqBrFv3X6YLF54ldSYAAAQIEahf4IWwIFrW/Jdw/AQIECBDYUECw2BBTVwQIECBAoHYBwaL2d4D7J0CAAAECGwoIFhti6ooAAQIECNQuIFjU/g5w/wQIECBAYBOBMVIIFptg6oQAAQIECBBIAcHC+4AAAQIECBDYTECw2IxSRwQIECBAgIBg4T1AgAABAgQIbCYgWGxGqSMCBAgQIEBAsPAeIECAAAECBDYTECw2o9QRAQIECBAgIFh4DxAgQIAAAQKbCQgWm1HqiAABAgQIEBAsvAcIECBAgACBzQQEi80odUSAAAECBAgIFt4DBAgQIECAwHKBoW3nGgsWczrOESBAgACB6gXWRYV1ravHBUCAAAECBAjMCQgWczrOESBAgAABAncELodGBIs7XE4TIECAAAECywUEi+VWWhIgQIAAAQJ3BASLO0BOEyBAgACBugS62U993LMQLO4JOU+AAAECBAgsFhAsFlNpSIAAAQIECNwTECzuCTlPgAABAgQILBYQLBZTaUiAAAECBAjcExAs7gk5T4AAAQIECCwWECwWU2lIgAABAgQI3BMQLO4JOU+AAAECBAgsFhAsFlNpSIAAAQIECNwTECzuCTlPgAABAgQILBYQLBZTaUiAAAECBAicCVz9hk7B4kzIJgECBAgQIPCYgGDxmJ+rCRAgQIAAgTMBweIMwyYBAgQIECDwmIBg8ZifqwkQIECAAIEzAcHiDMMmAQIECBAg8JiAYPGYn6sJECBAgACBMwHB4gzDJgECBAgQIPCYgGDxmJ+rCRAgQIAAgTMBweIMwyYBAgQIECDwmIBg8ZifqwkQIECAAIEzAcHiDMMmAQIECBAgsEKg+zFG/HhkRX+aEiBAgAABAgTOBQSLcw3bBAgQIECAwHqBs8qFYLGezxUECBAgQIDADQHB4gaMwwQIECBAgMB6AcFivZkrCBAgQIAAgRsCgsUNGIcJECBAgACBWwK348PtM7f6cpwAAQIECBAgcENAsLgB4zABAgQIECCwXkCwWG/mCgIECBAgQOCGgGBxA8ZhAgQIECBAYL2AYLHezBUECBAgQIDADQHB4gaMwwQIECBAgMCcwPUIcf3oXD/OESBAgAABAgRuCAgWN2AcJkCAAAECBNYLCBbrzVxBgAABAgQI3BAQLG7AOEyAAAECBAisFxAs1pu5ggABAgQIELghIFjcgHGYAAECBAgQWC8gWKw3cwUBAgQIECBwQ0CwuAHjMAECBAgQILBeQLBYb+YKAgQIECBA4IaAYHEDxmECBAgQIEBgvYBgsd7MFQQIECBAgMANAcHiBozDBAgQIECAwCTQLY8Ly1vSJUCAAAECBAjcERAs7gA5TYAAAQIECCwXePloOrRNxoxjPAzTdtnPFrEfD00phfSx2bVNn/ux3Xdt3/RDtrIQIECAAAECzywQf99LySEeutzO9el+yvZ4Po+dH88m03DJGCwySDTdGA6G47TdTus4nBeX7NC3kSaaSBUZMi7CRfZpIUCAAAECBJ5YoISFeMi/8bFEAsgsMN5Ql1nhENu5HxlhKDlhOl0KEKXdVLGIRqWL7CgCRneMykVeG/vDcYjqRF44npt2mj4OnoeL0p0HAgQIECBA4HkFPkJF/I3Pv/Pj3/oSNHI772wMHeUex2JEZIg4UYJG04zBIhvmEEgJF+WisbM+0kU2zPN9nsyqRhdVi9JHBI6zcJGXWQgQIECAAIHnFZgqFRkoosqQBYUpGZQsMFYpStEigkEZ+sjsUNrF/njbHxWLLHEc88L4GaJR/nRxdRfDHsM0HFLmWpQhkxIuspcyLPL+xM9r6TcnQIAAAQLVC0Q4KIGihITMAbHRvWQ2iHVsZ2WiHCvn2hgRiROZHcqUisI3VSyiHHHMIZC4YIifHAYplYpyrG3eSmUiDuaYSF7yVioXuR8XTcdjZSFAgAABAgSeVyBzQCSFkgdyawwVuT9VKzJQHMbt8vc/2pdrcl2GNqahkJyM0caBkjzy4pjAWUJGJJCsWpQs8TZdnOEiOh3LGBEw4rrxF8lfwUKAAAECBAg8tUCGhJwcUUYx8m//mA9KyIi//2U/s0JkhMPpXAaSuKQ8/v2fOWWi+en//vO/m+Pr0LxGeeJ4jFJETKDovw+xnXMp4ifWb1GpaGNcJOdWZLEiKxiZM+JgPloIECBAgACBZxbIgkL+/lO4KEWGDBgxHPJSQkXUFg5d0/0UYSMaHb7lT/v9P/76p7yq/dvPp4pF9hEXDi9Dc4hOM4X0WbWIUkUGh/Iksc7KRYaKaNpE0/gOizg3Jos4YyFAgAABAgSeWiCrDiVUjFMick5FViVy+KNUKnIdIaPNAPJtOp6h4GPJqDAuOauzNIyhjwwXOcTxFpMtXk7hIjrPINHH8axeZM2jzS+3iPYZNiwECBAgQIDAcwucpjZkiMhlDBSxPg15RKjIOZiHCBjlZ9o+u+uzYBEns2oRuaFp84JSp4jhkAgX3U8RHt4iSMSQx0tM6BwDxviEOddCrjgjtUmAAAECBJ5UIOoH47BErDJkZKDIIJHFhxzFyAJECRQxBJJZoRyP82fLR7AoszyjCpFDHDmJM+ZqjuEig0RUJtpDhIpsHskjKxWHSBMlUMTDizkWZ6Y2CRAgQIDAcwqM38QdgSJ//SlY5DqPlxARASODRYaKnHOReSG3z5b3YDHEBW1WKY4RF9q3mIwRgWLIL7CI0NDG0EcX+/lV3hkmsnKRsz9fImyUJcscFgIECBAgQOC5BUqiiCBR/nuPsdBQhkdOQyERIg5TBSNDxWlI5Oym34NFnhxi1KOEi6xF5Nd6l8mZmSfi4j5CRgaN+C/HYg5GbGcvOcciV9MvUnY8ECBAgAABAk8p8P7nPCdo5h3E3/8MFhkicrpEGQ6Ztsu0icgO7WlixnjHbTN93HQOoHwUNSdolgpGrPP/IsvSxRgu8onHgDHXiXMECBAgQIDAr1wgP7yRQSJ/zVifvlEzgsX33//vH+/98pcfN51rXT6zmuEhnrD/lvMrYp0XxEMZFhl/hbkunCNAgAABAgSeQOCHeRblUx2Lf/G2/e2fVRsWc2lIgAABAgQIzAn8C5DdL0rYAs4xAAAAAElFTkSuQmCC"
  37310. /***/ }),
  37311. /***/ "e0f2":
  37312. /***/ (function(module, exports, __webpack_require__) {
  37313. "use strict";
  37314. Object.defineProperty(exports, "__esModule", {
  37315. value: true
  37316. });
  37317. exports.addListener = addListener;
  37318. exports.removeListener = removeListener;
  37319. var raf = null;
  37320. function requestAnimationFrame(callback) {
  37321. if (!raf) {
  37322. raf = (window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function (callback) {
  37323. return setTimeout(callback, 16);
  37324. }).bind(window);
  37325. }
  37326. return raf(callback);
  37327. }
  37328. var caf = null;
  37329. function cancelAnimationFrame(id) {
  37330. if (!caf) {
  37331. caf = (window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || function (id) {
  37332. clearTimeout(id);
  37333. }).bind(window);
  37334. }
  37335. caf(id);
  37336. }
  37337. function createStyles(styleText) {
  37338. var style = document.createElement('style');
  37339. style.type = 'text/css';
  37340. if (style.styleSheet) {
  37341. style.styleSheet.cssText = styleText;
  37342. } else {
  37343. style.appendChild(document.createTextNode(styleText));
  37344. }
  37345. (document.querySelector('head') || document.body).appendChild(style);
  37346. return style;
  37347. }
  37348. function createElement(tagName) {
  37349. var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  37350. var elem = document.createElement(tagName);
  37351. Object.keys(props).forEach(function (key) {
  37352. elem[key] = props[key];
  37353. });
  37354. return elem;
  37355. }
  37356. function getComputedStyle(elem, prop, pseudo) {
  37357. // for older versions of Firefox, `getComputedStyle` required
  37358. // the second argument and may return `null` for some elements
  37359. // when `display: none`
  37360. var computedStyle = window.getComputedStyle(elem, pseudo || null) || {
  37361. display: 'none'
  37362. };
  37363. return computedStyle[prop];
  37364. }
  37365. function getRenderInfo(elem) {
  37366. if (!document.documentElement.contains(elem)) {
  37367. return {
  37368. detached: true,
  37369. rendered: false
  37370. };
  37371. }
  37372. var current = elem;
  37373. while (current !== document) {
  37374. if (getComputedStyle(current, 'display') === 'none') {
  37375. return {
  37376. detached: false,
  37377. rendered: false
  37378. };
  37379. }
  37380. current = current.parentNode;
  37381. }
  37382. return {
  37383. detached: false,
  37384. rendered: true
  37385. };
  37386. }
  37387. 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%}";
  37388. var total = 0;
  37389. var style = null;
  37390. function addListener(elem, callback) {
  37391. if (!elem.__resize_mutation_handler__) {
  37392. elem.__resize_mutation_handler__ = handleMutation.bind(elem);
  37393. }
  37394. var listeners = elem.__resize_listeners__;
  37395. if (!listeners) {
  37396. elem.__resize_listeners__ = [];
  37397. if (window.ResizeObserver) {
  37398. var offsetWidth = elem.offsetWidth,
  37399. offsetHeight = elem.offsetHeight;
  37400. var ro = new ResizeObserver(function () {
  37401. if (!elem.__resize_observer_triggered__) {
  37402. elem.__resize_observer_triggered__ = true;
  37403. if (elem.offsetWidth === offsetWidth && elem.offsetHeight === offsetHeight) {
  37404. return;
  37405. }
  37406. }
  37407. runCallbacks(elem);
  37408. }); // initially display none won't trigger ResizeObserver callback
  37409. var _getRenderInfo = getRenderInfo(elem),
  37410. detached = _getRenderInfo.detached,
  37411. rendered = _getRenderInfo.rendered;
  37412. elem.__resize_observer_triggered__ = detached === false && rendered === false;
  37413. elem.__resize_observer__ = ro;
  37414. ro.observe(elem);
  37415. } else if (elem.attachEvent && elem.addEventListener) {
  37416. // targeting IE9/10
  37417. elem.__resize_legacy_resize_handler__ = function handleLegacyResize() {
  37418. runCallbacks(elem);
  37419. };
  37420. elem.attachEvent('onresize', elem.__resize_legacy_resize_handler__);
  37421. document.addEventListener('DOMSubtreeModified', elem.__resize_mutation_handler__);
  37422. } else {
  37423. if (!total) {
  37424. style = createStyles(css);
  37425. }
  37426. initTriggers(elem);
  37427. elem.__resize_rendered__ = getRenderInfo(elem).rendered;
  37428. if (window.MutationObserver) {
  37429. var mo = new MutationObserver(elem.__resize_mutation_handler__);
  37430. mo.observe(document, {
  37431. attributes: true,
  37432. childList: true,
  37433. characterData: true,
  37434. subtree: true
  37435. });
  37436. elem.__resize_mutation_observer__ = mo;
  37437. }
  37438. }
  37439. }
  37440. elem.__resize_listeners__.push(callback);
  37441. total++;
  37442. }
  37443. function removeListener(elem, callback) {
  37444. var listeners = elem.__resize_listeners__;
  37445. if (!listeners) {
  37446. return;
  37447. }
  37448. if (callback) {
  37449. listeners.splice(listeners.indexOf(callback), 1);
  37450. } // no listeners exist, or removing all listeners
  37451. if (!listeners.length || !callback) {
  37452. // targeting IE9/10
  37453. if (elem.detachEvent && elem.removeEventListener) {
  37454. elem.detachEvent('onresize', elem.__resize_legacy_resize_handler__);
  37455. document.removeEventListener('DOMSubtreeModified', elem.__resize_mutation_handler__);
  37456. return;
  37457. }
  37458. if (elem.__resize_observer__) {
  37459. elem.__resize_observer__.unobserve(elem);
  37460. elem.__resize_observer__.disconnect();
  37461. elem.__resize_observer__ = null;
  37462. } else {
  37463. if (elem.__resize_mutation_observer__) {
  37464. elem.__resize_mutation_observer__.disconnect();
  37465. elem.__resize_mutation_observer__ = null;
  37466. }
  37467. elem.removeEventListener('scroll', handleScroll);
  37468. elem.removeChild(elem.__resize_triggers__.triggers);
  37469. elem.__resize_triggers__ = null;
  37470. }
  37471. elem.__resize_listeners__ = null;
  37472. }
  37473. if (! --total && style) {
  37474. style.parentNode.removeChild(style);
  37475. }
  37476. }
  37477. function getUpdatedSize(elem) {
  37478. var _elem$__resize_last__ = elem.__resize_last__,
  37479. width = _elem$__resize_last__.width,
  37480. height = _elem$__resize_last__.height;
  37481. var offsetWidth = elem.offsetWidth,
  37482. offsetHeight = elem.offsetHeight;
  37483. if (offsetWidth !== width || offsetHeight !== height) {
  37484. return {
  37485. width: offsetWidth,
  37486. height: offsetHeight
  37487. };
  37488. }
  37489. return null;
  37490. }
  37491. function handleMutation() {
  37492. // `this` denotes the scrolling element
  37493. var _getRenderInfo2 = getRenderInfo(this),
  37494. rendered = _getRenderInfo2.rendered,
  37495. detached = _getRenderInfo2.detached;
  37496. if (rendered !== this.__resize_rendered__) {
  37497. if (!detached && this.__resize_triggers__) {
  37498. resetTriggers(this);
  37499. this.addEventListener('scroll', handleScroll, true);
  37500. }
  37501. this.__resize_rendered__ = rendered;
  37502. runCallbacks(this);
  37503. }
  37504. }
  37505. function handleScroll() {
  37506. var _this = this;
  37507. // `this` denotes the scrolling element
  37508. resetTriggers(this);
  37509. if (this.__resize_raf__) {
  37510. cancelAnimationFrame(this.__resize_raf__);
  37511. }
  37512. this.__resize_raf__ = requestAnimationFrame(function () {
  37513. var updated = getUpdatedSize(_this);
  37514. if (updated) {
  37515. _this.__resize_last__ = updated;
  37516. runCallbacks(_this);
  37517. }
  37518. });
  37519. }
  37520. function runCallbacks(elem) {
  37521. if (!elem || !elem.__resize_listeners__) {
  37522. return;
  37523. }
  37524. elem.__resize_listeners__.forEach(function (callback) {
  37525. callback.call(elem);
  37526. });
  37527. }
  37528. function initTriggers(elem) {
  37529. var position = getComputedStyle(elem, 'position');
  37530. if (!position || position === 'static') {
  37531. elem.style.position = 'relative';
  37532. }
  37533. elem.__resize_old_position__ = position;
  37534. elem.__resize_last__ = {};
  37535. var triggers = createElement('div', {
  37536. className: 'resize-triggers'
  37537. });
  37538. var expand = createElement('div', {
  37539. className: 'resize-expand-trigger'
  37540. });
  37541. var expandChild = createElement('div');
  37542. var contract = createElement('div', {
  37543. className: 'resize-contract-trigger'
  37544. });
  37545. expand.appendChild(expandChild);
  37546. triggers.appendChild(expand);
  37547. triggers.appendChild(contract);
  37548. elem.appendChild(triggers);
  37549. elem.__resize_triggers__ = {
  37550. triggers: triggers,
  37551. expand: expand,
  37552. expandChild: expandChild,
  37553. contract: contract
  37554. };
  37555. resetTriggers(elem);
  37556. elem.addEventListener('scroll', handleScroll, true);
  37557. elem.__resize_last__ = {
  37558. width: elem.offsetWidth,
  37559. height: elem.offsetHeight
  37560. };
  37561. }
  37562. function resetTriggers(elem) {
  37563. var _elem$__resize_trigge = elem.__resize_triggers__,
  37564. expand = _elem$__resize_trigge.expand,
  37565. expandChild = _elem$__resize_trigge.expandChild,
  37566. contract = _elem$__resize_trigge.contract; // batch read
  37567. var csw = contract.scrollWidth,
  37568. csh = contract.scrollHeight;
  37569. var eow = expand.offsetWidth,
  37570. eoh = expand.offsetHeight,
  37571. esw = expand.scrollWidth,
  37572. esh = expand.scrollHeight; // batch write
  37573. contract.scrollLeft = csw;
  37574. contract.scrollTop = csh;
  37575. expandChild.style.width = eow + 1 + 'px';
  37576. expandChild.style.height = eoh + 1 + 'px';
  37577. expand.scrollLeft = esw;
  37578. expand.scrollTop = esh;
  37579. }
  37580. /***/ }),
  37581. /***/ "e1d3":
  37582. /***/ (function(module, exports) {
  37583. function _setPrototypeOf(o, p) {
  37584. module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  37585. o.__proto__ = p;
  37586. return o;
  37587. };
  37588. return _setPrototypeOf(o, p);
  37589. }
  37590. module.exports = _setPrototypeOf;
  37591. /***/ }),
  37592. /***/ "e22c":
  37593. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  37594. "use strict";
  37595. __webpack_require__.r(__webpack_exports__);
  37596. // EXTERNAL MODULE: external {"root":"Vue","commonjs":"vue","commonjs2":"vue","amd":"vue"}
  37597. var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_ = __webpack_require__("5643");
  37598. var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_default = /*#__PURE__*/__webpack_require__.n(external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_);
  37599. // CONCATENATED MODULE: ./node_modules/vue-class-component/dist/vue-class-component.esm.js
  37600. /**
  37601. * vue-class-component v7.1.0
  37602. * (c) 2015-present Evan You
  37603. * @license MIT
  37604. */
  37605. // The rational behind the verbose Reflect-feature check below is the fact that there are polyfills
  37606. // which add an implementation for Reflect.defineMetadata but not for Reflect.getOwnMetadataKeys.
  37607. // Without this check consumers will encounter hard to track down runtime errors.
  37608. var reflectionIsSupported = typeof Reflect !== 'undefined' && Reflect.defineMetadata && Reflect.getOwnMetadataKeys;
  37609. function copyReflectionMetadata(to, from) {
  37610. forwardMetadata(to, from);
  37611. Object.getOwnPropertyNames(from.prototype).forEach(function (key) {
  37612. forwardMetadata(to.prototype, from.prototype, key);
  37613. });
  37614. Object.getOwnPropertyNames(from).forEach(function (key) {
  37615. forwardMetadata(to, from, key);
  37616. });
  37617. }
  37618. function forwardMetadata(to, from, propertyKey) {
  37619. var metaKeys = propertyKey
  37620. ? Reflect.getOwnMetadataKeys(from, propertyKey)
  37621. : Reflect.getOwnMetadataKeys(from);
  37622. metaKeys.forEach(function (metaKey) {
  37623. var metadata = propertyKey
  37624. ? Reflect.getOwnMetadata(metaKey, from, propertyKey)
  37625. : Reflect.getOwnMetadata(metaKey, from);
  37626. if (propertyKey) {
  37627. Reflect.defineMetadata(metaKey, metadata, to, propertyKey);
  37628. }
  37629. else {
  37630. Reflect.defineMetadata(metaKey, metadata, to);
  37631. }
  37632. });
  37633. }
  37634. var fakeArray = { __proto__: [] };
  37635. var hasProto = fakeArray instanceof Array;
  37636. function createDecorator(factory) {
  37637. return function (target, key, index) {
  37638. var Ctor = typeof target === 'function'
  37639. ? target
  37640. : target.constructor;
  37641. if (!Ctor.__decorators__) {
  37642. Ctor.__decorators__ = [];
  37643. }
  37644. if (typeof index !== 'number') {
  37645. index = undefined;
  37646. }
  37647. Ctor.__decorators__.push(function (options) { return factory(options, key, index); });
  37648. };
  37649. }
  37650. function mixins() {
  37651. var Ctors = [];
  37652. for (var _i = 0; _i < arguments.length; _i++) {
  37653. Ctors[_i] = arguments[_i];
  37654. }
  37655. return external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_default.a.extend({ mixins: Ctors });
  37656. }
  37657. function isPrimitive(value) {
  37658. var type = typeof value;
  37659. return value == null || (type !== 'object' && type !== 'function');
  37660. }
  37661. function warn(message) {
  37662. if (typeof console !== 'undefined') {
  37663. console.warn('[vue-class-component] ' + message);
  37664. }
  37665. }
  37666. function collectDataFromConstructor(vm, Component) {
  37667. // override _init to prevent to init as Vue instance
  37668. var originalInit = Component.prototype._init;
  37669. Component.prototype._init = function () {
  37670. var _this = this;
  37671. // proxy to actual vm
  37672. var keys = Object.getOwnPropertyNames(vm);
  37673. // 2.2.0 compat (props are no longer exposed as self properties)
  37674. if (vm.$options.props) {
  37675. for (var key in vm.$options.props) {
  37676. if (!vm.hasOwnProperty(key)) {
  37677. keys.push(key);
  37678. }
  37679. }
  37680. }
  37681. keys.forEach(function (key) {
  37682. if (key.charAt(0) !== '_') {
  37683. Object.defineProperty(_this, key, {
  37684. get: function () { return vm[key]; },
  37685. set: function (value) { vm[key] = value; },
  37686. configurable: true
  37687. });
  37688. }
  37689. });
  37690. };
  37691. // should be acquired class property values
  37692. var data = new Component();
  37693. // restore original _init to avoid memory leak (#209)
  37694. Component.prototype._init = originalInit;
  37695. // create plain data object
  37696. var plainData = {};
  37697. Object.keys(data).forEach(function (key) {
  37698. if (data[key] !== undefined) {
  37699. plainData[key] = data[key];
  37700. }
  37701. });
  37702. if (false) {}
  37703. return plainData;
  37704. }
  37705. var $internalHooks = [
  37706. 'data',
  37707. 'beforeCreate',
  37708. 'created',
  37709. 'beforeMount',
  37710. 'mounted',
  37711. 'beforeDestroy',
  37712. 'destroyed',
  37713. 'beforeUpdate',
  37714. 'updated',
  37715. 'activated',
  37716. 'deactivated',
  37717. 'render',
  37718. 'errorCaptured',
  37719. 'serverPrefetch' // 2.6
  37720. ];
  37721. function componentFactory(Component, options) {
  37722. if (options === void 0) { options = {}; }
  37723. options.name = options.name || Component._componentTag || Component.name;
  37724. // prototype props.
  37725. var proto = Component.prototype;
  37726. Object.getOwnPropertyNames(proto).forEach(function (key) {
  37727. if (key === 'constructor') {
  37728. return;
  37729. }
  37730. // hooks
  37731. if ($internalHooks.indexOf(key) > -1) {
  37732. options[key] = proto[key];
  37733. return;
  37734. }
  37735. var descriptor = Object.getOwnPropertyDescriptor(proto, key);
  37736. if (descriptor.value !== void 0) {
  37737. // methods
  37738. if (typeof descriptor.value === 'function') {
  37739. (options.methods || (options.methods = {}))[key] = descriptor.value;
  37740. }
  37741. else {
  37742. // typescript decorated data
  37743. (options.mixins || (options.mixins = [])).push({
  37744. data: function () {
  37745. var _a;
  37746. return _a = {}, _a[key] = descriptor.value, _a;
  37747. }
  37748. });
  37749. }
  37750. }
  37751. else if (descriptor.get || descriptor.set) {
  37752. // computed properties
  37753. (options.computed || (options.computed = {}))[key] = {
  37754. get: descriptor.get,
  37755. set: descriptor.set
  37756. };
  37757. }
  37758. });
  37759. (options.mixins || (options.mixins = [])).push({
  37760. data: function () {
  37761. return collectDataFromConstructor(this, Component);
  37762. }
  37763. });
  37764. // decorate options
  37765. var decorators = Component.__decorators__;
  37766. if (decorators) {
  37767. decorators.forEach(function (fn) { return fn(options); });
  37768. delete Component.__decorators__;
  37769. }
  37770. // find super
  37771. var superProto = Object.getPrototypeOf(Component.prototype);
  37772. var Super = superProto instanceof external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_default.a
  37773. ? superProto.constructor
  37774. : external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_default.a;
  37775. var Extended = Super.extend(options);
  37776. forwardStaticMembers(Extended, Component, Super);
  37777. if (reflectionIsSupported) {
  37778. copyReflectionMetadata(Extended, Component);
  37779. }
  37780. return Extended;
  37781. }
  37782. var reservedPropertyNames = [
  37783. // Unique id
  37784. 'cid',
  37785. // Super Vue constructor
  37786. 'super',
  37787. // Component options that will be used by the component
  37788. 'options',
  37789. 'superOptions',
  37790. 'extendOptions',
  37791. 'sealedOptions',
  37792. // Private assets
  37793. 'component',
  37794. 'directive',
  37795. 'filter'
  37796. ];
  37797. var shouldIgnore = {
  37798. prototype: true,
  37799. arguments: true,
  37800. callee: true,
  37801. caller: true
  37802. };
  37803. function forwardStaticMembers(Extended, Original, Super) {
  37804. // We have to use getOwnPropertyNames since Babel registers methods as non-enumerable
  37805. Object.getOwnPropertyNames(Original).forEach(function (key) {
  37806. // Skip the properties that should not be overwritten
  37807. if (shouldIgnore[key]) {
  37808. return;
  37809. }
  37810. // Some browsers does not allow reconfigure built-in properties
  37811. var extendedDescriptor = Object.getOwnPropertyDescriptor(Extended, key);
  37812. if (extendedDescriptor && !extendedDescriptor.configurable) {
  37813. return;
  37814. }
  37815. var descriptor = Object.getOwnPropertyDescriptor(Original, key);
  37816. // If the user agent does not support `__proto__` or its family (IE <= 10),
  37817. // the sub class properties may be inherited properties from the super class in TypeScript.
  37818. // We need to exclude such properties to prevent to overwrite
  37819. // the component options object which stored on the extended constructor (See #192).
  37820. // If the value is a referenced value (object or function),
  37821. // we can check equality of them and exclude it if they have the same reference.
  37822. // If it is a primitive value, it will be forwarded for safety.
  37823. if (!hasProto) {
  37824. // Only `cid` is explicitly exluded from property forwarding
  37825. // because we cannot detect whether it is a inherited property or not
  37826. // on the no `__proto__` environment even though the property is reserved.
  37827. if (key === 'cid') {
  37828. return;
  37829. }
  37830. var superDescriptor = Object.getOwnPropertyDescriptor(Super, key);
  37831. if (!isPrimitive(descriptor.value) &&
  37832. superDescriptor &&
  37833. superDescriptor.value === descriptor.value) {
  37834. return;
  37835. }
  37836. }
  37837. // Warn if the users manually declare reserved properties
  37838. if (false) {}
  37839. Object.defineProperty(Extended, key, descriptor);
  37840. });
  37841. }
  37842. function vue_class_component_esm_Component(options) {
  37843. if (typeof options === 'function') {
  37844. return componentFactory(options);
  37845. }
  37846. return function (Component) {
  37847. return componentFactory(Component, options);
  37848. };
  37849. }
  37850. vue_class_component_esm_Component.registerHooks = function registerHooks(keys) {
  37851. $internalHooks.push.apply($internalHooks, keys);
  37852. };
  37853. /* harmony default export */ var vue_class_component_esm = (vue_class_component_esm_Component);
  37854. // CONCATENATED MODULE: ./node_modules/vue-property-decorator/lib/vue-property-decorator.js
  37855. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Inject", function() { return Inject; });
  37856. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InjectReactive", function() { return InjectReactive; });
  37857. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Provide", function() { return Provide; });
  37858. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProvideReactive", function() { return ProvideReactive; });
  37859. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Model", function() { return Model; });
  37860. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Prop", function() { return Prop; });
  37861. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PropSync", function() { return PropSync; });
  37862. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Watch", function() { return Watch; });
  37863. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Emit", function() { return Emit; });
  37864. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ref", function() { return Ref; });
  37865. /* concated harmony reexport Component */__webpack_require__.d(__webpack_exports__, "Component", function() { return vue_class_component_esm; });
  37866. /* concated harmony reexport Vue */__webpack_require__.d(__webpack_exports__, "Vue", function() { return external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_default.a; });
  37867. /* concated harmony reexport Mixins */__webpack_require__.d(__webpack_exports__, "Mixins", function() { return mixins; });
  37868. /** vue-property-decorator verson 8.2.2 MIT LICENSE copyright 2019 kaorun343 */
  37869. /// <reference types='reflect-metadata'/>
  37870. /** Used for keying reactive provide/inject properties */
  37871. var reactiveInjectKey = '__reactiveInject__';
  37872. /**
  37873. * decorator of an inject
  37874. * @param from key
  37875. * @return PropertyDecorator
  37876. */
  37877. function Inject(options) {
  37878. return createDecorator(function (componentOptions, key) {
  37879. if (typeof componentOptions.inject === 'undefined') {
  37880. componentOptions.inject = {};
  37881. }
  37882. if (!Array.isArray(componentOptions.inject)) {
  37883. componentOptions.inject[key] = options || key;
  37884. }
  37885. });
  37886. }
  37887. /**
  37888. * decorator of a reactive inject
  37889. * @param from key
  37890. * @return PropertyDecorator
  37891. */
  37892. function InjectReactive(options) {
  37893. return createDecorator(function (componentOptions, key) {
  37894. if (typeof componentOptions.inject === 'undefined') {
  37895. componentOptions.inject = {};
  37896. }
  37897. if (!Array.isArray(componentOptions.inject)) {
  37898. var fromKey_1 = !!options ? options.from || options : key;
  37899. var defaultVal_1 = (!!options && options.default) || undefined;
  37900. if (!componentOptions.computed)
  37901. componentOptions.computed = {};
  37902. componentOptions.computed[key] = function () {
  37903. var obj = this[reactiveInjectKey];
  37904. return obj ? obj[fromKey_1] : defaultVal_1;
  37905. };
  37906. componentOptions.inject[reactiveInjectKey] = reactiveInjectKey;
  37907. }
  37908. });
  37909. }
  37910. /**
  37911. * decorator of a provide
  37912. * @param key key
  37913. * @return PropertyDecorator | void
  37914. */
  37915. function Provide(key) {
  37916. return createDecorator(function (componentOptions, k) {
  37917. var provide = componentOptions.provide;
  37918. if (typeof provide !== 'function' || !provide.managed) {
  37919. var original_1 = componentOptions.provide;
  37920. provide = componentOptions.provide = function () {
  37921. var rv = Object.create((typeof original_1 === 'function' ? original_1.call(this) : original_1) ||
  37922. null);
  37923. for (var i in provide.managed)
  37924. rv[provide.managed[i]] = this[i];
  37925. return rv;
  37926. };
  37927. provide.managed = {};
  37928. }
  37929. provide.managed[k] = key || k;
  37930. });
  37931. }
  37932. /**
  37933. * decorator of a reactive provide
  37934. * @param key key
  37935. * @return PropertyDecorator | void
  37936. */
  37937. function ProvideReactive(key) {
  37938. return createDecorator(function (componentOptions, k) {
  37939. var provide = componentOptions.provide;
  37940. // inject parent reactive services (if any)
  37941. if (!Array.isArray(componentOptions.inject)) {
  37942. componentOptions.inject = componentOptions.inject || {};
  37943. componentOptions.inject[reactiveInjectKey] = { from: reactiveInjectKey, default: {} };
  37944. }
  37945. if (typeof provide !== 'function' || !provide.managedReactive) {
  37946. var original_2 = componentOptions.provide;
  37947. provide = componentOptions.provide = function () {
  37948. var _this = this;
  37949. var rv = typeof original_2 === 'function'
  37950. ? original_2.call(this)
  37951. : original_2;
  37952. rv = Object.create(rv || null);
  37953. // set reactive services (propagates previous services if necessary)
  37954. rv[reactiveInjectKey] = this[reactiveInjectKey] || {};
  37955. var _loop_1 = function (i) {
  37956. rv[provide.managedReactive[i]] = this_1[i]; // Duplicates the behavior of `@Provide`
  37957. Object.defineProperty(rv[reactiveInjectKey], provide.managedReactive[i], {
  37958. enumerable: true,
  37959. get: function () { return _this[i]; },
  37960. });
  37961. };
  37962. var this_1 = this;
  37963. for (var i in provide.managedReactive) {
  37964. _loop_1(i);
  37965. }
  37966. return rv;
  37967. };
  37968. provide.managedReactive = {};
  37969. }
  37970. provide.managedReactive[k] = key || k;
  37971. });
  37972. }
  37973. /** @see {@link https://github.com/vuejs/vue-class-component/blob/master/src/reflect.ts} */
  37974. var reflectMetadataIsSupported = typeof Reflect !== 'undefined' && typeof Reflect.getMetadata !== 'undefined';
  37975. function applyMetadata(options, target, key) {
  37976. if (reflectMetadataIsSupported) {
  37977. if (!Array.isArray(options) &&
  37978. typeof options !== 'function' &&
  37979. typeof options.type === 'undefined') {
  37980. options.type = Reflect.getMetadata('design:type', target, key);
  37981. }
  37982. }
  37983. }
  37984. /**
  37985. * decorator of model
  37986. * @param event event name
  37987. * @param options options
  37988. * @return PropertyDecorator
  37989. */
  37990. function Model(event, options) {
  37991. if (options === void 0) { options = {}; }
  37992. return function (target, key) {
  37993. applyMetadata(options, target, key);
  37994. createDecorator(function (componentOptions, k) {
  37995. ;
  37996. (componentOptions.props || (componentOptions.props = {}))[k] = options;
  37997. componentOptions.model = { prop: k, event: event || k };
  37998. })(target, key);
  37999. };
  38000. }
  38001. /**
  38002. * decorator of a prop
  38003. * @param options the options for the prop
  38004. * @return PropertyDecorator | void
  38005. */
  38006. function Prop(options) {
  38007. if (options === void 0) { options = {}; }
  38008. return function (target, key) {
  38009. applyMetadata(options, target, key);
  38010. createDecorator(function (componentOptions, k) {
  38011. ;
  38012. (componentOptions.props || (componentOptions.props = {}))[k] = options;
  38013. })(target, key);
  38014. };
  38015. }
  38016. /**
  38017. * decorator of a synced prop
  38018. * @param propName the name to interface with from outside, must be different from decorated property
  38019. * @param options the options for the synced prop
  38020. * @return PropertyDecorator | void
  38021. */
  38022. function PropSync(propName, options) {
  38023. if (options === void 0) { options = {}; }
  38024. // @ts-ignore
  38025. return function (target, key) {
  38026. applyMetadata(options, target, key);
  38027. createDecorator(function (componentOptions, k) {
  38028. ;
  38029. (componentOptions.props || (componentOptions.props = {}))[propName] = options;
  38030. (componentOptions.computed || (componentOptions.computed = {}))[k] = {
  38031. get: function () {
  38032. return this[propName];
  38033. },
  38034. set: function (value) {
  38035. // @ts-ignore
  38036. this.$emit("update:" + propName, value);
  38037. },
  38038. };
  38039. })(target, key);
  38040. };
  38041. }
  38042. /**
  38043. * decorator of a watch function
  38044. * @param path the path or the expression to observe
  38045. * @param WatchOption
  38046. * @return MethodDecorator
  38047. */
  38048. function Watch(path, options) {
  38049. if (options === void 0) { options = {}; }
  38050. var _a = options.deep, deep = _a === void 0 ? false : _a, _b = options.immediate, immediate = _b === void 0 ? false : _b;
  38051. return createDecorator(function (componentOptions, handler) {
  38052. if (typeof componentOptions.watch !== 'object') {
  38053. componentOptions.watch = Object.create(null);
  38054. }
  38055. var watch = componentOptions.watch;
  38056. if (typeof watch[path] === 'object' && !Array.isArray(watch[path])) {
  38057. watch[path] = [watch[path]];
  38058. }
  38059. else if (typeof watch[path] === 'undefined') {
  38060. watch[path] = [];
  38061. }
  38062. watch[path].push({ handler: handler, deep: deep, immediate: immediate });
  38063. });
  38064. }
  38065. // Code copied from Vue/src/shared/util.js
  38066. var hyphenateRE = /\B([A-Z])/g;
  38067. var hyphenate = function (str) { return str.replace(hyphenateRE, '-$1').toLowerCase(); };
  38068. /**
  38069. * decorator of an event-emitter function
  38070. * @param event The name of the event
  38071. * @return MethodDecorator
  38072. */
  38073. function Emit(event) {
  38074. return function (_target, key, descriptor) {
  38075. key = hyphenate(key);
  38076. var original = descriptor.value;
  38077. descriptor.value = function emitter() {
  38078. var _this = this;
  38079. var args = [];
  38080. for (var _i = 0; _i < arguments.length; _i++) {
  38081. args[_i] = arguments[_i];
  38082. }
  38083. var emit = function (returnValue) {
  38084. if (returnValue !== undefined)
  38085. args.unshift(returnValue);
  38086. _this.$emit.apply(_this, [event || key].concat(args));
  38087. };
  38088. var returnValue = original.apply(this, args);
  38089. if (isPromise(returnValue)) {
  38090. returnValue.then(function (returnValue) {
  38091. emit(returnValue);
  38092. });
  38093. }
  38094. else {
  38095. emit(returnValue);
  38096. }
  38097. return returnValue;
  38098. };
  38099. };
  38100. }
  38101. /**
  38102. * decorator of a ref prop
  38103. * @param refKey the ref key defined in template
  38104. */
  38105. function Ref(refKey) {
  38106. return createDecorator(function (options, key) {
  38107. options.computed = options.computed || {};
  38108. options.computed[key] = {
  38109. cache: false,
  38110. get: function () {
  38111. return this.$refs[refKey || key];
  38112. },
  38113. };
  38114. });
  38115. }
  38116. function isPromise(obj) {
  38117. return obj instanceof Promise || (obj && typeof obj.then === 'function');
  38118. }
  38119. /***/ }),
  38120. /***/ "e340":
  38121. /***/ (function(module, exports, __webpack_require__) {
  38122. "use strict";
  38123. var _interopRequireDefault = __webpack_require__("8e6d");
  38124. Object.defineProperty(exports, "__esModule", {
  38125. value: true
  38126. });
  38127. exports._getValueOfEpsgCode = _getValueOfEpsgCode;
  38128. exports.vertifyEpsgCode = vertifyEpsgCode;
  38129. exports.transformFeatures = transformFeatures;
  38130. exports.getServerEpsgCode = getServerEpsgCode;
  38131. exports.checkAndRectifyFeatures = checkAndRectifyFeatures;
  38132. exports.default = void 0;
  38133. var _regenerator = _interopRequireDefault(__webpack_require__("849c"));
  38134. var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
  38135. var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
  38136. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
  38137. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
  38138. var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
  38139. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("1d96"));
  38140. var _Events2 = __webpack_require__("e3e2");
  38141. var _epsgDefine = __webpack_require__("1a91");
  38142. var _proj = _interopRequireDefault(__webpack_require__("7319"));
  38143. var _util = __webpack_require__("1448");
  38144. var _statistics = __webpack_require__("9dde");
  38145. var _lodash = _interopRequireDefault(__webpack_require__("25a2"));
  38146. function _getValueOfEpsgCode(epsgCode) {
  38147. var defName = "EPSG:".concat(epsgCode);
  38148. var defValue = (0, _epsgDefine.getProjection)(defName);
  38149. if (!defValue) {
  38150. console.error("".concat(defName, " not define"));
  38151. } else {
  38152. !_proj.default.defs(defName) && _proj.default.defs(defName, defValue);
  38153. }
  38154. return {
  38155. name: defName,
  38156. value: defValue
  38157. };
  38158. }
  38159. function _transformCoordinates(coordinates, projName) {
  38160. if (coordinates[0] instanceof Array) {
  38161. coordinates.forEach(function (item, index) {
  38162. if (item instanceof Array) {
  38163. coordinates[index] = _transformCoordinates(item, projName);
  38164. }
  38165. });
  38166. } else if (coordinates.length > 0) {
  38167. return projName !== 'EPSG:4326' ? (0, _proj.default)(projName, 'EPSG:4326', coordinates) : coordinates;
  38168. }
  38169. return coordinates;
  38170. }
  38171. function vertifyEpsgCode(firstFeature) {
  38172. var epsgCode = 4326;
  38173. var firstCoord = (firstFeature.geometry || {}).coordinates || [];
  38174. if (firstCoord[0] instanceof Array) {
  38175. if (firstCoord[0][0] instanceof Array) {
  38176. // type: Polygon
  38177. firstCoord = firstCoord[0][0];
  38178. if (firstCoord[0] instanceof Array) {
  38179. // type: MultiPolygon
  38180. firstCoord = firstCoord[0];
  38181. }
  38182. } else {
  38183. // type: LineString
  38184. firstCoord = firstCoord[0];
  38185. }
  38186. } // 以防经纬度交换,判断错误的问题,都改成180
  38187. var acceptRange = firstCoord[0] > -180 && firstCoord[0] < 180 && firstCoord[1] > -180 && firstCoord[1] < 180;
  38188. if (!acceptRange) {
  38189. epsgCode = 3857;
  38190. }
  38191. return epsgCode;
  38192. }
  38193. function transformFeatures(epsgCode, features) {
  38194. var projName = _getValueOfEpsgCode(epsgCode).name;
  38195. var transformedFeatures = features.map(function (feature) {
  38196. if (_proj.default.defs(projName) && feature.geometry && feature.geometry.coordinates) {
  38197. var coordinates = feature.geometry.coordinates;
  38198. feature.geometry.coordinates = _transformCoordinates(coordinates, projName);
  38199. }
  38200. return feature;
  38201. });
  38202. return transformedFeatures;
  38203. } // 获取iServer restdata restmap 的 epsgcode
  38204. function getServerEpsgCode(projectionUrl, options) {
  38205. if (!projectionUrl) {
  38206. return;
  38207. }
  38208. return SuperMap.FetchRequest.get(projectionUrl, null, options).then(function (response) {
  38209. return response.json();
  38210. }).then(function (results) {
  38211. var epsgCode = results.epsgCode;
  38212. if (results.datasetInfo) {
  38213. var prjCoordSys = results.datasetInfo.prjCoordSys;
  38214. epsgCode = prjCoordSys ? prjCoordSys.epsgCode : null;
  38215. }
  38216. return epsgCode;
  38217. }).catch(function (error) {
  38218. console.log(error);
  38219. });
  38220. } // 关系型存储发布成服务后坐标一定是4326,但真实数据可能不是4326,判断一下暂时按照3857处理
  38221. function checkAndRectifyFeatures(_x) {
  38222. return _checkAndRectifyFeatures.apply(this, arguments);
  38223. }
  38224. /**
  38225. * @class iServerRestService
  38226. * @classdesc iServer 数据请求类。
  38227. * @category BaseTypes Util
  38228. * @param {string} url - iServer 数据服务或地图服务地址。
  38229. * @fires iServerRestService#getdatasucceeded
  38230. * @fires iServerRestService#getdatafailed
  38231. * @fires iServerRestService#featureisempty
  38232. */
  38233. function _checkAndRectifyFeatures() {
  38234. _checkAndRectifyFeatures = (0, _asyncToGenerator2.default)(
  38235. /*#__PURE__*/
  38236. _regenerator.default.mark(function _callee2(_ref) {
  38237. var features, epsgCode, projectionUrl, options, currentEpsgCode, copyFeatures, epsgValue, vertifyCode;
  38238. return _regenerator.default.wrap(function _callee2$(_context2) {
  38239. while (1) {
  38240. switch (_context2.prev = _context2.next) {
  38241. case 0:
  38242. features = _ref.features, epsgCode = _ref.epsgCode, projectionUrl = _ref.projectionUrl, options = _ref.options;
  38243. currentEpsgCode = epsgCode;
  38244. copyFeatures = features;
  38245. if (epsgCode) {
  38246. _context2.next = 7;
  38247. break;
  38248. }
  38249. _context2.next = 6;
  38250. return getServerEpsgCode(projectionUrl, options);
  38251. case 6:
  38252. currentEpsgCode = _context2.sent;
  38253. case 7:
  38254. epsgValue = (0, _epsgDefine.getProjection)("EPSG:".concat(currentEpsgCode));
  38255. if (epsgValue === void 0) {
  38256. currentEpsgCode = 4326;
  38257. }
  38258. if (currentEpsgCode && features && !!features.length) {
  38259. if (currentEpsgCode === 4326) {
  38260. vertifyCode = vertifyEpsgCode(features[0]);
  38261. currentEpsgCode = vertifyCode;
  38262. }
  38263. copyFeatures = transformFeatures(currentEpsgCode, (0, _lodash.default)(features));
  38264. }
  38265. return _context2.abrupt("return", copyFeatures);
  38266. case 11:
  38267. case "end":
  38268. return _context2.stop();
  38269. }
  38270. }
  38271. }, _callee2);
  38272. }));
  38273. return _checkAndRectifyFeatures.apply(this, arguments);
  38274. }
  38275. var iServerRestService =
  38276. /*#__PURE__*/
  38277. function (_Events) {
  38278. (0, _inherits2.default)(iServerRestService, _Events);
  38279. function iServerRestService(url, options) {
  38280. var _this;
  38281. (0, _classCallCheck2.default)(this, iServerRestService);
  38282. _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(iServerRestService).call(this));
  38283. _this.url = url;
  38284. _this.options = options || {};
  38285. _this.eventTypes = ['getdatasucceeded', 'getdatafailed', 'featureisempty'];
  38286. return _this;
  38287. }
  38288. (0, _createClass2.default)(iServerRestService, [{
  38289. key: "getData",
  38290. value: function getData(datasetInfo, queryInfo) {
  38291. if (!this._checkUrl(this.url)) {
  38292. return null;
  38293. }
  38294. this._getDatasetInfoSucceed(datasetInfo, queryInfo);
  38295. }
  38296. /**
  38297. * @function iServerRestService.prototype.getData
  38298. * @description 请求数据。
  38299. * @param {Object} queryInfo - 可选参数。
  38300. * @param {Object} [queryInfo.maxFeatures] - 最多可返回的要素数量。
  38301. * @param {Object} [queryInfo.attributeFilter] - 属性过滤条件。
  38302. * @param {Object} [queryInfo.keyWord] - 筛选关键字。
  38303. */
  38304. }, {
  38305. key: "_getDatasetInfoSucceed",
  38306. value: function _getDatasetInfoSucceed(datasetInfo, queryInfo) {
  38307. datasetInfo.dataUrl = this.url; // 判断服务为地图服务 或者 数据服务
  38308. this.url.indexOf('/rest/maps') > -1 && this.getMapFeatures(datasetInfo, queryInfo);
  38309. this.url.indexOf('/rest/data') > -1 && this.getDataFeatures(datasetInfo, queryInfo);
  38310. }
  38311. /**
  38312. * @function iServerRestService.prototype.getMapFeatures
  38313. * @description 请求地图服务数据。
  38314. * @param {Object} datasetInfo - 数据集参数。
  38315. * @param {Object} datasetInfo.dataUrl - 地图服务地址。
  38316. * @param {Object} datasetInfo.mapName - 图层名。
  38317. * @param {Object} queryInfo - 可选参数。
  38318. * @param {Object} [queryInfo.maxFeatures] - 最多可返回的要素数量。
  38319. * @param {Object} [queryInfo.attributeFilter] - 属性过滤条件。
  38320. * @param {Object} [queryInfo.keyWord] - 筛选关键字。
  38321. */
  38322. }, {
  38323. key: "getMapFeatures",
  38324. value: function getMapFeatures(datasetInfo, queryInfo) {
  38325. var _this2 = this;
  38326. var dataUrl = datasetInfo.dataUrl,
  38327. mapName = datasetInfo.mapName;
  38328. queryInfo.name = mapName;
  38329. this.projectionUrl = "".concat(dataUrl, "/prjCoordSys");
  38330. if (queryInfo.keyWord) {
  38331. this._getRestMapFields(dataUrl, mapName, function (fields) {
  38332. queryInfo.attributeFilter = _this2._getAttributeFilterByKeywords(fields, queryInfo.keyWord);
  38333. _this2._getMapFeatureBySql(dataUrl, queryInfo);
  38334. }, queryInfo.withCredentials);
  38335. } else {
  38336. this._getMapFeatureBySql(dataUrl, queryInfo);
  38337. }
  38338. }
  38339. /**
  38340. * @function iServerRestService.prototype.getDataFeatures
  38341. * @description 请求数据服务数据。
  38342. * @param {Object} datasetInfo - 数据集参数。
  38343. * @param {Object} datasetInfo.datasetName - 数据集名。
  38344. * @param {Object} datasetInfo.dataSourceName - 数据源名。
  38345. * @param {Object} datasetInfo.dataUrl - 数据服务地址。
  38346. * @param {Object} queryInfo - 可选参数。
  38347. * @param {Object} [queryInfo.maxFeatures] - 最多可返回的要素数量。
  38348. * @param {Object} [queryInfo.attributeFilter] - 属性过滤条件。
  38349. * @param {Object} [queryInfo.keyWord] - 筛选关键字。
  38350. */
  38351. }, {
  38352. key: "getDataFeatures",
  38353. value: function getDataFeatures(datasetInfo, queryInfo) {
  38354. var _this3 = this;
  38355. var datasetName = datasetInfo.datasetName,
  38356. dataSourceName = datasetInfo.dataSourceName,
  38357. dataUrl = datasetInfo.dataUrl;
  38358. queryInfo.name = datasetName + '@' + dataSourceName;
  38359. queryInfo.datasetNames = [dataSourceName + ':' + datasetName];
  38360. this.projectionUrl = "".concat(dataUrl, "/datasources/").concat(dataSourceName, "/datasets/").concat(datasetName);
  38361. if (queryInfo.keyWord) {
  38362. var fieldsUrl = dataUrl + "/datasources/".concat(dataSourceName, "/datasets/").concat(datasetName, "/fields.rjson?returnAll=true");
  38363. this._getRestDataFields(fieldsUrl, queryInfo, function (fields) {
  38364. queryInfo.attributeFilter = _this3._getAttributeFilterByKeywords(fields, queryInfo.keyWord);
  38365. _this3._getDataFeaturesBySql(dataUrl, queryInfo);
  38366. });
  38367. } else {
  38368. this._getDataFeaturesBySql(dataUrl, queryInfo);
  38369. }
  38370. }
  38371. }, {
  38372. key: "_getMapFeatureBySql",
  38373. value: function _getMapFeatureBySql(url, queryInfo) {
  38374. var _this4 = this;
  38375. var queryBySQLParams, queryBySQLService;
  38376. queryBySQLParams = new SuperMap.QueryBySQLParameters({
  38377. queryParams: [{
  38378. name: queryInfo.name,
  38379. attributeFilter: queryInfo.attributeFilter
  38380. }],
  38381. expectCount: queryInfo.maxFeatures
  38382. });
  38383. queryBySQLService = new SuperMap.QueryBySQLService(url, {
  38384. proxy: this.options.proxy,
  38385. withCredentials: queryInfo.withCredentials,
  38386. eventListeners: {
  38387. processCompleted: this._getFeaturesSucceed.bind(this),
  38388. processFailed: function processFailed(serviceResult) {
  38389. console.error(serviceResult.error);
  38390. _this4.fetchFailed(serviceResult.error);
  38391. }
  38392. }
  38393. });
  38394. queryBySQLService.processAsync(queryBySQLParams);
  38395. }
  38396. }, {
  38397. key: "_getDataFeaturesBySql",
  38398. value: function _getDataFeaturesBySql(url, queryInfo) {
  38399. var getFeatureBySQLParams, getFeatureBySQLService;
  38400. getFeatureBySQLParams = new SuperMap.GetFeaturesBySQLParameters({
  38401. queryParameter: {
  38402. name: queryInfo.name,
  38403. attributeFilter: queryInfo.attributeFilter
  38404. },
  38405. datasetNames: queryInfo.datasetNames,
  38406. fromIndex: 0,
  38407. toIndex: queryInfo.maxFeatures >= 1000 ? -1 : queryInfo.maxFeatures - 1,
  38408. maxFeatures: -1
  38409. });
  38410. getFeatureBySQLService = new SuperMap.GetFeaturesBySQLService(url, {
  38411. proxy: this.options.proxy,
  38412. withCredentials: queryInfo.withCredentials,
  38413. eventListeners: {
  38414. processCompleted: this._getFeaturesSucceed.bind(this),
  38415. processFailed: function processFailed() {}
  38416. }
  38417. });
  38418. getFeatureBySQLService.processAsync(getFeatureBySQLParams);
  38419. }
  38420. }, {
  38421. key: "_getFeaturesSucceed",
  38422. value: function () {
  38423. var _getFeaturesSucceed2 = (0, _asyncToGenerator2.default)(
  38424. /*#__PURE__*/
  38425. _regenerator.default.mark(function _callee(results) {
  38426. var features, data, recordsets;
  38427. return _regenerator.default.wrap(function _callee$(_context) {
  38428. while (1) {
  38429. switch (_context.prev = _context.next) {
  38430. case 0:
  38431. if (!(results.result && results.result.recordsets)) {
  38432. _context.next = 12;
  38433. break;
  38434. }
  38435. // 数据来自restmap
  38436. recordsets = results.result.recordsets[0] || {};
  38437. this.features = recordsets.features || {};
  38438. features = this.features.features;
  38439. if (!(features && features.length > 0)) {
  38440. _context.next = 8;
  38441. break;
  38442. }
  38443. data = (0, _statistics.statisticsFeatures)(features, recordsets.fields, recordsets.fieldCaptions, recordsets.fieldTypes);
  38444. _context.next = 10;
  38445. break;
  38446. case 8:
  38447. /**
  38448. * @event iServerRestService#featureisempty
  38449. * @description 请求数据为空后触发。
  38450. * @property {Object} e - 事件对象。
  38451. */
  38452. this.triggerEvent('featureisempty', {
  38453. results: results
  38454. });
  38455. return _context.abrupt("return");
  38456. case 10:
  38457. _context.next = 25;
  38458. break;
  38459. case 12:
  38460. if (!(results.result && results.result.features)) {
  38461. _context.next = 23;
  38462. break;
  38463. }
  38464. // 数据来自restdata---results.result.features
  38465. this.features = results.result.features;
  38466. features = this.features.features;
  38467. if (!(features && features.length > 0)) {
  38468. _context.next = 19;
  38469. break;
  38470. }
  38471. data = (0, _statistics.statisticsFeatures)(features);
  38472. _context.next = 21;
  38473. break;
  38474. case 19:
  38475. this.triggerEvent('featureisempty', {
  38476. results: results
  38477. });
  38478. return _context.abrupt("return");
  38479. case 21:
  38480. _context.next = 25;
  38481. break;
  38482. case 23:
  38483. this.triggerEvent('getdatafailed', {
  38484. results: results
  38485. });
  38486. return _context.abrupt("return");
  38487. case 25:
  38488. if (results.result.vertified) {
  38489. _context.next = 29;
  38490. break;
  38491. }
  38492. _context.next = 28;
  38493. return checkAndRectifyFeatures({
  38494. features: data.features,
  38495. epsgCode: this.options.epsgCode,
  38496. projectionUrl: this.projectionUrl,
  38497. options: {
  38498. proxy: this.options.proxy
  38499. }
  38500. });
  38501. case 28:
  38502. data.features = _context.sent;
  38503. case 29:
  38504. /**
  38505. * @event iServerRestService#getdatasucceeded
  38506. * @description 请求数据成功后触发。
  38507. * @property {Object} e - 事件对象。
  38508. */
  38509. this.triggerEvent('getdatasucceeded', data);
  38510. case 30:
  38511. case "end":
  38512. return _context.stop();
  38513. }
  38514. }
  38515. }, _callee, this);
  38516. }));
  38517. function _getFeaturesSucceed(_x2) {
  38518. return _getFeaturesSucceed2.apply(this, arguments);
  38519. }
  38520. return _getFeaturesSucceed;
  38521. }()
  38522. }, {
  38523. key: "_getRestDataFields",
  38524. value: function _getRestDataFields(fieldsUrl, queryInfo, callBack) {
  38525. var _this5 = this;
  38526. SuperMap.FetchRequest.get(fieldsUrl, null, {
  38527. proxy: this.options.proxy,
  38528. withCredentials: queryInfo.withCredentials
  38529. }).then(function (response) {
  38530. return response.json();
  38531. }).then(function (results) {
  38532. var fields = _this5._getFiledsByType(['CHAR', 'TEXT', 'WTEXT'], results);
  38533. callBack(fields, results);
  38534. }).catch(function (error) {
  38535. console.log(error);
  38536. _this5.fetchFailed(error);
  38537. });
  38538. }
  38539. }, {
  38540. key: "_getRestMapFields",
  38541. value: function _getRestMapFields(url, layerName, callBack) {
  38542. var _this6 = this;
  38543. var withCredentials = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  38544. var param = new SuperMap.QueryBySQLParameters({
  38545. queryParams: [new SuperMap.FilterParameter({
  38546. name: layerName,
  38547. attributeFilter: 'SMID=0'
  38548. })]
  38549. });
  38550. var queryBySQLSerice = new SuperMap.QueryBySQLService(url, {
  38551. proxy: this.options.proxy,
  38552. withCredentials: withCredentials,
  38553. eventListeners: {
  38554. processCompleted: function processCompleted(serviceResult) {
  38555. var fields;
  38556. if (serviceResult.result) {
  38557. var result = serviceResult.result.recordsets[0];
  38558. fields = _this6._getFiledsByType(['CHAR', 'TEXT', 'WTEXT'], result.fieldCaptions, result.fieldTypes);
  38559. }
  38560. fields && callBack(fields, serviceResult.result.recordsets[0]);
  38561. },
  38562. processFailed: function processFailed(serviceResult) {
  38563. console.error(serviceResult.error);
  38564. _this6.fetchFailed(serviceResult.error);
  38565. }
  38566. }
  38567. });
  38568. queryBySQLSerice.processAsync(param);
  38569. }
  38570. }, {
  38571. key: "_getAttributeFilterByKeywords",
  38572. value: function _getAttributeFilterByKeywords(fields, keyWord) {
  38573. var attributeFilter = '';
  38574. fields && fields.forEach(function (field, index) {
  38575. attributeFilter += index !== fields.length - 1 ? "".concat(field, " LIKE '%").concat(keyWord, "%' ") + 'OR ' : "".concat(field, " LIKE '%").concat(keyWord, "%'");
  38576. }, this);
  38577. return attributeFilter;
  38578. }
  38579. /**
  38580. * @function iServerRestService.prototype._checkUrl
  38581. * @description 检查url是否符合要求
  38582. * @private
  38583. * @param {string} url
  38584. */
  38585. }, {
  38586. key: "_checkUrl",
  38587. value: function _checkUrl(url) {
  38588. var match;
  38589. if (url === '' || !(0, _util.isMatchUrl)(url)) {
  38590. match = false;
  38591. } else {
  38592. match = true;
  38593. } // else if (/^http[s]?:\/\/localhost/.test(url) || /^http[s]?:\/\/127.0.0.1/.test(url)) {
  38594. // //不是实际域名
  38595. // match = false;
  38596. // }
  38597. return match;
  38598. } // types => []string
  38599. }, {
  38600. key: "_getFiledsByType",
  38601. value: function _getFiledsByType(types, fields, fieldTypes) {
  38602. var resultFileds = [];
  38603. fields.forEach(function (field, index) {
  38604. types.includes(fieldTypes && fieldTypes[index] || field.type) && resultFileds.push(fieldTypes ? field : field.name);
  38605. });
  38606. return resultFileds;
  38607. }
  38608. }, {
  38609. key: "fetchFailed",
  38610. value: function fetchFailed(error) {
  38611. this.triggerEvent('getdatafailed', {
  38612. error: error
  38613. });
  38614. }
  38615. }]);
  38616. return iServerRestService;
  38617. }(_Events2.Events);
  38618. exports.default = iServerRestService;
  38619. /***/ }),
  38620. /***/ "e3e2":
  38621. /***/ (function(module, exports, __webpack_require__) {
  38622. "use strict";
  38623. var _interopRequireDefault = __webpack_require__("8e6d");
  38624. Object.defineProperty(exports, "__esModule", {
  38625. value: true
  38626. });
  38627. exports.Events = void 0;
  38628. var _typeof2 = _interopRequireDefault(__webpack_require__("7ae5"));
  38629. var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
  38630. var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
  38631. var _Pixel = __webpack_require__("9270");
  38632. var _Event = __webpack_require__("fe5a");
  38633. var _BaseTypes = __webpack_require__("63f3");
  38634. var _Util = __webpack_require__("1a9e");
  38635. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  38636. * This program are made available under the terms of the Apache License, Version 2.0
  38637. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html. */
  38638. /**
  38639. * @class Events
  38640. * @classdesc 事件类。
  38641. * @param {Object} object - 当前事件对象被添加到的 JS 对象。
  38642. * @param {HTMLElement} element - 响应浏览器事件的 DOM 元素。
  38643. * @param {Array.<string>} eventTypes - 自定义应用事件的数组。
  38644. * @param {boolean} [fallThrough=false] - 是否允许事件处理之后向上传递(冒泡),为 false 的时候阻止事件冒泡。
  38645. * @param {Object} options - 事件对象选项。
  38646. */
  38647. var Events =
  38648. /*#__PURE__*/
  38649. function () {
  38650. function Events(object, element, eventTypes, fallThrough, options) {
  38651. (0, _classCallCheck2.default)(this, Events);
  38652. /**
  38653. * @member {Array.<string>} Events.prototype.BROWSER_EVENTS
  38654. * @description 支持的事件。
  38655. * @constant
  38656. * @default [
  38657. "mouseover", "mouseout","mousedown", "mouseup", "mousemove",
  38658. "click", "dblclick", "rightclick", "dblrightclick","resize",
  38659. "focus", "blur","touchstart", "touchmove", "touchend","keydown",
  38660. "MSPointerDown", "MSPointerUp", "pointerdown", "pointerup",
  38661. "MSGestureStart", "MSGestureChange", "MSGestureEnd","contextmenu"
  38662. ]
  38663. */
  38664. this.BROWSER_EVENTS = ['mouseover', 'mouseout', 'mousedown', 'mouseup', 'mousemove', 'click', 'dblclick', 'rightclick', 'dblrightclick', 'resize', 'focus', 'blur', 'touchstart', 'touchmove', 'touchend', 'keydown', 'MSPointerDown', 'MSPointerUp', 'pointerdown', 'pointerup', 'MSGestureStart', 'MSGestureChange', 'MSGestureEnd', 'contextmenu'];
  38665. this.listeners = {};
  38666. this.object = object;
  38667. this.element = null;
  38668. this.eventTypes = [];
  38669. this.eventHandler = null;
  38670. this.fallThrough = fallThrough;
  38671. this.includeXY = false;
  38672. this.extensions = {};
  38673. this.extensionCount = {};
  38674. this.clearMouseListener = null;
  38675. _Util.Util.extend(this, options);
  38676. if (eventTypes != null) {
  38677. for (var i = 0, len = eventTypes.length; i < len; i++) {
  38678. this.addEventType(eventTypes[i]);
  38679. }
  38680. }
  38681. if (element != null) {
  38682. this.attachToElement(element);
  38683. }
  38684. this.CLASS_NAME = 'Events';
  38685. }
  38686. /**
  38687. * @function Events.prototype.destroy
  38688. * @description 移除当前要素 element 上的所有事件监听和处理。
  38689. */
  38690. (0, _createClass2.default)(Events, [{
  38691. key: "destroy",
  38692. value: function destroy() {
  38693. for (var e in this.extensions) {
  38694. if (typeof this.extensions[e] !== 'boolean') {
  38695. this.extensions[e].destroy();
  38696. }
  38697. }
  38698. this.extensions = null;
  38699. if (this.element) {
  38700. _Event.Event.stopObservingElement(this.element);
  38701. if (this.element.hasScrollEvent) {
  38702. _Event.Event.stopObserving(window, 'scroll', this.clearMouseListener);
  38703. }
  38704. }
  38705. this.element = null;
  38706. this.listeners = null;
  38707. this.object = null;
  38708. this.eventTypes = null;
  38709. this.fallThrough = null;
  38710. this.eventHandler = null;
  38711. }
  38712. /**
  38713. * @function Events.prototype.addEventType
  38714. * @description 在此事件对象中添加新的事件类型,如果这个事件类型已经添加过了,则不做任何事情。
  38715. * @param {string} eventName - 事件名。
  38716. */
  38717. }, {
  38718. key: "addEventType",
  38719. value: function addEventType(eventName) {
  38720. if (!this.listeners[eventName]) {
  38721. this.eventTypes.push(eventName);
  38722. this.listeners[eventName] = [];
  38723. }
  38724. }
  38725. /**
  38726. * @function Events.prototype.attachToElement
  38727. * @description 给 DOM 元素绑定浏览器事件。
  38728. * @param {HTMLDOMElement} element - 绑定浏览器事件的 DOM 元素。
  38729. */
  38730. }, {
  38731. key: "attachToElement",
  38732. value: function attachToElement(element) {
  38733. if (this.element) {
  38734. _Event.Event.stopObservingElement(this.element);
  38735. } else {
  38736. // keep a bound copy of handleBrowserEvent() so that we can
  38737. // pass the same function to both Event.observe() and .stopObserving()
  38738. this.eventHandler = _BaseTypes.FunctionExt.bindAsEventListener(this.handleBrowserEvent, this); // to be used with observe and stopObserving
  38739. this.clearMouseListener = _BaseTypes.FunctionExt.bind(this.clearMouseCache, this);
  38740. }
  38741. this.element = element;
  38742. for (var i = 0, len = this.BROWSER_EVENTS.length; i < len; i++) {
  38743. var eventType = this.BROWSER_EVENTS[i]; // every browser event has a corresponding application event
  38744. // (whether it's listened for or not).
  38745. this.addEventType(eventType); // use Prototype to register the event cross-browser
  38746. _Event.Event.observe(element, eventType, this.eventHandler);
  38747. } // disable dragstart in IE so that mousedown/move/up works normally
  38748. _Event.Event.observe(element, 'dragstart', _Event.Event.stop);
  38749. }
  38750. }, {
  38751. key: "on",
  38752. value: function on(object) {
  38753. for (var type in object) {
  38754. if (type !== 'scope' && object.hasOwnProperty(type)) {
  38755. this.register(type, object.scope, object[type]);
  38756. }
  38757. }
  38758. }
  38759. }, {
  38760. key: "register",
  38761. value: function register(type, obj, func, priority) {
  38762. if (type in Events && !this.extensions[type]) {
  38763. this.extensions[type] = new Events[type](this);
  38764. }
  38765. if (func != null && _Util.Util.indexOf(this.eventTypes, type) !== -1) {
  38766. if (obj == null) {
  38767. obj = this.object;
  38768. }
  38769. var listeners = this.listeners[type];
  38770. if (!listeners) {
  38771. listeners = [];
  38772. this.listeners[type] = listeners;
  38773. this.extensionCount[type] = 0;
  38774. }
  38775. var listener = {
  38776. obj: obj,
  38777. func: func
  38778. };
  38779. if (priority) {
  38780. listeners.splice(this.extensionCount[type], 0, listener);
  38781. if ((0, _typeof2.default)(priority) === 'object' && priority.extension) {
  38782. this.extensionCount[type]++;
  38783. }
  38784. } else {
  38785. listeners.push(listener);
  38786. }
  38787. }
  38788. }
  38789. }, {
  38790. key: "registerPriority",
  38791. value: function registerPriority(type, obj, func) {
  38792. this.register(type, obj, func, true);
  38793. }
  38794. }, {
  38795. key: "un",
  38796. value: function un(object) {
  38797. for (var type in object) {
  38798. if (type !== 'scope' && object.hasOwnProperty(type)) {
  38799. this.unregister(type, object.scope, object[type]);
  38800. }
  38801. }
  38802. }
  38803. }, {
  38804. key: "unregister",
  38805. value: function unregister(type, obj, func) {
  38806. if (obj == null) {
  38807. obj = this.object;
  38808. }
  38809. var listeners = this.listeners[type];
  38810. if (listeners != null) {
  38811. for (var i = 0, len = listeners.length; i < len; i++) {
  38812. if (listeners[i].obj === obj && listeners[i].func === func) {
  38813. listeners.splice(i, 1);
  38814. break;
  38815. }
  38816. }
  38817. }
  38818. }
  38819. /**
  38820. * @function Events.prototype.remove
  38821. * @description 删除某个事件类型的所有监听,如果该事件类型没有注册,则不做任何操作。
  38822. * @param {string} type - 事件类型。
  38823. */
  38824. }, {
  38825. key: "remove",
  38826. value: function remove(type) {
  38827. if (this.listeners[type] != null) {
  38828. this.listeners[type] = [];
  38829. }
  38830. }
  38831. }, {
  38832. key: "triggerEvent",
  38833. value: function triggerEvent(type, evt) {
  38834. var listeners = this.listeners[type]; // fast path
  38835. if (!listeners || listeners.length === 0) {
  38836. return undefined;
  38837. } // prep evt object with object & div references
  38838. if (evt == null) {
  38839. evt = {};
  38840. }
  38841. evt.object = this.object;
  38842. evt.element = this.element;
  38843. if (!evt.type) {
  38844. evt.type = type;
  38845. } // execute all callbacks registered for specified type
  38846. // get a clone of the listeners array to
  38847. // allow for splicing during callbacks
  38848. listeners = listeners.slice();
  38849. var continueChain;
  38850. for (var i = 0, len = listeners.length; i < len; i++) {
  38851. var callback = listeners[i]; // bind the context to callback.obj
  38852. continueChain = callback.func.apply(callback.obj, [evt]);
  38853. if (continueChain !== undefined && continueChain === false) {
  38854. // if callback returns false, execute no more callbacks.
  38855. break;
  38856. }
  38857. } // don't fall through to other DOM elements
  38858. if (!this.fallThrough) {
  38859. _Event.Event.stop(evt, true);
  38860. }
  38861. return continueChain;
  38862. }
  38863. }, {
  38864. key: "handleBrowserEvent",
  38865. value: function handleBrowserEvent(evt) {
  38866. var type = evt.type;
  38867. var listeners = this.listeners[type];
  38868. if (!listeners || listeners.length === 0) {
  38869. // noone's listening, bail out
  38870. return;
  38871. } // add clientX & clientY to all events - corresponds to average x, y
  38872. var touches = evt.touches;
  38873. if (touches && touches[0]) {
  38874. var x = 0;
  38875. var y = 0;
  38876. var num = touches.length;
  38877. var touch;
  38878. for (var i = 0; i < num; ++i) {
  38879. touch = touches[i];
  38880. x += touch.clientX;
  38881. y += touch.clientY;
  38882. }
  38883. evt.clientX = x / num;
  38884. evt.clientY = y / num;
  38885. }
  38886. if (this.includeXY) {
  38887. evt.xy = this.getMousePosition(evt);
  38888. }
  38889. this.triggerEvent(type, evt);
  38890. }
  38891. /**
  38892. * @function Events.prototype.clearMouseCache
  38893. * @description 清除鼠标缓存。
  38894. */
  38895. }, {
  38896. key: "clearMouseCache",
  38897. value: function clearMouseCache() {
  38898. this.element.scrolls = null;
  38899. this.element.lefttop = null;
  38900. var body = document.body;
  38901. if (body && !((body.scrollTop !== 0 || body.scrollLeft !== 0) && navigator.userAgent.match(/iPhone/i))) {
  38902. this.element.offsets = null;
  38903. }
  38904. }
  38905. /**
  38906. * @function Events.prototype.getMousePosition
  38907. * @returns {Pixel} 当前的鼠标的 xy 坐标点。
  38908. */
  38909. }, {
  38910. key: "getMousePosition",
  38911. value: function getMousePosition(evt) {
  38912. if (!this.includeXY) {
  38913. this.clearMouseCache();
  38914. } else if (!this.element.hasScrollEvent) {
  38915. _Event.Event.observe(window, 'scroll', this.clearMouseListener);
  38916. this.element.hasScrollEvent = true;
  38917. }
  38918. if (!this.element.scrolls) {
  38919. var viewportElement = _Util.Util.getViewportElement();
  38920. this.element.scrolls = [viewportElement.scrollLeft, viewportElement.scrollTop];
  38921. }
  38922. if (!this.element.lefttop) {
  38923. this.element.lefttop = [document.documentElement.clientLeft || 0, document.documentElement.clientTop || 0];
  38924. }
  38925. if (!this.element.offsets) {
  38926. this.element.offsets = _Util.Util.pagePosition(this.element);
  38927. }
  38928. return new _Pixel.Pixel(evt.clientX + this.element.scrolls[0] - this.element.offsets[0] - this.element.lefttop[0], evt.clientY + this.element.scrolls[1] - this.element.offsets[1] - this.element.lefttop[1]);
  38929. }
  38930. }]);
  38931. return Events;
  38932. }();
  38933. exports.Events = Events;
  38934. Events.prototype.BROWSER_EVENTS = ['mouseover', 'mouseout', 'mousedown', 'mouseup', 'mousemove', 'click', 'dblclick', 'rightclick', 'dblrightclick', 'resize', 'focus', 'blur', 'touchstart', 'touchmove', 'touchend', 'keydown', 'MSPointerDown', 'MSPointerUp', 'pointerdown', 'pointerup', 'MSGestureStart', 'MSGestureChange', 'MSGestureEnd', 'contextmenu'];
  38935. /***/ }),
  38936. /***/ "e4fa":
  38937. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  38938. "use strict";
  38939. __webpack_require__.r(__webpack_exports__);
  38940. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TablePopup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("10ba");
  38941. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TablePopup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TablePopup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
  38942. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TablePopup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TablePopup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  38943. /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_TablePopup_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
  38944. /***/ }),
  38945. /***/ "e525":
  38946. /***/ (function(module, exports, __webpack_require__) {
  38947. "use strict";
  38948. // Copyright Joyent, Inc. and other Node contributors.
  38949. //
  38950. // Permission is hereby granted, free of charge, to any person obtaining a
  38951. // copy of this software and associated documentation files (the
  38952. // "Software"), to deal in the Software without restriction, including
  38953. // without limitation the rights to use, copy, modify, merge, publish,
  38954. // distribute, sublicense, and/or sell copies of the Software, and to permit
  38955. // persons to whom the Software is furnished to do so, subject to the
  38956. // following conditions:
  38957. //
  38958. // The above copyright notice and this permission notice shall be included
  38959. // in all copies or substantial portions of the Software.
  38960. //
  38961. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  38962. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  38963. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  38964. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  38965. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  38966. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  38967. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  38968. // a passthrough stream.
  38969. // basically just the most minimal sort of Transform stream.
  38970. // Every written chunk gets output as-is.
  38971. module.exports = PassThrough;
  38972. var Transform = __webpack_require__("b556");
  38973. /*<replacement>*/
  38974. var util = __webpack_require__("9107");
  38975. util.inherits = __webpack_require__("fe04");
  38976. /*</replacement>*/
  38977. util.inherits(PassThrough, Transform);
  38978. function PassThrough(options) {
  38979. if (!(this instanceof PassThrough)) return new PassThrough(options);
  38980. Transform.call(this, options);
  38981. }
  38982. PassThrough.prototype._transform = function (chunk, encoding, cb) {
  38983. cb(null, chunk);
  38984. };
  38985. /***/ }),
  38986. /***/ "e736":
  38987. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  38988. "use strict";
  38989. __webpack_require__.r(__webpack_exports__);
  38990. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Text_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a2ee");
  38991. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Text_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Text_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
  38992. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Text_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Text_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  38993. /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Text_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
  38994. /***/ }),
  38995. /***/ "e7f3":
  38996. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  38997. "use strict";
  38998. __webpack_require__.r(__webpack_exports__);
  38999. /* harmony import */ var _Iframe_vue_vue_type_template_id_37ec6382___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("b982");
  39000. /* harmony import */ var _Iframe_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("6ed2");
  39001. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _Iframe_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _Iframe_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  39002. /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b429");
  39003. /* normalize component */
  39004. var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
  39005. _Iframe_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
  39006. _Iframe_vue_vue_type_template_id_37ec6382___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
  39007. _Iframe_vue_vue_type_template_id_37ec6382___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
  39008. false,
  39009. null,
  39010. null,
  39011. null
  39012. )
  39013. /* harmony default export */ __webpack_exports__["default"] = (component.exports);
  39014. /***/ }),
  39015. /***/ "ea23":
  39016. /***/ (function(module, exports, __webpack_require__) {
  39017. /* WEBPACK VAR INJECTION */(function(Buffer) {;(function (sax) { // wrapper for non-node envs
  39018. sax.parser = function (strict, opt) { return new SAXParser(strict, opt) }
  39019. sax.SAXParser = SAXParser
  39020. sax.SAXStream = SAXStream
  39021. sax.createStream = createStream
  39022. // When we pass the MAX_BUFFER_LENGTH position, start checking for buffer overruns.
  39023. // When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)),
  39024. // since that's the earliest that a buffer overrun could occur. This way, checks are
  39025. // as rare as required, but as often as necessary to ensure never crossing this bound.
  39026. // Furthermore, buffers are only tested at most once per write(), so passing a very
  39027. // large string into write() might have undesirable effects, but this is manageable by
  39028. // the caller, so it is assumed to be safe. Thus, a call to write() may, in the extreme
  39029. // edge case, result in creating at most one complete copy of the string passed in.
  39030. // Set to Infinity to have unlimited buffers.
  39031. sax.MAX_BUFFER_LENGTH = 64 * 1024
  39032. var buffers = [
  39033. 'comment', 'sgmlDecl', 'textNode', 'tagName', 'doctype',
  39034. 'procInstName', 'procInstBody', 'entity', 'attribName',
  39035. 'attribValue', 'cdata', 'script'
  39036. ]
  39037. sax.EVENTS = [
  39038. 'text',
  39039. 'processinginstruction',
  39040. 'sgmldeclaration',
  39041. 'doctype',
  39042. 'comment',
  39043. 'opentagstart',
  39044. 'attribute',
  39045. 'opentag',
  39046. 'closetag',
  39047. 'opencdata',
  39048. 'cdata',
  39049. 'closecdata',
  39050. 'error',
  39051. 'end',
  39052. 'ready',
  39053. 'script',
  39054. 'opennamespace',
  39055. 'closenamespace'
  39056. ]
  39057. function SAXParser (strict, opt) {
  39058. if (!(this instanceof SAXParser)) {
  39059. return new SAXParser(strict, opt)
  39060. }
  39061. var parser = this
  39062. clearBuffers(parser)
  39063. parser.q = parser.c = ''
  39064. parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH
  39065. parser.opt = opt || {}
  39066. parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags
  39067. parser.looseCase = parser.opt.lowercase ? 'toLowerCase' : 'toUpperCase'
  39068. parser.tags = []
  39069. parser.closed = parser.closedRoot = parser.sawRoot = false
  39070. parser.tag = parser.error = null
  39071. parser.strict = !!strict
  39072. parser.noscript = !!(strict || parser.opt.noscript)
  39073. parser.state = S.BEGIN
  39074. parser.strictEntities = parser.opt.strictEntities
  39075. parser.ENTITIES = parser.strictEntities ? Object.create(sax.XML_ENTITIES) : Object.create(sax.ENTITIES)
  39076. parser.attribList = []
  39077. // namespaces form a prototype chain.
  39078. // it always points at the current tag,
  39079. // which protos to its parent tag.
  39080. if (parser.opt.xmlns) {
  39081. parser.ns = Object.create(rootNS)
  39082. }
  39083. // mostly just for error reporting
  39084. parser.trackPosition = parser.opt.position !== false
  39085. if (parser.trackPosition) {
  39086. parser.position = parser.line = parser.column = 0
  39087. }
  39088. emit(parser, 'onready')
  39089. }
  39090. if (!Object.create) {
  39091. Object.create = function (o) {
  39092. function F () {}
  39093. F.prototype = o
  39094. var newf = new F()
  39095. return newf
  39096. }
  39097. }
  39098. if (!Object.keys) {
  39099. Object.keys = function (o) {
  39100. var a = []
  39101. for (var i in o) if (o.hasOwnProperty(i)) a.push(i)
  39102. return a
  39103. }
  39104. }
  39105. function checkBufferLength (parser) {
  39106. var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10)
  39107. var maxActual = 0
  39108. for (var i = 0, l = buffers.length; i < l; i++) {
  39109. var len = parser[buffers[i]].length
  39110. if (len > maxAllowed) {
  39111. // Text/cdata nodes can get big, and since they're buffered,
  39112. // we can get here under normal conditions.
  39113. // Avoid issues by emitting the text node now,
  39114. // so at least it won't get any bigger.
  39115. switch (buffers[i]) {
  39116. case 'textNode':
  39117. closeText(parser)
  39118. break
  39119. case 'cdata':
  39120. emitNode(parser, 'oncdata', parser.cdata)
  39121. parser.cdata = ''
  39122. break
  39123. case 'script':
  39124. emitNode(parser, 'onscript', parser.script)
  39125. parser.script = ''
  39126. break
  39127. default:
  39128. error(parser, 'Max buffer length exceeded: ' + buffers[i])
  39129. }
  39130. }
  39131. maxActual = Math.max(maxActual, len)
  39132. }
  39133. // schedule the next check for the earliest possible buffer overrun.
  39134. var m = sax.MAX_BUFFER_LENGTH - maxActual
  39135. parser.bufferCheckPosition = m + parser.position
  39136. }
  39137. function clearBuffers (parser) {
  39138. for (var i = 0, l = buffers.length; i < l; i++) {
  39139. parser[buffers[i]] = ''
  39140. }
  39141. }
  39142. function flushBuffers (parser) {
  39143. closeText(parser)
  39144. if (parser.cdata !== '') {
  39145. emitNode(parser, 'oncdata', parser.cdata)
  39146. parser.cdata = ''
  39147. }
  39148. if (parser.script !== '') {
  39149. emitNode(parser, 'onscript', parser.script)
  39150. parser.script = ''
  39151. }
  39152. }
  39153. SAXParser.prototype = {
  39154. end: function () { end(this) },
  39155. write: write,
  39156. resume: function () { this.error = null; return this },
  39157. close: function () { return this.write(null) },
  39158. flush: function () { flushBuffers(this) }
  39159. }
  39160. var Stream
  39161. try {
  39162. Stream = __webpack_require__("92a1").Stream
  39163. } catch (ex) {
  39164. Stream = function () {}
  39165. }
  39166. var streamWraps = sax.EVENTS.filter(function (ev) {
  39167. return ev !== 'error' && ev !== 'end'
  39168. })
  39169. function createStream (strict, opt) {
  39170. return new SAXStream(strict, opt)
  39171. }
  39172. function SAXStream (strict, opt) {
  39173. if (!(this instanceof SAXStream)) {
  39174. return new SAXStream(strict, opt)
  39175. }
  39176. Stream.apply(this)
  39177. this._parser = new SAXParser(strict, opt)
  39178. this.writable = true
  39179. this.readable = true
  39180. var me = this
  39181. this._parser.onend = function () {
  39182. me.emit('end')
  39183. }
  39184. this._parser.onerror = function (er) {
  39185. me.emit('error', er)
  39186. // if didn't throw, then means error was handled.
  39187. // go ahead and clear error, so we can write again.
  39188. me._parser.error = null
  39189. }
  39190. this._decoder = null
  39191. streamWraps.forEach(function (ev) {
  39192. Object.defineProperty(me, 'on' + ev, {
  39193. get: function () {
  39194. return me._parser['on' + ev]
  39195. },
  39196. set: function (h) {
  39197. if (!h) {
  39198. me.removeAllListeners(ev)
  39199. me._parser['on' + ev] = h
  39200. return h
  39201. }
  39202. me.on(ev, h)
  39203. },
  39204. enumerable: true,
  39205. configurable: false
  39206. })
  39207. })
  39208. }
  39209. SAXStream.prototype = Object.create(Stream.prototype, {
  39210. constructor: {
  39211. value: SAXStream
  39212. }
  39213. })
  39214. SAXStream.prototype.write = function (data) {
  39215. if (typeof Buffer === 'function' &&
  39216. typeof Buffer.isBuffer === 'function' &&
  39217. Buffer.isBuffer(data)) {
  39218. if (!this._decoder) {
  39219. var SD = __webpack_require__("5465").StringDecoder
  39220. this._decoder = new SD('utf8')
  39221. }
  39222. data = this._decoder.write(data)
  39223. }
  39224. this._parser.write(data.toString())
  39225. this.emit('data', data)
  39226. return true
  39227. }
  39228. SAXStream.prototype.end = function (chunk) {
  39229. if (chunk && chunk.length) {
  39230. this.write(chunk)
  39231. }
  39232. this._parser.end()
  39233. return true
  39234. }
  39235. SAXStream.prototype.on = function (ev, handler) {
  39236. var me = this
  39237. if (!me._parser['on' + ev] && streamWraps.indexOf(ev) !== -1) {
  39238. me._parser['on' + ev] = function () {
  39239. var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments)
  39240. args.splice(0, 0, ev)
  39241. me.emit.apply(me, args)
  39242. }
  39243. }
  39244. return Stream.prototype.on.call(me, ev, handler)
  39245. }
  39246. // this really needs to be replaced with character classes.
  39247. // XML allows all manner of ridiculous numbers and digits.
  39248. var CDATA = '[CDATA['
  39249. var DOCTYPE = 'DOCTYPE'
  39250. var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace'
  39251. var XMLNS_NAMESPACE = 'http://www.w3.org/2000/xmlns/'
  39252. var rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE }
  39253. // http://www.w3.org/TR/REC-xml/#NT-NameStartChar
  39254. // This implementation works on strings, a single character at a time
  39255. // as such, it cannot ever support astral-plane characters (10000-EFFFF)
  39256. // without a significant breaking change to either this parser, or the
  39257. // JavaScript language. Implementation of an emoji-capable xml parser
  39258. // is left as an exercise for the reader.
  39259. 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]/
  39260. 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-]/
  39261. 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]/
  39262. 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-]/
  39263. function isWhitespace (c) {
  39264. return c === ' ' || c === '\n' || c === '\r' || c === '\t'
  39265. }
  39266. function isQuote (c) {
  39267. return c === '"' || c === '\''
  39268. }
  39269. function isAttribEnd (c) {
  39270. return c === '>' || isWhitespace(c)
  39271. }
  39272. function isMatch (regex, c) {
  39273. return regex.test(c)
  39274. }
  39275. function notMatch (regex, c) {
  39276. return !isMatch(regex, c)
  39277. }
  39278. var S = 0
  39279. sax.STATE = {
  39280. BEGIN: S++, // leading byte order mark or whitespace
  39281. BEGIN_WHITESPACE: S++, // leading whitespace
  39282. TEXT: S++, // general stuff
  39283. TEXT_ENTITY: S++, // &amp and such.
  39284. OPEN_WAKA: S++, // <
  39285. SGML_DECL: S++, // <!BLARG
  39286. SGML_DECL_QUOTED: S++, // <!BLARG foo "bar
  39287. DOCTYPE: S++, // <!DOCTYPE
  39288. DOCTYPE_QUOTED: S++, // <!DOCTYPE "//blah
  39289. DOCTYPE_DTD: S++, // <!DOCTYPE "//blah" [ ...
  39290. DOCTYPE_DTD_QUOTED: S++, // <!DOCTYPE "//blah" [ "foo
  39291. COMMENT_STARTING: S++, // <!-
  39292. COMMENT: S++, // <!--
  39293. COMMENT_ENDING: S++, // <!-- blah -
  39294. COMMENT_ENDED: S++, // <!-- blah --
  39295. CDATA: S++, // <![CDATA[ something
  39296. CDATA_ENDING: S++, // ]
  39297. CDATA_ENDING_2: S++, // ]]
  39298. PROC_INST: S++, // <?hi
  39299. PROC_INST_BODY: S++, // <?hi there
  39300. PROC_INST_ENDING: S++, // <?hi "there" ?
  39301. OPEN_TAG: S++, // <strong
  39302. OPEN_TAG_SLASH: S++, // <strong /
  39303. ATTRIB: S++, // <a
  39304. ATTRIB_NAME: S++, // <a foo
  39305. ATTRIB_NAME_SAW_WHITE: S++, // <a foo _
  39306. ATTRIB_VALUE: S++, // <a foo=
  39307. ATTRIB_VALUE_QUOTED: S++, // <a foo="bar
  39308. ATTRIB_VALUE_CLOSED: S++, // <a foo="bar"
  39309. ATTRIB_VALUE_UNQUOTED: S++, // <a foo=bar
  39310. ATTRIB_VALUE_ENTITY_Q: S++, // <foo bar="&quot;"
  39311. ATTRIB_VALUE_ENTITY_U: S++, // <foo bar=&quot
  39312. CLOSE_TAG: S++, // </a
  39313. CLOSE_TAG_SAW_WHITE: S++, // </a >
  39314. SCRIPT: S++, // <script> ...
  39315. SCRIPT_ENDING: S++ // <script> ... <
  39316. }
  39317. sax.XML_ENTITIES = {
  39318. 'amp': '&',
  39319. 'gt': '>',
  39320. 'lt': '<',
  39321. 'quot': '"',
  39322. 'apos': "'"
  39323. }
  39324. sax.ENTITIES = {
  39325. 'amp': '&',
  39326. 'gt': '>',
  39327. 'lt': '<',
  39328. 'quot': '"',
  39329. 'apos': "'",
  39330. 'AElig': 198,
  39331. 'Aacute': 193,
  39332. 'Acirc': 194,
  39333. 'Agrave': 192,
  39334. 'Aring': 197,
  39335. 'Atilde': 195,
  39336. 'Auml': 196,
  39337. 'Ccedil': 199,
  39338. 'ETH': 208,
  39339. 'Eacute': 201,
  39340. 'Ecirc': 202,
  39341. 'Egrave': 200,
  39342. 'Euml': 203,
  39343. 'Iacute': 205,
  39344. 'Icirc': 206,
  39345. 'Igrave': 204,
  39346. 'Iuml': 207,
  39347. 'Ntilde': 209,
  39348. 'Oacute': 211,
  39349. 'Ocirc': 212,
  39350. 'Ograve': 210,
  39351. 'Oslash': 216,
  39352. 'Otilde': 213,
  39353. 'Ouml': 214,
  39354. 'THORN': 222,
  39355. 'Uacute': 218,
  39356. 'Ucirc': 219,
  39357. 'Ugrave': 217,
  39358. 'Uuml': 220,
  39359. 'Yacute': 221,
  39360. 'aacute': 225,
  39361. 'acirc': 226,
  39362. 'aelig': 230,
  39363. 'agrave': 224,
  39364. 'aring': 229,
  39365. 'atilde': 227,
  39366. 'auml': 228,
  39367. 'ccedil': 231,
  39368. 'eacute': 233,
  39369. 'ecirc': 234,
  39370. 'egrave': 232,
  39371. 'eth': 240,
  39372. 'euml': 235,
  39373. 'iacute': 237,
  39374. 'icirc': 238,
  39375. 'igrave': 236,
  39376. 'iuml': 239,
  39377. 'ntilde': 241,
  39378. 'oacute': 243,
  39379. 'ocirc': 244,
  39380. 'ograve': 242,
  39381. 'oslash': 248,
  39382. 'otilde': 245,
  39383. 'ouml': 246,
  39384. 'szlig': 223,
  39385. 'thorn': 254,
  39386. 'uacute': 250,
  39387. 'ucirc': 251,
  39388. 'ugrave': 249,
  39389. 'uuml': 252,
  39390. 'yacute': 253,
  39391. 'yuml': 255,
  39392. 'copy': 169,
  39393. 'reg': 174,
  39394. 'nbsp': 160,
  39395. 'iexcl': 161,
  39396. 'cent': 162,
  39397. 'pound': 163,
  39398. 'curren': 164,
  39399. 'yen': 165,
  39400. 'brvbar': 166,
  39401. 'sect': 167,
  39402. 'uml': 168,
  39403. 'ordf': 170,
  39404. 'laquo': 171,
  39405. 'not': 172,
  39406. 'shy': 173,
  39407. 'macr': 175,
  39408. 'deg': 176,
  39409. 'plusmn': 177,
  39410. 'sup1': 185,
  39411. 'sup2': 178,
  39412. 'sup3': 179,
  39413. 'acute': 180,
  39414. 'micro': 181,
  39415. 'para': 182,
  39416. 'middot': 183,
  39417. 'cedil': 184,
  39418. 'ordm': 186,
  39419. 'raquo': 187,
  39420. 'frac14': 188,
  39421. 'frac12': 189,
  39422. 'frac34': 190,
  39423. 'iquest': 191,
  39424. 'times': 215,
  39425. 'divide': 247,
  39426. 'OElig': 338,
  39427. 'oelig': 339,
  39428. 'Scaron': 352,
  39429. 'scaron': 353,
  39430. 'Yuml': 376,
  39431. 'fnof': 402,
  39432. 'circ': 710,
  39433. 'tilde': 732,
  39434. 'Alpha': 913,
  39435. 'Beta': 914,
  39436. 'Gamma': 915,
  39437. 'Delta': 916,
  39438. 'Epsilon': 917,
  39439. 'Zeta': 918,
  39440. 'Eta': 919,
  39441. 'Theta': 920,
  39442. 'Iota': 921,
  39443. 'Kappa': 922,
  39444. 'Lambda': 923,
  39445. 'Mu': 924,
  39446. 'Nu': 925,
  39447. 'Xi': 926,
  39448. 'Omicron': 927,
  39449. 'Pi': 928,
  39450. 'Rho': 929,
  39451. 'Sigma': 931,
  39452. 'Tau': 932,
  39453. 'Upsilon': 933,
  39454. 'Phi': 934,
  39455. 'Chi': 935,
  39456. 'Psi': 936,
  39457. 'Omega': 937,
  39458. 'alpha': 945,
  39459. 'beta': 946,
  39460. 'gamma': 947,
  39461. 'delta': 948,
  39462. 'epsilon': 949,
  39463. 'zeta': 950,
  39464. 'eta': 951,
  39465. 'theta': 952,
  39466. 'iota': 953,
  39467. 'kappa': 954,
  39468. 'lambda': 955,
  39469. 'mu': 956,
  39470. 'nu': 957,
  39471. 'xi': 958,
  39472. 'omicron': 959,
  39473. 'pi': 960,
  39474. 'rho': 961,
  39475. 'sigmaf': 962,
  39476. 'sigma': 963,
  39477. 'tau': 964,
  39478. 'upsilon': 965,
  39479. 'phi': 966,
  39480. 'chi': 967,
  39481. 'psi': 968,
  39482. 'omega': 969,
  39483. 'thetasym': 977,
  39484. 'upsih': 978,
  39485. 'piv': 982,
  39486. 'ensp': 8194,
  39487. 'emsp': 8195,
  39488. 'thinsp': 8201,
  39489. 'zwnj': 8204,
  39490. 'zwj': 8205,
  39491. 'lrm': 8206,
  39492. 'rlm': 8207,
  39493. 'ndash': 8211,
  39494. 'mdash': 8212,
  39495. 'lsquo': 8216,
  39496. 'rsquo': 8217,
  39497. 'sbquo': 8218,
  39498. 'ldquo': 8220,
  39499. 'rdquo': 8221,
  39500. 'bdquo': 8222,
  39501. 'dagger': 8224,
  39502. 'Dagger': 8225,
  39503. 'bull': 8226,
  39504. 'hellip': 8230,
  39505. 'permil': 8240,
  39506. 'prime': 8242,
  39507. 'Prime': 8243,
  39508. 'lsaquo': 8249,
  39509. 'rsaquo': 8250,
  39510. 'oline': 8254,
  39511. 'frasl': 8260,
  39512. 'euro': 8364,
  39513. 'image': 8465,
  39514. 'weierp': 8472,
  39515. 'real': 8476,
  39516. 'trade': 8482,
  39517. 'alefsym': 8501,
  39518. 'larr': 8592,
  39519. 'uarr': 8593,
  39520. 'rarr': 8594,
  39521. 'darr': 8595,
  39522. 'harr': 8596,
  39523. 'crarr': 8629,
  39524. 'lArr': 8656,
  39525. 'uArr': 8657,
  39526. 'rArr': 8658,
  39527. 'dArr': 8659,
  39528. 'hArr': 8660,
  39529. 'forall': 8704,
  39530. 'part': 8706,
  39531. 'exist': 8707,
  39532. 'empty': 8709,
  39533. 'nabla': 8711,
  39534. 'isin': 8712,
  39535. 'notin': 8713,
  39536. 'ni': 8715,
  39537. 'prod': 8719,
  39538. 'sum': 8721,
  39539. 'minus': 8722,
  39540. 'lowast': 8727,
  39541. 'radic': 8730,
  39542. 'prop': 8733,
  39543. 'infin': 8734,
  39544. 'ang': 8736,
  39545. 'and': 8743,
  39546. 'or': 8744,
  39547. 'cap': 8745,
  39548. 'cup': 8746,
  39549. 'int': 8747,
  39550. 'there4': 8756,
  39551. 'sim': 8764,
  39552. 'cong': 8773,
  39553. 'asymp': 8776,
  39554. 'ne': 8800,
  39555. 'equiv': 8801,
  39556. 'le': 8804,
  39557. 'ge': 8805,
  39558. 'sub': 8834,
  39559. 'sup': 8835,
  39560. 'nsub': 8836,
  39561. 'sube': 8838,
  39562. 'supe': 8839,
  39563. 'oplus': 8853,
  39564. 'otimes': 8855,
  39565. 'perp': 8869,
  39566. 'sdot': 8901,
  39567. 'lceil': 8968,
  39568. 'rceil': 8969,
  39569. 'lfloor': 8970,
  39570. 'rfloor': 8971,
  39571. 'lang': 9001,
  39572. 'rang': 9002,
  39573. 'loz': 9674,
  39574. 'spades': 9824,
  39575. 'clubs': 9827,
  39576. 'hearts': 9829,
  39577. 'diams': 9830
  39578. }
  39579. Object.keys(sax.ENTITIES).forEach(function (key) {
  39580. var e = sax.ENTITIES[key]
  39581. var s = typeof e === 'number' ? String.fromCharCode(e) : e
  39582. sax.ENTITIES[key] = s
  39583. })
  39584. for (var s in sax.STATE) {
  39585. sax.STATE[sax.STATE[s]] = s
  39586. }
  39587. // shorthand
  39588. S = sax.STATE
  39589. function emit (parser, event, data) {
  39590. parser[event] && parser[event](data)
  39591. }
  39592. function emitNode (parser, nodeType, data) {
  39593. if (parser.textNode) closeText(parser)
  39594. emit(parser, nodeType, data)
  39595. }
  39596. function closeText (parser) {
  39597. parser.textNode = textopts(parser.opt, parser.textNode)
  39598. if (parser.textNode) emit(parser, 'ontext', parser.textNode)
  39599. parser.textNode = ''
  39600. }
  39601. function textopts (opt, text) {
  39602. if (opt.trim) text = text.trim()
  39603. if (opt.normalize) text = text.replace(/\s+/g, ' ')
  39604. return text
  39605. }
  39606. function error (parser, er) {
  39607. closeText(parser)
  39608. if (parser.trackPosition) {
  39609. er += '\nLine: ' + parser.line +
  39610. '\nColumn: ' + parser.column +
  39611. '\nChar: ' + parser.c
  39612. }
  39613. er = new Error(er)
  39614. parser.error = er
  39615. emit(parser, 'onerror', er)
  39616. return parser
  39617. }
  39618. function end (parser) {
  39619. if (parser.sawRoot && !parser.closedRoot) strictFail(parser, 'Unclosed root tag')
  39620. if ((parser.state !== S.BEGIN) &&
  39621. (parser.state !== S.BEGIN_WHITESPACE) &&
  39622. (parser.state !== S.TEXT)) {
  39623. error(parser, 'Unexpected end')
  39624. }
  39625. closeText(parser)
  39626. parser.c = ''
  39627. parser.closed = true
  39628. emit(parser, 'onend')
  39629. SAXParser.call(parser, parser.strict, parser.opt)
  39630. return parser
  39631. }
  39632. function strictFail (parser, message) {
  39633. if (typeof parser !== 'object' || !(parser instanceof SAXParser)) {
  39634. throw new Error('bad call to strictFail')
  39635. }
  39636. if (parser.strict) {
  39637. error(parser, message)
  39638. }
  39639. }
  39640. function newTag (parser) {
  39641. if (!parser.strict) parser.tagName = parser.tagName[parser.looseCase]()
  39642. var parent = parser.tags[parser.tags.length - 1] || parser
  39643. var tag = parser.tag = { name: parser.tagName, attributes: {} }
  39644. // will be overridden if tag contails an xmlns="foo" or xmlns:foo="bar"
  39645. if (parser.opt.xmlns) {
  39646. tag.ns = parent.ns
  39647. }
  39648. parser.attribList.length = 0
  39649. emitNode(parser, 'onopentagstart', tag)
  39650. }
  39651. function qname (name, attribute) {
  39652. var i = name.indexOf(':')
  39653. var qualName = i < 0 ? [ '', name ] : name.split(':')
  39654. var prefix = qualName[0]
  39655. var local = qualName[1]
  39656. // <x "xmlns"="http://foo">
  39657. if (attribute && name === 'xmlns') {
  39658. prefix = 'xmlns'
  39659. local = ''
  39660. }
  39661. return { prefix: prefix, local: local }
  39662. }
  39663. function attrib (parser) {
  39664. if (!parser.strict) {
  39665. parser.attribName = parser.attribName[parser.looseCase]()
  39666. }
  39667. if (parser.attribList.indexOf(parser.attribName) !== -1 ||
  39668. parser.tag.attributes.hasOwnProperty(parser.attribName)) {
  39669. parser.attribName = parser.attribValue = ''
  39670. return
  39671. }
  39672. if (parser.opt.xmlns) {
  39673. var qn = qname(parser.attribName, true)
  39674. var prefix = qn.prefix
  39675. var local = qn.local
  39676. if (prefix === 'xmlns') {
  39677. // namespace binding attribute. push the binding into scope
  39678. if (local === 'xml' && parser.attribValue !== XML_NAMESPACE) {
  39679. strictFail(parser,
  39680. 'xml: prefix must be bound to ' + XML_NAMESPACE + '\n' +
  39681. 'Actual: ' + parser.attribValue)
  39682. } else if (local === 'xmlns' && parser.attribValue !== XMLNS_NAMESPACE) {
  39683. strictFail(parser,
  39684. 'xmlns: prefix must be bound to ' + XMLNS_NAMESPACE + '\n' +
  39685. 'Actual: ' + parser.attribValue)
  39686. } else {
  39687. var tag = parser.tag
  39688. var parent = parser.tags[parser.tags.length - 1] || parser
  39689. if (tag.ns === parent.ns) {
  39690. tag.ns = Object.create(parent.ns)
  39691. }
  39692. tag.ns[local] = parser.attribValue
  39693. }
  39694. }
  39695. // defer onattribute events until all attributes have been seen
  39696. // so any new bindings can take effect. preserve attribute order
  39697. // so deferred events can be emitted in document order
  39698. parser.attribList.push([parser.attribName, parser.attribValue])
  39699. } else {
  39700. // in non-xmlns mode, we can emit the event right away
  39701. parser.tag.attributes[parser.attribName] = parser.attribValue
  39702. emitNode(parser, 'onattribute', {
  39703. name: parser.attribName,
  39704. value: parser.attribValue
  39705. })
  39706. }
  39707. parser.attribName = parser.attribValue = ''
  39708. }
  39709. function openTag (parser, selfClosing) {
  39710. if (parser.opt.xmlns) {
  39711. // emit namespace binding events
  39712. var tag = parser.tag
  39713. // add namespace info to tag
  39714. var qn = qname(parser.tagName)
  39715. tag.prefix = qn.prefix
  39716. tag.local = qn.local
  39717. tag.uri = tag.ns[qn.prefix] || ''
  39718. if (tag.prefix && !tag.uri) {
  39719. strictFail(parser, 'Unbound namespace prefix: ' +
  39720. JSON.stringify(parser.tagName))
  39721. tag.uri = qn.prefix
  39722. }
  39723. var parent = parser.tags[parser.tags.length - 1] || parser
  39724. if (tag.ns && parent.ns !== tag.ns) {
  39725. Object.keys(tag.ns).forEach(function (p) {
  39726. emitNode(parser, 'onopennamespace', {
  39727. prefix: p,
  39728. uri: tag.ns[p]
  39729. })
  39730. })
  39731. }
  39732. // handle deferred onattribute events
  39733. // Note: do not apply default ns to attributes:
  39734. // http://www.w3.org/TR/REC-xml-names/#defaulting
  39735. for (var i = 0, l = parser.attribList.length; i < l; i++) {
  39736. var nv = parser.attribList[i]
  39737. var name = nv[0]
  39738. var value = nv[1]
  39739. var qualName = qname(name, true)
  39740. var prefix = qualName.prefix
  39741. var local = qualName.local
  39742. var uri = prefix === '' ? '' : (tag.ns[prefix] || '')
  39743. var a = {
  39744. name: name,
  39745. value: value,
  39746. prefix: prefix,
  39747. local: local,
  39748. uri: uri
  39749. }
  39750. // if there's any attributes with an undefined namespace,
  39751. // then fail on them now.
  39752. if (prefix && prefix !== 'xmlns' && !uri) {
  39753. strictFail(parser, 'Unbound namespace prefix: ' +
  39754. JSON.stringify(prefix))
  39755. a.uri = prefix
  39756. }
  39757. parser.tag.attributes[name] = a
  39758. emitNode(parser, 'onattribute', a)
  39759. }
  39760. parser.attribList.length = 0
  39761. }
  39762. parser.tag.isSelfClosing = !!selfClosing
  39763. // process the tag
  39764. parser.sawRoot = true
  39765. parser.tags.push(parser.tag)
  39766. emitNode(parser, 'onopentag', parser.tag)
  39767. if (!selfClosing) {
  39768. // special case for <script> in non-strict mode.
  39769. if (!parser.noscript && parser.tagName.toLowerCase() === 'script') {
  39770. parser.state = S.SCRIPT
  39771. } else {
  39772. parser.state = S.TEXT
  39773. }
  39774. parser.tag = null
  39775. parser.tagName = ''
  39776. }
  39777. parser.attribName = parser.attribValue = ''
  39778. parser.attribList.length = 0
  39779. }
  39780. function closeTag (parser) {
  39781. if (!parser.tagName) {
  39782. strictFail(parser, 'Weird empty close tag.')
  39783. parser.textNode += '</>'
  39784. parser.state = S.TEXT
  39785. return
  39786. }
  39787. if (parser.script) {
  39788. if (parser.tagName !== 'script') {
  39789. parser.script += '</' + parser.tagName + '>'
  39790. parser.tagName = ''
  39791. parser.state = S.SCRIPT
  39792. return
  39793. }
  39794. emitNode(parser, 'onscript', parser.script)
  39795. parser.script = ''
  39796. }
  39797. // first make sure that the closing tag actually exists.
  39798. // <a><b></c></b></a> will close everything, otherwise.
  39799. var t = parser.tags.length
  39800. var tagName = parser.tagName
  39801. if (!parser.strict) {
  39802. tagName = tagName[parser.looseCase]()
  39803. }
  39804. var closeTo = tagName
  39805. while (t--) {
  39806. var close = parser.tags[t]
  39807. if (close.name !== closeTo) {
  39808. // fail the first time in strict mode
  39809. strictFail(parser, 'Unexpected close tag')
  39810. } else {
  39811. break
  39812. }
  39813. }
  39814. // didn't find it. we already failed for strict, so just abort.
  39815. if (t < 0) {
  39816. strictFail(parser, 'Unmatched closing tag: ' + parser.tagName)
  39817. parser.textNode += '</' + parser.tagName + '>'
  39818. parser.state = S.TEXT
  39819. return
  39820. }
  39821. parser.tagName = tagName
  39822. var s = parser.tags.length
  39823. while (s-- > t) {
  39824. var tag = parser.tag = parser.tags.pop()
  39825. parser.tagName = parser.tag.name
  39826. emitNode(parser, 'onclosetag', parser.tagName)
  39827. var x = {}
  39828. for (var i in tag.ns) {
  39829. x[i] = tag.ns[i]
  39830. }
  39831. var parent = parser.tags[parser.tags.length - 1] || parser
  39832. if (parser.opt.xmlns && tag.ns !== parent.ns) {
  39833. // remove namespace bindings introduced by tag
  39834. Object.keys(tag.ns).forEach(function (p) {
  39835. var n = tag.ns[p]
  39836. emitNode(parser, 'onclosenamespace', { prefix: p, uri: n })
  39837. })
  39838. }
  39839. }
  39840. if (t === 0) parser.closedRoot = true
  39841. parser.tagName = parser.attribValue = parser.attribName = ''
  39842. parser.attribList.length = 0
  39843. parser.state = S.TEXT
  39844. }
  39845. function parseEntity (parser) {
  39846. var entity = parser.entity
  39847. var entityLC = entity.toLowerCase()
  39848. var num
  39849. var numStr = ''
  39850. if (parser.ENTITIES[entity]) {
  39851. return parser.ENTITIES[entity]
  39852. }
  39853. if (parser.ENTITIES[entityLC]) {
  39854. return parser.ENTITIES[entityLC]
  39855. }
  39856. entity = entityLC
  39857. if (entity.charAt(0) === '#') {
  39858. if (entity.charAt(1) === 'x') {
  39859. entity = entity.slice(2)
  39860. num = parseInt(entity, 16)
  39861. numStr = num.toString(16)
  39862. } else {
  39863. entity = entity.slice(1)
  39864. num = parseInt(entity, 10)
  39865. numStr = num.toString(10)
  39866. }
  39867. }
  39868. entity = entity.replace(/^0+/, '')
  39869. if (isNaN(num) || numStr.toLowerCase() !== entity) {
  39870. strictFail(parser, 'Invalid character entity')
  39871. return '&' + parser.entity + ';'
  39872. }
  39873. return String.fromCodePoint(num)
  39874. }
  39875. function beginWhiteSpace (parser, c) {
  39876. if (c === '<') {
  39877. parser.state = S.OPEN_WAKA
  39878. parser.startTagPosition = parser.position
  39879. } else if (!isWhitespace(c)) {
  39880. // have to process this as a text node.
  39881. // weird, but happens.
  39882. strictFail(parser, 'Non-whitespace before first tag.')
  39883. parser.textNode = c
  39884. parser.state = S.TEXT
  39885. }
  39886. }
  39887. function charAt (chunk, i) {
  39888. var result = ''
  39889. if (i < chunk.length) {
  39890. result = chunk.charAt(i)
  39891. }
  39892. return result
  39893. }
  39894. function write (chunk) {
  39895. var parser = this
  39896. if (this.error) {
  39897. throw this.error
  39898. }
  39899. if (parser.closed) {
  39900. return error(parser,
  39901. 'Cannot write after close. Assign an onready handler.')
  39902. }
  39903. if (chunk === null) {
  39904. return end(parser)
  39905. }
  39906. if (typeof chunk === 'object') {
  39907. chunk = chunk.toString()
  39908. }
  39909. var i = 0
  39910. var c = ''
  39911. while (true) {
  39912. c = charAt(chunk, i++)
  39913. parser.c = c
  39914. if (!c) {
  39915. break
  39916. }
  39917. if (parser.trackPosition) {
  39918. parser.position++
  39919. if (c === '\n') {
  39920. parser.line++
  39921. parser.column = 0
  39922. } else {
  39923. parser.column++
  39924. }
  39925. }
  39926. switch (parser.state) {
  39927. case S.BEGIN:
  39928. parser.state = S.BEGIN_WHITESPACE
  39929. if (c === '\uFEFF') {
  39930. continue
  39931. }
  39932. beginWhiteSpace(parser, c)
  39933. continue
  39934. case S.BEGIN_WHITESPACE:
  39935. beginWhiteSpace(parser, c)
  39936. continue
  39937. case S.TEXT:
  39938. if (parser.sawRoot && !parser.closedRoot) {
  39939. var starti = i - 1
  39940. while (c && c !== '<' && c !== '&') {
  39941. c = charAt(chunk, i++)
  39942. if (c && parser.trackPosition) {
  39943. parser.position++
  39944. if (c === '\n') {
  39945. parser.line++
  39946. parser.column = 0
  39947. } else {
  39948. parser.column++
  39949. }
  39950. }
  39951. }
  39952. parser.textNode += chunk.substring(starti, i - 1)
  39953. }
  39954. if (c === '<' && !(parser.sawRoot && parser.closedRoot && !parser.strict)) {
  39955. parser.state = S.OPEN_WAKA
  39956. parser.startTagPosition = parser.position
  39957. } else {
  39958. if (!isWhitespace(c) && (!parser.sawRoot || parser.closedRoot)) {
  39959. strictFail(parser, 'Text data outside of root node.')
  39960. }
  39961. if (c === '&') {
  39962. parser.state = S.TEXT_ENTITY
  39963. } else {
  39964. parser.textNode += c
  39965. }
  39966. }
  39967. continue
  39968. case S.SCRIPT:
  39969. // only non-strict
  39970. if (c === '<') {
  39971. parser.state = S.SCRIPT_ENDING
  39972. } else {
  39973. parser.script += c
  39974. }
  39975. continue
  39976. case S.SCRIPT_ENDING:
  39977. if (c === '/') {
  39978. parser.state = S.CLOSE_TAG
  39979. } else {
  39980. parser.script += '<' + c
  39981. parser.state = S.SCRIPT
  39982. }
  39983. continue
  39984. case S.OPEN_WAKA:
  39985. // either a /, ?, !, or text is coming next.
  39986. if (c === '!') {
  39987. parser.state = S.SGML_DECL
  39988. parser.sgmlDecl = ''
  39989. } else if (isWhitespace(c)) {
  39990. // wait for it...
  39991. } else if (isMatch(nameStart, c)) {
  39992. parser.state = S.OPEN_TAG
  39993. parser.tagName = c
  39994. } else if (c === '/') {
  39995. parser.state = S.CLOSE_TAG
  39996. parser.tagName = ''
  39997. } else if (c === '?') {
  39998. parser.state = S.PROC_INST
  39999. parser.procInstName = parser.procInstBody = ''
  40000. } else {
  40001. strictFail(parser, 'Unencoded <')
  40002. // if there was some whitespace, then add that in.
  40003. if (parser.startTagPosition + 1 < parser.position) {
  40004. var pad = parser.position - parser.startTagPosition
  40005. c = new Array(pad).join(' ') + c
  40006. }
  40007. parser.textNode += '<' + c
  40008. parser.state = S.TEXT
  40009. }
  40010. continue
  40011. case S.SGML_DECL:
  40012. if ((parser.sgmlDecl + c).toUpperCase() === CDATA) {
  40013. emitNode(parser, 'onopencdata')
  40014. parser.state = S.CDATA
  40015. parser.sgmlDecl = ''
  40016. parser.cdata = ''
  40017. } else if (parser.sgmlDecl + c === '--') {
  40018. parser.state = S.COMMENT
  40019. parser.comment = ''
  40020. parser.sgmlDecl = ''
  40021. } else if ((parser.sgmlDecl + c).toUpperCase() === DOCTYPE) {
  40022. parser.state = S.DOCTYPE
  40023. if (parser.doctype || parser.sawRoot) {
  40024. strictFail(parser,
  40025. 'Inappropriately located doctype declaration')
  40026. }
  40027. parser.doctype = ''
  40028. parser.sgmlDecl = ''
  40029. } else if (c === '>') {
  40030. emitNode(parser, 'onsgmldeclaration', parser.sgmlDecl)
  40031. parser.sgmlDecl = ''
  40032. parser.state = S.TEXT
  40033. } else if (isQuote(c)) {
  40034. parser.state = S.SGML_DECL_QUOTED
  40035. parser.sgmlDecl += c
  40036. } else {
  40037. parser.sgmlDecl += c
  40038. }
  40039. continue
  40040. case S.SGML_DECL_QUOTED:
  40041. if (c === parser.q) {
  40042. parser.state = S.SGML_DECL
  40043. parser.q = ''
  40044. }
  40045. parser.sgmlDecl += c
  40046. continue
  40047. case S.DOCTYPE:
  40048. if (c === '>') {
  40049. parser.state = S.TEXT
  40050. emitNode(parser, 'ondoctype', parser.doctype)
  40051. parser.doctype = true // just remember that we saw it.
  40052. } else {
  40053. parser.doctype += c
  40054. if (c === '[') {
  40055. parser.state = S.DOCTYPE_DTD
  40056. } else if (isQuote(c)) {
  40057. parser.state = S.DOCTYPE_QUOTED
  40058. parser.q = c
  40059. }
  40060. }
  40061. continue
  40062. case S.DOCTYPE_QUOTED:
  40063. parser.doctype += c
  40064. if (c === parser.q) {
  40065. parser.q = ''
  40066. parser.state = S.DOCTYPE
  40067. }
  40068. continue
  40069. case S.DOCTYPE_DTD:
  40070. parser.doctype += c
  40071. if (c === ']') {
  40072. parser.state = S.DOCTYPE
  40073. } else if (isQuote(c)) {
  40074. parser.state = S.DOCTYPE_DTD_QUOTED
  40075. parser.q = c
  40076. }
  40077. continue
  40078. case S.DOCTYPE_DTD_QUOTED:
  40079. parser.doctype += c
  40080. if (c === parser.q) {
  40081. parser.state = S.DOCTYPE_DTD
  40082. parser.q = ''
  40083. }
  40084. continue
  40085. case S.COMMENT:
  40086. if (c === '-') {
  40087. parser.state = S.COMMENT_ENDING
  40088. } else {
  40089. parser.comment += c
  40090. }
  40091. continue
  40092. case S.COMMENT_ENDING:
  40093. if (c === '-') {
  40094. parser.state = S.COMMENT_ENDED
  40095. parser.comment = textopts(parser.opt, parser.comment)
  40096. if (parser.comment) {
  40097. emitNode(parser, 'oncomment', parser.comment)
  40098. }
  40099. parser.comment = ''
  40100. } else {
  40101. parser.comment += '-' + c
  40102. parser.state = S.COMMENT
  40103. }
  40104. continue
  40105. case S.COMMENT_ENDED:
  40106. if (c !== '>') {
  40107. strictFail(parser, 'Malformed comment')
  40108. // allow <!-- blah -- bloo --> in non-strict mode,
  40109. // which is a comment of " blah -- bloo "
  40110. parser.comment += '--' + c
  40111. parser.state = S.COMMENT
  40112. } else {
  40113. parser.state = S.TEXT
  40114. }
  40115. continue
  40116. case S.CDATA:
  40117. if (c === ']') {
  40118. parser.state = S.CDATA_ENDING
  40119. } else {
  40120. parser.cdata += c
  40121. }
  40122. continue
  40123. case S.CDATA_ENDING:
  40124. if (c === ']') {
  40125. parser.state = S.CDATA_ENDING_2
  40126. } else {
  40127. parser.cdata += ']' + c
  40128. parser.state = S.CDATA
  40129. }
  40130. continue
  40131. case S.CDATA_ENDING_2:
  40132. if (c === '>') {
  40133. if (parser.cdata) {
  40134. emitNode(parser, 'oncdata', parser.cdata)
  40135. }
  40136. emitNode(parser, 'onclosecdata')
  40137. parser.cdata = ''
  40138. parser.state = S.TEXT
  40139. } else if (c === ']') {
  40140. parser.cdata += ']'
  40141. } else {
  40142. parser.cdata += ']]' + c
  40143. parser.state = S.CDATA
  40144. }
  40145. continue
  40146. case S.PROC_INST:
  40147. if (c === '?') {
  40148. parser.state = S.PROC_INST_ENDING
  40149. } else if (isWhitespace(c)) {
  40150. parser.state = S.PROC_INST_BODY
  40151. } else {
  40152. parser.procInstName += c
  40153. }
  40154. continue
  40155. case S.PROC_INST_BODY:
  40156. if (!parser.procInstBody && isWhitespace(c)) {
  40157. continue
  40158. } else if (c === '?') {
  40159. parser.state = S.PROC_INST_ENDING
  40160. } else {
  40161. parser.procInstBody += c
  40162. }
  40163. continue
  40164. case S.PROC_INST_ENDING:
  40165. if (c === '>') {
  40166. emitNode(parser, 'onprocessinginstruction', {
  40167. name: parser.procInstName,
  40168. body: parser.procInstBody
  40169. })
  40170. parser.procInstName = parser.procInstBody = ''
  40171. parser.state = S.TEXT
  40172. } else {
  40173. parser.procInstBody += '?' + c
  40174. parser.state = S.PROC_INST_BODY
  40175. }
  40176. continue
  40177. case S.OPEN_TAG:
  40178. if (isMatch(nameBody, c)) {
  40179. parser.tagName += c
  40180. } else {
  40181. newTag(parser)
  40182. if (c === '>') {
  40183. openTag(parser)
  40184. } else if (c === '/') {
  40185. parser.state = S.OPEN_TAG_SLASH
  40186. } else {
  40187. if (!isWhitespace(c)) {
  40188. strictFail(parser, 'Invalid character in tag name')
  40189. }
  40190. parser.state = S.ATTRIB
  40191. }
  40192. }
  40193. continue
  40194. case S.OPEN_TAG_SLASH:
  40195. if (c === '>') {
  40196. openTag(parser, true)
  40197. closeTag(parser)
  40198. } else {
  40199. strictFail(parser, 'Forward-slash in opening tag not followed by >')
  40200. parser.state = S.ATTRIB
  40201. }
  40202. continue
  40203. case S.ATTRIB:
  40204. // haven't read the attribute name yet.
  40205. if (isWhitespace(c)) {
  40206. continue
  40207. } else if (c === '>') {
  40208. openTag(parser)
  40209. } else if (c === '/') {
  40210. parser.state = S.OPEN_TAG_SLASH
  40211. } else if (isMatch(nameStart, c)) {
  40212. parser.attribName = c
  40213. parser.attribValue = ''
  40214. parser.state = S.ATTRIB_NAME
  40215. } else {
  40216. strictFail(parser, 'Invalid attribute name')
  40217. }
  40218. continue
  40219. case S.ATTRIB_NAME:
  40220. if (c === '=') {
  40221. parser.state = S.ATTRIB_VALUE
  40222. } else if (c === '>') {
  40223. strictFail(parser, 'Attribute without value')
  40224. parser.attribValue = parser.attribName
  40225. attrib(parser)
  40226. openTag(parser)
  40227. } else if (isWhitespace(c)) {
  40228. parser.state = S.ATTRIB_NAME_SAW_WHITE
  40229. } else if (isMatch(nameBody, c)) {
  40230. parser.attribName += c
  40231. } else {
  40232. strictFail(parser, 'Invalid attribute name')
  40233. }
  40234. continue
  40235. case S.ATTRIB_NAME_SAW_WHITE:
  40236. if (c === '=') {
  40237. parser.state = S.ATTRIB_VALUE
  40238. } else if (isWhitespace(c)) {
  40239. continue
  40240. } else {
  40241. strictFail(parser, 'Attribute without value')
  40242. parser.tag.attributes[parser.attribName] = ''
  40243. parser.attribValue = ''
  40244. emitNode(parser, 'onattribute', {
  40245. name: parser.attribName,
  40246. value: ''
  40247. })
  40248. parser.attribName = ''
  40249. if (c === '>') {
  40250. openTag(parser)
  40251. } else if (isMatch(nameStart, c)) {
  40252. parser.attribName = c
  40253. parser.state = S.ATTRIB_NAME
  40254. } else {
  40255. strictFail(parser, 'Invalid attribute name')
  40256. parser.state = S.ATTRIB
  40257. }
  40258. }
  40259. continue
  40260. case S.ATTRIB_VALUE:
  40261. if (isWhitespace(c)) {
  40262. continue
  40263. } else if (isQuote(c)) {
  40264. parser.q = c
  40265. parser.state = S.ATTRIB_VALUE_QUOTED
  40266. } else {
  40267. strictFail(parser, 'Unquoted attribute value')
  40268. parser.state = S.ATTRIB_VALUE_UNQUOTED
  40269. parser.attribValue = c
  40270. }
  40271. continue
  40272. case S.ATTRIB_VALUE_QUOTED:
  40273. if (c !== parser.q) {
  40274. if (c === '&') {
  40275. parser.state = S.ATTRIB_VALUE_ENTITY_Q
  40276. } else {
  40277. parser.attribValue += c
  40278. }
  40279. continue
  40280. }
  40281. attrib(parser)
  40282. parser.q = ''
  40283. parser.state = S.ATTRIB_VALUE_CLOSED
  40284. continue
  40285. case S.ATTRIB_VALUE_CLOSED:
  40286. if (isWhitespace(c)) {
  40287. parser.state = S.ATTRIB
  40288. } else if (c === '>') {
  40289. openTag(parser)
  40290. } else if (c === '/') {
  40291. parser.state = S.OPEN_TAG_SLASH
  40292. } else if (isMatch(nameStart, c)) {
  40293. strictFail(parser, 'No whitespace between attributes')
  40294. parser.attribName = c
  40295. parser.attribValue = ''
  40296. parser.state = S.ATTRIB_NAME
  40297. } else {
  40298. strictFail(parser, 'Invalid attribute name')
  40299. }
  40300. continue
  40301. case S.ATTRIB_VALUE_UNQUOTED:
  40302. if (!isAttribEnd(c)) {
  40303. if (c === '&') {
  40304. parser.state = S.ATTRIB_VALUE_ENTITY_U
  40305. } else {
  40306. parser.attribValue += c
  40307. }
  40308. continue
  40309. }
  40310. attrib(parser)
  40311. if (c === '>') {
  40312. openTag(parser)
  40313. } else {
  40314. parser.state = S.ATTRIB
  40315. }
  40316. continue
  40317. case S.CLOSE_TAG:
  40318. if (!parser.tagName) {
  40319. if (isWhitespace(c)) {
  40320. continue
  40321. } else if (notMatch(nameStart, c)) {
  40322. if (parser.script) {
  40323. parser.script += '</' + c
  40324. parser.state = S.SCRIPT
  40325. } else {
  40326. strictFail(parser, 'Invalid tagname in closing tag.')
  40327. }
  40328. } else {
  40329. parser.tagName = c
  40330. }
  40331. } else if (c === '>') {
  40332. closeTag(parser)
  40333. } else if (isMatch(nameBody, c)) {
  40334. parser.tagName += c
  40335. } else if (parser.script) {
  40336. parser.script += '</' + parser.tagName
  40337. parser.tagName = ''
  40338. parser.state = S.SCRIPT
  40339. } else {
  40340. if (!isWhitespace(c)) {
  40341. strictFail(parser, 'Invalid tagname in closing tag')
  40342. }
  40343. parser.state = S.CLOSE_TAG_SAW_WHITE
  40344. }
  40345. continue
  40346. case S.CLOSE_TAG_SAW_WHITE:
  40347. if (isWhitespace(c)) {
  40348. continue
  40349. }
  40350. if (c === '>') {
  40351. closeTag(parser)
  40352. } else {
  40353. strictFail(parser, 'Invalid characters in closing tag')
  40354. }
  40355. continue
  40356. case S.TEXT_ENTITY:
  40357. case S.ATTRIB_VALUE_ENTITY_Q:
  40358. case S.ATTRIB_VALUE_ENTITY_U:
  40359. var returnState
  40360. var buffer
  40361. switch (parser.state) {
  40362. case S.TEXT_ENTITY:
  40363. returnState = S.TEXT
  40364. buffer = 'textNode'
  40365. break
  40366. case S.ATTRIB_VALUE_ENTITY_Q:
  40367. returnState = S.ATTRIB_VALUE_QUOTED
  40368. buffer = 'attribValue'
  40369. break
  40370. case S.ATTRIB_VALUE_ENTITY_U:
  40371. returnState = S.ATTRIB_VALUE_UNQUOTED
  40372. buffer = 'attribValue'
  40373. break
  40374. }
  40375. if (c === ';') {
  40376. parser[buffer] += parseEntity(parser)
  40377. parser.entity = ''
  40378. parser.state = returnState
  40379. } else if (isMatch(parser.entity.length ? entityBody : entityStart, c)) {
  40380. parser.entity += c
  40381. } else {
  40382. strictFail(parser, 'Invalid character in entity name')
  40383. parser[buffer] += '&' + parser.entity + c
  40384. parser.entity = ''
  40385. parser.state = returnState
  40386. }
  40387. continue
  40388. default:
  40389. throw new Error(parser, 'Unknown state: ' + parser.state)
  40390. }
  40391. } // while
  40392. if (parser.position >= parser.bufferCheckPosition) {
  40393. checkBufferLength(parser)
  40394. }
  40395. return parser
  40396. }
  40397. /*! http://mths.be/fromcodepoint v0.1.0 by @mathias */
  40398. /* istanbul ignore next */
  40399. if (!String.fromCodePoint) {
  40400. (function () {
  40401. var stringFromCharCode = String.fromCharCode
  40402. var floor = Math.floor
  40403. var fromCodePoint = function () {
  40404. var MAX_SIZE = 0x4000
  40405. var codeUnits = []
  40406. var highSurrogate
  40407. var lowSurrogate
  40408. var index = -1
  40409. var length = arguments.length
  40410. if (!length) {
  40411. return ''
  40412. }
  40413. var result = ''
  40414. while (++index < length) {
  40415. var codePoint = Number(arguments[index])
  40416. if (
  40417. !isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity`
  40418. codePoint < 0 || // not a valid Unicode code point
  40419. codePoint > 0x10FFFF || // not a valid Unicode code point
  40420. floor(codePoint) !== codePoint // not an integer
  40421. ) {
  40422. throw RangeError('Invalid code point: ' + codePoint)
  40423. }
  40424. if (codePoint <= 0xFFFF) { // BMP code point
  40425. codeUnits.push(codePoint)
  40426. } else { // Astral code point; split in surrogate halves
  40427. // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
  40428. codePoint -= 0x10000
  40429. highSurrogate = (codePoint >> 10) + 0xD800
  40430. lowSurrogate = (codePoint % 0x400) + 0xDC00
  40431. codeUnits.push(highSurrogate, lowSurrogate)
  40432. }
  40433. if (index + 1 === length || codeUnits.length > MAX_SIZE) {
  40434. result += stringFromCharCode.apply(null, codeUnits)
  40435. codeUnits.length = 0
  40436. }
  40437. }
  40438. return result
  40439. }
  40440. /* istanbul ignore next */
  40441. if (Object.defineProperty) {
  40442. Object.defineProperty(String, 'fromCodePoint', {
  40443. value: fromCodePoint,
  40444. configurable: true,
  40445. writable: true
  40446. })
  40447. } else {
  40448. String.fromCodePoint = fromCodePoint
  40449. }
  40450. }())
  40451. }
  40452. })( false ? undefined : exports)
  40453. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("3be6").Buffer))
  40454. /***/ }),
  40455. /***/ "eb1b":
  40456. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  40457. "use strict";
  40458. __webpack_require__.r(__webpack_exports__);
  40459. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Image_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1587");
  40460. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Image_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Image_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
  40461. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Image_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Image_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  40462. /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_Image_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
  40463. /***/ }),
  40464. /***/ "ee84":
  40465. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  40466. "use strict";
  40467. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/common/progress/Progress.vue?vue&type=template&id=0ed980d1&
  40468. var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"sm-component-progress",style:([_vm.background && _vm.getBackgroundStyle])},[_c('a-progress',{attrs:{"percent":parseFloat(_vm.finalValue),"type":_vm.type,"stroke-width":parseFloat(_vm.strokeWidth),"show-info":_vm.showInfo,"width":_vm.calWidth,"stroke-color":_vm.colorData,"status":_vm.status,"gap-degree":_vm.type === 'circle' ? _vm.gapDegree : null,"gap-position":_vm.gapPosition,"stroke-linecap":_vm.strokeLinecap}})],1)}
  40469. var staticRenderFns = []
  40470. // CONCATENATED MODULE: ./src/common/progress/Progress.vue?vue&type=template&id=0ed980d1&
  40471. /* concated harmony reexport render */__webpack_require__.d(__webpack_exports__, "a", function() { return render; });
  40472. /* concated harmony reexport staticRenderFns */__webpack_require__.d(__webpack_exports__, "b", function() { return staticRenderFns; });
  40473. /***/ }),
  40474. /***/ "efee":
  40475. /***/ (function(module, exports, __webpack_require__) {
  40476. "use strict";
  40477. Object.defineProperty(exports, "__esModule", {
  40478. value: true
  40479. });
  40480. exports.propsBinder = exports.capitalizeFirstLetter = void 0;
  40481. var capitalizeFirstLetter = function capitalizeFirstLetter(string) {
  40482. if (!string || typeof string.charAt !== 'function') {
  40483. return string;
  40484. }
  40485. return string.charAt(0).toUpperCase() + string.slice(1);
  40486. };
  40487. exports.capitalizeFirstLetter = capitalizeFirstLetter;
  40488. var propsBinder = function propsBinder(vueElement, props) {
  40489. var _loop = function _loop(key) {
  40490. var setMethodName = 'set' + capitalizeFirstLetter(key);
  40491. if (vueElement[setMethodName]) {
  40492. vueElement.$watch(key, function (newVal) {
  40493. vueElement[setMethodName](newVal);
  40494. }, {
  40495. deep: true
  40496. });
  40497. }
  40498. };
  40499. for (var key in props) {
  40500. _loop(key);
  40501. }
  40502. };
  40503. exports.propsBinder = propsBinder;
  40504. /***/ }),
  40505. /***/ "f11d":
  40506. /***/ (function(module, exports) {
  40507. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhYAAAD+CAYAAABmz0wVAAAABGdBTUEAALGPC/xhBQAADf1JREFUeAHt3N1tnIUahdFxRA2UkAboIog2aMJI5IJUhJLyPGcGGJ+J5QTHCG/xeHHjfP5hs9cbKVseh5ub20/Hg38IECBAgAABAo8IHD+8u3nk3V9815svfsQHCBAgQIAAAQLfKPDd5fO/dZFcvs5bAgQIECBAoCfw3Fc0fMei93tBIwIECBAgMBMwLGb0ggkQIECAQE/AsOjdVCMCBAgQIDATuP8Zi4f/BTe3H39/+D7PBAgQIECAwCsROP75l0Yf7oHjhx9/+prAF4fF+Yv+7ou/9i/2MQIECBAgQOC/K3D54c3TX+64HxIPR8Zj7bwU8piK9xEgQIAAAQLPEjAsnsXmiwgQIECAAIHHBL76Usj1F7z55eP762e/JkCAAAECBLoCx79+xuL6z//j3eHt9fO5/d1vP76/VnjysHjsi6//RX5NgAABAgQIdAROP2Px67nN3W/v3l9anX7G4ofrIfFwZJw/z0shFy1vCRAgQIAAgX8s8E3fsfgs7fbT/U+JfvZ+DwQIECBAgMB/XuCvV0IOh6s/74+H4/fXz3fH49vr53Pp5w+L81d/eOf/dXF28A8BAgQIEIgJnF4K+aPR6a+b3v9Zf3op5Ofr59NLIaeXRv7/8fPI8FJI7DeCOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYgGERO6g6BAgQIEBgKWBYLPVlEyBAgACBmIBhETuoOgQIECBAYClgWCz1ZRMgQIAAgZiAYRE7qDoECBAgQGApYFgs9WUTIECAAIGYwHeXPje3n46XX//x9ng8XL/v+Ofzr5fPOT2eP3559JYAAQIECBAgcPAdC78JCBAgQIAAgX9f4Ob24+/XKW9++fj++vlw++mnz549ECBAgAABAmmBp2wD37FI/xZQjgABAgQIvKzA/c9YPBZ7vUyOd4e3p+cfLp93PBy/Pz3/fHn2lgABAgQIECDwZAEvhTyZyicSIECAAIFXIfDYNvBSyKs4vZIECBAgQOBlBAyLl3GWQoAAAQIEXoXAV3/G4qHA9bc87o7Ht6fn+5+5ePi5ngkQIECAAAECTxfw102fbuUzCRAgQIDAaxA4bQMvhbyGQ+tIgAABAgReSMCweCFoMQQIECBA4DUI3Dy7pJdCnk3nCwkQIECAQFXgf58egNySoaJ8AAAAAElFTkSuQmCC"
  40508. /***/ }),
  40509. /***/ "f14a":
  40510. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  40511. "use strict";
  40512. __webpack_require__.r(__webpack_exports__);
  40513. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CountTo_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8b18");
  40514. /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CountTo_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CountTo_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
  40515. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CountTo_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CountTo_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  40516. /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_CountTo_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
  40517. /***/ }),
  40518. /***/ "f1a1":
  40519. /***/ (function(module, exports) {
  40520. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhYAAAD+CAYAAABmz0wVAAAABGdBTUEAALGPC/xhBQAAG6VJREFUeAHt3XuwXmV9L/BnvZd9yYUUZEqwGEASSRCOLUJFLgZbUoFIpVWjE7zM1On0j17m/NWZetrpae3Y6eWPTm9qO/SiklOjnhZDBEusoAhSwBt4FEOQ62lQBBKS7Oz32t+z3r3TvWEDIXmsQj5v9s673met57fW+uSZeb55L+ut0mHejr36pqW79u5623A4fGOV0unDYVqe0nDxYZbVnQABAgQIEPiBClR7qyrtHKZ0V1VV1yxbvOxjj77p/CcPd5eRBQ791r5qy7vigP44DdNxh15FTwIECBAgQOCHLlClRyIU/Gb3iss+fDjHcsjBonXV1t9Ow8H72s1GWv3jx6aTj/mxdOySyTQ5NpbajUYaxFMX8ZP6w0F9nx8PZpa7g1iX/wwGaRBHHw9H62K518/bj/rmbXK/fmxQ18vbzvTJ2+T26Pr0tty/7hvPncTyaN+jbePhaF+5PfoOZ2vkY4vHuWa+5f3U93X/3GfUXh/bTO18Yrl5dl/1Mc5ul1tjefa4636jEgfacv3c7kaAAAECBH5kBKrG7/SuWP8Hh3o8hxQsxjZtfX9MvL+15rhj03kvX5GWtFspxfMpVZ5w80Qdy6NJNk/Uowk7T6D9AxPtzGQfc3ee3vNcXq+rJ/mZGnFGuVYOJnmOz9Pv7MSda/VyEKjbR7Xy/FyHmJnt6uOol6NvfQx5u1wn/5k5ruiU++UIkWvOHvMoDOR1o/ASq+ftPz+Yu03ebpjPvg4nuU5ejo1CdxRUYvlpfbJWNLoRIECAAIEfMYFGo/GHnY3r33soh/W8gkVMltXYpmv+IubMXz1rxUvTOSf+RL3POIB+YzDoDvv9iBR5vhxUMfHGPBs/eSHP8nlF3GKizX/lW6yOB3VDfuIgokXePv8VFXrdXvydu0ZLLpJ/o6Hf680sjNrz1rEy9Tu9On/EMeQpfTjI93llP+8slvMtasSjXC+aIobk9fFXTi55mygdG/Rn9pv7R51o7PfzseSd93OgiDPtRcfoX5fop3yycbxRIrfH7uOc8n7SMLYPlcFgtr2f+r2oG0/L1NvmAqPkcSj/dvoQIECAAIFDFmi0mo3hjx29qLFq5fHVmtWnpomJJXOLxYT+V52Nb/z1eP/F8/pf8EEHi7duHjb/pbP1ypgt3/2aCBRnnnB8asRem81qqtHNs3Q/nrbI+45nK/KMHUv1xB7TdizF3Jtn4Tp05Al5FB9irh5N8HWESP241TNz3NXzbWxV14rGPAEP8sQfU3vdP0/xB9q7de36cV6Z+9V3/SifJ/g80dcb1zVibWwSvzMZIhpjwo+Gevczd/l4c1aI5iqvqrePor3eaDlq5EOIPeTdDYcRLPoRIOoziRyRg8rMtjm15FAyOpfcP7JRivV52whKz+sfbO4/umUCBAgQIFBCoNFuN6o3rDuzWrFi5dx68VrEP14+tv49H99Q9ee2P9vyQQWLV99+e/tr39q5KQLCW849+WXplfESSBXvoxhvNndX3W5j7+NPdL5x05e23/3vt333if//yFS3282vLrgRIECAAAECLyCB1uvXvjKtWXPG/EOuPvGq1cs33nHWWd357Qs/es5gccLmmyd3dr//ydjwkvNPXpFO/fGX5P9op8l2e/dwen9131fveujaD155Z2e6I0wsbKyVAAECBAi8YARaF649PZ225vR5B1yla5e3X/LmhzacOzWvfYEHzxos6mtU7HnimkgSr3vdqpPSyUcvS41Glcaq5q5qen/jrhtv2v65j3zs2wvU1USAAAECBAi8QAUWChfx7ocbly05+rLnutbFMwaLozZfd8xUp3tdvI/i7AtXnpSOX7a0DhXjVbW7mppK37zplu2f++jm7S9QM4dNgAABAgQIPIvAguEipdsmx9oX795w8WPP1HXBYLF407bjOsP91zer6owLV56YjlsabxSNLceGwyebne7gm1+4efuNmz5+zzMV1U6AAAECBAi88AUWDBdVdedYNbFu78aLHlnoDJ8WLCY3X7+i153eFhe5WrV21YnpmEWT8emPRmr3u3siVHTv/uKXdnz+/3xSqFhIUxsBAgQIEHiRCTxDuNjeao9fNLVh3QNPPd15wWL8qi2r4oOQ28ZarRVr45mKoybG6o+UtvuDPc3909N333zrvV/c/H93PLWIxwQIECBAgMCLV2DBcJHSA/G2y4umr7hs3tsiDgSLsY9uPSMua3X9ZKt13PlxNc2lE+O10Fi3u7fd7Uzd/cVb7735E1ff++Jlc2YECBAgQIDAMwksFC7ibRKPNIaNdZ13rL9ztl8dLNr/dO3ZcQGn6xa328ecd/IJaVF830dcaSu1utN72tOdfdtvufW+Wz65RaiYVXNPgAABAgSOQIGFw0X1WNVsXtx9+yW3ZZKqtenTa+MqkFviGYqlrz3phHzRq7j4VZXanQgVU/v3bL/1tvtv/eet3zkC/ZwyAQIECBAg8BSBBcNFSk+mRvOy3sZLb6xaV23Zt2xiYvLsl/1EGm836qtytzudJ8en9+/dfstt9/37pz5931NqekiAAAECBAgcwQILhosqTTWHzTe3jp6YnDzzZctTfBdJfPVFSq39U7ubU1N7vn37l++/7VPX3n8Euzl1AgQIECBAYAGB3g033hVfEJbmXaEzLsodX715deunTlhef/IjvpgrtaciVOzdt3v77V958MtbPyNULICpiQABAgQIEEhpwXCRhu1W/obS+O7NNL5valdr/77dO2778oNf+fT1T/tcKkQCBAgQIECAwFyBhcJFK4eK9tS+Jxp79+zaccfXHvrqddsenNvJMgECBAgQIEDgmQSeGi5azX17H2/u3v3EvV/5+sNf/9d/e+iZOmonQIAAAQIECCwkMDdctCJUPL7jjq88/I1tNz680MbaCBAgQIAAAQLPJTAbLprtVae/5Ruf/bxQ8Vxi1hMgQIAAAQLPKjC47/7vNr/XG/+5Z93KSgIECBAgQIDAQQrEFbHcCBAgQIAAAQJlBASLMo6qECBAgAABAiEgWBgGBAgQIECAQDEBwaIYpUIECBAgQICAYGEMECBAgAABAsUEBItilAoRIECAAAECgoUxQIAAAQIECBQTECyKUSpEgAABAgQICBbGAAECBAgQIFBMQLAoRqkQAQIECBAgIFgYAwQIECBAgEAxAcGiGKVCBAgQIECAgGBhDBAgQIAAAQLFBASLYpQKESBAgAABAoKFMUCAAAECBAgUExAsilEqRIAAAQIECAgWxgABAgQIECBQTECwKEapEAECBAgQICBYGAMECBAgQIBAMQHBohilQgQIECBAgIBgYQwQIECAAAECxQQEi2KUChEgQIAAAQKChTFAgAABAgQIFBMQLIpRKkSAAAECBAgIFsYAAQIECBAgUExAsChGqRABAgQIECAgWBgDBAgQIECAQDEBwaIYpUIECBAgQICAYGEMECBAgAABAsUEBItilAoRIECAAAECgoUxQIAAAQIECBQTECyKUSpEgAABAgQICBbGAAECBAgQIFBMQLAoRqkQAQIECBAgIFgYAwQIECBAgEAxAcGiGKVCBAgQIECAgGBhDBAgQIAAAQLFBASLYpQKESBAgAABAoKFMUCAAAECBAgUExAsilEqRIAAAQIECAgWxgABAgQIECBQTECwKEapEAECBAgQICBYGAMECBAgQIBAMQHBohilQgQIECBAgIBgYQwQIECAAAECxQQEi2KUChEgQIAAAQKChTFAgAABAgQIFBMQLIpRKkSAAAECBAgIFsYAAQIECBAgUExAsChGqRABAgQIECAgWBgDBAgQIECAQDEBwaIYpUIECBAgQICAYGEMECBAgAABAsUEBItilAoRIECAAAECgoUxQIAAAQIECBQTECyKUSpEgAABAgQICBbGAAECBAgQIFBMQLAoRqkQAQIECBAgIFgYAwQIECBAgEAxAcGiGKVCBAgQIECAgGBhDBAgQIAAAQLFBASLYpQKESBAgAABAoKFMUCAAAECBAgUExAsilEqRIAAAQIECAgWxgABAgQIECBQTECwKEapEAECBAgQICBYGAMECBAgQIBAMQHBohilQgQIECBAgIBgYQwQIECAAAECxQQEi2KUChEgQIAAAQKChTFAgAABAgQIFBMQLIpRKkSAAAECBAgIFsYAAQIECBAgUExAsChGqRABAgQIECAgWBgDBAgQIECAQDEBwaIYpUIECBAgQICAYGEMECBAgAABAsUEBItilAoRIECAAAECgoUxQIAAAQIECBQTECyKUSpEgAABAgQICBbGAAECBAgQIFBMQLAoRqkQAQIECBAgIFgYAwQIECBAgEAxAcGiGKVCBAgQIECAgGBhDBAgQIAAAQLFBASLYpQKESBAgAABAoKFMUCAAAECBAgUExAsilEqRIAAAQIECAgWxgABAgQIECBQTECwKEapEAECBAgQICBYGAMECBAgQIBAMQHBohilQgQIECBAgIBgYQwQIECAAAECxQQEi2KUChEgQIAAAQKChTFAgAABAgQIFBMQLIpRKkSAAAECBAgIFsYAAQIECBAgUExAsChGqRABAgQIECAgWBgDBAgQIECAQDEBwaIYpUIECBAgQICAYGEMECBAgAABAsUEBItilAoRIECAAAECgoUxQIAAAQIECBQTECyKUSpEgAABAgQICBbGAAECBAgQIFBMQLAoRqkQAQIECBAgIFgYAwQIECBAgEAxAcGiGKVCBAgQIECAgGBhDBAgQIAAAQLFBASLYpQKESBAgAABAoKFMUCAAAECBAgUExAsilEqRIAAAQIECAgWxgABAgQIECBQTECwKEapEAECBAgQICBYGAMECBAgQIBAMQHBohilQgQIECBAgIBgYQwQIECAAAECxQQEi2KUChEgQIAAAQKChTFAgAABAgQIFBMQLIpRKkSAAAECBAgIFsYAAQIECBAgUExAsChGqRABAgQIECAgWBgDBAgQIECAQDEBwaIYpUIECBAgQICAYGEMECBAgAABAsUEBItilAoRIECAAAECgoUxQIAAAQIECBQTECyKUSpEgAABAgQICBbGAAECBAgQIFBMQLAoRqkQAQIECBAgIFgYAwQIECBAgEAxAcGiGKVCBAgQIECAgGBhDBAgQIAAAQLFBASLYpQKESBAgAABAoKFMUCAAAECBAgUExAsilEqRIAAAQIECAgWxgABAgQIECBQTECwKEapEAECBAgQICBYGAMECBAgQIBAMQHBohilQgQIECBAgIBgYQwQIECAAAECxQQEi2KUChEgQIAAAQKChTFAgAABAgQIFBMQLIpRKkSAAAECBAgIFsYAAQIECBAgUExAsChGqRABAgQIECAgWBgDBAgQIECAQDEBwaIYpUIECBAgQICAYGEMECBAgAABAsUEBItilAoRIECAAAECgoUxQIAAAQIECBQTECyKUSpEgAABAgQICBbGAAECBAgQIFBMQLAoRqkQAQIECBAgIFgYAwQIECBAgEAxAcGiGKVCBAgQIECAgGBhDBAgQIAAAQLFBASLYpQKESBAgAABAoKFMUCAAAECBAgUExAsilEqRIAAAQIECAgWxgABAgQIECBQTECwKEapEAECBAgQICBYGAMECBAgQIBAMQHBohilQgQIECBAgIBgYQwQIECAAAECxQQEi2KUChEgQIAAAQKChTFAgAABAgQIFBMQLIpRKkSAAAECBAgIFsYAAQIECBAgUExAsChGqRABAgQIECAgWBgDBAgQIECAQDEBwaIYpUIECBAgQICAYGEMECBAgAABAsUEBItilAoRIECAAAECgoUxQIAAAQIECBQTECyKUSpEgAABAgQICBbGAAECBAgQIFBMQLAoRqkQAQIECBAgIFgYAwQIECBAgEAxAcGiGKVCBAgQIECAgGBhDBAgQIAAAQLFBASLYpQKESBAgAABAoKFMUCAAAECBAgUExAsilEqRIAAAQIECAgWxgABAgQIECBQTECwKEapEAECBAgQICBYGAMECBAgQIBAMQHBohilQgQIECBAgIBgYQwQIECAAAECxQQEi2KUChEgQIAAAQKChTFAgAABAgQIFBMQLIpRKkSAAAECBAgIFsYAAQIECBAgUExAsChGqRABAgQIECAgWBgDBAgQIECAQDEBwaIYpUIECBAgQICAYGEMECBAgAABAsUEBItilAoRIECAAAECgoUxQIAAAQIECBQTECyKUSpEgAABAgQICBbGAAECBAgQIFBMQLAoRqkQAQIECBAgIFgYAwQIECBAgEAxAcGiGKVCBAgQIECAQCNV6ToMBAgQIECAAIHDFfipS9etaKR1Z38kVY07DreY/gQIECBAgMCRK3Dm+jeceMrZr17RTDfcMEynnPvlNJh6VXAcfeSSOHMCBAgQIEDgUATOuuySE1e+5tUn9hYvXtoYu2rL/043/MP+VA3/JFXV9w+loD4ECBAgQIDAkSnw0z9/6UmrzjnrpP7iJUsHk5NHNQbD9Lt1uLhp6+Op2fyjlKqpI5PGWRMgQIAAAQLPR+A1l68/+RXn/vRJ/UWLlvbGx5c2qirVnwo5EC4+f/WDqdn4s3jmYvB8CtuWAAECBAgQOLIEzvnFnz959QWvPbm3aNGSwcTkkmajSoNIDwc+bnogXHzhU19Pw+rKI4vH2RIgQIAAAQIHK/Dat7zp5avPO+fl3bHxxcOJ8SXxREUaDofp9gcf/q9gkYsdCBc3b/m31Bh+6mB3YDsCBAgQIEDgyBA4b8MvnrLm/HNP6U+MLx6MR7AYptTrD9PN33koPbJnbydfx2LeeyoOhIsvbP2n1Ki+dGQwOUsCBAgQIEDguQTOf/svrFxz3mtOiUCxKP/Gqx+p3x+kL957f3p0376p5rB5eQSL5iVR6Mm5xepwsema303HT34ggsf2uessEyBAgAABAkeewNqNb1152gXnrxyMT0z2x9qT8eJH6vQG6YZ77kuPTe1/MueJ6Xdcem2jt/HSG6tW62fjDZuPzWWqw8Xl73pv6g3+ND4p8t256ywTIECAAAECR47AhVdsWLXmgnNXDcfbE8Ox1mQ8UZGmu9302W/vSLumO4/lHJHzRBbJ6+rb2Ee3njGoBtdHADluti3fx9Mcv9f54N9/KA2m3xfrFs9dZ5kAAQIECBB4cQu8/p1ve0UOFb1GY6zXao3nZyp2T02n6791b9rb6z7SGDbWdd6x/s5ZhQPBIjeMX7VlVTxTsS3eh7FidoN8X4eLD33wY6mf/lfUa85dZ5kAAQIECBB4cQr8zLve/orT155/ar/RaHciWAwjBDy2Zyr9azxTMd3tPxD54KLpKy6b95aJecEis0xuvn5Frzu9LT42smouUx0uPvA32+JDqr86t90yAQIECBAg8OITuOjdG0995esjVKTU6jdbY4P4+Mf39uxLn/nmPakzGGxvtccvmtqw7oGnnvnTgkXeYPGmbcd1hvuvj3BxxtwOdbj467+N61z03zq33TIBAgQIECDw4hH4uV965+ozLjxvda+qmvHbHsTLGf+xa0/6zN07Um84vHOsmli3d+NFjyx0xgsGi7zhUZuvO2aq070uXhY5e27HOlz81QdzsdfNbbdMgAABAgQIvPAF3vCed6454/UXnDpoNFr9VLX6cTnNBx5/IkLFd+JFi8Ftk2Pti3dvuHjeBz7mnvUzBou80bFX37R0157Ht8SzH2vndmqk4e93PvChXrzUctrcdssECBAgQIDAC1fgkl9+92n/42cuWB3Xu2r24vOj8eRC2v6976dtESqG1fDGZUuOvuzRN50/7xIVTz3bZw0WeeMTNt88ubP7/U9GiMjXuzhwa/S77+986O8m4t2hLz3QaIEAAQIECBB4wQmMTUw0Lv+fv3LmyjN/8qR4T0WVg8VgOEj/b+ej6bPbI1SkdO3y9kve/NCGc+ddVHOhE33OYJE7vfr229tf+9bOTREi3jK3SGN6+k86V/79smg7am67ZQIECBAgQOBHW2BsfKxxzEuXLzrt3HOO/8mfXXvqxNLFk/EKRYSKYSN/E+lXH9qZbthxfyxVn3jV6uUb7zjrrO7BnNFBBYtc6K2bh81/6Wy9Mj5q8u65hav9+z/e/+imzqDT8THUuTCWCRAgQOAHJtCIN/zFhR2rqtGMn1a8xTA/iuV2Xo77vEFe3WqN7uNxozXq1Gy1okurGsZ3fDdyn2Z8hVZeyn2azRR9Gnl5GL/N6FNvGPUbsWFcfyGuBdXK5eMAomZ8pWddIK/K/eu2vE07b1H3qfcTj3LNaMjH3WjmwnHt6ziQ6BEHkOvnNXHsM0eTa8cuo099i61Gy/ECRT6/ul6+ena9nB/ns5n5qe+bzXa01Yc1UyHu8vnV2+Z++UjiMPJW8Zu/86M/HNT3X7r/4XTTvQ/Exa6qf7x8bP17Pr6hiicyDu520MEil4tPiVRjm7b+edz/2rzy/f7O4dfvfHiw/Z7/qJ54fN+gFxcOdyNAgAABAj9AgTpQNIYxAccEmr+zO8+b4+MxS8bcGRNoPMwzfEycsS7PuTlY5G3qST0CSPzEdB0zekyvOTTEf4+bMXs3WmPRFLc8A+eJN37jKzvjfmYSz/3r+T/W54m6Dhej7etpOib+Vp0i8rTezDkg9htdYvP8OI4v2mKDvNjIE330GoWGel95t3WqGN3VbbE4Oo7RCdThIOebOsjkw8znH3Xj4OM3b51JcuH6Z6Ytb9gIirpI9Mn9ZnYch9Lv96v8noov7Hgg3RLBIkr8ZWfj+t+I+9x80LfnFSxmq0a4eH+8M/S3Zh+7J0CAAAEC/60C+b/XMRnGpFfvNqbM/LC+nPSoLebs/Dg3jjatH8c7ECM8REqYOdjcL/eq+9bLES5Gc3T99d+z7blOvW3Uirm6Xs49D+x3dn3dVk/eo/1Fe2wdy8N627yjOk/kpyuiQCSD+hhznbpW7j+z/5wb6vV1fJhZX9cbHW8Eh6hVH330mTmWvLd4UMVJRwyKcxmda66d9xv5pt7P7P5G+x8dw5PTnfS5e+6P91V8L9f4wwgV743Ded637HJIt9ZVW387DQfvO6TOOhEgQIAAgcMQyP+FzpN9nsTyJJpn6fpPnqxn2vOaPEmPtsrtox3Ors/3o21y+8xyHQDypB+P4ydPy/Vi/JUn4fwgt40m8tGknSfr/H/6OnzU+4twEtvV+43Heb+5ejx3UN/Xr3nEUjy3MJro67Kj/cw9thwKDjyu6+RtRvVyxbxu3jZ5Xd6u3le999Hjuk8j5aASi3W/3LcbHyOd6nTSY3v3p3sefSx967uPpk5+waFq/E7vivV/EGUO6ZbP9ZBv7au2vCss/zj+Ted9v8ghF9SRAAECBAgQ+OEIVOmRCAW/2b3isg8fzgEcVrDIO66vdbF319vifRdvjGKnx7NTy+N5J19Wdjj/KvoSIECAAIEfuEC1N5642BlPENwVz4Rcs2zxso891zUqDuaQ/hOJLHziXn7NhAAAAABJRU5ErkJggg=="
  40521. /***/ }),
  40522. /***/ "f29e":
  40523. /***/ (function(module, exports, __webpack_require__) {
  40524. module.exports = __webpack_require__("9c77");
  40525. /***/ }),
  40526. /***/ "f2ac":
  40527. /***/ (function(module, exports) {
  40528. // shim for using process in browser
  40529. var process = module.exports = {};
  40530. // cached from whatever global is present so that test runners that stub it
  40531. // don't break things. But we need to wrap it in a try catch in case it is
  40532. // wrapped in strict mode code which doesn't define any globals. It's inside a
  40533. // function because try/catches deoptimize in certain engines.
  40534. var cachedSetTimeout;
  40535. var cachedClearTimeout;
  40536. function defaultSetTimout() {
  40537. throw new Error('setTimeout has not been defined');
  40538. }
  40539. function defaultClearTimeout () {
  40540. throw new Error('clearTimeout has not been defined');
  40541. }
  40542. (function () {
  40543. try {
  40544. if (typeof setTimeout === 'function') {
  40545. cachedSetTimeout = setTimeout;
  40546. } else {
  40547. cachedSetTimeout = defaultSetTimout;
  40548. }
  40549. } catch (e) {
  40550. cachedSetTimeout = defaultSetTimout;
  40551. }
  40552. try {
  40553. if (typeof clearTimeout === 'function') {
  40554. cachedClearTimeout = clearTimeout;
  40555. } else {
  40556. cachedClearTimeout = defaultClearTimeout;
  40557. }
  40558. } catch (e) {
  40559. cachedClearTimeout = defaultClearTimeout;
  40560. }
  40561. } ())
  40562. function runTimeout(fun) {
  40563. if (cachedSetTimeout === setTimeout) {
  40564. //normal enviroments in sane situations
  40565. return setTimeout(fun, 0);
  40566. }
  40567. // if setTimeout wasn't available but was latter defined
  40568. if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
  40569. cachedSetTimeout = setTimeout;
  40570. return setTimeout(fun, 0);
  40571. }
  40572. try {
  40573. // when when somebody has screwed with setTimeout but no I.E. maddness
  40574. return cachedSetTimeout(fun, 0);
  40575. } catch(e){
  40576. try {
  40577. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  40578. return cachedSetTimeout.call(null, fun, 0);
  40579. } catch(e){
  40580. // 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
  40581. return cachedSetTimeout.call(this, fun, 0);
  40582. }
  40583. }
  40584. }
  40585. function runClearTimeout(marker) {
  40586. if (cachedClearTimeout === clearTimeout) {
  40587. //normal enviroments in sane situations
  40588. return clearTimeout(marker);
  40589. }
  40590. // if clearTimeout wasn't available but was latter defined
  40591. if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
  40592. cachedClearTimeout = clearTimeout;
  40593. return clearTimeout(marker);
  40594. }
  40595. try {
  40596. // when when somebody has screwed with setTimeout but no I.E. maddness
  40597. return cachedClearTimeout(marker);
  40598. } catch (e){
  40599. try {
  40600. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  40601. return cachedClearTimeout.call(null, marker);
  40602. } catch (e){
  40603. // 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.
  40604. // Some versions of I.E. have different rules for clearTimeout vs setTimeout
  40605. return cachedClearTimeout.call(this, marker);
  40606. }
  40607. }
  40608. }
  40609. var queue = [];
  40610. var draining = false;
  40611. var currentQueue;
  40612. var queueIndex = -1;
  40613. function cleanUpNextTick() {
  40614. if (!draining || !currentQueue) {
  40615. return;
  40616. }
  40617. draining = false;
  40618. if (currentQueue.length) {
  40619. queue = currentQueue.concat(queue);
  40620. } else {
  40621. queueIndex = -1;
  40622. }
  40623. if (queue.length) {
  40624. drainQueue();
  40625. }
  40626. }
  40627. function drainQueue() {
  40628. if (draining) {
  40629. return;
  40630. }
  40631. var timeout = runTimeout(cleanUpNextTick);
  40632. draining = true;
  40633. var len = queue.length;
  40634. while(len) {
  40635. currentQueue = queue;
  40636. queue = [];
  40637. while (++queueIndex < len) {
  40638. if (currentQueue) {
  40639. currentQueue[queueIndex].run();
  40640. }
  40641. }
  40642. queueIndex = -1;
  40643. len = queue.length;
  40644. }
  40645. currentQueue = null;
  40646. draining = false;
  40647. runClearTimeout(timeout);
  40648. }
  40649. process.nextTick = function (fun) {
  40650. var args = new Array(arguments.length - 1);
  40651. if (arguments.length > 1) {
  40652. for (var i = 1; i < arguments.length; i++) {
  40653. args[i - 1] = arguments[i];
  40654. }
  40655. }
  40656. queue.push(new Item(fun, args));
  40657. if (queue.length === 1 && !draining) {
  40658. runTimeout(drainQueue);
  40659. }
  40660. };
  40661. // v8 likes predictible objects
  40662. function Item(fun, array) {
  40663. this.fun = fun;
  40664. this.array = array;
  40665. }
  40666. Item.prototype.run = function () {
  40667. this.fun.apply(null, this.array);
  40668. };
  40669. process.title = 'browser';
  40670. process.browser = true;
  40671. process.env = {};
  40672. process.argv = [];
  40673. process.version = ''; // empty string to avoid regexp issues
  40674. process.versions = {};
  40675. function noop() {}
  40676. process.on = noop;
  40677. process.addListener = noop;
  40678. process.once = noop;
  40679. process.off = noop;
  40680. process.removeListener = noop;
  40681. process.removeAllListeners = noop;
  40682. process.emit = noop;
  40683. process.prependListener = noop;
  40684. process.prependOnceListener = noop;
  40685. process.listeners = function (name) { return [] }
  40686. process.binding = function (name) {
  40687. throw new Error('process.binding is not supported');
  40688. };
  40689. process.cwd = function () { return '/' };
  40690. process.chdir = function (dir) {
  40691. throw new Error('process.chdir is not supported');
  40692. };
  40693. process.umask = function() { return 0; };
  40694. /***/ }),
  40695. /***/ "f2e5":
  40696. /***/ (function(module, exports, __webpack_require__) {
  40697. // extracted by mini-css-extract-plugin
  40698. /***/ }),
  40699. /***/ "f344":
  40700. /***/ (function(module, exports, __webpack_require__) {
  40701. /* WEBPACK VAR INJECTION */(function(global) {/**
  40702. * lodash (Custom Build) <https://lodash.com/>
  40703. * Build: `lodash modularize exports="npm" -o ./`
  40704. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  40705. * Released under MIT license <https://lodash.com/license>
  40706. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  40707. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  40708. */
  40709. /** Used as references for various `Number` constants. */
  40710. var INFINITY = 1 / 0;
  40711. /** `Object#toString` result references. */
  40712. var symbolTag = '[object Symbol]';
  40713. /** Detect free variable `global` from Node.js. */
  40714. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  40715. /** Detect free variable `self`. */
  40716. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  40717. /** Used as a reference to the global object. */
  40718. var root = freeGlobal || freeSelf || Function('return this')();
  40719. /** Used for built-in method references. */
  40720. var objectProto = Object.prototype;
  40721. /** Used to generate unique IDs. */
  40722. var idCounter = 0;
  40723. /**
  40724. * Used to resolve the
  40725. * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
  40726. * of values.
  40727. */
  40728. var objectToString = objectProto.toString;
  40729. /** Built-in value references. */
  40730. var Symbol = root.Symbol;
  40731. /** Used to convert symbols to primitives and strings. */
  40732. var symbolProto = Symbol ? Symbol.prototype : undefined,
  40733. symbolToString = symbolProto ? symbolProto.toString : undefined;
  40734. /**
  40735. * The base implementation of `_.toString` which doesn't convert nullish
  40736. * values to empty strings.
  40737. *
  40738. * @private
  40739. * @param {*} value The value to process.
  40740. * @returns {string} Returns the string.
  40741. */
  40742. function baseToString(value) {
  40743. // Exit early for strings to avoid a performance hit in some environments.
  40744. if (typeof value == 'string') {
  40745. return value;
  40746. }
  40747. if (isSymbol(value)) {
  40748. return symbolToString ? symbolToString.call(value) : '';
  40749. }
  40750. var result = (value + '');
  40751. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  40752. }
  40753. /**
  40754. * Checks if `value` is object-like. A value is object-like if it's not `null`
  40755. * and has a `typeof` result of "object".
  40756. *
  40757. * @static
  40758. * @memberOf _
  40759. * @since 4.0.0
  40760. * @category Lang
  40761. * @param {*} value The value to check.
  40762. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  40763. * @example
  40764. *
  40765. * _.isObjectLike({});
  40766. * // => true
  40767. *
  40768. * _.isObjectLike([1, 2, 3]);
  40769. * // => true
  40770. *
  40771. * _.isObjectLike(_.noop);
  40772. * // => false
  40773. *
  40774. * _.isObjectLike(null);
  40775. * // => false
  40776. */
  40777. function isObjectLike(value) {
  40778. return !!value && typeof value == 'object';
  40779. }
  40780. /**
  40781. * Checks if `value` is classified as a `Symbol` primitive or object.
  40782. *
  40783. * @static
  40784. * @memberOf _
  40785. * @since 4.0.0
  40786. * @category Lang
  40787. * @param {*} value The value to check.
  40788. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  40789. * @example
  40790. *
  40791. * _.isSymbol(Symbol.iterator);
  40792. * // => true
  40793. *
  40794. * _.isSymbol('abc');
  40795. * // => false
  40796. */
  40797. function isSymbol(value) {
  40798. return typeof value == 'symbol' ||
  40799. (isObjectLike(value) && objectToString.call(value) == symbolTag);
  40800. }
  40801. /**
  40802. * Converts `value` to a string. An empty string is returned for `null`
  40803. * and `undefined` values. The sign of `-0` is preserved.
  40804. *
  40805. * @static
  40806. * @memberOf _
  40807. * @since 4.0.0
  40808. * @category Lang
  40809. * @param {*} value The value to process.
  40810. * @returns {string} Returns the string.
  40811. * @example
  40812. *
  40813. * _.toString(null);
  40814. * // => ''
  40815. *
  40816. * _.toString(-0);
  40817. * // => '-0'
  40818. *
  40819. * _.toString([1, 2, 3]);
  40820. * // => '1,2,3'
  40821. */
  40822. function toString(value) {
  40823. return value == null ? '' : baseToString(value);
  40824. }
  40825. /**
  40826. * Generates a unique ID. If `prefix` is given, the ID is appended to it.
  40827. *
  40828. * @static
  40829. * @since 0.1.0
  40830. * @memberOf _
  40831. * @category Util
  40832. * @param {string} [prefix=''] The value to prefix the ID with.
  40833. * @returns {string} Returns the unique ID.
  40834. * @example
  40835. *
  40836. * _.uniqueId('contact_');
  40837. * // => 'contact_104'
  40838. *
  40839. * _.uniqueId();
  40840. * // => '105'
  40841. */
  40842. function uniqueId(prefix) {
  40843. var id = ++idCounter;
  40844. return toString(prefix) + id;
  40845. }
  40846. module.exports = uniqueId;
  40847. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("698d")))
  40848. /***/ }),
  40849. /***/ "f3da":
  40850. /***/ (function(module, exports, __webpack_require__) {
  40851. "use strict";
  40852. var _interopRequireDefault = __webpack_require__("8e6d");
  40853. Object.defineProperty(exports, "__esModule", {
  40854. value: true
  40855. });
  40856. exports.default = void 0;
  40857. var _theme = _interopRequireDefault(__webpack_require__("9259"));
  40858. //
  40859. //
  40860. //
  40861. //
  40862. var _default = {
  40863. name: 'SmIframe',
  40864. mixins: [_theme.default],
  40865. props: {
  40866. src: {
  40867. type: String
  40868. }
  40869. }
  40870. };
  40871. exports.default = _default;
  40872. /***/ }),
  40873. /***/ "f53a":
  40874. /***/ (function(module, exports, __webpack_require__) {
  40875. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
  40876. * JavaScript Cookie v2.2.1
  40877. * https://github.com/js-cookie/js-cookie
  40878. *
  40879. * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
  40880. * Released under the MIT license
  40881. */
  40882. ;(function (factory) {
  40883. var registeredInModuleLoader;
  40884. if (true) {
  40885. !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  40886. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  40887. (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
  40888. __WEBPACK_AMD_DEFINE_FACTORY__),
  40889. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  40890. registeredInModuleLoader = true;
  40891. }
  40892. if (true) {
  40893. module.exports = factory();
  40894. registeredInModuleLoader = true;
  40895. }
  40896. if (!registeredInModuleLoader) {
  40897. var OldCookies = window.Cookies;
  40898. var api = window.Cookies = factory();
  40899. api.noConflict = function () {
  40900. window.Cookies = OldCookies;
  40901. return api;
  40902. };
  40903. }
  40904. }(function () {
  40905. function extend () {
  40906. var i = 0;
  40907. var result = {};
  40908. for (; i < arguments.length; i++) {
  40909. var attributes = arguments[ i ];
  40910. for (var key in attributes) {
  40911. result[key] = attributes[key];
  40912. }
  40913. }
  40914. return result;
  40915. }
  40916. function decode (s) {
  40917. return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
  40918. }
  40919. function init (converter) {
  40920. function api() {}
  40921. function set (key, value, attributes) {
  40922. if (typeof document === 'undefined') {
  40923. return;
  40924. }
  40925. attributes = extend({
  40926. path: '/'
  40927. }, api.defaults, attributes);
  40928. if (typeof attributes.expires === 'number') {
  40929. attributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);
  40930. }
  40931. // We're using "expires" because "max-age" is not supported by IE
  40932. attributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';
  40933. try {
  40934. var result = JSON.stringify(value);
  40935. if (/^[\{\[]/.test(result)) {
  40936. value = result;
  40937. }
  40938. } catch (e) {}
  40939. value = converter.write ?
  40940. converter.write(value, key) :
  40941. encodeURIComponent(String(value))
  40942. .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
  40943. key = encodeURIComponent(String(key))
  40944. .replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)
  40945. .replace(/[\(\)]/g, escape);
  40946. var stringifiedAttributes = '';
  40947. for (var attributeName in attributes) {
  40948. if (!attributes[attributeName]) {
  40949. continue;
  40950. }
  40951. stringifiedAttributes += '; ' + attributeName;
  40952. if (attributes[attributeName] === true) {
  40953. continue;
  40954. }
  40955. // Considers RFC 6265 section 5.2:
  40956. // ...
  40957. // 3. If the remaining unparsed-attributes contains a %x3B (";")
  40958. // character:
  40959. // Consume the characters of the unparsed-attributes up to,
  40960. // not including, the first %x3B (";") character.
  40961. // ...
  40962. stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
  40963. }
  40964. return (document.cookie = key + '=' + value + stringifiedAttributes);
  40965. }
  40966. function get (key, json) {
  40967. if (typeof document === 'undefined') {
  40968. return;
  40969. }
  40970. var jar = {};
  40971. // To prevent the for loop in the first place assign an empty array
  40972. // in case there are no cookies at all.
  40973. var cookies = document.cookie ? document.cookie.split('; ') : [];
  40974. var i = 0;
  40975. for (; i < cookies.length; i++) {
  40976. var parts = cookies[i].split('=');
  40977. var cookie = parts.slice(1).join('=');
  40978. if (!json && cookie.charAt(0) === '"') {
  40979. cookie = cookie.slice(1, -1);
  40980. }
  40981. try {
  40982. var name = decode(parts[0]);
  40983. cookie = (converter.read || converter)(cookie, name) ||
  40984. decode(cookie);
  40985. if (json) {
  40986. try {
  40987. cookie = JSON.parse(cookie);
  40988. } catch (e) {}
  40989. }
  40990. jar[name] = cookie;
  40991. if (key === name) {
  40992. break;
  40993. }
  40994. } catch (e) {}
  40995. }
  40996. return key ? jar[key] : jar;
  40997. }
  40998. api.set = set;
  40999. api.get = function (key) {
  41000. return get(key, false /* read as raw */);
  41001. };
  41002. api.getJSON = function (key) {
  41003. return get(key, true /* read as json */);
  41004. };
  41005. api.remove = function (key, attributes) {
  41006. set(key, '', extend(attributes, {
  41007. expires: -1
  41008. }));
  41009. };
  41010. api.defaults = {};
  41011. api.withConverter = init;
  41012. return api;
  41013. }
  41014. return init(function () {});
  41015. }));
  41016. /***/ }),
  41017. /***/ "f586":
  41018. /***/ (function(module, exports) {
  41019. module.exports = function(module) {
  41020. if (!module.webpackPolyfill) {
  41021. module.deprecate = function() {};
  41022. module.paths = [];
  41023. // module.parent = undefined by default
  41024. if (!module.children) module.children = [];
  41025. Object.defineProperty(module, "loaded", {
  41026. enumerable: true,
  41027. get: function() {
  41028. return module.l;
  41029. }
  41030. });
  41031. Object.defineProperty(module, "id", {
  41032. enumerable: true,
  41033. get: function() {
  41034. return module.i;
  41035. }
  41036. });
  41037. module.webpackPolyfill = 1;
  41038. }
  41039. return module;
  41040. };
  41041. /***/ }),
  41042. /***/ "f5a9":
  41043. /***/ (function(module, exports, __webpack_require__) {
  41044. "use strict";
  41045. var _interopRequireDefault = __webpack_require__("8e6d");
  41046. Object.defineProperty(exports, "__esModule", {
  41047. value: true
  41048. });
  41049. exports.default = void 0;
  41050. var _theme = _interopRequireDefault(__webpack_require__("9259"));
  41051. var _borderConfig = _interopRequireDefault(__webpack_require__("a759"));
  41052. var _lodash = _interopRequireDefault(__webpack_require__("f344"));
  41053. var _resizeDetector = __webpack_require__("e0f2");
  41054. var _debounce = _interopRequireDefault(__webpack_require__("331f"));
  41055. //
  41056. //
  41057. //
  41058. //
  41059. //
  41060. //
  41061. //
  41062. //
  41063. var _default = {
  41064. name: 'SmBorder',
  41065. mixins: [_theme.default],
  41066. props: {
  41067. // border的类型
  41068. type: {
  41069. type: [String],
  41070. default: 'border1'
  41071. },
  41072. customBorder: {
  41073. type: Object
  41074. }
  41075. },
  41076. data: function data() {
  41077. return {
  41078. borderId: (0, _lodash.default)("".concat(this.$options.name.toLowerCase(), "-")),
  41079. // content的位置大小
  41080. position: {
  41081. top: 0,
  41082. left: 0,
  41083. width: 0,
  41084. height: 0
  41085. },
  41086. // 上右下左的边距
  41087. borderEdge: [],
  41088. // border的宽度
  41089. borderWidth: [],
  41090. // border组件的宽高
  41091. width: 0,
  41092. height: 0
  41093. };
  41094. },
  41095. computed: {
  41096. borderConfig: function borderConfig() {
  41097. if (!this.customBorder && this.type) {
  41098. return _borderConfig.default[this.type];
  41099. } else {
  41100. return this.customBorder;
  41101. }
  41102. },
  41103. borderImage: function borderImage() {
  41104. if ((!this.customBorder || !this.customBorder.src) && this.type) {
  41105. return __webpack_require__("ded2")("./".concat(this.type, ".png"));
  41106. } else {
  41107. return "".concat(this.customBorder.src);
  41108. }
  41109. },
  41110. borderStyle: function borderStyle() {
  41111. var borderImageSlice = this.borderWidth.join(' ') + ' fill';
  41112. var borderWidth = this.borderWidth.join('px ') + 'px';
  41113. return {
  41114. borderWidth: borderWidth,
  41115. // 当图片大小超过8KB, webpack就不会转换成base64, 直接引入时路径出错(此时的图片路径在index.html下?)
  41116. borderImage: 'url(' + this.borderImage + ') ' + borderImageSlice + ' / 1 / 0 stretch'
  41117. };
  41118. },
  41119. contentStyle: function contentStyle() {
  41120. var contentStyle = Object.assign({}, this.position);
  41121. for (var key in contentStyle) {
  41122. contentStyle[key] = contentStyle[key] + 'px';
  41123. }
  41124. return contentStyle;
  41125. }
  41126. },
  41127. watch: {
  41128. // type变化了,需要读取对应的配置,重新计算位置大小
  41129. type: function type() {
  41130. this.setPosition();
  41131. }
  41132. },
  41133. mounted: function mounted() {
  41134. this.setPosition();
  41135. this.resizeHanlder = (0, _debounce.default)(this.calcPosition.bind(this), 500);
  41136. (0, _resizeDetector.addListener)(this.$el, this.resizeHanlder);
  41137. },
  41138. updated: function updated() {
  41139. // 避免style.width< borderWidth,引起的dom重绘, 宽高会改变, 需要重新计算组件的位置大小
  41140. this.calcPosition();
  41141. },
  41142. beforeDestroy: function beforeDestroy() {
  41143. (0, _resizeDetector.removeListener)(this.$el, this.resizeHandler);
  41144. },
  41145. methods: {
  41146. // 设置content的位置大小
  41147. setPosition: function setPosition() {
  41148. var borderConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.borderConfig;
  41149. this.borderEdge = borderConfig.borderEdge;
  41150. this.borderWidth = borderConfig.borderWidth;
  41151. this.calcPosition();
  41152. },
  41153. // 计算content的top,left,width,height
  41154. calcPosition: function calcPosition() {
  41155. // 设置总宽高
  41156. this.setWidthHeight();
  41157. var _this$borderEdge = this.borderEdge,
  41158. top = _this$borderEdge.top,
  41159. left = _this$borderEdge.left,
  41160. bottom = _this$borderEdge.bottom,
  41161. right = _this$borderEdge.right; // 由于定位是相当于content-width来定位, 所以要减去border的宽度(left和 top)
  41162. this.position.left = left - this.borderWidth[3];
  41163. this.position.top = top - this.borderWidth[0]; // 内容的宽度 = 总的宽度 - 总的边距
  41164. this.position.width = this.width - left - right;
  41165. this.position.height = this.height - top - bottom;
  41166. },
  41167. // 设置宽高
  41168. setWidthHeight: function setWidthHeight() {
  41169. if (this.$refs[this.borderId]) {
  41170. this.width = this.$refs[this.borderId].offsetWidth;
  41171. this.height = this.$refs[this.borderId].offsetHeight;
  41172. }
  41173. }
  41174. }
  41175. };
  41176. exports.default = _default;
  41177. /***/ }),
  41178. /***/ "f7bd":
  41179. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  41180. "use strict";
  41181. __webpack_require__.r(__webpack_exports__);
  41182. /* harmony import */ var _Card_vue_vue_type_template_id_0b7b8e8a___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("5993");
  41183. /* harmony import */ var _Card_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("65db");
  41184. /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _Card_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _Card_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
  41185. /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("b429");
  41186. /* normalize component */
  41187. var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(
  41188. _Card_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
  41189. _Card_vue_vue_type_template_id_0b7b8e8a___WEBPACK_IMPORTED_MODULE_0__[/* render */ "a"],
  41190. _Card_vue_vue_type_template_id_0b7b8e8a___WEBPACK_IMPORTED_MODULE_0__[/* staticRenderFns */ "b"],
  41191. false,
  41192. null,
  41193. null,
  41194. null
  41195. )
  41196. /* harmony default export */ __webpack_exports__["default"] = (component.exports);
  41197. /***/ }),
  41198. /***/ "f840":
  41199. /***/ (function(module, exports) {
  41200. module.exports = __WEBPACK_EXTERNAL_MODULE_f840__;
  41201. /***/ }),
  41202. /***/ "f875":
  41203. /***/ (function(module, exports, __webpack_require__) {
  41204. "use strict";
  41205. var _interopRequireWildcard = __webpack_require__("16ed");
  41206. var _interopRequireDefault = __webpack_require__("8e6d");
  41207. Object.defineProperty(exports, "__esModule", {
  41208. value: true
  41209. });
  41210. exports.default = void 0;
  41211. var _regenerator = _interopRequireDefault(__webpack_require__("849c"));
  41212. var _typeof2 = _interopRequireDefault(__webpack_require__("7ae5"));
  41213. var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
  41214. var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
  41215. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
  41216. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
  41217. var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
  41218. var _Events2 = __webpack_require__("e3e2");
  41219. var _util = __webpack_require__("1448");
  41220. var convert = _interopRequireWildcard(__webpack_require__("fc3a"));
  41221. var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
  41222. function adopt(value) {
  41223. return value instanceof P ? value : new P(function (resolve) {
  41224. resolve(value);
  41225. });
  41226. }
  41227. return new (P || (P = Promise))(function (resolve, reject) {
  41228. function fulfilled(value) {
  41229. try {
  41230. step(generator.next(value));
  41231. } catch (e) {
  41232. reject(e);
  41233. }
  41234. }
  41235. function rejected(value) {
  41236. try {
  41237. step(generator["throw"](value));
  41238. } catch (e) {
  41239. reject(e);
  41240. }
  41241. }
  41242. function step(result) {
  41243. result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
  41244. }
  41245. step((generator = generator.apply(thisArg, _arguments || [])).next());
  41246. });
  41247. };
  41248. var DEFAULT_WELLKNOWNSCALESET = ['GoogleCRS84Quad', 'GoogleMapsCompatible', 'urn:ogc:def:wkss:OGC:1.0:GoogleMapsCompatible', 'urn:ogc:def:wkss:OGC:1.0:GoogleCRS84Quad'];
  41249. 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.3867327723', '136494.6933663862', '68247.34668319309', '34123.67334159654', '17061.83667079827', '8530.918335399136', '4265.459167699568', '2132.729583849784'];
  41250. 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'];
  41251. var WebMapService =
  41252. /*#__PURE__*/
  41253. function (_Events) {
  41254. (0, _inherits2.default)(WebMapService, _Events);
  41255. function WebMapService(mapId) {
  41256. var _this;
  41257. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  41258. (0, _classCallCheck2.default)(this, WebMapService);
  41259. _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(WebMapService).call(this));
  41260. _this.proxyOptions = {
  41261. data: 'apps/viewer/getUrlResource.json?url=',
  41262. image: 'apps/viewer/getUrlResource.png?url='
  41263. };
  41264. if (typeof mapId === 'string' || typeof mapId === 'number') {
  41265. _this.mapId = mapId;
  41266. } else if (mapId !== null && (0, _typeof2.default)(mapId) === 'object') {
  41267. _this.mapInfo = mapId;
  41268. }
  41269. _this.serverUrl = options.serverUrl || 'https://www.supermapol.com';
  41270. _this.accessToken = options.accessToken;
  41271. _this.accessKey = options.accessKey;
  41272. _this.tiandituKey = options.tiandituKey || '';
  41273. _this.withCredentials = options.withCredentials || false;
  41274. _this.excludePortalProxyUrl = options.excludePortalProxyUrl;
  41275. _this.iportalServiceProxyUrl = options.iportalServiceProxyUrlPrefix;
  41276. _this.proxy = options.proxy;
  41277. return _this;
  41278. }
  41279. (0, _createClass2.default)(WebMapService, [{
  41280. key: "setMapId",
  41281. value: function setMapId(mapId) {
  41282. this.mapId = mapId;
  41283. }
  41284. }, {
  41285. key: "setServerUrl",
  41286. value: function setServerUrl(serverUrl) {
  41287. this.serverUrl = serverUrl;
  41288. }
  41289. }, {
  41290. key: "setWithCredentials",
  41291. value: function setWithCredentials(withCredentials) {
  41292. this.withCredentials = withCredentials;
  41293. }
  41294. }, {
  41295. key: "setProxy",
  41296. value: function setProxy(proxy) {
  41297. this.proxy = proxy;
  41298. }
  41299. }, {
  41300. key: "handleServerUrl",
  41301. value: function handleServerUrl(serverUrl) {
  41302. var urlArr = serverUrl.split('');
  41303. if (urlArr[urlArr.length - 1] !== '/') {
  41304. serverUrl += '/';
  41305. }
  41306. this.serverUrl = serverUrl;
  41307. return serverUrl;
  41308. }
  41309. }, {
  41310. key: "getMapInfo",
  41311. value: function getMapInfo() {
  41312. var _this2 = this;
  41313. if (!this.mapId && this.mapInfo) {
  41314. return new Promise(function (resolve) {
  41315. resolve(_this2.mapInfo);
  41316. });
  41317. }
  41318. var mapUrl = this._handleMapUrl();
  41319. return new Promise(function (resolve, reject) {
  41320. return __awaiter(_this2, void 0, void 0,
  41321. /*#__PURE__*/
  41322. _regenerator.default.mark(function _callee() {
  41323. return _regenerator.default.wrap(function _callee$(_context) {
  41324. while (1) {
  41325. switch (_context.prev = _context.next) {
  41326. case 0:
  41327. _context.prev = 0;
  41328. _context.next = 3;
  41329. return this.getiPortalServiceProxy();
  41330. case 3:
  41331. SuperMap.FetchRequest.get(mapUrl, null, {
  41332. withCredentials: this.withCredentials
  41333. }).then(function (response) {
  41334. return response.json();
  41335. }).then(function (mapInfo) {
  41336. if (mapInfo && mapInfo.succeed === false) {
  41337. var error = {
  41338. message: mapInfo && mapInfo.error && mapInfo.error.errorMsg
  41339. };
  41340. reject(error);
  41341. return;
  41342. }
  41343. mapInfo.mapParams = {
  41344. title: mapInfo.title,
  41345. description: mapInfo.description
  41346. };
  41347. resolve(mapInfo);
  41348. }).catch(function (error) {
  41349. reject(error);
  41350. });
  41351. _context.next = 9;
  41352. break;
  41353. case 6:
  41354. _context.prev = 6;
  41355. _context.t0 = _context["catch"](0);
  41356. reject(_context.t0);
  41357. case 9:
  41358. case "end":
  41359. return _context.stop();
  41360. }
  41361. }
  41362. }, _callee, this, [[0, 6]]);
  41363. }));
  41364. });
  41365. }
  41366. }, {
  41367. key: "getiPortalServiceProxy",
  41368. value: function getiPortalServiceProxy() {
  41369. var _this3 = this;
  41370. return new Promise(function (resolve, reject) {
  41371. SuperMap.FetchRequest.get("".concat(_this3.serverUrl, "web/config/portal.json"), {
  41372. scope: ['serviceProxy']
  41373. }).then(function (response) {
  41374. return response.json();
  41375. }).then(function (serviceProxyInfo) {
  41376. if (!serviceProxyInfo || !serviceProxyInfo.serviceProxy) {
  41377. reject('serviceProxyFailed');
  41378. return;
  41379. }
  41380. var serviceProxy = serviceProxyInfo.serviceProxy;
  41381. if (serviceProxy.enable) {
  41382. if (serviceProxy.proxyServerRootUrl) {
  41383. _this3.iportalServiceProxyUrl = serviceProxy.proxyServerRootUrl;
  41384. } else if (serviceProxy.port && serviceProxy.rootUrlPostfix) {
  41385. _this3.iportalServiceProxyUrl = "".concat(serviceProxy.port, "/").concat(serviceProxy.rootUrlPostfix);
  41386. }
  41387. if (_this3.serverUrl.indexOf(_this3.iportalServiceProxyUrl) > -1) {
  41388. _this3.iportalServiceProxyUrl = '';
  41389. }
  41390. }
  41391. resolve(serviceProxy);
  41392. }).catch(function (error) {
  41393. reject(error);
  41394. });
  41395. });
  41396. }
  41397. }, {
  41398. key: "getLayerFeatures",
  41399. value: function getLayerFeatures(type, layer, baseProjection) {
  41400. var pro;
  41401. switch (type) {
  41402. case 'hosted':
  41403. pro = this._getFeaturesFromHosted(layer, baseProjection);
  41404. break;
  41405. case 'rest_data':
  41406. pro = this._getFeaturesFromRestData(layer);
  41407. break;
  41408. case 'rest_map':
  41409. pro = this._getFeaturesFromRestMap(layer);
  41410. break;
  41411. case 'dataflow':
  41412. pro = this._getFeaturesFromDataflow(layer);
  41413. break;
  41414. case 'user_data':
  41415. pro = this._getFeaturesFromUserData(layer);
  41416. break;
  41417. }
  41418. return pro;
  41419. }
  41420. }, {
  41421. key: "getWmtsInfo",
  41422. value: function getWmtsInfo(layerInfo, mapCRS) {
  41423. var _this4 = this;
  41424. return new Promise(function (resolve, reject) {
  41425. var isMatched = false;
  41426. var matchMaxZoom = 22;
  41427. var style = '';
  41428. var bounds;
  41429. var restResourceURL = '';
  41430. var kvpResourceUrl = '';
  41431. var proxy = _this4.handleProxy();
  41432. SuperMap.FetchRequest.get("".concat(layerInfo.url.split('?')[0], "?REQUEST=GetCapabilities&SERVICE=WMTS&VERSION=1.0.0"), null, {
  41433. withCredentials: _this4.handleWithCredentials(proxy, layerInfo.url, false),
  41434. withoutFormatSuffix: true,
  41435. proxy: proxy
  41436. }).then(function (response) {
  41437. return response.text();
  41438. }).then(function (capabilitiesText) {
  41439. var converts = convert || window.convert;
  41440. var capabilities = JSON.parse(converts.xml2json(capabilitiesText, {
  41441. compact: true,
  41442. spaces: 4
  41443. })).Capabilities;
  41444. var content = capabilities.Contents;
  41445. var metaData = capabilities['ows:OperationsMetadata'];
  41446. if (metaData) {
  41447. var operations = metaData['ows:Operation'];
  41448. if (!Array.isArray(operations)) {
  41449. operations = [operations];
  41450. }
  41451. var operation = operations.find(function (item) {
  41452. return item._attributes.name === 'GetTile';
  41453. });
  41454. if (operation) {
  41455. var getConstraints = operation['ows:DCP']['ows:HTTP']['ows:Get'];
  41456. if (!Array.isArray(getConstraints)) {
  41457. getConstraints = [getConstraints];
  41458. }
  41459. var getConstraint = getConstraints.find(function (item) {
  41460. return item['ows:Constraint']['ows:AllowedValues']['ows:Value']['_text'] === 'KVP';
  41461. });
  41462. if (getConstraint) {
  41463. kvpResourceUrl = getConstraint['_attributes']['xlink:href'];
  41464. }
  41465. }
  41466. }
  41467. var tileMatrixSet = content.TileMatrixSet;
  41468. for (var i = 0; i < tileMatrixSet.length; i++) {
  41469. if (tileMatrixSet[i]['ows:Identifier'] && tileMatrixSet[i]['ows:Identifier']['_text'] === layerInfo.tileMatrixSet) {
  41470. if (tileMatrixSet[i]['WellKnownScaleSet'] && DEFAULT_WELLKNOWNSCALESET.includes(tileMatrixSet[i]['WellKnownScaleSet']['_text'])) {
  41471. isMatched = true;
  41472. } else {
  41473. var matchedScaleDenominator = [];
  41474. var defaultCRSScaleDenominators = mapCRS === 'EPSG:3857' ? MB_SCALEDENOMINATOR_3857 : MB_SCALEDENOMINATOR_4326;
  41475. for (var j = 0, len = defaultCRSScaleDenominators.length; j < len; j++) {
  41476. if (!tileMatrixSet[i].TileMatrix[j]) {
  41477. break;
  41478. }
  41479. if (parseFloat(defaultCRSScaleDenominators[j]) !== parseFloat(tileMatrixSet[i].TileMatrix[j]['ScaleDenominator']['_text'])) {
  41480. break;
  41481. }
  41482. matchedScaleDenominator.push(defaultCRSScaleDenominators[j]);
  41483. }
  41484. matchMaxZoom = matchedScaleDenominator.length - 1;
  41485. if (matchedScaleDenominator.length !== 0) {
  41486. isMatched = true;
  41487. } else {
  41488. throw Error('TileMatrixSetNotSuppport');
  41489. }
  41490. }
  41491. break;
  41492. }
  41493. }
  41494. var layer = content.Layer.find(function (item) {
  41495. return item['ows:Identifier']['_text'] === layerInfo.layer;
  41496. });
  41497. if (layer) {
  41498. var styles = layer.Style;
  41499. if (Array.isArray(layer.Style)) {
  41500. style = styles[0]['ows:Identifier'] ? styles[0]['ows:Identifier']['_text'] : '';
  41501. } else {
  41502. style = styles['ows:Identifier'] ? styles['ows:Identifier']['_text'] : '';
  41503. }
  41504. if (layer['ows:WGS84BoundingBox']) {
  41505. var lowerCorner = layer['ows:WGS84BoundingBox']['ows:LowerCorner']['_text'].split(' ');
  41506. var upperCorner = layer['ows:WGS84BoundingBox']['ows:UpperCorner']['_text'].split(' ');
  41507. bounds = [parseFloat(lowerCorner[0]), parseFloat(lowerCorner[1]), parseFloat(upperCorner[0]), parseFloat(upperCorner[1])];
  41508. }
  41509. var resourceUrls = layer.ResourceURL;
  41510. if (!Array.isArray(resourceUrls)) {
  41511. resourceUrls = [resourceUrls];
  41512. }
  41513. var resourceUrl = resourceUrls.find(function (item) {
  41514. return item._attributes.resourceType === 'tile';
  41515. });
  41516. if (resourceUrl) {
  41517. restResourceURL = resourceUrl._attributes.template;
  41518. }
  41519. }
  41520. resolve({
  41521. isMatched: isMatched,
  41522. matchMaxZoom: matchMaxZoom,
  41523. style: style,
  41524. bounds: bounds,
  41525. restResourceURL: restResourceURL,
  41526. kvpResourceUrl: kvpResourceUrl
  41527. });
  41528. }).catch(function (error) {
  41529. reject(error);
  41530. });
  41531. });
  41532. }
  41533. }, {
  41534. key: "_getFeaturesFromHosted",
  41535. value: function _getFeaturesFromHosted(layer, baseProjection) {
  41536. var dataSource = layer.dataSource,
  41537. layerType = layer.layerType;
  41538. var serverId = dataSource ? dataSource.serverId : layer.serverId;
  41539. if (!serverId) {
  41540. return new Promise(function (resolve, reject) {
  41541. resolve({
  41542. type: 'noServerId'
  41543. });
  41544. });
  41545. }
  41546. var getDataFromIportal = layerType === 'MARKER' || dataSource && (!dataSource.accessType || dataSource.accessType === 'DIRECT');
  41547. if (getDataFromIportal) {
  41548. return this._getDataFromIportal(serverId, layer);
  41549. } else {
  41550. return this._getDataFromHosted({
  41551. layer: layer,
  41552. serverId: serverId,
  41553. baseProjection: baseProjection
  41554. });
  41555. }
  41556. }
  41557. }, {
  41558. key: "_getFeaturesFromRestData",
  41559. value: function _getFeaturesFromRestData(layer) {
  41560. var _this5 = this;
  41561. var features;
  41562. var dataSource = layer.dataSource;
  41563. return new Promise(function (resolve, reject) {
  41564. _this5._getFeatureBySQL(dataSource.url, [dataSource.dataSourceName || layer.name], function (result) {
  41565. features = _this5.parseGeoJsonData2Feature({
  41566. allDatas: {
  41567. features: result.result.features.features
  41568. }
  41569. });
  41570. resolve({
  41571. type: 'feature',
  41572. features: features
  41573. });
  41574. }, function (err) {
  41575. reject(err);
  41576. });
  41577. });
  41578. }
  41579. }, {
  41580. key: "_getFeaturesFromRestMap",
  41581. value: function _getFeaturesFromRestMap(layer) {
  41582. var _this6 = this;
  41583. return new Promise(function (resolve, reject) {
  41584. _this6._queryFeatureBySQL(layer.dataSource.url, layer.dataSource.layerName, function (result) {
  41585. var recordsets = result && result.result.recordsets;
  41586. var recordset = recordsets && recordsets[0];
  41587. var attributes = recordset.fields;
  41588. if (recordset && attributes) {
  41589. var fileterAttrs = [];
  41590. for (var i in attributes) {
  41591. var value = attributes[i];
  41592. if (value.indexOf('Sm') !== 0 || value === 'SmID') {
  41593. fileterAttrs.push(value);
  41594. }
  41595. }
  41596. _this6._getFeatures(fileterAttrs, layer, function (features) {
  41597. resolve({
  41598. type: 'feature',
  41599. features: features
  41600. });
  41601. }, function (err) {
  41602. reject(err);
  41603. });
  41604. }
  41605. }, function (err) {
  41606. reject(err);
  41607. }, 'smid=1');
  41608. });
  41609. }
  41610. }, {
  41611. key: "_getFeaturesFromUserData",
  41612. value: function _getFeaturesFromUserData(layer) {
  41613. var _this7 = this;
  41614. var dataSource = layer.dataSource;
  41615. return new Promise(function (resolve, reject) {
  41616. var proxy = _this7.handleProxy();
  41617. SuperMap.FetchRequest.get(dataSource.url, null, {
  41618. withCredentials: _this7.handleWithCredentials(proxy, dataSource.url, _this7.withCredentials),
  41619. proxy: proxy
  41620. }).then(function (response) {
  41621. return response.json();
  41622. }).then(function (data) {
  41623. var features;
  41624. if (data && data instanceof Object && data.type === 'FeatureCollection') {
  41625. features = data.features;
  41626. } else {
  41627. features = data;
  41628. }
  41629. features = _this7.parseGeoJsonData2Feature({
  41630. allDatas: {
  41631. features: features
  41632. }
  41633. });
  41634. resolve({
  41635. type: 'feature',
  41636. features: features
  41637. });
  41638. }).catch(function (err) {
  41639. reject(err);
  41640. });
  41641. });
  41642. }
  41643. }, {
  41644. key: "_queryFeatureBySQL",
  41645. value: function _queryFeatureBySQL(url, layerName, _processCompleted, processFaild, attributeFilter, fields, epsgCode, startRecord, recordLength, onlyAttribute) {
  41646. var queryBySQLParams = this._getQueryFeaturesParam(layerName, attributeFilter, fields, epsgCode, startRecord, recordLength, onlyAttribute);
  41647. var proxy = this.handleProxy();
  41648. var queryBySQLService = new SuperMap.QueryBySQLService(url, {
  41649. proxy: proxy,
  41650. withCredentials: this.handleWithCredentials(proxy, url, false),
  41651. eventListeners: {
  41652. processCompleted: function processCompleted(data) {
  41653. _processCompleted && _processCompleted(data);
  41654. },
  41655. processFailed: function processFailed(data) {
  41656. processFaild && processFaild(data);
  41657. }
  41658. }
  41659. });
  41660. queryBySQLService.processAsync(queryBySQLParams);
  41661. }
  41662. }, {
  41663. key: "_getFeatures",
  41664. value: function _getFeatures(fields, layerInfo, resolve, reject) {
  41665. var _this8 = this;
  41666. var source = layerInfo.dataSource;
  41667. this._queryFeatureBySQL(source.url, source.layerName, function (result) {
  41668. var recordsets = result.result.recordsets[0];
  41669. var features = recordsets.features.features;
  41670. var featuresObj = _this8.parseGeoJsonData2Feature({
  41671. allDatas: {
  41672. features: features
  41673. }
  41674. });
  41675. resolve(featuresObj);
  41676. }, function (err) {
  41677. reject(err);
  41678. }, null, fields);
  41679. }
  41680. }, {
  41681. key: "_getQueryFeaturesParam",
  41682. value: function _getQueryFeaturesParam(layerName, attributeFilter, fields, epsgCode, startRecord, recordLength, onlyAttribute) {
  41683. var queryParam = new SuperMap.FilterParameter({
  41684. name: layerName,
  41685. attributeFilter: attributeFilter
  41686. });
  41687. if (fields) {
  41688. queryParam.fields = fields;
  41689. }
  41690. var params = {
  41691. queryParams: [queryParam]
  41692. };
  41693. if (onlyAttribute) {
  41694. params.queryOption = SuperMap.QueryOption.ATTRIBUTE;
  41695. }
  41696. startRecord && (params.startRecord = startRecord);
  41697. recordLength && (params.expectCount = recordLength);
  41698. if (epsgCode) {
  41699. params.prjCoordSys = {
  41700. epsgCode: epsgCode
  41701. };
  41702. }
  41703. var queryBySQLParams = new SuperMap.QueryBySQLParameters(params);
  41704. return queryBySQLParams;
  41705. }
  41706. }, {
  41707. key: "_getFeaturesFromDataflow",
  41708. value: function _getFeaturesFromDataflow(layer) {
  41709. var _this9 = this;
  41710. return new Promise(function (resolve, reject) {
  41711. _this9._getDataflowInfo(layer, function () {
  41712. resolve({
  41713. type: 'dataflow'
  41714. });
  41715. }, function (e) {
  41716. reject(e);
  41717. });
  41718. });
  41719. }
  41720. }, {
  41721. key: "_getDataflowInfo",
  41722. value: function _getDataflowInfo(layerInfo, success, faild) {
  41723. var url = layerInfo.url,
  41724. token;
  41725. var requestUrl = "".concat(url, ".json");
  41726. if (layerInfo.credential && layerInfo.credential.token) {
  41727. token = layerInfo.credential.token;
  41728. requestUrl += "?token=".concat(token);
  41729. }
  41730. var proxy = this.handleProxy();
  41731. SuperMap.FetchRequest.get(requestUrl, null, {
  41732. proxy: proxy,
  41733. withCredentials: this.handleWithCredentials(proxy, requestUrl, false)
  41734. }).then(function (response) {
  41735. return response.json();
  41736. }).then(function (result) {
  41737. if (!result) {
  41738. faild();
  41739. return;
  41740. }
  41741. if (result.featureMetaData) {
  41742. layerInfo.featureType = result.featureMetaData.featureType.toUpperCase();
  41743. layerInfo.dataSource = {
  41744. dataTypes: {}
  41745. };
  41746. if (result.featureMetaData.fieldInfos && result.featureMetaData.fieldInfos.length > 0) {
  41747. result.featureMetaData.fieldInfos.forEach(function (data) {
  41748. var name = data.name.trim();
  41749. if (data.type === 'TEXT') {
  41750. layerInfo.dataSource.dataTypes[name] = 'STRING';
  41751. } else if (['DOUBLE', 'INT', 'FLOAT', 'LONG', 'SHORT'].includes(data.type)) {
  41752. layerInfo.dataSource.dataTypes[name] = 'NUMBER';
  41753. } else {
  41754. layerInfo.dataSource.dataTypes[name] = 'UNKNOWN';
  41755. }
  41756. });
  41757. }
  41758. }
  41759. layerInfo.wsUrl = result.urls[0].url;
  41760. layerInfo.name = result.urls[0].url.split('iserver/services/')[1].split('/dataflow')[0];
  41761. success();
  41762. }).catch(function () {
  41763. faild();
  41764. });
  41765. }
  41766. }, {
  41767. key: "getDatasourceType",
  41768. value: function getDatasourceType(layer) {
  41769. var dataSource = layer.dataSource,
  41770. layerType = layer.layerType;
  41771. if (dataSource && dataSource.type === 'SAMPLE_DATA') {
  41772. return dataSource.type;
  41773. }
  41774. var type;
  41775. var isHosted = dataSource && dataSource.serverId || layerType === 'MARKER' || layerType === 'HOSTED_TILE';
  41776. var isTile = layerType === 'SUPERMAP_REST' || layerType === 'TILE' || layerType === 'WMS' || layerType === 'WMTS' || layerType === 'MAPBOXSTYLE';
  41777. if (isHosted) {
  41778. type = 'hosted';
  41779. } else if (isTile) {
  41780. type = 'tile';
  41781. } else if (dataSource && dataSource.type === 'REST_DATA') {
  41782. type = 'rest_data';
  41783. } else if (dataSource && dataSource.type === 'REST_MAP' && dataSource.url) {
  41784. type = 'rest_map';
  41785. } else if (layerType === 'DATAFLOW_POINT_TRACK' || layerType === 'DATAFLOW_HEAT') {
  41786. type = 'dataflow';
  41787. } else if (dataSource && dataSource.type === 'USER_DATA') {
  41788. type = 'user_data';
  41789. }
  41790. return type;
  41791. }
  41792. }, {
  41793. key: "getFeatureProperties",
  41794. value: function getFeatureProperties(features) {
  41795. var properties = [];
  41796. if (features && features.length) {
  41797. features.forEach(function (feature) {
  41798. var property = feature.properties;
  41799. property && properties.push(property);
  41800. });
  41801. }
  41802. return properties;
  41803. }
  41804. }, {
  41805. key: "parseGeoJsonData2Feature",
  41806. value: function parseGeoJsonData2Feature(metaData) {
  41807. var allFeatures = metaData.allDatas.features;
  41808. var features = [];
  41809. for (var i = 0, len = allFeatures.length; i < len; i++) {
  41810. var feature = allFeatures[i];
  41811. var coordinate = feature.geometry.coordinates;
  41812. if (allFeatures[i].geometry.type === 'Point') {
  41813. if (allFeatures[i].properties) {
  41814. allFeatures[i].properties.lon = coordinate[0];
  41815. allFeatures[i].properties.lat = coordinate[1];
  41816. }
  41817. }
  41818. feature.properties['index'] = i + '';
  41819. features.push(feature);
  41820. }
  41821. return features;
  41822. }
  41823. }, {
  41824. key: "_getDataFromIportal",
  41825. value: function _getDataFromIportal(serverId, layerInfo) {
  41826. var _this10 = this;
  41827. var features;
  41828. var url = "".concat(this.serverUrl, "web/datas/").concat(serverId, "/content.json?pageSize=9999999&currentPage=1");
  41829. if (this.accessToken) {
  41830. url = "".concat(url, "&").concat(this.accessKey, "=").concat(this.accessToken);
  41831. }
  41832. return new Promise(function (resolve, reject) {
  41833. var proxy = _this10.handleProxy();
  41834. SuperMap.FetchRequest.get(url, null, {
  41835. withCredentials: _this10.handleWithCredentials(proxy, url, _this10.withCredentials),
  41836. proxy: proxy
  41837. }).then(function (response) {
  41838. return response.json();
  41839. }).then(function (data) {
  41840. return __awaiter(_this10, void 0, void 0,
  41841. /*#__PURE__*/
  41842. _regenerator.default.mark(function _callee2() {
  41843. var _layerInfo$dataSource, divisionType, divisionField, geojson;
  41844. return _regenerator.default.wrap(function _callee2$(_context2) {
  41845. while (1) {
  41846. switch (_context2.prev = _context2.next) {
  41847. case 0:
  41848. if (data.succeed === false) {
  41849. reject(data.error);
  41850. }
  41851. if (!(data && data.type)) {
  41852. _context2.next = 19;
  41853. break;
  41854. }
  41855. if (!(data.type === 'JSON' || data.type === 'GEOJSON')) {
  41856. _context2.next = 7;
  41857. break;
  41858. }
  41859. data.content = JSON.parse(data.content.trim());
  41860. features = this._formatGeoJSON(data.content);
  41861. _context2.next = 18;
  41862. break;
  41863. case 7:
  41864. if (!(data.type === 'EXCEL' || data.type === 'CSV')) {
  41865. _context2.next = 18;
  41866. break;
  41867. }
  41868. if (!(layerInfo.dataSource && layerInfo.dataSource.administrativeInfo)) {
  41869. _context2.next = 17;
  41870. break;
  41871. }
  41872. data.content.rows.unshift(data.content.colTitles);
  41873. _layerInfo$dataSource = layerInfo.dataSource.administrativeInfo, divisionType = _layerInfo$dataSource.divisionType, divisionField = _layerInfo$dataSource.divisionField;
  41874. _context2.next = 13;
  41875. return this._excelData2FeatureByDivision(data.content, divisionType, divisionField);
  41876. case 13:
  41877. geojson = _context2.sent;
  41878. features = this._formatGeoJSON(geojson);
  41879. _context2.next = 18;
  41880. break;
  41881. case 17:
  41882. features = this._excelData2Feature(data.content, layerInfo && layerInfo.xyField || {});
  41883. case 18:
  41884. resolve({
  41885. type: 'feature',
  41886. features: features
  41887. });
  41888. case 19:
  41889. case "end":
  41890. return _context2.stop();
  41891. }
  41892. }
  41893. }, _callee2, this);
  41894. }));
  41895. }).catch(function (error) {
  41896. reject(error);
  41897. });
  41898. });
  41899. }
  41900. }, {
  41901. key: "_getDataFromHosted",
  41902. value: function _getDataFromHosted(_ref) {
  41903. var _this11 = this;
  41904. var layer = _ref.layer,
  41905. serverId = _ref.serverId,
  41906. baseProjection = _ref.baseProjection;
  41907. var isMapService = layer.layerType === 'HOSTED_TILE';
  41908. return new Promise(function (resolve, reject) {
  41909. _this11._checkUploadToRelationship(serverId).then(function (result) {
  41910. if (result && result.length > 0) {
  41911. var datasetName = result[0].name,
  41912. featureType = result[0].type.toUpperCase();
  41913. _this11._getDataService(serverId, datasetName).then(function (data) {
  41914. var dataItemServices = data.dataItemServices;
  41915. if (dataItemServices.length === 0) {
  41916. reject('noDataServices');
  41917. }
  41918. var param = {
  41919. layer: layer,
  41920. dataItemServices: dataItemServices,
  41921. datasetName: datasetName,
  41922. featureType: featureType,
  41923. resolve: resolve,
  41924. reject: reject,
  41925. baseProjection: baseProjection
  41926. };
  41927. if (isMapService) {
  41928. var dataService = dataItemServices.filter(function (info) {
  41929. return info && info.serviceType === 'RESTDATA';
  41930. })[0];
  41931. _this11._isMvt(dataService.address, datasetName, baseProjection).then(function (info) {
  41932. _this11._getServiceInfoFromLayer(param, info);
  41933. }).catch(function () {
  41934. _this11._getServiceInfoFromLayer(param);
  41935. });
  41936. } else {
  41937. _this11._getServiceInfoFromLayer(param);
  41938. }
  41939. });
  41940. } else {
  41941. reject('resultIsEmpty');
  41942. }
  41943. }).catch(function (error) {
  41944. reject(error);
  41945. });
  41946. });
  41947. }
  41948. }, {
  41949. key: "_isMvt",
  41950. value: function _isMvt(serviceUrl, datasetName, baseProjection) {
  41951. return this._getDatasetsInfo(serviceUrl, datasetName).then(function (info) {
  41952. if (info.epsgCode == baseProjection.split('EPSG:')[1]) {
  41953. return SuperMap.FetchRequest.get("".concat(info.url, "/tilefeature.mvt")).then(function (response) {
  41954. return response.json();
  41955. }).then(function (result) {
  41956. info.isMvt = result.error && result.error.code === 400;
  41957. return info;
  41958. }).catch(function () {
  41959. return info;
  41960. });
  41961. }
  41962. return info;
  41963. });
  41964. }
  41965. }, {
  41966. key: "_getServiceInfoFromLayer",
  41967. value: function _getServiceInfoFromLayer(_ref2, info) {
  41968. var _this12 = this;
  41969. var layer = _ref2.layer,
  41970. dataItemServices = _ref2.dataItemServices,
  41971. datasetName = _ref2.datasetName,
  41972. featureType = _ref2.featureType,
  41973. resolve = _ref2.resolve,
  41974. reject = _ref2.reject,
  41975. baseProjection = _ref2.baseProjection;
  41976. var isMapService = info ? !info.isMvt : layer.layerType === 'HOSTED_TILE',
  41977. isAdded = false;
  41978. dataItemServices.forEach(function (service, index) {
  41979. if (isAdded) {
  41980. return;
  41981. }
  41982. if (service && isMapService && service.serviceType === 'RESTMAP') {
  41983. isAdded = true;
  41984. _this12._getTileLayerInfo(service.address, baseProjection).then(function (restMaps) {
  41985. resolve({
  41986. type: 'restMap',
  41987. restMaps: restMaps
  41988. });
  41989. });
  41990. } else if (service && !isMapService && service.serviceType === 'RESTDATA') {
  41991. if (info && info.isMvt) {
  41992. resolve({
  41993. type: 'mvt',
  41994. info: info,
  41995. featureType: featureType
  41996. });
  41997. } else {
  41998. isAdded = true;
  41999. _this12._getDatasources(service.address).then(function (datasourceName) {
  42000. layer.dataSource.dataSourceName = datasourceName + ':' + datasetName;
  42001. layer.dataSource.url = "".concat(service.address, "/data");
  42002. _this12._getFeatureBySQL(layer.dataSource.url, [layer.dataSource.dataSourceName || layer.name], function (result) {
  42003. var features = _this12.parseGeoJsonData2Feature({
  42004. allDatas: {
  42005. features: result.result.features.features
  42006. }
  42007. });
  42008. resolve({
  42009. type: 'feature',
  42010. features: features
  42011. });
  42012. }, function (err) {
  42013. reject(err);
  42014. });
  42015. }, function (err) {
  42016. reject(err);
  42017. });
  42018. }
  42019. }
  42020. }, this);
  42021. if (!isAdded) {
  42022. reject('noService');
  42023. }
  42024. }
  42025. }, {
  42026. key: "_getDatasetsInfo",
  42027. value: function _getDatasetsInfo(serviceUrl, datasetName) {
  42028. var _this13 = this;
  42029. return this._getDatasources(serviceUrl).then(function (datasourceName) {
  42030. var url = "".concat(serviceUrl, "/data/datasources/").concat(datasourceName, "/datasets/").concat(datasetName);
  42031. var proxy = _this13.handleProxy();
  42032. return SuperMap.FetchRequest.get(url, null, {
  42033. withCredentials: _this13.handleWithCredentials(proxy, url, false),
  42034. proxy: proxy
  42035. }).then(function (response) {
  42036. return response.json();
  42037. }).then(function (datasetsInfo) {
  42038. return {
  42039. epsgCode: datasetsInfo.datasetInfo.prjCoordSys.epsgCode,
  42040. bounds: datasetsInfo.datasetInfo.bounds,
  42041. datasourceName: datasourceName,
  42042. datasetName: datasetName,
  42043. url: url
  42044. };
  42045. });
  42046. });
  42047. }
  42048. }, {
  42049. key: "_getDatasources",
  42050. value: function _getDatasources(url) {
  42051. var proxy = this.handleProxy();
  42052. var serviceUrl = "".concat(url, "/data/datasources.json");
  42053. return SuperMap.FetchRequest.get(serviceUrl, null, {
  42054. withCredentials: this.handleWithCredentials(proxy, serviceUrl, false),
  42055. proxy: proxy
  42056. }).then(function (response) {
  42057. return response.json();
  42058. }).then(function (datasource) {
  42059. if (datasource.code === 401) {
  42060. throw Error(datasource.errorMsg);
  42061. }
  42062. var datasourceNames = datasource.datasourceNames;
  42063. return datasourceNames[0];
  42064. });
  42065. }
  42066. }, {
  42067. key: "_getDataService",
  42068. value: function _getDataService(fileId, datasetName) {
  42069. var proxy = this.handleProxy();
  42070. var serviceUrl = "".concat(this.serverUrl, "web/datas/").concat(fileId, ".json");
  42071. return SuperMap.FetchRequest.get(serviceUrl, null, {
  42072. withCredentials: this.handleWithCredentials(proxy, serviceUrl, this.withCredentials),
  42073. proxy: proxy
  42074. }).then(function (response) {
  42075. return response.json();
  42076. }).then(function (result) {
  42077. result.fileId = fileId;
  42078. result.datasetName = datasetName;
  42079. return result;
  42080. });
  42081. }
  42082. }, {
  42083. key: "_checkUploadToRelationship",
  42084. value: function _checkUploadToRelationship(fileId) {
  42085. var proxy = this.handleProxy();
  42086. var serviceUrl = "".concat(this.serverUrl, "web/datas/").concat(fileId, "/datasets.json");
  42087. return SuperMap.FetchRequest.get(serviceUrl, null, {
  42088. withCredentials: this.handleWithCredentials(proxy, serviceUrl, this.withCredentials),
  42089. proxy: proxy
  42090. }).then(function (response) {
  42091. return response.json();
  42092. }).then(function (result) {
  42093. return result;
  42094. });
  42095. }
  42096. }, {
  42097. key: "_handleMapUrl",
  42098. value: function _handleMapUrl() {
  42099. var mapUrl = this.serverUrl + 'web/maps/' + this.mapId + '/map';
  42100. if (this.accessToken || this.accessKey) {
  42101. mapUrl += true ? 'token=' + this.accessToken : undefined;
  42102. }
  42103. var filter = 'getUrlResource.json?url=';
  42104. if (this.excludePortalProxyUrl && this.serverUrl.indexOf(filter) > -1) {
  42105. var urlArray = this.serverUrl.split(filter);
  42106. if (urlArray.length > 1) {
  42107. mapUrl = urlArray[0] + filter + this.serverUrl + 'web/maps/' + this.mapId + '/map.json';
  42108. }
  42109. }
  42110. mapUrl = mapUrl.indexOf('.json') === -1 ? "".concat(mapUrl, ".json") : mapUrl;
  42111. return mapUrl;
  42112. }
  42113. }, {
  42114. key: "handleProxy",
  42115. value: function handleProxy(type) {
  42116. if (!this.proxy) {
  42117. return null;
  42118. }
  42119. var proxySuffix = this.proxyOptions[type || 'data'];
  42120. var proxy = this.serverUrl + proxySuffix;
  42121. if (typeof this.proxy === 'string') {
  42122. proxy = this.proxy;
  42123. }
  42124. return proxy;
  42125. }
  42126. }, {
  42127. key: "handleWithCredentials",
  42128. value: function handleWithCredentials(proxyUrl, serviceUrl) {
  42129. var defaultValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.withCredentials;
  42130. if (proxyUrl && proxyUrl.startsWith(this.serverUrl) && (!serviceUrl || serviceUrl.startsWith(proxyUrl))) {
  42131. return true;
  42132. }
  42133. if (serviceUrl && this.iportalServiceProxyUrl && serviceUrl.indexOf(this.iportalServiceProxyUrl) >= 0) {
  42134. return true;
  42135. }
  42136. return defaultValue;
  42137. }
  42138. }, {
  42139. key: "_formatGeoJSON",
  42140. value: function _formatGeoJSON(data) {
  42141. var features = data.features;
  42142. features.forEach(function (row, index) {
  42143. row.properties['index'] = index;
  42144. });
  42145. return features;
  42146. }
  42147. }, {
  42148. key: "_excelData2Feature",
  42149. value: function _excelData2Feature(dataContent) {
  42150. var xyField = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  42151. var fieldCaptions = dataContent.colTitles;
  42152. var xfieldIndex = fieldCaptions.indexOf(xyField.xField);
  42153. var yfieldIndex = fieldCaptions.indexOf(xyField.yField);
  42154. if (yfieldIndex < 0 || xfieldIndex < 0) {
  42155. for (var i = 0, len = fieldCaptions.length; i < len; i++) {
  42156. if ((0, _util.isXField)(fieldCaptions[i])) {
  42157. xfieldIndex = i;
  42158. }
  42159. if ((0, _util.isYField)(fieldCaptions[i])) {
  42160. yfieldIndex = i;
  42161. }
  42162. }
  42163. }
  42164. var features = [];
  42165. for (var _i = 0, _len = dataContent.rows.length; _i < _len; _i++) {
  42166. var row = dataContent.rows[_i];
  42167. var x = Number(row[xfieldIndex]);
  42168. var y = Number(row[yfieldIndex]);
  42169. var attributes = {};
  42170. for (var index in dataContent.colTitles) {
  42171. var key = dataContent.colTitles[index];
  42172. attributes[key] = dataContent.rows[_i][index];
  42173. }
  42174. attributes['index'] = _i + '';
  42175. var feature = {
  42176. type: 'Feature',
  42177. geometry: {
  42178. type: 'Point',
  42179. coordinates: [x, y]
  42180. },
  42181. properties: attributes
  42182. };
  42183. features.push(feature);
  42184. }
  42185. return features;
  42186. }
  42187. }, {
  42188. key: "_excelData2FeatureByDivision",
  42189. value: function _excelData2FeatureByDivision(content, divisionType, divisionField) {
  42190. var _this14 = this;
  42191. var dataName = ['城市', 'City'].includes(divisionType) ? 'MunicipalData' : 'ProvinceData';
  42192. if (window[dataName] && window[dataName].features) {
  42193. return new Promise(function (resolve) {
  42194. resolve(_this14._combineFeature(content, window[dataName], divisionField));
  42195. });
  42196. }
  42197. var dataFileName = ['城市', 'City'].includes(divisionType) ? 'MunicipalData.js' : 'ProvincialData.js';
  42198. var proxy = this.handleProxy();
  42199. var dataUrl = "".concat(this.serverUrl, "apps/dataviz/libs/administrative_data/").concat(dataFileName);
  42200. return SuperMap.FetchRequest.get(dataUrl, null, {
  42201. withCredentials: this.handleWithCredentials(proxy, dataUrl, this.withCredentials),
  42202. proxy: proxy,
  42203. withoutFormatSuffix: true
  42204. }).then(function (response) {
  42205. return response.text();
  42206. }).then(function (result) {
  42207. new Function(result)();
  42208. return _this14._combineFeature(content, window[dataName], divisionField);
  42209. });
  42210. }
  42211. }, {
  42212. key: "_combineFeature",
  42213. value: function _combineFeature(properties, geoData, divisionField) {
  42214. var _this15 = this;
  42215. var geojson = {
  42216. type: 'FeatureCollection',
  42217. features: []
  42218. };
  42219. if (properties.length < 2) {
  42220. return geojson;
  42221. }
  42222. var titles = properties.colTitles,
  42223. rows = properties.rows,
  42224. fieldIndex = titles.findIndex(function (title) {
  42225. return title === divisionField;
  42226. });
  42227. rows.forEach(function (row) {
  42228. var feature = geoData.features.find(function (item, index) {
  42229. return _this15._isMatchAdministrativeName(item.properties.Name, row[fieldIndex]);
  42230. });
  42231. if (feature) {
  42232. var combineFeature = {
  42233. properties: {},
  42234. geometry: feature.geometry,
  42235. type: 'Feature'
  42236. };
  42237. row.forEach(function (item, idx) {
  42238. combineFeature.properties[titles[idx]] = item;
  42239. });
  42240. geojson.features.push(combineFeature);
  42241. }
  42242. });
  42243. return geojson;
  42244. }
  42245. }, {
  42246. key: "_isMatchAdministrativeName",
  42247. value: function _isMatchAdministrativeName(featureName, fieldName) {
  42248. if (featureName && typeof fieldName === 'string' && fieldName.constructor === String) {
  42249. var shortName = featureName.substr(0, 2);
  42250. if (shortName === '张家') {
  42251. shortName = featureName.substr(0, 3);
  42252. }
  42253. if (shortName === '阿拉') {
  42254. shortName = featureName.substr(0, 3);
  42255. }
  42256. return !!fieldName.startsWith(shortName);
  42257. }
  42258. return false;
  42259. }
  42260. }, {
  42261. key: "_getTileLayerInfo",
  42262. value: function _getTileLayerInfo(url, baseProjection) {
  42263. var _this16 = this;
  42264. var proxy = this.handleProxy();
  42265. var epsgCode = baseProjection.split('EPSG:')[1];
  42266. var serviceUrl = "".concat(url, "/maps.json");
  42267. return SuperMap.FetchRequest.get(serviceUrl, null, {
  42268. withCredentials: this.handleWithCredentials(proxy, serviceUrl, this.withCredentials),
  42269. proxy: proxy
  42270. }).then(function (response) {
  42271. return response.json();
  42272. }).then(function (mapInfo) {
  42273. var promises = [];
  42274. if (mapInfo) {
  42275. mapInfo.forEach(function (info) {
  42276. var promise = SuperMap.FetchRequest.get("".concat(info.path, ".json?prjCoordSys=").concat(JSON.stringify({
  42277. epsgCode: epsgCode
  42278. })), null, {
  42279. withCredentials: _this16.withCredentials,
  42280. proxy: proxy
  42281. }).then(function (response) {
  42282. return response.json();
  42283. }).then(function (restMapInfo) {
  42284. restMapInfo.url = info.path;
  42285. return restMapInfo;
  42286. });
  42287. promises.push(promise);
  42288. });
  42289. }
  42290. return Promise.all(promises).then(function (allRestMaps) {
  42291. return allRestMaps;
  42292. });
  42293. });
  42294. }
  42295. }, {
  42296. key: "_getFeatureBySQL",
  42297. value: function _getFeatureBySQL(url, datasetNames, _processCompleted2, processFaild) {
  42298. var getFeatureParam, getFeatureBySQLService, getFeatureBySQLParams;
  42299. getFeatureParam = new SuperMap.FilterParameter({
  42300. name: datasetNames.join().replace(':', '@'),
  42301. attributeFilter: null
  42302. });
  42303. getFeatureBySQLParams = new SuperMap.GetFeaturesBySQLParameters({
  42304. queryParameter: getFeatureParam,
  42305. datasetNames: datasetNames,
  42306. fromIndex: 0,
  42307. toIndex: -1,
  42308. maxFeatures: -1,
  42309. returnContent: true
  42310. });
  42311. var proxy = this.handleProxy();
  42312. var options = {
  42313. proxy: proxy,
  42314. withCredentials: this.handleWithCredentials(proxy, url, false),
  42315. eventListeners: {
  42316. processCompleted: function processCompleted(getFeaturesEventArgs) {
  42317. _processCompleted2 && _processCompleted2(getFeaturesEventArgs);
  42318. },
  42319. processFailed: function processFailed(e) {
  42320. processFaild && processFaild(e);
  42321. }
  42322. }
  42323. };
  42324. getFeatureBySQLService = new SuperMap.GetFeaturesBySQLService(url, options);
  42325. getFeatureBySQLService.processAsync(getFeatureBySQLParams);
  42326. }
  42327. }]);
  42328. return WebMapService;
  42329. }(_Events2.Events);
  42330. exports.default = WebMapService;
  42331. /***/ }),
  42332. /***/ "f885":
  42333. /***/ (function(module, exports, __webpack_require__) {
  42334. var baseGetTag = __webpack_require__("6704"),
  42335. isObjectLike = __webpack_require__("4b93");
  42336. /** `Object#toString` result references. */
  42337. var symbolTag = '[object Symbol]';
  42338. /**
  42339. * Checks if `value` is classified as a `Symbol` primitive or object.
  42340. *
  42341. * @static
  42342. * @memberOf _
  42343. * @since 4.0.0
  42344. * @category Lang
  42345. * @param {*} value The value to check.
  42346. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  42347. * @example
  42348. *
  42349. * _.isSymbol(Symbol.iterator);
  42350. * // => true
  42351. *
  42352. * _.isSymbol('abc');
  42353. * // => false
  42354. */
  42355. function isSymbol(value) {
  42356. return typeof value == 'symbol' ||
  42357. (isObjectLike(value) && baseGetTag(value) == symbolTag);
  42358. }
  42359. module.exports = isSymbol;
  42360. /***/ }),
  42361. /***/ "f8a6":
  42362. /***/ (function(module, exports, __webpack_require__) {
  42363. "use strict";
  42364. var _interopRequireWildcard = __webpack_require__("16ed");
  42365. var _interopRequireDefault = __webpack_require__("8e6d");
  42366. Object.defineProperty(exports, "__esModule", {
  42367. value: true
  42368. });
  42369. exports.default = void 0;
  42370. var _globalEvent = _interopRequireDefault(__webpack_require__("fb6a"));
  42371. var _epsgDefine = __webpack_require__("1a91");
  42372. var _antDesignVue = __webpack_require__("a587");
  42373. var _lang = __webpack_require__("4e21");
  42374. var _theme = _interopRequireDefault(__webpack_require__("3853"));
  42375. var components = _interopRequireWildcard(__webpack_require__("9903"));
  42376. __webpack_require__("1969");
  42377. var commontypes = _interopRequireWildcard(__webpack_require__("8607"));
  42378. var setTheme = function setTheme() {
  42379. var themeStyle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  42380. if (typeof themeStyle === 'string') {
  42381. themeStyle = _theme.default.filter(function (item) {
  42382. return item.label === themeStyle;
  42383. })[0] || {};
  42384. }
  42385. _globalEvent.default.$options.theme = themeStyle;
  42386. _globalEvent.default.$emit('change-theme', themeStyle);
  42387. };
  42388. var install = function install(Vue) {
  42389. var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  42390. var theme = opts.theme || 'light';
  42391. __webpack_require__("d073")("./".concat(theme, ".scss"));
  42392. __webpack_require__("db36");
  42393. setTheme(theme);
  42394. (0, _epsgDefine.registerProjection)(opts.projections);
  42395. Vue.use(_antDesignVue.Button);
  42396. Vue.use(_antDesignVue.Checkbox);
  42397. Vue.use(_antDesignVue.Card);
  42398. Vue.use(_antDesignVue.Slider);
  42399. Vue.use(_antDesignVue.Select);
  42400. Vue.use(_antDesignVue.Collapse);
  42401. Vue.use(_antDesignVue.Input);
  42402. Vue.use(_antDesignVue.Table);
  42403. Vue.use(_antDesignVue.Progress);
  42404. Vue.use(_antDesignVue.Icon);
  42405. Vue.use(_antDesignVue.Spin);
  42406. Vue.use(_antDesignVue.Modal);
  42407. Vue.use(_antDesignVue.Tree);
  42408. Vue.use(_antDesignVue.Tabs);
  42409. Vue.prototype.$message = _antDesignVue.message;
  42410. (0, _lang.initi18n)(Vue, opts);
  42411. for (var component in components) {
  42412. var com = components[component];
  42413. Vue.component(com.options ? com.options.name : com.name, com);
  42414. }
  42415. };
  42416. if (typeof window !== 'undefined' && window['Vue']) {
  42417. install(window['Vue'], {
  42418. theme: 'light'
  42419. });
  42420. }
  42421. var _default = {
  42422. setTheme: setTheme,
  42423. commontypes: commontypes,
  42424. lang: _lang.lang,
  42425. locale: _lang.setLocale,
  42426. install: install
  42427. };
  42428. exports.default = _default;
  42429. /***/ }),
  42430. /***/ "fb6a":
  42431. /***/ (function(module, exports, __webpack_require__) {
  42432. "use strict";
  42433. var _interopRequireDefault = __webpack_require__("8e6d");
  42434. Object.defineProperty(exports, "__esModule", {
  42435. value: true
  42436. });
  42437. exports.default = void 0;
  42438. var _vue = _interopRequireDefault(__webpack_require__("5643"));
  42439. var _theme = _interopRequireDefault(__webpack_require__("3853"));
  42440. var _default = new _vue.default({
  42441. theme: _theme.default[1]
  42442. });
  42443. exports.default = _default;
  42444. /***/ }),
  42445. /***/ "fb97":
  42446. /***/ (function(module, exports, __webpack_require__) {
  42447. "use strict";
  42448. var _interopRequireDefault = __webpack_require__("8e6d");
  42449. Object.defineProperty(exports, "__esModule", {
  42450. value: true
  42451. });
  42452. exports.default = void 0;
  42453. var _regenerator = _interopRequireDefault(__webpack_require__("849c"));
  42454. var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
  42455. var _createClass2 = _interopRequireDefault(__webpack_require__("66f6"));
  42456. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("8377"));
  42457. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("c031"));
  42458. var _inherits2 = _interopRequireDefault(__webpack_require__("6b51"));
  42459. var _leafletWrapper = _interopRequireDefault(__webpack_require__("6f27"));
  42460. __webpack_require__("751d");
  42461. __webpack_require__("3ef3");
  42462. var _center = _interopRequireDefault(__webpack_require__("cf46"));
  42463. var _WebMapBase2 = _interopRequireDefault(__webpack_require__("d6e6"));
  42464. var _epsgDefine = __webpack_require__("1a91");
  42465. var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
  42466. function adopt(value) {
  42467. return value instanceof P ? value : new P(function (resolve) {
  42468. resolve(value);
  42469. });
  42470. }
  42471. return new (P || (P = Promise))(function (resolve, reject) {
  42472. function fulfilled(value) {
  42473. try {
  42474. step(generator.next(value));
  42475. } catch (e) {
  42476. reject(e);
  42477. }
  42478. }
  42479. function rejected(value) {
  42480. try {
  42481. step(generator["throw"](value));
  42482. } catch (e) {
  42483. reject(e);
  42484. }
  42485. }
  42486. function step(result) {
  42487. result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
  42488. }
  42489. step((generator = generator.apply(thisArg, _arguments || [])).next());
  42490. });
  42491. };
  42492. var WebMapViewModel =
  42493. /*#__PURE__*/
  42494. function (_WebMapBase) {
  42495. (0, _inherits2.default)(WebMapViewModel, _WebMapBase);
  42496. function WebMapViewModel(id) {
  42497. var _this;
  42498. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  42499. var mapOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  42500. (0, _classCallCheck2.default)(this, WebMapViewModel);
  42501. _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(WebMapViewModel).call(this, id, options, mapOptions));
  42502. _this.layers = {};
  42503. _this._dataflowPathIdCache = {};
  42504. _this._dataflowLabelIdCache = {};
  42505. _this._dataflowLineFeatureCache = {};
  42506. _this.center = mapOptions.center;
  42507. _this.zoom = mapOptions.zoom;
  42508. _this._initWebMap();
  42509. return _this;
  42510. }
  42511. (0, _createClass2.default)(WebMapViewModel, [{
  42512. key: "resize",
  42513. value: function resize() {
  42514. this.map && this.map.invalidateSize();
  42515. this.echartsLayerResize();
  42516. }
  42517. }, {
  42518. key: "setCenter",
  42519. value: function setCenter(center) {
  42520. if (this.map) {
  42521. this.mapOptions.center = center;
  42522. center && center.length > 0 && this.map.setView(center, this.zoom);
  42523. }
  42524. }
  42525. }, {
  42526. key: "_initWebMap",
  42527. value: function _initWebMap() {
  42528. this.initWebMap();
  42529. }
  42530. }, {
  42531. key: "_getMapInfo",
  42532. value: function _getMapInfo(mapInfo, _taskID) {
  42533. var layers = mapInfo.layers;
  42534. this._layers = [];
  42535. this._createMap(mapInfo);
  42536. this._initBaseLayer(mapInfo, false);
  42537. if (!layers || layers.length === 0) {
  42538. this._sendMapToUser(0, 0);
  42539. } else {
  42540. this._initOverlayLayers(layers, _taskID);
  42541. }
  42542. }
  42543. }, {
  42544. key: "_createMap",
  42545. value: function _createMap(mapInfo) {
  42546. var _this2 = this;
  42547. if (!mapInfo) {
  42548. this.map = _leafletWrapper.default.map(this.target, {
  42549. center: this.center && this.center.length ? _leafletWrapper.default.latLng(this.center[0], this.center[1]) : [0, 0],
  42550. zoom: this.zoom || 0,
  42551. crs: this.mapOptions.crs || _leafletWrapper.default.CRS.EPSG3857,
  42552. maxZoom: this.mapOptions.maxZoom || 30,
  42553. minZoom: this.mapOptions.minZoom || 0,
  42554. preferCanvas: this.mapOptions.preferCanvas || true
  42555. });
  42556. setTimeout(function () {
  42557. _this2.triggerEvent('addlayerssucceeded', {
  42558. map: _this2.map,
  42559. mapparams: {},
  42560. layers: []
  42561. });
  42562. }, 0);
  42563. return;
  42564. }
  42565. var level = mapInfo.level,
  42566. maxZoom = mapInfo.maxZoom,
  42567. minZoom = mapInfo.minZoom;
  42568. var zoom = level ? level : 0;
  42569. zoom = zoom === 0 ? 0 : zoom;
  42570. var crs = this._handleMapCrs(mapInfo);
  42571. var center = this._getMapCenter(mapInfo);
  42572. this.map = _leafletWrapper.default.map(this.target, {
  42573. center: this.center || center,
  42574. zoom: this.zoom || zoom,
  42575. crs: crs,
  42576. maxZoom: maxZoom || 30,
  42577. minZoom: minZoom || 0,
  42578. preferCanvas: true
  42579. });
  42580. this.triggerEvent('mapinitialized', {
  42581. map: this.map
  42582. });
  42583. }
  42584. }, {
  42585. key: "_initBaseLayer",
  42586. value: function _initBaseLayer(mapInfo) {
  42587. var sendToMap = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  42588. var layerInfo = mapInfo.baseLayer || mapInfo;
  42589. var layerType = this.getBaseLayerType(layerInfo);
  42590. var mapUrls = this.getMapurls({
  42591. CLOUD: 'http://t2.dituhui.com/FileService/image',
  42592. CLOUD_BLACK: 'http://t3.dituhui.com/MapService/getGdp',
  42593. OSM: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'
  42594. });
  42595. var url;
  42596. var layer;
  42597. switch (layerType) {
  42598. case 'TIANDITU':
  42599. layer = this._createTiandituLayer(layerInfo);
  42600. break;
  42601. case 'BING':
  42602. layer = this._createBingLayer();
  42603. break;
  42604. case 'WMS':
  42605. layer = this._createWMSLayer(layerInfo);
  42606. break;
  42607. case 'WMTS':
  42608. layer = this._createWMTSLayer(layerInfo);
  42609. break;
  42610. case 'TILE':
  42611. layer = this._createDynamicTiledLayer(layerInfo);
  42612. break;
  42613. case 'CLOUD':
  42614. url = mapUrls[layerInfo.layerType];
  42615. layer = this._createCLOUDLayer(layerType, url);
  42616. break;
  42617. case 'XYZ':
  42618. url = mapUrls[layerInfo.layerType];
  42619. layer = this._createXYZLayer(url);
  42620. break;
  42621. case 'BAIDU':
  42622. layer = this._createBaiduTileLayer();
  42623. break;
  42624. case 'MAPBOXSTYLE':
  42625. this.triggerEvent('notsupportmvt', {});
  42626. break;
  42627. default:
  42628. break;
  42629. }
  42630. layer && this._addLayerToMap({
  42631. layer: layer,
  42632. type: 'baseLayers',
  42633. layerInfo: layerInfo,
  42634. sendToMap: sendToMap
  42635. });
  42636. }
  42637. }, {
  42638. key: "_initOverlayLayers",
  42639. value: function _initOverlayLayers(layers, _taskID) {
  42640. var _this3 = this;
  42641. this._layers = layers;
  42642. this.layerAdded = 0;
  42643. this.expectLayerLen = layers.length;
  42644. if (this.expectLayerLen > 0) {
  42645. layers.forEach(function (layer, index) {
  42646. var type = _this3.webMapService.getDatasourceType(layer);
  42647. if (type === 'SAMPLE_DATA') {
  42648. _this3._addLayerSucceeded();
  42649. _this3.triggerEvent('getlayerdatasourcefailed', {
  42650. error: 'SAMPLE DATA is not supported',
  42651. layer: layer,
  42652. map: _this3.map
  42653. });
  42654. return;
  42655. }
  42656. layer.layerID = layer.name + '-' + index;
  42657. layer.index = index;
  42658. if (type === 'tile') {
  42659. _this3._initBaseLayer(layer);
  42660. } else {
  42661. _this3.getLayerFeatures(layer, _taskID, type);
  42662. }
  42663. }, this);
  42664. }
  42665. }
  42666. }, {
  42667. key: "_createMvtLayer",
  42668. value: function _createMvtLayer(info, layer, featureType) {
  42669. this._addLayerSucceeded();
  42670. return;
  42671. }
  42672. }, {
  42673. key: "_createRestMapLayer",
  42674. value: function _createRestMapLayer(restMaps, layer) {
  42675. var _this4 = this;
  42676. restMaps.forEach(function (restMapInfo, index) {
  42677. layer = _this4.getRestMapLayerInfo(restMapInfo, layer);
  42678. _this4._initBaseLayer(layer, index === restMaps.length - 1);
  42679. });
  42680. }
  42681. }, {
  42682. key: "_initOverlayLayer",
  42683. value: function _initOverlayLayer(layerInfo, features) {
  42684. return __awaiter(this, void 0, void 0,
  42685. /*#__PURE__*/
  42686. _regenerator.default.mark(function _callee() {
  42687. var layerType, style, filterCondition, featureType, labelStyle, projection, epsgCode, layer, labelLayerInfo, labelLayer;
  42688. return _regenerator.default.wrap(function _callee$(_context) {
  42689. while (1) {
  42690. switch (_context.prev = _context.next) {
  42691. case 0:
  42692. _context.prev = 0;
  42693. layerType = layerInfo.layerType, style = layerInfo.style, filterCondition = layerInfo.filterCondition, featureType = layerInfo.featureType, labelStyle = layerInfo.labelStyle, projection = layerInfo.projection;
  42694. if (!(layerType === 'restMap')) {
  42695. _context.next = 5;
  42696. break;
  42697. }
  42698. this._createRestMapLayer(features, layerInfo);
  42699. return _context.abrupt("return");
  42700. case 5:
  42701. if (!(layerType === 'mvt')) {
  42702. _context.next = 8;
  42703. break;
  42704. }
  42705. this._createMvtLayer(features.info, layerInfo, features.featureType);
  42706. return _context.abrupt("return");
  42707. case 8:
  42708. if (!(features && projection && projection !== 'EPSG:4326')) {
  42709. _context.next = 14;
  42710. break;
  42711. }
  42712. epsgCode = projection.split(':')[1];
  42713. if (epsgCode) {
  42714. _context.next = 12;
  42715. break;
  42716. }
  42717. return _context.abrupt("return");
  42718. case 12:
  42719. this._unprojectCrs = this.getTransformCoodinatesCRS(projection.split(":")[1]);
  42720. features = this.transformFeatures(features);
  42721. case 14:
  42722. features = this.handleLayerFeatures(features, layerInfo);
  42723. _context.t0 = layerType;
  42724. _context.next = _context.t0 === 'VECTOR' ? 18 : _context.t0 === 'UNIQUE' ? 34 : _context.t0 === 'RANGE' ? 38 : _context.t0 === 'HEAT' ? 42 : _context.t0 === 'MARKER' ? 46 : _context.t0 === 'RANK_SYMBOL' ? 50 : _context.t0 === 'MIGRATION' ? 54 : _context.t0 === 'DATAFLOW_POINT_TRACK' ? 58 : _context.t0 === 'DATAFLOW_HEAT' ? 58 : 62;
  42725. break;
  42726. case 18:
  42727. if (!(featureType === 'POINT')) {
  42728. _context.next = 30;
  42729. break;
  42730. }
  42731. if (!(style.type === 'SYMBOL_POINT')) {
  42732. _context.next = 25;
  42733. break;
  42734. }
  42735. _context.next = 22;
  42736. return this._createSymbolLayer(layerInfo, features);
  42737. case 22:
  42738. layer = _context.sent;
  42739. _context.next = 28;
  42740. break;
  42741. case 25:
  42742. _context.next = 27;
  42743. return this._createGraphicLayer(layerInfo, features);
  42744. case 27:
  42745. layer = _context.sent;
  42746. case 28:
  42747. _context.next = 33;
  42748. break;
  42749. case 30:
  42750. _context.next = 32;
  42751. return this._createVectorLayer(layerInfo, features);
  42752. case 32:
  42753. layer = _context.sent;
  42754. case 33:
  42755. return _context.abrupt("break", 62);
  42756. case 34:
  42757. _context.next = 36;
  42758. return this._createUniqueLayer(layerInfo, features);
  42759. case 36:
  42760. layer = _context.sent;
  42761. return _context.abrupt("break", 62);
  42762. case 38:
  42763. _context.next = 40;
  42764. return this._createRangeLayer(layerInfo, features);
  42765. case 40:
  42766. layer = _context.sent;
  42767. return _context.abrupt("break", 62);
  42768. case 42:
  42769. _context.next = 44;
  42770. return this._createHeatLayer(layerInfo, features);
  42771. case 44:
  42772. layer = _context.sent;
  42773. return _context.abrupt("break", 62);
  42774. case 46:
  42775. _context.next = 48;
  42776. return this._createMarkerLayer(features);
  42777. case 48:
  42778. layer = _context.sent;
  42779. return _context.abrupt("break", 62);
  42780. case 50:
  42781. _context.next = 52;
  42782. return this._createRankSymbolLayer(layerInfo, features);
  42783. case 52:
  42784. layer = _context.sent;
  42785. return _context.abrupt("break", 62);
  42786. case 54:
  42787. _context.next = 56;
  42788. return this._createMigrationLayer(layerInfo, features);
  42789. case 56:
  42790. layer = _context.sent;
  42791. return _context.abrupt("break", 62);
  42792. case 58:
  42793. _context.next = 60;
  42794. return this._createDataflowLayer(layerInfo);
  42795. case 60:
  42796. layer = _context.sent;
  42797. return _context.abrupt("break", 62);
  42798. case 62:
  42799. if (labelStyle && labelStyle.labelField && layerType !== 'DATAFLOW_POINT_TRACK') {
  42800. features = this.getFilterFeatures(filterCondition, features);
  42801. labelLayerInfo = JSON.parse(JSON.stringify(layerInfo));
  42802. labelLayer = this._addLabelLayer(labelLayerInfo, features);
  42803. this._addLayerToMap({
  42804. layer: _leafletWrapper.default.layerGroup([layer, labelLayer]),
  42805. layerInfo: layerInfo
  42806. });
  42807. } else {
  42808. layer && this._addLayerToMap({
  42809. layer: layer,
  42810. layerInfo: layerInfo
  42811. });
  42812. }
  42813. _context.next = 70;
  42814. break;
  42815. case 65:
  42816. _context.prev = 65;
  42817. _context.t1 = _context["catch"](0);
  42818. console.error(_context.t1);
  42819. this._addLayerSucceeded();
  42820. this.triggerEvent('getlayerdatasourcefailed', {
  42821. error: _context.t1,
  42822. layer: layerInfo,
  42823. map: this.map
  42824. });
  42825. case 70:
  42826. case "end":
  42827. return _context.stop();
  42828. }
  42829. }
  42830. }, _callee, this, [[0, 65]]);
  42831. }));
  42832. }
  42833. }, {
  42834. key: "_createBingLayer",
  42835. value: function _createBingLayer() {
  42836. var url = 'https://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';
  42837. _leafletWrapper.default.TileLayer.BingLayer = _leafletWrapper.default.TileLayer.extend({
  42838. getTileUrl: function getTileUrl(coordinates) {
  42839. var z = coordinates.z,
  42840. x = coordinates.x,
  42841. y = coordinates.y;
  42842. var index = '';
  42843. for (var i = z; i > 0; i--) {
  42844. var b = 0;
  42845. var mask = 1 << i - 1;
  42846. if ((x & mask) !== 0) {
  42847. b++;
  42848. }
  42849. if ((y & mask) !== 0) {
  42850. b += 2;
  42851. }
  42852. index += b.toString();
  42853. }
  42854. return url.replace('{quadKey}', index);
  42855. }
  42856. });
  42857. _leafletWrapper.default.tileLayer.bingLayer = function (url, options) {
  42858. return new _leafletWrapper.default.TileLayer.BingLayer(url, options);
  42859. };
  42860. return _leafletWrapper.default.tileLayer.bingLayer(url, {
  42861. noWrap: true
  42862. });
  42863. }
  42864. }, {
  42865. key: "_createDynamicTiledLayer",
  42866. value: function _createDynamicTiledLayer(layerInfo) {
  42867. var url = layerInfo.url;
  42868. var layer = _leafletWrapper.default.supermap.tiledMapLayer(url, {
  42869. noWrap: true,
  42870. prjCoordSys: {
  42871. epsgCode: this.baseProjection.split(':')[1]
  42872. }
  42873. });
  42874. return layer;
  42875. }
  42876. }, {
  42877. key: "_createWMSLayer",
  42878. value: function _createWMSLayer(layerInfo) {
  42879. var url = layerInfo.url,
  42880. layers = layerInfo.layers;
  42881. if (!layers || layers === 'undefined' || layers === 'null') {
  42882. layers = '0';
  42883. } else if (layers.length > 0) {
  42884. layers = layers[0];
  42885. }
  42886. return _leafletWrapper.default.tileLayer.wms(url, {
  42887. layers: layers,
  42888. format: 'image/png',
  42889. transparent: true,
  42890. noWrap: true
  42891. });
  42892. }
  42893. }, {
  42894. key: "_createWMTSLayer",
  42895. value: function _createWMTSLayer(layerInfo) {
  42896. var url = layerInfo.url,
  42897. tileMatrixSet = layerInfo.tileMatrixSet,
  42898. name = layerInfo.name;
  42899. return _leafletWrapper.default.supermap.wmtsLayer(url, {
  42900. layer: name,
  42901. style: 'default',
  42902. tilematrixSet: tileMatrixSet,
  42903. format: 'image/png',
  42904. noWrap: true
  42905. });
  42906. }
  42907. }, {
  42908. key: "_createTiandituLayer",
  42909. value: function _createTiandituLayer(layerInfo) {
  42910. this.map.getZoom() < 1 && this.map.setZoom(1);
  42911. this.map.setMinZoom(1);
  42912. var layerType = layerInfo.layerType.split('_')[1].toLowerCase();
  42913. var isLabel = Boolean(layerInfo.labelLayerVisible);
  42914. var tiandituLayer = _leafletWrapper.default.supermap.tiandituTileLayer({
  42915. layerType: layerType,
  42916. key: this.tiandituKey
  42917. });
  42918. var tiandituLabelLayer = _leafletWrapper.default.supermap.tiandituTileLayer({
  42919. layerType: layerType,
  42920. isLabel: true,
  42921. key: this.tiandituKey
  42922. });
  42923. var layers = [tiandituLayer];
  42924. isLabel && layers.push(tiandituLabelLayer);
  42925. return _leafletWrapper.default.layerGroup(layers);
  42926. }
  42927. }, {
  42928. key: "_createCLOUDLayer",
  42929. value: function _createCLOUDLayer(layerType, url) {
  42930. if (layerType === 'CLOUD') {
  42931. this.map.getZoom() < 3 && this.map.setZoom(3);
  42932. this.map.setMinZoom(3);
  42933. }
  42934. return _leafletWrapper.default.supermap.cloudTileLayer(url, {
  42935. noWrap: true
  42936. });
  42937. }
  42938. }, {
  42939. key: "_createXYZLayer",
  42940. value: function _createXYZLayer(url) {
  42941. return _leafletWrapper.default.tileLayer(url, {
  42942. noWrap: true
  42943. });
  42944. }
  42945. }, {
  42946. key: "_createBaiduTileLayer",
  42947. value: function _createBaiduTileLayer() {
  42948. this.map.getZoom() < 3 && this.map.setZoom(3);
  42949. this.map.setMinZoom(3);
  42950. return _leafletWrapper.default.supermap.baiduTileLayer('', {
  42951. noWrap: true
  42952. });
  42953. }
  42954. }, {
  42955. key: "_createUniqueLayer",
  42956. value: function _createUniqueLayer(layerInfo, features) {
  42957. return this._createThemeLayer('unique', layerInfo, features);
  42958. }
  42959. }, {
  42960. key: "_createRangeLayer",
  42961. value: function _createRangeLayer(layerInfo, features) {
  42962. return this._createThemeLayer('range', layerInfo, features);
  42963. }
  42964. }, {
  42965. key: "_createMarkerLayer",
  42966. value: function _createMarkerLayer(features) {
  42967. var _this5 = this;
  42968. return new Promise(function (resolve, reject) {
  42969. var layerGroupPromises = features && features.map(function (feature) {
  42970. return new Promise(function (resolve, reject) {
  42971. var geomType = feature.geometry.type.toUpperCase();
  42972. var defaultStyle = feature.dv_v5_markerStyle;
  42973. if (geomType === 'POINT' && defaultStyle.text) {
  42974. geomType = 'TEXT';
  42975. }
  42976. var featureInfo = _this5.setFeatureInfo(feature);
  42977. feature.properties['useStyle'] = defaultStyle;
  42978. feature.properties['featureInfo'] = featureInfo;
  42979. if (geomType === 'POINT' && defaultStyle.src && defaultStyle.src.indexOf('http://') === -1 && defaultStyle.src.indexOf('https://') === -1) {
  42980. defaultStyle.src = _this5.serverUrl + defaultStyle.src;
  42981. }
  42982. var imgWidth = (defaultStyle.imgWidth || 48) * defaultStyle.scale;
  42983. var imgHeight = (defaultStyle.imgHeight || 43) * defaultStyle.scale;
  42984. if (geomType === 'POINT' && defaultStyle.src && defaultStyle.src.indexOf('svg') <= -1) {
  42985. resolve(_leafletWrapper.default.marker([feature.geometry.coordinates[1], feature.geometry.coordinates[0]], {
  42986. icon: _leafletWrapper.default.icon({
  42987. iconUrl: defaultStyle.src,
  42988. iconSize: [imgWidth, imgHeight],
  42989. iconAnchor: [imgWidth * defaultStyle.anchor[0], imgHeight * defaultStyle.anchor[1]]
  42990. })
  42991. }));
  42992. }
  42993. if (geomType === 'POINT' && defaultStyle.src && defaultStyle.src.indexOf('svg') > -1) {
  42994. if (!_this5._svgDiv) {
  42995. _this5._svgDiv = document.createElement('div');
  42996. document.body.appendChild(_this5._svgDiv);
  42997. }
  42998. _this5.getCanvasFromSVG(defaultStyle.src, _this5._svgDiv, function (canvas) {
  42999. resolve(_this5._getSvgLayer(canvas, defaultStyle, [feature]));
  43000. });
  43001. }
  43002. if (!defaultStyle.src) {
  43003. if (geomType === 'LINESTRING' && defaultStyle.lineCap || geomType === 'POLYGON') {
  43004. resolve(_this5._createGeojsonLayer([feature], _this5._getVectorLayerStyle(defaultStyle)));
  43005. } else if (geomType === 'TEXT') {
  43006. var text = new _leafletWrapper.default.supermap.labelThemeLayer(defaultStyle.text + '-text');
  43007. text.style = {
  43008. fontSize: defaultStyle.font.split(' ')[0],
  43009. labelRect: true,
  43010. fontColor: defaultStyle.fillColor,
  43011. fill: true,
  43012. fillColor: defaultStyle.backgroundFill,
  43013. stroke: false
  43014. };
  43015. text.themeField = 'text';
  43016. feature.properties.text = defaultStyle.text;
  43017. var geoTextFeature = new _leafletWrapper.default.supermap.themeFeature([feature.geometry.coordinates[1], feature.geometry.coordinates[0], defaultStyle.text], feature.properties);
  43018. text.addFeatures([geoTextFeature]);
  43019. resolve(text);
  43020. } else {
  43021. resolve(_leafletWrapper.default.circleMarker([feature.geometry.coordinates[1], feature.geometry.coordinates[0]], Object.assign({}, _this5._getVectorLayerStyle(defaultStyle))));
  43022. }
  43023. }
  43024. });
  43025. });
  43026. layerGroupPromises && Promise.all(layerGroupPromises).then(function (layerGroup) {
  43027. layerGroup && resolve(_leafletWrapper.default.layerGroup(layerGroup));
  43028. }).catch(function (error) {
  43029. console.error(error);
  43030. });
  43031. });
  43032. }
  43033. }, {
  43034. key: "_createRankSymbolLayer",
  43035. value: function _createRankSymbolLayer(layerInfo, features) {
  43036. var _this6 = this;
  43037. var fieldName = layerInfo.themeSetting.themeField;
  43038. var style = layerInfo.style;
  43039. var styleSource = this.createRankStyleSource(layerInfo, features);
  43040. var styleGroups = styleSource.styleGroups;
  43041. features = this.getFilterFeatures(layerInfo.filterCondition, features);
  43042. var radiusList = [];
  43043. features.forEach(function (row) {
  43044. var target = parseFloat(row.properties[fieldName]);
  43045. if (styleGroups) {
  43046. for (var i = 0; i < styleGroups.length; i++) {
  43047. if (styleGroups[i].start <= target && target < styleGroups[i].end) {
  43048. var radius = style.type === 'SYMBOL_POINT' || style.type === 'IMAGE_POINT' ? style.type === 'SYMBOL_POINT' ? styleGroups[i].radius * 2 : styleGroups[i].radius : styleGroups[i].radius;
  43049. radiusList.push(radius);
  43050. }
  43051. }
  43052. }
  43053. }, this);
  43054. if (style.type === 'SYMBOL_POINT') {
  43055. return this._createSymbolLayer(layerInfo, features, radiusList);
  43056. } else if (style.type === 'IMAGE_POINT' || style.type === 'SVG_POINT') {
  43057. return this._createGraphicLayer(layerInfo, features, radiusList);
  43058. } else {
  43059. var layerGroup = [];
  43060. features.forEach(function (feature, index) {
  43061. var newStyle = Object.assign({}, style, {
  43062. radius: radiusList[index]
  43063. });
  43064. layerGroup.push(_leafletWrapper.default.circleMarker([feature.geometry.coordinates[1], feature.geometry.coordinates[0]], _this6._getVectorLayerStyle(newStyle)));
  43065. });
  43066. return _leafletWrapper.default.layerGroup(layerGroup);
  43067. }
  43068. }
  43069. }, {
  43070. key: "_addLabelLayer",
  43071. value: function _addLabelLayer(layerInfo, features) {
  43072. var labelStyle = layerInfo.labelStyle,
  43073. layerID = layerInfo.layerID,
  43074. featureType = layerInfo.featureType;
  43075. var label = new _leafletWrapper.default.supermap.labelThemeLayer(layerID + '-label');
  43076. labelStyle.fontSize = 14;
  43077. labelStyle.labelRect = true;
  43078. labelStyle.fontColor = labelStyle.fill;
  43079. labelStyle.fill = true;
  43080. labelStyle.fillColor = '#FFFFFF';
  43081. labelStyle.stroke = false;
  43082. labelStyle.strokeColor = '#8B7B8B';
  43083. label.style = labelStyle;
  43084. label.themeField = labelStyle.labelField;
  43085. var labelFeatures = this._convertLabelFeatures(label, features, layerInfo, featureType);
  43086. label.addFeatures(labelFeatures);
  43087. return label;
  43088. }
  43089. }, {
  43090. key: "_createHeatLayer",
  43091. value: function _createHeatLayer(layerInfo, features) {
  43092. var themeSetting = layerInfo.themeSetting,
  43093. layerID = layerInfo.layerID;
  43094. var colors = themeSetting.colors,
  43095. radius = themeSetting.radius,
  43096. customSettings = themeSetting.customSettings,
  43097. weight = themeSetting.weight;
  43098. var heatColors = colors.slice();
  43099. for (var i in customSettings) {
  43100. heatColors[i] = customSettings[i];
  43101. }
  43102. var heatMapLayer = _leafletWrapper.default.supermap.heatMapLayer(layerID, {
  43103. colors: heatColors,
  43104. map: this.map,
  43105. radius: radius * 2,
  43106. featureWeight: weight,
  43107. blur: radius * 1.5
  43108. });
  43109. heatMapLayer.addFeatures({
  43110. type: 'FeatureCollection',
  43111. features: features
  43112. });
  43113. return heatMapLayer;
  43114. }
  43115. }, {
  43116. key: "_createSymbolLayer",
  43117. value: function _createSymbolLayer(layerInfo, features, textSize) {
  43118. var style = layerInfo.style;
  43119. var unicode = style.unicode;
  43120. var pointToLayer;
  43121. if (unicode) {
  43122. pointToLayer = this._getSymbolPointLayer(style, textSize);
  43123. }
  43124. return pointToLayer && this._createGeojsonLayer(features, null, pointToLayer);
  43125. }
  43126. }, {
  43127. key: "_createGraphicLayer",
  43128. value: function _createGraphicLayer(layerInfo, features, textSize) {
  43129. var _this7 = this;
  43130. return new Promise(function (resolve, reject) {
  43131. var style = layerInfo.style;
  43132. var type = style.type,
  43133. imageInfo = style.imageInfo,
  43134. radius = style.radius,
  43135. url = style.url;
  43136. var pointToLayer;
  43137. if (type === 'IMAGE_POINT' && imageInfo.url) {
  43138. var resolution = imageInfo.size.w / imageInfo.size.h;
  43139. pointToLayer = function pointToLayer(geojson, latlng) {
  43140. var iconSize = textSize && textSize[geojson.id - 1 || geojson.properties.index] * 2;
  43141. return _leafletWrapper.default.marker(latlng, {
  43142. icon: _leafletWrapper.default.icon({
  43143. iconUrl: imageInfo.url,
  43144. iconSize: textSize ? [iconSize, iconSize / resolution] : [radius * 2, radius * 2 / resolution]
  43145. })
  43146. });
  43147. };
  43148. } else if (type === 'SVG_POINT') {
  43149. if (!_this7._svgDiv) {
  43150. _this7._svgDiv = document.createElement('div');
  43151. document.body.appendChild(_this7._svgDiv);
  43152. }
  43153. _this7.getCanvasFromSVG(url, _this7._svgDiv, function (canvas) {
  43154. resolve(_this7._getSvgLayer(canvas, style, features, textSize));
  43155. });
  43156. } else {
  43157. pointToLayer = function pointToLayer(geojson, latlng) {
  43158. return _leafletWrapper.default.circleMarker(latlng, _this7._getVectorLayerStyle(style));
  43159. };
  43160. }
  43161. pointToLayer && resolve(_this7._createGeojsonLayer(features, null, pointToLayer));
  43162. });
  43163. }
  43164. }, {
  43165. key: "_createVectorLayer",
  43166. value: function _createVectorLayer(layerInfo, features) {
  43167. var style = layerInfo.style;
  43168. return this._createGeojsonLayer(features, this._getVectorLayerStyle(style));
  43169. }
  43170. }, {
  43171. key: "_createMigrationLayer",
  43172. value: function _createMigrationLayer(layerInfo, features) {
  43173. var options = this.getEchartsLayerOptions(layerInfo, features, 'leaflet');
  43174. var layer = _leafletWrapper.default.supermap.echartsLayer(options);
  43175. this.echartslayer.push(layer);
  43176. return layer;
  43177. }
  43178. }, {
  43179. key: "_createDataflowLayer",
  43180. value: function _createDataflowLayer(layerInfo) {
  43181. var _this8 = this;
  43182. this._dataflowFeatureCache = {};
  43183. return new Promise(function (resolve, reject) {
  43184. _this8._getDataflowPointLayer(layerInfo).then(function (pointToLayer) {
  43185. var dataFlowLayer = _leafletWrapper.default.supermap.dataFlowLayer(layerInfo.wsUrl, {
  43186. pointToLayer: pointToLayer
  43187. });
  43188. _this8._updateDataFlowFeaturesCallback = _this8._updateDataFlowFeature.bind(_this8, layerInfo);
  43189. dataFlowLayer.on('dataupdated', _this8._updateDataFlowFeaturesCallback);
  43190. _this8._dataFlowLayer = dataFlowLayer;
  43191. resolve(dataFlowLayer);
  43192. });
  43193. });
  43194. }
  43195. }, {
  43196. key: "_createGeojsonLayer",
  43197. value: function _createGeojsonLayer(features, style, pointToLayer) {
  43198. return _leafletWrapper.default.geoJSON({
  43199. type: 'FeatureCollection',
  43200. features: features
  43201. }, {
  43202. pointToLayer: pointToLayer,
  43203. style: style
  43204. });
  43205. }
  43206. }, {
  43207. key: "_getVectorLayerStyle",
  43208. value: function _getVectorLayerStyle(style) {
  43209. var fillColor = style.fillColor,
  43210. fillOpacity = style.fillOpacity,
  43211. strokeColor = style.strokeColor,
  43212. strokeOpacity = style.strokeOpacity,
  43213. strokeWidth = style.strokeWidth,
  43214. radius = style.radius,
  43215. lineDash = style.lineDash;
  43216. var commonStyle = {
  43217. color: strokeColor,
  43218. weight: strokeWidth,
  43219. opacity: strokeOpacity,
  43220. fillColor: fillColor,
  43221. fillOpacity: fillOpacity
  43222. };
  43223. var dashArray;
  43224. if (lineDash) {
  43225. dashArray = this.getDashStyle(lineDash, strokeWidth, 'string');
  43226. }
  43227. radius && (commonStyle['radius'] = radius);
  43228. lineDash && (commonStyle['dashArray'] = dashArray);
  43229. return commonStyle;
  43230. }
  43231. }, {
  43232. key: "_getMapCenter",
  43233. value: function _getMapCenter(mapInfo) {
  43234. var center;
  43235. center = mapInfo.center && [mapInfo.center.x, mapInfo.center.y];
  43236. if (!center) {
  43237. center = [0, 0];
  43238. }
  43239. center = this.baseProjection === 'EPSG:3857' ? this.crs.unproject(_leafletWrapper.default.point(center[0], center[1])) : _leafletWrapper.default.latLng(center[1], center[0]);
  43240. return center;
  43241. }
  43242. }, {
  43243. key: "_sendMapToUser",
  43244. value: function _sendMapToUser(count, layersLen) {
  43245. if (count === layersLen) {
  43246. this.triggerEvent('addlayerssucceeded', {
  43247. map: this.map,
  43248. mapparams: this.mapParams,
  43249. layers: this._layers
  43250. });
  43251. }
  43252. }
  43253. }, {
  43254. key: "_addLayerToMap",
  43255. value: function _addLayerToMap(_ref) {
  43256. var layer = _ref.layer,
  43257. _ref$type = _ref.type,
  43258. type = _ref$type === void 0 ? 'overlays' : _ref$type,
  43259. layerInfo = _ref.layerInfo,
  43260. _ref$sendToMap = _ref.sendToMap,
  43261. sendToMap = _ref$sendToMap === void 0 ? true : _ref$sendToMap;
  43262. var visible = layerInfo.visible,
  43263. layerID = layerInfo.layerID,
  43264. name = layerInfo.name,
  43265. index = layerInfo.index;
  43266. sendToMap && (type = 'overlays');
  43267. type === 'overlays' && layer.setZIndex && layer.setZIndex(index + 1);
  43268. if (visible === undefined || visible) {
  43269. this.map.addLayer(layer, layerInfo.name);
  43270. }
  43271. !this.layers[type] && (this.layers[type] = {});
  43272. this.layers[type][layerID || name] = layer;
  43273. this._addLayerSucceeded(sendToMap);
  43274. }
  43275. }, {
  43276. key: "_convertLabelFeatures",
  43277. value: function _convertLabelFeatures(layer, features, layerInfo, featureType) {
  43278. var _this9 = this;
  43279. if (!features) {
  43280. return [];
  43281. }
  43282. var themeField = layer.themeField,
  43283. style = layer.style;
  43284. var labelFeatures = [];
  43285. var layerStyle = layerInfo.style || {};
  43286. features.forEach(function (feature) {
  43287. var coordinate = _this9._getLabelLngLat(featureType, feature);
  43288. _this9._setLabelOffset(featureType, layerStyle, style);
  43289. var properties = feature.properties;
  43290. var geoTextFeature = new _leafletWrapper.default.supermap.themeFeature([coordinate[1], coordinate[0], properties[themeField]], properties);
  43291. labelFeatures.push(geoTextFeature);
  43292. });
  43293. return labelFeatures;
  43294. }
  43295. }, {
  43296. key: "_getLabelLngLat",
  43297. value: function _getLabelLngLat(featureType, feature) {
  43298. var coordinate;
  43299. var coordinates = feature.geometry.coordinates;
  43300. if (featureType === 'POINT') {
  43301. coordinate = coordinates;
  43302. } else if (featureType === 'LINE') {
  43303. var length = coordinates.length;
  43304. coordinate = coordinates[Math.round(length / 2)];
  43305. } else {
  43306. coordinate = (0, _center.default)(feature).geometry.coordinates;
  43307. }
  43308. return coordinate;
  43309. }
  43310. }, {
  43311. key: "_setLabelOffset",
  43312. value: function _setLabelOffset(featureType, layerStyle, style) {
  43313. if (featureType === 'POINT') {
  43314. var pointRadius = layerStyle.pointRadius || 0;
  43315. var strokeWidth = layerStyle.strokeWidth || 0;
  43316. var fontSize = parseInt(layerStyle.fontSize) || 0;
  43317. style.labelXOffset = 0;
  43318. style.labelYOffset = layerStyle.unicode ? 20 + fontSize : 25 + (pointRadius + strokeWidth);
  43319. } else {
  43320. return;
  43321. }
  43322. }
  43323. }, {
  43324. key: "_addLayerSucceeded",
  43325. value: function _addLayerSucceeded() {
  43326. var sendMap = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
  43327. if (sendMap) {
  43328. this.layerAdded++;
  43329. this._sendMapToUser(this.layerAdded, this.expectLayerLen);
  43330. }
  43331. }
  43332. }, {
  43333. key: "_unproject",
  43334. value: function _unproject(coordinate) {
  43335. var crs = this._unprojectCrs || _leafletWrapper.default.CRS.EPSG3857;
  43336. return this._latlngToCoordinate(crs.unproject(_leafletWrapper.default.point(coordinate[0], coordinate[1])));
  43337. }
  43338. }, {
  43339. key: "_latlngToCoordinate",
  43340. value: function _latlngToCoordinate(latlng) {
  43341. if (!latlng) {
  43342. return null;
  43343. }
  43344. return [latlng.lng, latlng.lat];
  43345. }
  43346. }, {
  43347. key: "_getSvgLayer",
  43348. value: function _getSvgLayer(canvas, style, features, textSize) {
  43349. var svgPointToLayer = this._getSvgPointLayer(canvas, style, textSize);
  43350. return this._createGeojsonLayer(features, null, svgPointToLayer);
  43351. }
  43352. }, {
  43353. key: "_createThemeLayer",
  43354. value: function _createThemeLayer(type, layerInfo, features) {
  43355. var filterCondition = layerInfo.filterCondition,
  43356. style = layerInfo.style,
  43357. themeSetting = layerInfo.themeSetting,
  43358. featureType = layerInfo.featureType,
  43359. layerID = layerInfo.layerID;
  43360. var layerStyle = JSON.parse(JSON.stringify(style));
  43361. featureType === 'POINT' && (layerStyle.pointRadius = style.radius);
  43362. delete layerStyle.radius;
  43363. if (featureType === 'LINE') {
  43364. layerStyle.fill = false;
  43365. layerStyle.strokeDashstyle = style.lineDash;
  43366. delete layerStyle.lineDash;
  43367. }
  43368. var styleGroup;
  43369. if (type === 'unique') {
  43370. styleGroup = this.getUniqueStyleGroup(layerInfo, features);
  43371. } else if (type === 'range') {
  43372. styleGroup = this.getRangeStyleGroup(layerInfo, features);
  43373. }
  43374. filterCondition && (features = this.getFilterFeatures(filterCondition, features));
  43375. var themeField = themeSetting.themeField;
  43376. Object.keys(features[0].properties).forEach(function (key) {
  43377. key.toLocaleUpperCase() === themeField.toLocaleUpperCase() && (themeField = key);
  43378. });
  43379. var layer = _leafletWrapper.default.supermap["".concat(type, "ThemeLayer")](layerID);
  43380. layerStyle.stroke = true;
  43381. layer.style = layerStyle;
  43382. layer.themeField = themeField;
  43383. layer.styleGroups = styleGroup;
  43384. layer.addFeatures({
  43385. type: 'FeatureCollection',
  43386. features: features
  43387. });
  43388. return layer;
  43389. }
  43390. }, {
  43391. key: "_handleMapCrs",
  43392. value: function _handleMapCrs(mapInfo) {
  43393. var projection = mapInfo.projection,
  43394. baseLayer = mapInfo.baseLayer,
  43395. extent = mapInfo.extent;
  43396. this.baseProjection = projection;
  43397. if (projection === 'EPSG:910111' || projection === 'EPSG:910112') {
  43398. this.baseProjection = 'EPSG:3857';
  43399. } else if (projection === 'EPSG:910101' || projection === 'EPSG:910102') {
  43400. this.baseProjection = 'EPSG:4326';
  43401. }
  43402. if (baseLayer.layerType === 'BAIDU') {
  43403. this.crs = _leafletWrapper.default.CRS.Baidu;
  43404. return this.crs;
  43405. }
  43406. if (baseLayer.layerType.indexOf('TIANDITU') > -1) {
  43407. this.crs = this.baseProjection === 'EPSG:3857' ? _leafletWrapper.default.CRS.TianDiTu_Mercator : _leafletWrapper.default.CRS.TianDiTu_WGS84;
  43408. return this.crs;
  43409. }
  43410. var epsgCode = this.baseProjection.split(':')[1];
  43411. var bounds = _leafletWrapper.default.bounds([extent.leftBottom.x, extent.leftBottom.y], [extent.rightTop.x, extent.rightTop.y]);
  43412. if (['4326', '3857', '3395'].includes(epsgCode)) {
  43413. this.crs = _leafletWrapper.default.Proj.CRS("EPSG:".concat(epsgCode), {
  43414. bounds: bounds
  43415. });
  43416. } else if (parseFloat(epsgCode) < 0) {
  43417. this.crs = new _leafletWrapper.default.CRS.NonEarthCRS({
  43418. bounds: bounds
  43419. });
  43420. } else if (!epsgCode) {
  43421. this.baseProjection = (0, _epsgDefine.toEpsgCode)(this.baseProjection);
  43422. if (this.baseProjection) {
  43423. this.crs = _leafletWrapper.default.Proj.CRS(this.baseProjection, {
  43424. bounds: bounds,
  43425. def: mapInfo.projection
  43426. });
  43427. }
  43428. }
  43429. return this.crs;
  43430. }
  43431. }, {
  43432. key: "_updateDataFlowFeature",
  43433. value: function _updateDataFlowFeature(layerInfo, e) {
  43434. if (layerInfo.visible) {
  43435. var feature = e.data;
  43436. var lineStyle = layerInfo.lineStyle,
  43437. labelStyle = layerInfo.labelStyle;
  43438. lineStyle && this._updateDataflowPathLayer(feature, layerInfo);
  43439. labelStyle && labelStyle.labelField !== '未设置' && this._updateDataflowLabelLayer(feature, layerInfo);
  43440. }
  43441. }
  43442. }, {
  43443. key: "_getSymbolPointLayer",
  43444. value: function _getSymbolPointLayer(style, textSize) {
  43445. var symbolStyle = JSON.parse(JSON.stringify(style));
  43446. symbolStyle.fontColor = style.fillColor;
  43447. symbolStyle.label = style.unicode;
  43448. symbolStyle.fontFamily = 'supermapol-icons';
  43449. var pointToLayer = function pointToLayer(geojson, latlng) {
  43450. textSize && (symbolStyle.fontSize = textSize[geojson.id - 1 || geojson.properties.index] + 'px');
  43451. return new _leafletWrapper.default.supermap.unicodeMarker(latlng, symbolStyle);
  43452. };
  43453. return pointToLayer;
  43454. }
  43455. }, {
  43456. key: "_getSvgPointLayer",
  43457. value: function _getSvgPointLayer(canvas, style, textSize) {
  43458. var radius = style.radius;
  43459. this.handleSvgColor(style, canvas);
  43460. var imgUrl = canvas.toDataURL('img/png');
  43461. var resolution = canvas.width / canvas.height;
  43462. var svgPointToLayer = function svgPointToLayer(geojson, latlng) {
  43463. var iconSize = textSize && textSize[geojson.id - 1 || geojson.properties.index];
  43464. return _leafletWrapper.default.marker(latlng, {
  43465. icon: _leafletWrapper.default.icon({
  43466. iconUrl: imgUrl,
  43467. iconSize: textSize ? [iconSize, iconSize / resolution] : [radius, radius / resolution]
  43468. })
  43469. });
  43470. };
  43471. return svgPointToLayer;
  43472. }
  43473. }, {
  43474. key: "_getDataflowPointLayer",
  43475. value: function _getDataflowPointLayer(layerInfo) {
  43476. var _this10 = this;
  43477. var layerType = layerInfo.layerType,
  43478. pointStyle = layerInfo.pointStyle,
  43479. layerID = layerInfo.layerID,
  43480. themeSetting = layerInfo.themeSetting;
  43481. return new Promise(function (resolve, reject) {
  43482. if (layerType === 'DATAFLOW_HEAT') {
  43483. var colors = themeSetting.colors,
  43484. radius = themeSetting.radius,
  43485. customSettings = themeSetting.customSettings,
  43486. weight = themeSetting.weight;
  43487. var heatLayerInfo = {
  43488. layerID: layerID,
  43489. themeSetting: {
  43490. colors: colors,
  43491. radius: radius,
  43492. customSettings: customSettings,
  43493. weight: weight
  43494. }
  43495. };
  43496. var pointToLayer = function pointToLayer(geojson, latlng) {
  43497. return _this10._createHeatLayer(heatLayerInfo, [geojson]);
  43498. };
  43499. resolve(pointToLayer);
  43500. } else if ('SYMBOL_POINT' === pointStyle.type) {
  43501. resolve(_this10._getSymbolPointLayer(pointStyle, null));
  43502. } else if ('SVG_POINT' === pointStyle.type) {
  43503. if (!_this10._svgDiv) {
  43504. _this10._svgDiv = document.createElement('div');
  43505. document.body.appendChild(_this10._svgDiv);
  43506. }
  43507. _this10.getCanvasFromSVG(pointStyle.url, _this10._svgDiv, function (canvas) {
  43508. resolve(_this10._getSvgPointLayer(canvas, pointStyle, null));
  43509. });
  43510. } else {
  43511. var _pointToLayer = function _pointToLayer(geojson, latlng) {
  43512. return _leafletWrapper.default.circleMarker(latlng, _this10._getVectorLayerStyle(pointStyle));
  43513. };
  43514. resolve(_pointToLayer);
  43515. }
  43516. });
  43517. }
  43518. }, {
  43519. key: "_handleDataflowFeature",
  43520. value: function _handleDataflowFeature(feature, layerInfo) {
  43521. var identifyField = layerInfo.identifyField,
  43522. maxPointCount = layerInfo.maxPointCount,
  43523. lineStyle = layerInfo.lineStyle;
  43524. var geoID = feature.properties[identifyField];
  43525. if (lineStyle) {
  43526. if (this._dataflowLineFeatureCache[geoID]) {
  43527. var coordinates = this._dataflowLineFeatureCache[geoID].geometry.coordinates;
  43528. coordinates.push(feature.geometry.coordinates);
  43529. if (maxPointCount && coordinates.length > maxPointCount) {
  43530. coordinates.splice(0, coordinates.length - maxPointCount);
  43531. }
  43532. this._dataflowLineFeatureCache[geoID].geometry.coordinates = coordinates;
  43533. } else {
  43534. this._dataflowLineFeatureCache[geoID] = {
  43535. type: 'Feature',
  43536. properties: feature.properties,
  43537. geometry: {
  43538. type: 'LineString',
  43539. coordinates: [feature.geometry.coordinates]
  43540. }
  43541. };
  43542. }
  43543. }
  43544. this._dataflowFeatureCache[geoID] = feature;
  43545. }
  43546. }, {
  43547. key: "_updateDataflowLabelLayer",
  43548. value: function _updateDataflowLabelLayer(feature, layerInfo) {
  43549. this._handleDataflowFeature(feature, layerInfo);
  43550. var geoID = feature.properties[layerInfo.identifyField];
  43551. var layer;
  43552. if (this._dataflowLabelIdCache[geoID]) {
  43553. layer = this._dataFlowLayer.getLayer(this._dataflowLabelIdCache[geoID]);
  43554. var _feature = this._dataflowFeatureCache[geoID];
  43555. var geoTextFeature = new _leafletWrapper.default.supermap.themeFeature([_feature.geometry.coordinates[1], _feature.geometry.coordinates[0], geoID], _feature.properties);
  43556. layer.removeAllFeatures();
  43557. layer.addFeatures([geoTextFeature]);
  43558. } else {
  43559. var _feature2 = this._dataflowFeatureCache[geoID];
  43560. layer = this._addLabelLayer(layerInfo, [_feature2]);
  43561. this._dataFlowLayer.addLayer(layer);
  43562. this._dataflowLabelIdCache[geoID] = this._dataFlowLayer.getLayerId(layer);
  43563. }
  43564. }
  43565. }, {
  43566. key: "_updateDataflowPathLayer",
  43567. value: function _updateDataflowPathLayer(feature, layerInfo) {
  43568. this._handleDataflowFeature(feature, layerInfo);
  43569. var geoID = feature.properties[layerInfo.identifyField];
  43570. var layer;
  43571. var coordinates = this._dataflowLineFeatureCache[geoID].geometry.coordinates;
  43572. var latlngs = _leafletWrapper.default.GeoJSON.coordsToLatLngs(coordinates, 0);
  43573. if (this._dataflowPathIdCache[geoID]) {
  43574. layer = this._dataFlowLayer.getLayer(this._dataflowPathIdCache[geoID]);
  43575. layer.setLatLngs(latlngs);
  43576. } else {
  43577. layer = _leafletWrapper.default.polyline(latlngs, Object.assign({}, this._getVectorLayerStyle(layerInfo.lineStyle)));
  43578. this._dataFlowLayer.addLayer(layer);
  43579. this._dataflowPathIdCache[geoID] = this._dataFlowLayer.getLayerId(layer);
  43580. }
  43581. }
  43582. }, {
  43583. key: "getTransformCoodinatesCRS",
  43584. value: function getTransformCoodinatesCRS(epsgCode) {
  43585. var defName = "EPSG:".concat(epsgCode);
  43586. var defValue = (0, _epsgDefine.getProjection)(defName);
  43587. return _leafletWrapper.default.Proj.CRS((0, _epsgDefine.toEpsgCode)(defValue), {
  43588. def: defValue
  43589. });
  43590. }
  43591. }, {
  43592. key: "cleanWebMap",
  43593. value: function cleanWebMap() {
  43594. if (this.map) {
  43595. this.map.remove();
  43596. this.center = null;
  43597. this.zoom = null;
  43598. this._dataFlowLayer.off('dataupdated', this._updateDataFlowFeaturesCallback);
  43599. this._unprojectCrs = null;
  43600. }
  43601. }
  43602. }]);
  43603. return WebMapViewModel;
  43604. }(_WebMapBase2.default);
  43605. exports.default = WebMapViewModel;
  43606. /***/ }),
  43607. /***/ "fc3a":
  43608. /***/ (function(module, exports, __webpack_require__) {
  43609. /*jslint node:true */
  43610. var xml2js = __webpack_require__("98c2");
  43611. var xml2json = __webpack_require__("2f96");
  43612. var js2xml = __webpack_require__("c365");
  43613. var json2xml = __webpack_require__("5e45");
  43614. module.exports = {
  43615. xml2js: xml2js,
  43616. xml2json: xml2json,
  43617. js2xml: js2xml,
  43618. json2xml: json2xml
  43619. };
  43620. /***/ }),
  43621. /***/ "fd74":
  43622. /***/ (function(module, exports) {
  43623. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII="
  43624. /***/ }),
  43625. /***/ "fe04":
  43626. /***/ (function(module, exports) {
  43627. if (typeof Object.create === 'function') {
  43628. // implementation from standard node.js 'util' module
  43629. module.exports = function inherits(ctor, superCtor) {
  43630. if (superCtor) {
  43631. ctor.super_ = superCtor
  43632. ctor.prototype = Object.create(superCtor.prototype, {
  43633. constructor: {
  43634. value: ctor,
  43635. enumerable: false,
  43636. writable: true,
  43637. configurable: true
  43638. }
  43639. })
  43640. }
  43641. };
  43642. } else {
  43643. // old school shim for old browsers
  43644. module.exports = function inherits(ctor, superCtor) {
  43645. if (superCtor) {
  43646. ctor.super_ = superCtor
  43647. var TempCtor = function () {}
  43648. TempCtor.prototype = superCtor.prototype
  43649. ctor.prototype = new TempCtor()
  43650. ctor.prototype.constructor = ctor
  43651. }
  43652. }
  43653. }
  43654. /***/ }),
  43655. /***/ "fe5a":
  43656. /***/ (function(module, exports, __webpack_require__) {
  43657. "use strict";
  43658. Object.defineProperty(exports, "__esModule", {
  43659. value: true
  43660. });
  43661. exports.Event = void 0;
  43662. var _Util = __webpack_require__("1a9e");
  43663. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  43664. * This program are made available under the terms of the Apache License, Version 2.0
  43665. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html. */
  43666. var Event = {
  43667. /**
  43668. * @description A hash table cache of the event observers. Keyed by element._eventCacheID
  43669. * @type {boolean}
  43670. * @default false
  43671. */
  43672. observers: false,
  43673. /**
  43674. * @description KEY_SPACE
  43675. * @type {number}
  43676. * @default 32
  43677. */
  43678. KEY_SPACE: 32,
  43679. /**
  43680. * @description KEY_BACKSPACE
  43681. * @type {number}
  43682. * @default 8
  43683. */
  43684. KEY_BACKSPACE: 8,
  43685. /**
  43686. * @description KEY_TAB
  43687. * @type {number}
  43688. * @default 9
  43689. */
  43690. KEY_TAB: 9,
  43691. /**
  43692. * @description KEY_RETURN
  43693. * @type {number}
  43694. * @default 13
  43695. */
  43696. KEY_RETURN: 13,
  43697. /**
  43698. * @description KEY_ESC
  43699. * @type {number}
  43700. * @default 27
  43701. */
  43702. KEY_ESC: 27,
  43703. /**
  43704. * @description KEY_LEFT
  43705. * @type {number}
  43706. * @default 37
  43707. */
  43708. KEY_LEFT: 37,
  43709. /**
  43710. * @description KEY_UP
  43711. * @type {number}
  43712. * @default 38
  43713. */
  43714. KEY_UP: 38,
  43715. /**
  43716. * @description KEY_RIGHT
  43717. * @type {number}
  43718. * @default 39
  43719. */
  43720. KEY_RIGHT: 39,
  43721. /**
  43722. * @description KEY_DOWN
  43723. * @type {number}
  43724. * @default 40
  43725. */
  43726. KEY_DOWN: 40,
  43727. /**
  43728. * @description KEY_DELETE
  43729. * @type {number}
  43730. * @default 46
  43731. */
  43732. KEY_DELETE: 46,
  43733. /**
  43734. * @description Cross browser event element detection.
  43735. * @param {Event} event - The event
  43736. * @returns {HTMLElement} The element that caused the event
  43737. */
  43738. element: function element(event) {
  43739. return event.target || event.srcElement;
  43740. },
  43741. /**
  43742. * @description Determine whether event was caused by a single touch
  43743. * @param {Event} event - The event
  43744. * @returns {boolean}
  43745. */
  43746. isSingleTouch: function isSingleTouch(event) {
  43747. return event.touches && event.touches.length === 1;
  43748. },
  43749. /**
  43750. * @description Determine whether event was caused by a multi touch
  43751. * @param {Event} event - The event
  43752. * @returns {boolean}
  43753. */
  43754. isMultiTouch: function isMultiTouch(event) {
  43755. return event.touches && event.touches.length > 1;
  43756. },
  43757. /**
  43758. * @description Determine whether event was caused by a left click.
  43759. * @param {Event} event - The event
  43760. * @returns {boolean}
  43761. */
  43762. isLeftClick: function isLeftClick(event) {
  43763. return event.which && event.which === 1 || event.button && event.button === 1;
  43764. },
  43765. /**
  43766. * @description Determine whether event was caused by a right mouse click.
  43767. * @param {Event} event - The event
  43768. * @returns {boolean}
  43769. */
  43770. isRightClick: function isRightClick(event) {
  43771. return event.which && event.which === 3 || event.button && event.button === 2;
  43772. },
  43773. /**
  43774. * @description Stops an event from propagating.
  43775. * @param {boolean} allowDefault - If true, we stop the event chain but still allow the default browser behaviour (text selection, radio-button clicking, etc) Default false
  43776. */
  43777. stop: function stop(event, allowDefault) {
  43778. if (!allowDefault) {
  43779. if (event.preventDefault) {
  43780. event.preventDefault();
  43781. } else {
  43782. event.returnValue = false;
  43783. }
  43784. }
  43785. if (event.stopPropagation) {
  43786. event.stopPropagation();
  43787. } else {
  43788. event.cancelBubble = true;
  43789. }
  43790. },
  43791. /**
  43792. * @param {string} tagName - html 标签名。
  43793. * @returns {HTMLElement} The first node with the given tagName, starting from the node the event was triggered on and traversing the DOM upwards
  43794. */
  43795. findElement: function findElement(event, tagName) {
  43796. var element = Event.element(event);
  43797. while (element.parentNode && (!element.tagName || element.tagName.toUpperCase() !== tagName.toUpperCase())) {
  43798. element = element.parentNode;
  43799. }
  43800. return element;
  43801. },
  43802. /**
  43803. * @description 监听事件,注册事件处理方法。
  43804. * @param {(HTMLElement|string)} elementParam - 待监听的 DOM 对象或者其 ID 标识。
  43805. * @param {string} name - 监听事件的类别名称。
  43806. * @param {function} observer - 注册的事件处理方法。
  43807. * @param {boolean} [useCapture=false] - 是否捕获。
  43808. */
  43809. observe: function observe(elementParam, name, observer, useCapture) {
  43810. var element = _Util.Util.getElement(elementParam);
  43811. useCapture = useCapture || false;
  43812. if (name === 'keypress' && (navigator.appVersion.match(/Konqueror|Safari|KHTML/) || element.attachEvent)) {
  43813. name = 'keydown';
  43814. }
  43815. if (!this.observers) {
  43816. this.observers = {};
  43817. }
  43818. if (!element._eventCacheID) {
  43819. var idPrefix = 'eventCacheID_';
  43820. if (element.id) {
  43821. idPrefix = element.id + '_' + idPrefix;
  43822. }
  43823. element._eventCacheID = _Util.Util.createUniqueID(idPrefix);
  43824. }
  43825. var cacheID = element._eventCacheID;
  43826. if (!this.observers[cacheID]) {
  43827. this.observers[cacheID] = [];
  43828. }
  43829. this.observers[cacheID].push({
  43830. element: element,
  43831. name: name,
  43832. observer: observer,
  43833. useCapture: useCapture
  43834. });
  43835. if (element.addEventListener) {
  43836. if (name === 'mousewheel') {
  43837. // https://www.chromestatus.com/features/6662647093133312
  43838. element.addEventListener(name, observer, {
  43839. useCapture: useCapture,
  43840. passive: false
  43841. });
  43842. } else {
  43843. element.addEventListener(name, observer, useCapture);
  43844. }
  43845. } else if (element.attachEvent) {
  43846. element.attachEvent('on' + name, observer);
  43847. }
  43848. },
  43849. /**
  43850. * @description Given the id of an element to stop observing, cycle through the
  43851. * element's cached observers, calling stopObserving on each one,
  43852. * skipping those entries which can no longer be removed.
  43853. *
  43854. * @param {(HTMLElement|string)} elementParam -
  43855. */
  43856. stopObservingElement: function stopObservingElement(elementParam) {
  43857. var element = _Util.Util.getElement(elementParam);
  43858. var cacheID = element._eventCacheID;
  43859. this._removeElementObservers(Event.observers[cacheID]);
  43860. },
  43861. /**
  43862. * @param {Array.<Object>} elementObservers - Array of (element, name,
  43863. * observer, usecapture) objects,
  43864. * taken directly from hashtable
  43865. */
  43866. _removeElementObservers: function _removeElementObservers(elementObservers) {
  43867. if (elementObservers) {
  43868. for (var i = elementObservers.length - 1; i >= 0; i--) {
  43869. var entry = elementObservers[i];
  43870. var args = [entry.element, entry.name, entry.observer, entry.useCapture];
  43871. Event.stopObserving.apply(this, args);
  43872. }
  43873. }
  43874. },
  43875. /**
  43876. * @description 移除事件监听和注册的事件处理方法。注意:事件的移除和监听相对应,移除时的各属性信息必须监听时
  43877. * 保持一致才能确保事件移除成功。
  43878. * @param {(HTMLElement|string)} elementParam - 被监听的 DOM 元素或者其 ID。
  43879. * @param {string} name - 需要移除的被监听事件名称。
  43880. * @param {function} observer - 需要移除的事件处理方法。
  43881. * @param {boolean} [useCapture=false] - 是否捕获。
  43882. * @returns {boolean} Whether or not the event observer was removed
  43883. */
  43884. stopObserving: function stopObserving(elementParam, name, observer, useCapture) {
  43885. useCapture = useCapture || false;
  43886. var element = _Util.Util.getElement(elementParam);
  43887. var cacheID = element._eventCacheID;
  43888. if (name === 'keypress') {
  43889. if (navigator.appVersion.match(/Konqueror|Safari|KHTML/) || element.detachEvent) {
  43890. name = 'keydown';
  43891. }
  43892. } // find element's entry in this.observers cache and remove it
  43893. var foundEntry = false;
  43894. var elementObservers = Event.observers[cacheID];
  43895. if (elementObservers) {
  43896. // find the specific event type in the element's list
  43897. var i = 0;
  43898. while (!foundEntry && i < elementObservers.length) {
  43899. var cacheEntry = elementObservers[i];
  43900. if (cacheEntry.name === name && cacheEntry.observer === observer && cacheEntry.useCapture === useCapture) {
  43901. elementObservers.splice(i, 1);
  43902. if (elementObservers.length === 0) {
  43903. delete Event.observers[cacheID];
  43904. }
  43905. foundEntry = true;
  43906. break;
  43907. }
  43908. i++;
  43909. }
  43910. } // actually remove the event listener from browser
  43911. if (foundEntry) {
  43912. if (element.removeEventListener) {
  43913. element.removeEventListener(name, observer, useCapture);
  43914. } else if (element && element.detachEvent) {
  43915. element.detachEvent('on' + name, observer);
  43916. }
  43917. }
  43918. return foundEntry;
  43919. },
  43920. /**
  43921. * @description Cycle through all the element entries in the events cache and call
  43922. * stopObservingElement on each.
  43923. */
  43924. unloadCache: function unloadCache() {
  43925. // created
  43926. if (Event && Event.observers) {
  43927. for (var cacheID in Event.observers) {
  43928. var elementObservers = Event.observers[cacheID];
  43929. Event._removeElementObservers.apply(this, [elementObservers]);
  43930. }
  43931. Event.observers = false;
  43932. }
  43933. },
  43934. CLASS_NAME: 'Event'
  43935. };
  43936. /* prevent memory leaks in IE */
  43937. exports.Event = Event;
  43938. Event.observe(window, 'unload', Event.unloadCache, false);
  43939. /***/ }),
  43940. /***/ "ff4e":
  43941. /***/ (function(module, exports, __webpack_require__) {
  43942. "use strict";
  43943. var _interopRequireDefault = __webpack_require__("8e6d");
  43944. Object.defineProperty(exports, "__esModule", {
  43945. value: true
  43946. });
  43947. exports.default = void 0;
  43948. var _classCallCheck2 = _interopRequireDefault(__webpack_require__("19e1"));
  43949. var _lang = __webpack_require__("4e21");
  43950. var RestDataParameter = function RestDataParameter(options) {
  43951. (0, _classCallCheck2.default)(this, RestDataParameter);
  43952. this.type = 'iServer';
  43953. this.url = options.url;
  43954. this.dataName = options.dataName;
  43955. this.attributeFilter = options.attributeFilter || null;
  43956. this.maxFeatures = options.maxFeatures || 20;
  43957. this.name = options.name || (0, _lang.geti18n)().t('commontypes.restData');
  43958. this.proxy = options.proxy;
  43959. };
  43960. exports.default = RestDataParameter;
  43961. /***/ })
  43962. /******/ })["default"];
  43963. });