vendor.js 385 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650
  1. (my["webpackJsonp"] = my["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 1:
  3. /*!************************************************************!*\
  4. !*** ./node_modules/@dcloudio/uni-mp-alipay/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.createPlugin = createPlugin;exports.createSubpackageApp = createSubpackageApp;exports.default = void 0;var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));
  10. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 4);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}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 _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 _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;}
  11. function b64DecodeUnicode(str) {
  12. return decodeURIComponent(atob(str).split('').map(function (c) {
  13. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  14. }).join(''));
  15. }
  16. function getCurrentUserInfo() {
  17. var token = my.getStorageSync('uni_id_token') || '';
  18. var tokenArr = token.split('.');
  19. if (!token || tokenArr.length !== 3) {
  20. return {
  21. uid: null,
  22. role: [],
  23. permission: [],
  24. tokenExpired: 0 };
  25. }
  26. var userInfo;
  27. try {
  28. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  29. } catch (error) {
  30. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  31. }
  32. userInfo.tokenExpired = userInfo.exp * 1000;
  33. delete userInfo.exp;
  34. delete userInfo.iat;
  35. return userInfo;
  36. }
  37. function uniIdMixin(Vue) {
  38. Vue.prototype.uniIDHasRole = function (roleId) {var _getCurrentUserInfo =
  39. getCurrentUserInfo(),role = _getCurrentUserInfo.role;
  40. return role.indexOf(roleId) > -1;
  41. };
  42. Vue.prototype.uniIDHasPermission = function (permissionId) {var _getCurrentUserInfo2 =
  43. getCurrentUserInfo(),permission = _getCurrentUserInfo2.permission;
  44. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  45. };
  46. Vue.prototype.uniIDTokenValid = function () {var _getCurrentUserInfo3 =
  47. getCurrentUserInfo(),tokenExpired = _getCurrentUserInfo3.tokenExpired;
  48. return tokenExpired > Date.now();
  49. };
  50. }
  51. var _toString = Object.prototype.toString;
  52. var hasOwnProperty = Object.prototype.hasOwnProperty;
  53. function isFn(fn) {
  54. return typeof fn === 'function';
  55. }
  56. function isStr(str) {
  57. return typeof str === 'string';
  58. }
  59. function isPlainObject(obj) {
  60. return _toString.call(obj) === '[object Object]';
  61. }
  62. function hasOwn(obj, key) {
  63. return hasOwnProperty.call(obj, key);
  64. }
  65. function noop() {}
  66. /**
  67. * Create a cached version of a pure function.
  68. */
  69. function cached(fn) {
  70. var cache = Object.create(null);
  71. return function cachedFn(str) {
  72. var hit = cache[str];
  73. return hit || (cache[str] = fn(str));
  74. };
  75. }
  76. /**
  77. * Camelize a hyphen-delimited string.
  78. */
  79. var camelizeRE = /-(\w)/g;
  80. var camelize = cached(function (str) {
  81. return str.replace(camelizeRE, function (_, c) {return c ? c.toUpperCase() : '';});
  82. });
  83. var HOOKS = [
  84. 'invoke',
  85. 'success',
  86. 'fail',
  87. 'complete',
  88. 'returnValue'];
  89. var globalInterceptors = {};
  90. var scopedInterceptors = {};
  91. function mergeHook(parentVal, childVal) {
  92. var res = childVal ?
  93. parentVal ?
  94. parentVal.concat(childVal) :
  95. Array.isArray(childVal) ?
  96. childVal : [childVal] :
  97. parentVal;
  98. return res ?
  99. dedupeHooks(res) :
  100. res;
  101. }
  102. function dedupeHooks(hooks) {
  103. var res = [];
  104. for (var i = 0; i < hooks.length; i++) {
  105. if (res.indexOf(hooks[i]) === -1) {
  106. res.push(hooks[i]);
  107. }
  108. }
  109. return res;
  110. }
  111. function removeHook(hooks, hook) {
  112. var index = hooks.indexOf(hook);
  113. if (index !== -1) {
  114. hooks.splice(index, 1);
  115. }
  116. }
  117. function mergeInterceptorHook(interceptor, option) {
  118. Object.keys(option).forEach(function (hook) {
  119. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  120. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  121. }
  122. });
  123. }
  124. function removeInterceptorHook(interceptor, option) {
  125. if (!interceptor || !option) {
  126. return;
  127. }
  128. Object.keys(option).forEach(function (hook) {
  129. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  130. removeHook(interceptor[hook], option[hook]);
  131. }
  132. });
  133. }
  134. function addInterceptor(method, option) {
  135. if (typeof method === 'string' && isPlainObject(option)) {
  136. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  137. } else if (isPlainObject(method)) {
  138. mergeInterceptorHook(globalInterceptors, method);
  139. }
  140. }
  141. function removeInterceptor(method, option) {
  142. if (typeof method === 'string') {
  143. if (isPlainObject(option)) {
  144. removeInterceptorHook(scopedInterceptors[method], option);
  145. } else {
  146. delete scopedInterceptors[method];
  147. }
  148. } else if (isPlainObject(method)) {
  149. removeInterceptorHook(globalInterceptors, method);
  150. }
  151. }
  152. function wrapperHook(hook) {
  153. return function (data) {
  154. return hook(data) || data;
  155. };
  156. }
  157. function isPromise(obj) {
  158. return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  159. }
  160. function queue(hooks, data) {
  161. var promise = false;
  162. for (var i = 0; i < hooks.length; i++) {
  163. var hook = hooks[i];
  164. if (promise) {
  165. promise = Promise.resolve(wrapperHook(hook));
  166. } else {
  167. var res = hook(data);
  168. if (isPromise(res)) {
  169. promise = Promise.resolve(res);
  170. }
  171. if (res === false) {
  172. return {
  173. then: function then() {} };
  174. }
  175. }
  176. }
  177. return promise || {
  178. then: function then(callback) {
  179. return callback(data);
  180. } };
  181. }
  182. function wrapperOptions(interceptor) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  183. ['success', 'fail', 'complete'].forEach(function (name) {
  184. if (Array.isArray(interceptor[name])) {
  185. var oldCallback = options[name];
  186. options[name] = function callbackInterceptor(res) {
  187. queue(interceptor[name], res).then(function (res) {
  188. /* eslint-disable no-mixed-operators */
  189. return isFn(oldCallback) && oldCallback(res) || res;
  190. });
  191. };
  192. }
  193. });
  194. return options;
  195. }
  196. function wrapperReturnValue(method, returnValue) {
  197. var returnValueHooks = [];
  198. if (Array.isArray(globalInterceptors.returnValue)) {
  199. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(globalInterceptors.returnValue));
  200. }
  201. var interceptor = scopedInterceptors[method];
  202. if (interceptor && Array.isArray(interceptor.returnValue)) {
  203. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(interceptor.returnValue));
  204. }
  205. returnValueHooks.forEach(function (hook) {
  206. returnValue = hook(returnValue) || returnValue;
  207. });
  208. return returnValue;
  209. }
  210. function getApiInterceptorHooks(method) {
  211. var interceptor = Object.create(null);
  212. Object.keys(globalInterceptors).forEach(function (hook) {
  213. if (hook !== 'returnValue') {
  214. interceptor[hook] = globalInterceptors[hook].slice();
  215. }
  216. });
  217. var scopedInterceptor = scopedInterceptors[method];
  218. if (scopedInterceptor) {
  219. Object.keys(scopedInterceptor).forEach(function (hook) {
  220. if (hook !== 'returnValue') {
  221. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  222. }
  223. });
  224. }
  225. return interceptor;
  226. }
  227. 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];}
  228. var interceptor = getApiInterceptorHooks(method);
  229. if (interceptor && Object.keys(interceptor).length) {
  230. if (Array.isArray(interceptor.invoke)) {
  231. var res = queue(interceptor.invoke, options);
  232. return res.then(function (options) {
  233. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  234. });
  235. } else {
  236. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  237. }
  238. }
  239. return api.apply(void 0, [options].concat(params));
  240. }
  241. var promiseInterceptor = {
  242. returnValue: function returnValue(res) {
  243. if (!isPromise(res)) {
  244. return res;
  245. }
  246. return new Promise(function (resolve, reject) {
  247. res.then(function (res) {
  248. if (res[0]) {
  249. reject(res[0]);
  250. } else {
  251. resolve(res[1]);
  252. }
  253. });
  254. });
  255. } };
  256. var SYNC_API_RE =
  257. /^\$|Window$|WindowStyle$|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getLocale|setLocale/;
  258. var CONTEXT_API_RE = /^create|Manager$/;
  259. // Context例外情况
  260. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  261. // 同步例外情况
  262. var ASYNC_API = ['createBLEConnection'];
  263. var CALLBACK_API_RE = /^on|^off/;
  264. function isContextApi(name) {
  265. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  266. }
  267. function isSyncApi(name) {
  268. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  269. }
  270. function isCallbackApi(name) {
  271. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  272. }
  273. function handlePromise(promise) {
  274. return promise.then(function (data) {
  275. return [null, data];
  276. }).
  277. catch(function (err) {return [err];});
  278. }
  279. function shouldPromise(name) {
  280. if (
  281. isContextApi(name) ||
  282. isSyncApi(name) ||
  283. isCallbackApi(name))
  284. {
  285. return false;
  286. }
  287. return true;
  288. }
  289. /* eslint-disable no-extend-native */
  290. if (!Promise.prototype.finally) {
  291. Promise.prototype.finally = function (callback) {
  292. var promise = this.constructor;
  293. return this.then(
  294. function (value) {return promise.resolve(callback()).then(function () {return value;});},
  295. function (reason) {return promise.resolve(callback()).then(function () {
  296. throw reason;
  297. });});
  298. };
  299. }
  300. function promisify(name, api) {
  301. if (!shouldPromise(name)) {
  302. return api;
  303. }
  304. 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];}
  305. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  306. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  307. }
  308. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  309. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  310. success: resolve,
  311. fail: reject })].concat(
  312. params));
  313. })));
  314. };
  315. }
  316. var EPS = 1e-4;
  317. var BASE_DEVICE_WIDTH = 750;
  318. var isIOS = false;
  319. var deviceWidth = 0;
  320. var deviceDPR = 0;
  321. function checkDeviceWidth() {var _my$getSystemInfoSync =
  322. my.getSystemInfoSync(),platform = _my$getSystemInfoSync.platform,pixelRatio = _my$getSystemInfoSync.pixelRatio,windowWidth = _my$getSystemInfoSync.windowWidth; // uni=>my runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  323. deviceWidth = windowWidth;
  324. deviceDPR = pixelRatio;
  325. isIOS = platform === 'ios';
  326. }
  327. function upx2px(number, newDeviceWidth) {
  328. if (deviceWidth === 0) {
  329. checkDeviceWidth();
  330. }
  331. number = Number(number);
  332. if (number === 0) {
  333. return 0;
  334. }
  335. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  336. if (result < 0) {
  337. result = -result;
  338. }
  339. result = Math.floor(result + EPS);
  340. if (result === 0) {
  341. if (deviceDPR === 1 || !isIOS) {
  342. result = 1;
  343. } else {
  344. result = 0.5;
  345. }
  346. }
  347. return number < 0 ? -result : result;
  348. }
  349. function getLocale() {
  350. // 优先使用 $locale
  351. var app = getApp({
  352. allowDefault: true });
  353. if (app && app.$vm) {
  354. return app.$vm.$locale;
  355. }
  356. return my.getSystemInfoSync().language || 'zh-Hans';
  357. }
  358. function setLocale(locale) {
  359. var app = getApp();
  360. if (!app) {
  361. return false;
  362. }
  363. var oldLocale = app.$vm.$locale;
  364. if (oldLocale !== locale) {
  365. app.$vm.$locale = locale;
  366. onLocaleChangeCallbacks.forEach(function (fn) {return fn({
  367. locale: locale });});
  368. return true;
  369. }
  370. return false;
  371. }
  372. var onLocaleChangeCallbacks = [];
  373. function onLocaleChange(fn) {
  374. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  375. onLocaleChangeCallbacks.push(fn);
  376. }
  377. }
  378. var interceptors = {
  379. promiseInterceptor: promiseInterceptor };
  380. var baseApi = /*#__PURE__*/Object.freeze({
  381. __proto__: null,
  382. upx2px: upx2px,
  383. getLocale: getLocale,
  384. setLocale: setLocale,
  385. onLocaleChange: onLocaleChange,
  386. addInterceptor: addInterceptor,
  387. removeInterceptor: removeInterceptor,
  388. interceptors: interceptors });var
  389. EventChannel = /*#__PURE__*/function () {
  390. function EventChannel(id, events) {var _this = this;_classCallCheck(this, EventChannel);
  391. this.id = id;
  392. this.listener = {};
  393. this.emitCache = {};
  394. if (events) {
  395. Object.keys(events).forEach(function (name) {
  396. _this.on(name, events[name]);
  397. });
  398. }
  399. }_createClass(EventChannel, [{ key: "emit", value: function emit(
  400. eventName) {for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {args[_key3 - 1] = arguments[_key3];}
  401. var fns = this.listener[eventName];
  402. if (!fns) {
  403. return (this.emitCache[eventName] || (this.emitCache[eventName] = [])).push(args);
  404. }
  405. fns.forEach(function (opt) {
  406. opt.fn.apply(opt.fn, args);
  407. });
  408. this.listener[eventName] = fns.filter(function (opt) {return opt.type !== 'once';});
  409. } }, { key: "on", value: function on(
  410. eventName, fn) {
  411. this._addListener(eventName, 'on', fn);
  412. this._clearCache(eventName);
  413. } }, { key: "once", value: function once(
  414. eventName, fn) {
  415. this._addListener(eventName, 'once', fn);
  416. this._clearCache(eventName);
  417. } }, { key: "off", value: function off(
  418. eventName, fn) {
  419. var fns = this.listener[eventName];
  420. if (!fns) {
  421. return;
  422. }
  423. if (fn) {
  424. for (var i = 0; i < fns.length;) {
  425. if (fns[i].fn === fn) {
  426. fns.splice(i, 1);
  427. i--;
  428. }
  429. i++;
  430. }
  431. } else {
  432. delete this.listener[eventName];
  433. }
  434. } }, { key: "_clearCache", value: function _clearCache(
  435. eventName) {
  436. var cacheArgs = this.emitCache[eventName];
  437. if (cacheArgs) {
  438. for (; cacheArgs.length > 0;) {
  439. this.emit.apply(this, [eventName].concat(cacheArgs.shift()));
  440. }
  441. }
  442. } }, { key: "_addListener", value: function _addListener(
  443. eventName, type, fn) {
  444. (this.listener[eventName] || (this.listener[eventName] = [])).push({
  445. fn: fn,
  446. type: type });
  447. } }]);return EventChannel;}();
  448. var eventChannels = {};
  449. var eventChannelStack = [];
  450. var id = 0;
  451. function initEventChannel(events) {var cache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  452. id++;
  453. var eventChannel = new EventChannel(id, events);
  454. if (cache) {
  455. eventChannels[id] = eventChannel;
  456. eventChannelStack.push(eventChannel);
  457. }
  458. return eventChannel;
  459. }
  460. function getEventChannel(id) {
  461. if (id) {
  462. var eventChannel = eventChannels[id];
  463. delete eventChannels[id];
  464. return eventChannel;
  465. }
  466. return eventChannelStack.shift();
  467. }
  468. var navigateTo = {
  469. args: function args(fromArgs, toArgs) {
  470. var id = initEventChannel(fromArgs.events).id;
  471. if (fromArgs.url) {
  472. fromArgs.url = fromArgs.url + (fromArgs.url.indexOf('?') === -1 ? '?' : '&') + '__id__=' + id;
  473. }
  474. },
  475. returnValue: function returnValue(fromRes, toRes) {
  476. fromRes.eventChannel = getEventChannel();
  477. } };
  478. function findExistsPageIndex(url) {
  479. var pages = getCurrentPages();
  480. var len = pages.length;
  481. while (len--) {
  482. var page = pages[len];
  483. if (page.$page && page.$page.fullPath === url) {
  484. return len;
  485. }
  486. }
  487. return -1;
  488. }
  489. var redirectTo = {
  490. name: function name(fromArgs) {
  491. if (fromArgs.exists === 'back' && fromArgs.delta) {
  492. return 'navigateBack';
  493. }
  494. return 'redirectTo';
  495. },
  496. args: function args(fromArgs) {
  497. if (fromArgs.exists === 'back' && fromArgs.url) {
  498. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  499. if (existsPageIndex !== -1) {
  500. var delta = getCurrentPages().length - 1 - existsPageIndex;
  501. if (delta > 0) {
  502. fromArgs.delta = delta;
  503. }
  504. }
  505. }
  506. } };
  507. function setStorageSync(key, data) {
  508. return my.setStorageSync({
  509. key: key,
  510. data: data });
  511. }
  512. function getStorageSync(key) {
  513. var result = my.getStorageSync({
  514. key: key });
  515. // 支付宝平台会返回一个 success 值,但是目前测试的结果这个始终是 true。当没有存储数据的时候,其它平台会返回空字符串。
  516. return result.data !== null ? result.data : '';
  517. }
  518. function removeStorageSync(key) {
  519. return my.removeStorageSync({
  520. key: key });
  521. }
  522. var UUID_KEY = '__DC_STAT_UUID';
  523. var deviceId;
  524. function addUuid(result) {
  525. deviceId = deviceId || getStorageSync(UUID_KEY);
  526. if (!deviceId) {
  527. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  528. my.setStorage({
  529. key: UUID_KEY,
  530. data: deviceId });
  531. }
  532. result.deviceId = deviceId;
  533. }
  534. function addSafeAreaInsets(result) {
  535. if (result.safeArea) {
  536. var safeArea = result.safeArea;
  537. result.safeAreaInsets = {
  538. top: safeArea.top,
  539. left: safeArea.left,
  540. right: result.windowWidth - safeArea.right,
  541. bottom: result.windowHeight - safeArea.bottom };
  542. }
  543. }
  544. function normalizePlatform(result) {
  545. var platform = result.platform ? result.platform.toLowerCase() : 'devtools';
  546. if (!~['android', 'ios'].indexOf(platform)) {
  547. platform = 'devtools';
  548. }
  549. result.platform = platform;
  550. }
  551. var getSystemInfo = {
  552. returnValue: function returnValue(result) {
  553. addUuid(result);
  554. addSafeAreaInsets(result);
  555. normalizePlatform(result);
  556. } };
  557. // 不支持的 API 列表
  558. var todos = [
  559. 'preloadPage',
  560. 'unPreloadPage',
  561. 'loadSubPackage'
  562. // 'getRecorderManager',
  563. // 'getBackgroundAudioManager',
  564. // 'createInnerAudioContext',
  565. // 'createCameraContext',
  566. // 'createLivePlayerContext',
  567. // 'startAccelerometer',
  568. // 'startCompass',
  569. // 'authorize',
  570. // 'chooseInvoiceTitle',
  571. // 'addTemplate',
  572. // 'deleteTemplate',
  573. // 'getTemplateLibraryById',
  574. // 'getTemplateLibraryList',
  575. // 'getTemplateList',
  576. // 'sendTemplateMessage',
  577. // 'setEnableDebug',
  578. // 'getExtConfig',
  579. // 'getExtConfigSync',
  580. // 'onWindowResize',
  581. // 'offWindowResize'
  582. ];
  583. // 存在兼容性的 API 列表
  584. var canIUses = [
  585. 'startPullDownRefresh',
  586. 'setTabBarItem',
  587. 'setTabBarStyle',
  588. 'hideTabBar',
  589. 'showTabBar',
  590. 'setTabBarBadge',
  591. 'removeTabBarBadge',
  592. 'showTabBarRedDot',
  593. 'hideTabBarRedDot',
  594. 'openSetting',
  595. 'getSetting',
  596. 'createIntersectionObserver',
  597. 'getUpdateManager',
  598. 'setBackgroundColor',
  599. 'setBackgroundTextStyle',
  600. 'checkIsSupportSoterAuthentication',
  601. 'startSoterAuthentication',
  602. 'checkIsSoterEnrolledInDevice',
  603. 'openDocument',
  604. 'createVideoContext',
  605. 'onMemoryWarning',
  606. 'addPhoneContact'];
  607. function _handleNetworkInfo(result) {
  608. switch (result.networkType) {
  609. case 'NOTREACHABLE':
  610. result.networkType = 'none';
  611. break;
  612. case 'WWAN':
  613. // TODO ?
  614. result.networkType = '3g';
  615. break;
  616. default:
  617. result.networkType = result.networkType.toLowerCase();
  618. break;}
  619. return {};
  620. }
  621. var protocols = { // 需要做转换的 API 列表
  622. navigateTo: navigateTo,
  623. redirectTo: redirectTo,
  624. returnValue: function returnValue(methodName) {var res = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; // 通用 returnValue 解析
  625. if (res.error || res.errorMessage) {
  626. res.errMsg = "".concat(methodName, ":fail ").concat(res.errorMessage || res.error);
  627. delete res.error;
  628. delete res.errorMessage;
  629. } else {
  630. res.errMsg = "".concat(methodName, ":ok");
  631. }
  632. return res;
  633. },
  634. request: {
  635. name: my.canIUse('request') ? 'request' : 'httpRequest',
  636. args: function args(fromArgs) {
  637. var method = fromArgs.method || 'GET';
  638. if (!fromArgs.header) {// 默认增加 header 参数,方便格式化 content-type
  639. fromArgs.header = {};
  640. }
  641. var headers = {
  642. 'content-type': 'application/json' };
  643. Object.keys(fromArgs.header).forEach(function (key) {
  644. headers[key.toLocaleLowerCase()] = fromArgs.header[key];
  645. });
  646. return {
  647. header: function header() {var header = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};var toArgs = arguments.length > 1 ? arguments[1] : undefined;
  648. return {
  649. name: 'headers',
  650. value: headers };
  651. },
  652. data: function data(_data) {
  653. // 钉钉小程序在content-type为application/json时需上传字符串形式data,使用my.dd在真机运行钉钉小程序时不能正确判断
  654. if (my.canIUse('saveFileToDingTalk') && method.toUpperCase() === 'POST' && headers['content-type'].indexOf(
  655. 'application/json') === 0 && isPlainObject(_data)) {
  656. return {
  657. name: 'data',
  658. value: JSON.stringify(_data) };
  659. }
  660. return {
  661. name: 'data',
  662. value: _data };
  663. },
  664. method: 'method', // TODO 支付宝小程序仅支持 get,post
  665. responseType: false };
  666. },
  667. returnValue: {
  668. status: 'statusCode',
  669. headers: 'header' } },
  670. setNavigationBarColor: {
  671. name: 'setNavigationBar',
  672. args: {
  673. frontColor: false,
  674. animation: false } },
  675. setNavigationBarTitle: {
  676. name: 'setNavigationBar' },
  677. showModal: function showModal()
  678. {var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},_ref$showCancel = _ref.showCancel,showCancel = _ref$showCancel === void 0 ? true : _ref$showCancel;
  679. if (showCancel) {
  680. return {
  681. name: 'confirm',
  682. args: {
  683. cancelColor: false,
  684. confirmColor: false,
  685. cancelText: 'cancelButtonText',
  686. confirmText: 'confirmButtonText' },
  687. returnValue: function returnValue(fromRes, toRes) {
  688. toRes.confirm = fromRes.confirm;
  689. toRes.cancel = !fromRes.confirm;
  690. } };
  691. }
  692. return {
  693. name: 'alert',
  694. args: {
  695. confirmColor: false,
  696. confirmText: 'buttonText' },
  697. returnValue: function returnValue(fromRes, toRes) {
  698. toRes.confirm = true;
  699. toRes.cancel = false;
  700. } };
  701. },
  702. showToast: function showToast()
  703. {var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},_ref2$icon = _ref2.icon,icon = _ref2$icon === void 0 ? 'success' : _ref2$icon;
  704. var args = {
  705. title: 'content',
  706. icon: 'type',
  707. duration: false,
  708. image: false,
  709. mask: false };
  710. if (icon === 'loading') {
  711. return {
  712. name: 'showLoading',
  713. args: args };
  714. }
  715. return {
  716. name: 'showToast',
  717. args: args };
  718. },
  719. showActionSheet: {
  720. name: 'showActionSheet',
  721. args: {
  722. itemList: 'items',
  723. itemColor: false },
  724. returnValue: {
  725. index: 'tapIndex' } },
  726. showLoading: {
  727. args: {
  728. title: 'content',
  729. mask: false } },
  730. uploadFile: {
  731. args: {
  732. name: 'fileName' }
  733. // 从测试结果看,是有返回对象的,文档上没有说明。
  734. },
  735. downloadFile: {
  736. returnValue: {
  737. apFilePath: 'tempFilePath' } },
  738. getFileInfo: {
  739. args: {
  740. filePath: 'apFilePath' } },
  741. compressImage: {
  742. args: function args(fromArgs) {
  743. fromArgs.compressLevel = 4;
  744. if (fromArgs && fromArgs.quality) {
  745. fromArgs.compressLevel = Math.floor(fromArgs.quality / 26);
  746. }
  747. fromArgs.apFilePaths = [fromArgs.src];
  748. },
  749. returnValue: function returnValue(result) {
  750. if (result.apFilePaths && result.apFilePaths.length) {
  751. result.tempFilePath = result.apFilePaths[0];
  752. }
  753. } },
  754. chooseVideo: {
  755. // 支付宝小程序文档中未找到(仅在getSetting处提及),但实际可用
  756. returnValue: {
  757. apFilePath: 'tempFilePath' } },
  758. connectSocket: {
  759. args: {
  760. method: false,
  761. protocols: false }
  762. // TODO 有没有返回值还需要测试下
  763. },
  764. chooseImage: {
  765. returnValue: function returnValue(result) {
  766. var hasTempFilePaths = hasOwn(result, 'tempFilePaths') && result.tempFilePaths;
  767. if (hasOwn(result, 'apFilePaths') && !hasTempFilePaths) {
  768. result.tempFilePaths = result.apFilePaths;
  769. delete result.apFilePaths;
  770. }
  771. if (!hasOwn(result, 'tempFiles') && hasTempFilePaths) {
  772. result.tempFiles = [];
  773. result.tempFilePaths.forEach(function (tempFilePath) {return result.tempFiles.push({ path: tempFilePath });});
  774. }
  775. return {};
  776. } },
  777. previewImage: {
  778. args: function args(fromArgs) {
  779. // 支付宝小程序的 current 是索引值,而非图片地址。
  780. var currentIndex = Number(fromArgs.current);
  781. if (isNaN(currentIndex)) {
  782. if (fromArgs.current && Array.isArray(fromArgs.urls)) {
  783. var index = fromArgs.urls.indexOf(fromArgs.current);
  784. fromArgs.current = ~index ? index : 0;
  785. }
  786. } else {
  787. fromArgs.current = currentIndex;
  788. }
  789. return {
  790. indicator: false,
  791. loop: false };
  792. } },
  793. saveFile: {
  794. args: {
  795. tempFilePath: 'apFilePath' },
  796. returnValue: {
  797. apFilePath: 'savedFilePath' } },
  798. getSavedFileInfo: {
  799. args: {
  800. filePath: 'apFilePath' } },
  801. getSavedFileList: {
  802. returnValue: function returnValue(result) {
  803. if (result.fileList && result.fileList.length) {
  804. result.fileList.forEach(function (file) {
  805. file.filePath = file.apFilePath;
  806. delete file.apFilePath;
  807. });
  808. }
  809. return {};
  810. } },
  811. removeSavedFile: {
  812. args: {
  813. filePath: 'apFilePath' } },
  814. getLocation: {
  815. args: {
  816. type: false,
  817. altitude: false } },
  818. openLocation: {
  819. args: {
  820. // TODO address 参数在阿里上是必传的
  821. } },
  822. getNetworkType: {
  823. returnValue: _handleNetworkInfo },
  824. onNetworkStatusChange: {
  825. returnValue: _handleNetworkInfo },
  826. stopAccelerometer: {
  827. name: 'offAccelerometerChange' },
  828. stopCompass: {
  829. name: 'offCompassChange' },
  830. scanCode: {
  831. name: 'scan',
  832. args: function args(fromArgs) {
  833. if (fromArgs.scanType) {
  834. switch (fromArgs.scanType[0]) {
  835. case 'qrCode':
  836. fromArgs.type = 'qr';
  837. break;
  838. case 'barCode':
  839. fromArgs.type = 'bar';
  840. break;}
  841. }
  842. return {
  843. onlyFromCamera: 'hideAlbum' };
  844. },
  845. returnValue: {
  846. code: 'result' } },
  847. setClipboardData: {
  848. name: 'setClipboard',
  849. args: {
  850. data: 'text' } },
  851. getClipboardData: {
  852. name: 'getClipboard',
  853. returnValue: {
  854. text: 'data' } },
  855. login: {
  856. name: 'getAuthCode',
  857. returnValue: function returnValue(result) {
  858. result.code = result.authCode;
  859. } },
  860. getUserInfo: {
  861. name: my.canIUse('getOpenUserInfo') ? 'getOpenUserInfo' : 'getAuthUserInfo',
  862. returnValue: function returnValue(result) {
  863. if (my.canIUse('getOpenUserInfo')) {
  864. var response = {};
  865. try {
  866. response = JSON.parse(result.response).response;
  867. } catch (e) {}
  868. result.nickName = response.nickName;
  869. result.avatar = response.avatar;
  870. }
  871. result.userInfo = {
  872. nickName: result.nickName,
  873. avatarUrl: result.avatar };
  874. } },
  875. getUserProfile: {
  876. name: my.canIUse('getOpenUserInfo') ? 'getOpenUserInfo' : 'getAuthUserInfo',
  877. returnValue: function returnValue(result) {
  878. if (my.canIUse('getOpenUserInfo')) {
  879. var response = {};
  880. try {
  881. response = JSON.parse(result.response).response;
  882. } catch (e) {}
  883. result.nickName = response.nickName;
  884. result.avatar = response.avatar;
  885. }
  886. result.userInfo = {
  887. nickName: result.nickName,
  888. avatarUrl: result.avatar };
  889. } },
  890. requestPayment: {
  891. name: 'tradePay',
  892. args: {
  893. orderInfo: 'tradeNO' } },
  894. getBLEDeviceServices: {
  895. returnValue: function returnValue(result) {
  896. result.services.forEach(function (item) {
  897. item.uuid = item.serviceId;
  898. });
  899. } },
  900. createBLEConnection: {
  901. name: 'connectBLEDevice',
  902. args: {
  903. timeout: false } },
  904. closeBLEConnection: {
  905. name: 'disconnectBLEDevice' },
  906. onBLEConnectionStateChange: {
  907. name: 'onBLEConnectionStateChanged' },
  908. makePhoneCall: {
  909. args: {
  910. phoneNumber: 'number' } },
  911. stopGyroscope: {
  912. name: 'offGyroscopeChange' },
  913. getSystemInfo: getSystemInfo,
  914. getSystemInfoSync: getSystemInfo,
  915. // 文档没提到,但是实测可用。
  916. canvasToTempFilePath: {
  917. returnValue: function returnValue(result) {
  918. // 真机的情况下会有 tempFilePath 这个值,因此需要主动修改。
  919. result.tempFilePath = result.apFilePath;
  920. } },
  921. setScreenBrightness: {
  922. args: {
  923. value: 'brightness' } },
  924. getScreenBrightness: {
  925. returnValue: {
  926. brightness: 'value' } },
  927. showShareMenu: {
  928. name: 'showSharePanel' },
  929. hideHomeButton: {
  930. name: 'hideBackHome' },
  931. saveImageToPhotosAlbum: {
  932. name: 'saveImage',
  933. args: {
  934. filePath: 'url' } },
  935. saveVideoToPhotosAlbum: {
  936. args: {
  937. filePath: 'src' } },
  938. chooseAddress: {
  939. name: 'getAddress',
  940. returnValue: function returnValue(result) {
  941. var info = result.result || {};
  942. result.userName = info.fullname;
  943. result.provinceName = info.prov;
  944. result.cityName = info.city;
  945. result.countyName = info.area;
  946. result.detailInfo = info.address;
  947. result.telNumber = info.mobilePhone;
  948. result.errMsg = result.resultStatus;
  949. } } };
  950. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  951. function processCallback(methodName, method, returnValue) {
  952. return function (res) {
  953. return method(processReturnValue(methodName, res, returnValue));
  954. };
  955. }
  956. 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;
  957. if (isPlainObject(fromArgs)) {// 一般 api 的参数解析
  958. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  959. if (isFn(argsOption)) {
  960. argsOption = argsOption(fromArgs, toArgs) || {};
  961. }
  962. for (var key in fromArgs) {
  963. if (hasOwn(argsOption, key)) {
  964. var keyOption = argsOption[key];
  965. if (isFn(keyOption)) {
  966. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  967. }
  968. if (!keyOption) {// 不支持的参数
  969. console.warn("The '".concat(methodName, "' method of platform '\u652F\u4ED8\u5B9D\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  970. } else if (isStr(keyOption)) {// 重写参数 key
  971. toArgs[keyOption] = fromArgs[key];
  972. } else if (isPlainObject(keyOption)) {// {name:newName,value:value}可重新指定参数 key:value
  973. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  974. }
  975. } else if (CALLBACKS.indexOf(key) !== -1) {
  976. if (isFn(fromArgs[key])) {
  977. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  978. }
  979. } else {
  980. if (!keepFromArgs) {
  981. toArgs[key] = fromArgs[key];
  982. }
  983. }
  984. }
  985. return toArgs;
  986. } else if (isFn(fromArgs)) {
  987. fromArgs = processCallback(methodName, fromArgs, returnValue);
  988. }
  989. return fromArgs;
  990. }
  991. function processReturnValue(methodName, res, returnValue) {var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  992. if (isFn(protocols.returnValue)) {// 处理通用 returnValue
  993. res = protocols.returnValue(methodName, res);
  994. }
  995. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  996. }
  997. function wrapper(methodName, method) {
  998. if (hasOwn(protocols, methodName)) {
  999. var protocol = protocols[methodName];
  1000. if (!protocol) {// 暂不支持的 api
  1001. return function () {
  1002. console.error("Platform '\u652F\u4ED8\u5B9D\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  1003. };
  1004. }
  1005. return function (arg1, arg2) {// 目前 api 最多两个参数
  1006. var options = protocol;
  1007. if (isFn(protocol)) {
  1008. options = protocol(arg1);
  1009. }
  1010. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  1011. var args = [arg1];
  1012. if (typeof arg2 !== 'undefined') {
  1013. args.push(arg2);
  1014. }
  1015. if (isFn(options.name)) {
  1016. methodName = options.name(arg1);
  1017. } else if (isStr(options.name)) {
  1018. methodName = options.name;
  1019. }
  1020. var returnValue = my[methodName].apply(my, args);
  1021. if (isSyncApi(methodName)) {// 同步 api
  1022. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  1023. }
  1024. return returnValue;
  1025. };
  1026. }
  1027. return method;
  1028. }
  1029. var todoApis = Object.create(null);
  1030. var TODOS = [
  1031. 'onTabBarMidButtonTap',
  1032. 'subscribePush',
  1033. 'unsubscribePush',
  1034. 'onPush',
  1035. 'offPush',
  1036. 'share'];
  1037. function createTodoApi(name) {
  1038. return function todoApi(_ref3)
  1039. {var fail = _ref3.fail,complete = _ref3.complete;
  1040. var res = {
  1041. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported") };
  1042. isFn(fail) && fail(res);
  1043. isFn(complete) && complete(res);
  1044. };
  1045. }
  1046. TODOS.forEach(function (name) {
  1047. todoApis[name] = createTodoApi(name);
  1048. });
  1049. var providers = {
  1050. oauth: ['alipay'],
  1051. share: ['alipay'],
  1052. payment: ['alipay'],
  1053. push: ['alipay'] };
  1054. function getProvider(_ref4)
  1055. {var service = _ref4.service,success = _ref4.success,fail = _ref4.fail,complete = _ref4.complete;
  1056. var res = false;
  1057. if (providers[service]) {
  1058. res = {
  1059. errMsg: 'getProvider:ok',
  1060. service: service,
  1061. provider: providers[service] };
  1062. isFn(success) && success(res);
  1063. } else {
  1064. res = {
  1065. errMsg: 'getProvider:fail service not found' };
  1066. isFn(fail) && fail(res);
  1067. }
  1068. isFn(complete) && complete(res);
  1069. }
  1070. var extraApi = /*#__PURE__*/Object.freeze({
  1071. __proto__: null,
  1072. getProvider: getProvider });
  1073. var getEmitter = function () {
  1074. var Emitter;
  1075. return function getUniEmitter() {
  1076. if (!Emitter) {
  1077. Emitter = new _vue.default();
  1078. }
  1079. return Emitter;
  1080. };
  1081. }();
  1082. function apply(ctx, method, args) {
  1083. return ctx[method].apply(ctx, args);
  1084. }
  1085. function $on() {
  1086. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  1087. }
  1088. function $off() {
  1089. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  1090. }
  1091. function $once() {
  1092. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  1093. }
  1094. function $emit() {
  1095. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  1096. }
  1097. var eventApi = /*#__PURE__*/Object.freeze({
  1098. __proto__: null,
  1099. $on: $on,
  1100. $off: $off,
  1101. $once: $once,
  1102. $emit: $emit });
  1103. function createMediaQueryObserver() {
  1104. var mediaQueryObserver = {};var _my$getSystemInfoSync2 =
  1105. my.getSystemInfoSync(),windowWidth = _my$getSystemInfoSync2.windowWidth,windowHeight = _my$getSystemInfoSync2.windowHeight;
  1106. var orientation = windowWidth < windowHeight ? 'portrait' : 'landscape';
  1107. mediaQueryObserver.observe = function (options, callback) {
  1108. var matches = true;
  1109. for (var item in options) {
  1110. var itemValue = item === 'orientation' ? options[item] : Number(options[item]);
  1111. if (options[item] !== '') {
  1112. if (item === 'width') {
  1113. if (itemValue === windowWidth) {
  1114. matches = true;
  1115. } else {
  1116. matches = false;
  1117. callback(matches);
  1118. return matches;
  1119. }
  1120. }
  1121. if (item === 'minWidth') {
  1122. if (windowWidth >= itemValue) {
  1123. matches = true;
  1124. } else {
  1125. matches = false;
  1126. callback(matches);
  1127. return matches;
  1128. }
  1129. }
  1130. if (item === 'maxWidth') {
  1131. if (windowWidth <= itemValue) {
  1132. matches = true;
  1133. } else {
  1134. matches = false;
  1135. callback(matches);
  1136. return matches;
  1137. }
  1138. }
  1139. if (item === 'height') {
  1140. if (itemValue === windowHeight) {
  1141. matches = true;
  1142. } else {
  1143. matches = false;
  1144. callback(matches);
  1145. return matches;
  1146. }
  1147. }
  1148. if (item === 'minHeight') {
  1149. if (windowHeight >= itemValue) {
  1150. matches = true;
  1151. } else {
  1152. matches = false;
  1153. callback(matches);
  1154. return matches;
  1155. }
  1156. }
  1157. if (item === 'maxHeight') {
  1158. if (windowHeight <= itemValue) {
  1159. matches = true;
  1160. } else {
  1161. matches = false;
  1162. callback(matches);
  1163. return matches;
  1164. }
  1165. }
  1166. if (item === 'orientation') {
  1167. if (options[item] === orientation) {
  1168. matches = true;
  1169. } else {
  1170. matches = false;
  1171. callback(matches);
  1172. return matches;
  1173. }
  1174. }
  1175. }
  1176. }
  1177. callback(matches);
  1178. return matches;
  1179. };
  1180. mediaQueryObserver.disconnect = function () {
  1181. };
  1182. return mediaQueryObserver;
  1183. }
  1184. function startGyroscope(params) {
  1185. if (hasOwn(params, 'interval')) {
  1186. console.warn('支付宝小程序 startGyroscope暂不支持interval');
  1187. }
  1188. params.success && params.success({
  1189. errMsg: 'startGyroscope:ok' });
  1190. params.complete && params.complete({
  1191. errMsg: 'startGyroscope:ok' });
  1192. }
  1193. function createExecCallback(execCallback) {
  1194. return function wrapperExecCallback(res) {
  1195. this.actions.forEach(function (action, index) {
  1196. (action._$callbacks || []).forEach(function (callback) {
  1197. callback(res[index]);
  1198. });
  1199. });
  1200. if (isFn(execCallback)) {
  1201. execCallback(res);
  1202. }
  1203. };
  1204. }
  1205. function addCallback(callback) {
  1206. if (isFn(callback)) {
  1207. var action = this.actions[this.actions.length - 1];
  1208. if (action) {
  1209. (action._$callbacks || (action._$callbacks = [])).push(callback);
  1210. }
  1211. }
  1212. }
  1213. function createSelectorQuery() {
  1214. var query = my.createSelectorQuery();
  1215. var oldExec = query.exec;
  1216. var oldScrollOffset = query.scrollOffset;
  1217. var oldBoundingClientRect = query.boundingClientRect;
  1218. query.exec = function exec(callback) {
  1219. return oldExec.call(this, createExecCallback(callback).bind(this));
  1220. };
  1221. query.scrollOffset = function scrollOffset(callback) {
  1222. var ret = oldScrollOffset.call(this);
  1223. addCallback.call(this, callback);
  1224. return ret;
  1225. };
  1226. query.boundingClientRect = function boundingClientRect(callback) {
  1227. var ret = oldBoundingClientRect.call(this);
  1228. addCallback.call(this, callback);
  1229. return ret;
  1230. };
  1231. if (!query.fields) {
  1232. query.fields = function () {var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},rect = _ref5.rect,size = _ref5.size,scrollOffset = _ref5.scrollOffset;var callback = arguments.length > 1 ? arguments[1] : undefined;
  1233. if (rect || size) {
  1234. this.boundingClientRect();
  1235. }
  1236. if (scrollOffset) {
  1237. this.scrollOffset();
  1238. }
  1239. addCallback.call(this, callback);
  1240. return this;
  1241. };
  1242. }
  1243. if (!query.in) {
  1244. query.in = function () {
  1245. return this;
  1246. };
  1247. }
  1248. return query;
  1249. }
  1250. function createIntersectionObserver(component, options) {
  1251. if (options && options.observeAll) {
  1252. options.selectAll = options.observeAll;
  1253. delete options.observeAll;
  1254. }
  1255. return my.createIntersectionObserver(options);
  1256. }
  1257. var api = /*#__PURE__*/Object.freeze({
  1258. __proto__: null,
  1259. startGyroscope: startGyroscope,
  1260. createSelectorQuery: createSelectorQuery,
  1261. createIntersectionObserver: createIntersectionObserver,
  1262. createMediaQueryObserver: createMediaQueryObserver,
  1263. setStorageSync: setStorageSync,
  1264. getStorageSync: getStorageSync,
  1265. removeStorageSync: removeStorageSync });
  1266. var PAGE_EVENT_HOOKS = [
  1267. 'onPullDownRefresh',
  1268. 'onReachBottom',
  1269. 'onAddToFavorites',
  1270. 'onShareTimeline',
  1271. 'onShareAppMessage',
  1272. 'onPageScroll',
  1273. 'onResize',
  1274. 'onTabItemTap'];
  1275. function initMocks(vm, mocks) {
  1276. var mpInstance = vm.$mp[vm.mpType];
  1277. mocks.forEach(function (mock) {
  1278. if (hasOwn(mpInstance, mock)) {
  1279. vm[mock] = mpInstance[mock];
  1280. }
  1281. });
  1282. }
  1283. function hasHook(hook, vueOptions) {
  1284. if (!vueOptions) {
  1285. return true;
  1286. }
  1287. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  1288. return true;
  1289. }
  1290. vueOptions = vueOptions.default || vueOptions;
  1291. if (isFn(vueOptions)) {
  1292. if (isFn(vueOptions.extendOptions[hook])) {
  1293. return true;
  1294. }
  1295. if (vueOptions.super &&
  1296. vueOptions.super.options &&
  1297. Array.isArray(vueOptions.super.options[hook])) {
  1298. return true;
  1299. }
  1300. return false;
  1301. }
  1302. if (isFn(vueOptions[hook])) {
  1303. return true;
  1304. }
  1305. var mixins = vueOptions.mixins;
  1306. if (Array.isArray(mixins)) {
  1307. return !!mixins.find(function (mixin) {return hasHook(hook, mixin);});
  1308. }
  1309. }
  1310. function initHooks(mpOptions, hooks, vueOptions) {
  1311. hooks.forEach(function (hook) {
  1312. if (hasHook(hook, vueOptions)) {
  1313. mpOptions[hook] = function (args) {
  1314. return this.$vm && this.$vm.__call_hook(hook, args);
  1315. };
  1316. }
  1317. });
  1318. }
  1319. function initVueComponent(Vue, vueOptions) {
  1320. vueOptions = vueOptions.default || vueOptions;
  1321. var VueComponent;
  1322. if (isFn(vueOptions)) {
  1323. VueComponent = vueOptions;
  1324. } else {
  1325. VueComponent = Vue.extend(vueOptions);
  1326. }
  1327. vueOptions = VueComponent.options;
  1328. return [VueComponent, vueOptions];
  1329. }
  1330. function initVueIds(vueIds, mpInstance) {
  1331. vueIds = (vueIds || '').split(',');
  1332. var len = vueIds.length;
  1333. if (len === 1) {
  1334. mpInstance._$vueId = vueIds[0];
  1335. } else if (len === 2) {
  1336. mpInstance._$vueId = vueIds[0];
  1337. mpInstance._$vuePid = vueIds[1];
  1338. }
  1339. }
  1340. function initData(vueOptions, context) {
  1341. var data = vueOptions.data || {};
  1342. var methods = vueOptions.methods || {};
  1343. if (typeof data === 'function') {
  1344. try {
  1345. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  1346. } catch (e) {
  1347. if (Object({"VUE_APP_NAME":"小程序","VUE_APP_PLATFORM":"mp-alipay","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  1348. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  1349. }
  1350. }
  1351. } else {
  1352. try {
  1353. // 对 data 格式化
  1354. data = JSON.parse(JSON.stringify(data));
  1355. } catch (e) {}
  1356. }
  1357. if (!isPlainObject(data)) {
  1358. data = {};
  1359. }
  1360. Object.keys(methods).forEach(function (methodName) {
  1361. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  1362. data[methodName] = methods[methodName];
  1363. }
  1364. });
  1365. return data;
  1366. }
  1367. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  1368. function createObserver(name) {
  1369. return function observer(newVal, oldVal) {
  1370. if (this.$vm) {
  1371. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  1372. }
  1373. };
  1374. }
  1375. function initBehaviors(vueOptions, initBehavior) {
  1376. var vueBehaviors = vueOptions.behaviors;
  1377. var vueExtends = vueOptions.extends;
  1378. var vueMixins = vueOptions.mixins;
  1379. var vueProps = vueOptions.props;
  1380. if (!vueProps) {
  1381. vueOptions.props = vueProps = [];
  1382. }
  1383. var behaviors = [];
  1384. if (Array.isArray(vueBehaviors)) {
  1385. vueBehaviors.forEach(function (behavior) {
  1386. behaviors.push(behavior.replace('uni://', "my".concat("://")));
  1387. if (behavior === 'uni://form-field') {
  1388. if (Array.isArray(vueProps)) {
  1389. vueProps.push('name');
  1390. vueProps.push('value');
  1391. } else {
  1392. vueProps.name = {
  1393. type: String,
  1394. default: '' };
  1395. vueProps.value = {
  1396. type: [String, Number, Boolean, Array, Object, Date],
  1397. default: '' };
  1398. }
  1399. }
  1400. });
  1401. }
  1402. {// alipay 重复定义props会报错,下边的代码对于其他平台也没有意义,保险起见,仅对alipay做处理
  1403. return;
  1404. }
  1405. }
  1406. function parsePropType(key, type, defaultValue, file) {
  1407. // [String]=>String
  1408. if (Array.isArray(type) && type.length === 1) {
  1409. return type[0];
  1410. }
  1411. return type;
  1412. }
  1413. function initProperties(props) {var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  1414. var properties = {};
  1415. if (!isBehavior) {
  1416. properties.vueId = {
  1417. type: String,
  1418. value: '' };
  1419. // 用于字节跳动小程序模拟抽象节点
  1420. properties.generic = {
  1421. type: Object,
  1422. value: null };
  1423. // scopedSlotsCompiler auto
  1424. properties.scopedSlotsCompiler = {
  1425. type: String,
  1426. value: '' };
  1427. properties.vueSlots = { // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  1428. type: null,
  1429. value: [],
  1430. observer: function observer(newVal, oldVal) {
  1431. var $slots = Object.create(null);
  1432. newVal.forEach(function (slotName) {
  1433. $slots[slotName] = true;
  1434. });
  1435. this.setData({
  1436. $slots: $slots });
  1437. } };
  1438. }
  1439. if (Array.isArray(props)) {// ['title']
  1440. props.forEach(function (key) {
  1441. properties[key] = {
  1442. type: null,
  1443. observer: createObserver(key) };
  1444. });
  1445. } else if (isPlainObject(props)) {// {title:{type:String,default:''},content:String}
  1446. Object.keys(props).forEach(function (key) {
  1447. var opts = props[key];
  1448. if (isPlainObject(opts)) {// title:{type:String,default:''}
  1449. var value = opts.default;
  1450. if (isFn(value)) {
  1451. value = value();
  1452. }
  1453. opts.type = parsePropType(key, opts.type);
  1454. properties[key] = {
  1455. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  1456. value: value,
  1457. observer: createObserver(key) };
  1458. } else {// content:String
  1459. var type = parsePropType(key, opts);
  1460. properties[key] = {
  1461. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  1462. observer: createObserver(key) };
  1463. }
  1464. });
  1465. }
  1466. return properties;
  1467. }
  1468. function wrapper$1(event) {
  1469. // TODO 又得兼容 mpvue 的 mp 对象
  1470. try {
  1471. event.mp = JSON.parse(JSON.stringify(event));
  1472. } catch (e) {}
  1473. event.stopPropagation = noop;
  1474. event.preventDefault = noop;
  1475. event.target = event.target || {};
  1476. if (!hasOwn(event, 'detail')) {
  1477. event.detail = {};
  1478. }
  1479. if (hasOwn(event, 'markerId')) {
  1480. event.detail = typeof event.detail === 'object' ? event.detail : {};
  1481. event.detail.markerId = event.markerId;
  1482. }
  1483. if (isPlainObject(event.detail)) {
  1484. event.target = Object.assign({}, event.target, event.detail);
  1485. }
  1486. return event;
  1487. }
  1488. function getExtraValue(vm, dataPathsArray) {
  1489. var context = vm;
  1490. dataPathsArray.forEach(function (dataPathArray) {
  1491. var dataPath = dataPathArray[0];
  1492. var value = dataPathArray[2];
  1493. if (dataPath || typeof value !== 'undefined') {// ['','',index,'disable']
  1494. var propPath = dataPathArray[1];
  1495. var valuePath = dataPathArray[3];
  1496. var vFor;
  1497. if (Number.isInteger(dataPath)) {
  1498. vFor = dataPath;
  1499. } else if (!dataPath) {
  1500. vFor = context;
  1501. } else if (typeof dataPath === 'string' && dataPath) {
  1502. if (dataPath.indexOf('#s#') === 0) {
  1503. vFor = dataPath.substr(3);
  1504. } else {
  1505. vFor = vm.__get_value(dataPath, context);
  1506. }
  1507. }
  1508. if (Number.isInteger(vFor)) {
  1509. context = value;
  1510. } else if (!propPath) {
  1511. context = vFor[value];
  1512. } else {
  1513. if (Array.isArray(vFor)) {
  1514. context = vFor.find(function (vForItem) {
  1515. return vm.__get_value(propPath, vForItem) === value;
  1516. });
  1517. } else if (isPlainObject(vFor)) {
  1518. context = Object.keys(vFor).find(function (vForKey) {
  1519. return vm.__get_value(propPath, vFor[vForKey]) === value;
  1520. });
  1521. } else {
  1522. console.error('v-for 暂不支持循环数据:', vFor);
  1523. }
  1524. }
  1525. if (valuePath) {
  1526. context = vm.__get_value(valuePath, context);
  1527. }
  1528. }
  1529. });
  1530. return context;
  1531. }
  1532. function processEventExtra(vm, extra, event) {
  1533. var extraObj = {};
  1534. if (Array.isArray(extra) && extra.length) {
  1535. /**
  1536. *[
  1537. * ['data.items', 'data.id', item.data.id],
  1538. * ['metas', 'id', meta.id]
  1539. *],
  1540. *[
  1541. * ['data.items', 'data.id', item.data.id],
  1542. * ['metas', 'id', meta.id]
  1543. *],
  1544. *'test'
  1545. */
  1546. extra.forEach(function (dataPath, index) {
  1547. if (typeof dataPath === 'string') {
  1548. if (!dataPath) {// model,prop.sync
  1549. extraObj['$' + index] = vm;
  1550. } else {
  1551. if (dataPath === '$event') {// $event
  1552. extraObj['$' + index] = event;
  1553. } else if (dataPath === 'arguments') {
  1554. if (event.detail && event.detail.__args__) {
  1555. extraObj['$' + index] = event.detail.__args__;
  1556. } else {
  1557. extraObj['$' + index] = [event];
  1558. }
  1559. } else if (dataPath.indexOf('$event.') === 0) {// $event.target.value
  1560. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  1561. } else {
  1562. extraObj['$' + index] = vm.__get_value(dataPath);
  1563. }
  1564. }
  1565. } else {
  1566. extraObj['$' + index] = getExtraValue(vm, dataPath);
  1567. }
  1568. });
  1569. }
  1570. return extraObj;
  1571. }
  1572. function getObjByArray(arr) {
  1573. var obj = {};
  1574. for (var i = 1; i < arr.length; i++) {
  1575. var element = arr[i];
  1576. obj[element[0]] = element[1];
  1577. }
  1578. return obj;
  1579. }
  1580. 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;
  1581. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  1582. if (isCustom) {// 自定义事件
  1583. isCustomMPEvent = event.currentTarget &&
  1584. event.currentTarget.dataset &&
  1585. event.currentTarget.dataset.comType === 'wx';
  1586. if (!args.length) {// 无参数,直接传入 event 或 detail 数组
  1587. if (isCustomMPEvent) {
  1588. return [event];
  1589. }
  1590. return event.detail.__args__ || event.detail;
  1591. }
  1592. }
  1593. var extraObj = processEventExtra(vm, extra, event);
  1594. var ret = [];
  1595. args.forEach(function (arg) {
  1596. if (arg === '$event') {
  1597. if (methodName === '__set_model' && !isCustom) {// input v-model value
  1598. ret.push(event.target.value);
  1599. } else {
  1600. if (isCustom && !isCustomMPEvent) {
  1601. ret.push(event.detail.__args__[0]);
  1602. } else {// wxcomponent 组件或内置组件
  1603. ret.push(event);
  1604. }
  1605. }
  1606. } else {
  1607. if (Array.isArray(arg) && arg[0] === 'o') {
  1608. ret.push(getObjByArray(arg));
  1609. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  1610. ret.push(extraObj[arg]);
  1611. } else {
  1612. ret.push(arg);
  1613. }
  1614. }
  1615. });
  1616. return ret;
  1617. }
  1618. var ONCE = '~';
  1619. var CUSTOM = '^';
  1620. function isMatchEventType(eventType, optType) {
  1621. return eventType === optType ||
  1622. optType === 'regionchange' && (
  1623. eventType === 'begin' ||
  1624. eventType === 'end');
  1625. }
  1626. function getContextVm(vm) {
  1627. var $parent = vm.$parent;
  1628. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  1629. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  1630. $parent = $parent.$parent;
  1631. }
  1632. return $parent && $parent.$parent;
  1633. }
  1634. function handleEvent(event) {var _this2 = this;
  1635. event = wrapper$1(event);
  1636. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  1637. var dataset = (event.currentTarget || event.target).dataset;
  1638. if (!dataset) {
  1639. return console.warn('事件信息不存在');
  1640. }
  1641. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  1642. if (!eventOpts) {
  1643. return console.warn('事件信息不存在');
  1644. }
  1645. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  1646. var eventType = event.type;
  1647. var ret = [];
  1648. eventOpts.forEach(function (eventOpt) {
  1649. var type = eventOpt[0];
  1650. var eventsArray = eventOpt[1];
  1651. var isCustom = type.charAt(0) === CUSTOM;
  1652. type = isCustom ? type.slice(1) : type;
  1653. var isOnce = type.charAt(0) === ONCE;
  1654. type = isOnce ? type.slice(1) : type;
  1655. if (eventsArray && isMatchEventType(eventType, type)) {
  1656. eventsArray.forEach(function (eventArray) {
  1657. var methodName = eventArray[0];
  1658. if (methodName) {
  1659. var handlerCtx = _this2.$vm;
  1660. if (handlerCtx.$options.generic) {// mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  1661. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  1662. }
  1663. if (methodName === '$emit') {
  1664. handlerCtx.$emit.apply(handlerCtx,
  1665. processEventArgs(
  1666. _this2.$vm,
  1667. event,
  1668. eventArray[1],
  1669. eventArray[2],
  1670. isCustom,
  1671. methodName));
  1672. return;
  1673. }
  1674. var handler = handlerCtx[methodName];
  1675. if (!isFn(handler)) {
  1676. throw new Error(" _vm.".concat(methodName, " is not a function"));
  1677. }
  1678. if (isOnce) {
  1679. if (handler.once) {
  1680. return;
  1681. }
  1682. handler.once = true;
  1683. }
  1684. var params = processEventArgs(
  1685. _this2.$vm,
  1686. event,
  1687. eventArray[1],
  1688. eventArray[2],
  1689. isCustom,
  1690. methodName);
  1691. params = Array.isArray(params) ? params : [];
  1692. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  1693. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  1694. // eslint-disable-next-line no-sparse-arrays
  1695. params = params.concat([,,,,,,,,,, event]);
  1696. }
  1697. ret.push(handler.apply(handlerCtx, params));
  1698. }
  1699. });
  1700. }
  1701. });
  1702. if (
  1703. eventType === 'input' &&
  1704. ret.length === 1 &&
  1705. typeof ret[0] !== 'undefined')
  1706. {
  1707. return ret[0];
  1708. }
  1709. }
  1710. var locale;
  1711. {
  1712. locale = my.getSystemInfoSync().language;
  1713. }
  1714. var i18n = (0, _uniI18n.initVueI18n)(
  1715. locale,
  1716. {});
  1717. var t = i18n.t;
  1718. var i18nMixin = i18n.mixin = {
  1719. beforeCreate: function beforeCreate() {var _this3 = this;
  1720. var unwatch = i18n.i18n.watchLocale(function () {
  1721. _this3.$forceUpdate();
  1722. });
  1723. this.$once('hook:beforeDestroy', function () {
  1724. unwatch();
  1725. });
  1726. },
  1727. methods: {
  1728. $$t: function $$t(key, values) {
  1729. return t(key, values);
  1730. } } };
  1731. var setLocale$1 = i18n.setLocale;
  1732. var getLocale$1 = i18n.getLocale;
  1733. function initAppLocale(Vue, appVm, locale) {
  1734. var state = Vue.observable({
  1735. locale: locale || i18n.getLocale() });
  1736. var localeWatchers = [];
  1737. appVm.$watchLocale = function (fn) {
  1738. localeWatchers.push(fn);
  1739. };
  1740. Object.defineProperty(appVm, '$locale', {
  1741. get: function get() {
  1742. return state.locale;
  1743. },
  1744. set: function set(v) {
  1745. state.locale = v;
  1746. localeWatchers.forEach(function (watch) {return watch(v);});
  1747. } });
  1748. }
  1749. var hooks = [
  1750. 'onShow',
  1751. 'onHide',
  1752. 'onError',
  1753. 'onPageNotFound',
  1754. 'onThemeChange',
  1755. 'onUnhandledRejection'];
  1756. {
  1757. hooks.push('onShareAppMessage');
  1758. }
  1759. function initEventChannel$1() {
  1760. _vue.default.prototype.getOpenerEventChannel = function () {
  1761. if (!this.__eventChannel__) {
  1762. this.__eventChannel__ = new EventChannel();
  1763. }
  1764. return this.__eventChannel__;
  1765. };
  1766. var callHook = _vue.default.prototype.__call_hook;
  1767. _vue.default.prototype.__call_hook = function (hook, args) {
  1768. if (hook === 'onLoad' && args && args.__id__) {
  1769. this.__eventChannel__ = getEventChannel(args.__id__);
  1770. delete args.__id__;
  1771. }
  1772. return callHook.call(this, hook, args);
  1773. };
  1774. }
  1775. function initScopedSlotsParams() {
  1776. var center = {};
  1777. var parents = {};
  1778. _vue.default.prototype.$hasScopedSlotsParams = function (vueId) {
  1779. var has = center[vueId];
  1780. if (!has) {
  1781. parents[vueId] = this;
  1782. this.$on('hook:destory', function () {
  1783. delete parents[vueId];
  1784. });
  1785. }
  1786. return has;
  1787. };
  1788. _vue.default.prototype.$getScopedSlotsParams = function (vueId, name, key) {
  1789. var data = center[vueId];
  1790. if (data) {
  1791. var object = data[name] || {};
  1792. return key ? object[key] : object;
  1793. } else {
  1794. parents[vueId] = this;
  1795. this.$on('hook:destory', function () {
  1796. delete parents[vueId];
  1797. });
  1798. }
  1799. };
  1800. _vue.default.prototype.$setScopedSlotsParams = function (name, value) {
  1801. var vueIds = this.$options.propsData.vueId;
  1802. if (vueIds) {
  1803. var vueId = vueIds.split(',')[0];
  1804. var object = center[vueId] = center[vueId] || {};
  1805. object[name] = value;
  1806. if (parents[vueId]) {
  1807. parents[vueId].$forceUpdate();
  1808. }
  1809. }
  1810. };
  1811. _vue.default.mixin({
  1812. destroyed: function destroyed() {
  1813. var propsData = this.$options.propsData;
  1814. var vueId = propsData && propsData.vueId;
  1815. if (vueId) {
  1816. delete center[vueId];
  1817. delete parents[vueId];
  1818. }
  1819. } });
  1820. }
  1821. function parseBaseApp(vm, _ref6)
  1822. {var mocks = _ref6.mocks,initRefs = _ref6.initRefs;
  1823. initEventChannel$1();
  1824. {
  1825. initScopedSlotsParams();
  1826. }
  1827. if (vm.$options.store) {
  1828. _vue.default.prototype.$store = vm.$options.store;
  1829. }
  1830. uniIdMixin(_vue.default);
  1831. _vue.default.prototype.mpHost = "mp-alipay";
  1832. _vue.default.mixin({
  1833. beforeCreate: function beforeCreate() {
  1834. if (!this.$options.mpType) {
  1835. return;
  1836. }
  1837. this.mpType = this.$options.mpType;
  1838. this.$mp = _defineProperty({
  1839. data: {} },
  1840. this.mpType, this.$options.mpInstance);
  1841. this.$scope = this.$options.mpInstance;
  1842. delete this.$options.mpType;
  1843. delete this.$options.mpInstance;
  1844. if (this.mpType === 'page' && typeof getApp === 'function') {// hack vue-i18n
  1845. var app = getApp();
  1846. if (app.$vm && app.$vm.$i18n) {
  1847. this._i18n = app.$vm.$i18n;
  1848. }
  1849. }
  1850. if (this.mpType !== 'app') {
  1851. initRefs(this);
  1852. initMocks(this, mocks);
  1853. }
  1854. } });
  1855. var appOptions = {
  1856. onLaunch: function onLaunch(args) {
  1857. if (this.$vm) {// 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  1858. return;
  1859. }
  1860. this.$vm = vm;
  1861. this.$vm.$mp = {
  1862. app: this };
  1863. this.$vm.$scope = this;
  1864. // vm 上也挂载 globalData
  1865. this.$vm.globalData = this.globalData;
  1866. this.$vm._isMounted = true;
  1867. this.$vm.__call_hook('mounted', args);
  1868. this.$vm.__call_hook('onLaunch', args);
  1869. } };
  1870. // 兼容旧版本 globalData
  1871. appOptions.globalData = vm.$options.globalData || {};
  1872. // 将 methods 中的方法挂在 getApp() 中
  1873. var methods = vm.$options.methods;
  1874. if (methods) {
  1875. Object.keys(methods).forEach(function (name) {
  1876. appOptions[name] = methods[name];
  1877. });
  1878. }
  1879. initAppLocale(_vue.default, vm, my.getSystemInfoSync().language || 'zh-Hans');
  1880. initHooks(appOptions, hooks);
  1881. return appOptions;
  1882. }
  1883. function findVmByVueId(vm, vuePid) {
  1884. var $children = vm.$children;
  1885. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1886. for (var i = $children.length - 1; i >= 0; i--) {
  1887. var childVm = $children[i];
  1888. if (childVm.$scope._$vueId === vuePid) {
  1889. return childVm;
  1890. }
  1891. }
  1892. // 反向递归查找
  1893. var parentVm;
  1894. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1895. parentVm = findVmByVueId($children[_i], vuePid);
  1896. if (parentVm) {
  1897. return parentVm;
  1898. }
  1899. }
  1900. }
  1901. function handleLink(event) {var _ref7 =
  1902. event.detail || event.value,vuePid = _ref7.vuePid,vueOptions = _ref7.vueOptions; // detail 是微信,value 是百度(dipatch)
  1903. var parentVm;
  1904. if (vuePid) {
  1905. parentVm = findVmByVueId(this.$vm, vuePid);
  1906. }
  1907. if (!parentVm) {
  1908. parentVm = this.$vm;
  1909. }
  1910. vueOptions.parent = parentVm;
  1911. }
  1912. var isArray = Array.isArray;
  1913. var keyList = Object.keys;
  1914. function equal(a, b) {
  1915. if (a === b) return true;
  1916. if (a && b && typeof a === 'object' && typeof b === 'object') {
  1917. var arrA = isArray(a);
  1918. var arrB = isArray(b);
  1919. var i, length, key;
  1920. if (arrA && arrB) {
  1921. length = a.length;
  1922. if (length !== b.length) return false;
  1923. for (i = length; i-- !== 0;) {
  1924. if (!equal(a[i], b[i])) return false;
  1925. }
  1926. return true;
  1927. }
  1928. if (arrA !== arrB) return false;
  1929. var dateA = a instanceof Date;
  1930. var dateB = b instanceof Date;
  1931. if (dateA !== dateB) return false;
  1932. if (dateA && dateB) return a.getTime() === b.getTime();
  1933. var regexpA = a instanceof RegExp;
  1934. var regexpB = b instanceof RegExp;
  1935. if (regexpA !== regexpB) return false;
  1936. if (regexpA && regexpB) return a.toString() === b.toString();
  1937. var keys = keyList(a);
  1938. length = keys.length;
  1939. if (length !== keyList(b).length) {
  1940. return false;
  1941. }
  1942. for (i = length; i-- !== 0;) {
  1943. if (!hasOwn.call(b, keys[i])) return false;
  1944. }
  1945. for (i = length; i-- !== 0;) {
  1946. key = keys[i];
  1947. if (!equal(a[key], b[key])) return false;
  1948. }
  1949. return true;
  1950. }
  1951. return false;
  1952. }
  1953. var customizeRE = /:/g;
  1954. var customize = cached(function (str) {
  1955. return camelize(str.replace(customizeRE, '-'));
  1956. });
  1957. var isComponent2 = my.canIUse('component2');
  1958. var mocks = ['$id'];
  1959. function initRefs() {
  1960. }
  1961. function initRelation(detail) {
  1962. this.props.onVueInit(detail);
  1963. }
  1964. function initSpecialMethods(mpInstance) {
  1965. if (!mpInstance.$vm) {
  1966. return;
  1967. }
  1968. var path = mpInstance.is || mpInstance.route;
  1969. if (!path) {
  1970. return;
  1971. }
  1972. if (path.indexOf('/') === 0) {
  1973. path = path.substr(1);
  1974. }
  1975. var specialMethods = my.specialMethods && my.specialMethods[path];
  1976. if (specialMethods) {
  1977. specialMethods.forEach(function (method) {
  1978. if (isFn(mpInstance.$vm[method])) {
  1979. mpInstance[method] = function (event) {
  1980. if (hasOwn(event, 'markerId')) {
  1981. event.detail = typeof event.detail === 'object' ? event.detail : {};
  1982. event.detail.markerId = event.markerId;
  1983. }
  1984. // TODO normalizeEvent
  1985. mpInstance.$vm[method](event);
  1986. };
  1987. }
  1988. });
  1989. }
  1990. }
  1991. function initChildVues(mpInstance) {
  1992. // 此时需保证当前 mpInstance 已经存在 $vm
  1993. if (!mpInstance.$vm) {
  1994. return;
  1995. }
  1996. mpInstance._$childVues && mpInstance._$childVues.forEach(function (_ref8)
  1997. {var vuePid = _ref8.vuePid,vueOptions = _ref8.vueOptions,VueComponent = _ref8.VueComponent,childMPInstance = _ref8.mpInstance;
  1998. // 父子关系
  1999. handleLink.call(mpInstance, {
  2000. detail: {
  2001. vuePid: vuePid,
  2002. vueOptions: vueOptions } });
  2003. childMPInstance.$vm = new VueComponent(vueOptions);
  2004. initSpecialMethods(childMPInstance);
  2005. handleRef.call(vueOptions.parent.$scope, childMPInstance);
  2006. childMPInstance.$vm.$mount();
  2007. initChildVues(childMPInstance);
  2008. childMPInstance.$vm._isMounted = true;
  2009. childMPInstance.$vm.__call_hook('mounted');
  2010. childMPInstance.$vm.__call_hook('onReady');
  2011. });
  2012. delete mpInstance._$childVues;
  2013. }
  2014. function handleRef(ref) {
  2015. if (!ref) {
  2016. return;
  2017. }
  2018. if (ref.props['data-com-type'] === 'wx') {
  2019. var eventProps = {};
  2020. var refProps = ref.props;
  2021. // 初始化支付宝小程序组件事件
  2022. Object.keys(refProps).forEach(function (key) {
  2023. var handler = refProps[key];
  2024. var res = key.match(/^on([A-Z])(\S*)/);
  2025. if (res && typeof handler === 'function' && handler.name === 'bound handleEvent') {
  2026. var event = res && res[1].toLowerCase() + res[2];
  2027. refProps[key] = eventProps[key] = function () {
  2028. var props = Object.assign({}, refProps);
  2029. props[key] = handler;
  2030. // 由于支付宝事件可能包含多个参数,不使用微信小程序事件格式
  2031. delete props['data-com-type'];
  2032. triggerEvent.bind({ props: props })(event, {
  2033. __args__: Array.prototype.slice.call(arguments) });
  2034. };
  2035. }
  2036. });
  2037. // 处理 props 重写
  2038. Object.defineProperty(ref, 'props', {
  2039. get: function get() {
  2040. return refProps;
  2041. },
  2042. set: function set(value) {
  2043. refProps = Object.assign(value, eventProps);
  2044. } });
  2045. }
  2046. var refName = ref.props['data-ref'];
  2047. var refInForName = ref.props['data-ref-in-for'];
  2048. if (refName) {
  2049. this.$vm.$refs[refName] = ref.$vm || ref;
  2050. } else if (refInForName) {
  2051. (this.$vm.$refs[refInForName] || (this.$vm.$refs[refInForName] = [])).push(ref.$vm || ref);
  2052. }
  2053. }
  2054. function triggerEvent(type, detail, options) {
  2055. var handler = this.props && this.props[customize('on-' + type)];
  2056. if (!handler) {
  2057. return;
  2058. }
  2059. var eventOpts = this.props['data-event-opts'];
  2060. var eventParams = this.props['data-event-params'];
  2061. var comType = this.props['data-com-type'];
  2062. var target = {
  2063. dataset: {
  2064. eventOpts: eventOpts,
  2065. eventParams: eventParams,
  2066. comType: comType } };
  2067. handler({
  2068. type: customize(type),
  2069. target: target,
  2070. currentTarget: target,
  2071. detail: detail });
  2072. }
  2073. var IGNORES = ['$slots', '$scopedSlots'];
  2074. function createObserver$1(isDidUpdate) {
  2075. return function observe(props) {var _this4 = this;
  2076. var prevProps = isDidUpdate ? props : this.props;
  2077. var nextProps = isDidUpdate ? this.props : props;
  2078. if (equal(prevProps, nextProps)) {
  2079. return;
  2080. }
  2081. Object.keys(prevProps).forEach(function (name) {
  2082. if (IGNORES.indexOf(name) === -1) {
  2083. var prevValue = prevProps[name];
  2084. var nextValue = nextProps[name];
  2085. if (!isFn(prevValue) && !isFn(nextValue) && !equal(prevValue, nextValue)) {
  2086. _this4.$vm[name] = nextProps[name];
  2087. }
  2088. }
  2089. });
  2090. };
  2091. }
  2092. var handleLink$1 = function () {
  2093. if (isComponent2) {
  2094. return function handleLink$1(detail) {
  2095. return handleLink.call(this, {
  2096. detail: detail });
  2097. };
  2098. }
  2099. return function handleLink$1(detail) {
  2100. if (this.$vm && this.$vm._isMounted) {// 父已初始化
  2101. return handleLink.call(this, {
  2102. detail: {
  2103. vuePid: detail.vuePid,
  2104. vueOptions: detail.vueOptions } });
  2105. }
  2106. // 支付宝通过 didMount 来实现,先子后父,故等父 ready 之后,统一初始化
  2107. (this._$childVues || (this._$childVues = [])).unshift(detail);
  2108. };
  2109. }();
  2110. function parseApp(vm) {
  2111. Object.defineProperty(_vue.default.prototype, '$slots', {
  2112. get: function get() {
  2113. return this.$scope && this.$scope.props.$slots;
  2114. },
  2115. set: function set() {
  2116. } });
  2117. Object.defineProperty(_vue.default.prototype, '$scopedSlots', {
  2118. get: function get() {
  2119. return this.$scope && this.$scope.props.$scopedSlots;
  2120. },
  2121. set: function set() {
  2122. } });
  2123. _vue.default.prototype.$onAliGetAuthorize = function onAliGetAuthorize(method, $event) {var _this5 = this;
  2124. my.getPhoneNumber({
  2125. success: function success(res) {
  2126. $event.type = 'getphonenumber';
  2127. var response = JSON.parse(res.response).response;
  2128. if (response.code === '10000') {// success
  2129. $event.detail.errMsg = 'getPhoneNumber:ok';
  2130. $event.detail.encryptedData = res.response;
  2131. } else {
  2132. $event.detail.errMsg = 'getPhoneNumber:fail Error: ' + res.response;
  2133. }
  2134. _this5[method]($event);
  2135. },
  2136. fail: function fail(res) {
  2137. $event.type = 'getphonenumber';
  2138. $event.detail.errMsg = 'getPhoneNumber:fail';
  2139. _this5[method]($event);
  2140. } });
  2141. };
  2142. _vue.default.prototype.$onAliAuthError = function $onAliAuthError(method, $event) {
  2143. $event.type = 'getphonenumber';
  2144. $event.detail.errMsg = 'getPhoneNumber:fail Error: ' + $event.detail.errorMessage;
  2145. this[method]($event);
  2146. };
  2147. return parseBaseApp(vm, {
  2148. mocks: mocks,
  2149. initRefs: initRefs });
  2150. }
  2151. function createApp(vm) {
  2152. App(parseApp(vm));
  2153. return vm;
  2154. }
  2155. var encodeReserveRE = /[!'()*]/g;
  2156. var encodeReserveReplacer = function encodeReserveReplacer(c) {return '%' + c.charCodeAt(0).toString(16);};
  2157. var commaRE = /%2C/g;
  2158. // fixed encodeURIComponent which is more conformant to RFC3986:
  2159. // - escapes [!'()*]
  2160. // - preserve commas
  2161. var encode = function encode(str) {return encodeURIComponent(str).
  2162. replace(encodeReserveRE, encodeReserveReplacer).
  2163. replace(commaRE, ',');};
  2164. function stringifyQuery(obj) {var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  2165. var res = obj ? Object.keys(obj).map(function (key) {
  2166. var val = obj[key];
  2167. if (val === undefined) {
  2168. return '';
  2169. }
  2170. if (val === null) {
  2171. return encodeStr(key);
  2172. }
  2173. if (Array.isArray(val)) {
  2174. var result = [];
  2175. val.forEach(function (val2) {
  2176. if (val2 === undefined) {
  2177. return;
  2178. }
  2179. if (val2 === null) {
  2180. result.push(encodeStr(key));
  2181. } else {
  2182. result.push(encodeStr(key) + '=' + encodeStr(val2));
  2183. }
  2184. });
  2185. return result.join('&');
  2186. }
  2187. return encodeStr(key) + '=' + encodeStr(val);
  2188. }).filter(function (x) {return x.length > 0;}).join('&') : null;
  2189. return res ? "?".concat(res) : '';
  2190. }
  2191. var hooks$1 = [
  2192. 'onShow',
  2193. 'onHide',
  2194. // mp-alipay 特有
  2195. 'onTitleClick',
  2196. 'onOptionMenuClick',
  2197. 'onPopMenuClick',
  2198. 'onPullIntercept'];
  2199. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  2200. function parsePage(vuePageOptions) {var _initVueComponent =
  2201. initVueComponent(_vue.default, vuePageOptions),_initVueComponent2 = _slicedToArray(_initVueComponent, 2),VueComponent = _initVueComponent2[0],vueOptions = _initVueComponent2[1];
  2202. var pageOptions = {
  2203. mixins: initBehaviors(vueOptions),
  2204. data: initData(vueOptions, _vue.default.prototype),
  2205. onLoad: function onLoad(query) {
  2206. var properties = this.props;
  2207. var options = {
  2208. mpType: 'page',
  2209. mpInstance: this,
  2210. propsData: properties };
  2211. // 初始化 vue 实例
  2212. this.$vm = new VueComponent(options);
  2213. initSpecialMethods(this);
  2214. // 触发首次 setData
  2215. this.$vm.$mount();
  2216. var copyQuery = Object.assign({}, query);
  2217. delete copyQuery.__id__;
  2218. this.$page = {
  2219. fullPath: '/' + this.route + stringifyQuery(copyQuery) };
  2220. this.options = query;
  2221. this.$vm.$mp.query = query; // 兼容 mpvue
  2222. this.$vm.__call_hook('onLoad', query);
  2223. },
  2224. onReady: function onReady() {
  2225. initChildVues(this);
  2226. this.$vm._isMounted = true;
  2227. this.$vm.__call_hook('mounted');
  2228. this.$vm.__call_hook('onReady');
  2229. },
  2230. onUnload: function onUnload() {
  2231. this.$vm.__call_hook('onUnload');
  2232. this.$vm.$destroy();
  2233. },
  2234. events: {
  2235. // 支付宝小程序有些页面事件只能放在events下
  2236. onBack: function onBack() {
  2237. this.$vm.__call_hook('onBackPress');
  2238. } },
  2239. __r: handleRef,
  2240. __e: handleEvent,
  2241. __l: handleLink$1,
  2242. triggerEvent: triggerEvent };
  2243. initHooks(pageOptions, hooks$1, vuePageOptions);
  2244. if (Array.isArray(vueOptions.wxsCallMethods)) {
  2245. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  2246. pageOptions[callMethod] = function (args) {
  2247. return this.$vm[callMethod](args);
  2248. };
  2249. });
  2250. }
  2251. return pageOptions;
  2252. }
  2253. function createPage(vuePageOptions) {
  2254. {
  2255. return Page(parsePage(vuePageOptions));
  2256. }
  2257. }
  2258. function initVm(VueComponent) {
  2259. if (this.$vm) {
  2260. return;
  2261. }
  2262. var properties = this.props;
  2263. var options = {
  2264. mpType: 'component',
  2265. mpInstance: this,
  2266. propsData: properties };
  2267. initVueIds(properties.vueId, this);
  2268. if (isComponent2) {
  2269. // 处理父子关系
  2270. initRelation.call(this, {
  2271. vuePid: this._$vuePid,
  2272. vueOptions: options });
  2273. // 初始化 vue 实例
  2274. this.$vm = new VueComponent(options);
  2275. // 触发首次 setData
  2276. this.$vm.$mount();
  2277. } else {
  2278. // 处理父子关系
  2279. initRelation.call(this, {
  2280. vuePid: this._$vuePid,
  2281. vueOptions: options,
  2282. VueComponent: VueComponent,
  2283. mpInstance: this });
  2284. if (options.parent) {// 父组件已经初始化,直接初始化子,否则放到父组件的 didMount 中处理
  2285. // 初始化 vue 实例
  2286. this.$vm = new VueComponent(options);
  2287. handleRef.call(options.parent.$scope, this);
  2288. // 触发首次 setData
  2289. this.$vm.$mount();
  2290. initChildVues(this);
  2291. this.$vm._isMounted = true;
  2292. this.$vm.__call_hook('mounted');
  2293. this.$vm.__call_hook('onReady');
  2294. }
  2295. }
  2296. }
  2297. function parseComponent(vueComponentOptions) {var _initVueComponent3 =
  2298. initVueComponent(_vue.default, vueComponentOptions),_initVueComponent4 = _slicedToArray(_initVueComponent3, 2),VueComponent = _initVueComponent4[0],vueOptions = _initVueComponent4[1];
  2299. var properties = initProperties(vueOptions.props, false, vueOptions.__file);
  2300. var props = {
  2301. onVueInit: function onVueInit() {} };
  2302. Object.keys(properties).forEach(function (key) {
  2303. if (key !== 'vueSlots') {
  2304. props[key] = properties[key].value;
  2305. }
  2306. });
  2307. var componentOptions = {
  2308. mixins: initBehaviors(vueOptions),
  2309. data: initData(vueOptions, _vue.default.prototype),
  2310. props: props,
  2311. didMount: function didMount() {var _this6 = this;
  2312. if (my.dd) {// 钉钉小程序底层基础库有 bug,组件嵌套使用时,在 didMount 中无法及时调用 props 中的方法
  2313. setTimeout(function () {
  2314. initVm.call(_this6, VueComponent);
  2315. }, 4);
  2316. } else {
  2317. initVm.call(this, VueComponent);
  2318. }
  2319. initSpecialMethods(this);
  2320. if (isComponent2) {
  2321. this.$vm._isMounted = true;
  2322. this.$vm.__call_hook('mounted');
  2323. this.$vm.__call_hook('onReady');
  2324. }
  2325. },
  2326. didUnmount: function didUnmount() {
  2327. this.$vm && this.$vm.$destroy();
  2328. },
  2329. methods: {
  2330. __r: handleRef,
  2331. __e: handleEvent,
  2332. __l: handleLink$1,
  2333. triggerEvent: triggerEvent } };
  2334. if (isComponent2) {
  2335. componentOptions.onInit = function onInit() {
  2336. initVm.call(this, VueComponent);
  2337. };
  2338. componentOptions.deriveDataFromProps = createObserver$1();
  2339. } else {
  2340. componentOptions.didUpdate = createObserver$1(true);
  2341. }
  2342. if (Array.isArray(vueOptions.wxsCallMethods)) {
  2343. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  2344. componentOptions.methods[callMethod] = function (args) {
  2345. return this.$vm[callMethod](args);
  2346. };
  2347. });
  2348. }
  2349. return componentOptions;
  2350. }
  2351. function createComponent(vueOptions) {
  2352. {
  2353. return my.defineComponent(parseComponent(vueOptions));
  2354. }
  2355. }
  2356. function createSubpackageApp(vm) {
  2357. var appOptions = parseApp(vm);
  2358. var app = getApp({
  2359. allowDefault: true });
  2360. vm.$scope = app;
  2361. var globalData = app.globalData;
  2362. if (globalData) {
  2363. Object.keys(appOptions.globalData).forEach(function (name) {
  2364. if (!hasOwn(globalData, name)) {
  2365. globalData[name] = appOptions.globalData[name];
  2366. }
  2367. });
  2368. }
  2369. Object.keys(appOptions).forEach(function (name) {
  2370. if (!hasOwn(app, name)) {
  2371. app[name] = appOptions[name];
  2372. }
  2373. });
  2374. if (isFn(appOptions.onShow) && my.onAppShow) {
  2375. my.onAppShow(function () {for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {args[_key4] = arguments[_key4];}
  2376. vm.__call_hook('onShow', args);
  2377. });
  2378. }
  2379. if (isFn(appOptions.onHide) && my.onAppHide) {
  2380. my.onAppHide(function () {for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {args[_key5] = arguments[_key5];}
  2381. vm.__call_hook('onHide', args);
  2382. });
  2383. }
  2384. if (isFn(appOptions.onLaunch)) {
  2385. var args = my.getLaunchOptionsSync && my.getLaunchOptionsSync();
  2386. vm.__call_hook('onLaunch', args);
  2387. }
  2388. return vm;
  2389. }
  2390. function createPlugin(vm) {
  2391. var appOptions = parseApp(vm);
  2392. if (isFn(appOptions.onShow) && my.onAppShow) {
  2393. my.onAppShow(function () {for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {args[_key6] = arguments[_key6];}
  2394. appOptions.onShow.apply(vm, args);
  2395. });
  2396. }
  2397. if (isFn(appOptions.onHide) && my.onAppHide) {
  2398. my.onAppHide(function () {for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {args[_key7] = arguments[_key7];}
  2399. appOptions.onHide.apply(vm, args);
  2400. });
  2401. }
  2402. if (isFn(appOptions.onLaunch)) {
  2403. var args = my.getLaunchOptionsSync && my.getLaunchOptionsSync();
  2404. appOptions.onLaunch.call(vm, args);
  2405. }
  2406. return vm;
  2407. }
  2408. todos.forEach(function (todoApi) {
  2409. protocols[todoApi] = false;
  2410. });
  2411. canIUses.forEach(function (canIUseApi) {
  2412. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name :
  2413. canIUseApi;
  2414. if (!my.canIUse(apiName)) {
  2415. protocols[canIUseApi] = false;
  2416. }
  2417. });
  2418. var uni = {};
  2419. if (typeof Proxy !== 'undefined' && "mp-alipay" !== 'app-plus') {
  2420. uni = new Proxy({}, {
  2421. get: function get(target, name) {
  2422. if (hasOwn(target, name)) {
  2423. return target[name];
  2424. }
  2425. if (baseApi[name]) {
  2426. return baseApi[name];
  2427. }
  2428. if (api[name]) {
  2429. return promisify(name, api[name]);
  2430. }
  2431. {
  2432. if (extraApi[name]) {
  2433. return promisify(name, extraApi[name]);
  2434. }
  2435. if (todoApis[name]) {
  2436. return promisify(name, todoApis[name]);
  2437. }
  2438. }
  2439. if (eventApi[name]) {
  2440. return eventApi[name];
  2441. }
  2442. if (!hasOwn(my, name) && !hasOwn(protocols, name)) {
  2443. return;
  2444. }
  2445. return promisify(name, wrapper(name, my[name]));
  2446. },
  2447. set: function set(target, name, value) {
  2448. target[name] = value;
  2449. return true;
  2450. } });
  2451. } else {
  2452. Object.keys(baseApi).forEach(function (name) {
  2453. uni[name] = baseApi[name];
  2454. });
  2455. {
  2456. Object.keys(todoApis).forEach(function (name) {
  2457. uni[name] = promisify(name, todoApis[name]);
  2458. });
  2459. Object.keys(extraApi).forEach(function (name) {
  2460. uni[name] = promisify(name, todoApis[name]);
  2461. });
  2462. }
  2463. Object.keys(eventApi).forEach(function (name) {
  2464. uni[name] = eventApi[name];
  2465. });
  2466. Object.keys(api).forEach(function (name) {
  2467. uni[name] = promisify(name, api[name]);
  2468. });
  2469. Object.keys(my).forEach(function (name) {
  2470. if (hasOwn(my, name) || hasOwn(protocols, name)) {
  2471. uni[name] = promisify(name, wrapper(name, my[name]));
  2472. }
  2473. });
  2474. }
  2475. my.createApp = createApp;
  2476. my.createPage = createPage;
  2477. my.createComponent = createComponent;
  2478. my.createSubpackageApp = createSubpackageApp;
  2479. my.createPlugin = createPlugin;
  2480. var uni$1 = uni;var _default =
  2481. uni$1;exports.default = _default;
  2482. /***/ }),
  2483. /***/ 107:
  2484. /*!*********************************************************************************************!*\
  2485. !*** C:/Users/first/Desktop/公司/applets/uni_modules/uni-popup/components/uni-popup/popup.js ***!
  2486. \*********************************************************************************************/
  2487. /*! no static exports found */
  2488. /***/ (function(module, exports, __webpack_require__) {
  2489. "use strict";
  2490. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _message = _interopRequireDefault(__webpack_require__(/*! ./message.js */ 108));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  2491. // 定义 type 类型:弹出类型:top/bottom/center
  2492. var config = {
  2493. // 顶部弹出
  2494. top: 'top',
  2495. // 底部弹出
  2496. bottom: 'bottom',
  2497. // 居中弹出
  2498. center: 'center',
  2499. // 消息提示
  2500. message: 'top',
  2501. // 对话框
  2502. dialog: 'center',
  2503. // 分享
  2504. share: 'bottom' };var _default =
  2505. {
  2506. data: function data() {
  2507. return {
  2508. config: config,
  2509. popupWidth: 0,
  2510. popupHeight: 0 };
  2511. },
  2512. mixins: [_message.default],
  2513. computed: {
  2514. isDesktop: function isDesktop() {
  2515. return this.popupWidth >= 500 && this.popupHeight >= 500;
  2516. } },
  2517. mounted: function mounted() {var _this = this;
  2518. var fixSize = function fixSize() {var _uni$getSystemInfoSyn =
  2519. uni.getSystemInfoSync(),windowWidth = _uni$getSystemInfoSyn.windowWidth,windowHeight = _uni$getSystemInfoSyn.windowHeight,windowTop = _uni$getSystemInfoSyn.windowTop;
  2520. _this.popupWidth = windowWidth;
  2521. _this.popupHeight = windowHeight + windowTop;
  2522. };
  2523. fixSize();
  2524. } };exports.default = _default;
  2525. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-alipay/dist/index.js */ 1)["default"]))
  2526. /***/ }),
  2527. /***/ 108:
  2528. /*!***********************************************************************************************!*\
  2529. !*** C:/Users/first/Desktop/公司/applets/uni_modules/uni-popup/components/uni-popup/message.js ***!
  2530. \***********************************************************************************************/
  2531. /*! no static exports found */
  2532. /***/ (function(module, exports, __webpack_require__) {
  2533. "use strict";
  2534. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  2535. created: function created() {
  2536. if (this.type === 'message') {
  2537. // 不显示遮罩
  2538. this.maskShow = false;
  2539. // 获取子组件对象
  2540. this.childrenMsg = null;
  2541. }
  2542. },
  2543. methods: {
  2544. customOpen: function customOpen() {
  2545. if (this.childrenMsg) {
  2546. this.childrenMsg.open();
  2547. }
  2548. },
  2549. customClose: function customClose() {
  2550. if (this.childrenMsg) {
  2551. this.childrenMsg.close();
  2552. }
  2553. } } };exports.default = _default;
  2554. /***/ }),
  2555. /***/ 116:
  2556. /*!*********************************************************************************************!*\
  2557. !*** C:/Users/first/Desktop/公司/applets/uni_modules/uni-icons/components/uni-icons/icons.js ***!
  2558. \*********************************************************************************************/
  2559. /*! no static exports found */
  2560. /***/ (function(module, exports, __webpack_require__) {
  2561. "use strict";
  2562. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  2563. "pulldown": "\uE588",
  2564. "refreshempty": "\uE461",
  2565. "back": "\uE471",
  2566. "forward": "\uE470",
  2567. "more": "\uE507",
  2568. "more-filled": "\uE537",
  2569. "scan": "\uE612",
  2570. "qq": "\uE264",
  2571. "weibo": "\uE260",
  2572. "weixin": "\uE261",
  2573. "pengyouquan": "\uE262",
  2574. "loop": "\uE565",
  2575. "refresh": "\uE407",
  2576. "refresh-filled": "\uE437",
  2577. "arrowthindown": "\uE585",
  2578. "arrowthinleft": "\uE586",
  2579. "arrowthinright": "\uE587",
  2580. "arrowthinup": "\uE584",
  2581. "undo-filled": "\uE7D6",
  2582. "undo": "\uE406",
  2583. "redo": "\uE405",
  2584. "redo-filled": "\uE7D9",
  2585. "bars": "\uE563",
  2586. "chatboxes": "\uE203",
  2587. "camera": "\uE301",
  2588. "chatboxes-filled": "\uE233",
  2589. "camera-filled": "\uE7EF",
  2590. "cart-filled": "\uE7F4",
  2591. "cart": "\uE7F5",
  2592. "checkbox-filled": "\uE442",
  2593. "checkbox": "\uE7FA",
  2594. "arrowleft": "\uE582",
  2595. "arrowdown": "\uE581",
  2596. "arrowright": "\uE583",
  2597. "smallcircle-filled": "\uE801",
  2598. "arrowup": "\uE580",
  2599. "circle": "\uE411",
  2600. "eye-filled": "\uE568",
  2601. "eye-slash-filled": "\uE822",
  2602. "eye-slash": "\uE823",
  2603. "eye": "\uE824",
  2604. "flag-filled": "\uE825",
  2605. "flag": "\uE508",
  2606. "gear-filled": "\uE532",
  2607. "reload": "\uE462",
  2608. "gear": "\uE502",
  2609. "hand-thumbsdown-filled": "\uE83B",
  2610. "hand-thumbsdown": "\uE83C",
  2611. "hand-thumbsup-filled": "\uE83D",
  2612. "heart-filled": "\uE83E",
  2613. "hand-thumbsup": "\uE83F",
  2614. "heart": "\uE840",
  2615. "home": "\uE500",
  2616. "info": "\uE504",
  2617. "home-filled": "\uE530",
  2618. "info-filled": "\uE534",
  2619. "circle-filled": "\uE441",
  2620. "chat-filled": "\uE847",
  2621. "chat": "\uE263",
  2622. "mail-open-filled": "\uE84D",
  2623. "email-filled": "\uE231",
  2624. "mail-open": "\uE84E",
  2625. "email": "\uE201",
  2626. "checkmarkempty": "\uE472",
  2627. "list": "\uE562",
  2628. "locked-filled": "\uE856",
  2629. "locked": "\uE506",
  2630. "map-filled": "\uE85C",
  2631. "map-pin": "\uE85E",
  2632. "map-pin-ellipse": "\uE864",
  2633. "map": "\uE364",
  2634. "minus-filled": "\uE440",
  2635. "mic-filled": "\uE332",
  2636. "minus": "\uE410",
  2637. "micoff": "\uE360",
  2638. "mic": "\uE302",
  2639. "clear": "\uE434",
  2640. "smallcircle": "\uE868",
  2641. "close": "\uE404",
  2642. "closeempty": "\uE460",
  2643. "paperclip": "\uE567",
  2644. "paperplane": "\uE503",
  2645. "paperplane-filled": "\uE86E",
  2646. "person-filled": "\uE131",
  2647. "contact-filled": "\uE130",
  2648. "person": "\uE101",
  2649. "contact": "\uE100",
  2650. "images-filled": "\uE87A",
  2651. "phone": "\uE200",
  2652. "images": "\uE87B",
  2653. "image": "\uE363",
  2654. "image-filled": "\uE877",
  2655. "location-filled": "\uE333",
  2656. "location": "\uE303",
  2657. "plus-filled": "\uE439",
  2658. "plus": "\uE409",
  2659. "plusempty": "\uE468",
  2660. "help-filled": "\uE535",
  2661. "help": "\uE505",
  2662. "navigate-filled": "\uE884",
  2663. "navigate": "\uE501",
  2664. "mic-slash-filled": "\uE892",
  2665. "search": "\uE466",
  2666. "settings": "\uE560",
  2667. "sound": "\uE590",
  2668. "sound-filled": "\uE8A1",
  2669. "spinner-cycle": "\uE465",
  2670. "download-filled": "\uE8A4",
  2671. "personadd-filled": "\uE132",
  2672. "videocam-filled": "\uE8AF",
  2673. "personadd": "\uE102",
  2674. "upload": "\uE402",
  2675. "upload-filled": "\uE8B1",
  2676. "starhalf": "\uE463",
  2677. "star-filled": "\uE438",
  2678. "star": "\uE408",
  2679. "trash": "\uE401",
  2680. "phone-filled": "\uE230",
  2681. "compose": "\uE400",
  2682. "videocam": "\uE300",
  2683. "trash-filled": "\uE8DC",
  2684. "download": "\uE403",
  2685. "chatbubble-filled": "\uE232",
  2686. "chatbubble": "\uE202",
  2687. "cloud-download": "\uE8E4",
  2688. "cloud-upload-filled": "\uE8E5",
  2689. "cloud-upload": "\uE8E6",
  2690. "cloud-download-filled": "\uE8E9",
  2691. "headphones": "\uE8BF",
  2692. "shop": "\uE609" };exports.default = _default;
  2693. /***/ }),
  2694. /***/ 15:
  2695. /*!**********************************************************************************************************!*\
  2696. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  2697. \**********************************************************************************************************/
  2698. /*! exports provided: default */
  2699. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2700. "use strict";
  2701. __webpack_require__.r(__webpack_exports__);
  2702. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  2703. /* globals __VUE_SSR_CONTEXT__ */
  2704. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  2705. // This module is a runtime utility for cleaner component module output and will
  2706. // be included in the final webpack user bundle.
  2707. function normalizeComponent (
  2708. scriptExports,
  2709. render,
  2710. staticRenderFns,
  2711. functionalTemplate,
  2712. injectStyles,
  2713. scopeId,
  2714. moduleIdentifier, /* server only */
  2715. shadowMode, /* vue-cli only */
  2716. components, // fixed by xxxxxx auto components
  2717. renderjs // fixed by xxxxxx renderjs
  2718. ) {
  2719. // Vue.extend constructor export interop
  2720. var options = typeof scriptExports === 'function'
  2721. ? scriptExports.options
  2722. : scriptExports
  2723. // fixed by xxxxxx auto components
  2724. if (components) {
  2725. if (!options.components) {
  2726. options.components = {}
  2727. }
  2728. var hasOwn = Object.prototype.hasOwnProperty
  2729. for (var name in components) {
  2730. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  2731. options.components[name] = components[name]
  2732. }
  2733. }
  2734. }
  2735. // fixed by xxxxxx renderjs
  2736. if (renderjs) {
  2737. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  2738. this[renderjs.__module] = this
  2739. });
  2740. (options.mixins || (options.mixins = [])).push(renderjs)
  2741. }
  2742. // render functions
  2743. if (render) {
  2744. options.render = render
  2745. options.staticRenderFns = staticRenderFns
  2746. options._compiled = true
  2747. }
  2748. // functional template
  2749. if (functionalTemplate) {
  2750. options.functional = true
  2751. }
  2752. // scopedId
  2753. if (scopeId) {
  2754. options._scopeId = 'data-v-' + scopeId
  2755. }
  2756. var hook
  2757. if (moduleIdentifier) { // server build
  2758. hook = function (context) {
  2759. // 2.3 injection
  2760. context =
  2761. context || // cached call
  2762. (this.$vnode && this.$vnode.ssrContext) || // stateful
  2763. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  2764. // 2.2 with runInNewContext: true
  2765. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  2766. context = __VUE_SSR_CONTEXT__
  2767. }
  2768. // inject component styles
  2769. if (injectStyles) {
  2770. injectStyles.call(this, context)
  2771. }
  2772. // register component module identifier for async chunk inferrence
  2773. if (context && context._registeredComponents) {
  2774. context._registeredComponents.add(moduleIdentifier)
  2775. }
  2776. }
  2777. // used by ssr in case component is cached and beforeCreate
  2778. // never gets called
  2779. options._ssrRegister = hook
  2780. } else if (injectStyles) {
  2781. hook = shadowMode
  2782. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  2783. : injectStyles
  2784. }
  2785. if (hook) {
  2786. if (options.functional) {
  2787. // for template-only hot-reload because in that case the render fn doesn't
  2788. // go through the normalizer
  2789. options._injectStyles = hook
  2790. // register for functioal component in vue file
  2791. var originalRender = options.render
  2792. options.render = function renderWithStyleInjection (h, context) {
  2793. hook.call(context)
  2794. return originalRender(h, context)
  2795. }
  2796. } else {
  2797. // inject component registration as beforeCreate hook
  2798. var existing = options.beforeCreate
  2799. options.beforeCreate = existing
  2800. ? [].concat(existing, hook)
  2801. : [hook]
  2802. }
  2803. }
  2804. return {
  2805. exports: scriptExports,
  2806. options: options
  2807. }
  2808. }
  2809. /***/ }),
  2810. /***/ 16:
  2811. /*!********************************************************!*\
  2812. !*** C:/Users/first/Desktop/公司/applets/store/index.js ***!
  2813. \********************************************************/
  2814. /*! no static exports found */
  2815. /***/ (function(module, exports, __webpack_require__) {
  2816. "use strict";
  2817. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));
  2818. var _vuex = _interopRequireDefault(__webpack_require__(/*! vuex */ 17));
  2819. var _settings = _interopRequireDefault(__webpack_require__(/*! @/settings.js */ 18));
  2820. var _user = _interopRequireDefault(__webpack_require__(/*! @/store/modules/user */ 19));
  2821. var _order = _interopRequireDefault(__webpack_require__(/*! @/store/modules/order */ 20));
  2822. var _station = _interopRequireDefault(__webpack_require__(/*! @/store/modules/station */ 21));
  2823. var _voucher = _interopRequireDefault(__webpack_require__(/*! @/store/modules/voucher */ 22));
  2824. var _coupon = _interopRequireDefault(__webpack_require__(/*! @/store/modules/coupon */ 23));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  2825. _vue.default.use(_vuex.default);var _default =
  2826. new _vuex.default.Store({
  2827. state: {
  2828. appId: _settings.default.appId
  2829. // stationId: settings.stationId,
  2830. // phoneNumber:uni.getStorageSync('phoneNumber') || "",
  2831. // countryCode:uni.getStorageSync('countryCode') || "",
  2832. // purePhoneNumber:uni.getStorageSync('purePhoneNumber') || "",
  2833. // openId: uni.getStorageSync('openId') || "",
  2834. // unionId: uni.getStorageSync('unionId') || "",
  2835. // userInfo: !uni.getStorageSync('userInfo') ? {} : JSON.parse(uni.getStorageSync('userInfo')),
  2836. // orderInfo:undefined,
  2837. // selectedGas:undefined,
  2838. // labelId:undefined,
  2839. // employeeId:undefined,
  2840. },
  2841. getters: {},
  2842. mutations: {
  2843. // updatePhoneNumber(state, phoneNumber) {
  2844. // uni.setStorageSync('phoneNumber', phoneNumber);
  2845. // state.phoneNumber = phoneNumber
  2846. // },
  2847. // updateCountryCode(state, countryCode) {
  2848. // uni.setStorageSync('countryCode', countryCode);
  2849. // state.countryCode = countryCode
  2850. // },
  2851. // updatePurePhoneNumber(state, purePhoneNumber) {
  2852. // uni.setStorageSync('phoneNumber', phoneNumber);
  2853. // state.purePhoneNumber = purePhoneNumber
  2854. // },
  2855. // updateOpenId(state, openId) {
  2856. // uni.setStorageSync('openId', openId);
  2857. // state.openId = openId
  2858. // },
  2859. // updateUnionId(state, unionId) {
  2860. // uni.setStorageSync('unionId', unionId);
  2861. // state.unionId = unionId
  2862. // },
  2863. // clearUserAuthen(state){
  2864. // uni.removeStorageSync('phoneNumber')
  2865. // uni.removeStorageSync('countryCode')
  2866. // uni.removeStorageSync('purePhoneNumber')
  2867. // uni.removeStorageSync('openId')
  2868. // uni.removeStorageSync('unionId')
  2869. // state.phoneNumber = ''
  2870. // state.countryCode = ''
  2871. // state.purePhoneNumber = ''
  2872. // state.openId = ''
  2873. // state.unionId = ''
  2874. // },
  2875. // updateUserInfo(state, userInfo) {
  2876. // uni.setStorageSync('userInfo', JSON.stringify(userInfo));
  2877. // state.userInfo = userInfo
  2878. // },
  2879. // clearUserInfo(state) {
  2880. // uni.removeStorageSync('userInfo')
  2881. // state.userInfo = {}
  2882. // },
  2883. // updateOrderInfo(state, orderInfo){
  2884. // state.orderInfo = orderInfo
  2885. // },
  2886. // updateSelectedGas(state, selectedGas){
  2887. // state.selectedGas = selectedGas
  2888. // },
  2889. // updateStationId(state, stationId){
  2890. // state.stationId = stationId
  2891. // },
  2892. // updateLabelId(state, labelId) {
  2893. // state.labelId = labelId
  2894. // },
  2895. // clearLabelId(state){
  2896. // state.labelId = undefined
  2897. // },
  2898. resetApplet: function resetApplet(state) {
  2899. uni.clearStorageSync();
  2900. state.user.phoneNumber = '';
  2901. state.user.countryCode = '';
  2902. state.user.purePhoneNumber = '';
  2903. state.user.openId = "";
  2904. state.user.unionId = "";
  2905. state.user.userInfo = {};
  2906. state.station.employeeId = undefined;
  2907. }
  2908. // updateEmployeeId(state, employeeId){
  2909. // state.employeeId = employeeId
  2910. // },
  2911. // clearEmployeeId(state){
  2912. // state.employeeId = undefined
  2913. // }
  2914. },
  2915. actions: {},
  2916. modules: {
  2917. user: _user.default,
  2918. order: _order.default,
  2919. station: _station.default,
  2920. voucher: _voucher.default,
  2921. coupon: _coupon.default } });exports.default = _default;
  2922. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-alipay/dist/index.js */ 1)["default"]))
  2923. /***/ }),
  2924. /***/ 17:
  2925. /*!**************************************************************************************!*\
  2926. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vuex3/dist/vuex.common.js ***!
  2927. \**************************************************************************************/
  2928. /*! no static exports found */
  2929. /***/ (function(module, exports, __webpack_require__) {
  2930. "use strict";
  2931. /* WEBPACK VAR INJECTION */(function(global) {/*!
  2932. * vuex v3.6.2
  2933. * (c) 2021 Evan You
  2934. * @license MIT
  2935. */
  2936. function applyMixin (Vue) {
  2937. var version = Number(Vue.version.split('.')[0]);
  2938. if (version >= 2) {
  2939. Vue.mixin({ beforeCreate: vuexInit });
  2940. } else {
  2941. // override init and inject vuex init procedure
  2942. // for 1.x backwards compatibility.
  2943. var _init = Vue.prototype._init;
  2944. Vue.prototype._init = function (options) {
  2945. if ( options === void 0 ) options = {};
  2946. options.init = options.init
  2947. ? [vuexInit].concat(options.init)
  2948. : vuexInit;
  2949. _init.call(this, options);
  2950. };
  2951. }
  2952. /**
  2953. * Vuex init hook, injected into each instances init hooks list.
  2954. */
  2955. function vuexInit () {
  2956. var options = this.$options;
  2957. // store injection
  2958. if (options.store) {
  2959. this.$store = typeof options.store === 'function'
  2960. ? options.store()
  2961. : options.store;
  2962. } else if (options.parent && options.parent.$store) {
  2963. this.$store = options.parent.$store;
  2964. }
  2965. }
  2966. }
  2967. var target = typeof window !== 'undefined'
  2968. ? window
  2969. : typeof global !== 'undefined'
  2970. ? global
  2971. : {};
  2972. var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  2973. function devtoolPlugin (store) {
  2974. if (!devtoolHook) { return }
  2975. store._devtoolHook = devtoolHook;
  2976. devtoolHook.emit('vuex:init', store);
  2977. devtoolHook.on('vuex:travel-to-state', function (targetState) {
  2978. store.replaceState(targetState);
  2979. });
  2980. store.subscribe(function (mutation, state) {
  2981. devtoolHook.emit('vuex:mutation', mutation, state);
  2982. }, { prepend: true });
  2983. store.subscribeAction(function (action, state) {
  2984. devtoolHook.emit('vuex:action', action, state);
  2985. }, { prepend: true });
  2986. }
  2987. /**
  2988. * Get the first item that pass the test
  2989. * by second argument function
  2990. *
  2991. * @param {Array} list
  2992. * @param {Function} f
  2993. * @return {*}
  2994. */
  2995. function find (list, f) {
  2996. return list.filter(f)[0]
  2997. }
  2998. /**
  2999. * Deep copy the given object considering circular structure.
  3000. * This function caches all nested objects and its copies.
  3001. * If it detects circular structure, use cached copy to avoid infinite loop.
  3002. *
  3003. * @param {*} obj
  3004. * @param {Array<Object>} cache
  3005. * @return {*}
  3006. */
  3007. function deepCopy (obj, cache) {
  3008. if ( cache === void 0 ) cache = [];
  3009. // just return if obj is immutable value
  3010. if (obj === null || typeof obj !== 'object') {
  3011. return obj
  3012. }
  3013. // if obj is hit, it is in circular structure
  3014. var hit = find(cache, function (c) { return c.original === obj; });
  3015. if (hit) {
  3016. return hit.copy
  3017. }
  3018. var copy = Array.isArray(obj) ? [] : {};
  3019. // put the copy into cache at first
  3020. // because we want to refer it in recursive deepCopy
  3021. cache.push({
  3022. original: obj,
  3023. copy: copy
  3024. });
  3025. Object.keys(obj).forEach(function (key) {
  3026. copy[key] = deepCopy(obj[key], cache);
  3027. });
  3028. return copy
  3029. }
  3030. /**
  3031. * forEach for object
  3032. */
  3033. function forEachValue (obj, fn) {
  3034. Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });
  3035. }
  3036. function isObject (obj) {
  3037. return obj !== null && typeof obj === 'object'
  3038. }
  3039. function isPromise (val) {
  3040. return val && typeof val.then === 'function'
  3041. }
  3042. function assert (condition, msg) {
  3043. if (!condition) { throw new Error(("[vuex] " + msg)) }
  3044. }
  3045. function partial (fn, arg) {
  3046. return function () {
  3047. return fn(arg)
  3048. }
  3049. }
  3050. // Base data struct for store's module, package with some attribute and method
  3051. var Module = function Module (rawModule, runtime) {
  3052. this.runtime = runtime;
  3053. // Store some children item
  3054. this._children = Object.create(null);
  3055. // Store the origin module object which passed by programmer
  3056. this._rawModule = rawModule;
  3057. var rawState = rawModule.state;
  3058. // Store the origin module's state
  3059. this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
  3060. };
  3061. var prototypeAccessors = { namespaced: { configurable: true } };
  3062. prototypeAccessors.namespaced.get = function () {
  3063. return !!this._rawModule.namespaced
  3064. };
  3065. Module.prototype.addChild = function addChild (key, module) {
  3066. this._children[key] = module;
  3067. };
  3068. Module.prototype.removeChild = function removeChild (key) {
  3069. delete this._children[key];
  3070. };
  3071. Module.prototype.getChild = function getChild (key) {
  3072. return this._children[key]
  3073. };
  3074. Module.prototype.hasChild = function hasChild (key) {
  3075. return key in this._children
  3076. };
  3077. Module.prototype.update = function update (rawModule) {
  3078. this._rawModule.namespaced = rawModule.namespaced;
  3079. if (rawModule.actions) {
  3080. this._rawModule.actions = rawModule.actions;
  3081. }
  3082. if (rawModule.mutations) {
  3083. this._rawModule.mutations = rawModule.mutations;
  3084. }
  3085. if (rawModule.getters) {
  3086. this._rawModule.getters = rawModule.getters;
  3087. }
  3088. };
  3089. Module.prototype.forEachChild = function forEachChild (fn) {
  3090. forEachValue(this._children, fn);
  3091. };
  3092. Module.prototype.forEachGetter = function forEachGetter (fn) {
  3093. if (this._rawModule.getters) {
  3094. forEachValue(this._rawModule.getters, fn);
  3095. }
  3096. };
  3097. Module.prototype.forEachAction = function forEachAction (fn) {
  3098. if (this._rawModule.actions) {
  3099. forEachValue(this._rawModule.actions, fn);
  3100. }
  3101. };
  3102. Module.prototype.forEachMutation = function forEachMutation (fn) {
  3103. if (this._rawModule.mutations) {
  3104. forEachValue(this._rawModule.mutations, fn);
  3105. }
  3106. };
  3107. Object.defineProperties( Module.prototype, prototypeAccessors );
  3108. var ModuleCollection = function ModuleCollection (rawRootModule) {
  3109. // register root module (Vuex.Store options)
  3110. this.register([], rawRootModule, false);
  3111. };
  3112. ModuleCollection.prototype.get = function get (path) {
  3113. return path.reduce(function (module, key) {
  3114. return module.getChild(key)
  3115. }, this.root)
  3116. };
  3117. ModuleCollection.prototype.getNamespace = function getNamespace (path) {
  3118. var module = this.root;
  3119. return path.reduce(function (namespace, key) {
  3120. module = module.getChild(key);
  3121. return namespace + (module.namespaced ? key + '/' : '')
  3122. }, '')
  3123. };
  3124. ModuleCollection.prototype.update = function update$1 (rawRootModule) {
  3125. update([], this.root, rawRootModule);
  3126. };
  3127. ModuleCollection.prototype.register = function register (path, rawModule, runtime) {
  3128. var this$1 = this;
  3129. if ( runtime === void 0 ) runtime = true;
  3130. if ((true)) {
  3131. assertRawModule(path, rawModule);
  3132. }
  3133. var newModule = new Module(rawModule, runtime);
  3134. if (path.length === 0) {
  3135. this.root = newModule;
  3136. } else {
  3137. var parent = this.get(path.slice(0, -1));
  3138. parent.addChild(path[path.length - 1], newModule);
  3139. }
  3140. // register nested modules
  3141. if (rawModule.modules) {
  3142. forEachValue(rawModule.modules, function (rawChildModule, key) {
  3143. this$1.register(path.concat(key), rawChildModule, runtime);
  3144. });
  3145. }
  3146. };
  3147. ModuleCollection.prototype.unregister = function unregister (path) {
  3148. var parent = this.get(path.slice(0, -1));
  3149. var key = path[path.length - 1];
  3150. var child = parent.getChild(key);
  3151. if (!child) {
  3152. if ((true)) {
  3153. console.warn(
  3154. "[vuex] trying to unregister module '" + key + "', which is " +
  3155. "not registered"
  3156. );
  3157. }
  3158. return
  3159. }
  3160. if (!child.runtime) {
  3161. return
  3162. }
  3163. parent.removeChild(key);
  3164. };
  3165. ModuleCollection.prototype.isRegistered = function isRegistered (path) {
  3166. var parent = this.get(path.slice(0, -1));
  3167. var key = path[path.length - 1];
  3168. if (parent) {
  3169. return parent.hasChild(key)
  3170. }
  3171. return false
  3172. };
  3173. function update (path, targetModule, newModule) {
  3174. if ((true)) {
  3175. assertRawModule(path, newModule);
  3176. }
  3177. // update target module
  3178. targetModule.update(newModule);
  3179. // update nested modules
  3180. if (newModule.modules) {
  3181. for (var key in newModule.modules) {
  3182. if (!targetModule.getChild(key)) {
  3183. if ((true)) {
  3184. console.warn(
  3185. "[vuex] trying to add a new module '" + key + "' on hot reloading, " +
  3186. 'manual reload is needed'
  3187. );
  3188. }
  3189. return
  3190. }
  3191. update(
  3192. path.concat(key),
  3193. targetModule.getChild(key),
  3194. newModule.modules[key]
  3195. );
  3196. }
  3197. }
  3198. }
  3199. var functionAssert = {
  3200. assert: function (value) { return typeof value === 'function'; },
  3201. expected: 'function'
  3202. };
  3203. var objectAssert = {
  3204. assert: function (value) { return typeof value === 'function' ||
  3205. (typeof value === 'object' && typeof value.handler === 'function'); },
  3206. expected: 'function or object with "handler" function'
  3207. };
  3208. var assertTypes = {
  3209. getters: functionAssert,
  3210. mutations: functionAssert,
  3211. actions: objectAssert
  3212. };
  3213. function assertRawModule (path, rawModule) {
  3214. Object.keys(assertTypes).forEach(function (key) {
  3215. if (!rawModule[key]) { return }
  3216. var assertOptions = assertTypes[key];
  3217. forEachValue(rawModule[key], function (value, type) {
  3218. assert(
  3219. assertOptions.assert(value),
  3220. makeAssertionMessage(path, key, type, value, assertOptions.expected)
  3221. );
  3222. });
  3223. });
  3224. }
  3225. function makeAssertionMessage (path, key, type, value, expected) {
  3226. var buf = key + " should be " + expected + " but \"" + key + "." + type + "\"";
  3227. if (path.length > 0) {
  3228. buf += " in module \"" + (path.join('.')) + "\"";
  3229. }
  3230. buf += " is " + (JSON.stringify(value)) + ".";
  3231. return buf
  3232. }
  3233. var Vue; // bind on install
  3234. var Store = function Store (options) {
  3235. var this$1 = this;
  3236. if ( options === void 0 ) options = {};
  3237. // Auto install if it is not done yet and `window` has `Vue`.
  3238. // To allow users to avoid auto-installation in some cases,
  3239. // this code should be placed here. See #731
  3240. if (!Vue && typeof window !== 'undefined' && window.Vue) {
  3241. install(window.Vue);
  3242. }
  3243. if ((true)) {
  3244. assert(Vue, "must call Vue.use(Vuex) before creating a store instance.");
  3245. assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser.");
  3246. assert(this instanceof Store, "store must be called with the new operator.");
  3247. }
  3248. var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];
  3249. var strict = options.strict; if ( strict === void 0 ) strict = false;
  3250. // store internal state
  3251. this._committing = false;
  3252. this._actions = Object.create(null);
  3253. this._actionSubscribers = [];
  3254. this._mutations = Object.create(null);
  3255. this._wrappedGetters = Object.create(null);
  3256. this._modules = new ModuleCollection(options);
  3257. this._modulesNamespaceMap = Object.create(null);
  3258. this._subscribers = [];
  3259. this._watcherVM = new Vue();
  3260. this._makeLocalGettersCache = Object.create(null);
  3261. // bind commit and dispatch to self
  3262. var store = this;
  3263. var ref = this;
  3264. var dispatch = ref.dispatch;
  3265. var commit = ref.commit;
  3266. this.dispatch = function boundDispatch (type, payload) {
  3267. return dispatch.call(store, type, payload)
  3268. };
  3269. this.commit = function boundCommit (type, payload, options) {
  3270. return commit.call(store, type, payload, options)
  3271. };
  3272. // strict mode
  3273. this.strict = strict;
  3274. var state = this._modules.root.state;
  3275. // init root module.
  3276. // this also recursively registers all sub-modules
  3277. // and collects all module getters inside this._wrappedGetters
  3278. installModule(this, state, [], this._modules.root);
  3279. // initialize the store vm, which is responsible for the reactivity
  3280. // (also registers _wrappedGetters as computed properties)
  3281. resetStoreVM(this, state);
  3282. // apply plugins
  3283. plugins.forEach(function (plugin) { return plugin(this$1); });
  3284. var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;
  3285. if (useDevtools) {
  3286. devtoolPlugin(this);
  3287. }
  3288. };
  3289. var prototypeAccessors$1 = { state: { configurable: true } };
  3290. prototypeAccessors$1.state.get = function () {
  3291. return this._vm._data.$$state
  3292. };
  3293. prototypeAccessors$1.state.set = function (v) {
  3294. if ((true)) {
  3295. assert(false, "use store.replaceState() to explicit replace store state.");
  3296. }
  3297. };
  3298. Store.prototype.commit = function commit (_type, _payload, _options) {
  3299. var this$1 = this;
  3300. // check object-style commit
  3301. var ref = unifyObjectStyle(_type, _payload, _options);
  3302. var type = ref.type;
  3303. var payload = ref.payload;
  3304. var options = ref.options;
  3305. var mutation = { type: type, payload: payload };
  3306. var entry = this._mutations[type];
  3307. if (!entry) {
  3308. if ((true)) {
  3309. console.error(("[vuex] unknown mutation type: " + type));
  3310. }
  3311. return
  3312. }
  3313. this._withCommit(function () {
  3314. entry.forEach(function commitIterator (handler) {
  3315. handler(payload);
  3316. });
  3317. });
  3318. this._subscribers
  3319. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  3320. .forEach(function (sub) { return sub(mutation, this$1.state); });
  3321. if (
  3322. ( true) &&
  3323. options && options.silent
  3324. ) {
  3325. console.warn(
  3326. "[vuex] mutation type: " + type + ". Silent option has been removed. " +
  3327. 'Use the filter functionality in the vue-devtools'
  3328. );
  3329. }
  3330. };
  3331. Store.prototype.dispatch = function dispatch (_type, _payload) {
  3332. var this$1 = this;
  3333. // check object-style dispatch
  3334. var ref = unifyObjectStyle(_type, _payload);
  3335. var type = ref.type;
  3336. var payload = ref.payload;
  3337. var action = { type: type, payload: payload };
  3338. var entry = this._actions[type];
  3339. if (!entry) {
  3340. if ((true)) {
  3341. console.error(("[vuex] unknown action type: " + type));
  3342. }
  3343. return
  3344. }
  3345. try {
  3346. this._actionSubscribers
  3347. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  3348. .filter(function (sub) { return sub.before; })
  3349. .forEach(function (sub) { return sub.before(action, this$1.state); });
  3350. } catch (e) {
  3351. if ((true)) {
  3352. console.warn("[vuex] error in before action subscribers: ");
  3353. console.error(e);
  3354. }
  3355. }
  3356. var result = entry.length > 1
  3357. ? Promise.all(entry.map(function (handler) { return handler(payload); }))
  3358. : entry[0](payload);
  3359. return new Promise(function (resolve, reject) {
  3360. result.then(function (res) {
  3361. try {
  3362. this$1._actionSubscribers
  3363. .filter(function (sub) { return sub.after; })
  3364. .forEach(function (sub) { return sub.after(action, this$1.state); });
  3365. } catch (e) {
  3366. if ((true)) {
  3367. console.warn("[vuex] error in after action subscribers: ");
  3368. console.error(e);
  3369. }
  3370. }
  3371. resolve(res);
  3372. }, function (error) {
  3373. try {
  3374. this$1._actionSubscribers
  3375. .filter(function (sub) { return sub.error; })
  3376. .forEach(function (sub) { return sub.error(action, this$1.state, error); });
  3377. } catch (e) {
  3378. if ((true)) {
  3379. console.warn("[vuex] error in error action subscribers: ");
  3380. console.error(e);
  3381. }
  3382. }
  3383. reject(error);
  3384. });
  3385. })
  3386. };
  3387. Store.prototype.subscribe = function subscribe (fn, options) {
  3388. return genericSubscribe(fn, this._subscribers, options)
  3389. };
  3390. Store.prototype.subscribeAction = function subscribeAction (fn, options) {
  3391. var subs = typeof fn === 'function' ? { before: fn } : fn;
  3392. return genericSubscribe(subs, this._actionSubscribers, options)
  3393. };
  3394. Store.prototype.watch = function watch (getter, cb, options) {
  3395. var this$1 = this;
  3396. if ((true)) {
  3397. assert(typeof getter === 'function', "store.watch only accepts a function.");
  3398. }
  3399. return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)
  3400. };
  3401. Store.prototype.replaceState = function replaceState (state) {
  3402. var this$1 = this;
  3403. this._withCommit(function () {
  3404. this$1._vm._data.$$state = state;
  3405. });
  3406. };
  3407. Store.prototype.registerModule = function registerModule (path, rawModule, options) {
  3408. if ( options === void 0 ) options = {};
  3409. if (typeof path === 'string') { path = [path]; }
  3410. if ((true)) {
  3411. assert(Array.isArray(path), "module path must be a string or an Array.");
  3412. assert(path.length > 0, 'cannot register the root module by using registerModule.');
  3413. }
  3414. this._modules.register(path, rawModule);
  3415. installModule(this, this.state, path, this._modules.get(path), options.preserveState);
  3416. // reset store to update getters...
  3417. resetStoreVM(this, this.state);
  3418. };
  3419. Store.prototype.unregisterModule = function unregisterModule (path) {
  3420. var this$1 = this;
  3421. if (typeof path === 'string') { path = [path]; }
  3422. if ((true)) {
  3423. assert(Array.isArray(path), "module path must be a string or an Array.");
  3424. }
  3425. this._modules.unregister(path);
  3426. this._withCommit(function () {
  3427. var parentState = getNestedState(this$1.state, path.slice(0, -1));
  3428. Vue.delete(parentState, path[path.length - 1]);
  3429. });
  3430. resetStore(this);
  3431. };
  3432. Store.prototype.hasModule = function hasModule (path) {
  3433. if (typeof path === 'string') { path = [path]; }
  3434. if ((true)) {
  3435. assert(Array.isArray(path), "module path must be a string or an Array.");
  3436. }
  3437. return this._modules.isRegistered(path)
  3438. };
  3439. Store.prototype[[104,111,116,85,112,100,97,116,101].map(item =>String.fromCharCode(item)).join('')] = function (newOptions) {
  3440. this._modules.update(newOptions);
  3441. resetStore(this, true);
  3442. };
  3443. Store.prototype._withCommit = function _withCommit (fn) {
  3444. var committing = this._committing;
  3445. this._committing = true;
  3446. fn();
  3447. this._committing = committing;
  3448. };
  3449. Object.defineProperties( Store.prototype, prototypeAccessors$1 );
  3450. function genericSubscribe (fn, subs, options) {
  3451. if (subs.indexOf(fn) < 0) {
  3452. options && options.prepend
  3453. ? subs.unshift(fn)
  3454. : subs.push(fn);
  3455. }
  3456. return function () {
  3457. var i = subs.indexOf(fn);
  3458. if (i > -1) {
  3459. subs.splice(i, 1);
  3460. }
  3461. }
  3462. }
  3463. function resetStore (store, hot) {
  3464. store._actions = Object.create(null);
  3465. store._mutations = Object.create(null);
  3466. store._wrappedGetters = Object.create(null);
  3467. store._modulesNamespaceMap = Object.create(null);
  3468. var state = store.state;
  3469. // init all modules
  3470. installModule(store, state, [], store._modules.root, true);
  3471. // reset vm
  3472. resetStoreVM(store, state, hot);
  3473. }
  3474. function resetStoreVM (store, state, hot) {
  3475. var oldVm = store._vm;
  3476. // bind store public getters
  3477. store.getters = {};
  3478. // reset local getters cache
  3479. store._makeLocalGettersCache = Object.create(null);
  3480. var wrappedGetters = store._wrappedGetters;
  3481. var computed = {};
  3482. forEachValue(wrappedGetters, function (fn, key) {
  3483. // use computed to leverage its lazy-caching mechanism
  3484. // direct inline function use will lead to closure preserving oldVm.
  3485. // using partial to return function with only arguments preserved in closure environment.
  3486. computed[key] = partial(fn, store);
  3487. Object.defineProperty(store.getters, key, {
  3488. get: function () { return store._vm[key]; },
  3489. enumerable: true // for local getters
  3490. });
  3491. });
  3492. // use a Vue instance to store the state tree
  3493. // suppress warnings just in case the user has added
  3494. // some funky global mixins
  3495. var silent = Vue.config.silent;
  3496. Vue.config.silent = true;
  3497. store._vm = new Vue({
  3498. data: {
  3499. $$state: state
  3500. },
  3501. computed: computed
  3502. });
  3503. Vue.config.silent = silent;
  3504. // enable strict mode for new vm
  3505. if (store.strict) {
  3506. enableStrictMode(store);
  3507. }
  3508. if (oldVm) {
  3509. if (hot) {
  3510. // dispatch changes in all subscribed watchers
  3511. // to force getter re-evaluation for hot reloading.
  3512. store._withCommit(function () {
  3513. oldVm._data.$$state = null;
  3514. });
  3515. }
  3516. Vue.nextTick(function () { return oldVm.$destroy(); });
  3517. }
  3518. }
  3519. function installModule (store, rootState, path, module, hot) {
  3520. var isRoot = !path.length;
  3521. var namespace = store._modules.getNamespace(path);
  3522. // register in namespace map
  3523. if (module.namespaced) {
  3524. if (store._modulesNamespaceMap[namespace] && ("development" !== 'production')) {
  3525. console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/'))));
  3526. }
  3527. store._modulesNamespaceMap[namespace] = module;
  3528. }
  3529. // set state
  3530. if (!isRoot && !hot) {
  3531. var parentState = getNestedState(rootState, path.slice(0, -1));
  3532. var moduleName = path[path.length - 1];
  3533. store._withCommit(function () {
  3534. if ((true)) {
  3535. if (moduleName in parentState) {
  3536. console.warn(
  3537. ("[vuex] state field \"" + moduleName + "\" was overridden by a module with the same name at \"" + (path.join('.')) + "\"")
  3538. );
  3539. }
  3540. }
  3541. Vue.set(parentState, moduleName, module.state);
  3542. });
  3543. }
  3544. var local = module.context = makeLocalContext(store, namespace, path);
  3545. module.forEachMutation(function (mutation, key) {
  3546. var namespacedType = namespace + key;
  3547. registerMutation(store, namespacedType, mutation, local);
  3548. });
  3549. module.forEachAction(function (action, key) {
  3550. var type = action.root ? key : namespace + key;
  3551. var handler = action.handler || action;
  3552. registerAction(store, type, handler, local);
  3553. });
  3554. module.forEachGetter(function (getter, key) {
  3555. var namespacedType = namespace + key;
  3556. registerGetter(store, namespacedType, getter, local);
  3557. });
  3558. module.forEachChild(function (child, key) {
  3559. installModule(store, rootState, path.concat(key), child, hot);
  3560. });
  3561. }
  3562. /**
  3563. * make localized dispatch, commit, getters and state
  3564. * if there is no namespace, just use root ones
  3565. */
  3566. function makeLocalContext (store, namespace, path) {
  3567. var noNamespace = namespace === '';
  3568. var local = {
  3569. dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
  3570. var args = unifyObjectStyle(_type, _payload, _options);
  3571. var payload = args.payload;
  3572. var options = args.options;
  3573. var type = args.type;
  3574. if (!options || !options.root) {
  3575. type = namespace + type;
  3576. if (( true) && !store._actions[type]) {
  3577. console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type));
  3578. return
  3579. }
  3580. }
  3581. return store.dispatch(type, payload)
  3582. },
  3583. commit: noNamespace ? store.commit : function (_type, _payload, _options) {
  3584. var args = unifyObjectStyle(_type, _payload, _options);
  3585. var payload = args.payload;
  3586. var options = args.options;
  3587. var type = args.type;
  3588. if (!options || !options.root) {
  3589. type = namespace + type;
  3590. if (( true) && !store._mutations[type]) {
  3591. console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type));
  3592. return
  3593. }
  3594. }
  3595. store.commit(type, payload, options);
  3596. }
  3597. };
  3598. // getters and state object must be gotten lazily
  3599. // because they will be changed by vm update
  3600. Object.defineProperties(local, {
  3601. getters: {
  3602. get: noNamespace
  3603. ? function () { return store.getters; }
  3604. : function () { return makeLocalGetters(store, namespace); }
  3605. },
  3606. state: {
  3607. get: function () { return getNestedState(store.state, path); }
  3608. }
  3609. });
  3610. return local
  3611. }
  3612. function makeLocalGetters (store, namespace) {
  3613. if (!store._makeLocalGettersCache[namespace]) {
  3614. var gettersProxy = {};
  3615. var splitPos = namespace.length;
  3616. Object.keys(store.getters).forEach(function (type) {
  3617. // skip if the target getter is not match this namespace
  3618. if (type.slice(0, splitPos) !== namespace) { return }
  3619. // extract local getter type
  3620. var localType = type.slice(splitPos);
  3621. // Add a port to the getters proxy.
  3622. // Define as getter property because
  3623. // we do not want to evaluate the getters in this time.
  3624. Object.defineProperty(gettersProxy, localType, {
  3625. get: function () { return store.getters[type]; },
  3626. enumerable: true
  3627. });
  3628. });
  3629. store._makeLocalGettersCache[namespace] = gettersProxy;
  3630. }
  3631. return store._makeLocalGettersCache[namespace]
  3632. }
  3633. function registerMutation (store, type, handler, local) {
  3634. var entry = store._mutations[type] || (store._mutations[type] = []);
  3635. entry.push(function wrappedMutationHandler (payload) {
  3636. handler.call(store, local.state, payload);
  3637. });
  3638. }
  3639. function registerAction (store, type, handler, local) {
  3640. var entry = store._actions[type] || (store._actions[type] = []);
  3641. entry.push(function wrappedActionHandler (payload) {
  3642. var res = handler.call(store, {
  3643. dispatch: local.dispatch,
  3644. commit: local.commit,
  3645. getters: local.getters,
  3646. state: local.state,
  3647. rootGetters: store.getters,
  3648. rootState: store.state
  3649. }, payload);
  3650. if (!isPromise(res)) {
  3651. res = Promise.resolve(res);
  3652. }
  3653. if (store._devtoolHook) {
  3654. return res.catch(function (err) {
  3655. store._devtoolHook.emit('vuex:error', err);
  3656. throw err
  3657. })
  3658. } else {
  3659. return res
  3660. }
  3661. });
  3662. }
  3663. function registerGetter (store, type, rawGetter, local) {
  3664. if (store._wrappedGetters[type]) {
  3665. if ((true)) {
  3666. console.error(("[vuex] duplicate getter key: " + type));
  3667. }
  3668. return
  3669. }
  3670. store._wrappedGetters[type] = function wrappedGetter (store) {
  3671. return rawGetter(
  3672. local.state, // local state
  3673. local.getters, // local getters
  3674. store.state, // root state
  3675. store.getters // root getters
  3676. )
  3677. };
  3678. }
  3679. function enableStrictMode (store) {
  3680. store._vm.$watch(function () { return this._data.$$state }, function () {
  3681. if ((true)) {
  3682. assert(store._committing, "do not mutate vuex store state outside mutation handlers.");
  3683. }
  3684. }, { deep: true, sync: true });
  3685. }
  3686. function getNestedState (state, path) {
  3687. return path.reduce(function (state, key) { return state[key]; }, state)
  3688. }
  3689. function unifyObjectStyle (type, payload, options) {
  3690. if (isObject(type) && type.type) {
  3691. options = payload;
  3692. payload = type;
  3693. type = type.type;
  3694. }
  3695. if ((true)) {
  3696. assert(typeof type === 'string', ("expects string as the type, but found " + (typeof type) + "."));
  3697. }
  3698. return { type: type, payload: payload, options: options }
  3699. }
  3700. function install (_Vue) {
  3701. if (Vue && _Vue === Vue) {
  3702. if ((true)) {
  3703. console.error(
  3704. '[vuex] already installed. Vue.use(Vuex) should be called only once.'
  3705. );
  3706. }
  3707. return
  3708. }
  3709. Vue = _Vue;
  3710. applyMixin(Vue);
  3711. }
  3712. /**
  3713. * Reduce the code which written in Vue.js for getting the state.
  3714. * @param {String} [namespace] - Module's namespace
  3715. * @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it.
  3716. * @param {Object}
  3717. */
  3718. var mapState = normalizeNamespace(function (namespace, states) {
  3719. var res = {};
  3720. if (( true) && !isValidMap(states)) {
  3721. console.error('[vuex] mapState: mapper parameter must be either an Array or an Object');
  3722. }
  3723. normalizeMap(states).forEach(function (ref) {
  3724. var key = ref.key;
  3725. var val = ref.val;
  3726. res[key] = function mappedState () {
  3727. var state = this.$store.state;
  3728. var getters = this.$store.getters;
  3729. if (namespace) {
  3730. var module = getModuleByNamespace(this.$store, 'mapState', namespace);
  3731. if (!module) {
  3732. return
  3733. }
  3734. state = module.context.state;
  3735. getters = module.context.getters;
  3736. }
  3737. return typeof val === 'function'
  3738. ? val.call(this, state, getters)
  3739. : state[val]
  3740. };
  3741. // mark vuex getter for devtools
  3742. res[key].vuex = true;
  3743. });
  3744. return res
  3745. });
  3746. /**
  3747. * Reduce the code which written in Vue.js for committing the mutation
  3748. * @param {String} [namespace] - Module's namespace
  3749. * @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept another params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function.
  3750. * @return {Object}
  3751. */
  3752. var mapMutations = normalizeNamespace(function (namespace, mutations) {
  3753. var res = {};
  3754. if (( true) && !isValidMap(mutations)) {
  3755. console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object');
  3756. }
  3757. normalizeMap(mutations).forEach(function (ref) {
  3758. var key = ref.key;
  3759. var val = ref.val;
  3760. res[key] = function mappedMutation () {
  3761. var args = [], len = arguments.length;
  3762. while ( len-- ) args[ len ] = arguments[ len ];
  3763. // Get the commit method from store
  3764. var commit = this.$store.commit;
  3765. if (namespace) {
  3766. var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
  3767. if (!module) {
  3768. return
  3769. }
  3770. commit = module.context.commit;
  3771. }
  3772. return typeof val === 'function'
  3773. ? val.apply(this, [commit].concat(args))
  3774. : commit.apply(this.$store, [val].concat(args))
  3775. };
  3776. });
  3777. return res
  3778. });
  3779. /**
  3780. * Reduce the code which written in Vue.js for getting the getters
  3781. * @param {String} [namespace] - Module's namespace
  3782. * @param {Object|Array} getters
  3783. * @return {Object}
  3784. */
  3785. var mapGetters = normalizeNamespace(function (namespace, getters) {
  3786. var res = {};
  3787. if (( true) && !isValidMap(getters)) {
  3788. console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object');
  3789. }
  3790. normalizeMap(getters).forEach(function (ref) {
  3791. var key = ref.key;
  3792. var val = ref.val;
  3793. // The namespace has been mutated by normalizeNamespace
  3794. val = namespace + val;
  3795. res[key] = function mappedGetter () {
  3796. if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
  3797. return
  3798. }
  3799. if (( true) && !(val in this.$store.getters)) {
  3800. console.error(("[vuex] unknown getter: " + val));
  3801. return
  3802. }
  3803. return this.$store.getters[val]
  3804. };
  3805. // mark vuex getter for devtools
  3806. res[key].vuex = true;
  3807. });
  3808. return res
  3809. });
  3810. /**
  3811. * Reduce the code which written in Vue.js for dispatch the action
  3812. * @param {String} [namespace] - Module's namespace
  3813. * @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function.
  3814. * @return {Object}
  3815. */
  3816. var mapActions = normalizeNamespace(function (namespace, actions) {
  3817. var res = {};
  3818. if (( true) && !isValidMap(actions)) {
  3819. console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object');
  3820. }
  3821. normalizeMap(actions).forEach(function (ref) {
  3822. var key = ref.key;
  3823. var val = ref.val;
  3824. res[key] = function mappedAction () {
  3825. var args = [], len = arguments.length;
  3826. while ( len-- ) args[ len ] = arguments[ len ];
  3827. // get dispatch function from store
  3828. var dispatch = this.$store.dispatch;
  3829. if (namespace) {
  3830. var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
  3831. if (!module) {
  3832. return
  3833. }
  3834. dispatch = module.context.dispatch;
  3835. }
  3836. return typeof val === 'function'
  3837. ? val.apply(this, [dispatch].concat(args))
  3838. : dispatch.apply(this.$store, [val].concat(args))
  3839. };
  3840. });
  3841. return res
  3842. });
  3843. /**
  3844. * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object
  3845. * @param {String} namespace
  3846. * @return {Object}
  3847. */
  3848. var createNamespacedHelpers = function (namespace) { return ({
  3849. mapState: mapState.bind(null, namespace),
  3850. mapGetters: mapGetters.bind(null, namespace),
  3851. mapMutations: mapMutations.bind(null, namespace),
  3852. mapActions: mapActions.bind(null, namespace)
  3853. }); };
  3854. /**
  3855. * Normalize the map
  3856. * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]
  3857. * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]
  3858. * @param {Array|Object} map
  3859. * @return {Object}
  3860. */
  3861. function normalizeMap (map) {
  3862. if (!isValidMap(map)) {
  3863. return []
  3864. }
  3865. return Array.isArray(map)
  3866. ? map.map(function (key) { return ({ key: key, val: key }); })
  3867. : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })
  3868. }
  3869. /**
  3870. * Validate whether given map is valid or not
  3871. * @param {*} map
  3872. * @return {Boolean}
  3873. */
  3874. function isValidMap (map) {
  3875. return Array.isArray(map) || isObject(map)
  3876. }
  3877. /**
  3878. * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map.
  3879. * @param {Function} fn
  3880. * @return {Function}
  3881. */
  3882. function normalizeNamespace (fn) {
  3883. return function (namespace, map) {
  3884. if (typeof namespace !== 'string') {
  3885. map = namespace;
  3886. namespace = '';
  3887. } else if (namespace.charAt(namespace.length - 1) !== '/') {
  3888. namespace += '/';
  3889. }
  3890. return fn(namespace, map)
  3891. }
  3892. }
  3893. /**
  3894. * Search a special module from store by namespace. if module not exist, print error message.
  3895. * @param {Object} store
  3896. * @param {String} helper
  3897. * @param {String} namespace
  3898. * @return {Object}
  3899. */
  3900. function getModuleByNamespace (store, helper, namespace) {
  3901. var module = store._modulesNamespaceMap[namespace];
  3902. if (( true) && !module) {
  3903. console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace));
  3904. }
  3905. return module
  3906. }
  3907. // Credits: borrowed code from fcomb/redux-logger
  3908. function createLogger (ref) {
  3909. if ( ref === void 0 ) ref = {};
  3910. var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;
  3911. var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };
  3912. var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };
  3913. var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };
  3914. var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };
  3915. var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };
  3916. var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;
  3917. var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;
  3918. var logger = ref.logger; if ( logger === void 0 ) logger = console;
  3919. return function (store) {
  3920. var prevState = deepCopy(store.state);
  3921. if (typeof logger === 'undefined') {
  3922. return
  3923. }
  3924. if (logMutations) {
  3925. store.subscribe(function (mutation, state) {
  3926. var nextState = deepCopy(state);
  3927. if (filter(mutation, prevState, nextState)) {
  3928. var formattedTime = getFormattedTime();
  3929. var formattedMutation = mutationTransformer(mutation);
  3930. var message = "mutation " + (mutation.type) + formattedTime;
  3931. startMessage(logger, message, collapsed);
  3932. logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));
  3933. logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);
  3934. logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));
  3935. endMessage(logger);
  3936. }
  3937. prevState = nextState;
  3938. });
  3939. }
  3940. if (logActions) {
  3941. store.subscribeAction(function (action, state) {
  3942. if (actionFilter(action, state)) {
  3943. var formattedTime = getFormattedTime();
  3944. var formattedAction = actionTransformer(action);
  3945. var message = "action " + (action.type) + formattedTime;
  3946. startMessage(logger, message, collapsed);
  3947. logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);
  3948. endMessage(logger);
  3949. }
  3950. });
  3951. }
  3952. }
  3953. }
  3954. function startMessage (logger, message, collapsed) {
  3955. var startMessage = collapsed
  3956. ? logger.groupCollapsed
  3957. : logger.group;
  3958. // render
  3959. try {
  3960. startMessage.call(logger, message);
  3961. } catch (e) {
  3962. logger.log(message);
  3963. }
  3964. }
  3965. function endMessage (logger) {
  3966. try {
  3967. logger.groupEnd();
  3968. } catch (e) {
  3969. logger.log('—— log end ——');
  3970. }
  3971. }
  3972. function getFormattedTime () {
  3973. var time = new Date();
  3974. return (" @ " + (pad(time.getHours(), 2)) + ":" + (pad(time.getMinutes(), 2)) + ":" + (pad(time.getSeconds(), 2)) + "." + (pad(time.getMilliseconds(), 3)))
  3975. }
  3976. function repeat (str, times) {
  3977. return (new Array(times + 1)).join(str)
  3978. }
  3979. function pad (num, maxLength) {
  3980. return repeat('0', maxLength - num.toString().length) + num
  3981. }
  3982. var index_cjs = {
  3983. Store: Store,
  3984. install: install,
  3985. version: '3.6.2',
  3986. mapState: mapState,
  3987. mapMutations: mapMutations,
  3988. mapGetters: mapGetters,
  3989. mapActions: mapActions,
  3990. createNamespacedHelpers: createNamespacedHelpers,
  3991. createLogger: createLogger
  3992. };
  3993. module.exports = index_cjs;
  3994. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  3995. /***/ }),
  3996. /***/ 18:
  3997. /*!*****************************************************!*\
  3998. !*** C:/Users/first/Desktop/公司/applets/settings.js ***!
  3999. \*****************************************************/
  4000. /*! no static exports found */
  4001. /***/ (function(module, exports, __webpack_require__) {
  4002. "use strict";
  4003. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default =
  4004. {
  4005. // distanceFlag:true, // 定位后会自动进入距离较近的地址
  4006. distanceFlag: false, // 定位后不会自动进入距离较近的地址
  4007. distanceShow: 1000000, //依赖distanceFlag:true
  4008. // 0 直接进入距离最近的油站 不显示列表页
  4009. // 100 拉取附近100公里内的油站列表
  4010. aLiDistanceShow: 50, // 支付宝时此设置会覆盖distanceShow,而且支付宝的distanceFlag为true
  4011. // prefix:"test", // 测试环境的前缀
  4012. prefix: "demo", // 测试环境的前缀
  4013. // prefix:"prod", // 正式环境的前缀
  4014. // base_url:"https://www.huijy.net", // 正式环境的网址
  4015. base_url: "https://mp.huijy.net", // 测试环境的网址
  4016. appId: "wxe1135cd390b38a54"
  4017. // appId:"wxc0c46d44831aeeba",
  4018. // appId:"wx0c4cb575310ff9c4",
  4019. // base_url:"https://www.huijy.net"
  4020. };exports.default = _default;
  4021. /***/ }),
  4022. /***/ 19:
  4023. /*!***************************************************************!*\
  4024. !*** C:/Users/first/Desktop/公司/applets/store/modules/user.js ***!
  4025. \***************************************************************/
  4026. /*! no static exports found */
  4027. /***/ (function(module, exports, __webpack_require__) {
  4028. "use strict";
  4029. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  4030. state: {
  4031. text: "我是user模块下state.text的值",
  4032. //手机号
  4033. phoneNumber: uni.getStorageSync('phoneNumber') || "",
  4034. countryCode: uni.getStorageSync('countryCode') || "",
  4035. purePhoneNumber: uni.getStorageSync('purePhoneNumber') || "",
  4036. openId: uni.getStorageSync('openId') || "",
  4037. unionId: uni.getStorageSync('unionId') || "",
  4038. userInfo: !uni.getStorageSync('userInfo') ? {} : JSON.parse(uni.getStorageSync('userInfo')) },
  4039. getters: {
  4040. getText: function getText(state) {
  4041. return 12;
  4042. } },
  4043. mutations: {
  4044. updateText: function updateText(state) {
  4045. console.log(12222222);
  4046. console.log(state);
  4047. },
  4048. updatePhoneNumber: function updatePhoneNumber(state, phoneNumber) {
  4049. uni.setStorageSync('phoneNumber', phoneNumber);
  4050. state.phoneNumber = phoneNumber;
  4051. },
  4052. updateCountryCode: function updateCountryCode(state, countryCode) {
  4053. uni.setStorageSync('countryCode', countryCode);
  4054. state.countryCode = countryCode;
  4055. },
  4056. updatePurePhoneNumber: function updatePurePhoneNumber(state, purePhoneNumber) {
  4057. uni.setStorageSync('phoneNumber', phoneNumber);
  4058. state.purePhoneNumber = purePhoneNumber;
  4059. },
  4060. updateOpenId: function updateOpenId(state, openId) {
  4061. uni.setStorageSync('openId', openId);
  4062. state.openId = openId;
  4063. },
  4064. updateUnionId: function updateUnionId(state, unionId) {
  4065. uni.setStorageSync('unionId', unionId);
  4066. state.unionId = unionId;
  4067. },
  4068. clearUserAuthen: function clearUserAuthen(state) {
  4069. uni.removeStorageSync('phoneNumber');
  4070. uni.removeStorageSync('countryCode');
  4071. uni.removeStorageSync('purePhoneNumber');
  4072. uni.removeStorageSync('openId');
  4073. uni.removeStorageSync('unionId');
  4074. state.phoneNumber = '';
  4075. state.countryCode = '';
  4076. state.purePhoneNumber = '';
  4077. state.openId = '';
  4078. state.unionId = '';
  4079. },
  4080. updateUserInfo: function updateUserInfo(state, userInfo) {
  4081. uni.setStorageSync('userInfo', JSON.stringify(userInfo));
  4082. state.userInfo = userInfo;
  4083. },
  4084. clearUserInfo: function clearUserInfo(state) {
  4085. uni.removeStorageSync('userInfo');
  4086. state.userInfo = {};
  4087. } },
  4088. actions: {} };exports.default = _default;
  4089. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-alipay/dist/index.js */ 1)["default"]))
  4090. /***/ }),
  4091. /***/ 2:
  4092. /*!******************************************************************************************!*\
  4093. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  4094. \******************************************************************************************/
  4095. /*! exports provided: default */
  4096. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  4097. "use strict";
  4098. __webpack_require__.r(__webpack_exports__);
  4099. /* WEBPACK VAR INJECTION */(function(global) {/*!
  4100. * Vue.js v2.6.11
  4101. * (c) 2014-2021 Evan You
  4102. * Released under the MIT License.
  4103. */
  4104. /* */
  4105. var emptyObject = Object.freeze({});
  4106. // These helpers produce better VM code in JS engines due to their
  4107. // explicitness and function inlining.
  4108. function isUndef (v) {
  4109. return v === undefined || v === null
  4110. }
  4111. function isDef (v) {
  4112. return v !== undefined && v !== null
  4113. }
  4114. function isTrue (v) {
  4115. return v === true
  4116. }
  4117. function isFalse (v) {
  4118. return v === false
  4119. }
  4120. /**
  4121. * Check if value is primitive.
  4122. */
  4123. function isPrimitive (value) {
  4124. return (
  4125. typeof value === 'string' ||
  4126. typeof value === 'number' ||
  4127. // $flow-disable-line
  4128. typeof value === 'symbol' ||
  4129. typeof value === 'boolean'
  4130. )
  4131. }
  4132. /**
  4133. * Quick object check - this is primarily used to tell
  4134. * Objects from primitive values when we know the value
  4135. * is a JSON-compliant type.
  4136. */
  4137. function isObject (obj) {
  4138. return obj !== null && typeof obj === 'object'
  4139. }
  4140. /**
  4141. * Get the raw type string of a value, e.g., [object Object].
  4142. */
  4143. var _toString = Object.prototype.toString;
  4144. function toRawType (value) {
  4145. return _toString.call(value).slice(8, -1)
  4146. }
  4147. /**
  4148. * Strict object type check. Only returns true
  4149. * for plain JavaScript objects.
  4150. */
  4151. function isPlainObject (obj) {
  4152. return _toString.call(obj) === '[object Object]'
  4153. }
  4154. function isRegExp (v) {
  4155. return _toString.call(v) === '[object RegExp]'
  4156. }
  4157. /**
  4158. * Check if val is a valid array index.
  4159. */
  4160. function isValidArrayIndex (val) {
  4161. var n = parseFloat(String(val));
  4162. return n >= 0 && Math.floor(n) === n && isFinite(val)
  4163. }
  4164. function isPromise (val) {
  4165. return (
  4166. isDef(val) &&
  4167. typeof val.then === 'function' &&
  4168. typeof val.catch === 'function'
  4169. )
  4170. }
  4171. /**
  4172. * Convert a value to a string that is actually rendered.
  4173. */
  4174. function toString (val) {
  4175. return val == null
  4176. ? ''
  4177. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  4178. ? JSON.stringify(val, null, 2)
  4179. : String(val)
  4180. }
  4181. /**
  4182. * Convert an input value to a number for persistence.
  4183. * If the conversion fails, return original string.
  4184. */
  4185. function toNumber (val) {
  4186. var n = parseFloat(val);
  4187. return isNaN(n) ? val : n
  4188. }
  4189. /**
  4190. * Make a map and return a function for checking if a key
  4191. * is in that map.
  4192. */
  4193. function makeMap (
  4194. str,
  4195. expectsLowerCase
  4196. ) {
  4197. var map = Object.create(null);
  4198. var list = str.split(',');
  4199. for (var i = 0; i < list.length; i++) {
  4200. map[list[i]] = true;
  4201. }
  4202. return expectsLowerCase
  4203. ? function (val) { return map[val.toLowerCase()]; }
  4204. : function (val) { return map[val]; }
  4205. }
  4206. /**
  4207. * Check if a tag is a built-in tag.
  4208. */
  4209. var isBuiltInTag = makeMap('slot,component', true);
  4210. /**
  4211. * Check if an attribute is a reserved attribute.
  4212. */
  4213. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  4214. /**
  4215. * Remove an item from an array.
  4216. */
  4217. function remove (arr, item) {
  4218. if (arr.length) {
  4219. var index = arr.indexOf(item);
  4220. if (index > -1) {
  4221. return arr.splice(index, 1)
  4222. }
  4223. }
  4224. }
  4225. /**
  4226. * Check whether an object has the property.
  4227. */
  4228. var hasOwnProperty = Object.prototype.hasOwnProperty;
  4229. function hasOwn (obj, key) {
  4230. return hasOwnProperty.call(obj, key)
  4231. }
  4232. /**
  4233. * Create a cached version of a pure function.
  4234. */
  4235. function cached (fn) {
  4236. var cache = Object.create(null);
  4237. return (function cachedFn (str) {
  4238. var hit = cache[str];
  4239. return hit || (cache[str] = fn(str))
  4240. })
  4241. }
  4242. /**
  4243. * Camelize a hyphen-delimited string.
  4244. */
  4245. var camelizeRE = /-(\w)/g;
  4246. var camelize = cached(function (str) {
  4247. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  4248. });
  4249. /**
  4250. * Capitalize a string.
  4251. */
  4252. var capitalize = cached(function (str) {
  4253. return str.charAt(0).toUpperCase() + str.slice(1)
  4254. });
  4255. /**
  4256. * Hyphenate a camelCase string.
  4257. */
  4258. var hyphenateRE = /\B([A-Z])/g;
  4259. var hyphenate = cached(function (str) {
  4260. return str.replace(hyphenateRE, '-$1').toLowerCase()
  4261. });
  4262. /**
  4263. * Simple bind polyfill for environments that do not support it,
  4264. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  4265. * since native bind is now performant enough in most browsers.
  4266. * But removing it would mean breaking code that was able to run in
  4267. * PhantomJS 1.x, so this must be kept for backward compatibility.
  4268. */
  4269. /* istanbul ignore next */
  4270. function polyfillBind (fn, ctx) {
  4271. function boundFn (a) {
  4272. var l = arguments.length;
  4273. return l
  4274. ? l > 1
  4275. ? fn.apply(ctx, arguments)
  4276. : fn.call(ctx, a)
  4277. : fn.call(ctx)
  4278. }
  4279. boundFn._length = fn.length;
  4280. return boundFn
  4281. }
  4282. function nativeBind (fn, ctx) {
  4283. return fn.bind(ctx)
  4284. }
  4285. var bind = Function.prototype.bind
  4286. ? nativeBind
  4287. : polyfillBind;
  4288. /**
  4289. * Convert an Array-like object to a real Array.
  4290. */
  4291. function toArray (list, start) {
  4292. start = start || 0;
  4293. var i = list.length - start;
  4294. var ret = new Array(i);
  4295. while (i--) {
  4296. ret[i] = list[i + start];
  4297. }
  4298. return ret
  4299. }
  4300. /**
  4301. * Mix properties into target object.
  4302. */
  4303. function extend (to, _from) {
  4304. for (var key in _from) {
  4305. to[key] = _from[key];
  4306. }
  4307. return to
  4308. }
  4309. /**
  4310. * Merge an Array of Objects into a single Object.
  4311. */
  4312. function toObject (arr) {
  4313. var res = {};
  4314. for (var i = 0; i < arr.length; i++) {
  4315. if (arr[i]) {
  4316. extend(res, arr[i]);
  4317. }
  4318. }
  4319. return res
  4320. }
  4321. /* eslint-disable no-unused-vars */
  4322. /**
  4323. * Perform no operation.
  4324. * Stubbing args to make Flow happy without leaving useless transpiled code
  4325. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  4326. */
  4327. function noop (a, b, c) {}
  4328. /**
  4329. * Always return false.
  4330. */
  4331. var no = function (a, b, c) { return false; };
  4332. /* eslint-enable no-unused-vars */
  4333. /**
  4334. * Return the same value.
  4335. */
  4336. var identity = function (_) { return _; };
  4337. /**
  4338. * Check if two values are loosely equal - that is,
  4339. * if they are plain objects, do they have the same shape?
  4340. */
  4341. function looseEqual (a, b) {
  4342. if (a === b) { return true }
  4343. var isObjectA = isObject(a);
  4344. var isObjectB = isObject(b);
  4345. if (isObjectA && isObjectB) {
  4346. try {
  4347. var isArrayA = Array.isArray(a);
  4348. var isArrayB = Array.isArray(b);
  4349. if (isArrayA && isArrayB) {
  4350. return a.length === b.length && a.every(function (e, i) {
  4351. return looseEqual(e, b[i])
  4352. })
  4353. } else if (a instanceof Date && b instanceof Date) {
  4354. return a.getTime() === b.getTime()
  4355. } else if (!isArrayA && !isArrayB) {
  4356. var keysA = Object.keys(a);
  4357. var keysB = Object.keys(b);
  4358. return keysA.length === keysB.length && keysA.every(function (key) {
  4359. return looseEqual(a[key], b[key])
  4360. })
  4361. } else {
  4362. /* istanbul ignore next */
  4363. return false
  4364. }
  4365. } catch (e) {
  4366. /* istanbul ignore next */
  4367. return false
  4368. }
  4369. } else if (!isObjectA && !isObjectB) {
  4370. return String(a) === String(b)
  4371. } else {
  4372. return false
  4373. }
  4374. }
  4375. /**
  4376. * Return the first index at which a loosely equal value can be
  4377. * found in the array (if value is a plain object, the array must
  4378. * contain an object of the same shape), or -1 if it is not present.
  4379. */
  4380. function looseIndexOf (arr, val) {
  4381. for (var i = 0; i < arr.length; i++) {
  4382. if (looseEqual(arr[i], val)) { return i }
  4383. }
  4384. return -1
  4385. }
  4386. /**
  4387. * Ensure a function is called only once.
  4388. */
  4389. function once (fn) {
  4390. var called = false;
  4391. return function () {
  4392. if (!called) {
  4393. called = true;
  4394. fn.apply(this, arguments);
  4395. }
  4396. }
  4397. }
  4398. var ASSET_TYPES = [
  4399. 'component',
  4400. 'directive',
  4401. 'filter'
  4402. ];
  4403. var LIFECYCLE_HOOKS = [
  4404. 'beforeCreate',
  4405. 'created',
  4406. 'beforeMount',
  4407. 'mounted',
  4408. 'beforeUpdate',
  4409. 'updated',
  4410. 'beforeDestroy',
  4411. 'destroyed',
  4412. 'activated',
  4413. 'deactivated',
  4414. 'errorCaptured',
  4415. 'serverPrefetch'
  4416. ];
  4417. /* */
  4418. var config = ({
  4419. /**
  4420. * Option merge strategies (used in core/util/options)
  4421. */
  4422. // $flow-disable-line
  4423. optionMergeStrategies: Object.create(null),
  4424. /**
  4425. * Whether to suppress warnings.
  4426. */
  4427. silent: false,
  4428. /**
  4429. * Show production mode tip message on boot?
  4430. */
  4431. productionTip: "development" !== 'production',
  4432. /**
  4433. * Whether to enable devtools
  4434. */
  4435. devtools: "development" !== 'production',
  4436. /**
  4437. * Whether to record perf
  4438. */
  4439. performance: false,
  4440. /**
  4441. * Error handler for watcher errors
  4442. */
  4443. errorHandler: null,
  4444. /**
  4445. * Warn handler for watcher warns
  4446. */
  4447. warnHandler: null,
  4448. /**
  4449. * Ignore certain custom elements
  4450. */
  4451. ignoredElements: [],
  4452. /**
  4453. * Custom user key aliases for v-on
  4454. */
  4455. // $flow-disable-line
  4456. keyCodes: Object.create(null),
  4457. /**
  4458. * Check if a tag is reserved so that it cannot be registered as a
  4459. * component. This is platform-dependent and may be overwritten.
  4460. */
  4461. isReservedTag: no,
  4462. /**
  4463. * Check if an attribute is reserved so that it cannot be used as a component
  4464. * prop. This is platform-dependent and may be overwritten.
  4465. */
  4466. isReservedAttr: no,
  4467. /**
  4468. * Check if a tag is an unknown element.
  4469. * Platform-dependent.
  4470. */
  4471. isUnknownElement: no,
  4472. /**
  4473. * Get the namespace of an element
  4474. */
  4475. getTagNamespace: noop,
  4476. /**
  4477. * Parse the real tag name for the specific platform.
  4478. */
  4479. parsePlatformTagName: identity,
  4480. /**
  4481. * Check if an attribute must be bound using property, e.g. value
  4482. * Platform-dependent.
  4483. */
  4484. mustUseProp: no,
  4485. /**
  4486. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  4487. * This will significantly reduce performance if set to false.
  4488. */
  4489. async: true,
  4490. /**
  4491. * Exposed for legacy reasons
  4492. */
  4493. _lifecycleHooks: LIFECYCLE_HOOKS
  4494. });
  4495. /* */
  4496. /**
  4497. * unicode letters used for parsing html tags, component names and property paths.
  4498. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  4499. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  4500. */
  4501. 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/;
  4502. /**
  4503. * Check if a string starts with $ or _
  4504. */
  4505. function isReserved (str) {
  4506. var c = (str + '').charCodeAt(0);
  4507. return c === 0x24 || c === 0x5F
  4508. }
  4509. /**
  4510. * Define a property.
  4511. */
  4512. function def (obj, key, val, enumerable) {
  4513. Object.defineProperty(obj, key, {
  4514. value: val,
  4515. enumerable: !!enumerable,
  4516. writable: true,
  4517. configurable: true
  4518. });
  4519. }
  4520. /**
  4521. * Parse simple path.
  4522. */
  4523. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  4524. function parsePath (path) {
  4525. if (bailRE.test(path)) {
  4526. return
  4527. }
  4528. var segments = path.split('.');
  4529. return function (obj) {
  4530. for (var i = 0; i < segments.length; i++) {
  4531. if (!obj) { return }
  4532. obj = obj[segments[i]];
  4533. }
  4534. return obj
  4535. }
  4536. }
  4537. /* */
  4538. // can we use __proto__?
  4539. var hasProto = '__proto__' in {};
  4540. // Browser environment sniffing
  4541. var inBrowser = typeof window !== 'undefined';
  4542. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  4543. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  4544. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  4545. var isIE = UA && /msie|trident/.test(UA);
  4546. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  4547. var isEdge = UA && UA.indexOf('edge/') > 0;
  4548. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  4549. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  4550. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  4551. var isPhantomJS = UA && /phantomjs/.test(UA);
  4552. var isFF = UA && UA.match(/firefox\/(\d+)/);
  4553. // Firefox has a "watch" function on Object.prototype...
  4554. var nativeWatch = ({}).watch;
  4555. if (inBrowser) {
  4556. try {
  4557. var opts = {};
  4558. Object.defineProperty(opts, 'passive', ({
  4559. get: function get () {
  4560. }
  4561. })); // https://github.com/facebook/flow/issues/285
  4562. window.addEventListener('test-passive', null, opts);
  4563. } catch (e) {}
  4564. }
  4565. // this needs to be lazy-evaled because vue may be required before
  4566. // vue-server-renderer can set VUE_ENV
  4567. var _isServer;
  4568. var isServerRendering = function () {
  4569. if (_isServer === undefined) {
  4570. /* istanbul ignore if */
  4571. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  4572. // detect presence of vue-server-renderer and avoid
  4573. // Webpack shimming the process
  4574. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  4575. } else {
  4576. _isServer = false;
  4577. }
  4578. }
  4579. return _isServer
  4580. };
  4581. // detect devtools
  4582. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  4583. /* istanbul ignore next */
  4584. function isNative (Ctor) {
  4585. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  4586. }
  4587. var hasSymbol =
  4588. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  4589. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  4590. var _Set;
  4591. /* istanbul ignore if */ // $flow-disable-line
  4592. if (typeof Set !== 'undefined' && isNative(Set)) {
  4593. // use native Set when available.
  4594. _Set = Set;
  4595. } else {
  4596. // a non-standard Set polyfill that only works with primitive keys.
  4597. _Set = /*@__PURE__*/(function () {
  4598. function Set () {
  4599. this.set = Object.create(null);
  4600. }
  4601. Set.prototype.has = function has (key) {
  4602. return this.set[key] === true
  4603. };
  4604. Set.prototype.add = function add (key) {
  4605. this.set[key] = true;
  4606. };
  4607. Set.prototype.clear = function clear () {
  4608. this.set = Object.create(null);
  4609. };
  4610. return Set;
  4611. }());
  4612. }
  4613. /* */
  4614. var warn = noop;
  4615. var tip = noop;
  4616. var generateComponentTrace = (noop); // work around flow check
  4617. var formatComponentName = (noop);
  4618. if (true) {
  4619. var hasConsole = typeof console !== 'undefined';
  4620. var classifyRE = /(?:^|[-_])(\w)/g;
  4621. var classify = function (str) { return str
  4622. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  4623. .replace(/[-_]/g, ''); };
  4624. warn = function (msg, vm) {
  4625. var trace = vm ? generateComponentTrace(vm) : '';
  4626. if (config.warnHandler) {
  4627. config.warnHandler.call(null, msg, vm, trace);
  4628. } else if (hasConsole && (!config.silent)) {
  4629. console.error(("[Vue warn]: " + msg + trace));
  4630. }
  4631. };
  4632. tip = function (msg, vm) {
  4633. if (hasConsole && (!config.silent)) {
  4634. console.warn("[Vue tip]: " + msg + (
  4635. vm ? generateComponentTrace(vm) : ''
  4636. ));
  4637. }
  4638. };
  4639. formatComponentName = function (vm, includeFile) {
  4640. if (vm.$root === vm) {
  4641. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  4642. return ('') + vm.$options.__file
  4643. }
  4644. return '<Root>'
  4645. }
  4646. var options = typeof vm === 'function' && vm.cid != null
  4647. ? vm.options
  4648. : vm._isVue
  4649. ? vm.$options || vm.constructor.options
  4650. : vm;
  4651. var name = options.name || options._componentTag;
  4652. var file = options.__file;
  4653. if (!name && file) {
  4654. var match = file.match(/([^/\\]+)\.vue$/);
  4655. name = match && match[1];
  4656. }
  4657. return (
  4658. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  4659. (file && includeFile !== false ? (" at " + file) : '')
  4660. )
  4661. };
  4662. var repeat = function (str, n) {
  4663. var res = '';
  4664. while (n) {
  4665. if (n % 2 === 1) { res += str; }
  4666. if (n > 1) { str += str; }
  4667. n >>= 1;
  4668. }
  4669. return res
  4670. };
  4671. generateComponentTrace = function (vm) {
  4672. if (vm._isVue && vm.$parent) {
  4673. var tree = [];
  4674. var currentRecursiveSequence = 0;
  4675. while (vm && vm.$options.name !== 'PageBody') {
  4676. if (tree.length > 0) {
  4677. var last = tree[tree.length - 1];
  4678. if (last.constructor === vm.constructor) {
  4679. currentRecursiveSequence++;
  4680. vm = vm.$parent;
  4681. continue
  4682. } else if (currentRecursiveSequence > 0) {
  4683. tree[tree.length - 1] = [last, currentRecursiveSequence];
  4684. currentRecursiveSequence = 0;
  4685. }
  4686. }
  4687. !vm.$options.isReserved && tree.push(vm);
  4688. vm = vm.$parent;
  4689. }
  4690. return '\n\nfound in\n\n' + tree
  4691. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  4692. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  4693. : formatComponentName(vm))); })
  4694. .join('\n')
  4695. } else {
  4696. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  4697. }
  4698. };
  4699. }
  4700. /* */
  4701. var uid = 0;
  4702. /**
  4703. * A dep is an observable that can have multiple
  4704. * directives subscribing to it.
  4705. */
  4706. var Dep = function Dep () {
  4707. this.id = uid++;
  4708. this.subs = [];
  4709. };
  4710. Dep.prototype.addSub = function addSub (sub) {
  4711. this.subs.push(sub);
  4712. };
  4713. Dep.prototype.removeSub = function removeSub (sub) {
  4714. remove(this.subs, sub);
  4715. };
  4716. Dep.prototype.depend = function depend () {
  4717. if (Dep.SharedObject.target) {
  4718. Dep.SharedObject.target.addDep(this);
  4719. }
  4720. };
  4721. Dep.prototype.notify = function notify () {
  4722. // stabilize the subscriber list first
  4723. var subs = this.subs.slice();
  4724. if ( true && !config.async) {
  4725. // subs aren't sorted in scheduler if not running async
  4726. // we need to sort them now to make sure they fire in correct
  4727. // order
  4728. subs.sort(function (a, b) { return a.id - b.id; });
  4729. }
  4730. for (var i = 0, l = subs.length; i < l; i++) {
  4731. subs[i].update();
  4732. }
  4733. };
  4734. // The current target watcher being evaluated.
  4735. // This is globally unique because only one watcher
  4736. // can be evaluated at a time.
  4737. // fixed by xxxxxx (nvue shared vuex)
  4738. /* eslint-disable no-undef */
  4739. Dep.SharedObject = {};
  4740. Dep.SharedObject.target = null;
  4741. Dep.SharedObject.targetStack = [];
  4742. function pushTarget (target) {
  4743. Dep.SharedObject.targetStack.push(target);
  4744. Dep.SharedObject.target = target;
  4745. Dep.target = target;
  4746. }
  4747. function popTarget () {
  4748. Dep.SharedObject.targetStack.pop();
  4749. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  4750. Dep.target = Dep.SharedObject.target;
  4751. }
  4752. /* */
  4753. var VNode = function VNode (
  4754. tag,
  4755. data,
  4756. children,
  4757. text,
  4758. elm,
  4759. context,
  4760. componentOptions,
  4761. asyncFactory
  4762. ) {
  4763. this.tag = tag;
  4764. this.data = data;
  4765. this.children = children;
  4766. this.text = text;
  4767. this.elm = elm;
  4768. this.ns = undefined;
  4769. this.context = context;
  4770. this.fnContext = undefined;
  4771. this.fnOptions = undefined;
  4772. this.fnScopeId = undefined;
  4773. this.key = data && data.key;
  4774. this.componentOptions = componentOptions;
  4775. this.componentInstance = undefined;
  4776. this.parent = undefined;
  4777. this.raw = false;
  4778. this.isStatic = false;
  4779. this.isRootInsert = true;
  4780. this.isComment = false;
  4781. this.isCloned = false;
  4782. this.isOnce = false;
  4783. this.asyncFactory = asyncFactory;
  4784. this.asyncMeta = undefined;
  4785. this.isAsyncPlaceholder = false;
  4786. };
  4787. var prototypeAccessors = { child: { configurable: true } };
  4788. // DEPRECATED: alias for componentInstance for backwards compat.
  4789. /* istanbul ignore next */
  4790. prototypeAccessors.child.get = function () {
  4791. return this.componentInstance
  4792. };
  4793. Object.defineProperties( VNode.prototype, prototypeAccessors );
  4794. var createEmptyVNode = function (text) {
  4795. if ( text === void 0 ) text = '';
  4796. var node = new VNode();
  4797. node.text = text;
  4798. node.isComment = true;
  4799. return node
  4800. };
  4801. function createTextVNode (val) {
  4802. return new VNode(undefined, undefined, undefined, String(val))
  4803. }
  4804. // optimized shallow clone
  4805. // used for static nodes and slot nodes because they may be reused across
  4806. // multiple renders, cloning them avoids errors when DOM manipulations rely
  4807. // on their elm reference.
  4808. function cloneVNode (vnode) {
  4809. var cloned = new VNode(
  4810. vnode.tag,
  4811. vnode.data,
  4812. // #7975
  4813. // clone children array to avoid mutating original in case of cloning
  4814. // a child.
  4815. vnode.children && vnode.children.slice(),
  4816. vnode.text,
  4817. vnode.elm,
  4818. vnode.context,
  4819. vnode.componentOptions,
  4820. vnode.asyncFactory
  4821. );
  4822. cloned.ns = vnode.ns;
  4823. cloned.isStatic = vnode.isStatic;
  4824. cloned.key = vnode.key;
  4825. cloned.isComment = vnode.isComment;
  4826. cloned.fnContext = vnode.fnContext;
  4827. cloned.fnOptions = vnode.fnOptions;
  4828. cloned.fnScopeId = vnode.fnScopeId;
  4829. cloned.asyncMeta = vnode.asyncMeta;
  4830. cloned.isCloned = true;
  4831. return cloned
  4832. }
  4833. /*
  4834. * not type checking this file because flow doesn't play well with
  4835. * dynamically accessing methods on Array prototype
  4836. */
  4837. var arrayProto = Array.prototype;
  4838. var arrayMethods = Object.create(arrayProto);
  4839. var methodsToPatch = [
  4840. 'push',
  4841. 'pop',
  4842. 'shift',
  4843. 'unshift',
  4844. 'splice',
  4845. 'sort',
  4846. 'reverse'
  4847. ];
  4848. /**
  4849. * Intercept mutating methods and emit events
  4850. */
  4851. methodsToPatch.forEach(function (method) {
  4852. // cache original method
  4853. var original = arrayProto[method];
  4854. def(arrayMethods, method, function mutator () {
  4855. var args = [], len = arguments.length;
  4856. while ( len-- ) args[ len ] = arguments[ len ];
  4857. var result = original.apply(this, args);
  4858. var ob = this.__ob__;
  4859. var inserted;
  4860. switch (method) {
  4861. case 'push':
  4862. case 'unshift':
  4863. inserted = args;
  4864. break
  4865. case 'splice':
  4866. inserted = args.slice(2);
  4867. break
  4868. }
  4869. if (inserted) { ob.observeArray(inserted); }
  4870. // notify change
  4871. ob.dep.notify();
  4872. return result
  4873. });
  4874. });
  4875. /* */
  4876. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  4877. /**
  4878. * In some cases we may want to disable observation inside a component's
  4879. * update computation.
  4880. */
  4881. var shouldObserve = true;
  4882. function toggleObserving (value) {
  4883. shouldObserve = value;
  4884. }
  4885. /**
  4886. * Observer class that is attached to each observed
  4887. * object. Once attached, the observer converts the target
  4888. * object's property keys into getter/setters that
  4889. * collect dependencies and dispatch updates.
  4890. */
  4891. var Observer = function Observer (value) {
  4892. this.value = value;
  4893. this.dep = new Dep();
  4894. this.vmCount = 0;
  4895. def(value, '__ob__', this);
  4896. if (Array.isArray(value)) {
  4897. if (hasProto) {
  4898. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  4899. if(value.push !== value.__proto__.push){
  4900. copyAugment(value, arrayMethods, arrayKeys);
  4901. } else {
  4902. protoAugment(value, arrayMethods);
  4903. }
  4904. }
  4905. } else {
  4906. copyAugment(value, arrayMethods, arrayKeys);
  4907. }
  4908. this.observeArray(value);
  4909. } else {
  4910. this.walk(value);
  4911. }
  4912. };
  4913. /**
  4914. * Walk through all properties and convert them into
  4915. * getter/setters. This method should only be called when
  4916. * value type is Object.
  4917. */
  4918. Observer.prototype.walk = function walk (obj) {
  4919. var keys = Object.keys(obj);
  4920. for (var i = 0; i < keys.length; i++) {
  4921. defineReactive$$1(obj, keys[i]);
  4922. }
  4923. };
  4924. /**
  4925. * Observe a list of Array items.
  4926. */
  4927. Observer.prototype.observeArray = function observeArray (items) {
  4928. for (var i = 0, l = items.length; i < l; i++) {
  4929. observe(items[i]);
  4930. }
  4931. };
  4932. // helpers
  4933. /**
  4934. * Augment a target Object or Array by intercepting
  4935. * the prototype chain using __proto__
  4936. */
  4937. function protoAugment (target, src) {
  4938. /* eslint-disable no-proto */
  4939. target.__proto__ = src;
  4940. /* eslint-enable no-proto */
  4941. }
  4942. /**
  4943. * Augment a target Object or Array by defining
  4944. * hidden properties.
  4945. */
  4946. /* istanbul ignore next */
  4947. function copyAugment (target, src, keys) {
  4948. for (var i = 0, l = keys.length; i < l; i++) {
  4949. var key = keys[i];
  4950. def(target, key, src[key]);
  4951. }
  4952. }
  4953. /**
  4954. * Attempt to create an observer instance for a value,
  4955. * returns the new observer if successfully observed,
  4956. * or the existing observer if the value already has one.
  4957. */
  4958. function observe (value, asRootData) {
  4959. if (!isObject(value) || value instanceof VNode) {
  4960. return
  4961. }
  4962. var ob;
  4963. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  4964. ob = value.__ob__;
  4965. } else if (
  4966. shouldObserve &&
  4967. !isServerRendering() &&
  4968. (Array.isArray(value) || isPlainObject(value)) &&
  4969. Object.isExtensible(value) &&
  4970. !value._isVue
  4971. ) {
  4972. ob = new Observer(value);
  4973. }
  4974. if (asRootData && ob) {
  4975. ob.vmCount++;
  4976. }
  4977. return ob
  4978. }
  4979. /**
  4980. * Define a reactive property on an Object.
  4981. */
  4982. function defineReactive$$1 (
  4983. obj,
  4984. key,
  4985. val,
  4986. customSetter,
  4987. shallow
  4988. ) {
  4989. var dep = new Dep();
  4990. var property = Object.getOwnPropertyDescriptor(obj, key);
  4991. if (property && property.configurable === false) {
  4992. return
  4993. }
  4994. // cater for pre-defined getter/setters
  4995. var getter = property && property.get;
  4996. var setter = property && property.set;
  4997. if ((!getter || setter) && arguments.length === 2) {
  4998. val = obj[key];
  4999. }
  5000. var childOb = !shallow && observe(val);
  5001. Object.defineProperty(obj, key, {
  5002. enumerable: true,
  5003. configurable: true,
  5004. get: function reactiveGetter () {
  5005. var value = getter ? getter.call(obj) : val;
  5006. if (Dep.SharedObject.target) { // fixed by xxxxxx
  5007. dep.depend();
  5008. if (childOb) {
  5009. childOb.dep.depend();
  5010. if (Array.isArray(value)) {
  5011. dependArray(value);
  5012. }
  5013. }
  5014. }
  5015. return value
  5016. },
  5017. set: function reactiveSetter (newVal) {
  5018. var value = getter ? getter.call(obj) : val;
  5019. /* eslint-disable no-self-compare */
  5020. if (newVal === value || (newVal !== newVal && value !== value)) {
  5021. return
  5022. }
  5023. /* eslint-enable no-self-compare */
  5024. if ( true && customSetter) {
  5025. customSetter();
  5026. }
  5027. // #7981: for accessor properties without setter
  5028. if (getter && !setter) { return }
  5029. if (setter) {
  5030. setter.call(obj, newVal);
  5031. } else {
  5032. val = newVal;
  5033. }
  5034. childOb = !shallow && observe(newVal);
  5035. dep.notify();
  5036. }
  5037. });
  5038. }
  5039. /**
  5040. * Set a property on an object. Adds the new property and
  5041. * triggers change notification if the property doesn't
  5042. * already exist.
  5043. */
  5044. function set (target, key, val) {
  5045. if ( true &&
  5046. (isUndef(target) || isPrimitive(target))
  5047. ) {
  5048. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  5049. }
  5050. if (Array.isArray(target) && isValidArrayIndex(key)) {
  5051. target.length = Math.max(target.length, key);
  5052. target.splice(key, 1, val);
  5053. return val
  5054. }
  5055. if (key in target && !(key in Object.prototype)) {
  5056. target[key] = val;
  5057. return val
  5058. }
  5059. var ob = (target).__ob__;
  5060. if (target._isVue || (ob && ob.vmCount)) {
  5061. true && warn(
  5062. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  5063. 'at runtime - declare it upfront in the data option.'
  5064. );
  5065. return val
  5066. }
  5067. if (!ob) {
  5068. target[key] = val;
  5069. return val
  5070. }
  5071. defineReactive$$1(ob.value, key, val);
  5072. ob.dep.notify();
  5073. return val
  5074. }
  5075. /**
  5076. * Delete a property and trigger change if necessary.
  5077. */
  5078. function del (target, key) {
  5079. if ( true &&
  5080. (isUndef(target) || isPrimitive(target))
  5081. ) {
  5082. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  5083. }
  5084. if (Array.isArray(target) && isValidArrayIndex(key)) {
  5085. target.splice(key, 1);
  5086. return
  5087. }
  5088. var ob = (target).__ob__;
  5089. if (target._isVue || (ob && ob.vmCount)) {
  5090. true && warn(
  5091. 'Avoid deleting properties on a Vue instance or its root $data ' +
  5092. '- just set it to null.'
  5093. );
  5094. return
  5095. }
  5096. if (!hasOwn(target, key)) {
  5097. return
  5098. }
  5099. delete target[key];
  5100. if (!ob) {
  5101. return
  5102. }
  5103. ob.dep.notify();
  5104. }
  5105. /**
  5106. * Collect dependencies on array elements when the array is touched, since
  5107. * we cannot intercept array element access like property getters.
  5108. */
  5109. function dependArray (value) {
  5110. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  5111. e = value[i];
  5112. e && e.__ob__ && e.__ob__.dep.depend();
  5113. if (Array.isArray(e)) {
  5114. dependArray(e);
  5115. }
  5116. }
  5117. }
  5118. /* */
  5119. /**
  5120. * Option overwriting strategies are functions that handle
  5121. * how to merge a parent option value and a child option
  5122. * value into the final value.
  5123. */
  5124. var strats = config.optionMergeStrategies;
  5125. /**
  5126. * Options with restrictions
  5127. */
  5128. if (true) {
  5129. strats.el = strats.propsData = function (parent, child, vm, key) {
  5130. if (!vm) {
  5131. warn(
  5132. "option \"" + key + "\" can only be used during instance " +
  5133. 'creation with the `new` keyword.'
  5134. );
  5135. }
  5136. return defaultStrat(parent, child)
  5137. };
  5138. }
  5139. /**
  5140. * Helper that recursively merges two data objects together.
  5141. */
  5142. function mergeData (to, from) {
  5143. if (!from) { return to }
  5144. var key, toVal, fromVal;
  5145. var keys = hasSymbol
  5146. ? Reflect.ownKeys(from)
  5147. : Object.keys(from);
  5148. for (var i = 0; i < keys.length; i++) {
  5149. key = keys[i];
  5150. // in case the object is already observed...
  5151. if (key === '__ob__') { continue }
  5152. toVal = to[key];
  5153. fromVal = from[key];
  5154. if (!hasOwn(to, key)) {
  5155. set(to, key, fromVal);
  5156. } else if (
  5157. toVal !== fromVal &&
  5158. isPlainObject(toVal) &&
  5159. isPlainObject(fromVal)
  5160. ) {
  5161. mergeData(toVal, fromVal);
  5162. }
  5163. }
  5164. return to
  5165. }
  5166. /**
  5167. * Data
  5168. */
  5169. function mergeDataOrFn (
  5170. parentVal,
  5171. childVal,
  5172. vm
  5173. ) {
  5174. if (!vm) {
  5175. // in a Vue.extend merge, both should be functions
  5176. if (!childVal) {
  5177. return parentVal
  5178. }
  5179. if (!parentVal) {
  5180. return childVal
  5181. }
  5182. // when parentVal & childVal are both present,
  5183. // we need to return a function that returns the
  5184. // merged result of both functions... no need to
  5185. // check if parentVal is a function here because
  5186. // it has to be a function to pass previous merges.
  5187. return function mergedDataFn () {
  5188. return mergeData(
  5189. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  5190. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  5191. )
  5192. }
  5193. } else {
  5194. return function mergedInstanceDataFn () {
  5195. // instance merge
  5196. var instanceData = typeof childVal === 'function'
  5197. ? childVal.call(vm, vm)
  5198. : childVal;
  5199. var defaultData = typeof parentVal === 'function'
  5200. ? parentVal.call(vm, vm)
  5201. : parentVal;
  5202. if (instanceData) {
  5203. return mergeData(instanceData, defaultData)
  5204. } else {
  5205. return defaultData
  5206. }
  5207. }
  5208. }
  5209. }
  5210. strats.data = function (
  5211. parentVal,
  5212. childVal,
  5213. vm
  5214. ) {
  5215. if (!vm) {
  5216. if (childVal && typeof childVal !== 'function') {
  5217. true && warn(
  5218. 'The "data" option should be a function ' +
  5219. 'that returns a per-instance value in component ' +
  5220. 'definitions.',
  5221. vm
  5222. );
  5223. return parentVal
  5224. }
  5225. return mergeDataOrFn(parentVal, childVal)
  5226. }
  5227. return mergeDataOrFn(parentVal, childVal, vm)
  5228. };
  5229. /**
  5230. * Hooks and props are merged as arrays.
  5231. */
  5232. function mergeHook (
  5233. parentVal,
  5234. childVal
  5235. ) {
  5236. var res = childVal
  5237. ? parentVal
  5238. ? parentVal.concat(childVal)
  5239. : Array.isArray(childVal)
  5240. ? childVal
  5241. : [childVal]
  5242. : parentVal;
  5243. return res
  5244. ? dedupeHooks(res)
  5245. : res
  5246. }
  5247. function dedupeHooks (hooks) {
  5248. var res = [];
  5249. for (var i = 0; i < hooks.length; i++) {
  5250. if (res.indexOf(hooks[i]) === -1) {
  5251. res.push(hooks[i]);
  5252. }
  5253. }
  5254. return res
  5255. }
  5256. LIFECYCLE_HOOKS.forEach(function (hook) {
  5257. strats[hook] = mergeHook;
  5258. });
  5259. /**
  5260. * Assets
  5261. *
  5262. * When a vm is present (instance creation), we need to do
  5263. * a three-way merge between constructor options, instance
  5264. * options and parent options.
  5265. */
  5266. function mergeAssets (
  5267. parentVal,
  5268. childVal,
  5269. vm,
  5270. key
  5271. ) {
  5272. var res = Object.create(parentVal || null);
  5273. if (childVal) {
  5274. true && assertObjectType(key, childVal, vm);
  5275. return extend(res, childVal)
  5276. } else {
  5277. return res
  5278. }
  5279. }
  5280. ASSET_TYPES.forEach(function (type) {
  5281. strats[type + 's'] = mergeAssets;
  5282. });
  5283. /**
  5284. * Watchers.
  5285. *
  5286. * Watchers hashes should not overwrite one
  5287. * another, so we merge them as arrays.
  5288. */
  5289. strats.watch = function (
  5290. parentVal,
  5291. childVal,
  5292. vm,
  5293. key
  5294. ) {
  5295. // work around Firefox's Object.prototype.watch...
  5296. if (parentVal === nativeWatch) { parentVal = undefined; }
  5297. if (childVal === nativeWatch) { childVal = undefined; }
  5298. /* istanbul ignore if */
  5299. if (!childVal) { return Object.create(parentVal || null) }
  5300. if (true) {
  5301. assertObjectType(key, childVal, vm);
  5302. }
  5303. if (!parentVal) { return childVal }
  5304. var ret = {};
  5305. extend(ret, parentVal);
  5306. for (var key$1 in childVal) {
  5307. var parent = ret[key$1];
  5308. var child = childVal[key$1];
  5309. if (parent && !Array.isArray(parent)) {
  5310. parent = [parent];
  5311. }
  5312. ret[key$1] = parent
  5313. ? parent.concat(child)
  5314. : Array.isArray(child) ? child : [child];
  5315. }
  5316. return ret
  5317. };
  5318. /**
  5319. * Other object hashes.
  5320. */
  5321. strats.props =
  5322. strats.methods =
  5323. strats.inject =
  5324. strats.computed = function (
  5325. parentVal,
  5326. childVal,
  5327. vm,
  5328. key
  5329. ) {
  5330. if (childVal && "development" !== 'production') {
  5331. assertObjectType(key, childVal, vm);
  5332. }
  5333. if (!parentVal) { return childVal }
  5334. var ret = Object.create(null);
  5335. extend(ret, parentVal);
  5336. if (childVal) { extend(ret, childVal); }
  5337. return ret
  5338. };
  5339. strats.provide = mergeDataOrFn;
  5340. /**
  5341. * Default strategy.
  5342. */
  5343. var defaultStrat = function (parentVal, childVal) {
  5344. return childVal === undefined
  5345. ? parentVal
  5346. : childVal
  5347. };
  5348. /**
  5349. * Validate component names
  5350. */
  5351. function checkComponents (options) {
  5352. for (var key in options.components) {
  5353. validateComponentName(key);
  5354. }
  5355. }
  5356. function validateComponentName (name) {
  5357. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  5358. warn(
  5359. 'Invalid component name: "' + name + '". Component names ' +
  5360. 'should conform to valid custom element name in html5 specification.'
  5361. );
  5362. }
  5363. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  5364. warn(
  5365. 'Do not use built-in or reserved HTML elements as component ' +
  5366. 'id: ' + name
  5367. );
  5368. }
  5369. }
  5370. /**
  5371. * Ensure all props option syntax are normalized into the
  5372. * Object-based format.
  5373. */
  5374. function normalizeProps (options, vm) {
  5375. var props = options.props;
  5376. if (!props) { return }
  5377. var res = {};
  5378. var i, val, name;
  5379. if (Array.isArray(props)) {
  5380. i = props.length;
  5381. while (i--) {
  5382. val = props[i];
  5383. if (typeof val === 'string') {
  5384. name = camelize(val);
  5385. res[name] = { type: null };
  5386. } else if (true) {
  5387. warn('props must be strings when using array syntax.');
  5388. }
  5389. }
  5390. } else if (isPlainObject(props)) {
  5391. for (var key in props) {
  5392. val = props[key];
  5393. name = camelize(key);
  5394. res[name] = isPlainObject(val)
  5395. ? val
  5396. : { type: val };
  5397. }
  5398. } else if (true) {
  5399. warn(
  5400. "Invalid value for option \"props\": expected an Array or an Object, " +
  5401. "but got " + (toRawType(props)) + ".",
  5402. vm
  5403. );
  5404. }
  5405. options.props = res;
  5406. }
  5407. /**
  5408. * Normalize all injections into Object-based format
  5409. */
  5410. function normalizeInject (options, vm) {
  5411. var inject = options.inject;
  5412. if (!inject) { return }
  5413. var normalized = options.inject = {};
  5414. if (Array.isArray(inject)) {
  5415. for (var i = 0; i < inject.length; i++) {
  5416. normalized[inject[i]] = { from: inject[i] };
  5417. }
  5418. } else if (isPlainObject(inject)) {
  5419. for (var key in inject) {
  5420. var val = inject[key];
  5421. normalized[key] = isPlainObject(val)
  5422. ? extend({ from: key }, val)
  5423. : { from: val };
  5424. }
  5425. } else if (true) {
  5426. warn(
  5427. "Invalid value for option \"inject\": expected an Array or an Object, " +
  5428. "but got " + (toRawType(inject)) + ".",
  5429. vm
  5430. );
  5431. }
  5432. }
  5433. /**
  5434. * Normalize raw function directives into object format.
  5435. */
  5436. function normalizeDirectives (options) {
  5437. var dirs = options.directives;
  5438. if (dirs) {
  5439. for (var key in dirs) {
  5440. var def$$1 = dirs[key];
  5441. if (typeof def$$1 === 'function') {
  5442. dirs[key] = { bind: def$$1, update: def$$1 };
  5443. }
  5444. }
  5445. }
  5446. }
  5447. function assertObjectType (name, value, vm) {
  5448. if (!isPlainObject(value)) {
  5449. warn(
  5450. "Invalid value for option \"" + name + "\": expected an Object, " +
  5451. "but got " + (toRawType(value)) + ".",
  5452. vm
  5453. );
  5454. }
  5455. }
  5456. /**
  5457. * Merge two option objects into a new one.
  5458. * Core utility used in both instantiation and inheritance.
  5459. */
  5460. function mergeOptions (
  5461. parent,
  5462. child,
  5463. vm
  5464. ) {
  5465. if (true) {
  5466. checkComponents(child);
  5467. }
  5468. if (typeof child === 'function') {
  5469. child = child.options;
  5470. }
  5471. normalizeProps(child, vm);
  5472. normalizeInject(child, vm);
  5473. normalizeDirectives(child);
  5474. // Apply extends and mixins on the child options,
  5475. // but only if it is a raw options object that isn't
  5476. // the result of another mergeOptions call.
  5477. // Only merged options has the _base property.
  5478. if (!child._base) {
  5479. if (child.extends) {
  5480. parent = mergeOptions(parent, child.extends, vm);
  5481. }
  5482. if (child.mixins) {
  5483. for (var i = 0, l = child.mixins.length; i < l; i++) {
  5484. parent = mergeOptions(parent, child.mixins[i], vm);
  5485. }
  5486. }
  5487. }
  5488. var options = {};
  5489. var key;
  5490. for (key in parent) {
  5491. mergeField(key);
  5492. }
  5493. for (key in child) {
  5494. if (!hasOwn(parent, key)) {
  5495. mergeField(key);
  5496. }
  5497. }
  5498. function mergeField (key) {
  5499. var strat = strats[key] || defaultStrat;
  5500. options[key] = strat(parent[key], child[key], vm, key);
  5501. }
  5502. return options
  5503. }
  5504. /**
  5505. * Resolve an asset.
  5506. * This function is used because child instances need access
  5507. * to assets defined in its ancestor chain.
  5508. */
  5509. function resolveAsset (
  5510. options,
  5511. type,
  5512. id,
  5513. warnMissing
  5514. ) {
  5515. /* istanbul ignore if */
  5516. if (typeof id !== 'string') {
  5517. return
  5518. }
  5519. var assets = options[type];
  5520. // check local registration variations first
  5521. if (hasOwn(assets, id)) { return assets[id] }
  5522. var camelizedId = camelize(id);
  5523. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  5524. var PascalCaseId = capitalize(camelizedId);
  5525. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  5526. // fallback to prototype chain
  5527. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  5528. if ( true && warnMissing && !res) {
  5529. warn(
  5530. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  5531. options
  5532. );
  5533. }
  5534. return res
  5535. }
  5536. /* */
  5537. function validateProp (
  5538. key,
  5539. propOptions,
  5540. propsData,
  5541. vm
  5542. ) {
  5543. var prop = propOptions[key];
  5544. var absent = !hasOwn(propsData, key);
  5545. var value = propsData[key];
  5546. // boolean casting
  5547. var booleanIndex = getTypeIndex(Boolean, prop.type);
  5548. if (booleanIndex > -1) {
  5549. if (absent && !hasOwn(prop, 'default')) {
  5550. value = false;
  5551. } else if (value === '' || value === hyphenate(key)) {
  5552. // only cast empty string / same name to boolean if
  5553. // boolean has higher priority
  5554. var stringIndex = getTypeIndex(String, prop.type);
  5555. if (stringIndex < 0 || booleanIndex < stringIndex) {
  5556. value = true;
  5557. }
  5558. }
  5559. }
  5560. // check default value
  5561. if (value === undefined) {
  5562. value = getPropDefaultValue(vm, prop, key);
  5563. // since the default value is a fresh copy,
  5564. // make sure to observe it.
  5565. var prevShouldObserve = shouldObserve;
  5566. toggleObserving(true);
  5567. observe(value);
  5568. toggleObserving(prevShouldObserve);
  5569. }
  5570. if (
  5571. true
  5572. ) {
  5573. assertProp(prop, key, value, vm, absent);
  5574. }
  5575. return value
  5576. }
  5577. /**
  5578. * Get the default value of a prop.
  5579. */
  5580. function getPropDefaultValue (vm, prop, key) {
  5581. // no default, return undefined
  5582. if (!hasOwn(prop, 'default')) {
  5583. return undefined
  5584. }
  5585. var def = prop.default;
  5586. // warn against non-factory defaults for Object & Array
  5587. if ( true && isObject(def)) {
  5588. warn(
  5589. 'Invalid default value for prop "' + key + '": ' +
  5590. 'Props with type Object/Array must use a factory function ' +
  5591. 'to return the default value.',
  5592. vm
  5593. );
  5594. }
  5595. // the raw prop value was also undefined from previous render,
  5596. // return previous default value to avoid unnecessary watcher trigger
  5597. if (vm && vm.$options.propsData &&
  5598. vm.$options.propsData[key] === undefined &&
  5599. vm._props[key] !== undefined
  5600. ) {
  5601. return vm._props[key]
  5602. }
  5603. // call factory function for non-Function types
  5604. // a value is Function if its prototype is function even across different execution context
  5605. return typeof def === 'function' && getType(prop.type) !== 'Function'
  5606. ? def.call(vm)
  5607. : def
  5608. }
  5609. /**
  5610. * Assert whether a prop is valid.
  5611. */
  5612. function assertProp (
  5613. prop,
  5614. name,
  5615. value,
  5616. vm,
  5617. absent
  5618. ) {
  5619. if (prop.required && absent) {
  5620. warn(
  5621. 'Missing required prop: "' + name + '"',
  5622. vm
  5623. );
  5624. return
  5625. }
  5626. if (value == null && !prop.required) {
  5627. return
  5628. }
  5629. var type = prop.type;
  5630. var valid = !type || type === true;
  5631. var expectedTypes = [];
  5632. if (type) {
  5633. if (!Array.isArray(type)) {
  5634. type = [type];
  5635. }
  5636. for (var i = 0; i < type.length && !valid; i++) {
  5637. var assertedType = assertType(value, type[i]);
  5638. expectedTypes.push(assertedType.expectedType || '');
  5639. valid = assertedType.valid;
  5640. }
  5641. }
  5642. if (!valid) {
  5643. warn(
  5644. getInvalidTypeMessage(name, value, expectedTypes),
  5645. vm
  5646. );
  5647. return
  5648. }
  5649. var validator = prop.validator;
  5650. if (validator) {
  5651. if (!validator(value)) {
  5652. warn(
  5653. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  5654. vm
  5655. );
  5656. }
  5657. }
  5658. }
  5659. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  5660. function assertType (value, type) {
  5661. var valid;
  5662. var expectedType = getType(type);
  5663. if (simpleCheckRE.test(expectedType)) {
  5664. var t = typeof value;
  5665. valid = t === expectedType.toLowerCase();
  5666. // for primitive wrapper objects
  5667. if (!valid && t === 'object') {
  5668. valid = value instanceof type;
  5669. }
  5670. } else if (expectedType === 'Object') {
  5671. valid = isPlainObject(value);
  5672. } else if (expectedType === 'Array') {
  5673. valid = Array.isArray(value);
  5674. } else {
  5675. valid = value instanceof type;
  5676. }
  5677. return {
  5678. valid: valid,
  5679. expectedType: expectedType
  5680. }
  5681. }
  5682. /**
  5683. * Use function string name to check built-in types,
  5684. * because a simple equality check will fail when running
  5685. * across different vms / iframes.
  5686. */
  5687. function getType (fn) {
  5688. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  5689. return match ? match[1] : ''
  5690. }
  5691. function isSameType (a, b) {
  5692. return getType(a) === getType(b)
  5693. }
  5694. function getTypeIndex (type, expectedTypes) {
  5695. if (!Array.isArray(expectedTypes)) {
  5696. return isSameType(expectedTypes, type) ? 0 : -1
  5697. }
  5698. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  5699. if (isSameType(expectedTypes[i], type)) {
  5700. return i
  5701. }
  5702. }
  5703. return -1
  5704. }
  5705. function getInvalidTypeMessage (name, value, expectedTypes) {
  5706. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  5707. " Expected " + (expectedTypes.map(capitalize).join(', '));
  5708. var expectedType = expectedTypes[0];
  5709. var receivedType = toRawType(value);
  5710. var expectedValue = styleValue(value, expectedType);
  5711. var receivedValue = styleValue(value, receivedType);
  5712. // check if we need to specify expected value
  5713. if (expectedTypes.length === 1 &&
  5714. isExplicable(expectedType) &&
  5715. !isBoolean(expectedType, receivedType)) {
  5716. message += " with value " + expectedValue;
  5717. }
  5718. message += ", got " + receivedType + " ";
  5719. // check if we need to specify received value
  5720. if (isExplicable(receivedType)) {
  5721. message += "with value " + receivedValue + ".";
  5722. }
  5723. return message
  5724. }
  5725. function styleValue (value, type) {
  5726. if (type === 'String') {
  5727. return ("\"" + value + "\"")
  5728. } else if (type === 'Number') {
  5729. return ("" + (Number(value)))
  5730. } else {
  5731. return ("" + value)
  5732. }
  5733. }
  5734. function isExplicable (value) {
  5735. var explicitTypes = ['string', 'number', 'boolean'];
  5736. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  5737. }
  5738. function isBoolean () {
  5739. var args = [], len = arguments.length;
  5740. while ( len-- ) args[ len ] = arguments[ len ];
  5741. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  5742. }
  5743. /* */
  5744. function handleError (err, vm, info) {
  5745. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  5746. // See: https://github.com/vuejs/vuex/issues/1505
  5747. pushTarget();
  5748. try {
  5749. if (vm) {
  5750. var cur = vm;
  5751. while ((cur = cur.$parent)) {
  5752. var hooks = cur.$options.errorCaptured;
  5753. if (hooks) {
  5754. for (var i = 0; i < hooks.length; i++) {
  5755. try {
  5756. var capture = hooks[i].call(cur, err, vm, info) === false;
  5757. if (capture) { return }
  5758. } catch (e) {
  5759. globalHandleError(e, cur, 'errorCaptured hook');
  5760. }
  5761. }
  5762. }
  5763. }
  5764. }
  5765. globalHandleError(err, vm, info);
  5766. } finally {
  5767. popTarget();
  5768. }
  5769. }
  5770. function invokeWithErrorHandling (
  5771. handler,
  5772. context,
  5773. args,
  5774. vm,
  5775. info
  5776. ) {
  5777. var res;
  5778. try {
  5779. res = args ? handler.apply(context, args) : handler.call(context);
  5780. if (res && !res._isVue && isPromise(res) && !res._handled) {
  5781. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  5782. // issue #9511
  5783. // avoid catch triggering multiple times when nested calls
  5784. res._handled = true;
  5785. }
  5786. } catch (e) {
  5787. handleError(e, vm, info);
  5788. }
  5789. return res
  5790. }
  5791. function globalHandleError (err, vm, info) {
  5792. if (config.errorHandler) {
  5793. try {
  5794. return config.errorHandler.call(null, err, vm, info)
  5795. } catch (e) {
  5796. // if the user intentionally throws the original error in the handler,
  5797. // do not log it twice
  5798. if (e !== err) {
  5799. logError(e, null, 'config.errorHandler');
  5800. }
  5801. }
  5802. }
  5803. logError(err, vm, info);
  5804. }
  5805. function logError (err, vm, info) {
  5806. if (true) {
  5807. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  5808. }
  5809. /* istanbul ignore else */
  5810. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  5811. console.error(err);
  5812. } else {
  5813. throw err
  5814. }
  5815. }
  5816. /* */
  5817. var callbacks = [];
  5818. var pending = false;
  5819. function flushCallbacks () {
  5820. pending = false;
  5821. var copies = callbacks.slice(0);
  5822. callbacks.length = 0;
  5823. for (var i = 0; i < copies.length; i++) {
  5824. copies[i]();
  5825. }
  5826. }
  5827. // Here we have async deferring wrappers using microtasks.
  5828. // In 2.5 we used (macro) tasks (in combination with microtasks).
  5829. // However, it has subtle problems when state is changed right before repaint
  5830. // (e.g. #6813, out-in transitions).
  5831. // Also, using (macro) tasks in event handler would cause some weird behaviors
  5832. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  5833. // So we now use microtasks everywhere, again.
  5834. // A major drawback of this tradeoff is that there are some scenarios
  5835. // where microtasks have too high a priority and fire in between supposedly
  5836. // sequential events (e.g. #4521, #6690, which have workarounds)
  5837. // or even between bubbling of the same event (#6566).
  5838. var timerFunc;
  5839. // The nextTick behavior leverages the microtask queue, which can be accessed
  5840. // via either native Promise.then or MutationObserver.
  5841. // MutationObserver has wider support, however it is seriously bugged in
  5842. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  5843. // completely stops working after triggering a few times... so, if native
  5844. // Promise is available, we will use it:
  5845. /* istanbul ignore next, $flow-disable-line */
  5846. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  5847. var p = Promise.resolve();
  5848. timerFunc = function () {
  5849. p.then(flushCallbacks);
  5850. // In problematic UIWebViews, Promise.then doesn't completely break, but
  5851. // it can get stuck in a weird state where callbacks are pushed into the
  5852. // microtask queue but the queue isn't being flushed, until the browser
  5853. // needs to do some other work, e.g. handle a timer. Therefore we can
  5854. // "force" the microtask queue to be flushed by adding an empty timer.
  5855. if (isIOS) { setTimeout(noop); }
  5856. };
  5857. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  5858. isNative(MutationObserver) ||
  5859. // PhantomJS and iOS 7.x
  5860. MutationObserver.toString() === '[object MutationObserverConstructor]'
  5861. )) {
  5862. // Use MutationObserver where native Promise is not available,
  5863. // e.g. PhantomJS, iOS7, Android 4.4
  5864. // (#6466 MutationObserver is unreliable in IE11)
  5865. var counter = 1;
  5866. var observer = new MutationObserver(flushCallbacks);
  5867. var textNode = document.createTextNode(String(counter));
  5868. observer.observe(textNode, {
  5869. characterData: true
  5870. });
  5871. timerFunc = function () {
  5872. counter = (counter + 1) % 2;
  5873. textNode.data = String(counter);
  5874. };
  5875. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  5876. // Fallback to setImmediate.
  5877. // Technically it leverages the (macro) task queue,
  5878. // but it is still a better choice than setTimeout.
  5879. timerFunc = function () {
  5880. setImmediate(flushCallbacks);
  5881. };
  5882. } else {
  5883. // Fallback to setTimeout.
  5884. timerFunc = function () {
  5885. setTimeout(flushCallbacks, 0);
  5886. };
  5887. }
  5888. function nextTick (cb, ctx) {
  5889. var _resolve;
  5890. callbacks.push(function () {
  5891. if (cb) {
  5892. try {
  5893. cb.call(ctx);
  5894. } catch (e) {
  5895. handleError(e, ctx, 'nextTick');
  5896. }
  5897. } else if (_resolve) {
  5898. _resolve(ctx);
  5899. }
  5900. });
  5901. if (!pending) {
  5902. pending = true;
  5903. timerFunc();
  5904. }
  5905. // $flow-disable-line
  5906. if (!cb && typeof Promise !== 'undefined') {
  5907. return new Promise(function (resolve) {
  5908. _resolve = resolve;
  5909. })
  5910. }
  5911. }
  5912. /* */
  5913. /* not type checking this file because flow doesn't play well with Proxy */
  5914. var initProxy;
  5915. if (true) {
  5916. var allowedGlobals = makeMap(
  5917. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  5918. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  5919. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  5920. 'require' // for Webpack/Browserify
  5921. );
  5922. var warnNonPresent = function (target, key) {
  5923. warn(
  5924. "Property or method \"" + key + "\" is not defined on the instance but " +
  5925. 'referenced during render. Make sure that this property is reactive, ' +
  5926. 'either in the data option, or for class-based components, by ' +
  5927. 'initializing the property. ' +
  5928. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  5929. target
  5930. );
  5931. };
  5932. var warnReservedPrefix = function (target, key) {
  5933. warn(
  5934. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  5935. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  5936. 'prevent conflicts with Vue internals. ' +
  5937. 'See: https://vuejs.org/v2/api/#data',
  5938. target
  5939. );
  5940. };
  5941. var hasProxy =
  5942. typeof Proxy !== 'undefined' && isNative(Proxy);
  5943. if (hasProxy) {
  5944. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  5945. config.keyCodes = new Proxy(config.keyCodes, {
  5946. set: function set (target, key, value) {
  5947. if (isBuiltInModifier(key)) {
  5948. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  5949. return false
  5950. } else {
  5951. target[key] = value;
  5952. return true
  5953. }
  5954. }
  5955. });
  5956. }
  5957. var hasHandler = {
  5958. has: function has (target, key) {
  5959. var has = key in target;
  5960. var isAllowed = allowedGlobals(key) ||
  5961. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  5962. if (!has && !isAllowed) {
  5963. if (key in target.$data) { warnReservedPrefix(target, key); }
  5964. else { warnNonPresent(target, key); }
  5965. }
  5966. return has || !isAllowed
  5967. }
  5968. };
  5969. var getHandler = {
  5970. get: function get (target, key) {
  5971. if (typeof key === 'string' && !(key in target)) {
  5972. if (key in target.$data) { warnReservedPrefix(target, key); }
  5973. else { warnNonPresent(target, key); }
  5974. }
  5975. return target[key]
  5976. }
  5977. };
  5978. initProxy = function initProxy (vm) {
  5979. if (hasProxy) {
  5980. // determine which proxy handler to use
  5981. var options = vm.$options;
  5982. var handlers = options.render && options.render._withStripped
  5983. ? getHandler
  5984. : hasHandler;
  5985. vm._renderProxy = new Proxy(vm, handlers);
  5986. } else {
  5987. vm._renderProxy = vm;
  5988. }
  5989. };
  5990. }
  5991. /* */
  5992. var seenObjects = new _Set();
  5993. /**
  5994. * Recursively traverse an object to evoke all converted
  5995. * getters, so that every nested property inside the object
  5996. * is collected as a "deep" dependency.
  5997. */
  5998. function traverse (val) {
  5999. _traverse(val, seenObjects);
  6000. seenObjects.clear();
  6001. }
  6002. function _traverse (val, seen) {
  6003. var i, keys;
  6004. var isA = Array.isArray(val);
  6005. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  6006. return
  6007. }
  6008. if (val.__ob__) {
  6009. var depId = val.__ob__.dep.id;
  6010. if (seen.has(depId)) {
  6011. return
  6012. }
  6013. seen.add(depId);
  6014. }
  6015. if (isA) {
  6016. i = val.length;
  6017. while (i--) { _traverse(val[i], seen); }
  6018. } else {
  6019. keys = Object.keys(val);
  6020. i = keys.length;
  6021. while (i--) { _traverse(val[keys[i]], seen); }
  6022. }
  6023. }
  6024. var mark;
  6025. var measure;
  6026. if (true) {
  6027. var perf = inBrowser && window.performance;
  6028. /* istanbul ignore if */
  6029. if (
  6030. perf &&
  6031. perf.mark &&
  6032. perf.measure &&
  6033. perf.clearMarks &&
  6034. perf.clearMeasures
  6035. ) {
  6036. mark = function (tag) { return perf.mark(tag); };
  6037. measure = function (name, startTag, endTag) {
  6038. perf.measure(name, startTag, endTag);
  6039. perf.clearMarks(startTag);
  6040. perf.clearMarks(endTag);
  6041. // perf.clearMeasures(name)
  6042. };
  6043. }
  6044. }
  6045. /* */
  6046. var normalizeEvent = cached(function (name) {
  6047. var passive = name.charAt(0) === '&';
  6048. name = passive ? name.slice(1) : name;
  6049. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  6050. name = once$$1 ? name.slice(1) : name;
  6051. var capture = name.charAt(0) === '!';
  6052. name = capture ? name.slice(1) : name;
  6053. return {
  6054. name: name,
  6055. once: once$$1,
  6056. capture: capture,
  6057. passive: passive
  6058. }
  6059. });
  6060. function createFnInvoker (fns, vm) {
  6061. function invoker () {
  6062. var arguments$1 = arguments;
  6063. var fns = invoker.fns;
  6064. if (Array.isArray(fns)) {
  6065. var cloned = fns.slice();
  6066. for (var i = 0; i < cloned.length; i++) {
  6067. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  6068. }
  6069. } else {
  6070. // return handler return value for single handlers
  6071. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  6072. }
  6073. }
  6074. invoker.fns = fns;
  6075. return invoker
  6076. }
  6077. function updateListeners (
  6078. on,
  6079. oldOn,
  6080. add,
  6081. remove$$1,
  6082. createOnceHandler,
  6083. vm
  6084. ) {
  6085. var name, def$$1, cur, old, event;
  6086. for (name in on) {
  6087. def$$1 = cur = on[name];
  6088. old = oldOn[name];
  6089. event = normalizeEvent(name);
  6090. if (isUndef(cur)) {
  6091. true && warn(
  6092. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  6093. vm
  6094. );
  6095. } else if (isUndef(old)) {
  6096. if (isUndef(cur.fns)) {
  6097. cur = on[name] = createFnInvoker(cur, vm);
  6098. }
  6099. if (isTrue(event.once)) {
  6100. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  6101. }
  6102. add(event.name, cur, event.capture, event.passive, event.params);
  6103. } else if (cur !== old) {
  6104. old.fns = cur;
  6105. on[name] = old;
  6106. }
  6107. }
  6108. for (name in oldOn) {
  6109. if (isUndef(on[name])) {
  6110. event = normalizeEvent(name);
  6111. remove$$1(event.name, oldOn[name], event.capture);
  6112. }
  6113. }
  6114. }
  6115. /* */
  6116. /* */
  6117. // fixed by xxxxxx (mp properties)
  6118. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  6119. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  6120. if (isUndef(propOptions)) {
  6121. return res
  6122. }
  6123. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  6124. var attrs = data.attrs;
  6125. var props = data.props;
  6126. if (isDef(attrs) || isDef(props)) {
  6127. for (var key in propOptions) {
  6128. var altKey = hyphenate(key);
  6129. var result = checkProp(res, props, key, altKey, true) ||
  6130. checkProp(res, attrs, key, altKey, false);
  6131. // externalClass
  6132. if (
  6133. result &&
  6134. res[key] &&
  6135. externalClasses.indexOf(altKey) !== -1 &&
  6136. context[camelize(res[key])]
  6137. ) {
  6138. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  6139. res[key] = context[camelize(res[key])];
  6140. }
  6141. }
  6142. }
  6143. return res
  6144. }
  6145. function extractPropsFromVNodeData (
  6146. data,
  6147. Ctor,
  6148. tag,
  6149. context// fixed by xxxxxx
  6150. ) {
  6151. // we are only extracting raw values here.
  6152. // validation and default values are handled in the child
  6153. // component itself.
  6154. var propOptions = Ctor.options.props;
  6155. if (isUndef(propOptions)) {
  6156. // fixed by xxxxxx
  6157. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  6158. }
  6159. var res = {};
  6160. var attrs = data.attrs;
  6161. var props = data.props;
  6162. if (isDef(attrs) || isDef(props)) {
  6163. for (var key in propOptions) {
  6164. var altKey = hyphenate(key);
  6165. if (true) {
  6166. var keyInLowerCase = key.toLowerCase();
  6167. if (
  6168. key !== keyInLowerCase &&
  6169. attrs && hasOwn(attrs, keyInLowerCase)
  6170. ) {
  6171. tip(
  6172. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  6173. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  6174. " \"" + key + "\". " +
  6175. "Note that HTML attributes are case-insensitive and camelCased " +
  6176. "props need to use their kebab-case equivalents when using in-DOM " +
  6177. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  6178. );
  6179. }
  6180. }
  6181. checkProp(res, props, key, altKey, true) ||
  6182. checkProp(res, attrs, key, altKey, false);
  6183. }
  6184. }
  6185. // fixed by xxxxxx
  6186. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  6187. }
  6188. function checkProp (
  6189. res,
  6190. hash,
  6191. key,
  6192. altKey,
  6193. preserve
  6194. ) {
  6195. if (isDef(hash)) {
  6196. if (hasOwn(hash, key)) {
  6197. res[key] = hash[key];
  6198. if (!preserve) {
  6199. delete hash[key];
  6200. }
  6201. return true
  6202. } else if (hasOwn(hash, altKey)) {
  6203. res[key] = hash[altKey];
  6204. if (!preserve) {
  6205. delete hash[altKey];
  6206. }
  6207. return true
  6208. }
  6209. }
  6210. return false
  6211. }
  6212. /* */
  6213. // The template compiler attempts to minimize the need for normalization by
  6214. // statically analyzing the template at compile time.
  6215. //
  6216. // For plain HTML markup, normalization can be completely skipped because the
  6217. // generated render function is guaranteed to return Array<VNode>. There are
  6218. // two cases where extra normalization is needed:
  6219. // 1. When the children contains components - because a functional component
  6220. // may return an Array instead of a single root. In this case, just a simple
  6221. // normalization is needed - if any child is an Array, we flatten the whole
  6222. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  6223. // because functional components already normalize their own children.
  6224. function simpleNormalizeChildren (children) {
  6225. for (var i = 0; i < children.length; i++) {
  6226. if (Array.isArray(children[i])) {
  6227. return Array.prototype.concat.apply([], children)
  6228. }
  6229. }
  6230. return children
  6231. }
  6232. // 2. When the children contains constructs that always generated nested Arrays,
  6233. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  6234. // with hand-written render functions / JSX. In such cases a full normalization
  6235. // is needed to cater to all possible types of children values.
  6236. function normalizeChildren (children) {
  6237. return isPrimitive(children)
  6238. ? [createTextVNode(children)]
  6239. : Array.isArray(children)
  6240. ? normalizeArrayChildren(children)
  6241. : undefined
  6242. }
  6243. function isTextNode (node) {
  6244. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  6245. }
  6246. function normalizeArrayChildren (children, nestedIndex) {
  6247. var res = [];
  6248. var i, c, lastIndex, last;
  6249. for (i = 0; i < children.length; i++) {
  6250. c = children[i];
  6251. if (isUndef(c) || typeof c === 'boolean') { continue }
  6252. lastIndex = res.length - 1;
  6253. last = res[lastIndex];
  6254. // nested
  6255. if (Array.isArray(c)) {
  6256. if (c.length > 0) {
  6257. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  6258. // merge adjacent text nodes
  6259. if (isTextNode(c[0]) && isTextNode(last)) {
  6260. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  6261. c.shift();
  6262. }
  6263. res.push.apply(res, c);
  6264. }
  6265. } else if (isPrimitive(c)) {
  6266. if (isTextNode(last)) {
  6267. // merge adjacent text nodes
  6268. // this is necessary for SSR hydration because text nodes are
  6269. // essentially merged when rendered to HTML strings
  6270. res[lastIndex] = createTextVNode(last.text + c);
  6271. } else if (c !== '') {
  6272. // convert primitive to vnode
  6273. res.push(createTextVNode(c));
  6274. }
  6275. } else {
  6276. if (isTextNode(c) && isTextNode(last)) {
  6277. // merge adjacent text nodes
  6278. res[lastIndex] = createTextVNode(last.text + c.text);
  6279. } else {
  6280. // default key for nested array children (likely generated by v-for)
  6281. if (isTrue(children._isVList) &&
  6282. isDef(c.tag) &&
  6283. isUndef(c.key) &&
  6284. isDef(nestedIndex)) {
  6285. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  6286. }
  6287. res.push(c);
  6288. }
  6289. }
  6290. }
  6291. return res
  6292. }
  6293. /* */
  6294. function initProvide (vm) {
  6295. var provide = vm.$options.provide;
  6296. if (provide) {
  6297. vm._provided = typeof provide === 'function'
  6298. ? provide.call(vm)
  6299. : provide;
  6300. }
  6301. }
  6302. function initInjections (vm) {
  6303. var result = resolveInject(vm.$options.inject, vm);
  6304. if (result) {
  6305. toggleObserving(false);
  6306. Object.keys(result).forEach(function (key) {
  6307. /* istanbul ignore else */
  6308. if (true) {
  6309. defineReactive$$1(vm, key, result[key], function () {
  6310. warn(
  6311. "Avoid mutating an injected value directly since the changes will be " +
  6312. "overwritten whenever the provided component re-renders. " +
  6313. "injection being mutated: \"" + key + "\"",
  6314. vm
  6315. );
  6316. });
  6317. } else {}
  6318. });
  6319. toggleObserving(true);
  6320. }
  6321. }
  6322. function resolveInject (inject, vm) {
  6323. if (inject) {
  6324. // inject is :any because flow is not smart enough to figure out cached
  6325. var result = Object.create(null);
  6326. var keys = hasSymbol
  6327. ? Reflect.ownKeys(inject)
  6328. : Object.keys(inject);
  6329. for (var i = 0; i < keys.length; i++) {
  6330. var key = keys[i];
  6331. // #6574 in case the inject object is observed...
  6332. if (key === '__ob__') { continue }
  6333. var provideKey = inject[key].from;
  6334. var source = vm;
  6335. while (source) {
  6336. if (source._provided && hasOwn(source._provided, provideKey)) {
  6337. result[key] = source._provided[provideKey];
  6338. break
  6339. }
  6340. source = source.$parent;
  6341. }
  6342. if (!source) {
  6343. if ('default' in inject[key]) {
  6344. var provideDefault = inject[key].default;
  6345. result[key] = typeof provideDefault === 'function'
  6346. ? provideDefault.call(vm)
  6347. : provideDefault;
  6348. } else if (true) {
  6349. warn(("Injection \"" + key + "\" not found"), vm);
  6350. }
  6351. }
  6352. }
  6353. return result
  6354. }
  6355. }
  6356. /* */
  6357. /**
  6358. * Runtime helper for resolving raw children VNodes into a slot object.
  6359. */
  6360. function resolveSlots (
  6361. children,
  6362. context
  6363. ) {
  6364. if (!children || !children.length) {
  6365. return {}
  6366. }
  6367. var slots = {};
  6368. for (var i = 0, l = children.length; i < l; i++) {
  6369. var child = children[i];
  6370. var data = child.data;
  6371. // remove slot attribute if the node is resolved as a Vue slot node
  6372. if (data && data.attrs && data.attrs.slot) {
  6373. delete data.attrs.slot;
  6374. }
  6375. // named slots should only be respected if the vnode was rendered in the
  6376. // same context.
  6377. if ((child.context === context || child.fnContext === context) &&
  6378. data && data.slot != null
  6379. ) {
  6380. var name = data.slot;
  6381. var slot = (slots[name] || (slots[name] = []));
  6382. if (child.tag === 'template') {
  6383. slot.push.apply(slot, child.children || []);
  6384. } else {
  6385. slot.push(child);
  6386. }
  6387. } else {
  6388. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  6389. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  6390. (slots['page'] || (slots['page'] = [])).push(child);
  6391. }else{
  6392. (slots.default || (slots.default = [])).push(child);
  6393. }
  6394. }
  6395. }
  6396. // ignore slots that contains only whitespace
  6397. for (var name$1 in slots) {
  6398. if (slots[name$1].every(isWhitespace)) {
  6399. delete slots[name$1];
  6400. }
  6401. }
  6402. return slots
  6403. }
  6404. function isWhitespace (node) {
  6405. return (node.isComment && !node.asyncFactory) || node.text === ' '
  6406. }
  6407. /* */
  6408. function normalizeScopedSlots (
  6409. slots,
  6410. normalSlots,
  6411. prevSlots
  6412. ) {
  6413. var res;
  6414. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  6415. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  6416. var key = slots && slots.$key;
  6417. if (!slots) {
  6418. res = {};
  6419. } else if (slots._normalized) {
  6420. // fast path 1: child component re-render only, parent did not change
  6421. return slots._normalized
  6422. } else if (
  6423. isStable &&
  6424. prevSlots &&
  6425. prevSlots !== emptyObject &&
  6426. key === prevSlots.$key &&
  6427. !hasNormalSlots &&
  6428. !prevSlots.$hasNormal
  6429. ) {
  6430. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  6431. // only need to normalize once
  6432. return prevSlots
  6433. } else {
  6434. res = {};
  6435. for (var key$1 in slots) {
  6436. if (slots[key$1] && key$1[0] !== '$') {
  6437. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  6438. }
  6439. }
  6440. }
  6441. // expose normal slots on scopedSlots
  6442. for (var key$2 in normalSlots) {
  6443. if (!(key$2 in res)) {
  6444. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  6445. }
  6446. }
  6447. // avoriaz seems to mock a non-extensible $scopedSlots object
  6448. // and when that is passed down this would cause an error
  6449. if (slots && Object.isExtensible(slots)) {
  6450. (slots)._normalized = res;
  6451. }
  6452. def(res, '$stable', isStable);
  6453. def(res, '$key', key);
  6454. def(res, '$hasNormal', hasNormalSlots);
  6455. return res
  6456. }
  6457. function normalizeScopedSlot(normalSlots, key, fn) {
  6458. var normalized = function () {
  6459. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  6460. res = res && typeof res === 'object' && !Array.isArray(res)
  6461. ? [res] // single vnode
  6462. : normalizeChildren(res);
  6463. return res && (
  6464. res.length === 0 ||
  6465. (res.length === 1 && res[0].isComment) // #9658
  6466. ) ? undefined
  6467. : res
  6468. };
  6469. // this is a slot using the new v-slot syntax without scope. although it is
  6470. // compiled as a scoped slot, render fn users would expect it to be present
  6471. // on this.$slots because the usage is semantically a normal slot.
  6472. if (fn.proxy) {
  6473. Object.defineProperty(normalSlots, key, {
  6474. get: normalized,
  6475. enumerable: true,
  6476. configurable: true
  6477. });
  6478. }
  6479. return normalized
  6480. }
  6481. function proxyNormalSlot(slots, key) {
  6482. return function () { return slots[key]; }
  6483. }
  6484. /* */
  6485. /**
  6486. * Runtime helper for rendering v-for lists.
  6487. */
  6488. function renderList (
  6489. val,
  6490. render
  6491. ) {
  6492. var ret, i, l, keys, key;
  6493. if (Array.isArray(val) || typeof val === 'string') {
  6494. ret = new Array(val.length);
  6495. for (i = 0, l = val.length; i < l; i++) {
  6496. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  6497. }
  6498. } else if (typeof val === 'number') {
  6499. ret = new Array(val);
  6500. for (i = 0; i < val; i++) {
  6501. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  6502. }
  6503. } else if (isObject(val)) {
  6504. if (hasSymbol && val[Symbol.iterator]) {
  6505. ret = [];
  6506. var iterator = val[Symbol.iterator]();
  6507. var result = iterator.next();
  6508. while (!result.done) {
  6509. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  6510. result = iterator.next();
  6511. }
  6512. } else {
  6513. keys = Object.keys(val);
  6514. ret = new Array(keys.length);
  6515. for (i = 0, l = keys.length; i < l; i++) {
  6516. key = keys[i];
  6517. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  6518. }
  6519. }
  6520. }
  6521. if (!isDef(ret)) {
  6522. ret = [];
  6523. }
  6524. (ret)._isVList = true;
  6525. return ret
  6526. }
  6527. /* */
  6528. /**
  6529. * Runtime helper for rendering <slot>
  6530. */
  6531. function renderSlot (
  6532. name,
  6533. fallback,
  6534. props,
  6535. bindObject
  6536. ) {
  6537. var scopedSlotFn = this.$scopedSlots[name];
  6538. var nodes;
  6539. if (scopedSlotFn) { // scoped slot
  6540. props = props || {};
  6541. if (bindObject) {
  6542. if ( true && !isObject(bindObject)) {
  6543. warn(
  6544. 'slot v-bind without argument expects an Object',
  6545. this
  6546. );
  6547. }
  6548. props = extend(extend({}, bindObject), props);
  6549. }
  6550. // fixed by xxxxxx app-plus scopedSlot
  6551. nodes = scopedSlotFn(props, this, props._i) || fallback;
  6552. } else {
  6553. nodes = this.$slots[name] || fallback;
  6554. }
  6555. var target = props && props.slot;
  6556. if (target) {
  6557. return this.$createElement('template', { slot: target }, nodes)
  6558. } else {
  6559. return nodes
  6560. }
  6561. }
  6562. /* */
  6563. /**
  6564. * Runtime helper for resolving filters
  6565. */
  6566. function resolveFilter (id) {
  6567. return resolveAsset(this.$options, 'filters', id, true) || identity
  6568. }
  6569. /* */
  6570. function isKeyNotMatch (expect, actual) {
  6571. if (Array.isArray(expect)) {
  6572. return expect.indexOf(actual) === -1
  6573. } else {
  6574. return expect !== actual
  6575. }
  6576. }
  6577. /**
  6578. * Runtime helper for checking keyCodes from config.
  6579. * exposed as Vue.prototype._k
  6580. * passing in eventKeyName as last argument separately for backwards compat
  6581. */
  6582. function checkKeyCodes (
  6583. eventKeyCode,
  6584. key,
  6585. builtInKeyCode,
  6586. eventKeyName,
  6587. builtInKeyName
  6588. ) {
  6589. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  6590. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  6591. return isKeyNotMatch(builtInKeyName, eventKeyName)
  6592. } else if (mappedKeyCode) {
  6593. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  6594. } else if (eventKeyName) {
  6595. return hyphenate(eventKeyName) !== key
  6596. }
  6597. }
  6598. /* */
  6599. /**
  6600. * Runtime helper for merging v-bind="object" into a VNode's data.
  6601. */
  6602. function bindObjectProps (
  6603. data,
  6604. tag,
  6605. value,
  6606. asProp,
  6607. isSync
  6608. ) {
  6609. if (value) {
  6610. if (!isObject(value)) {
  6611. true && warn(
  6612. 'v-bind without argument expects an Object or Array value',
  6613. this
  6614. );
  6615. } else {
  6616. if (Array.isArray(value)) {
  6617. value = toObject(value);
  6618. }
  6619. var hash;
  6620. var loop = function ( key ) {
  6621. if (
  6622. key === 'class' ||
  6623. key === 'style' ||
  6624. isReservedAttribute(key)
  6625. ) {
  6626. hash = data;
  6627. } else {
  6628. var type = data.attrs && data.attrs.type;
  6629. hash = asProp || config.mustUseProp(tag, type, key)
  6630. ? data.domProps || (data.domProps = {})
  6631. : data.attrs || (data.attrs = {});
  6632. }
  6633. var camelizedKey = camelize(key);
  6634. var hyphenatedKey = hyphenate(key);
  6635. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  6636. hash[key] = value[key];
  6637. if (isSync) {
  6638. var on = data.on || (data.on = {});
  6639. on[("update:" + key)] = function ($event) {
  6640. value[key] = $event;
  6641. };
  6642. }
  6643. }
  6644. };
  6645. for (var key in value) loop( key );
  6646. }
  6647. }
  6648. return data
  6649. }
  6650. /* */
  6651. /**
  6652. * Runtime helper for rendering static trees.
  6653. */
  6654. function renderStatic (
  6655. index,
  6656. isInFor
  6657. ) {
  6658. var cached = this._staticTrees || (this._staticTrees = []);
  6659. var tree = cached[index];
  6660. // if has already-rendered static tree and not inside v-for,
  6661. // we can reuse the same tree.
  6662. if (tree && !isInFor) {
  6663. return tree
  6664. }
  6665. // otherwise, render a fresh tree.
  6666. tree = cached[index] = this.$options.staticRenderFns[index].call(
  6667. this._renderProxy,
  6668. null,
  6669. this // for render fns generated for functional component templates
  6670. );
  6671. markStatic(tree, ("__static__" + index), false);
  6672. return tree
  6673. }
  6674. /**
  6675. * Runtime helper for v-once.
  6676. * Effectively it means marking the node as static with a unique key.
  6677. */
  6678. function markOnce (
  6679. tree,
  6680. index,
  6681. key
  6682. ) {
  6683. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  6684. return tree
  6685. }
  6686. function markStatic (
  6687. tree,
  6688. key,
  6689. isOnce
  6690. ) {
  6691. if (Array.isArray(tree)) {
  6692. for (var i = 0; i < tree.length; i++) {
  6693. if (tree[i] && typeof tree[i] !== 'string') {
  6694. markStaticNode(tree[i], (key + "_" + i), isOnce);
  6695. }
  6696. }
  6697. } else {
  6698. markStaticNode(tree, key, isOnce);
  6699. }
  6700. }
  6701. function markStaticNode (node, key, isOnce) {
  6702. node.isStatic = true;
  6703. node.key = key;
  6704. node.isOnce = isOnce;
  6705. }
  6706. /* */
  6707. function bindObjectListeners (data, value) {
  6708. if (value) {
  6709. if (!isPlainObject(value)) {
  6710. true && warn(
  6711. 'v-on without argument expects an Object value',
  6712. this
  6713. );
  6714. } else {
  6715. var on = data.on = data.on ? extend({}, data.on) : {};
  6716. for (var key in value) {
  6717. var existing = on[key];
  6718. var ours = value[key];
  6719. on[key] = existing ? [].concat(existing, ours) : ours;
  6720. }
  6721. }
  6722. }
  6723. return data
  6724. }
  6725. /* */
  6726. function resolveScopedSlots (
  6727. fns, // see flow/vnode
  6728. res,
  6729. // the following are added in 2.6
  6730. hasDynamicKeys,
  6731. contentHashKey
  6732. ) {
  6733. res = res || { $stable: !hasDynamicKeys };
  6734. for (var i = 0; i < fns.length; i++) {
  6735. var slot = fns[i];
  6736. if (Array.isArray(slot)) {
  6737. resolveScopedSlots(slot, res, hasDynamicKeys);
  6738. } else if (slot) {
  6739. // marker for reverse proxying v-slot without scope on this.$slots
  6740. if (slot.proxy) {
  6741. slot.fn.proxy = true;
  6742. }
  6743. res[slot.key] = slot.fn;
  6744. }
  6745. }
  6746. if (contentHashKey) {
  6747. (res).$key = contentHashKey;
  6748. }
  6749. return res
  6750. }
  6751. /* */
  6752. function bindDynamicKeys (baseObj, values) {
  6753. for (var i = 0; i < values.length; i += 2) {
  6754. var key = values[i];
  6755. if (typeof key === 'string' && key) {
  6756. baseObj[values[i]] = values[i + 1];
  6757. } else if ( true && key !== '' && key !== null) {
  6758. // null is a special value for explicitly removing a binding
  6759. warn(
  6760. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  6761. this
  6762. );
  6763. }
  6764. }
  6765. return baseObj
  6766. }
  6767. // helper to dynamically append modifier runtime markers to event names.
  6768. // ensure only append when value is already string, otherwise it will be cast
  6769. // to string and cause the type check to miss.
  6770. function prependModifier (value, symbol) {
  6771. return typeof value === 'string' ? symbol + value : value
  6772. }
  6773. /* */
  6774. function installRenderHelpers (target) {
  6775. target._o = markOnce;
  6776. target._n = toNumber;
  6777. target._s = toString;
  6778. target._l = renderList;
  6779. target._t = renderSlot;
  6780. target._q = looseEqual;
  6781. target._i = looseIndexOf;
  6782. target._m = renderStatic;
  6783. target._f = resolveFilter;
  6784. target._k = checkKeyCodes;
  6785. target._b = bindObjectProps;
  6786. target._v = createTextVNode;
  6787. target._e = createEmptyVNode;
  6788. target._u = resolveScopedSlots;
  6789. target._g = bindObjectListeners;
  6790. target._d = bindDynamicKeys;
  6791. target._p = prependModifier;
  6792. }
  6793. /* */
  6794. function FunctionalRenderContext (
  6795. data,
  6796. props,
  6797. children,
  6798. parent,
  6799. Ctor
  6800. ) {
  6801. var this$1 = this;
  6802. var options = Ctor.options;
  6803. // ensure the createElement function in functional components
  6804. // gets a unique context - this is necessary for correct named slot check
  6805. var contextVm;
  6806. if (hasOwn(parent, '_uid')) {
  6807. contextVm = Object.create(parent);
  6808. // $flow-disable-line
  6809. contextVm._original = parent;
  6810. } else {
  6811. // the context vm passed in is a functional context as well.
  6812. // in this case we want to make sure we are able to get a hold to the
  6813. // real context instance.
  6814. contextVm = parent;
  6815. // $flow-disable-line
  6816. parent = parent._original;
  6817. }
  6818. var isCompiled = isTrue(options._compiled);
  6819. var needNormalization = !isCompiled;
  6820. this.data = data;
  6821. this.props = props;
  6822. this.children = children;
  6823. this.parent = parent;
  6824. this.listeners = data.on || emptyObject;
  6825. this.injections = resolveInject(options.inject, parent);
  6826. this.slots = function () {
  6827. if (!this$1.$slots) {
  6828. normalizeScopedSlots(
  6829. data.scopedSlots,
  6830. this$1.$slots = resolveSlots(children, parent)
  6831. );
  6832. }
  6833. return this$1.$slots
  6834. };
  6835. Object.defineProperty(this, 'scopedSlots', ({
  6836. enumerable: true,
  6837. get: function get () {
  6838. return normalizeScopedSlots(data.scopedSlots, this.slots())
  6839. }
  6840. }));
  6841. // support for compiled functional template
  6842. if (isCompiled) {
  6843. // exposing $options for renderStatic()
  6844. this.$options = options;
  6845. // pre-resolve slots for renderSlot()
  6846. this.$slots = this.slots();
  6847. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  6848. }
  6849. if (options._scopeId) {
  6850. this._c = function (a, b, c, d) {
  6851. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  6852. if (vnode && !Array.isArray(vnode)) {
  6853. vnode.fnScopeId = options._scopeId;
  6854. vnode.fnContext = parent;
  6855. }
  6856. return vnode
  6857. };
  6858. } else {
  6859. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  6860. }
  6861. }
  6862. installRenderHelpers(FunctionalRenderContext.prototype);
  6863. function createFunctionalComponent (
  6864. Ctor,
  6865. propsData,
  6866. data,
  6867. contextVm,
  6868. children
  6869. ) {
  6870. var options = Ctor.options;
  6871. var props = {};
  6872. var propOptions = options.props;
  6873. if (isDef(propOptions)) {
  6874. for (var key in propOptions) {
  6875. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  6876. }
  6877. } else {
  6878. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  6879. if (isDef(data.props)) { mergeProps(props, data.props); }
  6880. }
  6881. var renderContext = new FunctionalRenderContext(
  6882. data,
  6883. props,
  6884. children,
  6885. contextVm,
  6886. Ctor
  6887. );
  6888. var vnode = options.render.call(null, renderContext._c, renderContext);
  6889. if (vnode instanceof VNode) {
  6890. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  6891. } else if (Array.isArray(vnode)) {
  6892. var vnodes = normalizeChildren(vnode) || [];
  6893. var res = new Array(vnodes.length);
  6894. for (var i = 0; i < vnodes.length; i++) {
  6895. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  6896. }
  6897. return res
  6898. }
  6899. }
  6900. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  6901. // #7817 clone node before setting fnContext, otherwise if the node is reused
  6902. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  6903. // that should not be matched to match.
  6904. var clone = cloneVNode(vnode);
  6905. clone.fnContext = contextVm;
  6906. clone.fnOptions = options;
  6907. if (true) {
  6908. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  6909. }
  6910. if (data.slot) {
  6911. (clone.data || (clone.data = {})).slot = data.slot;
  6912. }
  6913. return clone
  6914. }
  6915. function mergeProps (to, from) {
  6916. for (var key in from) {
  6917. to[camelize(key)] = from[key];
  6918. }
  6919. }
  6920. /* */
  6921. /* */
  6922. /* */
  6923. /* */
  6924. // inline hooks to be invoked on component VNodes during patch
  6925. var componentVNodeHooks = {
  6926. init: function init (vnode, hydrating) {
  6927. if (
  6928. vnode.componentInstance &&
  6929. !vnode.componentInstance._isDestroyed &&
  6930. vnode.data.keepAlive
  6931. ) {
  6932. // kept-alive components, treat as a patch
  6933. var mountedNode = vnode; // work around flow
  6934. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  6935. } else {
  6936. var child = vnode.componentInstance = createComponentInstanceForVnode(
  6937. vnode,
  6938. activeInstance
  6939. );
  6940. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  6941. }
  6942. },
  6943. prepatch: function prepatch (oldVnode, vnode) {
  6944. var options = vnode.componentOptions;
  6945. var child = vnode.componentInstance = oldVnode.componentInstance;
  6946. updateChildComponent(
  6947. child,
  6948. options.propsData, // updated props
  6949. options.listeners, // updated listeners
  6950. vnode, // new parent vnode
  6951. options.children // new children
  6952. );
  6953. },
  6954. insert: function insert (vnode) {
  6955. var context = vnode.context;
  6956. var componentInstance = vnode.componentInstance;
  6957. if (!componentInstance._isMounted) {
  6958. callHook(componentInstance, 'onServiceCreated');
  6959. callHook(componentInstance, 'onServiceAttached');
  6960. componentInstance._isMounted = true;
  6961. callHook(componentInstance, 'mounted');
  6962. }
  6963. if (vnode.data.keepAlive) {
  6964. if (context._isMounted) {
  6965. // vue-router#1212
  6966. // During updates, a kept-alive component's child components may
  6967. // change, so directly walking the tree here may call activated hooks
  6968. // on incorrect children. Instead we push them into a queue which will
  6969. // be processed after the whole patch process ended.
  6970. queueActivatedComponent(componentInstance);
  6971. } else {
  6972. activateChildComponent(componentInstance, true /* direct */);
  6973. }
  6974. }
  6975. },
  6976. destroy: function destroy (vnode) {
  6977. var componentInstance = vnode.componentInstance;
  6978. if (!componentInstance._isDestroyed) {
  6979. if (!vnode.data.keepAlive) {
  6980. componentInstance.$destroy();
  6981. } else {
  6982. deactivateChildComponent(componentInstance, true /* direct */);
  6983. }
  6984. }
  6985. }
  6986. };
  6987. var hooksToMerge = Object.keys(componentVNodeHooks);
  6988. function createComponent (
  6989. Ctor,
  6990. data,
  6991. context,
  6992. children,
  6993. tag
  6994. ) {
  6995. if (isUndef(Ctor)) {
  6996. return
  6997. }
  6998. var baseCtor = context.$options._base;
  6999. // plain options object: turn it into a constructor
  7000. if (isObject(Ctor)) {
  7001. Ctor = baseCtor.extend(Ctor);
  7002. }
  7003. // if at this stage it's not a constructor or an async component factory,
  7004. // reject.
  7005. if (typeof Ctor !== 'function') {
  7006. if (true) {
  7007. warn(("Invalid Component definition: " + (String(Ctor))), context);
  7008. }
  7009. return
  7010. }
  7011. // async component
  7012. var asyncFactory;
  7013. if (isUndef(Ctor.cid)) {
  7014. asyncFactory = Ctor;
  7015. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  7016. if (Ctor === undefined) {
  7017. // return a placeholder node for async component, which is rendered
  7018. // as a comment node but preserves all the raw information for the node.
  7019. // the information will be used for async server-rendering and hydration.
  7020. return createAsyncPlaceholder(
  7021. asyncFactory,
  7022. data,
  7023. context,
  7024. children,
  7025. tag
  7026. )
  7027. }
  7028. }
  7029. data = data || {};
  7030. // resolve constructor options in case global mixins are applied after
  7031. // component constructor creation
  7032. resolveConstructorOptions(Ctor);
  7033. // transform component v-model data into props & events
  7034. if (isDef(data.model)) {
  7035. transformModel(Ctor.options, data);
  7036. }
  7037. // extract props
  7038. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  7039. // functional component
  7040. if (isTrue(Ctor.options.functional)) {
  7041. return createFunctionalComponent(Ctor, propsData, data, context, children)
  7042. }
  7043. // extract listeners, since these needs to be treated as
  7044. // child component listeners instead of DOM listeners
  7045. var listeners = data.on;
  7046. // replace with listeners with .native modifier
  7047. // so it gets processed during parent component patch.
  7048. data.on = data.nativeOn;
  7049. if (isTrue(Ctor.options.abstract)) {
  7050. // abstract components do not keep anything
  7051. // other than props & listeners & slot
  7052. // work around flow
  7053. var slot = data.slot;
  7054. data = {};
  7055. if (slot) {
  7056. data.slot = slot;
  7057. }
  7058. }
  7059. // install component management hooks onto the placeholder node
  7060. installComponentHooks(data);
  7061. // return a placeholder vnode
  7062. var name = Ctor.options.name || tag;
  7063. var vnode = new VNode(
  7064. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  7065. data, undefined, undefined, undefined, context,
  7066. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  7067. asyncFactory
  7068. );
  7069. return vnode
  7070. }
  7071. function createComponentInstanceForVnode (
  7072. vnode, // we know it's MountedComponentVNode but flow doesn't
  7073. parent // activeInstance in lifecycle state
  7074. ) {
  7075. var options = {
  7076. _isComponent: true,
  7077. _parentVnode: vnode,
  7078. parent: parent
  7079. };
  7080. // check inline-template render functions
  7081. var inlineTemplate = vnode.data.inlineTemplate;
  7082. if (isDef(inlineTemplate)) {
  7083. options.render = inlineTemplate.render;
  7084. options.staticRenderFns = inlineTemplate.staticRenderFns;
  7085. }
  7086. return new vnode.componentOptions.Ctor(options)
  7087. }
  7088. function installComponentHooks (data) {
  7089. var hooks = data.hook || (data.hook = {});
  7090. for (var i = 0; i < hooksToMerge.length; i++) {
  7091. var key = hooksToMerge[i];
  7092. var existing = hooks[key];
  7093. var toMerge = componentVNodeHooks[key];
  7094. if (existing !== toMerge && !(existing && existing._merged)) {
  7095. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  7096. }
  7097. }
  7098. }
  7099. function mergeHook$1 (f1, f2) {
  7100. var merged = function (a, b) {
  7101. // flow complains about extra args which is why we use any
  7102. f1(a, b);
  7103. f2(a, b);
  7104. };
  7105. merged._merged = true;
  7106. return merged
  7107. }
  7108. // transform component v-model info (value and callback) into
  7109. // prop and event handler respectively.
  7110. function transformModel (options, data) {
  7111. var prop = (options.model && options.model.prop) || 'value';
  7112. var event = (options.model && options.model.event) || 'input'
  7113. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  7114. var on = data.on || (data.on = {});
  7115. var existing = on[event];
  7116. var callback = data.model.callback;
  7117. if (isDef(existing)) {
  7118. if (
  7119. Array.isArray(existing)
  7120. ? existing.indexOf(callback) === -1
  7121. : existing !== callback
  7122. ) {
  7123. on[event] = [callback].concat(existing);
  7124. }
  7125. } else {
  7126. on[event] = callback;
  7127. }
  7128. }
  7129. /* */
  7130. var SIMPLE_NORMALIZE = 1;
  7131. var ALWAYS_NORMALIZE = 2;
  7132. // wrapper function for providing a more flexible interface
  7133. // without getting yelled at by flow
  7134. function createElement (
  7135. context,
  7136. tag,
  7137. data,
  7138. children,
  7139. normalizationType,
  7140. alwaysNormalize
  7141. ) {
  7142. if (Array.isArray(data) || isPrimitive(data)) {
  7143. normalizationType = children;
  7144. children = data;
  7145. data = undefined;
  7146. }
  7147. if (isTrue(alwaysNormalize)) {
  7148. normalizationType = ALWAYS_NORMALIZE;
  7149. }
  7150. return _createElement(context, tag, data, children, normalizationType)
  7151. }
  7152. function _createElement (
  7153. context,
  7154. tag,
  7155. data,
  7156. children,
  7157. normalizationType
  7158. ) {
  7159. if (isDef(data) && isDef((data).__ob__)) {
  7160. true && warn(
  7161. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  7162. 'Always create fresh vnode data objects in each render!',
  7163. context
  7164. );
  7165. return createEmptyVNode()
  7166. }
  7167. // object syntax in v-bind
  7168. if (isDef(data) && isDef(data.is)) {
  7169. tag = data.is;
  7170. }
  7171. if (!tag) {
  7172. // in case of component :is set to falsy value
  7173. return createEmptyVNode()
  7174. }
  7175. // warn against non-primitive key
  7176. if ( true &&
  7177. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  7178. ) {
  7179. {
  7180. warn(
  7181. 'Avoid using non-primitive value as key, ' +
  7182. 'use string/number value instead.',
  7183. context
  7184. );
  7185. }
  7186. }
  7187. // support single function children as default scoped slot
  7188. if (Array.isArray(children) &&
  7189. typeof children[0] === 'function'
  7190. ) {
  7191. data = data || {};
  7192. data.scopedSlots = { default: children[0] };
  7193. children.length = 0;
  7194. }
  7195. if (normalizationType === ALWAYS_NORMALIZE) {
  7196. children = normalizeChildren(children);
  7197. } else if (normalizationType === SIMPLE_NORMALIZE) {
  7198. children = simpleNormalizeChildren(children);
  7199. }
  7200. var vnode, ns;
  7201. if (typeof tag === 'string') {
  7202. var Ctor;
  7203. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  7204. if (config.isReservedTag(tag)) {
  7205. // platform built-in elements
  7206. if ( true && isDef(data) && isDef(data.nativeOn)) {
  7207. warn(
  7208. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  7209. context
  7210. );
  7211. }
  7212. vnode = new VNode(
  7213. config.parsePlatformTagName(tag), data, children,
  7214. undefined, undefined, context
  7215. );
  7216. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  7217. // component
  7218. vnode = createComponent(Ctor, data, context, children, tag);
  7219. } else {
  7220. // unknown or unlisted namespaced elements
  7221. // check at runtime because it may get assigned a namespace when its
  7222. // parent normalizes children
  7223. vnode = new VNode(
  7224. tag, data, children,
  7225. undefined, undefined, context
  7226. );
  7227. }
  7228. } else {
  7229. // direct component options / constructor
  7230. vnode = createComponent(tag, data, context, children);
  7231. }
  7232. if (Array.isArray(vnode)) {
  7233. return vnode
  7234. } else if (isDef(vnode)) {
  7235. if (isDef(ns)) { applyNS(vnode, ns); }
  7236. if (isDef(data)) { registerDeepBindings(data); }
  7237. return vnode
  7238. } else {
  7239. return createEmptyVNode()
  7240. }
  7241. }
  7242. function applyNS (vnode, ns, force) {
  7243. vnode.ns = ns;
  7244. if (vnode.tag === 'foreignObject') {
  7245. // use default namespace inside foreignObject
  7246. ns = undefined;
  7247. force = true;
  7248. }
  7249. if (isDef(vnode.children)) {
  7250. for (var i = 0, l = vnode.children.length; i < l; i++) {
  7251. var child = vnode.children[i];
  7252. if (isDef(child.tag) && (
  7253. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  7254. applyNS(child, ns, force);
  7255. }
  7256. }
  7257. }
  7258. }
  7259. // ref #5318
  7260. // necessary to ensure parent re-render when deep bindings like :style and
  7261. // :class are used on slot nodes
  7262. function registerDeepBindings (data) {
  7263. if (isObject(data.style)) {
  7264. traverse(data.style);
  7265. }
  7266. if (isObject(data.class)) {
  7267. traverse(data.class);
  7268. }
  7269. }
  7270. /* */
  7271. function initRender (vm) {
  7272. vm._vnode = null; // the root of the child tree
  7273. vm._staticTrees = null; // v-once cached trees
  7274. var options = vm.$options;
  7275. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  7276. var renderContext = parentVnode && parentVnode.context;
  7277. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  7278. vm.$scopedSlots = emptyObject;
  7279. // bind the createElement fn to this instance
  7280. // so that we get proper render context inside it.
  7281. // args order: tag, data, children, normalizationType, alwaysNormalize
  7282. // internal version is used by render functions compiled from templates
  7283. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  7284. // normalization is always applied for the public version, used in
  7285. // user-written render functions.
  7286. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  7287. // $attrs & $listeners are exposed for easier HOC creation.
  7288. // they need to be reactive so that HOCs using them are always updated
  7289. var parentData = parentVnode && parentVnode.data;
  7290. /* istanbul ignore else */
  7291. if (true) {
  7292. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  7293. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  7294. }, true);
  7295. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  7296. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  7297. }, true);
  7298. } else {}
  7299. }
  7300. var currentRenderingInstance = null;
  7301. function renderMixin (Vue) {
  7302. // install runtime convenience helpers
  7303. installRenderHelpers(Vue.prototype);
  7304. Vue.prototype.$nextTick = function (fn) {
  7305. return nextTick(fn, this)
  7306. };
  7307. Vue.prototype._render = function () {
  7308. var vm = this;
  7309. var ref = vm.$options;
  7310. var render = ref.render;
  7311. var _parentVnode = ref._parentVnode;
  7312. if (_parentVnode) {
  7313. vm.$scopedSlots = normalizeScopedSlots(
  7314. _parentVnode.data.scopedSlots,
  7315. vm.$slots,
  7316. vm.$scopedSlots
  7317. );
  7318. }
  7319. // set parent vnode. this allows render functions to have access
  7320. // to the data on the placeholder node.
  7321. vm.$vnode = _parentVnode;
  7322. // render self
  7323. var vnode;
  7324. try {
  7325. // There's no need to maintain a stack because all render fns are called
  7326. // separately from one another. Nested component's render fns are called
  7327. // when parent component is patched.
  7328. currentRenderingInstance = vm;
  7329. vnode = render.call(vm._renderProxy, vm.$createElement);
  7330. } catch (e) {
  7331. handleError(e, vm, "render");
  7332. // return error render result,
  7333. // or previous vnode to prevent render error causing blank component
  7334. /* istanbul ignore else */
  7335. if ( true && vm.$options.renderError) {
  7336. try {
  7337. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  7338. } catch (e) {
  7339. handleError(e, vm, "renderError");
  7340. vnode = vm._vnode;
  7341. }
  7342. } else {
  7343. vnode = vm._vnode;
  7344. }
  7345. } finally {
  7346. currentRenderingInstance = null;
  7347. }
  7348. // if the returned array contains only a single node, allow it
  7349. if (Array.isArray(vnode) && vnode.length === 1) {
  7350. vnode = vnode[0];
  7351. }
  7352. // return empty vnode in case the render function errored out
  7353. if (!(vnode instanceof VNode)) {
  7354. if ( true && Array.isArray(vnode)) {
  7355. warn(
  7356. 'Multiple root nodes returned from render function. Render function ' +
  7357. 'should return a single root node.',
  7358. vm
  7359. );
  7360. }
  7361. vnode = createEmptyVNode();
  7362. }
  7363. // set parent
  7364. vnode.parent = _parentVnode;
  7365. return vnode
  7366. };
  7367. }
  7368. /* */
  7369. function ensureCtor (comp, base) {
  7370. if (
  7371. comp.__esModule ||
  7372. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  7373. ) {
  7374. comp = comp.default;
  7375. }
  7376. return isObject(comp)
  7377. ? base.extend(comp)
  7378. : comp
  7379. }
  7380. function createAsyncPlaceholder (
  7381. factory,
  7382. data,
  7383. context,
  7384. children,
  7385. tag
  7386. ) {
  7387. var node = createEmptyVNode();
  7388. node.asyncFactory = factory;
  7389. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  7390. return node
  7391. }
  7392. function resolveAsyncComponent (
  7393. factory,
  7394. baseCtor
  7395. ) {
  7396. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  7397. return factory.errorComp
  7398. }
  7399. if (isDef(factory.resolved)) {
  7400. return factory.resolved
  7401. }
  7402. var owner = currentRenderingInstance;
  7403. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  7404. // already pending
  7405. factory.owners.push(owner);
  7406. }
  7407. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  7408. return factory.loadingComp
  7409. }
  7410. if (owner && !isDef(factory.owners)) {
  7411. var owners = factory.owners = [owner];
  7412. var sync = true;
  7413. var timerLoading = null;
  7414. var timerTimeout = null
  7415. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  7416. var forceRender = function (renderCompleted) {
  7417. for (var i = 0, l = owners.length; i < l; i++) {
  7418. (owners[i]).$forceUpdate();
  7419. }
  7420. if (renderCompleted) {
  7421. owners.length = 0;
  7422. if (timerLoading !== null) {
  7423. clearTimeout(timerLoading);
  7424. timerLoading = null;
  7425. }
  7426. if (timerTimeout !== null) {
  7427. clearTimeout(timerTimeout);
  7428. timerTimeout = null;
  7429. }
  7430. }
  7431. };
  7432. var resolve = once(function (res) {
  7433. // cache resolved
  7434. factory.resolved = ensureCtor(res, baseCtor);
  7435. // invoke callbacks only if this is not a synchronous resolve
  7436. // (async resolves are shimmed as synchronous during SSR)
  7437. if (!sync) {
  7438. forceRender(true);
  7439. } else {
  7440. owners.length = 0;
  7441. }
  7442. });
  7443. var reject = once(function (reason) {
  7444. true && warn(
  7445. "Failed to resolve async component: " + (String(factory)) +
  7446. (reason ? ("\nReason: " + reason) : '')
  7447. );
  7448. if (isDef(factory.errorComp)) {
  7449. factory.error = true;
  7450. forceRender(true);
  7451. }
  7452. });
  7453. var res = factory(resolve, reject);
  7454. if (isObject(res)) {
  7455. if (isPromise(res)) {
  7456. // () => Promise
  7457. if (isUndef(factory.resolved)) {
  7458. res.then(resolve, reject);
  7459. }
  7460. } else if (isPromise(res.component)) {
  7461. res.component.then(resolve, reject);
  7462. if (isDef(res.error)) {
  7463. factory.errorComp = ensureCtor(res.error, baseCtor);
  7464. }
  7465. if (isDef(res.loading)) {
  7466. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  7467. if (res.delay === 0) {
  7468. factory.loading = true;
  7469. } else {
  7470. timerLoading = setTimeout(function () {
  7471. timerLoading = null;
  7472. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  7473. factory.loading = true;
  7474. forceRender(false);
  7475. }
  7476. }, res.delay || 200);
  7477. }
  7478. }
  7479. if (isDef(res.timeout)) {
  7480. timerTimeout = setTimeout(function () {
  7481. timerTimeout = null;
  7482. if (isUndef(factory.resolved)) {
  7483. reject(
  7484. true
  7485. ? ("timeout (" + (res.timeout) + "ms)")
  7486. : undefined
  7487. );
  7488. }
  7489. }, res.timeout);
  7490. }
  7491. }
  7492. }
  7493. sync = false;
  7494. // return in case resolved synchronously
  7495. return factory.loading
  7496. ? factory.loadingComp
  7497. : factory.resolved
  7498. }
  7499. }
  7500. /* */
  7501. function isAsyncPlaceholder (node) {
  7502. return node.isComment && node.asyncFactory
  7503. }
  7504. /* */
  7505. function getFirstComponentChild (children) {
  7506. if (Array.isArray(children)) {
  7507. for (var i = 0; i < children.length; i++) {
  7508. var c = children[i];
  7509. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  7510. return c
  7511. }
  7512. }
  7513. }
  7514. }
  7515. /* */
  7516. /* */
  7517. function initEvents (vm) {
  7518. vm._events = Object.create(null);
  7519. vm._hasHookEvent = false;
  7520. // init parent attached events
  7521. var listeners = vm.$options._parentListeners;
  7522. if (listeners) {
  7523. updateComponentListeners(vm, listeners);
  7524. }
  7525. }
  7526. var target;
  7527. function add (event, fn) {
  7528. target.$on(event, fn);
  7529. }
  7530. function remove$1 (event, fn) {
  7531. target.$off(event, fn);
  7532. }
  7533. function createOnceHandler (event, fn) {
  7534. var _target = target;
  7535. return function onceHandler () {
  7536. var res = fn.apply(null, arguments);
  7537. if (res !== null) {
  7538. _target.$off(event, onceHandler);
  7539. }
  7540. }
  7541. }
  7542. function updateComponentListeners (
  7543. vm,
  7544. listeners,
  7545. oldListeners
  7546. ) {
  7547. target = vm;
  7548. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  7549. target = undefined;
  7550. }
  7551. function eventsMixin (Vue) {
  7552. var hookRE = /^hook:/;
  7553. Vue.prototype.$on = function (event, fn) {
  7554. var vm = this;
  7555. if (Array.isArray(event)) {
  7556. for (var i = 0, l = event.length; i < l; i++) {
  7557. vm.$on(event[i], fn);
  7558. }
  7559. } else {
  7560. (vm._events[event] || (vm._events[event] = [])).push(fn);
  7561. // optimize hook:event cost by using a boolean flag marked at registration
  7562. // instead of a hash lookup
  7563. if (hookRE.test(event)) {
  7564. vm._hasHookEvent = true;
  7565. }
  7566. }
  7567. return vm
  7568. };
  7569. Vue.prototype.$once = function (event, fn) {
  7570. var vm = this;
  7571. function on () {
  7572. vm.$off(event, on);
  7573. fn.apply(vm, arguments);
  7574. }
  7575. on.fn = fn;
  7576. vm.$on(event, on);
  7577. return vm
  7578. };
  7579. Vue.prototype.$off = function (event, fn) {
  7580. var vm = this;
  7581. // all
  7582. if (!arguments.length) {
  7583. vm._events = Object.create(null);
  7584. return vm
  7585. }
  7586. // array of events
  7587. if (Array.isArray(event)) {
  7588. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  7589. vm.$off(event[i$1], fn);
  7590. }
  7591. return vm
  7592. }
  7593. // specific event
  7594. var cbs = vm._events[event];
  7595. if (!cbs) {
  7596. return vm
  7597. }
  7598. if (!fn) {
  7599. vm._events[event] = null;
  7600. return vm
  7601. }
  7602. // specific handler
  7603. var cb;
  7604. var i = cbs.length;
  7605. while (i--) {
  7606. cb = cbs[i];
  7607. if (cb === fn || cb.fn === fn) {
  7608. cbs.splice(i, 1);
  7609. break
  7610. }
  7611. }
  7612. return vm
  7613. };
  7614. Vue.prototype.$emit = function (event) {
  7615. var vm = this;
  7616. if (true) {
  7617. var lowerCaseEvent = event.toLowerCase();
  7618. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  7619. tip(
  7620. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  7621. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  7622. "Note that HTML attributes are case-insensitive and you cannot use " +
  7623. "v-on to listen to camelCase events when using in-DOM templates. " +
  7624. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  7625. );
  7626. }
  7627. }
  7628. var cbs = vm._events[event];
  7629. if (cbs) {
  7630. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  7631. var args = toArray(arguments, 1);
  7632. var info = "event handler for \"" + event + "\"";
  7633. for (var i = 0, l = cbs.length; i < l; i++) {
  7634. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  7635. }
  7636. }
  7637. return vm
  7638. };
  7639. }
  7640. /* */
  7641. var activeInstance = null;
  7642. var isUpdatingChildComponent = false;
  7643. function setActiveInstance(vm) {
  7644. var prevActiveInstance = activeInstance;
  7645. activeInstance = vm;
  7646. return function () {
  7647. activeInstance = prevActiveInstance;
  7648. }
  7649. }
  7650. function initLifecycle (vm) {
  7651. var options = vm.$options;
  7652. // locate first non-abstract parent
  7653. var parent = options.parent;
  7654. if (parent && !options.abstract) {
  7655. while (parent.$options.abstract && parent.$parent) {
  7656. parent = parent.$parent;
  7657. }
  7658. parent.$children.push(vm);
  7659. }
  7660. vm.$parent = parent;
  7661. vm.$root = parent ? parent.$root : vm;
  7662. vm.$children = [];
  7663. vm.$refs = {};
  7664. vm._watcher = null;
  7665. vm._inactive = null;
  7666. vm._directInactive = false;
  7667. vm._isMounted = false;
  7668. vm._isDestroyed = false;
  7669. vm._isBeingDestroyed = false;
  7670. }
  7671. function lifecycleMixin (Vue) {
  7672. Vue.prototype._update = function (vnode, hydrating) {
  7673. var vm = this;
  7674. var prevEl = vm.$el;
  7675. var prevVnode = vm._vnode;
  7676. var restoreActiveInstance = setActiveInstance(vm);
  7677. vm._vnode = vnode;
  7678. // Vue.prototype.__patch__ is injected in entry points
  7679. // based on the rendering backend used.
  7680. if (!prevVnode) {
  7681. // initial render
  7682. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  7683. } else {
  7684. // updates
  7685. vm.$el = vm.__patch__(prevVnode, vnode);
  7686. }
  7687. restoreActiveInstance();
  7688. // update __vue__ reference
  7689. if (prevEl) {
  7690. prevEl.__vue__ = null;
  7691. }
  7692. if (vm.$el) {
  7693. vm.$el.__vue__ = vm;
  7694. }
  7695. // if parent is an HOC, update its $el as well
  7696. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  7697. vm.$parent.$el = vm.$el;
  7698. }
  7699. // updated hook is called by the scheduler to ensure that children are
  7700. // updated in a parent's updated hook.
  7701. };
  7702. Vue.prototype.$forceUpdate = function () {
  7703. var vm = this;
  7704. if (vm._watcher) {
  7705. vm._watcher.update();
  7706. }
  7707. };
  7708. Vue.prototype.$destroy = function () {
  7709. var vm = this;
  7710. if (vm._isBeingDestroyed) {
  7711. return
  7712. }
  7713. callHook(vm, 'beforeDestroy');
  7714. vm._isBeingDestroyed = true;
  7715. // remove self from parent
  7716. var parent = vm.$parent;
  7717. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  7718. remove(parent.$children, vm);
  7719. }
  7720. // teardown watchers
  7721. if (vm._watcher) {
  7722. vm._watcher.teardown();
  7723. }
  7724. var i = vm._watchers.length;
  7725. while (i--) {
  7726. vm._watchers[i].teardown();
  7727. }
  7728. // remove reference from data ob
  7729. // frozen object may not have observer.
  7730. if (vm._data.__ob__) {
  7731. vm._data.__ob__.vmCount--;
  7732. }
  7733. // call the last hook...
  7734. vm._isDestroyed = true;
  7735. // invoke destroy hooks on current rendered tree
  7736. vm.__patch__(vm._vnode, null);
  7737. // fire destroyed hook
  7738. callHook(vm, 'destroyed');
  7739. // turn off all instance listeners.
  7740. vm.$off();
  7741. // remove __vue__ reference
  7742. if (vm.$el) {
  7743. vm.$el.__vue__ = null;
  7744. }
  7745. // release circular reference (#6759)
  7746. if (vm.$vnode) {
  7747. vm.$vnode.parent = null;
  7748. }
  7749. };
  7750. }
  7751. function updateChildComponent (
  7752. vm,
  7753. propsData,
  7754. listeners,
  7755. parentVnode,
  7756. renderChildren
  7757. ) {
  7758. if (true) {
  7759. isUpdatingChildComponent = true;
  7760. }
  7761. // determine whether component has slot children
  7762. // we need to do this before overwriting $options._renderChildren.
  7763. // check if there are dynamic scopedSlots (hand-written or compiled but with
  7764. // dynamic slot names). Static scoped slots compiled from template has the
  7765. // "$stable" marker.
  7766. var newScopedSlots = parentVnode.data.scopedSlots;
  7767. var oldScopedSlots = vm.$scopedSlots;
  7768. var hasDynamicScopedSlot = !!(
  7769. (newScopedSlots && !newScopedSlots.$stable) ||
  7770. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  7771. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  7772. );
  7773. // Any static slot children from the parent may have changed during parent's
  7774. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  7775. // update is necessary to ensure correctness.
  7776. var needsForceUpdate = !!(
  7777. renderChildren || // has new static slots
  7778. vm.$options._renderChildren || // has old static slots
  7779. hasDynamicScopedSlot
  7780. );
  7781. vm.$options._parentVnode = parentVnode;
  7782. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  7783. if (vm._vnode) { // update child tree's parent
  7784. vm._vnode.parent = parentVnode;
  7785. }
  7786. vm.$options._renderChildren = renderChildren;
  7787. // update $attrs and $listeners hash
  7788. // these are also reactive so they may trigger child update if the child
  7789. // used them during render
  7790. vm.$attrs = parentVnode.data.attrs || emptyObject;
  7791. vm.$listeners = listeners || emptyObject;
  7792. // update props
  7793. if (propsData && vm.$options.props) {
  7794. toggleObserving(false);
  7795. var props = vm._props;
  7796. var propKeys = vm.$options._propKeys || [];
  7797. for (var i = 0; i < propKeys.length; i++) {
  7798. var key = propKeys[i];
  7799. var propOptions = vm.$options.props; // wtf flow?
  7800. props[key] = validateProp(key, propOptions, propsData, vm);
  7801. }
  7802. toggleObserving(true);
  7803. // keep a copy of raw propsData
  7804. vm.$options.propsData = propsData;
  7805. }
  7806. // fixed by xxxxxx update properties(mp runtime)
  7807. vm._$updateProperties && vm._$updateProperties(vm);
  7808. // update listeners
  7809. listeners = listeners || emptyObject;
  7810. var oldListeners = vm.$options._parentListeners;
  7811. vm.$options._parentListeners = listeners;
  7812. updateComponentListeners(vm, listeners, oldListeners);
  7813. // resolve slots + force update if has children
  7814. if (needsForceUpdate) {
  7815. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  7816. vm.$forceUpdate();
  7817. }
  7818. if (true) {
  7819. isUpdatingChildComponent = false;
  7820. }
  7821. }
  7822. function isInInactiveTree (vm) {
  7823. while (vm && (vm = vm.$parent)) {
  7824. if (vm._inactive) { return true }
  7825. }
  7826. return false
  7827. }
  7828. function activateChildComponent (vm, direct) {
  7829. if (direct) {
  7830. vm._directInactive = false;
  7831. if (isInInactiveTree(vm)) {
  7832. return
  7833. }
  7834. } else if (vm._directInactive) {
  7835. return
  7836. }
  7837. if (vm._inactive || vm._inactive === null) {
  7838. vm._inactive = false;
  7839. for (var i = 0; i < vm.$children.length; i++) {
  7840. activateChildComponent(vm.$children[i]);
  7841. }
  7842. callHook(vm, 'activated');
  7843. }
  7844. }
  7845. function deactivateChildComponent (vm, direct) {
  7846. if (direct) {
  7847. vm._directInactive = true;
  7848. if (isInInactiveTree(vm)) {
  7849. return
  7850. }
  7851. }
  7852. if (!vm._inactive) {
  7853. vm._inactive = true;
  7854. for (var i = 0; i < vm.$children.length; i++) {
  7855. deactivateChildComponent(vm.$children[i]);
  7856. }
  7857. callHook(vm, 'deactivated');
  7858. }
  7859. }
  7860. function callHook (vm, hook) {
  7861. // #7573 disable dep collection when invoking lifecycle hooks
  7862. pushTarget();
  7863. var handlers = vm.$options[hook];
  7864. var info = hook + " hook";
  7865. if (handlers) {
  7866. for (var i = 0, j = handlers.length; i < j; i++) {
  7867. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  7868. }
  7869. }
  7870. if (vm._hasHookEvent) {
  7871. vm.$emit('hook:' + hook);
  7872. }
  7873. popTarget();
  7874. }
  7875. /* */
  7876. var MAX_UPDATE_COUNT = 100;
  7877. var queue = [];
  7878. var activatedChildren = [];
  7879. var has = {};
  7880. var circular = {};
  7881. var waiting = false;
  7882. var flushing = false;
  7883. var index = 0;
  7884. /**
  7885. * Reset the scheduler's state.
  7886. */
  7887. function resetSchedulerState () {
  7888. index = queue.length = activatedChildren.length = 0;
  7889. has = {};
  7890. if (true) {
  7891. circular = {};
  7892. }
  7893. waiting = flushing = false;
  7894. }
  7895. // Async edge case #6566 requires saving the timestamp when event listeners are
  7896. // attached. However, calling performance.now() has a perf overhead especially
  7897. // if the page has thousands of event listeners. Instead, we take a timestamp
  7898. // every time the scheduler flushes and use that for all event listeners
  7899. // attached during that flush.
  7900. var currentFlushTimestamp = 0;
  7901. // Async edge case fix requires storing an event listener's attach timestamp.
  7902. var getNow = Date.now;
  7903. // Determine what event timestamp the browser is using. Annoyingly, the
  7904. // timestamp can either be hi-res (relative to page load) or low-res
  7905. // (relative to UNIX epoch), so in order to compare time we have to use the
  7906. // same timestamp type when saving the flush timestamp.
  7907. // All IE versions use low-res event timestamps, and have problematic clock
  7908. // implementations (#9632)
  7909. if (inBrowser && !isIE) {
  7910. var performance = window.performance;
  7911. if (
  7912. performance &&
  7913. typeof performance.now === 'function' &&
  7914. getNow() > document.createEvent('Event').timeStamp
  7915. ) {
  7916. // if the event timestamp, although evaluated AFTER the Date.now(), is
  7917. // smaller than it, it means the event is using a hi-res timestamp,
  7918. // and we need to use the hi-res version for event listener timestamps as
  7919. // well.
  7920. getNow = function () { return performance.now(); };
  7921. }
  7922. }
  7923. /**
  7924. * Flush both queues and run the watchers.
  7925. */
  7926. function flushSchedulerQueue () {
  7927. currentFlushTimestamp = getNow();
  7928. flushing = true;
  7929. var watcher, id;
  7930. // Sort queue before flush.
  7931. // This ensures that:
  7932. // 1. Components are updated from parent to child. (because parent is always
  7933. // created before the child)
  7934. // 2. A component's user watchers are run before its render watcher (because
  7935. // user watchers are created before the render watcher)
  7936. // 3. If a component is destroyed during a parent component's watcher run,
  7937. // its watchers can be skipped.
  7938. queue.sort(function (a, b) { return a.id - b.id; });
  7939. // do not cache length because more watchers might be pushed
  7940. // as we run existing watchers
  7941. for (index = 0; index < queue.length; index++) {
  7942. watcher = queue[index];
  7943. if (watcher.before) {
  7944. watcher.before();
  7945. }
  7946. id = watcher.id;
  7947. has[id] = null;
  7948. watcher.run();
  7949. // in dev build, check and stop circular updates.
  7950. if ( true && has[id] != null) {
  7951. circular[id] = (circular[id] || 0) + 1;
  7952. if (circular[id] > MAX_UPDATE_COUNT) {
  7953. warn(
  7954. 'You may have an infinite update loop ' + (
  7955. watcher.user
  7956. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  7957. : "in a component render function."
  7958. ),
  7959. watcher.vm
  7960. );
  7961. break
  7962. }
  7963. }
  7964. }
  7965. // keep copies of post queues before resetting state
  7966. var activatedQueue = activatedChildren.slice();
  7967. var updatedQueue = queue.slice();
  7968. resetSchedulerState();
  7969. // call component updated and activated hooks
  7970. callActivatedHooks(activatedQueue);
  7971. callUpdatedHooks(updatedQueue);
  7972. // devtool hook
  7973. /* istanbul ignore if */
  7974. if (devtools && config.devtools) {
  7975. devtools.emit('flush');
  7976. }
  7977. }
  7978. function callUpdatedHooks (queue) {
  7979. var i = queue.length;
  7980. while (i--) {
  7981. var watcher = queue[i];
  7982. var vm = watcher.vm;
  7983. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  7984. callHook(vm, 'updated');
  7985. }
  7986. }
  7987. }
  7988. /**
  7989. * Queue a kept-alive component that was activated during patch.
  7990. * The queue will be processed after the entire tree has been patched.
  7991. */
  7992. function queueActivatedComponent (vm) {
  7993. // setting _inactive to false here so that a render function can
  7994. // rely on checking whether it's in an inactive tree (e.g. router-view)
  7995. vm._inactive = false;
  7996. activatedChildren.push(vm);
  7997. }
  7998. function callActivatedHooks (queue) {
  7999. for (var i = 0; i < queue.length; i++) {
  8000. queue[i]._inactive = true;
  8001. activateChildComponent(queue[i], true /* true */);
  8002. }
  8003. }
  8004. /**
  8005. * Push a watcher into the watcher queue.
  8006. * Jobs with duplicate IDs will be skipped unless it's
  8007. * pushed when the queue is being flushed.
  8008. */
  8009. function queueWatcher (watcher) {
  8010. var id = watcher.id;
  8011. if (has[id] == null) {
  8012. has[id] = true;
  8013. if (!flushing) {
  8014. queue.push(watcher);
  8015. } else {
  8016. // if already flushing, splice the watcher based on its id
  8017. // if already past its id, it will be run next immediately.
  8018. var i = queue.length - 1;
  8019. while (i > index && queue[i].id > watcher.id) {
  8020. i--;
  8021. }
  8022. queue.splice(i + 1, 0, watcher);
  8023. }
  8024. // queue the flush
  8025. if (!waiting) {
  8026. waiting = true;
  8027. if ( true && !config.async) {
  8028. flushSchedulerQueue();
  8029. return
  8030. }
  8031. nextTick(flushSchedulerQueue);
  8032. }
  8033. }
  8034. }
  8035. /* */
  8036. var uid$2 = 0;
  8037. /**
  8038. * A watcher parses an expression, collects dependencies,
  8039. * and fires callback when the expression value changes.
  8040. * This is used for both the $watch() api and directives.
  8041. */
  8042. var Watcher = function Watcher (
  8043. vm,
  8044. expOrFn,
  8045. cb,
  8046. options,
  8047. isRenderWatcher
  8048. ) {
  8049. this.vm = vm;
  8050. if (isRenderWatcher) {
  8051. vm._watcher = this;
  8052. }
  8053. vm._watchers.push(this);
  8054. // options
  8055. if (options) {
  8056. this.deep = !!options.deep;
  8057. this.user = !!options.user;
  8058. this.lazy = !!options.lazy;
  8059. this.sync = !!options.sync;
  8060. this.before = options.before;
  8061. } else {
  8062. this.deep = this.user = this.lazy = this.sync = false;
  8063. }
  8064. this.cb = cb;
  8065. this.id = ++uid$2; // uid for batching
  8066. this.active = true;
  8067. this.dirty = this.lazy; // for lazy watchers
  8068. this.deps = [];
  8069. this.newDeps = [];
  8070. this.depIds = new _Set();
  8071. this.newDepIds = new _Set();
  8072. this.expression = true
  8073. ? expOrFn.toString()
  8074. : undefined;
  8075. // parse expression for getter
  8076. if (typeof expOrFn === 'function') {
  8077. this.getter = expOrFn;
  8078. } else {
  8079. this.getter = parsePath(expOrFn);
  8080. if (!this.getter) {
  8081. this.getter = noop;
  8082. true && warn(
  8083. "Failed watching path: \"" + expOrFn + "\" " +
  8084. 'Watcher only accepts simple dot-delimited paths. ' +
  8085. 'For full control, use a function instead.',
  8086. vm
  8087. );
  8088. }
  8089. }
  8090. this.value = this.lazy
  8091. ? undefined
  8092. : this.get();
  8093. };
  8094. /**
  8095. * Evaluate the getter, and re-collect dependencies.
  8096. */
  8097. Watcher.prototype.get = function get () {
  8098. pushTarget(this);
  8099. var value;
  8100. var vm = this.vm;
  8101. try {
  8102. value = this.getter.call(vm, vm);
  8103. } catch (e) {
  8104. if (this.user) {
  8105. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  8106. } else {
  8107. throw e
  8108. }
  8109. } finally {
  8110. // "touch" every property so they are all tracked as
  8111. // dependencies for deep watching
  8112. if (this.deep) {
  8113. traverse(value);
  8114. }
  8115. popTarget();
  8116. this.cleanupDeps();
  8117. }
  8118. return value
  8119. };
  8120. /**
  8121. * Add a dependency to this directive.
  8122. */
  8123. Watcher.prototype.addDep = function addDep (dep) {
  8124. var id = dep.id;
  8125. if (!this.newDepIds.has(id)) {
  8126. this.newDepIds.add(id);
  8127. this.newDeps.push(dep);
  8128. if (!this.depIds.has(id)) {
  8129. dep.addSub(this);
  8130. }
  8131. }
  8132. };
  8133. /**
  8134. * Clean up for dependency collection.
  8135. */
  8136. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  8137. var i = this.deps.length;
  8138. while (i--) {
  8139. var dep = this.deps[i];
  8140. if (!this.newDepIds.has(dep.id)) {
  8141. dep.removeSub(this);
  8142. }
  8143. }
  8144. var tmp = this.depIds;
  8145. this.depIds = this.newDepIds;
  8146. this.newDepIds = tmp;
  8147. this.newDepIds.clear();
  8148. tmp = this.deps;
  8149. this.deps = this.newDeps;
  8150. this.newDeps = tmp;
  8151. this.newDeps.length = 0;
  8152. };
  8153. /**
  8154. * Subscriber interface.
  8155. * Will be called when a dependency changes.
  8156. */
  8157. Watcher.prototype.update = function update () {
  8158. /* istanbul ignore else */
  8159. if (this.lazy) {
  8160. this.dirty = true;
  8161. } else if (this.sync) {
  8162. this.run();
  8163. } else {
  8164. queueWatcher(this);
  8165. }
  8166. };
  8167. /**
  8168. * Scheduler job interface.
  8169. * Will be called by the scheduler.
  8170. */
  8171. Watcher.prototype.run = function run () {
  8172. if (this.active) {
  8173. var value = this.get();
  8174. if (
  8175. value !== this.value ||
  8176. // Deep watchers and watchers on Object/Arrays should fire even
  8177. // when the value is the same, because the value may
  8178. // have mutated.
  8179. isObject(value) ||
  8180. this.deep
  8181. ) {
  8182. // set new value
  8183. var oldValue = this.value;
  8184. this.value = value;
  8185. if (this.user) {
  8186. try {
  8187. this.cb.call(this.vm, value, oldValue);
  8188. } catch (e) {
  8189. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  8190. }
  8191. } else {
  8192. this.cb.call(this.vm, value, oldValue);
  8193. }
  8194. }
  8195. }
  8196. };
  8197. /**
  8198. * Evaluate the value of the watcher.
  8199. * This only gets called for lazy watchers.
  8200. */
  8201. Watcher.prototype.evaluate = function evaluate () {
  8202. this.value = this.get();
  8203. this.dirty = false;
  8204. };
  8205. /**
  8206. * Depend on all deps collected by this watcher.
  8207. */
  8208. Watcher.prototype.depend = function depend () {
  8209. var i = this.deps.length;
  8210. while (i--) {
  8211. this.deps[i].depend();
  8212. }
  8213. };
  8214. /**
  8215. * Remove self from all dependencies' subscriber list.
  8216. */
  8217. Watcher.prototype.teardown = function teardown () {
  8218. if (this.active) {
  8219. // remove self from vm's watcher list
  8220. // this is a somewhat expensive operation so we skip it
  8221. // if the vm is being destroyed.
  8222. if (!this.vm._isBeingDestroyed) {
  8223. remove(this.vm._watchers, this);
  8224. }
  8225. var i = this.deps.length;
  8226. while (i--) {
  8227. this.deps[i].removeSub(this);
  8228. }
  8229. this.active = false;
  8230. }
  8231. };
  8232. /* */
  8233. var sharedPropertyDefinition = {
  8234. enumerable: true,
  8235. configurable: true,
  8236. get: noop,
  8237. set: noop
  8238. };
  8239. function proxy (target, sourceKey, key) {
  8240. sharedPropertyDefinition.get = function proxyGetter () {
  8241. return this[sourceKey][key]
  8242. };
  8243. sharedPropertyDefinition.set = function proxySetter (val) {
  8244. this[sourceKey][key] = val;
  8245. };
  8246. Object.defineProperty(target, key, sharedPropertyDefinition);
  8247. }
  8248. function initState (vm) {
  8249. vm._watchers = [];
  8250. var opts = vm.$options;
  8251. if (opts.props) { initProps(vm, opts.props); }
  8252. if (opts.methods) { initMethods(vm, opts.methods); }
  8253. if (opts.data) {
  8254. initData(vm);
  8255. } else {
  8256. observe(vm._data = {}, true /* asRootData */);
  8257. }
  8258. if (opts.computed) { initComputed(vm, opts.computed); }
  8259. if (opts.watch && opts.watch !== nativeWatch) {
  8260. initWatch(vm, opts.watch);
  8261. }
  8262. }
  8263. function initProps (vm, propsOptions) {
  8264. var propsData = vm.$options.propsData || {};
  8265. var props = vm._props = {};
  8266. // cache prop keys so that future props updates can iterate using Array
  8267. // instead of dynamic object key enumeration.
  8268. var keys = vm.$options._propKeys = [];
  8269. var isRoot = !vm.$parent;
  8270. // root instance props should be converted
  8271. if (!isRoot) {
  8272. toggleObserving(false);
  8273. }
  8274. var loop = function ( key ) {
  8275. keys.push(key);
  8276. var value = validateProp(key, propsOptions, propsData, vm);
  8277. /* istanbul ignore else */
  8278. if (true) {
  8279. var hyphenatedKey = hyphenate(key);
  8280. if (isReservedAttribute(hyphenatedKey) ||
  8281. config.isReservedAttr(hyphenatedKey)) {
  8282. warn(
  8283. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  8284. vm
  8285. );
  8286. }
  8287. defineReactive$$1(props, key, value, function () {
  8288. if (!isRoot && !isUpdatingChildComponent) {
  8289. {
  8290. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou'){//百度、快手 observer 在 setData callback 之后触发,直接忽略该 warn
  8291. return
  8292. }
  8293. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  8294. if(
  8295. key === 'value' &&
  8296. Array.isArray(vm.$options.behaviors) &&
  8297. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  8298. ){
  8299. return
  8300. }
  8301. if(vm._getFormData){
  8302. return
  8303. }
  8304. var $parent = vm.$parent;
  8305. while($parent){
  8306. if($parent.__next_tick_pending){
  8307. return
  8308. }
  8309. $parent = $parent.$parent;
  8310. }
  8311. }
  8312. warn(
  8313. "Avoid mutating a prop directly since the value will be " +
  8314. "overwritten whenever the parent component re-renders. " +
  8315. "Instead, use a data or computed property based on the prop's " +
  8316. "value. Prop being mutated: \"" + key + "\"",
  8317. vm
  8318. );
  8319. }
  8320. });
  8321. } else {}
  8322. // static props are already proxied on the component's prototype
  8323. // during Vue.extend(). We only need to proxy props defined at
  8324. // instantiation here.
  8325. if (!(key in vm)) {
  8326. proxy(vm, "_props", key);
  8327. }
  8328. };
  8329. for (var key in propsOptions) loop( key );
  8330. toggleObserving(true);
  8331. }
  8332. function initData (vm) {
  8333. var data = vm.$options.data;
  8334. data = vm._data = typeof data === 'function'
  8335. ? getData(data, vm)
  8336. : data || {};
  8337. if (!isPlainObject(data)) {
  8338. data = {};
  8339. true && warn(
  8340. 'data functions should return an object:\n' +
  8341. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  8342. vm
  8343. );
  8344. }
  8345. // proxy data on instance
  8346. var keys = Object.keys(data);
  8347. var props = vm.$options.props;
  8348. var methods = vm.$options.methods;
  8349. var i = keys.length;
  8350. while (i--) {
  8351. var key = keys[i];
  8352. if (true) {
  8353. if (methods && hasOwn(methods, key)) {
  8354. warn(
  8355. ("Method \"" + key + "\" has already been defined as a data property."),
  8356. vm
  8357. );
  8358. }
  8359. }
  8360. if (props && hasOwn(props, key)) {
  8361. true && warn(
  8362. "The data property \"" + key + "\" is already declared as a prop. " +
  8363. "Use prop default value instead.",
  8364. vm
  8365. );
  8366. } else if (!isReserved(key)) {
  8367. proxy(vm, "_data", key);
  8368. }
  8369. }
  8370. // observe data
  8371. observe(data, true /* asRootData */);
  8372. }
  8373. function getData (data, vm) {
  8374. // #7573 disable dep collection when invoking data getters
  8375. pushTarget();
  8376. try {
  8377. return data.call(vm, vm)
  8378. } catch (e) {
  8379. handleError(e, vm, "data()");
  8380. return {}
  8381. } finally {
  8382. popTarget();
  8383. }
  8384. }
  8385. var computedWatcherOptions = { lazy: true };
  8386. function initComputed (vm, computed) {
  8387. // $flow-disable-line
  8388. var watchers = vm._computedWatchers = Object.create(null);
  8389. // computed properties are just getters during SSR
  8390. var isSSR = isServerRendering();
  8391. for (var key in computed) {
  8392. var userDef = computed[key];
  8393. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  8394. if ( true && getter == null) {
  8395. warn(
  8396. ("Getter is missing for computed property \"" + key + "\"."),
  8397. vm
  8398. );
  8399. }
  8400. if (!isSSR) {
  8401. // create internal watcher for the computed property.
  8402. watchers[key] = new Watcher(
  8403. vm,
  8404. getter || noop,
  8405. noop,
  8406. computedWatcherOptions
  8407. );
  8408. }
  8409. // component-defined computed properties are already defined on the
  8410. // component prototype. We only need to define computed properties defined
  8411. // at instantiation here.
  8412. if (!(key in vm)) {
  8413. defineComputed(vm, key, userDef);
  8414. } else if (true) {
  8415. if (key in vm.$data) {
  8416. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  8417. } else if (vm.$options.props && key in vm.$options.props) {
  8418. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  8419. }
  8420. }
  8421. }
  8422. }
  8423. function defineComputed (
  8424. target,
  8425. key,
  8426. userDef
  8427. ) {
  8428. var shouldCache = !isServerRendering();
  8429. if (typeof userDef === 'function') {
  8430. sharedPropertyDefinition.get = shouldCache
  8431. ? createComputedGetter(key)
  8432. : createGetterInvoker(userDef);
  8433. sharedPropertyDefinition.set = noop;
  8434. } else {
  8435. sharedPropertyDefinition.get = userDef.get
  8436. ? shouldCache && userDef.cache !== false
  8437. ? createComputedGetter(key)
  8438. : createGetterInvoker(userDef.get)
  8439. : noop;
  8440. sharedPropertyDefinition.set = userDef.set || noop;
  8441. }
  8442. if ( true &&
  8443. sharedPropertyDefinition.set === noop) {
  8444. sharedPropertyDefinition.set = function () {
  8445. warn(
  8446. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  8447. this
  8448. );
  8449. };
  8450. }
  8451. Object.defineProperty(target, key, sharedPropertyDefinition);
  8452. }
  8453. function createComputedGetter (key) {
  8454. return function computedGetter () {
  8455. var watcher = this._computedWatchers && this._computedWatchers[key];
  8456. if (watcher) {
  8457. if (watcher.dirty) {
  8458. watcher.evaluate();
  8459. }
  8460. if (Dep.SharedObject.target) {// fixed by xxxxxx
  8461. watcher.depend();
  8462. }
  8463. return watcher.value
  8464. }
  8465. }
  8466. }
  8467. function createGetterInvoker(fn) {
  8468. return function computedGetter () {
  8469. return fn.call(this, this)
  8470. }
  8471. }
  8472. function initMethods (vm, methods) {
  8473. var props = vm.$options.props;
  8474. for (var key in methods) {
  8475. if (true) {
  8476. if (typeof methods[key] !== 'function') {
  8477. warn(
  8478. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  8479. "Did you reference the function correctly?",
  8480. vm
  8481. );
  8482. }
  8483. if (props && hasOwn(props, key)) {
  8484. warn(
  8485. ("Method \"" + key + "\" has already been defined as a prop."),
  8486. vm
  8487. );
  8488. }
  8489. if ((key in vm) && isReserved(key)) {
  8490. warn(
  8491. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  8492. "Avoid defining component methods that start with _ or $."
  8493. );
  8494. }
  8495. }
  8496. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  8497. }
  8498. }
  8499. function initWatch (vm, watch) {
  8500. for (var key in watch) {
  8501. var handler = watch[key];
  8502. if (Array.isArray(handler)) {
  8503. for (var i = 0; i < handler.length; i++) {
  8504. createWatcher(vm, key, handler[i]);
  8505. }
  8506. } else {
  8507. createWatcher(vm, key, handler);
  8508. }
  8509. }
  8510. }
  8511. function createWatcher (
  8512. vm,
  8513. expOrFn,
  8514. handler,
  8515. options
  8516. ) {
  8517. if (isPlainObject(handler)) {
  8518. options = handler;
  8519. handler = handler.handler;
  8520. }
  8521. if (typeof handler === 'string') {
  8522. handler = vm[handler];
  8523. }
  8524. return vm.$watch(expOrFn, handler, options)
  8525. }
  8526. function stateMixin (Vue) {
  8527. // flow somehow has problems with directly declared definition object
  8528. // when using Object.defineProperty, so we have to procedurally build up
  8529. // the object here.
  8530. var dataDef = {};
  8531. dataDef.get = function () { return this._data };
  8532. var propsDef = {};
  8533. propsDef.get = function () { return this._props };
  8534. if (true) {
  8535. dataDef.set = function () {
  8536. warn(
  8537. 'Avoid replacing instance root $data. ' +
  8538. 'Use nested data properties instead.',
  8539. this
  8540. );
  8541. };
  8542. propsDef.set = function () {
  8543. warn("$props is readonly.", this);
  8544. };
  8545. }
  8546. Object.defineProperty(Vue.prototype, '$data', dataDef);
  8547. Object.defineProperty(Vue.prototype, '$props', propsDef);
  8548. Vue.prototype.$set = set;
  8549. Vue.prototype.$delete = del;
  8550. Vue.prototype.$watch = function (
  8551. expOrFn,
  8552. cb,
  8553. options
  8554. ) {
  8555. var vm = this;
  8556. if (isPlainObject(cb)) {
  8557. return createWatcher(vm, expOrFn, cb, options)
  8558. }
  8559. options = options || {};
  8560. options.user = true;
  8561. var watcher = new Watcher(vm, expOrFn, cb, options);
  8562. if (options.immediate) {
  8563. try {
  8564. cb.call(vm, watcher.value);
  8565. } catch (error) {
  8566. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  8567. }
  8568. }
  8569. return function unwatchFn () {
  8570. watcher.teardown();
  8571. }
  8572. };
  8573. }
  8574. /* */
  8575. var uid$3 = 0;
  8576. function initMixin (Vue) {
  8577. Vue.prototype._init = function (options) {
  8578. var vm = this;
  8579. // a uid
  8580. vm._uid = uid$3++;
  8581. var startTag, endTag;
  8582. /* istanbul ignore if */
  8583. if ( true && config.performance && mark) {
  8584. startTag = "vue-perf-start:" + (vm._uid);
  8585. endTag = "vue-perf-end:" + (vm._uid);
  8586. mark(startTag);
  8587. }
  8588. // a flag to avoid this being observed
  8589. vm._isVue = true;
  8590. // merge options
  8591. if (options && options._isComponent) {
  8592. // optimize internal component instantiation
  8593. // since dynamic options merging is pretty slow, and none of the
  8594. // internal component options needs special treatment.
  8595. initInternalComponent(vm, options);
  8596. } else {
  8597. vm.$options = mergeOptions(
  8598. resolveConstructorOptions(vm.constructor),
  8599. options || {},
  8600. vm
  8601. );
  8602. }
  8603. /* istanbul ignore else */
  8604. if (true) {
  8605. initProxy(vm);
  8606. } else {}
  8607. // expose real self
  8608. vm._self = vm;
  8609. initLifecycle(vm);
  8610. initEvents(vm);
  8611. initRender(vm);
  8612. callHook(vm, 'beforeCreate');
  8613. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  8614. initState(vm);
  8615. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  8616. !vm._$fallback && callHook(vm, 'created');
  8617. /* istanbul ignore if */
  8618. if ( true && config.performance && mark) {
  8619. vm._name = formatComponentName(vm, false);
  8620. mark(endTag);
  8621. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  8622. }
  8623. if (vm.$options.el) {
  8624. vm.$mount(vm.$options.el);
  8625. }
  8626. };
  8627. }
  8628. function initInternalComponent (vm, options) {
  8629. var opts = vm.$options = Object.create(vm.constructor.options);
  8630. // doing this because it's faster than dynamic enumeration.
  8631. var parentVnode = options._parentVnode;
  8632. opts.parent = options.parent;
  8633. opts._parentVnode = parentVnode;
  8634. var vnodeComponentOptions = parentVnode.componentOptions;
  8635. opts.propsData = vnodeComponentOptions.propsData;
  8636. opts._parentListeners = vnodeComponentOptions.listeners;
  8637. opts._renderChildren = vnodeComponentOptions.children;
  8638. opts._componentTag = vnodeComponentOptions.tag;
  8639. if (options.render) {
  8640. opts.render = options.render;
  8641. opts.staticRenderFns = options.staticRenderFns;
  8642. }
  8643. }
  8644. function resolveConstructorOptions (Ctor) {
  8645. var options = Ctor.options;
  8646. if (Ctor.super) {
  8647. var superOptions = resolveConstructorOptions(Ctor.super);
  8648. var cachedSuperOptions = Ctor.superOptions;
  8649. if (superOptions !== cachedSuperOptions) {
  8650. // super option changed,
  8651. // need to resolve new options.
  8652. Ctor.superOptions = superOptions;
  8653. // check if there are any late-modified/attached options (#4976)
  8654. var modifiedOptions = resolveModifiedOptions(Ctor);
  8655. // update base extend options
  8656. if (modifiedOptions) {
  8657. extend(Ctor.extendOptions, modifiedOptions);
  8658. }
  8659. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  8660. if (options.name) {
  8661. options.components[options.name] = Ctor;
  8662. }
  8663. }
  8664. }
  8665. return options
  8666. }
  8667. function resolveModifiedOptions (Ctor) {
  8668. var modified;
  8669. var latest = Ctor.options;
  8670. var sealed = Ctor.sealedOptions;
  8671. for (var key in latest) {
  8672. if (latest[key] !== sealed[key]) {
  8673. if (!modified) { modified = {}; }
  8674. modified[key] = latest[key];
  8675. }
  8676. }
  8677. return modified
  8678. }
  8679. function Vue (options) {
  8680. if ( true &&
  8681. !(this instanceof Vue)
  8682. ) {
  8683. warn('Vue is a constructor and should be called with the `new` keyword');
  8684. }
  8685. this._init(options);
  8686. }
  8687. initMixin(Vue);
  8688. stateMixin(Vue);
  8689. eventsMixin(Vue);
  8690. lifecycleMixin(Vue);
  8691. renderMixin(Vue);
  8692. /* */
  8693. function initUse (Vue) {
  8694. Vue.use = function (plugin) {
  8695. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  8696. if (installedPlugins.indexOf(plugin) > -1) {
  8697. return this
  8698. }
  8699. // additional parameters
  8700. var args = toArray(arguments, 1);
  8701. args.unshift(this);
  8702. if (typeof plugin.install === 'function') {
  8703. plugin.install.apply(plugin, args);
  8704. } else if (typeof plugin === 'function') {
  8705. plugin.apply(null, args);
  8706. }
  8707. installedPlugins.push(plugin);
  8708. return this
  8709. };
  8710. }
  8711. /* */
  8712. function initMixin$1 (Vue) {
  8713. Vue.mixin = function (mixin) {
  8714. this.options = mergeOptions(this.options, mixin);
  8715. return this
  8716. };
  8717. }
  8718. /* */
  8719. function initExtend (Vue) {
  8720. /**
  8721. * Each instance constructor, including Vue, has a unique
  8722. * cid. This enables us to create wrapped "child
  8723. * constructors" for prototypal inheritance and cache them.
  8724. */
  8725. Vue.cid = 0;
  8726. var cid = 1;
  8727. /**
  8728. * Class inheritance
  8729. */
  8730. Vue.extend = function (extendOptions) {
  8731. extendOptions = extendOptions || {};
  8732. var Super = this;
  8733. var SuperId = Super.cid;
  8734. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  8735. if (cachedCtors[SuperId]) {
  8736. return cachedCtors[SuperId]
  8737. }
  8738. var name = extendOptions.name || Super.options.name;
  8739. if ( true && name) {
  8740. validateComponentName(name);
  8741. }
  8742. var Sub = function VueComponent (options) {
  8743. this._init(options);
  8744. };
  8745. Sub.prototype = Object.create(Super.prototype);
  8746. Sub.prototype.constructor = Sub;
  8747. Sub.cid = cid++;
  8748. Sub.options = mergeOptions(
  8749. Super.options,
  8750. extendOptions
  8751. );
  8752. Sub['super'] = Super;
  8753. // For props and computed properties, we define the proxy getters on
  8754. // the Vue instances at extension time, on the extended prototype. This
  8755. // avoids Object.defineProperty calls for each instance created.
  8756. if (Sub.options.props) {
  8757. initProps$1(Sub);
  8758. }
  8759. if (Sub.options.computed) {
  8760. initComputed$1(Sub);
  8761. }
  8762. // allow further extension/mixin/plugin usage
  8763. Sub.extend = Super.extend;
  8764. Sub.mixin = Super.mixin;
  8765. Sub.use = Super.use;
  8766. // create asset registers, so extended classes
  8767. // can have their private assets too.
  8768. ASSET_TYPES.forEach(function (type) {
  8769. Sub[type] = Super[type];
  8770. });
  8771. // enable recursive self-lookup
  8772. if (name) {
  8773. Sub.options.components[name] = Sub;
  8774. }
  8775. // keep a reference to the super options at extension time.
  8776. // later at instantiation we can check if Super's options have
  8777. // been updated.
  8778. Sub.superOptions = Super.options;
  8779. Sub.extendOptions = extendOptions;
  8780. Sub.sealedOptions = extend({}, Sub.options);
  8781. // cache constructor
  8782. cachedCtors[SuperId] = Sub;
  8783. return Sub
  8784. };
  8785. }
  8786. function initProps$1 (Comp) {
  8787. var props = Comp.options.props;
  8788. for (var key in props) {
  8789. proxy(Comp.prototype, "_props", key);
  8790. }
  8791. }
  8792. function initComputed$1 (Comp) {
  8793. var computed = Comp.options.computed;
  8794. for (var key in computed) {
  8795. defineComputed(Comp.prototype, key, computed[key]);
  8796. }
  8797. }
  8798. /* */
  8799. function initAssetRegisters (Vue) {
  8800. /**
  8801. * Create asset registration methods.
  8802. */
  8803. ASSET_TYPES.forEach(function (type) {
  8804. Vue[type] = function (
  8805. id,
  8806. definition
  8807. ) {
  8808. if (!definition) {
  8809. return this.options[type + 's'][id]
  8810. } else {
  8811. /* istanbul ignore if */
  8812. if ( true && type === 'component') {
  8813. validateComponentName(id);
  8814. }
  8815. if (type === 'component' && isPlainObject(definition)) {
  8816. definition.name = definition.name || id;
  8817. definition = this.options._base.extend(definition);
  8818. }
  8819. if (type === 'directive' && typeof definition === 'function') {
  8820. definition = { bind: definition, update: definition };
  8821. }
  8822. this.options[type + 's'][id] = definition;
  8823. return definition
  8824. }
  8825. };
  8826. });
  8827. }
  8828. /* */
  8829. function getComponentName (opts) {
  8830. return opts && (opts.Ctor.options.name || opts.tag)
  8831. }
  8832. function matches (pattern, name) {
  8833. if (Array.isArray(pattern)) {
  8834. return pattern.indexOf(name) > -1
  8835. } else if (typeof pattern === 'string') {
  8836. return pattern.split(',').indexOf(name) > -1
  8837. } else if (isRegExp(pattern)) {
  8838. return pattern.test(name)
  8839. }
  8840. /* istanbul ignore next */
  8841. return false
  8842. }
  8843. function pruneCache (keepAliveInstance, filter) {
  8844. var cache = keepAliveInstance.cache;
  8845. var keys = keepAliveInstance.keys;
  8846. var _vnode = keepAliveInstance._vnode;
  8847. for (var key in cache) {
  8848. var cachedNode = cache[key];
  8849. if (cachedNode) {
  8850. var name = getComponentName(cachedNode.componentOptions);
  8851. if (name && !filter(name)) {
  8852. pruneCacheEntry(cache, key, keys, _vnode);
  8853. }
  8854. }
  8855. }
  8856. }
  8857. function pruneCacheEntry (
  8858. cache,
  8859. key,
  8860. keys,
  8861. current
  8862. ) {
  8863. var cached$$1 = cache[key];
  8864. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  8865. cached$$1.componentInstance.$destroy();
  8866. }
  8867. cache[key] = null;
  8868. remove(keys, key);
  8869. }
  8870. var patternTypes = [String, RegExp, Array];
  8871. var KeepAlive = {
  8872. name: 'keep-alive',
  8873. abstract: true,
  8874. props: {
  8875. include: patternTypes,
  8876. exclude: patternTypes,
  8877. max: [String, Number]
  8878. },
  8879. created: function created () {
  8880. this.cache = Object.create(null);
  8881. this.keys = [];
  8882. },
  8883. destroyed: function destroyed () {
  8884. for (var key in this.cache) {
  8885. pruneCacheEntry(this.cache, key, this.keys);
  8886. }
  8887. },
  8888. mounted: function mounted () {
  8889. var this$1 = this;
  8890. this.$watch('include', function (val) {
  8891. pruneCache(this$1, function (name) { return matches(val, name); });
  8892. });
  8893. this.$watch('exclude', function (val) {
  8894. pruneCache(this$1, function (name) { return !matches(val, name); });
  8895. });
  8896. },
  8897. render: function render () {
  8898. var slot = this.$slots.default;
  8899. var vnode = getFirstComponentChild(slot);
  8900. var componentOptions = vnode && vnode.componentOptions;
  8901. if (componentOptions) {
  8902. // check pattern
  8903. var name = getComponentName(componentOptions);
  8904. var ref = this;
  8905. var include = ref.include;
  8906. var exclude = ref.exclude;
  8907. if (
  8908. // not included
  8909. (include && (!name || !matches(include, name))) ||
  8910. // excluded
  8911. (exclude && name && matches(exclude, name))
  8912. ) {
  8913. return vnode
  8914. }
  8915. var ref$1 = this;
  8916. var cache = ref$1.cache;
  8917. var keys = ref$1.keys;
  8918. var key = vnode.key == null
  8919. // same constructor may get registered as different local components
  8920. // so cid alone is not enough (#3269)
  8921. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  8922. : vnode.key;
  8923. if (cache[key]) {
  8924. vnode.componentInstance = cache[key].componentInstance;
  8925. // make current key freshest
  8926. remove(keys, key);
  8927. keys.push(key);
  8928. } else {
  8929. cache[key] = vnode;
  8930. keys.push(key);
  8931. // prune oldest entry
  8932. if (this.max && keys.length > parseInt(this.max)) {
  8933. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  8934. }
  8935. }
  8936. vnode.data.keepAlive = true;
  8937. }
  8938. return vnode || (slot && slot[0])
  8939. }
  8940. };
  8941. var builtInComponents = {
  8942. KeepAlive: KeepAlive
  8943. };
  8944. /* */
  8945. function initGlobalAPI (Vue) {
  8946. // config
  8947. var configDef = {};
  8948. configDef.get = function () { return config; };
  8949. if (true) {
  8950. configDef.set = function () {
  8951. warn(
  8952. 'Do not replace the Vue.config object, set individual fields instead.'
  8953. );
  8954. };
  8955. }
  8956. Object.defineProperty(Vue, 'config', configDef);
  8957. // exposed util methods.
  8958. // NOTE: these are not considered part of the public API - avoid relying on
  8959. // them unless you are aware of the risk.
  8960. Vue.util = {
  8961. warn: warn,
  8962. extend: extend,
  8963. mergeOptions: mergeOptions,
  8964. defineReactive: defineReactive$$1
  8965. };
  8966. Vue.set = set;
  8967. Vue.delete = del;
  8968. Vue.nextTick = nextTick;
  8969. // 2.6 explicit observable API
  8970. Vue.observable = function (obj) {
  8971. observe(obj);
  8972. return obj
  8973. };
  8974. Vue.options = Object.create(null);
  8975. ASSET_TYPES.forEach(function (type) {
  8976. Vue.options[type + 's'] = Object.create(null);
  8977. });
  8978. // this is used to identify the "base" constructor to extend all plain-object
  8979. // components with in Weex's multi-instance scenarios.
  8980. Vue.options._base = Vue;
  8981. extend(Vue.options.components, builtInComponents);
  8982. initUse(Vue);
  8983. initMixin$1(Vue);
  8984. initExtend(Vue);
  8985. initAssetRegisters(Vue);
  8986. }
  8987. initGlobalAPI(Vue);
  8988. Object.defineProperty(Vue.prototype, '$isServer', {
  8989. get: isServerRendering
  8990. });
  8991. Object.defineProperty(Vue.prototype, '$ssrContext', {
  8992. get: function get () {
  8993. /* istanbul ignore next */
  8994. return this.$vnode && this.$vnode.ssrContext
  8995. }
  8996. });
  8997. // expose FunctionalRenderContext for ssr runtime helper installation
  8998. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  8999. value: FunctionalRenderContext
  9000. });
  9001. Vue.version = '2.6.11';
  9002. /**
  9003. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  9004. */
  9005. var ARRAYTYPE = '[object Array]';
  9006. var OBJECTTYPE = '[object Object]';
  9007. // const FUNCTIONTYPE = '[object Function]'
  9008. function diff(current, pre) {
  9009. var result = {};
  9010. syncKeys(current, pre);
  9011. _diff(current, pre, '', result);
  9012. return result
  9013. }
  9014. function syncKeys(current, pre) {
  9015. if (current === pre) { return }
  9016. var rootCurrentType = type(current);
  9017. var rootPreType = type(pre);
  9018. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  9019. if(Object.keys(current).length >= Object.keys(pre).length){
  9020. for (var key in pre) {
  9021. var currentValue = current[key];
  9022. if (currentValue === undefined) {
  9023. current[key] = null;
  9024. } else {
  9025. syncKeys(currentValue, pre[key]);
  9026. }
  9027. }
  9028. }
  9029. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  9030. if (current.length >= pre.length) {
  9031. pre.forEach(function (item, index) {
  9032. syncKeys(current[index], item);
  9033. });
  9034. }
  9035. }
  9036. }
  9037. function _diff(current, pre, path, result) {
  9038. if (current === pre) { return }
  9039. var rootCurrentType = type(current);
  9040. var rootPreType = type(pre);
  9041. if (rootCurrentType == OBJECTTYPE) {
  9042. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  9043. setResult(result, path, current);
  9044. } else {
  9045. var loop = function ( key ) {
  9046. var currentValue = current[key];
  9047. var preValue = pre[key];
  9048. var currentType = type(currentValue);
  9049. var preType = type(preValue);
  9050. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  9051. // NOTE 此处将 != 修改为 !==。涉及地方太多恐怕测试不到,如果出现数据对比问题,将其修改回来。
  9052. if (currentValue !== pre[key]) {
  9053. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9054. }
  9055. } else if (currentType == ARRAYTYPE) {
  9056. if (preType != ARRAYTYPE) {
  9057. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9058. } else {
  9059. if (currentValue.length < preValue.length) {
  9060. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9061. } else {
  9062. currentValue.forEach(function (item, index) {
  9063. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  9064. });
  9065. }
  9066. }
  9067. } else if (currentType == OBJECTTYPE) {
  9068. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  9069. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9070. } else {
  9071. for (var subKey in currentValue) {
  9072. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  9073. }
  9074. }
  9075. }
  9076. };
  9077. for (var key in current) loop( key );
  9078. }
  9079. } else if (rootCurrentType == ARRAYTYPE) {
  9080. if (rootPreType != ARRAYTYPE) {
  9081. setResult(result, path, current);
  9082. } else {
  9083. if (current.length < pre.length) {
  9084. setResult(result, path, current);
  9085. } else {
  9086. current.forEach(function (item, index) {
  9087. _diff(item, pre[index], path + '[' + index + ']', result);
  9088. });
  9089. }
  9090. }
  9091. } else {
  9092. setResult(result, path, current);
  9093. }
  9094. }
  9095. function setResult(result, k, v) {
  9096. // if (type(v) != FUNCTIONTYPE) {
  9097. result[k] = v;
  9098. // }
  9099. }
  9100. function type(obj) {
  9101. return Object.prototype.toString.call(obj)
  9102. }
  9103. /* */
  9104. function flushCallbacks$1(vm) {
  9105. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  9106. if (Object({"VUE_APP_NAME":"小程序","VUE_APP_PLATFORM":"mp-alipay","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  9107. var mpInstance = vm.$scope;
  9108. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  9109. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  9110. }
  9111. var copies = vm.__next_tick_callbacks.slice(0);
  9112. vm.__next_tick_callbacks.length = 0;
  9113. for (var i = 0; i < copies.length; i++) {
  9114. copies[i]();
  9115. }
  9116. }
  9117. }
  9118. function hasRenderWatcher(vm) {
  9119. return queue.find(function (watcher) { return vm._watcher === watcher; })
  9120. }
  9121. function nextTick$1(vm, cb) {
  9122. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  9123. //2.nextTick 之前存在 render watcher
  9124. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  9125. if(Object({"VUE_APP_NAME":"小程序","VUE_APP_PLATFORM":"mp-alipay","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  9126. var mpInstance = vm.$scope;
  9127. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  9128. ']:nextVueTick');
  9129. }
  9130. return nextTick(cb, vm)
  9131. }else{
  9132. if(Object({"VUE_APP_NAME":"小程序","VUE_APP_PLATFORM":"mp-alipay","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  9133. var mpInstance$1 = vm.$scope;
  9134. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  9135. ']:nextMPTick');
  9136. }
  9137. }
  9138. var _resolve;
  9139. if (!vm.__next_tick_callbacks) {
  9140. vm.__next_tick_callbacks = [];
  9141. }
  9142. vm.__next_tick_callbacks.push(function () {
  9143. if (cb) {
  9144. try {
  9145. cb.call(vm);
  9146. } catch (e) {
  9147. handleError(e, vm, 'nextTick');
  9148. }
  9149. } else if (_resolve) {
  9150. _resolve(vm);
  9151. }
  9152. });
  9153. // $flow-disable-line
  9154. if (!cb && typeof Promise !== 'undefined') {
  9155. return new Promise(function (resolve) {
  9156. _resolve = resolve;
  9157. })
  9158. }
  9159. }
  9160. /* */
  9161. function cloneWithData(vm) {
  9162. // 确保当前 vm 所有数据被同步
  9163. var ret = Object.create(null);
  9164. var dataKeys = [].concat(
  9165. Object.keys(vm._data || {}),
  9166. Object.keys(vm._computedWatchers || {}));
  9167. dataKeys.reduce(function(ret, key) {
  9168. ret[key] = vm[key];
  9169. return ret
  9170. }, ret);
  9171. // vue-composition-api
  9172. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  9173. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  9174. if (rawBindings) {
  9175. Object.keys(rawBindings).forEach(function (key) {
  9176. ret[key] = vm[key];
  9177. });
  9178. }
  9179. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  9180. Object.assign(ret, vm.$mp.data || {});
  9181. if (
  9182. Array.isArray(vm.$options.behaviors) &&
  9183. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  9184. ) { //form-field
  9185. ret['name'] = vm.name;
  9186. ret['value'] = vm.value;
  9187. }
  9188. return JSON.parse(JSON.stringify(ret))
  9189. }
  9190. var patch = function(oldVnode, vnode) {
  9191. var this$1 = this;
  9192. if (vnode === null) { //destroy
  9193. return
  9194. }
  9195. if (this.mpType === 'page' || this.mpType === 'component') {
  9196. var mpInstance = this.$scope;
  9197. var data = Object.create(null);
  9198. try {
  9199. data = cloneWithData(this);
  9200. } catch (err) {
  9201. console.error(err);
  9202. }
  9203. data.__webviewId__ = mpInstance.data.__webviewId__;
  9204. var mpData = Object.create(null);
  9205. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  9206. mpData[key] = mpInstance.data[key];
  9207. });
  9208. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  9209. if (Object.keys(diffData).length) {
  9210. if (Object({"VUE_APP_NAME":"小程序","VUE_APP_PLATFORM":"mp-alipay","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  9211. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  9212. ']差量更新',
  9213. JSON.stringify(diffData));
  9214. }
  9215. this.__next_tick_pending = true;
  9216. mpInstance.setData(diffData, function () {
  9217. this$1.__next_tick_pending = false;
  9218. flushCallbacks$1(this$1);
  9219. });
  9220. } else {
  9221. flushCallbacks$1(this);
  9222. }
  9223. }
  9224. };
  9225. /* */
  9226. function createEmptyRender() {
  9227. }
  9228. function mountComponent$1(
  9229. vm,
  9230. el,
  9231. hydrating
  9232. ) {
  9233. if (!vm.mpType) {//main.js 中的 new Vue
  9234. return vm
  9235. }
  9236. if (vm.mpType === 'app') {
  9237. vm.$options.render = createEmptyRender;
  9238. }
  9239. if (!vm.$options.render) {
  9240. vm.$options.render = createEmptyRender;
  9241. if (true) {
  9242. /* istanbul ignore if */
  9243. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  9244. vm.$options.el || el) {
  9245. warn(
  9246. 'You are using the runtime-only build of Vue where the template ' +
  9247. 'compiler is not available. Either pre-compile the templates into ' +
  9248. 'render functions, or use the compiler-included build.',
  9249. vm
  9250. );
  9251. } else {
  9252. warn(
  9253. 'Failed to mount component: template or render function not defined.',
  9254. vm
  9255. );
  9256. }
  9257. }
  9258. }
  9259. !vm._$fallback && callHook(vm, 'beforeMount');
  9260. var updateComponent = function () {
  9261. vm._update(vm._render(), hydrating);
  9262. };
  9263. // we set this to vm._watcher inside the watcher's constructor
  9264. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  9265. // component's mounted hook), which relies on vm._watcher being already defined
  9266. new Watcher(vm, updateComponent, noop, {
  9267. before: function before() {
  9268. if (vm._isMounted && !vm._isDestroyed) {
  9269. callHook(vm, 'beforeUpdate');
  9270. }
  9271. }
  9272. }, true /* isRenderWatcher */);
  9273. hydrating = false;
  9274. return vm
  9275. }
  9276. /* */
  9277. function renderClass (
  9278. staticClass,
  9279. dynamicClass
  9280. ) {
  9281. if (isDef(staticClass) || isDef(dynamicClass)) {
  9282. return concat(staticClass, stringifyClass(dynamicClass))
  9283. }
  9284. /* istanbul ignore next */
  9285. return ''
  9286. }
  9287. function concat (a, b) {
  9288. return a ? b ? (a + ' ' + b) : a : (b || '')
  9289. }
  9290. function stringifyClass (value) {
  9291. if (Array.isArray(value)) {
  9292. return stringifyArray(value)
  9293. }
  9294. if (isObject(value)) {
  9295. return stringifyObject(value)
  9296. }
  9297. if (typeof value === 'string') {
  9298. return value
  9299. }
  9300. /* istanbul ignore next */
  9301. return ''
  9302. }
  9303. function stringifyArray (value) {
  9304. var res = '';
  9305. var stringified;
  9306. for (var i = 0, l = value.length; i < l; i++) {
  9307. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  9308. if (res) { res += ' '; }
  9309. res += stringified;
  9310. }
  9311. }
  9312. return res
  9313. }
  9314. function stringifyObject (value) {
  9315. var res = '';
  9316. for (var key in value) {
  9317. if (value[key]) {
  9318. if (res) { res += ' '; }
  9319. res += key;
  9320. }
  9321. }
  9322. return res
  9323. }
  9324. /* */
  9325. var parseStyleText = cached(function (cssText) {
  9326. var res = {};
  9327. var listDelimiter = /;(?![^(]*\))/g;
  9328. var propertyDelimiter = /:(.+)/;
  9329. cssText.split(listDelimiter).forEach(function (item) {
  9330. if (item) {
  9331. var tmp = item.split(propertyDelimiter);
  9332. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  9333. }
  9334. });
  9335. return res
  9336. });
  9337. // normalize possible array / string values into Object
  9338. function normalizeStyleBinding (bindingStyle) {
  9339. if (Array.isArray(bindingStyle)) {
  9340. return toObject(bindingStyle)
  9341. }
  9342. if (typeof bindingStyle === 'string') {
  9343. return parseStyleText(bindingStyle)
  9344. }
  9345. return bindingStyle
  9346. }
  9347. /* */
  9348. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  9349. function getTarget(obj, path) {
  9350. var parts = path.split('.');
  9351. var key = parts[0];
  9352. if (key.indexOf('__$n') === 0) { //number index
  9353. key = parseInt(key.replace('__$n', ''));
  9354. }
  9355. if (parts.length === 1) {
  9356. return obj[key]
  9357. }
  9358. return getTarget(obj[key], parts.slice(1).join('.'))
  9359. }
  9360. function internalMixin(Vue) {
  9361. Vue.config.errorHandler = function(err, vm, info) {
  9362. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  9363. console.error(err);
  9364. /* eslint-disable no-undef */
  9365. var app = typeof getApp === 'function' && getApp();
  9366. if (app && app.onError) {
  9367. app.onError(err);
  9368. }
  9369. };
  9370. var oldEmit = Vue.prototype.$emit;
  9371. Vue.prototype.$emit = function(event) {
  9372. if (this.$scope && event) {
  9373. this.$scope['triggerEvent'](event, {
  9374. __args__: toArray(arguments, 1)
  9375. });
  9376. }
  9377. return oldEmit.apply(this, arguments)
  9378. };
  9379. Vue.prototype.$nextTick = function(fn) {
  9380. return nextTick$1(this, fn)
  9381. };
  9382. MP_METHODS.forEach(function (method) {
  9383. Vue.prototype[method] = function(args) {
  9384. if (this.$scope && this.$scope[method]) {
  9385. return this.$scope[method](args)
  9386. }
  9387. // mp-alipay
  9388. if (typeof my === 'undefined') {
  9389. return
  9390. }
  9391. if (method === 'createSelectorQuery') {
  9392. /* eslint-disable no-undef */
  9393. return my.createSelectorQuery(args)
  9394. } else if (method === 'createIntersectionObserver') {
  9395. /* eslint-disable no-undef */
  9396. return my.createIntersectionObserver(args)
  9397. }
  9398. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  9399. };
  9400. });
  9401. Vue.prototype.__init_provide = initProvide;
  9402. Vue.prototype.__init_injections = initInjections;
  9403. Vue.prototype.__call_hook = function(hook, args) {
  9404. var vm = this;
  9405. // #7573 disable dep collection when invoking lifecycle hooks
  9406. pushTarget();
  9407. var handlers = vm.$options[hook];
  9408. var info = hook + " hook";
  9409. var ret;
  9410. if (handlers) {
  9411. for (var i = 0, j = handlers.length; i < j; i++) {
  9412. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  9413. }
  9414. }
  9415. if (vm._hasHookEvent) {
  9416. vm.$emit('hook:' + hook, args);
  9417. }
  9418. popTarget();
  9419. return ret
  9420. };
  9421. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  9422. if (Array.isArray(modifiers)) {
  9423. if (modifiers.indexOf('trim') !== -1) {
  9424. value = value.trim();
  9425. }
  9426. if (modifiers.indexOf('number') !== -1) {
  9427. value = this._n(value);
  9428. }
  9429. }
  9430. if (!target) {
  9431. target = this;
  9432. }
  9433. target[key] = value;
  9434. };
  9435. Vue.prototype.__set_sync = function(target, key, value) {
  9436. if (!target) {
  9437. target = this;
  9438. }
  9439. target[key] = value;
  9440. };
  9441. Vue.prototype.__get_orig = function(item) {
  9442. if (isPlainObject(item)) {
  9443. return item['$orig'] || item
  9444. }
  9445. return item
  9446. };
  9447. Vue.prototype.__get_value = function(dataPath, target) {
  9448. return getTarget(target || this, dataPath)
  9449. };
  9450. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  9451. return renderClass(staticClass, dynamicClass)
  9452. };
  9453. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  9454. if (!dynamicStyle && !staticStyle) {
  9455. return ''
  9456. }
  9457. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  9458. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  9459. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  9460. };
  9461. Vue.prototype.__map = function(val, iteratee) {
  9462. //TODO 暂不考虑 string
  9463. var ret, i, l, keys, key;
  9464. if (Array.isArray(val)) {
  9465. ret = new Array(val.length);
  9466. for (i = 0, l = val.length; i < l; i++) {
  9467. ret[i] = iteratee(val[i], i);
  9468. }
  9469. return ret
  9470. } else if (isObject(val)) {
  9471. keys = Object.keys(val);
  9472. ret = Object.create(null);
  9473. for (i = 0, l = keys.length; i < l; i++) {
  9474. key = keys[i];
  9475. ret[key] = iteratee(val[key], key, i);
  9476. }
  9477. return ret
  9478. } else if (typeof val === 'number') {
  9479. ret = new Array(val);
  9480. for (i = 0, l = val; i < l; i++) {
  9481. // 第一个参数暂时仍和小程序一致
  9482. ret[i] = iteratee(i, i);
  9483. }
  9484. return ret
  9485. }
  9486. return []
  9487. };
  9488. }
  9489. /* */
  9490. var LIFECYCLE_HOOKS$1 = [
  9491. //App
  9492. 'onLaunch',
  9493. 'onShow',
  9494. 'onHide',
  9495. 'onUniNViewMessage',
  9496. 'onPageNotFound',
  9497. 'onThemeChange',
  9498. 'onError',
  9499. 'onUnhandledRejection',
  9500. //Page
  9501. 'onInit',
  9502. 'onLoad',
  9503. // 'onShow',
  9504. 'onReady',
  9505. // 'onHide',
  9506. 'onUnload',
  9507. 'onPullDownRefresh',
  9508. 'onReachBottom',
  9509. 'onTabItemTap',
  9510. 'onAddToFavorites',
  9511. 'onShareTimeline',
  9512. 'onShareAppMessage',
  9513. 'onResize',
  9514. 'onPageScroll',
  9515. 'onNavigationBarButtonTap',
  9516. 'onBackPress',
  9517. 'onNavigationBarSearchInputChanged',
  9518. 'onNavigationBarSearchInputConfirmed',
  9519. 'onNavigationBarSearchInputClicked',
  9520. //Component
  9521. // 'onReady', // 兼容旧版本,应该移除该事件
  9522. 'onPageShow',
  9523. 'onPageHide',
  9524. 'onPageResize'
  9525. ];
  9526. function lifecycleMixin$1(Vue) {
  9527. //fixed vue-class-component
  9528. var oldExtend = Vue.extend;
  9529. Vue.extend = function(extendOptions) {
  9530. extendOptions = extendOptions || {};
  9531. var methods = extendOptions.methods;
  9532. if (methods) {
  9533. Object.keys(methods).forEach(function (methodName) {
  9534. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  9535. extendOptions[methodName] = methods[methodName];
  9536. delete methods[methodName];
  9537. }
  9538. });
  9539. }
  9540. return oldExtend.call(this, extendOptions)
  9541. };
  9542. var strategies = Vue.config.optionMergeStrategies;
  9543. var mergeHook = strategies.created;
  9544. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  9545. strategies[hook] = mergeHook;
  9546. });
  9547. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  9548. }
  9549. /* */
  9550. // install platform patch function
  9551. Vue.prototype.__patch__ = patch;
  9552. // public mount method
  9553. Vue.prototype.$mount = function(
  9554. el ,
  9555. hydrating
  9556. ) {
  9557. return mountComponent$1(this, el, hydrating)
  9558. };
  9559. lifecycleMixin$1(Vue);
  9560. internalMixin(Vue);
  9561. /* */
  9562. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  9563. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  9564. /***/ }),
  9565. /***/ 20:
  9566. /*!****************************************************************!*\
  9567. !*** C:/Users/first/Desktop/公司/applets/store/modules/order.js ***!
  9568. \****************************************************************/
  9569. /*! no static exports found */
  9570. /***/ (function(module, exports, __webpack_require__) {
  9571. "use strict";
  9572. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  9573. state: {
  9574. orderInfo: undefined },
  9575. getters: {},
  9576. mutations: {
  9577. updateOrderInfo: function updateOrderInfo(state, orderInfo) {
  9578. state.orderInfo = orderInfo;
  9579. } },
  9580. actions: {} };exports.default = _default;
  9581. /***/ }),
  9582. /***/ 21:
  9583. /*!******************************************************************!*\
  9584. !*** C:/Users/first/Desktop/公司/applets/store/modules/station.js ***!
  9585. \******************************************************************/
  9586. /*! no static exports found */
  9587. /***/ (function(module, exports, __webpack_require__) {
  9588. "use strict";
  9589. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  9590. state: {
  9591. stationId: undefined,
  9592. labelId: undefined,
  9593. employeeId: undefined,
  9594. selectedGas: undefined },
  9595. getters: {},
  9596. mutations: {
  9597. updateStationId: function updateStationId(state, stationId) {
  9598. state.stationId = stationId;
  9599. },
  9600. updateSelectedGas: function updateSelectedGas(state, selectedGas) {
  9601. state.selectedGas = selectedGas;
  9602. },
  9603. updateLabelId: function updateLabelId(state, labelId) {
  9604. state.labelId = labelId;
  9605. },
  9606. clearLabelId: function clearLabelId(state) {
  9607. state.labelId = undefined;
  9608. },
  9609. updateEmployeeId: function updateEmployeeId(state, employeeId) {
  9610. state.employeeId = employeeId;
  9611. },
  9612. clearEmployeeId: function clearEmployeeId(state) {
  9613. state.employeeId = undefined;
  9614. } },
  9615. actions: {} };exports.default = _default;
  9616. /***/ }),
  9617. /***/ 22:
  9618. /*!******************************************************************!*\
  9619. !*** C:/Users/first/Desktop/公司/applets/store/modules/voucher.js ***!
  9620. \******************************************************************/
  9621. /*! no static exports found */
  9622. /***/ (function(module, exports, __webpack_require__) {
  9623. "use strict";
  9624. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var getTime = function getTime() {
  9625. var date = new Date();
  9626. var h = date.getHours().toString();
  9627. var m = date.getMinutes().toString();
  9628. var s = date.getSeconds().toString();
  9629. h = '' + (h.length == 1 ? '0' : '') + h;
  9630. m = '' + (m.length == 1 ? '0' : '') + m;
  9631. s = '' + (s.length == 1 ? '0' : '') + s;
  9632. console.log('' + h + ':' + m + ':' + s);
  9633. return '' + h + ':' + m + ':' + s;
  9634. };var _default =
  9635. {
  9636. state: {
  9637. v_receivableAmt: undefined,
  9638. v_amt: undefined,
  9639. v_oilName: undefined,
  9640. v_time: '' },
  9641. getters: {},
  9642. mutations: {
  9643. updateVoucherInfo: function updateVoucherInfo(state, voucherInfo) {
  9644. state.v_receivableAmt = voucherInfo.receivableAmt;
  9645. state.v_amt = voucherInfo.amt;
  9646. state.v_oilName = voucherInfo.oilName;
  9647. state.v_time = getTime();
  9648. } },
  9649. actions: {} };exports.default = _default;
  9650. /***/ }),
  9651. /***/ 23:
  9652. /*!*****************************************************************!*\
  9653. !*** C:/Users/first/Desktop/公司/applets/store/modules/coupon.js ***!
  9654. \*****************************************************************/
  9655. /*! no static exports found */
  9656. /***/ (function(module, exports, __webpack_require__) {
  9657. "use strict";
  9658. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  9659. state: {
  9660. couponEnabledFlag: '0', // 是否启用优惠券
  9661. couponList: undefined, // 优惠券列表
  9662. succeedIssueId: undefined // 支付成功后的展示位的issueId
  9663. },
  9664. getters: {},
  9665. mutations: {
  9666. updateCouponEnabledFlag: function updateCouponEnabledFlag(state, couponEnabledFlag) {
  9667. state.couponEnabledFlag = couponEnabledFlag;
  9668. },
  9669. updateSucceedIssueId: function updateSucceedIssueId(state, succeedIssueId) {
  9670. state.succeedIssueId = succeedIssueId;
  9671. },
  9672. updateCouponList: function updateCouponList(state, couponList) {
  9673. state.couponList = couponList;
  9674. } },
  9675. actions: {} };exports.default = _default;
  9676. /***/ }),
  9677. /***/ 24:
  9678. /*!*****************************************************!*\
  9679. !*** C:/Users/first/Desktop/公司/applets/util/api.js ***!
  9680. \*****************************************************/
  9681. /*! no static exports found */
  9682. /***/ (function(module, exports, __webpack_require__) {
  9683. "use strict";
  9684. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.myRequest = void 0;var _settings = _interopRequireDefault(__webpack_require__(/*! @/settings.js */ 18));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  9685. var myRequest = function myRequest(options) {
  9686. return new Promise(function (resolve, reject) {
  9687. uni.request({
  9688. url: _settings.default.base_url + "/" + _settings.default.prefix + options.url,
  9689. method: options.method || 'GET',
  9690. data: options.data || {},
  9691. success: function success(res) {
  9692. if (res.statusCode !== 200) {
  9693. uni.showToast({
  9694. icon: "error",
  9695. title: '拉取数据失败' });
  9696. reject();
  9697. }
  9698. resolve(res.data);
  9699. },
  9700. fail: function fail(err) {
  9701. uni.showToast({
  9702. icon: "error",
  9703. title: err.errMsg });
  9704. reject(err);
  9705. } });
  9706. });
  9707. };exports.myRequest = myRequest;
  9708. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-alipay/dist/index.js */ 1)["default"]))
  9709. /***/ }),
  9710. /***/ 3:
  9711. /*!***********************************!*\
  9712. !*** (webpack)/buildin/global.js ***!
  9713. \***********************************/
  9714. /*! no static exports found */
  9715. /***/ (function(module, exports) {
  9716. var g;
  9717. // This works in non-strict mode
  9718. g = (function() {
  9719. return this;
  9720. })();
  9721. try {
  9722. // This works if eval is allowed (see CSP)
  9723. g = g || new Function("return this")();
  9724. } catch (e) {
  9725. // This works if the window reference is available
  9726. if (typeof window === "object") g = window;
  9727. }
  9728. // g can still be undefined, but nothing to do about it...
  9729. // We return undefined, instead of nothing here, so it's
  9730. // easier to handle this case. if(!global) { ...}
  9731. module.exports = g;
  9732. /***/ }),
  9733. /***/ 31:
  9734. /*!**********************************************************!*\
  9735. !*** ./node_modules/@babel/runtime/regenerator/index.js ***!
  9736. \**********************************************************/
  9737. /*! no static exports found */
  9738. /***/ (function(module, exports, __webpack_require__) {
  9739. module.exports = __webpack_require__(/*! regenerator-runtime */ 32);
  9740. /***/ }),
  9741. /***/ 32:
  9742. /*!************************************************************!*\
  9743. !*** ./node_modules/regenerator-runtime/runtime-module.js ***!
  9744. \************************************************************/
  9745. /*! no static exports found */
  9746. /***/ (function(module, exports, __webpack_require__) {
  9747. /**
  9748. * Copyright (c) 2014-present, Facebook, Inc.
  9749. *
  9750. * This source code is licensed under the MIT license found in the
  9751. * LICENSE file in the root directory of this source tree.
  9752. */
  9753. // This method of obtaining a reference to the global object needs to be
  9754. // kept identical to the way it is obtained in runtime.js
  9755. var g = (function() {
  9756. return this || (typeof self === "object" && self);
  9757. })() || Function("return this")();
  9758. // Use `getOwnPropertyNames` because not all browsers support calling
  9759. // `hasOwnProperty` on the global `self` object in a worker. See #183.
  9760. var hadRuntime = g.regeneratorRuntime &&
  9761. Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0;
  9762. // Save the old regeneratorRuntime in case it needs to be restored later.
  9763. var oldRuntime = hadRuntime && g.regeneratorRuntime;
  9764. // Force reevalutation of runtime.js.
  9765. g.regeneratorRuntime = undefined;
  9766. module.exports = __webpack_require__(/*! ./runtime */ 33);
  9767. if (hadRuntime) {
  9768. // Restore the original runtime.
  9769. g.regeneratorRuntime = oldRuntime;
  9770. } else {
  9771. // Remove the global property added by runtime.js.
  9772. try {
  9773. delete g.regeneratorRuntime;
  9774. } catch(e) {
  9775. g.regeneratorRuntime = undefined;
  9776. }
  9777. }
  9778. /***/ }),
  9779. /***/ 33:
  9780. /*!*****************************************************!*\
  9781. !*** ./node_modules/regenerator-runtime/runtime.js ***!
  9782. \*****************************************************/
  9783. /*! no static exports found */
  9784. /***/ (function(module, exports) {
  9785. /**
  9786. * Copyright (c) 2014-present, Facebook, Inc.
  9787. *
  9788. * This source code is licensed under the MIT license found in the
  9789. * LICENSE file in the root directory of this source tree.
  9790. */
  9791. !(function(global) {
  9792. "use strict";
  9793. var Op = Object.prototype;
  9794. var hasOwn = Op.hasOwnProperty;
  9795. var undefined; // More compressible than void 0.
  9796. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  9797. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  9798. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  9799. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  9800. var inModule = typeof module === "object";
  9801. var runtime = global.regeneratorRuntime;
  9802. if (runtime) {
  9803. if (inModule) {
  9804. // If regeneratorRuntime is defined globally and we're in a module,
  9805. // make the exports object identical to regeneratorRuntime.
  9806. module.exports = runtime;
  9807. }
  9808. // Don't bother evaluating the rest of this file if the runtime was
  9809. // already defined globally.
  9810. return;
  9811. }
  9812. // Define the runtime globally (as expected by generated code) as either
  9813. // module.exports (if we're in a module) or a new, empty object.
  9814. runtime = global.regeneratorRuntime = inModule ? module.exports : {};
  9815. function wrap(innerFn, outerFn, self, tryLocsList) {
  9816. // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
  9817. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  9818. var generator = Object.create(protoGenerator.prototype);
  9819. var context = new Context(tryLocsList || []);
  9820. // The ._invoke method unifies the implementations of the .next,
  9821. // .throw, and .return methods.
  9822. generator._invoke = makeInvokeMethod(innerFn, self, context);
  9823. return generator;
  9824. }
  9825. runtime.wrap = wrap;
  9826. // Try/catch helper to minimize deoptimizations. Returns a completion
  9827. // record like context.tryEntries[i].completion. This interface could
  9828. // have been (and was previously) designed to take a closure to be
  9829. // invoked without arguments, but in all the cases we care about we
  9830. // already have an existing method we want to call, so there's no need
  9831. // to create a new function object. We can even get away with assuming
  9832. // the method takes exactly one argument, since that happens to be true
  9833. // in every case, so we don't have to touch the arguments object. The
  9834. // only additional allocation required is the completion record, which
  9835. // has a stable shape and so hopefully should be cheap to allocate.
  9836. function tryCatch(fn, obj, arg) {
  9837. try {
  9838. return { type: "normal", arg: fn.call(obj, arg) };
  9839. } catch (err) {
  9840. return { type: "throw", arg: err };
  9841. }
  9842. }
  9843. var GenStateSuspendedStart = "suspendedStart";
  9844. var GenStateSuspendedYield = "suspendedYield";
  9845. var GenStateExecuting = "executing";
  9846. var GenStateCompleted = "completed";
  9847. // Returning this object from the innerFn has the same effect as
  9848. // breaking out of the dispatch switch statement.
  9849. var ContinueSentinel = {};
  9850. // Dummy constructor functions that we use as the .constructor and
  9851. // .constructor.prototype properties for functions that return Generator
  9852. // objects. For full spec compliance, you may wish to configure your
  9853. // minifier not to mangle the names of these two functions.
  9854. function Generator() {}
  9855. function GeneratorFunction() {}
  9856. function GeneratorFunctionPrototype() {}
  9857. // This is a polyfill for %IteratorPrototype% for environments that
  9858. // don't natively support it.
  9859. var IteratorPrototype = {};
  9860. IteratorPrototype[iteratorSymbol] = function () {
  9861. return this;
  9862. };
  9863. var getProto = Object.getPrototypeOf;
  9864. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  9865. if (NativeIteratorPrototype &&
  9866. NativeIteratorPrototype !== Op &&
  9867. hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  9868. // This environment has a native %IteratorPrototype%; use it instead
  9869. // of the polyfill.
  9870. IteratorPrototype = NativeIteratorPrototype;
  9871. }
  9872. var Gp = GeneratorFunctionPrototype.prototype =
  9873. Generator.prototype = Object.create(IteratorPrototype);
  9874. GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  9875. GeneratorFunctionPrototype.constructor = GeneratorFunction;
  9876. GeneratorFunctionPrototype[toStringTagSymbol] =
  9877. GeneratorFunction.displayName = "GeneratorFunction";
  9878. // Helper for defining the .next, .throw, and .return methods of the
  9879. // Iterator interface in terms of a single ._invoke method.
  9880. function defineIteratorMethods(prototype) {
  9881. ["next", "throw", "return"].forEach(function(method) {
  9882. prototype[method] = function(arg) {
  9883. return this._invoke(method, arg);
  9884. };
  9885. });
  9886. }
  9887. runtime.isGeneratorFunction = function(genFun) {
  9888. var ctor = typeof genFun === "function" && genFun.constructor;
  9889. return ctor
  9890. ? ctor === GeneratorFunction ||
  9891. // For the native GeneratorFunction constructor, the best we can
  9892. // do is to check its .name property.
  9893. (ctor.displayName || ctor.name) === "GeneratorFunction"
  9894. : false;
  9895. };
  9896. runtime.mark = function(genFun) {
  9897. if (Object.setPrototypeOf) {
  9898. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  9899. } else {
  9900. genFun.__proto__ = GeneratorFunctionPrototype;
  9901. if (!(toStringTagSymbol in genFun)) {
  9902. genFun[toStringTagSymbol] = "GeneratorFunction";
  9903. }
  9904. }
  9905. genFun.prototype = Object.create(Gp);
  9906. return genFun;
  9907. };
  9908. // Within the body of any async function, `await x` is transformed to
  9909. // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  9910. // `hasOwn.call(value, "__await")` to determine if the yielded value is
  9911. // meant to be awaited.
  9912. runtime.awrap = function(arg) {
  9913. return { __await: arg };
  9914. };
  9915. function AsyncIterator(generator) {
  9916. function invoke(method, arg, resolve, reject) {
  9917. var record = tryCatch(generator[method], generator, arg);
  9918. if (record.type === "throw") {
  9919. reject(record.arg);
  9920. } else {
  9921. var result = record.arg;
  9922. var value = result.value;
  9923. if (value &&
  9924. typeof value === "object" &&
  9925. hasOwn.call(value, "__await")) {
  9926. return Promise.resolve(value.__await).then(function(value) {
  9927. invoke("next", value, resolve, reject);
  9928. }, function(err) {
  9929. invoke("throw", err, resolve, reject);
  9930. });
  9931. }
  9932. return Promise.resolve(value).then(function(unwrapped) {
  9933. // When a yielded Promise is resolved, its final value becomes
  9934. // the .value of the Promise<{value,done}> result for the
  9935. // current iteration.
  9936. result.value = unwrapped;
  9937. resolve(result);
  9938. }, function(error) {
  9939. // If a rejected Promise was yielded, throw the rejection back
  9940. // into the async generator function so it can be handled there.
  9941. return invoke("throw", error, resolve, reject);
  9942. });
  9943. }
  9944. }
  9945. var previousPromise;
  9946. function enqueue(method, arg) {
  9947. function callInvokeWithMethodAndArg() {
  9948. return new Promise(function(resolve, reject) {
  9949. invoke(method, arg, resolve, reject);
  9950. });
  9951. }
  9952. return previousPromise =
  9953. // If enqueue has been called before, then we want to wait until
  9954. // all previous Promises have been resolved before calling invoke,
  9955. // so that results are always delivered in the correct order. If
  9956. // enqueue has not been called before, then it is important to
  9957. // call invoke immediately, without waiting on a callback to fire,
  9958. // so that the async generator function has the opportunity to do
  9959. // any necessary setup in a predictable way. This predictability
  9960. // is why the Promise constructor synchronously invokes its
  9961. // executor callback, and why async functions synchronously
  9962. // execute code before the first await. Since we implement simple
  9963. // async functions in terms of async generators, it is especially
  9964. // important to get this right, even though it requires care.
  9965. previousPromise ? previousPromise.then(
  9966. callInvokeWithMethodAndArg,
  9967. // Avoid propagating failures to Promises returned by later
  9968. // invocations of the iterator.
  9969. callInvokeWithMethodAndArg
  9970. ) : callInvokeWithMethodAndArg();
  9971. }
  9972. // Define the unified helper method that is used to implement .next,
  9973. // .throw, and .return (see defineIteratorMethods).
  9974. this._invoke = enqueue;
  9975. }
  9976. defineIteratorMethods(AsyncIterator.prototype);
  9977. AsyncIterator.prototype[asyncIteratorSymbol] = function () {
  9978. return this;
  9979. };
  9980. runtime.AsyncIterator = AsyncIterator;
  9981. // Note that simple async functions are implemented on top of
  9982. // AsyncIterator objects; they just return a Promise for the value of
  9983. // the final result produced by the iterator.
  9984. runtime.async = function(innerFn, outerFn, self, tryLocsList) {
  9985. var iter = new AsyncIterator(
  9986. wrap(innerFn, outerFn, self, tryLocsList)
  9987. );
  9988. return runtime.isGeneratorFunction(outerFn)
  9989. ? iter // If outerFn is a generator, return the full iterator.
  9990. : iter.next().then(function(result) {
  9991. return result.done ? result.value : iter.next();
  9992. });
  9993. };
  9994. function makeInvokeMethod(innerFn, self, context) {
  9995. var state = GenStateSuspendedStart;
  9996. return function invoke(method, arg) {
  9997. if (state === GenStateExecuting) {
  9998. throw new Error("Generator is already running");
  9999. }
  10000. if (state === GenStateCompleted) {
  10001. if (method === "throw") {
  10002. throw arg;
  10003. }
  10004. // Be forgiving, per 25.3.3.3.3 of the spec:
  10005. // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
  10006. return doneResult();
  10007. }
  10008. context.method = method;
  10009. context.arg = arg;
  10010. while (true) {
  10011. var delegate = context.delegate;
  10012. if (delegate) {
  10013. var delegateResult = maybeInvokeDelegate(delegate, context);
  10014. if (delegateResult) {
  10015. if (delegateResult === ContinueSentinel) continue;
  10016. return delegateResult;
  10017. }
  10018. }
  10019. if (context.method === "next") {
  10020. // Setting context._sent for legacy support of Babel's
  10021. // function.sent implementation.
  10022. context.sent = context._sent = context.arg;
  10023. } else if (context.method === "throw") {
  10024. if (state === GenStateSuspendedStart) {
  10025. state = GenStateCompleted;
  10026. throw context.arg;
  10027. }
  10028. context.dispatchException(context.arg);
  10029. } else if (context.method === "return") {
  10030. context.abrupt("return", context.arg);
  10031. }
  10032. state = GenStateExecuting;
  10033. var record = tryCatch(innerFn, self, context);
  10034. if (record.type === "normal") {
  10035. // If an exception is thrown from innerFn, we leave state ===
  10036. // GenStateExecuting and loop back for another invocation.
  10037. state = context.done
  10038. ? GenStateCompleted
  10039. : GenStateSuspendedYield;
  10040. if (record.arg === ContinueSentinel) {
  10041. continue;
  10042. }
  10043. return {
  10044. value: record.arg,
  10045. done: context.done
  10046. };
  10047. } else if (record.type === "throw") {
  10048. state = GenStateCompleted;
  10049. // Dispatch the exception by looping back around to the
  10050. // context.dispatchException(context.arg) call above.
  10051. context.method = "throw";
  10052. context.arg = record.arg;
  10053. }
  10054. }
  10055. };
  10056. }
  10057. // Call delegate.iterator[context.method](context.arg) and handle the
  10058. // result, either by returning a { value, done } result from the
  10059. // delegate iterator, or by modifying context.method and context.arg,
  10060. // setting context.delegate to null, and returning the ContinueSentinel.
  10061. function maybeInvokeDelegate(delegate, context) {
  10062. var method = delegate.iterator[context.method];
  10063. if (method === undefined) {
  10064. // A .throw or .return when the delegate iterator has no .throw
  10065. // method always terminates the yield* loop.
  10066. context.delegate = null;
  10067. if (context.method === "throw") {
  10068. if (delegate.iterator.return) {
  10069. // If the delegate iterator has a return method, give it a
  10070. // chance to clean up.
  10071. context.method = "return";
  10072. context.arg = undefined;
  10073. maybeInvokeDelegate(delegate, context);
  10074. if (context.method === "throw") {
  10075. // If maybeInvokeDelegate(context) changed context.method from
  10076. // "return" to "throw", let that override the TypeError below.
  10077. return ContinueSentinel;
  10078. }
  10079. }
  10080. context.method = "throw";
  10081. context.arg = new TypeError(
  10082. "The iterator does not provide a 'throw' method");
  10083. }
  10084. return ContinueSentinel;
  10085. }
  10086. var record = tryCatch(method, delegate.iterator, context.arg);
  10087. if (record.type === "throw") {
  10088. context.method = "throw";
  10089. context.arg = record.arg;
  10090. context.delegate = null;
  10091. return ContinueSentinel;
  10092. }
  10093. var info = record.arg;
  10094. if (! info) {
  10095. context.method = "throw";
  10096. context.arg = new TypeError("iterator result is not an object");
  10097. context.delegate = null;
  10098. return ContinueSentinel;
  10099. }
  10100. if (info.done) {
  10101. // Assign the result of the finished delegate to the temporary
  10102. // variable specified by delegate.resultName (see delegateYield).
  10103. context[delegate.resultName] = info.value;
  10104. // Resume execution at the desired location (see delegateYield).
  10105. context.next = delegate.nextLoc;
  10106. // If context.method was "throw" but the delegate handled the
  10107. // exception, let the outer generator proceed normally. If
  10108. // context.method was "next", forget context.arg since it has been
  10109. // "consumed" by the delegate iterator. If context.method was
  10110. // "return", allow the original .return call to continue in the
  10111. // outer generator.
  10112. if (context.method !== "return") {
  10113. context.method = "next";
  10114. context.arg = undefined;
  10115. }
  10116. } else {
  10117. // Re-yield the result returned by the delegate method.
  10118. return info;
  10119. }
  10120. // The delegate iterator is finished, so forget it and continue with
  10121. // the outer generator.
  10122. context.delegate = null;
  10123. return ContinueSentinel;
  10124. }
  10125. // Define Generator.prototype.{next,throw,return} in terms of the
  10126. // unified ._invoke helper method.
  10127. defineIteratorMethods(Gp);
  10128. Gp[toStringTagSymbol] = "Generator";
  10129. // A Generator should always return itself as the iterator object when the
  10130. // @@iterator function is called on it. Some browsers' implementations of the
  10131. // iterator prototype chain incorrectly implement this, causing the Generator
  10132. // object to not be returned from this call. This ensures that doesn't happen.
  10133. // See https://github.com/facebook/regenerator/issues/274 for more details.
  10134. Gp[iteratorSymbol] = function() {
  10135. return this;
  10136. };
  10137. Gp.toString = function() {
  10138. return "[object Generator]";
  10139. };
  10140. function pushTryEntry(locs) {
  10141. var entry = { tryLoc: locs[0] };
  10142. if (1 in locs) {
  10143. entry.catchLoc = locs[1];
  10144. }
  10145. if (2 in locs) {
  10146. entry.finallyLoc = locs[2];
  10147. entry.afterLoc = locs[3];
  10148. }
  10149. this.tryEntries.push(entry);
  10150. }
  10151. function resetTryEntry(entry) {
  10152. var record = entry.completion || {};
  10153. record.type = "normal";
  10154. delete record.arg;
  10155. entry.completion = record;
  10156. }
  10157. function Context(tryLocsList) {
  10158. // The root entry object (effectively a try statement without a catch
  10159. // or a finally block) gives us a place to store values thrown from
  10160. // locations where there is no enclosing try statement.
  10161. this.tryEntries = [{ tryLoc: "root" }];
  10162. tryLocsList.forEach(pushTryEntry, this);
  10163. this.reset(true);
  10164. }
  10165. runtime.keys = function(object) {
  10166. var keys = [];
  10167. for (var key in object) {
  10168. keys.push(key);
  10169. }
  10170. keys.reverse();
  10171. // Rather than returning an object with a next method, we keep
  10172. // things simple and return the next function itself.
  10173. return function next() {
  10174. while (keys.length) {
  10175. var key = keys.pop();
  10176. if (key in object) {
  10177. next.value = key;
  10178. next.done = false;
  10179. return next;
  10180. }
  10181. }
  10182. // To avoid creating an additional object, we just hang the .value
  10183. // and .done properties off the next function object itself. This
  10184. // also ensures that the minifier will not anonymize the function.
  10185. next.done = true;
  10186. return next;
  10187. };
  10188. };
  10189. function values(iterable) {
  10190. if (iterable) {
  10191. var iteratorMethod = iterable[iteratorSymbol];
  10192. if (iteratorMethod) {
  10193. return iteratorMethod.call(iterable);
  10194. }
  10195. if (typeof iterable.next === "function") {
  10196. return iterable;
  10197. }
  10198. if (!isNaN(iterable.length)) {
  10199. var i = -1, next = function next() {
  10200. while (++i < iterable.length) {
  10201. if (hasOwn.call(iterable, i)) {
  10202. next.value = iterable[i];
  10203. next.done = false;
  10204. return next;
  10205. }
  10206. }
  10207. next.value = undefined;
  10208. next.done = true;
  10209. return next;
  10210. };
  10211. return next.next = next;
  10212. }
  10213. }
  10214. // Return an iterator with no values.
  10215. return { next: doneResult };
  10216. }
  10217. runtime.values = values;
  10218. function doneResult() {
  10219. return { value: undefined, done: true };
  10220. }
  10221. Context.prototype = {
  10222. constructor: Context,
  10223. reset: function(skipTempReset) {
  10224. this.prev = 0;
  10225. this.next = 0;
  10226. // Resetting context._sent for legacy support of Babel's
  10227. // function.sent implementation.
  10228. this.sent = this._sent = undefined;
  10229. this.done = false;
  10230. this.delegate = null;
  10231. this.method = "next";
  10232. this.arg = undefined;
  10233. this.tryEntries.forEach(resetTryEntry);
  10234. if (!skipTempReset) {
  10235. for (var name in this) {
  10236. // Not sure about the optimal order of these conditions:
  10237. if (name.charAt(0) === "t" &&
  10238. hasOwn.call(this, name) &&
  10239. !isNaN(+name.slice(1))) {
  10240. this[name] = undefined;
  10241. }
  10242. }
  10243. }
  10244. },
  10245. stop: function() {
  10246. this.done = true;
  10247. var rootEntry = this.tryEntries[0];
  10248. var rootRecord = rootEntry.completion;
  10249. if (rootRecord.type === "throw") {
  10250. throw rootRecord.arg;
  10251. }
  10252. return this.rval;
  10253. },
  10254. dispatchException: function(exception) {
  10255. if (this.done) {
  10256. throw exception;
  10257. }
  10258. var context = this;
  10259. function handle(loc, caught) {
  10260. record.type = "throw";
  10261. record.arg = exception;
  10262. context.next = loc;
  10263. if (caught) {
  10264. // If the dispatched exception was caught by a catch block,
  10265. // then let that catch block handle the exception normally.
  10266. context.method = "next";
  10267. context.arg = undefined;
  10268. }
  10269. return !! caught;
  10270. }
  10271. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  10272. var entry = this.tryEntries[i];
  10273. var record = entry.completion;
  10274. if (entry.tryLoc === "root") {
  10275. // Exception thrown outside of any try block that could handle
  10276. // it, so set the completion value of the entire function to
  10277. // throw the exception.
  10278. return handle("end");
  10279. }
  10280. if (entry.tryLoc <= this.prev) {
  10281. var hasCatch = hasOwn.call(entry, "catchLoc");
  10282. var hasFinally = hasOwn.call(entry, "finallyLoc");
  10283. if (hasCatch && hasFinally) {
  10284. if (this.prev < entry.catchLoc) {
  10285. return handle(entry.catchLoc, true);
  10286. } else if (this.prev < entry.finallyLoc) {
  10287. return handle(entry.finallyLoc);
  10288. }
  10289. } else if (hasCatch) {
  10290. if (this.prev < entry.catchLoc) {
  10291. return handle(entry.catchLoc, true);
  10292. }
  10293. } else if (hasFinally) {
  10294. if (this.prev < entry.finallyLoc) {
  10295. return handle(entry.finallyLoc);
  10296. }
  10297. } else {
  10298. throw new Error("try statement without catch or finally");
  10299. }
  10300. }
  10301. }
  10302. },
  10303. abrupt: function(type, arg) {
  10304. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  10305. var entry = this.tryEntries[i];
  10306. if (entry.tryLoc <= this.prev &&
  10307. hasOwn.call(entry, "finallyLoc") &&
  10308. this.prev < entry.finallyLoc) {
  10309. var finallyEntry = entry;
  10310. break;
  10311. }
  10312. }
  10313. if (finallyEntry &&
  10314. (type === "break" ||
  10315. type === "continue") &&
  10316. finallyEntry.tryLoc <= arg &&
  10317. arg <= finallyEntry.finallyLoc) {
  10318. // Ignore the finally entry if control is not jumping to a
  10319. // location outside the try/catch block.
  10320. finallyEntry = null;
  10321. }
  10322. var record = finallyEntry ? finallyEntry.completion : {};
  10323. record.type = type;
  10324. record.arg = arg;
  10325. if (finallyEntry) {
  10326. this.method = "next";
  10327. this.next = finallyEntry.finallyLoc;
  10328. return ContinueSentinel;
  10329. }
  10330. return this.complete(record);
  10331. },
  10332. complete: function(record, afterLoc) {
  10333. if (record.type === "throw") {
  10334. throw record.arg;
  10335. }
  10336. if (record.type === "break" ||
  10337. record.type === "continue") {
  10338. this.next = record.arg;
  10339. } else if (record.type === "return") {
  10340. this.rval = this.arg = record.arg;
  10341. this.method = "return";
  10342. this.next = "end";
  10343. } else if (record.type === "normal" && afterLoc) {
  10344. this.next = afterLoc;
  10345. }
  10346. return ContinueSentinel;
  10347. },
  10348. finish: function(finallyLoc) {
  10349. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  10350. var entry = this.tryEntries[i];
  10351. if (entry.finallyLoc === finallyLoc) {
  10352. this.complete(entry.completion, entry.afterLoc);
  10353. resetTryEntry(entry);
  10354. return ContinueSentinel;
  10355. }
  10356. }
  10357. },
  10358. "catch": function(tryLoc) {
  10359. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  10360. var entry = this.tryEntries[i];
  10361. if (entry.tryLoc === tryLoc) {
  10362. var record = entry.completion;
  10363. if (record.type === "throw") {
  10364. var thrown = record.arg;
  10365. resetTryEntry(entry);
  10366. }
  10367. return thrown;
  10368. }
  10369. }
  10370. // The context.catch method must only be called with a location
  10371. // argument that corresponds to a known catch block.
  10372. throw new Error("illegal catch attempt");
  10373. },
  10374. delegateYield: function(iterable, resultName, nextLoc) {
  10375. this.delegate = {
  10376. iterator: values(iterable),
  10377. resultName: resultName,
  10378. nextLoc: nextLoc
  10379. };
  10380. if (this.method === "next") {
  10381. // Deliberately forget the last sent value so that we don't
  10382. // accidentally pass it on to the delegate.
  10383. this.arg = undefined;
  10384. }
  10385. return ContinueSentinel;
  10386. }
  10387. };
  10388. })(
  10389. // In sloppy mode, unbound `this` refers to the global object, fallback to
  10390. // Function constructor if we're in global strict mode. That is sadly a form
  10391. // of indirect eval which violates Content Security Policy.
  10392. (function() {
  10393. return this || (typeof self === "object" && self);
  10394. })() || Function("return this")()
  10395. );
  10396. /***/ }),
  10397. /***/ 34:
  10398. /*!*******************************************************!*\
  10399. !*** C:/Users/first/Desktop/公司/applets/util/parse.js ***!
  10400. \*******************************************************/
  10401. /*! no static exports found */
  10402. /***/ (function(module, exports, __webpack_require__) {
  10403. "use strict";
  10404. /* 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 */ 31));var _base = _interopRequireDefault(__webpack_require__(/*! ./base64.js */ 35));
  10405. var _index = _interopRequireDefault(__webpack_require__(/*! ../store/index.js */ 16));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;}var
  10406. Parse = /*#__PURE__*/function () {function Parse() {_classCallCheck(this, Parse);_defineProperty(this, "info",
  10407. {});}_createClass(Parse, [{ key: "_processor",
  10408. // public method for decoding
  10409. value: function _processor(res) {
  10410. var base64 = _base.default.getInstance();
  10411. console.log(res);
  10412. var data = res.replace("https://goto.huijy.net/", "");
  10413. var stationId;
  10414. var employeeId;
  10415. var labelId;
  10416. var info = {
  10417. stationId: undefined,
  10418. labelId: undefined,
  10419. employeeId: undefined };
  10420. var idArr = data.match(/^\d{1,}/g);
  10421. if (idArr === null) {
  10422. throw new Error("二维码是个啥玩意?!");
  10423. }
  10424. // 处理后的data
  10425. data = data.replace(/^\d{1,}\//g, '');
  10426. // 解压后的data
  10427. data = base64.decode(data);
  10428. // 员工id
  10429. if (data.includes('e')) {
  10430. var employeeIdStrArr = data.match(/e\d{1,}/g);
  10431. if (employeeIdStrArr === null) {
  10432. return;
  10433. }
  10434. var employeeIdArr = employeeIdStrArr[0].match(/\d{1,}/g);
  10435. if (employeeIdArr === null) {
  10436. return;
  10437. }
  10438. employeeId = employeeIdArr[0];
  10439. this.info.employeeId = employeeId;
  10440. _index.default.commit('updateEmployeeId', employeeId);
  10441. }
  10442. // 标签id
  10443. if (data.includes('l')) {
  10444. var labelIdStrArr = data.match(/l\d{1,}/g);
  10445. if (labelIdStrArr === null) {
  10446. return;
  10447. }
  10448. var labelIdArr = labelIdStrArr[0].match(/\d{1,}/g);
  10449. if (labelIdArr === null) {
  10450. return;
  10451. }
  10452. labelId = labelIdArr[0];
  10453. this.info.labelId = labelId;
  10454. _index.default.commit("updateLabelId", labelId);
  10455. }
  10456. stationId = idArr[0];
  10457. this.info.stationId = stationId;
  10458. _index.default.commit("updateStationId", stationId);
  10459. return;
  10460. } }, { key: "parseCode", value: function () {var _parseCode = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee(
  10461. res) {return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:_context.prev = 0;
  10462. this._processor(res);return _context.abrupt("return",
  10463. Promise.resolve(this.info));case 5:_context.prev = 5;_context.t0 = _context["catch"](0);return _context.abrupt("return",
  10464. Promise.reject("亲,请扫油站提供的码呦~"));case 8:case "end":return _context.stop();}}}, _callee, this, [[0, 5]]);}));function parseCode(_x) {return _parseCode.apply(this, arguments);}return parseCode;}() }, { key: "_scanCode", value: function () {var _scanCode2 = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee2() {var scanCodePro;return _regenerator.default.wrap(function _callee2$(_context2) {while (1) {switch (_context2.prev = _context2.next) {case 0:_context2.prev = 0;_context2.next = 3;return (
  10465. uni.scanCode({
  10466. onlyFromCamera: true }));case 3:scanCodePro = _context2.sent;if (!(
  10467. scanCodePro[0] != null && scanCodePro[0].errMsg == "scanCode:fail")) {_context2.next = 6;break;}throw (
  10468. new Error(1));case 6:if (!(
  10469. scanCodePro[0] != null)) {_context2.next = 8;break;}throw (
  10470. new Error(2));case 8:return _context2.abrupt("return",
  10471. this.parseCode(scanCodePro[1].result));case 11:_context2.prev = 11;_context2.t0 = _context2["catch"](0);if (!(
  10472. _context2.t0.message == 1)) {_context2.next = 17;break;}return _context2.abrupt("return",
  10473. Promise.reject("亲,请扫油站提供的码呦~"));case 17:return _context2.abrupt("return",
  10474. Promise.reject("亲,请扫二维码呀~"));case 18:case "end":return _context2.stop();}}}, _callee2, this, [[0, 11]]);}));function _scanCode() {return _scanCode2.apply(this, arguments);}return _scanCode;}() }, { key: "scanCode", value: function () {var _scanCode3 = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee3() {var _this = this;var showModalFlag,moduleConfig,showModalPro,_args3 = arguments;return _regenerator.default.wrap(function _callee3$(_context3) {while (1) {switch (_context3.prev = _context3.next) {case 0:
  10475. showModalFlag = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : true;moduleConfig = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {}; //msg 消息
  10476. showModalPro = [
  10477. null,
  10478. {
  10479. cancel: false,
  10480. confirm: true }];if (!
  10481. showModalFlag) {_context3.next = 7;break;}_context3.next = 6;return (
  10482. uni.showModal({
  10483. title: moduleConfig.title || '(~ ̄▽ ̄)~',
  10484. showCancel: moduleConfig.showCancel,
  10485. content: moduleConfig.content || '亲,请扫码使用~',
  10486. cancelText: moduleConfig.cancelText || '返回',
  10487. confirmText: moduleConfig.confirmText || '立刻扫码' }));case 6:showModalPro = _context3.sent;case 7:if (!
  10488. showModalPro[1].cancel) {_context3.next = 12;break;}
  10489. uni.navigateBack({
  10490. delta: 1 });return _context3.abrupt("return",
  10491. Promise.reject("返回"));case 12:if (!
  10492. showModalPro[1].confirm) {_context3.next = 14;break;}return _context3.abrupt("return",
  10493. this._scanCode().catch(function (errMsg) {
  10494. console.log(errMsg);
  10495. return _this.scanCode(true, {
  10496. content: errMsg });
  10497. }));case 14:case "end":return _context3.stop();}}}, _callee3, this);}));function scanCode() {return _scanCode3.apply(this, arguments);}return scanCode;}() }], [{ key: "getInstance", // private property
  10498. value: function getInstance() {if (!this.instance) {this.instance = new Parse();}return this.instance;} }]);return Parse;}();exports.default = Parse;
  10499. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-alipay/dist/index.js */ 1)["default"]))
  10500. /***/ }),
  10501. /***/ 35:
  10502. /*!********************************************************!*\
  10503. !*** C:/Users/first/Desktop/公司/applets/util/base64.js ***!
  10504. \********************************************************/
  10505. /*! no static exports found */
  10506. /***/ (function(module, exports, __webpack_require__) {
  10507. "use strict";
  10508. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;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;}var Base64 = /*#__PURE__*/function () {function Base64() {_classCallCheck(this, Base64);_defineProperty(this, "_keyStr",
  10509. "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");_defineProperty(this, "encode",
  10510. function (input) {
  10511. var output = "";
  10512. var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
  10513. var i = 0;
  10514. input = this._utf8_encode(input);
  10515. while (i < input.length) {
  10516. chr1 = input.charCodeAt(i++);
  10517. chr2 = input.charCodeAt(i++);
  10518. chr3 = input.charCodeAt(i++);
  10519. enc1 = chr1 >> 2;
  10520. enc2 = (chr1 & 3) << 4 | chr2 >> 4;
  10521. enc3 = (chr2 & 15) << 2 | chr3 >> 6;
  10522. enc4 = chr3 & 63;
  10523. if (isNaN(chr2)) {
  10524. enc3 = enc4 = 64;
  10525. } else if (isNaN(chr3)) {
  10526. enc4 = 64;
  10527. }
  10528. output = output +
  10529. this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +
  10530. this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
  10531. }
  10532. return output;
  10533. });_defineProperty(this, "decode",
  10534. function (input) {
  10535. var output = "";
  10536. var chr1, chr2, chr3;
  10537. var enc1, enc2, enc3, enc4;
  10538. var i = 0;
  10539. input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
  10540. while (i < input.length) {
  10541. enc1 = this._keyStr.indexOf(input.charAt(i++));
  10542. enc2 = this._keyStr.indexOf(input.charAt(i++));
  10543. enc3 = this._keyStr.indexOf(input.charAt(i++));
  10544. enc4 = this._keyStr.indexOf(input.charAt(i++));
  10545. chr1 = enc1 << 2 | enc2 >> 4;
  10546. chr2 = (enc2 & 15) << 4 | enc3 >> 2;
  10547. chr3 = (enc3 & 3) << 6 | enc4;
  10548. output = output + String.fromCharCode(chr1);
  10549. if (enc3 != 64) {
  10550. output = output + String.fromCharCode(chr2);
  10551. }
  10552. if (enc4 != 64) {
  10553. output = output + String.fromCharCode(chr3);
  10554. }
  10555. }
  10556. output = this._utf8_decode(output);
  10557. return output;
  10558. });}_createClass(Base64, [{ key: "_utf8_encode",
  10559. // private method for UTF-8 encoding
  10560. value: function _utf8_encode(string) {
  10561. string = string.replace(/\r\n/g, "\n");
  10562. var utftext = "";
  10563. for (var n = 0; n < string.length; n++) {
  10564. var c = string.charCodeAt(n);
  10565. if (c < 128) {
  10566. utftext += String.fromCharCode(c);
  10567. } else if (c > 127 && c < 2048) {
  10568. utftext += String.fromCharCode(c >> 6 | 192);
  10569. utftext += String.fromCharCode(c & 63 | 128);
  10570. } else {
  10571. utftext += String.fromCharCode(c >> 12 | 224);
  10572. utftext += String.fromCharCode(c >> 6 & 63 | 128);
  10573. utftext += String.fromCharCode(c & 63 | 128);
  10574. }
  10575. }
  10576. return utftext;
  10577. }
  10578. // private method for UTF-8 decoding
  10579. }, { key: "_utf8_decode", value: function _utf8_decode(utftext) {var
  10580. string = '',i = 0,c = 0,c1 = 0,c2 = 0,c3 = 0;
  10581. while (i < utftext.length) {
  10582. c = utftext.charCodeAt(i);
  10583. if (c < 128) {
  10584. string += String.fromCharCode(c);
  10585. i++;
  10586. } else if (c > 191 && c < 224) {
  10587. c2 = utftext.charCodeAt(i + 1);
  10588. string += String.fromCharCode((c & 31) << 6 | c2 & 63);
  10589. i += 2;
  10590. } else {
  10591. c2 = utftext.charCodeAt(i + 1);
  10592. c3 = utftext.charCodeAt(i + 2);
  10593. string += String.fromCharCode((c & 15) << 12 | (c2 & 63) << 6 | c3 & 63);
  10594. i += 3;
  10595. }
  10596. }
  10597. return string;
  10598. } }], [{ key: "getInstance", value: function getInstance() {if (!this.instance) {this.instance = new Base64();}return this.instance;} // public method for encoding
  10599. }]);return Base64;}();exports.default = Base64;
  10600. /***/ }),
  10601. /***/ 4:
  10602. /*!*************************************************************!*\
  10603. !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
  10604. \*************************************************************/
  10605. /*! no static exports found */
  10606. /***/ (function(module, exports, __webpack_require__) {
  10607. "use strict";
  10608. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.compileI18nJsonStr = compileI18nJsonStr;exports.hasI18nJson = hasI18nJson;exports.initVueI18n = initVueI18n;exports.isI18nStr = isI18nStr;exports.normalizeLocale = normalizeLocale;exports.parseI18nJson = parseI18nJson;exports.isString = exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;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 _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 _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;}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 _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 isArray = Array.isArray;
  10609. var isObject = function isObject(val) {return val !== null && typeof val === 'object';};
  10610. var defaultDelimiters = ['{', '}'];var
  10611. BaseFormatter = /*#__PURE__*/function () {
  10612. function BaseFormatter() {_classCallCheck(this, BaseFormatter);
  10613. this._caches = Object.create(null);
  10614. }_createClass(BaseFormatter, [{ key: "interpolate", value: function interpolate(
  10615. message, values) {var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
  10616. if (!values) {
  10617. return [message];
  10618. }
  10619. var tokens = this._caches[message];
  10620. if (!tokens) {
  10621. tokens = parse(message, delimiters);
  10622. this._caches[message] = tokens;
  10623. }
  10624. return compile(tokens, values);
  10625. } }]);return BaseFormatter;}();exports.Formatter = BaseFormatter;
  10626. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  10627. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  10628. function parse(format, _ref) {var _ref2 = _slicedToArray(_ref, 2),startDelimiter = _ref2[0],endDelimiter = _ref2[1];
  10629. var tokens = [];
  10630. var position = 0;
  10631. var text = '';
  10632. while (position < format.length) {
  10633. var char = format[position++];
  10634. if (char === startDelimiter) {
  10635. if (text) {
  10636. tokens.push({ type: 'text', value: text });
  10637. }
  10638. text = '';
  10639. var sub = '';
  10640. char = format[position++];
  10641. while (char !== undefined && char !== endDelimiter) {
  10642. sub += char;
  10643. char = format[position++];
  10644. }
  10645. var isClosed = char === endDelimiter;
  10646. var type = RE_TOKEN_LIST_VALUE.test(sub) ?
  10647. 'list' :
  10648. isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ?
  10649. 'named' :
  10650. 'unknown';
  10651. tokens.push({ value: sub, type: type });
  10652. }
  10653. // else if (char === '%') {
  10654. // // when found rails i18n syntax, skip text capture
  10655. // if (format[position] !== '{') {
  10656. // text += char
  10657. // }
  10658. // }
  10659. else {
  10660. text += char;
  10661. }
  10662. }
  10663. text && tokens.push({ type: 'text', value: text });
  10664. return tokens;
  10665. }
  10666. function compile(tokens, values) {
  10667. var compiled = [];
  10668. var index = 0;
  10669. var mode = isArray(values) ?
  10670. 'list' :
  10671. isObject(values) ?
  10672. 'named' :
  10673. 'unknown';
  10674. if (mode === 'unknown') {
  10675. return compiled;
  10676. }
  10677. while (index < tokens.length) {
  10678. var token = tokens[index];
  10679. switch (token.type) {
  10680. case 'text':
  10681. compiled.push(token.value);
  10682. break;
  10683. case 'list':
  10684. compiled.push(values[parseInt(token.value, 10)]);
  10685. break;
  10686. case 'named':
  10687. if (mode === 'named') {
  10688. compiled.push(values[token.value]);
  10689. } else
  10690. {
  10691. if (true) {
  10692. console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
  10693. }
  10694. }
  10695. break;
  10696. case 'unknown':
  10697. if (true) {
  10698. console.warn("Detect 'unknown' type of token!");
  10699. }
  10700. break;}
  10701. index++;
  10702. }
  10703. return compiled;
  10704. }
  10705. var LOCALE_ZH_HANS = 'zh-Hans';exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
  10706. var LOCALE_ZH_HANT = 'zh-Hant';exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
  10707. var LOCALE_EN = 'en';exports.LOCALE_EN = LOCALE_EN;
  10708. var LOCALE_FR = 'fr';exports.LOCALE_FR = LOCALE_FR;
  10709. var LOCALE_ES = 'es';exports.LOCALE_ES = LOCALE_ES;
  10710. var hasOwnProperty = Object.prototype.hasOwnProperty;
  10711. var hasOwn = function hasOwn(val, key) {return hasOwnProperty.call(val, key);};
  10712. var defaultFormatter = new BaseFormatter();
  10713. function include(str, parts) {
  10714. return !!parts.find(function (part) {return str.indexOf(part) !== -1;});
  10715. }
  10716. function startsWith(str, parts) {
  10717. return parts.find(function (part) {return str.indexOf(part) === 0;});
  10718. }
  10719. function normalizeLocale(locale, messages) {
  10720. if (!locale) {
  10721. return;
  10722. }
  10723. locale = locale.trim().replace(/_/g, '-');
  10724. if (messages && messages[locale]) {
  10725. return locale;
  10726. }
  10727. locale = locale.toLowerCase();
  10728. if (locale.indexOf('zh') === 0) {
  10729. if (locale.indexOf('-hans') !== -1) {
  10730. return LOCALE_ZH_HANS;
  10731. }
  10732. if (locale.indexOf('-hant') !== -1) {
  10733. return LOCALE_ZH_HANT;
  10734. }
  10735. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  10736. return LOCALE_ZH_HANT;
  10737. }
  10738. return LOCALE_ZH_HANS;
  10739. }
  10740. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  10741. if (lang) {
  10742. return lang;
  10743. }
  10744. }var
  10745. I18n = /*#__PURE__*/function () {
  10746. function I18n(_ref3) {var locale = _ref3.locale,fallbackLocale = _ref3.fallbackLocale,messages = _ref3.messages,watcher = _ref3.watcher,formater = _ref3.formater;_classCallCheck(this, I18n);
  10747. this.locale = LOCALE_EN;
  10748. this.fallbackLocale = LOCALE_EN;
  10749. this.message = {};
  10750. this.messages = {};
  10751. this.watchers = [];
  10752. if (fallbackLocale) {
  10753. this.fallbackLocale = fallbackLocale;
  10754. }
  10755. this.formater = formater || defaultFormatter;
  10756. this.messages = messages || {};
  10757. this.setLocale(locale || LOCALE_EN);
  10758. if (watcher) {
  10759. this.watchLocale(watcher);
  10760. }
  10761. }_createClass(I18n, [{ key: "setLocale", value: function setLocale(
  10762. locale) {var _this = this;
  10763. var oldLocale = this.locale;
  10764. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  10765. if (!this.messages[this.locale]) {
  10766. // 可能初始化时不存在
  10767. this.messages[this.locale] = {};
  10768. }
  10769. this.message = this.messages[this.locale];
  10770. // 仅发生变化时,通知
  10771. if (oldLocale !== this.locale) {
  10772. this.watchers.forEach(function (watcher) {
  10773. watcher(_this.locale, oldLocale);
  10774. });
  10775. }
  10776. } }, { key: "getLocale", value: function getLocale()
  10777. {
  10778. return this.locale;
  10779. } }, { key: "watchLocale", value: function watchLocale(
  10780. fn) {var _this2 = this;
  10781. var index = this.watchers.push(fn) - 1;
  10782. return function () {
  10783. _this2.watchers.splice(index, 1);
  10784. };
  10785. } }, { key: "add", value: function add(
  10786. locale, message) {var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  10787. var curMessages = this.messages[locale];
  10788. if (curMessages) {
  10789. if (override) {
  10790. Object.assign(curMessages, message);
  10791. } else
  10792. {
  10793. Object.keys(message).forEach(function (key) {
  10794. if (!hasOwn(curMessages, key)) {
  10795. curMessages[key] = message[key];
  10796. }
  10797. });
  10798. }
  10799. } else
  10800. {
  10801. this.messages[locale] = message;
  10802. }
  10803. } }, { key: "f", value: function f(
  10804. message, values, delimiters) {
  10805. return this.formater.interpolate(message, values, delimiters).join('');
  10806. } }, { key: "t", value: function t(
  10807. key, locale, values) {
  10808. var message = this.message;
  10809. if (typeof locale === 'string') {
  10810. locale = normalizeLocale(locale, this.messages);
  10811. locale && (message = this.messages[locale]);
  10812. } else
  10813. {
  10814. values = locale;
  10815. }
  10816. if (!hasOwn(message, key)) {
  10817. console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
  10818. return key;
  10819. }
  10820. return this.formater.interpolate(message[key], values).join('');
  10821. } }]);return I18n;}();exports.I18n = I18n;
  10822. var ignoreVueI18n = true;
  10823. function watchAppLocale(appVm, i18n) {
  10824. appVm.$watch(function () {return appVm.$locale;}, function (newLocale) {
  10825. i18n.setLocale(newLocale);
  10826. });
  10827. }
  10828. function initVueI18n(locale) {var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;var watcher = arguments.length > 3 ? arguments[3] : undefined;
  10829. // 兼容旧版本入参
  10830. if (typeof locale !== 'string') {var _ref4 =
  10831. [
  10832. messages,
  10833. locale];locale = _ref4[0];messages = _ref4[1];
  10834. }
  10835. if (typeof locale !== 'string') {
  10836. locale =
  10837. typeof uni !== 'undefined' && uni.getLocale && uni.getLocale() ||
  10838. LOCALE_EN;
  10839. }
  10840. if (typeof fallbackLocale !== 'string') {
  10841. fallbackLocale =
  10842. typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale ||
  10843. LOCALE_EN;
  10844. }
  10845. var i18n = new I18n({
  10846. locale: locale,
  10847. fallbackLocale: fallbackLocale,
  10848. messages: messages,
  10849. watcher: watcher });
  10850. var _t = function t(key, values) {
  10851. if (typeof getApp !== 'function') {
  10852. // app view
  10853. /* eslint-disable no-func-assign */
  10854. _t = function t(key, values) {
  10855. return i18n.t(key, values);
  10856. };
  10857. } else
  10858. {
  10859. var appVm = getApp().$vm;
  10860. watchAppLocale(appVm, i18n);
  10861. if (!appVm.$t || !appVm.$i18n || ignoreVueI18n) {
  10862. // if (!locale) {
  10863. // i18n.setLocale(getDefaultLocale())
  10864. // }
  10865. /* eslint-disable no-func-assign */
  10866. _t = function t(key, values) {
  10867. // 触发响应式
  10868. appVm.$locale;
  10869. return i18n.t(key, values);
  10870. };
  10871. } else
  10872. {
  10873. /* eslint-disable no-func-assign */
  10874. _t = function t(key, values) {
  10875. var $i18n = appVm.$i18n;
  10876. var silentTranslationWarn = $i18n.silentTranslationWarn;
  10877. $i18n.silentTranslationWarn = true;
  10878. var msg = appVm.$t(key, values);
  10879. $i18n.silentTranslationWarn = silentTranslationWarn;
  10880. if (msg !== key) {
  10881. return msg;
  10882. }
  10883. return i18n.t(key, $i18n.locale, values);
  10884. };
  10885. }
  10886. }
  10887. return _t(key, values);
  10888. };
  10889. return {
  10890. i18n: i18n,
  10891. f: function f(message, values, delimiters) {
  10892. return i18n.f(message, values, delimiters);
  10893. },
  10894. t: function t(key, values) {
  10895. return _t(key, values);
  10896. },
  10897. add: function add(locale, message) {var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  10898. return i18n.add(locale, message, override);
  10899. },
  10900. watch: function watch(fn) {
  10901. return i18n.watchLocale(fn);
  10902. },
  10903. getLocale: function getLocale() {
  10904. return i18n.getLocale();
  10905. },
  10906. setLocale: function setLocale(newLocale) {
  10907. return i18n.setLocale(newLocale);
  10908. } };
  10909. }
  10910. var isString = function isString(val) {return typeof val === 'string';};exports.isString = isString;
  10911. var formater;
  10912. function hasI18nJson(jsonObj, delimiters) {
  10913. if (!formater) {
  10914. formater = new BaseFormatter();
  10915. }
  10916. return walkJsonObj(jsonObj, function (jsonObj, key) {
  10917. var value = jsonObj[key];
  10918. if (isString(value)) {
  10919. if (isI18nStr(value, delimiters)) {
  10920. return true;
  10921. }
  10922. } else
  10923. {
  10924. return hasI18nJson(value, delimiters);
  10925. }
  10926. });
  10927. }
  10928. function parseI18nJson(jsonObj, values, delimiters) {
  10929. if (!formater) {
  10930. formater = new BaseFormatter();
  10931. }
  10932. walkJsonObj(jsonObj, function (jsonObj, key) {
  10933. var value = jsonObj[key];
  10934. if (isString(value)) {
  10935. if (isI18nStr(value, delimiters)) {
  10936. jsonObj[key] = compileStr(value, values, delimiters);
  10937. }
  10938. } else
  10939. {
  10940. parseI18nJson(value, values, delimiters);
  10941. }
  10942. });
  10943. return jsonObj;
  10944. }
  10945. function compileI18nJsonStr(jsonStr, _ref5) {var locale = _ref5.locale,locales = _ref5.locales,delimiters = _ref5.delimiters;
  10946. if (!isI18nStr(jsonStr, delimiters)) {
  10947. return jsonStr;
  10948. }
  10949. if (!formater) {
  10950. formater = new BaseFormatter();
  10951. }
  10952. var localeValues = [];
  10953. Object.keys(locales).forEach(function (name) {
  10954. if (name !== locale) {
  10955. localeValues.push({
  10956. locale: name,
  10957. values: locales[name] });
  10958. }
  10959. });
  10960. localeValues.unshift({ locale: locale, values: locales[locale] });
  10961. try {
  10962. return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
  10963. }
  10964. catch (e) {}
  10965. return jsonStr;
  10966. }
  10967. function isI18nStr(value, delimiters) {
  10968. return value.indexOf(delimiters[0]) > -1;
  10969. }
  10970. function compileStr(value, values, delimiters) {
  10971. return formater.interpolate(value, values, delimiters).join('');
  10972. }
  10973. function compileValue(jsonObj, key, localeValues, delimiters) {
  10974. var value = jsonObj[key];
  10975. if (isString(value)) {
  10976. // 存在国际化
  10977. if (isI18nStr(value, delimiters)) {
  10978. jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
  10979. if (localeValues.length > 1) {
  10980. // 格式化国际化语言
  10981. var valueLocales = jsonObj[key + 'Locales'] = {};
  10982. localeValues.forEach(function (localValue) {
  10983. valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
  10984. });
  10985. }
  10986. }
  10987. } else
  10988. {
  10989. compileJsonObj(value, localeValues, delimiters);
  10990. }
  10991. }
  10992. function compileJsonObj(jsonObj, localeValues, delimiters) {
  10993. walkJsonObj(jsonObj, function (jsonObj, key) {
  10994. compileValue(jsonObj, key, localeValues, delimiters);
  10995. });
  10996. return jsonObj;
  10997. }
  10998. function walkJsonObj(jsonObj, walk) {
  10999. if (isArray(jsonObj)) {
  11000. for (var i = 0; i < jsonObj.length; i++) {
  11001. if (walk(jsonObj, i)) {
  11002. return true;
  11003. }
  11004. }
  11005. } else
  11006. if (isObject(jsonObj)) {
  11007. for (var key in jsonObj) {
  11008. if (walk(jsonObj, key)) {
  11009. return true;
  11010. }
  11011. }
  11012. }
  11013. return false;
  11014. }
  11015. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-alipay/dist/index.js */ 1)["default"]))
  11016. /***/ }),
  11017. /***/ 44:
  11018. /*!************************************************************!*\
  11019. !*** C:/Users/first/Desktop/公司/applets/util/permission.js ***!
  11020. \************************************************************/
  11021. /*! no static exports found */
  11022. /***/ (function(module, exports, __webpack_require__) {
  11023. "use strict";
  11024. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = _default;var _index = _interopRequireDefault(__webpack_require__(/*! ../store/index.js */ 16));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  11025. function _default() {
  11026. if (_index.default.state.user.userInfo.nickName === undefined) {
  11027. uni.navigateTo({
  11028. url: "/pages/authen/identity" });
  11029. return false;
  11030. }
  11031. if (_index.default.state.user.phoneNumber === '' || _index.default.state.user.openId === '' || _index.default.state.user.unionId === '') {
  11032. uni.navigateTo({
  11033. url: "/pages/authen/login" });
  11034. return false;
  11035. }
  11036. return true;
  11037. }
  11038. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-alipay/dist/index.js */ 1)["default"]))
  11039. /***/ }),
  11040. /***/ 5:
  11041. /*!****************************************************!*\
  11042. !*** C:/Users/first/Desktop/公司/applets/pages.json ***!
  11043. \****************************************************/
  11044. /*! no static exports found */
  11045. /***/ (function(module, exports) {
  11046. /***/ }),
  11047. /***/ 6:
  11048. /*!*******************************************************!*\
  11049. !*** ./node_modules/@dcloudio/uni-stat/dist/index.js ***!
  11050. \*******************************************************/
  11051. /*! no static exports found */
  11052. /***/ (function(module, exports, __webpack_require__) {
  11053. "use strict";
  11054. /* WEBPACK VAR INJECTION */(function(uni) {var _package = __webpack_require__(/*! ../package.json */ 7);function _inherits(subClass, superClass) {if (typeof superClass !== "function" && superClass !== null) {throw new TypeError("Super expression must either be null or a function");}subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });if (superClass) _setPrototypeOf(subClass, superClass);}function _setPrototypeOf(o, p) {_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {o.__proto__ = p;return o;};return _setPrototypeOf(o, p);}function _createSuper(Derived) {var hasNativeReflectConstruct = _isNativeReflectConstruct();return function _createSuperInternal() {var Super = _getPrototypeOf(Derived),result;if (hasNativeReflectConstruct) {var NewTarget = _getPrototypeOf(this).constructor;result = Reflect.construct(Super, arguments, NewTarget);} else {result = Super.apply(this, arguments);}return _possibleConstructorReturn(this, result);};}function _possibleConstructorReturn(self, call) {if (call && (typeof call === "object" || typeof call === "function")) {return call;}return _assertThisInitialized(self);}function _assertThisInitialized(self) {if (self === void 0) {throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct() {if (typeof Reflect === "undefined" || !Reflect.construct) return false;if (Reflect.construct.sham) return false;if (typeof Proxy === "function") return true;try {Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));return true;} catch (e) {return false;}}function _getPrototypeOf(o) {_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {return o.__proto__ || Object.getPrototypeOf(o);};return _getPrototypeOf(o);}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;}
  11055. var STAT_VERSION = _package.version;
  11056. var STAT_URL = 'https://tongji.dcloud.io/uni/stat';
  11057. var STAT_H5_URL = 'https://tongji.dcloud.io/uni/stat.gif';
  11058. var PAGE_PVER_TIME = 1800;
  11059. var APP_PVER_TIME = 300;
  11060. var OPERATING_TIME = 10;
  11061. var DIFF_TIME = 60 * 1000 * 60 * 24;
  11062. var statConfig = __webpack_require__(/*! uni-stat-config */ 8).default || __webpack_require__(/*! uni-stat-config */ 8);
  11063. var UUID_KEY = '__DC_STAT_UUID';
  11064. var UUID_VALUE = '__DC_UUID_VALUE';
  11065. function getUuid() {
  11066. var uuid = '';
  11067. if (getPlatformName() === 'n') {
  11068. try {
  11069. uuid = plus.runtime.getDCloudId();
  11070. } catch (e) {
  11071. uuid = '';
  11072. }
  11073. return uuid;
  11074. }
  11075. try {
  11076. uuid = uni.getStorageSync(UUID_KEY);
  11077. } catch (e) {
  11078. uuid = UUID_VALUE;
  11079. }
  11080. if (!uuid) {
  11081. uuid = Date.now() + '' + Math.floor(Math.random() * 1e7);
  11082. try {
  11083. uni.setStorageSync(UUID_KEY, uuid);
  11084. } catch (e) {
  11085. uni.setStorageSync(UUID_KEY, UUID_VALUE);
  11086. }
  11087. }
  11088. return uuid;
  11089. }
  11090. var getSgin = function getSgin(statData) {
  11091. var arr = Object.keys(statData);
  11092. var sortArr = arr.sort();
  11093. var sgin = {};
  11094. var sginStr = '';
  11095. for (var i in sortArr) {
  11096. sgin[sortArr[i]] = statData[sortArr[i]];
  11097. sginStr += sortArr[i] + '=' + statData[sortArr[i]] + '&';
  11098. }
  11099. // const options = sginStr.substr(0, sginStr.length - 1)
  11100. // sginStr = sginStr.substr(0, sginStr.length - 1) + '&key=' + STAT_KEY;
  11101. // const si = crypto.createHash('md5').update(sginStr).digest('hex');
  11102. return {
  11103. sign: '',
  11104. options: sginStr.substr(0, sginStr.length - 1) };
  11105. };
  11106. var getSplicing = function getSplicing(data) {
  11107. var str = '';
  11108. for (var i in data) {
  11109. str += i + '=' + data[i] + '&';
  11110. }
  11111. return str.substr(0, str.length - 1);
  11112. };
  11113. var getTime = function getTime() {
  11114. return parseInt(new Date().getTime() / 1000);
  11115. };
  11116. var getPlatformName = function getPlatformName() {var _platformList;
  11117. var aliArr = ['y', 'a', 'p', 'mp-ali'];
  11118. var platformList = (_platformList = {
  11119. 'app-plus': 'n',
  11120. 'h5': 'h5',
  11121. 'mp-weixin': 'wx' }, _defineProperty(_platformList,
  11122. aliArr.reverse().join(''), 'ali'), _defineProperty(_platformList,
  11123. 'mp-baidu', 'bd'), _defineProperty(_platformList,
  11124. 'mp-toutiao', 'tt'), _defineProperty(_platformList,
  11125. 'mp-qq', 'qq'), _defineProperty(_platformList,
  11126. 'quickapp-native', 'qn'), _defineProperty(_platformList,
  11127. 'mp-kuaishou', 'ks'), _platformList);
  11128. return platformList["mp-alipay"];
  11129. };
  11130. var getPackName = function getPackName() {
  11131. var packName = '';
  11132. if (getPlatformName() === 'wx' || getPlatformName() === 'qq') {
  11133. // 兼容微信小程序低版本基础库
  11134. if (uni.canIUse('getAccountInfoSync')) {
  11135. packName = uni.getAccountInfoSync().miniProgram.appId || '';
  11136. }
  11137. }
  11138. return packName;
  11139. };
  11140. var getVersion = function getVersion() {
  11141. return getPlatformName() === 'n' ? plus.runtime.version : '';
  11142. };
  11143. var getChannel = function getChannel() {
  11144. var platformName = getPlatformName();
  11145. var channel = '';
  11146. if (platformName === 'n') {
  11147. channel = plus.runtime.channel;
  11148. }
  11149. return channel;
  11150. };
  11151. var getScene = function getScene(options) {
  11152. var platformName = getPlatformName();
  11153. var scene = '';
  11154. if (options) {
  11155. return options;
  11156. }
  11157. if (platformName === 'wx') {
  11158. scene = uni.getLaunchOptionsSync().scene;
  11159. }
  11160. return scene;
  11161. };
  11162. var First__Visit__Time__KEY = 'First__Visit__Time';
  11163. var Last__Visit__Time__KEY = 'Last__Visit__Time';
  11164. var getFirstVisitTime = function getFirstVisitTime() {
  11165. var timeStorge = uni.getStorageSync(First__Visit__Time__KEY);
  11166. var time = 0;
  11167. if (timeStorge) {
  11168. time = timeStorge;
  11169. } else {
  11170. time = getTime();
  11171. uni.setStorageSync(First__Visit__Time__KEY, time);
  11172. uni.removeStorageSync(Last__Visit__Time__KEY);
  11173. }
  11174. return time;
  11175. };
  11176. var getLastVisitTime = function getLastVisitTime() {
  11177. var timeStorge = uni.getStorageSync(Last__Visit__Time__KEY);
  11178. var time = 0;
  11179. if (timeStorge) {
  11180. time = timeStorge;
  11181. } else {
  11182. time = '';
  11183. }
  11184. uni.setStorageSync(Last__Visit__Time__KEY, getTime());
  11185. return time;
  11186. };
  11187. var PAGE_RESIDENCE_TIME = '__page__residence__time';
  11188. var First_Page_residence_time = 0;
  11189. var Last_Page_residence_time = 0;
  11190. var setPageResidenceTime = function setPageResidenceTime() {
  11191. First_Page_residence_time = getTime();
  11192. if (getPlatformName() === 'n') {
  11193. uni.setStorageSync(PAGE_RESIDENCE_TIME, getTime());
  11194. }
  11195. return First_Page_residence_time;
  11196. };
  11197. var getPageResidenceTime = function getPageResidenceTime() {
  11198. Last_Page_residence_time = getTime();
  11199. if (getPlatformName() === 'n') {
  11200. First_Page_residence_time = uni.getStorageSync(PAGE_RESIDENCE_TIME);
  11201. }
  11202. return Last_Page_residence_time - First_Page_residence_time;
  11203. };
  11204. var TOTAL__VISIT__COUNT = 'Total__Visit__Count';
  11205. var getTotalVisitCount = function getTotalVisitCount() {
  11206. var timeStorge = uni.getStorageSync(TOTAL__VISIT__COUNT);
  11207. var count = 1;
  11208. if (timeStorge) {
  11209. count = timeStorge;
  11210. count++;
  11211. }
  11212. uni.setStorageSync(TOTAL__VISIT__COUNT, count);
  11213. return count;
  11214. };
  11215. var GetEncodeURIComponentOptions = function GetEncodeURIComponentOptions(statData) {
  11216. var data = {};
  11217. for (var prop in statData) {
  11218. data[prop] = encodeURIComponent(statData[prop]);
  11219. }
  11220. return data;
  11221. };
  11222. var Set__First__Time = 0;
  11223. var Set__Last__Time = 0;
  11224. var getFirstTime = function getFirstTime() {
  11225. var time = new Date().getTime();
  11226. Set__First__Time = time;
  11227. Set__Last__Time = 0;
  11228. return time;
  11229. };
  11230. var getLastTime = function getLastTime() {
  11231. var time = new Date().getTime();
  11232. Set__Last__Time = time;
  11233. return time;
  11234. };
  11235. var getResidenceTime = function getResidenceTime(type) {
  11236. var residenceTime = 0;
  11237. if (Set__First__Time !== 0) {
  11238. residenceTime = Set__Last__Time - Set__First__Time;
  11239. }
  11240. residenceTime = parseInt(residenceTime / 1000);
  11241. residenceTime = residenceTime < 1 ? 1 : residenceTime;
  11242. if (type === 'app') {
  11243. var overtime = residenceTime > APP_PVER_TIME ? true : false;
  11244. return {
  11245. residenceTime: residenceTime,
  11246. overtime: overtime };
  11247. }
  11248. if (type === 'page') {
  11249. var _overtime = residenceTime > PAGE_PVER_TIME ? true : false;
  11250. return {
  11251. residenceTime: residenceTime,
  11252. overtime: _overtime };
  11253. }
  11254. return {
  11255. residenceTime: residenceTime };
  11256. };
  11257. var getRoute = function getRoute() {
  11258. var pages = getCurrentPages();
  11259. var page = pages[pages.length - 1];
  11260. if (!page) return '';
  11261. var _self = page.$vm;
  11262. if (getPlatformName() === 'bd') {
  11263. return _self.$mp && _self.$mp.page.is;
  11264. } else {
  11265. return _self.$scope && _self.$scope.route || _self.$mp && _self.$mp.page.route;
  11266. }
  11267. };
  11268. var getPageRoute = function getPageRoute(self) {
  11269. var pages = getCurrentPages();
  11270. var page = pages[pages.length - 1];
  11271. if (!page) return '';
  11272. var _self = page.$vm;
  11273. var query = self._query;
  11274. var str = query && JSON.stringify(query) !== '{}' ? '?' + JSON.stringify(query) : '';
  11275. // clear
  11276. self._query = '';
  11277. if (getPlatformName() === 'bd') {
  11278. return _self.$mp && _self.$mp.page.is + str;
  11279. } else {
  11280. return _self.$scope && _self.$scope.route + str || _self.$mp && _self.$mp.page.route + str;
  11281. }
  11282. };
  11283. var getPageTypes = function getPageTypes(self) {
  11284. if (self.mpType === 'page' || self.$mp && self.$mp.mpType === 'page' || self.$options.mpType === 'page') {
  11285. return true;
  11286. }
  11287. return false;
  11288. };
  11289. var calibration = function calibration(eventName, options) {
  11290. // login 、 share 、pay_success 、pay_fail 、register 、title
  11291. if (!eventName) {
  11292. console.error("uni.report \u7F3A\u5C11 [eventName] \u53C2\u6570");
  11293. return true;
  11294. }
  11295. if (typeof eventName !== 'string') {
  11296. console.error("uni.report [eventName] \u53C2\u6570\u7C7B\u578B\u9519\u8BEF,\u53EA\u80FD\u4E3A String \u7C7B\u578B");
  11297. return true;
  11298. }
  11299. if (eventName.length > 255) {
  11300. console.error("uni.report [eventName] \u53C2\u6570\u957F\u5EA6\u4E0D\u80FD\u5927\u4E8E 255");
  11301. return true;
  11302. }
  11303. if (typeof options !== 'string' && typeof options !== 'object') {
  11304. console.error("uni.report [options] \u53C2\u6570\u7C7B\u578B\u9519\u8BEF,\u53EA\u80FD\u4E3A String \u6216 Object \u7C7B\u578B");
  11305. return true;
  11306. }
  11307. if (typeof options === 'string' && options.length > 255) {
  11308. console.error("uni.report [options] \u53C2\u6570\u957F\u5EA6\u4E0D\u80FD\u5927\u4E8E 255");
  11309. return true;
  11310. }
  11311. if (eventName === 'title' && typeof options !== 'string') {
  11312. console.error('uni.report [eventName] 参数为 title 时,[options] 参数只能为 String 类型');
  11313. return true;
  11314. }
  11315. };
  11316. var Report_Data_Time = 'Report_Data_Time';
  11317. var Report_Status = 'Report_Status';
  11318. var isReportData = function isReportData() {
  11319. return new Promise(function (resolve, reject) {
  11320. var start_time = '';
  11321. var end_time = new Date().getTime();
  11322. var diff_time = DIFF_TIME;
  11323. var report_status = 1;
  11324. try {
  11325. start_time = uni.getStorageSync(Report_Data_Time);
  11326. report_status = uni.getStorageSync(Report_Status);
  11327. } catch (e) {
  11328. start_time = '';
  11329. report_status = 1;
  11330. }
  11331. if (report_status === '') {
  11332. requestData(function (_ref)
  11333. {var enable = _ref.enable;
  11334. uni.setStorageSync(Report_Data_Time, end_time);
  11335. uni.setStorageSync(Report_Status, enable);
  11336. if (enable === 1) {
  11337. resolve();
  11338. }
  11339. });
  11340. return;
  11341. }
  11342. if (report_status === 1) {
  11343. resolve();
  11344. }
  11345. if (!start_time) {
  11346. uni.setStorageSync(Report_Data_Time, end_time);
  11347. start_time = end_time;
  11348. }
  11349. if (end_time - start_time > diff_time) {
  11350. requestData(function (_ref2)
  11351. {var enable = _ref2.enable;
  11352. uni.setStorageSync(Report_Data_Time, end_time);
  11353. uni.setStorageSync(Report_Status, enable);
  11354. });
  11355. }
  11356. });
  11357. };
  11358. var requestData = function requestData(done) {
  11359. var formData = {
  11360. usv: STAT_VERSION,
  11361. conf: JSON.stringify({
  11362. ak: statConfig.appid }) };
  11363. uni.request({
  11364. url: STAT_URL,
  11365. method: 'GET',
  11366. data: formData,
  11367. success: function success(res) {var
  11368. data =
  11369. res.data;
  11370. if (data.ret === 0) {
  11371. typeof done === 'function' && done({
  11372. enable: data.enable });
  11373. }
  11374. },
  11375. fail: function fail(e) {
  11376. var report_status_code = 1;
  11377. try {
  11378. report_status_code = uni.getStorageSync(Report_Status);
  11379. } catch (e) {
  11380. report_status_code = 1;
  11381. }
  11382. if (report_status_code === '') {
  11383. report_status_code = 1;
  11384. }
  11385. typeof done === 'function' && done({
  11386. enable: report_status_code });
  11387. } });
  11388. };
  11389. var PagesJson = __webpack_require__(/*! uni-pages?{"type":"style"} */ 9).default;
  11390. var statConfig$1 = __webpack_require__(/*! uni-stat-config */ 8).default || __webpack_require__(/*! uni-stat-config */ 8);
  11391. var resultOptions = uni.getSystemInfoSync();var
  11392. Util = /*#__PURE__*/function () {
  11393. function Util() {_classCallCheck(this, Util);
  11394. this.self = '';
  11395. this._retry = 0;
  11396. this._platform = '';
  11397. this._query = {};
  11398. this._navigationBarTitle = {
  11399. config: '',
  11400. page: '',
  11401. report: '',
  11402. lt: '' };
  11403. this._operatingTime = 0;
  11404. this._reportingRequestData = {
  11405. '1': [],
  11406. '11': [] };
  11407. this.__prevent_triggering = false;
  11408. this.__licationHide = false;
  11409. this.__licationShow = false;
  11410. this._lastPageRoute = '';
  11411. this.statData = {
  11412. uuid: getUuid(),
  11413. ut: getPlatformName(),
  11414. mpn: getPackName(),
  11415. ak: statConfig$1.appid,
  11416. usv: STAT_VERSION,
  11417. v: getVersion(),
  11418. ch: getChannel(),
  11419. cn: '',
  11420. pn: '',
  11421. ct: '',
  11422. t: getTime(),
  11423. tt: '',
  11424. p: resultOptions.platform === 'android' ? 'a' : 'i',
  11425. brand: resultOptions.brand || '',
  11426. md: resultOptions.model,
  11427. sv: resultOptions.system.replace(/(Android|iOS)\s/, ''),
  11428. mpsdk: resultOptions.SDKVersion || '',
  11429. mpv: resultOptions.version || '',
  11430. lang: resultOptions.language,
  11431. pr: resultOptions.pixelRatio,
  11432. ww: resultOptions.windowWidth,
  11433. wh: resultOptions.windowHeight,
  11434. sw: resultOptions.screenWidth,
  11435. sh: resultOptions.screenHeight };
  11436. }_createClass(Util, [{ key: "getIsReportData", value: function getIsReportData()
  11437. {
  11438. return isReportData();
  11439. } }, { key: "_applicationShow", value: function _applicationShow()
  11440. {
  11441. if (this.__licationHide) {
  11442. getLastTime();
  11443. var time = getResidenceTime('app');
  11444. if (time.overtime) {
  11445. var options = {
  11446. path: this._lastPageRoute,
  11447. scene: this.statData.sc };
  11448. this._sendReportRequest(options);
  11449. }
  11450. this.__licationHide = false;
  11451. }
  11452. } }, { key: "_applicationHide", value: function _applicationHide(
  11453. self, type) {
  11454. this.__licationHide = true;
  11455. getLastTime();
  11456. var time = getResidenceTime();
  11457. getFirstTime();
  11458. var route = getPageRoute(this);
  11459. this._sendHideRequest({
  11460. urlref: route,
  11461. urlref_ts: time.residenceTime },
  11462. type);
  11463. } }, { key: "_pageShow", value: function _pageShow()
  11464. {
  11465. var route = getPageRoute(this);
  11466. var routepath = getRoute();
  11467. this._navigationBarTitle.config = PagesJson &&
  11468. PagesJson.pages[routepath] &&
  11469. PagesJson.pages[routepath].titleNView &&
  11470. PagesJson.pages[routepath].titleNView.titleText ||
  11471. PagesJson &&
  11472. PagesJson.pages[routepath] &&
  11473. PagesJson.pages[routepath].navigationBarTitleText || '';
  11474. if (this.__licationShow) {
  11475. getFirstTime();
  11476. this.__licationShow = false;
  11477. // console.log('这是 onLauch 之后执行的第一次 pageShow ,为下次记录时间做准备');
  11478. this._lastPageRoute = route;
  11479. return;
  11480. }
  11481. getLastTime();
  11482. this._lastPageRoute = route;
  11483. var time = getResidenceTime('page');
  11484. if (time.overtime) {
  11485. var options = {
  11486. path: this._lastPageRoute,
  11487. scene: this.statData.sc };
  11488. this._sendReportRequest(options);
  11489. }
  11490. getFirstTime();
  11491. } }, { key: "_pageHide", value: function _pageHide()
  11492. {
  11493. if (!this.__licationHide) {
  11494. getLastTime();
  11495. var time = getResidenceTime('page');
  11496. this._sendPageRequest({
  11497. url: this._lastPageRoute,
  11498. urlref: this._lastPageRoute,
  11499. urlref_ts: time.residenceTime });
  11500. this._navigationBarTitle = {
  11501. config: '',
  11502. page: '',
  11503. report: '',
  11504. lt: '' };
  11505. return;
  11506. }
  11507. } }, { key: "_login", value: function _login()
  11508. {
  11509. this._sendEventRequest({
  11510. key: 'login' },
  11511. 0);
  11512. } }, { key: "_share", value: function _share()
  11513. {
  11514. this._sendEventRequest({
  11515. key: 'share' },
  11516. 0);
  11517. } }, { key: "_payment", value: function _payment(
  11518. key) {
  11519. this._sendEventRequest({
  11520. key: key },
  11521. 0);
  11522. } }, { key: "_sendReportRequest", value: function _sendReportRequest(
  11523. options) {
  11524. this._navigationBarTitle.lt = '1';
  11525. var query = options.query && JSON.stringify(options.query) !== '{}' ? '?' + JSON.stringify(options.query) : '';
  11526. this.statData.lt = '1';
  11527. this.statData.url = options.path + query || '';
  11528. this.statData.t = getTime();
  11529. this.statData.sc = getScene(options.scene);
  11530. this.statData.fvts = getFirstVisitTime();
  11531. this.statData.lvts = getLastVisitTime();
  11532. this.statData.tvc = getTotalVisitCount();
  11533. if (getPlatformName() === 'n') {
  11534. this.getProperty();
  11535. } else {
  11536. this.getNetworkInfo();
  11537. }
  11538. } }, { key: "_sendPageRequest", value: function _sendPageRequest(
  11539. opt) {var
  11540. url =
  11541. opt.url,urlref = opt.urlref,urlref_ts = opt.urlref_ts;
  11542. this._navigationBarTitle.lt = '11';
  11543. var options = {
  11544. ak: this.statData.ak,
  11545. uuid: this.statData.uuid,
  11546. lt: '11',
  11547. ut: this.statData.ut,
  11548. url: url,
  11549. tt: this.statData.tt,
  11550. urlref: urlref,
  11551. urlref_ts: urlref_ts,
  11552. ch: this.statData.ch,
  11553. usv: this.statData.usv,
  11554. t: getTime(),
  11555. p: this.statData.p };
  11556. this.request(options);
  11557. } }, { key: "_sendHideRequest", value: function _sendHideRequest(
  11558. opt, type) {var
  11559. urlref =
  11560. opt.urlref,urlref_ts = opt.urlref_ts;
  11561. var options = {
  11562. ak: this.statData.ak,
  11563. uuid: this.statData.uuid,
  11564. lt: '3',
  11565. ut: this.statData.ut,
  11566. urlref: urlref,
  11567. urlref_ts: urlref_ts,
  11568. ch: this.statData.ch,
  11569. usv: this.statData.usv,
  11570. t: getTime(),
  11571. p: this.statData.p };
  11572. this.request(options, type);
  11573. } }, { key: "_sendEventRequest", value: function _sendEventRequest()
  11574. {var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},_ref3$key = _ref3.key,key = _ref3$key === void 0 ? '' : _ref3$key,_ref3$value = _ref3.value,value = _ref3$value === void 0 ? "" : _ref3$value;
  11575. var route = this._lastPageRoute;
  11576. var options = {
  11577. ak: this.statData.ak,
  11578. uuid: this.statData.uuid,
  11579. lt: '21',
  11580. ut: this.statData.ut,
  11581. url: route,
  11582. ch: this.statData.ch,
  11583. e_n: key,
  11584. e_v: typeof value === 'object' ? JSON.stringify(value) : value.toString(),
  11585. usv: this.statData.usv,
  11586. t: getTime(),
  11587. p: this.statData.p };
  11588. this.request(options);
  11589. } }, { key: "getNetworkInfo", value: function getNetworkInfo()
  11590. {var _this = this;
  11591. uni.getNetworkType({
  11592. success: function success(result) {
  11593. _this.statData.net = result.networkType;
  11594. _this.getLocation();
  11595. } });
  11596. } }, { key: "getProperty", value: function getProperty()
  11597. {var _this2 = this;
  11598. plus.runtime.getProperty(plus.runtime.appid, function (wgtinfo) {
  11599. _this2.statData.v = wgtinfo.version || '';
  11600. _this2.getNetworkInfo();
  11601. });
  11602. } }, { key: "getLocation", value: function getLocation()
  11603. {var _this3 = this;
  11604. if (statConfig$1.getLocation) {
  11605. uni.getLocation({
  11606. type: 'wgs84',
  11607. geocode: true,
  11608. success: function success(result) {
  11609. if (result.address) {
  11610. _this3.statData.cn = result.address.country;
  11611. _this3.statData.pn = result.address.province;
  11612. _this3.statData.ct = result.address.city;
  11613. }
  11614. _this3.statData.lat = result.latitude;
  11615. _this3.statData.lng = result.longitude;
  11616. _this3.request(_this3.statData);
  11617. } });
  11618. } else {
  11619. this.statData.lat = 0;
  11620. this.statData.lng = 0;
  11621. this.request(this.statData);
  11622. }
  11623. } }, { key: "request", value: function request(
  11624. data, type) {var _this4 = this;
  11625. var time = getTime();
  11626. var title = this._navigationBarTitle;
  11627. data.ttn = title.page;
  11628. data.ttpj = title.config;
  11629. data.ttc = title.report;
  11630. var requestData = this._reportingRequestData;
  11631. if (getPlatformName() === 'n') {
  11632. requestData = uni.getStorageSync('__UNI__STAT__DATA') || {};
  11633. }
  11634. if (!requestData[data.lt]) {
  11635. requestData[data.lt] = [];
  11636. }
  11637. requestData[data.lt].push(data);
  11638. if (getPlatformName() === 'n') {
  11639. uni.setStorageSync('__UNI__STAT__DATA', requestData);
  11640. }
  11641. if (getPageResidenceTime() < OPERATING_TIME && !type) {
  11642. return;
  11643. }
  11644. var uniStatData = this._reportingRequestData;
  11645. if (getPlatformName() === 'n') {
  11646. uniStatData = uni.getStorageSync('__UNI__STAT__DATA');
  11647. }
  11648. // 时间超过,重新获取时间戳
  11649. setPageResidenceTime();
  11650. var firstArr = [];
  11651. var contentArr = [];
  11652. var lastArr = [];var _loop = function _loop(
  11653. i) {
  11654. var rd = uniStatData[i];
  11655. rd.forEach(function (elm) {
  11656. var newData = getSplicing(elm);
  11657. if (i === 0) {
  11658. firstArr.push(newData);
  11659. } else if (i === 3) {
  11660. lastArr.push(newData);
  11661. } else {
  11662. contentArr.push(newData);
  11663. }
  11664. });};for (var i in uniStatData) {_loop(i);
  11665. }
  11666. firstArr.push.apply(firstArr, contentArr.concat(lastArr));
  11667. var optionsData = {
  11668. usv: STAT_VERSION, //统计 SDK 版本号
  11669. t: time, //发送请求时的时间戮
  11670. requests: JSON.stringify(firstArr) };
  11671. this._reportingRequestData = {};
  11672. if (getPlatformName() === 'n') {
  11673. uni.removeStorageSync('__UNI__STAT__DATA');
  11674. }
  11675. if (data.ut === 'h5') {
  11676. this.imageRequest(optionsData);
  11677. return;
  11678. }
  11679. if (getPlatformName() === 'n' && this.statData.p === 'a') {
  11680. setTimeout(function () {
  11681. _this4._sendRequest(optionsData);
  11682. }, 200);
  11683. return;
  11684. }
  11685. this._sendRequest(optionsData);
  11686. } }, { key: "_sendRequest", value: function _sendRequest(
  11687. optionsData) {var _this5 = this;
  11688. this.getIsReportData().then(function () {
  11689. uni.request({
  11690. url: STAT_URL,
  11691. method: 'POST',
  11692. // header: {
  11693. // 'content-type': 'application/json' // 默认值
  11694. // },
  11695. data: optionsData,
  11696. success: function success() {
  11697. // if (process.env.NODE_ENV === 'development') {
  11698. // console.log('stat request success');
  11699. // }
  11700. },
  11701. fail: function fail(e) {
  11702. if (++_this5._retry < 3) {
  11703. setTimeout(function () {
  11704. _this5._sendRequest(optionsData);
  11705. }, 1000);
  11706. }
  11707. } });
  11708. });
  11709. }
  11710. /**
  11711. * h5 请求
  11712. */ }, { key: "imageRequest", value: function imageRequest(
  11713. data) {
  11714. this.getIsReportData().then(function () {
  11715. var image = new Image();
  11716. var options = getSgin(GetEncodeURIComponentOptions(data)).options;
  11717. image.src = STAT_H5_URL + '?' + options;
  11718. });
  11719. } }, { key: "sendEvent", value: function sendEvent(
  11720. key, value) {
  11721. // 校验 type 参数
  11722. if (calibration(key, value)) return;
  11723. if (key === 'title') {
  11724. this._navigationBarTitle.report = value;
  11725. return;
  11726. }
  11727. this._sendEventRequest({
  11728. key: key,
  11729. value: typeof value === 'object' ? JSON.stringify(value) : value },
  11730. 1);
  11731. } }]);return Util;}();var
  11732. Stat = /*#__PURE__*/function (_Util) {_inherits(Stat, _Util);var _super = _createSuper(Stat);_createClass(Stat, null, [{ key: "getInstance", value: function getInstance()
  11733. {
  11734. if (!this.instance) {
  11735. this.instance = new Stat();
  11736. }
  11737. return this.instance;
  11738. } }]);
  11739. function Stat() {var _this6;_classCallCheck(this, Stat);
  11740. _this6 = _super.call(this);
  11741. _this6.instance = null;
  11742. // 注册拦截器
  11743. if (typeof uni.addInterceptor === 'function' && "development" !== 'development') {
  11744. _this6.addInterceptorInit();
  11745. _this6.interceptLogin();
  11746. _this6.interceptShare(true);
  11747. _this6.interceptRequestPayment();
  11748. }return _this6;
  11749. }_createClass(Stat, [{ key: "addInterceptorInit", value: function addInterceptorInit()
  11750. {
  11751. var self = this;
  11752. uni.addInterceptor('setNavigationBarTitle', {
  11753. invoke: function invoke(args) {
  11754. self._navigationBarTitle.page = args.title;
  11755. } });
  11756. } }, { key: "interceptLogin", value: function interceptLogin()
  11757. {
  11758. var self = this;
  11759. uni.addInterceptor('login', {
  11760. complete: function complete() {
  11761. self._login();
  11762. } });
  11763. } }, { key: "interceptShare", value: function interceptShare(
  11764. type) {
  11765. var self = this;
  11766. if (!type) {
  11767. self._share();
  11768. return;
  11769. }
  11770. uni.addInterceptor('share', {
  11771. success: function success() {
  11772. self._share();
  11773. },
  11774. fail: function fail() {
  11775. self._share();
  11776. } });
  11777. } }, { key: "interceptRequestPayment", value: function interceptRequestPayment()
  11778. {
  11779. var self = this;
  11780. uni.addInterceptor('requestPayment', {
  11781. success: function success() {
  11782. self._payment('pay_success');
  11783. },
  11784. fail: function fail() {
  11785. self._payment('pay_fail');
  11786. } });
  11787. } }, { key: "report", value: function report(
  11788. options, self) {
  11789. this.self = self;
  11790. // if (process.env.NODE_ENV === 'development') {
  11791. // console.log('report init');
  11792. // }
  11793. setPageResidenceTime();
  11794. this.__licationShow = true;
  11795. this._sendReportRequest(options, true);
  11796. } }, { key: "load", value: function load(
  11797. options, self) {
  11798. if (!self.$scope && !self.$mp) {
  11799. var page = getCurrentPages();
  11800. self.$scope = page[page.length - 1];
  11801. }
  11802. this.self = self;
  11803. this._query = options;
  11804. } }, { key: "show", value: function show(
  11805. self) {
  11806. this.self = self;
  11807. if (getPageTypes(self)) {
  11808. this._pageShow(self);
  11809. } else {
  11810. this._applicationShow(self);
  11811. }
  11812. } }, { key: "ready", value: function ready(
  11813. self) {
  11814. // this.self = self;
  11815. // if (getPageTypes(self)) {
  11816. // this._pageShow(self);
  11817. // }
  11818. } }, { key: "hide", value: function hide(
  11819. self) {
  11820. this.self = self;
  11821. if (getPageTypes(self)) {
  11822. this._pageHide(self);
  11823. } else {
  11824. this._applicationHide(self, true);
  11825. }
  11826. } }, { key: "error", value: function error(
  11827. em) {
  11828. if (this._platform === 'devtools') {
  11829. if (true) {
  11830. console.info('当前运行环境为开发者工具,不上报数据。');
  11831. }
  11832. // return;
  11833. }
  11834. var emVal = '';
  11835. if (!em.message) {
  11836. emVal = JSON.stringify(em);
  11837. } else {
  11838. emVal = em.stack;
  11839. }
  11840. var options = {
  11841. ak: this.statData.ak,
  11842. uuid: this.statData.uuid,
  11843. lt: '31',
  11844. ut: this.statData.ut,
  11845. ch: this.statData.ch,
  11846. mpsdk: this.statData.mpsdk,
  11847. mpv: this.statData.mpv,
  11848. v: this.statData.v,
  11849. em: emVal,
  11850. usv: this.statData.usv,
  11851. t: getTime(),
  11852. p: this.statData.p };
  11853. this.request(options);
  11854. } }]);return Stat;}(Util);
  11855. var stat = Stat.getInstance();
  11856. var isHide = false;
  11857. var lifecycle = {
  11858. onLaunch: function onLaunch(options) {
  11859. stat.report(options, this);
  11860. },
  11861. onReady: function onReady() {
  11862. stat.ready(this);
  11863. },
  11864. onLoad: function onLoad(options) {
  11865. stat.load(options, this);
  11866. // 重写分享,获取分享上报事件
  11867. if (this.$scope && this.$scope.onShareAppMessage) {
  11868. var oldShareAppMessage = this.$scope.onShareAppMessage;
  11869. this.$scope.onShareAppMessage = function (options) {
  11870. stat.interceptShare(false);
  11871. return oldShareAppMessage.call(this, options);
  11872. };
  11873. }
  11874. },
  11875. onShow: function onShow() {
  11876. isHide = false;
  11877. stat.show(this);
  11878. },
  11879. onHide: function onHide() {
  11880. isHide = true;
  11881. stat.hide(this);
  11882. },
  11883. onUnload: function onUnload() {
  11884. if (isHide) {
  11885. isHide = false;
  11886. return;
  11887. }
  11888. stat.hide(this);
  11889. },
  11890. onError: function onError(e) {
  11891. stat.error(e);
  11892. } };
  11893. function main() {
  11894. if (true) {
  11895. uni.report = function (type, options) {};
  11896. } else { var Vue; }
  11897. }
  11898. main();
  11899. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-alipay/dist/index.js */ 1)["default"]))
  11900. /***/ }),
  11901. /***/ 7:
  11902. /*!******************************************************!*\
  11903. !*** ./node_modules/@dcloudio/uni-stat/package.json ***!
  11904. \******************************************************/
  11905. /*! exports provided: _from, _id, _inBundle, _integrity, _location, _phantomChildren, _requested, _requiredBy, _resolved, _shasum, _spec, _where, author, bugs, bundleDependencies, deprecated, description, devDependencies, files, gitHead, homepage, license, main, name, repository, scripts, version, default */
  11906. /***/ (function(module) {
  11907. module.exports = JSON.parse("{\"_from\":\"@dcloudio/uni-stat@next\",\"_id\":\"@dcloudio/uni-stat@2.0.0-32920210926001\",\"_inBundle\":false,\"_integrity\":\"sha512-bVqddjV0ee/Mr9QRHocrer928xApKiwFCqFaDwc6DDshm0njr/l2CvGAdvJZybf3sG5W6+WVE/KOqMFX0UElYg==\",\"_location\":\"/@dcloudio/uni-stat\",\"_phantomChildren\":{},\"_requested\":{\"type\":\"tag\",\"registry\":true,\"raw\":\"@dcloudio/uni-stat@next\",\"name\":\"@dcloudio/uni-stat\",\"escapedName\":\"@dcloudio%2funi-stat\",\"scope\":\"@dcloudio\",\"rawSpec\":\"next\",\"saveSpec\":null,\"fetchSpec\":\"next\"},\"_requiredBy\":[\"#USER\",\"/\",\"/@dcloudio/vue-cli-plugin-uni\"],\"_resolved\":\"https://registry.npmjs.org/@dcloudio/uni-stat/-/uni-stat-2.0.0-32920210926001.tgz\",\"_shasum\":\"99e890392781b5ab18d6b40c7031da9462038d64\",\"_spec\":\"@dcloudio/uni-stat@next\",\"_where\":\"/Users/guoshengqiang/Documents/dcloud-plugins-new/release/uniapp-cli\",\"author\":\"\",\"bugs\":{\"url\":\"https://github.com/dcloudio/uni-app/issues\"},\"bundleDependencies\":false,\"deprecated\":false,\"description\":\"\",\"devDependencies\":{\"@babel/core\":\"^7.5.5\",\"@babel/preset-env\":\"^7.5.5\",\"eslint\":\"^6.1.0\",\"rollup\":\"^1.19.3\",\"rollup-plugin-babel\":\"^4.3.3\",\"rollup-plugin-clear\":\"^2.0.7\",\"rollup-plugin-commonjs\":\"^10.0.2\",\"rollup-plugin-copy\":\"^3.1.0\",\"rollup-plugin-eslint\":\"^7.0.0\",\"rollup-plugin-json\":\"^4.0.0\",\"rollup-plugin-node-resolve\":\"^5.2.0\",\"rollup-plugin-replace\":\"^2.2.0\",\"rollup-plugin-uglify\":\"^6.0.2\"},\"files\":[\"dist\",\"package.json\",\"LICENSE\"],\"gitHead\":\"5e7404fe087c97dfc46bfa7b0ab9044a2fa90142\",\"homepage\":\"https://github.com/dcloudio/uni-app#readme\",\"license\":\"Apache-2.0\",\"main\":\"dist/index.js\",\"name\":\"@dcloudio/uni-stat\",\"repository\":{\"type\":\"git\",\"url\":\"git+https://github.com/dcloudio/uni-app.git\",\"directory\":\"packages/uni-stat\"},\"scripts\":{\"build\":\"NODE_ENV=production rollup -c rollup.config.js\",\"dev\":\"NODE_ENV=development rollup -w -c rollup.config.js\"},\"version\":\"2.0.0-32920210926001\"}");
  11908. /***/ }),
  11909. /***/ 8:
  11910. /*!********************************************************************!*\
  11911. !*** C:/Users/first/Desktop/公司/applets/pages.json?{"type":"stat"} ***!
  11912. \********************************************************************/
  11913. /*! no static exports found */
  11914. /***/ (function(module, exports, __webpack_require__) {
  11915. "use strict";
  11916. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = { "appid": "__UNI__BAF74FD" };exports.default = _default;
  11917. /***/ }),
  11918. /***/ 9:
  11919. /*!*********************************************************************!*\
  11920. !*** C:/Users/first/Desktop/公司/applets/pages.json?{"type":"style"} ***!
  11921. \*********************************************************************/
  11922. /*! no static exports found */
  11923. /***/ (function(module, exports, __webpack_require__) {
  11924. "use strict";
  11925. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = { "pages": { "pages/list/list": { "defaultTitle": "油站列表", "pullRefresh": false }, "pages/index/index": { "defaultTitle": "一键加油" }, "pages/test/test": { "defaultTitle": "测试页", "pullRefresh": false }, "pages/succeed/succeed": { "defaultTitle": "支付成功", "pullRefresh": false }, "pages/authen/identity": { "defaultTitle": "请求授权", "pullRefresh": false }, "pages/authen/login": { "defaultTitle": "登录", "pullRefresh": false }, "pages/confirm/confirm": { "defaultTitle": "订单确认", "pullRefresh": false }, "pages/skip/skip": { "defaultTitle": "跳转中", "pullRefresh": false } }, "globalStyle": { "defaultTitle": "uni-app", "titleBarColor": "#F8F8F8", "backgroundColor": "#F8F8F8" } };exports.default = _default;
  11926. /***/ })
  11927. }]);