vendor.js 310 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 1:
  3. /*!************************************************************!*\
  4. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  5. \************************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. Object.defineProperty(exports, "__esModule", { value: true });exports.createApp = createApp;exports.createComponent = createComponent;exports.createPage = createPage;exports.default = void 0;var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}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;}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) {_defineProperty(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;}function _slicedToArray(arr, i) {return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(arr, i) {if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"] != null) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}function _arrayWithHoles(arr) {if (Array.isArray(arr)) return arr;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toConsumableArray(arr) {return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();}function _nonIterableSpread() {throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o, minLen) {if (!o) return;if (typeof o === "string") return _arrayLikeToArray(o, minLen);var n = Object.prototype.toString.call(o).slice(8, -1);if (n === "Object" && o.constructor) n = o.constructor.name;if (n === "Map" || n === "Set") return Array.from(o);if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);}function _iterableToArray(iter) {if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);}function _arrayWithoutHoles(arr) {if (Array.isArray(arr)) return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr, len) {if (len == null || len > arr.length) len = arr.length;for (var i = 0, arr2 = new Array(len); i < len; i++) {arr2[i] = arr[i];}return arr2;}
  10. var _toString = Object.prototype.toString;
  11. var hasOwnProperty = Object.prototype.hasOwnProperty;
  12. function isFn(fn) {
  13. return typeof fn === 'function';
  14. }
  15. function isStr(str) {
  16. return typeof str === 'string';
  17. }
  18. function isPlainObject(obj) {
  19. return _toString.call(obj) === '[object Object]';
  20. }
  21. function hasOwn(obj, key) {
  22. return hasOwnProperty.call(obj, key);
  23. }
  24. function noop() {}
  25. /**
  26. * Create a cached version of a pure function.
  27. */
  28. function cached(fn) {
  29. var cache = Object.create(null);
  30. return function cachedFn(str) {
  31. var hit = cache[str];
  32. return hit || (cache[str] = fn(str));
  33. };
  34. }
  35. /**
  36. * Camelize a hyphen-delimited string.
  37. */
  38. var camelizeRE = /-(\w)/g;
  39. var camelize = cached(function (str) {
  40. return str.replace(camelizeRE, function (_, c) {return c ? c.toUpperCase() : '';});
  41. });
  42. var HOOKS = [
  43. 'invoke',
  44. 'success',
  45. 'fail',
  46. 'complete',
  47. 'returnValue'];
  48. var globalInterceptors = {};
  49. var scopedInterceptors = {};
  50. function mergeHook(parentVal, childVal) {
  51. var res = childVal ?
  52. parentVal ?
  53. parentVal.concat(childVal) :
  54. Array.isArray(childVal) ?
  55. childVal : [childVal] :
  56. parentVal;
  57. return res ?
  58. dedupeHooks(res) :
  59. res;
  60. }
  61. function dedupeHooks(hooks) {
  62. var res = [];
  63. for (var i = 0; i < hooks.length; i++) {
  64. if (res.indexOf(hooks[i]) === -1) {
  65. res.push(hooks[i]);
  66. }
  67. }
  68. return res;
  69. }
  70. function removeHook(hooks, hook) {
  71. var index = hooks.indexOf(hook);
  72. if (index !== -1) {
  73. hooks.splice(index, 1);
  74. }
  75. }
  76. function mergeInterceptorHook(interceptor, option) {
  77. Object.keys(option).forEach(function (hook) {
  78. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  79. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  80. }
  81. });
  82. }
  83. function removeInterceptorHook(interceptor, option) {
  84. if (!interceptor || !option) {
  85. return;
  86. }
  87. Object.keys(option).forEach(function (hook) {
  88. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  89. removeHook(interceptor[hook], option[hook]);
  90. }
  91. });
  92. }
  93. function addInterceptor(method, option) {
  94. if (typeof method === 'string' && isPlainObject(option)) {
  95. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  96. } else if (isPlainObject(method)) {
  97. mergeInterceptorHook(globalInterceptors, method);
  98. }
  99. }
  100. function removeInterceptor(method, option) {
  101. if (typeof method === 'string') {
  102. if (isPlainObject(option)) {
  103. removeInterceptorHook(scopedInterceptors[method], option);
  104. } else {
  105. delete scopedInterceptors[method];
  106. }
  107. } else if (isPlainObject(method)) {
  108. removeInterceptorHook(globalInterceptors, method);
  109. }
  110. }
  111. function wrapperHook(hook) {
  112. return function (data) {
  113. return hook(data) || data;
  114. };
  115. }
  116. function isPromise(obj) {
  117. return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  118. }
  119. function queue(hooks, data) {
  120. var promise = false;
  121. for (var i = 0; i < hooks.length; i++) {
  122. var hook = hooks[i];
  123. if (promise) {
  124. promise = Promise.resolve(wrapperHook(hook));
  125. } else {
  126. var res = hook(data);
  127. if (isPromise(res)) {
  128. promise = Promise.resolve(res);
  129. }
  130. if (res === false) {
  131. return {
  132. then: function then() {} };
  133. }
  134. }
  135. }
  136. return promise || {
  137. then: function then(callback) {
  138. return callback(data);
  139. } };
  140. }
  141. function wrapperOptions(interceptor) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  142. ['success', 'fail', 'complete'].forEach(function (name) {
  143. if (Array.isArray(interceptor[name])) {
  144. var oldCallback = options[name];
  145. options[name] = function callbackInterceptor(res) {
  146. queue(interceptor[name], res).then(function (res) {
  147. /* eslint-disable no-mixed-operators */
  148. return isFn(oldCallback) && oldCallback(res) || res;
  149. });
  150. };
  151. }
  152. });
  153. return options;
  154. }
  155. function wrapperReturnValue(method, returnValue) {
  156. var returnValueHooks = [];
  157. if (Array.isArray(globalInterceptors.returnValue)) {
  158. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(globalInterceptors.returnValue));
  159. }
  160. var interceptor = scopedInterceptors[method];
  161. if (interceptor && Array.isArray(interceptor.returnValue)) {
  162. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(interceptor.returnValue));
  163. }
  164. returnValueHooks.forEach(function (hook) {
  165. returnValue = hook(returnValue) || returnValue;
  166. });
  167. return returnValue;
  168. }
  169. function getApiInterceptorHooks(method) {
  170. var interceptor = Object.create(null);
  171. Object.keys(globalInterceptors).forEach(function (hook) {
  172. if (hook !== 'returnValue') {
  173. interceptor[hook] = globalInterceptors[hook].slice();
  174. }
  175. });
  176. var scopedInterceptor = scopedInterceptors[method];
  177. if (scopedInterceptor) {
  178. Object.keys(scopedInterceptor).forEach(function (hook) {
  179. if (hook !== 'returnValue') {
  180. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  181. }
  182. });
  183. }
  184. return interceptor;
  185. }
  186. function invokeApi(method, api, options) {for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {params[_key - 3] = arguments[_key];}
  187. var interceptor = getApiInterceptorHooks(method);
  188. if (interceptor && Object.keys(interceptor).length) {
  189. if (Array.isArray(interceptor.invoke)) {
  190. var res = queue(interceptor.invoke, options);
  191. return res.then(function (options) {
  192. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  193. });
  194. } else {
  195. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  196. }
  197. }
  198. return api.apply(void 0, [options].concat(params));
  199. }
  200. var promiseInterceptor = {
  201. returnValue: function returnValue(res) {
  202. if (!isPromise(res)) {
  203. return res;
  204. }
  205. return res.then(function (res) {
  206. return res[1];
  207. }).catch(function (res) {
  208. return res[0];
  209. });
  210. } };
  211. var SYNC_API_RE =
  212. /^\$|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/;
  213. var CONTEXT_API_RE = /^create|Manager$/;
  214. // Context例外情况
  215. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  216. // 同步例外情况
  217. var ASYNC_API = ['createBLEConnection'];
  218. var CALLBACK_API_RE = /^on|^off/;
  219. function isContextApi(name) {
  220. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  221. }
  222. function isSyncApi(name) {
  223. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  224. }
  225. function isCallbackApi(name) {
  226. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  227. }
  228. function handlePromise(promise) {
  229. return promise.then(function (data) {
  230. return [null, data];
  231. }).
  232. catch(function (err) {return [err];});
  233. }
  234. function shouldPromise(name) {
  235. if (
  236. isContextApi(name) ||
  237. isSyncApi(name) ||
  238. isCallbackApi(name))
  239. {
  240. return false;
  241. }
  242. return true;
  243. }
  244. /* eslint-disable no-extend-native */
  245. if (!Promise.prototype.finally) {
  246. Promise.prototype.finally = function (callback) {
  247. var promise = this.constructor;
  248. return this.then(
  249. function (value) {return promise.resolve(callback()).then(function () {return value;});},
  250. function (reason) {return promise.resolve(callback()).then(function () {
  251. throw reason;
  252. });});
  253. };
  254. }
  255. function promisify(name, api) {
  256. if (!shouldPromise(name)) {
  257. return api;
  258. }
  259. return function promiseApi() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {params[_key2 - 1] = arguments[_key2];}
  260. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  261. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  262. }
  263. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  264. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  265. success: resolve,
  266. fail: reject })].concat(
  267. params));
  268. })));
  269. };
  270. }
  271. var EPS = 1e-4;
  272. var BASE_DEVICE_WIDTH = 750;
  273. var isIOS = false;
  274. var deviceWidth = 0;
  275. var deviceDPR = 0;
  276. function checkDeviceWidth() {var _wx$getSystemInfoSync =
  277. wx.getSystemInfoSync(),platform = _wx$getSystemInfoSync.platform,pixelRatio = _wx$getSystemInfoSync.pixelRatio,windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  278. deviceWidth = windowWidth;
  279. deviceDPR = pixelRatio;
  280. isIOS = platform === 'ios';
  281. }
  282. function upx2px(number, newDeviceWidth) {
  283. if (deviceWidth === 0) {
  284. checkDeviceWidth();
  285. }
  286. number = Number(number);
  287. if (number === 0) {
  288. return 0;
  289. }
  290. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  291. if (result < 0) {
  292. result = -result;
  293. }
  294. result = Math.floor(result + EPS);
  295. if (result === 0) {
  296. if (deviceDPR === 1 || !isIOS) {
  297. result = 1;
  298. } else {
  299. result = 0.5;
  300. }
  301. }
  302. return number < 0 ? -result : result;
  303. }
  304. var interceptors = {
  305. promiseInterceptor: promiseInterceptor };
  306. var baseApi = /*#__PURE__*/Object.freeze({
  307. __proto__: null,
  308. upx2px: upx2px,
  309. addInterceptor: addInterceptor,
  310. removeInterceptor: removeInterceptor,
  311. interceptors: interceptors });
  312. function findExistsPageIndex(url) {
  313. var pages = getCurrentPages();
  314. var len = pages.length;
  315. while (len--) {
  316. var page = pages[len];
  317. if (page.$page && page.$page.fullPath === url) {
  318. return len;
  319. }
  320. }
  321. return -1;
  322. }
  323. var redirectTo = {
  324. name: function name(fromArgs) {
  325. if (fromArgs.exists === 'back' && fromArgs.delta) {
  326. return 'navigateBack';
  327. }
  328. return 'redirectTo';
  329. },
  330. args: function args(fromArgs) {
  331. if (fromArgs.exists === 'back' && fromArgs.url) {
  332. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  333. if (existsPageIndex !== -1) {
  334. var delta = getCurrentPages().length - 1 - existsPageIndex;
  335. if (delta > 0) {
  336. fromArgs.delta = delta;
  337. }
  338. }
  339. }
  340. } };
  341. var previewImage = {
  342. args: function args(fromArgs) {
  343. var currentIndex = parseInt(fromArgs.current);
  344. if (isNaN(currentIndex)) {
  345. return;
  346. }
  347. var urls = fromArgs.urls;
  348. if (!Array.isArray(urls)) {
  349. return;
  350. }
  351. var len = urls.length;
  352. if (!len) {
  353. return;
  354. }
  355. if (currentIndex < 0) {
  356. currentIndex = 0;
  357. } else if (currentIndex >= len) {
  358. currentIndex = len - 1;
  359. }
  360. if (currentIndex > 0) {
  361. fromArgs.current = urls[currentIndex];
  362. fromArgs.urls = urls.filter(
  363. function (item, index) {return index < currentIndex ? item !== urls[currentIndex] : true;});
  364. } else {
  365. fromArgs.current = urls[0];
  366. }
  367. return {
  368. indicator: false,
  369. loop: false };
  370. } };
  371. // import navigateTo from 'uni-helpers/navigate-to'
  372. function addSafeAreaInsets(result) {
  373. if (result.safeArea) {
  374. var safeArea = result.safeArea;
  375. result.safeAreaInsets = {
  376. top: safeArea.top,
  377. left: safeArea.left,
  378. right: result.windowWidth - safeArea.right,
  379. bottom: result.windowHeight - safeArea.bottom };
  380. }
  381. }
  382. var protocols = {
  383. redirectTo: redirectTo,
  384. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  385. previewImage: previewImage,
  386. getSystemInfo: {
  387. returnValue: addSafeAreaInsets },
  388. getSystemInfoSync: {
  389. returnValue: addSafeAreaInsets } };
  390. var todos = [
  391. 'vibrate',
  392. 'preloadPage',
  393. 'unPreloadPage',
  394. 'loadSubPackage'];
  395. var canIUses = [];
  396. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  397. function processCallback(methodName, method, returnValue) {
  398. return function (res) {
  399. return method(processReturnValue(methodName, res, returnValue));
  400. };
  401. }
  402. function processArgs(methodName, fromArgs) {var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  403. if (isPlainObject(fromArgs)) {// 一般 api 的参数解析
  404. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  405. if (isFn(argsOption)) {
  406. argsOption = argsOption(fromArgs, toArgs) || {};
  407. }
  408. for (var key in fromArgs) {
  409. if (hasOwn(argsOption, key)) {
  410. var keyOption = argsOption[key];
  411. if (isFn(keyOption)) {
  412. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  413. }
  414. if (!keyOption) {// 不支持的参数
  415. console.warn("\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F ".concat(methodName, "\u6682\u4E0D\u652F\u6301").concat(key));
  416. } else if (isStr(keyOption)) {// 重写参数 key
  417. toArgs[keyOption] = fromArgs[key];
  418. } else if (isPlainObject(keyOption)) {// {name:newName,value:value}可重新指定参数 key:value
  419. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  420. }
  421. } else if (CALLBACKS.indexOf(key) !== -1) {
  422. if (isFn(fromArgs[key])) {
  423. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  424. }
  425. } else {
  426. if (!keepFromArgs) {
  427. toArgs[key] = fromArgs[key];
  428. }
  429. }
  430. }
  431. return toArgs;
  432. } else if (isFn(fromArgs)) {
  433. fromArgs = processCallback(methodName, fromArgs, returnValue);
  434. }
  435. return fromArgs;
  436. }
  437. function processReturnValue(methodName, res, returnValue) {var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  438. if (isFn(protocols.returnValue)) {// 处理通用 returnValue
  439. res = protocols.returnValue(methodName, res);
  440. }
  441. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  442. }
  443. function wrapper(methodName, method) {
  444. if (hasOwn(protocols, methodName)) {
  445. var protocol = protocols[methodName];
  446. if (!protocol) {// 暂不支持的 api
  447. return function () {
  448. console.error("\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F \u6682\u4E0D\u652F\u6301".concat(methodName));
  449. };
  450. }
  451. return function (arg1, arg2) {// 目前 api 最多两个参数
  452. var options = protocol;
  453. if (isFn(protocol)) {
  454. options = protocol(arg1);
  455. }
  456. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  457. var args = [arg1];
  458. if (typeof arg2 !== 'undefined') {
  459. args.push(arg2);
  460. }
  461. if (isFn(options.name)) {
  462. methodName = options.name(arg1);
  463. } else if (isStr(options.name)) {
  464. methodName = options.name;
  465. }
  466. var returnValue = wx[methodName].apply(wx, args);
  467. if (isSyncApi(methodName)) {// 同步 api
  468. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  469. }
  470. return returnValue;
  471. };
  472. }
  473. return method;
  474. }
  475. var todoApis = Object.create(null);
  476. var TODOS = [
  477. 'onTabBarMidButtonTap',
  478. 'subscribePush',
  479. 'unsubscribePush',
  480. 'onPush',
  481. 'offPush',
  482. 'share'];
  483. function createTodoApi(name) {
  484. return function todoApi(_ref)
  485. {var fail = _ref.fail,complete = _ref.complete;
  486. var res = {
  487. errMsg: "".concat(name, ":fail:\u6682\u4E0D\u652F\u6301 ").concat(name, " \u65B9\u6CD5") };
  488. isFn(fail) && fail(res);
  489. isFn(complete) && complete(res);
  490. };
  491. }
  492. TODOS.forEach(function (name) {
  493. todoApis[name] = createTodoApi(name);
  494. });
  495. var providers = {
  496. oauth: ['weixin'],
  497. share: ['weixin'],
  498. payment: ['wxpay'],
  499. push: ['weixin'] };
  500. function getProvider(_ref2)
  501. {var service = _ref2.service,success = _ref2.success,fail = _ref2.fail,complete = _ref2.complete;
  502. var res = false;
  503. if (providers[service]) {
  504. res = {
  505. errMsg: 'getProvider:ok',
  506. service: service,
  507. provider: providers[service] };
  508. isFn(success) && success(res);
  509. } else {
  510. res = {
  511. errMsg: 'getProvider:fail:服务[' + service + ']不存在' };
  512. isFn(fail) && fail(res);
  513. }
  514. isFn(complete) && complete(res);
  515. }
  516. var extraApi = /*#__PURE__*/Object.freeze({
  517. __proto__: null,
  518. getProvider: getProvider });
  519. var getEmitter = function () {
  520. var Emitter;
  521. return function getUniEmitter() {
  522. if (!Emitter) {
  523. Emitter = new _vue.default();
  524. }
  525. return Emitter;
  526. };
  527. }();
  528. function apply(ctx, method, args) {
  529. return ctx[method].apply(ctx, args);
  530. }
  531. function $on() {
  532. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  533. }
  534. function $off() {
  535. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  536. }
  537. function $once() {
  538. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  539. }
  540. function $emit() {
  541. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  542. }
  543. var eventApi = /*#__PURE__*/Object.freeze({
  544. __proto__: null,
  545. $on: $on,
  546. $off: $off,
  547. $once: $once,
  548. $emit: $emit });
  549. var api = /*#__PURE__*/Object.freeze({
  550. __proto__: null });
  551. var MPPage = Page;
  552. var MPComponent = Component;
  553. var customizeRE = /:/g;
  554. var customize = cached(function (str) {
  555. return camelize(str.replace(customizeRE, '-'));
  556. });
  557. function initTriggerEvent(mpInstance) {
  558. {
  559. if (!wx.canIUse('nextTick')) {
  560. return;
  561. }
  562. }
  563. var oldTriggerEvent = mpInstance.triggerEvent;
  564. mpInstance.triggerEvent = function (event) {for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {args[_key3 - 1] = arguments[_key3];}
  565. return oldTriggerEvent.apply(mpInstance, [customize(event)].concat(args));
  566. };
  567. }
  568. function initHook(name, options) {
  569. var oldHook = options[name];
  570. if (!oldHook) {
  571. options[name] = function () {
  572. initTriggerEvent(this);
  573. };
  574. } else {
  575. options[name] = function () {
  576. initTriggerEvent(this);for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {args[_key4] = arguments[_key4];}
  577. return oldHook.apply(this, args);
  578. };
  579. }
  580. }
  581. Page = function Page() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  582. initHook('onLoad', options);
  583. return MPPage(options);
  584. };
  585. Component = function Component() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  586. initHook('created', options);
  587. return MPComponent(options);
  588. };
  589. var PAGE_EVENT_HOOKS = [
  590. 'onPullDownRefresh',
  591. 'onReachBottom',
  592. 'onAddToFavorites',
  593. 'onShareTimeline',
  594. 'onShareAppMessage',
  595. 'onPageScroll',
  596. 'onResize',
  597. 'onTabItemTap'];
  598. function initMocks(vm, mocks) {
  599. var mpInstance = vm.$mp[vm.mpType];
  600. mocks.forEach(function (mock) {
  601. if (hasOwn(mpInstance, mock)) {
  602. vm[mock] = mpInstance[mock];
  603. }
  604. });
  605. }
  606. function hasHook(hook, vueOptions) {
  607. if (!vueOptions) {
  608. return true;
  609. }
  610. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  611. return true;
  612. }
  613. vueOptions = vueOptions.default || vueOptions;
  614. if (isFn(vueOptions)) {
  615. if (isFn(vueOptions.extendOptions[hook])) {
  616. return true;
  617. }
  618. if (vueOptions.super &&
  619. vueOptions.super.options &&
  620. Array.isArray(vueOptions.super.options[hook])) {
  621. return true;
  622. }
  623. return false;
  624. }
  625. if (isFn(vueOptions[hook])) {
  626. return true;
  627. }
  628. var mixins = vueOptions.mixins;
  629. if (Array.isArray(mixins)) {
  630. return !!mixins.find(function (mixin) {return hasHook(hook, mixin);});
  631. }
  632. }
  633. function initHooks(mpOptions, hooks, vueOptions) {
  634. hooks.forEach(function (hook) {
  635. if (hasHook(hook, vueOptions)) {
  636. mpOptions[hook] = function (args) {
  637. return this.$vm && this.$vm.__call_hook(hook, args);
  638. };
  639. }
  640. });
  641. }
  642. function initVueComponent(Vue, vueOptions) {
  643. vueOptions = vueOptions.default || vueOptions;
  644. var VueComponent;
  645. if (isFn(vueOptions)) {
  646. VueComponent = vueOptions;
  647. } else {
  648. VueComponent = Vue.extend(vueOptions);
  649. }
  650. vueOptions = VueComponent.options;
  651. return [VueComponent, vueOptions];
  652. }
  653. function initSlots(vm, vueSlots) {
  654. if (Array.isArray(vueSlots) && vueSlots.length) {
  655. var $slots = Object.create(null);
  656. vueSlots.forEach(function (slotName) {
  657. $slots[slotName] = true;
  658. });
  659. vm.$scopedSlots = vm.$slots = $slots;
  660. }
  661. }
  662. function initVueIds(vueIds, mpInstance) {
  663. vueIds = (vueIds || '').split(',');
  664. var len = vueIds.length;
  665. if (len === 1) {
  666. mpInstance._$vueId = vueIds[0];
  667. } else if (len === 2) {
  668. mpInstance._$vueId = vueIds[0];
  669. mpInstance._$vuePid = vueIds[1];
  670. }
  671. }
  672. function initData(vueOptions, context) {
  673. var data = vueOptions.data || {};
  674. var methods = vueOptions.methods || {};
  675. if (typeof data === 'function') {
  676. try {
  677. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  678. } catch (e) {
  679. if (Object({"NODE_ENV":"development","VUE_APP_NAME":"bigDataa","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  680. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  681. }
  682. }
  683. } else {
  684. try {
  685. // 对 data 格式化
  686. data = JSON.parse(JSON.stringify(data));
  687. } catch (e) {}
  688. }
  689. if (!isPlainObject(data)) {
  690. data = {};
  691. }
  692. Object.keys(methods).forEach(function (methodName) {
  693. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  694. data[methodName] = methods[methodName];
  695. }
  696. });
  697. return data;
  698. }
  699. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  700. function createObserver(name) {
  701. return function observer(newVal, oldVal) {
  702. if (this.$vm) {
  703. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  704. }
  705. };
  706. }
  707. function initBehaviors(vueOptions, initBehavior) {
  708. var vueBehaviors = vueOptions.behaviors;
  709. var vueExtends = vueOptions.extends;
  710. var vueMixins = vueOptions.mixins;
  711. var vueProps = vueOptions.props;
  712. if (!vueProps) {
  713. vueOptions.props = vueProps = [];
  714. }
  715. var behaviors = [];
  716. if (Array.isArray(vueBehaviors)) {
  717. vueBehaviors.forEach(function (behavior) {
  718. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  719. if (behavior === 'uni://form-field') {
  720. if (Array.isArray(vueProps)) {
  721. vueProps.push('name');
  722. vueProps.push('value');
  723. } else {
  724. vueProps.name = {
  725. type: String,
  726. default: '' };
  727. vueProps.value = {
  728. type: [String, Number, Boolean, Array, Object, Date],
  729. default: '' };
  730. }
  731. }
  732. });
  733. }
  734. if (isPlainObject(vueExtends) && vueExtends.props) {
  735. behaviors.push(
  736. initBehavior({
  737. properties: initProperties(vueExtends.props, true) }));
  738. }
  739. if (Array.isArray(vueMixins)) {
  740. vueMixins.forEach(function (vueMixin) {
  741. if (isPlainObject(vueMixin) && vueMixin.props) {
  742. behaviors.push(
  743. initBehavior({
  744. properties: initProperties(vueMixin.props, true) }));
  745. }
  746. });
  747. }
  748. return behaviors;
  749. }
  750. function parsePropType(key, type, defaultValue, file) {
  751. // [String]=>String
  752. if (Array.isArray(type) && type.length === 1) {
  753. return type[0];
  754. }
  755. return type;
  756. }
  757. function initProperties(props) {var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  758. var properties = {};
  759. if (!isBehavior) {
  760. properties.vueId = {
  761. type: String,
  762. value: '' };
  763. // 用于字节跳动小程序模拟抽象节点
  764. properties.generic = {
  765. type: Object,
  766. value: null };
  767. properties.vueSlots = { // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  768. type: null,
  769. value: [],
  770. observer: function observer(newVal, oldVal) {
  771. var $slots = Object.create(null);
  772. newVal.forEach(function (slotName) {
  773. $slots[slotName] = true;
  774. });
  775. this.setData({
  776. $slots: $slots });
  777. } };
  778. }
  779. if (Array.isArray(props)) {// ['title']
  780. props.forEach(function (key) {
  781. properties[key] = {
  782. type: null,
  783. observer: createObserver(key) };
  784. });
  785. } else if (isPlainObject(props)) {// {title:{type:String,default:''},content:String}
  786. Object.keys(props).forEach(function (key) {
  787. var opts = props[key];
  788. if (isPlainObject(opts)) {// title:{type:String,default:''}
  789. var value = opts.default;
  790. if (isFn(value)) {
  791. value = value();
  792. }
  793. opts.type = parsePropType(key, opts.type);
  794. properties[key] = {
  795. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  796. value: value,
  797. observer: createObserver(key) };
  798. } else {// content:String
  799. var type = parsePropType(key, opts);
  800. properties[key] = {
  801. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  802. observer: createObserver(key) };
  803. }
  804. });
  805. }
  806. return properties;
  807. }
  808. function wrapper$1(event) {
  809. // TODO 又得兼容 mpvue 的 mp 对象
  810. try {
  811. event.mp = JSON.parse(JSON.stringify(event));
  812. } catch (e) {}
  813. event.stopPropagation = noop;
  814. event.preventDefault = noop;
  815. event.target = event.target || {};
  816. if (!hasOwn(event, 'detail')) {
  817. event.detail = {};
  818. }
  819. if (hasOwn(event, 'markerId')) {
  820. event.detail = typeof event.detail === 'object' ? event.detail : {};
  821. event.detail.markerId = event.markerId;
  822. }
  823. if (isPlainObject(event.detail)) {
  824. event.target = Object.assign({}, event.target, event.detail);
  825. }
  826. return event;
  827. }
  828. function getExtraValue(vm, dataPathsArray) {
  829. var context = vm;
  830. dataPathsArray.forEach(function (dataPathArray) {
  831. var dataPath = dataPathArray[0];
  832. var value = dataPathArray[2];
  833. if (dataPath || typeof value !== 'undefined') {// ['','',index,'disable']
  834. var propPath = dataPathArray[1];
  835. var valuePath = dataPathArray[3];
  836. var vFor;
  837. if (Number.isInteger(dataPath)) {
  838. vFor = dataPath;
  839. } else if (!dataPath) {
  840. vFor = context;
  841. } else if (typeof dataPath === 'string' && dataPath) {
  842. if (dataPath.indexOf('#s#') === 0) {
  843. vFor = dataPath.substr(3);
  844. } else {
  845. vFor = vm.__get_value(dataPath, context);
  846. }
  847. }
  848. if (Number.isInteger(vFor)) {
  849. context = value;
  850. } else if (!propPath) {
  851. context = vFor[value];
  852. } else {
  853. if (Array.isArray(vFor)) {
  854. context = vFor.find(function (vForItem) {
  855. return vm.__get_value(propPath, vForItem) === value;
  856. });
  857. } else if (isPlainObject(vFor)) {
  858. context = Object.keys(vFor).find(function (vForKey) {
  859. return vm.__get_value(propPath, vFor[vForKey]) === value;
  860. });
  861. } else {
  862. console.error('v-for 暂不支持循环数据:', vFor);
  863. }
  864. }
  865. if (valuePath) {
  866. context = vm.__get_value(valuePath, context);
  867. }
  868. }
  869. });
  870. return context;
  871. }
  872. function processEventExtra(vm, extra, event) {
  873. var extraObj = {};
  874. if (Array.isArray(extra) && extra.length) {
  875. /**
  876. *[
  877. * ['data.items', 'data.id', item.data.id],
  878. * ['metas', 'id', meta.id]
  879. *],
  880. *[
  881. * ['data.items', 'data.id', item.data.id],
  882. * ['metas', 'id', meta.id]
  883. *],
  884. *'test'
  885. */
  886. extra.forEach(function (dataPath, index) {
  887. if (typeof dataPath === 'string') {
  888. if (!dataPath) {// model,prop.sync
  889. extraObj['$' + index] = vm;
  890. } else {
  891. if (dataPath === '$event') {// $event
  892. extraObj['$' + index] = event;
  893. } else if (dataPath === 'arguments') {
  894. if (event.detail && event.detail.__args__) {
  895. extraObj['$' + index] = event.detail.__args__;
  896. } else {
  897. extraObj['$' + index] = [event];
  898. }
  899. } else if (dataPath.indexOf('$event.') === 0) {// $event.target.value
  900. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  901. } else {
  902. extraObj['$' + index] = vm.__get_value(dataPath);
  903. }
  904. }
  905. } else {
  906. extraObj['$' + index] = getExtraValue(vm, dataPath);
  907. }
  908. });
  909. }
  910. return extraObj;
  911. }
  912. function getObjByArray(arr) {
  913. var obj = {};
  914. for (var i = 1; i < arr.length; i++) {
  915. var element = arr[i];
  916. obj[element[0]] = element[1];
  917. }
  918. return obj;
  919. }
  920. function processEventArgs(vm, event) {var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];var isCustom = arguments.length > 4 ? arguments[4] : undefined;var methodName = arguments.length > 5 ? arguments[5] : undefined;
  921. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  922. if (isCustom) {// 自定义事件
  923. isCustomMPEvent = event.currentTarget &&
  924. event.currentTarget.dataset &&
  925. event.currentTarget.dataset.comType === 'wx';
  926. if (!args.length) {// 无参数,直接传入 event 或 detail 数组
  927. if (isCustomMPEvent) {
  928. return [event];
  929. }
  930. return event.detail.__args__ || event.detail;
  931. }
  932. }
  933. var extraObj = processEventExtra(vm, extra, event);
  934. var ret = [];
  935. args.forEach(function (arg) {
  936. if (arg === '$event') {
  937. if (methodName === '__set_model' && !isCustom) {// input v-model value
  938. ret.push(event.target.value);
  939. } else {
  940. if (isCustom && !isCustomMPEvent) {
  941. ret.push(event.detail.__args__[0]);
  942. } else {// wxcomponent 组件或内置组件
  943. ret.push(event);
  944. }
  945. }
  946. } else {
  947. if (Array.isArray(arg) && arg[0] === 'o') {
  948. ret.push(getObjByArray(arg));
  949. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  950. ret.push(extraObj[arg]);
  951. } else {
  952. ret.push(arg);
  953. }
  954. }
  955. });
  956. return ret;
  957. }
  958. var ONCE = '~';
  959. var CUSTOM = '^';
  960. function isMatchEventType(eventType, optType) {
  961. return eventType === optType ||
  962. optType === 'regionchange' && (
  963. eventType === 'begin' ||
  964. eventType === 'end');
  965. }
  966. function getContextVm(vm) {
  967. var $parent = vm.$parent;
  968. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  969. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  970. $parent = $parent.$parent;
  971. }
  972. return $parent && $parent.$parent;
  973. }
  974. function handleEvent(event) {var _this = this;
  975. event = wrapper$1(event);
  976. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  977. var dataset = (event.currentTarget || event.target).dataset;
  978. if (!dataset) {
  979. return console.warn('事件信息不存在');
  980. }
  981. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  982. if (!eventOpts) {
  983. return console.warn('事件信息不存在');
  984. }
  985. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  986. var eventType = event.type;
  987. var ret = [];
  988. eventOpts.forEach(function (eventOpt) {
  989. var type = eventOpt[0];
  990. var eventsArray = eventOpt[1];
  991. var isCustom = type.charAt(0) === CUSTOM;
  992. type = isCustom ? type.slice(1) : type;
  993. var isOnce = type.charAt(0) === ONCE;
  994. type = isOnce ? type.slice(1) : type;
  995. if (eventsArray && isMatchEventType(eventType, type)) {
  996. eventsArray.forEach(function (eventArray) {
  997. var methodName = eventArray[0];
  998. if (methodName) {
  999. var handlerCtx = _this.$vm;
  1000. if (handlerCtx.$options.generic) {// mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  1001. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  1002. }
  1003. if (methodName === '$emit') {
  1004. handlerCtx.$emit.apply(handlerCtx,
  1005. processEventArgs(
  1006. _this.$vm,
  1007. event,
  1008. eventArray[1],
  1009. eventArray[2],
  1010. isCustom,
  1011. methodName));
  1012. return;
  1013. }
  1014. var handler = handlerCtx[methodName];
  1015. if (!isFn(handler)) {
  1016. throw new Error(" _vm.".concat(methodName, " is not a function"));
  1017. }
  1018. if (isOnce) {
  1019. if (handler.once) {
  1020. return;
  1021. }
  1022. handler.once = true;
  1023. }
  1024. var params = processEventArgs(
  1025. _this.$vm,
  1026. event,
  1027. eventArray[1],
  1028. eventArray[2],
  1029. isCustom,
  1030. methodName);
  1031. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  1032. // eslint-disable-next-line no-sparse-arrays
  1033. ret.push(handler.apply(handlerCtx, (Array.isArray(params) ? params : []).concat([,,,,,,,,,, event])));
  1034. }
  1035. });
  1036. }
  1037. });
  1038. if (
  1039. eventType === 'input' &&
  1040. ret.length === 1 &&
  1041. typeof ret[0] !== 'undefined')
  1042. {
  1043. return ret[0];
  1044. }
  1045. }
  1046. var hooks = [
  1047. 'onShow',
  1048. 'onHide',
  1049. 'onError',
  1050. 'onPageNotFound',
  1051. 'onThemeChange',
  1052. 'onUnhandledRejection'];
  1053. function parseBaseApp(vm, _ref3)
  1054. {var mocks = _ref3.mocks,initRefs = _ref3.initRefs;
  1055. if (vm.$options.store) {
  1056. _vue.default.prototype.$store = vm.$options.store;
  1057. }
  1058. _vue.default.prototype.mpHost = "mp-weixin";
  1059. _vue.default.mixin({
  1060. beforeCreate: function beforeCreate() {
  1061. if (!this.$options.mpType) {
  1062. return;
  1063. }
  1064. this.mpType = this.$options.mpType;
  1065. this.$mp = _defineProperty({
  1066. data: {} },
  1067. this.mpType, this.$options.mpInstance);
  1068. this.$scope = this.$options.mpInstance;
  1069. delete this.$options.mpType;
  1070. delete this.$options.mpInstance;
  1071. if (this.mpType !== 'app') {
  1072. initRefs(this);
  1073. initMocks(this, mocks);
  1074. }
  1075. } });
  1076. var appOptions = {
  1077. onLaunch: function onLaunch(args) {
  1078. if (this.$vm) {// 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  1079. return;
  1080. }
  1081. {
  1082. if (!wx.canIUse('nextTick')) {// 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  1083. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  1084. }
  1085. }
  1086. this.$vm = vm;
  1087. this.$vm.$mp = {
  1088. app: this };
  1089. this.$vm.$scope = this;
  1090. // vm 上也挂载 globalData
  1091. this.$vm.globalData = this.globalData;
  1092. this.$vm._isMounted = true;
  1093. this.$vm.__call_hook('mounted', args);
  1094. this.$vm.__call_hook('onLaunch', args);
  1095. } };
  1096. // 兼容旧版本 globalData
  1097. appOptions.globalData = vm.$options.globalData || {};
  1098. // 将 methods 中的方法挂在 getApp() 中
  1099. var methods = vm.$options.methods;
  1100. if (methods) {
  1101. Object.keys(methods).forEach(function (name) {
  1102. appOptions[name] = methods[name];
  1103. });
  1104. }
  1105. initHooks(appOptions, hooks);
  1106. return appOptions;
  1107. }
  1108. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1109. function findVmByVueId(vm, vuePid) {
  1110. var $children = vm.$children;
  1111. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1112. for (var i = $children.length - 1; i >= 0; i--) {
  1113. var childVm = $children[i];
  1114. if (childVm.$scope._$vueId === vuePid) {
  1115. return childVm;
  1116. }
  1117. }
  1118. // 反向递归查找
  1119. var parentVm;
  1120. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1121. parentVm = findVmByVueId($children[_i], vuePid);
  1122. if (parentVm) {
  1123. return parentVm;
  1124. }
  1125. }
  1126. }
  1127. function initBehavior(options) {
  1128. return Behavior(options);
  1129. }
  1130. function isPage() {
  1131. return !!this.route;
  1132. }
  1133. function initRelation(detail) {
  1134. this.triggerEvent('__l', detail);
  1135. }
  1136. function selectAllComponents(mpInstance, selector, $refs) {
  1137. var components = mpInstance.selectAllComponents(selector);
  1138. components.forEach(function (component) {
  1139. var ref = component.dataset.ref;
  1140. $refs[ref] = component.$vm || component;
  1141. {
  1142. if (component.dataset.vueGeneric === 'scoped') {
  1143. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  1144. selectAllComponents(scopedComponent, selector, $refs);
  1145. });
  1146. }
  1147. }
  1148. });
  1149. }
  1150. function initRefs(vm) {
  1151. var mpInstance = vm.$scope;
  1152. Object.defineProperty(vm, '$refs', {
  1153. get: function get() {
  1154. var $refs = {};
  1155. selectAllComponents(mpInstance, '.vue-ref', $refs);
  1156. // TODO 暂不考虑 for 中的 scoped
  1157. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for');
  1158. forComponents.forEach(function (component) {
  1159. var ref = component.dataset.ref;
  1160. if (!$refs[ref]) {
  1161. $refs[ref] = [];
  1162. }
  1163. $refs[ref].push(component.$vm || component);
  1164. });
  1165. return $refs;
  1166. } });
  1167. }
  1168. function handleLink(event) {var _ref4 =
  1169. event.detail || event.value,vuePid = _ref4.vuePid,vueOptions = _ref4.vueOptions; // detail 是微信,value 是百度(dipatch)
  1170. var parentVm;
  1171. if (vuePid) {
  1172. parentVm = findVmByVueId(this.$vm, vuePid);
  1173. }
  1174. if (!parentVm) {
  1175. parentVm = this.$vm;
  1176. }
  1177. vueOptions.parent = parentVm;
  1178. }
  1179. function parseApp(vm) {
  1180. return parseBaseApp(vm, {
  1181. mocks: mocks,
  1182. initRefs: initRefs });
  1183. }
  1184. var eventChannels = {};
  1185. var eventChannelStack = [];
  1186. function getEventChannel(id) {
  1187. if (id) {
  1188. var eventChannel = eventChannels[id];
  1189. delete eventChannels[id];
  1190. return eventChannel;
  1191. }
  1192. return eventChannelStack.shift();
  1193. }
  1194. function createApp(vm) {
  1195. _vue.default.prototype.getOpenerEventChannel = function () {
  1196. // 微信小程序使用自身getOpenerEventChannel
  1197. {
  1198. return this.$scope.getOpenerEventChannel();
  1199. }
  1200. };
  1201. var callHook = _vue.default.prototype.__call_hook;
  1202. _vue.default.prototype.__call_hook = function (hook, args) {
  1203. if (hook === 'onLoad' && args && args.__id__) {
  1204. this.__eventChannel__ = getEventChannel(args.__id__);
  1205. delete args.__id__;
  1206. }
  1207. return callHook.call(this, hook, args);
  1208. };
  1209. App(parseApp(vm));
  1210. return vm;
  1211. }
  1212. var encodeReserveRE = /[!'()*]/g;
  1213. var encodeReserveReplacer = function encodeReserveReplacer(c) {return '%' + c.charCodeAt(0).toString(16);};
  1214. var commaRE = /%2C/g;
  1215. // fixed encodeURIComponent which is more conformant to RFC3986:
  1216. // - escapes [!'()*]
  1217. // - preserve commas
  1218. var encode = function encode(str) {return encodeURIComponent(str).
  1219. replace(encodeReserveRE, encodeReserveReplacer).
  1220. replace(commaRE, ',');};
  1221. function stringifyQuery(obj) {var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  1222. var res = obj ? Object.keys(obj).map(function (key) {
  1223. var val = obj[key];
  1224. if (val === undefined) {
  1225. return '';
  1226. }
  1227. if (val === null) {
  1228. return encodeStr(key);
  1229. }
  1230. if (Array.isArray(val)) {
  1231. var result = [];
  1232. val.forEach(function (val2) {
  1233. if (val2 === undefined) {
  1234. return;
  1235. }
  1236. if (val2 === null) {
  1237. result.push(encodeStr(key));
  1238. } else {
  1239. result.push(encodeStr(key) + '=' + encodeStr(val2));
  1240. }
  1241. });
  1242. return result.join('&');
  1243. }
  1244. return encodeStr(key) + '=' + encodeStr(val);
  1245. }).filter(function (x) {return x.length > 0;}).join('&') : null;
  1246. return res ? "?".concat(res) : '';
  1247. }
  1248. function parseBaseComponent(vueComponentOptions)
  1249. {var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},isPage = _ref5.isPage,initRelation = _ref5.initRelation;var _initVueComponent =
  1250. initVueComponent(_vue.default, vueComponentOptions),_initVueComponent2 = _slicedToArray(_initVueComponent, 2),VueComponent = _initVueComponent2[0],vueOptions = _initVueComponent2[1];
  1251. var options = _objectSpread({
  1252. multipleSlots: true,
  1253. addGlobalClass: true },
  1254. vueOptions.options || {});
  1255. {
  1256. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  1257. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  1258. Object.assign(options, vueOptions['mp-weixin'].options);
  1259. }
  1260. }
  1261. var componentOptions = {
  1262. options: options,
  1263. data: initData(vueOptions, _vue.default.prototype),
  1264. behaviors: initBehaviors(vueOptions, initBehavior),
  1265. properties: initProperties(vueOptions.props, false, vueOptions.__file),
  1266. lifetimes: {
  1267. attached: function attached() {
  1268. var properties = this.properties;
  1269. var options = {
  1270. mpType: isPage.call(this) ? 'page' : 'component',
  1271. mpInstance: this,
  1272. propsData: properties };
  1273. initVueIds(properties.vueId, this);
  1274. // 处理父子关系
  1275. initRelation.call(this, {
  1276. vuePid: this._$vuePid,
  1277. vueOptions: options });
  1278. // 初始化 vue 实例
  1279. this.$vm = new VueComponent(options);
  1280. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  1281. initSlots(this.$vm, properties.vueSlots);
  1282. // 触发首次 setData
  1283. this.$vm.$mount();
  1284. },
  1285. ready: function ready() {
  1286. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  1287. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  1288. if (this.$vm) {
  1289. this.$vm._isMounted = true;
  1290. this.$vm.__call_hook('mounted');
  1291. this.$vm.__call_hook('onReady');
  1292. }
  1293. },
  1294. detached: function detached() {
  1295. this.$vm && this.$vm.$destroy();
  1296. } },
  1297. pageLifetimes: {
  1298. show: function show(args) {
  1299. this.$vm && this.$vm.__call_hook('onPageShow', args);
  1300. },
  1301. hide: function hide() {
  1302. this.$vm && this.$vm.__call_hook('onPageHide');
  1303. },
  1304. resize: function resize(size) {
  1305. this.$vm && this.$vm.__call_hook('onPageResize', size);
  1306. } },
  1307. methods: {
  1308. __l: handleLink,
  1309. __e: handleEvent } };
  1310. // externalClasses
  1311. if (vueOptions.externalClasses) {
  1312. componentOptions.externalClasses = vueOptions.externalClasses;
  1313. }
  1314. if (Array.isArray(vueOptions.wxsCallMethods)) {
  1315. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  1316. componentOptions.methods[callMethod] = function (args) {
  1317. return this.$vm[callMethod](args);
  1318. };
  1319. });
  1320. }
  1321. if (isPage) {
  1322. return componentOptions;
  1323. }
  1324. return [componentOptions, VueComponent];
  1325. }
  1326. function parseComponent(vueComponentOptions) {
  1327. return parseBaseComponent(vueComponentOptions, {
  1328. isPage: isPage,
  1329. initRelation: initRelation });
  1330. }
  1331. var hooks$1 = [
  1332. 'onShow',
  1333. 'onHide',
  1334. 'onUnload'];
  1335. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  1336. function parseBasePage(vuePageOptions, _ref6)
  1337. {var isPage = _ref6.isPage,initRelation = _ref6.initRelation;
  1338. var pageOptions = parseComponent(vuePageOptions);
  1339. initHooks(pageOptions.methods, hooks$1, vuePageOptions);
  1340. pageOptions.methods.onLoad = function (query) {
  1341. this.options = query;
  1342. var copyQuery = Object.assign({}, query);
  1343. delete copyQuery.__id__;
  1344. this.$page = {
  1345. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery) };
  1346. this.$vm.$mp.query = query; // 兼容 mpvue
  1347. this.$vm.__call_hook('onLoad', query);
  1348. };
  1349. return pageOptions;
  1350. }
  1351. function parsePage(vuePageOptions) {
  1352. return parseBasePage(vuePageOptions, {
  1353. isPage: isPage,
  1354. initRelation: initRelation });
  1355. }
  1356. function createPage(vuePageOptions) {
  1357. {
  1358. return Component(parsePage(vuePageOptions));
  1359. }
  1360. }
  1361. function createComponent(vueOptions) {
  1362. {
  1363. return Component(parseComponent(vueOptions));
  1364. }
  1365. }
  1366. todos.forEach(function (todoApi) {
  1367. protocols[todoApi] = false;
  1368. });
  1369. canIUses.forEach(function (canIUseApi) {
  1370. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name :
  1371. canIUseApi;
  1372. if (!wx.canIUse(apiName)) {
  1373. protocols[canIUseApi] = false;
  1374. }
  1375. });
  1376. var uni = {};
  1377. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  1378. uni = new Proxy({}, {
  1379. get: function get(target, name) {
  1380. if (hasOwn(target, name)) {
  1381. return target[name];
  1382. }
  1383. if (baseApi[name]) {
  1384. return baseApi[name];
  1385. }
  1386. if (api[name]) {
  1387. return promisify(name, api[name]);
  1388. }
  1389. {
  1390. if (extraApi[name]) {
  1391. return promisify(name, extraApi[name]);
  1392. }
  1393. if (todoApis[name]) {
  1394. return promisify(name, todoApis[name]);
  1395. }
  1396. }
  1397. if (eventApi[name]) {
  1398. return eventApi[name];
  1399. }
  1400. if (!hasOwn(wx, name) && !hasOwn(protocols, name)) {
  1401. return;
  1402. }
  1403. return promisify(name, wrapper(name, wx[name]));
  1404. },
  1405. set: function set(target, name, value) {
  1406. target[name] = value;
  1407. return true;
  1408. } });
  1409. } else {
  1410. Object.keys(baseApi).forEach(function (name) {
  1411. uni[name] = baseApi[name];
  1412. });
  1413. {
  1414. Object.keys(todoApis).forEach(function (name) {
  1415. uni[name] = promisify(name, todoApis[name]);
  1416. });
  1417. Object.keys(extraApi).forEach(function (name) {
  1418. uni[name] = promisify(name, todoApis[name]);
  1419. });
  1420. }
  1421. Object.keys(eventApi).forEach(function (name) {
  1422. uni[name] = eventApi[name];
  1423. });
  1424. Object.keys(api).forEach(function (name) {
  1425. uni[name] = promisify(name, api[name]);
  1426. });
  1427. Object.keys(wx).forEach(function (name) {
  1428. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  1429. uni[name] = promisify(name, wrapper(name, wx[name]));
  1430. }
  1431. });
  1432. }
  1433. wx.createApp = createApp;
  1434. wx.createPage = createPage;
  1435. wx.createComponent = createComponent;
  1436. var uni$1 = uni;var _default =
  1437. uni$1;exports.default = _default;
  1438. /***/ }),
  1439. /***/ 10:
  1440. /*!**********************************************************************************************************!*\
  1441. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  1442. \**********************************************************************************************************/
  1443. /*! exports provided: default */
  1444. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1445. "use strict";
  1446. __webpack_require__.r(__webpack_exports__);
  1447. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  1448. /* globals __VUE_SSR_CONTEXT__ */
  1449. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  1450. // This module is a runtime utility for cleaner component module output and will
  1451. // be included in the final webpack user bundle.
  1452. function normalizeComponent (
  1453. scriptExports,
  1454. render,
  1455. staticRenderFns,
  1456. functionalTemplate,
  1457. injectStyles,
  1458. scopeId,
  1459. moduleIdentifier, /* server only */
  1460. shadowMode, /* vue-cli only */
  1461. components, // fixed by xxxxxx auto components
  1462. renderjs // fixed by xxxxxx renderjs
  1463. ) {
  1464. // Vue.extend constructor export interop
  1465. var options = typeof scriptExports === 'function'
  1466. ? scriptExports.options
  1467. : scriptExports
  1468. // fixed by xxxxxx auto components
  1469. if (components) {
  1470. if (!options.components) {
  1471. options.components = {}
  1472. }
  1473. var hasOwn = Object.prototype.hasOwnProperty
  1474. for (var name in components) {
  1475. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  1476. options.components[name] = components[name]
  1477. }
  1478. }
  1479. }
  1480. // fixed by xxxxxx renderjs
  1481. if (renderjs) {
  1482. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  1483. this[renderjs.__module] = this
  1484. });
  1485. (options.mixins || (options.mixins = [])).push(renderjs)
  1486. }
  1487. // render functions
  1488. if (render) {
  1489. options.render = render
  1490. options.staticRenderFns = staticRenderFns
  1491. options._compiled = true
  1492. }
  1493. // functional template
  1494. if (functionalTemplate) {
  1495. options.functional = true
  1496. }
  1497. // scopedId
  1498. if (scopeId) {
  1499. options._scopeId = 'data-v-' + scopeId
  1500. }
  1501. var hook
  1502. if (moduleIdentifier) { // server build
  1503. hook = function (context) {
  1504. // 2.3 injection
  1505. context =
  1506. context || // cached call
  1507. (this.$vnode && this.$vnode.ssrContext) || // stateful
  1508. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  1509. // 2.2 with runInNewContext: true
  1510. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  1511. context = __VUE_SSR_CONTEXT__
  1512. }
  1513. // inject component styles
  1514. if (injectStyles) {
  1515. injectStyles.call(this, context)
  1516. }
  1517. // register component module identifier for async chunk inferrence
  1518. if (context && context._registeredComponents) {
  1519. context._registeredComponents.add(moduleIdentifier)
  1520. }
  1521. }
  1522. // used by ssr in case component is cached and beforeCreate
  1523. // never gets called
  1524. options._ssrRegister = hook
  1525. } else if (injectStyles) {
  1526. hook = shadowMode
  1527. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  1528. : injectStyles
  1529. }
  1530. if (hook) {
  1531. if (options.functional) {
  1532. // for template-only hot-reload because in that case the render fn doesn't
  1533. // go through the normalizer
  1534. options._injectStyles = hook
  1535. // register for functioal component in vue file
  1536. var originalRender = options.render
  1537. options.render = function renderWithStyleInjection (h, context) {
  1538. hook.call(context)
  1539. return originalRender(h, context)
  1540. }
  1541. } else {
  1542. // inject component registration as beforeCreate hook
  1543. var existing = options.beforeCreate
  1544. options.beforeCreate = existing
  1545. ? [].concat(existing, hook)
  1546. : [hook]
  1547. }
  1548. }
  1549. return {
  1550. exports: scriptExports,
  1551. options: options
  1552. }
  1553. }
  1554. /***/ }),
  1555. /***/ 11:
  1556. /*!************************************!*\
  1557. !*** E:/bigData/uview-ui/index.js ***!
  1558. \************************************/
  1559. /*! no static exports found */
  1560. /***/ (function(module, exports, __webpack_require__) {
  1561. "use strict";
  1562. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;
  1563. var _mixin = _interopRequireDefault(__webpack_require__(/*! ./libs/mixin/mixin.js */ 12));
  1564. var _request = _interopRequireDefault(__webpack_require__(/*! ./libs/request */ 13));
  1565. var _queryParams = _interopRequireDefault(__webpack_require__(/*! ./libs/function/queryParams.js */ 17));
  1566. var _route = _interopRequireDefault(__webpack_require__(/*! ./libs/function/route.js */ 18));
  1567. var _timeFormat = _interopRequireDefault(__webpack_require__(/*! ./libs/function/timeFormat.js */ 22));
  1568. var _timeFrom = _interopRequireDefault(__webpack_require__(/*! ./libs/function/timeFrom.js */ 23));
  1569. var _colorGradient = _interopRequireDefault(__webpack_require__(/*! ./libs/function/colorGradient.js */ 24));
  1570. var _guid = _interopRequireDefault(__webpack_require__(/*! ./libs/function/guid.js */ 25));
  1571. var _color = _interopRequireDefault(__webpack_require__(/*! ./libs/function/color.js */ 26));
  1572. var _type2icon = _interopRequireDefault(__webpack_require__(/*! ./libs/function/type2icon.js */ 27));
  1573. var _randomArray = _interopRequireDefault(__webpack_require__(/*! ./libs/function/randomArray.js */ 28));
  1574. var _deepClone = _interopRequireDefault(__webpack_require__(/*! ./libs/function/deepClone.js */ 15));
  1575. var _deepMerge = _interopRequireDefault(__webpack_require__(/*! ./libs/function/deepMerge.js */ 14));
  1576. var _addUnit = _interopRequireDefault(__webpack_require__(/*! ./libs/function/addUnit.js */ 29));
  1577. var _test = _interopRequireDefault(__webpack_require__(/*! ./libs/function/test.js */ 16));
  1578. var _random = _interopRequireDefault(__webpack_require__(/*! ./libs/function/random.js */ 30));
  1579. var _trim = _interopRequireDefault(__webpack_require__(/*! ./libs/function/trim.js */ 31));
  1580. var _toast = _interopRequireDefault(__webpack_require__(/*! ./libs/function/toast.js */ 32));
  1581. var _getParent = _interopRequireDefault(__webpack_require__(/*! ./libs/function/getParent.js */ 33));
  1582. var _$parent = _interopRequireDefault(__webpack_require__(/*! ./libs/function/$parent.js */ 34));
  1583. var _sys = __webpack_require__(/*! ./libs/function/sys.js */ 35);
  1584. var _debounce = _interopRequireDefault(__webpack_require__(/*! ./libs/function/debounce.js */ 36));
  1585. var _throttle = _interopRequireDefault(__webpack_require__(/*! ./libs/function/throttle.js */ 37));
  1586. var _config = _interopRequireDefault(__webpack_require__(/*! ./libs/config/config.js */ 38));
  1587. var _zIndex = _interopRequireDefault(__webpack_require__(/*! ./libs/config/zIndex.js */ 39));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} // 引入全局mixin
  1588. // 引入关于是否mixin集成小程序分享的配置
  1589. // import wxshare from './libs/mixin/mpShare.js'
  1590. // 全局挂载引入http相关请求拦截插件
  1591. function wranning(str) {// 开发环境进行信息输出,主要是一些报错信息
  1592. // 这个环境的来由是在程序编写时候,点击hx编辑器运行调试代码的时候,详见:
  1593. // https://uniapp.dcloud.io/frame?id=%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e5%92%8c%e7%94%9f%e4%ba%a7%e7%8e%af%e5%a2%83
  1594. if (true) {console.warn(str);}} // 尝试判断在根目录的/store中是否有$u.mixin.js,此文件uView默认为需要挂在到全局的vuex的state变量
  1595. // HX2.6.11版本,放到try中,控制台依然会警告,暂时不用此方式,
  1596. // let vuexStore = {};
  1597. // try {
  1598. // vuexStore = require("@/store/$u.mixin.js");
  1599. // } catch (e) {
  1600. // //TODO handle the exception
  1601. // }
  1602. // post类型对象参数转为get类型url参数
  1603. var $u = { queryParams: _queryParams.default, route: _route.default, timeFormat: _timeFormat.default, date: _timeFormat.default, // 另名date
  1604. timeFrom: _timeFrom.default, colorGradient: _colorGradient.default.colorGradient, colorToRgba: _colorGradient.default.colorToRgba, guid: _guid.default, color: _color.default, sys: _sys.sys, os: _sys.os, type2icon: _type2icon.default, randomArray: _randomArray.default, wranning: wranning, get: _request.default.get,
  1605. post: _request.default.post,
  1606. put: _request.default.put,
  1607. 'delete': _request.default.delete,
  1608. hexToRgb: _colorGradient.default.hexToRgb,
  1609. rgbToHex: _colorGradient.default.rgbToHex,
  1610. test: _test.default,
  1611. random: _random.default,
  1612. deepClone: _deepClone.default,
  1613. deepMerge: _deepMerge.default,
  1614. getParent: _getParent.default,
  1615. $parent: _$parent.default,
  1616. addUnit: _addUnit.default,
  1617. trim: _trim.default,
  1618. type: ['primary', 'success', 'error', 'warning', 'info'],
  1619. http: _request.default,
  1620. toast: _toast.default,
  1621. config: _config.default, // uView配置信息相关,比如版本号
  1622. zIndex: _zIndex.default,
  1623. debounce: _debounce.default,
  1624. throttle: _throttle.default };
  1625. // $u挂载到uni对象上
  1626. uni.$u = $u;
  1627. var install = function install(Vue) {
  1628. Vue.mixin(_mixin.default);
  1629. if (Vue.prototype.openShare) {
  1630. Vue.mixin(mpShare);
  1631. }
  1632. // Vue.mixin(vuexStore);
  1633. // 时间格式化,同时两个名称,date和timeFormat
  1634. Vue.filter('timeFormat', function (timestamp, format) {
  1635. return (0, _timeFormat.default)(timestamp, format);
  1636. });
  1637. Vue.filter('date', function (timestamp, format) {
  1638. return (0, _timeFormat.default)(timestamp, format);
  1639. });
  1640. // 将多久以前的方法,注入到全局过滤器
  1641. Vue.filter('timeFrom', function (timestamp, format) {
  1642. return (0, _timeFrom.default)(timestamp, format);
  1643. });
  1644. Vue.prototype.$u = $u;
  1645. };var _default =
  1646. {
  1647. install: install };exports.default = _default;
  1648. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  1649. /***/ }),
  1650. /***/ 12:
  1651. /*!***********************************************!*\
  1652. !*** E:/bigData/uview-ui/libs/mixin/mixin.js ***!
  1653. \***********************************************/
  1654. /*! no static exports found */
  1655. /***/ (function(module, exports, __webpack_require__) {
  1656. /* WEBPACK VAR INJECTION */(function(uni) {module.exports = {
  1657. data: function data() {
  1658. return {};
  1659. },
  1660. onLoad: function onLoad() {
  1661. // getRect挂载到$u上,因为这方法需要使用in(this),所以无法把它独立成一个单独的文件导出
  1662. this.$u.getRect = this.$uGetRect;
  1663. },
  1664. methods: {
  1665. // 查询节点信息
  1666. // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
  1667. // 解决办法为在组件根部再套一个没有任何作用的view元素
  1668. $uGetRect: function $uGetRect(selector, all) {var _this = this;
  1669. return new Promise(function (resolve) {
  1670. uni.createSelectorQuery().
  1671. in(_this)[all ? 'selectAll' : 'select'](selector).
  1672. boundingClientRect(function (rect) {
  1673. if (all && Array.isArray(rect) && rect.length) {
  1674. resolve(rect);
  1675. }
  1676. if (!all && rect) {
  1677. resolve(rect);
  1678. }
  1679. }).
  1680. exec();
  1681. });
  1682. },
  1683. getParentData: function getParentData() {var _this2 = this;var parentName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  1684. // 避免在created中去定义parent变量
  1685. if (!this.parent) this.parent = false;
  1686. // 这里的本质原理是,通过获取父组件实例(也即u-radio-group的this)
  1687. // 将父组件this中对应的参数,赋值给本组件(u-radio的this)的parentData对象中对应的属性
  1688. // 之所以需要这么做,是因为所有端中,头条小程序不支持通过this.parent.xxx去监听父组件参数的变化
  1689. this.parent = this.$u.$parent.call(this, parentName);
  1690. if (this.parent) {
  1691. // 历遍parentData中的属性,将parent中的同名属性赋值给parentData
  1692. Object.keys(this.parentData).map(function (key) {
  1693. _this2.parentData[key] = _this2.parent[key];
  1694. });
  1695. }
  1696. },
  1697. // 阻止事件冒泡
  1698. preventEvent: function preventEvent(e) {
  1699. e && e.stopPropagation && e.stopPropagation();
  1700. } },
  1701. onReachBottom: function onReachBottom() {
  1702. uni.$emit('uOnReachBottom');
  1703. } };
  1704. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  1705. /***/ }),
  1706. /***/ 13:
  1707. /*!*************************************************!*\
  1708. !*** E:/bigData/uview-ui/libs/request/index.js ***!
  1709. \*************************************************/
  1710. /*! no static exports found */
  1711. /***/ (function(module, exports, __webpack_require__) {
  1712. "use strict";
  1713. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _deepMerge = _interopRequireDefault(__webpack_require__(/*! ../function/deepMerge */ 14));
  1714. var _test = _interopRequireDefault(__webpack_require__(/*! ../function/test */ 16));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}function _createClass(Constructor, protoProps, staticProps) {if (protoProps) _defineProperties(Constructor.prototype, protoProps);if (staticProps) _defineProperties(Constructor, staticProps);return Constructor;}var
  1715. Request = /*#__PURE__*/function () {_createClass(Request, [{ key: "setConfig",
  1716. // 设置全局默认配置
  1717. value: function setConfig(customConfig) {
  1718. // 深度合并对象,否则会造成对象深层属性丢失
  1719. this.config = (0, _deepMerge.default)(this.config, customConfig);
  1720. }
  1721. // 主要请求部分
  1722. }, { key: "request", value: function request() {var _this = this;var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1723. // 检查请求拦截
  1724. if (this.interceptor.request && typeof this.interceptor.request === 'function') {
  1725. var tmpConfig = {};
  1726. var interceptorRequest = this.interceptor.request(options);
  1727. if (interceptorRequest === false) {
  1728. // 返回一个处于pending状态中的Promise,来取消原promise,避免进入then()回调
  1729. return new Promise(function () {});
  1730. }
  1731. this.options = interceptorRequest;
  1732. }
  1733. options.dataType = options.dataType || this.config.dataType;
  1734. options.responseType = options.responseType || this.config.responseType;
  1735. options.url = options.url || '';
  1736. options.params = options.params || {};
  1737. options.header = Object.assign(this.config.header, options.header);
  1738. options.method = options.method || this.config.method;
  1739. return new Promise(function (resolve, reject) {
  1740. options.complete = function (response) {
  1741. // 请求返回后,隐藏loading(如果请求返回快的话,可能会没有loading)
  1742. uni.hideLoading();
  1743. // 清除定时器,如果请求回来了,就无需loading
  1744. clearTimeout(_this.config.timer);
  1745. _this.config.timer = null;
  1746. // 判断用户对拦截返回数据的要求,如果originalData为true,返回所有的数据(response)到拦截器,否则只返回response.data
  1747. if (_this.config.originalData) {
  1748. // 判断是否存在拦截器
  1749. if (_this.interceptor.response && typeof _this.interceptor.response === 'function') {
  1750. var resInterceptors = _this.interceptor.response(response);
  1751. // 如果拦截器不返回false,就将拦截器返回的内容给this.$u.post的then回调
  1752. if (resInterceptors !== false) {
  1753. resolve(resInterceptors);
  1754. } else {
  1755. // 如果拦截器返回false,意味着拦截器定义者认为返回有问题,直接接入catch回调
  1756. reject(response);
  1757. }
  1758. } else {
  1759. // 如果要求返回原始数据,就算没有拦截器,也返回最原始的数据
  1760. resolve(response);
  1761. }
  1762. } else {
  1763. if (response.statusCode == 200) {
  1764. if (_this.interceptor.response && typeof _this.interceptor.response === 'function') {
  1765. var _resInterceptors = _this.interceptor.response(response.data);
  1766. if (_resInterceptors !== false) {
  1767. resolve(_resInterceptors);
  1768. } else {
  1769. reject(response.data);
  1770. }
  1771. } else {
  1772. // 如果不是返回原始数据(originalData=false),且没有拦截器的情况下,返回纯数据给then回调
  1773. resolve(response.data);
  1774. }
  1775. } else {
  1776. // 不返回原始数据的情况下,服务器状态码不为200,modal弹框提示
  1777. // if(response.errMsg) {
  1778. // uni.showModal({
  1779. // title: response.errMsg
  1780. // });
  1781. // }
  1782. reject(response);
  1783. }
  1784. }
  1785. };
  1786. // 判断用户传递的URL是否/开头,如果不是,加上/,这里使用了uView的test.js验证库的url()方法
  1787. options.url = _test.default.url(options.url) ? options.url : _this.config.baseUrl + (options.url.indexOf('/') == 0 ?
  1788. options.url : '/' + options.url);
  1789. // 是否显示loading
  1790. // 加一个是否已有timer定时器的判断,否则有两个同时请求的时候,后者会清除前者的定时器id
  1791. // 而没有清除前者的定时器,导致前者超时,一直显示loading
  1792. if (_this.config.showLoading && !_this.config.timer) {
  1793. _this.config.timer = setTimeout(function () {
  1794. uni.showLoading({
  1795. title: _this.config.loadingText,
  1796. mask: _this.config.loadingMask });
  1797. _this.config.timer = null;
  1798. }, _this.config.loadingTime);
  1799. }
  1800. uni.request(options);
  1801. });
  1802. // .catch(res => {
  1803. // // 如果返回reject(),不让其进入this.$u.post().then().catch()后面的catct()
  1804. // // 因为很多人都会忘了写后面的catch(),导致报错捕获不到catch
  1805. // return new Promise(()=>{});
  1806. // })
  1807. } }]);
  1808. function Request() {var _this2 = this;_classCallCheck(this, Request);
  1809. this.config = {
  1810. baseUrl: '', // 请求的根域名
  1811. // 默认的请求头
  1812. header: {},
  1813. method: 'POST',
  1814. // 设置为json,返回后uni.request会对数据进行一次JSON.parse
  1815. dataType: 'json',
  1816. // 此参数无需处理,因为5+和支付宝小程序不支持,默认为text即可
  1817. responseType: 'text',
  1818. showLoading: true, // 是否显示请求中的loading
  1819. loadingText: '请求中...',
  1820. loadingTime: 800, // 在此时间内,请求还没回来的话,就显示加载中动画,单位ms
  1821. timer: null, // 定时器
  1822. originalData: false, // 是否在拦截器中返回服务端的原始数据,见文档说明
  1823. loadingMask: true // 展示loading的时候,是否给一个透明的蒙层,防止触摸穿透
  1824. };
  1825. // 拦截器
  1826. this.interceptor = {
  1827. // 请求前的拦截
  1828. request: null,
  1829. // 请求后的拦截
  1830. response: null };
  1831. // get请求
  1832. this.get = function (url) {var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  1833. return _this2.request({
  1834. method: 'GET',
  1835. url: url,
  1836. header: header,
  1837. data: data });
  1838. };
  1839. // post请求
  1840. this.post = function (url) {var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  1841. return _this2.request({
  1842. url: url,
  1843. method: 'POST',
  1844. header: header,
  1845. data: data });
  1846. };
  1847. // put请求,不支持支付宝小程序(HX2.6.15)
  1848. this.put = function (url) {var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  1849. return _this2.request({
  1850. url: url,
  1851. method: 'PUT',
  1852. header: header,
  1853. data: data });
  1854. };
  1855. // delete请求,不支持支付宝和头条小程序(HX2.6.15)
  1856. this.delete = function (url) {var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  1857. return _this2.request({
  1858. url: url,
  1859. method: 'DELETE',
  1860. header: header,
  1861. data: data });
  1862. };
  1863. }return Request;}();var _default =
  1864. new Request();exports.default = _default;
  1865. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  1866. /***/ }),
  1867. /***/ 14:
  1868. /*!******************************************************!*\
  1869. !*** E:/bigData/uview-ui/libs/function/deepMerge.js ***!
  1870. \******************************************************/
  1871. /*! no static exports found */
  1872. /***/ (function(module, exports, __webpack_require__) {
  1873. "use strict";
  1874. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _deepClone = _interopRequireDefault(__webpack_require__(/*! ./deepClone */ 15));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  1875. // JS对象深度合并
  1876. function deepMerge() {var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  1877. target = (0, _deepClone.default)(target);
  1878. if (typeof target !== 'object' || typeof source !== 'object') return false;
  1879. for (var prop in source) {
  1880. if (!source.hasOwnProperty(prop)) continue;
  1881. if (prop in target) {
  1882. if (typeof target[prop] !== 'object') {
  1883. target[prop] = source[prop];
  1884. } else {
  1885. if (typeof source[prop] !== 'object') {
  1886. target[prop] = source[prop];
  1887. } else {
  1888. if (target[prop].concat && source[prop].concat) {
  1889. target[prop] = target[prop].concat(source[prop]);
  1890. } else {
  1891. target[prop] = deepMerge(target[prop], source[prop]);
  1892. }
  1893. }
  1894. }
  1895. } else {
  1896. target[prop] = source[prop];
  1897. }
  1898. }
  1899. return target;
  1900. }var _default =
  1901. deepMerge;exports.default = _default;
  1902. /***/ }),
  1903. /***/ 15:
  1904. /*!******************************************************!*\
  1905. !*** E:/bigData/uview-ui/libs/function/deepClone.js ***!
  1906. \******************************************************/
  1907. /*! no static exports found */
  1908. /***/ (function(module, exports, __webpack_require__) {
  1909. "use strict";
  1910. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // 判断arr是否为一个数组,返回一个bool值
  1911. function isArray(arr) {
  1912. return Object.prototype.toString.call(arr) === '[object Array]';
  1913. }
  1914. // 深度克隆
  1915. function deepClone(obj) {
  1916. // 对常见的“非”值,直接返回原来值
  1917. if ([null, undefined, NaN, false].includes(obj)) return obj;
  1918. if (typeof obj !== "object" && typeof obj !== 'function') {
  1919. //原始类型直接返回
  1920. return obj;
  1921. }
  1922. var o = isArray(obj) ? [] : {};
  1923. for (var i in obj) {
  1924. if (obj.hasOwnProperty(i)) {
  1925. o[i] = typeof obj[i] === "object" ? deepClone(obj[i]) : obj[i];
  1926. }
  1927. }
  1928. return o;
  1929. }var _default =
  1930. deepClone;exports.default = _default;
  1931. /***/ }),
  1932. /***/ 16:
  1933. /*!*************************************************!*\
  1934. !*** E:/bigData/uview-ui/libs/function/test.js ***!
  1935. \*************************************************/
  1936. /*! no static exports found */
  1937. /***/ (function(module, exports, __webpack_require__) {
  1938. "use strict";
  1939. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; /**
  1940. * 验证电子邮箱格式
  1941. */
  1942. function email(value) {
  1943. return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value);
  1944. }
  1945. /**
  1946. * 验证手机格式
  1947. */
  1948. function mobile(value) {
  1949. return /^1[23456789]\d{9}$/.test(value);
  1950. }
  1951. /**
  1952. * 验证URL格式
  1953. */
  1954. function url(value) {
  1955. return /http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w-.\/?%&=]*)?/.test(value);
  1956. }
  1957. /**
  1958. * 验证日期格式
  1959. */
  1960. function date(value) {
  1961. return !/Invalid|NaN/.test(new Date(value).toString());
  1962. }
  1963. /**
  1964. * 验证ISO类型的日期格式
  1965. */
  1966. function dateISO(value) {
  1967. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value);
  1968. }
  1969. /**
  1970. * 验证十进制数字
  1971. */
  1972. function number(value) {
  1973. return /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(value);
  1974. }
  1975. /**
  1976. * 验证整数
  1977. */
  1978. function digits(value) {
  1979. return /^\d+$/.test(value);
  1980. }
  1981. /**
  1982. * 验证身份证号码
  1983. */
  1984. function idCard(value) {
  1985. return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(
  1986. value);
  1987. }
  1988. /**
  1989. * 是否车牌号
  1990. */
  1991. function carNo(value) {
  1992. // 新能源车牌
  1993. var xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  1994. // 旧车牌
  1995. var creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  1996. if (value.length === 7) {
  1997. return creg.test(value);
  1998. } else if (value.length === 8) {
  1999. return xreg.test(value);
  2000. } else {
  2001. return false;
  2002. }
  2003. }
  2004. /**
  2005. * 金额,只允许2位小数
  2006. */
  2007. function amount(value) {
  2008. //金额,只允许保留两位小数
  2009. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value);
  2010. }
  2011. /**
  2012. * 中文
  2013. */
  2014. function chinese(value) {
  2015. var reg = /^[\u4e00-\u9fa5]+$/gi;
  2016. return reg.test(value);
  2017. }
  2018. /**
  2019. * 只能输入字母
  2020. */
  2021. function letter(value) {
  2022. return /^[a-zA-Z]*$/.test(value);
  2023. }
  2024. /**
  2025. * 只能是字母或者数字
  2026. */
  2027. function enOrNum(value) {
  2028. //英文或者数字
  2029. var reg = /^[0-9a-zA-Z]*$/g;
  2030. return reg.test(value);
  2031. }
  2032. /**
  2033. * 验证是否包含某个值
  2034. */
  2035. function contains(value, param) {
  2036. return value.indexOf(param) >= 0;
  2037. }
  2038. /**
  2039. * 验证一个值范围[min, max]
  2040. */
  2041. function range(value, param) {
  2042. return value >= param[0] && value <= param[1];
  2043. }
  2044. /**
  2045. * 验证一个长度范围[min, max]
  2046. */
  2047. function rangeLength(value, param) {
  2048. return value.length >= param[0] && value.length <= param[1];
  2049. }
  2050. /**
  2051. * 是否固定电话
  2052. */
  2053. function landline(value) {
  2054. var reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  2055. return reg.test(value);
  2056. }
  2057. /**
  2058. * 判断是否为空
  2059. */
  2060. function empty(value) {
  2061. switch (typeof value) {
  2062. case 'undefined':
  2063. return true;
  2064. case 'string':
  2065. if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, '').length == 0) return true;
  2066. break;
  2067. case 'boolean':
  2068. if (!value) return true;
  2069. break;
  2070. case 'number':
  2071. if (0 === value || isNaN(value)) return true;
  2072. break;
  2073. case 'object':
  2074. if (null === value || value.length === 0) return true;
  2075. for (var i in value) {
  2076. return false;
  2077. }
  2078. return true;}
  2079. return false;
  2080. }
  2081. /**
  2082. * 是否json字符串
  2083. */
  2084. function jsonString(value) {
  2085. if (typeof value == 'string') {
  2086. try {
  2087. var obj = JSON.parse(value);
  2088. if (typeof obj == 'object' && obj) {
  2089. return true;
  2090. } else {
  2091. return false;
  2092. }
  2093. } catch (e) {
  2094. return false;
  2095. }
  2096. }
  2097. return false;
  2098. }
  2099. /**
  2100. * 是否数组
  2101. */
  2102. function array(value) {
  2103. if (typeof Array.isArray === "function") {
  2104. return Array.isArray(value);
  2105. } else {
  2106. return Object.prototype.toString.call(value) === "[object Array]";
  2107. }
  2108. }
  2109. /**
  2110. * 是否对象
  2111. */
  2112. function object(value) {
  2113. return Object.prototype.toString.call(value) === '[object Object]';
  2114. }
  2115. /**
  2116. * 是否短信验证码
  2117. */
  2118. function code(value) {var len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 6;
  2119. return new RegExp("^\\d{".concat(len, "}$")).test(value);
  2120. }var _default =
  2121. {
  2122. email: email,
  2123. mobile: mobile,
  2124. url: url,
  2125. date: date,
  2126. dateISO: dateISO,
  2127. number: number,
  2128. digits: digits,
  2129. idCard: idCard,
  2130. carNo: carNo,
  2131. amount: amount,
  2132. chinese: chinese,
  2133. letter: letter,
  2134. enOrNum: enOrNum,
  2135. contains: contains,
  2136. range: range,
  2137. rangeLength: rangeLength,
  2138. empty: empty,
  2139. isEmpty: empty,
  2140. jsonString: jsonString,
  2141. landline: landline,
  2142. object: object,
  2143. array: array,
  2144. code: code };exports.default = _default;
  2145. /***/ }),
  2146. /***/ 17:
  2147. /*!********************************************************!*\
  2148. !*** E:/bigData/uview-ui/libs/function/queryParams.js ***!
  2149. \********************************************************/
  2150. /*! no static exports found */
  2151. /***/ (function(module, exports, __webpack_require__) {
  2152. "use strict";
  2153. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; /**
  2154. * 对象转url参数
  2155. * @param {*} data,对象
  2156. * @param {*} isPrefix,是否自动加上"?"
  2157. */
  2158. function queryParams() {var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};var isPrefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;var arrayFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'brackets';
  2159. var prefix = isPrefix ? '?' : '';
  2160. var _result = [];
  2161. if (['indices', 'brackets', 'repeat', 'comma'].indexOf(arrayFormat) == -1) arrayFormat = 'brackets';var _loop = function _loop(
  2162. key) {
  2163. var value = data[key];
  2164. // 去掉为空的参数
  2165. if (['', undefined, null].indexOf(value) >= 0) {
  2166. return "continue";
  2167. }
  2168. // 如果值为数组,另行处理
  2169. if (value.constructor === Array) {
  2170. // e.g. {ids: [1, 2, 3]}
  2171. switch (arrayFormat) {
  2172. case 'indices':
  2173. // 结果: ids[0]=1&ids[1]=2&ids[2]=3
  2174. for (var i = 0; i < value.length; i++) {
  2175. _result.push(key + '[' + i + ']=' + value[i]);
  2176. }
  2177. break;
  2178. case 'brackets':
  2179. // 结果: ids[]=1&ids[]=2&ids[]=3
  2180. value.forEach(function (_value) {
  2181. _result.push(key + '[]=' + _value);
  2182. });
  2183. break;
  2184. case 'repeat':
  2185. // 结果: ids=1&ids=2&ids=3
  2186. value.forEach(function (_value) {
  2187. _result.push(key + '=' + _value);
  2188. });
  2189. break;
  2190. case 'comma':
  2191. // 结果: ids=1,2,3
  2192. var commaStr = "";
  2193. value.forEach(function (_value) {
  2194. commaStr += (commaStr ? "," : "") + _value;
  2195. });
  2196. _result.push(key + '=' + commaStr);
  2197. break;
  2198. default:
  2199. value.forEach(function (_value) {
  2200. _result.push(key + '[]=' + _value);
  2201. });}
  2202. } else {
  2203. _result.push(key + '=' + value);
  2204. }};for (var key in data) {var _ret = _loop(key);if (_ret === "continue") continue;
  2205. }
  2206. return _result.length ? prefix + _result.join('&') : '';
  2207. }var _default =
  2208. queryParams;exports.default = _default;
  2209. /***/ }),
  2210. /***/ 18:
  2211. /*!**************************************************!*\
  2212. !*** E:/bigData/uview-ui/libs/function/route.js ***!
  2213. \**************************************************/
  2214. /*! no static exports found */
  2215. /***/ (function(module, exports, __webpack_require__) {
  2216. "use strict";
  2217. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _regenerator = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@babel/runtime/regenerator */ 19));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {try {var info = gen[key](arg);var value = info.value;} catch (error) {reject(error);return;}if (info.done) {resolve(value);} else {Promise.resolve(value).then(_next, _throw);}}function _asyncToGenerator(fn) {return function () {var self = this,args = arguments;return new Promise(function (resolve, reject) {var gen = fn.apply(self, args);function _next(value) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);}function _throw(err) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);}_next(undefined);});};}function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}function _createClass(Constructor, protoProps, staticProps) {if (protoProps) _defineProperties(Constructor.prototype, protoProps);if (staticProps) _defineProperties(Constructor, staticProps);return Constructor;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;} /**
  2218. * 路由跳转方法,该方法相对于直接使用uni.xxx的好处是使用更加简单快捷
  2219. * 并且带有路由拦截功能
  2220. */var
  2221. Router = /*#__PURE__*/function () {
  2222. // 原始属性定义
  2223. function Router() {_classCallCheck(this, Router);_defineProperty(this, "config", { type: 'navigateTo', url: '', delta: 1, // navigateBack页面后退时,回退的层数
  2224. params: {}, // 传递的参数
  2225. animationType: 'pop-in', // 窗口动画,只在APP有效
  2226. animationDuration: 300, // 窗口动画持续时间,单位毫秒,只在APP有效
  2227. intercept: false // 是否需要拦截
  2228. }); // 因为route方法是需要对外赋值给另外的对象使用,同时route内部有使用this,会导致route失去上下文
  2229. // 这里在构造函数中进行this绑定
  2230. this.route = this.route.bind(this);} // 判断url前面是否有"/",如果没有则加上,否则无法跳转
  2231. _createClass(Router, [{ key: "addRootPath", value: function addRootPath(url) {return url[0] === '/' ? url : "/".concat(url);
  2232. }
  2233. // 整合路由参数
  2234. }, { key: "mixinParam", value: function mixinParam(url, params) {
  2235. url = this.addRootPath(url);
  2236. // 使用正则匹配,主要依据是判断是否有"/","?","="等,如“/page/index/index?name=mary"
  2237. // 如果有url中有get参数,转换后无需带上"?"
  2238. var query = '';
  2239. if (/.*\/.*\?.*=.*/.test(url)) {
  2240. // object对象转为get类型的参数
  2241. query = uni.$u.queryParams(params, false);
  2242. // 因为已有get参数,所以后面拼接的参数需要带上"&"隔开
  2243. return url += "&" + query;
  2244. } else {
  2245. // 直接拼接参数,因为此处url中没有后面的query参数,也就没有"?/&"之类的符号
  2246. query = uni.$u.queryParams(params);
  2247. return url += query;
  2248. }
  2249. }
  2250. // 对外的方法名称
  2251. }, { key: "route", value: function () {var _route = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee() {var options,params,mergeConfig,isNext,_args = arguments;return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};params = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
  2252. // 合并用户的配置和内部的默认配置
  2253. mergeConfig = {};
  2254. if (typeof options === 'string') {
  2255. // 如果options为字符串,则为route(url, params)的形式
  2256. mergeConfig.url = this.mixinParam(options, params);
  2257. mergeConfig.type = 'navigateTo';
  2258. } else {
  2259. mergeConfig = uni.$u.deepClone(options, this.config);
  2260. // 否则正常使用mergeConfig中的url和params进行拼接
  2261. mergeConfig.url = this.mixinParam(options.url, options.params);
  2262. }
  2263. if (params.intercept) {
  2264. this.config.intercept = params.intercept;
  2265. }
  2266. // params参数也带给拦截器
  2267. mergeConfig.params = params;
  2268. // 合并内外部参数
  2269. mergeConfig = uni.$u.deepMerge(this.config, mergeConfig);
  2270. // 判断用户是否定义了拦截器
  2271. if (!(typeof uni.$u.routeIntercept === 'function')) {_context.next = 14;break;}_context.next = 10;return (
  2272. new Promise(function (resolve, reject) {
  2273. uni.$u.routeIntercept(mergeConfig, resolve);
  2274. }));case 10:isNext = _context.sent;
  2275. // 如果isNext为true,则执行路由跳转
  2276. isNext && this.openPage(mergeConfig);_context.next = 15;break;case 14:
  2277. this.openPage(mergeConfig);case 15:case "end":return _context.stop();}}}, _callee, this);}));function route() {return _route.apply(this, arguments);}return route;}()
  2278. // 执行路由跳转
  2279. }, { key: "openPage", value: function openPage(config) {
  2280. // 解构参数
  2281. var
  2282. url =
  2283. config.url,type = config.type,delta = config.delta,animationType = config.animationType,animationDuration = config.animationDuration;
  2284. if (config.type == 'navigateTo' || config.type == 'to') {
  2285. uni.navigateTo({
  2286. url: url,
  2287. animationType: animationType,
  2288. animationDuration: animationDuration });
  2289. }
  2290. if (config.type == 'redirectTo' || config.type == 'redirect') {
  2291. uni.redirectTo({
  2292. url: url });
  2293. }
  2294. if (config.type == 'switchTab' || config.type == 'tab') {
  2295. uni.switchTab({
  2296. url: url });
  2297. }
  2298. if (config.type == 'reLaunch' || config.type == 'launch') {
  2299. uni.reLaunch({
  2300. url: url });
  2301. }
  2302. if (config.type == 'navigateBack' || config.type == 'back') {
  2303. uni.navigateBack({
  2304. delta: delta });
  2305. }
  2306. } }]);return Router;}();var _default =
  2307. new Router().route;exports.default = _default;
  2308. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  2309. /***/ }),
  2310. /***/ 19:
  2311. /*!**********************************************************!*\
  2312. !*** ./node_modules/@babel/runtime/regenerator/index.js ***!
  2313. \**********************************************************/
  2314. /*! no static exports found */
  2315. /***/ (function(module, exports, __webpack_require__) {
  2316. module.exports = __webpack_require__(/*! regenerator-runtime */ 20);
  2317. /***/ }),
  2318. /***/ 2:
  2319. /*!******************************************************************************************!*\
  2320. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  2321. \******************************************************************************************/
  2322. /*! exports provided: default */
  2323. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2324. "use strict";
  2325. __webpack_require__.r(__webpack_exports__);
  2326. /* WEBPACK VAR INJECTION */(function(global) {/*!
  2327. * Vue.js v2.6.11
  2328. * (c) 2014-2020 Evan You
  2329. * Released under the MIT License.
  2330. */
  2331. /* */
  2332. var emptyObject = Object.freeze({});
  2333. // These helpers produce better VM code in JS engines due to their
  2334. // explicitness and function inlining.
  2335. function isUndef (v) {
  2336. return v === undefined || v === null
  2337. }
  2338. function isDef (v) {
  2339. return v !== undefined && v !== null
  2340. }
  2341. function isTrue (v) {
  2342. return v === true
  2343. }
  2344. function isFalse (v) {
  2345. return v === false
  2346. }
  2347. /**
  2348. * Check if value is primitive.
  2349. */
  2350. function isPrimitive (value) {
  2351. return (
  2352. typeof value === 'string' ||
  2353. typeof value === 'number' ||
  2354. // $flow-disable-line
  2355. typeof value === 'symbol' ||
  2356. typeof value === 'boolean'
  2357. )
  2358. }
  2359. /**
  2360. * Quick object check - this is primarily used to tell
  2361. * Objects from primitive values when we know the value
  2362. * is a JSON-compliant type.
  2363. */
  2364. function isObject (obj) {
  2365. return obj !== null && typeof obj === 'object'
  2366. }
  2367. /**
  2368. * Get the raw type string of a value, e.g., [object Object].
  2369. */
  2370. var _toString = Object.prototype.toString;
  2371. function toRawType (value) {
  2372. return _toString.call(value).slice(8, -1)
  2373. }
  2374. /**
  2375. * Strict object type check. Only returns true
  2376. * for plain JavaScript objects.
  2377. */
  2378. function isPlainObject (obj) {
  2379. return _toString.call(obj) === '[object Object]'
  2380. }
  2381. function isRegExp (v) {
  2382. return _toString.call(v) === '[object RegExp]'
  2383. }
  2384. /**
  2385. * Check if val is a valid array index.
  2386. */
  2387. function isValidArrayIndex (val) {
  2388. var n = parseFloat(String(val));
  2389. return n >= 0 && Math.floor(n) === n && isFinite(val)
  2390. }
  2391. function isPromise (val) {
  2392. return (
  2393. isDef(val) &&
  2394. typeof val.then === 'function' &&
  2395. typeof val.catch === 'function'
  2396. )
  2397. }
  2398. /**
  2399. * Convert a value to a string that is actually rendered.
  2400. */
  2401. function toString (val) {
  2402. return val == null
  2403. ? ''
  2404. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  2405. ? JSON.stringify(val, null, 2)
  2406. : String(val)
  2407. }
  2408. /**
  2409. * Convert an input value to a number for persistence.
  2410. * If the conversion fails, return original string.
  2411. */
  2412. function toNumber (val) {
  2413. var n = parseFloat(val);
  2414. return isNaN(n) ? val : n
  2415. }
  2416. /**
  2417. * Make a map and return a function for checking if a key
  2418. * is in that map.
  2419. */
  2420. function makeMap (
  2421. str,
  2422. expectsLowerCase
  2423. ) {
  2424. var map = Object.create(null);
  2425. var list = str.split(',');
  2426. for (var i = 0; i < list.length; i++) {
  2427. map[list[i]] = true;
  2428. }
  2429. return expectsLowerCase
  2430. ? function (val) { return map[val.toLowerCase()]; }
  2431. : function (val) { return map[val]; }
  2432. }
  2433. /**
  2434. * Check if a tag is a built-in tag.
  2435. */
  2436. var isBuiltInTag = makeMap('slot,component', true);
  2437. /**
  2438. * Check if an attribute is a reserved attribute.
  2439. */
  2440. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  2441. /**
  2442. * Remove an item from an array.
  2443. */
  2444. function remove (arr, item) {
  2445. if (arr.length) {
  2446. var index = arr.indexOf(item);
  2447. if (index > -1) {
  2448. return arr.splice(index, 1)
  2449. }
  2450. }
  2451. }
  2452. /**
  2453. * Check whether an object has the property.
  2454. */
  2455. var hasOwnProperty = Object.prototype.hasOwnProperty;
  2456. function hasOwn (obj, key) {
  2457. return hasOwnProperty.call(obj, key)
  2458. }
  2459. /**
  2460. * Create a cached version of a pure function.
  2461. */
  2462. function cached (fn) {
  2463. var cache = Object.create(null);
  2464. return (function cachedFn (str) {
  2465. var hit = cache[str];
  2466. return hit || (cache[str] = fn(str))
  2467. })
  2468. }
  2469. /**
  2470. * Camelize a hyphen-delimited string.
  2471. */
  2472. var camelizeRE = /-(\w)/g;
  2473. var camelize = cached(function (str) {
  2474. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  2475. });
  2476. /**
  2477. * Capitalize a string.
  2478. */
  2479. var capitalize = cached(function (str) {
  2480. return str.charAt(0).toUpperCase() + str.slice(1)
  2481. });
  2482. /**
  2483. * Hyphenate a camelCase string.
  2484. */
  2485. var hyphenateRE = /\B([A-Z])/g;
  2486. var hyphenate = cached(function (str) {
  2487. return str.replace(hyphenateRE, '-$1').toLowerCase()
  2488. });
  2489. /**
  2490. * Simple bind polyfill for environments that do not support it,
  2491. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  2492. * since native bind is now performant enough in most browsers.
  2493. * But removing it would mean breaking code that was able to run in
  2494. * PhantomJS 1.x, so this must be kept for backward compatibility.
  2495. */
  2496. /* istanbul ignore next */
  2497. function polyfillBind (fn, ctx) {
  2498. function boundFn (a) {
  2499. var l = arguments.length;
  2500. return l
  2501. ? l > 1
  2502. ? fn.apply(ctx, arguments)
  2503. : fn.call(ctx, a)
  2504. : fn.call(ctx)
  2505. }
  2506. boundFn._length = fn.length;
  2507. return boundFn
  2508. }
  2509. function nativeBind (fn, ctx) {
  2510. return fn.bind(ctx)
  2511. }
  2512. var bind = Function.prototype.bind
  2513. ? nativeBind
  2514. : polyfillBind;
  2515. /**
  2516. * Convert an Array-like object to a real Array.
  2517. */
  2518. function toArray (list, start) {
  2519. start = start || 0;
  2520. var i = list.length - start;
  2521. var ret = new Array(i);
  2522. while (i--) {
  2523. ret[i] = list[i + start];
  2524. }
  2525. return ret
  2526. }
  2527. /**
  2528. * Mix properties into target object.
  2529. */
  2530. function extend (to, _from) {
  2531. for (var key in _from) {
  2532. to[key] = _from[key];
  2533. }
  2534. return to
  2535. }
  2536. /**
  2537. * Merge an Array of Objects into a single Object.
  2538. */
  2539. function toObject (arr) {
  2540. var res = {};
  2541. for (var i = 0; i < arr.length; i++) {
  2542. if (arr[i]) {
  2543. extend(res, arr[i]);
  2544. }
  2545. }
  2546. return res
  2547. }
  2548. /* eslint-disable no-unused-vars */
  2549. /**
  2550. * Perform no operation.
  2551. * Stubbing args to make Flow happy without leaving useless transpiled code
  2552. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  2553. */
  2554. function noop (a, b, c) {}
  2555. /**
  2556. * Always return false.
  2557. */
  2558. var no = function (a, b, c) { return false; };
  2559. /* eslint-enable no-unused-vars */
  2560. /**
  2561. * Return the same value.
  2562. */
  2563. var identity = function (_) { return _; };
  2564. /**
  2565. * Check if two values are loosely equal - that is,
  2566. * if they are plain objects, do they have the same shape?
  2567. */
  2568. function looseEqual (a, b) {
  2569. if (a === b) { return true }
  2570. var isObjectA = isObject(a);
  2571. var isObjectB = isObject(b);
  2572. if (isObjectA && isObjectB) {
  2573. try {
  2574. var isArrayA = Array.isArray(a);
  2575. var isArrayB = Array.isArray(b);
  2576. if (isArrayA && isArrayB) {
  2577. return a.length === b.length && a.every(function (e, i) {
  2578. return looseEqual(e, b[i])
  2579. })
  2580. } else if (a instanceof Date && b instanceof Date) {
  2581. return a.getTime() === b.getTime()
  2582. } else if (!isArrayA && !isArrayB) {
  2583. var keysA = Object.keys(a);
  2584. var keysB = Object.keys(b);
  2585. return keysA.length === keysB.length && keysA.every(function (key) {
  2586. return looseEqual(a[key], b[key])
  2587. })
  2588. } else {
  2589. /* istanbul ignore next */
  2590. return false
  2591. }
  2592. } catch (e) {
  2593. /* istanbul ignore next */
  2594. return false
  2595. }
  2596. } else if (!isObjectA && !isObjectB) {
  2597. return String(a) === String(b)
  2598. } else {
  2599. return false
  2600. }
  2601. }
  2602. /**
  2603. * Return the first index at which a loosely equal value can be
  2604. * found in the array (if value is a plain object, the array must
  2605. * contain an object of the same shape), or -1 if it is not present.
  2606. */
  2607. function looseIndexOf (arr, val) {
  2608. for (var i = 0; i < arr.length; i++) {
  2609. if (looseEqual(arr[i], val)) { return i }
  2610. }
  2611. return -1
  2612. }
  2613. /**
  2614. * Ensure a function is called only once.
  2615. */
  2616. function once (fn) {
  2617. var called = false;
  2618. return function () {
  2619. if (!called) {
  2620. called = true;
  2621. fn.apply(this, arguments);
  2622. }
  2623. }
  2624. }
  2625. var ASSET_TYPES = [
  2626. 'component',
  2627. 'directive',
  2628. 'filter'
  2629. ];
  2630. var LIFECYCLE_HOOKS = [
  2631. 'beforeCreate',
  2632. 'created',
  2633. 'beforeMount',
  2634. 'mounted',
  2635. 'beforeUpdate',
  2636. 'updated',
  2637. 'beforeDestroy',
  2638. 'destroyed',
  2639. 'activated',
  2640. 'deactivated',
  2641. 'errorCaptured',
  2642. 'serverPrefetch'
  2643. ];
  2644. /* */
  2645. var config = ({
  2646. /**
  2647. * Option merge strategies (used in core/util/options)
  2648. */
  2649. // $flow-disable-line
  2650. optionMergeStrategies: Object.create(null),
  2651. /**
  2652. * Whether to suppress warnings.
  2653. */
  2654. silent: false,
  2655. /**
  2656. * Show production mode tip message on boot?
  2657. */
  2658. productionTip: "development" !== 'production',
  2659. /**
  2660. * Whether to enable devtools
  2661. */
  2662. devtools: "development" !== 'production',
  2663. /**
  2664. * Whether to record perf
  2665. */
  2666. performance: false,
  2667. /**
  2668. * Error handler for watcher errors
  2669. */
  2670. errorHandler: null,
  2671. /**
  2672. * Warn handler for watcher warns
  2673. */
  2674. warnHandler: null,
  2675. /**
  2676. * Ignore certain custom elements
  2677. */
  2678. ignoredElements: [],
  2679. /**
  2680. * Custom user key aliases for v-on
  2681. */
  2682. // $flow-disable-line
  2683. keyCodes: Object.create(null),
  2684. /**
  2685. * Check if a tag is reserved so that it cannot be registered as a
  2686. * component. This is platform-dependent and may be overwritten.
  2687. */
  2688. isReservedTag: no,
  2689. /**
  2690. * Check if an attribute is reserved so that it cannot be used as a component
  2691. * prop. This is platform-dependent and may be overwritten.
  2692. */
  2693. isReservedAttr: no,
  2694. /**
  2695. * Check if a tag is an unknown element.
  2696. * Platform-dependent.
  2697. */
  2698. isUnknownElement: no,
  2699. /**
  2700. * Get the namespace of an element
  2701. */
  2702. getTagNamespace: noop,
  2703. /**
  2704. * Parse the real tag name for the specific platform.
  2705. */
  2706. parsePlatformTagName: identity,
  2707. /**
  2708. * Check if an attribute must be bound using property, e.g. value
  2709. * Platform-dependent.
  2710. */
  2711. mustUseProp: no,
  2712. /**
  2713. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  2714. * This will significantly reduce performance if set to false.
  2715. */
  2716. async: true,
  2717. /**
  2718. * Exposed for legacy reasons
  2719. */
  2720. _lifecycleHooks: LIFECYCLE_HOOKS
  2721. });
  2722. /* */
  2723. /**
  2724. * unicode letters used for parsing html tags, component names and property paths.
  2725. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  2726. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  2727. */
  2728. var unicodeRegExp = /a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;
  2729. /**
  2730. * Check if a string starts with $ or _
  2731. */
  2732. function isReserved (str) {
  2733. var c = (str + '').charCodeAt(0);
  2734. return c === 0x24 || c === 0x5F
  2735. }
  2736. /**
  2737. * Define a property.
  2738. */
  2739. function def (obj, key, val, enumerable) {
  2740. Object.defineProperty(obj, key, {
  2741. value: val,
  2742. enumerable: !!enumerable,
  2743. writable: true,
  2744. configurable: true
  2745. });
  2746. }
  2747. /**
  2748. * Parse simple path.
  2749. */
  2750. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  2751. function parsePath (path) {
  2752. if (bailRE.test(path)) {
  2753. return
  2754. }
  2755. var segments = path.split('.');
  2756. return function (obj) {
  2757. for (var i = 0; i < segments.length; i++) {
  2758. if (!obj) { return }
  2759. obj = obj[segments[i]];
  2760. }
  2761. return obj
  2762. }
  2763. }
  2764. /* */
  2765. // can we use __proto__?
  2766. var hasProto = '__proto__' in {};
  2767. // Browser environment sniffing
  2768. var inBrowser = typeof window !== 'undefined';
  2769. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  2770. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  2771. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  2772. var isIE = UA && /msie|trident/.test(UA);
  2773. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  2774. var isEdge = UA && UA.indexOf('edge/') > 0;
  2775. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  2776. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  2777. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  2778. var isPhantomJS = UA && /phantomjs/.test(UA);
  2779. var isFF = UA && UA.match(/firefox\/(\d+)/);
  2780. // Firefox has a "watch" function on Object.prototype...
  2781. var nativeWatch = ({}).watch;
  2782. if (inBrowser) {
  2783. try {
  2784. var opts = {};
  2785. Object.defineProperty(opts, 'passive', ({
  2786. get: function get () {
  2787. }
  2788. })); // https://github.com/facebook/flow/issues/285
  2789. window.addEventListener('test-passive', null, opts);
  2790. } catch (e) {}
  2791. }
  2792. // this needs to be lazy-evaled because vue may be required before
  2793. // vue-server-renderer can set VUE_ENV
  2794. var _isServer;
  2795. var isServerRendering = function () {
  2796. if (_isServer === undefined) {
  2797. /* istanbul ignore if */
  2798. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  2799. // detect presence of vue-server-renderer and avoid
  2800. // Webpack shimming the process
  2801. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  2802. } else {
  2803. _isServer = false;
  2804. }
  2805. }
  2806. return _isServer
  2807. };
  2808. // detect devtools
  2809. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  2810. /* istanbul ignore next */
  2811. function isNative (Ctor) {
  2812. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  2813. }
  2814. var hasSymbol =
  2815. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  2816. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  2817. var _Set;
  2818. /* istanbul ignore if */ // $flow-disable-line
  2819. if (typeof Set !== 'undefined' && isNative(Set)) {
  2820. // use native Set when available.
  2821. _Set = Set;
  2822. } else {
  2823. // a non-standard Set polyfill that only works with primitive keys.
  2824. _Set = /*@__PURE__*/(function () {
  2825. function Set () {
  2826. this.set = Object.create(null);
  2827. }
  2828. Set.prototype.has = function has (key) {
  2829. return this.set[key] === true
  2830. };
  2831. Set.prototype.add = function add (key) {
  2832. this.set[key] = true;
  2833. };
  2834. Set.prototype.clear = function clear () {
  2835. this.set = Object.create(null);
  2836. };
  2837. return Set;
  2838. }());
  2839. }
  2840. /* */
  2841. var warn = noop;
  2842. var tip = noop;
  2843. var generateComponentTrace = (noop); // work around flow check
  2844. var formatComponentName = (noop);
  2845. if (true) {
  2846. var hasConsole = typeof console !== 'undefined';
  2847. var classifyRE = /(?:^|[-_])(\w)/g;
  2848. var classify = function (str) { return str
  2849. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  2850. .replace(/[-_]/g, ''); };
  2851. warn = function (msg, vm) {
  2852. var trace = vm ? generateComponentTrace(vm) : '';
  2853. if (config.warnHandler) {
  2854. config.warnHandler.call(null, msg, vm, trace);
  2855. } else if (hasConsole && (!config.silent)) {
  2856. console.error(("[Vue warn]: " + msg + trace));
  2857. }
  2858. };
  2859. tip = function (msg, vm) {
  2860. if (hasConsole && (!config.silent)) {
  2861. console.warn("[Vue tip]: " + msg + (
  2862. vm ? generateComponentTrace(vm) : ''
  2863. ));
  2864. }
  2865. };
  2866. formatComponentName = function (vm, includeFile) {
  2867. if (vm.$root === vm) {
  2868. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  2869. return ('') + vm.$options.__file
  2870. }
  2871. return '<Root>'
  2872. }
  2873. var options = typeof vm === 'function' && vm.cid != null
  2874. ? vm.options
  2875. : vm._isVue
  2876. ? vm.$options || vm.constructor.options
  2877. : vm;
  2878. var name = options.name || options._componentTag;
  2879. var file = options.__file;
  2880. if (!name && file) {
  2881. var match = file.match(/([^/\\]+)\.vue$/);
  2882. name = match && match[1];
  2883. }
  2884. return (
  2885. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  2886. (file && includeFile !== false ? (" at " + file) : '')
  2887. )
  2888. };
  2889. var repeat = function (str, n) {
  2890. var res = '';
  2891. while (n) {
  2892. if (n % 2 === 1) { res += str; }
  2893. if (n > 1) { str += str; }
  2894. n >>= 1;
  2895. }
  2896. return res
  2897. };
  2898. generateComponentTrace = function (vm) {
  2899. if (vm._isVue && vm.$parent) {
  2900. var tree = [];
  2901. var currentRecursiveSequence = 0;
  2902. while (vm && vm.$options.name !== 'PageBody') {
  2903. if (tree.length > 0) {
  2904. var last = tree[tree.length - 1];
  2905. if (last.constructor === vm.constructor) {
  2906. currentRecursiveSequence++;
  2907. vm = vm.$parent;
  2908. continue
  2909. } else if (currentRecursiveSequence > 0) {
  2910. tree[tree.length - 1] = [last, currentRecursiveSequence];
  2911. currentRecursiveSequence = 0;
  2912. }
  2913. }
  2914. !vm.$options.isReserved && tree.push(vm);
  2915. vm = vm.$parent;
  2916. }
  2917. return '\n\nfound in\n\n' + tree
  2918. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  2919. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  2920. : formatComponentName(vm))); })
  2921. .join('\n')
  2922. } else {
  2923. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  2924. }
  2925. };
  2926. }
  2927. /* */
  2928. var uid = 0;
  2929. /**
  2930. * A dep is an observable that can have multiple
  2931. * directives subscribing to it.
  2932. */
  2933. var Dep = function Dep () {
  2934. this.id = uid++;
  2935. this.subs = [];
  2936. };
  2937. Dep.prototype.addSub = function addSub (sub) {
  2938. this.subs.push(sub);
  2939. };
  2940. Dep.prototype.removeSub = function removeSub (sub) {
  2941. remove(this.subs, sub);
  2942. };
  2943. Dep.prototype.depend = function depend () {
  2944. if (Dep.SharedObject.target) {
  2945. Dep.SharedObject.target.addDep(this);
  2946. }
  2947. };
  2948. Dep.prototype.notify = function notify () {
  2949. // stabilize the subscriber list first
  2950. var subs = this.subs.slice();
  2951. if ( true && !config.async) {
  2952. // subs aren't sorted in scheduler if not running async
  2953. // we need to sort them now to make sure they fire in correct
  2954. // order
  2955. subs.sort(function (a, b) { return a.id - b.id; });
  2956. }
  2957. for (var i = 0, l = subs.length; i < l; i++) {
  2958. subs[i].update();
  2959. }
  2960. };
  2961. // The current target watcher being evaluated.
  2962. // This is globally unique because only one watcher
  2963. // can be evaluated at a time.
  2964. // fixed by xxxxxx (nvue shared vuex)
  2965. /* eslint-disable no-undef */
  2966. Dep.SharedObject = {};
  2967. Dep.SharedObject.target = null;
  2968. Dep.SharedObject.targetStack = [];
  2969. function pushTarget (target) {
  2970. Dep.SharedObject.targetStack.push(target);
  2971. Dep.SharedObject.target = target;
  2972. Dep.target = target;
  2973. }
  2974. function popTarget () {
  2975. Dep.SharedObject.targetStack.pop();
  2976. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  2977. Dep.target = Dep.SharedObject.target;
  2978. }
  2979. /* */
  2980. var VNode = function VNode (
  2981. tag,
  2982. data,
  2983. children,
  2984. text,
  2985. elm,
  2986. context,
  2987. componentOptions,
  2988. asyncFactory
  2989. ) {
  2990. this.tag = tag;
  2991. this.data = data;
  2992. this.children = children;
  2993. this.text = text;
  2994. this.elm = elm;
  2995. this.ns = undefined;
  2996. this.context = context;
  2997. this.fnContext = undefined;
  2998. this.fnOptions = undefined;
  2999. this.fnScopeId = undefined;
  3000. this.key = data && data.key;
  3001. this.componentOptions = componentOptions;
  3002. this.componentInstance = undefined;
  3003. this.parent = undefined;
  3004. this.raw = false;
  3005. this.isStatic = false;
  3006. this.isRootInsert = true;
  3007. this.isComment = false;
  3008. this.isCloned = false;
  3009. this.isOnce = false;
  3010. this.asyncFactory = asyncFactory;
  3011. this.asyncMeta = undefined;
  3012. this.isAsyncPlaceholder = false;
  3013. };
  3014. var prototypeAccessors = { child: { configurable: true } };
  3015. // DEPRECATED: alias for componentInstance for backwards compat.
  3016. /* istanbul ignore next */
  3017. prototypeAccessors.child.get = function () {
  3018. return this.componentInstance
  3019. };
  3020. Object.defineProperties( VNode.prototype, prototypeAccessors );
  3021. var createEmptyVNode = function (text) {
  3022. if ( text === void 0 ) text = '';
  3023. var node = new VNode();
  3024. node.text = text;
  3025. node.isComment = true;
  3026. return node
  3027. };
  3028. function createTextVNode (val) {
  3029. return new VNode(undefined, undefined, undefined, String(val))
  3030. }
  3031. // optimized shallow clone
  3032. // used for static nodes and slot nodes because they may be reused across
  3033. // multiple renders, cloning them avoids errors when DOM manipulations rely
  3034. // on their elm reference.
  3035. function cloneVNode (vnode) {
  3036. var cloned = new VNode(
  3037. vnode.tag,
  3038. vnode.data,
  3039. // #7975
  3040. // clone children array to avoid mutating original in case of cloning
  3041. // a child.
  3042. vnode.children && vnode.children.slice(),
  3043. vnode.text,
  3044. vnode.elm,
  3045. vnode.context,
  3046. vnode.componentOptions,
  3047. vnode.asyncFactory
  3048. );
  3049. cloned.ns = vnode.ns;
  3050. cloned.isStatic = vnode.isStatic;
  3051. cloned.key = vnode.key;
  3052. cloned.isComment = vnode.isComment;
  3053. cloned.fnContext = vnode.fnContext;
  3054. cloned.fnOptions = vnode.fnOptions;
  3055. cloned.fnScopeId = vnode.fnScopeId;
  3056. cloned.asyncMeta = vnode.asyncMeta;
  3057. cloned.isCloned = true;
  3058. return cloned
  3059. }
  3060. /*
  3061. * not type checking this file because flow doesn't play well with
  3062. * dynamically accessing methods on Array prototype
  3063. */
  3064. var arrayProto = Array.prototype;
  3065. var arrayMethods = Object.create(arrayProto);
  3066. var methodsToPatch = [
  3067. 'push',
  3068. 'pop',
  3069. 'shift',
  3070. 'unshift',
  3071. 'splice',
  3072. 'sort',
  3073. 'reverse'
  3074. ];
  3075. /**
  3076. * Intercept mutating methods and emit events
  3077. */
  3078. methodsToPatch.forEach(function (method) {
  3079. // cache original method
  3080. var original = arrayProto[method];
  3081. def(arrayMethods, method, function mutator () {
  3082. var args = [], len = arguments.length;
  3083. while ( len-- ) args[ len ] = arguments[ len ];
  3084. var result = original.apply(this, args);
  3085. var ob = this.__ob__;
  3086. var inserted;
  3087. switch (method) {
  3088. case 'push':
  3089. case 'unshift':
  3090. inserted = args;
  3091. break
  3092. case 'splice':
  3093. inserted = args.slice(2);
  3094. break
  3095. }
  3096. if (inserted) { ob.observeArray(inserted); }
  3097. // notify change
  3098. ob.dep.notify();
  3099. return result
  3100. });
  3101. });
  3102. /* */
  3103. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  3104. /**
  3105. * In some cases we may want to disable observation inside a component's
  3106. * update computation.
  3107. */
  3108. var shouldObserve = true;
  3109. function toggleObserving (value) {
  3110. shouldObserve = value;
  3111. }
  3112. /**
  3113. * Observer class that is attached to each observed
  3114. * object. Once attached, the observer converts the target
  3115. * object's property keys into getter/setters that
  3116. * collect dependencies and dispatch updates.
  3117. */
  3118. var Observer = function Observer (value) {
  3119. this.value = value;
  3120. this.dep = new Dep();
  3121. this.vmCount = 0;
  3122. def(value, '__ob__', this);
  3123. if (Array.isArray(value)) {
  3124. if (hasProto) {
  3125. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  3126. if(value.push !== value.__proto__.push){
  3127. copyAugment(value, arrayMethods, arrayKeys);
  3128. } else {
  3129. protoAugment(value, arrayMethods);
  3130. }
  3131. }
  3132. } else {
  3133. copyAugment(value, arrayMethods, arrayKeys);
  3134. }
  3135. this.observeArray(value);
  3136. } else {
  3137. this.walk(value);
  3138. }
  3139. };
  3140. /**
  3141. * Walk through all properties and convert them into
  3142. * getter/setters. This method should only be called when
  3143. * value type is Object.
  3144. */
  3145. Observer.prototype.walk = function walk (obj) {
  3146. var keys = Object.keys(obj);
  3147. for (var i = 0; i < keys.length; i++) {
  3148. defineReactive$$1(obj, keys[i]);
  3149. }
  3150. };
  3151. /**
  3152. * Observe a list of Array items.
  3153. */
  3154. Observer.prototype.observeArray = function observeArray (items) {
  3155. for (var i = 0, l = items.length; i < l; i++) {
  3156. observe(items[i]);
  3157. }
  3158. };
  3159. // helpers
  3160. /**
  3161. * Augment a target Object or Array by intercepting
  3162. * the prototype chain using __proto__
  3163. */
  3164. function protoAugment (target, src) {
  3165. /* eslint-disable no-proto */
  3166. target.__proto__ = src;
  3167. /* eslint-enable no-proto */
  3168. }
  3169. /**
  3170. * Augment a target Object or Array by defining
  3171. * hidden properties.
  3172. */
  3173. /* istanbul ignore next */
  3174. function copyAugment (target, src, keys) {
  3175. for (var i = 0, l = keys.length; i < l; i++) {
  3176. var key = keys[i];
  3177. def(target, key, src[key]);
  3178. }
  3179. }
  3180. /**
  3181. * Attempt to create an observer instance for a value,
  3182. * returns the new observer if successfully observed,
  3183. * or the existing observer if the value already has one.
  3184. */
  3185. function observe (value, asRootData) {
  3186. if (!isObject(value) || value instanceof VNode) {
  3187. return
  3188. }
  3189. var ob;
  3190. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  3191. ob = value.__ob__;
  3192. } else if (
  3193. shouldObserve &&
  3194. !isServerRendering() &&
  3195. (Array.isArray(value) || isPlainObject(value)) &&
  3196. Object.isExtensible(value) &&
  3197. !value._isVue
  3198. ) {
  3199. ob = new Observer(value);
  3200. }
  3201. if (asRootData && ob) {
  3202. ob.vmCount++;
  3203. }
  3204. return ob
  3205. }
  3206. /**
  3207. * Define a reactive property on an Object.
  3208. */
  3209. function defineReactive$$1 (
  3210. obj,
  3211. key,
  3212. val,
  3213. customSetter,
  3214. shallow
  3215. ) {
  3216. var dep = new Dep();
  3217. var property = Object.getOwnPropertyDescriptor(obj, key);
  3218. if (property && property.configurable === false) {
  3219. return
  3220. }
  3221. // cater for pre-defined getter/setters
  3222. var getter = property && property.get;
  3223. var setter = property && property.set;
  3224. if ((!getter || setter) && arguments.length === 2) {
  3225. val = obj[key];
  3226. }
  3227. var childOb = !shallow && observe(val);
  3228. Object.defineProperty(obj, key, {
  3229. enumerable: true,
  3230. configurable: true,
  3231. get: function reactiveGetter () {
  3232. var value = getter ? getter.call(obj) : val;
  3233. if (Dep.SharedObject.target) { // fixed by xxxxxx
  3234. dep.depend();
  3235. if (childOb) {
  3236. childOb.dep.depend();
  3237. if (Array.isArray(value)) {
  3238. dependArray(value);
  3239. }
  3240. }
  3241. }
  3242. return value
  3243. },
  3244. set: function reactiveSetter (newVal) {
  3245. var value = getter ? getter.call(obj) : val;
  3246. /* eslint-disable no-self-compare */
  3247. if (newVal === value || (newVal !== newVal && value !== value)) {
  3248. return
  3249. }
  3250. /* eslint-enable no-self-compare */
  3251. if ( true && customSetter) {
  3252. customSetter();
  3253. }
  3254. // #7981: for accessor properties without setter
  3255. if (getter && !setter) { return }
  3256. if (setter) {
  3257. setter.call(obj, newVal);
  3258. } else {
  3259. val = newVal;
  3260. }
  3261. childOb = !shallow && observe(newVal);
  3262. dep.notify();
  3263. }
  3264. });
  3265. }
  3266. /**
  3267. * Set a property on an object. Adds the new property and
  3268. * triggers change notification if the property doesn't
  3269. * already exist.
  3270. */
  3271. function set (target, key, val) {
  3272. if ( true &&
  3273. (isUndef(target) || isPrimitive(target))
  3274. ) {
  3275. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  3276. }
  3277. if (Array.isArray(target) && isValidArrayIndex(key)) {
  3278. target.length = Math.max(target.length, key);
  3279. target.splice(key, 1, val);
  3280. return val
  3281. }
  3282. if (key in target && !(key in Object.prototype)) {
  3283. target[key] = val;
  3284. return val
  3285. }
  3286. var ob = (target).__ob__;
  3287. if (target._isVue || (ob && ob.vmCount)) {
  3288. true && warn(
  3289. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  3290. 'at runtime - declare it upfront in the data option.'
  3291. );
  3292. return val
  3293. }
  3294. if (!ob) {
  3295. target[key] = val;
  3296. return val
  3297. }
  3298. defineReactive$$1(ob.value, key, val);
  3299. ob.dep.notify();
  3300. return val
  3301. }
  3302. /**
  3303. * Delete a property and trigger change if necessary.
  3304. */
  3305. function del (target, key) {
  3306. if ( true &&
  3307. (isUndef(target) || isPrimitive(target))
  3308. ) {
  3309. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  3310. }
  3311. if (Array.isArray(target) && isValidArrayIndex(key)) {
  3312. target.splice(key, 1);
  3313. return
  3314. }
  3315. var ob = (target).__ob__;
  3316. if (target._isVue || (ob && ob.vmCount)) {
  3317. true && warn(
  3318. 'Avoid deleting properties on a Vue instance or its root $data ' +
  3319. '- just set it to null.'
  3320. );
  3321. return
  3322. }
  3323. if (!hasOwn(target, key)) {
  3324. return
  3325. }
  3326. delete target[key];
  3327. if (!ob) {
  3328. return
  3329. }
  3330. ob.dep.notify();
  3331. }
  3332. /**
  3333. * Collect dependencies on array elements when the array is touched, since
  3334. * we cannot intercept array element access like property getters.
  3335. */
  3336. function dependArray (value) {
  3337. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  3338. e = value[i];
  3339. e && e.__ob__ && e.__ob__.dep.depend();
  3340. if (Array.isArray(e)) {
  3341. dependArray(e);
  3342. }
  3343. }
  3344. }
  3345. /* */
  3346. /**
  3347. * Option overwriting strategies are functions that handle
  3348. * how to merge a parent option value and a child option
  3349. * value into the final value.
  3350. */
  3351. var strats = config.optionMergeStrategies;
  3352. /**
  3353. * Options with restrictions
  3354. */
  3355. if (true) {
  3356. strats.el = strats.propsData = function (parent, child, vm, key) {
  3357. if (!vm) {
  3358. warn(
  3359. "option \"" + key + "\" can only be used during instance " +
  3360. 'creation with the `new` keyword.'
  3361. );
  3362. }
  3363. return defaultStrat(parent, child)
  3364. };
  3365. }
  3366. /**
  3367. * Helper that recursively merges two data objects together.
  3368. */
  3369. function mergeData (to, from) {
  3370. if (!from) { return to }
  3371. var key, toVal, fromVal;
  3372. var keys = hasSymbol
  3373. ? Reflect.ownKeys(from)
  3374. : Object.keys(from);
  3375. for (var i = 0; i < keys.length; i++) {
  3376. key = keys[i];
  3377. // in case the object is already observed...
  3378. if (key === '__ob__') { continue }
  3379. toVal = to[key];
  3380. fromVal = from[key];
  3381. if (!hasOwn(to, key)) {
  3382. set(to, key, fromVal);
  3383. } else if (
  3384. toVal !== fromVal &&
  3385. isPlainObject(toVal) &&
  3386. isPlainObject(fromVal)
  3387. ) {
  3388. mergeData(toVal, fromVal);
  3389. }
  3390. }
  3391. return to
  3392. }
  3393. /**
  3394. * Data
  3395. */
  3396. function mergeDataOrFn (
  3397. parentVal,
  3398. childVal,
  3399. vm
  3400. ) {
  3401. if (!vm) {
  3402. // in a Vue.extend merge, both should be functions
  3403. if (!childVal) {
  3404. return parentVal
  3405. }
  3406. if (!parentVal) {
  3407. return childVal
  3408. }
  3409. // when parentVal & childVal are both present,
  3410. // we need to return a function that returns the
  3411. // merged result of both functions... no need to
  3412. // check if parentVal is a function here because
  3413. // it has to be a function to pass previous merges.
  3414. return function mergedDataFn () {
  3415. return mergeData(
  3416. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  3417. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  3418. )
  3419. }
  3420. } else {
  3421. return function mergedInstanceDataFn () {
  3422. // instance merge
  3423. var instanceData = typeof childVal === 'function'
  3424. ? childVal.call(vm, vm)
  3425. : childVal;
  3426. var defaultData = typeof parentVal === 'function'
  3427. ? parentVal.call(vm, vm)
  3428. : parentVal;
  3429. if (instanceData) {
  3430. return mergeData(instanceData, defaultData)
  3431. } else {
  3432. return defaultData
  3433. }
  3434. }
  3435. }
  3436. }
  3437. strats.data = function (
  3438. parentVal,
  3439. childVal,
  3440. vm
  3441. ) {
  3442. if (!vm) {
  3443. if (childVal && typeof childVal !== 'function') {
  3444. true && warn(
  3445. 'The "data" option should be a function ' +
  3446. 'that returns a per-instance value in component ' +
  3447. 'definitions.',
  3448. vm
  3449. );
  3450. return parentVal
  3451. }
  3452. return mergeDataOrFn(parentVal, childVal)
  3453. }
  3454. return mergeDataOrFn(parentVal, childVal, vm)
  3455. };
  3456. /**
  3457. * Hooks and props are merged as arrays.
  3458. */
  3459. function mergeHook (
  3460. parentVal,
  3461. childVal
  3462. ) {
  3463. var res = childVal
  3464. ? parentVal
  3465. ? parentVal.concat(childVal)
  3466. : Array.isArray(childVal)
  3467. ? childVal
  3468. : [childVal]
  3469. : parentVal;
  3470. return res
  3471. ? dedupeHooks(res)
  3472. : res
  3473. }
  3474. function dedupeHooks (hooks) {
  3475. var res = [];
  3476. for (var i = 0; i < hooks.length; i++) {
  3477. if (res.indexOf(hooks[i]) === -1) {
  3478. res.push(hooks[i]);
  3479. }
  3480. }
  3481. return res
  3482. }
  3483. LIFECYCLE_HOOKS.forEach(function (hook) {
  3484. strats[hook] = mergeHook;
  3485. });
  3486. /**
  3487. * Assets
  3488. *
  3489. * When a vm is present (instance creation), we need to do
  3490. * a three-way merge between constructor options, instance
  3491. * options and parent options.
  3492. */
  3493. function mergeAssets (
  3494. parentVal,
  3495. childVal,
  3496. vm,
  3497. key
  3498. ) {
  3499. var res = Object.create(parentVal || null);
  3500. if (childVal) {
  3501. true && assertObjectType(key, childVal, vm);
  3502. return extend(res, childVal)
  3503. } else {
  3504. return res
  3505. }
  3506. }
  3507. ASSET_TYPES.forEach(function (type) {
  3508. strats[type + 's'] = mergeAssets;
  3509. });
  3510. /**
  3511. * Watchers.
  3512. *
  3513. * Watchers hashes should not overwrite one
  3514. * another, so we merge them as arrays.
  3515. */
  3516. strats.watch = function (
  3517. parentVal,
  3518. childVal,
  3519. vm,
  3520. key
  3521. ) {
  3522. // work around Firefox's Object.prototype.watch...
  3523. if (parentVal === nativeWatch) { parentVal = undefined; }
  3524. if (childVal === nativeWatch) { childVal = undefined; }
  3525. /* istanbul ignore if */
  3526. if (!childVal) { return Object.create(parentVal || null) }
  3527. if (true) {
  3528. assertObjectType(key, childVal, vm);
  3529. }
  3530. if (!parentVal) { return childVal }
  3531. var ret = {};
  3532. extend(ret, parentVal);
  3533. for (var key$1 in childVal) {
  3534. var parent = ret[key$1];
  3535. var child = childVal[key$1];
  3536. if (parent && !Array.isArray(parent)) {
  3537. parent = [parent];
  3538. }
  3539. ret[key$1] = parent
  3540. ? parent.concat(child)
  3541. : Array.isArray(child) ? child : [child];
  3542. }
  3543. return ret
  3544. };
  3545. /**
  3546. * Other object hashes.
  3547. */
  3548. strats.props =
  3549. strats.methods =
  3550. strats.inject =
  3551. strats.computed = function (
  3552. parentVal,
  3553. childVal,
  3554. vm,
  3555. key
  3556. ) {
  3557. if (childVal && "development" !== 'production') {
  3558. assertObjectType(key, childVal, vm);
  3559. }
  3560. if (!parentVal) { return childVal }
  3561. var ret = Object.create(null);
  3562. extend(ret, parentVal);
  3563. if (childVal) { extend(ret, childVal); }
  3564. return ret
  3565. };
  3566. strats.provide = mergeDataOrFn;
  3567. /**
  3568. * Default strategy.
  3569. */
  3570. var defaultStrat = function (parentVal, childVal) {
  3571. return childVal === undefined
  3572. ? parentVal
  3573. : childVal
  3574. };
  3575. /**
  3576. * Validate component names
  3577. */
  3578. function checkComponents (options) {
  3579. for (var key in options.components) {
  3580. validateComponentName(key);
  3581. }
  3582. }
  3583. function validateComponentName (name) {
  3584. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  3585. warn(
  3586. 'Invalid component name: "' + name + '". Component names ' +
  3587. 'should conform to valid custom element name in html5 specification.'
  3588. );
  3589. }
  3590. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  3591. warn(
  3592. 'Do not use built-in or reserved HTML elements as component ' +
  3593. 'id: ' + name
  3594. );
  3595. }
  3596. }
  3597. /**
  3598. * Ensure all props option syntax are normalized into the
  3599. * Object-based format.
  3600. */
  3601. function normalizeProps (options, vm) {
  3602. var props = options.props;
  3603. if (!props) { return }
  3604. var res = {};
  3605. var i, val, name;
  3606. if (Array.isArray(props)) {
  3607. i = props.length;
  3608. while (i--) {
  3609. val = props[i];
  3610. if (typeof val === 'string') {
  3611. name = camelize(val);
  3612. res[name] = { type: null };
  3613. } else if (true) {
  3614. warn('props must be strings when using array syntax.');
  3615. }
  3616. }
  3617. } else if (isPlainObject(props)) {
  3618. for (var key in props) {
  3619. val = props[key];
  3620. name = camelize(key);
  3621. res[name] = isPlainObject(val)
  3622. ? val
  3623. : { type: val };
  3624. }
  3625. } else if (true) {
  3626. warn(
  3627. "Invalid value for option \"props\": expected an Array or an Object, " +
  3628. "but got " + (toRawType(props)) + ".",
  3629. vm
  3630. );
  3631. }
  3632. options.props = res;
  3633. }
  3634. /**
  3635. * Normalize all injections into Object-based format
  3636. */
  3637. function normalizeInject (options, vm) {
  3638. var inject = options.inject;
  3639. if (!inject) { return }
  3640. var normalized = options.inject = {};
  3641. if (Array.isArray(inject)) {
  3642. for (var i = 0; i < inject.length; i++) {
  3643. normalized[inject[i]] = { from: inject[i] };
  3644. }
  3645. } else if (isPlainObject(inject)) {
  3646. for (var key in inject) {
  3647. var val = inject[key];
  3648. normalized[key] = isPlainObject(val)
  3649. ? extend({ from: key }, val)
  3650. : { from: val };
  3651. }
  3652. } else if (true) {
  3653. warn(
  3654. "Invalid value for option \"inject\": expected an Array or an Object, " +
  3655. "but got " + (toRawType(inject)) + ".",
  3656. vm
  3657. );
  3658. }
  3659. }
  3660. /**
  3661. * Normalize raw function directives into object format.
  3662. */
  3663. function normalizeDirectives (options) {
  3664. var dirs = options.directives;
  3665. if (dirs) {
  3666. for (var key in dirs) {
  3667. var def$$1 = dirs[key];
  3668. if (typeof def$$1 === 'function') {
  3669. dirs[key] = { bind: def$$1, update: def$$1 };
  3670. }
  3671. }
  3672. }
  3673. }
  3674. function assertObjectType (name, value, vm) {
  3675. if (!isPlainObject(value)) {
  3676. warn(
  3677. "Invalid value for option \"" + name + "\": expected an Object, " +
  3678. "but got " + (toRawType(value)) + ".",
  3679. vm
  3680. );
  3681. }
  3682. }
  3683. /**
  3684. * Merge two option objects into a new one.
  3685. * Core utility used in both instantiation and inheritance.
  3686. */
  3687. function mergeOptions (
  3688. parent,
  3689. child,
  3690. vm
  3691. ) {
  3692. if (true) {
  3693. checkComponents(child);
  3694. }
  3695. if (typeof child === 'function') {
  3696. child = child.options;
  3697. }
  3698. normalizeProps(child, vm);
  3699. normalizeInject(child, vm);
  3700. normalizeDirectives(child);
  3701. // Apply extends and mixins on the child options,
  3702. // but only if it is a raw options object that isn't
  3703. // the result of another mergeOptions call.
  3704. // Only merged options has the _base property.
  3705. if (!child._base) {
  3706. if (child.extends) {
  3707. parent = mergeOptions(parent, child.extends, vm);
  3708. }
  3709. if (child.mixins) {
  3710. for (var i = 0, l = child.mixins.length; i < l; i++) {
  3711. parent = mergeOptions(parent, child.mixins[i], vm);
  3712. }
  3713. }
  3714. }
  3715. var options = {};
  3716. var key;
  3717. for (key in parent) {
  3718. mergeField(key);
  3719. }
  3720. for (key in child) {
  3721. if (!hasOwn(parent, key)) {
  3722. mergeField(key);
  3723. }
  3724. }
  3725. function mergeField (key) {
  3726. var strat = strats[key] || defaultStrat;
  3727. options[key] = strat(parent[key], child[key], vm, key);
  3728. }
  3729. return options
  3730. }
  3731. /**
  3732. * Resolve an asset.
  3733. * This function is used because child instances need access
  3734. * to assets defined in its ancestor chain.
  3735. */
  3736. function resolveAsset (
  3737. options,
  3738. type,
  3739. id,
  3740. warnMissing
  3741. ) {
  3742. /* istanbul ignore if */
  3743. if (typeof id !== 'string') {
  3744. return
  3745. }
  3746. var assets = options[type];
  3747. // check local registration variations first
  3748. if (hasOwn(assets, id)) { return assets[id] }
  3749. var camelizedId = camelize(id);
  3750. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  3751. var PascalCaseId = capitalize(camelizedId);
  3752. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  3753. // fallback to prototype chain
  3754. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  3755. if ( true && warnMissing && !res) {
  3756. warn(
  3757. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  3758. options
  3759. );
  3760. }
  3761. return res
  3762. }
  3763. /* */
  3764. function validateProp (
  3765. key,
  3766. propOptions,
  3767. propsData,
  3768. vm
  3769. ) {
  3770. var prop = propOptions[key];
  3771. var absent = !hasOwn(propsData, key);
  3772. var value = propsData[key];
  3773. // boolean casting
  3774. var booleanIndex = getTypeIndex(Boolean, prop.type);
  3775. if (booleanIndex > -1) {
  3776. if (absent && !hasOwn(prop, 'default')) {
  3777. value = false;
  3778. } else if (value === '' || value === hyphenate(key)) {
  3779. // only cast empty string / same name to boolean if
  3780. // boolean has higher priority
  3781. var stringIndex = getTypeIndex(String, prop.type);
  3782. if (stringIndex < 0 || booleanIndex < stringIndex) {
  3783. value = true;
  3784. }
  3785. }
  3786. }
  3787. // check default value
  3788. if (value === undefined) {
  3789. value = getPropDefaultValue(vm, prop, key);
  3790. // since the default value is a fresh copy,
  3791. // make sure to observe it.
  3792. var prevShouldObserve = shouldObserve;
  3793. toggleObserving(true);
  3794. observe(value);
  3795. toggleObserving(prevShouldObserve);
  3796. }
  3797. if (
  3798. true
  3799. ) {
  3800. assertProp(prop, key, value, vm, absent);
  3801. }
  3802. return value
  3803. }
  3804. /**
  3805. * Get the default value of a prop.
  3806. */
  3807. function getPropDefaultValue (vm, prop, key) {
  3808. // no default, return undefined
  3809. if (!hasOwn(prop, 'default')) {
  3810. return undefined
  3811. }
  3812. var def = prop.default;
  3813. // warn against non-factory defaults for Object & Array
  3814. if ( true && isObject(def)) {
  3815. warn(
  3816. 'Invalid default value for prop "' + key + '": ' +
  3817. 'Props with type Object/Array must use a factory function ' +
  3818. 'to return the default value.',
  3819. vm
  3820. );
  3821. }
  3822. // the raw prop value was also undefined from previous render,
  3823. // return previous default value to avoid unnecessary watcher trigger
  3824. if (vm && vm.$options.propsData &&
  3825. vm.$options.propsData[key] === undefined &&
  3826. vm._props[key] !== undefined
  3827. ) {
  3828. return vm._props[key]
  3829. }
  3830. // call factory function for non-Function types
  3831. // a value is Function if its prototype is function even across different execution context
  3832. return typeof def === 'function' && getType(prop.type) !== 'Function'
  3833. ? def.call(vm)
  3834. : def
  3835. }
  3836. /**
  3837. * Assert whether a prop is valid.
  3838. */
  3839. function assertProp (
  3840. prop,
  3841. name,
  3842. value,
  3843. vm,
  3844. absent
  3845. ) {
  3846. if (prop.required && absent) {
  3847. warn(
  3848. 'Missing required prop: "' + name + '"',
  3849. vm
  3850. );
  3851. return
  3852. }
  3853. if (value == null && !prop.required) {
  3854. return
  3855. }
  3856. var type = prop.type;
  3857. var valid = !type || type === true;
  3858. var expectedTypes = [];
  3859. if (type) {
  3860. if (!Array.isArray(type)) {
  3861. type = [type];
  3862. }
  3863. for (var i = 0; i < type.length && !valid; i++) {
  3864. var assertedType = assertType(value, type[i]);
  3865. expectedTypes.push(assertedType.expectedType || '');
  3866. valid = assertedType.valid;
  3867. }
  3868. }
  3869. if (!valid) {
  3870. warn(
  3871. getInvalidTypeMessage(name, value, expectedTypes),
  3872. vm
  3873. );
  3874. return
  3875. }
  3876. var validator = prop.validator;
  3877. if (validator) {
  3878. if (!validator(value)) {
  3879. warn(
  3880. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  3881. vm
  3882. );
  3883. }
  3884. }
  3885. }
  3886. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  3887. function assertType (value, type) {
  3888. var valid;
  3889. var expectedType = getType(type);
  3890. if (simpleCheckRE.test(expectedType)) {
  3891. var t = typeof value;
  3892. valid = t === expectedType.toLowerCase();
  3893. // for primitive wrapper objects
  3894. if (!valid && t === 'object') {
  3895. valid = value instanceof type;
  3896. }
  3897. } else if (expectedType === 'Object') {
  3898. valid = isPlainObject(value);
  3899. } else if (expectedType === 'Array') {
  3900. valid = Array.isArray(value);
  3901. } else {
  3902. valid = value instanceof type;
  3903. }
  3904. return {
  3905. valid: valid,
  3906. expectedType: expectedType
  3907. }
  3908. }
  3909. /**
  3910. * Use function string name to check built-in types,
  3911. * because a simple equality check will fail when running
  3912. * across different vms / iframes.
  3913. */
  3914. function getType (fn) {
  3915. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  3916. return match ? match[1] : ''
  3917. }
  3918. function isSameType (a, b) {
  3919. return getType(a) === getType(b)
  3920. }
  3921. function getTypeIndex (type, expectedTypes) {
  3922. if (!Array.isArray(expectedTypes)) {
  3923. return isSameType(expectedTypes, type) ? 0 : -1
  3924. }
  3925. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  3926. if (isSameType(expectedTypes[i], type)) {
  3927. return i
  3928. }
  3929. }
  3930. return -1
  3931. }
  3932. function getInvalidTypeMessage (name, value, expectedTypes) {
  3933. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  3934. " Expected " + (expectedTypes.map(capitalize).join(', '));
  3935. var expectedType = expectedTypes[0];
  3936. var receivedType = toRawType(value);
  3937. var expectedValue = styleValue(value, expectedType);
  3938. var receivedValue = styleValue(value, receivedType);
  3939. // check if we need to specify expected value
  3940. if (expectedTypes.length === 1 &&
  3941. isExplicable(expectedType) &&
  3942. !isBoolean(expectedType, receivedType)) {
  3943. message += " with value " + expectedValue;
  3944. }
  3945. message += ", got " + receivedType + " ";
  3946. // check if we need to specify received value
  3947. if (isExplicable(receivedType)) {
  3948. message += "with value " + receivedValue + ".";
  3949. }
  3950. return message
  3951. }
  3952. function styleValue (value, type) {
  3953. if (type === 'String') {
  3954. return ("\"" + value + "\"")
  3955. } else if (type === 'Number') {
  3956. return ("" + (Number(value)))
  3957. } else {
  3958. return ("" + value)
  3959. }
  3960. }
  3961. function isExplicable (value) {
  3962. var explicitTypes = ['string', 'number', 'boolean'];
  3963. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  3964. }
  3965. function isBoolean () {
  3966. var args = [], len = arguments.length;
  3967. while ( len-- ) args[ len ] = arguments[ len ];
  3968. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  3969. }
  3970. /* */
  3971. function handleError (err, vm, info) {
  3972. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  3973. // See: https://github.com/vuejs/vuex/issues/1505
  3974. pushTarget();
  3975. try {
  3976. if (vm) {
  3977. var cur = vm;
  3978. while ((cur = cur.$parent)) {
  3979. var hooks = cur.$options.errorCaptured;
  3980. if (hooks) {
  3981. for (var i = 0; i < hooks.length; i++) {
  3982. try {
  3983. var capture = hooks[i].call(cur, err, vm, info) === false;
  3984. if (capture) { return }
  3985. } catch (e) {
  3986. globalHandleError(e, cur, 'errorCaptured hook');
  3987. }
  3988. }
  3989. }
  3990. }
  3991. }
  3992. globalHandleError(err, vm, info);
  3993. } finally {
  3994. popTarget();
  3995. }
  3996. }
  3997. function invokeWithErrorHandling (
  3998. handler,
  3999. context,
  4000. args,
  4001. vm,
  4002. info
  4003. ) {
  4004. var res;
  4005. try {
  4006. res = args ? handler.apply(context, args) : handler.call(context);
  4007. if (res && !res._isVue && isPromise(res) && !res._handled) {
  4008. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  4009. // issue #9511
  4010. // avoid catch triggering multiple times when nested calls
  4011. res._handled = true;
  4012. }
  4013. } catch (e) {
  4014. handleError(e, vm, info);
  4015. }
  4016. return res
  4017. }
  4018. function globalHandleError (err, vm, info) {
  4019. if (config.errorHandler) {
  4020. try {
  4021. return config.errorHandler.call(null, err, vm, info)
  4022. } catch (e) {
  4023. // if the user intentionally throws the original error in the handler,
  4024. // do not log it twice
  4025. if (e !== err) {
  4026. logError(e, null, 'config.errorHandler');
  4027. }
  4028. }
  4029. }
  4030. logError(err, vm, info);
  4031. }
  4032. function logError (err, vm, info) {
  4033. if (true) {
  4034. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  4035. }
  4036. /* istanbul ignore else */
  4037. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  4038. console.error(err);
  4039. } else {
  4040. throw err
  4041. }
  4042. }
  4043. /* */
  4044. var callbacks = [];
  4045. var pending = false;
  4046. function flushCallbacks () {
  4047. pending = false;
  4048. var copies = callbacks.slice(0);
  4049. callbacks.length = 0;
  4050. for (var i = 0; i < copies.length; i++) {
  4051. copies[i]();
  4052. }
  4053. }
  4054. // Here we have async deferring wrappers using microtasks.
  4055. // In 2.5 we used (macro) tasks (in combination with microtasks).
  4056. // However, it has subtle problems when state is changed right before repaint
  4057. // (e.g. #6813, out-in transitions).
  4058. // Also, using (macro) tasks in event handler would cause some weird behaviors
  4059. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  4060. // So we now use microtasks everywhere, again.
  4061. // A major drawback of this tradeoff is that there are some scenarios
  4062. // where microtasks have too high a priority and fire in between supposedly
  4063. // sequential events (e.g. #4521, #6690, which have workarounds)
  4064. // or even between bubbling of the same event (#6566).
  4065. var timerFunc;
  4066. // The nextTick behavior leverages the microtask queue, which can be accessed
  4067. // via either native Promise.then or MutationObserver.
  4068. // MutationObserver has wider support, however it is seriously bugged in
  4069. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  4070. // completely stops working after triggering a few times... so, if native
  4071. // Promise is available, we will use it:
  4072. /* istanbul ignore next, $flow-disable-line */
  4073. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  4074. var p = Promise.resolve();
  4075. timerFunc = function () {
  4076. p.then(flushCallbacks);
  4077. // In problematic UIWebViews, Promise.then doesn't completely break, but
  4078. // it can get stuck in a weird state where callbacks are pushed into the
  4079. // microtask queue but the queue isn't being flushed, until the browser
  4080. // needs to do some other work, e.g. handle a timer. Therefore we can
  4081. // "force" the microtask queue to be flushed by adding an empty timer.
  4082. if (isIOS) { setTimeout(noop); }
  4083. };
  4084. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  4085. isNative(MutationObserver) ||
  4086. // PhantomJS and iOS 7.x
  4087. MutationObserver.toString() === '[object MutationObserverConstructor]'
  4088. )) {
  4089. // Use MutationObserver where native Promise is not available,
  4090. // e.g. PhantomJS, iOS7, Android 4.4
  4091. // (#6466 MutationObserver is unreliable in IE11)
  4092. var counter = 1;
  4093. var observer = new MutationObserver(flushCallbacks);
  4094. var textNode = document.createTextNode(String(counter));
  4095. observer.observe(textNode, {
  4096. characterData: true
  4097. });
  4098. timerFunc = function () {
  4099. counter = (counter + 1) % 2;
  4100. textNode.data = String(counter);
  4101. };
  4102. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  4103. // Fallback to setImmediate.
  4104. // Technically it leverages the (macro) task queue,
  4105. // but it is still a better choice than setTimeout.
  4106. timerFunc = function () {
  4107. setImmediate(flushCallbacks);
  4108. };
  4109. } else {
  4110. // Fallback to setTimeout.
  4111. timerFunc = function () {
  4112. setTimeout(flushCallbacks, 0);
  4113. };
  4114. }
  4115. function nextTick (cb, ctx) {
  4116. var _resolve;
  4117. callbacks.push(function () {
  4118. if (cb) {
  4119. try {
  4120. cb.call(ctx);
  4121. } catch (e) {
  4122. handleError(e, ctx, 'nextTick');
  4123. }
  4124. } else if (_resolve) {
  4125. _resolve(ctx);
  4126. }
  4127. });
  4128. if (!pending) {
  4129. pending = true;
  4130. timerFunc();
  4131. }
  4132. // $flow-disable-line
  4133. if (!cb && typeof Promise !== 'undefined') {
  4134. return new Promise(function (resolve) {
  4135. _resolve = resolve;
  4136. })
  4137. }
  4138. }
  4139. /* */
  4140. /* not type checking this file because flow doesn't play well with Proxy */
  4141. var initProxy;
  4142. if (true) {
  4143. var allowedGlobals = makeMap(
  4144. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  4145. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  4146. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  4147. 'require' // for Webpack/Browserify
  4148. );
  4149. var warnNonPresent = function (target, key) {
  4150. warn(
  4151. "Property or method \"" + key + "\" is not defined on the instance but " +
  4152. 'referenced during render. Make sure that this property is reactive, ' +
  4153. 'either in the data option, or for class-based components, by ' +
  4154. 'initializing the property. ' +
  4155. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  4156. target
  4157. );
  4158. };
  4159. var warnReservedPrefix = function (target, key) {
  4160. warn(
  4161. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  4162. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  4163. 'prevent conflicts with Vue internals. ' +
  4164. 'See: https://vuejs.org/v2/api/#data',
  4165. target
  4166. );
  4167. };
  4168. var hasProxy =
  4169. typeof Proxy !== 'undefined' && isNative(Proxy);
  4170. if (hasProxy) {
  4171. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  4172. config.keyCodes = new Proxy(config.keyCodes, {
  4173. set: function set (target, key, value) {
  4174. if (isBuiltInModifier(key)) {
  4175. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  4176. return false
  4177. } else {
  4178. target[key] = value;
  4179. return true
  4180. }
  4181. }
  4182. });
  4183. }
  4184. var hasHandler = {
  4185. has: function has (target, key) {
  4186. var has = key in target;
  4187. var isAllowed = allowedGlobals(key) ||
  4188. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  4189. if (!has && !isAllowed) {
  4190. if (key in target.$data) { warnReservedPrefix(target, key); }
  4191. else { warnNonPresent(target, key); }
  4192. }
  4193. return has || !isAllowed
  4194. }
  4195. };
  4196. var getHandler = {
  4197. get: function get (target, key) {
  4198. if (typeof key === 'string' && !(key in target)) {
  4199. if (key in target.$data) { warnReservedPrefix(target, key); }
  4200. else { warnNonPresent(target, key); }
  4201. }
  4202. return target[key]
  4203. }
  4204. };
  4205. initProxy = function initProxy (vm) {
  4206. if (hasProxy) {
  4207. // determine which proxy handler to use
  4208. var options = vm.$options;
  4209. var handlers = options.render && options.render._withStripped
  4210. ? getHandler
  4211. : hasHandler;
  4212. vm._renderProxy = new Proxy(vm, handlers);
  4213. } else {
  4214. vm._renderProxy = vm;
  4215. }
  4216. };
  4217. }
  4218. /* */
  4219. var seenObjects = new _Set();
  4220. /**
  4221. * Recursively traverse an object to evoke all converted
  4222. * getters, so that every nested property inside the object
  4223. * is collected as a "deep" dependency.
  4224. */
  4225. function traverse (val) {
  4226. _traverse(val, seenObjects);
  4227. seenObjects.clear();
  4228. }
  4229. function _traverse (val, seen) {
  4230. var i, keys;
  4231. var isA = Array.isArray(val);
  4232. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  4233. return
  4234. }
  4235. if (val.__ob__) {
  4236. var depId = val.__ob__.dep.id;
  4237. if (seen.has(depId)) {
  4238. return
  4239. }
  4240. seen.add(depId);
  4241. }
  4242. if (isA) {
  4243. i = val.length;
  4244. while (i--) { _traverse(val[i], seen); }
  4245. } else {
  4246. keys = Object.keys(val);
  4247. i = keys.length;
  4248. while (i--) { _traverse(val[keys[i]], seen); }
  4249. }
  4250. }
  4251. var mark;
  4252. var measure;
  4253. if (true) {
  4254. var perf = inBrowser && window.performance;
  4255. /* istanbul ignore if */
  4256. if (
  4257. perf &&
  4258. perf.mark &&
  4259. perf.measure &&
  4260. perf.clearMarks &&
  4261. perf.clearMeasures
  4262. ) {
  4263. mark = function (tag) { return perf.mark(tag); };
  4264. measure = function (name, startTag, endTag) {
  4265. perf.measure(name, startTag, endTag);
  4266. perf.clearMarks(startTag);
  4267. perf.clearMarks(endTag);
  4268. // perf.clearMeasures(name)
  4269. };
  4270. }
  4271. }
  4272. /* */
  4273. var normalizeEvent = cached(function (name) {
  4274. var passive = name.charAt(0) === '&';
  4275. name = passive ? name.slice(1) : name;
  4276. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  4277. name = once$$1 ? name.slice(1) : name;
  4278. var capture = name.charAt(0) === '!';
  4279. name = capture ? name.slice(1) : name;
  4280. return {
  4281. name: name,
  4282. once: once$$1,
  4283. capture: capture,
  4284. passive: passive
  4285. }
  4286. });
  4287. function createFnInvoker (fns, vm) {
  4288. function invoker () {
  4289. var arguments$1 = arguments;
  4290. var fns = invoker.fns;
  4291. if (Array.isArray(fns)) {
  4292. var cloned = fns.slice();
  4293. for (var i = 0; i < cloned.length; i++) {
  4294. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  4295. }
  4296. } else {
  4297. // return handler return value for single handlers
  4298. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  4299. }
  4300. }
  4301. invoker.fns = fns;
  4302. return invoker
  4303. }
  4304. function updateListeners (
  4305. on,
  4306. oldOn,
  4307. add,
  4308. remove$$1,
  4309. createOnceHandler,
  4310. vm
  4311. ) {
  4312. var name, def$$1, cur, old, event;
  4313. for (name in on) {
  4314. def$$1 = cur = on[name];
  4315. old = oldOn[name];
  4316. event = normalizeEvent(name);
  4317. if (isUndef(cur)) {
  4318. true && warn(
  4319. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  4320. vm
  4321. );
  4322. } else if (isUndef(old)) {
  4323. if (isUndef(cur.fns)) {
  4324. cur = on[name] = createFnInvoker(cur, vm);
  4325. }
  4326. if (isTrue(event.once)) {
  4327. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  4328. }
  4329. add(event.name, cur, event.capture, event.passive, event.params);
  4330. } else if (cur !== old) {
  4331. old.fns = cur;
  4332. on[name] = old;
  4333. }
  4334. }
  4335. for (name in oldOn) {
  4336. if (isUndef(on[name])) {
  4337. event = normalizeEvent(name);
  4338. remove$$1(event.name, oldOn[name], event.capture);
  4339. }
  4340. }
  4341. }
  4342. /* */
  4343. /* */
  4344. // fixed by xxxxxx (mp properties)
  4345. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  4346. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  4347. if (isUndef(propOptions)) {
  4348. return res
  4349. }
  4350. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  4351. var attrs = data.attrs;
  4352. var props = data.props;
  4353. if (isDef(attrs) || isDef(props)) {
  4354. for (var key in propOptions) {
  4355. var altKey = hyphenate(key);
  4356. var result = checkProp(res, props, key, altKey, true) ||
  4357. checkProp(res, attrs, key, altKey, false);
  4358. // externalClass
  4359. if (
  4360. result &&
  4361. res[key] &&
  4362. externalClasses.indexOf(altKey) !== -1 &&
  4363. context[camelize(res[key])]
  4364. ) {
  4365. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  4366. res[key] = context[camelize(res[key])];
  4367. }
  4368. }
  4369. }
  4370. return res
  4371. }
  4372. function extractPropsFromVNodeData (
  4373. data,
  4374. Ctor,
  4375. tag,
  4376. context// fixed by xxxxxx
  4377. ) {
  4378. // we are only extracting raw values here.
  4379. // validation and default values are handled in the child
  4380. // component itself.
  4381. var propOptions = Ctor.options.props;
  4382. if (isUndef(propOptions)) {
  4383. // fixed by xxxxxx
  4384. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  4385. }
  4386. var res = {};
  4387. var attrs = data.attrs;
  4388. var props = data.props;
  4389. if (isDef(attrs) || isDef(props)) {
  4390. for (var key in propOptions) {
  4391. var altKey = hyphenate(key);
  4392. if (true) {
  4393. var keyInLowerCase = key.toLowerCase();
  4394. if (
  4395. key !== keyInLowerCase &&
  4396. attrs && hasOwn(attrs, keyInLowerCase)
  4397. ) {
  4398. tip(
  4399. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  4400. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  4401. " \"" + key + "\". " +
  4402. "Note that HTML attributes are case-insensitive and camelCased " +
  4403. "props need to use their kebab-case equivalents when using in-DOM " +
  4404. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  4405. );
  4406. }
  4407. }
  4408. checkProp(res, props, key, altKey, true) ||
  4409. checkProp(res, attrs, key, altKey, false);
  4410. }
  4411. }
  4412. // fixed by xxxxxx
  4413. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  4414. }
  4415. function checkProp (
  4416. res,
  4417. hash,
  4418. key,
  4419. altKey,
  4420. preserve
  4421. ) {
  4422. if (isDef(hash)) {
  4423. if (hasOwn(hash, key)) {
  4424. res[key] = hash[key];
  4425. if (!preserve) {
  4426. delete hash[key];
  4427. }
  4428. return true
  4429. } else if (hasOwn(hash, altKey)) {
  4430. res[key] = hash[altKey];
  4431. if (!preserve) {
  4432. delete hash[altKey];
  4433. }
  4434. return true
  4435. }
  4436. }
  4437. return false
  4438. }
  4439. /* */
  4440. // The template compiler attempts to minimize the need for normalization by
  4441. // statically analyzing the template at compile time.
  4442. //
  4443. // For plain HTML markup, normalization can be completely skipped because the
  4444. // generated render function is guaranteed to return Array<VNode>. There are
  4445. // two cases where extra normalization is needed:
  4446. // 1. When the children contains components - because a functional component
  4447. // may return an Array instead of a single root. In this case, just a simple
  4448. // normalization is needed - if any child is an Array, we flatten the whole
  4449. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  4450. // because functional components already normalize their own children.
  4451. function simpleNormalizeChildren (children) {
  4452. for (var i = 0; i < children.length; i++) {
  4453. if (Array.isArray(children[i])) {
  4454. return Array.prototype.concat.apply([], children)
  4455. }
  4456. }
  4457. return children
  4458. }
  4459. // 2. When the children contains constructs that always generated nested Arrays,
  4460. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  4461. // with hand-written render functions / JSX. In such cases a full normalization
  4462. // is needed to cater to all possible types of children values.
  4463. function normalizeChildren (children) {
  4464. return isPrimitive(children)
  4465. ? [createTextVNode(children)]
  4466. : Array.isArray(children)
  4467. ? normalizeArrayChildren(children)
  4468. : undefined
  4469. }
  4470. function isTextNode (node) {
  4471. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  4472. }
  4473. function normalizeArrayChildren (children, nestedIndex) {
  4474. var res = [];
  4475. var i, c, lastIndex, last;
  4476. for (i = 0; i < children.length; i++) {
  4477. c = children[i];
  4478. if (isUndef(c) || typeof c === 'boolean') { continue }
  4479. lastIndex = res.length - 1;
  4480. last = res[lastIndex];
  4481. // nested
  4482. if (Array.isArray(c)) {
  4483. if (c.length > 0) {
  4484. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  4485. // merge adjacent text nodes
  4486. if (isTextNode(c[0]) && isTextNode(last)) {
  4487. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  4488. c.shift();
  4489. }
  4490. res.push.apply(res, c);
  4491. }
  4492. } else if (isPrimitive(c)) {
  4493. if (isTextNode(last)) {
  4494. // merge adjacent text nodes
  4495. // this is necessary for SSR hydration because text nodes are
  4496. // essentially merged when rendered to HTML strings
  4497. res[lastIndex] = createTextVNode(last.text + c);
  4498. } else if (c !== '') {
  4499. // convert primitive to vnode
  4500. res.push(createTextVNode(c));
  4501. }
  4502. } else {
  4503. if (isTextNode(c) && isTextNode(last)) {
  4504. // merge adjacent text nodes
  4505. res[lastIndex] = createTextVNode(last.text + c.text);
  4506. } else {
  4507. // default key for nested array children (likely generated by v-for)
  4508. if (isTrue(children._isVList) &&
  4509. isDef(c.tag) &&
  4510. isUndef(c.key) &&
  4511. isDef(nestedIndex)) {
  4512. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  4513. }
  4514. res.push(c);
  4515. }
  4516. }
  4517. }
  4518. return res
  4519. }
  4520. /* */
  4521. function initProvide (vm) {
  4522. var provide = vm.$options.provide;
  4523. if (provide) {
  4524. vm._provided = typeof provide === 'function'
  4525. ? provide.call(vm)
  4526. : provide;
  4527. }
  4528. }
  4529. function initInjections (vm) {
  4530. var result = resolveInject(vm.$options.inject, vm);
  4531. if (result) {
  4532. toggleObserving(false);
  4533. Object.keys(result).forEach(function (key) {
  4534. /* istanbul ignore else */
  4535. if (true) {
  4536. defineReactive$$1(vm, key, result[key], function () {
  4537. warn(
  4538. "Avoid mutating an injected value directly since the changes will be " +
  4539. "overwritten whenever the provided component re-renders. " +
  4540. "injection being mutated: \"" + key + "\"",
  4541. vm
  4542. );
  4543. });
  4544. } else {}
  4545. });
  4546. toggleObserving(true);
  4547. }
  4548. }
  4549. function resolveInject (inject, vm) {
  4550. if (inject) {
  4551. // inject is :any because flow is not smart enough to figure out cached
  4552. var result = Object.create(null);
  4553. var keys = hasSymbol
  4554. ? Reflect.ownKeys(inject)
  4555. : Object.keys(inject);
  4556. for (var i = 0; i < keys.length; i++) {
  4557. var key = keys[i];
  4558. // #6574 in case the inject object is observed...
  4559. if (key === '__ob__') { continue }
  4560. var provideKey = inject[key].from;
  4561. var source = vm;
  4562. while (source) {
  4563. if (source._provided && hasOwn(source._provided, provideKey)) {
  4564. result[key] = source._provided[provideKey];
  4565. break
  4566. }
  4567. source = source.$parent;
  4568. }
  4569. if (!source) {
  4570. if ('default' in inject[key]) {
  4571. var provideDefault = inject[key].default;
  4572. result[key] = typeof provideDefault === 'function'
  4573. ? provideDefault.call(vm)
  4574. : provideDefault;
  4575. } else if (true) {
  4576. warn(("Injection \"" + key + "\" not found"), vm);
  4577. }
  4578. }
  4579. }
  4580. return result
  4581. }
  4582. }
  4583. /* */
  4584. /**
  4585. * Runtime helper for resolving raw children VNodes into a slot object.
  4586. */
  4587. function resolveSlots (
  4588. children,
  4589. context
  4590. ) {
  4591. if (!children || !children.length) {
  4592. return {}
  4593. }
  4594. var slots = {};
  4595. for (var i = 0, l = children.length; i < l; i++) {
  4596. var child = children[i];
  4597. var data = child.data;
  4598. // remove slot attribute if the node is resolved as a Vue slot node
  4599. if (data && data.attrs && data.attrs.slot) {
  4600. delete data.attrs.slot;
  4601. }
  4602. // named slots should only be respected if the vnode was rendered in the
  4603. // same context.
  4604. if ((child.context === context || child.fnContext === context) &&
  4605. data && data.slot != null
  4606. ) {
  4607. var name = data.slot;
  4608. var slot = (slots[name] || (slots[name] = []));
  4609. if (child.tag === 'template') {
  4610. slot.push.apply(slot, child.children || []);
  4611. } else {
  4612. slot.push(child);
  4613. }
  4614. } else {
  4615. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  4616. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  4617. (slots['page'] || (slots['page'] = [])).push(child);
  4618. }else{
  4619. (slots.default || (slots.default = [])).push(child);
  4620. }
  4621. }
  4622. }
  4623. // ignore slots that contains only whitespace
  4624. for (var name$1 in slots) {
  4625. if (slots[name$1].every(isWhitespace)) {
  4626. delete slots[name$1];
  4627. }
  4628. }
  4629. return slots
  4630. }
  4631. function isWhitespace (node) {
  4632. return (node.isComment && !node.asyncFactory) || node.text === ' '
  4633. }
  4634. /* */
  4635. function normalizeScopedSlots (
  4636. slots,
  4637. normalSlots,
  4638. prevSlots
  4639. ) {
  4640. var res;
  4641. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  4642. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  4643. var key = slots && slots.$key;
  4644. if (!slots) {
  4645. res = {};
  4646. } else if (slots._normalized) {
  4647. // fast path 1: child component re-render only, parent did not change
  4648. return slots._normalized
  4649. } else if (
  4650. isStable &&
  4651. prevSlots &&
  4652. prevSlots !== emptyObject &&
  4653. key === prevSlots.$key &&
  4654. !hasNormalSlots &&
  4655. !prevSlots.$hasNormal
  4656. ) {
  4657. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  4658. // only need to normalize once
  4659. return prevSlots
  4660. } else {
  4661. res = {};
  4662. for (var key$1 in slots) {
  4663. if (slots[key$1] && key$1[0] !== '$') {
  4664. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  4665. }
  4666. }
  4667. }
  4668. // expose normal slots on scopedSlots
  4669. for (var key$2 in normalSlots) {
  4670. if (!(key$2 in res)) {
  4671. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  4672. }
  4673. }
  4674. // avoriaz seems to mock a non-extensible $scopedSlots object
  4675. // and when that is passed down this would cause an error
  4676. if (slots && Object.isExtensible(slots)) {
  4677. (slots)._normalized = res;
  4678. }
  4679. def(res, '$stable', isStable);
  4680. def(res, '$key', key);
  4681. def(res, '$hasNormal', hasNormalSlots);
  4682. return res
  4683. }
  4684. function normalizeScopedSlot(normalSlots, key, fn) {
  4685. var normalized = function () {
  4686. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  4687. res = res && typeof res === 'object' && !Array.isArray(res)
  4688. ? [res] // single vnode
  4689. : normalizeChildren(res);
  4690. return res && (
  4691. res.length === 0 ||
  4692. (res.length === 1 && res[0].isComment) // #9658
  4693. ) ? undefined
  4694. : res
  4695. };
  4696. // this is a slot using the new v-slot syntax without scope. although it is
  4697. // compiled as a scoped slot, render fn users would expect it to be present
  4698. // on this.$slots because the usage is semantically a normal slot.
  4699. if (fn.proxy) {
  4700. Object.defineProperty(normalSlots, key, {
  4701. get: normalized,
  4702. enumerable: true,
  4703. configurable: true
  4704. });
  4705. }
  4706. return normalized
  4707. }
  4708. function proxyNormalSlot(slots, key) {
  4709. return function () { return slots[key]; }
  4710. }
  4711. /* */
  4712. /**
  4713. * Runtime helper for rendering v-for lists.
  4714. */
  4715. function renderList (
  4716. val,
  4717. render
  4718. ) {
  4719. var ret, i, l, keys, key;
  4720. if (Array.isArray(val) || typeof val === 'string') {
  4721. ret = new Array(val.length);
  4722. for (i = 0, l = val.length; i < l; i++) {
  4723. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  4724. }
  4725. } else if (typeof val === 'number') {
  4726. ret = new Array(val);
  4727. for (i = 0; i < val; i++) {
  4728. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  4729. }
  4730. } else if (isObject(val)) {
  4731. if (hasSymbol && val[Symbol.iterator]) {
  4732. ret = [];
  4733. var iterator = val[Symbol.iterator]();
  4734. var result = iterator.next();
  4735. while (!result.done) {
  4736. ret.push(render(result.value, ret.length, i++, i)); // fixed by xxxxxx
  4737. result = iterator.next();
  4738. }
  4739. } else {
  4740. keys = Object.keys(val);
  4741. ret = new Array(keys.length);
  4742. for (i = 0, l = keys.length; i < l; i++) {
  4743. key = keys[i];
  4744. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  4745. }
  4746. }
  4747. }
  4748. if (!isDef(ret)) {
  4749. ret = [];
  4750. }
  4751. (ret)._isVList = true;
  4752. return ret
  4753. }
  4754. /* */
  4755. /**
  4756. * Runtime helper for rendering <slot>
  4757. */
  4758. function renderSlot (
  4759. name,
  4760. fallback,
  4761. props,
  4762. bindObject
  4763. ) {
  4764. var scopedSlotFn = this.$scopedSlots[name];
  4765. var nodes;
  4766. if (scopedSlotFn) { // scoped slot
  4767. props = props || {};
  4768. if (bindObject) {
  4769. if ( true && !isObject(bindObject)) {
  4770. warn(
  4771. 'slot v-bind without argument expects an Object',
  4772. this
  4773. );
  4774. }
  4775. props = extend(extend({}, bindObject), props);
  4776. }
  4777. // fixed by xxxxxx app-plus scopedSlot
  4778. nodes = scopedSlotFn(props, this, props._i) || fallback;
  4779. } else {
  4780. nodes = this.$slots[name] || fallback;
  4781. }
  4782. var target = props && props.slot;
  4783. if (target) {
  4784. return this.$createElement('template', { slot: target }, nodes)
  4785. } else {
  4786. return nodes
  4787. }
  4788. }
  4789. /* */
  4790. /**
  4791. * Runtime helper for resolving filters
  4792. */
  4793. function resolveFilter (id) {
  4794. return resolveAsset(this.$options, 'filters', id, true) || identity
  4795. }
  4796. /* */
  4797. function isKeyNotMatch (expect, actual) {
  4798. if (Array.isArray(expect)) {
  4799. return expect.indexOf(actual) === -1
  4800. } else {
  4801. return expect !== actual
  4802. }
  4803. }
  4804. /**
  4805. * Runtime helper for checking keyCodes from config.
  4806. * exposed as Vue.prototype._k
  4807. * passing in eventKeyName as last argument separately for backwards compat
  4808. */
  4809. function checkKeyCodes (
  4810. eventKeyCode,
  4811. key,
  4812. builtInKeyCode,
  4813. eventKeyName,
  4814. builtInKeyName
  4815. ) {
  4816. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  4817. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  4818. return isKeyNotMatch(builtInKeyName, eventKeyName)
  4819. } else if (mappedKeyCode) {
  4820. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  4821. } else if (eventKeyName) {
  4822. return hyphenate(eventKeyName) !== key
  4823. }
  4824. }
  4825. /* */
  4826. /**
  4827. * Runtime helper for merging v-bind="object" into a VNode's data.
  4828. */
  4829. function bindObjectProps (
  4830. data,
  4831. tag,
  4832. value,
  4833. asProp,
  4834. isSync
  4835. ) {
  4836. if (value) {
  4837. if (!isObject(value)) {
  4838. true && warn(
  4839. 'v-bind without argument expects an Object or Array value',
  4840. this
  4841. );
  4842. } else {
  4843. if (Array.isArray(value)) {
  4844. value = toObject(value);
  4845. }
  4846. var hash;
  4847. var loop = function ( key ) {
  4848. if (
  4849. key === 'class' ||
  4850. key === 'style' ||
  4851. isReservedAttribute(key)
  4852. ) {
  4853. hash = data;
  4854. } else {
  4855. var type = data.attrs && data.attrs.type;
  4856. hash = asProp || config.mustUseProp(tag, type, key)
  4857. ? data.domProps || (data.domProps = {})
  4858. : data.attrs || (data.attrs = {});
  4859. }
  4860. var camelizedKey = camelize(key);
  4861. var hyphenatedKey = hyphenate(key);
  4862. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  4863. hash[key] = value[key];
  4864. if (isSync) {
  4865. var on = data.on || (data.on = {});
  4866. on[("update:" + key)] = function ($event) {
  4867. value[key] = $event;
  4868. };
  4869. }
  4870. }
  4871. };
  4872. for (var key in value) loop( key );
  4873. }
  4874. }
  4875. return data
  4876. }
  4877. /* */
  4878. /**
  4879. * Runtime helper for rendering static trees.
  4880. */
  4881. function renderStatic (
  4882. index,
  4883. isInFor
  4884. ) {
  4885. var cached = this._staticTrees || (this._staticTrees = []);
  4886. var tree = cached[index];
  4887. // if has already-rendered static tree and not inside v-for,
  4888. // we can reuse the same tree.
  4889. if (tree && !isInFor) {
  4890. return tree
  4891. }
  4892. // otherwise, render a fresh tree.
  4893. tree = cached[index] = this.$options.staticRenderFns[index].call(
  4894. this._renderProxy,
  4895. null,
  4896. this // for render fns generated for functional component templates
  4897. );
  4898. markStatic(tree, ("__static__" + index), false);
  4899. return tree
  4900. }
  4901. /**
  4902. * Runtime helper for v-once.
  4903. * Effectively it means marking the node as static with a unique key.
  4904. */
  4905. function markOnce (
  4906. tree,
  4907. index,
  4908. key
  4909. ) {
  4910. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  4911. return tree
  4912. }
  4913. function markStatic (
  4914. tree,
  4915. key,
  4916. isOnce
  4917. ) {
  4918. if (Array.isArray(tree)) {
  4919. for (var i = 0; i < tree.length; i++) {
  4920. if (tree[i] && typeof tree[i] !== 'string') {
  4921. markStaticNode(tree[i], (key + "_" + i), isOnce);
  4922. }
  4923. }
  4924. } else {
  4925. markStaticNode(tree, key, isOnce);
  4926. }
  4927. }
  4928. function markStaticNode (node, key, isOnce) {
  4929. node.isStatic = true;
  4930. node.key = key;
  4931. node.isOnce = isOnce;
  4932. }
  4933. /* */
  4934. function bindObjectListeners (data, value) {
  4935. if (value) {
  4936. if (!isPlainObject(value)) {
  4937. true && warn(
  4938. 'v-on without argument expects an Object value',
  4939. this
  4940. );
  4941. } else {
  4942. var on = data.on = data.on ? extend({}, data.on) : {};
  4943. for (var key in value) {
  4944. var existing = on[key];
  4945. var ours = value[key];
  4946. on[key] = existing ? [].concat(existing, ours) : ours;
  4947. }
  4948. }
  4949. }
  4950. return data
  4951. }
  4952. /* */
  4953. function resolveScopedSlots (
  4954. fns, // see flow/vnode
  4955. res,
  4956. // the following are added in 2.6
  4957. hasDynamicKeys,
  4958. contentHashKey
  4959. ) {
  4960. res = res || { $stable: !hasDynamicKeys };
  4961. for (var i = 0; i < fns.length; i++) {
  4962. var slot = fns[i];
  4963. if (Array.isArray(slot)) {
  4964. resolveScopedSlots(slot, res, hasDynamicKeys);
  4965. } else if (slot) {
  4966. // marker for reverse proxying v-slot without scope on this.$slots
  4967. if (slot.proxy) {
  4968. slot.fn.proxy = true;
  4969. }
  4970. res[slot.key] = slot.fn;
  4971. }
  4972. }
  4973. if (contentHashKey) {
  4974. (res).$key = contentHashKey;
  4975. }
  4976. return res
  4977. }
  4978. /* */
  4979. function bindDynamicKeys (baseObj, values) {
  4980. for (var i = 0; i < values.length; i += 2) {
  4981. var key = values[i];
  4982. if (typeof key === 'string' && key) {
  4983. baseObj[values[i]] = values[i + 1];
  4984. } else if ( true && key !== '' && key !== null) {
  4985. // null is a special value for explicitly removing a binding
  4986. warn(
  4987. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  4988. this
  4989. );
  4990. }
  4991. }
  4992. return baseObj
  4993. }
  4994. // helper to dynamically append modifier runtime markers to event names.
  4995. // ensure only append when value is already string, otherwise it will be cast
  4996. // to string and cause the type check to miss.
  4997. function prependModifier (value, symbol) {
  4998. return typeof value === 'string' ? symbol + value : value
  4999. }
  5000. /* */
  5001. function installRenderHelpers (target) {
  5002. target._o = markOnce;
  5003. target._n = toNumber;
  5004. target._s = toString;
  5005. target._l = renderList;
  5006. target._t = renderSlot;
  5007. target._q = looseEqual;
  5008. target._i = looseIndexOf;
  5009. target._m = renderStatic;
  5010. target._f = resolveFilter;
  5011. target._k = checkKeyCodes;
  5012. target._b = bindObjectProps;
  5013. target._v = createTextVNode;
  5014. target._e = createEmptyVNode;
  5015. target._u = resolveScopedSlots;
  5016. target._g = bindObjectListeners;
  5017. target._d = bindDynamicKeys;
  5018. target._p = prependModifier;
  5019. }
  5020. /* */
  5021. function FunctionalRenderContext (
  5022. data,
  5023. props,
  5024. children,
  5025. parent,
  5026. Ctor
  5027. ) {
  5028. var this$1 = this;
  5029. var options = Ctor.options;
  5030. // ensure the createElement function in functional components
  5031. // gets a unique context - this is necessary for correct named slot check
  5032. var contextVm;
  5033. if (hasOwn(parent, '_uid')) {
  5034. contextVm = Object.create(parent);
  5035. // $flow-disable-line
  5036. contextVm._original = parent;
  5037. } else {
  5038. // the context vm passed in is a functional context as well.
  5039. // in this case we want to make sure we are able to get a hold to the
  5040. // real context instance.
  5041. contextVm = parent;
  5042. // $flow-disable-line
  5043. parent = parent._original;
  5044. }
  5045. var isCompiled = isTrue(options._compiled);
  5046. var needNormalization = !isCompiled;
  5047. this.data = data;
  5048. this.props = props;
  5049. this.children = children;
  5050. this.parent = parent;
  5051. this.listeners = data.on || emptyObject;
  5052. this.injections = resolveInject(options.inject, parent);
  5053. this.slots = function () {
  5054. if (!this$1.$slots) {
  5055. normalizeScopedSlots(
  5056. data.scopedSlots,
  5057. this$1.$slots = resolveSlots(children, parent)
  5058. );
  5059. }
  5060. return this$1.$slots
  5061. };
  5062. Object.defineProperty(this, 'scopedSlots', ({
  5063. enumerable: true,
  5064. get: function get () {
  5065. return normalizeScopedSlots(data.scopedSlots, this.slots())
  5066. }
  5067. }));
  5068. // support for compiled functional template
  5069. if (isCompiled) {
  5070. // exposing $options for renderStatic()
  5071. this.$options = options;
  5072. // pre-resolve slots for renderSlot()
  5073. this.$slots = this.slots();
  5074. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  5075. }
  5076. if (options._scopeId) {
  5077. this._c = function (a, b, c, d) {
  5078. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  5079. if (vnode && !Array.isArray(vnode)) {
  5080. vnode.fnScopeId = options._scopeId;
  5081. vnode.fnContext = parent;
  5082. }
  5083. return vnode
  5084. };
  5085. } else {
  5086. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  5087. }
  5088. }
  5089. installRenderHelpers(FunctionalRenderContext.prototype);
  5090. function createFunctionalComponent (
  5091. Ctor,
  5092. propsData,
  5093. data,
  5094. contextVm,
  5095. children
  5096. ) {
  5097. var options = Ctor.options;
  5098. var props = {};
  5099. var propOptions = options.props;
  5100. if (isDef(propOptions)) {
  5101. for (var key in propOptions) {
  5102. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  5103. }
  5104. } else {
  5105. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  5106. if (isDef(data.props)) { mergeProps(props, data.props); }
  5107. }
  5108. var renderContext = new FunctionalRenderContext(
  5109. data,
  5110. props,
  5111. children,
  5112. contextVm,
  5113. Ctor
  5114. );
  5115. var vnode = options.render.call(null, renderContext._c, renderContext);
  5116. if (vnode instanceof VNode) {
  5117. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  5118. } else if (Array.isArray(vnode)) {
  5119. var vnodes = normalizeChildren(vnode) || [];
  5120. var res = new Array(vnodes.length);
  5121. for (var i = 0; i < vnodes.length; i++) {
  5122. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  5123. }
  5124. return res
  5125. }
  5126. }
  5127. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  5128. // #7817 clone node before setting fnContext, otherwise if the node is reused
  5129. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  5130. // that should not be matched to match.
  5131. var clone = cloneVNode(vnode);
  5132. clone.fnContext = contextVm;
  5133. clone.fnOptions = options;
  5134. if (true) {
  5135. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  5136. }
  5137. if (data.slot) {
  5138. (clone.data || (clone.data = {})).slot = data.slot;
  5139. }
  5140. return clone
  5141. }
  5142. function mergeProps (to, from) {
  5143. for (var key in from) {
  5144. to[camelize(key)] = from[key];
  5145. }
  5146. }
  5147. /* */
  5148. /* */
  5149. /* */
  5150. /* */
  5151. // inline hooks to be invoked on component VNodes during patch
  5152. var componentVNodeHooks = {
  5153. init: function init (vnode, hydrating) {
  5154. if (
  5155. vnode.componentInstance &&
  5156. !vnode.componentInstance._isDestroyed &&
  5157. vnode.data.keepAlive
  5158. ) {
  5159. // kept-alive components, treat as a patch
  5160. var mountedNode = vnode; // work around flow
  5161. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  5162. } else {
  5163. var child = vnode.componentInstance = createComponentInstanceForVnode(
  5164. vnode,
  5165. activeInstance
  5166. );
  5167. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  5168. }
  5169. },
  5170. prepatch: function prepatch (oldVnode, vnode) {
  5171. var options = vnode.componentOptions;
  5172. var child = vnode.componentInstance = oldVnode.componentInstance;
  5173. updateChildComponent(
  5174. child,
  5175. options.propsData, // updated props
  5176. options.listeners, // updated listeners
  5177. vnode, // new parent vnode
  5178. options.children // new children
  5179. );
  5180. },
  5181. insert: function insert (vnode) {
  5182. var context = vnode.context;
  5183. var componentInstance = vnode.componentInstance;
  5184. if (!componentInstance._isMounted) {
  5185. callHook(componentInstance, 'onServiceCreated');
  5186. callHook(componentInstance, 'onServiceAttached');
  5187. componentInstance._isMounted = true;
  5188. callHook(componentInstance, 'mounted');
  5189. }
  5190. if (vnode.data.keepAlive) {
  5191. if (context._isMounted) {
  5192. // vue-router#1212
  5193. // During updates, a kept-alive component's child components may
  5194. // change, so directly walking the tree here may call activated hooks
  5195. // on incorrect children. Instead we push them into a queue which will
  5196. // be processed after the whole patch process ended.
  5197. queueActivatedComponent(componentInstance);
  5198. } else {
  5199. activateChildComponent(componentInstance, true /* direct */);
  5200. }
  5201. }
  5202. },
  5203. destroy: function destroy (vnode) {
  5204. var componentInstance = vnode.componentInstance;
  5205. if (!componentInstance._isDestroyed) {
  5206. if (!vnode.data.keepAlive) {
  5207. componentInstance.$destroy();
  5208. } else {
  5209. deactivateChildComponent(componentInstance, true /* direct */);
  5210. }
  5211. }
  5212. }
  5213. };
  5214. var hooksToMerge = Object.keys(componentVNodeHooks);
  5215. function createComponent (
  5216. Ctor,
  5217. data,
  5218. context,
  5219. children,
  5220. tag
  5221. ) {
  5222. if (isUndef(Ctor)) {
  5223. return
  5224. }
  5225. var baseCtor = context.$options._base;
  5226. // plain options object: turn it into a constructor
  5227. if (isObject(Ctor)) {
  5228. Ctor = baseCtor.extend(Ctor);
  5229. }
  5230. // if at this stage it's not a constructor or an async component factory,
  5231. // reject.
  5232. if (typeof Ctor !== 'function') {
  5233. if (true) {
  5234. warn(("Invalid Component definition: " + (String(Ctor))), context);
  5235. }
  5236. return
  5237. }
  5238. // async component
  5239. var asyncFactory;
  5240. if (isUndef(Ctor.cid)) {
  5241. asyncFactory = Ctor;
  5242. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  5243. if (Ctor === undefined) {
  5244. // return a placeholder node for async component, which is rendered
  5245. // as a comment node but preserves all the raw information for the node.
  5246. // the information will be used for async server-rendering and hydration.
  5247. return createAsyncPlaceholder(
  5248. asyncFactory,
  5249. data,
  5250. context,
  5251. children,
  5252. tag
  5253. )
  5254. }
  5255. }
  5256. data = data || {};
  5257. // resolve constructor options in case global mixins are applied after
  5258. // component constructor creation
  5259. resolveConstructorOptions(Ctor);
  5260. // transform component v-model data into props & events
  5261. if (isDef(data.model)) {
  5262. transformModel(Ctor.options, data);
  5263. }
  5264. // extract props
  5265. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  5266. // functional component
  5267. if (isTrue(Ctor.options.functional)) {
  5268. return createFunctionalComponent(Ctor, propsData, data, context, children)
  5269. }
  5270. // extract listeners, since these needs to be treated as
  5271. // child component listeners instead of DOM listeners
  5272. var listeners = data.on;
  5273. // replace with listeners with .native modifier
  5274. // so it gets processed during parent component patch.
  5275. data.on = data.nativeOn;
  5276. if (isTrue(Ctor.options.abstract)) {
  5277. // abstract components do not keep anything
  5278. // other than props & listeners & slot
  5279. // work around flow
  5280. var slot = data.slot;
  5281. data = {};
  5282. if (slot) {
  5283. data.slot = slot;
  5284. }
  5285. }
  5286. // install component management hooks onto the placeholder node
  5287. installComponentHooks(data);
  5288. // return a placeholder vnode
  5289. var name = Ctor.options.name || tag;
  5290. var vnode = new VNode(
  5291. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  5292. data, undefined, undefined, undefined, context,
  5293. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  5294. asyncFactory
  5295. );
  5296. return vnode
  5297. }
  5298. function createComponentInstanceForVnode (
  5299. vnode, // we know it's MountedComponentVNode but flow doesn't
  5300. parent // activeInstance in lifecycle state
  5301. ) {
  5302. var options = {
  5303. _isComponent: true,
  5304. _parentVnode: vnode,
  5305. parent: parent
  5306. };
  5307. // check inline-template render functions
  5308. var inlineTemplate = vnode.data.inlineTemplate;
  5309. if (isDef(inlineTemplate)) {
  5310. options.render = inlineTemplate.render;
  5311. options.staticRenderFns = inlineTemplate.staticRenderFns;
  5312. }
  5313. return new vnode.componentOptions.Ctor(options)
  5314. }
  5315. function installComponentHooks (data) {
  5316. var hooks = data.hook || (data.hook = {});
  5317. for (var i = 0; i < hooksToMerge.length; i++) {
  5318. var key = hooksToMerge[i];
  5319. var existing = hooks[key];
  5320. var toMerge = componentVNodeHooks[key];
  5321. if (existing !== toMerge && !(existing && existing._merged)) {
  5322. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  5323. }
  5324. }
  5325. }
  5326. function mergeHook$1 (f1, f2) {
  5327. var merged = function (a, b) {
  5328. // flow complains about extra args which is why we use any
  5329. f1(a, b);
  5330. f2(a, b);
  5331. };
  5332. merged._merged = true;
  5333. return merged
  5334. }
  5335. // transform component v-model info (value and callback) into
  5336. // prop and event handler respectively.
  5337. function transformModel (options, data) {
  5338. var prop = (options.model && options.model.prop) || 'value';
  5339. var event = (options.model && options.model.event) || 'input'
  5340. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  5341. var on = data.on || (data.on = {});
  5342. var existing = on[event];
  5343. var callback = data.model.callback;
  5344. if (isDef(existing)) {
  5345. if (
  5346. Array.isArray(existing)
  5347. ? existing.indexOf(callback) === -1
  5348. : existing !== callback
  5349. ) {
  5350. on[event] = [callback].concat(existing);
  5351. }
  5352. } else {
  5353. on[event] = callback;
  5354. }
  5355. }
  5356. /* */
  5357. var SIMPLE_NORMALIZE = 1;
  5358. var ALWAYS_NORMALIZE = 2;
  5359. // wrapper function for providing a more flexible interface
  5360. // without getting yelled at by flow
  5361. function createElement (
  5362. context,
  5363. tag,
  5364. data,
  5365. children,
  5366. normalizationType,
  5367. alwaysNormalize
  5368. ) {
  5369. if (Array.isArray(data) || isPrimitive(data)) {
  5370. normalizationType = children;
  5371. children = data;
  5372. data = undefined;
  5373. }
  5374. if (isTrue(alwaysNormalize)) {
  5375. normalizationType = ALWAYS_NORMALIZE;
  5376. }
  5377. return _createElement(context, tag, data, children, normalizationType)
  5378. }
  5379. function _createElement (
  5380. context,
  5381. tag,
  5382. data,
  5383. children,
  5384. normalizationType
  5385. ) {
  5386. if (isDef(data) && isDef((data).__ob__)) {
  5387. true && warn(
  5388. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  5389. 'Always create fresh vnode data objects in each render!',
  5390. context
  5391. );
  5392. return createEmptyVNode()
  5393. }
  5394. // object syntax in v-bind
  5395. if (isDef(data) && isDef(data.is)) {
  5396. tag = data.is;
  5397. }
  5398. if (!tag) {
  5399. // in case of component :is set to falsy value
  5400. return createEmptyVNode()
  5401. }
  5402. // warn against non-primitive key
  5403. if ( true &&
  5404. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  5405. ) {
  5406. {
  5407. warn(
  5408. 'Avoid using non-primitive value as key, ' +
  5409. 'use string/number value instead.',
  5410. context
  5411. );
  5412. }
  5413. }
  5414. // support single function children as default scoped slot
  5415. if (Array.isArray(children) &&
  5416. typeof children[0] === 'function'
  5417. ) {
  5418. data = data || {};
  5419. data.scopedSlots = { default: children[0] };
  5420. children.length = 0;
  5421. }
  5422. if (normalizationType === ALWAYS_NORMALIZE) {
  5423. children = normalizeChildren(children);
  5424. } else if (normalizationType === SIMPLE_NORMALIZE) {
  5425. children = simpleNormalizeChildren(children);
  5426. }
  5427. var vnode, ns;
  5428. if (typeof tag === 'string') {
  5429. var Ctor;
  5430. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  5431. if (config.isReservedTag(tag)) {
  5432. // platform built-in elements
  5433. if ( true && isDef(data) && isDef(data.nativeOn)) {
  5434. warn(
  5435. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  5436. context
  5437. );
  5438. }
  5439. vnode = new VNode(
  5440. config.parsePlatformTagName(tag), data, children,
  5441. undefined, undefined, context
  5442. );
  5443. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  5444. // component
  5445. vnode = createComponent(Ctor, data, context, children, tag);
  5446. } else {
  5447. // unknown or unlisted namespaced elements
  5448. // check at runtime because it may get assigned a namespace when its
  5449. // parent normalizes children
  5450. vnode = new VNode(
  5451. tag, data, children,
  5452. undefined, undefined, context
  5453. );
  5454. }
  5455. } else {
  5456. // direct component options / constructor
  5457. vnode = createComponent(tag, data, context, children);
  5458. }
  5459. if (Array.isArray(vnode)) {
  5460. return vnode
  5461. } else if (isDef(vnode)) {
  5462. if (isDef(ns)) { applyNS(vnode, ns); }
  5463. if (isDef(data)) { registerDeepBindings(data); }
  5464. return vnode
  5465. } else {
  5466. return createEmptyVNode()
  5467. }
  5468. }
  5469. function applyNS (vnode, ns, force) {
  5470. vnode.ns = ns;
  5471. if (vnode.tag === 'foreignObject') {
  5472. // use default namespace inside foreignObject
  5473. ns = undefined;
  5474. force = true;
  5475. }
  5476. if (isDef(vnode.children)) {
  5477. for (var i = 0, l = vnode.children.length; i < l; i++) {
  5478. var child = vnode.children[i];
  5479. if (isDef(child.tag) && (
  5480. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  5481. applyNS(child, ns, force);
  5482. }
  5483. }
  5484. }
  5485. }
  5486. // ref #5318
  5487. // necessary to ensure parent re-render when deep bindings like :style and
  5488. // :class are used on slot nodes
  5489. function registerDeepBindings (data) {
  5490. if (isObject(data.style)) {
  5491. traverse(data.style);
  5492. }
  5493. if (isObject(data.class)) {
  5494. traverse(data.class);
  5495. }
  5496. }
  5497. /* */
  5498. function initRender (vm) {
  5499. vm._vnode = null; // the root of the child tree
  5500. vm._staticTrees = null; // v-once cached trees
  5501. var options = vm.$options;
  5502. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  5503. var renderContext = parentVnode && parentVnode.context;
  5504. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  5505. vm.$scopedSlots = emptyObject;
  5506. // bind the createElement fn to this instance
  5507. // so that we get proper render context inside it.
  5508. // args order: tag, data, children, normalizationType, alwaysNormalize
  5509. // internal version is used by render functions compiled from templates
  5510. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  5511. // normalization is always applied for the public version, used in
  5512. // user-written render functions.
  5513. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  5514. // $attrs & $listeners are exposed for easier HOC creation.
  5515. // they need to be reactive so that HOCs using them are always updated
  5516. var parentData = parentVnode && parentVnode.data;
  5517. /* istanbul ignore else */
  5518. if (true) {
  5519. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  5520. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  5521. }, true);
  5522. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  5523. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  5524. }, true);
  5525. } else {}
  5526. }
  5527. var currentRenderingInstance = null;
  5528. function renderMixin (Vue) {
  5529. // install runtime convenience helpers
  5530. installRenderHelpers(Vue.prototype);
  5531. Vue.prototype.$nextTick = function (fn) {
  5532. return nextTick(fn, this)
  5533. };
  5534. Vue.prototype._render = function () {
  5535. var vm = this;
  5536. var ref = vm.$options;
  5537. var render = ref.render;
  5538. var _parentVnode = ref._parentVnode;
  5539. if (_parentVnode) {
  5540. vm.$scopedSlots = normalizeScopedSlots(
  5541. _parentVnode.data.scopedSlots,
  5542. vm.$slots,
  5543. vm.$scopedSlots
  5544. );
  5545. }
  5546. // set parent vnode. this allows render functions to have access
  5547. // to the data on the placeholder node.
  5548. vm.$vnode = _parentVnode;
  5549. // render self
  5550. var vnode;
  5551. try {
  5552. // There's no need to maintain a stack because all render fns are called
  5553. // separately from one another. Nested component's render fns are called
  5554. // when parent component is patched.
  5555. currentRenderingInstance = vm;
  5556. vnode = render.call(vm._renderProxy, vm.$createElement);
  5557. } catch (e) {
  5558. handleError(e, vm, "render");
  5559. // return error render result,
  5560. // or previous vnode to prevent render error causing blank component
  5561. /* istanbul ignore else */
  5562. if ( true && vm.$options.renderError) {
  5563. try {
  5564. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  5565. } catch (e) {
  5566. handleError(e, vm, "renderError");
  5567. vnode = vm._vnode;
  5568. }
  5569. } else {
  5570. vnode = vm._vnode;
  5571. }
  5572. } finally {
  5573. currentRenderingInstance = null;
  5574. }
  5575. // if the returned array contains only a single node, allow it
  5576. if (Array.isArray(vnode) && vnode.length === 1) {
  5577. vnode = vnode[0];
  5578. }
  5579. // return empty vnode in case the render function errored out
  5580. if (!(vnode instanceof VNode)) {
  5581. if ( true && Array.isArray(vnode)) {
  5582. warn(
  5583. 'Multiple root nodes returned from render function. Render function ' +
  5584. 'should return a single root node.',
  5585. vm
  5586. );
  5587. }
  5588. vnode = createEmptyVNode();
  5589. }
  5590. // set parent
  5591. vnode.parent = _parentVnode;
  5592. return vnode
  5593. };
  5594. }
  5595. /* */
  5596. function ensureCtor (comp, base) {
  5597. if (
  5598. comp.__esModule ||
  5599. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  5600. ) {
  5601. comp = comp.default;
  5602. }
  5603. return isObject(comp)
  5604. ? base.extend(comp)
  5605. : comp
  5606. }
  5607. function createAsyncPlaceholder (
  5608. factory,
  5609. data,
  5610. context,
  5611. children,
  5612. tag
  5613. ) {
  5614. var node = createEmptyVNode();
  5615. node.asyncFactory = factory;
  5616. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  5617. return node
  5618. }
  5619. function resolveAsyncComponent (
  5620. factory,
  5621. baseCtor
  5622. ) {
  5623. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  5624. return factory.errorComp
  5625. }
  5626. if (isDef(factory.resolved)) {
  5627. return factory.resolved
  5628. }
  5629. var owner = currentRenderingInstance;
  5630. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  5631. // already pending
  5632. factory.owners.push(owner);
  5633. }
  5634. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  5635. return factory.loadingComp
  5636. }
  5637. if (owner && !isDef(factory.owners)) {
  5638. var owners = factory.owners = [owner];
  5639. var sync = true;
  5640. var timerLoading = null;
  5641. var timerTimeout = null
  5642. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  5643. var forceRender = function (renderCompleted) {
  5644. for (var i = 0, l = owners.length; i < l; i++) {
  5645. (owners[i]).$forceUpdate();
  5646. }
  5647. if (renderCompleted) {
  5648. owners.length = 0;
  5649. if (timerLoading !== null) {
  5650. clearTimeout(timerLoading);
  5651. timerLoading = null;
  5652. }
  5653. if (timerTimeout !== null) {
  5654. clearTimeout(timerTimeout);
  5655. timerTimeout = null;
  5656. }
  5657. }
  5658. };
  5659. var resolve = once(function (res) {
  5660. // cache resolved
  5661. factory.resolved = ensureCtor(res, baseCtor);
  5662. // invoke callbacks only if this is not a synchronous resolve
  5663. // (async resolves are shimmed as synchronous during SSR)
  5664. if (!sync) {
  5665. forceRender(true);
  5666. } else {
  5667. owners.length = 0;
  5668. }
  5669. });
  5670. var reject = once(function (reason) {
  5671. true && warn(
  5672. "Failed to resolve async component: " + (String(factory)) +
  5673. (reason ? ("\nReason: " + reason) : '')
  5674. );
  5675. if (isDef(factory.errorComp)) {
  5676. factory.error = true;
  5677. forceRender(true);
  5678. }
  5679. });
  5680. var res = factory(resolve, reject);
  5681. if (isObject(res)) {
  5682. if (isPromise(res)) {
  5683. // () => Promise
  5684. if (isUndef(factory.resolved)) {
  5685. res.then(resolve, reject);
  5686. }
  5687. } else if (isPromise(res.component)) {
  5688. res.component.then(resolve, reject);
  5689. if (isDef(res.error)) {
  5690. factory.errorComp = ensureCtor(res.error, baseCtor);
  5691. }
  5692. if (isDef(res.loading)) {
  5693. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  5694. if (res.delay === 0) {
  5695. factory.loading = true;
  5696. } else {
  5697. timerLoading = setTimeout(function () {
  5698. timerLoading = null;
  5699. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  5700. factory.loading = true;
  5701. forceRender(false);
  5702. }
  5703. }, res.delay || 200);
  5704. }
  5705. }
  5706. if (isDef(res.timeout)) {
  5707. timerTimeout = setTimeout(function () {
  5708. timerTimeout = null;
  5709. if (isUndef(factory.resolved)) {
  5710. reject(
  5711. true
  5712. ? ("timeout (" + (res.timeout) + "ms)")
  5713. : undefined
  5714. );
  5715. }
  5716. }, res.timeout);
  5717. }
  5718. }
  5719. }
  5720. sync = false;
  5721. // return in case resolved synchronously
  5722. return factory.loading
  5723. ? factory.loadingComp
  5724. : factory.resolved
  5725. }
  5726. }
  5727. /* */
  5728. function isAsyncPlaceholder (node) {
  5729. return node.isComment && node.asyncFactory
  5730. }
  5731. /* */
  5732. function getFirstComponentChild (children) {
  5733. if (Array.isArray(children)) {
  5734. for (var i = 0; i < children.length; i++) {
  5735. var c = children[i];
  5736. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  5737. return c
  5738. }
  5739. }
  5740. }
  5741. }
  5742. /* */
  5743. /* */
  5744. function initEvents (vm) {
  5745. vm._events = Object.create(null);
  5746. vm._hasHookEvent = false;
  5747. // init parent attached events
  5748. var listeners = vm.$options._parentListeners;
  5749. if (listeners) {
  5750. updateComponentListeners(vm, listeners);
  5751. }
  5752. }
  5753. var target;
  5754. function add (event, fn) {
  5755. target.$on(event, fn);
  5756. }
  5757. function remove$1 (event, fn) {
  5758. target.$off(event, fn);
  5759. }
  5760. function createOnceHandler (event, fn) {
  5761. var _target = target;
  5762. return function onceHandler () {
  5763. var res = fn.apply(null, arguments);
  5764. if (res !== null) {
  5765. _target.$off(event, onceHandler);
  5766. }
  5767. }
  5768. }
  5769. function updateComponentListeners (
  5770. vm,
  5771. listeners,
  5772. oldListeners
  5773. ) {
  5774. target = vm;
  5775. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  5776. target = undefined;
  5777. }
  5778. function eventsMixin (Vue) {
  5779. var hookRE = /^hook:/;
  5780. Vue.prototype.$on = function (event, fn) {
  5781. var vm = this;
  5782. if (Array.isArray(event)) {
  5783. for (var i = 0, l = event.length; i < l; i++) {
  5784. vm.$on(event[i], fn);
  5785. }
  5786. } else {
  5787. (vm._events[event] || (vm._events[event] = [])).push(fn);
  5788. // optimize hook:event cost by using a boolean flag marked at registration
  5789. // instead of a hash lookup
  5790. if (hookRE.test(event)) {
  5791. vm._hasHookEvent = true;
  5792. }
  5793. }
  5794. return vm
  5795. };
  5796. Vue.prototype.$once = function (event, fn) {
  5797. var vm = this;
  5798. function on () {
  5799. vm.$off(event, on);
  5800. fn.apply(vm, arguments);
  5801. }
  5802. on.fn = fn;
  5803. vm.$on(event, on);
  5804. return vm
  5805. };
  5806. Vue.prototype.$off = function (event, fn) {
  5807. var vm = this;
  5808. // all
  5809. if (!arguments.length) {
  5810. vm._events = Object.create(null);
  5811. return vm
  5812. }
  5813. // array of events
  5814. if (Array.isArray(event)) {
  5815. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  5816. vm.$off(event[i$1], fn);
  5817. }
  5818. return vm
  5819. }
  5820. // specific event
  5821. var cbs = vm._events[event];
  5822. if (!cbs) {
  5823. return vm
  5824. }
  5825. if (!fn) {
  5826. vm._events[event] = null;
  5827. return vm
  5828. }
  5829. // specific handler
  5830. var cb;
  5831. var i = cbs.length;
  5832. while (i--) {
  5833. cb = cbs[i];
  5834. if (cb === fn || cb.fn === fn) {
  5835. cbs.splice(i, 1);
  5836. break
  5837. }
  5838. }
  5839. return vm
  5840. };
  5841. Vue.prototype.$emit = function (event) {
  5842. var vm = this;
  5843. if (true) {
  5844. var lowerCaseEvent = event.toLowerCase();
  5845. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  5846. tip(
  5847. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  5848. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  5849. "Note that HTML attributes are case-insensitive and you cannot use " +
  5850. "v-on to listen to camelCase events when using in-DOM templates. " +
  5851. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  5852. );
  5853. }
  5854. }
  5855. var cbs = vm._events[event];
  5856. if (cbs) {
  5857. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  5858. var args = toArray(arguments, 1);
  5859. var info = "event handler for \"" + event + "\"";
  5860. for (var i = 0, l = cbs.length; i < l; i++) {
  5861. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  5862. }
  5863. }
  5864. return vm
  5865. };
  5866. }
  5867. /* */
  5868. var activeInstance = null;
  5869. var isUpdatingChildComponent = false;
  5870. function setActiveInstance(vm) {
  5871. var prevActiveInstance = activeInstance;
  5872. activeInstance = vm;
  5873. return function () {
  5874. activeInstance = prevActiveInstance;
  5875. }
  5876. }
  5877. function initLifecycle (vm) {
  5878. var options = vm.$options;
  5879. // locate first non-abstract parent
  5880. var parent = options.parent;
  5881. if (parent && !options.abstract) {
  5882. while (parent.$options.abstract && parent.$parent) {
  5883. parent = parent.$parent;
  5884. }
  5885. parent.$children.push(vm);
  5886. }
  5887. vm.$parent = parent;
  5888. vm.$root = parent ? parent.$root : vm;
  5889. vm.$children = [];
  5890. vm.$refs = {};
  5891. vm._watcher = null;
  5892. vm._inactive = null;
  5893. vm._directInactive = false;
  5894. vm._isMounted = false;
  5895. vm._isDestroyed = false;
  5896. vm._isBeingDestroyed = false;
  5897. }
  5898. function lifecycleMixin (Vue) {
  5899. Vue.prototype._update = function (vnode, hydrating) {
  5900. var vm = this;
  5901. var prevEl = vm.$el;
  5902. var prevVnode = vm._vnode;
  5903. var restoreActiveInstance = setActiveInstance(vm);
  5904. vm._vnode = vnode;
  5905. // Vue.prototype.__patch__ is injected in entry points
  5906. // based on the rendering backend used.
  5907. if (!prevVnode) {
  5908. // initial render
  5909. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  5910. } else {
  5911. // updates
  5912. vm.$el = vm.__patch__(prevVnode, vnode);
  5913. }
  5914. restoreActiveInstance();
  5915. // update __vue__ reference
  5916. if (prevEl) {
  5917. prevEl.__vue__ = null;
  5918. }
  5919. if (vm.$el) {
  5920. vm.$el.__vue__ = vm;
  5921. }
  5922. // if parent is an HOC, update its $el as well
  5923. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  5924. vm.$parent.$el = vm.$el;
  5925. }
  5926. // updated hook is called by the scheduler to ensure that children are
  5927. // updated in a parent's updated hook.
  5928. };
  5929. Vue.prototype.$forceUpdate = function () {
  5930. var vm = this;
  5931. if (vm._watcher) {
  5932. vm._watcher.update();
  5933. }
  5934. };
  5935. Vue.prototype.$destroy = function () {
  5936. var vm = this;
  5937. if (vm._isBeingDestroyed) {
  5938. return
  5939. }
  5940. callHook(vm, 'beforeDestroy');
  5941. vm._isBeingDestroyed = true;
  5942. // remove self from parent
  5943. var parent = vm.$parent;
  5944. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  5945. remove(parent.$children, vm);
  5946. }
  5947. // teardown watchers
  5948. if (vm._watcher) {
  5949. vm._watcher.teardown();
  5950. }
  5951. var i = vm._watchers.length;
  5952. while (i--) {
  5953. vm._watchers[i].teardown();
  5954. }
  5955. // remove reference from data ob
  5956. // frozen object may not have observer.
  5957. if (vm._data.__ob__) {
  5958. vm._data.__ob__.vmCount--;
  5959. }
  5960. // call the last hook...
  5961. vm._isDestroyed = true;
  5962. // invoke destroy hooks on current rendered tree
  5963. vm.__patch__(vm._vnode, null);
  5964. // fire destroyed hook
  5965. callHook(vm, 'destroyed');
  5966. // turn off all instance listeners.
  5967. vm.$off();
  5968. // remove __vue__ reference
  5969. if (vm.$el) {
  5970. vm.$el.__vue__ = null;
  5971. }
  5972. // release circular reference (#6759)
  5973. if (vm.$vnode) {
  5974. vm.$vnode.parent = null;
  5975. }
  5976. };
  5977. }
  5978. function updateChildComponent (
  5979. vm,
  5980. propsData,
  5981. listeners,
  5982. parentVnode,
  5983. renderChildren
  5984. ) {
  5985. if (true) {
  5986. isUpdatingChildComponent = true;
  5987. }
  5988. // determine whether component has slot children
  5989. // we need to do this before overwriting $options._renderChildren.
  5990. // check if there are dynamic scopedSlots (hand-written or compiled but with
  5991. // dynamic slot names). Static scoped slots compiled from template has the
  5992. // "$stable" marker.
  5993. var newScopedSlots = parentVnode.data.scopedSlots;
  5994. var oldScopedSlots = vm.$scopedSlots;
  5995. var hasDynamicScopedSlot = !!(
  5996. (newScopedSlots && !newScopedSlots.$stable) ||
  5997. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  5998. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  5999. );
  6000. // Any static slot children from the parent may have changed during parent's
  6001. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  6002. // update is necessary to ensure correctness.
  6003. var needsForceUpdate = !!(
  6004. renderChildren || // has new static slots
  6005. vm.$options._renderChildren || // has old static slots
  6006. hasDynamicScopedSlot
  6007. );
  6008. vm.$options._parentVnode = parentVnode;
  6009. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  6010. if (vm._vnode) { // update child tree's parent
  6011. vm._vnode.parent = parentVnode;
  6012. }
  6013. vm.$options._renderChildren = renderChildren;
  6014. // update $attrs and $listeners hash
  6015. // these are also reactive so they may trigger child update if the child
  6016. // used them during render
  6017. vm.$attrs = parentVnode.data.attrs || emptyObject;
  6018. vm.$listeners = listeners || emptyObject;
  6019. // update props
  6020. if (propsData && vm.$options.props) {
  6021. toggleObserving(false);
  6022. var props = vm._props;
  6023. var propKeys = vm.$options._propKeys || [];
  6024. for (var i = 0; i < propKeys.length; i++) {
  6025. var key = propKeys[i];
  6026. var propOptions = vm.$options.props; // wtf flow?
  6027. props[key] = validateProp(key, propOptions, propsData, vm);
  6028. }
  6029. toggleObserving(true);
  6030. // keep a copy of raw propsData
  6031. vm.$options.propsData = propsData;
  6032. }
  6033. // fixed by xxxxxx update properties(mp runtime)
  6034. vm._$updateProperties && vm._$updateProperties(vm);
  6035. // update listeners
  6036. listeners = listeners || emptyObject;
  6037. var oldListeners = vm.$options._parentListeners;
  6038. vm.$options._parentListeners = listeners;
  6039. updateComponentListeners(vm, listeners, oldListeners);
  6040. // resolve slots + force update if has children
  6041. if (needsForceUpdate) {
  6042. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  6043. vm.$forceUpdate();
  6044. }
  6045. if (true) {
  6046. isUpdatingChildComponent = false;
  6047. }
  6048. }
  6049. function isInInactiveTree (vm) {
  6050. while (vm && (vm = vm.$parent)) {
  6051. if (vm._inactive) { return true }
  6052. }
  6053. return false
  6054. }
  6055. function activateChildComponent (vm, direct) {
  6056. if (direct) {
  6057. vm._directInactive = false;
  6058. if (isInInactiveTree(vm)) {
  6059. return
  6060. }
  6061. } else if (vm._directInactive) {
  6062. return
  6063. }
  6064. if (vm._inactive || vm._inactive === null) {
  6065. vm._inactive = false;
  6066. for (var i = 0; i < vm.$children.length; i++) {
  6067. activateChildComponent(vm.$children[i]);
  6068. }
  6069. callHook(vm, 'activated');
  6070. }
  6071. }
  6072. function deactivateChildComponent (vm, direct) {
  6073. if (direct) {
  6074. vm._directInactive = true;
  6075. if (isInInactiveTree(vm)) {
  6076. return
  6077. }
  6078. }
  6079. if (!vm._inactive) {
  6080. vm._inactive = true;
  6081. for (var i = 0; i < vm.$children.length; i++) {
  6082. deactivateChildComponent(vm.$children[i]);
  6083. }
  6084. callHook(vm, 'deactivated');
  6085. }
  6086. }
  6087. function callHook (vm, hook) {
  6088. // #7573 disable dep collection when invoking lifecycle hooks
  6089. pushTarget();
  6090. var handlers = vm.$options[hook];
  6091. var info = hook + " hook";
  6092. if (handlers) {
  6093. for (var i = 0, j = handlers.length; i < j; i++) {
  6094. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  6095. }
  6096. }
  6097. if (vm._hasHookEvent) {
  6098. vm.$emit('hook:' + hook);
  6099. }
  6100. popTarget();
  6101. }
  6102. /* */
  6103. var MAX_UPDATE_COUNT = 100;
  6104. var queue = [];
  6105. var activatedChildren = [];
  6106. var has = {};
  6107. var circular = {};
  6108. var waiting = false;
  6109. var flushing = false;
  6110. var index = 0;
  6111. /**
  6112. * Reset the scheduler's state.
  6113. */
  6114. function resetSchedulerState () {
  6115. index = queue.length = activatedChildren.length = 0;
  6116. has = {};
  6117. if (true) {
  6118. circular = {};
  6119. }
  6120. waiting = flushing = false;
  6121. }
  6122. // Async edge case #6566 requires saving the timestamp when event listeners are
  6123. // attached. However, calling performance.now() has a perf overhead especially
  6124. // if the page has thousands of event listeners. Instead, we take a timestamp
  6125. // every time the scheduler flushes and use that for all event listeners
  6126. // attached during that flush.
  6127. var currentFlushTimestamp = 0;
  6128. // Async edge case fix requires storing an event listener's attach timestamp.
  6129. var getNow = Date.now;
  6130. // Determine what event timestamp the browser is using. Annoyingly, the
  6131. // timestamp can either be hi-res (relative to page load) or low-res
  6132. // (relative to UNIX epoch), so in order to compare time we have to use the
  6133. // same timestamp type when saving the flush timestamp.
  6134. // All IE versions use low-res event timestamps, and have problematic clock
  6135. // implementations (#9632)
  6136. if (inBrowser && !isIE) {
  6137. var performance = window.performance;
  6138. if (
  6139. performance &&
  6140. typeof performance.now === 'function' &&
  6141. getNow() > document.createEvent('Event').timeStamp
  6142. ) {
  6143. // if the event timestamp, although evaluated AFTER the Date.now(), is
  6144. // smaller than it, it means the event is using a hi-res timestamp,
  6145. // and we need to use the hi-res version for event listener timestamps as
  6146. // well.
  6147. getNow = function () { return performance.now(); };
  6148. }
  6149. }
  6150. /**
  6151. * Flush both queues and run the watchers.
  6152. */
  6153. function flushSchedulerQueue () {
  6154. currentFlushTimestamp = getNow();
  6155. flushing = true;
  6156. var watcher, id;
  6157. // Sort queue before flush.
  6158. // This ensures that:
  6159. // 1. Components are updated from parent to child. (because parent is always
  6160. // created before the child)
  6161. // 2. A component's user watchers are run before its render watcher (because
  6162. // user watchers are created before the render watcher)
  6163. // 3. If a component is destroyed during a parent component's watcher run,
  6164. // its watchers can be skipped.
  6165. queue.sort(function (a, b) { return a.id - b.id; });
  6166. // do not cache length because more watchers might be pushed
  6167. // as we run existing watchers
  6168. for (index = 0; index < queue.length; index++) {
  6169. watcher = queue[index];
  6170. if (watcher.before) {
  6171. watcher.before();
  6172. }
  6173. id = watcher.id;
  6174. has[id] = null;
  6175. watcher.run();
  6176. // in dev build, check and stop circular updates.
  6177. if ( true && has[id] != null) {
  6178. circular[id] = (circular[id] || 0) + 1;
  6179. if (circular[id] > MAX_UPDATE_COUNT) {
  6180. warn(
  6181. 'You may have an infinite update loop ' + (
  6182. watcher.user
  6183. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  6184. : "in a component render function."
  6185. ),
  6186. watcher.vm
  6187. );
  6188. break
  6189. }
  6190. }
  6191. }
  6192. // keep copies of post queues before resetting state
  6193. var activatedQueue = activatedChildren.slice();
  6194. var updatedQueue = queue.slice();
  6195. resetSchedulerState();
  6196. // call component updated and activated hooks
  6197. callActivatedHooks(activatedQueue);
  6198. callUpdatedHooks(updatedQueue);
  6199. // devtool hook
  6200. /* istanbul ignore if */
  6201. if (devtools && config.devtools) {
  6202. devtools.emit('flush');
  6203. }
  6204. }
  6205. function callUpdatedHooks (queue) {
  6206. var i = queue.length;
  6207. while (i--) {
  6208. var watcher = queue[i];
  6209. var vm = watcher.vm;
  6210. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  6211. callHook(vm, 'updated');
  6212. }
  6213. }
  6214. }
  6215. /**
  6216. * Queue a kept-alive component that was activated during patch.
  6217. * The queue will be processed after the entire tree has been patched.
  6218. */
  6219. function queueActivatedComponent (vm) {
  6220. // setting _inactive to false here so that a render function can
  6221. // rely on checking whether it's in an inactive tree (e.g. router-view)
  6222. vm._inactive = false;
  6223. activatedChildren.push(vm);
  6224. }
  6225. function callActivatedHooks (queue) {
  6226. for (var i = 0; i < queue.length; i++) {
  6227. queue[i]._inactive = true;
  6228. activateChildComponent(queue[i], true /* true */);
  6229. }
  6230. }
  6231. /**
  6232. * Push a watcher into the watcher queue.
  6233. * Jobs with duplicate IDs will be skipped unless it's
  6234. * pushed when the queue is being flushed.
  6235. */
  6236. function queueWatcher (watcher) {
  6237. var id = watcher.id;
  6238. if (has[id] == null) {
  6239. has[id] = true;
  6240. if (!flushing) {
  6241. queue.push(watcher);
  6242. } else {
  6243. // if already flushing, splice the watcher based on its id
  6244. // if already past its id, it will be run next immediately.
  6245. var i = queue.length - 1;
  6246. while (i > index && queue[i].id > watcher.id) {
  6247. i--;
  6248. }
  6249. queue.splice(i + 1, 0, watcher);
  6250. }
  6251. // queue the flush
  6252. if (!waiting) {
  6253. waiting = true;
  6254. if ( true && !config.async) {
  6255. flushSchedulerQueue();
  6256. return
  6257. }
  6258. nextTick(flushSchedulerQueue);
  6259. }
  6260. }
  6261. }
  6262. /* */
  6263. var uid$2 = 0;
  6264. /**
  6265. * A watcher parses an expression, collects dependencies,
  6266. * and fires callback when the expression value changes.
  6267. * This is used for both the $watch() api and directives.
  6268. */
  6269. var Watcher = function Watcher (
  6270. vm,
  6271. expOrFn,
  6272. cb,
  6273. options,
  6274. isRenderWatcher
  6275. ) {
  6276. this.vm = vm;
  6277. if (isRenderWatcher) {
  6278. vm._watcher = this;
  6279. }
  6280. vm._watchers.push(this);
  6281. // options
  6282. if (options) {
  6283. this.deep = !!options.deep;
  6284. this.user = !!options.user;
  6285. this.lazy = !!options.lazy;
  6286. this.sync = !!options.sync;
  6287. this.before = options.before;
  6288. } else {
  6289. this.deep = this.user = this.lazy = this.sync = false;
  6290. }
  6291. this.cb = cb;
  6292. this.id = ++uid$2; // uid for batching
  6293. this.active = true;
  6294. this.dirty = this.lazy; // for lazy watchers
  6295. this.deps = [];
  6296. this.newDeps = [];
  6297. this.depIds = new _Set();
  6298. this.newDepIds = new _Set();
  6299. this.expression = true
  6300. ? expOrFn.toString()
  6301. : undefined;
  6302. // parse expression for getter
  6303. if (typeof expOrFn === 'function') {
  6304. this.getter = expOrFn;
  6305. } else {
  6306. this.getter = parsePath(expOrFn);
  6307. if (!this.getter) {
  6308. this.getter = noop;
  6309. true && warn(
  6310. "Failed watching path: \"" + expOrFn + "\" " +
  6311. 'Watcher only accepts simple dot-delimited paths. ' +
  6312. 'For full control, use a function instead.',
  6313. vm
  6314. );
  6315. }
  6316. }
  6317. this.value = this.lazy
  6318. ? undefined
  6319. : this.get();
  6320. };
  6321. /**
  6322. * Evaluate the getter, and re-collect dependencies.
  6323. */
  6324. Watcher.prototype.get = function get () {
  6325. pushTarget(this);
  6326. var value;
  6327. var vm = this.vm;
  6328. try {
  6329. value = this.getter.call(vm, vm);
  6330. } catch (e) {
  6331. if (this.user) {
  6332. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  6333. } else {
  6334. throw e
  6335. }
  6336. } finally {
  6337. // "touch" every property so they are all tracked as
  6338. // dependencies for deep watching
  6339. if (this.deep) {
  6340. traverse(value);
  6341. }
  6342. popTarget();
  6343. this.cleanupDeps();
  6344. }
  6345. return value
  6346. };
  6347. /**
  6348. * Add a dependency to this directive.
  6349. */
  6350. Watcher.prototype.addDep = function addDep (dep) {
  6351. var id = dep.id;
  6352. if (!this.newDepIds.has(id)) {
  6353. this.newDepIds.add(id);
  6354. this.newDeps.push(dep);
  6355. if (!this.depIds.has(id)) {
  6356. dep.addSub(this);
  6357. }
  6358. }
  6359. };
  6360. /**
  6361. * Clean up for dependency collection.
  6362. */
  6363. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  6364. var i = this.deps.length;
  6365. while (i--) {
  6366. var dep = this.deps[i];
  6367. if (!this.newDepIds.has(dep.id)) {
  6368. dep.removeSub(this);
  6369. }
  6370. }
  6371. var tmp = this.depIds;
  6372. this.depIds = this.newDepIds;
  6373. this.newDepIds = tmp;
  6374. this.newDepIds.clear();
  6375. tmp = this.deps;
  6376. this.deps = this.newDeps;
  6377. this.newDeps = tmp;
  6378. this.newDeps.length = 0;
  6379. };
  6380. /**
  6381. * Subscriber interface.
  6382. * Will be called when a dependency changes.
  6383. */
  6384. Watcher.prototype.update = function update () {
  6385. /* istanbul ignore else */
  6386. if (this.lazy) {
  6387. this.dirty = true;
  6388. } else if (this.sync) {
  6389. this.run();
  6390. } else {
  6391. queueWatcher(this);
  6392. }
  6393. };
  6394. /**
  6395. * Scheduler job interface.
  6396. * Will be called by the scheduler.
  6397. */
  6398. Watcher.prototype.run = function run () {
  6399. if (this.active) {
  6400. var value = this.get();
  6401. if (
  6402. value !== this.value ||
  6403. // Deep watchers and watchers on Object/Arrays should fire even
  6404. // when the value is the same, because the value may
  6405. // have mutated.
  6406. isObject(value) ||
  6407. this.deep
  6408. ) {
  6409. // set new value
  6410. var oldValue = this.value;
  6411. this.value = value;
  6412. if (this.user) {
  6413. try {
  6414. this.cb.call(this.vm, value, oldValue);
  6415. } catch (e) {
  6416. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  6417. }
  6418. } else {
  6419. this.cb.call(this.vm, value, oldValue);
  6420. }
  6421. }
  6422. }
  6423. };
  6424. /**
  6425. * Evaluate the value of the watcher.
  6426. * This only gets called for lazy watchers.
  6427. */
  6428. Watcher.prototype.evaluate = function evaluate () {
  6429. this.value = this.get();
  6430. this.dirty = false;
  6431. };
  6432. /**
  6433. * Depend on all deps collected by this watcher.
  6434. */
  6435. Watcher.prototype.depend = function depend () {
  6436. var i = this.deps.length;
  6437. while (i--) {
  6438. this.deps[i].depend();
  6439. }
  6440. };
  6441. /**
  6442. * Remove self from all dependencies' subscriber list.
  6443. */
  6444. Watcher.prototype.teardown = function teardown () {
  6445. if (this.active) {
  6446. // remove self from vm's watcher list
  6447. // this is a somewhat expensive operation so we skip it
  6448. // if the vm is being destroyed.
  6449. if (!this.vm._isBeingDestroyed) {
  6450. remove(this.vm._watchers, this);
  6451. }
  6452. var i = this.deps.length;
  6453. while (i--) {
  6454. this.deps[i].removeSub(this);
  6455. }
  6456. this.active = false;
  6457. }
  6458. };
  6459. /* */
  6460. var sharedPropertyDefinition = {
  6461. enumerable: true,
  6462. configurable: true,
  6463. get: noop,
  6464. set: noop
  6465. };
  6466. function proxy (target, sourceKey, key) {
  6467. sharedPropertyDefinition.get = function proxyGetter () {
  6468. return this[sourceKey][key]
  6469. };
  6470. sharedPropertyDefinition.set = function proxySetter (val) {
  6471. this[sourceKey][key] = val;
  6472. };
  6473. Object.defineProperty(target, key, sharedPropertyDefinition);
  6474. }
  6475. function initState (vm) {
  6476. vm._watchers = [];
  6477. var opts = vm.$options;
  6478. if (opts.props) { initProps(vm, opts.props); }
  6479. if (opts.methods) { initMethods(vm, opts.methods); }
  6480. if (opts.data) {
  6481. initData(vm);
  6482. } else {
  6483. observe(vm._data = {}, true /* asRootData */);
  6484. }
  6485. if (opts.computed) { initComputed(vm, opts.computed); }
  6486. if (opts.watch && opts.watch !== nativeWatch) {
  6487. initWatch(vm, opts.watch);
  6488. }
  6489. }
  6490. function initProps (vm, propsOptions) {
  6491. var propsData = vm.$options.propsData || {};
  6492. var props = vm._props = {};
  6493. // cache prop keys so that future props updates can iterate using Array
  6494. // instead of dynamic object key enumeration.
  6495. var keys = vm.$options._propKeys = [];
  6496. var isRoot = !vm.$parent;
  6497. // root instance props should be converted
  6498. if (!isRoot) {
  6499. toggleObserving(false);
  6500. }
  6501. var loop = function ( key ) {
  6502. keys.push(key);
  6503. var value = validateProp(key, propsOptions, propsData, vm);
  6504. /* istanbul ignore else */
  6505. if (true) {
  6506. var hyphenatedKey = hyphenate(key);
  6507. if (isReservedAttribute(hyphenatedKey) ||
  6508. config.isReservedAttr(hyphenatedKey)) {
  6509. warn(
  6510. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  6511. vm
  6512. );
  6513. }
  6514. defineReactive$$1(props, key, value, function () {
  6515. if (!isRoot && !isUpdatingChildComponent) {
  6516. {
  6517. if(vm.mpHost === 'mp-baidu'){//百度 observer 在 setData callback 之后触发,直接忽略该 warn
  6518. return
  6519. }
  6520. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  6521. if(
  6522. key === 'value' &&
  6523. Array.isArray(vm.$options.behaviors) &&
  6524. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  6525. ){
  6526. return
  6527. }
  6528. if(vm._getFormData){
  6529. return
  6530. }
  6531. var $parent = vm.$parent;
  6532. while($parent){
  6533. if($parent.__next_tick_pending){
  6534. return
  6535. }
  6536. $parent = $parent.$parent;
  6537. }
  6538. }
  6539. warn(
  6540. "Avoid mutating a prop directly since the value will be " +
  6541. "overwritten whenever the parent component re-renders. " +
  6542. "Instead, use a data or computed property based on the prop's " +
  6543. "value. Prop being mutated: \"" + key + "\"",
  6544. vm
  6545. );
  6546. }
  6547. });
  6548. } else {}
  6549. // static props are already proxied on the component's prototype
  6550. // during Vue.extend(). We only need to proxy props defined at
  6551. // instantiation here.
  6552. if (!(key in vm)) {
  6553. proxy(vm, "_props", key);
  6554. }
  6555. };
  6556. for (var key in propsOptions) loop( key );
  6557. toggleObserving(true);
  6558. }
  6559. function initData (vm) {
  6560. var data = vm.$options.data;
  6561. data = vm._data = typeof data === 'function'
  6562. ? getData(data, vm)
  6563. : data || {};
  6564. if (!isPlainObject(data)) {
  6565. data = {};
  6566. true && warn(
  6567. 'data functions should return an object:\n' +
  6568. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  6569. vm
  6570. );
  6571. }
  6572. // proxy data on instance
  6573. var keys = Object.keys(data);
  6574. var props = vm.$options.props;
  6575. var methods = vm.$options.methods;
  6576. var i = keys.length;
  6577. while (i--) {
  6578. var key = keys[i];
  6579. if (true) {
  6580. if (methods && hasOwn(methods, key)) {
  6581. warn(
  6582. ("Method \"" + key + "\" has already been defined as a data property."),
  6583. vm
  6584. );
  6585. }
  6586. }
  6587. if (props && hasOwn(props, key)) {
  6588. true && warn(
  6589. "The data property \"" + key + "\" is already declared as a prop. " +
  6590. "Use prop default value instead.",
  6591. vm
  6592. );
  6593. } else if (!isReserved(key)) {
  6594. proxy(vm, "_data", key);
  6595. }
  6596. }
  6597. // observe data
  6598. observe(data, true /* asRootData */);
  6599. }
  6600. function getData (data, vm) {
  6601. // #7573 disable dep collection when invoking data getters
  6602. pushTarget();
  6603. try {
  6604. return data.call(vm, vm)
  6605. } catch (e) {
  6606. handleError(e, vm, "data()");
  6607. return {}
  6608. } finally {
  6609. popTarget();
  6610. }
  6611. }
  6612. var computedWatcherOptions = { lazy: true };
  6613. function initComputed (vm, computed) {
  6614. // $flow-disable-line
  6615. var watchers = vm._computedWatchers = Object.create(null);
  6616. // computed properties are just getters during SSR
  6617. var isSSR = isServerRendering();
  6618. for (var key in computed) {
  6619. var userDef = computed[key];
  6620. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  6621. if ( true && getter == null) {
  6622. warn(
  6623. ("Getter is missing for computed property \"" + key + "\"."),
  6624. vm
  6625. );
  6626. }
  6627. if (!isSSR) {
  6628. // create internal watcher for the computed property.
  6629. watchers[key] = new Watcher(
  6630. vm,
  6631. getter || noop,
  6632. noop,
  6633. computedWatcherOptions
  6634. );
  6635. }
  6636. // component-defined computed properties are already defined on the
  6637. // component prototype. We only need to define computed properties defined
  6638. // at instantiation here.
  6639. if (!(key in vm)) {
  6640. defineComputed(vm, key, userDef);
  6641. } else if (true) {
  6642. if (key in vm.$data) {
  6643. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  6644. } else if (vm.$options.props && key in vm.$options.props) {
  6645. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  6646. }
  6647. }
  6648. }
  6649. }
  6650. function defineComputed (
  6651. target,
  6652. key,
  6653. userDef
  6654. ) {
  6655. var shouldCache = !isServerRendering();
  6656. if (typeof userDef === 'function') {
  6657. sharedPropertyDefinition.get = shouldCache
  6658. ? createComputedGetter(key)
  6659. : createGetterInvoker(userDef);
  6660. sharedPropertyDefinition.set = noop;
  6661. } else {
  6662. sharedPropertyDefinition.get = userDef.get
  6663. ? shouldCache && userDef.cache !== false
  6664. ? createComputedGetter(key)
  6665. : createGetterInvoker(userDef.get)
  6666. : noop;
  6667. sharedPropertyDefinition.set = userDef.set || noop;
  6668. }
  6669. if ( true &&
  6670. sharedPropertyDefinition.set === noop) {
  6671. sharedPropertyDefinition.set = function () {
  6672. warn(
  6673. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  6674. this
  6675. );
  6676. };
  6677. }
  6678. Object.defineProperty(target, key, sharedPropertyDefinition);
  6679. }
  6680. function createComputedGetter (key) {
  6681. return function computedGetter () {
  6682. var watcher = this._computedWatchers && this._computedWatchers[key];
  6683. if (watcher) {
  6684. if (watcher.dirty) {
  6685. watcher.evaluate();
  6686. }
  6687. if (Dep.SharedObject.target) {// fixed by xxxxxx
  6688. watcher.depend();
  6689. }
  6690. return watcher.value
  6691. }
  6692. }
  6693. }
  6694. function createGetterInvoker(fn) {
  6695. return function computedGetter () {
  6696. return fn.call(this, this)
  6697. }
  6698. }
  6699. function initMethods (vm, methods) {
  6700. var props = vm.$options.props;
  6701. for (var key in methods) {
  6702. if (true) {
  6703. if (typeof methods[key] !== 'function') {
  6704. warn(
  6705. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  6706. "Did you reference the function correctly?",
  6707. vm
  6708. );
  6709. }
  6710. if (props && hasOwn(props, key)) {
  6711. warn(
  6712. ("Method \"" + key + "\" has already been defined as a prop."),
  6713. vm
  6714. );
  6715. }
  6716. if ((key in vm) && isReserved(key)) {
  6717. warn(
  6718. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  6719. "Avoid defining component methods that start with _ or $."
  6720. );
  6721. }
  6722. }
  6723. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  6724. }
  6725. }
  6726. function initWatch (vm, watch) {
  6727. for (var key in watch) {
  6728. var handler = watch[key];
  6729. if (Array.isArray(handler)) {
  6730. for (var i = 0; i < handler.length; i++) {
  6731. createWatcher(vm, key, handler[i]);
  6732. }
  6733. } else {
  6734. createWatcher(vm, key, handler);
  6735. }
  6736. }
  6737. }
  6738. function createWatcher (
  6739. vm,
  6740. expOrFn,
  6741. handler,
  6742. options
  6743. ) {
  6744. if (isPlainObject(handler)) {
  6745. options = handler;
  6746. handler = handler.handler;
  6747. }
  6748. if (typeof handler === 'string') {
  6749. handler = vm[handler];
  6750. }
  6751. return vm.$watch(expOrFn, handler, options)
  6752. }
  6753. function stateMixin (Vue) {
  6754. // flow somehow has problems with directly declared definition object
  6755. // when using Object.defineProperty, so we have to procedurally build up
  6756. // the object here.
  6757. var dataDef = {};
  6758. dataDef.get = function () { return this._data };
  6759. var propsDef = {};
  6760. propsDef.get = function () { return this._props };
  6761. if (true) {
  6762. dataDef.set = function () {
  6763. warn(
  6764. 'Avoid replacing instance root $data. ' +
  6765. 'Use nested data properties instead.',
  6766. this
  6767. );
  6768. };
  6769. propsDef.set = function () {
  6770. warn("$props is readonly.", this);
  6771. };
  6772. }
  6773. Object.defineProperty(Vue.prototype, '$data', dataDef);
  6774. Object.defineProperty(Vue.prototype, '$props', propsDef);
  6775. Vue.prototype.$set = set;
  6776. Vue.prototype.$delete = del;
  6777. Vue.prototype.$watch = function (
  6778. expOrFn,
  6779. cb,
  6780. options
  6781. ) {
  6782. var vm = this;
  6783. if (isPlainObject(cb)) {
  6784. return createWatcher(vm, expOrFn, cb, options)
  6785. }
  6786. options = options || {};
  6787. options.user = true;
  6788. var watcher = new Watcher(vm, expOrFn, cb, options);
  6789. if (options.immediate) {
  6790. try {
  6791. cb.call(vm, watcher.value);
  6792. } catch (error) {
  6793. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  6794. }
  6795. }
  6796. return function unwatchFn () {
  6797. watcher.teardown();
  6798. }
  6799. };
  6800. }
  6801. /* */
  6802. var uid$3 = 0;
  6803. function initMixin (Vue) {
  6804. Vue.prototype._init = function (options) {
  6805. var vm = this;
  6806. // a uid
  6807. vm._uid = uid$3++;
  6808. var startTag, endTag;
  6809. /* istanbul ignore if */
  6810. if ( true && config.performance && mark) {
  6811. startTag = "vue-perf-start:" + (vm._uid);
  6812. endTag = "vue-perf-end:" + (vm._uid);
  6813. mark(startTag);
  6814. }
  6815. // a flag to avoid this being observed
  6816. vm._isVue = true;
  6817. // merge options
  6818. if (options && options._isComponent) {
  6819. // optimize internal component instantiation
  6820. // since dynamic options merging is pretty slow, and none of the
  6821. // internal component options needs special treatment.
  6822. initInternalComponent(vm, options);
  6823. } else {
  6824. vm.$options = mergeOptions(
  6825. resolveConstructorOptions(vm.constructor),
  6826. options || {},
  6827. vm
  6828. );
  6829. }
  6830. /* istanbul ignore else */
  6831. if (true) {
  6832. initProxy(vm);
  6833. } else {}
  6834. // expose real self
  6835. vm._self = vm;
  6836. initLifecycle(vm);
  6837. initEvents(vm);
  6838. initRender(vm);
  6839. callHook(vm, 'beforeCreate');
  6840. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  6841. initState(vm);
  6842. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  6843. !vm._$fallback && callHook(vm, 'created');
  6844. /* istanbul ignore if */
  6845. if ( true && config.performance && mark) {
  6846. vm._name = formatComponentName(vm, false);
  6847. mark(endTag);
  6848. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  6849. }
  6850. if (vm.$options.el) {
  6851. vm.$mount(vm.$options.el);
  6852. }
  6853. };
  6854. }
  6855. function initInternalComponent (vm, options) {
  6856. var opts = vm.$options = Object.create(vm.constructor.options);
  6857. // doing this because it's faster than dynamic enumeration.
  6858. var parentVnode = options._parentVnode;
  6859. opts.parent = options.parent;
  6860. opts._parentVnode = parentVnode;
  6861. var vnodeComponentOptions = parentVnode.componentOptions;
  6862. opts.propsData = vnodeComponentOptions.propsData;
  6863. opts._parentListeners = vnodeComponentOptions.listeners;
  6864. opts._renderChildren = vnodeComponentOptions.children;
  6865. opts._componentTag = vnodeComponentOptions.tag;
  6866. if (options.render) {
  6867. opts.render = options.render;
  6868. opts.staticRenderFns = options.staticRenderFns;
  6869. }
  6870. }
  6871. function resolveConstructorOptions (Ctor) {
  6872. var options = Ctor.options;
  6873. if (Ctor.super) {
  6874. var superOptions = resolveConstructorOptions(Ctor.super);
  6875. var cachedSuperOptions = Ctor.superOptions;
  6876. if (superOptions !== cachedSuperOptions) {
  6877. // super option changed,
  6878. // need to resolve new options.
  6879. Ctor.superOptions = superOptions;
  6880. // check if there are any late-modified/attached options (#4976)
  6881. var modifiedOptions = resolveModifiedOptions(Ctor);
  6882. // update base extend options
  6883. if (modifiedOptions) {
  6884. extend(Ctor.extendOptions, modifiedOptions);
  6885. }
  6886. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  6887. if (options.name) {
  6888. options.components[options.name] = Ctor;
  6889. }
  6890. }
  6891. }
  6892. return options
  6893. }
  6894. function resolveModifiedOptions (Ctor) {
  6895. var modified;
  6896. var latest = Ctor.options;
  6897. var sealed = Ctor.sealedOptions;
  6898. for (var key in latest) {
  6899. if (latest[key] !== sealed[key]) {
  6900. if (!modified) { modified = {}; }
  6901. modified[key] = latest[key];
  6902. }
  6903. }
  6904. return modified
  6905. }
  6906. function Vue (options) {
  6907. if ( true &&
  6908. !(this instanceof Vue)
  6909. ) {
  6910. warn('Vue is a constructor and should be called with the `new` keyword');
  6911. }
  6912. this._init(options);
  6913. }
  6914. initMixin(Vue);
  6915. stateMixin(Vue);
  6916. eventsMixin(Vue);
  6917. lifecycleMixin(Vue);
  6918. renderMixin(Vue);
  6919. /* */
  6920. function initUse (Vue) {
  6921. Vue.use = function (plugin) {
  6922. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  6923. if (installedPlugins.indexOf(plugin) > -1) {
  6924. return this
  6925. }
  6926. // additional parameters
  6927. var args = toArray(arguments, 1);
  6928. args.unshift(this);
  6929. if (typeof plugin.install === 'function') {
  6930. plugin.install.apply(plugin, args);
  6931. } else if (typeof plugin === 'function') {
  6932. plugin.apply(null, args);
  6933. }
  6934. installedPlugins.push(plugin);
  6935. return this
  6936. };
  6937. }
  6938. /* */
  6939. function initMixin$1 (Vue) {
  6940. Vue.mixin = function (mixin) {
  6941. this.options = mergeOptions(this.options, mixin);
  6942. return this
  6943. };
  6944. }
  6945. /* */
  6946. function initExtend (Vue) {
  6947. /**
  6948. * Each instance constructor, including Vue, has a unique
  6949. * cid. This enables us to create wrapped "child
  6950. * constructors" for prototypal inheritance and cache them.
  6951. */
  6952. Vue.cid = 0;
  6953. var cid = 1;
  6954. /**
  6955. * Class inheritance
  6956. */
  6957. Vue.extend = function (extendOptions) {
  6958. extendOptions = extendOptions || {};
  6959. var Super = this;
  6960. var SuperId = Super.cid;
  6961. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  6962. if (cachedCtors[SuperId]) {
  6963. return cachedCtors[SuperId]
  6964. }
  6965. var name = extendOptions.name || Super.options.name;
  6966. if ( true && name) {
  6967. validateComponentName(name);
  6968. }
  6969. var Sub = function VueComponent (options) {
  6970. this._init(options);
  6971. };
  6972. Sub.prototype = Object.create(Super.prototype);
  6973. Sub.prototype.constructor = Sub;
  6974. Sub.cid = cid++;
  6975. Sub.options = mergeOptions(
  6976. Super.options,
  6977. extendOptions
  6978. );
  6979. Sub['super'] = Super;
  6980. // For props and computed properties, we define the proxy getters on
  6981. // the Vue instances at extension time, on the extended prototype. This
  6982. // avoids Object.defineProperty calls for each instance created.
  6983. if (Sub.options.props) {
  6984. initProps$1(Sub);
  6985. }
  6986. if (Sub.options.computed) {
  6987. initComputed$1(Sub);
  6988. }
  6989. // allow further extension/mixin/plugin usage
  6990. Sub.extend = Super.extend;
  6991. Sub.mixin = Super.mixin;
  6992. Sub.use = Super.use;
  6993. // create asset registers, so extended classes
  6994. // can have their private assets too.
  6995. ASSET_TYPES.forEach(function (type) {
  6996. Sub[type] = Super[type];
  6997. });
  6998. // enable recursive self-lookup
  6999. if (name) {
  7000. Sub.options.components[name] = Sub;
  7001. }
  7002. // keep a reference to the super options at extension time.
  7003. // later at instantiation we can check if Super's options have
  7004. // been updated.
  7005. Sub.superOptions = Super.options;
  7006. Sub.extendOptions = extendOptions;
  7007. Sub.sealedOptions = extend({}, Sub.options);
  7008. // cache constructor
  7009. cachedCtors[SuperId] = Sub;
  7010. return Sub
  7011. };
  7012. }
  7013. function initProps$1 (Comp) {
  7014. var props = Comp.options.props;
  7015. for (var key in props) {
  7016. proxy(Comp.prototype, "_props", key);
  7017. }
  7018. }
  7019. function initComputed$1 (Comp) {
  7020. var computed = Comp.options.computed;
  7021. for (var key in computed) {
  7022. defineComputed(Comp.prototype, key, computed[key]);
  7023. }
  7024. }
  7025. /* */
  7026. function initAssetRegisters (Vue) {
  7027. /**
  7028. * Create asset registration methods.
  7029. */
  7030. ASSET_TYPES.forEach(function (type) {
  7031. Vue[type] = function (
  7032. id,
  7033. definition
  7034. ) {
  7035. if (!definition) {
  7036. return this.options[type + 's'][id]
  7037. } else {
  7038. /* istanbul ignore if */
  7039. if ( true && type === 'component') {
  7040. validateComponentName(id);
  7041. }
  7042. if (type === 'component' && isPlainObject(definition)) {
  7043. definition.name = definition.name || id;
  7044. definition = this.options._base.extend(definition);
  7045. }
  7046. if (type === 'directive' && typeof definition === 'function') {
  7047. definition = { bind: definition, update: definition };
  7048. }
  7049. this.options[type + 's'][id] = definition;
  7050. return definition
  7051. }
  7052. };
  7053. });
  7054. }
  7055. /* */
  7056. function getComponentName (opts) {
  7057. return opts && (opts.Ctor.options.name || opts.tag)
  7058. }
  7059. function matches (pattern, name) {
  7060. if (Array.isArray(pattern)) {
  7061. return pattern.indexOf(name) > -1
  7062. } else if (typeof pattern === 'string') {
  7063. return pattern.split(',').indexOf(name) > -1
  7064. } else if (isRegExp(pattern)) {
  7065. return pattern.test(name)
  7066. }
  7067. /* istanbul ignore next */
  7068. return false
  7069. }
  7070. function pruneCache (keepAliveInstance, filter) {
  7071. var cache = keepAliveInstance.cache;
  7072. var keys = keepAliveInstance.keys;
  7073. var _vnode = keepAliveInstance._vnode;
  7074. for (var key in cache) {
  7075. var cachedNode = cache[key];
  7076. if (cachedNode) {
  7077. var name = getComponentName(cachedNode.componentOptions);
  7078. if (name && !filter(name)) {
  7079. pruneCacheEntry(cache, key, keys, _vnode);
  7080. }
  7081. }
  7082. }
  7083. }
  7084. function pruneCacheEntry (
  7085. cache,
  7086. key,
  7087. keys,
  7088. current
  7089. ) {
  7090. var cached$$1 = cache[key];
  7091. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  7092. cached$$1.componentInstance.$destroy();
  7093. }
  7094. cache[key] = null;
  7095. remove(keys, key);
  7096. }
  7097. var patternTypes = [String, RegExp, Array];
  7098. var KeepAlive = {
  7099. name: 'keep-alive',
  7100. abstract: true,
  7101. props: {
  7102. include: patternTypes,
  7103. exclude: patternTypes,
  7104. max: [String, Number]
  7105. },
  7106. created: function created () {
  7107. this.cache = Object.create(null);
  7108. this.keys = [];
  7109. },
  7110. destroyed: function destroyed () {
  7111. for (var key in this.cache) {
  7112. pruneCacheEntry(this.cache, key, this.keys);
  7113. }
  7114. },
  7115. mounted: function mounted () {
  7116. var this$1 = this;
  7117. this.$watch('include', function (val) {
  7118. pruneCache(this$1, function (name) { return matches(val, name); });
  7119. });
  7120. this.$watch('exclude', function (val) {
  7121. pruneCache(this$1, function (name) { return !matches(val, name); });
  7122. });
  7123. },
  7124. render: function render () {
  7125. var slot = this.$slots.default;
  7126. var vnode = getFirstComponentChild(slot);
  7127. var componentOptions = vnode && vnode.componentOptions;
  7128. if (componentOptions) {
  7129. // check pattern
  7130. var name = getComponentName(componentOptions);
  7131. var ref = this;
  7132. var include = ref.include;
  7133. var exclude = ref.exclude;
  7134. if (
  7135. // not included
  7136. (include && (!name || !matches(include, name))) ||
  7137. // excluded
  7138. (exclude && name && matches(exclude, name))
  7139. ) {
  7140. return vnode
  7141. }
  7142. var ref$1 = this;
  7143. var cache = ref$1.cache;
  7144. var keys = ref$1.keys;
  7145. var key = vnode.key == null
  7146. // same constructor may get registered as different local components
  7147. // so cid alone is not enough (#3269)
  7148. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  7149. : vnode.key;
  7150. if (cache[key]) {
  7151. vnode.componentInstance = cache[key].componentInstance;
  7152. // make current key freshest
  7153. remove(keys, key);
  7154. keys.push(key);
  7155. } else {
  7156. cache[key] = vnode;
  7157. keys.push(key);
  7158. // prune oldest entry
  7159. if (this.max && keys.length > parseInt(this.max)) {
  7160. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  7161. }
  7162. }
  7163. vnode.data.keepAlive = true;
  7164. }
  7165. return vnode || (slot && slot[0])
  7166. }
  7167. };
  7168. var builtInComponents = {
  7169. KeepAlive: KeepAlive
  7170. };
  7171. /* */
  7172. function initGlobalAPI (Vue) {
  7173. // config
  7174. var configDef = {};
  7175. configDef.get = function () { return config; };
  7176. if (true) {
  7177. configDef.set = function () {
  7178. warn(
  7179. 'Do not replace the Vue.config object, set individual fields instead.'
  7180. );
  7181. };
  7182. }
  7183. Object.defineProperty(Vue, 'config', configDef);
  7184. // exposed util methods.
  7185. // NOTE: these are not considered part of the public API - avoid relying on
  7186. // them unless you are aware of the risk.
  7187. Vue.util = {
  7188. warn: warn,
  7189. extend: extend,
  7190. mergeOptions: mergeOptions,
  7191. defineReactive: defineReactive$$1
  7192. };
  7193. Vue.set = set;
  7194. Vue.delete = del;
  7195. Vue.nextTick = nextTick;
  7196. // 2.6 explicit observable API
  7197. Vue.observable = function (obj) {
  7198. observe(obj);
  7199. return obj
  7200. };
  7201. Vue.options = Object.create(null);
  7202. ASSET_TYPES.forEach(function (type) {
  7203. Vue.options[type + 's'] = Object.create(null);
  7204. });
  7205. // this is used to identify the "base" constructor to extend all plain-object
  7206. // components with in Weex's multi-instance scenarios.
  7207. Vue.options._base = Vue;
  7208. extend(Vue.options.components, builtInComponents);
  7209. initUse(Vue);
  7210. initMixin$1(Vue);
  7211. initExtend(Vue);
  7212. initAssetRegisters(Vue);
  7213. }
  7214. initGlobalAPI(Vue);
  7215. Object.defineProperty(Vue.prototype, '$isServer', {
  7216. get: isServerRendering
  7217. });
  7218. Object.defineProperty(Vue.prototype, '$ssrContext', {
  7219. get: function get () {
  7220. /* istanbul ignore next */
  7221. return this.$vnode && this.$vnode.ssrContext
  7222. }
  7223. });
  7224. // expose FunctionalRenderContext for ssr runtime helper installation
  7225. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  7226. value: FunctionalRenderContext
  7227. });
  7228. Vue.version = '2.6.11';
  7229. /**
  7230. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  7231. */
  7232. var ARRAYTYPE = '[object Array]';
  7233. var OBJECTTYPE = '[object Object]';
  7234. // const FUNCTIONTYPE = '[object Function]'
  7235. function diff(current, pre) {
  7236. var result = {};
  7237. syncKeys(current, pre);
  7238. _diff(current, pre, '', result);
  7239. return result
  7240. }
  7241. function syncKeys(current, pre) {
  7242. if (current === pre) { return }
  7243. var rootCurrentType = type(current);
  7244. var rootPreType = type(pre);
  7245. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  7246. if(Object.keys(current).length >= Object.keys(pre).length){
  7247. for (var key in pre) {
  7248. var currentValue = current[key];
  7249. if (currentValue === undefined) {
  7250. current[key] = null;
  7251. } else {
  7252. syncKeys(currentValue, pre[key]);
  7253. }
  7254. }
  7255. }
  7256. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  7257. if (current.length >= pre.length) {
  7258. pre.forEach(function (item, index) {
  7259. syncKeys(current[index], item);
  7260. });
  7261. }
  7262. }
  7263. }
  7264. function _diff(current, pre, path, result) {
  7265. if (current === pre) { return }
  7266. var rootCurrentType = type(current);
  7267. var rootPreType = type(pre);
  7268. if (rootCurrentType == OBJECTTYPE) {
  7269. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  7270. setResult(result, path, current);
  7271. } else {
  7272. var loop = function ( key ) {
  7273. var currentValue = current[key];
  7274. var preValue = pre[key];
  7275. var currentType = type(currentValue);
  7276. var preType = type(preValue);
  7277. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  7278. if (currentValue != pre[key]) {
  7279. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  7280. }
  7281. } else if (currentType == ARRAYTYPE) {
  7282. if (preType != ARRAYTYPE) {
  7283. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  7284. } else {
  7285. if (currentValue.length < preValue.length) {
  7286. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  7287. } else {
  7288. currentValue.forEach(function (item, index) {
  7289. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  7290. });
  7291. }
  7292. }
  7293. } else if (currentType == OBJECTTYPE) {
  7294. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  7295. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  7296. } else {
  7297. for (var subKey in currentValue) {
  7298. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  7299. }
  7300. }
  7301. }
  7302. };
  7303. for (var key in current) loop( key );
  7304. }
  7305. } else if (rootCurrentType == ARRAYTYPE) {
  7306. if (rootPreType != ARRAYTYPE) {
  7307. setResult(result, path, current);
  7308. } else {
  7309. if (current.length < pre.length) {
  7310. setResult(result, path, current);
  7311. } else {
  7312. current.forEach(function (item, index) {
  7313. _diff(item, pre[index], path + '[' + index + ']', result);
  7314. });
  7315. }
  7316. }
  7317. } else {
  7318. setResult(result, path, current);
  7319. }
  7320. }
  7321. function setResult(result, k, v) {
  7322. // if (type(v) != FUNCTIONTYPE) {
  7323. result[k] = v;
  7324. // }
  7325. }
  7326. function type(obj) {
  7327. return Object.prototype.toString.call(obj)
  7328. }
  7329. /* */
  7330. function flushCallbacks$1(vm) {
  7331. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  7332. if (Object({"NODE_ENV":"development","VUE_APP_NAME":"bigDataa","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  7333. var mpInstance = vm.$scope;
  7334. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  7335. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  7336. }
  7337. var copies = vm.__next_tick_callbacks.slice(0);
  7338. vm.__next_tick_callbacks.length = 0;
  7339. for (var i = 0; i < copies.length; i++) {
  7340. copies[i]();
  7341. }
  7342. }
  7343. }
  7344. function hasRenderWatcher(vm) {
  7345. return queue.find(function (watcher) { return vm._watcher === watcher; })
  7346. }
  7347. function nextTick$1(vm, cb) {
  7348. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  7349. //2.nextTick 之前存在 render watcher
  7350. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  7351. if(Object({"NODE_ENV":"development","VUE_APP_NAME":"bigDataa","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  7352. var mpInstance = vm.$scope;
  7353. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  7354. ']:nextVueTick');
  7355. }
  7356. return nextTick(cb, vm)
  7357. }else{
  7358. if(Object({"NODE_ENV":"development","VUE_APP_NAME":"bigDataa","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  7359. var mpInstance$1 = vm.$scope;
  7360. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  7361. ']:nextMPTick');
  7362. }
  7363. }
  7364. var _resolve;
  7365. if (!vm.__next_tick_callbacks) {
  7366. vm.__next_tick_callbacks = [];
  7367. }
  7368. vm.__next_tick_callbacks.push(function () {
  7369. if (cb) {
  7370. try {
  7371. cb.call(vm);
  7372. } catch (e) {
  7373. handleError(e, vm, 'nextTick');
  7374. }
  7375. } else if (_resolve) {
  7376. _resolve(vm);
  7377. }
  7378. });
  7379. // $flow-disable-line
  7380. if (!cb && typeof Promise !== 'undefined') {
  7381. return new Promise(function (resolve) {
  7382. _resolve = resolve;
  7383. })
  7384. }
  7385. }
  7386. /* */
  7387. function cloneWithData(vm) {
  7388. // 确保当前 vm 所有数据被同步
  7389. var ret = Object.create(null);
  7390. var dataKeys = [].concat(
  7391. Object.keys(vm._data || {}),
  7392. Object.keys(vm._computedWatchers || {}));
  7393. dataKeys.reduce(function(ret, key) {
  7394. ret[key] = vm[key];
  7395. return ret
  7396. }, ret);
  7397. // vue-composition-api
  7398. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  7399. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  7400. if (rawBindings) {
  7401. Object.keys(rawBindings).forEach(function (key) {
  7402. ret[key] = vm[key];
  7403. });
  7404. }
  7405. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  7406. Object.assign(ret, vm.$mp.data || {});
  7407. if (
  7408. Array.isArray(vm.$options.behaviors) &&
  7409. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  7410. ) { //form-field
  7411. ret['name'] = vm.name;
  7412. ret['value'] = vm.value;
  7413. }
  7414. return JSON.parse(JSON.stringify(ret))
  7415. }
  7416. var patch = function(oldVnode, vnode) {
  7417. var this$1 = this;
  7418. if (vnode === null) { //destroy
  7419. return
  7420. }
  7421. if (this.mpType === 'page' || this.mpType === 'component') {
  7422. var mpInstance = this.$scope;
  7423. var data = Object.create(null);
  7424. try {
  7425. data = cloneWithData(this);
  7426. } catch (err) {
  7427. console.error(err);
  7428. }
  7429. data.__webviewId__ = mpInstance.data.__webviewId__;
  7430. var mpData = Object.create(null);
  7431. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  7432. mpData[key] = mpInstance.data[key];
  7433. });
  7434. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  7435. if (Object.keys(diffData).length) {
  7436. if (Object({"NODE_ENV":"development","VUE_APP_NAME":"bigDataa","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  7437. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  7438. ']差量更新',
  7439. JSON.stringify(diffData));
  7440. }
  7441. this.__next_tick_pending = true;
  7442. mpInstance.setData(diffData, function () {
  7443. this$1.__next_tick_pending = false;
  7444. flushCallbacks$1(this$1);
  7445. });
  7446. } else {
  7447. flushCallbacks$1(this);
  7448. }
  7449. }
  7450. };
  7451. /* */
  7452. function createEmptyRender() {
  7453. }
  7454. function mountComponent$1(
  7455. vm,
  7456. el,
  7457. hydrating
  7458. ) {
  7459. if (!vm.mpType) {//main.js 中的 new Vue
  7460. return vm
  7461. }
  7462. if (vm.mpType === 'app') {
  7463. vm.$options.render = createEmptyRender;
  7464. }
  7465. if (!vm.$options.render) {
  7466. vm.$options.render = createEmptyRender;
  7467. if (true) {
  7468. /* istanbul ignore if */
  7469. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  7470. vm.$options.el || el) {
  7471. warn(
  7472. 'You are using the runtime-only build of Vue where the template ' +
  7473. 'compiler is not available. Either pre-compile the templates into ' +
  7474. 'render functions, or use the compiler-included build.',
  7475. vm
  7476. );
  7477. } else {
  7478. warn(
  7479. 'Failed to mount component: template or render function not defined.',
  7480. vm
  7481. );
  7482. }
  7483. }
  7484. }
  7485. !vm._$fallback && callHook(vm, 'beforeMount');
  7486. var updateComponent = function () {
  7487. vm._update(vm._render(), hydrating);
  7488. };
  7489. // we set this to vm._watcher inside the watcher's constructor
  7490. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  7491. // component's mounted hook), which relies on vm._watcher being already defined
  7492. new Watcher(vm, updateComponent, noop, {
  7493. before: function before() {
  7494. if (vm._isMounted && !vm._isDestroyed) {
  7495. callHook(vm, 'beforeUpdate');
  7496. }
  7497. }
  7498. }, true /* isRenderWatcher */);
  7499. hydrating = false;
  7500. return vm
  7501. }
  7502. /* */
  7503. function renderClass (
  7504. staticClass,
  7505. dynamicClass
  7506. ) {
  7507. if (isDef(staticClass) || isDef(dynamicClass)) {
  7508. return concat(staticClass, stringifyClass(dynamicClass))
  7509. }
  7510. /* istanbul ignore next */
  7511. return ''
  7512. }
  7513. function concat (a, b) {
  7514. return a ? b ? (a + ' ' + b) : a : (b || '')
  7515. }
  7516. function stringifyClass (value) {
  7517. if (Array.isArray(value)) {
  7518. return stringifyArray(value)
  7519. }
  7520. if (isObject(value)) {
  7521. return stringifyObject(value)
  7522. }
  7523. if (typeof value === 'string') {
  7524. return value
  7525. }
  7526. /* istanbul ignore next */
  7527. return ''
  7528. }
  7529. function stringifyArray (value) {
  7530. var res = '';
  7531. var stringified;
  7532. for (var i = 0, l = value.length; i < l; i++) {
  7533. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  7534. if (res) { res += ' '; }
  7535. res += stringified;
  7536. }
  7537. }
  7538. return res
  7539. }
  7540. function stringifyObject (value) {
  7541. var res = '';
  7542. for (var key in value) {
  7543. if (value[key]) {
  7544. if (res) { res += ' '; }
  7545. res += key;
  7546. }
  7547. }
  7548. return res
  7549. }
  7550. /* */
  7551. var parseStyleText = cached(function (cssText) {
  7552. var res = {};
  7553. var listDelimiter = /;(?![^(]*\))/g;
  7554. var propertyDelimiter = /:(.+)/;
  7555. cssText.split(listDelimiter).forEach(function (item) {
  7556. if (item) {
  7557. var tmp = item.split(propertyDelimiter);
  7558. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  7559. }
  7560. });
  7561. return res
  7562. });
  7563. // normalize possible array / string values into Object
  7564. function normalizeStyleBinding (bindingStyle) {
  7565. if (Array.isArray(bindingStyle)) {
  7566. return toObject(bindingStyle)
  7567. }
  7568. if (typeof bindingStyle === 'string') {
  7569. return parseStyleText(bindingStyle)
  7570. }
  7571. return bindingStyle
  7572. }
  7573. /* */
  7574. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  7575. function getTarget(obj, path) {
  7576. var parts = path.split('.');
  7577. var key = parts[0];
  7578. if (key.indexOf('__$n') === 0) { //number index
  7579. key = parseInt(key.replace('__$n', ''));
  7580. }
  7581. if (parts.length === 1) {
  7582. return obj[key]
  7583. }
  7584. return getTarget(obj[key], parts.slice(1).join('.'))
  7585. }
  7586. function internalMixin(Vue) {
  7587. Vue.config.errorHandler = function(err, vm, info) {
  7588. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  7589. console.error(err);
  7590. /* eslint-disable no-undef */
  7591. var app = getApp();
  7592. if (app && app.onError) {
  7593. app.onError(err);
  7594. }
  7595. };
  7596. var oldEmit = Vue.prototype.$emit;
  7597. Vue.prototype.$emit = function(event) {
  7598. if (this.$scope && event) {
  7599. this.$scope['triggerEvent'](event, {
  7600. __args__: toArray(arguments, 1)
  7601. });
  7602. }
  7603. return oldEmit.apply(this, arguments)
  7604. };
  7605. Vue.prototype.$nextTick = function(fn) {
  7606. return nextTick$1(this, fn)
  7607. };
  7608. MP_METHODS.forEach(function (method) {
  7609. Vue.prototype[method] = function(args) {
  7610. if (this.$scope && this.$scope[method]) {
  7611. return this.$scope[method](args)
  7612. }
  7613. // mp-alipay
  7614. if (typeof my === 'undefined') {
  7615. return
  7616. }
  7617. if (method === 'createSelectorQuery') {
  7618. /* eslint-disable no-undef */
  7619. return my.createSelectorQuery(args)
  7620. } else if (method === 'createIntersectionObserver') {
  7621. /* eslint-disable no-undef */
  7622. return my.createIntersectionObserver(args)
  7623. }
  7624. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  7625. };
  7626. });
  7627. Vue.prototype.__init_provide = initProvide;
  7628. Vue.prototype.__init_injections = initInjections;
  7629. Vue.prototype.__call_hook = function(hook, args) {
  7630. var vm = this;
  7631. // #7573 disable dep collection when invoking lifecycle hooks
  7632. pushTarget();
  7633. var handlers = vm.$options[hook];
  7634. var info = hook + " hook";
  7635. var ret;
  7636. if (handlers) {
  7637. for (var i = 0, j = handlers.length; i < j; i++) {
  7638. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  7639. }
  7640. }
  7641. if (vm._hasHookEvent) {
  7642. vm.$emit('hook:' + hook, args);
  7643. }
  7644. popTarget();
  7645. return ret
  7646. };
  7647. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  7648. if (Array.isArray(modifiers)) {
  7649. if (modifiers.indexOf('trim') !== -1) {
  7650. value = value.trim();
  7651. }
  7652. if (modifiers.indexOf('number') !== -1) {
  7653. value = this._n(value);
  7654. }
  7655. }
  7656. if (!target) {
  7657. target = this;
  7658. }
  7659. target[key] = value;
  7660. };
  7661. Vue.prototype.__set_sync = function(target, key, value) {
  7662. if (!target) {
  7663. target = this;
  7664. }
  7665. target[key] = value;
  7666. };
  7667. Vue.prototype.__get_orig = function(item) {
  7668. if (isPlainObject(item)) {
  7669. return item['$orig'] || item
  7670. }
  7671. return item
  7672. };
  7673. Vue.prototype.__get_value = function(dataPath, target) {
  7674. return getTarget(target || this, dataPath)
  7675. };
  7676. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  7677. return renderClass(staticClass, dynamicClass)
  7678. };
  7679. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  7680. if (!dynamicStyle && !staticStyle) {
  7681. return ''
  7682. }
  7683. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  7684. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  7685. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  7686. };
  7687. Vue.prototype.__map = function(val, iteratee) {
  7688. //TODO 暂不考虑 string
  7689. var ret, i, l, keys, key;
  7690. if (Array.isArray(val)) {
  7691. ret = new Array(val.length);
  7692. for (i = 0, l = val.length; i < l; i++) {
  7693. ret[i] = iteratee(val[i], i);
  7694. }
  7695. return ret
  7696. } else if (isObject(val)) {
  7697. keys = Object.keys(val);
  7698. ret = Object.create(null);
  7699. for (i = 0, l = keys.length; i < l; i++) {
  7700. key = keys[i];
  7701. ret[key] = iteratee(val[key], key, i);
  7702. }
  7703. return ret
  7704. } else if (typeof val === 'number') {
  7705. ret = new Array(val);
  7706. for (i = 0, l = val; i < l; i++) {
  7707. // 第一个参数暂时仍和小程序一致
  7708. ret[i] = iteratee(i, i);
  7709. }
  7710. return ret
  7711. }
  7712. return []
  7713. };
  7714. }
  7715. /* */
  7716. var LIFECYCLE_HOOKS$1 = [
  7717. //App
  7718. 'onLaunch',
  7719. 'onShow',
  7720. 'onHide',
  7721. 'onUniNViewMessage',
  7722. 'onPageNotFound',
  7723. 'onThemeChange',
  7724. 'onError',
  7725. 'onUnhandledRejection',
  7726. //Page
  7727. 'onLoad',
  7728. // 'onShow',
  7729. 'onReady',
  7730. // 'onHide',
  7731. 'onUnload',
  7732. 'onPullDownRefresh',
  7733. 'onReachBottom',
  7734. 'onTabItemTap',
  7735. 'onAddToFavorites',
  7736. 'onShareTimeline',
  7737. 'onShareAppMessage',
  7738. 'onResize',
  7739. 'onPageScroll',
  7740. 'onNavigationBarButtonTap',
  7741. 'onBackPress',
  7742. 'onNavigationBarSearchInputChanged',
  7743. 'onNavigationBarSearchInputConfirmed',
  7744. 'onNavigationBarSearchInputClicked',
  7745. //Component
  7746. // 'onReady', // 兼容旧版本,应该移除该事件
  7747. 'onPageShow',
  7748. 'onPageHide',
  7749. 'onPageResize'
  7750. ];
  7751. function lifecycleMixin$1(Vue) {
  7752. //fixed vue-class-component
  7753. var oldExtend = Vue.extend;
  7754. Vue.extend = function(extendOptions) {
  7755. extendOptions = extendOptions || {};
  7756. var methods = extendOptions.methods;
  7757. if (methods) {
  7758. Object.keys(methods).forEach(function (methodName) {
  7759. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  7760. extendOptions[methodName] = methods[methodName];
  7761. delete methods[methodName];
  7762. }
  7763. });
  7764. }
  7765. return oldExtend.call(this, extendOptions)
  7766. };
  7767. var strategies = Vue.config.optionMergeStrategies;
  7768. var mergeHook = strategies.created;
  7769. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  7770. strategies[hook] = mergeHook;
  7771. });
  7772. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  7773. }
  7774. /* */
  7775. // install platform patch function
  7776. Vue.prototype.__patch__ = patch;
  7777. // public mount method
  7778. Vue.prototype.$mount = function(
  7779. el ,
  7780. hydrating
  7781. ) {
  7782. return mountComponent$1(this, el, hydrating)
  7783. };
  7784. lifecycleMixin$1(Vue);
  7785. internalMixin(Vue);
  7786. /* */
  7787. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  7788. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  7789. /***/ }),
  7790. /***/ 20:
  7791. /*!************************************************************!*\
  7792. !*** ./node_modules/regenerator-runtime/runtime-module.js ***!
  7793. \************************************************************/
  7794. /*! no static exports found */
  7795. /***/ (function(module, exports, __webpack_require__) {
  7796. /**
  7797. * Copyright (c) 2014-present, Facebook, Inc.
  7798. *
  7799. * This source code is licensed under the MIT license found in the
  7800. * LICENSE file in the root directory of this source tree.
  7801. */
  7802. // This method of obtaining a reference to the global object needs to be
  7803. // kept identical to the way it is obtained in runtime.js
  7804. var g = (function() {
  7805. return this || (typeof self === "object" && self);
  7806. })() || Function("return this")();
  7807. // Use `getOwnPropertyNames` because not all browsers support calling
  7808. // `hasOwnProperty` on the global `self` object in a worker. See #183.
  7809. var hadRuntime = g.regeneratorRuntime &&
  7810. Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0;
  7811. // Save the old regeneratorRuntime in case it needs to be restored later.
  7812. var oldRuntime = hadRuntime && g.regeneratorRuntime;
  7813. // Force reevalutation of runtime.js.
  7814. g.regeneratorRuntime = undefined;
  7815. module.exports = __webpack_require__(/*! ./runtime */ 21);
  7816. if (hadRuntime) {
  7817. // Restore the original runtime.
  7818. g.regeneratorRuntime = oldRuntime;
  7819. } else {
  7820. // Remove the global property added by runtime.js.
  7821. try {
  7822. delete g.regeneratorRuntime;
  7823. } catch(e) {
  7824. g.regeneratorRuntime = undefined;
  7825. }
  7826. }
  7827. /***/ }),
  7828. /***/ 206:
  7829. /*!************************************************!*\
  7830. !*** E:/bigData/components/uni-icons/icons.js ***!
  7831. \************************************************/
  7832. /*! no static exports found */
  7833. /***/ (function(module, exports, __webpack_require__) {
  7834. "use strict";
  7835. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  7836. 'contact': "\uE100",
  7837. 'person': "\uE101",
  7838. 'personadd': "\uE102",
  7839. 'contact-filled': "\uE130",
  7840. 'person-filled': "\uE131",
  7841. 'personadd-filled': "\uE132",
  7842. 'phone': "\uE200",
  7843. 'email': "\uE201",
  7844. 'chatbubble': "\uE202",
  7845. 'chatboxes': "\uE203",
  7846. 'phone-filled': "\uE230",
  7847. 'email-filled': "\uE231",
  7848. 'chatbubble-filled': "\uE232",
  7849. 'chatboxes-filled': "\uE233",
  7850. 'weibo': "\uE260",
  7851. 'weixin': "\uE261",
  7852. 'pengyouquan': "\uE262",
  7853. 'chat': "\uE263",
  7854. 'qq': "\uE264",
  7855. 'videocam': "\uE300",
  7856. 'camera': "\uE301",
  7857. 'mic': "\uE302",
  7858. 'location': "\uE303",
  7859. 'mic-filled': "\uE332",
  7860. 'speech': "\uE332",
  7861. 'location-filled': "\uE333",
  7862. 'micoff': "\uE360",
  7863. 'image': "\uE363",
  7864. 'map': "\uE364",
  7865. 'compose': "\uE400",
  7866. 'trash': "\uE401",
  7867. 'upload': "\uE402",
  7868. 'download': "\uE403",
  7869. 'close': "\uE404",
  7870. 'redo': "\uE405",
  7871. 'undo': "\uE406",
  7872. 'refresh': "\uE407",
  7873. 'star': "\uE408",
  7874. 'plus': "\uE409",
  7875. 'minus': "\uE410",
  7876. 'circle': "\uE411",
  7877. 'checkbox': "\uE411",
  7878. 'close-filled': "\uE434",
  7879. 'clear': "\uE434",
  7880. 'refresh-filled': "\uE437",
  7881. 'star-filled': "\uE438",
  7882. 'plus-filled': "\uE439",
  7883. 'minus-filled': "\uE440",
  7884. 'circle-filled': "\uE441",
  7885. 'checkbox-filled': "\uE442",
  7886. 'closeempty': "\uE460",
  7887. 'refreshempty': "\uE461",
  7888. 'reload': "\uE462",
  7889. 'starhalf': "\uE463",
  7890. 'spinner': "\uE464",
  7891. 'spinner-cycle': "\uE465",
  7892. 'search': "\uE466",
  7893. 'plusempty': "\uE468",
  7894. 'forward': "\uE470",
  7895. 'back': "\uE471",
  7896. 'left-nav': "\uE471",
  7897. 'checkmarkempty': "\uE472",
  7898. 'home': "\uE500",
  7899. 'navigate': "\uE501",
  7900. 'gear': "\uE502",
  7901. 'paperplane': "\uE503",
  7902. 'info': "\uE504",
  7903. 'help': "\uE505",
  7904. 'locked': "\uE506",
  7905. 'more': "\uE507",
  7906. 'flag': "\uE508",
  7907. 'home-filled': "\uE530",
  7908. 'gear-filled': "\uE532",
  7909. 'info-filled': "\uE534",
  7910. 'help-filled': "\uE535",
  7911. 'more-filled': "\uE537",
  7912. 'settings': "\uE560",
  7913. 'list': "\uE562",
  7914. 'bars': "\uE563",
  7915. 'loop': "\uE565",
  7916. 'paperclip': "\uE567",
  7917. 'eye': "\uE568",
  7918. 'arrowup': "\uE580",
  7919. 'arrowdown': "\uE581",
  7920. 'arrowleft': "\uE582",
  7921. 'arrowright': "\uE583",
  7922. 'arrowthinup': "\uE584",
  7923. 'arrowthindown': "\uE585",
  7924. 'arrowthinleft': "\uE586",
  7925. 'arrowthinright': "\uE587",
  7926. 'pulldown': "\uE588",
  7927. 'closefill': "\uE589",
  7928. 'sound': "\uE590",
  7929. 'scan': "\uE612" };exports.default = _default;
  7930. /***/ }),
  7931. /***/ 21:
  7932. /*!*****************************************************!*\
  7933. !*** ./node_modules/regenerator-runtime/runtime.js ***!
  7934. \*****************************************************/
  7935. /*! no static exports found */
  7936. /***/ (function(module, exports) {
  7937. /**
  7938. * Copyright (c) 2014-present, Facebook, Inc.
  7939. *
  7940. * This source code is licensed under the MIT license found in the
  7941. * LICENSE file in the root directory of this source tree.
  7942. */
  7943. !(function(global) {
  7944. "use strict";
  7945. var Op = Object.prototype;
  7946. var hasOwn = Op.hasOwnProperty;
  7947. var undefined; // More compressible than void 0.
  7948. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  7949. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  7950. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  7951. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  7952. var inModule = typeof module === "object";
  7953. var runtime = global.regeneratorRuntime;
  7954. if (runtime) {
  7955. if (inModule) {
  7956. // If regeneratorRuntime is defined globally and we're in a module,
  7957. // make the exports object identical to regeneratorRuntime.
  7958. module.exports = runtime;
  7959. }
  7960. // Don't bother evaluating the rest of this file if the runtime was
  7961. // already defined globally.
  7962. return;
  7963. }
  7964. // Define the runtime globally (as expected by generated code) as either
  7965. // module.exports (if we're in a module) or a new, empty object.
  7966. runtime = global.regeneratorRuntime = inModule ? module.exports : {};
  7967. function wrap(innerFn, outerFn, self, tryLocsList) {
  7968. // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
  7969. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  7970. var generator = Object.create(protoGenerator.prototype);
  7971. var context = new Context(tryLocsList || []);
  7972. // The ._invoke method unifies the implementations of the .next,
  7973. // .throw, and .return methods.
  7974. generator._invoke = makeInvokeMethod(innerFn, self, context);
  7975. return generator;
  7976. }
  7977. runtime.wrap = wrap;
  7978. // Try/catch helper to minimize deoptimizations. Returns a completion
  7979. // record like context.tryEntries[i].completion. This interface could
  7980. // have been (and was previously) designed to take a closure to be
  7981. // invoked without arguments, but in all the cases we care about we
  7982. // already have an existing method we want to call, so there's no need
  7983. // to create a new function object. We can even get away with assuming
  7984. // the method takes exactly one argument, since that happens to be true
  7985. // in every case, so we don't have to touch the arguments object. The
  7986. // only additional allocation required is the completion record, which
  7987. // has a stable shape and so hopefully should be cheap to allocate.
  7988. function tryCatch(fn, obj, arg) {
  7989. try {
  7990. return { type: "normal", arg: fn.call(obj, arg) };
  7991. } catch (err) {
  7992. return { type: "throw", arg: err };
  7993. }
  7994. }
  7995. var GenStateSuspendedStart = "suspendedStart";
  7996. var GenStateSuspendedYield = "suspendedYield";
  7997. var GenStateExecuting = "executing";
  7998. var GenStateCompleted = "completed";
  7999. // Returning this object from the innerFn has the same effect as
  8000. // breaking out of the dispatch switch statement.
  8001. var ContinueSentinel = {};
  8002. // Dummy constructor functions that we use as the .constructor and
  8003. // .constructor.prototype properties for functions that return Generator
  8004. // objects. For full spec compliance, you may wish to configure your
  8005. // minifier not to mangle the names of these two functions.
  8006. function Generator() {}
  8007. function GeneratorFunction() {}
  8008. function GeneratorFunctionPrototype() {}
  8009. // This is a polyfill for %IteratorPrototype% for environments that
  8010. // don't natively support it.
  8011. var IteratorPrototype = {};
  8012. IteratorPrototype[iteratorSymbol] = function () {
  8013. return this;
  8014. };
  8015. var getProto = Object.getPrototypeOf;
  8016. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  8017. if (NativeIteratorPrototype &&
  8018. NativeIteratorPrototype !== Op &&
  8019. hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  8020. // This environment has a native %IteratorPrototype%; use it instead
  8021. // of the polyfill.
  8022. IteratorPrototype = NativeIteratorPrototype;
  8023. }
  8024. var Gp = GeneratorFunctionPrototype.prototype =
  8025. Generator.prototype = Object.create(IteratorPrototype);
  8026. GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  8027. GeneratorFunctionPrototype.constructor = GeneratorFunction;
  8028. GeneratorFunctionPrototype[toStringTagSymbol] =
  8029. GeneratorFunction.displayName = "GeneratorFunction";
  8030. // Helper for defining the .next, .throw, and .return methods of the
  8031. // Iterator interface in terms of a single ._invoke method.
  8032. function defineIteratorMethods(prototype) {
  8033. ["next", "throw", "return"].forEach(function(method) {
  8034. prototype[method] = function(arg) {
  8035. return this._invoke(method, arg);
  8036. };
  8037. });
  8038. }
  8039. runtime.isGeneratorFunction = function(genFun) {
  8040. var ctor = typeof genFun === "function" && genFun.constructor;
  8041. return ctor
  8042. ? ctor === GeneratorFunction ||
  8043. // For the native GeneratorFunction constructor, the best we can
  8044. // do is to check its .name property.
  8045. (ctor.displayName || ctor.name) === "GeneratorFunction"
  8046. : false;
  8047. };
  8048. runtime.mark = function(genFun) {
  8049. if (Object.setPrototypeOf) {
  8050. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  8051. } else {
  8052. genFun.__proto__ = GeneratorFunctionPrototype;
  8053. if (!(toStringTagSymbol in genFun)) {
  8054. genFun[toStringTagSymbol] = "GeneratorFunction";
  8055. }
  8056. }
  8057. genFun.prototype = Object.create(Gp);
  8058. return genFun;
  8059. };
  8060. // Within the body of any async function, `await x` is transformed to
  8061. // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  8062. // `hasOwn.call(value, "__await")` to determine if the yielded value is
  8063. // meant to be awaited.
  8064. runtime.awrap = function(arg) {
  8065. return { __await: arg };
  8066. };
  8067. function AsyncIterator(generator) {
  8068. function invoke(method, arg, resolve, reject) {
  8069. var record = tryCatch(generator[method], generator, arg);
  8070. if (record.type === "throw") {
  8071. reject(record.arg);
  8072. } else {
  8073. var result = record.arg;
  8074. var value = result.value;
  8075. if (value &&
  8076. typeof value === "object" &&
  8077. hasOwn.call(value, "__await")) {
  8078. return Promise.resolve(value.__await).then(function(value) {
  8079. invoke("next", value, resolve, reject);
  8080. }, function(err) {
  8081. invoke("throw", err, resolve, reject);
  8082. });
  8083. }
  8084. return Promise.resolve(value).then(function(unwrapped) {
  8085. // When a yielded Promise is resolved, its final value becomes
  8086. // the .value of the Promise<{value,done}> result for the
  8087. // current iteration.
  8088. result.value = unwrapped;
  8089. resolve(result);
  8090. }, function(error) {
  8091. // If a rejected Promise was yielded, throw the rejection back
  8092. // into the async generator function so it can be handled there.
  8093. return invoke("throw", error, resolve, reject);
  8094. });
  8095. }
  8096. }
  8097. var previousPromise;
  8098. function enqueue(method, arg) {
  8099. function callInvokeWithMethodAndArg() {
  8100. return new Promise(function(resolve, reject) {
  8101. invoke(method, arg, resolve, reject);
  8102. });
  8103. }
  8104. return previousPromise =
  8105. // If enqueue has been called before, then we want to wait until
  8106. // all previous Promises have been resolved before calling invoke,
  8107. // so that results are always delivered in the correct order. If
  8108. // enqueue has not been called before, then it is important to
  8109. // call invoke immediately, without waiting on a callback to fire,
  8110. // so that the async generator function has the opportunity to do
  8111. // any necessary setup in a predictable way. This predictability
  8112. // is why the Promise constructor synchronously invokes its
  8113. // executor callback, and why async functions synchronously
  8114. // execute code before the first await. Since we implement simple
  8115. // async functions in terms of async generators, it is especially
  8116. // important to get this right, even though it requires care.
  8117. previousPromise ? previousPromise.then(
  8118. callInvokeWithMethodAndArg,
  8119. // Avoid propagating failures to Promises returned by later
  8120. // invocations of the iterator.
  8121. callInvokeWithMethodAndArg
  8122. ) : callInvokeWithMethodAndArg();
  8123. }
  8124. // Define the unified helper method that is used to implement .next,
  8125. // .throw, and .return (see defineIteratorMethods).
  8126. this._invoke = enqueue;
  8127. }
  8128. defineIteratorMethods(AsyncIterator.prototype);
  8129. AsyncIterator.prototype[asyncIteratorSymbol] = function () {
  8130. return this;
  8131. };
  8132. runtime.AsyncIterator = AsyncIterator;
  8133. // Note that simple async functions are implemented on top of
  8134. // AsyncIterator objects; they just return a Promise for the value of
  8135. // the final result produced by the iterator.
  8136. runtime.async = function(innerFn, outerFn, self, tryLocsList) {
  8137. var iter = new AsyncIterator(
  8138. wrap(innerFn, outerFn, self, tryLocsList)
  8139. );
  8140. return runtime.isGeneratorFunction(outerFn)
  8141. ? iter // If outerFn is a generator, return the full iterator.
  8142. : iter.next().then(function(result) {
  8143. return result.done ? result.value : iter.next();
  8144. });
  8145. };
  8146. function makeInvokeMethod(innerFn, self, context) {
  8147. var state = GenStateSuspendedStart;
  8148. return function invoke(method, arg) {
  8149. if (state === GenStateExecuting) {
  8150. throw new Error("Generator is already running");
  8151. }
  8152. if (state === GenStateCompleted) {
  8153. if (method === "throw") {
  8154. throw arg;
  8155. }
  8156. // Be forgiving, per 25.3.3.3.3 of the spec:
  8157. // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
  8158. return doneResult();
  8159. }
  8160. context.method = method;
  8161. context.arg = arg;
  8162. while (true) {
  8163. var delegate = context.delegate;
  8164. if (delegate) {
  8165. var delegateResult = maybeInvokeDelegate(delegate, context);
  8166. if (delegateResult) {
  8167. if (delegateResult === ContinueSentinel) continue;
  8168. return delegateResult;
  8169. }
  8170. }
  8171. if (context.method === "next") {
  8172. // Setting context._sent for legacy support of Babel's
  8173. // function.sent implementation.
  8174. context.sent = context._sent = context.arg;
  8175. } else if (context.method === "throw") {
  8176. if (state === GenStateSuspendedStart) {
  8177. state = GenStateCompleted;
  8178. throw context.arg;
  8179. }
  8180. context.dispatchException(context.arg);
  8181. } else if (context.method === "return") {
  8182. context.abrupt("return", context.arg);
  8183. }
  8184. state = GenStateExecuting;
  8185. var record = tryCatch(innerFn, self, context);
  8186. if (record.type === "normal") {
  8187. // If an exception is thrown from innerFn, we leave state ===
  8188. // GenStateExecuting and loop back for another invocation.
  8189. state = context.done
  8190. ? GenStateCompleted
  8191. : GenStateSuspendedYield;
  8192. if (record.arg === ContinueSentinel) {
  8193. continue;
  8194. }
  8195. return {
  8196. value: record.arg,
  8197. done: context.done
  8198. };
  8199. } else if (record.type === "throw") {
  8200. state = GenStateCompleted;
  8201. // Dispatch the exception by looping back around to the
  8202. // context.dispatchException(context.arg) call above.
  8203. context.method = "throw";
  8204. context.arg = record.arg;
  8205. }
  8206. }
  8207. };
  8208. }
  8209. // Call delegate.iterator[context.method](context.arg) and handle the
  8210. // result, either by returning a { value, done } result from the
  8211. // delegate iterator, or by modifying context.method and context.arg,
  8212. // setting context.delegate to null, and returning the ContinueSentinel.
  8213. function maybeInvokeDelegate(delegate, context) {
  8214. var method = delegate.iterator[context.method];
  8215. if (method === undefined) {
  8216. // A .throw or .return when the delegate iterator has no .throw
  8217. // method always terminates the yield* loop.
  8218. context.delegate = null;
  8219. if (context.method === "throw") {
  8220. if (delegate.iterator.return) {
  8221. // If the delegate iterator has a return method, give it a
  8222. // chance to clean up.
  8223. context.method = "return";
  8224. context.arg = undefined;
  8225. maybeInvokeDelegate(delegate, context);
  8226. if (context.method === "throw") {
  8227. // If maybeInvokeDelegate(context) changed context.method from
  8228. // "return" to "throw", let that override the TypeError below.
  8229. return ContinueSentinel;
  8230. }
  8231. }
  8232. context.method = "throw";
  8233. context.arg = new TypeError(
  8234. "The iterator does not provide a 'throw' method");
  8235. }
  8236. return ContinueSentinel;
  8237. }
  8238. var record = tryCatch(method, delegate.iterator, context.arg);
  8239. if (record.type === "throw") {
  8240. context.method = "throw";
  8241. context.arg = record.arg;
  8242. context.delegate = null;
  8243. return ContinueSentinel;
  8244. }
  8245. var info = record.arg;
  8246. if (! info) {
  8247. context.method = "throw";
  8248. context.arg = new TypeError("iterator result is not an object");
  8249. context.delegate = null;
  8250. return ContinueSentinel;
  8251. }
  8252. if (info.done) {
  8253. // Assign the result of the finished delegate to the temporary
  8254. // variable specified by delegate.resultName (see delegateYield).
  8255. context[delegate.resultName] = info.value;
  8256. // Resume execution at the desired location (see delegateYield).
  8257. context.next = delegate.nextLoc;
  8258. // If context.method was "throw" but the delegate handled the
  8259. // exception, let the outer generator proceed normally. If
  8260. // context.method was "next", forget context.arg since it has been
  8261. // "consumed" by the delegate iterator. If context.method was
  8262. // "return", allow the original .return call to continue in the
  8263. // outer generator.
  8264. if (context.method !== "return") {
  8265. context.method = "next";
  8266. context.arg = undefined;
  8267. }
  8268. } else {
  8269. // Re-yield the result returned by the delegate method.
  8270. return info;
  8271. }
  8272. // The delegate iterator is finished, so forget it and continue with
  8273. // the outer generator.
  8274. context.delegate = null;
  8275. return ContinueSentinel;
  8276. }
  8277. // Define Generator.prototype.{next,throw,return} in terms of the
  8278. // unified ._invoke helper method.
  8279. defineIteratorMethods(Gp);
  8280. Gp[toStringTagSymbol] = "Generator";
  8281. // A Generator should always return itself as the iterator object when the
  8282. // @@iterator function is called on it. Some browsers' implementations of the
  8283. // iterator prototype chain incorrectly implement this, causing the Generator
  8284. // object to not be returned from this call. This ensures that doesn't happen.
  8285. // See https://github.com/facebook/regenerator/issues/274 for more details.
  8286. Gp[iteratorSymbol] = function() {
  8287. return this;
  8288. };
  8289. Gp.toString = function() {
  8290. return "[object Generator]";
  8291. };
  8292. function pushTryEntry(locs) {
  8293. var entry = { tryLoc: locs[0] };
  8294. if (1 in locs) {
  8295. entry.catchLoc = locs[1];
  8296. }
  8297. if (2 in locs) {
  8298. entry.finallyLoc = locs[2];
  8299. entry.afterLoc = locs[3];
  8300. }
  8301. this.tryEntries.push(entry);
  8302. }
  8303. function resetTryEntry(entry) {
  8304. var record = entry.completion || {};
  8305. record.type = "normal";
  8306. delete record.arg;
  8307. entry.completion = record;
  8308. }
  8309. function Context(tryLocsList) {
  8310. // The root entry object (effectively a try statement without a catch
  8311. // or a finally block) gives us a place to store values thrown from
  8312. // locations where there is no enclosing try statement.
  8313. this.tryEntries = [{ tryLoc: "root" }];
  8314. tryLocsList.forEach(pushTryEntry, this);
  8315. this.reset(true);
  8316. }
  8317. runtime.keys = function(object) {
  8318. var keys = [];
  8319. for (var key in object) {
  8320. keys.push(key);
  8321. }
  8322. keys.reverse();
  8323. // Rather than returning an object with a next method, we keep
  8324. // things simple and return the next function itself.
  8325. return function next() {
  8326. while (keys.length) {
  8327. var key = keys.pop();
  8328. if (key in object) {
  8329. next.value = key;
  8330. next.done = false;
  8331. return next;
  8332. }
  8333. }
  8334. // To avoid creating an additional object, we just hang the .value
  8335. // and .done properties off the next function object itself. This
  8336. // also ensures that the minifier will not anonymize the function.
  8337. next.done = true;
  8338. return next;
  8339. };
  8340. };
  8341. function values(iterable) {
  8342. if (iterable) {
  8343. var iteratorMethod = iterable[iteratorSymbol];
  8344. if (iteratorMethod) {
  8345. return iteratorMethod.call(iterable);
  8346. }
  8347. if (typeof iterable.next === "function") {
  8348. return iterable;
  8349. }
  8350. if (!isNaN(iterable.length)) {
  8351. var i = -1, next = function next() {
  8352. while (++i < iterable.length) {
  8353. if (hasOwn.call(iterable, i)) {
  8354. next.value = iterable[i];
  8355. next.done = false;
  8356. return next;
  8357. }
  8358. }
  8359. next.value = undefined;
  8360. next.done = true;
  8361. return next;
  8362. };
  8363. return next.next = next;
  8364. }
  8365. }
  8366. // Return an iterator with no values.
  8367. return { next: doneResult };
  8368. }
  8369. runtime.values = values;
  8370. function doneResult() {
  8371. return { value: undefined, done: true };
  8372. }
  8373. Context.prototype = {
  8374. constructor: Context,
  8375. reset: function(skipTempReset) {
  8376. this.prev = 0;
  8377. this.next = 0;
  8378. // Resetting context._sent for legacy support of Babel's
  8379. // function.sent implementation.
  8380. this.sent = this._sent = undefined;
  8381. this.done = false;
  8382. this.delegate = null;
  8383. this.method = "next";
  8384. this.arg = undefined;
  8385. this.tryEntries.forEach(resetTryEntry);
  8386. if (!skipTempReset) {
  8387. for (var name in this) {
  8388. // Not sure about the optimal order of these conditions:
  8389. if (name.charAt(0) === "t" &&
  8390. hasOwn.call(this, name) &&
  8391. !isNaN(+name.slice(1))) {
  8392. this[name] = undefined;
  8393. }
  8394. }
  8395. }
  8396. },
  8397. stop: function() {
  8398. this.done = true;
  8399. var rootEntry = this.tryEntries[0];
  8400. var rootRecord = rootEntry.completion;
  8401. if (rootRecord.type === "throw") {
  8402. throw rootRecord.arg;
  8403. }
  8404. return this.rval;
  8405. },
  8406. dispatchException: function(exception) {
  8407. if (this.done) {
  8408. throw exception;
  8409. }
  8410. var context = this;
  8411. function handle(loc, caught) {
  8412. record.type = "throw";
  8413. record.arg = exception;
  8414. context.next = loc;
  8415. if (caught) {
  8416. // If the dispatched exception was caught by a catch block,
  8417. // then let that catch block handle the exception normally.
  8418. context.method = "next";
  8419. context.arg = undefined;
  8420. }
  8421. return !! caught;
  8422. }
  8423. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  8424. var entry = this.tryEntries[i];
  8425. var record = entry.completion;
  8426. if (entry.tryLoc === "root") {
  8427. // Exception thrown outside of any try block that could handle
  8428. // it, so set the completion value of the entire function to
  8429. // throw the exception.
  8430. return handle("end");
  8431. }
  8432. if (entry.tryLoc <= this.prev) {
  8433. var hasCatch = hasOwn.call(entry, "catchLoc");
  8434. var hasFinally = hasOwn.call(entry, "finallyLoc");
  8435. if (hasCatch && hasFinally) {
  8436. if (this.prev < entry.catchLoc) {
  8437. return handle(entry.catchLoc, true);
  8438. } else if (this.prev < entry.finallyLoc) {
  8439. return handle(entry.finallyLoc);
  8440. }
  8441. } else if (hasCatch) {
  8442. if (this.prev < entry.catchLoc) {
  8443. return handle(entry.catchLoc, true);
  8444. }
  8445. } else if (hasFinally) {
  8446. if (this.prev < entry.finallyLoc) {
  8447. return handle(entry.finallyLoc);
  8448. }
  8449. } else {
  8450. throw new Error("try statement without catch or finally");
  8451. }
  8452. }
  8453. }
  8454. },
  8455. abrupt: function(type, arg) {
  8456. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  8457. var entry = this.tryEntries[i];
  8458. if (entry.tryLoc <= this.prev &&
  8459. hasOwn.call(entry, "finallyLoc") &&
  8460. this.prev < entry.finallyLoc) {
  8461. var finallyEntry = entry;
  8462. break;
  8463. }
  8464. }
  8465. if (finallyEntry &&
  8466. (type === "break" ||
  8467. type === "continue") &&
  8468. finallyEntry.tryLoc <= arg &&
  8469. arg <= finallyEntry.finallyLoc) {
  8470. // Ignore the finally entry if control is not jumping to a
  8471. // location outside the try/catch block.
  8472. finallyEntry = null;
  8473. }
  8474. var record = finallyEntry ? finallyEntry.completion : {};
  8475. record.type = type;
  8476. record.arg = arg;
  8477. if (finallyEntry) {
  8478. this.method = "next";
  8479. this.next = finallyEntry.finallyLoc;
  8480. return ContinueSentinel;
  8481. }
  8482. return this.complete(record);
  8483. },
  8484. complete: function(record, afterLoc) {
  8485. if (record.type === "throw") {
  8486. throw record.arg;
  8487. }
  8488. if (record.type === "break" ||
  8489. record.type === "continue") {
  8490. this.next = record.arg;
  8491. } else if (record.type === "return") {
  8492. this.rval = this.arg = record.arg;
  8493. this.method = "return";
  8494. this.next = "end";
  8495. } else if (record.type === "normal" && afterLoc) {
  8496. this.next = afterLoc;
  8497. }
  8498. return ContinueSentinel;
  8499. },
  8500. finish: function(finallyLoc) {
  8501. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  8502. var entry = this.tryEntries[i];
  8503. if (entry.finallyLoc === finallyLoc) {
  8504. this.complete(entry.completion, entry.afterLoc);
  8505. resetTryEntry(entry);
  8506. return ContinueSentinel;
  8507. }
  8508. }
  8509. },
  8510. "catch": function(tryLoc) {
  8511. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  8512. var entry = this.tryEntries[i];
  8513. if (entry.tryLoc === tryLoc) {
  8514. var record = entry.completion;
  8515. if (record.type === "throw") {
  8516. var thrown = record.arg;
  8517. resetTryEntry(entry);
  8518. }
  8519. return thrown;
  8520. }
  8521. }
  8522. // The context.catch method must only be called with a location
  8523. // argument that corresponds to a known catch block.
  8524. throw new Error("illegal catch attempt");
  8525. },
  8526. delegateYield: function(iterable, resultName, nextLoc) {
  8527. this.delegate = {
  8528. iterator: values(iterable),
  8529. resultName: resultName,
  8530. nextLoc: nextLoc
  8531. };
  8532. if (this.method === "next") {
  8533. // Deliberately forget the last sent value so that we don't
  8534. // accidentally pass it on to the delegate.
  8535. this.arg = undefined;
  8536. }
  8537. return ContinueSentinel;
  8538. }
  8539. };
  8540. })(
  8541. // In sloppy mode, unbound `this` refers to the global object, fallback to
  8542. // Function constructor if we're in global strict mode. That is sadly a form
  8543. // of indirect eval which violates Content Security Policy.
  8544. (function() {
  8545. return this || (typeof self === "object" && self);
  8546. })() || Function("return this")()
  8547. );
  8548. /***/ }),
  8549. /***/ 22:
  8550. /*!*******************************************************!*\
  8551. !*** E:/bigData/uview-ui/libs/function/timeFormat.js ***!
  8552. \*******************************************************/
  8553. /*! no static exports found */
  8554. /***/ (function(module, exports, __webpack_require__) {
  8555. "use strict";
  8556. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // padStart 的 polyfill,因为某些机型或情况,还无法支持es7的padStart,比如电脑版的微信小程序
  8557. // 所以这里做一个兼容polyfill的兼容处理
  8558. if (!String.prototype.padStart) {
  8559. // 为了方便表示这里 fillString 用了ES6 的默认参数,不影响理解
  8560. String.prototype.padStart = function (maxLength) {var fillString = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ' ';
  8561. if (Object.prototype.toString.call(fillString) !== "[object String]") throw new TypeError(
  8562. 'fillString must be String');
  8563. var str = this;
  8564. // 返回 String(str) 这里是为了使返回的值是字符串字面量,在控制台中更符合直觉
  8565. if (str.length >= maxLength) return String(str);
  8566. var fillLength = maxLength - str.length,
  8567. times = Math.ceil(fillLength / fillString.length);
  8568. while (times >>= 1) {
  8569. fillString += fillString;
  8570. if (times === 1) {
  8571. fillString += fillString;
  8572. }
  8573. }
  8574. return fillString.slice(0, fillLength) + str;
  8575. };
  8576. }
  8577. // 其他更多是格式化有如下:
  8578. // yyyy:mm:dd|yyyy:mm|yyyy年mm月dd日|yyyy年mm月dd日 hh时MM分等,可自定义组合
  8579. function timeFormat() {var dateTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;var fmt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  8580. // 如果为null,则格式化当前时间
  8581. if (!dateTime) dateTime = Number(new Date());
  8582. // 如果dateTime长度为10或者13,则为秒和毫秒的时间戳,如果超过13位,则为其他的时间格式
  8583. if (dateTime.toString().length == 10) dateTime *= 1000;
  8584. var date = new Date(Number(dateTime));
  8585. var ret;
  8586. var opt = {
  8587. "y+": date.getFullYear().toString(), // 年
  8588. "m+": (date.getMonth() + 1).toString(), // 月
  8589. "d+": date.getDate().toString(), // 日
  8590. "h+": date.getHours().toString(), // 时
  8591. "M+": date.getMinutes().toString(), // 分
  8592. "s+": date.getSeconds().toString() // 秒
  8593. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  8594. };
  8595. for (var k in opt) {
  8596. ret = new RegExp("(" + k + ")").exec(fmt);
  8597. if (ret) {
  8598. fmt = fmt.replace(ret[1], ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, "0"));
  8599. };
  8600. };
  8601. return fmt;
  8602. }var _default =
  8603. timeFormat;exports.default = _default;
  8604. /***/ }),
  8605. /***/ 23:
  8606. /*!*****************************************************!*\
  8607. !*** E:/bigData/uview-ui/libs/function/timeFrom.js ***!
  8608. \*****************************************************/
  8609. /*! no static exports found */
  8610. /***/ (function(module, exports, __webpack_require__) {
  8611. "use strict";
  8612. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _timeFormat = _interopRequireDefault(__webpack_require__(/*! ../../libs/function/timeFormat.js */ 22));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  8613. /**
  8614. * 时间戳转为多久之前
  8615. * @param String timestamp 时间戳
  8616. * @param String | Boolean format 如果为时间格式字符串,超出一定时间范围,返回固定的时间格式;
  8617. * 如果为布尔值false,无论什么时间,都返回多久以前的格式
  8618. */
  8619. function timeFrom() {var dateTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  8620. // 如果为null,则格式化当前时间
  8621. if (!dateTime) dateTime = Number(new Date());
  8622. // 如果dateTime长度为10或者13,则为秒和毫秒的时间戳,如果超过13位,则为其他的时间格式
  8623. if (dateTime.toString().length == 10) dateTime *= 1000;
  8624. var timestamp = +new Date(Number(dateTime));
  8625. var timer = (Number(new Date()) - timestamp) / 1000;
  8626. // 如果小于5分钟,则返回"刚刚",其他以此类推
  8627. var tips = '';
  8628. switch (true) {
  8629. case timer < 300:
  8630. tips = '刚刚';
  8631. break;
  8632. case timer >= 300 && timer < 3600:
  8633. tips = parseInt(timer / 60) + '分钟前';
  8634. break;
  8635. case timer >= 3600 && timer < 86400:
  8636. tips = parseInt(timer / 3600) + '小时前';
  8637. break;
  8638. case timer >= 86400 && timer < 2592000:
  8639. tips = parseInt(timer / 86400) + '天前';
  8640. break;
  8641. default:
  8642. // 如果format为false,则无论什么时间戳,都显示xx之前
  8643. if (format === false) {
  8644. if (timer >= 2592000 && timer < 365 * 86400) {
  8645. tips = parseInt(timer / (86400 * 30)) + '个月前';
  8646. } else {
  8647. tips = parseInt(timer / (86400 * 365)) + '年前';
  8648. }
  8649. } else {
  8650. tips = (0, _timeFormat.default)(timestamp, format);
  8651. }}
  8652. return tips;
  8653. }var _default =
  8654. timeFrom;exports.default = _default;
  8655. /***/ }),
  8656. /***/ 24:
  8657. /*!**********************************************************!*\
  8658. !*** E:/bigData/uview-ui/libs/function/colorGradient.js ***!
  8659. \**********************************************************/
  8660. /*! no static exports found */
  8661. /***/ (function(module, exports, __webpack_require__) {
  8662. "use strict";
  8663. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; /**
  8664. * 求两个颜色之间的渐变值
  8665. * @param {string} startColor 开始的颜色
  8666. * @param {string} endColor 结束的颜色
  8667. * @param {number} step 颜色等分的份额
  8668. * */
  8669. function colorGradient() {var startColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'rgb(0, 0, 0)';var endColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rgb(255, 255, 255)';var step = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
  8670. var startRGB = hexToRgb(startColor, false); //转换为rgb数组模式
  8671. var startR = startRGB[0];
  8672. var startG = startRGB[1];
  8673. var startB = startRGB[2];
  8674. var endRGB = hexToRgb(endColor, false);
  8675. var endR = endRGB[0];
  8676. var endG = endRGB[1];
  8677. var endB = endRGB[2];
  8678. var sR = (endR - startR) / step; //总差值
  8679. var sG = (endG - startG) / step;
  8680. var sB = (endB - startB) / step;
  8681. var colorArr = [];
  8682. for (var i = 0; i < step; i++) {
  8683. //计算每一步的hex值
  8684. var hex = rgbToHex('rgb(' + Math.round(sR * i + startR) + ',' + Math.round(sG * i + startG) + ',' + Math.round(sB *
  8685. i + startB) + ')');
  8686. colorArr.push(hex);
  8687. }
  8688. return colorArr;
  8689. }
  8690. // 将hex表示方式转换为rgb表示方式(这里返回rgb数组模式)
  8691. function hexToRgb(sColor) {var str = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  8692. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  8693. sColor = sColor.toLowerCase();
  8694. if (sColor && reg.test(sColor)) {
  8695. if (sColor.length === 4) {
  8696. var sColorNew = "#";
  8697. for (var i = 1; i < 4; i += 1) {
  8698. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  8699. }
  8700. sColor = sColorNew;
  8701. }
  8702. //处理六位的颜色值
  8703. var sColorChange = [];
  8704. for (var _i = 1; _i < 7; _i += 2) {
  8705. sColorChange.push(parseInt("0x" + sColor.slice(_i, _i + 2)));
  8706. }
  8707. if (!str) {
  8708. return sColorChange;
  8709. } else {
  8710. return "rgb(".concat(sColorChange[0], ",").concat(sColorChange[1], ",").concat(sColorChange[2], ")");
  8711. }
  8712. } else if (/^(rgb|RGB)/.test(sColor)) {
  8713. var arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  8714. return arr.map(function (val) {return Number(val);});
  8715. } else {
  8716. return sColor;
  8717. }
  8718. };
  8719. // 将rgb表示方式转换为hex表示方式
  8720. function rgbToHex(rgb) {
  8721. var _this = rgb;
  8722. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  8723. if (/^(rgb|RGB)/.test(_this)) {
  8724. var aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  8725. var strHex = "#";
  8726. for (var i = 0; i < aColor.length; i++) {
  8727. var hex = Number(aColor[i]).toString(16);
  8728. hex = String(hex).length == 1 ? 0 + '' + hex : hex; // 保证每个rgb的值为2位
  8729. if (hex === "0") {
  8730. hex += hex;
  8731. }
  8732. strHex += hex;
  8733. }
  8734. if (strHex.length !== 7) {
  8735. strHex = _this;
  8736. }
  8737. return strHex;
  8738. } else if (reg.test(_this)) {
  8739. var aNum = _this.replace(/#/, "").split("");
  8740. if (aNum.length === 6) {
  8741. return _this;
  8742. } else if (aNum.length === 3) {
  8743. var numHex = "#";
  8744. for (var _i2 = 0; _i2 < aNum.length; _i2 += 1) {
  8745. numHex += aNum[_i2] + aNum[_i2];
  8746. }
  8747. return numHex;
  8748. }
  8749. } else {
  8750. return _this;
  8751. }
  8752. }
  8753. /**
  8754. * JS颜色十六进制转换为rgb或rgba,返回的格式为 rgba(255,255,255,0.5)字符串
  8755. * sHex为传入的十六进制的色值
  8756. * alpha为rgba的透明度
  8757. */
  8758. function colorToRgba(color) {var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.3;
  8759. color = rgbToHex(color);
  8760. // 十六进制颜色值的正则表达式
  8761. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  8762. /* 16进制颜色转为RGB格式 */
  8763. var sColor = color.toLowerCase();
  8764. if (sColor && reg.test(sColor)) {
  8765. if (sColor.length === 4) {
  8766. var sColorNew = '#';
  8767. for (var i = 1; i < 4; i += 1) {
  8768. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  8769. }
  8770. sColor = sColorNew;
  8771. }
  8772. // 处理六位的颜色值
  8773. var sColorChange = [];
  8774. for (var _i3 = 1; _i3 < 7; _i3 += 2) {
  8775. sColorChange.push(parseInt('0x' + sColor.slice(_i3, _i3 + 2)));
  8776. }
  8777. // return sColorChange.join(',')
  8778. return 'rgba(' + sColorChange.join(',') + ',' + alpha + ')';
  8779. } else
  8780. {
  8781. return sColor;
  8782. }
  8783. }var _default =
  8784. {
  8785. colorGradient: colorGradient,
  8786. hexToRgb: hexToRgb,
  8787. rgbToHex: rgbToHex,
  8788. colorToRgba: colorToRgba };exports.default = _default;
  8789. /***/ }),
  8790. /***/ 25:
  8791. /*!*************************************************!*\
  8792. !*** E:/bigData/uview-ui/libs/function/guid.js ***!
  8793. \*************************************************/
  8794. /*! no static exports found */
  8795. /***/ (function(module, exports, __webpack_require__) {
  8796. "use strict";
  8797. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; /**
  8798. * 本算法来源于简书开源代码,详见:https://www.jianshu.com/p/fdbf293d0a85
  8799. * 全局唯一标识符(uuid,Globally Unique Identifier),也称作 uuid(Universally Unique IDentifier)
  8800. * 一般用于多个组件之间,给它一个唯一的标识符,或者v-for循环的时候,如果使用数组的index可能会导致更新列表出现问题
  8801. * 最可能的情况是左滑删除item或者对某条信息流"不喜欢"并去掉它的时候,会导致组件内的数据可能出现错乱
  8802. * v-for的时候,推荐使用后端返回的id而不是循环的index
  8803. * @param {Number} len uuid的长度
  8804. * @param {Boolean} firstU 将返回的首字母置为"u"
  8805. * @param {Nubmer} radix 生成uuid的基数(意味着返回的字符串都是这个基数),2-二进制,8-八进制,10-十进制,16-十六进制
  8806. */
  8807. function guid() {var len = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 32;var firstU = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;var radix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  8808. var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
  8809. var uuid = [];
  8810. radix = radix || chars.length;
  8811. if (len) {
  8812. // 如果指定uuid长度,只是取随机的字符,0|x为位运算,能去掉x的小数位,返回整数位
  8813. for (var i = 0; i < len; i++) {uuid[i] = chars[0 | Math.random() * radix];}
  8814. } else {
  8815. var r;
  8816. // rfc4122标准要求返回的uuid中,某些位为固定的字符
  8817. uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
  8818. uuid[14] = '4';
  8819. for (var _i = 0; _i < 36; _i++) {
  8820. if (!uuid[_i]) {
  8821. r = 0 | Math.random() * 16;
  8822. uuid[_i] = chars[_i == 19 ? r & 0x3 | 0x8 : r];
  8823. }
  8824. }
  8825. }
  8826. // 移除第一个字符,并用u替代,因为第一个字符为数值时,该guuid不能用作id或者class
  8827. if (firstU) {
  8828. uuid.shift();
  8829. return 'u' + uuid.join('');
  8830. } else {
  8831. return uuid.join('');
  8832. }
  8833. }var _default =
  8834. guid;exports.default = _default;
  8835. /***/ }),
  8836. /***/ 26:
  8837. /*!**************************************************!*\
  8838. !*** E:/bigData/uview-ui/libs/function/color.js ***!
  8839. \**************************************************/
  8840. /*! no static exports found */
  8841. /***/ (function(module, exports, __webpack_require__) {
  8842. "use strict";
  8843. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // 为了让用户能够自定义主题,会逐步弃用此文件,各颜色通过css提供
  8844. // 为了给某些特殊场景使用和向后兼容,无需删除此文件(2020-06-20)
  8845. var color = {
  8846. primary: "#2979ff",
  8847. primaryDark: "#2b85e4",
  8848. primaryDisabled: "#a0cfff",
  8849. primaryLight: "#ecf5ff",
  8850. bgColor: "#f3f4f6",
  8851. info: "#909399",
  8852. infoDark: "#82848a",
  8853. infoDisabled: "#c8c9cc",
  8854. infoLight: "#f4f4f5",
  8855. warning: "#ff9900",
  8856. warningDark: "#f29100",
  8857. warningDisabled: "#fcbd71",
  8858. warningLight: "#fdf6ec",
  8859. error: "#fa3534",
  8860. errorDark: "#dd6161",
  8861. errorDisabled: "#fab6b6",
  8862. errorLight: "#fef0f0",
  8863. success: "#19be6b",
  8864. successDark: "#18b566",
  8865. successDisabled: "#71d5a1",
  8866. successLight: "#dbf1e1",
  8867. mainColor: "#303133",
  8868. contentColor: "#606266",
  8869. tipsColor: "#909399",
  8870. lightColor: "#c0c4cc",
  8871. borderColor: "#e4e7ed" };var _default =
  8872. color;exports.default = _default;
  8873. /***/ }),
  8874. /***/ 27:
  8875. /*!******************************************************!*\
  8876. !*** E:/bigData/uview-ui/libs/function/type2icon.js ***!
  8877. \******************************************************/
  8878. /*! no static exports found */
  8879. /***/ (function(module, exports, __webpack_require__) {
  8880. "use strict";
  8881. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; /**
  8882. * 根据主题type值,获取对应的图标
  8883. * @param String type 主题名称,primary|info|error|warning|success
  8884. * @param String fill 是否使用fill填充实体的图标
  8885. */
  8886. function type2icon() {var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'success';var fill = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  8887. // 如果非预置值,默认为success
  8888. if (['primary', 'info', 'error', 'warning', 'success'].indexOf(type) == -1) type = 'success';
  8889. var iconName = '';
  8890. // 目前(2019-12-12),info和primary使用同一个图标
  8891. switch (type) {
  8892. case 'primary':
  8893. iconName = 'info-circle';
  8894. break;
  8895. case 'info':
  8896. iconName = 'info-circle';
  8897. break;
  8898. case 'error':
  8899. iconName = 'close-circle';
  8900. break;
  8901. case 'warning':
  8902. iconName = 'error-circle';
  8903. break;
  8904. case 'success':
  8905. iconName = 'checkmark-circle';
  8906. break;
  8907. default:
  8908. iconName = 'checkmark-circle';}
  8909. // 是否是实体类型,加上-fill,在icon组件库中,实体的类名是后面加-fill的
  8910. if (fill) iconName += '-fill';
  8911. return iconName;
  8912. }var _default =
  8913. type2icon;exports.default = _default;
  8914. /***/ }),
  8915. /***/ 28:
  8916. /*!********************************************************!*\
  8917. !*** E:/bigData/uview-ui/libs/function/randomArray.js ***!
  8918. \********************************************************/
  8919. /*! no static exports found */
  8920. /***/ (function(module, exports, __webpack_require__) {
  8921. "use strict";
  8922. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // 打乱数组
  8923. function randomArray() {var array = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  8924. // 原理是sort排序,Math.random()产生0<= x < 1之间的数,会导致x-0.05大于或者小于0
  8925. return array.sort(function () {return Math.random() - 0.5;});
  8926. }var _default =
  8927. randomArray;exports.default = _default;
  8928. /***/ }),
  8929. /***/ 29:
  8930. /*!****************************************************!*\
  8931. !*** E:/bigData/uview-ui/libs/function/addUnit.js ***!
  8932. \****************************************************/
  8933. /*! no static exports found */
  8934. /***/ (function(module, exports, __webpack_require__) {
  8935. "use strict";
  8936. Object.defineProperty(exports, "__esModule", { value: true });exports.default = addUnit;var _test = _interopRequireDefault(__webpack_require__(/*! ./test.js */ 16));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  8937. // 添加单位,如果有rpx,%,px等单位结尾或者值为auto,直接返回,否则加上rpx单位结尾
  8938. function addUnit() {var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'auto';var unit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rpx';
  8939. value = String(value);
  8940. // 用uView内置验证规则中的number判断是否为数值
  8941. return _test.default.number(value) ? "".concat(value).concat(unit) : value;
  8942. }
  8943. /***/ }),
  8944. /***/ 3:
  8945. /*!***********************************!*\
  8946. !*** (webpack)/buildin/global.js ***!
  8947. \***********************************/
  8948. /*! no static exports found */
  8949. /***/ (function(module, exports) {
  8950. var g;
  8951. // This works in non-strict mode
  8952. g = (function() {
  8953. return this;
  8954. })();
  8955. try {
  8956. // This works if eval is allowed (see CSP)
  8957. g = g || new Function("return this")();
  8958. } catch (e) {
  8959. // This works if the window reference is available
  8960. if (typeof window === "object") g = window;
  8961. }
  8962. // g can still be undefined, but nothing to do about it...
  8963. // We return undefined, instead of nothing here, so it's
  8964. // easier to handle this case. if(!global) { ...}
  8965. module.exports = g;
  8966. /***/ }),
  8967. /***/ 30:
  8968. /*!***************************************************!*\
  8969. !*** E:/bigData/uview-ui/libs/function/random.js ***!
  8970. \***************************************************/
  8971. /*! no static exports found */
  8972. /***/ (function(module, exports, __webpack_require__) {
  8973. "use strict";
  8974. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;function random(min, max) {
  8975. if (min >= 0 && max > 0 && max >= min) {
  8976. var gab = max - min + 1;
  8977. return Math.floor(Math.random() * gab + min);
  8978. } else {
  8979. return 0;
  8980. }
  8981. }var _default =
  8982. random;exports.default = _default;
  8983. /***/ }),
  8984. /***/ 31:
  8985. /*!*************************************************!*\
  8986. !*** E:/bigData/uview-ui/libs/function/trim.js ***!
  8987. \*************************************************/
  8988. /*! no static exports found */
  8989. /***/ (function(module, exports, __webpack_require__) {
  8990. "use strict";
  8991. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;function trim(str) {var pos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'both';
  8992. if (pos == 'both') {
  8993. return str.replace(/^\s+|\s+$/g, "");
  8994. } else if (pos == "left") {
  8995. return str.replace(/^\s*/, '');
  8996. } else if (pos == 'right') {
  8997. return str.replace(/(\s*$)/g, "");
  8998. } else if (pos == 'all') {
  8999. return str.replace(/\s+/g, "");
  9000. } else {
  9001. return str;
  9002. }
  9003. }var _default =
  9004. trim;exports.default = _default;
  9005. /***/ }),
  9006. /***/ 32:
  9007. /*!**************************************************!*\
  9008. !*** E:/bigData/uview-ui/libs/function/toast.js ***!
  9009. \**************************************************/
  9010. /*! no static exports found */
  9011. /***/ (function(module, exports, __webpack_require__) {
  9012. "use strict";
  9013. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;function toast(title) {var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1500;
  9014. uni.showToast({
  9015. title: title,
  9016. icon: 'none',
  9017. duration: duration });
  9018. }var _default =
  9019. toast;exports.default = _default;
  9020. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  9021. /***/ }),
  9022. /***/ 33:
  9023. /*!******************************************************!*\
  9024. !*** E:/bigData/uview-ui/libs/function/getParent.js ***!
  9025. \******************************************************/
  9026. /*! no static exports found */
  9027. /***/ (function(module, exports, __webpack_require__) {
  9028. "use strict";
  9029. Object.defineProperty(exports, "__esModule", { value: true });exports.default = getParent; // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
  9030. // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx
  9031. function getParent(name, keys) {
  9032. var parent = this.$parent;
  9033. // 通过while历遍,这里主要是为了H5需要多层解析的问题
  9034. while (parent) {
  9035. // 父组件
  9036. if (parent.$options.name !== name) {
  9037. // 如果组件的name不相等,继续上一级寻找
  9038. parent = parent.$parent;
  9039. } else {var _ret = function () {
  9040. var data = {};
  9041. // 判断keys是否数组,如果传过来的是一个数组,那么直接使用数组元素值当做键值去父组件寻找
  9042. if (Array.isArray(keys)) {
  9043. keys.map(function (val) {
  9044. data[val] = parent[val] ? parent[val] : '';
  9045. });
  9046. } else {
  9047. // 历遍传过来的对象参数
  9048. for (var i in keys) {
  9049. // 如果子组件有此值则用,无此值则用父组件的值
  9050. // 判断是否空数组,如果是,则用父组件的值,否则用子组件的值
  9051. if (Array.isArray(keys[i])) {
  9052. if (keys[i].length) {
  9053. data[i] = keys[i];
  9054. } else {
  9055. data[i] = parent[i];
  9056. }
  9057. } else if (keys[i].constructor === Object) {
  9058. // 判断是否对象,如果是对象,且有属性,那么使用子组件的值,否则使用父组件的值
  9059. if (Object.keys(keys[i]).length) {
  9060. data[i] = keys[i];
  9061. } else {
  9062. data[i] = parent[i];
  9063. }
  9064. } else {
  9065. // 只要子组件有传值,即使是false值,也是“传值”了,也需要覆盖父组件的同名参数
  9066. data[i] = keys[i] || keys[i] === false ? keys[i] : parent[i];
  9067. }
  9068. }
  9069. }
  9070. return { v: data };}();if (typeof _ret === "object") return _ret.v;
  9071. }
  9072. }
  9073. return {};
  9074. }
  9075. /***/ }),
  9076. /***/ 34:
  9077. /*!****************************************************!*\
  9078. !*** E:/bigData/uview-ui/libs/function/$parent.js ***!
  9079. \****************************************************/
  9080. /*! no static exports found */
  9081. /***/ (function(module, exports, __webpack_require__) {
  9082. "use strict";
  9083. Object.defineProperty(exports, "__esModule", { value: true });exports.default = $parent; // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
  9084. // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx
  9085. // 这里默认值等于undefined有它的含义,因为最顶层元素(组件)的$parent就是undefined,意味着不传name
  9086. // 值(默认为undefined),就是查找最顶层的$parent
  9087. function $parent() {var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
  9088. var parent = this.$parent;
  9089. // 通过while历遍,这里主要是为了H5需要多层解析的问题
  9090. while (parent) {
  9091. // 父组件
  9092. if (parent.$options && parent.$options.name !== name) {
  9093. // 如果组件的name不相等,继续上一级寻找
  9094. parent = parent.$parent;
  9095. } else {
  9096. return parent;
  9097. }
  9098. }
  9099. return false;
  9100. }
  9101. /***/ }),
  9102. /***/ 35:
  9103. /*!************************************************!*\
  9104. !*** E:/bigData/uview-ui/libs/function/sys.js ***!
  9105. \************************************************/
  9106. /*! no static exports found */
  9107. /***/ (function(module, exports, __webpack_require__) {
  9108. "use strict";
  9109. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.os = os;exports.sys = sys;function os() {
  9110. return uni.getSystemInfoSync().platform;
  9111. };
  9112. function sys() {
  9113. return uni.getSystemInfoSync();
  9114. }
  9115. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  9116. /***/ }),
  9117. /***/ 36:
  9118. /*!*****************************************************!*\
  9119. !*** E:/bigData/uview-ui/libs/function/debounce.js ***!
  9120. \*****************************************************/
  9121. /*! no static exports found */
  9122. /***/ (function(module, exports, __webpack_require__) {
  9123. "use strict";
  9124. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var timeout = null;
  9125. /**
  9126. * 防抖原理:一定时间内,只有最后一次操作,再过wait毫秒后才执行函数
  9127. *
  9128. * @param {Function} func 要执行的回调函数
  9129. * @param {Number} wait 延时的时间
  9130. * @param {Boolean} immediate 是否立即执行
  9131. * @return null
  9132. */
  9133. function debounce(func) {var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  9134. // 清除定时器
  9135. if (timeout !== null) clearTimeout(timeout);
  9136. // 立即执行,此类情况一般用不到
  9137. if (immediate) {
  9138. var callNow = !timeout;
  9139. timeout = setTimeout(function () {
  9140. timeout = null;
  9141. }, wait);
  9142. if (callNow) typeof func === 'function' && func();
  9143. } else {
  9144. // 设置定时器,当最后一次操作后,timeout不会再被清除,所以在延时wait毫秒后执行func回调方法
  9145. timeout = setTimeout(function () {
  9146. typeof func === 'function' && func();
  9147. }, wait);
  9148. }
  9149. }var _default =
  9150. debounce;exports.default = _default;
  9151. /***/ }),
  9152. /***/ 37:
  9153. /*!*****************************************************!*\
  9154. !*** E:/bigData/uview-ui/libs/function/throttle.js ***!
  9155. \*****************************************************/
  9156. /*! no static exports found */
  9157. /***/ (function(module, exports, __webpack_require__) {
  9158. "use strict";
  9159. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var timer, flag;
  9160. /**
  9161. * 节流原理:在一定时间内,只能触发一次
  9162. *
  9163. * @param {Function} func 要执行的回调函数
  9164. * @param {Number} wait 延时的时间
  9165. * @param {Boolean} immediate 是否立即执行
  9166. * @return null
  9167. */
  9168. function throttle(func) {var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  9169. if (immediate) {
  9170. if (!flag) {
  9171. flag = true;
  9172. // 如果是立即执行,则在wait毫秒内开始时执行
  9173. typeof func === 'function' && func();
  9174. timer = setTimeout(function () {
  9175. flag = false;
  9176. }, wait);
  9177. }
  9178. } else {
  9179. if (!flag) {
  9180. flag = true;
  9181. // 如果是非立即执行,则在wait毫秒内的结束处执行
  9182. timer = setTimeout(function () {
  9183. flag = false;
  9184. typeof func === 'function' && func();
  9185. }, wait);
  9186. }
  9187. }
  9188. };var _default =
  9189. throttle;exports.default = _default;
  9190. /***/ }),
  9191. /***/ 38:
  9192. /*!*************************************************!*\
  9193. !*** E:/bigData/uview-ui/libs/config/config.js ***!
  9194. \*************************************************/
  9195. /*! no static exports found */
  9196. /***/ (function(module, exports, __webpack_require__) {
  9197. "use strict";
  9198. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // 此版本发布于2020-11-16
  9199. var version = '1.8.1';var _default =
  9200. {
  9201. v: version,
  9202. version: version,
  9203. // 主题名称
  9204. type: [
  9205. 'primary',
  9206. 'success',
  9207. 'info',
  9208. 'error',
  9209. 'warning'] };exports.default = _default;
  9210. /***/ }),
  9211. /***/ 39:
  9212. /*!*************************************************!*\
  9213. !*** E:/bigData/uview-ui/libs/config/zIndex.js ***!
  9214. \*************************************************/
  9215. /*! no static exports found */
  9216. /***/ (function(module, exports, __webpack_require__) {
  9217. "use strict";
  9218. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // uniapp在H5中各API的z-index值如下:
  9219. /**
  9220. * actionsheet: 999
  9221. * modal: 999
  9222. * navigate: 998
  9223. * tabbar: 998
  9224. * toast: 999
  9225. */var _default =
  9226. {
  9227. toast: 10090,
  9228. noNetwork: 10080,
  9229. // popup包含popup,actionsheet,keyboard,picker的值
  9230. popup: 10075,
  9231. mask: 10070,
  9232. navbar: 980,
  9233. topTips: 975,
  9234. sticky: 970,
  9235. indexListSticky: 965 };exports.default = _default;
  9236. /***/ }),
  9237. /***/ 4:
  9238. /*!*****************************!*\
  9239. !*** E:/bigData/pages.json ***!
  9240. \*****************************/
  9241. /*! no static exports found */
  9242. /***/ (function(module, exports) {
  9243. /***/ }),
  9244. /***/ 40:
  9245. /*!******************************!*\
  9246. !*** E:/bigData/util/api.js ***!
  9247. \******************************/
  9248. /*! no static exports found */
  9249. /***/ (function(module, exports, __webpack_require__) {
  9250. "use strict";
  9251. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.myRequest = void 0;var BASE_URL = 'http://182.92.193.64:8002';
  9252. var myRequest = function myRequest(options) {
  9253. var session_key = "";
  9254. // uni.getStorage({
  9255. // key:'session_key',
  9256. // success:function(res){
  9257. // session_key=res.data
  9258. // console.log(111)
  9259. // }
  9260. // })
  9261. session_key = uni.getStorageSync('session_key');
  9262. console.log(session_key);
  9263. var url = options.url;
  9264. var data = options.data || {};
  9265. if (url != 'user.login.login_user' && url != 'pest.pests.insect_discern' &&
  9266. url != 'pest.pests.plant_discern' &&
  9267. url != 'pest.pests.pests_contrast' && url != 'pest.pests.pests_expert_img' &&
  9268. url != 'pest.pests.pests_img' && url != 'recognizationSys' &&
  9269. url != 'base.bases.base_photo' && url != 'pest.warning_record.rolemanage_img' &&
  9270. url != 'home.homes.personal_photo' && url != 'ascend.ascend_manage.product_info' &&
  9271. url != 'ascend.ascend_manage.quality_info' && url != 'ascend.ascend_manage.grow_info' &&
  9272. url != 'ascend.ascend_manage.all_ascend' && url != 'after_sale.after_sale_manage.device_check' &&
  9273. url != 'after_sale.after_sale_manage.aftersale_apply') {
  9274. data.token = session_key;
  9275. }
  9276. return new Promise(function (resolve, reject) {
  9277. uni.request({
  9278. url: BASE_URL + options.url,
  9279. method: options.method || 'POST',
  9280. header: {
  9281. "Content-Type": "application/x-www-form-urlencoded" },
  9282. data: data,
  9283. success: function success(res) {
  9284. if (res.data.message != "") {
  9285. return uni.showToast({
  9286. title: res.data.message });
  9287. }
  9288. resolve(res.data.data);
  9289. },
  9290. fail: function fail(err) {
  9291. uni.showToast({
  9292. title: '请求接口失败' });
  9293. reject(err);
  9294. } });
  9295. });
  9296. };exports.myRequest = myRequest;
  9297. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  9298. /***/ })
  9299. }]);
  9300. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map